功能变化: 字段外键改为删除保护

v2.x
猿小天 2023-03-21 10:12:16 +08:00
parent 256635cc91
commit 0770704a97
4 changed files with 16 additions and 5 deletions

View File

@ -4,13 +4,13 @@ export function GetList (query) {
return new Promise((resolve) => { return new Promise((resolve) => {
setTimeout(() => { setTimeout(() => {
resolve({ resolve({
code: 0, code: 2000,
msg: 'success', msg: 'success',
data: { data: {
total: 99, total: 99,
current: query.current, current: query.current,
size: 20, size: 20,
records: [ data: [
{ id: 1, select1: '1', select2: 'sz,wh' }, { id: 1, select1: '1', select2: 'sz,wh' },
{ id: 2, select1: '1', select2: 'sz,sh' }, { id: 2, select1: '1', select2: 'sz,sh' },
{ id: 3, select1: '0', select2: 'sz,gz' }, { id: 3, select1: '0', select2: 'sz,gz' },

View File

@ -102,6 +102,7 @@ export const crudOptions = (vm) => {
title: '上级部门', title: '上级部门',
key: 'parent', key: 'parent',
type: 'tree-selector', type: 'tree-selector',
minWidth:200,
dict: { dict: {
isTree: true, isTree: true,
label: 'name', label: 'name',
@ -126,6 +127,7 @@ export const crudOptions = (vm) => {
key: 'name', key: 'name',
sortable: true, sortable: true,
treeNode: true, // 设置为树形列 treeNode: true, // 设置为树形列
minWidth:180,
search: { search: {
disabled: false, disabled: false,
component: { component: {
@ -157,6 +159,7 @@ export const crudOptions = (vm) => {
title: '部门标识', title: '部门标识',
key: 'key', key: 'key',
sortable: true, sortable: true,
minWidth:100,
form: { form: {
component: { component: {
props: { props: {
@ -173,6 +176,7 @@ export const crudOptions = (vm) => {
title: '负责人', title: '负责人',
key: 'owner', key: 'owner',
sortable: true, sortable: true,
minWidth:100,
form: { form: {
component: { component: {
span: 12, span: 12,
@ -187,6 +191,7 @@ export const crudOptions = (vm) => {
title: '联系电话', title: '联系电话',
key: 'phone', key: 'phone',
sortable: true, sortable: true,
minWidth:100,
form: { form: {
component: { component: {
span: 12, span: 12,
@ -201,6 +206,7 @@ export const crudOptions = (vm) => {
title: '邮箱', title: '邮箱',
key: 'email', key: 'email',
sortable: true, sortable: true,
minWidth:100,
form: { form: {
component: { component: {
span: 12, span: 12,

View File

@ -92,7 +92,7 @@ export const crudOptions = (vm) => {
{ {
title: '字典名称', title: '字典名称',
key: 'label', key: 'label',
minWidth:100,
search: { search: {
disabled: false, disabled: false,
component: { component: {
@ -121,6 +121,7 @@ export const crudOptions = (vm) => {
{ {
title: '字典编号', title: '字典编号',
key: 'value', key: 'value',
minWidth:100,
search: { search: {
disabled: true, disabled: true,
component: { component: {
@ -197,8 +198,8 @@ export const crudOptions = (vm) => {
} }
].concat(vm.commonEndColumns({ ].concat(vm.commonEndColumns({
description: { description: {
showForm: true, showForm: false,
showTable: true showTable: false
} }
})) }))
} }

View File

@ -96,6 +96,7 @@ export const crudOptions = (vm) => {
title: '角色名称', title: '角色名称',
key: 'name', key: 'name',
sortable: true, sortable: true,
minWidth:120,
search: { search: {
disabled: false, disabled: false,
component: { component: {
@ -125,6 +126,7 @@ export const crudOptions = (vm) => {
title: '权限标识', title: '权限标识',
key: 'key', key: 'key',
sortable: true, sortable: true,
minWidth:100,
form: { form: {
rules: [ // 表单校验规则 rules: [ // 表单校验规则
{ required: true, message: '权限标识必填项' } { required: true, message: '权限标识必填项' }
@ -157,6 +159,7 @@ export const crudOptions = (vm) => {
key: 'admin', key: 'admin',
sortable: true, sortable: true,
type: 'radio', type: 'radio',
minWidth:120,
dict: { dict: {
data: vm.dictionary('button_whether_bool') data: vm.dictionary('button_whether_bool')
}, },
@ -178,6 +181,7 @@ export const crudOptions = (vm) => {
disabled: false disabled: false
}, },
type: 'radio', type: 'radio',
minWidth:100,
dict: { dict: {
data: vm.dictionary('button_status_bool') data: vm.dictionary('button_status_bool')
}, },