Browse Source

no message

linwenxin 1 year ago
parent
commit
1c2588caeb
1 changed files with 29 additions and 0 deletions
  1. 29 0
      src/views/workOrder/penaltyWorkOrder/index.vue

+ 29 - 0
src/views/workOrder/penaltyWorkOrder/index.vue

@@ -153,7 +153,36 @@ export default {
       ]
     },
   },
+  mounted() {
+    this.initFun()
+  },
   methods: {
+    initFun() {
+      if (this.pageType == "detail") {
+        this.$refs.tabPage.addTab({
+          // 对应显示的模块
+          activeKey: "detail",
+          // 唯一标识
+          key: "detail",
+          // 页签名称
+          label: "详情",
+          // 打开时事件
+          triggerEvent: () => {
+            this.handleClose()
+            this.$nextTick(() => {
+              orderPunishDetail({ id: this.pageCode }).then(res => {
+                Object.assign(this.formData, res.data, {
+                  fileUrls: res.data.fileUrls ? res.data.fileUrls.split(",").map(url => ({ url })) : []
+                })
+                this.openForm()
+              })
+            })
+          },
+          // 关闭时事件
+          closeEvent: () => { }
+        })
+      }
+    },
     // 列表请求函数
     getList: orderPunishList,
     // 列表导出函数