bug fix
This commit is contained in:
@ -48,11 +48,11 @@
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "2.3.3",
|
||||
"@vue/compiler-sfc": "3.2.36",
|
||||
"autoprefixer": "^10.4.14",
|
||||
"postcss": "^8.4.26",
|
||||
"autoprefixer": "^10.4.19",
|
||||
"postcss": "^8.4.38",
|
||||
"prettier": "^2.8.8",
|
||||
"sass": "1.52.1",
|
||||
"tailwindcss": "^3.3.3",
|
||||
"tailwindcss": "^3.4.3",
|
||||
"unplugin-auto-import": "0.8.5",
|
||||
"vite": "2.9.16",
|
||||
"vite-plugin-compression": "0.5.1",
|
||||
|
6
postcss.config.js
Normal file
6
postcss.config.js
Normal file
@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
}
|
@ -1,14 +1,18 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
export const listNews = (params) =>
|
||||
request({
|
||||
url: "/app/news/list",
|
||||
method: "GET",
|
||||
params,
|
||||
});
|
||||
|
||||
request({
|
||||
url: "/app/news/list",
|
||||
method: "GET",
|
||||
params,
|
||||
});
|
||||
export const listCategory = () =>
|
||||
request({
|
||||
url: "/app/news/category",
|
||||
method: "GET",
|
||||
});
|
||||
export const getNewsInfo = (id) =>
|
||||
request({
|
||||
url: `/app/news/${id}`,
|
||||
method: "GET",
|
||||
});
|
||||
request({
|
||||
url: `/app/news/${id}`,
|
||||
method: "GET",
|
||||
});
|
||||
|
BIN
src/assets/icons/identity/专家.png
Normal file
BIN
src/assets/icons/identity/专家.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 103 KiB |
BIN
src/assets/icons/identity/企业.jpg
Normal file
BIN
src/assets/icons/identity/企业.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 145 KiB |
BIN
src/assets/icons/identity/实验室.jpg
Normal file
BIN
src/assets/icons/identity/实验室.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 59 KiB |
BIN
src/assets/icons/identity/科研机构.jpg
Normal file
BIN
src/assets/icons/identity/科研机构.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 118 KiB |
BIN
src/assets/icons/identity/经纪人.jpg
Normal file
BIN
src/assets/icons/identity/经纪人.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
@ -5,6 +5,7 @@
|
||||
@import "./sidebar.scss";
|
||||
@import "./btn.scss";
|
||||
@import "./ruoyi.scss";
|
||||
@import "./tailwindcss";
|
||||
|
||||
body {
|
||||
height: 100%;
|
||||
@ -12,14 +13,13 @@ body {
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
text-rendering: optimizeLegibility;
|
||||
font-family:
|
||||
Helvetica Neue,
|
||||
Helvetica,
|
||||
PingFang SC,
|
||||
Hiragino Sans GB,
|
||||
Microsoft YaHei,
|
||||
Arial,
|
||||
sans-serif;
|
||||
font-family: Helvetica Neue,
|
||||
Helvetica,
|
||||
PingFang SC,
|
||||
Hiragino Sans GB,
|
||||
Microsoft YaHei,
|
||||
Arial,
|
||||
sans-serif;
|
||||
}
|
||||
|
||||
label {
|
||||
@ -114,7 +114,7 @@ aside {
|
||||
line-height: 32px;
|
||||
font-size: 16px;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
|
||||
Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
|
||||
Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
|
||||
color: #2c3e50;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
@ -156,11 +156,11 @@ aside {
|
||||
padding-right: 20px;
|
||||
transition: 600ms ease position;
|
||||
background: linear-gradient(
|
||||
90deg,
|
||||
rgba(32, 182, 249, 1) 0%,
|
||||
rgba(32, 182, 249, 1) 0%,
|
||||
rgba(33, 120, 241, 1) 100%,
|
||||
rgba(33, 120, 241, 1) 100%
|
||||
90deg,
|
||||
rgba(32, 182, 249, 1) 0%,
|
||||
rgba(32, 182, 249, 1) 0%,
|
||||
rgba(33, 120, 241, 1) 100%,
|
||||
rgba(33, 120, 241, 1) 100%
|
||||
);
|
||||
|
||||
.subtitle {
|
||||
@ -211,16 +211,19 @@ aside {
|
||||
width: 1000px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.conter1400 {
|
||||
width: 1400px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
// 1行文本省略号
|
||||
.ellipsis {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
// 2行文本省略号
|
||||
.text_hidden {
|
||||
overflow: hidden;
|
||||
@ -229,24 +232,30 @@ aside {
|
||||
-webkit-box-orient: vertical;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.x_btns {
|
||||
font-size: 16px !important;
|
||||
color: #fff !important;
|
||||
border-radius: 0 !important;
|
||||
background-color: #0054ff !important;
|
||||
}
|
||||
|
||||
.x16 {
|
||||
font-size: 16px !important;
|
||||
}
|
||||
|
||||
.x_fff {
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.x_blue {
|
||||
color: #0054ff !important;
|
||||
}
|
||||
|
||||
.x_border_blue {
|
||||
border: 1px solid #0054ff !important;
|
||||
}
|
||||
|
||||
.x_bg_blue {
|
||||
background-color: #0054ff !important;
|
||||
}
|
||||
|
23
src/assets/styles/tailwindcss.scss
Normal file
23
src/assets/styles/tailwindcss.scss
Normal file
@ -0,0 +1,23 @@
|
||||
.h-screen {
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.flex-col {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.flex-1 {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.items-center {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.justify-center {
|
||||
justify-content: center;
|
||||
}
|
@ -106,10 +106,10 @@ export const seeLogTypeDict = [
|
||||
export const orderTypeDict = [
|
||||
{
|
||||
value: "1",
|
||||
label: "创新币充值",
|
||||
label: "技术交易",
|
||||
i18n: "coinRecharge",
|
||||
elTagType: "primary",
|
||||
zh: "创新币充值",
|
||||
zh: "技术交易",
|
||||
ru: "Пополнение монеты инноваций",
|
||||
},
|
||||
{
|
||||
|
@ -118,5 +118,14 @@ const form = {
|
||||
productField: "Область продукта",
|
||||
// 成熟度证明材料
|
||||
maturityProofMaterial: "Материалы подтверждения зрелости",
|
||||
achievementIntroduction:`Презентация продукта:
|
||||
● Рыночный спрос: Описание рыночного спроса или проблемы, решаемой данной технологической разработкой.
|
||||
● Описание продукта: Краткое описание продукта, сравнение с конкурентами, область применения.
|
||||
Технические параметры:
|
||||
● Основная технология: Подробное описание основных принципов и технологий разработки.
|
||||
● Технические параметры: Предоставление ключевых технических параметров и показателей производительности.
|
||||
Сценарии применения:
|
||||
● Практическое применение: Описание случаев практического применения данной технологической разработки.
|
||||
● Потенциальные клиенты: Описание других типов целевых клиентов и их наименований.`
|
||||
};
|
||||
export default form;
|
||||
|
@ -116,6 +116,15 @@ const form = {
|
||||
productField: "产品领域",
|
||||
// 成熟度证明材料
|
||||
maturityProofMaterial: "成熟度证明材料",
|
||||
achievementIntroduction:`产品介绍:
|
||||
●市场需求:描述该科技成果解决的市场需求或问题。
|
||||
●产品描述:产品简介,竞品对比,适用范围。
|
||||
技术参数:
|
||||
●核心技术:详细介绍科技成果的核心原理和技术。
|
||||
●技术参数:提供关键的技术参数和性能指标。
|
||||
应用场景:
|
||||
●实际应用:描述该科技成果在实际中的应用案例。
|
||||
●潜在客户:描述产品其他重点客户类型及客户名称。`
|
||||
};
|
||||
|
||||
export default form;
|
||||
|
@ -9,7 +9,7 @@ const dict = {
|
||||
expert: "专家",
|
||||
researchProject: "科研项目",
|
||||
paper: "论文",
|
||||
coinRecharge: "创新币充值",
|
||||
coinRecharge: "技术交易",
|
||||
activityRegistration: "活动报名",
|
||||
notApplied: "未申请",
|
||||
applied: "已申请",
|
||||
|
@ -0,0 +1,3 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
@ -1,12 +1,14 @@
|
||||
import { createApp } from "vue";
|
||||
|
||||
// import "@/index.css";
|
||||
import Cookies from "js-cookie";
|
||||
|
||||
import ElementPlus from "element-plus";
|
||||
import locale from "element-plus/lib/locale/lang/zh-cn"; // 中文语言
|
||||
|
||||
|
||||
import "@/assets/styles/index.scss"; // global css
|
||||
|
||||
import "@/index.css";
|
||||
// import {createI18n} from "vue-i18n";
|
||||
// import {messages} from '@/i18n'
|
||||
|
||||
|
2509
src/router/index.js
2509
src/router/index.js
File diff suppressed because it is too large
Load Diff
@ -1,96 +1,99 @@
|
||||
import { login, logout, getInfo } from "@/api/login";
|
||||
import { getToken, setToken, removeToken } from "@/utils/auth";
|
||||
import {login, logout, getInfo} from "@/api/login";
|
||||
import {getToken, setToken, removeToken} from "@/utils/auth";
|
||||
// import defAva from "@/assets/images/profile.jpg";
|
||||
import defAva from "@/assets/logo/avatar.png";
|
||||
|
||||
const useUserStore = defineStore("user", {
|
||||
state: () => ({
|
||||
token: getToken(),
|
||||
name: "",
|
||||
avatar: "",
|
||||
roles: [],
|
||||
permissions: [],
|
||||
roleId: localStorage.getItem("role-id") ?? 1,
|
||||
userId: "",
|
||||
nickName: "",
|
||||
enterprise: {},
|
||||
}),
|
||||
actions: {
|
||||
// 登录
|
||||
login(userInfo) {
|
||||
const username = userInfo.username.trim();
|
||||
const password = userInfo.password;
|
||||
const code = userInfo.code;
|
||||
const uuid = userInfo.uuid;
|
||||
return new Promise((resolve, reject) => {
|
||||
login(username, password, code, uuid)
|
||||
.then((res) => {
|
||||
setToken(res["client-token"]);
|
||||
this.token = res["client-token"];
|
||||
resolve();
|
||||
})
|
||||
.catch((error) => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
},
|
||||
// 获取用户信息
|
||||
getInfo() {
|
||||
return new Promise((resolve, reject) => {
|
||||
getInfo()
|
||||
.then((res) => {
|
||||
const user = res.data.user;
|
||||
const enterprise = res.data.enterprise;
|
||||
const userId = user.userId;
|
||||
const avatar =
|
||||
/* user.avatar == "" || user.avatar == null
|
||||
? defAva
|
||||
: import.meta.env.VITE_APP_BASE_API + */ user.avatar;
|
||||
state: () => ({
|
||||
token: getToken(),
|
||||
name: "",
|
||||
avatar: "",
|
||||
roles: [],
|
||||
permissions: [],
|
||||
roleId: localStorage.getItem("role-id") ?? 1,
|
||||
userId: "",
|
||||
nickName: "",
|
||||
enterprise: {},
|
||||
vip: null
|
||||
}),
|
||||
actions: {
|
||||
// 登录
|
||||
login(userInfo) {
|
||||
const username = userInfo.username.trim();
|
||||
const password = userInfo.password;
|
||||
const code = userInfo.code;
|
||||
const uuid = userInfo.uuid;
|
||||
return new Promise((resolve, reject) => {
|
||||
login(username, password, code, uuid)
|
||||
.then((res) => {
|
||||
setToken(res["client-token"]);
|
||||
this.token = res["client-token"];
|
||||
resolve();
|
||||
})
|
||||
.catch((error) => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
},
|
||||
// 获取用户信息
|
||||
getInfo() {
|
||||
return new Promise((resolve, reject) => {
|
||||
getInfo()
|
||||
.then((res) => {
|
||||
const user = res.data.user;
|
||||
const enterprise = res.data.enterprise;
|
||||
const vip = res.data.vip;
|
||||
const userId = user.userId;
|
||||
const avatar =
|
||||
/* user.avatar == "" || user.avatar == null
|
||||
? defAva
|
||||
: import.meta.env.VITE_APP_BASE_API + */ user.avatar;
|
||||
|
||||
if (res.roles && res.roles.length > 0) {
|
||||
// 验证返回的roles是否是一个非空数组
|
||||
this.roles = res.roles;
|
||||
this.permissions = res.permissions;
|
||||
} else {
|
||||
this.roles = ["ROLE_DEFAULT"];
|
||||
}
|
||||
this.name = user.userName;
|
||||
this.avatar = avatar;
|
||||
this.userId = userId;
|
||||
this.nickName = user.nickName;
|
||||
this.enterprise = enterprise;
|
||||
resolve(res);
|
||||
})
|
||||
.catch((error) => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
},
|
||||
// 退出系统
|
||||
logOut() {
|
||||
return new Promise((resolve, reject) => {
|
||||
logout(this.token)
|
||||
.then(() => {
|
||||
this.token = "";
|
||||
this.roles = [];
|
||||
this.permissions = [];
|
||||
removeToken();
|
||||
resolve();
|
||||
})
|
||||
.catch((error) => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
},
|
||||
if (res.roles && res.roles.length > 0) {
|
||||
// 验证返回的roles是否是一个非空数组
|
||||
this.roles = res.roles;
|
||||
this.permissions = res.permissions;
|
||||
} else {
|
||||
this.roles = ["ROLE_DEFAULT"];
|
||||
}
|
||||
this.name = user.userName;
|
||||
this.avatar = avatar;
|
||||
this.userId = userId;
|
||||
this.nickName = user.nickName;
|
||||
this.enterprise = enterprise;
|
||||
this.vip = vip;
|
||||
resolve(res);
|
||||
})
|
||||
.catch((error) => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
},
|
||||
// 退出系统
|
||||
logOut() {
|
||||
return new Promise((resolve, reject) => {
|
||||
logout(this.token)
|
||||
.then(() => {
|
||||
this.token = "";
|
||||
this.roles = [];
|
||||
this.permissions = [];
|
||||
removeToken();
|
||||
resolve();
|
||||
})
|
||||
.catch((error) => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
// 切换角色
|
||||
switchRole(roleId) {
|
||||
// return new Promise((resolve, reject) => {
|
||||
this.roleId = roleId;
|
||||
localStorage.setItem("role-id", roleId);
|
||||
// });
|
||||
// 切换角色
|
||||
switchRole(roleId) {
|
||||
// return new Promise((resolve, reject) => {
|
||||
this.roleId = roleId;
|
||||
localStorage.setItem("role-id", roleId);
|
||||
// });
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export default useUserStore;
|
||||
|
@ -55,8 +55,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="contact">
|
||||
{{ t("webContact.phone") }}:<a href="tel:18156053255">18156053255</a>
|
||||
({{ t("webSearch.wechat") }})
|
||||
{{ t("webSearch.contactInformation") }}:<a href="tel:(+86)18156053255">(+86)18156053255, zkxh2024@qq.com</a>
|
||||
<!-- ({{ t("webSearch.wechat") }})-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -102,7 +102,7 @@
|
||||
{{ t("admin.common.delete") }}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="queryParams.status == 1"
|
||||
v-if="queryParams.status == 1 && vip && vip.vipType != '0'"
|
||||
size="small"
|
||||
type="text"
|
||||
icon="View"
|
||||
@ -156,6 +156,8 @@ import modal from "@/plugins/modal";
|
||||
import { useRouter } from "vue-router";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { getCurrentInstance, reactive, ref, toRefs } from "vue";
|
||||
import useUserStore from "../../../../store/modules/user";
|
||||
import {storeToRefs} from "pinia";
|
||||
|
||||
const { t } = useI18n();
|
||||
const { proxy } = getCurrentInstance();
|
||||
@ -175,6 +177,9 @@ const data = reactive({
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
const userStore = useUserStore()
|
||||
const {vip} = storeToRefs(userStore)
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
|
@ -4,62 +4,62 @@
|
||||
<el-col :span="1.5">
|
||||
<router-link to="./release">
|
||||
<el-button type="primary" size="small"
|
||||
>{{ t("routes.company.publishProduct") }}
|
||||
>{{ t("routes.company.publishProduct") }}
|
||||
</el-button>
|
||||
</router-link>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-radio-group
|
||||
v-model="queryParams.status"
|
||||
size="small"
|
||||
@change="handleQuery"
|
||||
v-model="queryParams.status"
|
||||
size="small"
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-radio-button :label="0"
|
||||
>{{ t("admin.table.pendingReview") }}
|
||||
>{{ t("admin.table.pendingReview") }}
|
||||
</el-radio-button>
|
||||
<el-radio-button :label="1"
|
||||
>{{ t("admin.table.published") }}
|
||||
>{{ t("admin.table.published") }}
|
||||
</el-radio-button>
|
||||
<el-radio-button :label="2"
|
||||
>{{ t("admin.table.rejected") }}
|
||||
>{{ t("admin.table.rejected") }}
|
||||
</el-radio-button>
|
||||
<el-radio-button :label="3"
|
||||
>{{ t("admin.table.draftBox") }}
|
||||
>{{ t("admin.table.draftBox") }}
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
|
||||
<el-table v-loading="loading" :data="dataList" style="margin-top: 20px">
|
||||
<el-table-column :label="t('admin.common.dataNumber')" prop="id" />
|
||||
<el-table-column :label="t('admin.common.dataNumber')" prop="id"/>
|
||||
<el-table-column
|
||||
:label="t('admin.form.name', { type: t('admin.form.product') })"
|
||||
prop="title"
|
||||
:label="t('admin.form.name', { type: t('admin.form.product') })"
|
||||
prop="title"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="t('admin.form.productField')"
|
||||
prop="industryStr"
|
||||
:label="t('admin.form.productField')"
|
||||
prop="industryStr"
|
||||
/>
|
||||
<!-- <el-zh-column label="浏览量" prop="visit_count" /> -->
|
||||
<el-table-column
|
||||
:label="t('admin.table.publishTime')"
|
||||
prop="createTime"
|
||||
width="180"
|
||||
:label="t('admin.table.publishTime')"
|
||||
prop="createTime"
|
||||
width="180"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<span>{{ row.createTime }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:label="t('admin.common.operation')"
|
||||
class-name="small-padding fixed-width"
|
||||
:label="t('admin.common.operation')"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<router-link
|
||||
:to="{ path: './release', query: { id: row.id } }"
|
||||
v-if="queryParams.status == 3"
|
||||
:to="{ path: './release', query: { id: row.id } }"
|
||||
v-if="queryParams.status == 3"
|
||||
>
|
||||
<el-button size="small" type="text" icon="Edit"
|
||||
>{{ t("admin.common.edit") }}
|
||||
>{{ t("admin.common.edit") }}
|
||||
</el-button>
|
||||
</router-link>
|
||||
|
||||
@ -76,28 +76,28 @@
|
||||
<!-- }}-->
|
||||
<!-- </el-button>-->
|
||||
<el-button
|
||||
v-if="queryParams.status !== 1"
|
||||
size="small"
|
||||
type="text"
|
||||
icon="Delete"
|
||||
@click="handleDelete(row.id)"
|
||||
v-if="queryParams.status !== 1"
|
||||
size="small"
|
||||
type="text"
|
||||
icon="Delete"
|
||||
@click="handleDelete(row.id)"
|
||||
>
|
||||
{{ t("admin.common.delete") }}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="queryParams.status == 1"
|
||||
size="small"
|
||||
type="text"
|
||||
icon="View"
|
||||
@click="handleResults(row)"
|
||||
>{{ t("webSearch.viewMatchingResults") }}
|
||||
v-if="queryParams.status == 1 && vip && vip.vipType != '0'"
|
||||
size="small"
|
||||
type="text"
|
||||
icon="View"
|
||||
@click="handleResults(row)"
|
||||
>{{ t("webSearch.viewMatchingResults") }}
|
||||
</el-button>
|
||||
<el-button
|
||||
size="small"
|
||||
type="text"
|
||||
icon="View"
|
||||
@click="handleDetails(row.id)"
|
||||
>{{ t("common.viewDetails") }}
|
||||
size="small"
|
||||
type="text"
|
||||
icon="View"
|
||||
@click="handleDetails(row.id)"
|
||||
>{{ t("common.viewDetails") }}
|
||||
</el-button>
|
||||
<!-- <el-button-->
|
||||
<!-- v-if="queryParams.status == 1"-->
|
||||
@ -121,11 +121,11 @@
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@ -136,19 +136,22 @@ import {
|
||||
getEnterpriseProduct,
|
||||
updateEnterpriseProduct,
|
||||
} from "@/api/admin/enterprise/product";
|
||||
import { ElMessage } from "element-plus";
|
||||
import {ElMessage} from "element-plus";
|
||||
import modal from "@/plugins/modal";
|
||||
import { onActivated, reactive, ref, toRefs } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import {onActivated, reactive, ref, toRefs} from "vue";
|
||||
import {useRouter} from "vue-router";
|
||||
import {useI18n} from "vue-i18n";
|
||||
import useUserStore from "../../../../store/modules/user";
|
||||
import {storeToRefs} from "pinia";
|
||||
|
||||
const { t } = useI18n();
|
||||
const {t} = useI18n();
|
||||
const router = useRouter();
|
||||
const dataList = ref([]);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const total = ref(0);
|
||||
|
||||
const userStore = useUserStore()
|
||||
const {vip} = storeToRefs(userStore)
|
||||
const data = reactive({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
@ -157,7 +160,7 @@ const data = reactive({
|
||||
},
|
||||
});
|
||||
|
||||
const { queryParams } = toRefs(data);
|
||||
const {queryParams} = toRefs(data);
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
@ -171,21 +174,21 @@ const getList = async () => {
|
||||
// 处理删除
|
||||
const handleDelete = (id) => {
|
||||
modal
|
||||
.confirm(
|
||||
t("admin.common.confirmAction", {
|
||||
action: t("admin.common.delete"),
|
||||
number: id,
|
||||
type: t("admin.form.product"),
|
||||
}),
|
||||
)
|
||||
.then(async () => {
|
||||
await deleteEnterpriseProduct(id);
|
||||
ElMessage.success(t("admin.common.deleteSuccess"));
|
||||
getList();
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log("Cancelled");
|
||||
});
|
||||
.confirm(
|
||||
t("admin.common.confirmAction", {
|
||||
action: t("admin.common.delete"),
|
||||
number: id,
|
||||
type: t("admin.form.product"),
|
||||
}),
|
||||
)
|
||||
.then(async () => {
|
||||
await deleteEnterpriseProduct(id);
|
||||
ElMessage.success(t("admin.common.deleteSuccess"));
|
||||
getList();
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log("Cancelled");
|
||||
});
|
||||
};
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
@ -197,48 +200,49 @@ function handleQuery() {
|
||||
// 取消发布
|
||||
const releaseCancel = (id) => {
|
||||
modal
|
||||
// .confirm('确认要取消发布id为"' + id + '"的产品吗?')
|
||||
.confirm(
|
||||
t("admin.common.confirmAction", {
|
||||
action: t("admin.table.cancelPublish"),
|
||||
number: id,
|
||||
type: t("admin.form.product"),
|
||||
}),
|
||||
)
|
||||
.then(async () => {
|
||||
await updateEnterpriseProduct({ id, status: 3 });
|
||||
ElMessage.success(t("tips.cancelReleaseSuccess"));
|
||||
getList();
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
// .confirm('确认要取消发布id为"' + id + '"的产品吗?')
|
||||
.confirm(
|
||||
t("admin.common.confirmAction", {
|
||||
action: t("admin.table.cancelPublish"),
|
||||
number: id,
|
||||
type: t("admin.form.product"),
|
||||
}),
|
||||
)
|
||||
.then(async () => {
|
||||
await updateEnterpriseProduct({id, status: 3});
|
||||
ElMessage.success(t("tips.cancelReleaseSuccess"));
|
||||
getList();
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
};
|
||||
// 下架和上架
|
||||
const handleShelf = (row) => {
|
||||
let text =
|
||||
row.shelfStatus == 2 ? t("admin.table.putOn") : t("admin.table.putOff");
|
||||
row.shelfStatus == 2 ? t("admin.table.putOn") : t("admin.table.putOff");
|
||||
modal
|
||||
// .confirm('确认要"' + text + '""' + row.id + '"的产品吗?')
|
||||
.confirm(
|
||||
t("admin.common.confirmAction", {
|
||||
action: text,
|
||||
number: row.id,
|
||||
type: t("admin.form.product"),
|
||||
}),
|
||||
)
|
||||
.then(function () {
|
||||
let status = row.shelfStatus == 1 ? 2 : 1;
|
||||
return updateEnterpriseProduct({ id: row.id, shelfStatus: status });
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
ElMessage.success(t("admin.common.success", { action: text }));
|
||||
})
|
||||
.catch(() => {});
|
||||
// .confirm('确认要"' + text + '""' + row.id + '"的产品吗?')
|
||||
.confirm(
|
||||
t("admin.common.confirmAction", {
|
||||
action: text,
|
||||
number: row.id,
|
||||
type: t("admin.form.product"),
|
||||
}),
|
||||
)
|
||||
.then(function () {
|
||||
let status = row.shelfStatus == 1 ? 2 : 1;
|
||||
return updateEnterpriseProduct({id: row.id, shelfStatus: status});
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
ElMessage.success(t("admin.common.success", {action: text}));
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
};
|
||||
const handleResults = (row) => {
|
||||
router.push({ path: "./results", query: { keyword: row.title } });
|
||||
router.push({path: "./results", query: {keyword: row.title}});
|
||||
};
|
||||
const handleDetails = (id) => {
|
||||
router.push({
|
||||
@ -249,7 +253,7 @@ const handleDetails = (id) => {
|
||||
});
|
||||
};
|
||||
const checkEnterpriseInfo = (id) => {
|
||||
router.push({ path: "./business" });
|
||||
router.push({path: "./business"});
|
||||
};
|
||||
|
||||
onActivated(() => {
|
||||
|
@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:label-width="labelWidth + 'px'"
|
||||
:model="modelValue"
|
||||
:rules="rules"
|
||||
ref="formRef"
|
||||
:label-width="labelWidth + 'px'"
|
||||
:model="modelValue"
|
||||
:rules="rules"
|
||||
>
|
||||
<!-- <el-row class="mb20">
|
||||
<el-radio-group v-model="modelValue.mode">
|
||||
@ -21,12 +21,12 @@
|
||||
</div>
|
||||
|
||||
<el-alert
|
||||
v-if="modelValue.mode == 2"
|
||||
:closable="false"
|
||||
show-icon
|
||||
style="margin-bottom: 20px"
|
||||
title="1创新币=1元"
|
||||
type="warning"
|
||||
v-if="modelValue.mode == 2"
|
||||
:closable="false"
|
||||
show-icon
|
||||
style="margin-bottom: 20px"
|
||||
title="1创新币=1元"
|
||||
type="warning"
|
||||
></el-alert>
|
||||
|
||||
<el-row v-if="modelValue.mode == 2">
|
||||
@ -40,8 +40,8 @@
|
||||
<el-col :span="12">
|
||||
<el-form-item label="免费观看时长:">
|
||||
<el-input
|
||||
v-model="modelValue.duration"
|
||||
placeholder="默认视频的1/3时长"
|
||||
v-model="modelValue.duration"
|
||||
placeholder="默认视频的1/3时长"
|
||||
>
|
||||
<template #append>min</template>
|
||||
</el-input>
|
||||
@ -53,9 +53,9 @@
|
||||
<el-col :span="24">
|
||||
<el-form-item label="视频文件:">
|
||||
<FileUpload
|
||||
v-model="modelValue.image"
|
||||
:fileType="['mp4']"
|
||||
:limit="1"
|
||||
v-model="modelValue.image"
|
||||
:fileType="['mp4']"
|
||||
:limit="1"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -64,12 +64,12 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
:label="t('admin.form.name', { type: t('admin.common.achievement') })"
|
||||
prop="title"
|
||||
:label="t('admin.form.name', { type: t('admin.common.achievement') })"
|
||||
prop="title"
|
||||
>
|
||||
<el-input
|
||||
v-model="modelValue.title"
|
||||
:placeholder="
|
||||
v-model="modelValue.title"
|
||||
:placeholder="
|
||||
t('admin.form.placeholder', {
|
||||
type: t('admin.common.achievement'),
|
||||
})
|
||||
@ -80,37 +80,37 @@
|
||||
</el-row>
|
||||
|
||||
<FieldOptions
|
||||
ref="fieldFormRef"
|
||||
v-model="modelValue"
|
||||
:labelWidth="labelWidth"
|
||||
ref="fieldFormRef"
|
||||
v-model="modelValue"
|
||||
:labelWidth="labelWidth"
|
||||
/>
|
||||
|
||||
<InputBoxAdd
|
||||
ref="customersFormRef"
|
||||
v-model="modelValue"
|
||||
:labelWidth="labelWidth"
|
||||
fieldKey="customers"
|
||||
:placeholder="
|
||||
ref="customersFormRef"
|
||||
v-model="modelValue"
|
||||
:labelWidth="labelWidth"
|
||||
fieldKey="customers"
|
||||
:placeholder="
|
||||
t('admin.form.placeholder', {
|
||||
type: t('webSearch.applicationCustomers'),
|
||||
})
|
||||
"
|
||||
:title="t('webSearch.applicationCustomers')"
|
||||
:title="t('webSearch.applicationCustomers')"
|
||||
/>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="t('admin.form.country')" prop="country">
|
||||
<el-select
|
||||
v-model="modelValue.country"
|
||||
:placeholder="
|
||||
v-model="modelValue.country"
|
||||
:placeholder="
|
||||
t('admin.form.pleaseSelect', { type: t('admin.form.country') })
|
||||
"
|
||||
>
|
||||
<el-option
|
||||
v-for="option in countryOptions"
|
||||
:label="option[locale]"
|
||||
:value="option.key"
|
||||
v-for="option in countryOptions"
|
||||
:label="option[locale]"
|
||||
:value="option.key"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -120,23 +120,23 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
:label="t('admin.form.achievementMaturity')"
|
||||
prop="maturity"
|
||||
:label="t('admin.form.achievementMaturity')"
|
||||
prop="maturity"
|
||||
>
|
||||
<el-select
|
||||
v-model="modelValue.maturity"
|
||||
clearable
|
||||
:placeholder="
|
||||
v-model="modelValue.maturity"
|
||||
clearable
|
||||
:placeholder="
|
||||
t('admin.form.pleaseSelect', {
|
||||
type: t('admin.form.achievementMaturity'),
|
||||
})
|
||||
"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in maturityOptions"
|
||||
:key="item.key"
|
||||
:label="item[locale]"
|
||||
:value="item.key"
|
||||
v-for="item in maturityOptions"
|
||||
:key="item.key"
|
||||
:label="item[locale]"
|
||||
:value="item.key"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
@ -146,23 +146,23 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
:label="t('webSearch.achievementLeadership')"
|
||||
prop="leadStandard"
|
||||
:label="t('webSearch.achievementLeadership')"
|
||||
prop="leadStandard"
|
||||
>
|
||||
<el-select
|
||||
v-model="modelValue.leadStandard"
|
||||
clearable
|
||||
:placeholder="
|
||||
v-model="modelValue.leadStandard"
|
||||
clearable
|
||||
:placeholder="
|
||||
t('admin.form.pleaseSelect', {
|
||||
type: t('webSearch.achievementLeadership'),
|
||||
})
|
||||
"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in leadOptions"
|
||||
:key="item.key"
|
||||
:label="item[locale]"
|
||||
:value="item.key"
|
||||
v-for="item in leadOptions"
|
||||
:key="item.key"
|
||||
:label="item[locale]"
|
||||
:value="item.key"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
@ -173,19 +173,19 @@
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="t('webSearch.cooperationMode')">
|
||||
<el-select
|
||||
v-model="modelValue.cooperationMode"
|
||||
clearable
|
||||
:placeholder="
|
||||
v-model="modelValue.cooperationMode"
|
||||
clearable
|
||||
:placeholder="
|
||||
t('admin.form.pleaseSelect', {
|
||||
type: t('webSearch.cooperationMode'),
|
||||
})
|
||||
"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in cooperationOptions"
|
||||
:key="item.key"
|
||||
:label="item[locale]"
|
||||
:value="item.key"
|
||||
v-for="item in cooperationOptions"
|
||||
:key="item.key"
|
||||
:label="item[locale]"
|
||||
:value="item.key"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
@ -194,26 +194,26 @@
|
||||
</el-row>
|
||||
|
||||
<InputBoxAdd
|
||||
v-if="modelValue.mode == 2"
|
||||
ref="directionsFormRef"
|
||||
v-model="modelValue"
|
||||
:labelWidth="labelWidth"
|
||||
fieldKey="kws"
|
||||
:placeholder="
|
||||
v-if="modelValue.mode == 2"
|
||||
ref="directionsFormRef"
|
||||
v-model="modelValue"
|
||||
:labelWidth="labelWidth"
|
||||
fieldKey="kws"
|
||||
:placeholder="
|
||||
t('admin.form.placeholder', {
|
||||
type: t('admin.table.applicationScenario'),
|
||||
})
|
||||
"
|
||||
:title="t('admin.table.applicationScenario')"
|
||||
:title="t('admin.table.applicationScenario')"
|
||||
/>
|
||||
|
||||
<InputBoxAdd
|
||||
ref="keywordsFormRef"
|
||||
v-model="modelValue"
|
||||
:labelWidth="labelWidth"
|
||||
:title="t('admin.form.keywords')"
|
||||
fieldKey="keywords"
|
||||
:placeholder="
|
||||
ref="keywordsFormRef"
|
||||
v-model="modelValue"
|
||||
:labelWidth="labelWidth"
|
||||
:title="t('admin.form.keywords')"
|
||||
fieldKey="keywords"
|
||||
:placeholder="
|
||||
t('admin.form.placeholder', {
|
||||
type: t('admin.form.keywords'),
|
||||
})
|
||||
@ -224,8 +224,8 @@
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="t('webSearch.unit')" prop="unit">
|
||||
<el-input
|
||||
v-model="modelValue.unit"
|
||||
:placeholder="
|
||||
v-model="modelValue.unit"
|
||||
:placeholder="
|
||||
t('admin.form.placeholder', { type: t('webSearch.unit') })
|
||||
"
|
||||
></el-input>
|
||||
@ -235,13 +235,14 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
:label="t('webSearch.achievementIntroduction')"
|
||||
prop="description"
|
||||
:label="t('webSearch.achievementIntroduction')"
|
||||
prop="description"
|
||||
>
|
||||
<el-input
|
||||
v-model="modelValue.description"
|
||||
:autosize="{ minRows: 6, maxRows: 8 }"
|
||||
type="textarea"
|
||||
v-model="modelValue.description"
|
||||
:autosize="{ minRows: 10 }"
|
||||
type="textarea"
|
||||
:placeholder="t('admin.form.achievementIntroduction')"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -261,9 +262,9 @@
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="t('admin.form.achievementPicture')" prop="image">
|
||||
<ImageUpload
|
||||
v-model="modelValue.image"
|
||||
:isShowTip="false"
|
||||
:limit="1"
|
||||
v-model="modelValue.image"
|
||||
:isShowTip="false"
|
||||
:limit="1"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -275,9 +276,9 @@
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="t('admin.form.maturityProofMaterial')">
|
||||
<FileUpload
|
||||
v-model="modelValue.file"
|
||||
:fileType="['doc', 'xls', 'ppt', 'txt', 'pdf', 'jpg']"
|
||||
:limit="1"
|
||||
v-model="modelValue.file"
|
||||
:fileType="['doc', 'xls', 'ppt', 'txt', 'pdf', 'jpg']"
|
||||
:limit="1"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -293,10 +294,10 @@ import {
|
||||
leadOptions,
|
||||
maturityOptions,
|
||||
} from "@/utils/parameter";
|
||||
import { computed, reactive, ref, toRefs } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import {computed, reactive, ref, toRefs} from "vue";
|
||||
import {useI18n} from "vue-i18n";
|
||||
|
||||
const { t, locale } = useI18n();
|
||||
const {t, locale} = useI18n();
|
||||
const props = defineProps({
|
||||
modelValue: Object,
|
||||
isAdd: {
|
||||
@ -312,18 +313,18 @@ const props = defineProps({
|
||||
default: 120,
|
||||
},
|
||||
});
|
||||
const { modelValue, isAdd, showTitle, labelWidth } = toRefs(props);
|
||||
const {modelValue, isAdd, showTitle, labelWidth} = toRefs(props);
|
||||
const data = reactive({
|
||||
rules: {
|
||||
title: [
|
||||
{
|
||||
required: true,
|
||||
message: computed(() =>
|
||||
t("admin.form.placeholder", {
|
||||
type: t("admin.form.name", {
|
||||
type: t("admin.common.achievement"),
|
||||
t("admin.form.placeholder", {
|
||||
type: t("admin.form.name", {
|
||||
type: t("admin.common.achievement"),
|
||||
}),
|
||||
}),
|
||||
}),
|
||||
),
|
||||
trigger: "blur",
|
||||
},
|
||||
@ -332,9 +333,9 @@ const data = reactive({
|
||||
{
|
||||
required: true,
|
||||
message: computed(() =>
|
||||
t("admin.form.pleaseSelect", {
|
||||
type: t("admin.form.maturity"),
|
||||
}),
|
||||
t("admin.form.pleaseSelect", {
|
||||
type: t("admin.form.maturity"),
|
||||
}),
|
||||
),
|
||||
trigger: "change",
|
||||
},
|
||||
@ -343,7 +344,7 @@ const data = reactive({
|
||||
{
|
||||
required: true,
|
||||
message: computed(() =>
|
||||
t("admin.form.placeholder", { type: t("admin.form.country") }),
|
||||
t("admin.form.placeholder", {type: t("admin.form.country")}),
|
||||
),
|
||||
trigger: "blur",
|
||||
},
|
||||
@ -353,9 +354,9 @@ const data = reactive({
|
||||
required: true,
|
||||
/*"请选择领先情况"*/
|
||||
message: computed(() =>
|
||||
t("admin.form.pleaseSelect", {
|
||||
type: t("admin.form.leadership"),
|
||||
}),
|
||||
t("admin.form.pleaseSelect", {
|
||||
type: t("admin.form.leadership"),
|
||||
}),
|
||||
),
|
||||
trigger: "change",
|
||||
},
|
||||
@ -364,11 +365,11 @@ const data = reactive({
|
||||
{
|
||||
required: true,
|
||||
message: computed(() =>
|
||||
t("admin.form.placeholder", {
|
||||
type: t("admin.form.introduction", {
|
||||
type: t("admin.common.achievement"),
|
||||
t("admin.form.placeholder", {
|
||||
type: t("admin.form.introduction", {
|
||||
type: t("admin.common.achievement"),
|
||||
}),
|
||||
}),
|
||||
}),
|
||||
),
|
||||
trigger: "blur",
|
||||
},
|
||||
@ -385,14 +386,14 @@ const data = reactive({
|
||||
{
|
||||
required: true,
|
||||
message: computed(() =>
|
||||
t("admin.form.placeholder", { type: t("webSearch.unit") }),
|
||||
t("admin.form.placeholder", {type: t("webSearch.unit")}),
|
||||
),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
const { rules } = toRefs(data);
|
||||
const {rules} = toRefs(data);
|
||||
// import { researchSelect, laboratorySelect } from "@/api/identity/index";
|
||||
const formRef = ref();
|
||||
const fieldFormRef = ref();
|
||||
@ -414,11 +415,11 @@ const validateForm = async () => {
|
||||
// const cityFormValid = await cityFormRef.value.validateForm();
|
||||
const keywordsFormValid = await keywordsFormRef.value.validateForm(); // 关键词
|
||||
return (
|
||||
formValid &&
|
||||
fieldFormValid &&
|
||||
customersValid &&
|
||||
// cityFormValid &&
|
||||
keywordsFormValid
|
||||
formValid &&
|
||||
fieldFormValid &&
|
||||
customersValid &&
|
||||
// cityFormValid &&
|
||||
keywordsFormValid
|
||||
);
|
||||
};
|
||||
defineExpose({
|
||||
|
@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:label-width="labelWidth + 'px'"
|
||||
:model="modelValue"
|
||||
:rules="rules"
|
||||
ref="formRef"
|
||||
:label-width="labelWidth + 'px'"
|
||||
:model="modelValue"
|
||||
:rules="rules"
|
||||
>
|
||||
<div v-if="showTitle" class="form_title">
|
||||
{{ t("admin.form.basicInfo") }}
|
||||
@ -48,25 +48,8 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- <el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('webSearch.unit')" prop="researchId">
|
||||
<el-select
|
||||
v-model="modelValue.researchId"
|
||||
filterable
|
||||
:placeholder="t('admin.form.pleaseSelect')"
|
||||
@change="setLaboratory"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in researchOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!--
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属实验室:">
|
||||
<el-select
|
||||
@ -88,15 +71,15 @@
|
||||
|
||||
<el-form-item :label="t('admin.form.country')" prop="country">
|
||||
<el-select
|
||||
v-model="modelValue.country"
|
||||
:placeholder="
|
||||
v-model="modelValue.country"
|
||||
:placeholder="
|
||||
t('admin.form.pleaseSelect', { type: t('admin.form.country') })
|
||||
"
|
||||
>
|
||||
<el-option
|
||||
v-for="option in countryOptions"
|
||||
:label="option[locale]"
|
||||
:value="option.key"
|
||||
v-for="option in countryOptions"
|
||||
:label="option[locale]"
|
||||
:value="option.key"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -129,18 +112,18 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
:label="t('admin.table.highestEducation')"
|
||||
prop="education"
|
||||
:label="t('admin.table.highestEducation')"
|
||||
prop="education"
|
||||
>
|
||||
<el-select
|
||||
v-model="modelValue.education"
|
||||
:placeholder="t('admin.form.pleaseSelect')"
|
||||
v-model="modelValue.education"
|
||||
:placeholder="t('admin.form.pleaseSelect')"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in educationOptions"
|
||||
:key="item.key"
|
||||
:label="item[locale]"
|
||||
:value="item.key"
|
||||
v-for="item in educationOptions"
|
||||
:key="item.key"
|
||||
:label="item[locale]"
|
||||
:value="item.key"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
@ -152,7 +135,29 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="t('webSearch.unit')" prop="workplace">
|
||||
<el-input v-model="modelValue.workplace" :placeholder="t('admin.form.placeholder', {
|
||||
name: t('webSearch.unit'),
|
||||
})"/>
|
||||
<!-- <el-select-->
|
||||
<!-- v-model="modelValue.researchId"-->
|
||||
<!-- filterable-->
|
||||
<!-- :placeholder="t('admin.form.pleaseSelect')"-->
|
||||
<!-- @change="setLaboratory"-->
|
||||
<!-- >-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in researchOptions"-->
|
||||
<!-- :key="item.id"-->
|
||||
<!-- :label="item.name"-->
|
||||
<!-- :value="item.id"-->
|
||||
<!-- >-->
|
||||
<!-- </el-option>-->
|
||||
<!-- </el-select>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('admin.form.position')" prop="job">
|
||||
@ -170,10 +175,10 @@
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('admin.form.workingTime')" prop="workTime">
|
||||
<el-date-picker
|
||||
v-model="modelValue.workTime"
|
||||
:placeholder="t('admin.form.pleaseSelect')"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
v-model="modelValue.workTime"
|
||||
:placeholder="t('admin.form.pleaseSelect')"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
@ -184,52 +189,52 @@
|
||||
{{ t("gender.male") }}
|
||||
</el-radio>
|
||||
<el-radio v-model="modelValue.gender" label="2"
|
||||
>{{ t("gender.female") }}
|
||||
>{{ t("gender.female") }}
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<FieldOptions
|
||||
ref="fieldFormRef"
|
||||
v-model="modelValue"
|
||||
:labelWidth="labelWidth"
|
||||
ref="fieldFormRef"
|
||||
v-model="modelValue"
|
||||
:labelWidth="labelWidth"
|
||||
/>
|
||||
|
||||
<InputBoxAdd
|
||||
ref="keywordsFormRef"
|
||||
v-model="modelValue"
|
||||
:labelWidth="labelWidth"
|
||||
:placeholder="t('admin.form.inputKeywords')"
|
||||
:title="t('admin.form.keywords')"
|
||||
fieldKey="keywords"
|
||||
ref="keywordsFormRef"
|
||||
v-model="modelValue"
|
||||
:labelWidth="labelWidth"
|
||||
:placeholder="t('admin.form.inputKeywords')"
|
||||
:title="t('admin.form.keywords')"
|
||||
fieldKey="keywords"
|
||||
/>
|
||||
<InputBoxAdd
|
||||
ref="researchsFormRef"
|
||||
v-model="modelValue"
|
||||
:labelWidth="labelWidth"
|
||||
:placeholder="
|
||||
ref="researchsFormRef"
|
||||
v-model="modelValue"
|
||||
:labelWidth="labelWidth"
|
||||
:placeholder="
|
||||
t('admin.form.placeholder', {
|
||||
name: t('admin.form.researchDirection'),
|
||||
})
|
||||
"
|
||||
:title="t('admin.form.researchDirection')"
|
||||
fieldKey="researchs"
|
||||
:title="t('admin.form.researchDirection')"
|
||||
fieldKey="researchs"
|
||||
/>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="t('admin.form.personalProfile')" prop="introduce">
|
||||
<el-input
|
||||
v-model="modelValue.introduce"
|
||||
:placeholder="
|
||||
v-model="modelValue.introduce"
|
||||
:placeholder="
|
||||
t(
|
||||
'admin.validation.pleaseEnterResearchDirectionCoreTechnologyAndProductRepresentativePatentsAndPapersUndertakeTheNameAndAbstractOfScientificResearchProjects',
|
||||
)
|
||||
"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 6, maxRows: 8 }"
|
||||
show-word-limit
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 6, maxRows: 8 }"
|
||||
show-word-limit
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -240,11 +245,11 @@
|
||||
<script name="ExpertForm" setup>
|
||||
import FieldOptions from "@/views/components/FieldOptions";
|
||||
import InputBoxAdd from "@/views/components/InputBoxAdd";
|
||||
import { countryOptions, educationOptions } from "@/utils/parameter";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { computed, onActivated, reactive, ref, toRefs } from "vue";
|
||||
import {countryOptions, educationOptions} from "@/utils/parameter";
|
||||
import {useI18n} from "vue-i18n";
|
||||
import {computed, onActivated, reactive, ref, toRefs} from "vue";
|
||||
|
||||
const { t, locale } = useI18n();
|
||||
const {t, locale} = useI18n();
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: Object,
|
||||
@ -261,7 +266,7 @@ const props = defineProps({
|
||||
default: 120,
|
||||
},
|
||||
});
|
||||
const { modelValue, isAdd, showTitle, labelWidth } = toRefs(props);
|
||||
const {modelValue, isAdd, showTitle, labelWidth} = toRefs(props);
|
||||
const data = reactive({
|
||||
rules: {
|
||||
product: [
|
||||
@ -373,7 +378,7 @@ const data = reactive({
|
||||
{
|
||||
required: true,
|
||||
message: computed(() =>
|
||||
t("admin.validation.required", { type: t("admin.form.workingTime") }),
|
||||
t("admin.validation.required", {type: t("admin.form.workingTime")}),
|
||||
),
|
||||
trigger: ["change", "blur"],
|
||||
},
|
||||
@ -392,10 +397,17 @@ const data = reactive({
|
||||
trigger: ["change", "blur"],
|
||||
},
|
||||
],
|
||||
workplace: [
|
||||
{
|
||||
required: true,
|
||||
message: computed(() => t("admin.form.placeholder")),
|
||||
trigger: ["blur"],
|
||||
}
|
||||
]
|
||||
},
|
||||
});
|
||||
|
||||
const { rules } = toRefs(data);
|
||||
const {rules} = toRefs(data);
|
||||
const researchOptions = ref([]);
|
||||
const options = ref([]);
|
||||
const formRef = ref();
|
||||
@ -403,7 +415,8 @@ const cityFormRef = ref();
|
||||
const fieldFormRef = ref();
|
||||
const keywordsFormRef = ref();
|
||||
const researchsFormRef = ref();
|
||||
const setLaboratory = () => {};
|
||||
const setLaboratory = () => {
|
||||
};
|
||||
const validateForm = async () => {
|
||||
let formValid;
|
||||
try {
|
||||
@ -416,11 +429,11 @@ const validateForm = async () => {
|
||||
const keywordsFormValid = await keywordsFormRef.value.validateForm(); // 关键词表单验证
|
||||
const researchsFormValid = await researchsFormRef.value.validateForm(); // 研究方向表单验证
|
||||
return (
|
||||
formValid &&
|
||||
// cityFormValid &&
|
||||
fieldFormValid &&
|
||||
keywordsFormValid &&
|
||||
researchsFormValid
|
||||
formValid &&
|
||||
// cityFormValid &&
|
||||
fieldFormValid &&
|
||||
keywordsFormValid &&
|
||||
researchsFormValid
|
||||
);
|
||||
// if (isAdd.value) {
|
||||
// // const directionsFormValid = await directionsFormRef.value.validateForm();
|
||||
|
@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="modelValue"
|
||||
:rules="rules"
|
||||
:label-width="labelWidth + 'px'"
|
||||
ref="formRef"
|
||||
:model="modelValue"
|
||||
:rules="rules"
|
||||
:label-width="labelWidth + 'px'"
|
||||
>
|
||||
<div class="form_title">
|
||||
<p>
|
||||
@ -14,12 +14,12 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
:label="t('admin.form.name', { type: t('admin.form.product') })"
|
||||
prop="title"
|
||||
:label="t('admin.form.name', { type: t('admin.form.product') })"
|
||||
prop="title"
|
||||
>
|
||||
<el-input
|
||||
v-model="modelValue.title"
|
||||
:placeholder="
|
||||
v-model="modelValue.title"
|
||||
:placeholder="
|
||||
t('admin.form.placeholder', {
|
||||
type: t('admin.form.name', { type: t('admin.form.product') }),
|
||||
})
|
||||
@ -32,8 +32,8 @@
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="t('admin.form.contact')" prop="username">
|
||||
<el-input
|
||||
v-model="modelValue.username"
|
||||
:placeholder="
|
||||
v-model="modelValue.username"
|
||||
:placeholder="
|
||||
t('admin.form.placeholder', { type: t('admin.form.contact') })
|
||||
"
|
||||
></el-input>
|
||||
@ -45,8 +45,8 @@
|
||||
<el-form-item :label="t('webSearch.contactInformation')" prop="phone">
|
||||
<!-- maxlength="11"-->
|
||||
<el-input
|
||||
v-model="modelValue.phone"
|
||||
:placeholder="
|
||||
v-model="modelValue.phone"
|
||||
:placeholder="
|
||||
t('admin.form.placeholder', {
|
||||
type: t('webSearch.contactInformation'),
|
||||
})
|
||||
@ -76,24 +76,24 @@
|
||||
</el-row>-->
|
||||
|
||||
<field-options
|
||||
v-model="modelValue"
|
||||
:labelWidth="labelWidth"
|
||||
ref="fieldFormRef"
|
||||
v-model="modelValue"
|
||||
:labelWidth="labelWidth"
|
||||
ref="fieldFormRef"
|
||||
/>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="t('admin.form.country')" prop="country">
|
||||
<el-select
|
||||
v-model="modelValue.country"
|
||||
:placeholder="
|
||||
v-model="modelValue.country"
|
||||
:placeholder="
|
||||
t('admin.form.pleaseSelect', { type: t('admin.form.country') })
|
||||
"
|
||||
>
|
||||
<el-option
|
||||
v-for="option in countryOptions"
|
||||
:label="option[locale]"
|
||||
:value="option.key"
|
||||
v-for="option in countryOptions"
|
||||
:label="option[locale]"
|
||||
:value="option.key"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -101,31 +101,31 @@
|
||||
</el-row>
|
||||
|
||||
<input-box-add
|
||||
:labelWidth="labelWidth"
|
||||
v-model="modelValue"
|
||||
:placeholder="
|
||||
:labelWidth="labelWidth"
|
||||
v-model="modelValue"
|
||||
:placeholder="
|
||||
t('admin.form.placeholder', {
|
||||
type: t('webSearch.applicationCustomers'),
|
||||
})
|
||||
"
|
||||
:title="t('webSearch.applicationCustomers')"
|
||||
fieldKey="customers"
|
||||
ref="customerFormRef"
|
||||
:title="t('webSearch.applicationCustomers')"
|
||||
fieldKey="customers"
|
||||
ref="customerFormRef"
|
||||
/>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="t('admin.form.productMaturity')" prop="maturity">
|
||||
<el-select
|
||||
v-model="modelValue.maturity"
|
||||
clearable
|
||||
:placeholder="t('admin.form.pleaseSelect')"
|
||||
v-model="modelValue.maturity"
|
||||
clearable
|
||||
:placeholder="t('admin.form.pleaseSelect')"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in maturityOptions"
|
||||
:key="item.key"
|
||||
:label="item[locale]"
|
||||
:value="item.key"
|
||||
v-for="item in maturityOptions"
|
||||
:key="item.key"
|
||||
:label="item[locale]"
|
||||
:value="item.key"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
@ -135,19 +135,19 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
:label="t('admin.form.productLeadership')"
|
||||
prop="leadStandard"
|
||||
:label="t('admin.form.productLeadership')"
|
||||
prop="leadStandard"
|
||||
>
|
||||
<el-select
|
||||
v-model="modelValue.leadStandard"
|
||||
clearable
|
||||
:placeholder="t('admin.form.pleaseSelect')"
|
||||
v-model="modelValue.leadStandard"
|
||||
clearable
|
||||
:placeholder="t('admin.form.pleaseSelect')"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in leadOptions"
|
||||
:key="item.key"
|
||||
:label="item[locale]"
|
||||
:value="item.key"
|
||||
v-for="item in leadOptions"
|
||||
:key="item.key"
|
||||
:label="item[locale]"
|
||||
:value="item.key"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
@ -158,20 +158,20 @@
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="t('webSearch.cooperationMode')">
|
||||
<el-select
|
||||
v-model="modelValue.cooperationModeArr"
|
||||
clearable
|
||||
multiple
|
||||
:placeholder="
|
||||
v-model="modelValue.cooperationModeArr"
|
||||
clearable
|
||||
multiple
|
||||
:placeholder="
|
||||
t('admin.form.placeholder', {
|
||||
type: t('webSearch.cooperationMode'),
|
||||
})
|
||||
"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in cooperationOptions"
|
||||
:key="item.key"
|
||||
:label="item[locale]"
|
||||
:value="item.key"
|
||||
v-for="item in cooperationOptions"
|
||||
:key="item.key"
|
||||
:label="item[locale]"
|
||||
:value="item.key"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
@ -180,30 +180,39 @@
|
||||
</el-row>
|
||||
|
||||
<input-box-add
|
||||
:labelWidth="labelWidth"
|
||||
v-model="modelValue"
|
||||
:title="t('admin.form.keywords')"
|
||||
:placeholder="
|
||||
:labelWidth="labelWidth"
|
||||
v-model="modelValue"
|
||||
:title="t('admin.form.keywords')"
|
||||
:placeholder="
|
||||
t('admin.form.placeholder', {
|
||||
type: t('admin.form.keywords'),
|
||||
})
|
||||
"
|
||||
fieldKey="keywords"
|
||||
ref="keywordsForm"
|
||||
fieldKey="keywords"
|
||||
ref="keywordsForm"
|
||||
/>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
:label="
|
||||
:label="
|
||||
t('admin.form.introduction', { type: t('admin.form.product') })
|
||||
"
|
||||
prop="introduce"
|
||||
prop="introduce"
|
||||
>
|
||||
<el-input
|
||||
type="textarea"
|
||||
v-model="modelValue.introduce"
|
||||
:autosize="{ minRows: 6, maxRows: 8 }"
|
||||
type="textarea"
|
||||
placeholder="产品介绍:
|
||||
 ●市场需求:描述该科技成果解决的市场需求或问题。
|
||||
 ●产品描述:产品简介,竞品对比,适用范围。
|
||||
技术参数:
|
||||
 ●核心技术:详细介绍科技成果的核心原理和技术。
|
||||
 ●技术参数:提供关键的技术参数和性能指标。
|
||||
应用场景:
|
||||
 ●实际应用:描述该科技成果在实际中的应用案例。
|
||||
 ●潜在客户:描述产品其他重点客户类型及客户名称。"
|
||||
v-model="modelValue.introduce"
|
||||
:autosize="{ minRows: 6, maxRows: 8 }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -211,7 +220,7 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('admin.form.productPicture')" prop="image">
|
||||
<ImageUpload v-model="modelValue.image" :limit="1" />
|
||||
<ImageUpload v-model="modelValue.image" :limit="1"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -222,9 +231,9 @@
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="t('admin.form.proofMaterial')" prop="material">
|
||||
<FileUpload
|
||||
v-model="modelValue.material"
|
||||
:limit="1"
|
||||
:fileType="['doc', 'xls', 'pdf', 'jpg', 'png', 'zip']"
|
||||
v-model="modelValue.material"
|
||||
:limit="1"
|
||||
:fileType="['doc', 'xls', 'pdf', 'jpg', 'png', 'zip']"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -240,11 +249,11 @@ import {
|
||||
leadOptions,
|
||||
maturityOptions,
|
||||
} from "@/utils/parameter";
|
||||
import { computed, reactive, toRefs } from "vue"; // import VideoUpload from "@/components/VideoUpload";
|
||||
import {computed, reactive, toRefs} from "vue"; // import VideoUpload from "@/components/VideoUpload";
|
||||
// import { researchSelect, laboratorySelect } from "@/api/identity/index";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import {useI18n} from "vue-i18n";
|
||||
|
||||
const { t, locale } = useI18n();
|
||||
const {t, locale} = useI18n();
|
||||
const props = defineProps({
|
||||
modelValue: Object,
|
||||
isAdd: {
|
||||
@ -260,7 +269,7 @@ const props = defineProps({
|
||||
default: 120,
|
||||
},
|
||||
});
|
||||
const { modelValue, isAdd, showTitle, labelWidth } = toRefs(props);
|
||||
const {modelValue, isAdd, showTitle, labelWidth} = toRefs(props);
|
||||
|
||||
const data = reactive({
|
||||
rules: {
|
||||
@ -283,9 +292,9 @@ const data = reactive({
|
||||
{
|
||||
required: true,
|
||||
message: computed(() =>
|
||||
t("admin.form.placeholder", {
|
||||
type: t("webSearch.contactInformation"),
|
||||
}),
|
||||
t("admin.form.placeholder", {
|
||||
type: t("webSearch.contactInformation"),
|
||||
}),
|
||||
),
|
||||
trigger: "blur",
|
||||
},
|
||||
@ -294,9 +303,9 @@ const data = reactive({
|
||||
{
|
||||
required: true,
|
||||
message: computed(() =>
|
||||
t("admin.form.placeholder", {
|
||||
type: t("webSearch.contactInformation"),
|
||||
}),
|
||||
t("admin.form.placeholder", {
|
||||
type: t("webSearch.contactInformation"),
|
||||
}),
|
||||
),
|
||||
trigger: "blur",
|
||||
},
|
||||
@ -314,18 +323,18 @@ const data = reactive({
|
||||
{
|
||||
required: true,
|
||||
message: computed(() =>
|
||||
t("admin.form.placeholder", {
|
||||
type: t("admin.form.email"),
|
||||
}),
|
||||
t("admin.form.placeholder", {
|
||||
type: t("admin.form.email"),
|
||||
}),
|
||||
),
|
||||
trigger: "blur",
|
||||
},
|
||||
{
|
||||
pattern: /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,
|
||||
message: computed(() =>
|
||||
t("admin.validation.incorrectFormatOf", {
|
||||
type: t("admin.form.email"),
|
||||
}),
|
||||
t("admin.validation.incorrectFormatOf", {
|
||||
type: t("admin.form.email"),
|
||||
}),
|
||||
),
|
||||
trigger: "blur",
|
||||
},
|
||||
@ -362,7 +371,7 @@ const data = reactive({
|
||||
{
|
||||
required: true,
|
||||
message: computed(() =>
|
||||
t("admin.validation.required", { type: t("admin.form.workingTime") }),
|
||||
t("admin.validation.required", {type: t("admin.form.workingTime")}),
|
||||
),
|
||||
trigger: ["change", "blur"],
|
||||
},
|
||||
@ -397,7 +406,7 @@ const data = reactive({
|
||||
],
|
||||
},
|
||||
});
|
||||
const { rules } = toRefs(data);
|
||||
const {rules} = toRefs(data);
|
||||
const formRef = ref(null);
|
||||
const fieldFormRef = ref(null);
|
||||
const customerFormRef = ref(null);
|
||||
|
@ -1,45 +1,44 @@
|
||||
<template>
|
||||
<div v-if="identityList.length" class="app-container">
|
||||
<div v-if="identityList.length" class="app-container h-screen flex flex-col">
|
||||
<el-row>
|
||||
<el-col :span="2">
|
||||
<el-button
|
||||
:icon="ArrowLeftBold"
|
||||
plain
|
||||
round
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="backToHome"
|
||||
>{{ t("admin.identity.entrance.back") }}
|
||||
:icon="ArrowLeftBold"
|
||||
plain
|
||||
round
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="backToHome"
|
||||
>{{ t("admin.identity.entrance.back") }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="22">
|
||||
<el-alert
|
||||
:style="{
|
||||
:style="{
|
||||
marginBottom: `10px`,
|
||||
}"
|
||||
show-icon
|
||||
:title="t('admin.identity.entrance.kindlyReminder')"
|
||||
type="warning"
|
||||
show-icon
|
||||
:title="t('admin.identity.entrance.kindlyReminder')"
|
||||
type="warning"
|
||||
></el-alert>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-card shadow="always">
|
||||
<el-card v-if="false" shadow="always">
|
||||
<el-row :gutter="20" justify="center">
|
||||
<!-- v-show="item.id <= 2"-->
|
||||
<el-col
|
||||
v-for="item in identityList"
|
||||
:key="item.id"
|
||||
:span="4"
|
||||
@click="handleStatus(item)"
|
||||
v-for="item in identityList"
|
||||
:key="item.id"
|
||||
:span="4"
|
||||
>
|
||||
<el-card style="text-align: center; height: 100%">
|
||||
<el-image
|
||||
fit="cover"
|
||||
src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg"
|
||||
style="height: 100px"
|
||||
fit="cover"
|
||||
src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg"
|
||||
style="height: 100px"
|
||||
></el-image>
|
||||
<h3>
|
||||
{{ t("admin.identity.entrance.settleIn", { type: item.title }) }}
|
||||
{{ t("admin.identity.entrance.settleIn", {type: item.title}) }}
|
||||
</h3>
|
||||
<p v-if="item.status === '0'">
|
||||
{{
|
||||
@ -53,16 +52,16 @@
|
||||
{{ t("admin.identity.entrance.rejected") }}
|
||||
</p>
|
||||
<p
|
||||
class="text-navy"
|
||||
style="cursor: pointer"
|
||||
@click.stop="reason(item)"
|
||||
class="text-navy"
|
||||
style="cursor: pointer"
|
||||
@click.stop="reason(item)"
|
||||
>
|
||||
<!-- 查看拒绝原因-->
|
||||
{{ t("admin.identity.entrance.viewReasonsForRejection") }}
|
||||
</p>
|
||||
</div>
|
||||
<div v-else-if="item.status === '4'">
|
||||
<el-link type="primary">
|
||||
<el-link type="primary" @click="handleStatus(item)">
|
||||
<!-- 申请-->
|
||||
{{ t("admin.identity.entrance.apply") }}
|
||||
</el-link>
|
||||
@ -71,47 +70,86 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt20" shadow="always">
|
||||
<el-row :gutter="20" justify="center">
|
||||
<!-- v-show="item.id <= 2"-->
|
||||
<el-col v-for="item in identityList" :key="item.id" :span="4">
|
||||
<el-card style="text-align: center; height: 100%">
|
||||
<el-image
|
||||
fit="cover"
|
||||
src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg"
|
||||
style="height: 100px"
|
||||
></el-image>
|
||||
<h3>
|
||||
{{ t("admin.identity.entrance.backstage", { type: item.title }) }}
|
||||
</h3>
|
||||
<p v-if="item.status === '1'">
|
||||
<!-- <p> -->
|
||||
<el-link type="primary" @click="handlePage(item)">
|
||||
<!-- 进入-->
|
||||
{{ t("admin.identity.entrance.enter") }}
|
||||
</el-link>
|
||||
</p>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<div class="flex-1 flex justify-center flex-col">
|
||||
<el-card shadow="always">
|
||||
<el-row :gutter="20" justify="center">
|
||||
<!-- v-show="item.id <= 2"-->
|
||||
<el-col v-for="(item,idx) in identityList" :key="item.id" :span="4">
|
||||
<el-card style="text-align: center; height: 100%">
|
||||
<el-image
|
||||
fit="cover"
|
||||
:src="iconList[idx]"
|
||||
style="height: 100px"
|
||||
></el-image>
|
||||
<h3>
|
||||
{{ t("admin.identity.entrance.backstage", {type: item.title}) }}
|
||||
</h3>
|
||||
<p v-if="item.status === '0'">
|
||||
{{
|
||||
// 审核中
|
||||
t("admin.identity.entrance.underReview")
|
||||
}}
|
||||
</p>
|
||||
<p v-else-if="item.status === '1'">
|
||||
<!-- <p> -->
|
||||
<el-link type="danger" class="!text-red-500" @click="handlePage(item,$event)">
|
||||
<!-- 进入-->
|
||||
{{ t("admin.identity.entrance.enter") }}
|
||||
</el-link>
|
||||
</p>
|
||||
<div v-else-if="item.status === '2'">
|
||||
<p class="text-danger">
|
||||
<!-- 审核拒绝-->
|
||||
{{ t("admin.identity.entrance.rejected") }}
|
||||
</p>
|
||||
<p
|
||||
class="text-navy"
|
||||
style="cursor: pointer"
|
||||
@click.stop="reason(item)"
|
||||
>
|
||||
<!-- 查看拒绝原因-->
|
||||
{{ t("admin.identity.entrance.viewReasonsForRejection") }}
|
||||
</p>
|
||||
</div>
|
||||
<div v-else-if="item.status === '4'">
|
||||
<el-link type="primary" @click="handleStatus(item)">
|
||||
<!-- 申请-->
|
||||
{{ t("admin.identity.entrance.apply") }}
|
||||
</el-link>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
// import store from "@/store";
|
||||
import { identity } from "@/api/identity";
|
||||
import { useRouter } from "vue-router";
|
||||
import {identity} from "@/api/identity";
|
||||
import {useRouter} from "vue-router";
|
||||
import usePermissionStore from "@/store/modules/permission";
|
||||
import useUserStore from "@/store/modules/user";
|
||||
import { ElMessageBox } from "element-plus";
|
||||
import { ArrowLeftBold } from "@element-plus/icons-vue";
|
||||
import { computed, onMounted, reactive, ref } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import {ElMessageBox} from "element-plus";
|
||||
import {ArrowLeftBold} from "@element-plus/icons-vue";
|
||||
import {computed, onMounted, reactive, ref} from "vue";
|
||||
import {useI18n} from "vue-i18n";
|
||||
import enterpriseIcon from '@/assets/icons/identity/企业.jpg'
|
||||
import expertIcon from '@/assets/icons/identity/专家.png'
|
||||
import labIcon from '@/assets/icons/identity/实验室.jpg'
|
||||
import researchIcon from '@/assets/icons/identity/科研机构.jpg'
|
||||
import agentIcon from '@/assets/icons/identity/经纪人.jpg'
|
||||
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
const {t} = useI18n();
|
||||
const userStore = useUserStore();
|
||||
const iconList = [
|
||||
enterpriseIcon,
|
||||
expertIcon,
|
||||
labIcon,
|
||||
researchIcon,
|
||||
agentIcon
|
||||
]
|
||||
const identityList = ref([]);
|
||||
const identityDict = reactive({
|
||||
1: computed(() => t("admin.identity.entrance.company")),
|
||||
@ -128,12 +166,12 @@ const identityDict = reactive({
|
||||
onMounted(() => {
|
||||
identity().then((res) => {
|
||||
identityList.value = res.data
|
||||
.map((item) => ({
|
||||
id: item.roleId,
|
||||
title: identityDict[item.roleId],
|
||||
status: item.status,
|
||||
}))
|
||||
.slice(0, 5);
|
||||
.map((item) => ({
|
||||
id: item.roleId,
|
||||
title: identityDict[item.roleId],
|
||||
status: item.status,
|
||||
}))
|
||||
.slice(0, 5);
|
||||
});
|
||||
});
|
||||
|
||||
@ -143,7 +181,7 @@ function reason(item) {
|
||||
|
||||
function noClicking() {
|
||||
return identityList.value.some(
|
||||
(item) => item.status === "0" || item.status === "1",
|
||||
(item) => item.status === "0" || item.status === "1",
|
||||
);
|
||||
}
|
||||
|
||||
@ -161,19 +199,19 @@ function handleStatus(item) {
|
||||
if (item.status === "4" || item.status === "2") {
|
||||
if (item.id === 1) {
|
||||
// 企业
|
||||
router.push({ path: "/identity/enterprise" });
|
||||
router.push({path: "/identity/enterprise"});
|
||||
} else if (item.id === 2) {
|
||||
// 专家
|
||||
router.push({ path: "/identity/expert" });
|
||||
router.push({path: "/identity/expert"});
|
||||
} else if (item.id === 3) {
|
||||
// 实验室
|
||||
router.push({ path: "/identity/laboratory" });
|
||||
router.push({path: "/identity/laboratory"});
|
||||
} else if (item.id === 4) {
|
||||
// 研究机构
|
||||
router.push({ path: "/identity/research" });
|
||||
router.push({path: "/identity/research"});
|
||||
} else if (item.id === 5) {
|
||||
// 科技经纪人
|
||||
router.push({ path: "/identity/agent" });
|
||||
router.push({path: "/identity/agent"});
|
||||
}
|
||||
} else if (item.status === 1) {
|
||||
alert("您已入驻,请进入后台");
|
||||
@ -181,23 +219,24 @@ function handleStatus(item) {
|
||||
}
|
||||
}
|
||||
|
||||
const handlePage = async (item) => {
|
||||
const handlePage = async (item, ev) => {
|
||||
ev.stopPropagation()
|
||||
let routeData = "";
|
||||
if (item.id === 1) {
|
||||
// 企业
|
||||
routeData = router.resolve({ path: "/admin" });
|
||||
routeData = router.resolve({path: "/admin"});
|
||||
} else if (item.id === 2) {
|
||||
// 专家
|
||||
routeData = router.resolve({ path: "/admin" });
|
||||
routeData = router.resolve({path: "/admin"});
|
||||
} else if (item.id === 3) {
|
||||
// 研究机构
|
||||
routeData = router.resolve({ path: "/admin" });
|
||||
routeData = router.resolve({path: "/admin"});
|
||||
} else if (item.id === 4) {
|
||||
// 实验室
|
||||
routeData = router.resolve({ path: "/admin" });
|
||||
routeData = router.resolve({path: "/admin"});
|
||||
} else if (item.id === 5) {
|
||||
// 科技经纪人
|
||||
routeData = router.resolve({ path: "/admin" });
|
||||
routeData = router.resolve({path: "/admin"});
|
||||
}
|
||||
// return window.open(routeData.href, "_blank");
|
||||
// TODO ...... 切换身份待处理
|
||||
@ -215,3 +254,4 @@ const handlePage = async (item) => {
|
||||
// });
|
||||
};
|
||||
</script>
|
||||
|
||||
|
@ -381,7 +381,7 @@ function config(params) {
|
||||
const publicActivity = async () => {
|
||||
// const { data } = await config({ key: "mobile" });
|
||||
const data = {
|
||||
mobile: { name: t("activity.contactInformation"), value: "18156053255" },
|
||||
mobile: { name: t("activity.contactInformation"), value: "(+86)18156053255, zkxh2024@qq.com" },
|
||||
};
|
||||
mobile.value = data.mobile.value;
|
||||
dialogVisible.value = true;
|
||||
|
@ -1,15 +1,15 @@
|
||||
<script setup>
|
||||
import { reactive, ref, toRefs } from "vue";
|
||||
import { listNews } from "@/api/website/home/news";
|
||||
import {reactive, ref, toRefs} from "vue";
|
||||
import {listCategory, listNews} from "@/api/website/home/news";
|
||||
import Pagination from "@/components/Pagination/index.vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import {useI18n} from "vue-i18n";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
const { t, locale } = useI18n();
|
||||
const {t, locale} = useI18n();
|
||||
const file_base_url = `${import.meta.env.VITE_APP_BASE_API}/file`;
|
||||
const total = ref(0);
|
||||
const categoryList = ref([])
|
||||
const newsList = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
latestNews: {},
|
||||
queryParams: {
|
||||
@ -19,7 +19,7 @@ const data = reactive({
|
||||
},
|
||||
});
|
||||
|
||||
const { queryParams, latestNews } = toRefs(data);
|
||||
const {queryParams, latestNews} = toRefs(data);
|
||||
const getList = () => {
|
||||
listNews(queryParams.value).then((resp) => {
|
||||
newsList.value = resp.rows;
|
||||
@ -27,8 +27,14 @@ const getList = () => {
|
||||
});
|
||||
};
|
||||
|
||||
const getCategoryList = () => {
|
||||
listCategory().then((resp) => {
|
||||
categoryList.value = resp.data;
|
||||
});
|
||||
}
|
||||
|
||||
const getLatestNews = () => {
|
||||
listNews({ pageNum: 1, pageSize: 1 }).then((resp) => {
|
||||
listNews({pageNum: 1, pageSize: 1}).then((resp) => {
|
||||
if (resp.total) {
|
||||
latestNews.value = resp.rows[0];
|
||||
}
|
||||
@ -41,33 +47,39 @@ const handleTabChange = (tab) => {
|
||||
getList();
|
||||
};
|
||||
getList();
|
||||
getCategoryList()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="news-container" style="height: 100%">
|
||||
<div class="left">
|
||||
<img class="cover-image" :src="`${file_base_url}${latestNews?.cover}`" />
|
||||
<img class="cover-image" :src="`${file_base_url}${latestNews?.cover}`"/>
|
||||
<p class="title">{{ latestNews?.title }}</p>
|
||||
</div>
|
||||
<div class="right">
|
||||
<el-tabs
|
||||
@tab-change="handleTabChange"
|
||||
v-model="queryParams.classification"
|
||||
@tab-change="handleTabChange"
|
||||
v-model="queryParams.classification"
|
||||
>
|
||||
<el-tab-pane name="0" :label="t('home.news')"></el-tab-pane>
|
||||
<el-tab-pane name="1" :label="t('home.policyAnalyzing')"></el-tab-pane>
|
||||
<el-tab-pane name="2" :label="t('home.announcement')"></el-tab-pane>
|
||||
<el-tab-pane v-for="item in categoryList" :name="item.id" :label="locale === 'zh'
|
||||
? item.categoryName
|
||||
: locale === 'ru'
|
||||
? item.categoryNameRu
|
||||
: ''"></el-tab-pane>
|
||||
<!-- <el-tab-pane name="0" :label="t('home.news')"></el-tab-pane>-->
|
||||
<!-- <el-tab-pane name="1" :label="t('home.policyAnalyzing')"></el-tab-pane>-->
|
||||
<!-- <el-tab-pane name="2" :label="t('home.announcement')"></el-tab-pane>-->
|
||||
</el-tabs>
|
||||
<ul class="news-list">
|
||||
<li class="news-item" v-for="news in newsList" :key="news.id">
|
||||
<a :href="`/news/detail/${news.id}`" target="_blank">
|
||||
<span class="title">{{
|
||||
locale === "zh"
|
||||
? news.title
|
||||
: locale === "ru"
|
||||
? news.titleRu
|
||||
: null
|
||||
}}</span>
|
||||
locale === "zh"
|
||||
? news.title
|
||||
: locale === "ru"
|
||||
? news.titleRu
|
||||
: null
|
||||
}}</span>
|
||||
<span class="time">
|
||||
{{ dayjs(news.createTime).format("YYYY-MM-DD") }}
|
||||
</span>
|
||||
@ -75,11 +87,11 @@ getList();
|
||||
</li>
|
||||
</ul>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
@ -20,11 +20,11 @@
|
||||
>{{ state.data[descriptionField] }}
|
||||
</el-tag>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<el-button class="x_btns">
|
||||
{{ t("innovation.buyService") }}
|
||||
</el-button>
|
||||
</div>
|
||||
<!-- <div class="text-right">-->
|
||||
<!-- <el-button class="x_btns">-->
|
||||
<!-- {{ t("innovation.buyService") }}-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="_info">
|
||||
<div class="_l">
|
||||
|
@ -49,8 +49,8 @@
|
||||
<span>{{ t("webSearch.zhongkeyunPlatform") }}</span>
|
||||
</div>
|
||||
<div class="line">
|
||||
{{ t("webSearch.contactInformation") }}({{ t("webSearch.wechat") }}):
|
||||
<span>18156053255</span>
|
||||
{{ t("webSearch.contactInformation") }}<!--({{ t("webSearch.wechat") }})-->:
|
||||
<span>(+86)18156053255, zkxh2024@qq.com</span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
|
@ -8,7 +8,7 @@
|
||||
>
|
||||
<p>如需对接,请联系我们</p>
|
||||
<p>联系人:中科云平台</p>
|
||||
<p>联系电话:18156053255(微信同号)</p>
|
||||
<p>{{ t("webSearch.contactInformation") }}:(+86)18156053255, zkxh2024@qq.com</p>
|
||||
<template #footer>
|
||||
<el-button type="primary" @click="closeDialog">
|
||||
{{ t("common.close") }}</el-button
|
||||
|
@ -32,12 +32,12 @@
|
||||
</div>
|
||||
<div class="line">
|
||||
<!-- 联系方式-->
|
||||
{{ t("webSearch.contactInformation") }}
|
||||
(
|
||||
<!-- 微信同号-->
|
||||
{{ t("webSearch.wechat") }}
|
||||
):
|
||||
<span>18156053255</span>
|
||||
{{ t("webSearch.contactInformation") }}:
|
||||
<!-- (-->
|
||||
<!-- <!– 微信同号–>-->
|
||||
<!-- {{ t("webSearch.wechat") }}-->
|
||||
<!-- )-->
|
||||
<span>(+86)18156053255, zkxh2024@qq.com</span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
|
@ -60,9 +60,9 @@
|
||||
</div>
|
||||
<div class="line">
|
||||
<!-- 联系方式-->
|
||||
{{ t("webSearch.contactInformation") }}
|
||||
({{ t("webSearch.wechat") }}):
|
||||
<span>18156053255</span>
|
||||
{{ t("webSearch.contactInformation") }}:
|
||||
<!-- ({{ t("webSearch.wechat") }})-->
|
||||
<span>(+86)18156053255, zkxh2024@qq.com</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="keywords" style="flex: 1">
|
||||
|
12
tailwind.config.js
Normal file
12
tailwind.config.js
Normal file
@ -0,0 +1,12 @@
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
content: [
|
||||
"./index.html",
|
||||
"./src/**/*.{vue,js,ts,jsx,tsx}",
|
||||
],
|
||||
theme: {
|
||||
extend: {},
|
||||
},
|
||||
plugins: [],
|
||||
}
|
||||
|
112
vite.config.js
112
vite.config.js
@ -1,61 +1,63 @@
|
||||
import { defineConfig, loadEnv } from "vite";
|
||||
import {defineConfig, loadEnv} from "vite";
|
||||
import path from "path";
|
||||
import createVitePlugins from "./vite/plugins";
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig(({ mode, command }) => {
|
||||
const env = loadEnv(mode, process.cwd());
|
||||
const { VITE_APP_ENV } = env;
|
||||
return {
|
||||
// 部署生产环境和开发环境下的URL。
|
||||
// 默认情况下,vite 会假设你的应用是被部署在一个域名的根路径上
|
||||
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
|
||||
base: VITE_APP_ENV === "production" ? "/" : "/",
|
||||
plugins: createVitePlugins(env, command === "build"),
|
||||
resolve: {
|
||||
// https://cn.vitejs.dev/config/#resolve-alias
|
||||
alias: {
|
||||
// 设置路径
|
||||
"~": path.resolve(__dirname, "./"),
|
||||
// 设置别名
|
||||
"@": path.resolve(__dirname, "./src"),
|
||||
},
|
||||
// https://cn.vitejs.dev/config/#resolve-extensions
|
||||
extensions: [".mjs", ".js", ".ts", ".jsx", ".tsx", ".json", ".vue"],
|
||||
},
|
||||
// vite 相关配置
|
||||
server: {
|
||||
port: 8007,
|
||||
host: true,
|
||||
open: false,
|
||||
proxy: {
|
||||
// https://cn.vitejs.dev/config/#server-proxy
|
||||
"/dev-api": {
|
||||
// target: "http://101.34.131.16:1618",
|
||||
// target: "http://129.211.170.150/api",
|
||||
target: "http://127.0.0.1:1619",
|
||||
// target: 'http://172.18.3.127:1618',
|
||||
changeOrigin: true,
|
||||
rewrite: (p) => p.replace(/^\/dev-api/, ""),
|
||||
},
|
||||
},
|
||||
},
|
||||
//fix:error:stdin>:7356:1: warning: "@charset" must be the first rule in the file
|
||||
css: {
|
||||
postcss: {
|
||||
plugins: [
|
||||
{
|
||||
postcssPlugin: "internal:charset-removal",
|
||||
AtRule: {
|
||||
charset: (atRule) => {
|
||||
if (atRule.name === "charset") {
|
||||
atRule.remove();
|
||||
}
|
||||
},
|
||||
export default defineConfig(({mode, command}) => {
|
||||
const env = loadEnv(mode, process.cwd());
|
||||
const {VITE_APP_ENV} = env;
|
||||
return {
|
||||
// 部署生产环境和开发环境下的URL。
|
||||
// 默认情况下,vite 会假设你的应用是被部署在一个域名的根路径上
|
||||
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
|
||||
base: VITE_APP_ENV === "production" ? "/" : "/",
|
||||
plugins: createVitePlugins(env, command === "build"),
|
||||
resolve: {
|
||||
// https://cn.vitejs.dev/config/#resolve-alias
|
||||
alias: {
|
||||
// 设置路径
|
||||
"~": path.resolve(__dirname, "./"),
|
||||
// 设置别名
|
||||
"@": path.resolve(__dirname, "./src"),
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
// https://cn.vitejs.dev/config/#resolve-extensions
|
||||
extensions: [".mjs", ".js", ".ts", ".jsx", ".tsx", ".json", ".vue"],
|
||||
},
|
||||
// vite 相关配置
|
||||
server: {
|
||||
port: 8007,
|
||||
host: true,
|
||||
open: false,
|
||||
proxy: {
|
||||
// https://cn.vitejs.dev/config/#server-proxy
|
||||
"/dev-api": {
|
||||
// target: "http://101.34.131.16:1618",
|
||||
// target: "http://129.211.170.150:82/api",
|
||||
target: "http://127.0.0.1:1619",
|
||||
// target: 'http://172.18.3.127:1618',
|
||||
changeOrigin: true,
|
||||
rewrite: (p) => p.replace(/^\/dev-api/, ""),
|
||||
},
|
||||
},
|
||||
},
|
||||
//fix:error:stdin>:7356:1: warning: "@charset" must be the first rule in the file
|
||||
css: {
|
||||
postcss: {
|
||||
plugins: [
|
||||
{
|
||||
postcssPlugin: "internal:charset-removal",
|
||||
AtRule: {
|
||||
charset: (atRule) => {
|
||||
if (atRule.name === "charset") {
|
||||
atRule.remove();
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
require("tailwindcss"),
|
||||
require("autoprefixer"),
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
|
Reference in New Issue
Block a user