Commit e297f517 by 前端

修复第三轮测试BUG

1 parent 5847ea53
<template> <template>
<div class="square-main" v-loading="loading"> <div class="square-main"
<el-dialog title="选择跟进专员" :visible.sync="dialogVisible" width="50%" :before-close="handleClose"> v-loading="loading">
<el-form :inline="true" :model="tableSearchForm"> <el-dialog title="选择跟进专员"
<el-form-item size="small" label="员工"> :visible.sync="dialogVisible"
<el-input v-model="tableSearchForm.staffName" placeholder="请输入员工姓名"></el-input> 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>
<el-form-item size="small" class="emp-form-btn"> <el-form-item size="small"
<el-button type="primary" @click="handleSearch">查询</el-button> class="emp-form-btn">
<el-button type="primary"
@click="handleSearch">查询</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<GLTable :hasNum="false" v-if="dialogVisible" ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch" @selectionTable="selectionTable"> <GLTable :hasNum="false"
<div slot="options" slot-scope="scope" @change="changeSelect"> v-if="dialogVisible"
<el-radio :label="scope.scope.id" v-model="selectId"></el-radio> 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> </div>
</GLTable> </GLTable>
<span slot="footer" class="dialog-footer"> <span slot="footer"
<a class="dialog-jump" @click="jumpUrl">新增专员</a> class="dialog-footer">
<el-button size="small" @click="handleCancel">取 消</el-button> <a class="dialog-jump"
<el-button size="small" type="primary" @click.native="handleSelect">确 定</el-button> @click="jumpUrl">新增专员</a>
<el-button size="small"
@click="handleCancel">取 消</el-button>
<el-button size="small"
type="primary"
@click.native="handleSelect">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
...@@ -102,7 +128,7 @@ export default { ...@@ -102,7 +128,7 @@ export default {
handleClose() { handleClose() {
this.handleCancel() this.handleCancel()
}, },
handleCancel: utils.debounce(function() { handleCancel: utils.debounce(function () {
this.dialogVisible = false this.dialogVisible = false
}, 300), }, 300),
changeSelect() { changeSelect() {
...@@ -114,7 +140,7 @@ export default { ...@@ -114,7 +140,7 @@ export default {
staffName: list[0].staffName staffName: list[0].staffName
} }
}, },
handleSelect: utils.debounce(function() { handleSelect: utils.debounce(function () {
this.loading = true this.loading = true
const { selectEmp } = this const { selectEmp } = this
if (selectEmp.length == 0) { 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 { ...@@ -637,7 +637,7 @@ export default {
return { return {
// add-新增;edit-编辑;look-查看 // add-新增;edit-编辑;look-查看
addOrEdit: 'add', addOrEdit: 'add',
fromPage: '/marketing/sop/index', fromPage: '/tools/sop/index',
id: '' id: ''
} }
} }
...@@ -1552,11 +1552,8 @@ export default { ...@@ -1552,11 +1552,8 @@ export default {
} }
, ,
cancelJump() { cancelJump() {
this.$history.push({ this.$history.push(this.routeInfo.fromPage)
path: this.routeInfo.fromPage },
})
}
,
handleCancel() { handleCancel() {
if (this.editStatus) { if (this.editStatus) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!