bugfix and performance improvements

This commit is contained in:
quantulr
2023-07-31 17:27:13 +08:00
parent 0655aa1fa5
commit 1f5d58558b
20 changed files with 146 additions and 65 deletions

View File

@ -209,3 +209,27 @@ export const achievementPromotionDict = [
i18n: "listingGuidance", i18n: "listingGuidance",
}, },
]; ];
// 成果难题解决 成果储备/项目投资 新成果开发 检验检测
export const techinicalDemandTypeDict = [
{
value: 1,
label: "成果难题解决",
i18n: "achievementProblemSolution",
},
{
value: 2,
label: "成果储备/项目投资",
i18n: "achievementReserveProjectInvestment",
},
{
value: 3,
label: "新成果开发",
i18n: "newAchievementDevelopment",
},
{
value: 4,
label: "检验检测",
i18n: "inspectionAndTesting",
},
];

View File

@ -113,5 +113,7 @@ const form = {
leadership: "Лидерство", leadership: "Лидерство",
// 成果图片 // 成果图片
achievementPicture: "Изображение достижений", achievementPicture: "Изображение достижений",
// 产品领域
productField: "Область продукта",
}; };
export default form; export default form;

View File

@ -111,6 +111,8 @@ const form = {
leadership: "领先情况", leadership: "领先情况",
// 成果图片 // 成果图片
achievementPicture: "成果图片", achievementPicture: "成果图片",
// 产品领域
productField: "产品领域",
}; };
export default form; export default form;

View File

@ -26,6 +26,13 @@ const dict = {
keyAchievementSolution: "Ключевое решение достижений", keyAchievementSolution: "Ключевое решение достижений",
dockingExpertsAcademicians: "Док-ин экспертов и академиков", dockingExpertsAcademicians: "Док-ин экспертов и академиков",
listingGuidance: "Руководство по листингу", listingGuidance: "Руководство по листингу",
// 成果难题解决 成果储备/项目投资 新成果开发 检验检测
achievementProblemSolution: "Решение проблем достижений",
achievementReserveProjectInvestment:
"Резервирование достижений/инвестиции в проекты",
newAchievementDevelopment: "Разработка новых достижений",
inspectionAndTesting: "Инспекция и тестирование",
}; };
export default dict; export default dict;

View File

@ -27,6 +27,12 @@ const dict = {
keyAchievementSolution: "重点成果解决方案", keyAchievementSolution: "重点成果解决方案",
dockingExpertsAcademicians: "对接专家院士", dockingExpertsAcademicians: "对接专家院士",
listingGuidance: "上市指导", listingGuidance: "上市指导",
// 成果难题解决 成果储备/项目投资 新成果开发 检验检测
achievementProblemSolution: "成果难题解决",
achievementReserveProjectInvestment: "成果储备/项目投资",
newAchievementDevelopment: "新成果开发",
inspectionAndTesting: "检验检测",
}; };
export default dict; export default dict;

View File

@ -110,6 +110,8 @@ const webSearch = {
viewMatchingResults: "Просмотр результатов сопоставления", viewMatchingResults: "Просмотр результатов сопоставления",
// 专利状态 // 专利状态
patentStatus: "Статус патента", patentStatus: "Статус патента",
// 后台暂未提供
noDataFromBackground: "Нет данных из фона",
}; };
export default webSearch; export default webSearch;

View File

@ -110,5 +110,7 @@ const webSearch = {
viewMatchingResults: "查看匹配结果", viewMatchingResults: "查看匹配结果",
// 专利状态 // 专利状态
patentStatus: "专利状态", patentStatus: "专利状态",
// 后台暂未提供
noDataFromBackground: "后台暂未提供",
}; };
export default webSearch; export default webSearch;

View File

@ -98,11 +98,11 @@
v-model="form" v-model="form"
:labelWidth="labelWidth" :labelWidth="labelWidth"
/> />
<city-options <!-- <city-options-->
ref="cityFormRef" <!-- ref="cityFormRef"-->
v-model="form" <!-- v-model="form"-->
:labelWidth="labelWidth" <!-- :labelWidth="labelWidth"-->
></city-options> <!-- ></city-options>-->
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
@ -236,8 +236,9 @@
// import { expert } from "@/api/identity/index"; // import { expert } from "@/api/identity/index";
// import { insertTechnologyDemand } from "@/api/admin/enterprise"; // import { insertTechnologyDemand } from "@/api/admin/enterprise";
// import { expert } from "@/api/identity/index";
// import { insertTechnologyDemand } from "@/api/admin/enterprise";
import tab from "@/plugins/tab"; import tab from "@/plugins/tab";
import CityOptions from "@/views/components/CityOptions";
import FieldOptions from "@/views/components/FieldOptions"; import FieldOptions from "@/views/components/FieldOptions";
import InputBoxAdd from "@/views/components/InputBoxAdd"; import InputBoxAdd from "@/views/components/InputBoxAdd";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
@ -255,6 +256,7 @@ import { updateCount } from "@/api/admin/count";
import { insertDemand } from "@/api/admin/agent/service/technology-demand"; import { insertDemand } from "@/api/admin/agent/service/technology-demand";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
import modal from "@/plugins/modal"; import modal from "@/plugins/modal";
import { techinicalDemandTypeDict } from "@/constant/dict";
const { t } = useI18n(); const { t } = useI18n();
const router = useRouter(); const router = useRouter();
@ -374,28 +376,32 @@ const { proxy } = getCurrentInstance();
const labelWidth = 160; const labelWidth = 160;
// const isContainOther = ref(false); // const isContainOther = ref(false);
const checkList = reactive([ const checkList = reactive([
{ techinicalDemandTypeDict.map((el) => ({
id: 1, id: el.value,
name: "成果难题解决", name: t(`dict.${el.i18n}`),
}, })),
{ // {
id: 2, // id: 1,
name: "成果储备/项目投资", // name: "成果难题解决",
}, // },
{ // {
id: 3, // id: 2,
name: "新成果开发", // name: "成果储备/项目投资",
}, // },
{ // {
id: 4, // id: 3,
name: "检验检测", // name: "新成果开发",
}, // },
// {
// id: 4,
// name: "检验检测",
// },
]); ]);
const formRef = ref(null); const formRef = ref(null);
const fieldFormRef = ref(null); const fieldFormRef = ref(null);
const directionsFormRef = ref(null); const directionsFormRef = ref(null);
const cityFormRef = ref(null); // const cityFormRef = ref(null);
const checkInput = ref(""); const checkInput = ref("");
const submitForm = async (status) => { const submitForm = async (status) => {
let formValid; let formValid;
@ -407,8 +413,8 @@ const submitForm = async (status) => {
form.value.status = status; form.value.status = status;
const fieldFormValid = await fieldFormRef.value.validateForm(); const fieldFormValid = await fieldFormRef.value.validateForm();
const directionsFormValid = await directionsFormRef.value.validateForm(); const directionsFormValid = await directionsFormRef.value.validateForm();
const cityFormValid = await cityFormRef.value.validateForm(); // const cityFormValid = await cityFormRef.value.validateForm();
if (formValid && fieldFormValid && directionsFormValid && cityFormValid) { if (formValid && fieldFormValid && directionsFormValid) {
if (route.query.id) { if (route.query.id) {
/*TODO*/ /*TODO*/
/*await updateTechnologyDemand(form.value); /*await updateTechnologyDemand(form.value);

View File

@ -131,8 +131,7 @@ if (route.query.id) {
{{ t("admin.common.delete") }} {{ t("admin.common.delete") }}
</el-button> </el-button>
<el-button type="text" @click="handleResults(row)" <el-button type="text" @click="handleResults(row)"
>{{ t("webSearch.viewMatchResults") }} >{{ t("webSearch.viewMatchingResults") }}
}}
</el-button> </el-button>
<el-button type="text" @click="handleUpdateStatus(row)" <el-button type="text" @click="handleUpdateStatus(row)"
><!--更新状态--> ><!--更新状态-->

View File

@ -179,7 +179,6 @@ const checkList = reactive([
const formRef = ref(null); const formRef = ref(null);
const fieldFormRef = ref(null); const fieldFormRef = ref(null);
const directionsFormRef = ref(null); const directionsFormRef = ref(null);
const cityFormRef = ref(null);
const checkInput = ref(""); const checkInput = ref("");
const submitForm = async (status) => { const submitForm = async (status) => {
let formValid; let formValid;
@ -191,8 +190,7 @@ const submitForm = async (status) => {
form.value.status = status; form.value.status = status;
const fieldFormValid = await fieldFormRef.value.validateForm(); const fieldFormValid = await fieldFormRef.value.validateForm();
const directionsFormValid = await directionsFormRef.value.validateForm(); const directionsFormValid = await directionsFormRef.value.validateForm();
const cityFormValid = await cityFormRef.value.validateForm(); if (formValid && fieldFormValid && directionsFormValid) {
if (formValid && fieldFormValid && directionsFormValid && cityFormValid) {
if (route.query.id) { if (route.query.id) {
await updateTechnologyDemand(form.value); await updateTechnologyDemand(form.value);
ElMessage.success(t("admin.common.EditSuccess")); ElMessage.success(t("admin.common.EditSuccess"));

View File

@ -9,7 +9,9 @@
</div> </div>
<div class="line"> <div class="line">
{{ "webSearch.companySize" }} {{ "webSearch.companySize" }}
<span>{{ data.kind_title || "后台暂没提供" }}</span> <span>{{
data.kind_title || t("webSearch.noDataFromBackground")
}}</span>
</div> </div>
<div class="line"> <div class="line">
{{ t("webSearch.coreProducts") }} <span>{{ data.product }}</span> {{ t("webSearch.coreProducts") }} <span>{{ data.product }}</span>
@ -17,7 +19,7 @@
<div class="line"> <div class="line">
{{ t("webSearch.companyWebsite") }} {{ t("webSearch.companyWebsite") }}
<a :href="data.url" <a :href="data.url"
><span>{{ data.url || "后台暂没提供" }}</span></a ><span>{{ data.url || t("webSearch.noDataFromBackground") }}</span></a
> >
</div> </div>
</div> </div>

View File

@ -299,7 +299,7 @@ const data = reactive({
/*"联系人手机号不能为空"*/ /*"联系人手机号不能为空"*/
message: computed(() => message: computed(() =>
t("admin.validation.required", { t("admin.validation.required", {
type: t("webContact.demandPhone"), type: t("admin.form.demandContact"),
}) })
), ),
trigger: "blur", trigger: "blur",
@ -402,7 +402,7 @@ const submitForm = async (status) => {
const fieldFormValid = await fieldFormRef.value.validateForm(); const fieldFormValid = await fieldFormRef.value.validateForm();
const directionsFormValid = await directionsFormRef.value.validateForm(); const directionsFormValid = await directionsFormRef.value.validateForm();
// const cityFormValid = await cityFormRef.value.validateForm(); // const cityFormValid = await cityFormRef.value.validateForm();
if (formValid && fieldFormValid && directionsFormValid && cityFormValid) { if (formValid && fieldFormValid && directionsFormValid) {
if (route.query.id) { if (route.query.id) {
await updateTechnologyDemand(form.value); await updateTechnologyDemand(form.value);
ElMessage.success(t("admin.common.EditSuccess")); ElMessage.success(t("admin.common.EditSuccess"));

View File

@ -35,7 +35,10 @@
:label="t('admin.form.name', { type: t('admin.form.product') })" :label="t('admin.form.name', { type: t('admin.form.product') })"
prop="title" prop="title"
/> />
<el-table-column label="产品领域" prop="industryStr" /> <el-table-column
:label="t('admin.form.productField')"
prop="industryStr"
/>
<!-- <el-zh-column label="浏览量" prop="visit_count" /> --> <!-- <el-zh-column label="浏览量" prop="visit_count" /> -->
<el-table-column <el-table-column
:label="t('admin.table.publishTime')" :label="t('admin.table.publishTime')"
@ -66,7 +69,12 @@
type="text" type="text"
:icon="row.shelfStatus == 2 ? 'Upload' : 'Download'" :icon="row.shelfStatus == 2 ? 'Upload' : 'Download'"
@click="handleShelf(row)" @click="handleShelf(row)"
>{{ row.shelfStatus == 2 ? "上架" : "下架" }} >{{
row.shelfStatus == 2
? t("admin.table.putOn")
: t("admin.table.putOff")
}}
) }}
</el-button> </el-button>
<el-button <el-button
v-if="queryParams.status != 1" v-if="queryParams.status != 1"
@ -195,7 +203,8 @@ const releaseCancel = (id) => {
}; };
// 下架和上架 // 下架和上架
const handleShelf = (row) => { const handleShelf = (row) => {
let text = row.shelfStatus == 2 ? "上架" : "下架"; let text =
row.shelfStatus == 2 ? t("admin.table.putOn") : t("admin.table.putOff");
modal modal
.confirm('确认要"' + text + '""' + row.id + '"的产品吗?') .confirm('确认要"' + text + '""' + row.id + '"的产品吗?')
.then(function () { .then(function () {

View File

@ -29,7 +29,7 @@
{{ t("admin.common.lab") }} {{ t("admin.common.lab") }}
</el-radio-button> </el-radio-button>
<el-radio-button v-if="route.path != '/demand/results'" label="7" <el-radio-button v-if="route.path != '/demand/results'" label="7"
>{{ t("routes.common.technicalDemand") }} >{{ t("routes.company.technicalDemand") }}
</el-radio-button> </el-radio-button>
</el-radio-group> </el-radio-group>

View File

@ -2,7 +2,7 @@
<div class="app-container"> <div class="app-container">
<div class="card-panel surplus-currency" :class="flag ? 'vip-box' : ''"> <div class="card-panel surplus-currency" :class="flag ? 'vip-box' : ''">
<div class="_tit"> <div class="_tit">
<span style="visibility: hidden"> 会员banner </span> <span style="visibility: hidden"> banner </span>
<div class="fr"> <div class="fr">
<!-- <div class="text-right"> <!-- <div class="text-right">
{{ vipData.vipType == 1 ? "VIP" : "SVIP" }} {{ vipData.vipType == 1 ? "VIP" : "SVIP" }}

View File

@ -264,7 +264,7 @@
</el-col> </el-col>
</el-row> </el-row>
<p> <p>
<b>图片材料上传</b> <b>{{ t("admin.form.pictureMaterialUpload") }}</b>
</p> </p>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">

View File

@ -58,9 +58,9 @@
v-if="queryParams.status == 3" v-if="queryParams.status == 3"
:to="{ path: './release', query: { id: row.id } }" :to="{ path: './release', query: { id: row.id } }"
> >
<el-button icon="Edit" size="small" type="text">{{ <el-button icon="Edit" size="small" type="text"
t("admin.common.edit") >{{ t("admin.common.edit") }}
}}</el-button> </el-button>
</router-link> </router-link>
<el-button <el-button
@ -69,7 +69,11 @@
size="small" size="small"
type="text" type="text"
@click="handleShelf(row)" @click="handleShelf(row)"
>{{ row.shelfStatus == 1 ? "下架" : "上架" }} >{{
row.shelfStatus == 1
? t("admin.table.putOn")
: t("admin.table.putOff")
}}
</el-button> </el-button>
<el-button <el-button
v-if="queryParams.status != 0" v-if="queryParams.status != 0"
@ -116,10 +120,8 @@ import {
expertAchievementList, expertAchievementList,
updateExpertAchievement, updateExpertAchievement,
} from "@/api/admin/expert/achievement"; } from "@/api/admin/expert/achievement";
import dayjs from "dayjs";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import modal from "@/plugins/modal"; import modal from "@/plugins/modal"; // import { update } from "lodash-unified";
// import { update } from "lodash-unified";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { onActivated, reactive } from "vue"; import { onActivated, reactive } from "vue";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
@ -178,9 +180,17 @@ const handleDelete = (id) => {
// 上架和下架 // 上架和下架
function handleShelf(row) { function handleShelf(row) {
let text = row.shelfStatus == 2 ? "上架" : "下架"; let text =
row.shelfStatus == 2 ? t("admin.table.putOn") : t("admin.table.putOff");
modal modal
.confirm('确认要"' + text + '""' + row.id + '"的成果吗?') // .confirm('确认要"' + text + '""' + row.id + '"的成果吗?')
.confirm(
t("admin.common.confirmAction", {
number: row.id,
action: text,
type: t("admin.common.achievement"),
})
)
.then(async () => { .then(async () => {
const shelfStatus = row.shelfStatus == 1 ? 2 : 1; const shelfStatus = row.shelfStatus == 1 ? 2 : 1;
await updateExpertAchievement({ id: row.id, shelfStatus }); await updateExpertAchievement({ id: row.id, shelfStatus });
@ -191,11 +201,20 @@ function handleShelf(row) {
// 取消发布 // 取消发布
const handleCancelPublish = (id) => { const handleCancelPublish = (id) => {
modal.confirm(`确认要取消发布编号为"${id}"的成果吗?`).then(async () => { modal
await updateExpertAchievement({ id, status: "3" }); // .confirm(`确认要取消发布编号为"${id}"的成果吗?`)
ElMessage.success("取消发布成功"); .confirm(
getList(); t("admin.common.confirmAction", {
}); number: id,
action: t("admin.table.cancelPublish"),
type: t("admin.common.achievement"),
})
)
.then(async () => {
await updateExpertAchievement({ id, status: "3" });
ElMessage.success(t("tips.cancelReleaseSuccess"));
getList();
});
// queryParams.value.status = "3"; // queryParams.value.status = "3";
// handleQuery(); // handleQuery();
}; };

View File

@ -46,7 +46,11 @@ const releaseFormRef = ref();
const { id } = route.query; const { id } = route.query;
const { t } = useI18n(); const { t } = useI18n();
if (id) { if (id) {
const obj = Object.assign({}, route, { title: "修改成果" }); const obj = Object.assign({}, route, {
title: t("admin.form.edit", {
type: t("admin.common.achievement"),
}),
});
tab.updatePage(obj); tab.updatePage(obj);
expertAchievementInfo({ id }).then((resp) => { expertAchievementInfo({ id }).then((resp) => {
form.value = resp.data; form.value = resp.data;

View File

@ -58,7 +58,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<p> <p>
<b>{{ t("admin.form.data", { type: t("admin.common.lab") }) }}</b> <b>{{ t("admin.form.data", { type: t("admin.common.research") }) }}</b>
</p> </p>
<research-form ref="researchFormRef" v-model="form" :is-add="false" /> <research-form ref="researchFormRef" v-model="form" :is-add="false" />
<div :style="{ marginLeft: labelWidth + 'px' }"> <div :style="{ marginLeft: labelWidth + 'px' }">

View File

@ -43,11 +43,11 @@
</el-col> </el-col>
</el-row> </el-row>
<CityOptions <!-- <CityOptions-->
ref="cityFormRef" <!-- ref="cityFormRef"-->
v-model="modelValue" <!-- v-model="modelValue"-->
:labelWidth="labelWidth" <!-- :labelWidth="labelWidth"-->
/> <!-- />-->
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
@ -110,14 +110,13 @@
</template> </template>
<script setup> <script setup>
import { computed, reactive, ref } from "vue"; import { computed, reactive, ref } from "vue";
import CityOptions from "../CityOptions";
import FieldOptions from "../FieldOptions"; import FieldOptions from "../FieldOptions";
import InputBoxAdd from "../InputBoxAdd"; import InputBoxAdd from "../InputBoxAdd";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
const { t } = useI18n(); const { t } = useI18n();
const formRef = ref(); const formRef = ref();
const cityFormRef = ref(); // const cityFormRef = ref();
const fieldFormRef = ref(); const fieldFormRef = ref();
const directionsFormRef = ref(); const directionsFormRef = ref();
@ -263,12 +262,12 @@ const validateForm = async () => {
} catch (error) { } catch (error) {
formValid = false; formValid = false;
} }
const cityFormValid = await cityFormRef.value.validateForm(); // const cityFormValid = await cityFormRef.value.validateForm();
const fieldFormValid = await fieldFormRef.value.validateForm(); const fieldFormValid = await fieldFormRef.value.validateForm();
const directionsFormValid = await directionsFormRef.value.validateForm(); const directionsFormValid = await directionsFormRef.value.validateForm();
// const introduceValid = await introduceRef.value.validateForm(); // const introduceValid = await introduceRef.value.validateForm();
return ( return (
formValid && cityFormValid && fieldFormValid && directionsFormValid formValid && fieldFormValid && directionsFormValid
// introduceValid // introduceValid
); );
}; };