zcy 4 éve
szülő
commit
97bc6a93e0

+ 26 - 45
src/views/basics/add/CheckAndEditModel.vue

@@ -8,61 +8,31 @@
     @close="close"
   >
     <a-form-model ref="form" :label-col="labelCol" :wrapper-col="wrapperCol" :rules="validatorRules" :model="model">
-      <a-form-model-item label="支柱号" prop="zzh">
-        <a-input v-model="model.zzh" />
-      </a-form-model-item>
-      <a-form-model-item label="所属部门" prop="bm">
-      </a-form-model-item>
       <a-form-model-item label="线别" prop="xb">
-        <j-dict-select-tag
+        <j-list-select-tag
           v-model="model.xb"
-          dict-code="word_type"
+          dict-code="line"
+        />
+      </a-form-model-item>
+      <a-form-model-item label="车间" prop="bm">
+        <a-tree-select
+          v-model="model.bm"
+          tree-default-expand-all
+          style="width: 100%"
+          :tree-data="treeData"
+          tree-checkable
         />
       </a-form-model-item>
       <a-form-model-item label="站场区间" prop="qj">
-        <j-dict-select-tag
+        <j-list-select-tag
           v-model="model.qj"
-          dict-code="word_type"
+          dict-code="station"
         />
       </a-form-model-item>
       <a-form-model-item label="行别" prop="hb">
         <j-dict-select-tag
-          type="radioButton"
           v-model="model.hb"
-          dict-code="word_type"
-        />
-      </a-form-model-item>
-      <a-form-model-item label="公里标" prop="glb">
-        <a-input v-model="model.glb" />
-      </a-form-model-item>
-      <a-form-model-item label="支柱类型" prop="zzlx">
-        <j-dict-select-tag
-          v-model="model.zzlx"
-          dict-code="word_type"
-        />
-      </a-form-model-item>
-      <a-form-model-item label="支柱型号" prop="zzxh">
-        <j-dict-select-tag
-          v-model="model.zzxh"
-          dict-code="word_type"
-        />
-      </a-form-model-item>
-      <a-form-model-item label="支柱用途" prop="zzyt">
-        <j-dict-select-tag
-          v-model="model.zzyt"
-          dict-code="word_type"
-        />
-      </a-form-model-item>
-      <a-form-model-item label="材质" prop="cz">
-        <j-dict-select-tag
-          v-model="model.cz"
-          dict-code="word_type"
-        />
-      </a-form-model-item>
-      <a-form-model-item label="直线/曲外/曲内" prop="zxqwqn">
-        <j-dict-select-tag
           type="radioButton"
-          v-model="model.zxqwqn"
           dict-code="word_type"
         />
       </a-form-model-item>
@@ -70,7 +40,7 @@
   </j-modal>
 </template>
 <script>
-import { httpAction } from '@/api/request'
+import { httpAction, getAction } from '@/api/request'
 import JModal from '@/components/JModal'
 export default {
   name: 'CheckAndEditModel',
@@ -79,6 +49,7 @@ export default {
   },
   data() {
     return {
+      treeData: [],
       labelCol: { span: 4 },
       wrapperCol: { span: 19 },
       dataSource: [],
@@ -92,13 +63,23 @@ export default {
       },
       url: {
         add: '/business/catenary/bus/zzdzxx/add',
-        edit: '/business/catenary/bus/zzdzxx/update'
+        edit: '/business/catenary/bus/zzdzxx/update',
+        tree: '/system/dept/treeSelect'
       }
     }
   },
   created() {
+    this.loadTree()
   },
   methods: {
+    loadTree() {
+      this.treeData = []
+      getAction(this.url.tree).then((res) => {
+        if (res.code === 200) {
+          this.treeData = res.data
+        }
+      })
+    },
     add() {
       this.model = {}
       this.visible = true

+ 2 - 2
src/views/basics/add/index.vue

@@ -125,8 +125,8 @@ export default {
       // 表头
       columns: columns(this),
       url: {
-        list: '/business/catenary/bus/zzdzxx/list',
-        delete: '/business/catenary/bus/zzdzxx/',
+        list: '/business/catenary/bus/fjxgmd/list',
+        delete: '/business/catenary/bus/fjxgmd/',
         exportXlsUrl: '/exportXlsUrl',
         importExcelUrl: `${process.env.VUE_APP_BASE_API}/importExcelUrl`
       }

+ 16 - 34
src/views/basics/add/indexColumns.js

@@ -12,56 +12,38 @@ function columns(vm) {
     {
       title: '线别',
       align: 'center',
-      dataIndex: 'xb',
-      key: 'xb'
+      dataIndex: 'lineName',
+      key: 'lineName'
     },
     {
-      title: '区间/站场',
+      title: '车间',
       align: 'center',
-      dataIndex: 'qj',
-      key: 'qj'
+      dataIndex: 'deptName',
+      key: 'deptName'
     },
     {
-      title: '车间/工区',
+      title: '区间站场',
       align: 'center',
-      dataIndex: 'bm',
-      key: 'bm'
+      dataIndex: 'stationName',
+      key: 'stationName'
     },
     {
       title: '行别',
       align: 'center',
-      dataIndex: 'hb',
-      key: 'hb'
+      dataIndex: 'xingbieText',
+      key: 'xingbieText'
     },
     {
-      title: '支柱号',
+      title: '起始杆号',
       align: 'center',
-      dataIndex: 'zzh',
-      key: 'zzh'
+      dataIndex: 'qsgh',
+      key: 'qsgh'
     },
     {
-      title: '公里标',
+      title: '起始公里标',
       align: 'center',
-      dataIndex: 'glb',
-      key: 'glb'
-    },
-    {
-      title: '规格型号',
-      align: 'center',
-      dataIndex: 'zzxh',
-      key: 'zzxh'
-    },
-    {
-      title: '支柱类型',
-      align: 'center',
-      dataIndex: 'zzlx',
-      key: 'zzlx'
-    },
-    {
-      title: '安装时间',
-      align: 'center',
-      dataIndex: 'ccrq',
-      key: 'ccrq'
+      dataIndex: 'qsglb',
+      key: 'qsglb'
     },
     {
       title: '操作',