Prechádzať zdrojové kódy

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

zhongxiaoyu 3 rokov pred
rodič
commit
1eccfca985

+ 1 - 1
public/config.js

@@ -2,4 +2,4 @@ var PLATFROM_CONFIG = {};
 PLATFROM_CONFIG.baseUrl = "http://106.14.243.117:9111" // http请求地址
 PLATFROM_CONFIG.appSecret = "9inu7zpllz1folzsljm498dcpi0lsog1" //appSecret
 PLATFROM_CONFIG.appId = "q7kdjmmaf0kerwpf" //appid
-PLATFROM_CONFIG.baseURLCA = 'http://192.168.3.74:8088'
+PLATFROM_CONFIG.baseURLCA = 'http://192.168.3.74:8888'

+ 11 - 0
src/api/dataIntegration.js

@@ -19,3 +19,14 @@ export function GeneralDataReception(params) {
     data: params
   })
 }
+
+export function Query(params) {
+  return request({
+    url: '/openApi/query',
+    method: 'post',
+    headers: {
+      'content-type': 'application/json'
+    },
+    data: params
+  })
+}

+ 9 - 33
src/layout/components/Search/index.vue

@@ -14,44 +14,20 @@
       </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 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 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' : ''"
-          class="search"
-        >
-          <el-input
-            :size="isChild ? 'medium' : ''"
-            :placeholder="placeholder"
-            @clear="clearSearch"
-            clearable
-            v-model="input"
-          >
+        <div v-if="isSearch" :class="isChild ? 'childSearch' : ''" class="search">
+          <el-input :size="isChild ? 'medium' : ''" :placeholder="placeholder" @clear="clearSearch" clearable v-model="input">
             <el-button slot="prepend" icon="el-icon-search"></el-button>
           </el-input>
         </div>
         <div v-if="isSearch" class="btn">
-          <button
-            :class="isChild ? 'childBtnAn' : ''"
-            @click="checkSearch"
-            class="btnAn"
-          >
+          <button :class="isChild ? 'childBtnAn' : ''" @click="checkSearch" class="btnAn">
             搜索
           </button>
         </div>
@@ -108,14 +84,14 @@ export default {
       default: false,
     },
   },
-  data() {
+  data () {
     return {
       input: "",
     };
   },
   methods: {
-    checkSearch() {
-      if (isSou) {
+    checkSearch () {
+      if (this.isSou) {
         let params = {
           input: this.input,
           value1: this.value1,
@@ -126,7 +102,7 @@ export default {
         this.$emit("getSearchData", this.input);
       }
     },
-    clearSearch() {
+    clearSearch () {
       this.$emit("clearSearchData", this.input);
     },
   },

+ 1 - 1
src/utils/request.js

@@ -53,7 +53,7 @@ service.interceptors.response.use(
     const res = response.data
 
     // if the custom code is not 20000, it is judged as an error.
-    if (res.code !== 0) {
+    if (res.code !== '0') {
       Message({
         message: res.message || 'Error',
         type: 'error',

+ 17 - 0
src/utils/validate.js

@@ -264,3 +264,20 @@ export function lengthValidator(rule, value, callback) {
     callback()
   }
 }
+/**
+ * 是否合法IP地址
+ * @param value
+ * @param callback
+ */
+ export function validateIP(rule, value, callback) {
+  if (value === '' || typeof value === 'undefined' || value == null) {
+    callback(new Error('请输入正确的IP地址'))
+  } else {
+    const reg = /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/
+    if ((!reg.test(value)) && value !== '') {
+      callback(new Error('请输入正确的IP地址'))
+    } else {
+      callback()
+    }
+  }
+}

+ 1 - 1
src/views/BasicsData/views/BaggageType/BaggageType.vue

@@ -403,7 +403,7 @@ export default {
     align-items: center;
   }
   .airportInfo-search {
-    margin: 40px 0;
+    margin: 40px 0 30px 0;
   }
   .airportInfo-content {
     img {

+ 1 - 1
src/views/BasicsData/views/airlineCompany/airlineCompanyInfo.vue

@@ -512,7 +512,7 @@ export default {
     align-items: center;
   }
   .airportInfo-search {
-    margin: 40px 0;
+    margin: 40px 0 30px 0;
   }
   .airportInfo-content {
     img {

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

@@ -580,7 +580,7 @@ export default {
 <style lang="scss" scoped>
 .airportInfo {
   .airportInfo-search {
-    margin: 40px 0;
+    margin: 40px 0 30px 0;
   }
   .log {
     width: 26px;

+ 32 - 17
src/views/BasicsData/views/airport/airportInfoDetails.vue

@@ -24,8 +24,12 @@
           ref="ruleForm"
           class="demo-ruleForm"
         >
-          <el-form-item label="所属公司" prop="name">
-            <el-select v-model="ruleForm.name" placeholder="请选择">
+          <el-form-item label="所属公司">
+            <!-- <el-select
+              v-model="ruleForm.name"
+              placeholder="暂无数据"
+              :disabled="true"
+            >
               <el-option
                 v-for="item in options"
                 :key="item.value"
@@ -33,44 +37,55 @@
                 :value="item.value"
               >
               </el-option>
-            </el-select>
+            </el-select> -->
+            <el-input
+              size="medium"
+              placeholder="暂无数据"
+              v-model="ruleForm.fullName"
+              :disabled="true"
+            ></el-input>
           </el-form-item>
-          <el-form-item label="机场中文名称" prop="fullName">
+          <el-form-item label="机场中文名称">
             <el-input
               size="medium"
-              placeholder="请输入机场简称(必填)"
+              placeholder="暂无数据"
               v-model="ruleForm.fullName"
+              :disabled="true"
             ></el-input>
           </el-form-item>
-          <el-form-item label="机场英文简称" prop="code">
+          <el-form-item label="机场英文简称">
             <el-input
               size="medium"
-              placeholder="请输入机场英文简称(必填)"
+              placeholder="暂无数据"
               v-model="ruleForm.code"
+              :disabled="true"
             ></el-input>
           </el-form-item>
-          <el-form-item label="机场三字码" prop="code">
+          <el-form-item label="机场三字码">
             <el-input
               style="min-width: 172px"
               size="medium"
-              placeholder="请输入机场三字码(必填)"
+              placeholder="暂无数据"
               v-model="ruleForm.code"
+              :disabled="true"
             ></el-input>
           </el-form-item>
-          <el-form-item label="机场四字码" prop="code" style="margin-right: 0">
+          <el-form-item label="机场四字码" style="margin-right: 0">
             <el-input
               style="min-width: 172px"
               size="medium"
-              placeholder="请输入机场四字码(必填)"
+              placeholder="暂无数据"
               v-model="ruleForm.code"
+              :disabled="true"
             ></el-input>
           </el-form-item>
-          <el-form-item label="机场全称" prop="code" style="margin-right: 0">
+          <el-form-item label="机场全称" style="margin-right: 0">
             <el-input
-              style="min-width: 601px"
+              style="min-width: 627px"
               size="medium"
-              placeholder="请输入机场全称(必填)"
+              placeholder="暂无数据"
               v-model="ruleForm.code"
+              :disabled="true"
             ></el-input>
           </el-form-item>
           <!-- <el-form-item label="机场简称" prop="name">
@@ -879,7 +894,7 @@ export default {
     }
   }
   .airportInfo-content {
-    margin-top: 24px;
+    margin-top: 30px;
     img {
       margin: 0 auto;
       margin-top: 10%;
@@ -938,7 +953,7 @@ export default {
     // background: #ffffff;
     // box-shadow: 0px 6px 7px 0px rgba(0, 0, 0, 0.06);
     border-radius: 4px;
-    margin-top: 24px;
+    // margin-top: 24px;
     .terminal-info {
       margin-top: 20px;
       margin-bottom: 20px;
@@ -1039,7 +1054,7 @@ export default {
       // padding: 0 0 0 32px;
       // background: #ffffff;
 
-      margin-top: 24px;
+      margin-top: 30px;
     }
     .LBox {
       display: flex;

+ 93 - 4
src/views/dataIntegration/views/interfaceLog.vue

@@ -15,7 +15,7 @@
         <Search @getSearchData="getSearchData" :isTitle="false" @clearSearchData="clearSearchData" />
       </div>
     </div>
-    <div class="interfaceLog_content">
+    <div class="interfaceLog_content flex-wrap">
       <el-table :data="tableData" class="table" border style="width: 100%">
         <el-table-column prop="action" label="动作">
         </el-table-column>
@@ -33,6 +33,18 @@
         <el-table-column prop="details" label="详情">
         </el-table-column>
       </el-table>
+      <div class="interfaceLog_content_progress">
+        <el-timeline>
+          <el-timeline-item v-for="(item,index) in preDatas" :key="index">
+            <div class="list">
+              <div class="list_status"></div>
+              <div class="list_title">{{item.title}}</div>
+              <div class="list_code">{{item.code}}</div>
+              <div class="list_time">{{item.time}}</div>
+            </div>
+          </el-timeline-item>
+        </el-timeline>
+      </div>
     </div>
   </div>
 </template>
@@ -46,7 +58,8 @@ export default {
     return {
       timeStart: '',
       timeEnd: '',
-      tableData: []
+      tableData: [],
+      preDatas: []
     }
   },
   created () {
@@ -59,8 +72,16 @@ export default {
         result: i % 2 == 0 ? true : false,
         details: '数据格式不正确'
       };
+      const obj = {
+        title: '更新 Github 模板',
+        code: '989665554',
+        time: '2022-4-26 15:48:55',
+        id: i
+      };
       this.tableData.push(element)
+      this.preDatas.push(obj)
     }
+    this.preDatas.splice(5, 10)
   },
   mounted () {
     document.querySelector('.interfaceLog_head_time_start .el-input__prefix i').remove()
@@ -81,7 +102,7 @@ export default {
 
 <style lang="scss" scoped>
 .interfaceLog {
-  padding: 16px 46px 24px 24px;
+  padding: 8px 32px 12px 8px;
   .mr10 {
     margin-right: 10px;
   }
@@ -96,7 +117,7 @@ export default {
     }
   }
   .interfaceLog_head_btn {
-    .btn {
+    ::v-deep .btn {
       margin-right: 0;
     }
   }
@@ -114,6 +135,74 @@ export default {
         color: #df4545;
       }
     }
+    &_progress {
+      width: 368px;
+      background: #fafcff;
+      margin-left: 8px;
+      padding: 13px 32px;
+      overflow: hidden;
+      ::v-deep .el-timeline {
+        padding: 0;
+        .el-timeline-item {
+          position: relative;
+          &::after {
+            position: absolute;
+            content: "";
+            height: 1px;
+            width: calc(100% + 4px);
+            background-color: #dfe3ea;
+            left: 28px;
+            bottom: 20px;
+          }
+          &:last-child {
+            &::after {
+              height: 0;
+            }
+          }
+        }
+        .el-timeline-item__node--normal {
+          z-index: 2;
+          background-color: #fff;
+          width: 10px;
+          height: 10px;
+          left: 0px;
+          top: 2px;
+        }
+        .el-timeline-item__tail {
+          border-left: 4px solid #dfe3ea;
+          left: 3px;
+        }
+        .el-timeline-item:last-child .el-timeline-item__tail {
+          height: 1000%;
+          display: block;
+        }
+        .list {
+          &_status {
+            position: absolute;
+            width: 20px;
+            height: 20px;
+            background: #2d67e3;
+            left: -5px;
+            border-radius: 50%;
+            z-index: 1;
+          }
+          &_title,
+          &_code {
+            margin-bottom: 7px;
+            font-size: 14px;
+            font-family: Microsoft YaHei;
+            font-weight: bold;
+            color: #101116;
+          }
+          &_time {
+            font-size: 12px;
+            font-family: Helvetica;
+            font-weight: 400;
+            color: #afb4bf;
+          }
+        }
+      }
+    }
   }
 }
 </style>

+ 185 - 96
src/views/systemSettings/views/machineManagement/machineHome.vue

@@ -15,17 +15,22 @@
           <div class="manageTitle">机器维护</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 class="status3"><span class="icon"></span>Docker</div>
         </div>
         <div class="addBtn">
-          <el-button class="button-white" size="small" @click="showAddDialog()">新增</el-button>
+          <el-button class="button-white" size="small" @click="showAddDialog()"
+            >新增</el-button
+          >
         </div>
       </div>
       <div class="protocol-content">
         <el-row :gutter="24">
           <el-col v-for="item in dataList" :key="item.deployNodeID" :span="4">
             <div class="grid-content">
-              <div :class="item.deployNodeType ? 'success' : 'error'" class="grid-content-bg"></div>
+              <div
+                :class="{ 'success': item.nodeType=='物理机', 'error': item.nodeType=='虚拟机', 'info': item.nodeType=='Docker' }"
+                class="grid-content-bg"
+              ></div>
               <div class="grid-content-hand flex">
                 <div class="title flex-wrap">
                   <div class="name">{{ item.deployNodeName }}</div>
@@ -35,8 +40,10 @@
               </div>
               <div class="grid-content-hand flex">
                 <div class="cardContent">
-                  <div class="IPadress">服务地址信息:10.72.3.66</div>
-                  <div class="type">类型:物理机</div>
+                  <div class="IPadress">
+                    服务地址:{{ item.serviceURL }}
+                  </div>
+                  <div class="type">类型:{{ item.nodeType }}</div>
                 </div>
               </div>
             </div>
@@ -48,29 +55,60 @@
         <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="deployNodeName">
-                <el-input v-model="ruleForm.deployNodeName" size="medium" 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="small"
+                  placeholder="请输入机器名称"
+                />
               </el-form-item>
               <el-form-item label="机器描述">
-                <el-input v-model="ruleForm.deployNodeDescribe" size="medium" type="textarea" :rows="2" placeholder="请输入描述" />
+                <el-input
+                  v-model="ruleForm.deployNodeDescribe"
+                  size="small"
+                  type="textarea"
+                  :rows="2"
+                  placeholder="请输入描述"
+                />
               </el-form-item>
-              <el-form-item label="服务器地址信息" prop="serviceURL">
-                <el-input v-model="ruleForm.serviceURL" size="medium" placeholder="请输入服务器地址信息" />
-
+              <el-form-item label="服务地址" prop="serviceURL">
+                <el-input
+                  v-model="ruleForm.serviceURL"
+                  size="small"
+                  placeholder="请输入服务器地址信息"
+                />
               </el-form-item>
-              <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-form-item label="机器类型" prop="nodeType">
+                <el-select
+                  v-model="ruleForm.nodeType"
+                  size="small"
+                  placeholder="请选择机器类型"
+                >
+                  <el-option label="物理机" value="物理机"></el-option>
+                  <el-option label="虚拟机" value="虚拟机"></el-option>
+                  <el-option label="Docker" value="Docker"></el-option>
                 </el-select>
               </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>
+            <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>
@@ -79,13 +117,22 @@
         <div class="airportInfoDialog">
           <div class="del-title">删除协议</div>
           <div class="content er">
-            <div class="log">
-              是否确认删除{{ rmObj.protocolName }}?
-            </div>
+            <div class="log">你是否确认删除{{ rmObj.deployNodeName }}?</div>
           </div>
           <div class="DelFoot right t30">
-            <el-button size="medium" class="r25 r26" type="danger" @click="removeSubmit()">删除</el-button>
-            <el-button size="medium" class="r26" @click="removeDialogVisible = false">取消</el-button>
+            <el-button
+              size="medium"
+              class="r25 r26"
+              type="danger"
+              @click="removeSubmit()"
+              >删除</el-button
+            >
+            <el-button
+              size="medium"
+              class="r26"
+              @click="removeDialogVisible = false"
+              >取消</el-button
+            >
           </div>
         </div>
       </Dialog>
@@ -94,116 +141,155 @@
 </template>
 
 <script>
-import Dialog from '@/layout/components/Dialog/index.vue'
-import { GeneralDataReception } from '@/api/dataIntegration'
+import Dialog from "@/layout/components/Dialog/index.vue";
+import { GeneralDataReception,Query } from "@/api/dataIntegration";
+import { validateIP } from "@/utils/validate";
 
 export default {
-  name: 'ProtocolHome',
+  name: "ProtocolHome",
   components: { Dialog },
-  data () {
+  data() {
     return {
       dataList: [],
       editDialogVisible: false,
       removeDialogVisible: false,
       rmObj: {},
-      editDialogTitle: '新增机器',
+      editDialogTitle: "新增机器",
       ruleForm: {
-        // 协议信息表单
-        deployNodeID: null,
-        deployNodeName: '',
-        deployNodeDescribe: '',
-        serviceURL: '',
-        deployNodeType: ''
+        // 机器信息表单
+        deployNodeName: "",
+        deployNodeDescribe: "",
+        serviceURL: "",
+        deployNodeType: "",
       },
       rules: {
-        // 协议信息表单验证
-        deployNodeName: [{ required: true, message: '请输入机器名称', trigger: 'blur' }],
-        serviceURL: [{ required: true, message: '请输入服务器地址信息', trigger: 'blur' }],
-        deployNodeType: [{ required: true, message: '请选择机器类型', trigger: 'blur' }]
-      }
-    }
+        // 机器信息表单验证
+        deployNodeName: [
+          { required: true, message: "请输入机器名称", trigger: "blur" },
+        ],
+        serviceURL: [
+          {
+            required: true,
+            message: "请输入正确的IP地址",
+            validator: this.validateIP,
+            trigger: "blur",
+          },
+        ],
+        deployNodeType: [
+          { required: true, message: "请选择机器类型", trigger: "blur" },
+        ],
+      },
+    };
   },
-  created () {
-    for (let index = 0; index < 20; index++) {
-      this.dataList.push({
-        deployNodeID: index,
-        deployNodeType: index % 2 == 0 ? true : false,
-        deployNodeName: '主采集服务器-' + (Math.floor(Math.random() * 10) + 1)
-      })
-    }
+  created() {
+    this.getList()
   },
   methods: {
+    async getList() {
+      try {
+        const res = await Query({
+          id: 2,
+          dataContent: []
+        });
+        if (res.code === "0") {
+            this.dataList = res.returnData
+        } else {
+          this.$message.error(res.message ?? "失败");
+        }
+      } catch (error) {
+        console.log("错误", error);
+      }
+    },
     // 新增-弹框
-    showAddDialog () {
-      this.editDialogTitle = '新增机器'
-      this.editDialogVisible = true
+    showAddDialog() {
+      this.editDialogTitle = "新增机器";
+      this.editDialogVisible = true;
     },
     // 编辑-弹框
-    showEditDialog (item) {
-      this.editDialogTitle = '编辑机器'
-      this.ruleForm = item
-      this.editDialogVisible = true
+    showEditDialog(item) {
+      this.editDialogTitle = "编辑机器";
+      this.ruleForm = JSON.parse(JSON.stringify(item));
+      this.editDialogVisible = true;
     },
     // 新增/编辑-确认
-    submitClickHandler () {
-      this.$refs['ruleForm'].validate(valid => {
+    submitClickHandler() {
+      this.$refs["ruleForm"].validate((valid) => {
         if (valid) {
-          if (this.ruleForm.protocolId) {
-            this.addSubmit()
+          if (!this.ruleForm.deployNodeID) {
+            this.addSubmit();
           } else {
-            this.editSubmit()
+            this.editSubmit();
           }
-          this.resetForm('ruleForm')
+          this.resetForm("ruleForm");
         }
-      })
+      });
     },
     // 重置
-    resetForm (formName) {
-      this.$refs[formName].resetFields()
-      this.editDialogVisible = false
+    resetForm(formName) {
+      this.ruleForm = {}
+      this.$refs[formName].resetFields();
+      this.editDialogVisible = false;
     },
     // 删除-弹框
-    showRemoveDialog (item) {
-      this.rmObj = item
-      this.removeDialogVisible = true
+    showRemoveDialog(item) {
+      this.rmObj = item;
+      this.removeDialogVisible = true;
     },
     // 确认删除
-    removeSubmit () {
-      this.removeDialogVisible = false
-      this.$message.success('删除成功')
+    async removeSubmit() {
+      this.rmObj["operate"] = "3";
+      try {
+        const res = await GeneralDataReception({
+          serviceId: "2",
+          dataContent:  JSON.stringify(this.rmObj),
+        });
+        if (res.code === "0") {
+          this.removeDialogVisible = false;
+          this.$message.success("删除成功");
+          this.getList()
+        } else {
+          this.$message.error(res.message ?? "失败");
+        }
+      } catch (error) {
+        console.log("错误", error);
+      }
     },
-    async addSubmit () {
+    async addSubmit() {
+      this.ruleForm["operate"] = "1";
       try {
         const res = await GeneralDataReception({
-          serviceId: '1',
-          dataContent: JSON.stringify(this.ruleForm)
-        })
-        if (res.code === 0) {
-          this.$message.success(res.message ?? '成功')
+          serviceId: "2",
+          dataContent: JSON.stringify(this.ruleForm),
+        });
+        if (res.code === "0") {
+          this.$message.success(res.message ?? "成功");
+          this.getList()
         } else {
-          this.$message.error(res.message ?? '失败')
+          this.$message.error(res.message ?? "失败");
         }
       } catch (error) {
-        console.log('错误', error)
+        console.log("错误", error);
       }
     },
-    async editSubmit () {
+    async editSubmit() {
+      this.ruleForm["operate"] = "2";
       try {
         const res = await GeneralDataReception({
-          serviceId: '1',
-          dataContent: JSON.stringify(this.ruleForm)
-        })
-        if (res.code === 0) {
-          this.$message.success(res.message ?? '成功')
+          serviceId: "2",
+          dataContent: JSON.stringify(this.ruleForm),
+        });
+        if (res.code === "0") {
+          this.$message.success(res.message ?? "成功");
+          this.getList()
         } else {
-          this.$message.error(res.message ?? '失败')
+          this.$message.error(res.message ?? "失败");
         }
       } catch (error) {
-        console.log('错误', error)
+        console.log("错误", error);
       }
-    }
-  }
-}
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped>
@@ -255,14 +341,14 @@ export default {
         .status3 {
           font-size: 14px;
           .icon {
-            background: #73D970;
+            background: #73d970;
           }
         }
       }
     }
     .protocol-content {
       .grid-content {
-        height: 136px;
+        height: 156px;
         background: #ffffff;
         box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.1);
         border-radius: 4px;
@@ -310,17 +396,17 @@ export default {
             background-size: 100% 100%;
           }
         }
-        .cardContent{
+        .cardContent {
           margin-top: 30px;
           text-align: left;
           width: 100%;
-          .IPadress{
+          .IPadress {
             font-size: 14px;
             font-weight: normal;
             color: #101116;
             width: 100%;
           }
-          .type{
+          .type {
             margin-top: 14px;
             font-size: 14px;
             font-weight: normal;
@@ -339,6 +425,9 @@ export default {
         .error {
           background-color: #f4c154;
         }
+        .info {
+          background-color: #73d970;
+        }
       }
     }
   }

+ 53 - 16
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">
@@ -24,7 +24,7 @@
         <el-row :gutter="24">
           <el-col v-for="item in dataList" :key="item.protocolId" :span="4">
             <div class="grid-content">
-              <div :class="item.protocolStatus ? 'success' : 'error'" class="grid-content-bg"></div>
+              <div :class="item.protocolStatus=='1' ? 'success' : 'error'" class="grid-content-bg"></div>
               <div class="grid-content-hand flex">
                 <div class="title flex-wrap">
                   <div class="name">{{ item.protocolName }}</div>
@@ -45,6 +45,16 @@
               <el-form-item label="协议名称" prop="protocolName">
                 <el-input v-model="ruleForm.protocolName" size="medium" placeholder="请输入协议名称(必填)" />
               </el-form-item>
+              <el-form-item label="协议类型" prop="nodeType">
+                <el-select
+                  v-model="ruleForm.nodeType"
+                  size="small"
+                  placeholder="请选择协议类型"
+                >
+                  <el-option label="内置" value="1"></el-option>
+                  <el-option label="扩展" value="2"></el-option>
+                </el-select>
+              </el-form-item>
               <el-form-item label="类名" prop="className">
                 <el-input v-model="ruleForm.className" size="medium" type="textarea" :rows="2" placeholder="请输入类名(必填)" />
               </el-form-item>
@@ -86,7 +96,7 @@
 
 <script>
 import Dialog from '@/layout/components/Dialog/index.vue'
-import { GeneralDataReception } from '@/api/dataIntegration'
+import { GeneralDataReception,Query  } from '@/api/dataIntegration'
 
 export default {
   name: 'ProtocolHome',
@@ -100,7 +110,6 @@ export default {
       editDialogTitle: '新增协议',
       ruleForm: {
         // 协议信息表单
-        protocolId: null,
         protocolName: '',
         className: '',
         rmethodName: '',
@@ -117,15 +126,24 @@ export default {
     }
   },
   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)
-      })
-    }
+    this.getList()
   },
   methods: {
+    async getList() {
+      try {
+        const res = await Query({
+          id: 1,
+          dataContent: []
+        });
+        if (res.code === "0") {
+            this.dataList = res.returnData;
+        } else {
+          this.$message.error(res.message ?? "失败");
+        }
+      } catch (error) {
+        console.log("错误", error);
+      }
+    },
     // 新增-弹框
     showAddDialog () {
       this.editDialogTitle = '新增协议'
@@ -152,6 +170,7 @@ export default {
     },
     // 重置
     resetForm (formName) {
+      this.ruleForm={};
       this.$refs[formName].resetFields()
       this.editDialogVisible = false
     },
@@ -161,18 +180,34 @@ export default {
       this.removeDialogVisible = true
     },
     // 确认删除
-    removeSubmit () {
-      this.removeDialogVisible = false
-      this.$message.success('删除成功')
+    async removeSubmit () {
+      this.ruleForm["operate"] = "3";
+      try {
+        const res = await GeneralDataReception({
+          serviceId: "1",
+          dataContent: JSON.stringify(this.ruleForm),
+        });
+        if (res.code === "0") {
+          this.removeDialogVisible = false;
+          this.$message.success("删除成功");
+          this.getList()
+        } else {
+          this.$message.error(res.message ?? "失败");
+        }
+      } catch (error) {
+        console.log("错误", error);
+      }
     },
     async addSubmit () {
+      this.ruleForm["operate"] = "1";
       try {
         const res = await GeneralDataReception({
           serviceId: '1',
           dataContent: JSON.stringify(this.ruleForm)
         })
-        if (res.code === 0) {
+        if (res.code === "0") {
           this.$message.success(res.message ?? '成功')
+          this.getList()
         } else {
           this.$message.error(res.message ?? '失败')
         }
@@ -181,13 +216,15 @@ export default {
       }
     },
     async editSubmit () {
+      this.ruleForm["operate"] = "2";
       try {
         const res = await GeneralDataReception({
           serviceId: '1',
           dataContent: JSON.stringify(this.ruleForm)
         })
-        if (res.code === 0) {
+        if (res.code === "0") {
           this.$message.success(res.message ?? '成功')
+          this.getList()
         } else {
           this.$message.error(res.message ?? '失败')
         }

+ 22 - 12
src/views/systemSettings/views/serviceManagement/serviceHome.vue

@@ -1,5 +1,4 @@
 <!--
- * @Author: Badguy
  * @Date: 2022-04-12 17:49:47
  * @LastEditTime: 2022-04-13 16:17:37
  * @LastEditors: your name
@@ -24,13 +23,13 @@
         <el-row :gutter="24">
           <el-col
             v-for="item in dataList"
-            :key="item.protocolId"
+            :key="item.serviceID"
             :span="4"
           >
             <div class="grid-content">
               <div class="grid-content-hand flex">
                 <div class="title flex-wrap">
-                  <div class="name">{{ item.protocolName }}</div>
+                  <div class="name">{{ item.serviceName }}</div>
                   <i
                     class="loger"
                     @click="showEditDialog(item)"
@@ -48,10 +47,10 @@
       <!--删除弹框-->
       <Dialog :flag="removeDialogVisible">
         <div class="airportInfoDialog">
-          <div class="Deltitle">删除协议</div>
+          <div class="Deltitle">删除服务</div>
           <div class="content er">
             <div class="log">
-              是否确认删除{{ rmObj.protocolName }}?
+              你是否确认删除{{ rmObj.serviceName }}?
             </div>
           </div>
           <div class="DelFoot right t30">
@@ -74,7 +73,8 @@
 </template>
 
 <script>
-import Dialog from '@/layout/components/Dialog/index.vue'
+import Dialog from '@/layout/components/Dialog/index.vue';
+import { Query  } from '@/api/dataIntegration';
 
 export default {
   name: 'ProtocolHome',
@@ -87,14 +87,24 @@ export default {
     }
   },
   created() {
-    for (let index = 0; index < 20; index++) {
-      this.dataList.push({
-        protocolId: index,
-        protocolName: '服务-' + (Math.floor(Math.random() * 20) + 1)
-      })
-    }
+    this.getList()
   },
   methods: {
+    async getList() {
+      try {
+        const res = await Query({
+          id: 3,
+          dataContent: []
+        });
+        if (res.code === "0") {
+            this.dataList = res.returnData
+        } else {
+          this.$message.error(res.message ?? "失败");
+        }
+      } catch (error) {
+        console.log("错误", error);
+      }
+    },
     // 新增-弹框
     showAddDialog() {
       this.$router.push('/systemSettings/serviceEdit')

+ 108 - 48
src/views/systemSettings/views/sourceDataItemManagement/sourceDataItemEdit.vue

@@ -8,7 +8,7 @@
   <div class="dataStoreInfo">
     <!--基本信息-->
     <div class="airportInfoDetails-head">
-      <Search title="编辑目标数据信息" :isSearch="false">
+      <Search title="编辑数据信息" :isSearch="false">
         <button class="childBtnAn" @click="storagemod">保存</button>
       </Search>
       <div class="airportInfoDetails-head-content dialog-public-background">
@@ -20,34 +20,25 @@
           class="demo-ruleForm"
           label-width="140px"
         >
-          <el-form-item label="目标数据名" prop="name">
+          <el-form-item label="源数据名称" prop="name">
             <el-input
               size="small"
               maxlength="128"
-              placeholder="请输入目标数据名"
+              placeholder="请输入源数据名称"
               v-model="ruleForm.name"
             ></el-input>
           </el-form-item>
-          <el-form-item label="数据类型" prop="tag">
+          <el-form-item label="数据格式" prop="tag">
             <el-select
               size="small"
               style="width: 100%"
               v-model="ruleForm.tag"
-              placeholder="请选择数据类型"
+              placeholder="请选择数据格式"
             >
               <el-option label="Mysql_local" value="1"></el-option>
             </el-select>
           </el-form-item>
-          <el-form-item label="目标数据事件标识" prop="fullName">
-            <el-input
-              size="small"
-              maxlength="128"
-              placeholder="请输入目标数据事件标识"
-              v-model="ruleForm.fullName"
-            ></el-input>
-          </el-form-item>
-          <el-row>
-            <el-form-item label="目标数据描述" prop="code">
+          <el-form-item label="目标数据描述" prop="code">
               <el-input
                 maxlength="128"
                 placeholder="请输入描述"
@@ -57,6 +48,32 @@
                 style="width: 575px"
               ></el-input>
             </el-form-item>
+
+          <el-row>
+            <el-form-item label="取值方法" prop="fullName">
+              <el-col :span="12">
+                <el-input
+              size="small"
+              maxlength="128"
+              placeholder="请输入取值方法"
+              v-model="ruleForm.fullName"
+              style="width: 575px"
+            ></el-input>
+              </el-col>
+
+          </el-form-item>
+          <el-form-item label="检测方法" prop="fullName">
+              <el-col :span="12">
+                <el-input
+              size="small"
+              maxlength="128"
+              placeholder="请输入检测方法"
+              v-model="ruleForm.fullName"
+              style="width: 575px"
+            ></el-input>
+              </el-col>
+
+          </el-form-item>
           </el-row>
         </el-form>
       </div>
@@ -85,7 +102,7 @@
           :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="itemCode" label="源数据编号"></el-table-column>
           <el-table-column
             prop="dataTypeName"
             label="数据类型"
@@ -96,7 +113,19 @@
           ></el-table-column>
           <el-table-column
             prop="isOnlyMarkName"
-            label="数据来源表达式"
+            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
+            prop="analysisDataItemName"
+            label="多条拆分"
           ></el-table-column>
           <el-table-column
             prop="analysisDataItemName"
@@ -160,7 +189,7 @@
       </div>
     </Dialog>
     <!--新增/编辑存储数据项弹框-->
-    <Dialog width="450px" customClass="dataStoreInfoDialog" :flag="addFlag">
+    <Dialog width="750px" customClass="dataStoreInfoDialog" :flag="addFlag">
       <div class="dialog-public-background">
         <div class="flx">
           {{ msgType === 1 ? "新增" : "编辑" }}新增数据项信息
@@ -170,12 +199,12 @@
             :model="dataForm"
             :rules="dataRules"
             ref="dataForm"
-            label-width="130px"
+            label-width="100px"
             class="demo-dataForm"
           >
-            <el-row :gutter="24">
-              <el-col :span="24">
-                <el-form-item class="flex1" label="数据项名称" prop="name">
+            <el-row :gutter="8">
+              <el-col :span="12">
+                <el-form-item label="数据项名称" prop="name">
                   <el-input
                     maxlength="128"
                     size="small"
@@ -184,10 +213,8 @@
                   ></el-input>
                 </el-form-item>
               </el-col>
-            </el-row>
-            <el-row :gutter="24">
-              <el-col :span="24">
-                <el-form-item class="flex1" label="数据类型" prop="tag">
+              <el-col :span="12">
+                <el-form-item label="数据类型" prop="tag">
                   <el-select
                     size="small"
                     style="width: 100%"
@@ -205,49 +232,82 @@
                 </el-form-item>
               </el-col>
             </el-row>
-            <el-row :gutter="24">
+            <el-row :gutter="8">
+              <el-col :span="12">
+                <el-form-item label="取值方法" prop="tag">
+                  <el-select
+                    size="small"
+                    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-col :span="12">
+                <el-form-item label="输出标识符" prop="name">
+                  <el-input
+                    maxlength="128"
+                    size="small"
+                    placeholder="输出标识符"
+                    v-model="dataForm.name"
+                  ></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row :gutter="8">
               <el-col :span="24">
                 <el-form-item
-                  class="flex1"
-                  label="数据来源表达式"
+                  label="取值表达式"
                   prop="priority"
                 >
                   <el-input
-                    maxlength="128"
-                    size="small"
-                    placeholder="请输入数据来源表达式"
+                    type="textarea"
+                    placeholder="取值表达式"
                     v-model="dataForm.priority"
+                    style="width: 104%"
                   ></el-input>
                 </el-form-item>
               </el-col>
-            </el-row>
-            <el-row :gutter="24">
               <el-col :span="24">
-                <el-form-item class="flexer" label="允许空值">
+                <el-form-item label="数据项描述">
+                  <el-input
+                    v-model="dataForm.uninq"
+                    size="small"
+                    placeholder="请输入描述"
+                    style="width: 104%"
+                  />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row :gutter="8">
+              <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="24">
-                <el-form-item class="flexer" label="唯一项标志">
+              <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="24">
-                <el-form-item label="数据项描述">
-                  <el-input
-                    v-model="dataForm.uninq"
-                    size="medium"
-                    type="textarea"
-                    :rows="2"
-                    placeholder="请输入描述"
-                  />
+              <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-form>
         </div>
         <div class="foot center" style="padding-right: 35px">

+ 21 - 11
src/views/systemSettings/views/sourceDataItemManagement/sourceDataItemHome.vue

@@ -18,17 +18,17 @@
       </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.sourceDataID" :span="4">
             <div class="grid-content">
               <div class="head-line"></div>
               <div class="grid-content-hand flex">
                 <div class="title flex-wrap">
-                  <div class="name">{{ item.protocolName }}</div>
+                  <div class="name">{{ item.dataName }}</div>
                   <i class="loger" @click="showEditDialog(item)" />
                 </div>
                 <i class="el-icon-close icon" @click="showRemoveDialog(item)" />
               </div>
-              <div class="disc">行李源报文</div>
+              <div class="disc">{{item.dataType}}</div>
             </div>
           </el-col>
         </el-row>
@@ -52,7 +52,7 @@
 
 <script>
 import Dialog from "@/layout/components/Dialog/index.vue";
-import { GeneralDataReception } from "@/api/dataIntegration";
+import { Query  } from '@/api/dataIntegration';
 
 export default {
   name: "ProtocolHome",
@@ -65,21 +65,31 @@ export default {
     };
   },
   created () {
-    for (let index = 0; index < 20; index++) {
-      this.dataList.push({
-        protocolId: index,
-        protocolName: "源数据-" + (Math.floor(Math.random() * 20) + 1),
-      });
-    }
+    this.getList()
   },
   methods: {
+    async getList() {
+      try {
+        const res = await Query({
+          id: 4,
+          dataContent: []
+        });
+        if (res.code === "0") {
+            this.dataList = res.returnData
+        } else {
+          this.$message.error(res.message ?? "失败");
+        }
+      } catch (error) {
+        console.log("错误", error);
+      }
+    },
     // 新增-跳转
     showAddDialog () {
       this.$router.push('/systemSettings/sourceDataItemEdit')
     },
     // 编辑-跳转
     showEditDialog (item) {
-
+      this.$router.push('/systemSettings/sourceDataItemEdit')
     },
     // 删除-弹框
     showRemoveDialog (item) {

+ 21 - 10
src/views/systemSettings/views/targetDataManagement/targetDataHome.vue

@@ -20,17 +20,17 @@
       </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.targetdataID" :span="4">
             <div class="grid-content">
               <div class="grid-content-hand flex">
                 <div class="title flex-wrap">
-                  <div class="name">{{ item.protocolName }}</div>
+                  <div class="name">{{ item.tdataName }}</div>
                   <i class="loger" @click="showEditDialog(item)" />
                 </div>
                 <i class="el-icon-close icon" @click="showRemoveDialog(item)" />
               </div>
               <div class="dataType">
-                <span>字符串</span>
+                <span>{{item.datatype}}</span>
               </div>
             </div>
           </el-col>
@@ -41,7 +41,7 @@
         <div class="airportInfoDialog">
           <div class="Deltitle">删除协议</div>
           <div class="content er">
-            <div class="log">是否确认删除{{ rmObj.protocolName }}?</div>
+            <div class="log">是否确认删除{{ rmObj.tdataName }}?</div>
           </div>
           <div class="DelFoot right t30">
             <el-button
@@ -66,6 +66,7 @@
 
 <script>
 import Dialog from "@/layout/components/Dialog/index.vue";
+import { Query  } from '@/api/dataIntegration'
 
 export default {
   name: "targetDataHome",
@@ -78,14 +79,24 @@ export default {
     };
   },
   created() {
-    for (let index = 0; index < 20; index++) {
-      this.dataList.push({
-        protocolId: index,
-        protocolName: "BSM报文-" + (Math.floor(Math.random() * 20) + 1),
-      });
-    }
+    this.getList()
   },
   methods: {
+    async getList() {
+      try {
+        const res = await Query({
+          id: 7,
+          dataContent: []
+        });
+        if (res.code === "0") {
+            this.dataList = res.returnData
+        } else {
+          this.$message.error(res.message ?? "失败");
+        }
+      } catch (error) {
+        console.log("错误", error);
+      }
+    },
     showAdd(){
       this.$router.push('/systemSettings/targetDataEdit')
     },