Commit 412ef2a5 authored by gengchunlei's avatar gengchunlei

加载动画

parent 1c3cc396
...@@ -57,6 +57,8 @@ ...@@ -57,6 +57,8 @@
import {callMobile} from "../utils/common"; import {callMobile} from "../utils/common";
import { Toast } from 'mint-ui'; import { Toast } from 'mint-ui';
import {receiveWay} from "../utils/dictionaries"; import {receiveWay} from "../utils/dictionaries";
import { Indicator } from 'mint-ui';
export default { export default {
name: "choiceContraceptives", name: "choiceContraceptives",
data(){ data(){
...@@ -115,7 +117,8 @@ ...@@ -115,7 +117,8 @@
message: '请先选择药具!', message: '请先选择药具!',
duration: 2000 duration: 2000
}); });
} } else {
Indicator.open();
let pars = JSON.parse(this.checkedMedical) let pars = JSON.parse(this.checkedMedical)
let info = JSON.parse(window.sessionStorage.getItem('mobileTokenIno')) let info = JSON.parse(window.sessionStorage.getItem('mobileTokenIno'))
const {phone = '', userId =''} = info const {phone = '', userId =''} = info
...@@ -129,6 +132,7 @@ ...@@ -129,6 +132,7 @@
...other ...other
} }
addMedicalRecord(par).then(({data}) => { addMedicalRecord(par).then(({data}) => {
Indicator.close();
if (data.code == 'SUCCESS') { if (data.code == 'SUCCESS') {
this.$router.push("/receiveSuccess"); this.$router.push("/receiveSuccess");
} else { } else {
...@@ -138,7 +142,7 @@ ...@@ -138,7 +142,7 @@
}); });
} }
}) })
}
} }
}, },
beforeDestroy() { beforeDestroy() {
......
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
import {getUserCollectRecord} from '../utils/api'; import {getUserCollectRecord} from '../utils/api';
import NoData from "./component/noData"; import NoData from "./component/noData";
import { Toast } from 'mint-ui'; import { Toast } from 'mint-ui';
import { Indicator } from 'mint-ui';
export default { export default {
name: "collectRecords", name: "collectRecords",
...@@ -73,6 +74,7 @@ ...@@ -73,6 +74,7 @@
}, },
methods: { methods: {
getRecordInfo(callBack) { getRecordInfo(callBack) {
Indicator.open();
getUserCollectRecord(this.param).then(({data = {}}) => { getUserCollectRecord(this.param).then(({data = {}}) => {
const {dataList = []} = data.data const {dataList = []} = data.data
this.detailInfo = this.detailInfo.concat(dataList) this.detailInfo = this.detailInfo.concat(dataList)
...@@ -86,6 +88,7 @@ ...@@ -86,6 +88,7 @@
} else { } else {
this.loading = false this.loading = false
} }
Indicator.close();
callBack && callBack() callBack && callBack()
}).catch(res => { }).catch(res => {
Toast({ Toast({
......
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
<script> <script>
import {addVisitRecord} from "../utils/api"; import {addVisitRecord} from "../utils/api";
import { Toast } from 'mint-ui'; import { Toast } from 'mint-ui';
import { Indicator } from 'mint-ui';
export default { export default {
name: "returnVisit", name: "returnVisit",
...@@ -121,6 +122,7 @@ ...@@ -121,6 +122,7 @@
} }
/*验证完毕*/ /*验证完毕*/
if(flag){ if(flag){
Indicator.open()
let badInfo = this.formData.badReaction.join() let badInfo = this.formData.badReaction.join()
let info = JSON.parse(window.sessionStorage.getItem('mobileTokenIno')) let info = JSON.parse(window.sessionStorage.getItem('mobileTokenIno'))
const {phone = '', userId =''} = info const {phone = '', userId =''} = info
...@@ -134,6 +136,7 @@ ...@@ -134,6 +136,7 @@
badOther: this.formData.otherBadReaction badOther: this.formData.otherBadReaction
} }
addVisitRecord(par).then(({data}) => { addVisitRecord(par).then(({data}) => {
Indicator.close()
if (data.code == 'SUCCESS') { if (data.code == 'SUCCESS') {
Toast({ Toast({
message: '填写成功!', message: '填写成功!',
......
...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
import {getStockInfo} from "../utils/api"; import {getStockInfo} from "../utils/api";
import NoData from "./component/noData"; import NoData from "./component/noData";
import { MessageBox } from 'mint-ui'; import { MessageBox } from 'mint-ui';
import { Indicator } from 'mint-ui';
export default { export default {
name: "siteDetails", name: "siteDetails",
...@@ -91,6 +92,7 @@ ...@@ -91,6 +92,7 @@
this.getMedicalInfoList() this.getMedicalInfoList()
}, },
getMedicalInfoList(callBack) { getMedicalInfoList(callBack) {
Indicator.open();
let par = { let par = {
relationId: this.relationId, relationId: this.relationId,
...this.param ...this.param
...@@ -108,6 +110,7 @@ ...@@ -108,6 +110,7 @@
} else { } else {
this.loading = false this.loading = false
} }
Indicator.close();
callBack && callBack() callBack && callBack()
}).finally(() => { }).finally(() => {
this.loading = false this.loading = false
......
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