Commit a4d05141 by wangshuangqing

1.添加loading效果

2.自费类型为undefant时进行判断
parent 32a41eb5
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
><img src="../assets/img/je.png" alt="" ><img src="../assets/img/je.png" alt=""
/></span> /></span>
<div class="outpatientDetails_top_message_div5_t5"> <div class="outpatientDetails_top_message_div5_t5">
自费占比:<span>{{ decimal(HistoryInfo.ownProportion)+'%' }}</span> 自费占比:<span>{{HistoryInfo.ownProportion !=undefined? decimal(HistoryInfo.ownProportion)+'%':''}}</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -439,6 +439,8 @@ import { decimal } from "../utils/decimal"; ...@@ -439,6 +439,8 @@ import { decimal } from "../utils/decimal";
import { Message } from "element-ui"; import { Message } from "element-ui";
import { useRoute, useRouter } from "../utils/useVueRouter"; import { useRoute, useRouter } from "../utils/useVueRouter";
import { setItem, getItem } from "../utils/auth"; import { setItem, getItem } from "../utils/auth";
import { Loading } from 'element-ui';
export default { export default {
name: "outpatientDetails", name: "outpatientDetails",
setup() { setup() {
...@@ -507,6 +509,7 @@ export default { ...@@ -507,6 +509,7 @@ export default {
state.showCountDatas = true; state.showCountDatas = true;
state.showbottom = true; state.showbottom = true;
var loadingInstance2 = Loading.service(loadingOption1);
http http
.post( .post(
`/medical/get/GetPRHisData?&code=${route.value.query.id}&projectType=${name}`, `/medical/get/GetPRHisData?&code=${route.value.query.id}&projectType=${name}`,
...@@ -516,6 +519,7 @@ export default { ...@@ -516,6 +519,7 @@ export default {
state.liInd = -1; state.liInd = -1;
state.span1Ind = ind; state.span1Ind = ind;
state.options = data.projectRules; state.options = data.projectRules;
loadingInstance2.close();
// state.typeCountDatas = data.typeCountDatas; // state.typeCountDatas = data.typeCountDatas;
// if (data.typeCountDatas == null) { // if (data.typeCountDatas == null) {
// state.showCountDatas = false; // state.showCountDatas = false;
...@@ -524,7 +528,9 @@ export default { ...@@ -524,7 +528,9 @@ export default {
state.showbottom = false; state.showbottom = false;
} }
}) })
.catch((error) => {}); .catch((error) => {
loadingInstance2.close();
});
}; };
//点击获取中间的表格数据 //点击获取中间的表格数据
...@@ -616,9 +622,18 @@ export default { ...@@ -616,9 +622,18 @@ export default {
state.btnvalue = value; state.btnvalue = value;
getInpatFeesByREGCODE(state.Lefttype); getInpatFeesByREGCODE(state.Lefttype);
}; };
// loading效果
const loadingOption1 = {
// 加载loading
fullscreen: true,
text: '正在加载...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.5)',
};
//费用分类接口 //费用分类接口
const getInpatFeesByREGCODE = (types) => { const getInpatFeesByREGCODE = (types) => {
var loadingInstance1 = Loading.service(loadingOption1);
http http
.post( .post(
`/medical/Get/getIFHisByREGCODE?&code=${route.value.query.id}&state=${state.btnvalue}`, `/medical/Get/getIFHisByREGCODE?&code=${route.value.query.id}&state=${state.btnvalue}`,
...@@ -626,8 +641,11 @@ export default { ...@@ -626,8 +641,11 @@ export default {
) )
.then((data) => { .then((data) => {
state.tableData = data; state.tableData = data;
loadingInstance1.close();
}) })
.catch((error) => {}); .catch((error) => {
loadingInstance1.close();
});
}; };
const scrollToFoods = (index) => { const scrollToFoods = (index) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment