8 Commits 221309a54f ... d2f555afe0

Author SHA1 Message Date
  梦辉 d2f555afe0 fix: 5 months ago
  梦辉 c07cfe3953 fix: 5 months ago
  梦辉 27425f08fc fix:模板列表循环加key 5 months ago
  梦辉 8fc511a7ae fix:提醒详情中替换$为inputBody 5 months ago
  梦辉 cd07d937ec fix:提醒详情页面修改 5 months ago
  梦辉 9f366eaae7 fix: 企业的提醒列表刷新 5 months ago
  梦辉 58eef576aa fix: 去掉jsonDown这个类型 5 months ago
  梦辉 163a0ada84 fix: 修复企业承诺页面bug 5 months ago

+ 1 - 1
src/api/commitment.js

@@ -146,7 +146,7 @@ export function editVerifyTask (data) {
  */
 export function getReminderList (data) {
     const url = zlbApi.getReminderList;
-    return myFetch(url, 'get', data, 'jsonDown');
+    return myFetch(url, 'get', data, 'json');
 }
 
 /**

+ 2 - 2
src/components/bussinessComponents/remind-list/index.vue

@@ -45,7 +45,7 @@ export default {
     /* 跳转提醒详情 */
     handleRemindClick(item) {
       this.$router.push({
-        path: '/pages/commitment/remindDetail/index',
+        path: '/subPages/pages/commitment/remindDetail/index',
         query: {
           uuid: item.uuid
         }
@@ -73,7 +73,7 @@ export default {
           <view class="title">{{ type ? '承诺条款提醒' : '整改提醒' }}</view>
           <view class="status">
             <span v-if="type === 0" style="color: #D9001B">红灯提醒</span>
-            <span v-if="type === 0" style="color: #F59A23">黄灯提醒</span>
+            <span v-if="type === 1" style="color: #F59A23">黄灯提醒</span>
           </view>
         </view>
         <view class="content">

+ 10 - 5
src/subPages/pages/commitment/enterpriseCommitment/index.vue

@@ -19,13 +19,17 @@ export default {
   watch:{
     "$route.query.uuid": {
       handler(value) {
-        if(value) {
+        if(value && this.$route.path === '/subPages/pages/commitment/enterpriseCommitment/index') {
           this.handleGetEnterpriseDetail()
         }
       },
       immediate: true
     }
   },
+  deactivated() {
+    this.enterpriseDetail = {}
+    this.active = 0
+  },
   methods: {
     /* 获取企业详情 */
     async handleGetEnterpriseDetail() {
@@ -53,20 +57,21 @@ export default {
     </view>
     <view class="page-content">
       <ScoreList :creditScore="enterpriseDetail.creditGoal" :commitmentNum="enterpriseDetail.promiseCount"
-                 :commitmentRemindNum="enterpriseDetail.creditGoal"></ScoreList>
+                 :commitmentRemindNum="enterpriseDetail.warnCount"></ScoreList>
       <van-tabs v-model="active">
-        <van-tab title="全部承诺">
+        <van-tab  title="全部承诺">
           <PromiseList
+              v-if="active === 0"
               class="promise-style"
               :company-id="enterpriseDetail.uuid"
               :show-status="true"
           ></PromiseList>
         </van-tab>
         <van-tab title="整改提醒">
-          <RemindList v-if="enterpriseDetail.uuid" :type="0" :company-id="enterpriseDetail.uuid"></RemindList>
+          <RemindList v-if="enterpriseDetail.uuid && active === 1" :type="0" :company-id="enterpriseDetail.uuid"></RemindList>
         </van-tab>
         <van-tab title="系统提醒">
-          <RemindList v-if="enterpriseDetail.uuid" :type="1" :company-id="enterpriseDetail.uuid"></RemindList>
+          <RemindList v-if="enterpriseDetail.uuid && active === 2" :type="1" :company-id="enterpriseDetail.uuid"></RemindList>
         </van-tab>
       </van-tabs>
     </view>

+ 25 - 25
src/subPages/pages/commitment/home/components/enterpriseList/index.vue

@@ -26,8 +26,6 @@ export default {
     if(this.noRequest) {
       this.finished = true;
       this.loading = false;
-    }else {
-      this.handleGetEnterpriseList()
     }
   },
   watch: {
@@ -51,6 +49,7 @@ export default {
         });
         if (res.data.records) {
           this.enterpriseList = this.enterpriseList.concat(res.data.records || [])
+          this.current++;
           this.finished = res.data.records.length < this.size;  // 判断是否还有更多数据
         }
         this.loading = false;  // 加载结束
@@ -72,31 +71,32 @@ export default {
 </script>
 
 <template>
-  <van-list
-      v-model="loading"
-      @load="handleGetEnterpriseList"
-      :finished="finished"
-      finished-text="没有更多数据了"
-  >
-    <van-cell
-        v-for="(item, index) in enterpriseList"
-        :key="item.uuid"
-        class="box"
-        @click="handleClick(item)"
+    <van-list
+        v-model="loading"
+        @load="handleGetEnterpriseList"
+        :finished="finished"
+        finished-text="没有更多数据了"
     >
-      <template #default>
-        <view class="top">
-          <view class="name">
-            {{ item.companyName }}
-            <van-tag round color="#f4a40d" style="margin-left: 5px"> {{item.creditGoal || '暂无' }}</van-tag>
+      <van-cell
+          v-for="(item, index) in enterpriseList"
+          :key="item.uuid"
+          class="box"
+          @click="handleClick(item)"
+      >
+        <template #default>
+          <view class="top">
+            <view class="name">
+              {{ item.companyName }}
+              <!--后端计算量大,先去掉-->
+              <!--<van-tag round color="#f4a40d" style="margin-left: 5px"> {{item.creditGoal || '暂无' }}</van-tag>-->
+            </view>
           </view>
-        </view>
-        <view class="details">
-          最新承诺时间 : {{ item.createTime | date("YYYY-MM-DD HH:mm:ss") }}
-        </view>
-      </template>
-    </van-cell>
-  </van-list>
+          <view class="details">
+            最新承诺时间 : {{ item.createTime | date("YYYY-MM-DD HH:mm:ss") }}
+          </view>
+        </template>
+      </van-cell>
+    </van-list>
 </template>
 
 

+ 4 - 3
src/subPages/pages/commitment/home/components/templateList/index.vue

@@ -6,11 +6,12 @@ export default {
   props: {
     activeTemplateId: {
       type: String,
-      default: ''
+      default: '',
     }
   },
   data() {
     return {
+      /* 二维数组 */
       templateList: [],
       current: 1,
       size: 16
@@ -18,7 +19,7 @@ export default {
   },
   async mounted() {
     await this.getTemplateList();
-    this.templateList.length && this.$emit('click', this.templateList[0]);
+    this.templateList.length && this.$emit('click', this.templateList[0][0]);
   },
   methods: {
     /* 获取模板列表 */
@@ -63,7 +64,7 @@ export default {
 
 <template>
   <van-swipe class="my-swipe" @change="onChange"  indicator-color="white" :loop="false">
-    <van-swipe-item  v-for="groupItem in templateList">
+    <van-swipe-item  v-for="(groupItem,index) in templateList" :key="index">
       <view class="box">
         <view v-for="item in groupItem" :key="item.uuid"
               @click="handleClick(item)"

+ 1 - 1
src/subPages/pages/commitment/home/index.vue

@@ -107,7 +107,7 @@ export default {
         <view class="enterprise-top-style" v-show="activeIndex === 1">
           <span>综合</span>
         </view>
-        <EnterPriseList v-show="activeIndex === 1" class="enter-style"></EnterPriseList>
+        <EnterPriseList v-if="activeIndex === 1" class="enter-style"></EnterPriseList>
       </view>
       <view v-else key="search" class="search-page">
         <van-search

+ 158 - 84
src/subPages/pages/commitment/remindDetail/index.vue

@@ -4,20 +4,22 @@ import {downFileBase64, reminderDetails} from "@/api/commitment";
 export default {
   watch: {
     /* 提醒uuid */
-    'router.query.uuid': {
+    '$route.query.uuid': {
       handler() {
-        this.handleGetDetail()
+        if (this.$route.query.uuid && this.$route.path === '/subPages/pages/commitment/remindDetail/index') {
+          this.handleGetDetail()
+        }
       },
       immediate: true,
       deep: true
     }
   },
-  data() {
-    return {}
+  activated() {
+    this.handleGetDetail()
   },
-  computed:{
-    noDownload(){
-      return this.$router.query.noDownload === true
+  data() {
+    return {
+      reminderDetail: {},
     }
   },
   methods: {
@@ -26,8 +28,8 @@ export default {
         uuid: this.$route.query.uuid,
         type: this.$route.query.type // 0:整改提醒 1:系统提醒
       }).then(res => {
-        if (res.code === 0) {
-          this.enterpriseDetail = res.data
+        if (res) {
+          this.reminderDetail = res.data
         }
       })
     },
@@ -36,7 +38,7 @@ export default {
       downFileBase64({
         uuid: uuid
       }).then(res => {
-        if (res.code === 0) {
+        if (res) {
           const a = document.createElement('a')
           a.href = res.data
           a.download = '附件'
@@ -47,6 +49,13 @@ export default {
     handleClose() {
       window.history.go(-1)
     },
+    handleIndicateBody(indicatorInputBody) {
+      if (indicatorInputBody.includes('&')) {
+        return this.reminderDetail.inputBody ? indicatorInputBody.replace('&', this.reminderDetail.inputBody + this.reminderDetail.inputSegment) : indicatorInputBody
+      } else {
+        return indicatorInputBody
+      }
+    }
   }
 }
 
@@ -54,112 +63,148 @@ export default {
 
 <template>
   <view class="remind-page">
-    <view class="top">
-      <view class="title">整改提醒:{{ item.code }}</view>
-      <view class="status">
-        <span v-if="$router.query.type === '0'" style="color: #1492FF">待核查</span>
-        <span v-if="$router.query.type === '1'" style="color: #FF6B00">已核查</span>
+    <view class="remind-content">
+      <view class="top">
+        <view class="title">提醒编号:{{ reminderDetail.code }}</view>
+        <view class="status">
+          <span v-if="$route.query.type === '0'" style="color: #D9001B">红灯提醒</span>
+          <span v-if="$route.query.type === '1'" style="color: #F59A23">黄灯提醒</span>
+        </view>
       </view>
-    </view>
 
-    <view class="remind">
-      {{ enterpriseDetail.content }}
-    </view>
-    <el-divider></el-divider>
-    <view>
-      <view class="indicator-body">
-        {{ item.indicatorInputBody }}
+      <view class="remind">
+        {{ reminderDetail.content }}
       </view>
+      <van-divider></van-divider>
       <view>
-        <view class="other-title">
-          监管核查
-          <view style="color: #FF6B00" v-if="enterpriseDetail.approvalStatus === 0">
-            审批状态:待审批
-          </view>
-          <view style="color: #15BE50" v-if="enterpriseDetail.approvalStatus === 1">
-            审批状态:已通过
-          </view>
-          <view style="color: #D40000" v-if="enterpriseDetail.approvalStatus === 2">
-            审批状态:已拒绝
-          </view>
+        <view class="indicator-body">
+          {{ reminderDetail.indicatorInputBody ? handleIndicateBody(reminderDetail.indicatorInputBody) : '' }}
         </view>
-        <van-divider/>
-        <van-form>
-          <!--核查结果-->
-          <van-field
-              name="auditResult"
-              label="核查结果"
-          >
-            <template #input>
-              <view v-if="enterpriseDetail.auditResult === 0">符合</view>
-              <view v-if="enterpriseDetail.auditResult === 1">整改</view>
-              <view v-if="enterpriseDetail.auditResult === 2">整改扣分</view>
-            </template>
-          </van-field>
-          <!--核查得分-->
-          <van-field
-              name="auditScore"
-              label="核查得分"
-          >
-            <template #input>
-              <view v-if="enterpriseDetail.auditScore === 0">0分</view>
-              <view v-if="enterpriseDetail.auditScore === -10">-10分</view>
-            </template>
-          </van-field>
-          <!--核查说明-->
-          <van-field
-              name="auditRemark"
-              label="核查说明"
-          >
-            <template #input>
-              <view>{{ enterpriseDetail.auditRemark }}</view>
-            </template>
-          </van-field>
-          <van-field
-              name="expandStr"
-              label="附件"
-          >
-            <template #input>
-              <view class="file-style">
-                <view v-for="(item,index) in item.expandStr.split(',')" @click="handleFileDown(item.uuid)" :key="index">
-                  附件{{ index + 1 }}
+        <view>
+          <view class="other-title">
+            监管核查
+            <view style="color: #FF6B00" v-if="reminderDetail.approvalStatus === 0">
+              审批状态:待审批
+            </view>
+            <view style="color: #15BE50" v-if="reminderDetail.approvalStatus === 1">
+              审批状态:已通过
+            </view>
+            <view style="color: #D40000" v-if="reminderDetail.approvalStatus === 2">
+              审批状态:已拒绝
+            </view>
+          </view>
+          <van-divider/>
+          <van-form>
+            <!--核查结果-->
+            <van-field
+                name="auditResult"
+                label="核查结果"
+            >
+              <template #input>
+                <view v-if="reminderDetail.auditResult === 0">符合</view>
+                <view v-if="reminderDetail.auditResult === 1">整改</view>
+                <view v-if="reminderDetail.auditResult === 2">整改扣分</view>
+              </template>
+            </van-field>
+            <!--核查得分-->
+            <van-field
+                name="auditScore"
+                label="核查得分"
+            >
+              <template #input>
+                <span v-if="reminderDetail.auditResult === 1">
+                  0分
+                </span>
+                <span v-if="reminderDetail.auditResult === 2">
+                  -10分
+                </span>
+              </template>
+            </van-field>
+            <!--核查说明-->
+            <van-field
+                name="auditRemark"
+                label="核查说明"
+            >
+              <template #input>
+                <view>{{ reminderDetail.auditRemark }}</view>
+              </template>
+            </van-field>
+            <van-field
+                name="expandStr"
+                label="附件"
+            >
+              <template #input>
+                <view v-if="reminderDetail.expandStr" class="file-style">
+                  <view v-for="(item,index) in reminderDetail.expandStr.split(',')" :key="index"
+                        @click="handleFileDown(item.uuid)">
+                    附件{{ index + 1 }}
+                  </view>
                 </view>
-              </view>
-            </template>
-          </van-field>
-        </van-form>
+              </template>
+            </van-field>
+            <!--核查人员-->
+            <van-field
+                style="margin-top: 16px"
+                name="auditor"
+                label="核查人员"
+            >
+              <template #input>
+                {{ reminderDetail.auditor }}
+              </template>
+            </van-field>
+            <!--核查时间-->
+            <van-field
+                name="auditTime"
+                label="核查时间"
+            >
+              <template #input>
+                {{ reminderDetail.updateTime | date }}
+              </template>
+            </van-field>
+          </van-form>
+        </view>
       </view>
     </view>
     <view class="page-bottom">
       <van-button plain type="primary" @click="handleClose">关闭</van-button>
-      <van-button  v-if="!noDownload" type="info" @click="handleFileDown(enterpriseDetail.attachmentId)">下载PDF</van-button>
+      <van-button type="info" @click="handleFileDown(reminderDetail.attachmentId)">下载PDF</van-button>
     </view>
   </view>
 </template>
 
 <style scoped lang="scss">
 .remind-page {
-  min-height: 100vh;
+  height: 100vh;
   background-color: #fff;
+  padding: 20px;
+  overflow: hidden;
+  display: flex;
+  box-sizing: border-box;
+  flex-direction: column;
+}
+
+.remind {
+  margin-top: 10px;
 }
 
 .remind-page .top {
-  padding: 20rpx;
   display: flex;
+  font-weight: bold;
   justify-content: space-between;
   align-items: center;
 
   .title {
-    font-size: 32rpx;
+    font-size: 28rpx;
     color: #333333;
   }
 
   .status {
-    font-size: 28rpx;
+    font-size: 24rpx;
   }
 }
 
 .indicator-body {
+  margin-top: 40px;
   background: #F6F6F6;
   border-radius: 4px;
   font-weight: 400;
@@ -192,7 +237,36 @@ export default {
   flex-direction: column;
   cursor: pointer;
 }
+
+.remind-content {
+  flex: 1;
+  overflow-y: auto;
+}
+
 .page-bottom {
-  height: 48px;
+  height: 50px;
+  display: flex;
+  width: 100%;
+}
+
+/* 默认情况下,每个按钮平分空间 */
+.page-bottom .van-button {
+  flex: 1;
+  margin-right: 10px;
+}
+
+/* 取消最后一个按钮的右侧间距 */
+.page-bottom .van-button:last-child {
+  margin-right: 0;
+}
+
+/* 当只有两个按钮时的样式 */
+.page-bottom .van-button:first-child:nth-last-child(2) {
+  flex: 1; /* 第一个按钮占 1/3 */
+}
+
+.page-bottom .van-button:nth-child(2):last-child {
+  flex: 3; /* 第二个按钮占 2/3 */
 }
+
 </style>

+ 0 - 4
src/utils/fetch/handleReqLoading.js

@@ -4,10 +4,6 @@
  */
 let requestNum = 0;
 const handleReqLoading = (loadingStatus,dataType='json') => {
-    // 如果是文件下载,不显示loading
-    if(dataType === 'jsonDown'){
-        return;
-    }
     if (loadingStatus) {
         requestNum++;
     } else {

+ 1 - 1
src/utils/fetch/requestHandler.js

@@ -8,7 +8,7 @@ export const handleRequest = (reqConfig) => {
     const promises = [];
 
     /** 普通请求 */
-    if (reqConfig.dataType === 'json' || reqConfig.dataType === 'jsonDown') {
+    if (reqConfig.dataType === 'json') {
         const promise = new Promise((resolve, reject) => {
             uni.request({
                 ...reqConfig,