Pārlūkot izejas kodu

Merge branch 'master' of http://120.26.64.82:10880/BFFE/SZYGM1.0

zhongxiaoyu 1 gadu atpakaļ
vecāks
revīzija
ffb0043b53

+ 2 - 2
public/config.js

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

+ 156 - 48
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,57 +90,62 @@
             </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>
               </el-form-item>
             </el-col>
             <el-col :span="12">
-              <el-form-item label="预警时长" size="default" prop="warningDuration" :rules="formRules.isNotNull">
-                <el-input v-model="tableForms.warningDuration" placeholder="请输入预警时长" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="报警时长" size="default" prop="alarmDuration" :rules="formRules.isNotNull">
-                <el-input v-model="tableForms.alarmDuration" placeholder="请输入报警时长" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="开始节点" size="default">
+              <el-form-item label="基准节点" size="default">
                 <el-select style="width: 100%" v-model="tableForms.beginNode" class="input-shadow" filterable default-first-option clearable placeholder="请选择开始节点" @change="changeSelect">
                   <el-option v-for="item in tableOptionser" :key="item.nodeID" :label="item.nodeName" :value="item.nodeCode">
                   </el-option>
                 </el-select>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <!-- <el-col :span="12">
               <el-form-item label="开始位置" size="default">
                 <el-select style="width: 100%" v-model="tableForms.beginPosition" class="input-shadow" filterable default-first-option clearable placeholder="请选择开始位置" @change="changebegin">
                   <el-option v-for="item in tableOptionbegin" :key="item.positionID" :label="item.positionDescribe" :value="item.locationCode">
                   </el-option>
                 </el-select>
               </el-form-item>
-            </el-col>
+            </el-col> -->
             <el-col :span="12">
-              <el-form-item label="结束节点" size="default">
+              <el-form-item label="报警节点" size="default">
                 <el-select style="width: 100%" v-model="tableForms.endNode" class="input-shadow" filterable default-first-option clearable placeholder="请选择结束节点" @change="changeSelected">
                   <el-option v-for="item in tableOptionser" :key="item.nodeID" :label="item.nodeName" :value="item.nodeCode">
                   </el-option>
                 </el-select>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <!-- <el-col :span="12">
               <el-form-item label="结束位置" size="default">
                 <el-select style="width: 100%" v-model="tableForms.endPosition" class="input-shadow" filterable default-first-option clearable placeholder="请选择结束位置" @change="changeEndPos">
                   <el-option v-for="item in tableOptionbegin" :key="item.positionID" :label="item.positionDescribe" :value="item.locationCode">
                   </el-option>
                 </el-select>
               </el-form-item>
+            </el-col> -->
+            <el-col :span="12">
+              <el-form-item label="预警时长" size="default" prop="warningDuration">
+                <el-input v-model="tableForms.warningDuration" placeholder="请输入预警时长" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="报警时长" size="default" prop="alarmDuration">
+                <el-input v-model="tableForms.alarmDuration" placeholder="请输入报警时长" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="运单数报警百分比" label-width="140" size="default">
+                <el-input v-model="tableForms.percentage" placeholder="请输入运单数报警百分比" />
+              </el-form-item>
             </el-col>
             <el-col :span="24">
-              <el-form-item label="数量报警百分比" label-width="120" size="default">
-                <el-input v-model="tableForms.percentage" placeholder="请输入数量报警百分比" />
+              <el-form-item label="板卡数报警百分比" label-width="140" size="default">
+                <el-input v-model="tableForms.percentuld" placeholder="请输入板卡数报警百分比" />
               </el-form-item>
             </el-col>
           </el-row>
@@ -178,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,
@@ -192,6 +206,7 @@ const tableForms = reactive<any>({
   alarmSceneId: route.query.alarmSceneId,
   event: null,
   percentage: null,
+  percentuld: null,
 }); //弹窗内容
 const tableOption = ref<any>([]); //下拉
 const tableOptionser = ref<any>([]); //下拉
@@ -208,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>("新增报警预警策略"); //弹窗标题
@@ -253,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;
@@ -261,6 +290,7 @@ const resetForm = () => {
   tableForms.endNode = null;
   tableForms.endPosition = null;
   tableForms.percentage = null;
+  tableForms.percentuld = null;
   delName.value = null;
 };
 const delRemove = async () => {
@@ -320,6 +350,7 @@ const btnClick = (row, index, param) => {
     delete tableForms.endPosition;
     delete tableForms.percentage;
     delete tableForms.beginPosition;
+    delete tableForms.percentuld;
     // delete tableForms.alarmSceneId;
     delete tableForms.event;
     // tableForms.StrategyName = index.StrategyName;
@@ -439,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",
@@ -483,11 +530,11 @@ const getQuery = async () => {
         queryTemplateColumnSetID: 295,
         queryTemplateID: 18033,
         columnName: "beginNode",
-        columnLabel: "开始节点",
-        columnDescribe: "开始节点",
+        columnLabel: "基准节点",
+        columnDescribe: "基准节点",
         needSort: 0,
         needFilters: 1,
-        needShow: 1,
+        needShow: 0,
         needGroup: 0,
         dataType: "varchar",
         listqueryTemplateID: 1803424,
@@ -496,30 +543,46 @@ const getQuery = async () => {
         needSearch: null,
       },
       {
-        queryTemplateColumnSetID: 296,
+        queryTemplateColumnSetID: 295,
         queryTemplateID: 18033,
-        columnName: "beginPosition",
-        columnLabel: "开始位置",
-        columnDescribe: "开始位置",
+        columnName: "beginNodeName",
+        columnLabel: "基准节点",
+        columnDescribe: "基准节点",
         needSort: 0,
         needFilters: 1,
         needShow: 1,
         needGroup: 0,
         dataType: "varchar",
-        listqueryTemplateID: 1803425,
+        listqueryTemplateID: 1803424,
         needCount: null,
         orderNumber: null,
         needSearch: null,
       },
+      // {
+      //   queryTemplateColumnSetID: 296,
+      //   queryTemplateID: 18033,
+      //   columnName: "beginPosition",
+      //   columnLabel: "开始位置",
+      //   columnDescribe: "开始位置",
+      //   needSort: 0,
+      //   needFilters: 1,
+      //   needShow: 1,
+      //   needGroup: 0,
+      //   dataType: "varchar",
+      //   listqueryTemplateID: 1803425,
+      //   needCount: null,
+      //   orderNumber: null,
+      //   needSearch: null,
+      // },
       {
         queryTemplateColumnSetID: 297,
         queryTemplateID: 18033,
         columnName: "endNode",
-        columnLabel: "结束节点",
-        columnDescribe: "结束节点",
+        columnLabel: "报警节点",
+        columnDescribe: "报警节点",
         needSort: 0,
         needFilters: 1,
-        needShow: 1,
+        needShow: 0,
         needGroup: 0,
         dataType: "varchar",
         listqueryTemplateID: 1803424,
@@ -528,21 +591,37 @@ const getQuery = async () => {
         needSearch: null,
       },
       {
-        queryTemplateColumnSetID: 298,
+        queryTemplateColumnSetID: 297,
         queryTemplateID: 18033,
-        columnName: "endPosition",
-        columnLabel: "结束位置",
-        columnDescribe: "结束位置",
+        columnName: "endNodeName",
+        columnLabel: "报警节点",
+        columnDescribe: "报警节点",
         needSort: 0,
         needFilters: 1,
         needShow: 1,
         needGroup: 0,
         dataType: "varchar",
-        listqueryTemplateID: 1803425,
+        listqueryTemplateID: 1803424,
         needCount: null,
         orderNumber: null,
         needSearch: null,
       },
+      // {
+      //   queryTemplateColumnSetID: 298,
+      //   queryTemplateID: 18033,
+      //   columnName: "endPosition",
+      //   columnLabel: "结束位置",
+      //   columnDescribe: "结束位置",
+      //   needSort: 0,
+      //   needFilters: 1,
+      //   needShow: 1,
+      //   needGroup: 0,
+      //   dataType: "varchar",
+      //   listqueryTemplateID: 1803425,
+      //   needCount: null,
+      //   orderNumber: null,
+      //   needSearch: null,
+      // },
       {
         queryTemplateColumnSetID: 305,
         queryTemplateID: 18033,
@@ -559,6 +638,38 @@ const getQuery = async () => {
         orderNumber: null,
         needSearch: null,
       },
+      {
+        queryTemplateColumnSetID: 305,
+        queryTemplateID: 18033,
+        columnName: "percentage",
+        columnLabel: "运单数报警百分比",
+        columnDescribe: "运单数报警百分比",
+        needSort: 0,
+        needFilters: 0,
+        needShow: 1,
+        needGroup: 0,
+        dataType: "int",
+        listqueryTemplateID: null,
+        needCount: null,
+        orderNumber: null,
+        needSearch: null,
+      },
+      {
+        queryTemplateColumnSetID: 305,
+        queryTemplateID: 18033,
+        columnName: "percentuld",
+        columnLabel: "板卡数报警百分比",
+        columnDescribe: "板卡数报警百分比",
+        needSort: 0,
+        needFilters: 0,
+        needShow: 1,
+        needGroup: 0,
+        dataType: "int",
+        listqueryTemplateID: null,
+        needCount: null,
+        orderNumber: null,
+        needSearch: null,
+      },
     ];
     const result: any = await htQuery(DATACONTENT_ID.sysServiceClId, {
       alarmSceneId: route.query.alarmSceneId,
@@ -574,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;
@@ -612,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,