提交 4950eb8f 编写于 作者: 张磊's avatar 张磊

Merge branch 'feat/zl' into 'release'

Feat/zl

See merge request !263
......@@ -316,4 +316,4 @@ export const savePCDayCount = async (data) => {
data: data,
method: 'post',
});
};
\ No newline at end of file
};
......@@ -649,7 +649,6 @@
that.memberList &&
that.memberList.length > 0
) {
that.memberList.map((i) => {
console.log('res==---', l, i.id, l.includes(i.id));
if (l.includes(i.id)) {
......@@ -666,14 +665,12 @@
}
}
});
}else {
if( that.memberList &&
that.memberList.length > 0) {
that.memberList.map( i => {
} else {
if (that.memberList && that.memberList.length > 0) {
that.memberList.map((i) => {
that.removeMember(i.liveUserId);
});
}
}
});
}, 2000);
......
......@@ -295,7 +295,7 @@
font-weight: 400;
color: #666666;
border-radius: 9px;
border: 1px solid #D9D9D9;
border: 1px solid #d9d9d9;
margin-right: 8px;
}
.info-phone {
......
此差异已折叠。
// api路径
import {isNotEmptyUtils} from './utils';
/* eslint-disable */
import { isNotEmptyUtils } from './utils';
export default async(url = '', data = {}, type = 'POST', method = 'fetch') => {
type = type.toUpperCase();
export default async (url = '', data = {}, type = 'POST', method = 'fetch') => {
type = type.toUpperCase();
// url = (server==='WECHAT'?wechatUrl:baseUrl) + url;
if (url.match('^http') == null) {
url = localStorage.getItem('Url') + url;
}
// url = (server==='WECHAT'?wechatUrl:baseUrl) + url;
if (url.match('^http') == null) {
url = localStorage.getItem('Url') + url;
}
console.log('完整url:', url);
if (type == 'GET' && data) {
let dataStr = ''; // 数据拼接字符串
Object.keys(data).forEach(key => {
dataStr += key + '=' + data[key] + '&';
});
console.log('完整url:', url);
if (type == 'GET' && data) {
let dataStr = ''; // 数据拼接字符串
Object.keys(data).forEach((key) => {
dataStr += key + '=' + data[key] + '&';
});
if (dataStr !== '') {
dataStr = dataStr.substr(0, dataStr.lastIndexOf('&'));
url = url + '?' + dataStr;
// url = encodeURI(url + '?' + dataStr, true);
}
}
if (dataStr !== '') {
dataStr = dataStr.substr(0, dataStr.lastIndexOf('&'));
url = url + '?' + dataStr;
// url = encodeURI(url + '?' + dataStr, true);
}
}
if (window.fetch && method == 'fetch') {
const requestConfig = {
credentials: 'include',
method: type,
// mode: "cors",
headers: {
// 'Access-Control-Allow-Origin': '*',
'Accept': '*',
'Content-Type': 'application/json',
'sysCode':'2'
// 'token': localStorage.getItem('token') || null, //固定传header:
// 'system_code': 'todo' //固定传header:系统编号
},
};
if (window.fetch && method == 'fetch') {
const requestConfig = {
credentials: 'include',
method: type,
// mode: "cors",
headers: {
// 'Access-Control-Allow-Origin': '*',
Accept: '*',
'Content-Type': 'application/json',
sysCode: '2',
// 'token': localStorage.getItem('token') || null, //固定传header:
// 'system_code': 'todo' //固定传header:系统编号
},
};
if (type == 'POST' || type === 'PUT' || type === 'PATCH' || type === 'DELETE' && data) {
Object.defineProperty(requestConfig, 'body', {
value: JSON.stringify(data)
});
}
try {
const response = await fetch(url, requestConfig);
const responseJson = await response.json();
if (
type == 'POST' ||
type === 'PUT' ||
type === 'PATCH' ||
(type === 'DELETE' && data)
) {
Object.defineProperty(requestConfig, 'body', {
value: JSON.stringify(data),
});
}
try {
const response = await fetch(url, requestConfig);
const responseJson = await response.json();
return responseJson;
} catch (error) {
throw new Error(error);
}
} else {
return new Promise((resolve, reject) => {
let requestObj;
if (window.XMLHttpRequest) {
requestObj = new XMLHttpRequest();
} else {
requestObj = new ActiveXObject();
}
return responseJson;
} catch (error) {
throw new Error(error);
}
} else {
return new Promise((resolve, reject) => {
let requestObj;
if (window.XMLHttpRequest) {
requestObj = new XMLHttpRequest();
} else {
requestObj = new ActiveXObject();
}
let sendData = '';
if (type == 'POST' || type == 'DELETE' || type == 'PUT') {
sendData = JSON.stringify(data);
}
let sendData = '';
if (type == 'POST' || type == 'DELETE' || type == 'PUT') {
sendData = JSON.stringify(data);
}
requestObj.open(type, url, true);
requestObj.setRequestHeader('Content-Type', 'application/json');
requestObj.send(sendData);
requestObj.open(type, url, true);
requestObj.setRequestHeader('Content-Type', 'application/json');
requestObj.send(sendData);
requestObj.onreadystatechange = () => {
if (requestObj.readyState == 4) {
if (requestObj.status == 200) {
let obj = requestObj.response;
if (typeof obj !== 'object' && isNotEmptyUtils(obj)) {
obj = JSON.parse(obj);
}
resolve(obj);
} else {
reject(requestObj);
}
}
};
});
}
requestObj.onreadystatechange = () => {
if (requestObj.readyState == 4) {
if (requestObj.status == 200) {
let obj = requestObj.response;
if (typeof obj !== 'object' && isNotEmptyUtils(obj)) {
obj = JSON.parse(obj);
}
resolve(obj);
} else {
reject(requestObj);
}
}
};
});
}
};
import axios from 'axios';
import store from '../store';
// import { getHostnameAndPort } from '../utils'
// axios.defaults.withCredentials = true
......@@ -7,48 +6,45 @@ import store from '../store';
const service = axios.create({
// baseURL: process.env.BASE_API
timeout: 600000,
withCredentials: false
withCredentials: false,
});
// request拦截器
service.interceptors.request.use(config => {
config.headers['sysCode'] = 26;
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';
service.interceptors.request.use(
(config) => {
config.headers['sysCode'] = 26;
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';
}
return config;
},
(error) => {
Promise.reject(error);
}
// if (config.data && config.data.setEntry) {
// config.headers['sysCode'] = config.data.sysCode || 10
// if(config.data.token){
// config.headers['token'] = config.data.token || '63C3FA92AF8A45A48B31EB7FD97B95EB'
// }
// 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 => {
Promise.reject(error);
});
);
// respone拦截器
service.interceptors.response.use(
response => {
const res = response.data;
/*
baseUrl时,返回000000为成功
apiUrl时,返回200为成功
*/
// if (res.code !== '000000') {
// return Promise.reject(response.data)
// } else {
return response.data;
// }
(response) => {
return response.data;
},
error => {
(error) => {
return Promise.reject(error);
}
);
......
/**
* Created by Anndy Yang on 18/09/18.
*/
/* eslint-disable */
import { envConfig } from '@/utils/env-config';
export function setEventByModuleCode(itemData) {
const modeCode = itemData.appModuleInfo.code || '';
let paramList = itemData.appModuleInfo.paramList ? itemData.appModuleInfo.paramList : '';
if (modeCode === 'M001' || modeCode === 'M002' || modeCode === 'M003') {
paramList = '';
} else if (modeCode === 'M100' || modeCode === 'M300') {
const urlPara = getUrlParmByCode(paramList);
paramList[0] && (paramList[0].value += urlPara);
} else if (modeCode === 'M400') {
}
if (typeof paramList === 'string' && !paramList) {
paramList = [];
}
return paramList;
const modeCode = itemData.appModuleInfo.code || '';
let paramList = itemData.appModuleInfo.paramList
? itemData.appModuleInfo.paramList
: '';
if (modeCode === 'M001' || modeCode === 'M002' || modeCode === 'M003') {
paramList = '';
} else if (modeCode === 'M100' || modeCode === 'M300') {
const urlPara = getUrlParmByCode(paramList);
paramList[0] && (paramList[0].value += urlPara);
} else if (modeCode === 'M400') {
}
if (typeof paramList === 'string' && !paramList) {
paramList = [];
}
return paramList;
}
function getUrlParmByCode(paramList) {
if (paramList.length <= 1) {
return '';
}
let dataStr = '';
const list = [];
for (let i = 1; i < paramList.length; i++) {
list.push(paramList[i].key + '=' + paramList[i].value);
}
dataStr = list.join('&');
if (dataStr !== '') {
return '?' + dataStr;
}
if (paramList.length <= 1) {
return '';
}
let dataStr = '';
const list = [];
for (let i = 1; i < paramList.length; i++) {
list.push(paramList[i].key + '=' + paramList[i].value);
}
dataStr = list.join('&');
if (dataStr !== '') {
return '?' + dataStr;
}
return '';
}
export function p_getElm(elmId) {
return document.getElementById(elmId);
return document.getElementById(elmId);
}
export function deepCopy(obj) {
var result = Array.isArray(obj) ? [] : {};
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) {
if (typeof obj[key] === 'object') {
result[key] = deepCopy(obj[key]); // 递归复制
} else {
result[key] = obj[key];
}
}
var result = Array.isArray(obj) ? [] : {};
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) {
if (typeof obj[key] === 'object') {
result[key] = deepCopy(obj[key]); // 递归复制
} else {
result[key] = obj[key];
}
}
return result;
}
return result;
}
/**
*
*
* @param {Array} originData 初始数据
* @param {Boolean} isUp true: 升序 false: 降序
* @param {String} sortField 排序字段,如果没有,则直接排序
* @param {Function} converFun 字段对应的数值转换函数
*/
export function arraySort(originData, isUp = true, sortedField, converFun) {
// debugger
const sortedData = originData.slice();
let swap, sourceA, sourceB;
for (let i = 0; i < sortedData.length - 1; i++) {
for (let j = 0; j < sortedData.length - i - 1; j++) {
sourceA = sortedData[j];
sourceB = sortedData[j + 1];
if (sortedField && !converFun) {
sourceA = sourceA[sortedField];
sourceB = sourceB[sortedField];
} else if (sortedField && converFun && typeof converFun === 'function') {
if (!sourceA[sortedField] || !sourceB[sortedField]) {
sourceA = 0;
sourceB = 0;
} else {
sourceA = converFun(sourceA[sortedField]);
sourceB = converFun(sourceB[sortedField]);
}
}
// if(!sourceA || !sourceB) {
// sourceA = 0
// sourceB = 0
// }
if (isUp) {
if ((sourceA - 0) > (sourceB - 0)) {
swap = sortedData[j];
sortedData[j] = sortedData[j + 1];
sortedData[j + 1] = swap;
}
} else {
if ((sourceA - 0) < (sourceB - 0)) {
swap = sortedData[j];
sortedData[j] = sortedData[j + 1];
sortedData[j + 1] = swap;
}
}
// debugger
const sortedData = originData.slice();
let swap, sourceA, sourceB;
for (let i = 0; i < sortedData.length - 1; i++) {
for (let j = 0; j < sortedData.length - i - 1; j++) {
sourceA = sortedData[j];
sourceB = sortedData[j + 1];
if (sortedField && !converFun) {
sourceA = sourceA[sortedField];
sourceB = sourceB[sortedField];
} else if (sortedField && converFun && typeof converFun === 'function') {
if (!sourceA[sortedField] || !sourceB[sortedField]) {
sourceA = 0;
sourceB = 0;
} else {
sourceA = converFun(sourceA[sortedField]);
sourceB = converFun(sourceB[sortedField]);
}
}
if (isUp) {
if (sourceA - 0 > sourceB - 0) {
swap = sortedData[j];
sortedData[j] = sortedData[j + 1];
sortedData[j + 1] = swap;
}
} else {
if (sourceA - 0 < sourceB - 0) {
swap = sortedData[j];
sortedData[j] = sortedData[j + 1];
sortedData[j + 1] = swap;
}
}
}
return sortedData;
}
return sortedData;
}
export function sortParmData(originData, orderCol) {
return originData.sort((a, b) => {
return (a[orderCol] - b[orderCol]) * -1;
});
return originData.sort((a, b) => {
return (a[orderCol] - b[orderCol]) * -1;
});
}
// 获取SC服务器域名地址
export function getBaseUrl(url) {
return getConfigByEnvType('baseUrl') + url;
return getConfigByEnvType('baseUrl') + url;
}
// 获取七牛token
export function getQiniuToken1() {
return getConfigByEnvType('qiniuFileUrl');
return getConfigByEnvType('qiniuFileUrl');
}
// 登录URL
export function getLoginUrl() {
return getConfigByEnvType('loginUrl');
return getConfigByEnvType('loginUrl');
}
export function getInnerLoginUrl() {
return getConfigByEnvType('innerLoginUrl');
return getConfigByEnvType('innerLoginUrl');
}
// 云鹊医首页
export function getYunQueYiUrl() {
return getConfigByEnvType('yuequeyiIndexUrl');
return getConfigByEnvType('yuequeyiIndexUrl');
}
// 七牛上传视频和图片
export function uploadVideo() {
return getConfigByEnvType('qiniuResourceUrl');
return getConfigByEnvType('qiniuResourceUrl');
}
export function uploadImg() {
return getConfigByEnvType('qiniuImgUrl');
return getConfigByEnvType('qiniuImgUrl');
}
// 根据不同环境,生成URL
function getConfigByEnvType(urlType) {
return envConfig[process.env.VUE_APP_ENV][urlType];
return envConfig[process.env.VUE_APP_ENV][urlType];
}
// 获取客服的云信ID
export function getPicaKFAccid() {
return getConfigByEnvType('picakfAccId');
return getConfigByEnvType('picakfAccId');
}
// 获取客服的云信ID
export function getPhomeDemain() {
return getConfigByEnvType('phomeDemain');
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
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);
}
return birthday;
}
\ No newline at end of file
birthday = birthday.replace(/(.{4})(.{2})/, '$1-$2-');
// 通过正则表达式来指定输出格式为:1990-01-01
}
return birthday;
}
此差异已折叠。
/* eslint-disable */
/* 浏览器兼容提示 */
export const CHECK_BROWSER_TIPS = {
BROWSER_NOT_COMPATIBLE: '您的浏览器不支持直播功能!',
BROWSER_NOT_SUPPORT_SCREEN_SHARE: '您的浏览器不支持直播功能!'
BROWSER_NOT_SUPPORT_SCREEN_SHARE: '您的浏览器不支持直播功能!',
};
export const setLgTenText = time => {
export const setLgTenText = (time) => {
return time < 10 ? `0${time}` : time;
};
......@@ -21,11 +22,13 @@ export const countDown = (endtime) => {
const nowtime = new Date(); // 获取当前时间
const time = endtime - nowtime.getTime(); // 距离结束时间的毫秒数
if (time > 0) {
const lefth = Math.floor(time / (1000 * 60 * 60) % 24); // 计算小时数
const leftm = Math.floor(time / (1000 * 60) % 60); // 计算分钟数
const lefts = Math.floor(time / 1000 % 60); // 计算秒数
// 返回倒计时的字符串
return `${setLgTenText(lefth)}:${setLgTenText(leftm)}:${setLgTenText(lefts)}`;
const lefth = Math.floor((time / (1000 * 60 * 60)) % 24); // 计算小时数
const leftm = Math.floor((time / (1000 * 60)) % 60); // 计算分钟数
const lefts = Math.floor((time / 1000) % 60); // 计算秒数
// 返回倒计时的字符串
return `${setLgTenText(lefth)}:${setLgTenText(leftm)}:${setLgTenText(
lefts
)}`;
} else {
return '时间已到';
}
......@@ -34,20 +37,20 @@ export const countDown = (endtime) => {
export const laseTime = (endtime) => {
const nowtime = new Date(); // 获取当前时间
const time = endtime - nowtime.getTime(); // 距离结束时间的毫秒数
const lefth = Math.floor(time / (1000 * 60 * 60) % 24); // 计算小时数
const leftm = Math.floor(time / (1000 * 60) % 60); // 计算分钟数
const lefts = Math.floor(time / 1000 % 60); // 计算秒数
const lefth = Math.floor((time / (1000 * 60 * 60)) % 24); // 计算小时数
const leftm = Math.floor((time / (1000 * 60)) % 60); // 计算分钟数
const lefts = Math.floor((time / 1000) % 60); // 计算秒数
return {
lefth,
leftm,
lefts
lefts,
};
};
export const lastm = (startTime, endTime) => {
const time = endTime - startTime; // 距离结束时间的毫秒数
const lefth = Math.floor(time / (1000 * 60 * 60) % 24); // 计算小时数
const leftm = Math.floor(time / (1000 * 60) % 60); // 计算分钟数
const lefth = Math.floor((time / (1000 * 60 * 60)) % 24); // 计算小时数
const leftm = Math.floor((time / (1000 * 60)) % 60); // 计算分钟数
return lefth * 60 + leftm;
};
......@@ -69,10 +72,10 @@ export const listSort = (one, two, three, four, arr) => {
const a = h.sort(listCompare(three));
const b = a.sort(listCompare(two));
newList = b.sort(listCompare(one, 1));
newList.forEach(item => {
newList.forEach((item) => {
if (item.isCalling) {
callArr.push(item);
}
}
if (item.inviteCall) {
inviteArr.push(item);
}
......@@ -80,7 +83,7 @@ export const listSort = (one, two, three, four, arr) => {
return {
newList,
callArr,
inviteArr
inviteArr,
};
};
......@@ -93,13 +96,21 @@ export const getBroswer = () => {
const sys = {};
const 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;
(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 };
......@@ -109,4 +120,4 @@ export const getBroswer = () => {
if (sys.safari) return { broswer: 'Safari', version: sys.safari };
return { broswer: '', version: '0' };
};
\ No newline at end of file
};
此差异已折叠。
此差异已折叠。
......@@ -124,9 +124,9 @@
.show-work-set {
margin-top: 100px;
}
.maxNum-first-show{
.maxNum-first-show {
margin-top: 20px;
.show-sep-num{
.show-sep-num {
color: red;
}
}
......
......@@ -138,7 +138,7 @@
:total-rows="searchParam.totalRows"
:loading="loading"
:create-list="newCreateList"
:center-dialog-visible="centerDialogVisible"
:center-dialog-visible="centerDialogVisible"
@sortfunc="sortfunc"
@getServiceOpen="getServiceOpen"
@getWorkStatus="getWorkStatus"
......@@ -197,7 +197,7 @@
workInStep,
getLevel,
} from '@/api/serviceSchedule';
import { departmentAll, savePCDayCount} from '@/api/diagnosis';
import { departmentAll, savePCDayCount } from '@/api/diagnosis';
import TableServiceSchedule from '@/components/list/table-serviceSchedule';
export default {
components: {
......@@ -259,9 +259,9 @@
newCreateList: [],
allTilst: [],
allList: {},
centerDialogVisible:false,
doctorInfo:{},
maxNumValue:''
centerDialogVisible: false,
doctorInfo: {},
maxNumValue: '',
};
},
watch: {},
......@@ -444,7 +444,7 @@
target.setAttribute('href', u);
target.click();
},
setMaxNumValue(value) {
setMaxNumValue(value) {
this.doctorInfo = value;
this.maxNumValue = value.preNum;
this.centerDialogVisible = true;
......@@ -455,16 +455,16 @@
},
submitSetData() {
const params = {
doctorId:this.doctorInfo.doctorId,
preNum:this.maxNumValue
doctorId: this.doctorInfo.doctorId,
preNum: this.maxNumValue,
};
savePCDayCount(params).then(res => {
savePCDayCount(params).then((res) => {
if (res.code == '000000') {
this.centerDialogVisible = false;
this.search();
}
});
}
},
},
};
</script>
......@@ -610,9 +610,9 @@
}
}
}
}
}
}
}
</style>
<style lang="scss">
.serviceSchedule-cascader {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册