专家跳转详情页,经纪人查看服务的需求

This commit is contained in:
quantulr
2024-03-07 17:24:19 +08:00
parent 44cf0a8488
commit fb6a5a7233
9 changed files with 404 additions and 119 deletions

View File

@ -0,0 +1,7 @@
import request from "@/utils/request";
export const technologyDemandList = (params) => request({
url: "/business/technologyDemand/list",
method: "GET",
params
})

View File

@ -39,8 +39,11 @@ export function technologyProjectDetail(id) {
export function technologyProjectDelete(ids) {
return request({
url: `/business/technologyProject/${ids}`,
url: `/business/technologyProject`,
method: "DELETE",
data: {
ids
}
});
}

View File

@ -22,23 +22,25 @@
<!-- <SiteOptions v-model="queryParams.tenantId" :site-list="siteList"/>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="6">
<el-button
type="primary"
icon="search"
size="default"
@click="handleQuery"
>搜索
</el-button
>
<el-button icon="refresh" size="default" @click="resetQuery"
>重置
</el-button
>
</el-col>
</el-row>
</el-form>
<el-row>
<!-- <el-row>-->
<!-- <el-col :span="6">-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- icon="search"-->
<!-- size="default"-->
<!-- @click="handleQuery"-->
<!-- >搜索-->
<!-- </el-button-->
<!-- >-->
<!-- <el-button icon="refresh" size="default" @click="resetQuery"-->
<!-- >重置-->
<!-- </el-button-->
<!-- >-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row class="mb8">
<el-button
v-if="queryParams.status == 0"
size="small"

View File

@ -108,7 +108,7 @@
></el-table-column>
<el-table-column
align="center"
label="截日期"
label="截日期"
prop="deadline"
></el-table-column>
<el-table-column align="center" label="操作" width="320" v-if="queryParams.status!==4">

View File

@ -1,19 +1,19 @@
<template>
<div class="app-container">
<el-form
ref="queryFormRef"
:inline="true"
:model="queryParams"
label-width="85px"
ref="queryFormRef"
:inline="true"
:model="queryParams"
label-width="85px"
>
<el-form-item label="实验室名称" prop="name">
<el-input
v-model="queryParams.name"
clearable
placeholder="请输入实验室名称"
size="small"
style="width: 240px"
@keyup.enter.native="handleQuery"
v-model="queryParams.name"
clearable
placeholder="请输入实验室名称"
size="small"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
@ -23,14 +23,14 @@
<el-form-item>
<el-button
icon="search"
size="small"
type="primary"
@click="handleQuery"
>搜索
icon="search"
size="small"
type="primary"
@click="handleQuery"
>搜索
</el-button>
<el-button icon="refresh" size="small" @click="resetQuery"
>重置
>重置
</el-button>
</el-form-item>
</el-form>
@ -38,28 +38,28 @@
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
icon="plus"
plain
size="small"
type="primary"
@click="handleAdd"
>新增
icon="plus"
plain
size="small"
type="primary"
@click="handleAdd"
>新增
</el-button>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="dataList">
<el-table-column align="center" label="姓名" prop="name" />
<el-table-column align="center" label="姓名" prop="name"/>
<!-- <el-table-column align="center" label="手机号" prop="mobile" />-->
<el-table-column align="center" label="资格证书缩略图">
<template #default="{ row }">
<el-image
:src="row.certificatePics?.split(',')?.[0] ?? ''"
style="width: 120px; height: 120px"
:src="row.certificatePics?.split(',')?.[0] ?? ''"
style="width: 120px; height: 120px"
></el-image>
</template>
</el-table-column>
@ -75,7 +75,7 @@
</template>
</el-table-column> -->
<!-- <el-table-column align="center" label="站点" prop="area" />-->
<el-table-column align="center" label="所在地" prop="wordAddress" />
<el-table-column align="center" label="所在地" prop="wordAddress"/>
<el-table-column align="center" label="申请时间" prop="createTime">
<template #default="{ row }">
<span>{{ parseTime(row.createTime) }}</span>
@ -84,77 +84,84 @@
<el-table-column align="center" label="操作">
<template #default="{ row }">
<el-button
icon="edit"
link
size="small"
type="text"
@click="handleDetail(row.brokerId)"
>修改
icon="edit"
link
size="small"
type="text"
@click="handleDetail(row.brokerId)"
>修改
</el-button>
<el-button
icon="edit"
link
size="small"
type="text"
@click="openAssignAccount(row.brokerId)"
>分配账号
icon="edit"
link
size="small"
type="text"
@click="openAssignAccount(row.brokerId)"
>分配账号
</el-button>
<el-button
icon="refresh"
link
size="small"
type="text"
@click="openResetPassword(row.brokerId)"
>重置密码
icon="refresh"
link
size="small"
type="text"
@click="openResetPassword(row.brokerId)"
>重置密码
</el-button>
<el-button
icon="delete"
size="small"
type="text"
@click="handleDelete(row.brokerId)"
>删除
icon="delete"
size="small"
type="text"
@click="handleDelete(row.brokerId)"
>删除
</el-button>
<el-button
icon="view"
size="small"
type="text"
@click="handleViewTechDemand(row.brokerId)"
>服务的需求
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
v-model:limit="queryParams.pageSize"
v-model:page="queryParams.pageNum"
:total="total"
@pagination="getList"
v-show="total > 0"
v-model:limit="queryParams.pageSize"
v-model:page="queryParams.pageNum"
:total="total"
@pagination="getList"
/>
<el-dialog
v-model="showAssignAccount"
append-to-body
title="分配账号"
width="400px"
v-model="showAssignAccount"
append-to-body
title="分配账号"
width="400px"
>
<el-form
ref="assignAccountFormRef"
:model="assignAccountForm"
:rules="assignAccoutRules"
label-width="80px"
ref="assignAccountFormRef"
:model="assignAccountForm"
:rules="assignAccoutRules"
label-width="80px"
>
<el-form-item label="手机号" prop="username">
<el-input
v-model="assignAccountForm.username"
:maxlength="11"
v-model="assignAccountForm.username"
:maxlength="11"
></el-input>
</el-form-item>
<el-form-item label="密码" prop="password">
<el-input
v-model="assignAccountForm.password"
show-password
v-model="assignAccountForm.password"
show-password
></el-input>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitAssignAccount"
>
>
</el-button>
<el-button @click="closeAssignAccount"> </el-button>
</div>
@ -162,28 +169,28 @@
</el-dialog>
<el-dialog
v-model="showResetPassword"
append-to-body
title="重置密码"
width="400px"
v-model="showResetPassword"
append-to-body
title="重置密码"
width="400px"
>
<el-form
ref="resetPasswordFormRef"
:model="resetPasswordForm"
:rules="assignAccoutRules"
label-width="80px"
ref="resetPasswordFormRef"
:model="resetPasswordForm"
:rules="assignAccoutRules"
label-width="80px"
>
<el-form-item label="密码" prop="password">
<el-input
v-model="resetPasswordForm.password"
show-password
v-model="resetPasswordForm.password"
show-password
></el-input>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitResetPassword"
>
>
</el-button>
<el-button @click="closeResetPassword"> </el-button>
</div>
@ -193,8 +200,8 @@
</template>
<script setup>
// 遮罩层
import { reactive, ref, toRefs } from "vue";
import { useRouter } from "vue-router";
import {reactive, ref, toRefs} from "vue";
import {useRouter} from "vue-router";
import {
agentList,
allocateAccount,
@ -202,8 +209,8 @@ import {
getAccount,
resetPassword,
} from "@/api/dataList/agent";
import { parseTime } from "@/utils/ruoyi";
import { ElMessage, ElMessageBox } from "element-plus";
import {parseTime} from "@/utils/ruoyi";
import {ElMessage, ElMessageBox} from "element-plus";
import md5 from "js-md5";
/* TODO: is_super: this.$store.getters.is_super, */
@ -222,7 +229,7 @@ const data = reactive({
},
});
const { queryParams } = toRefs(data);
const {queryParams} = toRefs(data);
/*查询实验室列表*/
const getList = () => {
@ -255,7 +262,7 @@ const handleAdd = () => {
const handleDetail = (id) => {
router.push({
path: "/dataList/agentAdd",
query: { id },
query: {id},
});
};
@ -272,10 +279,10 @@ const assignAccoutRules = {
trigger: "blur",
},
],
password: [{ required: true, message: "请输入密码", trigger: "blur" }],
vipType: [{ required: true, message: "请选择会员类型", trigger: "change" }],
password: [{required: true, message: "请输入密码", trigger: "blur"}],
vipType: [{required: true, message: "请选择会员类型", trigger: "change"}],
expireTime: [
{ required: true, message: "请选择到期时间", trigger: "change" },
{required: true, message: "请选择到期时间", trigger: "change"},
],
};
const showAssignAccount = ref(false);
@ -292,7 +299,7 @@ const showResetPassword = ref(false);
const openAssignAccount = async (id) => {
resetForm();
const { have, data } = await getAccount(id);
const {have, data} = await getAccount(id);
if (have) {
ElMessageBox.alert(`已经存在账号:${data}`, "账号已经存在");
} else {
@ -303,7 +310,7 @@ const openAssignAccount = async (id) => {
const openResetPassword = async (id) => {
resetForm();
const { have, userId } = await getAccount(id);
const {have, userId} = await getAccount(id);
if (have) {
resetPasswordForm.id = userId;
showResetPassword.value = true;
@ -356,13 +363,23 @@ const handleDelete = async (id) => {
delIds = ids.value;
}
ElMessageBox.confirm(`是否确认删除编号为${delIds.join(",")}的数据项?`)
.then(async () => {
await deleteAgent(delIds);
getList();
ElMessage.success("删除成功");
})
.catch(() => {});
.then(async () => {
await deleteAgent(delIds);
getList();
ElMessage.success("删除成功");
})
.catch(() => {
});
};
const handleViewTechDemand = (id) => {
router.push({
path: "/agent/serving-tech-demand",
query: {
id
}
})
}
getList();
</script>

View File

@ -0,0 +1,85 @@
<script setup>
import {reactive, ref, toRefs} from "vue";
import {technologyDemandList} from "@/api/dataList/technology-demand";
import {useRoute} from "vue-router";
const route = useRoute()
const total = ref(0)
const data = reactive({
queryParams: {
pageNum: 1,
pageSize: 10,
brokerId: undefined
}
})
const {queryParams} = toRefs(data)
if (route.query.id) {
queryParams.value.brokerId = route.query.id
}
const dataList = ref([])
const getList = () => {
technologyDemandList(queryParams.value).then(resp => {
dataList.value = resp.rows
total.value = resp.total
})
}
getList()
</script>
<template>
<div class="app-container">
<el-table :data="dataList">
<el-table-column align="center" label="编号" prop="id" width="80"></el-table-column>
<el-table-column
align="center"
label="需求名称"
prop="title"
></el-table-column>
<el-table-column
align="center"
label="所属领域"
prop="industryStr"
></el-table-column>
<el-table-column
align="center"
label="联系人"
prop="name"
></el-table-column>
<el-table-column
align="center"
label="经纪人"
prop="brokerName"
></el-table-column>
<el-table-column
align="center"
label="手机"
prop="mobile"
></el-table-column>
<el-table-column
align="center"
label="发布时间"
prop="createTime"
></el-table-column>
<el-table-column
align="center"
label="截止日期"
prop="deadline"
></el-table-column>
</el-table>
<pagination
v-show="total > 0"
v-model:limit="queryParams.pageSize"
v-model:page="queryParams.pageNum"
:total="total"
@pagination="getList"
/>
</div>
</template>
<style scoped lang="scss">
</style>

View File

@ -136,6 +136,13 @@
@click="openResetPassword(row.id)"
>重置密码
</el-button>
<el-button
icon="edit"
size="small"
type="text"
@click="goToDetail(row.id)"
>专家详情
</el-button>
</template>
</el-table-column>
</el-table>
@ -296,6 +303,7 @@ import {ElLoading, ElMessage, ElMessageBox} from "element-plus";
import dayjs from "dayjs";
import request from "@/utils/request";
import {educationOptions} from "@/utils/parameter";
import {getConfigKey} from "@/api/system/config";
const router = useRouter();
// const siteList = ref([]);
@ -376,9 +384,15 @@ const openResetPassword = async (id) => {
resetPasswordForm.id = userId;
showResetPassword.value = true;
} else {
ElMessageBox.alert(`尚未分配账号,请先分配账号`, "尚未分配账号");
void ElMessageBox.alert(`尚未分配账号,请先分配账号`, "尚未分配账号");
}
};
const goToDetail = (id) => {
getConfigKey("website.link").then(resp => {
const websiteLink = resp.msg
open(`${websiteLink}/searchList/expert/detail/${id}`, "_blank")
})
}
const resetForm = () => {
if (resetPasswordFormRef.value) {
resetPasswordFormRef.value.resetFields();

View File

@ -1,17 +1,25 @@
<script setup>
import {reactive, ref, toRefs} from "vue";
import {technologyProjectList} from "@/api/dataList/technology-project";
import modal from '@/plugins/modal'
import {
technologyProjectDelete,
technologyProjectDetail,
technologyProjectList
} from "@/api/dataList/technology-project";
import Pagination from "@/components/Pagination/index.vue";
const data = reactive({
queryParams: {
pageNum: 1,
pageSize: 10
}
},
form: {}
})
const {queryParams} = toRefs(data)
const {queryParams, form} = toRefs(data)
const dataList = ref([])
const total = ref(0)
const title = ref("科研项目详情")
const showEditDialog = ref(false)
const getList = () => {
technologyProjectList(queryParams.value).then(resp => {
dataList.value = resp.rows
@ -29,6 +37,22 @@ const resetQuery = () => {
}
getList()
}
const handleDetail = (id) => {
technologyProjectDetail(id).then(resp => {
form.value = resp.data
showEditDialog.value = true
})
}
const handleDelete = (id) => {
modal.confirm("是否确认删除").then(() => {
technologyProjectDelete([id]).then(() => {
modal.msgSuccess("删除成功")
getList()
})
})
}
getList()
</script>
@ -68,6 +92,12 @@ getList()
</el-table-column>
<el-table-column label="课题负责人" prop="director"/>
<el-table-column label="发布时间" prop="createTime"/>
<el-table-column label="操作" width="120">
<template #default="{row}">
<el-button size="small" icon="view" type="text" @click="handleDetail(row.id)">详情</el-button>
<el-button size="small" icon="delete" type="text" @click="handleDelete(row.id)">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
@ -76,6 +106,133 @@ getList()
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
<el-dialog
:title="title"
v-model="showEditDialog"
width="820px"
append-to-body
>
<el-form
disabled
ref="researchRef"
:model="form"
label-width="120px"
>
<el-form-item
label="科研项目名称"
prop="title"
>
<el-input
v-model="form.title"
placeholder="请输入科研项目名称"
/>
</el-form-item>
<el-form-item label="课题角色" prop="role">
<el-radio v-model="form.role" label="1"
><!--承担单位-->
承担单位
</el-radio>
<el-radio v-model="form.role" label="2"
><!--参与单位-->
参与单位
</el-radio>
</el-form-item>
<el-row>
<el-col :span="12">
<el-form-item label="资助经费" prop="amount">
<el-input
v-model="form.amount"
oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')"
placeholder="请输入资助经费"
>
<template #append
>万元
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="资助来源" prop="source">
<el-input
v-model="form.source"
placeholder="请输入资助来源"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="开始日期" prop="beginTime">
<el-date-picker
v-model="form.beginTime"
type="date"
value-format="YYYY-MM-DD HH:mm:ss"
placeholder="请输入开始日期"
></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="结束日期" prop="finishTime">
<el-date-picker
v-model="form.finishTime"
type="date"
value-format="YYYY-MM-DD HH:mm:ss"
placeholder="请输入结束日期"
></el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="项目类型" prop="kind">
<el-input
v-model="form.kind"
placeholder="请输入项目类型"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="课题负责人" prop="director">
<el-input
v-model="form.director"
placeholder="请输入课题负责人"
/>
</el-form-item>
</el-col>
</el-row>
<!-- //TODO:添加项目简介字段 -->
<el-row>
<el-col :span="24">
<el-form-item
label="项目简介"
prop="introduce"
>
<!-- <WangEditor-->
<!-- v-model="form.introduce"-->
<!-- width="100%"-->
<!-- min-height="150px"-->
<!-- @blur="researchRef.validateField(`introduce`)"-->
<!-- ></WangEditor>-->
<el-input
type="textarea"
v-model="form.introduce"
placeholder="请输入项目简介"
:autosize="{ minRows: 8, maxRows: 16 }"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="showEditDialog=false">关闭</el-button>
<!-- <el-button type="primary" @click="submitForm"-->
<!-- >{{ t("admin.common.confirm") }}-->
<!-- </el-button>-->
<!-- <el-button @click="cancel">{{ t("admin.common.cancel") }}</el-button>-->
</div>
</template>
</el-dialog>
</div>
</template>

View File

@ -208,7 +208,7 @@ const data = reactive({
form: {},
rules: {
title: [{required: true, message: "案例标题不能为空", trigger: "blur"}],
description: [{required: true, message: "描述不能为空", trigger: "blur"}],
// description: [{required: true, message: "描述不能为空", trigger: "blur"}],
image: [
{
required: true,