Przeglądaj źródła

重组文件等

yuhan 4 miesięcy temu
rodzic
commit
dcb255d5f0

+ 2 - 21
src/assets/less/interLock.css

@@ -256,30 +256,11 @@
 }
 .iotmenu-content-container .normal-tag,
 .iotmenu-modal-box .normal-tag {
-  display: inline-block;
-  height: 24px;
-  line-height: 24px;
-  text-align: center;
-  font-size: 15px;
-  padding: 0 8px;
-  border-radius: 16px;
-  color: #00cc66;
-  background: linear-gradient(0deg, rgba(182, 240, 211, 0.5), rgba(182, 240, 211, 0.5)), #ffffff;
-  border: 1px solid #b6f0d3;
+  color: #52c41a;
 }
 .iotmenu-content-container .abnormal-tag,
 .iotmenu-modal-box .abnormal-tag {
-  display: inline-block;
-  border-color: #ff9d34;
-  height: 24px;
-  line-height: 24px;
-  text-align: center;
-  font-size: 15px;
-  padding: 0 8px;
-  border-radius: 16px;
-  color: #fa8c16;
-  background: linear-gradient(0deg, rgba(240, 220, 182, 0.5), rgba(240, 217, 182, 0.5)), #ffffff;
-  border: 1px solid #f0e2b6;
+  color: #fb6666;
 }
 .iotmenu-modal-box .ant-modal .ant-modal-title {
   font-size: 18px;

+ 23 - 23
src/assets/less/interLock.less

@@ -244,41 +244,41 @@
   }
   /** tag不同样式 */
   .normal-tag{
-    // color: #52c41a;
+    color: #52c41a;
 
     // color: #52c41a;
     // background: #f6ffed;
     // border-color: #b7eb8f;
 
-    display: inline-block;
-    height: 24px;
-    line-height: 24px;
-    text-align: center;
-    font-size: 15px;
-    padding: 0 8px;
-    border-radius: 16px;
-    color: rgb(0, 204, 102);
-    background: linear-gradient(0deg, rgba(182, 240, 211, 0.5), rgba(182, 240, 211, 0.5)), rgb(255, 255, 255);
-    border: 1px solid rgb(182, 240, 211);
+    // display: inline-block;
+    // height: 24px;
+    // line-height: 24px;
+    // text-align: center;
+    // font-size: 15px;
+    // padding: 0 8px;
+    // border-radius: 16px;
+    // color: rgb(0, 204, 102);
+    // background: linear-gradient(0deg, rgba(182, 240, 211, 0.5), rgba(182, 240, 211, 0.5)), rgb(255, 255, 255);
+    // border: 1px solid rgb(182, 240, 211);
   }
   .abnormal-tag{
-    // color: #f56c6c;
+    color: #fb6666;
 
     // color: #fa8c16;
     // background: #fff7e6;
     // border-color: #ffd591;
 
-    display: inline-block;
-    border-color: #ff9d34;
-    height: 24px;
-    line-height: 24px;
-    text-align: center;
-    font-size: 15px;
-    padding: 0 8px;
-    border-radius: 16px;
-    color: #fa8c16;
-    background: linear-gradient(0deg, rgba(240, 220, 182, 0.5), rgba(240, 217, 182, 0.5)), rgb(255, 255, 255);
-    border: 1px solid rgb(240, 226, 182);
+    // display: inline-block;
+    // border-color: #ff9d34;
+    // height: 24px;
+    // line-height: 24px;
+    // text-align: center;
+    // font-size: 15px;
+    // padding: 0 8px;
+    // border-radius: 16px;
+    // color: #fa8c16;
+    // background: linear-gradient(0deg, rgba(240, 220, 182, 0.5), rgba(240, 217, 182, 0.5)), rgb(255, 255, 255);
+    // border: 1px solid rgb(240, 226, 182);
   }
 }
 .iotmenu-modal-box{

+ 11 - 20
src/views/module_interLock/InterlockSummary/InterlockSummaryList.vue

@@ -40,7 +40,7 @@
 
     <!-- 操作按钮区域 -->
     <div class="table-operator">
-      <a-button v-if="interlockType == '1'" v-has="'add:summary'" @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <a-button v-if="selectData.interlockType == '1'" v-has="'add:summary'" @click="handleAdd" type="primary" icon="plus">新增</a-button>
       <!-- <a-button type="primary" icon="download" @click="handleExportXls('联锁总表')">导出</a-button>
       <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
         <a-button type="primary" icon="import">导入</a-button>
@@ -147,6 +147,7 @@
       InterlockSummaryModal
     },
     props: {
+      /** 其中:interlockType判断点击的是否为系统(0为装置,1为系统,2为未选中) */
       selectData: {
         type: Object,
         default: function(){
@@ -313,8 +314,7 @@
         dictOptions:{},
         superFieldList:[],
         mouseSummaryid: '',
-        // 判断点击的是否为系统(0为装置,1为系统,2为未选中)
-        interlockType: '',
+        
       }
     },
     created() {
@@ -376,23 +376,6 @@
           }
         }
       },
-      // 处理父组件传过来的数据
-      getDataList(){
-        this.interlockType = this.selectData.interlockType
-        if (this.selectData.interlockType == 1) {
-          this.queryParam.interlockApparatusId = ''
-          this.queryParam.interlockSystemId = this.selectData.id
-        } else {
-          this.queryParam.interlockSystemId = ''
-          this.queryParam.interlockApparatusId = this.selectData.id
-        }
-        this.loadData()
-      },
-      searchReset() {
-        this.interlockType = 2
-        this.queryParam = {}
-        this.loadData(1);
-      },
       loadData(arg) {
         let that = this
         if(!this.url.list){
@@ -405,6 +388,14 @@
         }
         var params = this.getQueryParams();//查询条件
         this.loading = true;
+        // 左右两边重置分别控制各自的,所以转换数据换到这里
+        if (this.selectData.interlockType == 1) {
+          params.interlockApparatusId = ''
+          params.interlockSystemId = this.selectData.id
+        } else {
+          params.interlockSystemId = ''
+          params.interlockApparatusId = this.selectData.id
+        }
         getAction(this.url.list, params).then((res) => {
           if (res.success) {
             //update-begin---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------

+ 11 - 14
src/views/module_interLock/InterlockSummary/index.vue

@@ -26,7 +26,7 @@
 
 <script>
   import InterlockSummaryList from './InterlockSummaryList.vue';
-  import InterlockDetailList from '../InterlockDetail/InterlockDetailList.vue';
+  import InterlockDetailList from '../interlockSummaryDetail/InterlockSummaryDetailList.vue';
 
   export default({
     components: {
@@ -44,21 +44,18 @@
     },
     methods: {
       selectEquipment(selectedKeys,e){
-        if (selectedKeys.length == 0) {
-          this.$nextTick(()=>{
-            this.$refs.summaryList.searchReset();
-          })
+        if (selectedKeys.length <= 0) {
+          // 左侧树重置
+          this.selectData.interlockType = null
+          this.selectData.pid = null
+          this.selectData.id = null
         } else {
-          let interlockType = e.selectedNodes[0].data.props.interlockType
-          let pid = e.selectedNodes[0].data.props.pid
-          // console.log(88,interlockType)
-          this.selectData.interlockType = interlockType
-          this.selectData.pid = pid
-          this.selectData.id = e.selectedNodes[0].data.props.id
-          this.$nextTick(()=>{
-            this.$refs.summaryList.getDataList();
-          })
+          let interlockChooseData = e.selectedNodes[0].data.props
+          this.selectData.interlockType = interlockChooseData.interlockType
+          this.selectData.pid = interlockChooseData.pid
+          this.selectData.id = interlockChooseData.id
         }
+        this.$refs.summaryList.loadData();
       },
       summaryListClick(data){
         this.showPage='detail'

+ 4 - 1
src/views/module_interLock/baseInterLock/modules/BaseInterLockModal.vue

@@ -236,7 +236,10 @@
         confirmLoading: false,
         validatorRules: {
           interlockType: [{required: true, message: '请选择类型'}],
-          interlockName: [{required: true, message: '请输入名称'}],
+          interlockName: [
+            {required: true, message: '请输入名称'},
+            { validator: (rule, value, callback) => validateDuplicateValue('interlock_base', 'interlock_name', value, this.model.id, callback)},
+          ],
           pid: [{required: true, message: '请选择上级'}],
           controlSystemStatus: [
             {

+ 0 - 49
src/views/module_interLock/interlockHistoryData/InterlockHistoryIndex.vue

@@ -1,49 +0,0 @@
-<template>
-  <div class="iotmenu-content">
-    <u-equipment-tree-drag @select="selectEquipment" :treeData="treeData">
-      <interlock-history-list ref="summaryList" :selectData="selectData"></interlock-history-list>
-    </u-equipment-tree-drag>
-  </div>
-</template>
-
-<script>
-  import InterlockHistoryList from './InterlockHistory/InterlockHistoryList.vue'
-  export default({
-    components: {
-      InterlockHistoryList
-    },
-    data () {
-      return {
-        treeData: {
-          type: 'history',
-        },
-        selectData: {}
-      }
-    },
-    mounted() {
-    },
-    methods: {
-      selectEquipment(selectedKeys,e){
-        // console.log(99,selectedKeys,e)
-        if (selectedKeys.length == 0) {
-          this.$nextTick(()=>{
-            this.$refs.summaryList.searchReset();
-          })
-        } else {
-          let interlockType = e.selectedNodes[0].data.props.interlockType
-          let pid = e.selectedNodes[0].data.props.pid
-          // console.log(88,interlockType)
-          this.selectData.interlockType = interlockType
-          this.selectData.pid = pid
-          this.selectData.id = e.selectedNodes[0].data.props.id
-          this.$nextTick(()=>{
-            this.$refs.summaryList.getDataList();
-          })
-        }
-      },
-    },
-  })
-</script>
-
-<style lang="less" scoped>
-</style>

+ 10 - 21
src/views/module_interLock/interlockHistoryData/InterlockHistory/InterlockHistoryList.vue

@@ -47,7 +47,7 @@
 
     <!-- 操作按钮区域 -->
     <div class="table-operator">
-      <!-- <a-button v-if="interlockType == '1'" @click="handleAdd" type="primary" icon="plus">新增</a-button> -->
+      <!-- <a-button v-if="selectData.interlockType == '1'" @click="handleAdd" type="primary" icon="plus">新增</a-button> -->
       <a-button type="primary" icon="download" v-has="'export:history'" @click="handleExportXls('历史数据')">导出</a-button>
       <!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
         <a-button type="primary" icon="import">导入</a-button>
@@ -147,6 +147,7 @@
     },
     props: {
       selectData: {
+        /** 其中:interlockType判断点击的是否为系统(0为装置,1为系统,2为未选中) */
         type: Object,
         default: function(){
             return {} // 使用工厂函数返回默认值
@@ -284,8 +285,6 @@
         dictOptions:{},
         superFieldList:[],
         mouseSummaryid: '',
-        // 判断点击的是否为系统(0为装置,1为系统,2为未选中)
-        interlockType: '',
       }
     },
     created() {
@@ -343,24 +342,6 @@
           }
         }
       },
-      // 处理父组件传过来的数据
-      getDataList(){
-        console.log(111,this.selectData)
-        this.interlockType = this.selectData.interlockType
-        if (this.selectData.interlockType == 1) {
-          this.queryParam.interlockApparatusId = ''
-          this.queryParam.interlockSystemId = this.selectData.id
-        } else {
-          this.queryParam.interlockSystemId = ''
-          this.queryParam.interlockApparatusId = this.selectData.id
-        }
-        this.loadData()
-      },
-      searchReset() {
-        this.interlockType = 2
-        this.queryParam = {}
-        this.loadData(1);
-      },
       loadData(arg) {
         let that = this
         if(!this.url.list){
@@ -373,6 +354,14 @@
         }
         var params = this.getQueryParams();//查询条件
         this.loading = true;
+        // 左右两边重置分别控制各自的,所以转换数据换到这里
+        if (this.selectData.interlockType == 1) {
+          params.interlockApparatusId = ''
+          params.interlockSystemId = this.selectData.id
+        } else {
+          params.interlockSystemId = ''
+          params.interlockApparatusId = this.selectData.id
+        }
         getAction(this.url.list, params).then((res) => {
           if (res.success) {
             //update-begin---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------

+ 12 - 18
src/views/module_interLock/interlockHistoryData/index.vue

@@ -31,14 +31,12 @@
 </template>
 
 <script>
-  // import InterlockHistoryIndex from './InterlockHistoryIndex.vue';
-  import InterlockHistoryList from './InterlockHistory/InterlockHistoryList.vue'
+  import InterlockHistoryList from './InterlockHistoryList.vue'
   import InterlockTimedReport from '../interlockTimedReport/InterlockTimedReportList.vue';
-  import InterlockDetailList from '../InterlockDetail/InterlockDetailList.vue';
+  import InterlockDetailList from '../interlockHistoryDetail/InterlockHistoryDetailList.vue';
   export default {
     name: '',
     components: {
-      // InterlockHistoryIndex,
       InterlockHistoryList,
       InterlockTimedReport,
       InterlockDetailList,
@@ -56,22 +54,18 @@
     },
     methods: {
       selectEquipment(selectedKeys,e){
-        // console.log(99,selectedKeys,e)
-        if (selectedKeys.length == 0) {
-          this.$nextTick(()=>{
-            this.$refs.summaryList.searchReset();
-          })
+        if (selectedKeys.length <= 0) {
+          // 左侧树重置
+          this.selectData.interlockType = null
+          this.selectData.pid = null
+          this.selectData.id = null
         } else {
-          let interlockType = e.selectedNodes[0].data.props.interlockType
-          let pid = e.selectedNodes[0].data.props.pid
-          // console.log(88,interlockType)
-          this.selectData.interlockType = interlockType
-          this.selectData.pid = pid
-          this.selectData.id = e.selectedNodes[0].data.props.id
-          this.$nextTick(()=>{
-            this.$refs.summaryList.getDataList();
-          })
+          let interlockChooseData = e.selectedNodes[0].data.props
+          this.selectData.interlockType = interlockChooseData.interlockType
+          this.selectData.pid = interlockChooseData.pid
+          this.selectData.id = interlockChooseData.id
         }
+        this.$refs.summaryList.loadData();
       },
       historyListClick(data){
         this.showPage = 'detail'

src/views/module_interLock/interlockHistoryData/InterlockHistory/HistoryDetailList.vue → src/views/module_interLock/interlockHistoryDetail/InterlockHistoryDetailList.vue


src/views/module_interLock/InterlockDetail/InterlockDetailList.vue → src/views/module_interLock/interlockSummaryDetail/InterlockSummaryDetailList.vue


src/views/module_interLock/InterlockDetail/modules/InterlockDetailForm.vue → src/views/module_interLock/interlockSummaryDetail/modules/InterlockDetailForm.vue


src/views/module_interLock/InterlockDetail/modules/InterlockDetailModal.Style#Drawer.vue → src/views/module_interLock/interlockSummaryDetail/modules/InterlockDetailModal.Style#Drawer.vue


src/views/module_interLock/InterlockDetail/modules/InterlockDetailModal.vue → src/views/module_interLock/interlockSummaryDetail/modules/InterlockDetailModal.vue