ZaiZai 1 gadu atpakaļ
vecāks
revīzija
8497d999aa
2 mainītis faili ar 18 papildinājumiem un 6 dzēšanām
  1. 2 2
      manifest.json
  2. 16 4
      pages/report/report.vue

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "工程云家",
     "appid" : "__UNI__A0B807E",
     "description" : "智慧数字工程",
-    "versionName" : "2.2.0",
-    "versionCode" : 220,
+    "versionName" : "2.2.1",
+    "versionCode" : 221,
     "transformPx" : false,
     "networkTimeout" : {
         "request" : 300000,

+ 16 - 4
pages/report/report.vue

@@ -41,7 +41,7 @@
         <!--底部操作栏-->
         <HcTabbarBlock :height="77"/>
         <hc-tabbars>
-            <button type="primary" class="action-bar-btn" @click="submitClick">确认上报</button>
+            <button type="primary" class="action-bar-btn" :disabled="!isFixedFlow" @click="submitClick">确认上报</button>
         </hc-tabbars>
     </hc-sys>
 </template>
@@ -93,6 +93,7 @@ const getEventChannel = async () => {
 //获取流程数据
 const fixedFlowData = ref([])
 const linkUserJoinString = ref('')
+const isFixedFlow = ref(false)
 const fixedFlowDefault = [{
     value: 0, text: '自定义流程', disable: false, linkUserJoinString: null
 }]
@@ -104,7 +105,6 @@ const getFixedFlowDataApi = async () => {
     } else {
         await getProcessData()
     }
-    uni.hideLoading();
 }
 
 //获取流程数据
@@ -112,7 +112,7 @@ const getProcessData = async () => {
     linkUserJoinString.value = ''
     fixedFlowData.value = fixedFlowDefault
     const { projectId, contractId } = props.value
-    const { error, code, data } = await flowApi.getPageData({
+    const { error, code, data, msg } = await flowApi.getPageData({
         projectId: projectId,
         contractId: contractId,
         current: 1, size: 100,
@@ -127,6 +127,12 @@ const getProcessData = async () => {
                 linkUserJoinString: arr[i].linkUserJoinString
             })
         }
+        uni.hideLoading();
+        isFixedFlow.value = true
+    } else {
+        uni.hideLoading();
+        isFixedFlow.value = false
+        errorToast(msg ?? '任务流程异常');
     }
 }
 
@@ -144,7 +150,7 @@ const queryFixedFlowApi = async (type, datas) => {
     linkUserJoinString.value = ''
     fixedFlowData.value = fixedFlowDefault
     const { projectId, contractId } = props.value
-    const { error, code, data } = await queryFixedFlow({
+    const { error, code, data, msg } = await queryFixedFlow({
         projectId: projectId,
         contractId: contractId,
         ...flowJson,
@@ -159,6 +165,12 @@ const queryFixedFlowApi = async (type, datas) => {
                 linkUserJoinString: arr[i].linkUserJoinString
             })
         }
+        uni.hideLoading();
+        isFixedFlow.value = true
+    } else {
+        uni.hideLoading();
+        isFixedFlow.value = false
+        errorToast(msg ?? '任务流程异常');
     }
 }