提交 752c70fa 编写于 作者: lyf's avatar lyf

修改跳转bug

上级 f1c49367
......@@ -10,7 +10,7 @@
<!-- 强制查询特定主机名 -->
<link rel="dns-prefetch" href="<%= process.env.VUE_APP_SERVICE_URL %>">
<link rel="icon" type="image/x-icon" href="<%= VUE_APP_OSS_URL %>static/img/logo.png">
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<!-- <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"> -->
<title>云鹊医-赋能基层医生</title>
<style>
......@@ -96,7 +96,7 @@
<script src="<%= VUE_APP_OSS_URL %>static/js/vant.min-2.12.26.js"></script>
<script src="<%= VUE_APP_OSS_URL %>static/js/vue-router-3.3.2.js"></script>
<script src="<%= VUE_APP_OSS_URL %>static/js/axios-0.19.0.js"></script>
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<!-- <script src="https://unpkg.com/element-ui/lib/index.js"></script> -->
<script src="<%= VUE_APP_OSS_URL %>static/js/jsencrypt.min-3.0.0.js"></script>
<script src="<%= VUE_APP_OSS_URL %>static/js/crypto.min-4.0.0.js"></script>
<script src="<%= VUE_APP_OSS_URL %>static/js/lodash-4.17.15.js"></script>
......
......@@ -102,8 +102,6 @@ export const diagnoseList = async (data) => {
});
};
// diagnosis-list
export const diagnoseAppointTime = async (data) => {
return request({
url: '/diagnose/admin/diagnose/appointTime',
......
......@@ -59,7 +59,7 @@
content: '',
confirmTxt: '确定',
cancleTxt: '',
_promise: null,
returnPromise: null,
};
},
created() {},
......@@ -69,14 +69,14 @@
this.confirmTxt = '确定';
this.cancleTxt = '';
this.content = '';
this._promise = null;
this.returnPromise = null;
},
init(obj = {}) {
Object.assign(this, obj);
console.log('obj---', obj);
this.show = true;
return new Promise((resolve, reject) => {
this._promise = {
this.returnPromise = {
resolve,
reject,
};
......@@ -84,12 +84,12 @@
},
async cancle() {
this.show = false;
(await this._promise.reject) && this._promise.reject();
(await this.returnPromise.reject) && this.returnPromise.reject();
this.reset();
},
async confirm() {
this.show = false;
(await this._promise.resolve) && this._promise.resolve();
(await this.returnPromise.resolve) && this.returnPromise.resolve();
this.reset();
},
hide() {
......
......@@ -14,7 +14,7 @@
label-suffix=":"
label-position="right"
size="mini"
style="width: 100%;"
style="width: 100%"
>
<el-form-item
label="问诊方式"
......@@ -24,7 +24,7 @@
<el-radio-group
v-model="model.diagnoseChannel"
size="small"
style="line-height: 45px;width: 135%;"
style="line-height: 45px; width: 135%"
>
<el-radio :label="1">
APP问诊(系统发起问诊)
......@@ -51,7 +51,7 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="pickerOptions1"
style="width: 135%;"
style="width: 135%"
/>
</el-col>
</el-form-item>
......@@ -60,7 +60,7 @@
<span
slot="footer"
class="dialog-footer"
style="text-align: center;"
style="text-align: center"
>
<el-button @click="cancel">取 消</el-button>
<el-button
......@@ -74,22 +74,22 @@
</template>
<script>
import {updateDiagnosis} from '../../utils/diagnosis';
import { updateDiagnosis } from '../../utils/diagnosis';
let vm = null;
export default {
props: {
appointmentTimeVisible: {
type: Boolean,
default: false
default: false,
},
diagnoseLogId: {
type: Number,
default: 0
default: 0,
},
bizType: {
type: Number,
default: 0
default: 0,
},
},
data() {
......@@ -98,17 +98,16 @@
title: '设置预约时间(问诊时间)',
confirmTxt: '确定',
cancleTxt: '',
_promise: null,
isClick:false,
isClick: false,
model: {
diagnoseChannel: 1,
appointBeginTime: '',
appointEndTime: ''
appointEndTime: '',
},
rangeTime: '',
addRules: {
diagnoseChannel: [
{required: true, message: '请选择问诊方式', trigger: 'blur'}
{ required: true, message: '请选择问诊方式', trigger: 'blur' },
],
rangeTime: [
{
......@@ -117,18 +116,26 @@
// message: "预约时间不能为空",
trigger: 'change',
fields: {
0: {required: true, type: 'date', message: '开始时间不能为空', trigger: 'change'},
1: {required: true, type: 'date', message: '结束时间不能为空', trigger: 'change'}
}
}
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
); // 减去一天的时间代表可以选择同一天;
}
disabledDate: (time) => {
return time.getTime() < Date.now() - 1 * 24 * 3600 * 1000; // 减去一天的时间代表可以选择同一天;
},
},
};
},
......@@ -137,21 +144,20 @@
},
methods: {
confirm() {
if(!(this.rangeTime != null && this.rangeTime.length > 0)) {
if (!(this.rangeTime != null && this.rangeTime.length > 0)) {
vm.$message.warning('请选择预约时间');
return;
}
// this.$refs.setForm.validate((valid) => {
// if (valid) {
const req = {
id: this.diagnoseLogId,
bizType: this.bizType,
diagnoseChannel: this.model.diagnoseChannel,
appointBeginTime: this.rangeTime[0],
appointEndTime: this.rangeTime[1]
appointEndTime: this.rangeTime[1],
};
vm.isClick = true;
updateDiagnosis(req).then(function (res) {
updateDiagnosis(req)
.then(function (res) {
vm.isClick = false;
if (res.code == '000000') {
vm.cancel();
......@@ -159,21 +165,18 @@
} else {
vm.$message.error(res.message);
}
}).catch(function (error) {
})
.catch(function (err) {
vm.isClick = false;
vm.$message.error(res.message);
vm.$message.error(err.message);
});
// }
// })
},
cancel() {
this.rangeTime = '';
this.$emit('update:appointmentTimeVisible', false);
}
}
},
},
};
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>
......@@ -70,7 +70,6 @@
title: '设置待协调医生',
confirmTxt: '确定',
cancleTxt: '',
_promise: null,
model:{
coordinatedRemark:''
},
......@@ -84,14 +83,7 @@
created() {
vm = this;
},
mounted() {
// if(this.bizType == 8){
// this.title = "设置待协调医生";
// }
// else if(this.bizType == 10){
// this.title = "重新匹配医生";
// }
},
mounted() {},
methods: {
confirm() {
this.$refs.setForm.validate((valid) => {
......@@ -108,8 +100,8 @@
} else {
vm.$message.error(res.message);
}
}).catch(function (error) {
vm.$message.error(res.message);
}).catch(function (err) {
vm.$message.error(err.message);
});
}
});
......
......@@ -14,8 +14,8 @@ import ClipboardJS from 'clipboard';
import '@/utils/directive';
import TRTC from 'trtc-js-sdk';
import TIM from 'tim-js-sdk';
import Cookies from 'js-cookie'
Cookies.set('conslToken', localStorage.getItem('token'))
import Cookies from 'js-cookie';
Cookies.set('conslToken', localStorage.getItem('token'));
Vue.prototype.ClipboardJS = ClipboardJS;
Vue.use(vViewer, {
button: false
......
......@@ -79,7 +79,7 @@ const routerConfig = [
children: [
{
path: '',
redirect: '/diagnosis-list',
redirect: '/diagnosis-list-new',
},
{
path: '/diagnosis-list',
......
......@@ -330,8 +330,6 @@
</template>
<script>
import { getQueryTemplate, getMemberList, messageForward, messageHistory, messageSend} from '@/api/diagnosis';
import BreadCrumb from '@/components/breadcrumb.vue';
import { doUpload, getFilePath } from '@/utils/qiniu-util';
import { openLoading, closeLoading, betaHandle } from '@/utils/utils';
import { getPicaKFAccid, getPhomeDemain } from '@/utils';
......@@ -343,9 +341,6 @@
let _this = null;
export default {
components: {
BreadCrumb,
},
data() {
return {
curmbFirst: '云鹊客服',
......@@ -358,9 +353,9 @@
waitingTaskCount: 0
},
currentContinueTimes: 0,
currentSessionIndex: 0, // 当前会话序号
currentSessionIndex: 0,
currentSession: {},
currentTaskLogId: '', // 当前会话ID
currentTaskLogId: '',
picakfAccId: '',
historyTimestamp: 0,
realTimestamp: 0,
......@@ -537,7 +532,7 @@
},
// 查询医生和居民的消息历史(第一次进来时就调用)
getMSGHistory(session) {
getMSGHistory() {
const params = {
includeFlag: 1, // 带本条消息
limit: 20,
......@@ -594,9 +589,9 @@
showType = 1,
size = 0,
url = '',
title = '',
cMessageList = [];
messageList.forEach((rawMsg, index) => {
title = '';
const cMessageList = [];
messageList.forEach((rawMsg) => {
text = '';
suffix = '';
showType = 1;
......@@ -702,8 +697,6 @@
});
}
}
// 重新设置历史与实时的时间戳
if (this.messageList.length) {
this.historyTimestamp = this.messageList[0].timestamp;
const timestamp = this.messageList[this.messageList.length - 1].timestamp;
......@@ -711,8 +704,6 @@
this.realTimestamp = timestamp;
}
}
// 自己发送消息时,暂时不刷新消息
if (directFlag == 1) {
forwardMsgIntervalId = setInterval(() => {
this.getMSGForward();
......@@ -726,13 +717,11 @@
let content = {},
signature = '',
msgIndex = -1,
newMsgList = [],
flag = false;
cMessageList.forEach(item => {
content = {};
signature = '';
msgIndex = -1;
newMsgList = [];
if (item.type.toLowerCase() == 'custom') {
content = JSON.parse(item.content);
if (content.bizType == -1) {
......@@ -884,7 +873,6 @@
4: 设置各种状态(1:isShowErrorIcon; 2:isShowLoadingIcon; 3:isShowErrorMsg)
*/
handleSendMsg(params, sendId) {
const text = '';
const msg = Object.assign({}, params);
msg.fromAccount = this.tid;
msg.toAccount = this.picakfAccId;
......@@ -910,8 +898,8 @@
msg.taskLogId = this.currentTaskLogId;
this.teamMemberList.forEach(item => {
if(this.picakfAccId = item.accId) {
msg.avatarImg = item.avatarImageUrl; // 运营头像
if(this.picakfAccId == item.accId) {
msg.avatarImg = item.avatarImageUrl;
}
});
if(msg.type == 1) {
......@@ -963,7 +951,7 @@
msg.isShowErrorIcon = true;
msg.isShowErrorMsg = false; // 只有在下次拉取新数据时才有可能是为ture
}
this.teamMemberList.forEach((item, index) => {
this.teamMemberList.forEach((item) => {
if(params.fromAccount == item.accId) {
msg.name = item.name;
}
......@@ -975,7 +963,7 @@
});
}
})
.catch(error => {
.catch(() => {
let msg = this.messageList[this.messageList.length - 1];
if (msg.sendId !== sendId) {
msg = this.getMsgBySendId(sendId);
......@@ -995,14 +983,12 @@
// 根据sendId,查找到对应的消息
getMsgBySendId(sendId) {
console.log('------------getMsgBySendId------------');
let l = this.messageList.length,
i = l - 1;
for (; i > 0; i--) {
const l = this.messageList.length;
for (let i = l - 1; i > 0; i--) {
if (this.messageList[i].sendId == sendId) {
break;
return this.messageList[i];
}
}
return this.messageList[i];
},
// 文件大小单位转换
......
......@@ -850,14 +850,10 @@
},
// 查看详情/编辑详情
goDetail(row, flag) {
// this.$router.push({
// path: "/diagnosis-editor",
// query: { id: row.diagnoseLogId, editorType: flag },
// });
const target = this.$refs.target;
const { origin, pathname } = window.location;
const { origin } = window.location;
const editorType = flag ? 1 : 2;
const u = `${origin}${pathname}#/diagnosis-editor?id=${row.diagnoseLogId}&editorType=${editorType}`;
const u = `${origin}/consultation/pica-admin-consultation/diagnosis-editor?id=${row.diagnoseLogId}&editorType=${editorType}`;
target.setAttribute('href', u);
target.click();
},
......@@ -928,7 +924,6 @@
updateDiagnosis(req)
.then(function (res) {
if (res.code == '000000') {
// this.cancel();
vm.search(false);
} else {
vm.$message.error(res.message);
......
......@@ -177,27 +177,6 @@
style="width: 90%"
:picker-options="pickerOptions1"
/>
<!-- <el-date-picker-->
<!-- type="date"-->
<!-- placeholder="开始时间"-->
<!-- v-model="searchParam.createdTimeBegin"-->
<!-- style="width: 135px;"-->
<!-- :picker-options="endDateOpt"-->
<!-- format="yyyy-MM-dd"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- >-->
<!-- </el-date-picker>-->
<!-- <span>-</span>-->
<!-- <el-date-picker-->
<!-- type="date"-->
<!-- placeholder="结束时间"-->
<!-- v-model="searchParam.createdTimeEnd"-->
<!-- style="width: 135px;"-->
<!-- format="yyyy-MM-dd"-->
<!-- :picker-options="endDateOpt1"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- >-->
<!-- </el-date-picker>-->
</el-form-item>
</el-col>
<el-col
......@@ -218,27 +197,6 @@
style="width: 90%"
:picker-options="pickerOptions1"
/>
<!-- <el-date-picker-->
<!-- type="date"-->
<!-- placeholder="开始时间"-->
<!-- v-model="searchParam.operateTimeBegin"-->
<!-- style="width: 135px;"-->
<!-- :picker-options="endDateOpt2"-->
<!-- format="yyyy-MM-dd"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- >-->
<!-- </el-date-picker>-->
<!-- <span>-</span>-->
<!-- <el-date-picker-->
<!-- type="date"-->
<!-- placeholder="结束时间"-->
<!-- v-model="searchParam.operateTimeEnd"-->
<!-- style="width: 135px;"-->
<!-- format="yyyy-MM-dd"-->
<!-- :picker-options="endDateOpt3"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- >-->
<!-- </el-date-picker>-->
</el-form-item>
</el-col>
<el-col
......@@ -259,27 +217,6 @@
style="width: 90%"
:picker-options="pickerOptions1"
/>
<!-- <el-date-picker-->
<!-- type="date"-->
<!-- placeholder="开始时间"-->
<!-- v-model="searchParam.appointBeginTime"-->
<!-- style="width: 135px;"-->
<!-- :picker-options="endDateOpt4"-->
<!-- format="yyyy-MM-dd"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- >-->
<!-- </el-date-picker>-->
<!-- <span>-</span>-->
<!-- <el-date-picker-->
<!-- type="date"-->
<!-- placeholder="结束时间"-->
<!-- v-model="searchParam.appointEndTime"-->
<!-- style="width: 135px;"-->
<!-- format="yyyy-MM-dd"-->
<!-- :picker-options="endDateOpt5"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- >-->
<!-- </el-date-picker>-->
</el-form-item>
</el-col>
</el-row>
......@@ -768,8 +705,8 @@
changeBeginTime(val) {
this.beginFlag = false;
this.endFlag = false;
let b = new Date(val).getTime(),
e;
const b = new Date(val).getTime();
let e;
if (this.timeForm.endTime) {
e = new Date(this.timeForm.endTime).getTime();
}
......@@ -778,8 +715,8 @@
changeEndTime(val) {
this.beginFlag = false;
this.endFlag = false;
let b = new Date(val).getTime(),
e;
const b = new Date(val).getTime();
let e;
if (this.timeForm.beginTime) {
e = new Date(this.timeForm.beginTime).getTime();
}
......@@ -870,7 +807,7 @@
);
}
})
.catch((err) => {
.catch(() => {
console.log('网络出现点儿问题,稍后重试');
});
},
......
......@@ -203,7 +203,7 @@
closeLoading(this);
this.$router.go(-1);
})
.catch((err) => {
.catch(() => {
closeLoading(this);
this.$router.go(-1);
});
......@@ -303,7 +303,6 @@
},
// 获取AppId
getAppId() {
const req = {};
getSdkappid()
.then((res) => {
if (res.code == '000000') {
......@@ -316,7 +315,7 @@
this.getErr();
}
})
.catch((err) => {
.catch(() => {
this.getErr();
});
},
......@@ -338,7 +337,7 @@
this.getErr();
}
})
.catch((err) => {
.catch(() => {
this.getErr();
});
},
......@@ -360,7 +359,7 @@
title: '为了更好的体验,请保证您输出设备的正常使用',
})
.then(() => {
Promise.all([this.rtc.join()]).then((res) => {
Promise.all([this.rtc.join()]).then(() => {
this.ispending();
const t = setTimeout(() => {
closeLoading(this);
......@@ -369,8 +368,8 @@
}, 1000);
});
})
.catch((err) => {
Promise.all([this.rtc.join()]).then((res) => {
.catch(() => {
Promise.all([this.rtc.join()]).then(() => {
this.ispending();
const t = setTimeout(() => {
closeLoading(this);
......@@ -394,7 +393,7 @@
}
}
})
.catch((err) => {
.catch(() => {
console.log('获取视频参数数据失败');
});
},
......@@ -515,7 +514,7 @@
title: `距离会诊结束还剩不足${timeObj.leftm}分钟`,
})
.then(() => {})
.catch((err) => {});
.catch(() => {});
});
}
}, 1000);
......@@ -550,7 +549,7 @@
.then(() => {
this.out();
})
.catch((err) => {});
.catch(() => {});
},
out() {
diagnoseEndCall({
......@@ -566,7 +565,7 @@
title: '操作失败,请稍后重试',
})
.then(() => {})
.catch((err) => {});
.catch(() => {});
}
})
.catch(() => {
......@@ -576,14 +575,14 @@
title: '操作失败,请稍后重试',
})
.then(() => {})
.catch((err) => {});
.catch(() => {});
});
},
// 获取信息失败
getErr() {
closeLoading(this);
},
reloadfn(msg) {
reloadfn() {
this.$nextTick(() => {
this.$refs.alert
.init({
......@@ -593,7 +592,7 @@
.then(() => {
location.reload();
})
.catch((err) => {
.catch(() => {
location.reload();
});
});
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册