浏览代码

完善系统设置

zcy 4 年之前
父节点
当前提交
74260360c2

+ 8 - 1
src/api/request.js

@@ -6,12 +6,19 @@ export function deleteAction(url, parameter) {
     method: 'delete'
   })
 }
-
+export function getDicAction(url, parameter) {
+  return request({
+    url: url + parameter,
+    method: 'get',
+    params: parameter
+  })
+}
 export function getAction(url, parameter) {
   return request({
     url: url,
     method: 'get',
     params: parameter
+
   })
 }
 

+ 5 - 5
src/components/dict/JDictSelectTag.vue

@@ -23,9 +23,9 @@
     @change="handleInput"
   >
     <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'] }}
+    <a-select-option v-for="(item, key) in dictOptions" :key="key" :value="item.dictValue">
+      <span style="display: inline-block;width: 100%" :title=" item.dictLabel ">
+        {{ item.dictLabel }}
       </span>
     </a-select-option>
   </a-select>
@@ -90,9 +90,9 @@ export default {
   methods: {
     initDictData() {
       // 根据字典Code, 初始化字典数组
-      getAction(`/business/catenary/bus/${this.dictCode}/list`).then((res) => {
+      getAction(`/system/dict/data/type/${this.dictCode}`).then((res) => {
         if (res.code === 200) {
-          this.dictOptions = res.rows
+          this.dictOptions = res.data
         }
       })
     },

+ 120 - 0
src/components/dict/JListSelectTag.vue

@@ -0,0 +1,120 @@
+<template>
+  <a-radio-group v-if="tagType=='radio'" :value="getValueSting" :disabled="disabled" @change="handleInput">
+    <a-radio v-for="(item, key) in dictOptions" :key="key" :value="item.value">{{ item.text }}</a-radio>
+  </a-radio-group>
+
+  <a-radio-group
+    v-else-if="tagType=='radioButton'"
+    button-style="solid"
+    :value="getValueSting"
+    :disabled="disabled"
+    @change="handleInput"
+  >
+    <a-radio-button v-for="(item, key) in dictOptions" :key="key" :value="item.value">{{ item.text }}</a-radio-button>
+  </a-radio-group>
+
+  <a-select
+    v-else-if="tagType=='select'"
+    :size="size"
+    :get-popup-container="getPopupContainer"
+    :placeholder="placeholder"
+    :disabled="disabled"
+    :value="getValueSting"
+    @change="handleInput"
+  >
+    <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'] }}
+      </span>
+    </a-select-option>
+  </a-select>
+</template>
+
+<script>
+import { getAction, postAction } from '@/api/request'
+
+export default {
+  name: 'JDictSelectTag',
+  model: {
+    prop: 'value',
+    event: 'change'
+  },
+  props: {
+    dictCode: String,
+    placeholder: String,
+    disabled: Boolean,
+    value: [String, Number],
+    type: String,
+    getPopupContainer: {
+      type: Function,
+      default: (node) => node.parentNode
+    },
+    size: {
+      type: String,
+      default: 'default'
+    }
+  },
+  data() {
+    return {
+      dictOptions: [],
+      tagType: ''
+    }
+  },
+  computed: {
+    getValueSting() {
+      // update-begin author:wangshuai date:20200601 for: 不显示placeholder的文字 ------
+      // 当有null或“” placeholder不显示
+      return this.value != null ? this.value.toString() : undefined
+      // update-end author:wangshuai date:20200601 for: 不显示placeholder的文字 ------
+    }
+  },
+  watch: {
+    dictCode: {
+      immediate: true,
+      handler() {
+        this.initDictData()
+      }
+    }
+  },
+  created() {
+    // console.log(this.dictCode);
+    if (!this.type || this.type === 'list') {
+      this.tagType = 'select'
+    } else {
+      this.tagType = this.type
+    }
+    // 获取字典数据
+    // this.initDictData();
+  },
+  methods: {
+    initDictData() {
+      // 根据字典Code, 初始化字典数组
+      getAction(`/business/catenary/bus/${this.dictCode}/list`).then((res) => {
+        if (res.code === 200) {
+          this.dictOptions = res.rows
+        }
+      })
+    },
+    handleInput(e = '') {
+      let val
+      if (Object.keys(e).includes('target')) {
+        val = e.target.value
+      } else {
+        val = e
+      }
+      console.log(val)
+      this.$emit('change', val)
+    },
+    setCurrentDictOptions(dictOptions) {
+      this.dictOptions = dictOptions
+    },
+    getCurrentDictOptions() {
+      return this.dictOptions
+    }
+  }
+}
+</script>
+
+<style scoped>
+</style>

+ 2 - 0
src/components/dict/index.js

@@ -1,9 +1,11 @@
 import JDictSelectTag from './JDictSelectTag.vue'
 import JMultiSelectTag from './JMultiSelectTag.vue'
 import JSearchSelectTag from './JSearchSelectTag.vue'
+import JListSelectTag from './JListSelectTag'
 
 export default {
   install: function(Vue) {
+    Vue.component('JListSelectTag', JListSelectTag)
     Vue.component('JDictSelectTag', JDictSelectTag)
     Vue.component('JMultiSelectTag', JMultiSelectTag)
     Vue.component('JSearchSelectTag', JSearchSelectTag)

+ 8 - 9
src/utils/request.js

@@ -58,16 +58,15 @@ service.interceptors.response.use(
         })
 
         // 50008: Illegal token; 50012: Other clients logged in; 50014: Token expired;
-        if (res.code === 50008 || res.code === 50012 || res.code === 50014) {
+        if (res.code === 401) {
           // to re-login
-          MessageBox.confirm('You have been logged out, you can cancel to stay on this page, or log in again', 'Confirm logout', {
-            confirmButtonText: 'Re-Login',
-            cancelButtonText: 'Cancel',
-            type: 'warning'
-          }).then(() => {
-            store.dispatch('user/resetToken').then(() => {
-              location.reload()
-            })
+          Message({
+            message: '请重新登录',
+            type: 'error',
+            duration: 3 * 1000
+          })
+          store.dispatch('user/resetToken').then(() => {
+            location.reload()
           })
         }
         return Promise.reject(new Error(res.msg || 'Error'))

+ 14 - 32
src/views/basics/line/indexColumns.js

@@ -12,20 +12,20 @@ function columns(vm) {
     {
       title: '线别',
       align: 'center',
-      dataIndex: 'xb',
-      key: 'xb'
+      dataIndex: 'lineType',
+      key: 'lineType'
     },
     {
-      title: '区间/站场',
+      title: '线路名称',
       align: 'center',
-      dataIndex: 'qj',
-      key: 'qj'
+      dataIndex: 'lineName',
+      key: 'lineName'
     },
     {
-      title: '车间/工区',
+      title: '所属车间',
       align: 'center',
-      dataIndex: 'bm',
-      key: 'bm'
+      dataIndex: 'deptName',
+      key: 'deptName'
     },
     {
       title: '行别',
@@ -34,34 +34,16 @@ function columns(vm) {
       key: 'hb'
     },
     {
-      title: '支柱号',
+      title: '开始公里标',
       align: 'center',
-      dataIndex: 'zzh',
-      key: 'zzh'
+      dataIndex: 'lineStartMarker',
+      key: 'lineStartMarker'
     },
     {
-      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: 'lineEndMarker',
+      key: 'lineEndMarker'
     },
     {
       title: '操作',

+ 3 - 3
src/views/basics/pillar/CheckAndEditModel.vue

@@ -21,13 +21,13 @@
         />
       </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="line"
         />
       </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="station"
         />
@@ -63,7 +63,7 @@
       <a-form-model-item label="材质" prop="cz">
         <j-dict-select-tag
           v-model="model.cz"
-          dict-code="cz"
+          dict-code="zzcz"
         />
       </a-form-model-item>
       <a-form-model-item label="直线/曲外/曲内" prop="zxqwqn">

+ 20 - 32
src/views/basics/section/indexColumns.js

@@ -10,58 +10,46 @@ function columns(vm) {
       }
     },
     {
-      title: '线别',
+      title: '区间站场名称',
       align: 'center',
-      dataIndex: 'xb',
-      key: 'xb'
+      dataIndex: 'stationName',
+      key: 'stationName'
     },
     {
-      title: '区间/站场',
+      title: '车间',
       align: 'center',
-      dataIndex: 'qj',
-      key: 'qj'
+      dataIndex: 'deptName',
+      key: 'deptName'
     },
     {
-      title: '车间/工区',
+      title: '线别',
       align: 'center',
-      dataIndex: 'bm',
-      key: 'bm'
+      dataIndex: 'lineName',
+      key: 'lineName'
     },
     {
       title: '行别',
       align: 'center',
-      dataIndex: 'hb',
-      key: 'hb'
-    },
-    {
-      title: '支柱号',
-      align: 'center',
-      dataIndex: 'zzh',
-      key: 'zzh'
+      dataIndex: 'xingbie',
+      key: 'xingbie'
     },
     {
-      title: '公里标',
-      align: 'center',
-      dataIndex: 'glb',
-      key: 'glb'
-    },
-    {
-      title: '规格型号',
+      title: '区间/站场',
       align: 'center',
-      dataIndex: 'zzxh',
-      key: 'zzxh'
+      dataIndex: 'stationType',
+      key: 'stationType'
     },
     {
-      title: '支柱类型',
+      title: '起始公里标',
       align: 'center',
-      dataIndex: 'zzlx',
-      key: 'zzlx'
+      dataIndex: 'startMarker',
+      key: 'startMarker'
     },
     {
-      title: '安装时间',
+      title: '结束公里标',
       align: 'center',
-      dataIndex: 'ccrq',
-      key: 'ccrq'
+      dataIndex: 'endMarker',
+      key: 'endMarker'
     },
     {
       title: '操作',

+ 21 - 33
src/views/basics/suoting/indexColumns.js

@@ -10,58 +10,46 @@ function columns(vm) {
       }
     },
     {
-      title: '线别',
+      title: '所亭名称',
       align: 'center',
-      dataIndex: 'xb',
-      key: 'xb'
+      dataIndex: 'substationName',
+      key: 'substationName'
     },
     {
-      title: '区间/站场',
+      title: '段别',
       align: 'center',
-      dataIndex: 'qj',
-      key: 'qj'
+      dataIndex: '',
+      key: ''
     },
     {
-      title: '车间/工区',
+      title: '车间',
       align: 'center',
-      dataIndex: 'bm',
-      key: 'bm'
+      dataIndex: 'deptName',
+      key: 'deptName'
     },
     {
-      title: '行别',
+      title: '工区',
       align: 'center',
-      dataIndex: 'hb',
-      key: 'hb'
+      dataIndex: 'workArea',
+      key: 'workArea'
     },
     {
-      title: '支柱号',
+      title: '经度',
       align: 'center',
-      dataIndex: 'zzh',
-      key: 'zzh'
+      dataIndex: 'longitude',
+      key: 'longitude'
     },
     {
-      title: '公里标',
-      align: 'center',
-      dataIndex: 'glb',
-      key: 'glb'
-    },
-    {
-      title: '规格型号',
+      title: '纬度',
       align: 'center',
-      dataIndex: 'zzxh',
-      key: 'zzxh'
+      dataIndex: 'latitude',
+      key: 'latitude'
     },
     {
-      title: '支柱类型',
-      align: 'center',
-      dataIndex: 'zzlx',
-      key: 'zzlx'
-    },
-    {
-      title: '安装时间',
+      title: '公里标',
       align: 'center',
-      dataIndex: 'ccrq',
-      key: 'ccrq'
+      dataIndex: 'marker',
+      key: 'marker'
     },
     {
       title: '操作',

+ 11 - 61
src/views/sys/dict/CheckAndEditModel.vue

@@ -8,63 +8,14 @@
     @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 label="字典名称" prop="dictName">
+        <a-input v-model="model.dictName" />
       </a-form-model-item>
-      <a-form-model-item label="所属部门" prop="bm">
+      <a-form-model-item label="码值" prop="dictType">
+        <a-input v-model="model.dictType" />
       </a-form-model-item>
-      <a-form-model-item label="线别" prop="xb">
-        <j-dict-select-tag
-          v-model="model.xb"
-          dict-code="word_type"
-        />
-      </a-form-model-item>
-      <a-form-model-item label="站场区间" prop="qj">
-        <j-dict-select-tag
-          v-model="model.qj"
-          dict-code="word_type"
-        />
-      </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 label="备注">
+        <a-input v-model="model.remark" />
       </a-form-model-item>
     </a-form-model>
   </j-modal>
@@ -87,12 +38,12 @@ export default {
       isCheck: false,
       model: {},
       validatorRules: {
-        name: [{ required: true, message: '请输入' }],
-        type: [{ required: true, message: '请选择' }]
+        dictName: [{ required: true, message: '请输入' }],
+        dictType: [{ required: true, message: '请输入' }]
       },
       url: {
-        add: '/business/catenary/bus/zzdzxx/add',
-        edit: '/business/catenary/bus/zzdzxx/update'
+        add: '/system/dict/type/add',
+        edit: '/system/dict/type/update'
       }
     }
   },
@@ -104,7 +55,6 @@ export default {
       this.visible = true
     },
     edit(record) {
-      debugger
       this.model = Object.assign({}, record)
       this.visible = true
     },
@@ -126,7 +76,7 @@ export default {
     },
     saveData() {
       let url, type
-      if (!this.model.id) {
+      if (!this.model.dictId) {
         url = this.url.add
         type = 'post'
       } else {

+ 152 - 0
src/views/sys/dict/DictItemList.vue

@@ -0,0 +1,152 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 抽屉 -->
+    <a-drawer
+      title="字典列表"
+      :width="screenWidth"
+      :visible="visible"
+      @close="onClose"
+    >
+      <!-- 抽屉内容的border -->
+      <div>
+        <div class="table-page-search-wrapper">
+          <a-form>
+            <a-row :gutter="10">
+              <a-col :md="2" :sm="24">
+                <a-button style="margin-bottom: 10px" type="primary" @click="handleAdd">新增</a-button>
+              </a-col>
+            </a-row>
+          </a-form>
+        </div>
+        <div>
+          <a-table
+            ref="table"
+            row-key="id"
+            size="middle"
+            :columns="columns"
+            :data-source="dataSource"
+            :loading="loading"
+            @change="handleTableChange"
+          >
+
+            <span slot="action" slot-scope="text, record">
+              <a @click="handleEdit(record)">编辑</a>
+              <a-divider type="vertical" />
+              <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.dictId)">
+                <a>删除</a>
+              </a-popconfirm>
+            </span>
+
+          </a-table>
+        </div>
+      </div>
+    </a-drawer>
+    <dict-item-modal ref="modalForm" @ok="modalFormOk" /> <!-- 字典数据 -->
+  </a-card>
+</template>
+
+<script>
+import DictItemModal from './DictItemModal'
+import { listMixin } from '@/mixin/listMixin'
+import { getDicAction } from '@/api/request'
+export default {
+  name: 'DictItemList',
+  components: { DictItemModal },
+  mixins: [listMixin],
+  data() {
+    return {
+      columns: [
+        {
+          title: '名称',
+          align: 'center',
+          dataIndex: 'dictLabel'
+        },
+        {
+          title: '数据值',
+          align: 'center',
+          dataIndex: 'dictValue'
+        },
+        {
+          title: '操作',
+          dataIndex: 'action',
+          align: 'center',
+          scopedSlots: { customRender: 'action' }
+        }
+      ],
+      title: '操作',
+      visible: false,
+      screenWidth: 800,
+      model: {},
+      dictId: '',
+      labelCol: {
+        xs: { span: 5 },
+        sm: { span: 5 }
+      },
+      wrapperCol: {
+        xs: { span: 12 },
+        sm: { span: 12 }
+      },
+      form: this.$form.createForm(this),
+      validatorRules: {
+        itemText: { rules: [{ required: true, message: '请输入名称!' }] },
+        itemValue: { rules: [{ required: true, message: '请输入数据值!' }] }
+      },
+      url: {
+        delete: '/system/dict/data/'
+      }
+    }
+  },
+  created() {
+    // 当页面初始化时,根据屏幕大小来给抽屉设置宽度
+    this.resetScreenSize()
+  },
+  methods: {
+    edit(record) {
+      if (record.dictId) {
+        this.dictId = record.dictId
+      }
+      this.model = Object.assign({}, record)
+      this.visible = true
+      // 当其它模块调用该模块时,调用此方法加载字典数据
+      this.loadDataTree()
+    },
+    // 添加字典数据
+    handleAdd() {
+      this.$refs.modalForm.add(this.dictId)
+      this.$refs.modalForm.title = '新增'
+    },
+    handleEdit(record){
+      this.$refs.modalForm.edit(this.dictId,record)
+      this.$refs.modalForm.title = '编辑'
+    },
+    onClose() {
+      this.visible = false
+      this.form.resetFields()
+      this.dataSource = []
+    },
+    // 抽屉的宽度随着屏幕大小来改变
+    resetScreenSize() {
+      const screenWidth = document.body.clientWidth
+      if (screenWidth < 600) {
+        this.screenWidth = screenWidth
+      } else {
+        this.screenWidth = 600
+      }
+    },
+    loadDataTree() {
+      this.loading = true
+      getDicAction('/system/dict/data/type/', this.model.dictType).then((res) => {
+        if (res.code === 200) {
+          this.dataSource = res.rows || res.data
+        } else {
+          this.$message.warning(res.msg)
+        }
+      }).finally(() => {
+        this.loading = false
+      })
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+</style>

+ 117 - 0
src/views/sys/dict/DictItemModal.vue

@@ -0,0 +1,117 @@
+<template>
+  <a-modal
+    :title="title"
+    :width="800"
+    :visible="visible"
+    :confirm-loading="confirmLoading"
+    cancel-text="关闭"
+    @ok="handleOk"
+    @cancel="handleCancel"
+  >
+    <a-spin :spinning="confirmLoading">
+      <a-form-model ref="form" :model="model" :rules="validatorRules">
+        <a-form-model-item
+          :label-col="labelCol"
+          :wrapper-col="wrapperCol"
+          prop="dictLabel"
+          label="名称"
+        >
+          <a-input v-model="model.dictLabel" placeholder="请输入名称" />
+        </a-form-model-item>
+        <a-form-model-item
+          :label-col="labelCol"
+          :wrapper-col="wrapperCol"
+          prop="dictValue"
+          label="数据值"
+        >
+          <a-input v-model="model.dictValue" placeholder="请输入数据值" />
+        </a-form-model-item>
+      </a-form-model>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { httpAction } from '@/api/request'
+
+export default {
+  name: 'DictItemModal',
+  data() {
+    return {
+      title: '操作',
+      visible: false,
+      model: {},
+      dictId: '',
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 }
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 }
+      },
+      confirmLoading: false,
+      validatorRules: {
+        dictLabel: [{ required: true, message: '请输入名称!' }],
+        dictValue: [{ required: true, message: '请输入数据值!' }]
+      },
+      url: {
+        add: '​/system​/dict​/data/add',
+        edit: '/system/dict/data/update'
+      }
+    }
+  },
+  created() {
+  },
+  methods: {
+    add(dictId) {
+      this.dictId = dictId
+      this.visible = true
+      // 初始化默认值
+    },
+    edit(dictId, record) {
+      this.model = Object.assign({}, record)
+      this.dictId = dictId
+      this.visible = true
+    },
+    // 确定
+    handleOk() {
+      // 触发表单验证
+      this.$refs.form.validate(valid => {
+        if (valid) {
+          this.model.dictLabel = (this.model.dictLabel || '').trim()
+          this.model.dictValue = (this.model.dictValue || '').trim()
+          let url, type
+          if (!this.dictId) {
+            url = this.url.add
+            type = 'post'
+          } else {
+            url = this.url.edit
+            type = 'put'
+          }
+          httpAction(url, { ...this.model, dictId: this.dictId }, type).then((res) => {
+            if (res.code === 200) {
+              this.$message.success(res.msg)
+              this.$emit('ok')
+              this.visible = false
+            } else {
+              console.log(res)
+            }
+          })
+        } else {
+          return false
+        }
+      })
+    },
+    // 关闭
+    handleCancel() {
+      this.close()
+    },
+    close() {
+      this.$emit('close')
+      this.visible = false
+      this.$refs.form.resetFields()
+    }
+  }
+}
+</script>

+ 13 - 3
src/views/sys/dict/index.vue

@@ -54,6 +54,10 @@
             编辑
           </a-button>
           <a-divider type="vertical" />
+          <a-button size="small" type="primary" @click="editDictItem(record)">
+            字典配置
+          </a-button>
+          <a-divider type="vertical" />
           <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
             <a-button size="small" type="danger">
               删除
@@ -62,6 +66,7 @@
         </span>
       </a-table>
       <check-and-edit-model ref="modalForm" @ok="modalFormOk" />
+      <dict-item-list ref="dictItemList" />
     </div>
     <!-- table区域-end -->
     <!-- 表单区域 -->
@@ -71,10 +76,12 @@
 import { listMixin } from '@/mixin/listMixin'
 import columns from './indexColumns'
 import CheckAndEditModel from './CheckAndEditModel'
+import DictItemList from './DictItemList'
 
 export default {
   components: {
-    CheckAndEditModel
+    CheckAndEditModel,
+    DictItemList
   },
   mixins: [listMixin],
   data() {
@@ -84,8 +91,8 @@ export default {
       // 表头
       columns: columns(this),
       url: {
-        list: '/business/catenary/bus/zzdzxx/list',
-        delete: '/business/catenary/bus/zzdzxx/',
+        list: '/system/dict/type/list',
+        delete: '/system/dict/type/',
         exportXlsUrl: '/exportXlsUrl',
         importExcelUrl: `${process.env.VUE_APP_BASE_API}/importExcelUrl`
       }
@@ -94,6 +101,9 @@ export default {
   created() {
   },
   methods: {
+    editDictItem(record) {
+      this.$refs.dictItemList.edit(record)
+    }
   }
 }
 </script>

+ 15 - 39
src/views/sys/dict/indexColumns.js

@@ -10,58 +10,34 @@ function columns(vm) {
       }
     },
     {
-      title: '线别',
+      title: '字典名称',
       align: 'center',
-      dataIndex: 'xb',
-      key: 'xb'
+      dataIndex: 'dictName',
+      key: 'dictName'
     },
     {
-      title: '区间/站场',
+      title: '码值',
       align: 'center',
-      dataIndex: 'qj',
-      key: 'qj'
+      dataIndex: 'dictType',
+      key: 'dictType'
     },
     {
-      title: '车间/工区',
+      title: '备注',
       align: 'center',
-      dataIndex: 'bm',
-      key: 'bm'
+      dataIndex: 'remark',
+      key: 'remark'
     },
     {
-      title: '行别',
+      title: '创建人',
       align: 'center',
-      dataIndex: 'hb',
-      key: 'hb'
+      dataIndex: 'createBy',
+      key: 'createBy'
     },
     {
-      title: '支柱号',
+      title: '创建时间',
       align: 'center',
-      dataIndex: 'zzh',
-      key: 'zzh'
-    },
-    {
-      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: 'createTime',
+      key: 'createTime'
     },
     {
       title: '操作',