Merge pull request 'dengjie' (#308) from dengjie into dev
Reviewed-on: http://git.feashow.cn/clay/tunnel-cloud-web/pulls/308
This commit is contained in:
@@ -18,6 +18,19 @@
|
||||
body {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
.allLoading.el-loading-mask.is-fullscreen{
|
||||
.el-loading-spinner{
|
||||
.circular{
|
||||
width: 75px;
|
||||
height: 75px;
|
||||
}
|
||||
.el-loading-text{
|
||||
font-size: 26px;
|
||||
letter-spacing: 2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.el-container {
|
||||
height: 100%;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div id="used-ele" :style="{ backgroundColor: bgImage }" @click="handleOpenChart">
|
||||
<div v-if="electricityConsumptionMonthly===0||monthlySavings===0" class="showNull ">
|
||||
<div v-if="electricityConsumptionMonthly===0&&monthlySavings===0" class="showNull ">
|
||||
<div class="loading" v-if="loading===0"></div>
|
||||
{{ loading === 0 ? '加载中...' : '暂无数据~' }}
|
||||
</div>
|
||||
|
||||
@@ -364,12 +364,12 @@ const handleChangeMenu = (e) => {
|
||||
const getList = () => {
|
||||
const loading = ElLoading.service({
|
||||
lock: true,
|
||||
text: '正在加载系统资源',
|
||||
text: '正在加载系统资源...',
|
||||
background: 'rgba(0, 0, 0, 0.7)',
|
||||
customClass:'allLoading'
|
||||
})
|
||||
getEquipmentList(tunnelId).then(res => {
|
||||
if (res.code === 1000) {
|
||||
loading.close()
|
||||
fanData.value = res.data.frequencyChangerList
|
||||
res.data.windPressureSensorList.forEach(item => {
|
||||
item.offset = item.offset + 4000
|
||||
@@ -390,6 +390,7 @@ const getList = () => {
|
||||
}
|
||||
})
|
||||
}
|
||||
loading.close()
|
||||
})
|
||||
}
|
||||
const getTunnel = () => {
|
||||
|
||||
@@ -99,14 +99,15 @@ const form = ref({
|
||||
const getTunnel = () => {
|
||||
const loading = ElLoading.service({
|
||||
lock: true,
|
||||
text: '正在加载系统资源',
|
||||
text: '正在加载系统资源...',
|
||||
background: 'rgba(0, 0, 0, 0.7)',
|
||||
customClass:'allLoading'
|
||||
})
|
||||
getTunnelDetail(tunnelId).then((res) => {
|
||||
if (res?.code === 1000) {
|
||||
loading.close()
|
||||
form.value = res.data;
|
||||
}
|
||||
loading.close()
|
||||
});
|
||||
};
|
||||
getTunnel();
|
||||
|
||||
@@ -76,10 +76,11 @@ const handleLogin = (instance) => {
|
||||
await authStore.userLogin(loginForm).then((res) => {
|
||||
if (res) {
|
||||
ElLoading.service({
|
||||
text: "正在加载系统资源",
|
||||
background: "#409eff",
|
||||
lock: true,
|
||||
});
|
||||
text: '登录中...',
|
||||
background: 'rgba(0, 0, 0, 0.7)',
|
||||
customClass:'allLoading'
|
||||
})
|
||||
router.push("/");
|
||||
} else {
|
||||
getCode();
|
||||
@@ -89,14 +90,14 @@ const handleLogin = (instance) => {
|
||||
};
|
||||
|
||||
getCode();
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
ElLoading.service({
|
||||
text: "正在加载系统资源",
|
||||
background: "#409eff",
|
||||
lock: true,
|
||||
}).close();
|
||||
});
|
||||
text: '登录中...',
|
||||
background: 'rgba(0, 0, 0, 0.7)',
|
||||
customClass:'allLoading'
|
||||
}).close()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -204,15 +204,15 @@ const handleGoHome = () => {
|
||||
const getList = () => {
|
||||
const loading = ElLoading.service({
|
||||
lock: true,
|
||||
text: '正在加载系统资源',
|
||||
text: '正在加载系统资源...',
|
||||
background: 'rgba(0, 0, 0, 0.7)',
|
||||
customClass:'allLoading'
|
||||
})
|
||||
getSiteList({
|
||||
userId: userId,
|
||||
...pageInfo
|
||||
}).then((res) => {
|
||||
if (res.code === 1000) {
|
||||
loading.close()
|
||||
total.value = res.data.total;
|
||||
if (total.value == 0) {
|
||||
|
||||
@@ -230,8 +230,8 @@ const getList = () => {
|
||||
})
|
||||
siteList.value = res.data.rows;
|
||||
}
|
||||
loading.close()
|
||||
});
|
||||
|
||||
}
|
||||
getList()
|
||||
const handleClickSite = (type) => {
|
||||
@@ -268,10 +268,17 @@ const restFrom = () => {
|
||||
const handleEdit = (item) => {
|
||||
title.value = '编辑站点'
|
||||
restFrom()
|
||||
const loading = ElLoading.service({
|
||||
lock: true,
|
||||
text: '正在加载系统资源...',
|
||||
background: 'rgba(0, 0, 0, 0.7)',
|
||||
customClass:'allLoading'
|
||||
})
|
||||
getSiteDetail(item.siteId).then((res) => {
|
||||
form.value = res.data;
|
||||
form.value = item;
|
||||
isVisited.value = true
|
||||
loading.close()
|
||||
});
|
||||
}
|
||||
const handleUpload = (siteId) => {
|
||||
|
||||
@@ -325,15 +325,15 @@ getTunnel(siteId)
|
||||
const getList = () => {
|
||||
const loading = ElLoading.service({
|
||||
lock: true,
|
||||
text: '正在加载系统资源',
|
||||
text: '正在加载系统资源...',
|
||||
background: 'rgba(0, 0, 0, 0.7)',
|
||||
customClass:'allLoading'
|
||||
})
|
||||
getTunnelList({
|
||||
siteId: siteId,
|
||||
...pageInfo
|
||||
}).then(res => {
|
||||
if (res.code === 1000) {
|
||||
loading.close()
|
||||
total.value = res.data.total
|
||||
tunnelList.value = res.data.rows
|
||||
showFirst.value = total.value / pageInfo.pageSize >= 1;
|
||||
@@ -341,6 +341,7 @@ const getList = () => {
|
||||
} else {
|
||||
ElMessage.warning(res.msg)
|
||||
}
|
||||
loading.close()
|
||||
})
|
||||
}
|
||||
getList()
|
||||
|
||||
@@ -521,8 +521,10 @@ const changeTunnel = (e) => {
|
||||
showBadLoading.value = 0
|
||||
showWindLoading.value = 0
|
||||
showFanLoading.value = 0
|
||||
showUsedLoading.value = 0
|
||||
pageInfo.pageNum = 1
|
||||
getScreenInfo(newObj.value)
|
||||
showFan.value = false
|
||||
nextTick(() => {
|
||||
showFan.value = true;
|
||||
});
|
||||
|
||||
@@ -214,16 +214,24 @@ const handleAddUser = () => {
|
||||
}
|
||||
const handleEditUser = (row) => {
|
||||
reset()
|
||||
const loading = ElLoading.service({
|
||||
lock: true,
|
||||
text: '正在加载系统资源...',
|
||||
background: 'rgba(0, 0, 0, 0.7)',
|
||||
customClass:'allLoading'
|
||||
})
|
||||
getUserDetail(row.userId).then(res => {
|
||||
if (res.code === 1000) {
|
||||
getTunnel()
|
||||
form.value = res.data.user
|
||||
form.value.roleId = res.data.roleIds[0]
|
||||
form.value.tunnelList = res.data.user.tunnelList
|
||||
title.value = '修改用户'
|
||||
isVisited.value = true
|
||||
}
|
||||
loading.close()
|
||||
})
|
||||
title.value = '修改用户'
|
||||
isVisited.value = true
|
||||
|
||||
}
|
||||
|
||||
const handleDelete = () => {
|
||||
@@ -266,8 +274,9 @@ getRoleOptionInfo()
|
||||
const getInfo = () => {
|
||||
const loading = ElLoading.service({
|
||||
lock: true,
|
||||
text: '正在加载系统资源',
|
||||
text: '正在加载系统资源...',
|
||||
background: 'rgba(0, 0, 0, 0.7)',
|
||||
customClass:'allLoading'
|
||||
})
|
||||
getUser({
|
||||
siteId: siteId,
|
||||
@@ -275,11 +284,11 @@ const getInfo = () => {
|
||||
...pageInfo
|
||||
}).then(res => {
|
||||
if (res.code === 1000) {
|
||||
loading.close()
|
||||
userData.value = res.data.rows
|
||||
total.value = res.data.total
|
||||
showFirst.value = total.value / pageInfo.pageSize >= 1;
|
||||
}
|
||||
loading.close()
|
||||
})
|
||||
}
|
||||
getInfo()
|
||||
|
||||
Reference in New Issue
Block a user