银行 国家地区

This commit is contained in:
‘huanghaiixia’
2025-10-23 14:02:27 +08:00
parent f54d083784
commit 39953e5648
13 changed files with 3378 additions and 2798 deletions

View File

@ -79,6 +79,7 @@
"nzh": "^1.0.8", "nzh": "^1.0.8",
"path-to-regexp": "^6.2.0", "path-to-regexp": "^6.2.0",
"pinia": "2.0.12", "pinia": "2.0.12",
"pnpm": "^10.18.2",
"print-js": "^1.6.0", "print-js": "^1.6.0",
"qrcode": "^1.5.0", "qrcode": "^1.5.0",
"qs": "^6.10.3", "qs": "^6.10.3",

View File

@ -137,3 +137,19 @@ export async function disableLngBBank(ids: string[], mode: ErrorMessageMode = 'm
}, },
); );
} }
/**
* @description: 获取数据日志
*/
export async function getDataLog(id: string, mode: ErrorMessageMode = 'modal', path:string) {
return defHttp.post<boolean>(
{
url: path,
params: { id },
},
{
errorMessageMode: mode,
},
);
}

View File

@ -14,6 +14,22 @@ enum Api {
Disable= '/mdm/countryRegion/disable', Disable= '/mdm/countryRegion/disable',
DataLog = '/mdm/countryRegion/datalog', DataLog = '/mdm/countryRegion/datalog',
TreeData = '/mdm/countryRegion/tree'
}
/**
* @description: 查询LngBRegion分页列表
*/
export async function getTreeData(params: LngBRegionPageParams, mode: ErrorMessageMode = 'modal') {
return defHttp.get<LngBRegionPageResult>(
{
url: Api.TreeData,
params,
},
{
errorMessageMode: mode,
},
);
} }
/** /**

View File

@ -4,7 +4,7 @@ import type { ComponentType } from './types/index';
/** /**
* Component list, register here to setting it in the form * Component list, register here to setting it in the form
*/ */
import { Input, InputNumber, Select, Radio, Checkbox, DatePicker, TreeSelect, Rate, Divider } from 'ant-design-vue'; import { Input, InputNumber,Cascader, Select, Radio, Checkbox, DatePicker, TreeSelect, Rate, Divider } from 'ant-design-vue';
const DatasourceSelect = defineAsyncComponent({ const DatasourceSelect = defineAsyncComponent({
loader: () => import('/@/components/DataSourceSelect/src/DatasourceSelect.vue') loader: () => import('/@/components/DataSourceSelect/src/DatasourceSelect.vue')
}); });
@ -81,6 +81,7 @@ componentMap.set('InputPassword', XjrInputPassword);
componentMap.set('InputSearch', Input.Search); componentMap.set('InputSearch', Input.Search);
componentMap.set('InputTextArea', Input.TextArea); componentMap.set('InputTextArea', Input.TextArea);
componentMap.set('InputNumber', InputNumber); componentMap.set('InputNumber', InputNumber);
componentMap.set('Cascader', Cascader);
// componentMap.set('AutoComplete', AutoComplete); // componentMap.set('AutoComplete', AutoComplete);
componentMap.set('AutoCodeRule', AutoCodeRule); componentMap.set('AutoCodeRule', AutoCodeRule);
componentMap.set('MoneyChineseInput', MoneyChineseInput); componentMap.set('MoneyChineseInput', MoneyChineseInput);

View File

@ -14,6 +14,7 @@ import { setupStore } from '/@/store';
import { setupGlobDirectives } from '/@/directives'; import { setupGlobDirectives } from '/@/directives';
import { setupI18n } from '/@/locales/setupI18n'; import { setupI18n } from '/@/locales/setupI18n';
import { registerGlobComp } from '/@/components/registerGlobComp'; import { registerGlobComp } from '/@/components/registerGlobComp';
import DataLog from '/@/views/mdm/Bank/components/DataLog.vue';
import axios from 'axios'; import axios from 'axios';
import VueGridLayout from 'vue-grid-layout'; import VueGridLayout from 'vue-grid-layout';
import Antd from 'ant-design-vue'; import Antd from 'ant-design-vue';
@ -73,6 +74,7 @@ async function bootstrap() {
app.use(Antd); app.use(Antd);
app.use(VueGridLayout); app.use(VueGridLayout);
app.component('DataLog', DataLog);
//如果需要使用葡萄城报表 放开代码注释 //如果需要使用葡萄城报表 放开代码注释
//这里是viewer的key //这里是viewer的key

View File

@ -0,0 +1,93 @@
<template>
<div :style="{ height: '100%', background: '#fff' }">
<a-table :columns="columns" :data-source="data" :scroll="{y: 500}" :row-key="record => record.id"
/>
</div>
</template>
<script lang="ts" setup>
import { getDataLog } from '/@/api/mdm/Bank';
import { defineProps, ref, computed, onMounted, onUnmounted, createVNode, reactive, } from 'vue';
const columns = [
{
title: '表名',
dataIndex: 'tableName',
key: 'tableName',
width: 80
},
{
title: '属性名称',
dataIndex: 'name',
key: 'name',
width: 140
},
{
title: '操作类型',
dataIndex: 'operationType',
key: 'operationType',
width: 100,
customRender: ({ record }) => {
let text = record.operationType
if (record.operationType == 'INSERT') text='新增'
if (record.operationType == 'UPDATE') text='修改'
if (record.operationType == 'DELETE') text='删除'
return text
}
},
{
title: '原数据',
dataIndex: 'oldValue',
key: 'oldValue',
width: 150
},
{
title: '新数据',
dataIndex: 'newValue',
key: 'newValue',
width: 150
},
{
title: '操作人',
dataIndex: 'operatorName',
key: 'operatorName',
width: 100
},
{
title: '操作IP',
dataIndex: 'operationIp',
key: 'operationIp',
width: 150
},
{
title: '操作时间',
dataIndex: 'operationTime',
key: 'operationTime',
width: 150
},
];
const props = defineProps({
logId: {
type: String,
required: true
},
logPath: {
type: String,
required: true
},
})
console.log(props.logId, 444, props.logPath)
interface DataItem {
children?: DataItem[];
}
// const data: DataItem[] = [];
const data = ref<DataItem[]>([]);
onMounted( async() => {
data.value = await getDataLog(props.logId, {},props.logPath)
console.log(data.value, 88)
});
</script>

View File

@ -20,7 +20,7 @@
import { changeWorkFlowForm, changeSchemaDisabled } from '/@/hooks/web/useWorkFlowForm'; import { changeWorkFlowForm, changeSchemaDisabled } from '/@/hooks/web/useWorkFlowForm';
import { WorkFlowFormParams } from '/@/model/workflow/bpmnConfig'; import { WorkFlowFormParams } from '/@/model/workflow/bpmnConfig';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import { getTreeData } from '/@/api/mdm/CountryRegion';
const { filterFormSchemaAuth } = usePermission(); const { filterFormSchemaAuth } = usePermission();
const { mergeFormSchemas,mergeFormEventConfigs } = useFormConfig(); const { mergeFormSchemas,mergeFormEventConfigs } = useFormConfig();
const { currentRoute } = useRouter(); const { currentRoute } = useRouter();
@ -44,6 +44,13 @@
let customFormEventConfigs=[]; let customFormEventConfigs=[];
onMounted(async () => { onMounted(async () => {
const treeData = await getTreeData({})
formProps.schemas?.forEach(v => {
if (v.field == 'regionCode') {
v.componentProps.options = treeData
}
})
console.log(formProps.schemas, 667)
try { try {
// 合并渲染覆盖配置中的字段配置、表单事件配置 // 合并渲染覆盖配置中的字段配置、表单事件配置
await mergeCustomFormRenderConfig(); await mergeCustomFormRenderConfig();
@ -117,7 +124,8 @@
// 根据行唯一ID查询行数据并设置表单数据 【编辑】 // 根据行唯一ID查询行数据并设置表单数据 【编辑】
async function setFormDataFromId(rowId, skipUpdate) { async function setFormDataFromId(rowId, skipUpdate) {
try { try {
const record = await getLngBBank(rowId); let record = await getLngBBank(rowId);
record = {...record, regionCode: (record.regionCode || []).split(',')}
if (skipUpdate) { if (skipUpdate) {
return record; return record;
} }
@ -150,7 +158,7 @@
try { try {
values[RowKey] = rowId; values[RowKey] = rowId;
state.formModel = values; state.formModel = values;
let saveVal = await updateLngBBank(values); let saveVal = await updateLngBBank({...values, regionCode: (values.regionCode||[]).join(',')});
await submitFormEvent(customFormEventConfigs, state.formModel, await submitFormEvent(customFormEventConfigs, state.formModel,
systemFormRef.value, systemFormRef.value,
formProps.schemas); //表单事件:提交表单 formProps.schemas); //表单事件:提交表单
@ -161,7 +169,7 @@
async function add(values) { async function add(values) {
try { try {
state.formModel = values; state.formModel = values;
let saveVal = await addLngBBank(values); let saveVal = await addLngBBank({...values, regionCode: (values.regionCode||[]).join(',')});
await submitFormEvent(customFormEventConfigs, state.formModel, await submitFormEvent(customFormEventConfigs, state.formModel,
systemFormRef.value, systemFormRef.value,
formProps.schemas); //表单事件:提交表单 formProps.schemas); //表单事件:提交表单

View File

@ -1,5 +1,9 @@
import { FormProps, FormSchema } from '/@/components/Form'; import { FormProps, FormSchema } from '/@/components/Form';
import { BasicColumn } from '/@/components/Table'; import { BasicColumn } from '/@/components/Table';
import { useI18n } from '/@/hooks/web/useI18n';
const { t } = useI18n();
import { h } from 'vue';
import { Tag } from 'ant-design-vue';
export const formConfig = { export const formConfig = {
useCustomConfig: false, useCustomConfig: false,
@ -12,12 +16,12 @@ export const searchFormSchema: FormSchema[] = [
component: 'Input', component: 'Input',
}, },
{ {
field: 'bankCode', field: 'code',
label: '编码', label: '编码',
component: 'Input', component: 'Input',
}, },
{ {
field: 'regionCode', field: 'bankCode',
label: '联行号', label: '联行号',
component: 'Input', component: 'Input',
}, },
@ -34,26 +38,26 @@ export const searchFormSchema: FormSchema[] = [
getPopupContainer: () => document.body, getPopupContainer: () => document.body,
}, },
}, },
{ // {
field: 'fullName', // field: 'fullName',
label: '银行名称', // label: '银行名称',
component: 'Input', // component: 'Input',
}, // },
{ // {
field: 'code', // field: 'code',
label: '所属国家和地区', // label: '所属国家和地区',
component: 'Input', // component: 'Input',
}, // },
{ // {
field: 'swift', // field: 'swift',
label: 'SWIFT', // label: 'SWIFT',
component: 'Input', // component: 'Input',
}, // },
]; ];
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
dataIndex: 'bankCode', dataIndex: 'code',
title: '编码', title: '编码',
componentType: 'input', componentType: 'input',
align: 'left', align: 'left',
@ -63,33 +67,30 @@ export const columns: BasicColumn[] = [
{ {
dataIndex: 'fullName', dataIndex: 'fullName',
title: '银行名称', title: '名称',
componentType: 'input', componentType: 'input',
align: 'left', align: 'left',
sorter: true, sorter: true,
}, },
{ {
dataIndex: 'shortName', dataIndex: 'shortName',
title: '银行名称/简称', title: '简称',
componentType: 'input', componentType: 'input',
align: 'left', align: 'left',
sorter: true, sorter: true,
}, },
{ {
dataIndex: 'regionCode', dataIndex: 'bankCode',
title: '联行号', title: '联行号',
componentType: 'input', componentType: 'input',
align: 'left', align: 'left',
sorter: true, sorter: true,
}, },
{ {
dataIndex: 'code', dataIndex: 'regionName',
title: '所属国家和地区', title: '所属国家和地区',
componentType: 'input', componentType: 'input',
align: 'left', align: 'left',
@ -113,6 +114,13 @@ export const columns: BasicColumn[] = [
align: 'left', align: 'left',
sorter: true, sorter: true,
// customRender: ({ record }) => {
// const enabledMark = record.valid;
// const enable = ~~enabledMark === '有效';
// const color = enable ? 'green' : 'red';
// const text = enable ? t('有效') : t('无效');
// return h(Tag, { color: color }, () => text);
// }
}, },
]; ];
//表单事件 //表单事件
@ -185,42 +193,8 @@ export const formProps: FormProps = {
size: 'default', size: 'default',
schemas: [ schemas: [
{ {
key: '151d6e797f7e411297992bd2460ddd29', key: '1',
field: 'shortName', field: 'code',
label: '银行名称/简称',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
labelWidthMode: 'fix',
labelFixWidth: 120,
responsive: false,
respNewRow: false,
placeholder: '请输入银行名称/简称',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
isSave: false,
isShow: true,
scan: false,
style: { width: '100%' },
},
},
{
key: 'df917f42491f4a8888a9d661a89ac3ce',
field: 'bankCode',
label: '编码', label: '编码',
type: 'input', type: 'input',
component: 'Input', component: 'Input',
@ -234,13 +208,13 @@ export const formProps: FormProps = {
labelFixWidth: 120, labelFixWidth: 120,
responsive: false, responsive: false,
respNewRow: false, respNewRow: false,
placeholder: '请输入编码', placeholder: '',
maxlength: null, maxlength: null,
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
addonAfter: '', addonAfter: '',
disabled: false, disabled: true,
allowClear: false, allowClear: false,
showLabel: true, showLabel: true,
required: false, required: false,
@ -253,12 +227,80 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: '0e4069a334ea44219d6f1d364d830ffe', key: '5fdaec7802364d16a979fc9d3218bbfa',
field: 'regionCode', field: 'fullName',
label: '银行名称',
type: 'input',
component: 'Input',
colProps: { span: 16 },
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
labelWidthMode: 'fix',
labelFixWidth: 120,
responsive: false,
respNewRow: false,
placeholder: '请输入银行名称',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: true,
rules: [],
events: {},
isSave: false,
isShow: true,
scan: false,
style: { width: '100%' },
},
},
{
key: '2',
field: 'shortName',
label: '简称',
type: 'input',
component: 'Input',
colProps: { span: 8 },
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
labelWidthMode: 'fix',
labelFixWidth: 120,
responsive: false,
respNewRow: false,
placeholder: '请输入银行名称简称',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: true,
rules: [],
events: {},
isSave: false,
isShow: true,
scan: false,
style: { width: '100%' },
},
},
{
key: '38bd834c265446658be6f9784672e1ae',
field: 'bankCode',
label: '联行号', label: '联行号',
type: 'input', type: 'input',
component: 'Input', component: 'Input',
colProps: { span: 24 }, colProps: { span: 8 },
defaultValue: '', defaultValue: '',
componentProps: { componentProps: {
width: '100%', width: '100%',
@ -287,59 +329,33 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: 'e00cdcea0ed14c99b7f7901526f5a5fe', key: '4',
field: 'valid', field: 'regionCode',
label: '有效标志', label: '所属国家/地区',
type: 'select', type: 'cascader',
component: 'XjrSelect', component: 'Cascader',
colProps: { span: 24 }, colProps: { span: 8 },
defaultValue: [],
componentProps: { componentProps: {
width: '100%', options: [
span: '', // {
labelWidthMode: 'fix', // value: 'zhejiang',
labelFixWidth: 120, // label: '浙江省',
responsive: false, // children: [
respNewRow: false, // {
placeholder: '请选择下拉选择', // value: 'hangzhou',
sepTextField: '', // label: '杭州市',
showLabel: true, // children: [
showSearch: false, // {
clearable: false, // value: 'xihu',
disabled: false, // label: '西湖区',
mode: 'multiple', // },
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: null, fieldNames: {label: 'fullName', value: 'code', children: 'children'},
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: 'fe4822ade6334198965e983ab26c4100',
field: 'fullName',
label: '银行名称',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%', width: '100%',
span: '', span: '',
defaultValue: '', defaultValue: '',
@ -347,7 +363,7 @@ export const formProps: FormProps = {
labelFixWidth: 120, labelFixWidth: 120,
responsive: false, responsive: false,
respNewRow: false, respNewRow: false,
placeholder: '请输入银行名称', placeholder: '请选择',
maxlength: null, maxlength: null,
prefix: '', prefix: '',
suffix: '', suffix: '',
@ -366,46 +382,12 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: '503adbb6dd024e0f934a41ec1ccbff07', key: '6461a5e152124abca28bd2114dd577e6',
field: 'code',
label: '所属国家和地区',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
labelWidthMode: 'fix',
labelFixWidth: 120,
responsive: false,
respNewRow: false,
placeholder: '请输入所属国家和地区',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
isSave: false,
isShow: true,
scan: false,
style: { width: '100%' },
},
},
{
key: '08b8ef5bc2a148e2b14093e97be20305',
field: 'swift', field: 'swift',
label: 'SWIFT', label: 'SWIFT',
type: 'input', type: 'input',
component: 'Input', component: 'Input',
colProps: { span: 24 }, colProps: { span: 8 },
defaultValue: '', defaultValue: '',
componentProps: { componentProps: {
width: '100%', width: '100%',
@ -433,6 +415,220 @@ export const formProps: FormProps = {
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },
{
key: '5',
field: 'ib',
label: '中转行',
type: 'input',
component: 'Input',
colProps: { span: 16 },
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
labelWidthMode: 'fix',
labelFixWidth: 120,
responsive: false,
respNewRow: false,
placeholder: '请输入中转行',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
isSave: false,
isShow: true,
scan: false,
style: { width: '100%' },
},
},
{
key: '6',
field: 'ibSwift',
label: '中转行SWIFT',
type: 'input',
component: 'Input',
colProps: { span: 8 },
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
labelWidthMode: 'fix',
labelFixWidth: 120,
responsive: false,
respNewRow: false,
placeholder: '请输入中转行SWIFT',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
isSave: false,
isShow: true,
scan: false,
style: { width: '100%' },
},
},
{
key: '7',
field: 'routing',
label: 'Routing',
type: 'input',
component: 'Input',
colProps: { span: 8 },
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
labelWidthMode: 'fix',
labelFixWidth: 120,
responsive: false,
respNewRow: false,
placeholder: '请输入Routing',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
isSave: false,
isShow: true,
scan: false,
style: { width: '100%' },
},
},
{
key: '8',
field: 'soft',
label: '显示顺序',
type: 'input',
component: 'InputNumber',
colProps: { span: 8 },
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
labelWidthMode: 'fix',
labelFixWidth: 120,
responsive: false,
respNewRow: false,
placeholder: '请输入显示顺序',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
isSave: false,
isShow: true,
scan: false,
style: { width: '100%' },
},
},
{
key: '714953d458d9402bb507893c92913d44',
field: 'valid',
label: '有效标志',
type: 'select',
component: 'XjrSelect',
colProps: { span: 8 },
componentProps: {
width: '100%',
span: '',
labelWidthMode: 'fix',
labelFixWidth: 120,
responsive: false,
respNewRow: false,
placeholder: '请选择下拉选择',
sepTextField: '',
showLabel: true,
showSearch: false,
clearable: false,
disabled: true,
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: '9',
field: 'note',
label: '备注',
type: 'input',
component: 'InputTextArea',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
labelWidthMode: 'fix',
labelFixWidth: 120,
responsive: false,
respNewRow: false,
placeholder: '请输入内容最多200字',
maxlength: 200,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
isSave: false,
isShow: true,
scan: false,
style: { width: '100%' },
},
},
], ],
showActionButtonGroup: false, showActionButtonGroup: false,
buttonLocation: 'center', buttonLocation: 'center',

View File

@ -21,13 +21,18 @@
</template> </template>
</BasicTable> </BasicTable>
<BankModal @register="registerModal" @success="handleSuccess" /> <BankModal @register="registerModal" @success="handleSuccess" />
<!-- <div>
<DataLog :logId="logId" :logPath="logPath" />
</div> -->
</PageWrapper> </PageWrapper>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, computed, onMounted, onUnmounted, createVNode, import { ref, computed, onMounted, onUnmounted, createVNode, reactive,
} from 'vue'; } from 'vue';
const logId = ref('77773434')
const logPath = ref('/bank/b')
import { Modal } from 'ant-design-vue'; import { Modal } from 'ant-design-vue';
import { ExclamationCircleOutlined } from '@ant-design/icons-vue'; import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table'; import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table';
@ -39,7 +44,7 @@
import { useFormConfig } from '/@/hooks/web/useFormConfig'; import { useFormConfig } from '/@/hooks/web/useFormConfig';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import { setIndexFlowStatus } from '/@/utils/flow/index' import { setIndexFlowStatus } from '/@/utils/flow/index'
import { getLngBBank } from '/@/api/mdm/Bank'; import { getLngBBank,enableLngBBank,disableLngBBank } from '/@/api/mdm/Bank';
import { useModal } from '/@/components/Modal'; import { useModal } from '/@/components/Modal';
import BankModal from './components/BankModal.vue'; import BankModal from './components/BankModal.vue';
import {formConfig, searchFormSchema, columns } from './components/config'; import {formConfig, searchFormSchema, columns } from './components/config';
@ -55,13 +60,28 @@
const { filterColumnAuth, filterButtonAuth } = usePermission(); const { filterColumnAuth, filterButtonAuth } = usePermission();
const { mergeColumns,mergeSearchFormSchema,mergeButtons } = useFormConfig(); const { mergeColumns,mergeSearchFormSchema,mergeButtons } = useFormConfig();
const filterColumns = cloneDeep(filterColumnAuth(columns)); // const filterColumns = cloneDeep(filterColumnAuth(columns));
const filterColumns = cloneDeep(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 dataObj = reactive({
url: '',
visible: false,
type: ''
})
//所有按钮 //所有按钮
const buttons = ref([{"isUse":true,"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"type":"primary"},{"isUse":true,"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"启用","code":"enable","icon":"ant-design:form-outlined","isDefault":true,"type":"primary"},{"isUse":true,"name":"作废","code":"disable","icon":"ant-design:stop-outlined","isDefault":true,"type":"dashed"},{"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}]); 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},
{"isUse":true,"name":"启用","code":"enable","icon":"ant-design:form-outlined","isDefault":true,"type":"primary"},
{"isUse":true,"name":"作废","code":"disable","icon":"ant-design:stop-outlined","isDefault":true,"type":"dashed"},
{"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 actionButtons = ref<string[]>(['view', 'edit','datalog', 'copyData', 'delete', 'startwork','flowRecord']); const actionButtons = ref<string[]>(['view', 'edit','datalog', 'copyData', 'delete', 'startwork','flowRecord']);
const buttonConfigs = computed(()=>{ const buttonConfigs = computed(()=>{
@ -85,6 +105,7 @@
const schemaIdComputedRef = ref(); const schemaIdComputedRef = ref();
schemaIdComputedRef.value = currentRoute.value.meta.schemaId schemaIdComputedRef.value = currentRoute.value.meta.schemaId
const [registerModal, { openModal }] = useModal(); const [registerModal, { openModal }] = useModal();
const formName='银行'; const formName='银行';
const [registerTable, { reload, }] = useTable({ const [registerTable, { reload, }] = useTable({
title: '' || (formName + '列表'), title: '' || (formName + '列表'),
@ -93,11 +114,12 @@
columns: customConfigColums, columns: customConfigColums,
formConfig: { formConfig: {
rowProps: { rowProps: {
gutter: 16, // gutter: 16,
}, },
labelCol:{span: 9, offSet:10},
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' };
@ -116,13 +138,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;
@ -163,7 +191,9 @@
btnEvent[code](); btnEvent[code]();
} }
function handleDatalog () {
dataObj.visible = true
}
function handleAdd() { function handleAdd() {
if (schemaIdComputedRef.value) { if (schemaIdComputedRef.value) {
router.push({ router.push({

View File

@ -45,6 +45,13 @@
onMounted(async () => { onMounted(async () => {
try { try {
let curParentId=currentRoute.value.query.id;
setTimeout(() => {
setFieldsValue({pid: curParentId}) // 重置表单({pId: curParentId});
}, );
console.log(curParentId, 'curParentId')
// 合并渲染覆盖配置中的字段配置、表单事件配置 // 合并渲染覆盖配置中的字段配置、表单事件配置
await mergeCustomFormRenderConfig(); await mergeCustomFormRenderConfig();
@ -176,6 +183,7 @@
if (formConfig.useCustomConfig) { if (formConfig.useCustomConfig) {
const parts = obj.formConfigKey.split('_'); const parts = obj.formConfigKey.split('_');
const formId=parts[1]; const formId=parts[1];
console.log(parts, 'parts')
cloneProps.schemas=await mergeFormSchemas({formSchema:cloneProps.schemas!,formId:formId}); cloneProps.schemas=await mergeFormSchemas({formSchema:cloneProps.schemas!,formId:formId});
customFormEventConfigs=await mergeFormEventConfigs({formEventConfigs:customFormEventConfigs,formId:formId}); customFormEventConfigs=await mergeFormEventConfigs({formEventConfigs:customFormEventConfigs,formId:formId});
} }

View File

@ -6,39 +6,49 @@ export const formConfig = {
}; };
export const searchFormSchema: FormSchema[] = [ export const searchFormSchema: FormSchema[] = [
{ // {
field: 'code', // field: 'id',
label: '编码', // label: 'id',
component: 'Input', // component: 'Input',
}, // },
// {
// field: 'code',
// label: '编码',
// component: 'Input',
// },
// {
// field: 'code',
// label: '编码',
// component: 'Input',
// },
{ {
field: 'fullName', field: 'fullName',
label: '名称', label: '名称',
component: 'Input', component: 'Input',
}, },
{ // {
field: 'regionTypeCode', // field: 'regionTypeCode',
label: '类型', // label: '类型',
component: 'XjrSelect', // component: 'XjrSelect',
componentProps: { // componentProps: {
datasourceType: 'dic', // datasourceType: 'dic',
params: { itemId: '1980458729324212226' }, // params: { itemId: '1980458729324212226' },
labelField: 'name', // labelField: 'name',
valueField: 'value', // valueField: 'value',
getPopupContainer: () => document.body, // getPopupContainer: () => document.body,
}, // },
}, // },
{ // {
field: 'pid', // field: 'pid',
label: '上级ID', // label: '上级ID',
component: 'Input', // component: 'Input',
}, // },
{ // {
field: 'fullPath', // field: 'fullPath',
label: '全路径名称', // label: '全路径名称',
component: 'Input', // component: 'Input',
}, // },
{ {
field: 'valid', field: 'valid',
label: '有效标志', label: '有效标志',
@ -52,11 +62,11 @@ export const searchFormSchema: FormSchema[] = [
getPopupContainer: () => document.body, getPopupContainer: () => document.body,
}, },
}, },
{ // {
field: 'note', // field: 'note',
label: '备注', // label: '备注',
component: 'Input', // component: 'Input',
}, // },
]; ];
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
@ -198,7 +208,7 @@ export const formProps: FormProps = {
label: '编码', label: '编码',
type: 'input', type: 'input',
component: 'Input', component: 'Input',
colProps: { span: 24 }, colProps: { span: 8 },
defaultValue: '', defaultValue: '',
componentProps: { componentProps: {
width: '100%', width: '100%',
@ -216,7 +226,7 @@ export const formProps: FormProps = {
disabled: false, disabled: false,
allowClear: false, allowClear: false,
showLabel: true, showLabel: true,
required: false, required: true,
rules: [], rules: [],
events: {}, events: {},
isSave: false, isSave: false,
@ -231,7 +241,7 @@ export const formProps: FormProps = {
label: '名称', label: '名称',
type: 'input', type: 'input',
component: 'Input', component: 'Input',
colProps: { span: 24 }, colProps: { span: 8 },
defaultValue: '', defaultValue: '',
componentProps: { componentProps: {
width: '100%', width: '100%',
@ -249,7 +259,7 @@ export const formProps: FormProps = {
disabled: false, disabled: false,
allowClear: false, allowClear: false,
showLabel: true, showLabel: true,
required: false, required: true,
rules: [], rules: [],
events: {}, events: {},
isSave: false, isSave: false,
@ -264,7 +274,7 @@ export const formProps: FormProps = {
label: '类型', label: '类型',
type: 'select', type: 'select',
component: 'XjrSelect', component: 'XjrSelect',
colProps: { span: 24 }, colProps: { span: 8 },
componentProps: { componentProps: {
width: '100%', width: '100%',
span: '', span: '',
@ -278,7 +288,7 @@ export const formProps: FormProps = {
showSearch: false, showSearch: false,
clearable: false, clearable: false,
disabled: false, disabled: false,
mode: 'multiple', // mode: 'tags',
staticOptions: [ staticOptions: [
{ key: 1, label: 'Option 1', value: 'Option 1' }, { key: 1, label: 'Option 1', value: 'Option 1' },
{ key: 2, label: 'Option 2', value: 'Option 2' }, { key: 2, label: 'Option 2', value: 'Option 2' },
@ -294,7 +304,7 @@ export const formProps: FormProps = {
apiId: '93d735dcb7364a0f8102188ec4d77ac7', apiId: '93d735dcb7364a0f8102188ec4d77ac7',
}, },
dicOptions: [], dicOptions: [],
required: false, required: true,
rules: [], rules: [],
events: {}, events: {},
isShow: true, isShow: true,
@ -308,7 +318,7 @@ export const formProps: FormProps = {
label: '上级ID', label: '上级ID',
type: 'input', type: 'input',
component: 'Input', component: 'Input',
colProps: { span: 24 }, colProps: { span: 8 },
defaultValue: '', defaultValue: '',
componentProps: { componentProps: {
width: '100%', width: '100%',
@ -323,7 +333,7 @@ export const formProps: FormProps = {
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
addonAfter: '', addonAfter: '',
disabled: false, disabled: true,
allowClear: false, allowClear: false,
showLabel: true, showLabel: true,
required: false, required: false,
@ -341,7 +351,7 @@ export const formProps: FormProps = {
label: '全路径名称', label: '全路径名称',
type: 'input', type: 'input',
component: 'Input', component: 'Input',
colProps: { span: 24 }, colProps: { span: 8 },
defaultValue: '', defaultValue: '',
componentProps: { componentProps: {
width: '100%', width: '100%',
@ -356,7 +366,7 @@ export const formProps: FormProps = {
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
addonAfter: '', addonAfter: '',
disabled: false, disabled: true,
allowClear: false, allowClear: false,
showLabel: true, showLabel: true,
required: false, required: false,
@ -374,7 +384,7 @@ export const formProps: FormProps = {
label: '有效标志', label: '有效标志',
type: 'select', type: 'select',
component: 'XjrSelect', component: 'XjrSelect',
colProps: { span: 24 }, colProps: { span: 8 },
componentProps: { componentProps: {
width: '100%', width: '100%',
span: '', span: '',
@ -387,13 +397,14 @@ export const formProps: FormProps = {
showLabel: true, showLabel: true,
showSearch: false, showSearch: false,
clearable: false, clearable: false,
disabled: false, disabled: true,
mode: 'multiple', // mode: 'tags',
staticOptions: [ staticOptions: [
{ key: 1, label: 'Option 1', value: 'Option 1' }, { key: 1, label: 'Option 1', value: 'Option 1' },
{ 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: 'Y',
datasourceType: 'dic', datasourceType: 'dic',
params: { itemId: '1978057078528327681' }, params: { itemId: '1978057078528327681' },
labelField: 'name', labelField: 'name',

View File

@ -5,13 +5,15 @@
title="国家地区" title="国家地区"
toolbar toolbar
search search
show-line
:show-icon="false"
:clickRowToExpand="true" :clickRowToExpand="true"
:treeData="treeData" :treeData="treeData"
:fieldNames="{ key: 'key', title: 'title' }" :fieldNames="{ key: 'id', title: 'fullName' }"
@select="handleSelect" @select="handleSelect"
> >
<template #title="item"> <template #title="item">
&nbsp;&nbsp;{{ item.title }} &nbsp;&nbsp;{{ item.fullName }}
</template> </template>
</BasicTree> </BasicTree>
</div> </div>
@ -48,7 +50,7 @@
import { Modal } from 'ant-design-vue'; import { Modal } from 'ant-design-vue';
import { ExclamationCircleOutlined } from '@ant-design/icons-vue'; import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table'; import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table';
import { getLngBRegionPage, deleteLngBRegion} from '/@/api/mdm/CountryRegion'; import { getLngBRegionPage, deleteLngBRegion, getTreeData, disableLngBRegion, enableLngBRegion} from '/@/api/mdm/CountryRegion';
import { PageWrapper } from '/@/components/Page'; import { PageWrapper } from '/@/components/Page';
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n'; import { useI18n } from '/@/hooks/web/useI18n';
@ -77,7 +79,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},{"isUse":true,"name":"启用","code":"enable","icon":"ant-design:form-outlined","isDefault":true,"type":"primary"},{"isUse":true,"name":"作废","code":"disable","icon":"ant-design:stop-outlined","isDefault":true,"type":"dashed"},{"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},{"isUse":true,"name":"启用","code":"enable","icon":"ant-design:form-outlined","isDefault":true,"type":"primary"},{"isUse":true,"name":"作废","code":"disable","icon":"ant-design:stop-outlined","isDefault":true,"type":"dashed"},{"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}]);
@ -104,6 +106,7 @@
const schemaIdComputedRef = ref(); const schemaIdComputedRef = ref();
schemaIdComputedRef.value = currentRoute.value.meta.schemaId schemaIdComputedRef.value = currentRoute.value.meta.schemaId
const selectId = ref(''); const selectId = ref('');
const curTreeId = ref('')
const treeData = ref<TreeItem[]>([]); const treeData = ref<TreeItem[]>([]);
const [registerModal, { openModal }] = useModal(); const [registerModal, { openModal }] = useModal();
const formName='国家地区'; const formName='国家地区';
@ -137,13 +140,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;
@ -184,7 +193,9 @@
btnEvent[code](); btnEvent[code]();
} }
function handleDatalog () {
}
function handleAdd() { function handleAdd() {
if (schemaIdComputedRef.value) { if (schemaIdComputedRef.value) {
router.push({ router.push({
@ -196,7 +207,8 @@
query: { query: {
formPath: 'mdm/CountryRegion', formPath: 'mdm/CountryRegion',
formName: formName, formName: formName,
formId:currentRoute.value.meta.formId formId:currentRoute.value.meta.formId,
id: curTreeId.value
} }
}); });
} }
@ -294,10 +306,13 @@
} }
function handleRefresh() { function handleRefresh() {
reload(); reload();
fetchTree()
} }
function handleSuccess() { function handleSuccess() {
reload(); reload();
fetchTree()
console.log(77777777777)
} }
function handleView(record: Recordable) { function handleView(record: Recordable) {
@ -305,17 +320,18 @@
dbClickRow(record); dbClickRow(record);
} }
function handleSelect(selectIds) { function handleSelect(selectIds, e) {
selectId.value = selectIds[0]; selectId.value = selectIds[0];
reload({ searchInfo: { code: selectIds[0] } }); reload({ searchInfo: { pid: selectIds[0] } });
curTreeId.value = selectIds[0]
console.log(selectId.value, 777, selectIds, e,88, e.selectedNodes[0].parentId)
} }
async function fetch() { async function fetchTree() {
treeData.value = (await getTreeData({})) as unknown as TreeItem[];
treeData.value = [];
} }
onMounted(() => { onMounted(() => {
fetch(); fetchTree();
if (schemaIdComputedRef.value) { if (schemaIdComputedRef.value) {
bus.on(FLOW_PROCESSED, handleRefresh); bus.on(FLOW_PROCESSED, handleRefresh);
bus.on(CREATE_FLOW, handleRefresh); bus.on(CREATE_FLOW, handleRefresh);

5316
yarn.lock

File diff suppressed because it is too large Load Diff