|
@@ -61,7 +61,6 @@
|
|
|
placeholder="请输入"
|
|
placeholder="请输入"
|
|
|
size="small"
|
|
size="small"
|
|
|
:min="0"
|
|
:min="0"
|
|
|
- :precision="1"
|
|
|
|
|
:controls="false"
|
|
:controls="false"
|
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
|
/>
|
|
/>
|
|
@@ -78,16 +77,7 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <!-- 阈值 -->
|
|
|
|
|
- <el-col :span="8">
|
|
|
|
|
- <el-form-item label="阈值" prop="thresholdValue">
|
|
|
|
|
- <el-input
|
|
|
|
|
- v-model="formData.thresholdValue"
|
|
|
|
|
- placeholder="请输入"
|
|
|
|
|
- size="small"
|
|
|
|
|
- ></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
|
|
+
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
<el-form-item label="状态" prop="enabled">
|
|
<el-form-item label="状态" prop="enabled">
|
|
|
<el-select
|
|
<el-select
|
|
@@ -133,24 +123,46 @@
|
|
|
:rules="contentConfigFormRules.targetAddressName"
|
|
:rules="contentConfigFormRules.targetAddressName"
|
|
|
>
|
|
>
|
|
|
<el-input
|
|
<el-input
|
|
|
|
|
+ placeholder="请选择"
|
|
|
v-model="scope.row.targetAddressName"
|
|
v-model="scope.row.targetAddressName"
|
|
|
@focus="handleAddInfo(scope.row, scope.$index)"
|
|
@focus="handleAddInfo(scope.row, scope.$index)"
|
|
|
- ></el-input>
|
|
|
|
|
- <!-- <el-select
|
|
|
|
|
- v-model="scope.row.manager"
|
|
|
|
|
- placeholder="请选择"
|
|
|
|
|
- style="width: 100%"
|
|
|
|
|
- filterable
|
|
|
|
|
- multiple
|
|
|
|
|
>
|
|
>
|
|
|
|
|
+ <template #suffix>
|
|
|
|
|
+ <el-badge :value="NumberOfPeople"></el-badge>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column prop="alertLevel" label="预警级别" width="120">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <el-form-item
|
|
|
|
|
+ :prop="'actionList.' + scope.$index + '.alertLevel'"
|
|
|
|
|
+ label-width="0"
|
|
|
|
|
+ :rules="contentConfigFormRules.alertLevel"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-select size="small" v-model="scope.row.alertLevel">
|
|
|
<el-option
|
|
<el-option
|
|
|
- v-for="item in managerData"
|
|
|
|
|
- :key="item.id"
|
|
|
|
|
- :label="item.name"
|
|
|
|
|
- :value="item.id"
|
|
|
|
|
- >
|
|
|
|
|
- </el-option>
|
|
|
|
|
- </el-select> -->
|
|
|
|
|
|
|
+ v-for="(value, key) in allAlertLevelData"
|
|
|
|
|
+ :key="key"
|
|
|
|
|
+ :label="value"
|
|
|
|
|
+ :value="key"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column prop="thresholdValue" label="阈值" width="120">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <el-form-item
|
|
|
|
|
+ :prop="'actionList.' + scope.$index + '.thresholdValue'"
|
|
|
|
|
+ label-width="0"
|
|
|
|
|
+ :rules="contentConfigFormRules.thresholdValue"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="scope.row.thresholdValue"
|
|
|
|
|
+ placeholder="请输入"
|
|
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -173,22 +185,6 @@
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
|
- <!-- <el-table-column prop="urgent" label="紧急程度" width="120">
|
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
|
- <el-form-item
|
|
|
|
|
- :prop="'actionList.' + scope.$index + '.urgent'"
|
|
|
|
|
- label-width="0"
|
|
|
|
|
- :rules="contentConfigFormRules.urgent"
|
|
|
|
|
- >
|
|
|
|
|
- <DictSelection
|
|
|
|
|
- dictName="紧急程度"
|
|
|
|
|
- v-model="scope.row.urgent"
|
|
|
|
|
- :disabled="isBindPlan"
|
|
|
|
|
- >
|
|
|
|
|
- </DictSelection>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column> -->
|
|
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
prop="alertMessageTempateCode"
|
|
prop="alertMessageTempateCode"
|
|
|
label="模板编码"
|
|
label="模板编码"
|
|
@@ -206,6 +202,7 @@
|
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
|
v-model="scope.row.alertMessageTempateCode"
|
|
v-model="scope.row.alertMessageTempateCode"
|
|
|
@change="changeTemplate(scope.row, scope.$index)"
|
|
@change="changeTemplate(scope.row, scope.$index)"
|
|
|
|
|
+ filterable
|
|
|
>
|
|
>
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="item in templateData"
|
|
v-for="item in templateData"
|
|
@@ -218,7 +215,7 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column prop="content" label="内容" width="240">
|
|
|
|
|
|
|
+ <el-table-column prop="content" label="内容">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<el-input
|
|
<el-input
|
|
|
type="textarea"
|
|
type="textarea"
|
|
@@ -229,7 +226,7 @@
|
|
|
></el-input>
|
|
></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作">
|
|
|
|
|
|
|
+ <el-table-column label="操作" width="80">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
<el-button
|
|
|
type="text"
|
|
type="text"
|
|
@@ -261,7 +258,8 @@
|
|
|
getDetail,
|
|
getDetail,
|
|
|
listAllRulesObj,
|
|
listAllRulesObj,
|
|
|
listAllDateUnit,
|
|
listAllDateUnit,
|
|
|
- listAllActionType
|
|
|
|
|
|
|
+ listAllActionType,
|
|
|
|
|
+ listAllAlertLevel
|
|
|
} from '@/api/ruleManagement/earlyWarning';
|
|
} from '@/api/ruleManagement/earlyWarning';
|
|
|
import { notifyTemplatePageAPI } from '@/api/notifyManage';
|
|
import { notifyTemplatePageAPI } from '@/api/notifyManage';
|
|
|
import { getUserPage } from '@/api/system/organization';
|
|
import { getUserPage } from '@/api/system/organization';
|
|
@@ -290,14 +288,14 @@
|
|
|
ruleObjCode: '',
|
|
ruleObjCode: '',
|
|
|
alertCycleValue: '1',
|
|
alertCycleValue: '1',
|
|
|
alertCycleUnit: '',
|
|
alertCycleUnit: '',
|
|
|
- thresholdValue: '',
|
|
|
|
|
enabled: 1,
|
|
enabled: 1,
|
|
|
actionList: [
|
|
actionList: [
|
|
|
{
|
|
{
|
|
|
targetAddress: '',
|
|
targetAddress: '',
|
|
|
targetAddressName: '',
|
|
targetAddressName: '',
|
|
|
actionType: '',
|
|
actionType: '',
|
|
|
- // urgent: '',
|
|
|
|
|
|
|
+ alertLevel: '',
|
|
|
|
|
+ thresholdValue: '',
|
|
|
alertMessageTempateCode: '',
|
|
alertMessageTempateCode: '',
|
|
|
content: ''
|
|
content: ''
|
|
|
}
|
|
}
|
|
@@ -316,16 +314,18 @@
|
|
|
alertCycleValue: [
|
|
alertCycleValue: [
|
|
|
{ required: true, message: '请输入周期', trigger: 'blur' }
|
|
{ required: true, message: '请输入周期', trigger: 'blur' }
|
|
|
],
|
|
],
|
|
|
-
|
|
|
|
|
|
|
+ alertLevel: [
|
|
|
|
|
+ { required: true, message: '请选择紧急程度', trigger: 'blur' }
|
|
|
|
|
+ ],
|
|
|
targetAddressName: [
|
|
targetAddressName: [
|
|
|
{ required: true, message: '请选择通知人', trigger: 'blur' }
|
|
{ required: true, message: '请选择通知人', trigger: 'blur' }
|
|
|
],
|
|
],
|
|
|
actionType: [
|
|
actionType: [
|
|
|
{ required: true, message: '请选择操作类型', trigger: 'blur' }
|
|
{ required: true, message: '请选择操作类型', trigger: 'blur' }
|
|
|
],
|
|
],
|
|
|
- // urgent: [
|
|
|
|
|
- // { required: true, message: '请选择紧急程度', trigger: 'blur' }
|
|
|
|
|
- // ],
|
|
|
|
|
|
|
+ thresholdValue: [
|
|
|
|
|
+ { required: true, message: '请输入阈值', trigger: 'blur' }
|
|
|
|
|
+ ],
|
|
|
alertMessageTempateCode: [
|
|
alertMessageTempateCode: [
|
|
|
{ required: true, message: '请选择模板编码', trigger: 'blur' }
|
|
{ required: true, message: '请选择模板编码', trigger: 'blur' }
|
|
|
]
|
|
]
|
|
@@ -335,7 +335,9 @@
|
|
|
templateData: [],
|
|
templateData: [],
|
|
|
allRulesData: {},
|
|
allRulesData: {},
|
|
|
cycleUnitOpt: {},
|
|
cycleUnitOpt: {},
|
|
|
- operationTypeData: {}
|
|
|
|
|
|
|
+ operationTypeData: {},
|
|
|
|
|
+ NumberOfPeople: '',
|
|
|
|
|
+ allAlertLevelData: {}
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
watch: {},
|
|
watch: {},
|
|
@@ -356,6 +358,8 @@
|
|
|
async getAllActionType() {
|
|
async getAllActionType() {
|
|
|
const res = await listAllActionType();
|
|
const res = await listAllActionType();
|
|
|
this.operationTypeData = res;
|
|
this.operationTypeData = res;
|
|
|
|
|
+ const res2 = await listAllAlertLevel();
|
|
|
|
|
+ this.allAlertLevelData = res2;
|
|
|
},
|
|
},
|
|
|
handleAddInfo(row, index) {
|
|
handleAddInfo(row, index) {
|
|
|
this.formData.actionList[index].targetAddress = '';
|
|
this.formData.actionList[index].targetAddress = '';
|
|
@@ -363,7 +367,8 @@
|
|
|
this.$refs.selectPersonDialogRef.open(row, index);
|
|
this.$refs.selectPersonDialogRef.open(row, index);
|
|
|
},
|
|
},
|
|
|
changeParent(list, index) {
|
|
changeParent(list, index) {
|
|
|
- console.log(list, 'list', this.isBindPlan);
|
|
|
|
|
|
|
+ this.NumberOfPeople = list.length;
|
|
|
|
|
+ console.log(list.length, 'list', this.isBindPlan);
|
|
|
let ids = list
|
|
let ids = list
|
|
|
.map((item) => {
|
|
.map((item) => {
|
|
|
return item.id;
|
|
return item.id;
|
|
@@ -402,9 +407,7 @@
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
async openDialog(row, type) {
|
|
async openDialog(row, type) {
|
|
|
- this.addMatterDialog = true;
|
|
|
|
|
this.isBindPlan = type;
|
|
this.isBindPlan = type;
|
|
|
-
|
|
|
|
|
await this.getAllRulesObj();
|
|
await this.getAllRulesObj();
|
|
|
await this.getAllDateUnit();
|
|
await this.getAllDateUnit();
|
|
|
await this.getAllActionType();
|
|
await this.getAllActionType();
|
|
@@ -418,6 +421,7 @@
|
|
|
if (type != 'edit') {
|
|
if (type != 'edit') {
|
|
|
this.getOrderCode();
|
|
this.getOrderCode();
|
|
|
}
|
|
}
|
|
|
|
|
+ this.addMatterDialog = true;
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
async getRuleInfo(id, type) {
|
|
async getRuleInfo(id, type) {
|
|
@@ -460,8 +464,10 @@
|
|
|
if (this.formData.actionList) {
|
|
if (this.formData.actionList) {
|
|
|
this.formData.actionList.push({
|
|
this.formData.actionList.push({
|
|
|
targetAddress: '',
|
|
targetAddress: '',
|
|
|
|
|
+ targetAddressName: '',
|
|
|
actionType: '',
|
|
actionType: '',
|
|
|
- // urgent: '',
|
|
|
|
|
|
|
+ alertLevel: '',
|
|
|
|
|
+ thresholdValue: '',
|
|
|
alertMessageTempateCode: '',
|
|
alertMessageTempateCode: '',
|
|
|
content: ''
|
|
content: ''
|
|
|
});
|
|
});
|
|
@@ -469,8 +475,10 @@
|
|
|
let arr = [
|
|
let arr = [
|
|
|
{
|
|
{
|
|
|
targetAddress: '',
|
|
targetAddress: '',
|
|
|
|
|
+ targetAddressName: '',
|
|
|
actionType: '',
|
|
actionType: '',
|
|
|
- // urgent: '',
|
|
|
|
|
|
|
+ alertLevel: '',
|
|
|
|
|
+ thresholdValue: '',
|
|
|
alertMessageTempateCode: '',
|
|
alertMessageTempateCode: '',
|
|
|
content: ''
|
|
content: ''
|
|
|
}
|
|
}
|
|
@@ -497,8 +505,6 @@
|
|
|
this.handleClose();
|
|
this.handleClose();
|
|
|
this.$emit('done');
|
|
this.$emit('done');
|
|
|
}
|
|
}
|
|
|
- } else {
|
|
|
|
|
- this.$message.warning('请将信息补充完整!');
|
|
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
@@ -587,4 +593,8 @@
|
|
|
::v-deep .el-input-number .el-input__inner {
|
|
::v-deep .el-input-number .el-input__inner {
|
|
|
text-align: left !important;
|
|
text-align: left !important;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ ::v-deep .el-badge__content {
|
|
|
|
|
+ font-size: 10px;
|
|
|
|
|
+ }
|
|
|
</style>
|
|
</style>
|