research update
This commit is contained in:
18
src/api/admin/laboratory/achievement.js
Normal file
18
src/api/admin/laboratory/achievement.js
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import request from "@/utils/request";
|
||||||
|
|
||||||
|
// 实验室专利成果
|
||||||
|
export const achievementList = (params) => {
|
||||||
|
return request({
|
||||||
|
url: `/app/laboratory/achievementList`,
|
||||||
|
method: "GET",
|
||||||
|
params
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export const deleteAchievements = (ids) => {
|
||||||
|
return request({
|
||||||
|
url: `/app/laboratory/deleteAchievements/${ids}`,
|
||||||
|
method: "DELETE",
|
||||||
|
});
|
||||||
|
};
|
28
src/api/admin/laboratory/equipment.js
Normal file
28
src/api/admin/laboratory/equipment.js
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
import request from "@/utils/request";
|
||||||
|
|
||||||
|
export const equipmentList = (params) => {
|
||||||
|
return request({
|
||||||
|
url: `/app/casLaboratory/device/list`, method: "GET", params
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const insertEquipment = (data) => {
|
||||||
|
return request({
|
||||||
|
url: `/app/casLaboratory/device`, method: "POST", data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const updateEquipment = (data) => {
|
||||||
|
return request({
|
||||||
|
url: `/app/casLaboratory/device`, method: "PUT", data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const deleteEquipment = (ids) => {
|
||||||
|
return request({
|
||||||
|
url: `/app/casLaboratory/device`, method: "DELETE", data: {
|
||||||
|
ids
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};export const getEquipment = (id) => {
|
||||||
|
return request({
|
||||||
|
url: `/app/casLaboratory/device/info/${id}`, method: "GET",
|
||||||
|
});
|
||||||
|
};
|
50
src/api/admin/laboratory/expert.js
Normal file
50
src/api/admin/laboratory/expert.js
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
import request from "@/utils/request";
|
||||||
|
|
||||||
|
// 实验室专家列表
|
||||||
|
export const expertList = (params) => {
|
||||||
|
return request({
|
||||||
|
url: `/app/laboratory/expertList`,
|
||||||
|
method: "GET",
|
||||||
|
params
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// 实验室取消专家绑定
|
||||||
|
export const deleteBindExpert = (params) => {
|
||||||
|
return request({
|
||||||
|
url: `/app/laboratory/deleteBindExpert/${expertId}`,
|
||||||
|
method: "PUT",
|
||||||
|
params
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// 实验室新增专利
|
||||||
|
export const insertLabPatent = (data) => {
|
||||||
|
return request({
|
||||||
|
url: `/app/laboratory/patent`,
|
||||||
|
method: "POST",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实验室修改专利
|
||||||
|
* @param data
|
||||||
|
* @return {*}
|
||||||
|
*/
|
||||||
|
export const updateLabPatent = (data) => {
|
||||||
|
return request({
|
||||||
|
url: `/app/laboratory/patent`,
|
||||||
|
method: "PUT",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export const deleteLabPatentByIds = (ids) => {
|
||||||
|
return request({
|
||||||
|
url: `/app/laboratory/deletePatents/${ids}`,
|
||||||
|
method: "DELETE",
|
||||||
|
});
|
||||||
|
};
|
41
src/api/admin/laboratory/paper.js
Normal file
41
src/api/admin/laboratory/paper.js
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
import request from "@/utils/request";
|
||||||
|
|
||||||
|
// 实验室专家列表
|
||||||
|
export const paperList = (params) => {
|
||||||
|
return request({
|
||||||
|
url: `/app/laboratory/paperList`,
|
||||||
|
method: "GET",
|
||||||
|
params
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// 实验室新增专利
|
||||||
|
export const insertLabPatent = (data) => {
|
||||||
|
return request({
|
||||||
|
url: `/app/laboratory/patent`,
|
||||||
|
method: "POST",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实验室修改专利
|
||||||
|
* @param data
|
||||||
|
* @return {*}
|
||||||
|
*/
|
||||||
|
export const updateLabPatent = (data) => {
|
||||||
|
return request({
|
||||||
|
url: `/app/laboratory/patent`,
|
||||||
|
method: "PUT",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export const deletePaper = (ids) => {
|
||||||
|
return request({
|
||||||
|
url: `/app/laboratory/deletePaper/{ids}`,
|
||||||
|
method: "DELETE",
|
||||||
|
});
|
||||||
|
};
|
@ -3,7 +3,7 @@ import request from "@/utils/request";
|
|||||||
// 实验室专利列表
|
// 实验室专利列表
|
||||||
export const labPatentList = (params) => {
|
export const labPatentList = (params) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/app/laboratory/patent/list`,
|
url: `/app/laboratory/patentList`,
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params
|
params
|
||||||
});
|
});
|
||||||
@ -34,7 +34,7 @@ export const updateLabPatent = (data) => {
|
|||||||
|
|
||||||
export const deleteLabPatentByIds = (ids) => {
|
export const deleteLabPatentByIds = (ids) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/app/laboratory/patent/${ids}`,
|
url: `/app/laboratory/deletePatents/${ids}`,
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
});
|
});
|
||||||
};
|
};
|
40
src/api/admin/laboratory/research-project.js
Normal file
40
src/api/admin/laboratory/research-project.js
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
import request from "@/utils/request";
|
||||||
|
|
||||||
|
// 列表
|
||||||
|
export const technologyProjectList = (params) => {
|
||||||
|
return request({
|
||||||
|
url: `/app/laboratory/technologyProjectList`,
|
||||||
|
method: "GET",
|
||||||
|
params
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// 实验室新增专利
|
||||||
|
export const insertLabPatent = (data) => {
|
||||||
|
return request({
|
||||||
|
url: `/app/laboratory/patent`,
|
||||||
|
method: "POST",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实验室修改专利
|
||||||
|
* @param data
|
||||||
|
* @return {*}
|
||||||
|
*/
|
||||||
|
export const updateLabPatent = (data) => {
|
||||||
|
return request({
|
||||||
|
url: `/app/laboratory/patent`,
|
||||||
|
method: "PUT",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export const deleteTechnologyProject = (ids) => {
|
||||||
|
return request({
|
||||||
|
url: `/app/laboratory/deleteTechnologyProject/${ids}`,
|
||||||
|
method: "DELETE",
|
||||||
|
});
|
||||||
|
};
|
40
src/api/admin/laboratory/service-demand.js
Normal file
40
src/api/admin/laboratory/service-demand.js
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
import request from "@/utils/request";
|
||||||
|
|
||||||
|
// 实验室专利列表
|
||||||
|
export const labPatentList = (params) => {
|
||||||
|
return request({
|
||||||
|
url: `/app/laboratory/patentList`,
|
||||||
|
method: "GET",
|
||||||
|
params
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// 实验室新增专利
|
||||||
|
export const insertLabPatent = (data) => {
|
||||||
|
return request({
|
||||||
|
url: `/app/laboratory/patent`,
|
||||||
|
method: "POST",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实验室修改专利
|
||||||
|
* @param data
|
||||||
|
* @return {*}
|
||||||
|
*/
|
||||||
|
export const updateLabPatent = (data) => {
|
||||||
|
return request({
|
||||||
|
url: `/app/laboratory/patent`,
|
||||||
|
method: "PUT",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export const deleteLabPatentByIds = (ids) => {
|
||||||
|
return request({
|
||||||
|
url: `/app/laboratory/deletePatents/${ids}`,
|
||||||
|
method: "DELETE",
|
||||||
|
});
|
||||||
|
};
|
1271
src/router/index.js
1271
src/router/index.js
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
|||||||
import auth from "@/plugins/auth";
|
import auth from "@/plugins/auth";
|
||||||
import {constantRoutes, enterpriseRoutes, expertRoutes, laboratoryRoutes} from "@/router";
|
import {agentRoutes, constantRoutes, enterpriseRoutes, expertRoutes, laboratoryRoutes, researchRoutes} from "@/router";
|
||||||
import Layout from "@/layout/index";
|
import Layout from "@/layout/index";
|
||||||
import ParentView from "@/components/ParentView";
|
import ParentView from "@/components/ParentView";
|
||||||
import InnerLink from "@/layout/components/InnerLink";
|
import InnerLink from "@/layout/components/InnerLink";
|
||||||
@ -9,36 +9,39 @@ const modules = import.meta.glob("./../../views/**/*.vue");
|
|||||||
|
|
||||||
const usePermissionStore = defineStore("permission", {
|
const usePermissionStore = defineStore("permission", {
|
||||||
state: () => ({
|
state: () => ({
|
||||||
routes: [],
|
routes: [], addRoutes: [], defaultRoutes: [], topbarRouters: [], sidebarRouters: [],
|
||||||
addRoutes: [],
|
}), actions: {
|
||||||
defaultRoutes: [],
|
|
||||||
topbarRouters: [],
|
|
||||||
sidebarRouters: [],
|
|
||||||
}),
|
|
||||||
actions: {
|
|
||||||
setRoutes(routes) {
|
setRoutes(routes) {
|
||||||
this.addRoutes = routes;
|
this.addRoutes = routes;
|
||||||
this.routes = constantRoutes.concat(routes);
|
this.routes = constantRoutes.concat(routes);
|
||||||
},
|
}, setDefaultRoutes(routes) {
|
||||||
setDefaultRoutes(routes) {
|
|
||||||
this.defaultRoutes = constantRoutes.concat(routes);
|
this.defaultRoutes = constantRoutes.concat(routes);
|
||||||
},
|
}, setTopbarRoutes(routes) {
|
||||||
setTopbarRoutes(routes) {
|
|
||||||
this.topbarRouters = routes;
|
this.topbarRouters = routes;
|
||||||
},
|
}, setSidebarRouters(routes) {
|
||||||
setSidebarRouters(routes) {
|
|
||||||
this.sidebarRouters = routes;
|
this.sidebarRouters = routes;
|
||||||
},
|
}, generateRoutes(roles) {
|
||||||
generateRoutes(roles) {
|
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
console.log(roles)
|
console.log(roles)
|
||||||
let routesList = [];
|
let routesList = [];
|
||||||
if (roles === "1") {
|
switch (roles) {
|
||||||
routesList = enterpriseRoutes;
|
case "1":
|
||||||
} else if (roles === "2") {
|
routesList = enterpriseRoutes
|
||||||
routesList = expertRoutes;
|
break
|
||||||
} else if (roles === "3") {
|
case "2":
|
||||||
routesList = laboratoryRoutes
|
routesList = expertRoutes
|
||||||
|
break
|
||||||
|
case "3":
|
||||||
|
routesList = laboratoryRoutes
|
||||||
|
break
|
||||||
|
case '4':
|
||||||
|
routesList = researchRoutes
|
||||||
|
break
|
||||||
|
case '5':
|
||||||
|
routesList = agentRoutes
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
routesList = []
|
||||||
}
|
}
|
||||||
this.setRoutes(routesList);
|
this.setRoutes(routesList);
|
||||||
this.setSidebarRouters(constantRoutes.concat(routesList));
|
this.setSidebarRouters(constantRoutes.concat(routesList));
|
||||||
|
106
src/views/admin/agent/account/basic-info.vue
Normal file
106
src/views/admin/agent/account/basic-info.vue
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<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>
|
||||||
|
<!-- <laboratory-form ref="labFormRef" v-model="form" :is-add="false"/>-->
|
||||||
|
<agent-form ref="agentFormRef" v-model="form" :is-add="false"/>
|
||||||
|
<div :style="{ marginLeft: labelWidth + 'px' }">
|
||||||
|
<el-button type="primary" @click="submitExpertForm">提交</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import AgentForm from "@/views/components/AgentForm";
|
||||||
|
import {reactive, ref, toRefs} from "vue";
|
||||||
|
import {getInfo, updateLaboratory} from '@/api/admin/laboratory/account'
|
||||||
|
import {ElMessage} from "element-plus";
|
||||||
|
import {insertClientUser} from "@/api/admin/enterprise";
|
||||||
|
|
||||||
|
const data = reactive({
|
||||||
|
form: {
|
||||||
|
researchs: [],
|
||||||
|
keywords: []
|
||||||
|
},
|
||||||
|
personForm: {},
|
||||||
|
rules: {},
|
||||||
|
personRules: {}
|
||||||
|
})
|
||||||
|
const {form, personForm, rules} = toRefs(data)
|
||||||
|
const agentFormRef = ref()
|
||||||
|
const personFormRef = ref()
|
||||||
|
const labelWidth = ref(140);
|
||||||
|
|
||||||
|
// 获取基础信息用于回显
|
||||||
|
const getBasicInfo = async () => {
|
||||||
|
const {data} = await getInfo();
|
||||||
|
data.laboratory.researchs = data.laboratory.researchDirection?.split(",") ?? [];
|
||||||
|
data.laboratory.keywords = data.laboratory.keyword?.split(",") ?? [];
|
||||||
|
form.value = data.laboratory ?? {}
|
||||||
|
personForm.value = data.user ?? {};
|
||||||
|
};
|
||||||
|
|
||||||
|
const submitPersonalInfo = async () => {
|
||||||
|
try {
|
||||||
|
await personFormRef.value.validate();
|
||||||
|
await insertClientUser(personForm.value);
|
||||||
|
ElMessage.success("更新个人信息成功");
|
||||||
|
const {data} = await getInfo();
|
||||||
|
personForm.value = data.user ?? {};
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const submitExpertForm = async () => {
|
||||||
|
const valid = await agentFormRef.value.validateForm();
|
||||||
|
if (valid) {
|
||||||
|
form.value.researchDirection = form.value.researchs?.join(',') ?? null
|
||||||
|
form.value.keyword = form.value.keywords?.join(',') ?? null
|
||||||
|
updateLaboratory(form.value).then((res) => {
|
||||||
|
ElMessage.success("修改成功");
|
||||||
|
getBasicInfo()
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
console.log("校验未通过");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
getBasicInfo();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
173
src/views/admin/laboratory/research/achievement/index.vue
Normal file
173
src/views/admin/laboratory/research/achievement/index.vue
Normal file
@ -0,0 +1,173 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form
|
||||||
|
v-show="showSearch"
|
||||||
|
ref="queryRef"
|
||||||
|
:inline="true"
|
||||||
|
:model="queryParams"
|
||||||
|
@submit.prevent
|
||||||
|
>
|
||||||
|
<el-form-item label="成果名称" prop="title">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.title"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入成果名称"
|
||||||
|
size="small"
|
||||||
|
style="width: 240px"
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
icon="Search"
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="handleQuery"
|
||||||
|
>搜索
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="Refresh" size="small" @click="resetQuery"
|
||||||
|
>重置
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<right-toolbar
|
||||||
|
v-model:showSearch="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<!-- 表格数据 -->
|
||||||
|
<el-table v-loading="loading" :data="dataList">
|
||||||
|
<el-table-column label="数据编号" prop="id"/>
|
||||||
|
<el-table-column
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
label="成果名称"
|
||||||
|
prop="title"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
label="成果领域"
|
||||||
|
prop="industryStr"
|
||||||
|
/>
|
||||||
|
<el-table-column label="所属专家" prop="expertName"/>
|
||||||
|
<!-- <el-table-column label="浏览量" prop="visitCount"/>-->
|
||||||
|
<el-table-column align="center" label="发布时间" prop="createTime">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<span>{{ dayjs(row.createTime).format("YYYY-MM-DD") }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
label="操作"
|
||||||
|
>
|
||||||
|
<template #default="{ row }">
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- icon="download"-->
|
||||||
|
<!-- size="small"-->
|
||||||
|
<!-- type="text"-->
|
||||||
|
<!-- @click="handleDelete(row.id)"-->
|
||||||
|
<!-- >下架-->
|
||||||
|
<!-- </el-button-->
|
||||||
|
<!-- >-->
|
||||||
|
<el-button
|
||||||
|
icon="delete"
|
||||||
|
size="small"
|
||||||
|
type="text"
|
||||||
|
@click="handleDelete(row.id)"
|
||||||
|
>删除
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
v-model:limit="queryParams.pageSize"
|
||||||
|
v-model:page="queryParams.pageNum"
|
||||||
|
:total="total"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
import {ElMessage, ElMessageBox} from "element-plus";
|
||||||
|
import {useRouter} from "vue-router";
|
||||||
|
import {getCurrentInstance, reactive, ref, toRefs} from "vue";
|
||||||
|
import {achievementList, deleteAchievements} from "@/api/admin/laboratory/achievement";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
const {proxy} = getCurrentInstance();
|
||||||
|
|
||||||
|
const dataList = ref([]);
|
||||||
|
const open = ref(false);
|
||||||
|
const loading = ref(true);
|
||||||
|
const showSearch = ref(true);
|
||||||
|
const total = ref(0);
|
||||||
|
const title = ref("");
|
||||||
|
|
||||||
|
const data = reactive({
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
inventor: undefined,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const {queryParams} = toRefs(data);
|
||||||
|
|
||||||
|
const queryRef = ref();
|
||||||
|
|
||||||
|
|
||||||
|
/** 查询数据列表 */
|
||||||
|
const getList = async () => {
|
||||||
|
loading.value = true;
|
||||||
|
achievementList(queryParams.value).then(resp => {
|
||||||
|
dataList.value = resp.rows
|
||||||
|
total.value = resp.total
|
||||||
|
loading.value = false
|
||||||
|
}).catch(() => {
|
||||||
|
loading.value = false
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
const handleQuery = () => {
|
||||||
|
queryParams.value.pageNum = 1;
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
function resetQuery() {
|
||||||
|
queryRef.value.resetFields();
|
||||||
|
handleQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除按钮操作
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
function handleDelete(id) {
|
||||||
|
ElMessageBox.confirm('是否确认删除数据编号为"' + id + '"的成果项?')
|
||||||
|
.then(function () {
|
||||||
|
return deleteAchievements(id);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
getList();
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
getList();
|
||||||
|
</script>
|
261
src/views/admin/laboratory/research/expert/index.vue
Normal file
261
src/views/admin/laboratory/research/expert/index.vue
Normal file
@ -0,0 +1,261 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form
|
||||||
|
v-show="showSearch"
|
||||||
|
ref="queryRef"
|
||||||
|
:inline="true"
|
||||||
|
:model="queryParams"
|
||||||
|
@submit.prevent
|
||||||
|
>
|
||||||
|
<el-form-item label="成果名称" prop="title">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.title"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入专利名称"
|
||||||
|
size="small"
|
||||||
|
style="width: 240px"
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
icon="Search"
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="handleQuery"
|
||||||
|
>搜索
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="Refresh" size="small" @click="resetQuery"
|
||||||
|
>重置
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button icon="plus" size="small" type="primary">新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar
|
||||||
|
v-model:showSearch="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<!-- 表格数据 -->
|
||||||
|
<el-table v-loading="loading" :data="dataList">
|
||||||
|
<el-table-column label="数据编号" prop="id"/>
|
||||||
|
<el-table-column
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
label="专家名称"
|
||||||
|
prop="title"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="联系电话"
|
||||||
|
prop="mobile"
|
||||||
|
/>
|
||||||
|
<el-table-column label="研究领域" prop="industryStr"/>
|
||||||
|
<!-- <el-table-column label="申请(专利权)人" prop="applyName"/>-->
|
||||||
|
<el-table-column align="center" label="入驻时间" prop="workTime">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<span>{{ dayjs(row.workTime).format("YYYY-MM-DD") }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
label="操作"
|
||||||
|
>
|
||||||
|
<template #default="{ row }">
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- icon="edit"-->
|
||||||
|
<!-- size="small"-->
|
||||||
|
<!-- type="text"-->
|
||||||
|
<!-- @click="handleDeleteBind(row.id)"-->
|
||||||
|
<!-- >编辑-->
|
||||||
|
<!-- </el-button-->
|
||||||
|
<!-- >-->
|
||||||
|
<el-button
|
||||||
|
icon="Delete"
|
||||||
|
size="small"
|
||||||
|
type="text"
|
||||||
|
@click="handleDeleteBind(row.id)"
|
||||||
|
>取消关联
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
v-model:limit="queryParams.pageSize"
|
||||||
|
v-model:page="queryParams.pageNum"
|
||||||
|
:total="total"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
<!-- 添加或修改数据配置对话框 -->
|
||||||
|
<el-dialog v-model="open" :title="title" append-to-body width="800px">
|
||||||
|
<el-form ref="expertRef" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-form-item label="专家姓名" prop="title">
|
||||||
|
<el-input v-model="form.title" placeholder="请输入专家姓名"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="性别" prop="gender">
|
||||||
|
<el-input v-model="form.gender" placeholder="请输入性别"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="单位" prop="unit">
|
||||||
|
<el-input v-model="form.unit" placeholder="单位"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="研究方向" prop="researchDirection">
|
||||||
|
<InputBoxAdd
|
||||||
|
ref="researchDirectionFormRef"
|
||||||
|
v-model="form"
|
||||||
|
:labelWidth="100"
|
||||||
|
fieldKey="researchs"
|
||||||
|
placeholder="研究方向"
|
||||||
|
title="研究方向"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {labPatentList} from '@/api/admin/laboratory/patent'
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
import {ElMessage, ElMessageBox} from "element-plus";
|
||||||
|
import {useRouter} from "vue-router";
|
||||||
|
import {reactive, ref, toRefs} from "vue";
|
||||||
|
import InputBoxAdd from "@/views/components/InputBoxAdd/index.vue";
|
||||||
|
import {deleteBindExpert, expertList} from "@/api/admin/laboratory/expert";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
|
||||||
|
const dataList = ref([]);
|
||||||
|
const open = ref(false);
|
||||||
|
const loading = ref(true);
|
||||||
|
const showSearch = ref(true);
|
||||||
|
const total = ref(0);
|
||||||
|
const title = ref("");
|
||||||
|
const expertRef = ref()
|
||||||
|
const researchDirectionFormRef = ref()
|
||||||
|
const data = reactive({
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
inventor: undefined,
|
||||||
|
},
|
||||||
|
form: {},
|
||||||
|
rules: {}
|
||||||
|
});
|
||||||
|
|
||||||
|
const {queryParams, form, rules} = toRefs(data);
|
||||||
|
|
||||||
|
const queryRef = ref();
|
||||||
|
|
||||||
|
|
||||||
|
/** 查询数据列表 */
|
||||||
|
const getList = async () => {
|
||||||
|
loading.value = true;
|
||||||
|
expertList(queryParams.value).then(resp => {
|
||||||
|
dataList.value = resp.rows
|
||||||
|
total.value = resp.total
|
||||||
|
loading.value = false
|
||||||
|
}).catch(() => {
|
||||||
|
loading.value = false
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
const handleQuery = () => {
|
||||||
|
queryParams.value.pageNum = 1;
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
function resetQuery() {
|
||||||
|
queryRef.value.resetFields();
|
||||||
|
handleQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
function handleDeleteBind(id) {
|
||||||
|
ElMessageBox.confirm(`是否确认取消关联数据编号为"${id}"的专家?`)
|
||||||
|
.then(function () {
|
||||||
|
return deleteBindExpert(id);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
getList();
|
||||||
|
ElMessage.success("取消关联成功");
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** 重置新增的表单以及其他数据 */
|
||||||
|
function reset() {
|
||||||
|
form.value = {
|
||||||
|
id: undefined,
|
||||||
|
title: undefined,
|
||||||
|
ext: undefined,
|
||||||
|
author: undefined,
|
||||||
|
publish_at: undefined,
|
||||||
|
keywords: [],
|
||||||
|
remark: undefined,
|
||||||
|
};
|
||||||
|
expertRef.value?.resetFields()
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 取消按钮 */
|
||||||
|
function cancel() {
|
||||||
|
open.value = false;
|
||||||
|
reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleAdd = () => {
|
||||||
|
reset()
|
||||||
|
title.value = "添加专家"
|
||||||
|
open.value = true
|
||||||
|
}
|
||||||
|
const handleUpdate = () => {
|
||||||
|
reset()
|
||||||
|
title.value = "编辑专家"
|
||||||
|
open.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 提交按钮 */
|
||||||
|
function submitForm() {
|
||||||
|
expertRef.value?.validate((valid) => {
|
||||||
|
const keywordsFormValid = researchDirectionFormRef?.value.validateForm();
|
||||||
|
if (valid && keywordsFormValid) {
|
||||||
|
if (form.value.id) {
|
||||||
|
// TODO
|
||||||
|
paperEdit(form.value).then((response) => {
|
||||||
|
ElMessage.success("修改成功");
|
||||||
|
open.value = false;
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
paperAdd(form.value).then((response) => {
|
||||||
|
ElMessage.success("新增成功");
|
||||||
|
open.value = false;
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
getList();
|
||||||
|
</script>
|
@ -0,0 +1,273 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form
|
||||||
|
v-show="showSearch"
|
||||||
|
ref="queryRef"
|
||||||
|
:inline="true"
|
||||||
|
:model="queryParams"
|
||||||
|
@submit.prevent
|
||||||
|
>
|
||||||
|
<el-form-item label="设备名称" prop="title">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.title"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入设备名称"
|
||||||
|
size="small"
|
||||||
|
style="width: 240px"
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button icon="Search" size="small" type="primary" @click="handleQuery"
|
||||||
|
>搜索
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="Refresh" size="small" @click="resetQuery"
|
||||||
|
>重置
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
icon="Plus"
|
||||||
|
plain
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="handleAdd"
|
||||||
|
>新增
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar
|
||||||
|
v-model:showSearch="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<!-- 表格数据 -->
|
||||||
|
<el-table v-loading="loading" :data="dataList">
|
||||||
|
<el-table-column align="center" label="数据编号" prop="deviceId"/>
|
||||||
|
<el-table-column align="center"
|
||||||
|
label="设备名称"
|
||||||
|
prop="name"
|
||||||
|
/>
|
||||||
|
<el-table-column :show-overflow-tooltip="true" align="center" label="型号" prop="model"/>
|
||||||
|
<el-table-column align="center" label="购买日期" prop="buyDate">
|
||||||
|
<template #default="{row}">
|
||||||
|
<span>{{ dayjs(row.buyDate).format("YYYY-MM-DD") }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
label="操作"
|
||||||
|
>
|
||||||
|
<template #default="{row}">
|
||||||
|
<el-button
|
||||||
|
icon="Edit"
|
||||||
|
size="small"
|
||||||
|
type="text"
|
||||||
|
@click="handleUpdate(row)"
|
||||||
|
>修改
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
icon="Delete"
|
||||||
|
size="small"
|
||||||
|
type="text"
|
||||||
|
@click="handleDelete(row)"
|
||||||
|
>删除
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
v-model:limit="queryParams.pageSize"
|
||||||
|
v-model:page="queryParams.pageNum"
|
||||||
|
:total="total"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改数据配置对话框 -->
|
||||||
|
<el-dialog v-model="open" :title="title" append-to-body width="600px">
|
||||||
|
<el-form ref="equipmentRef" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-form-item label="设备名称:" prop="name">
|
||||||
|
<el-input v-model="form.name" placeholder="请输入设备名称"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="型号:" prop="model">
|
||||||
|
<el-input v-model="form.model" placeholder="请输入型号"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="购买时间:" prop="buyDate">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.buyDate"
|
||||||
|
placeholder="请选择购买时间"
|
||||||
|
type="date"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="成果参数:" prop="param">
|
||||||
|
<el-input v-model="form.param" placeholder="请输入成果参数"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="设备描述:" prop="description">
|
||||||
|
<el-input
|
||||||
|
v-model="form.description"
|
||||||
|
placeholder="请输入设备描述"
|
||||||
|
type="textarea"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
// import {expertPaper, paperAdd, paperDelete, paperEdit,} from "@/api/admin/expert/technology";
|
||||||
|
import {reactive, ref, toRefs} from "vue";
|
||||||
|
import {useRouter} from "vue-router";
|
||||||
|
import {ElMessage, ElMessageBox} from "element-plus";
|
||||||
|
import {
|
||||||
|
deleteEquipment,
|
||||||
|
equipmentList,
|
||||||
|
getEquipment,
|
||||||
|
insertEquipment,
|
||||||
|
updateEquipment
|
||||||
|
} from "@/api/admin/laboratory/equipment";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
const dataList = ref([]);
|
||||||
|
const open = ref(false);
|
||||||
|
const loading = ref(true);
|
||||||
|
const showSearch = ref(true);
|
||||||
|
const total = ref(0);
|
||||||
|
const title = ref("");
|
||||||
|
const equipmentRef = ref()
|
||||||
|
const data = reactive({
|
||||||
|
form: {},
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
name: undefined,
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
name: [{required: true, message: "设备名称不能为空", trigger: "blur"}],
|
||||||
|
model: [{required: true, message: "型号不能为空", trigger: "blur"}],
|
||||||
|
param: [{required: true, message: "成果参数不能为空", trigger: "blur"}],
|
||||||
|
buyDate: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择购买时间",
|
||||||
|
trigger: ["blur", "change"],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const {queryParams, form, rules} = toRefs(data);
|
||||||
|
|
||||||
|
/** 查询数据列表 */
|
||||||
|
function getList() {
|
||||||
|
loading.value = true;
|
||||||
|
equipmentList(queryParams.value).then((response) => {
|
||||||
|
console.log(response)
|
||||||
|
dataList.value = response.rows;
|
||||||
|
total.value = response.total;
|
||||||
|
loading.value = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
function handleQuery() {
|
||||||
|
queryParams.value.pageNum = 1;
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
function resetQuery() {
|
||||||
|
equipmentRef.value?.resetFields()
|
||||||
|
handleQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
function handleDelete(row) {
|
||||||
|
ElMessageBox
|
||||||
|
.confirm('是否确认删除数据编号为"' + row.deviceId + '"的数据项?')
|
||||||
|
.then(function () {
|
||||||
|
return deleteEquipment([row.deviceId]);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
getList();
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 重置新增的表单以及其他数据 */
|
||||||
|
function reset() {
|
||||||
|
form.value = {
|
||||||
|
name: null,
|
||||||
|
model: null,
|
||||||
|
buyDate: null,
|
||||||
|
param: null,
|
||||||
|
description: null,
|
||||||
|
};
|
||||||
|
equipmentRef.value?.resetFields()
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 添加数据 */
|
||||||
|
function handleAdd() {
|
||||||
|
reset();
|
||||||
|
open.value = true;
|
||||||
|
title.value = "添加数据";
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改数据 */
|
||||||
|
async function handleUpdate(row) {
|
||||||
|
const resp = await getEquipment(row.deviceId)
|
||||||
|
form.value = resp.data
|
||||||
|
open.value = true;
|
||||||
|
title.value = "修改数据";
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 提交按钮 */
|
||||||
|
function submitForm() {
|
||||||
|
equipmentRef.value?.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
if (form.value.deviceId) {
|
||||||
|
updateEquipment(form.value).then((response) => {
|
||||||
|
ElMessage.success("修改成功");
|
||||||
|
open.value = false;
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
insertEquipment(form.value).then((response) => {
|
||||||
|
ElMessage.success("新增成功");
|
||||||
|
open.value = false;
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 取消按钮 */
|
||||||
|
function cancel() {
|
||||||
|
open.value = false;
|
||||||
|
reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
getList();
|
||||||
|
</script>
|
280
src/views/admin/laboratory/research/paper/index.vue
Normal file
280
src/views/admin/laboratory/research/paper/index.vue
Normal file
@ -0,0 +1,280 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form
|
||||||
|
v-show="showSearch"
|
||||||
|
ref="queryRef"
|
||||||
|
:inline="true"
|
||||||
|
:model="queryParams"
|
||||||
|
@submit.prevent
|
||||||
|
>
|
||||||
|
<el-form-item label="成果名称" prop="title">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.title"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入专利名称"
|
||||||
|
size="small"
|
||||||
|
style="width: 240px"
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
icon="Search"
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="handleQuery"
|
||||||
|
>搜索
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="Refresh" size="small" @click="resetQuery"
|
||||||
|
>重置
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<right-toolbar
|
||||||
|
v-model:showSearch="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<!-- 表格数据 -->
|
||||||
|
<el-table v-loading="loading" :data="dataList">
|
||||||
|
<el-table-column label="数据编号" prop="id"/>
|
||||||
|
<el-table-column
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
label="论文题目"
|
||||||
|
prop="title"
|
||||||
|
/>
|
||||||
|
<el-table-column :show-overflow-tooltip="true" label="刊物" prop="ext"/>
|
||||||
|
<el-table-column label="所属专家" prop="author"/>
|
||||||
|
<el-table-column align="center" label="关键词" prop="keyword"/>
|
||||||
|
<!-- <el-table-column align="center" label="浏览量" prop="readCount"/>-->
|
||||||
|
<el-table-column align="center" label="出版日期" prop="publishTime">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<span>{{ dayjs(row.publishTime).format("YYYY-MM-DD") }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
label="操作"
|
||||||
|
>
|
||||||
|
<template #default="{ row }">
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- icon="edit"-->
|
||||||
|
<!-- size="small"-->
|
||||||
|
<!-- type="text"-->
|
||||||
|
<!-- @click="handleEdit(row)"-->
|
||||||
|
<!-- >编辑-->
|
||||||
|
<!-- </el-button-->
|
||||||
|
<!-- >-->
|
||||||
|
<el-button
|
||||||
|
icon="Delete"
|
||||||
|
size="small"
|
||||||
|
type="text"
|
||||||
|
@click="handleDelete(row.id)"
|
||||||
|
>删除
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
v-model:limit="queryParams.pageSize"
|
||||||
|
v-model:page="queryParams.pageNum"
|
||||||
|
:total="total"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 添加或修改数据配置对话框 -->
|
||||||
|
<el-dialog v-model="open" :title="title" append-to-body width="800px">
|
||||||
|
<el-form ref="paperRef" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-form-item label="论文题目:" prop="title">
|
||||||
|
<el-input v-model="form.title" placeholder="请输入论文题目"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="刊物:" prop="ext">
|
||||||
|
<el-input v-model="form.ext" placeholder="请输入刊物"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="作者:" prop="author">
|
||||||
|
<el-input v-model="form.author" placeholder="多人员请用 , 隔开"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="出版日期:" prop="publish_at">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.publishAt"
|
||||||
|
placeholder="请选择出版日期"
|
||||||
|
type="date"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<InputBoxAdd
|
||||||
|
ref="keywordsFormRef"
|
||||||
|
v-model="form"
|
||||||
|
:labelWidth="100"
|
||||||
|
fieldKey="keywords"
|
||||||
|
placeholder="应用场景关键词+技术产品关键词"
|
||||||
|
title="关键词"
|
||||||
|
/>
|
||||||
|
<el-form-item label="摘要:">
|
||||||
|
<el-input
|
||||||
|
v-model="form.remark"
|
||||||
|
placeholder="请输入内容"
|
||||||
|
type="textarea"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
import {ElMessage, ElMessageBox} from "element-plus";
|
||||||
|
import InputBoxAdd from '@/views/components/InputBoxAdd'
|
||||||
|
import {useRouter} from "vue-router";
|
||||||
|
import {getCurrentInstance, reactive, ref, toRefs} from "vue";
|
||||||
|
import {cloneDeep} from "lodash";
|
||||||
|
import {deletePaper, paperList} from "@/api/admin/laboratory/paper";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
const {proxy} = getCurrentInstance();
|
||||||
|
const paperRef = ref()
|
||||||
|
const keywordsFormRef = ref()
|
||||||
|
|
||||||
|
const dataList = ref([]);
|
||||||
|
const open = ref(false);
|
||||||
|
const loading = ref(true);
|
||||||
|
const showSearch = ref(true);
|
||||||
|
const total = ref(0);
|
||||||
|
const title = ref("");
|
||||||
|
|
||||||
|
const data = reactive({
|
||||||
|
form: {},
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
name: undefined,
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
title: [{required: true, message: "论文题目不能为空", trigger: "blur"}],
|
||||||
|
ext: [{required: true, message: "刊物不能为空", trigger: "blur"}],
|
||||||
|
author: [{required: true, message: "作者不能为空", trigger: "blur"}],
|
||||||
|
publish_at: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择出版日期",
|
||||||
|
trigger: ["blur", "change"],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const {queryParams, form, rules} = toRefs(data);
|
||||||
|
|
||||||
|
const queryRef = ref();
|
||||||
|
|
||||||
|
|
||||||
|
/** 查询数据列表 */
|
||||||
|
const getList = async () => {
|
||||||
|
loading.value = true;
|
||||||
|
paperList(queryParams.value).then(resp => {
|
||||||
|
dataList.value = resp.rows
|
||||||
|
total.value = resp.total
|
||||||
|
loading.value = false
|
||||||
|
}).catch(() => {
|
||||||
|
loading.value = false
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
const handleQuery = () => {
|
||||||
|
queryParams.value.pageNum = 1;
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
function resetQuery() {
|
||||||
|
queryRef.value.resetFields();
|
||||||
|
handleQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
function handleDelete(id) {
|
||||||
|
ElMessageBox.confirm('是否确认删除数据编号为"' + id + '"的论文项?')
|
||||||
|
.then(function () {
|
||||||
|
return deletePaper(id);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
getList();
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 重置新增的表单以及其他数据 */
|
||||||
|
function reset() {
|
||||||
|
form.value = {
|
||||||
|
id: undefined,
|
||||||
|
title: undefined,
|
||||||
|
ext: undefined,
|
||||||
|
author: undefined,
|
||||||
|
publish_at: undefined,
|
||||||
|
keywords: [],
|
||||||
|
remark: undefined,
|
||||||
|
};
|
||||||
|
paperRef.value?.resetFields()
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 取消按钮 */
|
||||||
|
function cancel() {
|
||||||
|
open.value = false;
|
||||||
|
reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleEdit = (row) => {
|
||||||
|
form.value = cloneDeep(row)
|
||||||
|
open.value = true;
|
||||||
|
title.value = "修改数据";
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 提交按钮 */
|
||||||
|
function submitForm() {
|
||||||
|
paperRef.value?.validate((valid) => {
|
||||||
|
const keywordsFormValid = keywordsFormRef.value.validateForm();
|
||||||
|
if (valid && keywordsFormValid) {
|
||||||
|
if (form.value.id) {
|
||||||
|
// TODO
|
||||||
|
paperEdit(form.value).then((response) => {
|
||||||
|
proxy.$modal.msgSuccess("修改成功");
|
||||||
|
open.value = false;
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
else {
|
||||||
|
paperAdd(form.value).then((response) => {
|
||||||
|
proxy.$modal.msgSuccess("新增成功");
|
||||||
|
open.value = false;
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
getList();
|
||||||
|
</script>
|
@ -33,26 +33,26 @@
|
|||||||
</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-col :span="1.5">-->
|
||||||
<el-button
|
<!-- <el-button-->
|
||||||
icon="Plus"
|
<!-- icon="Plus"-->
|
||||||
plain
|
<!-- plain-->
|
||||||
size="small"
|
<!-- size="small"-->
|
||||||
type="primary"
|
<!-- type="primary"-->
|
||||||
@click="handleAdd"
|
<!-- @click="handleAdd"-->
|
||||||
>新增
|
<!-- >新增-->
|
||||||
</el-button
|
<!-- </el-button-->
|
||||||
>
|
<!-- >-->
|
||||||
</el-col>
|
<!-- </el-col>-->
|
||||||
<!-- 无接口 暂时注释 -->
|
<!-- <!– 无接口 暂时注释 –>-->
|
||||||
<el-col v-if="false" :span="1.5">
|
<!-- <el-col v-if="false" :span="1.5">-->
|
||||||
<router-link to="./claimPatent">
|
<!-- <router-link to="./claimPatent">-->
|
||||||
<el-button icon="Plus" plain size="small" type="primary"
|
<!-- <el-button icon="Plus" plain size="small" type="primary"-->
|
||||||
>认领
|
<!-- >认领-->
|
||||||
</el-button
|
<!-- </el-button-->
|
||||||
>
|
<!-- >-->
|
||||||
</router-link>
|
<!-- </router-link>-->
|
||||||
</el-col>
|
<!-- </el-col>-->
|
||||||
<right-toolbar
|
<right-toolbar
|
||||||
v-model:showSearch="showSearch"
|
v-model:showSearch="showSearch"
|
||||||
@queryTable="getList"
|
@queryTable="getList"
|
||||||
@ -85,14 +85,14 @@
|
|||||||
label="操作"
|
label="操作"
|
||||||
>
|
>
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button
|
<!-- <el-button-->
|
||||||
icon="Edit"
|
<!-- icon="Edit"-->
|
||||||
size="small"
|
<!-- size="small"-->
|
||||||
type="text"
|
<!-- type="text"-->
|
||||||
@click="handleUpdate(row)"
|
<!-- @click="handleUpdate(row)"-->
|
||||||
>修改
|
<!-- >修改-->
|
||||||
</el-button
|
<!-- </el-button-->
|
||||||
>
|
<!-- >-->
|
||||||
<el-button
|
<el-button
|
||||||
icon="Delete"
|
icon="Delete"
|
||||||
size="small"
|
size="small"
|
||||||
@ -113,125 +113,123 @@
|
|||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改数据配置对话框 -->
|
<!-- <!– 添加或修改数据配置对话框 –>-->
|
||||||
<el-dialog v-model="open" :title="title" append-to-body width="800px">
|
<!-- <el-dialog v-model="open" :title="title" append-to-body width="800px">-->
|
||||||
<el-form ref="patentRef" :model="form" :rules="rules" label-width="100px">
|
<!-- <el-form ref="patentRef" :model="form" :rules="rules" label-width="100px">-->
|
||||||
<el-form-item label="申请人:" prop="applyName">
|
<!-- <el-form-item label="申请人:" prop="applyName">-->
|
||||||
<el-input
|
<!-- <el-input-->
|
||||||
v-model="form.applyName"
|
<!-- v-model="form.applyName"-->
|
||||||
placeholder="请输入申请(专利权)人(多个请以 , 分割)"
|
<!-- placeholder="请输入申请(专利权)人(多个请以 , 分割)"-->
|
||||||
/>
|
<!-- />-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
<el-form-item label="申请人地址:" prop="applyAddress">
|
<!-- <el-form-item label="申请人地址:" prop="applyAddress">-->
|
||||||
<el-input
|
<!-- <el-input-->
|
||||||
v-model="form.applyAddress"
|
<!-- v-model="form.applyAddress"-->
|
||||||
placeholder="请输入申请人地址"
|
<!-- placeholder="请输入申请人地址"-->
|
||||||
/>
|
<!-- />-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
<el-form-item label="发明人:" prop="inventor">
|
<!-- <el-form-item label="发明人:" prop="inventor">-->
|
||||||
<el-input
|
<!-- <el-input-->
|
||||||
v-model="form.inventor"
|
<!-- v-model="form.inventor"-->
|
||||||
placeholder="请输入发明人(多个请以 , 分割)"
|
<!-- placeholder="请输入发明人(多个请以 , 分割)"-->
|
||||||
/>
|
<!-- />-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
<el-form-item label="专利名称:" prop="title">
|
<!-- <el-form-item label="专利名称:" prop="title">-->
|
||||||
<el-input v-model="form.title" placeholder="请输入专利名称"/>
|
<!-- <el-input v-model="form.title" placeholder="请输入专利名称"/>-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
<el-form-item label="申请号:" prop="applyCode">
|
<!-- <el-form-item label="申请号:" prop="applyCode">-->
|
||||||
<el-input v-model="form.applyCode" placeholder="请输入申请号"/>
|
<!-- <el-input v-model="form.applyCode" placeholder="请输入申请号"/>-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
<el-form-item label="公开号:" prop="openCode">
|
<!-- <el-form-item label="公开号:" prop="openCode">-->
|
||||||
<el-input v-model="form.openCode" placeholder="请输入公开号"/>
|
<!-- <el-input v-model="form.openCode" placeholder="请输入公开号"/>-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
<el-row>
|
<!-- <el-row>-->
|
||||||
<el-col :span="12">
|
<!-- <el-col :span="12">-->
|
||||||
<el-form-item label="申请日期:" prop="applyAt">
|
<!-- <el-form-item label="申请日期:" prop="applyAt">-->
|
||||||
<el-date-picker
|
<!-- <el-date-picker-->
|
||||||
v-model="form.applyAt"
|
<!-- v-model="form.applyAt"-->
|
||||||
placeholder="请选择申请日期"
|
<!-- placeholder="请选择申请日期"-->
|
||||||
style="width: 100%"
|
<!-- style="width: 100%"-->
|
||||||
type="date"
|
<!-- type="date"-->
|
||||||
value-format="YYYY-MM-DD"
|
<!-- value-format="YYYY-MM-DD"-->
|
||||||
></el-date-picker>
|
<!-- ></el-date-picker>-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
</el-col>
|
<!-- </el-col>-->
|
||||||
<el-col :span="12">
|
<!-- <el-col :span="12">-->
|
||||||
<el-form-item label="公开日:" prop="openAt">
|
<!-- <el-form-item label="公开日:" prop="openAt">-->
|
||||||
<el-date-picker
|
<!-- <el-date-picker-->
|
||||||
v-model="form.openAt"
|
<!-- v-model="form.openAt"-->
|
||||||
placeholder="请选择公开日"
|
<!-- placeholder="请选择公开日"-->
|
||||||
style="width: 100%"
|
<!-- style="width: 100%"-->
|
||||||
type="date"
|
<!-- type="date"-->
|
||||||
value-format="YYYY-MM-DD"
|
<!-- value-format="YYYY-MM-DD"-->
|
||||||
></el-date-picker>
|
<!-- ></el-date-picker>-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
</el-col>
|
<!-- </el-col>-->
|
||||||
</el-row>
|
<!-- </el-row>-->
|
||||||
<el-row>
|
<!-- <el-row>-->
|
||||||
<el-col :span="12">
|
<!-- <el-col :span="12">-->
|
||||||
<el-form-item label="专利类型:" prop="kind">
|
<!-- <el-form-item label="专利类型:" prop="kind">-->
|
||||||
<el-select
|
<!-- <el-select-->
|
||||||
v-model="form.kind"
|
<!-- v-model="form.kind"-->
|
||||||
clearable
|
<!-- clearable-->
|
||||||
placeholder="请选择"
|
<!-- placeholder="请选择"-->
|
||||||
style="width: 100%"
|
<!-- style="width: 100%"-->
|
||||||
>
|
<!-- >-->
|
||||||
<el-option
|
<!-- <el-option-->
|
||||||
v-for="item in patentOptions"
|
<!-- v-for="item in patentOptions"-->
|
||||||
:key="item.key"
|
<!-- :key="item.key"-->
|
||||||
:label="item.value"
|
<!-- :label="item.value"-->
|
||||||
:value="item.key"
|
<!-- :value="item.key"-->
|
||||||
>
|
<!-- >-->
|
||||||
</el-option>
|
<!-- </el-option>-->
|
||||||
</el-select>
|
<!-- </el-select>-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
</el-col>
|
<!-- </el-col>-->
|
||||||
<el-col :span="12">
|
<!-- <el-col :span="12">-->
|
||||||
<el-form-item label="IPC分类号:" prop="ipcCode">
|
<!-- <el-form-item label="IPC分类号:" prop="ipcCode">-->
|
||||||
<el-input v-model="form.ipcCode" placeholder="请输入IPC分类号"/>
|
<!-- <el-input v-model="form.ipcCode" placeholder="请输入IPC分类号"/>-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
</el-col>
|
<!-- </el-col>-->
|
||||||
</el-row>
|
<!-- </el-row>-->
|
||||||
<el-form-item label="专利状态:" prop="status">
|
<!-- <el-form-item label="专利状态:" prop="status">-->
|
||||||
<el-radio-group v-model="form.status">
|
<!-- <el-radio-group v-model="form.status">-->
|
||||||
<el-radio label="1">授权</el-radio>
|
<!-- <el-radio label="1">授权</el-radio>-->
|
||||||
<el-radio label="2">实审</el-radio>
|
<!-- <el-radio label="2">实审</el-radio>-->
|
||||||
<el-radio label="3">公开</el-radio>
|
<!-- <el-radio label="3">公开</el-radio>-->
|
||||||
</el-radio-group>
|
<!-- </el-radio-group>-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
<el-form-item label="摘要:" prop="description">
|
<!-- <el-form-item label="摘要:" prop="description">-->
|
||||||
<el-input
|
<!-- <el-input-->
|
||||||
v-model="form.description"
|
<!-- v-model="form.description"-->
|
||||||
:autosize="{ minRows: 4, maxRows: 8 }"
|
<!-- :autosize="{ minRows: 4, maxRows: 8 }"-->
|
||||||
placeholder="请输入摘要"
|
<!-- placeholder="请输入摘要"-->
|
||||||
type="textarea"
|
<!-- type="textarea"-->
|
||||||
/>
|
<!-- />-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
<el-form-item label="主权项:" prop="principalClaim">
|
<!-- <el-form-item label="主权项:" prop="principalClaim">-->
|
||||||
<el-input
|
<!-- <el-input-->
|
||||||
v-model="form.principalClaim"
|
<!-- v-model="form.principalClaim"-->
|
||||||
:autosize="{ minRows: 4, maxRows: 8 }"
|
<!-- :autosize="{ minRows: 4, maxRows: 8 }"-->
|
||||||
placeholder="请输入主权项"
|
<!-- placeholder="请输入主权项"-->
|
||||||
type="textarea"
|
<!-- type="textarea"-->
|
||||||
/>
|
<!-- />-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
</el-form>
|
<!-- </el-form>-->
|
||||||
<template #footer>
|
<!-- <template #footer>-->
|
||||||
<div class="dialog-footer">
|
<!-- <div class="dialog-footer">-->
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<!-- <el-button type="primary" @click="submitForm">确 定</el-button>-->
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<!-- <el-button @click="cancel">取 消</el-button>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</el-dialog>
|
<!-- </el-dialog>-->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {deleteLabPatentByIds, insertLabPatent, labPatentList, updateLabPatent} from '@/api/admin/laboratory/patent'
|
import {deleteLabPatentByIds, labPatentList} from '@/api/admin/laboratory/patent'
|
||||||
import {cloneDeep} from "lodash";
|
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import {ElMessage, ElMessageBox} from "element-plus";
|
import {ElMessage, ElMessageBox} from "element-plus";
|
||||||
import {patentOptions} from "@/utils/parameter";
|
|
||||||
import {useRouter} from "vue-router";
|
import {useRouter} from "vue-router";
|
||||||
import {getCurrentInstance, reactive, ref, toRefs} from "vue";
|
import {getCurrentInstance, reactive, ref, toRefs} from "vue";
|
||||||
|
|
||||||
@ -247,59 +245,50 @@ const total = ref(0);
|
|||||||
const title = ref("");
|
const title = ref("");
|
||||||
|
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
form: {},
|
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
inventor: undefined,
|
inventor: undefined,
|
||||||
},
|
},
|
||||||
rules: {
|
// form: {},
|
||||||
applyName: [{required: true, message: "申请人不能为空", trigger: "blur"}],
|
// rules: {
|
||||||
applyAddress: [
|
// applyName: [{required: true, message: "申请人不能为空", trigger: "blur"}],
|
||||||
{required: true, message: "申请人地址不能为空", trigger: "blur"},
|
// applyAddress: [
|
||||||
],
|
// {required: true, message: "申请人地址不能为空", trigger: "blur"},
|
||||||
openCode: [{required: true, message: "公开号不能为空", trigger: "blur"}],
|
// ],
|
||||||
openAt: [{required: true, message: "公开日不能为空", trigger: "blur"}],
|
// openCode: [{required: true, message: "公开号不能为空", trigger: "blur"}],
|
||||||
inventor: [{required: true, message: "发明人不能为空", trigger: "blur"}],
|
// openAt: [{required: true, message: "公开日不能为空", trigger: "blur"}],
|
||||||
title: [{required: true, message: "专利名称不能为空", trigger: "blur"}],
|
// inventor: [{required: true, message: "发明人不能为空", trigger: "blur"}],
|
||||||
applyCode: [{required: true, message: "申请号不能为空", trigger: "blur"}],
|
// title: [{required: true, message: "专利名称不能为空", trigger: "blur"}],
|
||||||
applyAt: [{required: true, message: "申请日期不能为空", trigger: "blur"}],
|
// applyCode: [{required: true, message: "申请号不能为空", trigger: "blur"}],
|
||||||
kind: [{required: true, message: "请选择专利类型", trigger: "change"}],
|
// applyAt: [{required: true, message: "申请日期不能为空", trigger: "blur"}],
|
||||||
ipcCode: [
|
// kind: [{required: true, message: "请选择专利类型", trigger: "change"}],
|
||||||
{required: true, message: "IPC分类号不能为空", trigger: "blur"},
|
// ipcCode: [
|
||||||
],
|
// {required: true, message: "IPC分类号不能为空", trigger: "blur"},
|
||||||
status: [
|
// ],
|
||||||
{
|
// status: [
|
||||||
required: true,
|
// {
|
||||||
message: "请选择专利状态",
|
// required: true,
|
||||||
trigger: "change",
|
// message: "请选择专利状态",
|
||||||
},
|
// trigger: "change",
|
||||||
],
|
// },
|
||||||
description: [{required: true, message: "摘要不能为空", trigger: "blur"}],
|
// ],
|
||||||
principalClaim: [
|
// description: [{required: true, message: "摘要不能为空", trigger: "blur"}],
|
||||||
{required: true, message: "主权项不能为空", trigger: "blur"},
|
// principalClaim: [
|
||||||
],
|
// {required: true, message: "主权项不能为空", trigger: "blur"},
|
||||||
},
|
// ],
|
||||||
|
// },
|
||||||
});
|
});
|
||||||
|
|
||||||
const {queryParams, form, rules} = toRefs(data);
|
const {queryParams,} = toRefs(data);
|
||||||
|
|
||||||
const queryRef = ref();
|
const queryRef = ref();
|
||||||
const patentRef = ref();
|
// const patentRef = ref();
|
||||||
const expertId = ref(undefined);
|
// const expertId = ref(undefined);
|
||||||
|
|
||||||
/** 查询数据列表 */
|
/** 查询数据列表 */
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
// const { data } = await getInfo();
|
|
||||||
// form.value.expertId = data.casExpert.id;
|
|
||||||
// const id = data.casExpert.id;
|
|
||||||
// expertId.value = data.casExpert.id;
|
|
||||||
// expertPatentList(id, queryParams.value).then((resp) => {
|
|
||||||
// dataList.value = resp.rows;
|
|
||||||
// total.value = resp.total;
|
|
||||||
// loading.value = false;
|
|
||||||
// });
|
|
||||||
labPatentList(queryParams.value).then(resp => {
|
labPatentList(queryParams.value).then(resp => {
|
||||||
dataList.value = resp.rows
|
dataList.value = resp.rows
|
||||||
total.value = resp.total
|
total.value = resp.total
|
||||||
@ -308,6 +297,7 @@ const getList = async () => {
|
|||||||
loading.value = false
|
loading.value = false
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
const handleQuery = () => {
|
const handleQuery = () => {
|
||||||
queryParams.value.pageNum = 1;
|
queryParams.value.pageNum = 1;
|
||||||
@ -336,63 +326,63 @@ function handleDelete(id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 重置新增的表单以及其他数据 */
|
/** 重置新增的表单以及其他数据 */
|
||||||
function reset() {
|
// function reset() {
|
||||||
form.value = {
|
// form.value = {
|
||||||
id: undefined,
|
// id: undefined,
|
||||||
applyName: undefined,
|
// applyName: undefined,
|
||||||
applyAddress: undefined,
|
// applyAddress: undefined,
|
||||||
inventor: undefined,
|
// inventor: undefined,
|
||||||
title: undefined,
|
// title: undefined,
|
||||||
applyCode: undefined,
|
// applyCode: undefined,
|
||||||
openCode: undefined,
|
// openCode: undefined,
|
||||||
openAt: undefined,
|
// openAt: undefined,
|
||||||
applyAt: undefined,
|
// applyAt: undefined,
|
||||||
kind: undefined,
|
// kind: undefined,
|
||||||
ipcCode: undefined,
|
// ipcCode: undefined,
|
||||||
description: undefined,
|
// description: undefined,
|
||||||
principalClaim: undefined,
|
// principalClaim: undefined,
|
||||||
};
|
// };
|
||||||
proxy.resetForm("patentRef");
|
// proxy.resetForm("patentRef");
|
||||||
}
|
// }
|
||||||
|
|
||||||
/** 添加数据 */
|
// /** 添加数据 */
|
||||||
const handleAdd = () => {
|
// const handleAdd = () => {
|
||||||
reset();
|
// reset();
|
||||||
open.value = true;
|
// open.value = true;
|
||||||
title.value = "添加数据";
|
// title.value = "添加数据";
|
||||||
};
|
// };
|
||||||
/** 修改数据 */
|
// /** 修改数据 */
|
||||||
const handleUpdate = (row) => {
|
// const handleUpdate = (row) => {
|
||||||
reset();
|
// reset();
|
||||||
const data = cloneDeep(row);
|
// const data = cloneDeep(row);
|
||||||
// patentDetail({ id }).then((res) => {
|
// // patentDetail({ id }).then((res) => {
|
||||||
form.value = data;
|
// form.value = data;
|
||||||
open.value = true;
|
// open.value = true;
|
||||||
title.value = "修改数据";
|
// title.value = "修改数据";
|
||||||
// });
|
// // });
|
||||||
};
|
// };
|
||||||
|
//
|
||||||
/** 提交按钮 */
|
// /** 提交按钮 */
|
||||||
const submitForm = async () => {
|
// const submitForm = async () => {
|
||||||
await patentRef.value.validate();
|
// await patentRef.value.validate();
|
||||||
if (form.value.id != undefined) {
|
// if (form.value.id != undefined) {
|
||||||
await updateLabPatent({...form.value, expertId: expertId.value});
|
// await updateLabPatent(form.value);
|
||||||
ElMessage.success("修改成功");
|
// ElMessage.success("修改成功");
|
||||||
open.value = false;
|
// open.value = false;
|
||||||
getList();
|
// getList();
|
||||||
} else {
|
// } else {
|
||||||
await insertLabPatent(form.value);
|
// await insertLabPatent(form.value);
|
||||||
ElMessage.success("新增成功");
|
// ElMessage.success("新增成功");
|
||||||
open.value = false;
|
// open.value = false;
|
||||||
getList();
|
// getList();
|
||||||
}
|
// }
|
||||||
};
|
// };
|
||||||
|
//
|
||||||
/** 取消按钮 */
|
// /** 取消按钮 */
|
||||||
function cancel() {
|
// function cancel() {
|
||||||
open.value = false;
|
// open.value = false;
|
||||||
reset();
|
// reset();
|
||||||
}
|
// }
|
||||||
|
|
||||||
getList();
|
getList();
|
||||||
</script>
|
</script>
|
||||||
|
179
src/views/admin/laboratory/research/research-project/index.vue
Normal file
179
src/views/admin/laboratory/research/research-project/index.vue
Normal file
@ -0,0 +1,179 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form
|
||||||
|
v-show="showSearch"
|
||||||
|
ref="queryRef"
|
||||||
|
:inline="true"
|
||||||
|
:model="queryParams"
|
||||||
|
@submit.prevent
|
||||||
|
>
|
||||||
|
<el-form-item label="成果名称" prop="title">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.title"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入专利名称"
|
||||||
|
size="small"
|
||||||
|
style="width: 240px"
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
icon="Search"
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="handleQuery"
|
||||||
|
>搜索
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="Refresh" size="small" @click="resetQuery"
|
||||||
|
>重置
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<right-toolbar
|
||||||
|
v-model:showSearch="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<!-- 表格数据 -->
|
||||||
|
<el-table v-loading="loading" :data="dataList">
|
||||||
|
<el-table-column label="数据编号" prop="id"/>
|
||||||
|
<el-table-column
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
label="科研项目名称"
|
||||||
|
prop="title"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
label="类型"
|
||||||
|
prop="kind"
|
||||||
|
/>
|
||||||
|
<el-table-column label="所属专家" prop="inventor"/>
|
||||||
|
<el-table-column label="课题角色" prop="applyName"/>
|
||||||
|
<el-table-column label="课题负责人" prop="applyName"/>
|
||||||
|
<el-table-column align="center" label="发布时间" prop="applyAt">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<span>{{ dayjs(row.applyAt).format("YYYY-MM-DD") }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
label="操作"
|
||||||
|
>
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-button
|
||||||
|
icon="download"
|
||||||
|
size="small"
|
||||||
|
type="text"
|
||||||
|
@click="handleTakeOff(row.id)"
|
||||||
|
>下架
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
icon="Delete"
|
||||||
|
size="small"
|
||||||
|
type="text"
|
||||||
|
@click="handleDelete(row.id)"
|
||||||
|
>删除
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
v-model:limit="queryParams.pageSize"
|
||||||
|
v-model:page="queryParams.pageNum"
|
||||||
|
:total="total"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
import {ElMessage, ElMessageBox} from "element-plus";
|
||||||
|
import {useRouter} from "vue-router";
|
||||||
|
import {getCurrentInstance, reactive, ref, toRefs} from "vue";
|
||||||
|
import {deleteTechnologyProject, technologyProjectList} from "@/api/admin/laboratory/research-project";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
const {proxy} = getCurrentInstance();
|
||||||
|
|
||||||
|
const dataList = ref([]);
|
||||||
|
const open = ref(false);
|
||||||
|
const loading = ref(true);
|
||||||
|
const showSearch = ref(true);
|
||||||
|
const total = ref(0);
|
||||||
|
const title = ref("");
|
||||||
|
|
||||||
|
const data = reactive({
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
inventor: undefined,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const {queryParams,} = toRefs(data);
|
||||||
|
|
||||||
|
const queryRef = ref();
|
||||||
|
|
||||||
|
|
||||||
|
/** 查询数据列表 */
|
||||||
|
const getList = async () => {
|
||||||
|
loading.value = true;
|
||||||
|
technologyProjectList(queryParams.value).then(resp => {
|
||||||
|
dataList.value = resp.rows
|
||||||
|
total.value = resp.total
|
||||||
|
loading.value = false
|
||||||
|
}).catch(() => {
|
||||||
|
loading.value = false
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
const handleQuery = () => {
|
||||||
|
queryParams.value.pageNum = 1;
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
function resetQuery() {
|
||||||
|
queryRef.value.resetFields();
|
||||||
|
handleQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
function handleDelete(id) {
|
||||||
|
ElMessageBox.confirm('是否确认删除数据编号为"' + id + '"的科研项目?')
|
||||||
|
.then(function () {
|
||||||
|
return deleteTechnologyProject(id);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
getList();
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下架
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
const handleTakeOff = (id) => {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
getList();
|
||||||
|
</script>
|
171
src/views/admin/laboratory/research/service-demand/detail.vue
Normal file
171
src/views/admin/laboratory/research/service-demand/detail.vue
Normal file
@ -0,0 +1,171 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-card shadow="always" style="width: 55%; margin: 0 auto">
|
||||||
|
<el-form
|
||||||
|
ref="formRef"
|
||||||
|
:label-width="labelWidth + 'px'"
|
||||||
|
:model="formData"
|
||||||
|
:rules="rules"
|
||||||
|
>
|
||||||
|
<p><b>基本信息</b></p>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="需求名称:" prop="name">
|
||||||
|
<el-input v-model="formData.name"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="需求类别:">
|
||||||
|
<el-checkbox-group v-model="formData.check">
|
||||||
|
<el-checkbox
|
||||||
|
v-for="item in checkList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.id"
|
||||||
|
>{{ item.name }}
|
||||||
|
</el-checkbox
|
||||||
|
>
|
||||||
|
<!-- <el-checkbox label="0" @change="handleCheck">其他</el-checkbox> -->
|
||||||
|
</el-checkbox-group>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="20">
|
||||||
|
<el-input
|
||||||
|
v-model="checkInput"
|
||||||
|
placeholder="请输入需求类别"
|
||||||
|
></el-input>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-button type="primary" @click="addCheck">添加</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="需求描述:" prop="add">
|
||||||
|
<editor v-model="formData.add" :minHeight="150"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<CityOptions
|
||||||
|
ref="cityForm"
|
||||||
|
v-model="formData"
|
||||||
|
:labelWidth="labelWidth"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="需求联系人:" prop="bankAccount">
|
||||||
|
<el-input
|
||||||
|
v-model="formData.bankAccount"
|
||||||
|
placeholder="请输入需求联系人"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="联系人手机号:" prop="bankPhone">
|
||||||
|
<el-input
|
||||||
|
v-model="formData.bankPhone"
|
||||||
|
placeholder="请输入联系人手机号"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="需求提交人:" prop="username">
|
||||||
|
<el-input
|
||||||
|
v-model="formData.username"
|
||||||
|
placeholder="自动获取"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="手机号:" prop="userPhone">
|
||||||
|
<el-input
|
||||||
|
v-model="formData.userPhone"
|
||||||
|
placeholder="自动获取"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import CityOptions from "@/views/components/CityOptions/index.vue";
|
||||||
|
import {getCurrentInstance, reactive, ref, toRefs} from "vue";
|
||||||
|
import editor from '@/components/WangEditor/index.vue'
|
||||||
|
import {ElMessage} from "element-plus";
|
||||||
|
|
||||||
|
const data = reactive({
|
||||||
|
formData: {
|
||||||
|
check: [],
|
||||||
|
},
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
postCode: undefined,
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
name: [{required: true, message: "需求名称不能为空", trigger: "blur"}],
|
||||||
|
add: [{required: true, message: "需求描述不能为空", trigger: "blur"}],
|
||||||
|
bankAccount: [
|
||||||
|
{required: true, message: "需求联系人不能为空", trigger: "blur"},
|
||||||
|
],
|
||||||
|
bankPhone: [
|
||||||
|
{required: true, message: "联系人手机号不能为空", trigger: "blur"},
|
||||||
|
],
|
||||||
|
username: [
|
||||||
|
{required: true, message: "需求提交人不能为空", trigger: "blur"},
|
||||||
|
],
|
||||||
|
userPhone: [{required: true, message: "手机号不能为空", trigger: "blur"}],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const {queryParams, formData, rules} = toRefs(data);
|
||||||
|
|
||||||
|
const labelWidth = 140;
|
||||||
|
const checkList = reactive([
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
name: "成果推广",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
name: "关键成果解决",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
name: "对接专家院士",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 4,
|
||||||
|
name: "上市辅导",
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
const checkInput = ref("");
|
||||||
|
|
||||||
|
function addCheck() {
|
||||||
|
if (!checkInput.value.trim().length) return ElMessage.error("请输入");
|
||||||
|
const flag = checkList.some((item) => {
|
||||||
|
return item.name.trim() === checkInput.value.trim();
|
||||||
|
});
|
||||||
|
if (!flag) {
|
||||||
|
checkList.push({
|
||||||
|
id: checkList.length + 1,
|
||||||
|
name: checkInput.value,
|
||||||
|
});
|
||||||
|
checkInput.value = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
179
src/views/admin/laboratory/research/service-demand/index.vue
Normal file
179
src/views/admin/laboratory/research/service-demand/index.vue
Normal file
@ -0,0 +1,179 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form
|
||||||
|
v-show="showSearch"
|
||||||
|
ref="queryRef"
|
||||||
|
:inline="true"
|
||||||
|
:model="queryParams"
|
||||||
|
@submit.prevent
|
||||||
|
>
|
||||||
|
<el-form-item label="成果名称" prop="title">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.title"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入专利名称"
|
||||||
|
size="small"
|
||||||
|
style="width: 240px"
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
icon="Search"
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="handleQuery"
|
||||||
|
>搜索
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="Refresh" size="small" @click="resetQuery"
|
||||||
|
>重置
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<right-toolbar
|
||||||
|
v-model:showSearch="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<!-- 表格数据 -->
|
||||||
|
<el-table v-loading="loading" :data="dataList">
|
||||||
|
<el-table-column label="数据编号" prop="id"/>
|
||||||
|
<el-table-column
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
label="需求名称"
|
||||||
|
prop="title"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="需求类别"
|
||||||
|
prop="applyCode"
|
||||||
|
/>
|
||||||
|
<el-table-column label="状态" prop="inventor"/>
|
||||||
|
<el-table-column label="联系人" prop="applyName"/>
|
||||||
|
<el-table-column label="手机" prop="mobile"/>
|
||||||
|
<el-table-column align="center" label="发布时间" prop="applyAt">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<span>{{ dayjs(row.applyAt).format("YYYY-MM-DD") }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
label="操作"
|
||||||
|
>
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-button
|
||||||
|
icon="FolderRemove"
|
||||||
|
size="small"
|
||||||
|
type="text"
|
||||||
|
@click="handleDelete(row.id)"
|
||||||
|
>取消发布
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
icon="view"
|
||||||
|
size="small"
|
||||||
|
type="text"
|
||||||
|
@click="handleDetail(row.id)"
|
||||||
|
>查看
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
v-model:limit="queryParams.pageSize"
|
||||||
|
v-model:page="queryParams.pageNum"
|
||||||
|
:total="total"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {deleteLabPatentByIds, labPatentList} from '@/api/admin/laboratory/patent'
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
import {ElMessage, ElMessageBox} from "element-plus";
|
||||||
|
import {useRouter} from "vue-router";
|
||||||
|
import {getCurrentInstance, reactive, ref, toRefs} from "vue";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
const {proxy} = getCurrentInstance();
|
||||||
|
|
||||||
|
const dataList = ref([]);
|
||||||
|
const open = ref(false);
|
||||||
|
const loading = ref(true);
|
||||||
|
const showSearch = ref(true);
|
||||||
|
const total = ref(0);
|
||||||
|
const title = ref("");
|
||||||
|
|
||||||
|
const data = reactive({
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
inventor: undefined,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const {queryParams,} = toRefs(data);
|
||||||
|
|
||||||
|
const queryRef = ref();
|
||||||
|
|
||||||
|
|
||||||
|
/** 查询数据列表 */
|
||||||
|
const getList = async () => {
|
||||||
|
loading.value = true;
|
||||||
|
labPatentList(queryParams.value).then(resp => {
|
||||||
|
dataList.value = resp.rows
|
||||||
|
total.value = resp.total
|
||||||
|
loading.value = false
|
||||||
|
}).catch(() => {
|
||||||
|
loading.value = false
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
const handleQuery = () => {
|
||||||
|
queryParams.value.pageNum = 1;
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
function resetQuery() {
|
||||||
|
queryRef.value.resetFields();
|
||||||
|
handleQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
function handleDelete(id) {
|
||||||
|
ElMessageBox.confirm('是否确认删除数据编号为"' + id + '"的专利项?')
|
||||||
|
.then(function () {
|
||||||
|
return deleteLabPatentByIds(id);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
getList();
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 前往查看详情页面
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
const handleDetail = (id) => {
|
||||||
|
router.push({
|
||||||
|
path: `/admin/research/service-demand/detail/${id}`,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
getList();
|
||||||
|
</script>
|
105
src/views/admin/research/account/basic-info.vue
Normal file
105
src/views/admin/research/account/basic-info.vue
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<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>
|
||||||
|
<research-form ref="researchFormRef" v-model="form" :is-add="false"/>
|
||||||
|
<div :style="{ marginLeft: labelWidth + 'px' }">
|
||||||
|
<el-button type="primary" @click="submitExpertForm">提交</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import ResearchForm from "@/views/components/ResearchForm";
|
||||||
|
import {reactive, ref, toRefs} from "vue";
|
||||||
|
import {getInfo, updateLaboratory} from '@/api/admin/laboratory/account'
|
||||||
|
import {ElMessage} from "element-plus";
|
||||||
|
import {insertClientUser} from "@/api/admin/enterprise";
|
||||||
|
|
||||||
|
const data = reactive({
|
||||||
|
form: {
|
||||||
|
researchs: [],
|
||||||
|
keywords: []
|
||||||
|
},
|
||||||
|
personForm: {},
|
||||||
|
rules: {},
|
||||||
|
personRules: {}
|
||||||
|
})
|
||||||
|
const {form, personForm, rules} = toRefs(data)
|
||||||
|
const researchFormRef = ref()
|
||||||
|
const personFormRef = ref()
|
||||||
|
const labelWidth = ref(140);
|
||||||
|
|
||||||
|
// 获取基础信息用于回显
|
||||||
|
const getBasicInfo = async () => {
|
||||||
|
const {data} = await getInfo();
|
||||||
|
data.laboratory.researchs = data.laboratory.researchDirection?.split(",") ?? [];
|
||||||
|
data.laboratory.keywords = data.laboratory.keyword?.split(",") ?? [];
|
||||||
|
form.value = data.laboratory ?? {}
|
||||||
|
personForm.value = data.user ?? {};
|
||||||
|
};
|
||||||
|
|
||||||
|
const submitPersonalInfo = async () => {
|
||||||
|
try {
|
||||||
|
await personFormRef.value.validate();
|
||||||
|
await insertClientUser(personForm.value);
|
||||||
|
ElMessage.success("更新个人信息成功");
|
||||||
|
const {data} = await getInfo();
|
||||||
|
personForm.value = data.user ?? {};
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const submitExpertForm = async () => {
|
||||||
|
const valid = await researchFormRef.value.validateForm();
|
||||||
|
if (valid) {
|
||||||
|
form.value.researchDirection = form.value.researchs?.join(',') ?? null
|
||||||
|
form.value.keyword = form.value.keywords?.join(',') ?? null
|
||||||
|
updateLaboratory(form.value).then((res) => {
|
||||||
|
ElMessage.success("修改成功");
|
||||||
|
getBasicInfo()
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
console.log("校验未通过");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
getBasicInfo();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
173
src/views/admin/research/research/achievement/index.vue
Normal file
173
src/views/admin/research/research/achievement/index.vue
Normal file
@ -0,0 +1,173 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form
|
||||||
|
v-show="showSearch"
|
||||||
|
ref="queryRef"
|
||||||
|
:inline="true"
|
||||||
|
:model="queryParams"
|
||||||
|
@submit.prevent
|
||||||
|
>
|
||||||
|
<el-form-item label="成果名称" prop="title">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.title"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入成果名称"
|
||||||
|
size="small"
|
||||||
|
style="width: 240px"
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
icon="Search"
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="handleQuery"
|
||||||
|
>搜索
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="Refresh" size="small" @click="resetQuery"
|
||||||
|
>重置
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<right-toolbar
|
||||||
|
v-model:showSearch="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<!-- 表格数据 -->
|
||||||
|
<el-table v-loading="loading" :data="dataList">
|
||||||
|
<el-table-column label="数据编号" prop="id"/>
|
||||||
|
<el-table-column
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
label="成果名称"
|
||||||
|
prop="title"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
label="成果领域"
|
||||||
|
prop="industryStr"
|
||||||
|
/>
|
||||||
|
<el-table-column label="所属专家" prop="expertName"/>
|
||||||
|
<!-- <el-table-column label="浏览量" prop="visitCount"/>-->
|
||||||
|
<el-table-column align="center" label="发布时间" prop="createTime">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<span>{{ dayjs(row.createTime).format("YYYY-MM-DD") }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
label="操作"
|
||||||
|
>
|
||||||
|
<template #default="{ row }">
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- icon="download"-->
|
||||||
|
<!-- size="small"-->
|
||||||
|
<!-- type="text"-->
|
||||||
|
<!-- @click="handleDelete(row.id)"-->
|
||||||
|
<!-- >下架-->
|
||||||
|
<!-- </el-button-->
|
||||||
|
<!-- >-->
|
||||||
|
<el-button
|
||||||
|
icon="delete"
|
||||||
|
size="small"
|
||||||
|
type="text"
|
||||||
|
@click="handleDelete(row.id)"
|
||||||
|
>删除
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
v-model:limit="queryParams.pageSize"
|
||||||
|
v-model:page="queryParams.pageNum"
|
||||||
|
:total="total"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
import {ElMessage, ElMessageBox} from "element-plus";
|
||||||
|
import {useRouter} from "vue-router";
|
||||||
|
import {getCurrentInstance, reactive, ref, toRefs} from "vue";
|
||||||
|
import {achievementList, deleteAchievements} from "@/api/admin/laboratory/achievement";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
const {proxy} = getCurrentInstance();
|
||||||
|
|
||||||
|
const dataList = ref([]);
|
||||||
|
const open = ref(false);
|
||||||
|
const loading = ref(true);
|
||||||
|
const showSearch = ref(true);
|
||||||
|
const total = ref(0);
|
||||||
|
const title = ref("");
|
||||||
|
|
||||||
|
const data = reactive({
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
inventor: undefined,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const {queryParams} = toRefs(data);
|
||||||
|
|
||||||
|
const queryRef = ref();
|
||||||
|
|
||||||
|
|
||||||
|
/** 查询数据列表 */
|
||||||
|
const getList = async () => {
|
||||||
|
loading.value = true;
|
||||||
|
achievementList(queryParams.value).then(resp => {
|
||||||
|
dataList.value = resp.rows
|
||||||
|
total.value = resp.total
|
||||||
|
loading.value = false
|
||||||
|
}).catch(() => {
|
||||||
|
loading.value = false
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
const handleQuery = () => {
|
||||||
|
queryParams.value.pageNum = 1;
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
function resetQuery() {
|
||||||
|
queryRef.value.resetFields();
|
||||||
|
handleQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除按钮操作
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
function handleDelete(id) {
|
||||||
|
ElMessageBox.confirm('是否确认删除数据编号为"' + id + '"的成果项?')
|
||||||
|
.then(function () {
|
||||||
|
return deleteAchievements(id);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
getList();
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
getList();
|
||||||
|
</script>
|
261
src/views/admin/research/research/expert/index.vue
Normal file
261
src/views/admin/research/research/expert/index.vue
Normal file
@ -0,0 +1,261 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form
|
||||||
|
v-show="showSearch"
|
||||||
|
ref="queryRef"
|
||||||
|
:inline="true"
|
||||||
|
:model="queryParams"
|
||||||
|
@submit.prevent
|
||||||
|
>
|
||||||
|
<el-form-item label="成果名称" prop="title">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.title"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入专利名称"
|
||||||
|
size="small"
|
||||||
|
style="width: 240px"
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
icon="Search"
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="handleQuery"
|
||||||
|
>搜索
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="Refresh" size="small" @click="resetQuery"
|
||||||
|
>重置
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button icon="plus" size="small" type="primary">新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar
|
||||||
|
v-model:showSearch="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<!-- 表格数据 -->
|
||||||
|
<el-table v-loading="loading" :data="dataList">
|
||||||
|
<el-table-column label="数据编号" prop="id"/>
|
||||||
|
<el-table-column
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
label="专家名称"
|
||||||
|
prop="title"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="联系电话"
|
||||||
|
prop="mobile"
|
||||||
|
/>
|
||||||
|
<el-table-column label="研究领域" prop="industryStr"/>
|
||||||
|
<!-- <el-table-column label="申请(专利权)人" prop="applyName"/>-->
|
||||||
|
<el-table-column align="center" label="入驻时间" prop="workTime">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<span>{{ dayjs(row.workTime).format("YYYY-MM-DD") }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
label="操作"
|
||||||
|
>
|
||||||
|
<template #default="{ row }">
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- icon="edit"-->
|
||||||
|
<!-- size="small"-->
|
||||||
|
<!-- type="text"-->
|
||||||
|
<!-- @click="handleDeleteBind(row.id)"-->
|
||||||
|
<!-- >编辑-->
|
||||||
|
<!-- </el-button-->
|
||||||
|
<!-- >-->
|
||||||
|
<el-button
|
||||||
|
icon="Delete"
|
||||||
|
size="small"
|
||||||
|
type="text"
|
||||||
|
@click="handleDeleteBind(row.id)"
|
||||||
|
>取消关联
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
v-model:limit="queryParams.pageSize"
|
||||||
|
v-model:page="queryParams.pageNum"
|
||||||
|
:total="total"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
<!-- 添加或修改数据配置对话框 -->
|
||||||
|
<el-dialog v-model="open" :title="title" append-to-body width="800px">
|
||||||
|
<el-form ref="expertRef" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-form-item label="专家姓名" prop="title">
|
||||||
|
<el-input v-model="form.title" placeholder="请输入专家姓名"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="性别" prop="gender">
|
||||||
|
<el-input v-model="form.gender" placeholder="请输入性别"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="单位" prop="unit">
|
||||||
|
<el-input v-model="form.unit" placeholder="单位"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="研究方向" prop="researchDirection">
|
||||||
|
<InputBoxAdd
|
||||||
|
ref="researchDirectionFormRef"
|
||||||
|
v-model="form"
|
||||||
|
:labelWidth="100"
|
||||||
|
fieldKey="researchs"
|
||||||
|
placeholder="研究方向"
|
||||||
|
title="研究方向"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {labPatentList} from '@/api/admin/laboratory/patent'
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
import {ElMessage, ElMessageBox} from "element-plus";
|
||||||
|
import {useRouter} from "vue-router";
|
||||||
|
import {reactive, ref, toRefs} from "vue";
|
||||||
|
import InputBoxAdd from "@/views/components/InputBoxAdd/index.vue";
|
||||||
|
import {deleteBindExpert, expertList} from "@/api/admin/laboratory/expert";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
|
||||||
|
const dataList = ref([]);
|
||||||
|
const open = ref(false);
|
||||||
|
const loading = ref(true);
|
||||||
|
const showSearch = ref(true);
|
||||||
|
const total = ref(0);
|
||||||
|
const title = ref("");
|
||||||
|
const expertRef = ref()
|
||||||
|
const researchDirectionFormRef = ref()
|
||||||
|
const data = reactive({
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
inventor: undefined,
|
||||||
|
},
|
||||||
|
form: {},
|
||||||
|
rules: {}
|
||||||
|
});
|
||||||
|
|
||||||
|
const {queryParams, form, rules} = toRefs(data);
|
||||||
|
|
||||||
|
const queryRef = ref();
|
||||||
|
|
||||||
|
|
||||||
|
/** 查询数据列表 */
|
||||||
|
const getList = async () => {
|
||||||
|
loading.value = true;
|
||||||
|
expertList(queryParams.value).then(resp => {
|
||||||
|
dataList.value = resp.rows
|
||||||
|
total.value = resp.total
|
||||||
|
loading.value = false
|
||||||
|
}).catch(() => {
|
||||||
|
loading.value = false
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
const handleQuery = () => {
|
||||||
|
queryParams.value.pageNum = 1;
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
function resetQuery() {
|
||||||
|
queryRef.value.resetFields();
|
||||||
|
handleQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
function handleDeleteBind(id) {
|
||||||
|
ElMessageBox.confirm(`是否确认取消关联数据编号为"${id}"的专家?`)
|
||||||
|
.then(function () {
|
||||||
|
return deleteBindExpert(id);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
getList();
|
||||||
|
ElMessage.success("取消关联成功");
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** 重置新增的表单以及其他数据 */
|
||||||
|
function reset() {
|
||||||
|
form.value = {
|
||||||
|
id: undefined,
|
||||||
|
title: undefined,
|
||||||
|
ext: undefined,
|
||||||
|
author: undefined,
|
||||||
|
publish_at: undefined,
|
||||||
|
keywords: [],
|
||||||
|
remark: undefined,
|
||||||
|
};
|
||||||
|
expertRef.value?.resetFields()
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 取消按钮 */
|
||||||
|
function cancel() {
|
||||||
|
open.value = false;
|
||||||
|
reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleAdd = () => {
|
||||||
|
reset()
|
||||||
|
title.value = "添加专家"
|
||||||
|
open.value = true
|
||||||
|
}
|
||||||
|
const handleUpdate = () => {
|
||||||
|
reset()
|
||||||
|
title.value = "编辑专家"
|
||||||
|
open.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 提交按钮 */
|
||||||
|
function submitForm() {
|
||||||
|
expertRef.value?.validate((valid) => {
|
||||||
|
const keywordsFormValid = researchDirectionFormRef?.value.validateForm();
|
||||||
|
if (valid && keywordsFormValid) {
|
||||||
|
if (form.value.id) {
|
||||||
|
// TODO
|
||||||
|
paperEdit(form.value).then((response) => {
|
||||||
|
ElMessage.success("修改成功");
|
||||||
|
open.value = false;
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
paperAdd(form.value).then((response) => {
|
||||||
|
ElMessage.success("新增成功");
|
||||||
|
open.value = false;
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
getList();
|
||||||
|
</script>
|
273
src/views/admin/research/research/laboratory-equipment/index.vue
Normal file
273
src/views/admin/research/research/laboratory-equipment/index.vue
Normal file
@ -0,0 +1,273 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form
|
||||||
|
v-show="showSearch"
|
||||||
|
ref="queryRef"
|
||||||
|
:inline="true"
|
||||||
|
:model="queryParams"
|
||||||
|
@submit.prevent
|
||||||
|
>
|
||||||
|
<el-form-item label="设备名称" prop="title">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.title"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入设备名称"
|
||||||
|
size="small"
|
||||||
|
style="width: 240px"
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button icon="Search" size="small" type="primary" @click="handleQuery"
|
||||||
|
>搜索
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="Refresh" size="small" @click="resetQuery"
|
||||||
|
>重置
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
icon="Plus"
|
||||||
|
plain
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="handleAdd"
|
||||||
|
>新增
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar
|
||||||
|
v-model:showSearch="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<!-- 表格数据 -->
|
||||||
|
<el-table v-loading="loading" :data="dataList">
|
||||||
|
<el-table-column align="center" label="数据编号" prop="deviceId"/>
|
||||||
|
<el-table-column align="center"
|
||||||
|
label="设备名称"
|
||||||
|
prop="name"
|
||||||
|
/>
|
||||||
|
<el-table-column :show-overflow-tooltip="true" align="center" label="型号" prop="model"/>
|
||||||
|
<el-table-column align="center" label="购买日期" prop="buyDate">
|
||||||
|
<template #default="{row}">
|
||||||
|
<span>{{ dayjs(row.buyDate).format("YYYY-MM-DD") }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
label="操作"
|
||||||
|
>
|
||||||
|
<template #default="{row}">
|
||||||
|
<el-button
|
||||||
|
icon="Edit"
|
||||||
|
size="small"
|
||||||
|
type="text"
|
||||||
|
@click="handleUpdate(row)"
|
||||||
|
>修改
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
icon="Delete"
|
||||||
|
size="small"
|
||||||
|
type="text"
|
||||||
|
@click="handleDelete(row)"
|
||||||
|
>删除
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
v-model:limit="queryParams.pageSize"
|
||||||
|
v-model:page="queryParams.pageNum"
|
||||||
|
:total="total"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改数据配置对话框 -->
|
||||||
|
<el-dialog v-model="open" :title="title" append-to-body width="600px">
|
||||||
|
<el-form ref="equipmentRef" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-form-item label="设备名称:" prop="name">
|
||||||
|
<el-input v-model="form.name" placeholder="请输入设备名称"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="型号:" prop="model">
|
||||||
|
<el-input v-model="form.model" placeholder="请输入型号"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="购买时间:" prop="buyDate">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.buyDate"
|
||||||
|
placeholder="请选择购买时间"
|
||||||
|
type="date"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="成果参数:" prop="param">
|
||||||
|
<el-input v-model="form.param" placeholder="请输入成果参数"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="设备描述:" prop="description">
|
||||||
|
<el-input
|
||||||
|
v-model="form.description"
|
||||||
|
placeholder="请输入设备描述"
|
||||||
|
type="textarea"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
// import {expertPaper, paperAdd, paperDelete, paperEdit,} from "@/api/admin/expert/technology";
|
||||||
|
import {reactive, ref, toRefs} from "vue";
|
||||||
|
import {useRouter} from "vue-router";
|
||||||
|
import {ElMessage, ElMessageBox} from "element-plus";
|
||||||
|
import {
|
||||||
|
deleteEquipment,
|
||||||
|
equipmentList,
|
||||||
|
getEquipment,
|
||||||
|
insertEquipment,
|
||||||
|
updateEquipment
|
||||||
|
} from "@/api/admin/laboratory/equipment";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
const dataList = ref([]);
|
||||||
|
const open = ref(false);
|
||||||
|
const loading = ref(true);
|
||||||
|
const showSearch = ref(true);
|
||||||
|
const total = ref(0);
|
||||||
|
const title = ref("");
|
||||||
|
const equipmentRef = ref()
|
||||||
|
const data = reactive({
|
||||||
|
form: {},
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
name: undefined,
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
name: [{required: true, message: "设备名称不能为空", trigger: "blur"}],
|
||||||
|
model: [{required: true, message: "型号不能为空", trigger: "blur"}],
|
||||||
|
param: [{required: true, message: "成果参数不能为空", trigger: "blur"}],
|
||||||
|
buyDate: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择购买时间",
|
||||||
|
trigger: ["blur", "change"],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const {queryParams, form, rules} = toRefs(data);
|
||||||
|
|
||||||
|
/** 查询数据列表 */
|
||||||
|
function getList() {
|
||||||
|
loading.value = true;
|
||||||
|
equipmentList(queryParams.value).then((response) => {
|
||||||
|
console.log(response)
|
||||||
|
dataList.value = response.rows;
|
||||||
|
total.value = response.total;
|
||||||
|
loading.value = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
function handleQuery() {
|
||||||
|
queryParams.value.pageNum = 1;
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
function resetQuery() {
|
||||||
|
equipmentRef.value?.resetFields()
|
||||||
|
handleQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
function handleDelete(row) {
|
||||||
|
ElMessageBox
|
||||||
|
.confirm('是否确认删除数据编号为"' + row.deviceId + '"的数据项?')
|
||||||
|
.then(function () {
|
||||||
|
return deleteEquipment([row.deviceId]);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
getList();
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 重置新增的表单以及其他数据 */
|
||||||
|
function reset() {
|
||||||
|
form.value = {
|
||||||
|
name: null,
|
||||||
|
model: null,
|
||||||
|
buyDate: null,
|
||||||
|
param: null,
|
||||||
|
description: null,
|
||||||
|
};
|
||||||
|
equipmentRef.value?.resetFields()
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 添加数据 */
|
||||||
|
function handleAdd() {
|
||||||
|
reset();
|
||||||
|
open.value = true;
|
||||||
|
title.value = "添加数据";
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改数据 */
|
||||||
|
async function handleUpdate(row) {
|
||||||
|
const resp = await getEquipment(row.deviceId)
|
||||||
|
form.value = resp.data
|
||||||
|
open.value = true;
|
||||||
|
title.value = "修改数据";
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 提交按钮 */
|
||||||
|
function submitForm() {
|
||||||
|
equipmentRef.value?.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
if (form.value.deviceId) {
|
||||||
|
updateEquipment(form.value).then((response) => {
|
||||||
|
ElMessage.success("修改成功");
|
||||||
|
open.value = false;
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
insertEquipment(form.value).then((response) => {
|
||||||
|
ElMessage.success("新增成功");
|
||||||
|
open.value = false;
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 取消按钮 */
|
||||||
|
function cancel() {
|
||||||
|
open.value = false;
|
||||||
|
reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
getList();
|
||||||
|
</script>
|
280
src/views/admin/research/research/paper/index.vue
Normal file
280
src/views/admin/research/research/paper/index.vue
Normal file
@ -0,0 +1,280 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form
|
||||||
|
v-show="showSearch"
|
||||||
|
ref="queryRef"
|
||||||
|
:inline="true"
|
||||||
|
:model="queryParams"
|
||||||
|
@submit.prevent
|
||||||
|
>
|
||||||
|
<el-form-item label="成果名称" prop="title">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.title"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入专利名称"
|
||||||
|
size="small"
|
||||||
|
style="width: 240px"
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
icon="Search"
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="handleQuery"
|
||||||
|
>搜索
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="Refresh" size="small" @click="resetQuery"
|
||||||
|
>重置
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<right-toolbar
|
||||||
|
v-model:showSearch="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<!-- 表格数据 -->
|
||||||
|
<el-table v-loading="loading" :data="dataList">
|
||||||
|
<el-table-column label="数据编号" prop="id"/>
|
||||||
|
<el-table-column
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
label="论文题目"
|
||||||
|
prop="title"
|
||||||
|
/>
|
||||||
|
<el-table-column :show-overflow-tooltip="true" label="刊物" prop="ext"/>
|
||||||
|
<el-table-column label="所属专家" prop="author"/>
|
||||||
|
<el-table-column align="center" label="关键词" prop="keyword"/>
|
||||||
|
<!-- <el-table-column align="center" label="浏览量" prop="readCount"/>-->
|
||||||
|
<el-table-column align="center" label="出版日期" prop="publishTime">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<span>{{ dayjs(row.publishTime).format("YYYY-MM-DD") }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
label="操作"
|
||||||
|
>
|
||||||
|
<template #default="{ row }">
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- icon="edit"-->
|
||||||
|
<!-- size="small"-->
|
||||||
|
<!-- type="text"-->
|
||||||
|
<!-- @click="handleEdit(row)"-->
|
||||||
|
<!-- >编辑-->
|
||||||
|
<!-- </el-button-->
|
||||||
|
<!-- >-->
|
||||||
|
<el-button
|
||||||
|
icon="Delete"
|
||||||
|
size="small"
|
||||||
|
type="text"
|
||||||
|
@click="handleDelete(row.id)"
|
||||||
|
>删除
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
v-model:limit="queryParams.pageSize"
|
||||||
|
v-model:page="queryParams.pageNum"
|
||||||
|
:total="total"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 添加或修改数据配置对话框 -->
|
||||||
|
<el-dialog v-model="open" :title="title" append-to-body width="800px">
|
||||||
|
<el-form ref="paperRef" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-form-item label="论文题目:" prop="title">
|
||||||
|
<el-input v-model="form.title" placeholder="请输入论文题目"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="刊物:" prop="ext">
|
||||||
|
<el-input v-model="form.ext" placeholder="请输入刊物"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="作者:" prop="author">
|
||||||
|
<el-input v-model="form.author" placeholder="多人员请用 , 隔开"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="出版日期:" prop="publish_at">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.publishAt"
|
||||||
|
placeholder="请选择出版日期"
|
||||||
|
type="date"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<InputBoxAdd
|
||||||
|
ref="keywordsFormRef"
|
||||||
|
v-model="form"
|
||||||
|
:labelWidth="100"
|
||||||
|
fieldKey="keywords"
|
||||||
|
placeholder="应用场景关键词+技术产品关键词"
|
||||||
|
title="关键词"
|
||||||
|
/>
|
||||||
|
<el-form-item label="摘要:">
|
||||||
|
<el-input
|
||||||
|
v-model="form.remark"
|
||||||
|
placeholder="请输入内容"
|
||||||
|
type="textarea"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
import {ElMessage, ElMessageBox} from "element-plus";
|
||||||
|
import InputBoxAdd from '@/views/components/InputBoxAdd'
|
||||||
|
import {useRouter} from "vue-router";
|
||||||
|
import {getCurrentInstance, reactive, ref, toRefs} from "vue";
|
||||||
|
import {cloneDeep} from "lodash";
|
||||||
|
import {deletePaper, paperList} from "@/api/admin/laboratory/paper";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
const {proxy} = getCurrentInstance();
|
||||||
|
const paperRef = ref()
|
||||||
|
const keywordsFormRef = ref()
|
||||||
|
|
||||||
|
const dataList = ref([]);
|
||||||
|
const open = ref(false);
|
||||||
|
const loading = ref(true);
|
||||||
|
const showSearch = ref(true);
|
||||||
|
const total = ref(0);
|
||||||
|
const title = ref("");
|
||||||
|
|
||||||
|
const data = reactive({
|
||||||
|
form: {},
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
name: undefined,
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
title: [{required: true, message: "论文题目不能为空", trigger: "blur"}],
|
||||||
|
ext: [{required: true, message: "刊物不能为空", trigger: "blur"}],
|
||||||
|
author: [{required: true, message: "作者不能为空", trigger: "blur"}],
|
||||||
|
publish_at: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择出版日期",
|
||||||
|
trigger: ["blur", "change"],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const {queryParams, form, rules} = toRefs(data);
|
||||||
|
|
||||||
|
const queryRef = ref();
|
||||||
|
|
||||||
|
|
||||||
|
/** 查询数据列表 */
|
||||||
|
const getList = async () => {
|
||||||
|
loading.value = true;
|
||||||
|
paperList(queryParams.value).then(resp => {
|
||||||
|
dataList.value = resp.rows
|
||||||
|
total.value = resp.total
|
||||||
|
loading.value = false
|
||||||
|
}).catch(() => {
|
||||||
|
loading.value = false
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
const handleQuery = () => {
|
||||||
|
queryParams.value.pageNum = 1;
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
function resetQuery() {
|
||||||
|
queryRef.value.resetFields();
|
||||||
|
handleQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
function handleDelete(id) {
|
||||||
|
ElMessageBox.confirm('是否确认删除数据编号为"' + id + '"的论文项?')
|
||||||
|
.then(function () {
|
||||||
|
return deletePaper(id);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
getList();
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 重置新增的表单以及其他数据 */
|
||||||
|
function reset() {
|
||||||
|
form.value = {
|
||||||
|
id: undefined,
|
||||||
|
title: undefined,
|
||||||
|
ext: undefined,
|
||||||
|
author: undefined,
|
||||||
|
publish_at: undefined,
|
||||||
|
keywords: [],
|
||||||
|
remark: undefined,
|
||||||
|
};
|
||||||
|
paperRef.value?.resetFields()
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 取消按钮 */
|
||||||
|
function cancel() {
|
||||||
|
open.value = false;
|
||||||
|
reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleEdit = (row) => {
|
||||||
|
form.value = cloneDeep(row)
|
||||||
|
open.value = true;
|
||||||
|
title.value = "修改数据";
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 提交按钮 */
|
||||||
|
function submitForm() {
|
||||||
|
paperRef.value?.validate((valid) => {
|
||||||
|
const keywordsFormValid = keywordsFormRef.value.validateForm();
|
||||||
|
if (valid && keywordsFormValid) {
|
||||||
|
if (form.value.id) {
|
||||||
|
// TODO
|
||||||
|
paperEdit(form.value).then((response) => {
|
||||||
|
proxy.$modal.msgSuccess("修改成功");
|
||||||
|
open.value = false;
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
else {
|
||||||
|
paperAdd(form.value).then((response) => {
|
||||||
|
proxy.$modal.msgSuccess("新增成功");
|
||||||
|
open.value = false;
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
getList();
|
||||||
|
</script>
|
388
src/views/admin/research/research/patent/index.vue
Normal file
388
src/views/admin/research/research/patent/index.vue
Normal file
@ -0,0 +1,388 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form
|
||||||
|
v-show="showSearch"
|
||||||
|
ref="queryRef"
|
||||||
|
:inline="true"
|
||||||
|
:model="queryParams"
|
||||||
|
@submit.prevent
|
||||||
|
>
|
||||||
|
<el-form-item label="专利名称" prop="title">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.title"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入专利名称"
|
||||||
|
size="small"
|
||||||
|
style="width: 240px"
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
icon="Search"
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="handleQuery"
|
||||||
|
>搜索
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="Refresh" size="small" @click="resetQuery"
|
||||||
|
>重置
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<!-- <el-col :span="1.5">-->
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- icon="Plus"-->
|
||||||
|
<!-- plain-->
|
||||||
|
<!-- size="small"-->
|
||||||
|
<!-- type="primary"-->
|
||||||
|
<!-- @click="handleAdd"-->
|
||||||
|
<!-- >新增-->
|
||||||
|
<!-- </el-button-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- </el-col>-->
|
||||||
|
<!-- <!– 无接口 暂时注释 –>-->
|
||||||
|
<!-- <el-col v-if="false" :span="1.5">-->
|
||||||
|
<!-- <router-link to="./claimPatent">-->
|
||||||
|
<!-- <el-button icon="Plus" plain size="small" type="primary"-->
|
||||||
|
<!-- >认领-->
|
||||||
|
<!-- </el-button-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- </router-link>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
|
<right-toolbar
|
||||||
|
v-model:showSearch="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<!-- 表格数据 -->
|
||||||
|
<el-table v-loading="loading" :data="dataList">
|
||||||
|
<el-table-column label="数据编号" prop="id"/>
|
||||||
|
<el-table-column
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
label="专利名称"
|
||||||
|
prop="title"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
label="申请号"
|
||||||
|
prop="applyCode"
|
||||||
|
/>
|
||||||
|
<el-table-column label="发明人" prop="inventor"/>
|
||||||
|
<el-table-column label="申请(专利权)人" prop="applyName"/>
|
||||||
|
<el-table-column align="center" label="申请日期" prop="applyAt">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<span>{{ dayjs(row.applyAt).format("YYYY-MM-DD") }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
label="操作"
|
||||||
|
>
|
||||||
|
<template #default="{ row }">
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- icon="Edit"-->
|
||||||
|
<!-- size="small"-->
|
||||||
|
<!-- type="text"-->
|
||||||
|
<!-- @click="handleUpdate(row)"-->
|
||||||
|
<!-- >修改-->
|
||||||
|
<!-- </el-button-->
|
||||||
|
<!-- >-->
|
||||||
|
<el-button
|
||||||
|
icon="Delete"
|
||||||
|
size="small"
|
||||||
|
type="text"
|
||||||
|
@click="handleDelete(row.id)"
|
||||||
|
>删除
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
v-model:limit="queryParams.pageSize"
|
||||||
|
v-model:page="queryParams.pageNum"
|
||||||
|
:total="total"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- <!– 添加或修改数据配置对话框 –>-->
|
||||||
|
<!-- <el-dialog v-model="open" :title="title" append-to-body width="800px">-->
|
||||||
|
<!-- <el-form ref="patentRef" :model="form" :rules="rules" label-width="100px">-->
|
||||||
|
<!-- <el-form-item label="申请人:" prop="applyName">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="form.applyName"-->
|
||||||
|
<!-- placeholder="请输入申请(专利权)人(多个请以 , 分割)"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item label="申请人地址:" prop="applyAddress">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="form.applyAddress"-->
|
||||||
|
<!-- placeholder="请输入申请人地址"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item label="发明人:" prop="inventor">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="form.inventor"-->
|
||||||
|
<!-- placeholder="请输入发明人(多个请以 , 分割)"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item label="专利名称:" prop="title">-->
|
||||||
|
<!-- <el-input v-model="form.title" placeholder="请输入专利名称"/>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item label="申请号:" prop="applyCode">-->
|
||||||
|
<!-- <el-input v-model="form.applyCode" placeholder="请输入申请号"/>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item label="公开号:" prop="openCode">-->
|
||||||
|
<!-- <el-input v-model="form.openCode" placeholder="请输入公开号"/>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-row>-->
|
||||||
|
<!-- <el-col :span="12">-->
|
||||||
|
<!-- <el-form-item label="申请日期:" prop="applyAt">-->
|
||||||
|
<!-- <el-date-picker-->
|
||||||
|
<!-- v-model="form.applyAt"-->
|
||||||
|
<!-- placeholder="请选择申请日期"-->
|
||||||
|
<!-- style="width: 100%"-->
|
||||||
|
<!-- type="date"-->
|
||||||
|
<!-- value-format="YYYY-MM-DD"-->
|
||||||
|
<!-- ></el-date-picker>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
|
<!-- <el-col :span="12">-->
|
||||||
|
<!-- <el-form-item label="公开日:" prop="openAt">-->
|
||||||
|
<!-- <el-date-picker-->
|
||||||
|
<!-- v-model="form.openAt"-->
|
||||||
|
<!-- placeholder="请选择公开日"-->
|
||||||
|
<!-- style="width: 100%"-->
|
||||||
|
<!-- type="date"-->
|
||||||
|
<!-- value-format="YYYY-MM-DD"-->
|
||||||
|
<!-- ></el-date-picker>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
|
<!-- </el-row>-->
|
||||||
|
<!-- <el-row>-->
|
||||||
|
<!-- <el-col :span="12">-->
|
||||||
|
<!-- <el-form-item label="专利类型:" prop="kind">-->
|
||||||
|
<!-- <el-select-->
|
||||||
|
<!-- v-model="form.kind"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- placeholder="请选择"-->
|
||||||
|
<!-- style="width: 100%"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- <el-option-->
|
||||||
|
<!-- v-for="item in patentOptions"-->
|
||||||
|
<!-- :key="item.key"-->
|
||||||
|
<!-- :label="item.value"-->
|
||||||
|
<!-- :value="item.key"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- </el-option>-->
|
||||||
|
<!-- </el-select>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
|
<!-- <el-col :span="12">-->
|
||||||
|
<!-- <el-form-item label="IPC分类号:" prop="ipcCode">-->
|
||||||
|
<!-- <el-input v-model="form.ipcCode" placeholder="请输入IPC分类号"/>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
|
<!-- </el-row>-->
|
||||||
|
<!-- <el-form-item label="专利状态:" prop="status">-->
|
||||||
|
<!-- <el-radio-group v-model="form.status">-->
|
||||||
|
<!-- <el-radio label="1">授权</el-radio>-->
|
||||||
|
<!-- <el-radio label="2">实审</el-radio>-->
|
||||||
|
<!-- <el-radio label="3">公开</el-radio>-->
|
||||||
|
<!-- </el-radio-group>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item label="摘要:" prop="description">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="form.description"-->
|
||||||
|
<!-- :autosize="{ minRows: 4, maxRows: 8 }"-->
|
||||||
|
<!-- placeholder="请输入摘要"-->
|
||||||
|
<!-- type="textarea"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item label="主权项:" prop="principalClaim">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="form.principalClaim"-->
|
||||||
|
<!-- :autosize="{ minRows: 4, maxRows: 8 }"-->
|
||||||
|
<!-- placeholder="请输入主权项"-->
|
||||||
|
<!-- type="textarea"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- </el-form>-->
|
||||||
|
<!-- <template #footer>-->
|
||||||
|
<!-- <div class="dialog-footer">-->
|
||||||
|
<!-- <el-button type="primary" @click="submitForm">确 定</el-button>-->
|
||||||
|
<!-- <el-button @click="cancel">取 消</el-button>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- </el-dialog>-->
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {deleteLabPatentByIds, labPatentList} from '@/api/admin/laboratory/patent'
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
import {ElMessage, ElMessageBox} from "element-plus";
|
||||||
|
import {useRouter} from "vue-router";
|
||||||
|
import {getCurrentInstance, reactive, ref, toRefs} from "vue";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
const {proxy} = getCurrentInstance();
|
||||||
|
|
||||||
|
const dataList = ref([]);
|
||||||
|
const open = ref(false);
|
||||||
|
const loading = ref(true);
|
||||||
|
const showSearch = ref(true);
|
||||||
|
const total = ref(0);
|
||||||
|
const title = ref("");
|
||||||
|
|
||||||
|
const data = reactive({
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
inventor: undefined,
|
||||||
|
},
|
||||||
|
// form: {},
|
||||||
|
// rules: {
|
||||||
|
// applyName: [{required: true, message: "申请人不能为空", trigger: "blur"}],
|
||||||
|
// applyAddress: [
|
||||||
|
// {required: true, message: "申请人地址不能为空", trigger: "blur"},
|
||||||
|
// ],
|
||||||
|
// openCode: [{required: true, message: "公开号不能为空", trigger: "blur"}],
|
||||||
|
// openAt: [{required: true, message: "公开日不能为空", trigger: "blur"}],
|
||||||
|
// inventor: [{required: true, message: "发明人不能为空", trigger: "blur"}],
|
||||||
|
// title: [{required: true, message: "专利名称不能为空", trigger: "blur"}],
|
||||||
|
// applyCode: [{required: true, message: "申请号不能为空", trigger: "blur"}],
|
||||||
|
// applyAt: [{required: true, message: "申请日期不能为空", trigger: "blur"}],
|
||||||
|
// kind: [{required: true, message: "请选择专利类型", trigger: "change"}],
|
||||||
|
// ipcCode: [
|
||||||
|
// {required: true, message: "IPC分类号不能为空", trigger: "blur"},
|
||||||
|
// ],
|
||||||
|
// status: [
|
||||||
|
// {
|
||||||
|
// required: true,
|
||||||
|
// message: "请选择专利状态",
|
||||||
|
// trigger: "change",
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
// description: [{required: true, message: "摘要不能为空", trigger: "blur"}],
|
||||||
|
// principalClaim: [
|
||||||
|
// {required: true, message: "主权项不能为空", trigger: "blur"},
|
||||||
|
// ],
|
||||||
|
// },
|
||||||
|
});
|
||||||
|
|
||||||
|
const {queryParams,} = toRefs(data);
|
||||||
|
|
||||||
|
const queryRef = ref();
|
||||||
|
// const patentRef = ref();
|
||||||
|
// const expertId = ref(undefined);
|
||||||
|
|
||||||
|
/** 查询数据列表 */
|
||||||
|
const getList = async () => {
|
||||||
|
loading.value = true;
|
||||||
|
labPatentList(queryParams.value).then(resp => {
|
||||||
|
dataList.value = resp.rows
|
||||||
|
total.value = resp.total
|
||||||
|
loading.value = false
|
||||||
|
}).catch(() => {
|
||||||
|
loading.value = false
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
const handleQuery = () => {
|
||||||
|
queryParams.value.pageNum = 1;
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
function resetQuery() {
|
||||||
|
queryRef.value.resetFields();
|
||||||
|
handleQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
function handleDelete(id) {
|
||||||
|
ElMessageBox.confirm('是否确认删除数据编号为"' + id + '"的专利项?')
|
||||||
|
.then(function () {
|
||||||
|
return deleteLabPatentByIds(id);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
getList();
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 重置新增的表单以及其他数据 */
|
||||||
|
// function reset() {
|
||||||
|
// form.value = {
|
||||||
|
// id: undefined,
|
||||||
|
// applyName: undefined,
|
||||||
|
// applyAddress: undefined,
|
||||||
|
// inventor: undefined,
|
||||||
|
// title: undefined,
|
||||||
|
// applyCode: undefined,
|
||||||
|
// openCode: undefined,
|
||||||
|
// openAt: undefined,
|
||||||
|
// applyAt: undefined,
|
||||||
|
// kind: undefined,
|
||||||
|
// ipcCode: undefined,
|
||||||
|
// description: undefined,
|
||||||
|
// principalClaim: undefined,
|
||||||
|
// };
|
||||||
|
// proxy.resetForm("patentRef");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /** 添加数据 */
|
||||||
|
// const handleAdd = () => {
|
||||||
|
// reset();
|
||||||
|
// open.value = true;
|
||||||
|
// title.value = "添加数据";
|
||||||
|
// };
|
||||||
|
// /** 修改数据 */
|
||||||
|
// const handleUpdate = (row) => {
|
||||||
|
// reset();
|
||||||
|
// const data = cloneDeep(row);
|
||||||
|
// // patentDetail({ id }).then((res) => {
|
||||||
|
// form.value = data;
|
||||||
|
// open.value = true;
|
||||||
|
// title.value = "修改数据";
|
||||||
|
// // });
|
||||||
|
// };
|
||||||
|
//
|
||||||
|
// /** 提交按钮 */
|
||||||
|
// const submitForm = async () => {
|
||||||
|
// await patentRef.value.validate();
|
||||||
|
// if (form.value.id != undefined) {
|
||||||
|
// await updateLabPatent(form.value);
|
||||||
|
// ElMessage.success("修改成功");
|
||||||
|
// open.value = false;
|
||||||
|
// getList();
|
||||||
|
// } else {
|
||||||
|
// await insertLabPatent(form.value);
|
||||||
|
// ElMessage.success("新增成功");
|
||||||
|
// open.value = false;
|
||||||
|
// getList();
|
||||||
|
// }
|
||||||
|
// };
|
||||||
|
//
|
||||||
|
// /** 取消按钮 */
|
||||||
|
// function cancel() {
|
||||||
|
// open.value = false;
|
||||||
|
// reset();
|
||||||
|
// }
|
||||||
|
|
||||||
|
getList();
|
||||||
|
</script>
|
179
src/views/admin/research/research/research-project/index.vue
Normal file
179
src/views/admin/research/research/research-project/index.vue
Normal file
@ -0,0 +1,179 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form
|
||||||
|
v-show="showSearch"
|
||||||
|
ref="queryRef"
|
||||||
|
:inline="true"
|
||||||
|
:model="queryParams"
|
||||||
|
@submit.prevent
|
||||||
|
>
|
||||||
|
<el-form-item label="成果名称" prop="title">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.title"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入专利名称"
|
||||||
|
size="small"
|
||||||
|
style="width: 240px"
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
icon="Search"
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="handleQuery"
|
||||||
|
>搜索
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="Refresh" size="small" @click="resetQuery"
|
||||||
|
>重置
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<right-toolbar
|
||||||
|
v-model:showSearch="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<!-- 表格数据 -->
|
||||||
|
<el-table v-loading="loading" :data="dataList">
|
||||||
|
<el-table-column label="数据编号" prop="id"/>
|
||||||
|
<el-table-column
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
label="科研项目名称"
|
||||||
|
prop="title"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
label="类型"
|
||||||
|
prop="kind"
|
||||||
|
/>
|
||||||
|
<el-table-column label="所属专家" prop="inventor"/>
|
||||||
|
<el-table-column label="课题角色" prop="applyName"/>
|
||||||
|
<el-table-column label="课题负责人" prop="applyName"/>
|
||||||
|
<el-table-column align="center" label="发布时间" prop="applyAt">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<span>{{ dayjs(row.applyAt).format("YYYY-MM-DD") }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
label="操作"
|
||||||
|
>
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-button
|
||||||
|
icon="download"
|
||||||
|
size="small"
|
||||||
|
type="text"
|
||||||
|
@click="handleTakeOff(row.id)"
|
||||||
|
>下架
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
icon="Delete"
|
||||||
|
size="small"
|
||||||
|
type="text"
|
||||||
|
@click="handleDelete(row.id)"
|
||||||
|
>删除
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
v-model:limit="queryParams.pageSize"
|
||||||
|
v-model:page="queryParams.pageNum"
|
||||||
|
:total="total"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
import {ElMessage, ElMessageBox} from "element-plus";
|
||||||
|
import {useRouter} from "vue-router";
|
||||||
|
import {getCurrentInstance, reactive, ref, toRefs} from "vue";
|
||||||
|
import {deleteTechnologyProject, technologyProjectList} from "@/api/admin/laboratory/research-project";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
const {proxy} = getCurrentInstance();
|
||||||
|
|
||||||
|
const dataList = ref([]);
|
||||||
|
const open = ref(false);
|
||||||
|
const loading = ref(true);
|
||||||
|
const showSearch = ref(true);
|
||||||
|
const total = ref(0);
|
||||||
|
const title = ref("");
|
||||||
|
|
||||||
|
const data = reactive({
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
inventor: undefined,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const {queryParams,} = toRefs(data);
|
||||||
|
|
||||||
|
const queryRef = ref();
|
||||||
|
|
||||||
|
|
||||||
|
/** 查询数据列表 */
|
||||||
|
const getList = async () => {
|
||||||
|
loading.value = true;
|
||||||
|
technologyProjectList(queryParams.value).then(resp => {
|
||||||
|
dataList.value = resp.rows
|
||||||
|
total.value = resp.total
|
||||||
|
loading.value = false
|
||||||
|
}).catch(() => {
|
||||||
|
loading.value = false
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
const handleQuery = () => {
|
||||||
|
queryParams.value.pageNum = 1;
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
function resetQuery() {
|
||||||
|
queryRef.value.resetFields();
|
||||||
|
handleQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
function handleDelete(id) {
|
||||||
|
ElMessageBox.confirm('是否确认删除数据编号为"' + id + '"的科研项目?')
|
||||||
|
.then(function () {
|
||||||
|
return deleteTechnologyProject(id);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
getList();
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下架
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
const handleTakeOff = (id) => {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
getList();
|
||||||
|
</script>
|
171
src/views/admin/research/research/service-demand/detail.vue
Normal file
171
src/views/admin/research/research/service-demand/detail.vue
Normal file
@ -0,0 +1,171 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-card shadow="always" style="width: 55%; margin: 0 auto">
|
||||||
|
<el-form
|
||||||
|
ref="formRef"
|
||||||
|
:label-width="labelWidth + 'px'"
|
||||||
|
:model="formData"
|
||||||
|
:rules="rules"
|
||||||
|
>
|
||||||
|
<p><b>基本信息</b></p>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="需求名称:" prop="name">
|
||||||
|
<el-input v-model="formData.name"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="需求类别:">
|
||||||
|
<el-checkbox-group v-model="formData.check">
|
||||||
|
<el-checkbox
|
||||||
|
v-for="item in checkList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.id"
|
||||||
|
>{{ item.name }}
|
||||||
|
</el-checkbox
|
||||||
|
>
|
||||||
|
<!-- <el-checkbox label="0" @change="handleCheck">其他</el-checkbox> -->
|
||||||
|
</el-checkbox-group>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="20">
|
||||||
|
<el-input
|
||||||
|
v-model="checkInput"
|
||||||
|
placeholder="请输入需求类别"
|
||||||
|
></el-input>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-button type="primary" @click="addCheck">添加</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="需求描述:" prop="add">
|
||||||
|
<editor v-model="formData.add" :minHeight="150"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<CityOptions
|
||||||
|
ref="cityForm"
|
||||||
|
v-model="formData"
|
||||||
|
:labelWidth="labelWidth"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="需求联系人:" prop="bankAccount">
|
||||||
|
<el-input
|
||||||
|
v-model="formData.bankAccount"
|
||||||
|
placeholder="请输入需求联系人"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="联系人手机号:" prop="bankPhone">
|
||||||
|
<el-input
|
||||||
|
v-model="formData.bankPhone"
|
||||||
|
placeholder="请输入联系人手机号"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="需求提交人:" prop="username">
|
||||||
|
<el-input
|
||||||
|
v-model="formData.username"
|
||||||
|
placeholder="自动获取"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="手机号:" prop="userPhone">
|
||||||
|
<el-input
|
||||||
|
v-model="formData.userPhone"
|
||||||
|
placeholder="自动获取"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import CityOptions from "@/views/components/CityOptions/index.vue";
|
||||||
|
import {getCurrentInstance, reactive, ref, toRefs} from "vue";
|
||||||
|
import editor from '@/components/WangEditor/index.vue'
|
||||||
|
import {ElMessage} from "element-plus";
|
||||||
|
|
||||||
|
const data = reactive({
|
||||||
|
formData: {
|
||||||
|
check: [],
|
||||||
|
},
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
postCode: undefined,
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
name: [{required: true, message: "需求名称不能为空", trigger: "blur"}],
|
||||||
|
add: [{required: true, message: "需求描述不能为空", trigger: "blur"}],
|
||||||
|
bankAccount: [
|
||||||
|
{required: true, message: "需求联系人不能为空", trigger: "blur"},
|
||||||
|
],
|
||||||
|
bankPhone: [
|
||||||
|
{required: true, message: "联系人手机号不能为空", trigger: "blur"},
|
||||||
|
],
|
||||||
|
username: [
|
||||||
|
{required: true, message: "需求提交人不能为空", trigger: "blur"},
|
||||||
|
],
|
||||||
|
userPhone: [{required: true, message: "手机号不能为空", trigger: "blur"}],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const {queryParams, formData, rules} = toRefs(data);
|
||||||
|
|
||||||
|
const labelWidth = 140;
|
||||||
|
const checkList = reactive([
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
name: "成果推广",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
name: "关键成果解决",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
name: "对接专家院士",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 4,
|
||||||
|
name: "上市辅导",
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
const checkInput = ref("");
|
||||||
|
|
||||||
|
function addCheck() {
|
||||||
|
if (!checkInput.value.trim().length) return ElMessage.error("请输入");
|
||||||
|
const flag = checkList.some((item) => {
|
||||||
|
return item.name.trim() === checkInput.value.trim();
|
||||||
|
});
|
||||||
|
if (!flag) {
|
||||||
|
checkList.push({
|
||||||
|
id: checkList.length + 1,
|
||||||
|
name: checkInput.value,
|
||||||
|
});
|
||||||
|
checkInput.value = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
179
src/views/admin/research/research/service-demand/index.vue
Normal file
179
src/views/admin/research/research/service-demand/index.vue
Normal file
@ -0,0 +1,179 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form
|
||||||
|
v-show="showSearch"
|
||||||
|
ref="queryRef"
|
||||||
|
:inline="true"
|
||||||
|
:model="queryParams"
|
||||||
|
@submit.prevent
|
||||||
|
>
|
||||||
|
<el-form-item label="成果名称" prop="title">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.title"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入专利名称"
|
||||||
|
size="small"
|
||||||
|
style="width: 240px"
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
icon="Search"
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="handleQuery"
|
||||||
|
>搜索
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="Refresh" size="small" @click="resetQuery"
|
||||||
|
>重置
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<right-toolbar
|
||||||
|
v-model:showSearch="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<!-- 表格数据 -->
|
||||||
|
<el-table v-loading="loading" :data="dataList">
|
||||||
|
<el-table-column label="数据编号" prop="id"/>
|
||||||
|
<el-table-column
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
label="需求名称"
|
||||||
|
prop="title"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="需求类别"
|
||||||
|
prop="applyCode"
|
||||||
|
/>
|
||||||
|
<el-table-column label="状态" prop="inventor"/>
|
||||||
|
<el-table-column label="联系人" prop="applyName"/>
|
||||||
|
<el-table-column label="手机" prop="mobile"/>
|
||||||
|
<el-table-column align="center" label="发布时间" prop="applyAt">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<span>{{ dayjs(row.applyAt).format("YYYY-MM-DD") }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
label="操作"
|
||||||
|
>
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-button
|
||||||
|
icon="FolderRemove"
|
||||||
|
size="small"
|
||||||
|
type="text"
|
||||||
|
@click="handleDelete(row.id)"
|
||||||
|
>取消发布
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
icon="view"
|
||||||
|
size="small"
|
||||||
|
type="text"
|
||||||
|
@click="handleDetail(row.id)"
|
||||||
|
>查看
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
v-model:limit="queryParams.pageSize"
|
||||||
|
v-model:page="queryParams.pageNum"
|
||||||
|
:total="total"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {deleteLabPatentByIds, labPatentList} from '@/api/admin/laboratory/patent'
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
import {ElMessage, ElMessageBox} from "element-plus";
|
||||||
|
import {useRouter} from "vue-router";
|
||||||
|
import {getCurrentInstance, reactive, ref, toRefs} from "vue";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
const {proxy} = getCurrentInstance();
|
||||||
|
|
||||||
|
const dataList = ref([]);
|
||||||
|
const open = ref(false);
|
||||||
|
const loading = ref(true);
|
||||||
|
const showSearch = ref(true);
|
||||||
|
const total = ref(0);
|
||||||
|
const title = ref("");
|
||||||
|
|
||||||
|
const data = reactive({
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
inventor: undefined,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const {queryParams,} = toRefs(data);
|
||||||
|
|
||||||
|
const queryRef = ref();
|
||||||
|
|
||||||
|
|
||||||
|
/** 查询数据列表 */
|
||||||
|
const getList = async () => {
|
||||||
|
loading.value = true;
|
||||||
|
labPatentList(queryParams.value).then(resp => {
|
||||||
|
dataList.value = resp.rows
|
||||||
|
total.value = resp.total
|
||||||
|
loading.value = false
|
||||||
|
}).catch(() => {
|
||||||
|
loading.value = false
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
const handleQuery = () => {
|
||||||
|
queryParams.value.pageNum = 1;
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
function resetQuery() {
|
||||||
|
queryRef.value.resetFields();
|
||||||
|
handleQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
function handleDelete(id) {
|
||||||
|
ElMessageBox.confirm('是否确认删除数据编号为"' + id + '"的专利项?')
|
||||||
|
.then(function () {
|
||||||
|
return deleteLabPatentByIds(id);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
getList();
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 前往查看详情页面
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
const handleDetail = (id) => {
|
||||||
|
router.push({
|
||||||
|
path: `/admin/research/service-demand/detail/${id}`,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
getList();
|
||||||
|
</script>
|
@ -7,7 +7,7 @@
|
|||||||
>
|
>
|
||||||
<div v-if="showTitle" class="form_title">基本信息</div>
|
<div v-if="showTitle" class="form_title">基本信息</div>
|
||||||
|
|
||||||
<el-row>
|
<el-row v-if="isAdd">
|
||||||
<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,7 +15,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row>
|
<el-row v-if="isAdd">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="手机号:" prop="mobile">
|
<el-form-item label="手机号:" prop="mobile">
|
||||||
<el-input v-model="modelValue.mobile"></el-input>
|
<el-input v-model="modelValue.mobile"></el-input>
|
||||||
@ -23,27 +23,27 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row>
|
<el-row v-if="isAdd">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="身份证号:" prop="id_card">
|
<el-form-item label="身份证号:" prop="idCard">
|
||||||
<el-input v-model="modelValue.id_card"></el-input>
|
<el-input v-model="modelValue.idCard"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="工作所在地:" prop="work_place">
|
<el-form-item label="工作所在地:" prop="workPlace">
|
||||||
<el-input v-model="modelValue.work_place"/>
|
<el-input v-model="modelValue.workPlace"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="工作经历:" prop="work_experience">
|
<el-form-item label="工作经历:" prop="workExperience">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="modelValue.work_experience"
|
v-model="modelValue.workExperience"
|
||||||
:autosize="{ minRows: 2, maxRows: 10 }"
|
:autosize="{ minRows: 2, maxRows: 10 }"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
/>
|
/>
|
||||||
@ -69,14 +69,14 @@
|
|||||||
title="关键词"
|
title="关键词"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<el-row>
|
<el-row v-if="isAdd">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="身份证:" required>
|
<el-form-item label="身份证:" required>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item prop="id_image.front">
|
<el-form-item prop="idImage.front">
|
||||||
<ImageUpload
|
<ImageUpload
|
||||||
v-model="modelValue.id_image.front"
|
v-model="modelValue.idImage.front"
|
||||||
:isShowTip="false"
|
:isShowTip="false"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
/>
|
/>
|
||||||
@ -84,9 +84,9 @@
|
|||||||
<div style="text-align: center">身份证人像面</div>
|
<div style="text-align: center">身份证人像面</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item prop="id_image.behind">
|
<el-form-item prop="idImage.behind">
|
||||||
<ImageUpload
|
<ImageUpload
|
||||||
v-model="modelValue.id_image.behind"
|
v-model="modelValue.idImage.behind"
|
||||||
:isShowTip="false"
|
:isShowTip="false"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
/>
|
/>
|
||||||
@ -94,9 +94,9 @@
|
|||||||
<div style="text-align: center">身份证国徽面</div>
|
<div style="text-align: center">身份证国徽面</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item prop="id_image.hold">
|
<el-form-item prop="idImage.hold">
|
||||||
<ImageUpload
|
<ImageUpload
|
||||||
v-model="modelValue.id_image.hold"
|
v-model="modelValue.idImage.hold"
|
||||||
:isShowTip="false"
|
:isShowTip="false"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
/>
|
/>
|
||||||
@ -108,13 +108,13 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row>
|
<el-row v-if="isAdd">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="成果经纪资格证书:" prop="credential_image">
|
<el-form-item label="成果经纪资格证书:" prop="credentialImage">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<ImageUpload
|
<image-upload
|
||||||
v-model="modelValue.credential_image"
|
v-model="modelValue.credentialImage"
|
||||||
:isShowTip="false"
|
:isShowTip="false"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
/>
|
/>
|
||||||
@ -153,33 +153,33 @@ const rules = {
|
|||||||
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|4|5|6|7|8|9][0-9]\d{8}$/,
|
pattern: /^1[3-9]\d{9}$/,
|
||||||
message: "请输入正确的手机号码",
|
message: "请输入正确的手机号码",
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
id_card: [{required: true, message: "请输入", trigger: "blur"}],
|
idCard: [{required: true, message: "请输入", trigger: "blur"}],
|
||||||
work_place: [{required: true, message: "请输入", trigger: "blur"}],
|
workPlace: [{required: true, message: "请输入", trigger: "blur"}],
|
||||||
work_experience: [
|
workExperience: [
|
||||||
{required: true, message: "请输入", trigger: "blur"},
|
{required: true, message: "请输入", trigger: "blur"},
|
||||||
],
|
],
|
||||||
"id_image.front": [
|
"idImage.front": [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: "请上传",
|
message: "请上传",
|
||||||
trigger: ["blur", "change"],
|
trigger: ["blur", "change"],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
"id_image.behind": [
|
"idImage.behind": [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: "请上传",
|
message: "请上传",
|
||||||
trigger: ["blur", "change"],
|
trigger: ["blur", "change"],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
"id_image.hold": [
|
"idImage.hold": [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: "请上传",
|
message: "请上传",
|
||||||
@ -209,8 +209,6 @@ const validateForm = async () => {
|
|||||||
defineExpose({
|
defineExpose({
|
||||||
validateForm
|
validateForm
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -68,7 +68,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { listSysIndustry } from "@/api/config";
|
import { listSysIndustry } from "@/api/config";
|
||||||
// import { watch } from "fs";
|
// import { watch } from "fs";
|
||||||
import { reactive, toRefs, watch } from "vue";
|
import {reactive, ref, toRefs, watch} from "vue";
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modelValue: Object,
|
modelValue: Object,
|
||||||
labelWidth: {
|
labelWidth: {
|
||||||
|
@ -26,7 +26,6 @@
|
|||||||
<el-input v-model="modelValue.code"></el-input>
|
<el-input v-model="modelValue.code"></el-input>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3">
|
<el-col :span="3">
|
||||||
<!-- :disabled="isAdd"-->
|
|
||||||
<el-button type="primary" @click=""
|
<el-button type="primary" @click=""
|
||||||
>查找
|
>查找
|
||||||
</el-button
|
</el-button
|
||||||
|
@ -142,7 +142,7 @@ const rules = {
|
|||||||
major: [{required: true, message: "请输入", trigger: "blur"}],
|
major: [{required: true, message: "请输入", trigger: "blur"}],
|
||||||
job: [{required: true, message: "请输入", trigger: "blur"}],
|
job: [{required: true, message: "请输入", trigger: "blur"}],
|
||||||
title: [{required: true, message: "请输入", trigger: "blur"}],
|
title: [{required: true, message: "请输入", trigger: "blur"}],
|
||||||
work_at: [
|
workAt: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: "从业时间不能为空",
|
message: "从业时间不能为空",
|
||||||
|
@ -31,7 +31,7 @@ const submitForm = async () => {
|
|||||||
if (!agentFormRef.value) return
|
if (!agentFormRef.value) return
|
||||||
const valid = await agentFormRef.value.validateForm()
|
const valid = await agentFormRef.value.validateForm()
|
||||||
if (valid) {
|
if (valid) {
|
||||||
// TODO: submit laboratory
|
// TODO: submit agent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -36,10 +36,10 @@ const submitForm = async () => {
|
|||||||
form.value.researchDirection = form.value.researchs?.join(",") ?? null
|
form.value.researchDirection = form.value.researchs?.join(",") ?? null
|
||||||
await insertLaboratory(form.value)
|
await insertLaboratory(form.value)
|
||||||
router.go(-1);
|
router.go(-1);
|
||||||
ElMessage.success("实验室入驻成功")
|
ElMessage.success("已申请实验室入驻")
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
ElMessage.error("入驻失败")
|
// ElMessage.error("申请入驻失败")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ export default defineConfig(({ mode, command }) => {
|
|||||||
server: {
|
server: {
|
||||||
port: 80,
|
port: 80,
|
||||||
host: true,
|
host: true,
|
||||||
open: true,
|
open: false,
|
||||||
proxy: {
|
proxy: {
|
||||||
// https://cn.vitejs.dev/config/#server-proxy
|
// https://cn.vitejs.dev/config/#server-proxy
|
||||||
"/dev-api": {
|
"/dev-api": {
|
||||||
|
Reference in New Issue
Block a user