中台系统设置部分Bug
This commit is contained in:
parent
e560658211
commit
eabfb9bd1f
@ -277,7 +277,7 @@ export default {
|
||||
{ required: true, message: '请填写banner名称', trigger: 'blur' }
|
||||
],
|
||||
systemPosition: [
|
||||
{ required: true, message: '请填写系统位置', trigger: '' }
|
||||
{ required: true, message: '请填写系统位置', trigger: 'blur' }
|
||||
],
|
||||
sortOrder: [
|
||||
{ required: true, message: '请填写排序号', trigger: 'blur' }
|
||||
@ -394,7 +394,7 @@ export default {
|
||||
pageSize: 10,
|
||||
deviceName: '',
|
||||
systemPosition: '系统首页'
|
||||
},
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
handleAdd(e) {
|
||||
@ -458,10 +458,11 @@ export default {
|
||||
bannerStatus: false, // Banner状态
|
||||
note: '', // 备注
|
||||
createByName: '' //
|
||||
}
|
||||
|
||||
};
|
||||
this.uploadFiles = []
|
||||
|
||||
if (this.$refs.deviceForm) {
|
||||
this.$refs.deviceForm.resetFields();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -356,6 +356,9 @@ export default {
|
||||
bannerStatus: false, // Banner状态
|
||||
note: '', // 备注
|
||||
createByName: '', //
|
||||
};
|
||||
if (this.$refs.form) {
|
||||
this.$refs.form.resetFields();
|
||||
}
|
||||
},
|
||||
handleReset() {
|
||||
|
@ -134,7 +134,7 @@
|
||||
</div>
|
||||
|
||||
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="30%" append-to-body>
|
||||
<el-form :model="deviceInfo" ref="deviceForm" label-width="120px" :rules="rules">
|
||||
<el-form :model="deviceInfo" ref="deviceForm" label-width="120px" :rules="rules" style="margin-left: 20px;">
|
||||
|
||||
<el-form-item label="机构名称" prop="deptId" >
|
||||
<el-select v-model="deviceInfo.deptId" placeholder="请选择机构" @change="chooseDept(deviceInfo.deptId)" style="width: 300px">
|
||||
@ -191,7 +191,7 @@
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item style="margin-left: 60px">
|
||||
<el-form-item style="margin-left: 55px">
|
||||
<el-button @click="handleReset" style="margin-right: 20px;">取消</el-button>
|
||||
<el-button type="primary" @click="submitForm('deviceForm')">保存</el-button>
|
||||
|
||||
@ -400,6 +400,9 @@ export default {
|
||||
information:'',
|
||||
status:'qy'
|
||||
}
|
||||
if (this.$refs.deviceForm) {
|
||||
this.$refs.deviceForm.resetFields();
|
||||
}
|
||||
},
|
||||
handleReset() {
|
||||
this.open = false
|
||||
|
@ -96,14 +96,14 @@
|
||||
</div>
|
||||
|
||||
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="32%" append-to-body>
|
||||
<el-form :model="form" label-width="120px">
|
||||
<el-form :model="form" ref="form" :rules="rules" label-width="120px">
|
||||
<!-- 通知名称 -->
|
||||
<el-form-item label="通知名称" :required="true">
|
||||
<el-form-item label="通知名称" prop="notificationName">
|
||||
<el-input v-model="form.notificationName" placeholder="请输入通知名称" style="width: 300px" ></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 通知类型 -->
|
||||
<el-form-item label="通知类型" :required="true">
|
||||
<el-form-item label="通知类型" prop="notificationType">
|
||||
<el-select v-model="form.notificationType" placeholder="请选择通知类型" style="width: 300px">
|
||||
<el-option label="到期提醒" value="到期提醒"></el-option>
|
||||
<el-option label="系统升级" value="系统升级"></el-option>
|
||||
@ -112,7 +112,7 @@
|
||||
</el-form-item>
|
||||
|
||||
<!-- 通知模板 -->
|
||||
<el-form-item label="通知模板" :required="true">
|
||||
<el-form-item label="通知模板" prop="templateContent">
|
||||
<el-input type="textarea" v-model="form.templateContent" :rows="3" placeholder="请输入通知内容" :maxlength="200" show-word-limit style="width: 300px"></el-input>
|
||||
<div>
|
||||
<span @click = "insertText('{系统到期日期}')">{系统到期日期}</span>
|
||||
@ -123,19 +123,19 @@
|
||||
</el-form-item>
|
||||
|
||||
<!-- 接收角色 -->
|
||||
<el-form-item label="接收角色" :required="true">
|
||||
<el-form-item label="接收角色" prop="recipientRoles">
|
||||
<el-select v-model="form.recipientRoles" multiple placeholder="请选择角色" style="width: 300px">
|
||||
<el-option v-for="item in dutyList1" :label="item.dutyName" :value="item.dutyId" ></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 模板状态 -->
|
||||
<el-form-item label="模板状态" :required="true">
|
||||
<el-form-item label="模板状态" prop="templateStatus">
|
||||
<el-switch v-model="form.templateStatus" active-color="#13ce66" inactive-color="#ff4949"></el-switch>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 发送条件 -->
|
||||
<el-form-item label="发送条件" style="margin-bottom: 10px" :required="true">
|
||||
<el-form-item label="发送条件" style="margin-bottom: 10px" prop="conditions">
|
||||
<div v-for="(condition, index) in form.conditions" :key="index" class="condition-group" style="margin-bottom: 10px">
|
||||
<el-select v-model="condition.field" placeholder="请选择条件" style="width: 150px;margin-right: 10px" @change="changeField(index)">
|
||||
<el-option label="系统到期日期" value="系统到期日期"></el-option>
|
||||
@ -154,7 +154,7 @@
|
||||
</el-input>
|
||||
<el-button @click="removeCondition(index)" type="danger" icon="el-icon-delete" circle></el-button>
|
||||
</div>
|
||||
<el-button @click="addCondition(index)" type="primary" icon="el-icon-plus">添加条件</el-button>
|
||||
<el-button @click="addCondition" type="primary" icon="el-icon-plus">添加条件</el-button>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
@ -163,7 +163,7 @@
|
||||
<!-- </el-form-item>-->
|
||||
</el-form>
|
||||
<div style="display: flex; justify-content: center; align-items: center;margin-top: 30px">
|
||||
<el-button type="primary" @click="handleSubmit">保存</el-button>
|
||||
<el-button type="primary" @click="handleSubmit('form')">保存</el-button>
|
||||
<el-button @click="handleReset">取消</el-button>
|
||||
</div>
|
||||
|
||||
@ -200,7 +200,7 @@ export default {
|
||||
conditions: [
|
||||
]
|
||||
},
|
||||
// { field: '', operator: '', value: '' }
|
||||
// { field: '', operator: '', value: '' }
|
||||
|
||||
deviceInfo: {
|
||||
id: null, // 自增id
|
||||
@ -223,6 +223,26 @@ export default {
|
||||
legalRepresentativeContact:'',
|
||||
appStatus:'',
|
||||
},
|
||||
rules: {
|
||||
notificationName: [
|
||||
{required: true, message: '请输入通知名称', trigger: 'blur'},
|
||||
],
|
||||
notificationType: [
|
||||
{required: true, message: '请选择通知类型', trigger: 'change'},
|
||||
],
|
||||
templateContent: [
|
||||
{required: true, message: '请输入通知模版', trigger: 'blur'},
|
||||
],
|
||||
recipientRoles: [
|
||||
{required: true, message: '请选择接收角色', trigger: 'change'},
|
||||
],
|
||||
templateStatus: [
|
||||
{required: true, message: '请选择模版状态', trigger: 'change'},
|
||||
],
|
||||
conditions: [
|
||||
{required: true, message: '请添加发送条件', trigger: 'change'},
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -267,38 +287,47 @@ export default {
|
||||
// });
|
||||
// },
|
||||
|
||||
handleSubmit() {
|
||||
this.open = false
|
||||
handleSubmit(form) {
|
||||
this.$refs[form].validate(valid =>{
|
||||
if (valid) {
|
||||
// 表单验证通过,可以提交数据
|
||||
if ( this.form.conditions.length === 0 || this.form.conditions[0].field == '') {
|
||||
this.form.conditions = ''
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '请选择发送条件!'
|
||||
});
|
||||
return
|
||||
} else {
|
||||
this.form.conditions = JSON.stringify(this.form.conditions)
|
||||
}
|
||||
this.form.recipientRoles = JSON.stringify(this.form.recipientRoles)
|
||||
|
||||
// 在这里调用接口提交设备信息数据
|
||||
if (this.form.id) {
|
||||
updateSysNotifyApi(this.form).then(res=>{
|
||||
if(res.code === 200) {
|
||||
this.form.conditions = []
|
||||
this.getList()
|
||||
this.open = false
|
||||
}
|
||||
})
|
||||
}else {
|
||||
saveSysNotifyApi(this.form).then(res=>{
|
||||
if(res.code === 200) {
|
||||
this.form.conditions = []
|
||||
this.getList()
|
||||
this.open = false
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
// 表单验证失败,不执行任何操作
|
||||
return false
|
||||
}
|
||||
})
|
||||
// 在这里调用接口提交设备信息数据
|
||||
console.log('提交设备信息数据:', this.form);
|
||||
if ( this.form.conditions.length === 0 || this.form.conditions[0].field == '') {
|
||||
this.form.conditions = ''
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '请选择发送条件!'
|
||||
});
|
||||
return
|
||||
} else {
|
||||
this.form.conditions = JSON.stringify(this.form.conditions)
|
||||
}
|
||||
this.form.recipientRoles = JSON.stringify(this.form.recipientRoles)
|
||||
|
||||
if (this.form.id) {
|
||||
updateSysNotifyApi(this.form).then(res=>{
|
||||
if(res.code === 200) {
|
||||
this.getList()
|
||||
this.open = false
|
||||
}
|
||||
})
|
||||
}else {
|
||||
saveSysNotifyApi(this.form).then(res=>{
|
||||
if(res.code === 200) {
|
||||
this.getList()
|
||||
this.open = false
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
handleReset() {
|
||||
this.open = false
|
||||
@ -363,6 +392,7 @@ export default {
|
||||
},
|
||||
insertText(data) {
|
||||
this.form.templateContent = this.form.templateContent+data
|
||||
console.log("Test",this.form.templateContent+data)
|
||||
},
|
||||
addCondition() {
|
||||
if (this.form.conditions.length > 2) {
|
||||
@ -443,6 +473,9 @@ export default {
|
||||
{ field: '', operator: '', value: '' }
|
||||
]
|
||||
}
|
||||
if (this.$refs.form) {
|
||||
this.$refs.form.resetFields();
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
|
@ -162,7 +162,7 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="margin-left: 160px;">
|
||||
<el-button style="margin-right: 20px" type="primary" @click="userEnter1">确定</el-button>
|
||||
<el-button style="margin-right: 20px" type="primary" @click="userEnter1('form')">确定</el-button>
|
||||
<el-button @click="userCe2">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@ -261,8 +261,6 @@ export default {
|
||||
recipientUser: [
|
||||
{required: true, message: '请选择接收用户', trigger: 'change'},
|
||||
],
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
},
|
||||
@ -291,8 +289,6 @@ export default {
|
||||
},
|
||||
// 发送通知
|
||||
send(data) {
|
||||
|
||||
|
||||
this.$confirm('是否发送本条通知信息', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
@ -379,12 +375,12 @@ export default {
|
||||
notificationType: '',
|
||||
templateContent: '',
|
||||
recipientRoles: [],
|
||||
templateStatus: true,
|
||||
templateStatus: false,
|
||||
recipientUser: []
|
||||
};
|
||||
this.$nextTick(() => {
|
||||
this.$refs['form'].resetFields();
|
||||
});
|
||||
if (this.$refs.form) {
|
||||
this.$refs.form.resetFields();
|
||||
}
|
||||
},
|
||||
handleAdd(e) {
|
||||
this.cleanForm()
|
||||
@ -393,38 +389,47 @@ export default {
|
||||
|
||||
this.title = "新增通知"
|
||||
},
|
||||
userEnter1() {
|
||||
// 在这里调用接口提交设备信息数据
|
||||
userEnter1(form) {
|
||||
this.$refs[form].validate(valid =>{
|
||||
if (valid) {
|
||||
// 表单验证通过,可以提交数据
|
||||
this.form.recipientUser = JSON.stringify(this.form.recipientUser)
|
||||
this.form.recipientRoles = JSON.stringify(this.form.recipientRoles)
|
||||
if (this.form.id) {
|
||||
updateSysNotifyApi(this.form).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.getList()
|
||||
this.open = false
|
||||
}
|
||||
})
|
||||
} else {
|
||||
saveSysNotifyApi(this.form).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.getList()
|
||||
this.open = false
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
// 表单验证失败,不执行任何操作
|
||||
return false
|
||||
}
|
||||
})
|
||||
// 在这里调用接口提交设备信息数据
|
||||
console.log('提交设备信息数据:', this.form);
|
||||
this.form.recipientUser = JSON.stringify(this.form.recipientUser)
|
||||
this.form.recipientRoles = JSON.stringify(this.form.recipientRoles)
|
||||
if (this.form.id) {
|
||||
updateSysNotifyApi(this.form).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.getList()
|
||||
this.open = false
|
||||
}
|
||||
})
|
||||
} else {
|
||||
saveSysNotifyApi(this.form).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.getList()
|
||||
this.open = false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
userCe2() {
|
||||
this.open = false;
|
||||
|
||||
},
|
||||
edit(e) {
|
||||
this.clean()
|
||||
this.cleanForm()
|
||||
this.open = true;
|
||||
this.title = "编辑通知"
|
||||
this.getDutyList()
|
||||
|
||||
this.form = e
|
||||
this.form = JSON.parse(JSON.stringify(e));
|
||||
this.form.recipientUser = JSON.parse(this.form.recipientUser)
|
||||
this.form.recipientRoles = JSON.parse(this.form.recipientRoles)
|
||||
|
||||
@ -495,6 +500,7 @@ export default {
|
||||
// this.addDateRange(this.queryParams, this.dateRange)
|
||||
listUser(this.queryParamsUser).then(response => {
|
||||
this.userList = response.data.records;
|
||||
console.log("name", response.data.records)
|
||||
// this.total = response.data.total;
|
||||
// this.total = response.data.total;
|
||||
// this.loading = false;
|
||||
|
@ -72,7 +72,7 @@ public class SysNotifyServiceImpl extends ServiceImpl<SysNotifyMapper, SysNotif
|
||||
|
||||
@Autowired
|
||||
ILJDutyService dutyService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
@ -310,7 +310,7 @@ public class SysNotifyServiceImpl extends ServiceImpl<SysNotifyMapper, SysNotif
|
||||
this.baseMapper.updateById(sysNotify);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return true;
|
||||
|
||||
}
|
||||
// 根据dutyId查询员工id
|
||||
|
Loading…
Reference in New Issue
Block a user