This commit is contained in:
2023-06-13 13:40:54 +08:00
parent ead6700f2c
commit ef579def81
208 changed files with 22380 additions and 19469 deletions

View File

@ -1,7 +1,7 @@
<template>
<div class="app-container">
<el-card shadow="always" style="width: 55%; margin: 0 auto">
<agent-form ref="agentFormRef" v-model="form" is-add/>
<agent-form ref="agentFormRef" v-model="form" is-add />
<div :style="{ marginLeft: labelWidth + 'px' }">
<el-button @click="$router.go(-1)">取消</el-button>
<el-button type="primary" @click="submitForm">提交</el-button>
@ -10,32 +10,30 @@
</div>
</template>
<script setup>
import AgentForm from '@/views/components/AgentForm'
import {reactive, ref, toRefs} from "vue";
import AgentForm from "@/views/components/AgentForm";
import { reactive, ref, toRefs } from "vue";
const props = defineProps({
labelWidth: {
type: Number,
default: 120
}
})
default: 120,
},
});
const data = reactive({
form: {
industrys: [],
id_image: {}
}
})
const {form} = toRefs(data)
const agentFormRef = ref()
id_image: {},
},
});
const { form } = toRefs(data);
const agentFormRef = ref();
const submitForm = async () => {
if (!agentFormRef.value) return
const valid = await agentFormRef.value.validateForm()
if (!agentFormRef.value) return;
const valid = await agentFormRef.value.validateForm();
if (valid) {
// TODO: submit agent
}
}
};
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>

View File

@ -19,7 +19,7 @@ import { insertCasExpert } from "@/api/identity";
import ExpertForm from "@/views/components/ExpertForm";
import { ElMessage } from "element-plus";
import { useRouter } from "vue-router";
import {reactive, ref} from "vue";
import { reactive, ref } from "vue";
const router = useRouter();
const labelWidth = 140;

View File

@ -2,20 +2,24 @@
<div v-if="identityList.length" class="app-container">
<el-row>
<el-col :span="2">
<el-button :icon="ArrowLeftBold" plain round size="small" type="primary" @click="backToHome"
>返回
</el-button
>
</el-col
>
<el-button
:icon="ArrowLeftBold"
plain
round
size="small"
type="primary"
@click="backToHome"
>返回
</el-button>
</el-col>
<el-col :span="22">
<el-alert
:style="{
:style="{
marginBottom: `10px`,
}"
show-icon
title="温馨提示:如是企业请入驻企业后台,专家请入驻专家后台,并完善资料"
type="warning"
show-icon
title="温馨提示:如是企业请入驻企业后台,专家请入驻专家后台,并完善资料"
type="warning"
></el-alert>
</el-col>
</el-row>
@ -23,25 +27,25 @@
<el-row :gutter="20" justify="center">
<!-- v-show="item.id <= 2"-->
<el-col
v-for="item in identityList"
:key="item.id"
:span="4"
@click="handleStatus(item)"
v-for="item in identityList"
:key="item.id"
:span="4"
@click="handleStatus(item)"
>
<el-card style="text-align: center; height: 100%">
<el-image
fit="cover"
src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg"
style="height: 100px"
fit="cover"
src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg"
style="height: 100px"
></el-image>
<h3>{{ `${item.title}入驻` }}</h3>
<p v-if="item.status === '0'">审核中</p>
<div v-else-if="item.status === '2'">
<p class="text-danger">审核拒绝</p>
<p
class="text-navy"
style="cursor: pointer"
@click.stop="reason(item)"
class="text-navy"
style="cursor: pointer"
@click.stop="reason(item)"
>
查看拒绝原因
</p>
@ -57,17 +61,12 @@
<el-card class="mt20" shadow="always">
<el-row :gutter="20" justify="center">
<!-- v-show="item.id <= 2"-->
<el-col
v-for="item in identityList"
:key="item.id"
:span="4"
>
<el-col v-for="item in identityList" :key="item.id" :span="4">
<el-card style="text-align: center; height: 100%">
<el-image
fit="cover"
src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg"
style="height: 100px"
fit="cover"
src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg"
style="height: 100px"
></el-image>
<h3>{{ `${item.title}后台` }}</h3>
<p v-if="item.status === '1'">
@ -82,13 +81,13 @@
</template>
<script setup>
// import store from "@/store";
import {identity} from "@/api/identity";
import {useRouter} from "vue-router";
import { identity } from "@/api/identity";
import { useRouter } from "vue-router";
import usePermissionStore from "@/store/modules/permission";
import useUserStore from "@/store/modules/user";
import {ElMessageBox} from "element-plus";
import {ArrowLeftBold} from "@element-plus/icons-vue";
import {onMounted, ref} from "vue";
import { ElMessageBox } from "element-plus";
import { ArrowLeftBold } from "@element-plus/icons-vue";
import { onMounted, ref } from "vue";
const router = useRouter();
@ -109,11 +108,13 @@ const identityDict = {
};
onMounted(() => {
identity().then((res) => {
identityList.value = res.data.map(item => ({
id: item.roleId,
title: identityDict[item.roleId],
status: item.status,
})).slice(0, 5)
identityList.value = res.data
.map((item) => ({
id: item.roleId,
title: identityDict[item.roleId],
status: item.status,
}))
.slice(0, 5);
});
});
@ -123,7 +124,7 @@ function reason(item) {
function noClicking() {
return identityList.value.some(
(item) => item.status === "0" || item.status === "1"
(item) => item.status === "0" || item.status === "1"
);
}
@ -140,19 +141,19 @@ function handleStatus(item) {
if (item.status === "4" || item.status === "2") {
if (item.id === 1) {
// 企业
router.push({path: "/identity/enterprise"});
router.push({ path: "/identity/enterprise" });
} else if (item.id === 2) {
// 专家
router.push({path: "/identity/expert"});
router.push({ path: "/identity/expert" });
} else if (item.id === 3) {
// 实验室
router.push({path: "/identity/laboratory"});
router.push({ path: "/identity/laboratory" });
} else if (item.id === 4) {
// 研究机构
router.push({path: "/identity/research"});
router.push({ path: "/identity/research" });
} else if (item.id === 5) {
// 科技经纪人
router.push({path: "/identity/agent"});
router.push({ path: "/identity/agent" });
}
} else if (item.status === 1) {
alert("您已入驻,请进入后台");
@ -164,19 +165,19 @@ const handlePage = async (item) => {
let routeData = "";
if (item.id === 1) {
// 企业
routeData = router.resolve({path: "/admin"});
routeData = router.resolve({ path: "/admin" });
} else if (item.id === 2) {
// 专家
routeData = router.resolve({path: "/admin"});
routeData = router.resolve({ path: "/admin" });
} else if (item.id === 3) {
// 研究机构
routeData = router.resolve({path: "/admin"});
routeData = router.resolve({ path: "/admin" });
} else if (item.id === 4) {
// 实验室
routeData = router.resolve({path: "/admin"});
routeData = router.resolve({ path: "/admin" });
} else if (item.id === 5) {
// 科技经纪人
routeData = router.resolve({path: "/five"});
routeData = router.resolve({ path: "/five" });
}
// return window.open(routeData.href, "_blank");
// TODO ...... 切换身份待处理

View File

@ -1,7 +1,7 @@
<template>
<div class="app-container">
<el-card shadow="always" style="width: 55%; margin: 0 auto">
<laboratory-form ref="laboratoryFormRef" v-model="form" is-add/>
<laboratory-form ref="laboratoryFormRef" v-model="form" is-add />
<div :style="{ marginLeft: labelWidth + 'px' }">
<el-button @click="$router.go(-1)">取消</el-button>
<el-button type="primary" @click="submitForm">提交</el-button>
@ -10,41 +10,40 @@
</div>
</template>
<script setup>
import {insertLaboratory} from '@/api/identity'
import LaboratoryForm from '@/views/components/LaboratoryForm'
import {reactive, ref, toRefs} from "vue";
import {ElMessage} from "element-plus";
import {useRouter} from "vue-router";
import { insertLaboratory } from "@/api/identity";
import LaboratoryForm from "@/views/components/LaboratoryForm";
import { reactive, ref, toRefs } from "vue";
import { ElMessage } from "element-plus";
import { useRouter } from "vue-router";
const props = defineProps({
labelWidth: {
type: Number,
default: 120
}
})
const router = useRouter()
default: 120,
},
});
const router = useRouter();
const data = reactive({
form: {researchs: []}
})
const {form} = toRefs(data)
const laboratoryFormRef = ref()
form: { researchs: [] },
});
const { form } = toRefs(data);
const laboratoryFormRef = ref();
const submitForm = async () => {
if (!laboratoryFormRef.value) return
const valid = await laboratoryFormRef.value.validateForm()
if (!laboratoryFormRef.value) return;
const valid = await laboratoryFormRef.value.validateForm();
if (valid) {
try {
form.value.researchDirection = form.value.researchs?.join(",") ?? null
await insertLaboratory(form.value)
form.value.researchDirection = form.value.researchs?.join(",") ?? null;
form.value.keyword = form.value.keywords?.join(",") ?? null;
await insertLaboratory(form.value);
router.go(-1);
ElMessage.success("已申请实验室入驻")
ElMessage.success("已申请实验室入驻");
} catch (e) {
console.error(e)
console.error(e);
// ElMessage.error("申请入驻失败")
}
}
}
};
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>

View File

@ -1,3 +1,3 @@
<template>
<router-view></router-view>
</template>
</template>

View File

@ -1,40 +1,46 @@
<template>
<div class="app-container">
<el-card shadow="always" style="width: 55%; margin: 0 auto">
<research-form ref="researchFormRef" v-model="form" is-add/>
<research-form ref="researchFormRef" v-model="form" is-add />
<div :style="{ marginLeft: labelWidth + 'px' }">
<el-button @click="$router.go(-1)">取消</el-button>
<el-button @click="router.push('/identity/index')">取消</el-button>
<el-button type="primary" @click="submitForm">提交</el-button>
</div>
</el-card>
</div>
</template>
<script setup>
import ResearchForm from '@/views/components/ResearchForm'
import {reactive, ref, toRefs} from "vue";
import ResearchForm from "@/views/components/ResearchForm";
import { reactive, ref, toRefs } from "vue";
import { insertResearch } from "@/api/identity";
import { ElMessage } from "element-plus";
import { useRouter } from "vue-router";
const router = useRouter();
const props = defineProps({
labelWidth: {
type: Number,
default: 120
}
})
default: 120,
},
});
const data = reactive({
form: {
industrys: [],
}
})
const {form} = toRefs(data)
const researchFormRef = ref()
form: {},
});
const { form } = toRefs(data);
const researchFormRef = ref();
const submitForm = async () => {
if (!researchFormRef.value) return
const valid = await researchFormRef.value.validateForm()
if (!researchFormRef.value) return;
const valid = await researchFormRef.value.validateForm();
if (valid) {
// TODO: submit laboratory
insertResearch(form.value).then((resp) => {
ElMessage.success("申请入驻成功");
router.push("/identity/index");
});
} else {
console.log("verify failed");
}
}
};
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>