修改srcviewssystemmessageCentercrud.js中ret.data.data改为ret.data
{
title: '目标部门',
key: 'target_dept',
search: {
disabled: true
},
width: 130,
type: 'table-selector',
dict: {
cache: false,
url: '/api/system/dept/all_dept/',
isTree: true,
value: 'id', // 数据字典中value字段的属性名
label: 'name', // 数据字典中label字段的属性名
children: 'children', // 数据字典中children字段的属性名
getData: (url, dict, {
form,
component
}) => {
return request({
url: url
}).then(ret => {
return ret.data //修改此处
})
}
},
disabled: true,
form: {
rules: [ // 表单校验规则
{
required: true,
message: '必填项'
}
],
itemProps: {
class: { yxtInput: true }
},
component: {
span: 24,
show (context) {
return context.form.target_type === 2
},
props: {
multiple: true,
elProps: {
treeConfig: {
transform: true,
rowField: 'id',
parentField: 'parent',
expandAll: true
},
columns: [
{
field: 'name',
title: '部门名称',
treeNode: true
},
{
field: 'status_label',
title: '状态'
},
{
field: 'parent_name',
title: '父级部门'
}
]
}
}
}
},
component: {
name: 'manyToMany',
valueBinding: 'dept_info',
children: 'name'
}
},
{