feat:增加学习路径基本信息编辑

This commit is contained in:
lixg
2022-12-08 20:31:45 +08:00
parent 3bcb5e3efe
commit a748ae9ad3
3 changed files with 70 additions and 10 deletions

View File

@@ -2,7 +2,7 @@
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2022-11-04 22:45:31
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2022-11-30 10:39:27
* @LastEditTime: 2022-12-08 20:20:26
* @FilePath: /fe-manage/src/api/index1.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
@@ -80,6 +80,9 @@ export const delStudent = (obj) =>
// 获取学员路径图进度明细
export const stuProgress = (obj) =>
http.post("/admin/router/studentProcess", obj);
//编辑学习路径基本信息
export const editLearnInfo = (obj) => http.post('/admin/router/editInfo', obj)
//项目基础信息-----------------------------------
//项目积分榜单

View File

@@ -4029,7 +4029,7 @@ export default defineComponent({
number: "studentId",
department: "deptName",
postion: "jobName",
band: "userAutograph",
band: "bandDesc",
status: "applyStatus",
join: "source",
signstatus: "signStatus",

View File

@@ -689,7 +689,7 @@
</div>
<div v-show="twobtnn" class="twobtn">
<div class="btnone" @click="closebtn">取消</div>
<div class="btntwo" @click="closebtn">确定</div>
<div class="btntwo" @click="editLearnInfo">确定</div>
</div>
</div>
<div class="onemain clearfix">
@@ -719,6 +719,7 @@
:controls="false"
:autofocus="true"
:min="0"
:precision="0"
/>
<span>-</span
><span style="color: #4ea6ff" v-show="number">{{
@@ -730,11 +731,17 @@
:controls="false"
:autofocus="true"
:min="0"
:precision="0"
/>
<span>关内容</span>
</div>
</div>
<div class="checkcon" style="margin-top: 20px">
<a-checkbox
class="in"
:disabled="number"
v-model:checked="studySelect"
></a-checkbox>
<!-- <input
type="checkbox"
name="cb1"
@@ -755,6 +762,7 @@
:controls="false"
:autofocus="true"
:min="0"
:precision="0"
/>
<span>-</span
><span style="color: #4ea6ff" v-show="number">{{
@@ -766,6 +774,7 @@
:controls="false"
:autofocus="true"
:min="0"
:precision="0"
/>
<span>关内容</span>
</div>
@@ -1449,6 +1458,13 @@ export default {
codevisible: false, //二维码是否显示
codeInfo: null, //二维码内容
previewSelect: 0,
studySelect: 0,
previewStartNum: 0,
previewEndNum: 0,
studyStartNum: 0,
studyEndNum: 0,
});
const levelList = reactive({
@@ -1481,11 +1497,6 @@ export default {
name: "关卡二xx",
},
],
previewStartNum: 0,
previewEndNum: 0,
studyStartNum: 0,
studyEndNum: 0,
});
const tableDataFunc = () => {
@@ -1647,6 +1658,7 @@ export default {
state.twobtn = true;
state.number = true;
state.inputbox = false;
myGetRouterDetail();
};
const showCopyModal = () => {
state.copyModal = true;
@@ -2037,6 +2049,27 @@ export default {
name: data[i].name,
});
}
//获取设置信息
if (res.data.code === 200) {
//previewSetting studySetting
state.previewSelect = res.data.data.routerInfo.enablePreview;
state.studySelect = res.data.data.routerInfo.enableStudy;
if (res.data.data.routerInfo.previewSetting) {
let arr = res.data.data.routerInfo.previewSetting.split(",");
if (arr.length === 2) {
state.previewStartNum = arr[0];
state.previewEndNum = arr[1];
}
}
if (res.data.data.routerInfo.studySetting) {
let arr = res.data.data.routerInfo.studySetting.split(",");
if (arr.length === 2) {
state.studyStartNum = arr[0];
state.studyEndNum = arr[1];
}
}
}
})
.catch((err) => {
console.log(err);
@@ -2194,7 +2227,30 @@ export default {
message.warning("删除失败");
});
};
// 设置------------------------------------------------------
//编辑基本信息
const editLearnInfo = () => {
let obj = {
routerId: state.routerId,
enablePreview: state.previewSelect ? 1 : 0,
enableStudy: state.studySelect ? 1 : 0,
previewSetting: state.previewStartNum + "," + state.previewEndNum,
studySetting: state.studyStartNum + "," + state.studyEndNum,
};
console.log("编辑设置基本信息obj", obj);
api
.editLearnInfo(obj)
.then((res) => {
console.log("编辑设置基本信息成功", res);
if (res.data.code === 200) {
message.success("修改成功");
}
})
.catch((err) => {
console.log("编辑设置基本信息失败", err);
});
};
// 设置-----------------------------------------------------
//添加学员
watch(
() => state.addAuthList,
@@ -2305,6 +2361,7 @@ export default {
checkedClose,
showCodeModel,
showCodeModel2,
editLearnInfo,
};
},
};
@@ -4201,7 +4258,7 @@ export default {
position: absolute;
// margin-top: 10px;
left: 0;
top: 3px;
top: 0px;
}
.yulan {