zcy 3 năm trước cách đây
mục cha
commit
b1d08a0fd5

+ 1 - 1
src/components/dict/JListSelectTag.vue

@@ -22,7 +22,7 @@
     :value="getValueSting"
     @change="handleInput"
   >
-    <a-select-option :value="undefined">请选择</a-select-option>
+<!--    <a-select-option :value="undefined">请选择</a-select-option>-->
     <a-select-option v-for="(item, key) in dictOptions" :key="key" :value="item[dictCode+'Id']">
       <span style="display: inline-block;width: 100%" :title=" item[dictCode+'Name'] ">
         {{ item[dictCode+'Name'] }}

+ 42 - 9
src/views/basics/add/index.vue

@@ -3,14 +3,6 @@
     <!-- 查询区域 -->
     <div class="table-page-search-wrapper">
       <a-form layout="inline" @keyup.enter.native="searchQuery">
-        <a-form-item>
-          <j-list-select-tag
-            v-model="queryParam.lineId"
-            style="width: 150px"
-            placeholder="选择线别"
-            dict-code="line"
-          />
-        </a-form-item>
         <a-form-item>
           <a-tree-select
             v-model="queryParam.deptId"
@@ -25,7 +17,19 @@
         </a-form-item>
         <a-form-item>
           <j-list-select-tag
-            v-model="queryParam.stationId"
+            v-if="lineShow"
+            v-model="lineId"
+            :dept-id="queryParam.deptId"
+            style="width: 150px"
+            placeholder="选择线路"
+            dict-code="line"
+          />
+        </a-form-item>
+        <a-form-item>
+          <j-list-select-tag
+            v-if="stationShow"
+            v-model="stationId"
+            :line-id="queryParam.lineId"
             style="width: 150px"
             placeholder="选择区间站场"
             dict-code="station"
@@ -128,6 +132,10 @@ export default {
   mixins: [listMixin],
   data() {
     return {
+      stationShow: true,
+      lineShow: true,
+      lineId: undefined,
+      stationId: undefined,
       // 查询条件
       queryParam: {},
       // 表头
@@ -145,6 +153,31 @@ export default {
   created() {
     this.loadTree()
   },
+  watch: {
+    stationId(val) {
+      this.queryParam.stationId = val
+    },
+    lineId(val) {
+      this.queryParam.lineId = val
+      this.stationShow = false
+      this.$nextTick(() => {
+        this.stationId = undefined
+        this.stationShow = true
+      })
+    },
+    'queryParam.deptId': {
+      handler: function(newV, oldV) {
+        this.lineShow = false
+        this.$nextTick(() => {
+          this.queryParam.lineId = undefined
+          this.queryParam.stationId = undefined
+          this.lineId = undefined
+          this.stationId = undefined
+          this.lineShow = true
+        })
+      }
+    }
+  },
   methods: {
     loadTree() {
       this.treeData = []

+ 7 - 7
src/views/basics/add/indexColumns.js

@@ -9,12 +9,6 @@ function columns(vm) {
         return parseInt(index) + 1
       }
     },
-    {
-      title: '线别',
-      align: 'center',
-      dataIndex: 'lineName',
-      key: 'lineName'
-    },
     {
       title: '车间',
       align: 'center',
@@ -22,7 +16,13 @@ function columns(vm) {
       key: 'deptName'
     },
     {
-      title: '区间站场',
+      title: '线路',
+      align: 'center',
+      dataIndex: 'lineName',
+      key: 'lineName'
+    },
+    {
+      title: '站场区间',
       align: 'center',
       dataIndex: 'stationName',
       key: 'stationName'

+ 37 - 4
src/views/basics/check/view/bl/index.vue

@@ -17,17 +17,21 @@
         </a-form-item>
         <a-form-item>
           <j-list-select-tag
-            v-model="queryParam.lineId"
+            v-if="lineShow"
+            v-model="lineId"
+            :dept-id="queryParam.deptId"
             style="width: 150px"
-            placeholder="选择线别"
+            placeholder="选择线"
             dict-code="line"
           />
         </a-form-item>
         <a-form-item>
           <j-list-select-tag
-            v-model="queryParam.stationId"
+            v-if="stationShow"
+            v-model="stationId"
+            :line-id="queryParam.lineId"
             style="width: 150px"
-            placeholder="选择区间站场"
+            placeholder="选择站场区间"
             dict-code="station"
           />
         </a-form-item>
@@ -135,6 +139,10 @@ export default {
   mixins: [listMixin],
   data() {
     return {
+      stationShow: true,
+      lineShow: true,
+      lineId: undefined,
+      stationId: undefined,
       // 查询条件
       queryParam: {},
       // 表头
@@ -149,6 +157,31 @@ export default {
       }
     }
   },
+  watch: {
+    stationId(val) {
+      this.queryParam.stationId = val
+    },
+    lineId(val) {
+      this.queryParam.lineId = val
+      this.stationShow = false
+      this.$nextTick(() => {
+        this.stationId = undefined
+        this.stationShow = true
+      })
+    },
+    'queryParam.deptId': {
+      handler: function(newV, oldV) {
+        this.lineShow = false
+        this.$nextTick(() => {
+          this.queryParam.lineId = undefined
+          this.queryParam.stationId = undefined
+          this.lineId = undefined
+          this.stationId = undefined
+          this.lineShow = true
+        })
+      }
+    }
+  },
   created() {
     this.loadTree()
   },

+ 2 - 2
src/views/basics/check/view/bl/indexColumns.js

@@ -16,13 +16,13 @@ function columns(vm) {
       key: 'deptName'
     },
     {
-      title: '线',
+      title: '线',
       align: 'center',
       dataIndex: 'lineName',
       key: 'lineName'
     },
     {
-      title: '区间站场',
+      title: '站场区间',
       align: 'center',
       dataIndex: 'stationName',
       key: 'stationName'

+ 24 - 16
src/views/basics/check/view/dc/index.vue

@@ -4,30 +4,34 @@
     <div class="table-page-search-wrapper">
       <a-form layout="inline" @keyup.enter.native="searchQuery">
         <a-form-item>
-          <a-form-item>
-            <a-tree-select
-              v-model="queryParam.deptId"
-              style="width: 150px"
-              :show-search="true"
-              allow-clear
-              placeholder="选择车间"
-              :tree-data="treeData"
-              tree-node-filter-prop="label"
-              :replace-fields="{children:'children', title:'label', key:'id', value: 'id' }"
-            />
-          </a-form-item>
+          <a-tree-select
+            v-model="queryParam.deptId"
+            style="width: 150px"
+            :show-search="true"
+            allow-clear
+            placeholder="选择车间"
+            :tree-data="treeData"
+            tree-node-filter-prop="label"
+            :replace-fields="{children:'children', title:'label', key:'id', value: 'id' }"
+          />
+        </a-form-item>
+        <a-form-item>
           <j-list-select-tag
-            v-model="queryParam.lineId"
+            v-if="lineShow"
+            v-model="lineId"
+            :dept-id="queryParam.deptId"
             style="width: 150px"
-            placeholder="选择线别"
+            placeholder="选择线"
             dict-code="line"
           />
         </a-form-item>
         <a-form-item>
           <j-list-select-tag
-            v-model="queryParam.stationId"
+            v-if="stationShow"
+            v-model="stationId"
+            :line-id="queryParam.lineId"
             style="width: 150px"
-            placeholder="选择区间站场"
+            placeholder="选择站场区间"
             dict-code="station"
           />
         </a-form-item>
@@ -128,6 +132,10 @@ export default {
   mixins: [listMixin],
   data() {
     return {
+      stationShow: true,
+      lineShow: true,
+      lineId: undefined,
+      stationId: undefined,
       // 查询条件
       queryParam: {},
       // 表头

+ 2 - 2
src/views/basics/check/view/dc/indexColumns.js

@@ -16,13 +16,13 @@ function columns(vm) {
       key: 'deptName'
     },
     {
-      title: '线',
+      title: '线',
       align: 'center',
       dataIndex: 'lineName',
       key: 'lineName'
     },
     {
-      title: '区间站场',
+      title: '站场区间',
       align: 'center',
       dataIndex: 'stationName',
       key: 'stationName'

+ 38 - 4
src/views/basics/check/view/fd/index.vue

@@ -17,17 +17,21 @@
         </a-form-item>
         <a-form-item>
           <j-list-select-tag
-            v-model="queryParam.lineId"
+            v-if="lineShow"
+            v-model="lineId"
+            :dept-id="queryParam.deptId"
             style="width: 150px"
-            placeholder="选择线别"
+            placeholder="选择线"
             dict-code="line"
           />
         </a-form-item>
         <a-form-item>
           <j-list-select-tag
-            v-model="queryParam.stationId"
+            v-if="stationShow"
+            v-model="stationId"
+            :line-id="queryParam.lineId"
             style="width: 150px"
-            placeholder="选择区间站场"
+            placeholder="选择站场区间"
             dict-code="station"
           />
         </a-form-item>
@@ -135,6 +139,10 @@ export default {
   mixins: [listMixin],
   data() {
     return {
+      stationShow: true,
+      lineShow: true,
+      lineId: undefined,
+      stationId: undefined,
       // 查询条件
       queryParam: {},
       // 表头
@@ -149,6 +157,32 @@ export default {
       }
     }
   },
+  watch: {
+    stationId(val) {
+      this.queryParam.stationId = val
+    },
+    lineId(val) {
+      this.queryParam.lineId = val
+      this.stationShow = false
+      this.$nextTick(() => {
+        this.stationId = undefined
+        this.stationShow = true
+      })
+    },
+    'queryParam.deptId': {
+      handler: function(newV, oldV) {
+        this.lineShow = false
+        this.$nextTick(() => {
+          this.queryParam.lineId = undefined
+          this.queryParam.stationId = undefined
+          this.lineId = undefined
+          this.stationId = undefined
+          this.lineShow = true
+        })
+      }
+    }
+  },
+
   created() {
     this.loadTree()
   },

+ 2 - 2
src/views/basics/check/view/fd/indexColumns.js

@@ -16,13 +16,13 @@ function columns(vm) {
       key: 'deptName'
     },
     {
-      title: '线',
+      title: '线',
       align: 'center',
       dataIndex: 'lineName',
       key: 'lineName'
     },
     {
-      title: '区间站场',
+      title: '站场区间',
       align: 'center',
       dataIndex: 'stationName',
       key: 'stationName'

+ 42 - 9
src/views/basics/check/view/gl/index.vue

@@ -17,17 +17,21 @@
         </a-form-item>
         <a-form-item>
           <j-list-select-tag
-            v-model="queryParam.lineId"
+            v-if="lineShow"
+            v-model="lineId"
+            :dept-id="queryParam.deptId"
             style="width: 150px"
-            placeholder="选择线别"
+            placeholder="选择线"
             dict-code="line"
           />
         </a-form-item>
         <a-form-item>
           <j-list-select-tag
-            v-model="queryParam.stationId"
+            v-if="stationShow"
+            v-model="stationId"
+            :line-id="queryParam.lineId"
             style="width: 150px"
-            placeholder="选择区间站场"
+            placeholder="选择站场区间"
             dict-code="station"
           />
         </a-form-item>
@@ -69,10 +73,10 @@
     <!-- 操作按钮区域 -->
     <div class="table-operator" style="margin: 15px 0">
       <a-button type="primary" icon="plus" @click="handleAdd">新增</a-button>
-<!--      <a-button ghost type="danger" icon="download" @click="handleExportXls('角色信息')">导出</a-button>-->
-<!--      <a-upload name="file" :show-upload-list="false" :multiple="false" :headers="tokenHeader" :action="url.importExcelUrl" @change="handleImportExcel">-->
-<!--        <a-button ghost type="danger" icon="import">导入</a-button>-->
-<!--      </a-upload>-->
+      <!--      <a-button ghost type="danger" icon="download" @click="handleExportXls('角色信息')">导出</a-button>-->
+      <!--      <a-upload name="file" :show-upload-list="false" :multiple="false" :headers="tokenHeader" :action="url.importExcelUrl" @change="handleImportExcel">-->
+      <!--        <a-button ghost type="danger" icon="import">导入</a-button>-->
+      <!--      </a-upload>-->
 
       <a-dropdown v-if="selectedRowKeys.length > 0">
         <a-menu slot="overlay">
@@ -126,7 +130,7 @@
 import { listMixin } from '@/mixin/listMixin'
 import columns from './indexColumns'
 import CheckAndEditModel from './CheckAndEditModel'
-import {getAction} from "@/api/request";
+import { getAction } from '@/api/request'
 
 export default {
   components: {
@@ -135,6 +139,10 @@ export default {
   mixins: [listMixin],
   data() {
     return {
+      stationShow: true,
+      lineShow: true,
+      lineId: undefined,
+      stationId: undefined,
       // 查询条件
       queryParam: {},
       // 表头
@@ -149,6 +157,31 @@ export default {
       }
     }
   },
+  watch: {
+    stationId(val) {
+      this.queryParam.stationId = val
+    },
+    lineId(val) {
+      this.queryParam.lineId = val
+      this.stationShow = false
+      this.$nextTick(() => {
+        this.stationId = undefined
+        this.stationShow = true
+      })
+    },
+    'queryParam.deptId': {
+      handler: function(newV, oldV) {
+        this.lineShow = false
+        this.$nextTick(() => {
+          this.queryParam.lineId = undefined
+          this.queryParam.stationId = undefined
+          this.lineId = undefined
+          this.stationId = undefined
+          this.lineShow = true
+        })
+      }
+    }
+  },
   created() {
     this.loadTree()
   },

+ 2 - 2
src/views/basics/check/view/gl/indexColumns.js

@@ -16,13 +16,13 @@ function columns(vm) {
       key: 'deptName'
     },
     {
-      title: '线',
+      title: '线',
       align: 'center',
       dataIndex: 'lineName',
       key: 'lineName'
     },
     {
-      title: '区间站场',
+      title: '站场区间',
       align: 'center',
       dataIndex: 'stationName',
       key: 'stationName'

+ 37 - 4
src/views/basics/check/view/jc/index.vue

@@ -17,17 +17,21 @@
         </a-form-item>
         <a-form-item>
           <j-list-select-tag
-            v-model="queryParam.lineId"
+            v-if="lineShow"
+            v-model="lineId"
+            :dept-id="queryParam.deptId"
             style="width: 150px"
-            placeholder="选择线别"
+            placeholder="选择线"
             dict-code="line"
           />
         </a-form-item>
         <a-form-item>
           <j-list-select-tag
-            v-model="queryParam.stationId"
+            v-if="stationShow"
+            v-model="stationId"
+            :line-id="queryParam.lineId"
             style="width: 150px"
-            placeholder="选择区间站场"
+            placeholder="选择站场区间"
             dict-code="station"
           />
         </a-form-item>
@@ -135,6 +139,10 @@ export default {
   mixins: [listMixin],
   data() {
     return {
+      stationShow: true,
+      lineShow: true,
+      lineId: undefined,
+      stationId: undefined,
       // 查询条件
       queryParam: {},
       // 表头
@@ -149,6 +157,31 @@ export default {
       }
     }
   },
+  watch: {
+    stationId(val) {
+      this.queryParam.stationId = val
+    },
+    lineId(val) {
+      this.queryParam.lineId = val
+      this.stationShow = false
+      this.$nextTick(() => {
+        this.stationId = undefined
+        this.stationShow = true
+      })
+    },
+    'queryParam.deptId': {
+      handler: function(newV, oldV) {
+        this.lineShow = false
+        this.$nextTick(() => {
+          this.queryParam.lineId = undefined
+          this.queryParam.stationId = undefined
+          this.lineId = undefined
+          this.stationId = undefined
+          this.lineShow = true
+        })
+      }
+    }
+  },
   created() {
     this.loadTree()
   },

+ 2 - 2
src/views/basics/check/view/jc/indexColumns.js

@@ -16,13 +16,13 @@ function columns(vm) {
       key: 'deptName'
     },
     {
-      title: '线',
+      title: '线',
       align: 'center',
       dataIndex: 'lineName',
       key: 'lineName'
     },
     {
-      title: '区间站场',
+      title: '站场区间',
       align: 'center',
       dataIndex: 'stationName',
       key: 'stationName'

+ 54 - 9
src/views/basics/check/view/wjc/index.vue

@@ -17,17 +17,21 @@
         </a-form-item>
         <a-form-item>
           <j-list-select-tag
-            v-model="queryParam.lineId"
+            v-if="lineShow"
+            v-model="lineId"
+            :dept-id="queryParam.deptId"
             style="width: 150px"
-            placeholder="选择线别"
+            placeholder="选择线"
             dict-code="line"
           />
         </a-form-item>
         <a-form-item>
           <j-list-select-tag
-            v-model="queryParam.stationId"
+            v-if="stationShow"
+            v-model="stationId"
+            :line-id="queryParam.lineId"
             style="width: 150px"
-            placeholder="选择区间站场"
+            placeholder="选择站场区间"
             dict-code="station"
           />
         </a-form-item>
@@ -69,10 +73,10 @@
     <!-- 操作按钮区域 -->
     <div class="table-operator" style="margin: 15px 0">
       <a-button type="primary" icon="plus" @click="handleAdd">新增</a-button>
-<!--      <a-button ghost type="danger" icon="download" @click="handleExportXls('角色信息')">导出</a-button>-->
-<!--      <a-upload name="file" :show-upload-list="false" :multiple="false" :headers="tokenHeader" :action="url.importExcelUrl" @change="handleImportExcel">-->
-<!--        <a-button ghost type="danger" icon="import">导入</a-button>-->
-<!--      </a-upload>-->
+      <!--      <a-button ghost type="danger" icon="download" @click="handleExportXls('角色信息')">导出</a-button>-->
+      <!--      <a-upload name="file" :show-upload-list="false" :multiple="false" :headers="tokenHeader" :action="url.importExcelUrl" @change="handleImportExcel">-->
+      <!--        <a-button ghost type="danger" icon="import">导入</a-button>-->
+      <!--      </a-upload>-->
 
       <a-dropdown v-if="selectedRowKeys.length > 0">
         <a-menu slot="overlay">
@@ -126,6 +130,7 @@
 import { listMixin } from '@/mixin/listMixin'
 import columns from './indexColumns'
 import CheckAndEditModel from './CheckAndEditModel'
+import { getAction } from '@/api/request'
 
 export default {
   components: {
@@ -134,21 +139,61 @@ export default {
   mixins: [listMixin],
   data() {
     return {
+      stationShow: true,
+      lineShow: true,
+      lineId: undefined,
+      stationId: undefined,
       // 查询条件
       queryParam: {},
       // 表头
       columns: columns(this),
+      treeData: [],
       url: {
         list: '/business/catenary/bus/wjcxc/list',
         delete: '/business/catenary/bus/wjcxc/',
         exportXlsUrl: '/exportXlsUrl',
-        importExcelUrl: `${process.env.VUE_APP_BASE_API}/importExcelUrl`
+        importExcelUrl: `${process.env.VUE_APP_BASE_API}/importExcelUrl`,
+        tree: '/system/dept/treeSelect'
+      }
+    }
+  },
+  watch: {
+    stationId(val) {
+      this.queryParam.stationId = val
+    },
+    lineId(val) {
+      this.queryParam.lineId = val
+      this.stationShow = false
+      this.$nextTick(() => {
+        this.stationId = undefined
+        this.stationShow = true
+      })
+    },
+    'queryParam.deptId': {
+      handler: function(newV, oldV) {
+        this.lineShow = false
+        this.$nextTick(() => {
+          this.queryParam.lineId = undefined
+          this.queryParam.stationId = undefined
+          this.lineId = undefined
+          this.stationId = undefined
+          this.lineShow = true
+        })
       }
     }
   },
   created() {
+    this.loadTree()
   },
   methods: {
+    loadTree() {
+      this.treeData = []
+      getAction(this.url.tree).then((res) => {
+        if (res.code === 200) {
+          this.treeData = res.data
+        }
+      })
+    }
   }
 }
 </script>

+ 2 - 2
src/views/basics/check/view/wjc/indexColumns.js

@@ -16,13 +16,13 @@ function columns(vm) {
       key: 'deptName'
     },
     {
-      title: '线',
+      title: '线',
       align: 'center',
       dataIndex: 'lineName',
       key: 'lineName'
     },
     {
-      title: '区间站场',
+      title: '站场区间',
       align: 'center',
       dataIndex: 'stationName',
       key: 'stationName'

+ 52 - 19
src/views/basics/pillar/index.vue

@@ -4,31 +4,35 @@
     <div class="table-page-search-wrapper">
       <a-form layout="inline" @keyup.enter.native="searchQuery">
         <a-form-item>
-          <j-list-select-tag
-            v-model="queryParam.lineId"
+          <a-tree-select
+            v-model="queryParam.deptId"
             style="width: 150px"
-            placeholder="选择线别"
-            dict-code="line"
+            :show-search="true"
+            allow-clear
+            placeholder="选择车间"
+            :tree-data="treeData"
+            tree-node-filter-prop="label"
+            :replace-fields="{children:'children', title:'label', key:'id', value: 'id' }"
           />
         </a-form-item>
         <a-form-item>
           <j-list-select-tag
-            v-model="queryParam.stationId"
+            v-if="lineShow"
+            v-model="lineId"
+            :dept-id="queryParam.deptId"
             style="width: 150px"
-            placeholder="选择区间站场"
-            dict-code="station"
+            placeholder="选择线路"
+            dict-code="line"
           />
         </a-form-item>
         <a-form-item>
-          <a-tree-select
-            v-model="queryParam.deptId"
+          <j-list-select-tag
+            v-if="stationShow"
+            v-model="stationId"
+            :line-id="queryParam.lineId"
             style="width: 150px"
-            :show-search="true"
-            allow-clear
-            placeholder="选择车间"
-            :tree-data="treeData"
-            tree-node-filter-prop="label"
-            :replace-fields="{children:'children', title:'label', key:'id', value: 'id' }"
+            placeholder="选择站场区间"
+            dict-code="station"
           />
         </a-form-item>
         <a-form-item>
@@ -62,10 +66,10 @@
     <!-- 操作按钮区域 -->
     <div class="table-operator" style="margin: 15px 0">
       <a-button type="primary" icon="plus" @click="handleAdd">新增</a-button>
-<!--      <a-button ghost type="danger" icon="download" @click="handleExportXls('角色信息')">导出</a-button>-->
-<!--      <a-upload name="file" :show-upload-list="false" :multiple="false" :headers="tokenHeader" :action="url.importExcelUrl" @change="handleImportExcel">-->
-<!--        <a-button ghost type="danger" icon="import">导入</a-button>-->
-<!--      </a-upload>-->
+      <!--      <a-button ghost type="danger" icon="download" @click="handleExportXls('角色信息')">导出</a-button>-->
+      <!--      <a-upload name="file" :show-upload-list="false" :multiple="false" :headers="tokenHeader" :action="url.importExcelUrl" @change="handleImportExcel">-->
+      <!--        <a-button ghost type="danger" icon="import">导入</a-button>-->
+      <!--      </a-upload>-->
 
       <a-dropdown v-if="selectedRowKeys.length > 0">
         <a-menu slot="overlay">
@@ -128,6 +132,10 @@ export default {
   mixins: [listMixin],
   data() {
     return {
+      stationShow: true,
+      lineShow: true,
+      lineId: undefined,
+      stationId: undefined,
       // 查询条件
       queryParam: {},
       // 表头
@@ -142,6 +150,31 @@ export default {
       }
     }
   },
+  watch: {
+    stationId(val) {
+      this.queryParam.stationId = val
+    },
+    lineId(val) {
+      this.queryParam.lineId = val
+      this.stationShow = false
+      this.$nextTick(() => {
+        this.stationId = undefined
+        this.stationShow = true
+      })
+    },
+    'queryParam.deptId': {
+      handler: function(newV, oldV) {
+        this.lineShow = false
+        this.$nextTick(() => {
+          this.queryParam.lineId = undefined
+          this.queryParam.stationId = undefined
+          this.lineId = undefined
+          this.stationId = undefined
+          this.lineShow = true
+        })
+      }
+    }
+  },
   created() {
     this.loadTree()
   },

+ 8 - 8
src/views/basics/pillar/indexColumns.js

@@ -10,23 +10,23 @@ function columns(vm) {
       }
     },
     {
-      title: '线别',
+      title: '车间',
+      align: 'center',
+      dataIndex: 'deptName',
+      key: 'deptName'
+    },
+    {
+      title: '线路',
       align: 'center',
       dataIndex: 'lineName',
       key: 'lineName'
     },
     {
-      title: '区间/站场',
+      title: '站场区间',
       align: 'center',
       dataIndex: 'stationName',
       key: 'stationName'
     },
-    {
-      title: '车间',
-      align: 'center',
-      dataIndex: 'deptName',
-      key: 'deptName'
-    },
     {
       title: '行别',
       align: 'center',

+ 67 - 51
src/views/basics/section/index.vue

@@ -10,24 +10,24 @@
             placeholder="输入区间站场名称"
           />
         </a-form-item>
+        <a-form-item>
+          <j-list-select-tag
+            v-model="queryParam.lineId"
+            style="width: 150px"
+            placeholder="选择线路"
+            dict-code="line"
+          />
+        </a-form-item>
         <a-form-item>
           <a-tree-select
-            v-model="queryParam.deptId"
+            v-model="deptId"
             style="width: 150px"
             :show-search="true"
             allow-clear
             placeholder="选择车间"
             :tree-data="treeData"
             tree-node-filter-prop="label"
-            :replace-fields="{children:'children', title:'label', key:'id', value: 'id' }"
-          />
-        </a-form-item>
-        <a-form-item>
-          <j-list-select-tag
-            v-model="queryParam.lineId"
-            style="width: 150px"
-            placeholder="选择线别"
-            dict-code="line"
+            :replace-fields="{children:'children', title:'deptName', key:'deptId', value: 'deptId' }"
           />
         </a-form-item>
         <a-form-item>
@@ -69,13 +69,13 @@
       <a-dropdown v-if="selectedRowKeys.length > 0">
         <a-menu slot="overlay">
           <a-menu-item key="1" @click="batchDel">
-            <a-icon type="delete"/>
+            <a-icon type="delete" />
             删除
           </a-menu-item>
         </a-menu>
         <a-button style="margin-left: 8px">
           批量操作
-          <a-icon type="down"/>
+          <a-icon type="down" />
         </a-button>
       </a-dropdown>
     </div>
@@ -83,8 +83,8 @@
     <!-- table区域-begin -->
     <div>
       <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
-        <i class="anticon anticon-info-circle ant-alert-icon"/> 已选择&nbsp;<a style="font-weight: 600">{{
-        selectedRowKeys.length }}</a>项&nbsp;&nbsp;
+        <i class="anticon anticon-info-circle ant-alert-icon" /> 已选择&nbsp;<a style="font-weight: 600">{{
+          selectedRowKeys.length }}</a>项&nbsp;&nbsp;
         <a style="margin-left: 24px" @click="onClearSelected">清空</a>
       </div>
 
@@ -102,8 +102,8 @@
       >
         <template slot="deptName" slot-scope="text, record">
           <span v-for="(item, index) in record['deptStations']">
-            <span v-if="record['deptStations'].length -1 != index"> {{item.deptName || item.deptId}} ,</span>
-            <span v-else>{{item.deptName || item.deptId}} </span>
+            <span v-if="record['deptStations'].length -1 != index"> {{ item.deptName || item.deptId }} ,</span>
+            <span v-else>{{ item.deptName || item.deptId }} </span>
           </span>
         </template>
         <template slot="lineName" slot-scope="text, record">
@@ -113,7 +113,7 @@
           <a-button size="small" type="primary" @click="handleEdit(record)">
             编辑
           </a-button>
-          <a-divider type="vertical"/>
+          <a-divider type="vertical" />
           <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.stationId)">
             <a-button size="small" type="danger">
               删除
@@ -121,53 +121,69 @@
           </a-popconfirm>
         </span>
       </a-table>
-      <check-and-edit-model ref="modalForm" @ok="modalFormOk"/>
+      <check-and-edit-model ref="modalForm" @ok="modalFormOk" />
     </div>
     <!-- table区域-end -->
     <!-- 表单区域 -->
   </el-card>
 </template>
 <script>
-  import {listMixin} from '@/mixin/listMixin'
-  import columns from './indexColumns'
-  import CheckAndEditModel from './CheckAndEditModel'
-  import {getAction} from "@/api/request";
+import { listMixin } from '@/mixin/listMixin'
+import columns from './indexColumns'
+import CheckAndEditModel from './CheckAndEditModel'
+import { getAction } from '@/api/request'
 
-  export default {
-    components: {
-      CheckAndEditModel
-    },
-    mixins: [listMixin],
-    data() {
-      return {
-        // 查询条件
-        queryParam: {},
-        // 表头
-        columns: columns(this),
-        treeData: [],
-        url: {
-          list: '/business/catenary/bus/station/list',
-          delete: '/business/catenary/bus/station/',
-          exportXlsUrl: '/exportXlsUrl',
-          tree: '/system/dept/treeSelect',
-          importExcelUrl: `${process.env.VUE_APP_BASE_API}/importExcelUrl`
-        }
+export default {
+  components: {
+    CheckAndEditModel
+  },
+  mixins: [listMixin],
+  data() {
+    return {
+      // 查询条件
+      deptId: undefined,
+      queryParam: {},
+      // 表头
+      columns: columns(this),
+      treeData: [],
+      url: {
+        list: '/business/catenary/bus/station/list',
+        delete: '/business/catenary/bus/station/',
+        exportXlsUrl: '/exportXlsUrl',
+        tree: '/business/catenary/bus/line/getDeptByLineId/',
+        importExcelUrl: `${process.env.VUE_APP_BASE_API}/importExcelUrl`
       }
+    }
+  },
+  watch: {
+    deptId(val) {
+      this.queryParam.deptId = val
     },
-    created() {
-      this.loadTree()
-    },
-    methods: {
-      loadTree() {
-        this.treeData = []
-        getAction(this.url.tree).then((res) => {
-          if (res.code === 200) {
-            this.treeData = res.data
-          }
+    'queryParam.lineId': {
+      handler: function(newV, oldV) {
+        if (newV) {
+          this.loadTree(newV)
+        }
+        this.$nextTick(() => {
+          this.queryParam.deptId = undefined
+          this.deptId = undefined
         })
       }
     }
+  },
+  created() {
+  },
+  methods: {
+    loadTree(lineId) {
+      this.treeData = []
+      getAction(this.url.tree + lineId).then((res) => {
+        if (res.code === 200) {
+          this.treeData = res.rows
+        }
+      })
+    }
   }
+}
 </script>
 <style scoped>
   @import '~@/assets/less/common.less'

+ 6 - 7
src/views/basics/section/indexColumns.js

@@ -15,6 +15,12 @@ function columns(vm) {
       dataIndex: 'stationName',
       key: 'stationName'
     },
+    {
+      title: '线路',
+      align: 'center',
+      dataIndex: 'lineName',
+      key: 'lineName'
+    },
     {
       title: '车间',
       align: 'center',
@@ -22,13 +28,6 @@ function columns(vm) {
       scopedSlots: { customRender: 'deptName' },
       key: 'deptName'
     },
-    {
-      title: '线别',
-      align: 'center',
-      dataIndex: 'lineName',
-      scopedSlots: { customRender: 'lineName' },
-      key: 'lineName'
-    },
     {
       title: '区间/站场',
       align: 'center',

+ 1 - 1
src/views/basics/suoting/CheckAndEditModel.vue

@@ -24,7 +24,7 @@
           @change="deptChange"
         />
       </a-form-model-item>
-      <a-form-model-item label="线" prop="lineId">
+      <a-form-model-item label="线" prop="lineId">
         <j-list-select-tag
           v-if="lineShow"
           v-model="model.lineId"

+ 43 - 23
src/views/basics/suoting/index.vue

@@ -10,14 +10,6 @@
             placeholder="输入所亭名称"
           />
         </a-form-item>
-        <a-form-item>
-          <j-list-select-tag
-            v-model="queryParam.lineId"
-            style="width: 150px"
-            placeholder="选择线别"
-            dict-code="line"
-          />
-        </a-form-item>
         <a-form-item>
           <a-tree-select
             v-model="queryParam.deptId"
@@ -31,25 +23,36 @@
           />
         </a-form-item>
         <a-form-item>
-          <a-input
-            v-model="queryParam.marker"
-            style="width: 150px"
-            placeholder="输入公里标"
-          />
-        </a-form-item>
-        <a-form-item>
-          <a-button type="primary" @click="searchQuery">查询</a-button>
-          <a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
-        </a-form-item>
-      </a-form>
+          <a-form-item>
+            <j-list-select-tag
+              v-if="lineShow"
+              v-model="lineId"
+              :dept-id="queryParam.deptId"
+              style="width: 150px"
+              placeholder="选择线路"
+              dict-code="line"
+            />
+          </a-form-item>
+          <a-form-item>
+            <a-input
+              v-model="queryParam.marker"
+              style="width: 150px"
+              placeholder="输入公里标"
+            />
+          </a-form-item>
+          <a-form-item>
+            <a-button type="primary" @click="searchQuery">查询</a-button>
+            <a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
+          </a-form-item>
+        </a-form-item></a-form>
     </div>
     <!-- 操作按钮区域 -->
     <div class="table-operator" style="margin: 15px 0">
       <a-button type="primary" icon="plus" @click="handleAdd">新增</a-button>
-<!--      <a-button ghost type="danger" icon="download" @click="handleExportXls('角色信息')">导出</a-button>-->
-<!--      <a-upload name="file" :show-upload-list="false" :multiple="false" :headers="tokenHeader" :action="url.importExcelUrl" @change="handleImportExcel">-->
-<!--        <a-button ghost type="danger" icon="import">导入</a-button>-->
-<!--      </a-upload>-->
+      <!--      <a-button ghost type="danger" icon="download" @click="handleExportXls('角色信息')">导出</a-button>-->
+      <!--      <a-upload name="file" :show-upload-list="false" :multiple="false" :headers="tokenHeader" :action="url.importExcelUrl" @change="handleImportExcel">-->
+      <!--        <a-button ghost type="danger" icon="import">导入</a-button>-->
+      <!--      </a-upload>-->
 
       <a-dropdown v-if="selectedRowKeys.length > 0">
         <a-menu slot="overlay">
@@ -112,6 +115,8 @@ export default {
   mixins: [listMixin],
   data() {
     return {
+      lineShow: true,
+      lineId: undefined,
       // 查询条件
       queryParam: {},
       // 表头
@@ -129,6 +134,21 @@ export default {
   created() {
     this.loadTree()
   },
+  watch: {
+    lineId(val) {
+      this.queryParam.lineId = val
+    },
+    'queryParam.deptId': {
+      handler: function(newV, oldV) {
+        this.lineShow = false
+        this.$nextTick(() => {
+          this.queryParam.lineId = undefined
+          this.lineId = undefined
+          this.lineShow = true
+        })
+      }
+    }
+  },
   methods: {
     loadTree() {
       this.treeData = []

+ 6 - 6
src/views/basics/suoting/indexColumns.js

@@ -15,18 +15,18 @@ function columns(vm) {
       dataIndex: 'substationName',
       key: 'substationName'
     },
-    {
-      title: '线别',
-      align: 'center',
-      dataIndex: 'lineName',
-      key: 'lineName'
-    },
     {
       title: '车间',
       align: 'center',
       dataIndex: 'deptName',
       key: 'deptName'
     },
+    {
+      title: '线路',
+      align: 'center',
+      dataIndex: 'lineName',
+      key: 'lineName'
+    },
     {
       title: '工区',
       align: 'center',

+ 49 - 16
src/views/basics/tunnel/index.vue

@@ -4,18 +4,10 @@
     <div class="table-page-search-wrapper">
       <a-form layout="inline" @keyup.enter.native="searchQuery">
         <a-form-item>
-          <a-form-item>
-            <a-input
-              v-model="queryParam.sdmc"
-              style="width: 150px"
-              placeholder="输入隧道名称"
-            />
-          </a-form-item>
-          <j-list-select-tag
-            v-model="queryParam.lineId"
+          <a-input
+            v-model="queryParam.sdmc"
             style="width: 150px"
-            placeholder="选择线别"
-            dict-code="line"
+            placeholder="输入隧道名称"
           />
         </a-form-item>
         <a-form-item>
@@ -32,7 +24,19 @@
         </a-form-item>
         <a-form-item>
           <j-list-select-tag
-            v-model="queryParam.stationId"
+            v-if="lineShow"
+            v-model="lineId"
+            :dept-id="queryParam.deptId"
+            style="width: 150px"
+            placeholder="选择线路"
+            dict-code="line"
+          />
+        </a-form-item>
+        <a-form-item>
+          <j-list-select-tag
+            v-if="stationShow"
+            v-model="stationId"
+            :line-id="queryParam.lineId"
             style="width: 150px"
             placeholder="选择区间站场"
             dict-code="station"
@@ -47,10 +51,10 @@
     <!-- 操作按钮区域 -->
     <div class="table-operator" style="margin: 15px 0">
       <a-button type="primary" icon="plus" @click="handleAdd">新增</a-button>
-<!--      <a-button ghost type="danger" icon="download" @click="handleExportXls('角色信息')">导出</a-button>-->
-<!--      <a-upload name="file" :show-upload-list="false" :multiple="false" :headers="tokenHeader" :action="url.importExcelUrl" @change="handleImportExcel">-->
-<!--        <a-button ghost type="danger" icon="import">导入</a-button>-->
-<!--      </a-upload>-->
+      <!--      <a-button ghost type="danger" icon="download" @click="handleExportXls('角色信息')">导出</a-button>-->
+      <!--      <a-upload name="file" :show-upload-list="false" :multiple="false" :headers="tokenHeader" :action="url.importExcelUrl" @change="handleImportExcel">-->
+      <!--        <a-button ghost type="danger" icon="import">导入</a-button>-->
+      <!--      </a-upload>-->
 
       <a-dropdown v-if="selectedRowKeys.length > 0">
         <a-menu slot="overlay">
@@ -113,6 +117,10 @@ export default {
   mixins: [listMixin],
   data() {
     return {
+      stationShow: true,
+      lineShow: true,
+      lineId: undefined,
+      stationId: undefined,
       // 查询条件
       queryParam: {},
       // 表头
@@ -130,6 +138,31 @@ export default {
   created() {
     this.loadTree()
   },
+  watch: {
+    stationId(val) {
+      this.queryParam.stationId = val
+    },
+    lineId(val) {
+      this.queryParam.lineId = val
+      this.stationShow = false
+      this.$nextTick(() => {
+        this.stationId = undefined
+        this.stationShow = true
+      })
+    },
+    'queryParam.deptId': {
+      handler: function(newV, oldV) {
+        this.lineShow = false
+        this.$nextTick(() => {
+          this.queryParam.lineId = undefined
+          this.queryParam.stationId = undefined
+          this.lineId = undefined
+          this.stationId = undefined
+          this.lineShow = true
+        })
+      }
+    }
+  },
   methods: {
     loadTree() {
       this.treeData = []

+ 7 - 7
src/views/basics/tunnel/indexColumns.js

@@ -15,12 +15,6 @@ function columns(vm) {
       dataIndex: 'sdmc',
       key: 'sdmc'
     },
-    {
-      title: '线别',
-      align: 'center',
-      dataIndex: 'lineName',
-      key: 'lineName'
-    },
     {
       title: '车间',
       align: 'center',
@@ -28,7 +22,13 @@ function columns(vm) {
       key: 'deptName'
     },
     {
-      title: '区间站场',
+      title: '线路',
+      align: 'center',
+      dataIndex: 'lineName',
+      key: 'lineName'
+    },
+    {
+      title: '站场区间',
       align: 'center',
       dataIndex: 'stationName',
       key: 'stationName'

+ 20 - 12
src/views/catenary/record/index.vue

@@ -6,18 +6,18 @@
       <div class="table-operator" style="margin: 5px 0;float: right">
         <a-button ghost type="danger" icon="download" @click="handleExportXls()">导出</a-button>
         <!--        <a-button ghost type="danger" icon="download" @click="handleExportXls('角色信息')">导出</a-button>-->
-<!--        <a-dropdown v-if="selectedRowKeys.length > 0">-->
-<!--          <a-menu slot="overlay">-->
-<!--            <a-menu-item key="1" @click="batchDel">-->
-<!--              <a-icon type="delete" />-->
-<!--              删除-->
-<!--            </a-menu-item>-->
-<!--          </a-menu>-->
-<!--          <a-button style="margin-left: 8px">-->
-<!--            批量操作-->
-<!--            <a-icon type="down" />-->
-<!--          </a-button>-->
-<!--        </a-dropdown>-->
+        <!--        <a-dropdown v-if="selectedRowKeys.length > 0">-->
+        <!--          <a-menu slot="overlay">-->
+        <!--            <a-menu-item key="1" @click="batchDel">-->
+        <!--              <a-icon type="delete" />-->
+        <!--              删除-->
+        <!--            </a-menu-item>-->
+        <!--          </a-menu>-->
+        <!--          <a-button style="margin-left: 8px">-->
+        <!--            批量操作-->
+        <!--            <a-icon type="down" />-->
+        <!--          </a-button>-->
+        <!--        </a-dropdown>-->
       </div>
       <a-form layout="inline" @keyup.enter.native="searchQuery">
         <a-form-model-item>
@@ -107,6 +107,14 @@ export default {
       }
     }
   },
+  watch: {
+    'queryParam.jcebType': {
+      immediate: true,
+      handler: function(newV, oldV) {
+        this.loadData()
+      }
+    }
+  },
   created() {
     this.loadTree()
   },

+ 2 - 2
src/views/catenary/record/indexColumns.js

@@ -25,8 +25,8 @@ function columns(vm) {
     {
       title: '检测记录类型',
       align: 'center',
-      dataIndex: 'jcebType',
-      key: 'jcebType'
+      dataIndex: 'jcebTypeText',
+      key: 'jcebTypeText'
     },
     {
       title: '记录人',