Răsfoiți Sursa

设备检定导入对话框完成后增加刷新列表

cyy 1 lună în urmă
părinte
comite
e98436d9ce
1 a modificat fișierele cu 21 adăugiri și 2 ștergeri
  1. 21 2
      src/views/component/device/smallEquipmentImport.vue

+ 21 - 2
src/views/component/device/smallEquipmentImport.vue

@@ -327,10 +327,16 @@ export default {
               }
             }
             if (data.yuan_she_bei_bian) {
-              data.yuan_she_bei_bian = String(data.yuan_she_bei_bian).replace(/\s/g, '')
+              data.yuan_she_bei_bian = String(data.yuan_she_bei_bian).replace(
+                /\s/g,
+                ''
+              )
             }
             if (data.she_bei_ming_chen) {
-              data.she_bei_ming_chen = String(data.she_bei_ming_chen).replace(/\s/g, '')
+              data.she_bei_ming_chen = String(data.she_bei_ming_chen).replace(
+                /\s/g,
+                ''
+              )
             }
             list.push(data)
           })
@@ -430,10 +436,23 @@ export default {
       }
       this.handleImportData(() => {
         this.closeDialog()
+        this.refreshList()
       }, this.paramForm.xlsxList)
     },
+    refreshList() {
+      const template = (window.JTemplate && window.JTemplate.$template) || null
+      if (template && typeof template.search === 'function') {
+        template.search()
+      }
+    },
     closeDialog() {
+      this.dialogVisible = false
       this.resetUpload()
+      const template = (window.JTemplate && window.JTemplate.$template) || null
+      if (template && 'dialogTemplate' in template) {
+        template.dialogTemplate = null
+        template.dialogTemplateAtts = {}
+      }
       this.$emit('close', false)
     },
     getField(type = 'export') {