mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-15 13:56:45 +08:00
feat:合并
This commit is contained in:
@@ -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,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user