Commit 2dff1a96 authored by zhouyx's avatar zhouyx

咨询服务发送钉钉消息。

parent ad74750a
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -13,7 +13,7 @@ const Config = {
/**
* @description: 默认接口地址
*/
// apiBaseUrl: "http://localhost:6066",
// apiBaseUrl: "http://localhost:6006",
apiBaseUrl: "http://47.92.102.113:6006",
// apiBaseUrl: "http://154.8.185.122:8002",
timeout: 30000, // 请求超时时间
......
......@@ -308,9 +308,9 @@
placeholder="请填写您的邮箱"
></Input>
</FormItem>
<FormItem label="留言" prop="ly">
<FormItem label="留言" prop="note">
<Input
v-model.trim="entity.ly"
v-model.trim="entity.note"
type="textarea"
placeholder="请填写您想对我们说的"
></Input>
......@@ -443,6 +443,7 @@ export default {
email: "",
note: "",
type: "",
come:"",
},
screenY: 0,
rules: {
......@@ -597,7 +598,8 @@ export default {
sendMessage() {
this.$refs.form.validate((v) => {
if (v) {
this.$api.post("/message/create", this.entity).then((r) => {
this.entity.come=window.location.href;
this.$api.post("/message/ding", this.entity).then((r) => {
if (r.success) {
// console.log(r);
this.$Message.success("留言成功!");
......
<template>
<div class="pc11 mt" style="height:auto;">
<div class="pc11 mt" style="height: auto">
<Menu
mode="horizontal"
style="z-index:0"
style="z-index: 0"
:theme="theme1"
active-name="1"
@on-select="change"
>
<MenuItem name="1" :class="kai" style="width:50%;text-align:center;">
<MenuItem name="1" :class="kai" style="width: 50%; text-align: center">
在线咨询
</MenuItem>
<MenuItem name="2" :class="guan" style="width:50%;">
下载支持
</MenuItem>
<MenuItem name="2" :class="guan" style="width: 50%"> 下载支持 </MenuItem>
</Menu>
<div class="form-sub" v-if="flag1 == true" @click="cancel">
<Form
ref="formValidate"
ref="form"
:model="formValidate"
:rules="ruleValidate"
:label-width="80"
>
<h4 class="form-title">咨询服务</h4>
<div class="form-content">
请填写以下表单信息,我们客服人员会尽快与您联系
</div>
<div class="form-content">请填写以下表单信息,我们客服人员会尽快与您联系</div>
<Row>
<Col flex="7">
<Col span="12">
<FormItem label="咨询类型" prop="consult">
<Select
v-model="formValidate.consult"
placeholder="问题咨询"
style="width:180px;"
>
<Select v-model="formValidate.consult" placeholder="问题咨询">
<Option
v-for="(item, index) in consult"
:key="index"
......@@ -42,131 +34,73 @@
</Select>
</FormItem>
</Col>
<Col flex="3" class="layout-level">
<!-- <Dropdown trigger="click" style="width:100px;" prop="telephone" @on-click="xx">
<div class="layout-level-left">
联系方式
<Icon type="ios-arrow-down"></Icon>
</div>
<DropdownMenu slot="list">
<DropdownItem>联系方式</DropdownItem>
<DropdownItem>邮箱</DropdownItem>
</DropdownMenu>
</Dropdown> -->
<!-- <Select v-model="model1" style="width:100px" class="layout-level">
<Option v-for="(item,index) in method" :key="index" :value="item.value">
{{item.label}}
</Option>
</Select> -->
<FormItem
:label="formItem[i].label"
:prop="formItem[i].prop"
style="position:relative"
>
<Input
v-if="formItem[i].label == '联系方式'"
v-model="formValidate.telephone"
style="width:180px"
></Input>
<Input
v-else
v-model="formValidate.email"
style="width:180px"
></Input>
</FormItem>
<div class="icon-1">
<Icon
type="ios-arrow-down"
v-if="down == true"
style="width:90px;text-align:right;line-height:32px;height:32;"
@click.native="select"
/>
</div>
<div class="icon-1">
<Icon
type="ios-arrow-up"
v-if="up == true"
style="width:90px;text-align:right;line-height:32px;height:32;"
@click.native="select"
/>
</div>
<div class="erji" v-show="selFlag == true">
<div
v-for="(item, index) in emil1"
:key="index"
@click="emil(item, index)"
>
{{ item }}
</div>
</div>
</Col>
</Row>
<Input
v-model="formValidate.field"
type="textarea"
:autosize="{ minRows: 8, maxRows: 8 }"
placeholder="请输入"
></Input>
<Row>
<Col flex="7"></Col>
<Col flex="3" style="margin-top:20px;">
<Col span="12">
<FormItem label="预算">
<InputNumber
type="number"
:min="0"
v-model="formValidate.money"
placeholder="请输入您的预算"
style="width:180px;"
style="width: 85%"
>
</InputNumber>
</InputNumber
>万元
</FormItem>
</Col>
</Row>
<Row>
<Col flex="7">
<FormItem label="姓名" prop="name">
<Col span="24">
<FormItem label="咨询内容" prop="note">
<Input
v-model="formValidate.name"
placeholder="请输入您的姓名"
style="width:180px"
v-model="formValidate.note"
type="textarea"
:autosize="{ minRows: 8, maxRows: 8 }"
placeholder="请输入"
></Input>
</FormItem>
</Col>
<Col flex="3">
<FormItem label="职位">
<Input
v-model="formValidate.position"
placeholder="请输入您的职位"
style="width:180px"
></Input>
</Row>
<Row>
<Col span="12">
<FormItem label="姓名" prop="name">
<Input v-model="formValidate.name" placeholder="请输入您的姓名"></Input>
</FormItem>
</Col>
<Col span="12">
<FormItem label="公司" prop="company">
<Input v-model="formValidate.company" placeholder="请输入您的公司"></Input>
</FormItem>
</Col>
</Row>
<Row>
<Col flex="7">
<FormItem label="公司" prop="company">
<Input
v-model="formValidate.company"
placeholder="请输入您的公司"
style="width:180px"
></Input>
<Col span="12">
<FormItem label="手机" prop="phone">
<Input v-model="formValidate.phone"></Input>
</FormItem>
</Col>
<Col span="12">
<FormItem label="邮箱" prop="email">
<Input v-model="formValidate.email"></Input>
</FormItem>
</Col>
<Col flex="3">
</Row>
<Row>
<Col span="12">
<FormItem label="城市" prop="city">
<Input
v-model="formValidate.city"
placeholder="您所在的城市是"
style="width:180px"
></Input>
<Input v-model="formValidate.city" placeholder="您所在的城市是"></Input>
</FormItem>
</Col>
<Col span="12">
<FormItem label="职位">
<Input v-model="formValidate.position" placeholder="请输入您的职位"></Input>
</FormItem>
</Col>
</Row>
<Row>
<Col span="24" style="text-align:center">
<Col span="24" style="text-align: center">
<Button
class="btn-sum"
class="btn-sum"
type="primary"
shape="circle"
width="100px"
......@@ -181,16 +115,24 @@
<div v-if="flag2 == true">
<div class="download">
<div class="download-top">
<a href="/image/3DE22x安装手册基于RHEL85 v2.0.pdf" download="3DE22x安装手册基于RHEL85 v2.0">
<Icon size="14px" type="ios-folder-open" /><span
>3DEXPERIENCE R2022x说明文档(2022-3-21)</span
></a>
<a
href="/image/3DE22x安装手册基于RHEL85 v2.0.pdf"
download="3DE22x安装手册基于RHEL85 v2.0"
>
<Icon size="14px" type="ios-folder-open" /><span
>3DEXPERIENCE R2022x说明文档(2022-3-21)</span
></a
>
</div>
<div class="download-bottom">
<a href="/image/3DEXPERIENCE 2022x WindowsServer2016_Oracle19_安装_V2.0.pdf" download="3DEXPERIENCE 2022x WindowsServer2016_Oracle19_安装_V2.0">
<Icon size="14px" type="ios-folder-open" /><span
>3DEXPERIENCE R2021x程序目录(2021-12-6)</span
></a>
<a
href="/image/3DEXPERIENCE 2022x WindowsServer2016_Oracle19_安装_V2.0.pdf"
download="3DEXPERIENCE 2022x WindowsServer2016_Oracle19_安装_V2.0"
>
<Icon size="14px" type="ios-folder-open" /><span
>3DEXPERIENCE R2021x程序目录(2021-12-6)</span
></a
>
</div>
</div>
</div>
......@@ -199,8 +141,8 @@
<script>
import Config from "@/config";
export default {
head:{
title:"服务支持"
head: {
title: "服务支持",
},
data() {
return {
......@@ -213,41 +155,41 @@ export default {
consult: [
{
label: "项目需求",
value: "项目需求"
value: "项目需求",
},
{
label: "MBD数字化设计解决方案",
value: "MBD数字化设计解决方案"
value: "MBD数字化设计解决方案",
},
{
label: "数字化仿真制造解决方案",
value: "数字化仿真制造解决方案"
value: "数字化仿真制造解决方案",
},
{
label: "机电软研发协同解决方案",
value: "机电软研发协同解决方案"
}
value: "机电软研发协同解决方案",
},
],
method: [
{
value: "telephone",
label: "联系电话"
value: "phone",
label: "联系电话",
},
{
value: "wechat",
label: "微信"
}
label: "微信",
},
],
formValidate: {
consult: "", //咨询类型
telephone: "", //联系电话
phone: "", //联系电话
email: "",
field: "", //文本域
note: "", //文本域
money: 0, //预算
name: "", //姓名
position: "", //职位
company: "", //公司
city: "" //城市
city: "", //城市
},
ruleValidate: {
consult: [
......@@ -255,62 +197,62 @@ export default {
{
required: true,
message: "请选择咨询类型",
trigger: "blur"
}
trigger: "blur",
},
],
telephone: [
phone: [
{ required: true, message: "电话不可以为空", trigger: "blur" },
{
type: "string",
pattern: /^1[3456789]\d{9}/,
message: "手机号格式错误",
trigger: "blur"
}
trigger: "blur",
},
],
email: [
{ required: true, message: "邮箱不能为空", trigger: "blur" },
{
type: "email",
message: "请输入正确的邮箱",
trigger: "blur"
}
trigger: "blur",
},
],
name: [
{
required: true,
message: "请输入你的姓名",
trigger: "blur"
}
trigger: "blur",
},
],
company: [
{
required: true,
message: "请输入你的公司",
trigger: "blur"
}
trigger: "blur",
},
],
city: [
{
required: true,
message: "必填项",
trigger: "blur"
}
]
trigger: "blur",
},
],
},
down: true,
up: false,
selFlag: false,
emil1: ["联系方式", "邮箱"],
formItem: [
{ label: "联系方式", prop: "telephone" },
{ label: "邮箱", prop: "email" }
{ label: "联系方式", prop: "phone" },
{ label: "邮箱", prop: "email" },
],
xx: ["telephone", "email"],
xx: ["phone", "email"],
i: 0,
kai:"kai",
guan:"guan",
switch:true,
kai: "kai",
guan: "guan",
switch: true,
};
},
created() {},
......@@ -321,55 +263,44 @@ export default {
if (name == 1) {
this.flag1 = true;
this.flag2 = false;
this.switch = true
this.switch = true;
} else if (name == 2) {
this.flag1 = false;
this.flag2 = true;
this.switch = false
this.switch = false;
}
if (this.switch == true) {
this.kai = `kai`;
this.guan = `guan`;
} else {
this.kai = `guan`;
this.guan = `kai`;
}
if(this.switch == true){
this.kai = `kai`
this.guan = `guan`
}else{
this.kai = `guan`
this.guan = `kai`
}
},
handleSubmit(name) {
this.$refs[name].validate(valid => {
this.$refs["form"].validate((valid) => {
if (valid) {
this.$Message.success("提交成功!");
console.log(this.formValidate);
this.formValidate.come=window.location.href;
this.$api.post("/message/ding2", this.formValidate).then((r) => {
if (r.success) {
// console.log(r);
this.$Message.success("提交成功!");
this.$refs["form"].resetFields();
}
});
} else {
this.$Message.error("请确保您的信息填写完整在提交!");
}
});
},
select(e) {
this.selFlag = true;
this.down = false;
this.up = true;
e.stopPropagation();
},
emil(item, index, event) {
// this.formItem = item; //这个是formitem的值,当是联系方式的时候正则判断是电话 邮箱正则判断是邮箱
this.selFlag = false;
this.down = true;
this.up = false;
this.i = index;
if (this.i == 0) {
this.formValidate.email = "";
} else if (this.i == 1) {
this.formValidate.telephone = "";
}
},
cancel() {
this.up = false;
this.down = true;
this.selFlag = false;
}
}
},
},
};
</script>
......@@ -385,7 +316,7 @@ export default {
border-radius: 5px;
background-color: #fff;
box-shadow: 0 0 0 2px #f5f5f5;
div{
div {
margin-top: 3px;
width: 80px;
padding-left: 10px;
......@@ -466,7 +397,7 @@ export default {
box-shadow: 0 0 0 0 #fff;
}
// 按钮样式
.btn-sum{
.btn-sum {
margin-top: 60px;
margin-bottom: 80px;
width: 140px;
......@@ -474,34 +405,33 @@ export default {
background: #294982;
opacity: 1;
border-radius: 24px;
span{
span {
width: 36px;
height: 24px;
font-size: 18px;
font-family: Microsoft YaHei;
font-weight: bold;
line-height: 18px;
color: #FFFFFF;
color: #ffffff;
opacity: 1;
}
}
.kai{
.kai {
font-size: 20px !important;
font-family: Microsoft YaHei !important;
font-weight: bold !important;
color: #294982 !important;
opacity: 1;
border-bottom: 4px solid #294982 !important;
}
.guan{
font-size: 20px !important;
font-family: Microsoft YaHei !important;
font-weight: bold !important;
color: #B5B5B5 !important;
opacity: 1;
.guan {
font-size: 20px !important;
font-family: Microsoft YaHei !important;
font-weight: bold !important;
color: #b5b5b5 !important;
opacity: 1;
border-bottom:1px solid #B5B5B5 !important;
border-bottom: 1px solid #b5b5b5 !important;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment