zhaoke 1 jaar geleden
bovenliggende
commit
113391bce0
3 gewijzigde bestanden met toevoegingen van 124 en 17 verwijderingen
  1. 2 2
      public/config.js
  2. 83 15
      src/views/systemSettings/warningEdit/index.vue
  3. 39 0
      src/views/systemSettings/warningSet/index.vue

+ 2 - 2
public/config.js

@@ -79,7 +79,7 @@ var NEW_DATACONTENT_ID = [
   11, //节点查询
   12, //位置查询
   13, //预警报警场景维护
-  14, //预警报警策略维护
+  15, //预警报警策略维护
 ];
 
 var DATACONTENT_ID = {
@@ -193,7 +193,7 @@ var DATACONTENT_ID = {
   sysServiceWzId: 12, //预警报警-位置查询
   sysServiceCjId: 13, //预警报警-场景维护
   sysServiceCjIds: 10013, //预警报警-场景维护
-  sysServiceClId: 14, //预警报警-策略维护
+  sysServiceClId: 15, //预警报警-策略维护
   sysServiceClIds: 10014,
   sysQueryEditId: 24, //系统设置-查询模板-编辑-根据id获取服务
   sysQueryChildTabId: 25, //系统设置-查询模板-列设置-表格-id

+ 83 - 15
src/views/systemSettings/warningEdit/index.vue

@@ -23,6 +23,14 @@
               </el-select>
             </el-form-item>
           </div>
+          <div class="outersurface pd30">
+            <el-form-item label="国内国际" size="default" prop="ditype" :rules="formRules.isNotNull">
+              <el-select style="width: 100%" v-model="tableForm.ditype" class="input-shadow" filterable allow-create default-first-option placeholder="请选择国内国际">
+                <el-option v-for="(item,index) in ditypeAll" :key="index" :label="item.k" :value="item.v">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </div>
           <div class="outersurface pd30">
             <el-form-item label="起飞机场" size="default" prop="departmentAirport" :rules="formRules.isNotNull">
               <el-select style="width: 100%" v-model="tableForm.departmentAirport" class="input-shadow" filterable allow-create default-first-option clearable placeholder="请选择起飞机场">
@@ -82,7 +90,7 @@
             </el-col>
             <el-col :span="12">
               <el-form-item label="计算依据" size="default">
-                <el-select style="width: 100%" v-model="tableForms.calculationBasis" class="input-shadow" filterable default-first-option clearable placeholder="请选择计算依据">
+                <el-select style="width: 100%" v-model="tableForms.calculationBasis" class="input-shadow" filterable default-first-option placeholder="请选择计算依据">
                   <el-option v-for="item in calculationBasis" :key="item.v ? item.v : item.planDepartureApt" :label="item.k ? item.k : item.planDepartureApt" :value="item.v ? item.v : item.planDepartureApt">
                   </el-option>
                 </el-select>
@@ -183,11 +191,12 @@ const tableForm = reactive({
   startDate: null,
   endDate: null,
   event: 2,
+  ditype: "ALL",
 }); //报警预警场景
 const tableForms = reactive<any>({
   alarmStrategyID: null,
   StrategyName: null,
-  calculationBasis: null,
+  calculationBasis: "1",
   warningDuration: null,
   alarmDuration: null,
   beginNode: null,
@@ -214,6 +223,20 @@ const calculationBasis = ref<any>([
     v: "0",
   },
 ]); //下拉
+const ditypeAll = ref<any>([
+  {
+    k: "全部",
+    v: "ALL",
+  },
+  {
+    k: "国内",
+    v: "DOM",
+  },
+  {
+    k: "国际",
+    v: "INT",
+  },
+]);
 const flag = ref<boolean>(false); //弹窗开关
 const type = ref<string>(""); //判断是否删除
 const msgTitle = ref<string>("新增报警预警策略"); //弹窗标题
@@ -259,7 +282,7 @@ const resetForm = () => {
   flag.value = false;
   tableForms.alarmStrategyID = null;
   tableForms.StrategyName = null;
-  tableForms.calculationBasis = null;
+  // tableForms.calculationBasis = null;
   tableForms.warningDuration = null;
   tableForms.alarmDuration = null;
   tableForms.beginNode = null;
@@ -447,6 +470,22 @@ const getQuery = async () => {
         columnDescribe: "计算依据",
         needSort: 0,
         needFilters: 1,
+        needShow: 0,
+        needGroup: 0,
+        dataType: "int",
+        listqueryTemplateID: 1803423,
+        needCount: null,
+        orderNumber: null,
+        needSearch: null,
+      },
+      {
+        queryTemplateColumnSetID: 292,
+        queryTemplateID: 18033,
+        columnName: "calculationBasisName",
+        columnLabel: "计算依据",
+        columnDescribe: "计算依据",
+        needSort: 0,
+        needFilters: 1,
         needShow: 1,
         needGroup: 0,
         dataType: "int",
@@ -495,6 +534,22 @@ const getQuery = async () => {
         columnDescribe: "基准节点",
         needSort: 0,
         needFilters: 1,
+        needShow: 0,
+        needGroup: 0,
+        dataType: "varchar",
+        listqueryTemplateID: 1803424,
+        needCount: null,
+        orderNumber: null,
+        needSearch: null,
+      },
+      {
+        queryTemplateColumnSetID: 295,
+        queryTemplateID: 18033,
+        columnName: "beginNodeName",
+        columnLabel: "基准节点",
+        columnDescribe: "基准节点",
+        needSort: 0,
+        needFilters: 1,
         needShow: 1,
         needGroup: 0,
         dataType: "varchar",
@@ -527,6 +582,22 @@ const getQuery = async () => {
         columnDescribe: "报警节点",
         needSort: 0,
         needFilters: 1,
+        needShow: 0,
+        needGroup: 0,
+        dataType: "varchar",
+        listqueryTemplateID: 1803424,
+        needCount: null,
+        orderNumber: null,
+        needSearch: null,
+      },
+      {
+        queryTemplateColumnSetID: 297,
+        queryTemplateID: 18033,
+        columnName: "endNodeName",
+        columnLabel: "报警节点",
+        columnDescribe: "报警节点",
+        needSort: 0,
+        needFilters: 1,
         needShow: 1,
         needGroup: 0,
         dataType: "varchar",
@@ -614,11 +685,11 @@ const getQuery = async () => {
       }
       tableData.value.push(...result);
       tableCols.value = columnSet;
-      columnSet.forEach((item) => {
-        if (item.columnName === "calculationBasis") {
-          getSelectData(item.listqueryTemplateID, "", "calculationBasis");
-        }
-      });
+      // columnSet.forEach((item) => {
+      //   if (item.columnName === "calculationBasis") {
+      //     getSelectData(item.listqueryTemplateID, "", "calculationBasis");
+      //   }
+      // });
       tableCols.value.forEach((element) => {
         element.label = element.columnLabel;
         element.key = element.columnName;
@@ -652,18 +723,15 @@ const submitForm = () => {
   warningEditForm.value.validate(async (valid: any) => {
     if (valid) {
       const event = type.value == "add" ? 1 : 2;
+      const newObj = _.cloneDeep(tableForms);
       const { code, message } =
         event == 1
-          ? await dataToChange(
-              DATACONTENT_ID.sysServiceClIds,
-              tableForms,
-              event
-            )
+          ? await dataToChange(DATACONTENT_ID.sysServiceClIds, newObj, event)
           : await dataToChange(
               DATACONTENT_ID.sysServiceClIds,
-              tableForms,
+              newObj,
               event,
-              "alarmSceneId"
+              "alarmStrategyID"
             );
       if (code == 0) {
         ElMessage.success("保存成功");

+ 39 - 0
src/views/systemSettings/warningSet/index.vue

@@ -47,6 +47,14 @@
                   </el-select>
                 </el-form-item>
               </el-col>
+              <el-col :span="12">
+                <el-form-item label="国内国际" size="default" prop="ditype" :rules="formRules.isNotNull">
+                  <el-select style="width: 100%" v-model="tableForm.ditype" class="input-shadow" filterable allow-create default-first-option placeholder="请选择国内国际">
+                    <el-option v-for="(item,index) in ditypeAll" :key="index" :label="item.k" :value="item.v">
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
               <el-col>
                 <el-form-item label="航班号" size="default">
                   <el-input v-model="tableForm.flightNo" placeholder="请输入航班号" />
@@ -117,11 +125,26 @@ const tableForm = reactive<any>({
   flightNo: null,
   startDate: null,
   endDate: null,
+  ditype: "ALL",
   // alarmSceneId: "",
   // event: "",
 }); //弹窗内容
 //列表
 const tableData = ref<any>([]);
+const ditypeAll = ref<any>([
+  {
+    k: "全部",
+    v: "ALL",
+  },
+  {
+    k: "国内",
+    v: "DOM",
+  },
+  {
+    k: "国际",
+    v: "INT",
+  },
+]);
 //表头
 const state = reactive({
   list: [
@@ -284,6 +307,22 @@ const getQuery = async (data?) => {
         orderNumber: null,
         needSearch: null,
       },
+      {
+        queryTemplateColumnSetID: 292,
+        queryTemplateID: 13,
+        columnName: "ditype",
+        columnLabel: "国内国际",
+        columnDescribe: "国内国际",
+        needSort: 0,
+        needFilters: 1,
+        needShow: 1,
+        needGroup: 0,
+        dataType: "int",
+        listqueryTemplateID: 1803423,
+        needCount: null,
+        orderNumber: null,
+        needSearch: null,
+      },
       {
         queryTemplateColumnSetID: 293,
         queryTemplateID: 13,