update:请求页面增加遮罩提示

This commit is contained in:
2021-10-18 17:46:33 +08:00
parent 3b4b4bc575
commit 1d7e944df2
3 changed files with 141 additions and 115 deletions

View File

@@ -1,5 +1,11 @@
<template> <template>
<div class="container"> <div
class="container"
v-loading="loading"
element-loading-text="页面加载中"
element-loading-spinner="el-icon-loading"
element-loading-background="#FFFFFF"
>
<div class="topBox"> <div class="topBox">
<div class="olderVersion"> <div class="olderVersion">
<div class="titleBox"> <div class="titleBox">
@@ -204,85 +210,92 @@ export default {
data() { data() {
return { return {
mode: false, mode: false,
loading: true,
data: { data: {
idCard: "", idCard: "",
userName: "无数据", userName: "无数据",
policiesRegulationsLists: { policiesRegulationsLists: {
totalCount: 0, totalCount: 0,
list: [ list: [
{ // {
title: "无数据", // title: "无数据",
publicTime: "无数据", // publicTime: "无数据",
area: "无数据" // area: "无数据"
}, // },
{ title: "无数据", publicTime: "无数据", area: "无数据" }, // { title: "无数据", publicTime: "无数据", area: "无数据" },
{ title: "无数据", publicTime: "无数据", area: "无数据" } // { title: "无数据", publicTime: "无数据", area: "无数据" }
] ]
}, },
prjList: [ prjList: [
{ {
name: "无数据", // name: "无数据",
currentState: "无数据", // currentState: "无数据",
area: "无数据", // area: "无数据",
zsbm: "无数据", // zsbm: "无数据",
year: "无数据", // year: "无数据",
zsjdh: "无数据", // zsjdh: "无数据",
fhpgList: [ fhpgList: [
{ // {
assessmentNo: "无数据", // assessmentNo: "无数据",
houseAddress: "无数据", // houseAddress: "无数据",
countValue: "无数据" // countValue: "无数据"
}, // },
{ // {
assessmentNo: "无数据", // assessmentNo: "无数据",
houseAddress: "无数据", // houseAddress: "无数据",
countValue: "无数据" // countValue: "无数据"
} // }
], ],
bcxyList: [ bcxyList: [
{ // {
xyNo: "无数据", // xyNo: "无数据",
houseAddress: "无数据", // houseAddress: "无数据",
switchProductionWay: "无数据", // switchProductionWay: "无数据",
summationShouldCompensateMoney: "无数据" // summationShouldCompensateMoney: "无数据"
}, // },
{ // {
xyNo: "无数据", // xyNo: "无数据",
houseAddress: "无数据", // houseAddress: "无数据",
switchProductionWay: "无数据", // switchProductionWay: "无数据",
summationShouldCompensateMoney: "无数据" // summationShouldCompensateMoney: "无数据"
} // }
]
},
{
name: "无数据",
currentState: "无数据",
area: "无数据",
zsbm: "无数据",
year: "无数据",
zsjdh: "无数据",
fhpgList: [
{
assessmentNo: "无数据",
houseAddress: "无数据",
countValue: "无数据"
}
],
bcxyList: [
{
xyNo: "无数据",
houseAddress: "无数据",
switchProductionWay: "无数据",
summationShouldCompensateMoney: "无数据"
}
] ]
} }
// {
// name: "无数据",
// currentState: "无数据",
// area: "无数据",
// zsbm: "无数据",
// year: "无数据",
// zsjdh: "无数据",
// fhpgList: [
// {
// assessmentNo: "无数据",
// houseAddress: "无数据",
// countValue: "无数据"
// }
// ],
// bcxyList: [
// {
// xyNo: "无数据",
// houseAddress: "无数据",
// switchProductionWay: "无数据",
// summationShouldCompensateMoney: "无数据"
// }
// ]
// }
] ]
} }
}; };
}, },
created() { created() {
if (!this.$route.query.ticket) {
window.location.replace(
"https://puser.zjzwfw.gov.cn/sso/mobile.do?action=oauth&scope=1&servicecode=fwzs"
);
} else {
this.onInit(); this.onInit();
}
this.setLocationAplus(); this.setLocationAplus();
SetTicket(this.$route.query.ticket); SetTicket(this.$route.query.ticket);
$(".logout").css("display", "none"); $(".logout").css("display", "none");
@@ -300,13 +313,7 @@ export default {
}, },
methods: { methods: {
// 获取数据 // 获取数据
onInit() { onInit() {
if (!this.$route.query.ticket) {
window.location.replace(
"https://puser.zjzwfw.gov.cn/sso/mobile.do?action=oauth&scope=1&servicecode=fwzs"
);
} else {
mgop({ mgop({
api: "mgop.kykj.houseexpropriat.getprjlist", api: "mgop.kykj.houseexpropriat.getprjlist",
host: "https://mapi.zjzwfw.gov.cn/", host: "https://mapi.zjzwfw.gov.cn/",
@@ -317,6 +324,7 @@ export default {
}, },
appKey: "es4b8zmz+2001833218+dehllx", appKey: "es4b8zmz+2001833218+dehllx",
onSuccess: data => { onSuccess: data => {
this.loading = false;
window.sessionStorage.setItem("homeData", JSON.stringify(data)); window.sessionStorage.setItem("homeData", JSON.stringify(data));
if (data.data.success) { if (data.data.success) {
this.data = data.data.data; this.data = data.data.data;
@@ -348,6 +356,7 @@ export default {
} }
}, },
onFail: err => { onFail: err => {
this.loading = false;
this.$notify({ this.$notify({
title: "错误", title: "错误",
message: "请求失败", message: "请求失败",
@@ -356,7 +365,6 @@ export default {
}); });
} }
}); });
}
}, },
toOlderMode() { toOlderMode() {
if (sessionStorage.getItem("mode") == "older") { if (sessionStorage.getItem("mode") == "older") {

View File

@@ -1,5 +1,11 @@
<template> <template>
<div class="container"> <div
class="container"
v-loading="loading"
element-loading-text="页面加载中"
element-loading-spinner="el-icon-loading"
element-loading-background="#FFFFFF"
>
<div class="title">{{ info.title }}</div> <div class="title">{{ info.title }}</div>
<div class="date">{{ modifyDate(info.publicTime) }}</div> <div class="date">{{ modifyDate(info.publicTime) }}</div>
<hr /> <hr />
@@ -13,6 +19,7 @@ import $ from "jquery";
export default { export default {
data() { data() {
return { return {
loading: true,
info: { info: {
title: "无数据", title: "无数据",
publicTime: "无数据" publicTime: "无数据"
@@ -47,6 +54,7 @@ export default {
}, },
appKey: "es4b8zmz+2001833218+dehllx", appKey: "es4b8zmz+2001833218+dehllx",
onSuccess: data => { onSuccess: data => {
this.loading = false;
if (data.data.success) { if (data.data.success) {
const { data: res } = data; const { data: res } = data;
this.info = res.data; this.info = res.data;
@@ -77,6 +85,7 @@ export default {
} }
}, },
onFail: function(err) { onFail: function(err) {
this.loading = false;
this.$notify({ this.$notify({
title: "错误", title: "错误",
message: "请求失败", message: "请求失败",

View File

@@ -1,5 +1,11 @@
<template> <template>
<div class="container"> <div
class="container"
v-loading="loading"
element-loading-text="页面加载中"
element-loading-spinner="el-icon-loading"
element-loading-background="#FFFFFF"
>
<div class="top"> <div class="top">
<div> <div>
<div> <div>
@@ -69,6 +75,7 @@ export default {
data() { data() {
return { return {
isLoading: true, isLoading: true,
loading: true,
info: { info: {
houseAddress: "无数据", houseAddress: "无数据",
valuationMethodText: "无数据", valuationMethodText: "无数据",
@@ -116,6 +123,7 @@ export default {
appKey: "es4b8zmz+2001833218+dehllx", appKey: "es4b8zmz+2001833218+dehllx",
onSuccess: data => { onSuccess: data => {
this.isLoading = false; this.isLoading = false;
this.loading = false;
window.sessionStorage.setItem("evaluateData", JSON.stringify(data)); window.sessionStorage.setItem("evaluateData", JSON.stringify(data));
if (data.data.success) { if (data.data.success) {
const { data: res } = data.data; const { data: res } = data.data;
@@ -146,6 +154,7 @@ export default {
}, },
onFail: err => { onFail: err => {
this.isLoading = false; this.isLoading = false;
this.loading = false;
this.$notify({ this.$notify({
title: "错误", title: "错误",
message: "请求失败", message: "请求失败",