index.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499
  1. <template>
  2. <div class="modifysend">
  3. <van-tabs :active="active" @change="getSelectedLoudong">
  4. <van-tab title="全部" name="null"> </van-tab>
  5. <van-tab
  6. v-for="(
  7. item, index
  8. ) in dic_SelectList.rectification_management_update_type"
  9. :title="item.label"
  10. :name="item.value"
  11. :key="index"
  12. >
  13. </van-tab>
  14. </van-tabs>
  15. <!--
  16. <div class="top-add" @click="goNavigator()">
  17. <i class="iconfont icon-xinzeng"></i>
  18. <span class="txt">新增整改</span>
  19. </div> -->
  20. <div class="info-findRectificationManagementInOutList">
  21. <div class="info-item" v-for="item in recordList" :key="item.id">
  22. <div class="info-bottom" v-if="item.recheckId">
  23. <div class="left"></div>
  24. <div class="right">
  25. <span class="normal-tip yd h-bg"> 多次整改 </span>
  26. </div>
  27. </div>
  28. <div class="info-top">
  29. <div class="left" @click="jumpPageDetails(item.finishType, item.id)">
  30. <img
  31. :src="
  32. item.infoMorePictureUrl != null &&
  33. item.infoMorePictureUrl.length > 0
  34. ? BASE_URI +
  35. '/FileController/download/' +
  36. item.infoMorePictureUrl[0]
  37. : ''
  38. "
  39. alt=""
  40. />
  41. </div>
  42. <div class="right" @click="jumpPageDetails(item.finishType, item.id)">
  43. <p class="tit">
  44. {{ item.info }}
  45. </p>
  46. <p class="txt">
  47. 处理时间:{{ !item.finishTime ? "暂无" : item.finishTime }}
  48. </p>
  49. <p class="txt">
  50. 确认时间:{{
  51. !item.checkTime || item.checkTime == "null"
  52. ? "暂无"
  53. : item.checkTime
  54. }}
  55. </p>
  56. <p class="txt" v-if="item.finishState == 1 && item.finishType == 4">
  57. 确认结果:已完成整改
  58. </p>
  59. <p class="txt" v-if="item.finishState != 1 && item.finishType == 4">
  60. 确认结果:未完成整改
  61. </p>
  62. <!-- <p class="txt">确认时间:{{ item.checkTime }}</p> -->
  63. </div>
  64. </div>
  65. <div class="info-bottom">
  66. <div class="left">
  67. <i class="iconfont icon-shijian"></i>
  68. <span>
  69. {{ item.updateAddress }}
  70. </span>
  71. </div>
  72. <div class="right">
  73. <span
  74. v-if="item.finishType == 2"
  75. class="normal-tip yd h-bg pending-btn"
  76. >
  77. 待处理
  78. </span>
  79. <span
  80. v-if="item.finishType == 3"
  81. class="normal-tip yd h-bg accepted-btn"
  82. >
  83. 待确认
  84. </span>
  85. <span
  86. v-if="item.finishType == 4"
  87. class="normal-tip yd h-bg processed-btn"
  88. >
  89. 已完成
  90. </span>
  91. </div>
  92. </div>
  93. </div>
  94. </div>
  95. <select-dengjiyuan
  96. ref="selectDengjiyuan"
  97. :multiple="false"
  98. :range="range"
  99. :selectParent="false"
  100. :foldAll="true"
  101. rangeKey="name"
  102. idKey="id"
  103. @selectDengjiyuan="selectDengjiyuan"
  104. />
  105. </div>
  106. </template>
  107. <script>
  108. import {
  109. findRectificationManagementInOutList,
  110. getByCodes,
  111. getUserLocalStorageInfo,
  112. getSelectUserTwo,
  113. } from "@/js_sdk/http.js";
  114. import tools from "../../subPackages/components/tkitree/tools.js";
  115. import selectDengjiyuan from "../../subPackages/components/select_dengjiyuan/tkitree.vue";
  116. // import Base from "@/pages/base/base";
  117. export default {
  118. data() {
  119. return {
  120. active: "",
  121. finishStateList: [
  122. { value: 2, text: "待处理" },
  123. { value: 3, text: "待确认" },
  124. { value: 4, text: "已完成" },
  125. ],
  126. range: [],
  127. isCheckList: [],
  128. loudongList: [
  129. { name: "1", title: "待派单" },
  130. { name: "2,3,4", title: "已派单" },
  131. ],
  132. BASE_URI: this.$constant.BASE_URI,
  133. dic_key: ["rectification_management_update_type"],
  134. dic_SelectList: {},
  135. recordList: [],
  136. params: {
  137. openUser: getUserLocalStorageInfo().user.id,
  138. updatedBy: getUserLocalStorageInfo().user.id,
  139. pageNum: 1,
  140. pageSize: 10,
  141. finishTypeMore: 2,
  142. // updateType: 1,
  143. },
  144. totalPage: 1,
  145. allData: [],
  146. findRectificationManagementInOutList: [
  147. {
  148. title: "关于组织2020年无锡市服务业提质增效资金项目申报的通知",
  149. name: "无锡 XXXX有限公司",
  150. date: "2020-09-18 19:34:06",
  151. type: "1",
  152. },
  153. {
  154. title:
  155. "关于组织2020年无锡市服务业提质增效资金项目申报的通知关于组织2020年无锡市服务业提质增效资金项目申报的通知",
  156. name: "无锡 XXXX有限公司",
  157. date: "2020-09-18 19:34:06",
  158. type: "2",
  159. },
  160. ],
  161. };
  162. },
  163. components: {
  164. selectDengjiyuan,
  165. },
  166. mounted() {
  167. // if (window.history && window.history.pushState) {
  168. // // 向历史记录中插入了当前页
  169. // history.pushState(null, null, document.URL);
  170. // window.addEventListener("popstate", this.goBack, false);
  171. // }
  172. },
  173. onLoad() {},
  174. onShow() {
  175. this.getByCodes();
  176. },
  177. methods: {
  178. bindDateChange(e) {
  179. let that = this;
  180. that.params.needFinishTime = e.detail.value;
  181. },
  182. getIsCheckList(e) {
  183. let that = this;
  184. that.isCheckList = e.detail.value;
  185. },
  186. selectDengjiyuan(e) {
  187. this.form.finishUserName = e[e.length - 1].name;
  188. this.form.finishUser = e[e.length - 1].id;
  189. this.$forceUpdate();
  190. },
  191. async getSelectUserTwo(key) {
  192. let that = this;
  193. console.log(that.isCheckList);
  194. if (that.isCheckList.length == 0) {
  195. that.$showToast("请先选择要派发的整改");
  196. return;
  197. }
  198. let departmentList = await getSelectUserTwo("");
  199. that.range = tools.transData(
  200. departmentList.data,
  201. "id",
  202. "parentid",
  203. "children"
  204. );
  205. that.$refs[key]._show();
  206. that.$forceUpdate();
  207. },
  208. selectDengjiyuan(e) {
  209. var names = [];
  210. var ids = [];
  211. for (var p in e) {
  212. if (e[p].type == "u") {
  213. names.push(e[p].name);
  214. ids.push(e[p].id);
  215. }
  216. }
  217. this.form.xinxidengji = names.join(",");
  218. this.form.manageMessengerId = ids.join(",");
  219. },
  220. getSelectedLoudong(event) {
  221. let that = this;
  222. that.active = event.detail.name;
  223. that.params.updateType =
  224. event.detail.name == "null" ? "" : event.detail.name;
  225. that.selectData();
  226. },
  227. goNavigator(id) {
  228. uni.navigateTo({
  229. url: "/pages/subPackages/modifyReport/add",
  230. });
  231. },
  232. jumpPageDetails(type, id) {
  233. console.log(id);
  234. if (type == 3) {
  235. uni.navigateTo({
  236. url: "/pages/subPackages/modifySend/confirm?id=" + id,
  237. });
  238. } else {
  239. uni.navigateTo({
  240. url: "/pages/subPackages/modifyHandle/handle?id=" + id,
  241. });
  242. }
  243. },
  244. async getByCodes() {
  245. let that = this;
  246. let data = await getByCodes(JSON.stringify(this.dic_key));
  247. that.dic_SelectList = that.$common.handleDicList(data);
  248. that.active = "null";
  249. console.log("that.activethat.activethat.active", that.active);
  250. that.selectData();
  251. that.$forceUpdate();
  252. },
  253. // auth.currUser().id
  254. selectData() {
  255. const _this = this;
  256. findRectificationManagementInOutList(this.params).then((res) => {
  257. if (res) {
  258. res.rows.forEach((e) => {
  259. e.needFinishTime = this.$common.transServDay(e.needFinishTime);
  260. e.checkTime = !e.checkTime
  261. ? "暂无"
  262. : this.$common.transServDay(e.checkTime);
  263. e.updateAddress =
  264. e.updateAddress && e.updateAddress.length > 0
  265. ? e.updateAddress.replace("江苏省无锡市", "")
  266. : e.updateAddress;
  267. e.infoMorePictureUrl =
  268. e.infoMorePictureUrl && e.infoMorePictureUrl.length > 0
  269. ? e.infoMorePictureUrl.split(",")
  270. : [];
  271. console.log(e.infoMorePictureUrl);
  272. });
  273. this.recordList = res.rows;
  274. }
  275. });
  276. },
  277. getItemJson: function (item) {
  278. const fileUrls = item.fileUrl !== "" ? JSON.parse(item.fileUrl) : [];
  279. console.log(fileUrls);
  280. item.fileUrl = fileUrls;
  281. item.createdAt = this.$common.transServDate(item.createdAt);
  282. // console.log(item.status);
  283. // console.log(this.dic_SelectList.REPAIR_STATUS);
  284. // let index = this.dic_SelectList.REPAIR_STATUS.findIdex((e)=>e.value==item.status)
  285. // item.statusName = this.dic_SelectList.REPAIR_STATUS[index];
  286. return item;
  287. },
  288. /**
  289. *
  290. */
  291. quickSelect(item) {
  292. if (this.quickSleced.val && this.quickSleced.val === item.val) {
  293. this.quickSleced = {};
  294. } else {
  295. this.quickSleced = item;
  296. }
  297. },
  298. /**
  299. * 上传文件
  300. */
  301. afterRead(file) {
  302. console.log(file);
  303. },
  304. /**
  305. * 设置状态样式
  306. */
  307. setStatusStyle(status) {
  308. let statusClass = null;
  309. switch (status) {
  310. case "unAcceptance":
  311. statusClass = "pending-btn";
  312. break;
  313. case "acceptance":
  314. statusClass = "accepted-btn";
  315. break;
  316. case "processed":
  317. statusClass = "processed-btn";
  318. break;
  319. case "evaluated":
  320. statusClass = "evaluated-btn";
  321. break;
  322. }
  323. return statusClass;
  324. },
  325. },
  326. /**
  327. * 过滤器
  328. */
  329. filters: {
  330. /**
  331. * 状态:0、待受理 1、已受理 2、已处理 3、已评价
  332. */
  333. statusFilter(val) {
  334. let res = null;
  335. switch (val) {
  336. case "unAcceptance":
  337. res = "待处理";
  338. break;
  339. case "acceptance":
  340. res = "已受理";
  341. break;
  342. case "processed":
  343. res = "已处理";
  344. break;
  345. case "evaluated":
  346. res = "已评价";
  347. break;
  348. }
  349. return res;
  350. },
  351. },
  352. };
  353. </script>
  354. <style lang="scss" type="text/scss" scoped>
  355. .modifysend {
  356. .pending-btn {
  357. color: $fc;
  358. background-color: $red;
  359. }
  360. .accepted-btn {
  361. color: $fc;
  362. background-color: $color2;
  363. }
  364. .processed-btn {
  365. color: $fc;
  366. background-color: $orange;
  367. }
  368. .evaluated-btn {
  369. color: $fc;
  370. background-color: $green;
  371. }
  372. .btn-view {
  373. width: 100%;
  374. height: 100rpx;
  375. padding: 20rpx 10%;
  376. background-color: #ffffff;
  377. position: fixed;
  378. bottom: 0;
  379. left: 0;
  380. }
  381. .uni-select_2 {
  382. font-size: 22rpx;
  383. border: 2px solid #e5e5e5;
  384. box-sizing: border-box;
  385. border-radius: 8rpx;
  386. padding: 0 10rpx;
  387. padding-left: 20rpx;
  388. position: relative;
  389. display: flex;
  390. -webkit-user-select: none;
  391. user-select: none;
  392. flex-direction: row;
  393. align-items: center;
  394. border-bottom: solid 2px #e5e5e5;
  395. width: 100%;
  396. flex: 1;
  397. height: 70rpx;
  398. color: #6a6a6a;
  399. }
  400. .btn {
  401. width: 80%;
  402. height: 90rpx;
  403. border-radius: 50rpx 50rpx 50rpx 50rpx;
  404. background: #1d18bc;
  405. line-height: 90rpx;
  406. color: white;
  407. }
  408. .top-add {
  409. background-color: #fff;
  410. padding: 30rpx;
  411. text-align: right;
  412. box-shadow: 0rpx 5rpx 10rpx 0rpx rgba(0, 0, 0, 0.05);
  413. i {
  414. font-size: 36rpx;
  415. color: $text6;
  416. margin-right: 15rpx;
  417. }
  418. .txt {
  419. font-size: 32rpx;
  420. color: $text6;
  421. }
  422. }
  423. .info-findRectificationManagementInOutList {
  424. height: calc(100vh - 124rpx);
  425. overflow-y: auto;
  426. .info-item {
  427. background-color: #fff;
  428. padding: 20rpx 30rpx;
  429. margin-bottom: 20rpx;
  430. .info-top {
  431. @include flex;
  432. .left {
  433. width: 286rpx;
  434. height: 168rpx;
  435. font-size: 0;
  436. border-radius: 10rpx;
  437. overflow: hidden;
  438. img {
  439. width: 100%;
  440. height: 100%;
  441. }
  442. }
  443. .right {
  444. align-self: flex-start;
  445. width: 380rpx;
  446. .tit {
  447. display: -webkit-box;
  448. -webkit-box-orient: vertical;
  449. -webkit-line-clamp: 2;
  450. overflow: hidden;
  451. text-overflow: ellipsis;
  452. width: 380rpx;
  453. font-size: 32rpx;
  454. line-height: 1.4;
  455. font-weight: bold;
  456. color: #333333;
  457. @include line-clamp;
  458. margin-bottom: 20rpx;
  459. }
  460. .txt {
  461. font-size: 28rpx;
  462. color: #666;
  463. }
  464. }
  465. }
  466. .info-bottom {
  467. margin-top: 20rpx;
  468. padding-top: 20rpx;
  469. border-top: 1rpx dashed #dbdbdb;
  470. @include flex;
  471. .left {
  472. i {
  473. font-size: 30rpx;
  474. color: #999999;
  475. margin-left: 10rpx;
  476. }
  477. span {
  478. font-size: 28rpx;
  479. color: #999999;
  480. }
  481. }
  482. .right {
  483. }
  484. }
  485. }
  486. }
  487. }
  488. </style>