Kaynağa Gözat

移出知识库

xsh_1997 1 hafta önce
ebeveyn
işleme
495e171241

+ 1 - 0
ruoyi-ui/src/lang/bo/breedingStd.js

@@ -44,6 +44,7 @@ export default {
44 44
     del: "སུབ་པ།",
45 45
     uploadingFile: "ཡིག་ཆ་སྤྲོད་བཞིན་པ།…",
46 46
     syncKbLoading: "ཤེས་མཛོད་དུ་མཉམ་འགྲོས་བཞིན་པ།…",
47
+    removeKbLoading: "ཤེས་མཛོད་ནས་ཕྱིར་འདོན་བཞིན་པ།…",
47 48
     uploadingImg: "པར་རིས་སྤྲོད་བཞིན་པ།…",
48 49
     errBodyFmt: "ཡིག་ཆའི་རྣམ་གཞག་མི་འགྲིག",
49 50
     errComma: "མིང་ལ་ཉིས་སྡེར་མི་ཆོག",

+ 1 - 0
ruoyi-ui/src/lang/bo/techService.js

@@ -17,6 +17,7 @@ export default {
17 17
     pickFile: "ཡིག་ཆ་འདེམ",
18 18
     uploadingFile: "ཡིག་ཆ་འབེབ་བཞིན...",
19 19
     syncKbLoading: "ཤེས་བྱིས་མཛོད་མཉམ་སྒྲིག་བཞིན...",
20
+    removeKbLoading: "ཤེས་བྱིས་མཛོད་ནས་ཕྱིར་འདོན་བཞིན...",
20 21
     errPhotoFmt: "jpg/jpeg/png རྐྱང་།",
21 22
     errPhotoMb: "10MB ལས་མི་འགྲོ།",
22 23
     errVideoFmt: "mp4 རྐྱང་།",

+ 1 - 0
ruoyi-ui/src/lang/zh/breedingStd.js

@@ -44,6 +44,7 @@ export default {
44 44
     del: "删除",
45 45
     uploadingFile: "正在上传文件,请稍候...",
46 46
     syncKbLoading: "正在同步知识库,请稍候...",
47
+    removeKbLoading: "正在移出知识库,请稍候...",
47 48
     uploadingImg: "正在上传图片,请稍候...",
48 49
     errBodyFmt: "文件格式不正确,请上传规定格式的正文附件",
49 50
     errComma: "文件名不能包含英文逗号",

+ 1 - 0
ruoyi-ui/src/lang/zh/techService.js

@@ -17,6 +17,7 @@ export default {
17 17
     pickFile: "选取文件",
18 18
     uploadingFile: "正在上传文件,请稍候...",
19 19
     syncKbLoading: "正在同步知识库,请稍候...",
20
+    removeKbLoading: "正在移出知识库,请稍候...",
20 21
     errPhotoFmt: "仅支持 jpg、jpeg、png 格式",
21 22
     errPhotoMb: "图片大小不能超过 10 MB",
22 23
     errVideoFmt: "仅支持 mp4 格式",

+ 16 - 0
ruoyi-ui/src/mixins/breedingStdLocaleMixin.js

@@ -46,6 +46,22 @@ export default {
46 46
             this.$modal.closeLoading()
47 47
           }
48 48
         })
49
+    },
50
+    /** 确认后执行移出知识库,带全局 loading */
51
+    runRemoveKbAfterConfirm(confirmMessage, removeFn) {
52
+      let removeLoading = false
53
+      return this.$modal
54
+        .confirm(confirmMessage)
55
+        .then(() => {
56
+          removeLoading = true
57
+          this.$modal.loading(this.$t("breedingStd.common.removeKbLoading"))
58
+          return removeFn()
59
+        })
60
+        .finally(() => {
61
+          if (removeLoading) {
62
+            this.$modal.closeLoading()
63
+          }
64
+        })
49 65
     }
50 66
   }
51 67
 }

+ 16 - 0
ruoyi-ui/src/mixins/techServiceLocaleMixin.js

@@ -76,6 +76,22 @@ export default {
76 76
           }
77 77
         })
78 78
     },
79
+    /** 确认后执行移出知识库,带全局 loading */
80
+    runRemoveKbAfterConfirm(confirmMessage, removeFn) {
81
+      let removeLoading = false
82
+      return this.$modal
83
+        .confirm(confirmMessage)
84
+        .then(() => {
85
+          removeLoading = true
86
+          this.$modal.loading(this.tsCommon("removeKbLoading"))
87
+          return removeFn()
88
+        })
89
+        .finally(() => {
90
+          if (removeLoading) {
91
+            this.$modal.closeLoading()
92
+          }
93
+        })
94
+    },
79 95
     knowledgeTopicText(topic) {
80 96
       if (topic >= 1 && topic <= 5) {
81 97
         return this.$t(`techService.knowledge.topic${topic}`)

+ 1 - 3
ruoyi-ui/src/views/breedingStandards/breedingManage/index.vue

@@ -543,9 +543,7 @@ export default {
543 543
         .catch(() => {})
544 544
     },
545 545
     handleRemoveKb(row) {
546
-      this.$modal
547
-        .confirm(this.stdT("confirmRemoveKb"))
548
-        .then(() => removeKbBreedingStandard(row.id))
546
+      this.runRemoveKbAfterConfirm(this.stdT("confirmRemoveKb"), () => removeKbBreedingStandard(row.id))
549 547
         .then(() => {
550 548
           this.$modal.msgSuccess(this.$t("breedingStd.common.msgOpOk"))
551 549
           this.getList()

+ 1 - 3
ruoyi-ui/src/views/breedingStandards/diseaseTreatment/drugIncompatibility/index.vue

@@ -378,9 +378,7 @@ export default {
378 378
         .catch(() => {})
379 379
     },
380 380
     handleRemoveKb(row) {
381
-      this.$modal
382
-        .confirm(this.stdT("confirmRemoveKb"))
383
-        .then(() => removeKbDrugIncompatibilityStandard(row.id))
381
+      this.runRemoveKbAfterConfirm(this.stdT("confirmRemoveKb"), () => removeKbDrugIncompatibilityStandard(row.id))
384 382
         .then(() => {
385 383
           this.$modal.msgSuccess(this.stdT("msgOpOk"))
386 384
           this.getList()

+ 1 - 3
ruoyi-ui/src/views/breedingStandards/diseaseTreatment/epidemicTreatment/index.vue

@@ -537,9 +537,7 @@ export default {
537 537
         .catch(() => {})
538 538
     },
539 539
     handleRemoveKb(row) {
540
-      this.$modal
541
-        .confirm(this.stdT("confirmRemoveKb"))
542
-        .then(() => removeKbEpidemicTreatmentStandard(row.id))
540
+      this.runRemoveKbAfterConfirm(this.stdT("confirmRemoveKb"), () => removeKbEpidemicTreatmentStandard(row.id))
543 541
         .then(() => {
544 542
           this.$modal.msgSuccess(this.$t("breedingStd.common.msgOpOk"))
545 543
           this.getList()

+ 1 - 3
ruoyi-ui/src/views/breedingStandards/diseaseTreatment/withdrawalPeriod/index.vue

@@ -393,9 +393,7 @@ export default {
393 393
         .catch(() => {})
394 394
     },
395 395
     handleRemoveKb(row) {
396
-      this.$modal
397
-        .confirm(this.stdT("confirmRemoveKb"))
398
-        .then(() => removeKbWithdrawalPeriodStandard(row.id))
396
+      this.runRemoveKbAfterConfirm(this.stdT("confirmRemoveKb"), () => removeKbWithdrawalPeriodStandard(row.id))
399 397
         .then(() => {
400 398
           this.$modal.msgSuccess(this.stdT("msgOpOk"))
401 399
           this.getList()

+ 1 - 3
ruoyi-ui/src/views/breedingStandards/equipmentOperation/index.vue

@@ -540,9 +540,7 @@ export default {
540 540
         .catch(() => {})
541 541
     },
542 542
     handleRemoveKb(row) {
543
-      this.$modal
544
-        .confirm(this.stdT("confirmRemoveKb"))
545
-        .then(() => removeKbEquipmentWorkStandard(row.id))
543
+      this.runRemoveKbAfterConfirm(this.stdT("confirmRemoveKb"), () => removeKbEquipmentWorkStandard(row.id))
546 544
         .then(() => {
547 545
           this.$modal.msgSuccess(this.$t("breedingStd.common.msgOpOk"))
548 546
           this.getList()

+ 1 - 3
ruoyi-ui/src/views/breedingStandards/feeding/index.vue

@@ -538,9 +538,7 @@ export default {
538 538
         .catch(() => {})
539 539
     },
540 540
     handleRemoveKb(row) {
541
-      this.$modal
542
-        .confirm(this.stdT("confirmRemoveKb"))
543
-        .then(() => removeKbFeedingStandard(row.id))
541
+      this.runRemoveKbAfterConfirm(this.stdT("confirmRemoveKb"), () => removeKbFeedingStandard(row.id))
544 542
         .then(() => {
545 543
           this.$modal.msgSuccess(this.$t("breedingStd.common.msgOpOk"))
546 544
           this.getList()

+ 1 - 3
ruoyi-ui/src/views/breedingStandards/growthOutbound/index.vue

@@ -538,9 +538,7 @@ export default {
538 538
         .catch(() => {})
539 539
     },
540 540
     handleRemoveKb(row) {
541
-      this.$modal
542
-        .confirm(this.stdT("confirmRemoveKb"))
543
-        .then(() => removeKbGrowthSlaughterStandard(row.id))
541
+      this.runRemoveKbAfterConfirm(this.stdT("confirmRemoveKb"), () => removeKbGrowthSlaughterStandard(row.id))
544 542
         .then(() => {
545 543
           this.$modal.msgSuccess(this.$t("breedingStd.common.msgOpOk"))
546 544
           this.getList()

+ 1 - 3
ruoyi-ui/src/views/techService/knowledge/index.vue

@@ -380,9 +380,7 @@ export default {
380 380
         .catch(() => {})
381 381
     },
382 382
     handleRemoveKb(row) {
383
-      this.$modal
384
-        .confirm(this.tsT("confirmRemoveKb"))
385
-        .then(() => removeKbKnowledge(row.id))
383
+      this.runRemoveKbAfterConfirm(this.tsT("confirmRemoveKb"), () => removeKbKnowledge(row.id))
386 384
         .then(() => {
387 385
           this.$modal.msgSuccess(this.tsCommon("msgRemoveKbOk"))
388 386
           this.getList()