fix:修改同步学习记录选项

This commit is contained in:
lixg
2022-12-04 14:16:13 +08:00
parent 7e13091088
commit f9ffe051eb
4 changed files with 1154 additions and 1280 deletions

View File

@@ -2,10 +2,11 @@
* @Author: lixg lixg@dongwu-inc.com * @Author: lixg lixg@dongwu-inc.com
* @Date: 2022-11-21 14:32:52 * @Date: 2022-11-21 14:32:52
* @LastEditors: lixg lixg@dongwu-inc.com * @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2022-12-04 11:13:37 * @LastEditTime: 2022-12-04 13:27:07
* @FilePath: /fe-manage/src/api/config.js * @FilePath: /fe-manage/src/api/config.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
import { message } from "ant-design-vue";
import axios from "axios"; import axios from "axios";
// import { getCookie } from '../api/method' // import { getCookie } from '../api/method'
// const Qs = require("qs"); // const Qs = require("qs");
@@ -23,6 +24,7 @@ const http = axios.create({
http.interceptors.request.use( http.interceptors.request.use(
(config) => { (config) => {
// console.log('config', config)
// const token = localStorage.getItem("token"); // const token = localStorage.getItem("token");
// // const token = getCookie('token') // // const token = getCookie('token')
// // console.log('token', token) // // console.log('token', token)
@@ -61,6 +63,10 @@ http.interceptors.response.use(
return response; return response;
}, },
function (error) { function (error) {
if (error.message == "timeout of 1ms exceeded") {
message.destroy()
message.error("请求超时")
}
console.log("api error %o", error); console.log("api error %o", error);
return Promise.reject(error); return Promise.reject(error);
} }

File diff suppressed because it is too large Load Diff

View File

@@ -171,7 +171,19 @@
<div class="inname">同步学习记录</div> <div class="inname">同步学习记录</div>
</div> </div>
<div class="in"> <div class="in">
<a-switch <a-checkbox
v-model:checked="courseSyncFlag"
:disabled="viewDetail ? true : false"
><span
style="
width: 100%;
color: rgba(109, 117, 132, 1);
font-size: 14px;
"
>同步课程学习记录如学员在课程库中拥有课程的学习记录自动免修该课程</span
></a-checkbox
>
<!-- <a-switch
v-model:checked="projectInfo.courseSyncFlag" v-model:checked="projectInfo.courseSyncFlag"
:checkedValue="1" :checkedValue="1"
:unCheckedValue="0" :unCheckedValue="0"
@@ -184,7 +196,7 @@
" "
>同步课程学习记录如学员在课程库中拥有课程的学习记录自动免修该课程</span >同步课程学习记录如学员在课程库中拥有课程的学习记录自动免修该课程</span
></a-switch ></a-switch
> > -->
</div> </div>
</div> </div>
<div class="name"> <div class="name">
@@ -317,6 +329,7 @@ export default {
keyWord: "", keyWord: "",
}, },
classifyList5: [], classifyList5: [],
courseSyncFlag: false,
}); });
onMounted(() => { onMounted(() => {
@@ -349,6 +362,9 @@ export default {
state.projectInfo.endTime, state.projectInfo.endTime,
]; ];
state.projectInfo.parentName = routers.query.parentName; state.projectInfo.parentName = routers.query.parentName;
state.courseSyncFlag = state.projectInfo.courseSyncFlag
? true
: false;
}); });
} }
@@ -432,6 +448,7 @@ export default {
return; return;
} }
state.projectInfo.type = 3; state.projectInfo.type = 3;
state.projectInfo.courseSyncFlag = state.courseSyncFlag ? 1 : 0;
api.createProject(state.projectInfo).then(() => { api.createProject(state.projectInfo).then(() => {
message.destroy(); message.destroy();
message.success("编辑成功"); message.success("编辑成功");

File diff suppressed because it is too large Load Diff