需求省市区
This commit is contained in:
25
src/api/website/activity/index.js
Normal file
25
src/api/website/activity/index.js
Normal file
@ -0,0 +1,25 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
// 活动报名
|
||||
export function signUpActivity(data) {
|
||||
return request({
|
||||
url: "/app/activity",
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
}
|
||||
// 活动列表
|
||||
export const activitysList = (params) => {
|
||||
return request({
|
||||
url: "/app/getActivitys",
|
||||
method: "GET",
|
||||
params,
|
||||
});
|
||||
};
|
||||
// 活动详情
|
||||
export const activityDetail = (id) => {
|
||||
return request({
|
||||
url: `/app/getActivity/${id}`,
|
||||
method: "GET",
|
||||
});
|
||||
};
|
@ -122,16 +122,18 @@ const submitPersonalInfo = async () => {
|
||||
|
||||
const submitEnterpriseForm = async (status) => {
|
||||
const enterpriseFormValid = await enterpriseFormRef.value.validateForm();
|
||||
PersonalInfoFormRef.value.validate(async (valid) => {
|
||||
if (enterpriseFormValid && valid) {
|
||||
await updateEnterprise(enterpriseInfoForm.value);
|
||||
ElMessage.success("更新企业信息成功");
|
||||
const { data } = await getInfo();
|
||||
enterpriseInfoForm.value = data.enterprise ?? {};
|
||||
} else {
|
||||
console.log("校验未通过");
|
||||
}
|
||||
});
|
||||
// PersonalInfoFormRef.value.validate(
|
||||
// async (valid) => {
|
||||
if (enterpriseFormValid) {
|
||||
await updateEnterprise(enterpriseInfoForm.value);
|
||||
ElMessage.success("更新企业信息成功");
|
||||
const { data } = await getInfo();
|
||||
enterpriseInfoForm.value = data.enterprise ?? {};
|
||||
} else {
|
||||
console.log("校验未通过");
|
||||
}
|
||||
// };
|
||||
// );
|
||||
};
|
||||
|
||||
getBasicInfo();
|
||||
|
@ -94,6 +94,7 @@ const data = reactive({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
notifyCrowd: "1",
|
||||
title: undefined,
|
||||
status: undefined,
|
||||
},
|
||||
|
@ -111,7 +111,7 @@
|
||||
</template>
|
||||
<script setup>
|
||||
// import { insertDemand } from "@/api/admin/enterprise";
|
||||
import tab from "../../../../plugins/tab";
|
||||
import tab from "@/plugins/tab";
|
||||
import {
|
||||
insertDemand,
|
||||
getDemand,
|
||||
@ -128,7 +128,7 @@ const route = useRoute();
|
||||
const data = reactive({
|
||||
form: {
|
||||
check: [],
|
||||
status: 1,
|
||||
status: 0,
|
||||
},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
@ -173,21 +173,22 @@ const checkList = reactive([
|
||||
},
|
||||
]);
|
||||
const checkInput = ref("");
|
||||
const cityFormRef = ref();
|
||||
// const cityFormRef = ref();
|
||||
const formRef = ref();
|
||||
const submitForm = () => {
|
||||
formRef.value.validate(async (valid) => {
|
||||
const cityFormValid = cityFormRef.value.validateForm(); // 城市
|
||||
if (valid && cityFormValid) {
|
||||
// const cityFormValid = cityFormRef.value.validateForm(); // 城市
|
||||
if (valid) {
|
||||
if (form.value.id != undefined) {
|
||||
await updateDemand(form.value);
|
||||
ElMessage.success("修改成功");
|
||||
router.back();
|
||||
// router.back();
|
||||
} else {
|
||||
await insertDemand(form.value);
|
||||
ElMessage.success("新增服务需求成功");
|
||||
router.back();
|
||||
// router.back();
|
||||
}
|
||||
backToList();
|
||||
}
|
||||
});
|
||||
};
|
||||
@ -230,7 +231,7 @@ onMounted(() => {
|
||||
} else {
|
||||
form.value = {
|
||||
check: [],
|
||||
status: 1,
|
||||
status: 0,
|
||||
};
|
||||
if (formRef.value) {
|
||||
formRef.value.resetFields();
|
||||
|
@ -58,16 +58,16 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<FieldOptions
|
||||
<field-options
|
||||
v-model="form"
|
||||
:labelWidth="labelWidth"
|
||||
ref="fieldFormRef"
|
||||
/>
|
||||
<CityOptions
|
||||
<city-options
|
||||
v-model="form"
|
||||
:labelWidth="labelWidth"
|
||||
ref="cityFormRef"
|
||||
></CityOptions>
|
||||
></city-options>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
@ -124,6 +124,7 @@
|
||||
<el-form-item label="联系人手机号:" prop="mobile">
|
||||
<el-input
|
||||
v-model="form.mobile"
|
||||
maxlength="11"
|
||||
placeholder="请输入联系人手机号"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
@ -151,7 +152,7 @@
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<InputBoxAdd
|
||||
<input-box-add
|
||||
class="cooperation-mode"
|
||||
:labelWidth="labelWidth"
|
||||
v-model="form"
|
||||
@ -177,6 +178,7 @@
|
||||
<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";
|
||||
@ -207,6 +209,11 @@ const data = reactive({
|
||||
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" },
|
||||
@ -276,7 +283,7 @@ const submitForm = async (status) => {
|
||||
await insertTechnologyDemand(form.value);
|
||||
ElMessage.success("新增企业需求成功");
|
||||
}
|
||||
router.go(-1);
|
||||
backToList();
|
||||
} else {
|
||||
console.log("校验未通过");
|
||||
}
|
||||
@ -316,6 +323,11 @@ function addCheck() {
|
||||
checkInput.value = "";
|
||||
}
|
||||
}
|
||||
// 返回技术需求列表
|
||||
const backToList = () => {
|
||||
tab.closeOpenPage({ path: "/demand/technology" });
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
formRef.value.resetFields();
|
||||
|
||||
|
@ -19,7 +19,8 @@
|
||||
>
|
||||
<el-radio-button :label="0">待受理</el-radio-button>
|
||||
<el-radio-button :label="1">已受理</el-radio-button>
|
||||
<el-radio-button :label="2">已结束</el-radio-button>
|
||||
<el-radio-button :label="2">已驳回</el-radio-button>
|
||||
<el-radio-button :label="4">已结束</el-radio-button>
|
||||
</el-radio-group>
|
||||
|
||||
<el-table v-loading="loading" :data="dataList" style="margin-top: 20px">
|
||||
@ -43,13 +44,13 @@
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template #default="scope">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-if="queryParams.type == 2"
|
||||
size="small"
|
||||
type="text"
|
||||
icon="Delete"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
@click="handleDelete(row.id)"
|
||||
>删除</el-button
|
||||
>
|
||||
<el-button
|
||||
@ -57,7 +58,7 @@
|
||||
size="small"
|
||||
type="text"
|
||||
icon="Close"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
@click="handleDelete(row.id)"
|
||||
>取消发布</el-button
|
||||
>
|
||||
<el-button
|
||||
@ -65,9 +66,16 @@
|
||||
size="small"
|
||||
type="text"
|
||||
icon="View"
|
||||
@click="handleEdit(scope.row.id)"
|
||||
@click="handleEdit(row.id)"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button
|
||||
size="small"
|
||||
type="text"
|
||||
icon="View"
|
||||
@click="complete(row.id)"
|
||||
>完成</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -84,6 +92,8 @@
|
||||
|
||||
<script setup>
|
||||
import { demandList } from "@/api/admin/enterprise";
|
||||
import { updateDemand } from "@/api/admin/enterprise/demand";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { onActivated } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
@ -151,20 +161,31 @@ function resetQuery() {
|
||||
}
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(id) {
|
||||
proxy.$modal
|
||||
.confirm('是否确认删除订单号为"' + id + '"的数据项?')
|
||||
ElMessageBox.confirm('是否确认删除订单号为"' + id + '"的数据项?')
|
||||
.then(function () {
|
||||
return demandDelete(postIds);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
ElMessage.success("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
function handleEdit(id) {
|
||||
router.push({ path: "./releaseService", query: { id } });
|
||||
}
|
||||
|
||||
// 修改为完成状态
|
||||
const complete = (id) => {
|
||||
ElMessageBox.confirm(`是否确认结束编号为${id}的数据项?`)
|
||||
.then(async () => {
|
||||
await updateDemand({ id, status: 4 });
|
||||
getList();
|
||||
ElMessage.success("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
};
|
||||
|
||||
getList();
|
||||
onActivated(() => {
|
||||
getList();
|
||||
|
@ -17,6 +17,7 @@
|
||||
<el-radio-button :label="1">已发布</el-radio-button>
|
||||
<el-radio-button :label="2">已驳回</el-radio-button>
|
||||
<el-radio-button :label="3">草稿箱</el-radio-button>
|
||||
<el-radio-button :label="4">已结束</el-radio-button>
|
||||
</el-radio-group>
|
||||
|
||||
<el-table v-loading="loading" :data="dataList" style="margin-top: 20px">
|
||||
@ -80,8 +81,16 @@
|
||||
size="small"
|
||||
type="text"
|
||||
icon="Close"
|
||||
@click="cancelPub(row.id)"
|
||||
>取消发布</el-button
|
||||
>
|
||||
<el-button
|
||||
size="small"
|
||||
type="text"
|
||||
icon="View"
|
||||
@click="complete(row.id)"
|
||||
>完成</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -100,6 +109,7 @@
|
||||
import {
|
||||
technologyDemandList,
|
||||
deleteTechnologyDemand,
|
||||
updateTechnologyDemand,
|
||||
} from "@/api/admin/enterprise/demand";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { useRouter } from "vue-router";
|
||||
@ -202,5 +212,25 @@ function handleResults(row) {
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
// 修改为完成状态
|
||||
const complete = (id) => {
|
||||
ElMessageBox.confirm(`是否确认结束编号为${id}的数据项?`)
|
||||
.then(async () => {
|
||||
await updateTechnologyDemand({ id, status: 4 });
|
||||
getList();
|
||||
ElMessage.success("结束成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
};
|
||||
const cancelPub = (id) => {
|
||||
ElMessageBox.confirm(`是否确认取消发布编号为${id}的数据项?`)
|
||||
.then(async () => {
|
||||
await updateTechnologyDemand({ id, status: 3 });
|
||||
getList();
|
||||
ElMessage.success("取消发布成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
};
|
||||
getList();
|
||||
</script>
|
||||
|
@ -16,7 +16,8 @@
|
||||
</template>
|
||||
<script setup name="ReleaseProduct">
|
||||
import ReleaseForm from "@/views/components/ReleaseForm";
|
||||
import { ElMessage } from "element-plus";
|
||||
import tab from "@/plugins/tab";
|
||||
import { ElMessage, tabBarProps } from "element-plus";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import {
|
||||
getProductById,
|
||||
@ -25,7 +26,7 @@ import {
|
||||
} from "@/api/admin/enterprise/product";
|
||||
import { reactive, toRefs } from "vue";
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
// const router = useRouter();
|
||||
const labelWidth = 140;
|
||||
// const = reactive({});
|
||||
const data = reactive({
|
||||
@ -34,10 +35,11 @@ const data = reactive({
|
||||
const { form } = toRefs(data);
|
||||
const releaseFormRef = ref();
|
||||
const submitForm = async (is_submit) => {
|
||||
form.value["status"] = is_submit;
|
||||
// console.log(await releaseFormRef.value.validateForm());
|
||||
const isValid = await releaseFormRef.value.validateForm();
|
||||
if (isValid) {
|
||||
form.value["status"] = is_submit;
|
||||
console.log(form.value.cooperationModeArr.join(","));
|
||||
form.value.cooperationMode = form.value.cooperationModeArr.join(",");
|
||||
if (route.query.id) {
|
||||
await updateEnterpriseProduct(form.value);
|
||||
ElMessage.success("修改产品成功");
|
||||
@ -45,7 +47,8 @@ const submitForm = async (is_submit) => {
|
||||
await insertEnterpriseProduct(form.value);
|
||||
ElMessage.success("新增产品成功");
|
||||
}
|
||||
router.go(-1);
|
||||
// router.go(-1);
|
||||
tab.closeOpenPage({ path: "/extension/product" });
|
||||
} else {
|
||||
console.log("验证未通过");
|
||||
}
|
||||
@ -55,6 +58,9 @@ const submitForm = async (is_submit) => {
|
||||
const getProductDetail = async (id) => {
|
||||
const { data } = await getProductById({ id });
|
||||
form.value = data;
|
||||
form.value.cooperationModeArr = data.cooperationMode
|
||||
? data.cooperationMode.split(",")
|
||||
: [];
|
||||
};
|
||||
|
||||
if (route.query.id) {
|
||||
|
@ -9,7 +9,7 @@
|
||||
</div> -->
|
||||
<!-- <div class="text-right">续期</div> -->
|
||||
<div v-if="vipData.vipType == 1">升级SVIP</div>
|
||||
<div v-else-if="vipData.vipType == 0">普通会员</div>
|
||||
<div v-else-if="!vipData.vipType">普通会员</div>
|
||||
</div>
|
||||
<div
|
||||
class="text-right"
|
||||
@ -24,12 +24,7 @@
|
||||
<span class="pointer" style="font-size: 14px" @click="vipBenefits">
|
||||
查看会员权益
|
||||
</span>
|
||||
<p
|
||||
class="text-center pointer"
|
||||
v-if="!vipData.vipType || vipData.vipType == 0"
|
||||
>
|
||||
开通VIP
|
||||
</p>
|
||||
<p class="text-center pointer" v-if="!vipData.vipType">开通VIP</p>
|
||||
</div>
|
||||
<!--
|
||||
<div class="card-panel surplus-currency">
|
||||
|
@ -105,6 +105,7 @@ const data = reactive({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
notifyCrowd: "2",
|
||||
title: undefined,
|
||||
status: undefined,
|
||||
},
|
||||
|
@ -104,7 +104,7 @@
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div :style="{ marginLeft: labelWidth + 'px' }">
|
||||
<el-button @click="router.go(-1)">取消</el-button>
|
||||
<el-button @click="back">取消</el-button>
|
||||
<el-button type="primary" @click="submitForm">提交</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
@ -113,6 +113,7 @@
|
||||
<script setup>
|
||||
// import { expert } from "@/api/identity/index";
|
||||
import { insertDemand } from "@/api/admin/expert/demand";
|
||||
import tab from "@/plugins/tab";
|
||||
// import CityOptions from "@/views/components/CityOptions";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
@ -180,6 +181,10 @@ const formRef = ref();
|
||||
|
||||
if (route.query.id) {
|
||||
}
|
||||
|
||||
const back = () => {
|
||||
tab.closeOpenPage({ path: "/demand/serviceDemand" });
|
||||
};
|
||||
const labelWidth = 140;
|
||||
// const isContainOther = ref(false);
|
||||
const checkList = reactive([
|
||||
@ -206,6 +211,7 @@ async function submitForm() {
|
||||
console.log(wangEditorRef.value.isEmpty());
|
||||
await formRef.value.validate();
|
||||
if (formData.value.id) {
|
||||
// TODO: 修改专家需求
|
||||
// updatePost(form.value).then((response) => {
|
||||
// proxy.$modal.msgSuccess("修改成功");
|
||||
// proxy.$router.go(-1);
|
||||
@ -213,8 +219,9 @@ async function submitForm() {
|
||||
} else {
|
||||
await insertDemand(formData.value);
|
||||
ElMessage.success("新增成功");
|
||||
router.back();
|
||||
// router.back();
|
||||
}
|
||||
tab.closeOpenPage({ path: "/demand/serviceDemand" });
|
||||
}
|
||||
function addCheck() {
|
||||
if (!checkInput.value.trim().length) return proxy.$modal.msgError("请输入");
|
||||
|
@ -19,7 +19,8 @@
|
||||
>
|
||||
<el-radio-button :label="0">待受理</el-radio-button>
|
||||
<el-radio-button :label="1">已受理</el-radio-button>
|
||||
<el-radio-button :label="2">已结束</el-radio-button>
|
||||
<el-radio-button :label="2">已驳回</el-radio-button>
|
||||
<el-radio-button :label="4">已结束</el-radio-button>
|
||||
</el-radio-group>
|
||||
|
||||
<el-table v-loading="loading" :data="dataList" style="margin-top: 20px">
|
||||
@ -68,6 +69,9 @@
|
||||
@click="handleEdit(scope.row.id)"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button type="text" size="small" @click="complete(row.id)"
|
||||
>完成</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -165,6 +169,17 @@ function handleDelete(id) {
|
||||
function handleEdit(id) {
|
||||
router.push({ path: "./release", query: { id } });
|
||||
}
|
||||
// 修改为完成状态
|
||||
const complete = (id) => {
|
||||
ElMessageBox.confirm(`是否确认结束编号为${id}的数据项?`)
|
||||
.then(async () => {
|
||||
await updateCasDemand({ id, status: 4 });
|
||||
getList();
|
||||
ElMessage.success("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
};
|
||||
|
||||
getList();
|
||||
onActivated(() => {
|
||||
getList();
|
||||
|
@ -24,16 +24,16 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="联系人" prop="name">
|
||||
<el-input v-model="modelValue.name"></el-input>
|
||||
<el-form-item label="联系人" prop="username">
|
||||
<el-input v-model="modelValue.username"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="联系方式" prop="mobilephone">
|
||||
<el-form-item label="联系方式" prop="phone">
|
||||
<el-input
|
||||
v-model="modelValue.mobilephone"
|
||||
v-model="modelValue.phone"
|
||||
:maxlength="11"
|
||||
oninput="
|
||||
value = value
|
||||
@ -52,8 +52,8 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="邮箱" prop="name">
|
||||
<el-input v-model="modelValue.name"></el-input>
|
||||
<el-form-item label="邮箱" prop="email">
|
||||
<el-input v-model="modelValue.email"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -225,6 +225,23 @@ const data = reactive({
|
||||
rules: {
|
||||
product: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
name: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
username: [{ required: true, message: "请输入联系人", trigger: "blur" }],
|
||||
phone: [
|
||||
{ required: true, message: "请输入联系方式", trigger: "blur" },
|
||||
{
|
||||
pattern: /^1[3456789]\d{9}$/,
|
||||
message: "手机号格式不正确",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
email: [
|
||||
{ required: true, message: "请输入邮箱", trigger: "blur" },
|
||||
{
|
||||
pattern: /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,
|
||||
message: "邮箱格式不正确",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
kind: [{ required: true, message: "请选择", trigger: "change" }],
|
||||
code: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
mobile: [
|
||||
|
@ -81,11 +81,16 @@
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="毕业院校:" prop="school">
|
||||
<el-input v-model="modelValue.school"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属研究机构:" prop="organization">
|
||||
<el-input v-model="modelValue.organization"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
@ -225,6 +230,7 @@ const data = reactive({
|
||||
},
|
||||
],
|
||||
school: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
organization: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
education: [{ required: true, message: "请选择", trigger: "change" }],
|
||||
major: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
job: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
|
@ -21,9 +21,9 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="联系人:" prop="title">
|
||||
<el-form-item label="联系人:" prop="username">
|
||||
<el-input
|
||||
v-model="modelValue.title"
|
||||
v-model="modelValue.username"
|
||||
placeholder="请输入联系人"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
@ -31,26 +31,26 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="联系方式:" prop="title">
|
||||
<el-form-item label="联系方式:" prop="phone">
|
||||
<el-input
|
||||
v-model="modelValue.title"
|
||||
v-model="modelValue.phone"
|
||||
maxlength="11"
|
||||
placeholder="请输入联系方式"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<FieldOptions
|
||||
<field-options
|
||||
v-model="modelValue"
|
||||
:labelWidth="labelWidth"
|
||||
ref="fieldFormRef"
|
||||
/>
|
||||
<CityOptions
|
||||
<city-options
|
||||
v-model="modelValue"
|
||||
:labelWidth="labelWidth"
|
||||
ref="cityFormRef"
|
||||
></CityOptions>
|
||||
<InputBoxAdd
|
||||
></city-options>
|
||||
<input-box-add
|
||||
:labelWidth="labelWidth"
|
||||
v-model="modelValue"
|
||||
title="应用客户"
|
||||
@ -80,7 +80,7 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="成果领先性:" prop="leadStandard">
|
||||
<el-form-item label="产品领先性:" prop="leadStandard">
|
||||
<el-select
|
||||
v-model="modelValue.leadStandard"
|
||||
clearable
|
||||
@ -101,7 +101,7 @@
|
||||
<el-col :span="24">
|
||||
<el-form-item label="合作模式:">
|
||||
<el-select
|
||||
v-model="modelValue.cooperationMode"
|
||||
v-model="modelValue.cooperationModeArr"
|
||||
clearable
|
||||
multiple
|
||||
placeholder="请选择"
|
||||
@ -118,7 +118,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<InputBoxAdd
|
||||
<input-box-add
|
||||
:labelWidth="labelWidth"
|
||||
v-model="modelValue"
|
||||
title="关键词"
|
||||
@ -173,7 +173,7 @@ import {
|
||||
cooperationOptions,
|
||||
} from "@/utils/parameter";
|
||||
import { reactive, toRefs } from "vue";
|
||||
import VideoUpload from "@/components/VideoUpload";
|
||||
// import VideoUpload from "@/components/VideoUpload";
|
||||
// import { researchSelect, laboratorySelect } from "@/api/identity/index";
|
||||
|
||||
const props = defineProps({
|
||||
@ -198,6 +198,23 @@ const data = reactive({
|
||||
// product: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
title: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
kind: [{ required: true, message: "请选择", trigger: "change" }],
|
||||
username: [{ required: true, message: "请输入联系人", trigger: "blur" }],
|
||||
phone: [
|
||||
{ required: true, message: "请输入联系方式", trigger: "blur" },
|
||||
{
|
||||
pattern: /^1[3456789]\d{9}$/,
|
||||
message: "手机号格式不正确",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
email: [
|
||||
{ required: true, message: "请输入邮箱", trigger: "blur" },
|
||||
{
|
||||
pattern: /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,
|
||||
message: "邮箱格式不正确",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
// code: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
// mobile: [
|
||||
// { required: true, message: "请输入", trigger: "blur" },
|
||||
|
@ -60,37 +60,46 @@
|
||||
>
|
||||
<div class="_l">
|
||||
<el-image
|
||||
style="width: 358px; height: 200px; vertical-align: middle"
|
||||
style="width: 358px; height: 220px; vertical-align: middle"
|
||||
:src="item.image"
|
||||
fit="fill"
|
||||
></el-image>
|
||||
</div>
|
||||
<div class="_r">
|
||||
<div class="_r" style="position: relative">
|
||||
<p class="text_hidden">{{ item.title }}</p>
|
||||
<div class="_time">活动时间:{{ item.beginTime }}</div>
|
||||
<div class="_time">收费金额:{{ item.amount }}</div>
|
||||
<div class="_info" style="visibility: hidden">
|
||||
<!-- <span class="fl"
|
||||
<div class="_time">联系人:{{ item.contact }}</div>
|
||||
<div class="_time">联系方式:{{ item.contactMobile }}</div>
|
||||
<!-- <div class="_info"> -->
|
||||
<!-- <span class="fl"
|
||||
><span class="x_blue">{{ item.user }}</span> 人报名</span
|
||||
> -->
|
||||
<el-button class="fr x_btns" v-if="item.status == 1" disabled
|
||||
<!-- <el-button class="fr x_btns" v-if="item.enrollFlag" disabled
|
||||
>已报名</el-button
|
||||
>
|
||||
<el-button
|
||||
v-else-if="item.status == 2"
|
||||
class="fr x16 x_blue x_border_blue"
|
||||
style="border-radius: 0"
|
||||
> -->
|
||||
<!-- v-else-if="item.status == 2" -->
|
||||
<!-- <el-button
|
||||
class="x16 x_blue x_border_blue"
|
||||
v-else
|
||||
style="
|
||||
border-radius: 0;
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
bottom: 0;
|
||||
"
|
||||
@click="handleClickSignUp(item.id, $event)"
|
||||
>报名</el-button
|
||||
>
|
||||
<el-button
|
||||
> -->
|
||||
<!-- <el-button
|
||||
v-else
|
||||
class="fr x16"
|
||||
style="border-radius: 0"
|
||||
type="info"
|
||||
disabled
|
||||
>已结束</el-button
|
||||
>
|
||||
</div>
|
||||
> -->
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -129,9 +138,23 @@
|
||||
{{ selectedActivity.finishTime }}
|
||||
</p>
|
||||
<p class="_place">活动地点:{{ selectedActivity.address }}</p>
|
||||
<p class="_user" style="display: none">
|
||||
<el-button class="x_btns" disabled>已报名</el-button>
|
||||
<span class="_num"><span class="x_blue">16</span> 人报名</span>
|
||||
<p class="_place">联系人:{{ selectedActivity.contact }}</p>
|
||||
<p class="_place">联系方式:{{ selectedActivity.contactMobile }}</p>
|
||||
<p class="_user">
|
||||
<el-button
|
||||
v-if="selectedActivity.enrollFlag"
|
||||
class="x_btns"
|
||||
disabled
|
||||
>已报名</el-button
|
||||
>
|
||||
<el-button
|
||||
v-else
|
||||
class="fr x16 x_blue x_border_blue"
|
||||
style="border-radius: 0"
|
||||
@click="handleClickSignUp(selectedActivity.id, $event)"
|
||||
>报名</el-button
|
||||
>
|
||||
<!-- <span class="_num"><span class="x_blue">16</span> 人报名</span> -->
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -146,6 +169,60 @@
|
||||
</div>
|
||||
</div>
|
||||
<webFooter></webFooter>
|
||||
|
||||
<el-dialog title="活动报名" v-model="showSignUp">
|
||||
<el-form
|
||||
:model="signUpForm"
|
||||
:rules="signUpRules"
|
||||
ref="signUpFormRef"
|
||||
labelWidth="100px"
|
||||
>
|
||||
<el-row :gutter="12">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input
|
||||
placeholder="请输入姓名"
|
||||
v-model="signUpForm.name"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="手机号" prop="phone">
|
||||
<el-input
|
||||
placeholder="请输入手机号"
|
||||
v-model="signUpForm.phone"
|
||||
maxlength="11"
|
||||
oninput="value=value.replace(/[\D]+/,``)"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="12">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="年龄" prop="age">
|
||||
<el-input-number
|
||||
placeholder="请输入年龄"
|
||||
v-model="signUpForm.age"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="性别" prop="gender">
|
||||
<el-radio-group v-model="signUpForm.gender">
|
||||
<el-radio label="1">男</el-radio>
|
||||
<el-radio label="2">女</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-row justify="end">
|
||||
<el-button @click="showSignUp = false">取消</el-button>
|
||||
<el-button @click="submitSignUp" type="primary">报名</el-button>
|
||||
</el-row>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script setup name="Activity">
|
||||
@ -155,8 +232,19 @@ import request from "@/utils/request";
|
||||
import webFooter from "@/components/webFooter/index.vue";
|
||||
import { reactive, toRefs } from "vue";
|
||||
import WebContact from "@/components/webContact";
|
||||
import { activitysList } from "@/api/admin/enterprise";
|
||||
// import { activitysList } from "@/api/admin/enterprise";
|
||||
import webBreadcrumb from "@/components/webBreadcrumb/index.vue";
|
||||
import {
|
||||
signUpActivity,
|
||||
activitysList,
|
||||
activityDetail,
|
||||
} from "@/api/website/activity";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { getToken } from "@/utils/auth";
|
||||
|
||||
// import { omit } from "lodash";
|
||||
// import FieldOptions from "@/views/components/FieldOptions";
|
||||
// import CityOptions from "@/views/components/CityOptions";
|
||||
// import webReleaseActive from "@/components/webReleaseActive/index.vue";
|
||||
|
||||
const dialogVisible = ref(false);
|
||||
@ -165,6 +253,9 @@ const total = ref(1);
|
||||
const state = reactive({
|
||||
banner: "",
|
||||
});
|
||||
// const data = reactive({
|
||||
// activityForm: {},
|
||||
// });
|
||||
|
||||
const queryParams = reactive({});
|
||||
let dataList = ref([]);
|
||||
@ -186,14 +277,17 @@ function getList() {
|
||||
}
|
||||
const data = reactive({
|
||||
selectedActivity: {},
|
||||
activityForm: {},
|
||||
});
|
||||
const { selectedActivity } = toRefs(data);
|
||||
|
||||
function handleDetail(item) {
|
||||
async function handleDetail(item) {
|
||||
breadcrumbTitle.id = item.id;
|
||||
breadcrumbTitle.title = "活动报名";
|
||||
breadcrumbTitle.twoTitle = "活动报名详情";
|
||||
selectedActivity.value = dataList.value.find((el) => el.id == item.id);
|
||||
// selectedActivity.value = dataList.value.find((el) => el.id == item.id);
|
||||
const resp = await activityDetail(item.id);
|
||||
selectedActivity.value = resp.data;
|
||||
isShow.value = !isShow.value;
|
||||
}
|
||||
|
||||
@ -223,6 +317,76 @@ onMounted(() => {
|
||||
loading.value = false;
|
||||
});
|
||||
});
|
||||
|
||||
const showSignUp = ref(false);
|
||||
const signUpForm = reactive({});
|
||||
const signUpFormRef = ref();
|
||||
const signUpRules = reactive({
|
||||
name: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入姓名!",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
age: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入年龄!",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
gender: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择性别!",
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
phone: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入手机号!",
|
||||
trigger: "blur",
|
||||
},
|
||||
{
|
||||
pattern: /^1[3456789]\d{9}$/,
|
||||
message: "手机号格式不正确",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
});
|
||||
const reset = () => {
|
||||
for (const key in signUpForm) {
|
||||
if (Object.hasOwnProperty.call(signUpForm, key)) {
|
||||
// const item = signUpForm[key];
|
||||
delete signUpForm[key];
|
||||
}
|
||||
}
|
||||
if (signUpFormRef.value) {
|
||||
signUpFormRef.value.resetFields();
|
||||
}
|
||||
};
|
||||
|
||||
const handleClickSignUp = (id, e) => {
|
||||
e.stopPropagation();
|
||||
console.log(id, e);
|
||||
if (!getToken()) {
|
||||
return ElMessage.error("您当前未登录");
|
||||
}
|
||||
reset();
|
||||
signUpForm.activityId = id;
|
||||
showSignUp.value = true;
|
||||
};
|
||||
|
||||
const submitSignUp = async () => {
|
||||
await signUpFormRef.value.validate();
|
||||
await signUpActivity(signUpForm);
|
||||
ElMessage.success("报名成功");
|
||||
const resp = await activityDetail(selectedActivity.value.id);
|
||||
selectedActivity.value = resp.data;
|
||||
showSignUp.value = false;
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.activity {
|
||||
@ -242,6 +406,7 @@ onMounted(() => {
|
||||
.el-button {
|
||||
position: absolute;
|
||||
top: 171px;
|
||||
height: 60px;
|
||||
right: 46px;
|
||||
background-color: #ffc600;
|
||||
color: #fff;
|
||||
@ -276,6 +441,7 @@ onMounted(() => {
|
||||
flex: 1;
|
||||
padding: 36px 20px 0 16px;
|
||||
background-color: #fff;
|
||||
height: 220px;
|
||||
p {
|
||||
margin-top: 0;
|
||||
font-size: 16px;
|
||||
|
@ -22,8 +22,8 @@
|
||||
<!-- <div class="labelList">
|
||||
<div v-for="item in data.industrys">{{ item }}</div>
|
||||
</div>-->
|
||||
<div v-if="data.industryStr" class="line" style="overflow: hidden">
|
||||
<el-col>所属领域:</el-col>
|
||||
<div v-if="data.job" class="line" style="overflow: hidden">
|
||||
<el-col>职务:</el-col>
|
||||
<!-- :title="data.industrys[data.industrys.length - 1]" -->
|
||||
<el-col style="display: inline-block; width: calc(100% - 86px)">
|
||||
<span
|
||||
@ -34,22 +34,26 @@
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
"
|
||||
>{{ data.industryStr }}</span
|
||||
>{{ data.job }}</span
|
||||
>
|
||||
</el-col>
|
||||
</div>
|
||||
<div class="line">
|
||||
研究信息:
|
||||
<span>{{ data.research }}</span>
|
||||
职称:
|
||||
<span>{{ data.title }}</span>
|
||||
</div>
|
||||
<div
|
||||
<div class="line">
|
||||
所属研究机构:
|
||||
<span>{{ data.organization }}</span>
|
||||
</div>
|
||||
<!-- <div
|
||||
v-if="data.patent_title"
|
||||
class="line"
|
||||
v-for="(patent_title, index) in data.patent_title"
|
||||
:key="index"
|
||||
>
|
||||
{{ patent_title }}
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="keywordsWrap">
|
||||
<div class="keywords">
|
||||
|
@ -75,7 +75,7 @@
|
||||
<div class="pointTit">企业简介</div>
|
||||
</div>
|
||||
<div class="html" v-html="state.companyDetail.introduce"></div>
|
||||
<div style="padding: 20px 0">
|
||||
<!-- <div style="padding: 20px 0">
|
||||
<div class="pointTit">生产方向</div>
|
||||
</div>
|
||||
<section v-if="state.companyDetail.directions">
|
||||
@ -86,15 +86,46 @@
|
||||
>
|
||||
{{ item }}
|
||||
</div>
|
||||
</section> -->
|
||||
<div style="padding: 20px 0">
|
||||
<div class="pointTit">所属领域</div>
|
||||
</div>
|
||||
<section v-if="state.companyDetail.industryStr">
|
||||
{{ state.companyDetail.industryStr }}
|
||||
<!-- <div
|
||||
v-for="(item, index) in state.companyDetail.directions"
|
||||
:key="index"
|
||||
class="describe"
|
||||
>
|
||||
{{ item }}
|
||||
</div> -->
|
||||
</section>
|
||||
<div style="padding: 20px 0">
|
||||
<div class="pointTit">所在地</div>
|
||||
</div>
|
||||
<section v-if="state.companyDetail.address">
|
||||
{{ state.companyDetail.address }}
|
||||
</section>
|
||||
<div style="padding: 20px 0">
|
||||
<div class="pointTit">详细地址</div>
|
||||
</div>
|
||||
<section v-if="state.companyDetail.address">
|
||||
{{ state.companyDetail.address }}
|
||||
</section>
|
||||
<div style="padding: 20px 0">
|
||||
<div class="pointTit">企业网站</div>
|
||||
</div>
|
||||
<section v-if="state.companyDetail.url">
|
||||
{{ state.companyDetail.url }}
|
||||
</section>
|
||||
<!-- <div style="padding: 20px 0">
|
||||
<div class="pointTit">产品列表</div>
|
||||
</div>
|
||||
<section v-for="item in state.companyProduct" :key="item.id">
|
||||
<div style="border: 1px solid #dcdcdc; margin-bottom: 10px">
|
||||
<productItem :data="item"></productItem>
|
||||
</div>
|
||||
</section>
|
||||
</section> -->
|
||||
</div>
|
||||
|
||||
<div style="padding: 20px 0">
|
||||
|
Reference in New Issue
Block a user