From 425c32539741028b41fce0a6dc0833b293c76e33 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 05 三月 2025 10:52:59 +0800
Subject: [PATCH] 1.检测项目参数导入无关联模版时,页面无响应。 2.将以前接口返回201判断删掉

---
 src/views/performance/manHour/workTimeManagement.vue              |    1 -
 src/views/standard/model/index.vue                                |    5 -----
 src/views/system/user/index.vue                                   |    8 --------
 src/views/standard/standardLibrary/index.vue                      |    1 -
 src/views/business/materialOrder/customsInspection.vue            |    1 -
 src/views/performance/class/index.vue                             |    5 +++--
 src/views/structural/capabilityAndLaboratory/capability/index.vue |   10 +++++-----
 src/components/Table/value-table.vue                              |   11 -----------
 8 files changed, 8 insertions(+), 34 deletions(-)

diff --git a/src/components/Table/value-table.vue b/src/components/Table/value-table.vue
index 4b81343..5269c88 100644
--- a/src/components/Table/value-table.vue
+++ b/src/components/Table/value-table.vue
@@ -699,10 +699,6 @@
           }
         )
         .then((res) => {
-          if (res.code === 201) {
-            this.loading = false;
-            return;
-          }
           this.total = res.data.body.total;
           this.tableHead = res.data.head;
           this.tableData = res.data.records;
@@ -947,9 +943,6 @@
                   id: row.id,
                 })
                 .then((res) => {
-                  if (res.code === 201) {
-                    return;
-                  }
                   this.$message.success("鍒犻櫎鎴愬姛");
                   this.selectList("page");
                   this.$emit("delete");
@@ -1024,10 +1017,6 @@
           },
         })
         .then((res) => {
-          if (res.code === 201) {
-            this.upLoad = false;
-            return;
-          }
           this.$message.success("淇敼鎴愬姛");
           this.upDia = false;
           this.selectList("page");
diff --git a/src/views/business/materialOrder/customsInspection.vue b/src/views/business/materialOrder/customsInspection.vue
index b8c03af..9a6a64c 100644
--- a/src/views/business/materialOrder/customsInspection.vue
+++ b/src/views/business/materialOrder/customsInspection.vue
@@ -1021,7 +1021,6 @@
         }),
       }).then(res => {
         this.noNeedCheckLoad = false
-        if (res.code == 201) return
         this.noNeedCheckDia = false
         this.$message.success('宸叉彁浜�')
         this.closeOpenPage()
diff --git a/src/views/performance/class/index.vue b/src/views/performance/class/index.vue
index 31ac64c..4a318ef 100644
--- a/src/views/performance/class/index.vue
+++ b/src/views/performance/class/index.vue
@@ -530,7 +530,6 @@
         laboratory: this.query.laboratory,
       }).then((res) => {
         this.pageLoading = false;
-        if (res.code == 201) return;
         this.total = res.data.page.total;
         this.list = res.data.page.records.map((item) => {
           for (let key in item.monthlyAttendance) {
@@ -551,7 +550,9 @@
           };
           this.weeks.push(obj);
         });
-      });
+      }).catch(() => {
+        this.pageLoading = false;
+      })
     },
     initYear() {
       this.pageLoading = true;
diff --git a/src/views/performance/manHour/workTimeManagement.vue b/src/views/performance/manHour/workTimeManagement.vue
index 2f10f73..9e7a9c0 100644
--- a/src/views/performance/manHour/workTimeManagement.vue
+++ b/src/views/performance/manHour/workTimeManagement.vue
@@ -637,7 +637,6 @@
       })
         .then(() => {
           deleteAuxiliaryWorkingHoursDay({ id: row.id }).then((res) => {
-            if (res.code == 201) return;
             this.$message.success("鍒犻櫎鎴愬姛");
             this.refreshTable("page");
           });
diff --git a/src/views/standard/model/index.vue b/src/views/standard/model/index.vue
index ab46ae4..418c55b 100644
--- a/src/views/standard/model/index.vue
+++ b/src/views/standard/model/index.vue
@@ -226,7 +226,6 @@
               delete params.id;
               addStandardTemplate(params)
                 .then((res) => {
-                  if (res.code == 201) return;
                   this.isShowCopyTem = false;
                   this.submitCopyInfoLoading = false;
                   this.$message.success("鏂板鎴愬姛");
@@ -241,7 +240,6 @@
               params.thing = this.copyForm.thing ? this.copyForm.thing : "";
               upStandardTemplate(params)
                 .then((res) => {
-                  if (res.code == 201) return;
                   this.isShowCopyTem = false;
                   this.submitCopyInfoLoading = false;
                   this.$message.success("淇敼鎴愬姛");
@@ -255,7 +253,6 @@
             case "澶嶅埗妯$増":
               copyStandardTemplate(params)
                 .then((res) => {
-                  if (res.code == 201) return;
                   this.isShowCopyTem = false;
                   this.submitCopyInfoLoading = false;
                   this.$message.success("澶嶅埗鎴愬姛");
@@ -286,7 +283,6 @@
       })
         .then(() => {
           delStandardTemplate({ id: row.id }).then((res) => {
-            if (res.code == 201) return;
             this.$message.success("鍒犻櫎鎴愬姛");
             this.refreshTable("page");
           });
@@ -360,7 +356,6 @@
         thing: JSON.stringify(data),
         name: luckysheet.getWorkbookName(["name"]),
       }).then((res) => {
-        if (res.code == 201) return;
         this.loading = false;
         this.$message.success("宸蹭繚瀛�");
         this.isShow = false;
diff --git a/src/views/standard/standardLibrary/index.vue b/src/views/standard/standardLibrary/index.vue
index 713c062..dab88fd 100644
--- a/src/views/standard/standardLibrary/index.vue
+++ b/src/views/standard/standardLibrary/index.vue
@@ -778,7 +778,6 @@
           }
           this.selectTree = data2.replace(" - ", "");
           delStandardTree({ tree: this.selectTree }).then((res) => {
-            if (res.code == 201) return;
             this.$message.success("宸插垹闄�");
             let arr = this.selectTree.split(" - ");
             this.deleteStandard(this.list, arr[arr.length - 1]);
diff --git a/src/views/structural/capabilityAndLaboratory/capability/index.vue b/src/views/structural/capabilityAndLaboratory/capability/index.vue
index 713b339..96083ab 100644
--- a/src/views/structural/capabilityAndLaboratory/capability/index.vue
+++ b/src/views/structural/capabilityAndLaboratory/capability/index.vue
@@ -13,7 +13,7 @@
                      style="display: inline;margin-right: 8px"
                      :action="uploadAction1"
                      :before-upload="beforeUpload1" :headers="token" :on-error="onError1"
-                     :on-success="handleSuccessUp" :show-file-list="false" accept='.doc,.docx,.xls,.xlsx'>
+                     :on-success="handleSuccessUp1" :show-file-list="false" accept='.doc,.docx,.xls,.xlsx'>
             <el-button size="small" type="primary">瀵煎叆</el-button>
           </el-upload>
           <el-button size="small" type="primary" v-if="radio === 1" @click="uploadDia = true">瀵煎叆</el-button>
@@ -430,10 +430,10 @@
         return true;
       }
     },
-    handleSuccessUp (response, file, fileList) {
-      this.$refs.upload.clearFiles()
-      if (response.code === 201) {
-        this.$message.error(response.message)
+    handleSuccessUp1 (response, file, fileList) {
+      this.$refs.upload1.clearFiles()
+      if (response.code !== 200) {
+        this.$message.error(response.msg)
         return
       }
       this.$message.success('涓婁紶鎴愬姛')
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index 0d8450a..9bbfd25 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -448,10 +448,6 @@
       }
       this.addLoad = true
       addDepartment(this.addOb).then(res => {
-        if (res.code === 201) {
-          this.addLoad = false
-          return
-        }
         this.$message.success('娣诲姞鎴愬姛')
         this.addDia = false
         this.getList()
@@ -656,10 +652,6 @@
         person: this.multipleSelection,
         roleId: this.componentData.entity.roleId
       }).then(res => {
-        if (res.code === 201) {
-          this.addLoad = false
-          return
-        }
         this.$message.success('鎿嶄綔鎴愬姛')
         this.multipleSelection = []
         this.$refs.personTable.clearSelection()

--
Gitblit v1.9.3