bugfix and performance improvements
This commit is contained in:
@ -45,3 +45,28 @@ export const deleteLabPatentByIds = (ids) => {
|
||||
method: "DELETE",
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 实验室未绑定专家列表
|
||||
* @param params
|
||||
* @return {*}
|
||||
*/
|
||||
export const selectNotBindLaboratory = (params) => {
|
||||
return request({
|
||||
url: `/app/laboratory/selectNotBindLaboratory`,
|
||||
method: "GET",
|
||||
params,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 实验室专家绑定
|
||||
* @param expertId
|
||||
* @return {*}
|
||||
*/
|
||||
export const bindExpert = (expertId) => {
|
||||
return request({
|
||||
url: `/app/laboratory/bindExpert/${expertId}`,
|
||||
method: "GET",
|
||||
});
|
||||
};
|
||||
|
@ -6,4 +6,4 @@ export const upload = (data) => {
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
@ -21,6 +21,6 @@ const statistics = {
|
||||
expert: "шт",
|
||||
laboratory: "шт",
|
||||
paper: "шт",
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
export default statistics;
|
@ -21,7 +21,6 @@ const statistics = {
|
||||
expert: "位",
|
||||
laboratory: "个",
|
||||
paper: "篇",
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
};
|
||||
export default statistics;
|
@ -42,7 +42,11 @@
|
||||
trigger="click"
|
||||
>
|
||||
<div class="avatar-wrapper">
|
||||
<img v-if="userStore.avatar" :src="`${baseUrl}/file${userStore.avatar}`" class="user-avatar" />
|
||||
<img
|
||||
v-if="userStore.avatar"
|
||||
:src="`${baseUrl}/file${userStore.avatar}`"
|
||||
class="user-avatar"
|
||||
/>
|
||||
<img v-else :src="defaultAvatar" class="user-avatar" />
|
||||
<el-icon>
|
||||
<caret-bottom />
|
||||
@ -104,7 +108,7 @@ import useUserStore from "@/store/modules/user";
|
||||
import useSettingsStore from "@/store/modules/settings";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { ref } from "vue";
|
||||
import defaultAvatar from '@/assets/logo/avatar.png'
|
||||
import defaultAvatar from "@/assets/logo/avatar.png";
|
||||
const appStore = useAppStore();
|
||||
const userStore = useUserStore();
|
||||
const settingsStore = useSettingsStore();
|
||||
|
@ -30,28 +30,30 @@ const data = reactive({
|
||||
},
|
||||
rules: {
|
||||
// 表单验证规则
|
||||
orderNumber: [{
|
||||
required: true, message: /*"请输入订单号"*/
|
||||
computed(
|
||||
() =>
|
||||
orderNumber: [
|
||||
{
|
||||
required: true,
|
||||
/*"请输入订单号"*/
|
||||
message: computed(() =>
|
||||
t("admin.form.placeholder", {
|
||||
type: t("admin.form.orderNumber"),
|
||||
})
|
||||
)
|
||||
, trigger: "blur"
|
||||
}],
|
||||
),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
companyName: [
|
||||
{
|
||||
required: true, message: /*"请输入公司名称"*/
|
||||
computed(
|
||||
() =>
|
||||
required: true,
|
||||
/*"请输入公司名称"*/
|
||||
message: computed(() =>
|
||||
t("admin.form.placeholder", {
|
||||
type: t("admin.form.name", {
|
||||
type: t("admin.common.company"),
|
||||
}),
|
||||
})
|
||||
)
|
||||
, trigger: "blur"
|
||||
),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
// 税号
|
||||
@ -231,7 +233,6 @@ getList();
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
:disabled="row.status !== '0'"
|
||||
|
||||
type="text"
|
||||
@click="handleApplyInvoice(row)"
|
||||
>发票申请
|
||||
|
@ -148,18 +148,12 @@ getList();
|
||||
:placeholder="
|
||||
t('admin.form.placeholder', { type: t('admin.common.company') })
|
||||
"
|
||||
|
||||
@keyup.enter.prevent="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button
|
||||
icon="Search"
|
||||
|
||||
type="primary"
|
||||
@click="handleQuery"
|
||||
>
|
||||
<el-button icon="Search" type="primary" @click="handleQuery">
|
||||
{{ t("admin.common.search") }}
|
||||
</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">
|
||||
@ -210,7 +204,6 @@ getList();
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
link
|
||||
|
||||
type="text"
|
||||
@click="handleTechDemand(row.enterpriseId)"
|
||||
>{{
|
||||
@ -226,12 +219,7 @@ getList();
|
||||
})
|
||||
}}
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
|
||||
type="text"
|
||||
@click="handleDelete(row.id)"
|
||||
>
|
||||
<el-button link type="text" @click="handleDelete(row.id)">
|
||||
{{ t("admin.common.delete") }}
|
||||
</el-button>
|
||||
</template>
|
||||
|
@ -113,18 +113,12 @@ getList();
|
||||
:placeholder="
|
||||
t('admin.form.placeholder', { type: t('admin.common.company') })
|
||||
"
|
||||
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button
|
||||
icon="Search"
|
||||
|
||||
type="primary"
|
||||
@click="handleQuery"
|
||||
>
|
||||
<el-button icon="Search" type="primary" @click="handleQuery">
|
||||
{{ t("admin.common.search") }}
|
||||
</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">
|
||||
@ -170,9 +164,7 @@ getList();
|
||||
</el-table-column>
|
||||
<el-table-column align="center" :label="t('admin.common.operation')">
|
||||
<template #default="{ row }">
|
||||
<el-button link type="primary" @click=""
|
||||
>查看详情
|
||||
</el-button>
|
||||
<el-button link type="primary" @click="">查看详情 </el-button>
|
||||
<el-button link type="primary">承接需求</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-row type="flex" style="padding: 40px 20px">
|
||||
<el-row style="padding: 40px 20px" type="flex">
|
||||
<div class="img">
|
||||
<el-image :src="data.image" alt />
|
||||
</div>
|
||||
@ -21,8 +21,9 @@
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="keywords" style="flex: 1">
|
||||
<div class="keywords" style="/*flex: 1; */ width: 360px">
|
||||
<wordcloud
|
||||
:width="360"
|
||||
:data="createdData(data.keyword?.split(',') ?? [])"
|
||||
></wordcloud>
|
||||
</div>
|
||||
@ -32,7 +33,7 @@
|
||||
<script setup>
|
||||
import wordcloud from "./wordcloud.vue";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { addViewHistory } from "@/utils/view_history";
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const props = defineProps({
|
||||
@ -41,6 +42,7 @@ const props = defineProps({
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
||||
function createdData(arr) {
|
||||
let l = [];
|
||||
let snap = JSON.parse(JSON.stringify(arr));
|
||||
@ -50,6 +52,7 @@ function createdData(arr) {
|
||||
});
|
||||
return l;
|
||||
}
|
||||
|
||||
function handleDetail(id) {
|
||||
let routeData = router.resolve({
|
||||
path: `/searchList/enterprise/detail/${id}`,
|
||||
@ -62,17 +65,22 @@ function handleDetail(id) {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
.img {
|
||||
width: 90px;
|
||||
margin-right: 12px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
:deep(.el-image) {
|
||||
width: 90px;
|
||||
height: 90px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
flex: 1;
|
||||
}
|
||||
</style>
|
||||
|
@ -7,26 +7,22 @@ import {useI18n} from "vue-i18n";
|
||||
const { t } = useI18n();
|
||||
const statisticsList = ref([
|
||||
{
|
||||
label: computed(() => t('admin.statistics.patentCount')),
|
||||
label: computed(() => t("admin.statistics.patentCount")),
|
||||
value: 0,
|
||||
unit: "项",
|
||||
},
|
||||
{
|
||||
label: computed(
|
||||
() => t("admin.statistics.achievementCount")
|
||||
),
|
||||
label: computed(() => t("admin.statistics.achievementCount")),
|
||||
value: 0,
|
||||
unit: "个",
|
||||
},
|
||||
{
|
||||
label: computed(() => t('admin.statistics.demandCount')),
|
||||
label: computed(() => t("admin.statistics.demandCount")),
|
||||
value: 0,
|
||||
unit: "个",
|
||||
},
|
||||
{
|
||||
label: computed(
|
||||
() => t('admin.statistics.paperCount')
|
||||
),
|
||||
label: computed(() => t("admin.statistics.paperCount")),
|
||||
value: 0,
|
||||
unit: "篇",
|
||||
},
|
||||
@ -37,26 +33,22 @@ const loadLabStatisticsData = () => {
|
||||
const { data } = resp;
|
||||
statisticsList.value = [
|
||||
{
|
||||
label: computed(() => t('admin.statistics.patentCount')),
|
||||
label: computed(() => t("admin.statistics.patentCount")),
|
||||
value: data?.patentCount ?? 0,
|
||||
unit: "项",
|
||||
},
|
||||
{
|
||||
label: computed(
|
||||
() => t("admin.statistics.achievementCount")
|
||||
),
|
||||
label: computed(() => t("admin.statistics.achievementCount")),
|
||||
value: data?.achievementCount ?? 0,
|
||||
unit: "个",
|
||||
},
|
||||
{
|
||||
label: computed(() => t('admin.statistics.demandCount')),
|
||||
label: computed(() => t("admin.statistics.demandCount")),
|
||||
value: data?.demandCount ?? 0,
|
||||
unit: "个",
|
||||
},
|
||||
{
|
||||
label: computed(
|
||||
() => t('admin.statistics.paperCount')
|
||||
),
|
||||
label: computed(() => t("admin.statistics.paperCount")),
|
||||
value: data?.paperCount ?? 0,
|
||||
unit: "篇",
|
||||
},
|
||||
|
@ -7,16 +7,11 @@
|
||||
:model="queryParams"
|
||||
@submit.prevent
|
||||
>
|
||||
<el-form-item
|
||||
:label="t('admin.form.name', { type: t('admin.common.achievement') })"
|
||||
prop="title"
|
||||
>
|
||||
<el-form-item label="成果名称" prop="title">
|
||||
<el-input
|
||||
v-model="queryParams.title"
|
||||
clearable
|
||||
:placeholder="
|
||||
t('admin.form.placeholder', { type: t('admin.common.patent') })
|
||||
"
|
||||
placeholder="请输入专利名称"
|
||||
size="small"
|
||||
style="width: 240px"
|
||||
@keyup.enter="handleQuery"
|
||||
@ -28,19 +23,22 @@
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="handleQuery"
|
||||
>
|
||||
{{ t("admin.common.search") }}
|
||||
>搜索
|
||||
</el-button>
|
||||
<el-button icon="Refresh" size="small" @click="resetQuery">
|
||||
{{ t("admin.common.reset") }}
|
||||
<el-button icon="Refresh" size="small" @click="resetQuery"
|
||||
>重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button icon="plus" size="small" type="primary">
|
||||
{{ t("admin.table.relatedExperts") }}
|
||||
</el-button>
|
||||
<el-button
|
||||
icon="plus"
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="handleAddBind"
|
||||
>关联专家</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
@ -48,25 +46,89 @@
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<!-- 表格数据 -->
|
||||
<el-table v-loading="loading" :data="dataList">
|
||||
<el-table-column :label="t('admin.common.dataNumber')" prop="id" />
|
||||
<!-- 关联未被关联的专家 -->
|
||||
<el-dialog v-model="showExpertDialog" title="关联专家">
|
||||
<el-form
|
||||
ref="notBindExpertQueryRef"
|
||||
:inline="true"
|
||||
:model="notBindExpertQueryParams"
|
||||
@submit.prevent
|
||||
>
|
||||
<el-form-item label="专家名称" prop="name">
|
||||
<el-input
|
||||
v-model="notBindExpertQueryParams.name"
|
||||
clearable
|
||||
placeholder="请输入专家名称"
|
||||
size="small"
|
||||
style="width: 240px"
|
||||
@keyup.enter="getNotBindExpertList"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
icon="Search"
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="getNotBindExpertList"
|
||||
>搜索
|
||||
</el-button>
|
||||
<el-button
|
||||
icon="Refresh"
|
||||
size="small"
|
||||
@click="resetNotBindExpertQuery"
|
||||
>重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table :data="notBindExpertList">
|
||||
<el-table-column label="数据编号" prop="id" />
|
||||
<el-table-column
|
||||
:show-overflow-tooltip="true"
|
||||
:label="t('admin.form.name', { type: t('admin.common.expert') })"
|
||||
prop="title"
|
||||
label="专家名称"
|
||||
prop="name"
|
||||
/>
|
||||
<el-table-column :label="t('webContact.phone')" prop="mobile" />
|
||||
<el-table-column
|
||||
:label="t('admin.table.researchIndustry')"
|
||||
prop="industryStr"
|
||||
<el-table-column label="联系电话" prop="mobile" />
|
||||
<el-table-column label="研究领域" prop="industryStr" />
|
||||
<!-- <el-table-column label="申请(专利权)人" prop="applyName"/>-->
|
||||
<el-table-column align="center" label="入驻时间" prop="workTime">
|
||||
<template #default="{ row }">
|
||||
<span>{{ dayjs(row.workTime).format("YYYY-MM-DD") }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 操作-->
|
||||
<el-table-column align="center" label="操作">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
icon="plus"
|
||||
size="small"
|
||||
type="text"
|
||||
@click="submitBind(row.id)"
|
||||
>关联
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="notBindExpertTotal > 0"
|
||||
v-model:limit="notBindExpertQueryParams.pageSize"
|
||||
v-model:page="notBindExpertQueryParams.pageNum"
|
||||
:total="notBindExpertTotal"
|
||||
@pagination="getNotBindExpertList"
|
||||
/>
|
||||
<!-- <el-zh-column :label="t('webSearch.applicant')" prop="applyName"/>-->
|
||||
</el-dialog>
|
||||
|
||||
<!-- 表格数据 -->
|
||||
<el-table v-loading="loading" :data="dataList">
|
||||
<el-table-column label="数据编号" prop="id" />
|
||||
<el-table-column
|
||||
align="center"
|
||||
:label="t('admin.table.enterTime')"
|
||||
prop="workTime"
|
||||
>
|
||||
:show-overflow-tooltip="true"
|
||||
label="专家名称"
|
||||
prop="name"
|
||||
/>
|
||||
<el-table-column label="联系电话" prop="mobile" />
|
||||
<el-table-column label="研究领域" prop="industryStr" />
|
||||
<!-- <el-table-column label="申请(专利权)人" prop="applyName"/>-->
|
||||
<el-table-column align="center" label="入驻时间" prop="workTime">
|
||||
<template #default="{ row }">
|
||||
<span>{{ dayjs(row.workTime).format("YYYY-MM-DD") }}</span>
|
||||
</template>
|
||||
@ -74,7 +136,7 @@
|
||||
<el-table-column
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
:label="t('admin.common.operation')"
|
||||
label="操作"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<!-- <el-button-->
|
||||
@ -90,10 +152,16 @@
|
||||
size="small"
|
||||
type="text"
|
||||
@click="handleDeleteBind(row.id)"
|
||||
>{{ t("admin.table.cancelRelation") }}
|
||||
>取消关联
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<!-- <el-button type="primary" @click="submitForm">确 定</el-button>-->
|
||||
<el-button>取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
@ -106,7 +174,7 @@
|
||||
<!-- 添加或修改数据配置对话框 -->
|
||||
<el-dialog v-model="open" :title="title" append-to-body width="800px">
|
||||
<el-form ref="expertRef" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item :label="t('admin.form.expertName')" prop="title">
|
||||
<el-form-item label="专家姓名" prop="title">
|
||||
<el-input v-model="form.title" placeholder="请输入专家姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" prop="gender">
|
||||
@ -122,16 +190,14 @@
|
||||
:labelWidth="100"
|
||||
fieldKey="researchs"
|
||||
placeholder="研究方向"
|
||||
:title="t('admin.form.researchDirection')"
|
||||
title="研究方向"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm"
|
||||
>{{ t("admin.common.confirm") }}
|
||||
</el-button>
|
||||
<el-button @click="cancel">{{ t("admin.common.cancel") }}</el-button>
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
@ -139,17 +205,19 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { labPatentList } from "@/api/admin/laboratory/patent";
|
||||
import dayjs from "dayjs";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import modal from "@/plugins/modal";
|
||||
import { useRouter } from "vue-router";
|
||||
import { computed, reactive, ref, toRefs } from "vue";
|
||||
import { reactive, ref, toRefs } from "vue";
|
||||
import InputBoxAdd from "@/views/components/InputBoxAdd/index.vue";
|
||||
import { deleteBindExpert, expertList } from "@/api/admin/laboratory/expert";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import {
|
||||
bindExpert,
|
||||
deleteBindExpert,
|
||||
expertList,
|
||||
selectNotBindLaboratory,
|
||||
} from "@/api/admin/laboratory/expert";
|
||||
import Pagination from "@/components/Pagination/index.vue";
|
||||
|
||||
const { t } = useI18n();
|
||||
const router = useRouter();
|
||||
|
||||
const dataList = ref([]);
|
||||
@ -160,6 +228,7 @@ const total = ref(0);
|
||||
const title = ref("");
|
||||
const expertRef = ref();
|
||||
const researchDirectionFormRef = ref();
|
||||
|
||||
const data = reactive({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
@ -202,14 +271,7 @@ function resetQuery() {
|
||||
|
||||
/** 删除按钮操作 */
|
||||
function handleDeleteBind(id) {
|
||||
modal
|
||||
.confirm(
|
||||
t("admin.common.confirmAction", {
|
||||
number: id,
|
||||
action: t("admin.table.cancelRelation"),
|
||||
type: t("admin.common.expert"),
|
||||
})
|
||||
)
|
||||
ElMessageBox.confirm(`是否确认取消关联数据编号为"${id}"的专家?`)
|
||||
.then(function () {
|
||||
return deleteBindExpert(id);
|
||||
})
|
||||
@ -242,11 +304,60 @@ function cancel() {
|
||||
reset();
|
||||
}
|
||||
|
||||
const handleAdd = () => {
|
||||
reset();
|
||||
title.value = "添加专家";
|
||||
open.value = true;
|
||||
// 是否显示关联专家dialog
|
||||
const showExpertDialog = ref(false);
|
||||
// 未绑定专家列表
|
||||
const notBindExpertList = ref([]);
|
||||
// 未绑定专家总数
|
||||
const notBindExpertTotal = ref(0);
|
||||
const notBindExpertQueryParams = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
name: undefined,
|
||||
});
|
||||
|
||||
const notBindExpertQueryRef = ref();
|
||||
const getNotBindExpertList = () => {
|
||||
selectNotBindLaboratory(notBindExpertQueryParams).then((resp) => {
|
||||
notBindExpertList.value = resp.rows;
|
||||
notBindExpertTotal.value = resp.total;
|
||||
});
|
||||
};
|
||||
|
||||
const handleAddBind = () => {
|
||||
getNotBindExpertList();
|
||||
showExpertDialog.value = true;
|
||||
};
|
||||
|
||||
/**
|
||||
* 重置未绑定专家查询条件
|
||||
*/
|
||||
const resetNotBindExpertQuery = () => {
|
||||
notBindExpertQueryParams.pageNum = 1;
|
||||
notBindExpertQueryParams.pageSize = 10;
|
||||
notBindExpertQueryParams.name = undefined;
|
||||
notBindExpertQueryRef.value.resetFields();
|
||||
getNotBindExpertList();
|
||||
};
|
||||
|
||||
/**
|
||||
* 关联专家
|
||||
* @param id
|
||||
*/
|
||||
const submitBind = (id) => {
|
||||
ElMessageBox.confirm("是否确认关联该专家?")
|
||||
.then(function () {
|
||||
return bindExpert(id);
|
||||
})
|
||||
.then(() => {
|
||||
getNotBindExpertList();
|
||||
ElMessage.success("关联成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
};
|
||||
|
||||
const handleUpdate = () => {
|
||||
reset();
|
||||
title.value = "编辑专家";
|
||||
@ -261,7 +372,7 @@ function submitForm() {
|
||||
if (form.value.id) {
|
||||
// TODO
|
||||
paperEdit(form.value).then((response) => {
|
||||
ElMessage.success(t("admin.common.editSuccess"));
|
||||
ElMessage.success("修改成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
|
@ -6,12 +6,13 @@
|
||||
:rules="rules"
|
||||
>
|
||||
<div v-if="showTitle" class="form_title">
|
||||
<!-- 基本信息-->
|
||||
{{ t("admin.form.basicInfo") }}
|
||||
</div>
|
||||
|
||||
<el-row v-if="isAdd">
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="t('admin.form.fullName')" prop="name">
|
||||
<el-form-item label="姓名:" prop="name">
|
||||
<el-input v-model="modelValue.name"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -19,7 +20,7 @@
|
||||
|
||||
<el-row v-if="isAdd">
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="t('admin.form.mobile')" prop="mobile">
|
||||
<el-form-item label="手机号:" prop="mobile">
|
||||
<el-input v-model="modelValue.mobile"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -27,7 +28,7 @@
|
||||
|
||||
<el-row v-if="isAdd">
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="t('admin.form.idCard')" prop="idCard">
|
||||
<el-form-item label="身份证号:" prop="idCard">
|
||||
<el-input v-model="modelValue.idCard"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -35,7 +36,7 @@
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="t('admin.form.workLocation')" prop="wordAddress">
|
||||
<el-form-item label="工作所在地:" prop="wordAddress">
|
||||
<el-input v-model="modelValue.wordAddress" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -43,7 +44,7 @@
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="t('admin.form.workExperience')" prop="experience">
|
||||
<el-form-item label="工作经历:" prop="experience">
|
||||
<el-input
|
||||
v-model="modelValue.experience"
|
||||
:autosize="{ minRows: 2, maxRows: 10 }"
|
||||
@ -60,13 +61,13 @@
|
||||
v-model="modelValue"
|
||||
:labelWidth="labelWidth"
|
||||
fieldKey="keywords"
|
||||
:placeholder="t('admin.form.inputKeywords')"
|
||||
:title="t('admin.form.keywords')"
|
||||
placeholder="应用场景关键词+技术产品关键词"
|
||||
title="关键词"
|
||||
/>
|
||||
|
||||
<el-row v-if="isAdd">
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="t('admin.form.idCard')" required>
|
||||
<el-form-item label="身份证:" required>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="idImage.0">
|
||||
@ -76,9 +77,7 @@
|
||||
:limit="1"
|
||||
/>
|
||||
</el-form-item>
|
||||
<div style="text-align: center">
|
||||
{{ t("admin.form.idCardPortrait") }}
|
||||
</div>
|
||||
<div style="text-align: center">身份证人像面</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="idImage.1">
|
||||
@ -88,9 +87,7 @@
|
||||
:limit="1"
|
||||
/>
|
||||
</el-form-item>
|
||||
<div style="text-align: center">
|
||||
{{ t("admin.form.idCardEmblem") }}
|
||||
</div>
|
||||
<div style="text-align: center">身份证国徽面</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="idImage.2">
|
||||
@ -100,9 +97,7 @@
|
||||
:limit="1"
|
||||
/>
|
||||
</el-form-item>
|
||||
<div style="text-align: center">{{
|
||||
t('admin.validation.portraitOfTheIdCard')
|
||||
}}</div>
|
||||
<div style="text-align: center">手持身份证人像面</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
@ -111,10 +106,7 @@
|
||||
|
||||
<el-row v-if="isAdd">
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
:label="t('admin.form.achievementBroker')"
|
||||
prop="certificatePics"
|
||||
>
|
||||
<el-form-item label="成果经纪资格证书:" prop="certificatePics">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<image-upload
|
||||
@ -131,7 +123,7 @@
|
||||
<script setup>
|
||||
import InputBoxAdd from "../InputBoxAdd";
|
||||
import FieldOptions from "../FieldOptions";
|
||||
import { computed, reactive, ref } from "vue";
|
||||
import { ref } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
const { t } = useI18n();
|
||||
@ -153,101 +145,51 @@ const props = defineProps({
|
||||
default: 120,
|
||||
},
|
||||
});
|
||||
const rules = reactive({
|
||||
product: [
|
||||
{
|
||||
required: true,
|
||||
message: computed(() => t("admin.form.placeholder", { type: "" })),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
name: [
|
||||
{
|
||||
required: true,
|
||||
message: computed(() => t("admin.form.placeholder", { type: "" })),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
kind: [
|
||||
{
|
||||
required: true,
|
||||
message: computed(() => t("admin.form.pleaseSelect")),
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
code: [
|
||||
{
|
||||
required: true,
|
||||
message: computed(() => t("admin.form.placeholder")),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
const rules = {
|
||||
product: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
name: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
kind: [{ required: true, message: "请选择", trigger: "change" }],
|
||||
code: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
mobile: [
|
||||
{
|
||||
required: true,
|
||||
message: computed(() =>
|
||||
t("admin.form.placeholder", { name: t("admin.form.mobile") })
|
||||
),
|
||||
trigger: "blur",
|
||||
},
|
||||
{ required: true, message: "请输入手机号码", trigger: "blur" },
|
||||
{
|
||||
pattern: /^1[3-9]\d{9}$/,
|
||||
message: computed(() =>
|
||||
t("admin.validation.pleaseEnterTheCorrectFormatOfThePhoneNumber")
|
||||
),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
idCard: [
|
||||
{
|
||||
required: true,
|
||||
message: computed(() => t("admin.form.placeholder")),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
wordAddress: [
|
||||
{
|
||||
required: true,
|
||||
message: computed(() => t("admin.form.placeholder", { type: "" })),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
experience: [
|
||||
{
|
||||
required: true,
|
||||
message: computed(() => t("admin.form.placeholder")),
|
||||
message: "请输入正确的手机号码",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
idCard: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
wordAddress: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
experience: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
"idImage.0": [
|
||||
{
|
||||
required: true,
|
||||
message: computed(() => t("admin.validation.pleaseUpload")),
|
||||
message: "请上传",
|
||||
trigger: ["blur", "change"],
|
||||
},
|
||||
],
|
||||
"idImage.1": [
|
||||
{
|
||||
required: true,
|
||||
message: computed(() => t("admin.validation.pleaseUpload")),
|
||||
message: "请上传",
|
||||
trigger: ["blur", "change"],
|
||||
},
|
||||
],
|
||||
"idImage.2": [
|
||||
{
|
||||
required: true,
|
||||
message: computed(() => t("admin.validation.pleaseUpload")),
|
||||
message: "请上传",
|
||||
trigger: ["blur", "change"],
|
||||
},
|
||||
],
|
||||
certificatePics: [
|
||||
{
|
||||
required: true,
|
||||
message: computed(() => t("admin.validation.pleaseUpload")),
|
||||
message: "请上传",
|
||||
trigger: ["blur", "change"],
|
||||
},
|
||||
],
|
||||
});
|
||||
};
|
||||
|
||||
const validateForm = async () => {
|
||||
let formValid;
|
||||
|
@ -71,7 +71,6 @@
|
||||
:labelWidth="labelWidth"
|
||||
/>
|
||||
|
||||
|
||||
<!-- <CityOptions-->
|
||||
<!-- ref="cityFormRef"-->
|
||||
<!-- v-model="modelValue"-->
|
||||
@ -172,7 +171,6 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
@ -194,9 +192,7 @@
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="t(
|
||||
'admin.form.coreMembers',
|
||||
)" prop="member">
|
||||
<el-form-item :label="t('admin.form.coreMembers')" prop="member">
|
||||
<WangEditor
|
||||
ref="memberRef"
|
||||
v-model="modelValue.member"
|
||||
|
@ -61,9 +61,8 @@
|
||||
<el-button icon="RefreshRight" @click="rotateRight()"></el-button>
|
||||
</el-col>
|
||||
<el-col :lg="{ span: 2, offset: 6 }" :md="2">
|
||||
<el-button type="primary" @click="uploadImg()">{{
|
||||
t("common.submit")
|
||||
}}
|
||||
<el-button type="primary" @click="uploadImg()"
|
||||
>{{ t("common.submit") }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -91,7 +90,9 @@ const title = computed(() => t("headerMenu.changeAvatar"));
|
||||
const baseUrl = ref(import.meta.env.VITE_APP_BASE_API);
|
||||
//图片裁剪数据
|
||||
const options = reactive({
|
||||
img: userStore.avatar ? `${baseUrl.value}/file${userStore.avatar}` : defaultAvatar, // 裁剪图片的地址
|
||||
img: userStore.avatar
|
||||
? `${baseUrl.value}/file${userStore.avatar}`
|
||||
: defaultAvatar, // 裁剪图片的地址
|
||||
autoCrop: true, // 是否默认生成截图框
|
||||
autoCropWidth: 200, // 默认生成截图框宽度
|
||||
autoCropHeight: 200, // 默认生成截图框高度
|
||||
@ -110,8 +111,7 @@ function modalOpened() {
|
||||
}
|
||||
|
||||
/** 覆盖默认上传行为 */
|
||||
function requestUpload() {
|
||||
}
|
||||
function requestUpload() {}
|
||||
|
||||
/** 向左旋转 */
|
||||
function rotateLeft() {
|
||||
@ -173,7 +173,9 @@ function realTime(data) {
|
||||
|
||||
/** 关闭窗口 */
|
||||
function closeDialog() {
|
||||
options.img = userStore.avatar ? `${baseUrl.value}/file${userStore.avatar}` : defaultAvatar;
|
||||
options.img = userStore.avatar
|
||||
? `${baseUrl.value}/file${userStore.avatar}`
|
||||
: defaultAvatar;
|
||||
options.visible = false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user