管道气

This commit is contained in:
‘huanghaiixia’
2025-10-24 17:24:12 +08:00
parent d882d9b5b6
commit 19cc342e6f
10 changed files with 865 additions and 331 deletions

View File

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

View File

@ -7,7 +7,8 @@
/>
</template>
<script lang="ts" setup>
import { reactive, ref,onBeforeMount,onMounted } from 'vue';
import type { CascaderProps } from 'ant-design-vue';
import { reactive, ref,onBeforeMount,onMounted,nextTick } from 'vue';
import { formProps, formEventConfigs ,formConfig} from './config';
import SimpleForm from '/@/components/SimpleForm/src/SimpleForm.vue';
import { addLngBBank, getLngBBank, updateLngBBank, deleteLngBBank } from '/@/api/mdm/Bank';
@ -20,7 +21,7 @@
import { changeWorkFlowForm, changeSchemaDisabled } from '/@/hooks/web/useWorkFlowForm';
import { WorkFlowFormParams } from '/@/model/workflow/bpmnConfig';
import { useRouter } from 'vue-router';
import { getTreeData } from '/@/api/mdm/CountryRegion';
import { getTreeData, getTreeChild } from '/@/api/mdm/CountryRegion';
const { filterFormSchemaAuth } = usePermission();
const { mergeFormSchemas,mergeFormEventConfigs } = useFormConfig();
const { currentRoute } = useRouter();
@ -42,15 +43,520 @@
});
let customFormEventConfigs=[];
// 初始选项
const cascaderOptions = ref<CascaderProps['options']>([])
const cascaderKey = ref(0); // 用于强制重新渲染
// 动态加载数据
const loadData: CascaderProps['loadData'] = async (selectedOptions) => {
const targetOption = selectedOptions[selectedOptions.length - 1];
targetOption.loading = true;
try {
// 调用 API 获取子级数据
const arr = reactive ([]);
arr.value = [
{
"id": "1981158570698272770",
"code": "11",
"fullName": "中国",
"regionTypeCode": "COUNTRY",
"pid": "1980912427490508801",
"fullPath": "亚洲中国",
"valid": "Y",
"note": "国这有",
"createUserId": "1000000000000000000",
"createDate": "2025-10-23 08:39:46",
"modifyUserId": "1000000000000000000",
"modifyDate": "2025-10-23 08:49:42",
"tenantId": "1",
"deptId": null,
"ruleUserId": "1000000000000000000"
}
]
// arr.value = await getTreeChild({
// pid: targetOption.id,
// });
console.log(arr.value, 889)
targetOption.loading = false;
targetOption.children = arr.value
// .map(item => ({
// ...item,
// value: item.code,
// label: item.fullName,
// // isLeaf: !item.hasChildren,
// isLeaf: false,
// children: item.children||[]
// }));
cascaderOptions.value = [...cascaderOptions.value]
console.log(targetOption.children,8897)
} catch (error) {
targetOption.loading = false;
console.error('加载数据失败:', error);
}
};
// 初始化根节点数据
const initRootData = async () => {
const data = reactive ([]);
data.value = await getTreeChild({});
console.log(data, 6767)
cascaderOptions.value = data.value.map(item => ({
...item,
// value: item.code,
// label: item.fullName,
// isLeaf: !item.hasChildren,
isLeaf: false,
children: item.children||[]
}));
console.log(cascaderOptions.value, 888)
};
formProps.schemas= [
{
key: '1',
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: true,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
isSave: false,
isShow: true,
scan: false,
style: { width: '100%' },
},
},
{
key: '5fdaec7802364d16a979fc9d3218bbfa',
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: '联行号',
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: false,
rules: [],
events: {},
isSave: false,
isShow: true,
scan: false,
style: { width: '100%' },
},
},
{
key: '4',
field: 'regionCode',
label: '所属国家/地区',
type: 'cascader',
component: 'Cascader',
colProps: { span: 8 },
defaultValue: [],
componentProps: {
key: cascaderKey,
changeOnSelect: false,
options: cascaderOptions,
loadData,
fieldNames: {label: 'fullName', value: 'code', children: 'children'},
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: '6461a5e152124abca28bd2114dd577e6',
field: 'swift',
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: '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%' },
},
},
]
onMounted(async () => {
const treeData = await getTreeData({})
formProps.schemas?.forEach(v => {
if (v.field == 'regionCode') {
v.componentProps.options = treeData
}
})
await initRootData();
// const treeData = await getTreeData({})
// formProps.schemas?.forEach(v => {
// if (v.field == 'regionCode') {
// v.componentProps.options = cascaderOptions
// v.componentProps.loadData = loadData
// }
// })
console.log(formProps.schemas, 667)
try {
// 合并渲染覆盖配置中的字段配置、表单事件配置
await mergeCustomFormRenderConfig();

View File

@ -68,11 +68,6 @@ const logPath = ref('/mdm/bank/datalog');
const customSearchFormSchema =ref(searchFormSchema);
const selectedKeys = ref<string[]>([]);
const tableRef = ref();
const dataObj = reactive({
url: '',
visible: false,
type: ''
})
//所有按钮
const buttons = ref([

View File

@ -40,13 +40,17 @@
</BasicTable>
</div>
<CountryRegionModal @register="registerModal" @success="handleSuccess" />
<DataLog :logId="logId" :logPath="logPath" v-model:visible="modalVisible"/>
</PageWrapper>
</template>
<script lang="ts" setup>
import { ref, computed, onMounted, onUnmounted, createVNode,
} from 'vue';
} from 'vue';
const modalVisible = ref(false);
const logId = ref('')
const logPath = ref('/mdm/countryRegion/datalog');
import { DataLog } from '/@/components/pcitc';
import { Modal } from 'ant-design-vue';
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table';
@ -193,8 +197,9 @@
btnEvent[code]();
}
function handleDatalog () {
function handleDatalog (record: Recordable) {
modalVisible.value = true
logId.value = record.id
}
function handleAdd() {
if (schemaIdComputedRef.value) {

View File

@ -21,13 +21,17 @@
</template>
</BasicTable>
<ExpenseNameModal @register="registerModal" @success="handleSuccess" />
<DataLog :logId="logId" :logPath="logPath" v-model:visible="modalVisible"/>
</PageWrapper>
</template>
<script lang="ts" setup>
import { ref, computed, onMounted, onUnmounted, createVNode,
} from 'vue';
} from 'vue';
const modalVisible = ref(false);
const logId = ref('')
const logPath = ref('/mdm/expenseName/datalog');
import { DataLog } from '/@/components/pcitc';
import { Modal } from 'ant-design-vue';
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table';
@ -131,8 +135,9 @@
function onSelectChange(rowKeys: string[]) {
selectedKeys.value = rowKeys;
}
function handleDatalog () {
function handleDatalog (record: Recordable) {
modalVisible.value = true
logId.value = record.id
}
function dbClickRow(record) {
if (!actionButtonConfig?.value.some(element => element.code == 'view')) {

View File

@ -6,123 +6,12 @@ export const formConfig = {
};
export const searchFormSchema: FormSchema[] = [
{
field: 'code',
label: '编码',
component: 'Input',
},
{
field: 'fullName',
label: '名称',
component: 'Input',
},
{
field: 'pipelineCode',
label: '管道',
component: 'Input',
},
{
field: 'enterprise',
label: '所属企业',
component: 'Input',
},
{
field: 'contact',
label: '联系人',
component: 'Input',
},
{
field: 'tel',
label: '电话',
component: 'Input',
},
{
field: 'email',
label: '邮箱',
component: 'Input',
},
{
field: 'regionCode',
label: '行政区域',
component: 'XjrSelect',
componentProps: {
datasourceType: 'staticData',
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' },
],
labelField: 'label',
valueField: 'value',
getPopupContainer: () => document.body,
},
},
{
field: 'addr',
label: '地址',
component: 'Input',
},
{
field: 'addrMail',
label: '通讯地址',
component: 'Input',
},
{
field: 'ownSign',
label: '自有接收站上载点标识',
component: 'XjrSelect',
componentProps: {
datasourceType: 'dic',
params: { itemId: '1978056598125330433' },
labelField: 'name',
valueField: 'value',
getPopupContainer: () => document.body,
},
},
{
field: 'staCodeLng',
label: 'LNG气源地',
component: 'XjrSelect',
componentProps: {
datasourceType: 'staticData',
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' },
],
labelField: 'label',
valueField: 'value',
getPopupContainer: () => document.body,
},
},
{
field: 'ownLineSign',
label: '自有管道沿线下载点标识',
component: 'XjrSelect',
componentProps: {
datasourceType: 'api',
apiConfig: {
path: 'CodeGeneration/selection',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
},
labelField: 'label',
valueField: 'value',
getPopupContainer: () => document.body,
},
},
{
field: 'sort',
label: '显示顺序',
component: 'InputNumber',
componentProps: {
style: { width: '100%' },
},
},
{
field: 'valid',
label: '有效标识',
@ -136,11 +25,124 @@ export const searchFormSchema: FormSchema[] = [
getPopupContainer: () => document.body,
},
},
{
field: 'note',
label: '备注',
component: 'Input',
},
// {
// field: 'code',
// label: '编码',
// component: 'Input',
// },
// {
// field: 'pipelineCode',
// label: '管道',
// component: 'Input',
// },
// {
// field: 'enterprise',
// label: '所属企业',
// component: 'Input',
// },
// {
// field: 'contact',
// label: '联系人',
// component: 'Input',
// },
// {
// field: 'tel',
// label: '电话',
// component: 'Input',
// },
// {
// field: 'email',
// label: '邮箱',
// component: 'Input',
// },
// {
// field: 'regionCode',
// label: '行政区域',
// component: 'XjrSelect',
// componentProps: {
// datasourceType: 'staticData',
// 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' },
// ],
// labelField: 'label',
// valueField: 'value',
// getPopupContainer: () => document.body,
// },
// },
// {
// field: 'addr',
// label: '地址',
// component: 'Input',
// },
// {
// field: 'addrMail',
// label: '通讯地址',
// component: 'Input',
// },
// {
// field: 'ownSign',
// label: '自有接收站上载点标识',
// component: 'XjrSelect',
// componentProps: {
// datasourceType: 'dic',
// params: { itemId: '1978056598125330433' },
// labelField: 'name',
// valueField: 'value',
// getPopupContainer: () => document.body,
// },
// },
// {
// field: 'staCodeLng',
// label: 'LNG气源地',
// component: 'XjrSelect',
// componentProps: {
// datasourceType: 'staticData',
// 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' },
// ],
// labelField: 'label',
// valueField: 'value',
// getPopupContainer: () => document.body,
// },
// },
// {
// field: 'ownLineSign',
// label: '自有管道沿线下载点标识',
// component: 'XjrSelect',
// componentProps: {
// datasourceType: 'api',
// apiConfig: {
// path: 'CodeGeneration/selection',
// method: 'GET',
// apiId: '93d735dcb7364a0f8102188ec4d77ac7',
// },
// labelField: 'label',
// valueField: 'value',
// getPopupContainer: () => document.body,
// },
// },
// {
// field: 'sort',
// label: '显示顺序',
// component: 'InputNumber',
// componentProps: {
// style: { width: '100%' },
// },
// },
// {
// field: 'note',
// label: '备注',
// component: 'Input',
// },
];
export const columns: BasicColumn[] = [
@ -162,23 +164,6 @@ export const columns: BasicColumn[] = [
sorter: true,
},
{
dataIndex: 'pipelineCode',
title: '管道',
componentType: 'input',
align: 'left',
sorter: true,
},
{
dataIndex: 'enterprise',
title: '所属企业',
componentType: 'input',
align: 'left',
sorter: true,
},
{
dataIndex: 'contact',
@ -206,70 +191,7 @@ export const columns: BasicColumn[] = [
sorter: true,
},
{
dataIndex: 'addr',
title: '地址',
componentType: 'textarea',
align: 'left',
sorter: true,
},
{
dataIndex: 'addrMail',
title: '通讯地址',
componentType: 'textarea',
align: 'left',
sorter: true,
},
{
dataIndex: 'ownSign',
title: '自有接收站上载点标识',
componentType: 'select',
align: 'left',
sorter: true,
},
{
dataIndex: 'staCodeLng',
title: 'LNG气源地',
componentType: 'select',
align: 'left',
customRender: ({ record }) => {
const 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' },
];
return staticOptions.filter((x) => x.value === record.staCodeLng)[0]?.label;
},
sorter: true,
},
{
dataIndex: 'ownLineSign',
title: '自有管道沿线下载点标识',
componentType: 'select',
align: 'left',
sorter: true,
},
{
dataIndex: 'sort',
title: '显示顺序',
componentType: 'number',
align: 'left',
sorter: true,
},
{
dataIndex: 'valid',
title: '有效标识',
@ -279,32 +201,113 @@ export const columns: BasicColumn[] = [
sorter: true,
},
{
dataIndex: 'note',
title: '备注',
componentType: 'textarea',
align: 'left',
// {
// dataIndex: 'pipelineCode',
// title: '管道',
// componentType: 'input',
// align: 'left',
sorter: true,
},
// sorter: true,
// },
{
dataIndex: 'regionCode',
title: '行政区域',
componentType: 'select',
align: 'left',
// {
// dataIndex: 'enterprise',
// title: '所属企业',
// componentType: 'input',
// align: 'left',
customRender: ({ record }) => {
const 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' },
];
return staticOptions.filter((x) => x.value === record.regionCode)[0]?.label;
},
// sorter: true,
// },
sorter: true,
},
// {
// dataIndex: 'addr',
// title: '地址',
// componentType: 'textarea',
// align: 'left',
// sorter: true,
// },
// {
// dataIndex: 'addrMail',
// title: '通讯地址',
// componentType: 'textarea',
// align: 'left',
// sorter: true,
// },
// {
// dataIndex: 'ownSign',
// title: '自有接收站上载点标识',
// componentType: 'select',
// align: 'left',
// sorter: true,
// },
// {
// dataIndex: 'staCodeLng',
// title: 'LNG气源地',
// componentType: 'select',
// align: 'left',
// customRender: ({ record }) => {
// const 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' },
// ];
// return staticOptions.filter((x) => x.value === record.staCodeLng)[0]?.label;
// },
// sorter: true,
// },
// {
// dataIndex: 'ownLineSign',
// title: '自有管道沿线下载点标识',
// componentType: 'select',
// align: 'left',
// sorter: true,
// },
// {
// dataIndex: 'sort',
// title: '显示顺序',
// componentType: 'number',
// align: 'left',
// sorter: true,
// },
// {
// dataIndex: 'note',
// title: '备注',
// componentType: 'textarea',
// align: 'left',
// sorter: true,
// },
// {
// dataIndex: 'regionCode',
// title: '行政区域',
// componentType: 'select',
// align: 'left',
// customRender: ({ record }) => {
// const 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' },
// ];
// return staticOptions.filter((x) => x.value === record.regionCode)[0]?.label;
// },
// sorter: true,
// },
];
//表单事件
export const formEventConfigs = {
@ -381,7 +384,7 @@ export const formProps: FormProps = {
label: '编码',
type: 'input',
component: 'Input',
colProps: { span: 24 },
colProps: { span: 8 },
defaultValue: '',
componentProps: {
width: '100%',
@ -414,7 +417,7 @@ export const formProps: FormProps = {
label: '名称',
type: 'input',
component: 'Input',
colProps: { span: 24 },
colProps: { span: 8 },
defaultValue: '',
componentProps: {
width: '100%',
@ -447,7 +450,7 @@ export const formProps: FormProps = {
label: '管道',
type: 'input',
component: 'Input',
colProps: { span: 24 },
colProps: { span: 8 },
defaultValue: '',
componentProps: {
width: '100%',
@ -480,7 +483,7 @@ export const formProps: FormProps = {
label: '所属企业',
type: 'input',
component: 'Input',
colProps: { span: 24 },
colProps: { span: 8 },
defaultValue: '',
componentProps: {
width: '100%',
@ -513,7 +516,7 @@ export const formProps: FormProps = {
label: '联系人',
type: 'input',
component: 'Input',
colProps: { span: 24 },
colProps: { span: 8 },
defaultValue: '',
componentProps: {
width: '100%',
@ -546,7 +549,7 @@ export const formProps: FormProps = {
label: '电话',
type: 'input',
component: 'Input',
colProps: { span: 24 },
colProps: { span: 8 },
defaultValue: '',
componentProps: {
width: '100%',
@ -579,7 +582,7 @@ export const formProps: FormProps = {
label: '邮箱',
type: 'input',
component: 'Input',
colProps: { span: 24 },
colProps: { span: 8 },
defaultValue: '',
componentProps: {
width: '100%',
@ -612,7 +615,7 @@ export const formProps: FormProps = {
label: '行政区域',
type: 'select',
component: 'XjrSelect',
colProps: { span: 24 },
colProps: { span: 8 },
componentProps: {
width: '100%',
span: '',
@ -632,7 +635,7 @@ export const formProps: FormProps = {
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
defaultSelect: 'Option 1',
defaultSelect: '',
datasourceType: 'staticData',
labelField: 'label',
valueField: 'value',
@ -666,7 +669,7 @@ export const formProps: FormProps = {
responsive: false,
respNewRow: true,
placeholder: '请输入地址',
rows: 4,
rows: 1,
autoSize: false,
showCount: false,
disabled: false,
@ -696,7 +699,7 @@ export const formProps: FormProps = {
responsive: false,
respNewRow: true,
placeholder: '请输入通讯地址',
rows: 4,
rows:1,
autoSize: false,
showCount: false,
disabled: false,
@ -715,7 +718,7 @@ export const formProps: FormProps = {
label: '自有接收站上载点标识',
type: 'select',
component: 'XjrSelect',
colProps: { span: 24 },
colProps: { span: 8 },
componentProps: {
width: '100%',
span: '',
@ -759,7 +762,7 @@ export const formProps: FormProps = {
label: 'LNG气源地',
type: 'select',
component: 'XjrSelect',
colProps: { span: 24 },
colProps: { span: 8 },
componentProps: {
width: '100%',
span: '',
@ -779,7 +782,7 @@ export const formProps: FormProps = {
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
defaultSelect: 'Option 1',
defaultSelect: '',
datasourceType: 'staticData',
labelField: 'label',
valueField: 'value',
@ -802,7 +805,7 @@ export const formProps: FormProps = {
label: '自有管道沿线下载点标识',
type: 'select',
component: 'XjrSelect',
colProps: { span: 24 },
colProps: { span: 8 },
componentProps: {
width: '100%',
span: '',
@ -845,7 +848,7 @@ export const formProps: FormProps = {
label: '显示顺序',
type: 'number',
component: 'InputNumber',
colProps: { span: 24 },
colProps: { span: 8 },
defaultValue: 0,
componentProps: {
labelWidthMode: 'fix',
@ -872,7 +875,7 @@ export const formProps: FormProps = {
label: '有效标识',
type: 'select',
component: 'XjrSelect',
colProps: { span: 24 },
colProps: { span: 8 },
componentProps: {
width: '100%',
span: '',
@ -944,7 +947,7 @@ export const formProps: FormProps = {
],
showActionButtonGroup: false,
buttonLocation: 'center',
actionColOptions: { span: 24 },
actionColOptions: { span: 8 },
showResetButton: false,
showSubmitButton: false,
hiddenComponent: [],

View File

@ -63,7 +63,7 @@
const filterColumns = cloneDeep(filterColumnAuth(columns));
const customConfigColums =ref(filterColumns);
const customSearchFormSchema =ref(searchFormSchema);
const selectedKeys = ref<string[]>([]);
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}]);

View File

@ -24,54 +24,54 @@ export const searchFormSchema: FormSchema[] = [
getPopupContainer: () => document.body,
},
},
{
field: 'code',
label: '编码',
component: 'Input',
},
{
field: 'ownSign',
label: '自有管道标识',
component: 'XjrSelect',
componentProps: {
datasourceType: 'dic',
params: { itemId: '1978056598125330433' },
labelField: 'name',
valueField: 'value',
// {
// field: 'code',
// label: '编码',
// component: 'Input',
// },
// {
// field: 'ownSign',
// label: '自有管道标识',
// component: 'XjrSelect',
// componentProps: {
// datasourceType: 'dic',
// params: { itemId: '1978056598125330433' },
// labelField: 'name',
// valueField: 'value',
getPopupContainer: () => document.body,
},
},
{
field: 'staCodeLng',
label: '自有接收站',
component: 'XjrSelect',
componentProps: {
datasourceType: 'staticData',
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' },
],
labelField: 'label',
valueField: 'value',
// getPopupContainer: () => document.body,
// },
// },
// {
// field: 'staCodeLng',
// label: '自有接收站',
// component: 'XjrSelect',
// componentProps: {
// datasourceType: 'staticData',
// 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' },
// ],
// labelField: 'label',
// valueField: 'value',
getPopupContainer: () => document.body,
},
},
{
field: 'sort',
label: '显示顺序',
component: 'InputNumber',
componentProps: {
style: { width: '100%' },
},
},
{
field: 'note',
label: '备注',
component: 'Input',
},
// getPopupContainer: () => document.body,
// },
// },
// {
// field: 'sort',
// label: '显示顺序',
// component: 'InputNumber',
// componentProps: {
// style: { width: '100%' },
// },
// },
// {
// field: 'note',
// label: '备注',
// component: 'Input',
// },
];
export const columns: BasicColumn[] = [
@ -138,14 +138,14 @@ export const columns: BasicColumn[] = [
sorter: true,
},
{
dataIndex: 'sort',
title: '显示顺序',
componentType: 'number',
align: 'left',
// {
// dataIndex: 'sort',
// title: '显示顺序',
// componentType: 'number',
// align: 'left',
sorter: true,
},
// sorter: true,
// },
];
//表单事件
export const formEventConfigs = {
@ -222,7 +222,7 @@ export const formProps: FormProps = {
label: '编码',
type: 'input',
component: 'Input',
colProps: { span: 24 },
colProps: { span: 8 },
defaultValue: '',
componentProps: {
width: '100%',
@ -255,7 +255,7 @@ export const formProps: FormProps = {
label: '名称',
type: 'input',
component: 'Input',
colProps: { span: 24 },
colProps: { span: 8 },
defaultValue: '',
componentProps: {
width: '100%',
@ -288,7 +288,7 @@ export const formProps: FormProps = {
label: '自有管道标识',
type: 'select',
component: 'XjrSelect',
colProps: { span: 24 },
colProps: { span: 8 },
componentProps: {
width: '100%',
span: '',
@ -332,7 +332,7 @@ export const formProps: FormProps = {
label: '自有接收站',
type: 'select',
component: 'XjrSelect',
colProps: { span: 24 },
colProps: { span: 8 },
componentProps: {
width: '100%',
span: '',
@ -375,7 +375,7 @@ export const formProps: FormProps = {
label: '显示顺序',
type: 'number',
component: 'InputNumber',
colProps: { span: 24 },
colProps: { span: 8 },
defaultValue: 0,
componentProps: {
labelWidthMode: 'fix',
@ -402,7 +402,7 @@ export const formProps: FormProps = {
label: '有效标志',
type: 'select',
component: 'XjrSelect',
colProps: { span: 24 },
colProps: { span: 8 },
componentProps: {
width: '100%',
span: '',
@ -474,8 +474,8 @@ export const formProps: FormProps = {
],
showActionButtonGroup: false,
buttonLocation: 'center',
actionColOptions: { span: 24 },
actionColOptions: { span: 8 },
showResetButton: false,
showSubmitButton: false,
hiddenComponent: [],
};
};

View File

@ -63,7 +63,7 @@
const filterColumns = cloneDeep(filterColumnAuth(columns));
const customConfigColums =ref(filterColumns);
const customSearchFormSchema =ref(searchFormSchema);
const selectedKeys = ref<string[]>([]);
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}]);

View File

@ -21,13 +21,17 @@
</template>
</BasicTable>
<TaxRateModal @register="registerModal" @success="handleSuccess" />
<DataLog :logId="logId" :logPath="logPath" v-model:visible="modalVisible"/>
</PageWrapper>
</template>
<script lang="ts" setup>
import { ref, computed, onMounted, onUnmounted, createVNode,
} from 'vue';
} from 'vue';
const modalVisible = ref(false);
const logId = ref('')
const logPath = ref('/mdm/TaxRate/datalog');
import { DataLog } from '/@/components/pcitc';
import { Modal } from 'ant-design-vue';
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table';
@ -130,8 +134,9 @@
function onSelectChange(rowKeys: string[]) {
selectedKeys.value = rowKeys;
}
function handleDatalog () {
function handleDatalog (record: Recordable) {
modalVisible.value = true
logId.value = record.id
}
function dbClickRow(record) {
if (!actionButtonConfig?.value.some(element => element.code == 'view')) {