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) => {
|
||||
return request({
|
||||
url: `/app/laboratory/patent/list`,
|
||||
url: `/app/laboratory/patentList`,
|
||||
method: "GET",
|
||||
params
|
||||
});
|
||||
@ -34,7 +34,7 @@ export const updateLabPatent = (data) => {
|
||||
|
||||
export const deleteLabPatentByIds = (ids) => {
|
||||
return request({
|
||||
url: `/app/laboratory/patent/${ids}`,
|
||||
url: `/app/laboratory/deletePatents/${ids}`,
|
||||
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",
|
||||
});
|
||||
};
|
@ -26,161 +26,105 @@ import basicInfo from "../views/admin/enterprise/account/basicInfo.vue";
|
||||
*/
|
||||
|
||||
// 公共路由
|
||||
export const constantRoutes = [
|
||||
{
|
||||
path: "/",
|
||||
name: "Home",
|
||||
component: () => import("../views/website/website-layout.vue"),
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: "login",
|
||||
name: "login",
|
||||
component: () => import("@/views/website/login/index.vue"),
|
||||
children: [],
|
||||
},
|
||||
{
|
||||
path: "",
|
||||
component: () => import("../views/website/home/index.vue"),
|
||||
},
|
||||
{
|
||||
path: "searchList/enterprise",
|
||||
component: () => import("../views/website/searchList/enterprise.vue"),
|
||||
meta: {
|
||||
export const constantRoutes = [{
|
||||
path: "/", name: "Home", component: () => import("../views/website/website-layout.vue"), hidden: true, children: [{
|
||||
path: "login", name: "login", component: () => import("@/views/website/login/index.vue"), children: [],
|
||||
}, {
|
||||
path: "", component: () => import("../views/website/home/index.vue"),
|
||||
}, {
|
||||
path: "searchList/enterprise", component: () => import("../views/website/searchList/enterprise.vue"), meta: {
|
||||
searchType: 1,
|
||||
},
|
||||
},
|
||||
{
|
||||
}, {
|
||||
path: "searchList/enterprise/detail/:id",
|
||||
component: () =>
|
||||
import("../views/website/searchList/enterpriseDetail.vue"),
|
||||
component: () => import("../views/website/searchList/enterpriseDetail.vue"),
|
||||
meta: {
|
||||
searchType: 1,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "searchList/achievement",
|
||||
component: () => import("../views/website/searchList/achievement.vue"),
|
||||
meta: {
|
||||
}, {
|
||||
path: "searchList/achievement", component: () => import("../views/website/searchList/achievement.vue"), meta: {
|
||||
searchType: 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
}, {
|
||||
path: "searchList/achievement/detail/:id",
|
||||
component: () =>
|
||||
import("../views/website/searchList/achievementDetail.vue"),
|
||||
component: () => import("../views/website/searchList/achievementDetail.vue"),
|
||||
meta: {
|
||||
searchType: 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
}, {
|
||||
path: "searchList/product/detail/:id",
|
||||
component: () =>
|
||||
import("../views/website/searchList/productDetail.vue"),
|
||||
component: () => import("../views/website/searchList/productDetail.vue"),
|
||||
meta: {
|
||||
searchType: 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "searchList/lab",
|
||||
component: () => import("../views/website/searchList/lab.vue"),
|
||||
meta: {
|
||||
}, {
|
||||
path: "searchList/lab", component: () => import("../views/website/searchList/lab.vue"), meta: {
|
||||
searchType: 8,
|
||||
},
|
||||
},
|
||||
{
|
||||
}, {
|
||||
path: "searchList/lab/detail/:id",
|
||||
component: () =>
|
||||
import("../views/website/searchList/laboratoryDetail.vue"),
|
||||
component: () => import("../views/website/searchList/laboratoryDetail.vue"),
|
||||
meta: {
|
||||
searchType: 8,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "searchList/patent",
|
||||
component: () => import("../views/website/searchList/patent.vue"),
|
||||
meta: {
|
||||
}, {
|
||||
path: "searchList/patent", component: () => import("../views/website/searchList/patent.vue"), meta: {
|
||||
searchType: 4,
|
||||
},
|
||||
},
|
||||
{
|
||||
}, {
|
||||
path: "searchList/patent/detail/:id",
|
||||
component: () => import("../views/website/searchList/patentDetail.vue"),
|
||||
meta: {
|
||||
searchType: 4,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "searchList/expert",
|
||||
component: () => import("../views/website/searchList/expert.vue"),
|
||||
meta: {
|
||||
}, {
|
||||
path: "searchList/expert", component: () => import("../views/website/searchList/expert.vue"), meta: {
|
||||
searchType: 5,
|
||||
},
|
||||
},
|
||||
{
|
||||
}, {
|
||||
path: "searchList/expert/detail/:id",
|
||||
component: () => import("../views/website/searchList/expertDetail.vue"),
|
||||
meta: {
|
||||
searchType: 5,
|
||||
},
|
||||
},
|
||||
{
|
||||
}, {
|
||||
path: "searchList/serviceDemand",
|
||||
component: () =>
|
||||
import("../views/website/searchList/serviceDemand.vue"),
|
||||
component: () => import("../views/website/searchList/serviceDemand.vue"),
|
||||
meta: {
|
||||
searchType: 7,
|
||||
},
|
||||
},
|
||||
{
|
||||
}, {
|
||||
path: "searchList/serviceDemand/detail/:id",
|
||||
component: () =>
|
||||
import("../views/website/searchList/serviceDemandDetail.vue"),
|
||||
component: () => import("../views/website/searchList/serviceDemandDetail.vue"),
|
||||
meta: {
|
||||
searchType: 7,
|
||||
},
|
||||
},
|
||||
{
|
||||
}, {
|
||||
path: "searchList/technologyDemand",
|
||||
component: () =>
|
||||
import("../views/website/searchList/technologyDemand.vue"),
|
||||
component: () => import("../views/website/searchList/technologyDemand.vue"),
|
||||
meta: {
|
||||
searchType: 6,
|
||||
},
|
||||
},
|
||||
{
|
||||
}, {
|
||||
path: "searchList/technologyDemand/detail/:id",
|
||||
component: () =>
|
||||
import("../views/website/searchList/technologyDemandDetail.vue"),
|
||||
component: () => import("../views/website/searchList/technologyDemandDetail.vue"),
|
||||
meta: {
|
||||
searchType: 6,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "solution/:mode",
|
||||
name: "solution",
|
||||
component: () => import("../views/website/solution/solution.vue"),
|
||||
},
|
||||
{
|
||||
}, {
|
||||
path: "solution/:mode", name: "solution", component: () => import("../views/website/solution/solution.vue"),
|
||||
}, {
|
||||
path: "solution/detail/:id",
|
||||
name: "solutionDetail",
|
||||
component: () => import("../views/website/solution/detail.vue"),
|
||||
},
|
||||
{
|
||||
path: "/innovate",
|
||||
name: "innovate",
|
||||
component: () => import("../views/website/innovate/innovate.vue"),
|
||||
},
|
||||
{
|
||||
}, {
|
||||
path: "/innovate", name: "innovate", component: () => import("../views/website/innovate/innovate.vue"),
|
||||
}, {
|
||||
path: "innovate/detail/:id",
|
||||
name: "innovateDetail",
|
||||
component: () => import("../views/website/innovate/detail.vue"),
|
||||
},
|
||||
{
|
||||
path: "activity",
|
||||
name: "activity",
|
||||
component: () => import("../views/website/activity/activity.vue"),
|
||||
// children: [
|
||||
}, {
|
||||
path: "activity", name: "activity", component: () => import("../views/website/activity/activity.vue"), // children: [
|
||||
// {
|
||||
// path: '',
|
||||
// name: 'activityList',
|
||||
@ -192,27 +136,16 @@ export const constantRoutes = [
|
||||
// component: () => import('../views/website/activity/detail.vue'),
|
||||
// },
|
||||
// ]
|
||||
},
|
||||
{
|
||||
path: "about",
|
||||
name: "about",
|
||||
component: () => import("../views/website/about/about.vue"),
|
||||
},
|
||||
],
|
||||
},
|
||||
}, {
|
||||
path: "about", name: "about", component: () => import("../views/website/about/about.vue"),
|
||||
},],
|
||||
},
|
||||
|
||||
{
|
||||
path: "/redirect",
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: "/redirect/:path(.*)",
|
||||
component: () => import("@/views/redirect/index.vue"),
|
||||
},
|
||||
],
|
||||
},
|
||||
// {
|
||||
path: "/redirect", component: Layout, hidden: true, children: [{
|
||||
path: "/redirect/:path(.*)", component: () => import("@/views/redirect/index.vue"),
|
||||
},],
|
||||
}, // {
|
||||
// path: "/login",
|
||||
// component: () => import("@/views/login"),
|
||||
// hidden: true,
|
||||
@ -223,60 +156,41 @@ export const constantRoutes = [
|
||||
// hidden: true,
|
||||
// },
|
||||
{
|
||||
path: "/:pathMatch(.*)*",
|
||||
component: () => import("@/views/error/404"),
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
path: "/401",
|
||||
component: () => import("@/views/error/401"),
|
||||
hidden: true,
|
||||
path: "/:pathMatch(.*)*", component: () => import("@/views/error/404"), hidden: true,
|
||||
}, {
|
||||
path: "/401", component: () => import("@/views/error/401"), hidden: true,
|
||||
},
|
||||
|
||||
{
|
||||
path: "/identity",
|
||||
component: () => import("@/views/identity/layout"),
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: "index",
|
||||
component: () => import("@/views/identity/index"),
|
||||
name: "index",
|
||||
meta: {title: "身份选择"},
|
||||
},
|
||||
{
|
||||
path: "/identity", component: () => import("@/views/identity/layout"), hidden: true, children: [{
|
||||
path: "index", component: () => import("@/views/identity/index"), name: "index", meta: {title: "身份选择"},
|
||||
}, {
|
||||
path: "enterprise",
|
||||
component: () => import("@/views/identity/enterprise"),
|
||||
name: "enterprise",
|
||||
meta: {title: "企业入驻"},
|
||||
},
|
||||
{
|
||||
}, {
|
||||
path: "expert",
|
||||
component: () => import("@/views/identity/expert"),
|
||||
name: "expert",
|
||||
meta: {title: "专家入驻"},
|
||||
},
|
||||
{
|
||||
}, {
|
||||
path: 'research',
|
||||
component: () => import('@/views/identity/research'),
|
||||
name: 'research',
|
||||
meta: {title: '研究机构入驻'}
|
||||
},
|
||||
{
|
||||
}, {
|
||||
path: 'laboratory',
|
||||
component: () => import('@/views/identity/laboratory'),
|
||||
name: 'laboratory',
|
||||
meta: {title: '实验室入驻'}
|
||||
},
|
||||
{
|
||||
}, {
|
||||
path: 'agent',
|
||||
component: () => import('@/views/identity/agent'),
|
||||
name: 'agent',
|
||||
meta: {title: '科技经纪人入驻'}
|
||||
}
|
||||
],
|
||||
},
|
||||
//TODO:
|
||||
}],
|
||||
}, //TODO:
|
||||
|
||||
// {
|
||||
// path: '',
|
||||
@ -292,192 +206,137 @@ export const constantRoutes = [
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
path: "/user",
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
redirect: "noredirect",
|
||||
children: [
|
||||
{
|
||||
path: "/user", component: Layout, hidden: true, redirect: "noredirect", children: [{
|
||||
path: "profile",
|
||||
component: () => import("@/views/system/user/profile/index"),
|
||||
name: "Profile",
|
||||
meta: {title: "个人中心", icon: "user"},
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
},],
|
||||
},];
|
||||
|
||||
// 企业后台路由表
|
||||
export const enterpriseRoutes = [
|
||||
{
|
||||
path: "/admin",
|
||||
component: Layout,
|
||||
redirect: "/admin/index",
|
||||
children: [
|
||||
{
|
||||
export const enterpriseRoutes = [{
|
||||
path: "/admin", component: Layout, redirect: "/admin/index", children: [{
|
||||
path: "index",
|
||||
component: () => import("@/views/admin/enterprise/index"),
|
||||
name: "Index",
|
||||
meta: {title: "首页", icon: "dashboard", affix: true},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
},],
|
||||
}, {
|
||||
path: "/account",
|
||||
component: Layout,
|
||||
meta: {title: "账号管理", icon: "dashboard"},
|
||||
alwaysShow: true,
|
||||
redirect: "/account/basicInfo",
|
||||
children: [
|
||||
{
|
||||
path: "basicInfo",
|
||||
component: basicInfo,
|
||||
name: "basicInfo",
|
||||
meta: {title: "基本资料", icon: "list"},
|
||||
},
|
||||
{
|
||||
children: [{
|
||||
path: "basicInfo", component: basicInfo, name: "basicInfo", meta: {title: "基本资料", icon: "list"},
|
||||
}, {
|
||||
path: "joinMembership",
|
||||
component: () =>
|
||||
import("@/views/admin/enterprise/account/joinMembership"),
|
||||
component: () => import("@/views/admin/enterprise/account/joinMembership"),
|
||||
name: "joinMembership",
|
||||
meta: {title: "开通会员", icon: "list"},
|
||||
},
|
||||
{
|
||||
}, {
|
||||
path: "bill",
|
||||
component: () => import("@/views/admin/enterprise/account/bill"),
|
||||
name: "Bill",
|
||||
meta: {title: "账单列表", icon: "list"},
|
||||
},
|
||||
// {
|
||||
}, // {
|
||||
// path: "record",
|
||||
// component: () => import("@/views/admin/enterprise/account/record"),
|
||||
// name: "Record",
|
||||
// meta: { title: "创新币兑换记录", icon: "list" },
|
||||
// },
|
||||
],
|
||||
},
|
||||
{
|
||||
}, {
|
||||
path: "/extension",
|
||||
component: Layout,
|
||||
meta: {title: "产品推广", icon: "dashboard"},
|
||||
alwaysShow: true,
|
||||
redirect: "/extension/product",
|
||||
children: [
|
||||
{
|
||||
children: [{
|
||||
path: "product",
|
||||
component: () => import("@/views/admin/enterprise/extension/product"),
|
||||
name: "Product",
|
||||
meta: {title: "产品列表", icon: "list"},
|
||||
},
|
||||
{
|
||||
}, {
|
||||
path: "release",
|
||||
component: () => import("@/views/admin/enterprise/extension/release"),
|
||||
hidden: true,
|
||||
name: "Release",
|
||||
meta: {title: "发布产品", icon: "list"},
|
||||
},
|
||||
{
|
||||
}, {
|
||||
path: "results",
|
||||
component: () => import("@/views/admin/enterprise/extension/results"),
|
||||
hidden: true,
|
||||
name: "Results",
|
||||
meta: {title: "匹配结果", icon: "list", isMatch: true},
|
||||
},
|
||||
{
|
||||
}, {
|
||||
path: "business",
|
||||
component: () => import("@/views/admin/enterprise/extension/business"),
|
||||
hidden: true,
|
||||
name: "Business",
|
||||
meta: {title: "浏览信息", icon: "list"},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
},],
|
||||
}, {
|
||||
path: "/demand",
|
||||
component: Layout,
|
||||
meta: {title: "需求管理", icon: "dashboard"},
|
||||
alwaysShow: true,
|
||||
redirect: "/demand/serviceDemand",
|
||||
children: [
|
||||
{
|
||||
children: [{
|
||||
path: "serviceDemand",
|
||||
component: () =>
|
||||
import("@/views/admin/enterprise/demand/serviceDemand"),
|
||||
component: () => import("@/views/admin/enterprise/demand/serviceDemand"),
|
||||
name: "serviceDemand",
|
||||
meta: {title: "服务需求", icon: "list"},
|
||||
},
|
||||
{
|
||||
}, {
|
||||
path: "releaseService",
|
||||
component: () =>
|
||||
import("@/views/admin/enterprise/demand/releaseService"),
|
||||
component: () => import("@/views/admin/enterprise/demand/releaseService"),
|
||||
hidden: true,
|
||||
name: "releaseService",
|
||||
meta: {title: "发布服务需求", icon: "list"},
|
||||
},
|
||||
{
|
||||
}, {
|
||||
path: "technology",
|
||||
component: () => import("@/views/admin/enterprise/demand/technology"),
|
||||
name: "technology",
|
||||
meta: {title: "技术需求", icon: "list"},
|
||||
},
|
||||
{
|
||||
}, {
|
||||
path: "releaseTechnology",
|
||||
component: () =>
|
||||
import("@/views/admin/enterprise/demand/releaseTechnology"),
|
||||
component: () => import("@/views/admin/enterprise/demand/releaseTechnology"),
|
||||
hidden: true,
|
||||
name: "releaseTechnology",
|
||||
meta: {title: "发布技术需求", icon: "list"},
|
||||
},
|
||||
{
|
||||
}, {
|
||||
path: "results",
|
||||
component: () => import("@/views/admin/enterprise/extension/results"),
|
||||
hidden: true,
|
||||
name: "results",
|
||||
meta: {title: "匹配结果", icon: "list", isMatch: true},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
},],
|
||||
}, {
|
||||
path: "/activity",
|
||||
component: Layout,
|
||||
meta: {title: "活动管理", icon: "dashboard"},
|
||||
alwaysShow: true,
|
||||
redirect: "/activity/active",
|
||||
children: [
|
||||
{
|
||||
children: [{
|
||||
path: "active",
|
||||
component: () => import("@/views/admin/enterprise/activity/active"),
|
||||
name: "Active",
|
||||
meta: {title: "活动列表", icon: "list"},
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
},],
|
||||
},];
|
||||
|
||||
// 专家后台路由表
|
||||
export const expertRoutes = [
|
||||
{
|
||||
path: "/admin",
|
||||
component: Layout,
|
||||
redirect: "/admin/index",
|
||||
children: [
|
||||
{
|
||||
export const expertRoutes = [{
|
||||
path: "/admin", component: Layout, redirect: "/admin/index", children: [{
|
||||
path: "index",
|
||||
component: () => import("@/views/admin/expert/index"),
|
||||
name: "Index",
|
||||
meta: {title: "首页", icon: "dashboard", affix: true},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/account",
|
||||
component: Layout,
|
||||
meta: {title: "账号管理", icon: "dashboard"},
|
||||
alwaysShow: true,
|
||||
// redirect: 'noRedirect',
|
||||
redirect: "/account/bill",
|
||||
children: [
|
||||
// {
|
||||
},],
|
||||
}, {
|
||||
path: "/account", component: Layout, meta: {title: "账号管理", icon: "dashboard"}, alwaysShow: true, // redirect: 'noRedirect',
|
||||
redirect: "/account/bill", children: [// {
|
||||
// path: "bill",
|
||||
// component: () => import("@/views/admin/expert/account/bill"),
|
||||
// name: "Bill",
|
||||
@ -494,8 +353,7 @@ export const expertRoutes = [
|
||||
component: () => import("@/views/admin/expert/account/basicInfo"),
|
||||
name: "basicInfo",
|
||||
meta: {title: "基本资料", icon: "list"},
|
||||
},
|
||||
// {
|
||||
}, // {
|
||||
// path: "transactionAuth",
|
||||
// component: () => import("@/views/admin/expert/account/transactionAuth"),
|
||||
// name: "transactionAuth",
|
||||
@ -515,96 +373,80 @@ export const expertRoutes = [
|
||||
// meta: { title: "提现记录", icon: "list" },
|
||||
// },
|
||||
],
|
||||
},
|
||||
{
|
||||
}, {
|
||||
path: "/technology",
|
||||
component: Layout,
|
||||
meta: {title: "技术管理", icon: "dashboard"},
|
||||
alwaysShow: true,
|
||||
redirect: "/technology/achievement",
|
||||
children: [
|
||||
{
|
||||
children: [{
|
||||
path: "achievement",
|
||||
component: () => import("@/views/admin/expert/technology/achievement"),
|
||||
name: "Achievement",
|
||||
meta: {title: "成果列表", icon: "list"},
|
||||
},
|
||||
{
|
||||
}, {
|
||||
path: "release",
|
||||
component: () => import("@/views/admin/expert/technology/release"),
|
||||
hidden: true,
|
||||
name: "Release",
|
||||
meta: {title: "发布成果", icon: "list"},
|
||||
},
|
||||
{
|
||||
path: "results",
|
||||
// component: () => import("@/views/admin/expert/technology/results"),
|
||||
}, {
|
||||
path: "results", // component: () => import("@/views/admin/expert/technology/results"),
|
||||
component: () => import("@/views/admin/enterprise/extension/results"),
|
||||
hidden: true,
|
||||
name: "Results",
|
||||
meta: {title: "匹配结果", icon: "list", isMatch: false},
|
||||
},
|
||||
{
|
||||
}, {
|
||||
path: "patent",
|
||||
component: () => import("@/views/admin/expert/technology/patent"),
|
||||
name: "patent",
|
||||
meta: {title: "专利列表", icon: "list"},
|
||||
},
|
||||
{
|
||||
}, {
|
||||
path: "claimPatent",
|
||||
component: () => import("@/views/admin/expert/technology/claimPatent"),
|
||||
hidden: true,
|
||||
name: "claimPatent",
|
||||
meta: {title: "认领专利", icon: "list"},
|
||||
},
|
||||
{
|
||||
}, {
|
||||
path: "paper",
|
||||
component: () => import("@/views/admin/expert/technology/paper"),
|
||||
name: "Paper",
|
||||
meta: {title: "论文列表", icon: "list"},
|
||||
},
|
||||
{
|
||||
}, {
|
||||
path: "research",
|
||||
component: () => import("@/views/admin/expert/technology/research"),
|
||||
name: "Research",
|
||||
meta: {title: "科研项目列表", icon: "list"},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
},],
|
||||
}, {
|
||||
path: "/demand",
|
||||
component: Layout,
|
||||
meta: {title: "需求管理", icon: "dashboard"},
|
||||
alwaysShow: true,
|
||||
redirect: "/demand/serviceDemand",
|
||||
children: [
|
||||
{
|
||||
children: [{
|
||||
path: "serviceDemand",
|
||||
component: () => import("@/views/admin/expert/demand/serviceDemand"),
|
||||
name: "serviceDemand",
|
||||
meta: {title: "服务需求", icon: "list"},
|
||||
},
|
||||
{
|
||||
}, {
|
||||
path: "release",
|
||||
component: () => import("@/views/admin/expert/demand/release"),
|
||||
hidden: true,
|
||||
name: "release",
|
||||
meta: {title: "发布需求", icon: "list"},
|
||||
},
|
||||
{
|
||||
}, {
|
||||
path: "already",
|
||||
component: () => import("@/views/admin/expert/demand/already"),
|
||||
name: "already",
|
||||
meta: {title: "已合作企业", icon: "list"},
|
||||
},
|
||||
{
|
||||
}, {
|
||||
path: "think",
|
||||
component: () => import("@/views/admin/expert/demand/think"),
|
||||
name: "think",
|
||||
meta: {title: "想合作企业", icon: "list"},
|
||||
},
|
||||
],
|
||||
},
|
||||
},],
|
||||
},
|
||||
|
||||
{
|
||||
path: "/activity",
|
||||
@ -612,39 +454,28 @@ export const expertRoutes = [
|
||||
meta: {title: "活动管理", icon: "dashboard"},
|
||||
alwaysShow: true,
|
||||
redirect: "/activity/active",
|
||||
children: [
|
||||
{
|
||||
children: [{
|
||||
path: "active",
|
||||
component: () => import("@/views/admin/expert/activity/active"),
|
||||
name: "Active",
|
||||
meta: {title: "活动列表", icon: "list"},
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
},],
|
||||
},];
|
||||
|
||||
export const laboratoryRoutes = [
|
||||
{
|
||||
path: "/admin",
|
||||
component: Layout,
|
||||
redirect: "/admin/index",
|
||||
children: [
|
||||
{
|
||||
export const laboratoryRoutes = [{
|
||||
path: "/admin", component: Layout, redirect: "/admin/index", children: [{
|
||||
path: "index",
|
||||
component: () => import("@/views/admin/laboratory/index"),
|
||||
name: "Index",
|
||||
meta: {title: "首页", icon: "dashboard", affix: true},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
},],
|
||||
}, {
|
||||
path: "/admin/account",
|
||||
component: Layout,
|
||||
meta: {title: "账号管理", icon: "dashboard"},
|
||||
alwaysShow: true,
|
||||
redirect: "/admin/account/basic-info",
|
||||
children: [
|
||||
{
|
||||
children: [{
|
||||
path: "basic-info",
|
||||
component: () => import("@/views/admin/laboratory/account/basic-info.vue"),
|
||||
name: "basicInfo",
|
||||
@ -652,120 +483,190 @@ export const laboratoryRoutes = [
|
||||
},
|
||||
|
||||
],
|
||||
},
|
||||
}, {
|
||||
path: "/admin/research",
|
||||
component: Layout,
|
||||
meta: {title: "科研管理", icon: "dashboard"},
|
||||
alwaysShow: true,
|
||||
redirect: "/admin/research/patent",
|
||||
children: [{
|
||||
path: "patent",
|
||||
component: () => import("@/views/admin/laboratory/research/patent/index.vue"),
|
||||
name: "Patent",
|
||||
meta: {title: "专利列表", icon: "list"},
|
||||
}, {
|
||||
path: "achievement",
|
||||
component: () => import("@/views/admin/laboratory/research/achievement/index.vue"),
|
||||
name: "Achievement",
|
||||
meta: {title: "成果列表", icon: "list"},
|
||||
}, /*{
|
||||
path: "service-demand",
|
||||
component: () => import("@/views/admin/laboratory/research/service-demand/index.vue"),
|
||||
name: "ServiceDemand",
|
||||
meta: {title: "服务需求列表", icon: "list"},
|
||||
}, {
|
||||
path: 'service-demand/detail/:id',
|
||||
component: () => import('@/views/admin/laboratory/research/service-demand/detail.vue'),
|
||||
hidden: true,
|
||||
name: 'ServiceDemandDetail',
|
||||
meta: {title: '查看需求', icon: 'list'}
|
||||
},*/ {
|
||||
path: "expert",
|
||||
component: () => import("@/views/admin/laboratory/research/expert/index.vue"),
|
||||
name: "Expert",
|
||||
meta: {title: "专家列表", icon: "list"},
|
||||
}, {
|
||||
path: "research-project",
|
||||
component: () => import("@/views/admin/laboratory/research/research-project/index.vue"),
|
||||
name: "ResearchProject",
|
||||
meta: {title: "科研项目列表", icon: "list"},
|
||||
}, {
|
||||
path: "paper",
|
||||
component: () => import("@/views/admin/laboratory/research/paper/index.vue"),
|
||||
name: "Paper",
|
||||
meta: {title: "论文列表", icon: "list"},
|
||||
}, {
|
||||
path: "laboratory-equipment",
|
||||
component: () => import("@/views/admin/laboratory/research/laboratory-equipment/index.vue"),
|
||||
name: "LaboratoryEquipment",
|
||||
meta: {title: "实验设备", icon: "list"},
|
||||
},],
|
||||
},]
|
||||
|
||||
export const researchRoutes = [{
|
||||
/*研究机构后台首页*/
|
||||
path: "/admin", component: Layout, redirect: "/admin/index", children: [{
|
||||
path: "index",
|
||||
component: () => import("@/views/admin/research/index"),
|
||||
name: "Index",
|
||||
meta: {title: "首页", icon: "dashboard", affix: true},
|
||||
},],
|
||||
}, {
|
||||
path: "/admin/account",
|
||||
component: Layout,
|
||||
meta: {title: "账号管理", icon: "dashboard"},
|
||||
alwaysShow: true,
|
||||
redirect: "/admin/account/basic-info",
|
||||
children: [{
|
||||
path: "basic-info",
|
||||
component: () => import("@/views/admin/research/account/basic-info.vue"),
|
||||
name: "basicInfo",
|
||||
meta: {title: "基本资料", icon: "list"},
|
||||
},],
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
path: "/admin/research",
|
||||
component: Layout,
|
||||
meta: {title: "科研管理", icon: "dashboard"},
|
||||
alwaysShow: true,
|
||||
redirect: "/admin/research/patent",
|
||||
children: [
|
||||
{
|
||||
children: [{
|
||||
path: "patent",
|
||||
component: () => import("@/views/admin/laboratory/research/patent/index.vue"),
|
||||
component: () => import("@/views/admin/research/research/patent/index.vue"),
|
||||
name: "Patent",
|
||||
meta: {title: "专利列表", icon: "list"},
|
||||
},
|
||||
}, {
|
||||
path: "achievement",
|
||||
component: () => import("@/views/admin/research/research/achievement/index.vue"),
|
||||
name: "Achievement",
|
||||
meta: {title: "成果列表", icon: "list"},
|
||||
}, {
|
||||
path: "service-demand",
|
||||
component: () => import("@/views/admin/research/research/service-demand/index.vue"),
|
||||
name: "ServiceDemand",
|
||||
meta: {title: "服务需求列表", icon: "list"},
|
||||
}, {
|
||||
path: 'service-demand/detail/:id',
|
||||
component: () => import('@/views/admin/research/research/service-demand/detail.vue'),
|
||||
hidden: true,
|
||||
name: 'ServiceDemandDetail',
|
||||
meta: {title: '查看需求', icon: 'list'}
|
||||
}, {
|
||||
path: "expert",
|
||||
component: () => import("@/views/admin/research/research/expert/index.vue"),
|
||||
name: "Expert",
|
||||
meta: {title: "专家列表", icon: "list"},
|
||||
}, {
|
||||
path: "research-project",
|
||||
component: () => import("@/views/admin/research/research/research-project/index.vue"),
|
||||
name: "ResearchProject",
|
||||
meta: {title: "科研项目列表", icon: "list"},
|
||||
}, {
|
||||
path: "laboratory",
|
||||
component: () => import("@/views/admin/research/research/paper/index.vue"),
|
||||
name: "Laboratory",
|
||||
meta: {title: "实验室列表", icon: "list"},
|
||||
},],
|
||||
}]
|
||||
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
export const researchRoutes = [
|
||||
{
|
||||
/**
|
||||
* 经纪人路由列表
|
||||
* @type {[{redirect: string, path: string, component: {}, children: [{path: string, component: (function(): Promise<{}>), meta: {affix: boolean, icon: string, title: string}, name: string}]}]}
|
||||
*/
|
||||
export const agentRoutes = [{
|
||||
/*研究机构后台首页*/
|
||||
path: "/admin",
|
||||
component: Layout,
|
||||
redirect: "/admin/index",
|
||||
children: [
|
||||
{
|
||||
path: "/admin", component: Layout, redirect: "/admin/index", children: [{
|
||||
path: "index",
|
||||
component: () => import("@/views/admin/research/index"),
|
||||
name: "Index",
|
||||
meta: {title: "首页", icon: "dashboard", affix: true},
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
},],
|
||||
}, {
|
||||
path: "/admin/account",
|
||||
component: Layout,
|
||||
meta: {title: "账号管理", icon: "dashboard"},
|
||||
alwaysShow: true,
|
||||
redirect: "/admin/account/basic-info",
|
||||
children: [{
|
||||
path: "basic-info",
|
||||
component: () => import("@/views/admin/agent/account/basic-info.vue"),
|
||||
name: "basicInfo",
|
||||
meta: {title: "基本资料", icon: "list"},
|
||||
},],
|
||||
},]
|
||||
|
||||
// 动态路由,基于用户权限动态去加载
|
||||
export const dynamicRoutes = [
|
||||
{
|
||||
path: "/system/user-auth",
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ["system:user:edit"],
|
||||
children: [
|
||||
{
|
||||
export const dynamicRoutes = [{
|
||||
path: "/system/user-auth", component: Layout, hidden: true, permissions: ["system:user:edit"], children: [{
|
||||
path: "role/:userId(\\d+)",
|
||||
component: () => import("@/views/system/user/authRole"),
|
||||
name: "AuthRole",
|
||||
meta: {title: "分配角色", activeMenu: "/system/user"},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/system/role-auth",
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ["system:role:edit"],
|
||||
children: [
|
||||
{
|
||||
},],
|
||||
}, {
|
||||
path: "/system/role-auth", component: Layout, hidden: true, permissions: ["system:role:edit"], children: [{
|
||||
path: "user/:roleId(\\d+)",
|
||||
component: () => import("@/views/system/role/authUser"),
|
||||
name: "AuthUser",
|
||||
meta: {title: "分配用户", activeMenu: "/system/role"},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/system/dict-data",
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ["system:dict:list"],
|
||||
children: [
|
||||
{
|
||||
},],
|
||||
}, {
|
||||
path: "/system/dict-data", component: Layout, hidden: true, permissions: ["system:dict:list"], children: [{
|
||||
path: "index/:dictId(\\d+)",
|
||||
component: () => import("@/views/system/dict/data"),
|
||||
name: "Data",
|
||||
meta: {title: "字典数据", activeMenu: "/system/dict"},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/monitor/job-log",
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ["monitor:job:list"],
|
||||
children: [
|
||||
{
|
||||
},],
|
||||
}, {
|
||||
path: "/monitor/job-log", component: Layout, hidden: true, permissions: ["monitor:job:list"], children: [{
|
||||
path: "index",
|
||||
component: () => import("@/views/monitor/job/log"),
|
||||
name: "JobLog",
|
||||
meta: {title: "调度日志", activeMenu: "/monitor/job"},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/tool/gen-edit",
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ["tool:gen:edit"],
|
||||
children: [
|
||||
{
|
||||
},],
|
||||
}, {
|
||||
path: "/tool/gen-edit", component: Layout, hidden: true, permissions: ["tool:gen:edit"], children: [{
|
||||
path: "index/:tableId(\\d+)",
|
||||
component: () => import("@/views/tool/gen/editTable"),
|
||||
name: "GenEdit",
|
||||
meta: {title: "修改生成配置", activeMenu: "/tool/gen"},
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
},],
|
||||
},];
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
routes: constantRoutes,
|
||||
scrollBehavior(to, from, savedPosition) {
|
||||
history: createWebHistory(), routes: constantRoutes, scrollBehavior(to, from, savedPosition) {
|
||||
if (savedPosition) {
|
||||
return savedPosition;
|
||||
} else {
|
||||
|
@ -1,5 +1,5 @@
|
||||
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 ParentView from "@/components/ParentView";
|
||||
import InnerLink from "@/layout/components/InnerLink";
|
||||
@ -9,36 +9,39 @@ const modules = import.meta.glob("./../../views/**/*.vue");
|
||||
|
||||
const usePermissionStore = defineStore("permission", {
|
||||
state: () => ({
|
||||
routes: [],
|
||||
addRoutes: [],
|
||||
defaultRoutes: [],
|
||||
topbarRouters: [],
|
||||
sidebarRouters: [],
|
||||
}),
|
||||
actions: {
|
||||
routes: [], addRoutes: [], defaultRoutes: [], topbarRouters: [], sidebarRouters: [],
|
||||
}), actions: {
|
||||
setRoutes(routes) {
|
||||
this.addRoutes = routes;
|
||||
this.routes = constantRoutes.concat(routes);
|
||||
},
|
||||
setDefaultRoutes(routes) {
|
||||
}, setDefaultRoutes(routes) {
|
||||
this.defaultRoutes = constantRoutes.concat(routes);
|
||||
},
|
||||
setTopbarRoutes(routes) {
|
||||
}, setTopbarRoutes(routes) {
|
||||
this.topbarRouters = routes;
|
||||
},
|
||||
setSidebarRouters(routes) {
|
||||
}, setSidebarRouters(routes) {
|
||||
this.sidebarRouters = routes;
|
||||
},
|
||||
generateRoutes(roles) {
|
||||
}, generateRoutes(roles) {
|
||||
return new Promise((resolve) => {
|
||||
console.log(roles)
|
||||
let routesList = [];
|
||||
if (roles === "1") {
|
||||
routesList = enterpriseRoutes;
|
||||
} else if (roles === "2") {
|
||||
routesList = expertRoutes;
|
||||
} else if (roles === "3") {
|
||||
switch (roles) {
|
||||
case "1":
|
||||
routesList = enterpriseRoutes
|
||||
break
|
||||
case "2":
|
||||
routesList = expertRoutes
|
||||
break
|
||||
case "3":
|
||||
routesList = laboratoryRoutes
|
||||
break
|
||||
case '4':
|
||||
routesList = researchRoutes
|
||||
break
|
||||
case '5':
|
||||
routesList = agentRoutes
|
||||
break
|
||||
default:
|
||||
routesList = []
|
||||
}
|
||||
this.setRoutes(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>
|
||||
<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>
|
||||
<!-- <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"
|
||||
@ -85,14 +85,14 @@
|
||||
label="操作"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
icon="Edit"
|
||||
size="small"
|
||||
type="text"
|
||||
@click="handleUpdate(row)"
|
||||
>修改
|
||||
</el-button
|
||||
>
|
||||
<!-- <el-button-->
|
||||
<!-- icon="Edit"-->
|
||||
<!-- size="small"-->
|
||||
<!-- type="text"-->
|
||||
<!-- @click="handleUpdate(row)"-->
|
||||
<!-- >修改-->
|
||||
<!-- </el-button-->
|
||||
<!-- >-->
|
||||
<el-button
|
||||
icon="Delete"
|
||||
size="small"
|
||||
@ -113,125 +113,123 @@
|
||||
@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>
|
||||
<!-- <!– 添加或修改数据配置对话框 –>-->
|
||||
<!-- <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, insertLabPatent, labPatentList, updateLabPatent} from '@/api/admin/laboratory/patent'
|
||||
import {cloneDeep} from "lodash";
|
||||
import {deleteLabPatentByIds, labPatentList} from '@/api/admin/laboratory/patent'
|
||||
import dayjs from "dayjs";
|
||||
import {ElMessage, ElMessageBox} from "element-plus";
|
||||
import {patentOptions} from "@/utils/parameter";
|
||||
import {useRouter} from "vue-router";
|
||||
import {getCurrentInstance, reactive, ref, toRefs} from "vue";
|
||||
|
||||
@ -247,59 +245,50 @@ const total = ref(0);
|
||||
const title = ref("");
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
inventor: undefined,
|
||||
},
|
||||
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"},
|
||||
],
|
||||
},
|
||||
// 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, form, rules} = toRefs(data);
|
||||
const {queryParams,} = toRefs(data);
|
||||
|
||||
const queryRef = ref();
|
||||
const patentRef = ref();
|
||||
const expertId = ref(undefined);
|
||||
// const patentRef = ref();
|
||||
// const expertId = ref(undefined);
|
||||
|
||||
/** 查询数据列表 */
|
||||
const getList = async () => {
|
||||
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 => {
|
||||
dataList.value = resp.rows
|
||||
total.value = resp.total
|
||||
@ -308,6 +297,7 @@ const getList = async () => {
|
||||
loading.value = false
|
||||
})
|
||||
};
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
@ -336,63 +326,63 @@ function handleDelete(id) {
|
||||
}
|
||||
|
||||
/** 重置新增的表单以及其他数据 */
|
||||
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");
|
||||
}
|
||||
// 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, expertId: expertId.value});
|
||||
ElMessage.success("修改成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
} else {
|
||||
await insertLabPatent(form.value);
|
||||
ElMessage.success("新增成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
}
|
||||
};
|
||||
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
}
|
||||
// /** 添加数据 */
|
||||
// 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/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>
|
||||
|
||||
<el-row>
|
||||
<el-row v-if="isAdd">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="姓名:" prop="name">
|
||||
<el-input v-model="modelValue.name"></el-input>
|
||||
@ -15,7 +15,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-row v-if="isAdd">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="手机号:" prop="mobile">
|
||||
<el-input v-model="modelValue.mobile"></el-input>
|
||||
@ -23,27 +23,27 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-row v-if="isAdd">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="身份证号:" prop="id_card">
|
||||
<el-input v-model="modelValue.id_card"></el-input>
|
||||
<el-form-item label="身份证号:" prop="idCard">
|
||||
<el-input v-model="modelValue.idCard"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="工作所在地:" prop="work_place">
|
||||
<el-input v-model="modelValue.work_place"/>
|
||||
<el-form-item label="工作所在地:" prop="workPlace">
|
||||
<el-input v-model="modelValue.workPlace"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="工作经历:" prop="work_experience">
|
||||
<el-form-item label="工作经历:" prop="workExperience">
|
||||
<el-input
|
||||
v-model="modelValue.work_experience"
|
||||
v-model="modelValue.workExperience"
|
||||
:autosize="{ minRows: 2, maxRows: 10 }"
|
||||
type="textarea"
|
||||
/>
|
||||
@ -69,14 +69,14 @@
|
||||
title="关键词"
|
||||
/>
|
||||
|
||||
<el-row>
|
||||
<el-row v-if="isAdd">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="身份证:" required>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="id_image.front">
|
||||
<el-form-item prop="idImage.front">
|
||||
<ImageUpload
|
||||
v-model="modelValue.id_image.front"
|
||||
v-model="modelValue.idImage.front"
|
||||
:isShowTip="false"
|
||||
:limit="1"
|
||||
/>
|
||||
@ -84,9 +84,9 @@
|
||||
<div style="text-align: center">身份证人像面</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="id_image.behind">
|
||||
<el-form-item prop="idImage.behind">
|
||||
<ImageUpload
|
||||
v-model="modelValue.id_image.behind"
|
||||
v-model="modelValue.idImage.behind"
|
||||
:isShowTip="false"
|
||||
:limit="1"
|
||||
/>
|
||||
@ -94,9 +94,9 @@
|
||||
<div style="text-align: center">身份证国徽面</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="id_image.hold">
|
||||
<el-form-item prop="idImage.hold">
|
||||
<ImageUpload
|
||||
v-model="modelValue.id_image.hold"
|
||||
v-model="modelValue.idImage.hold"
|
||||
:isShowTip="false"
|
||||
:limit="1"
|
||||
/>
|
||||
@ -108,13 +108,13 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-row v-if="isAdd">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="成果经纪资格证书:" prop="credential_image">
|
||||
<el-form-item label="成果经纪资格证书:" prop="credentialImage">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<ImageUpload
|
||||
v-model="modelValue.credential_image"
|
||||
<image-upload
|
||||
v-model="modelValue.credentialImage"
|
||||
:isShowTip="false"
|
||||
:limit="1"
|
||||
/>
|
||||
@ -153,33 +153,33 @@ const rules = {
|
||||
kind: [{required: true, message: "请选择", trigger: "change"}],
|
||||
code: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
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: "请输入正确的手机号码",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
id_card: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
work_place: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
work_experience: [
|
||||
idCard: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
workPlace: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
workExperience: [
|
||||
{required: true, message: "请输入", trigger: "blur"},
|
||||
],
|
||||
"id_image.front": [
|
||||
"idImage.front": [
|
||||
{
|
||||
required: true,
|
||||
message: "请上传",
|
||||
trigger: ["blur", "change"],
|
||||
},
|
||||
],
|
||||
"id_image.behind": [
|
||||
"idImage.behind": [
|
||||
{
|
||||
required: true,
|
||||
message: "请上传",
|
||||
trigger: ["blur", "change"],
|
||||
},
|
||||
],
|
||||
"id_image.hold": [
|
||||
"idImage.hold": [
|
||||
{
|
||||
required: true,
|
||||
message: "请上传",
|
||||
@ -209,8 +209,6 @@ const validateForm = async () => {
|
||||
defineExpose({
|
||||
validateForm
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@ -68,7 +68,7 @@
|
||||
<script setup>
|
||||
import { listSysIndustry } from "@/api/config";
|
||||
// import { watch } from "fs";
|
||||
import { reactive, toRefs, watch } from "vue";
|
||||
import {reactive, ref, toRefs, watch} from "vue";
|
||||
const props = defineProps({
|
||||
modelValue: Object,
|
||||
labelWidth: {
|
||||
|
@ -26,7 +26,6 @@
|
||||
<el-input v-model="modelValue.code"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<!-- :disabled="isAdd"-->
|
||||
<el-button type="primary" @click=""
|
||||
>查找
|
||||
</el-button
|
||||
|
@ -142,7 +142,7 @@ const rules = {
|
||||
major: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
job: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
title: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
work_at: [
|
||||
workAt: [
|
||||
{
|
||||
required: true,
|
||||
message: "从业时间不能为空",
|
||||
|
@ -31,7 +31,7 @@ const submitForm = async () => {
|
||||
if (!agentFormRef.value) return
|
||||
const valid = await agentFormRef.value.validateForm()
|
||||
if (valid) {
|
||||
// TODO: submit laboratory
|
||||
// TODO: submit agent
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -36,10 +36,10 @@ const submitForm = async () => {
|
||||
form.value.researchDirection = form.value.researchs?.join(",") ?? null
|
||||
await insertLaboratory(form.value)
|
||||
router.go(-1);
|
||||
ElMessage.success("实验室入驻成功")
|
||||
ElMessage.success("已申请实验室入驻")
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
ElMessage.error("入驻失败")
|
||||
// ElMessage.error("申请入驻失败")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ export default defineConfig(({ mode, command }) => {
|
||||
server: {
|
||||
port: 80,
|
||||
host: true,
|
||||
open: true,
|
||||
open: false,
|
||||
proxy: {
|
||||
// https://cn.vitejs.dev/config/#server-proxy
|
||||
"/dev-api": {
|
||||
|
Reference in New Issue
Block a user