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
} }
......
This diff is collapsed.
...@@ -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>
...@@ -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
...@@ -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) {
......
/**
*
* @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
}];
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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