From 3fb854dc18d9496eab9a1348b72770d837300a8e Mon Sep 17 00:00:00 2001 From: weikai <123456> Date: Fri, 6 Nov 2020 11:09:19 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=AE=89=E5=AE=81pc=E7=AB=AF=20?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E7=AE=A1=E7=90=86=E3=80=91-=E3=80=90?= =?UTF-8?q?=E6=9C=BA=E6=9E=84=E7=AE=A1=E7=90=86=E3=80=91=E9=AD=8F=E5=87=AF?= =?UTF-8?q?=202020-10-27?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/sys/dept.vue | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/src/views/modules/sys/dept.vue b/src/views/modules/sys/dept.vue index 5ae7e9b..7eab0a9 100644 --- a/src/views/modules/sys/dept.vue +++ b/src/views/modules/sys/dept.vue @@ -2,6 +2,15 @@
+ + + + + + + + {{ $t('query') }} + {{ $t('add') }} @@ -34,12 +43,43 @@ export default { mixinViewModuleOptions: { getDataListURL: '/sys/dept/list', deleteURL: '/sys/dept' + }, + deptTypeArr: [], + dataForm: { + deptType:'' } } }, + methods: { + + // 参数名称取值变化事件 + selectModel (id) { + this.dataForm.deptType = '' + this.deptTypeArr.find((item) => { + if (item.dictValue === id) { + this.dataForm.deptType = item.dictValue + } + }) + }, + // 获取部门类型类型下拉信息 + getdeptTypeArrInfo (dictType) { + this.$http.get(`/sys/dict/listSimple/` + dictType).then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + if (dictType === 'sys_deptType') { + this.deptTypeArr = res.data + } + }).catch(() => {}) + } + }, components: { TableTreeColumn, AddOrUpdate + }, + created: function () { + // 部门类型下拉框赋值 + this.getdeptTypeArrInfo('sys_deptType') } }