Commit 15236232 authored by 胡占生's avatar 胡占生 🇨🇳

fix: 创建任务,多选增加全选

parent 543bfad3
...@@ -196,6 +196,7 @@ ...@@ -196,6 +196,7 @@
<div style="display:flex;margin-top: 44px;"> <div style="display:flex;margin-top: 44px;">
<van-checkbox-group <van-checkbox-group
v-model="riskList" v-model="riskList"
ref="checkboxGroup"
style="width: 100%;font-size: 18px;" style="width: 100%;font-size: 18px;"
> >
<van-checkbox <van-checkbox
...@@ -207,6 +208,10 @@ ...@@ -207,6 +208,10 @@
>{{ item[filedName] }}</van-checkbox >{{ item[filedName] }}</van-checkbox
> >
</van-checkbox-group> </van-checkbox-group>
<div>
<van-button type="primary" @click="checkAll">全选</van-button>
<van-button type="info" @click="toggleAll">反选</van-button>
</div>
</div> </div>
</van-popup> </van-popup>
...@@ -361,6 +366,12 @@ export default { ...@@ -361,6 +366,12 @@ export default {
// this.getList(); // this.getList();
}, },
methods: { methods: {
checkAll() {
this.$refs.checkboxGroup.toggleAll(true);
},
toggleAll() {
this.$refs.checkboxGroup.toggleAll();
},
// 确定时间的方法 // 确定时间的方法
onConTime(date) { onConTime(date) {
console.log( console.log(
...@@ -393,7 +404,7 @@ export default { ...@@ -393,7 +404,7 @@ export default {
loadingType: "spinner", loadingType: "spinner",
duration: 0 duration: 0
}); });
getFun(`/risk/plan/user/list/${this.form.projectId}`).then(res => { getFun(`/risk/plan/user/list/${this.form.deptId}`).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.columnsTrouble = res.data; this.columnsTrouble = res.data;
// 对数据进行赋值 // 对数据进行赋值
...@@ -453,7 +464,7 @@ export default { ...@@ -453,7 +464,7 @@ export default {
loadingType: "spinner", loadingType: "spinner",
duration: 0 duration: 0
}); });
getFun(`/risk/plan/user/list/${this.form.projectId}`).then(res => { getFun(`/risk/plan/user/list/${this.form.deptId}`).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.riskModelList = res.data; this.riskModelList = res.data;
// 对数据进行赋值 // 对数据进行赋值
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment