系统菜单部分功能及planToAdd文件中的config.ts文件修改

This commit is contained in:
duyufeng
2024-08-15 10:51:58 +08:00
parent 94e5079222
commit ee565449ab
931 changed files with 12966 additions and 17 deletions

View File

@@ -46,7 +46,7 @@
<slot name="header" v-bind="data || {}"></slot>
</template>
</ns-table-header>
<ns-basic-table ref="tableElRef" v-bind="getTableBindValues" :dataSource="tableData">
<ns-basic-table ref="tableElRef" v-bind="getTableBindValues" :dataSource="tableData" :row-selection="rowSelection">
<template #emptyText>
<template v-if="tableState.loadError">
<div class="ns-table-content">
@@ -204,6 +204,7 @@
import { useTableSession } from '/nerv-lib/component/table/use-table-session';
import { useTableColumn } from '/nerv-lib/component/table/use-table-column';
import { useNavigate } from '/nerv-lib/use/use-navigate';
import { object } from 'vue-types';
export default defineComponent({
name: 'NsTable',
components: {
@@ -356,7 +357,7 @@
}
const tableChangeEvent = (pagination: Props, filters: [], sorter: any) => {
console.log('params', pagination, filters, sorter);
if (sorter?.field) {
if (sorter.order) {
orderRef.value = {
@@ -480,11 +481,19 @@
pageSize || getPagination.value?.pageSize || props.defaultPageSize,
};
} else {
pageParams = {
[props.paramsPageField]: defaultPageRef.value, // 后端0 开始
[props.paramsPageSizeField]:
pageSize || getPagination.value?.pageSize || props.defaultPageSize,
};
//判断是否是系统菜单页面过来是的话修改分页总数dyfadd
if(props.tableTitle=='系统菜单'){
pageParams = {};
// [props.paramsPageField]: defaultPageRef.value, // 后端0 开始
// [props.paramsPageSizeField]:999,
}else{
pageParams = {
[props.paramsPageField]: defaultPageRef.value, // 后端0 开始
[props.paramsPageSizeField]:
pageSize || getPagination.value?.pageSize || props.defaultPageSize,
};
}
}
const httpParams = {
...getTableBindValues.value.params,
@@ -497,7 +506,6 @@
console.log('check fail');
return;
}
setTableSession(pageParams[props.paramsPageField]);
clearDelay && setLoading(true);
@@ -514,7 +522,9 @@
tableState.loadError = false;
tableState.loadErrorMessage = '';
dataRef.value = res;
tableData.value = get(unref(dataRef), props.listField);
//saas项目配置
if (attrs['getPageParams']) {
const getPageParams = attrs['getPageParams'];
@@ -536,8 +546,6 @@
if (err?.includes('Network Error')) {
errMessage = '网络异常,请检查您的网络连接是否正常!';
}
// console.log(getPagination.value);
tableState.loadError = true;
tableState.loadErrorMessage = errMessage;
clearDelay && setLoading(false);
@@ -609,6 +617,7 @@
//todo 异步加载|| 树形接口
function reload(clearDelay = true) {
console.log("tiaogewu数个12345")
const pagination = unref(getPagination);
fetch(
{