From 5940dfa4aa2869cfffa8a845a75ee2b058e69213 Mon Sep 17 00:00:00 2001 From: ailanyin Date: Fri, 9 Jun 2023 17:30:58 +0800 Subject: [PATCH] research update --- Caddyfile | 19 + src/api/dataList/research.js | 75 +-- src/components/InfiniteSelect/index.vue | 5 +- src/layout/components/Sidebar/SidebarItem.vue | 84 +-- src/store/modules/user.js | 318 +++++----- src/views/approval/dataList/add.vue | 105 ---- src/views/approval/dataList/index.vue | 225 ------- src/views/components/AgentForm/index.vue | 13 +- src/views/components/ExpertForm/index.vue | 27 +- src/views/components/FieldSingle/index.vue | 213 ++++--- src/views/components/LaboratoryForm/index.vue | 7 +- src/views/components/ReleaseForm/index.vue | 7 +- src/views/components/ResearchForm/index.vue | 192 +++--- .../Enterpriseproducts/approval.vue | 7 +- src/views/dataList/agent/index.vue | 162 +++++ src/views/dataList/enterprise/index.vue | 441 +++++++------- src/views/dataList/expert/index.vue | 6 +- src/views/dataList/laboratory/index.vue | 4 +- .../dataList/research-institutions/add.vue | 60 +- .../dataList/research-institutions/index.vue | 108 ++-- src/views/expert/dataList/approval.vue | 100 ---- src/views/expert/dataList/index.vue | 153 ----- src/views/system/user/index.vue | 4 +- src/views/userAuditList/enterprise/add.vue | 83 +-- src/views/userAuditList/enterprise/index.vue | 44 +- src/views/userAuditList/expert/approval.vue | 102 +--- src/views/userAuditList/expert/index.vue | 35 +- .../userAuditList/laboratory/approval.vue | 52 +- src/views/userAuditList/laboratory/index.vue | 4 +- src/views/userAuditList/research/approval.vue | 72 +++ src/views/userAuditList/research/index.vue | 552 ++++++++++++++++++ 31 files changed, 1648 insertions(+), 1631 deletions(-) create mode 100644 Caddyfile delete mode 100644 src/views/approval/dataList/add.vue delete mode 100644 src/views/approval/dataList/index.vue create mode 100644 src/views/dataList/agent/index.vue delete mode 100644 src/views/expert/dataList/approval.vue delete mode 100644 src/views/expert/dataList/index.vue create mode 100644 src/views/userAuditList/research/approval.vue create mode 100644 src/views/userAuditList/research/index.vue diff --git a/Caddyfile b/Caddyfile new file mode 100644 index 0000000..5d8937f --- /dev/null +++ b/Caddyfile @@ -0,0 +1,19 @@ +#{ +# http_port 4163 +# https_port 4173 +#} + +:4173 { + handle_path /api/* { + reverse_proxy 192.168.0.201:1618 + } + handle { + root * "/Volumes/iMac Doc/WebstormProjects/cas_cloud_admin/dist" + file_server + try_files {path} / + } +} + +#localhost:4173 { +# redir https://192.168.0.200:4173{uri} +#} diff --git a/src/api/dataList/research.js b/src/api/dataList/research.js index 8888fe2..75c7ecf 100644 --- a/src/api/dataList/research.js +++ b/src/api/dataList/research.js @@ -1,50 +1,55 @@ import request from '@/utils/request' -// 科研机构信息 -export function researchList(data) { - return request({ - url: '/admin/v1/manage/research', - method: 'post', - data, - }) + +// 科研机构列表 +export function researchList(params) { + return request({ + url: '/business/casResearch/list', + method: 'GET', + params, + }) } + // 科研机构筛选信息 export function researchSelect(data) { - return request({ - url: '/admin/v1/manage/research/select', - method: 'post', - data, - }) + return request({ + url: '/admin/v1/manage/research/select', + method: 'post', + data, + }) } + // 科研机构信息添加 export function researchAdd(data) { - return request({ - url: '/admin/v1/manage/research/add', - method: 'post', - data, - }) + return request({ + url: '/business/casResearch', + method: 'post', + data, + }) } + // 科研机构信息修改 export function researchEdit(data) { - return request({ - url: '/admin/v1/manage/research/edit', - method: 'post', - data, - }) + return request({ + url: '/business/casResearch', + method: 'PUT', + data, + }) } + // 科研机构详细信息 -export function researchDetail(data) { - return request({ - url: '/admin/v1/manage/research/detail', - method: 'post', - data, - }) +export function researchDetail(id) { + return request({ + url: `/business/casResearch/${id}`, + method: 'GET', + }) } -// 科研机构审核操作 -export function researchExamine(data) { - return request({ - url: '/admin/v1/manage/research/examine', - method: 'post', - data, - }) + +// 科研机构详细信息 +export function researchDelete(ids) { + return request({ + url: `/business/casResearch/${ids}`, + method: 'DELETE', + }) } + diff --git a/src/components/InfiniteSelect/index.vue b/src/components/InfiniteSelect/index.vue index 35d474f..749e9de 100644 --- a/src/components/InfiniteSelect/index.vue +++ b/src/components/InfiniteSelect/index.vue @@ -134,14 +134,13 @@ const handleInputChange = debounce((value) => { watchEffect(() => { if (showPopOver.value) return; if (modelValue.value) { - console.log(modelValue.value) optionLabelWhenNotShowPop.value = options.value.find((el) => el[props.prop.value] === modelValue.value)?.[ props.prop.label ] ?? (echoLabel.value.length ? echoLabel.value : null) ?? - props.defaultLabel ?? - "..."; + props.defaultLabel ?? + "..."; } else { optionLabelWhenNotShowPop.value = ""; placeholderWhenNotShowPop.value = props.placeholder; diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index c9725a4..90ef6a2 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -1,7 +1,7 @@ @@ -86,9 +87,9 @@ - - diff --git a/src/views/approval/dataList/index.vue b/src/views/approval/dataList/index.vue deleted file mode 100644 index ed14090..0000000 --- a/src/views/approval/dataList/index.vue +++ /dev/null @@ -1,225 +0,0 @@ - - - - diff --git a/src/views/components/AgentForm/index.vue b/src/views/components/AgentForm/index.vue index 81b6082..2b8edf4 100644 --- a/src/views/components/AgentForm/index.vue +++ b/src/views/components/AgentForm/index.vue @@ -244,21 +244,16 @@ export default { font-weight: 700; margin-bottom: 30px; } -::v-deep .el-upload--picture-card { +:deep(.el-upload--picture-card) { width: 100%; } -::v-deep .hide { +:deep(.hide) { height: 148px; } -::v-deep .el-upload-list--picture-card .el-upload-list__item { +:deep(.el-upload-list--picture-card .el-upload-list__item) { width: 100%; } -// 上传图片框限制 -// ::v-deep .el-upload--picture-card { -// width: 120px; -// height: 120px; -// line-height: 120px; -// } + .el-select, .el-date-editor { display: block; diff --git a/src/views/components/ExpertForm/index.vue b/src/views/components/ExpertForm/index.vue index c2b7219..a7ad6f2 100644 --- a/src/views/components/ExpertForm/index.vue +++ b/src/views/components/ExpertForm/index.vue @@ -152,8 +152,17 @@ - + + + + + @@ -175,16 +184,16 @@ - + - - - - - + + + + + @@ -344,6 +353,7 @@ import WangEditor from "@/components/WangEditor/index.vue"; import FieldOptions from "@/views/components/FieldOptions"; import {casLaboratoryList} from "@/api/dataList/laboratory"; import InfiniteSelect from '@/components/InfiniteSelect' +import {researchList} from "@/api/dataList/research"; const props = defineProps({ @@ -482,6 +492,7 @@ const getSiteList = async () => { }; const loadLabOptions = (query) => casLaboratoryList({...query, examineStatus: "1"}).then(resp => resp.rows) +const loadResearchOptions = (query) => researchList({...query, examineStatus: "1"}).then(resp => resp.rows) getSiteList(); defineExpose({ validateForm, diff --git a/src/views/components/FieldSingle/index.vue b/src/views/components/FieldSingle/index.vue index 327d96a..6ca32c4 100644 --- a/src/views/components/FieldSingle/index.vue +++ b/src/views/components/FieldSingle/index.vue @@ -1,28 +1,27 @@ - \ No newline at end of file + +const levelIChange = async (item) => { + delete modelValue.value.industrys[1]; + delete modelValue.value.industrys[2]; + // levelII.value = levelI.value.find((el) => { + // return el.id === item; + // }).children; +}; + +const levelIIChange = async (item) => { + delete modelValue.value.industrys[2]; + // levelIII.value = levelII.value.find((el) => el.id === item).children; +}; +getIndustryTreeData().then(() => { + watch( + () => modelValue.value.industrys[0], + (val) => { + levelII.value = + levelI.value.find((el) => { + return el.id == val; + })?.children ?? []; + }, + {immediate: true} + ); + watch( + () => modelValue.value.industrys[1], + (val) => { + levelIII.value = + levelII.value.find((el) => { + return el.id == val; + })?.children ?? []; + }, + {immediate: true} + ); +}); + + diff --git a/src/views/components/LaboratoryForm/index.vue b/src/views/components/LaboratoryForm/index.vue index bf5ba7e..e6c8deb 100644 --- a/src/views/components/LaboratoryForm/index.vue +++ b/src/views/components/LaboratoryForm/index.vue @@ -357,12 +357,7 @@ export default { margin-bottom: 30px; } -// 上传图片框限制 -// ::v-deep .el-upload--picture-card { -// width: 120px; -// height: 120px; -// line-height: 120px; -// } + .el-select, .el-date-editor { display: block; diff --git a/src/views/components/ReleaseForm/index.vue b/src/views/components/ReleaseForm/index.vue index a5ac080..0874996 100644 --- a/src/views/components/ReleaseForm/index.vue +++ b/src/views/components/ReleaseForm/index.vue @@ -210,12 +210,7 @@ export default { font-weight: 700; margin-bottom: 30px; } -// 上传图片框限制 -// ::v-deep .el-upload--picture-card { -// width: 120px; -// height: 120px; -// line-height: 120px; -// } + .el-select, .el-date-editor { display: block; diff --git a/src/views/components/ResearchForm/index.vue b/src/views/components/ResearchForm/index.vue index 2a4d027..6e962cd 100644 --- a/src/views/components/ResearchForm/index.vue +++ b/src/views/components/ResearchForm/index.vue @@ -1,15 +1,15 @@ - - diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index da3a501..0e1c227 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -356,7 +356,7 @@ import { changeUserStatus, listUser, resetUserPwd, delUser, getUser, updateUser, const router = useRouter(); const { proxy } = getCurrentInstance(); const { sys_normal_disable, sys_user_sex } = proxy.useDict("sys_normal_disable", "sys_user_sex"); - +import md5 from 'js-md5' const userList = ref([]); const open = ref(false); const loading = ref(true); @@ -513,7 +513,7 @@ function handleResetPwd(row) { inputPattern: /^.{5,20}$/, inputErrorMessage: "用户密码长度必须介于 5 和 20 之间", }).then(({ value }) => { - resetUserPwd(row.userId, value).then(response => { + resetUserPwd(row.userId, md5(value)).then(response => { proxy.$modal.msgSuccess("修改成功,新密码是:" + value); }); }).catch(() => {}); diff --git a/src/views/userAuditList/enterprise/add.vue b/src/views/userAuditList/enterprise/add.vue index 4e1ebeb..35d05d6 100644 --- a/src/views/userAuditList/enterprise/add.vue +++ b/src/views/userAuditList/enterprise/add.vue @@ -2,42 +2,42 @@
审核拒绝 通过审核 - +
- - diff --git a/src/views/userAuditList/enterprise/index.vue b/src/views/userAuditList/enterprise/index.vue index 24e3e4f..ed14090 100644 --- a/src/views/userAuditList/enterprise/index.vue +++ b/src/views/userAuditList/enterprise/index.vue @@ -32,13 +32,13 @@ - - + - + --> {{ row.industrys[row.industrys.length - 1] }} - + - - - diff --git a/src/views/userAuditList/expert/index.vue b/src/views/userAuditList/expert/index.vue index 4488f9f..19ba0e0 100644 --- a/src/views/userAuditList/expert/index.vue +++ b/src/views/userAuditList/expert/index.vue @@ -16,17 +16,18 @@ class="m-2" placeholder="请选择" > + - + - + - - + - + diff --git a/src/views/userAuditList/laboratory/approval.vue b/src/views/userAuditList/laboratory/approval.vue index 6513a13..468f071 100644 --- a/src/views/userAuditList/laboratory/approval.vue +++ b/src/views/userAuditList/laboratory/approval.vue @@ -51,8 +51,9 @@ const data = reactive({ }); const {form} = toRefs(data); const cancel = () => { - router.back(); - tab.closeOpenPage(); + tab.closeOpenPage({ + path: "/approval/data-list/laboratory" + }); }; const submitForm = async (state) => { form.value.examineStatus = state; @@ -61,55 +62,16 @@ const submitForm = async (state) => { examineStatus: state }); cancel() - - // const valid = await expertFormRef.value.validateForm(); - // if (valid) { - // if (form.value.id !== undefined) { - // form.value.examineStatus = state; - // await casLaboratoryUpdate(form.value); - // cancel(); - // ElMessage.success("修改成功"); - // }/* else { - // await companyAdd(form.value); - // useUserStore().getApprovalCount(); - // cancel(); - // ElMessage.success("新增成功"); - // }*/ - // } else { - // console.log("校验未通过"); - // } }; const getDetailById = async () => { if (route.query.id) { const {data} = await casLaboratoryDetail(route.query.id); form.value = data; - form.value.researchDirection = data.researchDirection?.split(",") - form.value.district = data.area; + form.value.researchs = data.researchDirection?.split(",") ?? [] + form.value.keywords = data.keyword?.split(",") ?? [] + form.value.member = data.member?.split(",") ?? "" } }; getDetailById(); - - - + \ No newline at end of file diff --git a/src/views/userAuditList/laboratory/index.vue b/src/views/userAuditList/laboratory/index.vue index bccd124..adc008b 100644 --- a/src/views/userAuditList/laboratory/index.vue +++ b/src/views/userAuditList/laboratory/index.vue @@ -38,7 +38,7 @@ - + @@ -121,7 +121,7 @@ const examineStatusDict = { 1: "已通过", 2: "已拒绝", }; -// 获取专家列表 +// 获取列表 const getList = async () => { const res = await casLaboratoryList(queryData.value); dataList.value = res.rows; diff --git a/src/views/userAuditList/research/approval.vue b/src/views/userAuditList/research/approval.vue new file mode 100644 index 0000000..a11ba18 --- /dev/null +++ b/src/views/userAuditList/research/approval.vue @@ -0,0 +1,72 @@ + + + diff --git a/src/views/userAuditList/research/index.vue b/src/views/userAuditList/research/index.vue new file mode 100644 index 0000000..1731698 --- /dev/null +++ b/src/views/userAuditList/research/index.vue @@ -0,0 +1,552 @@ + + +