From 198b3639977a8d73b91927a981892b3da160afcf Mon Sep 17 00:00:00 2001
From: quantulr <35954003+quantulr@users.noreply.github.com>
Date: Fri, 11 Aug 2023 17:29:21 +0800
Subject: [PATCH] bugfix and performance improves
---
src/api/dataApproval/enterpriseProduct.js | 46 +--
.../dataApproval/enterpriseServiceDemand.js | 4 +-
src/plugins/tab.js | 1 +
src/utils/parameter.js | 168 +++++----
src/utils/validate.js | 61 +--
src/views/components/AgentForm/index.vue | 44 ++-
.../Businessneeds/Approvaldetails.vue | 29 +-
src/views/components/ExpertForm/index.vue | 276 +++++++-------
src/views/components/LaboratoryForm/index.vue | 182 +++++----
src/views/components/ResearchForm/index.vue | 18 +-
.../Enterpriseproducts/approval.vue | 181 +++++----
.../Enterpriseproducts/index.vue | 165 +++++----
src/views/dataAuditList/demand/approval.vue | 27 +-
src/views/dataAuditList/demand/index.vue | 9 +-
.../dataAuditList/serviceDemand/approval.vue | 68 ++--
.../dataAuditList/serviceDemand/index.vue | 171 +++++----
src/views/dataList/expert/index.vue | 347 +++++++++---------
src/views/dataList/thesis/index.vue | 132 +++----
src/views/userAuditList/expert/index.vue | 75 ++--
src/views/website/aboutUs/index.vue | 146 ++++----
src/views/website/activity/active/index.vue | 13 +-
src/views/website/innovate/service/index.vue | 153 ++++----
.../website/solution/serviceCase/index.vue | 184 +++++-----
23 files changed, 1383 insertions(+), 1117 deletions(-)
diff --git a/src/api/dataApproval/enterpriseProduct.js b/src/api/dataApproval/enterpriseProduct.js
index 5087698..27fb20a 100644
--- a/src/api/dataApproval/enterpriseProduct.js
+++ b/src/api/dataApproval/enterpriseProduct.js
@@ -2,35 +2,35 @@ import request from "@/utils/request";
// 获取企业产品审核列表
export const enterpriseProductApprovalList = (params) =>
- request({
- url: "/business/dataReview/enterpriseProductList",
- method: "get",
- params,
- });
+ request({
+ url: "/business/dataReview/enterpriseProductList",
+ method: "get",
+ params,
+ });
// 获取企业产品审核详情
export const getProductApprovalInfo = (id) =>
- request({
- url: `/business/dataReview/getProductInfo/${id}`,
- method: "get",
- });
+ request({
+ url: `/business/dataReview/getProductInfo/${id}`,
+ method: "get",
+ });
// 修改企业产品审核状态
export const updateEnterpriseApprovalProduct = (data) =>
- request({
- url: `/business/dataReview/updateEnterpriseProduct`,
- method: "post",
- data,
- });
+ request({
+ url: `/business/dataReview/updateEnterpriseProduct`,
+ method: "post",
+ data,
+ });
// 批量审核企业产品
-export const batchEnterpriseProduct = (ids) =>
- request({
- url: `/business/dataReview/batchEnterpriseProduct/${ids}`,
- method: "PUT",
- });
+export const batchEnterpriseProduct = (ids, status) =>
+ request({
+ url: `/business/dataReview/batchEnterpriseProduct/${ids}/${status}`,
+ method: "PUT",
+ });
// 批量删除企业产品
export const deleteEnterpriseProduct = (ids) =>
- request({
- url: `/business/dataReview/deleteEnterpriseProduct/${ids}`,
- method: "DELETE",
- });
+ request({
+ url: `/business/dataReview/deleteEnterpriseProduct/${ids}`,
+ method: "DELETE",
+ });
diff --git a/src/api/dataApproval/enterpriseServiceDemand.js b/src/api/dataApproval/enterpriseServiceDemand.js
index 37551b6..ae43fff 100644
--- a/src/api/dataApproval/enterpriseServiceDemand.js
+++ b/src/api/dataApproval/enterpriseServiceDemand.js
@@ -30,9 +30,9 @@ export const deleteCasDemand = (ids) =>
});
// 批量审核企业服务需求
-export const batchCasDemand = (ids) =>
+export const batchCasDemand = (ids,status) =>
request({
- url: `/business/dataReview/batchCasDemand/${ids}`,
+ url: `/business/dataReview/batchCasDemand/${ids}/${status}`,
method: "PUT",
});
diff --git a/src/plugins/tab.js b/src/plugins/tab.js
index 420bd37..6f27c6f 100644
--- a/src/plugins/tab.js
+++ b/src/plugins/tab.js
@@ -31,6 +31,7 @@ export default {
return router.push(obj);
}
},
+
// 关闭指定tab页签
closePage(obj) {
if (obj === undefined) {
diff --git a/src/utils/parameter.js b/src/utils/parameter.js
index 7c98aeb..6db9be7 100644
--- a/src/utils/parameter.js
+++ b/src/utils/parameter.js
@@ -1,31 +1,31 @@
// 归属导航
export const modeOptions = [
- {
- value: 101,
- label: "中小企业服务",
- },
- {
- value: 102,
- label: "大型企业服务",
- },
- {
- value: 103,
- label: "政府企业服务",
- },
- {
- value: 104,
- label: "科研院所服务",
- },
+ {
+ value: 101,
+ label: "中小企业服务",
+ },
+ {
+ value: 102,
+ label: "大型企业服务",
+ },
+ {
+ value: 103,
+ label: "政府企业服务",
+ },
+ {
+ value: 104,
+ label: "科研院所服务",
+ },
];
// 学历
export const educationOptions = [
- { key: 1, text: "小学" },
- { key: 2, text: "初中" },
- { key: 3, text: "高中" },
- { key: 4, text: "大专" },
- { key: 5, text: "本科" },
- { key: 6, text: "研究生" },
- { key: 7, text: "博士" },
+ {key: "1", text: "小学"},
+ {key: "2", text: "初中"},
+ {key: "3", text: "高中"},
+ {key: "4", text: "大专"},
+ {key: "5", text: "本科"},
+ {key: "6", text: "研究生"},
+ {key: "7", text: "博士"},
];
// 企业类型
// export const enterpriseOptions = [
@@ -34,65 +34,97 @@ export const educationOptions = [
// { key: "103", value: "普通企业" },
// ];
export const enterpriseOptions = [
- { key: "101", value: "上市企业" },
- { key: "102", value: "独角兽企业" },
- { key: "103", value: "国家级专精特新企业" },
- { key: "104", value: "高新技术企业" },
- { key: "105", value: "科技企业" },
+ {key: "101", value: "上市企业"},
+ {key: "102", value: "独角兽企业"},
+ {key: "103", value: "国家级专精特新企业"},
+ {key: "104", value: "高新技术企业"},
+ {key: "105", value: "科技企业"},
];
// 需求类型
export const demandCategoryList = [
- { id: 1, name: "基金对接" },
- { id: 2, name: "贷款" },
- { id: 3, name: "对接专家院士" },
- { id: 4, name: "人才培养" },
- { id: 5, name: "一带一路国际合作" },
- { id: 6, name: "上市辅导" },
- { id: 7, name: "成果产业化" },
- { id: 8, name: "国家级科研平台合作" },
- { id: 9, name: "研发项目立项评估" },
- { id: 10, name: "科技查新" },
- { id: 11, name: "产业链上下游对接" },
- { id: 12, name: "委托研发" },
- { id: 13, name: "对接政府项目落地" },
- { id: 14, name: "技术咨询" },
- { id: 15, name: "高价值专利培育" },
- { id: 16, name: "知识产权布局" },
- { id: 17, name: "设立院士工作站" },
- { id: 18, name: "海外留学生培养" },
+ {id: 1, name: "基金对接"},
+ {id: 2, name: "贷款"},
+ {id: 3, name: "对接专家院士"},
+ {id: 4, name: "人才培养"},
+ {id: 5, name: "一带一路国际合作"},
+ {id: 6, name: "上市辅导"},
+ {id: 7, name: "成果产业化"},
+ {id: 8, name: "国家级科研平台合作"},
+ {id: 9, name: "研发项目立项评估"},
+ {id: 10, name: "科技查新"},
+ {id: 11, name: "产业链上下游对接"},
+ {id: 12, name: "委托研发"},
+ {id: 13, name: "对接政府项目落地"},
+ {id: 14, name: "技术咨询"},
+ {id: 15, name: "高价值专利培育"},
+ {id: 16, name: "知识产权布局"},
+ {id: 17, name: "设立院士工作站"},
+ {id: 18, name: "海外留学生培养"},
];
// 成果成熟度 技术
export const maturityOptions = [
- { key: "1", value: "正在研发" },
- { key: "2", value: "小试阶段" },
- { key: "3", value: "通过小试" },
- { key: "4", value: "中试阶段" },
- { key: "5", value: "通过中试" },
- { key: "6", value: "可规模生产" },
+ {key: "1", value: "正在研发"},
+ {key: "2", value: "小试阶段"},
+ {key: "3", value: "通过小试"},
+ {key: "4", value: "中试阶段"},
+ {key: "5", value: "通过中试"},
+ {key: "6", value: "可规模生产"},
];
// 成果领先型 领先标准
export const leadOptions = [
- { key: "1", value: "国内先进" },
- { key: "2", value: "国内领先" },
- { key: "3", value: "国际先进" },
- { key: "4", value: "国际领先" },
+ {key: "1", value: "国内先进"},
+ {key: "2", value: "国内领先"},
+ {key: "3", value: "国际先进"},
+ {key: "4", value: "国际领先"},
];
// 专利类型
export const patentOptions = [
- { key: "1", value: "发明专利" },
- { key: "2", value: "外观设计" },
- { key: "3", value: "实用新型" },
+ {key: "1", value: "发明专利"},
+ {key: "2", value: "外观设计"},
+ {key: "3", value: "实用新型"},
];
// 合作模式
export const cooperationOptions = [
- { key: "101", value: "技术转让" },
- { key: "102", value: "技术许可" },
- { key: "103", value: "技术入股" },
- { key: "104", value: "合作开发" },
- { key: "105", value: "融资" },
- { key: "106", value: "公司" },
- { key: "107", value: "代理加盟" },
- { key: "108", value: "市场推广" },
- { key: "109", value: "其他" },
+ {key: "101", value: "技术转让"},
+ {key: "102", value: "技术许可"},
+ {key: "103", value: "技术入股"},
+ {key: "104", value: "合作开发"},
+ {key: "105", value: "融资"},
+ {key: "106", value: "公司"},
+ {key: "107", value: "代理加盟"},
+ {key: "108", value: "市场推广"},
+ {key: "109", value: "其他"},
];
+
+
+export const countryOptions = [
+ {
+ key: "zh",
+ value: "中国",
+ },
+ {
+ key: "ru",
+ value: "俄罗斯",
+ },
+ {
+ key: "tj",
+ value: "塔吉克斯坦",
+ },
+ {
+ key: "tm",
+ value: "土库曼斯坦",
+ },
+ {
+ key: "uz",
+ value: "乌兹别克斯坦",
+ },
+ {
+ key: "kz",
+ value: "哈萨克斯坦",
+ },
+ {
+ key: "kg",
+ zh: "吉尔吉斯斯坦",
+ }
+];
\ No newline at end of file
diff --git a/src/utils/validate.js b/src/utils/validate.js
index c5967db..a57ff50 100644
--- a/src/utils/validate.js
+++ b/src/utils/validate.js
@@ -4,7 +4,7 @@
* @returns {Boolean}
*/
export function isHttp(url) {
- return url.indexOf("http://") !== -1 || url.indexOf("https://") !== -1;
+ return url.indexOf("http://") !== -1 || url.indexOf("https://") !== -1;
}
/**
@@ -13,7 +13,7 @@ export function isHttp(url) {
* @returns {Boolean}
*/
export function isExternal(path) {
- return /^(https?:|mailto:|tel:)/.test(path);
+ return /^(https?:|mailto:|tel:)/.test(path);
}
/**
@@ -21,8 +21,8 @@ export function isExternal(path) {
* @returns {Boolean}
*/
export function validUsername(str) {
- const valid_map = ["admin", "editor"];
- return valid_map.indexOf(str.trim()) >= 0;
+ const valid_map = ["admin", "editor"];
+ return valid_map.indexOf(str.trim()) >= 0;
}
/**
@@ -30,9 +30,9 @@ export function validUsername(str) {
* @returns {Boolean}
*/
export function validURL(url) {
- const reg =
- /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/;
- return reg.test(url);
+ const reg =
+ /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/;
+ return reg.test(url);
}
/**
@@ -40,8 +40,8 @@ export function validURL(url) {
* @returns {Boolean}
*/
export function validLowerCase(str) {
- const reg = /^[a-z]+$/;
- return reg.test(str);
+ const reg = /^[a-z]+$/;
+ return reg.test(str);
}
/**
@@ -49,8 +49,8 @@ export function validLowerCase(str) {
* @returns {Boolean}
*/
export function validUpperCase(str) {
- const reg = /^[A-Z]+$/;
- return reg.test(str);
+ const reg = /^[A-Z]+$/;
+ return reg.test(str);
}
/**
@@ -58,8 +58,8 @@ export function validUpperCase(str) {
* @returns {Boolean}
*/
export function validAlphabets(str) {
- const reg = /^[A-Za-z]+$/;
- return reg.test(str);
+ const reg = /^[A-Za-z]+$/;
+ return reg.test(str);
}
/**
@@ -67,9 +67,9 @@ export function validAlphabets(str) {
* @returns {Boolean}
*/
export function validEmail(email) {
- const reg =
- /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
- return reg.test(email);
+ const reg =
+ /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
+ return reg.test(email);
}
/**
@@ -77,10 +77,10 @@ export function validEmail(email) {
* @returns {Boolean}
*/
export function isString(str) {
- if (typeof str === "string" || str instanceof String) {
- return true;
- }
- return false;
+ if (typeof str === "string" || str instanceof String) {
+ return true;
+ }
+ return false;
}
/**
@@ -88,8 +88,21 @@ export function isString(str) {
* @returns {Boolean}
*/
export function isArray(arg) {
- if (typeof Array.isArray === "undefined") {
- return Object.prototype.toString.call(arg) === "[object Array]";
- }
- return Array.isArray(arg);
+ if (typeof Array.isArray === "undefined") {
+ return Object.prototype.toString.call(arg) === "[object Array]";
+ }
+ return Array.isArray(arg);
}
+
+
+export const scrollToInvalidField = () => {
+ const errEl = document.querySelector(".is-error")
+ if (errEl) {
+ window.scrollTo(
+ {
+ top: errEl?.getBoundingClientRect()?.top + document.scrollingElement.scrollTop - 20,
+ behavior: "smooth",
+ }
+ )
+ }
+}
\ No newline at end of file
diff --git a/src/views/components/AgentForm/index.vue b/src/views/components/AgentForm/index.vue
index db59783..0390962 100644
--- a/src/views/components/AgentForm/index.vue
+++ b/src/views/components/AgentForm/index.vue
@@ -23,6 +23,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -84,7 +102,7 @@
-
+
@@ -170,13 +188,13 @@ const data = reactive({
name: [{required: true, message: "请输入", trigger: "blur"}],
mobile: [
{required: true, message: "请输入", trigger: "blur"},
- {
- pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
- message: "请输入正确的手机号码",
- trigger: "blur",
- },
+ // {
+ // pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
+ // message: "请输入正确的手机号码",
+ // trigger: "blur",
+ // },
],
- idCard: [{required: true, message: "请输入", trigger: "blur"}],
+ idCard: [/*{required: true, message: "请输入", trigger: "blur"}*/],
workAddress: [{required: true, message: "请输入", trigger: "blur"}],
experience: [{required: true, message: "请输入", trigger: "blur"}],
// tenantId: [
@@ -187,25 +205,25 @@ const data = reactive({
// },
// ],
"idImage.0": [
- {
+ /*{
required: true,
message: "请上传",
trigger: ["blur", "change"],
- },
+ },*/
],
"idImage.1": [
- {
+ /*{
required: true,
message: "请上传",
trigger: ["blur", "change"],
- },
+ },*/
],
"idImage.2": [
- {
+ /*{
required: true,
message: "请上传",
trigger: ["blur", "change"],
- },
+ },*/
],
},
});
diff --git a/src/views/components/Businessneeds/Approvaldetails.vue b/src/views/components/Businessneeds/Approvaldetails.vue
index e09920d..7355ee9 100644
--- a/src/views/components/Businessneeds/Approvaldetails.vue
+++ b/src/views/components/Businessneeds/Approvaldetails.vue
@@ -54,12 +54,27 @@
ref="fieldFormRef"
/>
-
+
+
+
+
+
+
+
+
+
+
+
@@ -163,7 +178,7 @@