|
@@ -11,10 +11,10 @@
|
|
|
:model="ruleForm"
|
|
|
:rules="rules"
|
|
|
ref="ruleForm"
|
|
|
- label-width="120px"
|
|
|
+ label-width="150px"
|
|
|
class="demo-ruleForm"
|
|
|
>
|
|
|
- <el-row>
|
|
|
+ <!-- <el-row>
|
|
|
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
|
<el-form-item label="头像" prop="avatar">
|
|
|
<el-upload
|
|
@@ -43,56 +43,175 @@
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
+ </el-row> -->
|
|
|
<el-row>
|
|
|
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
|
- <el-form-item label="个人描述" prop="description">
|
|
|
+ <el-form-item label="报告来源" prop="description">
|
|
|
<el-input
|
|
|
- v-model="ruleForm.description"
|
|
|
+ v-model="ruleForm.reportSource"
|
|
|
class="inputCom"
|
|
|
- placeholder="请输入描述"
|
|
|
+ placeholder="请输入报告来源"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
|
- <el-form-item label="岗位" prop="job">
|
|
|
+ <el-form-item label="公司名称" prop="companyName">
|
|
|
<el-input
|
|
|
v-model="ruleForm.job"
|
|
|
class="inputCom"
|
|
|
- placeholder="请输入岗位"
|
|
|
+ placeholder="请输入公司名称"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
|
- <el-form-item label="邮箱" prop="mail">
|
|
|
+ <el-form-item label="公司英文名称" prop="companyEname">
|
|
|
<el-input
|
|
|
- v-model="ruleForm.mail"
|
|
|
+ v-model="ruleForm.companyEname"
|
|
|
class="inputCom"
|
|
|
- placeholder="请输入邮箱"
|
|
|
+ placeholder="请输入公司英文名称"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
|
- <el-form-item label="手机号" prop="phone">
|
|
|
+ <el-form-item label="是否展示详细信息" prop="isDetail">
|
|
|
+ <el-select v-model="ruleForm.isDetail" placeholder="请选择状态">
|
|
|
+ <el-option
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ v-for="item in isDetailList"
|
|
|
+ :key="item.id"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
|
+ <el-form-item label="公司logo" prop="logo">
|
|
|
+ <el-upload
|
|
|
+ accept=".png, .jpg, .jpeg"
|
|
|
+ class="avatar-uploader"
|
|
|
+ name="file"
|
|
|
+ :action="action"
|
|
|
+ :show-file-list="false"
|
|
|
+ :on-success="handleLogoSuccess"
|
|
|
+ :before-upload="beforeAvatarUpload"
|
|
|
+ >
|
|
|
+ <img v-if="ruleForm.logo" :src="ruleForm.logo" class="avatar" />
|
|
|
+ <i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
+ <div class="el-upload__tip" slot="tip">
|
|
|
+ 建议上传jpg/png/jpeg文件,且不超过500kb
|
|
|
+ </div>
|
|
|
+ </el-upload>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
|
+ <el-form-item label="首页二维码" prop="firstPageCode">
|
|
|
+ <el-upload
|
|
|
+ accept=".png, .jpg, .jpeg"
|
|
|
+ class="avatar-uploader"
|
|
|
+ name="file"
|
|
|
+ :action="action"
|
|
|
+ :show-file-list="false"
|
|
|
+ :on-success="handleFirstPageCodeSuccess"
|
|
|
+ :before-upload="beforeAvatarUpload"
|
|
|
+ >
|
|
|
+ <img v-if="ruleForm.firstPageCode" :src="ruleForm.firstPageCode" class="avatar" />
|
|
|
+ <i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
+ <div class="el-upload__tip" slot="tip">
|
|
|
+ 建议上传jpg/png/jpeg文件,且不超过500kb
|
|
|
+ </div>
|
|
|
+ </el-upload>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
|
+ <el-form-item label="网址" prop="webAddress">
|
|
|
+ <el-input
|
|
|
+ v-model="ruleForm.webAddress"
|
|
|
+ class="inputCom"
|
|
|
+ placeholder="请输入网址"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
|
+ <el-form-item label="邮箱" prop="mail">
|
|
|
<el-input
|
|
|
- v-model="ruleForm.phone"
|
|
|
+ v-model="ruleForm.mail"
|
|
|
class="inputCom"
|
|
|
- placeholder="请输入手机号"
|
|
|
+ placeholder="请输入邮箱"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
|
- <el-form-item label="状态" prop="state">
|
|
|
- <el-select v-model="ruleForm.state" placeholder="请选择状态">
|
|
|
+ <el-form-item label="是否展示尾页二维码" prop="isCode">
|
|
|
+ <el-select v-model="ruleForm.state" placeholder="请选择是否展示尾页二维码">
|
|
|
+ <el-option
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ v-for="item in isCodeList"
|
|
|
+ :key="item.id"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
|
+ <el-form-item label="是否展示尾页公司名及地址" prop="isLastPageName">
|
|
|
+ <el-select v-model="ruleForm.isLastPageName" placeholder="请选择是否展示尾页公司名及地址">
|
|
|
<el-option
|
|
|
:label="item.name"
|
|
|
- :value="item.state"
|
|
|
- v-for="item in stateList"
|
|
|
- :key="item.state"
|
|
|
+ :value="item.id"
|
|
|
+ v-for="item in isLastPageNameList"
|
|
|
+ :key="item.id"
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
|
+ <el-form-item label="尾页公司名" prop="lastPageName">
|
|
|
+ <el-input
|
|
|
+ v-model="ruleForm.lastPageName"
|
|
|
+ class="inputCom"
|
|
|
+ placeholder="请输入尾页公司名"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
|
+ <el-form-item label="尾页公司地址" prop="lastPageAddress">
|
|
|
+ <el-input
|
|
|
+ v-model="ruleForm.lastPageAddress"
|
|
|
+ class="inputCom"
|
|
|
+ placeholder="请输入尾页公司地址"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-row>
|
|
|
+ <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
|
+ <el-form-item label="尾页二维码" prop="lastPageCode">
|
|
|
+ <el-upload
|
|
|
+ accept=".png, .jpg, .jpeg"
|
|
|
+ class="avatar-uploader"
|
|
|
+ name="file"
|
|
|
+ :action="action"
|
|
|
+ :show-file-list="false"
|
|
|
+ :on-success="handleLastPageCodeSuccess"
|
|
|
+ :before-upload="beforeAvatarUpload"
|
|
|
+ >
|
|
|
+ <img v-if="ruleForm.lastPageCode" :src="ruleForm.lastPageCode" class="avatar" />
|
|
|
+ <i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
+ <div class="el-upload__tip" slot="tip">
|
|
|
+ 建议上传jpg/png/jpeg文件,且不超过500kb
|
|
|
+ </div>
|
|
|
+ </el-upload>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
|
+ <el-form-item label="姓名" prop="name">
|
|
|
+ <el-input
|
|
|
+ v-model="ruleForm.name"
|
|
|
+ class="inputCom"
|
|
|
+ placeholder="请输入姓名"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
@@ -154,42 +273,74 @@ export default {
|
|
|
{ name: "签约", state: "1" },
|
|
|
{ name: "解约", state: "0" },
|
|
|
],
|
|
|
+ isDetailList: [
|
|
|
+ { name: "是", id: "1" },
|
|
|
+ { name: "否", id: "0" },
|
|
|
+ ],
|
|
|
+ isCodeList:[
|
|
|
+ { name: "是", id: "1" },
|
|
|
+ { name: "否", id: "0" },
|
|
|
+ ],
|
|
|
+ isLastPageNameList:[
|
|
|
+ { name: "是", id: "1" },
|
|
|
+ { name: "否", id: "0" },
|
|
|
+ ],
|
|
|
ruleForm: {
|
|
|
- id: "",
|
|
|
+ //渠道ID
|
|
|
channelId: "",
|
|
|
- //头像
|
|
|
- avatar: "",
|
|
|
- //员工姓名
|
|
|
- name: "",
|
|
|
- //描述
|
|
|
- description: "",
|
|
|
- //岗位
|
|
|
- job: "",
|
|
|
+ //报告来源
|
|
|
+ reportSource: "",
|
|
|
+ //公司名称
|
|
|
+ companyName: "",
|
|
|
+ //是否展示详细信息
|
|
|
+ isDetail: "",
|
|
|
+ //公司英文名称
|
|
|
+ companyEname: "",
|
|
|
+ //网址
|
|
|
+ webAddress: "",
|
|
|
+ //是否展示尾页二维码
|
|
|
+ isCode: "",
|
|
|
+ //是否展示尾页公司名称及地址
|
|
|
+ isLastPageName: "",
|
|
|
+ // //尾页公司名称
|
|
|
+ lastPageName: "",
|
|
|
+ //尾页公司地址
|
|
|
+ lastPageAddress: "",
|
|
|
+ //是否删除
|
|
|
+ isDelete: "",
|
|
|
+ //主键
|
|
|
+ id: "",
|
|
|
//邮箱
|
|
|
mail: "",
|
|
|
- //手机号
|
|
|
- phone: "",
|
|
|
- //状态
|
|
|
- state: "",
|
|
|
- // //删除状态
|
|
|
- isDelete: "0",
|
|
|
+ //尾页二维码
|
|
|
+ lastPageCode: "",
|
|
|
+ //公司logo
|
|
|
+ logo: "",
|
|
|
+ //首页二维码
|
|
|
+ firstPageCode: "",
|
|
|
},
|
|
|
isView: true,
|
|
|
rules: {
|
|
|
- name: [{ required: true, message: "请输入姓名", trigger: "blur" }],
|
|
|
- phone: [
|
|
|
- { required: true, message: "请输入手机号", trigger: "blur" },
|
|
|
- {
|
|
|
- pattern: /^1[3456789]\d{9}$/,
|
|
|
- message: "请输入正确的手机号",
|
|
|
- trigger: ["blur", "change"],
|
|
|
- },
|
|
|
+ reportSource: [{ required: true, message: "请输入报告来源", trigger: "blur" }],
|
|
|
+ // phone: [
|
|
|
+ // { required: true, message: "请输入手机号", trigger: "blur" },
|
|
|
+ // {
|
|
|
+ // pattern: /^1[3456789]\d{9}$/,
|
|
|
+ // message: "请输入正确的手机号",
|
|
|
+ // trigger: ["blur", "change"],
|
|
|
+ // },
|
|
|
+ // ],
|
|
|
+ isDetail: [
|
|
|
+ { required: true, message: "请选择是否展示详细信息", trigger: "change" },
|
|
|
],
|
|
|
- state: [{ required: true, message: "请输选择状态", trigger: "change" }],
|
|
|
- mail: [
|
|
|
- { required: true, message: "请输选择邮箱", trigger: "blur" },
|
|
|
- { type: "email", message: "请输入正确的邮箱地址", trigger: ["blur", "change"] },
|
|
|
+
|
|
|
+ isLastPageName: [
|
|
|
+ { required: true, message: "是否展示尾页公司名称及地址", trigger: "change" },
|
|
|
],
|
|
|
+ // mail: [
|
|
|
+ // { required: true, message: "请输选择邮箱", trigger: "blur" },
|
|
|
+ // { type: "email", message: "请输入正确的邮箱地址", trigger: ["blur", "change"] },
|
|
|
+ // ],
|
|
|
},
|
|
|
};
|
|
|
},
|
|
@@ -215,12 +366,25 @@ export default {
|
|
|
}
|
|
|
return true;
|
|
|
},
|
|
|
- //handleAvatarSuccess
|
|
|
+
|
|
|
//上传成功后的回调
|
|
|
- handleAvatarSuccess(data) {
|
|
|
+ handleLogoSuccess(data) {
|
|
|
+ if (data.code == 200) {
|
|
|
+ this.ruleForm.logo = basePath + "/file/show?filePath=" + data.data;
|
|
|
+ } else {
|
|
|
+ //失败
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleFirstPageCodeSuccess(){
|
|
|
+ if (data.code == 200) {
|
|
|
+ this.ruleForm.firstPageCode = basePath + "/file/show?filePath=" + data.data;
|
|
|
+ } else {
|
|
|
+ //失败
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleLastPageCodeSuccess(){
|
|
|
if (data.code == 200) {
|
|
|
- this.ruleForm.avatar = basePath + "/file/show?filePath=" + data.data;
|
|
|
-
|
|
|
+ this.ruleForm.lastPageCode = basePath + "/file/show?filePath=" + data.data;
|
|
|
} else {
|
|
|
//失败
|
|
|
}
|
|
@@ -266,6 +430,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
open(val) {
|
|
|
+ debugger;
|
|
|
this.dialogVisible = true;
|
|
|
this.isView = val;
|
|
|
|