فهرست منبع

完成安全检查记录编辑保存

yangguanjin 1 هفته پیش
والد
کامیت
86edbc38ea

+ 6 - 6
src/interceptors/request.ts

@@ -61,12 +61,12 @@ const httpInterceptor = {
     }
 
     // 打印请求信息
-    console.log('🚀 HTTP Request:', {
-      url: options.url,
-      method: options.method,
-      headers: options.header,
-      data: options.data,
-    })
+    // console.log('🚀 HTTP Request:', {
+    //   url: options.url,
+    //   method: options.method,
+    //   headers: options.header,
+    //   data: options.data,
+    // })
   },
 }
 

+ 26 - 43
src/pages.json

@@ -90,19 +90,6 @@
         "navigationStyle": "custom"
       }
     },
-    {
-      "path": "pages/message/message",
-      "type": "page",
-      "layout": "default",
-      "style": {
-        "navigationBarTitleText": "",
-        "navigationStyle": "custom",
-        "disableScroll": true,
-        "app-plus": {
-          "bounce": "none"
-        }
-      }
-    },
     {
       "path": "pages/securityCheck/securityCheckEditor",
       "type": "page",
@@ -136,15 +123,6 @@
         "disableScroll": true
       }
     },
-    {
-      "path": "pages/sign/index-back",
-      "type": "page",
-      "layout": "default",
-      "style": {
-        "navigationBarTitleText": "签字",
-        "navigationStyle": "custom"
-      }
-    },
     {
       "path": "pages/sign/index",
       "type": "page",
@@ -255,19 +233,6 @@
         "navigationStyle": "custom"
       }
     },
-    {
-      "path": "pages/user/people",
-      "type": "page",
-      "layout": "default",
-      "style": {
-        "navigationStyle": "custom",
-        "navigationBarTitleText": "个人",
-        "disableScroll": true,
-        "app-plus": {
-          "bounce": "none"
-        }
-      }
-    },
     {
       "path": "pages/webview/generic-webview-v2",
       "type": "page"
@@ -281,22 +246,22 @@
       "type": "page"
     },
     {
-      "path": "pages/equipment/detail/equipmentDetail",
+      "path": "pages/equipment/detail/equipCheckRecordEditor",
       "type": "page",
       "layout": "default",
       "style": {
-        "navigationBarTitleText": "设备详情",
-        "navigationStyle": "custom"
+        "navigationBarTitleText": "",
+        "navigationStyle": "custom",
+        "disableScroll": true
       }
     },
     {
-      "path": "pages/equipment/detail/equipTestRecordEditor",
+      "path": "pages/equipment/detail/equipmentDetail",
       "type": "page",
       "layout": "default",
       "style": {
-        "navigationBarTitleText": "",
-        "navigationStyle": "custom",
-        "disableScroll": true
+        "navigationBarTitleText": "设备详情",
+        "navigationStyle": "custom"
       }
     },
     {
@@ -365,6 +330,10 @@
         "navigationStyle": "custom"
       }
     },
+    {
+      "path": "pages/pendingPreparation/list/Item",
+      "type": "page"
+    },
     {
       "path": "pages/pendingPreparation/list/PendingPreparationList",
       "type": "page",
@@ -427,7 +396,21 @@
       }
     },
     {
-      "path": "pages/pendingVerification/preViewReport/HeadView",
+      "path": "pages/pendingVerification/preViewReport/GoBackPopup",
+      "type": "page"
+    },
+    {
+      "path": "pages/pendingVerification/preViewReport/index",
+      "type": "page",
+      "layout": "default",
+      "style": {
+        "navigationBarTitleText": "记录校核",
+        "navigationStyle": "custom",
+        "disableScroll": true
+      }
+    },
+    {
+      "path": "pages/pendingVerification/preViewReport/OperationBtn",
       "type": "page"
     },
     {

+ 0 - 5
src/pages/equipment/detail/equipCheckRecordEditor.vue

@@ -31,12 +31,7 @@ import { ref } from 'vue'
 import SpreadDesigner from '@/components/SpreadDesigner/spreadDesigner.vue'
 import { onLoad } from '@dcloudio/uni-app'
 import {
-  getPressureReportTemplateInfo,
-  getReportTemplateJSONData,
-  saveTaskReportTemplate,
-  saveTaskReportTemplateImages,
   getCheckerEquipmentDetailById,
-  reportUploadApi,
   getDynamicTbVal,
   saveDynamicTbVal,
 } from '@/api/task'

+ 0 - 1
src/pages/home/index.vue

@@ -184,7 +184,6 @@ onMounted(() => {
 
   // 监听网络状态变化
   uni.onNetworkStatusChange(onNetworkStatusChange)
-  console.log('equiptype.......', equipType)
 })
 
 onUnmounted(() => {

+ 19 - 1
src/pages/securityCheck/securityCheckEditor.vue

@@ -15,6 +15,8 @@
       :businessConfig="businessConfig"
       :templateData="templateData"
       :templateBlob="templateBlob"
+      @save="handleSave"
+      @cancel="handleCancel"
     />
   </div>
 </template>
@@ -27,7 +29,7 @@ import { onLoad } from '@dcloudio/uni-app'
 import { getStandardTemplate } from '@/api/index'
 import { buildFileUrl } from '@/utils/index'
 import { createSecurityCheck } from '@/api/boiler/boilerTaskOrderSecurityCheck'
-import { getDynamicTbVal } from '@/api/task'
+import { getDynamicTbVal, saveDynamicTbVal } from '@/api/task'
 
 const businessConfig = ref({
   businessType: 'AQJC',
@@ -54,6 +56,7 @@ onLoad((options: any) => {
   init()
 })
 
+const instId = ref<string>('')
 const init = async () => {
   if (!templateId) {
     return
@@ -74,6 +77,7 @@ const init = async () => {
 
   const dynamicTbValResp = await getDynamicTbVal({ refId })
   const dynamicTb: any = dynamicTbValResp.data
+  instId.value = dynamicTb?.dynamicTbInsRespVO?.id || ''
   for (let i = 0; i < dynamicTb.dynamicTbValRespVOList.length; i++) {
     const item = dynamicTb.dynamicTbValRespVOList[i]
     dataMap[item.colCode] = item.valValue
@@ -122,4 +126,18 @@ const downloadFileAsBase64 = (fileUrl: string): Promise<string> => {
     })
   })
 }
+
+const handleSave = async (data: any) => {
+  const result = await saveDynamicTbVal({ params: data.dataJSON, instId: instId.value })
+  if (result?.code === 0 && result?.data) {
+    uni.showToast({ title: '保存成功', icon: 'success' })
+  } else {
+    const msg = result?.msg || '保存失败'
+    uni.showToast({ title: msg, icon: 'error' })
+  }
+}
+
+const handleCancel = () => {
+  uni.navigateBack()
+}
 </script>

+ 17 - 11
src/pages/sign/index.vue

@@ -351,17 +351,24 @@ const getPreviewData = async () => {
   // orderId 查询服务单,获取 templateId + refId
   let templateId = ''
   let refId = ''
-  if (routeType.value === 'FWD') {
-    const orderReportResp = await getTaskOrderReport({ taskOrderId: orderId.value })
-    const orderReportRespList = orderReportResp.data?.list
-    let orderReport = null
-    orderReportRespList.forEach((item: any) => {
-      if (item.orderType === '1') {
-        orderReport = item
+  if (!routeType.value) {
+    uni.showToast({ title: '必须选择签字文件类型', icon: 'error' })
+    return
+  }
+  switch (routeType.value) {
+    case 'FWD':
+      const orderReportResp = await getTaskOrderReport({ taskOrderId: orderId.value })
+      const orderReportRespList = orderReportResp.data?.list
+      let orderReport = null
+      if (orderReportRespList?.length) {
+        orderReport = orderReportRespList[0]
       }
-    })
-    templateId = orderReport?.templateId
-    refId = orderReport?.acceptOrderId
+      templateId = orderReport?.templateId
+      refId = orderReport?.acceptOrderId
+      break
+    default:
+      uni.showToast({ title: '请选择正确的签字文件类型', icon: 'error' })
+      break
   }
   
   
@@ -391,7 +398,6 @@ const getPreviewData = async () => {
     templateUrl: resData.fileUrl,
   }
 
-  console.log(templateData.value)
   // 获取 template 文件
   const fileUri = resData.fileUrl
   const fileUrl = buildFileUrl(fileUri)

+ 1 - 1
src/utils/signMd5Utils.ts

@@ -39,7 +39,7 @@ export default class signMd5Utils {
     //update-end---author:wangshuai---date:2024-04-16---for:【QQYUN-9005】发送短信加签---
     let requestBody:any = this.sortAsc(jsonObj);
     delete requestBody._t;
-    console.log('sign requestBody:', requestBody);
+    // console.log('sign requestBody:', requestBody);
     return md5(JSON.stringify(requestBody) + signatureSecret).toUpperCase();
   }
   /**