diff --git a/src/api/business/subpackage/approval.ts b/src/api/business/subpackage/approval.ts index 045b7d0..74d177b 100644 --- a/src/api/business/subpackage/approval.ts +++ b/src/api/business/subpackage/approval.ts @@ -12,3 +12,40 @@ data, }) } + +// 审批详情 +// export function detail(data: object) { +// return request({ +// url: '/business/outsourcer/approval/operate/delete', +// method: 'post', +// data, +// }) +// } + +// 审批删除 +export function approvalDel(data: object) { + return request({ + url: '/business/outsourcer/approval/operate/delete', + method: 'post', + data, + }) +} + +// 保存 +export function save(data: object) { + return request({ + url: '/business/outsourcer/save', + method: 'post', + data, + }) +} + +// 提交 +export function submit(data: object) { + return request({ + url: '/business/outsourcer/submit', + method: 'post', + data, + }) +} + diff --git a/src/api/business/subpackage/approval.ts b/src/api/business/subpackage/approval.ts index 045b7d0..74d177b 100644 --- a/src/api/business/subpackage/approval.ts +++ b/src/api/business/subpackage/approval.ts @@ -12,3 +12,40 @@ data, }) } + +// 审批详情 +// export function detail(data: object) { +// return request({ +// url: '/business/outsourcer/approval/operate/delete', +// method: 'post', +// data, +// }) +// } + +// 审批删除 +export function approvalDel(data: object) { + return request({ + url: '/business/outsourcer/approval/operate/delete', + method: 'post', + data, + }) +} + +// 保存 +export function save(data: object) { + return request({ + url: '/business/outsourcer/save', + method: 'post', + data, + }) +} + +// 提交 +export function submit(data: object) { + return request({ + url: '/business/outsourcer/submit', + method: 'post', + data, + }) +} + diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts new file mode 100644 index 0000000..44d7b3a --- /dev/null +++ b/src/api/business/subpackage/certificate.ts @@ -0,0 +1,4 @@ +/** + * 分包方证书管理 + */ +// import request from '../../index' diff --git a/src/api/business/subpackage/approval.ts b/src/api/business/subpackage/approval.ts index 045b7d0..74d177b 100644 --- a/src/api/business/subpackage/approval.ts +++ b/src/api/business/subpackage/approval.ts @@ -12,3 +12,40 @@ data, }) } + +// 审批详情 +// export function detail(data: object) { +// return request({ +// url: '/business/outsourcer/approval/operate/delete', +// method: 'post', +// data, +// }) +// } + +// 审批删除 +export function approvalDel(data: object) { + return request({ + url: '/business/outsourcer/approval/operate/delete', + method: 'post', + data, + }) +} + +// 保存 +export function save(data: object) { + return request({ + url: '/business/outsourcer/save', + method: 'post', + data, + }) +} + +// 提交 +export function submit(data: object) { + return request({ + url: '/business/outsourcer/submit', + method: 'post', + data, + }) +} + diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts new file mode 100644 index 0000000..44d7b3a --- /dev/null +++ b/src/api/business/subpackage/certificate.ts @@ -0,0 +1,4 @@ +/** + * 分包方证书管理 + */ +// import request from '../../index' diff --git a/src/api/business/subpackage/record.ts b/src/api/business/subpackage/record.ts index f7d3acb..9420480 100644 --- a/src/api/business/subpackage/record.ts +++ b/src/api/business/subpackage/record.ts @@ -12,3 +12,67 @@ data, }) } + +// 批量删除 +export function batchDel(data: object) { + return request({ + url: '/business/outsourcer/batchDelete', + method: 'post', + data, + }) +} + +// 草稿箱删除 +export function outsourcerDel(data: object) { + return request({ + url: '/business/outsourcer/delete', + method: 'post', + data, + }) +} + +// 档案详情 +export function detail(data: object) { + return request({ + url: '/business/outsourcer/detail', + method: 'post', + data, + }) +} + +// 档案编辑 +export function draftUpdate(data: object) { + return request({ + url: '/business/outsourcer/draftUpdate', + method: 'post', + data, + }) +} + +// 档案编辑驳回后编辑 +export function failUpdate(data: object) { + return request({ + url: '/business/outsourcer/failUpdate', + method: 'post', + data, + }) +} + +// 列表详情 +export function rowDetail(data: object) { + return request({ + url: '/business/outsourcer/list', + method: 'post', + data, + }) +} + +// 档案导出 +export function listExport(data: object) { + return request({ + url: '/business/outsourcer/listExport', + method: 'post', + data, + }) +} + diff --git a/src/api/business/subpackage/approval.ts b/src/api/business/subpackage/approval.ts index 045b7d0..74d177b 100644 --- a/src/api/business/subpackage/approval.ts +++ b/src/api/business/subpackage/approval.ts @@ -12,3 +12,40 @@ data, }) } + +// 审批详情 +// export function detail(data: object) { +// return request({ +// url: '/business/outsourcer/approval/operate/delete', +// method: 'post', +// data, +// }) +// } + +// 审批删除 +export function approvalDel(data: object) { + return request({ + url: '/business/outsourcer/approval/operate/delete', + method: 'post', + data, + }) +} + +// 保存 +export function save(data: object) { + return request({ + url: '/business/outsourcer/save', + method: 'post', + data, + }) +} + +// 提交 +export function submit(data: object) { + return request({ + url: '/business/outsourcer/submit', + method: 'post', + data, + }) +} + diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts new file mode 100644 index 0000000..44d7b3a --- /dev/null +++ b/src/api/business/subpackage/certificate.ts @@ -0,0 +1,4 @@ +/** + * 分包方证书管理 + */ +// import request from '../../index' diff --git a/src/api/business/subpackage/record.ts b/src/api/business/subpackage/record.ts index f7d3acb..9420480 100644 --- a/src/api/business/subpackage/record.ts +++ b/src/api/business/subpackage/record.ts @@ -12,3 +12,67 @@ data, }) } + +// 批量删除 +export function batchDel(data: object) { + return request({ + url: '/business/outsourcer/batchDelete', + method: 'post', + data, + }) +} + +// 草稿箱删除 +export function outsourcerDel(data: object) { + return request({ + url: '/business/outsourcer/delete', + method: 'post', + data, + }) +} + +// 档案详情 +export function detail(data: object) { + return request({ + url: '/business/outsourcer/detail', + method: 'post', + data, + }) +} + +// 档案编辑 +export function draftUpdate(data: object) { + return request({ + url: '/business/outsourcer/draftUpdate', + method: 'post', + data, + }) +} + +// 档案编辑驳回后编辑 +export function failUpdate(data: object) { + return request({ + url: '/business/outsourcer/failUpdate', + method: 'post', + data, + }) +} + +// 列表详情 +export function rowDetail(data: object) { + return request({ + url: '/business/outsourcer/list', + method: 'post', + data, + }) +} + +// 档案导出 +export function listExport(data: object) { + return request({ + url: '/business/outsourcer/listExport', + method: 'post', + data, + }) +} + diff --git a/src/api/index.ts b/src/api/index.ts index 9521010..7591ed2 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -3,7 +3,6 @@ import { ElMessage } from 'element-plus' import router from '@/router/index' import useUserStore from '@/store/modules/user' - // 错误码枚举 enum responseCode { success = 200, // 成功 @@ -62,9 +61,16 @@ else if (response.data.code !== responseCode.success) { if (response.data.code === responseCode.noPermission) { // token失效状态跳转到登录页 toLogin() + if (useUserStore().isLogout === 0) { + ElMessage.error(response.data.message || '发生错误') + } + useUserStore().toLogout() } - // 这里做错误提示 - ElMessage.error(response.data.message || '发生错误') + else { + // 这里做错误提 + ElMessage.error(response.data.message || '发生错误') + } + return Promise.reject(response.data) } else { // 成功 diff --git a/src/api/business/subpackage/approval.ts b/src/api/business/subpackage/approval.ts index 045b7d0..74d177b 100644 --- a/src/api/business/subpackage/approval.ts +++ b/src/api/business/subpackage/approval.ts @@ -12,3 +12,40 @@ data, }) } + +// 审批详情 +// export function detail(data: object) { +// return request({ +// url: '/business/outsourcer/approval/operate/delete', +// method: 'post', +// data, +// }) +// } + +// 审批删除 +export function approvalDel(data: object) { + return request({ + url: '/business/outsourcer/approval/operate/delete', + method: 'post', + data, + }) +} + +// 保存 +export function save(data: object) { + return request({ + url: '/business/outsourcer/save', + method: 'post', + data, + }) +} + +// 提交 +export function submit(data: object) { + return request({ + url: '/business/outsourcer/submit', + method: 'post', + data, + }) +} + diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts new file mode 100644 index 0000000..44d7b3a --- /dev/null +++ b/src/api/business/subpackage/certificate.ts @@ -0,0 +1,4 @@ +/** + * 分包方证书管理 + */ +// import request from '../../index' diff --git a/src/api/business/subpackage/record.ts b/src/api/business/subpackage/record.ts index f7d3acb..9420480 100644 --- a/src/api/business/subpackage/record.ts +++ b/src/api/business/subpackage/record.ts @@ -12,3 +12,67 @@ data, }) } + +// 批量删除 +export function batchDel(data: object) { + return request({ + url: '/business/outsourcer/batchDelete', + method: 'post', + data, + }) +} + +// 草稿箱删除 +export function outsourcerDel(data: object) { + return request({ + url: '/business/outsourcer/delete', + method: 'post', + data, + }) +} + +// 档案详情 +export function detail(data: object) { + return request({ + url: '/business/outsourcer/detail', + method: 'post', + data, + }) +} + +// 档案编辑 +export function draftUpdate(data: object) { + return request({ + url: '/business/outsourcer/draftUpdate', + method: 'post', + data, + }) +} + +// 档案编辑驳回后编辑 +export function failUpdate(data: object) { + return request({ + url: '/business/outsourcer/failUpdate', + method: 'post', + data, + }) +} + +// 列表详情 +export function rowDetail(data: object) { + return request({ + url: '/business/outsourcer/list', + method: 'post', + data, + }) +} + +// 档案导出 +export function listExport(data: object) { + return request({ + url: '/business/outsourcer/listExport', + method: 'post', + data, + }) +} + diff --git a/src/api/index.ts b/src/api/index.ts index 9521010..7591ed2 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -3,7 +3,6 @@ import { ElMessage } from 'element-plus' import router from '@/router/index' import useUserStore from '@/store/modules/user' - // 错误码枚举 enum responseCode { success = 200, // 成功 @@ -62,9 +61,16 @@ else if (response.data.code !== responseCode.success) { if (response.data.code === responseCode.noPermission) { // token失效状态跳转到登录页 toLogin() + if (useUserStore().isLogout === 0) { + ElMessage.error(response.data.message || '发生错误') + } + useUserStore().toLogout() } - // 这里做错误提示 - ElMessage.error(response.data.message || '发生错误') + else { + // 这里做错误提 + ElMessage.error(response.data.message || '发生错误') + } + return Promise.reject(response.data) } else { // 成功 diff --git a/src/api/system/tool.ts b/src/api/system/tool.ts index 7b61c3f..2cafc4a 100644 --- a/src/api/system/tool.ts +++ b/src/api/system/tool.ts @@ -132,3 +132,44 @@ method: 'get', }) } +// 文件配置管理列表 +export function getFileListPage(data: listParamsType) { + return request({ + url: `/download/center/listPage?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +// 删除文件配置 +export function deleteFileListPage(data: object) { + return request({ + url: '/download/center/delete', + method: 'post', + data, + }) +} +// 编辑文件配置 +export function updateFileListPage(data: object) { + return request({ + url: '/download/center/update', + method: 'post', + data, + }) +} +// 新增文件配置 +export function addeFileListPage(data: object) { + return request({ + url: '/download/center/add', + method: 'post', + data, + }) +} +// 导出 +export function exportFileListPage(data: object) { + return request({ + url: '/download/center/listExport', + method: 'post', + data, + responseType: 'blob', + }) +} diff --git a/src/api/business/subpackage/approval.ts b/src/api/business/subpackage/approval.ts index 045b7d0..74d177b 100644 --- a/src/api/business/subpackage/approval.ts +++ b/src/api/business/subpackage/approval.ts @@ -12,3 +12,40 @@ data, }) } + +// 审批详情 +// export function detail(data: object) { +// return request({ +// url: '/business/outsourcer/approval/operate/delete', +// method: 'post', +// data, +// }) +// } + +// 审批删除 +export function approvalDel(data: object) { + return request({ + url: '/business/outsourcer/approval/operate/delete', + method: 'post', + data, + }) +} + +// 保存 +export function save(data: object) { + return request({ + url: '/business/outsourcer/save', + method: 'post', + data, + }) +} + +// 提交 +export function submit(data: object) { + return request({ + url: '/business/outsourcer/submit', + method: 'post', + data, + }) +} + diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts new file mode 100644 index 0000000..44d7b3a --- /dev/null +++ b/src/api/business/subpackage/certificate.ts @@ -0,0 +1,4 @@ +/** + * 分包方证书管理 + */ +// import request from '../../index' diff --git a/src/api/business/subpackage/record.ts b/src/api/business/subpackage/record.ts index f7d3acb..9420480 100644 --- a/src/api/business/subpackage/record.ts +++ b/src/api/business/subpackage/record.ts @@ -12,3 +12,67 @@ data, }) } + +// 批量删除 +export function batchDel(data: object) { + return request({ + url: '/business/outsourcer/batchDelete', + method: 'post', + data, + }) +} + +// 草稿箱删除 +export function outsourcerDel(data: object) { + return request({ + url: '/business/outsourcer/delete', + method: 'post', + data, + }) +} + +// 档案详情 +export function detail(data: object) { + return request({ + url: '/business/outsourcer/detail', + method: 'post', + data, + }) +} + +// 档案编辑 +export function draftUpdate(data: object) { + return request({ + url: '/business/outsourcer/draftUpdate', + method: 'post', + data, + }) +} + +// 档案编辑驳回后编辑 +export function failUpdate(data: object) { + return request({ + url: '/business/outsourcer/failUpdate', + method: 'post', + data, + }) +} + +// 列表详情 +export function rowDetail(data: object) { + return request({ + url: '/business/outsourcer/list', + method: 'post', + data, + }) +} + +// 档案导出 +export function listExport(data: object) { + return request({ + url: '/business/outsourcer/listExport', + method: 'post', + data, + }) +} + diff --git a/src/api/index.ts b/src/api/index.ts index 9521010..7591ed2 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -3,7 +3,6 @@ import { ElMessage } from 'element-plus' import router from '@/router/index' import useUserStore from '@/store/modules/user' - // 错误码枚举 enum responseCode { success = 200, // 成功 @@ -62,9 +61,16 @@ else if (response.data.code !== responseCode.success) { if (response.data.code === responseCode.noPermission) { // token失效状态跳转到登录页 toLogin() + if (useUserStore().isLogout === 0) { + ElMessage.error(response.data.message || '发生错误') + } + useUserStore().toLogout() } - // 这里做错误提示 - ElMessage.error(response.data.message || '发生错误') + else { + // 这里做错误提 + ElMessage.error(response.data.message || '发生错误') + } + return Promise.reject(response.data) } else { // 成功 diff --git a/src/api/system/tool.ts b/src/api/system/tool.ts index 7b61c3f..2cafc4a 100644 --- a/src/api/system/tool.ts +++ b/src/api/system/tool.ts @@ -132,3 +132,44 @@ method: 'get', }) } +// 文件配置管理列表 +export function getFileListPage(data: listParamsType) { + return request({ + url: `/download/center/listPage?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +// 删除文件配置 +export function deleteFileListPage(data: object) { + return request({ + url: '/download/center/delete', + method: 'post', + data, + }) +} +// 编辑文件配置 +export function updateFileListPage(data: object) { + return request({ + url: '/download/center/update', + method: 'post', + data, + }) +} +// 新增文件配置 +export function addeFileListPage(data: object) { + return request({ + url: '/download/center/add', + method: 'post', + data, + }) +} +// 导出 +export function exportFileListPage(data: object) { + return request({ + url: '/download/center/listExport', + method: 'post', + data, + responseType: 'blob', + }) +} diff --git a/src/layouts/components/Tools/index.vue b/src/layouts/components/Tools/index.vue index cd62c8b..13377a4 100644 --- a/src/layouts/components/Tools/index.vue +++ b/src/layouts/components/Tools/index.vue @@ -5,12 +5,14 @@ import eventBus from '@/utils/eventBus' import useSettingsStore from '@/store/modules/settings' import useUserStore from '@/store/modules/user' - +import useWebsocketStore from '@/store/modules/websocket' const router = useRouter() const settingsStore = useSettingsStore() const userStore = useUserStore() +const websocket = useWebsocketStore() + const mainPage = useMainPage() const { isFullscreen, toggle } = useFullscreen() @@ -60,6 +62,10 @@ function pro() { window.open('https://hooray.gitee.io/fantastic-admin-pro-example/', 'top') } +onMounted(() => { + // 连接 websocket + websocket.initWebSocket() +}) diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue index 7097ea2..ada0f7b 100644 --- a/src/views/business/subpackage/certificate/list.vue +++ b/src/views/business/subpackage/certificate/list.vue @@ -1,11 +1,169 @@ diff --git a/src/api/business/subpackage/approval.ts b/src/api/business/subpackage/approval.ts index 045b7d0..74d177b 100644 --- a/src/api/business/subpackage/approval.ts +++ b/src/api/business/subpackage/approval.ts @@ -12,3 +12,40 @@ data, }) } + +// 审批详情 +// export function detail(data: object) { +// return request({ +// url: '/business/outsourcer/approval/operate/delete', +// method: 'post', +// data, +// }) +// } + +// 审批删除 +export function approvalDel(data: object) { + return request({ + url: '/business/outsourcer/approval/operate/delete', + method: 'post', + data, + }) +} + +// 保存 +export function save(data: object) { + return request({ + url: '/business/outsourcer/save', + method: 'post', + data, + }) +} + +// 提交 +export function submit(data: object) { + return request({ + url: '/business/outsourcer/submit', + method: 'post', + data, + }) +} + diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts new file mode 100644 index 0000000..44d7b3a --- /dev/null +++ b/src/api/business/subpackage/certificate.ts @@ -0,0 +1,4 @@ +/** + * 分包方证书管理 + */ +// import request from '../../index' diff --git a/src/api/business/subpackage/record.ts b/src/api/business/subpackage/record.ts index f7d3acb..9420480 100644 --- a/src/api/business/subpackage/record.ts +++ b/src/api/business/subpackage/record.ts @@ -12,3 +12,67 @@ data, }) } + +// 批量删除 +export function batchDel(data: object) { + return request({ + url: '/business/outsourcer/batchDelete', + method: 'post', + data, + }) +} + +// 草稿箱删除 +export function outsourcerDel(data: object) { + return request({ + url: '/business/outsourcer/delete', + method: 'post', + data, + }) +} + +// 档案详情 +export function detail(data: object) { + return request({ + url: '/business/outsourcer/detail', + method: 'post', + data, + }) +} + +// 档案编辑 +export function draftUpdate(data: object) { + return request({ + url: '/business/outsourcer/draftUpdate', + method: 'post', + data, + }) +} + +// 档案编辑驳回后编辑 +export function failUpdate(data: object) { + return request({ + url: '/business/outsourcer/failUpdate', + method: 'post', + data, + }) +} + +// 列表详情 +export function rowDetail(data: object) { + return request({ + url: '/business/outsourcer/list', + method: 'post', + data, + }) +} + +// 档案导出 +export function listExport(data: object) { + return request({ + url: '/business/outsourcer/listExport', + method: 'post', + data, + }) +} + diff --git a/src/api/index.ts b/src/api/index.ts index 9521010..7591ed2 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -3,7 +3,6 @@ import { ElMessage } from 'element-plus' import router from '@/router/index' import useUserStore from '@/store/modules/user' - // 错误码枚举 enum responseCode { success = 200, // 成功 @@ -62,9 +61,16 @@ else if (response.data.code !== responseCode.success) { if (response.data.code === responseCode.noPermission) { // token失效状态跳转到登录页 toLogin() + if (useUserStore().isLogout === 0) { + ElMessage.error(response.data.message || '发生错误') + } + useUserStore().toLogout() } - // 这里做错误提示 - ElMessage.error(response.data.message || '发生错误') + else { + // 这里做错误提 + ElMessage.error(response.data.message || '发生错误') + } + return Promise.reject(response.data) } else { // 成功 diff --git a/src/api/system/tool.ts b/src/api/system/tool.ts index 7b61c3f..2cafc4a 100644 --- a/src/api/system/tool.ts +++ b/src/api/system/tool.ts @@ -132,3 +132,44 @@ method: 'get', }) } +// 文件配置管理列表 +export function getFileListPage(data: listParamsType) { + return request({ + url: `/download/center/listPage?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +// 删除文件配置 +export function deleteFileListPage(data: object) { + return request({ + url: '/download/center/delete', + method: 'post', + data, + }) +} +// 编辑文件配置 +export function updateFileListPage(data: object) { + return request({ + url: '/download/center/update', + method: 'post', + data, + }) +} +// 新增文件配置 +export function addeFileListPage(data: object) { + return request({ + url: '/download/center/add', + method: 'post', + data, + }) +} +// 导出 +export function exportFileListPage(data: object) { + return request({ + url: '/download/center/listExport', + method: 'post', + data, + responseType: 'blob', + }) +} diff --git a/src/layouts/components/Tools/index.vue b/src/layouts/components/Tools/index.vue index cd62c8b..13377a4 100644 --- a/src/layouts/components/Tools/index.vue +++ b/src/layouts/components/Tools/index.vue @@ -5,12 +5,14 @@ import eventBus from '@/utils/eventBus' import useSettingsStore from '@/store/modules/settings' import useUserStore from '@/store/modules/user' - +import useWebsocketStore from '@/store/modules/websocket' const router = useRouter() const settingsStore = useSettingsStore() const userStore = useUserStore() +const websocket = useWebsocketStore() + const mainPage = useMainPage() const { isFullscreen, toggle } = useFullscreen() @@ -60,6 +62,10 @@ function pro() { window.open('https://hooray.gitee.io/fantastic-admin-pro-example/', 'top') } +onMounted(() => { + // 连接 websocket + websocket.initWebSocket() +}) diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue index dac9cd2..6755ede 100644 --- a/src/views/business/subpackage/approve/list.vue +++ b/src/views/business/subpackage/approve/list.vue @@ -3,7 +3,7 @@ import type { Ref } from 'vue' import { ElLoading, ElMessage } from 'element-plus' import type { DateModelType } from 'element-plus' -import type { IListQueryApprove } from '../subpackage-interface' +import type { IApproveList, IListQueryApprove } from '../subpackage-interface' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' import type { TableColumn } from '@/components/NormalTable/table_interface' @@ -11,20 +11,22 @@ import type { dictType } from '@/views/device/receive/receive' import type { IMenu } from '@/components/buttonBox/buttonBox' import ButtonBox from '@/components/buttonBox/buttonBox.vue' -import { getListPage } from '@/api/business/subpackage/approval' - +import { detail, getListPage } from '@/api/business/subpackage/approval' +import { SCHEDULE } from '@/utils/scheduleDict' const $router = useRouter() const { proxy } = getCurrentInstance() as any const TabActiveButton = 'SubpackageApproveActive' +const loadingTable = ref(false) +const menu = ref([]) // 审批状态按钮组合 +const active = ref('') const timeRange = ref<[DateModelType, DateModelType]>(['', '']) - // 查询条件 const listQuery: Ref = ref({ applicantEndTime: '', // 开始时间 applicantName: '', // 申请人名称 applicantStartTime: '', // 结束时间 - approvalStatus: '', // 申请状态 - formId: '', // 表单id + approvalStatus: active.value, // 申请状态, // 申请状态 + formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id outsourcerName: '', // 分包方名称 projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 @@ -35,21 +37,19 @@ offset: 1, limit: 20, }) -const loadingTable = ref(false) -const menu = ref([]) // 审批状态按钮组合 -const active = ref('') + // 表头 const columns = ref([ - { text: '分包项目编号', value: 'interchangeCode', align: 'center', width: '160px' }, - { text: '公司名称', value: 'customerNo', align: 'center', width: '160px' }, - { text: '公司规模', value: 'customerName', align: 'center', width: '160px' }, + { text: '分包项目编号', value: 'outsourcerNo', align: 'center', width: '160px' }, + { text: '公司名称', value: 'outsourcerName', align: 'center', width: '160px' }, + { text: '公司规模', value: 'outsourcerSize', align: 'center', width: '160px' }, { text: '业务规模', value: 'reciever', align: 'center', width: '180px' }, - { text: '履约评级', value: 'deliverer', align: 'center', width: '180px' }, - { text: '整体评价', value: 'deliverTime', align: 'center', width: '180px' }, + { text: '履约评级', value: 'grade', align: 'center', width: '180px' }, + { text: '整体评价', value: 'businessSizeName', align: 'center', width: '180px' }, { text: '业务内容', value: 'deliverTime', align: 'center', width: '180px' }, - { text: '公司地址', value: 'deliverTime', align: 'center', width: '180px' }, - { text: '创建时间', value: 'deliverTime', align: 'center', width: '180px' }, - { text: '审批状态', value: 'deliverTime', align: 'center', width: '180px' }, + { text: '公司地址', value: 'fullAddress', align: 'center', width: '180px' }, + { text: '创建时间', value: 'createTime', align: 'center', width: '180px' }, + { text: '审批状态', value: 'approvalStatusName', align: 'center', width: '180px' }, ]) const list = ref([]) const total = ref(0) @@ -77,12 +77,12 @@ loadingTable.value = false getListPage(listQuery.value).then((response) => { list.value = response.data.rows - let interfaceStr = '' - for (const key in response.data.rows[0]) { - const item = response.data.rows[0][key] - interfaceStr += `${key}:${typeof (item)}\n` - } - console.log(interfaceStr) + // let interfaceStr = '' + // for (const key in response.data.rows[0]) { + // const item = response.data.rows[0][key] + // interfaceStr += `${key}:${typeof (item)}\n` + // } + // console.log(interfaceStr) total.value = parseInt(response.data.total) loadingTable.value = false }) @@ -94,8 +94,8 @@ applicantEndTime: '', // 开始时间 applicantName: '', // 申请人名称 applicantStartTime: '', // 结束时间 - approvalStatus: '', // 申请状态 - formId: '', // 表单id + approvalStatus: active.value, // 申请状态, // 申请状态 + formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id outsourcerName: '', // 分包方名称 projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 @@ -135,13 +135,14 @@ } // 详情或者编辑 -const handleEdit = (row, status) => { - +const handleEdit = (row: IApproveList, status: string) => { + // if (status !== 'edit') { + // detail({ id: row.id }).then((res) => { + // console.log(res) + // }) + // } } -// 取消 -const handleCancle = (row) => { -} // 获取字典值 const getDict = async () => { // 审批状态 @@ -168,7 +169,7 @@ onMounted(async () => { await getDict() - if (window.sessionStorage.getItem(TabActiveButton) !== 'undefined' && window.sessionStorage.getItem(TabActiveButton) !== '' && window.sessionStorage.getItem(TabActiveButton) !== null) { + if (window.sessionStorage.getItem(TabActiveButton)) { active.value = window.sessionStorage.getItem(TabActiveButton)! } else { @@ -224,9 +225,6 @@ 详情 - - 取消 - diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue index 7097ea2..ada0f7b 100644 --- a/src/views/business/subpackage/certificate/list.vue +++ b/src/views/business/subpackage/certificate/list.vue @@ -1,11 +1,169 @@ diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue index 74beb9a..16c1f13 100644 --- a/src/views/business/subpackage/check/list.vue +++ b/src/views/business/subpackage/check/list.vue @@ -12,7 +12,7 @@ import type { IMenu } from '@/components/buttonBox/buttonBox' import { SCHEDULE } from '@/utils/scheduleDict' import ButtonBox from '@/components/buttonBox/buttonBox.vue' -import { getListPage } from '@/api/business/subpackage/check' +import { detail, getListPage } from '@/api/business/subpackage/check' const $router = useRouter() const { proxy } = getCurrentInstance() as any @@ -126,7 +126,11 @@ } // 详情或者编辑 const handleEdit = (row: IApplyList, status: string) => { - + if (status !== 'edit') { + detail({ id: row.id }).then((res) => { + console.log(res) + }) + } } // 取消 const handleCancle = (row: IApplyList) => { @@ -226,9 +230,6 @@ 详情 - - 取消 - diff --git a/src/api/business/subpackage/approval.ts b/src/api/business/subpackage/approval.ts index 045b7d0..74d177b 100644 --- a/src/api/business/subpackage/approval.ts +++ b/src/api/business/subpackage/approval.ts @@ -12,3 +12,40 @@ data, }) } + +// 审批详情 +// export function detail(data: object) { +// return request({ +// url: '/business/outsourcer/approval/operate/delete', +// method: 'post', +// data, +// }) +// } + +// 审批删除 +export function approvalDel(data: object) { + return request({ + url: '/business/outsourcer/approval/operate/delete', + method: 'post', + data, + }) +} + +// 保存 +export function save(data: object) { + return request({ + url: '/business/outsourcer/save', + method: 'post', + data, + }) +} + +// 提交 +export function submit(data: object) { + return request({ + url: '/business/outsourcer/submit', + method: 'post', + data, + }) +} + diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts new file mode 100644 index 0000000..44d7b3a --- /dev/null +++ b/src/api/business/subpackage/certificate.ts @@ -0,0 +1,4 @@ +/** + * 分包方证书管理 + */ +// import request from '../../index' diff --git a/src/api/business/subpackage/record.ts b/src/api/business/subpackage/record.ts index f7d3acb..9420480 100644 --- a/src/api/business/subpackage/record.ts +++ b/src/api/business/subpackage/record.ts @@ -12,3 +12,67 @@ data, }) } + +// 批量删除 +export function batchDel(data: object) { + return request({ + url: '/business/outsourcer/batchDelete', + method: 'post', + data, + }) +} + +// 草稿箱删除 +export function outsourcerDel(data: object) { + return request({ + url: '/business/outsourcer/delete', + method: 'post', + data, + }) +} + +// 档案详情 +export function detail(data: object) { + return request({ + url: '/business/outsourcer/detail', + method: 'post', + data, + }) +} + +// 档案编辑 +export function draftUpdate(data: object) { + return request({ + url: '/business/outsourcer/draftUpdate', + method: 'post', + data, + }) +} + +// 档案编辑驳回后编辑 +export function failUpdate(data: object) { + return request({ + url: '/business/outsourcer/failUpdate', + method: 'post', + data, + }) +} + +// 列表详情 +export function rowDetail(data: object) { + return request({ + url: '/business/outsourcer/list', + method: 'post', + data, + }) +} + +// 档案导出 +export function listExport(data: object) { + return request({ + url: '/business/outsourcer/listExport', + method: 'post', + data, + }) +} + diff --git a/src/api/index.ts b/src/api/index.ts index 9521010..7591ed2 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -3,7 +3,6 @@ import { ElMessage } from 'element-plus' import router from '@/router/index' import useUserStore from '@/store/modules/user' - // 错误码枚举 enum responseCode { success = 200, // 成功 @@ -62,9 +61,16 @@ else if (response.data.code !== responseCode.success) { if (response.data.code === responseCode.noPermission) { // token失效状态跳转到登录页 toLogin() + if (useUserStore().isLogout === 0) { + ElMessage.error(response.data.message || '发生错误') + } + useUserStore().toLogout() } - // 这里做错误提示 - ElMessage.error(response.data.message || '发生错误') + else { + // 这里做错误提 + ElMessage.error(response.data.message || '发生错误') + } + return Promise.reject(response.data) } else { // 成功 diff --git a/src/api/system/tool.ts b/src/api/system/tool.ts index 7b61c3f..2cafc4a 100644 --- a/src/api/system/tool.ts +++ b/src/api/system/tool.ts @@ -132,3 +132,44 @@ method: 'get', }) } +// 文件配置管理列表 +export function getFileListPage(data: listParamsType) { + return request({ + url: `/download/center/listPage?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +// 删除文件配置 +export function deleteFileListPage(data: object) { + return request({ + url: '/download/center/delete', + method: 'post', + data, + }) +} +// 编辑文件配置 +export function updateFileListPage(data: object) { + return request({ + url: '/download/center/update', + method: 'post', + data, + }) +} +// 新增文件配置 +export function addeFileListPage(data: object) { + return request({ + url: '/download/center/add', + method: 'post', + data, + }) +} +// 导出 +export function exportFileListPage(data: object) { + return request({ + url: '/download/center/listExport', + method: 'post', + data, + responseType: 'blob', + }) +} diff --git a/src/layouts/components/Tools/index.vue b/src/layouts/components/Tools/index.vue index cd62c8b..13377a4 100644 --- a/src/layouts/components/Tools/index.vue +++ b/src/layouts/components/Tools/index.vue @@ -5,12 +5,14 @@ import eventBus from '@/utils/eventBus' import useSettingsStore from '@/store/modules/settings' import useUserStore from '@/store/modules/user' - +import useWebsocketStore from '@/store/modules/websocket' const router = useRouter() const settingsStore = useSettingsStore() const userStore = useUserStore() +const websocket = useWebsocketStore() + const mainPage = useMainPage() const { isFullscreen, toggle } = useFullscreen() @@ -60,6 +62,10 @@ function pro() { window.open('https://hooray.gitee.io/fantastic-admin-pro-example/', 'top') } +onMounted(() => { + // 连接 websocket + websocket.initWebSocket() +}) diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue index dac9cd2..6755ede 100644 --- a/src/views/business/subpackage/approve/list.vue +++ b/src/views/business/subpackage/approve/list.vue @@ -3,7 +3,7 @@ import type { Ref } from 'vue' import { ElLoading, ElMessage } from 'element-plus' import type { DateModelType } from 'element-plus' -import type { IListQueryApprove } from '../subpackage-interface' +import type { IApproveList, IListQueryApprove } from '../subpackage-interface' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' import type { TableColumn } from '@/components/NormalTable/table_interface' @@ -11,20 +11,22 @@ import type { dictType } from '@/views/device/receive/receive' import type { IMenu } from '@/components/buttonBox/buttonBox' import ButtonBox from '@/components/buttonBox/buttonBox.vue' -import { getListPage } from '@/api/business/subpackage/approval' - +import { detail, getListPage } from '@/api/business/subpackage/approval' +import { SCHEDULE } from '@/utils/scheduleDict' const $router = useRouter() const { proxy } = getCurrentInstance() as any const TabActiveButton = 'SubpackageApproveActive' +const loadingTable = ref(false) +const menu = ref([]) // 审批状态按钮组合 +const active = ref('') const timeRange = ref<[DateModelType, DateModelType]>(['', '']) - // 查询条件 const listQuery: Ref = ref({ applicantEndTime: '', // 开始时间 applicantName: '', // 申请人名称 applicantStartTime: '', // 结束时间 - approvalStatus: '', // 申请状态 - formId: '', // 表单id + approvalStatus: active.value, // 申请状态, // 申请状态 + formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id outsourcerName: '', // 分包方名称 projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 @@ -35,21 +37,19 @@ offset: 1, limit: 20, }) -const loadingTable = ref(false) -const menu = ref([]) // 审批状态按钮组合 -const active = ref('') + // 表头 const columns = ref([ - { text: '分包项目编号', value: 'interchangeCode', align: 'center', width: '160px' }, - { text: '公司名称', value: 'customerNo', align: 'center', width: '160px' }, - { text: '公司规模', value: 'customerName', align: 'center', width: '160px' }, + { text: '分包项目编号', value: 'outsourcerNo', align: 'center', width: '160px' }, + { text: '公司名称', value: 'outsourcerName', align: 'center', width: '160px' }, + { text: '公司规模', value: 'outsourcerSize', align: 'center', width: '160px' }, { text: '业务规模', value: 'reciever', align: 'center', width: '180px' }, - { text: '履约评级', value: 'deliverer', align: 'center', width: '180px' }, - { text: '整体评价', value: 'deliverTime', align: 'center', width: '180px' }, + { text: '履约评级', value: 'grade', align: 'center', width: '180px' }, + { text: '整体评价', value: 'businessSizeName', align: 'center', width: '180px' }, { text: '业务内容', value: 'deliverTime', align: 'center', width: '180px' }, - { text: '公司地址', value: 'deliverTime', align: 'center', width: '180px' }, - { text: '创建时间', value: 'deliverTime', align: 'center', width: '180px' }, - { text: '审批状态', value: 'deliverTime', align: 'center', width: '180px' }, + { text: '公司地址', value: 'fullAddress', align: 'center', width: '180px' }, + { text: '创建时间', value: 'createTime', align: 'center', width: '180px' }, + { text: '审批状态', value: 'approvalStatusName', align: 'center', width: '180px' }, ]) const list = ref([]) const total = ref(0) @@ -77,12 +77,12 @@ loadingTable.value = false getListPage(listQuery.value).then((response) => { list.value = response.data.rows - let interfaceStr = '' - for (const key in response.data.rows[0]) { - const item = response.data.rows[0][key] - interfaceStr += `${key}:${typeof (item)}\n` - } - console.log(interfaceStr) + // let interfaceStr = '' + // for (const key in response.data.rows[0]) { + // const item = response.data.rows[0][key] + // interfaceStr += `${key}:${typeof (item)}\n` + // } + // console.log(interfaceStr) total.value = parseInt(response.data.total) loadingTable.value = false }) @@ -94,8 +94,8 @@ applicantEndTime: '', // 开始时间 applicantName: '', // 申请人名称 applicantStartTime: '', // 结束时间 - approvalStatus: '', // 申请状态 - formId: '', // 表单id + approvalStatus: active.value, // 申请状态, // 申请状态 + formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id outsourcerName: '', // 分包方名称 projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 @@ -135,13 +135,14 @@ } // 详情或者编辑 -const handleEdit = (row, status) => { - +const handleEdit = (row: IApproveList, status: string) => { + // if (status !== 'edit') { + // detail({ id: row.id }).then((res) => { + // console.log(res) + // }) + // } } -// 取消 -const handleCancle = (row) => { -} // 获取字典值 const getDict = async () => { // 审批状态 @@ -168,7 +169,7 @@ onMounted(async () => { await getDict() - if (window.sessionStorage.getItem(TabActiveButton) !== 'undefined' && window.sessionStorage.getItem(TabActiveButton) !== '' && window.sessionStorage.getItem(TabActiveButton) !== null) { + if (window.sessionStorage.getItem(TabActiveButton)) { active.value = window.sessionStorage.getItem(TabActiveButton)! } else { @@ -224,9 +225,6 @@ 详情 - - 取消 - diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue index 7097ea2..ada0f7b 100644 --- a/src/views/business/subpackage/certificate/list.vue +++ b/src/views/business/subpackage/certificate/list.vue @@ -1,11 +1,169 @@ diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue index 74beb9a..16c1f13 100644 --- a/src/views/business/subpackage/check/list.vue +++ b/src/views/business/subpackage/check/list.vue @@ -12,7 +12,7 @@ import type { IMenu } from '@/components/buttonBox/buttonBox' import { SCHEDULE } from '@/utils/scheduleDict' import ButtonBox from '@/components/buttonBox/buttonBox.vue' -import { getListPage } from '@/api/business/subpackage/check' +import { detail, getListPage } from '@/api/business/subpackage/check' const $router = useRouter() const { proxy } = getCurrentInstance() as any @@ -126,7 +126,11 @@ } // 详情或者编辑 const handleEdit = (row: IApplyList, status: string) => { - + if (status !== 'edit') { + detail({ id: row.id }).then((res) => { + console.log(res) + }) + } } // 取消 const handleCancle = (row: IApplyList) => { @@ -226,9 +230,6 @@ 详情 - - 取消 - diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue index 06c54b6..209a440 100644 --- a/src/views/business/subpackage/record/list.vue +++ b/src/views/business/subpackage/record/list.vue @@ -8,12 +8,13 @@ import { exportFile } from '@/utils/exportUtils' import type { TableColumn } from '@/components/NormalTable/table_interface' import { getListPage } from '@/api/business/subpackage/record' +import { SCHEDULE } from '@/utils/scheduleDict' const $router = useRouter() const { proxy } = getCurrentInstance() as any // 查询条件 const listQuery: Ref = ref({ businessSize: '', // 业务规模-字典code - formId: '', + formId: SCHEDULE.BUSINESS_SUBPACKAGE_RECORD, // 表单id grade: '', // 履约评级-字典code ids: [], outsourcerName: '', // 分包方公司名字 diff --git a/src/api/business/subpackage/approval.ts b/src/api/business/subpackage/approval.ts index 045b7d0..74d177b 100644 --- a/src/api/business/subpackage/approval.ts +++ b/src/api/business/subpackage/approval.ts @@ -12,3 +12,40 @@ data, }) } + +// 审批详情 +// export function detail(data: object) { +// return request({ +// url: '/business/outsourcer/approval/operate/delete', +// method: 'post', +// data, +// }) +// } + +// 审批删除 +export function approvalDel(data: object) { + return request({ + url: '/business/outsourcer/approval/operate/delete', + method: 'post', + data, + }) +} + +// 保存 +export function save(data: object) { + return request({ + url: '/business/outsourcer/save', + method: 'post', + data, + }) +} + +// 提交 +export function submit(data: object) { + return request({ + url: '/business/outsourcer/submit', + method: 'post', + data, + }) +} + diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts new file mode 100644 index 0000000..44d7b3a --- /dev/null +++ b/src/api/business/subpackage/certificate.ts @@ -0,0 +1,4 @@ +/** + * 分包方证书管理 + */ +// import request from '../../index' diff --git a/src/api/business/subpackage/record.ts b/src/api/business/subpackage/record.ts index f7d3acb..9420480 100644 --- a/src/api/business/subpackage/record.ts +++ b/src/api/business/subpackage/record.ts @@ -12,3 +12,67 @@ data, }) } + +// 批量删除 +export function batchDel(data: object) { + return request({ + url: '/business/outsourcer/batchDelete', + method: 'post', + data, + }) +} + +// 草稿箱删除 +export function outsourcerDel(data: object) { + return request({ + url: '/business/outsourcer/delete', + method: 'post', + data, + }) +} + +// 档案详情 +export function detail(data: object) { + return request({ + url: '/business/outsourcer/detail', + method: 'post', + data, + }) +} + +// 档案编辑 +export function draftUpdate(data: object) { + return request({ + url: '/business/outsourcer/draftUpdate', + method: 'post', + data, + }) +} + +// 档案编辑驳回后编辑 +export function failUpdate(data: object) { + return request({ + url: '/business/outsourcer/failUpdate', + method: 'post', + data, + }) +} + +// 列表详情 +export function rowDetail(data: object) { + return request({ + url: '/business/outsourcer/list', + method: 'post', + data, + }) +} + +// 档案导出 +export function listExport(data: object) { + return request({ + url: '/business/outsourcer/listExport', + method: 'post', + data, + }) +} + diff --git a/src/api/index.ts b/src/api/index.ts index 9521010..7591ed2 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -3,7 +3,6 @@ import { ElMessage } from 'element-plus' import router from '@/router/index' import useUserStore from '@/store/modules/user' - // 错误码枚举 enum responseCode { success = 200, // 成功 @@ -62,9 +61,16 @@ else if (response.data.code !== responseCode.success) { if (response.data.code === responseCode.noPermission) { // token失效状态跳转到登录页 toLogin() + if (useUserStore().isLogout === 0) { + ElMessage.error(response.data.message || '发生错误') + } + useUserStore().toLogout() } - // 这里做错误提示 - ElMessage.error(response.data.message || '发生错误') + else { + // 这里做错误提 + ElMessage.error(response.data.message || '发生错误') + } + return Promise.reject(response.data) } else { // 成功 diff --git a/src/api/system/tool.ts b/src/api/system/tool.ts index 7b61c3f..2cafc4a 100644 --- a/src/api/system/tool.ts +++ b/src/api/system/tool.ts @@ -132,3 +132,44 @@ method: 'get', }) } +// 文件配置管理列表 +export function getFileListPage(data: listParamsType) { + return request({ + url: `/download/center/listPage?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +// 删除文件配置 +export function deleteFileListPage(data: object) { + return request({ + url: '/download/center/delete', + method: 'post', + data, + }) +} +// 编辑文件配置 +export function updateFileListPage(data: object) { + return request({ + url: '/download/center/update', + method: 'post', + data, + }) +} +// 新增文件配置 +export function addeFileListPage(data: object) { + return request({ + url: '/download/center/add', + method: 'post', + data, + }) +} +// 导出 +export function exportFileListPage(data: object) { + return request({ + url: '/download/center/listExport', + method: 'post', + data, + responseType: 'blob', + }) +} diff --git a/src/layouts/components/Tools/index.vue b/src/layouts/components/Tools/index.vue index cd62c8b..13377a4 100644 --- a/src/layouts/components/Tools/index.vue +++ b/src/layouts/components/Tools/index.vue @@ -5,12 +5,14 @@ import eventBus from '@/utils/eventBus' import useSettingsStore from '@/store/modules/settings' import useUserStore from '@/store/modules/user' - +import useWebsocketStore from '@/store/modules/websocket' const router = useRouter() const settingsStore = useSettingsStore() const userStore = useUserStore() +const websocket = useWebsocketStore() + const mainPage = useMainPage() const { isFullscreen, toggle } = useFullscreen() @@ -60,6 +62,10 @@ function pro() { window.open('https://hooray.gitee.io/fantastic-admin-pro-example/', 'top') } +onMounted(() => { + // 连接 websocket + websocket.initWebSocket() +}) diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue index dac9cd2..6755ede 100644 --- a/src/views/business/subpackage/approve/list.vue +++ b/src/views/business/subpackage/approve/list.vue @@ -3,7 +3,7 @@ import type { Ref } from 'vue' import { ElLoading, ElMessage } from 'element-plus' import type { DateModelType } from 'element-plus' -import type { IListQueryApprove } from '../subpackage-interface' +import type { IApproveList, IListQueryApprove } from '../subpackage-interface' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' import type { TableColumn } from '@/components/NormalTable/table_interface' @@ -11,20 +11,22 @@ import type { dictType } from '@/views/device/receive/receive' import type { IMenu } from '@/components/buttonBox/buttonBox' import ButtonBox from '@/components/buttonBox/buttonBox.vue' -import { getListPage } from '@/api/business/subpackage/approval' - +import { detail, getListPage } from '@/api/business/subpackage/approval' +import { SCHEDULE } from '@/utils/scheduleDict' const $router = useRouter() const { proxy } = getCurrentInstance() as any const TabActiveButton = 'SubpackageApproveActive' +const loadingTable = ref(false) +const menu = ref([]) // 审批状态按钮组合 +const active = ref('') const timeRange = ref<[DateModelType, DateModelType]>(['', '']) - // 查询条件 const listQuery: Ref = ref({ applicantEndTime: '', // 开始时间 applicantName: '', // 申请人名称 applicantStartTime: '', // 结束时间 - approvalStatus: '', // 申请状态 - formId: '', // 表单id + approvalStatus: active.value, // 申请状态, // 申请状态 + formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id outsourcerName: '', // 分包方名称 projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 @@ -35,21 +37,19 @@ offset: 1, limit: 20, }) -const loadingTable = ref(false) -const menu = ref([]) // 审批状态按钮组合 -const active = ref('') + // 表头 const columns = ref([ - { text: '分包项目编号', value: 'interchangeCode', align: 'center', width: '160px' }, - { text: '公司名称', value: 'customerNo', align: 'center', width: '160px' }, - { text: '公司规模', value: 'customerName', align: 'center', width: '160px' }, + { text: '分包项目编号', value: 'outsourcerNo', align: 'center', width: '160px' }, + { text: '公司名称', value: 'outsourcerName', align: 'center', width: '160px' }, + { text: '公司规模', value: 'outsourcerSize', align: 'center', width: '160px' }, { text: '业务规模', value: 'reciever', align: 'center', width: '180px' }, - { text: '履约评级', value: 'deliverer', align: 'center', width: '180px' }, - { text: '整体评价', value: 'deliverTime', align: 'center', width: '180px' }, + { text: '履约评级', value: 'grade', align: 'center', width: '180px' }, + { text: '整体评价', value: 'businessSizeName', align: 'center', width: '180px' }, { text: '业务内容', value: 'deliverTime', align: 'center', width: '180px' }, - { text: '公司地址', value: 'deliverTime', align: 'center', width: '180px' }, - { text: '创建时间', value: 'deliverTime', align: 'center', width: '180px' }, - { text: '审批状态', value: 'deliverTime', align: 'center', width: '180px' }, + { text: '公司地址', value: 'fullAddress', align: 'center', width: '180px' }, + { text: '创建时间', value: 'createTime', align: 'center', width: '180px' }, + { text: '审批状态', value: 'approvalStatusName', align: 'center', width: '180px' }, ]) const list = ref([]) const total = ref(0) @@ -77,12 +77,12 @@ loadingTable.value = false getListPage(listQuery.value).then((response) => { list.value = response.data.rows - let interfaceStr = '' - for (const key in response.data.rows[0]) { - const item = response.data.rows[0][key] - interfaceStr += `${key}:${typeof (item)}\n` - } - console.log(interfaceStr) + // let interfaceStr = '' + // for (const key in response.data.rows[0]) { + // const item = response.data.rows[0][key] + // interfaceStr += `${key}:${typeof (item)}\n` + // } + // console.log(interfaceStr) total.value = parseInt(response.data.total) loadingTable.value = false }) @@ -94,8 +94,8 @@ applicantEndTime: '', // 开始时间 applicantName: '', // 申请人名称 applicantStartTime: '', // 结束时间 - approvalStatus: '', // 申请状态 - formId: '', // 表单id + approvalStatus: active.value, // 申请状态, // 申请状态 + formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id outsourcerName: '', // 分包方名称 projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 @@ -135,13 +135,14 @@ } // 详情或者编辑 -const handleEdit = (row, status) => { - +const handleEdit = (row: IApproveList, status: string) => { + // if (status !== 'edit') { + // detail({ id: row.id }).then((res) => { + // console.log(res) + // }) + // } } -// 取消 -const handleCancle = (row) => { -} // 获取字典值 const getDict = async () => { // 审批状态 @@ -168,7 +169,7 @@ onMounted(async () => { await getDict() - if (window.sessionStorage.getItem(TabActiveButton) !== 'undefined' && window.sessionStorage.getItem(TabActiveButton) !== '' && window.sessionStorage.getItem(TabActiveButton) !== null) { + if (window.sessionStorage.getItem(TabActiveButton)) { active.value = window.sessionStorage.getItem(TabActiveButton)! } else { @@ -224,9 +225,6 @@ 详情 - - 取消 - diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue index 7097ea2..ada0f7b 100644 --- a/src/views/business/subpackage/certificate/list.vue +++ b/src/views/business/subpackage/certificate/list.vue @@ -1,11 +1,169 @@ diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue index 74beb9a..16c1f13 100644 --- a/src/views/business/subpackage/check/list.vue +++ b/src/views/business/subpackage/check/list.vue @@ -12,7 +12,7 @@ import type { IMenu } from '@/components/buttonBox/buttonBox' import { SCHEDULE } from '@/utils/scheduleDict' import ButtonBox from '@/components/buttonBox/buttonBox.vue' -import { getListPage } from '@/api/business/subpackage/check' +import { detail, getListPage } from '@/api/business/subpackage/check' const $router = useRouter() const { proxy } = getCurrentInstance() as any @@ -126,7 +126,11 @@ } // 详情或者编辑 const handleEdit = (row: IApplyList, status: string) => { - + if (status !== 'edit') { + detail({ id: row.id }).then((res) => { + console.log(res) + }) + } } // 取消 const handleCancle = (row: IApplyList) => { @@ -226,9 +230,6 @@ 详情 - - 取消 - diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue index 06c54b6..209a440 100644 --- a/src/views/business/subpackage/record/list.vue +++ b/src/views/business/subpackage/record/list.vue @@ -8,12 +8,13 @@ import { exportFile } from '@/utils/exportUtils' import type { TableColumn } from '@/components/NormalTable/table_interface' import { getListPage } from '@/api/business/subpackage/record' +import { SCHEDULE } from '@/utils/scheduleDict' const $router = useRouter() const { proxy } = getCurrentInstance() as any // 查询条件 const listQuery: Ref = ref({ businessSize: '', // 业务规模-字典code - formId: '', + formId: SCHEDULE.BUSINESS_SUBPACKAGE_RECORD, // 表单id grade: '', // 履约评级-字典code ids: [], outsourcerName: '', // 分包方公司名字 diff --git a/src/views/business/subpackage/subpackage-interface.ts b/src/views/business/subpackage/subpackage-interface.ts index 763f9dc..366c571 100644 --- a/src/views/business/subpackage/subpackage-interface.ts +++ b/src/views/business/subpackage/subpackage-interface.ts @@ -51,6 +51,31 @@ limit: number } +export interface IApproveList { + addressAreaName: string // 公司地址-区 + addressCityName: string // 公司地址-市 + addressCountryName: string // 公司地址-国家 + addressProvinceName: string // 公司地址-省 + approvalStatus: string // 审批状态类型-字典code + approvalStatusName: string // 审批状态类型-字典value + businessContent: string // 业务内容 + businessSize: string // 业务规模-字典code + businessSizeName: string // 业务规模-字典value + createTime: string // 创建时间 + decisionItem: string | number // 可选决策项(1同意驳回拒绝 2同意驳回 3同意拒绝,用于待审批列表同意/驳回/拒绝按钮展示) + evaluation: string // 整体评价-字典code + evaluationName: string // 整体评价-字典value + fullAddress: string // 公司地址-详细地址 + grade: string // 履约评级-字典code + gradeName: string // 履约评级-字典value + id: string | number // 主键id + outsourcerName: string // 分包方公司名字 + outsourcerNo: string // 分包方编号 + outsourcerSize: string // 分包方公司规模 + processId: string // 流程实例id + taskId: string // 任务id(同意、驳回等操作使用) +} + // 分包方档案查询参数 export interface IListQueryRecord { businessSize: string // 业务规模-字典code diff --git a/src/api/business/subpackage/approval.ts b/src/api/business/subpackage/approval.ts index 045b7d0..74d177b 100644 --- a/src/api/business/subpackage/approval.ts +++ b/src/api/business/subpackage/approval.ts @@ -12,3 +12,40 @@ data, }) } + +// 审批详情 +// export function detail(data: object) { +// return request({ +// url: '/business/outsourcer/approval/operate/delete', +// method: 'post', +// data, +// }) +// } + +// 审批删除 +export function approvalDel(data: object) { + return request({ + url: '/business/outsourcer/approval/operate/delete', + method: 'post', + data, + }) +} + +// 保存 +export function save(data: object) { + return request({ + url: '/business/outsourcer/save', + method: 'post', + data, + }) +} + +// 提交 +export function submit(data: object) { + return request({ + url: '/business/outsourcer/submit', + method: 'post', + data, + }) +} + diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts new file mode 100644 index 0000000..44d7b3a --- /dev/null +++ b/src/api/business/subpackage/certificate.ts @@ -0,0 +1,4 @@ +/** + * 分包方证书管理 + */ +// import request from '../../index' diff --git a/src/api/business/subpackage/record.ts b/src/api/business/subpackage/record.ts index f7d3acb..9420480 100644 --- a/src/api/business/subpackage/record.ts +++ b/src/api/business/subpackage/record.ts @@ -12,3 +12,67 @@ data, }) } + +// 批量删除 +export function batchDel(data: object) { + return request({ + url: '/business/outsourcer/batchDelete', + method: 'post', + data, + }) +} + +// 草稿箱删除 +export function outsourcerDel(data: object) { + return request({ + url: '/business/outsourcer/delete', + method: 'post', + data, + }) +} + +// 档案详情 +export function detail(data: object) { + return request({ + url: '/business/outsourcer/detail', + method: 'post', + data, + }) +} + +// 档案编辑 +export function draftUpdate(data: object) { + return request({ + url: '/business/outsourcer/draftUpdate', + method: 'post', + data, + }) +} + +// 档案编辑驳回后编辑 +export function failUpdate(data: object) { + return request({ + url: '/business/outsourcer/failUpdate', + method: 'post', + data, + }) +} + +// 列表详情 +export function rowDetail(data: object) { + return request({ + url: '/business/outsourcer/list', + method: 'post', + data, + }) +} + +// 档案导出 +export function listExport(data: object) { + return request({ + url: '/business/outsourcer/listExport', + method: 'post', + data, + }) +} + diff --git a/src/api/index.ts b/src/api/index.ts index 9521010..7591ed2 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -3,7 +3,6 @@ import { ElMessage } from 'element-plus' import router from '@/router/index' import useUserStore from '@/store/modules/user' - // 错误码枚举 enum responseCode { success = 200, // 成功 @@ -62,9 +61,16 @@ else if (response.data.code !== responseCode.success) { if (response.data.code === responseCode.noPermission) { // token失效状态跳转到登录页 toLogin() + if (useUserStore().isLogout === 0) { + ElMessage.error(response.data.message || '发生错误') + } + useUserStore().toLogout() } - // 这里做错误提示 - ElMessage.error(response.data.message || '发生错误') + else { + // 这里做错误提 + ElMessage.error(response.data.message || '发生错误') + } + return Promise.reject(response.data) } else { // 成功 diff --git a/src/api/system/tool.ts b/src/api/system/tool.ts index 7b61c3f..2cafc4a 100644 --- a/src/api/system/tool.ts +++ b/src/api/system/tool.ts @@ -132,3 +132,44 @@ method: 'get', }) } +// 文件配置管理列表 +export function getFileListPage(data: listParamsType) { + return request({ + url: `/download/center/listPage?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +// 删除文件配置 +export function deleteFileListPage(data: object) { + return request({ + url: '/download/center/delete', + method: 'post', + data, + }) +} +// 编辑文件配置 +export function updateFileListPage(data: object) { + return request({ + url: '/download/center/update', + method: 'post', + data, + }) +} +// 新增文件配置 +export function addeFileListPage(data: object) { + return request({ + url: '/download/center/add', + method: 'post', + data, + }) +} +// 导出 +export function exportFileListPage(data: object) { + return request({ + url: '/download/center/listExport', + method: 'post', + data, + responseType: 'blob', + }) +} diff --git a/src/layouts/components/Tools/index.vue b/src/layouts/components/Tools/index.vue index cd62c8b..13377a4 100644 --- a/src/layouts/components/Tools/index.vue +++ b/src/layouts/components/Tools/index.vue @@ -5,12 +5,14 @@ import eventBus from '@/utils/eventBus' import useSettingsStore from '@/store/modules/settings' import useUserStore from '@/store/modules/user' - +import useWebsocketStore from '@/store/modules/websocket' const router = useRouter() const settingsStore = useSettingsStore() const userStore = useUserStore() +const websocket = useWebsocketStore() + const mainPage = useMainPage() const { isFullscreen, toggle } = useFullscreen() @@ -60,6 +62,10 @@ function pro() { window.open('https://hooray.gitee.io/fantastic-admin-pro-example/', 'top') } +onMounted(() => { + // 连接 websocket + websocket.initWebSocket() +}) diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue index dac9cd2..6755ede 100644 --- a/src/views/business/subpackage/approve/list.vue +++ b/src/views/business/subpackage/approve/list.vue @@ -3,7 +3,7 @@ import type { Ref } from 'vue' import { ElLoading, ElMessage } from 'element-plus' import type { DateModelType } from 'element-plus' -import type { IListQueryApprove } from '../subpackage-interface' +import type { IApproveList, IListQueryApprove } from '../subpackage-interface' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' import type { TableColumn } from '@/components/NormalTable/table_interface' @@ -11,20 +11,22 @@ import type { dictType } from '@/views/device/receive/receive' import type { IMenu } from '@/components/buttonBox/buttonBox' import ButtonBox from '@/components/buttonBox/buttonBox.vue' -import { getListPage } from '@/api/business/subpackage/approval' - +import { detail, getListPage } from '@/api/business/subpackage/approval' +import { SCHEDULE } from '@/utils/scheduleDict' const $router = useRouter() const { proxy } = getCurrentInstance() as any const TabActiveButton = 'SubpackageApproveActive' +const loadingTable = ref(false) +const menu = ref([]) // 审批状态按钮组合 +const active = ref('') const timeRange = ref<[DateModelType, DateModelType]>(['', '']) - // 查询条件 const listQuery: Ref = ref({ applicantEndTime: '', // 开始时间 applicantName: '', // 申请人名称 applicantStartTime: '', // 结束时间 - approvalStatus: '', // 申请状态 - formId: '', // 表单id + approvalStatus: active.value, // 申请状态, // 申请状态 + formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id outsourcerName: '', // 分包方名称 projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 @@ -35,21 +37,19 @@ offset: 1, limit: 20, }) -const loadingTable = ref(false) -const menu = ref([]) // 审批状态按钮组合 -const active = ref('') + // 表头 const columns = ref([ - { text: '分包项目编号', value: 'interchangeCode', align: 'center', width: '160px' }, - { text: '公司名称', value: 'customerNo', align: 'center', width: '160px' }, - { text: '公司规模', value: 'customerName', align: 'center', width: '160px' }, + { text: '分包项目编号', value: 'outsourcerNo', align: 'center', width: '160px' }, + { text: '公司名称', value: 'outsourcerName', align: 'center', width: '160px' }, + { text: '公司规模', value: 'outsourcerSize', align: 'center', width: '160px' }, { text: '业务规模', value: 'reciever', align: 'center', width: '180px' }, - { text: '履约评级', value: 'deliverer', align: 'center', width: '180px' }, - { text: '整体评价', value: 'deliverTime', align: 'center', width: '180px' }, + { text: '履约评级', value: 'grade', align: 'center', width: '180px' }, + { text: '整体评价', value: 'businessSizeName', align: 'center', width: '180px' }, { text: '业务内容', value: 'deliverTime', align: 'center', width: '180px' }, - { text: '公司地址', value: 'deliverTime', align: 'center', width: '180px' }, - { text: '创建时间', value: 'deliverTime', align: 'center', width: '180px' }, - { text: '审批状态', value: 'deliverTime', align: 'center', width: '180px' }, + { text: '公司地址', value: 'fullAddress', align: 'center', width: '180px' }, + { text: '创建时间', value: 'createTime', align: 'center', width: '180px' }, + { text: '审批状态', value: 'approvalStatusName', align: 'center', width: '180px' }, ]) const list = ref([]) const total = ref(0) @@ -77,12 +77,12 @@ loadingTable.value = false getListPage(listQuery.value).then((response) => { list.value = response.data.rows - let interfaceStr = '' - for (const key in response.data.rows[0]) { - const item = response.data.rows[0][key] - interfaceStr += `${key}:${typeof (item)}\n` - } - console.log(interfaceStr) + // let interfaceStr = '' + // for (const key in response.data.rows[0]) { + // const item = response.data.rows[0][key] + // interfaceStr += `${key}:${typeof (item)}\n` + // } + // console.log(interfaceStr) total.value = parseInt(response.data.total) loadingTable.value = false }) @@ -94,8 +94,8 @@ applicantEndTime: '', // 开始时间 applicantName: '', // 申请人名称 applicantStartTime: '', // 结束时间 - approvalStatus: '', // 申请状态 - formId: '', // 表单id + approvalStatus: active.value, // 申请状态, // 申请状态 + formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id outsourcerName: '', // 分包方名称 projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 @@ -135,13 +135,14 @@ } // 详情或者编辑 -const handleEdit = (row, status) => { - +const handleEdit = (row: IApproveList, status: string) => { + // if (status !== 'edit') { + // detail({ id: row.id }).then((res) => { + // console.log(res) + // }) + // } } -// 取消 -const handleCancle = (row) => { -} // 获取字典值 const getDict = async () => { // 审批状态 @@ -168,7 +169,7 @@ onMounted(async () => { await getDict() - if (window.sessionStorage.getItem(TabActiveButton) !== 'undefined' && window.sessionStorage.getItem(TabActiveButton) !== '' && window.sessionStorage.getItem(TabActiveButton) !== null) { + if (window.sessionStorage.getItem(TabActiveButton)) { active.value = window.sessionStorage.getItem(TabActiveButton)! } else { @@ -224,9 +225,6 @@ 详情 - - 取消 - diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue index 7097ea2..ada0f7b 100644 --- a/src/views/business/subpackage/certificate/list.vue +++ b/src/views/business/subpackage/certificate/list.vue @@ -1,11 +1,169 @@ diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue index 74beb9a..16c1f13 100644 --- a/src/views/business/subpackage/check/list.vue +++ b/src/views/business/subpackage/check/list.vue @@ -12,7 +12,7 @@ import type { IMenu } from '@/components/buttonBox/buttonBox' import { SCHEDULE } from '@/utils/scheduleDict' import ButtonBox from '@/components/buttonBox/buttonBox.vue' -import { getListPage } from '@/api/business/subpackage/check' +import { detail, getListPage } from '@/api/business/subpackage/check' const $router = useRouter() const { proxy } = getCurrentInstance() as any @@ -126,7 +126,11 @@ } // 详情或者编辑 const handleEdit = (row: IApplyList, status: string) => { - + if (status !== 'edit') { + detail({ id: row.id }).then((res) => { + console.log(res) + }) + } } // 取消 const handleCancle = (row: IApplyList) => { @@ -226,9 +230,6 @@ 详情 - - 取消 - diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue index 06c54b6..209a440 100644 --- a/src/views/business/subpackage/record/list.vue +++ b/src/views/business/subpackage/record/list.vue @@ -8,12 +8,13 @@ import { exportFile } from '@/utils/exportUtils' import type { TableColumn } from '@/components/NormalTable/table_interface' import { getListPage } from '@/api/business/subpackage/record' +import { SCHEDULE } from '@/utils/scheduleDict' const $router = useRouter() const { proxy } = getCurrentInstance() as any // 查询条件 const listQuery: Ref = ref({ businessSize: '', // 业务规模-字典code - formId: '', + formId: SCHEDULE.BUSINESS_SUBPACKAGE_RECORD, // 表单id grade: '', // 履约评级-字典code ids: [], outsourcerName: '', // 分包方公司名字 diff --git a/src/views/business/subpackage/subpackage-interface.ts b/src/views/business/subpackage/subpackage-interface.ts index 763f9dc..366c571 100644 --- a/src/views/business/subpackage/subpackage-interface.ts +++ b/src/views/business/subpackage/subpackage-interface.ts @@ -51,6 +51,31 @@ limit: number } +export interface IApproveList { + addressAreaName: string // 公司地址-区 + addressCityName: string // 公司地址-市 + addressCountryName: string // 公司地址-国家 + addressProvinceName: string // 公司地址-省 + approvalStatus: string // 审批状态类型-字典code + approvalStatusName: string // 审批状态类型-字典value + businessContent: string // 业务内容 + businessSize: string // 业务规模-字典code + businessSizeName: string // 业务规模-字典value + createTime: string // 创建时间 + decisionItem: string | number // 可选决策项(1同意驳回拒绝 2同意驳回 3同意拒绝,用于待审批列表同意/驳回/拒绝按钮展示) + evaluation: string // 整体评价-字典code + evaluationName: string // 整体评价-字典value + fullAddress: string // 公司地址-详细地址 + grade: string // 履约评级-字典code + gradeName: string // 履约评级-字典value + id: string | number // 主键id + outsourcerName: string // 分包方公司名字 + outsourcerNo: string // 分包方编号 + outsourcerSize: string // 分包方公司规模 + processId: string // 流程实例id + taskId: string // 任务id(同意、驳回等操作使用) +} + // 分包方档案查询参数 export interface IListQueryRecord { businessSize: string // 业务规模-字典code diff --git a/src/views/login_register.vue b/src/views/login_register.vue index e63b0e6..943dcc9 100644 --- a/src/views/login_register.vue +++ b/src/views/login_register.vue @@ -185,6 +185,7 @@ handleLogin() } onBeforeMount(() => { + // 获取当前标识 loginForm.value.username = localStorage.login_username || '' getBaseConfig() }) @@ -376,7 +377,7 @@ - + diff --git a/src/api/business/subpackage/approval.ts b/src/api/business/subpackage/approval.ts index 045b7d0..74d177b 100644 --- a/src/api/business/subpackage/approval.ts +++ b/src/api/business/subpackage/approval.ts @@ -12,3 +12,40 @@ data, }) } + +// 审批详情 +// export function detail(data: object) { +// return request({ +// url: '/business/outsourcer/approval/operate/delete', +// method: 'post', +// data, +// }) +// } + +// 审批删除 +export function approvalDel(data: object) { + return request({ + url: '/business/outsourcer/approval/operate/delete', + method: 'post', + data, + }) +} + +// 保存 +export function save(data: object) { + return request({ + url: '/business/outsourcer/save', + method: 'post', + data, + }) +} + +// 提交 +export function submit(data: object) { + return request({ + url: '/business/outsourcer/submit', + method: 'post', + data, + }) +} + diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts new file mode 100644 index 0000000..44d7b3a --- /dev/null +++ b/src/api/business/subpackage/certificate.ts @@ -0,0 +1,4 @@ +/** + * 分包方证书管理 + */ +// import request from '../../index' diff --git a/src/api/business/subpackage/record.ts b/src/api/business/subpackage/record.ts index f7d3acb..9420480 100644 --- a/src/api/business/subpackage/record.ts +++ b/src/api/business/subpackage/record.ts @@ -12,3 +12,67 @@ data, }) } + +// 批量删除 +export function batchDel(data: object) { + return request({ + url: '/business/outsourcer/batchDelete', + method: 'post', + data, + }) +} + +// 草稿箱删除 +export function outsourcerDel(data: object) { + return request({ + url: '/business/outsourcer/delete', + method: 'post', + data, + }) +} + +// 档案详情 +export function detail(data: object) { + return request({ + url: '/business/outsourcer/detail', + method: 'post', + data, + }) +} + +// 档案编辑 +export function draftUpdate(data: object) { + return request({ + url: '/business/outsourcer/draftUpdate', + method: 'post', + data, + }) +} + +// 档案编辑驳回后编辑 +export function failUpdate(data: object) { + return request({ + url: '/business/outsourcer/failUpdate', + method: 'post', + data, + }) +} + +// 列表详情 +export function rowDetail(data: object) { + return request({ + url: '/business/outsourcer/list', + method: 'post', + data, + }) +} + +// 档案导出 +export function listExport(data: object) { + return request({ + url: '/business/outsourcer/listExport', + method: 'post', + data, + }) +} + diff --git a/src/api/index.ts b/src/api/index.ts index 9521010..7591ed2 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -3,7 +3,6 @@ import { ElMessage } from 'element-plus' import router from '@/router/index' import useUserStore from '@/store/modules/user' - // 错误码枚举 enum responseCode { success = 200, // 成功 @@ -62,9 +61,16 @@ else if (response.data.code !== responseCode.success) { if (response.data.code === responseCode.noPermission) { // token失效状态跳转到登录页 toLogin() + if (useUserStore().isLogout === 0) { + ElMessage.error(response.data.message || '发生错误') + } + useUserStore().toLogout() } - // 这里做错误提示 - ElMessage.error(response.data.message || '发生错误') + else { + // 这里做错误提 + ElMessage.error(response.data.message || '发生错误') + } + return Promise.reject(response.data) } else { // 成功 diff --git a/src/api/system/tool.ts b/src/api/system/tool.ts index 7b61c3f..2cafc4a 100644 --- a/src/api/system/tool.ts +++ b/src/api/system/tool.ts @@ -132,3 +132,44 @@ method: 'get', }) } +// 文件配置管理列表 +export function getFileListPage(data: listParamsType) { + return request({ + url: `/download/center/listPage?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +// 删除文件配置 +export function deleteFileListPage(data: object) { + return request({ + url: '/download/center/delete', + method: 'post', + data, + }) +} +// 编辑文件配置 +export function updateFileListPage(data: object) { + return request({ + url: '/download/center/update', + method: 'post', + data, + }) +} +// 新增文件配置 +export function addeFileListPage(data: object) { + return request({ + url: '/download/center/add', + method: 'post', + data, + }) +} +// 导出 +export function exportFileListPage(data: object) { + return request({ + url: '/download/center/listExport', + method: 'post', + data, + responseType: 'blob', + }) +} diff --git a/src/layouts/components/Tools/index.vue b/src/layouts/components/Tools/index.vue index cd62c8b..13377a4 100644 --- a/src/layouts/components/Tools/index.vue +++ b/src/layouts/components/Tools/index.vue @@ -5,12 +5,14 @@ import eventBus from '@/utils/eventBus' import useSettingsStore from '@/store/modules/settings' import useUserStore from '@/store/modules/user' - +import useWebsocketStore from '@/store/modules/websocket' const router = useRouter() const settingsStore = useSettingsStore() const userStore = useUserStore() +const websocket = useWebsocketStore() + const mainPage = useMainPage() const { isFullscreen, toggle } = useFullscreen() @@ -60,6 +62,10 @@ function pro() { window.open('https://hooray.gitee.io/fantastic-admin-pro-example/', 'top') } +onMounted(() => { + // 连接 websocket + websocket.initWebSocket() +}) diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue index dac9cd2..6755ede 100644 --- a/src/views/business/subpackage/approve/list.vue +++ b/src/views/business/subpackage/approve/list.vue @@ -3,7 +3,7 @@ import type { Ref } from 'vue' import { ElLoading, ElMessage } from 'element-plus' import type { DateModelType } from 'element-plus' -import type { IListQueryApprove } from '../subpackage-interface' +import type { IApproveList, IListQueryApprove } from '../subpackage-interface' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' import type { TableColumn } from '@/components/NormalTable/table_interface' @@ -11,20 +11,22 @@ import type { dictType } from '@/views/device/receive/receive' import type { IMenu } from '@/components/buttonBox/buttonBox' import ButtonBox from '@/components/buttonBox/buttonBox.vue' -import { getListPage } from '@/api/business/subpackage/approval' - +import { detail, getListPage } from '@/api/business/subpackage/approval' +import { SCHEDULE } from '@/utils/scheduleDict' const $router = useRouter() const { proxy } = getCurrentInstance() as any const TabActiveButton = 'SubpackageApproveActive' +const loadingTable = ref(false) +const menu = ref([]) // 审批状态按钮组合 +const active = ref('') const timeRange = ref<[DateModelType, DateModelType]>(['', '']) - // 查询条件 const listQuery: Ref = ref({ applicantEndTime: '', // 开始时间 applicantName: '', // 申请人名称 applicantStartTime: '', // 结束时间 - approvalStatus: '', // 申请状态 - formId: '', // 表单id + approvalStatus: active.value, // 申请状态, // 申请状态 + formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id outsourcerName: '', // 分包方名称 projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 @@ -35,21 +37,19 @@ offset: 1, limit: 20, }) -const loadingTable = ref(false) -const menu = ref([]) // 审批状态按钮组合 -const active = ref('') + // 表头 const columns = ref([ - { text: '分包项目编号', value: 'interchangeCode', align: 'center', width: '160px' }, - { text: '公司名称', value: 'customerNo', align: 'center', width: '160px' }, - { text: '公司规模', value: 'customerName', align: 'center', width: '160px' }, + { text: '分包项目编号', value: 'outsourcerNo', align: 'center', width: '160px' }, + { text: '公司名称', value: 'outsourcerName', align: 'center', width: '160px' }, + { text: '公司规模', value: 'outsourcerSize', align: 'center', width: '160px' }, { text: '业务规模', value: 'reciever', align: 'center', width: '180px' }, - { text: '履约评级', value: 'deliverer', align: 'center', width: '180px' }, - { text: '整体评价', value: 'deliverTime', align: 'center', width: '180px' }, + { text: '履约评级', value: 'grade', align: 'center', width: '180px' }, + { text: '整体评价', value: 'businessSizeName', align: 'center', width: '180px' }, { text: '业务内容', value: 'deliverTime', align: 'center', width: '180px' }, - { text: '公司地址', value: 'deliverTime', align: 'center', width: '180px' }, - { text: '创建时间', value: 'deliverTime', align: 'center', width: '180px' }, - { text: '审批状态', value: 'deliverTime', align: 'center', width: '180px' }, + { text: '公司地址', value: 'fullAddress', align: 'center', width: '180px' }, + { text: '创建时间', value: 'createTime', align: 'center', width: '180px' }, + { text: '审批状态', value: 'approvalStatusName', align: 'center', width: '180px' }, ]) const list = ref([]) const total = ref(0) @@ -77,12 +77,12 @@ loadingTable.value = false getListPage(listQuery.value).then((response) => { list.value = response.data.rows - let interfaceStr = '' - for (const key in response.data.rows[0]) { - const item = response.data.rows[0][key] - interfaceStr += `${key}:${typeof (item)}\n` - } - console.log(interfaceStr) + // let interfaceStr = '' + // for (const key in response.data.rows[0]) { + // const item = response.data.rows[0][key] + // interfaceStr += `${key}:${typeof (item)}\n` + // } + // console.log(interfaceStr) total.value = parseInt(response.data.total) loadingTable.value = false }) @@ -94,8 +94,8 @@ applicantEndTime: '', // 开始时间 applicantName: '', // 申请人名称 applicantStartTime: '', // 结束时间 - approvalStatus: '', // 申请状态 - formId: '', // 表单id + approvalStatus: active.value, // 申请状态, // 申请状态 + formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id outsourcerName: '', // 分包方名称 projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 @@ -135,13 +135,14 @@ } // 详情或者编辑 -const handleEdit = (row, status) => { - +const handleEdit = (row: IApproveList, status: string) => { + // if (status !== 'edit') { + // detail({ id: row.id }).then((res) => { + // console.log(res) + // }) + // } } -// 取消 -const handleCancle = (row) => { -} // 获取字典值 const getDict = async () => { // 审批状态 @@ -168,7 +169,7 @@ onMounted(async () => { await getDict() - if (window.sessionStorage.getItem(TabActiveButton) !== 'undefined' && window.sessionStorage.getItem(TabActiveButton) !== '' && window.sessionStorage.getItem(TabActiveButton) !== null) { + if (window.sessionStorage.getItem(TabActiveButton)) { active.value = window.sessionStorage.getItem(TabActiveButton)! } else { @@ -224,9 +225,6 @@ 详情 - - 取消 - diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue index 7097ea2..ada0f7b 100644 --- a/src/views/business/subpackage/certificate/list.vue +++ b/src/views/business/subpackage/certificate/list.vue @@ -1,11 +1,169 @@ diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue index 74beb9a..16c1f13 100644 --- a/src/views/business/subpackage/check/list.vue +++ b/src/views/business/subpackage/check/list.vue @@ -12,7 +12,7 @@ import type { IMenu } from '@/components/buttonBox/buttonBox' import { SCHEDULE } from '@/utils/scheduleDict' import ButtonBox from '@/components/buttonBox/buttonBox.vue' -import { getListPage } from '@/api/business/subpackage/check' +import { detail, getListPage } from '@/api/business/subpackage/check' const $router = useRouter() const { proxy } = getCurrentInstance() as any @@ -126,7 +126,11 @@ } // 详情或者编辑 const handleEdit = (row: IApplyList, status: string) => { - + if (status !== 'edit') { + detail({ id: row.id }).then((res) => { + console.log(res) + }) + } } // 取消 const handleCancle = (row: IApplyList) => { @@ -226,9 +230,6 @@ 详情 - - 取消 - diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue index 06c54b6..209a440 100644 --- a/src/views/business/subpackage/record/list.vue +++ b/src/views/business/subpackage/record/list.vue @@ -8,12 +8,13 @@ import { exportFile } from '@/utils/exportUtils' import type { TableColumn } from '@/components/NormalTable/table_interface' import { getListPage } from '@/api/business/subpackage/record' +import { SCHEDULE } from '@/utils/scheduleDict' const $router = useRouter() const { proxy } = getCurrentInstance() as any // 查询条件 const listQuery: Ref = ref({ businessSize: '', // 业务规模-字典code - formId: '', + formId: SCHEDULE.BUSINESS_SUBPACKAGE_RECORD, // 表单id grade: '', // 履约评级-字典code ids: [], outsourcerName: '', // 分包方公司名字 diff --git a/src/views/business/subpackage/subpackage-interface.ts b/src/views/business/subpackage/subpackage-interface.ts index 763f9dc..366c571 100644 --- a/src/views/business/subpackage/subpackage-interface.ts +++ b/src/views/business/subpackage/subpackage-interface.ts @@ -51,6 +51,31 @@ limit: number } +export interface IApproveList { + addressAreaName: string // 公司地址-区 + addressCityName: string // 公司地址-市 + addressCountryName: string // 公司地址-国家 + addressProvinceName: string // 公司地址-省 + approvalStatus: string // 审批状态类型-字典code + approvalStatusName: string // 审批状态类型-字典value + businessContent: string // 业务内容 + businessSize: string // 业务规模-字典code + businessSizeName: string // 业务规模-字典value + createTime: string // 创建时间 + decisionItem: string | number // 可选决策项(1同意驳回拒绝 2同意驳回 3同意拒绝,用于待审批列表同意/驳回/拒绝按钮展示) + evaluation: string // 整体评价-字典code + evaluationName: string // 整体评价-字典value + fullAddress: string // 公司地址-详细地址 + grade: string // 履约评级-字典code + gradeName: string // 履约评级-字典value + id: string | number // 主键id + outsourcerName: string // 分包方公司名字 + outsourcerNo: string // 分包方编号 + outsourcerSize: string // 分包方公司规模 + processId: string // 流程实例id + taskId: string // 任务id(同意、驳回等操作使用) +} + // 分包方档案查询参数 export interface IListQueryRecord { businessSize: string // 业务规模-字典code diff --git a/src/views/login_register.vue b/src/views/login_register.vue index e63b0e6..943dcc9 100644 --- a/src/views/login_register.vue +++ b/src/views/login_register.vue @@ -185,6 +185,7 @@ handleLogin() } onBeforeMount(() => { + // 获取当前标识 loginForm.value.username = localStorage.login_username || '' getBaseConfig() }) @@ -376,7 +377,7 @@ - + diff --git a/src/views/system/tool/fileConfiguration/addDDialog.vue b/src/views/system/tool/fileConfiguration/addDDialog.vue new file mode 100644 index 0000000..69b5832 --- /dev/null +++ b/src/views/system/tool/fileConfiguration/addDDialog.vue @@ -0,0 +1,245 @@ + + + + + + diff --git a/src/api/business/subpackage/approval.ts b/src/api/business/subpackage/approval.ts index 045b7d0..74d177b 100644 --- a/src/api/business/subpackage/approval.ts +++ b/src/api/business/subpackage/approval.ts @@ -12,3 +12,40 @@ data, }) } + +// 审批详情 +// export function detail(data: object) { +// return request({ +// url: '/business/outsourcer/approval/operate/delete', +// method: 'post', +// data, +// }) +// } + +// 审批删除 +export function approvalDel(data: object) { + return request({ + url: '/business/outsourcer/approval/operate/delete', + method: 'post', + data, + }) +} + +// 保存 +export function save(data: object) { + return request({ + url: '/business/outsourcer/save', + method: 'post', + data, + }) +} + +// 提交 +export function submit(data: object) { + return request({ + url: '/business/outsourcer/submit', + method: 'post', + data, + }) +} + diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts new file mode 100644 index 0000000..44d7b3a --- /dev/null +++ b/src/api/business/subpackage/certificate.ts @@ -0,0 +1,4 @@ +/** + * 分包方证书管理 + */ +// import request from '../../index' diff --git a/src/api/business/subpackage/record.ts b/src/api/business/subpackage/record.ts index f7d3acb..9420480 100644 --- a/src/api/business/subpackage/record.ts +++ b/src/api/business/subpackage/record.ts @@ -12,3 +12,67 @@ data, }) } + +// 批量删除 +export function batchDel(data: object) { + return request({ + url: '/business/outsourcer/batchDelete', + method: 'post', + data, + }) +} + +// 草稿箱删除 +export function outsourcerDel(data: object) { + return request({ + url: '/business/outsourcer/delete', + method: 'post', + data, + }) +} + +// 档案详情 +export function detail(data: object) { + return request({ + url: '/business/outsourcer/detail', + method: 'post', + data, + }) +} + +// 档案编辑 +export function draftUpdate(data: object) { + return request({ + url: '/business/outsourcer/draftUpdate', + method: 'post', + data, + }) +} + +// 档案编辑驳回后编辑 +export function failUpdate(data: object) { + return request({ + url: '/business/outsourcer/failUpdate', + method: 'post', + data, + }) +} + +// 列表详情 +export function rowDetail(data: object) { + return request({ + url: '/business/outsourcer/list', + method: 'post', + data, + }) +} + +// 档案导出 +export function listExport(data: object) { + return request({ + url: '/business/outsourcer/listExport', + method: 'post', + data, + }) +} + diff --git a/src/api/index.ts b/src/api/index.ts index 9521010..7591ed2 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -3,7 +3,6 @@ import { ElMessage } from 'element-plus' import router from '@/router/index' import useUserStore from '@/store/modules/user' - // 错误码枚举 enum responseCode { success = 200, // 成功 @@ -62,9 +61,16 @@ else if (response.data.code !== responseCode.success) { if (response.data.code === responseCode.noPermission) { // token失效状态跳转到登录页 toLogin() + if (useUserStore().isLogout === 0) { + ElMessage.error(response.data.message || '发生错误') + } + useUserStore().toLogout() } - // 这里做错误提示 - ElMessage.error(response.data.message || '发生错误') + else { + // 这里做错误提 + ElMessage.error(response.data.message || '发生错误') + } + return Promise.reject(response.data) } else { // 成功 diff --git a/src/api/system/tool.ts b/src/api/system/tool.ts index 7b61c3f..2cafc4a 100644 --- a/src/api/system/tool.ts +++ b/src/api/system/tool.ts @@ -132,3 +132,44 @@ method: 'get', }) } +// 文件配置管理列表 +export function getFileListPage(data: listParamsType) { + return request({ + url: `/download/center/listPage?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +// 删除文件配置 +export function deleteFileListPage(data: object) { + return request({ + url: '/download/center/delete', + method: 'post', + data, + }) +} +// 编辑文件配置 +export function updateFileListPage(data: object) { + return request({ + url: '/download/center/update', + method: 'post', + data, + }) +} +// 新增文件配置 +export function addeFileListPage(data: object) { + return request({ + url: '/download/center/add', + method: 'post', + data, + }) +} +// 导出 +export function exportFileListPage(data: object) { + return request({ + url: '/download/center/listExport', + method: 'post', + data, + responseType: 'blob', + }) +} diff --git a/src/layouts/components/Tools/index.vue b/src/layouts/components/Tools/index.vue index cd62c8b..13377a4 100644 --- a/src/layouts/components/Tools/index.vue +++ b/src/layouts/components/Tools/index.vue @@ -5,12 +5,14 @@ import eventBus from '@/utils/eventBus' import useSettingsStore from '@/store/modules/settings' import useUserStore from '@/store/modules/user' - +import useWebsocketStore from '@/store/modules/websocket' const router = useRouter() const settingsStore = useSettingsStore() const userStore = useUserStore() +const websocket = useWebsocketStore() + const mainPage = useMainPage() const { isFullscreen, toggle } = useFullscreen() @@ -60,6 +62,10 @@ function pro() { window.open('https://hooray.gitee.io/fantastic-admin-pro-example/', 'top') } +onMounted(() => { + // 连接 websocket + websocket.initWebSocket() +}) diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue index dac9cd2..6755ede 100644 --- a/src/views/business/subpackage/approve/list.vue +++ b/src/views/business/subpackage/approve/list.vue @@ -3,7 +3,7 @@ import type { Ref } from 'vue' import { ElLoading, ElMessage } from 'element-plus' import type { DateModelType } from 'element-plus' -import type { IListQueryApprove } from '../subpackage-interface' +import type { IApproveList, IListQueryApprove } from '../subpackage-interface' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' import type { TableColumn } from '@/components/NormalTable/table_interface' @@ -11,20 +11,22 @@ import type { dictType } from '@/views/device/receive/receive' import type { IMenu } from '@/components/buttonBox/buttonBox' import ButtonBox from '@/components/buttonBox/buttonBox.vue' -import { getListPage } from '@/api/business/subpackage/approval' - +import { detail, getListPage } from '@/api/business/subpackage/approval' +import { SCHEDULE } from '@/utils/scheduleDict' const $router = useRouter() const { proxy } = getCurrentInstance() as any const TabActiveButton = 'SubpackageApproveActive' +const loadingTable = ref(false) +const menu = ref([]) // 审批状态按钮组合 +const active = ref('') const timeRange = ref<[DateModelType, DateModelType]>(['', '']) - // 查询条件 const listQuery: Ref = ref({ applicantEndTime: '', // 开始时间 applicantName: '', // 申请人名称 applicantStartTime: '', // 结束时间 - approvalStatus: '', // 申请状态 - formId: '', // 表单id + approvalStatus: active.value, // 申请状态, // 申请状态 + formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id outsourcerName: '', // 分包方名称 projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 @@ -35,21 +37,19 @@ offset: 1, limit: 20, }) -const loadingTable = ref(false) -const menu = ref([]) // 审批状态按钮组合 -const active = ref('') + // 表头 const columns = ref([ - { text: '分包项目编号', value: 'interchangeCode', align: 'center', width: '160px' }, - { text: '公司名称', value: 'customerNo', align: 'center', width: '160px' }, - { text: '公司规模', value: 'customerName', align: 'center', width: '160px' }, + { text: '分包项目编号', value: 'outsourcerNo', align: 'center', width: '160px' }, + { text: '公司名称', value: 'outsourcerName', align: 'center', width: '160px' }, + { text: '公司规模', value: 'outsourcerSize', align: 'center', width: '160px' }, { text: '业务规模', value: 'reciever', align: 'center', width: '180px' }, - { text: '履约评级', value: 'deliverer', align: 'center', width: '180px' }, - { text: '整体评价', value: 'deliverTime', align: 'center', width: '180px' }, + { text: '履约评级', value: 'grade', align: 'center', width: '180px' }, + { text: '整体评价', value: 'businessSizeName', align: 'center', width: '180px' }, { text: '业务内容', value: 'deliverTime', align: 'center', width: '180px' }, - { text: '公司地址', value: 'deliverTime', align: 'center', width: '180px' }, - { text: '创建时间', value: 'deliverTime', align: 'center', width: '180px' }, - { text: '审批状态', value: 'deliverTime', align: 'center', width: '180px' }, + { text: '公司地址', value: 'fullAddress', align: 'center', width: '180px' }, + { text: '创建时间', value: 'createTime', align: 'center', width: '180px' }, + { text: '审批状态', value: 'approvalStatusName', align: 'center', width: '180px' }, ]) const list = ref([]) const total = ref(0) @@ -77,12 +77,12 @@ loadingTable.value = false getListPage(listQuery.value).then((response) => { list.value = response.data.rows - let interfaceStr = '' - for (const key in response.data.rows[0]) { - const item = response.data.rows[0][key] - interfaceStr += `${key}:${typeof (item)}\n` - } - console.log(interfaceStr) + // let interfaceStr = '' + // for (const key in response.data.rows[0]) { + // const item = response.data.rows[0][key] + // interfaceStr += `${key}:${typeof (item)}\n` + // } + // console.log(interfaceStr) total.value = parseInt(response.data.total) loadingTable.value = false }) @@ -94,8 +94,8 @@ applicantEndTime: '', // 开始时间 applicantName: '', // 申请人名称 applicantStartTime: '', // 结束时间 - approvalStatus: '', // 申请状态 - formId: '', // 表单id + approvalStatus: active.value, // 申请状态, // 申请状态 + formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id outsourcerName: '', // 分包方名称 projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 @@ -135,13 +135,14 @@ } // 详情或者编辑 -const handleEdit = (row, status) => { - +const handleEdit = (row: IApproveList, status: string) => { + // if (status !== 'edit') { + // detail({ id: row.id }).then((res) => { + // console.log(res) + // }) + // } } -// 取消 -const handleCancle = (row) => { -} // 获取字典值 const getDict = async () => { // 审批状态 @@ -168,7 +169,7 @@ onMounted(async () => { await getDict() - if (window.sessionStorage.getItem(TabActiveButton) !== 'undefined' && window.sessionStorage.getItem(TabActiveButton) !== '' && window.sessionStorage.getItem(TabActiveButton) !== null) { + if (window.sessionStorage.getItem(TabActiveButton)) { active.value = window.sessionStorage.getItem(TabActiveButton)! } else { @@ -224,9 +225,6 @@ 详情 - - 取消 - diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue index 7097ea2..ada0f7b 100644 --- a/src/views/business/subpackage/certificate/list.vue +++ b/src/views/business/subpackage/certificate/list.vue @@ -1,11 +1,169 @@ diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue index 74beb9a..16c1f13 100644 --- a/src/views/business/subpackage/check/list.vue +++ b/src/views/business/subpackage/check/list.vue @@ -12,7 +12,7 @@ import type { IMenu } from '@/components/buttonBox/buttonBox' import { SCHEDULE } from '@/utils/scheduleDict' import ButtonBox from '@/components/buttonBox/buttonBox.vue' -import { getListPage } from '@/api/business/subpackage/check' +import { detail, getListPage } from '@/api/business/subpackage/check' const $router = useRouter() const { proxy } = getCurrentInstance() as any @@ -126,7 +126,11 @@ } // 详情或者编辑 const handleEdit = (row: IApplyList, status: string) => { - + if (status !== 'edit') { + detail({ id: row.id }).then((res) => { + console.log(res) + }) + } } // 取消 const handleCancle = (row: IApplyList) => { @@ -226,9 +230,6 @@ 详情 - - 取消 - diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue index 06c54b6..209a440 100644 --- a/src/views/business/subpackage/record/list.vue +++ b/src/views/business/subpackage/record/list.vue @@ -8,12 +8,13 @@ import { exportFile } from '@/utils/exportUtils' import type { TableColumn } from '@/components/NormalTable/table_interface' import { getListPage } from '@/api/business/subpackage/record' +import { SCHEDULE } from '@/utils/scheduleDict' const $router = useRouter() const { proxy } = getCurrentInstance() as any // 查询条件 const listQuery: Ref = ref({ businessSize: '', // 业务规模-字典code - formId: '', + formId: SCHEDULE.BUSINESS_SUBPACKAGE_RECORD, // 表单id grade: '', // 履约评级-字典code ids: [], outsourcerName: '', // 分包方公司名字 diff --git a/src/views/business/subpackage/subpackage-interface.ts b/src/views/business/subpackage/subpackage-interface.ts index 763f9dc..366c571 100644 --- a/src/views/business/subpackage/subpackage-interface.ts +++ b/src/views/business/subpackage/subpackage-interface.ts @@ -51,6 +51,31 @@ limit: number } +export interface IApproveList { + addressAreaName: string // 公司地址-区 + addressCityName: string // 公司地址-市 + addressCountryName: string // 公司地址-国家 + addressProvinceName: string // 公司地址-省 + approvalStatus: string // 审批状态类型-字典code + approvalStatusName: string // 审批状态类型-字典value + businessContent: string // 业务内容 + businessSize: string // 业务规模-字典code + businessSizeName: string // 业务规模-字典value + createTime: string // 创建时间 + decisionItem: string | number // 可选决策项(1同意驳回拒绝 2同意驳回 3同意拒绝,用于待审批列表同意/驳回/拒绝按钮展示) + evaluation: string // 整体评价-字典code + evaluationName: string // 整体评价-字典value + fullAddress: string // 公司地址-详细地址 + grade: string // 履约评级-字典code + gradeName: string // 履约评级-字典value + id: string | number // 主键id + outsourcerName: string // 分包方公司名字 + outsourcerNo: string // 分包方编号 + outsourcerSize: string // 分包方公司规模 + processId: string // 流程实例id + taskId: string // 任务id(同意、驳回等操作使用) +} + // 分包方档案查询参数 export interface IListQueryRecord { businessSize: string // 业务规模-字典code diff --git a/src/views/login_register.vue b/src/views/login_register.vue index e63b0e6..943dcc9 100644 --- a/src/views/login_register.vue +++ b/src/views/login_register.vue @@ -185,6 +185,7 @@ handleLogin() } onBeforeMount(() => { + // 获取当前标识 loginForm.value.username = localStorage.login_username || '' getBaseConfig() }) @@ -376,7 +377,7 @@ - + diff --git a/src/views/system/tool/fileConfiguration/addDDialog.vue b/src/views/system/tool/fileConfiguration/addDDialog.vue new file mode 100644 index 0000000..69b5832 --- /dev/null +++ b/src/views/system/tool/fileConfiguration/addDDialog.vue @@ -0,0 +1,245 @@ + + + + + + diff --git a/src/views/system/tool/fileConfiguration/configuration.vue b/src/views/system/tool/fileConfiguration/configuration.vue new file mode 100644 index 0000000..21b4230 --- /dev/null +++ b/src/views/system/tool/fileConfiguration/configuration.vue @@ -0,0 +1,232 @@ + + + + + +