diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 41bc72f..667379c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1443,10 +1443,6 @@ engines: {node: '>=8'} dev: true - /async-validator/4.2.5: - resolution: {integrity: sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg==} - dev: false - /async/2.6.4: resolution: {integrity: sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==} dependencies: diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 41bc72f..667379c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1443,10 +1443,6 @@ engines: {node: '>=8'} dev: true - /async-validator/4.2.5: - resolution: {integrity: sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg==} - dev: false - /async/2.6.4: resolution: {integrity: sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==} dependencies: diff --git a/src/api/system/plan.ts b/src/api/system/plan.ts index c63aef2..8b448cd 100644 --- a/src/api/system/plan.ts +++ b/src/api/system/plan.ts @@ -41,7 +41,7 @@ // 培训计划更新 export function getListUpdate(data: object) { return request({ - url: `${prefix}/train/log/update`, + url: `${prefix}/train/plan/update`, method: 'post', data, }) @@ -54,3 +54,39 @@ data, }) } + +// 培训记录列表 +export function getLogList(data: object) { + return request({ + url: `${prefix}/train/log/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 列表编号查询 +export function getPlanIdList(data: object) { + return request({ + url: `${prefix}/train/plan/list`, + method: 'post', + data, + }) +} + +// 培训记录新建 +export function getListLogAdd(data: object) { + return request({ + url: `${prefix}/train/log/add`, + method: 'post', + data, + }) +} + +// 培训记录详情 +export function getListLogDetail(data: object) { + return request({ + url: `${prefix}/train/log/detail`, + method: 'post', + data, + }) +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 41bc72f..667379c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1443,10 +1443,6 @@ engines: {node: '>=8'} dev: true - /async-validator/4.2.5: - resolution: {integrity: sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg==} - dev: false - /async/2.6.4: resolution: {integrity: sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==} dependencies: diff --git a/src/api/system/plan.ts b/src/api/system/plan.ts index c63aef2..8b448cd 100644 --- a/src/api/system/plan.ts +++ b/src/api/system/plan.ts @@ -41,7 +41,7 @@ // 培训计划更新 export function getListUpdate(data: object) { return request({ - url: `${prefix}/train/log/update`, + url: `${prefix}/train/plan/update`, method: 'post', data, }) @@ -54,3 +54,39 @@ data, }) } + +// 培训记录列表 +export function getLogList(data: object) { + return request({ + url: `${prefix}/train/log/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 列表编号查询 +export function getPlanIdList(data: object) { + return request({ + url: `${prefix}/train/plan/list`, + method: 'post', + data, + }) +} + +// 培训记录新建 +export function getListLogAdd(data: object) { + return request({ + url: `${prefix}/train/log/add`, + method: 'post', + data, + }) +} + +// 培训记录详情 +export function getListLogDetail(data: object) { + return request({ + url: `${prefix}/train/log/detail`, + method: 'post', + data, + }) +} diff --git a/src/components.d.ts b/src/components.d.ts index a832874..d959c68 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -15,7 +15,6 @@ AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] - copy: typeof import('./components/workFlow/nodeWrap copy.vue')['default'] CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 41bc72f..667379c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1443,10 +1443,6 @@ engines: {node: '>=8'} dev: true - /async-validator/4.2.5: - resolution: {integrity: sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg==} - dev: false - /async/2.6.4: resolution: {integrity: sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==} dependencies: diff --git a/src/api/system/plan.ts b/src/api/system/plan.ts index c63aef2..8b448cd 100644 --- a/src/api/system/plan.ts +++ b/src/api/system/plan.ts @@ -41,7 +41,7 @@ // 培训计划更新 export function getListUpdate(data: object) { return request({ - url: `${prefix}/train/log/update`, + url: `${prefix}/train/plan/update`, method: 'post', data, }) @@ -54,3 +54,39 @@ data, }) } + +// 培训记录列表 +export function getLogList(data: object) { + return request({ + url: `${prefix}/train/log/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 列表编号查询 +export function getPlanIdList(data: object) { + return request({ + url: `${prefix}/train/plan/list`, + method: 'post', + data, + }) +} + +// 培训记录新建 +export function getListLogAdd(data: object) { + return request({ + url: `${prefix}/train/log/add`, + method: 'post', + data, + }) +} + +// 培训记录详情 +export function getListLogDetail(data: object) { + return request({ + url: `${prefix}/train/log/detail`, + method: 'post', + data, + }) +} diff --git a/src/components.d.ts b/src/components.d.ts index a832874..d959c68 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -15,7 +15,6 @@ AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] - copy: typeof import('./components/workFlow/nodeWrap copy.vue')['default'] CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] diff --git a/src/views/measure/source/list.vue b/src/views/measure/source/list.vue index 6c88385..136f0a8 100644 --- a/src/views/measure/source/list.vue +++ b/src/views/measure/source/list.vue @@ -2,7 +2,6 @@ import { reactive, ref } from 'vue' import type { Ref } from 'vue' import { ElLoading, ElMessage } from 'element-plus' -import { Delete } from '@element-plus/icons-vue' import type { IlistQuery, IlistType } from './list_interface' import ListSourceAdd from './listAdd.vue' import { getSoucreList, getSoucreListDelete } from '@/api/system/source' @@ -65,21 +64,6 @@ }, ]) -// 表格loding -const listLoading = ref(false) -const fetchData = (isNowPage: boolean) => { - listLoading.value = true - if (!isNowPage) { - // 是否显示当前页,否则跳转第一页 - listQuery.value.offset = 1 - } - getSoucreList(listQuery.value).then((response) => { - list.value = response.data.rows - total.value = parseInt(response.data.total) - listLoading.value = false - }) -} -fetchData(true) // 选中的内容 const checkoutList = ref([]) // 文件上传input @@ -91,6 +75,20 @@ const isPopconfirmShow = ref(false) // 点击按钮 const buttonType = ref('') +const loadingTable = ref(false) +const fetchData = (isNowPage: boolean) => { + loadingTable.value = true + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + listQuery.value.offset = 1 + } + getSoucreList(listQuery.value).then((response) => { + list.value = response.data.rows + total.value = parseInt(response.data.total) + loadingTable.value = false + }) +} +fetchData(true) // 多选发生改变时 const handleSelectionChange = (e: any) => { checkoutList.value = e @@ -106,16 +104,6 @@ isPopconfirmShow.value = true deleteId.value = row.id } -// 分页 -const handleSizeChange = (val: number) => { - listQuery.value.limit = val - fetchData(true) -} -// 分页 -const handleCurrentChange = (val: number) => { - listQuery.value.offset = val - fetchData(true) -} // 点击搜索 const searchList = () => { fetchData(true) @@ -192,6 +180,16 @@ ElMessage.error('请上传pdf格式') } } +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + listQuery.value.limit = val.size + } + if (val && val.page) { + listQuery.value.offset = val.page + } + fetchData(true) +} const upload = () => { fileRef.value.click() } @@ -232,7 +230,8 @@
- - - - - - - - - + + - =8'} dev: true - /async-validator/4.2.5: - resolution: {integrity: sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg==} - dev: false - /async/2.6.4: resolution: {integrity: sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==} dependencies: diff --git a/src/api/system/plan.ts b/src/api/system/plan.ts index c63aef2..8b448cd 100644 --- a/src/api/system/plan.ts +++ b/src/api/system/plan.ts @@ -41,7 +41,7 @@ // 培训计划更新 export function getListUpdate(data: object) { return request({ - url: `${prefix}/train/log/update`, + url: `${prefix}/train/plan/update`, method: 'post', data, }) @@ -54,3 +54,39 @@ data, }) } + +// 培训记录列表 +export function getLogList(data: object) { + return request({ + url: `${prefix}/train/log/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 列表编号查询 +export function getPlanIdList(data: object) { + return request({ + url: `${prefix}/train/plan/list`, + method: 'post', + data, + }) +} + +// 培训记录新建 +export function getListLogAdd(data: object) { + return request({ + url: `${prefix}/train/log/add`, + method: 'post', + data, + }) +} + +// 培训记录详情 +export function getListLogDetail(data: object) { + return request({ + url: `${prefix}/train/log/detail`, + method: 'post', + data, + }) +} diff --git a/src/components.d.ts b/src/components.d.ts index a832874..d959c68 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -15,7 +15,6 @@ AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] - copy: typeof import('./components/workFlow/nodeWrap copy.vue')['default'] CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] diff --git a/src/views/measure/source/list.vue b/src/views/measure/source/list.vue index 6c88385..136f0a8 100644 --- a/src/views/measure/source/list.vue +++ b/src/views/measure/source/list.vue @@ -2,7 +2,6 @@ import { reactive, ref } from 'vue' import type { Ref } from 'vue' import { ElLoading, ElMessage } from 'element-plus' -import { Delete } from '@element-plus/icons-vue' import type { IlistQuery, IlistType } from './list_interface' import ListSourceAdd from './listAdd.vue' import { getSoucreList, getSoucreListDelete } from '@/api/system/source' @@ -65,21 +64,6 @@ }, ]) -// 表格loding -const listLoading = ref(false) -const fetchData = (isNowPage: boolean) => { - listLoading.value = true - if (!isNowPage) { - // 是否显示当前页,否则跳转第一页 - listQuery.value.offset = 1 - } - getSoucreList(listQuery.value).then((response) => { - list.value = response.data.rows - total.value = parseInt(response.data.total) - listLoading.value = false - }) -} -fetchData(true) // 选中的内容 const checkoutList = ref([]) // 文件上传input @@ -91,6 +75,20 @@ const isPopconfirmShow = ref(false) // 点击按钮 const buttonType = ref('') +const loadingTable = ref(false) +const fetchData = (isNowPage: boolean) => { + loadingTable.value = true + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + listQuery.value.offset = 1 + } + getSoucreList(listQuery.value).then((response) => { + list.value = response.data.rows + total.value = parseInt(response.data.total) + loadingTable.value = false + }) +} +fetchData(true) // 多选发生改变时 const handleSelectionChange = (e: any) => { checkoutList.value = e @@ -106,16 +104,6 @@ isPopconfirmShow.value = true deleteId.value = row.id } -// 分页 -const handleSizeChange = (val: number) => { - listQuery.value.limit = val - fetchData(true) -} -// 分页 -const handleCurrentChange = (val: number) => { - listQuery.value.offset = val - fetchData(true) -} // 点击搜索 const searchList = () => { fetchData(true) @@ -192,6 +180,16 @@ ElMessage.error('请上传pdf格式') } } +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + listQuery.value.limit = val.size + } + if (val && val.page) { + listQuery.value.offset = val.page + } + fetchData(true) +} const upload = () => { fileRef.value.click() } @@ -232,7 +230,8 @@
- - - - - - - - - + + - import type { Ref } from 'vue' import { reactive, ref } from 'vue' -import { Delete } from '@element-plus/icons-vue' import { ElLoading, ElMessage } from 'element-plus' import type { IlistQuery, IlistType } from './plan_interface' import PlanAdd from './planAdd.vue' @@ -25,7 +24,11 @@ const show = ref(true) const infoId = ref('') const buttonType = ref('') +// 主管部门下拉框 +const options = ref([]) +const loadingTable = ref(false) const fetchData = (isNowPage: boolean) => { + loadingTable.value = true if (!isNowPage) { // 是否显示当前页,否则跳转第一页 listQuery.value.offset = 1 @@ -33,11 +36,11 @@ getPlanList(listQuery.value).then((response) => { list.value = response.data.rows total.value = parseInt(response.data.total) + loadingTable.value = false }) } fetchData(true) -// 主管部门下拉框 -const options = ref([]) + // 表头 const columns = ref([ { @@ -53,14 +56,17 @@ { text: '培训对象', value: 'trainPerson', + width: '120', }, { text: '培训人数', value: 'trainNumber', + width: '120', }, { text: '培训学时', value: 'trainHour', + width: '120', }, { text: '培训时间', @@ -75,10 +81,12 @@ { text: '实施单位', value: 'effectiveCompany', + width: '120', }, { text: '培训内容', value: 'trainContent', + width: '120', }, { text: '创建时间', @@ -88,6 +96,7 @@ { text: '备注', value: 'remark', + width: '120', }, ]) // 搜索 @@ -116,7 +125,7 @@ if (checkoutList.value.length <= 0) { exportExcel({ json: list.value.map((item: IlistType, index: number) => ({ index: index + 1, planNo: item.planNo, planName: item.planName, trainPerson: item.trainPerson, trainNumber: item.trainNumber, trainHour: item.trainHour, trainTime: item.trainTime, deptName: item.deptName, effectiveCompany: item.effectiveCompany, director: item.director, trainContent: item.trainContent, createTime: item.createTime, remark: item.remark })), - name: '培训计划', + name: '培训记录', titleArr: ['序号', '培训计划编号', '培训名称', '培训对象', '培训人数', '培训学时', '培训时间', '主管部门', '实施单位', '负责人', '培训内容', '创建时间', '备注'], sheetName: 'sheet1', }) @@ -124,7 +133,7 @@ else { exportExcel({ json: checkoutList.value.map((item: IlistType, index: number) => ({ index: index + 1, planNo: item.planNo, planName: item.planName, trainPerson: item.trainPerson, trainNumber: item.trainNumber, trainHour: item.trainHour, trainTime: item.trainTime, deptName: item.deptName, effectiveCompany: item.effectiveCompany, director: item.director, trainContent: item.trainContent, createTime: item.createTime, remark: item.remark })), - name: '培训计划', + name: '培训记录', titleArr: ['序号', '培训计划编号', '培训名称', '培训对象', '培训人数', '培训学时', '培训时间', '主管部门', '实施单位', '负责人', '培训内容', '创建时间', '备注'], sheetName: 'sheet1', }) @@ -137,6 +146,7 @@ fetchData(true) } const handleEdit = (index: string, row: object, type: string) => { + console.log(row) infoId.value = row.id buttonType.value = type show.value = false @@ -148,18 +158,9 @@ } const handelClick = (text: string) => {} const handleSelectionChange = (e: any) => { + console.log(e, '666') checkoutList.value = e } -// 分页 -const handleSizeChange = (val: number) => { - listQuery.value.limit = val - fetchData(true) -} -// 分页 -const handleCurrentChange = (val: number) => { - listQuery.value.offset = val - fetchData(true) -} const add = () => { infoId.value = '' buttonType.value = '新建' @@ -188,6 +189,16 @@ } }) } +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + listQuery.value.limit = val.size + } + if (val && val.page) { + listQuery.value.offset = val.page + } + fetchData(true) +} // 打印 const printObj = ref({ id: 'print', // 需要打印元素的id @@ -220,7 +231,7 @@