lsc 7 mēneši atpakaļ
vecāks
revīzija
4566fcde2b

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.cd554cab8dba7c271c536fee3140ceff.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.571c38d63f24b1ae9e16.js></script><script type=text/javascript src=./static/js/vendor.ee476e38463461edca63.js></script><script type=text/javascript src=./static/js/app.f05d8560aef791de2d1b.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.8a3e782efe275af5892a82795f699346.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.571c38d63f24b1ae9e16.js></script><script type=text/javascript src=./static/js/vendor.ee476e38463461edca63.js></script><script type=text/javascript src=./static/js/app.b603e6a0010c2556a915.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/css/app.8a3e782efe275af5892a82795f699346.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/css/app.8a3e782efe275af5892a82795f699346.css.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/app.b603e6a0010c2556a915.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/app.b603e6a0010c2556a915.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/manifest.571c38d63f24b1ae9e16.js.map


+ 40 - 27
src/common/axios.config.js

@@ -5,6 +5,10 @@ axios.defaults.timeout = 600000   //响应时间
 axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8';        //配置请求头
 axios.defaults.baseURL = process.env.NODE_HOST;   //配置接口地址
 console.log(process.env)
+
+const CancelToken = axios.CancelToken;
+let cancel; // 用于存储取消请求的方法
+
 //POST传参序列化(添加请求拦截器)
 axios.interceptors.request.use((config) => {
     //在发送请求之前做某件事
@@ -22,32 +26,33 @@ axios.interceptors.request.use((config) => {
     // } else if (config.method === 'post') {
     //     config.data = qs.stringify(config.data)//序列化post 参数
     // }
-    if(config.url === 'https://gpt.cocorobo.cn/search_image' || config.url === 'https://gpt.cocorobo.cn/chat' || config.url === 'https://gpt4.cocorobo.cn/create_free_assistants' || config.url === 'https://gpt4.cocorobo.cn/assistants_completion_response') {
+    if (config.url === 'https://gpt.cocorobo.cn/search_image' || config.url === 'https://gpt.cocorobo.cn/chat' || config.url === 'https://gpt4.cocorobo.cn/create_free_assistants' || config.url === 'https://gpt4.cocorobo.cn/assistants_completion_response') {
         config.data = config.data//序列化post 参数
-    }else if(config.url.indexOf('https://gpt4.cocorobo.cn/')!=-1 || config.url.indexOf('https://claude3.cocorobo.cn/')!=-1){
-			config.headers = {
-				'Content-Type': 'application/json',
-		}
-		}else if (config.data && config.data[0].post == '1' && config.method === 'post') {
+    } else if (config.url.indexOf('https://gpt4.cocorobo.cn/') != -1 || config.url.indexOf('https://claude3.cocorobo.cn/') != -1) {
+        config.headers = {
+            'Content-Type': 'application/json',
+        }
+    } else if (config.data && config.data[0].post == '1' && config.method === 'post') {
         config.data = 'mode=' + (Object.values(config.data[0]).join(','))//序列化post 参数
     } else if (config.method === 'post') {
 
         const encoded = {};
         for (const key in config.data[0]) {
             if (Object.hasOwnProperty.call(config.data[0], key)) {
-            encoded[key] = encodeURIComponent(config.data[0][key]);
+                encoded[key] = encodeURIComponent(config.data[0][key]);
             }
         }
         config.data = qs.stringify([encoded]) //序列化post 参数
-    }else {
+    } else {
         const encoded = {};
         for (const key in config.data) {
             if (Object.hasOwnProperty.call(config.data, key)) {
-            encoded[key] = encodeURIComponent(config.data[key]);
+                encoded[key] = encodeURIComponent(config.data[key]);
             }
         }
         config.data = encoded
     }
+
     return config;
 }, (error) => {
     console.log('错误的传参')
@@ -64,15 +69,17 @@ axios.interceptors.response.use((res) => {
     }
     return res;
 }, (error) => {
-    if (error.response.data.status == '401') {    //如果token 过期 则跳转到登录页面
+    if (axios.isCancel(error)) {
+        console.log('请求已取消', error.message);
+    } else if (error.response.data.status == '401') {    //如果token 过期 则跳转到登录页面
         this.$router.push('/login');
     }
     return Promise.reject(error);
 });
 //返回一个Promise(发送post请求)
-function post(url, params) {
+function post(url, params, source) {
     return new Promise((resolve, reject) => {
-        axios.post(url, params)
+        axios.post(url, params, source ? { cancelToken: source.token } : '')
             .then(response => {
                 resolve(response);
             }, err => {
@@ -85,25 +92,26 @@ function post(url, params) {
 }
 
 //返回一个Promise(发送put请求)
-function put(url, params) {
-	return new Promise((resolve, reject) => {
-			axios.put(url, params)
-					.then(response => {
-							resolve(response);
-					}, err => {
-							reject(err);
-					})
-					.catch((error) => {
-							reject(error)
-					})
-	})
+function put(url, params, source) {
+    return new Promise((resolve, reject) => {
+        axios.put(url, params, source ? { cancelToken: source.token } : '')
+            .then(response => {
+                resolve(response);
+            }, err => {
+                reject(err);
+            })
+            .catch((error) => {
+                reject(error)
+            })
+    })
 }
 
 
 ////返回一个Promise(发送get请求)
-function get(url, param) {
+function get(url, param, source) {
     return new Promise((resolve, reject) => {
-        axios.get(url, { params: param })
+        let cancelToken = source ? source.token : ''
+        axios.get(url, { params: param, cancelToken  })
             .then(response => {
                 resolve(response)
             }, err => {
@@ -117,5 +125,10 @@ function get(url, param) {
 export default {
     get,
     post,
-		put,
+    put,
+    setCancelSource: () => {
+        // 每次创建新的请求时,可以调用此方法以创建新的取消令牌
+        cancel = CancelToken.source();
+        return cancel;
+    }
 }

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 659 - 586
src/components/pages/aiAddCourse/addCourse.vue


+ 1 - 1
src/components/pages/data.vue

@@ -387,7 +387,7 @@ export default {
           var arr = str.split(",");
           for (var k = 0; k < cBox.length; k++) {
             for (var i = 0; i < arr.length; i++) {
-              if (cBox[k].id == arr[i]) {
+              if (cBox[k].id == arr[i] && cBox[k].parentid == '6') {
                 if (this.ccName == "") {
                   this.ccName = cBox[k].name;
                 } else {

+ 1 - 1
src/components/pages/test/add/setInfo/index.vue

@@ -370,7 +370,7 @@ export default {
             this.ajax
                 .get(this.$store.state.api + "selectTeacherOfficeBySchool", params)
                 .then((res) => {
-                    this.classJuri = res.data[0];
+                    this.classJuri = res.data[0].filter((item) => {return item.parentid == '6'});
                 })
                 .catch((err) => {
                     this.isLoading = false;

+ 6 - 4
src/components/pages/test/aggregate/index.vue

@@ -182,10 +182,12 @@ export default {
           let dataCopy = [];
 
           data.forEach(e => {
-            let a = {};
-            a.value = e.name;
-            a.text = e.name;
-            dataCopy.push(a);
+            if(e.parentid == '6'){
+              let a = {};
+              a.value = e.name;
+              a.text = e.name;
+              dataCopy.push(a);
+            }
           });
 
           this.TeachingOptions = dataCopy;

+ 3 - 1
src/components/pages/test/check/index.vue

@@ -1057,7 +1057,9 @@ export default {
           .get(this.$store.state.api + "selectTeacherOfficeBySchool", params)
           .then((res) => {
             console.log(res.data);
-              this.TeachingOptions = res.data[0];
+              this.TeachingOptions = res.data[0].filter(item=>{
+                return item.parentid == '6'
+              });
               // console.log('this.TeachingOptions',this.TeachingOptions);
           })
           .catch((err) => {

+ 12 - 8
src/components/pages/test/examine/conpoments/personPage.vue

@@ -548,16 +548,20 @@ export default {
           let dataCopy = [];
 
           data.forEach(e => {
-            let a = {};
-            a.value = e.name;
-            a.text = e.name;
-            dataCopy.push(a);
+            if(e.parentid == '6'){
+              let a = {};
+              a.value = e.name;
+              a.text = e.name;
+              dataCopy.push(a);
+            }
           });
           data.forEach(e => {
-            let a = {};
-            a.id = e.id;
-            a.name = e.name;
-            this.TeaList.push(a);
+            if(e.parentid == '6'){
+              let a = {};
+              a.id = e.id;
+              a.name = e.name;
+              this.TeaList.push(a);
+            }
           });
 
           this.TeachingOptions = dataCopy;

+ 6 - 4
src/components/pages/test/examine/conpoments/targetPage.vue

@@ -1372,10 +1372,12 @@ export default {
           let dataCopy = [];
 
           data.forEach(e => {
-            let a = {};
-            a.value = e.name;
-            a.text = e.name;
-            dataCopy.push(a);
+            if(e.parentid == '6'){
+              let a = {};
+              a.value = e.name;
+              a.text = e.name;
+              dataCopy.push(a);
+            }
           });
 
           this.TeachingOptions = dataCopy;

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels