Commit 8bca9076 by xuyl

修复ui走查问题,访问页面参数调整,单选框组件优化

1 parent 7449f7ce
<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>
</el-form-item>
<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>
</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>
</el-dialog>
</div>
</template>
<script>
import { utils } from 'glsx-common'
import util from '@/utils/util'
export default {
name: 'selectEmp',
data() {
return {
selectId: '',
loading: false,
dialogVisible: false,
tableSearchForm: {},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableParams: {
listName: 'data',
tableOption: false,
// 行数据的key
mutiSelectUniqueKey: 'id',
tableColumns: [
{
label: '',
prop: '',
addHtml: 'options',
width: 100
},
{
label: '姓名',
prop: 'staffName'
},
{
label: '部门',
prop: 'departmentName'
},
{
label: '跟进专员类型',
prop: 'followerTypeName'
}
]
},
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [],
tableTotal: 0,
selectItem: [],
selectEmp: []
}
},
methods: {
jumpUrl() {
util.openTab(location.origin + '/settings/followUp/index')
},
getFollower() {
var params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum
}
this.$apis.channel.getFollower(params).then(res => {
this.tableData = res.data
this.tableTotal = res.count
})
},
init(item) {
if (item.length == 0) {
this.selectId = ''
}
this.tableSearchForm = {}
this.dialogVisible = true
this.$nextTick(() => {
this.$refs.table.page.pageNum = 1
this.getFollower()
})
},
handleSearch() {
this.getFollower()
},
selectionTable(val) {
this.selectItem = val
},
handleClose() {
this.handleCancel()
},
handleCancel: utils.debounce(function() {
this.dialogVisible = false
}, 300),
changeSelect() {
let list = this.tableData.filter(item => {
return item['id'] == this.selectId
})
this.selectEmp = {
id: list[0].id,
staffName: list[0].staffName
}
},
handleSelect: utils.debounce(function() {
this.loading = true
const { selectEmp } = this
if (selectEmp.length == 0) {
this.$message.error('请选择员工')
return
}
this.loading = false
this.dialogVisible = false
this.$emit('selectTable', [selectEmp])
}, 300)
}
}
</script>
<style lang="scss" scoped>
.emp-form-btn {
margin-left: 20px;
}
.dialog-jump {
color: #5850ff;
float: left;
line-height: 24px;
text-decoration: underline;
cursor: pointer;
}
.square-main {
/deep/ {
.el-radio__label {
display: none;
}
.el-table {
height: 40vh;
overflow-y: auto;
}
.el-table::before {
left: 0;
bottom: 0;
width: 100%;
height: 0px;
}
}
}
</style>
......@@ -216,7 +216,6 @@ export default {
}
})
.filter(item => item)
console.log(labelTreeRets)
this.$emit('tagSelected', labelTreeRets)
},
//全选
......
......@@ -101,7 +101,8 @@
</template>
<script>
import { utils } from 'glsx-common'
import selectEmpRadio from '@/components/selectEmpRadio'
// import selectEmpRadio from '@/components/selectEmpRadio'
import selectEmpRadio from '@/components/emp'
import selectTag from '@/components/selectTag'
import word from '@/mixins/word'
import upload from '@/mixins/upload'
......@@ -195,6 +196,7 @@ export default {
}
},
removeStaff(index) {
this.$refs.selectEmpForm.selectEmp = []
this.staffInfo.splice(index, 1)
},
handleAddEmp() {
......@@ -255,12 +257,10 @@ export default {
chooseApi = 'addBussinessCard'
}
delete param.staffInfo
param.staffId = staffId.join(',')
param.skipVerify ? (param.skipVerify = 1) : (param.skipVerify = 0)
const previewList = this.$refs.welcome.previewList ? this.$common.utils.deepClone(this.$refs.welcome.previewList) :[]
const attachmentList = previewList.map(item => {
console.log(item)
if (item.attType == 1) {
item.attContent = item.attContent.replaceAll('[@昵称]', '@昵称')
item.attContent = item.attContent.replaceAll('@昵称', '[@昵称]')
......
......@@ -59,7 +59,8 @@
</template>
<script>
import util from '@/utils/util'
import util from "@/utils/util";
export default {
name: 'cardList',
data() {
......@@ -118,52 +119,52 @@ export default {
{
label: '渠道名称',
prop: 'cardName',
minWidth: 200,
width: '210px',
addHtml: 'cardName'
},
{
label: '员工',
prop: 'staffName',
width: '130px',
width: '140px',
addHtml: 'staffName'
},
{
label: '手机号',
prop: 'staffPhone',
width: '150px'
width: '160px'
},
{
label: '访问量',
prop: 'visitCont',
width: '130px',
width: '140px',
addHtml: 'visitCont'
},
{
label: '今日新增客户',
prop: 'joinEntToday',
width: '130px'
width: '140px'
},
{
label: '总新增客户',
prop: 'joinEntTotal',
width: '120px'
width: '130px'
},
{
label: '名片地址',
prop: 'miniprogramCode',
addHtml: 'qrCode',
width: '126px'
width: '136px'
},
{
label: '标签',
prop: 'tagJson',
addHtml: 'tagJson',
width: '280px'
width: '400px'
},
{
label: '创建时间',
prop: 'createdTime',
width: '180px'
width: '190px'
},
{
label: '操作',
......
......@@ -152,8 +152,8 @@ export default {
this.timeRadio = 1
let params = {
...this.tableSearchForm,
pageSize: 1,
pageNum: 10,
pageSize: 10,
pageNum: 1,
dateInterval: 1
}
this.sendPageListApi(params)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!