feat:合并

This commit is contained in:
lixg
2022-12-04 18:29:38 +08:00
23 changed files with 1425 additions and 747 deletions

View File

@@ -772,7 +772,10 @@
<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">
@@ -1924,11 +1927,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;
}
@@ -1974,6 +2008,7 @@ export default {
remark: state.remark,
routerId: state.routerId,
status: state.action,
attachSwitch: state.docChecked ? 1 : -1,
})
.then((res) => {
console.log(res);
@@ -2196,6 +2231,7 @@ export default {
deleteStu,
totask,
tostudent,
checkedClose,
};
},
};