|
|
|
@ -1,26 +1,36 @@ |
|
|
|
|
// 个人客户 |
|
|
|
|
<template> |
|
|
|
|
<div class="wrap wrap2"> |
|
|
|
|
<MyTitle :titleArr="['客户信息', '个人客户信息建立']"/> |
|
|
|
|
<MyTitle :titleArr="['客户信息', '个人客户信息建立']" /> |
|
|
|
|
|
|
|
|
|
<div class="body"> |
|
|
|
|
<el-row :gutter="20"> |
|
|
|
|
<el-form ref="form" :model="form" label-width="140px" :rules="rules"> |
|
|
|
|
<el-col :span="10" :offset="1"> |
|
|
|
|
<el-form ref="form" |
|
|
|
|
:model="form" |
|
|
|
|
label-width="140px" |
|
|
|
|
:rules="rules"> |
|
|
|
|
<el-col :span="10" |
|
|
|
|
:offset="1"> |
|
|
|
|
<el-form-item label="证件类型"> |
|
|
|
|
<el-select v-model.trim="form.idType" disabled placeholder="请选择" ref="idType"> |
|
|
|
|
<el-option |
|
|
|
|
label="身份证" |
|
|
|
|
<el-select v-model.trim="form.idType" |
|
|
|
|
disabled |
|
|
|
|
placeholder="请选择" |
|
|
|
|
ref="idType"> |
|
|
|
|
<el-option label="身份证" |
|
|
|
|
:value="83"> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="客户姓名" prop="userName"> |
|
|
|
|
<el-input ref="userName" disabled :value="form.userName" @input="(val) => checkName(val, form, 'userName')"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="出生日期" prop="birthday"> |
|
|
|
|
<el-date-picker |
|
|
|
|
<el-form-item label="客户姓名" |
|
|
|
|
prop="userName"> |
|
|
|
|
<el-input ref="userName" |
|
|
|
|
disabled |
|
|
|
|
:value="form.userName" |
|
|
|
|
@input="(val) => checkName(val, form, 'userName')"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="出生日期" |
|
|
|
|
prop="birthday"> |
|
|
|
|
<el-date-picker disabled |
|
|
|
|
v-model.trim="form.birthday" |
|
|
|
|
type="date" |
|
|
|
|
placeholder="选择日期" |
|
|
|
@ -29,20 +39,33 @@ |
|
|
|
|
</el-date-picker> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="通讯地址"> |
|
|
|
|
<el-input :value="form.mailbox" @input="val => mailBoxListen(val, form, 'mailbox')" maxlength="30" ref="mailbox"></el-input> |
|
|
|
|
<el-input :value="form.mailbox" |
|
|
|
|
@input="val => mailBoxListen(val, form, 'mailbox')" |
|
|
|
|
maxlength="30" |
|
|
|
|
ref="mailbox"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="10" :offset="1"> |
|
|
|
|
<el-form-item label="证件号码" required> |
|
|
|
|
<div class="idCard" @click="popUp('身份证扫描仪')" v-if='!idNumberJudge'> |
|
|
|
|
<el-col :span="10" |
|
|
|
|
:offset="1"> |
|
|
|
|
<el-form-item label="证件号码" |
|
|
|
|
required> |
|
|
|
|
<div class="idCard" |
|
|
|
|
@click="popUp('身份证扫描仪')" |
|
|
|
|
v-if='!idNumberJudge'> |
|
|
|
|
<p>请刷身份证</p> |
|
|
|
|
</div> |
|
|
|
|
<div v-else> |
|
|
|
|
<el-input :value="form.idNumber" disabled ref="idNumber"></el-input> |
|
|
|
|
<el-input :value="form.idNumber" |
|
|
|
|
disabled |
|
|
|
|
ref="idNumber"></el-input> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="性别" prop="sex"> |
|
|
|
|
<el-select v-model.trim="form.sex" disabled placeholder="请选择" ref='sex'> |
|
|
|
|
<el-form-item label="性别" |
|
|
|
|
prop="sex"> |
|
|
|
|
<el-select v-model.trim="form.sex" |
|
|
|
|
disabled |
|
|
|
|
placeholder="请选择" |
|
|
|
|
ref='sex'> |
|
|
|
|
<!-- <el-option |
|
|
|
|
v-for="item in gender" |
|
|
|
|
:key="item.id" |
|
|
|
@ -50,31 +73,40 @@ |
|
|
|
|
:value="item.id" |
|
|
|
|
> |
|
|
|
|
</el-option> --> |
|
|
|
|
<el-option |
|
|
|
|
:key="1" |
|
|
|
|
<el-option :key="1" |
|
|
|
|
label="男" |
|
|
|
|
:value="1" |
|
|
|
|
> |
|
|
|
|
:value="1"> |
|
|
|
|
</el-option> |
|
|
|
|
<el-option |
|
|
|
|
:key="2" |
|
|
|
|
<el-option :key="2" |
|
|
|
|
label="女" |
|
|
|
|
:value="2" |
|
|
|
|
> |
|
|
|
|
:value="2"> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="联系电话" :rules="rules.phone" prop="phone"> |
|
|
|
|
<el-input :value="form.phone" @input="(val) => phoneListen(val, form, 'phone')" maxlength="12" ref='phone'></el-input> |
|
|
|
|
<el-form-item label="联系电话" |
|
|
|
|
:rules="rules.phone" |
|
|
|
|
prop="phone"> |
|
|
|
|
<el-input :value="form.phone" |
|
|
|
|
@input="(val) => phoneListen(val, form, 'phone')" |
|
|
|
|
maxlength="12" |
|
|
|
|
ref='phone'></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
|
|
</el-form> |
|
|
|
|
</el-row> |
|
|
|
|
<el-button @click="submitForm" type="primary" class="submitBtn" v-throttle>提交</el-button> |
|
|
|
|
<el-button @click="submitForm" |
|
|
|
|
type="primary" |
|
|
|
|
class="submitBtn" |
|
|
|
|
v-throttle>提交</el-button> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<my-dialog :moduleName="moduleName" v-if="visible" :visible.sync="visible" :showForm="form" :formName="formName" @submitIt="submitForm2()" /> |
|
|
|
|
<my-dialog :moduleName="moduleName" |
|
|
|
|
v-if="visible" |
|
|
|
|
:visible.sync="visible" |
|
|
|
|
:showForm="form" |
|
|
|
|
:formName="formName" |
|
|
|
|
@submitIt="submitForm2()" /> |
|
|
|
|
</div> |
|
|
|
|
<!-- <need-before class='wrap' v-else :moduleName='needBefore' :unNeed="unNeed"> |
|
|
|
|
</need-before> --> |
|
|
|
@ -95,35 +127,35 @@ import NeedBefore from '@/components/needBefore' |
|
|
|
|
const moduleName = 'consumerClient' |
|
|
|
|
export default { |
|
|
|
|
name: 'consumerClient', |
|
|
|
|
data() { |
|
|
|
|
data () { |
|
|
|
|
return { |
|
|
|
|
moduleName: 'consumerClient', |
|
|
|
|
idNumberJudge: false, |
|
|
|
|
visible:false,// 表单 |
|
|
|
|
form:{ |
|
|
|
|
idType:83,//证件类型 |
|
|
|
|
idNumber:'',//证件号码 |
|
|
|
|
userName:'',//客户名字 |
|
|
|
|
sex:'',//性别 |
|
|
|
|
birthday:null,//出生日期 |
|
|
|
|
nationality:'',//民族 |
|
|
|
|
mailbox:'',//通讯地址 |
|
|
|
|
phone:'',//联系电话 |
|
|
|
|
visible: false,// 表单 |
|
|
|
|
form: { |
|
|
|
|
idType: 83,//证件类型 |
|
|
|
|
idNumber: '',//证件号码 |
|
|
|
|
userName: '',//客户名字 |
|
|
|
|
sex: '',//性别 |
|
|
|
|
birthday: null,//出生日期 |
|
|
|
|
nationality: '',//民族 |
|
|
|
|
mailbox: '',//通讯地址 |
|
|
|
|
phone: '',//联系电话 |
|
|
|
|
peopleNumber: '', |
|
|
|
|
}, |
|
|
|
|
formName: { |
|
|
|
|
idType: '证件类型', |
|
|
|
|
idNumber:'证件号码', |
|
|
|
|
userName:'客户名字', |
|
|
|
|
sex:'性别', |
|
|
|
|
birthday:'出生日期', |
|
|
|
|
nationality:'民族', |
|
|
|
|
mailbox:'通讯地址', |
|
|
|
|
phone:'联系电话', |
|
|
|
|
idNumber: '证件号码', |
|
|
|
|
userName: '客户名字', |
|
|
|
|
sex: '性别', |
|
|
|
|
birthday: '出生日期', |
|
|
|
|
nationality: '民族', |
|
|
|
|
mailbox: '通讯地址', |
|
|
|
|
phone: '联系电话', |
|
|
|
|
peopleNumber: '客户号' |
|
|
|
|
}, |
|
|
|
|
rules: { |
|
|
|
|
userName: vercustomer , |
|
|
|
|
userName: vercustomer, |
|
|
|
|
phone: [ |
|
|
|
|
{ |
|
|
|
|
required: true, |
|
|
|
@ -145,17 +177,17 @@ export default { |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
authorization:false,// 切授权 |
|
|
|
|
success:false,// 切成功 |
|
|
|
|
papers:[ |
|
|
|
|
{name:'身份证',id:1} |
|
|
|
|
authorization: false,// 切授权 |
|
|
|
|
success: false,// 切成功 |
|
|
|
|
papers: [ |
|
|
|
|
{ name: '身份证', id: 1 } |
|
|
|
|
], |
|
|
|
|
options:[], |
|
|
|
|
gender:[ |
|
|
|
|
{name:'男',id:1}, |
|
|
|
|
{name:'女',id:2}, |
|
|
|
|
options: [], |
|
|
|
|
gender: [ |
|
|
|
|
{ name: '男', id: 1 }, |
|
|
|
|
{ name: '女', id: 2 }, |
|
|
|
|
], |
|
|
|
|
nations : [ |
|
|
|
|
nations: [ |
|
|
|
|
{ "itemId": 24, "description": "汉族", "options": "汉族", "subjectId": 3, "isDel": 0, "createTime": "2021-12-20 12:00:44", "updateTime": "2021-12-20 12:00:44" }, |
|
|
|
|
{ "itemId": 25, "description": "蒙古族", "options": "蒙古族", "subjectId": 3, "isDel": 0, "createTime": "2021-12-20 12:00:44", "updateTime": "2021-12-20 12:00:44" }, |
|
|
|
|
{ "itemId": 26, "description": "回族", "options": "回族", "subjectId": 3, "isDel": 0, "createTime": "2021-12-20 12:00:45", "updateTime": "2021-12-20 12:00:45" }, |
|
|
|
@ -222,11 +254,11 @@ export default { |
|
|
|
|
MyDialog, |
|
|
|
|
NeedBefore |
|
|
|
|
}, |
|
|
|
|
created() { |
|
|
|
|
created () { |
|
|
|
|
// if(this.isNeedBefore) { |
|
|
|
|
// return |
|
|
|
|
// } |
|
|
|
|
if(sessionStorage.getItem('nomClientIdentity')) { |
|
|
|
|
if (sessionStorage.getItem('nomClientIdentity')) { |
|
|
|
|
this.idNumberJudge = true |
|
|
|
|
const { userName, sex, birthday, nationality, mailbox, idNumber } = this.dataFlow |
|
|
|
|
this.form.idNumber = idNumber |
|
|
|
@ -246,36 +278,36 @@ export default { |
|
|
|
|
this.getFormData() |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
mixins: [ TipsBefore ], |
|
|
|
|
mounted() { |
|
|
|
|
mixins: [TipsBefore], |
|
|
|
|
mounted () { |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// 授权提交后 |
|
|
|
|
submitIt() { |
|
|
|
|
submitIt () { |
|
|
|
|
|
|
|
|
|
// this.setDataFlow({name: 'userName', val: ''}) |
|
|
|
|
// console.log(this.dataFlow) |
|
|
|
|
}, |
|
|
|
|
getFormData(){ |
|
|
|
|
let param= { |
|
|
|
|
getFormData () { |
|
|
|
|
let param = { |
|
|
|
|
parentId: '285,' + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',287,5,25,33' |
|
|
|
|
} |
|
|
|
|
getOperation(param).then((data)=>{ |
|
|
|
|
if(data.status == 200) { |
|
|
|
|
getOperation(param).then((data) => { |
|
|
|
|
if (data.status == 200) { |
|
|
|
|
var list = data.data.judgmentRuleReqs |
|
|
|
|
for (var i = 0; i < list.length; i++) { |
|
|
|
|
if (list[i].answerId == '40') {this.form.idType = +list[i].emptyTwo} |
|
|
|
|
if (list[i].answerId == '40') { this.form.idType = +list[i].emptyTwo } |
|
|
|
|
// if (list[i].answerId == '41') {sessionStorage.setItem('nomClientIdentity', list[i].emptyTwo)} |
|
|
|
|
if (list[i].answerId == '41' && list[i].emptyTwo) { |
|
|
|
|
this.idNumberJudge = true |
|
|
|
|
this.form.idNumber = list[i].emptyTwo |
|
|
|
|
} |
|
|
|
|
if (list[i].answerId == '42') {this.form.userName = list[i].emptyTwo} |
|
|
|
|
if (list[i].answerId == '43') {this.form.sex = +list[i].emptyTwo} |
|
|
|
|
if (list[i].answerId == '44') {this.form.birthday = list[i].emptyTwo} |
|
|
|
|
if (list[i].answerId == '45') {this.form.nationality = list[i].emptyTwo} |
|
|
|
|
if (list[i].answerId == '46') {this.form.mailbox = list[i].emptyTwo} |
|
|
|
|
if (list[i].answerId == '47') {this.form.phone = list[i].emptyTwo} |
|
|
|
|
if (list[i].answerId == '42') { this.form.userName = list[i].emptyTwo } |
|
|
|
|
if (list[i].answerId == '43') { this.form.sex = +list[i].emptyTwo } |
|
|
|
|
if (list[i].answerId == '44') { this.form.birthday = list[i].emptyTwo } |
|
|
|
|
if (list[i].answerId == '45') { this.form.nationality = list[i].emptyTwo } |
|
|
|
|
if (list[i].answerId == '46') { this.form.mailbox = list[i].emptyTwo } |
|
|
|
|
if (list[i].answerId == '47') { this.form.phone = list[i].emptyTwo } |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
@ -287,7 +319,7 @@ export default { |
|
|
|
|
// this.form[tt1] = tt1[key] |
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
}).catch((error)=>{ |
|
|
|
|
}).catch((error) => { |
|
|
|
|
// const tt1 = JSON.parse(sessionStorage.getItem('tt1')) |
|
|
|
|
// console.log('2-tt1') |
|
|
|
|
// console.log(tt1) |
|
|
|
@ -309,7 +341,7 @@ export default { |
|
|
|
|
setPopId: 'system/setPopId', |
|
|
|
|
setTipsOperate: 'system/setTipsOperate' |
|
|
|
|
}), |
|
|
|
|
popUp(){// 唤起弹窗 |
|
|
|
|
popUp () {// 唤起弹窗 |
|
|
|
|
// this.$store.commit('system/changePop',{show:true,text:'身份证扫描仪',id:'33'}) |
|
|
|
|
// this.changeShowGoods(true) |
|
|
|
|
// this.$store.commit('system/changePop',{show: false, text: '', id:'33'}) |
|
|
|
@ -320,12 +352,12 @@ export default { |
|
|
|
|
this.$router.push('/counter/list/') |
|
|
|
|
}, |
|
|
|
|
//提交个人用户信息 |
|
|
|
|
submitForm(){ |
|
|
|
|
submitForm () { |
|
|
|
|
if (this.submited) return this.$message.error('已提交!') |
|
|
|
|
let nomClientIdentity = sessionStorage.getItem('nomClientIdentity') |
|
|
|
|
let consumerClientDragList = JSON.parse(nomClientIdentity); |
|
|
|
|
let nomClientIdentitys = JSON.parse(nomClientIdentity); |
|
|
|
|
if(!this.form.idNumber) { |
|
|
|
|
if (!this.form.idNumber) { |
|
|
|
|
messageIdCard() |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
@ -333,9 +365,9 @@ export default { |
|
|
|
|
// this.form.birthday = this.form.birthday.slice(0, 10) |
|
|
|
|
this.form.peopleNumber = randomPeopleNumber() |
|
|
|
|
this.visible = true; |
|
|
|
|
} , this.$refs)); |
|
|
|
|
}, this.$refs)); |
|
|
|
|
}, |
|
|
|
|
submitForm2() { |
|
|
|
|
submitForm2 () { |
|
|
|
|
let nomClientIdentity = sessionStorage.getItem('nomClientIdentity') |
|
|
|
|
let consumerClientDragList = JSON.parse(nomClientIdentity); |
|
|
|
|
let projectId = sessionStorage.getItem('projectId') |
|
|
|
@ -344,47 +376,47 @@ export default { |
|
|
|
|
|
|
|
|
|
let formList = []; |
|
|
|
|
|
|
|
|
|
formList.push({"answerId":'41',"emptyOne": "", "emptyTwo": this.form.idNumber, "operationIds": "285," + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id +",287,5,25,33,41,13","type": ""}) |
|
|
|
|
if(this.form.sex){ |
|
|
|
|
formList.push({ "answerId": '41', "emptyOne": "", "emptyTwo": this.form.idNumber, "operationIds": "285," + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ",287,5,25,33,41,13", "type": "" }) |
|
|
|
|
if (this.form.sex) { |
|
|
|
|
formList.push({ |
|
|
|
|
"answerId":'43', |
|
|
|
|
"answerId": '43', |
|
|
|
|
"emptyOne": "1", |
|
|
|
|
"emptyTwo": this.form.sex, |
|
|
|
|
"operationIds": "285," + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id +",287,5,25,33,43",//性别 |
|
|
|
|
"operationIds": "285," + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ",287,5,25,33,43",//性别 |
|
|
|
|
"type": "1" |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
if(this.form.nationality){ |
|
|
|
|
if (this.form.nationality) { |
|
|
|
|
formList.push({ |
|
|
|
|
"answerId":'45', |
|
|
|
|
"answerId": '45', |
|
|
|
|
"emptyOne": "3", |
|
|
|
|
"emptyTwo": this.form.nationality, |
|
|
|
|
"operationIds": "285," + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id +",287,5,25,33,45",//民族 |
|
|
|
|
"operationIds": "285," + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ",287,5,25,33,45",//民族 |
|
|
|
|
"type": "1" |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
if(this.form.mailbox){ |
|
|
|
|
if (this.form.mailbox) { |
|
|
|
|
formList.push({ |
|
|
|
|
"answerId":'46', |
|
|
|
|
"answerId": '46', |
|
|
|
|
"emptyOne": "4", |
|
|
|
|
"emptyTwo": this.form.mailbox, |
|
|
|
|
"operationIds": "285," + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id +",287,5,25,33,46",//通讯地址 |
|
|
|
|
"operationIds": "285," + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ",287,5,25,33,46",//通讯地址 |
|
|
|
|
"type": "3" |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
formList.push( |
|
|
|
|
{"answerId":'40',"emptyOne": "19", "emptyTwo": this.form.idType, "operationIds": "285," + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id +",287,5,25,33,40", "type": "1"},//证件类型 |
|
|
|
|
{"answerId":'42',"emptyOne": "7", "emptyTwo": this.form.userName, "operationIds": "285," + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id +",287,5,25,33,42", "type": "3"},//客户姓名 |
|
|
|
|
{"answerId":'44',"emptyOne": "2", "emptyTwo": this.form.birthday, "operationIds": "285," + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id +",287,5,25,33,44", "type": "3"},//出生日期 |
|
|
|
|
{"answerId":'47',"emptyOne": "5", "emptyTwo": this.form.phone, "operationIds": "285," + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id +",287,5,25,33,47", "type": "3"}//联系电话 |
|
|
|
|
{ "answerId": '40', "emptyOne": "19", "emptyTwo": this.form.idType, "operationIds": "285," + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ",287,5,25,33,40", "type": "1" },//证件类型 |
|
|
|
|
{ "answerId": '42', "emptyOne": "7", "emptyTwo": this.form.userName, "operationIds": "285," + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ",287,5,25,33,42", "type": "3" },//客户姓名 |
|
|
|
|
{ "answerId": '44', "emptyOne": "2", "emptyTwo": this.form.birthday, "operationIds": "285," + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ",287,5,25,33,44", "type": "3" },//出生日期 |
|
|
|
|
{ "answerId": '47', "emptyOne": "5", "emptyTwo": this.form.phone, "operationIds": "285," + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ",287,5,25,33,47", "type": "3" }//联系电话 |
|
|
|
|
); |
|
|
|
|
let params= { |
|
|
|
|
let params = { |
|
|
|
|
parentId: '285,' + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',287,5,25,33', |
|
|
|
|
lcJudgmentRuleReq:formList, |
|
|
|
|
projectId:+projectId, |
|
|
|
|
startTime:startTime, |
|
|
|
|
lcJudgmentRuleReq: formList, |
|
|
|
|
projectId: +projectId, |
|
|
|
|
startTime: startTime, |
|
|
|
|
} |
|
|
|
|
addOperation(params).then((data)=>{ |
|
|
|
|
addOperation(params).then((data) => { |
|
|
|
|
// this.$message({ |
|
|
|
|
// message: '提交成功', |
|
|
|
|
// type: 'success' |
|
|
|
@ -392,23 +424,23 @@ export default { |
|
|
|
|
this.setNeedsModule(moduleName) |
|
|
|
|
this.setDataFlow({ ...this.form }) |
|
|
|
|
this.submited = 1 |
|
|
|
|
}).catch((error)=>{ |
|
|
|
|
}).catch((error) => { |
|
|
|
|
this.setTipsOperate('服务器繁忙哦,提交失败。') |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
throttle(fn,wait=1000){// 节流函数 |
|
|
|
|
throttle (fn, wait = 1000) {// 节流函数 |
|
|
|
|
var timer = null; |
|
|
|
|
return function(){ |
|
|
|
|
return function () { |
|
|
|
|
var context = this; |
|
|
|
|
var args = fn; |
|
|
|
|
if(!timer){ |
|
|
|
|
timer = setTimeout(function(){ |
|
|
|
|
fn.apply(context,fn); |
|
|
|
|
if (!timer) { |
|
|
|
|
timer = setTimeout(function () { |
|
|
|
|
fn.apply(context, fn); |
|
|
|
|
timer = null; |
|
|
|
|
},wait) |
|
|
|
|
}, wait) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
@ -428,18 +460,17 @@ export default { |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
.wrap{ |
|
|
|
|
.wrap { |
|
|
|
|
width: 100%; |
|
|
|
|
height: 100%; |
|
|
|
|
display: flex; |
|
|
|
|
flex-direction: column; |
|
|
|
|
overflow: auto; |
|
|
|
|
padding: 24px 0 24px 24px; |
|
|
|
|
.body{ |
|
|
|
|
.body { |
|
|
|
|
margin-top: 50px; |
|
|
|
|
overflow-y: auto; |
|
|
|
|
overflow-x: hidden; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
</style> |
|
|
|
|