|
@@ -34,38 +34,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- <el-row>
|
|
|
|
|
- <el-col :span="8">
|
|
|
|
|
- <el-form-item label="预警值" prop="warningValue">
|
|
|
|
|
- <el-input @input="(value) =>
|
|
|
|
|
- (formData.warningValue = value.replace(
|
|
|
|
|
- /^(0+)|[^\d]+/g,
|
|
|
|
|
- ''
|
|
|
|
|
- ))
|
|
|
|
|
- " v-model.number="formData.warningValue" placeholder="请输入" style="width: 160px;"></el-input>
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- <DictSelection style="width: 160px;margin-left: 10px;" dictName="时间单位" clearable
|
|
|
|
|
- v-model="formData.warningUnit">
|
|
|
|
|
- </DictSelection>
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
-
|
|
|
|
|
- <el-col :span="6">
|
|
|
|
|
- <el-form-item label="紧急程度" prop="urgent">
|
|
|
|
|
- <DictSelection
|
|
|
|
|
- dictName="紧急程度"
|
|
|
|
|
- clearable
|
|
|
|
|
- filterable
|
|
|
|
|
- v-model="formData.urgent"
|
|
|
|
|
- >
|
|
|
|
|
- </DictSelection>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- </el-row>
|
|
|
|
|
-
|
|
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
|
<el-form-item label="周期" prop="cycleValue">
|
|
<el-form-item label="周期" prop="cycleValue">
|
|
@@ -82,6 +50,54 @@
|
|
|
<el-button type="text" @click="addItem" icon="el-icon-plus" :disabled="isBindPlan">新增</el-button>
|
|
<el-button type="text" @click="addItem" icon="el-icon-plus" :disabled="isBindPlan">新增</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
+
|
|
|
|
|
+ <el-table-column prop="minWarningValue" label="预警值" width="240">
|
|
|
|
|
+ <template slot-scope="scope" style="display: flex; flex-direction: row">
|
|
|
|
|
+ <el-form-item style="width: 100px;" :prop="'ruleItems.' + scope.$index + '.minWarningValue'" label-width="0"
|
|
|
|
|
+ :rules="contentConfigFormRules.minWarningValue">
|
|
|
|
|
+ <span v-if="scope.row.readonly">{{ scope.row.minWarningValue }}</span>
|
|
|
|
|
+ <el-input v-if="!scope.row.readonly" size="small" placeholder="最小" v-model="scope.row.minWarningValue"
|
|
|
|
|
+ :disabled="isBindPlan"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <span> - </span>
|
|
|
|
|
+
|
|
|
|
|
+ <el-form-item style="width: 100px;" :prop="'ruleItems.' + scope.$index + '.maxWarningValue'" label-width="0"
|
|
|
|
|
+ :rules="contentConfigFormRules.maxWarningValue">
|
|
|
|
|
+ <span v-if="scope.row.readonly">{{ scope.row.maxWarningValue }}</span>
|
|
|
|
|
+ <el-input v-if="!scope.row.readonly" size="small" placeholder="最大" v-model="scope.row.maxWarningValue"
|
|
|
|
|
+ :disabled="isBindPlan"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+
|
|
|
|
|
+ <el-table-column prop="warningUnit" label="预警时间单位" width="120">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <el-form-item :prop="'ruleItems.' + scope.$index + '.warningUnit'" label-width="0"
|
|
|
|
|
+ :rules="contentConfigFormRules.warningUnit">
|
|
|
|
|
+
|
|
|
|
|
+ <DictSelection dictName="时间单位"
|
|
|
|
|
+ v-model="scope.row.warningUnit" :disabled="isBindPlan">
|
|
|
|
|
+ </DictSelection>
|
|
|
|
|
+
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+
|
|
|
|
|
+ <el-table-column prop="urgent" label="紧急程度" width="120">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <el-form-item :prop="'ruleItems.' + 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 prop="name" label="事项" width="300">
|
|
<el-table-column prop="name" label="事项" width="300">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<el-form-item :prop="'ruleItems.' + scope.$index + '.name'" label-width="0"
|
|
<el-form-item :prop="'ruleItems.' + scope.$index + '.name'" label-width="0"
|
|
@@ -92,7 +108,7 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column prop="content" label="内容" width="500">
|
|
|
|
|
|
|
+ <el-table-column prop="content" label="内容" width="300">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<el-form-item :prop="'ruleItems.' + scope.$index + '.content'" label-width="0"
|
|
<el-form-item :prop="'ruleItems.' + scope.$index + '.content'" label-width="0"
|
|
|
:rules="contentConfigFormRules.content">
|
|
:rules="contentConfigFormRules.content">
|
|
@@ -187,15 +203,25 @@ export default {
|
|
|
uploadList: [],
|
|
uploadList: [],
|
|
|
formData: {},
|
|
formData: {},
|
|
|
contentConfigFormRules: {
|
|
contentConfigFormRules: {
|
|
|
|
|
+ maxWarningValue: [
|
|
|
|
|
+ { required: true, message: '请输入预警值', trigger: 'blur' }
|
|
|
|
|
+ ],
|
|
|
|
|
+ minWarningValue: [
|
|
|
|
|
+ { required: true, message: '请输入预警值', trigger: 'blur' }
|
|
|
|
|
+ ],
|
|
|
|
|
+ warningUnit: [
|
|
|
|
|
+ { required: true, message: '请输入预警时间单位', trigger: 'blur' }
|
|
|
|
|
+ ],
|
|
|
|
|
+ urgent: [
|
|
|
|
|
+ { required: true, message: '请选择紧急程度', trigger: 'blur' }
|
|
|
|
|
+ ],
|
|
|
name: [
|
|
name: [
|
|
|
{ required: true, message: '请输入规则名称', trigger: 'blur' }
|
|
{ required: true, message: '请输入规则名称', trigger: 'blur' }
|
|
|
],
|
|
],
|
|
|
ruleType: [
|
|
ruleType: [
|
|
|
{ required: true, message: '请选择规则类型', trigger: 'change' }
|
|
{ required: true, message: '请选择规则类型', trigger: 'change' }
|
|
|
],
|
|
],
|
|
|
- warningValue: [
|
|
|
|
|
- { required: true, message: '请输入预警值', trigger: 'blur' }
|
|
|
|
|
- ],
|
|
|
|
|
|
|
+
|
|
|
// contentImage: [
|
|
// contentImage: [
|
|
|
// { required: false, message: '请上传图片', trigger: 'blur' }
|
|
// { required: false, message: '请上传图片', trigger: 'blur' }
|
|
|
// ],
|
|
// ],
|
|
@@ -486,4 +512,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// }</style>
|
|
|
|
|
|
|
+::v-deep .el-table .cell {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+}
|
|
|
|
|
+</style>
|