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