bugfix and performance improvements
This commit is contained in:
@ -209,3 +209,27 @@ export const achievementPromotionDict = [
|
||||
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",
|
||||
},
|
||||
];
|
||||
|
@ -113,5 +113,7 @@ const form = {
|
||||
leadership: "Лидерство",
|
||||
// 成果图片
|
||||
achievementPicture: "Изображение достижений",
|
||||
// 产品领域
|
||||
productField: "Область продукта",
|
||||
};
|
||||
export default form;
|
||||
|
@ -111,6 +111,8 @@ const form = {
|
||||
leadership: "领先情况",
|
||||
// 成果图片
|
||||
achievementPicture: "成果图片",
|
||||
// 产品领域
|
||||
productField: "产品领域",
|
||||
};
|
||||
|
||||
export default form;
|
||||
|
@ -26,6 +26,13 @@ const dict = {
|
||||
keyAchievementSolution: "Ключевое решение достижений",
|
||||
dockingExpertsAcademicians: "Док-ин экспертов и академиков",
|
||||
listingGuidance: "Руководство по листингу",
|
||||
|
||||
// 成果难题解决 成果储备/项目投资 新成果开发 检验检测
|
||||
achievementProblemSolution: "Решение проблем достижений",
|
||||
achievementReserveProjectInvestment:
|
||||
"Резервирование достижений/инвестиции в проекты",
|
||||
newAchievementDevelopment: "Разработка новых достижений",
|
||||
inspectionAndTesting: "Инспекция и тестирование",
|
||||
};
|
||||
|
||||
export default dict;
|
||||
|
@ -27,6 +27,12 @@ const dict = {
|
||||
keyAchievementSolution: "重点成果解决方案",
|
||||
dockingExpertsAcademicians: "对接专家院士",
|
||||
listingGuidance: "上市指导",
|
||||
|
||||
// 成果难题解决 成果储备/项目投资 新成果开发 检验检测
|
||||
achievementProblemSolution: "成果难题解决",
|
||||
achievementReserveProjectInvestment: "成果储备/项目投资",
|
||||
newAchievementDevelopment: "新成果开发",
|
||||
inspectionAndTesting: "检验检测",
|
||||
};
|
||||
|
||||
export default dict;
|
||||
|
@ -110,6 +110,8 @@ const webSearch = {
|
||||
viewMatchingResults: "Просмотр результатов сопоставления",
|
||||
// 专利状态
|
||||
patentStatus: "Статус патента",
|
||||
// 后台暂未提供
|
||||
noDataFromBackground: "Нет данных из фона",
|
||||
};
|
||||
|
||||
export default webSearch;
|
||||
|
@ -110,5 +110,7 @@ const webSearch = {
|
||||
viewMatchingResults: "查看匹配结果",
|
||||
// 专利状态
|
||||
patentStatus: "专利状态",
|
||||
// 后台暂未提供
|
||||
noDataFromBackground: "后台暂未提供",
|
||||
};
|
||||
export default webSearch;
|
||||
|
@ -98,11 +98,11 @@
|
||||
v-model="form"
|
||||
:labelWidth="labelWidth"
|
||||
/>
|
||||
<city-options
|
||||
ref="cityFormRef"
|
||||
v-model="form"
|
||||
:labelWidth="labelWidth"
|
||||
></city-options>
|
||||
<!-- <city-options-->
|
||||
<!-- ref="cityFormRef"-->
|
||||
<!-- v-model="form"-->
|
||||
<!-- :labelWidth="labelWidth"-->
|
||||
<!-- ></city-options>-->
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
@ -236,8 +236,9 @@
|
||||
// import { expert } from "@/api/identity/index";
|
||||
// import { insertTechnologyDemand } from "@/api/admin/enterprise";
|
||||
|
||||
// import { expert } from "@/api/identity/index";
|
||||
// import { insertTechnologyDemand } from "@/api/admin/enterprise";
|
||||
import tab from "@/plugins/tab";
|
||||
import CityOptions from "@/views/components/CityOptions";
|
||||
import FieldOptions from "@/views/components/FieldOptions";
|
||||
import InputBoxAdd from "@/views/components/InputBoxAdd";
|
||||
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 { useI18n } from "vue-i18n";
|
||||
import modal from "@/plugins/modal";
|
||||
import { techinicalDemandTypeDict } from "@/constant/dict";
|
||||
|
||||
const { t } = useI18n();
|
||||
const router = useRouter();
|
||||
@ -374,28 +376,32 @@ const { proxy } = getCurrentInstance();
|
||||
const labelWidth = 160;
|
||||
// const isContainOther = ref(false);
|
||||
const checkList = reactive([
|
||||
{
|
||||
id: 1,
|
||||
name: "成果难题解决",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "成果储备/项目投资",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: "新成果开发",
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: "检验检测",
|
||||
},
|
||||
techinicalDemandTypeDict.map((el) => ({
|
||||
id: el.value,
|
||||
name: t(`dict.${el.i18n}`),
|
||||
})),
|
||||
// {
|
||||
// id: 1,
|
||||
// name: "成果难题解决",
|
||||
// },
|
||||
// {
|
||||
// id: 2,
|
||||
// name: "成果储备/项目投资",
|
||||
// },
|
||||
// {
|
||||
// id: 3,
|
||||
// name: "新成果开发",
|
||||
// },
|
||||
// {
|
||||
// id: 4,
|
||||
// name: "检验检测",
|
||||
// },
|
||||
]);
|
||||
|
||||
const formRef = ref(null);
|
||||
const fieldFormRef = ref(null);
|
||||
const directionsFormRef = ref(null);
|
||||
const cityFormRef = ref(null);
|
||||
// const cityFormRef = ref(null);
|
||||
const checkInput = ref("");
|
||||
const submitForm = async (status) => {
|
||||
let formValid;
|
||||
@ -407,8 +413,8 @@ const submitForm = async (status) => {
|
||||
form.value.status = status;
|
||||
const fieldFormValid = await fieldFormRef.value.validateForm();
|
||||
const directionsFormValid = await directionsFormRef.value.validateForm();
|
||||
const cityFormValid = await cityFormRef.value.validateForm();
|
||||
if (formValid && fieldFormValid && directionsFormValid && cityFormValid) {
|
||||
// const cityFormValid = await cityFormRef.value.validateForm();
|
||||
if (formValid && fieldFormValid && directionsFormValid) {
|
||||
if (route.query.id) {
|
||||
/*TODO*/
|
||||
/*await updateTechnologyDemand(form.value);
|
||||
|
@ -131,8 +131,7 @@ if (route.query.id) {
|
||||
{{ t("admin.common.delete") }}
|
||||
</el-button>
|
||||
<el-button type="text" @click="handleResults(row)"
|
||||
>{{ t("webSearch.viewMatchResults") }}
|
||||
}}
|
||||
>{{ t("webSearch.viewMatchingResults") }}
|
||||
</el-button>
|
||||
<el-button type="text" @click="handleUpdateStatus(row)"
|
||||
><!--更新状态-->
|
||||
|
@ -179,7 +179,6 @@ const checkList = reactive([
|
||||
const formRef = ref(null);
|
||||
const fieldFormRef = ref(null);
|
||||
const directionsFormRef = ref(null);
|
||||
const cityFormRef = ref(null);
|
||||
const checkInput = ref("");
|
||||
const submitForm = async (status) => {
|
||||
let formValid;
|
||||
@ -191,8 +190,7 @@ const submitForm = async (status) => {
|
||||
form.value.status = status;
|
||||
const fieldFormValid = await fieldFormRef.value.validateForm();
|
||||
const directionsFormValid = await directionsFormRef.value.validateForm();
|
||||
const cityFormValid = await cityFormRef.value.validateForm();
|
||||
if (formValid && fieldFormValid && directionsFormValid && cityFormValid) {
|
||||
if (formValid && fieldFormValid && directionsFormValid) {
|
||||
if (route.query.id) {
|
||||
await updateTechnologyDemand(form.value);
|
||||
ElMessage.success(t("admin.common.EditSuccess"));
|
||||
|
@ -9,7 +9,9 @@
|
||||
</div>
|
||||
<div class="line">
|
||||
{{ "webSearch.companySize" }}:
|
||||
<span>{{ data.kind_title || "后台暂没提供" }}</span>
|
||||
<span>{{
|
||||
data.kind_title || t("webSearch.noDataFromBackground")
|
||||
}}</span>
|
||||
</div>
|
||||
<div class="line">
|
||||
{{ t("webSearch.coreProducts") }}: <span>{{ data.product }}</span>
|
||||
@ -17,7 +19,7 @@
|
||||
<div class="line">
|
||||
{{ t("webSearch.companyWebsite") }}:
|
||||
<a :href="data.url"
|
||||
><span>{{ data.url || "后台暂没提供" }}</span></a
|
||||
><span>{{ data.url || t("webSearch.noDataFromBackground") }}</span></a
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -299,7 +299,7 @@ const data = reactive({
|
||||
/*"联系人手机号不能为空"*/
|
||||
message: computed(() =>
|
||||
t("admin.validation.required", {
|
||||
type: t("webContact.demandPhone"),
|
||||
type: t("admin.form.demandContact"),
|
||||
})
|
||||
),
|
||||
trigger: "blur",
|
||||
@ -402,7 +402,7 @@ const submitForm = async (status) => {
|
||||
const fieldFormValid = await fieldFormRef.value.validateForm();
|
||||
const directionsFormValid = await directionsFormRef.value.validateForm();
|
||||
// const cityFormValid = await cityFormRef.value.validateForm();
|
||||
if (formValid && fieldFormValid && directionsFormValid && cityFormValid) {
|
||||
if (formValid && fieldFormValid && directionsFormValid) {
|
||||
if (route.query.id) {
|
||||
await updateTechnologyDemand(form.value);
|
||||
ElMessage.success(t("admin.common.EditSuccess"));
|
||||
|
@ -35,7 +35,10 @@
|
||||
:label="t('admin.form.name', { type: t('admin.form.product') })"
|
||||
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-table-column
|
||||
:label="t('admin.table.publishTime')"
|
||||
@ -66,7 +69,12 @@
|
||||
type="text"
|
||||
:icon="row.shelfStatus == 2 ? 'Upload' : 'Download'"
|
||||
@click="handleShelf(row)"
|
||||
>{{ row.shelfStatus == 2 ? "上架" : "下架" }}
|
||||
>{{
|
||||
row.shelfStatus == 2
|
||||
? t("admin.table.putOn")
|
||||
: t("admin.table.putOff")
|
||||
}}
|
||||
) }}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="queryParams.status != 1"
|
||||
@ -195,7 +203,8 @@ const releaseCancel = (id) => {
|
||||
};
|
||||
// 下架和上架
|
||||
const handleShelf = (row) => {
|
||||
let text = row.shelfStatus == 2 ? "上架" : "下架";
|
||||
let text =
|
||||
row.shelfStatus == 2 ? t("admin.table.putOn") : t("admin.table.putOff");
|
||||
modal
|
||||
.confirm('确认要"' + text + '""' + row.id + '"的产品吗?')
|
||||
.then(function () {
|
||||
|
@ -29,7 +29,7 @@
|
||||
{{ t("admin.common.lab") }}
|
||||
</el-radio-button>
|
||||
<el-radio-button v-if="route.path != '/demand/results'" label="7"
|
||||
>{{ t("routes.common.technicalDemand") }}
|
||||
>{{ t("routes.company.technicalDemand") }}
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div class="app-container">
|
||||
<div class="card-panel surplus-currency" :class="flag ? 'vip-box' : ''">
|
||||
<div class="_tit">
|
||||
<span style="visibility: hidden"> 会员banner图 </span>
|
||||
<span style="visibility: hidden"> banner </span>
|
||||
<div class="fr">
|
||||
<!-- <div class="text-right">
|
||||
{{ vipData.vipType == 1 ? "VIP" : "SVIP" }}
|
||||
|
@ -264,7 +264,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<p>
|
||||
<b>图片材料上传</b>
|
||||
<b>{{ t("admin.form.pictureMaterialUpload") }}</b>
|
||||
</p>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
|
@ -58,9 +58,9 @@
|
||||
v-if="queryParams.status == 3"
|
||||
:to="{ path: './release', query: { id: row.id } }"
|
||||
>
|
||||
<el-button icon="Edit" size="small" type="text">{{
|
||||
t("admin.common.edit")
|
||||
}}</el-button>
|
||||
<el-button icon="Edit" size="small" type="text"
|
||||
>{{ t("admin.common.edit") }}
|
||||
</el-button>
|
||||
</router-link>
|
||||
|
||||
<el-button
|
||||
@ -69,7 +69,11 @@
|
||||
size="small"
|
||||
type="text"
|
||||
@click="handleShelf(row)"
|
||||
>{{ row.shelfStatus == 1 ? "下架" : "上架" }}
|
||||
>{{
|
||||
row.shelfStatus == 1
|
||||
? t("admin.table.putOn")
|
||||
: t("admin.table.putOff")
|
||||
}}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="queryParams.status != 0"
|
||||
@ -116,10 +120,8 @@ import {
|
||||
expertAchievementList,
|
||||
updateExpertAchievement,
|
||||
} from "@/api/admin/expert/achievement";
|
||||
import dayjs from "dayjs";
|
||||
import { ElMessage } from "element-plus";
|
||||
import modal from "@/plugins/modal";
|
||||
// import { update } from "lodash-unified";
|
||||
import modal from "@/plugins/modal"; // import { update } from "lodash-unified";
|
||||
import { useRouter } from "vue-router";
|
||||
import { onActivated, reactive } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
@ -178,9 +180,17 @@ const handleDelete = (id) => {
|
||||
|
||||
// 上架和下架
|
||||
function handleShelf(row) {
|
||||
let text = row.shelfStatus == 2 ? "上架" : "下架";
|
||||
let text =
|
||||
row.shelfStatus == 2 ? t("admin.table.putOn") : t("admin.table.putOff");
|
||||
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 () => {
|
||||
const shelfStatus = row.shelfStatus == 1 ? 2 : 1;
|
||||
await updateExpertAchievement({ id: row.id, shelfStatus });
|
||||
@ -191,11 +201,20 @@ function handleShelf(row) {
|
||||
|
||||
// 取消发布
|
||||
const handleCancelPublish = (id) => {
|
||||
modal.confirm(`确认要取消发布编号为"${id}"的成果吗?`).then(async () => {
|
||||
await updateExpertAchievement({ id, status: "3" });
|
||||
ElMessage.success("取消发布成功");
|
||||
getList();
|
||||
});
|
||||
modal
|
||||
// .confirm(`确认要取消发布编号为"${id}"的成果吗?`)
|
||||
.confirm(
|
||||
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";
|
||||
// handleQuery();
|
||||
};
|
||||
|
@ -46,7 +46,11 @@ const releaseFormRef = ref();
|
||||
const { id } = route.query;
|
||||
const { t } = useI18n();
|
||||
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);
|
||||
expertAchievementInfo({ id }).then((resp) => {
|
||||
form.value = resp.data;
|
||||
|
@ -58,7 +58,7 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<p>
|
||||
<b>{{ t("admin.form.data", { type: t("admin.common.lab") }) }}</b>
|
||||
<b>{{ t("admin.form.data", { type: t("admin.common.research") }) }}</b>
|
||||
</p>
|
||||
<research-form ref="researchFormRef" v-model="form" :is-add="false" />
|
||||
<div :style="{ marginLeft: labelWidth + 'px' }">
|
||||
|
@ -43,11 +43,11 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<CityOptions
|
||||
ref="cityFormRef"
|
||||
v-model="modelValue"
|
||||
:labelWidth="labelWidth"
|
||||
/>
|
||||
<!-- <CityOptions-->
|
||||
<!-- ref="cityFormRef"-->
|
||||
<!-- v-model="modelValue"-->
|
||||
<!-- :labelWidth="labelWidth"-->
|
||||
<!-- />-->
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
@ -110,14 +110,13 @@
|
||||
</template>
|
||||
<script setup>
|
||||
import { computed, reactive, ref } from "vue";
|
||||
import CityOptions from "../CityOptions";
|
||||
import FieldOptions from "../FieldOptions";
|
||||
import InputBoxAdd from "../InputBoxAdd";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
const { t } = useI18n();
|
||||
const formRef = ref();
|
||||
const cityFormRef = ref();
|
||||
// const cityFormRef = ref();
|
||||
const fieldFormRef = ref();
|
||||
const directionsFormRef = ref();
|
||||
|
||||
@ -263,12 +262,12 @@ const validateForm = async () => {
|
||||
} catch (error) {
|
||||
formValid = false;
|
||||
}
|
||||
const cityFormValid = await cityFormRef.value.validateForm();
|
||||
// const cityFormValid = await cityFormRef.value.validateForm();
|
||||
const fieldFormValid = await fieldFormRef.value.validateForm();
|
||||
const directionsFormValid = await directionsFormRef.value.validateForm();
|
||||
// const introduceValid = await introduceRef.value.validateForm();
|
||||
return (
|
||||
formValid && cityFormValid && fieldFormValid && directionsFormValid
|
||||
formValid && fieldFormValid && directionsFormValid
|
||||
// introduceValid
|
||||
);
|
||||
};
|
||||
|
Reference in New Issue
Block a user