Commit cd57e9b3 authored by xuke's avatar xuke

修改-能源消耗

parent fe361d1a
...@@ -7,7 +7,6 @@ import { ...@@ -7,7 +7,6 @@ import {
getOrganizationStructureInterface getOrganizationStructureInterface
} from "@/api/scheduling"; } from "@/api/scheduling";
import http from "../../api/http"; import http from "../../api/http";
import loading from "element-plus";
import store from "../../store"; import store from "../../store";
import { vFloatNumber } from "@/utils/directives.js"; import { vFloatNumber } from "@/utils/directives.js";
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
...@@ -32,12 +31,14 @@ const reset = () => { ...@@ -32,12 +31,14 @@ const reset = () => {
"energyName": '' "energyName": ''
} }
} }
const loading = ref(false)
const energyForm = ref() const energyForm = ref()
const dialogVisible = ref(false) const dialogVisible = ref(false)
const getEnergyData = () => { const getEnergyData = () => {
loading.value = true
http.post("/api/energy/getData", config.supplyType).then((res) => { http.post("/api/energy/getData", config.supplyType).then((res) => {
if (res.success) { if (res.success) {
loading.value = false
tableData.value = res.data; tableData.value = res.data;
ElMessage.success(res.message); ElMessage.success(res.message);
} else { } else {
...@@ -93,6 +94,8 @@ const handleSearch = () => { ...@@ -93,6 +94,8 @@ const handleSearch = () => {
// 重置按钮 // 重置按钮
const handleReset = () => { const handleReset = () => {
formInline.keyWord = "" formInline.keyWord = ""
config.supplyType = ["0", "1", "2", "3", "4"]
getEnergyData()
} }
const timeFormat = (time) => { const timeFormat = (time) => {
...@@ -257,6 +260,7 @@ function getOrganizationStructure() { ...@@ -257,6 +260,7 @@ function getOrganizationStructure() {
onMounted(() => { onMounted(() => {
getOrganizationStructure() getOrganizationStructure()
getEnergyData() getEnergyData()
}) })
</script> </script>
...@@ -302,7 +306,7 @@ onMounted(() => { ...@@ -302,7 +306,7 @@ onMounted(() => {
</table> </table>
<el-table :data="tableData" style="width: 100%;font-size: 12px;color: #181818;" <el-table v-loading="loading" :data="tableData" style="width: 100%;font-size: 12px;color: #181818;"
:header-cell-style="{ color: '#225475', backgroundColor: '#B8CFEE', 'text-align': 'center', height: '40px', padding: '0px', border: '1px solid #99bbe8' }" :header-cell-style="{ color: '#225475', backgroundColor: '#B8CFEE', 'text-align': 'center', height: '40px', padding: '0px', border: '1px solid #99bbe8' }"
:cell-style="{ 'text-align': 'center', padding: '0px' }" :row-style="{ height: '30px', padding: '0px' }" border :cell-style="{ 'text-align': 'center', padding: '0px' }" :row-style="{ height: '30px', padding: '0px' }" border
stripe max-height="633"> stripe max-height="633">
......
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