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

Merge branch 'release' into 'master'

Release

See merge request !32
无法预览此类型文件
......@@ -50,14 +50,14 @@ module.exports = {
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url',
query: {
limit: 10000,
limit: 50000,
name: utils.assetsPath('img/[name].[ext]')
}
}, {
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url',
query: {
limit: 10000,
limit: 50000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
}
}]
......
......@@ -10,7 +10,7 @@ module.exports = {
index: path.resolve(__dirname, '../dist/index.html'),
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: './static',
assetsPublicPath: './',
assetsPublicPath: '/consultation/',
productionSourceMap: false,
// Surge or Netlify already gzip all static assets for you.
// Before setting to `true`, make sure to:
......
......@@ -14,6 +14,7 @@
<div id="app">
<router-view></router-view>
</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>
</html>
此差异已折叠。
无法预览此类型文件
<template>
<div>
<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>
<div class="content" id="body-content">
<transition name="router-fade" mode="out-in">
......@@ -18,105 +18,117 @@
</div>
</template>
<script>
import VHeader from './views/layout/header.vue'
import VSlidebar from './views/layout/slidebar.vue'
import VFooter from './views/layout/footer.vue'
import { base64decode, isNotEmptyUtils, getUrlParamsMap, ssoLogin } from "./utils/utils.js"
import { mapActions, mapGetters } from 'vuex'
import { getLoginUrl, getInnerLoginUrl } from './utils/index.js'
let vm = null
import VHeader from "./views/layout/header.vue";
import VSlidebar from "./views/layout/slidebar.vue";
import VFooter from "./views/layout/footer.vue";
import {
base64decode,
isNotEmptyUtils,
getUrlParamsMap,
ssoLogin
} from "./utils/utils.js";
import { mapActions, mapGetters } from "vuex";
import { getLoginUrl, getInnerLoginUrl } from "./utils/index.js";
let vm = null;
export default {
components:{
components: {
VHeader,
VSlidebar,
VFooter
},
data() {
return {
idType: 0,
token: '',
userName: '',
authList: []
}
token: "",
userName: "",
authList: [],
systemType: 0,
};
},
computed:{
...mapGetters([
'_token'
])
computed: {
...mapGetters(["_token"])
},
created() {
vm = this
vm.getToken()
},
mounted() {
vm = this;
vm.getToken();
},
mounted() {},
methods: {
// 解密token
getToken() {
let href = window.location.href
let offset = href.indexOf("?")
//localStorage.setItem('storageToken','CBC0F7B0C9D34806958B18E23C881A09')
if(offset !== -1) {
let paramStr = href.substring(offset + 1, href.length)
let pars = base64decode(paramStr)
let paramMap = getUrlParamsMap(pars, "&")
if (isNotEmptyUtils(paramMap["token"]) && isNotEmptyUtils(paramMap["ssoOrigin"])) {
vm.token = paramMap["token"]
localStorage.setItem('storageToken', vm.token)
ssoLogin(href, paramMap)
let href = window.location.href;
let offset = href.indexOf("?");
// localStorage.setItem('token','475DB3D057AD489D81FE4E4DAB747B08')
if (offset !== -1) {
let paramStr = href.substring(offset + 1, href.length);
let pars = base64decode(paramStr);
let paramMap = getUrlParamsMap(pars, "&");
if (
isNotEmptyUtils(paramMap["token"]) &&
isNotEmptyUtils(paramMap["ssoOrigin"])
) {
vm.token = paramMap["token"];
localStorage.setItem("token", vm.token);
ssoLogin(href, paramMap);
//vm.$router.push({ path: 'home' })
} else {
if(!localStorage.getItem('storageToken')) {
window.location.href = getInnerLoginUrl() // 没有token返回登录页面
return
if (!localStorage.getItem("token")) {
window.location.href = getInnerLoginUrl(); // 没有token返回登录页面
return;
}
}
}else {
if(!localStorage.getItem('storageToken')) {
window.location.href = getInnerLoginUrl() // 没有token返回登录页面
return
} else {
if (!localStorage.getItem("token")) {
window.location.href = getInnerLoginUrl(); // 没有token返回登录页面
return;
}
}
vm.changeToken(vm.token)
vm.getUserAuth()
vm.changeToken(vm.token);
vm.getUserAuth();
},
// 修改token
...mapActions([
'changeToken',
'changeIdType'
]),
...mapActions(["changeToken"]),
// 获取用户权限
getUserAuth(token) {
let req = null
let req = null;
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) => {
if(res.code == '000000') {
vm.userName = res.data.userName
vm.authList = res.data.systemInfoList
this.systemType = systemType;
this.showSlidebar = true;
vm.userName = res.data.userName;
vm.authList = authList;
}
})
});
}
}
}
};
</script>
<style lang="scss">
// @import './style/common';
@import './style/global';
@import './style/mixin.scss';
.router-fade-enter-active, .router-fade-leave-active {
transition: opacity .1s;
}
.router-fade-enter, .router-fade-leave-active {
// @import './style/common';
@import "./style/global";
@import "./style/mixin.scss";
.router-fade-enter-active,
.router-fade-leave-active {
transition: opacity 0.1s;
}
.router-fade-enter,
.router-fade-leave-active {
opacity: 0;
}
.el-container {
}
.el-container {
margin-left: 255px;
overflow: hidden;
.content {
background: #F0F2F5;
background: #f0f2f5;
position: absolute;
left: 255px;
right: 0;
......@@ -126,5 +138,5 @@ export default {
box-sizing: border-box;
overflow-y: scroll;
}
}
}
</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>
<div class="bread-crumb">
<el-breadcrumb separator="/">
<el-breadcrumb-item>{{curmbFirst}}</el-breadcrumb-item>
<el-breadcrumb-item v-if="curmbSecond" :to="{ path: jumPathThird }">{{curmbSecond}}</el-breadcrumb-item>
<el-breadcrumb-item :to="{ path: jumPathThird }">{{curmbFirst}}</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>
</div>
......@@ -25,7 +25,7 @@ export default {
}
}
</script>
<style lang="scss">
<style lang="scss" scoped>
.bread-crumb {
position: fixed;
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="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>
{{ 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'
import routes from './router/router'
import store from './store/'
const mixins = require('@/utils/mixins');
import FastClick from 'fastclick'
import vueFilters from '@/utils/filter'
// 引入ElementUI
import ElementUI from 'element-ui'
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.use(Logger, { prefix: new Date(), isDev: process.env.NODE_ENV === 'development', cLevel: 'debug' })
Vue.use(ElementUI)
......@@ -22,11 +31,6 @@ for(let key in vueFilters) {
Vue.filter(key, vueFilters[key])
}
if ('addEventListener' in document) {
document.addEventListener('DOMContentLoaded', function() {
FastClick.attach(document.body);
}, false);
}
Vue.use(VueRouter)
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({
...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
此差异已折叠。
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 discuss = r => require.ensure([], () => r(require('../views/discuss/index.vue')), 'index')
const creatDiscuss = r => require.ensure([], () => r(require('../views/discuss/add-edit.vue')), 'creatDiscuss')
const questionNaire = r => require.ensure([], () => r(require('../views/question-naire/question-list.vue')), 'questionNaire')
const topicList = r => require.ensure([], () => r(require('../views/topicManage/index.vue')), 'topicList')
const reportSet = r => require.ensure([], () => r(require('../views/report/reportSet.vue')), 'reportSet')
// 问诊订单管理
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 serviceList = r => require.ensure([], () => r(require('../views/IM/diagnosis-admin/service-list.vue')), 'serviceList')
const assistList = r => require.ensure([], () => r(require('../views/IM/diagnosis-admin/assist-list.vue')), 'assistList')
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 downList = r => require.ensure([], () => r(require('../views/IM/diagnosis-admin/down-list.vue')), 'downList')
const operation= r => require.ensure([], () => r(require('../views/IM/diagnosis-admin/operation.vue')), 'downList')
export default [{
path: '/',
component: App,
mode: 'history',
children: [
{
path: '',
redirect: '/home'
},{
path: '/questionNaire',
component: questionNaire
redirect: '/diagnosis-list'
}, {
path: '/diagnosis-list',
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',
component: home
},
{
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
},
path: '/operation',
component: operation
}
]
}]
import education from './education/getters'
import education from './im/getters'
import { containObject } from '../utils/utils'
......
const common = {
state: {
_token: '',
idType: ''
isFromAssignTask: false,
time:null,
},
mutations: {
CHANGE_TOKEN: (state, data) => {
state._token = data
},
CHANGE_IDTYPE: (state, data) => {
state.idType = data
SET_IS_FROM_ASSIGN_TASK: (state, status) => {
state.isFromAssignTask = status;
},
SET_TIME(state,data){
state.time = data
}
},
actions: {
changeToken({ commit }, tokenData) {
commit('CHANGE_TOKEN', tokenData)
},
changeIdType({ commit }, idTypeData) {
commit('CHANGE_IDTYPE', idTypeData)
}
changeTime({ commit }, time) {
commit('SET_TIME', tokenData)
},
}
}
......
const getters = {
_token: state => state.common._token,
idType: state => state.common.idType
isFromAssignTask: state => state.common.isFromAssignTask,
time:state => state.common.time,
}
export default getters
import Vue from 'vue'
import Vuex from 'vuex'
import common from './education/common'
import common from './im/common'
import getters from './getters'
......
......@@ -26,29 +26,31 @@ body, div, span, header, footer, nav, section, aside, article, ul, dl, dt, dd, l
}
}
/*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/
::-webkit-scrollbar
{
width: 0px;
height: 0px;
background-color: #fff;
}
// ::-webkit-scrollbar
// {
// width: 0px;
// height: 0px;
// background-color: #fff;
// }
/*定义滚动条轨道 内阴影+圆角*/
::-webkit-scrollbar-track
{
-webkit-box-shadow: inset 0 0 1px rgba(0,0,0,0);
border-radius: 10px;
background-color: #fff;
}
// ::-webkit-scrollbar-track
// {
// -webkit-box-shadow: inset 0 0 1px rgba(0,0,0,0);
// border-radius: 10px;
// background-color: #fff;
// }
/*定义滑块 内阴影+圆角*/
::-webkit-scrollbar-thumb
{
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
background-color: #555;
}
// ::-webkit-scrollbar-thumb
// {
// border-radius: 10px;
// -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
// background-color: #555;
// }
input[type="button"], input[type="submit"], input[type="search"], input[type="reset"] {
-webkit-appearance: none;
......@@ -121,12 +123,12 @@ html,body{
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{
// width: 163vh !important;
// height: 66vh !important;
// height: 430px !important;
margin: 88px 30px 0px;
margin: 20px 30px 0px;
overflow: auto;
}
}
......@@ -136,7 +138,7 @@ html,body{
// height: 78vh !important;
// height: 800px !important;
overflow: auto;
margin: 88px 30px 0px;
margin: 20px 30px 0px;
}
}
......@@ -199,30 +201,30 @@ html,body{
.el-button--primary {
line-height: 40px;
background: #449284 !important;
border: 1px solid #449284 !important;
background: #0D9078 !important;
border: 1px solid #0D9078 !important;
}
.el-button.is-disabled {
background: #449284 !important;
border: 1px solid #449284 !important;
background: #0D9078 !important;
border: 1px solid #0D9078 !important;
opacity: 0.5;
}
.el-pagination.is-background .el-pager li:not(.disabled).active {
background: #449284 !important;
background: #0D9078 !important;
}
// 主题样式修改
.el-radio__input.is-checked .el-radio__inner {
border-color: #449284 !important;
background: #449284 !important;
border-color: #0D9078 !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{
color: #449284 !important;
color: #0D9078 !important;
}
.el-checkbox__input.is-checked .el-checkbox__inner, .el-checkbox__input.is-indeterminate .el-checkbox__inner{
border-color: #449284 !important;
background: #449284 !important;
border-color: #0D9078 !important;
background: #0D9078 !important;
}
// 面包屑导航
......@@ -230,5 +232,38 @@ html,body{
font-weight: 300 !important;
}
.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 @@
}
.button-green {
color: #ffffff;
background: #449284;
background: #0D9078;
border-color: #bfdad5;
border-radius: 2px;
}
......@@ -120,3 +120,17 @@
border-color: #ecedf1;
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;
}
}
此差异已折叠。
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 @@
*/
export const envConfig = {
development: {
// baseUrl: 'https://dev-sc.yunqueyi.com/',
baseUrl: 'https://dev-sc.yunqueyi.com',
// // baseUrl: 'http://10.177.15.180:10202/',
// // baseUrl: 'http://192.168.140.14:10201/',
// baseUrl: 'https://test1-sc.yunqueyi.com/',
//baseUrl: 'https://uat-sc.yunqueyi.com/',
baseUrl: 'https://uat-sc.yunqueyi.com',
// baseUrl: 'https://test1-sc.yunqueyi.com',
// baseUrl: 'https://uat-sc.yunqueyi.com',
qiniuFileUrl: "https://dev-sc.yunqueyi.com/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://test1-videos.yunqueyi.com",
qiniuImgUrl: "https://test1-file.yunqueyi.com",
loginUrl: 'https://dev-saas.yunqueyi.com/pica-login/work_station.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',
yuequeyiIndexUrl: 'https://dev-saas.yunqueyi.com/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',
phomeDemain: 'https://dev-phome.yunqueyi.com',
picakfAccId: 'picaop_dev',
},
dev: {
baseUrl: 'https://dev-sc.yunqueyi.com',
......@@ -25,8 +27,10 @@ export const envConfig = {
qiniuResourceUrl: "https://test1-videos.yunqueyi.com",
qiniuImgUrl: "https://test1-file.yunqueyi.com",
loginUrl: 'https://dev-saas.yunqueyi.com/pica-login/work_station.html',
innerLoginUrl: 'https://dev-sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html',
yuequeyiIndexUrl: 'https://dev-saas.yunqueyi.com/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',
phomeDemain: 'https://dev-phome.yunqueyi.com',
picakfAccId: 'picaop_dev',
},
test: {
baseUrl: 'https://test1-sc.yunqueyi.com',
......@@ -34,8 +38,10 @@ export const envConfig = {
qiniuResourceUrl: "https://test1-videos.yunqueyi.com",
qiniuImgUrl: "https://test1-file.yunqueyi.com",
loginUrl: 'https://test1.yunqueyi.com/pica-login/work_station.html',
innerLoginUrl: 'https://test1-sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html',
yuequeyiIndexUrl: 'https://test1.yunqueyi.com/pica_index.html'
innerLoginUrl: 'https://test1-sso.yunqueyi.com/PICA_SSO_FE/html/pica_login.html',
yuequeyiIndexUrl: 'https://test1.yunqueyi.com/pica_index.html',
phomeDemain: 'https://test1-phome.yunqueyi.com',
picakfAccId: 'picaop_test',
},
uat: {
baseUrl: 'https://uat-sc.yunqueyi.com',
......@@ -45,8 +51,10 @@ export const envConfig = {
qiniuImgUrl: "https://test1-file.yunqueyi.com",
qiniuResourceUrl: "https://test1-videos.yunqueyi.com",
loginUrl: 'https://uat.yunqueyi.com/pica-login/work_station.html',
innerLoginUrl: 'https://uat-sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html',
yuequeyiIndexUrl: 'https://uat.yunqueyi.com/pica_index.html'
innerLoginUrl: 'https://uat-sso.yunqueyi.com/PICA_SSO_FE/html/pica_login.html',
yuequeyiIndexUrl: 'https://uat.yunqueyi.com/pica_index.html',
phomeDemain: 'https://uat-phome.yunqueyi.com',
picakfAccId: 'picaop_uat',
},
pro: {
baseUrl: 'https://sc.yunqueyi.com',
......@@ -54,7 +62,9 @@ export const envConfig = {
qiniuResourceUrl: "https://video.yunqueyi.com",
qiniuImgUrl: "https://files.yunqueyi.com",
loginUrl: 'https://yunqueyi.com/pica-login/work_station.html',
innerLoginUrl: 'https://sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html',
yuequeyiIndexUrl: 'https://www.yunqueyi.com/pica_index.html'
innerLoginUrl: 'https://sso.yunqueyi.com/PICA_SSO_FE/html/pica_login.html',
yuequeyiIndexUrl: 'https://www.yunqueyi.com/pica_index.html',
phomeDemain: 'https://phome.yunqueyi.com',
picakfAccId: 'picaop',
}
}
......@@ -3,6 +3,7 @@ import store from '../store'
// import { getHostnameAndPort } from '../utils'
// axios.defaults.withCredentials = true
// 创建axios实例对象
const service = axios.create({
// baseURL: process.env.BASE_API
timeout: 600000,
......@@ -12,8 +13,13 @@ const service = axios.create({
// request拦截器
service.interceptors.request.use(config => {
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' })
Object.assign(config.headers, config.changeHeader)
if (config.fileHeader) {
config.headers['Content-Type'] = 'application/x-www-form-urlencoded'
}
// if (config.data && config.data.setEntry) {
// config.headers['sysCode'] = config.data.sysCode || 10
// if(config.data.token){
......@@ -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' })
// }
return config
}, error => {
// logger.debug('service.interceptors.request: ', error)
Promise.reject(error)
})
......@@ -43,8 +49,6 @@ service.interceptors.response.use(
//}
},
error => {
// logger.error('err' + error)
return Promise.reject(error)
}
)
......
const vueFilter = {
liveDateFilter: (value) => {
if (!value) return '';
return new Date(value).format("yyyy-MM-dd hh:mm:ss");
priceFilter: value => {
if(!value) return 0;
if(value) {
return (value / 100) + '元'
}
},
liveFilter: (value) => {
if(value.liveStatus == 1){
return '未开始'
} else if(value.liveStatus == 5) {
return '直播中'
}else if(value.liveStatus == 10 && value.lookBackStatus == 2){
return '已结束(不可回看)'
}else if(value.liveStatus == 10 && value.lookBackStatus == 1) {
return '已结束(可回看)'
statusFilter: (value) => {
if(value == 1) {
return '下架'
}else if(value == 2) {
return '上架'
}
},
liveStatusFilter: (value) => {
if(value == 1) return "隐藏"
else return "发布"
rounding (value) {
if(value != "" && value != null && value != "null"){
return value.toFixed(2);
}
else if(value == 0){
return value.toFixed(2);
}
else {
return value;
}
},
liveTeacherType: (value) => {
let doctorName = []
if(value.length > 3) {
for(let i = 0; i < 3; i++) {
doctorName.push(value[i].doctorName)
priceNum (value) {
if(value != "" && value != null && value != "null"){
return (value/100).toFixed(2);
}
return doctorName.join("、") + '...'
}else{
for(let i = 0; i < value.length; i++) {
doctorName.push(value[i].doctorName)
else if(value == 0){
return (value/100).toFixed(2);
}
return doctorName.join("、")
else {
return value;
}
},
controlType: (value) => {
diagnosisTypeFilter: (value) => {
if(value == 1) {
return '分页1'
return '音频'
}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 '视频'
}
},
refreshType: (value) => {
if(value == 1) return "支持"
else return "不支持"
},
moudleType: (value) => {
if(value == 1) return "未激活"
else return "激活"
},
dateFilter: (value) => {
liveDateFilter: (value) => {
if (!value) return '';
return new Date(value).format("yyyy-MM-dd hh:mm");
},
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 "已发布"
return new Date(value).format("yyyy-MM-dd hh:mm:ss");
},
moduleTypeFilter: (value,data) => { // 模块类型
for(let key in data) {
if(value == key) {
return data[key]
}
continueTimesFilter: (value, flag) => {
if (!value) return '';
var duration = value / 1000;
var s = Math.floor(duration % 60).toString();
if (s.length < 2) {
s = '0' + s;
}
},
contentCreatedType: (value,data) => {
for(let i = 0; i< data.length;i++) {
if(value == data[i].id) {
return data[i].name
var m = Math.floor((duration % 3600) / 60).toString();
if (m.length < 2) {
m = '0' + m;
}
var h = Math.floor(duration / 60 / 60).toString();
if (h.length < 2) {
h = '0' + h;
}
},
contentModifiedType: (value,data) => {
for(var i=0; i < data.length;i++) {
if(value == data[i].id) {
return data[i].name
if (flag) {
return h + ':' + m + ':' + s;
} else {
if (parseInt(h) >= 1) {
return h + '时' + m + '分' + s + '秒';
} else {
return m + '分' + s + '秒';
}
}
},
columnPositionType: (value,data) => { // 位置
for(let key in data) {
if(value == key) {
return data[key]
liveTeacherType: (value) => {
let doctorName = []
if (value.length > 3) {
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)
}
},
// 项目组件
statusFileter: (value) => {
if(value == 1) {
return '草稿'
}else if(value == 2) {
return '未启用'
}else if(value == 3) {
return '已启用'
}else {
return '已禁用'
return doctorName.join("、")
}
},
//项目管理
statusProject: (value) => {
if(value == 1) {
return '草稿'
}else if(value == 2) {
return '未上架'
}else if(value == 3) {
return '审批中'
}else if(value == 4) {
return '已上架'
}else if(value == 5) {
return '已下架'
}else {
return '已拒绝'
}
dateFilter: (value) => {
if (!value) return '';
return new Date(value).format("yyyy-MM-dd hh:mm");
},
projeceRoleType: (value) => {
if(value == "L1") {
return '内部管理员'
}else if(value == "L2") {
return '项目负责人'
}else if(value == "L3") {
return '次级负责人'
} else if(value == "L4") {
return '普通用户'
moduleTypeFilter: (value, data) => { // 模块类型
for (let key in data) {
if (value == key) {
return data[key]
}
},
// 问卷
questionStatus: (value) => {
if(value == 1) {
return '下线'
}else {
return '上线'
}
},
modifyType: (value,data) => {
let userName = ''
for(let i=0; i < data.length;i++) {
if(value == data[i].id) {
userName = data[i].userName
break
}else {
userName = ''
}
}
return userName
// 时间处理
timeFormat: (value) => {
let cTime = new Date().getTime();
// var $time = document.getElementById("share-time");
// var date = $time.innerHTML.trim();
var tt = new Date(parseInt(value));
var days = parseInt((cTime - value) / 86400000);
var today = new Date().getDate();
var year = tt.getFullYear();
var mouth = tt.getMonth() + 1;
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
......@@ -42,36 +42,10 @@ function getUrlParmByCode(paramList) {
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) {
return document.getElementById(elmId)
}
export function deepCopy(obj) {
var result = Array.isArray(obj) ? [] : {};
for (var key in obj) {
......@@ -168,6 +142,7 @@ export function getYunQueYiUrl() {
export function uploadVideo() {
return getConfigByEnvType('qiniuResourceUrl')
}
export function uploadImg() {
return getConfigByEnvType('qiniuImgUrl')
}
......@@ -177,3 +152,27 @@ function getConfigByEnvType(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;
}
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册