修改手动创建任务触发条件
This commit is contained in:
parent
988c4a3ad7
commit
4b76b9caae
@ -28,22 +28,121 @@
|
||||
</el-form>
|
||||
<div class="chufatitle">
|
||||
<span>触发条件</span>
|
||||
<el-button type="primary" plain size="mini" @click="addtriggerCondition"
|
||||
<!-- <el-button type="primary" plain size="mini" @click="addtriggerCondition"
|
||||
>添加触发条件</el-button
|
||||
>
|
||||
> -->
|
||||
</div>
|
||||
<el-form ref="updata" :model="updata" label-width="80px">
|
||||
<div
|
||||
<div class="nodesname">
|
||||
<div
|
||||
class="node"
|
||||
v-for="(item, index) in updata.triggerConditionList"
|
||||
:key="index"
|
||||
>
|
||||
<!-- 且或 -->
|
||||
<div style="width: 60px; position: absolute; left: 3%; top: 220px;background-color: red;"
|
||||
v-if="updata.triggerConditionList.length === 3">
|
||||
<img src="@/assets/images/images.png" class="login-code-img" />
|
||||
<el-select v-model="item.triggerLogic" style="width: 60px" placeholder=""
|
||||
@change="changetriggerLogicsname($event, index)">
|
||||
<el-option v-for="itemh in optionslistS" :key="itemh.dictValue" :label="itemh.dictLabel"
|
||||
:value="itemh.dictValue">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<!-- 诊断 在这里-->
|
||||
<el-select
|
||||
v-model="item.triggerConditionCode"
|
||||
style="width: 120px"
|
||||
@change="changetriggerConditionName($event, index)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in optionsname"
|
||||
:key="item.dictValue"
|
||||
:label="item.dictLabel"
|
||||
:value="item.dictValue"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<!-- 包含 -->
|
||||
<el-select
|
||||
v-model="item.triggerConditionOperator"
|
||||
style="width: 100px"
|
||||
@change="changetriggerLogic($event, index)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in item.optionstriggerConditionOperator"
|
||||
:key="item.dictValue"
|
||||
:label="item.dictLabel"
|
||||
:value="item.dictValue"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-input
|
||||
v-if="item.dictDataType == 'STRING'||!dictDataType"
|
||||
v-model="item.triggerConditionValue"
|
||||
style="width: 300px"
|
||||
placeholder="请输入触发条件"
|
||||
maxlength="100"
|
||||
></el-input>
|
||||
<el-select
|
||||
v-if="item.dictDataType == 'SELECT'"
|
||||
v-model="item.triggerConditionValue"
|
||||
style="width: 300px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in ConditionValue"
|
||||
:key="item.dictValue"
|
||||
:label="item.dictLabel"
|
||||
:value="item.dictValue"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
v-if="item.dictDataType == 'DATE'"
|
||||
v-model="item.triggerConditionValue"
|
||||
style="width: 300px"
|
||||
type="date"
|
||||
placeholder="选择日期时间"
|
||||
value-format="yyyy-MM-dd"
|
||||
>
|
||||
</el-date-picker>
|
||||
<!-- {{ item }} -->
|
||||
<el-input
|
||||
v-if="item.dictDataType == 'DECIMAL'"
|
||||
style="width: 300px"
|
||||
v-model="item.triggerConditionValue"
|
||||
type="number"
|
||||
:min="0"
|
||||
></el-input>
|
||||
<span class="icon">
|
||||
<el-button
|
||||
type="danger"
|
||||
class="el-icon-remove-outline"
|
||||
plain
|
||||
@click="delitemlistname(index)"
|
||||
v-if="index != 0"
|
||||
></el-button>
|
||||
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
class="el-icon-circle-plus-outline"
|
||||
@click="addtriggerCondition(index)"
|
||||
v-if="index == 0"
|
||||
>添加属性</el-button
|
||||
>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div
|
||||
class="node"
|
||||
v-for="(item, index) in updata.triggerConditionList"
|
||||
:key="index"
|
||||
:style="updata.triggerConditionList.length > 1 ? '' : 'margin:0'"
|
||||
>
|
||||
<div
|
||||
style="display: inline-block; margin-right: 20px; font-size: 14px"
|
||||
>
|
||||
触发条件{{ index + 1 }}
|
||||
</div>
|
||||
|
||||
<el-select v-model="item.triggerConditionName" style="width: 120px">
|
||||
<el-option label="诊断" value="DIAGNOSIS" />
|
||||
<el-option label="换药日期" value="DRESSING_CHANGE_DATE" />
|
||||
@ -69,7 +168,9 @@
|
||||
class="el-icon-delete"
|
||||
@click="delitem(item, index, updata.triggerConditionList)"
|
||||
></i>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- <el-button @click="submit" style="float:right">保存触发条件</el-button> -->
|
||||
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="nodes">
|
||||
@ -391,7 +492,7 @@
|
||||
style="width: 100px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in optionslistS"
|
||||
v-for="item in optionslisttime"
|
||||
:key="item.dictValue"
|
||||
:label="item.dictLabel"
|
||||
:value="item.dictValue"
|
||||
@ -463,16 +564,18 @@ import message from "../components/message.vue";
|
||||
import question from "../components/question.vue";
|
||||
import { signrouteadd } from "@/api/system/ManuallyCreatingTasks";
|
||||
import { getAgencytype } from "@/api/system/agency";
|
||||
import { list } from "@/api/system/specialDiseaseNode";
|
||||
import { list,triggerCondition,getList, } from "@/api/system/specialDiseaseNode";
|
||||
|
||||
export default {
|
||||
components: { scriptphone, question, propaganda, scripts, message },
|
||||
name: "ManuallyCreatingTasks",
|
||||
data() {
|
||||
return {
|
||||
optionsname:'',
|
||||
options: [],
|
||||
optionslist: [],
|
||||
optionslistS: [],
|
||||
optionslisttime:[],
|
||||
parentDictCodelist: [],
|
||||
updata: {
|
||||
signPatientRecordId: "",
|
||||
@ -510,6 +613,11 @@ export default {
|
||||
appletPushSign: "0",
|
||||
phonePushSign: "0",
|
||||
},
|
||||
// updata: {
|
||||
// suitRange: "",
|
||||
// routeId: "",
|
||||
// triggerConditionList: [],
|
||||
// },
|
||||
list: [
|
||||
{
|
||||
routeNodeDay: "",
|
||||
@ -530,12 +638,20 @@ export default {
|
||||
},
|
||||
],
|
||||
listindex: 0,
|
||||
optionstriggerConditionOperator: [], // 将这部分选项的
|
||||
dictDataType: "",
|
||||
|
||||
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.infolist();
|
||||
this.infolistword();
|
||||
this.infolistMESSAGE();
|
||||
this.infolistoptionslistS();
|
||||
this.optiononditionOperators();
|
||||
this.optiononditionOperator();
|
||||
|
||||
this.formInline = this.list[0];
|
||||
this.updata.signPatientRecordId = this.$route.query.signPatientRecordId;
|
||||
this.updata.patientId = this.$route.query.patientId;
|
||||
@ -544,6 +660,114 @@ export default {
|
||||
this.updata.departmentName = this.$route.query.departmentName;
|
||||
},
|
||||
methods: {
|
||||
// 且或
|
||||
infolistoptionslistS() {
|
||||
var dictType = "trigger_logic";
|
||||
getAgencytype(dictType).then((res) => {
|
||||
this.optionslistS = res.data;
|
||||
});
|
||||
},
|
||||
// 诊断
|
||||
optiononditionOperators() {
|
||||
var dictType = "trigger_condition_name";
|
||||
getAgencytype(dictType).then((res) => {
|
||||
this.optionsname = res.data;
|
||||
});
|
||||
},
|
||||
// 包含
|
||||
optiononditionOperator() {
|
||||
var dictType = "trigger_condition_operator";
|
||||
getAgencytype(dictType).then((res) => {
|
||||
this.updata.triggerConditionList.optionstriggerConditionOperator = res.data;
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 包含
|
||||
changetriggerLogic(e, index) {
|
||||
// this.openlist.triggerConditionList[index].triggerConditionOperatorName =
|
||||
// this.openlist.triggerConditionList[index].optionstriggerConditionOperator.find(
|
||||
// (el) => el.dictValue == e
|
||||
// ).dictLabel;
|
||||
this.updata.triggerConditionList[index].triggerConditionValue = null;
|
||||
},
|
||||
|
||||
// 诊断
|
||||
changetriggerConditionName(e, index) {
|
||||
var dictType = e;
|
||||
getAgencytype(dictType).then((res) => {
|
||||
this.ConditionValue = res.data;
|
||||
});
|
||||
this.updata.triggerConditionList[index].triggerConditionName =
|
||||
this.optionsname.find((el) => el.dictValue == e).dictLabel;
|
||||
this.updata.triggerConditionList[index].triggerConditionValue = null;
|
||||
this.updata.triggerConditionList[index].triggerConditionOperator = null
|
||||
this.dictDataType = this.optionsname.find(
|
||||
(el) => el.dictValue == e
|
||||
).dictDataType;
|
||||
this.handlelist(index)
|
||||
this.updata.triggerConditionList[index].dictDataType =
|
||||
this.optionsname.find((el) => el.dictValue == e).dictDataType;
|
||||
},
|
||||
|
||||
// 包含或等号接口
|
||||
handlelist(index) {
|
||||
var dictType = "trigger_condition_operator";
|
||||
// this.openlist.triggerConditionList[index].optionstriggerConditionOperator=[]
|
||||
getList(dictType, this.dictDataType).then((res) => {
|
||||
this.$set(this.updata.triggerConditionList[index], 'optionstriggerConditionOperator', res.data)
|
||||
this.$forceUpdate();
|
||||
});
|
||||
},
|
||||
// 包含
|
||||
optiononditionOperator() {
|
||||
var dictType = "trigger_condition_operator";
|
||||
getAgencytype(dictType).then((res) => {
|
||||
this.updata.triggerConditionList.optionstriggerConditionOperator = res.data;
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
// 且或
|
||||
changetriggerLogicsname(e, index) {
|
||||
this.updata.triggerConditionList[index].triggerLogic = e;
|
||||
this.updata.triggerConditionList[index].triggerLogicName =
|
||||
this.optionslistS.find((el) => el.dictValue == e).dictLabel;
|
||||
},
|
||||
// 弹框确定
|
||||
// submit() {
|
||||
// const loading = this.$loading({
|
||||
// lock: true,
|
||||
// text: "Loading",
|
||||
// spinner: "el-icon-loading",
|
||||
// background: "rgba(0, 0, 0, 0.7)",
|
||||
// });
|
||||
|
||||
// this.updata.triggerConditionList.forEach((e) => {
|
||||
// e.routeId = this.$route.query.id;
|
||||
// e.routeName = this.$route.query.routeName;
|
||||
// delete e.optionstriggerConditionOperator
|
||||
|
||||
// });
|
||||
// delete this.updata.triggerConditionList.optionstriggerConditionOperator
|
||||
// loading.close();
|
||||
// console.log(this.updata,'updata')
|
||||
// return;
|
||||
// triggerCondition(this.updata).then((res) => {
|
||||
// if (res.code == 200) {
|
||||
// this.$notify({
|
||||
// type: "success",
|
||||
// title: "提示",
|
||||
// message: "修改触发条件成功",
|
||||
// });
|
||||
// this.itemlist.routeName = res.data;
|
||||
// }
|
||||
// this.infolist();
|
||||
// // this.handlelist();
|
||||
// this.openfalse();
|
||||
// });
|
||||
// },
|
||||
infolist() {
|
||||
var dictType = "suit_range";
|
||||
getAgencytype(dictType).then((res) => {
|
||||
@ -560,7 +784,7 @@ export default {
|
||||
infolistMESSAGE() {
|
||||
var dictType = "redial_times";
|
||||
getAgencytype(dictType).then((res) => {
|
||||
this.optionslistS = res.data;
|
||||
this.optionslisttime = res.data;
|
||||
// this.taskinfo();
|
||||
});
|
||||
},
|
||||
@ -574,15 +798,30 @@ export default {
|
||||
list(this.parentDictCode).then((res) => {
|
||||
this.parentDictCodelist = res.rows;
|
||||
});
|
||||
},
|
||||
// 删除属性
|
||||
delitemlistname(index, item) {
|
||||
this.updata.triggerConditionList.splice(index, 1);
|
||||
},
|
||||
addtriggerCondition() {
|
||||
this.updata.triggerConditionList.push({
|
||||
var obj = {
|
||||
routeId: "",
|
||||
routeName: "",
|
||||
triggerConditionName: "",
|
||||
triggerConditionOperator: "",
|
||||
triggerConditionValue: "",
|
||||
});
|
||||
|
||||
triggerConditionOperatorName: "",
|
||||
dictDataType: "STRING",
|
||||
triggerLogic: "AND",
|
||||
triggerLogicName: "",
|
||||
};
|
||||
|
||||
if (this.updata.triggerConditionList.length == 3) {
|
||||
this.$message.error("至多仅支持两种属性");
|
||||
} else {
|
||||
this.updata.triggerConditionList.push(obj);
|
||||
}
|
||||
},
|
||||
//宣教传值
|
||||
propagandaontemplate(item) {
|
||||
@ -676,6 +915,13 @@ export default {
|
||||
el.templateType = "SCRIPT";
|
||||
}
|
||||
});
|
||||
this.updata.triggerConditionList.forEach((e) => {
|
||||
e.routeId = this.$route.query.id;
|
||||
e.routeName = this.$route.query.routeName;
|
||||
delete e.optionstriggerConditionOperator
|
||||
|
||||
});
|
||||
delete this.updata.triggerConditionList.optionstriggerConditionOperator
|
||||
console.log(this.updata,'updata')
|
||||
// return
|
||||
|
||||
@ -712,6 +958,17 @@ export default {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
.login-code-img {
|
||||
width: 62px;
|
||||
height: 100px;
|
||||
position: absolute;
|
||||
background: red;
|
||||
z-index: 0;
|
||||
// top: 17%;
|
||||
position: absolute;
|
||||
// left: 2%;
|
||||
top: -75%;
|
||||
}
|
||||
.PushMethodrg {
|
||||
background-color: #fff;
|
||||
width: 100%;
|
||||
@ -749,14 +1006,31 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.node {
|
||||
.nodesname {
|
||||
// margin-left: 6%;
|
||||
// width: 660px;
|
||||
// display: flex;
|
||||
// flex-wrap: wrap;
|
||||
// position: relative;
|
||||
// padding-left: 20px;
|
||||
.node {
|
||||
margin-bottom: 10px;
|
||||
margin-left: 102px;
|
||||
|
||||
.el-icon-delete {
|
||||
padding-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
.selectnamelist {
|
||||
// position: absolute;
|
||||
// right: 54px;
|
||||
// top: -8px;
|
||||
}
|
||||
|
||||
|
||||
.PushMethod {
|
||||
height: 100px;
|
||||
padding: 20px;
|
||||
|
||||
@ -192,52 +192,7 @@
|
||||
<el-button @click="openfalse">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 修改触发条件 -->
|
||||
<!-- <el-dialog
|
||||
title="修改触发条件"
|
||||
:visible.sync="editopen"
|
||||
width="900px"
|
||||
append-to-body
|
||||
>
|
||||
|
||||
<el-descriptions title="触发条件"> </el-descriptions>
|
||||
<el-form
|
||||
ref="updataform"
|
||||
:model="updataform"
|
||||
:rules="rules"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-select
|
||||
v-model="updataform.triggerConditionName"
|
||||
style="width: 120px"
|
||||
>
|
||||
<el-option label="诊断" value="DIAGNOSIS" />
|
||||
<el-option label="换药日期" value="DRESSING_CHANGE_DATE" />
|
||||
<el-option label="治疗方式" value="TREATMENT_METHOD" />
|
||||
<el-option label="手术名称" value="SURGICAL_NAME" />
|
||||
<el-option label="药品名称" value="DRUG_NAME" />
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="updataform.triggerConditionOperator"
|
||||
style="width: 100px"
|
||||
>
|
||||
<el-option label="包含" value="CONTAIN" />
|
||||
<el-option label="不包含" value="NOT_CONTAIN" />
|
||||
<el-option label="等于" value="EQUAL_TO" />
|
||||
<el-option label="不等于" value="NOT_EQUAL_TO" />
|
||||
</el-select>
|
||||
|
||||
<el-input
|
||||
v-model="updataform.triggerConditionValue"
|
||||
style="width: 300px"
|
||||
placeholder="请输入触发条件"
|
||||
></el-input>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="editupload">确 定</el-button>
|
||||
<el-button @click="editopenfalse">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -760,3 +715,4 @@ export default {
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user