Parcourir la source

feature:
- 指标样式更改
- 模板传递部门id

梦辉 il y a 5 mois
Parent
commit
6624571076

+ 1 - 2
src/store/modules/template.js

@@ -15,7 +15,7 @@ const mutations = {
     },
     setIndicatorList(state, data) {
         Vue.set(state, 'indicatorList', data)
-    }
+    },
 
 }
 
@@ -40,7 +40,6 @@ const actions = {
         catch (e) {
             console.log(e)
         }
-
     }
 }
 

+ 14 - 13
src/subPages/pages/commitment/commitmentDetail/components/IndicatorComponents.vue

@@ -8,22 +8,24 @@ export default {
   components: {CommitmentConfirmForm},
   computed: {
     indicatorList() {
-      return this.$store.state.template.indicatorList.map(item => {
-        if (item.indicatorInputBody) {
-          item.indicatorInputBody = item.indicatorInputBody.replace('&', item.inputBody + item.inputSegment)
-        }
-        return item
-      })
+      return this.$store.state.template.indicatorList
     },
   },
   watch: {
     indicatorList: {
       handler(value) {
         if (value && value.length > 0 && !this.formStatesInitFlag) {
-          value.forEach((item) => {
+          value.forEach((indicatorItem) => {
             this.$nextTick(() => {
-              this.$set(this.formStates, item.uuid, {
-                fileList: []
+              this.$set(this.formStates, indicatorItem.uuid, {
+                ...indicatorItem,
+                auditResult: this.checkResultColumns.find(item => item.value === indicatorItem.auditResult) && this.checkResultColumns.find(item => item.value === indicatorItem.auditResult).text,
+                auditScore: this.checkGoalColumns.find(item => item.value === indicatorItem.auditScore) && this.checkGoalColumns.find(item => item.value === indicatorItem.auditScore).text,
+                fileList: indicatorItem.expandStr ? indicatorItem.expandStr.split(',').map(item => {
+                  return {
+                    uuid: item
+                  }
+                }) : []
               })
             })
           })
@@ -99,6 +101,8 @@ export default {
       ]).then(res => {
         if (res.code === 0) {
           this.$toast('核查成功')
+          this.formStatesInitFlag = false
+          this.$store.dispatch('template/getPromiseDetail1',this.$route.query.uuid)
         }else {
           this.$toast('核查失败' + res.msg)
         }
@@ -125,7 +129,7 @@ export default {
   <view>
     <view v-for="(item,index) in indicatorList" :key="index" class="indicator-style">
       <view class="indicator-body">
-        {{ item.indicatorInputBody }}
+        {{ item.indicatorInputBody.replace('&', item.inputBody + item.inputSegment) }}
       </view>
       <view class="title">监管核查
         <view>涉及整改、整改扣分结果,需要走审批二次确认</view>
@@ -142,9 +146,6 @@ export default {
       <view v-else>
         <view class="other-title">
           监管核查
-          <view style="color: #FF6B00" v-if="item.approvalStatus === 0">
-            审批状态:待审批
-          </view>
           <view style="color: #15BE50" v-if="item.approvalStatus === 1">
             审批状态:已通过
           </view>

+ 1 - 3
src/subPages/pages/commitment/commitmentDetail/index.vue

@@ -51,9 +51,7 @@ export default {
   },
   methods: {
     handleClose() {
-      this.$router.push({
-        path:"pages/subPages/pages/commitment/home/index"
-      })
+      this.$router.go(-1)
     },
     handleDownPdf() {
      if(!this.templateJson.attmentId){

+ 17 - 0
src/subPages/pages/commitment/components/promiseList/index.vue

@@ -150,6 +150,10 @@ export default {
             <view v-for="(item,index) in handleParseBody(item.promise_body)" :key="index">
               {{ item }}
             </view>
+            <view class="content-item">
+              <view class="content-key">签署时间</view>
+              <view class="content-value">{{ item.create_time | date }}</view>
+            </view>
           </view>
         </view>
       </template>
@@ -204,5 +208,18 @@ export default {
   text-overflow: ellipsis;
   white-space: nowrap;
 }
+.content-item {
+  display: flex;
+  margin-bottom: 10px;
+}
+.content-key {
+  font-size: 14px;
+  width: 60px;
+  color: #999;
+}
+.content-value {
+  font-size: 14px;
+  margin-left: 10px;
+}
 
 </style>

+ 9 - 2
src/subPages/pages/commitment/enterpriseCommitment/index.vue

@@ -16,8 +16,15 @@ export default {
       active: 0
     }
   },
-  mounted() {
-    this.handleGetEnterpriseDetail()
+  watch:{
+    "$route.query.uuid": {
+      handler(value) {
+        if(value) {
+          this.handleGetEnterpriseDetail()
+        }
+      },
+      immediate: true
+    }
   },
   methods: {
     /* 获取企业详情 */

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

@@ -25,7 +25,9 @@ export default {
         const res = await getTemplateList({
           current: 1,
           size: 8,
-          departmentId: undefined // 等登录了联调
+          departmentId: uni.getStorageSync("userInfo").deptIdList
+              ? uni.getStorageSync("userInfo").deptIdList[uni.getStorageSync("userInfo").deptIdList.length - 1]
+              : undefined
         });
         this.templateList = res.data.records || [];
         for (const [index, item] of this.templateList.entries()) {