专家详情页

This commit is contained in:
quantulr
2024-03-07 17:23:41 +08:00
parent 3afb373403
commit 31b92d6475
13 changed files with 964 additions and 647 deletions

View File

@ -2,50 +2,60 @@ import request from "@/utils/request";
// 个人信息录入
export const insertClientUser = (data) => {
return request({
url: "/app/insertClientUser",
method: "POST",
data,
});
return request({
url: "/app/insertClientUser",
method: "POST",
data,
});
};
// 专家活动列表
export const activitysList = (params) => {
return request({
url: "/app/expert/getActivitys",
method: "GET",
params,
});
return request({
url: "/app/expert/getActivitys",
method: "GET",
params,
});
};
export const activityInfo = (id) => {
return request({
url: "/app/expert/getActivityInfo",
method: "GET",
params: {
id
},
});
};
// 专家论文列表
export const paperList = (params) => {
return request({
url: "/app/expert/getPaperList",
method: "GET",
params,
});
return request({
url: "/app/expert/getPaperList",
method: "GET",
params,
});
};
// 专家新增论文
export const insertCasPaper = (data) => {
return request({
url: "/app/expert/insertCasPaper",
method: "POST",
data,
});
return request({
url: "/app/expert/insertCasPaper",
method: "POST",
data,
});
};
// 专家修改论文
export const updateCasPaper = (data) => {
return request({
url: "/app/expert/updateCasPaper",
method: "PUT",
data,
});
return request({
url: "/app/expert/updateCasPaper",
method: "PUT",
data,
});
};
// 专家删除论文
export const deleteCasPaper = (ids) => {
return request({
url: `/app/expert/paper/${ids}`,
method: "DELETE",
});
return request({
url: `/app/expert/paper/${ids}`,
method: "DELETE",
});
};

View File

@ -4,6 +4,7 @@ const common = {
home: "Главная",
search: "Поиск",
viewDetails: "Просмотреть детали",
details: "Подробности",
systemPrompt: "Системное сообщение",
confirm: "Подтвердить",
cancel: "Отмена",

View File

@ -3,6 +3,7 @@ export const common = {
home: "首页",
search: "搜索",
viewDetails: "查看详情",
details: "详情",
systemPrompt: "系统提示",
confirm: "确定",
cancel: "取消",

View File

@ -30,6 +30,7 @@
<el-col :span="24">
<!-- <el-checkbox label="0" @change="handleCheck">其他</el-checkbox>-->
<el-form-item
v-if="false"
:label="
t('admin.form.category', { type: t('admin.common.demand') })
"

View File

@ -1,11 +1,11 @@
<script setup>
import { reactive, ref, toRefs } from "vue";
import {reactive, ref, toRefs} from "vue";
import dayjs from "dayjs";
import { useRoute, useRouter } from "vue-router";
import { technologyDemandList } from "@/api/admin/agent/service/technology-demand";
import { useI18n } from "vue-i18n";
import {useRoute, useRouter} from "vue-router";
import {technologyDemandList} from "@/api/admin/agent/service/technology-demand";
import {useI18n} from "vue-i18n";
const { t } = useI18n();
const {t} = useI18n();
const router = useRouter();
const route = useRoute();
const dataList = ref([]);
@ -21,7 +21,7 @@ const data = reactive({
enterpriseId: null,
},
});
const { queryParams } = toRefs(data);
const {queryParams} = toRefs(data);
const getList = async () => {
loading.value = true;
@ -46,9 +46,12 @@ function handleResults(row) {
});
}
const handleRelease = () => {
const handleDetail = (id) => {
router.push({
path: "/admin/service/technology-demand-release",
query: {
id
}
});
};
@ -75,51 +78,51 @@ if (route.query.id) {
<div class="app-container">
<el-row :gutter="10" class="mb8" style="margin-top: 12px">
<right-toolbar
v-model:showSearch="showSearch"
@queryTable="getList"
v-model:showSearch="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-table :data="dataList">
<!-- 编号 -->
<el-table-column
align="center"
:label="t('admin.common.dataNumber')"
prop="id"
align="center"
:label="t('admin.common.dataNumber')"
prop="id"
/>
<el-table-column
align="center"
:label="t('admin.form.name', { type: t('admin.common.demand') })"
prop="title"
align="center"
:label="t('admin.form.name', { type: t('admin.common.demand') })"
prop="title"
/>
<el-table-column
align="center"
:label="t('admin.form.industry')"
prop="industryStr"
align="center"
:label="t('admin.form.industry')"
prop="industryStr"
/>
<el-table-column
align="center"
:label="t('admin.form.contact')"
prop="name"
align="center"
:label="t('admin.form.contact')"
prop="name"
/>
<el-table-column
align="center"
:label="t('admin.form.mobile')"
prop="mobile"
align="center"
:label="t('admin.form.mobile')"
prop="mobile"
/>
<el-table-column
align="center"
:label="t('admin.table.publishTime')"
prop="name"
align="center"
:label="t('admin.table.publishTime')"
prop="name"
>
<template #default="{ row }">
{{ dayjs(row.createTime).format("YYYY-MM-DD HH:mm:ss") }}
</template>
</el-table-column>
<el-table-column
align="center"
:label="t('admin.table.deadline')"
prop="name"
align="center"
:label="t('admin.table.deadline')"
prop="name"
>
<template #default="{ row }">
{{ dayjs(row.deadline).format("YYYY-MM-DD HH:mm:ss") }}
@ -127,25 +130,28 @@ if (route.query.id) {
</el-table-column>
<el-table-column align="center" label="">
<template #default="{ row }">
<el-button type="text">
<el-button size="small" type="text">
{{ t("admin.common.delete") }}
</el-button>
<el-button type="text" @click="handleResults(row)"
>{{ t("webSearch.viewMatchingResults") }}
<el-button size="small" type="text" @click="handleResults(row)"
>{{ t("webSearch.viewMatchingResults") }}
</el-button>
<el-button type="text" @click="handleUpdateStatus(row)"
><!--更新状态-->
<el-button size="small" type="text" @click="handleUpdateStatus(row)"
><!--更新状态-->
{{ t("routes.broker.updateStatus") }}
</el-button>
<el-button size="small" type="text" @click="handleDetail(row.id)">
{{ t("common.details") }}
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
v-model:limit="queryParams.pageSize"
v-model:page="queryParams.pageNum"
:total="total"
@pagination="getList"
v-show="total > 0"
v-model:limit="queryParams.pageSize"
v-model:page="queryParams.pageNum"
:total="total"
@pagination="getList"
/>
</div>
</template>

View File

@ -2,10 +2,10 @@
<div class="app-container">
<el-card shadow="always" style="width: 55%; margin: 0 auto">
<el-form
ref="formRef"
:model="form"
:rules="rules"
:label-width="labelWidth + 'px'"
ref="formRef"
:model="form"
:rules="rules"
:label-width="labelWidth + 'px'"
>
<p>
<b> {{ t("admin.form.basicInfo") }}</b>
@ -14,12 +14,12 @@
<el-row>
<el-col :span="24">
<el-form-item
:label="
:label="
t('admin.form.name', {
type: t('routes.company.technicalDemand'),
})
"
prop="title"
prop="title"
>
<el-input v-model="form.title"></el-input>
</el-form-item>
@ -56,8 +56,8 @@
<el-row>
<el-col :span="24">
<el-form-item
:label="t('webSearch.demandDescription')"
prop="introduce"
:label="t('webSearch.demandDescription')"
prop="introduce"
>
<!-- <wangEditor
v-model="form.introduce"
@ -67,10 +67,10 @@
@blur="formRef.validateField(`introduce`)"
></wangEditor>-->
<el-input
type="textarea"
v-model="form.introduce"
:autosize="{ minRows: 6, maxRows: 8 }"
:placeholder="
type="textarea"
v-model="form.introduce"
:autosize="{ minRows: 6, maxRows: 8 }"
:placeholder="
t(
'webSearch.pleaseEnterTheContentOfTheTechnicalRequirementsAndTheDetailedTechnicalIndicators'
)
@ -81,9 +81,9 @@
</el-row>
<field-options
v-model="form"
:labelWidth="labelWidth"
ref="fieldFormRef"
v-model="form"
:labelWidth="labelWidth"
ref="fieldFormRef"
/>
<!--<city-options
v-model="form"
@ -109,20 +109,20 @@
<el-row>
<el-col :span="12">
<el-form-item
:label="t('admin.form.achievementDemandBudget')"
:prop="form.budgetMode == 1 ? 'budget' : ''"
:label="t('admin.form.achievementDemandBudget')"
:prop="form.budgetMode == 1 ? 'budget' : ''"
>
<el-input
v-model="form.budget"
oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')"
:placeholder="
v-model="form.budget"
oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')"
:placeholder="
t('admin.form.placeholder', {
type: t('admin.form.technicalDemandBudget'),
})
"
>
<template #append
>{{ t("admin.table.tenThousandYuan") }}
>{{ t("admin.table.tenThousandYuan") }}
</template>
</el-input>
</el-form-item>
@ -130,10 +130,10 @@
<el-col :span="12">
<el-form-item label-width="50px">
<el-checkbox
false-label="1"
true-label="2"
v-model="form.budgetMode"
>{{ t("tips.faceToFace") }}
false-label="1"
true-label="2"
v-model="form.budgetMode"
>{{ t("tips.faceToFace") }}
</el-checkbox>
</el-form-item>
</el-col>
@ -143,11 +143,11 @@
<el-col :span="12">
<el-form-item :label="t('admin.table.deadline')" prop="deadline">
<el-date-picker
style="width: 100%"
v-model="form.deadline"
type="date"
value-format="YYYY-MM-DD"
:placeholder="
style="width: 100%"
v-model="form.deadline"
type="date"
value-format="YYYY-MM-DD"
:placeholder="
t('admin.form.pleaseSelect', {
type: t('admin.table.deadline'),
})
@ -162,8 +162,8 @@
<el-col :span="12">
<el-form-item :label="t('admin.form.demandContact')" prop="name">
<el-input
v-model="form.name"
:placeholder="
v-model="form.name"
:placeholder="
t('admin.form.placeholder', {
type: t('admin.form.demandContact'),
})
@ -175,8 +175,8 @@
<el-form-item :label="t('admin.form.contactPhone')" prop="mobile">
<!-- maxlength="11"-->
<el-input
v-model="form.mobile"
:placeholder="
v-model="form.mobile"
:placeholder="
t('admin.form.placeholder', {
type: t('admin.form.contactPhone'),
})
@ -208,13 +208,13 @@
<el-row>
<el-col :span="24">
<input-box-add
class="cooperation-mode"
:labelWidth="labelWidth"
v-model="form"
:title="t('webSearch.cooperationMode')"
:placeholder="t('admin.table.cooperationType')"
fieldKey="wants"
ref="directionsFormRef"
class="cooperation-mode"
:labelWidth="labelWidth"
v-model="form"
:title="t('webSearch.cooperationMode')"
:placeholder="t('admin.table.cooperationType')"
fieldKey="wants"
ref="directionsFormRef"
/>
</el-col>
</el-row>
@ -225,10 +225,10 @@
</div> -->
<div :style="{ marginLeft: labelWidth + 'px' }">
<el-button type="primary" @click="submitForm(3)"
>{{ t("admin.form.saveDraft") }}
>{{ t("admin.form.saveDraft") }}
</el-button>
<el-button type="primary" @click="submitForm(1)"
>{{ t("admin.common.submitAudit") }}
>{{ t("admin.common.submitAudit") }}
</el-button>
</div>
</el-card>
@ -236,29 +236,29 @@
</template>
<script setup>
// import { expert } from "@/api/identity/index";
import { insertTechnologyDemand } from "@/api/admin/enterprise";
import { useI18n } from "vue-i18n";
import { useRoute, useRouter } from "vue-router";
import {insertTechnologyDemand} from "@/api/admin/enterprise";
import {useI18n} from "vue-i18n";
import {useRoute, useRouter} from "vue-router";
import FieldOptions from "@/views/components/FieldOptions";
import InputBoxAdd from "@/views/components/InputBoxAdd";
import {
computed,
getCurrentInstance,
getCurrentInstance, onActivated,
onMounted,
reactive,
ref,
toRefs,
} from "vue";
import { ElMessage } from "element-plus";
import { updateCount } from "@/api/admin/count";
import {ElMessage} from "element-plus";
import {updateCount} from "@/api/admin/count";
import {
getTechnologyDemand,
updateTechnologyDemand,
} from "@/api/admin/enterprise/demand";
import tab from "@/plugins/tab";
import { countryOptions } from "@/utils/parameter";
import {countryOptions} from "@/utils/parameter";
const { t, locale } = useI18n();
const {t, locale} = useI18n();
const router = useRouter();
const route = useRoute();
const data = reactive({
@ -276,11 +276,11 @@ const data = reactive({
required: true,
/*"需求名称不能为空"*/
message: computed(() =>
t("admin.validation.required", {
type: t("admin.form.name", {
type: t("admin.common.demand"),
}),
})
t("admin.validation.required", {
type: t("admin.form.name", {
type: t("admin.common.demand"),
}),
})
),
trigger: "blur",
},
@ -290,9 +290,9 @@ const data = reactive({
required: true,
/*"需求描述不能为空"*/
message: computed(() =>
t("admin.validation.required", {
type: t("webSearch.demandDescription"),
})
t("admin.validation.required", {
type: t("webSearch.demandDescription"),
})
),
trigger: "change",
},
@ -302,9 +302,9 @@ const data = reactive({
required: true,
/*"需求联系人不能为空"*/
message: computed(() =>
t("admin.validation.required", {
type: t("admin.form.demandContact"),
})
t("admin.validation.required", {
type: t("admin.form.demandContact"),
})
),
trigger: "blur",
},
@ -314,9 +314,9 @@ const data = reactive({
required: true,
/*"联系人手机号不能为空"*/
message: computed(() =>
t("admin.validation.required", {
type: t("admin.form.demandContact"),
})
t("admin.validation.required", {
type: t("admin.form.demandContact"),
})
),
trigger: "blur",
},
@ -330,9 +330,9 @@ const data = reactive({
{
required: true,
message: computed(() =>
t("admin.validation.required", {
type: t("webContact.demandContact"),
})
t("admin.validation.required", {
type: t("webContact.demandContact"),
})
),
trigger: "blur",
},
@ -341,7 +341,7 @@ const data = reactive({
{
required: true,
message: computed(() =>
t("admin.form.pleaseSelect", { type: t("webContact.demandType") })
t("admin.form.pleaseSelect", {type: t("webContact.demandType")})
),
trigger: "change",
},
@ -350,7 +350,7 @@ const data = reactive({
{
required: true,
message: computed(() =>
t("admin.validation.required", { type: t("webContact.demandBudget") })
t("admin.validation.required", {type: t("webContact.demandBudget")})
),
trigger: "blur",
},
@ -359,7 +359,7 @@ const data = reactive({
{
required: true,
message: computed(() =>
t("admin.form.pleaseSelect", { type: t("admin.table.deadline") })
t("admin.form.pleaseSelect", {type: t("admin.table.deadline")})
),
trigger: ["change", "blur"],
},
@ -368,9 +368,9 @@ const data = reactive({
{
required: true,
message: computed(() =>
t("admin.validation.required", {
type: t("admin.form.demandSubmitterPhone"),
})
t("admin.validation.required", {
type: t("admin.form.demandSubmitterPhone"),
})
),
trigger: "blur",
},
@ -378,33 +378,11 @@ const data = reactive({
},
});
const { queryParams, form, rules } = toRefs(data);
const {queryParams, form, rules} = toRefs(data);
const { proxy } = getCurrentInstance();
const {proxy} = getCurrentInstance();
const labelWidth = 160;
// const isContainOther = ref(false);
/*const checkList = reactive([
{
id: 1,
name: "成果推广",
nameRu: "Продвижение достижений",
},
{
id: 2,
name: "关键成果解决",
nameRu: "Решение ключевых результатов",
},
{
id: 3,
name: "对接专家院士",
nameRu: "Связь с экспертами и академиками",
},
{
id: 4,
name: "上市辅导",
nameRu: "Помощь в выходе на рынок",
},
]);*/
const formRef = ref(null);
const fieldFormRef = ref(null);
@ -435,48 +413,14 @@ const submitForm = async (status) => {
} else {
console.log("validation failed");
}
// formRef.value.validate(async (valid) => {
// // console.log(valid);
// if (valid) {
// form.value.amount = form.value.amount - 0;
// }
// form.value.amount = form.value.amount - 0;
// const cityForm = proxy.$refs.cityForm.submitForm(); // 城市
// if (valid && cityForm) {
// console.log(form.value);
// if (form.value.id != undefined) {
// // updatePost(form.value).then((response) => {
// // proxy.$modal.msgSuccess(t('admin.common.editSuccess'));
// // proxy.$router.go(-1);
// // });
// } else {
// // addPost(form.value).then((response) => {
// // proxy.$modal.msgSuccess(t('admin.common.addSuccess'));
// // proxy.$router.go(-1);
// // });
// }
// }
// });
};
// function addCheck() {
// if (!checkInput.value.trim().length) return proxy.$modal.msgError("请输入");
// const flag = checkList.some((item) => {
// return item.name.trim() == checkInput.value.trim();
// });
// if (!flag) {
// checkList.push({
// id: checkList.length + 1,
// name: checkInput.value,
// });
// checkInput.value = "";
// }
// }
// 返回技术需求列表
const backToList = () => {
tab.closeOpenPage({ path: "/demand/technology" });
};
onMounted(() => {
// 返回技术需求列表
const backToList = () => {
tab.closeOpenPage({path: "/demand/technology"});
};
onActivated(() => {
formRef.value.resetFields();
if (route.query.id) {
@ -486,20 +430,8 @@ onMounted(() => {
}),
});
tab.updatePage(obj);
getTechnologyDemand({ id: route.query.id }).then((resp) => {
getTechnologyDemand({id: route.query.id}).then((resp) => {
form.value = resp.data;
/*if (!form.value.kinds) {
form.value.kinds = resp.data.kind?.split(",") ?? [];
form.value.kinds.forEach((el, index) => {
if (!checkList.find((item) => item.name == el)) {
checkList.push({
id: index,
name: el,
});
}
});
}*/
if (!form.value.wants) {
form.value.wants = resp.data.want?.split(",") ?? [];
}
@ -513,6 +445,7 @@ onMounted(() => {
}
}
});
</script>
<style lang="scss" scoped>
:deep(.cooperation-mode) {

View File

@ -4,136 +4,143 @@
<el-col :span="1.5">
<router-link to="./releaseTechnology">
<el-button type="primary" size="small"
>{{ t("admin.table.publishDemand") }}
>{{ t("admin.table.publishDemand") }}
</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-button :label="4">{{ t("dict.finished") }}</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"
align="center"
:label="t('admin.common.dataNumber')"
prop="id"
align="center"
/>
<el-table-column
:label="t('admin.form.name', { type: t('admin.common.demand') })"
prop="title"
align="center"
:label="t('admin.form.name', { type: t('admin.common.demand') })"
prop="title"
align="center"
/>
<el-table-column
:label="t('admin.form.industry')"
prop="industryStr"
align="center"
:label="t('admin.form.industry')"
prop="industryStr"
align="center"
/>
<el-table-column
:label="t('admin.form.contact')"
prop="name"
align="center"
:label="t('admin.form.contact')"
prop="name"
align="center"
/>
<el-table-column
:label="t('admin.form.mobile')"
prop="mobile"
align="center"
:label="t('admin.form.mobile')"
prop="mobile"
align="center"
/>
<!-- <el-zh-column label="浏览量" prop="visit_count" align="center" /> -->
<el-table-column
:label="t('admin.table.publishTime')"
prop="createTime"
align="center"
width="180"
:label="t('admin.table.publishTime')"
prop="createTime"
align="center"
width="180"
>
<template #default="{ row }">
<span>{{ parseTime(row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column
:label="t('admin.table.deadline')"
prop="deadline"
align="center"
width="180"
:label="t('admin.table.deadline')"
prop="deadline"
align="center"
width="180"
>
<template #default="{ row }">
<span>{{ parseTime(row.deadline) }}</span>
</template>
</el-table-column>
<el-table-column
:label="t('admin.common.operation')"
class-name="small-padding fixed-width"
align="center"
:label="t('admin.common.operation')"
class-name="small-padding fixed-width"
align="center"
>
<template #default="{ row }">
<router-link
:to="{ path: './releaseTechnology', query: { id: row.id } }"
v-if="queryParams.status == 3"
:to="{ path: './releaseTechnology', 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>
<el-button
v-if="queryParams.status != 0"
size="small"
type="text"
icon="Delete"
@click="handleDelete(row.id)"
v-if="queryParams.status != 0"
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"
size="small"
type="text"
icon="View"
@click="handleResults(row)"
>{{ t("webSearch.viewMatchingResults") }}
</el-button>
<el-button
v-if="queryParams.status == 0"
size="small"
type="text"
icon="Close"
@click="cancelPub(row.id)"
>{{ t("admin.table.cancelPublish") }}
v-if="queryParams.status == 0"
size="small"
type="text"
icon="Close"
@click="cancelPub(row.id)"
>{{ t("admin.table.cancelPublish") }}
</el-button>
<el-button
size="small"
type="text"
icon="View"
@click="complete(row.id)"
>{{ t("common.complete") }}
size="small"
type="text"
icon="View"
@click="handleDetail(row.id)"
>{{ t("common.viewDetails") }}
</el-button>
<el-button
size="small"
type="text"
icon="View"
@click="complete(row.id)"
>{{ t("common.complete") }}
</el-button>
</template>
</el-table-column>
</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>
@ -144,14 +151,14 @@ import {
technologyDemandList,
updateTechnologyDemand,
} from "@/api/admin/enterprise/demand";
import { ElMessage } from "element-plus";
import {ElMessage} from "element-plus";
import modal from "@/plugins/modal";
import { useRouter } from "vue-router";
import { useI18n } from "vue-i18n";
import { getCurrentInstance, reactive, ref, toRefs } from "vue";
import {useRouter} from "vue-router";
import {useI18n} from "vue-i18n";
import {getCurrentInstance, reactive, ref, toRefs} from "vue";
const { t } = useI18n();
const { proxy } = getCurrentInstance();
const {t} = useI18n();
const {proxy} = getCurrentInstance();
const router = useRouter();
const dataList = ref([]); // 企业技术需求列表
@ -166,7 +173,7 @@ const data = reactive({
},
});
const { queryParams, form, rules } = toRefs(data);
const {queryParams, form, rules} = toRefs(data);
/** 查询列表 */
const getList = async () => {
@ -186,47 +193,52 @@ function handleQuery() {
/** 删除按钮操作 */
function handleDelete(id) {
modal
.confirm(
t("admin.common.confirmAction", {
action: t("admin.common.delete"),
number: id,
type: t("admin.common.demand"),
.confirm(
t("admin.common.confirmAction", {
action: t("admin.common.delete"),
number: id,
type: t("admin.common.demand"),
})
)
.then(() => {
console.log("delete");
return deleteTechnologyDemand(id);
})
)
.then(() => {
console.log("delete");
return deleteTechnologyDemand(id);
})
.then(() => {
getList();
ElMessage.success(t("admin.common.deleteSuccess"));
})
.catch((err) => {
console.log(err);
});
.then(() => {
getList();
ElMessage.success(t("admin.common.deleteSuccess"));
})
.catch((err) => {
console.log(err);
});
}
const handleDetail = (id) => {
router.push(`/demand/releaseTechnology?id=${id}`)
}
function handleShelf(row) {
let text =
row.shelf_status == 2 ? t("admin.table.putOn") : t("admin.table.putOff");
row.shelf_status == 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.common.demand"),
// .confirm('确认要"' + text + '""' + row.id + '"的需求吗?')
.confirm(
t("admin.common.confirmAction", {
action: text,
number: row.id,
type: t("admin.common.demand"),
})
)
.then(function () {
let status = row.shelf_status == 1 ? 2 : 1;
return achievementShelf({id: row.id, status});
})
)
.then(function () {
let status = row.shelf_status == 1 ? 2 : 1;
return achievementShelf({ id: row.id, status });
})
.then(() => {
getList();
ElMessage.success(t("admin.common.success", { action: text }));
})
.catch(() => {});
.then(() => {
getList();
ElMessage.success(t("admin.common.success", {action: text}));
})
.catch(() => {
});
}
function handleResults(row) {
@ -241,42 +253,44 @@ function handleResults(row) {
// 修改为完成状态
const complete = (id) => {
modal
.confirm(
t("admin.common.confirmAction", {
action: t("common.finish"),
type: t("admin.common.item"),
number: id,
.confirm(
t("admin.common.confirmAction", {
action: t("common.finish"),
type: t("admin.common.item"),
number: id,
})
)
.then(async () => {
await updateTechnologyDemand({id, status: 4});
getList();
ElMessage.success(
t("admin.common.success", {
action: t("common.finish"),
})
);
})
)
.then(async () => {
await updateTechnologyDemand({ id, status: 4 });
getList();
ElMessage.success(
t("admin.common.success", {
action: t("common.finish"),
})
);
})
.catch(() => {});
.catch(() => {
});
};
const cancelPub = (id) => {
modal
// .confirm(`是否确认取消发布编号为${id}的数据项?`)
.confirm(
t("admin.common.confirmAction", {
action: t("admin.table.cancelPublish"),
number: id,
type: t("admin.common.item"),
// .confirm(`是否确认取消发布编号为${id}的数据项?`)
.confirm(
t("admin.common.confirmAction", {
action: t("admin.table.cancelPublish"),
number: id,
type: t("admin.common.item"),
})
)
.then(async () => {
await updateTechnologyDemand({id, status: 3});
getList();
ElMessage.success(
t("admin.common.success", {action: t("admin.table.cancelPublish")})
);
})
)
.then(async () => {
await updateTechnologyDemand({ id, status: 3 });
getList();
ElMessage.success(
t("admin.common.success", { action: t("admin.table.cancelPublish") })
);
})
.catch(() => {});
.catch(() => {
});
};
getList();
</script>

View File

@ -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,21 +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"
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") }}
</el-button>
<!-- <el-button-->
<!-- v-if="queryParams.status == 1"-->
@ -101,24 +108,24 @@
<!-- @click="checkEnterpriseInfo(row.id)"-->
<!-- >{{ t("tips.browseEnterpriseInformation") }}-->
<!-- </el-button>-->
<!-- TODO: <el-button
v-if="queryParams.status == 0"
size="small"
type="text"
icon="Close"
@click="releaseCancel(row.id)"
>{{ t("tips.moveToDraftBox") }}
</el-button>-->
<!-- TODO: <el-button
v-if="queryParams.status == 0"
size="small"
type="text"
icon="Close"
@click="releaseCancel(row.id)"
>{{ t("tips.moveToDraftBox") }}
</el-button>-->
</template>
</el-table-column>
</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>
@ -129,13 +136,13 @@ 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";
const { t } = useI18n();
const {t} = useI18n();
const router = useRouter();
const dataList = ref([]);
const loading = ref(true);
@ -150,7 +157,7 @@ const data = reactive({
},
});
const { queryParams } = toRefs(data);
const {queryParams} = toRefs(data);
/** 查询列表 */
const getList = async () => {
@ -164,21 +171,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"),
.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();
})
)
.then(async () => {
await deleteEnterpriseProduct(id);
ElMessage.success(t("admin.common.deleteSuccess"));
getList();
})
.catch((error) => {
console.log("Cancelled");
});
.catch((error) => {
console.log("Cancelled");
});
};
/** 搜索按钮操作 */
@ -190,52 +197,60 @@ 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"),
// .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();
})
)
.then(async () => {
await updateEnterpriseProduct({ id, status: 3 });
ElMessage.success(t("tips.cancelReleaseSuccess"));
getList();
})
.catch((err) => {
console.log(err);
});
.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"),
// .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(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(() => {});
.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({
path: "/extension/release",
query: {
id
}
})
}
const checkEnterpriseInfo = (id) => {
router.push({ path: "./business" });
router.push({path: "./business"});
};
onActivated(() => {

View File

@ -1,31 +1,31 @@
<template>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryRef"
v-show="showSearch"
:inline="true"
:model="queryParams"
ref="queryRef"
v-show="showSearch"
:inline="true"
>
<el-form-item
:label="t('admin.form.name', { type: t('admin.common.activity') })"
prop="title"
:label="t('admin.form.name', { type: t('admin.common.activity') })"
prop="title"
>
<el-input
v-model="queryParams.title"
:placeholder="
v-model="queryParams.title"
:placeholder="
t('admin.form.placeholder', { type: t('activity.activityName') })
"
clearable
size="small"
style="width: 240px"
@keyup.enter="handleQuery"
clearable
size="small"
style="width: 240px"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item :label="t('activity.activityStatus')" prop="status">
<el-select
v-model="queryParams.status"
:placeholder="t('admin.form.pleaseSelect')"
size="small"
v-model="queryParams.status"
:placeholder="t('admin.form.pleaseSelect')"
size="small"
>
<el-option :label="t('common.show')" value="1"></el-option>
<el-option :label="t('common.hide')" value="2"></el-option>
@ -34,10 +34,10 @@
</el-form-item>
<el-form-item>
<el-button
size="small"
type="primary"
icon="Search"
@click="handleQuery"
size="small"
type="primary"
icon="Search"
@click="handleQuery"
>
{{ t("admin.common.search") }}
</el-button>
@ -49,34 +49,34 @@
<!-- 表格数据 -->
<el-table v-loading="loading" :data="dataList">
<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.common.activity') })"
prop="title"
:show-overflow-tooltip="true"
:label="t('admin.form.name', { type: t('admin.common.activity') })"
prop="title"
:show-overflow-tooltip="true"
/>
<el-table-column
:label="t('activity.signUpDeadline')"
align="center"
prop="joinDeadline"
:label="t('activity.signUpDeadline')"
align="center"
prop="joinDeadline"
>
<template #default="{ row }">
<span>{{ parseTime(row.joinDeadline) }}</span>
</template>
</el-table-column>
<el-table-column
:label="t('activity.activityStartTime')"
align="center"
prop="beginTime"
:label="t('activity.activityStartTime')"
align="center"
prop="beginTime"
>
<template #default="{ row }">
<span>{{ parseTime(row.beginTime) }}</span>
</template>
</el-table-column>
<el-table-column
:label="t('activity.activityEndTime')"
align="center"
prop="finishTime"
:label="t('activity.activityEndTime')"
align="center"
prop="finishTime"
>
<template #default="{ row }">
<span>{{ parseTime(row.finishTime) }}</span>
@ -84,9 +84,9 @@
</el-table-column>
<el-table-column
:label="t('activity.activitySignUpTime')"
align="center"
prop="createTime"
:label="t('activity.activitySignUpTime')"
align="center"
prop="createTime"
>
<template #default="{ row }">
<span>{{ parseTime(row.createTime) }}</span>
@ -95,38 +95,276 @@
<el-table-column :label="t('common.status')" align="center" prop="status">
<template #default="{ row }">
<el-tag type="success" v-if="row.status == 1">{{
t("common.show")
}}</el-tag>
t("common.show")
}}
</el-tag>
<el-tag type="danger" v-else-if="row.status == 2">{{
t("common.hide")
}}</el-tag>
t("common.hide")
}}
</el-tag>
<el-tag type="info" v-else>{{ t("common.unknown") }}</el-tag>
</template>
</el-table-column>
<el-table-column v-if="false" :label="t('admin.common.operation')" align="center" prop="status">
<template #default="{ row }">
<el-button type="text" icon="view" @click="handleDetail(row.id)" size="small">{{
t("common.viewDetails")
}}
</el-button>
</template>
</el-table-column>
</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"
/>
<el-dialog title="活动详情" v-model="showDialog" width="55%" destroy-on-close>
<el-form ref="formRef" :model="form" label-width="120px">
<el-form-item label="活动名称:" prop="title">
<el-input v-model="form.title" placeholder="请输入活动名称"/>
</el-form-item>
<el-form-item label="联系人:" prop="contact">
<el-input v-model="form.contact" placeholder="请输入联系人"/>
</el-form-item>
<el-form-item label="手机号码:" prop="contactMobile">
<el-input
v-model="form.contactMobile"
placeholder="请输入手机号码"
maxlength="11"
/>
</el-form-item>
<el-form-item label="开始时间:" prop="beginTime">
<el-date-picker
value-format="YYYY-MM-DD HH:mm:ss"
v-model="form.beginTime"
type="datetime"
placeholder="选择开始时间"
>
</el-date-picker>
</el-form-item>
<el-form-item label="结束时间:" prop="finishTime">
<el-date-picker
value-format="YYYY-MM-DD HH:mm:ss"
v-model="form.finishTime"
type="datetime"
placeholder="选择结束时间"
>
</el-date-picker>
</el-form-item>
<el-form-item label="截止时间:" prop="joinDeadline">
<el-date-picker
value-format="YYYY-MM-DD HH:mm:ss"
v-model="form.joinDeadline"
type="datetime"
placeholder="选择截止时间"
>
</el-date-picker>
</el-form-item>
<!-- 国家-->
<el-form-item
label="国家"
prop="country"
>
<el-select
v-model="form.country"
placeholder="请选择国家"
>
<el-option
v-for="option in countryOptions"
:label="option.value"
:value="option.key"
/>
</el-select>
</el-form-item>
<!-- <CityOptions v-model="form" ref="cityOptionsRef"/>-->
<!-- <el-form-item label="地点:" required>
<el-row type="flex" justify="space-between" :gutter="10">
<el-col :span="8">
<el-form-item prop="province">
<el-select
v-model="form.province"
clearable
placeholder="请选择"
:disabled="provinceSelectList.length === 0"
@change="provinceChange"
>
<el-option
v-for="item in provinceSelectList"
:key="item.provinceCode"
:label="item.provinceName"
:value="item.provinceCode"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="city">
<el-select
v-model="form.city"
clearable
placeholder="请选择"
:disabled="citySelectList.length === 0"
@change="cityChange"
>
<el-option
v-for="item in citySelectList"
:key="item.cityCode"
:label="item.cityName"
:value="item.cityCode"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="district">
<el-select
v-model="form.district"
clearable
placeholder="请选择"
:disabled="districtSelectList.length === 0"
>
<el-option
v-for="item in districtSelectList"
:key="item.areaCode"
:label="item.areaName"
:value="item.areaCode"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form-item> -->
<el-form-item label="详细地址:" prop="address">
<el-input v-model="form.address" placeholder="请输入详细地址"/>
</el-form-item>
<field-options v-model="form" ref="fieldOptionsRef"/>
<!-- <el-form-item label="活动分类:" required>
<el-row type="flex" justify="space-between">
<el-col :span="8">
<el-form-item prop="industrys">
<el-select
v-model="form.industrys[0]"
clearable
placeholder="请选择"
@change="field1Change"
>
<el-option
v-for="item in field1SelectList"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8" style="margin: 0 10px">
<el-form-item>
<el-select
v-model="form.industrys[1]"
clearable
placeholder="请选择"
@change="field2Change"
>
<el-option
v-for="item in field2SelectList"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-select
v-model="form.industrys[2]"
clearable
placeholder="请选择"
>
<el-option
v-for="item in field3SelectList"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form-item> -->
<el-form-item label="通知人群:" prop="notifyCrowds">
<el-select v-model="form.notifyCrowds" multiple placeholder="请选择">
<el-option label="企业" value="1"></el-option>
<el-option label="专家" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="报名人数上限:" prop="maxNumber">
<el-input
v-model.number="form.maxNumber"
placeholder="请输入报名人数"
/>
</el-form-item>
<el-form-item label="宣传图:" prop="image">
<ImageUpload v-model="form.image" :isShowTip="false" :limit="1"/>
</el-form-item>
<el-form-item label="活动简介:" prop="description">
<el-input
v-model="form.description"
placeholder="请输入活动简介"
type="textarea"
:autosize="{ minRows: 2, maxRows: 4 }"
/>
</el-form-item>
<el-form-item label="活动介绍:" prop="content">
<!-- <WangEditor v-model="form.content" minHeight="150px" />-->
<el-input
v-model="form.content"
placeholder="请输入活动介绍"
type="textarea"
:autosize="{ minRows: 6, maxRows: 8 }"
/>
</el-form-item>
<el-form-item label="报名费用:" prop="amount">
<el-input v-model.number="form.amount">
<template slot="append"></template>
</el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<!-- <el-button type="primary" @click="submitForm"> </el-button>-->
<!-- <el-button @click="cancel"> </el-button>-->
</div>
</el-dialog>
</div>
</template>
<script setup>
import { activitysList } from "@/api/admin/expert";
import { useI18n } from "vue-i18n";
import { reactive, ref, toRefs } from "vue";
import { parseTime } from "@/utils/ruoyi";
import {activityInfo, activitysList} from "@/api/admin/expert";
import {useI18n} from "vue-i18n";
import {reactive, ref, toRefs} from "vue";
import {parseTime} from "@/utils/ruoyi";
import FieldOptions from "@/views/components/FieldOptions"
const { t } = useI18n();
const {t} = useI18n();
const dataList = ref([]);
const loading = ref(true);
const showSearch = ref(true);
const total = ref(0);
const queryRef = ref();
const showDialog = ref(false)
const data = reactive({
queryParams: {
pageNum: 1,
@ -135,9 +373,10 @@ const data = reactive({
title: undefined,
status: undefined,
},
form: {}
});
const { queryParams } = toRefs(data);
const {queryParams, form} = toRefs(data);
/** 查询数据列表 */
const getList = async () => {
@ -162,5 +401,12 @@ function resetQuery() {
}
}
const handleDetail = (id) => {
activityInfo(id).then(resp => {
form.value = resp.data
showDialog.value = true
})
}
getList();
</script>

View File

@ -4,44 +4,44 @@
<el-col :span="1.5">
<router-link to="./release">
<el-button size="small" type="primary"
>{{ t("admin.table.publishAchievement") }}
>{{ t("admin.table.publishAchievement") }}
</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.common.achievement') })"
prop="title"
:label="t('admin.form.name', { type: t('admin.common.achievement') })"
prop="title"
/>
<el-table-column :label="t('admin.form.keywords')" prop="keyword" />
<el-table-column :label="t('admin.form.keywords')" prop="keyword"/>
<!-- <el-zh-column label="浏览量" prop="visitCount" /> -->
<el-table-column :label="t('admin.form.industry')" prop="industryStr" />
<el-table-column :label="t('admin.form.industry')" prop="industryStr"/>
<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>
@ -50,67 +50,73 @@
</template>
</el-table-column>
<el-table-column
v-if="false"
: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
v-if="queryParams.status == 3"
:to="{ path: './release', query: { id: row.id } }"
v-if="queryParams.status === 3"
:to="{ path: './release', query: { id: row.id } }"
>
<el-button icon="Edit" size="small" type="text"
>{{ t("admin.common.edit") }}
>{{ t("admin.common.edit") }}
</el-button>
</router-link>
<el-button
v-if="queryParams.status == 1"
:icon="row.shelfStatus == 1 ? `Download` : `Upload`"
size="small"
type="text"
@click="handleShelf(row)"
>{{
row.shelfStatus == 1
? t("admin.table.putOn")
: t("admin.table.putOff")
}}
v-if="queryParams.status !== 3"
icon="view"
size="small"
type="text"
@click="handleDetails(row.id)"
>{{ t("common.details") }}
</el-button>
<!-- <el-button-->
<!-- v-if="queryParams.status == 1"-->
<!-- :icon="row.shelfStatus == 1 ? `Download` : `Upload`"-->
<!-- size="small"-->
<!-- type="text"-->
<!-- @click="handleShelf(row)"-->
<!-- >{{-->
<!-- row.shelfStatus == 1-->
<!-- ? t("admin.table.putOn")-->
<!-- : t("admin.table.putOff")-->
<!-- }}-->
<!-- </el-button>-->
<el-button
v-if="queryParams.status != 0"
icon="Delete"
size="small"
type="text"
@click="handleDelete(row.id)"
v-if="queryParams.status != 0"
icon="Delete"
size="small"
type="text"
@click="handleDelete(row.id)"
>
{{ t("admin.common.delete") }}
</el-button>
<el-button
v-if="queryParams.status == 1"
icon="View"
size="small"
type="text"
@click="handleResults(row)"
>{{ t("webSearch.viewMatchingResults") }}
v-if="queryParams.status == 1"
icon="View"
size="small"
type="text"
@click="handleResults(row)"
>{{ t("webSearch.viewMatchingResults") }}
</el-button>
<el-button
v-if="queryParams.status == 0"
icon="Close"
size="small"
type="text"
@click="handleCancelPublish(row.id)"
>{{ t("admin.table.cancelPublish") }}
v-if="queryParams.status == 0"
icon="Close"
size="small"
type="text"
@click="handleCancelPublish(row.id)"
>{{ t("admin.table.cancelPublish") }}
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
v-model:limit="queryParams.pageSize"
v-model:page="queryParams.pageNum"
:total="total"
@pagination="getList"
v-show="total > 0"
v-model:limit="queryParams.pageSize"
v-model:page="queryParams.pageNum"
:total="total"
@pagination="getList"
/>
</div>
</template>
@ -121,18 +127,18 @@ import {
expertAchievementList,
updateExpertAchievement,
} from "@/api/admin/expert/achievement";
import { ElMessage } from "element-plus";
import {ElMessage} from "element-plus";
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";
import {useRouter} from "vue-router";
import {onActivated, reactive} from "vue";
import {useI18n} from "vue-i18n";
import dayjs from "dayjs";
const router = useRouter();
const dataList = ref([]);
const loading = ref(true);
const total = ref(0);
const { t } = useI18n();
const {t} = useI18n();
const data = reactive({
queryParams: {
pageNum: 1,
@ -141,7 +147,7 @@ const data = reactive({
},
});
const { queryParams } = toRefs(data);
const {queryParams} = toRefs(data);
/** 查询列表 */
const getList = async () => {
@ -166,65 +172,75 @@ const handleQuery = () => {
/** 删除按钮操作 */
const handleDelete = (id) => {
modal
.confirm(
t("admin.common.confirmAction", {
number: id,
action: t("admin.common.delete"),
type: t("admin.common.achievement"),
})
)
.then(async () => {
await deleteAchievementByIds({ ids: [id] });
getList();
ElMessage.success(t("admin.common.deleteSuccess"));
});
.confirm(
t("admin.common.confirmAction", {
number: id,
action: t("admin.common.delete"),
type: t("admin.common.achievement"),
})
)
.then(async () => {
await deleteAchievementByIds({ids: [id]});
getList();
ElMessage.success(t("admin.common.deleteSuccess"));
});
};
// 上架和下架
function 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", {
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 });
getList();
ElMessage.success(
t("admin.common.success", {
action: text,
})
);
});
// .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});
getList();
ElMessage.success(
t("admin.common.success", {
action: text,
})
);
});
}
// 取消发布
const handleCancelPublish = (id) => {
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();
});
// .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();
};
const handleDetails = (id) => {
router.push({
path: `/technology/release`,
query: {
id
}
})
}
function handleResults(row) {
router.push({
path: "./results",

View File

@ -134,6 +134,14 @@ getList();
height: 100%;
padding: 12px;
:deep(.el-tabs__item) {
font-size: 18px;
&.is-active {
color: #0054ff;
}
}
.news-list {
.news-item {
& > a {

View File

@ -55,6 +55,7 @@ getNews()
}
p.content {
text-indent: 2em each-line;
font-size: 16px;
line-height: 24px;
margin: 0;

View File

@ -1,15 +1,15 @@
<template>
<div v-loading="loading">
<searchContainer
bannerKey="首页>专家库>专家详情"
:title="t('webSearch.expertLibrary')"
@handleQuery="handleQuery"
bannerKey="首页>专家库>专家详情"
:title="t('webSearch.expertLibrary')"
@handleQuery="handleQuery"
>
<template v-slot>
<div class="head">
<el-breadcrumb separator="/">
<el-breadcrumb-item>
<span class="one">{{ t("admin.findExpert") }}</span>
<span class="one">{{ t("webSearch.findExpert") }}</span>
</el-breadcrumb-item>
<el-breadcrumb-item>
<span>{{ t("webSearch.expertDetails") }}</span>
@ -40,10 +40,10 @@
<div>
{{
state.expertDetail.gender == "1"
? t("gender.male")
: state.expertDetail.gender == "2"
? t("gender.female")
: t("common.unknown")
? t("gender.male")
: state.expertDetail.gender == "2"
? t("gender.female")
: t("common.unknown")
}}
</div>
</section>
@ -100,7 +100,7 @@
<div>
{{
educationOptions.find(
(item) => item.key == state.expertDetail.education
(item) => item.key == state.expertDetail.education
)?.[locale]
}}
</div>
@ -112,8 +112,8 @@
</div>
<section v-if="state.expertDetail.research">
<div
v-for="item in state.expertDetail.research?.split(',') ?? []"
class="describe"
v-for="item in state.expertDetail.research?.split(',') ?? []"
class="describe"
>
{{ item }}
</div>
@ -133,6 +133,47 @@
<!-- <div style="padding: 20px 0">
<div class="pointTit">专家视频</div>
</div> -->
<!-- <template>-->
<div style="padding: 20px 0">
<div class="pointTit">{{ t("dict.patent") }}</div>
</div>
<section>
<div>
<ul class="patent-list">
<li v-for="patent in state.expertDetail.patentList??[]" :key="patent.id" class="patent-item">
{{ patent.title }}
</li>
</ul>
</div>
</section>
<!-- </template>-->
<div style="padding: 20px 0">
<div class="pointTit">{{ t("admin.common.achievement") }}</div>
</div>
<section>
<div>
<ul class="patent-list">
<li v-for="achievement in state.expertDetail.achievementList" :key="achievement.id"
class="patent-item">
{{ achievement.title }}
</li>
</ul>
</div>
</section>
<div style="padding: 20px 0">
<div class="pointTit">{{ t("admin.common.paper") }}</div>
</div>
<section>
<div>
<ul class="patent-list">
<li v-for="paper in state.expertDetail.paperList" :key="paper.id"
class="patent-item">
{{ paper.title }}
</li>
</ul>
</div>
</section>
</div>
<div v-if="state.expertDetail.id" style="padding: 20px 0">
<el-tabs v-model="state.activeName">
@ -406,7 +447,7 @@
</div> -->
</div>
<div class="r">
<webContact />
<webContact/>
</div>
</el-row>
</template>
@ -420,17 +461,20 @@ import webContact from "@/components/webContact/index.vue";
import expertItem from "./components/expertItem.vue";
// import loadMore from "./components/loadMore.vue";
// import request from "@/utils/request";
import { searchExpertDetail } from "@/api/website/home";
import { onMounted, reactive, ref } from "vue";
import {searchExpertDetail} from "@/api/website/home";
import {onMounted, reactive, ref} from "vue";
import searchContainer from "./components/searchContainer.vue";
// import wordcloud from "./components/wordcloud.vue";
// import productItem from "./components/productItem.vue";
import { useRoute, useRouter } from "vue-router";
import {useRoute, useRouter} from "vue-router";
import docking from "./components/docking.vue";
import { useI18n } from "vue-i18n";
import { educationOptions } from "../../../utils/parameter";
import {useI18n} from "vue-i18n";
import {educationOptions} from "../../../utils/parameter";
import {expertPatentList} from "@/api/admin/expert/patent";
import {expertAchievementList} from "@/api/admin/expert/achievement";
import {paperList} from "@/api/admin/expert/technology";
const { t, locale } = useI18n();
const {t, locale} = useI18n();
const showDocking = ref(false);
const router = useRouter();
const route = useRoute();
@ -457,7 +501,7 @@ const state = reactive({
function handleList(mode, query) {
router.push({
path: `/searchList/${mode}`,
query: { query, queryType: route.query.queryType },
query: {query, queryType: route.query.queryType},
});
}
@ -502,22 +546,37 @@ function getDataList() {
// }
// })
searchExpertDetail(id)
.then((resp) => {
const data = resp.data;
// data.expertDetail.introduce = data.expertDetail.introduce?.replace(
// "\n",
// "</br>"
// );
data.introduce = data.introduce
?.replaceAll("\n", "</br>")
?.replaceAll(" ", "&ensp;");
// console.log(data.introduce.replaceAll("\n", "</br>"));
state.expertDetail = data;
loading.value = false;
})
.catch(() => {
loading.value = false;
});
.then((resp) => {
const data = resp.data;
// data.expertDetail.introduce = data.expertDetail.introduce?.replace(
// "\n",
// "</br>"
// );
data.introduce = data.introduce
?.replaceAll("\n", "</br>")
?.replaceAll(" ", "&ensp;");
// console.log(data.introduce.replaceAll("\n", "</br>"));
state.expertDetail = data;
loading.value = false;
})
.catch(() => {
loading.value = false;
});
expertPatentList(id).then(resp => {
state.expertDetail.patentList = resp.rows
})
expertAchievementList({
expertId: id
}).then(resp => {
state.expertDetail.achievementList = resp.rows
console.log(state.expertDetail.achievementList)
})
paperList({uid: id}).then(resp => {
state.expertDetail.paperList = resp.rows
})
// companyProduct(id).then(res => {
// if (200 == res.code) {
// state.companyProduct = res.data.data;
@ -588,6 +647,12 @@ function getDataList() {
// color: #666666;
// margin-bottom: 5px;
// }
.patent-list {
.patent-item {
list-style: disc;
line-height: 24px;
}
}
}
.pointTit {