123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332 |
- <template>
- <div class="repair">
- <div class="top-add" @click="goNavigator()">
- <i class="iconfont icon-xinzeng"></i>
- <span class="txt">新增整改</span>
- </div>
- <div class="info-findRectificationManagementInOutList">
- <div
- class="info-item"
- v-for="item in recordList"
- :key="item.id"
- @click="jumpPageDetails(item.finishType, item.id)"
- >
- <div class="info-top">
- <div class="left">
- {{ JSON.stringify(item) }}
- <img
- :src="
- item.infoMorePictureUrl != null &&
- item.infoMorePictureUrl.length > 0
- ? BASE_URI +
- '/FileController/download/' +
- item.infoMorePictureUrl[0]
- : ''
- "
- alt=""
- />
- </div>
- <div class="right">
- <p class="tit">
- {{ item.info }}
- </p>
- <p class="txt">创建时间:{{ item.createdAt }}</p>
- </div>
- </div>
- <div class="info-bottom">
- <div class="left">
- <i class="iconfont icon-shijian"></i>
- <span>
- {{ item.updateAddress }}
- </span>
- </div>
- <div class="right">
- <span v-if="item.finishType == 1" class="normal-tip yd h-bg">
- 待派单
- </span>
- <span v-if="item.finishType == 2" class="normal-tip yd h-bg">
- 待处理
- </span>
- <span v-if="item.finishType == 3" class="normal-tip yd h-bg">
- 待确认
- </span>
- <span v-if="item.finishType == 4" class="normal-tip yd h-bg">
- 已完成
- </span>
- </div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import {
- findRectificationManagementInOutList,
- getByCodes,
- getUserLocalStorageInfo,
- } from "@/js_sdk/http.js";
- // import Base from "@/pages/base/base";
- export default {
- data() {
- return {
- BASE_URI: this.$constant.BASE_URI,
- dic_SelectList: {},
- recordList: [],
- params: {
- openUser: getUserLocalStorageInfo().user.id,
- pageNum: 1,
- pageSize: 10,
- },
- totalPage: 1,
- allData: [],
- findRectificationManagementInOutList: [
- {
- title: "关于组织2020年无锡市服务业提质增效资金项目申报的通知",
- name: "无锡 XXXX有限公司",
- date: "2020-09-18 19:34:06",
- type: "1",
- },
- {
- title:
- "关于组织2020年无锡市服务业提质增效资金项目申报的通知关于组织2020年无锡市服务业提质增效资金项目申报的通知",
- name: "无锡 XXXX有限公司",
- date: "2020-09-18 19:34:06",
- type: "2",
- },
- ],
- };
- },
- mounted() {
- // if (window.history && window.history.pushState) {
- // // 向历史记录中插入了当前页
- // history.pushState(null, null, document.URL);
- // window.addEventListener("popstate", this.goBack, false);
- // }
- },
- onLoad() {},
- onShow() {
- this.getByCodes();
- },
- methods: {
- goNavigator(id) {
- uni.navigateTo({
- url: "/pages/subPackages/modifyReport/add",
- });
- },
- jumpPageDetails(finishType, id) {
- console.log(id);
- if (finishType == 4) {
- uni.navigateTo({
- url: "/pages/subPackages/modifyHandle/handle?id=" + id,
- });
- } else {
- uni.navigateTo({
- url:
- "/pages/subPackages/modifyReport/detail?id=" +
- id +
- "&pdStatus=" +
- 0,
- });
- }
- },
- async getByCodes() {
- let that = this;
- let data = await getByCodes(JSON.stringify(["REPAIR_STATUS"]));
- that.dic_SelectList = that.$common.handleDicList(data);
- that.selectData();
- },
- // auth.currUser().id
- selectData() {
- let _this = this;
- console.log(_this.params);
- findRectificationManagementInOutList(_this.params).then((res) => {
- if (res) {
- res.rows.forEach((e) => {
- e.createdAt = this.$common.transServDate(e.createdAt);
- e.updateAddress =
- e.updateAddress && e.updateAddress.length > 0
- ? e.updateAddress.replace("江苏省无锡市", "")
- : e.updateAddress;
- e.infoMorePictureUrl =
- e.infoMorePictureUrl && e.infoMorePictureUrl.length > 0
- ? e.infoMorePictureUrl.split(",")
- : [];
- console.log(e.infoMorePictureUrl);
- });
- this.recordList = res.rows;
- }
- });
- },
- getItemJson: function (item) {
- const fileUrls = item.fileUrl !== "" ? JSON.parse(item.fileUrl) : [];
- console.log(fileUrls);
- item.fileUrl = fileUrls;
- item.createdAt = this.$common.transServDate(item.createdAt);
- // console.log(item.status);
- // console.log(this.dic_SelectList.REPAIR_STATUS);
- // let index = this.dic_SelectList.REPAIR_STATUS.findIdex((e)=>e.value==item.status)
- // item.statusName = this.dic_SelectList.REPAIR_STATUS[index];
- return item;
- },
- /**
- *
- */
- quickSelect(item) {
- if (this.quickSleced.val && this.quickSleced.val === item.val) {
- this.quickSleced = {};
- } else {
- this.quickSleced = item;
- }
- },
- /**
- * 上传文件
- */
- afterRead(file) {
- console.log(file);
- },
- /**
- * 设置状态样式
- */
- setStatusStyle(status) {
- let statusClass = null;
- switch (status) {
- case "unAcceptance":
- statusClass = "pending-btn";
- break;
- case "acceptance":
- statusClass = "accepted-btn";
- break;
- case "processed":
- statusClass = "processed-btn";
- break;
- case "evaluated":
- statusClass = "evaluated-btn";
- break;
- }
- return statusClass;
- },
- },
- /**
- * 过滤器
- */
- filters: {
- /**
- * 状态:0、待受理 1、已受理 2、已处理 3、已评价
- */
- statusFilter(val) {
- let res = null;
- switch (val) {
- case "unAcceptance":
- res = "待处理";
- break;
- case "acceptance":
- res = "已受理";
- break;
- case "processed":
- res = "已处理";
- break;
- case "evaluated":
- res = "已评价";
- break;
- }
- return res;
- },
- },
- };
- </script>
- <style lang="scss" type="text/scss" scoped>
- .repair {
- .top-add {
- background-color: #fff;
- padding: 30rpx;
- margin-bottom: 20rpx;
- text-align: right;
- box-shadow: 0rpx 5rpx 10rpx 0rpx rgba(0, 0, 0, 0.05);
- i {
- font-size: 36rpx;
- color: $text6;
- margin-right: 15rpx;
- }
- .txt {
- font-size: 32rpx;
- color: $text6;
- }
- }
- .info-findRectificationManagementInOutList {
- height: calc(100vh - 124rpx);
- overflow-y: auto;
- .info-item {
- background-color: #fff;
- padding: 20rpx 30rpx;
- margin-top: 20rpx;
- margin-bottom: 20rpx;
- .info-top {
- @include flex;
- .left {
- width: 286rpx;
- height: 168rpx;
- font-size: 0;
- border-radius: 10rpx;
- overflow: hidden;
- img {
- width: 100%;
- height: 100%;
- }
- }
- .right {
- align-self: flex-start;
- width: 380rpx;
- .tit {
- width: 380rpx;
- font-size: 32rpx;
- line-height: 1.4;
- font-weight: bold;
- color: #333333;
- @include line-clamp;
- margin-bottom: 20rpx;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .txt {
- font-size: 28rpx;
- color: #666;
- }
- }
- }
- .info-bottom {
- margin-top: 20rpx;
- padding-top: 20rpx;
- border-top: 1rpx dashed #dbdbdb;
- @include flex;
- .left {
- i {
- font-size: 30rpx;
- color: #999999;
- margin-left: 10rpx;
- }
- span {
- font-size: 28rpx;
- color: #999999;
- }
- }
- .right {
- }
- }
- }
- }
- }
- </style>
-
|