Преглед на файлове

fix:提醒详情页面修改

梦辉 преди 5 месеца
родител
ревизия
cd07d937ec

+ 1 - 1
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
         }

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

@@ -19,7 +19,7 @@ export default {
   watch:{
     "$route.query.uuid": {
       handler(value) {
-        if(value) {
+        if(value && this.$route.path === '/subPages/pages/commitment/enterpriseCommitment/index') {
           this.handleGetEnterpriseDetail()
         }
       },

+ 140 - 83
src/subPages/pages/commitment/remindDetail/index.vue

@@ -4,7 +4,7 @@ import {downFileBase64, reminderDetails} from "@/api/commitment";
 export default {
   watch: {
     /* 提醒uuid */
-    'router.query.uuid': {
+    '$route.query.uuid': {
       handler() {
         this.handleGetDetail()
       },
@@ -13,11 +13,8 @@ export default {
     }
   },
   data() {
-    return {}
-  },
-  computed:{
-    noDownload(){
-      return this.$router.query.noDownload === true
+    return {
+      reminderDetail: {},
     }
   },
   methods: {
@@ -26,8 +23,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 +33,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 = '附件'
@@ -54,112 +51,143 @@ 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 }}
         </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>
+                {{ reminderDetail.auditScore }}
+              </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 +220,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>