Browse Source

Merge branch 'hotfix/addClassify'

feature/itemprocess
weikai 5 years ago
parent
commit
c10520f096
  1. 40
      src/views/modules/sys/dept.vue

40
src/views/modules/sys/dept.vue

@ -2,6 +2,15 @@
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__dept">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataListSearch()">
<el-form-item label="部门类型" prop="deptType" label-width="100px">
<el-select v-model="dataForm.deptType" placeholder="部门类型" clearable @change="selectModel($event)" style="width:250px;">
<el-option v-for="item in deptTypeArr" :key="item.dictValue" :label="item.dictName" :value="item.dictValue" >
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="success" @click="getDataListSearch()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('sys:dept:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
</el-form-item>
@ -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')
}
}
</script>

Loading…
Cancel
Save