Commit 1e36e420 by xuyl

开发访问记录页面并优化跟进员工选择

1 parent 07218af1
...@@ -19,13 +19,19 @@ ...@@ -19,13 +19,19 @@
</el-form-item> </el-form-item>
<div class="el-form-item is-required" v-if="addCodeForm.type == 1"> <div class="el-form-item is-required" v-if="addCodeForm.type == 1">
<label for="codeName" class="el-form-item__label" style="width: 154px">选择专员:</label> <label for="codeName" class="el-form-item__label" style="width: 154px">选择专员:</label>
<div class="el-form-item__content" style="margin-left: 154px"> <div class="el-form-item__content" style="margin-left: 154px" v-show="staffInfo.length == 0">
<el-button size="small" @click="handleAddEmp"> <el-button size="small" @click="handleAddEmp">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
选择专员 选择专员
</el-button> </el-button>
<div class="el-form-item__error" v-if="staffStatus">请选择专员</div> <div class="el-form-item__error" v-if="staffStatus">请选择专员</div>
</div> </div>
<div class="el-form-item__content " v-if="staffInfo.length !== 0">
<el-tag effect="plain" type="info" v-for="(tag, idx) in staffInfo" :key="idx" closable :disable-transitions="false" @close="removeStaff(idx)">
<i class="el-icon-user-solid rareFollowStaff"></i>
{{ tag.staffName }}
</el-tag>
</div>
</div> </div>
<el-form-item label="代理商姓名:" prop="codeName" v-if="addCodeForm.type == 2"> <el-form-item label="代理商姓名:" prop="codeName" v-if="addCodeForm.type == 2">
<el-input size="small" v-model.trim="addCodeForm.codeName" placeholder="请输入代理商姓名" maxlength="30"></el-input> <el-input size="small" v-model.trim="addCodeForm.codeName" placeholder="请输入代理商姓名" maxlength="30"></el-input>
...@@ -222,6 +228,7 @@ export default { ...@@ -222,6 +228,7 @@ export default {
staffName: item.staffName staffName: item.staffName
} }
}) })
console.log(this.staffInfo)
}, },
tagSelected(item) { tagSelected(item) {
this.tagging = item this.tagging = item
...@@ -340,6 +347,11 @@ export default { ...@@ -340,6 +347,11 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.rareFollowStaff{
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
.channel-main { .channel-main {
margin-bottom: 16px; margin-bottom: 16px;
.upload-panel { .upload-panel {
......
<template> <template>
<div> <div>
<div class="form-header"> <div class="form-header">
<GLButton type="primary" size="small" icon="el-icon-add" @click="handleAddCode" fn="新增活码">新建智能名片</GLButton> <GLButton type="primary" size="small" icon="el-icon-add" @click="handleAddCode" fn="新增智能名片">新建智能名片</GLButton>
</div> </div>
<div class="form-panel scrm-box-f"> <div class="form-panel scrm-box-f">
<GLCombiForm :rowNumber="1" ref="formSearch" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm :rowNumber="1" ref="formSearch" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
</div> </div>
</GLTable> </GLTable>
</div> </div>
<GLDialog title="提示" @onOk="handleSure" @onCancel="dialogVisibleDel = false" type="error" content="是否删除?" :visible.sync="dialogVisibleDel" mode="small"></GLDialog> <GLDialog title="提示" @onOk="handleSure" @onCancel="dialogVisibleDel = false" type="error" content="删除该智能名片将失去该名片统计数据,是否删除?" :visible.sync="dialogVisibleDel" mode="small"></GLDialog>
<emp-detail ref="empDetailForm"></emp-detail> <emp-detail ref="empDetailForm"></emp-detail>
</div> </div>
</template> </template>
...@@ -141,7 +141,7 @@ export default { ...@@ -141,7 +141,7 @@ export default {
name: '编辑', name: '编辑',
attrs: { attrs: {
type: 'text', type: 'text',
fn: '活码编辑' fn: '编辑智能名片'
}, },
listeners: { listeners: {
click: this.handleEdit click: this.handleEdit
......
...@@ -20,19 +20,15 @@ ...@@ -20,19 +20,15 @@
</el-form> </el-form>
</div> </div>
<GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch"> <GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch">
<div slot="newlyCount" slot-scope="scope">
<div class="link-dialog" @click="handleEmpDetail(scope.scope, 'day', scope.scope.timeFrame)" v-if="scope.scope.newlyCount">{{ scope.scope.newlyCount }}</div>
<div v-else>0</div>
</div>
<div slot="newlyKeepCount" slot-scope="scope">
<div class="link-dialog" @click="handleEmpDetail(scope.scope, 'status', scope.scope.timeFrame)" v-if="scope.scope.newlyKeepCount">{{ scope.scope.newlyKeepCount }}</div>
<div v-else>0</div>
</div>
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleEmpDetail(scope.scope)">访问记录</el-button> <!-- <el-button type="text" @click="handleEmpDetail(scope.scope)">访问记录</el-button>-->
<el-button type="text" @click="accessToRecords(scope)">访问记录</el-button>
</div> </div>
</GLTable> </GLTable>
<page-detail ref="empDetailForm"></page-detail> <page-detail ref="empDetailForm"></page-detail>
<el-dialog class="recordDialog" title="访问记录" :visible.sync="dialogTableVisible" width="45%" :top="0">
<GLTable ref="tableRecords" :layout="layout" :tableData="tableDataRecords" :tableTotal="tableTotalRecords" :pageConf="pageConfRecords" :tableParams="tableParamsRecords" @refreshTable="recordSearch"></GLTable>
</el-dialog>
</div> </div>
</template> </template>
...@@ -45,6 +41,7 @@ export default { ...@@ -45,6 +41,7 @@ export default {
}, },
data() { data() {
return { return {
dialogTableVisible: false,
timeRadio: 1, timeRadio: 1,
trendType: 1, trendType: 1,
pickerOptions: { pickerOptions: {
...@@ -88,18 +85,35 @@ export default { ...@@ -88,18 +85,35 @@ export default {
prop: 'timeFrame' prop: 'timeFrame'
}, },
{ {
label: '操作', label: '访问时间',
prop: 'optionBtns', prop: 'optionBtns',
width: '80px', width: '100px',
addHtml: 'optionBtns', addHtml: 'optionBtns',
fixed: 'right' fixed: 'right'
} }
] ]
}, },
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
tableParamsRecords: {
listName: 'data',
tableOption: false,
tableColumns: [
{
label: '访问页面',
prop: 'codeName'
},
{
label: '访问时间',
prop: 'codeName'
}
]
},
pageConfRecords: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
layout: 'sizes, prev, pager, next, jumper, ->, total', layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [], tableData: [],
tableDataRecords: [],
tableTotal: 0, tableTotal: 0,
tableTotalRecords: 0,
startTime: '', startTime: '',
endTime: '', endTime: '',
selectItem: [], selectItem: [],
...@@ -125,6 +139,27 @@ export default { ...@@ -125,6 +139,27 @@ export default {
// } // }
// }, // },
methods: { methods: {
accessToRecords() {
this.dialogTableVisible = true
this.$nextTick(() => {
this.recordSearch()
})
},
recordSearch() {
var params = {
...JSON.parse(JSON.stringify(this.tableParamsRecords)),
pageSize: this.$refs.tableRecords.page.pageSize,
pageNum: this.$refs.tableRecords.page.pageNum,
startTime: this.startTime,
endTime: this.endTime,
trendType: this.trendType
}
this.$apis.overview.codeSearch(params).then(res => {
this.tableDataRecords = res.data
console.log(this.tableDataRecords)
this.tableTotalRecords = res.count
})
},
handleTime() { handleTime() {
const value = this.createTime const value = this.createTime
if (value && value.length > 0) { if (value && value.length > 0) {
...@@ -249,6 +284,13 @@ export default { ...@@ -249,6 +284,13 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/.recordDialog {
.el-dialog {
height: 100vh;
overflow: auto;
margin-right: 0;
}
}
.channel-main { .channel-main {
padding: 20px; padding: 20px;
/deep/ { /deep/ {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!