提交 f7e56287 编写于 作者: 张平's avatar 张平

Merge branch 'dev-phase1-0111' into 'release'

新增客服系统  code reviewer: 张平

新增客服系统

See merge request !1
无法预览此类型文件
...@@ -50,14 +50,14 @@ module.exports = { ...@@ -50,14 +50,14 @@ module.exports = {
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url', loader: 'url',
query: { query: {
limit: 10000, limit: 50000,
name: utils.assetsPath('img/[name].[ext]') name: utils.assetsPath('img/[name].[ext]')
} }
}, { }, {
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url', loader: 'url',
query: { query: {
limit: 10000, limit: 50000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]') name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
} }
}] }]
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
<div id="app"> <div id="app">
<router-view></router-view> <router-view></router-view>
</div> </div>
<script src="https://unpkg.com/qiniu-js@2.2.0/dist/qiniu.min.js"></script> <!-- <script src="qiniu.min.js"></script> -->
<!-- <script src="https://unpkg.com/qiniu-js@2.2.0/dist/qiniu.min.js"></script> -->
</body> </body>
</html> </html>
此差异已折叠。
无法预览此类型文件
<template> <template>
<div> <div>
<v-header :userName="userName" :authList="authList"></v-header> <v-header :userName="userName" :authList="authList"></v-header>
<v-slidebar :tokenValue="token"></v-slidebar> <v-slidebar v-if="systemType" :tokenValue="token" :systemType="systemType"></v-slidebar>
<el-container> <el-container>
<div class="content" id="body-content"> <div class="content" id="body-content">
<transition name="router-fade" mode="out-in"> <transition name="router-fade" mode="out-in">
<keep-alive> <keep-alive>
<router-view v-if="$route.meta.keepAlive"></router-view> <router-view v-if="$route.meta.keepAlive"></router-view>
</keep-alive> </keep-alive>
</transition> </transition>
<transition name="router-fade" mode="out-in"> <transition name="router-fade" mode="out-in">
<router-view v-if="!$route.meta.keepAlive"></router-view> <router-view v-if="!$route.meta.keepAlive"></router-view>
</transition> </transition>
<v-footer></v-footer> <v-footer></v-footer>
</div> </div>
</el-container> </el-container>
</div> </div>
</template> </template>
<script> <script>
import VHeader from './views/layout/header.vue' import VHeader from "./views/layout/header.vue";
import VSlidebar from './views/layout/slidebar.vue' import VSlidebar from "./views/layout/slidebar.vue";
import VFooter from './views/layout/footer.vue' import VFooter from "./views/layout/footer.vue";
import { base64decode, isNotEmptyUtils, getUrlParamsMap, ssoLogin } from "./utils/utils.js" import {
import { mapActions, mapGetters } from 'vuex' base64decode,
import { getLoginUrl, getInnerLoginUrl } from './utils/index.js' isNotEmptyUtils,
let vm = null getUrlParamsMap,
ssoLogin
} from "./utils/utils.js";
import { mapActions, mapGetters } from "vuex";
import { getLoginUrl, getInnerLoginUrl } from "./utils/index.js";
let vm = null;
export default { export default {
components:{ components: {
VHeader, VHeader,
VSlidebar, VSlidebar,
VFooter VFooter
}, },
data() { data() {
return { return {
idType: 0, token: "",
token: '', userName: "",
userName: '', authList: [],
authList: [] systemType: 0,
} };
}, },
computed:{ computed: {
...mapGetters([ ...mapGetters(["_token"])
'_token' },
]) created() {
}, vm = this;
created() { vm.getToken();
vm = this },
vm.getToken() mounted() {},
}, methods: {
mounted() { // 解密token
getToken() {
}, let href = window.location.href;
methods: { let offset = href.indexOf("?");
// 解密token //localStorage.setItem('storageToken','CBC0F7B0C9D34806958B18E23C881A09')
getToken() { if (offset !== -1) {
let href = window.location.href let paramStr = href.substring(offset + 1, href.length);
let offset = href.indexOf("?") let pars = base64decode(paramStr);
//localStorage.setItem('storageToken','CBC0F7B0C9D34806958B18E23C881A09') let paramMap = getUrlParamsMap(pars, "&");
if(offset !== -1) { if (
let paramStr = href.substring(offset + 1, href.length) isNotEmptyUtils(paramMap["token"]) &&
let pars = base64decode(paramStr) isNotEmptyUtils(paramMap["ssoOrigin"])
let paramMap = getUrlParamsMap(pars, "&") ) {
if (isNotEmptyUtils(paramMap["token"]) && isNotEmptyUtils(paramMap["ssoOrigin"])) { vm.token = paramMap["token"];
vm.token = paramMap["token"] localStorage.setItem("storageToken", vm.token);
localStorage.setItem('storageToken', vm.token) ssoLogin(href, paramMap);
ssoLogin(href, paramMap) //vm.$router.push({ path: 'home' })
//vm.$router.push({ path: 'home' }) } else {
} else { if (!localStorage.getItem("storageToken")) {
if(!localStorage.getItem('storageToken')) { window.location.href = getInnerLoginUrl(); // 没有token返回登录页面
window.location.href = getInnerLoginUrl() // 没有token返回登录页面 return;
return }
} }
} } else {
}else { if (!localStorage.getItem("storageToken")) {
if(!localStorage.getItem('storageToken')) { window.location.href = getInnerLoginUrl(); // 没有token返回登录页面
window.location.href = getInnerLoginUrl() // 没有token返回登录页面 return;
return }
} }
} vm.changeToken(vm.token);
vm.changeToken(vm.token) vm.getUserAuth();
vm.getUserAuth() },
}, // 修改token
// 修改token ...mapActions(["changeToken"]),
...mapActions([ // 获取用户权限
'changeToken', getUserAuth(token) {
'changeIdType' let req = null;
]), req = {
// 获取用户权限 system_type: "26"
getUserAuth(token) { };
let req = null vm.POST("/contents/login/header", req).then(res => {
req = { if (res.code == "000000") {
system_type: '26' let systemType = 0, authList = res.data.systemInfoList;
} let s = authList.find( item => {
vm.POST('/contents/login/header',req).then((res) => { return item.systemNameAbbreviation == 'PCIM';
if(res.code == '000000') { });
vm.userName = res.data.userName if(s) {
vm.authList = res.data.systemInfoList systemType = s.id;
} }
}) this.systemType = systemType;
} this.showSlidebar = true;
} vm.userName = res.data.userName;
} vm.authList = authList;
}
});
}
}
};
</script> </script>
<style lang="scss"> <style lang="scss">
// @import './style/common'; // @import './style/common';
@import './style/global'; @import "./style/global";
@import './style/mixin.scss'; @import "./style/mixin.scss";
.router-fade-enter-active, .router-fade-leave-active { .router-fade-enter-active,
transition: opacity .1s; .router-fade-leave-active {
} transition: opacity 0.1s;
.router-fade-enter, .router-fade-leave-active { }
opacity: 0; .router-fade-enter,
} .router-fade-leave-active {
.el-container { opacity: 0;
margin-left: 255px; }
overflow: hidden; .el-container {
.content { margin-left: 255px;
background: #F0F2F5; overflow: hidden;
position: absolute; .content {
left: 255px; background: #f0f2f5;
right: 0; position: absolute;
top: 64px; left: 255px;
bottom: 0; right: 0;
width: auto; top: 64px;
box-sizing: border-box; bottom: 0;
overflow-y: scroll; width: auto;
} box-sizing: border-box;
} overflow-y: scroll;
}
}
</style> </style>
<template>
<div class="img-container">
<img :src="imgData.url" />
</div>
</template>
<script>
export default {
name: 'imgSize',
props: {
imgData: {
type: Object,
default: {}
}
},
data() {
return {
imgWidth: 0,
imgHeight: 0,
imgProportion: 0
}
},
mounted() {
this.imgWidth = this.imgData.width;
this.imgHeight = this.imgData.height;
this.imgProportion = (this.imgWidth / this.imgHeight).toFixed(1);
console.log("==========dddddddddd",this.imgProportion)
if(this.imgProportion > 0.6) {
}
},
methods: {
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<template>
<section class="user-info-wrapper">
<div class="user-avt">
<img :src="userInfo.avatarImageUrl" alt />
</div>
<p class="user-name">{{userInfo.name}}</p>
<p class="user-mb">{{userInfo.mobilePhone}}</p>
<p>
<el-button
class="footer"
style="width: 100px;"
type="primary"
size="small"
@click="clipboardAction"
>复制手机号</el-button>
</p>
<section class="other-info-wrapper">
<article class="other-info">
<div class="icon">
<img src="../../assets/image/IM/icon-contacts.png" alt />
</div>
<span class="desc">{{userInfo.userTypeValue}}</span>
</article>
<article class="other-info">
<div class="icon">
<img src="../../assets/image/IM/icon-id-card.png" alt />
</div>
<div class="icon-s">
<img v-if="userInfo.certifyStatus" src="../../assets/image/IM/check-yes.png" alt />
<img v-else src="../../assets/image/IM/check-no.png" alt />
</div>
<span class="desc mr12">实名认证</span>
<div class="icon-s">
<img v-if="userInfo.status" src="../../assets/image/IM/check-yes.png" alt />
<img v-else src="../../assets/image/IM/check-no.png" alt />
</div>
<span class="desc">执业认证</span>
</article>
<article class="other-info">
<div class="icon">
<img src="../../assets/image/IM/icon-org.png" alt />
</div>
<span class="desc">{{userInfo.hospitalName ? userInfo.hospitalName : '无机构'}}</span>
</article>
</section>
<section class="qt-wrapper">
<p class="title">问题归类</p>
<el-select
style="width:100%;"
multiple
v-model="stickerIdList"
size="mini"
@remove-tag="removeTag"
placeholder="请选择问题归类"
@visible-change="stickerSave"
>
<el-option
v-for="(item, index) in stickerList"
:key="index"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</section>
</section>
</template>
<script>
let clipboard = null;
export default {
props: {
userInfo: {
type: Object,
default: () => {
return {
name: " ",
mobilePhone: " ",
isShowCopyBtn: true
};
}
},
taskLogId: {
type: String | Number,
default: ''
}
},
data() {
return {
stickerList: [],
stickerIdList: []
};
},
computed: {
},
watch: {
taskLogId(newVal) {
this.getStikerInfo(newVal);
}
},
created() {
this.getStickerList();
},
methods: {
// 查询所有的问题分类
getStickerList() {
this.GET(`/im/sticker/list`).then(res => {
if (res.code === "000000") {
console.log("in getStickerList", res);
this.stickerList = res.data || [];
} else {
this.$message({
message: res.message,
type: "warning"
});
}
});
},
// 根据tasklogid查询问题分类
getStikerInfo(taskLogId) {
this.GET(`/im/sticker/info?taskLogId=${taskLogId}`).then(res => {
if (res.code === "000000") {
let stickerIdList = [], stickerList = res.data || [];
stickerList.forEach( item => {
stickerIdList.push(item.id);
})
this.stickerIdList = stickerIdList;
} else {
this.$message({
message: res.message,
type: "error"
});
}
});
},
// 删除时,也要保存
removeTag() {
console.log(this.stickerIdList);
this.stickerSave(false);
},
// 保存用户问题分类
stickerSave(status) {
// 下拉框出现(status==true),直接退出
if(status) return;
let params = {
stickerIdList: this.stickerIdList,
taskLogId: this.taskLogId,
}
this.POST(`/im/sticker/save`, params).then(res => {
if (res.code === "000000") {
console.log("in getStickerSave", res);
} else {
this.$message({
message: res.message,
type: "warning"
});
}
});
},
// 粘帖文本
clipboardAction() {
const _this = this;
clipboard && clipboard.destroy(); // 不是单例的,所以每次都要销毁
clipboard = new this.ClipboardJS(".footer", {
// .footer:文档的CSS类名
text: function(trigger) {
console.log(_this.userInfo.mobilePhoneCopy);
_this.$message.success('复制成功');
return _this.userInfo.mobilePhoneCopy; // 要粘贴的文案
}
});
}
}
};
</script>
<style lang="scss" scoped>
.user-info-wrapper {
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
text-align: center;
.user-avt {
margin: 24px 0 10px;
& > img {
display: inline-block;
width: 64px;
height: 64px;
border-radius: 32px;
}
}
.user-name {
height: 28px;
line-height: 1;
font-size: 20px;
font-weight: 700;
}
.user-mb {
height: 20px;
line-height: 1;
margin: 4px 0;
font-size: 14px;
color: #666666;
}
.other-info-wrapper {
margin: 20px 24px 50px;
.other-info {
display: flex;
flex-direction: row;
margin: 12px 0;
align-items: center;
.icon {
width: 16px;
height: 16px;
margin-right: 8px;
& > img {
width: 16px;
height: 16px;
}
}
.icon-s {
width: 12px;
height: 12px;
margin-right: 4px;
& > img {
width: 12px;
height: 12px;
}
}
.desc {
height: 14px;
line-height: 1;
color: #000000;
opacity: 0.65;
&.mr12 {
margin-right: 12px;
}
}
}
}
.qt-wrapper {
margin: 0 25px;
.title {
text-align: left;
font-weight: 700;
margin-bottom: 10px;
color: #333333;
}
}
}
</style>
<template> <template>
<div class="bread-crumb"> <div class="bread-crumb">
<el-breadcrumb separator="/"> <el-breadcrumb separator="/">
<el-breadcrumb-item>{{curmbFirst}}</el-breadcrumb-item> <el-breadcrumb-item :to="{ path: jumPathThird }">{{curmbFirst}}</el-breadcrumb-item>
<el-breadcrumb-item v-if="curmbSecond" :to="{ path: jumPathThird }">{{curmbSecond}}</el-breadcrumb-item> <el-breadcrumb-item v-if="curmbSecond">{{curmbSecond}}</el-breadcrumb-item>
<el-breadcrumb-item v-if="curmbThird">{{curmbThird}}</el-breadcrumb-item> <el-breadcrumb-item v-if="curmbThird">{{curmbThird}}</el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
</div> </div>
...@@ -25,7 +25,7 @@ export default { ...@@ -25,7 +25,7 @@ export default {
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.bread-crumb { .bread-crumb {
position: fixed; position: fixed;
left: 255px; left: 255px;
......
...@@ -4,16 +4,23 @@ import VueRouter from 'vue-router' ...@@ -4,16 +4,23 @@ import VueRouter from 'vue-router'
import routes from './router/router' import routes from './router/router'
import store from './store/' import store from './store/'
const mixins = require('@/utils/mixins'); const mixins = require('@/utils/mixins');
import FastClick from 'fastclick'
import vueFilters from '@/utils/filter' import vueFilters from '@/utils/filter'
// 引入ElementUI // 引入ElementUI
import ElementUI from 'element-ui' import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'; import 'element-ui/lib/theme-chalk/index.css';
import vViewer from 'v-viewer';
import 'viewerjs/dist/viewer.css';
import ClipboardJS from 'clipboard';
import '@/utils/directive';
Vue.prototype.ClipboardJS = ClipboardJS;
Vue.use(vViewer, {
button: false
});
// 可调试 // 可调试
// Vue.config.devtools = true; // Vue.config.devtools = true;
// Vue.use(Logger, { prefix: new Date(), isDev: process.env.NODE_ENV === 'development', cLevel: 'debug' })
Vue.use(ElementUI) Vue.use(ElementUI)
...@@ -22,11 +29,6 @@ for(let key in vueFilters) { ...@@ -22,11 +29,6 @@ for(let key in vueFilters) {
Vue.filter(key, vueFilters[key]) Vue.filter(key, vueFilters[key])
} }
if ('addEventListener' in document) {
document.addEventListener('DOMContentLoaded', function() {
FastClick.attach(document.body);
}, false);
}
Vue.use(VueRouter) Vue.use(VueRouter)
const router = new VueRouter({ const router = new VueRouter({
......
/**
* G-Logger
* version 1.0.0
* Author: Anndy Yang(Guang Jun)
* description: 模拟log4j的日志插件(Vue插件,同时支持浏览器环境)
*
* log4j提供了4种日志级别和2个日志开关。
官方网址: http://logging.apache.org/log4j/1.2/
DEBUG:输出调试信息;指出细粒度信息事件对调试应用程序是非常有帮助的。
INFO: 输出提示信息;消息在粗粒度级别上突出强调应用程序的运行过程。
WARN: 输出警告信息;表明会出现潜在错误的情形。
ERROR:输出错误信息;指出虽然发生错误事件,但仍然不影响系统的继续运行。
FATAL: 输出致命错误;指出每个严重的错误事件将会导致应用程序的退出。
ALL level:打开所有日志记录开关;是最低等级的,用于打开所有日志记录。
OFF level:关闭所有日志记录开关;是最高等级的,用于关闭所有日志记录。
按照范围从小到大排序:OFF level > FATAL > ERROR > WARN > INFO > DEBUG > ALL level;范围大的会包含范围小的。
例如日志设置为INFO级别,则FATAL、ERROR、WARN、INFO的日志开关都是打开的,而DEBUG的日志开关将是关闭的。
Log4j建议只使用四个级别,优先级从高到低分别是 ERROR、WARN、INFO、DEBUG。
*/
const gLogger = {}
gLogger.install = function (Vue, options) {
if (gLogger.installed) return
let logger = {
isDev: true,
cLevel: 'debug',
prefix: 'gLogger Says'
// levels: ['off', 'fatal', 'error', 'warn', 'info', 'debug', 'all']
}
if (options) {
for (const key of Object.keys(options)) {
logger[key] = options[key]
}
}
logger.levels = ['off', 'fatal', 'error', 'warn', 'info', 'debug', 'all']
for (const level of logger.levels) {
logger[level] = function () {
if (!this.isDev || typeof console === 'undefined') return
let levelIndex = logger.levels.indexOf(level)
// 如果是OFF级别,则不输出日志
if (levelIndex === 0) return
let cLevelIndex = logger.levels.indexOf(logger.cLevel)
// 如果当前级别底,则不输出日志
if(cLevelIndex < levelIndex) return
let args = Array.from(arguments)
args.unshift(`[${this.prefix} :: ${level}]`.toUpperCase())
console.log(...args)
}
}
Vue.prototype.$log = logger
if (window) window.logger = logger
}
export default gLogger
\ No newline at end of file
此差异已折叠。
import App from '../App' import App from '../App'
const home = r => require.ensure([], () => r(require('../views/home')), 'home') // 等待会话
const blank = r => require.ensure([], () => r(require('../views/blank')), 'blank') const waitingSessionList = r => require.ensure([], () => r(require('../views/IM/waiting-session/list.vue')), 'waitingSessionList')
// 消息查询
const searchMessageList = r => require.ensure([], () => r(require('../views/IM/search-message/list.vue')), 'searchMessageList')
const searchMessageDetail = r => require.ensure([], () => r(require('../views/IM/search-message/detail.vue')), 'searchMessageDetail')
const discuss = r => require.ensure([], () => r(require('../views/discuss/index.vue')), 'index') // 当前会话
const creatDiscuss = r => require.ensure([], () => r(require('../views/discuss/add-edit.vue')), 'creatDiscuss') const currentSessionList = r => require.ensure([], () => r(require('../views/IM/current-session/index.vue')), 'currentMessageIndex')
const questionNaire = r => require.ensure([], () => r(require('../views/question-naire/question-list.vue')), 'questionNaire')
// 我要群发
const topicList = r => require.ensure([], () => r(require('../views/topicManage/index.vue')), 'topicList') const chainMessage = r => require.ensure([], () => r(require('../views/IM/chain-message/index.vue')), 'chainMessage')
const reportSet = r => require.ensure([], () => r(require('../views/report/reportSet.vue')), 'reportSet')
// 历史群发
const chainHistoryList = r => require.ensure([], () => r(require('../views/IM/chain-history/list.vue')), 'chainHistoryList')
const chainHistoryDetail = r => require.ensure([], () => r(require('../views/IM/chain-history/detail.vue')), 'chainHistoryDetail')
export default [{ export default [{
path: '/', path: '/',
...@@ -19,35 +24,29 @@ export default [{ ...@@ -19,35 +24,29 @@ export default [{
children: [ children: [
{ {
path: '', path: '',
redirect: '/home' redirect: '/waiting-session-list'
},{ }, {
path: '/questionNaire', path: '/waiting-session-list',
component: questionNaire component: waitingSessionList
},{ }, {
path: '/home', path: '/search-message-list',
component: home component: searchMessageList
}, }, {
path: '/search-message-detail',
component: searchMessageDetail
}, {
path: '/current-session-list',
component: currentSessionList
}, {
path: '/chain-message',
component: chainMessage
}, {
path: '/chain-history-list',
component: chainHistoryList
}, {
path: '/chain-history-detail',
component: chainHistoryDetail
}
{
path: '/discuss-list',
component: discuss
},
{
path: '/creat-discuss',
component: creatDiscuss
},
{
path: '/question-naire',
component: questionNaire
},
{
path: '/topic-list',
component: topicList
},
{
path: '/report-set',
component: reportSet
},
] ]
}] }]
\ No newline at end of file
import education from './education/getters' import education from './im/getters'
import { containObject } from '../utils/utils' import { containObject } from '../utils/utils'
......
const common = { const common = {
state: { state: {
_token: '', _token: '',
idType: '' isFromAssignTask: false,
}, },
mutations: { mutations: {
CHANGE_TOKEN: (state, data) => { CHANGE_TOKEN: (state, data) => {
state._token = data state._token = data
}, },
CHANGE_IDTYPE: (state, data) => { SET_IS_FROM_ASSIGN_TASK: (state, status) => {
state.idType = data state.isFromAssignTask = status;
} }
}, },
actions: { actions: {
changeToken({ commit }, tokenData) { changeToken({ commit }, tokenData) {
commit('CHANGE_TOKEN', tokenData) commit('CHANGE_TOKEN', tokenData)
}, },
changeIdType({ commit }, idTypeData) {
commit('CHANGE_IDTYPE', idTypeData)
}
} }
} }
......
const getters = { const getters = {
_token: state => state.common._token, _token: state => state.common._token,
idType: state => state.common.idType isFromAssignTask: state => state.common.isFromAssignTask,
} }
export default getters export default getters
import Vue from 'vue' import Vue from 'vue'
import Vuex from 'vuex' import Vuex from 'vuex'
import common from './education/common' import common from './im/common'
import getters from './getters' import getters from './getters'
Vue.use(Vuex) Vue.use(Vuex)
......
...@@ -231,4 +231,37 @@ html,body{ ...@@ -231,4 +231,37 @@ html,body{
} }
.el-breadcrumb__inner.is-link:hover { .el-breadcrumb__inner.is-link:hover {
color: #449284 !important; color: #449284 !important;
} }
\ No newline at end of file
.current-session-wrap {
// .c-bottom .el-input__inner {
// height: 44px;
// line-height: 44px;
// padding-right: 100px;
// }
// .el-input.is-active .el-input__inner,
// .el-input__inner:focus {
// border-color: #eff5f7;
// }
// .link-form .el-form-item {
// margin-bottom: 15px;
// }
.c-bottom .el-textarea__inner {
height: 44px;
line-height: 22px;
padding-right: 100px;
resize: none;
}
.el-input.is-active .el-textarea__inner,
.el-textarea__inner:focus {
border-color: #eff5f7;
}
.link-form .el-form-item {
margin-bottom: 15px;
}
}
.viewer-button.viewer-close {
display: none;
}
\ No newline at end of file
...@@ -120,3 +120,7 @@ ...@@ -120,3 +120,7 @@
border-color: #ecedf1; border-color: #ecedf1;
border-radius: 2px; border-radius: 2px;
} }
.el-button--text > span{
font-weight: 700;
color: #449284 !important;
}
import Vue from 'vue'
Vue.directive('loadmore', {
bind (el, binding) {
// 获取element-ui定义好的scroll盒子
const SELECTWRAP_DOM = el.querySelector('.scroll-box')
console.log(SELECTWRAP_DOM);
let flag = true, timeoutId = null;
SELECTWRAP_DOM.addEventListener('scroll', function () {
// console.log(this.scrollHeight, this.scrollTop, this.clientHeight);
const CONDITION = this.scrollTop == 0;
if (CONDITION) {
if(flag) {
flag = false;
timeoutId && clearTimeout(timeoutId);
timeoutId = setTimeout( () => {
binding.value()
flag = true;
}, 150)
}
}
});
}
})
\ No newline at end of file
...@@ -3,13 +3,12 @@ ...@@ -3,13 +3,12 @@
*/ */
export const envConfig = { export const envConfig = {
development: { development: {
// baseUrl: 'https://dev-sc.yunqueyi.com/', baseUrl: 'https://dev-sc.yunqueyi.com',
// // baseUrl: 'http://10.177.15.180:10202/', // // baseUrl: 'http://10.177.15.180:10202/',
// // baseUrl: 'http://192.168.140.14:10201/', // // baseUrl: 'http://192.168.140.14:10201/',
// baseUrl: 'https://test1-sc.yunqueyi.com/', // baseUrl: 'https://test1-sc.yunqueyi.com',
//baseUrl: 'https://uat-sc.yunqueyi.com/', // baseUrl: 'https://uat-sc.yunqueyi.com',
baseUrl: 'https://uat-sc.yunqueyi.com',
qiniuFileUrl: "https://dev-sc.yunqueyi.com/contents/admin/qiniu/token1", qiniuFileUrl: "https://dev-sc.yunqueyi.com/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://test1-videos.yunqueyi.com", qiniuResourceUrl: "https://test1-videos.yunqueyi.com",
...@@ -17,7 +16,9 @@ export const envConfig = { ...@@ -17,7 +16,9 @@ export const envConfig = {
loginUrl: 'https://dev-saas.yunqueyi.com/pica-login/work_station.html', loginUrl: 'https://dev-saas.yunqueyi.com/pica-login/work_station.html',
//innerLoginUrl: 'http://localhost:8090/PICA_SSO_FE/html/pica_index.html', //innerLoginUrl: 'http://localhost:8090/PICA_SSO_FE/html/pica_index.html',
innerLoginUrl: 'https://dev-sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html', innerLoginUrl: 'https://dev-sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html',
yuequeyiIndexUrl: 'https://dev-saas.yunqueyi.com/pica_index.html' yuequeyiIndexUrl: 'https://dev-saas.yunqueyi.com/pica_index.html',
phomeDemain: 'https://dev-phome.yunqueyi.com',
picakfAccId: 'picakf_dev',
}, },
dev: { dev: {
baseUrl: 'https://dev-sc.yunqueyi.com', baseUrl: 'https://dev-sc.yunqueyi.com',
...@@ -26,7 +27,9 @@ export const envConfig = { ...@@ -26,7 +27,9 @@ export const envConfig = {
qiniuImgUrl: "https://test1-file.yunqueyi.com", qiniuImgUrl: "https://test1-file.yunqueyi.com",
loginUrl: 'https://dev-saas.yunqueyi.com/pica-login/work_station.html', loginUrl: 'https://dev-saas.yunqueyi.com/pica-login/work_station.html',
innerLoginUrl: 'https://dev-sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html', innerLoginUrl: 'https://dev-sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html',
yuequeyiIndexUrl: 'https://dev-saas.yunqueyi.com/pica_index.html' yuequeyiIndexUrl: 'https://dev-saas.yunqueyi.com/pica_index.html',
phomeDemain: 'https://dev-phome.yunqueyi.com',
picakfAccId: 'picakf_dev',
}, },
test: { test: {
baseUrl: 'https://test1-sc.yunqueyi.com', baseUrl: 'https://test1-sc.yunqueyi.com',
...@@ -35,7 +38,9 @@ export const envConfig = { ...@@ -35,7 +38,9 @@ export const envConfig = {
qiniuImgUrl: "https://test1-file.yunqueyi.com", qiniuImgUrl: "https://test1-file.yunqueyi.com",
loginUrl: 'https://test1.yunqueyi.com/pica-login/work_station.html', loginUrl: 'https://test1.yunqueyi.com/pica-login/work_station.html',
innerLoginUrl: 'https://test1-sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html', innerLoginUrl: 'https://test1-sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html',
yuequeyiIndexUrl: 'https://test1.yunqueyi.com/pica_index.html' yuequeyiIndexUrl: 'https://test1.yunqueyi.com/pica_index.html',
phomeDemain: 'https://test1-phome.yunqueyi.com',
picakfAccId: 'picakf_test',
}, },
uat: { uat: {
baseUrl: 'https://uat-sc.yunqueyi.com', baseUrl: 'https://uat-sc.yunqueyi.com',
...@@ -46,7 +51,9 @@ export const envConfig = { ...@@ -46,7 +51,9 @@ export const envConfig = {
qiniuResourceUrl: "https://test1-videos.yunqueyi.com", qiniuResourceUrl: "https://test1-videos.yunqueyi.com",
loginUrl: 'https://uat.yunqueyi.com/pica-login/work_station.html', loginUrl: 'https://uat.yunqueyi.com/pica-login/work_station.html',
innerLoginUrl: 'https://uat-sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html', innerLoginUrl: 'https://uat-sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html',
yuequeyiIndexUrl: 'https://uat.yunqueyi.com/pica_index.html' yuequeyiIndexUrl: 'https://uat.yunqueyi.com/pica_index.html',
phomeDemain: 'https://uat-phome.yunqueyi.com',
picakfAccId: 'picakf_uat',
}, },
pro: { pro: {
baseUrl: 'https://sc.yunqueyi.com', baseUrl: 'https://sc.yunqueyi.com',
...@@ -55,6 +62,8 @@ export const envConfig = { ...@@ -55,6 +62,8 @@ export const envConfig = {
qiniuImgUrl: "https://files.yunqueyi.com", qiniuImgUrl: "https://files.yunqueyi.com",
loginUrl: 'https://yunqueyi.com/pica-login/work_station.html', loginUrl: 'https://yunqueyi.com/pica-login/work_station.html',
innerLoginUrl: 'https://sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html', innerLoginUrl: 'https://sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html',
yuequeyiIndexUrl: 'https://www.yunqueyi.com/pica_index.html' yuequeyiIndexUrl: 'https://www.yunqueyi.com/pica_index.html',
phomeDemain: 'https://phome.yunqueyi.com',
picakfAccId: 'picakf',
} }
} }
...@@ -24,7 +24,6 @@ service.interceptors.request.use(config => { ...@@ -24,7 +24,6 @@ service.interceptors.request.use(config => {
// } // }
return config return config
}, error => { }, error => {
// logger.debug('service.interceptors.request: ', error)
Promise.reject(error) Promise.reject(error)
}) })
...@@ -43,8 +42,6 @@ service.interceptors.response.use( ...@@ -43,8 +42,6 @@ service.interceptors.response.use(
//} //}
}, },
error => { error => {
// logger.error('err' + error)
return Promise.reject(error) return Promise.reject(error)
} }
) )
......
此差异已折叠。
...@@ -42,36 +42,10 @@ function getUrlParmByCode(paramList) { ...@@ -42,36 +42,10 @@ function getUrlParmByCode(paramList) {
return '' return ''
} }
// 计算高度
export function resizeHeight(cMinusHeight = 152, iMinuxHeight = 210, refHeightId = 'sidebarWrapperId',
containerHeightId = 'appContainerId', innerHeightId = 'elTableId'){
if (!p_getElm(refHeightId) || !p_getElm(containerHeightId) || !p_getElm(innerHeightId)) {
// window.onresize = null
logger.warn('No certain dom id!!!');
}
let containerHeight = p_getElm(refHeightId).getBoundingClientRect().height - 50
p_getElm(containerHeightId).style.height = containerHeight - cMinusHeight + 'px'
p_getElm(innerHeightId).style.height = containerHeight - iMinuxHeight + 'px'
if(p_getElm('elTableIdInner')){
p_getElm('elTableIdInner').style.height = containerHeight - iMinuxHeight + 'px'
}
window.onresize = function() {
containerHeight = p_getElm(refHeightId).getBoundingClientRect().height - 50
p_getElm(containerHeightId).style.height = containerHeight - cMinusHeight + 'px'
p_getElm(innerHeightId).style.height = containerHeight - iMinuxHeight + 'px'
if (p_getElm('elTableIdInner')) {
p_getElm('elTableIdInner').style.height = containerHeight - iMinuxHeight + 'px'
}
}
}
function p_getElm(elmId) { function p_getElm(elmId) {
return document.getElementById(elmId) return document.getElementById(elmId)
} }
export function deepCopy(obj) { export function deepCopy(obj) {
var result = Array.isArray(obj) ? [] : {}; var result = Array.isArray(obj) ? [] : {};
for (var key in obj) { for (var key in obj) {
...@@ -168,6 +142,7 @@ export function getYunQueYiUrl() { ...@@ -168,6 +142,7 @@ export function getYunQueYiUrl() {
export function uploadVideo() { export function uploadVideo() {
return getConfigByEnvType('qiniuResourceUrl') return getConfigByEnvType('qiniuResourceUrl')
} }
export function uploadImg() { export function uploadImg() {
return getConfigByEnvType('qiniuImgUrl') return getConfigByEnvType('qiniuImgUrl')
} }
...@@ -177,3 +152,14 @@ function getConfigByEnvType(urlType) { ...@@ -177,3 +152,14 @@ function getConfigByEnvType(urlType) {
return envConfig[process.env.BUILD_ENV][urlType] return envConfig[process.env.BUILD_ENV][urlType]
} }
// 获取客服的云信ID
export function getPicaKFAccid() {
return getConfigByEnvType('picakfAccId')
}
// 获取客服的云信ID
export function getPhomeDemain() {
return getConfigByEnvType('phomeDemain')
}
此差异已折叠。
...@@ -7,11 +7,14 @@ export const containObject = function(...obj1) { ...@@ -7,11 +7,14 @@ export const containObject = function(...obj1) {
// 获取页面自适应高度 // 获取页面自适应高度
export function resizeHeight(cMinusHeight = 152, iMinuxHeight = 210, refHeightId = 'slidebar-container', export function resizeHeight(cMinusHeight = 152, iMinuxHeight = 210, refHeightId = 'slidebar-container',
containerHeightId = 'screenSet'){ containerHeightId = 'screenSet'){
let containerHeight = p_getElm(refHeightId).getBoundingClientRect().height - 15 // let containerHeight = p_getElm(refHeightId).getBoundingClientRect().height - 15;
p_getElm(containerHeightId).style.height = containerHeight - cMinusHeight + 'px' let containerHeight = document.body.clientHeight - 80;
p_getElm(containerHeightId).style.height = containerHeight - cMinusHeight + 'px';
window.onresize = function() { window.onresize = function() {
containerHeight = p_getElm(refHeightId).getBoundingClientRect().height - 15 if(p_getElm(refHeightId) && p_getElm(containerHeightId)) {
p_getElm(containerHeightId).style.height = containerHeight - cMinusHeight + 'px' containerHeight = p_getElm(refHeightId).getBoundingClientRect().height - 15;
p_getElm(containerHeightId).style.height = containerHeight - cMinusHeight + 'px';
}
} }
} }
...@@ -780,3 +783,36 @@ export const setOptionLabel = (self,selfModel,selfEId,selfEName,list,listEId,lis ...@@ -780,3 +783,36 @@ export const setOptionLabel = (self,selfModel,selfEId,selfEName,list,listEId,lis
} }
return; return;
}; };
// 将文件大小B转为MB
export const betaHandle = (limit) => {
var size = "";
if(limit < 1024){ //小于0.1KB,则转化成B
size = limit + "B"
}else if(limit < (1024 * 1024)){ //小于0.1MB,则转化成KB
size = (limit/1024).toFixed(0) + "KB"
}else if(limit < (1024 * 1024 * 1024)){ //小于0.1GB,则转化成MB
size = (limit/(1024 * 1024)).toFixed(1) + "MB"
}else{ //其他转化成GB
size = (limit/(1024 * 1024 * 1024)).toFixed(1) + "GB"
}
return size;
}
//转换年月日方法
export const timeHandle = (str) => {
let date = new Date(str * 1);
let Y = date.getFullYear() + '-';
let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
let D = change(date.getDate()) + ' ';
let h = change(date.getHours()) + ':';
let m = change(date.getMinutes());
return Y + M + D + h + m
}
//补0操作
const change = (num) => {
if(parseInt(num) < 10){
num = '0'+ num;
}
return num;
}
\ No newline at end of file
<template>
<div class="chain-history-detail">
<bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond" :jumPathThird="jumPathThird"></bread-crumb>
<div class="component-content screenSet" id="screenSet">
<div class="title">群发标题:<span>{{detailData.title}}</span></div>
<div class="user-list">目标用户:<span @click="downFile">{{detailData.fileName}}</span></div>
<div class="msg-container" v-for="(item, index) in detailData.contentModelList" :key="index">
<div v-if="item.type == 0" class="text-content">
<div>{{item.info}}</div>
</div>
<div v-if="item.type == 1" class="img-content" v-viewer>
<img :src="item.url" />
<!-- <img-size :imgData="item"></img-size> -->
</div>
<div v-if="item.type == 2" class="file-content">
<div class="file-con" @click="openPDF(item.url)">
<div class="file-left">
<span class="name">{{item.info | shortName(23)}}</span>
<span class="size">{{item.fileSize}}</span>
</div>
<div class="file-right">
<img src="../../../assets/image/IM/icon-pdf.png" alt />
</div>
</div>
</div>
<div v-if="item.type == 3" class="link-content">
<div class="link-text">{{item.info}}</div>
</div>
</div>
</div>
</div>
</template>
<script>
import BreadCrumb from "@/components/breadcrumb.vue";
import ImgSize from "@/components/IM/img-size.vue";
import { doUpload, getFilePath } from "@/utils/qiniu-util";
import { openLoading, closeLoading, betaHandle } from "@/utils/utils";
import * as commonUtil from "@/utils/utils";
export default {
components: {
BreadCrumb,
ImgSize
},
data() {
return {
jumPathThird: '/chain-history-list',
curmbFirst: "历史群发",
curmbSecond: "任务详情",
detailData: {
title: '',
fileName: '',
contentModelList: []
},
historyId: '',
};
},
created() {
this.historyId = this.$route.query.id;
},
// 挂载到Dom完成时
mounted() {
commonUtil.resizeHeight();
this.getData();
},
methods: {
// 获取历史群发数据
getData() {
this.loading = true;
let url = `/im/group/info/${this.historyId}`
this.GET(url).then(res => {
this.loading = false;
if (res.code == "000000") {
this.detailData = res.data;
this.detailData.contentModelList.map((item) => {
if(item.type == 2) {
item.fileSize = betaHandle(item.fileSize);
}
})
}
});
},
// 下载目标文件
downFile() {
let a = document.createElement('a');
a.setAttribute('href', this.detailData.fileUrl);
a.click();
},
// 打开PDF
openPDF(url) {
window.open(url, "__blank");
}
}
};
</script>
<style lang="scss" scoped>
.chain-history-detail {
.component-content {
padding: 24px 32px;
background: #fff;
overflow: auto;
.title {
font-size: 14px;
color: #000;
padding: 0 5px 10px 0;
}
.user-list {
font-size: 14px;
color: #000;
padding: 0 5px 20px 0;
border-bottom: 1px solid #F0F1F2;
span {
color: #0D9078;
}
}
.text-content {
padding: 16px 0;
color: #333333;
border-bottom: 1px solid #F0F1F2;
}
.img-content {
padding: 16px 0;
border-bottom: 1px solid #F0F1F2;
cursor: pointer;
& > img {
width: 170px;
height: 108px;
border-radius: 8px;
}
}
.file-content {
padding: 16px 0;
border-bottom: 1px solid #F0F1F2;
.file-con {
display: flex;
flex-direction: row;
max-width: 260px;
text-align: left;
padding: 10px 15px;
background: #f0f1f2;
border-radius: 8px;
cursor: pointer;
.file-left {
display: flex;
flex-direction: column;
justify-content: space-around;
width: 231px;
.name {
font-size: 13px;
color: #333333;
}
.size {
font-size: 12px;
color: #999999;
}
}
.file-right {
width: 36px;
height: 44px;
& > img {
width: 36px;
height: 100%;
border-radius: 3px;
}
}
}
}
.link-content {
padding: 16px 0;
color: #2f86f6;
border-bottom: 1px solid #F0F1F2;
}
}
}
</style>
\ No newline at end of file
<template>
<div class="chain-history-wrap">
<div class="component-content screenSet" id="screenSet">
<el-row :gutter="30" class="row" type="flex" style="margin-top: 10px;margin-right:0px;">
<el-form ref="serchForm" inline :model="searchParam" label-width="15px" style="width:100%;text-align:right;">
<el-form-item label="">
<el-input clearable v-model="searchParam.messageLogId" size="mini" placeholder="请输入任务编号" @change="search(1)">
<el-button slot="append" icon="el-icon-search"></el-button>
</el-input>
</el-form-item>
<el-form-item label="" style="position:relative;top:-8px;left:0;margin-bottom: 0px;">
<el-date-picker
v-model="date"
size="mini"
type="date"
placeholder="请选择日期"
@change="search(1)"></el-date-picker>
</el-form-item>
</el-form>
</el-row>
<el-table :data="tableData" style="width: 100%" v-loading="loading">
<el-table-column prop="id" label="任务ID" min-width="50" align="center"></el-table-column>
<el-table-column prop="title" label="任务名" min-width="100" align="center"></el-table-column>
<el-table-column prop="totalNumber" label="群发人数" min-width="50" align="center"></el-table-column>
<el-table-column label="发送日期" min-width="100" align="center">
<template slot-scope="scope">
<span>{{scope.row.createdTime | dateFilter}}</span>
</template>
</el-table-column>
<el-table-column prop="createdName" label="发送者" min-width="50" align="center"></el-table-column>
<el-table-column label="发送状态" min-width="50" align="center">
<template slot-scope="scope">
<span>{{scope.row.status | statusFilter}}</span>
</template>
</el-table-column>
<el-table-column label="任务详情" fixed="right" align="center" min-width="100">
<template slot-scope="scope">
<el-button type="text" size="small" @click="edit(scope.row)">查看</el-button>
</template>
</el-table-column>
<div slot="empty">
<div class="table-empty">
<img src="../../../assets/image/no-content1.png" />
<p>没有查询到相关结果</p>
</div>
</div>
</el-table>
<!-- 分页 -->
<div class="pagination">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="searchParam.pageNo"
:page-sizes="[15, 30, 50, 100, 200, 500, 700, 1000, 1500, 2000]"
:page-size="searchParam.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows">
</el-pagination>
</div>
</div>
</div>
</template>
<script>
import BreadCrumb from "@/components/breadcrumb.vue";
import { doUpload, getFilePath } from "@/utils/qiniu-util";
import { validateWord } from "@/utils/validate.js";
import { openLoading, closeLoading } from "@/utils/utils";
import * as commonUtil from "@/utils/utils";
let vm = null;
export default {
data() {
return {
searchParam: {
chooseDate: '',
messageLogId: '',
pageNo: 1,
pageSize: 15
},
tableData: [],
totalRows: 0,
loading: false,
date: ''
};
},
computed: {},
filters: {
dateFilter(val) {
return new Date(val).format("yyyy-MM-dd")
},
statusFilter(index) {
let str = "";
if (index == 1 || index == 0) {
str = "发送中";
} else if (index == 2) {
str = "已发送";
} else if (index == 3) {
str = "发送失败";
}
return str;
}
},
created() {
},
// 挂载到Dom完成时
mounted() {
commonUtil.resizeHeight(92);
this.search();
},
methods: {
// 列表查询
search(a) {
if(a) this.searchParam.pageNo = 1;
this.loading = true;
this.searchParam.chooseDate = this.date ? new Date(this.date).getTime() : '';
const {pageNo, pageSize, chooseDate, messageLogId} = this.searchParam;
let url = `/im/group/list?pageNo=${pageNo}&pageSize=${pageSize}&chooseDate=${chooseDate}&messageLogId=${messageLogId}`;
this.GET(url).then(res => {
this.loading = false;
if (res.code == "000000") {
this.tableData = res.data.list;
this.totalRows = res.data.total;
}
});
},
// 查看消息详情
edit(row) {
this.$router.push({ path: `/chain-history-detail`,query: {id: row.id}});
},
handleSizeChange(value) {
this.searchParam.pageSize = value;
this.search();
},
handleCurrentChange(value) {
this.searchParam.pageNo = value;
this.search();
}
}
};
</script>
<style lang="scss" scoped>
.chain-history-wrap {
margin-top: -60px;
.component-content {
padding: 10px;
background: #fff;
// margin: 84px 20px 20px;
overflow: auto;
.search-title {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: 10px 12px;
font-size: 12px;
margin-bottom: 20px;
border-bottom: 1px solid #efefef;
.num {
color: #449284;
}
}
.create-button {
padding: 0 0 15px;
margin-top: 0 !important;
text-align: right;
}
.table-empty {
img {
width: 100px;
}
p {
margin-top: -50px;
}
}
}
}
</style>
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
<template>
<div class="message-list-wrap">
<div class="component-content screenSet" id="screenSet">
<el-row :gutter="30" class="row" type="flex" style="margin-top: 10px;margin-right:0px;">
<el-form ref="serchForm" inline :model="searchParam" label-width="15px" style="width:100%;text-align:right;">
<el-form-item label="">
<el-input clearable v-model="searchParam.userMobile" size="mini" placeholder="请输入用户电话" @change="searchMessage(1)">
<el-button slot="append" icon="el-icon-search"></el-button>
</el-input>
</el-form-item>
<el-form-item label="">
<el-input clearable v-model="searchParam.userName" size="mini" placeholder="请输入用户名称" @change="searchMessage(1)">
<el-button slot="append" icon="el-icon-search"></el-button>
</el-input>
</el-form-item>
<el-form-item label="">
<el-input clearable v-model="searchParam.adminName" size="mini" placeholder="请输入客服名" @change="searchMessage(1)">
<el-button slot="append" icon="el-icon-search"></el-button>
</el-input>
</el-form-item>
<el-form-item label="" style="position:relative;top:-8px;left:0;margin-bottom: 0px;">
<el-date-picker
v-model="date"
size="mini"
type="date"
placeholder="请选择日期"
value-format="yyyy-MM-dd"
@change="searchMessage(1)"></el-date-picker>
</el-form-item>
</el-form>
</el-row>
<el-table :data="tableData" style="width: 100%" v-loading="loading">
<el-table-column prop="userName" label="用户名" min-width="50" align="center"></el-table-column>
<el-table-column prop="communicationNumber" label="对话次数" min-width="100" align="center"></el-table-column>
<el-table-column label="用户类型" min-width="50" align="center">
<template slot-scope="scope">
<span>{{scope.row.idType | typeFilter}}</span>
</template>
</el-table-column>
<el-table-column prop="certStatus" label="认证状况" min-width="100" align="center"></el-table-column>
<el-table-column prop="hospitalName" label="所属机构" min-width="50" align="center"></el-table-column>
<el-table-column label="操作" fixed="right" align="center" min-width="100">
<template slot-scope="scope">
<el-button type="text" size="small" @click="edit(scope.row)">查看详细</el-button>
</template>
</el-table-column>
<div slot="empty">
<div class="table-empty">
<img src="../../../assets/image/IM/no-search-list.png" />
<p>没有查询到相关结果</p>
</div>
</div>
</el-table>
<!-- 分页 -->
<div class="pagination">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="searchParam.pageNo"
:page-sizes="[15, 30, 50, 100, 200, 500, 700, 1000, 1500, 2000]"
:page-size="searchParam.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows">
</el-pagination>
</div>
</div>
</div>
</template>
<script>
import { doUpload, getFilePath } from "@/utils/qiniu-util";
import { validateWord } from "@/utils/validate.js";
import { openLoading, closeLoading } from "@/utils/utils";
import * as commonUtil from "@/utils/utils";
let vm = null;
export default {
data() {
return {
date: '',
searchParam: {
adminName: "",
chooseDate: "",
userMobile: "",
userName: "",
pageNo: 1,
pageSize: 15
},
totalRows: 0,
tableData: [],
loading: false,
// hasSearchDate: false // 查询条件不包含日期
};
},
computed: {},
filters: {
typeFilter(index) {
let str = "";
if (index == 1) {
str = "医生";
} else if (index == 2) {
str = "居民";
}
return str;
}
},
created() {
},
// 挂载到Dom完成时
mounted() {
commonUtil.resizeHeight(92);
this.searchMessage();
},
methods: {
// 列表查询
searchMessage(a) {
if(a) this.searchParam.pageNo = 1;
if(a == 2) return;
this.loading = true;
let url = `/im/system/message/list`;
this.searchParam.chooseDate = this.date ? new Date(this.date).getTime() : '';
let params = this.searchParam;
this.GET(url, params).then(res => {
this.loading = false;
if (res.code == "000000") {
this.tableData = res.data.list;
this.totalRows = res.data.total;
}
});
},
// 查看消息详情
edit(row) {
// if(this.searchParam.chooseDate) this.hasSearchDate = true;
this.$router.push({
path: `/search-message-detail`,
query: {
msgTimestamp: row.msgTimestamp,
doctorAccId: row.accId,
userName: row.userName,
avatarImageUrl: row.avatarImageUrl,
// hasSearchDate: this.hasSearchDate
}
});
},
handleSizeChange(value) {
this.searchParam.pageSize = value;
this.searchMessage();
},
handleCurrentChange(value) {
this.searchParam.pageNo = value;
this.searchMessage();
}
}
};
</script>
<style lang="scss" scoped>
.message-list-wrap {
margin-top: -60px;
.component-content {
padding: 10px;
background: #fff;
// margin: 84px 20px 20px;
.search-title {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: 10px 12px;
font-size: 12px;
margin-bottom: 20px;
border-bottom: 1px solid #efefef;
.num {
color: #449284;
}
}
.create-button {
padding: 0 0 15px;
margin-top: 0 !important;
text-align: right;
}
.table-empty {
margin-top: 20px;
img {
width: 100px;
}
p {
margin-top: -45px;
}
}
}
}
</style>
\ No newline at end of file
<template>
<div class="wts-list-wrap">
<bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond"></bread-crumb>
<div class="component-content screenSet" id="screenSet">
<div class="search-title">
<p>当前共有<span class="num">{{total}}</span>用户正在等待</p>
<el-button type="primary" size="small" @click="getNextSession()">给我一个任务吧</el-button>
</div>
<el-table :data="tableData" style="width: 100%" v-loading="loading">
<el-table-column prop="userName" label="用户名" min-width="50" align="center"></el-table-column>
<el-table-column prop="waitTime" label="等待时间" min-width="100" align="center">
<template slot-scope="scope">
<span>{{scope.row.waitTime * 1000 | continueTimesFilter(true)}}</span>
</template>
</el-table-column>
<el-table-column prop="idType" label="用户类型" min-width="50" align="center">
<template slot-scope="scope">
<span>{{scope.row.idType | typeFilter}}</span>
</template>
</el-table-column>
<el-table-column prop="certStatus" label="认证状况" min-width="100" align="center"></el-table-column>
<el-table-column prop="hospitalName" label="所属机构" min-width="50" align="center"></el-table-column>
<div slot="empty">
<div class="table-empty">
<img src="../../../assets/image/IM/no-search-list.png" />
<p>没有查询到相关结果</p>
</div>
</div>
</el-table>
</div>
</div>
</template>
<script>
import { mapGetters, mapMutations } from 'vuex';
import BreadCrumb from "@/components/breadcrumb.vue";
import { doUpload, getFilePath } from "@/utils/qiniu-util";
import { validateWord } from "@/utils/validate.js";
import { openLoading, closeLoading } from "@/utils/utils";
import * as commonUtil from "@/utils/utils";
let vm = null;
// let intervalId = null;
export default {
components: {
BreadCrumb
},
data() {
return {
curmbFirst: "云鹊客服",
curmbSecond: "等待会话",
tableData: [],
total: 0,
loading: false,
};
},
computed: {
},
filters: {
typeFilter(index) {
let str = "";
if (index == 1) {
str = "医生";
} else if (index == 2) {
str = "居民";
}
return str;
}
},
created() {
this.getListData();
// intervalId = setInterval(() => {
// this.getListData();
// }, 10000);
},
// 挂载到Dom完成时
mounted: function() {
commonUtil.resizeHeight();
},
methods: {
...mapMutations(['SET_IS_FROM_ASSIGN_TASK']),
// 获取数据
getListData() {
this.loading = true;
this.GET('/im/task/list?pageNo=1&pageSize=40').then((res) => {
this.loading = false;
if( res.code === '000000') {
this.tableData = res.data.list || [];
this.total = res.data.total;
} else {
this.$message({
message: res.message,
type: 'error'
});
}
})
},
// 给我一个任务吧,如果当前没有任务,则要提示
getNextSession() {
this.GET('/im/session/kf/fetchOneTask').then((res) => {
if( res.code === '000000') {
this.SET_IS_FROM_ASSIGN_TASK(true);
this.$router.push({ path: `/current-session-list` });
} else {
this.$message({
message: res.message,
type: 'error'
});
}
})
},
},
// 离开页面时,清除定时器
beforeDestroy() {
// intervalId && clearInterval(intervalId);
},
};
</script>
<style lang="scss" scoped>
.wts-list-wrap {
.component-content {
padding: 10px;
background: #fff;
// margin: 84px 20px 20px;
.search-title {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: 10px 12px;
font-size: 12px;
margin-bottom: 20px;
border-bottom: 1px solid #efefef;
p {
font-size: 16px;
color: #000;
}
.num {
color: #449284;
}
}
.create-button {
padding: 0 0 15px;
margin-top: 0 !important;
text-align: right;
}
.table-empty {
margin-top: 20px;
img {
width: 100px;
}
p {
margin-top: -45px;
}
}
}
}
</style>
\ No newline at end of file
...@@ -20,7 +20,7 @@ export default { ...@@ -20,7 +20,7 @@ export default {
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.blank-wrap { .blank-wrap {
background: #fff; background: #fff;
margin: 20px !important; margin: 20px !important;
......
此差异已折叠。
此差异已折叠。
...@@ -93,7 +93,7 @@ export default { ...@@ -93,7 +93,7 @@ export default {
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.home-wrap { .home-wrap {
.message-content { .message-content {
.visitor { .visitor {
......
<template> <template>
<div class="footer-wrap"> <div class="footer-wrap">
<span>Copyright© 2019 云鹊医疗科技 (上海) 有限公司</span> <span>Copyright© 2019 云鹊医疗科技 (上海) 有限公司</span>
<span>沪ICP:16018581号-1</span> <span>沪ICP:16018581号-1</span>
<span><img src="../../assets/image/footer-icon.png"/>京ICP备:14044861号</span> <span>
</div> <img src="../../assets/image/footer-icon.png" />京ICP备:14044861号
</span>
</div>
</template> </template>
<script> <script>
export default { export default {};
}
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.footer-wrap { .footer-wrap {
text-align: center; text-align: center;
height: 75px; height: 75px;
line-height: 75px; line-height: 75px;
font-size: 12px; font-size: 12px;
color: #838486; color: #838486;
span { span {
padding: 0 10px; padding: 0 10px;
} }
img { img {
width: 12px; width: 12px;
padding-right: 5px; padding-right: 5px;
} }
} }
</style> </style>
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册