提交 d307d61d 编写于 作者: guangjun.yang's avatar guangjun.yang

1、接口超时提示优化

2、所有页面增加加载loading
3、部分样式优化
上级 e43dc65e
...@@ -59,20 +59,20 @@ export default { ...@@ -59,20 +59,20 @@ export default {
height: 100%; height: 100%;
left: 0; left: 0;
top: 0; top: 0;
z-index: 1000000015; z-index: 1000000017;
font-size: 20px; font-size: 20px;
.mask { .mask {
position: absolute; position: absolute;
background: rgba(0, 0, 0, 0.5); background: rgba(0, 0, 0, 0.5);
width: 100%; width: 100%;
height: 100%; height: 100%;
z-index: 1000000016; z-index: 1000000018;
} }
.content { .content {
position: absolute; position: absolute;
left: 50%; left: 50%;
top: 50%; top: 50%;
z-index: 1000000017; z-index: 1000000019;
width: 300px; width: 300px;
// height: 185px; // height: 185px;
margin: -150px 0 0 -150px; margin: -150px 0 0 -150px;
......
...@@ -34,20 +34,20 @@ ...@@ -34,20 +34,20 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.common-loader { .common-loader {
&-mask { .loader-mask {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
bottom: 0; bottom: 0;
right: 0; right: 0;
z-index: 100; z-index: 1000000020;
background: rgba(0, 0, 0, 0.5); background: rgba(0, 0, 0, 0.1);
} }
svg { svg {
position: absolute; position: fixed;
top: 280px; top: 300px;
left: 172px; left: 172px;
z-index: 101; z-index: 1000000021;
} }
} }
......
...@@ -22,7 +22,7 @@ export default { ...@@ -22,7 +22,7 @@ export default {
position: fixed; position: fixed;
width: 100%; width: 100%;
left: 0; left: 0;
top: 74px; top: 73px;
z-index: 1; z-index: 1;
height: 44px; height: 44px;
line-height: 44px; line-height: 44px;
......
...@@ -59,7 +59,7 @@ export default { ...@@ -59,7 +59,7 @@ export default {
position: fixed; position: fixed;
width: 100%; width: 100%;
left: 0; left: 0;
top: 74px; top: 73px;
z-index: 1001; z-index: 1001;
height: 44px; height: 44px;
line-height: 44px; line-height: 44px;
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<CommonTitleWithDropdown :dataList="dropdownList" :title="title" :needRightBtn="needRightBtn" @selectSortItem="selectSortItem"></CommonTitleWithDropdown> <CommonTitleWithDropdown :dataList="dropdownList" :title="title" :needRightBtn="needRightBtn" @selectSortItem="selectSortItem"></CommonTitleWithDropdown>
<ExamScoreList class="pdt-50" :dataList="dataList"></ExamScoreList> <ExamScoreList class="pdt-50" :dataList="dataList"></ExamScoreList>
<CommonNoMore v-if="dataList.length >= 10" class="mt-10"></CommonNoMore> <CommonNoMore v-if="dataList.length >= 10" class="mt-10"></CommonNoMore>
<Loading v-show="isShowLoading"></Loading>
</section> </section>
</template> </template>
<script> <script>
...@@ -14,10 +15,19 @@ import CommonHeader from "@/components/common/common-header"; ...@@ -14,10 +15,19 @@ import CommonHeader from "@/components/common/common-header";
import CommonTitleWithDropdown from "@/components/common/common-title-with-dropdown"; import CommonTitleWithDropdown from "@/components/common/common-title-with-dropdown";
import CommonNoMore from "@/components/common/common-no-more"; import CommonNoMore from "@/components/common/common-no-more";
import ExamScoreList from "@/components/bussiness/exam-score-list"; import ExamScoreList from "@/components/bussiness/exam-score-list";
import Loading from "@/components/common/common-loading";
export default { export default {
components: {
CommonHeader,
CommonTitleWithDropdown,
CommonNoMore,
ExamScoreList,
Loading
},
data() { data() {
return { return {
isShowLoading: true,
title: "共0条数据", title: "共0条数据",
needRightBtn: true, needRightBtn: true,
token: "", token: "",
...@@ -50,15 +60,8 @@ export default { ...@@ -50,15 +60,8 @@ export default {
desc: '10分', desc: '10分',
type: 3 type: 3
}], }],
}; };
}, },
components: {
CommonHeader,
CommonTitleWithDropdown,
CommonNoMore,
ExamScoreList
},
created() { created() {
if (process.client) { if (process.client) {
if(this.$route && this.$route.query) { if(this.$route && this.$route.query) {
...@@ -80,6 +83,7 @@ export default { ...@@ -80,6 +83,7 @@ export default {
async getGeneralExam(queryData) { async getGeneralExam(queryData) {
await getGeneralExam(queryData).then(res => { await getGeneralExam(queryData).then(res => {
if (res.code === "000000") { if (res.code === "000000") {
this.isShowLoading = false;
this.allData = res.data; this.allData = res.data;
this.dataList = res.data.examScoreList; this.dataList = res.data.examScoreList;
this.title = `共${this.dataList.length}条数据`; this.title = `共${this.dataList.length}条数据`;
...@@ -101,7 +105,7 @@ export default { ...@@ -101,7 +105,7 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.pdt-50 { .pdt-50 {
padding-top: 49px; padding-top: 50px;
} }
.mt-10 { .mt-10 {
margin-top: 10px !important; margin-top: 10px !important;
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<CommonTitleMini :title="title" :needRightBtn="needRightBtn"></CommonTitleMini> <CommonTitleMini :title="title" :needRightBtn="needRightBtn"></CommonTitleMini>
<ExamTimesList class="pdt-50" :dataList="dataList"></ExamTimesList> <ExamTimesList class="pdt-50" :dataList="dataList"></ExamTimesList>
<CommonNoMore v-if="dataList.length >= 10" class="mt-10"></CommonNoMore> <CommonNoMore v-if="dataList.length >= 10" class="mt-10"></CommonNoMore>
<Loading v-show="isShowLoading"></Loading>
</section> </section>
</template> </template>
<script> <script>
...@@ -14,10 +15,19 @@ import CommonHeader from "@/components/common/common-header"; ...@@ -14,10 +15,19 @@ import CommonHeader from "@/components/common/common-header";
import CommonTitleMini from "@/components/common/common-title-mini"; import CommonTitleMini from "@/components/common/common-title-mini";
import CommonNoMore from "@/components/common/common-no-more"; import CommonNoMore from "@/components/common/common-no-more";
import ExamTimesList from "@/components/bussiness/exam-times-list"; import ExamTimesList from "@/components/bussiness/exam-times-list";
import Loading from "@/components/common/common-loading";
export default { export default {
components: {
CommonHeader,
CommonTitleMini,
CommonNoMore,
ExamTimesList,
Loading
},
data() { data() {
return { return {
isShowLoading: true,
title: "共0条数据", title: "共0条数据",
needRightBtn: false, needRightBtn: false,
token: "", token: "",
...@@ -41,13 +51,6 @@ export default { ...@@ -41,13 +51,6 @@ export default {
dataList: [] dataList: []
}; };
}, },
components: {
CommonHeader,
CommonTitleMini,
CommonNoMore,
ExamTimesList
},
created() { created() {
if (process.client) { if (process.client) {
if(this.$route && this.$route.query) { if(this.$route && this.$route.query) {
...@@ -69,6 +72,7 @@ export default { ...@@ -69,6 +72,7 @@ export default {
async getGeneralExam(queryData) { async getGeneralExam(queryData) {
await getGeneralExam(queryData).then(res => { await getGeneralExam(queryData).then(res => {
if (res.code === "000000") { if (res.code === "000000") {
this.isShowLoading = false;
this.dataList = res.data.examTimesList; this.dataList = res.data.examTimesList;
this.title = `共${this.dataList.length}条数据` this.title = `共${this.dataList.length}条数据`
} }
...@@ -79,7 +83,7 @@ export default { ...@@ -79,7 +83,7 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.pdt-50 { .pdt-50 {
padding-top: 49px; padding-top: 50px;
} }
.mt-10 { .mt-10 {
margin-top: 10px !important; margin-top: 10px !important;
......
此差异已折叠。
...@@ -86,6 +86,7 @@ ...@@ -86,6 +86,7 @@
<PicaOrg v-show="isShowOrg" @confirm="orgConfirm" @cancel="orgCancel"></PicaOrg> <PicaOrg v-show="isShowOrg" @confirm="orgConfirm" @cancel="orgCancel"></PicaOrg>
<CommonLoading v-show="false"></CommonLoading> <CommonLoading v-show="false"></CommonLoading>
<PopTips :tipsContent="tipsContent" @clickTips="clickTips" v-show="isShowTips"></PopTips> <PopTips :tipsContent="tipsContent" @clickTips="clickTips" v-show="isShowTips"></PopTips>
<Loading v-show="isShowLoading"></Loading>
</section> </section>
</template> </template>
...@@ -141,6 +142,8 @@ import OrgDoctorList from "@/components/bussiness/org-doctor-list"; ...@@ -141,6 +142,8 @@ import OrgDoctorList from "@/components/bussiness/org-doctor-list";
import ExamList from "@/components/bussiness/exam-list"; import ExamList from "@/components/bussiness/exam-list";
import PopTips from "@/components/bussiness/pop-tips"; import PopTips from "@/components/bussiness/pop-tips";
import CommonCard from "@/components/common/common-card"; import CommonCard from "@/components/common/common-card";
import Loading from "@/components/common/common-loading";
import { import {
getGeneralData getGeneralData
} from "@/service/index"; } from "@/service/index";
...@@ -178,9 +181,11 @@ export default { ...@@ -178,9 +181,11 @@ export default {
ChartColumnVerticalScore, ChartColumnVerticalScore,
PopTips, PopTips,
CommonTitleWithWhat, CommonTitleWithWhat,
Loading
}, },
data() { data() {
return { return {
isShowLoading: true,
isScroll: false, isScroll: false,
isShowArea: false, isShowArea: false,
isShowOrg: false, isShowOrg: false,
...@@ -455,6 +460,7 @@ export default { ...@@ -455,6 +460,7 @@ export default {
getGeneralPersonal(params) { getGeneralPersonal(params) {
getGeneralPersonal(params).then(res => { getGeneralPersonal(params).then(res => {
if (res.code === "000000") { if (res.code === "000000") {
this.isShowLoading = false;
this.allData = res.data; this.allData = res.data;
this.studyRankList = this.allData.studyRank || []; this.studyRankList = this.allData.studyRank || [];
this.costRankList = this.allData.costRank || []; this.costRankList = this.allData.costRank || [];
...@@ -473,6 +479,7 @@ export default { ...@@ -473,6 +479,7 @@ export default {
getGeneralData(queryData) { getGeneralData(queryData) {
getGeneralData(queryData).then(res => { getGeneralData(queryData).then(res => {
if (res.code === "000000") { if (res.code === "000000") {
this.isShowLoading = false;
this.allData = res.data; this.allData = res.data;
this.studyRankList = this.allData.studyRank || [] this.studyRankList = this.allData.studyRank || []
this.costRankList = this.allData.costRank || []; this.costRankList = this.allData.costRank || [];
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<TitleKLGPoint :title="title"></TitleKLGPoint> <TitleKLGPoint :title="title"></TitleKLGPoint>
<TipsInfo :content="tipsContent"></TipsInfo> <TipsInfo :content="tipsContent"></TipsInfo>
<ChartColumnHorizontalTCLong :dataList="knowledgeEffectList" class="mt-10"></ChartColumnHorizontalTCLong> <ChartColumnHorizontalTCLong :dataList="knowledgeEffectList" class="mt-10"></ChartColumnHorizontalTCLong>
<Loading v-show="isShowLoading"></Loading>
</section> </section>
</template> </template>
<script> <script>
...@@ -14,10 +15,19 @@ import CommonHeader from "@/components/common/common-header"; ...@@ -14,10 +15,19 @@ import CommonHeader from "@/components/common/common-header";
import TitleKLGPoint from "@/components/bussiness/title-klg-point"; import TitleKLGPoint from "@/components/bussiness/title-klg-point";
import TipsInfo from '@/components/bussiness/tips-info' import TipsInfo from '@/components/bussiness/tips-info'
import ChartColumnHorizontalTCLong from "@/components/bussiness/charts/chart-column-horizontal-tc-long"; import ChartColumnHorizontalTCLong from "@/components/bussiness/charts/chart-column-horizontal-tc-long";
import Loading from "@/components/common/common-loading";
export default { export default {
components: {
CommonHeader,
TitleKLGPoint,
ChartColumnHorizontalTCLong,
TipsInfo,
Loading
},
data() { data() {
return { return {
isShowLoading: true,
title: "共0个知识点", title: "共0个知识点",
token: '', token: '',
queryGDParams: { queryGDParams: {
...@@ -40,12 +50,6 @@ export default { ...@@ -40,12 +50,6 @@ export default {
knowledgeEffectList: [], knowledgeEffectList: [],
}; };
}, },
components: {
CommonHeader,
TitleKLGPoint,
ChartColumnHorizontalTCLong,
TipsInfo
},
created() { created() {
if (process.client) { if (process.client) {
...@@ -65,6 +69,7 @@ export default { ...@@ -65,6 +69,7 @@ export default {
async getStudyEffect(params) { async getStudyEffect(params) {
await getStudyEffect(params).then(res => { await getStudyEffect(params).then(res => {
if (res.code === "000000") { if (res.code === "000000") {
this.isShowLoading = false;
this.knowledgeEffectList = res.data.knowledgeEffectList || []; this.knowledgeEffectList = res.data.knowledgeEffectList || [];
this.title = `共${this.knowledgeEffectList.length}个知识点`; this.title = `共${this.knowledgeEffectList.length}个知识点`;
} }
......
<template> <template>
<section> <section>
<CommonHeader title="完成天数排名"></CommonHeader> <CommonHeader title="完成天数排名"></CommonHeader>
<CommonTitleMiniWithDropdown :title="listTitle" @selectSortItem="selectSortItem"></CommonTitleMiniWithDropdown> <CommonTitleWithDropdown :title="listTitle" @selectSortItem="selectSortItem"></CommonTitleWithDropdown>
<RankingItemDays class="pdt-50" :rankList="rankList"></RankingItemDays> <RankingItemDays class="pdt-50" :rankList="rankList"></RankingItemDays>
<CommonNoMore v-if="rankList.length >= 10" class="mt-10"></CommonNoMore> <CommonNoMore v-if="rankList.length >= 10" class="mt-10"></CommonNoMore>
<Loading v-show="isShowLoading"></Loading>
</section> </section>
</template> </template>
<script> <script>
...@@ -11,13 +12,22 @@ const cookies = require("cookie-universal")(); ...@@ -11,13 +12,22 @@ const cookies = require("cookie-universal")();
import { getStudyTimeData } from "@/service"; import { getStudyTimeData } from "@/service";
import CommonHeader from "@/components/common/common-header"; import CommonHeader from "@/components/common/common-header";
import CommonTitleMiniWithDropdown from "@/components/common/common-title-with-dropdown"; import CommonTitleWithDropdown from "@/components/common/common-title-with-dropdown";
import RankingItemDays from "@/components/bussiness/ranking-item-days"; import RankingItemDays from "@/components/bussiness/ranking-item-days";
import CommonNoMore from "@/components/common/common-no-more"; import CommonNoMore from "@/components/common/common-no-more";
import Loading from "@/components/common/common-loading";
export default { export default {
components: {
CommonHeader,
CommonTitleWithDropdown,
RankingItemDays,
CommonNoMore,
Loading
},
data() { data() {
return { return {
isShowLoading: true,
listTitle: '共0条数据', listTitle: '共0条数据',
rankList: [], rankList: [],
queryGDParams: { queryGDParams: {
...@@ -37,12 +47,6 @@ export default { ...@@ -37,12 +47,6 @@ export default {
}, },
}; };
}, },
components: {
CommonHeader,
CommonTitleMiniWithDropdown,
RankingItemDays,
CommonNoMore
},
created() { created() {
if (process.client) { if (process.client) {
...@@ -62,6 +66,7 @@ export default { ...@@ -62,6 +66,7 @@ export default {
async getStudyTimeData(params) { async getStudyTimeData(params) {
await getStudyTimeData(params).then(res => { await getStudyTimeData(params).then(res => {
if (res.code === "000000") { if (res.code === "000000") {
this.isShowLoading = false;
this.rankList = res.data.costRank; this.rankList = res.data.costRank;
// this.listTitle = `共${this.rankList.length}个省` // this.listTitle = `共${this.rankList.length}个省`
this.listTitle = `共${this.rankList.length}条数据` this.listTitle = `共${this.rankList.length}条数据`
...@@ -78,7 +83,7 @@ export default { ...@@ -78,7 +83,7 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.pdt-50 { .pdt-50 {
padding-top: 49px; padding-top: 50px;
} }
.mt-10 { .mt-10 {
margin-top: 10px !important; margin-top: 10px !important;
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<CommonTitleWithDropdown :dataList="dropdownList" :title="title" :needRightBtn="needRightBtn" @selectSortItem="selectSortItem"></CommonTitleWithDropdown> <CommonTitleWithDropdown :dataList="dropdownList" :title="title" :needRightBtn="needRightBtn" @selectSortItem="selectSortItem"></CommonTitleWithDropdown>
<RankingList class="pdt-50" :certFlag="certFlag" :rankList="rankList"></RankingList> <RankingList class="pdt-50" :certFlag="certFlag" :rankList="rankList"></RankingList>
<CommonNoMore v-if="rankList.length >= 10" class="mt-10"></CommonNoMore> <CommonNoMore v-if="rankList.length >= 10" class="mt-10"></CommonNoMore>
<Loading v-show="isShowLoading"></Loading>
</section> </section>
</template> </template>
<script> <script>
...@@ -14,10 +15,19 @@ import CommonHeader from "@/components/common/common-header"; ...@@ -14,10 +15,19 @@ import CommonHeader from "@/components/common/common-header";
import CommonTitleWithDropdown from "@/components/common/common-title-with-dropdown"; import CommonTitleWithDropdown from "@/components/common/common-title-with-dropdown";
import CommonNoMore from "@/components/common/common-no-more"; import CommonNoMore from "@/components/common/common-no-more";
import RankingList from "@/components/bussiness/ranking-item"; import RankingList from "@/components/bussiness/ranking-item";
import Loading from "@/components/common/common-loading";
export default { export default {
components: {
CommonHeader,
CommonTitleWithDropdown,
CommonNoMore,
RankingList,
Loading
},
data() { data() {
return { return {
isShowLoading: true,
title: '共0条数据', title: '共0条数据',
rankList: [], rankList: [],
needRightBtn: true, needRightBtn: true,
...@@ -49,12 +59,6 @@ export default { ...@@ -49,12 +59,6 @@ export default {
certFlag: 0 certFlag: 0
}; };
}, },
components: {
CommonHeader,
CommonTitleWithDropdown,
CommonNoMore,
RankingList
},
created() { created() {
if(process.client) { if(process.client) {
if(this.$route && this.$route.query) { if(this.$route && this.$route.query) {
...@@ -86,6 +90,7 @@ export default { ...@@ -86,6 +90,7 @@ export default {
async getStudyRankData(params) { async getStudyRankData(params) {
await getStudyRankData(params).then(res => { await getStudyRankData(params).then(res => {
if (res.code === "000000") { if (res.code === "000000") {
this.isShowLoading = false;
this.rankList = res.data.studyRank; this.rankList = res.data.studyRank;
this.title = `共${this.rankList.length}条数据` this.title = `共${this.rankList.length}条数据`
} }
...@@ -101,7 +106,7 @@ export default { ...@@ -101,7 +106,7 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.pdt-50 { .pdt-50 {
padding-top: 49px; padding-top: 50px;
} }
.mt-10 { .mt-10 {
margin-top: 10px !important; margin-top: 10px !important;
......
...@@ -22,6 +22,7 @@ Axios.interceptors.request.use( ...@@ -22,6 +22,7 @@ Axios.interceptors.request.use(
// config.headers.token = '3EB9111164E84A45B5B00428D52BC966'; // config.headers.token = '3EB9111164E84A45B5B00428D52BC966';
config.headers.token = cookies.get('lreporttoken') || '8F88F86408314155B6840723FAB7DAEC' || '299F66567E7C48C78ADE418B364C5A35' || 'F24CD42F1CFA46829639228E9CFE1E3D' || 'C284B868425D494386EAEF6C9AE99937'; config.headers.token = cookies.get('lreporttoken') || '8F88F86408314155B6840723FAB7DAEC' || '299F66567E7C48C78ADE418B364C5A35' || 'F24CD42F1CFA46829639228E9CFE1E3D' || 'C284B868425D494386EAEF6C9AE99937';
} }
// config.timeout = 30000;
return config; return config;
}, },
error => { error => {
...@@ -30,7 +31,8 @@ Axios.interceptors.request.use( ...@@ -30,7 +31,8 @@ Axios.interceptors.request.use(
error.code === 'ECONNABORTED' && error.code === 'ECONNABORTED' &&
error.message.indexOf('timeout') !== -1 error.message.indexOf('timeout') !== -1
) { ) {
VUE_ENV === 'client' && Toast({ message: '请求超时', duration: 1000 }); VUE_ENV === 'client' && Toast({ message: '系统繁忙,请稍后重新进入页面查询', duration: 1000 });
// VUE_ENV === 'client' && Toast({ message: '请求超时', duration: 1000 });
} }
return Promise.reject(error); return Promise.reject(error);
} }
...@@ -46,7 +48,7 @@ export default function(options) { ...@@ -46,7 +48,7 @@ export default function(options) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
Axios(options) Axios(options)
.then(res => { .then(res => {
const { status, data } = res; const { status, data } = res;
if (status !== 200) { if (status !== 200) {
let cmsg = REPONSE_CODE[status]; let cmsg = REPONSE_CODE[status];
...@@ -59,12 +61,14 @@ export default function(options) { ...@@ -59,12 +61,14 @@ export default function(options) {
if (data.code != '000000') { if (data.code != '000000') {
// 如果要是有其他特殊需求在此处添加 // 如果要是有其他特殊需求在此处添加
console.log(`调用后台接口报错,CODE: ${data.code},MESSAGE: ${data.message}。`); console.log(`调用后台接口报错,CODE: ${data.code},MESSAGE: ${data.message}。`);
// console.log(`调用后台接口报错,CODE: ${data.code},MESSAGE: ${data.message}。`);
} }
resolve(res.data); resolve(res.data);
}) })
.catch(error => { .catch(error => {
console.log('axios catch error: ', error.message); // console.log('axios catch error: ', error.message);
VUE_ENV === 'client' && Toast({ message: error.message, duration: 1000 }); VUE_ENV === 'client' && Toast({ message: '系统繁忙,请稍后重新进入页面查询', duration: 1000 });
// VUE_ENV === 'client' && Toast({ message: error.message, duration: 1000 });
// reject(error); // reject(error);
}) })
}) })
......
...@@ -2,7 +2,8 @@ const { NUXT_ENV_APP } = process.env; ...@@ -2,7 +2,8 @@ const { NUXT_ENV_APP } = process.env;
export const BASE_URL = { export const BASE_URL = {
// dev: 'https://dev-sc.yunqueyi.com', // dev: 'https://dev-sc.yunqueyi.com',
dev: 'https://uat-sc.yunqueyi.com', // dev: 'https://uat-sc.yunqueyi.com',
dev: 'https://sc.yunqueyi.com',
test: 'https://test1-sc.yunqueyi.com', test: 'https://test1-sc.yunqueyi.com',
uat: 'https://uat-sc.yunqueyi.com', uat: 'https://uat-sc.yunqueyi.com',
prod: 'https://sc.yunqueyi.com' prod: 'https://sc.yunqueyi.com'
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册