zhaozp 3 жил өмнө
parent
commit
e6071e7903

+ 1 - 1
src/common/request.js

@@ -10,7 +10,7 @@
 // const baseUrl = 'http://8.140.188.124'
 // const baseUrl = 'http://172.18.0.24:40046'
 // const baseUrl =  'http://172.18.1.227:40046'
-const baseUrl =  'https://s2t.jihengcc.cn/'
+const baseUrl =  'https://s2.jihengcc.cn/'
 // const baseUrl = ''
 
 // import { showLoading,hideLoading } from './loading.js'

+ 56 - 34
src/pages/index/index.vue

@@ -57,12 +57,12 @@
           <view v-if="role">共{{ sjRcordNum }}张记录表待响应处理</view>
           <view v-else>共{{ sjRcordNum }}张记录表待巡视处理</view>
         </view>
-        <image
+        <!-- <image
           src="../../static/sao.png"
           style="width: 40rpx; height: 40rpx; margin-left: auto"
           mode=""
           @click="sao"
-        ></image>
+        ></image> -->
       </view>
       <view class="d-flex a-center j-sb f-w-900" style="height: 100%">
         <view
@@ -106,7 +106,7 @@
           </view>
           <view
             class="u-m-t-14 content-right-item"
-            style="max-height: 60%; overflow-y: auto"
+            style="max-height: 50%; overflow-y: auto"
             v-if="
               item.recordList && item.recordList.length && item.chu === true
             "
@@ -155,12 +155,12 @@
             >{{ recordName }}</view
           >
         </view>
-        <view class="d-flex f-w-900 f-20 j-end" style="width: 58%">
+        <view class="d-flex f-w-900 f-15 j-end" style="width: 58%">
           <view
             class="content-right-chunk b-r-5 f-w-900 d-flex a-center"
             @click="lookCheckResult"
             :style="{
-              fontSize: responseClickStatusFc && '18px',
+              fontSize: responseClickStatusFc && '15px',
             }"
           >
             查看前一班
@@ -170,7 +170,7 @@
             class="d-flex a-center content-right-chunk b-r-5"
             :style="{
               background: responseClickStatusFc ? '#4299D3' : '#046CB4',
-              fontSize: responseClickStatusFc && '18px',
+              fontSize: responseClickStatusFc && '15px',
             }"
           >
             <image
@@ -187,7 +187,7 @@
             class="content-right-chunk b-r-5 f-w-900 d-flex a-center"
             :style="{
               background: submitClickStatusFc ? '#4299D3' : '#046CB4',
-              fontSize: responseClickStatusFc && '18px',
+              fontSize: responseClickStatusFc && '15px',
             }"
             @click="saveFc(2)"
           >
@@ -195,7 +195,7 @@
           </view>
           <view
             class="content-right-chunk b-r-5 f-w-900 d-flex a-center"
-            :style="{ fontSize: responseClickStatusFc && '18px' }"
+            :style="{ fontSize: responseClickStatusFc && '15px' }"
             @click="lookFile(1)"
           >
             查看表头
@@ -208,7 +208,7 @@
           v-for="(item, indez) in procedureRes"
           :key="indez"
           :style="{ background: item.type === 1 ? '#29BE23' : '#046cb4' }"
-          @click="showResultInfo(item.id, item.flow)"
+          @click="showResultInfo(item.id, item.flow, item.type)"
         >
           <image
             src="../../static/yh.png"
@@ -237,17 +237,17 @@
             >{{ flowName }}</view
           >
         </view>
-        <view class="d-flex f-w-900 f-16 j-end" style="width: 45%">
+        <view class="d-flex f-w-900 f-15 j-end" style="width: 45%">
           <view
             v-if="fcType !== 3"
             class="content-right-chunk b-r-5 f-w-900 d-flex a-center"
             :style="{
               background: submitClickStatusFc ? '#4299D3' : '#046CB4',
-              fontSize: responseClickStatusFc && '18px',
+              fontSize: responseClickStatusFc && '15px',
             }"
             @click="saveFc(0)"
           >
-            {{ fcType === 2 ? (showButton ? "保存" : "编辑") : "保存" }}
+            {{ showButton ? "保存" : "编辑" }}
           </view>
         </view>
       </view>
@@ -347,12 +347,12 @@
             >{{ recordName }}</view
           >
         </view>
-        <view class="d-flex f-w-900 f-20 j-end" style="width: 45%">
+        <view class="d-flex f-w-900 f-15 j-end" style="width: 45%">
           <view
             class="content-right-chunk b-r-5 f-w-900 d-flex a-center"
             :style="{
               background: submitClickStatusFc ? '#4299D3' : '#046CB4',
-              fontSize: responseClickStatusFc && '18px',
+              fontSize: responseClickStatusFc && '15px',
             }"
             @click="saveFc(1)"
           >
@@ -393,8 +393,9 @@
               <view class="u-m-b-6">
                 流程: {{ item.flow }} 项目: {{ item.longdyProject }}
                 <text class="u-m-l-6" v-if="item.inspectClass"
-                  >班次 :
-                  {{ item.inspectClass === 1 ? "上一班" : "当前班" }}</text
+                  >班次 :{{
+                    item.inspectClass === 1 ? "上一班" : "当前班"
+                  }}</text
                 >
               </view>
               <view>
@@ -475,7 +476,7 @@
               type="text"
               class="f-w"
               :disabled="useSpanner === 1 || submitClickStatus || fcType === 3"
-              @focus="ifUpdate"
+              @focus="ifUpdate(1)"
               style="
                 background: #fff;
                 height: 25rpx;
@@ -1052,6 +1053,7 @@ export default {
     // 责任人流程下点检项
     getDutyPlanInfo() {
       this.responseClickStatusFc = this.fcType !== 1 ? true : false;
+      this.submitClickStatusFc = 0;
       dutyPlanInfo({ versionId: this.sjRecordId, type: this.fcType }).then(
         (res) => {
           this.procedureRes = res.data.procedureRes;
@@ -1060,16 +1062,17 @@ export default {
       );
     },
     // 返回流程列表页
-    showResultInfo(id, name) {
+    showResultInfo(id, name, type) {
       if (this.ifResponse()) {
-        this.getInfo(id);
+        this.getInfo(id, type);
         // title名
         this.flowName = name;
       }
     },
     // 获取信息
-    getInfo(id, index = 0) {
+    getInfo(id, type) {
       this.fcHeadData = [];
+      this.showButton = type === 1 ? false : true;
       versionInfo({
         id: id,
       }).then((res) => {
@@ -1135,7 +1138,7 @@ export default {
       if (index !== 1) {
         let data = [];
         if (index === 0) {
-          if (this.fcType === 2) {
+          if (this.fcType === 1 || this.fcType === 2) {
             if (!this.showButton) {
               this.showButton = true;
               return;
@@ -1170,6 +1173,12 @@ export default {
             versionId: this.sjRecordId,
             everyId: this.everyId,
           };
+          for (let i of this.procedureRes) {
+            if (i.type === 2) {
+              this.hintCase("检查内容未填全");
+              return;
+            }
+          }
         }
         versionSubInsert(data).then((res) => {
           if (res.status === "20000") {
@@ -1300,8 +1309,8 @@ export default {
       });
     },
     changeButton(index) {
-      // if (this.submitClickStatus) return;
-      if (this.ifUpdate()) {
+      // if (this.submitClickStatus) return;\
+      if (this.ifUpdate(1)) {
         this.useSpanner = index;
         this.spannerRemark = "";
       }
@@ -1376,19 +1385,32 @@ export default {
       return responseStatus;
     },
     // 是否点击编辑
-    ifUpdate() {
-      if (this.fcType === 1) {
-        return true;
-      } else if (this.fcType === 2) {
-        let responseStatus = true;
-        if (!this.showButton) {
-          this.hintCase("请先执行编辑");
-          responseStatus = false;
-          return responseStatus;
+    ifUpdate(index) {
+      if (index) {
+        if (this.fcType === 2) {
+          if (!this.showButton) {
+            this.hintCase("请先执行编辑");
+            return false;
+          } else {
+            return true;
+          }
+        } else if (this.fcType === 3) {
+          return false;
+        } else {
+          return true;
         }
-        return responseStatus;
       } else {
-        return false;
+        if (this.fcType === 1 || this.fcType === 2) {
+          let responseStatus = true;
+          if (!this.showButton) {
+            this.hintCase("请先执行编辑");
+            responseStatus = false;
+            return responseStatus;
+          }
+          return responseStatus;
+        } else {
+          return false;
+        }
       }
     },
     // 查看附件