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') } }