提交 44c07cb8 编写于 作者: Yuanzhao.dai's avatar Yuanzhao.dai

Merge branch 'dev-followUp-20190312' of...

Merge branch 'dev-followUp-20190312' of http://192.168.110.53/com.pica.cloud.education.frontend/pica.cloud.web-education-admin into dev-followUp-20190312
......@@ -18,13 +18,33 @@ let loadingInstance = () => {
background: 'rgba(0, 0, 0, 0.7)'
});
}
let loading;
let needLoadingRequestCount = 0;
let showFullScreenLoading = () => {
if (needLoadingRequestCount === 0) {
loadingInstance();
}
needLoadingRequestCount++;
};
let tryHideFullScreenLoading = () => {
if (needLoadingRequestCount > 0) {
needLoadingRequestCount--;
}
if (needLoadingRequestCount === 0) {
loadingInstance().close();
}
};
// request拦截器
service.interceptors.request.use(config => {
loadingInstance()
if (config.noLoading) {
}else{
showFullScreenLoading();
}
if( config.headers['sysCode']==undefined) {
config.headers['sysCode'] = 12
}
// config.headers['token'] = 'F211893E7F3042CCA8CBBB0B90951722'
// config.headers['token'] = 'AE013D42003D4BA3856FAD9DBDC82254'
config.headers['token'] = localStorage.getItem('storageToken')
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' })
// if (config.data && config.data.setEntry) {
......@@ -38,14 +58,17 @@ service.interceptors.request.use(config => {
return config
}, error => {
// logger.debug('service.interceptors.request: ', error)
loadingInstance().close();
tryHideFullScreenLoading();
Promise.reject(error)
})
// respone拦截器
service.interceptors.response.use(
response => {
loadingInstance().close();
if (response.config.noLoading) {
}else{
tryHideFullScreenLoading()
}
const res = response.data
/*
baseUrl时,返回000000为成功
......@@ -59,7 +82,7 @@ service.interceptors.response.use(
},
error => {
// logger.error('err' + error)
loadingInstance().close();
tryHideFullScreenLoading();
return Promise.reject(error)
}
)
......
......@@ -83,6 +83,7 @@
},
props: {
isSelectCartoon: Boolean,
activeComentId: String,
},
watch: {
isSelectCartoon(val){
......@@ -99,16 +100,19 @@
this.picapEducationComtentsForNotHypertension = res.data.picapEducationComtentsForNotHypertension;
this.allList = [...this.picapEducationComtentsForHypertension,...this.picapEducationComtentsForNotHypertension];
this.cartoonList = this.allList
this.articleTable = this.picapEducationComtentsForNotHypertension
})
}
},
cartoonList(val){
if(this.activeComentId){
for(let i=0;i<val.length;i++){
if(val[i].id == this.activeComentId){
this.sendObj = val[i]
}
}
}
}
},
created() {
},
methods: {
changeDisease(val){
......@@ -157,7 +161,14 @@
this.$emit('closeSelectCartoon')
},
sureSelect() {
this.$emit('confirmSelectComent', this.sendObj);
if(this.sendObj.id){
this.$emit('confirmSelectComent', this.sendObj);
}else{
this.$message({
message: '请选择漫画',
type: 'warning'
});
}
},
},
}
......
......@@ -81,7 +81,7 @@
<div class="edit-plan-content" v-show="activeTab === 'second'">
<set-time-node
ref="getTimeNodeList"
:resourceId="resourceId"
:standedTimeNodeList="standedTimeNodeList"
:isStandedTemplate="isStandedTemplate"
:patientIdList="baseInfo.patientIdList"
......@@ -216,6 +216,11 @@
});
}
})
}else{
this.$message({
message: val.message,
type: 'error'
});
}
},
selectPatientHandler() {
......@@ -258,7 +263,6 @@
// 关闭弹层,继续创建
}).catch(() => {
// 确定放弃,跳出当前编辑页面
// this.getTimeNodeList([])
this.$router.push({path: '/followup/plan-manage/plan-list'})
});
},
......@@ -275,11 +279,11 @@
}
if (valid) {
console.log('当前选择的随访模板id为',this.baseInfo.resourceId)
this.resourceId = this.baseInfo.resourceId
console.log( this.baseInfo.resourceId)
this.resourceId = String(this.baseInfo.resourceId)
// console.log( this.baseInfo.resourceId)
if(this.baseInfo.resourceId){
this.isStandedTemplate = true
getFollowupTableTemplate(this.baseInfo.resourceId).then(res=>{
this.isStandedTemplate = true
this.standedTimeNodeList = res.data
this.activeTab = 'second';
})
......
......@@ -274,11 +274,9 @@
})
})
}else{
this.$notify.success({
title: '请填写完整表单',
message: '请填写完整表单',
showClose: false,
duration: 500
this.$message({
message: val.message,
type: 'error'
});
}
},
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册