index.vue 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  1. <template>
  2. <div class="repair">
  3. <div class="top-add" @click="goNavigator()">
  4. <i class="iconfont icon-xinzeng"></i>
  5. <span class="txt">新增整改</span>
  6. </div>
  7. <div class="info-findRectificationManagementInOutList">
  8. <div
  9. class="info-item"
  10. v-for="item in recordList"
  11. :key="item.id"
  12. @click="jumpPageDetails(item.finishType, item.id)"
  13. >
  14. <div class="info-top">
  15. <div class="left">
  16. {{ JSON.stringify(item) }}
  17. <img
  18. :src="
  19. item.infoMorePictureUrl != null &&
  20. item.infoMorePictureUrl.length > 0
  21. ? BASE_URI +
  22. '/FileController/download/' +
  23. item.infoMorePictureUrl[0]
  24. : ''
  25. "
  26. alt=""
  27. />
  28. </div>
  29. <div class="right">
  30. <p class="tit">
  31. {{ item.info }}
  32. </p>
  33. <p class="txt">创建时间:{{ item.createdAt }}</p>
  34. </div>
  35. </div>
  36. <div class="info-bottom">
  37. <div class="left">
  38. <i class="iconfont icon-shijian"></i>
  39. <span>
  40. {{ item.updateAddress }}
  41. </span>
  42. </div>
  43. <div class="right">
  44. <span v-if="item.finishType == 1" class="normal-tip yd h-bg">
  45. 待派单
  46. </span>
  47. <span v-if="item.finishType == 2" class="normal-tip yd h-bg">
  48. 待处理
  49. </span>
  50. <span v-if="item.finishType == 3" class="normal-tip yd h-bg">
  51. 待确认
  52. </span>
  53. <span v-if="item.finishType == 4" class="normal-tip yd h-bg">
  54. 已完成
  55. </span>
  56. </div>
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. </template>
  62. <script>
  63. import {
  64. findRectificationManagementInOutList,
  65. getByCodes,
  66. getUserLocalStorageInfo,
  67. } from "@/js_sdk/http.js";
  68. // import Base from "@/pages/base/base";
  69. export default {
  70. data() {
  71. return {
  72. BASE_URI: this.$constant.BASE_URI,
  73. dic_SelectList: {},
  74. recordList: [],
  75. params: {
  76. openUser: getUserLocalStorageInfo().user.id,
  77. pageNum: 1,
  78. pageSize: 10,
  79. },
  80. totalPage: 1,
  81. allData: [],
  82. findRectificationManagementInOutList: [
  83. {
  84. title: "关于组织2020年无锡市服务业提质增效资金项目申报的通知",
  85. name: "无锡 XXXX有限公司",
  86. date: "2020-09-18 19:34:06",
  87. type: "1",
  88. },
  89. {
  90. title:
  91. "关于组织2020年无锡市服务业提质增效资金项目申报的通知关于组织2020年无锡市服务业提质增效资金项目申报的通知",
  92. name: "无锡 XXXX有限公司",
  93. date: "2020-09-18 19:34:06",
  94. type: "2",
  95. },
  96. ],
  97. };
  98. },
  99. mounted() {
  100. // if (window.history && window.history.pushState) {
  101. // // 向历史记录中插入了当前页
  102. // history.pushState(null, null, document.URL);
  103. // window.addEventListener("popstate", this.goBack, false);
  104. // }
  105. },
  106. onLoad() {},
  107. onShow() {
  108. this.getByCodes();
  109. },
  110. methods: {
  111. goNavigator(id) {
  112. uni.navigateTo({
  113. url: "/pages/subPackages/modifyReport/add",
  114. });
  115. },
  116. jumpPageDetails(finishType, id) {
  117. console.log(id);
  118. if (finishType == 4) {
  119. uni.navigateTo({
  120. url: "/pages/subPackages/modifyHandle/handle?id=" + id,
  121. });
  122. } else {
  123. uni.navigateTo({
  124. url:
  125. "/pages/subPackages/modifyReport/detail?id=" +
  126. id +
  127. "&pdStatus=" +
  128. 0,
  129. });
  130. }
  131. },
  132. async getByCodes() {
  133. let that = this;
  134. let data = await getByCodes(JSON.stringify(["REPAIR_STATUS"]));
  135. that.dic_SelectList = that.$common.handleDicList(data);
  136. that.selectData();
  137. },
  138. // auth.currUser().id
  139. selectData() {
  140. let _this = this;
  141. console.log(_this.params);
  142. findRectificationManagementInOutList(_this.params).then((res) => {
  143. if (res) {
  144. res.rows.forEach((e) => {
  145. e.createdAt = this.$common.transServDate(e.createdAt);
  146. e.updateAddress =
  147. e.updateAddress && e.updateAddress.length > 0
  148. ? e.updateAddress.replace("江苏省无锡市", "")
  149. : e.updateAddress;
  150. e.infoMorePictureUrl =
  151. e.infoMorePictureUrl && e.infoMorePictureUrl.length > 0
  152. ? e.infoMorePictureUrl.split(",")
  153. : [];
  154. console.log(e.infoMorePictureUrl);
  155. });
  156. this.recordList = res.rows;
  157. }
  158. });
  159. },
  160. getItemJson: function (item) {
  161. const fileUrls = item.fileUrl !== "" ? JSON.parse(item.fileUrl) : [];
  162. console.log(fileUrls);
  163. item.fileUrl = fileUrls;
  164. item.createdAt = this.$common.transServDate(item.createdAt);
  165. // console.log(item.status);
  166. // console.log(this.dic_SelectList.REPAIR_STATUS);
  167. // let index = this.dic_SelectList.REPAIR_STATUS.findIdex((e)=>e.value==item.status)
  168. // item.statusName = this.dic_SelectList.REPAIR_STATUS[index];
  169. return item;
  170. },
  171. /**
  172. *
  173. */
  174. quickSelect(item) {
  175. if (this.quickSleced.val && this.quickSleced.val === item.val) {
  176. this.quickSleced = {};
  177. } else {
  178. this.quickSleced = item;
  179. }
  180. },
  181. /**
  182. * 上传文件
  183. */
  184. afterRead(file) {
  185. console.log(file);
  186. },
  187. /**
  188. * 设置状态样式
  189. */
  190. setStatusStyle(status) {
  191. let statusClass = null;
  192. switch (status) {
  193. case "unAcceptance":
  194. statusClass = "pending-btn";
  195. break;
  196. case "acceptance":
  197. statusClass = "accepted-btn";
  198. break;
  199. case "processed":
  200. statusClass = "processed-btn";
  201. break;
  202. case "evaluated":
  203. statusClass = "evaluated-btn";
  204. break;
  205. }
  206. return statusClass;
  207. },
  208. },
  209. /**
  210. * 过滤器
  211. */
  212. filters: {
  213. /**
  214. * 状态:0、待受理 1、已受理 2、已处理 3、已评价
  215. */
  216. statusFilter(val) {
  217. let res = null;
  218. switch (val) {
  219. case "unAcceptance":
  220. res = "待处理";
  221. break;
  222. case "acceptance":
  223. res = "已受理";
  224. break;
  225. case "processed":
  226. res = "已处理";
  227. break;
  228. case "evaluated":
  229. res = "已评价";
  230. break;
  231. }
  232. return res;
  233. },
  234. },
  235. };
  236. </script>
  237. <style lang="scss" type="text/scss" scoped>
  238. .repair {
  239. .top-add {
  240. background-color: #fff;
  241. padding: 30rpx;
  242. margin-bottom: 20rpx;
  243. text-align: right;
  244. box-shadow: 0rpx 5rpx 10rpx 0rpx rgba(0, 0, 0, 0.05);
  245. i {
  246. font-size: 36rpx;
  247. color: $text6;
  248. margin-right: 15rpx;
  249. }
  250. .txt {
  251. font-size: 32rpx;
  252. color: $text6;
  253. }
  254. }
  255. .info-findRectificationManagementInOutList {
  256. height: calc(100vh - 124rpx);
  257. overflow-y: auto;
  258. .info-item {
  259. background-color: #fff;
  260. padding: 20rpx 30rpx;
  261. margin-top: 20rpx;
  262. margin-bottom: 20rpx;
  263. .info-top {
  264. @include flex;
  265. .left {
  266. width: 286rpx;
  267. height: 168rpx;
  268. font-size: 0;
  269. border-radius: 10rpx;
  270. overflow: hidden;
  271. img {
  272. width: 100%;
  273. height: 100%;
  274. }
  275. }
  276. .right {
  277. align-self: flex-start;
  278. width: 380rpx;
  279. .tit {
  280. width: 380rpx;
  281. font-size: 32rpx;
  282. line-height: 1.4;
  283. font-weight: bold;
  284. color: #333333;
  285. @include line-clamp;
  286. margin-bottom: 20rpx;
  287. display: -webkit-box;
  288. -webkit-box-orient: vertical;
  289. -webkit-line-clamp: 2;
  290. overflow: hidden;
  291. text-overflow: ellipsis;
  292. }
  293. .txt {
  294. font-size: 28rpx;
  295. color: #666;
  296. }
  297. }
  298. }
  299. .info-bottom {
  300. margin-top: 20rpx;
  301. padding-top: 20rpx;
  302. border-top: 1rpx dashed #dbdbdb;
  303. @include flex;
  304. .left {
  305. i {
  306. font-size: 30rpx;
  307. color: #999999;
  308. margin-left: 10rpx;
  309. }
  310. span {
  311. font-size: 28rpx;
  312. color: #999999;
  313. }
  314. }
  315. .right {
  316. }
  317. }
  318. }
  319. }
  320. }
  321. </style>