fix: BUG修改
This commit is contained in:
parent
7d6da6cafc
commit
ee44870604
@ -450,5 +450,5 @@ export const annexFileSave = (params: any) => {
|
|||||||
// 待办清单
|
// 待办清单
|
||||||
// 查询是否有待办事项
|
// 查询是否有待办事项
|
||||||
export const noFinishApi = (params: any) => {
|
export const noFinishApi = (params: any) => {
|
||||||
return http.get(BASEURL + `/xmgl/systemUser/getToDoItems`, params);
|
return http.post(BASEURL + `/xmgl/systemUser/getToDoItems`, params);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -67,7 +67,7 @@
|
|||||||
<!-- other 循环递归 -->
|
<!-- other 循环递归 -->
|
||||||
<TableColumn v-if="!item.type && item.prop && item.isShow" :column="item">
|
<TableColumn v-if="!item.type && item.prop && item.isShow" :column="item">
|
||||||
<template v-for="slot in Object.keys($slots)" #[slot]="scope">
|
<template v-for="slot in Object.keys($slots)" #[slot]="scope">
|
||||||
<slot :name="slot" :row="scope.row"></slot>
|
<slot :name="slot" :row="scope.row" :index="scope.$index"></slot>
|
||||||
</template>
|
</template>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -10,8 +10,11 @@
|
|||||||
:tool-button="false"
|
:tool-button="false"
|
||||||
:pagination="true"
|
:pagination="true"
|
||||||
background
|
background
|
||||||
:isShowSearch="false"
|
:isShowSearch="true"
|
||||||
>
|
>
|
||||||
|
<template #numIndex="{ row, index }">
|
||||||
|
{{ index + 1 + (responseData.pageNo - 1) * responseData.pageSize }}
|
||||||
|
</template>
|
||||||
<template #state="{ row }">
|
<template #state="{ row }">
|
||||||
{{ row.state === 3 ? "已逾期" : "待处理" }}
|
{{ row.state === 3 ? "已逾期" : "待处理" }}
|
||||||
</template>
|
</template>
|
||||||
@ -37,6 +40,7 @@ import { sendIframeMessage } from "@/utils/util";
|
|||||||
const globalStore = GlobalStore();
|
const globalStore = GlobalStore();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const responseData = ref();
|
||||||
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
||||||
const proTable = ref();
|
const proTable = ref();
|
||||||
|
|
||||||
@ -60,10 +64,31 @@ const handleDealItem = (obj: any) => {
|
|||||||
|
|
||||||
// 表格配置项
|
// 表格配置项
|
||||||
const columns: ColumnProps[] = [
|
const columns: ColumnProps[] = [
|
||||||
{ type: "index", label: "序号", width: 100 },
|
{ prop: "numIndex", label: "序号", width: 100 },
|
||||||
{ prop: "type", label: "待办事项", width: 220 },
|
{ prop: "type", label: "待办事项", width: 220 },
|
||||||
{ prop: "projectName", label: "项目名称" },
|
{ prop: "projectName", label: "项目名称", search: { el: "input" } },
|
||||||
{ prop: "state", label: "状态", width: 120 },
|
{
|
||||||
|
prop: "state",
|
||||||
|
label: "状态",
|
||||||
|
search: { el: "select" },
|
||||||
|
enum: [
|
||||||
|
{ label: "已逾期", value: 3 },
|
||||||
|
{ label: "待处理", value: 1 }
|
||||||
|
],
|
||||||
|
width: 120
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "flag",
|
||||||
|
label: "类型",
|
||||||
|
isShow: false,
|
||||||
|
search: { el: "select" },
|
||||||
|
enum: [
|
||||||
|
{ label: "质量管理", value: 1 },
|
||||||
|
{ label: "安全管理", value: 2 },
|
||||||
|
{ label: "进度管理", value: 3 }
|
||||||
|
],
|
||||||
|
width: 120
|
||||||
|
},
|
||||||
{ prop: "operation", label: "操作", width: 120 }
|
{ prop: "operation", label: "操作", width: 120 }
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -76,24 +101,26 @@ const initParam = reactive({
|
|||||||
// 或者直接去 hooks/useTable.ts 文件中把字段改为你后端对应的就行
|
// 或者直接去 hooks/useTable.ts 文件中把字段改为你后端对应的就行
|
||||||
const dataCallback = (data: any) => {
|
const dataCallback = (data: any) => {
|
||||||
// console.log(data);
|
// console.log(data);
|
||||||
return {
|
responseData.value = {
|
||||||
list: data.records,
|
list: data.records,
|
||||||
total: Number(data.total),
|
total: Number(data.total),
|
||||||
pageNo: Number(data.current),
|
pageNo: Number(data.current),
|
||||||
pageSize: Number(data.size)
|
pageSize: Number(data.size)
|
||||||
};
|
};
|
||||||
|
return responseData.value;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 如果你想在请求之前对当前请求参数做一些操作,可以自定义如下函数:params 为当前所有的请求参数(包括分页),最后返回请求列表接口
|
// 如果你想在请求之前对当前请求参数做一些操作,可以自定义如下函数:params 为当前所有的请求参数(包括分页),最后返回请求列表接口
|
||||||
// 默认不做操作就直接在 ProTable 组件上绑定 :requestApi="getUserList"
|
// 默认不做操作就直接在 ProTable 组件上绑定 :requestApi="getUserList"
|
||||||
const getTableList = async (params: any) => {
|
const getTableList = async (params: any) => {
|
||||||
let newParams = JSON.parse(JSON.stringify(params));
|
let newParams = JSON.parse(JSON.stringify(params));
|
||||||
const res: any = await noFinishApi({});
|
// const res: any = await noFinishApi({});
|
||||||
if (res && res.data && res.data.length > 0) {
|
// if (res && res.data && res.data.length > 0) {
|
||||||
return { result: { records: res.data, current: "1", pages: "1", size: "100", total: res.data.length + "" } };
|
// return { result: { records: res.data, current: "1", pages: "1", size: "100", total: res.data.length + "" } };
|
||||||
} else {
|
// } else {
|
||||||
return { result: { records: [], current: "1", pages: "1", size: "100", total: "0" } };
|
// return { result: { records: [], current: "1", pages: "1", size: "100", total: "0" } };
|
||||||
}
|
// }
|
||||||
|
return noFinishApi(newParams);
|
||||||
};
|
};
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await sendIframeMessage({ obj: { path: route.path } }, 2, undefined);
|
await sendIframeMessage({ obj: { path: route.path } }, 2, undefined);
|
||||||
@ -110,10 +137,4 @@ onMounted(async () => {
|
|||||||
height: 700px;
|
height: 700px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
:deep() {
|
|
||||||
.theme-transform,
|
|
||||||
.el-pagination {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user