|
|
@ -155,7 +155,7 @@
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="通知用户" >
|
|
|
|
<el-form-item label="通知用户" v-if="userVisible">
|
|
|
|
<el-select v-model="form.userNoticeList" placeholder="请选择通知用户" multiple>
|
|
|
|
<el-select v-model="form.userNoticeList" placeholder="请选择通知用户" multiple>
|
|
|
|
<el-option
|
|
|
|
<el-option
|
|
|
|
v-for="item in userList"
|
|
|
|
v-for="item in userList"
|
|
|
@ -201,6 +201,8 @@ export default {
|
|
|
|
multiple: true,
|
|
|
|
multiple: true,
|
|
|
|
// 显示搜索条件
|
|
|
|
// 显示搜索条件
|
|
|
|
showSearch: true,
|
|
|
|
showSearch: true,
|
|
|
|
|
|
|
|
// 通知用户显示
|
|
|
|
|
|
|
|
userVisible: false,
|
|
|
|
// 总条数
|
|
|
|
// 总条数
|
|
|
|
total: 0,
|
|
|
|
total: 0,
|
|
|
|
// 公告表格数据
|
|
|
|
// 公告表格数据
|
|
|
@ -232,6 +234,14 @@ export default {
|
|
|
|
userList: []
|
|
|
|
userList: []
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
watch: {
|
|
|
|
|
|
|
|
// 监听form.noticeType
|
|
|
|
|
|
|
|
'form.noticeType': {
|
|
|
|
|
|
|
|
handler(val) {
|
|
|
|
|
|
|
|
this.userVisible = (val === '1');
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
|
this.getList();
|
|
|
|
this.getList();
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -306,6 +316,9 @@ export default {
|
|
|
|
if (this.form.userNoticeList.length > 0){
|
|
|
|
if (this.form.userNoticeList.length > 0){
|
|
|
|
this.form.sysUserNoticeList = this.form.userNoticeList.map(userId => ({ userId }));
|
|
|
|
this.form.sysUserNoticeList = this.form.userNoticeList.map(userId => ({ userId }));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (this.form.noticeType == '2'){
|
|
|
|
|
|
|
|
this.form.sysUserNoticeList = this.userList.map(user => ({ userId: user.userId }));
|
|
|
|
|
|
|
|
}
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
if (valid) {
|
|
|
|
if (valid) {
|
|
|
|
if (this.form.noticeId != undefined) {
|
|
|
|
if (this.form.noticeId != undefined) {
|
|
|
|