11.5
This commit is contained in:
parent
e56315291c
commit
f3eb217f5e
@ -123,7 +123,7 @@ export default {
|
|||||||
}
|
}
|
||||||
.table-box {
|
.table-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 66vh;
|
height: 81vh;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
background: #FFF;
|
background: #FFF;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
@ -133,7 +133,8 @@ export default {
|
|||||||
}
|
}
|
||||||
.hui_box{
|
.hui_box{
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 15px;
|
padding: 10px;
|
||||||
|
padding-bottom: 0px;
|
||||||
background: #f6f8f9;
|
background: #f6f8f9;
|
||||||
}
|
}
|
||||||
.top-box{
|
.top-box{
|
||||||
|
@ -87,14 +87,14 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<el-dialog center :title="title" :close-on-click-modal="false" :visible.sync="open" width="42%" append-to-body>
|
<el-dialog center :title="title" :close-on-click-modal="false" :visible.sync="open" width="42%" append-to-body>
|
||||||
<el-form :model="form" label-width="80px" >
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px" >
|
||||||
<!-- 通知名称 -->
|
<!-- 通知名称 -->
|
||||||
<el-form-item label="通知名称" :required="true">
|
<el-form-item label="通知名称" prop="notificationName" :required="true">
|
||||||
<el-input v-model="form.notificationName" placeholder="请输入通知名称" ></el-input>
|
<el-input v-model="form.notificationName" placeholder="请输入通知名称" ></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<!-- 通知类型 -->
|
<!-- 通知类型 -->
|
||||||
<el-form-item label="通知类型" :required="true">
|
<el-form-item label="通知类型" prop="notificationType" :required="true">
|
||||||
<el-select v-model="form.notificationType" placeholder="请选择通知类型" style="width: 100%">
|
<el-select v-model="form.notificationType" placeholder="请选择通知类型" style="width: 100%">
|
||||||
<el-option label="到期通知" value="到期通知"></el-option>
|
<el-option label="到期通知" value="到期通知"></el-option>
|
||||||
<el-option label="库存预警" value="库存预警"></el-option>
|
<el-option label="库存预警" value="库存预警"></el-option>
|
||||||
@ -104,7 +104,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<!-- 通知模板 -->
|
<!-- 通知模板 -->
|
||||||
<el-form-item label="通知模板" :required="true">
|
<el-form-item label="通知模板" prop="templateContent" :required="true">
|
||||||
<el-input type="textarea" v-model="form.templateContent" :rows="3" placeholder="请输入通知内容"
|
<el-input type="textarea" v-model="form.templateContent" :rows="3" placeholder="请输入通知内容"
|
||||||
:maxlength="200" show-word-limit ></el-input>
|
:maxlength="200" show-word-limit ></el-input>
|
||||||
<div>
|
<div>
|
||||||
@ -115,7 +115,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 接收角色 -->
|
<!-- 接收角色 -->
|
||||||
<el-form-item label="接收角色" :required="true">
|
<el-form-item label="接收角色" prop="recipientRoles" :required="true">
|
||||||
<el-select v-model="form.recipientRoles" multiple placeholder="请选择角色" style="width: 100%">
|
<el-select v-model="form.recipientRoles" multiple placeholder="请选择角色" style="width: 100%">
|
||||||
<el-option v-for="item in dutyList1" :label="item.dutyName" :value="item.dutyId"></el-option>
|
<el-option v-for="item in dutyList1" :label="item.dutyName" :value="item.dutyId"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -125,7 +125,7 @@
|
|||||||
<el-switch v-model="form.templateStatus" active-color="#13ce66" inactive-color="#ff4949"></el-switch>
|
<el-switch v-model="form.templateStatus" active-color="#13ce66" inactive-color="#ff4949"></el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 发送条件 -->
|
<!-- 发送条件 -->
|
||||||
<el-form-item label="发送条件" style="margin-bottom: 10px" :required="true">
|
<el-form-item label="发送条件" prop="conditions" style="margin-bottom: 10px" :required="true">
|
||||||
<div v-for="(condition, index) in form.conditions" :key="index" class="condition-group"
|
<div v-for="(condition, index) in form.conditions" :key="index" class="condition-group"
|
||||||
style="margin-bottom: 10px">
|
style="margin-bottom: 10px">
|
||||||
<el-select v-model="condition.field" placeholder="请选择条件" style="width: 35%;margin-right: 10px"
|
<el-select v-model="condition.field" placeholder="请选择条件" style="width: 35%;margin-right: 10px"
|
||||||
@ -151,7 +151,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<div style="display: flex; justify-content: center; align-items: center;margin-top: 30px">
|
<div style="display: flex; justify-content: center; align-items: center;margin-top: 30px">
|
||||||
<el-button @click="handleReset">取消</el-button>
|
<el-button @click="handleReset">取消</el-button>
|
||||||
<el-button type="primary" @click="handleSubmit">保存</el-button>
|
<el-button type="primary" @click="handleSubmit('form' )">保存</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
@ -206,6 +206,24 @@ export default {
|
|||||||
legalRepresentativeContact: '',
|
legalRepresentativeContact: '',
|
||||||
appStatus: '',
|
appStatus: '',
|
||||||
},
|
},
|
||||||
|
rules: {
|
||||||
|
notificationName: [
|
||||||
|
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
notificationType:[
|
||||||
|
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
templateContent:[
|
||||||
|
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
recipientRoles:[
|
||||||
|
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
conditions:[
|
||||||
|
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
|
||||||
roleList: [],
|
roleList: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -264,38 +282,34 @@ export default {
|
|||||||
// });
|
// });
|
||||||
// },
|
// },
|
||||||
|
|
||||||
handleSubmit() {
|
handleSubmit(formName) {
|
||||||
this.open = false
|
|
||||||
|
this.$refs[formName].validate((valid) =>{
|
||||||
|
if (valid) {
|
||||||
|
// 表单验证通过,可以提交数据
|
||||||
|
this.open = false
|
||||||
|
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
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
// 在这里调用接口提交设备信息数据
|
|
||||||
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() {
|
handleReset() {
|
||||||
this.open = false
|
this.open = false
|
||||||
|
@ -1271,7 +1271,7 @@ export default
|
|||||||
background: #fff;
|
background: #fff;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
margin-top: 20px;
|
margin-top:15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.anniu-h {
|
.anniu-h {
|
||||||
|
Loading…
Reference in New Issue
Block a user