echartLevel.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
  6. <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
  7. <meta name="format-detection"content="telephone=no">
  8. <title>记录列表</title>
  9. <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
  10. <link rel="stylesheet" type="text/css" href="../../css/popoPicker.css"/>
  11. <link rel="stylesheet" href="../../css/style.css">
  12. <style media="screen">
  13. body,html{
  14. margin: 0;
  15. background: #fff;
  16. overflow-x: hidden;
  17. }
  18. .hide{
  19. display: none;
  20. }
  21. /*name*/
  22. .date-lists{
  23. width: 100%;
  24. overflow-x: scroll;
  25. white-space: nowrap;
  26. box-sizing: border-box;
  27. }
  28. .date-lists::-webkit-scrollbar{
  29. display: none;
  30. }
  31. .date-wrap{
  32. width: 100%;
  33. position: fixed;
  34. top: 0;
  35. left: 0;
  36. box-sizing: border-box;
  37. z-index: 9999;
  38. background: #fff;
  39. }
  40. .date-lists li{
  41. margin-right: 20px;
  42. padding: 14px 10px;
  43. font-size: 16px;
  44. color: #333;
  45. position: relative;
  46. }
  47. .date-lists .active{
  48. color: #009FE8;
  49. }
  50. .date-lists .active:after{
  51. content: "";
  52. position: absolute;
  53. bottom: 0;
  54. left: 0;
  55. width: 100%;
  56. height: 2px;
  57. background: #009FE8;
  58. }
  59.  /*记录列表*/
  60. .recode-wraps{
  61. width: 95%;
  62. border: 1px dashed #ECF0F1;
  63. margin: auto;
  64. margin-top: 10px;
  65. border-radius: 5px;
  66. padding-bottom: 5px;
  67. }
  68. .time{
  69. background: #31A5FF;
  70. padding: 5px 10px;
  71. font-size: 14px;
  72. display: inline-block;
  73. color: #fff;
  74. border-radius: 10px;
  75. position: relative;
  76. margin-bottom: 5px;
  77. }
  78. .recodeTitle{
  79. display: block;
  80. margin-top: 3px;
  81. }
  82. .name{
  83. color: #000;
  84. font-size: 14px;
  85. /*font-weight: bold;*/
  86. line-height: 1.6;
  87. }
  88. .main{
  89. padding-left: 50px;
  90. position: relative;
  91. padding-bottom: 10px;
  92. }
  93. .main:after{
  94. content: '';
  95. position: absolute;
  96. top: 0;
  97. left: 30px;
  98. width:2px;
  99. background: #31A5FF;
  100. height: 100%;
  101. }
  102. .main:before{
  103. content: '';
  104. position: absolute;
  105. top: 5px;
  106. left:23px;
  107. width:15px;
  108. background: #31A5FF;
  109. height: 15px;
  110. border-radius: 50%;
  111. }
  112. /*三角形*/
  113. .Triangle{
  114. position: absolute;
  115. top: 5px;
  116. left: -14px;
  117. width: 0;
  118. height: 0;
  119. border-width: 8px;
  120. border-style: solid;
  121. border-color: transparent #31A5FF transparent transparent;
  122. transform: rotate(360deg);
  123. }
  124. .recode-img{
  125. display: inline-block;
  126. width: 38px;
  127. height: 46px;
  128. background: url("../../icon/recode.png") center no-repeat;
  129. background-size: contain;
  130. position: relative;
  131. left: 12px;
  132. top: 9px;
  133. }
  134. .state{
  135. padding-left: 50px;
  136. position: relative;
  137. }
  138. .stop{
  139. position: absolute;
  140. top: 6px;
  141. left: 23px;
  142. width: 15px;
  143. height: 15px;
  144. background: url("../../icon/stop.png") center no-repeat;
  145. background-size: contain;
  146. z-index: 800;
  147. }
  148. .state:after{
  149. content: '';
  150. position: absolute;
  151. top: -2px;
  152. left: 30px;
  153. width:2px;
  154. background: #31A5FF;
  155. height: 10px;
  156. }
  157. .recode-more{
  158. padding: 20px;
  159. text-align: center;
  160. }
  161. /*tool*/
  162. .tool_itme{
  163. padding: 10px;
  164. }
  165. .tool_time{
  166. display: flex;
  167. justify-content: space-between;
  168. }
  169. .tool_time input{
  170. border: 1px solid #ccc;
  171. padding: 8px 10px;
  172. border-radius: 3px;
  173. width: 46%;
  174. box-sizing: border-box;
  175. -webkit-appearance: none;
  176. text-align: center;
  177. }
  178. .tool_seacrh_export{
  179. padding: 10px 0;
  180. }
  181. .tool_seacrh_export button{
  182. padding: 10px 0;
  183. color: #fff;
  184. background: #009FE8;
  185. width: 100px;
  186. border-radius: 4px;
  187. text-align: center;
  188. cursor: pointer;
  189. }
  190. .tool_seacrh_export button{
  191. margin-right: 20px;
  192. }
  193. </style>
  194. </head>
  195. <body>
  196. <div class="date-wrap" id="date_wrap">
  197. </div>
  198. <div class="api_layout" id="recode_item">
  199. <div id="recode_content">
  200. </div>
  201. </div>
  202. <div class="noText hide">
  203. <img src="../../image/noText.png" alt="">
  204. </div>
  205. <a href="javascript:;" class="upload_file"></a>
  206. </body>
  207. </html>
  208. <script type="text/template" id="recodeTemplate">
  209. {{~it:value}}
  210. <div class="recode-wraps">
  211. <span class="recode-img"></span>
  212. <div class="recode-list">
  213. {{ for (var t=0;t<value.length;t++) { }}
  214. <div class="main" onclick="openRecordDe('{{=value[t].recordParentId}}')">
  215. <p class="time">
  216. {{=value[t].createDate}}
  217. <span class="Triangle"></span>
  218. <span class="recodeTitle">{{=value[t].templateName}}</span>
  219. </p>
  220. <p class="name">{{=value[t].createName}}</p>
  221. <div class="name">
  222. {{?value[t].recordStatusInstanceList != null}}
  223. {{ for(var i= 0;i<value[t].recordStatusInstanceList.length;i++){ }}
  224. <div class="state-items">
  225. <p class="state-title" style="width:auto;display:{{=value[t].statusName == ""?'none':'inline-block'}}">{{=value[t].recordStatusInstanceList[i].statusName}}:</p>
  226. {{ for(var j= 0;j<value[t].recordStatusInstanceList[i].recordStatusInstanceItemList.length;j++){ }}
  227. {{?value[t].recordStatusInstanceList[i].recordStatusInstanceItemList.length == 1}}
  228. <span>{{=value[t].recordStatusInstanceList[i].recordStatusInstanceItemList[j].statusContent}}</span>
  229. {{??}}
  230. <span>{{=value[t].recordStatusInstanceList[i].recordStatusInstanceItemList[j].statusContent}},</span>
  231. {{?}}
  232. {{ } }}
  233. </div>
  234. {{ } }}
  235. {{??}}
  236. <div class="state-items">
  237. <p class="state-title" style="width:auto;display:{{=value[t].statusName == ""?'none':'inline-block'}}">{{=value[t].statusName}}:</p>
  238. <span>{{=value[t].statusContent}}</span>
  239. </div>
  240. {{?}}
  241. </div>
  242. </div>
  243. {{?t == value.length-1}}
  244. {{?value[value.length-1].continueStatus == false}}
  245. <div class="state">
  246. <p class="time">
  247. 结束:{{=value[t].createDate}}
  248. <span class="Triangle" style="top:6px;"></span>
  249. </p>
  250. <i class="stop"></i>
  251. </div>
  252. {{??}}
  253. <div class="state wait">
  254. <p class="time" style="background:#F7A329">
  255. 等待处理......
  256. <span class="Triangle" style="top:6px;border-color: transparent #F7A329 transparent transparent;"></span>
  257. </p>
  258. <i class="stop" style="background: url('../../icon/Continue.png') center no-repeat;background-size: contain;"></i>
  259. </div>
  260. {{?}}
  261. {{?}}
  262. {{ } }}
  263. </div>
  264. </div>
  265. {{~}}
  266. </script>
  267. <script type="text/template" id="TemplateName">
  268. <ul class="date-lists flex-start">
  269. {{~it:value:index}}
  270. {{?index == 0}}
  271. <li class="active" onclick="randomSwitchBtn(this,'{{=value.parentId}}','{{=value.templateId}}')">{{=value.templateName}}</li>
  272. {{??}}
  273. <li onclick="randomSwitchBtn(this,'{{=value.parentId}}','{{=value.templateId}}')">{{=value.templateName}}</li>
  274. {{?}}
  275. {{~}}
  276. </ul>
  277. </script>
  278. <script type="text/javascript" src="../../script/api.js"></script>
  279. <script type="text/javascript" src="../../script/doT.min.js"></script>
  280. <script type="text/javascript" src="../../script/zepto.js"></script>
  281. <script src="../../script/popoPicker.js"></script>
  282. <script src="../../script/config.js" charset="utf-8"></script>
  283. <script type="text/javascript">
  284. var isLoadding = false;
  285. var skip = 1;
  286. apiready = function () {
  287. if (api.pageParam.type === 'my') {
  288. var info = $api.getStorage('data'),
  289. uuid = JSON.parse(info).data.user.staff_num;
  290. myRecodeList(uuid,api.pageParam.pageId)
  291. }else {
  292. recodeList(api.pageParam)
  293. }
  294. // 上拉加载
  295. api.addEventListener({
  296. name : 'scrolltobottom',
  297. extra : {
  298. threshold : 0 //设置距离底部多少距离时触发,默认值为0,数字类型
  299. }
  300. }, function(ret, err) {
  301. if (!isLoadding && api.pageParam.type === 'my') {
  302. isLoadding = true;
  303. myRecodeList(uuid,api.pageParam.pageId)
  304. }else {
  305. isLoadding = true;
  306. recodeList(api.pageParam)
  307. }
  308. });
  309. }
  310. function recodeList(params) {
  311. var data = {
  312. ...params,
  313. pageNumber:skip,
  314. pageSize:10
  315. }
  316. $http.requestShowProgress(UrlRouter.getPageRecordInstanceListRadio,'get',data)
  317. .then(ret=>{
  318. isLoadding = false;
  319. if (ret.data.length == 0 && skip == 1) {
  320. $api.removeCls($api.dom('.noText'), 'hide');
  321. $apis.html(recode_content,'#recodeTemplate','');
  322. isLoadding = true;
  323. return false;
  324. }else {
  325. $api.addCls($api.dom('.noText'), 'hide');
  326. }
  327. if (ret.data.length > 0) {
  328. skip += 1;
  329. $apis.append(recode_content,'#recodeTemplate',ret.data);
  330. } else {
  331. isLoadding =true;
  332. api.toast({
  333. msg: '没有更多数据',
  334. duration: 2000,
  335. location: 'bottom'
  336. });
  337. }
  338. })
  339. .catch(err=>{
  340. api.toast({
  341. msg: '加载超时,请检查网络',
  342. duration: 2000,
  343. location: 'bottom'
  344. });
  345. })
  346. }
  347. // 记录详情
  348. function openRecordDe(id) {
  349. $event.openTabLayout('recodeDetails','recodeDetails','记录详情',{recordParentId:id});
  350. }
  351. // 我的记录
  352. function myRecodeList(uuid,id) {
  353. var data = {
  354. createBy:uuid,
  355. pageId:id,
  356. pageNumber:skip,
  357. pageSize:10
  358. }
  359. $http.requestShowProgress(UrlRouter.getPageRecordInstanceList,'get',data)
  360. .then(ret=>{
  361. // console.log(JSON.stringify(ret));
  362. isLoadding = false;
  363. if (ret.data.length == 0 && skip == 1) {
  364. $api.removeCls($api.dom('.noText'), 'hide');
  365. $apis.html(recode_content,'#recodeTemplate','');
  366. isLoadding = true;
  367. return false;
  368. }else {
  369. $api.addCls($api.dom('.noText'), 'hide');
  370. }
  371. if (ret.data.length > 0) {
  372. skip += 1;
  373. $apis.append(recode_content,'#recodeTemplate',ret.data);
  374. } else {
  375. isLoadding =true;
  376. api.toast({
  377. msg: '没有更多数据',
  378. duration: 2000,
  379. location: 'bottom'
  380. });
  381. }
  382. })
  383. .catch(err=>{
  384. api.toast({
  385. msg: '加载超时,请检查网络',
  386. duration: 2000,
  387. location: 'bottom'
  388. });
  389. })
  390. }
  391. </script>