部署前

This commit is contained in:
熊丽君
2022-03-11 13:45:24 +08:00
parent 0a6bb779d2
commit 8fb72b113b
23 changed files with 1940 additions and 16 deletions

42
src/api/dataList/agent.js Normal file
View File

@ -0,0 +1,42 @@
import request from '@/utils/request'
// 经纪人列表
export function agentList(data) {
return request({
url: '/admin/v1/manage/agent',
method: 'post',
data,
})
}
// 经纪人信息添加
export function agentAdd(data) {
return request({
url: '/admin/v1/manage/agent/add',
method: 'post',
data,
})
}
// 经纪人详细信息
export function agentDetail(data) {
return request({
url: '/admin/v1/manage/agent/detail',
method: 'post',
data,
})
}
// 经纪人信息修改
export function agentEdit(data) {
return request({
url: '/admin/v1/manage/agent/edit',
method: 'post',
data,
})
}
// 经纪人审核操作
export function agentExamine(data) {
return request({
url: '/admin/v1/manage/agent/examine',
method: 'post',
data,
})
}

View File

@ -8,3 +8,44 @@ export function laboratorySelect(data) {
data,
})
}
// 实验室列表
export function laboratoryList(data) {
return request({
url: '/admin/v1/manage/laboratory',
method: 'post',
data,
})
}
// // 实验室信息添加
// export function laboratoryAdd(data) {
// return request({
// url: '/admin/v1/manage/laboratory/add',
// method: 'post',
// data,
// })
// }
// 实验室详细信息
export function laboratoryDetail(data) {
return request({
url: '/admin/v1/manage/laboratory/detail',
method: 'post',
data,
})
}
// 实验室信息修改
export function laboratoryEdit(data) {
return request({
url: '/admin/v1/manage/laboratory/edit',
method: 'post',
data,
})
}
// 实验室审核操作
export function laboratoryExamine(data) {
return request({
url: '/admin/v1/manage/laboratory/examine',
method: 'post',
data,
})
}

View File

@ -83,3 +83,11 @@ export function tenantAuthBind(data) {
data,
})
}
export function userBasic(data) {
return request({
url: '/admin/v1/user/basic',
method: 'post',
data,
})
}

View File

@ -81,6 +81,19 @@
background-color: unset !important;
}
}
// 如需首页需要显示当前选中效果 需要将注释解开
// .submenu-title-noDropdown.is-active {
// background-color: #f2f5fe !important;
// &::after {
// content: '';
// position: absolute;
// top: 0;
// right: 0;
// width: 4px;
// height: 100%;
// background-color: #0054ff;
// }
// }
& .theme-dark .is-active > .el-submenu__title {
color: $base-menu-color-active !important;

View File

@ -94,6 +94,8 @@ export default {
// 然后将数组转为对象数组
this.fileList = list.map((item) => {
if (typeof item === "string") {
if (process.env.NODE_ENV !== "development")
return (item = { name: item, url: item });
if (item.indexOf(this.baseUrl) === -1) {
item = { name: this.baseUrl + item, url: this.baseUrl + item };
} else {

View File

@ -45,10 +45,10 @@
<!-- <router-link to="/user/profile">
<el-dropdown-item>个人中心</el-dropdown-item>
</router-link> -->
<el-dropdown-item @click.native="setting = true">
<!-- <el-dropdown-item @click.native="setting = true">
<span>布局设置</span>
</el-dropdown-item>
<el-dropdown-item divided @click.native="logout">
</el-dropdown-item> -->
<el-dropdown-item @click.native="logout">
<span>退出登录</span>
</el-dropdown-item>
</el-dropdown-menu>

View File

@ -17,7 +17,7 @@ module.exports = {
/**
* 是否显示 tagsView
*/
tagsView: true,
tagsView: false,
/**
* 是否固定头部

View File

@ -0,0 +1,267 @@
<template>
<el-form
ref="form"
:model="value"
:rules="rules"
:label-width="labelWidth + 'px'"
>
<div class="form_title" v-if="showTitle">基本信息</div>
<el-row>
<el-col :span="24">
<el-form-item label="姓名:" prop="name">
<el-input
v-model="value.name"
:disabled="isAdd ? false : true"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="手机号:" prop="mobile">
<el-input
v-model="value.mobile"
:disabled="isAdd ? false : true"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="身份证号:" prop="id_card">
<el-input
v-model="value.id_card"
:disabled="isAdd ? false : true"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="工作所在地:" prop="work_place">
<el-input v-model="value.work_place" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="工作经历:" prop="work_experience">
<el-input
v-model="value.work_experience"
type="textarea"
:autosize="{ minRows: 2, maxRows: 6 }"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="所属站点:" prop="tenant_id">
<SiteOptions :size="''" :limitWidth="false" v-model="value" />
</el-form-item>
</el-col>
</el-row>
<!-- <FieldOptions v-model="value" :labelWidth="labelWidth" ref="fieldForm" /> -->
<InputBoxAdd
:labelWidth="labelWidth"
v-model="value"
title="擅长领域"
placeholder="请输入擅长领域"
fieldKey="researchs"
ref="researchsForm"
/>
<InputBoxAdd
:labelWidth="labelWidth"
v-model="value"
title="关键词"
placeholder="应用场景关键词+技术产品关键词"
fieldKey="keywords"
ref="keywordsForm"
/>
<el-row>
<el-col :span="24">
<el-form-item label="身份证:" required>
<el-row :gutter="20" type="flex" justify="space-between">
<el-col :span="8">
<el-form-item prop="id_image.front">
<ImageUpload
v-model="value.id_image.front"
:isShowTip="false"
:limit="1"
/>
</el-form-item>
<div style="text-align: center">身份证人像面</div>
</el-col>
<el-col :span="8">
<el-form-item prop="id_image.behind">
<ImageUpload
v-model="value.id_image.behind"
:isShowTip="false"
:limit="1"
/>
</el-form-item>
<div style="text-align: center">身份证国徽面</div>
</el-col>
<el-col :span="8">
<el-form-item prop="id_image.hold">
<ImageUpload
v-model="value.id_image.hold"
:isShowTip="false"
:limit="1"
/>
</el-form-item>
<div style="text-align: center">手持身份证人像面</div>
</el-col>
</el-row>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="成果经纪资格证书:" prop="credential_image">
<el-row :gutter="20" type="flex" justify="space-between">
<el-col :span="8">
<ImageUpload
v-model="value.credential_image"
:isShowTip="false"
:limit="1"
/>
</el-col>
</el-row>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<script>
import CityOptions from "@/views/components/CityOptions";
import FieldOptions from "@/views/components/FieldOptions";
import InputBoxAdd from "@/views/components/InputBoxAdd";
import { researchSelect } from "@/api/dataList/research";
import { laboratorySelect } from "@/api/dataList/laboratory";
export default {
components: {
CityOptions,
FieldOptions,
InputBoxAdd,
},
props: {
value: Object,
isAdd: {
type: Boolean,
default: true,
},
showTitle: {
type: Boolean,
default: false,
},
formType: {
type: Number,
default: 1,
},
labelWidth: {
type: Number,
default: 120,
},
},
data() {
return {
researchOptions: [],
rules: {
name: [{ required: true, message: "请输入", trigger: "blur" }],
mobile: [
{ required: true, message: "请输入", trigger: "blur" },
{
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
message: "请输入正确的手机号码",
trigger: "blur",
},
],
id_card: [{ required: true, message: "请输入", trigger: "blur" }],
work_place: [{ required: true, message: "请输入", trigger: "blur" }],
work_experience: [
{ required: true, message: "请输入", trigger: "blur" },
],
tenant_id: [
{
required: true,
message: "请选择",
trigger: ["blur", "change"],
},
],
"id_image.front": [
{
required: true,
message: "请上传",
trigger: ["blur", "change"],
},
],
"id_image.behind": [
{
required: true,
message: "请上传",
trigger: ["blur", "change"],
},
],
"id_image.hold": [
{
required: true,
message: "请上传",
trigger: ["blur", "change"],
},
],
},
};
},
methods: {
submitForm() {
let flag = false;
this.$refs["form"].validate((valid) => {
const keywordsForm = this.$refs.keywordsForm.submitForm(); // 关键词
const researchsForm = this.$refs.researchsForm.submitForm(); // 研究方向
if (valid && keywordsForm && researchsForm) {
flag = !flag;
}
});
return flag;
},
},
};
</script>
<style lang="scss" scoped>
.form_title {
font-weight: 700;
margin-bottom: 30px;
}
::v-deep .el-upload--picture-card {
width: 100%;
}
::v-deep .hide {
height: 148px;
}
::v-deep .el-upload-list--picture-card .el-upload-list__item {
width: 100%;
}
// 上传图片框限制
// ::v-deep .el-upload--picture-card {
// width: 120px;
// height: 120px;
// line-height: 120px;
// }
.el-select,
.el-date-editor {
display: block;
width: 100%;
}
</style>

View File

@ -234,7 +234,7 @@
<el-row v-if="formType == 2">
<el-col :span="24">
<el-form-item label="邀请码:">
<el-input v-model="value.inviter_code" disabled></el-input>
<el-input v-model="value.inviter_code" :disabled="!isAdd"></el-input>
</el-form-item>
</el-col>
<el-col :span="24">

View File

@ -0,0 +1,259 @@
<template>
<el-form
ref="form"
:model="value"
:rules="rules"
:label-width="labelWidth + 'px'"
>
<div class="form_title" v-if="showTitle">基本信息</div>
<el-row>
<el-col :span="24">
<el-form-item label="实验室名称" prop="name">
<el-input v-model="value.name" :disabled="!isAdd"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="组织机构代码:" prop="code">
<el-row type="flex" justify="space-between">
<el-col :span="20">
<el-input v-model="value.code" :disabled="!isAdd"></el-input>
</el-col>
<el-col :span="3">
<el-button type="primary" @click="" :disabled="!isAdd"
>查找</el-button
>
</el-col>
</el-row>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="所属站点:" prop="tenant_id">
<SiteOptions :size="''" :limitWidth="false" v-model="value" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="所属单位:" prop="research_id">
<el-select
v-model="value.research_id"
filterable
placeholder="请选择"
>
<el-option
v-for="item in researchOptions"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<CityOptions v-model="value" :labelWidth="labelWidth" ref="cityForm" />
<el-row>
<el-col :span="24">
<el-form-item label="详细地址:">
<el-input
v-model="value.address"
placeholder="请输入详细地址"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="实验室网站:">
<el-input
v-model="value.url"
placeholder="请输入实验室网站"
></el-input>
</el-form-item>
</el-col>
</el-row>
<FieldOptions v-model="value" :labelWidth="labelWidth" ref="fieldForm" />
<!-- <FieldSingle
v-model="value"
:isAdd="isAdd"
:labelWidth="labelWidth"
ref="fieldForm"
/> -->
<InputBoxAdd
:labelWidth="labelWidth"
v-model="value"
title="关键词"
placeholder="应用场景关键词+技术产品关键词"
fieldKey="keywords"
ref="keywordsForm"
/>
<InputBoxAdd
:labelWidth="labelWidth"
v-model="value"
title="研究方向"
placeholder="请输入研究方向"
fieldKey="researchs"
ref="directionsForm"
/>
<el-row>
<el-col :span="24">
<el-form-item label="实验室简介" prop="introduce">
<Editor
v-model="value.introduce"
:minHeight="150"
ref="introduceRef"
@click.native="handleEditAble"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<script>
import CityOptions from "@/views/components/CityOptions";
import FieldSingle from "@/views/components/FieldSingle";
import FieldOptions from "@/views/components/FieldOptions";
import InputBoxAdd from "@/views/components/InputBoxAdd";
import { researchSelect } from "@/api/dataList/research";
export default {
components: {
CityOptions,
FieldSingle,
FieldOptions,
InputBoxAdd,
},
props: {
value: Object,
isAdd: {
type: Boolean,
default: true,
},
showTitle: {
type: Boolean,
default: false,
},
labelWidth: {
type: Number,
default: 120,
},
},
watch: {
"value.tenant_id"(newOld) {
console.log(newOld);
if (newOld) {
researchSelect({ tenant_id: newOld }).then(({ data }) => {
this.researchOptions = data;
});
} else {
this.researchOptions = [];
if (this.value.research_id) this.value.research_id = undefined;
}
},
},
data() {
return {
researchOptions: [],
options: [
// { value: "", label: "" }
],
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: "请输入", trigger: "blur" },
{
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
message: "请输入正确的手机号码",
trigger: "blur",
},
],
research_id: [{ required: true, message: "请选择", trigger: "change" }],
tenant_id: [
{
required: true,
message: "请选择",
trigger: ["blur", "change"],
},
],
school: [{ required: true, message: "请输入", trigger: "blur" }],
education: [{ required: true, message: "请选择", trigger: "change" }],
major: [{ required: true, message: "请输入", trigger: "blur" }],
job: [{ required: true, message: "请输入", trigger: "blur" }],
title: [{ required: true, message: "请输入", trigger: "blur" }],
work_at: [
{
required: true,
message: "从业时间不能为空",
trigger: ["change", "blur"],
},
],
license: [
{
required: true,
message: "请上传",
trigger: ["blur", "change"],
},
],
introduce: [{ required: true, message: "请输入", trigger: "blur" }],
},
};
},
mounted() {
this.$nextTick(() => {
this.$refs.introduceRef.Quill.enable(false);
});
},
methods: {
// 富文本聚焦
handleEditAble() {
this.$refs.introduceRef.Quill.enable(true);
this.$refs.introduceRef.Quill.focus();
},
submitForm() {
let flag = false;
this.$refs["form"].validate((valid) => {
const cityForm = this.$refs.cityForm.submitForm();
const fieldForm = this.$refs.fieldForm.submitForm();
if (valid && cityForm && fieldForm) {
flag = !flag;
}
});
return flag;
},
},
};
</script>
<style lang="scss" scoped>
.form_title {
font-weight: 700;
margin-bottom: 30px;
}
// 上传图片框限制
// ::v-deep .el-upload--picture-card {
// width: 120px;
// height: 120px;
// line-height: 120px;
// }
.el-select,
.el-date-editor {
display: block;
width: 100%;
}
</style>

View File

@ -7,10 +7,10 @@
:inline="true"
@submit.native.prevent
>
<el-form-item label="子系统名称" prop="name">
<el-form-item label="基本配置名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入子系统名称"
placeholder="请输入基本配置名称"
clearable
size="small"
style="width: 240px"
@ -166,14 +166,14 @@ export default {
handleAdd() {
this.reset();
this.open = true;
this.title = "添加子系统";
this.title = "添加基本配置";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
this.form = Object.assign({}, row);
this.open = true;
this.title = "修改子系统";
this.title = "修改基本配置";
},
/** 提交按钮 - 修改名称普通数据 */
submitForm() {
@ -198,7 +198,7 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
this.$modal
.confirm('是否确认删除子系统名为"' + row.name + '"的数据项?')
.confirm('是否确认删除基本配置名为"' + row.name + '"的数据项?')
.then(function () {
return configDelete({ id: row.id });
})

View File

@ -0,0 +1,80 @@
<template>
<div class="app-container">
<div style="width: 50%">
<Agent
v-model="form"
:showTitle="true"
:formType="formType"
:labelWidth="labelWidth"
ref="agent"
/>
<!-- :isAdd="false" -->
</div>
<el-button @click="$router.go(-1)">取消</el-button>
<el-button type="primary" @click="submitForm">提交</el-button>
</div>
</template>
<script>
import Agent from "@/views/components/Agent";
import { agentAdd, agentDetail, agentEdit } from "@/api/dataList/agent";
export default {
components: {
Agent,
},
data() {
return {
formType: 2,
labelWidth: 140,
form: {
id: undefined,
name: undefined,
mobile: undefined,
id_card: undefined,
tenant_id: undefined,
work_experience: undefined, // 工作经验
work_place: undefined, // 工作地点
credential_image: undefined,
keywords: [],
researchs: [],
id_image: {
front: undefined,
behind: undefined,
hold: undefined,
},
},
};
},
methods: {
submitForm() {
if (this.$refs.agent.submitForm()) {
console.log(this.form);
return false;
// todo 不支持添加操作
if (this.form.id != undefined) {
agentEdit(this.form).then((response) => {
this.$store.dispatch("tagsView/delView", this.$route);
this.$router.go(-1);
this.$modal.msgSuccess("修改成功");
});
} else {
agentAdd(this.form).then((res) => {
this.$store.dispatch("tagsView/delView", this.$route);
this.$router.go(-1);
this.$modal.msgSuccess("新增成功");
});
}
} else {
console.log("校验未通过");
}
},
},
created() {
const { id } = this.$route.query;
if (id) {
agentDetail({ id }).then((res) => {
this.form = res.data;
});
}
},
};
</script>

View File

@ -0,0 +1,160 @@
<template>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryForm"
:inline="true"
label-width="85px"
>
<el-form-item label="实验室名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入实验室名称"
clearable
size="small"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="所属站点" prop="tenant_id" v-if="is_super">
<SiteOptions v-model="queryParams" />
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<!-- <el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增</el-button
>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row> -->
<el-table v-loading="loading" :data="dataList">
<el-table-column label="数据编号" align="center" prop="id" />
<el-table-column label="实验室名称" align="center" prop="name" />
<el-table-column label="研究机构" align="center" prop="research_name" />
<!-- <el-table-column label="研究方向" align="center" prop="code" />
<el-table-column
label="所属领域"
align="center"
prop="industrys"
show-overflow-tooltip
>
<template slot-scope="scope">
<div>{{ scope.row.industrys[scope.row.industrys.length - 1] }}</div>
</template>
</el-table-column> -->
<el-table-column label="站点" align="center" prop="area" />
<el-table-column label="所在地" align="center" prop="address" />
<el-table-column label="申请时间" align="center" prop="created_at">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.created_at) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleDetail(scope.row.id)"
>修改</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.page_num"
:limit.sync="queryParams.page_size"
@pagination="getList"
/>
</div>
</template>
<script>
import { agentList } from "@/api/dataList/agent";
export default {
data() {
return {
is_super: this.$store.getters.is_super,
showSearch: true,
// 遮罩层
loading: true,
// 总条数
total: 0,
// 实验室表格数据
dataList: null,
// 查询参数
queryParams: {
page_num: 1,
page_size: 10,
examine_status: 2,
name: undefined,
tenant_id: undefined,
},
};
},
methods: {
/** 查询实验室列表 */
getList() {
this.loading = true;
agentList(this.queryParams).then((response) => {
this.dataList = response.data.data;
this.total = response.data.count;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.page_num = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [];
this.resetForm("queryForm");
this.handleQuery();
},
handleAdd() {
this.$router.push({
path: "/dataList/agentAdd",
});
},
handleDetail(id) {
this.$router.push({
path: "/dataList/agentAdd",
query: { id },
});
},
},
created() {
this.getList();
},
};
</script>

View File

@ -0,0 +1,85 @@
<template>
<div class="app-container">
<div style="width: 50%">
<ExpertForm
v-model="form"
:showTitle="true"
:formType="formType"
:labelWidth="labelWidth"
ref="expertForm"
/>
<!-- :isAdd="false" -->
</div>
<el-button @click="$router.go(-1)">取消</el-button>
<el-button type="primary" @click="submitForm">提交</el-button>
</div>
</template>
<script>
import ExpertForm from "@/views/components/ExpertForm";
import {
companyAdd,
companyDetail,
companyEdit,
} from "@/api/dataList/enterprise";
export default {
components: {
ExpertForm,
},
data() {
return {
formType: 2,
labelWidth: 140,
form: {
image: undefined,
name: undefined,
tenant_id: undefined,
province: undefined, // 省code
city: undefined, // 市code
district: undefined, // 区code
address: undefined, // 详细地址
product: undefined,
kind: undefined,
code: undefined,
inviter_code: undefined,
url: undefined,
industrys: [],
keywords: [],
directions: [],
introduce: undefined,
license: undefined,
},
};
},
methods: {
submitForm() {
if (this.$refs.expertForm.submitForm()) {
console.log(this.form);
// todo... 提交出错
if (this.form.id != undefined) {
companyEdit(this.form).then((response) => {
this.$store.dispatch("tagsView/delView", this.$route);
this.$router.go(-1);
this.$modal.msgSuccess("修改成功");
});
} else {
companyAdd(this.form).then((res) => {
this.$store.dispatch("tagsView/delView", this.$route);
this.$router.go(-1);
this.$modal.msgSuccess("新增成功");
});
}
} else {
console.log("校验未通过");
}
},
},
created() {
const { id } = this.$route.query;
if (id) {
companyDetail({ id }).then((res) => {
this.form = res.data;
});
}
},
};
</script>

View File

@ -0,0 +1,166 @@
<template>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryForm"
:inline="true"
label-width="68px"
>
<el-form-item label="企业名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入企业名称"
clearable
size="small"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="所属站点" prop="tenant_id" v-if="is_super">
<SiteOptions v-model="queryParams" />
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增</el-button
>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="dataList">
<el-table-column label="数据编号" align="center" prop="id" />
<el-table-column label="企业名称" align="center" prop="name" />
<el-table-column label="统一社会信用代码" align="center" prop="code" />
<el-table-column
label="所属领域"
align="center"
prop="industrys"
show-overflow-tooltip
>
<template slot-scope="scope">
<div>{{ scope.row.industrys[scope.row.industrys.length - 1] }}</div>
</template>
</el-table-column>
<el-table-column label="站点" align="center" prop="area" />
<el-table-column label="所在地" align="center" prop="address" />
<el-table-column label="企业类型" align="center" prop="kind">
<template slot-scope="scope">
<div>
{{ enterpriseOptions.find((e) => scope.row.kind == e.key).value }}
</div>
</template>
</el-table-column>
<el-table-column label="申请时间" align="center" prop="created_at">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.created_at) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleDetail(scope.row.id)"
>修改</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.page_num"
:limit.sync="queryParams.page_size"
@pagination="getList"
/>
</div>
</template>
<script>
import { companyList } from "@/api/dataList/enterprise";
export default {
data() {
return {
is_super: this.$store.getters.is_super,
showSearch: true,
// 遮罩层
loading: true,
// 总条数
total: 0,
// 企业表格数据
dataList: null,
// 查询参数
queryParams: {
page_num: 1,
page_size: 10,
examine_status: 2,
name: undefined,
tenant_id: undefined,
},
};
},
methods: {
/** 查询企业列表 */
getList() {
this.loading = true;
companyList(this.queryParams).then((response) => {
this.dataList = response.data.data;
this.total = response.data.count;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.page_num = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [];
this.resetForm("queryForm");
this.handleQuery();
},
handleAdd() {
this.$router.push({
path: "/dataList/enterpriseAdd",
});
},
handleDetail(id) {
this.$router.push({
path: "/dataList/enterpriseAdd",
query: { id },
});
},
},
created() {
this.getList();
},
};
</script>

View File

@ -0,0 +1,81 @@
<template>
<div class="app-container">
<div style="width: 50%">
<LaboratoryForm
v-model="form"
:showTitle="true"
:formType="formType"
:labelWidth="labelWidth"
ref="laboratoryForm"
/>
<!-- :isAdd="false" -->
</div>
<el-button @click="$router.go(-1)">取消</el-button>
<el-button type="primary" @click="submitForm">提交</el-button>
</div>
</template>
<script>
import LaboratoryForm from "@/views/components/LaboratoryForm";
import {
laboratoryAdd,
laboratoryDetail,
laboratoryEdit,
} from "@/api/dataList/laboratory";
export default {
components: {
LaboratoryForm,
},
data() {
return {
formType: 2,
labelWidth: 140,
form: {
id: undefined,
name: undefined,
tenant_id: undefined,
province: undefined, // 省code
city: undefined, // 市code
district: undefined, // 区code
address: undefined, // 详细地址
code: undefined,
url: undefined,
industrys: [],
keywords: [],
researchs: [],
research_id: undefined,
introduce: undefined,
},
};
},
methods: {
submitForm() {
if (this.$refs.laboratoryForm.submitForm()) {
console.log(this.form);
if (this.form.id != undefined) {
laboratoryEdit(this.form).then((response) => {
this.$store.dispatch("tagsView/delView", this.$route);
this.$router.go(-1);
this.$modal.msgSuccess("修改成功");
});
} else {
laboratoryAdd(this.form).then((res) => {
this.$store.dispatch("tagsView/delView", this.$route);
this.$router.go(-1);
this.$modal.msgSuccess("新增成功");
});
}
} else {
console.log("校验未通过");
}
},
},
created() {
const { id } = this.$route.query;
if (id) {
laboratoryDetail({ id }).then((res) => {
this.form = res.data;
});
}
},
};
</script>

View File

@ -0,0 +1,164 @@
<template>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryForm"
:inline="true"
label-width="85px"
>
<el-form-item label="实验室名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入实验室名称"
clearable
size="small"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="所属站点" prop="tenant_id" v-if="is_super">
<SiteOptions v-model="queryParams" />
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增</el-button
>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="dataList">
<el-table-column label="数据编号" align="center" prop="id" />
<el-table-column label="实验室名称" align="center" prop="name" />
<el-table-column label="研究机构" align="center" prop="research_name" />
<el-table-column label="研究方向" align="center" prop="research">
<template slot-scope="scope">
<div>{{ scope.row.researchs.join(",") }}</div>
</template>
</el-table-column>
<el-table-column
label="所属领域"
align="center"
prop="industrys"
show-overflow-tooltip
>
<template slot-scope="scope">
<div>{{ scope.row.industrys[scope.row.industrys.length - 1] }}</div>
</template>
</el-table-column>
<el-table-column label="站点" align="center" prop="area" />
<el-table-column label="所在地" align="center" prop="address" />
<el-table-column label="申请时间" align="center" prop="created_at">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.created_at) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleDetail(scope.row.id)"
>修改</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.page_num"
:limit.sync="queryParams.page_size"
@pagination="getList"
/>
</div>
</template>
<script>
import { laboratoryList } from "@/api/dataList/laboratory";
export default {
data() {
return {
is_super: this.$store.getters.is_super,
showSearch: true,
// 遮罩层
loading: true,
// 总条数
total: 0,
// 实验室表格数据
dataList: null,
// 查询参数
queryParams: {
page_num: 1,
page_size: 10,
examine_status: 2,
name: undefined,
tenant_id: undefined,
},
};
},
methods: {
/** 查询实验室列表 */
getList() {
this.loading = true;
laboratoryList(this.queryParams).then((response) => {
this.dataList = response.data.data;
this.total = response.data.count;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.page_num = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [];
this.resetForm("queryForm");
this.handleQuery();
},
handleAdd() {
this.$router.push({
path: "/dataList/laboratoryAdd",
});
},
handleDetail(id) {
this.$router.push({
path: "/dataList/laboratoryAdd",
query: { id },
});
},
},
created() {
this.getList();
},
};
</script>

View File

@ -0,0 +1,107 @@
<template>
<div class="app-container">
<div style="width: 50%">
<LaboratoryForm v-model="form" :isAdd="false" ref="laboratoryForm" />
</div>
<el-button @click="submitForm(3)">审核拒绝</el-button>
<el-button type="primary" @click="submitForm(2)">审核通过</el-button>
</div>
</template>
<script>
import LaboratoryForm from "@/views/components/LaboratoryForm";
import {
laboratoryDetail,
laboratoryEdit,
laboratoryExamine,
} from "@/api/dataList/laboratory";
export default {
components: {
LaboratoryForm,
},
data() {
return {
form: {
image: undefined,
name: undefined,
code: undefined,
tenant_id: undefined,
province: undefined, // 省code
city: undefined, // 市code
district: undefined, // 区code
address: undefined, // 详细地址
industrys: [],
researchs: [],
license: undefined,
introduce: undefined,
},
};
},
methods: {
submitForm(status) {
console.log(this.form);
if (this.$refs.laboratoryForm.submitForm()) {
const str =
status == 2
? "<span style='color:green'>通过</span>"
: "<span class='el-message-box__errormsg'>拒绝</span>";
this.$prompt(`您将 ${str} 该数据审核,请输入处理备注`, "审核", {
dangerouslyUseHTMLString: true,
confirmButtonText: "确定",
cancelButtonText: "取消",
closeOnClickModal: false,
inputType: "textarea",
inputPattern: status == 2 ? "" : /^.{1,30}$/,
inputErrorMessage: "请输入拒绝原因",
})
.then(({ value }) => {
laboratoryEdit(this.form).then((res) => {
if (res.code == 200) {
const query = {
id: this.form.id,
status,
remark: value,
};
laboratoryExamine(query).then((res) => {
this.$store.dispatch("tagsView/delView", this.$route);
this.$router.go(-1);
this.$modal.msgSuccess("处理成功");
});
}
});
})
.catch(() => {});
} else {
console.log("校验未通过");
}
// this.$refs["form"].validate((valid) => {
// if (valid) {
// if (this.form.id != undefined) {
// serviceEdit(this.form).then((response) => {
// this.$modal.msgSuccess("修改成功");
// this.open = false;
// this.getList();
// });
// } else {
// serviceAdd(this.form).then((response) => {
// this.$modal.msgSuccess("新增成功");
// this.open = false;
// this.getList();
// });
// }
// }
// });
},
},
created() {
let { id } = this.$route.query;
if (!id) {
this.$message.error("无ID");
this.$router.go(-1);
return;
}
laboratoryDetail({ id }).then((res) => {
this.form = res.data;
});
},
};
</script>

View File

@ -0,0 +1,166 @@
<template>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryForm"
:inline="true"
label-width="68px"
>
<el-form-item label="姓名" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入经纪人姓名"
clearable
size="small"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="审核状态" prop="examine_status">
<el-select
v-model="queryParams.examine_status"
placeholder="请选择审核状态"
clearable
size="small"
style="width: 240px"
@clear="delete queryParams.examine_status"
>
<el-option label="审核中" :value="1" />
<el-option label="审核通过" :value="2" />
<el-option label="审核拒绝" :value="3" />
</el-select>
</el-form-item>
<el-form-item label="所属站点" prop="tenant_id" v-if="is_super">
<SiteOptions v-model="queryParams" />
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="dataList">
<el-table-column label="数据编号" align="center" prop="id" />
<el-table-column label="姓名" align="center" prop="name" />
<el-table-column label="手机号" align="center" prop="research_name" />
<el-table-column label="资格证书" prop="images" align="center">
<template slot-scope="scope">
<ImagePreview :width="50" :height="50" :src="scope.row.images" />
</template>
</el-table-column>
<el-table-column
label="擅长领域"
align="center"
prop="industrys"
show-overflow-tooltip
>
<template slot-scope="scope">
<div>{{ scope.row.industrys[scope.row.industrys.length - 1] }}</div>
</template>
</el-table-column>
<el-table-column label="站点" align="center" prop="area" />
<el-table-column label="审核状态" align="center" prop="examine_status">
<template slot-scope="scope">
<el-tag type="info" v-if="scope.row.examine_status == 1"
>审核中</el-tag
>
<el-tag type="success" v-else-if="scope.row.examine_status == 2"
>审核通过</el-tag
>
<el-tag type="danger" v-else>审核拒绝</el-tag>
</template>
</el-table-column>
<el-table-column label="申请时间" align="center" prop="created_at">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.created_at) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button
:disabled="scope.row.examine_status != 1"
size="mini"
type="text"
icon="el-icon-edit"
@click="handleDetail(scope.row.id)"
>审核</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.page_num"
:limit.sync="queryParams.page_size"
@pagination="getList"
/>
</div>
</template>
<script>
import { agentList } from "@/api/dataList/agent";
export default {
data() {
return {
is_super: this.$store.getters.is_super,
// 遮罩层
loading: true,
// 总条数
total: 0,
// 经纪人表格数据
dataList: null,
// 查询参数
queryParams: {
page_num: 1,
page_size: 10,
name: undefined,
examine_status: undefined,
tenant_id: undefined,
},
};
},
methods: {
/** 查询经纪人列表 */
getList() {
this.loading = true;
agentList(this.queryParams).then((response) => {
this.dataList = response.data.data;
this.total = response.data.count;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.page_num = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [];
this.resetForm("queryForm");
this.handleQuery();
},
handleDetail(id) {
this.$router.push({
path: "/examine/agentDetail",
query: { id },
});
},
},
created() {
this.getList();
},
};
</script>

View File

@ -0,0 +1,107 @@
<template>
<div class="app-container">
<div style="width: 50%">
<LaboratoryForm v-model="form" :isAdd="false" ref="laboratoryForm" />
</div>
<el-button @click="submitForm(3)">审核拒绝</el-button>
<el-button type="primary" @click="submitForm(2)">审核通过</el-button>
</div>
</template>
<script>
import LaboratoryForm from "@/views/components/LaboratoryForm";
import {
laboratoryDetail,
laboratoryEdit,
laboratoryExamine,
} from "@/api/dataList/laboratory";
export default {
components: {
LaboratoryForm,
},
data() {
return {
form: {
image: undefined,
name: undefined,
code: undefined,
tenant_id: undefined,
province: undefined, // 省code
city: undefined, // 市code
district: undefined, // 区code
address: undefined, // 详细地址
industrys: [],
researchs: [],
license: undefined,
introduce: undefined,
},
};
},
methods: {
submitForm(status) {
console.log(this.form);
if (this.$refs.laboratoryForm.submitForm()) {
const str =
status == 2
? "<span style='color:green'>通过</span>"
: "<span class='el-message-box__errormsg'>拒绝</span>";
this.$prompt(`您将 ${str} 该数据审核,请输入处理备注`, "审核", {
dangerouslyUseHTMLString: true,
confirmButtonText: "确定",
cancelButtonText: "取消",
closeOnClickModal: false,
inputType: "textarea",
inputPattern: status == 2 ? "" : /^.{1,30}$/,
inputErrorMessage: "请输入拒绝原因",
})
.then(({ value }) => {
laboratoryEdit(this.form).then((res) => {
if (res.code == 200) {
const query = {
id: this.form.id,
status,
remark: value,
};
laboratoryExamine(query).then((res) => {
this.$store.dispatch("tagsView/delView", this.$route);
this.$router.go(-1);
this.$modal.msgSuccess("处理成功");
});
}
});
})
.catch(() => {});
} else {
console.log("校验未通过");
}
// this.$refs["form"].validate((valid) => {
// if (valid) {
// if (this.form.id != undefined) {
// serviceEdit(this.form).then((response) => {
// this.$modal.msgSuccess("修改成功");
// this.open = false;
// this.getList();
// });
// } else {
// serviceAdd(this.form).then((response) => {
// this.$modal.msgSuccess("新增成功");
// this.open = false;
// this.getList();
// });
// }
// }
// });
},
},
created() {
let { id } = this.$route.query;
if (!id) {
this.$message.error("无ID");
this.$router.go(-1);
return;
}
laboratoryDetail({ id }).then((res) => {
this.form = res.data;
});
},
};
</script>

View File

@ -0,0 +1,167 @@
<template>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryForm"
:inline="true"
label-width="68px"
>
<el-form-item label="机构名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入机构名称"
clearable
size="small"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="审核状态" prop="examine_status">
<el-select
v-model="queryParams.examine_status"
placeholder="请选择审核状态"
clearable
size="small"
style="width: 240px"
@clear="delete queryParams.examine_status"
>
<el-option label="审核中" :value="1" />
<el-option label="审核通过" :value="2" />
<el-option label="审核拒绝" :value="3" />
</el-select>
</el-form-item>
<el-form-item label="所属站点" prop="tenant_id" v-if="is_super">
<SiteOptions v-model="queryParams" />
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="dataList">
<el-table-column label="数据编号" align="center" prop="id" />
<el-table-column label="实验室名称" align="center" prop="name" />
<el-table-column label="研究机构" align="center" prop="research_name" />
<el-table-column label="研究方向" align="center" prop="research">
<template slot-scope="scope">
<div>{{ scope.row.researchs.join(",") }}</div>
</template>
</el-table-column>
<el-table-column
label="所属领域"
align="center"
prop="industrys"
show-overflow-tooltip
>
<template slot-scope="scope">
<div>{{ scope.row.industrys[scope.row.industrys.length - 1] }}</div>
</template>
</el-table-column>
<el-table-column label="站点" align="center" prop="area" />
<el-table-column label="所在地" align="center" prop="address" />
<el-table-column label="审核状态" align="center" prop="examine_status">
<template slot-scope="scope">
<el-tag type="info" v-if="scope.row.examine_status == 1"
>审核中</el-tag
>
<el-tag type="success" v-else-if="scope.row.examine_status == 2"
>审核通过</el-tag
>
<el-tag type="danger" v-else>审核拒绝</el-tag>
</template>
</el-table-column>
<el-table-column label="申请时间" align="center" prop="created_at">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.created_at) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button
:disabled="scope.row.examine_status != 1"
size="mini"
type="text"
icon="el-icon-edit"
@click="handleDetail(scope.row.id)"
>审核</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.page_num"
:limit.sync="queryParams.page_size"
@pagination="getList"
/>
</div>
</template>
<script>
import { laboratoryList } from "@/api/dataList/laboratory";
export default {
data() {
return {
is_super: this.$store.getters.is_super,
// 遮罩层
loading: true,
// 总条数
total: 0,
// 机构表格数据
dataList: null,
// 查询参数
queryParams: {
page_num: 1,
page_size: 10,
name: undefined,
examine_status: undefined,
tenant_id: undefined,
},
};
},
methods: {
/** 查询机构列表 */
getList() {
this.loading = true;
laboratoryList(this.queryParams).then((response) => {
this.dataList = response.data.data;
this.total = response.data.count;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.page_num = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [];
this.resetForm("queryForm");
this.handleQuery();
},
handleDetail(id) {
this.$router.push({
path: "/examine/laboratoryDetail",
query: { id },
});
},
},
created() {
this.getList();
},
};
</script>

View File

@ -230,9 +230,13 @@
label-width="100px"
>
<el-form-item label="登陆账号:" prop="mobile">
<el-input v-model="memberForm.mobile" placeholder="请输入登陆账号" />
<el-input
v-model="memberForm.mobile"
placeholder="请输入登陆账号"
maxlength="11"
/>
</el-form-item>
<el-form-item label="登录密码:" prop="password">
<el-form-item label="登录密码:">
<el-input
v-model="memberForm.password"
placeholder="请输入登录密码"
@ -559,8 +563,10 @@ export default {
submitMemberForm() {
this.$refs["memberForm"].validate((valid) => {
if (valid) {
const memberForm = Object.assign({}, this.memberForm);
memberForm.password = this.md5(this.memberForm.password);
let memberForm = Object.assign({}, this.memberForm);
if (this.memberForm.password) {
memberForm.password = this.md5(this.memberForm.password);
}
tenantMemberBind(memberForm).then((res) => {
this.$modal.msgSuccess("设置成功");
this.memberOpen = false;

View File

@ -355,12 +355,12 @@
<el-form-item label="宣传图:" prop="image">
<ImageUpload v-model="form.image" :isShowTip="false" :limit="1" />
</el-form-item>
<el-form-item label="是否展示在首页:" prop="is_home">
<!-- <el-form-item label="是否展示在首页:" prop="is_home">
<el-radio-group v-model="form.is_home">
<el-radio :label="1">是</el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
</el-form-item>
</el-form-item> -->
<el-form-item label="活动简介:" prop="description">
<el-input
v-model="form.description"
@ -611,6 +611,9 @@ export default {
handleUpdate(row) {
this.reset();
activityDetail({ id: row.id }).then((res) => {
res.data.begin_at = this.parseTime(res.data.begin_at);
res.data.finish_at = this.parseTime(res.data.finish_at);
res.data.join_deadline = this.parseTime(res.data.join_deadline);
const formData = res.data;
this.provinceCodeChange(res.data.province);
this.cityCodeChange(res.data.city);