Commit 3484a74f authored by IvyXia123's avatar IvyXia123

Merge branch 'dev'

parents 5cdc6d96 ddf5cef0
...@@ -272,7 +272,8 @@ ...@@ -272,7 +272,8 @@
"assert-plus": { "assert-plus": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
"optional": true
}, },
"assign-symbols": { "assign-symbols": {
"version": "1.0.0", "version": "1.0.0",
...@@ -1914,6 +1915,7 @@ ...@@ -1914,6 +1915,7 @@
"version": "1.0.6", "version": "1.0.6",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz",
"integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=",
"optional": true,
"requires": { "requires": {
"delayed-stream": "~1.0.0" "delayed-stream": "~1.0.0"
} }
...@@ -2678,7 +2680,8 @@ ...@@ -2678,7 +2680,8 @@
"delayed-stream": { "delayed-stream": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
"optional": true
}, },
"depd": { "depd": {
"version": "1.1.2", "version": "1.1.2",
...@@ -3410,7 +3413,8 @@ ...@@ -3410,7 +3413,8 @@
"extsprintf": { "extsprintf": {
"version": "1.3.0", "version": "1.3.0",
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
"integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
"optional": true
}, },
"fast-deep-equal": { "fast-deep-equal": {
"version": "1.1.0", "version": "1.1.0",
...@@ -3732,7 +3736,8 @@ ...@@ -3732,7 +3736,8 @@
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
...@@ -3753,12 +3758,14 @@ ...@@ -3753,12 +3758,14 @@
"balanced-match": { "balanced-match": {
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"brace-expansion": { "brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"balanced-match": "^1.0.0", "balanced-match": "^1.0.0",
"concat-map": "0.0.1" "concat-map": "0.0.1"
...@@ -3773,17 +3780,20 @@ ...@@ -3773,17 +3780,20 @@
"code-point-at": { "code-point-at": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
...@@ -3900,7 +3910,8 @@ ...@@ -3900,7 +3910,8 @@
"inherits": { "inherits": {
"version": "2.0.3", "version": "2.0.3",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"ini": { "ini": {
"version": "1.3.5", "version": "1.3.5",
...@@ -3912,6 +3923,7 @@ ...@@ -3912,6 +3923,7 @@
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"number-is-nan": "^1.0.0" "number-is-nan": "^1.0.0"
} }
...@@ -3926,6 +3938,7 @@ ...@@ -3926,6 +3938,7 @@
"version": "3.0.4", "version": "3.0.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"brace-expansion": "^1.1.7" "brace-expansion": "^1.1.7"
} }
...@@ -3933,12 +3946,14 @@ ...@@ -3933,12 +3946,14 @@
"minimist": { "minimist": {
"version": "0.0.8", "version": "0.0.8",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"minipass": { "minipass": {
"version": "2.2.4", "version": "2.2.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.1", "safe-buffer": "^5.1.1",
"yallist": "^3.0.0" "yallist": "^3.0.0"
...@@ -3957,6 +3972,7 @@ ...@@ -3957,6 +3972,7 @@
"version": "0.5.1", "version": "0.5.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
...@@ -4037,7 +4053,8 @@ ...@@ -4037,7 +4053,8 @@
"number-is-nan": { "number-is-nan": {
"version": "1.0.1", "version": "1.0.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"object-assign": { "object-assign": {
"version": "4.1.1", "version": "4.1.1",
...@@ -4049,6 +4066,7 @@ ...@@ -4049,6 +4066,7 @@
"version": "1.4.0", "version": "1.4.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"wrappy": "1" "wrappy": "1"
} }
...@@ -4134,7 +4152,8 @@ ...@@ -4134,7 +4152,8 @@
"safe-buffer": { "safe-buffer": {
"version": "5.1.1", "version": "5.1.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
...@@ -4170,6 +4189,7 @@ ...@@ -4170,6 +4189,7 @@
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",
...@@ -4189,6 +4209,7 @@ ...@@ -4189,6 +4209,7 @@
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
} }
...@@ -4232,12 +4253,14 @@ ...@@ -4232,12 +4253,14 @@
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"yallist": { "yallist": {
"version": "3.0.2", "version": "3.0.2",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
} }
} }
}, },
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
// 权限验证 动态路由 // 权限验证 动态路由
if (window.location.href.indexOf("login") < 0) { if (window.location.href.indexOf("login") < 0) {
let permission = this.$store.state.progressList; let permission = this.$store.state.progressList;
console.log(this.$store.state); // console.log(this.$store.state);
let menuList = []; let menuList = [];
this.$router.options.routes[0].children = []; this.$router.options.routes[0].children = [];
let routerUserDetail = { let routerUserDetail = {
......
<!-- 回访信息 -->
<template>
<div class="callback-container">
<div class="callback-item" style="margin-bottom: 15px;">
ID:{{callbackObj.detail.user_id}} &emsp;
用户昵称:{{callbackObj.detail.nickname}} &emsp;
宝宝名称:{{callbackObj.detail.baby_name ? callbackObj.detail.baby_name : '-'}} &emsp;
宝宝生日:{{(callbackObj.detail.birthday == '0000-00-00') ? '-' : callbackObj.detail.birthday}} &emsp;
手机号:{{callbackObj.detail.mobile ? callbackObj.detail.mobile : '-'}} &emsp;
</div>
<div class="callback-item" style="display: flex; margin-bottom: 15px; line-height: 32px;">
标签:
<span class="callback-tag-wrapper" v-if="tag.length">
<el-tag :key="item.id" :type="item.type==1 ? 'info' : ''" v-for="item in tag">{{item.label_name}}</el-tag>
</span>
<el-button type="warning" size="small" plain @click="dialogToggle">编辑标签</el-button>
</div>
<div class="callback-item callback-input" v-if="callbackObj.teacher_id && callbackAdd">
<el-form size="small" inline>
<el-form-item required>
<el-select v-model="add.method" placeholder="回访方式" style="width: 140px;">
<el-option v-for="item in CALLBACK_METHOD" :key="item.id" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item required>
<el-select v-model="add.type" placeholder="回访类型" style="width: 140px;">
<el-option v-for="item in CALLBACK_TYPE" :key="item.id" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item required>
<el-select v-model="add.intention" placeholder="意向度" style="width: 140px;">
<el-option v-for="item in CALLBACK_INTENTION" :key="item.id" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-date-picker
type="date" placeholder="下次回访" clearable style="width: 140px;"
value-format="yyyy-MM-dd" v-model="add.next_visit_at"></el-date-picker>
</el-form-item>
<el-button size="small" type="success" plain @click="addCallback">添加回访信息</el-button>
</el-form>
<el-input
type="textarea" :rows="3"
placeholder="请输入回访内容" v-model="add.desc"></el-input>
</div>
<div class="callback-list callback-item">
<ol v-if="list.length">
<li :key="item.id" v-for="item in list">
<!--系统-->
<template v-if="item.flag == 0">
<span class="time">{{item.created_at}}</span>
<span class="grey">系统导入</span>
<span class="grey" v-if="item.first_key" :class="(item.desc.indexOf('支付')>-1) ? 'bold' : ''">{{item.first_key}}</span>
<span class="info" v-if="item.desc" :class="(item.desc.indexOf('支付')>-1) ? 'red' : ''">{{item.desc}}</span>
</template>
<template v-else-if="item.flag == 1">
<span class="time">{{item.created_at}}</span>
<span class="bold dark" v-if="item.staff_name">{{item.staff_name}}</span>
<span class="bold dark" v-if="item.teacher_name">{{item.teacher_name}}</span>
<span class="dark">{{filterName(item.method, 'CALLBACK_METHOD')}}</span>
<span class="dark">{{filterName(item.intention, 'CALLBACK_INTENTION')}}</span>
<span class="green" v-if="item.desc">{{item.desc}}</span>
<span class="info">下次回访:{{item.next_visit_at == '0000-00-00' ? '-' : item.next_visit_at}}</span>
</template>
</li>
</ol>
<p class="callback-list-text" v-else>暂无回访数据</p>
<page :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
</div>
<el-dialog :title="dialog.title" append-to-body :visible.sync="dialog.show" width="800px">
<el-form label-width="120px">
<el-form-item label="已有标签:" class="callback-tag-wrapper">
<template v-if="tag.length">
<el-tag
:key="item.id" v-for="item in tag"
@close="tagDel(item)"
:closable="item.type==1 ? false : true"
:type="item.type==1 ? 'info' : ''">{{item.label_name}}</el-tag>
</template>
<template v-else>
暂无
</template>
</el-form-item>
<el-form-item label="添加标签:" required>
<el-cascader
ref="tree" v-model="tagSelectedTmp"
style="width: calc(100% - 90px)" placeholder="选择标签" clearable @change="tagChange" :disabled="!treeDataOrigin.length"
:options="treeDataOrigin" :props="{ value: 'objString', label: 'name', multiple: false, checkStrictly: false }"></el-cascader>
</el-form-item>
<el-form-item label="已选标签备注:">
<div v-if="!tagSelectedText" style="color: #999;">未选择标签</div>
<div v-else v-html="tagSelectedText"></div>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogToggle">取消</el-button>
<el-button type="primary" @click="dialogSave">保存,添加下一个</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {CALLBACK_METHOD, CALLBACK_TYPE, CALLBACK_INTENTION} from "@/util/wordbook";
import {getUserTagApi, getTagApi, getCallBackApi, postCallBackApi, postUserTagApi, delUserTagApi} from "@/service/api";
import page from '@/components/framework/page'
export default {
name: "CallBack",
components: { page },
props: {
callbackObj: {
type: Object,
default: () => {}
},
callbackAdd: {
type: Boolean,
default: false
}
},
data() {
return {
CALLBACK_METHOD: CALLBACK_METHOD,
CALLBACK_TYPE: CALLBACK_TYPE,
CALLBACK_INTENTION: CALLBACK_INTENTION,
tag: [],
treeDataOrigin: [],
tagSelected: [],
tagSelectedTmp: [],
tagSelectedText: '',
list: [],
total: 0,
nowPage: 1,
limit: 50,
textarea: '',
add: {
method: '',
type: '',
intention: '',
next_visit_at: '',
desc: ''
},
dialog: {
title: '',
show: false,
form: {
id: '',
name: '',
mobile: '',
id_card: '',
type: '',
in_at: '',
over_at: '',
rules: {
name: [{required: true, message: '请输入', trigger: 'blur'}],
mobile: [{required: true, message: '请输入', trigger: 'blur'}],
id_card: [{required: true, message: '请输入', trigger: 'blur'}],
type: [{required: true, message: '请选择', trigger: 'change'}],
in_at: [{required: true, message: '请选择', trigger: 'change'}],
},
}
},
}
},
created() {
},
mounted() {
this.getTag();
this.getData();
},
methods: {
filterName(string, type) {
return this[type].find(i => {return i.value == string}).label
},
tagDel(item) {
this.$confirm(`是否删除标签 <br> ${item.label_name}`, '提示', {
dangerouslyUseHTMLString: true,
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
delUserTagApi(item.id).then(res => {
this.$message({ type: 'success', message: '标签删除成功!' });
this.getTag();
})
})
},
dialogToggle() {
this.dialog.show = !this.dialog.show;
if (!this.treeDataOrigin.length) {
this.getTagTree();
}
if (!this.dialog.show) {
this.dialogReset();
}
},
dialogReset() {
this.tagSelected = [];
this.tagSelectedTmp = [];
this.tagSelectedText = '';
},
dialogSave() {
if (!this.tagSelected.length) {
this.$message({ type: 'error', message: '请选择标签!' });
return
}
var json = {
user_id: this.callbackObj.id,
type: 0,
first_label_id: this.tagSelected[0]
};
this.tagSelected[1] ? json.second_label_id = this.tagSelected[1] : '';
this.tagSelected[2] ? json.third_label_id = this.tagSelected[2] : '';
postUserTagApi(json).then(res => {
this.$message({ type: 'success', message: '添加成功!' });
this.getTag();
this.dialogReset();
})
},
tagChange(val) {
if (val.length) {
let str = '', arr = [];
val.forEach((i, idx) => {
let o = JSON.parse(i);
arr.push(o.id);
str += `<p style="margin-top: 0;">${idx + 1}. ${o.name}${o.cover || '-'} </p>`
})
this.tagSelectedText = str;
this.tagSelected = arr;
} else {
this.tagSelectedText = '';
this.tagSelected = [];
}
},
getTagTree() { // 获取标签
function recursion(arr) {
if (Array.isArray(arr) && arr.length) {
arr.forEach(val => {
val.objString = JSON.stringify({
name: val.name,
id: val.id,
cover: val.cover
});
recursion(val.children);
})
}
}
getTagApi().then(res => {
recursion(res);
this.treeDataOrigin = res;
});
},
getTag() {
if (this.callbackObj.id) {
getUserTagApi(this.callbackObj.id).then(res => {
this.tag = res;
})
}
},
getData() {
let json = {
limit: this.limit,
page: this.nowPage
};
this.teacher_num ? json.teacher_num = this.teacher_num : '';
this.callbackObj.id ? json.user_id = this.callbackObj.id : '';
console.log(json, 9000)
getCallBackApi(json).then(res => {
this.list = res.page_data;
this.total = res.total_page
})
},
callbackReset() {
this.add.method = '';
this.add.type = '';
this.add.intention = '';
this.add.next_visit_at = '';
this.add.desc = '';
},
addCallback() {
if (!this.add.method) {
this.$message({type: 'error', message: '请选择回访方式'});
return
}
if (!this.add.type) {
this.$message({type: 'error', message: '请选择回访类型'});
return
}
if (!this.add.intention) {
this.$message({type: 'error', message: '请选择意向度'});
return
}
let json = {
user_id: this.callbackObj.id,
//teacher_id: this.callbackObj.teacher_id, // TODO
teacher_id: 84, // TODO
method: this.add.method,
type: this.add.type,
intention: this.add.intention,
}
this.add.next_visit_at ? json.next_visit_at = this.add.next_visit_at : '';
this.add.desc ? json.desc = this.add.desc : '';
postCallBackApi(json).then(res => {
this.$message({type: 'success', message: '回访添加成功'});
this.callbackReset();
this.getData();
})
},
onPageChange(val) {
this.nowPage = val;
this.getData()
},
onSizeChange(val) {
this.limit = val;
this.nowPage = 1;
this.getData()
},
}
}
</script>
<style lang="less">
.callback-container {
.el-divider--horizontal {
margin: 20px 0;
}
}
.callback-item {
margin-bottom: 15px;
padding: 15px;
background-color: rgba(245, 247, 250, 0.65);
border: solid 1px rgba(220, 223, 230, 0.5);
border-radius: 2px;
&:last-child {
margin-bottom: 0;
}
}
.callback-tag-wrapper {
.el-tag {
margin-right: 10px;
}
}
.callback-list {
ol {
margin: 0 0 10px;
padding: 0;
list-style: none;
}
.callback-list-text {
text-align: center;
line-height: 32px;
}
li {
/*display: flex;*/
padding: 2px 0;
line-height: 24px;
font-size: 14px;
span {
/*display: inline-block;*/
margin-right: 12px;
&.time {
font-family: monospace;
font-size: 13px;
}
&.grey {
color: #555;
}
&.dark {
color: #333;
}
&.bold {
font-weight: bold;
}
&.info {
font-size: 13px;
color: #888;
}
&.green {
color: #33CC66;
}
&.red {
color: red;
}
}
}
}
.callback-input {
font-size: 0;
.el-form-item {
margin-right: 10px;
margin-bottom: 10px;
}
.is-required .el-select {
display: flex;
&:before {
content: '*';
color: #F56C6C;
margin-top: -6px;
margin-right: 4px;
}
}
}
</style>
...@@ -38,7 +38,7 @@ export default { ...@@ -38,7 +38,7 @@ export default {
}; };
}, },
mounted() { mounted() {
console.log(this.menuList); // console.log(this.menuList);
}, },
methods: { methods: {
changeMenuType: function() { changeMenuType: function() {
......
...@@ -12,35 +12,29 @@ ...@@ -12,35 +12,29 @@
<el-button size="mini" @click="editComment(row.id)"> <el-button size="mini" @click="editComment(row.id)">
新增话术记录 新增话术记录
</el-button> </el-button>
<el-dialog append-to-body :visible.sync="descDialog.show" title="沟通情况列表" width="75%"> <el-dialog append-to-body :visible.sync="descDialog.show" title="沟通情况列表" width="75%">
<el-form label-width="90px">
<call-back :callbackAdd="true" :callbackObj="callbackObj"></call-back>
<!--<el-form label-width="90px">
<el-form-item> <el-form-item>
<el-button style="float: right" type="primary" plain @click="editComment(descDialog.id)">添加沟通情况</el-button> <el-button style="float: right" type="primary" plain @click="editComment(descDialog.id)">添加沟通情况</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table <el-table :data="descDialog.descList">
:data="descDialog.descList" <el-table-column label="用户" className="f-c" width="150">
style="width: 100%">
<el-table-column
label="用户" className="f-c" width="150">
<template slot-scope="scope" v-if="descDialog.user_info"> <template slot-scope="scope" v-if="descDialog.user_info">
<img :src="descDialog.user_info.avatar" style="width: 40px;height: 40px;border-radius: 50px"> {{descDialog.user_info.nickname}}(ID:{{descDialog.user_info.user_id}}) <img :src="descDialog.user_info.avatar" style="width: 40px;height: 40px;border-radius: 50px"> {{descDialog.user_info.nickname}}(ID:{{descDialog.user_info.user_id}})
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="desc" label="沟通情况"></el-table-column>
prop="desc" <el-table-column prop="type" label="类型" width="80px">
label="沟通情况">
</el-table-column>
<el-table-column
prop="type"
label="类型" width="80px">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.type === 0 ? '备注' : scope.row.type === 1 ? '沟通话术' : '召回话术'}} {{scope.row.type === 0 ? '备注' : scope.row.type === 1 ? '沟通话术' : '召回话术'}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="reply_content" label="用户回复">
prop="reply_content"
label="用户回复">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.reply_content"> <div v-if="scope.row.reply_content">
{{scope.row.reply_content}} {{scope.row.reply_content}}
...@@ -51,17 +45,13 @@ ...@@ -51,17 +45,13 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="operator" label="联系人"></el-table-column>
prop="operator" <el-table-column prop="created_at" label="记录事件"></el-table-column>
label="联系人"> </el-table>-->
</el-table-column>
<el-table-column
prop="created_at"
label="记录事件">
</el-table-column>
</el-table>
</el-dialog> </el-dialog>
<el-dialog append-to-body :visible.sync="newDialog.show" center title="添加沟通情况">
<!--<el-dialog append-to-body :visible.sync="newDialog.show" center title="添加沟通情况">
<el-form label-width="120px" size="mini"> <el-form label-width="120px" size="mini">
<el-form-item label="类型" v-if="typeFlag"> <el-form-item label="类型" v-if="typeFlag">
<el-select v-model="newDialog.type" placeholder="类型"> <el-select v-model="newDialog.type" placeholder="类型">
...@@ -87,22 +77,29 @@ ...@@ -87,22 +77,29 @@
<el-button @click="newDialog.show = false">取 消</el-button> <el-button @click="newDialog.show = false">取 消</el-button>
<el-button type="primary" @click="submitDesc()">确 定</el-button> <el-button type="primary" @click="submitDesc()">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>-->
</div> </div>
</template> </template>
<script> <script>
import {addPeriodsClassUserDescApi,getUserDescListApi,editUserReplyApi} from "../../service/api"; import {addPeriodsClassUserDescApi,getUserDescListApi,editUserReplyApi} from "../../service/api";
import CallBack from '@/components/callBack/index';
export default { export default {
name: "teacherDesc", name: "teacherDesc",
props:[ props:[
'row', 'row',
'descType', 'descType',
'typeFlag' 'typeFlag',
'teacherId'
], ],
data(){ data(){
return { return {
callbackObj: {
id: '',
detail: {}
},
descDialog:{ descDialog:{
show:false, show:false,
id:'', id:'',
...@@ -119,6 +116,7 @@ ...@@ -119,6 +116,7 @@
} }
} }
}, },
components: {CallBack},
methods:{ methods:{
subReply(data){ subReply(data){
let json = {} let json = {}
...@@ -142,10 +140,17 @@ ...@@ -142,10 +140,17 @@
nickname:data.nickname, nickname:data.nickname,
user_id:data.user_id, user_id:data.user_id,
}; };
this.getUserDescList() // this.getUserDescList();
this.callbackObj.id = data.user_id;
this.callbackObj.teacher_id = this.teacherId;
this.callbackObj.detail.birthday = data.birthday;
this.callbackObj.detail.user_id = data.user_id;
this.callbackObj.detail.nickname = data.nickname;
this.callbackObj.detail.mobile = data.mobile;
this.callbackObj.detail.baby_name = data.baby_name;
}, },
getUserDescList(){ getUserDescList(){
getUserDescListApi(this.row.id,{limit:1000}).then(res=>{ getUserDescListApi(this.row.id,{limit:1000}).then(res => {
this.descDialog.descList = res.list this.descDialog.descList = res.list
}) })
}, },
......
...@@ -432,7 +432,7 @@ ...@@ -432,7 +432,7 @@
color: #666; color: #666;
} }
</style> </style>
<style> <style lang="less" scoped>
.disabled .el-upload--picture-card { .disabled .el-upload--picture-card {
display: none !important; display: none !important;
} }
......
...@@ -571,6 +571,9 @@ ...@@ -571,6 +571,9 @@
goToTeacherDetail(row){ goToTeacherDetail(row){
// this.$router.push('/teacher/'+ row.id); // this.$router.push('/teacher/'+ row.id);
this.dialogDetail.id = row.id; this.dialogDetail.id = row.id;
this.dialogDetail.alias = row.alias;
this.dialogDetail.name = row.name;
this.dialogDetail.adviser = row.adviser;
this.dialogDetail.show = true this.dialogDetail.show = true
} }
......
<template>
<div class="customer">
<el-row :gutter="20">
<el-col :span="24">
<el-card v-loading="infoLoading">
<div slot="header" class="clearfix">
<span style="font-size: 18px;font-weight: bold;padding-right: 20px;">今日实时数据</span>
<el-button size="mini" type="primary" @click="getData">刷新</el-button>
</div>
<div>
<el-breadcrumb style="padding-bottom: 30px;">
<el-breadcrumb-item class="hand" @click.native="customerNum('录音', 2)">
通次:<span>{{infoData.phone_counts}}</span>
</el-breadcrumb-item>
<el-breadcrumb-item>通时:{{infoData.phone_total_time}}min</el-breadcrumb-item>
<el-breadcrumb-item>聊天次数:{{infoData.chat_counts}}</el-breadcrumb-item>
<el-breadcrumb-item>沟通人数:{{infoData.chat_contact_count}}</el-breadcrumb-item>
<el-breadcrumb-item class="hand" @click.native="customerNum('查看聊天记录', 1)">
有效沟通:<span>{{infoData.valid_chat_contact_count}}</span>
</el-breadcrumb-item>
</el-breadcrumb>
<el-breadcrumb>
<el-breadcrumb-item class="hand" @click.native="customerNum('全部好友', 3)">总好友:<span>{{infoData.wechat_friend_total}}</span></el-breadcrumb-item>
<el-breadcrumb-item class="hand" @click.native="customerNum('添加好友', 4)">添加好友:<span>{{infoData.add_friend}}</span></el-breadcrumb-item>
<el-breadcrumb-item class="hand" @click.native="customerNum('待添加', 5)">待添加好友:<span>{{infoData.wait_add_friend}}</span></el-breadcrumb-item>
<el-breadcrumb-item>好友处理率:{{ infoData.wait_add_friend ? parseInt(strip(infoData.add_friend*100/infoData.wait_add_friend)) + '%' : '-' }}</el-breadcrumb-item>
</el-breadcrumb>
</div>
</el-card>
</el-col>
</el-row>
<el-dialog append-to-body :visible.sync="dialogTableVisible" width="90%" top="5vh" :title="dialogTitle">
<div class="block">
<el-date-picker @change="getSTime" v-model="realTime" type="date" placeholder="选择日期"></el-date-picker>
</div>
<table class="custom-table" v-show="infoShow != 3" v-loading="infoLoadingDialog">
<thead>
<tr>
<th v-for="th in table.th">{{ th }}</th>
</tr>
</thead>
<tbody>
<tr v-if="table.td1.length">
<td v-for="td in table.td1">{{ td }}</td>
</tr>
<tr v-if="table.td2.length">
<td v-for="td in table.td2">{{ td }}</td>
</tr>
<tr v-if="table.td3.length">
<td v-for="td in table.td3">{{ td }}</td>
</tr>
</tbody>
</table>
<table class="custom-table" v-loading="infoLoadingDialog" style="margin-top: 50px;" v-show="phoneRecordList.pageData.length != 0">
<thead>
<tr>
<th v-for="item in phoneRecordList.headerTh">{{ item }}</th>
</tr>
</thead>
<tbody>
<tr v-for="(item, index) in phoneRecordList.pageData" :key="item.id" style="text-align: center">
<template v-if="infoShow == 2">
<td>{{ index + 1 }}</td>
<td>{{ customerObj.name }}</td>
<td>{{ item.contact_name }}</td>
<td>{{ item.contact_phone }}</td>
<td>{{ item.start_time }}</td>
<td>{{ item.duration }}</td>
<td>{{ item.visit_desc }}</td>
<td>{{ item.next_visit_at }}</td>
<td>
<audio v-show="" controls="controls" class="sourceFile-audio" :id="'sourceFile'+item.id">
<source :src="item.source_file" type="audio/mp3">
</audio>
<el-button size="mini" type="primary" @click="sourceFileClick('sourceFile' + item.id, index)" round>{{ infoText }}</el-button>
</td>
</template>
<template v-if="infoShow == 1">
<td>{{ index + 1 }}</td>
<td>{{ customerObj.name }}</td>
<td>{{ item.friend_uid }}</td>
<td>{{ item.nick }}</td>
<td>{{ item.chat_count }}</td>
<td>{{ item.visit_desc }}</td>
<td>{{ item.next_visit_at }}</td>
<td @click="dialogTableClick(item.friend_id)">
<el-button size="mini" type="primary" round>{{ infoText }}</el-button>
</td>
</template>
<template v-if="infoShow == 3">
<td >
<img style="width: 40px; height: 40px;" :src="item.headimg" alt="">
</td>
<td>{{ item.nick }}</td>
<td>{{ item.friend_uid }}</td>
<td>{{ item.mobile }}</td>
<td>{{ item.create_time }}</td>
<td>{{ item.wx_friend_type }}</td>
<td>{{ item.visit_intention == 1 ? '低意向' : item.visit_intention == 2 ? '中意向' : item.visit_intention == 3 ? '高意向' : '不跟踪' }}</td>
<td>{{ item.last_contact }}</td>
<td>{{ item.next_visit_at }}</td>
</template>
<template v-if="infoShow == 4">
<td >{{ customerObj.name }}</td>
<td>{{ item.friend_uid }}</td>
<td>{{ item.friend_nickname }}</td>
<td>{{ item.mobile }}</td>
<td>{{ item.allow_time }}</td>
<td>{{ item.add_time_long }}</td>
</template>
</tr>
</tbody>
</table>
<page v-show="phoneRecordList.pageData.length != 0" :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
</el-dialog>
<el-dialog append-to-body :visible.sync="dialogTable">
<div style="height: 500px; overflow: auto;" class="liaotian-content">
<div class="chat-record" v-for="item in chatrecord">
<div class="le">
<div class="le-content" v-if="item.author == 'left'">
<div class="le-content-image">
<img :src="item.headimg" alt="">
</div>
<div class="le-content-box">
<div class="le-content-box-title">{{ item.nick }} {{ item.gmt_create }}</div>
<!-- 聊天内容 -->
<div class="chat-record-content" v-if="item.image_type == 1000" v-html="item.sentence"></div>
<!-- 聊天图片 -->
<div class="chat-record-content-image" v-if="item.image_type == 3">
<img :src="'https://hjapi.aihujing.com/ims/file/down?file_path='+item.image_osskey" alt="">
</div>
<!-- 聊天语音 -->
<div class="chat-record-content-audio" v-if="item.image_type == 34">
<audio controls="controls" width="260px" height="40px" class="le-content-audio" :id="'sourceFile'+item.id">
<source :src="'https://hjapi.aihujing.com/ims/file/down?file_path='+item.image_osskey" type="audio/mp3">
</audio>
</div>
<!-- 分享名片 -->
<div class="share-business-card" v-if="item.image_type == 42">
<div class="share-business-card-image">
<div class="share-business-card-image-avtive">
<img :src="item.sentence.small_headimg" alt="">
</div>
<div class="share-business-card-name">{{ item.sentence.nickname }}</div>
</div>
<div class="card">
个人名片
</div>
</div>
<!-- 发送视频 -->
<div class="video-news" style="width: 65%;" v-if="item.image_type == 42">
<video :src="item.sentence.video_url" style="width: 100%;outline: none" :poster="item.sentence.img_url" controls="controls"></video>
</div>
<!-- 聊天动态图 -->
<div class="chat-record-content" style="width: 20%" v-if="item.image_type == 47">
<img width="100%" :src="item.sentence" alt="">
</div>
<!-- 分享内容 -->
<div class="share-kuang" v-if="item.image_type === 49">
<div class="title">
{{ item.sentence.des }}
</div>
<div class="share-kuang-content">
<div class="kuang-content">
{{ item.sentence.title }}
</div>
<div class="kuang-image">
<img :src="item.sentence.img_url" width="100%" height="100%" alt="">
</div>
</div>
</div>
<!-- 红包 -->
<div class="red-envelopes" v-if="item.image_type == 436207665 || item.image_type == 419430449" >
<div class="red-envelopes-content">
<div class="red-envelopes-content-image">
<img v-if="item.image_type == 436207665" src="https://wx.gtimg.com/hongbao/1800/hb.png" alt="">
<img v-if="item.image_type == 419430449" src="../../assets/gou.png" alt="">
</div>
<div class="red-envelopes-content-gongxi">
{{ item.sentence.des }}
</div>
</div>
<div class="title">{{ item.sentence.title }}</div>
</div>
</div>
</div>
</div>
<div class="ri" v-show="item.author == 'right'">
<div class="ri-content">
<div class="le-content-image">
<img :src="item.headimg" alt="">
</div>
<div class="le-content-box">
<div class="le-content-box-title">{{ item.gmt_create }} {{ item.nick }}</div>
<!-- 聊天内容 -->
<div class="chat-record-content" v-if="item.image_type == 1000 || item.image_type == 47">{{ item.sentence }}</div>
<!-- 聊天图片 -->
<div class="chat-record-content-image" v-if="item.image_type == 3">
<img :src="'https://hjapi.aihujing.com/ims/file/down?file_path='+item.image_osskey" alt="">
</div>
<!-- 聊天语音 -->
<div class="chat-record-content-audio" v-if="item.image_type == 34">
<audio controls="controls" width="260px" height="40px" class="le-content-audio" :id="'sourceFile'+item.id">
<source :src="'https://hjapi.aihujing.com/ims/file/down?file_path='+item.image_osskey" type="audio/mp3">
</audio>
</div>
<!-- 分享名片 -->
<div class="share-business-card" v-if="item.image_type == 42">
<div class="share-business-card-image">
<div class="share-business-card-image-avtive">
<img :src="item.sentence.small_headimg" alt="">
</div>
<div class="share-business-card-name">{{ item.sentence.nickname }}</div>
</div>
<div class="card">
个人名片
</div>
</div>
<!-- 发送视频 -->
<div class="video-news" style="width: 65%; float:right;" v-if="item.image_type == 43">
<video :src="item.sentence.video_url" style="width: 100%;outline: none" :poster="item.sentence.img_url" controls="controls"></video>
</div>
<!-- 聊天动态图 -->
<div class="chat-record-content" style="width: 20%" v-if="item.image_type == 47">
<img width="100%" :src="item.sentence" alt="">
</div>
<!-- 分享内容 -->
<div class="share-kuang" v-if="item.image_type === 49">
<div class="title">
{{ item.sentence.des }}
</div>
<div class="share-kuang-content">
<div class="kuang-content">
{{ item.sentence.title }}
</div>
<div class="kuang-image">
<img :src="item.sentence.img_url" width="100%" height="100%" alt="">
</div>
</div>
</div>
<!-- 红包 -->
<div class="red-envelopes" v-if="item.image_type == 436207665 || item.image_type == 419430449" >
<div class="red-envelopes-content">
<div class="red-envelopes-content-image">
<img v-if="item.image_type == 436207665" src="https://wx.gtimg.com/hongbao/1800/hb.png" alt="">
<img v-if="item.image_type == 419430449" src="../../assets/gou.png" alt="">
</div>
<div class="red-envelopes-content-gongxi">
{{ item.sentence.des }}
</div>
</div>
<div class="title">{{ item.sentence.title }}</div>
</div>
</div>
</div>
</div>
</div>
</div>
</el-dialog>
<task1 :teacherId="customerObj.id" :teacherShow="5" ref="mychild" v-show="infoShow == 5"></task1>
</div>
</template>
<script>
import task1 from './task1'
import { getRealTimeDataApi, getPhoneRecordApi, getValidchatApi, getAddfriendlistApi, getFriendlistApi, getChatrecordApi, task1Api } from "../../service/api";
import page from '../framework/page'
import Util from '../../util/Za'
import addEmoji from '../../util/wechatEmoji'
export default {
name: "customer",
props: {
customerObj: {
type: Object,
default () {
return {}
}
},
},
components: {
page, task1
},
data() {
return {
total: 0,
limit: 10,
pageIndex: 1,
chatrecord: [],
infoData: {
add_friend: '',
chat_contact_count: '',
chat_counts: '',
phone_counts: '',
phone_total_time: '',
valid_chat_contact_count: '',
wait_add_friend: '',
wechat_friend_total: '',
},
infoLoading: true,
infoLoadingDialog: true,
table: {
th: [],
td1: [],
td2: [],
td3: [],
},
phoneRecordList: {
headerTh: [],
pageData: []
},
dialogTitle: '',
dialogTableVisible: false,
dialogTable: false,
gridData: [
{
date: '小磊老师',
name: '3分钟+',
address: '10分钟+'
}, {
date: '3分钟+',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '10分钟+',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}
],
gridData1: [
{
date: '小磊老师',
name: '3分钟+',
address: '+',
address: '54+',
address: '10分钟+',
address: '34+',
address: '23+',
address: '12+',
address: '112分钟+',
}, {
date: '3分钟+',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '10分钟+',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}
],
infoText: '',
infoShow: '',
tableData: [
{
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄',
}, {
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄',
}, {
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}],
realTime: '',
gou: '../../assets/gou.png'
}
},
mounted() {
this.getData();
},
methods: {
strip(num) {
return +parseFloat(num.toPrecision(12));
},
getData() {
if (this.customerObj.alias) {
this.infoLoading = true;
getRealTimeDataApi('15316027945').then(res => {
this.infoData = res;
this.infoLoading = false;
})
}
},
/**
* 时间获取value
*/
getSTime(val) {
this.realTime = val.getFullYear() + '-' + (val.getMonth() + 1) + '-' + val.getDate()
this.infoLoadingDialog = true;
let data = { page: this.pageIndex, start_at: this.realTime, limit: this.limit }
if (this.infoShow === 2) {
// 通次
this.infoPhonerecord(getPhoneRecordApi, data, this.infoShow)
}else if(this.infoShow === 1) {
// 有效沟通
this.infoPhonerecord(getValidchatApi, data, this.infoShow)
}else if(this.infoShow === 3){
// 全部好友
data = Object.assign({}, data, { limit: 10 })
this.infoPhonerecord(getFriendlistApi, data, this.infoShow)
}else if(this.infoShow === 4) {
// 添加好友
this.infoPhonerecord(getAddfriendlistApi, data, this.infoShow)
}
},
/**
* 聊天记录
*/
dialogTableClick(friendId) {
getChatrecordApi(friendId, { start_at: this.realTime }).then(res => {
if(res.length > 0) {
this.dialogTable = true
this.chatrecord = res
res.map(item => {
if(!Util.isJSON(item.sentence) && String(item.image_type).toUpperCase() === 'NULL') {
item.image_type = 1000
}
})
// 音频按需播放
this.$nextTick(()=> {
var chatRecordContentAudio = document.querySelectorAll('.chat-record-content-audio');
})
}else {
this.$message.error('没有聊天记录');
}
})
},
/**
* 客户管理详情
* @param infoText
* @param infoShow
*/
customerNum(infoText, infoShow) {
this.infoLoadingDialog = true;
this.infoText = infoText;
this.infoShow = infoShow;
let data = { page: 1, start_at: this.realTime }
if (infoShow === 2) {
// 通次
this.infoPhonerecord(getPhoneRecordApi, data, infoShow)
}else if(infoShow === 1) {
// 有效沟通
this.infoPhonerecord(getValidchatApi, data, infoShow)
}else if(infoShow === 3){
// 全部好友
data = Object.assign({}, data, { limit: 10 })
this.infoPhonerecord(getFriendlistApi, data, infoShow)
}else if(infoShow === 4) {
// 添加好友
this.infoPhonerecord(getAddfriendlistApi, data, infoShow)
}else {
// 待添加好友
task1Api(this.customerObj.id).then(res => {
this.$refs.mychild.showTask1Detail(res[0]);
});
}
},
/**
* 客户管理详情 -> customerNum
* @param api {Function}
* @param data {Object}
* @param infoShow {Number}
*/
infoPhonerecord(api, data, infoShow) {
api(15316027945, data).then(res=>{
this.infoLoadingDialog = false;
this.dialogTableVisible = true;
let friendTotal = infoShow === 3 ? ' 全部好友:' + res.friend_total : ''
this.dialogTitle = '老师名:' + this.customerObj.name + ' 销售顾问:' + this.customerObj.adviser + friendTotal;
// 下面列表
if(Util.isEmpty(res)){
this.dialogTableVisible = false;
this.$message.error('暂无数据');
}
if(infoShow === 2) {
this.phoneRecordList.headerTh = ['序号', '老师', '客户名称', '电话号码', '呼出时间', '通话时长', '最后一次备注', '下次回访', '操作']
this.phoneRecordList.pageData = res.phone_record_list.page_data
this.total = res.phone_record_list.total_page * 10
}else if(infoShow === 1){
this.phoneRecordList.headerTh = ['序号', '老师', 'UID', '客户微信昵称', '聊天条数', '备注信息', '下次回访', '操作']
this.phoneRecordList.pageData = res.chat_friend_list.page_data
this.total = res.chat_friend_list.total_page * 10
}else if(infoShow === 3){
this.phoneRecordList.headerTh = ['用户头像', '用户昵称', 'UID', '电话号码', '添加时间', '用户属性', '意向度', '最后沟通', '下次回访']
this.phoneRecordList.pageData = res.friend_list
this.total = res.friend_total
}else if(infoShow === 4) {
this.phoneRecordList.headerTh = ['老师', 'UID', '客户微信昵称', '电话号码', '添加时间', '添加间隔']
this.phoneRecordList.pageData = res.add_friend_list.page_data
this.total = res.add_friend_list.total_page * 10
}
// 上面列表
if(infoShow === 2 || infoShow === 1) {
res.time.unshift(' ');
res.time.push('合计');
this.table.th = res.time;
// table 第一行
let chatCount = infoShow === 2 ? res.min_count : infoShow === 1 ? res.chat_count : '',
minCountTotal = infoShow === 2 ? res.min_count_total : ''
chatCount.unshift(this.customerObj.name + '(总)');
this.table.td1 = chatCount;
// table 第二行
let chatCountTwo = infoShow === 2 ? res.one_min : infoShow === 1 ? res.chat_count10 : '',
strZiDuan = infoShow === 2 ? '1分钟+' : infoShow === 1 ? '10条+' : '',
minCountTotalOne = infoShow === 2 ? res.one_min_total : ''
chatCountTwo.unshift(strZiDuan);
this.table.td2 = chatCountTwo;
// table 第三行
let chatCountThree = infoShow === 2 ? res.three_min : infoShow === 1 ? res.chat_count20 : '',
minCountTotalThree = infoShow === 2 ? res.three_min_total : ''
chatCountThree.unshift(infoShow === 2 ? '3分钟+' : infoShow === 1 ? '20条+' : '')
this.table.td3 = chatCountThree;
if(infoShow === 2) {
chatCount.push(minCountTotal)
chatCountTwo.push(minCountTotalOne);
chatCountThree.push(minCountTotalOne);
}
}else if(infoShow === 4){
res.time.unshift(' ');
res.time.push('合计');
this.table.th = res.time;
let chatCount = res.count
chatCount.unshift(this.customerObj.name + '(总)');
chatCount.push(res.count_total);
this.table.td1 = chatCount;
}
})
},
/**
* 分页第几页
* @param val
*/
onPageChange(val) {
this.pageIndex = val
let data = { page: val, limit: this.limit, start_at: this.realTime }
this.infoLoadingDialog = true
if (this.infoShow === 2) {
// 通次
this.infoPhonerecord(getPhoneRecordApi, data, this.infoShow)
}else if(this.infoShow === 1) {
// 有效沟通
this.infoPhonerecord(getValidchatApi, data, this.infoShow)
}else if(this.infoShow === 3){
// 全部好友
data = Object.assign({}, data, { limit: 10 })
this.infoPhonerecord(getFriendlistApi, data, this.infoShow)
}else if(this.infoShow === 4) {
// 添加好友
this.infoPhonerecord(getAddfriendlistApi, data, this.infoShow)
}
},
/**
* 分页多少条
* @param val
*/
onSizeChange(val) {
this.limit = val
this.infoLoadingDialog = true
let data = { page: 1, limit: val, start_at: this.realTime }
if (this.infoShow === 2) {
// 通次
this.infoPhonerecord(getPhoneRecordApi, data, this.infoShow)
}else if(this.infoShow === 1) {
// 有效沟通
this.infoPhonerecord(getValidchatApi, data, this.infoShow)
}else if(this.infoShow === 3){
// 全部好友
data = Object.assign({}, data, { limit: 10 })
this.infoPhonerecord(getFriendlistApi, data, this.infoShow)
}else if(this.infoShow === 4) {
// 添加好友
this.infoPhonerecord(getAddfriendlistApi, data, this.infoShow)
}
},
chatRecord() {
this.dialogTable = true
},
/**
* 播放录音
* id
*/
sourceFileClick(id, index) {
var sourceFileAudio = document.querySelectorAll('.sourceFile-audio');
for(var i = 0; i < sourceFileAudio.length; i++) {
if(index === i) {
sourceFileAudio[i].play()
}else {
sourceFileAudio[i].pause();
}
}
},
/**
* 改变图片header颜色
* @param row
* @param rowIndex
* @returns {string}
*/
tableRowClassName({row, rowIndex}) {
if (rowIndex === 0) {
return 'warning-row';
}
return ''
},
}
}
</script>
<style lang="less">
.custom-table {
margin-top: 20px;
width: 100%;
border: solid 1px #EBEEF5;
border-spacing: 0;
border-collapse: collapse;
thead {
color: #909399;
font-weight: 500;
th {
padding: 12px 10px;
border: 1px solid #EBEEF5;
}
}
tbody {
td {
padding: 12px 10px;
border: 1px solid #EBEEF5;
}
}
}
.el-breadcrumb__item.hand {
cursor: pointer;
display: inline-block;
&:hover {
.el-breadcrumb__inner {
span {
color: #409EFF;
}
}
}
.el-breadcrumb__inner {
cursor: pointer !important;
span {
text-decoration: underline;
}
}
}
.el-table .warning-row {
background: rgb(228, 239, 247);
text-align: center;
}
.liaotian-content::-webkit-scrollbar {
display: none;
}
.chat-record {
width: 100%;
overflow: hidden;
.le {
text-align: left;
/* 右边的样式 */
.le-content {
width: 100%;
padding-top: 40px;
.le-content-image {
width: 30px;
height: 30px;
float: left;
img {
width: 100%;
height: 100%;
}
}
.chat-record-content-image {
width: 40%;
float: left;
img {
width: 100%;
}
}
.share-business-card {
width: 30%;
height: 100px;
background: #EDEDED;
float: left;
padding: 0 10px;
box-sizing: border-box;
.share-business-card-image {
width: 100%;
height: 70px;
padding-top: 15px;
box-sizing: border-box;
border-bottom: 1px solid #B8B8B8;
.share-business-card-image-avtive {
width: 40px;
height: 40px;
background: green;
display: inline-block;
vertical-align: middle;
}
.share-business-card-name {
padding-left: 5px;
display: inline-block;
vertical-align: middle;
font-size: 14px;
font-weight: 600;
}
}
.card {
font-size: 13px;
color: #A1A1A1;
line-height: 30px;
}
}
.red-envelopes {
width: 200px;
height: 75px;
border-radius: 5px;
float: left;
box-sizing: border-box;
background: #F7F7F7;
.title {
font-size: 10px;
color: #999;
line-height: 20px;
padding-left: 10px;
text-align: left;
}
.red-envelopes-content {
width: 100%;
height: 55px;
background: #ff9f4b;
padding: 0 10px;
box-sizing: border-box;
padding-top: 8px;
border-radius: 5px 5px 0 0;
.red-envelopes-content-image {
width: 40px;
height: 40px;
display: inline-block;
vertical-align: middle;
img {
width: 100%;
height: 100%;
}
}
.red-envelopes-content-gongxi {
width: calc(100% - 45px);
display: inline-block;
font-size: 13px;
vertical-align: middle;
color: #ffffff;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}
}
}
.le-content-box {
float: left;
width: calc(100% - 40px);
padding-left: 10px;
.le-content-box-title {
font-size: 12px;
color: #999;
padding-bottom: 20px;
}
.chat-record-content {
width: 75%;
float: left;
padding-top: 3px;
}
.share-kuang {
width: 45%;
height: 120px;
background: #EDEDED;
float: left;
padding: 10px;
box-sizing: border-box;
border-radius: 5px;
.title {
width: 100%;
font-size: 13px;
color: #000;
}
.share-kuang-content {
width: 100%;
overflow: hidden;
.kuang-content {
float: left;
width: calc(100% - 40px);
font-size: 10px;
color: #8B8682;
}
.kuang-image {
float: left;
width: 40px;
height: 40px;
background: red;
}
}
}
}
}
}
.ri {
text-align: right;
.ri-content {
width: 100%;
padding-top: 40px;
.le-content-image {
width: 30px;
height: 30px;
float: right;
img {
width: 100%;
height: 100%;
}
}
.chat-record-content-image {
width: 40%;
float: right;
img {
width: 100%;
}
}
.share-business-card {
width: 30%;
height: 100px;
background: #EDEDED;
float: left;
padding: 0 10px;
box-sizing: border-box;
.share-business-card-image {
width: 100%;
height: 70px;
padding-top: 15px;
box-sizing: border-box;
border-bottom: 1px solid #B8B8B8;
.share-business-card-image-avtive {
width: 40px;
height: 40px;
background: green;
display: inline-block;
vertical-align: middle;
}
.share-business-card-name {
padding-left: 5px;
display: inline-block;
vertical-align: middle;
font-size: 14px;
font-weight: 600;
}
}
.card {
font-size: 13px;
color: #A1A1A1;
line-height: 30px;
}
}
.red-envelopes {
width: 200px;
height: 75px;
border-radius: 5px;
float: right;
box-sizing: border-box;
background: #F7F7F7;
.title {
font-size: 10px;
color: #999;
line-height: 20px;
padding-left: 10px;
text-align: left;
}
.red-envelopes-content {
width: 100%;
height: 55px;
background: #ff9f4b;
padding: 0 10px;
box-sizing: border-box;
padding-top: 8px;
border-radius: 5px 5px 0 0;
.red-envelopes-content-image {
width: 40px;
height: 40px;
display: inline-block;
vertical-align: middle;
img {
width: 100%;
height: 100%;
}
}
.red-envelopes-content-gongxi {
width: calc(100% - 45px);
display: inline-block;
font-size: 13px;
vertical-align: middle;
color: #ffffff;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}
}
}
.le-content-box {
float: right;
width: calc(100% - 40px);
padding-right: 10px;
.le-content-box-title {
font-size: 12px;
color: #999;
padding-bottom: 20px;
}
.chat-record-content {
width: 75%;
float: right;
padding-top: 3px;
}
.share-kuang {
width: 45%;
height: 120px;
background: #EDEDED;
float: right;
padding: 10px;
box-sizing: border-box;
text-align: left;
border-radius: 5px;
.title {
width: 100%;
font-size: 13px;
color: #000;
}
.share-kuang-content {
width: 100%;
overflow: hidden;
.kuang-content {
float: left;
width: calc(100% - 40px);
font-size: 10px;
color: #8B8682;
}
.kuang-image {
float: left;
width: 40px;
height: 40px;
}
}
}
}
}
}
}
</style>
...@@ -71,6 +71,9 @@ ...@@ -71,6 +71,9 @@
</el-card> </el-card>
</div> </div>
<el-tabs type="border-card" v-model="tabs"> <el-tabs type="border-card" v-model="tabs">
<!--<el-tab-pane label="客户管理" name="customer">
<customerDetail :customerObj="customerObj"></customerDetail>
</el-tab-pane>-->
<el-tab-pane label="今日任务" name="task"> <el-tab-pane label="今日任务" name="task">
<task :parentDetail="parentDetail"></task> <task :parentDetail="parentDetail"></task>
</el-tab-pane> </el-tab-pane>
...@@ -505,6 +508,7 @@ ...@@ -505,6 +508,7 @@
import AddressArray from '../framework/address-picker/addr' import AddressArray from '../framework/address-picker/addr'
import task from './task' import task from './task'
import page from '../framework/page' import page from '../framework/page'
// import customerDetail from './customer'
import sourceDialog from './sourceDialog' import sourceDialog from './sourceDialog'
import couponDialog from './couponDialog' import couponDialog from './couponDialog'
import refundDetail from './refundDetail' import refundDetail from './refundDetail'
...@@ -524,7 +528,8 @@ ...@@ -524,7 +528,8 @@
chooseGoodDialog, chooseGoodDialog,
couponDialog, couponDialog,
refundDetail, refundDetail,
sourceDialog sourceDialog,
// customerDetail
}, },
data() { data() {
let nowDate = new Date(); let nowDate = new Date();
...@@ -581,6 +586,11 @@ ...@@ -581,6 +586,11 @@
total: 0, total: 0,
limit: 10, limit: 10,
nowPage: 1, nowPage: 1,
customerObj: {
alias: '',
name: '',
adviser: ''
},
userObj: { userObj: {
classId: '', classId: '',
title: '', title: '',
...@@ -1049,7 +1059,11 @@ ...@@ -1049,7 +1059,11 @@
return studentSource[val] return studentSource[val]
} }
}, },
created() {
this.customerObj.alias = this.parentDetail ? this.parentDetail.alias : this.$route.params.alias;
this.customerObj.name = this.parentDetail ? this.parentDetail.name : this.$route.params.name;
this.customerObj.adviser = this.parentDetail ? this.parentDetail.adviser : this.$route.params.adviser;
},
mounted() { mounted() {
this.id = this.parentDetail ? this.parentDetail.id : this.$route.params.id; this.id = this.parentDetail ? this.parentDetail.id : this.$route.params.id;
this.getTask4(); this.getTask4();
......
<template>
<div id="replayed">
<el-row :gutter="20">
<el-col :span="24">
<el-card>
<div slot="header" class="clearfix">
<span style="font-size: 18px;font-weight: bold;padding-right: 20px;">待回访日历</span>
<el-button size="mini" type="primary">刷新</el-button> <!-- @click="getData" -->
</div>
<div class="list-yi">
<div class="list-content">
<div></div>
<div>2</div>
<div>3</div>
</div>
</div>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script type="text/ecmascript-6">
import {
getVisitcalendarApi
} from "../../service/api";
export default {
name: '',
data() {
return {
infoData: [],
infoLoading: true,
timer: []
}
},
props: {
customerObj: {
type: Object,
default() {
return {}
}
},
},
mounted() {
console.log(this.customerObj)
this.getData()
},
methods: {
getData() {
getVisitcalendarApi(this.customerObj.id).then(res => {
// this.timer = res.time
this.infoData = res;
console.log(res);
console.log(Object.keys(res.visit_count))
console.log(Object.values(res.visit_count))
console.log(Object.values(res.weekday))
console.log(Object.keys(res.weekday))
Object.keys(res.weekday).map(item => {
cosnole.log(item)
})
})
}
}
}
</script>
<style lang="less" type="text/less">
.list-yi {
overflow: hidden;
}
.list-content {
padding: 0 20px 20px;
text-align: center;
float: left;
}
</style>
<template> <template>
<div style="font-size: 14px"> <div style="font-size: 14px">
<el-row :gutter="20">
<el-col :span="12">
<customerDetail style="padding-bottom: 20px;" :customerObj="parentDetail"></customerDetail>
</el-col>
<el-col :span="12">
<replayedDetail style="padding-bottom: 20px;" :customerObj="parentDetail"></replayedDetail>
</el-col>
</el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="24"> <el-col :span="24">
<task1 :teacherId="id"></task1> <task1 :teacherId="id"></task1>
...@@ -123,7 +132,7 @@ ...@@ -123,7 +132,7 @@
min-width="260" min-width="260"
label="沟通情况"> label="沟通情况">
<template slot-scope="scope"> <template slot-scope="scope">
<teacher-desc :row="scope.row" :descType="2" @onSuccess="refDesc3"></teacher-desc> <teacher-desc :teacherId="id" :row="scope.row" :descType="2" @onSuccess="refDesc3"></teacher-desc>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -244,7 +253,7 @@ ...@@ -244,7 +253,7 @@
min-width="160" min-width="160"
label="沟通情况"> label="沟通情况">
<template slot-scope="scope"> <template slot-scope="scope">
<teacher-desc :row="scope.row" :descType="1" @onSuccess="refDesc2"></teacher-desc> <teacher-desc :teacherId="id" :row="scope.row" :descType="1" @onSuccess="refDesc2"></teacher-desc>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -356,7 +365,7 @@ ...@@ -356,7 +365,7 @@
<el-table-column <el-table-column
label="沟通情况"> label="沟通情况">
<template slot-scope="scope"> <template slot-scope="scope">
<teacher-desc :row="scope.row" :descType="1" @onSuccess="searchPage"></teacher-desc> <teacher-desc :teacherId="id" :row="scope.row" :descType="1" @onSuccess="searchPage"></teacher-desc>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -387,7 +396,7 @@ ...@@ -387,7 +396,7 @@
<el-table-column <el-table-column
label="沟通情况"> label="沟通情况">
<template slot-scope="scope"> <template slot-scope="scope">
<teacher-desc :row="scope.row" :descType="1" @onSuccess="getTask5"></teacher-desc> <teacher-desc :teacherId="id" :row="scope.row" :descType="1" @onSuccess="getTask5"></teacher-desc>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -450,9 +459,11 @@ ...@@ -450,9 +459,11 @@
import task2 from './task2' import task2 from './task2'
import task3 from './task3' import task3 from './task3'
import sourceByDateDialog from './sourceByDateDialog' import sourceByDateDialog from './sourceByDateDialog'
import customerDetail from './customer'
import replayedDetail from './replayed'
export default { export default {
name: "task", name: "task",
components: {teacherDesc,task1,task2,task3,userWeight,sourceByDateDialog}, components: {teacherDesc,task1,task2,task3,userWeight,sourceByDateDialog,customerDetail,replayedDetail},
props:[ props:[
'parentDetail' 'parentDetail'
], ],
...@@ -1036,6 +1047,7 @@ ...@@ -1036,6 +1047,7 @@
} }
}, },
mounted(){ mounted(){
console.log(this.parentDetail)
this.initPage() this.initPage()
} }
} }
......
<template> <template>
<div> <div>
<el-row :gutter="20"> <el-row v-show="teacherShow != 5" :gutter="20">
<el-col :span="16"> <el-col :span="16">
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
...@@ -27,8 +27,7 @@ ...@@ -27,8 +27,7 @@
class-name="hightLight" class-name="hightLight"
prop="need_add_teacher_num" prop="need_add_teacher_num"
label="需加好友人数" label="需加好友人数"
align="center" align="center">
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="text" type="text"
...@@ -152,7 +151,7 @@ ...@@ -152,7 +151,7 @@
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
<el-dialog append-to-body :visible.sync="task7Show" title="外部渠道待激活列表" width="85%"> <el-dialog v-show="teacherShow != 5" append-to-body :visible.sync="task7Show" title="外部渠道待激活列表" width="85%">
<el-button @click="allDesc7()" size="mini" type="success">批量添加备注</el-button> <el-button @click="allDesc7()" size="mini" type="success">批量添加备注</el-button>
<el-table <el-table
border border
...@@ -195,7 +194,7 @@ ...@@ -195,7 +194,7 @@
</el-table> </el-table>
<page :total="total7" :limit="limit" @pageChange="onPageChange7" @sizeChange="onSizeChange7"/> <page :total="total7" :limit="limit" @pageChange="onPageChange7" @sizeChange="onSizeChange7"/>
</el-dialog> </el-dialog>
<el-dialog append-to-body :visible.sync="task6Show" title="外部订单待激活列表" width="85%"> <el-dialog v-show="teacherShow != 5" append-to-body :visible.sync="task6Show" title="外部订单待激活列表" width="85%">
<el-button @click="allDesc6()" size="mini" type="success">批量添加备注</el-button> <el-button @click="allDesc6()" size="mini" type="success">批量添加备注</el-button>
<el-table <el-table
border border
...@@ -253,7 +252,7 @@ ...@@ -253,7 +252,7 @@
<page :total="total" :limit="limit" @pageChange="onPageChange6" @sizeChange="onSizeChange6"/> <page :total="total" :limit="limit" @pageChange="onPageChange6" @sizeChange="onSizeChange6"/>
</el-dialog> </el-dialog>
<el-dialog append-to-body :visible.sync="task7Show2" title="外部渠道已激活列表" width="85%"> <el-dialog v-show="teacherShow != 5" append-to-body :visible.sync="task7Show2" title="外部渠道已激活列表" width="85%">
<el-button @click="allDesc7()" size="mini" type="success">批量添加备注</el-button> <el-button @click="allDesc7()" size="mini" type="success">批量添加备注</el-button>
<el-table <el-table
border border
...@@ -287,7 +286,7 @@ ...@@ -287,7 +286,7 @@
@sizeChange="onSizeChange7" @sizeChange="onSizeChange7"
/> />
</el-dialog> </el-dialog>
<el-dialog append-to-body :visible.sync="task6Show2" title="外部订单已激活列表" width="85%"> <el-dialog v-show="teacherShow != 5" append-to-body :visible.sync="task6Show2" title="外部订单已激活列表" width="85%">
<el-button @click="allDesc6()" size="mini" type="success">批量添加备注</el-button> <el-button @click="allDesc6()" size="mini" type="success">批量添加备注</el-button>
<el-table <el-table
border border
...@@ -385,12 +384,13 @@ ...@@ -385,12 +384,13 @@
</el-table-column> </el-table-column>
<el-table-column prop="desc" label="沟通情况" align="center"> <el-table-column prop="desc" label="沟通情况" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<teacher-desc :row="scope.row" :descType="2" @onSuccess="refDesc1"></teacher-desc> <teacher-desc :teacherId="teacherId" :row="scope.row" :descType="2" @onSuccess="refDesc1"></teacher-desc>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="created_at" label="入课时间" min-width="140px" align="center" sortable></el-table-column> <el-table-column prop="created_at" label="入课时间" min-width="140px" align="center" sortable></el-table-column>
</el-table> </el-table>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
...@@ -412,7 +412,7 @@ import { USERSTATUS } from "../../util/wordbook"; ...@@ -412,7 +412,7 @@ import { USERSTATUS } from "../../util/wordbook";
export default { export default {
name: "task1", name: "task1",
components: { teacherDesc, page }, components: { teacherDesc, page },
props: ["teacherId"], props: ["teacherId", "teacherShow"],
data() { data() {
return { return {
false:false, false:false,
...@@ -673,7 +673,6 @@ export default { ...@@ -673,7 +673,6 @@ export default {
this.task1List = res; this.task1List = res;
res.forEach(i => { res.forEach(i => {
if (i.cur_date === this.task1Detail.cur_date) { if (i.cur_date === this.task1Detail.cur_date) {
console.log(this.task1Detail);
this.task1Detail.list = this.task1Detail.list =
this.task1Detail.indexOf("未通过用户列表") < -1 this.task1Detail.indexOf("未通过用户列表") < -1
? i.done_detail ? i.done_detail
...@@ -692,6 +691,7 @@ export default { ...@@ -692,6 +691,7 @@ export default {
}); });
}, },
showTask1Detail(data, type) { showTask1Detail(data, type) {
console.log(data)
this.task1Detail = { this.task1Detail = {
show: true, show: true,
list: type ? data.done_detail : data.need_add_detail, list: type ? data.done_detail : data.need_add_detail,
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
min-width="160" min-width="160"
label="沟通情况"> label="沟通情况">
<template slot-scope="scope"> <template slot-scope="scope">
<teacher-desc :row="scope.row" :descType="1" @onSuccess="refDesc2"></teacher-desc> <teacher-desc :teacherId="teacherId" :row="scope.row" :descType="1" @onSuccess="refDesc2"></teacher-desc>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
......
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
min-width="160" min-width="160"
label="沟通情况"> label="沟通情况">
<template slot-scope="scope"> <template slot-scope="scope">
<teacher-desc :row="scope.row" :descType="2" @onSuccess="refDesc3"></teacher-desc> <teacher-desc :teacherId="teacherId" :row="scope.row" :descType="2" @onSuccess="refDesc3"></teacher-desc>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -165,7 +165,7 @@ ...@@ -165,7 +165,7 @@
min-width="160" min-width="160"
label="沟通情况"> label="沟通情况">
<template slot-scope="scope"> <template slot-scope="scope">
<teacher-desc :row="scope.row" :descType="2" @onSuccess="refDesc4"></teacher-desc> <teacher-desc :teacherId="teacherId" :row="scope.row" :descType="2" @onSuccess="refDesc4"></teacher-desc>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
......
<template> <template>
<div class="user" v-loading="loading"> <div class="admin-refresh" v-loading="loading">
<div class="section-search">
<el-form ref="searchFrom" :model="searchFrom" label-width="80px" inline> <el-form ref="searchFrom" :model="searchFrom" label-width="80px" inline>
<el-form-item label="ID"> <el-form-item>
<el-input v-model="searchFrom.userId"></el-input> <el-input v-model="searchFrom.userId" placeholder="ID" clearable @change="getUser"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="昵称"> <el-form-item>
<el-input v-model="searchFrom.nickName"></el-input> <el-input v-model="searchFrom.nickName" placeholder="昵称" clearable @change="getUser"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="电话"> <el-form-item>
<el-input v-model="searchFrom.mobile"></el-input> <el-input v-model="searchFrom.mobile" placeholder="电话" clearable @change="getUser"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="等级"> <el-form-item>
<el-input v-model="searchFrom.level"></el-input> <el-input v-model="searchFrom.level" placeholder="等级" clearable @change="getUser"></el-input>
</el-form-item> </el-form-item>
<!--<el-form-item label="标签"> <!--<el-form-item label="标签">
<el-cascader <el-cascader
...@@ -25,6 +26,8 @@ ...@@ -25,6 +26,8 @@
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div>
<el-table <el-table
:data="userList" :data="userList"
style="width: 100%"> style="width: 100%">
...@@ -158,7 +161,8 @@ ...@@ -158,7 +161,8 @@
teacherDialog teacherDialog
}, },
mounted() { mounted() {
this.getUser() this.$route.query.id ? this.searchFrom.userId = this.$route.query.id : '';
this.getUser();
}, },
methods: { methods: {
......
...@@ -104,7 +104,7 @@ import AddressArray from '../framework/address-picker/addr' ...@@ -104,7 +104,7 @@ import AddressArray from '../framework/address-picker/addr'
vueAddress vueAddress
}, },
mounted(){ mounted(){
console.log(this.dialogObj) // console.log(this.dialogObj)
} }
} }
</script> </script>
......
<template> <template>
<div class="user"> <div>
<div class="box">
<el-row :gutter="20" style="margin-bottom: 20px;">
<el-col :span="12">
<el-card class="user-card"> <el-card class="user-card">
<div class="card-content"> <div class="card-content">
<div class="text item"> <div class="text item">
...@@ -27,7 +29,10 @@ ...@@ -27,7 +29,10 @@
</div> </div>
</div> </div>
</el-card> </el-card>
</el-col>
<el-col :span="12">
<el-card class="user-card"> <el-card class="user-card">
<div style="min-height: 150px">
<div class="card-content" v-if="subDetail.nickname"> <div class="card-content" v-if="subDetail.nickname">
<div class="text item"> <div class="text item">
<a :href="subDetail.avatar" target="_blank"> <a :href="subDetail.avatar" target="_blank">
...@@ -45,9 +50,16 @@ ...@@ -45,9 +50,16 @@
</div> </div>
<p class="fl" v-if="!subDetail.nickname" style="clear:both;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(暂无子账户)</p> <p class="fl" v-if="!subDetail.nickname" style="clear:both;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(暂无子账户)</p>
<p class="fl" v-if="subDetail.nickname" style="clear:both;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(子账户)</p> <p class="fl" v-if="subDetail.nickname" style="clear:both;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(子账户)</p>
</el-card>
</div> </div>
</el-card>
</el-col>
</el-row>
<!--<el-tabs type="border-card" v-model="tabs">-->
<el-tabs type="border-card" v-model="tabs"> <el-tabs type="border-card" v-model="tabs">
<el-tab-pane label="回访信息" name="callback">
<call-back :callbackObj="callbackObj"></call-back>
</el-tab-pane>
<el-tab-pane label="期数列表" name="periods"> <el-tab-pane label="期数列表" name="periods">
<el-table @expand-change="changeRow" :data="periodList"> <el-table @expand-change="changeRow" :data="periodList">
<el-table-column type="expand"> <el-table-column type="expand">
...@@ -513,6 +525,7 @@ ...@@ -513,6 +525,7 @@
import {INVITETYPE, ORDERSTATUS, BUYTYPE, USERSTATUSFORMATER} from "../../util/wordbook"; import {INVITETYPE, ORDERSTATUS, BUYTYPE, USERSTATUSFORMATER} from "../../util/wordbook";
import teacherDialog from './dialog' import teacherDialog from './dialog'
import UserList from '../class/userList' import UserList from '../class/userList'
import CallBack from '@/components/callBack/index'
import sourceByDateDialog from '../teacherDetail/sourceByDateDialog' import sourceByDateDialog from '../teacherDetail/sourceByDateDialog'
import AddressArray from "../framework/address-picker/addr"; import AddressArray from "../framework/address-picker/addr";
...@@ -520,6 +533,10 @@ ...@@ -520,6 +533,10 @@
name: "index", name: "index",
data() { data() {
return { return {
callbackObj: {
id: '',
detail: {}
},
userList: [], userList: [],
yunjiList: [], yunjiList: [],
addressList: [], addressList: [],
...@@ -532,7 +549,8 @@ ...@@ -532,7 +549,8 @@
show: false, show: false,
out_trade_no: '' out_trade_no: ''
}, },
tabs: 'periods', //tabs: 'periods',
tabs: 'callback',
couponDetail: { couponDetail: {
show: false, show: false,
order_coupon_id: '' order_coupon_id: ''
...@@ -621,13 +639,17 @@ ...@@ -621,13 +639,17 @@
sourceDialog, sourceDialog,
couponDialog, couponDialog,
sourceByDateDialog, sourceByDateDialog,
addressDialogC addressDialogC,
CallBack
}, },
props: [ props: [
'parentDetail' 'parentDetail'
], ],
mounted() { created() {
this.id = this.parentDetail ? this.parentDetail.id : this.$route.params.id; this.id = this.parentDetail ? this.parentDetail.id : this.$route.params.id;
this.callbackObj.id = this.id;
},
mounted() {
this.getDetail(); this.getDetail();
}, },
watch: { watch: {
...@@ -862,6 +884,7 @@ ...@@ -862,6 +884,7 @@
if (!this.id) return; if (!this.id) return;
getUserDetailApi(this.id).then(res => { getUserDetailApi(this.id).then(res => {
this.detail = res; this.detail = res;
this.callbackObj.detail = res; // 用户的所有数据
if (res.periods_list) { if (res.periods_list) {
this.periodList = res.periods_list this.periodList = res.periods_list
} }
...@@ -1034,9 +1057,9 @@ ...@@ -1034,9 +1057,9 @@
} }
.user-card { .user-card {
margin: 10px; /*margin: 10px;*/
width: 600px; /*width: 600px;*/
padding: 20px; /*padding: 20px;*/
// display: flex; // display: flex;
.text.item { .text.item {
line-height: 30px; line-height: 30px;
......
...@@ -69,7 +69,7 @@ router.beforeEach((to,from,next)=> { ...@@ -69,7 +69,7 @@ router.beforeEach((to,from,next)=> {
} }
} }
store.state.nowTab = to.name; store.state.nowTab = to.name;
console.log(to) // console.log(to)
if(to.matched.length > 1 && to.name !== 'first'){ if(to.matched.length > 1 && to.name !== 'first'){
let thisMenu; let thisMenu;
for (let i = 0 ; i < store.state.menuList.length ; i ++ ){ for (let i = 0 ; i < store.state.menuList.length ; i ++ ){
...@@ -101,7 +101,7 @@ router.beforeEach((to,from,next)=> { ...@@ -101,7 +101,7 @@ router.beforeEach((to,from,next)=> {
store.dispatch('classManageUnlimited',to.meta.classManageUnlimited) store.dispatch('classManageUnlimited',to.meta.classManageUnlimited)
store.dispatch('classTakeUnlimited',to.meta.classTakeUnlimited) store.dispatch('classTakeUnlimited',to.meta.classTakeUnlimited)
store.dispatch('exportFinish',to.meta.exportFinish) store.dispatch('exportFinish',to.meta.exportFinish)
console.log(to.meta) // console.log(to.meta)
if(to.name==='userDetail'){ if(to.name==='userDetail'){
let list = JSON.parse(localStorage.getItem('permission')) let list = JSON.parse(localStorage.getItem('permission'))
let readonly = list.find(i=>{ let readonly = list.find(i=>{
......
...@@ -62,6 +62,27 @@ const postUserTransferUrl = `${_baseUrl}api/admin/user/data/transfer`; ...@@ -62,6 +62,27 @@ const postUserTransferUrl = `${_baseUrl}api/admin/user/data/transfer`;
export const postUserTransferApi = function (json) { export const postUserTransferApi = function (json) {
return Vue.prototype.$post(postUserTransferUrl, json) return Vue.prototype.$post(postUserTransferUrl, json)
}; };
// 获取回访信息
export const getCallBackApi = function (json) {
console.log(json, 9001)
return Vue.prototype.$fetch(`${_baseUrl}api/admin/user/visit/${json.user_id}`, json)
};
// 添加回访信息
export const postCallBackApi = function (json) {
return Vue.prototype.$post(`${_baseUrl}api/admin/user/visit/${json.user_id}/${json.teacher_id}`, json)
};
// 获取用户标签
export const getUserTagApi = function (id) {
return Vue.prototype.$fetch(`${_baseUrl}api/admin/user/label/${id}`)
};
// 用户添加标签
export const postUserTagApi = function (json) {
return Vue.prototype.$post(`${_baseUrl}api/admin/user/bind/label`, json)
};
// 删除用户标签
export const delUserTagApi = function (id) {
return Vue.prototype.$del(`${_baseUrl}api/admin/user/label/${id}`)
};
//获取教师列表 //获取教师列表
const getTeacherListUrl = `${_baseUrl}api/admin/teacher/list`; const getTeacherListUrl = `${_baseUrl}api/admin/teacher/list`;
export const getTeacherListApi = function (json) { export const getTeacherListApi = function (json) {
...@@ -95,6 +116,36 @@ export const postTransferTeacherApi = function (json) { ...@@ -95,6 +116,36 @@ export const postTransferTeacherApi = function (json) {
export const getRealTimeDataApi = function (data) { export const getRealTimeDataApi = function (data) {
return Vue.prototype.$fetch(`${_baseUrl}api/admin/teacher/todaydata/${data}`) return Vue.prototype.$fetch(`${_baseUrl}api/admin/teacher/todaydata/${data}`)
}; };
// 通话次数
export const getPhoneRecordApi = function (data, json) {
return Vue.prototype.$fetch(`${_baseUrl}api/admin/teacher/phonerecord/${data}`, json)
};
// 有效沟通统计
export const getValidchatApi = function (data, json) {
return Vue.prototype.$fetch(`${_baseUrl}api/admin/teacher/validchat/${data}`, json)
};
//全部好友
export const getFriendlistApi = function (data, json) {
return Vue.prototype.$fetch(`${_baseUrl}api/admin/teacher/friendlist/${data}`, json)
};
//添加好友
export const getAddfriendlistApi = function (data, json) {
return Vue.prototype.$fetch(`${_baseUrl}api/admin/teacher/addfriendlist/${data}`, json)
};
//聊天记录
export const getChatrecordApi = function (data, json) {
return Vue.prototype.$fetch(`${_baseUrl}api/admin/teacher/chatrecord/${data}`, json)
};
//待会访日历接口
export const getVisitcalendarApi = function (data, json) {
return Vue.prototype.$fetch(`${_baseUrl}api/admin/teacher/visitcalendar/${data}`, json)
};
//获取课程列表 //获取课程列表
const getLessonUrl = `${_baseUrl}api/admin/course/list`; const getLessonUrl = `${_baseUrl}api/admin/course/list`;
export const getLessonApi = function (json) { export const getLessonApi = function (json) {
...@@ -1064,7 +1115,7 @@ const updateContactUrl = `/api/admin/other/order/user/status`; ...@@ -1064,7 +1115,7 @@ const updateContactUrl = `/api/admin/other/order/user/status`;
export const updateContactApi = function (json) { export const updateContactApi = function (json) {
return Vue.prototype.$put(`${updateContactUrl}`, json) return Vue.prototype.$put(`${updateContactUrl}`, json)
}; };
// 外部渠道批量指派订单老师 // 外部渠道批量指派订单老师api/admin/user/label/{id}
const adsTeacherUrl = `/api/admin/ads/teacher/`; const adsTeacherUrl = `/api/admin/ads/teacher/`;
export const adsTeacherApi = function (id, json) { export const adsTeacherApi = function (id, json) {
return Vue.prototype.$put(`${adsTeacherUrl}${id}`, json) return Vue.prototype.$put(`${adsTeacherUrl}${id}`, json)
......
...@@ -79,8 +79,7 @@ axios.interceptors.request.use( ...@@ -79,8 +79,7 @@ axios.interceptors.request.use(
if(process.env.NODE_ENV === 'development' ){ if(process.env.NODE_ENV === 'development' ){
config.data.special_token="changchangenglish"; config.data.special_token="changchangenglish";
} }
console.log(54) // console.log(JSON.stringify(json2))
console.log(JSON.stringify(json2))
config.data.param_token = md5(JSON.stringify(json2)); config.data.param_token = md5(JSON.stringify(json2));
} }
return config; return config;
...@@ -238,6 +237,7 @@ export function fetch(url,params={}){ ...@@ -238,6 +237,7 @@ export function fetch(url,params={}){
}) })
.catch(err => { .catch(err => {
reject(err); reject(err);
console.log(err);
let message = '请求失败!请检查网络'; let message = '请求失败!请检查网络';
if(err.response)message=err.response.data.message; if(err.response)message=err.response.data.message;
Vue.prototype.$msgbox({ Vue.prototype.$msgbox({
......
/**
*
* @classDesc 核心js基类,提供全局可用api
* @namespace ZA
*/
const Za = {
/**
* 转换为字符
* @param v {object}
* @returns {string}
*/
toString: function (v) {
return Object.prototype.toString.apply(v);
},
/**
* 判断值是否已定义
* @param v {*}
* @returns {boolean}
*/
isDefined: function (v) {
return typeof v !== 'undefined';
},
/**
* 是否为空
* @param v {*} 值
* @param allowBlank {boolean} 是否允许空
* @returns {boolean|*}
*/
isEmpty: function (v, allowBlank) {
return v === null || v === undefined
|| String(v).toUpperCase() === 'NULL'
|| ((Za.isArray(v) && !v.length))
|| (!allowBlank ? v === '' : false)
|| (Za.isObject(v) && JSON.stringify(v) === '{}')
},
/**
* 是否是数组
* @param v
* @returns {boolean}
*/
isArray: function (v) {
return Za.toString(v) === '[object Array]';
},
/**
* 是否是日期
* @param v
* @returns {boolean}
*/
isDate: function (v) {
return Za.toString(v) === '[object Date]';
},
/**
* 是否是对象
* @param v
* @returns {boolean}
*/
isObject: function (v) {
return !!v && Za.toString(v) === '[object Object]';
},
/**
* 字符串是否是对象
* @param str
* @returns {boolean}
*/
isJSON(str) {
if (typeof str == 'string') {
try {
var obj = JSON.parse(str);
if (typeof obj == 'object' && obj) {
return true;
} else {
return false;
}
} catch (e) {
return false;
}
}
},
/**
* 是否是函数
* @param v
* @returns {boolean}
*/
isFunction: function (v) {
return Za.toString(v) === '[object Function]';
},
/**
* 是否是数值型
* @param v
* @returns {boolean}
*/
isNumber: function (v) {
return typeof v === 'number' && isFinite(v);
},
/**
* 是否是字符型
* @param v
* @returns {boolean}
*/
isString: function (v) {
return typeof v === 'string';
},
/**
* 是否是布尔型
* @param v
* @returns {boolean}
*/
isBoolean: function (v) {
return typeof v === 'boolean';
},
/**
* 是否是原始类型
* @param v
* @returns {*|boolean}
*/
isPrimitive: function (v) {
return Za.isString(v) || Za.isNumber(v) || Za.isBoolean(v);
},
/**
* 是否是URL
* @param v
* @returns {boolean}
*/
isUrl: function (v) {
return /(((^https?)|(^ftp)):\/\/((([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*)|(localhost|LOCALHOST|127.0.0.1))\/?)/i
.test(v);
},
/**
* 返回parameters参数 特指页面跳转间传递的参数
* @returns {*}
*/
getParameters: function () {
var params = sessionStorage.getItem("_parameters");
sessionStorage.removeItem("_parameters");
//params = Za.isEmpty(params) ? {} : params;
return Za.JsonEval(params);
},
/**
* 清空 页面间跳转的参数
*/
clearParameters: function () {
sessionStorage.removeItem("_parameters");
},
/**
* 查询当前日前几天的日期
* @param AddDayCount {int} 负数为前X天 正数为后X天
* @returns {string}
* @exaple
* Za.getDate(-6)
*/
getDate: function (AddDayCount) { //日期查询
var dd = new Date();
dd.setDate(dd.getDate() + AddDayCount + 1);
var y = dd.getYear() + 1900;
var m = (dd.getMonth() + 1) < 10 ? "0" + (dd.getMonth() + 1) : (dd.getMonth() + 1);
var d = dd.getDate() < 10 ? "0" + dd.getDate() : dd.getDate();
return y + "-" + m + "-" + d;
},
/**
* JSON对象转换为String
* @param json
* @constructor
*/
JsonToStr: function (json) {
return JSON.stringify(json);
},
/**
* String转换为JSON
* @param str
* @returns {Object}
* @constructor
*/
JsonEval: function (str) {
return eval("(" + str + ")");
//return JSON.parse(str);
},
};
export default Za
...@@ -83,6 +83,8 @@ import refueling1_title from '../assets/mould/refueling1/title.png' ...@@ -83,6 +83,8 @@ import refueling1_title from '../assets/mould/refueling1/title.png'
import refueling2_next from '../assets/mould/refueling2/next.png' import refueling2_next from '../assets/mould/refueling2/next.png'
import refueling2_back from '../assets/mould/refueling2/back.png' import refueling2_back from '../assets/mould/refueling2/back.png'
import gou from '../assets/gou.png'
// 爸妈看一看 // 爸妈看一看
export const look1={ export const look1={
bg:look1_bg, bg:look1_bg,
...@@ -194,4 +196,5 @@ export const refueling2={ ...@@ -194,4 +196,5 @@ export const refueling2={
title2:playTitle, title2:playTitle,
back:refueling2_back, back:refueling2_back,
radio:refueling1_radio, radio:refueling1_radio,
gou: gou
}; };
export default function addEmoji(string) {
function replaceAll(find, replace, str) {
return str.replace(new RegExp(escapeRegExp(find), 'g'), replace);
}
function escapeRegExp(str) {
return str.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1");
}
var map = {
"[微笑]": "1.png",
"[撇嘴]": "2.png",
"[色]": "3.png",
"[发呆]": "4.png",
"[得意]": "5.png",
"[流泪]": "6.png",
"[害羞]": "7.png",
"[闭嘴]": "8.png",
"[睡]": "9.png",
"[大哭]": "10.png",
"[尴尬]": "11.png",
"[发怒]": "12.png",
"[调皮]": "13.png",
"[呲牙]": "14.png",
"[惊讶]": "15.png",
"[难过]": "16.png",
"[酷]": "17.png",
"[囧]": "18.png",
"[抓狂]": "19.png",
"[吐]": "20.png",
"[偷笑]": "21.png",
"[愉快]": "22.png",
"[白眼]": "23.png",
"[傲慢]": "24.png",
"[饥饿]": "25.png",
"[困]": "26.png",
"[惊恐]": "27.png",
"[流汗]": "28.png",
"[憨笑]": "29.png",
"[悠闲]": "30.png",
"[奋斗]": "31.png",
"[咒骂]": "32.png",
"[疑问]": "33.png",
"[嘘]": "34.png",
"[晕]": "35.png",
"[衰]": "37.png",
"[骷髅]": "38.png",
"[敲打]": "39.png",
"[再见]": "40.png",
"[擦汗]": "41.png",
"[抠鼻]": "42.png",
"[鼓掌]": "43.png",
"[糗大了]": "44.png",
"[坏笑]": "45.png",
"[左哼哼]": "46.png",
"[右哼哼]": "47.png",
"[哈欠]": "48.png",
"[鄙视]": "49.png",
"[委屈]": "50.png",
"[快哭了]": "51.png",
"[阴险]": "52.png",
"[亲亲]": "53.png",
"[吓]": "54.png",
"[可怜]": "55.png",
"[菜刀]": "56.png",
"[西瓜]": "57.png",
"[啤酒]": "58.png",
"[篮球]": "59.png",
"[乒乓]": "60.png",
"[咖啡]": "61.png",
"[饭]": "62.png",
"[猪头]": "63.png",
"[玫瑰]": "64.png",
"[凋谢]": "65.png",
"[嘴唇]": "66.png",
"[爱心]": "67.png",
"[心碎]": "68.png",
"[蛋糕]": "69.png",
"[闪电]": "70.png",
"[炸弹]": "71.png",
"[刀]": "72.png",
"[足球]": "73.png",
"[瓢虫]": "74.png",
"[便便]": "75.png",
"[月亮]": "76.png",
"[太阳]": "77.png",
"[礼物]": "78.png",
"[拥抱]": "79.png",
"[强]": "80.png",
"[弱]": "81.png",
"[握手]": "82.png",
"[胜利]": "83.png",
"[抱拳]": "84.png",
"[勾引]": "85.png",
"[拳头]": "86.png",
"[差劲]": "87.png",
"[爱你]": "88.png",
"[NO]": "89.png",
"[OK]": "90.png",
"[爱情]": "91.png",
"[飞吻]": "92.png",
"[跳跳]": "93.png",
"[发抖]": "94.png",
"[怄火]": "95.png",
"[转圈]": "96.png",
"[磕头]": "97.png",
"[回头]": "98.png",
"[跳绳]": "99.png",
"[投降]": "100.png",
"[激动]": "101.png",
"[乱舞]": "102.png",
"[献吻]": "103.png",
"[左太极]": "104.png",
"[右太极]": "105.png",
"[奸笑]": "106.png",
"[嘿哈]": "107.png",
"[捂脸]": "108.png",
"[机智]": "109.png",
"[茶]": "110.png",
"[红包]": "111.png",
"[蜡烛]": "113.png",
"[耶]": "114.png"
};
string = string.replace(/\n/g, "<br/>");
for (let key in map) {
if (string.indexOf(key) != -1) {
string = replaceAll(key, `<img src="/static/images/wechat/${map[key]}">`, string);
}
}
return string
}
...@@ -220,3 +220,51 @@ export const LogisticsStatus = { ...@@ -220,3 +220,51 @@ export const LogisticsStatus = {
2: '已签收', 2: '已签收',
3: '异常' 3: '异常'
}; };
export const CALLBACK_METHOD = [{
label: '电话接通',
value: 1
}, {
label: '电话未接通',
value: 2
}, {
label: '微信沟通',
value: 3
}, {
label: '微信留言',
value: 4
}, {
label: '备注',
value: 5
}];
export const CALLBACK_TYPE = [{
label: '开课回访',
value: 1
}, {
label: '常规回访',
value: 2
}, {
label: '通知',
value: 3
}, {
label: '信息变更',
value: 4
}, {
label: '服务评价',
value: 5
}];
export const CALLBACK_INTENTION = [{
label: '低意向',
value: 1
}, {
label: '中意向',
value: 2
}, {
label: '高意向',
value: 3
}, {
label: '不跟踪',
value: 4
}];
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment