Commit d18c8707 authored by wangjc's avatar wangjc

Merge branch 'b-master' of http://gitlab.91isoft.com:90/hikvision/web-project into b-master

parents f08ff3d0 99bf2880
This source diff could not be displayed because it is too large. You can view the blob instead.
export const configboilergetData = {
"success": true,
"status": 0,
"message": "操作成功",
"data": {
"configId": "4df176da-3ea2-4fb5-8cae-0961bdb064e1",
"openingOfElectricValve": 85.00,
"boilerOutletWaterTemperature": 0.00,
"holdingTime": 15,
"upperLlimitMainFlow": 330.00,
"lowerLlimitMainFlow": 220.00,
"maxTargetTemperature": 90,
"bestHoldingTime": 15,
"transferIds": "'79bf5f12-cd45-44d3-b6b7-83d5c9d72068',79bf5f12-cd45-44d3-b6b7-83d5c9d72068",
"updateNullFields": null
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
export const SchedulingWeatherConditionGet = {
"success": true,
"status": 0,
"message": "操作成功",
"data": [
{
"phenomenonId": "58b5627c-f169-4db1-aa85-543f80a5dbfd",
"phenomenonName": "晴天",
"phenomenonType": 1,
"phenomenonTemp": 1.00,
"phenomenonDesc": "晴天1",
"updateNullFields": ""
},
{
"phenomenonId": "49c936d4-2c50-47a0-97cb-bb621997cce7",
"phenomenonName": "阴天",
"phenomenonType": 3,
"phenomenonTemp": -3.00,
"phenomenonDesc": "阴天",
"updateNullFields": ""
},
{
"phenomenonId": "77d96cbf-d731-4a01-be13-d156826d2514",
"phenomenonName": "多云",
"phenomenonType": 2,
"phenomenonTemp": -1.00,
"phenomenonDesc": "多云",
"updateNullFields": ""
}
]
}
This source diff could not be displayed because it is too large. You can view the blob instead.
export const SchedulingWindConfigurationGet = {
"success": true,
"status": 0,
"message": "操作成功",
"data": [
{
"windId": "7a24acbf-94a7-4b12-91a5-07b515c1bbee",
"windLevel": "3",
"windTemp": -0.87,
"windDesc": "三级风",
"updateNullFields": ""
},
{
"windId": "4b9ba589-f444-4a8b-aa90-189033fb5b87",
"windLevel": "8",
"windTemp": -2.20,
"windDesc": "八级风",
"updateNullFields": ""
},
{
"windId": "0d41fc6b-7462-4173-a09f-2d24178db98c",
"windLevel": "6",
"windTemp": -1.60,
"windDesc": "六级风",
"updateNullFields": ""
},
{
"windId": "9ece9ca5-c61b-4ace-88e9-5e98ea283c25",
"windLevel": "4",
"windTemp": -1.18,
"windDesc": "四级风",
"updateNullFields": ""
},
{
"windId": "a0b89a4b-8621-4419-8122-78acbdd44b9c",
"windLevel": "5",
"windTemp": -1.40,
"windDesc": "五级风",
"updateNullFields": ""
},
{
"windId": "5df5a1fa-bc68-4c4f-8167-85a017e26b32",
"windLevel": "7",
"windTemp": -2.20,
"windDesc": "七级风",
"updateNullFields": ""
},
{
"windId": "d191aefc-638f-46e2-8ee4-b0430ee66cce",
"windLevel": "2",
"windTemp": -0.50,
"windDesc": "二级风",
"updateNullFields": ""
},
{
"windId": "d0502a9b-2e9a-40f5-8af4-b56e2c60f8d0",
"windLevel": "10",
"windTemp": -2.60,
"windDesc": "十级风",
"updateNullFields": ""
},
{
"windId": "fdabd74d-8833-4cbc-9533-ef0adc5ad13c",
"windLevel": "1",
"windTemp": -0.50,
"windDesc": "一级风",
"updateNullFields": ""
}
]
}
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -80,6 +80,7 @@ import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import store from "../../store/index";
import { getFileName } from '../../utils/utils';
import CfgSupply from '../../components/CfgSupply.vue';
import {boilerTitle , boilerHistory } from '../../dataJson/history/mock.js'; //导入模拟数据
//分页设置
const currentPage = ref(1)
......@@ -256,7 +257,9 @@ function getdata() {
}
function getcolumn() {
http.post("/api/boiler/Title", { enterpriseId: enterpriseId.value, deviceType: 2 }).then((result) => {
//模拟的title数据
var result = boilerTitle;
// http.post("/api/boiler/Title", { enterpriseId: enterpriseId.value, deviceType: 2 }).then((result) => {
titleData.value = result.data.otherList;
var dataRows = new Array();
result.data.frozenList.forEach((element) => {
......@@ -290,7 +293,7 @@ function getcolumn() {
i++;
})
otherList = othrows;
})
// })
}
// 获取数据列表
......@@ -303,7 +306,10 @@ function getBoiler() {
HisBoilerInfo.pageCount = pageSize.value - 1;
}
console.log(HisBoilerInfo);
http.post("/api/boiler/History", HisBoilerInfo).then((result) => {
//模拟的静态数据列表
var result = boilerHistory;
// http.post("/api/boiler/History", HisBoilerInfo).then((result) => {
console.log(result);
tableData.value = null;
if(result.data !== null){
......@@ -317,7 +323,7 @@ function getBoiler() {
total.value = 0;
}
loading.value = false;
});
// });
}
function setCellStyle({ row, column, rowIndex, columnIndex }) {
......@@ -456,7 +462,7 @@ function getchart() {
const series = reactive([]);
const titles = reactive([]);
const title = ref();
let id = "";
id = HisBoilerInfo.id[0];
HisBoilerInfo.id = [];
......@@ -577,4 +583,4 @@ function getchart() {
margin-top: -20px;
margin-right: 30px;
}
</style>
\ No newline at end of file
</style>
......@@ -96,6 +96,7 @@ import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import store from "../../store/index";
import { getFileName } from '../../utils/utils';
import CfgSupply from '../../components/CfgSupply.vue';
import {deviceTitle3, deviceHistory3} from '../../dataJson/history/mock.js'; //导入模拟数据
//分页设置
const currentPage = ref(1)
......@@ -272,7 +273,9 @@ function getdata() {
}
function getcolumn() {
http.post("/api/device/Title", { enterpriseId: enterpriseId.value, deviceType: 7 }).then((result) => {
// http.post("/api/device/Title", { enterpriseId: enterpriseId.value, deviceType: 7 }).then((result) => {
// 模拟静态title数据
var result = deviceTitle3
titleData.value = result.data.otherList;
var dataRows = new Array();
result.data.frozenList.forEach((element) => {
......@@ -285,7 +288,7 @@ function getcolumn() {
filter: element.filter,
color: element.color,
isVisible: true
});
// });
})
frozenList = dataRows;
......@@ -318,7 +321,9 @@ function getdevice() {
HisdeviceInfo.pageIndex = ((currentPage.value - 1) * pageSize.value) + 1;
HisdeviceInfo.pageCount = pageSize.value - 1;
}
http.post("/api/device/History", HisdeviceInfo).then((result) => {
// http.post("/api/device/History", HisdeviceInfo).then((result) => {
// 模拟后端数据
var result = deviceHistory3;
console.log(result);
tableData.value = null;
if(result.data !== null){
......@@ -332,7 +337,7 @@ function getdevice() {
total.value = 0;
}
loading.value = false;
});
// });
}
function setCellStyle({ row, column, rowIndex, columnIndex }) {
......@@ -474,7 +479,7 @@ function getchart() {
const series = reactive([]);
const titles = reactive([]);
const title = ref();
let id = "";
id = HisdeviceInfo.id[0];
HisdeviceInfo.id = [];
......@@ -596,4 +601,4 @@ function getchart() {
margin-top: -20px;
margin-right: 30px;
}
</style>
\ No newline at end of file
</style>
......@@ -80,6 +80,7 @@ import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import store from "../../store/index";
import { getFileName } from '../../utils/utils';
import CfgSupply from '../../components/CfgSupply.vue';
import {deviceTitle2, deviceHistory2} from '../../dataJson/history/mock.js'; //导入模拟数据
//分页设置
const currentPage = ref(1)
......@@ -256,7 +257,10 @@ function getdata() {
}
function getcolumn() {
http.post("/api/device/Title", { enterpriseId: enterpriseId.value, deviceType: 4 }).then((result) => {
// http.post("/api/device/Title", { enterpriseId: enterpriseId.value, deviceType: 4 }).then((result) => {
// 模拟静态title数据
var result = deviceTitle2
titleData.value = result.data.otherList;
var dataRows = new Array();
result.data.frozenList.forEach((element) => {
......@@ -290,7 +294,7 @@ function getcolumn() {
i++;
})
otherList = othrows;
})
// })
}
//获取数据列表
......@@ -303,7 +307,8 @@ function getdevice() {
HisdeviceInfo.pageCount = pageSize.value - 1;
}
console.log(HisdeviceInfo.interval);
http.post("/api/device/History", HisdeviceInfo).then((result) => {
// http.post("/api/device/History", HisdeviceInfo).then((result) => {
var result = deviceHistory2
console.log(result);
tableData.value = null;
if(result.data !== null){
......@@ -317,7 +322,7 @@ function getdevice() {
total.value = 0;
}
loading.value = false;
});
// });
}
function setCellStyle({ row, column, rowIndex, columnIndex }) {
......@@ -460,7 +465,7 @@ function getchart() {
const series = reactive([]);
const titles = reactive([]);
const title = ref();
let id = "";
id = HisdeviceInfo.id[0];
HisdeviceInfo.id = [];
......@@ -582,4 +587,4 @@ function getchart() {
margin-top: -20px;
margin-right: 30px;
}
</style>
\ No newline at end of file
</style>
......@@ -79,6 +79,7 @@ import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import store from "../../store/index";
import { getFileName } from '../../utils/utils';
import CfgSupply from '../../components/CfgSupply.vue';
import {deviceTitle1, deviceHistory1} from '../../dataJson/history/mock.js'; //导入模拟数据
//分页设置
const currentPage = ref(1)
......@@ -255,7 +256,9 @@ function getdata() {
}
function getcolumn() {
http.post("/api/device/Title", { enterpriseId: enterpriseId.value, deviceType: 6 }).then((result) => {
// http.post("/api/device/Title", { enterpriseId: enterpriseId.value, deviceType: 6 }).then((result) => {
//模拟静态title数据
var result = deviceTitle1
titleData.value = result.data.otherList;
var dataRows = new Array();
result.data.frozenList.forEach((element) => {
......@@ -289,7 +292,7 @@ function getcolumn() {
i++;
})
otherList = othrows;
})
// })
}
//获取数据列表
......@@ -302,7 +305,10 @@ function getdevice() {
HisdeviceInfo.pageCount = pageSize.value - 1;
}
console.log(HisdeviceInfo.interval);
http.post("/api/device/History", HisdeviceInfo).then((result) => {
// http.post("/api/device/History", HisdeviceInfo).then((result) => {
//模拟静态的数据
const result = deviceHistory1
console.log(result);
tableData.value = null;
if(result.data !== null){
......@@ -316,7 +322,7 @@ function getdevice() {
total.value = 0;
}
loading.value = false;
});
// });
}
function setCellStyle({ row, column, rowIndex, columnIndex }) {
......@@ -459,7 +465,7 @@ function getchart() {
const series = reactive([]);
const titles = reactive([]);
const title = ref();
let id = "";
id = HisdeviceInfo.id[0];
HisdeviceInfo.id = [];
......@@ -581,4 +587,4 @@ function getchart() {
margin-top: -20px;
margin-right: 30px;
}
</style>
\ No newline at end of file
</style>
......@@ -81,6 +81,10 @@ import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import store from "../../store/index";
import { getFileName } from '../../utils/utils';
import CfgSupply from '../../components/CfgSupply.vue';
import { pipeTitle,pipeHistory} from '../../dataJson/history/mock.js'; //导入模拟数据
console.log("sss")
console.log(pipeHistory)
//分页设置
const currentPage = ref(1)
......@@ -281,7 +285,9 @@ function getdata() {
}
function getcolumn() {
http.post("/api/pipe/Title", { enterpriseId: enterpriseId.value, deviceType: HisPipeInfo.deviceType }).then((result) => {
//自己定义的静态数据
var result = pipeTitle
// http.post("/api/pipe/Title", { enterpriseId: enterpriseId.value, deviceType: HisPipeInfo.deviceType }).then((result) => {
if(result.success){
titleData.value = result.data.otherList;
frozenList.length = 0;
......@@ -315,10 +321,11 @@ function getcolumn() {
i++;
})
}
})
// })
}
//获取数据列表
function getPipe() {
console.log(HisPipeInfo.startTime);
if (currentPage.value == 1) {
......@@ -328,18 +335,21 @@ function getPipe() {
HisPipeInfo.pageIndex = ((currentPage.value - 1) * pageSize.value) + 1;
HisPipeInfo.pageCount = pageSize.value - 1;
}
if (HisPipeInfo.interval === undefined) {
HisPipeInfo.interval = 2;
}
http.post("/api/pipe/History", HisPipeInfo).then((result) => {
// if (HisPipeInfo.interval === undefined) {
// HisPipeInfo.interval = 2;
// }
//模拟的数据
var result = pipeHistory
// http.post("/api/pipe/History", HisPipeInfo).then((result) => {
tableData.value = result.data.dataInfoList;
total.value = result.data.rowCount;
if(result.data === null || HisPipeInfo.id.length < 1){
// if(result.data === null || HisPipeInfo.id.length < 1) 由于是模拟数据,修改一下判断条件
if(result.data === null || HisPipeInfo.id.length === 1){
tableData.value = null;
total.value = 0;
}
loading.value = false;
});
// });
}
function setCellStyle({ row, column, rowIndex, columnIndex }) {
......@@ -484,7 +494,7 @@ function getchart() {
const series = reactive([]);
const titles = reactive([]);
const title = ref();
let id = "";
id = HisPipeInfo.id[0];
HisPipeInfo.id = [];
......@@ -621,4 +631,4 @@ function getchart() {
width: 100%;
height: 160px;
}
</style>
\ No newline at end of file
</style>
......@@ -69,7 +69,7 @@
<el-table :data="tableData" :height="tableHeight" v-loading="loading" :cell-style="setCellStyle" id="out-table"
border highlight-current-row :header-cell-style="setHeaderCellStyle" @sort-change="sortMethod" :header-cell-class-name="handleHeadAddClass" >
<el-table-column v-for="(item, i) in frozenList" :prop="item.field" :label="item.title" :width="item.width"
:sortable="(item.field === 'name' || item.field === 'gatherTime') ? true : false"
:sortable="(item.field === 'name' || item.field === 'gatherTime') ? true : false"
fixed />
<template v-for="(item, i) in otherList">
<el-table-column v-if="item.isVisible" :prop="item.enName" :label="item.alias" :width="item.width"></el-table-column>
......@@ -101,6 +101,7 @@ import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import store from "../../store/index";
import { getFileName } from '../../utils/utils';
import CfgSupply from '../../components/CfgSupply.vue';
import { transferHisTitle,transferHistory} from '../../dataJson/history/mock.js'; //导入模拟数据
//分页设置
const currentPage = ref(1)
......@@ -282,7 +283,9 @@ function getSupplys(){
}
function getcolumn() {
http.post("/api/transfer/HisTitle", enterpriseId.value).then((result) => {
//模拟静态title数据
var result = transferHisTitle
// http.post("/api/transfer/HisTitle", enterpriseId.value).then((result) => {
titleData.value = result.data.otherList;
var dataRows = new Array();
result.data.frozenList.forEach((element) => {
......@@ -316,7 +319,7 @@ function getcolumn() {
i++;
})
otherList = othrows;
})
// })
}
//获取数据列表
......@@ -328,7 +331,9 @@ function gettransfer() {
HistransferInfo.pageIndex = ((currentPage.value - 1) * pageSize.value) + 1;
HistransferInfo.pageCount = pageSize.value - 1;
}
http.post("/api/transfer/History", HistransferInfo).then((result) => {
//模拟静态数据列表
var result = transferHistory
// http.post("/api/transfer/History", HistransferInfo).then((result) => {
console.log(HistransferInfo);
tableData.value = null;
if(result.data !== null){
......@@ -340,7 +345,7 @@ function gettransfer() {
total.value = 0;
}
loading.value = false;
});
// });
}
function setCellStyle({ row, column, rowIndex, columnIndex }) {
......@@ -483,7 +488,7 @@ function getchart() {
const series = reactive([]);
const titles = reactive([]);
const title = ref();
let id = "";
id = HistransferInfo.id[0];
HistransferInfo.id = [];
......@@ -496,7 +501,7 @@ function getchart() {
if(ele.value === id){
title.value = ele.label;
}
})
})
})
})
http.post("/api/transfer/Curve", HistransferInfo).then((result) => {
......@@ -617,4 +622,4 @@ function getchart() {
margin-right: 10px;
flex-wrap: nowrap;
}
</style>
\ No newline at end of file
</style>
......@@ -79,6 +79,7 @@ import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import store from "../../store/index";
import { getFileName } from '../../utils/utils';
import CfgSupply from '../../components/CfgSupply.vue';
import { deviceTitle,deviceHistory} from '../../dataJson/history/mock.js'; ////导入模拟数据
//分页设置
const currentPage = ref(1)
......@@ -255,7 +256,9 @@ function getdata() {
}
function getcolumn() {
http.post("/api/device/Title", { enterpriseId: enterpriseId.value, deviceType: 5 }).then((result) => {
//模拟静态title数据
var result = deviceTitle;
// http.post("/api/device/Title", { enterpriseId: enterpriseId.value, deviceType: 5 }).then((result) => {
titleData.value = result.data.otherList;
var dataRows = new Array();
result.data.frozenList.forEach((element) => {
......@@ -289,21 +292,42 @@ function getcolumn() {
i++;
})
otherList = othrows;
})
// })
}
//获取数据列表
function getdevice() {
// if (currentPage.value == 1 ) {
// HisdeviceInfo.pageIndex = 0;
// HisdeviceInfo.pageCount = pageSize.value;
// } else {
// HisdeviceInfo.pageIndex = ((currentPage.value - 1) * pageSize.value) + 1;
// HisdeviceInfo.pageCount = pageSize.value - 1;
// }
// 初始化分页参数
let startIndex = 0;
let endIndex = 0;
if (currentPage.value == 1) {
HisdeviceInfo.pageIndex = 0;
HisdeviceInfo.pageCount = pageSize.value;
startIndex = 0;
endIndex = 30; // 第一页显示 30 条数据
} else if (currentPage.value == 2) {
startIndex = 30;
endIndex = 50; // 第二页显示剩余的 20 条数据
} else {
HisdeviceInfo.pageIndex = ((currentPage.value - 1) * pageSize.value) + 1;
HisdeviceInfo.pageCount = pageSize.value - 1;
// 如果页码超出范围,可以设置为空数据或其他处理
tableData.value = null;
total.value = 0;
loading.value = false;
return;
}
//console.log(HisdeviceInfo.interval);
http.post("/api/device/History", HisdeviceInfo).then((result) => {
// http.post("/api/device/History", HisdeviceInfo).then((result) => {
//模拟的数据
var result = deviceHistory
console.log(result);
tableData.value = null;
if(result.data !== null){
......@@ -312,12 +336,14 @@ function getdevice() {
console.log(tableData.value);
}
if(result.data === null || HisdeviceInfo.id.length < 1){
// if(result.data === null || HisdeviceInfo.id.length < 1)
if(result.data === null || HisdeviceInfo.id.length ===1) {
tableData.value = null;
total.value = 0;
}
loading.value = false;
});
// });
}
function setCellStyle({ row, column, rowIndex, columnIndex }) {
......@@ -385,7 +411,7 @@ function currentTime() {
// 导出表格 按钮点击后触发事件
async function exportExcel () {
sessionStorage.setItem("DeviceQueryStart", HisdeviceInfo.startTime);
sessionStorage.setItem("DeviceQueryEnd", HisdeviceInfo.endTime);
HisdeviceInfo.pageIndex = 0;
......@@ -459,7 +485,7 @@ function getchart() {
const series = reactive([]);
const titles = reactive([]);
const title = ref();
let id = "";
id = HisdeviceInfo.id[0];
HisdeviceInfo.id = [];
......@@ -581,4 +607,4 @@ function getchart() {
margin-top: -20px;
margin-right: 30px;
}
</style>
\ No newline at end of file
</style>
<script lang="ts" setup>
import {computed, onBeforeMount, onMounted, reactive, ref, watchEffect} from "vue";
import {
/*import {
getAnnualParam,
alterAnnualParam,
addAnnualParam,
......@@ -8,7 +8,10 @@ import {
getOrganizationStructureInterface
} from '@/api/scheduling.js'
import {ElMessage, ElMessageBox} from "element-plus";
import {vFloatNumber} from "@/utils/directives.js";
import {vFloatNumber} from "@/utils/directives.js";*/
//静态
import {SchedulingBizHeatSetGetListByYear,homeGetOrg} from '@/dataJson/Scheduling/AnnualParam'
const data = ref([])
const dataBackup = ref([])
......@@ -124,19 +127,40 @@ const selectYearValue = computed(() => {
const organizationStructure = ref([]) // 组织结构数据
const supplyData = ref([]) // 供热站数据
//静态
function getOrganizationStructure() {
organizationStructure.value = homeGetOrg.data
getSupply()
}
/*function getOrganizationStructure() {
getOrganizationStructureInterface().then(res => {
organizationStructure.value = res.data
getSupply()
}).catch(err => {
ElMessage.error('接口异常,获取数据失败.')
})
} // 获取组织结构
}*/ // 获取组织结构
//静态
function getData() {
const params = {
year: searchKey.value
}
data.value = SchedulingBizHeatSetGetListByYear.data
for (let item of data.value) {
if(item.supplyId.includes('00000000-0000-0000-0000-000000000000')){
delete item.supplyId
}
}
dataBackup.value = [...data.value]
}
/*function getData() {
const params = {
year: searchKey.value
}
getAnnualParam(params).then(res=>{
data.value = res.data
console.log( '111111111111111',data.value)
......@@ -147,7 +171,7 @@ function getData() {
}
dataBackup.value = [...data.value]
})
}
}*/
function handleEdit(val) {
currentYear.value = new Date().getFullYear()
......@@ -552,7 +576,8 @@ function getSupply() {
</template>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="onReviseSubmit">保存</el-button>
<!-- 删除 @click="onReviseSubmit" 不保存-->
<el-button type="primary">保存</el-button>
<el-button type="primary" @click="handleClose">关闭</el-button>
</div>
</template>
......@@ -638,7 +663,8 @@ function getSupply() {
</template>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" :loading="addSaveBtnLoading" @click="onAddSubmit">保存</el-button>
<!-- 删除 @click="onAddSubmit" 不保存 -->
<el-button type="primary" :loading="addSaveBtnLoading">保存</el-button>
<el-button type="primary" @click="handleClose">关闭</el-button>
</div>
</template>
......
......@@ -150,7 +150,8 @@
<th rowspan="3">
<div>
<div class="btngrounp">
<el-button type="primary" @click="onSave">保存</el-button>
<!-- 删除 @click="onSave" 不执行保存-->
<el-button type="primary">保存</el-button>
<el-button type="primary" style="margin: 0 0 0 5px" @click="onCancel">关闭</el-button>
</div>
</div>
......@@ -164,7 +165,7 @@
</template>
<script setup>
import { ref, reactive, onMounted, onUnmounted, onBeforeMount,watch } from "vue";
import { postConfigBoilerUpdate } from "@/api/scheduling.js";
//import { postConfigBoilerUpdate } from "@/api/scheduling.js";
import http from "../../api/http";
import { ElMessage } from "element-plus";
const options = reactive([]);
......@@ -172,6 +173,8 @@ import store from "../../store/index";
import { vFloatNumber } from "@/utils/directives.js";
import { nextTick } from "vue";
import { useRoute } from 'vue-router'
//静态
import { configboilergetData } from '@/dataJson/Scheduling/ConfigBoiler.js'
const loading = ref(false)
const form = ref({
types: [],
......@@ -233,7 +236,16 @@ const rules = reactive({
});
// 获取数据列表
//静态
const getListData = () => {
loading.value = true
formDatas.value = configboilergetData.data;
formDatas.value.transferIds = formDatas.value.transferIds.split(",");
formDatas.value.updateNullFields = "";
loading.value = false
};
/*const getListData = () => {
loading.value = true
http.get("/api/configboiler/getData").then((result) => {
if (result.success) {
......@@ -246,7 +258,7 @@ const getListData = () => {
}).catch(err => {
console.log(err);
});
};
};*/
// 保存修改
const onSave = async () => {
......
......@@ -10,6 +10,12 @@ import {
import http from "../../api/http";
import store from "../../store";
import { vFloatNumber } from "@/utils/directives.js";
//静态
import {
homeGetOrg,
energygetData
} from '@/dataJson/Scheduling/EnergyManage.js'
const { proxy } = getCurrentInstance();
const tableData = ref([{}]);
// 获取渲染
......@@ -42,7 +48,9 @@ const getEnergyData = () => {
if(config.supplyType.length === 0) {
config.supplyType = ["0", "1", "2", "3", "4"]
}
http.post("/api/energy/getData", config.supplyType).then((res) => {
loading.value = false;
tableData.value = energygetData.data
/* http.post("/api/energy/getData", config.supplyType).then((res) => {
if (res.success) {
loading.value = false
tableData.value = res.data;
......@@ -53,7 +61,7 @@ const getEnergyData = () => {
})
.catch((err) => {
console.log(error);
});
});*/
};
const tableLabel = reactive([
......@@ -306,6 +314,10 @@ function getSupply() {
}
// 根据组织结构获取供热站数据
function getOrganizationStructure() {
organizationStructure.value = homeGetOrg.data
getSupply()
}
/*function getOrganizationStructure() {
getOrganizationStructureInterface().then(res => {
organizationStructure.value = res.data
getSupply()
......@@ -313,7 +325,7 @@ function getOrganizationStructure() {
}).catch(err => {
ElMessage.error('接口异常,获取数据失败.')
})
}
}*/
function sortByEnergyLevel(a, b) {
return a.energyType - b.energyType;
}
......@@ -431,7 +443,9 @@ onMounted(() => {
<el-button link type="primary" size="small" @click="handleEdit(scope.row)">
编辑
</el-button>
<el-button link type="primary" size="small" @click="handleDelete(scope.row)">删除</el-button>
<!-- 删除 @click="handleDelete(scope.row)" 不执行删除 -->
<!-- @click="handleDelete(scope.row)"-->
<el-button link type="primary" size="small">删除</el-button>
</template>
</el-table-column>
<template #empty>
......@@ -513,7 +527,8 @@ onMounted(() => {
</table>
<div class="dialog-footer">
<el-button type="primary" @click="handleCancel(energyForm)">关闭</el-button>
<el-button type="primary" :loading="addSaveBtnLoading" @click="onSubmit()">保存</el-button>
<!-- 删除 @click="onSubmit()" 不执行删除 -->
<el-button type="primary" :loading="addSaveBtnLoading" >保存</el-button>
</div>
</el-form>
</el-dialog>
......
......@@ -81,7 +81,8 @@
</table>
</el-form>
<div class="btngrounp">
<el-button type="primary" @click="onSave">保存</el-button>
<!-- 删除 @click="onSave" 不执行保存 -->
<el-button type="primary">保存</el-button>
<el-button type="primary" style="margin: 0 0 0 5px" @click="onCancel">关闭</el-button>
</div>
</el-card>
......@@ -91,11 +92,14 @@
</template>
<script setup>
import { ref, reactive, onMounted, onUnmounted, watch } from "vue";
import { postInstantHeat, postInstantHeatUpdate } from "@/api/scheduling"
//import { postInstantHeat, postInstantHeatUpdate } from "@/api/scheduling"
import { ElMessage } from "element-plus";
import http from "../../api/http";
import { vFloatNumber } from "@/utils/directives.js";
import { useRoute } from 'vue-router'
//静态
import { SchedulingBizInstantaneousHeatGet } from '@/dataJson/Scheduling/InstantHeat.js'
const loading = ref(false)
const formRef = ref()
......@@ -145,8 +149,14 @@ const rules = reactive({
{ pattern: /^.{1,200}$/, "message": "备注必须是1-200位字符", trigger: "blur" }
]
});
const getInstanceHeat = () => {
loading.value = true
List.value = SchedulingBizInstantaneousHeatGet.data[0]
console.log("res.data===>", SchedulingBizInstantaneousHeatGet.data);
loading.value = false
}
/*const getInstanceHeat = () => {
loading.value = true
http.post("api/Scheduling/BizInstantaneousHeat/Get", false).then(res => {
if (res.success) {
......@@ -155,7 +165,7 @@ const getInstanceHeat = () => {
loading.value = false
}
})
}
}*/
const onSave = async () => {
await formRef.value.validate()
await http.post("/api/Scheduling/BizInstantaneousHeat/Update", { ...List.value }, false).then((res) => {
......
<script setup>
import {onMounted, ref, reactive, onBeforeMount} from "vue";
import {ElMessage, ElMessageBox} from "element-plus";
import {getPhenomenon, addPhenomenon, alterPhenomenon, deletePhenomenon} from "@/api/scheduling.js"
//import {getPhenomenon, addPhenomenon, alterPhenomenon, deletePhenomenon} from "@/api/scheduling.js"
import {vFloatNumber} from "@/utils/directives.js";
//静态
import {SchedulingWeatherConditionGet} from "@/dataJson/Scheduling/Phenomenon.js"
const data = ref()
const dataBackup = ref([])
const searchKey = ref('') // 查询参数
......@@ -206,11 +209,16 @@ onMounted(() => {
})
function getData() {
data.value = SchedulingWeatherConditionGet.data
dataBackup.value = [data.value]
}
/*function getData() {
getPhenomenon().then(res => {
data.value = res.data
dataBackup.value = [...data.value]
})
}
}*/
function customSort(a, b) {
return b.phenomenonType - a.phenomenonType
......@@ -341,7 +349,8 @@ function customSort(a, b) {
</template>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" :loading="addSaveBtnLoading" @click="onAddSubmit">保存</el-button>
<!-- 删除 @click="onAddSubmit" 不执行保存 -->
<el-button type="primary" :loading="addSaveBtnLoading" >保存</el-button>
<el-button type="primary" @click="handleClose">关闭</el-button>
</div>
......
......@@ -2,16 +2,22 @@
import {computed, isRef, onBeforeMount, onMounted, reactive, ref, shallowRef} from "vue";
import ReviseWindow from "./weatherManageSub/ReviseWindow.vue";
import BindWindow from "./weatherManageSub/BindWindow.vue";
import {
/*import {
getWeatherMagData,
alterWeatherMagData,
deleteWeatherMagData,
getOrganizationStructureInterface
} from '@/api/scheduling.js'
} from '@/api/scheduling.js'*/
import AddWindow from "./weatherManageSub/AddWindow.vue";
import {ElMessage, ElMessageBox} from "element-plus";
import cloneDeep from 'lodash/cloneDeep'
//静态
import {
homeGetOrg,
cusweatherGetData
} from '@/dataJson/Scheduling/WeatherManage.js'
const data = ref()
const dataBackup = ref([]);
const reviseWindowOpen = ref(false) // 修改按钮弹窗状态
......@@ -63,7 +69,7 @@ const cancelRevise = ()=>{
reviseWindowOpen.value = false
getData()
}
const confirmRevise = val => { // 修改弹窗确认按钮事件
/*const confirmRevise = val => { // 修改弹窗确认按钮事件
let params = cloneDeep(val)
params.isAuto = params.isAuto === '自动模式' ? true : false
params.isFixed = params.isFixed === '固定模式' ? true : false
......@@ -92,8 +98,8 @@ const confirmRevise = val => { // 修改弹窗确认按钮事件
type: 'error',
})
})
}
const confirmBind = val => {
}*/
/*const confirmBind = val => {
// console.log(val)
let params = cloneDeep(val)
params.isAuto = params.isAuto === '自动模式' ? true : false
......@@ -123,7 +129,7 @@ const confirmBind = val => {
bindWindowOpen.value = false
getData()
})
}
}*/
const onCancelBind = () => {
bindWindowOpen.value = false
getData()
......@@ -132,16 +138,21 @@ onBeforeMount(()=>{
getData()
getOrganizationStructure()
})
function getData() {
data.value = cusweatherGetData.data
dataBackup.value = [...data.value]
}
/*function getData() {
getWeatherMagData().then(res => {
data.value = res.data
dataBackup.value = [...data.value];
})
}
}*/
function handleAddWinOpenClose(){
addWindowOpen.value = false
}
function handleAdd(val){
/*function handleAdd(val){
alterWeatherMagData(val).then(res=>{
if(res.success){
ElMessage({
......@@ -162,7 +173,7 @@ function handleAdd(val){
type: 'error',
})
})
} // 新增数据提交
} */// 新增数据提交
function getCurrentDateTime() {
const now = new Date();
const year = now.getFullYear();
......@@ -188,13 +199,17 @@ function getSupply() {
})
} // 根据组织结构获取供热站数据
function getOrganizationStructure() {
organizationStructure.value = homeGetOrg.data
getSupply()
}
/*function getOrganizationStructure() {
getOrganizationStructureInterface().then(res => {
organizationStructure.value = res.data
getSupply()
}).catch(err => {
ElMessage.error('接口异常,获取数据失败.')
})
} // 获取组织结构
}*/ // 获取组织结构
function resetSearch(){
isAutoSearchKey.value = ''
......
<script setup>
import { onMounted, ref, watch, watchEffect, reactive } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
import { getWind, deleteWind, alterWind, addWind } from "@/api/scheduling.js";
//import { getWind, deleteWind, alterWind, addWind } from "@/api/scheduling.js";
import store from "@/store/index.js";
import { vFloatNumber } from "@/utils/directives.js";
//静态
import { SchedulingWindConfigurationGet } from "@/dataJson/Scheduling/WindManage.js"
const data = ref();
const dataBackup = ref([]);
const searchKey = ref(""); // 查询参数
......@@ -235,11 +238,15 @@ onMounted(() => {
});
function getData() {
data.value = SchedulingWindConfigurationGet.data;
dataBackup.value = [...data.value]
}
/*function getData() {
getWind().then((res) => {
data.value = res.data;
dataBackup.value = [...data.value];
});
}
}*/
function resetInput() {
addForm.value = {
......@@ -290,7 +297,8 @@ function customSort(a, b) {
<template #default="scope">
<div class="table-operate-column">
<el-button link @click="revise(scope.row)" type="primary">修改</el-button>
<el-button link @click="omit(scope.row)" type="primary">删除</el-button>
<!-- 删除 @click="omit(scope.row)" 不执行删除 -->
<el-button link type="primary">删除</el-button>
</div>
</template>
</el-table-column>
......@@ -336,7 +344,8 @@ function customSort(a, b) {
</template>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" :loading="reviseSaveBtnLoading" @click="onReviseSubmit">保存</el-button>
<!-- 删除 @click="onReviseSubmit" 不执行保存-->
<el-button type="primary" :loading="reviseSaveBtnLoading">保存</el-button>
<el-button type="primary" @click="handleClose">关闭</el-button>
</div>
</template>
......@@ -383,7 +392,8 @@ function customSort(a, b) {
</template>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" :loading="addSaveBtnLoading" @click="onAddSubmit">保存</el-button>
<!-- 删除 @click="onAddSubmit" 不执行保存 -->
<el-button type="primary" :loading="addSaveBtnLoading" >保存</el-button>
<el-button type="primary" @click="handleClose">关闭</el-button>
</div>
</template>
......
......@@ -302,7 +302,9 @@ const rules = reactive({
</template>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" :loading="addSaveBtnLoading" @click="handleConfirm">保存</el-button>
<!--删除 @click="handleConfirm" 可以填写表格但是不会保存 -->
<!-- @click="handleConfirm"-->
<el-button type="primary" :loading="addSaveBtnLoading">保存</el-button>
<el-button type="primary" @click="handleClose">关闭</el-button>
</div>
</template>
......
......@@ -230,7 +230,9 @@ function unique(arr){
<template #footer>
<div class="dialog-footer">
<!-- :disabled="isSaveOper"-->
<el-button type="primary" @click="onSubmit">保存</el-button>
<!--删除 @click="onSubmit" 可填写表格不能保存-->
<!-- @click="onSubmit"-->
<el-button type="primary">保存</el-button>
<el-button type="primary" @click="emit('onCancel')">关闭</el-button>
</div>
</template>
......
......@@ -308,7 +308,9 @@ function onClose() {
</template>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="handleConfirm">保存</el-button>
<!-- 删除 @click="handleConfirm" 可以填写表格但是不能修改 -->
<!-- @click="handleConfirm"-->
<el-button type="primary">保存</el-button>
<el-button type="primary" @click="onClose">关闭</el-button>
</div>
</template>
......
......@@ -32,8 +32,8 @@ export default defineConfig({
changeOrigin: true, // 允许跨域
},
'/AIapi': {
// target: 'http://106.3.97.198:20050/',
target: 'http://192.168.0.9:8099/', // 目标服务器地址
target: 'http://106.3.97.198:20050/',
//target: 'http://192.168.0.9:8099/', // 目标服务器地址
//target: 'http://localhost:5013/', // 目标服务器地址
changeOrigin: true, // 允许跨域
rewrite: (path) => path.replace(/^\/AIapi/, ''), //路径重写,把'/ddapi'替换为''
......
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