diff --git a/.env.development b/.env.development index 595e335..24a087f 100644 --- a/.env.development +++ b/.env.development @@ -5,7 +5,7 @@ VITE_APP_TITLE = 煤科建管平台 VITE_APP_ENV = 'development' # 开发环境 -VITE_APP_BASE_API = 'http://192.168.110.149:8899' +VITE_APP_BASE_API = 'http://192.168.110.180:8899' # 李陈杰 209 # 曾涛 # VITE_APP_BASE_API = 'http://192.168.110.180:8899' diff --git a/src/api/safety/questionBank/index.ts b/src/api/safety/questionBank/index.ts index 7427f9f..540ba08 100644 --- a/src/api/safety/questionBank/index.ts +++ b/src/api/safety/questionBank/index.ts @@ -1,6 +1,6 @@ import request from '@/utils/request'; import { AxiosPromise } from 'axios'; -import { QuestionBankVO, QuestionBankForm, QuestionBankQuery } from '@/api/safety/questionBank/types'; +import { QuestionBankVO, QuestionBankForm, QuestionBankQuery } from '@/api/safety/wgzQuestionBank/types'; /** * 查询题库列表 @@ -10,7 +10,7 @@ import { QuestionBankVO, QuestionBankForm, QuestionBankQuery } from '@/api/safet export const listQuestionBank = (query?: QuestionBankQuery): AxiosPromise => { return request({ - url: '/safety/questionBank/list', + url: '/safety/wgzQuestionBank/list', method: 'get', params: query }); @@ -22,7 +22,7 @@ export const listQuestionBank = (query?: QuestionBankQuery): AxiosPromise => { return request({ - url: '/safety/questionBank/' + id, + url: '/safety/wgzQuestionBank/' + id, method: 'get' }); }; @@ -33,7 +33,7 @@ export const getQuestionBank = (id: string | number): AxiosPromise { return request({ - url: '/safety/questionBank', + url: '/safety/wgzQuestionBank', method: 'post', data: data }); @@ -45,7 +45,7 @@ export const addQuestionBank = (data: QuestionBankForm) => { */ export const updateQuestionBank = (data: QuestionBankForm) => { return request({ - url: '/safety/questionBank', + url: '/safety/wgzQuestionBank', method: 'put', data: data }); @@ -57,7 +57,7 @@ export const updateQuestionBank = (data: QuestionBankForm) => { */ export const delQuestionBank = (id: string | number | Array) => { return request({ - url: '/safety/questionBank/' + id, + url: '/safety/wgzQuestionBank/' + id, method: 'delete' }); }; diff --git a/src/api/safety/questionUserAnswer/index.ts b/src/api/safety/questionUserAnswer/index.ts index 430d505..de3d40c 100644 --- a/src/api/safety/questionUserAnswer/index.ts +++ b/src/api/safety/questionUserAnswer/index.ts @@ -1,6 +1,6 @@ import request from '@/utils/request'; import { AxiosPromise } from 'axios'; -import { QuestionUserAnswerVO, QuestionUserAnswerForm, QuestionUserAnswerQuery } from '@/api/safety/questionUserAnswer/types'; +import { QuestionUserAnswerVO, QuestionUserAnswerForm, QuestionUserAnswerQuery } from '@/api/safety/wgzQuestionSave/types'; /** * 查询用户试卷存储列表 @@ -10,7 +10,7 @@ import { QuestionUserAnswerVO, QuestionUserAnswerForm, QuestionUserAnswerQuery } export const listQuestionUserAnswer = (query?: QuestionUserAnswerQuery): AxiosPromise => { return request({ - url: '/safety/questionUserAnswer/list', + url: '/safety/wgzQuestionSave/list', method: 'get', params: query }); @@ -22,7 +22,7 @@ export const listQuestionUserAnswer = (query?: QuestionUserAnswerQuery): AxiosPr */ export const getQuestionUserAnswer = (id: string | number): AxiosPromise => { return request({ - url: '/safety/questionUserAnswer/' + id, + url: '/safety/wgzQuestionSave/' + id, method: 'get' }); }; @@ -33,7 +33,7 @@ export const getQuestionUserAnswer = (id: string | number): AxiosPromise { return request({ - url: '/safety/questionUserAnswer', + url: '/safety/wgzQuestionSave', method: 'post', data: data }); @@ -45,7 +45,7 @@ export const addQuestionUserAnswer = (data: QuestionUserAnswerForm) => { */ export const updateQuestionUserAnswer = (data: QuestionUserAnswerForm) => { return request({ - url: '/safety/questionUserAnswer', + url: '/safety/wgzQuestionSave', method: 'put', data: data }); @@ -57,7 +57,7 @@ export const updateQuestionUserAnswer = (data: QuestionUserAnswerForm) => { */ export const delQuestionUserAnswer = (id: string | number | Array) => { return request({ - url: '/safety/questionUserAnswer/' + id, + url: '/safety/wgzQuestionSave/' + id, method: 'delete' }); }; @@ -68,7 +68,7 @@ export const delQuestionUserAnswer = (id: string | number | Array { return request({ - url: '/safety/questionUserAnswer/upload/zip', + url: '/safety/wgzQuestionSave/upload/zip', method: 'post', data: data }); diff --git a/src/api/safety/questionsCategory/index.ts b/src/api/safety/questionsCategory/index.ts index a69e77d..06d3cad 100644 --- a/src/api/safety/questionsCategory/index.ts +++ b/src/api/safety/questionsCategory/index.ts @@ -10,7 +10,7 @@ import { QuestionsCategoryVO, QuestionsCategoryForm, QuestionsCategoryQuery } fr export const listQuestionsCategory = (query?: QuestionsCategoryQuery): AxiosPromise => { return request({ - url: '/safety/questionsCategory/list', + url: '/safety/wzgQuestionCategory/list', method: 'get', params: query }); @@ -22,7 +22,7 @@ export const listQuestionsCategory = (query?: QuestionsCategoryQuery): AxiosProm */ export const getQuestionsCategory = (id: string | number): AxiosPromise => { return request({ - url: '/safety/questionsCategory/' + id, + url: '/safety/wzgQuestionCategory' + id, method: 'get' }); }; @@ -33,7 +33,7 @@ export const getQuestionsCategory = (id: string | number): AxiosPromise { return request({ - url: '/safety/questionsCategory', + url: '/safety/wzgQuestionCategory', method: 'post', data: data }); @@ -45,7 +45,7 @@ export const addQuestionsCategory = (data: QuestionsCategoryForm) => { */ export const updateQuestionsCategory = (data: QuestionsCategoryForm) => { return request({ - url: '/safety/questionsCategory', + url: '/safety/wzgQuestionCategory', method: 'put', data: data }); @@ -57,7 +57,7 @@ export const updateQuestionsCategory = (data: QuestionsCategoryForm) => { */ export const delQuestionsCategory = (id: string | number | Array) => { return request({ - url: '/safety/questionsCategory/' + id, + url: '/safety/wzgQuestionCategory' + id, method: 'delete' }); }; diff --git a/src/api/safety/questionsConfig/index.ts b/src/api/safety/questionsConfig/index.ts index 3c613ec..4969332 100644 --- a/src/api/safety/questionsConfig/index.ts +++ b/src/api/safety/questionsConfig/index.ts @@ -22,7 +22,7 @@ export const listQuestionsConfig = (query?: QuestionsConfigQuery): AxiosPromise< */ export const getQuestionsConfig = (id: string | number): AxiosPromise => { return request({ - url: '/safety/questionsConfig/' + id, + url: '/safety/wzgQuestionsConfiguration/' + id, method: 'get' }); }; @@ -45,7 +45,7 @@ export const addQuestionsConfig = (data: QuestionsConfigForm) => { */ export const updateQuestionsConfig = (data: QuestionsConfigForm) => { return request({ - url: '/safety/questionsConfig', + url: '/safety/wzgQuestionsConfiguration', method: 'put', data: data }); diff --git a/src/components/TopNav/index.vue b/src/components/TopNav/index.vue index 32357e3..39c3a6e 100644 --- a/src/components/TopNav/index.vue +++ b/src/components/TopNav/index.vue @@ -170,8 +170,6 @@ onMounted(() => { //分页 const getWaitingList = () => { pageByTaskWait({ pageNum: 1, pageSize: 10 }).then((resp) => { - console.log(resp); - total.value = resp.total; }); }; diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 3fd0fd8..21f7710 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -17,7 +17,7 @@ { - if (onlyOneChild.value.meta?.title == '我的待办') { + if (onlyOneChild.value.meta?.title == '我的待办' || props.item.meta?.title == '我的任务') { getWaitingList(); } - if (onlyOneChild.value.meta?.title == '我的抄送') { + if (onlyOneChild.value.meta?.title == '我的抄送') { getChaoList(); } }); @@ -130,9 +130,7 @@ const hasTitle = (title: string | undefined): string => { watch( () => noticeStore.state.value.notices, (newVal) => { - if (onlyOneChild.value.meta?.title == '我的待办') { - console.log(121212121); - + if (onlyOneChild.value.meta?.title == '我的待办' || props.item.meta?.title == '我的任务') { let time = setTimeout(() => { getWaitingList(); clearTimeout(time); diff --git a/src/views/design/received/index.vue b/src/views/design/received/index.vue index 3dfa5ef..cb81327 100644 --- a/src/views/design/received/index.vue +++ b/src/views/design/received/index.vue @@ -62,13 +62,13 @@ :accept="'.xlsx,.xls'" :limit="1" > - 导入文件 + 导入文件 diff --git a/src/views/formalities/listOfFormalities/index.vue b/src/views/formalities/listOfFormalities/index.vue index 24c2bac..ed712fc 100644 --- a/src/views/formalities/listOfFormalities/index.vue +++ b/src/views/formalities/listOfFormalities/index.vue @@ -1,9 +1,7 @@ - - + @@ -59,21 +62,19 @@ - - + @@ -196,35 +197,15 @@ const handleSelectionChange = (selection: QuestionUserAnswerVO[]) => { multiple.value = !selection.length; }; -/** 修改按钮操作 */ -// const handleUpdate = async (row?: QuestionUserAnswerVO) => { -// reset(); -// const _id = row?.id || ids.value[0]; -// const res = await getQuestionUserAnswer(_id); -// Object.assign(form.value, res.data); -// dialog.visible = true; -// dialog.title = '修改用户试卷存储'; -// }; - /** 批量下载按钮操作 */ const handleDownload = async () => { const _ids = ids.value; - await downLoadOss({ idList: _ids }, '/safety/questionUserAnswer/exportFile', '安全考试.zip'); + await downLoadOss({ idList: _ids }, '/safety/wgzQuestionSave/exportFile', '安全考试.zip'); }; /** 下载单个按钮操作 */ const downloadOssOne = async (row?: QuestionUserAnswerVO) => { await download.oss(row?.file); }; - -// const fileWatch = watch( -// () => filePath.value, -// (nid, oid) => { -// uploadQuestionUserAnswer({ file: filePath.value, projectId: currentProject.value?.id }).then((res) => { -// console.log(res); -// }); -// } -// ); - //监听项目id刷新数据 const listeningProject = watch( () => currentProject.value?.id, diff --git a/src/views/safety/questionsCategory/index.vue b/src/views/safety/questionsCategory/index.vue index e46f30c..d96e8eb 100644 --- a/src/views/safety/questionsCategory/index.vue +++ b/src/views/safety/questionsCategory/index.vue @@ -22,38 +22,21 @@ 新增 - - 修改 - - - 删除 - - - + diff --git a/src/views/safety/questionsConfig/index.vue b/src/views/safety/questionsConfig/index.vue index 669ca3a..282c309 100644 --- a/src/views/safety/questionsConfig/index.vue +++ b/src/views/safety/questionsConfig/index.vue @@ -1,309 +1,220 @@ + + diff --git a/src/views/system/user/comm/editInfo.vue b/src/views/system/user/comm/editInfo.vue index 1e8b39d..7168cee 100644 --- a/src/views/system/user/comm/editInfo.vue +++ b/src/views/system/user/comm/editInfo.vue @@ -192,12 +192,12 @@ async function handleDeptChange(value: number | string) { ]; } -const submitForm = () => { +const submitForm = (cb) => { userFormRef.value?.validate(async (valid: boolean) => { if (valid) { - form.value.userId ? await api.updateUser(form.value) : await api.addUser(form.value); - proxy?.$modal.msgSuccess('操作成功'); - proxy?.$emit('submit', false); + // form.value.userId ? await api.updateUser(form.value) : await api.addUser(form.value); + // proxy?.$modal.msgSuccess('操作成功'); + cb(); } }); }; @@ -243,7 +243,7 @@ const getInfoForm = () => { onMounted(() => { getDeptTree(); }); -defineExpose({ open, getInfoForm }); +defineExpose({ open, getInfoForm, submitForm });