Commit a49e1e49 authored by chenyishuai@singsingenglish.com's avatar chenyishuai@singsingenglish.com

Merge branch 'dev' of http://git.singsingenglish.com/new-sing/admin into dev

parents c8d6c13b 2b660a92
...@@ -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
} }
} }
}, },
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<template v-if="item.flag == 0"> <template v-if="item.flag == 0">
<span class="time">{{item.created_at}}</span> <span class="time">{{item.created_at}}</span>
<span class="grey">系统导入</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="grey" v-if="item.first_key && item.desc" :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> <span class="info" v-if="item.desc" :class="(item.desc.indexOf('支付')>-1) ? 'red' : ''">{{item.desc}}</span>
</template> </template>
<template v-else-if="item.flag == 1"> <template v-else-if="item.flag == 1">
...@@ -282,7 +282,8 @@ ...@@ -282,7 +282,8 @@
console.log(json, 9000) console.log(json, 9000)
getCallBackApi(json).then(res => { getCallBackApi(json).then(res => {
this.list = res.page_data; this.list = res.page_data;
this.total = res.total_page this.total = res.total
// this.total = res.total_page
}) })
}, },
callbackReset() { callbackReset() {
...@@ -307,8 +308,8 @@ ...@@ -307,8 +308,8 @@
} }
let json = { let json = {
user_id: this.callbackObj.id, user_id: this.callbackObj.id,
//teacher_id: this.callbackObj.teacher_id, // TODO teacher_id: this.callbackObj.teacher_id, // TODO
teacher_id: 84, // TODO // teacher_id: 84, // TODO
method: this.add.method, method: this.add.method,
type: this.add.type, type: this.add.type,
intention: this.add.intention, intention: this.add.intention,
......
...@@ -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;
} }
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<el-form-item label="岗位"> <el-form-item label="岗位">
<el-select v-model="searchFrom.type" placeholder="请选择" clearable> <el-select v-model="searchFrom.type" placeholder="请选择" clearable>
<el-option <el-option
v-for="item in type" v-for="item in STAFF_TYPE"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"> :value="item.value">
...@@ -60,7 +60,8 @@ ...@@ -60,7 +60,8 @@
</el-table-column> </el-table-column>
<el-table-column label="岗位" width="80"> <el-table-column label="岗位" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.type == 1 ? '销售' : ''}} <!--{{scope.row.type == 1 ? '销售' : ''}}-->
{{filterName(scope.row.type, 'STAFF_TYPE')}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="in_at" label="入职时间"></el-table-column> <el-table-column prop="in_at" label="入职时间"></el-table-column>
...@@ -96,7 +97,7 @@ ...@@ -96,7 +97,7 @@
<el-form-item label="岗位:" prop="type"> <el-form-item label="岗位:" prop="type">
<el-select v-model="dialog.form.type" placeholder="请选择"> <el-select v-model="dialog.form.type" placeholder="请选择">
<el-option <el-option
v-for="item in type" v-for="item in STAFF_TYPE"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"> :value="item.value">
...@@ -127,6 +128,7 @@ ...@@ -127,6 +128,7 @@
<script> <script>
import {getStaffListApi, postStaffListApi, putStaffListApi} from "../../service/api"; import {getStaffListApi, postStaffListApi, putStaffListApi} from "../../service/api";
import page from '../framework/page' import page from '../framework/page'
import {STAFF_TYPE} from '@/util/wordbook'
export default { export default {
name: "index", name: "index",
...@@ -164,11 +166,7 @@ ...@@ -164,11 +166,7 @@
}, },
} }
}, },
type: [{ STAFF_TYPE: STAFF_TYPE,
value: 1,
label: '销售'
}],
dialogDetail: { dialogDetail: {
show: false, show: false,
id: '' id: ''
...@@ -198,6 +196,9 @@ ...@@ -198,6 +196,9 @@
}, },
methods: { methods: {
filterName(string, type) {
return this[type].find(i => {return i.value == string}).label
},
dialogToggle() { dialogToggle() {
this.dialog.show = !this.dialog.show; this.dialog.show = !this.dialog.show;
if (!this.dialog.show) { if (!this.dialog.show) {
......
...@@ -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>
...@@ -336,7 +345,7 @@ ...@@ -336,7 +345,7 @@
prop='title' prop='title'
label="期数标题"> label="期数标题">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop='user_id' prop='user_id'
label="用户ID"> label="用户ID">
...@@ -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'
], ],
...@@ -632,10 +643,10 @@ ...@@ -632,10 +643,10 @@
if(this.searchWatch.periods_id==0&&res.periods_result&&res.periods_result.length){ if(this.searchWatch.periods_id==0&&res.periods_result&&res.periods_result.length){
this.prePeriods = res.periods_result this.prePeriods = res.periods_result
// if(res.periods_result&&res.periods_result.length){ // if(res.periods_result&&res.periods_result.length){
// } // }
} }
}) })
}, },
showSourceByDate(row){ showSourceByDate(row){
...@@ -659,7 +670,7 @@ ...@@ -659,7 +670,7 @@
} }
} }
this.$refs.sourceByDateDialogDom.dialogShow = true this.$refs.sourceByDateDialogDom.dialogShow = true
// //
}, },
allDesc2(){ allDesc2(){
if(this.selectedTask2.length < 1){ if(this.selectedTask2.length < 1){
...@@ -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
...@@ -391,6 +390,7 @@ ...@@ -391,6 +390,7 @@
<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,
......
...@@ -116,6 +116,36 @@ export const postTransferTeacherApi = function (json) { ...@@ -116,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) {
...@@ -1296,7 +1326,7 @@ const getSourceConversionListUrl = `${_baseUrl}api/admin/class/conversion/source ...@@ -1296,7 +1326,7 @@ const getSourceConversionListUrl = `${_baseUrl}api/admin/class/conversion/source
export const getSourceConversionListApi = function (json) { export const getSourceConversionListApi = function (json) {
return Vue.prototype.$fetch(getSourceConversionListUrl, json) return Vue.prototype.$fetch(getSourceConversionListUrl, json)
}; };
// //
//各期数班主任转化 //各期数班主任转化
const getMarketEnrollmentConversionListUrl = `${_baseUrl}api/admin/periods/source/conversion/list`; const getMarketEnrollmentConversionListUrl = `${_baseUrl}api/admin/periods/source/conversion/list`;
export const getMarketEnrollmentConversionListApi = function (json) { export const getMarketEnrollmentConversionListApi = function (json) {
......
/**
*
* @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
}
...@@ -268,3 +268,17 @@ export const CALLBACK_INTENTION = [{ ...@@ -268,3 +268,17 @@ export const CALLBACK_INTENTION = [{
label: '不跟踪', label: '不跟踪',
value: 4 value: 4
}]; }];
export const STAFF_TYPE = [{
label: '销售',
value: 1
}, {
label: '助教',
value: 2
}, {
label: 'TMK',
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