Commit e297f517 by 前端

修复第三轮测试BUG

1 parent 5847ea53
<template>
<div class="square-main" v-loading="loading">
<el-dialog title="选择跟进专员" :visible.sync="dialogVisible" width="50%" :before-close="handleClose">
<el-form :inline="true" :model="tableSearchForm">
<el-form-item size="small" label="员工">
<el-input v-model="tableSearchForm.staffName" placeholder="请输入员工姓名"></el-input>
<div class="square-main"
v-loading="loading">
<el-dialog title="选择跟进专员"
:visible.sync="dialogVisible"
width="50%"
:before-close="handleClose">
<el-form :inline="true"
:model="tableSearchForm">
<el-form-item size="small"
label="员工">
<el-input v-model="tableSearchForm.staffName"
placeholder="请输入员工姓名"></el-input>
</el-form-item>
<el-form-item size="small" class="emp-form-btn">
<el-button type="primary" @click="handleSearch">查询</el-button>
<el-form-item size="small"
class="emp-form-btn">
<el-button type="primary"
@click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<GLTable :hasNum="false" v-if="dialogVisible" ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch" @selectionTable="selectionTable">
<div slot="options" slot-scope="scope" @change="changeSelect">
<el-radio :label="scope.scope.id" v-model="selectId"></el-radio>
<GLTable :hasNum="false"
v-if="dialogVisible"
ref="table"
:layout="layout"
:tableData="tableData"
:tableTotal="tableTotal"
:pageConf="pageConf"
:tableParams="tableParams"
@refreshTable="handleSearch"
@selectionTable="selectionTable">
<div slot="options"
slot-scope="scope"
@change="changeSelect">
<el-radio :label="scope.scope.id"
v-model="selectId"></el-radio>
</div>
</GLTable>
<span slot="footer" class="dialog-footer">
<a class="dialog-jump" @click="jumpUrl">新增专员</a>
<el-button size="small" @click="handleCancel">取 消</el-button>
<el-button size="small" type="primary" @click.native="handleSelect">确 定</el-button>
<span slot="footer"
class="dialog-footer">
<a class="dialog-jump"
@click="jumpUrl">新增专员</a>
<el-button size="small"
@click="handleCancel">取 消</el-button>
<el-button size="small"
type="primary"
@click.native="handleSelect">确 定</el-button>
</span>
</el-dialog>
</div>
......@@ -102,7 +128,7 @@ export default {
handleClose() {
this.handleCancel()
},
handleCancel: utils.debounce(function() {
handleCancel: utils.debounce(function () {
this.dialogVisible = false
}, 300),
changeSelect() {
......@@ -114,7 +140,7 @@ export default {
staffName: list[0].staffName
}
},
handleSelect: utils.debounce(function() {
handleSelect: utils.debounce(function () {
this.loading = true
const { selectEmp } = this
if (selectEmp.length == 0) {
......
export default {
data() {
return {}
},
methods: {
uploadAvatar(e) {
this.uploadFile(e, 'avatar')
},
uploadQrcode(e) {
this.uploadFile(e, 'qrcode')
},
getUploadName(name) {
let nameArr = name.split('.')
let lastName
while (nameArr.length) {
lastName = [nameArr[0]]
nameArr.unshift()
}
},
uploadFile(e, refName, AllImgExt = '.jpg|.jpeg|.gif|.bmp|.png|.swf') {
const file = e.srcElement.files[0]
let extName = file.name.substring(file.name.lastIndexOf('.')).toLowerCase()
if (AllImgExt.indexOf(extName) === -1) {
this.$message.error('上传格式不正确')
return false
}
const reader = new FileReader()
reader.readAsDataURL(file)
reader.onload = event => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(',')
const splitStr = file.name.split('.')
const fileUrl = splitStr[splitStr.length - 1] + '@' + arrBase64[1]
this.$apis.common.pictureUpload({ file: fileUrl }).then(res => {
if (res) {
if (!this.addCodeForm.headerSrc) {
this.addCodeForm.image = res
this.hasImage = true
} else {
this.addCodeForm.headerSrc = res
}
}
this.$refs[refName].value = ''
})
}
}
}
}
......@@ -637,7 +637,7 @@ export default {
return {
// add-新增;edit-编辑;look-查看
addOrEdit: 'add',
fromPage: '/marketing/sop/index',
fromPage: '/tools/sop/index',
id: ''
}
}
......@@ -1552,11 +1552,8 @@ export default {
}
,
cancelJump() {
this.$history.push({
path: this.routeInfo.fromPage
})
}
,
this.$history.push(this.routeInfo.fromPage)
},
handleCancel() {
if (this.editStatus) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!