|
@@ -148,7 +148,7 @@
|
|
|
<el-col v-if="ruleForm.qztj.length" :span="24">
|
|
|
<el-card v-for="(item, index) of ruleForm.qztj" :key="'qztj'+index" class="box-card" shadow="never">
|
|
|
<div slot="header" class="clearfix box-card_header span">
|
|
|
- <spasn class="text">前置条件{{ index + 1 }}</spasn>
|
|
|
+ <span class="text">前置条件{{ index + 1 }}</span>
|
|
|
<span class="ml40">
|
|
|
<span>流向</span>
|
|
|
<el-radio v-model="item.condition_type" :label="1" class="ml40">过滤</el-radio>
|
|
@@ -180,11 +180,7 @@
|
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
|
<el-select v-model="sItem.condition" filterable clearable placeholder="请选择" style="width: 100%;">
|
|
|
- <el-option label="包含" value="包含" />
|
|
|
- <el-option label="不包含" value="不包含" />
|
|
|
- <el-option label="大于" value="大于" />
|
|
|
- <el-option label="小于" value="小于" />
|
|
|
- <el-option label="等于" value="等于" />
|
|
|
+ <el-option v-for="(item,bindex) in selectFormula" :key="bindex" :label="item.formula" :value="item.formula" />
|
|
|
</el-select>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
@@ -203,22 +199,25 @@
|
|
|
</div>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
- <!-- 质控依据 -->
|
|
|
- <el-col v-if="ruleForm.zkyj.length" :span="24">
|
|
|
- <el-card v-for="(item, index) of ruleForm.zkyj" :key="'zkyj'+index" class="box-card" shadow="never">
|
|
|
+
|
|
|
+ <!-- 质控逻辑 -->
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-divider />
|
|
|
+ <el-card v-for="(item, index) of ruleForm.rule" :key="'rule'+index" class="box-card" shadow="never">
|
|
|
<div slot="header" class="clearfix box-card_header span">
|
|
|
- <spasn class="text">质控依据{{ index + 1 }}</spasn>
|
|
|
- <i class="el-icon-delete" style="float: right; margin-top: 13px; cursor: pointer;" @click="onDeleteZKYJ(index)" />
|
|
|
+ <span class="text">质控逻辑</span>
|
|
|
+ <span class="ml40">
|
|
|
+ <span>流向</span>
|
|
|
+ <el-radio v-model="item.detail_status" :label="1" class="ml40">正确</el-radio>
|
|
|
+ <el-radio v-model="item.detail_status" :label="2">错误</el-radio>
|
|
|
+ </span>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <el-row v-for="(sItem, sIndex) of item.custom_basis" :key="'tj'+sIndex" :gutter="12" class="mb12">
|
|
|
+ <el-row v-for="(sItem, sIndex) of item.condition_content" :key="'tj'+sIndex" :gutter="12" class="mb12">
|
|
|
<el-col :span="2">
|
|
|
- <div class="text-right">条件{{ sIndex + 1 }}</div>
|
|
|
- </el-col>
|
|
|
- <el-col :span="6">
|
|
|
- <el-input v-model="sItem.input1" clearable placeholder="请输入" style="width: 100%;" />
|
|
|
+ <div class="text-right">逻辑{{ sIndex + 1 }}</div>
|
|
|
</el-col>
|
|
|
- <el-col :span="6">
|
|
|
+ <el-col :span="7">
|
|
|
<el-cascader
|
|
|
v-model="sItem.param1"
|
|
|
:options="objects"
|
|
@@ -235,30 +234,60 @@
|
|
|
style="width: 100%;"
|
|
|
/>
|
|
|
</el-col>
|
|
|
- <el-col :span="6">
|
|
|
- <el-input v-model="sItem.input2" clearable placeholder="请输入" style="width: 100%;" />
|
|
|
+ <el-col :span="4">
|
|
|
+ <el-select v-model="sItem.condition" filterable clearable placeholder="请选择" style="width: 100%;">
|
|
|
+ <el-option v-for="(item,bindex) in selectFormula" :key="bindex" :label="item.formula" :value="item.formula" />
|
|
|
+ </el-select>
|
|
|
+ </el-col>
|
|
|
+ <el-col v-if=" sItem.condition == '等于' || sItem.condition == '不等于'|| sItem.condition == '包含' || sItem.condition == '不包含'" :span="4">
|
|
|
+ <el-autocomplete
|
|
|
+ v-model="sItem.param2"
|
|
|
+ class="inline-input"
|
|
|
+ value-key="name"
|
|
|
+ :fetch-suggestions="querySearch"
|
|
|
+ placeholder="请输入"
|
|
|
+ style="width: 100%;"
|
|
|
+ @select="handleSelect"
|
|
|
+ />
|
|
|
+ </el-col>
|
|
|
+ <el-col v-if="sItem.condition == '范围'" :span="3">
|
|
|
+ <el-input v-model="sItem.fanwei_1" clearable placeholder="请输入" style="width: 100%;" />
|
|
|
+ </el-col>
|
|
|
+ <el-col v-if="sItem.condition == '范围'" :span="1">
|
|
|
+ <div class="text-right">至</div>
|
|
|
+ </el-col>
|
|
|
+ <el-col v-if="sItem.condition == '范围'" :span="3">
|
|
|
+ <el-input v-model="sItem.fanwei_2" clearable placeholder="请输入" style="width: 100%;" />
|
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
|
- <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="onAddTJZKYJ(index, sIndex)" />
|
|
|
- <el-button v-if="item.custom_basis.length !== 1" size="mini" type="primary" plain icon="el-icon-minus" @click="onDeleteTJZKYJ(index, sIndex)" />
|
|
|
+ <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="onAddGZ(index, sIndex)" />
|
|
|
+ <el-button v-if="item.condition_content.length !== 1" type="primary" size="mini" plain icon="el-icon-minus" @click="onDeleteGZ(index, sIndex)" />
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
+ <div class="span">
|
|
|
+ <span>规则之间的逻辑</span>
|
|
|
+ <el-radio v-model="item.condition_relation" :label="1" class="ml40">且(满足所有条件)</el-radio>
|
|
|
+ <el-radio v-model="item.condition_relation" :label="2">或(满足任意一条件)</el-radio>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
- <!-- 质控预警 -->
|
|
|
- <el-col v-if="ruleForm.zkyujing.length" :span="24">
|
|
|
- <el-card v-for="(item, index) of ruleForm.zkyujing" :key="'rule'+index" class="box-card" shadow="never">
|
|
|
+ <!-- 质控依据 -->
|
|
|
+ <el-col v-if="ruleForm.zkyj.length" :span="24">
|
|
|
+ <el-card v-for="(item, index) of ruleForm.zkyj" :key="'zkyj'+index" class="box-card" shadow="never">
|
|
|
<div slot="header" class="clearfix box-card_header span">
|
|
|
- <span class="text">质控预警{{ index + 1 }}</span>
|
|
|
- <i class="el-icon-delete" style="float: right; margin-top: 13px; cursor: pointer;" @click="onDeleteZKyujing(index)" />
|
|
|
+ <span class="text">质控依据{{ index + 1 }}</span>
|
|
|
+ <i class="el-icon-delete" style="float: right; margin-top: 13px; cursor: pointer;" @click="onDeleteZKYJ(index)" />
|
|
|
</div>
|
|
|
<div>
|
|
|
- <el-row v-for="(sItem, sIndex) of item.condition_content" :key="'tj'+sIndex" :gutter="12" class="mb12">
|
|
|
+ <el-row v-for="(sItem, sIndex) of item.custom_basis" :key="'tj'+sIndex" :gutter="12" class="mb12">
|
|
|
<el-col :span="2">
|
|
|
<div class="text-right">条件{{ sIndex + 1 }}</div>
|
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-input v-model="sItem.input1" clearable placeholder="请输入" style="width: 100%;" />
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
<el-cascader
|
|
|
v-model="sItem.param1"
|
|
|
:options="objects"
|
|
@@ -275,51 +304,33 @@
|
|
|
style="width: 100%;"
|
|
|
/>
|
|
|
</el-col>
|
|
|
- <el-col :span="4">
|
|
|
- <el-select v-model="sItem.condition" filterable clearable placeholder="请选择" style="width: 100%;">
|
|
|
- <el-option label="包含" value="包含" />
|
|
|
- <el-option label="不包含" value="不包含" />
|
|
|
- <el-option label="大于" value="大于" />
|
|
|
- <el-option label="小于" value="小于" />
|
|
|
- <el-option label="等于" value="等于" />
|
|
|
- </el-select>
|
|
|
- </el-col>
|
|
|
<el-col :span="6">
|
|
|
- <el-input v-model="sItem.param2" clearable placeholder="请输入" style="width: 100%;" />
|
|
|
+ <el-input v-model="sItem.input2" clearable placeholder="请输入" style="width: 100%;" />
|
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
|
- <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="onAddTJZKyujing(index, sIndex)" />
|
|
|
- <el-button v-if="item.custom_msg.length !== 1" size="mini" type="primary" plain icon="el-icon-minus" @click="onDeleteTJZKyujing(index, sIndex)" />
|
|
|
+ <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="onAddTJZKYJ(index, sIndex)" />
|
|
|
+ <el-button v-if="item.custom_basis.length !== 1" size="mini" type="primary" plain icon="el-icon-minus" @click="onDeleteTJZKYJ(index, sIndex)" />
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <!-- <div class="span">
|
|
|
- <span>条件之间的逻辑</span>
|
|
|
- <el-radio v-model="item.condition_relation" :label="1" class="ml40">且(满足所有条件)</el-radio>
|
|
|
- <el-radio v-model="item.condition_relation" :label="2">或(满足任意一条件)</el-radio>
|
|
|
- </div> -->
|
|
|
</div>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
- <!-- 质控逻辑 -->
|
|
|
- <el-col :span="24">
|
|
|
- <el-divider />
|
|
|
- <el-card v-for="(item, index) of ruleForm.rule" :key="'rule'+index" class="box-card" shadow="never">
|
|
|
+ <!-- 质控预警 -->
|
|
|
+ <el-col v-if="ruleForm.zkyujing.length" :span="24">
|
|
|
+
|
|
|
+ <el-card v-for="(item, index) of ruleForm.zkyujing" :key="'rule'+index" class="box-card" shadow="never">
|
|
|
<div slot="header" class="clearfix box-card_header span">
|
|
|
- <span class="text">质控逻辑</span>
|
|
|
- <span class="ml40">
|
|
|
- <span>流向</span>
|
|
|
- <el-radio v-model="item.detail_status" :label="1" class="ml40">正确</el-radio>
|
|
|
- <el-radio v-model="item.detail_status" :label="2">错误</el-radio>
|
|
|
- </span>
|
|
|
+ <span class="text">质控预警{{ index + 1 }}</span>
|
|
|
+ <i class="el-icon-delete" style="float: right; margin-top: 13px; cursor: pointer;" @click="onDeleteZKyujing(index)" />
|
|
|
</div>
|
|
|
<div>
|
|
|
- <el-row v-for="(sItem, sIndex) of item.condition_content" :key="'tj'+sIndex" :gutter="12" class="mb12">
|
|
|
+ <el-row :gutter="12" class="mb12">
|
|
|
<el-col :span="2">
|
|
|
- <div class="text-right">逻辑{{ sIndex + 1 }}</div>
|
|
|
+ <div class="text-right">事件</div>
|
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
+ <el-col :span="7">
|
|
|
<el-cascader
|
|
|
- v-model="sItem.param1"
|
|
|
+ v-model="item.custom_msg.param1"
|
|
|
:options="objects"
|
|
|
:props="{
|
|
|
expandTrigger: 'hover',
|
|
@@ -334,36 +345,36 @@
|
|
|
style="width: 100%;"
|
|
|
/>
|
|
|
</el-col>
|
|
|
- <el-col :span="4">
|
|
|
- <el-select v-model="sItem.condition" filterable clearable placeholder="请选择" style="width: 100%;">
|
|
|
- <el-option v-for="(item,index) in selectFormula" :key="index" :label="item.formula" :value="item.formula" />
|
|
|
- </el-select>
|
|
|
+ <el-col :span="1"> + </el-col>
|
|
|
+ <el-col :span="2"><el-input v-model="item.custom_msg.aftertime" clearable placeholder="请输入" style="width: 100%;" /></el-col>
|
|
|
+ <el-col :span="1">分</el-col>
|
|
|
+ <el-col :span="1">前</el-col>
|
|
|
+ <el-col :span="2"><el-input v-model="item.pre_warning_time" clearable placeholder="请输入" style="width: 100%;" /></el-col>
|
|
|
+ <el-col :span="2">分提醒</el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="12" class="mb12">
|
|
|
+ <el-col :span="2">
|
|
|
+ <div class="text-right">预警提示</div>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
- <el-autocomplete
|
|
|
- v-model="sItem.param2"
|
|
|
- class="inline-input"
|
|
|
- value-key="name"
|
|
|
- :fetch-suggestions="querySearch"
|
|
|
- placeholder="请输入"
|
|
|
- style="width: 100%;"
|
|
|
- @select="handleSelect"
|
|
|
- />
|
|
|
+ <el-input v-model="item.custom_msg.input1" clearable placeholder="请输入" style="width: 100%;" />
|
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
|
- <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="onAddGZ(index, sIndex)" />
|
|
|
- <el-button v-if="item.condition_content.length !== 1" type="primary" size="mini" plain icon="el-icon-minus" @click="onDeleteGZ(index, sIndex)" />
|
|
|
+ <el-input v-model="item.custom_msg.input3" clearable disabled placeholder="请输入" style="width: 100%;" />
|
|
|
</el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-input v-model="item.custom_msg.input2" clearable placeholder="请输入" style="width: 100%;" />
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="4" />
|
|
|
</el-row>
|
|
|
- <div class="span">
|
|
|
- <span>规则之间的逻辑</span>
|
|
|
+ <!-- <div class="span">
|
|
|
+ <span>条件之间的逻辑</span>
|
|
|
<el-radio v-model="item.condition_relation" :label="1" class="ml40">且(满足所有条件)</el-radio>
|
|
|
<el-radio v-model="item.condition_relation" :label="2">或(满足任意一条件)</el-radio>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
</div>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
-
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
@@ -432,7 +443,7 @@ export default {
|
|
|
{
|
|
|
param1: '',
|
|
|
param2: '',
|
|
|
- condition: '包含'
|
|
|
+ condition: '等于'
|
|
|
}
|
|
|
]
|
|
|
}
|
|
@@ -448,7 +459,7 @@ export default {
|
|
|
{
|
|
|
param1: '',
|
|
|
param2: '',
|
|
|
- condition: '包含'
|
|
|
+ condition: '等于'
|
|
|
}
|
|
|
]
|
|
|
}
|
|
@@ -464,12 +475,13 @@ export default {
|
|
|
],
|
|
|
zkyujing: [
|
|
|
{
|
|
|
- custom_msg: [{
|
|
|
+ pre_warning_time: '',
|
|
|
+ custom_msg: {
|
|
|
aftertime: '',
|
|
|
param1: '',
|
|
|
input1: '',
|
|
|
input2: ''
|
|
|
- }]
|
|
|
+ }
|
|
|
}
|
|
|
]
|
|
|
},
|
|
@@ -604,32 +616,19 @@ export default {
|
|
|
// 添加质控预警
|
|
|
onAddZKyujing() {
|
|
|
this.ruleForm.zkyujing.push({
|
|
|
- custom_msg: [{
|
|
|
+ pre_warning_time: '',
|
|
|
+ custom_msg: {
|
|
|
aftertime: '',
|
|
|
param1: '',
|
|
|
input1: '',
|
|
|
input2: ''
|
|
|
}
|
|
|
- ]
|
|
|
})
|
|
|
},
|
|
|
// 删除质控预警大框
|
|
|
onDeleteZKyujing(index) {
|
|
|
this.ruleForm.zkyujing.splice(index, 1)
|
|
|
},
|
|
|
- // 新增质控预警大框中_条件
|
|
|
- onAddTJZKyujing(index, sIndex) {
|
|
|
- this.ruleForm.zkyujing[index].custom_msg.push({
|
|
|
- aftertime: '',
|
|
|
- param1: '',
|
|
|
- input1: '',
|
|
|
- input2: ''
|
|
|
- })
|
|
|
- },
|
|
|
- // 删除质控预警大框中_条件
|
|
|
- onDeleteTJZKyujing(index, sIndex) {
|
|
|
- this.ruleForm.zkyujing[index].custom_basis.splice(sIndex, 1)
|
|
|
- },
|
|
|
|
|
|
// 添加质控依据
|
|
|
onAddZKYJ() {
|
|
@@ -755,8 +754,17 @@ export default {
|
|
|
status,
|
|
|
rule_type,
|
|
|
rule,
|
|
|
- qztj
|
|
|
+ qztj,
|
|
|
+ zkyj,
|
|
|
+ zkyujing
|
|
|
} = this.ruleForm
|
|
|
+ rule.forEach(ele => {
|
|
|
+ ele.condition_content.forEach(i => {
|
|
|
+ if (i.condition === '范围') {
|
|
|
+ i.param2 = (i.fanwei_1 ? i.fanwei_1 : '') + '-' + (i.fanwei_2 ? i.fanwei_2 : '')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
if (valid) {
|
|
|
if (this.judgeQZTJ() && this.judgeRule()) {
|
|
|
const params = {
|
|
@@ -771,7 +779,7 @@ export default {
|
|
|
error_level,
|
|
|
status,
|
|
|
rule_type,
|
|
|
- rule: [...rule, ...qztj]
|
|
|
+ rule: [...rule, ...qztj, ...zkyj, ...zkyujing]
|
|
|
}
|
|
|
if (this.data.row.id) {
|
|
|
params.id = this.data.row.id
|