bugfix
This commit is contained in:
45
src/api/admin/agent/account.js
Normal file
45
src/api/admin/agent/account.js
Normal file
@ -0,0 +1,45 @@
|
||||
// 获取用户详细信息
|
||||
import request from "@/utils/request";
|
||||
|
||||
/*获取基本信息*/
|
||||
export function getInfo() {
|
||||
return request({
|
||||
url: "/app/broker/info",
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
// 经纪人信息修改
|
||||
export const updateCasBroker = (data) => {
|
||||
return request({
|
||||
url: "/app/broker/updateCasBroker",
|
||||
method: "PUT",
|
||||
data,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 申请入驻
|
||||
* @param data
|
||||
* @return {*}
|
||||
*/
|
||||
export const insertCasBroker = (data) => {
|
||||
return request({
|
||||
url: "/app/broker/insertCasBroker",
|
||||
method: "POST",
|
||||
data,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 个人信息录入
|
||||
* @param data
|
||||
* @return {*}
|
||||
*/
|
||||
export const insertClientUser = (data) => {
|
||||
return request({
|
||||
url: "/app/broker/insertClientUser",
|
||||
method: "POST",
|
||||
data,
|
||||
});
|
||||
};
|
22
src/api/admin/agent/order.js
Normal file
22
src/api/admin/agent/order.js
Normal file
@ -0,0 +1,22 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
/**
|
||||
* 经纪人订单列表
|
||||
* @param params
|
||||
* @return {*}
|
||||
*/
|
||||
export const brokerDealLogList = (params) => {
|
||||
return request({
|
||||
url: `/app/broker/brokerDealLogList`,
|
||||
method: "GET",
|
||||
params,
|
||||
});
|
||||
};
|
||||
|
||||
export const applyBill = (data) => {
|
||||
return request({
|
||||
url: `/app/broker/applyBill`,
|
||||
method: "PUT",
|
||||
data,
|
||||
});
|
||||
};
|
20
src/api/admin/agent/service/enterprise.js
Normal file
20
src/api/admin/agent/service/enterprise.js
Normal file
@ -0,0 +1,20 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
export const listBrokerEnterprise = (params) =>
|
||||
request({
|
||||
url: "/app/broker/enterprise/list",
|
||||
method: "GET",
|
||||
params,
|
||||
});
|
||||
|
||||
export const insertBrokerEnterprise = (data) =>
|
||||
request({
|
||||
url: "/app/broker/enterprise",
|
||||
method: "POST",
|
||||
data,
|
||||
});
|
||||
export const deleteBrokerEnterprise = (ids) =>
|
||||
request({
|
||||
url: `/app/broker/enterprise/${ids}`,
|
||||
method: "DELETE",
|
||||
});
|
41
src/api/admin/agent/service/technology-demand.js
Normal file
41
src/api/admin/agent/service/technology-demand.js
Normal file
@ -0,0 +1,41 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
/**
|
||||
* 服务企业技术需求列表
|
||||
* @param params
|
||||
* @return {*}
|
||||
*/
|
||||
export const technologyDemandList = (params) =>
|
||||
request({
|
||||
url: "/app/broker/enterprise/technologyDemandList",
|
||||
method: "GET",
|
||||
params,
|
||||
});
|
||||
|
||||
/**
|
||||
* 新增企业精神需求
|
||||
* @param data
|
||||
* @return {*}
|
||||
*/
|
||||
export const insertDemand = (data) =>
|
||||
request({
|
||||
url: "/app/broker/enterprise/insertDemand",
|
||||
method: "POST",
|
||||
data,
|
||||
});
|
||||
|
||||
export const getTechnologyDemandUpdateStatus = (params) =>
|
||||
request({
|
||||
url: "/app/broker/enterprise/demandProcess",
|
||||
method: "GET",
|
||||
params,
|
||||
});
|
||||
|
||||
export const updateDemandProcess = (
|
||||
data // 修改企业技术需求
|
||||
) =>
|
||||
request({
|
||||
url: "/app/broker/enterprise/updateDemandProcess",
|
||||
method: "PUT",
|
||||
data,
|
||||
});
|
@ -79,3 +79,12 @@ export const deleteTechnologyDemand = (ids) => {
|
||||
method: "DELETE",
|
||||
});
|
||||
};
|
||||
|
||||
//添加查看记录
|
||||
export const addViewRecord = (data) => {
|
||||
return request({
|
||||
url: `/app/addSeeLog`,
|
||||
method: "POST",
|
||||
data,
|
||||
});
|
||||
};
|
||||
|
@ -37,3 +37,12 @@ export const deletePaper = (ids) => {
|
||||
method: "DELETE",
|
||||
});
|
||||
};
|
||||
|
||||
// 单位浏览记录
|
||||
export const seeLogList = (params) => {
|
||||
return request({
|
||||
url: `/app/laboratory/seeLogList`,
|
||||
method: "GET",
|
||||
params,
|
||||
});
|
||||
};
|
||||
|
10
src/api/admin/research/footprint.js
Normal file
10
src/api/admin/research/footprint.js
Normal file
@ -0,0 +1,10 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
// 客户浏览数据列表
|
||||
export function customerBrowseList(params) {
|
||||
return request({
|
||||
url: "/app/research/seeLogList",
|
||||
method: "get",
|
||||
params,
|
||||
});
|
||||
}
|
@ -65,19 +65,17 @@ export function insertResearch(data) {
|
||||
}
|
||||
|
||||
// 实验室入驻
|
||||
export function insertLaboratory(data) {
|
||||
return request({
|
||||
export const insertLaboratory = (data) =>
|
||||
request({
|
||||
url: "/app/laboratory/insertLaboratory",
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
// 实验室入驻
|
||||
export function agent(data) {
|
||||
return request({
|
||||
url: "/enterprise/v1/settled/agent",
|
||||
// 经纪人入驻
|
||||
export const insertAgent = (data) =>
|
||||
request({
|
||||
url: "/app/laboratory/insertAgent",
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
@ -1,26 +1,28 @@
|
||||
<template>
|
||||
<div class="component-upload-image">
|
||||
<el-upload
|
||||
multiple
|
||||
:action="uploadImgUrl"
|
||||
list-type="picture-card"
|
||||
:on-success="handleUploadSuccess"
|
||||
:before-upload="handleBeforeUpload"
|
||||
:class="{ hide: fileList.length >= limit }"
|
||||
:file-list="fileList"
|
||||
:headers="headers"
|
||||
:limit="limit"
|
||||
:on-error="handleUploadError"
|
||||
:on-exceed="handleExceed"
|
||||
name="file"
|
||||
:on-remove="handleRemove"
|
||||
:show-file-list="true"
|
||||
:headers="headers"
|
||||
:file-list="fileList"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:class="{ hide: fileList.length >= limit }"
|
||||
:on-remove="handleRemove"
|
||||
:on-success="handleUploadSuccess"
|
||||
:show-file-list="true"
|
||||
list-type="picture-card"
|
||||
multiple
|
||||
name="file"
|
||||
>
|
||||
<el-icon class="avatar-uploader-icon"><plus /></el-icon>
|
||||
<el-icon class="avatar-uploader-icon">
|
||||
<plus />
|
||||
</el-icon>
|
||||
</el-upload>
|
||||
<!-- 上传提示 -->
|
||||
<div class="el-upload__tip" v-if="showTip">
|
||||
<div v-if="showTip" class="el-upload__tip">
|
||||
请上传
|
||||
<template v-if="fileSize">
|
||||
大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b>
|
||||
@ -33,9 +35,9 @@
|
||||
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
append-to-body
|
||||
title="预览"
|
||||
width="800px"
|
||||
append-to-body
|
||||
>
|
||||
<img
|
||||
:src="dialogImageUrl"
|
||||
@ -186,15 +188,15 @@ function listToString(list, separator) {
|
||||
separator = separator || ",";
|
||||
for (let i in list) {
|
||||
if (undefined !== list[i].url && list[i].url.indexOf("blob:") !== 0) {
|
||||
// strs += list[i].url.replace(baseUrl, "") + separator;
|
||||
strs += list[i].url + separator;
|
||||
strs += list[i].url.replace(baseUrl, "") + separator;
|
||||
// strs += list[i].url + separator;
|
||||
}
|
||||
}
|
||||
return strs != "" ? strs.substr(0, strs.length - 1) : "";
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
// .el-upload--picture-card 控制加号部分
|
||||
:deep(.hide .el-upload--picture-card) {
|
||||
display: none;
|
||||
|
@ -56,3 +56,71 @@ export const technologyDemandStatusDict = [
|
||||
elTagType: "warning",
|
||||
},
|
||||
];
|
||||
|
||||
// 1->专利|2->成果|3->服务需求|4->专家|5->科研项目|6->论文
|
||||
export const seeLogTypeDict = [
|
||||
{
|
||||
value: "1",
|
||||
label: "专利",
|
||||
elTagType: "primary",
|
||||
},
|
||||
{
|
||||
value: "2",
|
||||
label: "成果",
|
||||
elTagType: "success",
|
||||
},
|
||||
|
||||
{
|
||||
value: "3",
|
||||
label: "服务需求",
|
||||
elTagType: "danger",
|
||||
},
|
||||
{
|
||||
value: "4",
|
||||
label: "专家",
|
||||
elTagType: "warning",
|
||||
},
|
||||
{
|
||||
value: "5",
|
||||
label: "科研项目",
|
||||
elTagType: "warning",
|
||||
},
|
||||
{
|
||||
value: "6",
|
||||
label: "论文",
|
||||
elTagType: "warning",
|
||||
},
|
||||
];
|
||||
|
||||
// 订单类型(1创新币充值2活动报名)
|
||||
export const orderTypeDict = [
|
||||
{
|
||||
value: "1",
|
||||
label: "创新币充值",
|
||||
elTagType: "primary",
|
||||
},
|
||||
{
|
||||
value: "2",
|
||||
label: "活动报名",
|
||||
elTagType: "success",
|
||||
},
|
||||
];
|
||||
|
||||
// 发票申请状态(0->未申请1->已申请2->已处理)
|
||||
export const invoiceStatusDict = [
|
||||
{
|
||||
value: "0",
|
||||
label: "未申请",
|
||||
elTagType: "warning",
|
||||
},
|
||||
{
|
||||
value: "1",
|
||||
label: "已申请",
|
||||
elTagType: "primary",
|
||||
},
|
||||
{
|
||||
value: "2",
|
||||
label: "已处理",
|
||||
elTagType: "success",
|
||||
},
|
||||
];
|
||||
|
@ -705,6 +705,14 @@ export const laboratoryRoutes = [
|
||||
name: "Paper",
|
||||
meta: { title: "论文列表", icon: "list" },
|
||||
},
|
||||
{
|
||||
path: "paper/unit-info",
|
||||
component: () =>
|
||||
import("@/views/admin/laboratory/research/paper/unit-info.vue"),
|
||||
hidden: true,
|
||||
name: "UnitInfo",
|
||||
meta: { title: "浏览单位信息", icon: "list" },
|
||||
},
|
||||
{
|
||||
path: "laboratory-equipment",
|
||||
component: () =>
|
||||
@ -749,7 +757,6 @@ export const researchRoutes = [
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
path: "/admin/research",
|
||||
component: Layout,
|
||||
@ -817,6 +824,24 @@ export const researchRoutes = [
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
// 客户足迹路由
|
||||
path: "/admin/footprint",
|
||||
component: Layout,
|
||||
meta: { title: "客户足迹", icon: "dashboard" },
|
||||
alwaysShow: true,
|
||||
redirect: "/admin/footprint/browsing-history",
|
||||
children: [
|
||||
{
|
||||
// 浏览数据
|
||||
path: "browsing-history",
|
||||
component: () =>
|
||||
import("@/views/admin/research/footprint/browsing-history/index.vue"),
|
||||
name: "BrowsingHistory",
|
||||
meta: { title: "浏览数据", icon: "list" },
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
/**
|
||||
@ -838,6 +863,73 @@ export const agentRoutes = [
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/admin/service",
|
||||
component: Layout,
|
||||
meta: { title: "服务管理", icon: "dashboard" },
|
||||
alwaysShow: true,
|
||||
redirect: "/admin/service/enterprise",
|
||||
children: [
|
||||
{
|
||||
path: "enterprise",
|
||||
component: () =>
|
||||
import("@/views/admin/agent/service/enterprise/index.vue"),
|
||||
name: "ServiceEnterprise",
|
||||
meta: { title: "我服务的企业", icon: "list" },
|
||||
},
|
||||
{
|
||||
path: "technology-demand",
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/admin/agent/service/enterprise/technology-demand.vue"
|
||||
),
|
||||
name: "TechnologyDemandList",
|
||||
hidden: true,
|
||||
meta: { title: "技术需求列表", icon: "list" },
|
||||
},
|
||||
{
|
||||
path: "results",
|
||||
component: () => import("@/views/admin/enterprise/extension/results"),
|
||||
hidden: true,
|
||||
name: "Results",
|
||||
meta: { title: "匹配结果", icon: "list", isMatch: true },
|
||||
},
|
||||
{
|
||||
path: "technology-demand-release",
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/admin/agent/service/enterprise/technology-demand-release.vue"
|
||||
),
|
||||
name: "TechnologyDemandRelease",
|
||||
hidden: true,
|
||||
meta: { title: "发布需求", icon: "list" },
|
||||
},
|
||||
{
|
||||
path: "update-status",
|
||||
component: () =>
|
||||
import("@/views/admin/agent/service/enterprise/update-status.vue"),
|
||||
name: "TechnologyDemandUpdateStatus",
|
||||
hidden: true,
|
||||
meta: { title: "更新状态", icon: "list" },
|
||||
},
|
||||
{
|
||||
path: "matching-demand",
|
||||
component: () =>
|
||||
import("@/views/admin/agent/service/matching-demand/index.vue"),
|
||||
name: "EnterpriseDemandMatch",
|
||||
meta: { title: "企业需求匹配", icon: "list" },
|
||||
},
|
||||
{
|
||||
path: "matching-demand-detail",
|
||||
component: () =>
|
||||
import("@/views/admin/agent/service/matching-demand/index.vue"),
|
||||
name: "EnterpriseDemandMatchDetail",
|
||||
hidden: true,
|
||||
meta: { title: "企业需求匹配详情", icon: "list" },
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
path: "/admin/account",
|
||||
component: Layout,
|
||||
@ -853,6 +945,21 @@ export const agentRoutes = [
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/admin/bill",
|
||||
component: Layout,
|
||||
meta: { title: "账单管理", icon: "dashboard" },
|
||||
alwaysShow: true,
|
||||
redirect: "/admin/bill/bill-list",
|
||||
children: [
|
||||
{
|
||||
path: "bill-list",
|
||||
component: () => import("@/views/admin/agent/bill/bill-list/index.vue"),
|
||||
name: "BillList",
|
||||
meta: { title: "账单列表", icon: "list" },
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
// 动态路由,基于用户权限动态去加载
|
||||
|
23
src/utils/view_history.js
Normal file
23
src/utils/view_history.js
Normal file
@ -0,0 +1,23 @@
|
||||
// 添加访问记录
|
||||
import useUserStore from "@/store/modules/user";
|
||||
import { addViewRecord } from "@/api/admin/enterprise/demand";
|
||||
|
||||
export function addViewHistory(type, itemId, itemName) {
|
||||
const enterprise = useUserStore().enterprise;
|
||||
if (!enterprise) {
|
||||
return;
|
||||
}
|
||||
const enterpriseId = enterprise.id;
|
||||
const enterpriseName = enterprise.name;
|
||||
const nickname = enterprise.userName;
|
||||
const phone = enterprise.phone;
|
||||
addViewRecord({
|
||||
type: type,
|
||||
typeId: itemId,
|
||||
typeName: itemName,
|
||||
enterpriseId: enterpriseId,
|
||||
enterpriseName: enterpriseName,
|
||||
nickname: nickname,
|
||||
phone: phone,
|
||||
});
|
||||
}
|
@ -40,9 +40,12 @@
|
||||
<script setup>
|
||||
import AgentForm from "@/views/components/AgentForm";
|
||||
import { reactive, ref, toRefs } from "vue";
|
||||
import { getInfo, updateLaboratory } from "@/api/admin/laboratory/account";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { insertClientUser } from "@/api/admin/enterprise";
|
||||
import {
|
||||
getInfo,
|
||||
insertClientUser,
|
||||
updateCasBroker,
|
||||
} from "@/api/admin/agent/account";
|
||||
|
||||
const data = reactive({
|
||||
form: {
|
||||
@ -61,10 +64,9 @@ const labelWidth = ref(140);
|
||||
// 获取基础信息用于回显
|
||||
const getBasicInfo = async () => {
|
||||
const { data } = await getInfo();
|
||||
data.laboratory.researchs =
|
||||
data.laboratory.researchDirection?.split(",") ?? [];
|
||||
data.laboratory.keywords = data.laboratory.keyword?.split(",") ?? [];
|
||||
form.value = data.laboratory ?? {};
|
||||
data.broker.industrys = data.broker.industry?.split(",") ?? [];
|
||||
data.broker.keywords = data.broker.keyword?.split(",") ?? [];
|
||||
form.value = data.broker ?? {};
|
||||
personForm.value = data.user ?? {};
|
||||
};
|
||||
|
||||
@ -82,9 +84,9 @@ const submitPersonalInfo = async () => {
|
||||
const submitExpertForm = async () => {
|
||||
const valid = await agentFormRef.value.validateForm();
|
||||
if (valid) {
|
||||
form.value.researchDirection = form.value.researchs?.join(",") ?? null;
|
||||
// form.value.researchDirection = form.value.researchs?.join(",") ?? null;
|
||||
form.value.keyword = form.value.keywords?.join(",") ?? null;
|
||||
updateLaboratory(form.value).then((res) => {
|
||||
updateCasBroker(form.value).then((res) => {
|
||||
ElMessage.success("修改成功");
|
||||
getBasicInfo();
|
||||
});
|
||||
|
257
src/views/admin/agent/bill/bill-list/index.vue
Normal file
257
src/views/admin/agent/bill/bill-list/index.vue
Normal file
@ -0,0 +1,257 @@
|
||||
<script setup>
|
||||
import { reactive, ref, toRefs } from "vue";
|
||||
import Pagination from "@/components/Pagination/index.vue";
|
||||
import { applyBill, brokerDealLogList } from "@/api/admin/agent/order";
|
||||
import { invoiceStatusDict, orderTypeDict } from "@/constant/dict";
|
||||
import dayjs from "dayjs";
|
||||
import { ElMessage } from "element-plus";
|
||||
import DictTag from "@/components/DictTag/index.vue";
|
||||
import RightToolbar from "@/components/RightToolbar/index.vue";
|
||||
|
||||
const showSearch = ref(true);
|
||||
const tableData = ref([]); // 表格数据
|
||||
const total = ref(0); // 总条数
|
||||
const loading = ref(false); // 遮罩层
|
||||
const dialogVisible = ref(false); // 是否显示弹出层
|
||||
const dialogTitle = ref(""); // 弹出层标题
|
||||
const formRef = ref(null);
|
||||
const queryRef = ref(null);
|
||||
const ids = ref([]); // 批量删除的id集合
|
||||
const data = reactive({
|
||||
form: {}, // 表单数据
|
||||
queryParams: {
|
||||
// 查询条件
|
||||
pageSize: 10,
|
||||
pageNum: 1,
|
||||
timeRange: [],
|
||||
},
|
||||
rules: {
|
||||
// 表单验证规则
|
||||
orderNumber: [{ required: true, message: "请输入订单号", trigger: "blur" }],
|
||||
companyName: [
|
||||
{ required: true, message: "请输入公司名称", trigger: "blur" },
|
||||
],
|
||||
// 税号
|
||||
taxNumber: [{ required: true, message: "请输入公司税号", trigger: "blur" }],
|
||||
email: [
|
||||
{ required: true, message: "请输入电子邮箱", trigger: "blur" },
|
||||
// email 正则验证
|
||||
{
|
||||
pattern: /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/,
|
||||
message: "请输入正确的邮箱",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
phone: [{ required: true, message: "请输入电话", trigger: "blur" }],
|
||||
},
|
||||
});
|
||||
const { form, queryParams, rules } = toRefs(data); // 解构响应式对象
|
||||
|
||||
/**
|
||||
* 获取列表数据
|
||||
*/
|
||||
const getList = () => {
|
||||
brokerDealLogList(queryParams.value).then((resp) => {
|
||||
tableData.value = resp.rows;
|
||||
total.value = resp.total;
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 重置查询条件
|
||||
*/
|
||||
const resetQuery = () => {
|
||||
queryRef.value.resetFields();
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询列表数据
|
||||
*/
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
/**
|
||||
* 申请开票
|
||||
* @param row
|
||||
*/
|
||||
const handleApplyInvoice = (row) => {
|
||||
reset();
|
||||
form.value.id = row.id;
|
||||
console.log(row.value);
|
||||
dialogTitle.value = "申请开票";
|
||||
dialogVisible.value = true;
|
||||
};
|
||||
|
||||
/**
|
||||
* 重置表单数据
|
||||
*/
|
||||
const reset = () => {
|
||||
form.value = {};
|
||||
formRef.value?.resetFields();
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除一条记录
|
||||
* @param id
|
||||
*/
|
||||
const handleDelete = (id) => {
|
||||
// const ids = id || ids.value
|
||||
};
|
||||
|
||||
/**
|
||||
* 取消
|
||||
* @param id
|
||||
*/
|
||||
const handleCancel = (id) => {
|
||||
reset();
|
||||
dialogVisible.value = false;
|
||||
};
|
||||
|
||||
/**
|
||||
* 提交表单
|
||||
*/
|
||||
const submit = () => {
|
||||
formRef.value.validate().then((valid) => {
|
||||
if (valid) {
|
||||
applyBill(form.value).then(() => {
|
||||
dialogVisible.value = false;
|
||||
ElMessage.success("申请成功");
|
||||
getList();
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const handleSelectionChange = (selection) => {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
};
|
||||
|
||||
getList();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 搜索 订单号 查询 -->
|
||||
<el-form
|
||||
v-show="showSearch"
|
||||
ref="queryRef"
|
||||
:model="queryParams"
|
||||
class="query-form"
|
||||
inline
|
||||
@submit.prevent
|
||||
@keydown="handleQuery"
|
||||
>
|
||||
<el-form-item label="订单号" prop="orderNumber">
|
||||
<el-input
|
||||
v-model="queryParams.orderNumber"
|
||||
placeholder="请输入订单号"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleQuery">查询</el-button>
|
||||
<el-button @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row class="mb8">
|
||||
<right-toolbar v-model:show-search="showSearch" @query-table="getList" />
|
||||
</el-row>
|
||||
<!-- 表格数据-->
|
||||
<el-table v-loading="loading" :data="tableData">
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="订单号"
|
||||
prop="orderNumber"
|
||||
></el-table-column>
|
||||
<el-table-column align="center" label="订单类型" prop="orderType">
|
||||
<template #default="{ row }">
|
||||
{{
|
||||
orderTypeDict.find((item) => item.value === row.orderType)?.label ??
|
||||
"-"
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="金额"
|
||||
prop="amount"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="数量"
|
||||
prop="total"
|
||||
></el-table-column>
|
||||
<el-table-column align="center" label="充值时间">
|
||||
<template #default="{ row }">
|
||||
{{ dayjs(row.payTime).format("YYYY-MM-DD HH:mm:ss") }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 状态-->
|
||||
<el-table-column align="center" label="状态" prop="status">
|
||||
<template #default="{ row }">
|
||||
<dict-tag :options="invoiceStatusDict" :value="row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
:disabled="row.status !== '0'"
|
||||
size="small"
|
||||
type="text"
|
||||
@click="handleApplyInvoice(row)"
|
||||
>发票申请
|
||||
</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"
|
||||
/>
|
||||
|
||||
<!-- 申请开票dialog-->
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
:title="dialogTitle"
|
||||
append-to-body
|
||||
width="500px"
|
||||
>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-position="left"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="公司名称" prop="companyName">
|
||||
<el-input v-model="form.companyName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="公司税号" prop="taxNumber">
|
||||
<el-input v-model="form.taxNumber"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="电子邮箱" prop="email">
|
||||
<el-input v-model="form.email"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="电话" prop="phone">
|
||||
<el-input v-model="form.phone" maxlength="11"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="地址" prop="address">
|
||||
<el-input v-model="form.address"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="default" @click="handleCancel">取消</el-button>
|
||||
<el-button type="primary" @click="submit">提交</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped></style>
|
140
src/views/admin/agent/bill/commission/index.vue
Normal file
140
src/views/admin/agent/bill/commission/index.vue
Normal file
@ -0,0 +1,140 @@
|
||||
<script setup>
|
||||
import { reactive, ref, toRefs } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
const data = reactive({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
});
|
||||
const { queryParams } = toRefs(data);
|
||||
const queryRef = ref(null);
|
||||
const total = ref(0);
|
||||
const tableData = ref([]);
|
||||
|
||||
/**
|
||||
* 获取列表数据
|
||||
*/
|
||||
const getList = () => {};
|
||||
|
||||
/**
|
||||
* 查询列表数据
|
||||
*/
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
/**
|
||||
* 重置查询条件
|
||||
*/
|
||||
const resetQuery = () => {
|
||||
queryRef.value.resetFields();
|
||||
getList();
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据id删除
|
||||
* @param id
|
||||
*/
|
||||
const deleteById = (id) => {};
|
||||
|
||||
const goBack = (id) => {
|
||||
// 跳转到"/admin/index" query参数 id
|
||||
router.push({
|
||||
path: "/admin/index",
|
||||
query: {
|
||||
id,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
const getById = (id) => {};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-card></el-card>
|
||||
</el-col>
|
||||
<el-col :span="12"></el-col>
|
||||
</el-row>
|
||||
<el-form ref="queryRef" :model="queryParams" inline>
|
||||
<el-form-item label="企业名称">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="请输入企业名称"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<!-- 日期时间段查询-->
|
||||
<el-form-item label="时间段">
|
||||
<el-date-picker
|
||||
v-model="queryParams.timeRange"
|
||||
end-placeholder="结束日期"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
type="datetimerange"
|
||||
value-format="YYYY-MM-dd HH:mm:ss"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleQuery">查询</el-button>
|
||||
<!-- 重置-->
|
||||
<el-button type="danger" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- element plus 表格 , 列:订单号,企业名称,所属领域,会员等级,会员金额,购买会员时间,操作-->
|
||||
<el-table :data="tableData" class="withdraw-table">
|
||||
<el-table-column label="订单号" prop="id" width="180"></el-table-column>
|
||||
<el-table-column
|
||||
label="企业名称"
|
||||
prop="name"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="所属领域"
|
||||
prop="field"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="会员等级"
|
||||
prop="level"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="会员金额"
|
||||
prop="amount"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="购买会员时间"
|
||||
prop="buyTime"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column label="操作" width="180">
|
||||
<template #default="{ row }">
|
||||
<el-button size="small" type="primary" @click="goBack(row.id)"
|
||||
>查看详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
ref="pagination"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
v-model:page="queryParams.pageNum"
|
||||
:total="total"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped></style>
|
87
src/views/admin/agent/bill/commission/withdraw-record.vue
Normal file
87
src/views/admin/agent/bill/commission/withdraw-record.vue
Normal file
@ -0,0 +1,87 @@
|
||||
<script setup>
|
||||
import { reactive, ref, toRefs } from "vue";
|
||||
|
||||
const data = reactive({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
});
|
||||
const { queryParams } = toRefs(data);
|
||||
const tableData = ref([]);
|
||||
const queryRef = ref(null);
|
||||
|
||||
/**
|
||||
* 删除指定行
|
||||
* @param row
|
||||
*/
|
||||
const deleteRecord = (row) => {};
|
||||
|
||||
// 重置查询条件 resetQuery
|
||||
export const resetQuery = () => {
|
||||
queryRef.value.resetFields();
|
||||
handleQuery();
|
||||
};
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<el-form ref="queryRef" :model="queryParams" label-width="80px">
|
||||
<!-- 时间段查询-->
|
||||
<el-form-item label="时间段">
|
||||
<el-date-picker
|
||||
v-model="queryParams.timeRange"
|
||||
end-placeholder="结束日期"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
type="datetimerange"
|
||||
value-format="YYYY-MM-dd"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleQuery">查询</el-button>
|
||||
<el-button @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- el-radio-group 状态切换, 已审批和待审批 -->
|
||||
<el-radio-group v-model="queryParams.status" size="small" style="width: 100%">
|
||||
<el-radio label="已审批" value="1" />
|
||||
<el-radio label="待审批" value="2" />
|
||||
</el-radio-group>
|
||||
<!-- 用h2 展示提现金额,加粗字体-->
|
||||
<h2 style="font-weight: bold">提现金额 : {{ 312312 }}¥</h2>
|
||||
|
||||
<!--提现记录表格 element-plus -->
|
||||
<el-table :data="tableData" class="withdraw-table">
|
||||
<el-table-column
|
||||
label="提现金额"
|
||||
prop="amount"
|
||||
width="150"
|
||||
></el-table-column>
|
||||
<el-table-column label="提现类型" prop="type" width="150"></el-table-column>
|
||||
<el-table-column
|
||||
label="提现状态"
|
||||
prop="status"
|
||||
width="150"
|
||||
></el-table-column>
|
||||
<el-table-column label="提现时间" prop="time" width="150"></el-table-column>
|
||||
<el-table-column label="操作" prop="action" width="150">
|
||||
<template #default="{ row }">
|
||||
<!--删除-->
|
||||
<el-button size="small" type="text" @click="deleteRecord(row)"
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.withdraw-table {
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
78
src/views/admin/agent/bill/exchange-record/index.vue
Normal file
78
src/views/admin/agent/bill/exchange-record/index.vue
Normal file
@ -0,0 +1,78 @@
|
||||
<script setup>
|
||||
import { reactive, ref, toRefs } from "vue";
|
||||
|
||||
const queryRef = ref(null);
|
||||
const formRef = ref(null);
|
||||
const tableData = ref([]);
|
||||
const total = ref(0);
|
||||
const loading = ref(false);
|
||||
const data = reactive({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
});
|
||||
const { queryParams } = toRefs(data);
|
||||
|
||||
/**
|
||||
* 获取列表数据
|
||||
*/
|
||||
const getList = () => {};
|
||||
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
/**
|
||||
* 重置查询条件
|
||||
*/
|
||||
const resetQuery = () => {
|
||||
queryRef.value.resetFields();
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除指定行
|
||||
* @param id
|
||||
*/
|
||||
const handleDelete = (id) => {};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form ref="queryRef" :model="queryParams" inline>
|
||||
<el-form-item label="订单号">
|
||||
<el-input v-model="queryParams.orderNo"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="时间段">
|
||||
<el-input v-model="queryParams.timeRange"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="getList">查询</el-button>
|
||||
<el-button @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table :data="tableData">
|
||||
<el-table-column label="Name" prop="name" />
|
||||
<el-table-column label="Age" prop="age" />
|
||||
<el-table-column label="Address" prop="address" />
|
||||
<el-table-column label="操作">
|
||||
<template #default="{ row }">
|
||||
<el-button type="text" @click="handleDelete(row.id)"
|
||||
>Delete</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"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped></style>
|
43
src/views/admin/agent/bill/trade-auth/index.vue
Normal file
43
src/views/admin/agent/bill/trade-auth/index.vue
Normal file
@ -0,0 +1,43 @@
|
||||
<script setup>
|
||||
import { reactive, toRefs } from "vue";
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
});
|
||||
const { form } = toRefs(data);
|
||||
|
||||
const handleSave = () => {};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="width: 50%; margin: 0 auto">
|
||||
<el-form :model="form" label-width="120px">
|
||||
<el-form-item label="身份证类型">
|
||||
<el-select v-model="form.type" placeholder="请选择">
|
||||
<el-option value="身份证">身份证</el-option>
|
||||
<el-option value="护照">护照</el-option>
|
||||
</el-select>
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证号">
|
||||
<el-input v-model="form.number" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="银行卡号">
|
||||
<el-input v-model="form.bank" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="银行名称">
|
||||
<el-input v-model="form.bankName" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div>
|
||||
<!--保存-->
|
||||
<el-button type="primary" @click="handleSave">保存</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped></style>
|
228
src/views/admin/agent/service/enterprise/index.vue
Normal file
228
src/views/admin/agent/service/enterprise/index.vue
Normal file
@ -0,0 +1,228 @@
|
||||
<script setup>
|
||||
import { reactive, ref, toRefs } from "vue";
|
||||
import FieldSingle from "@/views/components/FieldSingle";
|
||||
import dayjs from "dayjs";
|
||||
import {
|
||||
deleteBrokerEnterprise,
|
||||
insertBrokerEnterprise,
|
||||
listBrokerEnterprise,
|
||||
} from "@/api/admin/agent/service/enterprise";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
|
||||
const router = useRouter();
|
||||
const dataList = ref([]);
|
||||
const loading = ref(true);
|
||||
const total = ref(0);
|
||||
const showSearch = ref(true);
|
||||
const showDialog = ref();
|
||||
const queryRef = ref();
|
||||
const fieldRef = ref();
|
||||
const formRef = ref();
|
||||
const data = reactive({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
enterpriseName: null,
|
||||
},
|
||||
form: {},
|
||||
rules: {
|
||||
enterpriseName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入企业名称",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const resp = await listBrokerEnterprise(queryParams.value);
|
||||
dataList.value = resp.rows;
|
||||
total.value = resp.total;
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
if (queryRef.value) {
|
||||
queryRef.value.resetFields();
|
||||
handleQuery();
|
||||
}
|
||||
};
|
||||
|
||||
const reset = () => {
|
||||
form.value = {
|
||||
enterpriseName: null,
|
||||
industrys: [],
|
||||
};
|
||||
formRef.value?.resetFields();
|
||||
};
|
||||
const handleAdd = () => {
|
||||
reset();
|
||||
showDialog.value = true;
|
||||
};
|
||||
|
||||
const submitForm = async () => {
|
||||
formRef.value.validate(async (valid) => {
|
||||
const fieldValid = await fieldRef.value.validateForm();
|
||||
if (valid && fieldValid) {
|
||||
if (form.value.id) {
|
||||
/*TODO edit*/
|
||||
} else {
|
||||
/*TODO add*/
|
||||
insertBrokerEnterprise(form.value).then(() => {
|
||||
ElMessage.success("新增企业成功");
|
||||
showDialog.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
} else {
|
||||
console.log("校验未通过");
|
||||
}
|
||||
});
|
||||
};
|
||||
const cancel = () => {
|
||||
reset();
|
||||
showDialog.value = false;
|
||||
};
|
||||
|
||||
function handleDelete(id) {
|
||||
ElMessageBox.confirm('是否确认删除数据编号为"' + id + '"的项目?')
|
||||
.then(() => {
|
||||
return deleteBrokerEnterprise(id);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
ElMessage.success("删除成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* go to 技术需求列表
|
||||
* @param id
|
||||
*/
|
||||
const handleTechDemand = (id) => {
|
||||
router.push({
|
||||
path: "/admin/service/technology-demand",
|
||||
query: {
|
||||
id,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
getList();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
v-show="showSearch"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
:model="queryParams"
|
||||
@submit.prevent
|
||||
>
|
||||
<el-form-item label="企业名称" prop="enterpriseName">
|
||||
<el-input
|
||||
v-model="queryParams.enterpriseName"
|
||||
clearable
|
||||
placeholder="请输入企业名称"
|
||||
size="small"
|
||||
@keyup.enter.prevent="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button
|
||||
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>
|
||||
|
||||
<el-row :gutter="10">
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table :data="dataList">
|
||||
<el-table-column align="center" label="企业名称" prop="enterpriseName" />
|
||||
<el-table-column align="center" label="所属领域" prop="industryStr" />
|
||||
<el-table-column align="center" label="需求数量" prop="demandCount" />
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="正在服务需求数"
|
||||
prop="runDemandCount"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="已完成需求数"
|
||||
prop="completeDemandCount"
|
||||
/>
|
||||
<el-table-column align="center" label="添加时间">
|
||||
<template #default="{ row }">
|
||||
{{ dayjs(row.createTime).format("YYYY-MM-DD HH:mm:ss") }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
link
|
||||
size="small"
|
||||
type="text"
|
||||
@click="handleTechDemand(row.enterpriseId)"
|
||||
>技术需求管理</el-button
|
||||
>
|
||||
<el-button link size="small" type="text">成果管理</el-button>
|
||||
<el-button link size="small" type="text" @click="handleDelete(row.id)"
|
||||
>删除</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"
|
||||
/>
|
||||
|
||||
<el-dialog v-model="showDialog" append-to-body width="800px">
|
||||
<el-form ref="formRef" :label-width="120" :model="form" :rules="rules">
|
||||
<el-form-item label="企业名称" prop="enterpriseName">
|
||||
<el-input v-model="form.enterpriseName" />
|
||||
</el-form-item>
|
||||
<field-single ref="fieldRef" v-model="form" />
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped></style>
|
@ -0,0 +1,352 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card shadow="always" style="width: 55%; margin: 0 auto">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:label-width="labelWidth + 'px'"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
>
|
||||
<p><b>基本信息</b></p>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="技术需求名称:" prop="title">
|
||||
<el-input v-model="form.title"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<!-- <el-checkbox label="0" @change="handleCheck">其他</el-checkbox>-->
|
||||
<el-form-item label="需求类别:" prop="kinds">
|
||||
<el-checkbox-group v-model="form.kinds">
|
||||
<el-checkbox
|
||||
v-for="item in checkList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
>{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="20">
|
||||
<el-input
|
||||
v-model="checkInput"
|
||||
placeholder="请输入需求类别"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button type="primary" @click="addCheck">添加</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="需求描述:" prop="introduce">
|
||||
<wangEditor
|
||||
v-model="form.introduce"
|
||||
min-height="150px"
|
||||
placeholder="请输入技术需求内容和详细的技术指标"
|
||||
width="100%"
|
||||
@blur="formRef.validateField(`introduce`)"
|
||||
></wangEditor>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<field-options
|
||||
ref="fieldFormRef"
|
||||
v-model="form"
|
||||
:labelWidth="labelWidth"
|
||||
/>
|
||||
<city-options
|
||||
ref="cityFormRef"
|
||||
v-model="form"
|
||||
:labelWidth="labelWidth"
|
||||
></city-options>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
:prop="form.budgetMode == 1 ? 'budget' : ''"
|
||||
label="成果需求预算:"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.budget"
|
||||
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-width="50px">
|
||||
<el-checkbox
|
||||
v-model="form.budgetMode"
|
||||
false-label="1"
|
||||
true-label="2"
|
||||
>面议
|
||||
</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="截止时间:" prop="deadline">
|
||||
<el-date-picker
|
||||
v-model="form.deadline"
|
||||
placeholder="请选择截止时间"
|
||||
style="width: 100%"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="需求联系人:" prop="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder="请输入需求联系人"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系人手机号:" prop="mobile">
|
||||
<el-input
|
||||
v-model="form.mobile"
|
||||
maxlength="11"
|
||||
placeholder="请输入联系人手机号"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- <el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="需求提交人:" prop="commitUserName">
|
||||
<el-input
|
||||
v-model="form.commitUserName"
|
||||
placeholder="请输入需求提交人"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="需求提交人手机号:" prop="commitUserPhone">
|
||||
<el-input
|
||||
v-model="form.commitUserPhone"
|
||||
placeholder="请输入需求提交人手机号"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row> -->
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<input-box-add
|
||||
ref="directionsFormRef"
|
||||
v-model="form"
|
||||
:labelWidth="labelWidth"
|
||||
class="cooperation-mode"
|
||||
fieldKey="wants"
|
||||
placeholder="合作开发、委托研发、技术转让、技术入股、技术许可"
|
||||
title="合作模式"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<!-- <div :style="{ marginLeft: labelWidth + 'px' }">
|
||||
<el-button @click="router.go(-1)">取消</el-button>
|
||||
<el-button type="primary" @click="submitForm">提交</el-button>
|
||||
</div> -->
|
||||
<div :style="{ marginLeft: labelWidth + 'px' }">
|
||||
<el-button type="primary" @click="submitForm(3)">保存草稿</el-button>
|
||||
<el-button type="primary" @click="submitForm(1)">提交审核</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
// import { expert } from "@/api/identity/index";
|
||||
// import { insertTechnologyDemand } from "@/api/admin/enterprise";
|
||||
import tab from "@/plugins/tab";
|
||||
import CityOptions from "@/views/components/CityOptions";
|
||||
import FieldOptions from "@/views/components/FieldOptions";
|
||||
import InputBoxAdd from "@/views/components/InputBoxAdd";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { getTechnologyDemand } from "@/api/admin/enterprise/demand";
|
||||
import { onMounted, reactive, ref, toRefs } from "vue";
|
||||
import { updateCount } from "@/api/admin/count";
|
||||
import { insertDemand } from "@/api/admin/agent/service/technology-demand";
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const data = reactive({
|
||||
form: {
|
||||
check: [],
|
||||
},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
postCode: undefined,
|
||||
},
|
||||
rules: {
|
||||
title: [{ required: true, message: "需求名称不能为空", trigger: "blur" }],
|
||||
introduce: [
|
||||
{ required: true, message: "需求描述不能为空", trigger: "change" },
|
||||
],
|
||||
name: [{ required: true, message: "需求联系人不能为空", trigger: "blur" }],
|
||||
mobile: [
|
||||
{ required: true, message: "联系人手机号不能为空", trigger: "blur" },
|
||||
{
|
||||
pattern: /^1[3456789]\d{9}$/,
|
||||
message: "手机号格式不正确",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
commitUserName: [
|
||||
{ required: true, message: "需求提交人不能为空", trigger: "blur" },
|
||||
],
|
||||
kinds: [
|
||||
{ required: true, message: "至少选择一个需求类别", trigger: "change" },
|
||||
],
|
||||
budget: [{ required: true, message: "需求预算不能为空", trigger: "blur" }],
|
||||
deadline: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择截止时间",
|
||||
trigger: ["change", "blur"],
|
||||
},
|
||||
],
|
||||
commitUserPhone: [
|
||||
{ required: true, message: "需求提交人手机号不能为空", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const labelWidth = 160;
|
||||
// const isContainOther = ref(false);
|
||||
const checkList = reactive([
|
||||
{
|
||||
id: 1,
|
||||
name: "成果难题解决",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "成果储备/项目投资",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: "新成果开发",
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: "检验检测",
|
||||
},
|
||||
]);
|
||||
|
||||
const formRef = ref(null);
|
||||
const fieldFormRef = ref(null);
|
||||
const directionsFormRef = ref(null);
|
||||
const cityFormRef = ref(null);
|
||||
const checkInput = ref("");
|
||||
const submitForm = async (status) => {
|
||||
let formValid;
|
||||
try {
|
||||
formValid = await formRef.value.validate();
|
||||
} catch (error) {
|
||||
formValid = false;
|
||||
}
|
||||
form.value.status = status;
|
||||
const fieldFormValid = await fieldFormRef.value.validateForm();
|
||||
const directionsFormValid = await directionsFormRef.value.validateForm();
|
||||
const cityFormValid = await cityFormRef.value.validateForm();
|
||||
if (formValid && fieldFormValid && directionsFormValid && cityFormValid) {
|
||||
if (route.query.id) {
|
||||
/*TODO*/
|
||||
/*await updateTechnologyDemand(form.value);
|
||||
ElMessage.success("修改需求成功");*/
|
||||
} else {
|
||||
await insertDemand(form.value);
|
||||
ElMessage.success("新增需求成功");
|
||||
}
|
||||
updateCount("technology");
|
||||
backToList();
|
||||
} else {
|
||||
console.log("校验未通过");
|
||||
}
|
||||
};
|
||||
|
||||
// 返回技术需求列表
|
||||
const backToList = () => {
|
||||
tab.closeOpenPage({ path: "/demand/technology" });
|
||||
};
|
||||
|
||||
const addCheck = () => {
|
||||
if (!checkInput.value.trim().length) return proxy.$modal.msgError("请输入");
|
||||
const flag = checkList.some((item) => {
|
||||
return item.name.trim() === checkInput.value.trim();
|
||||
});
|
||||
if (!flag) {
|
||||
checkList.push({
|
||||
id: checkList.length + 1,
|
||||
name: checkInput.value,
|
||||
});
|
||||
checkInput.value = "";
|
||||
}
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
formRef.value.resetFields();
|
||||
|
||||
if (route.query.id) {
|
||||
const obj = Object.assign({}, route, { title: "修改技术需求" });
|
||||
tab.updatePage(obj);
|
||||
getTechnologyDemand({ id: route.query.id }).then((resp) => {
|
||||
form.value = resp.data;
|
||||
|
||||
if (!form.value.kinds) {
|
||||
form.value.kinds = resp.data.kind?.split(",") ?? [];
|
||||
form.value.kinds.forEach((el, index) => {
|
||||
if (!checkList.find((item) => item.name === el)) {
|
||||
checkList.push({
|
||||
id: index,
|
||||
name: el,
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
if (!form.value.wants) {
|
||||
form.value.wants = resp.data.want?.split(",") ?? [];
|
||||
}
|
||||
});
|
||||
} else {
|
||||
form.value = {
|
||||
check: [],
|
||||
};
|
||||
if (formRef.value) {
|
||||
formRef.value.resetFields();
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.cooperation-mode) {
|
||||
.input-add-bar {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
120
src/views/admin/agent/service/enterprise/technology-demand.vue
Normal file
120
src/views/admin/agent/service/enterprise/technology-demand.vue
Normal file
@ -0,0 +1,120 @@
|
||||
<script setup>
|
||||
import { reactive, ref, toRefs } from "vue";
|
||||
import dayjs from "dayjs";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { technologyDemandList } from "@/api/admin/agent/service/technology-demand";
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const dataList = ref([]);
|
||||
const loading = ref(true);
|
||||
const total = ref(0);
|
||||
const showSearch = ref(true);
|
||||
const queryRef = ref();
|
||||
const formRef = ref();
|
||||
const data = reactive({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
enterpriseId: null,
|
||||
},
|
||||
});
|
||||
const { queryParams } = toRefs(data);
|
||||
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const resp = await technologyDemandList(queryParams.value);
|
||||
dataList.value = resp.rows;
|
||||
total.value = resp.total;
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
function handleResults(row) {
|
||||
router.push({
|
||||
path: "./results",
|
||||
query: {
|
||||
keyword: row.title,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
const handleRelease = () => {
|
||||
router.push({
|
||||
path: "/admin/service/technology-demand-release",
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 前往更新状态页面
|
||||
* @param row
|
||||
*/
|
||||
const handleUpdateStatus = (row) => {
|
||||
router.push({
|
||||
path: "/admin/service/update-status",
|
||||
query: {
|
||||
id: row.id,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
if (route.query.id) {
|
||||
queryParams.value.enterpriseId = route.query.id;
|
||||
getList();
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="10" class="mb8" style="margin-top: 12px">
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table :data="dataList">
|
||||
<!-- 编号 列-->
|
||||
<el-table-column align="center" label="编号" prop="id" />
|
||||
<el-table-column align="center" label="需求名称" prop="title" />
|
||||
<el-table-column align="center" label="所属领域" prop="industryStr" />
|
||||
<el-table-column align="center" label="联系人" prop="name" />
|
||||
<el-table-column align="center" label="手机" prop="mobile" />
|
||||
<el-table-column align="center" label="发布时间" prop="name">
|
||||
<template #default="{ row }">
|
||||
{{ dayjs(row.createTime).format("YYYY-MM-DD HH:mm:ss") }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="截止时间" prop="name">
|
||||
<template #default="{ row }">
|
||||
{{ dayjs(row.deadline).format("YYYY-MM-DD HH:mm:ss") }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="">
|
||||
<template #default="{ row }">
|
||||
<el-button size="small" type="text">删除</el-button>
|
||||
<el-button size="small" type="text" @click="handleResults(row)"
|
||||
>查看匹配结果</el-button
|
||||
>
|
||||
<el-button size="small" type="text" @click="handleUpdateStatus(row)"
|
||||
>更新状态
|
||||
</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"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped></style>
|
242
src/views/admin/agent/service/enterprise/update-status.vue
Normal file
242
src/views/admin/agent/service/enterprise/update-status.vue
Normal file
@ -0,0 +1,242 @@
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import FileUpload from "@/components/FileUpload/index.vue";
|
||||
import {
|
||||
getTechnologyDemandUpdateStatus,
|
||||
updateDemandProcess,
|
||||
} from "@/api/admin/agent/service/technology-demand";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { ElMessage } from "element-plus";
|
||||
|
||||
const active = ref(0); /*active step index*/
|
||||
const updateStatusList = ref([]); /*update status list*/
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const cooperationMemoUrl = ref(""); // 合作备忘录
|
||||
const technicalSolutionUrl = ref(""); // 客户确认技术解决方案
|
||||
const contractUrl = ref(""); // 签署服务合同(合同额)
|
||||
const conclusionUrl = ref(""); // 结题
|
||||
//未结题原因描述
|
||||
const reason = ref("");
|
||||
|
||||
// steps title, description, id
|
||||
const steps = [
|
||||
{
|
||||
title: "合作备忘录",
|
||||
description: "合作备忘录",
|
||||
id: 1,
|
||||
},
|
||||
{
|
||||
title: "客户确认技术解决方案",
|
||||
description: "客户确认技术解决方案",
|
||||
id: 2,
|
||||
},
|
||||
{
|
||||
title: "签署服务合同(合同额)",
|
||||
description: "签署服务合同(合同额)",
|
||||
id: 3,
|
||||
},
|
||||
{
|
||||
title: "结题",
|
||||
description: "结题",
|
||||
id: 4,
|
||||
},
|
||||
{
|
||||
title: "未结题",
|
||||
description: "未结题",
|
||||
id: 5,
|
||||
},
|
||||
];
|
||||
|
||||
const getUpdateStatus = async (demandId) => {
|
||||
const resp = await getTechnologyDemandUpdateStatus({
|
||||
demandId,
|
||||
});
|
||||
updateStatusList.value = resp.data.sort((a, b) => a.sort - b.sort);
|
||||
const reverseIndex = updateStatusList.value.findLastIndex(
|
||||
(item) => item.status === "1"
|
||||
);
|
||||
console.log(updateStatusList.value.length, reverseIndex);
|
||||
active.value = reverseIndex === -1 ? 0 : reverseIndex;
|
||||
};
|
||||
|
||||
const goToStep = (index) => {
|
||||
// if (index <= active.value) {
|
||||
// active.value = index;
|
||||
// }
|
||||
if (
|
||||
(active.value === 3 && index === 4) ||
|
||||
(active.value === 4 && index === 3)
|
||||
) {
|
||||
} else {
|
||||
active.value = index;
|
||||
}
|
||||
};
|
||||
const close = () => {
|
||||
router.go(-1);
|
||||
};
|
||||
const submit = () => {
|
||||
console.log(updateStatusList.value[active.value]);
|
||||
updateDemandProcess({
|
||||
...updateStatusList.value[active.value],
|
||||
status: "1",
|
||||
})
|
||||
.then((resp) => {
|
||||
ElMessage.success("操作成功");
|
||||
})
|
||||
.catch(() => {})
|
||||
.finally(() => {
|
||||
getUpdateStatus(route.query.id);
|
||||
// active.value = updateStatusList.value.findIndex((item) => item.status === "1") + 1;
|
||||
// 反向从列表中查找index
|
||||
});
|
||||
};
|
||||
|
||||
if (route.query.id) {
|
||||
getUpdateStatus(route.query.id);
|
||||
} else {
|
||||
router.go(-1);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<h2 class="page-title">需求状态</h2>
|
||||
<div style="width: 80%; margin: 0 auto">
|
||||
<el-steps :active="active" finish-status="finish" process-status="finish">
|
||||
<el-step
|
||||
v-for="(item, index) in steps"
|
||||
:key="item.id"
|
||||
:status="active === 4 && index === 3 ? 'wait' : ''"
|
||||
:style="`cursor: ${
|
||||
(active === 4 && index === 3) || (active === 3 && index === 4)
|
||||
? 'not-allowed'
|
||||
: 'pointer'
|
||||
}`"
|
||||
:title="item.title"
|
||||
@click="goToStep(index)"
|
||||
>
|
||||
<!-- :status="active === 4 ? 'error' : ''"-->
|
||||
</el-step>
|
||||
</el-steps>
|
||||
<div v-if="updateStatusList.length" class="steps-content">
|
||||
<template
|
||||
v-for="(item, index) in steps.slice(0, active + 1)"
|
||||
:key="item.id"
|
||||
>
|
||||
<div
|
||||
v-if="
|
||||
!(index === 3 && updateStatusList[4].status !== '0') &&
|
||||
!(index === 4 && updateStatusList[3].status !== '0')
|
||||
"
|
||||
:class="`step-item ${active === index ? 'active' : ''}`"
|
||||
>
|
||||
<h3 class="title">{{ index + 1 }}.{{ item.title }}</h3>
|
||||
<div class="form-wrap">
|
||||
<el-form :model="updateStatusList[0]" label-position="top">
|
||||
<el-row v-if="index !== 4" justify="space-between">
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="`上传文件`">
|
||||
<file-upload v-model="updateStatusList[index].files" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
v-if="index === 2 || index === 3"
|
||||
label="金额"
|
||||
>
|
||||
<el-input-number
|
||||
v-model="updateStatusList[index].remark"
|
||||
:controls="false"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item v-else label="未结题原因描述">
|
||||
<el-input
|
||||
v-model="updateStatusList[index].remark"
|
||||
:rows="5"
|
||||
type="textarea"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div v-if="updateStatusList[index].updateTime" class="upload-time">
|
||||
<span>上传时间:</span>
|
||||
<span>{{ updateStatusList[index].updateTime }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div class="steps-action">
|
||||
<el-button @click="close">关闭</el-button>
|
||||
<el-button
|
||||
v-if="
|
||||
updateStatusList.length &&
|
||||
updateStatusList[3]?.status === '0' &&
|
||||
updateStatusList[4]?.status === '0'
|
||||
"
|
||||
type="primary"
|
||||
@click="submit"
|
||||
>提交
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page-title {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.steps-content {
|
||||
margin-top: 36px;
|
||||
|
||||
.step-item {
|
||||
border-radius: 12px;
|
||||
//min-height: 240px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
padding: 12px 24px;
|
||||
|
||||
&.active {
|
||||
background-color: rgba(0, 255, 127, 0.03);
|
||||
}
|
||||
|
||||
.title {
|
||||
margin: 0;
|
||||
text-align: end;
|
||||
font-size: 22px;
|
||||
font-weight: 700;
|
||||
color: #169bd5;
|
||||
}
|
||||
|
||||
.form-wrap {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: end;
|
||||
|
||||
:deep(.el-form) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
:deep(.el-form-item__label) {
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
|
||||
.upload-time {
|
||||
text-align: end;
|
||||
font-size: 14px;
|
||||
color: #909399;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.steps-action {
|
||||
margin-top: 20px;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
}
|
||||
</style>
|
232
src/views/admin/agent/service/matching-demand/detail.vue
Normal file
232
src/views/admin/agent/service/matching-demand/detail.vue
Normal file
@ -0,0 +1,232 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card shadow="always" style="width: 55%; margin: 0 auto">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:label-width="labelWidth + 'px'"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
>
|
||||
<p><b>基本信息</b></p>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="技术需求名称:" prop="title">
|
||||
<el-input v-model="form.title"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="需求描述:" prop="introduce">
|
||||
<wangEditor
|
||||
v-model="form.introduce"
|
||||
min-height="150px"
|
||||
placeholder="请输入技术需求内容和详细的技术指标"
|
||||
width="100%"
|
||||
@blur="formRef.validateField(`introduce`)"
|
||||
></wangEditor>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<field-options
|
||||
ref="fieldFormRef"
|
||||
v-model="form"
|
||||
:labelWidth="labelWidth"
|
||||
/>
|
||||
|
||||
<el-checkbox-group v-model="form.kinds">
|
||||
<el-checkbox
|
||||
v-for="item in checkList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
>{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
:prop="form.budgetMode == 1 ? 'budget' : ''"
|
||||
label="成果需求预算:"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.budget"
|
||||
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-width="50px">
|
||||
<el-checkbox
|
||||
v-model="form.budgetMode"
|
||||
false-label="1"
|
||||
true-label="2"
|
||||
>面议
|
||||
</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="截止时间:" prop="deadline">
|
||||
<el-date-picker
|
||||
v-model="form.deadline"
|
||||
placeholder="请选择截止时间"
|
||||
style="width: 100%"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<div :style="{ marginLeft: labelWidth + 'px' }">
|
||||
<el-button type="primary" @click="">关闭</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
// import { expert } from "@/api/identity/index";
|
||||
// import { insertTechnologyDemand } from "@/api/admin/enterprise";
|
||||
import tab from "@/plugins/tab";
|
||||
import FieldOptions from "@/views/components/FieldOptions";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import {
|
||||
getTechnologyDemand,
|
||||
insertTechnologyDemand,
|
||||
updateTechnologyDemand,
|
||||
} from "@/api/admin/enterprise/demand";
|
||||
import { onMounted, reactive, ref, toRefs } from "vue";
|
||||
import { updateCount } from "../../../../api/admin/count";
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const data = reactive({
|
||||
form: {
|
||||
check: [],
|
||||
},
|
||||
});
|
||||
|
||||
const { form } = toRefs(data);
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const labelWidth = 160;
|
||||
// const isContainOther = ref(false);
|
||||
const checkList = reactive([
|
||||
{
|
||||
id: 1,
|
||||
name: "成果推广",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "关键成果解决",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: "对接专家院士",
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: "上市辅导",
|
||||
},
|
||||
]);
|
||||
|
||||
const formRef = ref(null);
|
||||
const fieldFormRef = ref(null);
|
||||
const directionsFormRef = ref(null);
|
||||
const cityFormRef = ref(null);
|
||||
const checkInput = ref("");
|
||||
const submitForm = async (status) => {
|
||||
let formValid;
|
||||
try {
|
||||
formValid = await formRef.value.validate();
|
||||
} catch (error) {
|
||||
formValid = false;
|
||||
}
|
||||
form.value.status = status;
|
||||
const fieldFormValid = await fieldFormRef.value.validateForm();
|
||||
const directionsFormValid = await directionsFormRef.value.validateForm();
|
||||
const cityFormValid = await cityFormRef.value.validateForm();
|
||||
if (formValid && fieldFormValid && directionsFormValid && cityFormValid) {
|
||||
if (route.query.id) {
|
||||
await updateTechnologyDemand(form.value);
|
||||
ElMessage.success("修改企业需求成功");
|
||||
} else {
|
||||
await insertTechnologyDemand(form.value);
|
||||
ElMessage.success("新增企业需求成功");
|
||||
}
|
||||
updateCount("technology");
|
||||
backToList();
|
||||
} else {
|
||||
console.log("校验未通过");
|
||||
}
|
||||
};
|
||||
|
||||
// 返回技术需求列表
|
||||
const backToList = () => {
|
||||
tab.closeOpenPage({ path: "/demand/technology" });
|
||||
};
|
||||
|
||||
function addCheck() {
|
||||
if (!checkInput.value.trim().length) return ElMessage.error("请输入");
|
||||
const flag = checkList.some((item) => {
|
||||
return item.name.trim() == checkInput.value.trim();
|
||||
});
|
||||
if (!flag) {
|
||||
checkList.push({
|
||||
id: checkList.length + 1,
|
||||
name: checkInput.value,
|
||||
});
|
||||
checkInput.value = "";
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
formRef.value.resetFields();
|
||||
return;
|
||||
if (route.query.id) {
|
||||
getTechnologyDemand({ id: route.query.id }).then((resp) => {
|
||||
form.value = resp.data;
|
||||
|
||||
if (!form.value.kinds) {
|
||||
form.value.kinds = resp.data.kind?.split(",") ?? [];
|
||||
form.value.kinds.forEach((el, index) => {
|
||||
if (!checkList.find((item) => item.name == el)) {
|
||||
checkList.push({
|
||||
id: index,
|
||||
name: el,
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
if (!form.value.wants) {
|
||||
form.value.wants = resp.data.want?.split(",") ?? [];
|
||||
}
|
||||
});
|
||||
} else {
|
||||
form.value = {
|
||||
check: [],
|
||||
};
|
||||
if (formRef.value) {
|
||||
formRef.value.resetFields();
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.cooperation-mode) {
|
||||
.input-add-bar {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
175
src/views/admin/agent/service/matching-demand/index.vue
Normal file
175
src/views/admin/agent/service/matching-demand/index.vue
Normal file
@ -0,0 +1,175 @@
|
||||
<script setup>
|
||||
import { reactive, ref, toRefs } from "vue";
|
||||
import FieldSingle from "@/views/components/FieldSingle";
|
||||
import dayjs from "dayjs";
|
||||
import {
|
||||
insertBrokerEnterprise,
|
||||
listBrokerEnterprise,
|
||||
} from "@/api/admin/agent/service/enterprise";
|
||||
import { ElMessage } from "element-plus";
|
||||
|
||||
const dataList = ref([]);
|
||||
const loading = ref(true);
|
||||
const total = ref(0);
|
||||
const showSearch = ref(true);
|
||||
const showDialog = ref();
|
||||
const queryRef = ref();
|
||||
const fieldRef = ref();
|
||||
const formRef = ref();
|
||||
const data = reactive({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
enterpriseName: null,
|
||||
},
|
||||
form: {},
|
||||
rules: {
|
||||
enterpriseName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入企业名称",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const resp = await listBrokerEnterprise(queryParams.value);
|
||||
dataList.value = resp.rows;
|
||||
total.value = resp.total;
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
if (queryRef.value) {
|
||||
queryRef.value.resetFields();
|
||||
handleQuery();
|
||||
}
|
||||
};
|
||||
|
||||
const reset = () => {
|
||||
form.value = {
|
||||
enterpriseName: null,
|
||||
industrys: [],
|
||||
};
|
||||
formRef.value?.resetFields();
|
||||
};
|
||||
const handleAdd = () => {
|
||||
reset();
|
||||
showDialog.value = true;
|
||||
};
|
||||
|
||||
const submitForm = async () => {
|
||||
formRef.value.validate(async (valid) => {
|
||||
const fieldValid = await fieldRef.value.validateForm();
|
||||
if (valid && fieldValid) {
|
||||
if (form.value.id) {
|
||||
/*TODO edit*/
|
||||
} else {
|
||||
/*TODO add*/
|
||||
insertBrokerEnterprise(form.value).then(() => {
|
||||
ElMessage.success("新增企业成功");
|
||||
});
|
||||
}
|
||||
} else {
|
||||
console.log("校验未通过");
|
||||
}
|
||||
});
|
||||
};
|
||||
const cancel = () => {
|
||||
reset();
|
||||
showDialog.value = false;
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
v-show="showSearch"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
:model="queryParams"
|
||||
>
|
||||
<el-form-item label="企业名称" prop="title">
|
||||
<el-input
|
||||
v-model="queryParams.title"
|
||||
clearable
|
||||
placeholder="请输入企业名称"
|
||||
size="small"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button
|
||||
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>
|
||||
|
||||
<el-table :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="name" />
|
||||
<el-table-column align="center" label="正在服务需求数" prop="name" />
|
||||
<el-table-column align="center" label="已完成需求数" prop="name" />
|
||||
<el-table-column align="center" label="添加时间" prop="name">
|
||||
<template #default="{ row }">
|
||||
{{ dayjs(row.createTime).format("YYYY-MM-DD HH:mm:ss") }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作">
|
||||
<template #default="{ row }">
|
||||
<el-button link size="small" type="primary" @click=""
|
||||
>查看详情</el-button
|
||||
>
|
||||
<el-button link size="small" type="primary">承接需求</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"
|
||||
/>
|
||||
<el-dialog v-model="showDialog" append-to-body width="800px">
|
||||
<el-form ref="formRef" :label-width="120" :model="form" :rules="rules">
|
||||
<el-form-item label="企业名称" prop="enterpriseName">
|
||||
<el-input v-model="form.enterpriseName" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item>-->
|
||||
<field-single ref="fieldRef" v-model="form" />
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <field-options />-->
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped></style>
|
@ -32,6 +32,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({
|
||||
|
@ -1,47 +1,12 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card shadow="always" style="width: 55%; margin: 0 auto">
|
||||
<!-- <p><b>基本资料</b></p>
|
||||
<el-form
|
||||
ref="PersonalInfoFormRef"
|
||||
:model="PersonalInfoForm"
|
||||
:rules="rules"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="姓名:" prop="nickName">
|
||||
<el-input
|
||||
v-model="PersonalInfoForm.nickName"
|
||||
placeholder="请输入姓名"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机:" prop="mobile">
|
||||
<el-input
|
||||
v-model="PersonalInfoForm.mobile"
|
||||
placeholder="请输入手机号"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="邮箱:" prop="email">
|
||||
<el-input v-model="PersonalInfoForm.email" placeholder="请输入邮箱" />
|
||||
</el-form-item>
|
||||
<el-form-item label="职务:" prop="post">
|
||||
<el-input v-model="PersonalInfoForm.post" placeholder="请输入职务" />
|
||||
</el-form-item>
|
||||
<el-form-item label="固定电话:" prop="phone">
|
||||
<el-input
|
||||
v-model="PersonalInfoForm.phone"
|
||||
placeholder="请输入固定电话"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitPersonalInfo">提交</el-button>
|
||||
</el-form-item>
|
||||
</el-form> -->
|
||||
<p><b>企业资料</b></p>
|
||||
<EnterpriseForm
|
||||
ref="enterpriseFormRef"
|
||||
v-model="enterpriseInfoForm"
|
||||
:isAdd="false"
|
||||
:labelWidth="labelWidth"
|
||||
ref="enterpriseFormRef"
|
||||
/>
|
||||
<div :style="{ marginLeft: labelWidth + 'px' }">
|
||||
<el-button type="primary" @click="submitEnterpriseForm">提交</el-button>
|
||||
@ -49,26 +14,16 @@
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script setup name="BasicInfo">
|
||||
<script name="BasicInfo" setup>
|
||||
import { getInfo } from "@/api/login";
|
||||
import { insertClientUser, updateEnterprise } from "@/api/admin/enterprise";
|
||||
// import { expert } from "@/api/identity/index";
|
||||
import { updateEnterprise } from "@/api/admin/enterprise";
|
||||
import EnterpriseForm from "@/views/components/EnterpriseForm";
|
||||
import { ElMessage } from "element-plus";
|
||||
// import { useRouter } from "vue-router";
|
||||
import { reactive, ref, toRefs } from "vue";
|
||||
|
||||
// const router = useRouter();
|
||||
const data = reactive({
|
||||
PersonalInfoForm: {}, // 个人基本资料
|
||||
enterpriseInfoForm: {
|
||||
// laboratory_id: undefined, // 所属实验室
|
||||
// gender: 1,
|
||||
},
|
||||
// queryParams: {
|
||||
// pageNum: 1,
|
||||
// pageSize: 10,
|
||||
// postCode: undefined,
|
||||
// },
|
||||
enterpriseInfoForm: {},
|
||||
rules: {
|
||||
name: [{ required: true, message: "公司名称不能为空", trigger: "blur" }],
|
||||
dutyParagraph: [
|
||||
@ -106,24 +61,9 @@ const getBasicInfo = async () => {
|
||||
};
|
||||
|
||||
const enterpriseFormRef = ref(null);
|
||||
const PersonalInfoFormRef = ref(null);
|
||||
|
||||
const submitPersonalInfo = async () => {
|
||||
try {
|
||||
await PersonalInfoFormRef.value.validate();
|
||||
await insertClientUser(PersonalInfoForm.value);
|
||||
ElMessage.success("更新个人信息成功");
|
||||
const { data } = await getInfo();
|
||||
PersonalInfoForm.value = data.user ?? {};
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
};
|
||||
|
||||
const submitEnterpriseForm = async (status) => {
|
||||
const enterpriseFormValid = await enterpriseFormRef.value.validateForm();
|
||||
// PersonalInfoFormRef.value.validate(
|
||||
// async (valid) => {
|
||||
if (enterpriseFormValid) {
|
||||
await updateEnterprise(enterpriseInfoForm.value);
|
||||
ElMessage.success("更新企业信息成功");
|
||||
@ -132,8 +72,6 @@ const submitEnterpriseForm = async (status) => {
|
||||
} else {
|
||||
console.log("校验未通过");
|
||||
}
|
||||
// };
|
||||
// );
|
||||
};
|
||||
|
||||
getBasicInfo();
|
||||
|
@ -5,7 +5,7 @@
|
||||
size="small"
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-badge :value="12" class="count-badge" :hidden="true">
|
||||
<el-badge :hidden="true" :value="12" class="count-badge">
|
||||
<el-radio-button label="1">企业</el-radio-button>
|
||||
</el-badge>
|
||||
<el-radio-button label="2">成果</el-radio-button>
|
||||
@ -16,24 +16,24 @@
|
||||
<el-radio-button label="8">实验室</el-radio-button>
|
||||
</el-radio-group>
|
||||
|
||||
<div v-if="dataList.length" style="margin-top: 20px" v-loading="loading">
|
||||
<div v-if="dataList.length" v-loading="loading" style="margin-top: 20px">
|
||||
<section v-for="item in dataList" :key="item.id">
|
||||
<div style="border: 1px solid #dcdcdc; margin-bottom: 10px">
|
||||
<enterpriseItem
|
||||
:data="item"
|
||||
v-if="queryParams.searchType == 1"
|
||||
:data="item"
|
||||
></enterpriseItem>
|
||||
<AchievementItem
|
||||
:data="item"
|
||||
v-else-if="queryParams.searchType == 2"
|
||||
:data="item"
|
||||
></AchievementItem>
|
||||
<gainItem
|
||||
:data="item"
|
||||
v-else-if="queryParams.searchType == 4"
|
||||
:data="item"
|
||||
></gainItem>
|
||||
<expertItem
|
||||
:data="item"
|
||||
v-else-if="queryParams.searchType == 5"
|
||||
:data="item"
|
||||
></expertItem>
|
||||
<!-- <serviceDemandItem
|
||||
:data="item"
|
||||
@ -50,15 +50,15 @@
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
v-model:page="queryParams.pageNum"
|
||||
:total="total"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="Post">
|
||||
<script name="Post" setup>
|
||||
import { search } from "@/api/website/home/index";
|
||||
import gainItem from "@/views/website/searchList/components/gainItem.vue";
|
||||
import expertItem from "@/views/website/searchList/components/expertItem.vue";
|
||||
@ -67,6 +67,7 @@ import enterpriseItem from "../../components/enterpriseItem.vue";
|
||||
// import TechnologyDemandItem from "@/views/website/searchList/components/technologyDemandItem.vue";
|
||||
import AchievementItem from "@/views/website/searchList/components/achievementItem.vue";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { computed, reactive, ref, toRefs, watch } from "vue";
|
||||
|
||||
// import { watch } from "vue";
|
||||
|
||||
@ -103,13 +104,20 @@ const queryType = computed(() => {
|
||||
// queryType: queryType,
|
||||
// },
|
||||
// });
|
||||
// watch(
|
||||
// queryType,
|
||||
// (val) => {
|
||||
// console.log(val);
|
||||
// },
|
||||
// { immediate: true }
|
||||
// );
|
||||
watch(
|
||||
queryType,
|
||||
(val) => {
|
||||
console.log(val);
|
||||
router.replace({
|
||||
path: route.path,
|
||||
query: {
|
||||
keyword: route.query.keyword,
|
||||
queryType: val,
|
||||
},
|
||||
});
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
const data = reactive({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
@ -130,6 +138,7 @@ async function getList() {
|
||||
total.value = resp.total;
|
||||
loading.value = false;
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNum = 1;
|
||||
@ -146,6 +155,7 @@ handleQuery();
|
||||
color: #fff;
|
||||
background-color: #787878;
|
||||
}
|
||||
|
||||
:deep(.count-badge) {
|
||||
z-index: 99;
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
size="small"
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-badge :value="12" class="count-badge" :hidden="true">
|
||||
<el-badge :hidden="true" :value="12" class="count-badge">
|
||||
<el-radio-button label="1">企业</el-radio-button>
|
||||
</el-badge>
|
||||
<el-radio-button label="2">成果</el-radio-button>
|
||||
@ -13,9 +13,9 @@
|
||||
<el-radio-button label="5">专家</el-radio-button>
|
||||
<!-- <el-radio-button label="6">服务需求</el-radio-button> -->
|
||||
<el-radio-button label="8">实验室</el-radio-button>
|
||||
<el-radio-button label="7" v-if="route.path != '/demand/results'"
|
||||
>技术需求</el-radio-button
|
||||
>
|
||||
<el-radio-button v-if="route.path != '/demand/results'" label="7"
|
||||
>技术需求
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
|
||||
<!-- <el-row :gutter="20">
|
||||
@ -55,36 +55,36 @@
|
||||
</el-col>
|
||||
</el-row> -->
|
||||
<!-- <el-empty v-if=""></el-empty> -->
|
||||
<div v-if="dataList.length" style="margin-top: 20px" v-loading="loading">
|
||||
<div v-if="dataList.length" v-loading="loading" style="margin-top: 20px">
|
||||
<section v-for="item in dataList" :key="item.id">
|
||||
<div style="border: 1px solid #dcdcdc; margin-bottom: 10px">
|
||||
<enterpriseItem
|
||||
:data="item"
|
||||
v-if="queryParams.searchType == 1"
|
||||
:data="item"
|
||||
></enterpriseItem>
|
||||
<AchievementItem
|
||||
:data="item"
|
||||
v-else-if="queryParams.searchType == 2"
|
||||
:data="item"
|
||||
></AchievementItem>
|
||||
<gainItem
|
||||
:data="item"
|
||||
v-else-if="queryParams.searchType == 4"
|
||||
:data="item"
|
||||
></gainItem>
|
||||
<expertItem
|
||||
:data="item"
|
||||
v-else-if="queryParams.searchType == 5"
|
||||
:data="item"
|
||||
></expertItem>
|
||||
<serviceDemandItem
|
||||
:data="item"
|
||||
v-else-if="queryParams.searchType == 6"
|
||||
:data="item"
|
||||
></serviceDemandItem>
|
||||
<TechnologyDemandItem
|
||||
:data="item"
|
||||
v-else-if="queryParams.searchType == 7"
|
||||
:data="item"
|
||||
></TechnologyDemandItem>
|
||||
<LaboratoryItem
|
||||
:data="item"
|
||||
v-else-if="queryParams.searchType == 8"
|
||||
:data="item"
|
||||
></LaboratoryItem>
|
||||
</div>
|
||||
</section>
|
||||
@ -93,15 +93,15 @@
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
v-model:page="queryParams.pageNum"
|
||||
:total="total"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="Post">
|
||||
<script name="Post" setup>
|
||||
import { search } from "@/api/website/home/index";
|
||||
import gainItem from "@/views/website/searchList/components/gainItem.vue";
|
||||
import expertItem from "@/views/website/searchList/components/expertItem.vue";
|
||||
@ -113,8 +113,11 @@ import AchievementItem from "@/views/website/searchList/components/achievementIt
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
// import useUserStore from "@/store/modules/user";
|
||||
import LaboratoryItem from "@/views/website/searchList/components/laboratoryItem.vue";
|
||||
const route = useRoute();
|
||||
import { reactive, ref, toRefs } from "vue";
|
||||
import { addViewHistory } from "@/utils/view_history";
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
// const router = useRouter();
|
||||
const dataList = ref([]);
|
||||
const loading = ref(true);
|
||||
@ -152,6 +155,14 @@ const data = reactive({
|
||||
|
||||
const { queryParams } = toRefs(data);
|
||||
|
||||
router.replace({
|
||||
path: route.path,
|
||||
query: {
|
||||
keyword: route.query.keyword,
|
||||
queryType: 2,
|
||||
},
|
||||
});
|
||||
|
||||
// watch(
|
||||
// queryType,
|
||||
// (val) => {
|
||||
@ -185,11 +196,13 @@ async function getList() {
|
||||
total.value = resp.total;
|
||||
loading.value = false;
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
// function handleDelete(id) {
|
||||
// proxy.$modal
|
||||
@ -216,6 +229,7 @@ handleQuery();
|
||||
color: #fff;
|
||||
background-color: #787878;
|
||||
}
|
||||
|
||||
:deep(.count-badge) {
|
||||
z-index: 99;
|
||||
}
|
||||
|
@ -26,7 +26,6 @@
|
||||
:label="item.name"
|
||||
>{{ item.name }}
|
||||
</el-checkbox>
|
||||
<!-- <el-checkbox label="0" @change="handleCheck">其他</el-checkbox> -->
|
||||
</el-checkbox-group>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="20">
|
||||
|
@ -60,14 +60,6 @@
|
||||
label="操作"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<!-- <el-button-->
|
||||
<!-- icon="edit"-->
|
||||
<!-- size="small"-->
|
||||
<!-- type="text"-->
|
||||
<!-- @click="handleEdit(row)"-->
|
||||
<!-- >编辑-->
|
||||
<!-- </el-button-->
|
||||
<!-- >-->
|
||||
<el-button
|
||||
icon="Delete"
|
||||
size="small"
|
||||
@ -75,6 +67,13 @@
|
||||
@click="handleDelete(row.id)"
|
||||
>删除
|
||||
</el-button>
|
||||
<el-button
|
||||
icon="view"
|
||||
size="small"
|
||||
type="text"
|
||||
@click="handleBrowseUnitInfo(row.id)"
|
||||
>浏览单位信息
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -273,5 +272,14 @@ function submitForm() {
|
||||
});
|
||||
}
|
||||
|
||||
const handleBrowseUnitInfo = (row) => {
|
||||
router.push({
|
||||
path: "/admin/research/paper/unit-info",
|
||||
query: {
|
||||
id: row.id,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
getList();
|
||||
</script>
|
||||
|
119
src/views/admin/laboratory/research/paper/unit-info.vue
Normal file
119
src/views/admin/laboratory/research/paper/unit-info.vue
Normal file
@ -0,0 +1,119 @@
|
||||
<script setup>
|
||||
import Pagination from "@/components/Pagination/index.vue";
|
||||
import { customerBrowseList } from "@/api/admin/research/footprint";
|
||||
import { reactive, ref, toRefs } from "vue";
|
||||
import { seeLogTypeDict } from "@/constant/dict";
|
||||
|
||||
const data = reactive({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
browseTimeRange: [],
|
||||
},
|
||||
});
|
||||
const { queryParams } = toRefs(data);
|
||||
|
||||
const queryRef = ref();
|
||||
const tableData = ref([]);
|
||||
const loading = ref(false);
|
||||
const total = ref(0);
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const resp = await customerBrowseList(queryParams.value);
|
||||
tableData.value = resp.rows;
|
||||
total.value = resp.total;
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
const resetQuery = () => {
|
||||
if (queryRef.value) {
|
||||
queryRef.value.resetFields();
|
||||
}
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
/**
|
||||
* 搜索按钮操作
|
||||
*/
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param row
|
||||
*/
|
||||
const handleDelete = (row) => {
|
||||
console.log(row);
|
||||
};
|
||||
|
||||
getList();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form ref="queryRef" class="mb8" inline>
|
||||
<!-- 企业名称-->
|
||||
<el-form-item label="企业名称" prop="enterpriseName">
|
||||
<el-input
|
||||
v-model="queryParams.enterpriseName"
|
||||
placeholder="请输入企业名称"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<!-- 浏览时间范围-->
|
||||
<el-form-item label="浏览时间" prop="browseTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.browseTimeRange"
|
||||
end-placeholder="结束日期"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
type="datetimerange"
|
||||
unlink-panels
|
||||
value-format="YYYY-MM-dd"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleQuery">查询</el-button>
|
||||
<el-button @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- 客户浏览数据列表-->
|
||||
<el-table :data="tableData">
|
||||
<!--多选-->
|
||||
<el-table-column type="selection" width="55"></el-table-column>
|
||||
<el-table-column label="企业名称" prop="enterpriseName"></el-table-column>
|
||||
<el-table-column label="浏览类别" prop="type">
|
||||
<template #default="{ row }">
|
||||
<span>{{
|
||||
seeLogTypeDict.find((item) => item.value === row.type)?.label
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="名称" prop="typeName"></el-table-column>
|
||||
<el-table-column label="联系人" prop="nickname"></el-table-column>
|
||||
<el-table-column label="手机" prop="phone"></el-table-column>
|
||||
<el-table-column label="浏览时长" prop="browseTime"></el-table-column>
|
||||
<el-table-column label="浏览次数" prop="seeCount"></el-table-column>
|
||||
<el-table-column label="浏览时间" prop="updateTime"></el-table-column>
|
||||
<!-- 操作-->
|
||||
<el-table-column label="操作" width="200">
|
||||
<template #default="{ row }">
|
||||
<el-button size="small" type="text" @click="handleDelete(row)"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<pagination
|
||||
v-model:limit="queryParams.pageSize"
|
||||
v-model:page="queryParams.pageNum"
|
||||
:total="total"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped></style>
|
119
src/views/admin/research/footprint/browsing-history/index.vue
Normal file
119
src/views/admin/research/footprint/browsing-history/index.vue
Normal file
@ -0,0 +1,119 @@
|
||||
<script setup>
|
||||
import Pagination from "@/components/Pagination/index.vue";
|
||||
import { customerBrowseList } from "@/api/admin/research/footprint";
|
||||
import { reactive, ref, toRefs } from "vue";
|
||||
import { seeLogTypeDict } from "@/constant/dict";
|
||||
|
||||
const data = reactive({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
browseTimeRange: [],
|
||||
},
|
||||
});
|
||||
const { queryParams } = toRefs(data);
|
||||
|
||||
const queryRef = ref();
|
||||
const tableData = ref([]);
|
||||
const loading = ref(false);
|
||||
const total = ref(0);
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const resp = await customerBrowseList(queryParams.value);
|
||||
tableData.value = resp.rows;
|
||||
total.value = resp.total;
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
const resetQuery = () => {
|
||||
if (queryRef.value) {
|
||||
queryRef.value.resetFields();
|
||||
}
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
/**
|
||||
* 搜索按钮操作
|
||||
*/
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param row
|
||||
*/
|
||||
const handleDelete = (row) => {
|
||||
console.log(row);
|
||||
};
|
||||
|
||||
getList();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form ref="queryRef" class="mb8" inline>
|
||||
<!-- 企业名称-->
|
||||
<el-form-item label="企业名称" prop="enterpriseName">
|
||||
<el-input
|
||||
v-model="queryParams.enterpriseName"
|
||||
placeholder="请输入企业名称"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<!-- 浏览时间范围-->
|
||||
<el-form-item label="浏览时间" prop="browseTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.browseTimeRange"
|
||||
end-placeholder="结束日期"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
type="datetimerange"
|
||||
unlink-panels
|
||||
value-format="YYYY-MM-dd"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleQuery">查询</el-button>
|
||||
<el-button @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- 客户浏览数据列表-->
|
||||
<el-table :data="tableData">
|
||||
<!--多选-->
|
||||
<el-table-column type="selection" width="55"></el-table-column>
|
||||
<el-table-column label="企业名称" prop="enterpriseName"></el-table-column>
|
||||
<el-table-column label="浏览类别" prop="type">
|
||||
<template #default="{ row }">
|
||||
<span>{{
|
||||
seeLogTypeDict.find((item) => item.value === row.type)?.label
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="名称" prop="typeName"></el-table-column>
|
||||
<el-table-column label="联系人" prop="nickname"></el-table-column>
|
||||
<el-table-column label="手机" prop="phone"></el-table-column>
|
||||
<el-table-column label="浏览时长" prop="browseTime"></el-table-column>
|
||||
<el-table-column label="浏览次数" prop="seeCount"></el-table-column>
|
||||
<el-table-column label="浏览时间" prop="updateTime"></el-table-column>
|
||||
<!-- 操作-->
|
||||
<el-table-column label="操作" width="200">
|
||||
<template #default="{ row }">
|
||||
<el-button size="small" type="text" @click="handleDelete(row)"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<pagination
|
||||
v-model:limit="queryParams.pageSize"
|
||||
v-model:page="queryParams.pageNum"
|
||||
:total="total"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped></style>
|
@ -33,17 +33,17 @@
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="工作所在地:" prop="workPlace">
|
||||
<el-input v-model="modelValue.workPlace" />
|
||||
<el-form-item label="工作所在地:" prop="wordAddress">
|
||||
<el-input v-model="modelValue.wordAddress" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="工作经历:" prop="workExperience">
|
||||
<el-form-item label="工作经历:" prop="experience">
|
||||
<el-input
|
||||
v-model="modelValue.workExperience"
|
||||
v-model="modelValue.experience"
|
||||
:autosize="{ minRows: 2, maxRows: 10 }"
|
||||
type="textarea"
|
||||
/>
|
||||
@ -51,14 +51,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<InputBoxAdd
|
||||
ref="researchsFormRef"
|
||||
v-model="modelValue"
|
||||
:labelWidth="labelWidth"
|
||||
fieldKey="researchs"
|
||||
placeholder="请输入擅长领域"
|
||||
title="擅长领域"
|
||||
/>
|
||||
<field-options ref="researchsFormRef" v-model="modelValue" />
|
||||
|
||||
<InputBoxAdd
|
||||
ref="keywordsFormRef"
|
||||
@ -74,9 +67,9 @@
|
||||
<el-form-item label="身份证:" required>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="idImage.front">
|
||||
<el-form-item prop="idImage.0">
|
||||
<ImageUpload
|
||||
v-model="modelValue.idImage.front"
|
||||
v-model="modelValue.idImage[0]"
|
||||
:isShowTip="false"
|
||||
:limit="1"
|
||||
/>
|
||||
@ -84,9 +77,9 @@
|
||||
<div style="text-align: center">身份证人像面</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="idImage.behind">
|
||||
<el-form-item prop="idImage.1">
|
||||
<ImageUpload
|
||||
v-model="modelValue.idImage.behind"
|
||||
v-model="modelValue.idImage[1]"
|
||||
:isShowTip="false"
|
||||
:limit="1"
|
||||
/>
|
||||
@ -94,9 +87,9 @@
|
||||
<div style="text-align: center">身份证国徽面</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="idImage.hold">
|
||||
<el-form-item prop="idImage.2">
|
||||
<ImageUpload
|
||||
v-model="modelValue.idImage.hold"
|
||||
v-model="modelValue.idImage[2]"
|
||||
:isShowTip="false"
|
||||
:limit="1"
|
||||
/>
|
||||
@ -110,13 +103,12 @@
|
||||
|
||||
<el-row v-if="isAdd">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="成果经纪资格证书:" prop="credentialImage">
|
||||
<el-form-item label="成果经纪资格证书:" prop="certificatePics">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<image-upload
|
||||
v-model="modelValue.credentialImage"
|
||||
v-model="modelValue.certificatePics"
|
||||
:isShowTip="false"
|
||||
:limit="1"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -127,6 +119,7 @@
|
||||
</template>
|
||||
<script setup>
|
||||
import InputBoxAdd from "../InputBoxAdd";
|
||||
import FieldOptions from "../FieldOptions";
|
||||
import { ref } from "vue";
|
||||
|
||||
const formRef = ref();
|
||||
@ -161,23 +154,30 @@ const rules = {
|
||||
},
|
||||
],
|
||||
idCard: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
workPlace: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
workExperience: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
"idImage.front": [
|
||||
wordAddress: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
experience: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
"idImage.0": [
|
||||
{
|
||||
required: true,
|
||||
message: "请上传",
|
||||
trigger: ["blur", "change"],
|
||||
},
|
||||
],
|
||||
"idImage.behind": [
|
||||
"idImage.1": [
|
||||
{
|
||||
required: true,
|
||||
message: "请上传",
|
||||
trigger: ["blur", "change"],
|
||||
},
|
||||
],
|
||||
"idImage.hold": [
|
||||
"idImage.2": [
|
||||
{
|
||||
required: true,
|
||||
message: "请上传",
|
||||
trigger: ["blur", "change"],
|
||||
},
|
||||
],
|
||||
certificatePics: [
|
||||
{
|
||||
required: true,
|
||||
message: "请上传",
|
||||
|
@ -1,20 +1,20 @@
|
||||
<template>
|
||||
<el-form
|
||||
ref="form"
|
||||
ref="formRef"
|
||||
:label-width="labelWidth + 'px'"
|
||||
:model="modelValue"
|
||||
:rules="rules"
|
||||
:label-width="labelWidth + 'px'"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="所属领域:">
|
||||
<el-row type="flex" justify="space-between">
|
||||
<el-row justify="space-between" type="flex">
|
||||
<el-col :span="7">
|
||||
<el-form-item prop="industrys">
|
||||
<el-form-item prop="industrys.2">
|
||||
<el-select
|
||||
v-model="modelValue.industrys[0]"
|
||||
value-key="id"
|
||||
placeholder="请选择"
|
||||
value-key="id"
|
||||
@change="levelIChange"
|
||||
>
|
||||
<el-option
|
||||
@ -30,8 +30,8 @@
|
||||
<el-col :span="7">
|
||||
<el-select
|
||||
v-model="modelValue.industrys[1]"
|
||||
value-key="id"
|
||||
placeholder="请选择"
|
||||
value-key="id"
|
||||
@change="levelIIChange"
|
||||
>
|
||||
<el-option
|
||||
@ -46,8 +46,8 @@
|
||||
<el-col :span="7">
|
||||
<el-select
|
||||
v-model="modelValue.industrys[2]"
|
||||
value-key="id"
|
||||
placeholder="请选择"
|
||||
value-key="id"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in levelIII"
|
||||
@ -69,6 +69,7 @@
|
||||
import { listSysIndustry } from "@/api/config";
|
||||
// import { watch } from "fs";
|
||||
import { reactive, ref, toRefs, watch } from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: Object,
|
||||
labelWidth: {
|
||||
@ -79,9 +80,9 @@ const props = defineProps({
|
||||
const { modelValue, labelWidth } = toRefs(props);
|
||||
const data = reactive({
|
||||
rules: {
|
||||
industrys: [
|
||||
"industrys.2": [
|
||||
{
|
||||
type: "array",
|
||||
// type: "array",
|
||||
required: true,
|
||||
message: "请选择",
|
||||
trigger: "change",
|
||||
@ -94,7 +95,7 @@ const { rules } = toRefs(data);
|
||||
const levelI = ref([]);
|
||||
const levelII = ref([]);
|
||||
const levelIII = ref([]);
|
||||
|
||||
const formRef = ref();
|
||||
// 获取领域树形列表
|
||||
const getIndustryTreeData = async () => {
|
||||
const { data } = await listSysIndustry();
|
||||
@ -155,6 +156,17 @@ getIndustryTreeData().then(() => {
|
||||
{ immediate: true }
|
||||
);
|
||||
});
|
||||
const validateForm = async () => {
|
||||
try {
|
||||
return await formRef.value.validate();
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
defineExpose({
|
||||
validateForm,
|
||||
});
|
||||
</script>
|
||||
<!-- <script>
|
||||
// import { industry } from "@/api/config";
|
||||
|
@ -12,7 +12,10 @@
|
||||
<script setup>
|
||||
import AgentForm from "@/views/components/AgentForm";
|
||||
import { reactive, ref, toRefs } from "vue";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { insertCasBroker } from "@/api/admin/agent/account";
|
||||
|
||||
const router = useRouter();
|
||||
const props = defineProps({
|
||||
labelWidth: {
|
||||
type: Number,
|
||||
@ -22,7 +25,7 @@ const props = defineProps({
|
||||
const data = reactive({
|
||||
form: {
|
||||
industrys: [],
|
||||
id_image: {},
|
||||
idImage: [],
|
||||
},
|
||||
});
|
||||
const { form } = toRefs(data);
|
||||
@ -31,7 +34,14 @@ const submitForm = async () => {
|
||||
if (!agentFormRef.value) return;
|
||||
const valid = await agentFormRef.value.validateForm();
|
||||
if (valid) {
|
||||
// TODO: submit agent
|
||||
form.value.idCardPics = form.value.idImage.join(",");
|
||||
form.value.keyword = form.value.keywords.join(",");
|
||||
insertCasBroker(form.value).then(() => {
|
||||
ElMessage.success("新增成功");
|
||||
router.push({
|
||||
path: "/identity/index",
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -177,7 +177,7 @@ const handlePage = async (item) => {
|
||||
routeData = router.resolve({ path: "/admin" });
|
||||
} else if (item.id === 5) {
|
||||
// 科技经纪人
|
||||
routeData = router.resolve({ path: "/five" });
|
||||
routeData = router.resolve({ path: "/admin" });
|
||||
}
|
||||
// return window.open(routeData.href, "_blank");
|
||||
// TODO ...... 切换身份待处理
|
||||
|
31
src/views/test.jsx
Normal file
31
src/views/test.jsx
Normal file
@ -0,0 +1,31 @@
|
||||
import { defineComponent } from "vue";
|
||||
|
||||
export default defineComponent({
|
||||
setup(
|
||||
props, // props
|
||||
context // context
|
||||
) {
|
||||
return () => (
|
||||
<div>
|
||||
<h1>Test</h1>
|
||||
{/* element-plus dialog form */}
|
||||
<el-dialog title="Dialog Title" visible={true} width="30%">
|
||||
<el-form>
|
||||
<el-form-item label="Input">
|
||||
<el-input></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="Select">
|
||||
<el-select v-model={props.value}>
|
||||
<el-option label="Option 1" value="1"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button>Cancel</el-button>
|
||||
<el-button type="primary">Confirm</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
});
|
@ -1,3 +1,11 @@
|
||||
<template>
|
||||
<h1>test</h1>
|
||||
<div class="app-container"></div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { reactive, toRefs } from "vue";
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
});
|
||||
const { form } = toRefs(data);
|
||||
</script>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<div class="wrap">
|
||||
<div class="img" v-if="data.image">
|
||||
<div v-if="data.image" class="img">
|
||||
<el-image :src="data.image" alt="" style="height: 150px" />
|
||||
</div>
|
||||
<div v-else-if="data.type == 1" class="type">产品</div>
|
||||
@ -62,9 +62,10 @@
|
||||
// import { maturityOptions } from "@/utils/parameter";
|
||||
import wordcloud from "./wordcloud.vue";
|
||||
// import collectAndVisit from "./collectAndVisit.vue";
|
||||
import { maturityOptions } from "@/utils/parameter.js";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { toRefs } from "vue";
|
||||
import { addViewHistory } from "@/utils/view_history";
|
||||
|
||||
const route = useRoute();
|
||||
|
||||
const router = useRouter();
|
||||
@ -75,7 +76,9 @@ const props = defineProps({
|
||||
},
|
||||
});
|
||||
const { data } = toRefs(props);
|
||||
|
||||
function handleDetail(id) {
|
||||
addViewHistory(2, id, data.value.title);
|
||||
console.log(data.value);
|
||||
let path;
|
||||
if (data.value.type == 1) {
|
||||
@ -114,9 +117,11 @@ function createdData(arr) {
|
||||
background: #ffffff;
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
|
||||
.wrap {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
.type {
|
||||
width: 200px;
|
||||
height: 150px;
|
||||
@ -135,10 +140,12 @@ function createdData(arr) {
|
||||
// height: 100%;
|
||||
// }
|
||||
}
|
||||
|
||||
.img {
|
||||
width: 200px;
|
||||
height: 150px;
|
||||
margin-right: 10px;
|
||||
|
||||
img {
|
||||
display: block;
|
||||
margin: 0;
|
||||
@ -146,16 +153,19 @@ function createdData(arr) {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.keywords {
|
||||
width: 129px;
|
||||
height: 129px;
|
||||
}
|
||||
|
||||
.content {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
|
||||
.labelList {
|
||||
overflow: hidden;
|
||||
|
||||
div {
|
||||
padding: 2px 4px;
|
||||
float: left;
|
||||
@ -176,6 +186,7 @@ function createdData(arr) {
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
margin: 10px 0;
|
||||
|
||||
span {
|
||||
font-size: 16px;
|
||||
font-family: Source Han Sans CN;
|
||||
@ -183,6 +194,7 @@ function createdData(arr) {
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
|
||||
.tit {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
@ -73,6 +73,8 @@
|
||||
import logo from "@/assets/logo/avatar.png";
|
||||
import wordcloud from "./wordcloud.vue";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { addViewHistory } from "@/utils/view_history";
|
||||
import { toRefs } from "vue";
|
||||
// import collectAndVisit from "./collectAndVisit.vue";
|
||||
|
||||
const route = useRoute();
|
||||
@ -83,8 +85,9 @@ const props = defineProps({
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
||||
const { data } = toRefs(props);
|
||||
function handleDetail(id) {
|
||||
addViewHistory(4, id, data.value.name);
|
||||
let routeData = router.resolve({
|
||||
path: `/searchList/expert/detail/${id}`,
|
||||
query: {
|
||||
|
@ -45,10 +45,10 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { maturityOptions } from "@/utils/parameter";
|
||||
import wordcloud from "./wordcloud.vue";
|
||||
import collectAndVisit from "./collectAndVisit.vue";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { addViewHistory } from "@/utils/view_history";
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const props = defineProps({
|
||||
@ -57,8 +57,9 @@ const props = defineProps({
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
||||
const { data } = toRefs(props);
|
||||
function handleDetail(id) {
|
||||
addViewHistory(1, id, data.value.title);
|
||||
let routeData = router.resolve({
|
||||
path: `/searchList/patent/detail/${id}`,
|
||||
query: {
|
||||
@ -88,9 +89,11 @@ function createdData(arr) {
|
||||
background: #ffffff;
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
|
||||
.wrap {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
.type {
|
||||
width: 200px;
|
||||
height: 150px;
|
||||
@ -109,16 +112,19 @@ function createdData(arr) {
|
||||
// height: 100%;
|
||||
// }
|
||||
}
|
||||
|
||||
.keywords {
|
||||
width: 129px;
|
||||
height: 129px;
|
||||
}
|
||||
|
||||
.content {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
|
||||
.labelList {
|
||||
overflow: hidden;
|
||||
|
||||
div {
|
||||
padding: 2px 4px;
|
||||
float: left;
|
||||
@ -139,6 +145,7 @@ function createdData(arr) {
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
margin: 10px 0;
|
||||
|
||||
span {
|
||||
font-size: 16px;
|
||||
font-family: Source Han Sans CN;
|
||||
@ -146,6 +153,7 @@ function createdData(arr) {
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
|
||||
.tit {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
Reference in New Issue
Block a user