mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-15 13:56:45 +08:00
fix:学习路径图共享文档功能
This commit is contained in:
@@ -768,7 +768,7 @@
|
||||
<div class="box"></div>
|
||||
<div class="onetitle">上传共享文档</div>
|
||||
<div class="oneedi">
|
||||
<a-switch v-model:checked="docChecked"></a-switch>
|
||||
<a-switch v-model:checked="docChecked" @change="checkedClose"></a-switch>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnbox" style="margin: 20px">
|
||||
@@ -1909,12 +1909,42 @@ export default {
|
||||
console.log("获取失败" + err);
|
||||
});
|
||||
};
|
||||
|
||||
// 设置上传图片开关
|
||||
const checkedClose = (data,a) => {
|
||||
console.log(data,a)
|
||||
state.docChecked = data
|
||||
console.log({
|
||||
routerId: state.routerId,
|
||||
status: state.action,
|
||||
attachSwitch: data ? 1: -1
|
||||
})
|
||||
// 更新开关状态
|
||||
editRoutered({
|
||||
attach:JSON.stringify(state.fileList),
|
||||
name: state.styTitle,
|
||||
picUrl: state.picUrl,
|
||||
remark: state.remark,
|
||||
routerId: state.routerId,
|
||||
status: state.action,
|
||||
attachSwitch: data ? 1: -1
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// 获取路径列表
|
||||
const myGetRouterDetail = () => {
|
||||
GetRouterDetail(state.routerId)
|
||||
.then((res) => {
|
||||
console.log('router-list',res)
|
||||
state.fileList = JSON.parse(res.data.data.routerInfo.attach)
|
||||
state.docChecked = res.data.data.routerInfo.attachSwitch == 1?true:false
|
||||
if (res.data.data.routerInfo.status == 1) {
|
||||
state.nodata = false;
|
||||
}
|
||||
@@ -1960,6 +1990,7 @@ export default {
|
||||
remark: state.remark,
|
||||
routerId: state.routerId,
|
||||
status: state.action,
|
||||
attachSwitch: state.docChecked?1:-1
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
@@ -2182,6 +2213,7 @@ export default {
|
||||
deleteStu,
|
||||
totask,
|
||||
tostudent,
|
||||
checkedClose
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user