|
@@ -285,13 +285,13 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <el-dialog title="咨询反馈" :visible.sync="centerDialogVisible" width="700px" center class="feedBackDialog" :lock-scroll="false">
|
|
|
+ <el-dialog title="项目咨询" :visible.sync="centerDialogVisible" width="700px" center class="feedBackDialog" :lock-scroll="false">
|
|
|
|
|
|
|
|
|
|
|
|
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="80px" class="demo-ruleForm">
|
|
|
- <el-form-item label="类型选择" prop="radio1">
|
|
|
- <el-radio-group v-model="ruleForm.radio1">
|
|
|
+ <el-form-item label="" prop="platName">
|
|
|
+ <el-radio-group v-model="ruleForm.platName">
|
|
|
<el-radio-button label="智慧安防"></el-radio-button>
|
|
|
<el-radio-button label="智慧消防"></el-radio-button>
|
|
|
<el-radio-button label="智慧楼宇"></el-radio-button>
|
|
@@ -302,28 +302,28 @@
|
|
|
</el-form-item>
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="姓名" prop="name">
|
|
|
- <el-input v-model="ruleForm.name"></el-input>
|
|
|
+ <el-form-item label="姓名" prop="consultName">
|
|
|
+ <el-input v-model="ruleForm.consultName"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="联系电话" prop="phone">
|
|
|
- <el-input v-model="ruleForm.phone"></el-input>
|
|
|
+ <el-form-item label="联系电话" prop="consultPhone">
|
|
|
+ <el-input v-model="ruleForm.consultPhone"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="邮箱" prop="email">
|
|
|
- <el-input v-model="ruleForm.email"></el-input>
|
|
|
+ <el-form-item label="邮箱" prop="mail">
|
|
|
+ <el-input v-model="ruleForm.mail"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="公司名称" prop="company">
|
|
|
+ <el-form-item label="公司" prop="company">
|
|
|
<el-input v-model="ruleForm.company"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <el-form-item label="需求描述" prop="desc">
|
|
|
- <el-input type="textarea" v-model="ruleForm.desc"></el-input>
|
|
|
+ <el-form-item label="需求描述" prop="consultContent">
|
|
|
+ <el-input type="textarea" v-model="ruleForm.consultContent"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
|
|
@@ -396,25 +396,24 @@
|
|
|
|
|
|
|
|
|
ruleForm: {
|
|
|
- name: '',
|
|
|
- region: '',
|
|
|
- date1: '',
|
|
|
- date2: '',
|
|
|
- delivery: false,
|
|
|
- type: [],
|
|
|
- resource: '',
|
|
|
- desc: '',
|
|
|
- radio1: '智慧安防',
|
|
|
+ platName: '智慧安防',
|
|
|
+ consultName: '',
|
|
|
+ consultPhone:'',
|
|
|
+ mail:'',
|
|
|
+ company:'',
|
|
|
+ consultContent: "", //?
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
rules: {
|
|
|
- radio1: [{
|
|
|
+ platName: [{
|
|
|
required: true,
|
|
|
message: '请选择类型',
|
|
|
trigger: 'change'
|
|
|
},
|
|
|
|
|
|
],
|
|
|
- name: [{
|
|
|
+ consultName: [{
|
|
|
required: true,
|
|
|
message: '请输入姓名',
|
|
|
trigger: 'blur'
|
|
@@ -426,13 +425,13 @@
|
|
|
// trigger: 'blur'
|
|
|
// }
|
|
|
],
|
|
|
- phone: [{
|
|
|
+ consultPhone: [{
|
|
|
required: true,
|
|
|
message: '请输入正确的电话号码',
|
|
|
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
|
|
trigger: 'change'
|
|
|
}],
|
|
|
- email: [{
|
|
|
+ mail: [{
|
|
|
required: false,
|
|
|
type: "email",
|
|
|
message: "请输入正确的邮箱地址",
|
|
@@ -442,7 +441,7 @@
|
|
|
// { required: true, message: '请选择活动区域', trigger: 'change' }
|
|
|
],
|
|
|
|
|
|
- desc: [
|
|
|
+ consultContent: [
|
|
|
// { required: true, message: '请填写需求描述', trigger: 'blur' }
|
|
|
]
|
|
|
}
|
|
@@ -474,9 +473,41 @@
|
|
|
},
|
|
|
methods: {
|
|
|
submitForm(formName) {
|
|
|
+ _this=this
|
|
|
this.$refs[formName].validate((valid) => {
|
|
|
+
|
|
|
if (valid) {
|
|
|
- alert('submit!');
|
|
|
+ console.log(_this.ruleForm)
|
|
|
+
|
|
|
+ let param = JSON.stringify(_this.ruleForm)
|
|
|
+
|
|
|
+
|
|
|
+ jQuery.ajax({
|
|
|
+ type: 'POST',
|
|
|
+ // dataType: 'json',
|
|
|
+ contentType: 'application/json;charset=UTF-8',
|
|
|
+
|
|
|
+ url: window.FQDN2 + 'siteReview',
|
|
|
+ data: param
|
|
|
+ }).done(function(res) {
|
|
|
+ if (res.status === "SUCCESS") {
|
|
|
+ _this.$message({
|
|
|
+ message: '提交成功',
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ _this.centerDialogVisible=false
|
|
|
+
|
|
|
+ _this.$refs[formName].resetFields(); //重置from校验
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }).fail(function(err) {});
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
} else {
|
|
|
console.log('error submit!!');
|
|
|
return false;
|