提交 722f9e2c 编写于 作者: 张磊's avatar 张磊

Merge branch 'release' into 'master'

Release

See merge request !32
无法预览此类型文件
...@@ -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]')
} }
}] }]
......
...@@ -10,7 +10,7 @@ module.exports = { ...@@ -10,7 +10,7 @@ module.exports = {
index: path.resolve(__dirname, '../dist/index.html'), index: path.resolve(__dirname, '../dist/index.html'),
assetsRoot: path.resolve(__dirname, '../dist'), assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: './static', assetsSubDirectory: './static',
assetsPublicPath: './', assetsPublicPath: '/consultation/',
productionSourceMap: false, productionSourceMap: false,
// Surge or Netlify already gzip all static assets for you. // Surge or Netlify already gzip all static assets for you.
// Before setting to `true`, make sure to: // Before setting to `true`, make sure to:
......
...@@ -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>
因为 它太大了无法显示 源差异 。您可以改为 查看blob
无法预览此类型文件
<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">
...@@ -18,105 +18,117 @@ ...@@ -18,105 +18,117 @@
</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() { created() {
vm = this vm = this;
vm.getToken() vm.getToken();
},
mounted() {
}, },
mounted() {},
methods: { methods: {
// 解密token // 解密token
getToken() { getToken() {
let href = window.location.href let href = window.location.href;
let offset = href.indexOf("?") let offset = href.indexOf("?");
//localStorage.setItem('storageToken','CBC0F7B0C9D34806958B18E23C881A09') // localStorage.setItem('token','475DB3D057AD489D81FE4E4DAB747B08')
if(offset !== -1) { if (offset !== -1) {
let paramStr = href.substring(offset + 1, href.length) let paramStr = href.substring(offset + 1, href.length);
let pars = base64decode(paramStr) let pars = base64decode(paramStr);
let paramMap = getUrlParamsMap(pars, "&") let paramMap = getUrlParamsMap(pars, "&");
if (isNotEmptyUtils(paramMap["token"]) && isNotEmptyUtils(paramMap["ssoOrigin"])) { if (
vm.token = paramMap["token"] isNotEmptyUtils(paramMap["token"]) &&
localStorage.setItem('storageToken', vm.token) isNotEmptyUtils(paramMap["ssoOrigin"])
ssoLogin(href, paramMap) ) {
vm.token = paramMap["token"];
localStorage.setItem("token", vm.token);
ssoLogin(href, paramMap);
//vm.$router.push({ path: 'home' }) //vm.$router.push({ path: 'home' })
} else { } else {
if(!localStorage.getItem('storageToken')) { if (!localStorage.getItem("token")) {
window.location.href = getInnerLoginUrl() // 没有token返回登录页面 window.location.href = getInnerLoginUrl(); // 没有token返回登录页面
return return;
} }
} }
}else { } else {
if(!localStorage.getItem('storageToken')) { if (!localStorage.getItem("token")) {
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([ ...mapActions(["changeToken"]),
'changeToken',
'changeIdType'
]),
// 获取用户权限 // 获取用户权限
getUserAuth(token) { getUserAuth(token) {
let req = null let req = null;
req = { req = {
system_type: '26' system_type: "26"
};
vm.POST("/contents/login/header", req).then(res => {
if (res.code == "000000") {
let systemType = 0, authList = res.data.systemInfoList;
let s = authList.find( item => {
return item.systemNameAbbreviation == 'diagnose';
});
if(s) {
systemType = s.id;
} }
vm.POST('/contents/login/header',req).then((res) => { this.systemType = systemType;
if(res.code == '000000') { this.showSlidebar = true;
vm.userName = res.data.userName vm.userName = res.data.userName;
vm.authList = res.data.systemInfoList 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 { }
.router-fade-enter,
.router-fade-leave-active {
opacity: 0; opacity: 0;
} }
.el-container { .el-container {
margin-left: 255px; margin-left: 255px;
overflow: hidden; overflow: hidden;
.content { .content {
background: #F0F2F5; background: #f0f2f5;
position: absolute; position: absolute;
left: 255px; left: 255px;
right: 0; right: 0;
...@@ -126,5 +138,5 @@ export default { ...@@ -126,5 +138,5 @@ export default {
box-sizing: border-box; box-sizing: border-box;
overflow-y: scroll; overflow-y: scroll;
} }
} }
</style> </style>
<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;
padding: 10px 0 20px;
margin: 0 20px;
border-bottom: 1px dashed #F0F0F0;
.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 {
margin-top: 25px;
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;
......
<template>
<div class="diog-wrap" @click.stop="cancle" v-if="show">
<div class="diog-box">
<div class="diog-main" @click.stop="">
<div class="diog-message">
<div class="diog-left">
<img :src="warningImg" alt="" srcset="">
</div>
<div class="diog-right">
<p class="title">{{title}}</p>
</div>
</div>
<div class="btn">
<div @click.stop="confirm" class="confirm-btn">{{confirmTxt}}</div>
<div @click.stop="cancle" class="cancle-btn" v-if="cancleTxt">{{cancleTxt}}</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
warningImg: require('@/assets/image/live/warning.png'),
show: false,
title: '',
confirmTxt: '确定',
cancleTxt: '',
_promise: null
}
},
created() {},
methods: {
reset() {
this.title = ''
this.confirmTxt = '确定'
this.cancleTxt = ''
this._promise = null
},
init(obj={}) {
Object.assign(this,obj)
this.show = true
return new Promise((resolve,reject) => {
this._promise = {
resolve,
reject
};
})
},
async cancle() {
this.show = false
await this._promise.reject && this._promise.reject()
this.reset()
},
async confirm() {
this.show = false
await this._promise.resolve && this._promise.resolve()
this.reset()
},
hide() {
this.show = false
this.reset()
}
}
}
</script>
<style lang="scss" scoped>
.diog-wrap {
position: fixed;
top: 0;
right: 0;
left: 0;
bottom: 0;
z-index: 3000;
.diog-box {
position: absolute;
top: 64px;
right: 0;
left: 255px;
bottom: 0;
display: flex;
align-items: center;
justify-content: center;
background: rgba(0,0,0,0.6);
.diog-main {
width:480px;
padding: 34px 32px 24px 34px;
box-sizing: border-box;
background:rgba(31,31,31,1);
box-shadow:0px 12px 48px 16px rgba(0,0,0,0.12),0px 9px 28px 0px rgba(0,0,0,0.2),0px 6px 16px -8px rgba(0,0,0,0.32);
border-radius:2px;
.diog-message {
display: flex;
.diog-left {
height: 21px;
width: 21px;
margin-right: 17px;
}
.diog-right {
.title {
font-size:16px;
font-family:PingFangSC-Medium,PingFang SC;
font-weight:500;
color:rgba(255,255,255,0.85);
line-height:24px;
}
}
}
.btn {
margin-top: 24px;
display: flex;
flex-direction: row-reverse;
.confirm-btn {
margin-left: 12px;
padding: 0 16px;
height:32px;
background:rgba(47,134,246,1);
border-radius:2px;
font-size:14px;
font-family:PingFangSC-Regular,PingFang SC;
font-weight:400;
color:rgba(255,255,255,1);
line-height:32px;
text-align: center;
cursor: pointer;
}
.cancle-btn {
width:60px;
height:32px;
border-radius:2px;
border:1px solid rgba(255,255,255,0.2);
font-size:14px;
font-family:PingFangSC-Regular,PingFang SC;
font-weight:400;
color:rgba(255,255,255,0.65);
line-height:32px;
text-align: center;
cursor: pointer;
}
}
}
}
}
</style>
<template>
<div>
<el-dialog
:title="title"
:visible.sync="appointmentTimeVisible" @close="cancel">
<!-- <el-row :gutter="30" class="row search" type="flex" style="margin-bottom:0;">-->
<el-form ref="setForm"
:rules="addRules"
:model="model"
label-width="250px"
label-suffix=":"
label-position="right"
size="mini"
style="width: 100%;">
<el-form-item label="问诊方式" prop="diagnoseChannel">
<el-col :span="15">
<el-radio-group v-model="model.diagnoseChannel" size="small" style="line-height: 45px;width: 135%;">
<el-radio :label="1">APP问诊(系统发起问诊)</el-radio>
<el-radio :label="2">线下问诊(APP不会自动发起问诊)</el-radio>
</el-radio-group>
</el-col>
</el-form-item>
<el-form-item label="预约时间" class="required-label" prop="rangeTime">
<el-col :span="15">
<el-date-picker
v-model="rangeTime"
type="datetimerange"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd HH:mm:ss"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="pickerOptions1"
style="width: 135%;">
</el-date-picker>
</el-col>
</el-form-item>
</el-form>
<!-- </el-row>-->
<span slot="footer" class="dialog-footer" style="text-align: center;">
<el-button @click="cancel">取 消</el-button>
<el-button type="primary" @click="confirm" :disabled="isClick">确定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {updateDiagnosis} from "../../utils/diagnosis";
let vm = null;
export default {
data() {
return {
show: false,
title: '设置预约时间(问诊时间)',
confirmTxt: '确定',
cancleTxt: '',
_promise: null,
isClick:false,
model: {
diagnoseChannel: 1,
appointBeginTime: "",
appointEndTime: ""
},
rangeTime: '',
addRules: {
diagnoseChannel: [
{required: true, message: "请选择问诊方式", trigger: 'blur'}
],
rangeTime: [
{
type: 'array',
required: true,
// message: "预约时间不能为空",
trigger: 'change',
fields: {
0: {required: true, type: 'date', message: "开始时间不能为空", trigger: 'change'},
1: {required: true, type: 'date', message: '结束时间不能为空', trigger: 'change'}
}
}
],
},
pickerOptions1: {
disabledDate: time => {
return (
time.getTime() < Date.now()-1 * 24 * 3600 * 1000
); //减去一天的时间代表可以选择同一天;
}
},
}
},
props: {
appointmentTimeVisible: {
type: Boolean,
default: false
},
diagnoseLogId: {
type: Number,
default: 0
},
bizType: {
type: Number,
default: 0
},
},
created() {
vm = this;
},
methods: {
confirm() {
if(!(this.rangeTime != null && this.rangeTime.length > 0)){
vm.$message.warning("请选择预约时间");
return;
}
// this.$refs.setForm.validate((valid) => {
// if (valid) {
let req = {
id: this.diagnoseLogId,
bizType: this.bizType,
diagnoseChannel: this.model.diagnoseChannel,
appointBeginTime: this.rangeTime[0],
appointEndTime: this.rangeTime[1]
}
vm.isClick = true;
updateDiagnosis(req).then(function (res) {
vm.isClick = false;
if (res.code == "000000") {
vm.cancel();
vm.$emit('search');
} else {
vm.$message.error(res.message);
}
}).catch(function (error) {
vm.isClick = false;
vm.$message.error(res.message);
});
// }
// })
},
cancel() {
this.rangeTime = "";
this.$emit('update:appointmentTimeVisible', false);
}
}
}
</script>
<style lang="scss" scoped>
</style>
<template>
<div>
<el-dialog
:title="title"
:visible.sync="coordinatingVisible" @close="cancel">
<!-- <el-row :gutter="30" class="row search" type="flex" style="margin-bottom:0;">-->
<el-form ref="setForm"
:rules="addRules"
:model="model"
label-width="250px"
label-suffix=":"
label-position="right"
size="mini"
style="width: 100%;">
<el-form-item label="备注">
<el-col :span="15">
<el-input type="textarea" v-model="model.coordinatedRemark" style="width: 130%;" size="small" minlength="2" maxlength="500" placeholder="(选填)请输入备注信息"></el-input>
</el-col>
</el-form-item>
</el-form>
<!-- </el-row>-->
<span slot="footer" class="dialog-footer" style="text-align: center;">
<el-button @click="cancel">取 消</el-button>
<el-button type="primary" @click="confirm">确定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {updateDiagnosis} from "../../utils/diagnosis";
let vm = null;
export default {
props: {
coordinatingVisible: {
type: Boolean,
default: false
},
diagnoseLogId: {
type: Number,
default: 0
},
bizType: {
type: Number,
default: 0
},
},
data() {
return {
show: false,
title: '设置待协调医生',
confirmTxt: '确定',
cancleTxt: '',
_promise: null,
model:{
coordinatedRemark:""
},
addRules:{
// coordinatedRemark: [
// {required: true, message: "(选填)请输入备注信息", trigger: 'blur'}
// ]
}
}
},
created() {
vm = this;
},
mounted() {
// if(this.bizType == 8){
// this.title = "设置待协调医生";
// }
// else if(this.bizType == 10){
// this.title = "重新匹配医生";
// }
},
methods: {
confirm() {
this.$refs.setForm.validate((valid) => {
if (valid) {
let req = {
id:this.diagnoseLogId,
bizType:this.bizType,
coordinatedRemark:this.model.coordinatedRemark
}
updateDiagnosis(req).then(function (res) {
if(res.code == "000000") {
vm.cancel();
vm.$emit('search');
} else {
vm.$message.error(res.message);
}
}).catch(function (error) {
vm.$message.error(res.message);
});
}
})
},
cancel(){
this.model.coordinatedRemark = "";
this.$emit('update:coordinatingVisible', false);
}
}
}
</script>
<style lang="scss" scoped>
</style>
<template>
<div>
<el-dialog
:title="title"
:visible.sync="diagnosisDoctorVisible" @close="cancel"
@open="opendialog"
>
<!-- <el-row :gutter="30" class="row search" type="flex" style="margin-bottom:0;">-->
<el-form ref="setForm"
:rules="addRules"
:model="formData"
label-width="250px"
label-suffix=":"
label-position="right"
size="mini"
style="width: 100%;">
<el-form-item label="接诊医生" class="required-label" prop="receptionId">
<!-- <el-input v-model="formData.doctorName" placeholder="请选择接诊医生" class="set-width" disabled></el-input>-->
<el-col :span="15">
<el-select @change="doctorChanged($event)" filterable v-model="formData.receptionId" placeholder="请选择接诊医生" class="set-width" style="width: 100%;">
<el-option v-for="item of doctorList" :key="item.doctorId" :label="item.doctorName" :value="item.doctorId"></el-option>
</el-select>
</el-col>
</el-form-item>
<el-form-item label="接诊医生职称" >
<el-col :span="15">
<el-input v-model="formData.doctorTitle" placeholder="请选择职称" class="set-width" disabled style="width: 100%;"></el-input>
<!-- <el-select v-model="formData.doctorTitle" placeholder="请选择职称" disabled class="set-width">
<el-option v-for="item of sexList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select> -->
</el-col>
</el-form-item>
<el-form-item label="接诊医生所在机构" >
<el-col :span="15">
<el-input v-model="formData.doctorHospital" placeholder="请选择机构" class="set-width" disabled style="width: 100%;"></el-input>
</el-col>
<!-- <el-select v-model="formData.doctorHospital" placeholder="请选择机构" disabled class="set-width">
<el-option v-for="item of sexList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select> -->
</el-form-item>
<el-form-item label="接诊医生所在科室" >
<el-col :span="15">
<el-input v-model="formData.doctorDepartment" placeholder="请选择机构" class="set-width" disabled style="width: 100%;"></el-input>
<!-- <el-select v-model="formData.doctorDepartment" placeholder="请选择科室" disabled class="set-width">
<el-option v-for="item of sexList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select> -->
</el-col>
</el-form-item>
<el-form-item label="接诊医生电话">
<el-col :span="15">
<el-input v-model="formData.doctorMobile" placeholder="请输入接诊医生手机号" disabled class="set-width" style="width: 100%;"></el-input>
</el-col>
</el-form-item>
<el-form-item v-if="formData.receptionName == '站外医生' || formData.receptionName == '云鹊医助'" label="外部医生姓名" class="required-label" prop="outsideDoctor">
<el-col :span="15">
<el-input v-model="formData.outsideDoctor" placeholder="请输入外部医生姓名" class="set-width" style="width: 135%;"></el-input>
</el-col>
</el-form-item>
<el-form-item label="接诊意向时间">
<el-col :span="15">
<el-date-picker
v-model="rangeTime"
type="datetimerange"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="pickerOptions1"
style="width: 100%;">
</el-date-picker>
</el-col>
</el-form-item>
</el-form>
<!-- </el-row>-->
<span slot="footer" class="dialog-footer" style="text-align: center;">
<el-button @click="cancel">取 消</el-button>
<el-button type="primary" @click="confirm" :disabled="isClick">确定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {updateDiagnosis} from "../../utils/diagnosis";
let vm = null;
export default {
props: {
diagnosisDoctorVisible: {
type: Boolean,
default: false
},
diagnoseLogId: {
type: Number,
default: 0
},
diagnoseType: {
type: Number,
default: 0
},
doctorId: {
type: Number|String,
default: 0
},
},
data() {
return {
show: false,
title: '设置接诊医生',
confirmTxt: '确定',
cancleTxt: '',
_promise: null,
isClick: false,
formData:{
receptionId:this.doctorId,
receptionName:"",
doctorTitle:"",
doctorHospital:"",
doctorDepartment:"",
doctorMobile:"",
outsideDoctor:"",
innerFlag:1,
receptionBeginTime:"",
receptionEndTime:'',
},
doctorList:[],
rangeTime:'',
addRules:{
receptionId: [
{required: true, message: "请选择接诊医生", trigger: 'change'}
],
outsideDoctor: [
{required: true, message: "请输入外部医生姓名", trigger: 'blur'}
],
// rangeTime: [
// {
// type: 'array',
// required: true,
// trigger: 'change',
// fields: {
// 0: {required: true, type: 'date', message: "开始时间不能为空"},
// 1: {required: true, type: 'date', message: '结束时间不能为空'}
// }
// }
// ]
},
pickerOptions1: {
disabledDate: time => {
return (
time.getTime() < Date.now()-1 * 24 * 3600 * 1000
); //减去一天的时间代表可以选择同一天;
}
},
}
},
created() {
vm = this;
this.getDoctorList();
},
watch:{
diagnoseType:function (){
this.getDoctorList();
},
doctorId:function (){
if(this.doctorId == 0 || this.doctorId == null){
this.formData.receptionId = "";
if(this.$refs.setForm) {
this.$refs.setForm.resetFields()
}
}
else {
this.formData.receptionId = this.doctorId;
this.doctorChanged(this.doctorId);
}
}
},
methods: {
confirm() {
this.$refs.setForm.validate((valid) => {
if (valid) {
// if(!(this.rangeTime != null && this.rangeTime.length > 0)){
// vm.$message.warning("请选择接诊意向时间");
// return;
// }
let req = null;
if(this.formData.receptionName == "站外医生" || this.formData.receptionName == "云鹊医助"){
this.formData.innerFlag = 2;// 外部
req = {
id:this.diagnoseLogId,
bizType:9,
innerFlag:this.formData.innerFlag,
receptionId:this.formData.receptionId,
receptionName:this.formData.receptionName,
outsideDoctor:this.formData.outsideDoctor,
receptionBeginTime:this.rangeTime[0],
receptionEndTime:this.rangeTime[1],
}
}
else {
this.formData.innerFlag = 1;// 内部
req = {
id:this.diagnoseLogId,
bizType:9,
innerFlag:this.formData.innerFlag,
receptionId:this.formData.receptionId,
receptionName:this.formData.receptionName,
receptionBeginTime:this.rangeTime[0],
receptionEndTime:this.rangeTime[1],
}
}
vm.isClick = true
updateDiagnosis(req).then(function (res) {
vm.isClick = false
if(res.code == "000000") {
vm.cancel();
vm.$emit('search');
} else {
vm.$message.error(res.message);
}
}).catch(function (error) {
vm.isClick = false
vm.$message.error(res.message);
});
}
})
},
cancel(){
this.doctorId = "";
this.formData.outsideDoctor = '';
this.$emit('update:diagnosisDoctorVisible', false);
},
opendialog() {
this.formData.receptionId = ""
this.formData.receptionName = ""
this.formData.doctorTitle = ""
this.formData.doctorHospital = ""
this.formData.doctorDepartment = ""
this.formData.doctorMobile = ""
this.doctorChanged(this.doctorId)
},
doctorChanged(value) {
let selected = this.doctorList.find(item => item.doctorId === value);
if (selected) {
this.formData.receptionId = value
this.formData.receptionName = selected.doctorName
this.formData.doctorTitle = selected.doctorTitle
this.formData.doctorHospital = selected.doctorHospital
this.formData.doctorDepartment = selected.doctorDepartment
this.formData.doctorMobile = selected.doctorMobile
// this.formData.serviceFee = this.priceFilter(selected.serviceFee)
}
},
getDoctorList() {
this.loading = true
let url = `/diagnose/doctorService/doctorList?diagnoseType=${this.diagnoseType}`
this.GET(url).then(res => {
this.loading = false
if (res.code == '000000') {
this.doctorList = res.data
this.doctorChanged(this.formData.receptionId)
} else {
this.$message.info('请稍后重试')
}
}).catch(() => {
this.loading = false
this.$message.info('请稍后重试')
});
},
}
}
</script>
<style lang="scss" scoped>
.set-width {
width: 300px;
}
</style>
<template>
<div>
<el-dialog
:title="title"
:visible.sync="diagnosisTimeVisible" @close="cancel">
<!-- <el-row :gutter="30" class="row search" type="flex" style="margin-bottom:0;">-->
<el-form ref="setForm"
:rules="addRules"
:model="model"
label-width="250px"
label-suffix=":"
label-position="right"
size="mini"
style="width: 100%;">
<el-form-item label="助诊意向时间" class="required-label" prop="rangeTime">
<el-col :span="15">
<el-date-picker
v-model="rangeTime"
type="datetimerange"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="pickerOptions1"
style="width: 135%;">
</el-date-picker>
</el-col>
</el-form-item>
<el-form-item label="备注">
<el-col :span="15">
<el-input type="textarea" v-model="model.assistantRemark" style="width: 135%;" size="small" minlength="2"
maxlength="500" placeholder="请输入备注"></el-input>
</el-col>
</el-form-item>
</el-form>
<!-- </el-row>-->
<span slot="footer" class="dialog-footer" style="text-align: center;">
<el-button @click="cancel">取 消</el-button>
<el-button type="primary" @click="confirm" :disabled-="isClick">确定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {updateDiagnosis} from "../../utils/diagnosis";
let vm = null;
export default {
props: {
diagnosisTimeVisible: {
type: Boolean,
default: false
},
diagnoseLogId: {
type: Number,
default: 0
},
bizType: {
type: Number,
default: 0
},
},
data() {
// let checkDate = (rule, value, callback) => {
// if(!value) {
// callback(new Error("请选择助诊意向时间"));
// } else {
// callback();
// }
// }
return {
show: false,
title: '设置时间',
confirmTxt: '确定',
cancleTxt: '',
_promise: null,
isClick: false,
model: {
assistantRemark: ""
},
rangeTime: '',
addRules: {
rangeTime: [
// {type: 'array',required: true, validator: checkDate, trigger: 'blur,change'}
{
type: 'array',
required: true,
// message: "预约时间不能为空",
// validator: checkDate,
trigger: 'change',
fields: {
0: {required: true, type: 'date', message: "开始时间不能为空"},
1: {required: true, type: 'date', message: '结束时间不能为空'}
}
}
]
},
pickerOptions1: {
disabledDate: time => {
return (
time.getTime() < Date.now()-1 * 24 * 3600 * 1000
); //减去一天的时间代表可以选择同一天;
}
},
}
},
created() {
vm = this;
},
methods: {
confirm() {
// this.$refs.setForm.validate((valid) => {
// if (valid) {
if(!(this.rangeTime != null && this.rangeTime.length > 0)){
vm.$message.warning("请选择助诊意向时间");
return;
}
vm.isClick = true
let req = {
id:this.diagnoseLogId,
bizType:this.bizType,
assistantBeginTime:this.rangeTime[0],
assistantEndTime:this.rangeTime[1],
assistantRemark:this.model.assistantRemark
}
updateDiagnosis(req).then(function (res) {
vm.isClick = false;
if(res.code == "000000") {
vm.cancel();
vm.$emit('search');
} else {
vm.$message.error(res.message);
}
}).catch(function (error) {
vm.isClick = false;
vm.$message.error(res.message);
});
// }
// })
},
cancel() {
this.rangeTime = "";
this.model.assistantRemark = "";
this.$emit('update:diagnosisTimeVisible', false);
}
}
}
</script>
<style lang="scss" scoped>
</style>
<template>
<div>
<el-dialog
:title="title"
:visible.sync="diagnosisVisible" @close="cancel">
<!-- <el-row :gutter="30" class="row search" type="flex" style="margin-bottom:0;">-->
<el-form ref="setForm"
:rules="addRules"
:model="model"
label-width="250px"
label-suffix=":"
label-position="right"
size="mini"
style="width: 100%;">
<el-form-item label="助诊意向时间">
<el-date-picker
v-model="rangeTime"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="pickerOptions1">
</el-date-picker>
</el-form-item>
<el-form-item label="备注" class="required-label">
<el-col :span="15">
<el-input type="textarea" v-model="model.userName" style="width: 130%;" size="small" minlength="2" maxlength="500" placeholder="请输入原因"></el-input>
</el-col>
</el-form-item>
</el-form>
<!-- </el-row>-->
<span slot="footer" class="dialog-footer" style="text-align: center;">
<el-button @click="cancel">取 消</el-button>
<el-button type="primary" @click="confirm">确定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
props:[
'diagnosisVisible'
],
data() {
return {
show: false,
title: '设置预约时间(问诊时间)',
confirmTxt: '确定',
cancleTxt: '',
_promise: null,
model:{
userName:"",
title:""
},
rangeTime:'',
addRules:{
userName: [
{required: true, message: "请输入稍后跟进原因", trigger: 'blur'}
]
},
pickerOptions1: {
disabledDate: time => {
return (
time.getTime() > new Date().getTime()
); //减去一天的时间代表可以选择同一天;
}
},
}
},
created() {},
methods: {
reset() {
this.title = ''
this.confirmTxt = '确定'
this.cancleTxt = ''
this._promise = null
},
init(obj={}) {
Object.assign(this,obj)
this.show = true
return new Promise((resolve,reject) => {
this._promise = {
resolve,
reject
};
})
},
async cancle() {
this.show = false
await this._promise.reject && this._promise.reject()
this.reset()
},
async confirm() {
this.show = false
await this._promise.resolve && this._promise.resolve()
this.reset()
},
hide() {
this.show = false
this.reset()
},
cancel(){
this.$emit('update:diagnosisVisible', false);
}
}
}
</script>
<style lang="scss" scoped>
</style>
<template>
<div>
<el-dialog
:title="title"
:visible.sync="followupVisible" @close="cancel">
<!-- <el-row :gutter="30" class="row search" type="flex" style="margin-bottom:0;">-->
<el-form ref="setForm"
:rules="addRules"
:model="model"
label-width="250px"
label-suffix=":"
label-position="right"
size="mini"
style="width: 100%;">
<el-form-item label="稍后跟进原因" class="required-label" prop="toFollowReason">
<el-col :span="15">
<el-input type="textarea" v-model="model.toFollowReason" style="width: 130%;" size="small" minlength="2" maxlength="500" placeholder="请输入原因"></el-input>
</el-col>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer" style="text-align: center;">
<el-button @click="cancel">取 消</el-button>
<el-button type="primary" @click="confirm">确定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {updateDiagnosis} from "../../utils/diagnosis";
let vm = null;
export default {
props: {
followupVisible: {
type: Boolean,
default: false
},
diagnoseLogId: {
type: Number,
default: 0
},
toFollowReason:{
type: String,
default:''
},
},
data() {
return {
show: false,
title: '设为稍后跟进',
confirmTxt: '确定',
cancleTxt: '',
_promise: null,
model:{
toFollowReason:""
},
addRules:{
toFollowReason: [
{required: true, message: "请输入稍后跟进原因", trigger: 'blur'}
]
}
}
},
watch:{
toFollowReason(newdata,olddata){
this.model.toFollowReason=newdata
}
},
created() {
vm = this;
},
mounted(){
},
methods: {
confirm() {
this.$refs.setForm.validate((valid) => {
if (valid) {
let req = {
id:this.diagnoseLogId,
bizType:4,
toFollowReason:this.model.toFollowReason
}
updateDiagnosis(req).then(function (res) {
if(res.code == "000000") {
vm.cancel();
vm.$emit('search');
} else {
vm.$message.error(res.message);
}
}).catch(function (error) {
vm.$message.error(res.message);
});
}
})
},
cancel(){
this.model.toFollowReason = "";
this.$emit('update:followupVisible', false);
}
}
}
</script>
<style lang="scss" scoped>
</style>
<template>
<div class="info-pad-container">
<div class="title">{{option.title}}</div>
<div class="item" v-for="item in option.contentList" :key="item.key">
<div class="key">{{item.key}}</div><div class="dot">{{option.isShowDot ? ':' : ''}}</div>
<div class="value">{{item.value}}</div>
</div>
</div>
</template>
<script>
export default {
/**
* option: {
* isShowDot: false, -->是否展示:,默认false
* title: '标题', --> 标题
* contentList: [{
* key: '用户名',
* value: '小赵'
* }]
* }
*/
props: {
option: {
type: Object,
required: true
}
},
data() {
return {
}
},
created() {},
methods: {
}
}
</script>
<style lang="scss" scoped>
.info-pad-container {
background: #fff;
margin: 20px;
padding: 20px;
.title {
font-weight: bold;
margin: 5px 0;
padding: 5px;
}
.item {
// width: 100%;
margin: 5px 0;
display: flex;
justify-content: flex-start;
align-items: top;
.key {
padding: 5px;
line-height: 20px;
}
.dot {
line-height: 30px;
}
.value {
padding: 5px;
line-height: 20px;
flex: 1;
word-break: break-all;
}
}
}
</style>
<template>
<div>
<el-dialog
:title="title"
:visible.sync="matchVisible" @close="cancel">
<!-- <el-row :gutter="30" class="row search" type="flex" style="margin-bottom:0;">-->
<el-form ref="setForm"
:rules="addRules"
:model="model"
label-width="250px"
label-suffix=":"
label-position="right"
size="mini"
style="width: 100%;">
<el-form-item label="运营名称" class="required-label" prop="operatorId">
<el-col :span="15">
<el-select
v-model="model.operatorId"
placeholder="请选择运营名称"
filterable
clearable
@change="changeOperator"
style="width:110%;height: 32px;line-height: 32px;"
>
<el-option
v-for="item in adminList"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-col>
</el-form-item>
</el-form>
<!-- </el-row>-->
<span slot="footer" class="dialog-footer" style="text-align: center;">
<el-button @click="cancel">取 消</el-button>
<el-button type="primary" @click="confirm">确定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { updateDiagnosis,batchSetOperator } from '../../utils/diagnosis';
let vm = null;
export default {
props: {
matchVisible:{
type: Boolean,
default: false
},
diagnoseLogId: {
type: Number,
default: 0
},
multipleSelection: {
type: Array,
default: [],
},
batchFlag:{
type: Boolean,
default: false
},
operateUserID: {
type: String|Number,
default: ""
},
},
data() {
return {
show: false,
title: '匹配运营',
confirmTxt: '确定',
cancleTxt: '',
_promise: null,
model:{
operatorName:"",
operatorId:""
},
adminList:'',
addRules:{
operatorId: [
{required: true, message: "请选择运营人员", trigger: 'change'}
]
}
}
},
created() {
vm = this;
this.getAdminList();
if(this.batchFlag){
this.title = "批量设置运营";
}
},
watch:{
operateUserID:function (){
if(!this.batchFlag){
if(this.operateUserID == 0 || this.operateUserID == null){
this.model.operatorId = "";
if(this.$refs.setForm) {
this.$refs.setForm.resetFields()
}
}
else {
this.model.operatorId = this.operateUserID;
this.changeOperator(this.operateUserID);
}
}
}
},
methods: {
confirm() {
this.$refs.setForm.validate((valid) => {
if (valid) {
// 单个设置运营
if (!this.batchFlag) {
let req = {
id: this.diagnoseLogId,
bizType: 1,
operatorId: this.model.operatorId,
operatorName: this.model.operatorName
}
updateDiagnosis(req).then(function (res) {
if (res.code == "000000") {
vm.cancel();
vm.$emit('search');
} else {
vm.$message.error(res.message);
}
}).catch(function (error) {
vm.$message.error(error);
});
}
// 批量设置运营
else {
let ids = [];
if (this.multipleSelection.length > 0) {
for (let i = 0; i < this.multipleSelection.length; i++) {
ids.push(this.multipleSelection[i].diagnoseLogId);
}
}
let req = {
ids: ids,
operatorId: this.model.operatorId,
operatorName: this.model.operatorName
}
batchSetOperator(req).then(function (res) {
if (res.code == "000000") {
vm.cancel();
vm.$emit('search');
} else {
vm.$message.error(res.message);
}
}).catch(function (error) {
vm.$message.error(error);
});
}
}
})
},
cancel(){
this.model.operatorId = "";
this.$emit('update:matchVisible', false);
},
getAdminList(){
let url = `/diagnose/admin/diagnose/operator/query`
let params = {
"token":localStorage.getItem("token")
};
this.loading = true;
this.GET(url, null).then(res => {
this.loading = false
if (res.code == "000000") {
this.adminList = res.data;
}
});
},
changeOperator(data){
for (let i=0;i < this.adminList.length; i++){
if(data == this.adminList[i].id){
this.model.operatorName = this.adminList[i].name;
break;
}
}
}
}
}
</script>
<style lang="scss" scoped>
</style>
<template>
<div>
<el-dialog
:title="title"
:visible.sync="doctorVisible" @close="cancel">
<!-- <el-row :gutter="30" class="row search" type="flex" style="margin-bottom:0;">-->
<el-form ref="setForm"
:rules="addRules"
:model="model"
label-width="250px"
label-suffix=":"
label-position="right"
size="mini"
style="width: 100%;">
<el-form-item label="分诊科室" class="required-label" prop="triageDepartmentId">
<el-select
v-model="model.triageDepartmentId"
placeholder="请选择分诊科室"
clearable
filterable
style="width:56%;height: 32px;line-height: 32px;"
@change="change"
>
<el-option
v-for="item in depList"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="备注">
<el-col :span="15">
<el-input type="textarea" v-model="model.triageRemark" style="width: 90%;" size="small" minlength="2"
maxlength="500" placeholder="请输入备注"></el-input>
</el-col>
</el-form-item>
</el-form>
<!-- </el-row>-->
<span slot="footer" class="dialog-footer" style="text-align: center;">
<el-button @click="cancel">取 消</el-button>
<el-button type="primary" @click="confirm">确定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {updateDiagnosis, getDepList} from "../../utils/diagnosis";
let vm = null;
export default {
props: {
doctorVisible: {
type: Boolean,
default: false
},
diagnoseLogId: {
type: Number,
default: 0
},
bizType: {
type: Number,
default: 0
},
triageDepartmentId: {
type: Number|String,
default: 0
},
},
data() {
return {
show: false,
title: '设置分诊科室',
confirmTxt: '确定',
cancleTxt: '',
_promise: null,
depList: [],
model: {
triageRemark: "",
triageDepartmentId: "",
triageDepartment:""
},
addRules: {
triageDepartmentId: [
{required: true, message: "请选择分诊科室", trigger: 'change'}
],
}
}
},
created() {
vm = this;
this.getDepList();
},
watch:{
triageDepartmentId:function (){
if(this.triageDepartmentId == 0 || this.triageDepartmentId == null){
this.model.triageDepartmentId = "";
if(this.$refs.setForm) {
this.$refs.setForm.resetFields()
}
}
else {
this.model.triageDepartmentId = this.triageDepartmentId;
this.change(this.triageDepartmentId);
}
}
},
methods: {
getDepList() {
getDepList().then(function (res) {
if (res.code == "000000") {
vm.depList = res.data;
} else {
vm.$message.error(res.message);
}
}).catch(function (error) {
vm.$message.error(res.message);
});
},
confirm() {
this.$refs.setForm.validate((valid) => {
if (valid) {
let req = {
id: this.diagnoseLogId,
bizType: this.bizType,
triageDepartmentId:this.model.triageDepartmentId,
triageDepartment:this.model.triageDepartment,
triageRemark: this.model.triageRemark
}
updateDiagnosis(req).then(function (res) {
if (res.code == "000000") {
vm.cancel();
vm.$emit('search');
} else {
vm.$message.error(res.message);
}
}).catch(function (error) {
vm.$message.error(res.message);
});
}
})
},
cancel() {
this.triageDepartmentId = null;
this.model.triageDepartmentId = "";
this.model.triageRemark = "";
this.$emit('update:doctorVisible', false);
// this.doctorVisible = false;
},
change(data){
for (let i=0;i < this.depList.length; i++){
if(data == this.depList[i].id){
this.model.triageDepartment = this.depList[i].name;
break;
}
}
}
}
}
</script>
<style lang="scss" scoped>
</style>
<template>
<div>
<el-dialog
:title="title"
:visible.sync="refundVisible" @close="cancel">
<!-- <el-row :gutter="30" class="row search" type="flex" style="margin-bottom:0;">-->
<el-form ref="setForm"
:rules="addRules"
:model="model"
label-width="250px"
label-suffix=":"
label-position="right"
size="mini"
style="width: 100%;">
<div style="margin-bottom: 20px;margin-top: -20px;text-align: center;"><span style="color: #ff0000;">温馨提示:订单一旦退款,订单关联的预约单将被同步取消,请谨慎操作退款</span></div>
<el-form-item label="退款原因" class="required-label" prop="refundReason">
<el-col :span="15">
<el-input type="textarea" v-model="model.refundReason" style="width: 130%;" size="small" placeholder="请输入原因"></el-input>
</el-col>
</el-form-item>
</el-form>
<!-- </el-row>-->
<span slot="footer" class="dialog-footer" style="text-align: center;">
<el-button @click="cancel">取 消</el-button>
<el-button type="primary" @click="confirm" :disabled="isClick">确定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { updateDiagnosis } from '../../utils/diagnosis';
let vm = null;
export default {
props: {
refundVisible:{
type: Boolean,
default: false
},
diagnoseLogId: {
type: Number,
default: 0
}
},
data() {
return {
show: false,
title: '取消/退款',
confirmTxt: '确定',
cancleTxt: '',
_promise: null,
isClick: false,
model:{
refundReason:""
},
addRules:{
refundReason: [
{required: true, message: "请输入退款原因", trigger: 'blur'}
]
}
}
},
created() {
vm = this;
},
methods: {
confirm() {
this.$refs.setForm.validate((valid) => {
if (valid) {
let req = {
id: this.diagnoseLogId,
bizType: 2,
refundReason: this.model.refundReason
}
vm.isClick = true
updateDiagnosis(req).then(function (res) {
vm.isClick = false
if (res.code == "000000") {
vm.cancel();
vm.$emit('search');
} else {
vm.$message.error(res.message);
}
}).catch(function (error) {
vm.isClick = false
vm.$message.error(res.message);
});
}
})
},
cancel(){
this.model.refundReason = "";
this.$emit('update:refundVisible', false);
},
}
}
</script>
<style lang="scss" scoped>
</style>
<template>
<div>
<el-dialog
:title="bizType == 10 ? '重新匹配医生' : '重新联系助诊医生'"
:visible.sync="rematchingVisible"
@close="cancel"
>
<div class="message" v-if="bizType == 10">温馨提示:点击确定后,预约单状态将回退为"待匹配医生"状态</div>
<div class="message" v-else>温馨提示:点击确定后,预约单状态将回退为"已匹配"状态</div>
<!-- <el-row :gutter="30" class="row search" type="flex" style="margin-bottom:0;">-->
<el-form
ref="setForm"
:rules="addRules"
:model="model"
label-width="250px"
label-suffix=":"
label-position="right"
size="mini"
style="width: 100%"
>
<el-form-item
label="状态备注"
class="required-label"
prop="statusRemark"
>
<el-col :span="15">
<!-- <el-input
type="textarea"
v-model="model.statusRemark"
style="width: 135%"
size="small"
minlength="2"
maxlength="500"
placeholder="请输入备注信息"
></el-input> -->
<el-select style="width: 135%" size="small" v-model="model.statusRemark" placeholder="请选择备注信息">
<el-option
v-for="item in rematchingOptions"
:key="item"
:label="item"
:value="item">
</el-option>
</el-select>
</el-col>
</el-form-item>
</el-form>
<!-- </el-row>-->
<span slot="footer" class="dialog-footer" style="text-align: center">
<el-button @click="cancel">取 消</el-button>
<el-button type="primary" @click="confirm">确定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { updateDiagnosis } from "../../utils/diagnosis";
let vm = null;
export default {
props: {
rematchingVisible: {
type: Boolean,
default: false,
},
rematchingOptions:{
type: Array,
default: null,
},
bizType: {
type: Number,
default: 10,
},
diagnoseLogId: {
type: Number,
default: 0,
},
bizType: {
type: Number,
default: 0,
},
},
data() {
return {
show: false,
title: "重新匹配医生",
confirmTxt: "确定",
cancleTxt: "",
_promise: null,
model: {
statusRemark: "",
},
addRules: {
statusRemark: [
{ required: true, message: "请选择备注信息", trigger: "blur" },
],
},
};
},
watch:{
rematchingOptions(val,oldval){
console.log(val)
this.model.statusRemark=val[0]?val[0]:""
}
},
created() {
vm = this;
},
methods: {
confirm() {
this.$refs.setForm.validate((valid) => {
if (valid) {
let req = {
id: this.diagnoseLogId,
bizType: this.bizType,
statusRemark: this.model.statusRemark,
};
updateDiagnosis(req)
.then(function (res) {
if (res.code == "000000") {
vm.cancel();
vm.$emit("search");
} else {
vm.$message.error(res.message);
}
})
.catch(function (error) {
vm.$message.error(res.message);
});
}
});
},
cancel() {
this.model.statusRemark = "";
this.$emit("update:rematchingVisible", false);
},
},
};
</script>
<style lang="scss" scoped>
.message{
color: #f56c6c;
font-size: 14px;
text-align: center;
margin-bottom: 30px;
}
</style>
<template>
<div>
<el-upload
:action="actionurl"
:headers="headers"
:disabled="isDisable"
list-type="picture-card"
:before-upload="fileUpload"
:on-preview="handlePictureCardPreview"
:on-remove="handleRemove"
:on-success="sucess"
:limit="15"
:on-exceed="handleExceed"
:file-list="imgArr"
:accept="accept"
>
<i class="el-icon-plus"></i>
</el-upload>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="" />
</el-dialog>
</div>
</template>
<script>
import { getBaseUrl } from "@/utils/index";
export default {
props: {
isDisable: {
type: Boolean,
default: false
},
imgList: {
type: Array,
default: []
}
},
data() {
return {
dialogImageUrl: "",
dialogVisible: false,
imgArr: [
],
headers: {
token: localStorage.getItem("token"),
},
actionurl: "#",
accept: '.png,.jpeg'
};
},
created() {
this.actionurl = getBaseUrl("/diagnose/illness/file")
},
watch:{
imgList(newv, oldv) {
this.imgArr = newv;
}
},
methods: {
handleRemove(file, fileList) {
this.imgArr = fileList;
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url;
this.dialogVisible = true;
},
handleExceed(files, fileList) {
this.$message.warning(
`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${
files.length + fileList.length
} 个文件`
);
},
fileUpload(file) {
// const isJPG = file.type === "image/jpeg" || file.type === "image/img";
// if (!isJPG) {
// this.$message.error("请上传只能是 JPG或PNG 格式!");
// return;
// }
// const formData = new FormData();
// formData.append('file', file);
// fetch({
// url: getBaseUrl("/diagnose/illness/file"),
// method: "post",
// data: formData,
// fileHeader: true,
// withCredentials: true,
// })
// .then((res) => {
// this.imgArr.push({
// url: `${res.data}`,
// });
// })
// .catch(() => {});
},
sucess(response, file, fileList) {
this.imgArr = fileList;
},
handleExceed(files, fileList) {
this.$message.warning(
`当前限制选择 15 个文件,本次选择了 ${files.length} 个文件,共选择了 ${
files.length + fileList.length
} 个文件`
);
},
setNewArr() {
let newArr = []
if (this.imgArr && this.imgArr.length) {
this.imgArr.forEach(item => {
if (item.response){
newArr.push(item.response.data)
} else if(item.url && item.from) {
newArr.push(item.url)
}
});
}
return newArr
}
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<div class="music-wrap" v-loading="loading">
<el-upload
class="upload-demo"
:disabled="isDisable"
:before-upload="beforeMusicUpload"
:action="actionurl"
:headers="headers"
:on-remove="handleRemove"
:on-success="sucess"
:file-list="musicArr"
:on-error="errfn"
:before-remove="beforeRemove"
:accept="accept"
>
<el-button size="small" type="primary">点击上传</el-button>
<p slot="tip" class="el-upload__tip">音频格式:mp3</p>
<ul slot="tip" class="el-upload__tip music-box">
<audio
v-for="(item) of musicArr"
:key="item.uid"
class="audio"
controls
:src='musicUrl(item)'
ref="audioWrap"
>您的浏览器不支持mp3播放</audio>
</ul>
</el-upload>
</div>
</template>
<script>
import fetch from "@/utils/fetch";
import { getBaseUrl } from "@/utils/index";
export default {
props: {
isDisable: {
type: Boolean,
default: false
},
musicList: {
type: Array,
default: []
}
},
data() {
return {
dialogImageUrl: "",
dialogVisible: false,
musicArr: [],
actionUrl: '',
headers: {
token: localStorage.getItem("token"),
},
loading: false,
accept: '.mp3,.mpeg'
};
},
created() {
this.actionurl = getBaseUrl("/diagnose/illness/audio/upload");
},
watch:{
musicList(newv, oldv) {
this.musicArr = newv;
}
},
computed: {
},
methods: {
musicUrl(item) {
if (item.url) {
return item.url
}
return item.response.data.domainPath + item.response.data.path
},
beforeRemove() {
this.loading = true
},
handleRemove(file, fileList) {
this.loading = true
this.musicArr = fileList;
let time = setTimeout(() => {
this.loading = false
clearTimeout(time)
},1000)
},
sucess(response, file, fileList) {
this.musicArr = fileList;
this.loading = false
},
errfn(response, file, fileList) {
this.loading = false
},
// 上传mp3
beforeMusicUpload(file) {
// this.loading = true
// if (file.type !== 'audio/mp3' && file.type !== 'audio/mpeg') {
// vm.$message.error("请上传MP3格式文件");
// this.loading = false
// return;
// }
// const formData = new FormData()
// formData.append('file', file)
// fetch({
// url: getBaseUrl("/diagnose/illness/audio/upload"),
// method: "post",
// data: formData,
// fileHeader: true,
// withCredentials: true,
// })
// .then((res) => {
// this.imgArr.push({
// url: `${res.data}`,
// });
// })
// .catch(() => {});
},
setNewArr() {
let newArr = []
if (this.musicArr && this.musicArr.length) {
this.musicArr.forEach(item => {
if (item.response){
newArr.push(item.response.data.domainPath + item.response.data.path)
} else if(item.url && item.from) {
newArr.push(item.url)
}
});
}
return newArr
},
},
};
</script>
<style lang="scss">
.music-wrap {
position: relative;
.wrap {
position: absolute;
left: 90px;
top: 10px;
bottom: 0;
right: 0;
background: #000;
opacity: .3;
}
.audio {
display: block;
height: 40px;
margin-top: 8px;
}
.music-box {
display: inline-block;
overflow: hidden;
}
.el-upload-list__item {
line-height: 40px;
// margin: 20px 0;
}
.el-icon-close {
top: 15px;
}
.el-upload-list {
display: inline-block;
}
}
</style>
\ No newline at end of file
<template>
<div>
<div>
<el-badge is-dot class="item">
{{ item.label }}
</el-badge>
</div>
</div>
</template>
<script>
export default {
name: "timeLeft",
data() {
return {
timer: null,
time:60
};
},
props:['item'],
mounted() {
},
methods: {
down() {
this.timer = setInterval(() => {
this.time--;
if (this.time === 0) {
this.$emit('setItem')
clearInterval(this.timer);
}
}, 1000);
},
},
};
</script>
<style lang="less" scoped>
</style>
<template>
<div class="table">
<el-table
v-loading="loading"
class="search-table"
:data="tData"
@sort-change='sortfunc'
:height="tableHeight"
style="width: 100%"
border
@selection-change="handleSelectionChange"
>
<el-table-column fixed type="selection" width="55"> </el-table-column>
<el-table-column
v-for="item in tableColumn"
:key="item.prop"
:prop="item.prop"
:label="item.label"
:sortable="item.prop=='appointBeginTime'||item.prop=='assistantBeginTime'?'custom':false"
:show-overflow-tooltip="item.showtooltip"
min-width="170"
align="center"
>
<template slot-scope="scope">
<div v-if="scope.column.property == 'appointBeginTime'">
<p>{{ scope.row.appointBeginTime }}</p>
<p>{{ scope.row.appointEndTime }}</p>
</div>
<div v-else-if="scope.column.property == 'assistantBeginTime'">
<p>{{ scope.row.assistantBeginTime }}</p>
<p>{{ scope.row.assistantEndTime }}</p>
</div>
<div v-else-if="scope.column.property == 'receptionBeginTime'">
<p>{{ scope.row.receptionBeginTime }}</p>
<p>{{ scope.row.receptionEndTime }}</p>
</div>
<div v-else>
<p>{{ scope.row[scope.column.property] }}</p>
</div>
</template>
</el-table-column>
<el-table-column
label="操作"
fixed="right"
align="center"
min-width="400"
>
<template slot-scope="scope">
<el-button
type="primary"
size="small"
class="btn"
v-if="showBtn(scope.row, 25)"
@click="witeDiagnose(scope.row)"
>设为待问诊</el-button
>
<el-button
type="primary"
size="small"
class="btn"
v-if="
showBtn(scope.row, 21, 22, 23, 24, 25, 26, 3, 2) && menuType == 1
"
@click="changeRun(scope.row)"
>更换运营</el-button
>
<el-button
type="primary"
size="small"
class="btn"
@click="goDetail(scope.row, false)"
>查看详情</el-button
>
<el-button
type="primary"
size="small"
class="btn"
v-if="
showBtn(scope.row, 2, 21, 22, 23, 24, 25, 26, 3) && menuType == 1
"
@click="cancelRefund(scope.row)"
>取消/退款</el-button
>
<el-button
type="primary"
size="small"
class="btn"
v-if="showBtn(scope.row, 21)"
@click="witeGo(scope.row)"
>设为稍后跟进</el-button
>
<el-button
type="primary"
size="small"
class="btn"
v-if="showBtn(scope.row, 22, 21)"
@click="waitMatchDot(scope.row)"
>设为待匹配医生</el-button
>
<el-button
type="primary"
size="small"
class="btn"
v-if="showBtn(scope.row, 3, 4, 5, 6, 21, 22, 23, 24, 25, 26)"
@click="sendMessage(scope.row)"
>发送消息</el-button
>
<el-button
type="primary"
size="small"
class="btn"
v-if="showBtn(scope.row, 3, 26)"
@click="joinDiagnose(scope.row)"
>加入问诊</el-button
>
<!-- <el-button type="primary" size="small" class="btn" v-if="showBtn(scope.row,2)" @click="matchRun(scope.row)">匹配运营</el-button>-->
<el-button
type="primary"
size="small"
class="btn"
v-if="showBtn(scope.row, 2, 3, 4, 6, 21, 22, 23, 24, 25, 26, 5, 6)"
@click="goDetail(scope.row, true)"
>编辑</el-button
>
<!-- <el-button type="primary" size="small" class="btn" v-if="showBtn(scope.row,21)" @click="waitDiagnose(scope.row)">设为待分诊</el-button>-->
<el-button
type="primary"
size="small"
class="btn"
v-if="showBtn(scope.row, 23)"
@click="waitHzeDot(scope.row)"
>设为待协调医生</el-button
>
<el-button
type="primary"
size="small"
class="btn"
v-if="showBtn(scope.row, 23, 24)"
@click="waitMatchTime(scope.row)"
>设为待确认时间</el-button
>
<el-button
type="primary"
size="small"
class="btn"
v-if="showBtn(scope.row, 3, 25, 26)"
@click="reMatchDot(scope.row,10)"
>重新匹配医生</el-button
>
<el-button
type="primary"
size="small"
class="btn"
v-if="showBtn(scope.row, 3, 25, 26)"
@click="reMatchDot(scope.row,16)"
>重新联系助诊医生</el-button
>
<el-button
type="primary"
size="small"
class="btn"
v-if="showBtn(scope.row, 3, 26)"
@click="changeTime(scope.row)"
>修改时间</el-button
>
<!-- <el-button type="primary" size="small" class="btn" v-if="showBtn(scope.row,26)" @click="call(scope.row)">发起问诊</el-button>-->
<el-button
:type="scope.row.completed?'danger':'primary'"
size="small"
class="btn"
v-if="showBtn(scope.row, 3)"
@click="doneHandle(scope.row)"
>设为已完成</el-button
>
<el-button
type="primary"
size="small"
class="btn"
v-if="showBtn(scope.row, 2)"
@click="setOffice(scope.row)"
>设置科室</el-button
>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<div class="pagination">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageNo"
:page-sizes="[15, 30, 50, 100]"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows"
>
</el-pagination>
</div>
</div>
</template>
<script>
import { TABLE_COLUMN } from "@/utils/constants";
//0 只填写了患者信息(急速问诊才会有的状态),1 初始状态(未支付),2待问诊(待匹配运营)(支付成功待完善)3 问诊中(已完善),4、已问诊 5、取消, 6 已结算
//21 已匹配, 22 待分诊, 23 待匹配接诊医生, 24 待协调医生 25 待设置问诊时间, 26 待问诊
export default {
props: {
menuType: {
type: Number,
default: 1,
},
tData: {
type: Array,
default: [],
},
pageNo: {
type: Number,
default: 1,
},
pageSize: {
type: Number,
default: 20,
},
totalRows: {
type: Number,
default: 0,
},
loading: {
type: Boolean,
default: false,
},
tableHeight: {
type: Number,
default: 500,
},
multipleSelection: {
type: Array,
default: [],
},
},
data() {
return {
tableColumn: TABLE_COLUMN,
};
},
mounted() {},
methods: {
sortfunc(data){
this.$emit("sortfunc", data);
},
showBtn(row, ...arr) {
return arr.includes(row.status);
// return true;
},
// 选择
handleSelectionChange(val) {
this.multipleSelection = val;
this.$emit("update:multipleSelection", this.multipleSelection);
},
//设为待问诊
witeDiagnose(row) {
this.$emit("witeDiagnose", row);
},
//更换运营
changeRun(row) {
this.$emit("changeRun", row);
},
// 查看详情 \编辑
goDetail(row, flag) {
this.$emit("goDetail", row, flag);
},
//取消/退款
cancelRefund(row) {
this.$emit("cancelRefund", row);
},
//设为稍后跟进
witeGo(row) {
this.$emit("witeGo", row);
},
//设为待匹配医生
waitMatchDot(row) {
this.$emit("waitMatchDot", row);
},
//发送消息
sendMessage(row) {
this.$emit("sendMessage", row);
},
//加入问诊
joinDiagnose(row) {
this.$emit("joinDiagnose", row);
},
//匹配运营
// matchRun(row) {
// this.$emit("matchRun", row);
// },
//设为待分诊
// waitDiagnose(row) {
// this.$emit("waitDiagnose", row);
// },
//设为待协调医生
waitHzeDot(row) {
this.$emit("waitHzeDot", row);
},
//设为待确认时间
waitMatchTime(row) {
this.$emit("waitMatchTime", row);
},
//重新匹配医生
reMatchDot(row,type) {
this.$emit("reMatchDot", row,type);
},
//修改时间
changeTime(row) {
this.$emit("changeTime", row);
},
//发起问诊
// call(row) {
// this.$emit("call", row);
// },
//设为已完成
doneHandle(row) {
this.$emit("doneHandle", row);
},
goEdite(row) {
this.$emit("goEdite", row);
},
handleSizeChange(value) {
this.$emit("handleSizeChange", value);
},
handleCurrentChange(value) {
this.$emit("handleCurrentChange", value);
},
setOffice(value) {
this.$emit("setOffice", value);
},
},
};
</script>
<style scoped>
.btn {
margin-top: 5px;
}
</style>
<template>
<div class="table">
<el-table
class="search-table"
:data="tData"
v-loading="loading"
style="width: 100%"
:height="tableHeight"
border
>
<el-table-column prop="diagnoseLogId" label="ID" min-width="100" align="center"></el-table-column>
<el-table-column prop="orderNo" label="订单ID" min-width="170" align="center"></el-table-column>
<el-table-column prop="diagnoseTypeStr" label="预约类型" min-width="150" align="center"></el-table-column>
<el-table-column prop="statusStr" label="状态" min-width="150" align="center"></el-table-column>
<el-table-column prop="crrsName" label="招募人" min-width="170" align="center"></el-table-column>
<el-table-column prop="operateUserName" label="运营人员" min-width="150" align="center"></el-table-column>
<el-table-column prop="patientName" label="患者姓名" min-width="150" align="center"></el-table-column>
<el-table-column prop="idCard" label="证件号" min-width="170" align="center"></el-table-column>
<el-table-column prop="patientMobilePhone" label="患者电话" min-width="150" align="center"></el-table-column>
<el-table-column prop="userName" label="助诊医生" min-width="150" align="center"></el-table-column>
<el-table-column prop="userMobile" label="助诊电话" min-width="170" align="center"></el-table-column>
<el-table-column prop="doctorName" label="接诊医生" min-width="150" align="center"></el-table-column>
<el-table-column prop="doctorMobile" label="接诊电话" min-width="170" align="center"></el-table-column>
<el-table-column prop="userMobile" label="期望时间" min-width="200" align="center">
<template slot-scope="scope">
<p>{{scope.row.userAppointBeginTime}}</p>
<p>{{scope.row.userAppointEndTime}}</p>
</template>
</el-table-column>
<el-table-column prop="userMobile" label="预约时间" min-width="200" align="center">
<template slot-scope="scope">
<p>{{scope.row.appointBeginTime}}</p>
<p>{{scope.row.appointEndTime}}</p>
</template>
</el-table-column>
<el-table-column prop="diagnoseStageStr" label="初/复诊" min-width="150" align="center"></el-table-column>
<el-table-column prop="determineFlagStr" label="是否确诊" min-width="150" align="center"></el-table-column>
<el-table-column prop="diagnoseDisease" label="确诊疾病" min-width="150" align="center"></el-table-column>
<el-table-column prop="illnessDetail" label="病情描述" min-width="200" align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="diagnoseAdvice" label="诊断建议" min-width="200" align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="followFlagStr" label="是否跟进" min-width="200" align="center"></el-table-column>
<el-table-column prop="drugFollow" label="药品跟进" min-width="200" align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="checkFollow" label="检查跟进" min-width="200" align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="otherFollow" label="其他跟进事项" min-width="200" align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="createTypeStr" label="创建方式" min-width="150" align="center"></el-table-column>
<el-table-column prop="appointSourceStr" label="预约来源" min-width="150" align="center"></el-table-column>
<el-table-column prop="createdTime" label="创建时间" min-width="200" align="center"></el-table-column>
<el-table-column prop="operateTime" label="匹配时间" min-width="200" align="center"></el-table-column>
<el-table-column prop="doneTime" label="完成时间" min-width="200" align="center"></el-table-column>
<el-table-column prop="price" label="问诊价格" min-width="150" align="center">
<template slot-scope="scope">
<span>{{scope.row.price | priceFilter}}</span>
</template>
</el-table-column>
<el-table-column prop="payTypeStr" label="支付方式" min-width="150" align="center"></el-table-column>
<el-table-column prop="sexStr" label="性别" min-width="150" align="center"></el-table-column>
<el-table-column prop="maritalStatusStr" label="婚否" min-width="150" align="center"></el-table-column>
<el-table-column prop="age" label="年龄" min-width="150" align="center"></el-table-column>
<el-table-column prop="idCardTypeStr" label="证件类型" min-width="170" align="center"></el-table-column>
<el-table-column prop="userTitle" label="助诊医生职称" min-width="170" align="center"></el-table-column>
<el-table-column prop="userHospital" label="助诊医生所在机构" min-width="170" align="center"></el-table-column>
<el-table-column prop="userDepartment" label="助诊医生所在科室" min-width="170" align="center"></el-table-column>
<el-table-column prop="patientRelationStr" label="与患者关系" min-width="170" align="center"></el-table-column>
<el-table-column prop="doctorTitle" label="接诊医生职称" min-width="170" align="center"></el-table-column>
<el-table-column prop="doctorHospital" label="接诊医生所在机构" min-width="170" align="center"></el-table-column>
<el-table-column prop="doctorDepartment" label="接诊医生所在科室" min-width="170" align="center"></el-table-column>
<el-table-column prop="doctorSourceStr" label="接诊医生来源" min-width="170" align="center"></el-table-column>
<el-table-column prop="serviceFee" label="接诊医生服务费" min-width="150" align="center">
<template slot-scope="scope">
<span>{{scope.row.serviceFee | priceFilter}}</span>
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" min-width="200" align="center" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" fixed="right" align="center" min-width="200">
<template slot-scope="scope">
<!-- 1 初始状态 2待咨询 3 咨询中 4已结束 -->
<div v-if="scope.row.operateUserID">
<el-button v-if="scope.row.status != 4 && scope.row.status != 5" type="primary" size="small" @click="timeHandle(scope.row)" style="margin-top: 10px;">修改时间</el-button>
<el-button v-if="scope.row.status == 3" type="primary" size="small" @click="endDiagnosis(scope.row)" style="margin-top: 10px;">结束</el-button>
</div>
<div v-if="scope.row.operateUserID">
<!-- <el-button v-if="scope.row.status == 3 && scope.row.imStatus == 1 && scope.row.diagnoseType != 3" type="primary" size="small" @click="callAll(scope.row)" style="margin-top: 10px;">呼叫双方</el-button> -->
<!-- <el-button v-if="scope.row.status == 3 && scope.row.imStatus == 2 && scope.row.diagnoseType != 3" type="primary" size="small" @click="jionCommunicate(scope.row)" style="margin-top: 10px;">加入问诊</el-button> -->
<el-button v-if="scope.row.status == 3 && scope.row.diagnoseType != 3 && scope.row.appointBeginTime && scope.row.appointEndTime" type="primary" size="small" @click="jionCommunicate(scope.row)" style="margin-top: 10px;">加入问诊</el-button>
<el-button type="primary" size="small" @click="sendMessage(scope.row)" style="margin-top: 10px;" v-if="!((scope.row.status==2 || scope.row.status==4) && scope.row.createType == 2)">发送消息</el-button>
</div>
<div v-if="!scope.row.operateUserID">
<el-button v-if="scope.row.status != 5" type="primary" size="small" @click="selectBtn(scope.row)">匹配</el-button>
</div>
<el-button v-if="scope.row.status == 2 || scope.row.status == 3" type="primary" size="small" style="margin-top: 10px;" @click="cancelBtn(scope.row)">取消预约</el-button>
<div>
<el-button v-if="scope.row.status != 5" type="primary" size="small" style="margin-top: 10px;" @click="goEditor(scope.row,1)">编辑</el-button>
<el-button type="primary" size="small" style="margin-top: 10px;" @click="goEditor(scope.row,2)">预约详情</el-button>
</div>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<div class="pagination">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageNo"
:page-sizes="[15, 30, 50, 100, 150, 200]"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows">
</el-pagination>
</div>
</div>
</template>
<script>
export default {
props: {
tData: {
type: Array,
default: []
},
pageNo: {
type: Number,
default: 1
},
pageSize: {
type: Number,
default: 20
},
totalRows: {
type: Number,
default: 0
},
loading : {
type: Boolean,
default: false
},
tableHeight: {
type: Number,
default: 500
}
},
data() {
return {
};
},
methods: {
timeHandle(row) {
this.$emit('timeHandle',row)
},
endDiagnosis(row) {
this.$emit('endDiagnosis',row)
},
callAll(row) {
this.$emit('callAll',row)
},
jionCommunicate(row) {
this.$emit('jionCommunicate',row)
},
sendMessage(row) {
this.$emit('sendMessage',row)
},
selectBtn(row) {
this.$emit('selectBtn',row)
},
cancelBtn(row) {
this.$emit('cancelBtn',row)
},
goEditor(row,flag) {
this.$emit('goEditor',row,flag)
},
handleSizeChange(value) {
this.$emit('handleSizeChange',value)
},
handleCurrentChange(value) {
this.$emit('handleCurrentChange',value)
}
},
};
</script>
<style>
</style>
<template>
<div>
{{ time }}秒后可重新呼叫
</div>
</template>
<script>
export default {
name: "timeLeft",
data() {
return {
timer: null,
time:60
};
},
props:['timeleft'],
mounted() {
clearInterval(this.timer);
if (this.timeleft > 0) {
this.time=this.timeleft
this.down();
}
},
methods: {
down() {
this.timer = setInterval(() => {
this.time--;
if (this.time === 0) {
this.$emit('setItem')
clearInterval(this.timer);
}
}, 1000);
},
},
};
</script>
<style lang="less" scoped>
</style>
...@@ -4,16 +4,25 @@ import VueRouter from 'vue-router' ...@@ -4,16 +4,25 @@ 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';
import TRTC from 'trtc-js-sdk';
import TIM from 'tim-js-sdk';
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 +31,6 @@ for(let key in vueFilters) { ...@@ -22,11 +31,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({
...@@ -45,6 +49,11 @@ const router = new VueRouter({ ...@@ -45,6 +49,11 @@ const router = new VueRouter({
} }
}) })
Vue.use(TRTC)
window.TRTC = TRTC
Vue.use(TIM)
window.TIM = TIM
// 加入混合 // 加入混合
Vue.mixin({ Vue.mixin({
...mixins ...mixins
......
/**
* 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
/**
* Swiper 3.4.1
* Most modern mobile touch slider and framework with hardware accelerated transitions
*
* http://www.idangero.us/swiper/
*
* Copyright 2016, Vladimir Kharlampidi
* The iDangero.us
* http://www.idangero.us/
*
* Licensed under MIT
*
* Released on: December 13, 2016
*/
!function(){"use strict";function e(e){e.fn.swiper=function(a){var s;return e(this).each(function(){var e=new t(this,a);s||(s=e)}),s}}var a,t=function(e,i){function r(e){return Math.floor(e)}function n(){var e=b.params.autoplay,a=b.slides.eq(b.activeIndex);a.attr("data-swiper-autoplay")&&(e=a.attr("data-swiper-autoplay")||b.params.autoplay),b.autoplayTimeoutId=setTimeout(function(){b.params.loop?(b.fixLoop(),b._slideNext(),b.emit("onAutoplay",b)):b.isEnd?i.autoplayStopOnLast?b.stopAutoplay():(b._slideTo(0),b.emit("onAutoplay",b)):(b._slideNext(),b.emit("onAutoplay",b))},e)}function o(e,t){var s=a(e.target);if(!s.is(t))if("string"==typeof t)s=s.parents(t);else if(t.nodeType){var i;return s.parents().each(function(e,a){a===t&&(i=t)}),i?t:void 0}if(0!==s.length)return s[0]}function l(e,a){a=a||{};var t=window.MutationObserver||window.WebkitMutationObserver,s=new t(function(e){e.forEach(function(e){b.onResize(!0),b.emit("onObserverUpdate",b,e)})});s.observe(e,{attributes:"undefined"==typeof a.attributes||a.attributes,childList:"undefined"==typeof a.childList||a.childList,characterData:"undefined"==typeof a.characterData||a.characterData}),b.observers.push(s)}function p(e){e.originalEvent&&(e=e.originalEvent);var a=e.keyCode||e.charCode;if(!b.params.allowSwipeToNext&&(b.isHorizontal()&&39===a||!b.isHorizontal()&&40===a))return!1;if(!b.params.allowSwipeToPrev&&(b.isHorizontal()&&37===a||!b.isHorizontal()&&38===a))return!1;if(!(e.shiftKey||e.altKey||e.ctrlKey||e.metaKey||document.activeElement&&document.activeElement.nodeName&&("input"===document.activeElement.nodeName.toLowerCase()||"textarea"===document.activeElement.nodeName.toLowerCase()))){if(37===a||39===a||38===a||40===a){var t=!1;if(b.container.parents("."+b.params.slideClass).length>0&&0===b.container.parents("."+b.params.slideActiveClass).length)return;var s={left:window.pageXOffset,top:window.pageYOffset},i=window.innerWidth,r=window.innerHeight,n=b.container.offset();b.rtl&&(n.left=n.left-b.container[0].scrollLeft);for(var o=[[n.left,n.top],[n.left+b.width,n.top],[n.left,n.top+b.height],[n.left+b.width,n.top+b.height]],l=0;l<o.length;l++){var p=o[l];p[0]>=s.left&&p[0]<=s.left+i&&p[1]>=s.top&&p[1]<=s.top+r&&(t=!0)}if(!t)return}b.isHorizontal()?(37!==a&&39!==a||(e.preventDefault?e.preventDefault():e.returnValue=!1),(39===a&&!b.rtl||37===a&&b.rtl)&&b.slideNext(),(37===a&&!b.rtl||39===a&&b.rtl)&&b.slidePrev()):(38!==a&&40!==a||(e.preventDefault?e.preventDefault():e.returnValue=!1),40===a&&b.slideNext(),38===a&&b.slidePrev())}}function d(){var e="onwheel",a=e in document;if(!a){var t=document.createElement("div");t.setAttribute(e,"return;"),a="function"==typeof t[e]}return!a&&document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0&&(a=document.implementation.hasFeature("Events.wheel","3.0")),a}function u(e){e.originalEvent&&(e=e.originalEvent);var a=0,t=b.rtl?-1:1,s=c(e);if(b.params.mousewheelForceToAxis)if(b.isHorizontal()){if(!(Math.abs(s.pixelX)>Math.abs(s.pixelY)))return;a=s.pixelX*t}else{if(!(Math.abs(s.pixelY)>Math.abs(s.pixelX)))return;a=s.pixelY}else a=Math.abs(s.pixelX)>Math.abs(s.pixelY)?-s.pixelX*t:-s.pixelY;if(0!==a){if(b.params.mousewheelInvert&&(a=-a),b.params.freeMode){var i=b.getWrapperTranslate()+a*b.params.mousewheelSensitivity,r=b.isBeginning,n=b.isEnd;if(i>=b.minTranslate()&&(i=b.minTranslate()),i<=b.maxTranslate()&&(i=b.maxTranslate()),b.setWrapperTransition(0),b.setWrapperTranslate(i),b.updateProgress(),b.updateActiveIndex(),(!r&&b.isBeginning||!n&&b.isEnd)&&b.updateClasses(),b.params.freeModeSticky?(clearTimeout(b.mousewheel.timeout),b.mousewheel.timeout=setTimeout(function(){b.slideReset()},300)):b.params.lazyLoading&&b.lazy&&b.lazy.load(),b.emit("onScroll",b,e),b.params.autoplay&&b.params.autoplayDisableOnInteraction&&b.stopAutoplay(),0===i||i===b.maxTranslate())return}else{if((new window.Date).getTime()-b.mousewheel.lastScrollTime>60)if(a<0)if(b.isEnd&&!b.params.loop||b.animating){if(b.params.mousewheelReleaseOnEdges)return!0}else b.slideNext(),b.emit("onScroll",b,e);else if(b.isBeginning&&!b.params.loop||b.animating){if(b.params.mousewheelReleaseOnEdges)return!0}else b.slidePrev(),b.emit("onScroll",b,e);b.mousewheel.lastScrollTime=(new window.Date).getTime()}return e.preventDefault?e.preventDefault():e.returnValue=!1,!1}}function c(e){var a=10,t=40,s=800,i=0,r=0,n=0,o=0;return"detail"in e&&(r=e.detail),"wheelDelta"in e&&(r=-e.wheelDelta/120),"wheelDeltaY"in e&&(r=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(i=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(i=r,r=0),n=i*a,o=r*a,"deltaY"in e&&(o=e.deltaY),"deltaX"in e&&(n=e.deltaX),(n||o)&&e.deltaMode&&(1===e.deltaMode?(n*=t,o*=t):(n*=s,o*=s)),n&&!i&&(i=n<1?-1:1),o&&!r&&(r=o<1?-1:1),{spinX:i,spinY:r,pixelX:n,pixelY:o}}function m(e,t){e=a(e);var s,i,r,n=b.rtl?-1:1;s=e.attr("data-swiper-parallax")||"0",i=e.attr("data-swiper-parallax-x"),r=e.attr("data-swiper-parallax-y"),i||r?(i=i||"0",r=r||"0"):b.isHorizontal()?(i=s,r="0"):(r=s,i="0"),i=i.indexOf("%")>=0?parseInt(i,10)*t*n+"%":i*t*n+"px",r=r.indexOf("%")>=0?parseInt(r,10)*t+"%":r*t+"px",e.transform("translate3d("+i+", "+r+",0px)")}function h(e){return 0!==e.indexOf("on")&&(e=e[0]!==e[0].toUpperCase()?"on"+e[0].toUpperCase()+e.substring(1):"on"+e),e}if(!(this instanceof t))return new t(e,i);var g={direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,autoplay:!1,autoplayDisableOnInteraction:!0,autoplayStopOnLast:!1,iOSEdgeSwipeDetection:!1,iOSEdgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",coverflow:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:!0},flip:{slideShadows:!0,limitRotation:!0},cube:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94},fade:{crossFade:!1},parallax:!1,zoom:!1,zoomMax:3,zoomMin:1,zoomToggle:!0,scrollbar:null,scrollbarHide:!0,scrollbarDraggable:!1,scrollbarSnapOnRelease:!1,keyboardControl:!1,mousewheelControl:!1,mousewheelReleaseOnEdges:!1,mousewheelInvert:!1,mousewheelForceToAxis:!1,mousewheelSensitivity:1,mousewheelEventsTarged:"container",hashnav:!1,hashnavWatchState:!1,history:!1,replaceState:!1,breakpoints:void 0,spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,centeredSlides:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,onlyExternal:!1,threshold:0,touchMoveStopPropagation:!0,touchReleaseOnEdges:!1,uniqueNavElements:!0,pagination:null,paginationElement:"span",paginationClickable:!1,paginationHide:!1,paginationBulletRender:null,paginationProgressRender:null,paginationFractionRender:null,paginationCustomRender:null,paginationType:"bullets",resistance:!0,resistanceRatio:.85,nextButton:null,prevButton:null,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,lazyLoading:!1,lazyLoadingInPrevNext:!1,lazyLoadingInPrevNextAmount:1,lazyLoadingOnTransitionStart:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,control:void 0,controlInverse:!1,controlBy:"slide",normalizeSlideIndex:!0,allowSwipeToPrev:!0,allowSwipeToNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",passiveListeners:!0,containerModifierClass:"swiper-container-",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",bulletClass:"swiper-pagination-bullet",bulletActiveClass:"swiper-pagination-bullet-active",buttonDisabledClass:"swiper-button-disabled",paginationCurrentClass:"swiper-pagination-current",paginationTotalClass:"swiper-pagination-total",paginationHiddenClass:"swiper-pagination-hidden",paginationProgressbarClass:"swiper-pagination-progressbar",paginationClickableClass:"swiper-pagination-clickable",paginationModifierClass:"swiper-pagination-",lazyLoadingClass:"swiper-lazy",lazyStatusLoadingClass:"swiper-lazy-loading",lazyStatusLoadedClass:"swiper-lazy-loaded",lazyPreloaderClass:"swiper-lazy-preloader",notificationClass:"swiper-notification",preloaderClass:"preloader",zoomContainerClass:"swiper-zoom-container",observer:!1,observeParents:!1,a11y:!1,prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",runCallbacksOnInit:!0},f=i&&i.virtualTranslate;i=i||{};var v={};for(var w in i)if("object"!=typeof i[w]||null===i[w]||(i[w].nodeType||i[w]===window||i[w]===document||"undefined"!=typeof s&&i[w]instanceof s||"undefined"!=typeof jQuery&&i[w]instanceof jQuery))v[w]=i[w];else{v[w]={};for(var y in i[w])v[w][y]=i[w][y]}for(var x in g)if("undefined"==typeof i[x])i[x]=g[x];else if("object"==typeof i[x])for(var T in g[x])"undefined"==typeof i[x][T]&&(i[x][T]=g[x][T]);var b=this;if(b.params=i,b.originalParams=v,b.classNames=[],"undefined"!=typeof a&&"undefined"!=typeof s&&(a=s),("undefined"!=typeof a||(a="undefined"==typeof s?window.Dom7||window.Zepto||window.jQuery:s))&&(b.$=a,b.currentBreakpoint=void 0,b.getActiveBreakpoint=function(){if(!b.params.breakpoints)return!1;var e,a=!1,t=[];for(e in b.params.breakpoints)b.params.breakpoints.hasOwnProperty(e)&&t.push(e);t.sort(function(e,a){return parseInt(e,10)>parseInt(a,10)});for(var s=0;s<t.length;s++)e=t[s],e>=window.innerWidth&&!a&&(a=e);return a||"max"},b.setBreakpoint=function(){var e=b.getActiveBreakpoint();if(e&&b.currentBreakpoint!==e){var a=e in b.params.breakpoints?b.params.breakpoints[e]:b.originalParams,t=b.params.loop&&a.slidesPerView!==b.params.slidesPerView;for(var s in a)b.params[s]=a[s];b.currentBreakpoint=e,t&&b.destroyLoop&&b.reLoop(!0)}},b.params.breakpoints&&b.setBreakpoint(),b.container=a(e),0!==b.container.length)){if(b.container.length>1){var S=[];return b.container.each(function(){S.push(new t(this,i))}),S}b.container[0].swiper=b,b.container.data("swiper",b),b.classNames.push(b.params.containerModifierClass+b.params.direction),b.params.freeMode&&b.classNames.push(b.params.containerModifierClass+"free-mode"),b.support.flexbox||(b.classNames.push(b.params.containerModifierClass+"no-flexbox"),b.params.slidesPerColumn=1),b.params.autoHeight&&b.classNames.push(b.params.containerModifierClass+"autoheight"),(b.params.parallax||b.params.watchSlidesVisibility)&&(b.params.watchSlidesProgress=!0),b.params.touchReleaseOnEdges&&(b.params.resistanceRatio=0),["cube","coverflow","flip"].indexOf(b.params.effect)>=0&&(b.support.transforms3d?(b.params.watchSlidesProgress=!0,b.classNames.push(b.params.containerModifierClass+"3d")):b.params.effect="slide"),"slide"!==b.params.effect&&b.classNames.push(b.params.containerModifierClass+b.params.effect),"cube"===b.params.effect&&(b.params.resistanceRatio=0,b.params.slidesPerView=1,b.params.slidesPerColumn=1,b.params.slidesPerGroup=1,b.params.centeredSlides=!1,b.params.spaceBetween=0,b.params.virtualTranslate=!0,b.params.setWrapperSize=!1),"fade"!==b.params.effect&&"flip"!==b.params.effect||(b.params.slidesPerView=1,b.params.slidesPerColumn=1,b.params.slidesPerGroup=1,b.params.watchSlidesProgress=!0,b.params.spaceBetween=0,b.params.setWrapperSize=!1,"undefined"==typeof f&&(b.params.virtualTranslate=!0)),b.params.grabCursor&&b.support.touch&&(b.params.grabCursor=!1),b.wrapper=b.container.children("."+b.params.wrapperClass),b.params.pagination&&(b.paginationContainer=a(b.params.pagination),b.params.uniqueNavElements&&"string"==typeof b.params.pagination&&b.paginationContainer.length>1&&1===b.container.find(b.params.pagination).length&&(b.paginationContainer=b.container.find(b.params.pagination)),"bullets"===b.params.paginationType&&b.params.paginationClickable?b.paginationContainer.addClass(b.params.paginationModifierClass+"clickable"):b.params.paginationClickable=!1,b.paginationContainer.addClass(b.params.paginationModifierClass+b.params.paginationType)),(b.params.nextButton||b.params.prevButton)&&(b.params.nextButton&&(b.nextButton=a(b.params.nextButton),b.params.uniqueNavElements&&"string"==typeof b.params.nextButton&&b.nextButton.length>1&&1===b.container.find(b.params.nextButton).length&&(b.nextButton=b.container.find(b.params.nextButton))),b.params.prevButton&&(b.prevButton=a(b.params.prevButton),b.params.uniqueNavElements&&"string"==typeof b.params.prevButton&&b.prevButton.length>1&&1===b.container.find(b.params.prevButton).length&&(b.prevButton=b.container.find(b.params.prevButton)))),b.isHorizontal=function(){return"horizontal"===b.params.direction},b.rtl=b.isHorizontal()&&("rtl"===b.container[0].dir.toLowerCase()||"rtl"===b.container.css("direction")),b.rtl&&b.classNames.push(b.params.containerModifierClass+"rtl"),b.rtl&&(b.wrongRTL="-webkit-box"===b.wrapper.css("display")),b.params.slidesPerColumn>1&&b.classNames.push(b.params.containerModifierClass+"multirow"),b.device.android&&b.classNames.push(b.params.containerModifierClass+"android"),b.container.addClass(b.classNames.join(" ")),b.translate=0,b.progress=0,b.velocity=0,b.lockSwipeToNext=function(){b.params.allowSwipeToNext=!1,b.params.allowSwipeToPrev===!1&&b.params.grabCursor&&b.unsetGrabCursor()},b.lockSwipeToPrev=function(){b.params.allowSwipeToPrev=!1,b.params.allowSwipeToNext===!1&&b.params.grabCursor&&b.unsetGrabCursor()},b.lockSwipes=function(){b.params.allowSwipeToNext=b.params.allowSwipeToPrev=!1,b.params.grabCursor&&b.unsetGrabCursor()},b.unlockSwipeToNext=function(){b.params.allowSwipeToNext=!0,b.params.allowSwipeToPrev===!0&&b.params.grabCursor&&b.setGrabCursor()},b.unlockSwipeToPrev=function(){b.params.allowSwipeToPrev=!0,b.params.allowSwipeToNext===!0&&b.params.grabCursor&&b.setGrabCursor()},b.unlockSwipes=function(){b.params.allowSwipeToNext=b.params.allowSwipeToPrev=!0,b.params.grabCursor&&b.setGrabCursor()},b.setGrabCursor=function(e){b.container[0].style.cursor="move",b.container[0].style.cursor=e?"-webkit-grabbing":"-webkit-grab",b.container[0].style.cursor=e?"-moz-grabbin":"-moz-grab",b.container[0].style.cursor=e?"grabbing":"grab"},b.unsetGrabCursor=function(){b.container[0].style.cursor=""},b.params.grabCursor&&b.setGrabCursor(),b.imagesToLoad=[],b.imagesLoaded=0,b.loadImage=function(e,a,t,s,i,r){function n(){r&&r()}var o;e.complete&&i?n():a?(o=new window.Image,o.onload=n,o.onerror=n,s&&(o.sizes=s),t&&(o.srcset=t),a&&(o.src=a)):n()},b.preloadImages=function(){function e(){"undefined"!=typeof b&&null!==b&&b&&(void 0!==b.imagesLoaded&&b.imagesLoaded++,b.imagesLoaded===b.imagesToLoad.length&&(b.params.updateOnImagesReady&&b.update(),b.emit("onImagesReady",b)))}b.imagesToLoad=b.container.find("img");for(var a=0;a<b.imagesToLoad.length;a++)b.loadImage(b.imagesToLoad[a],b.imagesToLoad[a].currentSrc||b.imagesToLoad[a].getAttribute("src"),b.imagesToLoad[a].srcset||b.imagesToLoad[a].getAttribute("srcset"),b.imagesToLoad[a].sizes||b.imagesToLoad[a].getAttribute("sizes"),!0,e)},b.autoplayTimeoutId=void 0,b.autoplaying=!1,b.autoplayPaused=!1,b.startAutoplay=function(){return"undefined"==typeof b.autoplayTimeoutId&&(!!b.params.autoplay&&(!b.autoplaying&&(b.autoplaying=!0,b.emit("onAutoplayStart",b),void n())))},b.stopAutoplay=function(e){b.autoplayTimeoutId&&(b.autoplayTimeoutId&&clearTimeout(b.autoplayTimeoutId),b.autoplaying=!1,b.autoplayTimeoutId=void 0,b.emit("onAutoplayStop",b))},b.pauseAutoplay=function(e){b.autoplayPaused||(b.autoplayTimeoutId&&clearTimeout(b.autoplayTimeoutId),b.autoplayPaused=!0,0===e?(b.autoplayPaused=!1,n()):b.wrapper.transitionEnd(function(){b&&(b.autoplayPaused=!1,b.autoplaying?n():b.stopAutoplay())}))},b.minTranslate=function(){return-b.snapGrid[0]},b.maxTranslate=function(){return-b.snapGrid[b.snapGrid.length-1]},b.updateAutoHeight=function(){var e,a=[],t=0;if("auto"!==b.params.slidesPerView&&b.params.slidesPerView>1)for(e=0;e<Math.ceil(b.params.slidesPerView);e++){var s=b.activeIndex+e;if(s>b.slides.length)break;a.push(b.slides.eq(s)[0])}else a.push(b.slides.eq(b.activeIndex)[0]);for(e=0;e<a.length;e++)if("undefined"!=typeof a[e]){var i=a[e].offsetHeight;t=i>t?i:t}t&&b.wrapper.css("height",t+"px")},b.updateContainerSize=function(){var e,a;e="undefined"!=typeof b.params.width?b.params.width:b.container[0].clientWidth,a="undefined"!=typeof b.params.height?b.params.height:b.container[0].clientHeight,0===e&&b.isHorizontal()||0===a&&!b.isHorizontal()||(e=e-parseInt(b.container.css("padding-left"),10)-parseInt(b.container.css("padding-right"),10),a=a-parseInt(b.container.css("padding-top"),10)-parseInt(b.container.css("padding-bottom"),10),b.width=e,b.height=a,b.size=b.isHorizontal()?b.width:b.height)},b.updateSlidesSize=function(){b.slides=b.wrapper.children("."+b.params.slideClass),b.snapGrid=[],b.slidesGrid=[],b.slidesSizesGrid=[];var e,a=b.params.spaceBetween,t=-b.params.slidesOffsetBefore,s=0,i=0;if("undefined"!=typeof b.size){"string"==typeof a&&a.indexOf("%")>=0&&(a=parseFloat(a.replace("%",""))/100*b.size),b.virtualSize=-a,b.rtl?b.slides.css({marginLeft:"",marginTop:""}):b.slides.css({marginRight:"",marginBottom:""});var n;b.params.slidesPerColumn>1&&(n=Math.floor(b.slides.length/b.params.slidesPerColumn)===b.slides.length/b.params.slidesPerColumn?b.slides.length:Math.ceil(b.slides.length/b.params.slidesPerColumn)*b.params.slidesPerColumn,"auto"!==b.params.slidesPerView&&"row"===b.params.slidesPerColumnFill&&(n=Math.max(n,b.params.slidesPerView*b.params.slidesPerColumn)));var o,l=b.params.slidesPerColumn,p=n/l,d=p-(b.params.slidesPerColumn*p-b.slides.length);for(e=0;e<b.slides.length;e++){o=0;var u=b.slides.eq(e);if(b.params.slidesPerColumn>1){var c,m,h;"column"===b.params.slidesPerColumnFill?(m=Math.floor(e/l),h=e-m*l,(m>d||m===d&&h===l-1)&&++h>=l&&(h=0,m++),c=m+h*n/l,u.css({"-webkit-box-ordinal-group":c,"-moz-box-ordinal-group":c,"-ms-flex-order":c,"-webkit-order":c,order:c})):(h=Math.floor(e/p),m=e-h*p),u.css("margin-"+(b.isHorizontal()?"top":"left"),0!==h&&b.params.spaceBetween&&b.params.spaceBetween+"px").attr("data-swiper-column",m).attr("data-swiper-row",h)}"none"!==u.css("display")&&("auto"===b.params.slidesPerView?(o=b.isHorizontal()?u.outerWidth(!0):u.outerHeight(!0),b.params.roundLengths&&(o=r(o))):(o=(b.size-(b.params.slidesPerView-1)*a)/b.params.slidesPerView,b.params.roundLengths&&(o=r(o)),b.isHorizontal()?b.slides[e].style.width=o+"px":b.slides[e].style.height=o+"px"),b.slides[e].swiperSlideSize=o,b.slidesSizesGrid.push(o),b.params.centeredSlides?(t=t+o/2+s/2+a,0===e&&(t=t-b.size/2-a),Math.abs(t)<.001&&(t=0),i%b.params.slidesPerGroup===0&&b.snapGrid.push(t),b.slidesGrid.push(t)):(i%b.params.slidesPerGroup===0&&b.snapGrid.push(t),b.slidesGrid.push(t),t=t+o+a),b.virtualSize+=o+a,s=o,i++)}b.virtualSize=Math.max(b.virtualSize,b.size)+b.params.slidesOffsetAfter;var g;if(b.rtl&&b.wrongRTL&&("slide"===b.params.effect||"coverflow"===b.params.effect)&&b.wrapper.css({width:b.virtualSize+b.params.spaceBetween+"px"}),b.support.flexbox&&!b.params.setWrapperSize||(b.isHorizontal()?b.wrapper.css({width:b.virtualSize+b.params.spaceBetween+"px"}):b.wrapper.css({height:b.virtualSize+b.params.spaceBetween+"px"})),b.params.slidesPerColumn>1&&(b.virtualSize=(o+b.params.spaceBetween)*n,b.virtualSize=Math.ceil(b.virtualSize/b.params.slidesPerColumn)-b.params.spaceBetween,b.isHorizontal()?b.wrapper.css({width:b.virtualSize+b.params.spaceBetween+"px"}):b.wrapper.css({height:b.virtualSize+b.params.spaceBetween+"px"}),b.params.centeredSlides)){for(g=[],e=0;e<b.snapGrid.length;e++)b.snapGrid[e]<b.virtualSize+b.snapGrid[0]&&g.push(b.snapGrid[e]);b.snapGrid=g}if(!b.params.centeredSlides){for(g=[],e=0;e<b.snapGrid.length;e++)b.snapGrid[e]<=b.virtualSize-b.size&&g.push(b.snapGrid[e]);b.snapGrid=g,Math.floor(b.virtualSize-b.size)-Math.floor(b.snapGrid[b.snapGrid.length-1])>1&&b.snapGrid.push(b.virtualSize-b.size)}0===b.snapGrid.length&&(b.snapGrid=[0]),0!==b.params.spaceBetween&&(b.isHorizontal()?b.rtl?b.slides.css({marginLeft:a+"px"}):b.slides.css({marginRight:a+"px"}):b.slides.css({marginBottom:a+"px"})),b.params.watchSlidesProgress&&b.updateSlidesOffset()}},b.updateSlidesOffset=function(){for(var e=0;e<b.slides.length;e++)b.slides[e].swiperSlideOffset=b.isHorizontal()?b.slides[e].offsetLeft:b.slides[e].offsetTop},b.currentSlidesPerView=function(){var e,a,t=1;if(b.params.centeredSlides){var s,i=b.slides[b.activeIndex].swiperSlideSize;for(e=b.activeIndex+1;e<b.slides.length;e++)b.slides[e]&&!s&&(i+=b.slides[e].swiperSlideSize,t++,i>b.size&&(s=!0));for(a=b.activeIndex-1;a>=0;a--)b.slides[a]&&!s&&(i+=b.slides[a].swiperSlideSize,t++,i>b.size&&(s=!0))}else for(e=b.activeIndex+1;e<b.slides.length;e++)b.slidesGrid[e]-b.slidesGrid[b.activeIndex]<b.size&&t++;return t},b.updateSlidesProgress=function(e){if("undefined"==typeof e&&(e=b.translate||0),0!==b.slides.length){"undefined"==typeof b.slides[0].swiperSlideOffset&&b.updateSlidesOffset();var a=-e;b.rtl&&(a=e),b.slides.removeClass(b.params.slideVisibleClass);for(var t=0;t<b.slides.length;t++){var s=b.slides[t],i=(a+(b.params.centeredSlides?b.minTranslate():0)-s.swiperSlideOffset)/(s.swiperSlideSize+b.params.spaceBetween);if(b.params.watchSlidesVisibility){var r=-(a-s.swiperSlideOffset),n=r+b.slidesSizesGrid[t],o=r>=0&&r<b.size||n>0&&n<=b.size||r<=0&&n>=b.size;o&&b.slides.eq(t).addClass(b.params.slideVisibleClass)}s.progress=b.rtl?-i:i}}},b.updateProgress=function(e){"undefined"==typeof e&&(e=b.translate||0);var a=b.maxTranslate()-b.minTranslate(),t=b.isBeginning,s=b.isEnd;0===a?(b.progress=0,b.isBeginning=b.isEnd=!0):(b.progress=(e-b.minTranslate())/a,b.isBeginning=b.progress<=0,b.isEnd=b.progress>=1),b.isBeginning&&!t&&b.emit("onReachBeginning",b),b.isEnd&&!s&&b.emit("onReachEnd",b),b.params.watchSlidesProgress&&b.updateSlidesProgress(e),b.emit("onProgress",b,b.progress)},b.updateActiveIndex=function(){var e,a,t,s=b.rtl?b.translate:-b.translate;for(a=0;a<b.slidesGrid.length;a++)"undefined"!=typeof b.slidesGrid[a+1]?s>=b.slidesGrid[a]&&s<b.slidesGrid[a+1]-(b.slidesGrid[a+1]-b.slidesGrid[a])/2?e=a:s>=b.slidesGrid[a]&&s<b.slidesGrid[a+1]&&(e=a+1):s>=b.slidesGrid[a]&&(e=a);b.params.normalizeSlideIndex&&(e<0||"undefined"==typeof e)&&(e=0),t=Math.floor(e/b.params.slidesPerGroup),t>=b.snapGrid.length&&(t=b.snapGrid.length-1),e!==b.activeIndex&&(b.snapIndex=t,b.previousIndex=b.activeIndex,b.activeIndex=e,b.updateClasses(),b.updateRealIndex())},b.updateRealIndex=function(){b.realIndex=parseInt(b.slides.eq(b.activeIndex).attr("data-swiper-slide-index")||b.activeIndex,10)},b.updateClasses=function(){b.slides.removeClass(b.params.slideActiveClass+" "+b.params.slideNextClass+" "+b.params.slidePrevClass+" "+b.params.slideDuplicateActiveClass+" "+b.params.slideDuplicateNextClass+" "+b.params.slideDuplicatePrevClass);var e=b.slides.eq(b.activeIndex);e.addClass(b.params.slideActiveClass),i.loop&&(e.hasClass(b.params.slideDuplicateClass)?b.wrapper.children("."+b.params.slideClass+":not(."+b.params.slideDuplicateClass+')[data-swiper-slide-index="'+b.realIndex+'"]').addClass(b.params.slideDuplicateActiveClass):b.wrapper.children("."+b.params.slideClass+"."+b.params.slideDuplicateClass+'[data-swiper-slide-index="'+b.realIndex+'"]').addClass(b.params.slideDuplicateActiveClass));var t=e.next("."+b.params.slideClass).addClass(b.params.slideNextClass);b.params.loop&&0===t.length&&(t=b.slides.eq(0),t.addClass(b.params.slideNextClass));var s=e.prev("."+b.params.slideClass).addClass(b.params.slidePrevClass);if(b.params.loop&&0===s.length&&(s=b.slides.eq(-1),s.addClass(b.params.slidePrevClass)),i.loop&&(t.hasClass(b.params.slideDuplicateClass)?b.wrapper.children("."+b.params.slideClass+":not(."+b.params.slideDuplicateClass+')[data-swiper-slide-index="'+t.attr("data-swiper-slide-index")+'"]').addClass(b.params.slideDuplicateNextClass):b.wrapper.children("."+b.params.slideClass+"."+b.params.slideDuplicateClass+'[data-swiper-slide-index="'+t.attr("data-swiper-slide-index")+'"]').addClass(b.params.slideDuplicateNextClass),s.hasClass(b.params.slideDuplicateClass)?b.wrapper.children("."+b.params.slideClass+":not(."+b.params.slideDuplicateClass+')[data-swiper-slide-index="'+s.attr("data-swiper-slide-index")+'"]').addClass(b.params.slideDuplicatePrevClass):b.wrapper.children("."+b.params.slideClass+"."+b.params.slideDuplicateClass+'[data-swiper-slide-index="'+s.attr("data-swiper-slide-index")+'"]').addClass(b.params.slideDuplicatePrevClass)),b.paginationContainer&&b.paginationContainer.length>0){var r,n=b.params.loop?Math.ceil((b.slides.length-2*b.loopedSlides)/b.params.slidesPerGroup):b.snapGrid.length;if(b.params.loop?(r=Math.ceil((b.activeIndex-b.loopedSlides)/b.params.slidesPerGroup),r>b.slides.length-1-2*b.loopedSlides&&(r-=b.slides.length-2*b.loopedSlides),r>n-1&&(r-=n),r<0&&"bullets"!==b.params.paginationType&&(r=n+r)):r="undefined"!=typeof b.snapIndex?b.snapIndex:b.activeIndex||0,"bullets"===b.params.paginationType&&b.bullets&&b.bullets.length>0&&(b.bullets.removeClass(b.params.bulletActiveClass),b.paginationContainer.length>1?b.bullets.each(function(){a(this).index()===r&&a(this).addClass(b.params.bulletActiveClass)}):b.bullets.eq(r).addClass(b.params.bulletActiveClass)),"fraction"===b.params.paginationType&&(b.paginationContainer.find("."+b.params.paginationCurrentClass).text(r+1),b.paginationContainer.find("."+b.params.paginationTotalClass).text(n)),"progress"===b.params.paginationType){var o=(r+1)/n,l=o,p=1;b.isHorizontal()||(p=o,l=1),b.paginationContainer.find("."+b.params.paginationProgressbarClass).transform("translate3d(0,0,0) scaleX("+l+") scaleY("+p+")").transition(b.params.speed)}"custom"===b.params.paginationType&&b.params.paginationCustomRender&&(b.paginationContainer.html(b.params.paginationCustomRender(b,r+1,n)),b.emit("onPaginationRendered",b,b.paginationContainer[0]))}b.params.loop||(b.params.prevButton&&b.prevButton&&b.prevButton.length>0&&(b.isBeginning?(b.prevButton.addClass(b.params.buttonDisabledClass),b.params.a11y&&b.a11y&&b.a11y.disable(b.prevButton)):(b.prevButton.removeClass(b.params.buttonDisabledClass),b.params.a11y&&b.a11y&&b.a11y.enable(b.prevButton))),b.params.nextButton&&b.nextButton&&b.nextButton.length>0&&(b.isEnd?(b.nextButton.addClass(b.params.buttonDisabledClass),b.params.a11y&&b.a11y&&b.a11y.disable(b.nextButton)):(b.nextButton.removeClass(b.params.buttonDisabledClass),b.params.a11y&&b.a11y&&b.a11y.enable(b.nextButton))))},b.updatePagination=function(){if(b.params.pagination&&b.paginationContainer&&b.paginationContainer.length>0){var e="";if("bullets"===b.params.paginationType){for(var a=b.params.loop?Math.ceil((b.slides.length-2*b.loopedSlides)/b.params.slidesPerGroup):b.snapGrid.length,t=0;t<a;t++)e+=b.params.paginationBulletRender?b.params.paginationBulletRender(b,t,b.params.bulletClass):"<"+b.params.paginationElement+' class="'+b.params.bulletClass+'"></'+b.params.paginationElement+">";b.paginationContainer.html(e),b.bullets=b.paginationContainer.find("."+b.params.bulletClass),b.params.paginationClickable&&b.params.a11y&&b.a11y&&b.a11y.initPagination()}"fraction"===b.params.paginationType&&(e=b.params.paginationFractionRender?b.params.paginationFractionRender(b,b.params.paginationCurrentClass,b.params.paginationTotalClass):'<span class="'+b.params.paginationCurrentClass+'"></span> / <span class="'+b.params.paginationTotalClass+'"></span>',b.paginationContainer.html(e)),"progress"===b.params.paginationType&&(e=b.params.paginationProgressRender?b.params.paginationProgressRender(b,b.params.paginationProgressbarClass):'<span class="'+b.params.paginationProgressbarClass+'"></span>',b.paginationContainer.html(e)),"custom"!==b.params.paginationType&&b.emit("onPaginationRendered",b,b.paginationContainer[0])}},b.update=function(e){function a(){b.rtl?-b.translate:b.translate;s=Math.min(Math.max(b.translate,b.maxTranslate()),b.minTranslate()),b.setWrapperTranslate(s),b.updateActiveIndex(),b.updateClasses()}if(b)if(b.updateContainerSize(),b.updateSlidesSize(),b.updateProgress(),b.updatePagination(),b.updateClasses(),b.params.scrollbar&&b.scrollbar&&b.scrollbar.set(),e){var t,s;b.controller&&b.controller.spline&&(b.controller.spline=void 0),b.params.freeMode?(a(),b.params.autoHeight&&b.updateAutoHeight()):(t=("auto"===b.params.slidesPerView||b.params.slidesPerView>1)&&b.isEnd&&!b.params.centeredSlides?b.slideTo(b.slides.length-1,0,!1,!0):b.slideTo(b.activeIndex,0,!1,!0),t||a())}else b.params.autoHeight&&b.updateAutoHeight()},b.onResize=function(e){b.params.breakpoints&&b.setBreakpoint();var a=b.params.allowSwipeToPrev,t=b.params.allowSwipeToNext;b.params.allowSwipeToPrev=b.params.allowSwipeToNext=!0,b.updateContainerSize(),b.updateSlidesSize(),("auto"===b.params.slidesPerView||b.params.freeMode||e)&&b.updatePagination(),b.params.scrollbar&&b.scrollbar&&b.scrollbar.set(),b.controller&&b.controller.spline&&(b.controller.spline=void 0);var s=!1;if(b.params.freeMode){var i=Math.min(Math.max(b.translate,b.maxTranslate()),b.minTranslate());b.setWrapperTranslate(i),b.updateActiveIndex(),b.updateClasses(),b.params.autoHeight&&b.updateAutoHeight()}else b.updateClasses(),s=("auto"===b.params.slidesPerView||b.params.slidesPerView>1)&&b.isEnd&&!b.params.centeredSlides?b.slideTo(b.slides.length-1,0,!1,!0):b.slideTo(b.activeIndex,0,!1,!0);b.params.lazyLoading&&!s&&b.lazy&&b.lazy.load(),b.params.allowSwipeToPrev=a,b.params.allowSwipeToNext=t},b.touchEventsDesktop={start:"mousedown",move:"mousemove",end:"mouseup"},window.navigator.pointerEnabled?b.touchEventsDesktop={start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled&&(b.touchEventsDesktop={start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}),b.touchEvents={start:b.support.touch||!b.params.simulateTouch?"touchstart":b.touchEventsDesktop.start,move:b.support.touch||!b.params.simulateTouch?"touchmove":b.touchEventsDesktop.move,end:b.support.touch||!b.params.simulateTouch?"touchend":b.touchEventsDesktop.end},(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&("container"===b.params.touchEventsTarget?b.container:b.wrapper).addClass("swiper-wp8-"+b.params.direction),b.initEvents=function(e){var a=e?"off":"on",t=e?"removeEventListener":"addEventListener",s="container"===b.params.touchEventsTarget?b.container[0]:b.wrapper[0],r=b.support.touch?s:document,n=!!b.params.nested;if(b.browser.ie)s[t](b.touchEvents.start,b.onTouchStart,!1),r[t](b.touchEvents.move,b.onTouchMove,n),r[t](b.touchEvents.end,b.onTouchEnd,!1);else{if(b.support.touch){var o=!("touchstart"!==b.touchEvents.start||!b.support.passiveListener||!b.params.passiveListeners)&&{passive:!0,capture:!1};s[t](b.touchEvents.start,b.onTouchStart,o),s[t](b.touchEvents.move,b.onTouchMove,n),s[t](b.touchEvents.end,b.onTouchEnd,o)}(i.simulateTouch&&!b.device.ios&&!b.device.android||i.simulateTouch&&!b.support.touch&&b.device.ios)&&(s[t]("mousedown",b.onTouchStart,!1),document[t]("mousemove",b.onTouchMove,n),document[t]("mouseup",b.onTouchEnd,!1))}window[t]("resize",b.onResize),b.params.nextButton&&b.nextButton&&b.nextButton.length>0&&(b.nextButton[a]("click",b.onClickNext),b.params.a11y&&b.a11y&&b.nextButton[a]("keydown",b.a11y.onEnterKey)),b.params.prevButton&&b.prevButton&&b.prevButton.length>0&&(b.prevButton[a]("click",b.onClickPrev),b.params.a11y&&b.a11y&&b.prevButton[a]("keydown",b.a11y.onEnterKey)),b.params.pagination&&b.params.paginationClickable&&(b.paginationContainer[a]("click","."+b.params.bulletClass,b.onClickIndex),b.params.a11y&&b.a11y&&b.paginationContainer[a]("keydown","."+b.params.bulletClass,b.a11y.onEnterKey)),(b.params.preventClicks||b.params.preventClicksPropagation)&&s[t]("click",b.preventClicks,!0);
},b.attachEvents=function(){b.initEvents()},b.detachEvents=function(){b.initEvents(!0)},b.allowClick=!0,b.preventClicks=function(e){b.allowClick||(b.params.preventClicks&&e.preventDefault(),b.params.preventClicksPropagation&&b.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))},b.onClickNext=function(e){e.preventDefault(),b.isEnd&&!b.params.loop||b.slideNext()},b.onClickPrev=function(e){e.preventDefault(),b.isBeginning&&!b.params.loop||b.slidePrev()},b.onClickIndex=function(e){e.preventDefault();var t=a(this).index()*b.params.slidesPerGroup;b.params.loop&&(t+=b.loopedSlides),b.slideTo(t)},b.updateClickedSlide=function(e){var t=o(e,"."+b.params.slideClass),s=!1;if(t)for(var i=0;i<b.slides.length;i++)b.slides[i]===t&&(s=!0);if(!t||!s)return b.clickedSlide=void 0,void(b.clickedIndex=void 0);if(b.clickedSlide=t,b.clickedIndex=a(t).index(),b.params.slideToClickedSlide&&void 0!==b.clickedIndex&&b.clickedIndex!==b.activeIndex){var r,n=b.clickedIndex,l="auto"===b.params.slidesPerView?b.currentSlidesPerView():b.params.slidesPerView;if(b.params.loop){if(b.animating)return;r=parseInt(a(b.clickedSlide).attr("data-swiper-slide-index"),10),b.params.centeredSlides?n<b.loopedSlides-l/2||n>b.slides.length-b.loopedSlides+l/2?(b.fixLoop(),n=b.wrapper.children("."+b.params.slideClass+'[data-swiper-slide-index="'+r+'"]:not(.'+b.params.slideDuplicateClass+")").eq(0).index(),setTimeout(function(){b.slideTo(n)},0)):b.slideTo(n):n>b.slides.length-l?(b.fixLoop(),n=b.wrapper.children("."+b.params.slideClass+'[data-swiper-slide-index="'+r+'"]:not(.'+b.params.slideDuplicateClass+")").eq(0).index(),setTimeout(function(){b.slideTo(n)},0)):b.slideTo(n)}else b.slideTo(n)}};var C,z,M,E,P,I,k,L,D,B,H="input, select, textarea, button, video",G=Date.now(),X=[];b.animating=!1,b.touches={startX:0,startY:0,currentX:0,currentY:0,diff:0};var Y,A;b.onTouchStart=function(e){if(e.originalEvent&&(e=e.originalEvent),Y="touchstart"===e.type,Y||!("which"in e)||3!==e.which){if(b.params.noSwiping&&o(e,"."+b.params.noSwipingClass))return void(b.allowClick=!0);if(!b.params.swipeHandler||o(e,b.params.swipeHandler)){var t=b.touches.currentX="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,s=b.touches.currentY="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY;if(!(b.device.ios&&b.params.iOSEdgeSwipeDetection&&t<=b.params.iOSEdgeSwipeThreshold)){if(C=!0,z=!1,M=!0,P=void 0,A=void 0,b.touches.startX=t,b.touches.startY=s,E=Date.now(),b.allowClick=!0,b.updateContainerSize(),b.swipeDirection=void 0,b.params.threshold>0&&(L=!1),"touchstart"!==e.type){var i=!0;a(e.target).is(H)&&(i=!1),document.activeElement&&a(document.activeElement).is(H)&&document.activeElement.blur(),i&&e.preventDefault()}b.emit("onTouchStart",b,e)}}}},b.onTouchMove=function(e){if(e.originalEvent&&(e=e.originalEvent),!Y||"mousemove"!==e.type){if(e.preventedByNestedSwiper)return b.touches.startX="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,void(b.touches.startY="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY);if(b.params.onlyExternal)return b.allowClick=!1,void(C&&(b.touches.startX=b.touches.currentX="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,b.touches.startY=b.touches.currentY="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,E=Date.now()));if(Y&&b.params.touchReleaseOnEdges&&!b.params.loop)if(b.isHorizontal()){if(b.touches.currentX<b.touches.startX&&b.translate<=b.maxTranslate()||b.touches.currentX>b.touches.startX&&b.translate>=b.minTranslate())return}else if(b.touches.currentY<b.touches.startY&&b.translate<=b.maxTranslate()||b.touches.currentY>b.touches.startY&&b.translate>=b.minTranslate())return;if(Y&&document.activeElement&&e.target===document.activeElement&&a(e.target).is(H))return z=!0,void(b.allowClick=!1);if(M&&b.emit("onTouchMove",b,e),!(e.targetTouches&&e.targetTouches.length>1)){if(b.touches.currentX="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,b.touches.currentY="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,"undefined"==typeof P){var t;b.isHorizontal()&&b.touches.currentY===b.touches.startY||!b.isHorizontal()&&b.touches.currentX===b.touches.startX?P=!1:(t=180*Math.atan2(Math.abs(b.touches.currentY-b.touches.startY),Math.abs(b.touches.currentX-b.touches.startX))/Math.PI,P=b.isHorizontal()?t>b.params.touchAngle:90-t>b.params.touchAngle)}if(P&&b.emit("onTouchMoveOpposite",b,e),"undefined"==typeof A&&b.browser.ieTouch&&(b.touches.currentX===b.touches.startX&&b.touches.currentY===b.touches.startY||(A=!0)),C){if(P)return void(C=!1);if(A||!b.browser.ieTouch){b.allowClick=!1,b.emit("onSliderMove",b,e),e.preventDefault(),b.params.touchMoveStopPropagation&&!b.params.nested&&e.stopPropagation(),z||(i.loop&&b.fixLoop(),k=b.getWrapperTranslate(),b.setWrapperTransition(0),b.animating&&b.wrapper.trigger("webkitTransitionEnd transitionend oTransitionEnd MSTransitionEnd msTransitionEnd"),b.params.autoplay&&b.autoplaying&&(b.params.autoplayDisableOnInteraction?b.stopAutoplay():b.pauseAutoplay()),B=!1,!b.params.grabCursor||b.params.allowSwipeToNext!==!0&&b.params.allowSwipeToPrev!==!0||b.setGrabCursor(!0)),z=!0;var s=b.touches.diff=b.isHorizontal()?b.touches.currentX-b.touches.startX:b.touches.currentY-b.touches.startY;s*=b.params.touchRatio,b.rtl&&(s=-s),b.swipeDirection=s>0?"prev":"next",I=s+k;var r=!0;if(s>0&&I>b.minTranslate()?(r=!1,b.params.resistance&&(I=b.minTranslate()-1+Math.pow(-b.minTranslate()+k+s,b.params.resistanceRatio))):s<0&&I<b.maxTranslate()&&(r=!1,b.params.resistance&&(I=b.maxTranslate()+1-Math.pow(b.maxTranslate()-k-s,b.params.resistanceRatio))),r&&(e.preventedByNestedSwiper=!0),!b.params.allowSwipeToNext&&"next"===b.swipeDirection&&I<k&&(I=k),!b.params.allowSwipeToPrev&&"prev"===b.swipeDirection&&I>k&&(I=k),b.params.threshold>0){if(!(Math.abs(s)>b.params.threshold||L))return void(I=k);if(!L)return L=!0,b.touches.startX=b.touches.currentX,b.touches.startY=b.touches.currentY,I=k,void(b.touches.diff=b.isHorizontal()?b.touches.currentX-b.touches.startX:b.touches.currentY-b.touches.startY)}b.params.followFinger&&((b.params.freeMode||b.params.watchSlidesProgress)&&b.updateActiveIndex(),b.params.freeMode&&(0===X.length&&X.push({position:b.touches[b.isHorizontal()?"startX":"startY"],time:E}),X.push({position:b.touches[b.isHorizontal()?"currentX":"currentY"],time:(new window.Date).getTime()})),b.updateProgress(I),b.setWrapperTranslate(I))}}}}},b.onTouchEnd=function(e){if(e.originalEvent&&(e=e.originalEvent),M&&b.emit("onTouchEnd",b,e),M=!1,C){b.params.grabCursor&&z&&C&&(b.params.allowSwipeToNext===!0||b.params.allowSwipeToPrev===!0)&&b.setGrabCursor(!1);var t=Date.now(),s=t-E;if(b.allowClick&&(b.updateClickedSlide(e),b.emit("onTap",b,e),s<300&&t-G>300&&(D&&clearTimeout(D),D=setTimeout(function(){b&&(b.params.paginationHide&&b.paginationContainer.length>0&&!a(e.target).hasClass(b.params.bulletClass)&&b.paginationContainer.toggleClass(b.params.paginationHiddenClass),b.emit("onClick",b,e))},300)),s<300&&t-G<300&&(D&&clearTimeout(D),b.emit("onDoubleTap",b,e))),G=Date.now(),setTimeout(function(){b&&(b.allowClick=!0)},0),!C||!z||!b.swipeDirection||0===b.touches.diff||I===k)return void(C=z=!1);C=z=!1;var i;if(i=b.params.followFinger?b.rtl?b.translate:-b.translate:-I,b.params.freeMode){if(i<-b.minTranslate())return void b.slideTo(b.activeIndex);if(i>-b.maxTranslate())return void(b.slides.length<b.snapGrid.length?b.slideTo(b.snapGrid.length-1):b.slideTo(b.slides.length-1));if(b.params.freeModeMomentum){if(X.length>1){var r=X.pop(),n=X.pop(),o=r.position-n.position,l=r.time-n.time;b.velocity=o/l,b.velocity=b.velocity/2,Math.abs(b.velocity)<b.params.freeModeMinimumVelocity&&(b.velocity=0),(l>150||(new window.Date).getTime()-r.time>300)&&(b.velocity=0)}else b.velocity=0;b.velocity=b.velocity*b.params.freeModeMomentumVelocityRatio,X.length=0;var p=1e3*b.params.freeModeMomentumRatio,d=b.velocity*p,u=b.translate+d;b.rtl&&(u=-u);var c,m=!1,h=20*Math.abs(b.velocity)*b.params.freeModeMomentumBounceRatio;if(u<b.maxTranslate())b.params.freeModeMomentumBounce?(u+b.maxTranslate()<-h&&(u=b.maxTranslate()-h),c=b.maxTranslate(),m=!0,B=!0):u=b.maxTranslate();else if(u>b.minTranslate())b.params.freeModeMomentumBounce?(u-b.minTranslate()>h&&(u=b.minTranslate()+h),c=b.minTranslate(),m=!0,B=!0):u=b.minTranslate();else if(b.params.freeModeSticky){var g,f=0;for(f=0;f<b.snapGrid.length;f+=1)if(b.snapGrid[f]>-u){g=f;break}u=Math.abs(b.snapGrid[g]-u)<Math.abs(b.snapGrid[g-1]-u)||"next"===b.swipeDirection?b.snapGrid[g]:b.snapGrid[g-1],b.rtl||(u=-u)}if(0!==b.velocity)p=b.rtl?Math.abs((-u-b.translate)/b.velocity):Math.abs((u-b.translate)/b.velocity);else if(b.params.freeModeSticky)return void b.slideReset();b.params.freeModeMomentumBounce&&m?(b.updateProgress(c),b.setWrapperTransition(p),b.setWrapperTranslate(u),b.onTransitionStart(),b.animating=!0,b.wrapper.transitionEnd(function(){b&&B&&(b.emit("onMomentumBounce",b),b.setWrapperTransition(b.params.speed),b.setWrapperTranslate(c),b.wrapper.transitionEnd(function(){b&&b.onTransitionEnd()}))})):b.velocity?(b.updateProgress(u),b.setWrapperTransition(p),b.setWrapperTranslate(u),b.onTransitionStart(),b.animating||(b.animating=!0,b.wrapper.transitionEnd(function(){b&&b.onTransitionEnd()}))):b.updateProgress(u),b.updateActiveIndex()}return void((!b.params.freeModeMomentum||s>=b.params.longSwipesMs)&&(b.updateProgress(),b.updateActiveIndex()))}var v,w=0,y=b.slidesSizesGrid[0];for(v=0;v<b.slidesGrid.length;v+=b.params.slidesPerGroup)"undefined"!=typeof b.slidesGrid[v+b.params.slidesPerGroup]?i>=b.slidesGrid[v]&&i<b.slidesGrid[v+b.params.slidesPerGroup]&&(w=v,y=b.slidesGrid[v+b.params.slidesPerGroup]-b.slidesGrid[v]):i>=b.slidesGrid[v]&&(w=v,y=b.slidesGrid[b.slidesGrid.length-1]-b.slidesGrid[b.slidesGrid.length-2]);var x=(i-b.slidesGrid[w])/y;if(s>b.params.longSwipesMs){if(!b.params.longSwipes)return void b.slideTo(b.activeIndex);"next"===b.swipeDirection&&(x>=b.params.longSwipesRatio?b.slideTo(w+b.params.slidesPerGroup):b.slideTo(w)),"prev"===b.swipeDirection&&(x>1-b.params.longSwipesRatio?b.slideTo(w+b.params.slidesPerGroup):b.slideTo(w))}else{if(!b.params.shortSwipes)return void b.slideTo(b.activeIndex);"next"===b.swipeDirection&&b.slideTo(w+b.params.slidesPerGroup),"prev"===b.swipeDirection&&b.slideTo(w)}}},b._slideTo=function(e,a){return b.slideTo(e,a,!0,!0)},b.slideTo=function(e,a,t,s){"undefined"==typeof t&&(t=!0),"undefined"==typeof e&&(e=0),e<0&&(e=0),b.snapIndex=Math.floor(e/b.params.slidesPerGroup),b.snapIndex>=b.snapGrid.length&&(b.snapIndex=b.snapGrid.length-1);var i=-b.snapGrid[b.snapIndex];if(b.params.autoplay&&b.autoplaying&&(s||!b.params.autoplayDisableOnInteraction?b.pauseAutoplay(a):b.stopAutoplay()),b.updateProgress(i),b.params.normalizeSlideIndex)for(var r=0;r<b.slidesGrid.length;r++)-Math.floor(100*i)>=Math.floor(100*b.slidesGrid[r])&&(e=r);return!(!b.params.allowSwipeToNext&&i<b.translate&&i<b.minTranslate())&&(!(!b.params.allowSwipeToPrev&&i>b.translate&&i>b.maxTranslate()&&(b.activeIndex||0)!==e)&&("undefined"==typeof a&&(a=b.params.speed),b.previousIndex=b.activeIndex||0,b.activeIndex=e,b.updateRealIndex(),b.rtl&&-i===b.translate||!b.rtl&&i===b.translate?(b.params.autoHeight&&b.updateAutoHeight(),b.updateClasses(),"slide"!==b.params.effect&&b.setWrapperTranslate(i),!1):(b.updateClasses(),b.onTransitionStart(t),0===a||b.browser.lteIE9?(b.setWrapperTranslate(i),b.setWrapperTransition(0),b.onTransitionEnd(t)):(b.setWrapperTranslate(i),b.setWrapperTransition(a),b.animating||(b.animating=!0,b.wrapper.transitionEnd(function(){b&&b.onTransitionEnd(t)}))),!0)))},b.onTransitionStart=function(e){"undefined"==typeof e&&(e=!0),b.params.autoHeight&&b.updateAutoHeight(),b.lazy&&b.lazy.onTransitionStart(),e&&(b.emit("onTransitionStart",b),b.activeIndex!==b.previousIndex&&(b.emit("onSlideChangeStart",b),b.activeIndex>b.previousIndex?b.emit("onSlideNextStart",b):b.emit("onSlidePrevStart",b)))},b.onTransitionEnd=function(e){b.animating=!1,b.setWrapperTransition(0),"undefined"==typeof e&&(e=!0),b.lazy&&b.lazy.onTransitionEnd(),e&&(b.emit("onTransitionEnd",b),b.activeIndex!==b.previousIndex&&(b.emit("onSlideChangeEnd",b),b.activeIndex>b.previousIndex?b.emit("onSlideNextEnd",b):b.emit("onSlidePrevEnd",b))),b.params.history&&b.history&&b.history.setHistory(b.params.history,b.activeIndex),b.params.hashnav&&b.hashnav&&b.hashnav.setHash()},b.slideNext=function(e,a,t){if(b.params.loop){if(b.animating)return!1;b.fixLoop();b.container[0].clientLeft;return b.slideTo(b.activeIndex+b.params.slidesPerGroup,a,e,t)}return b.slideTo(b.activeIndex+b.params.slidesPerGroup,a,e,t)},b._slideNext=function(e){return b.slideNext(!0,e,!0)},b.slidePrev=function(e,a,t){if(b.params.loop){if(b.animating)return!1;b.fixLoop();b.container[0].clientLeft;return b.slideTo(b.activeIndex-1,a,e,t)}return b.slideTo(b.activeIndex-1,a,e,t)},b._slidePrev=function(e){return b.slidePrev(!0,e,!0)},b.slideReset=function(e,a,t){return b.slideTo(b.activeIndex,a,e)},b.disableTouchControl=function(){return b.params.onlyExternal=!0,!0},b.enableTouchControl=function(){return b.params.onlyExternal=!1,!0},b.setWrapperTransition=function(e,a){b.wrapper.transition(e),"slide"!==b.params.effect&&b.effects[b.params.effect]&&b.effects[b.params.effect].setTransition(e),b.params.parallax&&b.parallax&&b.parallax.setTransition(e),b.params.scrollbar&&b.scrollbar&&b.scrollbar.setTransition(e),b.params.control&&b.controller&&b.controller.setTransition(e,a),b.emit("onSetTransition",b,e)},b.setWrapperTranslate=function(e,a,t){var s=0,i=0,n=0;b.isHorizontal()?s=b.rtl?-e:e:i=e,b.params.roundLengths&&(s=r(s),i=r(i)),b.params.virtualTranslate||(b.support.transforms3d?b.wrapper.transform("translate3d("+s+"px, "+i+"px, "+n+"px)"):b.wrapper.transform("translate("+s+"px, "+i+"px)")),b.translate=b.isHorizontal()?s:i;var o,l=b.maxTranslate()-b.minTranslate();o=0===l?0:(e-b.minTranslate())/l,o!==b.progress&&b.updateProgress(e),a&&b.updateActiveIndex(),"slide"!==b.params.effect&&b.effects[b.params.effect]&&b.effects[b.params.effect].setTranslate(b.translate),b.params.parallax&&b.parallax&&b.parallax.setTranslate(b.translate),b.params.scrollbar&&b.scrollbar&&b.scrollbar.setTranslate(b.translate),b.params.control&&b.controller&&b.controller.setTranslate(b.translate,t),b.emit("onSetTranslate",b,b.translate)},b.getTranslate=function(e,a){var t,s,i,r;return"undefined"==typeof a&&(a="x"),b.params.virtualTranslate?b.rtl?-b.translate:b.translate:(i=window.getComputedStyle(e,null),window.WebKitCSSMatrix?(s=i.transform||i.webkitTransform,s.split(",").length>6&&(s=s.split(", ").map(function(e){return e.replace(",",".")}).join(", ")),r=new window.WebKitCSSMatrix("none"===s?"":s)):(r=i.MozTransform||i.OTransform||i.MsTransform||i.msTransform||i.transform||i.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),t=r.toString().split(",")),"x"===a&&(s=window.WebKitCSSMatrix?r.m41:16===t.length?parseFloat(t[12]):parseFloat(t[4])),"y"===a&&(s=window.WebKitCSSMatrix?r.m42:16===t.length?parseFloat(t[13]):parseFloat(t[5])),b.rtl&&s&&(s=-s),s||0)},b.getWrapperTranslate=function(e){return"undefined"==typeof e&&(e=b.isHorizontal()?"x":"y"),b.getTranslate(b.wrapper[0],e)},b.observers=[],b.initObservers=function(){if(b.params.observeParents)for(var e=b.container.parents(),a=0;a<e.length;a++)l(e[a]);l(b.container[0],{childList:!1}),l(b.wrapper[0],{attributes:!1})},b.disconnectObservers=function(){for(var e=0;e<b.observers.length;e++)b.observers[e].disconnect();b.observers=[]},b.createLoop=function(){b.wrapper.children("."+b.params.slideClass+"."+b.params.slideDuplicateClass).remove();var e=b.wrapper.children("."+b.params.slideClass);"auto"!==b.params.slidesPerView||b.params.loopedSlides||(b.params.loopedSlides=e.length),b.loopedSlides=parseInt(b.params.loopedSlides||b.params.slidesPerView,10),b.loopedSlides=b.loopedSlides+b.params.loopAdditionalSlides,b.loopedSlides>e.length&&(b.loopedSlides=e.length);var t,s=[],i=[];for(e.each(function(t,r){var n=a(this);t<b.loopedSlides&&i.push(r),t<e.length&&t>=e.length-b.loopedSlides&&s.push(r),n.attr("data-swiper-slide-index",t)}),t=0;t<i.length;t++)b.wrapper.append(a(i[t].cloneNode(!0)).addClass(b.params.slideDuplicateClass));for(t=s.length-1;t>=0;t--)b.wrapper.prepend(a(s[t].cloneNode(!0)).addClass(b.params.slideDuplicateClass))},b.destroyLoop=function(){b.wrapper.children("."+b.params.slideClass+"."+b.params.slideDuplicateClass).remove(),b.slides.removeAttr("data-swiper-slide-index")},b.reLoop=function(e){var a=b.activeIndex-b.loopedSlides;b.destroyLoop(),b.createLoop(),b.updateSlidesSize(),e&&b.slideTo(a+b.loopedSlides,0,!1)},b.fixLoop=function(){var e;b.activeIndex<b.loopedSlides?(e=b.slides.length-3*b.loopedSlides+b.activeIndex,e+=b.loopedSlides,b.slideTo(e,0,!1,!0)):("auto"===b.params.slidesPerView&&b.activeIndex>=2*b.loopedSlides||b.activeIndex>b.slides.length-2*b.params.slidesPerView)&&(e=-b.slides.length+b.activeIndex+b.loopedSlides,e+=b.loopedSlides,b.slideTo(e,0,!1,!0))},b.appendSlide=function(e){if(b.params.loop&&b.destroyLoop(),"object"==typeof e&&e.length)for(var a=0;a<e.length;a++)e[a]&&b.wrapper.append(e[a]);else b.wrapper.append(e);b.params.loop&&b.createLoop(),b.params.observer&&b.support.observer||b.update(!0)},b.prependSlide=function(e){b.params.loop&&b.destroyLoop();var a=b.activeIndex+1;if("object"==typeof e&&e.length){for(var t=0;t<e.length;t++)e[t]&&b.wrapper.prepend(e[t]);a=b.activeIndex+e.length}else b.wrapper.prepend(e);b.params.loop&&b.createLoop(),b.params.observer&&b.support.observer||b.update(!0),b.slideTo(a,0,!1)},b.removeSlide=function(e){b.params.loop&&(b.destroyLoop(),b.slides=b.wrapper.children("."+b.params.slideClass));var a,t=b.activeIndex;if("object"==typeof e&&e.length){for(var s=0;s<e.length;s++)a=e[s],b.slides[a]&&b.slides.eq(a).remove(),a<t&&t--;t=Math.max(t,0)}else a=e,b.slides[a]&&b.slides.eq(a).remove(),a<t&&t--,t=Math.max(t,0);b.params.loop&&b.createLoop(),b.params.observer&&b.support.observer||b.update(!0),b.params.loop?b.slideTo(t+b.loopedSlides,0,!1):b.slideTo(t,0,!1)},b.removeAllSlides=function(){for(var e=[],a=0;a<b.slides.length;a++)e.push(a);b.removeSlide(e)},b.effects={fade:{setTranslate:function(){for(var e=0;e<b.slides.length;e++){var a=b.slides.eq(e),t=a[0].swiperSlideOffset,s=-t;b.params.virtualTranslate||(s-=b.translate);var i=0;b.isHorizontal()||(i=s,s=0);var r=b.params.fade.crossFade?Math.max(1-Math.abs(a[0].progress),0):1+Math.min(Math.max(a[0].progress,-1),0);a.css({opacity:r}).transform("translate3d("+s+"px, "+i+"px, 0px)")}},setTransition:function(e){if(b.slides.transition(e),b.params.virtualTranslate&&0!==e){var a=!1;b.slides.transitionEnd(function(){if(!a&&b){a=!0,b.animating=!1;for(var e=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"],t=0;t<e.length;t++)b.wrapper.trigger(e[t])}})}}},flip:{setTranslate:function(){for(var e=0;e<b.slides.length;e++){var t=b.slides.eq(e),s=t[0].progress;b.params.flip.limitRotation&&(s=Math.max(Math.min(t[0].progress,1),-1));var i=t[0].swiperSlideOffset,r=-180*s,n=r,o=0,l=-i,p=0;if(b.isHorizontal()?b.rtl&&(n=-n):(p=l,l=0,o=-n,n=0),t[0].style.zIndex=-Math.abs(Math.round(s))+b.slides.length,b.params.flip.slideShadows){var d=b.isHorizontal()?t.find(".swiper-slide-shadow-left"):t.find(".swiper-slide-shadow-top"),u=b.isHorizontal()?t.find(".swiper-slide-shadow-right"):t.find(".swiper-slide-shadow-bottom");0===d.length&&(d=a('<div class="swiper-slide-shadow-'+(b.isHorizontal()?"left":"top")+'"></div>'),t.append(d)),0===u.length&&(u=a('<div class="swiper-slide-shadow-'+(b.isHorizontal()?"right":"bottom")+'"></div>'),t.append(u)),d.length&&(d[0].style.opacity=Math.max(-s,0)),u.length&&(u[0].style.opacity=Math.max(s,0))}t.transform("translate3d("+l+"px, "+p+"px, 0px) rotateX("+o+"deg) rotateY("+n+"deg)")}},setTransition:function(e){if(b.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),b.params.virtualTranslate&&0!==e){var t=!1;b.slides.eq(b.activeIndex).transitionEnd(function(){if(!t&&b&&a(this).hasClass(b.params.slideActiveClass)){t=!0,b.animating=!1;for(var e=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"],s=0;s<e.length;s++)b.wrapper.trigger(e[s])}})}}},cube:{setTranslate:function(){var e,t=0;b.params.cube.shadow&&(b.isHorizontal()?(e=b.wrapper.find(".swiper-cube-shadow"),0===e.length&&(e=a('<div class="swiper-cube-shadow"></div>'),b.wrapper.append(e)),e.css({height:b.width+"px"})):(e=b.container.find(".swiper-cube-shadow"),0===e.length&&(e=a('<div class="swiper-cube-shadow"></div>'),b.container.append(e))));for(var s=0;s<b.slides.length;s++){var i=b.slides.eq(s),r=90*s,n=Math.floor(r/360);b.rtl&&(r=-r,n=Math.floor(-r/360));var o=Math.max(Math.min(i[0].progress,1),-1),l=0,p=0,d=0;s%4===0?(l=4*-n*b.size,d=0):(s-1)%4===0?(l=0,d=4*-n*b.size):(s-2)%4===0?(l=b.size+4*n*b.size,d=b.size):(s-3)%4===0&&(l=-b.size,d=3*b.size+4*b.size*n),b.rtl&&(l=-l),b.isHorizontal()||(p=l,l=0);var u="rotateX("+(b.isHorizontal()?0:-r)+"deg) rotateY("+(b.isHorizontal()?r:0)+"deg) translate3d("+l+"px, "+p+"px, "+d+"px)";if(o<=1&&o>-1&&(t=90*s+90*o,b.rtl&&(t=90*-s-90*o)),i.transform(u),b.params.cube.slideShadows){var c=b.isHorizontal()?i.find(".swiper-slide-shadow-left"):i.find(".swiper-slide-shadow-top"),m=b.isHorizontal()?i.find(".swiper-slide-shadow-right"):i.find(".swiper-slide-shadow-bottom");0===c.length&&(c=a('<div class="swiper-slide-shadow-'+(b.isHorizontal()?"left":"top")+'"></div>'),i.append(c)),0===m.length&&(m=a('<div class="swiper-slide-shadow-'+(b.isHorizontal()?"right":"bottom")+'"></div>'),i.append(m)),c.length&&(c[0].style.opacity=Math.max(-o,0)),m.length&&(m[0].style.opacity=Math.max(o,0))}}if(b.wrapper.css({"-webkit-transform-origin":"50% 50% -"+b.size/2+"px","-moz-transform-origin":"50% 50% -"+b.size/2+"px","-ms-transform-origin":"50% 50% -"+b.size/2+"px","transform-origin":"50% 50% -"+b.size/2+"px"}),b.params.cube.shadow)if(b.isHorizontal())e.transform("translate3d(0px, "+(b.width/2+b.params.cube.shadowOffset)+"px, "+-b.width/2+"px) rotateX(90deg) rotateZ(0deg) scale("+b.params.cube.shadowScale+")");else{var h=Math.abs(t)-90*Math.floor(Math.abs(t)/90),g=1.5-(Math.sin(2*h*Math.PI/360)/2+Math.cos(2*h*Math.PI/360)/2),f=b.params.cube.shadowScale,v=b.params.cube.shadowScale/g,w=b.params.cube.shadowOffset;e.transform("scale3d("+f+", 1, "+v+") translate3d(0px, "+(b.height/2+w)+"px, "+-b.height/2/v+"px) rotateX(-90deg)")}var y=b.isSafari||b.isUiWebView?-b.size/2:0;b.wrapper.transform("translate3d(0px,0,"+y+"px) rotateX("+(b.isHorizontal()?0:t)+"deg) rotateY("+(b.isHorizontal()?-t:0)+"deg)")},setTransition:function(e){b.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),b.params.cube.shadow&&!b.isHorizontal()&&b.container.find(".swiper-cube-shadow").transition(e)}},coverflow:{setTranslate:function(){for(var e=b.translate,t=b.isHorizontal()?-e+b.width/2:-e+b.height/2,s=b.isHorizontal()?b.params.coverflow.rotate:-b.params.coverflow.rotate,i=b.params.coverflow.depth,r=0,n=b.slides.length;r<n;r++){var o=b.slides.eq(r),l=b.slidesSizesGrid[r],p=o[0].swiperSlideOffset,d=(t-p-l/2)/l*b.params.coverflow.modifier,u=b.isHorizontal()?s*d:0,c=b.isHorizontal()?0:s*d,m=-i*Math.abs(d),h=b.isHorizontal()?0:b.params.coverflow.stretch*d,g=b.isHorizontal()?b.params.coverflow.stretch*d:0;Math.abs(g)<.001&&(g=0),Math.abs(h)<.001&&(h=0),Math.abs(m)<.001&&(m=0),Math.abs(u)<.001&&(u=0),Math.abs(c)<.001&&(c=0);var f="translate3d("+g+"px,"+h+"px,"+m+"px) rotateX("+c+"deg) rotateY("+u+"deg)";if(o.transform(f),o[0].style.zIndex=-Math.abs(Math.round(d))+1,b.params.coverflow.slideShadows){var v=b.isHorizontal()?o.find(".swiper-slide-shadow-left"):o.find(".swiper-slide-shadow-top"),w=b.isHorizontal()?o.find(".swiper-slide-shadow-right"):o.find(".swiper-slide-shadow-bottom");0===v.length&&(v=a('<div class="swiper-slide-shadow-'+(b.isHorizontal()?"left":"top")+'"></div>'),o.append(v)),0===w.length&&(w=a('<div class="swiper-slide-shadow-'+(b.isHorizontal()?"right":"bottom")+'"></div>'),o.append(w)),v.length&&(v[0].style.opacity=d>0?d:0),w.length&&(w[0].style.opacity=-d>0?-d:0)}}if(b.browser.ie){var y=b.wrapper[0].style;y.perspectiveOrigin=t+"px 50%"}},setTransition:function(e){b.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e)}}},b.lazy={initialImageLoaded:!1,loadImageInSlide:function(e,t){if("undefined"!=typeof e&&("undefined"==typeof t&&(t=!0),0!==b.slides.length)){var s=b.slides.eq(e),i=s.find("."+b.params.lazyLoadingClass+":not(."+b.params.lazyStatusLoadedClass+"):not(."+b.params.lazyStatusLoadingClass+")");!s.hasClass(b.params.lazyLoadingClass)||s.hasClass(b.params.lazyStatusLoadedClass)||s.hasClass(b.params.lazyStatusLoadingClass)||(i=i.add(s[0])),0!==i.length&&i.each(function(){var e=a(this);e.addClass(b.params.lazyStatusLoadingClass);var i=e.attr("data-background"),r=e.attr("data-src"),n=e.attr("data-srcset"),o=e.attr("data-sizes");b.loadImage(e[0],r||i,n,o,!1,function(){if(i?(e.css("background-image",'url("'+i+'")'),e.removeAttr("data-background")):(n&&(e.attr("srcset",n),e.removeAttr("data-srcset")),o&&(e.attr("sizes",o),e.removeAttr("data-sizes")),r&&(e.attr("src",r),e.removeAttr("data-src"))),e.addClass(b.params.lazyStatusLoadedClass).removeClass(b.params.lazyStatusLoadingClass),s.find("."+b.params.lazyPreloaderClass+", ."+b.params.preloaderClass).remove(),b.params.loop&&t){var a=s.attr("data-swiper-slide-index");if(s.hasClass(b.params.slideDuplicateClass)){var l=b.wrapper.children('[data-swiper-slide-index="'+a+'"]:not(.'+b.params.slideDuplicateClass+")");b.lazy.loadImageInSlide(l.index(),!1)}else{var p=b.wrapper.children("."+b.params.slideDuplicateClass+'[data-swiper-slide-index="'+a+'"]');b.lazy.loadImageInSlide(p.index(),!1)}}b.emit("onLazyImageReady",b,s[0],e[0])}),b.emit("onLazyImageLoad",b,s[0],e[0])})}},load:function(){var e,t=b.params.slidesPerView;if("auto"===t&&(t=0),b.lazy.initialImageLoaded||(b.lazy.initialImageLoaded=!0),b.params.watchSlidesVisibility)b.wrapper.children("."+b.params.slideVisibleClass).each(function(){b.lazy.loadImageInSlide(a(this).index())});else if(t>1)for(e=b.activeIndex;e<b.activeIndex+t;e++)b.slides[e]&&b.lazy.loadImageInSlide(e);else b.lazy.loadImageInSlide(b.activeIndex);if(b.params.lazyLoadingInPrevNext)if(t>1||b.params.lazyLoadingInPrevNextAmount&&b.params.lazyLoadingInPrevNextAmount>1){var s=b.params.lazyLoadingInPrevNextAmount,i=t,r=Math.min(b.activeIndex+i+Math.max(s,i),b.slides.length),n=Math.max(b.activeIndex-Math.max(i,s),0);for(e=b.activeIndex+t;e<r;e++)b.slides[e]&&b.lazy.loadImageInSlide(e);for(e=n;e<b.activeIndex;e++)b.slides[e]&&b.lazy.loadImageInSlide(e)}else{var o=b.wrapper.children("."+b.params.slideNextClass);o.length>0&&b.lazy.loadImageInSlide(o.index());var l=b.wrapper.children("."+b.params.slidePrevClass);l.length>0&&b.lazy.loadImageInSlide(l.index())}},onTransitionStart:function(){b.params.lazyLoading&&(b.params.lazyLoadingOnTransitionStart||!b.params.lazyLoadingOnTransitionStart&&!b.lazy.initialImageLoaded)&&b.lazy.load()},onTransitionEnd:function(){b.params.lazyLoading&&!b.params.lazyLoadingOnTransitionStart&&b.lazy.load()}},b.scrollbar={isTouched:!1,setDragPosition:function(e){var a=b.scrollbar,t=b.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageX:e.pageX||e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageY:e.pageY||e.clientY,s=t-a.track.offset()[b.isHorizontal()?"left":"top"]-a.dragSize/2,i=-b.minTranslate()*a.moveDivider,r=-b.maxTranslate()*a.moveDivider;s<i?s=i:s>r&&(s=r),s=-s/a.moveDivider,b.updateProgress(s),b.setWrapperTranslate(s,!0)},dragStart:function(e){var a=b.scrollbar;a.isTouched=!0,e.preventDefault(),e.stopPropagation(),a.setDragPosition(e),clearTimeout(a.dragTimeout),a.track.transition(0),b.params.scrollbarHide&&a.track.css("opacity",1),b.wrapper.transition(100),a.drag.transition(100),b.emit("onScrollbarDragStart",b)},dragMove:function(e){var a=b.scrollbar;a.isTouched&&(e.preventDefault?e.preventDefault():e.returnValue=!1,a.setDragPosition(e),b.wrapper.transition(0),a.track.transition(0),a.drag.transition(0),b.emit("onScrollbarDragMove",b))},dragEnd:function(e){var a=b.scrollbar;a.isTouched&&(a.isTouched=!1,b.params.scrollbarHide&&(clearTimeout(a.dragTimeout),a.dragTimeout=setTimeout(function(){a.track.css("opacity",0),a.track.transition(400)},1e3)),b.emit("onScrollbarDragEnd",b),b.params.scrollbarSnapOnRelease&&b.slideReset())},draggableEvents:function(){return b.params.simulateTouch!==!1||b.support.touch?b.touchEvents:b.touchEventsDesktop}(),enableDraggable:function(){var e=b.scrollbar,t=b.support.touch?e.track:document;a(e.track).on(e.draggableEvents.start,e.dragStart),a(t).on(e.draggableEvents.move,e.dragMove),a(t).on(e.draggableEvents.end,e.dragEnd)},disableDraggable:function(){var e=b.scrollbar,t=b.support.touch?e.track:document;a(e.track).off(e.draggableEvents.start,e.dragStart),a(t).off(e.draggableEvents.move,e.dragMove),a(t).off(e.draggableEvents.end,e.dragEnd)},set:function(){if(b.params.scrollbar){var e=b.scrollbar;e.track=a(b.params.scrollbar),b.params.uniqueNavElements&&"string"==typeof b.params.scrollbar&&e.track.length>1&&1===b.container.find(b.params.scrollbar).length&&(e.track=b.container.find(b.params.scrollbar)),e.drag=e.track.find(".swiper-scrollbar-drag"),0===e.drag.length&&(e.drag=a('<div class="swiper-scrollbar-drag"></div>'),e.track.append(e.drag)),e.drag[0].style.width="",e.drag[0].style.height="",e.trackSize=b.isHorizontal()?e.track[0].offsetWidth:e.track[0].offsetHeight,e.divider=b.size/b.virtualSize,e.moveDivider=e.divider*(e.trackSize/b.size),e.dragSize=e.trackSize*e.divider,b.isHorizontal()?e.drag[0].style.width=e.dragSize+"px":e.drag[0].style.height=e.dragSize+"px",e.divider>=1?e.track[0].style.display="none":e.track[0].style.display="",b.params.scrollbarHide&&(e.track[0].style.opacity=0)}},setTranslate:function(){if(b.params.scrollbar){var e,a=b.scrollbar,t=(b.translate||0,a.dragSize);e=(a.trackSize-a.dragSize)*b.progress,b.rtl&&b.isHorizontal()?(e=-e,e>0?(t=a.dragSize-e,e=0):-e+a.dragSize>a.trackSize&&(t=a.trackSize+e)):e<0?(t=a.dragSize+e,e=0):e+a.dragSize>a.trackSize&&(t=a.trackSize-e),b.isHorizontal()?(b.support.transforms3d?a.drag.transform("translate3d("+e+"px, 0, 0)"):a.drag.transform("translateX("+e+"px)"),a.drag[0].style.width=t+"px"):(b.support.transforms3d?a.drag.transform("translate3d(0px, "+e+"px, 0)"):a.drag.transform("translateY("+e+"px)"),a.drag[0].style.height=t+"px"),b.params.scrollbarHide&&(clearTimeout(a.timeout),a.track[0].style.opacity=1,a.timeout=setTimeout(function(){a.track[0].style.opacity=0,a.track.transition(400)},1e3))}},setTransition:function(e){b.params.scrollbar&&b.scrollbar.drag.transition(e)}},b.controller={LinearSpline:function(e,a){this.x=e,this.y=a,this.lastIndex=e.length-1;var t,s;this.x.length;this.interpolate=function(e){return e?(s=i(this.x,e),t=s-1,(e-this.x[t])*(this.y[s]-this.y[t])/(this.x[s]-this.x[t])+this.y[t]):0};var i=function(){var e,a,t;return function(s,i){for(a=-1,e=s.length;e-a>1;)s[t=e+a>>1]<=i?a=t:e=t;return e}}()},getInterpolateFunction:function(e){b.controller.spline||(b.controller.spline=b.params.loop?new b.controller.LinearSpline(b.slidesGrid,e.slidesGrid):new b.controller.LinearSpline(b.snapGrid,e.snapGrid))},setTranslate:function(e,a){function s(a){e=a.rtl&&"horizontal"===a.params.direction?-b.translate:b.translate,"slide"===b.params.controlBy&&(b.controller.getInterpolateFunction(a),r=-b.controller.spline.interpolate(-e)),r&&"container"!==b.params.controlBy||(i=(a.maxTranslate()-a.minTranslate())/(b.maxTranslate()-b.minTranslate()),r=(e-b.minTranslate())*i+a.minTranslate()),b.params.controlInverse&&(r=a.maxTranslate()-r),a.updateProgress(r),a.setWrapperTranslate(r,!1,b),a.updateActiveIndex()}var i,r,n=b.params.control;if(b.isArray(n))for(var o=0;o<n.length;o++)n[o]!==a&&n[o]instanceof t&&s(n[o]);else n instanceof t&&a!==n&&s(n)},setTransition:function(e,a){function s(a){
a.setWrapperTransition(e,b),0!==e&&(a.onTransitionStart(),a.wrapper.transitionEnd(function(){r&&(a.params.loop&&"slide"===b.params.controlBy&&a.fixLoop(),a.onTransitionEnd())}))}var i,r=b.params.control;if(b.isArray(r))for(i=0;i<r.length;i++)r[i]!==a&&r[i]instanceof t&&s(r[i]);else r instanceof t&&a!==r&&s(r)}},b.hashnav={onHashCange:function(e,a){var t=document.location.hash.replace("#",""),s=b.slides.eq(b.activeIndex).attr("data-hash");t!==s&&b.slideTo(b.wrapper.children("."+b.params.slideClass+'[data-hash="'+t+'"]').index())},attachEvents:function(e){var t=e?"off":"on";a(window)[t]("hashchange",b.hashnav.onHashCange)},setHash:function(){if(b.hashnav.initialized&&b.params.hashnav)if(b.params.replaceState&&window.history&&window.history.replaceState)window.history.replaceState(null,null,"#"+b.slides.eq(b.activeIndex).attr("data-hash")||"");else{var e=b.slides.eq(b.activeIndex),a=e.attr("data-hash")||e.attr("data-history");document.location.hash=a||""}},init:function(){if(b.params.hashnav&&!b.params.history){b.hashnav.initialized=!0;var e=document.location.hash.replace("#","");if(e)for(var a=0,t=0,s=b.slides.length;t<s;t++){var i=b.slides.eq(t),r=i.attr("data-hash")||i.attr("data-history");if(r===e&&!i.hasClass(b.params.slideDuplicateClass)){var n=i.index();b.slideTo(n,a,b.params.runCallbacksOnInit,!0)}}b.params.hashnavWatchState&&b.hashnav.attachEvents()}},destroy:function(){b.params.hashnavWatchState&&b.hashnav.attachEvents(!0)}},b.history={init:function(){if(b.params.history){if(!window.history||!window.history.pushState)return b.params.history=!1,void(b.params.hashnav=!0);b.history.initialized=!0,this.paths=this.getPathValues(),(this.paths.key||this.paths.value)&&(this.scrollToSlide(0,this.paths.value,b.params.runCallbacksOnInit),b.params.replaceState||window.addEventListener("popstate",this.setHistoryPopState))}},setHistoryPopState:function(){b.history.paths=b.history.getPathValues(),b.history.scrollToSlide(b.params.speed,b.history.paths.value,!1)},getPathValues:function(){var e=window.location.pathname.slice(1).split("/"),a=e.length,t=e[a-2],s=e[a-1];return{key:t,value:s}},setHistory:function(e,a){if(b.history.initialized&&b.params.history){var t=b.slides.eq(a),s=this.slugify(t.attr("data-history"));window.location.pathname.includes(e)||(s=e+"/"+s),b.params.replaceState?window.history.replaceState(null,null,s):window.history.pushState(null,null,s)}},slugify:function(e){return e.toString().toLowerCase().replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},scrollToSlide:function(e,a,t){if(a)for(var s=0,i=b.slides.length;s<i;s++){var r=b.slides.eq(s),n=this.slugify(r.attr("data-history"));if(n===a&&!r.hasClass(b.params.slideDuplicateClass)){var o=r.index();b.slideTo(o,e,t)}}else b.slideTo(0,e,t)}},b.disableKeyboardControl=function(){b.params.keyboardControl=!1,a(document).off("keydown",p)},b.enableKeyboardControl=function(){b.params.keyboardControl=!0,a(document).on("keydown",p)},b.mousewheel={event:!1,lastScrollTime:(new window.Date).getTime()},b.params.mousewheelControl&&(b.mousewheel.event=navigator.userAgent.indexOf("firefox")>-1?"DOMMouseScroll":d()?"wheel":"mousewheel"),b.disableMousewheelControl=function(){if(!b.mousewheel.event)return!1;var e=b.container;return"container"!==b.params.mousewheelEventsTarged&&(e=a(b.params.mousewheelEventsTarged)),e.off(b.mousewheel.event,u),!0},b.enableMousewheelControl=function(){if(!b.mousewheel.event)return!1;var e=b.container;return"container"!==b.params.mousewheelEventsTarged&&(e=a(b.params.mousewheelEventsTarged)),e.on(b.mousewheel.event,u),!0},b.parallax={setTranslate:function(){b.container.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){m(this,b.progress)}),b.slides.each(function(){var e=a(this);e.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){var a=Math.min(Math.max(e[0].progress,-1),1);m(this,a)})})},setTransition:function(e){"undefined"==typeof e&&(e=b.params.speed),b.container.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){var t=a(this),s=parseInt(t.attr("data-swiper-parallax-duration"),10)||e;0===e&&(s=0),t.transition(s)})}},b.zoom={scale:1,currentScale:1,isScaling:!1,gesture:{slide:void 0,slideWidth:void 0,slideHeight:void 0,image:void 0,imageWrap:void 0,zoomMax:b.params.zoomMax},image:{isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},velocity:{x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0},getDistanceBetweenTouches:function(e){if(e.targetTouches.length<2)return 1;var a=e.targetTouches[0].pageX,t=e.targetTouches[0].pageY,s=e.targetTouches[1].pageX,i=e.targetTouches[1].pageY,r=Math.sqrt(Math.pow(s-a,2)+Math.pow(i-t,2));return r},onGestureStart:function(e){var t=b.zoom;if(!b.support.gestures){if("touchstart"!==e.type||"touchstart"===e.type&&e.targetTouches.length<2)return;t.gesture.scaleStart=t.getDistanceBetweenTouches(e)}return t.gesture.slide&&t.gesture.slide.length||(t.gesture.slide=a(this),0===t.gesture.slide.length&&(t.gesture.slide=b.slides.eq(b.activeIndex)),t.gesture.image=t.gesture.slide.find("img, svg, canvas"),t.gesture.imageWrap=t.gesture.image.parent("."+b.params.zoomContainerClass),t.gesture.zoomMax=t.gesture.imageWrap.attr("data-swiper-zoom")||b.params.zoomMax,0!==t.gesture.imageWrap.length)?(t.gesture.image.transition(0),void(t.isScaling=!0)):void(t.gesture.image=void 0)},onGestureChange:function(e){var a=b.zoom;if(!b.support.gestures){if("touchmove"!==e.type||"touchmove"===e.type&&e.targetTouches.length<2)return;a.gesture.scaleMove=a.getDistanceBetweenTouches(e)}a.gesture.image&&0!==a.gesture.image.length&&(b.support.gestures?a.scale=e.scale*a.currentScale:a.scale=a.gesture.scaleMove/a.gesture.scaleStart*a.currentScale,a.scale>a.gesture.zoomMax&&(a.scale=a.gesture.zoomMax-1+Math.pow(a.scale-a.gesture.zoomMax+1,.5)),a.scale<b.params.zoomMin&&(a.scale=b.params.zoomMin+1-Math.pow(b.params.zoomMin-a.scale+1,.5)),a.gesture.image.transform("translate3d(0,0,0) scale("+a.scale+")"))},onGestureEnd:function(e){var a=b.zoom;!b.support.gestures&&("touchend"!==e.type||"touchend"===e.type&&e.changedTouches.length<2)||a.gesture.image&&0!==a.gesture.image.length&&(a.scale=Math.max(Math.min(a.scale,a.gesture.zoomMax),b.params.zoomMin),a.gesture.image.transition(b.params.speed).transform("translate3d(0,0,0) scale("+a.scale+")"),a.currentScale=a.scale,a.isScaling=!1,1===a.scale&&(a.gesture.slide=void 0))},onTouchStart:function(e,a){var t=e.zoom;t.gesture.image&&0!==t.gesture.image.length&&(t.image.isTouched||("android"===e.device.os&&a.preventDefault(),t.image.isTouched=!0,t.image.touchesStart.x="touchstart"===a.type?a.targetTouches[0].pageX:a.pageX,t.image.touchesStart.y="touchstart"===a.type?a.targetTouches[0].pageY:a.pageY))},onTouchMove:function(e){var a=b.zoom;if(a.gesture.image&&0!==a.gesture.image.length&&(b.allowClick=!1,a.image.isTouched&&a.gesture.slide)){a.image.isMoved||(a.image.width=a.gesture.image[0].offsetWidth,a.image.height=a.gesture.image[0].offsetHeight,a.image.startX=b.getTranslate(a.gesture.imageWrap[0],"x")||0,a.image.startY=b.getTranslate(a.gesture.imageWrap[0],"y")||0,a.gesture.slideWidth=a.gesture.slide[0].offsetWidth,a.gesture.slideHeight=a.gesture.slide[0].offsetHeight,a.gesture.imageWrap.transition(0),b.rtl&&(a.image.startX=-a.image.startX),b.rtl&&(a.image.startY=-a.image.startY));var t=a.image.width*a.scale,s=a.image.height*a.scale;if(!(t<a.gesture.slideWidth&&s<a.gesture.slideHeight)){if(a.image.minX=Math.min(a.gesture.slideWidth/2-t/2,0),a.image.maxX=-a.image.minX,a.image.minY=Math.min(a.gesture.slideHeight/2-s/2,0),a.image.maxY=-a.image.minY,a.image.touchesCurrent.x="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,a.image.touchesCurrent.y="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,!a.image.isMoved&&!a.isScaling){if(b.isHorizontal()&&Math.floor(a.image.minX)===Math.floor(a.image.startX)&&a.image.touchesCurrent.x<a.image.touchesStart.x||Math.floor(a.image.maxX)===Math.floor(a.image.startX)&&a.image.touchesCurrent.x>a.image.touchesStart.x)return void(a.image.isTouched=!1);if(!b.isHorizontal()&&Math.floor(a.image.minY)===Math.floor(a.image.startY)&&a.image.touchesCurrent.y<a.image.touchesStart.y||Math.floor(a.image.maxY)===Math.floor(a.image.startY)&&a.image.touchesCurrent.y>a.image.touchesStart.y)return void(a.image.isTouched=!1)}e.preventDefault(),e.stopPropagation(),a.image.isMoved=!0,a.image.currentX=a.image.touchesCurrent.x-a.image.touchesStart.x+a.image.startX,a.image.currentY=a.image.touchesCurrent.y-a.image.touchesStart.y+a.image.startY,a.image.currentX<a.image.minX&&(a.image.currentX=a.image.minX+1-Math.pow(a.image.minX-a.image.currentX+1,.8)),a.image.currentX>a.image.maxX&&(a.image.currentX=a.image.maxX-1+Math.pow(a.image.currentX-a.image.maxX+1,.8)),a.image.currentY<a.image.minY&&(a.image.currentY=a.image.minY+1-Math.pow(a.image.minY-a.image.currentY+1,.8)),a.image.currentY>a.image.maxY&&(a.image.currentY=a.image.maxY-1+Math.pow(a.image.currentY-a.image.maxY+1,.8)),a.velocity.prevPositionX||(a.velocity.prevPositionX=a.image.touchesCurrent.x),a.velocity.prevPositionY||(a.velocity.prevPositionY=a.image.touchesCurrent.y),a.velocity.prevTime||(a.velocity.prevTime=Date.now()),a.velocity.x=(a.image.touchesCurrent.x-a.velocity.prevPositionX)/(Date.now()-a.velocity.prevTime)/2,a.velocity.y=(a.image.touchesCurrent.y-a.velocity.prevPositionY)/(Date.now()-a.velocity.prevTime)/2,Math.abs(a.image.touchesCurrent.x-a.velocity.prevPositionX)<2&&(a.velocity.x=0),Math.abs(a.image.touchesCurrent.y-a.velocity.prevPositionY)<2&&(a.velocity.y=0),a.velocity.prevPositionX=a.image.touchesCurrent.x,a.velocity.prevPositionY=a.image.touchesCurrent.y,a.velocity.prevTime=Date.now(),a.gesture.imageWrap.transform("translate3d("+a.image.currentX+"px, "+a.image.currentY+"px,0)")}}},onTouchEnd:function(e,a){var t=e.zoom;if(t.gesture.image&&0!==t.gesture.image.length){if(!t.image.isTouched||!t.image.isMoved)return t.image.isTouched=!1,void(t.image.isMoved=!1);t.image.isTouched=!1,t.image.isMoved=!1;var s=300,i=300,r=t.velocity.x*s,n=t.image.currentX+r,o=t.velocity.y*i,l=t.image.currentY+o;0!==t.velocity.x&&(s=Math.abs((n-t.image.currentX)/t.velocity.x)),0!==t.velocity.y&&(i=Math.abs((l-t.image.currentY)/t.velocity.y));var p=Math.max(s,i);t.image.currentX=n,t.image.currentY=l;var d=t.image.width*t.scale,u=t.image.height*t.scale;t.image.minX=Math.min(t.gesture.slideWidth/2-d/2,0),t.image.maxX=-t.image.minX,t.image.minY=Math.min(t.gesture.slideHeight/2-u/2,0),t.image.maxY=-t.image.minY,t.image.currentX=Math.max(Math.min(t.image.currentX,t.image.maxX),t.image.minX),t.image.currentY=Math.max(Math.min(t.image.currentY,t.image.maxY),t.image.minY),t.gesture.imageWrap.transition(p).transform("translate3d("+t.image.currentX+"px, "+t.image.currentY+"px,0)")}},onTransitionEnd:function(e){var a=e.zoom;a.gesture.slide&&e.previousIndex!==e.activeIndex&&(a.gesture.image.transform("translate3d(0,0,0) scale(1)"),a.gesture.imageWrap.transform("translate3d(0,0,0)"),a.gesture.slide=a.gesture.image=a.gesture.imageWrap=void 0,a.scale=a.currentScale=1)},toggleZoom:function(e,t){var s=e.zoom;if(s.gesture.slide||(s.gesture.slide=e.clickedSlide?a(e.clickedSlide):e.slides.eq(e.activeIndex),s.gesture.image=s.gesture.slide.find("img, svg, canvas"),s.gesture.imageWrap=s.gesture.image.parent("."+e.params.zoomContainerClass)),s.gesture.image&&0!==s.gesture.image.length){var i,r,n,o,l,p,d,u,c,m,h,g,f,v,w,y,x,T;"undefined"==typeof s.image.touchesStart.x&&t?(i="touchend"===t.type?t.changedTouches[0].pageX:t.pageX,r="touchend"===t.type?t.changedTouches[0].pageY:t.pageY):(i=s.image.touchesStart.x,r=s.image.touchesStart.y),s.scale&&1!==s.scale?(s.scale=s.currentScale=1,s.gesture.imageWrap.transition(300).transform("translate3d(0,0,0)"),s.gesture.image.transition(300).transform("translate3d(0,0,0) scale(1)"),s.gesture.slide=void 0):(s.scale=s.currentScale=s.gesture.imageWrap.attr("data-swiper-zoom")||e.params.zoomMax,t?(x=s.gesture.slide[0].offsetWidth,T=s.gesture.slide[0].offsetHeight,n=s.gesture.slide.offset().left,o=s.gesture.slide.offset().top,l=n+x/2-i,p=o+T/2-r,c=s.gesture.image[0].offsetWidth,m=s.gesture.image[0].offsetHeight,h=c*s.scale,g=m*s.scale,f=Math.min(x/2-h/2,0),v=Math.min(T/2-g/2,0),w=-f,y=-v,d=l*s.scale,u=p*s.scale,d<f&&(d=f),d>w&&(d=w),u<v&&(u=v),u>y&&(u=y)):(d=0,u=0),s.gesture.imageWrap.transition(300).transform("translate3d("+d+"px, "+u+"px,0)"),s.gesture.image.transition(300).transform("translate3d(0,0,0) scale("+s.scale+")"))}},attachEvents:function(e){var t=e?"off":"on";if(b.params.zoom){var s=(b.slides,!("touchstart"!==b.touchEvents.start||!b.support.passiveListener||!b.params.passiveListeners)&&{passive:!0,capture:!1});b.support.gestures?(b.slides[t]("gesturestart",b.zoom.onGestureStart,s),b.slides[t]("gesturechange",b.zoom.onGestureChange,s),b.slides[t]("gestureend",b.zoom.onGestureEnd,s)):"touchstart"===b.touchEvents.start&&(b.slides[t](b.touchEvents.start,b.zoom.onGestureStart,s),b.slides[t](b.touchEvents.move,b.zoom.onGestureChange,s),b.slides[t](b.touchEvents.end,b.zoom.onGestureEnd,s)),b[t]("touchStart",b.zoom.onTouchStart),b.slides.each(function(e,s){a(s).find("."+b.params.zoomContainerClass).length>0&&a(s)[t](b.touchEvents.move,b.zoom.onTouchMove)}),b[t]("touchEnd",b.zoom.onTouchEnd),b[t]("transitionEnd",b.zoom.onTransitionEnd),b.params.zoomToggle&&b.on("doubleTap",b.zoom.toggleZoom)}},init:function(){b.zoom.attachEvents()},destroy:function(){b.zoom.attachEvents(!0)}},b._plugins=[];for(var O in b.plugins){var N=b.plugins[O](b,b.params[O]);N&&b._plugins.push(N)}return b.callPlugins=function(e){for(var a=0;a<b._plugins.length;a++)e in b._plugins[a]&&b._plugins[a][e](arguments[1],arguments[2],arguments[3],arguments[4],arguments[5])},b.emitterEventListeners={},b.emit=function(e){b.params[e]&&b.params[e](arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]);var a;if(b.emitterEventListeners[e])for(a=0;a<b.emitterEventListeners[e].length;a++)b.emitterEventListeners[e][a](arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]);b.callPlugins&&b.callPlugins(e,arguments[1],arguments[2],arguments[3],arguments[4],arguments[5])},b.on=function(e,a){return e=h(e),b.emitterEventListeners[e]||(b.emitterEventListeners[e]=[]),b.emitterEventListeners[e].push(a),b},b.off=function(e,a){var t;if(e=h(e),"undefined"==typeof a)return b.emitterEventListeners[e]=[],b;if(b.emitterEventListeners[e]&&0!==b.emitterEventListeners[e].length){for(t=0;t<b.emitterEventListeners[e].length;t++)b.emitterEventListeners[e][t]===a&&b.emitterEventListeners[e].splice(t,1);return b}},b.once=function(e,a){e=h(e);var t=function(){a(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4]),b.off(e,t)};return b.on(e,t),b},b.a11y={makeFocusable:function(e){return e.attr("tabIndex","0"),e},addRole:function(e,a){return e.attr("role",a),e},addLabel:function(e,a){return e.attr("aria-label",a),e},disable:function(e){return e.attr("aria-disabled",!0),e},enable:function(e){return e.attr("aria-disabled",!1),e},onEnterKey:function(e){13===e.keyCode&&(a(e.target).is(b.params.nextButton)?(b.onClickNext(e),b.isEnd?b.a11y.notify(b.params.lastSlideMessage):b.a11y.notify(b.params.nextSlideMessage)):a(e.target).is(b.params.prevButton)&&(b.onClickPrev(e),b.isBeginning?b.a11y.notify(b.params.firstSlideMessage):b.a11y.notify(b.params.prevSlideMessage)),a(e.target).is("."+b.params.bulletClass)&&a(e.target)[0].click())},liveRegion:a('<span class="'+b.params.notificationClass+'" aria-live="assertive" aria-atomic="true"></span>'),notify:function(e){var a=b.a11y.liveRegion;0!==a.length&&(a.html(""),a.html(e))},init:function(){b.params.nextButton&&b.nextButton&&b.nextButton.length>0&&(b.a11y.makeFocusable(b.nextButton),b.a11y.addRole(b.nextButton,"button"),b.a11y.addLabel(b.nextButton,b.params.nextSlideMessage)),b.params.prevButton&&b.prevButton&&b.prevButton.length>0&&(b.a11y.makeFocusable(b.prevButton),b.a11y.addRole(b.prevButton,"button"),b.a11y.addLabel(b.prevButton,b.params.prevSlideMessage)),a(b.container).append(b.a11y.liveRegion)},initPagination:function(){b.params.pagination&&b.params.paginationClickable&&b.bullets&&b.bullets.length&&b.bullets.each(function(){var e=a(this);b.a11y.makeFocusable(e),b.a11y.addRole(e,"button"),b.a11y.addLabel(e,b.params.paginationBulletMessage.replace(/{{index}}/,e.index()+1))})},destroy:function(){b.a11y.liveRegion&&b.a11y.liveRegion.length>0&&b.a11y.liveRegion.remove()}},b.init=function(){b.params.loop&&b.createLoop(),b.updateContainerSize(),b.updateSlidesSize(),b.updatePagination(),b.params.scrollbar&&b.scrollbar&&(b.scrollbar.set(),b.params.scrollbarDraggable&&b.scrollbar.enableDraggable()),"slide"!==b.params.effect&&b.effects[b.params.effect]&&(b.params.loop||b.updateProgress(),b.effects[b.params.effect].setTranslate()),b.params.loop?b.slideTo(b.params.initialSlide+b.loopedSlides,0,b.params.runCallbacksOnInit):(b.slideTo(b.params.initialSlide,0,b.params.runCallbacksOnInit),0===b.params.initialSlide&&(b.parallax&&b.params.parallax&&b.parallax.setTranslate(),b.lazy&&b.params.lazyLoading&&(b.lazy.load(),b.lazy.initialImageLoaded=!0))),b.attachEvents(),b.params.observer&&b.support.observer&&b.initObservers(),b.params.preloadImages&&!b.params.lazyLoading&&b.preloadImages(),b.params.zoom&&b.zoom&&b.zoom.init(),b.params.autoplay&&b.startAutoplay(),b.params.keyboardControl&&b.enableKeyboardControl&&b.enableKeyboardControl(),b.params.mousewheelControl&&b.enableMousewheelControl&&b.enableMousewheelControl(),b.params.hashnavReplaceState&&(b.params.replaceState=b.params.hashnavReplaceState),b.params.history&&b.history&&b.history.init(),b.params.hashnav&&b.hashnav&&b.hashnav.init(),b.params.a11y&&b.a11y&&b.a11y.init(),b.emit("onInit",b)},b.cleanupStyles=function(){b.container.removeClass(b.classNames.join(" ")).removeAttr("style"),b.wrapper.removeAttr("style"),b.slides&&b.slides.length&&b.slides.removeClass([b.params.slideVisibleClass,b.params.slideActiveClass,b.params.slideNextClass,b.params.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-column").removeAttr("data-swiper-row"),b.paginationContainer&&b.paginationContainer.length&&b.paginationContainer.removeClass(b.params.paginationHiddenClass),b.bullets&&b.bullets.length&&b.bullets.removeClass(b.params.bulletActiveClass),b.params.prevButton&&a(b.params.prevButton).removeClass(b.params.buttonDisabledClass),b.params.nextButton&&a(b.params.nextButton).removeClass(b.params.buttonDisabledClass),b.params.scrollbar&&b.scrollbar&&(b.scrollbar.track&&b.scrollbar.track.length&&b.scrollbar.track.removeAttr("style"),b.scrollbar.drag&&b.scrollbar.drag.length&&b.scrollbar.drag.removeAttr("style"))},b.destroy=function(e,a){b.detachEvents(),b.stopAutoplay(),b.params.scrollbar&&b.scrollbar&&b.params.scrollbarDraggable&&b.scrollbar.disableDraggable(),b.params.loop&&b.destroyLoop(),a&&b.cleanupStyles(),b.disconnectObservers(),b.params.zoom&&b.zoom&&b.zoom.destroy(),b.params.keyboardControl&&b.disableKeyboardControl&&b.disableKeyboardControl(),b.params.mousewheelControl&&b.disableMousewheelControl&&b.disableMousewheelControl(),b.params.a11y&&b.a11y&&b.a11y.destroy(),b.params.history&&!b.params.replaceState&&window.removeEventListener("popstate",b.history.setHistoryPopState),b.params.hashnav&&b.hashnav&&b.hashnav.destroy(),b.emit("onDestroy"),e!==!1&&(b=null)},b.init(),b}};t.prototype={isSafari:function(){var e=window.navigator.userAgent.toLowerCase();return e.indexOf("safari")>=0&&e.indexOf("chrome")<0&&e.indexOf("android")<0}(),isUiWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent),isArray:function(e){return"[object Array]"===Object.prototype.toString.apply(e)},browser:{ie:window.navigator.pointerEnabled||window.navigator.msPointerEnabled,ieTouch:window.navigator.msPointerEnabled&&window.navigator.msMaxTouchPoints>1||window.navigator.pointerEnabled&&window.navigator.maxTouchPoints>1,lteIE9:function(){var e=document.createElement("div");return e.innerHTML="<!--[if lte IE 9]><i></i><![endif]-->",1===e.getElementsByTagName("i").length}()},device:function(){var e=window.navigator.userAgent,a=e.match(/(Android);?[\s\/]+([\d.]+)?/),t=e.match(/(iPad).*OS\s([\d_]+)/),s=e.match(/(iPod)(.*OS\s([\d_]+))?/),i=!t&&e.match(/(iPhone\sOS|iOS)\s([\d_]+)/);return{ios:t||i||s,android:a}}(),support:{touch:window.Modernizr&&Modernizr.touch===!0||function(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)}(),transforms3d:window.Modernizr&&Modernizr.csstransforms3d===!0||function(){var e=document.createElement("div").style;return"webkitPerspective"in e||"MozPerspective"in e||"OPerspective"in e||"MsPerspective"in e||"perspective"in e}(),flexbox:function(){for(var e=document.createElement("div").style,a="alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient".split(" "),t=0;t<a.length;t++)if(a[t]in e)return!0}(),observer:function(){return"MutationObserver"in window||"WebkitMutationObserver"in window}(),passiveListener:function(){var e=!1;try{var a=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassiveListener",null,a)}catch(e){}return e}(),gestures:function(){return"ongesturestart"in window}()},plugins:{}};for(var s=(function(){var e=function(e){var a=this,t=0;for(t=0;t<e.length;t++)a[t]=e[t];return a.length=e.length,this},a=function(a,t){var s=[],i=0;if(a&&!t&&a instanceof e)return a;if(a)if("string"==typeof a){var r,n,o=a.trim();if(o.indexOf("<")>=0&&o.indexOf(">")>=0){var l="div";for(0===o.indexOf("<li")&&(l="ul"),0===o.indexOf("<tr")&&(l="tbody"),0!==o.indexOf("<td")&&0!==o.indexOf("<th")||(l="tr"),0===o.indexOf("<tbody")&&(l="table"),0===o.indexOf("<option")&&(l="select"),n=document.createElement(l),n.innerHTML=a,i=0;i<n.childNodes.length;i++)s.push(n.childNodes[i])}else for(r=t||"#"!==a[0]||a.match(/[ .<>:~]/)?(t||document).querySelectorAll(a):[document.getElementById(a.split("#")[1])],i=0;i<r.length;i++)r[i]&&s.push(r[i])}else if(a.nodeType||a===window||a===document)s.push(a);else if(a.length>0&&a[0].nodeType)for(i=0;i<a.length;i++)s.push(a[i]);return new e(s)};return e.prototype={addClass:function(e){if("undefined"==typeof e)return this;for(var a=e.split(" "),t=0;t<a.length;t++)for(var s=0;s<this.length;s++)this[s].classList.add(a[t]);return this},removeClass:function(e){for(var a=e.split(" "),t=0;t<a.length;t++)for(var s=0;s<this.length;s++)this[s].classList.remove(a[t]);return this},hasClass:function(e){return!!this[0]&&this[0].classList.contains(e)},toggleClass:function(e){for(var a=e.split(" "),t=0;t<a.length;t++)for(var s=0;s<this.length;s++)this[s].classList.toggle(a[t]);return this},attr:function(e,a){if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(var t=0;t<this.length;t++)if(2===arguments.length)this[t].setAttribute(e,a);else for(var s in e)this[t][s]=e[s],this[t].setAttribute(s,e[s]);return this},removeAttr:function(e){for(var a=0;a<this.length;a++)this[a].removeAttribute(e);return this},data:function(e,a){if("undefined"!=typeof a){for(var t=0;t<this.length;t++){var s=this[t];s.dom7ElementDataStorage||(s.dom7ElementDataStorage={}),s.dom7ElementDataStorage[e]=a}return this}if(this[0]){var i=this[0].getAttribute("data-"+e);return i?i:this[0].dom7ElementDataStorage&&e in this[0].dom7ElementDataStorage?this[0].dom7ElementDataStorage[e]:void 0}},transform:function(e){for(var a=0;a<this.length;a++){var t=this[a].style;t.webkitTransform=t.MsTransform=t.msTransform=t.MozTransform=t.OTransform=t.transform=e}return this},transition:function(e){"string"!=typeof e&&(e+="ms");for(var a=0;a<this.length;a++){var t=this[a].style;t.webkitTransitionDuration=t.MsTransitionDuration=t.msTransitionDuration=t.MozTransitionDuration=t.OTransitionDuration=t.transitionDuration=e}return this},on:function(e,t,s,i){function r(e){var i=e.target;if(a(i).is(t))s.call(i,e);else for(var r=a(i).parents(),n=0;n<r.length;n++)a(r[n]).is(t)&&s.call(r[n],e)}var n,o,l=e.split(" ");for(n=0;n<this.length;n++)if("function"==typeof t||t===!1)for("function"==typeof t&&(s=arguments[1],i=arguments[2]||!1),o=0;o<l.length;o++)this[n].addEventListener(l[o],s,i);else for(o=0;o<l.length;o++)this[n].dom7LiveListeners||(this[n].dom7LiveListeners=[]),this[n].dom7LiveListeners.push({listener:s,liveListener:r}),this[n].addEventListener(l[o],r,i);return this},off:function(e,a,t,s){for(var i=e.split(" "),r=0;r<i.length;r++)for(var n=0;n<this.length;n++)if("function"==typeof a||a===!1)"function"==typeof a&&(t=arguments[1],s=arguments[2]||!1),this[n].removeEventListener(i[r],t,s);else if(this[n].dom7LiveListeners)for(var o=0;o<this[n].dom7LiveListeners.length;o++)this[n].dom7LiveListeners[o].listener===t&&this[n].removeEventListener(i[r],this[n].dom7LiveListeners[o].liveListener,s);return this},once:function(e,a,t,s){function i(n){t(n),r.off(e,a,i,s)}var r=this;"function"==typeof a&&(a=!1,t=arguments[1],s=arguments[2]),r.on(e,a,i,s)},trigger:function(e,a){for(var t=0;t<this.length;t++){var s;try{s=new window.CustomEvent(e,{detail:a,bubbles:!0,cancelable:!0})}catch(t){s=document.createEvent("Event"),s.initEvent(e,!0,!0),s.detail=a}this[t].dispatchEvent(s)}return this},transitionEnd:function(e){function a(r){if(r.target===this)for(e.call(this,r),t=0;t<s.length;t++)i.off(s[t],a)}var t,s=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"],i=this;if(e)for(t=0;t<s.length;t++)i.on(s[t],a);return this},width:function(){return this[0]===window?window.innerWidth:this.length>0?parseFloat(this.css("width")):null},outerWidth:function(e){return this.length>0?e?this[0].offsetWidth+parseFloat(this.css("margin-right"))+parseFloat(this.css("margin-left")):this[0].offsetWidth:null},height:function(){return this[0]===window?window.innerHeight:this.length>0?parseFloat(this.css("height")):null},outerHeight:function(e){return this.length>0?e?this[0].offsetHeight+parseFloat(this.css("margin-top"))+parseFloat(this.css("margin-bottom")):this[0].offsetHeight:null},offset:function(){if(this.length>0){var e=this[0],a=e.getBoundingClientRect(),t=document.body,s=e.clientTop||t.clientTop||0,i=e.clientLeft||t.clientLeft||0,r=window.pageYOffset||e.scrollTop,n=window.pageXOffset||e.scrollLeft;return{top:a.top+r-s,left:a.left+n-i}}return null},css:function(e,a){var t;if(1===arguments.length){if("string"!=typeof e){for(t=0;t<this.length;t++)for(var s in e)this[t].style[s]=e[s];return this}if(this[0])return window.getComputedStyle(this[0],null).getPropertyValue(e)}if(2===arguments.length&&"string"==typeof e){for(t=0;t<this.length;t++)this[t].style[e]=a;return this}return this},each:function(e){for(var a=0;a<this.length;a++)e.call(this[a],a,this[a]);return this},html:function(e){if("undefined"==typeof e)return this[0]?this[0].innerHTML:void 0;for(var a=0;a<this.length;a++)this[a].innerHTML=e;return this},text:function(e){if("undefined"==typeof e)return this[0]?this[0].textContent.trim():null;for(var a=0;a<this.length;a++)this[a].textContent=e;return this},is:function(t){if(!this[0])return!1;var s,i;if("string"==typeof t){var r=this[0];if(r===document)return t===document;if(r===window)return t===window;if(r.matches)return r.matches(t);if(r.webkitMatchesSelector)return r.webkitMatchesSelector(t);if(r.mozMatchesSelector)return r.mozMatchesSelector(t);if(r.msMatchesSelector)return r.msMatchesSelector(t);for(s=a(t),i=0;i<s.length;i++)if(s[i]===this[0])return!0;return!1}if(t===document)return this[0]===document;if(t===window)return this[0]===window;if(t.nodeType||t instanceof e){for(s=t.nodeType?[t]:t,i=0;i<s.length;i++)if(s[i]===this[0])return!0;return!1}return!1},index:function(){if(this[0]){for(var e=this[0],a=0;null!==(e=e.previousSibling);)1===e.nodeType&&a++;return a}},eq:function(a){if("undefined"==typeof a)return this;var t,s=this.length;return a>s-1?new e([]):a<0?(t=s+a,new e(t<0?[]:[this[t]])):new e([this[a]])},append:function(a){var t,s;for(t=0;t<this.length;t++)if("string"==typeof a){var i=document.createElement("div");for(i.innerHTML=a;i.firstChild;)this[t].appendChild(i.firstChild)}else if(a instanceof e)for(s=0;s<a.length;s++)this[t].appendChild(a[s]);else this[t].appendChild(a);return this},prepend:function(a){var t,s;for(t=0;t<this.length;t++)if("string"==typeof a){var i=document.createElement("div");for(i.innerHTML=a,s=i.childNodes.length-1;s>=0;s--)this[t].insertBefore(i.childNodes[s],this[t].childNodes[0])}else if(a instanceof e)for(s=0;s<a.length;s++)this[t].insertBefore(a[s],this[t].childNodes[0]);else this[t].insertBefore(a,this[t].childNodes[0]);return this},insertBefore:function(e){for(var t=a(e),s=0;s<this.length;s++)if(1===t.length)t[0].parentNode.insertBefore(this[s],t[0]);else if(t.length>1)for(var i=0;i<t.length;i++)t[i].parentNode.insertBefore(this[s].cloneNode(!0),t[i])},insertAfter:function(e){for(var t=a(e),s=0;s<this.length;s++)if(1===t.length)t[0].parentNode.insertBefore(this[s],t[0].nextSibling);else if(t.length>1)for(var i=0;i<t.length;i++)t[i].parentNode.insertBefore(this[s].cloneNode(!0),t[i].nextSibling)},next:function(t){return new e(this.length>0?t?this[0].nextElementSibling&&a(this[0].nextElementSibling).is(t)?[this[0].nextElementSibling]:[]:this[0].nextElementSibling?[this[0].nextElementSibling]:[]:[])},nextAll:function(t){var s=[],i=this[0];if(!i)return new e([]);for(;i.nextElementSibling;){var r=i.nextElementSibling;t?a(r).is(t)&&s.push(r):s.push(r),i=r}return new e(s)},prev:function(t){return new e(this.length>0?t?this[0].previousElementSibling&&a(this[0].previousElementSibling).is(t)?[this[0].previousElementSibling]:[]:this[0].previousElementSibling?[this[0].previousElementSibling]:[]:[])},prevAll:function(t){var s=[],i=this[0];if(!i)return new e([]);for(;i.previousElementSibling;){var r=i.previousElementSibling;t?a(r).is(t)&&s.push(r):s.push(r),i=r}return new e(s)},parent:function(e){for(var t=[],s=0;s<this.length;s++)e?a(this[s].parentNode).is(e)&&t.push(this[s].parentNode):t.push(this[s].parentNode);return a(a.unique(t))},parents:function(e){for(var t=[],s=0;s<this.length;s++)for(var i=this[s].parentNode;i;)e?a(i).is(e)&&t.push(i):t.push(i),i=i.parentNode;return a(a.unique(t))},find:function(a){for(var t=[],s=0;s<this.length;s++)for(var i=this[s].querySelectorAll(a),r=0;r<i.length;r++)t.push(i[r]);return new e(t)},children:function(t){for(var s=[],i=0;i<this.length;i++)for(var r=this[i].childNodes,n=0;n<r.length;n++)t?1===r[n].nodeType&&a(r[n]).is(t)&&s.push(r[n]):1===r[n].nodeType&&s.push(r[n]);return new e(a.unique(s))},remove:function(){for(var e=0;e<this.length;e++)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this},add:function(){var e,t,s=this;for(e=0;e<arguments.length;e++){var i=a(arguments[e]);for(t=0;t<i.length;t++)s[s.length]=i[t],s.length++}return s}},a.fn=e.prototype,a.unique=function(e){for(var a=[],t=0;t<e.length;t++)a.indexOf(e[t])===-1&&a.push(e[t]);return a},a}()),i=["jQuery","Zepto","Dom7"],r=0;r<i.length;r++)window[i[r]]&&e(window[i[r]]);var n;n="undefined"==typeof s?window.Dom7||window.Zepto||window.jQuery:s,n&&("transitionEnd"in n.fn||(n.fn.transitionEnd=function(e){function a(r){if(r.target===this)for(e.call(this,r),t=0;t<s.length;t++)i.off(s[t],a)}var t,s=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"],i=this;if(e)for(t=0;t<s.length;t++)i.on(s[t],a);return this}),"transform"in n.fn||(n.fn.transform=function(e){for(var a=0;a<this.length;a++){var t=this[a].style;t.webkitTransform=t.MsTransform=t.msTransform=t.MozTransform=t.OTransform=t.transform=e}return this}),"transition"in n.fn||(n.fn.transition=function(e){"string"!=typeof e&&(e+="ms");for(var a=0;a<this.length;a++){var t=this[a].style;t.webkitTransitionDuration=t.MsTransitionDuration=t.msTransitionDuration=t.MozTransitionDuration=t.OTransitionDuration=t.transitionDuration=e;
}return this}),"outerWidth"in n.fn||(n.fn.outerWidth=function(e){return this.length>0?e?this[0].offsetWidth+parseFloat(this.css("margin-right"))+parseFloat(this.css("margin-left")):this[0].offsetWidth:null})),window.Swiper=t}(),"undefined"!=typeof module?module.exports=window.Swiper:"function"==typeof define&&define.amd&&define([],function(){"use strict";return window.Swiper});
//# sourceMappingURL=maps/swiper.min.js.map
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 diagnosisList = r => require.ensure([], () => r(require('../views/IM/diagnosis-admin/diagnosis-list.vue')), 'diagnosisList')
const diagnosisIm = r => require.ensure([], () => r(require('../views/IM/diagnosis-admin/diagnosis-im.vue')), 'diagnosisIm')
const diagnosisLive = r => require.ensure([], () => r(require('../views/IM/diagnosis-admin/diagnosis-live.vue')), 'diagnosisLive')
const discuss = r => require.ensure([], () => r(require('../views/discuss/index.vue')), 'index') const serviceList = r => require.ensure([], () => r(require('../views/IM/diagnosis-admin/service-list.vue')), 'serviceList')
const creatDiscuss = r => require.ensure([], () => r(require('../views/discuss/add-edit.vue')), 'creatDiscuss') const assistList = r => require.ensure([], () => r(require('../views/IM/diagnosis-admin/assist-list.vue')), 'assistList')
const questionNaire = r => require.ensure([], () => r(require('../views/question-naire/question-list.vue')), 'questionNaire') const diagnosisEditor = r => require.ensure([], () => r(require('../views/IM/diagnosis-admin/diagnosis-editor.vue')), 'diagnosisEditor')
const diagnosisListNew = r => require.ensure([], () => r(require('../views/IM/diagnosis-admin/diagnosis-list-new.vue')), 'diagnosisListNew')
const topicList = r => require.ensure([], () => r(require('../views/topicManage/index.vue')), 'topicList') const downList = r => require.ensure([], () => r(require('../views/IM/diagnosis-admin/down-list.vue')), 'downList')
const reportSet = r => require.ensure([], () => r(require('../views/report/reportSet.vue')), 'reportSet') const operation= r => require.ensure([], () => r(require('../views/IM/diagnosis-admin/operation.vue')), 'downList')
export default [{ export default [{
path: '/', path: '/',
component: App, component: App,
mode: 'history',
children: [ children: [
{ {
path: '', path: '',
redirect: '/home' redirect: '/diagnosis-list'
},{ }, {
path: '/questionNaire', path: '/diagnosis-list',
component: questionNaire component: diagnosisList,
meta: {
keepAlive: true // 需要被缓存
}
}, {
path: '/diagnosis-im',
component: diagnosisIm
}, {
path: '/diagnosis-live',
component: diagnosisLive
}, {
path: '/service-List',
component: serviceList
}, {
path: '/assist-list',
component: assistList
}, {
path: '/diagnosis-editor',
component: diagnosisEditor
}, {
path: '/diagnosis-list-new',
component: diagnosisListNew
}, {
path: '/down-list',
component: downList
},{ },{
path: '/home', path: '/operation',
component: home component: operation
}, }
{
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
},
] ]
}] }]
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,
time:null,
}, },
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;
},
SET_TIME(state,data){
state.time = data
} }
}, },
actions: { actions: {
changeToken({ commit }, tokenData) { changeToken({ commit }, tokenData) {
commit('CHANGE_TOKEN', tokenData) commit('CHANGE_TOKEN', tokenData)
}, },
changeIdType({ commit }, idTypeData) { changeTime({ commit }, time) {
commit('CHANGE_IDTYPE', idTypeData) commit('SET_TIME', tokenData)
} },
} }
} }
......
const getters = { const getters = {
_token: state => state.common._token, _token: state => state.common._token,
idType: state => state.common.idType isFromAssignTask: state => state.common.isFromAssignTask,
time:state => state.common.time,
} }
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'
......
...@@ -26,29 +26,31 @@ body, div, span, header, footer, nav, section, aside, article, ul, dl, dt, dd, l ...@@ -26,29 +26,31 @@ body, div, span, header, footer, nav, section, aside, article, ul, dl, dt, dd, l
} }
} }
/*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/ /*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/
::-webkit-scrollbar // ::-webkit-scrollbar
{ // {
width: 0px; // width: 0px;
height: 0px; // height: 0px;
background-color: #fff; // background-color: #fff;
} // }
/*定义滚动条轨道 内阴影+圆角*/ /*定义滚动条轨道 内阴影+圆角*/
::-webkit-scrollbar-track // ::-webkit-scrollbar-track
{ // {
-webkit-box-shadow: inset 0 0 1px rgba(0,0,0,0); // -webkit-box-shadow: inset 0 0 1px rgba(0,0,0,0);
border-radius: 10px; // border-radius: 10px;
background-color: #fff; // background-color: #fff;
} // }
/*定义滑块 内阴影+圆角*/ /*定义滑块 内阴影+圆角*/
::-webkit-scrollbar-thumb // ::-webkit-scrollbar-thumb
{ // {
border-radius: 10px; // border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3); // -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
background-color: #555; // background-color: #555;
} // }
input[type="button"], input[type="submit"], input[type="search"], input[type="reset"] { input[type="button"], input[type="submit"], input[type="search"], input[type="reset"] {
-webkit-appearance: none; -webkit-appearance: none;
...@@ -121,12 +123,12 @@ html,body{ ...@@ -121,12 +123,12 @@ html,body{
animation: backOpacity 2s ease-in-out infinite; animation: backOpacity 2s ease-in-out infinite;
} }
// 屏幕适配 // 屏幕适配
@media screen and (min-width:1240px) and (max-width:1900px){ @media screen and (min-width: 1240px) and (max-width: 1900px){
.screenSet{ .screenSet{
// width: 163vh !important; // width: 163vh !important;
// height: 66vh !important; // height: 66vh !important;
// height: 430px !important; // height: 430px !important;
margin: 88px 30px 0px; margin: 20px 30px 0px;
overflow: auto; overflow: auto;
} }
} }
...@@ -136,7 +138,7 @@ html,body{ ...@@ -136,7 +138,7 @@ html,body{
// height: 78vh !important; // height: 78vh !important;
// height: 800px !important; // height: 800px !important;
overflow: auto; overflow: auto;
margin: 88px 30px 0px; margin: 20px 30px 0px;
} }
} }
...@@ -199,30 +201,30 @@ html,body{ ...@@ -199,30 +201,30 @@ html,body{
.el-button--primary { .el-button--primary {
line-height: 40px; line-height: 40px;
background: #449284 !important; background: #0D9078 !important;
border: 1px solid #449284 !important; border: 1px solid #0D9078 !important;
} }
.el-button.is-disabled { .el-button.is-disabled {
background: #449284 !important; background: #0D9078 !important;
border: 1px solid #449284 !important; border: 1px solid #0D9078 !important;
opacity: 0.5; opacity: 0.5;
} }
.el-pagination.is-background .el-pager li:not(.disabled).active { .el-pagination.is-background .el-pager li:not(.disabled).active {
background: #449284 !important; background: #0D9078 !important;
} }
// 主题样式修改 // 主题样式修改
.el-radio__input.is-checked .el-radio__inner { .el-radio__input.is-checked .el-radio__inner {
border-color: #449284 !important; border-color: #0D9078 !important;
background: #449284 !important; background: #0D9078 !important;
} }
.el-radio__input.is-checked+.el-radio__label, .el-tabs__item.is-active ,.el-checkbox__input.is-checked+.el-checkbox__label{ .el-radio__input.is-checked+.el-radio__label, .el-tabs__item.is-active ,.el-checkbox__input.is-checked+.el-checkbox__label{
color: #449284 !important; color: #0D9078 !important;
} }
.el-checkbox__input.is-checked .el-checkbox__inner, .el-checkbox__input.is-indeterminate .el-checkbox__inner{ .el-checkbox__input.is-checked .el-checkbox__inner, .el-checkbox__input.is-indeterminate .el-checkbox__inner{
border-color: #449284 !important; border-color: #0D9078 !important;
background: #449284 !important; background: #0D9078 !important;
} }
// 面包屑导航 // 面包屑导航
...@@ -230,5 +232,38 @@ html,body{ ...@@ -230,5 +232,38 @@ html,body{
font-weight: 300 !important; font-weight: 300 !important;
} }
.el-breadcrumb__inner.is-link:hover { .el-breadcrumb__inner.is-link:hover {
color: #449284 !important; color: #0D9078 !important;
} }
.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
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
} }
.button-green { .button-green {
color: #ffffff; color: #ffffff;
background: #449284; background: #0D9078;
border-color: #bfdad5; border-color: #bfdad5;
border-radius: 2px; border-radius: 2px;
} }
...@@ -120,3 +120,17 @@ ...@@ -120,3 +120,17 @@
border-color: #ecedf1; border-color: #ecedf1;
border-radius: 2px; border-radius: 2px;
} }
.el-button--text > span{
// font-weight: 700;
color: #0D9078 !important;
}
.el-form-item .el-form-item__label{
font-size: 14px !important;
}
.link-form {
.el-dialog__title {
font-size: 16px !important;
font-weight: 700;
}
}
...@@ -3,59 +3,641 @@ ...@@ -3,59 +3,641 @@
* *
*/ */
// 分页大小 //预约类型list
export const PAGE_SIZE = 10 export const TYPE_LIST = [
{
label: '全部',
value: ''
},
{
label: '语音问诊',
value: 1
},
{
label: '视频问诊',
value: 2
},
{
label: '图文问诊',
value: 3
}
]
// 问卷--模板下载 // 支付方式
export const QUESTION_UPLOAD_TEMPLATE = 'https://files.yunqueyi.com/discuss/question/templet/questionTemplet1010.xlsx' export const PAY_LIST = [
{
label: '代付',
value: 1
},
{
label: '扫码支付',
value: 2
},
{
label: '分享支付',
value: 3
}
]
/* 是否使用Mock数据 */ // 订单来源
export const IS_MOCK_DATAS = true export const SOURCE_LIST = [
{
label: '全部',
value: ''
},
{
label: '铁军反馈',
value: 1
},
{
label: '主动联系',
value: 2
},
{
label: '问卷收集',
value: 3
},
{
label: '微信群反馈',
value: 4
},
{
label: '话题讨论与回复',
value: 5
}
]
// 通用状态 全部/正常/停用 // 订单状态
export const COMMON_STATUS_OPTIONS = [ export const STATUS_LIST = [
{
label: '初始状态(未支付)',
value: 1
},
{
label: '待问诊(支付成功待完善)',
value: 2
},
{ {
value: '', label: '问诊中(已完善)',
label: '启用状态' value: 3
}, { },
value: 0, {
label: '正常' label: '已问诊',
}, { value: 4
value: 1, },
label: '停用' {
label: '已取消',
value: 5
},
{
label: '已结算',
value: 6
},
{
label: '已匹配',
value: 21
},
{
label: '待分诊',
value: 22
},
{
label: '待匹配医生',
value: 23
},
{
label: '待协调医生',
value: 24
},
{
label: '待确认时间',
value: 25
},
{
label: '待问诊',
value: 26
}
]
//证件类型
export const CAR_LIST = [
{
label: '居民身份证',
value: 1
}
// {
// label: '护照',
// value: 2
// },
// {
// label: '港澳通行证',
// value: 3
// }
]
// 性别
export const SEX_LIST = [
{
label: '男',
value: 1
},
{
label: '女',
value: 2
} }
] ]
// 识别状态 全部/未标记/正常/误识 // 与患者关系
export const RECORD_STATUS_OPTIONS = [ export const RELATION_LIST = [
{
label: '自己',
value: 1
},
{
label: '患者',
value: 2
},
{ {
value: '', label: '家属',
label: '标记状态' value: 3
}, { },
value: '0', {
label: '未标记' label: '朋友',
}, { value: 4
value: '1',
label: '正常'
}, {
value: '2',
label: '误识'
} }
] ]
// 用户类型 全部/普通用户/VIP/黑名单 // 医生来源
export const USER_TYPE_OPTIONS = [ export const D_S_LIST = [
{
label: '全部',
value: ''
},
{
label: '京东',
value: 1
},
{ {
value: '', label: '同事推荐',
label: '用户类型' value: 2
}, { },
value: 1, {
label: '普通用户' label: '云鹊医平台',
}, { value: 3
value: 2,
label: 'VIP'
}, {
value: 3,
label: '黑名单'
} }
] ]
// 是否跟进
export const IS_FLLOW = [
{
label: '全部',
value: ''
},
{
label: '是',
value: 1
},
{
label: '否',
value: 2
},
]
// 创建订单方式
export const CREATE_TYPE = [
{
label: '全部',
value: ''
},
{
label: '系统创建',
value: 1
},
{
label: '手动创建',
value: 2
},
]
// 是否匹配
export const OPERATE_LIST = [
{
label: '全部',
value: ''
},
{
label: '已分配',
value: 1
},
{
label: '未分配',
value: 2
},
]
// 跟进状态
export const FOLLW_LIST = [
{
label: '待跟进',
value: 1
},
{
label: '跟进中(协调资源)',
value: 2
},
{
label: '已完成(跟进结束)',
value: 3
},
{
label: '长期跟进',
value: 4
},
]
//0 只填写了患者信息(急速问诊才会有的状态),1 初始状态(未支付),2待问诊(支付成功待完善)3 问诊中(已完善),4、已问诊 5、取消, 6 已结算
//21 已匹配 22 待分诊 23 待匹配接诊医生 24 待协调医生 25 待设置问诊时间 26 待问诊
//预约单列表
export const ALL_TAB_LIST = [
{
label: '全部',
active: '99'
},
{
label: '待匹配',
active: '2'
},
{
label: '已匹配',
active: '102'
},
{
label: '稍后跟进',
active: '101'
},
{
label: '待分诊',
active: '22'
},
{
label: '待匹配医生',
active: '23'
},
{
label: '待协调医生',
active: '24'
},
{
label: '待确认时间',
active: '25'
},
{
label: '待问诊',
active: '26'
},
{
label: '问诊中',
active: '3'
},
{
label: '已完成',
active: '4'
},
{
label: '已结算',
active: '6'
},
{
label: '已取消',
active: '5'
}
]
//运营预约单列表
export const RUN_TAB_LIST = [
{
label: '全部',
active: '99'
},
// {
// label: '待匹配',
// active: '2'
// },
// {
// label: '已匹配',
// active: '21'
// },
// {
// label: '待确认时间',
// active: '25'
// },
{
label: '待问诊',
active: '26'
},
{
label: '问诊中',
active: '3'
},
{
label: '已完成',
active: '4'
},
{
label: '已结算',
active: '6'
},
{
label: '已取消',
active: '5'
}
]
// 分诊列表
export const TRIAGE_TAB_LIST = [
{
label: '全部',
active: '99'
},
// {
// label: '待分诊',
// active: '22'
// },
{
label: '待匹配',
active: '2'
},
]
// 接诊列表
export const RECEPTION_TAB_LIST = [
{
label: '全部',
active: '99'
},
{
label: '待匹配医生',
active: '23'
},
{
label: '待协调医生',
active: '24'
},
{
label: '待确认时间',
active: '25'
},
]
// 外呼列表
export const MATCH_TAB_LIST = [
{
label: '全部',
active: '99'
},
{
label: '已匹配',
active: '102'
},
{
label: '稍后跟进',
active: '101'
}
]
export const TABLE_COLUMN = [
{
prop: "diagnoseLogId",
label: "ID",
showtooltip: false,
},
{
prop: "orderNo",
label: "订单ID",
showtooltip: false,
},
{
prop: "diagnoseTypeStr",
label: "预约类型",
showtooltip: false,
},
{
prop: "statusStr",
label: "状态",
showtooltip: false,
},
{
prop: "statusRemark",
label: "状态备注",
showtooltip: false,
},
{
prop: "toFollowReason",
label: "稍后跟进备注",
showtooltip: false,
},
{
prop: "appointBeginTime",
label: "预约时间",
showtooltip: false,
},
{
prop: "operateUserId",
label: "运营人员ID",
showtooltip: false,
},
{
prop: "operateUserName",
label: "运营人员",
showtooltip: false,
},
{
prop: "userName",
label: "助诊医生",
showtooltip: false,
},
{
prop: "userMobile",
label: "助诊电话",
showtooltip: false,
},
{
prop: "assistantBeginTime",
label: "助诊医生意向时间",
showtooltip: false,
},
{
prop: "assistantRemark",
label: "助诊备注",
showtooltip: true,
},
{
prop: "department",
label: "预约科室",
showtooltip: false,
},
{
prop: "triageDepartment",
label: "分诊科室",
showtooltip: false,
},
{
prop: "triageRemark",
label: "分诊备注",
showtooltip: true,
},
{
prop: "doctorName",
label: "接诊医生",
showtooltip: false,
},
{
prop: "doctorMobile",
label: "接诊电话",
showtooltip: false,
},
{
prop: "outsideDoctor",
label: "站外医生姓名",
showtooltip: false,
},
{
prop: "receptionBeginTime",
label: "接诊诊医生意向时间",
showtooltip: false,
},
{
prop: "patientName",
label: "患者姓名",
showtooltip: false,
},
{
prop: "age",
label: "患者年龄",
showtooltip: false,
},
{
prop: "patientMobilePhone",
label: "患者电话",
showtooltip: false,
},
{
prop: "illnessDetail",
label: "病情描述",
showtooltip: true,
},
{
prop: "idCard",
label: "证件号",
showtooltip: false,
},
{
prop: "sexStr",
label: "性别",
showtooltip: false,
},
{
prop: "diagnoseStageStr",
label: "初/复诊",
showtooltip: false,
},
{
prop: "determineFlagStr",
label: "是否确诊",
showtooltip: false,
},
{
prop: "diagnoseDisease",
label: "确诊疾病",
showtooltip: true,
},
{
prop: "triageOperatorName",
label: "分诊运营",
showtooltip: false,
},
{
prop: "receptionOperatorName",
label: "接诊运营",
showtooltip: false,
},
{
prop: "diagnoseAdvice",
label: '诊断建议',
showtooltip: true,
},
{
prop: "crrsName",
label: "招募人",
showtooltip: false,
},
{
prop: "diagnoseChannelStr",
label: "问诊方式",
showtooltip: false,
},
{
prop: "doneTime",
label: "完成时间",
showtooltip: false,
},
{
prop: "cancelTime",
label: "退款时间",
showtooltip: false,
},
{
prop: "createdTime",
label: "创建时间",
showtooltip: false,
},
{
prop: "followFlagStr",
label: "是否跟进",
showtooltip: false,
},
{
prop: "drugFollowStatusStr",
label: "药品跟进状态",
showtooltip: false,
},
{
prop: "drugFollow",
label: "药品跟进",
showtooltip: false,
},
{
prop: "checkFollowStatusStr",
label: "检查跟进状态",
showtooltip: false,
},
{
prop: "checkFollow",
label: "检查跟进",
showtooltip: false,
},
{
prop: "otherFollowStatusStr",
label: "其他跟进事项状态",
showtooltip: false,
},
{
prop: "otherFollow",
label: "其他跟进事项",
showtooltip: false,
},
{
prop: "remark",
label: "跟进备注",
showtooltip: true,
},
]
import fetch from '../fetch';
import { getBaseUrl } from '@/utils/index'
let headers = {
'Content-Type': 'application/json;charset=UTF-8',
token: localStorage.getItem('token'),
};
/*保存问诊相关信息*/
export const updateDiagnosis = (params) => {
return fetch({
headers,
url: getBaseUrl(`/diagnose/admin/diagnose/model/save`),
method: 'post',
data: params,
description: '保存问诊相关信息',
})
};
/*批量设置运营*/
export const batchSetOperator = (params) => {
return fetch({
headers,
url: getBaseUrl(`/diagnose/admin/diagnose/batch/operator`),
method: 'post',
data: params,
description: '批量设置运营',
})
};
/*科室*/
export const getDepList = () => {
return fetch({
headers,
url: getBaseUrl(`/hospital/departments/0`),
method: 'get',
description: '获得科室',
})
};
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,21 +3,23 @@ ...@@ -3,21 +3,23 @@
*/ */
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",
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: '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_login.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: 'picaop_dev',
}, },
dev: { dev: {
baseUrl: 'https://dev-sc.yunqueyi.com', baseUrl: 'https://dev-sc.yunqueyi.com',
...@@ -25,8 +27,10 @@ export const envConfig = { ...@@ -25,8 +27,10 @@ export const envConfig = {
qiniuResourceUrl: "https://test1-videos.yunqueyi.com", qiniuResourceUrl: "https://test1-videos.yunqueyi.com",
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_login.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: 'picaop_dev',
}, },
test: { test: {
baseUrl: 'https://test1-sc.yunqueyi.com', baseUrl: 'https://test1-sc.yunqueyi.com',
...@@ -34,8 +38,10 @@ export const envConfig = { ...@@ -34,8 +38,10 @@ export const envConfig = {
qiniuResourceUrl: "https://test1-videos.yunqueyi.com", qiniuResourceUrl: "https://test1-videos.yunqueyi.com",
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_login.html',
yuequeyiIndexUrl: 'https://test1.yunqueyi.com/pica_index.html' yuequeyiIndexUrl: 'https://test1.yunqueyi.com/pica_index.html',
phomeDemain: 'https://test1-phome.yunqueyi.com',
picakfAccId: 'picaop_test',
}, },
uat: { uat: {
baseUrl: 'https://uat-sc.yunqueyi.com', baseUrl: 'https://uat-sc.yunqueyi.com',
...@@ -45,8 +51,10 @@ export const envConfig = { ...@@ -45,8 +51,10 @@ export const envConfig = {
qiniuImgUrl: "https://test1-file.yunqueyi.com", qiniuImgUrl: "https://test1-file.yunqueyi.com",
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_login.html',
yuequeyiIndexUrl: 'https://uat.yunqueyi.com/pica_index.html' yuequeyiIndexUrl: 'https://uat.yunqueyi.com/pica_index.html',
phomeDemain: 'https://uat-phome.yunqueyi.com',
picakfAccId: 'picaop_uat',
}, },
pro: { pro: {
baseUrl: 'https://sc.yunqueyi.com', baseUrl: 'https://sc.yunqueyi.com',
...@@ -54,7 +62,9 @@ export const envConfig = { ...@@ -54,7 +62,9 @@ export const envConfig = {
qiniuResourceUrl: "https://video.yunqueyi.com", qiniuResourceUrl: "https://video.yunqueyi.com",
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_login.html',
yuequeyiIndexUrl: 'https://www.yunqueyi.com/pica_index.html' yuequeyiIndexUrl: 'https://www.yunqueyi.com/pica_index.html',
phomeDemain: 'https://phome.yunqueyi.com',
picakfAccId: 'picaop',
} }
} }
...@@ -3,6 +3,7 @@ import store from '../store' ...@@ -3,6 +3,7 @@ import store from '../store'
// import { getHostnameAndPort } from '../utils' // import { getHostnameAndPort } from '../utils'
// axios.defaults.withCredentials = true // axios.defaults.withCredentials = true
// 创建axios实例对象
const service = axios.create({ const service = axios.create({
// baseURL: process.env.BASE_API // baseURL: process.env.BASE_API
timeout: 600000, timeout: 600000,
...@@ -12,8 +13,13 @@ const service = axios.create({ ...@@ -12,8 +13,13 @@ const service = axios.create({
// request拦截器 // request拦截器
service.interceptors.request.use(config => { service.interceptors.request.use(config => {
config.headers['sysCode'] = 26 config.headers['sysCode'] = 26
config.headers['token'] = localStorage.getItem('storageToken') config.headers['token'] = localStorage.getItem('token')
config.headers['deviceInfo'] = JSON.stringify({ "app_channel": "", "app_mac": "", "app_uuid": "", "app_version": "", "device_brand": "", "device_ip": "", "device_model": "", "device_net": "", "device_ops": "", "resolution_wh": "", "system_level": "", "device_type": '10' }) config.headers['deviceInfo'] = JSON.stringify({ "app_channel": "", "app_mac": "", "app_uuid": "", "app_version": "", "device_brand": "", "device_ip": "", "device_model": "", "device_net": "", "device_ops": "", "resolution_wh": "", "system_level": "", "device_type": '10' })
Object.assign(config.headers, config.changeHeader)
if (config.fileHeader) {
config.headers['Content-Type'] = 'application/x-www-form-urlencoded'
}
// if (config.data && config.data.setEntry) { // if (config.data && config.data.setEntry) {
// config.headers['sysCode'] = config.data.sysCode || 10 // config.headers['sysCode'] = config.data.sysCode || 10
// if(config.data.token){ // if(config.data.token){
...@@ -22,9 +28,9 @@ service.interceptors.request.use(config => { ...@@ -22,9 +28,9 @@ service.interceptors.request.use(config => {
// config.headers['deviceInfo'] = JSON.stringify({ "app_channel": "", "app_mac": "", "app_uuid": "", "app_version": "", "device_brand": "", "device_ip": "", "device_model": "", "device_net": "", "device_ops": "", "resolution_wh": "", "system_level": "", "device_type": '10' }) // config.headers['deviceInfo'] = JSON.stringify({ "app_channel": "", "app_mac": "", "app_uuid": "", "app_version": "", "device_brand": "", "device_ip": "", "device_model": "", "device_net": "", "device_ops": "", "resolution_wh": "", "system_level": "", "device_type": '10' })
// } // }
return config return config
}, error => { }, error => {
// logger.debug('service.interceptors.request: ', error)
Promise.reject(error) Promise.reject(error)
}) })
...@@ -43,8 +49,6 @@ service.interceptors.response.use( ...@@ -43,8 +49,6 @@ service.interceptors.response.use(
//} //}
}, },
error => { error => {
// logger.error('err' + error)
return Promise.reject(error) return Promise.reject(error)
} }
) )
......
const vueFilter = { const vueFilter = {
liveDateFilter: (value) => { priceFilter: value => {
if (!value) return ''; if(!value) return 0;
return new Date(value).format("yyyy-MM-dd hh:mm:ss"); if(value) {
return (value / 100) + '元'
}
}, },
liveFilter: (value) => { statusFilter: (value) => {
if(value.liveStatus == 1){ if(value == 1) {
return '未开始' return '下架'
} else if(value.liveStatus == 5) { }else if(value == 2) {
return '直播中' return '上架'
}else if(value.liveStatus == 10 && value.lookBackStatus == 2){
return '已结束(不可回看)'
}else if(value.liveStatus == 10 && value.lookBackStatus == 1) {
return '已结束(可回看)'
} }
}, },
liveStatusFilter: (value) => { rounding (value) {
if(value == 1) return "隐藏" if(value != "" && value != null && value != "null"){
else return "发布" return value.toFixed(2);
}
else if(value == 0){
return value.toFixed(2);
}
else {
return value;
}
}, },
liveTeacherType: (value) => { priceNum (value) {
let doctorName = [] if(value != "" && value != null && value != "null"){
if(value.length > 3) { return (value/100).toFixed(2);
for(let i = 0; i < 3; i++) {
doctorName.push(value[i].doctorName)
} }
return doctorName.join("、") + '...' else if(value == 0){
}else{ return (value/100).toFixed(2);
for(let i = 0; i < value.length; i++) {
doctorName.push(value[i].doctorName)
} }
return doctorName.join("、") else {
return value;
} }
}, },
controlType: (value) => { diagnosisTypeFilter: (value) => {
if(value == 1) { if(value == 1) {
return '分页1' return '音频'
}else if(value == 2) { }else if(value == 2) {
return '分页2'
}else if(value == 3) {
return '图片1'
}else if(value == 4) {
return '图片2'
}else if(value == 6) {
return '视频'
}
},
tabControlType: (value) => {
if(value == 3) {
return '图片1'
}else if(value == 4) {
return '图片2'
}else if(value == 6) {
return '视频' return '视频'
} }
}, },
refreshType: (value) => { liveDateFilter: (value) => {
if(value == 1) return "支持"
else return "不支持"
},
moudleType: (value) => {
if(value == 1) return "未激活"
else return "激活"
},
dateFilter: (value) => {
if (!value) return ''; if (!value) return '';
return new Date(value).format("yyyy-MM-dd hh:mm"); return new Date(value).format("yyyy-MM-dd hh:mm:ss");
},
appColumnStatusFilter: (value) => {
if(value == 1) return "未提交"
else if(value == 4) return "已提交"
},
statusFilter: (value) => {
if(value == 1) return "已创建"
else if(value == 5) return "已发布"
else return "已下架"
},
linkTypeFilter: (value) => { // 跳转类型
if(value == 1) return '链接'
else if(value == 4) return '模块'
else return '无跳转'
},
teacherStatusFilter: (value) => {
if(value == 1) return "已下架"
else return "已发布"
}, },
moduleTypeFilter: (value,data) => { // 模块类型 continueTimesFilter: (value, flag) => {
for(let key in data) { if (!value) return '';
if(value == key) { var duration = value / 1000;
return data[key] var s = Math.floor(duration % 60).toString();
} if (s.length < 2) {
s = '0' + s;
} }
}, var m = Math.floor((duration % 3600) / 60).toString();
contentCreatedType: (value,data) => { if (m.length < 2) {
for(let i = 0; i< data.length;i++) { m = '0' + m;
if(value == data[i].id) {
return data[i].name
} }
var h = Math.floor(duration / 60 / 60).toString();
if (h.length < 2) {
h = '0' + h;
} }
if (flag) {
}, return h + ':' + m + ':' + s;
contentModifiedType: (value,data) => { } else {
for(var i=0; i < data.length;i++) { if (parseInt(h) >= 1) {
if(value == data[i].id) { return h + '时' + m + '分' + s + '秒';
return data[i].name } else {
return m + '分' + s + '秒';
} }
} }
}, },
columnPositionType: (value,data) => { // 位置 liveTeacherType: (value) => {
for(let key in data) { let doctorName = []
if(value == key) { if (value.length > 3) {
return data[key] for (let i = 0; i < 3; i++) {
doctorName.push(value[i].doctorName)
} }
return doctorName.join("、") + '...'
} else {
for (let i = 0; i < value.length; i++) {
doctorName.push(value[i].doctorName)
} }
}, return doctorName.join("、")
// 项目组件
statusFileter: (value) => {
if(value == 1) {
return '草稿'
}else if(value == 2) {
return '未启用'
}else if(value == 3) {
return '已启用'
}else {
return '已禁用'
} }
}, },
//项目管理 dateFilter: (value) => {
statusProject: (value) => { if (!value) return '';
if(value == 1) { return new Date(value).format("yyyy-MM-dd hh:mm");
return '草稿'
}else if(value == 2) {
return '未上架'
}else if(value == 3) {
return '审批中'
}else if(value == 4) {
return '已上架'
}else if(value == 5) {
return '已下架'
}else {
return '已拒绝'
}
}, },
projeceRoleType: (value) => { moduleTypeFilter: (value, data) => { // 模块类型
if(value == "L1") { for (let key in data) {
return '内部管理员' if (value == key) {
}else if(value == "L2") { return data[key]
return '项目负责人'
}else if(value == "L3") {
return '次级负责人'
} else if(value == "L4") {
return '普通用户'
} }
},
// 问卷
questionStatus: (value) => {
if(value == 1) {
return '下线'
}else {
return '上线'
} }
}, },
modifyType: (value,data) => { // 时间处理
let userName = '' timeFormat: (value) => {
for(let i=0; i < data.length;i++) { let cTime = new Date().getTime();
if(value == data[i].id) { // var $time = document.getElementById("share-time");
userName = data[i].userName // var date = $time.innerHTML.trim();
break var tt = new Date(parseInt(value));
}else { var days = parseInt((cTime - value) / 86400000);
userName = '' var today = new Date().getDate();
} var year = tt.getFullYear();
} var mouth = tt.getMonth() + 1;
return userName var day = tt.getDate();
var time = tt.getHours() < 10 ? "0" + tt.getHours() : tt.getHours();
var min = tt.getMinutes() < 10 ? "0" + tt.getMinutes() : tt.getMinutes();
var result, offset;
offset = Math.abs(today - day);
if (days < 4 && offset < 4) {
if (offset === 0) {
result = "今天" + time + ":" + min;
} else if (offset === 1) {
result = "昨天" + time + ":" + min;
} else if (offset === 2) {
result = "前天" + time + ":" + min;
}
} else {
result = year + "-" + mouth + "-" + day + " " + time + ":" + min;
}
// $time.innerHTML = result;
return result;
},
// 将字符串截短至指定长度,并用在最后追加特定字符串(例如:...)
shortName: function (value, length = 10, append = '...') {
if (value && value.length > length) {
return value.substring(0, length) + append
} else {
return value
} }
},
} }
export default vueFilter export default vueFilter
...@@ -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,27 @@ function getConfigByEnvType(urlType) { ...@@ -177,3 +152,27 @@ 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')
}
// 根据身份证获取生日
export function getBirth(idCard) {
let birthday = ""
if (idCard != null && idCard != "") {
if (idCard.length == 15) {
birthday = "19" + idCard.slice(6, 12);
} else if (idCard.length == 18) {
birthday = idCard.slice(6, 14);
}
birthday = birthday.replace(/(.{4})(.{2})/, "$1-$2-");
//通过正则表达式来指定输出格式为:1990-01-01
}
return birthday;
}
/* 浏览器兼容提示 */
export const CHECK_BROWSER_TIPS = {
BROWSER_NOT_COMPATIBLE: '您的浏览器不支持直播功能!',
BROWSER_NOT_SUPPORT_SCREEN_SHARE: '您的浏览器不支持直播功能!'
};
export const setLgTenText = time => {
return time < 10 ? `0${time}` : time;
}
export const getLiveTimeText = (lt, name) => {
let hr = parseInt(lt / 1000 / 60 / 60); // 時
let min = parseInt((lt - hr * 1000 * 60 * 60) / 1000 / 60); // 分 ex: 90秒
let sec = parseInt((lt - min * 1000 * 60 - hr * 1000 * 60 * 60) / 1000); // 秒
sessionStorage.setItem(`TIME_${name}`, lt);
return `${setLgTenText(hr)}:${setLgTenText(min)}:${setLgTenText(sec)}`;
}
export const countDown = (endtime) => {
let nowtime = new Date(); //获取当前时间
let time = endtime- nowtime.getTime(); //距离结束时间的毫秒数
if (time > 0) {
let lefth = Math.floor(time / (1000 * 60 * 60) % 24); //计算小时数
let leftm = Math.floor(time / (1000 * 60) % 60); //计算分钟数
let lefts = Math.floor(time / 1000 % 60); //计算秒数
//返回倒计时的字符串
return `${setLgTenText(lefth)}:${setLgTenText(leftm)}:${setLgTenText(lefts)}`;
} else {
return '时间已到'
}
}
export const laseTime = (endtime) => {
let nowtime = new Date(); //获取当前时间
let time = endtime - nowtime.getTime(); //距离结束时间的毫秒数
let lefth = Math.floor(time / (1000 * 60 * 60) % 24); //计算小时数
let leftm = Math.floor(time / (1000 * 60) % 60); //计算分钟数
let lefts = Math.floor(time / 1000 % 60); //计算秒数
return {
lefth,
leftm,
lefts
}
}
export const lastm = (startTime,endTime) => {
let time = endTime - startTime; //距离结束时间的毫秒数
let lefth = Math.floor(time / (1000 * 60 * 60) % 24); //计算小时数
let leftm = Math.floor(time / (1000 * 60) % 60); //计算分钟数
return lefth * 60 + leftm
}
function listCompare(property, way) {
return function (obj1, obj2) {
var value1 = obj1[property];
var value2 = obj2[property];
return way ? value1 - value2 : value2 - value1; // 升序
}
}
// 参数为条件(如先排角色,后是通话中)
export const listSort = (one, two, three, four, arr) => {
let newList = [] // 新的列表
let callArr = [] // 正在通话的列表
let inviteArr = [] // 邀请中的列表
arr = JSON.parse(JSON.stringify(arr));
let h = arr.sort(listCompare(four))
let a = h.sort(listCompare(three))
let b = a.sort(listCompare(two))
newList = b.sort(listCompare(one, 1))
newList.forEach(item => {
if (item.isCalling) {
callArr.push(item)
}
if (item.inviteCall) {
inviteArr.push(item)
}
});
return {
newList,
callArr,
inviteArr
}
}
export const isWeixin = () => {
let ua = navigator.userAgent.toLowerCase();
return ua.indexOf('micromessenger') != -1
}
export const getBroswer = () => {
let sys = {};
let ua = navigator.userAgent.toLowerCase();
let s;
(s = ua.match(/edge\/([\d.]+)/)) ? sys.edge = s[1] :
(s = ua.match(/rv:([\d.]+)\) like gecko/)) ? sys.ie = s[1] :
(s = ua.match(/msie ([\d.]+)/)) ? sys.ie = s[1] :
(s = ua.match(/firefox\/([\d.]+)/)) ? sys.firefox = s[1] :
(s = ua.match(/chrome\/([\d.]+)/)) ? sys.chrome = s[1] :
(s = ua.match(/opera.([\d.]+)/)) ? sys.opera = s[1] :
(s = ua.match(/version\/([\d.]+).*safari/)) ? sys.safari = s[1] : 0;
if (sys.edge) return { broswer: "Edge", version: sys.edge };
if (sys.ie) return { broswer: "IE", version: sys.ie };
if (sys.firefox) return { broswer: "Firefox", version: sys.firefox };
if (sys.chrome) return { broswer: "Chrome", version: sys.chrome };
if (sys.opera) return { broswer: "Opera", version: sys.opera };
if (sys.safari) return { broswer: "Safari", version: sys.safari };
return { broswer: "", version: "0" };
}
\ No newline at end of file
class RtcClient {
constructor(options) {
this.sdkAppId_ = options.sdkAppId;
this.userId_ = options.userId;
this.userSig_ = options.userSig;
this.roomId_ = options.roomId;
this.role = options.role; // 用户的角色主播还是观众(这里的指的是trtc定义的anchor和audience)
this.nick = options.nick;
this.vueInstance = options.vueInstance;
this.isJoined_ = false;
this.isPublished_ = false;
this.isAudioMuted = false;
this.isVideoMuted = false;
this.localStream_ = null;
this.remoteStreams_ = [];
this.members_ = new Map();
this.inmembers_ = new Map();
this.viewslist = [];
this.isPushing = 0;
try {
this.client_ = TRTC.createClient({
mode: 'live',
sdkAppId: this.sdkAppId_,
userId: this.userId_,
userSig: this.userSig_
});
this.handleEvents();
} catch (error) {
console.log('创建client失败', error)
this.vueInstance.reloadfn()
}
}
// 加入房间
async join() {
if (this.isJoined_) {
// alert('抱歉,您已经在房间里面为了')
return;
}
try {
await this.client_.join({
roomId: this.roomId_,
role: this.role
});
console.log('加入房间trtc成功');
this.isJoined_ = true;
// 不要指定cameraId/microphoneId以避免过度约束
this.localStream_ = TRTC.createStream({
audio: true,
video: false,
userId: this.userId_,
mirror: true
});
this.startRTC()
} catch (e) {
console.error('加入房间失败 ' + e);
this.vueInstance.reloadfn()
}
}
// 打开摄像头
async startRTC() {
// 连麦观众角色切换为主播,开始推流
// 设置视频分辨率等参数
this.localStream_.setVideoProfile({
width: this.vueInstance.viedoParams.webVideoWidth,
height: this.vueInstance.viedoParams.webVideoHeight,
frameRate: this.vueInstance.viedoParams.webVideoFramerate,
bitrate: this.vueInstance.viedoParams.webVideoBitrate /* kpbs */
});
// 避免重复开摄像头
this.stopPush()
}
// 设置本地流
async setLocalVideo() {
if (!this.isJoined_) {
console.warn('请先加入房间');
return;
}
if (this.isPublished_) {
console.warn('您已经发布过了');
return;
}
try {
this.localStream_.initialize().catch(error => {
this.vueInstance.$message({
message: '打开设备失败,请检查您的设备!',
type: 'error'
});
console.error('failed initialize localStream ' + error);
}).then(() => {
// 本地流在主播放器上播放,并且插入到一个关联的box中
// var localVideoWrapEl = document.getElementById('ask');
// this.localStream_.play(localVideoWrapEl, {
// muted: true
// });
//主播直接推流
if (this.role == 'anchor') {
this.publish()
}
}).catch(error => {
this.vueInstance.$message({
message: '麦克风打开失败!',
type: 'error'
});
});
} catch (e) {
this.isPublished_ = false;
}
this.isPublished_ = true;
}
//发布本地流
async publish() {
this.client_ && this.client_.publish(this.localStream_).then(() => {
console.log('本地流发布成功')
this.isPublished_ = true;
// 手动将麦克风打开
this.unmuteLocalAudio()
this.vueInstance.isMicOn = true
}).catch(error => {
console.log('本地流发布失败')
this.isPublished_ = false;
this.vueInstance.reloadfn()
});
}
/**
* 为避免重复推流,先结束当前推流
*/
async stopPush() {
if (this.localStream_ && this.isPublished_ && this.isJoined_) {
this.client_.unpublish(this.localStream_).then(() => {
this.isPublished_ = false;
this.localStream_.stop();
this.setLocalVideo()
});
} else {
this.setLocalVideo()
}
}
// 退出
async leave() {
if (!this.isJoined_) {
console.warn('leave() - please join() firstly');
return;
}
// 如果是正在发布流,就先停止流
await this.unpublish();
// 离开房间
await this.client_.leave();
if (this.localStream_) {
this.muteLocalAudio()
this.localStream_.stop();
this.localStream_.close();
this.localStream_ = null;
}
this.isJoined_ = false;
}
// 退出本地流
async unpublish() {
if (!this.isJoined_) {
console.warn('unpublish() - please join() firstly');
return;
}
if (!this.isPublished_) {
console.warn('RtcClient.unpublish() called but not published yet');
return;
}
await this.client_.unpublish(this.localStream_);
this.isPublished_ = false;
}
//禁用音频轨道
//对于本地流,调用该方法会停止发送音频,远端会触发 Client.on('mute-audio') 事件。
//对于远端流,调用该方法会停止播放音频,但是仍然接收音频数据。
muteLocalAudio() {
this.localStream_.muteAudio();
}
//启用音频轨道
//对于本地流,调用该方法会触发远端 Client.on('unmute-audio') 事件。
//音频轨道默认是开启的,若你调用 muteAudio() 后可用该方法重新启用音频。
unmuteLocalAudio() {
this.localStream_.unmuteAudio();
}
// 禁用视频轨道
// 对于本地流,调用该方法会停止发送视频,远端会触发 Client.on('mute-video') 事件。
// 如果视频是从摄像头采集,此时摄像头灯仍然是亮着的。若想完全禁用视频轨道(即关闭摄像头) ,
// 可以使用 removeTrack() 删除视频轨道然后调用 MediaStreamTrack.stop() 关闭视频轨道(关闭摄像头)。
// 对于远端流,调用该方法会停止播放视频,但是仍然接收视频数据.
muteLocalVideo() {
this.localStream_.muteVideo();
}
//恢复播放音视频
//在某些版本浏览器上移动传入 play() 的 div 容器可能会导致音视频播放器进入 ‘PAUSED’ 状态,此时 需要调用该接口恢复播放。
//由于浏览器自动播放策略的限制,在 play() 返回 PLAY_NOT_ALLOWED 错误后需要引导用户通过手势 调用该接口恢复播放
resumeStreams() {
this.localStream_.resume();
for (let stream of this.remoteStreams_) {
stream.resume();
}
}
// client的一些事件监听
handleEvents() {
// 报错
this.client_.on('error', err => {
console.log('client 报错了--------------------------------------------------------------')
console.log(err)
// alert(err);
window.onbeforeunload = null
location.reload();
});
// 房间被解散了
this.client_.on('client-banned', err => {
console.log('房间被解散了');
});
// 当一个远程同伴(必须推流)进入房间时触发
this.client_.on('peer-join', evt => {
const userId = evt.userId;
console.log('有远程同伴进入房间:', userId)
});
// 当远处的同伴离开房间时触发(删减好友列表)
this.client_.on('peer-leave', evt => {
const userId = evt.userId;
console.log('有远程同伴离开房间:' + userId);
this.remove(userId)
});
// 在添加远程流时触发
this.client_.on('stream-added', evt => {
const remoteStream = evt.stream;
// 获取流的StreamId
const id = remoteStream.getId();
// 获取UserId
const userId = remoteStream.getUserId();
this.members_.set(userId, remoteStream);
this.inmembers_.set(userId, remoteStream);
console.log(`remote stream added: [${userId}] ID: ${id} type: ${remoteStream.getType()}`);
// 我们订阅远端的流
console.log('subscribe to this remote stream');
this.client_.subscribe(remoteStream);
});
// 在订阅远程流时触发
this.client_.on('stream-subscribed', evt => {
const remoteStream = evt.stream;
const id = remoteStream.getId();
const uid = remoteStream.userId_;
this.remoteStreams_.push(remoteStream);
remoteStream.on('player-state-changed', event => {
console.log(`${event.type} player is ${event.state}`);
// 远端流是播放还是暂停状态(显示按钮等画面不同)
if (event.type == 'video' && event.state == 'STOPPED') {
console.log(`${uid}----------远端流为停止`);
this.changeView(uid, 'mask', true)
}
if (event.type == 'video' && event.state == 'PAUSED') {
console.log(`${uid}----------远端流为暂停`);
this.changeView(uid, 'mask', true)
}
if (event.type == 'video' && event.state == 'PLAYING') {
console.log(`${uid}----------远端流为播放`);
this.changeView(uid, 'mask', false)
}
});
// 避免重复加载
for (let i = 0; i < this.viewslist.length; i++) {
if (this.viewslist[i] && uid == this.viewslist[i].userId) {
return
}
}
let isMask = false
// this.viewslist.push({ id: id, userId: uid, nick: uid, mask: isMask, vioce: true })
this.add(id, uid, isMask)
this.vueInstance.addNewMember(uid)
setTimeout(() => {
// 避免其他乱入视频
let index = this.viewslist.findIndex((item => {
if (item && item.userId) {
return item.userId == uid
} else {
return -1
}
}))
if (index < 0) {
return
}
// 播放视频
remoteStream.play(id);
if (!remoteStream.hasVideo()) {
this.changeView(id, 'mask', true)
}
if (!remoteStream.hasAudio()) {
this.changeView(id, 'vioce', false)
}
}, 1000)
});
// 当远程流被移除时触发
this.client_.on('stream-removed', evt => {
const remoteStream = evt.stream;
const id = remoteStream.getId();
const uid = remoteStream.userId_;
console.log(`${uid}------------远程流被移除时触发`);
// 停止播放并删除相应<video>标签
remoteStream.stop();
this.inmembers_.delete(uid)
this.remoteStreams_ = this.remoteStreams_.filter(stream => {
return stream.getId() !== id;
});
this.remove(uid)
});
// 流更新
this.client_.on('stream-updated', evt => {
console.log('=========流更新========stream-updated===================');
console.log(evt);
const remoteStream = evt.stream;
let uid = this.getUidByStreamId(remoteStream.getId());
// remoteStream.hasVideo() // 是否有视频轨道
// remoteStream.hasAudio() //是否有音轨道
// remoteStream.getType() // 主要用于判断一个远端流是主音视频流还是辅路视频流,辅路视频流通常是一个屏幕分享流。
console.log('remoteStream ID: ' + remoteStream.getId() + ' was updated hasAudio: ' +
remoteStream.hasAudio() + ' hasVideo: ' + remoteStream.hasVideo());
});
// 关闭音轨道
this.client_.on('mute-audio', evt => {
this.changeView(evt.userId, 'vioce', false)
console.log(evt.userId + '关闭麦克风============================================');
});
// 打开音轨道
this.client_.on('unmute-audio', evt => {
this.changeView(evt.userId, 'vioce', true)
if (evt.type == 'audio' && evt.state == 'PLAYING' && this.vueInstance.type == 1) {
this.changeView(evt.userId, 'mask', true)
}
});
//关闭视频轨道
this.client_.on('mute-video', evt => {
console.log(evt.userId + '关闭 video==============================================');
this.changeView(evt.userId, 'mask', true);
});
// 打开视频轨道
this.client_.on('unmute-video', evt => {
console.log(evt.userId + '打开 video=============================================');
if (this.members_.get(evt.userId)) {
this.changeView(evt.userId, 'mask', false);
}
});
}
getUidByStreamId(streamId) {
for (let [uid, stream] of this.members_) {
if (stream.getId() == streamId) {
return uid;
}
}
}
// 移除视频数组
remove(userId) {
for(let i = 0; i < this.viewslist.length; i++) {
if (this.viewslist[i] && this.viewslist[i].userId == userId) {
this.viewslist[i] = null
}
}
this.vueInstance.removeMember(userId)
};
// 改变视频数组属性
changeView(id,attr,val) {
for (let i = 0; i < this.viewslist.length; i++) {
if (this.viewslist[i] && (this.viewslist[i].userId == id || this.viewslist[i].id == id)) {
this.viewslist[i][attr] = val
}
}
}
add(id, uid, isMask) {
this.vueInstance.memberList.forEach((ele,index) => {
if (ele.liveUserId == uid) {
this.viewslist[index] = { id: id, userId: uid, nick: uid, mask: isMask, vioce: true }
}
});
}
}
export default RtcClient
...@@ -12,7 +12,7 @@ module.exports = { ...@@ -12,7 +12,7 @@ module.exports = {
// this.token = this.getUrlSearch(location.href, 'token') || (query && query.token) || null // this.token = this.getUrlSearch(location.href, 'token') || (query && query.token) || null
// this.token = this.getUrlKey('token') || (query && query.token) || null // this.token = this.getUrlKey('token') || (query && query.token) || null
}, },
mounted: function() { mounted: function () {
}, },
methods: { methods: {
...@@ -31,12 +31,12 @@ module.exports = { ...@@ -31,12 +31,12 @@ module.exports = {
return '' return ''
}, },
setRouterParm(paramList){ setRouterParm(paramList) {
let parm = {}; let parm = {};
if(paramList.length<=1){ if (paramList.length <= 1) {
return ''; return '';
} }
for(let i=1;i<paramList.length;i++){ for (let i = 1; i < paramList.length; i++) {
parm[paramList[i].key] = paramList[i].value; parm[paramList[i].key] = paramList[i].value;
} }
return parm; return parm;
...@@ -44,12 +44,12 @@ module.exports = { ...@@ -44,12 +44,12 @@ module.exports = {
// 拼接多个参数 // 拼接多个参数
getUrlParmByCode(paramList) { getUrlParmByCode(paramList) {
if ( paramList.length <= 1) { if (paramList.length <= 1) {
return '' return ''
} }
let dataStr = '' let dataStr = ''
let list = []; let list = [];
for( let i = 1; i < paramList.length; i ++) { for (let i = 1; i < paramList.length; i++) {
list.push(paramList[i].key + '=' + paramList[i].value) list.push(paramList[i].key + '=' + paramList[i].value)
} }
dataStr = list.join('&') dataStr = list.join('&')
...@@ -68,7 +68,7 @@ module.exports = { ...@@ -68,7 +68,7 @@ module.exports = {
// 根据条件排序 // 根据条件排序
async searchForOrder(searchCategory = '1', searchValue = '', sortItem = 1, pageSize = 10, sourceData = []) { async searchForOrder(searchCategory = '1', searchValue = '', sortItem = 1, pageSize = 10, sourceData = []) {
if(pageSize <=0 ) return; if (pageSize <= 0) return;
let str2 = (searchValue || '').replace(/[\-\_\,\!\|\~\`\(\)\#\$\%\^\&\*\{\}\:\;\"\L\<\>\?]/g, '');// 去掉特殊字符 let str2 = (searchValue || '').replace(/[\-\_\,\!\|\~\`\(\)\#\$\%\^\&\*\{\}\:\;\"\L\<\>\?]/g, '');// 去掉特殊字符
let _this = this, let _this = this,
para = { para = {
...@@ -87,17 +87,17 @@ module.exports = { ...@@ -87,17 +87,17 @@ module.exports = {
// _this.searchText = '' // _this.searchText = ''
if (res.code == '000000') { if (res.code == '000000') {
// 课程 // 课程
if(searchCategory.indexOf('1') >= 0) { if (searchCategory.indexOf('1') >= 0) {
sourceData = (res.data && res.data.contentAppModels) || [] sourceData = (res.data && res.data.contentAppModels) || []
} }
if(searchCategory.indexOf('2') >= 0) { if (searchCategory.indexOf('2') >= 0) {
// sourceData = [] // sourceData = []
sourceData = this.handelFive(res.data.fiveMinutesMedicalContentList || []) sourceData = this.handelFive(res.data.fiveMinutesMedicalContentList || [])
} }
if(searchCategory.indexOf('3') >= 0) { if (searchCategory.indexOf('3') >= 0) {
sourceData = (res.data && res.data.pCourseDoctorModels) || [] sourceData = (res.data && res.data.pCourseDoctorModels) || []
} }
if(searchCategory.indexOf('4') >= 0) { if (searchCategory.indexOf('4') >= 0) {
sourceData = res.data.educationContents sourceData = res.data.educationContents
} }
} }
...@@ -106,17 +106,17 @@ module.exports = { ...@@ -106,17 +106,17 @@ module.exports = {
return csourceData return csourceData
}, },
setEventByModuleCode(itemData){ setEventByModuleCode(itemData) {
let modeCode = itemData.appModuleInfo.code || ''; let modeCode = itemData.appModuleInfo.code || '';
let paramList = itemData.appModuleInfo.paramList ? itemData.appModuleInfo.paramList : '' let paramList = itemData.appModuleInfo.paramList ? itemData.appModuleInfo.paramList : ''
if( modeCode === 'M001' || modeCode === 'M002' || modeCode === 'M003') { if (modeCode === 'M001' || modeCode === 'M002' || modeCode === 'M003') {
paramList = '' paramList = ''
}else if( modeCode === 'M100' || modeCode === 'M300' ) { } else if (modeCode === 'M100' || modeCode === 'M300') {
// 支持多个参数 // 支持多个参数
let urlPara = this.getUrlParmByCode(paramList); let urlPara = this.getUrlParmByCode(paramList);
if(paramList[0]){ if (paramList[0]) {
if( paramList[0].value.indexOf("?") == -1){ if (paramList[0].value.indexOf("?") == -1) {
paramList[0].value += urlPara paramList[0].value += urlPara
} }
} }
...@@ -126,8 +126,8 @@ module.exports = { ...@@ -126,8 +126,8 @@ module.exports = {
let v = paramList[0]['value']; let v = paramList[0]['value'];
let query = this.setRouterParm(paramList); let query = this.setRouterParm(paramList);
paramList = [{ paramList = [{
url:v, url: v,
query:query query: query
}] }]
this.$router.push({ this.$router.push({
path: v, path: v,
...@@ -136,14 +136,14 @@ module.exports = { ...@@ -136,14 +136,14 @@ module.exports = {
//alert(this.token); //alert(this.token);
return 'NO' return 'NO'
} }
if(typeof paramList === 'string' && !paramList){ if (typeof paramList === 'string' && !paramList) {
paramList = [] paramList = []
} }
return paramList; return paramList;
}, },
// 通用GET请求 // 通用GET请求
GET(api, para, callback,str) { GET(api, para, callback, str) {
// para.token = para.token || this.token || "343BCABC890349ACAF357FA79122F9FE" // para.token = para.token || this.token || "343BCABC890349ACAF357FA79122F9FE"
let url = api + this.getUrlPara(para) let url = api + this.getUrlPara(para)
url = encodeURI(url); url = encodeURI(url);
...@@ -155,7 +155,7 @@ module.exports = { ...@@ -155,7 +155,7 @@ module.exports = {
}, },
// 通用DELETE请求 // 通用DELETE请求
DELETE(api, para, callback,str) { DELETE(api, para, callback, str) {
// para.token = para.token || this.token || "343BCABC890349ACAF357FA79122F9FE" // para.token = para.token || this.token || "343BCABC890349ACAF357FA79122F9FE"
let url = api + this.getUrlPara(para) let url = api + this.getUrlPara(para)
return fetch({ return fetch({
...@@ -208,7 +208,48 @@ module.exports = { ...@@ -208,7 +208,48 @@ module.exports = {
} }
} }
return null return null
},
// 图片处理-新
imgSizeHandleNew(item, imgWidth, imgHeight) {
let lw, lh, newW, newH, imgProportion = (imgWidth / imgHeight).toFixed(1);
if (imgProportion > 0.6) {
if (imgWidth > 192) {
lw = 192;
lh = (imgHeight * lw) / imgWidth;
} else if (imgWidth <= 192) {
lw = imgWidth;
lh = imgHeight;
}
} else if (imgProportion == 0.6) {
if (imgHeight > 320) {
lh = 320;
} else {
lh = imgHeight;
} }
lw = lh * 0.6;
} else {
if (imgHeight > 320) {
lh = 320;
lw = (imgWidth * lh) / imgHeight;
} else if (imgHeight <= 320) {
lh = imgHeight;
lw = imgWidth;
}
}
if (lh < 32 && lh < lw) {
newH = 32;
newW = (lw * 32) / lh;
} else if (lw < 32 && lw < lh) {
newW = 32;
newH = (lh * 32) / lw;
} else {
newH = lh;
newW = lw;
}
item.newW = newW;
item.newH = newH;
},
} }
} }
import {isEmptyUtils, isNotEmptyUtils, subString} from "./utils"; import {isEmptyUtils, isNotEmptyUtils, subString} from "./utils";
import fetchQiniu from './fetch-qiniu.js'; import fetchQiniu from './fetch-qiniu.js';
import { getQiniuToken1, uploadVideo, uploadImg } from './index' import { getQiniuToken1, uploadVideo, uploadImg } from './index'
import fetch from "./fetch";
const qiniu = require('qiniu-js');
let fileApiUrl = getQiniuToken1() let fileApiUrl = getQiniuToken1()
//该对象有一个 unsubscribe 方法取消订阅,同时终止上传行为。 //该对象有一个 unsubscribe 方法取消订阅,同时终止上传行为。
...@@ -109,6 +111,139 @@ const doQiniuAction1 = (fileType) => { ...@@ -109,6 +111,139 @@ const doQiniuAction1 = (fileType) => {
}); });
}; };
/**
*
* @param self
* @param file
* @param filePath
* @param previewId
* @param progressId
* @returns {Promise}
*/
export const qiniuUpload = (self, file, filePath, previewId, progressId) => {
// var deferred = $q.defer();
return new Promise(function (resolve, reject) {
if (isEmptyUtils(file) || isEmptyUtils(filePath)) {
console.error('七牛上传失败:非法参数');
reject();
}
let key = filePath ? filePath : getFilePath(file);
//修改状态为上传
self.qiniuUploadStatus = true;
// let token = "BRVB4TpxVFA5Wo6lIpfltmWKOltzGar46tvC3BlR:UHn0LDElwjP4jEZTXdq_1qV6_hw=:eyJzY29wZSI6InBpY2EtdGVzdCIsInJldHVybkJvZHkiOiJ7XCJrZXlcIjpcIiQoa2V5KVwiLFwiaGFzaFwiOlwiJChldGFnKVwiLFwiYnVja2V0XCI6XCIkKGJ1Y2tldClcIixcImZzaXplXCI6JChmc2l6ZSksXCJmbmFtZVwiOiQoZm5hbWUpLFwiZXh0XCI6JChleHQpfSIsImRlYWRsaW5lIjoxNTI5NDk0MTc1fQ==";
doQiniuAction().then(function (token) {
let putExtra = {
fname: file.name, //原文件名
params: {}, //用来放置自定义变量
mimeType: mimeTypeArray || null //null || array,用来限制上传文件类型,为 null 时表示不对文件类型限制;限制类型放到数组里: ["image/png", "image/jpeg", "image/gif"]
};
let config = {
useCdnDomain: true, //表示是否使用 cdn 加速域名,为布尔值,true 表示使用,默认为 false。
region: null //选择上传域名区域;当为 null 或 undefined 时,自动分析上传域名区域
};
/*
* qiniu.upload 返回一个 observable 对象用来控制上传行为,observable 对像通过 subscribe 方法可以被 observer 所订阅,
* 订阅同时会开始触发上传,同时返回一个 subscription 对象,该对象有一个 unsubscribe 方法取消订阅,同时终止上传行为。
* */
let observable = qiniu.upload(file, key, token, putExtra, config);
/**
* 接收上传进度信息,res 参数是一个带有 total 字段的 object,包含loaded、total、percent三个属性,提供上传进
* total.loaded: number,已上传大小,单位为字节。
* total.total: number,本次上传的总量控制信息,单位为字节,注意这里的 total 跟文件大小并不一致。
* total.percent: number,当前上传进度,范围:0~100
* */
let next = function (res) {
//res值{"total":{"loaded":18184,"size":18185,"percent":99.99450096233159}}
//获取百分比进度
let progress = res.total.percent.toFixed(2);
self.uploadProgress = Number(progress);
console.log('Progress1: ' + progress);
};
/**
* 接收上传完成后的后端返回信息,res 参数为一个 object, 为上传成功后后端返回的信息
* ,具体返回结构取决于后端sdk的配置,可参考上传策略(https://developer.qiniu.com/kodo/manual/1206/put-policy)
* */
let complete = function (res) {
console.log("七牛上传完成");
setTimeout(function(){
result.key = res.key;
result.path = '/' + res.key;
result.fullPath = domain + '/' + res.key + '?v=' + new Date().getTime();
result.size = res.fsize;
result.name = res.fname ;
result.ext = res.ext;
resolve(result);
self.qiniuUploadStatus = false;
if (isNotEmptyUtils(previewId)) {
let address = domain + result.path;
console.log('文件路径: ' + address);
//显示图片
let $img = $('<img>').attr("src", address);
let obj = $("#" + previewId);
obj.empty().append($img);
obj.css('max-width', '100%');
}
},2000);
};
/**
* 上传错误后触发,当不是 xhr 请求错误时,会把当前错误产生原因直接抛出,诸如 JSON 解析异常等;当产生 xhr 请求错误时,参数 err 为一个包含 code、message、isRequestError 三个属性的 object:
* err.isRequestError: 用于区分是否 xhr 请求错误;当 xhr 请求出现错误并且后端通过 HTTP 状态码返回了错误信息时,该参数为 true;否则为 undefined 。
* err.reqId: string,xhr请求错误的 X-Reqid。
* err.code: number,请求错误状态码,只有在 err.isRequestError 为 true 的时候才有效,可查阅码值对应说明。
* err.message: string,错误信息,包含错误码,当后端返回提示信息时也会有相应的错误信息。
* */
let error = function (err) {
//修改状态为非上传
// status = false;
self.qiniuUploadStatus = false
localStorage.removeItem('qiniuToken');
console.log("七牛上传失败,详细信息请参考:https://developer.qiniu.com/kodo/api/3928/error-responses");
//输出简略错误信息
if (err.isRequestError){
qiniuErrorCheck(err.code)
}else {
console.error(err);
}
/*modalClick("提示", "上传失败!", "确定", function () {
$('#model-modify').modal('hide');
}, "", null);*/
// deferred.reject(new Error('七牛上传失败'));
// return deferred.promise;
return reject(new Error('七牛上传失败'));
};
// 上传开始
subscription = observable.subscribe(next, error, complete);
});
// return deferred.promise;
});
};
/** /**
* 获取时间戳 * 获取时间戳
* @param {Date} [date]日期对象,为空时,返回当前时间戳 * @param {Date} [date]日期对象,为空时,返回当前时间戳
...@@ -164,7 +299,7 @@ export const getFilePath = (file,fileName,folder) => { ...@@ -164,7 +299,7 @@ export const getFilePath = (file,fileName,folder) => {
//文件全路径(文件路径 + 文件名) 扩展名​/年/月/日/ //文件全路径(文件路径 + 文件名) 扩展名​/年/月/日/
// var filePath = ext + "/" + date.format('yyyy/MM/dd') + "/" + (isEmptyUtils(folder) ? "" : (folder + "/")) + fileName; // var filePath = ext + "/" + date.format('yyyy/MM/dd') + "/" + (isEmptyUtils(folder) ? "" : (folder + "/")) + fileName;
//var filePath = ext + "/" + "common/" + file.name.split('.')[0] + '-' + timeStamp(date) + "." + suffix; //var filePath = ext + "/" + "common/" + file.name.split('.')[0] + '-' + timeStamp(date) + "." + suffix;
var filePath = ext + "/" + "protal/project/" + timeStamp(date) + "." + suffix; var filePath = ext + "/" + "admin/im/" + timeStamp(date) + "." + suffix;
console.log('filePath==============',filePath); console.log('filePath==============',filePath);
return filePath; return filePath;
...@@ -180,24 +315,16 @@ export const getFilePath = (file,fileName,folder) => { ...@@ -180,24 +315,16 @@ export const getFilePath = (file,fileName,folder) => {
* @param fileType 1--图片和文件 空为视频 * @param fileType 1--图片和文件 空为视频
* @returns {Promise} * @returns {Promise}
*/ */
export const doUpload = (self,file, filePath, previewId,progressId, fileType) => { export const doUpload = (self, file, filePath, previewId, progressId, fileType) => {
// var deferred = $q.defer();
return new Promise(function (resolve, reject) { return new Promise(function (resolve, reject) {
if (isEmptyUtils(file) || isEmptyUtils(filePath)) { if (isEmptyUtils(file) || isEmptyUtils(filePath)) {
console.error('七牛上传失败:非法参数'); console.error('七牛上传失败:非法参数');
reject(); reject();
} }
let key = filePath ? filePath : getFilePath(file); let key = filePath ? filePath : getFilePath(file);
//修改状态为上传 //修改状态为上传
self.qiniuUploadStatus = true; self.qiniuUploadStatus = true;
// let token = "BRVB4TpxVFA5Wo6lIpfltmWKOltzGar46tvC3BlR:UHn0LDElwjP4jEZTXdq_1qV6_hw=:eyJzY29wZSI6InBpY2EtdGVzdCIsInJldHVybkJvZHkiOiJ7XCJrZXlcIjpcIiQoa2V5KVwiLFwiaGFzaFwiOlwiJChldGFnKVwiLFwiYnVja2V0XCI6XCIkKGJ1Y2tldClcIixcImZzaXplXCI6JChmc2l6ZSksXCJmbmFtZVwiOiQoZm5hbWUpLFwiZXh0XCI6JChleHQpfSIsImRlYWRsaW5lIjoxNTI5NDk0MTc1fQ==";
doQiniuAction1(fileType).then(function (token) { doQiniuAction1(fileType).then(function (token) {
let putExtra = { let putExtra = {
fname: file.name, //原文件名 fname: file.name, //原文件名
...@@ -228,34 +355,14 @@ export const doUpload = (self,file, filePath, previewId,progressId, fileType) => ...@@ -228,34 +355,14 @@ export const doUpload = (self,file, filePath, previewId,progressId, fileType) =>
//获取百分比进度 //获取百分比进度
let progress = res.total.percent.toFixed(2); let progress = res.total.percent.toFixed(2);
self.uploadProgress = Number(progress); self.uploadProgress = Number(progress);
if(progressId == 'uploadProgress1') { if(progressId == 'uploadProgress1') {
self.uploadProgress1 = Number(progress); self.uploadProgress1 = Number(progress);
} }
if(progressId == 'uploadProgress2') { if(progressId == 'uploadProgress2') {
self.uploadProgress2 = Number(progress); self.uploadProgress2 = Number(progress);
} }
console.log('Progress: ' + progress); console.log('Progress2: ' + progress);
//如果有进度条
/*if (isNotEmptyUtils(progressId)) {
let obj = $("#" + progressId);
//开始上传时,显示进度条
if (isNotEmptyUtils(obj.parent())) {
//修改状态为上传
// status = true;
self.qiniuUploadStatus = true;
obj.parent().removeClass("hidden");
obj.fadeIn("fast");
}
obj.css("width", progress + '%');
obj.text(progress + '%');
//上传完成,2秒后淡出进度条
if (progress === "100.00") {
//修改状态为非上传
// status = false;
self.qiniuUploadStatus = true;
obj.fadeOut(2000);
}
}*/
}; };
/** /**
...@@ -267,38 +374,19 @@ export const doUpload = (self,file, filePath, previewId,progressId, fileType) => ...@@ -267,38 +374,19 @@ export const doUpload = (self,file, filePath, previewId,progressId, fileType) =>
setTimeout(function(){ setTimeout(function(){
result.key = res.key; result.key = res.key;
result.path = '/' + res.key; result.path = '/' + res.key;
// result.fullPath = domain + '/' + res.key + '_' + new Date().getTime();
if(!fileType) { // 图片 文件 if(!fileType) { // 图片 文件
console.log('---domain-------',domain)
result.fullPath = domain + '/' + res.key; result.fullPath = domain + '/' + res.key;
}else{ // 视频 }else{ // 视频
console.log('----domain1------',domain1)
result.fullPath = domain1 + '/' + res.key; result.fullPath = domain1 + '/' + res.key;
} }
result.size = res.fsize; result.size = res.fsize;
result.name = res.fname ; result.name = res.fname ;
result.ext = res.ext; result.ext = res.ext;
// deferred.resolve(result);
resolve(result); resolve(result);
// self.model.qCloudUrl = result.fullPath;
// $("#introVideoLecture").attr("src", self.model.qCloudUrl);
//修改状态为非上传
// status = false;
self.qiniuUploadStatus = false; self.qiniuUploadStatus = false;
// if (isNotEmptyUtils(previewId)) {
// let address = domain + result.path;
// console.log('文件路径: ' + address);
// //显示图片
// let uplodImg = $('<img>').attr("src", address);
// let obj = $("#" + previewId);
// obj.empty().append(uplodImg);
// obj.css('max-width', '100%');
// }
},500); },500);
}; };
/** /**
...@@ -320,12 +408,6 @@ export const doUpload = (self,file, filePath, previewId,progressId, fileType) => ...@@ -320,12 +408,6 @@ export const doUpload = (self,file, filePath, previewId,progressId, fileType) =>
}else { }else {
console.error(err); console.error(err);
} }
/*modalClick("提示", "上传失败!", "确定", function () {
$('#model-modify').modal('hide');
}, "", null);*/
// deferred.reject(new Error('七牛上传失败'));
// return deferred.promise;
return reject(new Error('七牛上传失败')); return reject(new Error('七牛上传失败'));
}; };
...@@ -334,9 +416,11 @@ export const doUpload = (self,file, filePath, previewId,progressId, fileType) => ...@@ -334,9 +416,11 @@ export const doUpload = (self,file, filePath, previewId,progressId, fileType) =>
}); });
// 保存到全局对象
// return deferred.promise; window.QNSubscription = subscription;
}); });
}; };
// 取消上传
export const unsubscribe = () => {
subscription.unsubscribe();
}
...@@ -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="diagnosis-list-content">
<div class="select-content screenSet">
<div class="title">助诊医生列表</div>
<el-collapse-transition>
<div v-show="isUp">
<el-form
ref="form"
:inline="true"
:model="searchParam"
label-suffix=":"
label-width="120px"
label-position="right"
style="width: 100%"
>
<el-row :gutter="30" type="flex" style="margin-bottom: 0">
<el-col :span="12">
<el-form-item label="助诊医生">
<el-input
v-model="searchParam.searchKey"
size="middle"
placeholder="请输入医生姓名或联系电话"
style="width: 120%"
></el-input>
</el-form-item>
</el-col>
<el-col :span="10" style="margin-left: 45px">
<el-form-item label="所在机构">
<el-input
v-model="searchParam.hospitalName"
size="middle"
placeholder="请输入所在机构名称"
style="width: 120%"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="30" type="flex" style="margin-bottom: 0">
<el-col :span="15">
<el-form-item label="创建时间">
<el-date-picker
v-model="rangeTime"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 100%"
:picker-options="pickerOptions1"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="分佣方式" style="margin-left: 10px">
<el-select
v-model="searchParam.commissionType"
id="statusSelector"
placeholder="请选择分佣方式"
clearable
style="width: 110%; height: 32px; line-height: 32px"
>
<el-option
v-for="item in commissionTypeList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span="3"
style="
text-align: center;
padding-right: 55px;
padding-left: 0px;
"
>
<el-button type="primary" size="small" @click="search()"
>搜索</el-button
>
</el-col>
</el-row>
</el-form>
</div>
</el-collapse-transition>
<div class="select-bottom" @click="selectToggle">
<span v-if="!isUp">展开筛选<i class="el-icon-arrow-down"></i></span>
<span v-else>收起筛选<i class="el-icon-arrow-up"></i></span>
</div>
</div>
<div class="component-content screenSet" id="screenSet">
<el-row :gutter="30" type="flex" style="margin-bottom: 0; float: right">
<el-col
:span="5"
style="text-align: right; margin-bottom: 10px; margin-right: 40px"
>
<el-button type="primary" size="small" @click="refresh()"
>刷新页面</el-button
>
</el-col>
<el-col :span="5" style="text-align: right">
<el-button type="primary" size="small" @click="add()"
>添加助诊医生</el-button
>
</el-col>
</el-row>
<!-- 表格 -->
<el-table
class="search-table"
:data="tableData"
style="width: 100%"
v-loading="loading"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="50"></el-table-column>
<el-table-column
prop="userId"
label="ID"
min-width="100"
align="left"
></el-table-column>
<el-table-column
prop="userName"
label="助诊医生"
min-width="100"
align="left"
></el-table-column>
<el-table-column
prop="mobile"
label="手机号"
min-width="100"
align="left"
></el-table-column>
<el-table-column
prop="address"
label="地区"
min-width="100"
align="left"
></el-table-column>
<el-table-column
prop="hospitalName"
label="所在机构"
min-width="100"
align="left"
></el-table-column>
<el-table-column
prop="department"
label="科室"
min-width="100"
align="left"
></el-table-column>
<el-table-column
prop="title"
label="职称"
min-width="100"
align="left"
></el-table-column>
<el-table-column
prop="audioCommissionTypeStr"
label="语音分佣规则"
min-width="120"
align="left"
></el-table-column>
<el-table-column
prop="audioPrice"
label="语音分佣"
min-width="100"
align="left"
>
<template slot-scope="scope">
<span v-if="scope.row.audioCommissionType == 1"
>{{ scope.row.audioPrice | priceNum }}%</span
>
<span v-if="scope.row.audioCommissionType == 2"
>{{ scope.row.audioPrice | priceNum }}</span
>
</template>
</el-table-column>
<el-table-column
prop="videoCommissionTypeStr"
label="视频分佣规则"
min-width="120"
align="left"
></el-table-column>
<el-table-column
prop="videoPrice"
label="视频分佣"
min-width="100"
align="left"
>
<template slot-scope="scope">
<span v-if="scope.row.videoCommissionType == 1"
>{{ scope.row.videoPrice | priceNum }}%</span
>
<span v-if="scope.row.videoCommissionType == 2"
>{{ scope.row.videoPrice | priceNum }}</span
>
</template>
</el-table-column>
<el-table-column
prop="imgCommissionTypeStr"
label="图文分佣规则"
min-width="120"
align="left"
></el-table-column>
<el-table-column
prop="imgPrice"
label="图文分佣"
min-width="100"
align="left"
>
<template slot-scope="scope">
<span v-if="scope.row.imgCommissionType == 1"
>{{ scope.row.imgPrice | priceNum }}%</span
>
<span v-if="scope.row.imgCommissionType == 2"
>{{ scope.row.imgPrice | priceNum }}</span
>
</template>
</el-table-column>
<!-- <el-table-column prop="price" label="价格(元)" min-width="60" align="left">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{scope.row.price | rounding}}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column prop="status" label="状态" min-width="80" align="left">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{scope.row.status | statusFilter}}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column
prop="createdTime"
label="创建时间"
min-width="160"
align="left"
>
</el-table-column>
<el-table-column
label="操作"
fixed="right"
align="center"
min-width="150"
>
<template slot-scope="scope">
<div>
<el-button
type="primary"
size="small"
@click="setPrice(scope.row, false)"
style="margin-top: 10px"
>设置分佣</el-button
>
</div>
</template>
</el-table-column>
</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]"
:page-size="searchParam.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows"
>
</el-pagination>
</div>
<el-dialog :title="title" :visible.sync="setAddVisible" width="60%">
<!-- <el-row :gutter="30" class="row search" type="flex" style="margin-bottom:0;">-->
<el-form
ref="setPriceForm"
:rules="addRules"
:model="model"
label-width="250px"
label-suffix=":"
label-position="right"
size="mini"
style="width: 100%"
>
<el-form-item label="助诊医生" class="required-label" prop="userName">
<el-col :span="15">
<el-select
v-model="model.userName"
filterable
remote
placeholder="请输入专家姓名或医院名称,多个关键字用空格隔开,至少输入两个字符"
clearable
style="width: 130%"
:remote-method="remoteMethod"
:disabled="isEdit"
@change="nameChange"
@visible-change="noSelectHand"
>
<el-option
v-for="item in nameList"
:key="item.id"
:label="item.name"
:value="item.id"
>
<span>{{ item.value }}</span>
</el-option>
</el-select>
</el-col>
</el-form-item>
<!-- <el-col :span="15" style="margin-left: 105px;">-->
<!-- 实际收入(接诊后实际到账金额): ¥{{tempPrice | rounding}}-->
<!-- </el-col>-->
<el-form-item label="助诊医生职称" class="required-label">
<el-col :span="15">
<el-input
v-model="model.title"
style="width: 130%"
disabled
size="small"
></el-input>
</el-col>
</el-form-item>
<el-form-item label="助诊医生所在机构" class="required-label">
<el-col :span="15">
<el-input
v-model="model.hospitalName"
style="width: 130%"
disabled
size="small"
></el-input>
</el-col>
</el-form-item>
<el-form-item label="助诊医生所在科室" class="required-label">
<el-col :span="15">
<el-input
v-model="model.department"
style="width: 130%"
disabled
size="small"
></el-input>
</el-col>
</el-form-item>
<el-form-item label="助诊电话" class="required-label">
<el-col :span="15">
<el-input
v-model="model.mobile"
style="width: 130%"
disabled
size="small"
></el-input>
</el-col>
</el-form-item>
<el-form-item
label="语音问诊分佣"
prop="audioCommissionType"
class="required-label"
>
<el-col :span="16">
<el-radio-group
v-model="model.audioCommissionType"
size="small"
style="line-height: 45px"
>
<div>
<el-radio
:label="1"
style="float: left; margin-top: 5px; line-height: 20px"
>按比例分佣(%)</el-radio
>
<span style="float: right; width: 100px"
><el-input-number
v-model="model.audioPrice1"
size="small"
:precision="2"
:min="0"
></el-input-number
></span>
</div>
<div>
<el-radio
:label="2"
style="float: left; margin-top: 30px; line-height: 20px"
>固定分佣金额(元)</el-radio
>
<span style="float: right; width: 100px"
><el-input-number
v-model="model.audioPrice2"
size="small"
:precision="2"
:min="0"
:max="9999"
></el-input-number
></span>
</div>
</el-radio-group>
</el-col>
</el-form-item>
<el-form-item
label="视频问诊分佣"
prop="videoCommissionType"
class="required-label"
>
<el-col :span="16">
<el-radio-group
v-model="model.videoCommissionType"
size="small"
style="line-height: 45px"
>
<div>
<el-radio
:label="1"
style="float: left; margin-top: 5px; line-height: 20px"
>按比例分佣(%)</el-radio
>
<span style="float: right; width: 100px"
><el-input-number
v-model="model.videoPrice1"
size="small"
:precision="2"
:min="0"
></el-input-number
></span>
</div>
<div>
<el-radio
:label="2"
style="float: left; margin-top: 30px; line-height: 20px"
>固定分佣金额(元)</el-radio
>
<span style="float: right; width: 100px"
><el-input-number
v-model="model.videoPrice2"
size="small"
:precision="2"
:min="0"
:max="9999"
></el-input-number
></span>
</div>
</el-radio-group>
</el-col>
</el-form-item>
<el-form-item
label="图文问诊分佣"
prop="imgCommissionType"
class="required-label"
>
<el-col :span="16">
<el-radio-group
v-model="model.imgCommissionType"
size="small"
style="line-height: 45px"
>
<div>
<el-radio
:label="1"
style="float: left; margin-top: 5px; line-height: 20px"
>按比例分佣(%)</el-radio
>
<span style="float: right; width: 100px"
><el-input-number
v-model="model.imgPrice1"
size="small"
:precision="2"
:min="0"
></el-input-number
></span>
</div>
<div>
<el-radio
:label="2"
style="float: left; margin-top: 30px; line-height: 20px"
>固定分佣金额(元)</el-radio
>
<span style="float: right; width: 100px"
><el-input-number
v-model="model.imgPrice2"
size="small"
:precision="2"
:min="0"
:max="9999"
></el-input-number
></span>
</div>
</el-radio-group>
</el-col>
</el-form-item>
</el-form>
<!-- </el-row>-->
<span slot="footer" class="dialog-footer" style="text-align: center">
<el-button @click="setAddVisible = false">取 消</el-button>
<el-button type="primary" @click="submit">确定</el-button>
</span>
</el-dialog>
</div>
</div>
</template>
<script>
let vm = null;
export default {
data() {
return {
isUp: false,
endFlag: false,
beginFlag: false,
loading: false,
setPriceVisible: false,
rangeTime: "",
searchParam: {
searchKey: "",
hospitalName: "",
commissionType: 0,
startTime: "",
endTime: "",
pageSize: 15,
pageNo: 1,
},
batchUpdatePriceFlag: false,
model: {
name: "",
userId: "",
userName: "",
mobile: "",
address: "",
hospitalName: "",
title: "",
audioCommissionType: "",
audioPrice: "",
audioPrice1: "",
audioPrice2: "",
videoCommissionType: "",
videoPrice: "",
videoPrice1: "",
videoPrice2: "",
imgCommissionType: "",
imgPrice: "",
imgPrice1: "",
imgPrice2: "",
},
timeSelect: [],
diagnosisSelect: [],
serviceTypeList: [],
tableData: [],
totalRows: 0,
setPriceRules: {
// price: [
// { required: true, message: '请输入价格', trigger: 'blur'},
// { pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/, message: '请输入正确额格式,可保留两位小数' }
// ],
},
liveBack: false,
timeClickFlag: true,
multipleSelection: [],
tempPrice: 0,
statusList: [
{
value: 0,
label: "全部",
},
{
value: 1,
label: "下架",
},
{
value: 2,
label: "上架",
},
],
profit: 0,
selectedList: [],
selectedPriceList: [],
setAddVisible: false,
title: "添加助诊医生",
isEdit: false,
nameList: [],
commissionTypeList: [
{
value: 0,
label: "全部",
},
{
value: 1,
label: "按比例分佣",
},
{
value: 2,
label: "固定分佣",
},
],
pickerOptions0: {
disabledDate: (time) => {
if (
this.searchParam.endTimestamp != "" &&
this.searchParam.endTimestamp != null
) {
return (
time.getTime() > new Date(this.searchParam.endTimestamp).getTime()
);
}
},
},
pickerOptions1: {
disabledDate: (time) => {
return time.getTime() > new Date().getTime(); //减去一天的时间代表可以选择同一天;
},
},
addRules: {
userName: [
{ required: true, message: "请输入助诊医生", trigger: "blur" },
],
audioCommissionType: [
{ required: true, message: "请设置语音问诊分佣", trigger: "blur" },
],
videoCommissionType: [
{ required: true, message: "请设置视频问诊分佣", trigger: "blur" },
],
imgCommissionType: [
{ required: true, message: "请设置图文问诊分佣", trigger: "blur" },
],
audioPrice1: [
{ required: true, message: "请设置图文问诊分佣", trigger: "blur" },
{
pattern: /^(\d|[1-9]\d|100)(\.\d{1,2})?$/,
message: "范围在0-100",
trigger: "blur",
},
],
},
};
},
mounted() {
vm = this;
this.getServiceTypeList();
// this.getDiagnoseList()
this.search();
},
methods: {
selectToggle() {
this.isUp = !this.isUp;
},
// 服务名称
getServiceTypeList() {
let url = `/diagnose/doctorService/serviceType`;
this.GET(url).then((res) => {
if (res.code == "000000") {
this.serviceTypeList = res.data;
}
});
},
search() {
if (this.rangeTime) {
this.searchParam.startTime = this.rangeTime[0];
this.searchParam.endTime = this.rangeTime[1];
} else {
this.searchParam.startTime = "";
this.searchParam.endTime = "";
}
this.loading = true;
let url = `/diagnose/commission/downDoctor/pageSearch`;
let params = this.searchParam;
this.POST(url, params).then((res) => {
this.loading = false;
if (res.code == "000000") {
this.tableData = res.data.contentList;
this.totalRows = res.data.total;
}
});
// this.tableData = [
// {'orderNo': 100, 'serviceName': '语音问诊',
// 'doctorName': '李时珍', 'userMobile': '18888888888',
// 'price': '100', 'statusStr': '上架', 'appointBeginTime': '2015-10-10',
// 'status': '2'}
// ];
},
submit() {
if (
this.model.audioCommissionType == 1 &&
this.model.audioPrice1 == undefined
) {
this.$message({
message: "请输入语音问诊分佣中的按比例分佣",
type: "warning",
});
return;
} else if (
this.model.audioCommissionType == 1 &&
this.model.audioPrice1 > 100
) {
this.$message({
message: "请输入语音问诊分佣中的按比例分佣0-100",
type: "warning",
});
return;
}
if (
this.model.audioCommissionType == 2 &&
this.model.audioPrice2 == undefined
) {
this.$message({
message: "请输入语音问诊分佣中的固定分佣金额",
type: "warning",
});
return;
}
if (
this.model.videoCommissionType == 1 &&
this.model.videoPrice1 == undefined
) {
this.$message({
message: "请输入视频问诊分佣中的按比例分佣",
type: "warning",
});
return;
} else if (
this.model.videoCommissionType == 1 &&
this.model.videoPrice1 > 100
) {
this.$message({
message: "请输入视频问诊分佣中的按比例分佣0-100",
type: "warning",
});
return;
}
if (
this.model.videoCommissionType == 2 &&
this.model.videoPrice2 == undefined
) {
this.$message({
message: "请输入视频问诊分佣中的固定分佣金额",
type: "warning",
});
return;
}
if (
this.model.imgCommissionType == 1 &&
this.model.imgPrice1 == undefined
) {
this.$message({
message: "请输入图文问诊分佣中的按比例分佣",
type: "warning",
});
return;
} else if (
this.model.imgCommissionType == 1 &&
this.model.imgPrice1 > 100
) {
this.$message({
message: "请输入图文问诊分佣中的按比例分佣0-100",
type: "warning",
});
return;
}
if (
this.model.imgCommissionType == 2 &&
this.model.imgPrice2 == undefined
) {
this.$message({
message: "请输入图文问诊分佣中的固定分佣金额",
type: "warning",
});
return;
}
let timeoutId = null;
timeoutId && clearTimeout(timeoutId);
timeoutId = setTimeout(() => {
this.clickHandle();
}, 500);
},
// 防止按钮多次点击
clickHandle() {
this.$refs.setPriceForm.validate((valid) => {
if (valid) {
vm.loading = true;
vm.setSubmitPrice();
this.POST("/diagnose/commission/downDoctor/save", vm.model).then(
(res) => {
vm.loading = false;
// closeLoading(this);
if (res.code == "000000") {
vm.$message({
message: "设置成功",
type: "success",
});
vm.setAddVisible = false;
vm.search();
} else {
vm.$message({
message: res.message,
type: "error",
});
}
}
);
}
});
},
handleSizeChange(value) {
this.searchParam.pageSize = value;
this.search();
},
handleCurrentChange(value) {
this.searchParam.pageNo = value;
this.search();
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
// 刷新页面
refresh() {
this.searchParam = {
searchKey: "",
hospitalName: "",
commissionType: 0,
startTime: "",
endTime: "",
pageSize: 15,
pageNo: 1,
};
this.rangeTime = "";
this.search();
},
setSelectedList() {
if (this.multipleSelection.length > 0) {
this.selectedList = [];
for (let i = 0; i < this.multipleSelection.length; i++) {
this.selectedList.push({
doctorId: this.multipleSelection[i].doctorId,
serviceType: this.multipleSelection[i].serviceType,
});
}
}
},
setSelectedPriceList() {
if (this.multipleSelection.length > 0) {
this.selectedPriceList = [];
for (let i = 0; i < this.multipleSelection.length; i++) {
if (
this.multipleSelection[i].price != 0 &&
(this.multipleSelection[i].price == "" ||
this.multipleSelection[i].price == null)
) {
this.$message({
message: '请先设置"问诊价格"',
type: "warning",
});
return false;
}
this.selectedPriceList.push({
doctorId: this.multipleSelection[i].doctorId,
serviceType: this.multipleSelection[i].serviceType,
price: this.multipleSelection[i].price,
});
}
return true;
}
},
setPrice(row, batchUpdatePriceFlag) {
if (this.$refs.setPriceForm) {
this.$refs.setPriceForm.resetFields();
}
this.batchUpdatePriceFlag = batchUpdatePriceFlag;
// this.setPriceVisible = true
this.setAddVisible = true;
this.isEdit = true;
this.title = "设置分佣";
vm.model.id = row.id;
vm.model.userId = row.userId;
vm.model.userName = row.userName;
vm.model.mobile = row.mobile;
vm.model.provinceName = row.provinceName;
vm.model.cityName = row.cityName;
vm.model.countyName = row.countyName;
vm.model.townName = row.townName;
vm.model.hospitalName = row.hospitalName;
vm.model.department = row.department;
vm.model.title = row.title;
vm.model.audioCommissionType = "";
vm.model.audioPrice = "";
vm.model.audioPrice1 = undefined;
vm.model.audioPrice2 = undefined;
vm.model.videoCommissionType = "";
vm.model.videoPrice = "";
vm.model.videoPrice1 = undefined;
vm.model.videoPrice2 = undefined;
vm.model.imgCommissionType = "";
vm.model.imgPrice = "";
vm.model.imgPrice1 = undefined;
vm.model.imgPrice2 = undefined;
vm.model.audioCommissionType = row.audioCommissionType;
// vm.model.videoCommissionType = row.videoCommissionType;
// vm.model.imgCommissionType = row.imgCommissionType;
if (row.audioCommissionType == 1) {
vm.model.audioPrice1 = vm.priceNum(row.audioPrice);
} else if (row.audioCommissionType == 2) {
vm.model.audioPrice2 = vm.priceNum(row.audioPrice);
}
vm.model.videoCommissionType = row.videoCommissionType;
if (row.videoCommissionType == 1) {
vm.model.videoPrice1 = vm.priceNum(row.videoPrice);
} else if (row.videoCommissionType == 2) {
vm.model.videoPrice2 = vm.priceNum(row.videoPrice);
}
vm.model.imgCommissionType = row.imgCommissionType;
if (row.imgCommissionType == 1) {
vm.model.imgPrice1 = vm.priceNum(row.imgPrice);
} else if (row.imgCommissionType == 2) {
vm.model.imgPrice2 = vm.priceNum(row.imgPrice);
}
// this.getProfit(row);
},
initAdd() {
this.POST(`/diagnose/commission/rule/info`, {
userType: "2",
defaultFlag: 1,
}).then((res) => {
if (res.code == "000000") {
vm.initData = res.data;
vm.model.audioCommissionType = res.data.audioCommissionType;
if (vm.model.audioCommissionType == 1) {
vm.model.audioPrice1 = vm.priceNum(res.data.audioPrice);
} else if (vm.model.audioCommissionType == 2) {
vm.model.audioPrice2 = vm.priceNum(res.data.audioPrice);
}
vm.model.videoCommissionType = res.data.videoCommissionType;
if (vm.model.videoCommissionType == 1) {
vm.model.videoPrice1 = vm.priceNum(res.data.videoPrice);
} else if (vm.model.videoCommissionType == 2) {
vm.model.videoPrice2 = vm.priceNum(res.data.videoPrice);
}
vm.model.imgCommissionType = res.data.imgCommissionType;
if (vm.model.imgCommissionType == 1) {
vm.model.imgPrice1 = vm.priceNum(res.data.imgPrice);
} else if (vm.model.imgCommissionType == 2) {
vm.model.imgPrice2 = vm.priceNum(res.data.imgPrice);
}
} else {
this.$message({
message: res.message,
type: "error",
});
}
});
},
getProfit(row) {
this.POST(`/diagnose/doctorService/profit`, {
doctorId: row.doctorId,
serviceType: row.serviceType,
}).then((res) => {
if (res.code == "000000") {
vm.profit = res.data;
if (
vm.setPriceForm.price != 0 &&
(vm.setPriceForm.price == "" || vm.setPriceForm.price == null)
) {
this.tempPrice = "";
} else {
this.tempPrice = this.setPriceForm.price * this.profit;
}
} else {
this.$message({
message: res.message,
type: "error",
});
}
});
},
changePrice(e) {
if (
this.setPriceForm.price != 0 &&
(this.setPriceForm.price == "" || this.setPriceForm.price == undefined)
) {
this.tempPrice = "";
} else {
this.tempPrice = this.setPriceForm.price * this.profit;
}
},
add() {
this.setAddVisible = true;
this.isEdit = false;
this.title = "添加助诊医生";
if (!this.isEdit) {
vm.model.id = null;
vm.model.userName = "";
vm.model.mobile = "";
vm.model.hospitalName = "";
vm.model.department = "";
vm.model.title = "";
vm.model.userId = "";
vm.model.audioCommissionType = "";
vm.model.audioPrice = "";
vm.model.audioPrice1 = undefined;
vm.model.audioPrice2 = undefined;
vm.model.videoCommissionType = "";
vm.model.videoPrice = "";
vm.model.videoPrice1 = undefined;
vm.model.videoPrice2 = undefined;
vm.model.imgCommissionType = "";
vm.model.imgPrice = "";
vm.model.imgPrice1 = undefined;
vm.model.imgPrice2 = undefined;
vm.initAdd();
}
},
//搜索
remoteMethod(val) {
if (val.length >= 2) {
// console.log('搜索',val)
this.GET(
`/diagnose/commission/downDoctor/doctorInfoByNameLike?name=${val}`
)
.then(function (res) {
if (res.code == "000000") {
// let data = JSON.parse(JSON.stringify(res.data.data));//通过这个实现深拷贝
let list = res.data;
vm.expertData = list;
let newList = [];
list.map((item, index) => {
newList[index] = {
value: `${item.name} ${item.mobilePhone} ${item.hospital} ${item.title}`,
id: item.doctorId,
name: item.name,
};
});
// console.log('新数组',newList)
vm.nameList = newList;
}
})
.catch(function (error) {
errorResponseCheck(error, vm);
});
} else {
vm.expertData = [];
vm.nameList = [];
}
},
nameChange(val) {
// console.log('选中的值',val)
if (val) {
for (let i = 0; i < vm.expertData.length; i++) {
if (val == vm.expertData[i].doctorId) {
let item = vm.expertData[i];
vm.model.userName = item.name;
vm.model.mobile = item.mobilePhone;
vm.model.hospitalName = item.hospital;
vm.model.department = item.department;
vm.model.title = item.title;
vm.model.userId = item.doctorId;
}
}
} else {
// vm.model.name = '';
// vm.model.mobilePhone = '';
// vm.model.provinceName = '';
// vm.model.cityName = '';
// vm.model.countyName = '';
// vm.model.townName = '';
// vm.model.hospital = '';
// vm.model.department = '';
// vm.model.title = '';
// vm.expertData = [];
// vm.model.doctorId = '';
vm.model.userName = "";
vm.model.mobile = "";
vm.model.hospitalName = "";
vm.model.department = "";
vm.model.title = "";
vm.model.userId = "";
}
vm.nameList = [];
},
noSelectHand(val) {
if (!val && !vm.model.name) {
vm.nameList = [];
}
},
priceNum(value) {
if (value != "" && value != null && value != "null") {
return (value / 100).toFixed(2);
} else if (value == 0) {
return (value / 100).toFixed(2);
} else {
return value;
}
},
setSubmitPrice() {
if (this.model.audioCommissionType == 1 && this.model.audioPrice1 != "") {
this.model.audioPrice = this.model.audioPrice1;
} else if (
this.model.audioCommissionType == 2 &&
this.model.audioPrice2 != ""
) {
this.model.audioPrice = this.model.audioPrice2;
}
if (this.model.videoCommissionType == 1 && this.model.videoPrice1 != "") {
this.model.videoPrice = this.model.videoPrice1;
} else if (
this.model.videoCommissionType == 2 &&
this.model.videoPrice2 != ""
) {
this.model.videoPrice = this.model.videoPrice2;
}
if (this.model.imgCommissionType == 1 && this.model.imgPrice1 != "") {
this.model.imgPrice = this.model.imgPrice1;
} else if (
this.model.imgCommissionType == 2 &&
this.model.imgPrice2 != ""
) {
this.model.imgPrice = this.model.imgPrice2;
}
if (this.model.audioPrice != null) {
this.model.audioPrice = this.model.audioPrice * 100;
}
if (this.model.videoPrice != null) {
this.model.videoPrice = this.model.videoPrice * 100;
}
if (this.model.imgPrice != null) {
this.model.imgPrice = this.model.imgPrice * 100;
}
},
},
};
</script>
<style lang="scss" scoped>
.diagnosis-list-content {
.select-content {
margin-bottom: 10px;
padding: 10px;
background: #fff;
overflow: hidden !important;
.title {
height: 50px;
display: flex;
justify-content: flex-start;
align-items: center;
}
.select-bottom {
height: 50px;
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
color: #0d9078;
}
}
.component-content {
padding: 10px;
background: #fff;
overflow: hidden !important;
.title {
margin-bottom: 30px;
}
}
}
.required-label {
.el-form-item__label::before {
content: "*";
color: #f56c6c;
margin-right: 4px;
}
}
.el-dialog__footer {
padding: 10px 20px 20px;
text-align: center;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
</style>
<template>
<div class="diagnosis-list-content">
<div class="component-content screenSet" id="screenSet">
<div class="title">编辑</div>
<el-form ref="form" :model="formData" label-width="130px" :rules="editorType== 2 ? null : rules" v-loading='loading'>
<h1>预约单信息</h1>
<el-form-item label="预约类型">
<el-select v-model="formData.diagnoseType" placeholder="请选择预约类型" disabled class="set-width">
<el-option v-for="item of tyleList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="预约来源" disabled>
<el-select v-model="formData.appointSource" placeholder="请选择预约来源" disabled class="set-width">
<el-option v-for="item of sourceList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="创建时间">
<el-date-picker
disabled
class="set-width"
type="datetime"
placeholder="创建时间"
v-model="formData.createdTime"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
>
</el-date-picker>
</el-form-item>
<el-form-item label="匹配时间" >
<el-date-picker
disabled
class="set-width"
type="datetime"
placeholder="匹配时间"
v-model="formData.operateTime"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
>
</el-date-picker>
</el-form-item>
<el-form-item label="完成时间" >
<el-date-picker
disabled
class="set-width"
type="datetime"
placeholder="匹配时间"
v-model="formData.doneTime"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
>
</el-date-picker>
</el-form-item>
<el-form-item label="问诊价格" prop="price">
<el-input v-model="formData.price" placeholder="请输入问诊价格" disabled class="set-width"></el-input> (单位元)
</el-form-item>
<el-form-item label="支付方式">
<el-select v-model="formData.payType" placeholder="请选择支付方式" disabled class="set-width">
<el-option v-for="item of payList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="招募人">
<el-input v-model="formData.crrsName" placeholder="请输入招募人" disabled class="set-width"></el-input>
</el-form-item>
<br/>
<h1>预约信息</h1>
<el-form-item label="当前状态">
<el-select v-model="formData.status" placeholder="请选择状态" disabled class="set-width">
<el-option v-for="item of statusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="运营人员">
<el-input v-model="formData.operateUserName" placeholder="请输入患者姓名" disabled class="set-width"></el-input>
</el-form-item>
<!-- 新增 -->
<el-form-item label="分诊人员">
<el-input v-model="formData.triageOperatorName" placeholder="" disabled class="set-width"></el-input>
</el-form-item>
<el-form-item label="接诊人员">
<el-input v-model="formData.receptionOperatorName" placeholder="" disabled class="set-width"></el-input>
</el-form-item>
<el-form-item label="助诊意向时间" prop="appointBeginTime" >
<el-date-picker
:disabled="true"
type="datetime"
placeholder="开始时间"
v-model="formData.assistantBeginTime"
style="width: 200px;"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
>
</el-date-picker>
<span>-</span>
<el-date-picker
:disabled="true"
type="datetime"
placeholder="结束时间"
v-model="formData.assistantEndTime"
style="width: 200px;"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
>
</el-date-picker>
</el-form-item>
<el-form-item label="备注(助诊)" >
<span>{{formData.assistantRemark}}</span>
</el-form-item>
<el-form-item label="分诊科室">
<!-- 由于不可编辑,只展示,故前端option获取接口省略,由前端写死 -->
<el-select v-model="formData.triageDepartmentId" placeholder="请选择状态" disabled class="set-width">
<el-option v-for="item of [{ value: formData.triageDepartmentId, label: formData.triageDepartment }]" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="备注(分诊)" >
<span>{{ formData.triageRemark }}</span>
</el-form-item>
<el-form-item label="接诊意向时间" prop="appointBeginTime" >
<el-date-picker
:disabled="true"
type="datetime"
placeholder="开始时间"
v-model="formData.receptionBeginTime"
style="width: 200px;"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
>
</el-date-picker>
<span>-</span>
<el-date-picker
:disabled="true"
type="datetime"
placeholder="结束时间"
v-model="formData.receptionEndTime"
style="width: 200px;"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
>
</el-date-picker>
</el-form-item>
<!-- 新增 -->
<el-form-item label="预约时间" prop="appointBeginTime" >
<el-date-picker
:disabled="true"
type="datetime"
placeholder="开始时间"
v-model="formData.appointBeginTime"
style="width: 200px;"
:picker-options="endDateOpt"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
@change="continueBeginChange"
>
</el-date-picker>
<span>-</span>
<el-date-picker
:disabled="true"
type="datetime"
placeholder="结束时间"
v-model="formData.appointEndTime"
style="width: 200px;"
format="yyyy-MM-dd HH:mm:ss"
:picker-options="endDateOpt1"
value-format="yyyy-MM-dd HH:mm:ss"
@change="continueEndChange"
>
</el-date-picker>
</el-form-item>
<br/>
<h1>患者信息</h1>
<el-form-item label="患者姓名" prop="patientName" >
<el-input v-model="formData.patientName" placeholder="请输入患者姓名" class="set-width" :disabled="noable || editorType== 2" minlength='2' maxlength="20"></el-input>
</el-form-item>
<el-form-item label="证件类型" prop="idCardType">
<el-select v-model="formData.idCardType" placeholder="请选择证件类型" class="set-width" :disabled="noable || editorType== 2" @change="blurFn">
<el-option v-for="item of carList" :key="item.value" :label="item.label" :value="item.value" ></el-option>
</el-select>
</el-form-item>
<el-form-item label="证件号" prop="idCard" >
<el-input v-model="formData.idCard" placeholder="请输入证件号" class="set-width" :disabled="noable || editorType== 2" maxlength="18" @blur="blurFn"></el-input>
</el-form-item>
<el-form-item label="出生日期" prop="birthdayStr" >
<el-date-picker
class="set-width"
:disabled="noable || birthDisable || editorType== 2"
type="date"
placeholder="出生日期"
v-model="formData.birthdayStr"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
>
</el-date-picker>
</el-form-item>
<el-form-item label="性别" prop="sex">
<el-select v-model="formData.sex" placeholder="请选择性别" class="set-width" :disabled="noable || editorType== 2">
<el-option v-for="item of sexList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="婚否" prop="maritalStatus" >
<el-radio-group v-model="formData.maritalStatus" :disabled="formData.status==4 || editorType== 2">
<el-radio :label="1">未婚</el-radio>
<el-radio :label="2">已婚</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="患者电话" prop="patientMobilePhone" >
<el-input v-model="formData.patientMobilePhone" placeholder="请输入手机号" class="set-width" :disabled="noable || editorType== 2" maxlength="11"></el-input>
</el-form-item>
<br/>
<h1>助诊信息</h1>
<el-form-item label="助诊医生" prop="userName">
<el-input v-model="formData.userName" placeholder="请选择助诊医生" class="set-width" disabled></el-input>
<!-- <el-select v-model="formData.userName" placeholder="请选择助诊医生" disabled class="set-width">
<el-option v-for="item of sexList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select> -->
</el-form-item>
<el-form-item label="助诊医生职称" >
<el-input v-model="formData.userTitle" placeholder="请选择职称" class="set-width" disabled></el-input>
<!-- <el-select v-model="formData.userTitle" placeholder="请选择职称" disabled class="set-width">
<el-option v-for="item of sexList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select> -->
</el-form-item>
<el-form-item label="助诊医生所在机构" >
<el-input v-model="formData.userHospital" placeholder="请选择机构" class="set-width" disabled></el-input>
<!-- <el-select v-model="formData.userHospital" placeholder="请选择机构" disabled class="set-width">
<el-option v-for="item of sexList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select> -->
</el-form-item>
<el-form-item label="助诊医生所在科室" >
<el-input v-model="formData.userDepartment" placeholder="请选择科室" class="set-width" disabled></el-input>
<!-- <el-select v-model="formData.userDepartment" placeholder="请选择科室" disabled class="set-width">
<el-option v-for="item of sexList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select> -->
</el-form-item>
<el-form-item label="助诊电话">
<el-input v-model="formData.userMobile" placeholder="请输入助诊医生手机号" disabled class="set-width"></el-input>
</el-form-item>
<el-form-item label="与患者关系" >
<el-select v-model="formData.patientRelation" placeholder="请选择与患者关系" class="set-width" :disabled="editorType== 2">
<el-option v-for="item of relationList" :key="item.value" :label="item.label" :value="item.value" ></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="招募人" v-if="formData.crrsName" prop="crrsName">
{{ formData.crrsName }}
</el-form-item> -->
<br/>
<h1>接诊信息</h1>
<el-form-item label="接诊医生" prop="doctorName">
<!-- <el-input v-model="formData.doctorName" placeholder="请选择接诊医生" class="set-width" disabled></el-input>-->
<el-select @change="doctorChanged($event)" filterable v-model="formData.doctorName" placeholder="请选择接诊医生" class="set-width" disabled>
<el-option v-for="item of doctorList" :key="item.doctorId" :label="item.doctorName" :value="item.doctorId"></el-option>
</el-select>
</el-form-item>
<el-form-item label="接诊医生职称" >
<el-input v-model="formData.doctorTitle" placeholder="请选择职称" class="set-width" disabled></el-input>
<!-- <el-select v-model="formData.doctorTitle" placeholder="请选择职称" disabled class="set-width">
<el-option v-for="item of sexList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select> -->
</el-form-item>
<el-form-item label="接诊医生所在机构" >
<el-input v-model="formData.doctorHospital" placeholder="请选择机构" class="set-width" disabled></el-input>
<!-- <el-select v-model="formData.doctorHospital" placeholder="请选择机构" disabled class="set-width">
<el-option v-for="item of sexList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select> -->
</el-form-item>
<el-form-item label="接诊医生所在科室" >
<el-input v-model="formData.doctorDepartment" placeholder="请选择机构" class="set-width" disabled></el-input>
<!-- <el-select v-model="formData.doctorDepartment" placeholder="请选择科室" disabled class="set-width">
<el-option v-for="item of sexList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select> -->
</el-form-item>
<el-form-item label="接诊医生电话">
<el-input v-model="formData.doctorMobile" placeholder="请输入接诊医生手机号" disabled class="set-width"></el-input>
</el-form-item>
<el-form-item label="接诊医生来源" >
<el-select v-model="formData.doctorSource" placeholder="请选择医生来源" class="set-width" disabled>
<el-option v-for="item of doctorSourceList" :key="item.value" :label="item.label" :value="item.value" ></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="医生服务费" prop="serviceFee">
<el-input v-model="formData.serviceFee" placeholder="请输入医生服务费" class="set-width" :disabled="editorType== 2"></el-input> (单位元)
</el-form-item> -->
<!-- 新增 -->
<el-form-item label="站外医生姓名" prop="outsideDoctor">
<el-input v-model="formData.outsideDoctor" placeholder="请输入站外医生姓名" class="set-width" :disabled="true"></el-input>
</el-form-item>
<!-- -->
<br/>
<h1>结算信息</h1>
<el-form-item label="接诊服务费" prop="receptionServiceFeeStr">
{{formData.receptionServiceFeeStr ? `¥ ${formData.receptionServiceFeeStr}` : ''}}
</el-form-item>
<el-form-item label="接诊付款方式" prop="receptionPayType">
{{getReceptionPayType}}
</el-form-item>
<el-form-item label="接诊付款时间" prop="receptionSettleTime">
{{formData.receptionSettleTime}}
</el-form-item>
<el-form-item label="助诊服务费" prop="assistantServiceFeeStr">
{{formData.assistantServiceFeeStr ? `¥ ${formData.assistantServiceFeeStr}` : ''}}
</el-form-item>
<el-form-item label="助诊付款方式" prop="assistantPayType">
{{getAssistantPayType}}
</el-form-item>
<el-form-item label="助诊付款时间" prop="assistantSettleTime">
{{formData.assistantSettleTime}}
</el-form-item>
<br/>
<h1>问诊信息</h1>
<el-form-item label="初/复诊" prop="diagnoseStage" >
<el-radio-group v-model="formData.diagnoseStage" :disabled="formData.status==4 || editorType== 2">
<el-radio :label="1">初诊(就此病没有去过医院)</el-radio>
<el-radio :label="2">复诊(就此病去过医院)</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="是否确诊" prop="determineFlag" >
<el-radio-group v-model="formData.determineFlag" :disabled="formData.status==4 || editorType== 2">
<el-radio :label="1"></el-radio>
<el-radio :label="2"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="确诊疾病" >
<el-input v-model="formData.diagnoseDisease" placeholder="请输入确诊疾病名称" :disabled="formData.status==4 || editorType== 2" class="set-width"></el-input>
</el-form-item>
<el-form-item label="病情描述" prop="illnessDetail">
<el-input type="textarea" v-model="formData.illnessDetail" placeholder="请输入病情描述" maxlength="1000" :disabled="editorType== 2" show-word-limit></el-input>
</el-form-item>
<el-form-item label="病情照片" >
<p class="img-title">请上传患处照片、所用药品、与病情相关的线上诊疗记录截图、检查检测报告,请保证图片清晰完整,以便医生确认病情</p>
<upload-img :isDisable="editorType== 2" :imgList="formData.illnessImageUrls" ref="imgComponent"></upload-img>
</el-form-item>
<el-form-item label="诊断建议" prop="diagnoseAdvice">
<p class="old-diagnoseAdvice">{{oldDiagnoseAdvice}}</p>
<el-input type="textarea" v-model="formData.diagnoseAdvice" placeholder="请输入更新建议(更新后原建议将被删除)" :disabled="editorType== 2" maxlength="1000" show-word-limit></el-input>
</el-form-item>
<el-form-item label="系统录音/录像">
<el-form-item v-for="item in formData.vodList" :key="item.url">
<el-link :href="item.url" target="_blank">{{diagnoseLogId + '_' + item.name + '_' + formData.doctorName + '_' + formData.doctorDepartment + '.mp4'}}</el-link>
</el-form-item>
</el-form-item>
<el-form-item label="音频" >
<upload-music :isDisable="editorType== 2" :musicList="formData.illnessAudioUrls" ref="musicComponent"></upload-music>
</el-form-item>
<br/>
<!-- 新增 -->
<h1>备注信息</h1>
<el-form-item label="患者是否在场" prop="patInFlag" >
<el-radio-group v-model="formData.patInFlag" :disabled="editorType== 2">
<el-radio :label="1"></el-radio>
<el-radio :label="2"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="是否有价值" prop="valueFlag" v-show="formData.patInFlag == 1">
<el-radio-group v-model="formData.valueFlag" :disabled="editorType== 2">
<el-radio :label="1"></el-radio>
<el-radio :label="2"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="" prop="worthlessReason" v-show="formData.valueFlag == 2 && formData.patInFlag == 1">
<el-input type="textarea" v-model="formData.worthlessReason" placeholder="请输入低价值说明" maxlength="1000" :disabled="editorType== 2" show-word-limit></el-input>
</el-form-item>
<el-form-item label="其他备注" prop="otherRemark" >
<el-input type="textarea" v-model="formData.otherRemark" placeholder="请输入其他备注信息" maxlength="1000" :disabled="editorType== 2" show-word-limit></el-input>
</el-form-item>
<!-- -->
<br/>
<h1>跟进信息</h1>
<el-form-item label="是否跟进" >
<el-radio-group v-model="formData.followFlag" :disabled="editorType== 2">
<el-radio :label="1"></el-radio>
<el-radio :label="2"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="药品跟进状态" >
<el-select v-model="formData.drugFollowStatus" placeholder="请跟进状态" class="set-width" :disabled="editorType== 2">
<el-option v-for="item of followList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="药品跟进" >
<el-input type="textarea" v-model="formData.drugFollow" placeholder="请输入可跟进的事项" maxlength="1000" :disabled="editorType== 2" show-word-limit></el-input>
</el-form-item>
<el-form-item label="检查跟进状态" >
<el-select v-model="formData.checkFollowStatus" placeholder="请跟进状态" class="set-width" :disabled="editorType== 2">
<el-option v-for="item of followList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="检查跟进" >
<el-input type="textarea" v-model="formData.checkFollow" placeholder="请输入可跟进的事项" maxlength="1000" :disabled="editorType== 2" show-word-limit></el-input>
</el-form-item>
<el-form-item label="其他跟进状态" >
<el-select v-model="formData.otherFollowStatus" placeholder="请跟进状态" class="set-width" :disabled="editorType== 2">
<el-option v-for="item of followList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="其他跟进" >
<el-input type="textarea" v-model="formData.otherFollow" placeholder="请输入可跟进的事项" maxlength="1000" :disabled="editorType== 2" show-word-limit></el-input>
</el-form-item>
<el-form-item label="备注">
<el-input type="textarea" v-model="formData.remark" placeholder="请输入备注信息,如沟通协商记录等" maxlength="1000" :disabled="editorType== 2" show-word-limit></el-input>
</el-form-item>
<br/>
<!-- -->
<h1>操作日志</h1>
<el-table
:data="logData"
class="log-info">
<el-table-column
prop="operateTime"
width="180"
label="变更时间">
</el-table-column>
<el-table-column
prop="operateUserName"
label="变更人"
width="120">
</el-table-column>
<el-table-column
prop="to"
label="变更后内容">
</el-table-column>
<el-table-column
prop="from"
label="变更前内容">
</el-table-column>
</el-table>
<!-- 与产品确认,不需要分页功能<br/>
<el-row :gutter="0" type="flex" justify="end" align="center">
<el-pagination
class="log-info-pagin"
@size-change="handlelogSizeChange"
@current-change="handlelogCurrentChange"
:current-page="logCurrentPage"
:page-sizes="[5, 10, 20, 50]"
:page-size="5"
layout="total, sizes, prev, pager, next, jumper"
:total="logTotalCount">
</el-pagination>
</el-row>-->
<!-- -->
</el-form>
<br/>
<el-row :gutter="60" type="flex" justify="center" align="center">
<el-button @click="cancle">{{editorType== 1 ? '取消' : '返回'}}</el-button>
<el-button type="primary" @click="save" v-if="editorType== 1" :disabled="btnDisable">保存</el-button>
</el-row>
</div>
</div>
</template>
<script>
import uploadImg from '@/components/editor/upload-img'
import uploadMusic from '@/components/editor/upload-music'
import { TYPE_LIST, PAY_LIST, SOURCE_LIST, STATUS_LIST, CAR_LIST, SEX_LIST, RELATION_LIST, D_S_LIST, FOLLW_LIST } from '@/utils/constants'
import { getBirth } from '@/utils/index'
const PAY_TYPE = {
1: '自动付款',
2: '手动付款'
}
export default {
components: {
uploadImg,
uploadMusic
},
data(){
return {
asd: 123,
diagnoseLogId: '',
birthDisable: false,
noable: false,
editorType: 1, // //1为编辑状态,2为查看
loading: true,
btnDisable: false,
oldDiagnoseAdvice: '', //旧的诊断建议
formData: {
// 预约单信息
diagnoseType: '',
appointSource: '',
createdTime: '',
operateTime: '',
doneTime: '',
payType: '',
crrsName: '',
// 预约信息
status: 1,
operateUserName: '',
appointBeginTime: '',
appointEndTime: '',
triageOperatorName: '', // 分诊人员姓名
receptionOperatorName: '', // 接诊人员姓名
assistantBeginTime: '', // 助诊意向开始时间
assistantEndTime: '', //助诊意向结束时间
assistantRemark: '', // 助诊备注
triageDepartmentId: '', // 分诊科室id,
triageDepartment: '', // 分诊科室名
triageRemark: '', // 分诊备注
receptionBeginTime: '', // 接诊意向开始时间
receptionEndTime: '', // 接诊意向结束时间
// 患者信息
patientName: '',
idCardType: 1,
idCard: '',
birthdayStr: '',
birthday: '',
sex: 1,
patientMobilePhone: '',
//助诊信息
userName: '',
userTitle: '',
userHospital: '',
userDepartment: '',
userMobile: '',
patientRelation: '',
// crrsName: '', // 招募人
// 医生信息
doctorName: '',
doctorTitle: '',
doctorHospital: '',
doctorDepartment: '',
doctorMobile: '',
doctorSource: '',
serviceFee: '',
outsideDoctor: '', // 站外医生姓名
// 问诊信息
diagnoseStage: '',
determineFlag: '',
diagnoseDisease: '',
illnessDetail: '',
illnessImageUrls: [],
diagnoseAdvice: '',
illnessAudioUrls: [],
followFlag: 1,
drugFollow: '',
drugFollowStatus: '',
checkFollow: '',
checkFollowStatus: '',
otherFollowStatus: '',
otherFollow: '',
remark: '',
maritalStatus: 2,
createType: 1 , ////创建方式1.系统创建 2.手动创建
// 备注信息
patInFlag: '', // 患者是否在场 1是 2否
valueFlag: '', // 是否有价值 1是 2否
worthlessReason: '', // 无价值原因
otherRemark: '', // 其他备注
// 结算信息
receptionServiceFee: 0, // 接诊医生服务费单位分
receptionServiceFeeStr: '', // 接诊医生服务费展示字段
receptionPayType: '', // 接诊医生付款方式1自动打款2手动打款
receptionSettleTime: '', // 接诊医生结算时间
assistantServiceFee: 0, // 助诊医生服务费单位分
assistantServiceFeeStr: '', // 助诊医生服务费展示字段
assistantPayType: '', // 助诊医生付款方式1自动打款2手动打款
assistantSettleTime: '', // 助诊医生结算时间
// 录像信息
vodList: {
name: '',
url: ''
}
},
tyleList: TYPE_LIST,
payList: PAY_LIST,
sourceList: SOURCE_LIST,
statusList: STATUS_LIST,
carList: CAR_LIST,
sexList: SEX_LIST,
relationList: RELATION_LIST,
doctorSourceList: D_S_LIST,
followList: FOLLW_LIST,
doctorList: [],
rules: {
appointBeginTime: [
{ required: true, message: '请输入预约时间', trigger: 'change' }
],
patientName: [
{ required: true, message: '请输入患姓名', trigger: ['blur','change'] },
{ min: 2, max: 20, message: '长度在 2 到 20 个字符', trigger: ['blur','change'] }
],
idCardType: [
{ required: true, message: '请选择证件类型', trigger: 'change' }
],
idCard: [
{ min: 18, message: '长度18个字符', trigger: 'blur' },
{ pattern: /[0-9A-Za-z]{6,24}$/, message: '只能是数字或字母' }
],
birth: [
{ required: true, message: '请选择生日', trigger: 'change' }
],
sex: [
{ required: true, message: '请选择性别', trigger: 'change' }
],
maritalStatus: [
{ required: true, message: '请选择婚否', trigger: 'change' }
],
patientMobilePhone: [
{ required: true, message: '请输入患者电话', trigger: ['blur','change'] }
],
doctorName: [
{ required: true, message: '请选择接诊医生', trigger: 'change' }
],
serviceFee: [
{ required: false, message: '请输入医生服务费', trigger: 'change'},
{ pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/, message: '请输入正确额格式,可保留两位小数' }
],
diagnoseStage: [
{ required: true, message: '请选择初/复诊', trigger: 'change' }
],
determineFlag: [
{ required: true, message: '是否确诊', trigger: 'change' }
],
illnessDetail: [
{ required: true, message: '请输入病情描述', trigger: 'change' }
],
diagnoseAdvice: [
{ required: true, message: '请输入诊断建议', trigger: 'change' }
],
worthlessReason: [{
required: true, min: 2, max: 1000, message: '必填项,支持2-1000个字符', trigger: 'change'
}],
otherRemark: [{
required: true, min: 2, max: 1000, message: '必填项,支持2-1000个字符', trigger: 'change'
}],
patInFlag: [{
required: true, message: '必填项'
}],
valueFlag : [{
required: true, message: '必填项'
}]
},
endDateOpt: {
disabledData: (time) => {
if ( this.formData.appointEndTime != "" && this.formData.appointEndTime != null) {
return (
time.getTime() > new Date(this.formData.appointEndTime).getTime()
);
}
}
},
endDateOpt1: {
disabledDate: time => {
return (
time.getTime() < new Date(this.formData.appointBeginTime).getTime()
);
}
},
// 操作日志数据
/* 元素结构
{
operateTime: '2016-05-02',
operateUserName: '赵丽颖',
to: '问诊状态由已完成变成已结算',
from: '助诊医生时间不匹配'
}
*/
logData: [],
// 分页功能与产品沟通不做
// logCurrentPage: 1,
// logTotalCount: 0
}
},
created() {
this.editorType = this.$route.query.editorType
this.diagnoseLogId = this.$route.query.id
this.search()
},
mounted() {
},
computed: {
getReceptionPayType () {
return PAY_TYPE[this.formData.receptionPayType]
},
getAssistantPayType () {
return PAY_TYPE[this.formData.assistantPayType]
}
},
methods: {
search() {
this.loading = true
let url = `/diagnose/admin/diagnose/${this.diagnoseLogId}`
this.GET(url).then(res => {
this.loading = false
if (res.code == '000000') {
// for (let key in res.data) {
// if (!res.data[key]) {
// res.data[key] = '2019-01-02 12:00:00'
// }
// }
this.formData = res.data
this.formData.price = this.priceFilter(this.formData.price)
this.formData.serviceFee = this.priceFilter(this.formData.serviceFee)
if (!this.formData.illnessImageUrls) {
this.formData.illnessImageUrls = []
} else {
this.formData.illnessImageUrls = this.setObjectArr(this.formData.illnessImageUrls)
}
if (!this.formData.illnessAudioUrls) {
this.formData.illnessAudioUrls = []
} else {
this.formData.illnessAudioUrls = this.setObjectArr(this.formData.illnessAudioUrls)
}
if(this.formData.diagnoseAdvice) {
this.oldDiagnoseAdvice = this.formData.diagnoseAdvice
this.formData.diagnoseAdvice = ''
}
if (!this.formData.sex) {
this.formData.sex = 1;
}
if (!this.formData.maritalStatus) {
this.formData.maritalStatus = 1;
}
} else {
this.$message.info('请稍后重试')
}
this.getDoctorList()
this.queryOperationLogs()
}).catch(() => {
this.$message.info('请稍后重试')
});
},
getDoctorList() {
this.loading = true
let url = `/diagnose/doctorService/doctorList?diagnoseType=${this.formData.diagnoseType}`
this.GET(url).then(res => {
this.loading = false
if (res.code == '000000') {
this.doctorList = res.data
} else {
this.$message.info('请稍后重试')
}
}).catch(() => {
this.loading = false
this.$message.info('请稍后重试')
});
},
queryOperationLogs() {
let url = `/diagnose/admin/diagnose/log/${this.diagnoseLogId}`
this.GET(url).then(res => {
if (res.code == '000000') {
this.logData = res.data
}
// 非交互性功能接口不提示
}).catch(() => {
this.loading = false
})
},
// 预约开始时间选择时
continueBeginChange(val) {
if(this.formData.appointEndTime) {
if(new Date(val).getTime() > new Date(this.formData.appointEndTime).getTime()) {
this.$message.info('开始时间要小于结束时间');
this.formData.appointBeginTime = '';
return;
}
}
},
// 预约结束时间选择时
continueEndChange(val) {
if(this.formData.appointBeginTime) {
if(new Date(val).getTime() <= new Date(this.formData.appointBeginTime).getTime()) {
this.$message.info('结束时间要大于开始时间');
this.formData.appointEndTime = '';
return;
}
}
},
blurFn() {
if (this.formData.idCardType == 1 && this.formData.idCard && this.formData.idCard.length == 18) {
this.formData.birthdayStr = getBirth(this.formData.idCard)
this.birthDisable = true
} else {
this.formData.birthdayStr= ''
this.birthDisable = false
}
},
cancle() {
this.$router.back()
},
priceFilter(value){
if(!value) return 0;
if(value) {
return (value / 100)
}
},
setPrice(value) {
if(!value) return 0;
if(value) {
return (value * 100)
}
},
doctorChanged(value) {
let selected = this.doctorList.find(item => item.doctorId === value);
if (selected) {
this.formData.doctorId = value
this.formData.doctorName = selected.doctorName
this.formData.doctorTitle = selected.doctorTitle
this.formData.doctorHospital = selected.doctorHospital
this.formData.doctorDepartment = selected.doctorDepartment
this.formData.doctorMobile = selected.doctorMobile
this.formData.serviceFee = this.priceFilter(selected.serviceFee)
}
},
save() {
this.$refs.form.validate((valid) => {
let url = `/diagnose/admin/diagnose/update`;
this.formData.birthday = new Date(this.formData.birthdayStr)
// this.formData.birthday = this.formData.birthdayStr;
let params = JSON.parse(JSON.stringify(this.formData))
params.illnessImageUrls = this.$refs.imgComponent ? [...this.$refs.imgComponent.setNewArr()] : []
params.illnessAudioUrls = this.$refs.musicComponent ? [...this.$refs.musicComponent.setNewArr()] : []
params.price = this.setPrice(params.price)
params.serviceFee = this.setPrice(params.serviceFee)
if (!params.diagnoseAdvice) {
params.diagnoseAdvice = this.oldDiagnoseAdvice
}
this.loading = true
this.btnDisable = true
this.POST(url, params).then(res => {
this.loading = false
this.btnDisable = false
if (res.code == "000000") {
this.$message.success('保存成功');
this.$router.back()
} else {
this.$message({
message: res.message,
type: "error"
})
}
}).catch(() => {
this.btnDisable = false
this.loading = false
});
// return
// if (valid) {
// let url = `/diagnose/admin/diagnose/update`
// let params = JSON.parse(JSON.stringify(this.formData))
// params.illnessImageUrls = this.$refs.imgComponent ? [...this.$refs.imgComponent.setNewArr()] : []
// params.illnessAudioUrls = this.$refs.musicComponent ? [...this.$refs.musicComponent.setNewArr()] : []
// this.POST(url, params).then(res => {
// this.loading = false
// if (res.code == "000000") {
// this.$message.success('保存成功');
// // this.$router.back()
// } else {
// this.$message({
// message: res.message,
// type: "error"
// })
// }
// });
// } else {
// this.$message.info('请将信息填写完整')
// }
});
},
// 格式话音频/视频数组
setObjectArr(array) {
let newArr = []
array.forEach(element => {
newArr.push(
{ from: 'all',
url: element
}
)
});
return newArr
},
// log
// handlelogSizeChange (val) {
// console.log('每页val条')
// },
// handlelogCurrentChange (val) {
// console.log('当前页为val')
// }
// @size-change="handlelogSizeChange"
// @current-change="handlelogCurrentChange"
// :current-page="logCurrentPage"
// :page-sizes="[100, 200, 300, 400]"
// :page-size="100"
// layout="total, sizes, prev, pager, next, jumper"
// :total="logTotalCount">
}
}
</script>
<style lang="scss" scoped>
.diagnosis-list-content {
.component-content {
padding: 10px;
background: #fff;
overflow: hidden !important;
.title {
margin-bottom: 30px;
}
.img-title {
margin-top: 20px;
font-size: 14px;
color: #6d8bc7;
line-height: 40px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.old-diagnoseAdvice {
margin-top: 20px;
font-size: 14px;
color: #9197a3;
line-height: 40px;
}
.set-width {
width: 300px;
}
.log-info {
margin: 15px auto;
width: calc(100% - 30px);
}
.log-info-pagin {
margin: 0 15px;
}
}
.btn-wrap {
padding: 40px 0 60px;
margin: 0 auto;
}
}
</style>
<template>
<div class="current-session-wrap">
<section class="component-content screenSet" id="screenSet">
<article
class="center"
v-loadmore="getOldMSGHistory"
>
<section class="c-header">
<div class="c-header-l">
<img :src="doctorImg" alt />
<span class="name">{{doctorName}}医生的问诊群聊</span>
</div>
</section>
<p class="refreshText"></p>
<section id="msgContentId" class="msg-content scroll-box">
<article
v-for="(item, index) in messageList"
:key="index">
<!-- sendOrReceive 为true在右边 -->
<div class="msg-item" :class="{'cr': item.sendOrReceive}">
<div v-if="item.showType != 10" class="msg-item-img">
<img :src="item.avatarImg" alt />
</div>
<div class="msg-item-detail" :class="{'line': item.showType == 10}">
<span v-if="item.showType != 10" class="mid-time">{{item.name}} {{item.timestampStr}}</span>
<div class="send-warpper">
<img
v-if="item.sendOrReceive && item.isShowErrorIcon"
class="icon"
src="../../../assets/image/IM/icon-no-send.png"
alt
/>
<img
v-if="item.sendOrReceive && item.isShowLoadingIcon"
class="icon ld"
src="../../../assets/image/IM/loading-icon-new.png"
alt
/>
<div v-if="item.showType == 1" class="mid-text-wrapper" style="max-width: 520px;">
<div class="mid-text">{{item.text}}</div>
</div>
<div v-if="item.showType == 2" class="mid-img" v-viewer>
<div class="img-box">
<img
class="img"
:src="item.url"
:style="{width: item.newW + 'px', height: item.newH + 'px' }"
alt
/>
</div>
</div>
<div v-if="item.showType == 3" class="mid-pdf" @click="openPDF(item)">
<div class="midp-left">
<span class="name">{{item.text | shortName(23)}}</span>
<span class="size">{{fileSizeChange(item.size)}}</span>
</div>
<div class="midp-icon">
<img src="../../../assets/image/IM/icon-pdf.png" alt />
</div>
</div>
<div v-if="item.showType == 4" class="mid-text">
{{item.text}}
<span class="link">{{item.suffix}}</span>
</div>
<div v-if="item.showType == 5" class="mid-text no-support">
<img src="../../../assets/image/IM/icon-warning-circle.png" alt />
<span>该消息类型PC端暂不支持</span>
</div>
<!-- 语音消息 -->
<div v-if="item.showType == 6" class="audio-box">
<audio controls>
<source :src="item.url" type="audio/mpeg">
</audio>
</div>
<!-- 问诊开始与病例模块 -->
<div v-if="item.showType == 7" class="diagnosis-box">
<div class="title">{{item.title}}</div>
<div class="dia-text">
<span class="label">患者:</span>
<span>{{item.text.patientName}} {{item.text.sex == 1 ? '男' : '女'}} {{item.text.age}}</span>
</div>
<div class="dia-text">
<span class="label">病情描述:</span>
<span>{{item.text.illnessDetail}}</span>
</div>
</div>
<!-- 预约时间模块 -->
<div v-if="item.showType == 8" class="time-box">
<div class="title">{{item.title}}</div>
<div class="time">{{item.text.timeStr}}</div>
<div class="time-text">{{item.text.tips}}</div>
</div>
<!-- 音视频与IM的交互 -->
<div v-if="item.showType == 9" class="live-box">
<div class="live-notice">{{item.text}}</div>
</div>
<!-- 问诊结束 -->
<div v-if="item.showType == 10" class="diagnosis-end">
<div class="split-line">{{item.text}}</div>
</div>
<!-- 医生建议模块 -->
<div v-if="item.showType == 11" class="suggession-box">
<div class="title">{{item.title}}</div>
<div class="suggession-text">{{item.text}}</div>
</div>
</div>
</div>
</div>
<span
v-if="item.sendOrReceive && item.isShowErrorMsg"
class="error-mg"
:class="{'mr': item.sendOrReceive}"
>{{item.errorMsg}}</span>
</article>
</section>
<section class="c-bottom">
<el-input type="textarea" placeholder="请输入内容" v-model="sendText" maxlength="499"></el-input>
<div class="cb-icon-wrapper">
<el-upload
class="bg-uploader"
action="#"
accept=".jpg, .png, .pdf"
:show-file-list="false"
:before-upload="beforeUploadFile"
>
<img src="../../../assets/image/IM/icon-folder-open.png" alt />
</el-upload>
<img src="../../../assets/image/IM/icon-link.png" @click="preSendLinkMsg" alt />
</div>
<div class="send-btn" :class="{'active': canSend}" @click="sendTextMsg">
<img v-show="canSend" src="../../../assets/image/IM/send-yes.png" alt />
<img v-show="!canSend" src="../../../assets/image/IM/send-no.png" alt />
</div>
</section>
</article>
</section>
<!-- 选择链接弹窗 -->
<el-dialog
title="选择链接"
:show-close="true"
:visible.sync="showSelectDialog"
:close-on-click-modal="false"
width="500px"
class="link-form"
>
<el-form ref="linkFormRef" :rules="rules" :model="linkForm" label-width="100px">
<el-form-item label="普通文本">
<el-col :span="20">
<el-input v-model="linkForm.remark" size="small" maxlength="300"></el-input>
</el-col>
</el-form-item>
<el-form-item label="链接文案" prop="info">
<el-col :span="20">
<el-input v-model="linkForm.info" size="small" maxlength="100"></el-input>
</el-col>
</el-form-item>
<el-form-item label="链接地址" prop="url">
<el-col :span="20">
<el-select
size="small"
style="width: 300px"
clearable
filterable
v-model="linkForm.url"
placeholder="请选择"
>
<el-option
v-for="item in linkList"
:key="item.id"
:label="item.title"
:value="item.id"
></el-option>
</el-select>
</el-col>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer" style="text-align: right;">
<el-button size="small" @click="showSelectDialog = false">取 消</el-button>
<el-button size="small" type="primary" @click="sendLinkMsg">确 定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import BreadCrumb from "@/components/breadcrumb.vue";
import { doUpload, getFilePath } from "@/utils/qiniu-util";
import { openLoading, closeLoading, betaHandle } from "@/utils/utils";
import { getPicaKFAccid, getPhomeDemain } from "@/utils";
const CONTAINER_HEIGHT = 700;
let forwardMsgIntervalId = null,
continueIntervalId = null,
autoCompletionIntervalId = null,
cacheMap = {};
let _this = null;
export default {
components: {
BreadCrumb,
},
data() {
return {
curmbFirst: "云鹊客服",
curmbSecond: "当前会话",
sendText: "",
sessionListData: {
currentTimestamp: 0,
myTaskCount: 0,
sessionList: [],
waitingTaskCount: 0
},
currentContinueTimes: 0,
currentSessionIndex: 0, // 当前会话序号
currentSession: {},
currentTaskLogId: "", // 当前会话ID
picakfAccId: "",
historyTimestamp: 0,
realTimestamp: 0,
containerHeight: CONTAINER_HEIGHT,
showSelectDialog: false,
linkForm: {
remark: "",
info: "",
url: ""
},
linkList: [], // 消息列表 showType 1: 文本; 2: 图片; 3: PDF; 4: 链接; 5: 不支持类型; 6: 语音;7: 病例;
messageList: [],
rules: {
info: [
{ required: true, message: "请填写链接显示文案", trigger: "blur" }
],
url: [{ required: true, message: "请选择链接", trigger: "change" }]
},
imgWidth: 0,
imgHeight: 0,
imgProportion: 0,
hasNoHistoryData: false,
tid: '',
teamMemberList: [],
doctorName: '',
doctorImg: ''
};
},
computed: {
canSend() {
return !!this.sendText;
}
},
watch: {
// 监听消息列表的变化,添加sessionFlag(会话结束标志)
messageList: {
handler(newMsgList) {
let l = newMsgList.length;
if (l >= 2) {
for (let i = 1; i < l; i++) {
if (newMsgList[i - 1].taskLogId !== newMsgList[i].taskLogId) {
newMsgList[i].sessionFlag = true;
}
}
}
},
deep: true
},
// 监听到有变化,就缓存一下
sendText(newText) {
cacheMap[this.currentSession.id] = newText || "";
}
},
created() {
_this = this;
this.picakfAccId = getPicaKFAccid();
this.tid = this.$route.query.tid || '';
this.getFiveContentList();
autoCompletionIntervalId && clearInterval(autoCompletionIntervalId);
autoCompletionIntervalId = setInterval(() => {
this.autoCompletionInterval();
}, 2000);
// 监听键盘的回车按键(回车时发送消息,并阻止其在textarea中的回车换行行为)
document.onkeydown = function(ev) {
var event = ev || event;
if (event.keyCode == 13) {
_this.sendTextMsg();
event.preventDefault();
}
};
this.getMembersList(); // 获取群聊成员信息
},
mounted() {
cacheMap = {};
this.$nextTick(() => {
_this.containerHeight = document.body.clientHeight - 80;
_this.getElmByID("screenSet").style.height = _this.containerHeight - 76 + "px";
_this.getElmByID("msgContentId").style.height = _this.containerHeight - 211 + "px";
});
},
methods: {
// 含有敏感信息的消息,自行补全提示文案
// 每30秒监测敏感信息
autoCompletionInterval() {
if (!this.messageList.length) return;
// 将带有loading的消息转成失败的
this.messageList.forEach(item => {
if (item.isShowLoadingIcon) {
item.isShowLoadingIcon = false;
item.isShowErrorIcon = true;
}
});
let flag = false, msg;
for (let i = 0; i < this.messageList.length; i++) {
msg = this.messageList[i];
if (msg.isShowErrorIcon && !msg.isShowErrorMsg) {
flag = true;
break;
}
}
if (flag) {
this.getMSGForwardForAC(msg);
}
},
// 查询群组成员列表
getMembersList() {
this.GET("/im/team/member/list", {tid: this.tid}).then(res => {
if (res.code === "000000") {
this.teamMemberList = res.data // 1 问诊医生 2接诊医生 3居民 4其他
this.doctorName = this.teamMemberList[0].name
this.doctorImg = this.teamMemberList[0].avatarImageUrl
this.getMSGHistory() // 查询群聊历史消息
}
});
},
// 查询医生和居民的消息 - 向前查找
getMSGForwardForAC(msg) {
let params = {
includeFlag: 0,
lastMsgTimestamp: msg.realTimestamp,
limit: 50,
tid: this.tid
};
this.POST("/im/team/message/forward", params).then(res => {
if (res.code === "000000") {
this.contactForwardMessage(res.data, false);
}
});
},
// 获取元素
getElmByID(elmId) {
return document.getElementById(elmId);
},
// 查询医生和居民的消息历史(下拉刷新时调用)
getOldMSGHistory() {
if(this.hasNoHistoryData) return
let params = {
includeFlag: 0, // 不带本条消息
lastMsgTimestamp: this.historyTimestamp,
limit: 20,
tid: this.tid
}
this.POST("/im/team/message/history", params).then(res => {
if (res.code === "000000") {
// 将新消息合并到之前的消息中, 并且重置最后一条消息
if(res.data && res.data.length > 0) {
this.convertMessageList(res.data, 3)
} else {
this.hasNoHistoryData = true
}
} else {
this.$message({
message: res.message,
type: "error"
});
}
});
},
// 查询医生和居民的消息历史(第一次进来时就调用)
getMSGHistory(session) {
let params = {
includeFlag: 1, // 带本条消息
limit: 20,
tid: this.tid
};
this.POST("/im/team/message/history", params).then(res => {
if (res.code === "000000") {
this.convertMessageList(res.data, 1)
} else {
this.$message({
message: res.message,
type: "error"
});
}
});
},
// 查询医生和居民的消息 - 向前查找
// 将获取消息列表插入到当前消息列表的最后
getMSGForward() {
let params = {
includeFlag: 0,
lastMsgTimestamp: this.realTimestamp,
limit: 20,
tid: this.tid
};
this.POST("/im/team/message/forward", params).then(res => {
if (res.code === "000000") {
this.convertMessageList(res.data, 2)
} else {
this.$message({
message: res.message,
type: "error"
});
}
});
},
/* 转换消息格式
处理的消息类型只有5种:
type == TEXT(showType:1)
type == image 或 picture(showType:2)
type == custom时,18: PDF文件(showType:3); 19: 链接信息(showType:4); 1 ~ 17: 不支持的消息类型(showType:5);
directFlag 1: 第一次取数据; 2: 拼接实时消息(push); 3: 拼接历史消息(unshift);
*/
convertMessageList(messageList, directFlag = 1) {
messageList.sort((a, b) => {
return a.timestamp - b.timestamp;
})
let msg = null,
content = null,
text = "",
suffix = "",
showType = 1,
size = 0,
url = "",
title = "",
cMessageList = [];
messageList.forEach((rawMsg, index) => {
text = "";
suffix = "";
showType = 1;
size = 0;
url = "";
title = "";
msg = Object.assign({}, rawMsg);
msg.sendOrReceive = rawMsg.fromAccId === this.picakfAccId; // 判断消息是显示在左边还是右边, true 右
//msg.avatarImg = msg.sendOrReceive ? this.kfAvatar : this.currentSession.avatarImageUrl;
for(let i = 0; i < this.teamMemberList.length; i++) {
if(rawMsg.fromAccId == this.teamMemberList[i].accId) {
msg.avatarImg = this.teamMemberList[i].avatarImageUrl;
msg.name = this.teamMemberList[i].name;
break
}
}
if (msg.type.toLowerCase() == "custom") {
content = JSON.parse(msg.content)
text = content.content
if (content.bizType == -1) { // 系统消息:消息由于违规未发送成功(可以不处理)
showType = -1
text = content.content
} else if (content.bizType == 18) { // PDF
showType = 3
text = content.name
size = content.size
url = content.url
} else if (content.bizType == 19) { // 链接
showType = 4
text = content.content
suffix = content.suffix
} else if(content.bizType == 22){ // 病例
showType = 7
title = content.title
text = JSON.parse(content.content)
} else if(content.bizType == 23) { // 预约时间
showType = 8
title = content.title
text = JSON.parse(content.content)
} else if(content.bizType == 24){ // 音视频与IM交互
showType = 9
text = content.content
} else if(content.bizType == 25){ // 本次问诊结束
showType = 10
text = content.content
} else if(content.bizType == 26){ // 医生建议
showType = 11
title = content.title
text = content.content
}else {
showType = 5
}
} else if( msg.type.toLowerCase() == "image" || msg.type.toLowerCase() == "picture") { // 图片
content = JSON.parse(msg.content);
url = content.url;
text = content.name;
showType = 2;
this.imgSizeHandleNew(msg, content.w, content.h);
}else if(msg.type.toLowerCase() == "audio") { // 语音
content = JSON.parse(msg.content)
url = content.url
showType = 6
} else {
showType = 1 // 文本
text = msg.content
}
msg.title = title
msg.text = text
msg.showType = showType
msg.suffix = suffix
msg.size = size
msg.url = url
msg.sessionFlag = false
cMessageList.push(msg)
});
if (directFlag === 1) {
this.messageList = []
this.$forceUpdate()
forwardMsgIntervalId && clearInterval(forwardMsgIntervalId)
this.messageList = cMessageList
this.$forceUpdate()
setTimeout(() => {
this.$nextTick(() => {
const scrollBoxDom = document.querySelector(".scroll-box")
scrollBoxDom.scrollTop = scrollBoxDom.scrollHeight
});
}, 100);
this.currentContinueTimes = this.sessionListData.currentTimestamp - this.currentSession.handleStartTime
continueIntervalId && clearInterval(continueIntervalId)
continueIntervalId = setInterval(() => {
this.currentContinueTimes += 1000
}, 1000);
// 最新消息,要合并CUSTOM类型中,bizType是-1的数据(系统消息)
} else if (directFlag === 2) {
this.contactForwardMessage(cMessageList)
} else {
if (cMessageList.length) {
this.messageList.unshift(...cMessageList)
this.$nextTick(() => {
const scrollBoxDom = document.querySelector(".scroll-box")
scrollBoxDom.scrollTop = 1000
});
}
}
// 重新设置历史与实时的时间戳
if (this.messageList.length) {
this.historyTimestamp = this.messageList[0].timestamp
let timestamp = this.messageList[this.messageList.length - 1].timestamp
if (timestamp) {
this.realTimestamp = timestamp
}
}
// 自己发送消息时,暂时不刷新消息
if (directFlag == 1) {
forwardMsgIntervalId = setInterval(() => {
this.getMSGForward()
}, 3000)
}
this.$forceUpdate()
},
// 接接数据
contactForwardMessage(cMessageList, canPush = true) {
let content = {},
signature = "",
msgIndex = -1,
newMsgList = [],
flag = false;
cMessageList.forEach(item => {
content = {};
signature = "";
msgIndex = -1;
newMsgList = [];
if (item.type.toLowerCase() == "custom") {
content = JSON.parse(item.content);
if (content.bizType == -1) {
signature = content.signature;
msgIndex = this.messageList.findIndex(m => {
return m.signature == signature && !m.isShowErrorMsg;
});
if (msgIndex > -1) {
flag = true;
this.messageList[msgIndex].errorMsg = content.content;
this.messageList[msgIndex].isShowErrorMsg = true;
}
this.$forceUpdate();
} else {
flag = true;
canPush && this.messageList.push(item);
}
} else {
flag = true;
canPush && this.messageList.push(item);
}
});
if (flag) {
this.$nextTick(() => {
var element = document.querySelector(".scroll-box");
if (element.scrollTop >= element.scrollHeight - element.offsetHeight - 400) {
element.scrollTop = element.scrollHeight - element.offsetHeight;
}
});
}
},
// 打开PDF
openPDF(item) {
window.open(item.url, "__blank");
},
// 根据字段名及其值,从数组中查找对象
findItemByKeyAndVal(arr, key, value, flag = 0) {
if (flag == 0) {
return arr.find(item => {
return item[key] == value;
});
} else if (flag == 1) {
return arr.findIndex(item => {
return item[key] == value;
});
}
},
// 获取积木列表
getFiveContentList() {
this.GET(
"/contents/admin/template/queryTemplate?publishFlag=5&pageNo=1&pageSize=99999"
).then(res => {
if (res.code === "000000") {
this.linkList = res.data.templateList || [];
} else {
this.$message({
message: res.message,
type: "error"
});
}
});
},
// 上传文件
beforeUploadFile(file) {
console.log("file", file);
let fileSize = file.size / (1024 * 1024);
if (fileSize > 5) {
this.$message({
message: "请上传小于5M的文件",
type: "warning"
});
return;
}
openLoading(_this);
doUpload(
_this,
file,
getFilePath(file, null),
"preview4",
"progress",
""
).then(function(resData) {
closeLoading(_this);
let params = {};
params.fileSize = resData.size;
params.fileExt = resData.ext;
params.url = resData.fullPath;
params.info = resData.name;
params.type = 2;
// 如果是图片,则要获取其宽与高
if (
params.fileExt.toLowerCase() === ".jpg" ||
params.fileExt.toLowerCase() === ".jpeg" ||
params.fileExt.toLowerCase() === ".png"
) {
params.type = 1;
let image = new Image();
image.src = params.url;
image.onload = function() {
let _img = this;
params.width = _img.width;
params.height = _img.height;
_this.sendCommonMsg(params);
};
} else {
_this.sendCommonMsg(params);
}
});
},
// 打开发送链接弹框
preSendLinkMsg() {
this.linkForm = {
remark: "",
info: "",
url: ""
};
this.showSelectDialog = true;
},
// 发送带链接消息
sendLinkMsg() {
this.$refs["linkFormRef"].validate(valid => {
if (valid) {
let params = Object.assign({}, this.linkForm);
params.url = getPhomeDemain() + `/template_v2/?id=${params.url}`;
params.type = 3;
this.sendCommonMsg(params);
this.showSelectDialog = false;
}
});
},
// 发送文本消息
sendTextMsg() {
if (!this.canSend) return;
this.sendCommonMsg({ info: this.sendText });
this.sendText = "";
},
/* 处理发送消息
1: 先将消息体直接显示在对话框中
2: 设置一个时间戳,以便再次找回
3: 保存再次发送的数据
4: 设置各种状态(1:isShowErrorIcon; 2:isShowLoadingIcon; 3:isShowErrorMsg)
*/
handleSendMsg(params, sendId) {
let text = "";
let msg = Object.assign({}, params);
msg.fromAccount = this.tid;
msg.toAccount = this.picakfAccId;
// type: 0, // 类型 0文本 1图片 2pdf 3链接
msg.text = params.info || "";
msg.suffix = params.remark || "";
if (msg.type == 3) {
msg.suffix = params.info;
msg.text = params.remark || "";
}
msg.size = params.fileSize;
msg.url = params.url;
msg.showType = params.type - 0 + 1;
msg.sessionFlag = false;
msg.isShowLoadingIcon = true;
msg.isShowErrorIcon = false;
msg.isShowErrorMsg = false; // 只有在下次拉取新数据时才有可能是为ture
msg.extData = Object.assign({}, params); // 再将发送时的数据
msg.sendId = sendId;
msg.sendOrReceive = true;
msg.timestampStr = new Date().format("hh:mm");
msg.realTimestamp = this.realTimestamp;
msg.taskLogId = this.currentTaskLogId;
this.teamMemberList.forEach(item => {
if(this.picakfAccId = item.accId) {
msg.avatarImg = item.avatarImageUrl // 运营头像
}
})
if(msg.type == 1) {
this.imgSizeHandleNew(msg, msg.width, msg.height)
}
this.messageList.push(msg)
this.$nextTick(() => {
var element = document.querySelector(".scroll-box")
element.scrollTop = element.scrollHeight
});
},
// 发送通用消息
async sendCommonMsg(params) {
let sendMsgParams = {
fromAccount: this.picakfAccId,
toAccount: this.tid,
fileExt: "", // 文件扩展名称图片或PDF文件)
fileSize: 0, // 文件大小(图片或PDF文件)
height: 0, // 图片高度(仅图片)
width: 0, // 图片宽度(仅图片)
info: "", // 文本内容,图片的名称,pdf的名称,链接显示内容
md5: "", // 图片或文件MD5 暂时由后台生成
remark: "", // 其他信息(链接中的前缀文案)
type: 0, // 类型 0文本 1图片 2pdf 3链接
url: "" // url地址(图片、pdf,链接)
}
params = Object.assign(sendMsgParams, params)
// 将获取新数据的定时器关闭
forwardMsgIntervalId && clearInterval(forwardMsgIntervalId)
let sendId = new Date().getTime()
this.handleSendMsg(params, sendId)
await this.POST("/im/team/op/message/send", params)
.then(res => {
if (res.code === "000000") {
// 校验结果:1校验通过 2校验不通过
let msg = this.messageList[this.messageList.length - 1];
if (msg.sendId !== sendId) {
msg = this.getMsgBySendId(sendId);
}
if (res.data.checkFlag == 1) {
this.realTimestamp = res.data.timetag
msg.isShowLoadingIcon = false
msg.isShowErrorIcon = false
msg.isShowErrorMsg = false // 只有在下次拉取新数据时才有可能是为ture
} else {
msg.signature = res.data.signature
msg.isShowLoadingIcon = false
msg.isShowErrorIcon = true
msg.isShowErrorMsg = false // 只有在下次拉取新数据时才有可能是为ture
}
this.teamMemberList.forEach((item, index) => {
if(params.fromAccount == item.accId) {
msg.name = item.name
}
})
} else {
this.$message({
message: res.message,
type: "error"
});
}
})
.catch(error => {
let msg = this.messageList[this.messageList.length - 1]
if (msg.sendId !== sendId) {
msg = this.getMsgBySendId(sendId)
}
msg.isShowLoadingIcon = false
msg.isShowErrorIcon = true
msg.isShowErrorMsg = false // 只有在下次拉取新数据时才有可能是为ture
msg.canRepeatSend = true
});
this.$forceUpdate()
// 重新开启定时器
forwardMsgIntervalId = setInterval(() => {
this.getMSGForward()
}, 3000)
},
// 根据sendId,查找到对应的消息
getMsgBySendId(sendId) {
console.log("------------getMsgBySendId------------");
let l = this.messageList.length,
i = l - 1;
for (; i > 0; i--) {
if (this.messageList[i].sendId == sendId) {
break;
}
}
return this.messageList[i];
},
// 文件大小单位转换
fileSizeChange(val) {
return betaHandle(val);
},
},
beforeDestroy() {
forwardMsgIntervalId && clearInterval(forwardMsgIntervalId);
autoCompletionIntervalId && clearInterval(autoCompletionIntervalId);
}
};
</script>
<style lang="scss" scoped>
@import "./im.scss";
</style>
\ No newline at end of file
<template>
<div class="diagnosis-list-content">
<div class="select-content screenSet">
<div class="title">咨询订单管理后台</div>
<el-form
:inline="true"
class="demo-form-inline from-box"
:model="searchParam"
label-width="80px"
ref="searchParam"
>
<el-collapse-transition>
<div v-show="isUp" class="form-container">
<div class="form-li">
<div>
<el-form-item label="订单搜索" class="t-b">
<el-input
v-model.trim="searchParam.id"
clearable
placeholder="请输入ID"
style="width: 220px"
></el-input>
</el-form-item>
</div>
<div>
<el-form-item label="分诊科室" class="t-b">
<el-select
v-model="searchParam.triageDepartmentId"
placeholder="请选择科室"
style="width: 220px"
filterable
>
<el-option
v-for="item of depList"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
</div>
<div>
<el-form-item label="创建日期" class="t-b">
<el-date-picker
v-model="createRangeTime"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 220px"
:picker-options="pickerOptions1"
>
</el-date-picker>
</el-form-item>
</div>
</div>
<div class="form-li">
<div>
<el-form-item label="运营人员" class="t-b">
<el-input
v-model.trim="searchParam.operateName"
clearable
placeholder="请输入运营/分诊运营/接诊运营姓名查询"
style="width: 220px"
></el-input>
</el-form-item>
</div>
<div>
<el-form-item label="预约类型" class="t-b">
<el-select
v-model="searchParam.diagnoseType"
placeholder="请选择预约类型"
style="width: 220px"
>
<el-option
v-for="item of tyleList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</div>
<div>
<el-form-item label="退款日期" class="t-b">
<el-date-picker
v-model="cancelRangeTime"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 220px"
:picker-options="pickerOptions1"
>
</el-date-picker>
</el-form-item>
</div>
</div>
<div class="form-li">
<div>
<el-form-item label="助诊医生" class="t-b">
<el-input
v-model.trim="searchParam.assistantVal"
clearable
placeholder="请输入姓名或电话"
style="width: 220px"
></el-input>
</el-form-item>
</div>
<div>
<el-form-item label="预约来源" class="t-b">
<el-select
v-model="searchParam.appointSource"
placeholder="请选择预约来源"
style="width: 220px"
>
<el-option
v-for="item of sourceList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</div>
<div>
<el-form-item label="预约日期" class="t-b">
<el-date-picker
v-model="orderRangeTime"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 220px"
>
</el-date-picker>
</el-form-item>
</div>
</div>
<div class="form-li">
<div>
<el-form-item label="接诊医生" class="t-b">
<el-input
v-model.trim="searchParam.receptionVal"
clearable
placeholder="请输入姓名或电话"
style="width: 220px"
></el-input>
</el-form-item>
</div>
<div>
<el-form-item label="完成时间" class="t-b">
<el-date-picker
v-model="completeRangeTime"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 220px"
:picker-options="pickerOptions1"
>
</el-date-picker>
</el-form-item>
</div>
</div>
<div class="form-btn">
<div class="form-btn-li">
<el-button type="primary" class="submit-btn" @click="getsearch"
>搜索</el-button
>
<el-button type="warning" class="submit-btn" @click="reset"
>重置</el-button
>
</div>
<div class="form-btn-li">
<el-button
type="success"
class="submit-btn big-btn"
@click="batchSetOperator"
v-if="searchParam.menuType == 1"
>批量设置运营</el-button
>
<el-button type="info" class="submit-btn" @click="download"
>全部导出</el-button
>
</div>
</div>
</div>
</el-collapse-transition>
</el-form>
<div class="select-bottom" @click="selectToggle">
<span v-if="!isUp">展开筛选<i class="el-icon-arrow-down"></i></span>
<span v-else>收起筛选<i class="el-icon-arrow-up"></i></span>
</div>
</div>
<div class="component-content screenSet" id="screenSet">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane
:label="item.label"
:name="item.active"
v-for="item in tabpaneList"
:key="item.active"
>
<div v-if="tabrefresh" slot="label">
<span class="span-box">
<el-badge :is-dot="item.isdot" class="item">
{{ item.label }}({{ item.dgCount }})
</el-badge>
</span>
</div>
<table-component
:menuType="searchParam.menuType"
:tData="tableData"
:pageNo="searchParam.pageNo"
:pageSize="searchParam.pageSize"
:totalRows="totalRows"
:loading="loading"
:tableHeight="tableHeight"
:multipleSelection.sync="multipleSelection"
@sortfunc="sortfunc"
@witeDiagnose="witeDiagnose"
@changeRun="changeRun"
@goDetail="goDetail"
@cancelRefund="cancelRefund"
@witeGo="witeGo"
@waitMatchDot="waitMatchDot"
@sendMessage="sendMessage"
@joinDiagnose="joinDiagnose"
@matchRun="matchRun"
@waitDiagnose="waitDiagnose"
@waitHzeDot="waitHzeDot"
@waitMatchTime="waitMatchTime"
@reMatchDot="reMatchDot"
@changeTime="changeTime"
@doneHandle="doneHandle"
@setOffice="setOffice"
@handleSizeChange="handleSizeChange"
@handleCurrentChange="handleCurrentChange"
></table-component>
</el-tab-pane>
</el-tabs>
<match-component
@search="search"
:matchVisible.sync="matchVisible"
:diagnoseLogId="diagnoseLogId"
:batchFlag="batchFlag"
:multipleSelection="multipleSelection"
:operateUserID="operateUserID"
></match-component>
<refund-component
@search="search"
:refundVisible.sync="refundVisible"
:diagnoseLogId="diagnoseLogId"
></refund-component>
<!-- 跟进原因弹出窗 -->
<followup-component
@search="search"
:followupVisible.sync="followupVisible"
:toFollowReason="toFollowReason"
:diagnoseLogId="diagnoseLogId"
></followup-component>
<matching-doctor
@search="search"
:doctorVisible.sync="doctorVisible"
:diagnoseLogId="diagnoseLogId"
:triageDepartmentId="triageDepartmentId"
:bizType="bizType"
></matching-doctor>
<diagnosis-component
@search="search"
:diagnosisVisible.sync="diagnosisVisible"
:diagnoseLogId="diagnoseLogId"
></diagnosis-component>
<coordinating-doctor
@search="search"
:coordinatingVisible.sync="coordinatingVisible"
:diagnoseLogId="diagnoseLogId"
:bizType="bizType"
></coordinating-doctor>
<diagnosis-doctor
@search="search"
v-if="diagnoseFlag"
:diagnosisDoctorVisible.sync="diagnosisDoctorVisible"
:diagnoseLogId="diagnoseLogId"
:diagnoseType="diagnoseType"
:doctorId="doctorId"
></diagnosis-doctor>
<appointment-time
@search="search"
:appointmentTimeVisible.sync="appointmentTimeVisible"
:diagnoseLogId="diagnoseLogId"
:bizType="bizType"
></appointment-time>
<diagnosis-time
@search="search"
:diagnosisTimeVisible.sync="diagnosisTimeVisible"
:diagnoseLogId="diagnoseLogId"
:bizType="bizType"
></diagnosis-time>
<rematching-doctor
@search="search"
:rematchingOptions="rematchingOptions"
:rematchingVisible.sync="rematchingVisible"
:diagnoseLogId="diagnoseLogId"
:bizType="bizType"
></rematching-doctor>
</div>
<a class="target" href="" target="_blank" ref="target"></a>
</div>
</template>
<script>
let vm = null;
import { updateDiagnosis } from "../../../utils/diagnosis";
import { base64decode } from "../../../utils/utils.js";
const DOWN_URL = "/diagnose/admin/diagnose/export";
const LIST_URL = "/diagnose/admin/diagnose/list";
const COUNT_QUERY = "/diagnose/admin/diagnose/countQuery";
const DEP_URL = "/hospital/departments/0";
import TableComponent from "@/components/list/table-c";
import {
TYPE_LIST,
IS_FLLOW,
SOURCE_LIST,
ALL_TAB_LIST,
TRIAGE_TAB_LIST,
RECEPTION_TAB_LIST,
RUN_TAB_LIST,
MATCH_TAB_LIST,
} from "@/utils/constants";
import MatchComponent from "@/components/common/match";
import RefundComponent from "@/components/common/refund";
import FollowupComponent from "../../../components/common/followup";
import MatchingDoctor from "../../../components/common/matching-doctor";
import DiagnosisComponent from "../../../components/common/diagnosis";
import CoordinatingDoctor from "../../../components/common/coordinating-doctor";
import DiagnosisDoctor from "../../../components/common/diagnosis-doctor";
import AppointmentTime from "../../../components/common/appointment-time";
import DiagnosisTime from "../../../components/common/diagnosis-time";
import RematchingDoctor from "../../../components/common/rematching-doctor";
export default {
components: {
TableComponent,
FollowupComponent,
MatchComponent,
RefundComponent,
MatchingDoctor,
DiagnosisComponent,
CoordinatingDoctor,
DiagnosisDoctor,
AppointmentTime,
DiagnosisTime,
RematchingDoctor,
},
data() {
return {
isUp: false,
endFlag: false,
beginFlag: false,
loading: false,
activeName: "99",
createRangeTime: "",
cancelRangeTime: "",
orderRangeTime: "",
completeRangeTime: "",
depList: [],
tabrefresh: true,
searchParam: {
id: "",
operateName: "",
assistantVal: "",
receptionVal: "",
sort: null,
triageDepartmentId: "",
diagnoseType: "", //预约问诊类型:1、音频 2、视频 3、图文
createdTimeBegin: "",
createdTimeEnd: "",
operateTimeBegin: "",
operateTimeEnd: "",
appointBeginTime: "",
appointEndTime: "",
doneTimeBegin: "",
doneTimeEnd: "",
pageSize: 15,
pageNo: 1,
menuType: 1, // 菜单类型:1、all 2、运营 3、待分诊 4、待接诊 5、外呼
status: "",
},
alltabslist: [],
tyleList: TYPE_LIST,
fllowList: IS_FLLOW,
sourceList: SOURCE_LIST,
tabpaneList: [],
rematchingOptions:[], // 备注信息
Raw_tabpaneList: [],
tableData: [],
totalRows: 0,
timeClickFlag: true,
tableHeight: 500,
diagnoseLogId: 0,
toFollowReason: "",
matchVisible: false,
refundVisible: false,
followupVisible: false,
doctorVisible: false,
diagnosisVisible: false,
coordinatingVisible: false,
diagnosisDoctorVisible: false,
diagnoseFlag:false,
appointmentTimeVisible: false,
diagnosisTimeVisible: false,
rematchingVisible: false,
multipleSelection: [],
batchFlag: false,
bizType: 0,
diagnoseType: 0,
doctorId: 0,
operateUserID: "",
triageDepartmentId: 0,
pickerOptions1: {
disabledDate: (time) => {
return time.getTime() > new Date().getTime(); //减去一天的时间代表可以选择同一天;
},
},
pickerOptions2: {
disabledDate: (time) => {
return time.getTime() < new Date().getTime(); //减去一天的时间代表可以选择同一天;
},
},
timer: null,
fromType: 0, //1或不传为为预约单列表 2为运营预约单列表 3为分诊台 4为接诊台
};
},
watch: {
$route: {
handler(newVal, oldVal) {
if (newVal) {
this.isUp=false;
this.reset()
this.init();
}
},
deep: true,
immediate: true,
},
},
created() {
vm = this;
this.getDep();
},
mounted() {
this.setTableHeight();
},
destroyed() {
clearInterval(this.timer);
},
methods: {
selectToggle() {
this.isUp = !this.isUp;
},
// 每隔1分钟对比数据
contrastData() {
clearInterval(this.timer);
this.timer = setInterval(() => {
this.getTabs();
}, 60000);
// 600000
},
// 获取tabs数据
getTabs() {
let url = COUNT_QUERY;
return this.GET(url).then((res) => {
if (res.code == "000000") {
this.setTable(res.data);
this.tabrefresh = false;
this.$nextTick(() => {
this.tabrefresh = true;
});
return true
}
});
},
init() {
let fullPath = this.$route.fullPath;
let fromType = 1;
if (fullPath.indexOf("?") > -1) {
let str = base64decode(fullPath.split("?")[1]);
if (str.indexOf("?")) {
fromType = str.split("=")[1];
}
}
// this.fromType = +(this.$route.query.fromType || 1);
this.fromType = +fromType;
this.activeName = "99";
this.searchParam.status = "";
this.Raw_tabpaneList = [];
this.getTabs().then((res)=>{
console.log(res)
if(res){
this.getsearch();
}
});
this.contrastData();
},
// 不同也main切换不同的tab
setTable(data) {
let tabs = ALL_TAB_LIST;
switch (this.fromType) {
case 1:
tabs = ALL_TAB_LIST;
this.searchParam.menuType = 1;
break;
case 2:
tabs = RUN_TAB_LIST;
this.searchParam.menuType = 2;
break;
case 3:
tabs = TRIAGE_TAB_LIST;
this.searchParam.menuType = 3;
break;
case 4:
tabs = RECEPTION_TAB_LIST;
this.searchParam.menuType = 4;
break;
case 5:
tabs = MATCH_TAB_LIST;
this.searchParam.menuType = 5;
break;
default:
tabs = ALL_TAB_LIST;
this.searchParam.menuType = 1;
break;
}
let count = 0;
for (let i = 0; i < tabs.length; i++) {
let index = data.findIndex((val) => {
return val.status == tabs[i].active;
});
if (index > 0) {
count = count + data[index].dgCount;
let isdot = false;
if (this.Raw_tabpaneList.length > 0) {
isdot =
data[index].dgCount > this.Raw_tabpaneList[i].dgCount
? true
: false;
}
tabs[i] = {
...tabs[i],
dgCount: data[index].dgCount,
isdot: isdot,
};
}
}
tabs[0].dgCount = count;
this.tabpaneList = tabs;
if (this.Raw_tabpaneList.length == 0) {
this.Raw_tabpaneList = JSON.parse(JSON.stringify(tabs));
}
},
resetPage() {
this.searchParam.pageSize = 15;
this.searchParam.pageNo = 1;
},
// 设置table的高度
setTableHeight() {
setTimeout(() => {
this.$nextTick(() => {
if (
document.getElementsByClassName("from-box") &&
document.getElementsByClassName("from-box")[0].clientHeight
) {
let height =
window.innerHeight -
50 -
140 -
10 -
160 -
document.getElementsByClassName("from-box")[0].clientHeight;
if (height > 300) {
this.tableHeight = height;
}
}
});
}, 20);
},
// tab切换
handleClick(val) {
console.log("this.fromType",this.fromType)
for (let i = 0; i < this.tabpaneList.length; i++) {
if (this.tabpaneList[i].active == val.paneName) {
this.tabpaneList[i].isdot = false;
this.Raw_tabpaneList[i] = this.tabpaneList[i];
}
}
this.searchParam.status =
val.paneName == 99
? ""
: val.paneName == 101 || val.paneName == 102
? "21"
: val.paneName;
if ((this.fromType == 5||this.fromType == 1) && this.searchParam.status) {
if (val.paneName == 101) {
this.searchParam.hasToFollowReason = 1;
} else if(val.paneName == 102) {
this.searchParam.hasToFollowReason = 2;
}
else{
if (this.searchParam.hasOwnProperty("hasToFollowReason")) {
delete this.searchParam.hasToFollowReason;
}
}
} else {
if (this.searchParam.hasOwnProperty("hasToFollowReason")) {
delete this.searchParam.hasToFollowReason;
}
}
this.getsearch();
},
// 初始化时间
initTime() {
const {
createRangeTime,
cancelRangeTime,
orderRangeTime,
completeRangeTime,
} = this;
this.setTime("createdTimeBegin", "createdTimeEnd", createRangeTime);
this.setTime("cancelTimeBegin", "cancelTimeEnd", cancelRangeTime);
this.setTime("appointBeginTime", "appointEndTime", orderRangeTime);
this.setTime("doneTimeBegin", "doneTimeEnd", completeRangeTime);
},
/**
* btime开始时间
* etime结束时间
* arrtime 时间数组
*/
setTime(btime, etime, arrtime) {
arrtime = arrtime || ["", ""];
this.searchParam[btime] = arrtime[0];
this.searchParam[etime] = arrtime[1];
},
// 重置页面后搜索
getsearch() {
this.resetPage();
this.search(true);
},
sortfunc(data) {
// ascending 升序
// descending 降序
if (data.prop == "appointBeginTime" && data.order == "ascending") {
this.searchParam.sort = 1;
} else if (
data.prop == "appointBeginTime" &&
data.order == "descending"
) {
this.searchParam.sort = 2;
} else if (
data.prop == "assistantBeginTime" &&
data.order == "ascending"
) {
this.searchParam.sort = 3;
} else if (
data.prop == "assistantBeginTime" &&
data.order == "descending"
) {
this.searchParam.sort = 4;
} else {
this.searchParam.sort = null;
}
this.search(true);
},
search(isTabs) {
this.loading = true;
if (!isTabs) {
console.log("isTabs", isTabs);
this.getTabs();
}
this.initTime();
let url = LIST_URL;
this.POST(url, this.searchParam).then((res) => {
this.loading = false;
if (res.code == "000000") {
this.tableData = res.data.list;
this.totalRows = res.data.allSize;
}
});
},
// 获取科室
getDep() {
let url = DEP_URL;
this.GET(url).then((res) => {
if (res.code === "000000") {
this.depList = [
{
id: "",
name: "全部",
},
...res.data,
];
}
});
},
// 重置
reset() {
this.createRangeTime = "";
this.cancelRangeTime = "";
this.orderRangeTime = "";
this.completeRangeTime = "";
this.searchParam = Object.assign(this.searchParam, {
id: "",
operateName: "",
assistantVal: "",
receptionVal: "",
triageDepartmentId: "",
diagnoseType: "", //预约问诊类型:1、音频 2、视频 3、图文
createdTimeBegin: "",
createdTimeEnd: "",
operateTimeBegin: "",
operateTimeEnd: "",
sort: null,
appointBeginTime: "",
appointEndTime: "",
doneTimeBegin: "",
doneTimeEnd: "",
});
},
// 导出
download() {
let url = DOWN_URL;
this.initTime();
let params = this.searchParam;
this.POST(url, params)
.then((res) => {
this.loading = false;
if (res.code == "000000") {
this.$confirm("将于24小时内导出成功,是否跳转下载列表页?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.$router.push("/down-list");
});
}
})
.catch((err) => {
console.log("网络出现点儿问题,稍后重试");
});
},
//设为待问诊
witeDiagnose(row) {
this.appointmentTimeVisible = true;
this.diagnoseLogId = row.diagnoseLogId;
this.bizType = 11;
},
//更换运营
changeRun(row) {
this.matchVisible = true;
this.diagnoseLogId = row.diagnoseLogId;
this.batchFlag = false;
this.operateUserID = row.operateUserId;
},
//查看详情/编辑详情
goDetail(row, flag) {
// this.$router.push({
// path: "/diagnosis-editor",
// query: { id: row.diagnoseLogId, editorType: flag },
// });
let target = this.$refs.target;
const { origin, pathname } = window.location;
let editorType = flag ? 1 : 2;
let u = `${origin}${pathname}#/diagnosis-editor?id=${row.diagnoseLogId}&editorType=${editorType}`;
target.setAttribute("href", u);
target.click();
},
//取消/退款
cancelRefund(row) {
this.refundVisible = true;
this.diagnoseLogId = row.diagnoseLogId;
},
//设为稍后跟进
witeGo(row) {
this.followupVisible = true;
this.toFollowReason = row.toFollowReason;
this.diagnoseLogId = row.diagnoseLogId;
},
//设为待匹配医生
waitMatchDot(row) {
this.diagnoseLogId = row.diagnoseLogId;
// 待分诊
// if(row.status == 22){
// this.doctorVisible = true;
// this.bizType = 7;
// this.triageDepartmentId = row.triageDepartmentId;
// }
// else {
this.diagnosisTimeVisible = true;
this.bizType = 5;
// }
},
//发送消息
sendMessage(row) {
this.$router.push({
path: "/diagnosis-im",
query: { tid: row.imTeamId },
});
},
//加入问诊
joinDiagnose(row) {
this.$confirm("确定加入问诊吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.clearSession();
// this.$router.push({
// path: "/diagnosis-live",
// query: { tid: row.imTeamId, diagnoseLogId: row.diagnoseLogId },
// })
let newpage = this.$router.resolve({
path: "/diagnosis-live",
query: { tid: row.imTeamId, diagnoseLogId: row.diagnoseLogId },
});
window.open(newpage.href, "_blank");
});
},
//匹配运营
matchRun(row) {
this.$confirm("确定匹配并跟进该预约单?", "确定匹配?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
let req = {
id: row.diagnoseLogId,
bizType: 3,
};
updateDiagnosis(req)
.then(function (res) {
if (res.code == "000000") {
// this.cancel();
vm.search(false);
} else {
vm.$message.error(res.message);
}
})
.catch(function (error) {
vm.$message.error(error);
});
});
},
//设为待分诊
waitDiagnose(row) {
this.diagnosisTimeVisible = true;
this.diagnoseLogId = row.diagnoseLogId;
this.bizType = 5;
},
//设为待协调医生
waitHzeDot(row) {
this.coordinatingVisible = true;
this.diagnoseLogId = row.diagnoseLogId;
this.bizType = 8;
},
//设为待确认时间
waitMatchTime(row) {
this.diagnoseFlag =true
this.diagnosisDoctorVisible = true;
this.diagnoseLogId = row.diagnoseLogId;
this.diagnoseType = row.diagnoseType;
if (row.doctorId == 0) {
this.doctorId = "";
} else {
this.doctorId = row.doctorId;
}
},
//重新匹配医生
reMatchDot(row, type) {
if(type==10){
this.rematchingOptions=["接诊医生爽约"]
}
else{
this.rematchingOptions=["助诊医生爽约"]
}
// this.rematchingOptions=
// this.options=
this.rematchingVisible = true;
this.diagnoseLogId = row.diagnoseLogId;
this.bizType = type;
},
//修改时间
changeTime(row) {
this.appointmentTimeVisible = true;
this.diagnoseLogId = row.diagnoseLogId;
this.bizType = 12;
},
//发起问诊
// call(row) {
// this.$confirm('确定发起问诊吗?', '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// }).then(() => {
// this.clearSession()
// this.$router.push({path: '/diagnosis-live', query: {tid: row.imTeamId, diagnoseLogId: row.diagnoseLogId}})
// })
// },
//设为已完成
doneHandle(row) {
this.$confirm(
"请先确定问诊已结束?再将问诊设为已完成,确定继续?",
"提示",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
).then(() => {
let req = {
id: row.diagnoseLogId,
bizType: 13,
};
updateDiagnosis(req)
.then(function (res) {
if (res.code == "000000") {
// this.cancel();
vm.search(false);
} else {
vm.$message.error(res.message);
}
})
.catch(function (error) {
vm.$message.error(error);
});
});
},
// 设置科室
setOffice(row) {
this.doctorVisible = true;
this.diagnoseLogId = row.diagnoseLogId;
this.bizType = 15;
this.triageDepartmentId = row.triageDepartmentId;
},
handleSizeChange(value) {
this.searchParam.pageSize = value;
this.search(true);
},
handleCurrentChange(value) {
this.searchParam.pageNo = value;
this.search(true);
},
// 清除直播时间相关的seession
clearSession() {
sessionStorage.removeItem("TIME_askTime");
sessionStorage.removeItem("TIME_answerTime");
sessionStorage.removeItem("TIME_useTime");
sessionStorage.removeItem("TIME_loseTime");
},
// 取消预约
// cancelBtn(row) {},
// 批量设置运营
batchSetOperator() {
if (this.multipleSelection.length == 0) {
this.$message({
message: "请先选择要操作的数据",
type: "warning",
});
return;
}
this.matchVisible = true;
this.batchFlag = true;
},
},
};
</script>
<style lang="scss" scoped>
.diagnosis-list-content {
.select-content {
margin-bottom: 10px;
padding: 10px;
background: #fff;
overflow: hidden !important;
.title {
height: 50px;
display: flex;
justify-content: flex-start;
align-items: center;
}
.form-container {
display: flex;
justify-content: space-between;
.form-li {
display: flex;
flex-direction: column;
justify-content: space-between;
}
.form-btn {
display: flex;
flex-direction: column;
justify-content: flex-start;
.form-btn-li {
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
.submit-btn {
// width: 150px;
}
}
}
}
.select-bottom {
height: 50px;
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
color: #0d9078;
}
.btn-wrap {
text-align: right;
}
.t-b {
margin-bottom: 10px;
}
}
.component-content {
padding: 10px;
background: #fff;
overflow: hidden !important;
}
}
</style>
<style lang="scss">
.diagnosis-list-content .el-badge__content.is-fixed.is-dot {
right: 5px;
top: 10px;
}
</style>
<template>
<div class="diagnosis-list-content">
<div class="select-content screenSet">
<div class="title">咨询订单管理后台</div>
<el-collapse-transition>
<div v-show="isUp" class="form-container">
<el-form
:inline="true"
class="demo-form-inline from-box"
:model="searchParam"
label-width="80px"
ref="from"
>
<el-row :gutter="20" type="flex" justify="center">
<el-col :span="8" class="t-c">
<el-form-item label="订单搜索" class="t-b">
<el-input
v-model="searchParam.searchVal"
clearable
placeholder="输入ID、订单ID或姓名搜索订单"
style="width: 280px"
></el-input>
</el-form-item>
</el-col>
<el-col :span="8" class="t-c">
<el-form-item label="预约类型" class="t-b">
<el-select
v-model="searchParam.diagnoseType"
placeholder="请选择预约类型"
style="width: 280px"
>
<el-option
v-for="item of tyleList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8" class="t-c">
<el-form-item label="创建方式" class="t-b">
<el-select
v-model="searchParam.createType"
placeholder="创建方式"
style="width: 280px"
>
<el-option
v-for="item of createList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" type="flex" justify="center">
<el-col :span="8" class="t-c">
<el-form-item label="是否跟进" class="t-b">
<el-select
v-model="searchParam.followFlag"
placeholder="请选择是否跟进"
style="width: 280px"
>
<el-option
v-for="item of fllowList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8" class="t-c">
<el-form-item label="预约来源" class="t-b">
<el-select
v-model="searchParam.appointSource"
placeholder="请选择预约来源"
style="width: 280px"
>
<el-option
v-for="item of sourceList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8" class="t-c">
<el-form-item label="是否匹配" class="t-b">
<el-select
v-model="searchParam.operateFlag"
placeholder="是否匹配"
style="width: 280px"
>
<el-option
v-for="item of operateList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" type="flex" justify="center">
<el-col :span="8" class="t-c">
<el-form-item label="创建日期" class="t-b">
<el-date-picker
v-model="createRangeTime"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 90%"
:picker-options="pickerOptions1"
>
</el-date-picker>
<!-- <el-date-picker-->
<!-- type="date"-->
<!-- placeholder="开始时间"-->
<!-- v-model="searchParam.createdTimeBegin"-->
<!-- style="width: 135px;"-->
<!-- :picker-options="endDateOpt"-->
<!-- format="yyyy-MM-dd"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- >-->
<!-- </el-date-picker>-->
<!-- <span>-</span>-->
<!-- <el-date-picker-->
<!-- type="date"-->
<!-- placeholder="结束时间"-->
<!-- v-model="searchParam.createdTimeEnd"-->
<!-- style="width: 135px;"-->
<!-- format="yyyy-MM-dd"-->
<!-- :picker-options="endDateOpt1"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- >-->
<!-- </el-date-picker>-->
</el-form-item>
</el-col>
<el-col :span="8" class="t-c">
<el-form-item label="匹配日期" class="t-b">
<el-date-picker
v-model="matchRangeTime"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 90%"
:picker-options="pickerOptions1"
>
</el-date-picker>
<!-- <el-date-picker-->
<!-- type="date"-->
<!-- placeholder="开始时间"-->
<!-- v-model="searchParam.operateTimeBegin"-->
<!-- style="width: 135px;"-->
<!-- :picker-options="endDateOpt2"-->
<!-- format="yyyy-MM-dd"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- >-->
<!-- </el-date-picker>-->
<!-- <span>-</span>-->
<!-- <el-date-picker-->
<!-- type="date"-->
<!-- placeholder="结束时间"-->
<!-- v-model="searchParam.operateTimeEnd"-->
<!-- style="width: 135px;"-->
<!-- format="yyyy-MM-dd"-->
<!-- :picker-options="endDateOpt3"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- >-->
<!-- </el-date-picker>-->
</el-form-item>
</el-col>
<el-col :span="8" class="t-c">
<el-form-item label="预约日期" class="t-b">
<el-date-picker
v-model="orderRangeTime"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 90%"
:picker-options="pickerOptions1"
>
</el-date-picker>
<!-- <el-date-picker-->
<!-- type="date"-->
<!-- placeholder="开始时间"-->
<!-- v-model="searchParam.appointBeginTime"-->
<!-- style="width: 135px;"-->
<!-- :picker-options="endDateOpt4"-->
<!-- format="yyyy-MM-dd"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- >-->
<!-- </el-date-picker>-->
<!-- <span>-</span>-->
<!-- <el-date-picker-->
<!-- type="date"-->
<!-- placeholder="结束时间"-->
<!-- v-model="searchParam.appointEndTime"-->
<!-- style="width: 135px;"-->
<!-- format="yyyy-MM-dd"-->
<!-- :picker-options="endDateOpt5"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- >-->
<!-- </el-date-picker>-->
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" type="flex" justify="left">
<el-col :span="8" class="t-c">
<el-form-item label="完成时间" class="t-b">
<el-date-picker
v-model="completeRangeTime"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 90%"
:picker-options="pickerOptions1"
>
</el-date-picker>
<!-- <el-date-picker-->
<!-- type="date"-->
<!-- placeholder="开始时间"-->
<!-- v-model="searchParam.doneTimeBegin"-->
<!-- style="width: 135px;"-->
<!-- :picker-options="endDateOpt"-->
<!-- format="yyyy-MM-dd"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- >-->
<!-- </el-date-picker>-->
<!-- <span>-</span>-->
<!-- <el-date-picker-->
<!-- type="date"-->
<!-- placeholder="结束时间"-->
<!-- v-model="searchParam.doneTimeEnd"-->
<!-- style="width: 135px;"-->
<!-- format="yyyy-MM-dd"-->
<!-- :picker-options="endDateOpt1"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- >-->
<!-- </el-date-picker>-->
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" type="flex" justify="center" align="center">
<el-col :span="24" class="btn-wrap">
<el-button type="primary" class="submit-btn" @click="search"
>搜索</el-button
>
<el-button type="warning" class="submit-btn" @click="reset"
>重置</el-button
>
<el-button type="info" class="submit-btn" @click="download"
>导出</el-button
>
</el-col>
</el-row>
</el-form>
</div>
</el-collapse-transition>
<div class="select-bottom" @click="selectToggle">
<span v-if="!isUp">展开筛选<i class="el-icon-arrow-down"></i></span>
<span v-else>收起筛选<i class="el-icon-arrow-up"></i></span>
</div>
</div>
<div class="component-content screenSet" id="screenSet">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="全部" name="first">
<table-component
:tData="tableData"
:pageNo="searchParam.pageNo"
:pageSize="searchParam.pageSize"
:totalRows="totalRows"
:loading="loading"
:tableHeight="tableHeight"
@timeHandle="timeHandle"
@endDiagnosis="endDiagnosis"
@callAll="callAll"
@jionCommunicate="jionCommunicate"
@sendMessage="sendMessage"
@selectBtn="selectBtn"
@goEditor="goEditor"
@cancelBtn="cancelBtn"
@handleSizeChange="handleSizeChange"
@handleCurrentChange="handleCurrentChange"
></table-component>
</el-tab-pane>
<el-tab-pane label="信息待完善" name="second">
<table-component
:tData="tableData"
:pageNo="searchParam.pageNo"
:pageSize="searchParam.pageSize"
:totalRows="totalRows"
:loading="loading"
:tableHeight="tableHeight"
@timeHandle="timeHandle"
@endDiagnosis="endDiagnosis"
@callAll="callAll"
@jionCommunicate="jionCommunicate"
@sendMessage="sendMessage"
@selectBtn="selectBtn"
@goEditor="goEditor"
@cancelBtn="cancelBtn"
@handleSizeChange="handleSizeChange"
@handleCurrentChange="handleCurrentChange"
></table-component>
</el-tab-pane>
<el-tab-pane label="待完成" name="three">
<table-component
:tData="tableData"
:pageNo="searchParam.pageNo"
:pageSize="searchParam.pageSize"
:totalRows="totalRows"
:loading="loading"
:tableHeight="tableHeight"
@timeHandle="timeHandle"
@endDiagnosis="endDiagnosis"
@callAll="callAll"
@jionCommunicate="jionCommunicate"
@sendMessage="sendMessage"
@selectBtn="selectBtn"
@goEditor="goEditor"
@cancelBtn="cancelBtn"
@handleSizeChange="handleSizeChange"
@handleCurrentChange="handleCurrentChange"
></table-component>
</el-tab-pane>
<el-tab-pane label="已完成" name="four">
<table-component
:tData="tableData"
:pageNo="searchParam.pageNo"
:pageSize="searchParam.pageSize"
:totalRows="totalRows"
:loading="loading"
:tableHeight="tableHeight"
@timeHandle="timeHandle"
@endDiagnosis="endDiagnosis"
@callAll="callAll"
@jionCommunicate="jionCommunicate"
@sendMessage="sendMessage"
@selectBtn="selectBtn"
@goEditor="goEditor"
@handleSizeChange="handleSizeChange"
@handleCurrentChange="handleCurrentChange"
></table-component>
</el-tab-pane>
<el-tab-pane label="已取消" name="five">
<table-component
:tData="tableData"
:pageNo="searchParam.pageNo"
:pageSize="searchParam.pageSize"
:totalRows="totalRows"
:loading="loading"
:tableHeight="tableHeight"
@timeHandle="timeHandle"
@endDiagnosis="endDiagnosis"
@callAll="callAll"
@jionCommunicate="jionCommunicate"
@sendMessage="sendMessage"
@selectBtn="selectBtn"
@goEditor="goEditor"
@handleSizeChange="handleSizeChange"
@handleCurrentChange="handleCurrentChange"
></table-component>
</el-tab-pane>
</el-tabs>
<!-- 预约时间 -->
<el-dialog title="预约时间" :visible.sync="timeVisible" width="40%">
<el-row
:gutter="30"
class="row search"
type="flex"
style="margin-bottom: 0"
>
<el-form
ref="timeForm"
:rules="timeRules"
:model="timeForm"
label-width="150px"
label-suffix=":"
label-position="right"
size="mini"
style="width: 100%"
>
<el-col :span="24">
<el-form-item label="开始时间" prop="beginTime">
<el-date-picker
v-model="timeForm.beginTime"
type="datetime"
placeholder="请选择开始时间"
value-format="yyyy-MM-dd HH:mm:ss"
@change="changeBeginTime"
>
</el-date-picker>
<p v-if="beginFlag" style="color: red; font-size: 12px">
开始时间不能大于结束时间
</p>
</el-form-item>
<el-form-item label="结束时间" prop="endTime">
<el-date-picker
v-model="timeForm.endTime"
type="datetime"
placeholder="请选择结束时间"
value-format="yyyy-MM-dd HH:mm:ss"
@change="changeEndTime"
>
</el-date-picker>
<p v-if="endFlag" style="color: red; font-size: 12px">
结束时间不能小于开始时间
</p>
</el-form-item>
</el-col>
</el-form>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button @click="timeVisible = false">取 消</el-button>
<el-button type="primary" @click="confirmTime">确 定</el-button>
</span>
</el-dialog>
</div>
</div>
</template>
<script>
import TableComponent from "@/components/list/table-component";
import {
TYPE_LIST,
IS_FLLOW,
CREATE_TYPE,
SOURCE_LIST,
OPERATE_LIST,
} from "@/utils/constants";
export default {
components: {
TableComponent,
},
data() {
return {
isUp:false,
endFlag: false,
beginFlag: false,
loading: false,
activeName: "first",
timeVisible: false,
createRangeTime: "",
matchRangeTime: "",
orderRangeTime: "",
completeRangeTime: "",
searchParam: {
searchVal: "",
diagnoseType: "",
createType: "",
followFlag: "",
appointSource: "",
operateFlag: "",
createdTimeBegin: "",
createdTimeEnd: "",
operateTimeBegin: "",
operateTimeEnd: "",
appointBeginTime: "",
appointEndTime: "",
doneTimeBegin: "",
doneTimeEnd: "",
status: "", //1、初始状态(未支付) 2、待问诊(支付成功待完善) 3、问诊中(已完善) 4、已问诊")
bizType: 1, //1、分页查询 2、导出"
pageSize: 15,
pageNo: 1,
},
tyleList: TYPE_LIST,
fllowList: IS_FLLOW,
sourceList: SOURCE_LIST,
createList: CREATE_TYPE,
operateList: OPERATE_LIST,
timeForm: {
diagnoseLogId: "",
beginTime: "",
endTime: "",
},
tableData: [],
totalRows: 0,
timeRules: {
beginTime: [
{ required: true, message: "请选择预约开始时间", trigger: "change" },
],
endTime: [
{ required: true, message: "请选择预约结束时间", trigger: "change" },
],
},
liveBack: false,
timeClickFlag: true,
tableHeight: 500,
endDateOpt: {
disabledData: (time) => {
if (
this.searchParam.createdTimeEnd != "" &&
this.searchParam.createdTimeEnd != null
) {
return (
time.getTime() >
new Date(this.searchParam.createdTimeEnd).getTime()
);
}
},
},
endDateOpt1: {
disabledDate: (time) => {
return (
time.getTime() <
new Date(this.searchParam.createdTimeBegin).getTime()
);
},
},
endDateOpt2: {
disabledData: (time) => {
if (
this.searchParam.operateTimeEnd != "" &&
this.searchParam.operateTimeEnd != null
) {
return (
time.getTime() >
new Date(this.searchParam.operateTimeEnd).getTime()
);
}
},
},
endDateOpt3: {
disabledDate: (time) => {
return (
time.getTime() <
new Date(this.searchParam.operateTimeBegin).getTime()
);
},
},
endDateOpt4: {
disabledData: (time) => {
if (
this.searchParam.appointEndTime != "" &&
this.searchParam.appointEndTime != null
) {
return (
time.getTime() >
new Date(this.searchParam.appointEndTime).getTime()
);
}
},
},
endDateOpt5: {
disabledDate: (time) => {
return (
time.getTime() <
new Date(this.searchParam.appointBeginTime).getTime()
);
},
},
pickerOptions1: {
disabledDate: (time) => {
return time.getTime() > new Date().getTime(); //减去一天的时间代表可以选择同一天;
},
},
};
},
activated() {
this.search();
},
created() {},
mounted() {
this.liveBack = this.$route.query.liveBack || false;
// if(this.liveBack) {
// this.activeName = 'first'
// this.searchParam.status = ''
// }else {
// this.activeName = 'second'
// this.searchParam.status = 2
// }
this.setTableHeight();
this.search();
},
methods: {
selectToggle() {
this.isUp = !this.isUp;
},
// 设置table的高度
setTableHeight() {
setTimeout(() => {
this.$nextTick(() => {
if (
document.getElementsByClassName("from-box") &&
document.getElementsByClassName("from-box")[0].clientHeight
) {
let height =
window.innerHeight -
50 -
140 -
10 -
160 -
document.getElementsByClassName("from-box")[0].clientHeight;
if (height > 300) {
this.tableHeight = height;
}
}
});
}, 20);
},
changeBeginTime(val) {
this.beginFlag = false;
this.endFlag = false;
let b = new Date(val).getTime(),
e;
if (this.timeForm.endTime) {
e = new Date(this.timeForm.endTime).getTime();
}
if (val) this.beginFlag = b > e ? true : false;
},
changeEndTime(val) {
this.beginFlag = false;
this.endFlag = false;
let b = new Date(val).getTime(),
e;
if (this.timeForm.beginTime) {
e = new Date(this.timeForm.beginTime).getTime();
}
if (val) this.endFlag = b < e ? true : false;
},
// tab切换
handleClick(val) {
let tab = 1;
switch (val.name) {
case "first":
tab = "";
break;
case "second":
tab = 2;
break;
case "three":
tab = 3;
break;
case "four":
tab = 4;
break;
case "five":
tab = 5;
break;
default:
break;
}
this.searchParam.status = tab;
this.search();
},
search() {
this.searchParam.createdTimeBegin = this.createRangeTime[0];
this.searchParam.createdTimeEnd = this.createRangeTime[1];
this.searchParam.operateTimeBegin = this.matchRangeTime[0];
this.searchParam.operateTimeEnd = this.matchRangeTime[1];
this.searchParam.appointBeginTime = this.orderRangeTime[0];
this.searchParam.appointEndTime = this.orderRangeTime[1];
this.searchParam.doneTimeBegin = this.completeRangeTime[0];
this.searchParam.doneTimeEnd = this.completeRangeTime[1];
this.loading = true;
let url = `/diagnose/admin/diagnose/list`;
this.searchParam.bizType = 1;
this.searchParam.searchVal = this.searchParam.searchVal.trim();
let params = this.searchParam;
this.POST(url, params).then((res) => {
this.loading = false;
if (res.code == "000000") {
this.tableData = res.data.list;
this.totalRows = res.data.allSize;
}
});
},
// 重置
reset() {
this.createRangeTime = "";
this.matchRangeTime = "";
this.orderRangeTime = "";
this.completeRangeTime = "";
this.searchParam = {
searchVal: "",
diagnoseType: "",
createType: "",
followFlag: "",
appointSource: "",
operateFlag: "",
createdTimeBegin: "",
createdTimeEnd: "",
operateTimeBegin: "",
operateTimeEnd: "",
appointBeginTime: "",
appointEndTime: "",
status: "", //1、初始状态(未支付) 2、待问诊(支付成功待完善) 3、问诊中(已完善) 4、已问诊")
bizType: 1, //1、分页查询 2、导出"
pageSize: 15,
pageNo: 1,
};
this.search();
},
// 导出
download() {
let url = `/diagnose/admin/diagnose/export`;
let params = this.searchParam;
params.bizType = 2;
this.POST(url, params)
.then((res) => {
if (res.code == "000000") {
this.downloadFile(
res.data.attachments.base64,
res.data.attachments.name
);
}
})
.catch((err) => {
console.log("网络出现点儿问题,稍后重试");
});
},
/* 文件下载*/
downloadFile(base64, name) {
let a = document.createElement("a");
let href = "data:application/xls;base64," + base64;
a.setAttribute("href", href);
a.setAttribute("download", name);
a.click();
this.$message.success("导出成功");
},
// 预约时间
timeHandle(row) {
if (row.appointBeginTime && row.appointEndTime) {
let bTime = new Date(row.appointBeginTime);
let eTime = new Date(row.appointEndTime);
if (new Date() - bTime > 0 && eTime - new Date() > 0) {
this.$confirm(
" 当前问诊正在进行中,一旦将立即关闭进行中的问诊且无法恢复,确定继续更改时间?",
"提醒",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
)
.then(() => {
this.timeHandleFn(row);
})
.catch(() => {});
} else {
this.timeHandleFn(row);
}
} else {
this.timeHandleFn(row);
}
},
timeHandleFn(row) {
this.beginFlag = false;
this.endFlag = false;
this.timeVisible = true;
if (this.$refs.timeForm) {
this.$refs.timeForm.resetFields();
}
this.timeForm.diagnoseLogId = row.diagnoseLogId;
this.timeForm.beginTime = row.appointBeginTime;
this.timeForm.endTime = row.appointEndTime;
},
confirmTime() {
if (this.beginFlag || this.endFlag) return;
let timeoutId = null;
if (this.timeClickFlag) {
this.timeClickFlag = false;
timeoutId && clearTimeout(timeoutId);
timeoutId = setTimeout(() => {
this.clickHandle();
}, 2000);
}
},
// 防止按钮多次点击
clickHandle() {
this.$refs.timeForm.validate((valid) => {
if (valid) {
if (this.beginFlag || this.endFlag) {
return;
}
this.loading = true;
this.POST("/diagnose/admin/diagnose/appointTime", this.timeForm).then(
(res) => {
this.loading = false;
this.timeClickFlag = true;
if (res.code == "000000") {
this.$message({
message: "修改预约时间成功",
type: "success",
});
this.activeName = "first";
this.searchParam.status = "";
this.timeVisible = false;
this.search();
} else {
this.$message({
message: res.message,
type: "error",
});
}
}
);
}
});
},
// 结束问诊
endDiagnosis(row) {
this.$confirm("确定结束问诊吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.POST(`/diagnose/admin/diagnose/end/${row.diagnoseLogId}`, "").then(
(res) => {
if (res.code == "000000") {
this.$message({
message: "成功结束问诊",
type: "success",
});
this.activeName = "first";
this.searchParam.status = "";
this.search();
} else {
this.$message({
message: res.message,
type: "error",
});
}
}
);
});
},
// 呼叫双方
callAll(row) {
this.$confirm("确定呼叫双方吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.POST(
`/diagnose/admin/diagnose/call/${row.diagnoseLogId}`,
""
).then((res) => {
if (res.code != "000000") {
this.$message({
message: res.message,
type: "error",
});
}
});
});
},
// 加入问诊
jionCommunicate(row) {
this.$confirm("确定加入问诊吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.clearSession();
this.$router.push({
path: "/diagnosis-live",
query: { tid: row.imTeamId, diagnoseLogId: row.diagnoseLogId },
});
});
},
// 发送消息
sendMessage(row) {
this.$router.push({
path: "/diagnosis-im",
query: { tid: row.imTeamId },
});
},
// 选择
selectBtn(row) {
this.POST(`/diagnose/admin/diagnose/choose/${row.diagnoseLogId}`, "")
.then((res) => {
if (res.code == "000000") {
this.$message({
message: "选择成功",
type: "success",
});
this.searchParam.status = "";
this.search();
} else {
this.$message({
message: res.message,
type: "error",
});
}
})
.catch((error) => {
this.$message({
message: error,
type: "error",
});
});
this.activeName = "first";
this.searchParam.status = "";
this.search();
},
goEditor(row, flag) {
this.$router.push({
path: "/diagnosis-editor",
query: { id: row.diagnoseLogId, editorType: flag },
});
},
handleSizeChange(value) {
this.searchParam.pageSize = value;
this.search();
},
handleCurrentChange(value) {
this.searchParam.pageNo = value;
this.search();
},
// 清除直播时间相关的seession
clearSession() {
sessionStorage.removeItem("TIME_askTime");
sessionStorage.removeItem("TIME_answerTime");
sessionStorage.removeItem("TIME_useTime");
sessionStorage.removeItem("TIME_loseTime");
},
// 取消预约
cancelBtn(row) {
this.$confirm(
"问诊一旦取消成功将无法恢复,请谨慎操作,确定取消?",
"确定取消问诊",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
).then(() => {
this.clearSession();
this.POST(`/diagnose/admin/diagnose/cancel/${row.diagnoseLogId}`, "")
.then((res) => {
if (res.code == "000000") {
this.$message({
message: "取消预约成功",
type: "success",
});
this.searchParam.status = "";
this.search();
} else {
this.$message({
message: res.message,
type: "error",
});
}
})
.catch((error) => {
this.$message({
message: error,
type: "error",
});
});
});
},
},
};
</script>
<style lang="scss" scoped>
.diagnosis-list-content {
.select-content {
margin-bottom: 10px;
padding: 10px;
background: #fff;
overflow: hidden !important;
.title {
height: 50px;
display: flex;
justify-content: flex-start;
align-items: center;
}
.select-bottom {
height: 50px;
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
color: #0d9078;
}
}
.component-content {
padding: 10px;
background: #fff;
overflow: hidden !important;
.title {
margin-bottom: 20px;
}
.t-c {
//text-align: center;
}
.btn-wrap {
text-align: right;
}
.submit-btn {
margin-right: 50px;
margin-top: 10px;
}
.t-b {
margin-bottom: 10px;
}
}
}
</style>
<template>
<div class="livebox">
<div class="top">
<div class="top-left">
<h1 class="title">{{ title }}</h1>
<div class="time-message">
<p>设定时长: {{ time }}分钟</p>
<p v-if="startTime && endTime">总时长: {{ useTime }}</p>
<p v-if="startTime && endTime">剩余时长: {{ loseTime }}</p>
</div>
</div>
<div class="top-right">
<img
:src="isMicOn ? voiceSmallImg : voiceCloseImg"
alt=""
srcset=""
class="icon"
@click="taggleM"
/>
<div class="close" @click="overFn">结束会话</div>
</div>
</div>
<div class="main">
<div
class="viedo-wrapper"
v-for="(item, index) of memberList"
:key="index"
>
<div class="text">
<p>{{ item.name }}</p>
<p>{{ item.role == 1 ? "问诊医生" : "接诊医生" }}:</p>
</div>
<div class="viedo">
<div
:id="rtc.viewslist[index].id"
v-if="rtc && rtc.viewslist[index]"
></div>
<!-- 用户声音icon -->
<img
:src="
rtc && rtc.viewslist[index] && rtc.viewslist[index].vioce
? voiceSmallImg
: voiceCloseImg
"
alt=""
srcset=""
class="user-icon"
v-if="item.status == 2"
/>
<img
:src="setImg(item.status)"
alt=""
srcset=""
class="video-icon"
v-else
/>
<div
class="mask"
v-if="rtc && rtc.viewslist[index] && rtc.viewslist[index].mask"
>
<img
:src="type == 1 ? voiceImg : noCameraImg"
alt=""
:class="{ vocie: type == 1 }"
/>
</div>
</div>
<div class="time">
<!-- //等待连接还是已经下麦 1为等待 2为进行中 3为下麦 -->
<div class="time-content">
<el-button
class="call-btn"
size="mini"
:disabled="item.status == 2 && item.timeleft == 0"
type="primary"
:loading="item.timeleft > 0"
@click="drivingCall(item)"
>
<span v-if="item.timeleft == 0"
>呼叫{{ item.role == 1 ? "问诊医生" : "接诊医生" }}</span
>
<time-left
@setItem="setItem($event, item)"
v-else
:timeleft="item.timeleft"
></time-left>
</el-button>
<span>
{{ showText(item.status, item.role, item) }}
</span>
</div>
</div>
</div>
</div>
<div class="out" @click="leave">退出</div>
<alert ref="alert"></alert>
</div>
</template>
<script>
import RtcClient from "@/utils/live/rtc-client.js";
import {
getLiveTimeText,
countDown,
getBroswer,
laseTime,
lastm,
} from "@/utils/live";
import { openLoading, closeLoading } from "@/utils/utils";
import alert from "@/components/common/alert.vue";
import timeLeft from "@/components/timeLeft";
export default {
components: {
alert,
timeLeft,
},
data() {
return {
closeCallImg: require("../../../assets/image/live/close-call.png"),
voiceCloseImg: require("../../../assets/image/live/voice-close.png"),
voiceSmallImg: require("../../../assets/image/live/voice-small.png"),
voiceImg: require("../../../assets/image/live/voice.png"),
waitingCallImg: require("../../../assets/image/live/waiting-call.png"),
noCameraImg: require("../../../assets/image/live/no-camera.png"),
roleAnchor: "anchor", // 主播
rtc: null,
roomId: "",
sdkAppId: "",
userSig: "",
userId: "",
viedoParams: null,
isMicOn: false,
askTime: 0, // 问诊医生接入时长
answerTime: 0, // 接诊医生接入时长
useTime: 0, // 问诊时长
loseTime: 0, // 问诊剩余时长
askTimeFn: null,
answerTimeFn: null,
useTimeFn: null,
loseTimeFn: null,
type: 2, // 1: 语音 2: 视频
startTime: 0,
endTime: 0,
time: 30, //总时长
memberList: [],
tid: "", // 群id
diagnoseLogId: "", //问诊id
};
},
created() {
this.tid = this.$route.query.tid || "";
this.diagnoseLogId = this.$route.query.diagnoseLogId || "";
openLoading(this);
this.init();
},
computed: {
title() {
return this.type == 1 ? "音频问诊" : "视频问诊";
},
},
methods: {
init() {
if (this.checkChrome()) {
this.getViedoParams();
this.getInfo();
} else {
this.$nextTick(() => {
this.$refs.alert
.init({
confirmTxt: "我知道了",
title: `请下载新版Chrome浏览器`,
})
.then(() => {
closeLoading(this);
this.$router.go(-1);
})
.catch((err) => {
closeLoading(this);
this.$router.go(-1);
});
});
}
},
// 设置item
setItem(data, item) {
item.timeleft = 0;
},
// 主动呼叫
drivingCall(data) {
// /team/call/direct/{imAccId}呼叫
let url = `/im/team/call/direct/`;
let params = {
imAccId: data.accId,
};
this.POST(url, params).then((res) => {
if (res.code === "000000") {
// this.tid = this.$route.query.tid || "";
// this.diagnoseLogId = this.$route.query.diagnoseLogId || "";
this.getInfo(data);
} else {
this.$message({
message: res.message,
type: "warning",
});
}
});
},
// 获取相关信息
getInfo(data) {
let role = data ? data.role : "";
let url = `/im/team/detail?tid=${this.tid}`;
this.GET(url)
.then((res) => {
if (res.code == "000000") {
let { liveInfo, memberList } = res.data;
if (liveInfo) {
this.startTime = liveInfo.startTimestamp;
this.endTime = liveInfo.endTimestamp;
this.time = lastm(this.startTime, this.endTime);
this.roomId = Number(liveInfo.roomId);
this.type = liveInfo.liveType;
}
if (memberList && memberList.length) {
memberList.forEach((item) => {
if (role) {
if (item.role == 1) {
if (role == 1) {
this.memberList[0] = Object.assign(item, {
status: 1,
timeleft: 60,
});
}
//等待连接还是已经下麦 1为等待 2为进行中 3为下麦
}
if (item.role == 2) {
if (role == 2) {
this.memberList[1] = Object.assign(item, {
status: 1,
timeleft: 60,
});
}
}
} else {
if (item.role == 1) {
this.memberList[0] = Object.assign(item, {
status: 1,
timeleft: 0,
});
//等待连接还是已经下麦 1为等待 2为进行中 3为下麦
}
if (item.role == 2) {
this.memberList[1] = Object.assign(item, {
status: 1,
timeleft: 0,
});
}
}
//在当前群组中的角色 1: 问诊医生 2: 接诊医生 3: 居民 4: 其他
if (item.role == 4) {
this.userId = item.liveUserId;
}
});
}
this.getAppId();
} else {
this.getErr();
}
})
.catch(() => {
this.getErr();
});
},
// 获取AppId
getAppId() {
let req = {};
this.GET("/coupler/app/trtc/sdkappid", req)
.then((res) => {
if (res.code == "000000") {
this.sdkAppId = res.data.sdkAppId;
this.getSing();
} else if (res.code == "200006" || res.code == "200000") {
if (this.rtc) {
this.leave();
}
this.getErr();
}
})
.catch((err) => {
this.getErr();
});
},
// 获取签名
getSing() {
let req = {
sdkAppId: this.sdkAppId,
userId: this.userId,
};
this.POST("/coupler/usersig/trtc", req)
.then((res) => {
if (res.code == "000000") {
this.userSig = res.data.userSig;
this.clientLogin();
} else if (res.code == "200006" || res.code == "200000") {
if (this.rtc) {
this.leave();
}
this.getErr();
}
})
.catch((err) => {
this.getErr();
});
},
// 创建trtcClient
clientLogin() {
let obj = {
roomId: this.roomId,
role: this.roleAnchor,
sdkAppId: this.sdkAppId,
userId: this.userId,
userSig: this.userSig,
vueInstance: this,
};
this.rtc = new RtcClient(obj);
this.$nextTick(() => {
this.$refs.alert
.init({
confirmTxt: "我知道了",
title: `为了更好的体验,请保证您输出设备的正常使用`,
})
.then(() => {
Promise.all([this.rtc.join()]).then((res) => {
this.ispending();
let t = setTimeout(() => {
closeLoading(this);
this.muteLocalAudio();
clearTimeout(t);
}, 1000);
});
})
.catch((err) => {
Promise.all([this.rtc.join()]).then((res) => {
this.ispending();
let t = setTimeout(() => {
closeLoading(this);
this.muteLocalAudio();
clearTimeout(t);
}, 1000);
});
});
});
},
// 获取视频参数
getViedoParams() {
this.GET("/coupler/app/config/push/stream/params")
.then((res) => {
if (res.code == "000000") {
this.viedoParams = res.data;
} else if (res.code == "200006" || res.code == "200000") {
closeLoading(this);
if (this.rtc) {
this.leave();
}
}
})
.catch((err) => {
console.log("获取视频参数数据失败");
});
},
// 切换话筒
taggleM() {
if (this.isMicOn) {
this.muteLocalAudio();
} else {
this.unmuteLocalAudio();
}
},
// 关闭mc
muteLocalAudio() {
this.isMicOn = false;
this.rtc.muteLocalAudio();
},
// 打开mc
unmuteLocalAudio() {
this.isMicOn = true;
this.rtc.unmuteLocalAudio();
},
// 显示文案
showText(status, role, item) {
console.log("status", status);
// 1 呼叫中 2 接入 3离线
if (item.status == 2) {
item.timeleft = 0;
}
let text = "";
switch (status) {
case 1:
text = "呼叫中";
break;
case 3:
text = "已离线";
break;
default:
text = `已接入: ${role == 1 ? this.askTime : this.answerTime}`;
break;
}
return text;
},
//设置图像 1为等待 2为进行中 3为下麦
setImg(status) {
let img = null;
switch (status) {
case 1:
img = this.waitingCallImg;
break;
case 3:
img = this.closeCallImg;
break;
default:
img = this.closeCallImg;
break;
}
return img;
},
// 用户上线
addNewMember(id) {
this.memberList.forEach((item) => {
if (item.liveUserId == id) {
item.status = 2;
this.setTime(item.role);
}
});
},
// 用户下线
removeMember(id) {
this.memberList.forEach((item) => {
if (item.liveUserId == id) {
item.status = 3;
}
});
},
//设置进行时长 1表示为问诊 2为接诊 3为问诊开始 4为问诊结束
setTime(flag) {
let text = "";
switch (flag) {
case 1:
text = "askTime";
break;
case 2:
text = "answerTime";
break;
case 3:
text = "useTime";
break;
case 4:
text = "loseTime";
break;
default:
break;
}
let t = 0;
let liveTime = Number(sessionStorage.getItem(`TIME_${text}`) || t);
this[`${text}Fn`] = setInterval(() => {
liveTime += 1000;
this[text] = getLiveTimeText(liveTime, text);
}, 1000);
},
// 问诊是否进行中
ispending() {
if (this.startTime < new Date() < this.endTime) {
this.setTime(3);
this.loseTimeFn = setInterval(() => {
this.loseTime = countDown(this.endTime);
let timeObj = laseTime(this.endTime);
if (
(timeObj.leftm == 5 || timeObj.leftm == 3 || timeObj.leftm == 1) &&
timeObj.lefts == 0 &&
timeObj.lefth == 0
) {
this.$nextTick(() => {
this.$refs.alert
.init({
confirmTxt: "我知道了",
title: `距离会诊结束还剩不足${timeObj.leftm}分钟`,
})
.then(() => {})
.catch((err) => {});
});
}
}, 1000);
} else if (new Date() < this.startTime) {
let t = setInterval(() => {
if (new Date() > this.startTime) {
clearInterval(t);
this.ispending();
}
}, 1000);
}
},
// 检查是否为chrome
checkChrome() {
return getBroswer().broswer == "Chrome";
},
// client离开房间
leave() {
this.rtc.leave();
this.clearSession();
window.location.href = "about:blank";
window.close();
},
// 结束会话
overFn() {
this.$refs.alert
.init({
cancleTxt: "取消",
confirmTxt: "我知道了",
title: `确定要结束会话么?`,
})
.then(() => {
this.out();
})
.catch((err) => {});
},
out() {
let url = `/diagnose/admin/diagnose/endCall/${this.diagnoseLogId}`;
let params = {};
this.POST(url, params)
.then((res) => {
if (res.code == "000000") {
this.leave();
} else {
this.$refs.alert
.init({
confirmTxt: "我知道了",
title: `操作失败,请稍后重试`,
})
.then(() => {})
.catch((err) => {});
}
})
.catch(() => {
this.$refs.alert
.init({
confirmTxt: "我知道了",
title: `操作失败,请稍后重试`,
})
.then(() => {})
.catch((err) => {});
});
},
// 获取信息失败
getErr() {
closeLoading(this);
this.$nextTick(() => {
this.$refs.alert
.init({
confirmTxt: "我知道了",
title: `获取信息失败,请稍后重试`,
})
.then(() => {
this.$router.go(-1);
})
.catch((err) => {
this.$router.go(-1);
});
});
},
reloadfn(msg) {
this.$nextTick(() => {
this.$refs.alert
.init({
confirmTxt: "我知道了",
title: `加入房间失败,重新加入`,
})
.then(() => {
location.reload();
})
.catch((err) => {
location.reload();
});
});
},
clearTime() {
clearInterval(this.askTimeFn);
clearInterval(this.answerTimeFn);
clearInterval(this.useTimeFn);
clearInterval(this.loseTimeFn);
},
// 清除直播时间相关的seession
clearSession() {
sessionStorage.removeItem("TIME_askTime");
sessionStorage.removeItem("TIME_answerTime");
sessionStorage.removeItem("TIME_useTime");
sessionStorage.removeItem("TIME_loseTime");
},
},
beforeDestroy() {
this.clearTime();
},
};
</script>
<style lang="less" scoped>
.livebox {
display: flex;
flex-direction: column;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #000000;
.top {
display: flex;
margin-top: 5%;
justify-content: space-between;
.top-left {
margin-left: 24px;
.title {
width: 72px;
height: 22px;
font-size: 18px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 700;
color: #ffffff;
line-height: 22px;
}
.time-message {
margin-top: 20px;
display: flex;
height: 20px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ffffff;
line-height: 20px;
p {
margin-right: 20px;
}
}
}
.top-right {
margin: 15px 25px 0 0;
display: flex;
align-items: center;
justify-content: center;
.icon {
width: 32px;
height: 32px;
border-radius: 50%;
cursor: pointer;
}
.close {
width: 102px;
height: 32px;
background: #ff4d4f;
border-radius: 2px;
font-size: 14px;
color: #ffffff;
line-height: 32px;
text-align: center;
margin-left: 20px;
cursor: pointer;
}
}
}
.main {
margin-top: 24px;
display: flex;
flex: 1;
.viedo-wrapper {
display: flex;
width: 49%;
height: 50vh;
background: #2d2d2d;
&:first-of-type {
margin-right: 2%;
}
.text {
display: flex;
flex-direction: column-reverse;
width: 112px;
margin-left: 24px;
color: #fff;
padding-bottom: 20px;
}
.time {
display: flex;
flex-direction: column-reverse;
padding-bottom: 20px;
width: 100px;
margin-right: 24px;
margin-left: 5px;
color: #fff;
.time-content {
.call-btn {
display: flex;
justify-content: center;
align-items: center;
min-width: 100px;
margin-bottom: 5px;
}
font-size: 12px;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-end;
}
}
.viedo {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
position: relative;
.user-icon {
position: absolute;
right: 0;
bottom: 20px;
display: block;
width: 32px;
height: 32px;
z-index: 100;
}
& > div {
height: 100%;
width: 100%;
video {
width: 100%;
height: 100%;
}
}
.video-icon {
width: 96px;
height: 96px;
}
.mask {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #2d2d2d;
display: flex;
justify-content: center;
align-items: center;
img {
display: block;
width: 93px;
height: 125px;
}
.vocie {
width: 93px;
height: 93px;
}
}
}
}
}
.out {
width: 102px;
height: 32px;
border-radius: 2px;
border: 1px solid #ffffff;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ffffff;
text-align: center;
line-height: 32px;
cursor: pointer;
margin: 15px auto 6%;
}
}
</style>
<template>
<div class="down-list">
<el-table
class="search-table"
:data="tableData"
style="width: 100%"
v-loading="loading"
>
<el-table-column key="fileName" prop="fileName" label="名称" min-width="170" align="center" ></el-table-column>
<el-table-column key="createdTime" prop="createdTime" label="创建时间" min-width="170" align="center" ></el-table-column>
<el-table-column key="status" prop="status" label="状态" min-width="170" align="center" >
<template slot-scope="scope">
<div class="status_base"><div :class="'status-circle status-' + scope.row.status"></div><div>{{ getStatusDesc(scope.row.status) }}</div></div>
</template>
</el-table-column>
<el-table-column
label="操作"
fixed="right"
align="center"
min-width="400"
>
<template slot-scope="scope">
<div
@click="download(scope.row.path)"
class="download-btn"
>下载</div>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<div class="pagination">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageNo"
:page-sizes="[15, 30, 50, 100, 200]"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalCount"
>
</el-pagination>
</div>
</div>
</template>
<script>
const STATUS_DESC_MAP = {
1: '处理中',
2: '完成',
3: '失败'
}
export default {
data() {
return {
pageSize: 15,
pageNo: 1,
totalCount: 0,
loading: false,
tableData: [],
}
},
created () {
this.queryList()
},
methods: {
queryList () {
this.POST(`/diagnose/admin/diagnose/export/list`, {
pageSize: this.pageSize,
pageNo: this.pageNo
}).then(res => {
if (res && res.code === '000000') {
this.totalCount = res.data.allSize
this.tableData = res.data.list
}
})
},
getStatusDesc (status) {
return STATUS_DESC_MAP[status]
},
download(link) {
window.location.href = link
},
handleSizeChange(value) {
this.pageNo = 1
this.pageSize = value
this.queryList()
},
handleCurrentChange(value) {
this.pageNo = value
this.queryList()
},
},
};
</script>
<style lang="less" scoped>
.down-list {
margin: 15px;
.status_base {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
.status-circle {
content: '';
display: block;
width: 8px;
height: 8px;
border-radius: 4px;
margin-right: 5px;
}
.status-1 {
background-color: rgb(219, 223, 12);;
}
.status-2 {
background-color: rgb(87, 238, 82);;
}
.status-3 {
background-color: rgb(238, 68, 16);;
}
}
.download-btn {
color: rgb(7, 180, 59);
cursor: pointer;
}
.download-btn:hover {
color: rgb(98, 233, 86);
}
}
</style>
\ No newline at end of file
.current-session-wrap {
.component-content {
display: flex;
flex-direction: row;
// min-width: 1200px;
background: none !important;
font-size: 14px;
.center {
margin-left: 10%;
margin-right: 10%;
flex: 1;
background: #fff;
.c-header {
padding: 0 25px;
height: 56px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
border-bottom: 2px solid #f5f5f5;
& > .c-header-l {
flex: 1;
display: flex;
flex-direction: row;
align-items: center;
& > img {
display: inline-block;
width: 24px;
height: 24px;
border-radius: 12px;
margin-right: 8px;
}
& > .name {
margin-right: 25px;
color: #333333;
}
& > .time-tip {
font-size: 12px;
color: #999999;
}
}
.close-btn {
width: 100px;
color: #c7c8c9;
cursor: pointer;
}
}
.msg-content {
// width: 100%;
// height: 650px;
word-break: break-all;
overflow: scroll;
display: flex;
flex-direction: column;
margin: 10px 20px;
.msg-item {
display: flex;
flex-direction: row;
margin: 12px 0;
.msg-item-img {
width: 36px;
height: 36px;
margin-right: 12px;
& > img {
width: 100%;
height: 100%;
border-radius: 22px;
}
}
.msg-item-detail {
display: flex;
flex-direction: column;
text-align: left;
font-size: 13px;
& > :first-child {
color: #999999;
margin-bottom: 8px;
}
.send-warpper {
// display: flex;
// flex-direction: row;
// align-items: center;
& > .icon {
float: left;
width: 20px;
height: 20px;
margin-right: 10px;
margin-top: 10px;
}
.mid-text-wrapper {
display: inline-block;
// display: flex;
// flex-direction: row;
// align-items: center;
// & > img {
// width: 18px;
// height: 18px;
// margin-right: 8px;
// cursor: pointer;
// }
}
.mid-text {
padding: 12px 16px;
display: inline-block;
max-width: 520px;
border-radius: 8px;
background: #ebf5fc;
text-align: justify;
color: #333333;
&.no-support {
display: flex;
align-items: center;
& > img {
width: 14px;
height: 14px;
margin-right: 3px;
}
}
}
.link {
color: #2f86f6;
}
& > .mid-pdf {
width: 260px;
display: flex;
flex-direction: row;
justify-content: space-between;
text-align: left;
padding: 10px 15px;
background: #f0f1f2;
border-radius: 8px;
min-height: 80px;
cursor: pointer;
.midp-left {
display: flex;
flex-direction: column;
justify-content: space-around;
margin-right: 10px;
.name {
font-size: 13px;
color: #333333;
word-break: break-word;
}
.size {
font-size: 12px;
color: #999999;
}
}
.midp-icon {
width: 36px;
height: 44px;
& > img {
width: 36px;
height: 100%;
border-radius: 3px;
}
}
}
& > .mid-img {
display: flex;
flex-direction: row;
align-items: center;
cursor: pointer;
// & > .icon {
// width: 20px;
// height: 20px;
// }
// & > .img {
// width: 170px;
// height: 108px;
// border-radius: 8px;
// }
.img-box {
max-width: 192px;
max-height: 320px;
overflow: hidden;
}
}
& > .diagnosis-box {
width: 260px;
text-align: left;
padding: 10px 15px;
background: #f0f1f2;
border-radius: 8px;
min-height: 80px;
.title {
padding-bottom: 10px;
font-size: 14px;
font-weight: 700;
}
.dia-text {
font-size: 12px;
color: #7C7C7C;
.label {
color: #B4B4B4;
}
}
}
& > .time-box {
width: 260px;
text-align: left;
padding: 10px 15px;
background: #f0f1f2;
border-radius: 8px;
min-height: 80px;
.title {
padding-bottom: 10px;
font-size: 14px;
font-weight: 700;
}
.time {
padding-bottom: 10px;
font-size:12px;
font-weight: 700;
}
.time-text {
font-size: 12px;
color: #7C7C7C;
}
}
& > .suggession-box {
width: 260px;
text-align: left;
padding: 10px 15px;
background: #f0f1f2;
border-radius: 8px;
min-height: 80px;
.title {
padding-bottom: 10px;
font-size: 14px;
font-weight: 700;
}
.suggession-text {
font-size: 12px;
color: #7C7C7C;
.label {
color: #B4B4B4;
}
}
}
& > .audio-box audio {
width: 242px;
height: 44px;
background: #EBF5FC;
border-radius: 20px;
}
& > .live-box {
width: 202px;
height: 44px;
line-height: 44px;
background: #f0f1f2;
border-radius: 8px;
text-align: center;
}
& > .diagnosis-end {
width: 100%;
.split-line {
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
margin: 15px 0;
font-size: 14px;
color: #999999;
&::before {
flex: 1;
content: '';
height: 1px;
margin-right: 18px;
background: #f0f1f2;
}
&::after {
flex: 1;
content: '';
height: 1px;
margin-left: 18px;
background: #f0f1f2;
}
}
}
}
}
.msg-item-detail.line {
width: 100%;
}
&.cr {
flex-direction: row-reverse;
//justify-content: flex-end;
.msg-item-img {
margin-right: 0;
margin-left: 8px;
}
.msg-item-detail {
text-align: right;
& > .mid-text {
background: #f0f1f2;
}
}
}
}
.split-line {
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
margin: 15px 0;
font-size: 14px;
color: #999999;
&::before {
flex: 1;
content: '';
height: 1px;
margin-right: 18px;
background: #f0f1f2;
}
&::after {
flex: 1;
content: '';
height: 1px;
margin-left: 18px;
background: #f0f1f2;
}
}
.error-mg {
display: inline-block;
max-width: 520px;
// height: 24px;
max-width: 520px;
line-height: 16px;
text-align: left;
border-radius: 20px;
opacity: 0.45;
margin: -2px 0 10px;
padding: 4px 12px;
color: #FFFFFF;
background: #000000;
margin-left: 50px;
&.mr {
margin-left: 0;
margin-right: 50px;
}
}
}
.msg-content::-webkit-scrollbar
{
width: 0px;
height: 0px;
background-color: #fff;
}
.c-bottom {
position: relative;
top: -8px;
left: 0;
display: flex;
flex-direction: row;
margin: 16px 12px 16px 25px;
.cb-icon-wrapper {
position: absolute;
top: 0;
right: 70px;
display: flex;
align-items: center;
height: 44px;
img {
width: 20px;
height: 20px;
margin-right: 16px;
cursor: pointer;
}
}
.send-btn {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
width: 60px;
height: 44px;
background: #f3f6f7;
margin-left: 12px;
border-radius: 8px;
cursor: pointer;
& > img {
width: 24px;
height: 24px;
}
&.active {
background: #0d9078;
}
}
}
&.no-content {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
img {
display: block;
width: 120px;
height: 100px;
}
p {
margin-top: 10px;
font-size: 14px;
color: rgba(0, 0, 0, 0.65);
}
}
}
background: #fff;
.time {
color: #999999;
}
.small {
font-size: 12px;
}
.ld{
-webkit-transition-property: -webkit-transform;
-webkit-transition-duration: 1s;
-moz-transition-property: -moz-transform;
-moz-transition-duration: 1s;
-webkit-animation: rotate 3s linear infinite;
-moz-animation: rotate 3s linear infinite;
-o-animation: rotate 3s linear infinite;
animation: rotate 3s linear infinite;
}
@-webkit-keyframes rotate{from{-webkit-transform: rotate(0deg)}
to{-webkit-transform: rotate(360deg)}
}
@-moz-keyframes rotate{from{-moz-transform: rotate(0deg)}
to{-moz-transform: rotate(359deg)}
}
@-o-keyframes rotate{from{-o-transform: rotate(0deg)}
to{-o-transform: rotate(359deg)}
}
@keyframes rotate{from{transform: rotate(0deg)}
to{transform: rotate(359deg)}
}
}
}
\ No newline at end of file
<template>
<div class="operation">
<div class="operation-title">医助管理</div>
<div class="operation-content">
<el-alert
:closable="false"
title="注:去掉勾选后,系统将自动不分配给该人员,请谨慎操作"
type="info"
>
</el-alert>
<div class="checkbox-container">
<el-checkbox-group
v-model="checklist"
@change="changefuc"
size="medium"
>
<div class="checkbox-content">
<div
class="checkbox-item"
v-for="(item, index) in adminList"
:key="index"
>
<el-checkbox :label="item.id">{{ item.name }}</el-checkbox>
</div>
</div>
</el-checkbox-group>
</div>
<div class="bottom-button">
<el-button @click="cancel">取消</el-button>
<el-button @click="sumbitmatch" type="primary">确定</el-button>
</div>
</div>
</div>
</template>
<script>
const GET_MATCH_URL = "/diagnose/match/1/";
const SET_MATCH_URL = "/diagnose/match/";
export default {
data() {
return {
checklist: [],
adminList: [],
};
},
mounted() {
this.getCheckList();
this.getAdminList();
},
methods: {
cancel() {
this.$confirm("取消后将不保存本次操作内容", "确认取消吗?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.getCheckList();
});
},
changefuc() {
// console.log("checklist",this.checklist)
},
sumbitmatch() {
let url = SET_MATCH_URL;
let params = {
bizType: 1,
userIds: this.checklist,
};
this.POST(url, params)
.then((res) => {
if (res.code == "000000") {
this.$message.success("保存成功");
}
})
.catch((err) => {
console.log("网络出现点儿问题,稍后重试");
});
},
// 设置选中
getCheckList() {
let url = GET_MATCH_URL;
this.GET(url)
.then((res) => {
if (res.code == "000000") {
this.checklist = res.data;
}
})
.catch((err) => {
console.log("网络出现点儿问题,稍后重试");
});
},
getAdminList() {
let url = `/diagnose/admin/diagnose/operator/query`;
let params = {
token: localStorage.getItem("token"),
};
this.GET(url, null).then((res) => {
if (res.code == "000000") {
this.adminList = res.data;
}
});
},
},
};
</script>
<style lang="less" scoped>
.operation {
min-height: 80%;
padding: 20px;
.operation-title {
background: #ffffff;
padding: 20px;
margin-bottom: 20px;
}
.operation-content {
padding: 20px;
background: #ffffff;
.checkbox-container {
margin-top: 20px;
.checkbox-content {
display: flex;
flex-direction: row;
justify-content: flex-start;
flex-wrap: wrap;
.checkbox-item {
width: 200px;
margin-bottom: 10px;
}
}
}
.bottom-button {
display: flex;
justify-content: center;
align-items: center;
}
}
}
</style>
<template>
<div class="refund-container">
<refund-detail :option="applyOption" />
<refund-detail :option="payOption" />
<refund-detail :option="checkOption" />
<refund-detail :option="detailOption" />
</div>
</template>
<script>
import refundDetail from '@/components/common/info-pad';
let vm = null;
export default {
components: {
refundDetail
},
data(){
return {
applyOption: {
title: '退款申请信息',
isShowDot: true,
contentList: [{
key: '退款编号',
value: '12345667788899900-0098765'
}, {
key: '订单编号',
value: '12345667788899900-0098765'
}, {
key: '申请时间',
value: '2020-09-09 12:00:00'
}, {
key: '商品名称',
value: '语音问诊'
}, {
key: '退款金额',
value: '语音问诊'
}, {
key: '申请人',
value: '语音问诊'
}, {
key: '退款原因',
value: '语音问诊xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
}, {
key: '退款说明',
value: '语音问诊'
}]
},
payOption: {
title: '支付信息',
isShowDot: true,
contentList: [{
key: '支付方式',
value: '微信支付'
}, {
key: '订单金额',
value: '¥9.90'
}, {
key: '支付时间',
value: '2021-01-01 12:00:00'
}]
},
checkOption: {
title: '退款审核',
isShowDot: true,
contentList: [{
key: '退款状态',
value: '已完成'
}, {
key: '备注信息',
value: 'xxxxxxx'
}, {
key: '退款时间',
value: '2020-01-01 12:00:00'
}]
},
detailOption: {
title: '退款详情',
isShowDot: true,
contentList: [{
key: '支付方式',
value: '微信支付'
}, {
key: '退款金额',
value: '¥9.90'
}, {
key: '完成时间',
value: '2020-01-01 10:00:00'
}]
}
}
},
mounted() {
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.refund-container {
}
</style>
<template>
<div class="diagnosis-list-content">
<div class="select-content screenSet">
<div class="title">服务列表</div>
<el-collapse-transition>
<div v-show="isUp">
<el-form
ref="form"
:inline="true"
:model="searchParam"
label-suffix=":"
label-width="120px"
label-position="right"
style="width: 100%"
>
<el-row :gutter="30" type="flex" style="margin-bottom: 0">
<el-col :span="13">
<el-form-item label="服务医生">
<el-input
v-model="searchParam.searchKey"
size="middle"
placeholder="请输入医生姓名或联系电话"
style="width: 120%"
></el-input>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="服务名称">
<el-select
v-model="searchParam.serviceTypeId"
id="statusSelector"
placeholder="请选择服务名称"
clearable
style="margin-left: 20px; height: 32px; line-height: 32px"
>
<el-option
v-for="item in serviceTypeList"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="30" type="flex" style="margin-bottom: 0">
<el-col :span="13">
<el-form-item label="创建时间">
<el-date-picker
v-model="rangeTime"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 100%"
:picker-options="pickerOptions1"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="状态">
<el-select
v-model="searchParam.status"
id="statusSelector"
placeholder="请选择服务状态"
clearable
style="margin-left: 20px; height: 32px; line-height: 32px"
>
<el-option
v-for="item in statusList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="30" type="flex" style="margin-bottom: 0">
<el-col :span="8">
<el-form-item label="接诊分佣方式">
<el-select
v-model="searchParam.commissionType"
id="statusSelector"
placeholder="请选择服务状态"
clearable
style="height: 32px; line-height: 32px; width: 100%"
>
<el-option
v-for="item in commissionTypeList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="16" style="text-align: right; padding-right: 55px">
<el-button type="primary" size="small" @click="search()"
>搜索</el-button
>
</el-col>
</el-row>
</el-form>
</div>
</el-collapse-transition>
<div class="select-bottom" @click="selectToggle">
<span v-if="!isUp">展开筛选<i class="el-icon-arrow-down"></i></span>
<span v-else>收起筛选<i class="el-icon-arrow-up"></i></span>
</div>
</div>
<div class="component-content screenSet" id="screenSet">
<el-row :gutter="30" type="flex" style="margin-bottom: 0; float: right">
<el-col :span="5" style="text-align: right; margin-bottom: 10px">
<el-button type="primary" size="small" @click="refresh()"
>刷新页面</el-button
>
</el-col>
<el-col :span="5" style="text-align: right">
<el-button type="primary" size="small" @click="batchOffline()"
>批量下架</el-button
>
</el-col>
<el-col :span="5" style="text-align: right">
<el-button type="primary" size="small" @click="batchOnline()"
>批量上架</el-button
>
</el-col>
<el-col :span="5" style="text-align: right">
<el-button type="primary" size="small" @click="batchSetPrice()"
>批量设置价格</el-button
>
</el-col>
</el-row>
<!-- 表格 -->
<el-table
class="search-table"
:data="tableData"
style="width: 100%"
v-loading="loading"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="50"></el-table-column>
<el-table-column
prop="id"
label="ID"
min-width="50"
align="left"
></el-table-column>
<el-table-column
prop="serviceName"
label="服务名称"
min-width="100"
align="left"
></el-table-column>
<el-table-column
prop="doctorName"
label="服务医生"
min-width="120"
align="left"
></el-table-column>
<el-table-column
prop="mobilePhone"
label="联系电话"
min-width="120"
align="left"
></el-table-column>
<el-table-column
prop="price"
label="价格(元)"
min-width="80"
align="left"
>
<template slot-scope="scope">
<span>{{ scope.row.price | rounding }}</span>
</template>
</el-table-column>
<el-table-column
prop="commissionTypeStr"
label="接诊分佣方式"
min-width="120"
align="left"
></el-table-column>
<el-table-column
prop="commissionFee"
label="分佣金额(元)"
min-width="120"
align="left"
>
<!-- <template slot-scope="scope">-->
<!-- <span v-if="scope.row.commissionType == 1">{{scope.row.commissionFee}}%</span>-->
<!-- <span v-if="scope.row.commissionType == 2">{{scope.row.commissionFee}}元</span>-->
<!-- </template>-->
</el-table-column>
<el-table-column prop="status" label="状态" min-width="80" align="left">
<template slot-scope="scope">
<span>{{ scope.row.status | statusFilter }}</span>
</template>
</el-table-column>
<el-table-column
prop="createTime"
label="创建时间"
min-width="160"
align="left"
>
</el-table-column>
<el-table-column
label="操作"
fixed="right"
align="center"
min-width="150"
>
<template slot-scope="scope">
<div>
<el-button
v-if="scope.row.status == 1"
type="primary"
size="small"
@click="online(scope.row)"
style="margin-top: 10px"
>上架</el-button
>
<el-button
v-if="scope.row.status == 2"
type="primary"
size="small"
@click="offline(scope.row)"
style="margin-top: 10px"
>下架</el-button
>
<el-button
type="primary"
size="small"
@click="setPrice(scope.row, false)"
style="margin-top: 10px"
>设置价格</el-button
>
</div>
</template>
</el-table-column>
</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]"
:page-size="searchParam.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows"
>
</el-pagination>
</div>
<!-- 设置价格 -->
<el-dialog title="设置价格" :visible.sync="setPriceVisible" width="55%">
<!-- <el-row :gutter="30" class="row search" type="flex" style="margin-bottom:0;">-->
<el-form
ref="setPriceForm"
:rules="setPriceRules"
:model="setPriceForm"
label-width="250px"
label-suffix=":"
label-position="right"
size="mini"
style="width: 100%"
>
<el-form-item label="问诊价格" class="required-label" prop="price">
<el-col :span="18">
<el-input-number
v-model="setPriceForm.price"
size="small"
:precision="2"
:min="0"
:max="9999"
placeholder="请输入价格"
@change="changePrice($event)"
></el-input-number>
</el-col>
</el-form-item>
<el-form-item
label="接诊服务费结算方式(上级医生)"
prop="commissionType"
>
<el-col :span="18">
<el-radio-group
v-model="setPriceForm.commissionType"
size="small"
style="line-height: 45px"
>
<div>
<el-radio
:label="1"
style="float: left; margin-top: 5px; line-height: 20px"
>按比例分佣(%)</el-radio
>
<span style="float: right; width: 100px"
><el-input-number
v-model="setPriceForm.commissionPrice1"
size="small"
:precision="2"
:min="0"
></el-input-number
></span>
</div>
<div>
<el-radio
:label="2"
style="float: left; margin-top: 30px; line-height: 20px"
>固定分佣金额(元)</el-radio
>
<span style="float: right; width: 100px; margin-left: 14px"
><el-input-number
v-model="setPriceForm.commissionPrice2"
size="small"
:precision="2"
:min="0"
:max="9999"
></el-input-number
></span>
</div>
</el-radio-group>
</el-col>
</el-form-item>
</el-form>
<!-- </el-row>-->
<span slot="footer" class="dialog-footer">
<el-button @click="setPriceVisible = false">取 消</el-button>
<el-button type="primary" @click="confirmSetPrice">确 定</el-button>
</span>
</el-dialog>
</div>
</div>
</template>
<script>
let vm = null;
export default {
data() {
return {
isUp: false,
endFlag: false,
beginFlag: false,
loading: false,
setPriceVisible: false,
rangeTime: "",
searchParam: {
searchKey: "",
serviceTypeId: 0,
status: 0,
startTime: "",
endTime: "",
pageSize: 15,
pageNo: 1,
},
batchUpdatePriceFlag: false,
setPriceForm: {
commissionType: 1,
commissionPrice: "",
commissionPrice1: "",
commissionPrice2: "",
doctorId: "",
serviceType: "",
price: "",
},
timeSelect: [],
diagnosisSelect: [],
serviceTypeList: [],
tableData: [],
totalRows: 0,
setPriceRules: {
price: [{ required: true, message: "请输入问诊价格", trigger: "blur" }],
commissionType: [
{
required: true,
message: "请选择接诊服务费结算方式",
trigger: "blur",
},
],
},
liveBack: false,
timeClickFlag: true,
multipleSelection: [],
tempPrice: 0,
statusList: [
{
value: 0,
label: "全部",
},
{
value: 1,
label: "下架",
},
{
value: 2,
label: "上架",
},
],
commissionTypeList: [
{
value: 0,
label: "全部",
},
{
value: 1,
label: "按比例分佣",
},
{
value: 2,
label: "固定分佣",
},
],
profit: 0,
selectedList: [],
selectedPriceList: [],
pickerOptions0: {
disabledDate: (time) => {
if (
this.searchParam.endTimestamp != "" &&
this.searchParam.endTimestamp != null
) {
return (
time.getTime() > new Date(this.searchParam.endTimestamp).getTime()
);
}
},
},
pickerOptions1: {
disabledDate: (time) => {
return time.getTime() > new Date().getTime(); //减去一天的时间代表可以选择同一天;
},
},
};
},
mounted() {
vm = this;
this.getServiceTypeList();
// this.getDiagnoseList()
this.search();
},
methods: {
selectToggle() {
this.isUp = !this.isUp;
},
// 服务名称
getServiceTypeList() {
let url = `/diagnose/doctorService/serviceType`;
this.GET(url).then((res) => {
if (res.code == "000000") {
this.serviceTypeList = res.data;
}
});
},
search() {
if (this.rangeTime) {
this.searchParam.startTime = this.rangeTime[0];
this.searchParam.endTime = this.rangeTime[1];
} else {
this.searchParam.startTime = "";
this.searchParam.endTime = "";
}
this.loading = true;
let url = `/diagnose/doctorService/search`;
let params = this.searchParam;
this.POST(url, params).then((res) => {
this.loading = false;
if (res.code == "000000") {
this.tableData = res.data.contentList;
this.totalRows = res.data.total;
}
});
// this.tableData = [
// {'orderNo': 100, 'serviceName': '语音问诊',
// 'doctorName': '李时珍', 'userMobile': '18888888888',
// 'price': '100', 'statusStr': '上架', 'appointBeginTime': '2015-10-10',
// 'status': '2'}
// ];
},
confirmSetPrice() {
if (
this.setPriceForm.price != 0 &&
(this.setPriceForm.price == "" || this.setPriceForm.price == undefined)
) {
this.$message({
message: "请输入问诊价格",
type: "warning",
});
return;
}
if (
this.setPriceForm.commissionType == null ||
this.setPriceForm.commissionType == ""
) {
this.$message({
message: "请选择接诊服务费结算方式(上级医生)",
type: "warning",
});
return;
}
if (
this.setPriceForm.commissionType == 1 &&
this.setPriceForm.commissionPrice1 == undefined
) {
this.$message({
message: "请输入按比例分佣",
type: "warning",
});
return;
} else if (
this.setPriceForm.commissionType == 1 &&
this.setPriceForm.commissionPrice1 > 100
) {
this.$message({
message: "请输入按比例分佣0-100",
type: "warning",
});
return;
}
if (
this.setPriceForm.commissionType == 2 &&
this.setPriceForm.commissionPrice2 == undefined
) {
this.$message({
message: "请输入固定分佣金额",
type: "warning",
});
return;
}
let timeoutId = null;
timeoutId && clearTimeout(timeoutId);
timeoutId = setTimeout(() => {
this.clickHandle();
}, 500);
},
// 防止按钮多次点击
clickHandle() {
this.$refs.setPriceForm.validate((valid) => {
if (valid) {
this.loading = true;
// 批量设置价格
if (this.batchUpdatePriceFlag) {
let setPriceList = [];
for (let i = 0; i < this.multipleSelection.length; i++) {
if (this.setPriceForm.commissionType == 1) {
this.setPriceForm.commissionPriceStr =
this.setPriceForm.commissionPrice1;
} else if (this.setPriceForm.commissionType == 2) {
this.setPriceForm.commissionPriceStr =
this.setPriceForm.commissionPrice2;
}
setPriceList.push({
doctorId: this.multipleSelection[i].doctorId,
serviceType: this.multipleSelection[i].serviceType,
price: this.setPriceForm.price,
commissionType: this.setPriceForm.commissionType,
commissionPriceStr: this.setPriceForm.commissionPriceStr,
commissionPrice: this.setPriceForm.commissionPriceStr,
});
}
this.POST(
"/diagnose/doctorService/batchUpdatePrice",
setPriceList
).then((res) => {
this.loading = false;
// closeLoading(this);
if (res.code == "000000") {
this.$message({
message: "设置价格成功",
type: "success",
});
this.setPriceVisible = false;
this.search();
} else {
this.$message({
message: res.message,
type: "error",
});
}
});
} else {
if (this.setPriceForm.commissionType == 1) {
this.setPriceForm.commissionPriceStr =
this.setPriceForm.commissionPrice1;
} else if (this.setPriceForm.commissionType == 2) {
this.setPriceForm.commissionPriceStr =
this.setPriceForm.commissionPrice2;
}
this.setPriceForm.commissionPrice =
this.setPriceForm.commissionPriceStr;
this.POST(
"/diagnose/doctorService/updatePrice",
this.setPriceForm
).then((res) => {
this.loading = false;
// closeLoading(this);
if (res.code == "000000") {
this.$message({
message: "设置价格成功",
type: "success",
});
this.setPriceVisible = false;
this.search();
} else {
this.$message({
message: res.message,
type: "error",
});
}
});
}
}
});
},
handleSizeChange(value) {
this.searchParam.pageSize = value;
this.search();
},
handleCurrentChange(value) {
this.searchParam.pageNo = value;
this.search();
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
// 刷新页面
refresh() {
this.searchParam = {
searchKey: "",
serviceTypeId: 0,
status: 0,
startTime: "",
endTime: "",
pageSize: 15,
pageNo: 1,
};
this.rangeTime = "";
this.search();
},
// 批量下架
batchOffline() {
if (this.multipleSelection.length == 0) {
this.$message({
message: "请先选择要操作的数据",
type: "warning",
});
return;
}
this.setSelectedList();
this.$confirm(
"一旦下架将无法预约您的问诊,已预约的问诊不受影响,确定下架?",
"确定下架问诊吗?",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
).then(() => {
this.POST(
`/diagnose/doctorService/batchUndeploy`,
this.selectedList
).then((res) => {
if (res.code == "000000") {
this.$message({
message: "下架成功",
type: "success",
});
this.search();
} else {
this.$message({
message: res.message,
type: "error",
});
}
});
});
},
// 批量上架
batchOnline() {
if (this.multipleSelection.length == 0) {
this.$message({
message: "请先选择要操作的数据",
type: "warning",
});
return;
}
if (!this.setSelectedPriceList()) {
return;
}
// this.setSelectedList();
this.POST(
`/diagnose/doctorService/batchDeploy`,
this.selectedPriceList
).then((res) => {
if (res.code == "000000") {
this.$message({
message: "上架成功",
type: "success",
});
this.search();
} else {
this.$message({
message: res.message,
type: "error",
});
}
});
},
// 批量设置价格
batchSetPrice() {
if (this.multipleSelection.length == 0) {
this.$message({
message: "请先选择要操作的数据",
type: "warning",
});
return;
}
// else {
// this.setSelectedPriceList();
// }
this.setPrice(this.multipleSelection[0], true);
},
setSelectedList() {
if (this.multipleSelection.length > 0) {
this.selectedList = [];
for (let i = 0; i < this.multipleSelection.length; i++) {
this.selectedList.push({
doctorId: this.multipleSelection[i].doctorId,
serviceType: this.multipleSelection[i].serviceType,
});
}
}
},
setSelectedPriceList() {
if (this.multipleSelection.length > 0) {
this.selectedPriceList = [];
for (let i = 0; i < this.multipleSelection.length; i++) {
if (
this.multipleSelection[i].price != 0 &&
(this.multipleSelection[i].price == "" ||
this.multipleSelection[i].price == null)
) {
this.$message({
message: '请先设置"问诊价格"',
type: "warning",
});
return false;
}
this.selectedPriceList.push({
doctorId: this.multipleSelection[i].doctorId,
serviceType: this.multipleSelection[i].serviceType,
price: this.multipleSelection[i].price,
});
}
return true;
}
},
// 上架
online(row) {
if (row.price == null) {
this.$message({
message: "请先设置价格",
type: "warning",
});
return;
}
this.POST(`/diagnose/doctorService/deploy`, {
doctorId: row.doctorId,
serviceType: row.serviceType,
}).then((res) => {
if (res.code == "000000") {
this.$message({
message: "上架成功",
type: "success",
});
this.search();
} else {
this.$message({
message: res.message,
type: "error",
});
}
});
},
// 下架
offline(row) {
this.$confirm(
"一旦下架将无法预约您的问诊,已预约的问诊不受影响,确定下架?",
"确定下架问诊吗?",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
).then(() => {
this.POST(`/diagnose/doctorService/undeploy`, {
doctorId: row.doctorId,
serviceType: row.serviceType,
}).then((res) => {
if (res.code == "000000") {
this.$message({
message: "下架成功",
type: "success",
});
this.search();
} else {
this.$message({
message: res.message,
type: "error",
});
}
});
});
},
setPrice(row, batchUpdatePriceFlag) {
if (this.$refs.setPriceForm) {
this.$refs.setPriceForm.resetFields();
}
this.batchUpdatePriceFlag = batchUpdatePriceFlag;
this.setPriceForm.doctorId = row.doctorId;
this.setPriceForm.serviceType = row.serviceType;
this.setPriceForm.price = row.price;
this.setPriceForm.commissionType = "";
this.setPriceForm.commissionPrice1 = undefined;
this.setPriceForm.commissionPrice2 = undefined;
this.setPriceForm.commissionType = row.commissionType;
if (this.setPriceForm.commissionType == 1) {
this.setPriceForm.commissionPrice1 = row.commissionPriceStr;
} else if (this.setPriceForm.commissionType == 2) {
this.setPriceForm.commissionPrice2 = row.commissionPriceStr;
}
this.setPriceForm.price = row.price;
this.setPriceVisible = true;
// if(this.$refs.setPriceForm) {
// this.$refs.setPriceForm.resetFields()
// }
// this.getProfit(row);
},
getProfit(row) {
this.POST(`/diagnose/doctorService/profit`, {
doctorId: row.doctorId,
serviceType: row.serviceType,
}).then((res) => {
if (res.code == "000000") {
vm.profit = res.data;
if (
vm.setPriceForm.price != 0 &&
(vm.setPriceForm.price == "" || vm.setPriceForm.price == null)
) {
this.tempPrice = "";
} else {
this.tempPrice = this.setPriceForm.price * this.profit;
}
} else {
this.$message({
message: res.message,
type: "error",
});
}
});
},
changePrice(e) {
if (
this.setPriceForm.price != 0 &&
(this.setPriceForm.price == "" || this.setPriceForm.price == undefined)
) {
this.tempPrice = "";
} else {
this.tempPrice = this.setPriceForm.price * this.profit;
}
},
},
};
</script>
<style lang="scss" scoped>
.diagnosis-list-content {
.select-content {
margin-bottom: 10px;
padding: 10px;
background: #fff;
overflow: hidden !important;
.title {
height: 50px;
display: flex;
justify-content: flex-start;
align-items: center;
}
.select-bottom {
height: 50px;
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
color: #0d9078;
}
}
.component-content {
padding: 10px;
background: #fff;
overflow: hidden !important;
.title {
margin-bottom: 30px;
}
}
}
.required-label .el-form-item__label::before {
content: "*";
color: #f56c6c;
margin-right: 4px;
}
</style>
<template>
<div id="screenSet" class="blank-wrap screenSet">
<div class="blank-content">
<img src="../assets/image/no-content.png"/>
<p>很抱歉,您暂时还没开通工作站功能</p>
</div>
</div>
</template>
<script>
import * as commonUtil from '../utils/utils'
export default {
data() {
return {
}
},
// 挂载到Dom完成时
mounted: function() {
commonUtil.resizeHeight(100)
}
}
</script>
<style lang="scss">
.blank-wrap {
background: #fff;
margin: 20px !important;
position: relative;
text-align: center;
.blank-content {
position: absolute;
top: 50%;
left: 50%;
width: 400px;
height: 100px;
margin-top: -50px;
margin-left: -200px;
p {
margin-top: 20px;
font-size: 20px;
color: #999;
}
img {
width: 100px;
}
}
}
</style>
<template>
<div class="add-manager-wrap">
<bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond"></bread-crumb>
<div class="add-content screenSet" id="screenSet">
<div class="discuss-opt">
<el-form ref="form" :model="form" label-width="100px">
<el-form-item label="讨论主题" required>
<el-col :span="8">
<el-input v-model="form.subject" size="mini" type="textarea" :maxLength="maxTopic"></el-input>
</el-col>
</el-form-item>
<el-form-item label="分类" required>
<el-col :span="8">
<el-select size="mini" v-model="form.deriverName" placeholder="请选择">
<el-option
v-for="item in derivers"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-col>
</el-form-item>
<el-form-item label="内容发布控制">
<div>
<span class="label-name">话题</span>
<el-radio v-model="form.ht" label="1" >允许</el-radio>
<el-radio v-model="form.ht" label="0" >不允许</el-radio>
</div>
<!-- <div>
<span class="label-name">评论</span>
<el-radio v-model="form.pl" label="1" >允许</el-radio>
<el-radio v-model="form.pl" label="0" >不允许</el-radio>
</div> -->
<div>
<span class="label-name">回复</span>
<el-radio v-model="form.displayReplyBtn" :label="1" >允许</el-radio>
<el-radio v-model="form.displayReplyBtn" :label="2" >不允许</el-radio>
<span class="label-name">前端展示数量:</span>
<el-input-number v-model="form.replyShowNum" controls-position="right" :min="0"></el-input-number>
<el-checkbox v-model="form.replyOfficial" style="margin-left: 20px">置顶官方回复</el-checkbox>
</div>
<div>
<span class="label-name">点赞</span>
<el-radio v-model="form.displayLikeBtn" :label="1" >允许</el-radio>
<el-radio v-model="form.displayLikeBtn" :label="2" >不允许</el-radio>
</div>
</el-form-item>
<el-form-item label="审核规则" required>
<div>
<span class="label-name">文字</span>
<el-radio v-model="form.wz" label="2" disabled>先审后显示</el-radio>
<el-radio v-model="form.wz" label="4" disabled>后审先显示</el-radio>
</div>
<div>
<span class="label-name">图片</span>
<el-radio v-model="form.tp" label="8" disabled>先审后显示</el-radio>
<el-radio v-model="form.tp" label="16" disabled>后审先显示</el-radio>
</div>
</el-form-item>
<el-form-item label="开放客群" required>
<el-checkbox label="注册用户" v-model="form.isZC"></el-checkbox>
<el-checkbox label="认证用户" v-model="form.isRZ"></el-checkbox>
</el-form-item>
<el-form-item label="发布按钮文案" required>
<el-row>
<el-col :span="6">
<div>
<span class="label-name label-f">话题发布</span>
<el-input v-model="form.topicBtnText" size="mini" style="width: 100px;" :maxLength="maxBtn"></el-input>
</div>
</el-col>
<el-col :span="10">
<div>
<span class="label-name label-w">输入界面title文案</span>
<el-input v-model="form.inputTitle" size="mini" style="width: 100px;" :maxLength="5"></el-input>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<div>
<span class="label-name label-f">评论发布</span>
<el-input v-model="form.commentBtnText" size="mini" style="width: 100px;" :maxLength="maxBtn"></el-input>
</div>
</el-col>
<el-col :span="12">
<div>
<span class="label-name label-w">输入界面提示文案</span>
<el-input v-model="form.inputReminder" size="mini" style="width: 260px;" :maxLength="15"></el-input>
</div>
</el-col>
</el-row>
</el-form-item>
<el-form-item label="底Bar显示控制">
<el-radio v-model="form.displayBar" :label="1">评论+点赞</el-radio>
<el-radio v-model="form.displayBar" :label="2">仅评论</el-radio>
<el-radio v-model="form.displayBar" :label="3"></el-radio>
</el-form-item>
<el-form-item label="列表排序控制">
<el-radio v-model="form.displayListSort" :label="1">综合排序</el-radio>
<el-radio v-model="form.displayListSort" :label="2">按最新发布时间</el-radio>
<el-radio v-model="form.displayListSort" :label="3">按最高点赞数</el-radio>
</el-form-item>
<el-form-item label="话题列表页标题文案" label-width="140px">
<div>
<el-input v-model="form.commentListDetails" size="mini" style="width: 100px;" :maxLength="maxBtn"></el-input>
</div>
</el-form-item>
<el-form-item label="话题详情页话题文案" label-width="140px">
<div>
<el-input v-model="form.commentDetails" size="mini" style="width: 100px;" :maxLength="maxBtn"></el-input>
</div>
</el-form-item>
<el-form-item label="是否仅显示评论区" label-width="110px">
<el-radio v-model="form.displayOnlyComment" :label="1"></el-radio>
<el-radio v-model="form.displayOnlyComment" :label="2"></el-radio>
</el-form-item>
<el-form-item label="备注">
<el-col :span="8">
<el-input v-model="form.remark" size="mini" type="textarea" :maxLength="maxTopic"></el-input>
</el-col>
</el-form-item>
</el-form>
<div class="btn-box pdrt20">
<el-button type="primary" size="small" class="button-green" @click="save">保存</el-button>
<el-button size="small" class="button-white" @click="goBack">返回</el-button>
</div>
</div>
</div>
</div>
</template>
<script>
import BreadCrumb from "../../components/breadcrumb.vue";
import { doUpload, getFilePath } from "../../utils/qiniu-util";
import { returnData } from "../mock";
import { mapGetters } from "vuex";
import { openLoading, closeLoading } from "../../utils/utils";
import * as commonUtil from "../../utils/utils";
let vm = null;
export default {
components: {
BreadCrumb
},
data() {
return {
curmbFirst:'讨论组件',
curmbSecond:'新建',
derivers:[
{
value:'直播',
label:'直播'
},
{
value:'发现',
label:'发现'
},
{
value:'课程',
label:'课程'
},
{
value:'积木',
label:'积木'
},
],
maxBtn:4,
form:{
subject:'',
ht:'1',
wz:'4',
tp:'16',
user:'1',
isZC:false,
isRZ:false,
zc:4,
rz:8,
topicBtnText:'发布话题',
commentBtnText:'发布评论',
commentDetails:'全部评论',
commentListDetails: '热门话题',
displayTopicBtn:true,//是否显示发布话题按钮
// displayCommentBtn:true,//是否显示评论按钮
displayReplyBtn: 1,//是否显示回复按钮
displayLikeBtn: 1,//是否显示点赞按钮
remark:'',
deriverName:'积木',
replyShowNum: 5,
replyOfficial: false,
inputTitle: '话题发布',
inputReminder: '',
displayBar: 1,
displayListSort: 1,
displayOnlyComment: 2
},
maxTopic:60,
id:0,
};
},
computed: {
...mapGetters(["_token", "idType"])
},
created() {
this.id = this.$route.query.id
if(this.id){
this.curmbSecond = '编辑'
this.getDissById(this.id)
}
},
// 挂载到Dom完成时
mounted: function() {
},
methods: {
//返回
goBack(){
this.$router.back(-1)
},
showError(str){
this.$message({
message: str,
type: 'warning'
});
},
//保存讨论
save(){
let visibility = 0,
auditRules = 0,_this = this;
if(this.form.isRZ){
visibility = 8
}
if(this.form.isZC){
visibility = 4
}
if(this.form.isRZ && this.form.isZC){
visibility = 12
}
if(this.form.subject == ''){
console.log(this.form.subject)
this.showError('请输入讨论主题')
return;
}
if(visibility == 0){
this.showError('请选择开发客群');
return;
}
if(this.form.topicBtnText == ''){
this.showError('请输入话题发布按钮文字');
return;
}
if(this.form.commentBtnText == ''){
this.showError('请输入评论发布按钮文字');
return;
}
if(this.form.inputTitle == ''){
this.showError('请输入输入界面title文案');
return;
}
auditRules = Number(this.form.wz) + Number(this.form.tp)
let parm = {
"auditrules": auditRules,
"commentbtntext": this.form.commentBtnText,
"commentDetails": this.form.commentDetails,
'commentListDetails': this.form.commentListDetails,
//"deleteflag": 0,
//"derivedid": 0,
"category": this.form.deriverName,
// "displaycommentbtn": this.form.pl == 1 ? true : false,
"displaytopicbtn": this.form.ht == 1 ? true : false,
"displayReplyBtn": this.form.displayReplyBtn,
"displayLikeBtn": this.form.displayLikeBtn,
"replyShowNum": this.form.replyShowNum,
"replyOfficial": this.form.replyOfficial ? 1 : 2,
"inputTitle": this.form.inputTitle,
"inputReminder": this.form.inputReminder,
"displayBar": this.form.displayBar,
"displayListSort": this.form.displayListSort,
"displayOnlyComment": this.form.displayOnlyComment,
//"id": 0,
"subject":this.form.subject,
"topicbtntext": _this.form.topicBtnText,
"visibility": visibility,
"remark":this.form.remark
}
if(this.id){
parm.id = Number(this.id)
this.PUT('/interaction/discuss/',parm).then((res) => {
// closeLoading(vm)
if( res.code == '000000' ) {
this.$message({
message: '保存成功!',
type: 'success'
});
setTimeout(()=>{
this.goBack()
},1500)
}
})
}else{
this.POST('/interaction/discuss/',parm).then((res) => {
// closeLoading(vm)
if( res.code == '000000' ) {
this.$message({
message: '保存成功!',
type: 'success'
});
setTimeout(()=>{
this.goBack()
},1500)
}
})
}
},
//获取讨论组件详细
getDissById(id){
this.GET('/interaction/discuss/'+id).then((res) => {
// closeLoading(vm)
if( res.code == '000000' ) {
this.id = res.data.id
this.form.subject = res.data.subject
this.form.deriverName = res.data.category
// 发布按钮文案
this.form.topicBtnText = res.data.topicbtntext == null ? '' : res.data.topicbtntext
this.form.commentBtnText = res.data.commentbtntext
this.form.inputTitle = res.data.inputTitle || '话题发布'
this.form.inputReminder = res.data.inputReminder
// title文案
this.form.commentDetails = res.data.commentDetails
this.form.commentListDetails = res.data.commentListDetails
// 备注
this.form.remark = res.data.remark
//开放客群
if(res.data.visibility == 14 || res.data.visibility == 12){
this.form.isRZ = true
this.form.isZC = true
}else if(res.data.visibility == 6){
this.form.isRZ = false
this.form.isZC = true
}else if(res.data.visibility == 10){
this.form.isRZ = true
this.form.isZC = false
}
//审核规则
if(res.data.auditrules == 18){
this.form.wz = "2"
this.form.tp = "16"
}else if(res.data.auditrules == 10){
this.form.wz = "2"
this.form.tp = "8"
}else if(res.data.auditrules == 12){
this.form.wz = "4"
this.form.tp = "8"
}else if(res.data.auditrules == 20){
this.form.wz = "4"
this.form.tp = "16"
}
//内容发布控制
this.form.ht = res.data.displaytopicbtn ? "1" : "0"
// this.form.pl = res.data.displaycommentbtn ? "1" : "0"
this.form.displayReplyBtn = res.data.displayReplyBtn
this.form.displayLikeBtn = res.data.displayLikeBtn
this.form.replyShowNum = res.data.replyShowNum
this.form.replyOfficial = res.data.replyOfficial == 1 ? true : false
// 底部bar 列表排序 显示评论区
this.form.displayBar = res.data.displayBar
this.form.displayListSort = res.data.displayListSort
this.form.displayOnlyComment = res.data.displayOnlyComment
}
})
}
}
};
</script>
<style lang="scss">
.discuss-opt{
padding:20px;
.btn-box{
text-align: center
}
.label-name{
font-size: 12px;
color:#606266;
padding-right:10px;
display: inline-block;
}
.label-f{
width: 80px;
}
.label-w {
width: 110px
}
.pdrt20{
padding:20px 0;
}
.el-radio__label,.el-checkbox__label{
font-size: 12px;
}
}
.add-manager-wrap {
.add-content {
background: #fff;
}
.rim {
border: 1px solid #dddddd;
}
.step-content {
overflow: hidden;
height: 60px;
margin-top: 66px;
padding-top: 15px;
border-bottom: 1px solid #fff;
.is-text {
display: none;
}
.el-steps--simple {
background: #fff;
}
.button-green {
color: #ffffff;
background: #449284;
border-color: #bfdad5;
border-radius: 2px;
}
.button-white {
color: #606266;
background: #ffffff;
border-color: #ecedf1;
border-radius: 2px;
}
.step-num {
display: block;
font-size: 12px;
border: 2px solid #b8babe;
border-radius: 50%;
width: 25px;
height: 20px;
line-height: 15px;
text-align: center;
color: #b8babe;
}
.is-finish {
color: #c0c4cc;
}
.on-step {
color: #747476;
border-color: #747476;
}
}
.first-step {
margin-top: 20px;
.bg-uploader {
img {
float: left;
}
.bg-img {
width: 84px;
height: 100px;
}
.bg-video {
float: left;
width: 100px;
height: 100px;
}
.limit-text {
float: left;
margin-left: 10px;
margin-top: -10px;
p {
font-size: 12px;
color: #999;
}
}
}
.el-upload__tip {
position: absolute;
top: -6px;
left: 130px;
}
.choose-button {
background: #fff;
color: #409eff;
border: 1px solid #409eff;
}
}
.second-step {
margin: 10px 0 0 20px;
//隐藏树展开
.table-empty {
img {
width: 100px;
}
p {
margin-top: -50px;
}
}
.el-tree-node__expand-icon {
display: none;
}
.el-table__header-wrapper {
.el-checkbox__inner {
//display: none;
//visibility: hidden;
}
}
.department {
margin-top: 20px;
border: 1px solid #dddddd;
}
.el-tabs__nav-wrap::after {
display: none;
}
.el-tabs__active-bar {
display: none;
}
#tab-first,
#tab-second,
#tab-third {
padding-right: 0px;
}
#tab-first::after,
#tab-second::after,
#tab-third::after {
color: #c7cbd2;
margin-left: 20px;
content: "•";
}
.el-tag {
margin: 0 10px 10px 0;
border: 1.3px solid #48a8fe;
color: #1e92fe;
background-color: #e7f6fe;
.el-icon-close {
width: 13px;
height: 13px;
line-height: 13px;
font-size: 12px;
background-color: #0486fe;
border-radius: 50%;
color: #d4edfe;
}
}
}
.third-step {
margin: 30px 0 0px 30px;
padding-bottom: 30px;
}
}
</style>
\ No newline at end of file
<template>
<div class="item-component-wrap">
<bread-crumb
:curmbFirst="curmbFirst"
:curmbSecond="curmbSecond">
</bread-crumb>
<div class="component-content screenSet" id="screenSet">
<div class="search-title">查询条件</div>
<el-row :gutter="30" class="row" type="flex" style="margin-top: 10px;">
<el-form ref="serchForm" :model="searchParam" label-width="75px" style="width:100%;">
<el-col :span="6">
<el-form-item label="讨论主题:">
<el-input clearable v-model="searchParam.theme" size="mini" placeholder="请输入主题" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="创建人:">
<el-input clearable v-model="searchParam.name" size="mini" placeholder="请输入创建人名称" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="分类:">
<el-select v-model="categoryStatus" size="mini" placeholder="请选择分类">
<el-option
v-for="(item,index) in category"
:key="index"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="状态:">
<el-select clearable v-model="searchParam.status" size="mini" placeholder="请选择发布状态">
<el-option
v-for="(item,index) in statuSelect"
:key="index"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col style="text-align:right;padding:0 30px 15px 0;">
<el-button type="primary" size="small" @click="search">查询</el-button>
<el-button type="default" size="small" @click="reseat">重置</el-button>
<el-button type="primary" size="small" @click="creatFun('1')">举报设置</el-button>
<el-button type="primary" size="small" @click="creatFun('2')">新建讨论组件</el-button>
</el-col>
</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="subject" label="讨论主题" min-width="100" align="center"></el-table-column>
<el-table-column prop="category" label="分类" min-width="50" align="center"></el-table-column>
<el-table-column prop="remark" label="备注" min-width="100" align="center"></el-table-column>
<el-table-column prop="createdusername" label="创建人" min-width="50" align="center"></el-table-column>
<el-table-column prop="modifiedUsername" label="最后修改人" min-width="100" align="center"></el-table-column>
<el-table-column prop="status" label="状态" min-width="80" align="center">
<template slot-scope="scope">
<span>{{ scope.row.status | filteFun}}</span>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" min-width="200">
<template slot-scope="scope">
<el-button type="primary" size="small" @click="edit(scope.row)">编辑</el-button> <el-button type="primary" v-if="scope.row.status == 3 || scope.row.status == 1" size="small" @click="optFun(scope.row,'发布')">发布</el-button>
<el-button type="primary" v-if="scope.row.status == 2" size="small" @click="optFun(scope.row,'下线')">下线</el-button>
<el-button type="primary" size="small" @click="topicManage(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 { mapGetters } from 'vuex'
import { openLoading, closeLoading } from '../../utils/utils'
import * as commonUtil from '../../utils/utils'
let vm = null
export default {
components: {
BreadCrumb
},
data() {
return {
curmbFirst: '组件',
curmbSecond: '讨论组件',
searchParam: {
theme:'',
type:'',
name:'',
status: '',
pageNo: 1,
pageSize: 15
},
category:[
],
categoryStatus:'',
statuSelect: [
{
label: '未发布',
value: '1'
},{
label: '已发布',
value: '2'
},{
label: '已下架',
value: '3'
}
],
tableData: [],
totalRows: 0,
loading:false,
}
},
computed: {
...mapGetters([
'_token',
'idType'
])
},
filters:{
filteFun(index){
let str = '';
if(index == 1){
str = '未发布'
}else if(index == 2){
str = '已发布'
}else if(index == 3){
str = '已下线'
}
return str
}
},
created() {
this.getData()
//this.sun()
},
// 挂载到Dom完成时
mounted: function() {
commonUtil.resizeHeight()
},
methods: {
// 列表查询
search() {
this.getData()
},
//获取数据
getData(){
let subject = 0,status = 0,name = 0;
if(this.searchParam.theme != ''){
subject = this.searchParam.theme
}
if(this.searchParam.status != ''){
status = this.searchParam.status
}
if(this.searchParam.name != ''){
name = this.searchParam.name
}
console.log(this.categoryStatus)
this.loading = true;
let cStatus = this.categoryStatus ? this.categoryStatus : '0'; //'0'表示默认查所有的
let url = '/interaction/discuss/'+cStatus+'/'+subject+'/'+name+'/'+status+'/'+this.searchParam.pageNo+'/'+this.searchParam.pageSize
this.GET(url).then((res) => {
this.loading = false
if( res.code == '000000' ) {
console.log( res.data)
this.tableData = res.data.resp.discuss || []
this.totalRows = res.data.resp.count
if (res.data.typeList && res.data.typeList.length) {
let arr = [];
for(let i = 0; i < res.data.typeList.length; i++) {
let obj = {};
obj.label = res.data.typeList[i];
obj.value = res.data.typeList[i];
arr.push(obj);
}
this.category = arr;
}
}
})
},
// 重置
reseat() {
this.searchParam = Object.assign({},{
theme:'',
type:'',
name:'',
category:'',
status: '',
pageNo: 1,
pageSize: 15
})
this.category =[],
this.categoryStatus= '',
this.getData()
},
creatFun(index){
if(index == 1){
this.$router.push({path: '/report-set'})
}else if(index == 2){
this.$router.push({path: '/creat-discuss'})
}
},
edit(item){
this.$router.push({path: '/creat-discuss',query:{id:item.id}})
},
topicManage(item){
this.$router.push({path: '/topic-list',query:{id:item.id}})
},
// 发布、下线
optFun(row,str) {
let status = 0;
if(str == '发布'){
status = 2
}else if(str == '下线'){
status = 3
}
this.$confirm('确定要'+str+'该讨论吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.PUT('/interaction/discuss/release',{id: row.id,status:status}).then((res) => {
if(res.code == "000000") {
this.$message({
type: 'success',
message: '操作成功!'
});
this.getData()
}
}).catch(function (error) {
this.$message.error(error);
});
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
})
})
},
handleSizeChange(value) {
this.searchParam.pageSize = value
this.getData()
},
handleCurrentChange(value) {
this.searchParam.pageNo = value
this.getData()
}
}
}
</script>
<style lang="scss">
.item-component-wrap {
.component-content {
padding: 10px;
background: #fff;
// margin: 84px 20px 20px;
.search-title {
padding: 10px 12px;
font-size: 12px;
color: #449284;
border-bottom: 1px solid #efefef;
}
.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="home-wrap">
<bread-crumb :curmbFirst="curmbFirst"></bread-crumb>
<div class="message-content">
<el-row>
<el-col class="visitor" :span="24" v-if="tableData.length > 0">
<div class="visitor-title">
<div class="title">今日随访:<span style="color:#449284;">10人</span></div>
<span class="visitor-more" @click="lookMore">查看更多</span>
</div>
<div class="visitor-info">
<el-table
:data="tableData"
style="width: 100%">
<el-table-column prop="date" label="预约时间" min-width="30"></el-table-column>
<el-table-column prop="name" label="姓名" min-width="20"></el-table-column>
<el-table-column prop="style" label="随访方式" min-width="30"></el-table-column>
<el-table-column prop="content" label="随访内容"></el-table-column>
</el-table>
</div>
</el-col>
<el-col class="message screenSet" :span="24" id="screenSet">
<div class="message-title">系统消息 <span>今日消息:{{count}}</span></div>
<div class="message-info" v-if="messageList.length > 0">
<div class="message-item" v-for="(item,index) in messageList" :key="index">
<div class="text-top">
<i class="el-icon-error" v-if="item.type == 2" style="color:#FA5555"></i>
<i class="el-icon-success" v-if="item.type == 3" style="color:#67C23A"></i>
<i class="el-icon-warning" v-if="item.type == 1" style="color:#FAAD14"></i>
<span>{{item.menuName}}</span>
<span>{{item.portalTime}}</span>
</div>
<div class="text-bottom">{{item.content}}</div>
</div>
</div>
<div class="no-message" v-else>
<div>
<img src="../assets/image/noData.png"/>
</div>
</div>
</el-col>
</el-row>
</div>
</div>
</template>
<script>
import BreadCrumb from '../components/breadcrumb.vue'
import { setTimeout, setInterval } from 'timers'
import { mapGetters } from 'vuex'
import * as commonUtil from '../utils/utils'
let vm = null
export default {
components: {
BreadCrumb
},
data() {
return {
curmbFirst: '数据总览',
spanFirstNum: 12,
spanSecondNum: 12,
tableData: [],
count: 0,
messageList:[]
}
},
created() {
vm = this
vm.getSystemData()
},
computed: {
...mapGetters([
'_token'
])
},
// 挂载到Dom完成时
mounted: function() {
commonUtil.resizeHeight()
},
methods: {
// 查看更多
lookMore() {
},
// 获取系统消息数据
getSystemData() {
vm.GET('portal/portalMessage/queryPortalMessageInfo',{token: vm._token, pageNo: 1, pageSize: 15}).then((res) => {
if( res.code == '000000') {
vm.messageList = res.data.portalMessageModels
vm.count = res.data.count
}
})
}
}
}
</script>
<style lang="scss">
.home-wrap {
.message-content {
.visitor {
padding: 0 25px 30px;
margin-bottom: 20px;
background: #fff;
// min-height: 348px;
.visitor-title {
height: 80px;
line-height: 80px;
margin-right: 20px;
text-align: right;
.title {
float: left;
font-size: 20px;
}
.visitor-more {
font-size: 12px;
color: #449284;
border: 1px solid rgba(68,146,132,0.3);
padding: 5px 14px;
border-radius: 3px;
background: rgba(68,146,132,0.06);
}
}
.visitor-info {
margin-right: 20px;
}
}
.message {
padding: 0 25px 30px;
background: #fff;
// min-height: 436px;
.message-title {
font-size: 20px;
height: 80px;
line-height: 80px;
span {
font-size: 14px;
color: #717377;
margin-left: 8px;
}
}
.message-info {
padding: 7px;
.message-item {
padding: 10px 10px 15px;
border-bottom: 1px solid #EBEEF5;
.text-top {
span:nth-child(2) {
padding: 10px;
}
span:nth-child(3) {
font-size: 12px;
color: #999;
}
}
.text-bottom {
font-size: 14px;
color: #666;
margin-top: 15px;
}
}
}
}
.no-message {
text-align: center;
img {
width: 100px;
margin-top: 17%;
}
}
}
}
</style>
...@@ -2,16 +2,16 @@ ...@@ -2,16 +2,16 @@
<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>
<img src="../../assets/image/footer-icon.png" />京ICP备:14044861号
</span>
</div> </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;
...@@ -24,7 +24,7 @@ export default { ...@@ -24,7 +24,7 @@ export default {
width: 12px; width: 12px;
padding-right: 5px; padding-right: 5px;
} }
} }
</style> </style>
<template> <template>
<div class="header-container"> <div class="header-container">
<div class="logo"> <div class="logo">
<!-- <img src="../../assets/image/index_logoicon.png"/> --> <img src="../../assets/image/IM/logo-small.png"/>
<p>云鹊医</p> <p>云鹊医</p>
</div> </div>
<div class="user-info"> <div class="user-info">
<el-dropdown trigger="click" @command="handleCommand"> <el-dropdown trigger="click" @command="handleCommand">
<div class="el-dropdown-link"> <div class="el-dropdown-link">
<img class="user-logo" src="../../assets/image/mm.jpg"> <img class="user-logo" src="../../assets/image/mm.jpg" />
<span id="headName">{{userName}}</span><i class="el-icon-caret-bottom"></i> <span id="headName">{{userName}}</span>
<i class="el-icon-caret-bottom"></i>
</div> </div>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item command="logout">退出</el-dropdown-item> <el-dropdown-item command="logout">退出</el-dropdown-item>
...@@ -19,7 +20,8 @@ ...@@ -19,7 +20,8 @@
<div class="user-info"> <div class="user-info">
<el-dropdown trigger="click"> <el-dropdown trigger="click">
<span class="el-dropdown-link"> <span class="el-dropdown-link">
{{'系统切换'}}<i class="el-icon-arrow-down el-icon--right"></i> {{'系统切换'}}
<i class="el-icon-arrow-down el-icon--right"></i>
</span> </span>
<el-dropdown-menu slot="dropdown" class="nav-dropdown"> <el-dropdown-menu slot="dropdown" class="nav-dropdown">
<el-dropdown-item v-for="item in authList" :key="item.id"> <el-dropdown-item v-for="item in authList" :key="item.id">
...@@ -31,15 +33,19 @@ ...@@ -31,15 +33,19 @@
</div> </div>
</template> </template>
<script> <script>
import { getLoginUrl,getInnerLoginUrl, getYunQueYiUrl } from '../../utils/index.js' import {
import { logout, base64encode } from '../../utils/utils.js' getLoginUrl,
import { mapGetters } from 'vuex' getInnerLoginUrl
let vm = null } from "../../utils/index.js";
import { logout, base64encode } from "../../utils/utils.js";
import { mapGetters } from "vuex";
let vm = null;
export default { export default {
props: { props: {
userName: { userName: {
type: String, type: String,
default: '' default: ""
}, },
authList: { authList: {
type: Array type: Array
...@@ -47,31 +53,29 @@ export default { ...@@ -47,31 +53,29 @@ export default {
}, },
data() { data() {
return { return {
name: '' name: ""
} };
},
computed: {
}, },
computed: {},
watch: { watch: {
authList(newVal, oldVal){ authList(newVal, oldVal) {}
}
}, },
created() { created() {
vm = this vm = this;
}, },
methods: { methods: {
handleCommand(command) { handleCommand(command) {
if (command === 'logout') { if (command === "logout") {
let req = {
token: localStorage.getItem('storageToken')
}
vm.POST('/contents/login/log_out',req).then((res) => {
sessionStorage.removeItem('DISCUSS_CENTER_NAVS')
localStorage.removeItem('storageToken')
window.location.href = getInnerLoginUrl() window.location.href = getInnerLoginUrl()
//logout() // let req = {
}) // token: localStorage.getItem("token")
// };
// vm.POST("/contents/login/log_out", req).then(res => {
// sessionStorage.removeItem("ADMIN_IM_CENTER_NAVS");
// localStorage.removeItem("token");
// window.location.href = getInnerLoginUrl();
// //logout()
// });
} }
}, },
forward(obj) { forward(obj) {
...@@ -82,8 +86,9 @@ export default { ...@@ -82,8 +86,9 @@ export default {
let req = { let req = {
system_type: obj.id system_type: obj.id
}; };
vm.POST('/contents/login/forward_page', req).then(function (data) { vm.POST("/contents/login/forward_page", req).then(
let forwardData = JSON.parse(JSON.stringify(data.data));//通过这个实现深拷贝 function(data) {
let forwardData = JSON.parse(JSON.stringify(data.data)); //通过这个实现深拷贝
let url = forwardData.picapMenuModels[0].url; let url = forwardData.picapMenuModels[0].url;
if (url.length > 1) { if (url.length > 1) {
// window.location.href = url; // window.location.href = url;
...@@ -92,20 +97,31 @@ export default { ...@@ -92,20 +97,31 @@ export default {
if (url.length > 1) { if (url.length > 1) {
// window.location.href = url; // window.location.href = url;
} else { } else {
url = forwardData.picapMenuModels[0].picapSecondMenus[0].picapThirdMenus[0].url; url =
} forwardData.picapMenuModels[0].picapSecondMenus[0]
} .picapThirdMenus[0].url;
let param = "token=" + localStorage.getItem("storageToken") + "&ssoOrigin=" + localStorage.getItem("ssoOrigin") + "&system_type=" + obj.id; }
window.location.href = obj.domainName + url + "?" + base64encode(param); }
}, function (error) { let param =
"token=" +
localStorage.getItem("token") +
"&ssoOrigin=" +
localStorage.getItem("ssoOrigin") +
"&system_type=" +
obj.id;
window.location.href =
obj.domainName + url + "?" + base64encode(param);
},
function(error) {
errorResponseCheck(error, self); errorResponseCheck(error, self);
});
} }
);
} }
} }
} }
};
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.header-container { .header-container {
position: relative; position: relative;
left: 0; left: 0;
...@@ -113,7 +129,7 @@ export default { ...@@ -113,7 +129,7 @@ export default {
box-sizing: border-box; box-sizing: border-box;
height: 64px; height: 64px;
width: 100%; width: 100%;
z-index: 99999; z-index: 1000;
font-size: 22px; font-size: 22px;
line-height: 64px; line-height: 64px;
color: #fff; color: #fff;
...@@ -123,12 +139,12 @@ export default { ...@@ -123,12 +139,12 @@ export default {
width: 255px; width: 255px;
text-align: center; text-align: center;
color: #fff; color: #fff;
background: #0B2F3F; background: #0b2f3f;
img{ img {
width: 24px; width: 32px;
float: left; float: left;
margin-left: 24px; margin-left: 19px;
margin-top: 21px; margin-top: 14px;
} }
p { p {
text-align: left; text-align: left;
...@@ -141,8 +157,8 @@ export default { ...@@ -141,8 +157,8 @@ export default {
font-size: 16px; font-size: 16px;
color: #838683; color: #838683;
.el-dropdown-link { .el-dropdown-link {
position: relative; display: flex;
display: inline-block; align-items: center;
padding-left: 50px; padding-left: 50px;
color: #838683; color: #838683;
cursor: pointer; cursor: pointer;
...@@ -150,14 +166,15 @@ export default { ...@@ -150,14 +166,15 @@ export default {
font-size: 14px; font-size: 14px;
} }
.user-logo { .user-logo {
position: absolute; margin-right: 6px;
left: 10px;
top: 20px;
width: 30px; width: 30px;
height: 30px; height: 30px;
border-radius: 50%; border-radius: 50%;
} }
.el-icon--right, #headName,.line, #login-out{ .el-icon--right,
#headName,
.line,
#login-out {
font-size: 14px; font-size: 14px;
} }
.line { .line {
...@@ -173,8 +190,8 @@ export default { ...@@ -173,8 +190,8 @@ export default {
.el-dropdown-menu { .el-dropdown-menu {
top: 37px !important; top: 37px !important;
} }
.nav-dropdown{ .nav-dropdown {
.el-dropdown-menu__item{ .el-dropdown-menu__item {
padding: 0; padding: 0;
} }
} }
......
<template> <template>
<div id="slidebar-container" class="slidebar-container"> <div id="slidebar-container" class="slidebar-container">
<el-menu :default-active="onRoutes" class="el-menu-vertical-demo" theme="dark" unique-opened router> <el-menu
:default-active="onRoutes"
class="el-menu-vertical-demo"
theme="dark"
unique-opened
router
>
<template v-for="(item,_index) in items"> <template v-for="(item,_index) in items">
<template v-if="item.subs && item.subs.length"> <template v-if="item.subs && item.subs.length">
<el-submenu :index=" 'index_' + _index" :key="item.index"> <el-submenu :index=" 'index_' + _index" :key="item.index">
<template slot="title"><i :class="item.icon"></i>{{item.title}}</template> <template slot="title">
<i :class="item.icon"></i>
{{item.title}}
</template>
<el-menu-item v-for="(subItem,i) in item.subs" :key="i" :index="subItem.index"> <el-menu-item v-for="(subItem,i) in item.subs" :key="i" :index="subItem.index">
<i class="sub-icon" :class="subItem.icon"></i> <i class="sub-icon" :class="subItem.icon"></i>
{{subItem.title}} {{subItem.title}}
...@@ -13,7 +22,8 @@ ...@@ -13,7 +22,8 @@
</template> </template>
<template v-else> <template v-else>
<el-menu-item :index="item.index" :key="item.index"> <el-menu-item :index="item.index" :key="item.index">
<i :class="item.icon"></i>{{ item.title }} <i :class="item.icon"></i>
{{ item.title }}
</el-menu-item> </el-menu-item>
</template> </template>
</template> </template>
...@@ -21,43 +31,61 @@ ...@@ -21,43 +31,61 @@
</div> </div>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex' import { mapGetters } from "vuex";
import { setTimeout } from 'timers' import { setTimeout } from "timers";
import { isNotEmptyUtils } from '../../utils/utils' import { isNotEmptyUtils } from "../../utils/utils";
let vm = null import { getInnerLoginUrl } from "../../utils";
let vm = null;
export default { export default {
props: { props: {
tokenValue: { tokenValue: {
type: String type: String
},
systemType: {
type: Number | String,
value: 38,
} }
}, },
data() { data() {
return { return {
items: [], items: []
// items:[{title:'组件',icon:'el-icon-menu',index:'item',subs:[{title:'讨论组件',icon:'el-icon-setting',index:'discuss-list'},{title:"问卷管理",icon:"el-icon-setting",index:"question-naire"},{title:"举报管理",icon:"el-icon-setting",index:"report-set"}]},] // items:[{title:'组件',icon:'el-icon-menu',index:'item',subs:[{title:'讨论组件',icon:'el-icon-setting',index:'discuss-list'},{title:"问卷管理",icon:"el-icon-setting",index:"question-naire"},{title:"举报管理",icon:"el-icon-setting",index:"report-set"}]},]
} };
}, },
computed: { computed: {
onRoutes() { onRoutes() {
return this.$route.path.replace('/', ''); return this.$route.path.replace("/", "");
} }
}, },
created() { created() {
vm = this vm = this;
const navs = sessionStorage.getItem('DISCUSS_CENTER_NAVS') const navs = sessionStorage.getItem("ADMIN_IM_CENTER_NAVS");
vm.getNav() vm.getNav();
}, },
methods: { methods: {
getNav() { getNav() {
this.POST('/basic-data/menu/list', { systemType: 26 }).then(res => { this.POST("/basic-data/menu/list", { systemType: this.systemType }).then(res => {
if (res.code == '000000') { if (res.code == "000000") {
const { vueMenuDtos } = res.data; let { vueMenuDtos } = res.data;
// let vueMenuDtos = [];
// // TODO 开发调试时写死, 发布时去掉
// vueMenuDtos = [{
// icon: 'el-icon-setting',
// index: "diagnosis-list",
// subs: [],
// title: "订单管理"
// }];
this.items = vueMenuDtos; this.items = vueMenuDtos;
sessionStorage.setItem('DISCUSS_CENTER_NAVS', JSON.stringify(vueMenuDtos)); sessionStorage.setItem(
"ADMIN_IM_CENTER_NAVS",
JSON.stringify(vueMenuDtos)
);
// 做当前路由无权限时处理 // 做当前路由无权限时处理
this.checkAuth(this.$route.path.split('/')[1], vueMenuDtos); // this.checkAuth(this.$route.path.split("/")[1], vueMenuDtos);
} else {
window.location.href = getInnerLoginUrl(); // 返回登录页面
} }
}); });
}, },
...@@ -78,13 +106,12 @@ export default { ...@@ -78,13 +106,12 @@ export default {
} }
return nvs; return nvs;
} }
debugger
if (navList.indexOf(path) == -1) { if (navList.indexOf(path) == -1) {
this.$router.push(`/${navList[0]}`); this.$router.push(`/${navList[0]}`);
} }
} }
} }
} };
</script> </script>
<style lang="scss"> <style lang="scss">
.slidebar-container { .slidebar-container {
...@@ -94,26 +121,27 @@ export default { ...@@ -94,26 +121,27 @@ export default {
top: 64px; top: 64px;
bottom: 0; bottom: 0;
width: 255px; width: 255px;
background: #06232C; background: #06232c;
.el-menu { .el-menu {
background: #06232C; background: #06232c;
border-right: none; border-right: none;
.sub-icon { .sub-icon {
font-size: 12px; font-size: 12px;
} }
.el-menu-item, .el-submenu__title { .el-menu-item,
color: #8FA4AC; .el-submenu__title {
color: #8fa4ac;
} }
.el-menu-item.is-active { .el-menu-item.is-active {
color: #fff; color: #fff;
background: #509284 !important background: #0D9078 !important;
} }
.el-menu-item:hover, .el-menu-item:hover,
.el-submenu__title:hover, .el-submenu__title:hover,
.slidebar-container .el-menu .el-menu-item:hover, .slidebar-container .el-menu .el-menu-item:hover,
.slidebar-container .el-menu .el-submenu__title:hover { .slidebar-container .el-menu .el-submenu__title:hover {
color: #fff; color: #fff;
background: #06232C; background: #06232c;
} }
// .el-menu-item:focus, .el-menu-item:hover { // .el-menu-item:focus, .el-menu-item:hover {
// background: #06232C !important; // background: #06232C !important;
......
<template>
<div class="question-wrap">
<bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond">
</bread-crumb>
<div class="question-content screenSet" id="screenSet">
<el-row :gutter="30" class="row" type="flex" style="margin-top: 10px;">
<el-form
ref="serchForm"
:model="searchParam"
label-width="75px"
label-suffix=":"
style="width:100%;"
>
<el-col :span="6">
<el-form-item label="问卷名称">
<el-input
v-model="searchParam.name"
size="mini"
placeholder="请输入问卷名称"
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="状态">
<el-select
clearable
v-model="searchParam.status"
size="mini"
placeholder="请选择问卷状态"
>
<el-option
v-for="(item, index) in statuSelect"
:key="index"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" style="text-align:right;padding:0 30px 15px 0;">
<el-button type="primary" size="small" @click="search(1)"
>查询</el-button
>
<el-button type="default" size="small" @click="reset"
>重置</el-button
>
</el-col>
</el-form>
</el-row>
<el-button
class="add-question"
type="primary"
size="small"
@click="addQuestion"
>新增问卷</el-button
>
<el-table :data="tableData" style="width: 100%" v-loading="loading">
<el-table-column
prop="id"
label="问卷编号"
min-width="50"
align="center"
></el-table-column>
<el-table-column
prop="name"
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.modifiedId | modifyType(modifyArray) }}</span>
</template>
</el-table-column>
<el-table-column label="最后修改时间" min-width="100" align="center">
<template slot-scope="scope">
<span>{{ scope.row.modifiedTime | liveDateFilter }}</span>
</template>
</el-table-column>
<el-table-column label="问卷状态" min-width="80" align="center">
<template slot-scope="scope">
<span>{{ scope.row.status | questionStatus }}</span>
</template>
</el-table-column>
<el-table-column
label="操作"
fixed="right"
align="center"
min-width="200"
>
<template slot-scope="scope">
<el-button
type="primary"
size="small"
@click="editQuestion(scope.row)"
>编辑</el-button
>
<el-button
type="primary"
v-show="scope.row.status == 1"
size="small"
@click="onAndDownLine(scope.row)"
>上线
</el-button>
<el-button
type="primary"
v-show="scope.row.status == 2"
size="small"
@click="onAndDownLine(scope.row)"
>下线
</el-button>
<!-- <el-button type="primary" size="small" @click="reviewQuestion(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>
<!-- 问卷新增(编辑) -->
<el-dialog
class="img-edit"
:title="questionTitle"
:visible.sync="discussEditVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
>
<el-form
ref="questionForm"
:rules="rules"
:model="questionEditList"
label-width="220px"
label-suffix=":"
size="mini"
>
<el-form-item>
<el-radio-group
v-model="questionEditList.showType"
style="margin-left: -65px;"
:disabled="formStatus != 'create'"
>
<el-radio :label="1">单题显示</el-radio>
<el-radio :label="2">平铺显示</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="问卷标题" prop="name">
<el-input
v-model="questionEditList.name"
maxlength="30"
placeholder="标题最多30字符"
style="width: 300px;"
>
</el-input>
</el-form-item>
<el-form-item label="题库导入" prop="fileName">
<el-col :span="12">
<el-input
class="form-input"
:placeholder="excelFileName"
v-model="fileName"
disabled
style="width: 99%;"
/>
</el-col>
<el-col :span="10">
<el-upload
class="upload-demo"
style="display: inline-block;width: 80px;"
action="#"
accept=".xlsx"
:before-upload="beforeImport"
:limit="1"
>
<el-button type="primary" size="mini">导入题库</el-button>
</el-upload>
<el-button type="default" size="mini" @click="uploadTemplate"
>模板下载</el-button
>
</el-col>
</el-form-item>
<el-form-item
label="下一题按钮"
v-show="questionEditList.showType == 1"
>
<div class="submit-btn" style="margin-right:20px;">
<p>置灰不可点</p>
<el-upload
v-model="questionEditList.nextDisableClickUrl"
class="avatar-uploader"
action="#"
:show-file-list="false"
:before-upload="beforeAvatarUpload_1"
>
<el-button size="mini" type="primary">上传</el-button>
</el-upload>
<div class="uploat-content">
<img
v-show="questionEditList.nextDisableClickUrl"
:src="questionEditList.nextDisableClickUrl"
class="bg-img"
/>
<img
v-show="!questionEditList.nextDisableClickUrl"
class="bg-img"
src="https://files.yunqueyi.com/image/png/common/20190408164003674.png"
/>
</div>
</div>
<div class="submit-btn">
<p>点亮可点</p>
<el-upload
v-model="questionEditList.nextClickUrl"
class="avatar-uploader"
action="#"
:show-file-list="false"
:before-upload="beforeAvatarUpload_2"
>
<el-button size="mini" type="primary">上传</el-button>
</el-upload>
<div class="uploat-content">
<img
v-show="questionEditList.nextClickUrl"
:src="questionEditList.nextClickUrl"
class="bg-img"
/>
<img
v-show="!questionEditList.nextClickUrl"
class="bg-img"
src="https://files.yunqueyi.com/image/png/common/20190408164015812.png"
/>
</div>
</div>
</el-form-item>
<el-form-item label="问卷导言" v-show="questionEditList.showType == 2">
<el-input
type="textarea"
:autosize="{ minRows: 3 }"
v-model="questionEditList.questionIntro"
maxlength="210"
placeholder="最多210字符"
></el-input>
</el-form-item>
<el-form-item
label="业务类型"
v-show="questionEditList.showType == 2"
prop="bizType"
>
<el-radio-group
v-model="questionEditList.bizType"
:disabled="formStatus != 'create'"
>
<el-radio :label="0">普通问卷</el-radio>
<el-radio :label="1">招募问卷</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label="是否需要审核"
v-show="questionEditList.showType == 2"
prop="bizType"
>
<el-radio-group
v-model="questionEditList.auditFlag"
:disabled="formStatus != 'create'"
@change="addAuditFlag"
>
<el-radio :label="2"></el-radio>
<el-radio :label="1"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label="填写完是否需要提示用户分享"
v-show="questionEditList.showType == 2"
>
<el-radio-group
v-model="questionEditList.shareFlag"
:disabled="formStatus != 'create'"
>
<el-radio :label="2"></el-radio>
<el-radio :label="1"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="分享地址" class="spe-label-require" v-show="questionEditList.showType == 2 && questionEditList.shareFlag == 1">
<el-input
v-model="questionEditList.shareUrl"
style="width: 300px;">
</el-input>
</el-form-item>
<el-form-item label="分享的标题" class="spe-label-require" v-show="questionEditList.showType == 2 && questionEditList.shareFlag == 1">
<el-input
v-model="questionEditList.shareTitle"
style="width: 300px;">
</el-input>
</el-form-item>
<el-form-item label="分享的描述" class="spe-label-require" v-show="questionEditList.showType == 2 && questionEditList.shareFlag == 1">
<el-input
v-model="questionEditList.shareIntro"
style="width: 300px;">
</el-input>
</el-form-item>
<el-form-item label="基本信息" v-show="questionEditList.showType == 2">
<el-checkbox v-model="userBase.name" label="true">姓名</el-checkbox>
<el-checkbox v-model="userBase.mobile" label="true"
>手机号</el-checkbox
>
<el-checkbox v-model="userBase.address" label="true"
>地址</el-checkbox
>
</el-form-item>
<div v-show="questionEditList.showType == 2">
<el-form-item class="submit-btn" label="头图">
<el-upload
v-model="questionEditList.headDiagramUrl"
class="avatar-uploader"
action="#"
:show-file-list="false"
:before-upload="beforeAvatarUpload_4"
>
<el-button class="head-btn" size="mini" type="primary"
>上传</el-button
>
</el-upload>
<div class="uploat-content">
<img
v-show="questionEditList.headDiagramUrl"
:src="questionEditList.headDiagramUrl"
class="head-bg-img"
/>
<img
v-show="!questionEditList.headDiagramUrl"
class="head-bg-img"
src="../../assets/image/default.png"
/>
</div>
</el-form-item>
</div>
<el-form-item class="submit-btn" label="提交按钮">
<el-upload
v-model="questionEditList.submitButtomUrl"
class="avatar-uploader"
action="#"
:show-file-list="false"
:before-upload="beforeAvatarUpload_3"
>
<el-button size="mini" type="primary">上传</el-button>
</el-upload>
<div class="uploat-content">
<img
v-show="questionEditList.submitButtomUrl"
:src="questionEditList.submitButtomUrl"
class="bg-img"
/>
<img
v-show="!questionEditList.submitButtomUrl"
class="bg-img"
src="https://files.yunqueyi.com/image/png/common/20190408164026451.png"
/>
</div>
</el-form-item>
<el-form-item label="问卷填写完毕提示文案" prop="promptCopy">
<el-input
v-model="questionEditList.promptCopy"
maxlength="40"
style="width: 300px;"
></el-input>
<span style="font-size:12px;">限40字符</span>
</el-form-item>
<el-form-item
label="登录权限控制"
v-show="questionEditList.showType == 2"
>
<el-checkbox-group v-model="loginAuthList" class="login-auth" >
<el-checkbox label="1" :disabled="questionEditList.auditFlag==1">云鹊医APP</el-checkbox>
<el-checkbox label="2" :disabled="questionEditList.auditFlag==1">云鹊医H5</el-checkbox>
</el-checkbox-group>
<p style="color:red;">注意:如不勾选登录权限则用户信息记录为游客</p>
</el-form-item>
<el-form-item
label="问卷填写次数"
v-show="questionEditList.showType == 2"
prop="limitNum"
>
<el-radio v-model="questionEditList.limitNumFlag" label="0" :disabled="questionEditList.auditFlag==1">
<el-input
v-model="questionEditList.limitNum"
controls-position="right"
:min="1"
style="width: 100px;"
@blur="checkLimitNum"
@focus="beforeInputLimitNum"
:disabled="questionEditList.auditFlag==1"
></el-input>
</el-radio>
<el-radio v-model="questionEditList.limitNumFlag" label="1" :disabled="questionEditList.auditFlag==1"
>不限制填写次数</el-radio
>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer" style="text-align:center;">
<el-button
type="primary"
size="small"
@click="submitQuestion"
style="width:120px;"
>提交</el-button
>
</div>
</el-dialog>
</div>
</template>
<script>
import BreadCrumb from "../../components/breadcrumb.vue";
import * as commonUtil from "../../utils/utils";
import { getFilePath, doUpload } from "../../utils/qiniu-util";
import { QUESTION_UPLOAD_TEMPLATE } from "../../utils/constants";
let vm = null;
export default {
components: {
BreadCrumb
},
data() {
return {
curmbFirst: "组件",
curmbSecond: "问卷管理",
questionTitle: "问卷新增/编辑",
discussEditVisible: false,
excelFileName: "",
fileName: "",
fileArray: [],
tableData: [],
totalRows: 0,
loading: false,
searchParam: {
name: "",
status: "",
pageSize: 15,
pageNo: 1
},
modifyArray: [],
questionEditList: {
id: "",
showType: 1,
name: "",
nextDisableClickUrl: "",
nextClickUrl: "",
submitButtomUrl: "",
promptCopy: "",
headDiagramUrl: "",
questionIntro: "",
bizType: 0, //业务类型 0普通 ,1 招募
limitNumFlag: "0", //填写次数flag
limitNum: 1, //填写次数
auditFlag: 2,
shareFlag: 2,
shareUrl: '',
shareTitle: '',
shareIntro: '',
},
formStatus: "create",
loginAuthList: [], //登录权限控制
userBase: {}, //基本信息
rules: {
name: [
{
required: true,
message: "请输入问卷标题",
trigger: "blur"
}
],
promptCopy: [
{
required: true,
message: "请输入问卷填写完毕提示文案",
trigger: "blur"
}
],
bizType: [
{
required: true,
message: "请选择业务类型",
trigger: "blur"
}
],
limitNum: [
{
required: true
}
]
},
statuSelect: [
{
label: "下线",
value: 1
},
{
label: "上线",
value: 2
}
]
};
},
created() {
vm = this;
vm.search();
vm.getAllModify();
},
// 挂载到Dom完成时
mounted: function() {
commonUtil.resizeHeight();
},
methods: {
addAuditFlag() {
if(this.questionEditList.auditFlag == 1) {
vm.loginAuthList = ["1","2"];
vm.questionEditList.limitNumFla = '1';
vm.questionEditList.limitNum = 1;
} else {
}
},
// 查询
search(flag) {
if (flag) vm.searchParam.pageNo = 1;
vm.GET("/campaign/adminQuestionnaire/queryList", vm.searchParam).then(
res => {
if (res.code == "000000") {
vm.tableData = res.data.questionnaireList;
vm.totalRows = res.data.total;
}
}
);
},
handleSizeChange(value) {
vm.searchParam.pageSize = value;
vm.search();
},
handleCurrentChange(value) {
vm.searchParam.pageNo = value;
vm.search();
},
reset() {
vm.searchParam.name = "";
vm.searchParam.status = "";
vm.search();
},
// 获取所有修改人
getAllModify() {
vm.GET("/campaign/adminQuestionnaire/getAllUser").then(res => {
if (res.code == "000000") {
vm.modifyArray = res.data;
}
});
},
// 新增问卷
addQuestion() {
vm.discussEditVisible = true;
vm.formStatus = "create";
if (vm.$refs.questionForm !== undefined) {
vm.$refs.questionForm.resetFields();
}
vm.questionEditList = Object.assign(
{},
{
id: "",
showType: 1,
name: "",
nextDisableClickUrl: "",
nextClickUrl: "",
submitButtomUrl: "",
promptCopy: "您已成功提交问卷,感谢您的参与!",
headDiagramUrl: "",
questionIntro: "",
bizType: 0,
limitNumFlag: "0",
limitNum: 1,
auditFlag: 2,
shareFlag: 2,
shareUrl: '',
shareTitle: '',
shareIntro: '',
}
);
vm.loginAuthList = ["1"];
vm.userBase = Object.assign(
{},
{
address: false,
mobile: false,
name: false
}
);
vm.fileName = "";
vm.fileArray = [];
vm.excelFileName = "";
},
// 编辑
editQuestion(row) {
if (vm.$refs.questionForm !== undefined) {
vm.$refs.questionForm.resetFields();
}
vm.discussEditVisible = true;
vm.formStatus = "edit";
vm.excelFileName = "";
vm.fileName = "";
vm.fileArray = [];
vm.GET("/campaign/adminQuestionnaire/getQuestionnaireById", {
id: row.id
}).then(res => {
if (res.code == "000000") {
// console.log(res.data);
let { questionnaireInfo, loginAuthInfo } = res.data.data;
vm.questionEditList = Object.assign({}, questionnaireInfo);
vm.questionEditList = Object.assign({}, vm.questionEditList, {
questionIntro: questionnaireInfo.questionIntro.replace(
/<br>/g,
"\n"
),
limitNumFlag: questionnaireInfo.limitNum < 1 ? "1" : "0",
limitNum:
questionnaireInfo.limitNum < 1 ? 1 : questionnaireInfo.limitNum
});
const userBaseData = JSON.parse(questionnaireInfo.userBase);
vm.userBase = Object.assign({}, vm.userBase, {
address: Boolean(userBaseData.address),
mobile: Boolean(userBaseData.mobile),
name: Boolean(userBaseData.name)
});
vm.loginAuthList = loginAuthInfo;
}
});
},
// 上线/下线
onAndDownLine(row) {
let req = null;
if (row.status == 1) {
req = {
id: row.id,
status: 2
};
} else {
req = {
id: row.id,
status: 1
};
}
vm.GET("/campaign/adminQuestionnaire/upperOrLowerShip", req).then(res => {
if (res.code == "000000") {
vm.search();
}
});
},
// 导入题库
beforeImport(file) {
if (commonUtil.isEmptyUtils(file)) return;
let arr = file.type.split("/");
let ext = "." + arr[1];
let reader = new FileReader();
reader.onload = function(e) {
let fileJson = {
fileName: file.name,
file: e.target.result.substr(e.target.result.indexOf("base64,") + 7),
ext: ext
};
vm.fileArray = [
{
base64: fileJson
}
];
vm.fileName = file.name;
vm.excelFileName = file.name;
vm.$message.info("读取完毕");
};
reader.readAsDataURL(file);
return false;
},
// 模板下载
uploadTemplate() {
window.location.href = QUESTION_UPLOAD_TEMPLATE;
},
// 置灰不可点图片上传
beforeAvatarUpload_1(file) {
if (commonUtil.isEmptyUtils(file)) return;
vm.imgDoUpload(file, 1, 50, 750, 100);
return false;
},
// 点亮图片上传
beforeAvatarUpload_2(file) {
if (commonUtil.isEmptyUtils(file)) return;
vm.imgDoUpload(file, 2, 50, 750, 100);
return false;
},
// 提交图片上传
beforeAvatarUpload_3(file) {
if (commonUtil.isEmptyUtils(file)) return;
vm.imgDoUpload(file, 3, 50, 690, 88);
return false;
},
// 头图图片上传
beforeAvatarUpload_4(file) {
if (commonUtil.isEmptyUtils(file)) return;
vm.imgDoUpload(file, 4, 100, 750, -1);
return false;
},
imgDoUpload(file, urlType, size, w, h) {
const isSize = file.size / 1024 < size;
if (!isSize) {
vm.$message.info("上传图片要小于" + size + "k");
return;
}
var _img = new FileReader();
_img.readAsDataURL(file);
_img.onload = function(theFile) {
let image = new Image();
image.src = theFile.target.result;
image.onload = function() {
let _this = this;
let uploadFlag = false;
if (h == -1) {
if (_this.width != w) {
vm.$message.info("上传图片宽度应为" + w + ",请重新上传");
} else {
uploadFlag = true;
}
} else {
if (_this.width != w || _this.height != h) {
vm.$message.info(
"上传图片尺寸应为" + w + "*" + h + ",请重新上传"
);
} else {
uploadFlag = true;
}
}
if (uploadFlag) {
vm.$message.info("开始上传");
doUpload(
vm,
file,
getFilePath(file, null),
"preview4",
"progress1",
1
).then(function(path) {
if (urlType == 1) {
vm.questionEditList.nextDisableClickUrl = path.fullPath;
} else if (urlType == 2) {
vm.questionEditList.nextClickUrl = path.fullPath;
} else if (urlType == 3) {
vm.questionEditList.submitButtomUrl = path.fullPath;
} else {
vm.questionEditList.headDiagramUrl = path.fullPath;
}
vm.$message.success("上传成功");
});
}
};
};
},
// 提交
submitQuestion() {
if (vm.questionEditList.showType == 1) {
// 单题显示
vm.questionEditList.questionIntro = "";
vm.questionEditList.headDiagramUrl = "";
} else {
vm.questionEditList.nextDisableClickUrl = "";
vm.questionEditList.nextClickUrl = "";
}
if (!vm.questionEditList.id) {
if (commonUtil.isEmptyList(vm.fileArray)) {
vm.$message.info("请导入题库");
return;
}
}
if (vm.questionEditList.showType == 2) {
if (vm.questionEditList.shareFlag == 1) {
if (vm.questionEditList.shareUrl == '') {
vm.$message.info("请填写分享地址");
return;
}
if (vm.questionEditList.shareTitle == '') {
vm.$message.info("请填写分享标题");
return;
}
if (vm.questionEditList.shareIntro == '') {
vm.$message.info("请填写分享描述");
return;
}
}else {
vm.questionEditList.shareUrl = '';
vm.questionEditList.shareTitle = '';
vm.questionEditList.shareIntro = '';
}
}
let req = {
model: JSON.parse(JSON.stringify(vm.questionEditList)),
fileArray: vm.fileArray,
loginAuth: []
};
if (vm.questionEditList.limitNumFlag == 1) {
req.model.limitNum = -1;
}
let reqUserBase = Object.assign({}, vm.userBase, {
address: Number(vm.userBase.address),
mobile: Number(vm.userBase.mobile),
name: Number(vm.userBase.name)
});
req.model.userBase = JSON.stringify(reqUserBase);
vm.loginAuthList.map(u => {
req.loginAuth.push({
value: u
});
});
req.model.questionIntro = vm.questionEditList.questionIntro.replace(
/\n/g,
"<br>"
);
// console.log(req);
vm.$refs.questionForm.validate(valid => {
//console.log(this.discussEditVisible)
if (valid) {
if (vm.formStatus === 'create' && vm.questionEditList.showType == 2) {
vm.$confirm('业务类型提交后无法再次修改, 请确认是否提交?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
commonUtil.openLoading(vm)
vm.POST(
'/campaign/adminQuestionnaire/insertOrUpdateQuestionnaire',
req
).then(res => {
commonUtil.closeLoading(vm)
if (res.code == '000000') {
vm.discussEditVisible = false
vm.$message({
type: 'success',
message: '操作成功'
})
vm.search()
} else {
vm.$message.info(res.message)
}
})
})
.catch(() => {
vm.$message({
type: 'info',
message: '已取消提交'
})
})
} else {
commonUtil.openLoading(vm)
vm.POST(
'/campaign/adminQuestionnaire/insertOrUpdateQuestionnaire',
req
).then(res => {
commonUtil.closeLoading(vm)
if (res.code == '000000') {
vm.discussEditVisible = false
vm.$message({
type: 'success',
message: '操作成功'
})
vm.search()
} else {
vm.$message.info(res.message)
}
})
}
}
})
},
// 校验输入数字为正整数
checkLimitNum() {
const regexp = /^[1-9]\d*$/;
if (!regexp.test(vm.questionEditList.limitNum)) {
vm.questionEditList = Object.assign({}, vm.questionEditList, {
limitNum: 1
});
}
},
// foucs选中则改变radio
beforeInputLimitNum() {
vm.questionEditList = Object.assign({}, vm.questionEditList, {
limitNumFlag: "0"
});
}
}
};
</script>
<style lang="scss" scoped>
.question-wrap {
.question-content {
background: #fff;
.add-question {
float: right;
margin: 10px;
}
.table-empty {
img {
width: 100px;
}
p {
margin-top: -50px;
}
}
}
.submit-btn {
display: inline-block;
overflow: hidden;
p {
font-size: 12px;
}
.avatar-uploader {
float: right;
.el-button {
margin-left: 10px;
}
.head-btn {
margin-top: 48px !important;
}
}
.uploat-content {
float: left;
.bg-img {
width: 150px;
height: 30px;
}
.head-bg-img {
width: 80px;
height: 80px;
}
}
}
.login-auth {
width: 400px;
.el-checkbox {
display: inline-block;
width: 150px;
text-align: left;
}
}
}
</style>
<style>
.spe-label-require .el-form-item__label:before{
content: '*';
color: #F56C6C;
margin-right: 4px;
}
</style>
<template>
<div class="item-component-wrap">
<bread-crumb
:curmbFirst="curmbFirst"
:curmbSecond="curmbSecond">
</bread-crumb>
<div class="component-content screenSet" id="screenSet">
<div class="search-title">查询条件</div>
<el-row :gutter="30" class="row" type="flex" style="margin-top: 10px;">
<el-form ref="serchForm" :model="searchParam" label-width="75px" style="width:100%;">
<el-col :span="6">
<el-form-item label="话题名称:">
<el-input clearable v-model="searchParam.theme" size="mini" placeholder="请输入话题名称"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="创建日期:">
<el-date-picker v-model="searchParam.time" size="mini" type="date" placeholder="选择日期"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="创建人:">
<el-input clearable v-model="searchParam.name" size="mini" placeholder="请输入组件名称"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="最后修改人:">
<el-input clearable v-model="searchParam.name" size="mini" placeholder="请输入组件名称"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="状态:">
<el-select clearable v-model="searchParam.status" size="mini" placeholder="请选择发布状态">
<el-option
v-for="(item,index) in statuSelect"
:key="index"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col style="text-align:right;padding:0 30px 15px 0;">
<el-button type="primary" size="small" @click="search">查询</el-button>
<el-button type="default" size="small" @click="reseat">重置</el-button>
<el-button type="primary" size="small" @click="createTopic">新建话题</el-button>
</el-col>
</el-form>
</el-row>
<el-table
:data="tableData"
style="width: 100%" v-loading="loading">
<el-table-column prop="id" label="排序" min-width="50" align="center"></el-table-column>
<el-table-column prop="subject" label="话题名称" min-width="100" align="center"></el-table-column>
<el-table-column prop="createdusername" label="创建人" min-width="50" align="center"></el-table-column>
<el-table-column prop="remark" label="创建日期" min-width="100" align="center"></el-table-column>
<el-table-column prop="createdName" label="最后修改人" min-width="100" align="center"></el-table-column>
<el-table-column prop="createdName" label="修改日期" min-width="100" align="center"></el-table-column>
<el-table-column prop="status" label="状态" min-width="80" align="center">
<template slot-scope="scope">
<span>{{ scope.row.status | filteFun}}</span>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" min-width="200">
<template slot-scope="scope">
<el-button type="primary" size="small" @click="edit(scope.row)">编辑</el-button> <el-button type="primary" v-if="scope.row.status == 3 || scope.row.status == 1" size="small" @click="optFun(scope.row,'发布')">发布</el-button>
<el-button type="primary" v-if="scope.row.status == 2" size="small" @click="optFun(scope.row,'下线')">下线</el-button>
<el-button type="primary" size="small" @click="topicManage(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 { mapGetters } from 'vuex'
import { openLoading, closeLoading } from '../../utils/utils'
import * as commonUtil from '../../utils/utils'
let vm = null
export default {
components: {
BreadCrumb
},
data() {
return {
curmbFirst: '组件',
curmbSecond: '举报设置',
searchParam: {
theme:'',
type:'',
name:'',
status: '',
pageNo: 1,
pageSize: 15
},
category:[
{
value:'积木',
label:'积木'
}
],
statuSelect: [
{
label: '未发布',
value: '1'
},{
label: '已发布',
value: '2'
},{
label: '已下架',
value: '3'
}
],
tableData: [],
totalRows: 0,
loading:false,
isShow:true,
}
},
computed: {
...mapGetters([
'_token',
'idType'
])
},
filters:{
filteFun(index){
let str = '';
if(index == 1){
str = '未发布'
}else if(index == 2){
str = '已发布'
}else if(index == 3){
str = '已下线'
}
return str
}
},
created() {
this.getData()
//this.sun()
},
// 挂载到Dom完成时
mounted: function() {
commonUtil.resizeHeight()
},
methods: {
// 列表查询
search() {
this.getData()
},
getFun(obj){
console.log(obj)
this.isShow = false;
},
//获取数据
getData(){
let subject = 0,status = 0,name = 0;
if(this.searchParam.theme != ''){
subject = this.searchParam.theme
}
if(this.searchParam.status != ''){
status = this.searchParam.status
}
if(this.searchParam.name != ''){
name = this.searchParam.name
}
this.loading = true;
let url = '/interaction/discuss/'+subject+'/'+name+'/'+status+'/'+this.searchParam.pageNo+'/'+this.searchParam.pageSize
this.GET(url).then((res) => {
this.loading = false
if( res.code == '000000' ) {
this.tableData = res.data.discuss || []
this.totalRows = res.data.count
}
})
},
// 重置
reseat() {
this.searchParam = Object.assign({},{
theme:'',
type:'',
name:'',
category:'',
status: '',
pageNo: 1,
pageSize: 15
})
this.getData()
},
// 新建组件
createTopic() {
this.isShow = true;
},
edit(item){
this.$router.push({path: 'creat-discuss',query:{id:item.id}})
},
topicManage(item){
},
// 发布、下线
optFun(row,str) {
let status = 0;
if(str == '发布'){
status = 2
}else if(str == '下线'){
status = 3
}
this.$confirm('确定要'+str+'该讨论吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.PUT('/interaction/discuss/',{id: row.id,status:status}).then((res) => {
if(res.code == "000000") {
this.$message({
type: 'success',
message: '操作成功!'
});
this.getData()
}
}).catch(function (error) {
this.$message.error(error);
});
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
})
})
},
handleSizeChange(value) {
this.searchParam.pageSize = value
this.getData()
},
handleCurrentChange(value) {
this.searchParam.pageNo = value
this.getData()
}
}
}
</script>
<style lang="scss">
.item-component-wrap {
.component-content {
padding: 10px;
background: #fff;
// margin: 84px 20px 20px;
.search-title {
padding: 10px 12px;
font-size: 12px;
color: #449284;
border-bottom: 1px solid #efefef;
}
.create-button {
padding: 0 0 15px;
margin-top: 0 !important;
text-align: right;
}
.table-empty {
img{
width: 100px;
}
p {
margin-top: -50px;
}
}
}
}
</style>
<template>
<div class="item-component-wrap">
<bread-crumb
:curmbFirst="curmbFirst"
:curmbSecond="curmbSecond">
</bread-crumb>
<div class="component-content screenSet" id="screenSet">
<div class="search-title">预警邮箱</div>
<el-row :gutter="30" class="row" type="flex" style="margin-top: 10px;" v-for="(item,index) in reportData" :key="index">
<el-form label-width="75px" style="width:100%;">
<el-col :span="5">
<el-form-item label="姓名:">
<el-input clearable v-model="item.userName" size="mini" placeholder="请输入接收人姓名"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="Dr.id:">
<el-input clearable v-model="item.doctorId" size="mini" placeholder="请输入doctorId"></el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="邮箱地址:">
<el-col :span="12" style="padding-right: 5px;">
<el-input clearable v-model="item.email" size="mini" placeholder="请输入邮箱前缀"></el-input>
</el-col>
<div class='email-h'>@picahealth.com</div>
</el-form-item>
</el-col>
<el-col :span="2">
<div class="opt-icon">
<i class="el-icon-circle-plus-outline" @click="add"></i>
<i class="el-icon-remove-outline" @click="remove(index)" v-if="index > 0"></i>
</div>
</el-col>
</el-form>
</el-row>
<div class="opt-btn">
<el-button type="primary" size="small" @click="save" :disabled="isSaveBack">保存</el-button>
<el-button size="small" class="button-white" @click="goBack">返回</el-button>
</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 { mapGetters } from 'vuex'
import { openLoading, closeLoading } from '../../utils/utils'
import * as commonUtil from '../../utils/utils'
let vm = null
export default {
components: {
BreadCrumb
},
data() {
return {
curmbFirst: '组件',
curmbSecond: '举报设置',
reportData:[],
isSaveBack:false,
}
},
computed: {
...mapGetters([
'_token',
'idType'
])
},
created() {
this.getData()
},
// 挂载到Dom完成时
mounted: function() {
commonUtil.resizeHeight()
},
methods: {
//返回
goBack(){
this.$router.back(-1)
},
//保存
save(){
let index = this.handelData(this.reportData)
console.log(index)
if(index == 1){
this.$message({
message: '姓名、邮箱或doctorId不能为空!',
type: 'warning'
});
return;
}
if(index == 2){
this.$message({
message: 'doctorId已存在',
type: 'warning'
});
return;
}
if(index == 3){
this.$message({
message: 'doctorId只能是大于0的纯数字!',
type: 'warning',
});
return;
}
let d = this.handelEmail(this.reportData ,2)
let parm = {
informConfigs:d
}
//JSON.stringify(this.reportData)
this.loading = true;
this.isSaveBack = true;
this.POST('/interaction/informConfig/insertAdmin',parm).then((res) => {
this.loading = false
if( res.code == '000000' ) {
this.$message({
message: '保存成功!',
type: 'success'
});
}else{
this.$message({
message: res.message,
type: 'warning'
});
}
setTimeout(()=>{
this.isSaveBack = false;
},2000)
})
},
add(){
this.reportData.push(
{
"doctorId": '',
"email": "",
"userName": ""
},
)
},
remove(index){
this.reportData.splice(index, 1);
},
//保存
saveFun(){
},
handelData(d){
console.log(d)
let index = null,hash = [],r = /^[1-9]+\d*$/;
for(let i=0;i<d.length;i++){
let parm = String(d[i].doctorId)
if(d[i].doctorId == '' || d[i].userName == '' || d[i].email == ''){
index = 1
break;
}
if(!r.test(d[i].doctorId)){
console.log(d[i].doctorId)
index = 3
break;
}
if(hash.indexOf(parm) == -1){
hash.push(parm)
}else{
index = 2;
break;
}
}
return index;
},
//处理邮箱展示
handelEmail(d,str){
let A = [],parm = {};
for(let i=0;i<d.length;i++){
parm = {...d[i]}
if(str == 1){
parm['email'] = d[i].email.split("@")[0]
}else if(str == 2){
parm['email'] = d[i].email + '@picahealth.com'
}
A.push(parm)
}
console.log(A)
return A;
},
//获取数据
getData(){
let parm = {
pageNo:1,
pageSize:20
}
this.GET('/interaction/informConfig/getInformList',parm).then((res) => {
if( res.code == '000000' ) {
if(res.data.length == 0){
this.reportData = [{
"doctorId": '',
"email": "",
"userName": ""
},]
}else{
this.reportData = this.handelEmail(res.data,1) || []
}
}else{
this.$message({
message: res.message,
type: 'warning'
});
}
})
},
}
}
</script>
<style lang="scss">
.item-component-wrap {
.component-content {
padding: 10px;
background: #fff;
// margin: 84px 20px 20px;
.search-title {
padding: 10px 12px;
font-size: 12px;
color: #449284;
border-bottom: 1px solid #efefef;
}
.create-button {
padding: 0 0 15px;
margin-top: 0 !important;
text-align: right;
}
.table-empty {
img{
width: 100px;
}
p {
margin-top: -50px;
}
}
.opt-icon{
line-height: 40px;
i{
margin-right: 10px;
}
}
.opt-btn{
text-align: center
}
.email-h{
float: left;
}
}
}
</style>
<template>
<el-dialog :title="title" :visible.sync="dialogFormVisible" @close="optFun('1')">
<el-form :model="form" class="topicOpt">
<el-form-item label="主题" :label-width="formLabelWidth" required>
<el-input v-model="objInfo.topic.subject" auto-complete="off" clearable size="mini" :maxLength="max" placeholder="请输入主题(最长60个字符)"></el-input>
</el-form-item>
<el-form-item label="内容" :label-width="formLabelWidth" >
<el-input type="textarea" v-model="objInfo.topic.content" auto-complete="off" clearable size="mini" :maxLength="maxL" placeholder="请输入主题(最长1000个字符)" rows="5"></el-input>
</el-form-item>
<el-form-item label="话题配图" :label-width="formLabelWidth" class="teste1">
<!-- <el-upload
action="#"
list-type="picture-card"
:file-list="fileList"
:on-change="selectImg"
:on-preview="handlePictureCardPreview"
:on-remove="handleRemove">
<i class="el-icon-plus"></i> -->
<el-upload
action="#"
list-type="picture-card"
:file-list="fileList"
:on-preview="handlePictureCardPreview"
:on-remove="handleRemove"
:before-upload="beforeAvatarUpload"
>
<i class="el-icon-plus"></i>
</el-upload>
<el-dialog :visible.sync="dialogVisible" size="tiny" :modal="false" :close-on-click-modal="false">
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="optFun('1')" size="mini">取 消</el-button>
<el-button type="primary" @click="optFun('2')" size="mini" :disabled="isRequestBack">确 定</el-button>
</div>
</el-dialog>
</template>
<script>
import { doUpload, getFilePath } from "../../utils/qiniu-util";
import { mapGetters } from "vuex";
import { openLoading, closeLoading } from "../../utils/utils";
import * as commonUtil from "../../utils/utils";
let vm = null;
export default {
data() {
return {
formLabelWidth:"80px",
form:{},
id:null,
dialogImageUrl:'',
max:60,
maxL:1000,
dialogVisible:false,
dialogFormVisible:false,
fileList:[],
title:'编辑话题',
reType: ['PUT','POST'],
isEdit:false,
objInfo:{
topic:{
subject:'',
content:''
},
images:[]
},
isRequestBack:false,
};
},
props:{
isShow:{
default:false,
type:Boolean
},
editInfo:{
default:()=>{},
type:Object
},
discussId:{
default:0,
type:Number
}
},
computed: {
...mapGetters(["_token", "idType"]),
},
created() {
this.dialogFormVisible = this.isShow
if(this.editInfo.topic){
this.isEdit = true;
this.objInfo = this.editInfo;
this.objInfo.topic.content = this.objInfo.topic.content.replace(/&nbsp;/g, " ");
}else{
this.title = '新增话题'
this.isEdit = false
}
console.log(this.editInfo);
if(this.objInfo.images.length > 0){
for(let i=0;i<this.objInfo.images.length;i++){
this.fileList.push({
url:this.objInfo.images[i].imageurl,
imageurl:this.objInfo.images[i].imageurl,
id:this.objInfo.images[i].id
})
}
}
},
// 挂载到Dom完成时
mounted: function() {
},
methods: {
handlePictureCardPreview(file){
//console.log(file)
this.dialogImageUrl = file.url;
this.dialogVisible = true;
},
selectImg(file){
//console.log(file)
this.fileList.push({
url:file.url,
imageurl:file.url,
})
},
beforeAvatarUpload(file){
//console.log(file)
let imgTypes = ['jpg','png','gif','jpeg']
if(file.type){
let fileType = file.type.split('/')[1];
if(imgTypes.indexOf(fileType) == -1){
this.showError('上传图片格式仅支持png、jpg、jpeg、gif ');
return false;
}
}else{
this.showError('上传图片格式仅支持png,jpg,jpeg,gif!');
return false;
}
// console.log(this.fileList)
if(this.fileList.length > 5 ){
// /、this.$message.info('图片个数不能超过6个')
this.showError('上传图片个数不能超过6个');
return false;
}
this.imgDoUpload(file, 4, 2048, 400, 400)
},
imgDoUpload(file, urlType, size, w, h) {
let vm = this;
const isSize = file.size / 1024 < size;
if (!isSize) {
//vm.$message.info('上传图片要小于' + size + 'k')
//vm.$message.info('上传图片要小于2M')
vm.showError('上传图片要小于2M');
return;
}
var _img = new FileReader()
_img.readAsDataURL(file)
_img.onload = function(theFile) {
let image = new Image()
image.src = theFile.target.result
image.onload = function() {
let _this = this
vm.$message.info('开始上传');
doUpload(vm, file, getFilePath(file, null), 'preview4', 'progress1', 1).then(function(path) {
//console.log(path)
vm.fileList.push({
url:path.fullPath,
imageurl:path.fullPath
})
vm.$message.success('上传成功')
}).catch((res)=>{
console.log(res)
});
}
}
},
handleRemove(file, fileList){
let index = null;
if(this.fileList.length>0){
for(let i=0;i<this.fileList.length;i++){
if(file.url == this.fileList[i].url){
index = i;
break;
}
}
if(index != null){
this.fileList.splice(index,1)
}
//console.log(file)
//console.log(this.fileList)
}
},
optFun(index){
if(index == 1){
this.dialogFormVisible = false;
this.$emit('setFun',false)
}else if(index == 2){
this.subFun()
}
},
//返回
goBack(){
this.$router.back(-1)
},
showError(str){
//console.log(str)
this.$message({
message: str,
type: 'warning'
});
},
//保存修改讨论组件详细
subFun(){
let A = this.isEdit ? this.reType[0] : this.reType[1];
let _this = this;
if(this.objInfo.topic.subject.length == 0){
this.showError('请输入主题!');
return;
}
// 加入话题内容识别宫格
let placeContent = this.objInfo.topic.content.replace(/ /gi,'&nbsp;');
let parm = {
topic:{
subject:this.objInfo.topic.subject,
// content:this.objInfo.topic.content,
content:placeContent,
discussid:this.objInfo.topic.discussid || this.discussId,
id:this.objInfo.topic.id || null,
official:true
},
images:this.fileList
}
this.isRequestBack = true;
this[A]('/interaction/topic/',parm).then((res) => {
if( res.code == '000000' ) {
this.$message({
message: '操作成功!',
type: 'success'
});
setTimeout(()=>{
this.isRequestBack = false;
this.$emit('setFun',true)
},2000)
}else{
this.isRequestBack = false;
this.$message({
message: res.message,
type: 'error'
});
}
}).catch(function (error) {
///console.log()
//_this.$message.error('接口异常请联系管理员');
});
}
}
};
</script>
<style lang="scss">
.topicOpt{
.el-form-item__content{
width:80%;
}
.el-upload--picture-card{
height: 80px;
width: 80px;
line-height: 80px;
}
.el-upload-list--picture-card .el-upload-list__item{
width: 80px;
height: 80px;
}
.el-form-item__label{
// line-height: 26px;
}
}
</style>
\ No newline at end of file
<template>
<div class="item-component-wrap">
<bread-crumb
:curmbFirst="curmbFirst"
:curmbSecond="curmbSecond">
</bread-crumb>
<div class="component-content screenSet" id="screenSet">
<div class="search-title">查询条件</div>
<el-row :gutter="30" class="row" type="flex" style="margin-top: 10px;">
<el-form ref="serchForm" :model="searchParam" label-width="75px" style="width:100%;">
<!-- <el-col :span="6">
<el-form-item label="话题名称:">
<el-input clearable v-model="searchParam.theme" size="mini" placeholder="请输入话题名称"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="创建日期:">
<el-date-picker v-model="searchParam.time" size="mini" type="date" placeholder="选择日期"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="创建人:">
<el-input clearable v-model="searchParam.name" size="mini" placeholder="请输入组件名称"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="最后修改人:">
<el-input clearable v-model="searchParam.name" size="mini" placeholder="请输入组件名称"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="状态:">
<el-select clearable v-model="searchParam.status" size="mini" placeholder="请选择发布状态">
<el-option
v-for="(item,index) in statuSelect"
:key="index"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col> -->
<el-col style="text-align:right;padding:0 30px 15px 0;">
<!-- <el-button type="primary" size="small" @click="search">查询</el-button>
<el-button type="default" size="small" @click="reseat">重置</el-button> -->
<el-button type="primary" size="small" @click="createTopic">新建话题</el-button>
</el-col>
</el-form>
</el-row>
<el-table
:data="tableData"
style="width: 100%" v-loading="loading">
<el-table-column type="index" prop="topOrder" label="排序" min-width="50" align="center"></el-table-column>
<el-table-column prop="id" label="Id" min-width="50" align="center"></el-table-column>
<el-table-column prop="subject" label="话题名称" min-width="100" align="center"></el-table-column>
<el-table-column prop="createdName" label="创建人" min-width="50" align="center"></el-table-column>
<el-table-column prop="createdtime" label="创建日期" min-width="100" align="center"></el-table-column>
<el-table-column prop="modifiedName" label="最后修改人" min-width="100" align="center"></el-table-column>
<el-table-column prop="modifiedName" label="话题来源" min-width="100" align="center">
<template slot-scope="scope">
<span>{{ scope.row.official ? '官方' : '用户'}}</span>
</template>
</el-table-column>
<el-table-column prop="modifiedtime" label="修改日期" min-width="100" align="center"></el-table-column>
<el-table-column prop="status" label="状态" min-width="80" align="center">
<template slot-scope="scope">
<span v-if="!scope.row.official">已发布</span>
<span v-else>{{ scope.row.releaseStatus == 1 ? '已发布' : '未发布'}}</span>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" min-width="200">
<template slot-scope="scope">
<el-button type="primary" size="small" @click="edit(scope.row)">编辑</el-button>
<el-button type="primary" v-if="!scope.row.official" size="small" @click="optFun(scope.row)" disabled>下线</el-button>
<el-button type="primary" v-if="scope.row.releaseStatus == 1 && scope.row.official" size="small" @click="optFun(scope.row)" >下线</el-button>
<el-button type="primary" v-if="scope.row.releaseStatus != 1 && scope.row.official" size="small" @click="optFun(scope.row)" >发布</el-button>
<el-button v-if="scope.row.toporder == 0" type="primary" size="small" @click="topicManage(scope.row,'置顶')">置顶</el-button>
<el-button v-else type="primary" size="small" @click="topicManage(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="pageNo"
:page-sizes="[15, 30, 50, 100, 200, 500, 700, 1000, 1500, 2000]"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows">
</el-pagination>
</div>
</div>
<AddEdit :isShow="isShow" v-on:setFun="getFun" v-if="isShow" :editInfo="editInfo" :discussId="discussId"></AddEdit>
</div>
</template>
<script>
import BreadCrumb from '../../components/breadcrumb.vue'
import { doUpload, getFilePath } from "../../utils/qiniu-util"
import { validateWord } from "../../utils/validate.js"
import { mapGetters } from 'vuex'
import { openLoading, closeLoading } from '../../utils/utils'
import * as commonUtil from '../../utils/utils'
import AddEdit from './add-edit.vue'
let vm = null
export default {
components: {
BreadCrumb,AddEdit
},
data() {
return {
curmbFirst: '组件',
curmbSecond: '讨论组件',
searchParam: {
theme:'',
type:'',
name:'',
status: '',
pageNo: 1,
pageSize: 15
},
category:[
{
value:'积木',
label:'积木'
}
],
statuSelect: [
{
label: '未发布',
value: '1'
},{
label: '已发布',
value: '2'
},{
label: '已下架',
value: '3'
}
],
tableData: [],
totalRows: 0,
loading:false,
isShow:false,
discussId:null,
pageNo:1,
pageSize:15,
editInfo:{},
}
},
computed: {
...mapGetters([
'_token',
'idType'
])
},
created() {
this.discussId = Number(this.$route.query.id)
this.getData()
//this.sun()
},
// 挂载到Dom完成时
mounted: function() {
commonUtil.resizeHeight()
},
methods: {
// 列表查询
search() {
this.getData()
},
getFun(obj){
console.log(obj)
this.isShow = false
if(obj){
this.getData()
}
},
//获取数据
getData(){
let _this = this;
this.loading = true;
let parm = {
discussId:this.discussId,
pageNo:this.pageNo,
pageSize:this.pageSize
}
this.GET('/interaction/topic/getTopicList',parm).then((res) => {
this.loading = false
if( res.code == '000000' ) {
this.tableData = res.data.topics || []
this.totalRows = res.data.count
}else{
this.$message({
message: res.message,
type: 'warning'
});
}
}).catch(function (error) {
console.log(error.message)
_this.$message.error(error.message);
_this.loading = false
});
},
// 重置
reseat() {
this.searchParam = Object.assign({},{
theme:'',
type:'',
name:'',
category:'',
status: '',
pageNo: 1,
pageSize: 15
})
this.getData()
},
// 新建组件
createTopic() {
this.editInfo = {}
this.isShow = true;
},
edit(item){
///topic/getTopicDetailsById
this.GET('/interaction/topic/getTopicDetailsById',{topicId: item.id}).then((res) => {
if(res.code == "000000") {
this.editInfo = res.data;
this.isShow = true;
}else{
this.$message({
message: res.message,
type: 'warning'
});
}
}).catch(function (error) {
// this.$message.error(error);
});
},
// 置顶
topicManage(item,str){
///topic/topicTop
let _this = this;
let status = 0;
if(str == '置顶'){
status = 1
}else if(str == '取消置顶'){
status = 2
}
this.$confirm('确定要'+str+'该讨论吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
_this.GET('/interaction/topic/topicTop',{topicId: item.id, topNum: status}).then((res) => {
if(res.code == "000000") {
_this.$message({
type: 'success',
message: '操作成功!'
});
_this.setTimeFun()
}
}).catch(function (error) {
// this.$message.error(error);
});
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
})
})
},
setTimeFun(){
setTimeout(()=>{
this.getData()
},2000)
},
// 发布、下线
optFun(row) {
let status = 0,str = '',_this = this,index = 0;
str = row.releaseStatus == 1 ? '下架' : '发布'
if(row.releaseStatus == 1){
index = 2
}else if(row.releaseStatus == 2){
index = 1
}
let parm = {
topic:{
id: row.id,
releaseStatus:index
}
}
this.$confirm('确定要'+str+'该话题吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
_this.PUT('/interaction/topic/updateRelease',parm).then((res) => {
if(res.code == "000000") {
_this.$message({
type: 'success',
message: '操作成功!'
});
_this.setTimeFun()
}
}).catch(function (error) {
// this.$message.error(error);
});
}).catch(() => {
_this.$message({
type: 'info',
message: '已取消'
})
})
},
handleSizeChange(value) {
this.pageSize = value
this.getData()
},
handleCurrentChange(value) {
this.pageNo = value
this.getData()
}
}
}
</script>
<style lang="scss">
.item-component-wrap {
.component-content {
padding: 10px;
background: #fff;
// margin: 84px 20px 20px;
.search-title {
padding: 10px 12px;
font-size: 12px;
color: #449284;
border-bottom: 1px solid #efefef;
}
.create-button {
padding: 0 0 15px;
margin-top: 0 !important;
text-align: right;
}
.table-empty {
img{
width: 100px;
}
p {
margin-top: -50px;
}
}
}
}
</style>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册