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