alreadyWordorderDetails.html 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta
  6. name="viewport"
  7. content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"
  8. />
  9. <meta
  10. name="format-detection"
  11. content="telephone=no,email=no,date=no,address=no"
  12. />
  13. <title></title>
  14. <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
  15. <style>
  16. body {
  17. background: #fff;
  18. }
  19. .api_layout {
  20. background: #fff;
  21. width: 100%;
  22. /*margin-top: -10px;*/
  23. }
  24. .column {
  25. margin-bottom: 10px;
  26. }
  27. .aui-row {
  28. border: 1px dashed #c8d2de;
  29. -webkit-border-radius: 5px;
  30. -moz-border-radius: 5px;
  31. border-radius: 5px;
  32. padding: 10px;
  33. }
  34. .technological-process {
  35. margin-top: 10px;
  36. }
  37. /*****/
  38. /*审批进度条*/
  39. .layui-timeline {
  40. padding-left: 5px;
  41. }
  42. .layui-timeline-item {
  43. position: relative;
  44. padding-bottom: 20px;
  45. }
  46. .layui-timeline-item:first-child:before {
  47. display: block;
  48. }
  49. .layui-timeline-item:before {
  50. content: '';
  51. position: absolute;
  52. left: 5px;
  53. top: 0;
  54. z-index: 0;
  55. width: 1px;
  56. height: 100%;
  57. }
  58. .layui-timeline-item:before,
  59. hr {
  60. background-color: #e6e6e6;
  61. }
  62. .layui-timeline-item .layui-timeline-item_top_img {
  63. font-size: 12px;
  64. font-weight: bold;
  65. position: absolute;
  66. left: -5px;
  67. top: 0;
  68. z-index: 10;
  69. width: 20px;
  70. height: 20px;
  71. line-height: 20px;
  72. background-color: #fff;
  73. border-radius: 50%;
  74. text-align: center;
  75. cursor: pointer;
  76. }
  77. .Correct {
  78. color: #5fb878;
  79. border: 1px solid #5fb878;
  80. }
  81. .closes {
  82. color: red;
  83. border: 1px solid red;
  84. }
  85. .layui-timeline-content {
  86. padding-left: 25px;
  87. }
  88. .layui-text {
  89. line-height: 22px;
  90. font-size: 14px;
  91. color: #666;
  92. }
  93. .layui-timeline-title {
  94. display: flex;
  95. align-items: center;
  96. justify-content: flex-start;
  97. }
  98. .layui-timeline-reamrk-text {
  99. color: #4bc612;
  100. }
  101. .remark {
  102. padding: 3px 0 0 2px;
  103. border-radius: 2px;
  104. display: none;
  105. }
  106. /*手写签名*/
  107. .signature_img_container {
  108. margin-top: 5px;
  109. }
  110. .tips_signature {
  111. margin: 5px 14px 0 14px;
  112. padding: 10px 0 10px 9px;
  113. display: flex;
  114. align-items: center;
  115. background: rgba(255, 255, 255, 1);
  116. box-shadow: 0px 0px 5px 5px rgba(0, 0, 0, 0.05);
  117. border-radius: 5px;
  118. color: #7F8C8D;
  119. }
  120. .tips_signature img {
  121. width: 21px;
  122. height: 21px;
  123. }
  124. /******/
  125. .aui-list-item-input label {
  126. font-size: 14px;
  127. height: 21px;
  128. display: inline-block;
  129. line-height: 22px;
  130. margin-right: 5px;
  131. }
  132. .aui-list-item-input label:last-child {
  133. margin-right: 0;
  134. }
  135. .itmes li {
  136. display: flex;
  137. justify-content: space-between;
  138. flex-wrap: nowrap;
  139. padding: 10px 0;
  140. position: relative;
  141. }
  142. .itmes li:after {
  143. content: '';
  144. position: absolute;
  145. bottom: 0;
  146. left: 0;
  147. height: 1px;
  148. background: #ebeef3;
  149. width: 100%;
  150. }
  151. .itmes p {
  152. width: 40%;
  153. color: #2c3e50;
  154. font-size: 15px;
  155. }
  156. .itmes p:last-child {
  157. margin-left: 10px;
  158. width: 55%;
  159. color: #3498db;
  160. }
  161. .column {
  162. margin-top: 15px;
  163. }
  164. .column-title {
  165. font-size: 15px;
  166. color: #2c3e50;
  167. margin-bottom: 5px;
  168. display: block;
  169. }
  170. .header-img {
  171. width: 50px;
  172. height: 50px;
  173. -webkit-border-radius: 50%;
  174. -moz-border-radius: 50%;
  175. border-radius: 50%;
  176. object-fit: cover;
  177. margin-right: 10px;
  178. }
  179. .img-title {
  180. display: flex;
  181. justify-content: flex-start;
  182. flex-wrap: nowrap;
  183. }
  184. /*.personalInfo{
  185. margin-bottom: 20px;
  186. }*/
  187. .personalInfo span {
  188. display: block;
  189. font-size: 14px;
  190. color: #6c6f74;
  191. }
  192. .personalInfo span:first-child {
  193. font-size: 18px;
  194. color: #002257;
  195. }
  196. .examine-success {
  197. background: #1abc9c;
  198. }
  199. .examine-red {
  200. background: #e74c3c;
  201. }
  202. .staff_name {
  203. width: 50px;
  204. height: 50px;
  205. -webkit-border-radius: 50%;
  206. -moz-border-radius: 50%;
  207. border-radius: 50%;
  208. margin-right: 10px;
  209. line-height: 50px;
  210. text-align: center;
  211. color: #fff;
  212. }
  213. .aui-col-xs-4 img {
  214. object-fit: cover;
  215. border-radius: 3px;
  216. margin: auto;
  217. }
  218. .aui-col-xs-4 span {
  219. overflow: hidden;
  220. text-overflow: ellipsis;
  221. display: -webkit-box;
  222. -webkit-line-clamp: 2;
  223. -webkit-box-orient: vertical;
  224. padding: 0 3px;
  225. height: 48px;
  226. text-align: center;
  227. margin: 5px 0;
  228. font-size: 15px;
  229. }
  230. .fileList img {
  231. width: 35px;
  232. height: 35px;
  233. }
  234. .name-column span {
  235. background: #009fe8;
  236. padding: 4px 4px 2px 4px;
  237. color: #fff;
  238. border-radius: 2px;
  239. font-size: 13px;
  240. }
  241. .add-message-remark {
  242. background: #fff;
  243. border-radius: 10px;
  244. position: relative;
  245. }
  246. .add-message-remark-child {
  247. background: #fff;
  248. margin: 0 15px 15px 15px;
  249. border-radius: 5px;
  250. border: 1px solid rgba(224, 225, 226, 1);
  251. }
  252. .details-message {
  253. width: 100%;
  254. background: #fff;
  255. }
  256. .details-message-container {
  257. padding: 15px;
  258. }
  259. .details-message-child {
  260. padding: 15px;
  261. }
  262. .work-order-remarks {
  263. color: #2C3E50;
  264. font-size: 15px;
  265. font-weight: bold;
  266. }
  267. .remarkInfo {
  268. color: #232627;
  269. }
  270. .remarkInfo-message {
  271. background:rgba(236,240,241,1);
  272. border-radius:2px;
  273. display: flex;
  274. }
  275. .left-line-icon {
  276. background: #009FE8;
  277. width: 3px;
  278. margin: 8px 0;
  279. }
  280. .remarkInfo-message div:last-child {
  281. padding: 7.5px 0 7.5px 10px;
  282. color: #009FE8;
  283. /*font-weight: bold;*/
  284. }
  285. .more-icon {
  286. width: 20px;
  287. height: 20px;
  288. background: url('../../image/more.png') no-repeat;
  289. background-position: center;
  290. background-size: cover;
  291. }
  292. .img-item-two {
  293. position: relative;
  294. display: inline-block;
  295. width: 32%;
  296. margin: 6px 0 6px 6px;
  297. }
  298. .img-item-two img {
  299. z-index: 0;
  300. height: 27vw;
  301. width: 27vw;
  302. object-fit: cover;
  303. border-radius: 5px;
  304. }
  305. .notes-content {
  306. margin-top: 15px;
  307. }
  308. .position-photo-notes {
  309. padding: 15px;
  310. }
  311. /*position*/
  312. .flex-space {
  313. display: flex;
  314. align-items: center;
  315. white-space: nowrap;
  316. }
  317. .flex-start {
  318. display: flex;
  319. justify-content: space-between;
  320. white-space: nowrap;
  321. align-items: center;
  322. }
  323. .ico-map {
  324. width: 25px;
  325. height: 25px;
  326. background: url('../../icon/position.png') no-repeat;
  327. background-position: center;
  328. background-size: cover;
  329. }
  330. .position-map {
  331. display: flex;
  332. align-items: center;
  333. white-space: nowrap;
  334. padding: 8px 14px;
  335. border-radius: 50px;
  336. background: #F0F0F0;
  337. font-size: 14px;
  338. margin-top: 10px;
  339. }
  340. .map1 {
  341. color: #009fe8;
  342. }
  343. .map-name {
  344. width: 99%;
  345. }
  346. .names {
  347. width: 85%;
  348. }
  349. .names .map1 {
  350. width: 100%;
  351. padding-top: 3px;
  352. white-space: pre-wrap;
  353. overflow: hidden;
  354. text-overflow: ellipsis;
  355. display: -webkit-box;
  356. -webkit-box-orient: vertical;
  357. -webkit-line-clamp: 2;
  358. }
  359. .input-recode {
  360. border: dashed 1px rgba(200, 210, 222, 1);
  361. display: flex;
  362. flex-flow: wrap;
  363. align-items: center;
  364. line-height: 100%;
  365. }
  366. .postion-title {
  367. text-align: center;
  368. }
  369. .icon-img img {
  370. width: 60px;
  371. height: 60px;
  372. max-width: 28% !important;
  373. display: inline-block !important;
  374. }
  375. </style>
  376. </head>
  377. <body>
  378. <div class="api_layout" id="wordOrder_details">
  379. <!-- <div class="add-message-remark">
  380. <div style="height: 15px; width: 100%"></div>
  381. <div class="add-message-remark-child">
  382. <div class="position-photo-notes">
  383. <div class="postion-title">
  384. <div style="text-align: center;" class="icon-img"><img src="../../icon/0001.png"></div>
  385. <h1 class="work-order-remarks">目的地打卡</h4>
  386. <div class="staff-message">
  387. hahahahahhaha
  388. </div>
  389. </div>
  390. <div class="add-msg-list">
  391. <div onclick="addPositionNotes()">提交</div>
  392. </div>
  393. </div>
  394. </div>
  395. </div> -->
  396. </div>
  397. </body>
  398. <script type="text/template" id="template">
  399. {{? it.open_remark == 2}}
  400. <div class="add-message-remark">
  401. <div style="height: 15px; width: 100%"></div>
  402. <div class="add-message-remark-child">
  403. <!-- 是否定位 -->
  404. {{?it.open_gps == 1 && it.open_remark == 1}} {{=getLonLat(it.open_gps)}} {{?}}
  405. <!-- 定位信息 拍照 以及备注信息 -->
  406. <div class="position-photo-notes">
  407. <div class="postion-title">
  408. <div class="icon-img"><img src="../../icon/0001.png"></div>
  409. <div class="work-order-remarks">目的地打卡</div>
  410. <div class="staff-message">
  411. {{=it.staff}}
  412. </div>
  413. </div>
  414. {{? it.open_gps == 1 && it.open_remark == 1}}
  415. <div class="position-content" id="position_warp"></div>
  416. {{?}}
  417. {{? it.open_gps == 1 && it.open_remark == 2}}
  418. <div class="position-map" onclick="openMaps('{{=it.longitude}}','{{=it.latitude}}')">
  419. <div class="map-name flex-start">
  420. <i class="ico-map"></i>
  421. <div class="names">
  422. <p class="map1">{{=it.address}}</p>
  423. </div>
  424. </div>
  425. <p class="more-icon"></p>
  426. </div>
  427. {{?}}
  428. {{? it.open_remark == 1}}
  429. <div class="notes-content">
  430. <div>
  431. <div class="remarkInfo">备注内容:</div>
  432. <textarea oninput="Oninput(this)" id="remark_information" class="column-textarea font-s column-textarea1" placeholder="请输入备注信息"></textarea>
  433. </div>
  434. </div>
  435. {{?}}
  436. {{? it.open_remark == 2 && JSON.parse(it.remark_info).remarkInfo != ''}}
  437. <div class="notes-content">
  438. <div class="remarkInfo-message">
  439. <div class="left-line-icon"></div>
  440. <div>备注信息</div>
  441. </div>
  442. <div style="padding-top: 10px;color: #232627;">
  443. {{=JSON.parse(it.remark_info).remarkInfo}}
  444. </div>
  445. </div>
  446. {{?}}
  447. <!-- {{? it.open_remark == 1}}
  448. <div class="modula img-warp">
  449. <label class="remarkInfo">现场照片:</label>
  450. <div class="text-input input-recode file-items-add img-items photoFile">
  451. <div class="upload file-width" onclick="uploadImg('remote',this)">
  452. <img src="../../image/upload.png" alt="">
  453. </div>
  454. </div>
  455. </div>
  456. {{?}} -->
  457. <!-- {{? it.open_remark == 2 && JSON.parse(it.remark_info).imageList.length > 0}}
  458. <div class="modula img-warp">
  459. <label class="remarkInfo">现场照片:</label>
  460. <div class="text-input input-recode file-items-add img-items photoFile">
  461. {{ for (var i = 0; i
  462. < JSON.parse(it.remark_info).imageList.length; i++) { }} <div class="img-dv img-item-two" onclick="browseImgTwo('{{=i}}','{{=JSON.parse(it.remark_info).imageList.toString()}}')">
  463. <a href="javascript:;">
  464. <img src="{{=JSON.parse(it.remark_info).imageList[i]}}">
  465. </a>
  466. </div>
  467. {{ } }}
  468. </div>
  469. </div>
  470. {{?}} -->
  471. {{? it.open_remark == 1}}
  472. <div class="add-msg-list">
  473. <div onclick="addPositionNotes()">提交</div>
  474. </div>
  475. {{?}}
  476. </div>
  477. </div>
  478. </div>
  479. {{?}}
  480. <div class="details-message">
  481. <div class="details-message-container">
  482. <div class="personalInfo">
  483. <div class="img-title">
  484. {{?it.staff_avatar === null}}
  485. <p class="staff_name" style="background:#{{=Math.random().toString(16).slice(2,8)}}">{{=it.staff.substr(it.staff.length-1,1)}}</p>
  486. {{??}}
  487. <img src="{{=it.staff_avatar}}" alt="" class="header-img">
  488. {{?}}
  489. <div>
  490. <span>{{=it.staff}}</span>
  491. <span>{{=it.section}}</span>
  492. </div>
  493. </div>
  494. </div>
  495. <ul class="itmes ">
  496. <!-- <li>
  497. <p>工单编号:</p>
  498. <p>#{{=it.id}}</p>
  499. </li>
  500. <li>
  501. <p>工单分类:</p>
  502. <p>{{=it.classify}}</p>
  503. </li> -->
  504. <li>
  505. <p>流程名称:</p>
  506. <p>{{=it.title}}</p>
  507. </li>
  508. </ul>
  509. <ul class="itmes ">
  510. {{ for (var i = 0;i<it.form.length;i++) { }}
  511. {{?it.form[i].type != 'images' && it.form[i].type != 'files'}}
  512. <li>
  513. <p>{{=it.form[i].label}}:</p>
  514. <p>{{=it.form[i].value}}</p>
  515. </li>
  516. {{?}}
  517. {{ } }}
  518. </ul>
  519. <div class="column-row">
  520. {{ for (var i = 0;i<it.form.length;i++) { }}
  521. {{?it.form[i].type == 'images' && it.form[i].value.length > 0}}
  522. <div class="column">
  523. <label class="column-title">{{=it.form[i].label}}:</label>
  524. <div class="aui-row aui-row-padded">
  525. {{ for (var j = 0;j<it.form[i].value.length;j++) { }}
  526. <div class="aui-col-xs-4">
  527. <img src="{{=it.form[i].value[j]}}" class="colsImg" onload="setUpHeight(this)" onclick="browseImg('{{=it.form[i].value}}','{{=j}}')"/>
  528. </div>
  529. {{ } }}
  530. </div>
  531. </div>
  532. {{??it.form[i].type == 'files' && it.form[i].value.length > 0}}
  533. <div class="column">
  534. <label class="column-title">{{=it.form[i].label}}:</label>
  535. <div class="aui-row aui-row-padded fileList">
  536. {{ for (var j = 0;j<it.form[i].value.length;j++) { }}
  537. {{?it.form[i].value[j].path.endsWith('docx') || it.form[i].value[j].path.endsWith('doc')}}
  538. <div class="aui-col-xs-4" onclick="browseFile('{{=it.form[i].value[j].path}}')">
  539. <img src="../../icon/{{=it.form[i].value[j].path.substr(it.form[i].value[j].path.length-3,3)}}.png"/>
  540. <span>{{=it.form[i].value[j].name}}</span>
  541. </div>
  542. {{??it.form[i].value[j].path.endsWith('pdf')}}
  543. <div class="aui-col-xs-4" onclick="browseFile('{{=it.form[i].value[j].path}}')">
  544. <img src="../../icon/{{=it.form[i].value[j].path.substr(it.form[i].value[j].path.length-3,3)}}.png"/>
  545. <span>{{=it.form[i].value[j].name}}</span>
  546. </div>
  547. {{??it.form[i].value[j].path.endsWith('ppt') || it.form[i].value[j].path.endsWith('ptx')}}
  548. <div class="aui-col-xs-4" onclick="browseFile('{{=it.form[i].value[j].path}}')">
  549. <img src="../../icon/{{=it.form[i].value[j].path.substr(it.form[i].value[j].path.length-3,3)}}.png"/>
  550. <span>{{=it.form[i].value[j].name}}</span>
  551. </div>
  552. {{??it.form[i].value[j].path.endsWith('zip') || it.form[i].value[j].path.endsWith('rar')}}
  553. <div class="aui-col-xs-4" onclick="browseFile('{{=it.form[i].value[j].path}}',true)">
  554. <img src="../../icon/{{=it.form[i].value[j].path.substr(it.form[i].value[j].path.length-3,3)}}.png"/>
  555. <span>{{=it.form[i].value[j].name}}</span>
  556. </div>
  557. {{??it.form[i].value[j].path.endsWith('xlsx')}}
  558. <div class="aui-col-xs-4" onclick="browseFile('{{=it.form[i].value[j].path}}')">
  559. <img src="../../icon/{{=it.form[i].value[j].path.substr(it.form[i].value[j].path.length-3,3)}}.png"/>
  560. <span>{{=it.form[i].value[j].name}}</span>
  561. </div>
  562. {{??}}
  563. <div class="aui-col-xs-4" onclick="browseFile('{{=it.form[i].value[j].path}}')">
  564. <img src="../../icon/OTHER.png"/>
  565. <span>{{=it.form[i].value[j].name}}</span>
  566. </div>
  567. {{?}}
  568. {{ } }}
  569. </div>
  570. </div>
  571. {{?}}
  572. {{ } }}
  573. </div>
  574. <div class="technologicals" style="margin-top:10px">
  575. <label class="column-title">固定审批流程:</label>
  576. <div class="technological-process">
  577. {{ for(var prop in it.flows) { }}
  578. <ul class="layui-timeline">
  579. <li class="layui-timeline-item">
  580. <img class="layui-timeline-item_top_img" src="{{=it.flows[prop].status == 2 ? '../../image/sureCircle.png' : (it.flows[prop].status == 3 ? '../../image/rejectCircle.png':'../../image/waitCircle.png')}} "></i>
  581. <div class="layui-timeline-content layui-text">
  582. <div class="layui-timeline-title">
  583. <span>{{=it.flows[prop].flow_name}}:</span>
  584. <div class="name-column">
  585. {{ for (var j = 0;j<it.flows[prop].flow.length;j++) { }}
  586. <span>{{=it.flows[prop].flow[j]}}</span>
  587. {{ } }}
  588. </div>
  589. </div>
  590. <div class="remark layui-timeline-reamrk-text" style="border:1px solid {{=it.flows[prop].status == 2?'#4BC612':(it.flows[prop].status == 3?'red':'')}};display:{{=it.flows[prop].remark?'inline-block':'none'}};color:{{=it.flows[prop].status == 2 ? '#4BC612' : (it.flows[prop].status == 3 ? 'red' : '')}};">
  591. {{=it.flows[prop].remark}}
  592. </div>
  593. {{? it.flows[prop].sign}}
  594. <div class="signature_img_container">
  595. <img class="signature_img" src="{{=it.flows[prop].sign}}" alt="">
  596. </div>
  597. {{?? it.flows[prop].sign && (it.flows[prop].sign == undefined || it.flows[prop].sign == null)}}
  598. <div class="tips_items_signature" onclick="handleOpenSignature()">
  599. <div class="tips_signature">
  600. <img src="../../image/tips.png" alt="">
  601. <div>未添加手写签名,请添加手写签名。</div>
  602. </div>
  603. </div>
  604. {{?}}
  605. </div>
  606. </li>
  607. </ul>
  608. {{ } }}
  609. </div>
  610. </div>
  611. </div>
  612. </div>
  613. </script>
  614. <script type="text/javascript" src="../../script/api.js"></script>
  615. <script type="text/javascript" src="../../script/doT.min.js"></script>
  616. <script type="text/javascript" src="../../script/config.js"></script>
  617. <script type="text/javascript" src="../../script/zepto.js"></script>
  618. <script type="text/javascript">
  619. var toast = new auiToast();
  620. apiready = function() {
  621. var info = $api.getStorage('data');
  622. token = JSON.parse(info).data.access_token;
  623. // 手机号绑定更新 -> 对应 wordorder/alreadyWordorderDetails.html
  624. api.addEventListener({
  625. name: 'updateUserInfoPhone'
  626. }, function(ret, err) {
  627. getApplyDe(api.pageParam.ID, token);
  628. });
  629. getApplyDe(api.pageParam.ID, token);
  630. };
  631. function getApplyDe(id, token) {
  632. var headers = {
  633. Authorization: 'Bearer ' + token,
  634. };
  635. $http.fnReuestData(
  636. UrlRouter.getAlreadyDe + id,
  637. headers,
  638. 'get',
  639. '',
  640. function(ret, err) {
  641. if (ret.code === 0) {
  642. $apis.html(wordOrder_details, '#template', ret.data);
  643. if (ret.data.open_remark == 2) {
  644. $('.details-message-container').addClass('details-message-child');
  645. }
  646. toast.hide();
  647. } else {
  648. toast.hide();
  649. }
  650. }
  651. );
  652. }
  653. // 上传图片的高度
  654. function setUpHeight(that) {
  655. that.style.width = that.offsetWidth + 'px';
  656. that.style.height = that.offsetWidth + 'px';
  657. }
  658. //  上传图浏览
  659. function browseImg(data, i) {
  660. var imageBrowser = api.require('imageBrowser');
  661. imageBrowser.openImages({
  662. imageUrls: data.split(','),
  663. activeIndex: i,
  664. showList: false,
  665. });
  666. }
  667. // 上传文件在线浏览
  668. function browseFile(paths, flag) {
  669. api.download(
  670. {
  671. url: paths,
  672. report: true,
  673. cache: true,
  674. allowResume: true,
  675. },
  676. function(ret, err) {
  677. if (ret.state == 1) {
  678. if (!flag) {
  679. var superFile = api.require('superFile');
  680. superFile.open({path: ret.savePath});
  681. }
  682. setTimeout(function() {
  683. api.toast({
  684. msg: '下载成功',
  685. duration: 2000,
  686. location: 'top',
  687. });
  688. }, 100);
  689. } else {
  690. }
  691. }
  692. );
  693. }
  694. // 打开地图
  695. function openMaps(lon, lat) {
  696. $event.openTabLayout('map', '../browseQrcode/map', '', {
  697. lon: lon,
  698. lat: lat,
  699. });
  700. }
  701. // 图片浏览
  702. function browseImgTwo(i, value) {
  703. var imageBrowser = api.require('imageBrowser');
  704. imageBrowser.openImages({
  705. imageUrls: value.split(','),
  706. activeIndex: i,
  707. showList: false,
  708. });
  709. }
  710. // 手写签名页面
  711. function handleOpenSignature() {
  712. $event.openTabLayout('handwrittenSignature', '../personalData/handwrittenSignature', '手写签名', '')
  713. }
  714. </script>
  715. </html>