Kaynağa Gözat

Merge branch 'master' of http://120.26.64.82:3000/BFFE/CABaggageData2.0

zhongxiaoyu 3 yıl önce
ebeveyn
işleme
aafe173ab2

+ 2 - 1
src/layout/components/Dialog/index.vue

@@ -114,7 +114,8 @@ export default {
         margin-bottom: 24px;
         width: 100%;
       }
-      .del-title {
+      .del-title,
+      .Deltitle {
         padding: 10px 0px 10px 20px;
         font-size: 16px;
         font-family: Microsoft YaHei;

+ 3 - 1
src/layout/components/OrgTree/index.vue

@@ -137,6 +137,8 @@ export default {
             background-size: cover;
             transition: all 0.3s;
             margin-left: 16px;
+            position: relative;
+            top: 2px;
             &:first-child {
               margin-right: 0;
             }
@@ -148,7 +150,7 @@ export default {
             }
           }
           .cap-edit {
-            background-image: url("../../../assets/status/ic_edit.png");
+            background-image: url("../../../assets/status/ic_edit_default.png");
             &:hover {
               background-image: url("../../../assets/status/ic_edit_hovar.png");
             }

+ 49 - 1
src/layout/components/Search/index.vue

@@ -13,6 +13,24 @@
         {{ title }}
       </div>
       <div v-if="isOnly" class="content flex-wrap">
+        <el-select v-model="value" clearable placeholder="请选择" v-if="isSou">
+          <el-option
+            v-for="item in options"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          >
+          </el-option>
+        </el-select>
+        <el-select v-model="value1" clearable placeholder="请选择" v-if="isSou">
+          <el-option
+            v-for="item in options1"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          >
+          </el-option>
+        </el-select>
         <div
           v-if="isSearch"
           :class="isChild ? 'childSearch' : ''"
@@ -84,6 +102,11 @@ export default {
       type: Boolean,
       default: true,
     },
+    //是否下拉
+    isSou: {
+      type: Boolean,
+      default: false,
+    },
   },
   data() {
     return {
@@ -92,7 +115,16 @@ export default {
   },
   methods: {
     checkSearch() {
-      this.$emit("getSearchData", this.input);
+      if (isSou) {
+        let params = {
+          input: this.input,
+          value1: this.value1,
+          value: this.value,
+        };
+        this.$emit("getSearchData", params);
+      } else {
+        this.$emit("getSearchData", this.input);
+      }
     },
     clearSearch() {
       this.$emit("clearSearchData", this.input);
@@ -113,6 +145,22 @@ export default {
       margin-right: 0;
     }
   }
+  ::v-deep .el-select {
+    width: 136px;
+    .el-input__suffix {
+      right: 5px;
+      top: 2px;
+    }
+    .el-input__inner {
+      font-size: 14px;
+      font-family: Microsoft YaHei;
+      font-weight: 400;
+      color: #101116;
+    }
+    // .el-icon-arrow-up:before {
+    //   content: "\f057";
+    // }
+  }
   .title {
     line-height: 36px;
     font-size: 20px;

+ 36 - 5
src/router/routes/routes-file-two.js

@@ -15,7 +15,7 @@ const systemSettingsRoutes = {
           path: '/systemSettings',
           name: 'serviceManagement',
           component: () => import('@/views/systemSettings/views/serviceManagement/serviceHome'),
-          meta: { title: '服务管理'},
+          meta: { title: '服务管理' },
           hidden: true,
           src: require('@/assets/nav/ic_setting_top_default.png'),
           srcer: require('@/assets/nav/ic_setting_top_check.png')
@@ -23,20 +23,51 @@ const systemSettingsRoutes = {
         {
           path: '/systemSettings/sourceDataItemManagement',
           name: 'sourceDataItemManagement',
-          component: () => import('@/views/systemSettings/views/sourceDataItemManagement/sourceDataItemHome'),
+          component: { render(c) { return c('router-view') } },
+          redirect: '/systemSettings/sourceDataItemManagement',
           meta: { title: '源数据管理' },
           hidden: true,
           src: require('@/assets/nav/ic_setting_top_default.png'),
-          srcer: require('@/assets/nav/ic_setting_top_check.png')
+          srcer: require('@/assets/nav/ic_setting_top_check.png'),
+          children: [
+          {
+            path: '/systemSettings/sourceDataItemManagement',
+            component: () => import('@/views/systemSettings/views/sourceDataItemManagement/sourceDataItemHome'),
+          },
+          {
+            path: '/systemSettings/sourceDataItemEdit',
+            name: 'sourceDataItemEdit',
+            component: () => import('@/views/systemSettings/views/sourceDataItemManagement/sourceDataItemEdit'),
+            meta: { title: '源数据编辑' },
+            hidden: false,
+            isAlone: true,
+            src: require('@/assets/nav/ic_setting_top@2x.png')
+          },
+          ]
         },
         {
           path: '/systemSettings/targetDataManagement',
           name: 'targetDataManagement',
-          component: () => import('@/views/systemSettings/views/targetDataManagement/targetDataHome'),
+          component: { render(c) { return c('router-view') } },
+          redirect: '/systemSettings/targetDataManagement',
           meta: { title: '目标数据管理' },
           hidden: true,
           src: require('@/assets/nav/ic_setting_top_default.png'),
-          srcer: require('@/assets/nav/ic_setting_top_check.png')
+          srcer: require('@/assets/nav/ic_setting_top_check.png'),
+          children: [{
+            path: '/systemSettings/targetDataManagement',
+            component: () => import('@/views/systemSettings/views/targetDataManagement/targetDataHome'),
+          },
+          {
+            path: '/systemSettings/targetDataEdit',
+            name: 'targetDataEdit',
+            component: () => import('@/views/systemSettings/views/targetDataManagement/targetDataEdit'),
+            meta: { title: '目标数据编辑' },
+            hidden: false,
+            isAlone: true,
+            src: require('@/assets/nav/ic_setting_top@2x.png')
+          },
+          ]
         },
         {
           path: '/systemSettings/protocolManagement',

+ 11 - 0
src/styles/index.scss

@@ -200,6 +200,17 @@ li {
   font-weight: 300;
   color: #101611
 }
+.flower{
+  overflow:hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+  -o-text-overflow:ellipsis;
+}
+.fwgh{
+  font-family: Microsoft YaHei;
+  font-weight: 400;
+  color: #101116;
+}
 .right {
   text-align: right;
 }

+ 1 - 1
src/views/BasicsData/views/airport/airportInfo.vue

@@ -475,7 +475,7 @@ export default {
     // 内容跳转
     toTink(item) {
       this.$router.push({
-        path: "/dashboard/airportInfoDetails",
+        path: "/BasicsData/airportInfoDetails",
         query: {
           id: item.id,
           name: item.name,

+ 1 - 0
src/views/BasicsData/views/airport/airportInfoDetails.vue

@@ -146,6 +146,7 @@
         <Search
           :isSlot="false"
           :isChild="true"
+          :isSou="true"
           title="行李追踪位置信息"
           @clearSearchData="clearSearchData"
           @getSearchData="getSearchData"

+ 121 - 15
src/views/BasicsData/views/deployNode/deployNodeHome.vue

@@ -21,6 +21,29 @@
         </div>
       </div>
     </Dialog>
+    <!--新增/编辑-->
+    <Dialog :flag="editDialogVisible" width="508px" :show-flag="true">
+      <div class="airportInfoDialog dialog-public-background">
+        <div class="title">{{ editDialogTitle }}</div>
+        <div class="content">
+          <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="130px" class="demo-ruleForm">
+            <el-form-item label="节点名称" prop="protocolName">
+              <el-input v-model="ruleForm.protocolName" size="medium" placeholder="请输入节点名称(必填)" />
+            </el-form-item>
+            <el-form-item label="跟踪节点标识符" prop="className">
+              <el-input v-model="ruleForm.className" size="medium" placeholder="请输入跟踪节点标识符(必填)" />
+            </el-form-item>
+            <el-form-item label="跟踪节点描述" prop="filePath">
+              <el-input v-model="ruleForm.filePath" size="medium" type="textarea" :rows="3" placeholder="请输入跟踪节点描述" />
+            </el-form-item>
+          </el-form>
+        </div>
+        <div class="foot center t30">
+          <el-button size="medium" type="primary" class="r25 r26" @click="submitClickHandler()">提交</el-button>
+          <el-button size="medium" class="r26" @click="resetForm('ruleForm')">取消</el-button>
+        </div>
+      </div>
+    </Dialog>
   </div>
 </template>
 
@@ -67,8 +90,26 @@ export default {
         ]
       },
       removeDialogVisible: false,
+      editDialogVisible: false,
       rmObj: {
         protocolName: ''
+      },
+      editDialogTitle: '新增节点信息',
+      ruleForm: {
+        // 协议信息表单
+        protocolId: null,
+        protocolName: '',
+        className: '',
+        rmethodName: '',
+        smethodName: '',
+        filePath: ''
+      },
+      rules: {
+        // 协议信息表单验证
+        protocolName: [{ required: true, message: '请输入节点名称', trigger: 'blur' }],
+        className: [{ required: true, message: '请输入跟踪节点标识符', trigger: 'blur' }],
+        rmethodName: [{ required: true, message: '请输入读方法名', trigger: 'blur' }],
+        smethodName: [{ required: true, message: '请输入写方法名', trigger: 'blur' }]
       }
     }
   },
@@ -80,7 +121,10 @@ export default {
           <div class="team">
             <div class="list">
               <div class="flex info">
-                <div class="name">{data.AuthName}</div>
+                <div class="name">
+                  <span>{data.AuthName}</span>
+                  <span onClick={(e) => this.onNodeEdit(data, e)} class="cap cap-edit icon"></span>
+                </div>
                 <div class="icon">
                   <span
                     v-show={data.Type === 0 || data.Type === 1}
@@ -122,22 +166,84 @@ export default {
     },
     onNodeSub (data, e) {
       e.stopPropagation();
-      const { Type } = data;
-      const obj = {
-        AuthName: "BSM",
-        Desc: "行李源报文",
-        Type: Type + 1,
-        children: []
-      }
-      if (data.children) {
-        data.children.push(obj);
-      } else {
-        data.children = [];
-        data.children.push(obj);
-      }
+      this.editDialogTitle = '新增节点信息'
+      this.editDialogVisible = true
+      // const { Type } = data;
+      // const obj = {
+      //   AuthName: "BSM",
+      //   Desc: "行李源报文",
+      //   Type: Type + 1,
+      //   children: []
+      // }
+      // if (data.children) {
+      //   data.children.push(obj);
+      // } else {
+      //   data.children = [];
+      //   data.children.push(obj);
+      // }
     },
+    onNodeEdit (data, e) {
+      e.stopPropagation();
+      this.editDialogTitle = '编辑节点信息'
+      this.editDialogVisible = true
+    },
+    // 新增/编辑-确认
+    submitClickHandler () {
+      this.$refs['ruleForm'].validate(valid => {
+        if (valid) {
+          if (this.ruleForm.protocolId) {
+            this.addSubmit()
+          } else {
+            this.editSubmit()
+          }
+          this.resetForm('ruleForm')
+        }
+      })
+    },
+    // 重置
+    resetForm (formName) {
+      this.$refs[formName].resetFields()
+      this.editDialogVisible = false
+    },
+    // 删除-弹框
+    showRemoveDialog (item) {
+      this.rmObj = item
+      this.removeDialogVisible = true
+    },
+    // 确认删除
     removeSubmit () {
-      this.removeDialogVisible = false;
+      this.removeDialogVisible = false
+      this.$message.success('删除成功')
+    },
+    async addSubmit () {
+      try {
+        const res = await GeneralDataReception({
+          serviceId: '1',
+          dataContent: JSON.stringify(this.ruleForm)
+        })
+        if (res.code === 0) {
+          this.$message.success(res.message ?? '成功')
+        } else {
+          this.$message.error(res.message ?? '失败')
+        }
+      } catch (error) {
+        console.log('错误', error)
+      }
+    },
+    async editSubmit () {
+      try {
+        const res = await GeneralDataReception({
+          serviceId: '1',
+          dataContent: JSON.stringify(this.ruleForm)
+        })
+        if (res.code === 0) {
+          this.$message.success(res.message ?? '成功')
+        } else {
+          this.$message.error(res.message ?? '失败')
+        }
+      } catch (error) {
+        console.log('错误', error)
+      }
     }
   }
 }

+ 66 - 34
src/views/systemSettings/views/machineManagement/machineHome.vue

@@ -13,8 +13,9 @@
       <div class="protocol-header flex">
         <div class="status flex-wrap">
           <div class="manageTitle">机器维护</div>
-          <div class="status1"><span class="icon"></span>内置</div>
-          <div class="status2"><span class="icon"></span>扩展</div>
+          <div class="status1"><span class="icon"></span>物理机</div>
+          <div class="status2"><span class="icon"></span>虚拟机</div>
+          <div class="status3"><span class="icon"></span>docker</div>
         </div>
         <div class="addBtn">
           <el-button class="button-white" size="small" @click="showAddDialog()">新增</el-button>
@@ -22,16 +23,22 @@
       </div>
       <div class="protocol-content">
         <el-row :gutter="24">
-          <el-col v-for="item in dataList" :key="item.protocolId" :span="4">
+          <el-col v-for="item in dataList" :key="item.deployNodeID" :span="4">
             <div class="grid-content">
-              <div :class="item.protocolStatus ? 'success' : 'error'" class="grid-content-bg"></div>
+              <div :class="item.deployNodeType ? 'success' : 'error'" class="grid-content-bg"></div>
               <div class="grid-content-hand flex">
                 <div class="title flex-wrap">
-                  <div class="name">{{ item.protocolName }}</div>
+                  <div class="name">{{ item.deployNodeName }}</div>
                   <i class="loger" @click="showEditDialog(item)" />
                 </div>
                 <i class="el-icon-close icon" @click="showRemoveDialog(item)" />
               </div>
+              <div class="grid-content-hand flex">
+                <div class="cardContent">
+                  <div class="IPadress">服务地址信息:10.72.3.66</div>
+                  <div class="type">类型:物理机</div>
+                </div>
+              </div>
             </div>
           </el-col>
         </el-row>
@@ -41,21 +48,23 @@
         <div class="airportInfoDialog dialog-public-background">
           <div class="title">{{ editDialogTitle }}</div>
           <div class="content">
-            <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="100px" class="demo-ruleForm">
-              <el-form-item label="协议名称" prop="protocolName">
-                <el-input v-model="ruleForm.protocolName" size="medium" placeholder="请输入协议名称(必填)" />
-              </el-form-item>
-              <el-form-item label="类名" prop="className">
-                <el-input v-model="ruleForm.className" size="medium" type="textarea" :rows="2" placeholder="请输入类名(必填)" />
+            <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="130px" class="demo-ruleForm">
+              <el-form-item label="机器" prop="deployNodeName">
+                <el-input v-model="ruleForm.deployNodeName" size="medium" placeholder="请输入机器名称" />
               </el-form-item>
-              <el-form-item label="读方法名" prop="rmethodName">
-                <el-input v-model="ruleForm.rmethodName" size="medium" placeholder="请输入读方法名(必填)" />
+              <el-form-item label="机器描述">
+                <el-input v-model="ruleForm.deployNodeDescribe" size="medium" type="textarea" :rows="2" placeholder="请输入描述" />
               </el-form-item>
-              <el-form-item label="写方法名" prop="smethodName">
-                <el-input v-model="ruleForm.smethodName" size="medium" placeholder="请输入写方法名(必填)" />
+              <el-form-item label="服务器地址信息" prop="serviceURL">
+                <el-input v-model="ruleForm.serviceURL" size="medium" placeholder="请输入服务器地址信息" />
+
               </el-form-item>
-              <el-form-item label="文件名及路径" prop="filePath">
-                <el-input v-model="ruleForm.filePath" size="medium" type="textarea" :rows="3" placeholder="请输入文件名及路径" />
+              <el-form-item label="机器类型" prop="deployNodeType">
+                <el-select v-model="ruleForm.deployNodeType" size="medium" placeholder="请选择机器类型">
+                  <el-option label="物理机" value="1"></el-option>
+                  <el-option label="虚拟机" value="2"></el-option>
+                  <el-option label="docker" value="3"></el-option>
+                </el-select>
               </el-form-item>
             </el-form>
           </div>
@@ -97,43 +106,41 @@ export default {
       editDialogVisible: false,
       removeDialogVisible: false,
       rmObj: {},
-      editDialogTitle: '新增协议',
+      editDialogTitle: '新增机器',
       ruleForm: {
         // 协议信息表单
-        protocolId: null,
-        protocolName: '',
-        className: '',
-        rmethodName: '',
-        smethodName: '',
-        filePath: ''
+        deployNodeID: null,
+        deployNodeName: '',
+        deployNodeDescribe: '',
+        serviceURL: '',
+        deployNodeType: ''
       },
       rules: {
         // 协议信息表单验证
-        protocolName: [{ required: true, message: '请输入协议名称', trigger: 'blur' }],
-        className: [{ required: true, message: '请输入类名', trigger: 'blur' }],
-        rmethodName: [{ required: true, message: '请输入读方法名', trigger: 'blur' }],
-        smethodName: [{ required: true, message: '请输入写方法名', trigger: 'blur' }]
+        deployNodeName: [{ required: true, message: '请输入机器名称', trigger: 'blur' }],
+        serviceURL: [{ required: true, message: '请输入服务器地址信息', trigger: 'blur' }],
+        deployNodeType: [{ required: true, message: '请选择机器类型', trigger: 'blur' }]
       }
     }
   },
   created () {
     for (let index = 0; index < 20; index++) {
       this.dataList.push({
-        protocolId: index,
-        protocolStatus: index % 2 == 0 ? true : false,
-        protocolName: 'IMBQ-' + (Math.floor(Math.random() * 10) + 1)
+        deployNodeID: index,
+        deployNodeType: index % 2 == 0 ? true : false,
+        deployNodeName: '主采集服务器-' + (Math.floor(Math.random() * 10) + 1)
       })
     }
   },
   methods: {
     // 新增-弹框
     showAddDialog () {
-      this.editDialogTitle = '新增协议'
+      this.editDialogTitle = '新增机器'
       this.editDialogVisible = true
     },
     // 编辑-弹框
     showEditDialog (item) {
-      this.editDialogTitle = '编辑协议'
+      this.editDialogTitle = '编辑机器'
       this.ruleForm = item
       this.editDialogVisible = true
     },
@@ -240,15 +247,22 @@ export default {
         }
         .status2 {
           font-size: 14px;
+          margin-right: 28px;
           .icon {
             background: #f4c154;
           }
         }
+        .status3 {
+          font-size: 14px;
+          .icon {
+            background: #73D970;
+          }
+        }
       }
     }
     .protocol-content {
       .grid-content {
-        height: 120px;
+        height: 136px;
         background: #ffffff;
         box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.1);
         border-radius: 4px;
@@ -296,6 +310,24 @@ export default {
             background-size: 100% 100%;
           }
         }
+        .cardContent{
+          margin-top: 30px;
+          text-align: left;
+          width: 100%;
+          .IPadress{
+            font-size: 14px;
+            font-weight: normal;
+            color: #101116;
+            width: 100%;
+          }
+          .type{
+            margin-top: 14px;
+            font-size: 14px;
+            font-weight: normal;
+            color: #101116;
+            width: 100%;
+          }
+        }
         .icon {
           cursor: pointer;
           font-size: 16px;

+ 4 - 1
src/views/systemSettings/views/protocolManagement/protocolHome.vue

@@ -13,7 +13,7 @@
       <div class="protocol-header flex">
         <div class="status flex-wrap">
           <div class="manageTitle">协议管理</div>
-          <div class="status1"><span class="icon"></span>内置</div>
+          <div class="status1"><span class="icon"></span>物流</div>
           <div class="status2"><span class="icon"></span>扩展</div>
         </div>
         <div class="addBtn">
@@ -309,6 +309,9 @@ export default {
         }
       }
     }
+    .r25{
+      color: #ffffff;
+    }
   }
 }
 </style>

+ 1 - 1
src/views/systemSettings/views/sourceDataItemManagement/sourceDataItemHome.vue

@@ -75,7 +75,7 @@ export default {
   methods: {
     // 新增-跳转
     showAddDialog () {
-      this.$router.push('/sourceDataItem/sourceDataItemEdit')
+      this.$router.push('/systemSettings/sourceDataItemEdit')
     },
     // 编辑-跳转
     showEditDialog (item) {

+ 789 - 0
src/views/systemSettings/views/targetDataManagement/targetDataEdit.vue

@@ -0,0 +1,789 @@
+<!--
+ * @Date: 2021-11-19 11:34:20
+ * @LastEditTime: 2022-03-02 09:41:02
+ * @LastEditors: Please set LastEditors
+ * @Description: 目标数据-基本信息
+-->
+<template>
+  <div class="dataStoreInfo">
+    <!--基本信息-->
+    <div class="airportInfoDetails-head">
+      <Search title="编辑目标数据信息" :isSearch="false">
+        <button class="childBtnAn" @click="storagemod">保存</button>
+      </Search>
+      <div class="airportInfoDetails-head-content dialog-public-background">
+        <el-form
+          :inline="true"
+          :rules="rules"
+          :model="ruleForm"
+          ref="ruleForm"
+          class="demo-ruleForm"
+          label-width="140px"
+        >
+          <el-form-item label="目标数据名" prop="name">
+            <el-input
+              size="medium"
+              maxlength="128"
+              placeholder="请输入目标数据名"
+              v-model="ruleForm.name"
+            ></el-input>
+          </el-form-item>
+          <el-form-item label="数据类型" prop="tag">
+            <el-select
+              size="medium"
+              style="width: 100%"
+              v-model="ruleForm.tag"
+              placeholder="请选择数据类型"
+            >
+              <el-option label="Mysql_local" value="1"></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="目标数据事件标识" prop="fullName">
+            <el-input
+              size="medium"
+              maxlength="128"
+              placeholder="请输入目标数据事件标识"
+              v-model="ruleForm.fullName"
+            ></el-input>
+          </el-form-item>
+          <el-row>
+              <el-form-item label="目标数据描述" prop="code">
+            <el-col :span="24">
+                <el-input
+                  maxlength="128"
+                  placeholder="请输入描述"
+                  v-model="ruleForm.code"
+                ></el-input>
+            </el-col>
+              </el-form-item>
+          </el-row>
+        </el-form>
+      </div>
+    </div>
+    <!--数据项信息-->
+    <div class="airportInfoDetails-content">
+      <Search
+        style="padding-left: 24px"
+        :isChild="true"
+        title="数据项信息"
+        @clearSearchData="clearSearchData"
+        @getSearchData="getSearchData"
+      >
+        <button @click="addStore" class="childBtnAdd">新增</button>
+      </Search>
+      <div class="table-info">
+        <el-table
+          :data="posArr"
+          row-key="id"
+          :row-class-name="tabRowClassName"
+          height="56vh"
+          :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
+          class="table"
+          style="width: 100%"
+          :header-cell-style="{ 'text-align': 'center' }"
+          :cell-style="{ 'text-align': 'center' }"
+        >
+          <el-table-column prop="itemName" label="数据项名称"></el-table-column>
+          <el-table-column prop="itemCode" label="数据项标识"></el-table-column>
+          <el-table-column
+            prop="dataTypeName"
+            label="数据类型"
+          ></el-table-column>
+          <el-table-column
+            prop="canNullName"
+            label="数据项描述"
+          ></el-table-column>
+          <el-table-column
+            prop="isOnlyMarkName"
+            label="数据来源表达式"
+          ></el-table-column>
+          <el-table-column
+            prop="analysisDataItemName"
+            label="是否必填"
+          ></el-table-column>
+          <el-table-column
+            prop="analysisDataItemName"
+            label="是否唯一"
+          ></el-table-column>
+          <el-table-column label="操作">
+            <div
+              slot-scope="scope"
+              style="
+                width: 100%;
+                height: 100%;
+                display: flex;
+                align-items: center;
+                justify-content: center;
+              "
+            >
+              <el-button
+                class="fut"
+                size="small"
+                @click="handleEdit(scope.$index, scope.row)"
+                >新增</el-button
+              >
+              <el-button
+                class="fut"
+                size="small"
+                @click="handleEdit(scope.$index, scope.row)"
+                >编辑</el-button
+              >
+              <el-button
+                class="futdel"
+                size="small"
+                type="danger"
+                @click="handleDelete(scope.$index, scope.row)"
+                >删除</el-button
+              >
+            </div>
+          </el-table-column>
+        </el-table>
+      </div>
+    </div>
+    <!--删除弹框-->
+    <Dialog :flag="flag">
+      <div class="airportInfoDialog">
+        <div class="del-title">删除存储数据项</div>
+        <div class="content er">
+          <div class="log"></div>
+          是否确认删除{{ rmObj.name }}?
+        </div>
+        <div class="foot right t30" style="background: #ffffff">
+          <el-button size="medium" @click="remove" class="r25 r26" type="danger"
+            >删除</el-button
+          >
+          <el-button size="medium" class="r26" @click="flag = false"
+            >取消</el-button
+          >
+        </div>
+      </div>
+    </Dialog>
+    <!--新增/编辑存储数据项弹框-->
+    <Dialog width="657px" customClass="dataStoreInfoDialog" :flag="addFlag">
+      <div class="dialog-public-background">
+        <div class="flx">{{ msgType === 1 ? "新增" : "编辑" }}存储数据项</div>
+        <div class="contenter">
+          <el-form
+            :model="dataForm"
+            :rules="dataRules"
+            ref="dataForm"
+            label-width="100px"
+            class="demo-dataForm"
+          >
+            <el-row :gutter="24">
+              <el-col :span="12">
+                <el-form-item class="flex1" label="名称" prop="name">
+                  <el-input
+                    maxlength="128"
+                    size="medium"
+                    placeholder="请输入名称"
+                    v-model="dataForm.name"
+                  ></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row :gutter="24">
+              <el-col :span="12">
+                <el-form-item class="flex1" label="标识" prop="code">
+                  <el-input
+                    maxlength="128"
+                    size="medium"
+                    placeholder="请输入标识"
+                    v-model="dataForm.code"
+                  ></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item class="flex1" label="数据类型" prop="tag">
+                  <el-select
+                    size="medium"
+                    style="width: 100%"
+                    v-model="dataForm.tag"
+                    placeholder="请选择数据类型"
+                  >
+                    <el-option
+                      v-for="item in optiondata"
+                      :key="item.id"
+                      :label="item.name"
+                      :value="item.id"
+                    >
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row :gutter="24">
+              <el-col :span="12">
+                <el-form-item class="flexer" label="允许空值">
+                  <el-radio v-model="dataForm.isnull" label="1">是</el-radio>
+                  <el-radio v-model="dataForm.isnull" label="0">否</el-radio>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item class="flexer" label="唯一项标志">
+                  <el-radio v-model="dataForm.uninq" label="1">是</el-radio>
+                  <el-radio v-model="dataForm.uninq" label="0">否</el-radio>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row :gutter="24">
+              <el-col :span="12">
+                <el-form-item label="取值来源">
+                  <el-select
+                    size="medium"
+                    v-model="sourceider"
+                    placeholder="请选择取值来源"
+                  >
+                    <el-option
+                      v-for="item in sourceList"
+                      :key="item.id"
+                      :label="item.sourceName"
+                      :value="item.id"
+                    >
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item class="noleft">
+                  <el-select
+                    size="medium"
+                    style="width: 100%"
+                    v-model="dataForm.datas"
+                    placeholder="请选择数据项"
+                  >
+                    <el-option
+                      v-for="item in tableData"
+                      :key="item.id"
+                      :label="item.itemName"
+                      :value="item.id"
+                    >
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row :gutter="24">
+              <el-col :span="12">
+                <el-form-item class="flex1" label="取值优先级" prop="priority">
+                  <el-input
+                    maxlength="128"
+                    size="medium"
+                    type="number"
+                    placeholder="请输入优先级"
+                    v-model="dataForm.priority"
+                  ></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
+        </div>
+        <div class="foot center" style="padding-right: 35px">
+          <el-button
+            v-is="['ds_dsp_cardEdit_store_edit_submit']"
+            size="medium"
+            type="primary"
+            @click="addSubmit('dataForm')"
+            class="r25 r26"
+            >提交</el-button
+          >
+          <el-button
+            v-is="['ds_dsp_cardEdit_store_edit_cancel']"
+            size="medium"
+            class="r26"
+            @click="resetForm('dataForm')"
+            >取消</el-button
+          >
+        </div>
+      </div>
+    </Dialog>
+  </div>
+</template>
+
+<script>
+import Search from "@/layout/components/Search/index.vue";
+import Dialog from "@/layout/components/Dialog/index.vue";
+import {
+  Datastorage,
+  Datastoragemod,
+  storageList,
+  analysisList,
+  anaListmod,
+  storageListadd,
+  storageListdel,
+} from "@/api/acquisition";
+import { translateDataToTreeAll, findarrays } from "@/utils/validate";
+export default {
+  name: "dataStoreInfo",
+  components: { Search, Dialog },
+  data() {
+    return {
+      ruleForm: {
+        //基本信息表单
+        name: "",
+        fullName: "",
+        code: "",
+        tag: "",
+      },
+      rules: {
+        //基本信息验证
+        name: [{ required: true, message: "请输入存储名称", trigger: "blur" }],
+        fullName: [
+          { required: true, message: "请输入存储标识", trigger: "blur" },
+        ],
+        tag: [{ required: true, message: "请选择存储方式", trigger: "change" }],
+      },
+      posArr: [], //存储数据项数据
+      posArrCopy: [], //临时存放数据
+      rmObj: {}, //选中的表格信息
+      rmIndex: null, //选中的表格序号
+      flag: false, //删除弹框
+      msgType: 1, //新增or编辑
+      dataForm: {
+        //数据项表单
+        id: "",
+        name: "",
+        demo: "",
+        code: "",
+        tag: "",
+        uninq: "1",
+        isnull: "1",
+        form: "",
+        datas: "",
+        priority: "",
+        analysisDataItemSourceId: "",
+      },
+      dataRules: {
+        //数据项表单验证
+        name: [{ required: true, message: "请输入存储名称", trigger: "blur" }],
+        code: [{ required: true, message: "请输入存储标识", trigger: "blur" }],
+        tag: [{ required: true, message: "请选择存储方式", trigger: "change" }],
+        priority: [
+          { required: true, message: "请选取值优先级", trigger: "change" },
+        ],
+      },
+      addFlag: false, //数据项弹框,
+      dataStoreid: "", //修改id,
+      analyList: [], //遍历后的确定数据
+      dataitem: [], //所属数据项
+      optiondata: [
+        //数据类型
+        {
+          name: "字符",
+          id: 1,
+        },
+        {
+          name: "数字",
+          id: 2,
+        },
+        {
+          name: "日期",
+          id: 3,
+        },
+        {
+          name: "时间",
+          id: 4,
+        },
+      ],
+      sourceList: [], //取值来源
+      sourceider: "", //取值来源id
+      tableData: [],
+      deleID: "", //删除id
+    };
+  },
+  created() {
+    const { id } = this.$route.query;
+    this.dataStoreid = id;
+    this.AcquisitionList();
+    this.DatastorageList();
+    this.storagedetails();
+  },
+  watch: {
+    sourceider() {
+      this.Dataitem();
+    },
+  },
+  methods: {
+    tabRowClassName({ row, rowIndex }) {
+      if (row.index) {
+        let index = row.index + 1;
+        if (index % 2 == 0) {
+          return "warning-row";
+        } else {
+          return "warning-rows";
+        }
+      }
+    },
+    //数据采集列表-取值来源
+    async AcquisitionList() {
+      const result = await analysisList();
+      if (result.code == 0) {
+        this.sourceList = result.returnData;
+      }
+    },
+    //数据项信息
+    async Dataitem() {
+      let params = {
+        sourceId: this.sourceider,
+      };
+      const result = await anaListmod(params);
+      if (result.code == 0) {
+        this.tableData = result.returnData;
+      }
+    },
+    //详情查询
+    async storagedetails() {
+      let params = {
+        targetId: this.dataStoreid,
+      };
+      const result = await storageList(params);
+      if (result.code == 0) {
+        result.returnData.forEach((element) => {
+          if (element.dataType == "1") {
+            element.dataTypeName = "字符";
+          } else if (element.dataType == "2") {
+            element.dataTypeName = "数字";
+          } else if (element.dataType == "3") {
+            element.dataTypeName = "日期";
+          } else {
+            element.dataTypeName = "时间";
+          }
+          if (element.canNull == true) {
+            element.canNullName = "是";
+          } else {
+            element.canNullName = "否";
+          }
+          if (element.isOnlyMark == true) {
+            element.isOnlyMarkName = "是";
+          } else {
+            element.isOnlyMarkName = "否";
+          }
+        });
+        this.posArr = translateDataToTreeAll(
+          result.returnData,
+          "parentItemID",
+          "id"
+        );
+        this.posArr.forEach((res, index) => {
+          res.index = index + 1;
+        });
+        this.dataitem = result.returnData;
+      }
+    },
+    //保存
+    async storagemod() {
+      let params = {
+        id: this.dataStoreid,
+        targetName: this.ruleForm.name, //储存名称
+        targetCode: this.ruleForm.fullName, //储存标识
+        saveType: this.ruleForm.tag, //储存类型
+        saveInfo: this.ruleForm.code, //储存目标
+        status: this.analyList[0].status,
+      };
+      const result = await Datastoragemod(params);
+      if (result.code == 0) {
+        this.$message.success("成功");
+        this.$router.push("/dataStore");
+      } else {
+        this.$message.error(result.message);
+      }
+    },
+    //数据存储列
+    async DatastorageList() {
+      const result = await Datastorage();
+      if (result.code == 0) {
+        this.analyList = result.returnData.filter(
+          (i) => i.id == this.dataStoreid
+        );
+        this.ruleForm.name = this.analyList[0].targetName; //储存名称
+        this.ruleForm.fullName = this.analyList[0].targetCode; //储存标识
+        this.ruleForm.tag = this.analyList[0].saveType; //储存类型
+        this.ruleForm.code = this.analyList[0].saveInfo; //储存目标
+      }
+    },
+    //搜索
+    getSearchData(val) {
+      let that = this;
+      that.storagedetails().then(function (data) {
+        if (val) {
+          that.posArr = findarrays(that.posArr, "itemName", val);
+        } else {
+          that.storagedetails();
+        }
+      });
+    },
+    //清空搜索
+    clearSearchData() {
+      this.posArr = this.posArrCopy;
+    },
+    //编辑信息
+    handleEdit(index, row) {
+      this.rmObj = row;
+      this.rmIndex = index;
+      this.msgType = 2;
+      this.addFlag = true;
+      const {
+        id,
+        itemName,
+        itemCode,
+        dataType,
+        isOnlyMark,
+        canNull,
+        sourceDataAnalysisId,
+        dataLevel,
+        parentItemID,
+        analysisDataItemSourceId,
+      } = row;
+      this.dataForm.id = id;
+      this.dataForm.name = itemName;
+      this.dataForm.code = itemCode;
+      this.dataForm.tag = Number(dataType);
+      this.dataForm.uninq = isOnlyMark === true ? "1" : "0";
+      this.dataForm.isnull = canNull === true ? "1" : "0";
+      this.dataForm.datas = sourceDataAnalysisId;
+      this.dataForm.priority = dataLevel;
+      this.dataForm.demo = parentItemID == 0 ? null : parentItemID;
+      this.sourceider = analysisDataItemSourceId;
+    },
+    //删除信息
+    handleDelete(index, row) {
+      this.rmObj = row;
+      this.rmIndex = index;
+      this.flag = true;
+      this.deleID = row.id;
+    },
+    //删除
+    async remove() {
+      let params = {
+        id: this.deleID,
+      };
+      const result = await storageListdel(params);
+      if (result.code == 0) {
+        this.$message.success("成功");
+      } else {
+        this.$message.error(result.message);
+      }
+      this.storagedetails();
+      this.flag = false;
+    },
+    //新增数据项
+    addStore() {
+      this.msgType = 1;
+      this.addFlag = true;
+    },
+    //存储数据项-提交
+    async addSubmit(formName) {
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          // this.$message.success("提交成功");
+          // this.resetForm(formName);
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+      if (this.msgType === 1) {
+        let params = {
+          id: "",
+          targetDataID: this.dataStoreid,
+          parentItemID: this.dataForm.demo ? this.dataForm.demo : 0, //所属数据项
+          itemName: this.dataForm.name, //名称
+          itemCode: this.dataForm.code, //标识
+          dataType: this.dataForm.tag, //数据类型
+          isOnlyMark: this.dataForm.uninq == 1 ? true : false, //唯一项标志
+          canNull: this.dataForm.isnull == 1 ? true : false, //允许空值
+          sourceDataAnalysisId: this.dataForm.datas, //取值来源
+          dataLevel: this.dataForm.priority, //取值优先级
+        };
+        const result = await storageListadd(params);
+        if (result.code == 0) {
+          this.storagedetails();
+          this.$message.success("成功");
+          this.resetForm(formName);
+          this.dataForm = this.$options.data().dataForm;
+          this.sourceider = null;
+        }
+      } else {
+        let params = {
+          id: this.dataForm.id,
+          targetDataID: this.dataStoreid,
+          parentItemID: this.dataForm.demo ? this.dataForm.demo : 0, //所属数据项
+          itemName: this.dataForm.name, //名称
+          itemCode: this.dataForm.code, //标识
+          dataType: this.dataForm.tag, //数据类型
+          isOnlyMark: this.dataForm.uninq == 1 ? true : false, //唯一项标志
+          canNull: this.dataForm.isnull == 1 ? true : false, //允许空值
+          sourceDataAnalysisId: this.dataForm.datas, //取值来源
+          dataLevel: this.dataForm.priority, //取值优先级
+        };
+        const result = await storageListadd(params);
+        if (result.code == 0) {
+          this.storagedetails();
+          this.$message.success("成功");
+          this.resetForm(formName);
+          this.dataForm = this.$options.data().dataForm;
+          this.sourceider = null;
+        }
+        this.resetForm(formName);
+      }
+    },
+    //存储数据项-取消
+    resetForm(formName) {
+      this.addFlag = false;
+      this.dataForm = this.$options.data().dataForm;
+      this.sourceider = null;
+      this.$refs[formName].resetFields();
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.dataStoreInfo {
+  ::v-deep .warning-row {
+    background: #f0f3f7;
+  }
+  ::v-deep .warning-rows {
+    background: #ffffff;
+  }
+  .log {
+    width: 26px;
+    height: 26px;
+    background: #eb2f3b;
+    border-radius: 50%;
+    margin-right: 15px;
+    background: url("../../../../assets/index/ic_close_hint.png") no-repeat;
+    background-size: 100% 100%;
+  }
+  .fut {
+    width: 48px;
+    height: 24px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    background: #ffffff;
+    border: 1px solid #9ebbf7;
+    box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.06);
+    border-radius: 4px;
+    font-size: 12px;
+    font-family: Microsoft YaHei;
+    font-weight: 400;
+    color: #2d67e3;
+  }
+  .futdel {
+    width: 48px;
+    height: 24px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    background: #eb2f3b;
+    box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.06);
+    border-radius: 4px;
+    font-size: 12px;
+    font-family: Microsoft YaHei;
+    font-weight: 400;
+    color: #ffffff;
+  }
+  .contenter {
+    padding: 0 24px 0 24px;
+  }
+  .flexer {
+    margin-left: 0;
+  }
+  // ::v-deep .cell {
+  //   display: flex;
+  // }
+  .er {
+    display: flex;
+    align-items: center;
+  }
+  .airportInfoDetails-head {
+    padding: 32px 40px 44px 24px;
+    background: #ffffff;
+    box-shadow: 8px 6px 7px 0px rgba(0, 0, 0, 0.06);
+    border-radius: 4px;
+    .airportInfoDetails-head-content {
+      margin-top: 48px;
+      .el-input {
+        min-width: 188px;
+      }
+      .el-form--inline .el-form-item {
+        margin-bottom: 0;
+        margin-right: 48px;
+      }
+    }
+  }
+  .airportInfoDetails-content {
+    // height: 56vh;
+    overflow-x: hidden;
+    overflow-y: hidden;
+    padding: 0 0 0 0;
+    background: #dfe3ea;
+    // box-shadow: 0px 6px 7px 0px rgba(0, 0, 0, 0.06);
+    border-radius: 4px;
+    margin-top: 10px;
+    .table-info {
+      margin-top: 8px;
+      ::v-deep .table {
+        .el-table__header {
+          .has-gutter {
+            color: #101116;
+            .is-leaf {
+              height: 40px;
+              background: #ffffff;
+              &:first-child {
+                border-top-left-radius: 4px;
+              }
+            }
+            .gutter {
+              background: #ffffff;
+              border-top-right-radius: 4px;
+            }
+          }
+        }
+        td.el-table__cell,
+        th.el-table__cell.is-leaf {
+          border-bottom: none;
+        }
+        .el-table__cell {
+          padding: 16px 0;
+          // background: #f5f7fa;
+        }
+        .el-table__row--level-1 {
+          td {
+            background: #dfe4ec;
+          }
+        }
+        tr {
+          transition: all 0.3s;
+          &:hover {
+            td {
+              background-color: #cbd7ee;
+            }
+          }
+        }
+        &::before {
+          width: 0;
+        }
+      }
+    }
+  }
+  ::v-deep .dataStoreInfoDialog {
+    .demo-dataForm {
+      .noleft {
+        .el-form-item__content {
+          margin-left: 0 !important;
+          margin-right: 0 !important;
+          width: 300px;
+          .el-input__suffix {
+            right: 23px;
+          }
+        }
+      }
+    }
+  }
+  ::v-deep .el-input__suffix {
+    right: 15px;
+  }
+}
+</style>

+ 40 - 177
src/views/systemSettings/views/targetDataManagement/targetDataHome.vue

@@ -13,113 +13,35 @@
       <div class="targetData-header flex">
         <div class="manageTitle">目标数据管理</div>
         <div class="addBtn">
-          <el-button
-            class="button-white"
-            size="small"
-            @click="showAddDialog()"
-          >新增</el-button>
+          <el-button class="button-white" size="small" @click="showAdd()"
+            >新增</el-button
+          >
         </div>
       </div>
       <div class="targetData-content">
         <el-row :gutter="24">
-          <el-col
-            v-for="item in dataList"
-            :key="item.protocolId"
-            :span="4"
-          >
+          <el-col v-for="item in dataList" :key="item.protocolId" :span="4">
             <div class="grid-content">
               <div class="grid-content-hand flex">
                 <div class="title flex-wrap">
                   <div class="name">{{ item.protocolName }}</div>
-                  <i
-                    class="loger"
-                    @click="showEditDialog(item)"
-                  />
+                  <i class="loger" @click="showEditDialog(item)" />
                 </div>
-                <i
-                  class="el-icon-close icon"
-                  @click="showRemoveDialog(item)"
-                />
+                <i class="el-icon-close icon" @click="showRemoveDialog(item)" />
+              </div>
+              <div class="dataType">
+                <span>字符串</span>
               </div>
             </div>
           </el-col>
         </el-row>
       </div>
-      <!--新增/编辑-->
-      <Dialog
-        :flag="editDialogVisible"
-        width="508px"
-        :show-flag="true"
-      >
-        <div class="airportInfoDialog dialog-public-background">
-          <div class="title">{{ editDialogTitle }}</div>
-          <div class="content">
-            <el-form
-              ref="ruleForm"
-              :model="ruleForm"
-              :rules="rules"
-              label-width="100px"
-              class="demo-ruleForm"
-            >
-              <el-form-item
-                label="节点名称"
-                prop="deployNodeName"
-              >
-                <el-input
-                  v-model="ruleForm.deployNodeName"
-                  size="medium"
-                  placeholder="请输入节点名称(必填)"
-                />
-              </el-form-item>
-              <el-form-item
-                label="服务地址信息"
-                prop="className"
-              >
-                <el-input
-                  v-model="ruleForm.serviceURL"
-                  size="medium"
-                  type="textarea"
-                  :rows="2"
-                  placeholder="请输入服务地址信息(必填)"
-                />
-              </el-form-item>
-              <el-form-item
-                label="描述"
-                prop="deployNodeDescribe"
-              >
-                <el-input
-                  v-model="ruleForm.deployNodeDescribe"
-                  size="medium"
-                  type="textarea"
-                  :rows="3"
-                  placeholder="请输入节点描述"
-                />
-              </el-form-item>
-            </el-form>
-          </div>
-          <div class="foot center t30">
-            <el-button
-              size="medium"
-              type="primary"
-              class="r25 r26"
-              @click="submitClickHandler()"
-            >提交</el-button>
-            <el-button
-              size="medium"
-              class="r26"
-              @click="resetForm('ruleForm')"
-            >取消</el-button>
-          </div>
-        </div>
-      </Dialog>
       <!--删除弹框-->
       <Dialog :flag="removeDialogVisible">
         <div class="airportInfoDialog">
           <div class="Deltitle">删除协议</div>
           <div class="content er">
-            <div class="log">
-              是否确认删除{{ rmObj.protocolName }}?
-            </div>
+            <div class="log">是否确认删除{{ rmObj.protocolName }}?</div>
           </div>
           <div class="DelFoot right t30">
             <el-button
@@ -127,12 +49,14 @@
               class="r25 r26"
               type="danger"
               @click="removeSubmit()"
-            >删除</el-button>
+              >删除</el-button
+            >
             <el-button
               size="medium"
               class="r26"
               @click="removeDialogVisible = false"
-            >取消</el-button>
+              >取消</el-button
+            >
           </div>
         </div>
       </Dialog>
@@ -141,113 +65,42 @@
 </template>
 
 <script>
-import Dialog from '@/layout/components/Dialog/index.vue'
-import { GeneralDataReception } from '@/api/dataIntegration'
+import Dialog from "@/layout/components/Dialog/index.vue";
 
 export default {
-  name: 'targetDataHome',
+  name: "targetDataHome",
   components: { Dialog },
   data() {
     return {
       dataList: [],
-      editDialogVisible: false,
       removeDialogVisible: false,
-      rmObj: {},
-      editDialogTitle: '新增节点',
-      ruleForm: {
-        // 节点信息表单
-        deployNodeID: null,
-        deployNodeName: '',
-        serviceURL: '',
-        deployNodeDescribe: ''
-      },
-      rules: {
-        // 节点信息表单验证
-        deployNodeName: [{ required: true, message: '请输入节点名称', trigger: 'blur' }],
-        serviceURL: [{ required: true, message: '请输入服务地址信息', trigger: 'blur' }]
-      }
-    }
+      rmObj: {}
+    };
   },
   created() {
     for (let index = 0; index < 20; index++) {
       this.dataList.push({
         protocolId: index,
-        protocolName: '节点-' + (Math.floor(Math.random() * 20) + 1)
-      })
+        protocolName: "BSM报文-" + (Math.floor(Math.random() * 20) + 1),
+      });
     }
   },
   methods: {
-    // 新增-弹框
-    showAddDialog() {
-      this.editDialogTitle = '新增节点'
-      this.editDialogVisible = true
-    },
-    // 编辑-弹框
-    showEditDialog(item) {
-      this.editDialogTitle = '编辑节点'
-      this.ruleForm = item
-      this.editDialogVisible = true
-    },
-    // 新增/编辑-确认
-    submitClickHandler() {
-      this.$refs['ruleForm'].validate(valid => {
-        if (valid) {
-          if (this.ruleForm.deployNodeID) {
-            this.addSubmit()
-          } else {
-            this.editSubmit()
-          }
-          this.resetForm('ruleForm')
-        }
-      })
-    },
-    // 重置
-    resetForm(formName) {
-      this.$refs[formName].resetFields()
-      this.editDialogVisible = false
+    showAdd(){
+      this.$router.push('/systemSettings/targetDataEdit')
     },
     // 删除-弹框
     showRemoveDialog(item) {
-      this.rmObj = item
-      this.removeDialogVisible = true
+      this.rmObj = item;
+      this.removeDialogVisible = true;
     },
     // 确认删除
     removeSubmit() {
-      this.removeDialogVisible = false
-      this.$message.success('删除成功')
-    },
-    async addSubmit() {
-      try {
-        const res = await GeneralDataReception({
-          serviceId: '1',
-          dataContent: JSON.stringify(this.ruleForm)
-        })
-        if (res.code === 0) {
-          this.$message.success(res.message ?? '成功')
-        } else {
-          this.$message.error(res.message ?? '失败')
-        }
-      } catch (error) {
-        console.log('错误', error)
-      }
+      this.removeDialogVisible = false;
+      this.$message.success("删除成功");
     },
-    async editSubmit() {
-      try {
-        const res = await GeneralDataReception({
-          serviceId: '1',
-          dataContent: JSON.stringify(this.ruleForm)
-        })
-        if (res.code === 0) {
-          this.$message.success(res.message ?? '成功')
-        } else {
-          this.$message.error(res.message ?? '失败')
-        }
-      } catch (error) {
-        console.log('错误', error)
-      }
-    }
-  }
-}
+  },
+};
 </script>
 
 <style lang="scss" scoped>
@@ -277,6 +130,14 @@ export default {
         border-radius: 4px;
         padding: 25px;
         margin-bottom: 24px;
+        display: flex;
+        flex-direction: column;
+        justify-content: space-between;
+        .dataType {
+          font-size: 14px;
+          font-weight: 400;
+          color: #101116;
+        }
         .title {
           font-size: 16px;
           font-family: Helvetica;
@@ -296,14 +157,16 @@ export default {
             width: 14px;
             height: 14px;
             margin-left: 24px;
-            background: url('../../../../assets/status/ic_edit_default.png') no-repeat;
+            background: url("../../../../assets/status/ic_edit_default.png")
+              no-repeat;
             background-size: 100% 100%;
             cursor: pointer;
             position: relative;
             top: 2px;
           }
           .loger:hover {
-            background: url('../../../../assets/status/ic_edit_hovar.png') no-repeat;
+            background: url("../../../../assets/status/ic_edit_hovar.png")
+              no-repeat;
             background-size: 100% 100%;
           }
         }

+ 157 - 39
src/views/systemSettings/views/warningSet/warningEdit.vue

@@ -72,7 +72,7 @@
 
           <div class="aviName2">
             <div class="aviP3">备注</div>
-            <el-input type="textarea" v-model="desc"></el-input>
+            <el-input type="textarea" v-model="desc" resize="none"></el-input>
           </div>
         </div>
       </div>
@@ -88,13 +88,42 @@
       />
 
       <div class="LBox">
-        <div @click="addDig" class="lbox-add r24">
+        <!-- <div @click="addDig" class="lbox-add r24">
           <div class="terminal-info-add-icons">
             <span class="icon el-icon-plus"></span>
           </div>
-        </div>
-
-        <div
+        </div> -->
+        <el-row :gutter="24">
+          <el-col :span="4">
+            <div @click="addDig" class="lbox-add r24">
+              <div class="terminal-info-add-icons">
+                <span class="icon el-icon-plus"></span>
+              </div>
+            </div>
+          </el-col>
+          <el-col :span="4" v-for="(item, index) in infoArr" :key="index">
+            <div class="headerBoxs">
+              <div class="tltle-head">
+                <div class="title flower">
+                  {{ item.name }}
+                </div>
+                <div
+                  @click="delBox(item, index)"
+                  class="el-icon-close icon"
+                ></div>
+              </div>
+              <div class="text item" style="margin-top: 15px">
+                <div class="adTime fwgh" style="margin-bottom: 15px">
+                  预警时长:<span class="timeER">{{ item.beginTime }}</span>
+                </div>
+                <div class="adTime fwgh">
+                  报警时长:<span class="timeER">{{ item.endTime }}</span>
+                </div>
+              </div>
+            </div>
+          </el-col>
+        </el-row>
+        <!-- <div
           v-for="(item, index) in infoArr"
           @click="infoIndex(item, index)"
           :key="index"
@@ -103,14 +132,13 @@
           <div class="name">{{ item.name }}</div>
           <div class="edit right">
             <span @click.stop="editInfo(item)" class="round">
-              <!-- <i class="el-icon-edit-outline"></i> -->
               <div class="edit_log" style="margin-left: 0"></div>
             </span>
           </div>
           <div @click.stop="delBox(item)" class="close">
             <i class="el-icon-close"></i>
           </div>
-        </div>
+        </div> -->
       </div>
     </div>
 
@@ -120,10 +148,17 @@
         <div class="del-title">删除报警预警策略</div>
         <div class="content er">
           <div class="log"></div>
-          是否确认删除{{ this.delName }}超时策略
+          是否确认删除
+          <p style="color: #eb2f3b; margin-top: 0px; margin-bottom: 0px">
+            {{ this.delName }}?
+          </p>
         </div>
         <div class="DelFoot right t30" style="background: #ffffff">
-          <el-button size="medium" @click="remove" class="r25 r26" type="danger"
+          <el-button
+            size="medium"
+            @click="remove"
+            class="r25 buwitch"
+            type="danger"
             >删除</el-button
           >
           <el-button size="medium" class="r26" @click="flag = false"
@@ -232,7 +267,7 @@
               </el-select>
             </el-form-item>
           </div>
-          <div class="itemBox">
+          <!-- <div class="itemBox">
             <el-form-item label="备注">
               <el-input
                 @input="changeValue3"
@@ -240,7 +275,7 @@
                 v-model="form.desc"
               ></el-input>
             </el-form-item>
-          </div>
+          </div> -->
         </el-form>
         <span slot="footer" class="dialog-footer">
           <el-button type="primary" class="r25 r26" @click="submit"
@@ -284,7 +319,11 @@ export default {
       code4: this.$route.query.ladingAirport,
       flag: false,
       aircompeny: [],
-      infoArr: [], //报警预警策略列表
+      infoArr: [
+        {
+          name: "名称",
+        },
+      ], //报警预警策略列表
       posType: 1,
       arilist: [],
       traceList: [],
@@ -356,12 +395,12 @@ export default {
     };
   },
   created() {
-    this.getAirlines();
-    this.getAirlist();
-    this.UserWarning();
-    this.tracenode();
-    this.AlarmlocationList(this.code3, "1");
-    this.AlarmlocationList(this.code4, "2");
+    // this.getAirlines();
+    // this.getAirlist();
+    // this.UserWarning();
+    // this.tracenode();
+    // this.AlarmlocationList(this.code3, "1");
+    // this.AlarmlocationList(this.code4, "2");
   },
   watch: {
     code3() {
@@ -483,7 +522,7 @@ export default {
       const res = await AddWarning(params);
       if (res.code === 0) {
         this.$message.success("修改报警预警信息成功");
-        this.$router.push("/dashboard/warningSet");
+        this.$router.push("/systemSettings/warningSet");
       } else {
         this.$message.error.message;
       }
@@ -607,6 +646,7 @@ export default {
 .bgBox {
   padding: 0;
   width: 100%;
+
   .log {
     width: 26px;
     height: 26px;
@@ -622,10 +662,19 @@ export default {
   }
   ::v-deep .el-input__suffix {
     right: 0;
-    top: 5px;
   }
   ::v-deep .el-dialog__body {
-    padding-left: 0;
+    padding-left: 0 !important;
+    padding-right: 0 !important;
+    // padding-top: 20px !important;
+    padding-bottom: 0px;
+  }
+  ::v-deep .el-dialog__headerbtn {
+    top: 17px;
+    color: #ffffff;
+  }
+  ::v-deep .el-dialog__close {
+    color: #ffffff;
   }
   ::v-deep .el-range-separator {
     line-height: 27px;
@@ -650,6 +699,46 @@ export default {
     margin-bottom: 15px;
   }
 }
+.timeER {
+  font-size: 14px;
+  font-family: Helvetica;
+  font-weight: 400;
+  color: #afb4bf;
+}
+.box-card {
+  width: 268px;
+  height: 144px;
+  margin-left: 18px;
+  margin-top: 24px;
+  background: #fff;
+  box-shadow: 0px 6px 7px 0px rgb(0 0 0 / 6%);
+  border-radius: 4px;
+}
+.headerBox {
+  padding: 16px;
+  display: flex;
+  justify-content: space-between;
+  .tltle-head {
+    display: flex;
+    width: 100%;
+    flex-direction: row;
+    justify-content: flex-start;
+    align-items: center;
+  }
+  .el-button {
+    width: 64px;
+    height: 32px;
+    background: #2d67e3;
+    border-radius: 4px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    font-size: 14px;
+    font-family: Microsoft YaHei;
+    font-weight: 400;
+    color: #ffffff;
+  }
+}
 .text {
   font-size: 14px;
 }
@@ -669,18 +758,22 @@ export default {
   border-radius: 8px;
 }
 .topBox {
-  height: 280px;
+  // height: 280px;
   background: #ffffff;
   box-shadow: 0px 6px 7px 0px rgba(0, 0, 0, 0.06);
   border-radius: 4px;
   margin-bottom: 25px;
 }
-.headerBox {
-  padding: 32px 40px 20px 32px;
+.headerBoxs {
+  height: 144px;
+  padding: 24px 24px 20px 18px;
   background: #ffffff;
-  display: flex;
   border-radius: 4px;
-  justify-content: space-between;
+  .tltle-head {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+  }
   .el-button {
     width: 64px;
     height: 32px;
@@ -698,19 +791,20 @@ export default {
 
 .top {
   display: flex;
+  align-items: center;
   flex-direction: row;
 }
 
 .oneColor {
   width: 4px;
-  height: 26px;
+  height: 20px;
   margin-right: 12px;
-  background: #6e82a7;
+  background: #2d67e3;
 }
 .titleOne {
   width: 144px;
-  height: 24px;
-  font-size: 24px;
+  font-size: 20px;
+  font-family: Microsoft YaHei;
   font-weight: bold;
   color: #303133;
 }
@@ -719,6 +813,12 @@ export default {
   display: flex;
   flex-wrap: wrap;
   width: 90%;
+  ::v-deep .el-input__suffix {
+    top: 4px;
+  }
+}
+::v-deep .el-row {
+  width: 100%;
 }
 ::v-deep .formBox {
   .digName {
@@ -825,9 +925,9 @@ export default {
 .centerBox {
   height: 495px;
   padding: 32px 40px 44px 32px;
-  background: #ffffff;
-  box-shadow: 0px 6px 7px 0px rgba(0, 0, 0, 0.06);
-  border-radius: 4px;
+  // background: #ffffff;
+  // box-shadow: 0px 6px 7px 0px rgba(0, 0, 0, 0.06);
+  // border-radius: 4px;
 }
 .centerTitle {
   width: 126px;
@@ -873,8 +973,7 @@ export default {
   margin-bottom: 20px;
 }
 .lbox-add {
-  width: 230px;
-  height: 120px;
+  height: 144px;
   background: #f5f7fa;
   border: 1px dashed #9ebbf7;
   border-radius: 8px;
@@ -983,8 +1082,19 @@ export default {
   }
   .el-dialog {
     // border-radius: 20px;
-    width: 650px;
-    height: 515px;
+    width: 600px;
+    display: flex;
+    display: -ms-flex; /* 兼容IE */
+    flex-direction: column;
+    -ms-flex-direction: column; /* 兼容IE */
+    margin: 0 !important;
+    position: absolute;
+    top: 50%;
+    left: 50%;
+    transform: translate(-50%, -50%);
+    max-height: calc(100% - 30px);
+    max-width: calc(100% - 30px);
+    // height: 515px;
   }
   .el-input__inner {
     width: 160px;
@@ -1003,6 +1113,11 @@ export default {
   .el-dialog__header {
     padding: 35px 46px 10px;
   }
+  .el-dialog__footer {
+    padding-left: 0px;
+    padding-right: 0px;
+    padding-bottom: 0;
+  }
   .el-dialog__title {
     font-size: 24px;
     font-weight: bold;
@@ -1010,10 +1125,13 @@ export default {
   }
 
   .dialog-footer {
+    height: 56px;
     display: flex;
     justify-content: flex-end;
+    align-items: center;
     padding-right: 34px;
-    margin-top: -30px;
+    background: #f0f5ff;
+    padding-bottom: 0;
   }
 }
-</style>
+</style>

+ 22 - 12
src/views/systemSettings/views/warningSet/warningSet.vue

@@ -23,6 +23,7 @@
           class="box-card"
           v-for="(item, index) in warningArr"
           :key="index"
+          style="padding-left: 24px; padding-right: 24px"
         >
           <div class="headerBox">
             <div class="tltle-head">
@@ -31,13 +32,9 @@
               </div>
               <div @click="gotoAram(item, index)" class="edit_log"></div>
             </div>
-            <div
-              @click="delBtn(item, index)"
-              class="el-icon-close icon"
-              style="margin-left: 10px; margin-top: 5px"
-            ></div>
+            <div @click="delBtn(item, index)" class="el-icon-close icon"></div>
           </div>
-          <div class="text item" style="margin-top: 15px">
+          <div class="text item" style="margin-top: 6px">
             <div class="adTime">
               生效时间:<span class="timeSt">{{ item.beginTime }}</span>
             </div>
@@ -428,7 +425,7 @@ export default {
     },
     gotoAram(item, index) {
       this.$router.push({
-        path: "/dashboard/warningEdit",
+        path: "/systemSettings/warningEdit",
         query: {
           id: item.id,
           airportCode2: item.airportCode2,
@@ -490,7 +487,7 @@ export default {
   flex-direction: row;
   font-weight: bold;
   margin-bottom: 14px;
-  margin-left: 10px;
+  // margin-left: 10px;
   font-size: 14px;
   font-family: Microsoft YaHei;
   font-weight: 400;
@@ -507,7 +504,8 @@ export default {
   display: flex;
 }
 .headerBox {
-  padding: 16px;
+  padding-top: 24px;
+  padding-bottom: 24px;
   display: flex;
   justify-content: space-between;
   .tltle-head {
@@ -559,14 +557,26 @@ export default {
 
 ::v-deep .EditDig {
   .el-dialog {
-    width: 650px;
+    width: 600px;
     height: 450px;
     border-radius: 2px;
+    display: flex;
+    display: -ms-flex; /* 兼容IE */
+    flex-direction: column;
+    -ms-flex-direction: column; /* 兼容IE */
+    margin: 0 !important;
+    position: absolute;
+    top: 50%;
+    left: 50%;
+    transform: translate(-50%, -50%);
+    max-height: calc(100% - 30px);
+    max-width: calc(100% - 30px);
     .el-dialog__body {
       padding: 20px 20px 0 20px !important;
     }
     .el-dialog__footer {
-      padding: 0 24px 0 24px !important;
+      padding: 0 19px 0 0;
+      background: #f0f5ff;
     }
     .dialog-footer {
       width: 100%;
@@ -642,7 +652,7 @@ export default {
     border-radius: 4px;
   }
   .digName3 .el-textarea__inner {
-    width: 500px;
+    width: 455px;
     height: 96px;
     margin-left: 16px;
     background: #ffffff;