This commit is contained in:
quantulr
2023-11-29 17:22:34 +08:00
parent f0bf63e43f
commit 034b27fcbe
4 changed files with 160 additions and 148 deletions

View File

@ -1,95 +1,96 @@
<template>
<el-badge
v-if="!item.hidden"
:hidden="
![
`/approval/list`,
`/approval/dataList/approval`,
`/auditing/achievement`,
`/auditing/demand`,
`/auditing/serviceDemand`,
`/auditing/Enterpriseproducts`,
`/approval/data-list/laboratory`,
].includes(basePath)
"
:value="getCount(basePath)"
class="count-badge"
>
<div>
<template
<!-- <el-badge-->
<!-- v-if="!item.hidden"-->
<!-- :hidden="-->
<!-- ![-->
<!-- `/approval/list`,-->
<!-- `/approval/dataList/approval`,-->
<!-- `/auditing/achievement`,-->
<!-- `/auditing/demand`,-->
<!-- `/auditing/serviceDemand`,-->
<!-- `/auditing/Enterpriseproducts`,-->
<!-- `/approval/data-list/laboratory`,-->
<!-- ].includes(basePath)-->
<!-- "-->
<!-- :value="getCount(basePath)"-->
<!-- class="count-badge"-->
<!-- >-->
<div v-if="!item.hidden">
<template
v-if="
hasOneShowingChild(item.children, item) &&
(!onlyOneChild.children || onlyOneChild.noShowingChildren) &&
!item.alwaysShow
"
>
<app-link
>
<app-link
v-if="onlyOneChild.meta"
:to="resolvePath(onlyOneChild.path, onlyOneChild.query)"
>
<el-menu-item
>
<el-menu-item
:class="{ 'submenu-title-noDropdown': !isNest }"
:index="resolvePath(onlyOneChild.path)"
:style="{
paddingRight: '0px',
}"
>
<svg-icon
>
<svg-icon
:icon-class="
onlyOneChild.meta.icon || (item.meta && item.meta.icon)
"
/>
<template #title
><span
:title="hasTitle(onlyOneChild.meta.title)"
class="menu-title"
>{{
["/auditing/serviceDemand"].includes(basePath)
? `${onlyOneChild.meta.title} (${userStore.serviceDemandTotal})`
: ["/auditing/achievement"].includes(basePath)
? `${onlyOneChild.meta.title} (${userStore.achievementTotal})`
: ["/auditing/demand"].includes(basePath)
? `${onlyOneChild.meta.title} (${userStore.technologyTotal})`
: ["/auditing/Enterpriseproducts"].includes(basePath)
? `${onlyOneChild.meta.title} (${userStore.productTotal})`
: onlyOneChild.meta.title
}}</span
></template
>
</el-menu-item>
</app-link>
</template>
/>
<template #title
><span
:title="hasTitle(onlyOneChild.meta.title)"
class="menu-title"
>{{
/* ["/auditing/serviceDemand"].includes(basePath)
? `${onlyOneChild.meta.title} (${userStore.serviceDemandTotal})`
: ["/auditing/achievement"].includes(basePath)
? `${onlyOneChild.meta.title} (${userStore.achievementTotal})`
: ["/auditing/demand"].includes(basePath)
? `${onlyOneChild.meta.title} (${userStore.technologyTotal})`
: ["/auditing/Enterpriseproducts"].includes(basePath)
? `${onlyOneChild.meta.title} (${userStore.productTotal})`
:*/
onlyOneChild.meta.title
}}</span
></template
>
</el-menu-item>
</app-link>
</template>
<el-sub-menu
<el-sub-menu
v-else
ref="subMenu"
:index="resolvePath(item.path)"
popper-append-to-body
>
<template v-if="item.meta" #title>
<svg-icon :icon-class="item.meta && item.meta.icon" />
<span :title="hasTitle(item.meta.title)" class="menu-title">{{
>
<template v-if="item.meta" #title>
<svg-icon :icon-class="item.meta && item.meta.icon"/>
<span :title="hasTitle(item.meta.title)" class="menu-title">{{
item.meta.title
}}</span>
</template>
</template>
<sidebar-item
<sidebar-item
v-for="child in item.children"
:key="child.path"
:base-path="resolvePath(child.path)"
:is-nest="true"
:item="child"
class="nest-menu"
/>
</el-sub-menu>
</div>
</el-badge>
/>
</el-sub-menu>
</div>
<!-- </el-badge>-->
</template>
<script setup>
import { isExternal } from "@/utils/validate";
import {isExternal} from "@/utils/validate";
import AppLink from "./Link";
import { getNormalPath } from "@/utils/ruoyi";
import {getNormalPath} from "@/utils/ruoyi";
import useUserStore from "@/store/modules/user";
const props = defineProps({
@ -153,7 +154,7 @@ function hasOneShowingChild(children = [], parent) {
// Show parent if there are no child router to display
if (showingChildren.length === 0) {
onlyOneChild.value = { ...parent, path: "", noShowingChildren: true };
onlyOneChild.value = {...parent, path: "", noShowingChildren: true};
return true;
}

View File

@ -1,15 +1,15 @@
<template>
<el-form
ref="formRef"
:label-width="labelWidth + 'px'"
:model="modelValue"
:rules="rules"
ref="formRef"
:label-width="labelWidth + 'px'"
:model="modelValue"
:rules="rules"
>
<div v-if="showTitle" class="form_title">基本信息</div>
<el-row>
<el-col :span="24">
<el-form-item :label="imageName" prop="image">
<ImageUpload v-model="modelValue.image" :fileSize="2" :limit="1" />
<ImageUpload v-model="modelValue.image" :fileSize="2" :limit="1"/>
</el-form-item>
</el-col>
</el-row>
@ -18,8 +18,8 @@
<el-col :span="24">
<el-form-item :label="nameName" prop="name">
<el-input
v-model="modelValue.name"
:disabled="isAdd ? false : true"
v-model="modelValue.name"
:disabled="isAdd ? false : true"
></el-input>
</el-form-item>
</el-col>
@ -53,9 +53,9 @@
<el-col :span="24">
<el-form-item label="联系方式" prop="phone">
<el-input
v-model="modelValue.phone"
:maxlength="11"
oninput="
v-model="modelValue.phone"
:maxlength="11"
oninput="
value = value
.replace(/[^\d.]/g, '')
.replace(/\.{2,}/g, '.')
@ -83,10 +83,10 @@
<el-form-item label="企业类型:" prop="kind">
<el-select v-model="modelValue.kind" placeholder="请选择">
<el-option
v-for="item in enterpriseOptions"
:key="item.key"
:label="item.value"
:value="item.key"
v-for="item in enterpriseOptions"
:key="item.key"
:label="item.value"
:value="item.key"
>
</el-option>
</el-select>
@ -103,16 +103,16 @@
<el-col :span="12">
<el-form-item label="姓名:" prop="name">
<el-input
v-model="modelValue.name"
:disabled="isAdd ? false : true"
v-model="modelValue.name"
:disabled="isAdd ? false : true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="手机号:" prop="mobile">
<el-input
v-model="modelValue.mobile"
:disabled="isAdd ? false : true"
v-model="modelValue.mobile"
:disabled="isAdd ? false : true"
></el-input>
</el-form-item>
</el-col>
@ -148,35 +148,35 @@
<el-col :span="12">
<el-form-item label="所属实验室:">
<infinite-select
v-model="modelValue.laboratoryId"
:prop="{ label: 'name', value: 'id' }"
:query="{ page: 'pageNum', size: 'pageSize', searchKey: 'name' }"
:remote-method="loadLabOptions"
:default-label="modelValue.laboratoryName"
class="infinite-select"
prefix-icon="pointer"
v-model="modelValue.laboratoryId"
:prop="{ label: 'name', value: 'id' }"
:query="{ page: 'pageNum', size: 'pageSize', searchKey: 'name' }"
:remote-method="loadLabOptions"
:default-label="modelValue.laboratoryName"
class="infinite-select"
prefix-icon="pointer"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="所属研究机构:">
<infinite-select
v-model="modelValue.researchId"
:default-label="modelValue.researchName"
:prop="{ label: 'name', value: 'id' }"
:query="{ page: 'pageNum', size: 'pageSize', searchKey: 'name' }"
:remote-method="loadResearchOptions"
class="infinite-select"
prefix-icon="pointer"
v-model="modelValue.researchId"
:default-label="modelValue.researchName"
:prop="{ label: 'name', value: 'id' }"
:query="{ page: 'pageNum', size: 'pageSize', searchKey: 'name' }"
:remote-method="loadResearchOptions"
class="infinite-select"
prefix-icon="pointer"
/>
</el-form-item>
</el-col>
</el-row>
<CityOptions
ref="cityFormRef"
v-model="modelValue"
:labelWidth="labelWidth"
ref="cityFormRef"
v-model="modelValue"
:labelWidth="labelWidth"
/>
<el-row>
@ -204,10 +204,11 @@
<el-col :span="12">
<el-form-item label="最高学历:" prop="education">
<el-select v-model="modelValue.education" placeholder="请选择">
<el-option label="博士" value="博士"></el-option>
<el-option label="硕士" value="硕士"></el-option>
<el-option label="本科" value="本科"></el-option>
<el-option label="专科" value="专科"></el-option>
<!-- <el-option label="博士" value="博士"></el-option>
<el-option label="硕士" value="硕士"></el-option>
<el-option label="本科" value="本科"></el-option>
<el-option label="专科" value="专科"></el-option>-->
<el-option v-for="option in educationOptions" :key="option.key" :value="option.key" :label="option.text"/>
</el-select>
</el-form-item>
</el-col>
@ -235,11 +236,11 @@
<el-col :span="12">
<el-form-item label="从业时间:" prop="workTime">
<el-date-picker
v-model="modelValue.workTime"
format="YYYY-MM"
placeholder="选择日期"
type="month"
value-format="YYYY-MM"
v-model="modelValue.workTime"
format="YYYY-MM"
placeholder="选择日期"
type="month"
value-format="YYYY-MM"
>
</el-date-picker>
</el-form-item>
@ -253,28 +254,28 @@
</el-row>
<FieldOptions
ref="fieldFormRef"
v-model="modelValue"
:labelWidth="labelWidth"
ref="fieldFormRef"
v-model="modelValue"
:labelWidth="labelWidth"
/>
<InputBoxAdd
ref="keywordsFormRef"
v-model="modelValue"
:labelWidth="labelWidth"
fieldKey="keywords"
placeholder="应用场景关键词+技术产品关键词"
title="关键词"
ref="keywordsFormRef"
v-model="modelValue"
:labelWidth="labelWidth"
fieldKey="keywords"
placeholder="应用场景关键词+技术产品关键词"
title="关键词"
/>
<InputBoxAdd
v-if="formType != 2"
ref="researchsFormRef"
v-model="modelValue"
:labelWidth="labelWidth"
fieldKey="researchs"
placeholder="请输入研究方向"
title="研究方向"
v-if="formType != 2"
ref="researchsFormRef"
v-model="modelValue"
:labelWidth="labelWidth"
fieldKey="researchs"
placeholder="请输入研究方向"
title="研究方向"
/>
<!-- <InputBoxAdd
@ -308,9 +309,9 @@
<el-col :span="24">
<el-form-item label="营业执照:" prop="license">
<ImageUpload
v-model="modelValue.license"
:isShowTip="false"
:limit="1"
v-model="modelValue.license"
:isShowTip="false"
:limit="1"
/>
</el-form-item>
</el-col>
@ -325,7 +326,7 @@
:autosize="{ minRows: 2, maxRows: 6 }"
/> -->
<!-- v-else -->
<WangEditor v-model="modelValue.introduce" minHeight="150px" />
<WangEditor v-model="modelValue.introduce" minHeight="150px"/>
<!-- <Editor
v-else
v-model="modelValue.introduce"
@ -344,18 +345,18 @@ import CityOptions from "@/views/components/CityOptions";
import InputBoxAdd from "@/views/components/InputBoxAdd";
// import { researchSelect } from "@/api/dataList/research";
// import { laboratorySelect } from "@/api/dataList/laboratory";
import { tenantSelect } from "@/api/subPlatform/tenant";
import { enterpriseOptions } from "@/utils/parameter";
import { reactive, ref, toRefs } from "vue";
import {tenantSelect} from "@/api/subPlatform/tenant";
import {educationOptions, enterpriseOptions} from "@/utils/parameter";
import {reactive, ref, toRefs} from "vue";
import WangEditor from "@/components/WangEditor/index.vue";
// import SiteOptions from "@/views/components/SiteOptions";
import FieldOptions from "@/views/components/FieldOptions";
import { casLaboratoryList } from "@/api/dataList/laboratory";
import {casLaboratoryList} from "@/api/dataList/laboratory";
import InfiniteSelect from "@/components/InfiniteSelect";
import { researchList } from "@/api/dataList/research";
import {researchList} from "@/api/dataList/research";
const props = defineProps({
modelValue: { type: Object },
modelValue: {type: Object},
isAdd: {
type: Boolean,
default: true,
@ -373,7 +374,7 @@ const props = defineProps({
default: 120,
},
});
const { formType, modelValue, labelWidth, showTitle, isAdd } = toRefs(props);
const {formType, modelValue, labelWidth, showTitle, isAdd} = toRefs(props);
const cityFormRef = ref(null);
const formRef = ref(null);
const keywordsFormRef = ref(null);
@ -385,10 +386,10 @@ const options = ref([]);
const siteList = ref([]);
const data = reactive({
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" }],
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: "请输入", trigger: "blur" },
// {
@ -397,7 +398,7 @@ const data = reactive({
// trigger: "blur",
// },
// ],
researchId: [{ message: "请选择", trigger: "change" }],
researchId: [{message: "请选择", trigger: "change"}],
tenantId: [
{
required: true,
@ -405,12 +406,12 @@ const data = reactive({
trigger: ["blur", "change"],
},
],
school: [{ required: true, message: "请输入", trigger: "blur" }],
organization: [{ required: true, message: "请输入", trigger: "blur" }],
education: [{ message: "请选择", trigger: "change" }],
school: [{required: true, message: "请输入", trigger: "blur"}],
organization: [{required: true, message: "请输入", trigger: "blur"}],
education: [{message: "请选择", trigger: "change"}],
// major: [{ required: true, message: "请输入", trigger: "blur" }],
// job: [{ required: true, message: "请输入", trigger: "blur" }],
title: [{ required: true, message: "请输入", trigger: "blur" }],
title: [{required: true, message: "请输入", trigger: "blur"}],
workTime: [
{
required: true,
@ -425,10 +426,10 @@ const data = reactive({
trigger: ["blur", "change"],
},
],
introduce: [{ required: true, message: "请输入", trigger: "blur" }],
introduce: [{required: true, message: "请输入", trigger: "blur"}],
},
});
const { rules } = toRefs(data);
const {rules} = toRefs(data);
const introduceName = computed(() => {
if (formType.value === 1) {
return "个人简介:";
@ -474,9 +475,9 @@ const validateForm = async () => {
//企业
// const directionsFormValid = await directionsFormRef.value.validateForm(); //生产方向验证
return (
formValid && cityFormValid && fieldFormValid
// keywordsFormValid &&
// directionsFormValid
formValid && cityFormValid && fieldFormValid
// keywordsFormValid &&
// directionsFormValid
);
} else {
throw "未知的formType";
@ -490,9 +491,9 @@ const getSiteList = async () => {
};
const loadLabOptions = (query) =>
casLaboratoryList({ ...query, examineStatus: "1" }).then((resp) => resp.rows);
casLaboratoryList({...query, examineStatus: "1"}).then((resp) => resp.rows);
const loadResearchOptions = (query) =>
researchList({ ...query, examineStatus: "1" }).then((resp) => resp.rows);
researchList({...query, examineStatus: "1"}).then((resp) => resp.rows);
getSiteList();
defineExpose({
validateForm,

View File

@ -75,7 +75,11 @@
<div>{{ row.industryStr }}</div>
</template>
</el-table-column>
<el-table-column align="center" label="学历" prop="education" />
<el-table-column align="center" label="学历" prop="education">
<template #default="{row}">
{{ educationOptions.find((el) => el.key === row.education)?.text ?? "无" }}
</template>
</el-table-column>
<!-- <el-table-column label="备注" align="center" prop="introduce" /> -->
<!-- <el-table-column label="站点" align="center">
<template #default="{ row }">
@ -274,6 +278,7 @@ import { blobValidate } from "@/utils/ruoyi";
import { ElLoading, ElMessage, ElMessageBox } from "element-plus";
import dayjs from "dayjs";
import request from "@/utils/request";
import {educationOptions} from "../../../utils/parameter";
const router = useRouter();
// const siteList = ref([]);

View File

@ -44,7 +44,11 @@
<div>{{ row.industryStr }}</div>
</template>
</el-table-column>
<el-table-column align="center" label="学历" prop="education" />
<el-table-column align="center" label="学历" prop="education">
<template #default="{row}">
{{ educationOptions.find((el) => el.key === row.education)?.text ?? "无" }}
</template>
</el-table-column>
<el-table-column align="center" label="个人备注" show-overflow-tooltip>
<template #default="{ row }">
<div v-html="row.introduce"></div>
@ -86,6 +90,7 @@ import useUserStore from "@/store/modules/user";
import DictTag from "@/components/DictTag/index.vue";
import { auditStatusDict } from "@/constant/dict";
import { reactive, ref, toRefs } from "vue";
import {educationOptions} from "../../../utils/parameter";
const router = useRouter();
const data = reactive({