|
@@ -5,7 +5,7 @@
|
|
|
<a-input v-decorator="['name', {rules: [{required: true, message: '节点名称不能为空'}]}]" />
|
|
|
</a-form-item>
|
|
|
<a-form-item label="所属部门">
|
|
|
- <a-tree-select v-decorator="['deptId', {rules: [{required: true, message: '审核人不能为空'}]}]" style="width: 100%" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :replaceFields="replaceFields" :tree-data="treeData" placeholder="请选择" tree-default-expand-all>
|
|
|
+ <a-tree-select v-decorator="['deptId', {rules: [{required: true, message: '审核人不能为空'}]}]" style="width: 100%" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :replaceFields="replaceFields" :tree-data="treeData" placeholder="请选择" tree-default-expand-all @change="handleDept">
|
|
|
</a-tree-select>
|
|
|
</a-form-item>
|
|
|
<a-form-item label="审核人">
|
|
@@ -14,6 +14,18 @@
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
+ <a-form-item label="配置类型">
|
|
|
+ <a-select v-decorator="['reflect', {rules: [{required: true, message: '配置类型不能为空'}]}]" placeholder="请选择" @change="handleReflect">
|
|
|
+ <a-select-option v-for="(label,value) in classNameCodeMap" :key="value" :label="label" :value="value">{{ label }}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
+ <a-form-item label="条件类">
|
|
|
+ <a-select v-decorator="['customClassName', {rules: [{required: true, message: '条件类不能为空'}]}]" placeholder="请选择">
|
|
|
+ <a-select-option v-for="{titleName, titleCode} in customClassNameList" :key="titleCode" :label="titleName" :value="titleCode">{{ titleName }}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
<!-- <a-form-item label="描述">
|
|
|
<a-input v-decorator="['seatNumber']" />
|
|
|
</a-form-item> -->
|
|
@@ -28,6 +40,8 @@
|
|
|
<script>
|
|
|
import pick from 'lodash.pick'
|
|
|
import { getDeptTree } from '@/api/upms/dept'
|
|
|
+import { queryUserByDept } from '@/api/upms/user'
|
|
|
+import { getCustomClassNameList } from '@/api/custom/className'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -40,14 +54,37 @@ export default {
|
|
|
},
|
|
|
verifierList: [],
|
|
|
treeData: [],
|
|
|
+ classNameCodeMap: {},
|
|
|
+ customClassNameList: {},
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
getDeptTree().then((res) => {
|
|
|
- this.treeData = res.data
|
|
|
+ this.treeData = this.setTree(res.data)
|
|
|
})
|
|
|
+ this.classNameCodeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CLASS_NAME_CODE)
|
|
|
},
|
|
|
methods: {
|
|
|
+ setTree(list) {
|
|
|
+ return list.map((item) => {
|
|
|
+ return {
|
|
|
+ title: item.title,
|
|
|
+ key: item.id,
|
|
|
+ value: item.id,
|
|
|
+ children: item.children ? this.setTree(item.children) : [],
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleDept(deptId) {
|
|
|
+ queryUserByDept({ deptId }).then((res) => {
|
|
|
+ this.verifierList = res.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleReflect(code) {
|
|
|
+ getCustomClassNameList({ code }).then((res) => {
|
|
|
+ this.customClassNameList = res.data
|
|
|
+ })
|
|
|
+ },
|
|
|
base(record) {
|
|
|
this.visible = true
|
|
|
this.record = record
|