Browse Source

modify pages in new archetype

haojianlong 5 years ago
parent
commit
fd96dfb29a

+ 250 - 0
src/components/point/dynamicdata/equipRules.vue

@@ -0,0 +1,250 @@
+
+<template>
+  <div id="equipRules">
+    <!-- 查询条件 -->
+    <div class="query-area">
+      <el-row>
+        <el-col :span="23">
+          <el-form ref="form" :model="form" :inline="true">
+            <el-row>
+              <div class="query-item">
+                <el-form-item>
+                  <el-input placeholder="请输入设备标识关键字" v-model="form.EquipmentMark" class="input-with-select">
+                    <el-button slot="append" icon="el-icon-search" @click="queryTableData"></el-button>
+                  </el-input>
+                </el-form-item>
+              </div>
+              <div class="query-item">
+                <label>数据源</label>
+                <dataSource :Related="true" @change="changeDataSource"></dataSource>
+              </div>
+              <div class="query-item">
+                <dictionary-device @change="changeDictionary" :Related="true"></dictionary-device>
+              </div>
+              <div class="query-item">
+                <label>位置标签</label>
+                <locationFlag :Related="true" @change="changeLocationFlag"></locationFlag>
+              </div>
+            </el-row>
+          </el-form>
+        </el-col>
+        <el-col :span="1">
+          <el-tooltip class="item" effect="dark" content="填充设备标识与实例对应规则" placement="left">
+            <el-button size="small" type="primary" @click="toAddRelation" icon="el-icon-edit-outline" style="float:right;"></el-button>
+          </el-tooltip>
+        </el-col>
+      </el-row>
+    </div>
+    <el-row>
+      <el-col :span="12" style="padding-left:10px;font-size:13px;border-left:2px solid #000;">点位表中出现的所有设备</el-col>
+      <el-col :span="12" style="padding-left:10px;font-size:13px;border-left:2px solid #000;">对应物理世界中的设备实例</el-col>
+    </el-row>
+    <!-- 列表区域 -->
+    <div class="table-area">
+      <el-table :data="tableData" style="width: 100%" height="100%" v-loading="loading" :header-cell-style="{background:'#f7f9fb'}">
+        <el-table-column prop="EquipmentMark" label="设备标识" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="LocationFlag" label="位置标签" min-width="200">
+          <template slot-scope="scope">
+            <el-tooltip :content="scope.row.LocationFlag.toString()" placement="top">
+              <span>{{scope.row.LocationFlag.toString()}}</span>
+            </el-tooltip>
+          </template>
+        </el-table-column>
+        <el-table-column prop="Datasource" label="数据源" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="SubTypeName" label="数字字典设备类型" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="EquipLocalName" label="对应的设备实例" show-overflow-tooltip min-width="100" class-name="td-bl"></el-table-column>
+        <el-table-column prop="FloorLocalName" label="实例所在建筑楼层" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="RoomLocalName" label="实例所在业务空间" show-overflow-tooltip min-width="200"></el-table-column>
+        <el-table-column prop="action" label="操作" min-width="100">
+          <template slot-scope="scope">
+            <el-tooltip class="item" effect="dark" content="清除对应规则" placement="left">
+              <el-button size="mini" @click="handleDelete(scope.$index, scope.row)" type="danger" plain :disabled="scope.row.Related=='False'"
+                icon="el-icon-delete"></el-button>
+            </el-tooltip>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <!-- 分页 -->
+    <el-pagination class="fr" v-show="tableData && tableData.length" @size-change="handleSizeChange" @current-change="handleCurrentChange"
+      :current-page="page.pageNumber" :page-sizes="page.pageSizes" :page-size="page.pageSize" layout="total, sizes, prev, pager, next, jumper"
+      :total="page.total"></el-pagination>
+    <!-- 清除对应关系弹窗 -->
+    <del-relation-dialog ref="del" @refresh="refresh"></del-relation-dialog>
+  </div>
+</template>
+<script>
+import tools from "@/utils/tools";
+import { mapGetters, mapActions } from "vuex";
+import applyRulesDialog from "@/components/point/dynamicdata/applyRulesDialog";
+import delRelationDialog from "@/components/point/dynamicdata/delRelationDialog";
+import dictionaryDevice from "@/components/point/dynamicdata/dictionaryDevice";
+import dataSource from "@/components/point/dynamicdata/dataSource";
+import locationFlag from "@/components/point/dynamicdata/locationFlag";
+import equipRules from "@/components/point/dynamicdata/equipRules";
+import {
+  dynamicClashConfirm,
+  dynamicExecute,
+  dynamicQuery,
+  dynamicQueryPoint,
+  dynamicPointTypeList
+} from "@/api/scan/request";
+export default {
+  computed: {
+    ...mapGetters("layout", ["projectId"])
+  },
+  data() {
+    return {
+      sourceList: [], //数据源
+      DynEquipList: [], //数据字典设备类型
+      LocFlagList: [], //位置标签
+      tableData: [], //列表数据
+      page: {
+        pageSize: 50,
+        pageSizes: [10, 20, 50, 100],
+        pageNumber: 1,
+        total: 0
+      },
+      form: {
+        EquipmentMark: "", //设备标识关键字
+        SubTypeName: [], //数据字典设备类型
+        LocationFlag: [], //位置标签
+        Datasource: [] //数据源
+      }, //查询条件
+      loading: false, //列表loading
+    };
+  },
+  components: {
+    applyRulesDialog,
+    delRelationDialog,
+    dictionaryDevice,
+    dataSource,
+    locationFlag
+  },
+  props: {
+    typeName: {}
+  },
+  created() {
+    this.init();
+  },
+  mounted() { },
+  methods: {
+    //获取查询条件-提示信息
+    init() {
+      this.getTableData()
+    },
+    //清除对应关系
+    handleDelete(index, row) {
+      this.$refs.del.showDialog(row);
+    },
+    //改变pagesize
+    handleSizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+      this.getTableData();
+    },
+    //改变pageno
+    handleCurrentChange(pageNo) {
+      this.page.pageNumber = pageNo;
+      this.getTableData();
+    },
+    //跳转至填充对应规则
+    toAddRelation() {
+      this.$router.push({ path: "equipRela", query: { typeName: this.typeName } });
+    },
+    //获取表格数据
+    getTableData() {
+      let param = {
+        PageNumber: this.page.pageNumber,
+        PageSize: this.page.pageSize,
+        TypeNameList: [this.typeName]
+      };
+      //处理查询条件
+      if (this.form.EquipmentMark && this.form.EquipmentMark.length) {
+        param.EquipmentMark = this.form.EquipmentMark;
+      }
+      if (this.form.SubTypeName.length) {
+        param.SubTypeNameList = this.form.SubTypeName;
+      }
+      if (this.form.LocationFlag.length) {
+        param.LocationFlagList = this.form.LocationFlag;
+      }
+      if (this.form.Datasource.length) {
+        param.DatasourceList = this.form.Datasource;
+      }
+      this.loading = true;
+      // 查询对应关系(P1)
+      dynamicQuery(param, res => {
+        this.loading = false;
+        if (res.Result == "success") {
+          this.tableData = res.Content;
+          this.page.total = res.Total;
+        }
+      });
+    },
+    //刷新列表
+    refresh() {
+      this.page.pageNumber = 1;
+      this.getTypeNames();
+    },
+    //数据字典设备类型修改
+    changeDictionary(val) {
+      this.page.pageNumber = 1;
+      this.form.SubTypeName = val;
+      this.getTableData();
+    },
+    //数据源修改
+    changeDataSource(val) {
+      this.page.pageNumber = 1;
+      this.form.Datasource = val;
+      this.getTableData();
+    },
+    //修改位置标签
+    changeLocationFlag(val) {
+      this.page.pageNumber = 1;
+      this.form.LocationFlag = val;
+      this.getTableData();
+    },
+    //查询列表
+    queryTableData() {
+      this.page.pageNumber = 1;
+      this.getTableData();
+    }
+  },
+  watch: {
+    projectId() {
+      this.init();
+    }
+  }
+};
+</script>
+<style lang="scss" scoped>
+#equipRules {
+  height: calc(100% - 54px);
+  /deep/ .text-right {
+    text-align: right;
+  }
+  .query-item {
+    float: left;
+    & + .query-item {
+      margin-left: 10px;
+    }
+  }
+  /deep/ .table-area {
+    width: 100%;
+    height: calc(100% - 125px);
+    td div {
+      white-space: nowrap;
+      text-overflow: ellipsis;
+      overflow: hidden;
+    }
+    .td-bl {
+      border-left: 1px solid #ebeef5;
+    }
+  }
+  .fr {
+    padding-top: 10px;
+    float: right;
+  }
+}
+</style>
+

+ 252 - 0
src/components/point/dynamicdata/partsRules.vue

@@ -0,0 +1,252 @@
+
+<template>
+<!-- 部件 -->
+  <div id="equipRules">
+    <!-- 查询条件 -->
+    <div class="query-area">
+      <el-row>
+        <el-col :span="23">
+          <el-form ref="form" :model="form" :inline="true">
+            <el-row>
+              <div class="query-item">
+                <el-form-item>
+                  <el-input placeholder="请输入部件标识关键字" v-model="form.EquipmentMark" class="input-with-select">
+                    <el-button slot="append" icon="el-icon-search" @click="queryTableData"></el-button>
+                  </el-input>
+                </el-form-item>
+              </div>
+              <div class="query-item">
+                <label>数据源</label>
+                <dataSource :Related="true" @change="changeDataSource"></dataSource>
+              </div>
+              <div class="query-item">
+                <dictionary-device @change="changeDictionary" :Related="true"></dictionary-device>
+              </div>
+              <div class="query-item">
+                <label>位置标签</label>
+                <locationFlag :Related="true" @change="changeLocationFlag"></locationFlag>
+              </div>
+            </el-row>
+          </el-form>
+        </el-col>
+        <el-col :span="1">
+          <el-tooltip class="item" effect="dark" content="填充部件标识与实例对应规则" placement="left">
+            <el-button size="small" type="primary" @click="toAddRelation" icon="el-icon-edit-outline" style="float:right;"></el-button>
+          </el-tooltip>
+        </el-col>
+      </el-row>
+    </div>
+    <el-row>
+      <el-col :span="12" style="padding-left:10px;font-size:13px;border-left:2px solid #000;">点位表中出现的所有部件</el-col>
+      <el-col :span="12" style="padding-left:10px;font-size:13px;border-left:2px solid #000;">对应物理世界中的部件实例</el-col>
+    </el-row>
+    <!-- 列表区域 -->
+    <div class="table-area">
+      <el-table :data="tableData" style="width: 100%" height="100%" v-loading="loading" :header-cell-style="{background:'#f7f9fb'}">
+        <el-table-column prop="EquipmentMark" label="部件标识" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="LocationFlag" label="位置标签" min-width="200">
+          <template slot-scope="scope">
+            <el-tooltip :content="scope.row.LocationFlag.toString()" placement="top">
+              <span>{{scope.row.LocationFlag.toString()}}</span>
+            </el-tooltip>
+          </template>
+        </el-table-column>
+        <el-table-column prop="Datasource" label="数据源" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="SubTypeName" label="数字字典部件类型" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="EquipLocalName" label="对应的部件实例" show-overflow-tooltip min-width="100" class-name="td-bl"></el-table-column>
+        <el-table-column prop="FloorLocalName" label="实例所在建筑楼层" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="RoomLocalName" label="实例所在业务空间" show-overflow-tooltip min-width="200"></el-table-column>
+        <el-table-column prop="action" label="操作" min-width="100">
+          <template slot-scope="scope">
+            <el-tooltip class="item" effect="dark" content="清除对应规则" placement="left">
+              <el-button size="mini" @click="handleDelete(scope.$index, scope.row)" type="danger" plain :disabled="scope.row.Related=='False'"
+                icon="el-icon-delete"></el-button>
+            </el-tooltip>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <!-- 分页 -->
+    <el-pagination class="fr" v-show="tableData && tableData.length" @size-change="handleSizeChange" @current-change="handleCurrentChange"
+      :current-page="page.pageNumber" :page-sizes="page.pageSizes" :page-size="page.pageSize" layout="total, sizes, prev, pager, next, jumper"
+      :total="page.total"></el-pagination>
+    <!-- 清除对应关系弹窗 -->
+    <del-relation-dialog ref="del" @refresh="refresh"></del-relation-dialog>
+  </div>
+</template>
+<script>
+import tools from "@/utils/tools";
+import { mapGetters, mapActions } from "vuex";
+import applyRulesDialog from "@/components/point/dynamicdata/applyRulesDialog";
+import delRelationDialog from "@/components/point/dynamicdata/delRelationDialog";
+import dictionaryDevice from "@/components/point/dynamicdata/dictionaryDevice";
+import dataSource from "@/components/point/dynamicdata/dataSource";
+import locationFlag from "@/components/point/dynamicdata/locationFlag";
+import equipRules from "@/components/point/dynamicdata/equipRules";
+import {
+  dynamicClashConfirm,
+  dynamicExecute,
+  dynamicQuery,
+  dynamicQueryPoint,
+  dynamicPointTypeList
+} from "@/api/scan/request";
+export default {
+  computed: {
+    ...mapGetters("layout", ["projectId"])
+  },
+  data() {
+    return {
+      sourceList: [], //数据源
+      DynEquipList: [], //数据字典部件类型
+      LocFlagList: [], //位置标签
+      tableData: [], //列表数据
+      page: {
+        pageSize: 50,
+        pageSizes: [10, 20, 50, 100],
+        pageNumber: 1,
+        total: 0
+      },
+      form: {
+        EquipmentMark: "", //部件标识关键字
+        SubTypeName: [], //数据字典部件类型
+        LocationFlag: [], //位置标签
+        Datasource: [] //数据源
+      }, //查询条件
+      loading: false, //列表loading
+    };
+  },
+  components: {
+    applyRulesDialog,
+    delRelationDialog,
+    dictionaryDevice,
+    dataSource,
+    locationFlag
+  },
+  props: {
+    typeName: {}
+  },
+  created() {
+    this.init();
+  },
+  mounted() { },
+  methods: {
+    //获取查询条件-提示信息
+    init() {
+      alert(1)
+      this.getTableData()
+    },
+    //清除对应关系
+    handleDelete(index, row) {
+      this.$refs.del.showDialog(row);
+    },
+    //改变pagesize
+    handleSizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+      this.getTableData();
+    },
+    //改变pageno
+    handleCurrentChange(pageNo) {
+      this.page.pageNumber = pageNo;
+      this.getTableData();
+    },
+    //跳转至填充对应规则
+    toAddRelation() {
+      this.$router.push({ path: "equipRela", query: { typeName: this.typeName } });
+    },
+    //获取表格数据
+    getTableData() {
+      let param = {
+        PageNumber: this.page.pageNumber,
+        PageSize: this.page.pageSize,
+        TypeNameList: [this.typeName]
+      };
+      //处理查询条件
+      if (this.form.EquipmentMark && this.form.EquipmentMark.length) {
+        param.EquipmentMark = this.form.EquipmentMark;
+      }
+      if (this.form.SubTypeName.length) {
+        param.SubTypeNameList = this.form.SubTypeName;
+      }
+      if (this.form.LocationFlag.length) {
+        param.LocationFlagList = this.form.LocationFlag;
+      }
+      if (this.form.Datasource.length) {
+        param.DatasourceList = this.form.Datasource;
+      }
+      this.loading = true;
+      // 查询对应关系(P1)
+      dynamicQuery(param, res => {
+        this.loading = false;
+        if (res.Result == "success") {
+          this.tableData = res.Content;
+          this.page.total = res.Total;
+        }
+      });
+    },
+    //刷新列表
+    refresh() {
+      this.page.pageNumber = 1;
+      this.getTypeNames();
+    },
+    //数据字典部件类型修改
+    changeDictionary(val) {
+      this.page.pageNumber = 1;
+      this.form.SubTypeName = val;
+      this.getTableData();
+    },
+    //数据源修改
+    changeDataSource(val) {
+      this.page.pageNumber = 1;
+      this.form.Datasource = val;
+      this.getTableData();
+    },
+    //修改位置标签
+    changeLocationFlag(val) {
+      this.page.pageNumber = 1;
+      this.form.LocationFlag = val;
+      this.getTableData();
+    },
+    //查询列表
+    queryTableData() {
+      this.page.pageNumber = 1;
+      this.getTableData();
+    }
+  },
+  watch: {
+    projectId() {
+      this.init();
+    }
+  }
+};
+</script>
+<style lang="scss" scoped>
+#equipRules {
+  height: calc(100% - 54px);
+  /deep/ .text-right {
+    text-align: right;
+  }
+  .query-item {
+    float: left;
+    & + .query-item {
+      margin-left: 10px;
+    }
+  }
+  /deep/ .table-area {
+    width: 100%;
+    height: calc(100% - 125px);
+    td div {
+      white-space: nowrap;
+      text-overflow: ellipsis;
+      overflow: hidden;
+    }
+    .td-bl {
+      border-left: 1px solid #ebeef5;
+    }
+  }
+  .fr {
+    padding-top: 10px;
+    float: right;
+  }
+}
+</style>
+

+ 4 - 4
src/router/system.js

@@ -10,7 +10,7 @@ import ChangePwd from '@/views/system/pwd/ChangePwd'
 /**点位部分 */
 import pointConfig from '@/views/point/config_point'
 import dynamicdata from '@/views/point/dynamicdata'
-import addRelation from '@/views/point/dynamicdata/addRelation'
+import equipRela from '@/views/point/dynamicdata/addRelation/equipRela'
 import editDataSouce from '@/views/point/config_point/edit_origin'
 import pointSteps from '@/views/point/config_point/steps'
 
@@ -81,9 +81,9 @@ export default [
                 meta: { keepAlive: false, breadcrumbs: [{ label: '系统集成', path: '/point/pointsetting' }, { label: '动态数据关联' }] }
             },
             {
-                path: 'addRelation',
-                name: 'addRelation',
-                component: addRelation,
+                path: 'equipRela',
+                name: 'equipRela',
+                component: equipRela,
                 meta: { keepAlive: false, breadcrumbs: [{ label: '系统集成', path: '/point/pointsetting' }, { label: '动态数据关联 / 处理未对应实例对象标识' }] }
             },
         ]

+ 30 - 44
src/views/point/dynamicdata/addRelation/index.vue

@@ -1,21 +1,21 @@
 <template>
   <div id="addRelation">
-    <!-- 按钮区域 -->
-    <div class="text-right">
-      <el-switch @change="changeType" v-model="isSwitch"></el-switch>AI辅助
-      <el-button size="medium" @click="showHistory" class="ani-his-plus">
-        本次对应记录{{num}}
-        <span v-if="showPlus" :class="{'plusOne':true,'startAni':showPlus}">+1</span>
-      </el-button>
-    </div>
-    <!-- tab页区域 -->
-    <el-tabs v-model="curType">
-      <el-tab-pane v-for="(item) in typeList" :key="item.Name" :label="item.Name" :name="item.Name"></el-tab-pane>
-    </el-tabs>
     <!-- 数据字典设备类型 -->
-    <div>
-      <dictionary-device @change="changeDictionary" :Related="false"></dictionary-device>
-    </div>
+    <el-row>
+      <el-col :span="12">
+        <el-button size="small" type="default" icon="el-icon-back" @click="goback"></el-button>
+        <div style="display:inline-block;width:317px;">
+          <dictionary-device @change="changeDictionary" :Related="false"></dictionary-device>
+        </div>
+      </el-col>
+      <el-col :span="12" class="text-right">
+        <el-switch @change="changeType" v-model="isSwitch"></el-switch>AI辅助
+        <el-button size="medium" @click="showHistory" class="ani-his-plus">
+          本次对应记录{{num}}
+          <span v-if="showPlus" :class="{'plusOne':true,'startAni':showPlus}">+1</span>
+        </el-button>
+      </el-col>
+    </el-row>
     <!-- 列表及查询条件区域 -->
     <div class="table-container clearfix">
       <div class="left-table">
@@ -40,7 +40,8 @@
         <!-- 左侧列表 -->
         <div class="table-box">
           <div class="l-custom-table custom-table" v-loading="lTableLoading">
-            <el-table ref="lTableBody" :data="LtableData" tooltip-effect="dark" style="width: 100%" height="100%" @selection-change="leftSelectionChange">
+            <el-table ref="lTableBody" :data="LtableData" tooltip-effect="dark" style="width: 100%" height="100%"
+              @selection-change="leftSelectionChange">
               <el-table-column label="数据源" align="right" show-overflow-tooltip>
                 <template slot-scope="scope">{{ scope.row.Datasource }}</template>
               </el-table-column>
@@ -89,7 +90,8 @@
         <!-- 右侧列表 -->
         <div class="table-box">
           <div class="r-custom-table custom-table" v-loading="rTableLoading">
-            <el-table ref="rTableBody" :data="RtableData" tooltip-effect="dark" style="width: 100%" height="100%" @selection-change="rightSelectionChange">
+            <el-table ref="rTableBody" :data="RtableData" tooltip-effect="dark" style="width: 100%" height="100%"
+              @selection-change="rightSelectionChange">
               <el-table-column type="selection" width="35" class-name="bgf5"></el-table-column>
               <el-table-column label="设备实例名称" width="200" class-name="bgf5" show-overflow-tooltip>
                 <template slot-scope="scope">{{ scope.row.EquipLocalName }}</template>
@@ -152,8 +154,7 @@ export default {
   data() {
     return {
       isSwitch: true, //AI辅助
-      curType: "", //当前所在tab页
-      typeList: [], //tab页list
+      typeName: "", //当前类型
       LtableData: [], //列表数据
       RtableData: [], //列表数据
       form: {
@@ -189,6 +190,7 @@ export default {
     };
   },
   created() {
+    this.typeName = this.$route.query.typeName;
     this.init();
   },
   mounted() {
@@ -237,31 +239,11 @@ export default {
   },
   methods: {
     init() {
-      //对象类型
-      this.getTypeNames();
-    },
-    //获取tab页
-    getTypeNames() {
-      let param = { Related: false };
-      //对象类型
-      dynamicPointTypeList(param, res => {
-        if (res.Result == "success") {
-          this.typeList = res.Content;
-          if (this.typeList.length) {
-            //记录上次操作的tab页
-            this.curType =
-              this.curType != 0 ? this.curType : this.typeList[0].Name;
-            this.getLeftData();
-            this.getRightData();
-          } else {
-            this.LtableData = [];
-            this.RtableData = [];
-          }
-        }
-      });
+      this.getLeftData();
+      this.getRightData();
     },
     //切换AI辅助
-    changeType() {},
+    changeType() { },
     //推荐中的选择事件
     selectAI(i, l) {
       //i 索引 l 左侧AI or 右侧AI
@@ -316,7 +298,7 @@ export default {
       let param = {
         PageNumber: this.lPage.pageNumber,
         PageSize: this.lPage.pageSize,
-        TypeNameList: [this.curType]
+        TypeNameList: [this.typeName]
       };
       //处理查询条件(目前只是单个查,需后台支持)
       if (this.form.EquipmentMark && this.form.EquipmentMark.length) {
@@ -347,7 +329,7 @@ export default {
       let param = {
         PageNumber: this.rPage.pageNumber,
         PageSize: this.rPage.pageSize,
-        TypeNameList: [this.curType]
+        TypeNameList: [this.typeName]
       };
       //处理查询条件(目前只是单个查,需后台支持)
       if (this.form.EquipLocalName && this.form.EquipLocalName.length) {
@@ -402,6 +384,10 @@ export default {
     changeLocationFlag(val) {
       this.form.LocationFlag = val;
       this.getLeftData();
+    },
+    //返回
+    goback(){
+      this.$router.go(-1);
     }
   },
   watch: {

+ 31 - 214
src/views/point/dynamicdata/index.vue

@@ -1,82 +1,24 @@
 <template>
   <div id="dynamicdata">
-    <!-- 按钮及提示 -->
-    <div class="text-right">
-      <span v-if="tipsType==1">最后一次执行时间:{{lastUpdateTime}}</span>
-      <span v-if="tipsType==2" style="color:red;">
-        原始点位变化,部分标识受到影响,请重新执行对应规则
-        <i class="el-icon-right"></i>
-      </span>
-      <span v-if="tipsType==3" style="color:red;">
-        对应规则有更新,记得执行哦
-        <i class="el-icon-right"></i>
-      </span>
-      <el-button size="medium" @click="apply">按对应规则自动设定动态参数信息点</el-button>
-      <el-button size="medium" type="primary" @click="toAddRelation">填充对应规则</el-button>
-    </div>
     <!-- tab分页 -->
-    <el-tabs v-model="curType">
-      <el-tab-pane v-for="(item) in typeList" :key="item.Name" :label="item.Name+'('+item.Rcount+'/'+item.Sum+')'" :name="item.Name"></el-tab-pane>
-    </el-tabs>
-    <!-- 查询条件 -->
-    <div class="query-area">
-      <el-form ref="form" :model="form" :inline="true">
-        <el-row>
-          <div class="query-item">
-            <el-form-item>
-              <el-input placeholder="请输入设备标识关键字" v-model="form.EquipmentMark" class="input-with-select">
-                <el-button slot="append" icon="el-icon-search" @click="queryTableData"></el-button>
-              </el-input>
-            </el-form-item>
-          </div>
-          <div class="query-item">
-            <label>数据源</label>
-            <dataSource :Related="true" @change="changeDataSource"></dataSource>
-          </div>
-          <div class="query-item">
-            <dictionary-device @change="changeDictionary" :Related="true"></dictionary-device>
-          </div>
-          <div class="query-item">
-            <label>位置标签</label>
-            <locationFlag :Related="true" @change="changeLocationFlag"></locationFlag>
-          </div>
-        </el-row>
-      </el-form>
-    </div>
-    <!-- 列表区域 -->
-    <div class="table-area">
-      <el-table :data="tableData" style="width: 100%" height="100%" v-show="1" v-loading="loading">
-        <el-table-column label="点位表中出现的所有设备">
-          <el-table-column prop="EquipmentMark" label="设备标识" show-overflow-tooltip></el-table-column>
-          <el-table-column prop="LocationFlag" label="位置标签" show-overflow-tooltip>
-            <template slot-scope="scope">
-              <el-tooltip :content="scope.row.LocationFlag.toString()" placement="top">
-                <span>{{scope.row.LocationFlag.toString()}}</span>
-              </el-tooltip>
-            </template>
-          </el-table-column>
-          <el-table-column prop="Datasource" label="数据源" show-overflow-tooltip></el-table-column>
-          <el-table-column prop="SubTypeName" label="数字字典设备类型" show-overflow-tooltip></el-table-column>
-        </el-table-column>
-        <el-table-column label="对应物理世界中的设备实例">
-          <el-table-column prop="EquipLocalName" label="对应的设备实例" show-overflow-tooltip></el-table-column>
-          <el-table-column prop="FloorLocalName" label="实例所在建筑楼层" show-overflow-tooltip></el-table-column>
-          <el-table-column prop="RoomLocalName" label="实例所在业务空间" show-overflow-tooltip></el-table-column>
-        </el-table-column>
-        <el-table-column prop="action" label="操作">
-          <template slot-scope="scope">
-            <el-button size="mini" @click="handleDelete(scope.$index, scope.row)" type="danger" plain :disabled="scope.row.Related=='False'">清除对应</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-    <!-- 分页 -->
-    <el-pagination class="fr" v-show="tableData && tableData.length" @size-change="handleSizeChange" @current-change="handleCurrentChange"
-      :current-page="page.pageNumber" :page-sizes="page.pageSizes" :page-size="page.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="page.total"></el-pagination>
+    <el-row>
+      <el-col :span="17">
+        <el-tabs v-model="curType">
+          <el-tab-pane v-for="(item) in typeList" :key="item.Name" :label="item.Name+'('+item.Rcount+'/'+item.Sum+')'" :name="item.Name">
+          </el-tab-pane>
+        </el-tabs>
+      </el-col>
+      <el-col :span="7" style="text-align:right;">
+        <span style="margin-right:10px;">最后配置时间:{{lastUpdateTime}}</span>
+        <el-tooltip class="item" effect="dark" :content="tipCon" placement="left">
+          <el-button size="small" type="primary" @click="apply" icon="el-icon-refresh" style="float:right;">配置</el-button>
+        </el-tooltip>
+      </el-col>
+    </el-row>
+    <equip-rules v-if="curType=='设备'" ref="equip" :typeName="curType"></equip-rules>
+    <!-- <parts-rules v-if="!curType=='设备'" ref="parts" :typeName="'设备'"></parts-rules> -->
     <!-- 应用规则弹窗 -->
     <apply-rules-dialog ref="apply"></apply-rules-dialog>
-    <!-- 清除对应关系弹窗 -->
-    <del-relation-dialog ref="del" @refresh="refresh"></del-relation-dialog>
     <!-- 规则更新提示 -->
     <el-dialog title="提示" :visible.sync="ruleDialogShow" width="25%" @close="rulesClose">
       <span>{{ruleDialogStr}}</span>
@@ -91,17 +33,12 @@
 import tools from "@/utils/tools";
 import { mapGetters, mapActions } from "vuex";
 import applyRulesDialog from "@/components/point/dynamicdata/applyRulesDialog";
-import delRelationDialog from "@/components/point/dynamicdata/delRelationDialog";
-import dictionaryDevice from "@/components/point/dynamicdata/dictionaryDevice";
-import dataSource from "@/components/point/dynamicdata/dataSource";
-import locationFlag from "@/components/point/dynamicdata/locationFlag";
+import equipRules from "@/components/point/dynamicdata/equipRules";
+import partsRules from "@/components/point/dynamicdata/partsRules";
 import {
   dynamicClashConfirm,
   dynamicExecute,
   dynamicPromptmessage,
-  dynamicPromptobjs,
-  dynamicQuery,
-  dynamicQueryPoint,
   dynamicPointTypeList
 } from "@/api/scan/request";
 export default {
@@ -112,40 +49,22 @@ export default {
     return {
       curType: "", //当前所在tab页
       typeList: [], //tab页list
-      sourceList: [], //数据源
-      DynEquipList: [], //数据字典设备类型
-      LocFlagList: [], //位置标签
-      tableData: [], //列表数据
-      page: {
-        pageSize: 50,
-        pageSizes: [10, 20, 50, 100],
-        pageNumber: 1,
-        total: 0
-      },
-      form: {
-        EquipmentMark: "", //设备标识关键字
-        SubTypeName: [], //数据字典设备类型
-        LocationFlag: [], //位置标签
-        Datasource: [] //数据源
-      }, //查询条件
       lastUpdateTime: "", //最后更新时间
       tipsType: 1, //提示信息种类
       ruleDialogShow: false, //规则提示执行弹窗
       ruleDialogStr: "", //规则提示执行弹窗文字
-      loading: false //列表loading
+      tipCon: '按对应规则自动设定实例动态参数信息点', //配置按钮提示文字
     };
   },
   components: {
     applyRulesDialog,
-    delRelationDialog,
-    dictionaryDevice,
-    dataSource,
-    locationFlag
+    equipRules,
+    partsRules
   },
   created() {
     this.init();
   },
-  mounted() {},
+  mounted() { },
   methods: {
     //获取查询条件-提示信息
     init() {
@@ -157,24 +76,20 @@ export default {
         if (res.Result == "success") {
           if (res.Content.length) {
             for (let i = 0; i < res.Content.length; i++) {
-              if (res.Content[i].Type == "未执行对应规则") {
-                this.tipsType = 3;
-                this.ruleDialogStr = "对应规则更新,是否现在执行?";
-                this.ruleDialogShow = true;
-                return;
+              if (res.Content[i].Type == "最后一次执行时间") {
+                this.lastUpdateTime = res.Content[i].Content;
+                this.tipsType = 1;
               }
               if (res.Content[i].Type == "原始点位增删") {
                 this.tipsType = 2;
                 this.ruleDialogStr =
                   "原始点位变化,部分标识受到影响,请重新执行对应规则";
                 this.ruleDialogShow = true;
-                return;
               }
-              if (res.Content[i].Type == "最后一次执行时间") {
-                this.lastUpdateTime = res.Content[i].Content;
-                this.tipsType = 1;
-                this.ruleDialogShow = false;
-                return;
+              if (res.Content[i].Type == "未执行对应规则") {
+                this.tipsType = 3;
+                this.ruleDialogStr = "对应规则更新,是否现在执行?";
+                this.ruleDialogShow = true;
               }
             }
           }
@@ -192,7 +107,7 @@ export default {
             //记录上次操作的tab页
             this.curType =
               this.curType != 0 ? this.curType : this.typeList[0].Name;
-            this.getTableData();
+            // this.getTableData();
           } else {
             this.tableData = [];
           }
@@ -208,88 +123,12 @@ export default {
       });
       // this.$refs.apply.showDialog();
     },
-    //清除对应关系
-    handleDelete(index, row) {
-      this.$refs.del.showDialog(row);
-    },
-    //改变pagesize
-    handleSizeChange(pageSize) {
-      this.page.pageSize = pageSize;
-      this.getTableData();
-    },
-    //改变pageno
-    handleCurrentChange(pageNo) {
-      this.page.pageNumber = pageNo;
-      this.getTableData();
-    },
-    //跳转至填充对应规则
-    toAddRelation() {
-      this.$router.push({ name: "addRelation" });
-    },
-    //获取表格数据
-    getTableData() {
-      let param = {
-        PageNumber: this.page.pageNumber,
-        PageSize: this.page.pageSize,
-        TypeNameList: [this.curType]
-      };
-      //处理查询条件
-      if (this.form.EquipmentMark && this.form.EquipmentMark.length) {
-        param.EquipmentMark = this.form.EquipmentMark;
-      }
-      if (this.form.SubTypeName.length) {
-        param.SubTypeNameList = this.form.SubTypeName;
-      }
-      if (this.form.LocationFlag.length) {
-        param.LocationFlagList = this.form.LocationFlag;
-      }
-      if (this.form.Datasource.length) {
-        param.DatasourceList = this.form.Datasource;
-      }
-      this.loading = true;
-      // 查询对应关系(P1)
-      dynamicQuery(param, res => {
-        this.loading = false;
-        if (res.Result == "success") {
-          this.tableData = res.Content;
-          this.page.total = res.Total;
-        }
-      });
-    },
-    //刷新列表
-    refresh() {
-      this.page.pageNumber = 1;
-      this.getTypeNames();
-    },
     //规则执行弹窗
     rulesClose() {
       this.ruleDialogShow = false;
     },
     //现在执行
-    nowDo() {},
-    //数据字典设备类型修改
-    changeDictionary(val) {
-      this.page.pageNumber = 1;
-      this.form.SubTypeName = val;
-      this.getTableData();
-    },
-    //数据源修改
-    changeDataSource(val) {
-      this.page.pageNumber = 1;
-      this.form.Datasource = val;
-      this.getTableData();
-    },
-    //修改位置标签
-    changeLocationFlag(val) {
-      this.page.pageNumber = 1;
-      this.form.LocationFlag = val;
-      this.getTableData();
-    },
-    //查询列表
-    queryTableData() {
-      this.page.pageNumber = 1;
-      this.getTableData();
-    }
+    nowDo() { },
   },
   watch: {
     projectId() {
@@ -305,28 +144,6 @@ export default {
   background-color: #fff;
   padding: 10px;
   position: relative;
-  /deep/ .text-right {
-    text-align: right;
-  }
-  .query-item {
-    float: left;
-    & + .query-item {
-      margin-left: 10px;
-    }
-  }
-  .table-area {
-    width: 100%;
-    height: calc(100% - 215px);
-    td div {
-      white-space: nowrap;
-      text-overflow: ellipsis;
-      overflow: hidden;
-    }
-  }
-  .fr {
-    padding-top: 10px;
-    float: right;
-  }
 }
 </style>