|
@@ -235,6 +235,7 @@
|
|
|
default-first-option
|
|
|
clearable
|
|
|
placeholder="请选择开始节点"
|
|
|
+ @change="changeSelect"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in tableOptionser"
|
|
@@ -256,9 +257,10 @@
|
|
|
default-first-option
|
|
|
clearable
|
|
|
placeholder="请选择开始位置"
|
|
|
+ @change="changebegin"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="item in tableOptionser"
|
|
|
+ v-for="item in tableOptionbegin"
|
|
|
:key="item.v ? item.v : item.planDepartureApt"
|
|
|
:label="item.k ? item.k : item.planDepartureApt"
|
|
|
:value="item.v ? item.v : item.planDepartureApt"
|
|
@@ -277,9 +279,10 @@
|
|
|
default-first-option
|
|
|
clearable
|
|
|
placeholder="请选择结束节点"
|
|
|
+ @change="changeSelected"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="item in tableOptionser"
|
|
|
+ v-for="item in tableOptionend"
|
|
|
:key="item.v ? item.v : item.planDepartureApt"
|
|
|
:label="item.k ? item.k : item.planDepartureApt"
|
|
|
:value="item.v ? item.v : item.planDepartureApt"
|
|
@@ -298,9 +301,10 @@
|
|
|
default-first-option
|
|
|
clearable
|
|
|
placeholder="请选择结束位置"
|
|
|
+ @change="changeEndPos"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="item in tableOptionser"
|
|
|
+ v-for="item in tableOptionendPos"
|
|
|
:key="item.v ? item.v : item.planDepartureApt"
|
|
|
:label="item.k ? item.k : item.planDepartureApt"
|
|
|
:value="item.v ? item.v : item.planDepartureApt"
|
|
@@ -331,6 +335,8 @@ const noMore = ref<Boolean>(false);
|
|
|
const rowTitle = ref<String>("");
|
|
|
const tableCols = ref([]); //表头数据
|
|
|
const serviceId = ref<String>("");
|
|
|
+const beginPositionId = ref<String>("");
|
|
|
+const endPositionId = ref<String>("");
|
|
|
const tableObj = ref({}); //增删改数据缓存
|
|
|
const tableForm = reactive({
|
|
|
alarmSceneId: "",
|
|
@@ -356,6 +362,9 @@ const tableForms = reactive({
|
|
|
event: "",
|
|
|
}); //弹窗内容
|
|
|
const tableOptionser = ref<Array>([]); //下拉
|
|
|
+const tableOptionbegin = ref<Array>([]); //下拉
|
|
|
+const tableOptionend = ref<Array>([]); //下拉
|
|
|
+const tableOptionendPos = ref<Array>([]); //下拉
|
|
|
const flag = ref<Boolean>(false); //弹窗开关
|
|
|
const type = ref<String>(""); //判断是否删除
|
|
|
const msgTitle = ref<String>("新增报警预警策略"); //弹窗标题
|
|
@@ -491,6 +500,18 @@ const sysServiceWarn = async () => {
|
|
|
// this.loading = false;
|
|
|
}
|
|
|
};
|
|
|
+//获取弹框-下拉数据
|
|
|
+const getSelectData = async (id, name) => {
|
|
|
+ const { code, returnData } = await Query({
|
|
|
+ id,
|
|
|
+ dataContent: name ? [name] : name === null ? [null] : [],
|
|
|
+ });
|
|
|
+ if (code == 0) {
|
|
|
+ return returnData.listValues;
|
|
|
+ } else {
|
|
|
+ return [];
|
|
|
+ }
|
|
|
+};
|
|
|
//获取表格数据
|
|
|
const getQuery = async () => {
|
|
|
try {
|
|
@@ -512,6 +533,25 @@ const getQuery = async () => {
|
|
|
}
|
|
|
tableData.value.push(...returnData.listValues);
|
|
|
tableCols.value = returnData.columnSet;
|
|
|
+ returnData.columnSet.forEach((item) => {
|
|
|
+ if (item.listqueryTemplateID && item.columnName === "beginNode") {
|
|
|
+ tableOptionser.value = getSelectData(item.listqueryTemplateID);
|
|
|
+ } else if (
|
|
|
+ item.listqueryTemplateID &&
|
|
|
+ item.columnName === "beginPosition"
|
|
|
+ ) {
|
|
|
+ tableOptionbegin.value = getSelectData(item.listqueryTemplateID);
|
|
|
+ beginPositionId.value = item.listqueryTemplateID;
|
|
|
+ } else if (item.listqueryTemplateID && item.columnName === "endNode") {
|
|
|
+ tableOptionend.value = getSelectData(item.listqueryTemplateID);
|
|
|
+ } else if (
|
|
|
+ item.listqueryTemplateID &&
|
|
|
+ item.columnName === "endPosition"
|
|
|
+ ) {
|
|
|
+ tableOptionendPos.value = getSelectData(item.listqueryTemplateID);
|
|
|
+ endPositionId.value = item.listqueryTemplateID;
|
|
|
+ }
|
|
|
+ });
|
|
|
tableCols.value.forEach((element) => {
|
|
|
element.label = element.columnLabel;
|
|
|
element.key = element.columnName;
|
|
@@ -524,6 +564,20 @@ const getQuery = async () => {
|
|
|
page.value--;
|
|
|
}
|
|
|
};
|
|
|
+//开始节点
|
|
|
+const changeSelect = (value) => {
|
|
|
+ tableOptionbegin.value = getSelectData(beginPositionId, value);
|
|
|
+ tableForms.beginPosition = "";
|
|
|
+};
|
|
|
+//开始位置
|
|
|
+const changebegin = (value) => {};
|
|
|
+//结束节点
|
|
|
+const changeSelected = (value) => {
|
|
|
+ tableOptionendPos.value = getSelectData(endPositionId, value);
|
|
|
+ tableForms.endPosition = "";
|
|
|
+};
|
|
|
+//结束位置
|
|
|
+const changeEndPos = (value) => {};
|
|
|
//确认提交
|
|
|
const warningEditForm: any = ref(null);
|
|
|
const submitForm = () => {
|