bugfix
This commit is contained in:
@ -1,17 +1,28 @@
|
|||||||
import request from "@/utils/request";
|
import request from "@/utils/request";
|
||||||
|
|
||||||
// 实验室专利成果
|
// 专家成果
|
||||||
export const achievementList = (params) => {
|
export const achievementList = (params) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/app/laboratory/achievementList`,
|
url: `/app/laboratory/achievementList`,
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params,
|
params,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 实验室成果
|
||||||
|
export const laboratoryAchievementList = (params) => {
|
||||||
|
return request({
|
||||||
|
url: `/app/laboratory/laboratoryAchievementList`,
|
||||||
|
method: "GET",
|
||||||
|
params,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
export const deleteAchievements = (ids) => {
|
export const deleteAchievements = (ids) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/app/laboratory/deleteAchievements/${ids}`,
|
url: `/app/laboratory/deleteAchievements/${ids}`,
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ export const deleteLabPatentByIds = (ids) => {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 实验室专利列表
|
* 实验室未绑定专家列表
|
||||||
* @param params
|
* @param params
|
||||||
* @return {*}
|
* @return {*}
|
||||||
*/
|
*/
|
||||||
|
@ -2,16 +2,25 @@ import request from "@/utils/request";
|
|||||||
|
|
||||||
// 实验室专利成果
|
// 实验室专利成果
|
||||||
export const achievementList = (params) => {
|
export const achievementList = (params) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/app/research/achievementList`,
|
url: `/app/research/achievementList`,
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params,
|
params,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 科研成果
|
||||||
|
export const researchAchievementList = (params) => {
|
||||||
|
return request({
|
||||||
|
url: `/app/research/researchAchievementList`,
|
||||||
|
method: "GET",
|
||||||
|
params,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
export const deleteAchievements = (ids) => {
|
export const deleteAchievements = (ids) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/app/research/deleteAchievements/${ids}`,
|
url: `/app/research/deleteAchievements/${ids}`,
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
22
src/assets/achievement_import_description.txt
Normal file
22
src/assets/achievement_import_description.txt
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
1. ʡ<><CAA1><EFBFBD><EFBFBD><EFBFBD>ͺ<EFBFBD>̨<EFBFBD><CCA8>Ӧ(<28><><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>д<EFBFBD>ɰ<EFBFBD><C9B0><EFBFBD>ʡ, <20>Ϸ<EFBFBD><CFB7>в<EFBFBD><D0B2><EFBFBD>д<EFBFBD>ɺϷ<C9BA>)
|
||||||
|
|
||||||
|
2. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
a. ͨ<><CDA8> > <20><><EFBFBD><EFBFBD>
|
||||||
|
<09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҽҩ><3E><>ҩ<EFBFBD><D2A9><EFBFBD><EFBFBD>Ȼҩ<C8BB><D2A9>><3E><><EFBFBD><EFBFBD>ҩ<EFBFBD><D2A9><EFBFBD>з<EFBFBD><D0B7><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
b. <20><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8> / <20><><EFBFBD><EFBFBD>
|
||||||
|
<09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҽҩ><3E><>ҩ<EFBFBD><D2A9><EFBFBD><EFBFBD>Ȼҩ<C8BB><D2A9>><3E><><EFBFBD><EFBFBD>ҩ<EFBFBD><D2A9><EFBFBD>з<EFBFBD><D0B7><EFBFBD><EFBFBD><EFBFBD>/<2F><EFBFBD><DFBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>֪ʶ<D6AA><CAB6>Ȩ<EFBFBD><C8A8><EFBFBD>ɹ<EFBFBD>ת<EFBFBD><D7AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
3. Ӧ<>ÿͻ<C3BF>
|
||||||
|
<09><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8> , (Ӣ<>Ķ<EFBFBD><C4B6><EFBFBD>) <20><><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
4. <20>ؼ<EFBFBD><D8BC><EFBFBD>
|
||||||
|
<09><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8> , (Ӣ<>Ķ<EFBFBD><C4B6><EFBFBD>) <20><><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
5. <20>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
||||||
|
<09><><EFBFBD><EFBFBD><EFBFBD>з<EFBFBD> С<>Խ<D4BD> ͨ<><CDA8>С<EFBFBD><D0A1> <20><><EFBFBD>Խ<D4BD> ͨ<><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ɹ<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
6. <20>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
||||||
|
<09><><EFBFBD><EFBFBD><EFBFBD>Ƚ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ƚ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
7. <20><><EFBFBD><EFBFBD>ģʽ:
|
||||||
|
<09><><EFBFBD><EFBFBD>ת<EFBFBD><D7AA> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>˾ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>г<EFBFBD><D0B3>ƹ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
BIN
src/assets/achievement_import_template.xlsx
Normal file
BIN
src/assets/achievement_import_template.xlsx
Normal file
Binary file not shown.
@ -1,24 +1,24 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="component-upload-image">
|
<div class="component-upload-image">
|
||||||
<el-upload
|
<el-upload
|
||||||
:action="uploadImgUrl"
|
:action="uploadImgUrl"
|
||||||
:before-upload="handleBeforeUpload"
|
:before-upload="handleBeforeUpload"
|
||||||
:class="{ hide: fileList.length >= limit }"
|
:class="{ hide: fileList.length >= limit }"
|
||||||
:file-list="fileList"
|
:file-list="fileList"
|
||||||
:headers="headers"
|
:headers="headers"
|
||||||
:limit="limit"
|
:limit="limit"
|
||||||
:on-error="handleUploadError"
|
:on-error="handleUploadError"
|
||||||
:on-exceed="handleExceed"
|
:on-exceed="handleExceed"
|
||||||
:on-preview="handlePictureCardPreview"
|
:on-preview="handlePictureCardPreview"
|
||||||
:on-remove="handleRemove"
|
:on-remove="handleRemove"
|
||||||
:on-success="handleUploadSuccess"
|
:on-success="handleUploadSuccess"
|
||||||
:show-file-list="true"
|
:show-file-list="true"
|
||||||
list-type="picture-card"
|
list-type="picture-card"
|
||||||
multiple
|
multiple
|
||||||
name="file"
|
name="file"
|
||||||
>
|
>
|
||||||
<el-icon class="avatar-uploader-icon">
|
<el-icon class="avatar-uploader-icon">
|
||||||
<plus />
|
<plus/>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<!-- 上传提示 -->
|
<!-- 上传提示 -->
|
||||||
@ -34,21 +34,21 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-model="dialogVisible"
|
v-model="dialogVisible"
|
||||||
append-to-body
|
append-to-body
|
||||||
title="预览"
|
title="预览"
|
||||||
width="800px"
|
width="800px"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
:src="dialogImageUrl"
|
:src="dialogImageUrl"
|
||||||
style="display: block; max-width: 100%; margin: 0 auto"
|
style="display: block; max-width: 100%; margin: 0 auto"
|
||||||
/>
|
/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { getToken } from "@/utils/auth";
|
import {getToken} from "@/utils/auth";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modelValue: [String, Object, Array],
|
modelValue: [String, Object, Array],
|
||||||
@ -74,7 +74,7 @@ const props = defineProps({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance();
|
const {proxy} = getCurrentInstance();
|
||||||
const emit = defineEmits();
|
const emit = defineEmits();
|
||||||
const number = ref(0);
|
const number = ref(0);
|
||||||
const uploadList = ref([]);
|
const uploadList = ref([]);
|
||||||
@ -82,35 +82,36 @@ const dialogImageUrl = ref("");
|
|||||||
const dialogVisible = ref(false);
|
const dialogVisible = ref(false);
|
||||||
const baseUrl = import.meta.env.VITE_APP_BASE_API;
|
const baseUrl = import.meta.env.VITE_APP_BASE_API;
|
||||||
const uploadImgUrl = ref(import.meta.env.VITE_APP_BASE_API + "/common/upload"); // 上传的图片服务器地址
|
const uploadImgUrl = ref(import.meta.env.VITE_APP_BASE_API + "/common/upload"); // 上传的图片服务器地址
|
||||||
const headers = ref({ "client-token": "Bearer " + getToken() });
|
const headers = ref({"client-token": "Bearer " + getToken()});
|
||||||
const fileList = ref([]);
|
const fileList = ref([]);
|
||||||
const showTip = computed(
|
const showTip = computed(
|
||||||
() => props.isShowTip && (props.fileType || props.fileSize)
|
() => props.isShowTip && (props.fileType || props.fileSize)
|
||||||
);
|
);
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.modelValue,
|
() => props.modelValue,
|
||||||
(val) => {
|
(val) => {
|
||||||
if (val) {
|
if (val) {
|
||||||
// 首先将值转为数组
|
// 首先将值转为数组
|
||||||
const list = Array.isArray(val) ? val : props.modelValue.split(",");
|
const list = Array.isArray(val) ? val : props.modelValue.split(",");
|
||||||
// 然后将数组转为对象数组
|
// 然后将数组转为对象数组
|
||||||
fileList.value = list.map((item) => {
|
fileList.value = list.map((item) => {
|
||||||
if (typeof item === "string") {
|
if (typeof item === "string") {
|
||||||
if (item.indexOf(baseUrl) === -1) {
|
if (item.indexOf(baseUrl) === -1) {
|
||||||
item = { name: baseUrl + item, url: baseUrl + item };
|
// item = {name: baseUrl + item, url: baseUrl + item};
|
||||||
} else {
|
item = {name: item, url: `${baseUrl}/file${item}`};
|
||||||
item = { name: item, url: item };
|
} else {
|
||||||
|
item = {name: item, url: item};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
return item;
|
||||||
return item;
|
});
|
||||||
});
|
} else {
|
||||||
} else {
|
fileList.value = [];
|
||||||
fileList.value = [];
|
return [];
|
||||||
return [];
|
}
|
||||||
}
|
},
|
||||||
},
|
{deep: true, immediate: true}
|
||||||
{ deep: true, immediate: true }
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// 删除图片
|
// 删除图片
|
||||||
@ -120,11 +121,11 @@ function handleRemove(file, files) {
|
|||||||
|
|
||||||
// 上传成功回调
|
// 上传成功回调
|
||||||
function handleUploadSuccess(res) {
|
function handleUploadSuccess(res) {
|
||||||
uploadList.value.push({ name: res.fileName, url: res.url });
|
uploadList.value.push({name: res.fileName, url: `${baseUrl}/file${res.fileName}`});
|
||||||
if (uploadList.value.length === number.value) {
|
if (uploadList.value.length === number.value) {
|
||||||
fileList.value = fileList.value
|
fileList.value = fileList.value
|
||||||
.filter((f) => f.url !== undefined)
|
.filter((f) => f.url !== undefined)
|
||||||
.concat(uploadList.value);
|
.concat(uploadList.value);
|
||||||
uploadList.value = [];
|
uploadList.value = [];
|
||||||
number.value = 0;
|
number.value = 0;
|
||||||
emit("update:modelValue", listToString(fileList.value));
|
emit("update:modelValue", listToString(fileList.value));
|
||||||
@ -150,7 +151,7 @@ function handleBeforeUpload(file) {
|
|||||||
}
|
}
|
||||||
if (!isImg) {
|
if (!isImg) {
|
||||||
proxy.$modal.msgError(
|
proxy.$modal.msgError(
|
||||||
`文件格式不正确, 请上传${props.fileType.join("/")}图片格式文件!`
|
`文件格式不正确, 请上传${props.fileType.join("/")}图片格式文件!`
|
||||||
);
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -189,7 +190,7 @@ function listToString(list, separator) {
|
|||||||
for (let i in list) {
|
for (let i in list) {
|
||||||
if (undefined !== list[i].url && list[i].url.indexOf("blob:") !== 0) {
|
if (undefined !== list[i].url && list[i].url.indexOf("blob:") !== 0) {
|
||||||
// strs += list[i].url.replace(baseUrl, "") + separator;
|
// strs += list[i].url.replace(baseUrl, "") + separator;
|
||||||
strs += list[i].url + separator;
|
strs += list[i].name + separator;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return strs != "" ? strs.substr(0, strs.length - 1) : "";
|
return strs != "" ? strs.substr(0, strs.length - 1) : "";
|
||||||
|
2005
src/router/index.js
2005
src/router/index.js
File diff suppressed because it is too large
Load Diff
@ -1,32 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card shadow="always" style="width: 55%; margin: 0 auto"
|
<el-card shadow="always" style="width: 55%; margin: 0 auto"
|
||||||
><p><b>基本资料</b></p>
|
|
||||||
<el-form
|
|
||||||
ref="personFormRef"
|
|
||||||
:model="personForm"
|
|
||||||
:rules="rules"
|
|
||||||
label-width="100px"
|
|
||||||
>
|
>
|
||||||
<el-form-item label="姓名:" prop="nickName">
|
|
||||||
<el-input v-model="personForm.nickName" placeholder="请输入姓名" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="手机:" prop="mobile">
|
|
||||||
<el-input v-model="personForm.mobile" placeholder="请输入手机号" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="邮箱:" prop="email">
|
|
||||||
<el-input v-model="personForm.email" placeholder="请输入邮箱" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="职务:" prop="post">
|
|
||||||
<el-input v-model="personForm.post" placeholder="请输入职务" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="固定电话:" prop="phone">
|
|
||||||
<el-input v-model="personForm.phone" placeholder="请输入固定电话" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" @click="submitPersonalInfo">提交</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<p><b>实验室资料</b></p>
|
<p><b>实验室资料</b></p>
|
||||||
<!-- <laboratory-form ref="labFormRef" v-model="form" :is-add="false"/>-->
|
<!-- <laboratory-form ref="labFormRef" v-model="form" :is-add="false"/>-->
|
||||||
<agent-form ref="agentFormRef" v-model="form" :is-add="false" />
|
<agent-form ref="agentFormRef" v-model="form" :is-add="false" />
|
||||||
|
@ -1,56 +1,59 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form
|
<el-form
|
||||||
v-show="showSearch"
|
v-show="showSearch"
|
||||||
ref="queryRef"
|
ref="queryRef"
|
||||||
:inline="true"
|
:inline="true"
|
||||||
:model="queryParams"
|
:model="queryParams"
|
||||||
@submit.prevent
|
@submit.prevent
|
||||||
>
|
>
|
||||||
<el-form-item label="成果名称" prop="title">
|
<el-form-item label="成果名称" prop="title">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.title"
|
v-model="queryParams.title"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入成果名称"
|
placeholder="请输入成果名称"
|
||||||
size="small"
|
size="small"
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
@keyup.enter="handleQuery"
|
@keyup.enter="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button
|
<el-button
|
||||||
icon="Search"
|
icon="Search"
|
||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleQuery"
|
@click="handleQuery"
|
||||||
>搜索
|
>搜索
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button icon="Refresh" size="small" @click="resetQuery"
|
<el-button icon="Refresh" size="small" @click="resetQuery"
|
||||||
>重置
|
>重置
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col v-if="route.name==='LabAchievement'" :span="1.5">
|
||||||
|
<el-button icon="UploadFilled" size="small" type="primary" @click="handleImport">导入成果</el-button>
|
||||||
|
</el-col>
|
||||||
<right-toolbar
|
<right-toolbar
|
||||||
v-model:showSearch="showSearch"
|
v-model:showSearch="showSearch"
|
||||||
@queryTable="getList"
|
@queryTable="getList"
|
||||||
></right-toolbar>
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<!-- 表格数据 -->
|
<!-- 表格数据 -->
|
||||||
<el-table v-loading="loading" :data="dataList">
|
<el-table v-loading="loading" :data="dataList">
|
||||||
<el-table-column label="数据编号" prop="id" />
|
<el-table-column label="数据编号" prop="id"/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
label="成果名称"
|
label="成果名称"
|
||||||
prop="title"
|
prop="title"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
label="成果领域"
|
label="成果领域"
|
||||||
prop="industryStr"
|
prop="industryStr"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="所属专家" prop="expertName" />
|
<el-table-column v-if="route.name ==='ExpertAchievement'" label="所属专家" prop="expertName"/>
|
||||||
<!-- <el-table-column label="浏览量" prop="visitCount"/>-->
|
<!-- <el-table-column label="浏览量" prop="visitCount"/>-->
|
||||||
<el-table-column align="center" label="发布时间" prop="createTime">
|
<el-table-column align="center" label="发布时间" prop="createTime">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
@ -58,9 +61,9 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
class-name="small-padding fixed-width"
|
class-name="small-padding fixed-width"
|
||||||
label="操作"
|
label="操作"
|
||||||
>
|
>
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<!-- <el-button-->
|
<!-- <el-button-->
|
||||||
@ -72,47 +75,109 @@
|
|||||||
<!-- </el-button-->
|
<!-- </el-button-->
|
||||||
<!-- >-->
|
<!-- >-->
|
||||||
<el-button
|
<el-button
|
||||||
icon="delete"
|
icon="delete"
|
||||||
size="small"
|
size="small"
|
||||||
type="text"
|
type="text"
|
||||||
@click="handleDelete(row.id)"
|
@click="handleDelete(row.id)"
|
||||||
>删除
|
>删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total > 0"
|
v-show="total > 0"
|
||||||
v-model:limit="queryParams.pageSize"
|
v-model:limit="queryParams.pageSize"
|
||||||
v-model:page="queryParams.pageNum"
|
v-model:page="queryParams.pageNum"
|
||||||
:total="total"
|
:total="total"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 用户导入对话框 -->
|
||||||
|
<el-dialog
|
||||||
|
v-model="upload.dialogVisible"
|
||||||
|
append-to-body
|
||||||
|
title="导入成果"
|
||||||
|
width="400px"
|
||||||
|
>
|
||||||
|
<el-upload
|
||||||
|
ref="uploadRef"
|
||||||
|
:action="upload.url"
|
||||||
|
:auto-upload="false"
|
||||||
|
:disabled="upload.isUploading"
|
||||||
|
:headers="upload.headers"
|
||||||
|
:limit="1"
|
||||||
|
:on-progress="handleFileUploadProgress"
|
||||||
|
:on-success="handleFileSuccess"
|
||||||
|
accept=".xlsx, .xls"
|
||||||
|
drag
|
||||||
|
>
|
||||||
|
<el-icon class="el-icon--upload">
|
||||||
|
<upload-filled/>
|
||||||
|
</el-icon>
|
||||||
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||||
|
<template #tip>
|
||||||
|
<div class="el-upload__tip text-center">
|
||||||
|
<span>仅允许导入xls、xlsx格式文件。</span>
|
||||||
|
<el-link
|
||||||
|
:underline="false"
|
||||||
|
style="font-size: 12px; vertical-align: baseline"
|
||||||
|
type="primary"
|
||||||
|
@click="saveAs(xlsl, '成果导入模板.xlsx')"
|
||||||
|
>下载模板
|
||||||
|
</el-link
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="el-upload__tip text-center">
|
||||||
|
<span style="color: red">成果导入说明(必读)。</span>
|
||||||
|
<el-link
|
||||||
|
:underline="false"
|
||||||
|
style="font-size: 12px; vertical-align: baseline"
|
||||||
|
type="primary"
|
||||||
|
@click="saveAs(importTip, '成果导入说明(必读).txt')"
|
||||||
|
>下载
|
||||||
|
</el-link
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-upload>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
||||||
|
<el-button @click="upload.dialogVisible = false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import { ElMessage, ElMessageBox } from "element-plus";
|
import {ElMessage, ElMessageBox} from "element-plus";
|
||||||
import { useRouter } from "vue-router";
|
import {useRouter} from "vue-router";
|
||||||
import { getCurrentInstance, reactive, ref, toRefs } from "vue";
|
import {getCurrentInstance, reactive, ref, toRefs} from "vue";
|
||||||
import {
|
import {achievementList, deleteAchievements, laboratoryAchievementList} from "@/api/admin/laboratory/achievement";
|
||||||
achievementList,
|
import {getToken} from "@/utils/auth";
|
||||||
deleteAchievements,
|
import xlsl from '@/assets/achievement_import_template.xlsx?url'
|
||||||
} from "@/api/admin/laboratory/achievement";
|
import importTip from '@/assets/achievement_import_description.txt?url'
|
||||||
|
import {saveAs} from 'file-saver'
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const route = useRoute()
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance();
|
const {proxy} = getCurrentInstance();
|
||||||
|
console.log(route.name)
|
||||||
const dataList = ref([]);
|
const dataList = ref([]);
|
||||||
const open = ref(false);
|
const open = ref(false);
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
const showSearch = ref(true);
|
const showSearch = ref(true);
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
const title = ref("");
|
const title = ref("");
|
||||||
|
const fetchMethods = {
|
||||||
|
"LabAchievement": laboratoryAchievementList,
|
||||||
|
"ExpertAchievement": achievementList,
|
||||||
|
}
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
@ -121,22 +186,22 @@ const data = reactive({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const { queryParams } = toRefs(data);
|
const {queryParams} = toRefs(data);
|
||||||
|
|
||||||
const queryRef = ref();
|
const queryRef = ref();
|
||||||
|
|
||||||
/** 查询数据列表 */
|
/** 查询数据列表 */
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
achievementList(queryParams.value)
|
fetchMethods[route.name](queryParams.value)
|
||||||
.then((resp) => {
|
.then((resp) => {
|
||||||
dataList.value = resp.rows;
|
dataList.value = resp.rows;
|
||||||
total.value = resp.total;
|
total.value = resp.total;
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
@ -157,16 +222,69 @@ function resetQuery() {
|
|||||||
*/
|
*/
|
||||||
function handleDelete(id) {
|
function handleDelete(id) {
|
||||||
ElMessageBox.confirm('是否确认删除数据编号为"' + id + '"的成果项?')
|
ElMessageBox.confirm('是否确认删除数据编号为"' + id + '"的成果项?')
|
||||||
.then(function () {
|
.then(function () {
|
||||||
return deleteAchievements(id);
|
return deleteAchievements(id);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
getList();
|
getList();
|
||||||
ElMessage.success("删除成功");
|
ElMessage.success("删除成功");
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const uploadRef = ref(null)
|
||||||
|
const upload = reactive({
|
||||||
|
dialogVisible: false,
|
||||||
|
// 是否显示弹出层(用户导入)
|
||||||
|
open: false,
|
||||||
|
// 弹出层标题(用户导入)
|
||||||
|
title: "",
|
||||||
|
// 是否禁用上传
|
||||||
|
isUploading: false,
|
||||||
|
// 是否更新已经存在的用户数据
|
||||||
|
updateSupport: 0,
|
||||||
|
// 设置上传的请求头部
|
||||||
|
headers: {'client-token': "Bearer " + getToken()},
|
||||||
|
// 上传的地址
|
||||||
|
url: import.meta.env.VITE_APP_BASE_API + "/app/laboratory/importData",
|
||||||
|
})
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入成果
|
||||||
|
*/
|
||||||
|
const handleImport = () => {
|
||||||
|
upload.dialogVisible = true
|
||||||
|
};
|
||||||
|
|
||||||
|
/**文件上传中处理 */
|
||||||
|
const handleFileUploadProgress = (event, file, fileList) => {
|
||||||
|
upload.isUploading = true;
|
||||||
|
};
|
||||||
|
/** 文件上传成功处理 */
|
||||||
|
const handleFileSuccess = (response, file, fileList) => {
|
||||||
|
upload.dialogVisible = false;
|
||||||
|
upload.isUploading = false;
|
||||||
|
uploadRef.value.handleRemove(file);
|
||||||
|
proxy.$alert(
|
||||||
|
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
||||||
|
response.msg +
|
||||||
|
"</div>",
|
||||||
|
"导入结果",
|
||||||
|
{dangerouslyUseHTMLString: true}
|
||||||
|
);
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 下载模板操作 */
|
||||||
|
const importTemplate = () => {
|
||||||
|
saveAs(xlsl, '成果导入模板.xlsx')
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 提交上传文件 */
|
||||||
|
function submitFileForm() {
|
||||||
|
uploadRef.value.submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
getList();
|
getList();
|
||||||
|
@ -1,56 +1,61 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form
|
<el-form
|
||||||
v-show="showSearch"
|
v-show="showSearch"
|
||||||
ref="queryRef"
|
ref="queryRef"
|
||||||
:inline="true"
|
:inline="true"
|
||||||
:model="queryParams"
|
:model="queryParams"
|
||||||
@submit.prevent
|
@submit.prevent
|
||||||
>
|
>
|
||||||
<el-form-item label="成果名称" prop="title">
|
<el-form-item label="成果名称" prop="title">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.title"
|
v-model="queryParams.title"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入成果名称"
|
placeholder="请输入成果名称"
|
||||||
size="small"
|
size="small"
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
@keyup.enter="handleQuery"
|
@keyup.enter="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button
|
<el-button
|
||||||
icon="Search"
|
icon="Search"
|
||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleQuery"
|
@click="handleQuery"
|
||||||
>搜索
|
>搜索
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button icon="Refresh" size="small" @click="resetQuery"
|
<el-button icon="Refresh" size="small" @click="resetQuery"
|
||||||
>重置
|
>重置
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button v-if="route.name==='ResearchAchievement'" icon="UploadFilled" size="small" type="primary"
|
||||||
|
@click="handleImport">导入成果
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
<right-toolbar
|
<right-toolbar
|
||||||
v-model:showSearch="showSearch"
|
v-model:showSearch="showSearch"
|
||||||
@queryTable="getList"
|
@queryTable="getList"
|
||||||
></right-toolbar>
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<!-- 表格数据 -->
|
<!-- 表格数据 -->
|
||||||
<el-table v-loading="loading" :data="dataList">
|
<el-table v-loading="loading" :data="dataList">
|
||||||
<el-table-column label="数据编号" prop="id" />
|
<el-table-column label="数据编号" prop="id"/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
label="成果名称"
|
label="成果名称"
|
||||||
prop="title"
|
prop="title"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
label="成果领域"
|
label="成果领域"
|
||||||
prop="industryStr"
|
prop="industryStr"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="所属专家" prop="expertName" />
|
<el-table-column v-if="route.name==='ExpertAchievement'" label="所属专家" prop="expertName"/>
|
||||||
<!-- <el-table-column label="浏览量" prop="visitCount"/>-->
|
<!-- <el-table-column label="浏览量" prop="visitCount"/>-->
|
||||||
<el-table-column align="center" label="发布时间" prop="createTime">
|
<el-table-column align="center" label="发布时间" prop="createTime">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
@ -58,9 +63,9 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
class-name="small-padding fixed-width"
|
class-name="small-padding fixed-width"
|
||||||
label="操作"
|
label="操作"
|
||||||
>
|
>
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<!-- <el-button-->
|
<!-- <el-button-->
|
||||||
@ -72,35 +77,93 @@
|
|||||||
<!-- </el-button-->
|
<!-- </el-button-->
|
||||||
<!-- >-->
|
<!-- >-->
|
||||||
<el-button
|
<el-button
|
||||||
icon="delete"
|
icon="delete"
|
||||||
size="small"
|
size="small"
|
||||||
type="text"
|
type="text"
|
||||||
@click="handleDelete(row.id)"
|
@click="handleDelete(row.id)"
|
||||||
>删除
|
>删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total > 0"
|
v-show="total > 0"
|
||||||
v-model:limit="queryParams.pageSize"
|
v-model:limit="queryParams.pageSize"
|
||||||
v-model:page="queryParams.pageNum"
|
v-model:page="queryParams.pageNum"
|
||||||
:total="total"
|
:total="total"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<!-- 用户导入对话框 -->
|
||||||
|
<el-dialog
|
||||||
|
v-model="upload.dialogVisible"
|
||||||
|
append-to-body
|
||||||
|
title="导入成果"
|
||||||
|
width="400px"
|
||||||
|
>
|
||||||
|
<el-upload
|
||||||
|
ref="uploadRef"
|
||||||
|
:action="upload.url"
|
||||||
|
:auto-upload="false"
|
||||||
|
:disabled="upload.isUploading"
|
||||||
|
:headers="upload.headers"
|
||||||
|
:limit="1"
|
||||||
|
:on-progress="handleFileUploadProgress"
|
||||||
|
:on-success="handleFileSuccess"
|
||||||
|
accept=".xlsx, .xls"
|
||||||
|
drag
|
||||||
|
>
|
||||||
|
<el-icon class="el-icon--upload">
|
||||||
|
<upload-filled/>
|
||||||
|
</el-icon>
|
||||||
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||||
|
<template #tip>
|
||||||
|
<div class="el-upload__tip text-center">
|
||||||
|
<span>仅允许导入xls、xlsx格式文件。</span>
|
||||||
|
<el-link
|
||||||
|
:underline="false"
|
||||||
|
style="font-size: 12px; vertical-align: baseline"
|
||||||
|
type="primary"
|
||||||
|
@click="saveAs(xlsl, '成果导入模板.xlsx')"
|
||||||
|
>下载模板
|
||||||
|
</el-link
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="el-upload__tip text-center">
|
||||||
|
<span style="color: red">成果导入说明(必读)。</span>
|
||||||
|
<el-link
|
||||||
|
:underline="false"
|
||||||
|
style="font-size: 12px; vertical-align: baseline"
|
||||||
|
type="primary"
|
||||||
|
@click="saveAs(importTip, '成果导入说明(必读).txt')"
|
||||||
|
>下载
|
||||||
|
</el-link
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-upload>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
||||||
|
<el-button @click="upload.dialogVisible = false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import { useRouter } from "vue-router";
|
import {useRoute, useRouter} from "vue-router";
|
||||||
import { reactive, ref, toRefs } from "vue";
|
import {reactive, ref, toRefs} from "vue";
|
||||||
import { ElMessage, ElMessageBox } from "element-plus";
|
import {ElMessage, ElMessageBox} from "element-plus";
|
||||||
import {
|
import {achievementList, deleteAchievements, researchAchievementList} from "@/api/admin/research/achievement";
|
||||||
achievementList,
|
import {getToken} from "@/utils/auth";
|
||||||
deleteAchievements,
|
import xlsl from '@/assets/achievement_import_template.xlsx?url'
|
||||||
} from "@/api/admin/research/achievement";
|
import importTip from '@/assets/achievement_import_description.txt?url'
|
||||||
|
import {saveAs} from "file-saver";
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
@ -110,7 +173,7 @@ const loading = ref(true);
|
|||||||
const showSearch = ref(true);
|
const showSearch = ref(true);
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
const title = ref("");
|
const title = ref("");
|
||||||
|
const route = useRoute()
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
@ -119,22 +182,25 @@ const data = reactive({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const { queryParams } = toRefs(data);
|
const {queryParams} = toRefs(data);
|
||||||
|
|
||||||
const queryRef = ref();
|
const queryRef = ref();
|
||||||
|
const fetchMethods = {
|
||||||
|
"ResearchAchievement": researchAchievementList,
|
||||||
|
"ExpertAchievement": achievementList,
|
||||||
|
}
|
||||||
/** 查询数据列表 */
|
/** 查询数据列表 */
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
achievementList(queryParams.value)
|
fetchMethods[route.name](queryParams.value)
|
||||||
.then((resp) => {
|
.then((resp) => {
|
||||||
dataList.value = resp.rows;
|
dataList.value = resp.rows;
|
||||||
total.value = resp.total;
|
total.value = resp.total;
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
@ -155,14 +221,65 @@ function resetQuery() {
|
|||||||
*/
|
*/
|
||||||
function handleDelete(id) {
|
function handleDelete(id) {
|
||||||
ElMessageBox.confirm(`是否确认删除数据编号为"${id}"的成果项?'`)
|
ElMessageBox.confirm(`是否确认删除数据编号为"${id}"的成果项?'`)
|
||||||
.then(function () {
|
.then(function () {
|
||||||
return deleteAchievements(id);
|
return deleteAchievements(id);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
getList();
|
getList();
|
||||||
ElMessage.success("删除成功");
|
ElMessage.success("删除成功");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const uploadRef = ref(null)
|
||||||
|
const upload = reactive({
|
||||||
|
dialogVisible: false,
|
||||||
|
// 是否显示弹出层(用户导入)
|
||||||
|
open: false,
|
||||||
|
// 弹出层标题(用户导入)
|
||||||
|
title: "",
|
||||||
|
// 是否禁用上传
|
||||||
|
isUploading: false,
|
||||||
|
// 是否更新已经存在的用户数据
|
||||||
|
updateSupport: 0,
|
||||||
|
// 设置上传的请求头部
|
||||||
|
headers: {'client-token': "Bearer " + getToken()},
|
||||||
|
// 上传的地址
|
||||||
|
url: import.meta.env.VITE_APP_BASE_API + "/app/research/importData",
|
||||||
|
})
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入成果
|
||||||
|
*/
|
||||||
|
const handleImport = () => {
|
||||||
|
upload.dialogVisible = true
|
||||||
|
};
|
||||||
|
|
||||||
|
/**文件上传中处理 */
|
||||||
|
const handleFileUploadProgress = (event, file, fileList) => {
|
||||||
|
upload.isUploading = true;
|
||||||
|
};
|
||||||
|
/** 文件上传成功处理 */
|
||||||
|
const handleFileSuccess = (response, file, fileList) => {
|
||||||
|
upload.dialogVisible = false;
|
||||||
|
upload.isUploading = false;
|
||||||
|
uploadRef.value.handleRemove(file);
|
||||||
|
proxy.$alert(
|
||||||
|
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
||||||
|
response.msg +
|
||||||
|
"</div>",
|
||||||
|
"导入结果",
|
||||||
|
{dangerouslyUseHTMLString: true}
|
||||||
|
);
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/** 提交上传文件 */
|
||||||
|
function submitFileForm() {
|
||||||
|
uploadRef.value.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
getList();
|
getList();
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-form
|
<el-form
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
:label-width="labelWidth + 'px'"
|
:label-width="labelWidth + 'px'"
|
||||||
:model="modelValue"
|
:model="modelValue"
|
||||||
:rules="rules"
|
:rules="rules"
|
||||||
>
|
>
|
||||||
<div v-if="showTitle" class="form_title">基本信息</div>
|
<div v-if="showTitle" class="form_title">基本信息</div>
|
||||||
|
|
||||||
<el-row v-if="isAdd">
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="姓名:" prop="name">
|
<el-form-item label="姓名:" prop="name">
|
||||||
<el-input v-model="modelValue.name"></el-input>
|
<el-input v-model="modelValue.name"></el-input>
|
||||||
@ -15,10 +15,10 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row v-if="isAdd">
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="手机号:" prop="mobile">
|
<el-form-item label="手机号:" prop="phone">
|
||||||
<el-input v-model="modelValue.mobile"></el-input>
|
<el-input v-model="modelValue.phone"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -34,7 +34,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="工作所在地:" prop="wordAddress">
|
<el-form-item label="工作所在地:" prop="wordAddress">
|
||||||
<el-input v-model="modelValue.wordAddress" />
|
<el-input v-model="modelValue.wordAddress"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -43,23 +43,23 @@
|
|||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="工作经历:" prop="experience">
|
<el-form-item label="工作经历:" prop="experience">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="modelValue.experience"
|
v-model="modelValue.experience"
|
||||||
:autosize="{ minRows: 2, maxRows: 10 }"
|
:autosize="{ minRows: 2, maxRows: 10 }"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<field-options ref="researchsFormRef" v-model="modelValue" />
|
<field-options ref="researchsFormRef" v-model="modelValue"/>
|
||||||
|
|
||||||
<InputBoxAdd
|
<InputBoxAdd
|
||||||
ref="keywordsFormRef"
|
ref="keywordsFormRef"
|
||||||
v-model="modelValue"
|
v-model="modelValue"
|
||||||
:labelWidth="labelWidth"
|
:labelWidth="labelWidth"
|
||||||
fieldKey="keywords"
|
fieldKey="keywords"
|
||||||
placeholder="应用场景关键词+技术产品关键词"
|
placeholder="应用场景关键词+技术产品关键词"
|
||||||
title="关键词"
|
title="关键词"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<el-row v-if="isAdd">
|
<el-row v-if="isAdd">
|
||||||
@ -69,9 +69,9 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item prop="idImage.0">
|
<el-form-item prop="idImage.0">
|
||||||
<ImageUpload
|
<ImageUpload
|
||||||
v-model="modelValue.idImage[0]"
|
v-model="modelValue.idImage[0]"
|
||||||
:isShowTip="false"
|
:isShowTip="false"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div style="text-align: center">身份证人像面</div>
|
<div style="text-align: center">身份证人像面</div>
|
||||||
@ -79,9 +79,9 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item prop="idImage.1">
|
<el-form-item prop="idImage.1">
|
||||||
<ImageUpload
|
<ImageUpload
|
||||||
v-model="modelValue.idImage[1]"
|
v-model="modelValue.idImage[1]"
|
||||||
:isShowTip="false"
|
:isShowTip="false"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div style="text-align: center">身份证国徽面</div>
|
<div style="text-align: center">身份证国徽面</div>
|
||||||
@ -89,9 +89,9 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item prop="idImage.2">
|
<el-form-item prop="idImage.2">
|
||||||
<ImageUpload
|
<ImageUpload
|
||||||
v-model="modelValue.idImage[2]"
|
v-model="modelValue.idImage[2]"
|
||||||
:isShowTip="false"
|
:isShowTip="false"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div style="text-align: center">手持身份证人像面</div>
|
<div style="text-align: center">手持身份证人像面</div>
|
||||||
@ -107,8 +107,8 @@
|
|||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<image-upload
|
<image-upload
|
||||||
v-model="modelValue.certificatePics"
|
v-model="modelValue.certificatePics"
|
||||||
:isShowTip="false"
|
:isShowTip="false"
|
||||||
/>
|
/>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -120,7 +120,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import InputBoxAdd from "../InputBoxAdd";
|
import InputBoxAdd from "../InputBoxAdd";
|
||||||
import FieldOptions from "../FieldOptions";
|
import FieldOptions from "../FieldOptions";
|
||||||
import { ref } from "vue";
|
import {ref} from "vue";
|
||||||
|
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const researchsFormRef = ref();
|
const researchsFormRef = ref();
|
||||||
@ -141,21 +141,21 @@ const props = defineProps({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
const rules = {
|
const rules = {
|
||||||
product: [{ required: true, message: "请输入", trigger: "blur" }],
|
product: [{required: true, message: "请输入", trigger: "blur"}],
|
||||||
name: [{ required: true, message: "请输入", trigger: "blur" }],
|
name: [{required: true, message: "请输入", trigger: "blur"}],
|
||||||
kind: [{ required: true, message: "请选择", trigger: "change" }],
|
kind: [{required: true, message: "请选择", trigger: "change"}],
|
||||||
code: [{ required: true, message: "请输入", trigger: "blur" }],
|
code: [{required: true, message: "请输入", trigger: "blur"}],
|
||||||
mobile: [
|
mobile: [
|
||||||
{ required: true, message: "请输入手机号码", trigger: "blur" },
|
{required: true, message: "请输入手机号码", trigger: "blur"},
|
||||||
{
|
{
|
||||||
pattern: /^1[3-9]\d{9}$/,
|
pattern: /^1[3-9]\d{9}$/,
|
||||||
message: "请输入正确的手机号码",
|
message: "请输入正确的手机号码",
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
idCard: [{ required: true, message: "请输入", trigger: "blur" }],
|
idCard: [{required: true, message: "请输入", trigger: "blur"}],
|
||||||
wordAddress: [{ required: true, message: "请输入", trigger: "blur" }],
|
wordAddress: [{required: true, message: "请输入", trigger: "blur"}],
|
||||||
experience: [{ required: true, message: "请输入", trigger: "blur" }],
|
experience: [{required: true, message: "请输入", trigger: "blur"}],
|
||||||
"idImage.0": [
|
"idImage.0": [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="box3" v-loading="loading">
|
<div v-loading="loading" class="box3">
|
||||||
<div class="tit">专家分布地图</div>
|
<div class="tit">专家分布地图</div>
|
||||||
<div v-if="state.isShowGoBack" class="close-back" @click="goBack">
|
<div v-if="state.isShowGoBack" class="close-back" @click="goBack">
|
||||||
<img src="./img/back_button.png" />
|
<img src="./img/back_button.png"/>
|
||||||
</div>
|
</div>
|
||||||
<!-- echartsDom 兼容缩放 -->
|
<!-- echartsDom 兼容缩放 -->
|
||||||
<div ref="map" class="map echartsDom" id="map"></div>
|
<div id="map" ref="map" class="map echartsDom"></div>
|
||||||
<div class="leftBox">
|
<div class="leftBox">
|
||||||
<div class="head">
|
<div class="head">
|
||||||
<div class="a">地区</div>
|
<div class="a">地区</div>
|
||||||
@ -13,7 +13,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<template v-if="snapTree.length > 0">
|
<template v-if="snapTree.length > 0">
|
||||||
<div
|
<div
|
||||||
v-for="v in snapTree.slice(
|
v-for="v in snapTree.slice(
|
||||||
(leftBoxPageNum - 1) * 5,
|
(leftBoxPageNum - 1) * 5,
|
||||||
leftBoxPageNum * 5
|
leftBoxPageNum * 5
|
||||||
)"
|
)"
|
||||||
@ -27,9 +27,9 @@
|
|||||||
<div class="b">暂无</div>
|
<div class="b">暂无</div>
|
||||||
</div>
|
</div>
|
||||||
<RegionPagine
|
<RegionPagine
|
||||||
v-if="snapTree.length"
|
v-if="snapTree.length"
|
||||||
v-model:page="leftBoxPageNum"
|
v-model:page="leftBoxPageNum"
|
||||||
:total="snapTree.length"
|
:total="snapTree.length"
|
||||||
></RegionPagine>
|
></RegionPagine>
|
||||||
</div>
|
</div>
|
||||||
<div class="rightBox">
|
<div class="rightBox">
|
||||||
@ -38,10 +38,10 @@
|
|||||||
<div class="b">专家数量</div>
|
<div class="b">专家数量</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="Object.keys(industryTree).length > 0"
|
v-for="(v, k) in industryTree"
|
||||||
v-for="(v, k) in industryTree"
|
v-if="Object.keys(industryTree).length > 0"
|
||||||
>
|
>
|
||||||
<div class="a" :title="k">{{ k }}</div>
|
<div :title="k" class="a">{{ k }}</div>
|
||||||
<div class="b">{{ v ?? 0 }}</div>
|
<div class="b">{{ v ?? 0 }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
@ -53,19 +53,15 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { defineComponent, getCurrentInstance, onMounted, reactive } from "vue";
|
import {getCurrentInstance, onMounted, reactive} from "vue";
|
||||||
import {
|
import {countExpertByArea, countExpertByCity, countExpertByProvince,} from "../../../../api/website/home/index";
|
||||||
countExpertByArea,
|
|
||||||
countExpertByCity,
|
|
||||||
countExpertByProvince,
|
|
||||||
} from "../../../../api/website/home/index";
|
|
||||||
// return;
|
// return;
|
||||||
// console.log(echarts);
|
// console.log(echarts);
|
||||||
import * as echarts from "echarts";
|
import * as echarts from "echarts";
|
||||||
import RegionPagine from "./RegionPagine.vue";
|
import RegionPagine from "./RegionPagine.vue";
|
||||||
// import { ElMessage } from "element-plus";
|
// import { ElMessage } from "element-plus";
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance();
|
const {proxy} = getCurrentInstance();
|
||||||
const loading = shallowRef(true);
|
const loading = shallowRef(true);
|
||||||
|
|
||||||
let treeData = {};
|
let treeData = {};
|
||||||
@ -78,9 +74,9 @@ const searchRegionData = async (code, level) => {
|
|||||||
let data = {};
|
let data = {};
|
||||||
|
|
||||||
if (
|
if (
|
||||||
snapTree.value.length &&
|
snapTree.value.length &&
|
||||||
snapTree.value[0].code.substring(0, 2) == code.substring(0, 2) &&
|
snapTree.value[0].code.substring(0, 2) == code.substring(0, 2) &&
|
||||||
snapTree.value[0].code.substring(2, 4) != code.substring(2, 4)
|
snapTree.value[0].code.substring(2, 4) != code.substring(2, 4)
|
||||||
) {
|
) {
|
||||||
data = snapTree.value;
|
data = snapTree.value;
|
||||||
} else {
|
} else {
|
||||||
@ -94,9 +90,9 @@ const searchRegionData = async (code, level) => {
|
|||||||
const ctcode = code.substring(0, 4) + "00";
|
const ctcode = code.substring(0, 4) + "00";
|
||||||
let data = {};
|
let data = {};
|
||||||
if (
|
if (
|
||||||
snapTree.value.length &&
|
snapTree.value.length &&
|
||||||
snapTree.value[0].code.substring(0, 4) == code.substring(0, 4) &&
|
snapTree.value[0].code.substring(0, 4) == code.substring(0, 4) &&
|
||||||
snapTree.value[0].code.substring(4, 6) != code.substring(4, 6)
|
snapTree.value[0].code.substring(4, 6) != code.substring(4, 6)
|
||||||
) {
|
) {
|
||||||
data = snapTree.value;
|
data = snapTree.value;
|
||||||
} else {
|
} else {
|
||||||
@ -112,7 +108,7 @@ const searchRegionData = async (code, level) => {
|
|||||||
snapTree.value = treeData.count ?? [];
|
snapTree.value = treeData.count ?? [];
|
||||||
return treeData.count.find((item) => item.code == code) || false;
|
return treeData.count.find((item) => item.code == code) || false;
|
||||||
} else {
|
} else {
|
||||||
const { count, industry } = await countExpertByProvince();
|
const {count, industry} = await countExpertByProvince();
|
||||||
industryTree.value = industry ?? {};
|
industryTree.value = industry ?? {};
|
||||||
return count.find((item) => item.code == code) || false;
|
return count.find((item) => item.code == code) || false;
|
||||||
}
|
}
|
||||||
@ -122,6 +118,7 @@ const searchRegionData = async (code, level) => {
|
|||||||
const findMapCount = (data, code) => {
|
const findMapCount = (data, code) => {
|
||||||
return data.find((item) => item.code == code) || false;
|
return data.find((item) => item.code == code) || false;
|
||||||
};
|
};
|
||||||
|
|
||||||
function deepFindTree(code, tree) {
|
function deepFindTree(code, tree) {
|
||||||
let snap = false;
|
let snap = false;
|
||||||
for (const key in tree) {
|
for (const key in tree) {
|
||||||
@ -142,7 +139,8 @@ function deepFindTree(code, tree) {
|
|||||||
return snap;
|
return snap;
|
||||||
}
|
}
|
||||||
|
|
||||||
const getIndustry = () => {};
|
const getIndustry = () => {
|
||||||
|
};
|
||||||
|
|
||||||
// function getIndustry(object) {
|
// function getIndustry(object) {
|
||||||
// let snap = {};
|
// let snap = {};
|
||||||
@ -162,9 +160,7 @@ const getIndustry = () => {};
|
|||||||
// // for (let index = 0; index < element['industry'].length; index++) {
|
// // for (let index = 0; index < element['industry'].length; index++) {
|
||||||
// // const ele = element['industry'][index];
|
// // const ele = element['industry'][index];
|
||||||
// // if(Object.hasOwnProperty.call(snap, ele)) {
|
// // if(Object.hasOwnProperty.call(snap, ele)) {
|
||||||
|
|
||||||
// // }
|
// // }
|
||||||
|
|
||||||
// // }
|
// // }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
@ -216,7 +212,6 @@ onMounted(() => {
|
|||||||
industryTree.value = resp.industry ?? {};
|
industryTree.value = resp.industry ?? {};
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
let height = document.body.clientHeight;
|
let height = document.body.clientHeight;
|
||||||
let width = document.body.clientWidth;
|
let width = document.body.clientWidth;
|
||||||
let dom = proxy.$refs["map"];
|
let dom = proxy.$refs["map"];
|
||||||
@ -365,8 +360,8 @@ function loadMapData(areaCode) {
|
|||||||
console.log("------------------");
|
console.log("------------------");
|
||||||
for (var i = 0; i < mapJson.features.length; i++) {
|
for (var i = 0; i < mapJson.features.length; i++) {
|
||||||
if (
|
if (
|
||||||
mapJson.features[i].properties.adcode == 810000 ||
|
mapJson.features[i].properties.adcode == 810000 ||
|
||||||
mapJson.features[i].properties.adcode == 820000
|
mapJson.features[i].properties.adcode == 820000
|
||||||
) {
|
) {
|
||||||
mapJson.features.splice(i, 1); // 删除下标为i 的元素,i开始只删除一个就它自己了
|
mapJson.features.splice(i, 1); // 删除下标为i 的元素,i开始只删除一个就它自己了
|
||||||
i--; // 删除一个元素后数组长度减一了
|
i--; // 删除一个元素后数组长度减一了
|
||||||
@ -390,10 +385,10 @@ function loadMap(mapName, data) {
|
|||||||
orient: "horizontal", //图例排列方向
|
orient: "horizontal", //图例排列方向
|
||||||
padding: 5,
|
padding: 5,
|
||||||
pieces: [
|
pieces: [
|
||||||
{ gte: 0, lte: 99, label: "99", color: "#CAE9FD" },
|
{gte: 0, lte: 99, label: "99", color: "#CAE9FD"},
|
||||||
{ gte: 100, lte: 299, label: "100-299", color: "#7ED2F7" },
|
{gte: 100, lte: 299, label: "100-299", color: "#7ED2F7"},
|
||||||
{ gte: 300, lte: 499, label: "299-499", color: "#039DDD" },
|
{gte: 300, lte: 499, label: "299-499", color: "#039DDD"},
|
||||||
{ gte: 500, label: "500", color: "#0D4884" },
|
{gte: 500, label: "500", color: "#0D4884"},
|
||||||
// {max: 30, label: '安全', color: '#2c9a42'},
|
// {max: 30, label: '安全', color: '#2c9a42'},
|
||||||
// {min: 30, max: 60, label: '警告', color: '#d08a00'},
|
// {min: 30, max: 60, label: '警告', color: '#d08a00'},
|
||||||
// {min: 60, label: '危险', color: '#c23c33'},
|
// {min: 60, label: '危险', color: '#c23c33'},
|
||||||
@ -467,6 +462,7 @@ function loadMap(mapName, data) {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
background: linear-gradient(0deg, #010101, #041744);
|
background: linear-gradient(0deg, #010101, #041744);
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.tit {
|
.tit {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 75px;
|
top: 75px;
|
||||||
@ -478,6 +474,7 @@ function loadMap(mapName, data) {
|
|||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.map {
|
.map {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@ -498,9 +495,11 @@ function loadMap(mapName, data) {
|
|||||||
top: 100px;
|
top: 100px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
left: 55px;
|
left: 55px;
|
||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
margin: 28px auto 0;
|
margin: 28px auto 0;
|
||||||
width: 30px;
|
width: 30px;
|
||||||
@ -508,9 +507,11 @@ function loadMap(mapName, data) {
|
|||||||
transition: all 0.5s;
|
transition: all 0.5s;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.leftBox {
|
.leftBox {
|
||||||
left: 6%;
|
left: 6%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.rightBox {
|
.rightBox {
|
||||||
right: 6%;
|
right: 6%;
|
||||||
max-height: 465px !important;
|
max-height: 465px !important;
|
||||||
@ -527,13 +528,16 @@ function loadMap(mapName, data) {
|
|||||||
background: rgba(4, 22, 65, 0.5);
|
background: rgba(4, 22, 65, 0.5);
|
||||||
border: 1px solid #0054ff;
|
border: 1px solid #0054ff;
|
||||||
color: rgba(161, 192, 255, 1);
|
color: rgba(161, 192, 255, 1);
|
||||||
|
|
||||||
& > div {
|
& > div {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.head {
|
.head {
|
||||||
border-bottom: 1px solid #0054ff;
|
border-bottom: 1px solid #0054ff;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.a {
|
.a {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
border-right: 1px solid #0054ff;
|
border-right: 1px solid #0054ff;
|
||||||
@ -543,12 +547,14 @@ function loadMap(mapName, data) {
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
.b {
|
.b {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 42px;
|
line-height: 42px;
|
||||||
width: 90px;
|
width: 90px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.rightBox {
|
.rightBox {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
@ -31,9 +31,9 @@ export default defineConfig(({ mode, command }) => {
|
|||||||
proxy: {
|
proxy: {
|
||||||
// https://cn.vitejs.dev/config/#server-proxy
|
// https://cn.vitejs.dev/config/#server-proxy
|
||||||
"/dev-api": {
|
"/dev-api": {
|
||||||
target: "http://101.34.131.16:1618",
|
|
||||||
// target: "http://101.34.131.16:1618",
|
// target: "http://101.34.131.16:1618",
|
||||||
// target: "http://192.168.0.201:1618",
|
// target: "http://101.34.131.16:1618",
|
||||||
|
target: "http://192.168.0.201:1618",
|
||||||
// target: 'http://172.18.3.127:1618',
|
// target: 'http://172.18.3.127:1618',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (p) => p.replace(/^\/dev-api/, ""),
|
rewrite: (p) => p.replace(/^\/dev-api/, ""),
|
||||||
|
Reference in New Issue
Block a user