|
@@ -66,23 +66,12 @@
|
|
<el-table v-loading="loading" :data="pageList" @selection-change="handleSelectionChange">
|
|
<el-table v-loading="loading" :data="pageList" @selection-change="handleSelectionChange">
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
<el-table-column label="姓名" align="center" prop="customer" width="100" />
|
|
<el-table-column label="姓名" align="center" prop="customer" width="100" />
|
|
- <el-table-column label="干系人姓名" align="center" :show-overflow-tooltip="true" width="100" />
|
|
|
|
- <el-table-column label="干系人生日" align="center" prop="stakeholderBirthday" width="180">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <span>{{ parseTime(scope.row.stakeholderBirthday, '{y}-{m}-{d}') }}</span>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
|
|
+ <el-table-column label="干系人姓名" align="center" prop="stakeholder" width="100" />
|
|
<el-table-column label="启用" align="center" width="60">
|
|
<el-table-column label="启用" align="center" width="60">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-switch v-model="scope.row.enable" active-value="0" inactive-value="1" @change="handleStatusChange(scope.row)"></el-switch>
|
|
<el-switch v-model="scope.row.enable" active-value="0" inactive-value="1" @change="handleStatusChange(scope.row)"></el-switch>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <!-- <el-table-column label="修改人" align="center" prop="modifyBy" />
|
|
|
|
- <el-table-column label="修改时间" align="center" prop="modifyTime" width="180">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <span>{{ parseTime(scope.row.modifyTime, '{y}-{m}-{d}') }}</span>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column> -->
|
|
|
|
<el-table-column label="备注" align="center" prop="remarks" />
|
|
<el-table-column label="备注" align="center" prop="remarks" />
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="250">
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="250">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
@@ -107,20 +96,6 @@
|
|
@click="handleMessage(scope.row)"
|
|
@click="handleMessage(scope.row)"
|
|
v-hasPermi="['system:personal:message:list']"
|
|
v-hasPermi="['system:personal:message:list']"
|
|
>留言</el-button>
|
|
>留言</el-button>
|
|
- <el-button
|
|
|
|
- size="mini"
|
|
|
|
- type="text"
|
|
|
|
- icon="el-icon-picture-outline"
|
|
|
|
- @click="img(scope.row)"
|
|
|
|
- v-hasPermi="['system:personal:page:add']"
|
|
|
|
- >照片</el-button>
|
|
|
|
- <el-button
|
|
|
|
- size="mini"
|
|
|
|
- type="text"
|
|
|
|
- icon="el-icon-video-camera"
|
|
|
|
- @click="video(scope.row)"
|
|
|
|
- v-hasPermi="['system:personal:page:add']"
|
|
|
|
- >视频</el-button>
|
|
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -134,24 +109,18 @@
|
|
/>
|
|
/>
|
|
|
|
|
|
<!-- 添加或修改个人页对话框 -->
|
|
<!-- 添加或修改个人页对话框 -->
|
|
- <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body :close-on-click-modal=false>
|
|
|
|
|
|
+ <el-dialog :title="title" v-if="open" :visible.sync="open" width="1000px" append-to-body :close-on-click-modal=false>
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
|
<el-row :gutter="0" type="flex" justify="start">
|
|
<el-row :gutter="0" type="flex" justify="start">
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
- <el-form-item label="干系人姓名" prop="stakeholder">
|
|
|
|
- <el-input v-model="form.stakeholder" placeholder="请输入干系人姓名" />
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="姓名" prop="customer">
|
|
|
|
- <el-input v-model="form.customer" placeholder="请输入客户姓名" />
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
|
|
- <!-- <el-form-item label="姓名" prop="customerId">
|
|
|
|
|
|
+ <el-form-item label="客户姓名" prop="customerId">
|
|
<el-select
|
|
<el-select
|
|
v-model="form.customer"
|
|
v-model="form.customer"
|
|
filterable
|
|
filterable
|
|
remote
|
|
remote
|
|
clearable
|
|
clearable
|
|
- placeholder="请输入名字/手机号"
|
|
|
|
|
|
+ placeholder="请输入名字/手机号查询"
|
|
:remote-method="findCustomer"
|
|
:remote-method="findCustomer"
|
|
@change="customerChange"
|
|
@change="customerChange"
|
|
:loading="loadings">
|
|
:loading="loadings">
|
|
@@ -162,32 +131,31 @@
|
|
:value="item.userId">
|
|
:value="item.userId">
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
- </el-form-item> -->
|
|
|
|
-
|
|
|
|
- <el-form-item label="启用" prop="enable">
|
|
|
|
- <el-radio-group v-model="form.enable">
|
|
|
|
- <el-radio
|
|
|
|
- v-for="dict in enableOptions"
|
|
|
|
- :key="dict.dictValue"
|
|
|
|
- :label="dict.dictValue"
|
|
|
|
- >{{dict.dictLabel}}</el-radio>
|
|
|
|
- </el-radio-group>
|
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- </el-col>
|
|
|
|
- <el-col :span="8">
|
|
|
|
- <el-form-item label="干系人生日" prop="stakeholderBirthday">
|
|
|
|
- <el-date-picker clearable size="small" style="width: 200px"
|
|
|
|
- v-model="form.stakeholderBirthday"
|
|
|
|
- type="date"
|
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
|
- placeholder="选择干系人生日">
|
|
|
|
- </el-date-picker>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="模板" prop="templateId">
|
|
|
|
- <el-select v-model="form.templateId" placeholder="请选择模板" >
|
|
|
|
- <el-option v-for="item in templateList" :key="item.id" :label="item.title" :value="item.id"/>
|
|
|
|
|
|
+ <el-form-item label="干系人" prop="stakeholderId">
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="form.stakeholder"
|
|
|
|
+ filterable
|
|
|
|
+ remote
|
|
|
|
+ clearable
|
|
|
|
+ placeholder="请输入名字/手机号查询"
|
|
|
|
+ :remote-method="findStakeholder"
|
|
|
|
+ @change="stakeholderChange"
|
|
|
|
+ :loading="loadings">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in stakeholderOptions"
|
|
|
|
+ :key="item.userId"
|
|
|
|
+ :label="item.nickName"
|
|
|
|
+ :value="item.userId">
|
|
|
|
+ </el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+
|
|
|
|
+ <!-- <el-form-item label="干系人姓名" prop="stakeholder">
|
|
|
|
+ <el-input v-model="form.stakeholder" placeholder="请输入干系人姓名" />
|
|
|
|
+ </el-form-item> -->
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="8">
|
|
<el-form-item label="二维码" prop="qrcode">
|
|
<el-form-item label="二维码" prop="qrcode">
|
|
<el-image
|
|
<el-image
|
|
style="width: 36px; height: 36px"
|
|
style="width: 36px; height: 36px"
|
|
@@ -196,25 +164,24 @@
|
|
:preview-src-list="[codeUrl]">
|
|
:preview-src-list="[codeUrl]">
|
|
</el-image>
|
|
</el-image>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- </el-col>
|
|
|
|
- <el-col :span="8">
|
|
|
|
- <el-form-item label-width="0px" prop="avatar">
|
|
|
|
- <div class="text-center">
|
|
|
|
- <personalAvatar :personal="form" :key="reFresh" />
|
|
|
|
- </div>
|
|
|
|
|
|
+
|
|
|
|
+ <el-form-item label="启用" prop="enable">
|
|
|
|
+ <el-radio-group v-model="form.enable">
|
|
|
|
+ <el-radio
|
|
|
|
+ v-for="dict in enableOptions"
|
|
|
|
+ :key="dict.dictValue"
|
|
|
|
+ :label="dict.dictValue"
|
|
|
|
+ >{{dict.dictLabel}}</el-radio>
|
|
|
|
+ </el-radio-group>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
- <el-form-item label="备注" prop="remarks">
|
|
|
|
- <el-input v-model="form.remarks" placeholder="请输入备注" />
|
|
|
|
- </el-form-item>
|
|
|
|
<el-form-item label="平生描述" prop="content">
|
|
<el-form-item label="平生描述" prop="content">
|
|
- <editor v-model="form.content" :min-height="292" ref="myEditor"/>
|
|
|
|
|
|
+ <editor v-model="form.content" :min-height="492" :params="editParams" ref="myEditor"/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
- <el-button type="primary" @click="viewPage">预 览</el-button>
|
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
<el-button @click="cancel">取 消</el-button>
|
|
<el-button @click="cancel">取 消</el-button>
|
|
</div>
|
|
</div>
|
|
@@ -224,17 +191,14 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { listPersonal, getPersonal, delPersonal, addPersonal, updatePersonal, exportPersonal,changeEnable,getQrcode } from "@/api/system/personalPage";
|
|
import { listPersonal, getPersonal, delPersonal, addPersonal, updatePersonal, exportPersonal,changeEnable,getQrcode } from "@/api/system/personalPage";
|
|
-import { listTemplate } from "@/api/system/templatePage";
|
|
|
|
import { listUser } from "@/api/system/appUser";
|
|
import { listUser } from "@/api/system/appUser";
|
|
import Editor from '@/components/Editor';
|
|
import Editor from '@/components/Editor';
|
|
-import personalAvatar from "./detail/personalAvatar";
|
|
|
|
import qrcodeImg from '@/assets/image/qrcode_img.jpg'
|
|
import qrcodeImg from '@/assets/image/qrcode_img.jpg'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "personalPage",
|
|
name: "personalPage",
|
|
components: {
|
|
components: {
|
|
Editor,
|
|
Editor,
|
|
- personalAvatar
|
|
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -261,8 +225,8 @@ export default {
|
|
open: false,
|
|
open: false,
|
|
// 是否启用数据字典
|
|
// 是否启用数据字典
|
|
enableOptions: [],
|
|
enableOptions: [],
|
|
- // 配偶
|
|
|
|
customerOptions:[],
|
|
customerOptions:[],
|
|
|
|
+ stakeholderOptions:[],
|
|
// 查询参数
|
|
// 查询参数
|
|
customerParams: {
|
|
customerParams: {
|
|
enable: 0,
|
|
enable: 0,
|
|
@@ -289,8 +253,12 @@ export default {
|
|
templateParam:{
|
|
templateParam:{
|
|
enable: 0
|
|
enable: 0
|
|
},
|
|
},
|
|
- templateList: []
|
|
|
|
-
|
|
|
|
|
|
+ // 固定个人模板页
|
|
|
|
+ templateRoute: "/template/t",
|
|
|
|
+ templateList: [],
|
|
|
|
+ editParams: {
|
|
|
|
+ modName: '/personal/'
|
|
|
|
+ }
|
|
};
|
|
};
|
|
},
|
|
},
|
|
watch:{
|
|
watch:{
|
|
@@ -302,7 +270,6 @@ export default {
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.getList();
|
|
this.getList();
|
|
- this.getTemplateList();
|
|
|
|
this.getDicts("sys_normal_disable").then((response) => {
|
|
this.getDicts("sys_normal_disable").then((response) => {
|
|
this.enableOptions = response.data;
|
|
this.enableOptions = response.data;
|
|
});
|
|
});
|
|
@@ -318,8 +285,31 @@ export default {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ findStakeholder(query){
|
|
|
|
+ if (query.length > 1) {
|
|
|
|
+ this.loadings = true;
|
|
|
|
+ this.customerParams.searchValue = query;
|
|
|
|
+ listUser(this.customerParams).then(response => {
|
|
|
|
+ this.loadings = false;
|
|
|
|
+ this.stakeholderOptions = response.data;
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
customerChange(value){
|
|
customerChange(value){
|
|
this.form.customerId = value;
|
|
this.form.customerId = value;
|
|
|
|
+ let obj = {};
|
|
|
|
+ obj = this.customerOptions.find((item)=>{
|
|
|
|
+ return item.userId === value;
|
|
|
|
+ });
|
|
|
|
+ this.form.customer = obj.nickName
|
|
|
|
+ },
|
|
|
|
+ stakeholderChange(value){
|
|
|
|
+ this.form.stakeholderId = value;
|
|
|
|
+ let obj = {};
|
|
|
|
+ obj = this.stakeholderOptions.find((item)=>{
|
|
|
|
+ return item.userId === value;
|
|
|
|
+ });
|
|
|
|
+ this.form.stakeholder = obj.nickName
|
|
},
|
|
},
|
|
/** 查询个人页列表 */
|
|
/** 查询个人页列表 */
|
|
getList() {
|
|
getList() {
|
|
@@ -401,6 +391,7 @@ export default {
|
|
this.reset();
|
|
this.reset();
|
|
this.open = true;
|
|
this.open = true;
|
|
this.title = "添加个人页";
|
|
this.title = "添加个人页";
|
|
|
|
+ this.codeUrl = "";
|
|
},
|
|
},
|
|
/** 修改按钮操作 */
|
|
/** 修改按钮操作 */
|
|
handleUpdate(row) {
|
|
handleUpdate(row) {
|
|
@@ -467,8 +458,8 @@ export default {
|
|
getQrcodeImg(row) {
|
|
getQrcodeImg(row) {
|
|
const pid = row.id;
|
|
const pid = row.id;
|
|
const tid = row.templateId;
|
|
const tid = row.templateId;
|
|
- const route = this.templateList.find(item => item.id === tid).route;
|
|
|
|
- const url = window.location.origin + route+'/' + pid
|
|
|
|
|
|
+ // const route = this.templateList.find(item => item.id === tid).route;
|
|
|
|
+ const url = window.location.origin + this.templateRoute+'/' + pid + '?type=personal'
|
|
const param = {url:url}
|
|
const param = {url:url}
|
|
getQrcode(param).then(res => {
|
|
getQrcode(param).then(res => {
|
|
this.codeUrl = "data:image/gif;base64," + res.img;
|
|
this.codeUrl = "data:image/gif;base64," + res.img;
|
|
@@ -478,16 +469,16 @@ export default {
|
|
debugger
|
|
debugger
|
|
const pid = this.form.id;
|
|
const pid = this.form.id;
|
|
const tid = this.form.templateId;
|
|
const tid = this.form.templateId;
|
|
- const route = this.templateList.find(item => item.id === tid).route;
|
|
|
|
- console.log(window.location.origin + route+'/' + pid)
|
|
|
|
- var win = window.open(window.location.origin + route+'/' + pid);
|
|
|
|
|
|
+ // const route = this.templateList.find(item => item.id === tid).route;
|
|
|
|
+ console.log(window.location.origin + this.templateRoute+'/' + pid)
|
|
|
|
+ var win = window.open(window.location.origin + this.templateRoute+'/' + pid + '?type=personal');
|
|
win.document.title='个人页 - '+this.form.stakeholder
|
|
win.document.title='个人页 - '+this.form.stakeholder
|
|
},
|
|
},
|
|
preview(row) {
|
|
preview(row) {
|
|
const pid = row.id;
|
|
const pid = row.id;
|
|
const tid = row.templateId;
|
|
const tid = row.templateId;
|
|
- const route = this.templateList.find(item => item.id === tid).route;
|
|
|
|
- var win = window.open(window.location.origin + route+'/' + pid);
|
|
|
|
|
|
+ // const route = this.templateList.find(item => item.id === tid).route;
|
|
|
|
+ var win = window.open(window.location.origin + this.templateRoute+'/' + pid);
|
|
},
|
|
},
|
|
handleMessage(row) {
|
|
handleMessage(row) {
|
|
this.$router.push({
|
|
this.$router.push({
|