소스 검색

fix:修复bug

Tang 3 년 전
부모
커밋
092bdcda04

+ 1 - 1
src/utils/request.js

@@ -15,7 +15,7 @@ axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
 /**
  * @remard 测试地址
  */
-export const baseURL = 'http://192.168.1.24:5030/'
+export const baseURL = 'http://192.168.1.222:5030/'
 export const BASE_IMG_URL = 'https://file-dev.xyyxt.net'
 const service = axios.create({
   // axios中请求配置有baseURL选项,表示请求URL公共部分

+ 0 - 9
src/views/resource/bankManagement/chapterVolumeManagement/edit/index.vue

@@ -194,7 +194,6 @@
           <el-button @click="backPage">取消</el-button>
           <el-button
             type="primary"
-            :disabled="!noStudent"
             @click="submitIns('listData')"
             :loading="disabledBtn"
             >确定</el-button
@@ -377,18 +376,10 @@ export default {
       ],
       disCheckList: [], //已选转禁用复选列表
       activeLists: [],
-      noStudent:true,
     };
   },
   mounted() {
     this.$modal.loading("正在导入数据,请稍后...");
-    this.$api
-      .gradecheckGoodsChange({ chapterExamId: this.$route.query.id })
-      .then((res) => {
-        if (res.data > 0) {
-          this.noStudent = false;
-        }
-      });
     this.getDict();
   },
   methods: {

+ 22 - 31
src/views/resource/bankManagement/chapterVolumeManagement/index.vue

@@ -203,37 +203,28 @@ export default {
       this.search(2);
     },
     del(v) {
-      this.$api
-        .gradecheckGoodsChange({ chapterExamId: v.chapterExamId })
-        .then((res) => {
-          if (res.data > 0) {
-            this.$message.error("已有学员正在学习该课程,无法删除");
-            return;
-          } else {
-            this.$alert(
-              "确定删除此内容?<br />内容删除后将无法恢复,请慎重考虑",
-              "提示",
-              {
-                dangerouslyUseHTMLString: true,
-              }
-            )
-              .then(() => {
-                var data = {
-                  chapterExamId: v.chapterExamId,
-                  status: -1,
-                };
-                this.$api.editbankchapter(data).then((res) => {
-                  this.$message.success("删除成功");
-                  this.search();
-                });
-              })
-              .catch(() => {
-                this.$message({
-                  type: "info",
-                  message: "已取消删除",
-                });
-              });
-          }
+      this.$alert(
+        "确定删除此内容?<br />内容删除后将无法恢复,请慎重考虑",
+        "提示",
+        {
+          dangerouslyUseHTMLString: true,
+        }
+      )
+        .then(() => {
+          var data = {
+            chapterExamId: v.chapterExamId,
+            status: -1,
+          };
+          this.$api.editbankchapter(data).then((res) => {
+            this.$message.success("删除成功");
+            this.search();
+          });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消删除",
+          });
         });
     },
     addClick(v, int) {