卸货地

This commit is contained in:
‘huanghaiixia’
2025-11-19 11:29:01 +08:00
parent 67daa56060
commit a2a9a6974a
6 changed files with 434 additions and 531 deletions

View File

@ -6,7 +6,7 @@
<template #notFoundContent v-if="loading"> <template #notFoundContent v-if="loading">
<span> <span>
<LoadingOutlined spin class="mr-1" /> <LoadingOutlined spin class="mr-1" />
{{ t('component.form.apiSelectNotFound') }} {{ t('加载中') }}
</span> </span>
</template> </template>
</Cascader> </Cascader>
@ -30,7 +30,8 @@
const props = defineProps({ const props = defineProps({
value: String, value: String,
excludeType: String excludeType: String,
startPCode: String
}); });
const emit = defineEmits(['change', 'defaultChange', 'update:value']); const emit = defineEmits(['change', 'defaultChange', 'update:value']);
@ -60,7 +61,7 @@
if (isChange.value) return; if (isChange.value) return;
if (val) { if (val) {
const resData = await getAreaInfo({code: val,excludeType:props.excludeType }); const resData = await getAreaInfo({code: val,excludeType:props.excludeType, startPCode: props.startPCode });
options.value = resData.areaList options.value = resData.areaList
emitData.value = resData.regionCode emitData.value = resData.regionCode
// const resData = await requestMagicApi({ // const resData = await requestMagicApi({
@ -120,7 +121,7 @@
apiData.value = []; apiData.value = [];
loading.value = true; loading.value = true;
try { try {
const res = await getAreaList({ pid: '', excludeType:props.excludeType }); const res = await getAreaList({ pid: '', excludeType:props.excludeType, startPCode: props.startPCode });
if (Array.isArray(res)) { if (Array.isArray(res)) {
apiData.value = res; apiData.value = res;
return; return;
@ -142,7 +143,8 @@
try { try {
const res = await getAreaList({ const res = await getAreaList({
[asyncFetchParamKey]: Reflect.get(targetOption, 'id'), [asyncFetchParamKey]: Reflect.get(targetOption, 'id'),
excludeType:props.excludeType excludeType:props.excludeType,
startPCode: props.startPCode
}); });
if (Array.isArray(res)) { if (Array.isArray(res)) {
@ -167,7 +169,7 @@
tree.forEach(async (item: any) => { tree.forEach(async (item: any) => {
if (item.code === id) { if (item.code === id) {
item.children = []; item.children = [];
const res = await getAreaList({ pid: item.id,excludeType:props.excludeType }); const res = await getAreaList({ pid: item.id,excludeType:props.excludeType, startPCode: props.startPCode });
item.children = res.map((child) => { item.children = res.map((child) => {
return { return {
...child, ...child,

View File

@ -77,7 +77,7 @@
title: '操作IP', title: '操作IP',
dataIndex: 'operationIp', dataIndex: 'operationIp',
key: 'operationIp', key: 'operationIp',
width: 120, width: 140,
sorter: true sorter: true
}, },
{ {

View File

@ -276,8 +276,8 @@ export const formProps: FormProps = {
key: '57d85cbf34fa475298997f5a7427bf8d', key: '57d85cbf34fa475298997f5a7427bf8d',
field: 'coefficient', field: 'coefficient',
label: '车/数量单位', label: '车/数量单位',
type: 'input', type: 'number',
component: 'Input', component: 'InputNumber',
colProps: { span: 24 }, colProps: { span: 24 },
defaultValue: '', defaultValue: '',
componentProps: { componentProps: {
@ -292,6 +292,7 @@ export const formProps: FormProps = {
maxlength: null, maxlength: null,
prefix: '', prefix: '',
suffix: '', suffix: '',
min:0,
addonBefore: '', addonBefore: '',
addonAfter: '', addonAfter: '',
disabled: false, disabled: false,
@ -362,7 +363,7 @@ export const formProps: FormProps = {
{ key: 2, label: 'Option 2', value: 'Option 2' }, { key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' } { key: 3, label: 'Option 3', value: 'Option 3' }
], ],
defaultSelect: null, defaultSelect: 'Y',
datasourceType: 'dic', datasourceType: 'dic',
params: { itemId: '1978057078528327681' }, params: { itemId: '1978057078528327681' },
labelField: 'name', labelField: 'name',

View File

@ -187,8 +187,7 @@
(val) => { (val) => {
let suNecSignProps = data.formDataProps.schemas?.filter((item) => item.field === 'suNecSign')[0]; let suNecSignProps = data.formDataProps.schemas?.filter((item) => item.field === 'suNecSign')[0];
let cuNecSignProps = data.formDataProps.schemas?.filter((item) => item.field === 'cuNecSign')[0]; let cuNecSignProps = data.formDataProps.schemas?.filter((item) => item.field === 'cuNecSign')[0];
if (val.suNecSign == 'N' && !suNecSignProps.componentProps.disabled && val.suSign != 'N') return if (val.suNecSign == 'N' && !suNecSignProps.componentProps.disabled && val.suSign != 'N' && val.cuNecSign != 'N') return
if (val.cuNecSign == 'N' && !cuNecSignProps.componentProps.disabled && val.cuSign != 'N') return
if (val.suSign === 'N') { if (val.suSign === 'N') {
val.suNecSign = 'N'; val.suNecSign = 'N';
suNecSignProps.componentProps.disabled = true; suNecSignProps.componentProps.disabled = true;
@ -197,6 +196,7 @@
suNecSignProps.componentProps.disabled = false; suNecSignProps.componentProps.disabled = false;
val.suNecSign = 'Y'; val.suNecSign = 'Y';
} }
if (val.cuNecSign == 'N' && !cuNecSignProps.componentProps.disabled && val.cuSign != 'N') return
if (val.cuSign === 'N') { if (val.cuSign === 'N') {
val.cuNecSign = 'N'; val.cuNecSign = 'N';
cuNecSignProps.componentProps.disabled = true; cuNecSignProps.componentProps.disabled = true;

View File

@ -2,542 +2,436 @@ import { FormProps, FormSchema } from '/@/components/Form';
import { BasicColumn } from '/@/components/Table'; import { BasicColumn } from '/@/components/Table';
export const formConfig = { export const formConfig = {
useCustomConfig: false, useCustomConfig: false
}; };
export const searchFormSchema: FormSchema[] = [ export const searchFormSchema: FormSchema[] = [
{ {
field: 'fullName', field: 'fullName',
label: '名称', label: '名称',
component: 'Input', component: 'Input'
}, },
{ {
field: 'valid', field: 'valid',
label: '有效标志', label: '有效标志',
component: 'XjrSelect', component: 'XjrSelect',
componentProps: { componentProps: {
datasourceType: 'dic', datasourceType: 'dic',
params: { itemId: '1978057078528327681' }, params: { itemId: '1978057078528327681' },
labelField: 'name', labelField: 'name',
valueField: 'value', valueField: 'value',
getPopupContainer: () => document.body, getPopupContainer: () => document.body
}, }
}, }
{
field: 'code',
label: '编码',
component: 'Input',
},
{
field: 'regionCode',
label: '卸货区域',
component: 'XjrSelect',
componentProps: {
datasourceType: 'api',
apiConfig: {
path: 'CodeGeneration/selection',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
},
labelField: 'label',
valueField: 'value',
getPopupContainer: () => document.body,
},
},
{
field: 'addr',
label: '详细地址',
component: 'Input',
},
{
field: 'longitude',
label: '经度',
component: 'Input',
},
{
field: 'latitude',
label: '纬度',
component: 'Input',
},
{
field: 'sort',
label: '显示顺序',
component: 'InputNumber',
componentProps: {
style: { width: '100%' },
},
},
{
field: 'note',
label: '备注',
component: 'Input',
},
]; ];
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
dataIndex: 'code', dataIndex: 'code',
title: '编码', title: '编码',
componentType: 'input', componentType: 'input',
align: 'left', align: 'left',
sorter: true, sorter: true
}, },
{ {
dataIndex: 'fullName', dataIndex: 'fullName',
title: '名称', title: '名称',
componentType: 'input', componentType: 'input',
align: 'left', align: 'left',
sorter: true, sorter: true
}, },
{ {
dataIndex: 'regionCode', dataIndex: 'regionCode',
title: '卸货区域', title: '卸货区域',
componentType: 'select', componentType: 'select',
align: 'left', align: 'left',
sorter: true, sorter: true
}, },
{ {
dataIndex: 'addr', dataIndex: 'addr',
title: '详细地址', title: '详细地址',
componentType: 'textarea', componentType: 'textarea',
align: 'left', align: 'left',
sorter: true, sorter: true
}, },
{ {
dataIndex: 'valid', dataIndex: 'valid',
title: '有效标志', title: '有效标志',
componentType: 'select', componentType: 'select',
align: 'left', align: 'left',
sorter: true, sorter: true
}, }
{
dataIndex: 'longitude',
title: '经度',
componentType: 'input',
align: 'left',
sorter: true,
},
{
dataIndex: 'latitude',
title: '纬度',
componentType: 'input',
align: 'left',
sorter: true,
},
{
dataIndex: 'sort',
title: '显示顺序',
componentType: 'number',
align: 'left',
sorter: true,
},
{
dataIndex: 'note',
title: '备注',
componentType: 'textarea',
align: 'left',
sorter: true,
},
]; ];
//表单事件 //表单事件
export const formEventConfigs = { export const formEventConfigs = {
0: [ 0: [
{ {
type: 'circle', type: 'circle',
color: '#2774ff', color: '#2774ff',
text: '开始节点', text: '开始节点',
icon: '#icon-kaishi', icon: '#icon-kaishi',
bgcColor: '#D8E5FF', bgcColor: '#D8E5FF',
isUserDefined: false, isUserDefined: false
}, },
{ {
color: '#F6AB01', color: '#F6AB01',
icon: '#icon-chushihua', icon: '#icon-chushihua',
text: '初始化表单', text: '初始化表单',
bgcColor: '#f9f5ea', bgcColor: '#f9f5ea',
isUserDefined: false, isUserDefined: false,
nodeInfo: { processEvent: [] }, nodeInfo: { processEvent: [] }
}, }
], ],
1: [ 1: [
{ {
color: '#B36EDB', color: '#B36EDB',
icon: '#icon-shujufenxi', icon: '#icon-shujufenxi',
text: '获取表单数据', text: '获取表单数据',
detail: '(新增无此操作)', detail: '(新增无此操作)',
bgcColor: '#F8F2FC', bgcColor: '#F8F2FC',
isUserDefined: false, isUserDefined: false,
nodeInfo: { processEvent: [] }, nodeInfo: { processEvent: [] }
}, }
], ],
2: [ 2: [
{ {
color: '#F8625C', color: '#F8625C',
icon: '#icon-jiazai', icon: '#icon-jiazai',
text: '加载表单', text: '加载表单',
bgcColor: '#FFF1F1', bgcColor: '#FFF1F1',
isUserDefined: false, isUserDefined: false,
nodeInfo: { processEvent: [] }, nodeInfo: { processEvent: [] }
}, }
], ],
3: [ 3: [
{ {
color: '#6C6AE0', color: '#6C6AE0',
icon: '#icon-jsontijiao', icon: '#icon-jsontijiao',
text: '提交表单', text: '提交表单',
bgcColor: '#F5F4FF', bgcColor: '#F5F4FF',
isUserDefined: false, isUserDefined: false,
nodeInfo: { processEvent: [] }, nodeInfo: { processEvent: [] }
}, }
], ],
4: [ 4: [
{ {
type: 'circle', type: 'circle',
color: '#F8625C', color: '#F8625C',
text: '结束节点', text: '结束节点',
icon: '#icon-jieshuzhiliao', icon: '#icon-jieshuzhiliao',
bgcColor: '#FFD6D6', bgcColor: '#FFD6D6',
isLast: true, isLast: true,
isUserDefined: false, isUserDefined: false
}, }
], ]
}; };
export const formProps: FormProps = { export const formProps: FormProps = {
labelCol: { span: 3, offset: 0 }, labelCol: { span: 3, offset: 0 },
labelAlign: 'right', labelAlign: 'right',
layout: 'horizontal', layout: 'horizontal',
size: 'default', size: 'default',
schemas: [ schemas: [
{ {
key: '400f153c279440de9db30086cdf282e9', key: '400f153c279440de9db30086cdf282e9',
field: 'code', field: 'code',
label: '编码', label: '编码',
type: 'input', type: 'input',
component: 'Input', component: 'Input',
colProps: { span: 24 }, colProps: { span: 24 },
defaultValue: '', defaultValue: '',
componentProps: { componentProps: {
width: '100%', width: '100%',
span: '', span: '',
defaultValue: '', defaultValue: '',
labelWidthMode: 'fix', labelWidthMode: 'fix',
labelFixWidth: 120, labelFixWidth: 120,
responsive: false, responsive: false,
respNewRow: false, respNewRow: false,
placeholder: '请输入编码', placeholder: '请输入编码',
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
addonAfter: '', addonAfter: '',
disabled: true, disabled: true,
allowClear: false, allowClear: false,
showLabel: true, showLabel: true,
required: false, required: false,
rules: [], rules: [],
events: {}, events: {},
isSave: false, isSave: false,
isShow: true, isShow: true,
scan: false, scan: false,
style: { width: '100%' }, style: { width: '100%' }
}, }
},
{
key: 'e4ae9d4f09fe4781926728bf71bdbebf',
field: 'fullName',
label: '名称',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
labelWidthMode: 'fix',
labelFixWidth: 120,
responsive: false,
respNewRow: false,
placeholder: '请输入名称',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: true,
rules: [],
events: {},
isSave: false,
isShow: true,
scan: false,
style: { width: '100%' },
},
},
{
key: '25f8a4fdfe0948ea931c1d34748d9b10',
field: 'regionCode',
label: '卸货区域',
type: 'select',
component: 'XjrSelect',
colProps: { span: 24 },
componentProps: {
width: '100%',
span: '',
labelWidthMode: 'fix',
labelFixWidth: 120,
responsive: false,
respNewRow: false,
placeholder: '请选择下拉选择',
sepTextField: '',
showLabel: true,
showSearch: false,
clearable: false,
disabled: false,
mode: '',
staticOptions: [
{ key: 1, label: 'Option 1', value: 'Option 1' },
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
defaultSelect: '',
datasourceType: 'api',
labelField: 'label',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
}, },
dicOptions: [], {
required: true, key: 'e4ae9d4f09fe4781926728bf71bdbebf',
rules: [], field: 'fullName',
events: {}, label: '名称',
isShow: true, type: 'input',
style: { width: '100%' }, component: 'Input',
}, colProps: { span: 16 },
}, defaultValue: '',
{ componentProps: {
key: 'e622bdd456f846048d26dd3238374f92', width: '100%',
field: 'addr', span: '',
label: '详细地址', defaultValue: '',
type: 'textarea', labelWidthMode: 'fix',
component: 'InputTextArea', labelFixWidth: 120,
colProps: { span: 24 }, responsive: false,
defaultValue: '', respNewRow: false,
componentProps: { placeholder: '请输入名称',
width: '100%', prefix: '',
span: '', suffix: '',
defaultValue: '', addonBefore: '',
labelWidthMode: 'fix', addonAfter: '',
labelFixWidth: 120, disabled: false,
responsive: false, allowClear: false,
respNewRow: true, showLabel: true,
placeholder: '请输入详细地址', required: true,
rows: 1, rules: [],
autoSize: false, events: {},
showCount: false, isSave: false,
disabled: false, isShow: true,
showLabel: true, scan: false,
allowClear: true, style: { width: '100%' }
required: true, }
isShow: true,
rules: [],
events: {},
style: { width: '100%' },
},
},
{
key: 'e3de858c74fe49c08bf876f521d72b7f',
field: 'longitude',
label: '经度',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
labelWidthMode: 'fix',
labelFixWidth: 120,
responsive: false,
respNewRow: false,
placeholder: '请输入经度',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
isSave: false,
isShow: true,
scan: false,
style: { width: '100%' },
},
},
{
key: '381dd67f133b4020a7c12f6bbb0df75e',
field: 'latitude',
label: '纬度',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
labelWidthMode: 'fix',
labelFixWidth: 120,
responsive: false,
respNewRow: false,
placeholder: '请输入纬度',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
isSave: false,
isShow: true,
scan: false,
style: { width: '100%' },
},
},
{
key: 'f5cce49ce1b34d9d92891cc46c469d71',
field: 'sort',
label: '显示顺序',
type: 'number',
component: 'InputNumber',
colProps: { span: 24 },
componentProps: {
labelWidthMode: 'fix',
labelFixWidth: 120,
responsive: false,
width: '100%',
span: '',
min: 0,
step: 1,
disabled: false,
showLabel: true,
controls: true,
required: false,
subTotal: false,
isShow: true,
rules: [],
events: {},
style: { width: '100%' },
},
},
{
key: '3e092351b52c4fc8b07cc8aae26d0c4e',
field: 'valid',
label: '有效标志',
type: 'select',
component: 'XjrSelect',
colProps: { span: 24 },
componentProps: {
width: '100%',
span: '',
labelWidthMode: 'fix',
labelFixWidth: 120,
responsive: false,
respNewRow: false,
placeholder: '请选择下拉选择',
sepTextField: '',
showLabel: true,
showSearch: false,
clearable: false,
disabled: true,
mode: '',
staticOptions: [
{ key: 1, label: 'Option 1', value: 'Option 1' },
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
defaultSelect: 'Y',
datasourceType: 'dic',
params: { itemId: '1978057078528327681' },
labelField: 'name',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
}, },
dicOptions: [], {
required: false, key: '25f8a4fdfe0948ea931c1d34748d9b10',
rules: [], field: 'regionCode',
events: {}, label: '卸货区域',
isShow: true, type: 'areacascader',
itemId: '1978057078528327681', component: 'AreaCascader',
style: { width: '100%' }, colProps: { span: 8 },
}, componentProps: {
}, width: '100%',
{ span: '',
key: 'a5198907c3c64bcb984ceb5ff97ab57b', labelWidthMode: 'fix',
field: 'note', labelFixWidth: 120,
label: '备注', responsive: false,
type: 'textarea', respNewRow: false,
component: 'InputTextArea', placeholder: '请选择区域',
colProps: { span: 24 }, showLabel: true,
defaultValue: '', disabled: false,
componentProps: { allowClear: true,
width: '100%', clearable: false,
span: '', required: true,
defaultValue: '', rules: [],
labelWidthMode: 'fix', events: {},
labelFixWidth: 120, isShow: true,
responsive: false, style: { width: '100%' },
respNewRow: true, fieldNames: { label: 'fullName', value: 'code', children: 'children' },
placeholder: '请输入备注', excludeType: 'CONTINENT',
rows: 2, startPCode: 'CHN'
autoSize: false, }
showCount: false, },
disabled: false, {
showLabel: true, key: 'e622bdd456f846048d26dd3238374f92',
allowClear: true, field: 'addr',
required: false, label: '详细地址',
isShow: true, type: 'textarea',
rules: [], component: 'InputTextArea',
events: {}, colProps: { span: 24 },
style: { width: '100%' }, defaultValue: '',
}, componentProps: {
}, width: '100%',
], span: '',
showActionButtonGroup: false, defaultValue: '',
buttonLocation: 'center', labelWidthMode: 'fix',
actionColOptions: { span: 24 }, labelFixWidth: 120,
showResetButton: false, responsive: false,
showSubmitButton: false, respNewRow: true,
hiddenComponent: [], placeholder: '请输入详细地址',
}; rows: 1,
autoSize: false,
showCount: false,
disabled: false,
showLabel: true,
allowClear: true,
required: true,
isShow: true,
rules: [],
events: {},
style: { width: '100%' }
}
},
{
key: 'e3de858c74fe49c08bf876f521d72b7f',
field: 'longitude',
label: '经度',
type: 'number',
component: 'InputNumber',
colProps: { span: 12 },
defaultValue: null,
componentProps: {
labelWidthMode: 'fix',
labelFixWidth: 120,
responsive: false,
width: '100%',
precision: '6',
span: '',
defaultValue: null,
min: null,
max: null,
step: 0.000001,
disabled: false,
showLabel: true,
controls: true,
required: false,
subTotal: false,
isShow: true,
rules: [],
events: {},
style: { width: '100%' }
}
},
{
key: '381dd67f133b4020a7c12f6bbb0df75e',
field: 'latitude',
label: '纬度',
type: 'number',
component: 'InputNumber',
colProps: { span: 12 },
defaultValue: null,
componentProps: {
labelWidthMode: 'fix',
labelFixWidth: 120,
responsive: false,
width: '100%',
precision: '6',
span: '',
defaultValue: null,
min: null,
max: null,
step: 0.000001,
disabled: false,
showLabel: true,
controls: true,
required: false,
subTotal: false,
isShow: true,
rules: [],
events: {},
style: { width: '100%' }
}
},
{
key: 'f5cce49ce1b34d9d92891cc46c469d71',
field: 'sort',
label: '显示顺序',
type: 'number',
component: 'InputNumber',
colProps: { span: 12 },
componentProps: {
labelWidthMode: 'fix',
labelFixWidth: 120,
responsive: false,
width: '100%',
span: '',
min: 0,
step: 1,
disabled: false,
showLabel: true,
controls: true,
required: false,
subTotal: false,
isShow: true,
rules: [],
events: {},
style: { width: '100%' }
}
},
{
key: '3e092351b52c4fc8b07cc8aae26d0c4e',
field: 'valid',
label: '有效标志',
type: 'select',
component: 'XjrSelect',
colProps: { span: 12 },
componentProps: {
width: '100%',
span: '',
labelWidthMode: 'fix',
labelFixWidth: 120,
responsive: false,
respNewRow: false,
placeholder: '请选择下拉选择',
sepTextField: '',
showLabel: true,
showSearch: false,
clearable: false,
disabled: true,
mode: '',
staticOptions: [
{ key: 1, label: 'Option 1', value: 'Option 1' },
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' }
],
defaultSelect: 'Y',
datasourceType: 'dic',
params: { itemId: '1978057078528327681' },
labelField: 'name',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7'
},
dicOptions: [],
required: false,
rules: [],
events: {},
isShow: true,
itemId: '1978057078528327681',
style: { width: '100%' }
}
},
{
key: 'a5198907c3c64bcb984ceb5ff97ab57b',
field: 'note',
label: '备注',
type: 'textarea',
component: 'InputTextArea',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
labelWidthMode: 'fix',
labelFixWidth: 120,
responsive: false,
respNewRow: true,
placeholder: '请输入备注',
rows: 2,
autoSize: false,
showCount: false,
disabled: false,
showLabel: true,
allowClear: true,
required: false,
isShow: true,
rules: [],
events: {},
style: { width: '100%' }
}
}
],
showActionButtonGroup: false,
buttonLocation: 'center',
actionColOptions: { span: 24 },
showResetButton: false,
showSubmitButton: false,
hiddenComponent: []
};

View File

@ -63,7 +63,7 @@
const filterColumns = cloneDeep(filterColumnAuth(columns)); const filterColumns = cloneDeep(filterColumnAuth(columns));
const customConfigColums =ref(filterColumns); const customConfigColums =ref(filterColumns);
const customSearchFormSchema =ref(searchFormSchema); const customSearchFormSchema =ref(searchFormSchema);
const selectedKeys = ref<string[]>([]);
const tableRef = ref(); const tableRef = ref();
//所有按钮 //所有按钮
const buttons = ref([{"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"isUse":true},{"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"启用","code":"enable","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"作废","code":"disable","icon":"ant-design:stop-outlined","isDefault":true,"isUse":true},{"name":"刷新","code":"refresh","icon":"ant-design:reload-outlined","isDefault":true,"isUse":true},{"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"name":"数据日志","code":"datalog","icon":"ant-design:profile-outlined","isDefault":true,"isUse":true},{"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true,"isUse":true}]); const buttons = ref([{"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"isUse":true},{"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"启用","code":"enable","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"作废","code":"disable","icon":"ant-design:stop-outlined","isDefault":true,"isUse":true},{"name":"刷新","code":"refresh","icon":"ant-design:reload-outlined","isDefault":true,"isUse":true},{"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"name":"数据日志","code":"datalog","icon":"ant-design:profile-outlined","isDefault":true,"isUse":true},{"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true,"isUse":true}]);
@ -102,7 +102,7 @@
}, },
schemas: customSearchFormSchema, schemas: customSearchFormSchema,
fieldMapToTime: [], fieldMapToTime: [],
showResetButton: false, showResetButton: true,
}, },
beforeFetch: (params) => { beforeFetch: (params) => {
return { ...params, FormId: formIdComputedRef.value, PK: 'id' }; return { ...params, FormId: formIdComputedRef.value, PK: 'id' };
@ -121,13 +121,19 @@
dataIndex: 'action', dataIndex: 'action',
slots: { customRender: 'action' }, slots: { customRender: 'action' },
}, },
rowSelection: {
type: 'checkbox',
onChange: onSelectChange
},
tableSetting: { tableSetting: {
size: false, size: false,
setting: false, setting: false,
}, },
}); });
function onSelectChange(rowKeys: string[]) {
selectedKeys.value = rowKeys;
}
function dbClickRow(record) { function dbClickRow(record) {
if (!actionButtonConfig?.value.some(element => element.code == 'view')) { if (!actionButtonConfig?.value.some(element => element.code == 'view')) {
return; return;