重新生成region
This commit is contained in:
@ -42,42 +42,7 @@ export interface LngBRegionPageModel {
|
||||
createUserId: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: LngBRegion表类型
|
||||
*/
|
||||
export interface LngBRegionModel {
|
||||
id: number;
|
||||
|
||||
code: string;
|
||||
|
||||
fullName: string;
|
||||
|
||||
regionTypeCode: string;
|
||||
|
||||
pid: number;
|
||||
|
||||
fullPath: string;
|
||||
|
||||
valid: string;
|
||||
|
||||
note: string;
|
||||
|
||||
createUserId: number;
|
||||
|
||||
createDate: string;
|
||||
|
||||
modifyUserId: number;
|
||||
|
||||
modifyDate: string;
|
||||
|
||||
deleteMark: number;
|
||||
|
||||
tenantId: number;
|
||||
|
||||
deptId: number;
|
||||
|
||||
ruleUserId: number;
|
||||
}
|
||||
0;
|
||||
|
||||
/**
|
||||
* @description: LngBRegion分页返回值结构
|
||||
|
||||
@ -41,10 +41,12 @@
|
||||
</PageWrapper>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, computed, onMounted, onUnmounted,
|
||||
import { ref, computed, onMounted, onUnmounted, createVNode,
|
||||
|
||||
} from 'vue';
|
||||
|
||||
import { Modal } from 'ant-design-vue';
|
||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table';
|
||||
import { getLngBRegionPage, deleteLngBRegion} from '/@/api/mdm/CountryRegion';
|
||||
import { PageWrapper } from '/@/components/Page';
|
||||
@ -78,7 +80,7 @@
|
||||
|
||||
const tableRef = ref();
|
||||
//所有按钮
|
||||
const buttons = ref([{"isUse":true,"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"type":"primary"}]);
|
||||
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":"refresh","icon":"ant-design:reload-outlined","isDefault":true},{"isUse":true,"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true},{"isUse":true,"name":"启用","code":"enable","icon":"ant-design:check-circle-outlined","isDefault":false},{"isUse":true,"name":"停用","code":"stop","icon":"ant-design:stop-outlined","isDefault":false},{"isUse":true,"name":"批量启用","code":"batchenable","icon":"ant-design:check-circle-outlined","isDefault":false},{"isUse":true,"name":"批量停用","code":"batchstop","icon":"ant-design:stop-outlined","isDefault":false},{"isUse":true,"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true}]);
|
||||
//展示在列表内的按钮
|
||||
const actionButtons = ref<string[]>(['view', 'edit', 'copyData', 'delete', 'startwork','flowRecord']);
|
||||
const buttonConfigs = computed(()=>{
|
||||
@ -93,7 +95,7 @@
|
||||
return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code));
|
||||
});
|
||||
|
||||
const btnEvent = {add : handleAdd,}
|
||||
const btnEvent = {add : handleAdd,edit : handleEdit,refresh : handleRefresh,view : handleView,delete : handleDelete,}
|
||||
|
||||
const { currentRoute } = useRouter();
|
||||
const router = useRouter();
|
||||
@ -199,10 +201,54 @@
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function handleEdit(record: Recordable) {
|
||||
|
||||
router.push({
|
||||
path: '/form/CountryRegion/' + record.id + '/updateForm',
|
||||
query: {
|
||||
formPath: 'mdm/CountryRegion',
|
||||
formName: formName,
|
||||
formId:currentRoute.value.meta.formId
|
||||
}
|
||||
});
|
||||
}
|
||||
function handleDelete(record: Recordable) {
|
||||
deleteList([record.id]);
|
||||
}
|
||||
|
||||
function deleteList(ids) {
|
||||
Modal.confirm({
|
||||
title: '提示信息',
|
||||
icon: createVNode(ExclamationCircleOutlined),
|
||||
content: '是否确认删除?',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk() {
|
||||
deleteLngBRegion(ids).then((_) => {
|
||||
handleSuccess();
|
||||
notification.success({
|
||||
message: 'Tip',
|
||||
description: t('删除成功!'),
|
||||
});
|
||||
});
|
||||
},
|
||||
onCancel() {},
|
||||
});
|
||||
}
|
||||
function handleRefresh() {
|
||||
reload();
|
||||
}
|
||||
function handleSuccess() {
|
||||
|
||||
reload();
|
||||
}
|
||||
|
||||
function handleView(record: Recordable) {
|
||||
|
||||
dbClickRow(record);
|
||||
|
||||
}
|
||||
function handleSelect(selectIds) {
|
||||
selectId.value = selectIds[0];
|
||||
reload({ searchInfo: { id: selectIds[0] } });
|
||||
|
||||
Reference in New Issue
Block a user