Commit a4d05141 by wangshuangqing

1.添加loading效果

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