Commit 99bf2880 authored by lwy's avatar lwy

调度管理静态页面

parent 5d1fa0b2
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": ""
}
]
}
<script lang="ts" setup> <script lang="ts" setup>
import {computed, onBeforeMount, onMounted, reactive, ref, watchEffect} from "vue"; import {computed, onBeforeMount, onMounted, reactive, ref, watchEffect} from "vue";
import { /*import {
getAnnualParam, getAnnualParam,
alterAnnualParam, alterAnnualParam,
addAnnualParam, addAnnualParam,
...@@ -8,7 +8,10 @@ import { ...@@ -8,7 +8,10 @@ import {
getOrganizationStructureInterface getOrganizationStructureInterface
} from '@/api/scheduling.js' } from '@/api/scheduling.js'
import {ElMessage, ElMessageBox} from "element-plus"; 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 data = ref([])
const dataBackup = ref([]) const dataBackup = ref([])
...@@ -124,19 +127,40 @@ const selectYearValue = computed(() => { ...@@ -124,19 +127,40 @@ const selectYearValue = computed(() => {
const organizationStructure = ref([]) // 组织结构数据 const organizationStructure = ref([]) // 组织结构数据
const supplyData = ref([]) // 供热站数据 const supplyData = ref([]) // 供热站数据
//静态
function getOrganizationStructure() { function getOrganizationStructure() {
organizationStructure.value = homeGetOrg.data
getSupply()
}
/*function getOrganizationStructure() {
getOrganizationStructureInterface().then(res => { getOrganizationStructureInterface().then(res => {
organizationStructure.value = res.data organizationStructure.value = res.data
getSupply() getSupply()
}).catch(err => { }).catch(err => {
ElMessage.error('接口异常,获取数据失败.') ElMessage.error('接口异常,获取数据失败.')
}) })
} // 获取组织结构 }*/ // 获取组织结构
//静态
function getData() { function getData() {
const params = { const params = {
year: searchKey.value 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=>{ getAnnualParam(params).then(res=>{
data.value = res.data data.value = res.data
console.log( '111111111111111',data.value) console.log( '111111111111111',data.value)
...@@ -147,7 +171,7 @@ function getData() { ...@@ -147,7 +171,7 @@ function getData() {
} }
dataBackup.value = [...data.value] dataBackup.value = [...data.value]
}) })
} }*/
function handleEdit(val) { function handleEdit(val) {
currentYear.value = new Date().getFullYear() currentYear.value = new Date().getFullYear()
...@@ -552,7 +576,8 @@ function getSupply() { ...@@ -552,7 +576,8 @@ function getSupply() {
</template> </template>
<template #footer> <template #footer>
<div class="dialog-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> <el-button type="primary" @click="handleClose">关闭</el-button>
</div> </div>
</template> </template>
...@@ -638,7 +663,8 @@ function getSupply() { ...@@ -638,7 +663,8 @@ function getSupply() {
</template> </template>
<template #footer> <template #footer>
<div class="dialog-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> <el-button type="primary" @click="handleClose">关闭</el-button>
</div> </div>
</template> </template>
......
...@@ -150,7 +150,8 @@ ...@@ -150,7 +150,8 @@
<th rowspan="3"> <th rowspan="3">
<div> <div>
<div class="btngrounp"> <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> <el-button type="primary" style="margin: 0 0 0 5px" @click="onCancel">关闭</el-button>
</div> </div>
</div> </div>
...@@ -164,7 +165,7 @@ ...@@ -164,7 +165,7 @@
</template> </template>
<script setup> <script setup>
import { ref, reactive, onMounted, onUnmounted, onBeforeMount,watch } from "vue"; 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 http from "../../api/http";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
const options = reactive([]); const options = reactive([]);
...@@ -172,6 +173,8 @@ import store from "../../store/index"; ...@@ -172,6 +173,8 @@ import store from "../../store/index";
import { vFloatNumber } from "@/utils/directives.js"; import { vFloatNumber } from "@/utils/directives.js";
import { nextTick } from "vue"; import { nextTick } from "vue";
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
//静态
import { configboilergetData } from '@/dataJson/Scheduling/ConfigBoiler.js'
const loading = ref(false) const loading = ref(false)
const form = ref({ const form = ref({
types: [], types: [],
...@@ -233,7 +236,16 @@ const rules = reactive({ ...@@ -233,7 +236,16 @@ const rules = reactive({
}); });
// 获取数据列表 // 获取数据列表
//静态
const getListData = () => { 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 loading.value = true
http.get("/api/configboiler/getData").then((result) => { http.get("/api/configboiler/getData").then((result) => {
if (result.success) { if (result.success) {
...@@ -246,7 +258,7 @@ const getListData = () => { ...@@ -246,7 +258,7 @@ const getListData = () => {
}).catch(err => { }).catch(err => {
console.log(err); console.log(err);
}); });
}; };*/
// 保存修改 // 保存修改
const onSave = async () => { const onSave = async () => {
......
...@@ -10,6 +10,12 @@ import { ...@@ -10,6 +10,12 @@ import {
import http from "../../api/http"; import http from "../../api/http";
import store from "../../store"; import store from "../../store";
import { vFloatNumber } from "@/utils/directives.js"; import { vFloatNumber } from "@/utils/directives.js";
//静态
import {
homeGetOrg,
energygetData
} from '@/dataJson/Scheduling/EnergyManage.js'
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const tableData = ref([{}]); const tableData = ref([{}]);
// 获取渲染 // 获取渲染
...@@ -42,7 +48,9 @@ const getEnergyData = () => { ...@@ -42,7 +48,9 @@ const getEnergyData = () => {
if(config.supplyType.length === 0) { if(config.supplyType.length === 0) {
config.supplyType = ["0", "1", "2", "3", "4"] 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) { if (res.success) {
loading.value = false loading.value = false
tableData.value = res.data; tableData.value = res.data;
...@@ -53,7 +61,7 @@ const getEnergyData = () => { ...@@ -53,7 +61,7 @@ const getEnergyData = () => {
}) })
.catch((err) => { .catch((err) => {
console.log(error); console.log(error);
}); });*/
}; };
const tableLabel = reactive([ const tableLabel = reactive([
...@@ -306,6 +314,10 @@ function getSupply() { ...@@ -306,6 +314,10 @@ function getSupply() {
} }
// 根据组织结构获取供热站数据 // 根据组织结构获取供热站数据
function getOrganizationStructure() { function getOrganizationStructure() {
organizationStructure.value = homeGetOrg.data
getSupply()
}
/*function getOrganizationStructure() {
getOrganizationStructureInterface().then(res => { getOrganizationStructureInterface().then(res => {
organizationStructure.value = res.data organizationStructure.value = res.data
getSupply() getSupply()
...@@ -313,7 +325,7 @@ function getOrganizationStructure() { ...@@ -313,7 +325,7 @@ function getOrganizationStructure() {
}).catch(err => { }).catch(err => {
ElMessage.error('接口异常,获取数据失败.') ElMessage.error('接口异常,获取数据失败.')
}) })
} }*/
function sortByEnergyLevel(a, b) { function sortByEnergyLevel(a, b) {
return a.energyType - b.energyType; return a.energyType - b.energyType;
} }
...@@ -431,7 +443,9 @@ onMounted(() => { ...@@ -431,7 +443,9 @@ onMounted(() => {
<el-button link type="primary" size="small" @click="handleEdit(scope.row)"> <el-button link type="primary" size="small" @click="handleEdit(scope.row)">
编辑 编辑
</el-button> </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> </template>
</el-table-column> </el-table-column>
<template #empty> <template #empty>
...@@ -513,7 +527,8 @@ onMounted(() => { ...@@ -513,7 +527,8 @@ onMounted(() => {
</table> </table>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button type="primary" @click="handleCancel(energyForm)">关闭</el-button> <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> </div>
</el-form> </el-form>
</el-dialog> </el-dialog>
......
...@@ -81,7 +81,8 @@ ...@@ -81,7 +81,8 @@
</table> </table>
</el-form> </el-form>
<div class="btngrounp"> <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> <el-button type="primary" style="margin: 0 0 0 5px" @click="onCancel">关闭</el-button>
</div> </div>
</el-card> </el-card>
...@@ -91,11 +92,14 @@ ...@@ -91,11 +92,14 @@
</template> </template>
<script setup> <script setup>
import { ref, reactive, onMounted, onUnmounted, watch } from "vue"; 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 { ElMessage } from "element-plus";
import http from "../../api/http"; import http from "../../api/http";
import { vFloatNumber } from "@/utils/directives.js"; import { vFloatNumber } from "@/utils/directives.js";
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
//静态
import { SchedulingBizInstantaneousHeatGet } from '@/dataJson/Scheduling/InstantHeat.js'
const loading = ref(false) const loading = ref(false)
const formRef = ref() const formRef = ref()
...@@ -145,8 +149,14 @@ const rules = reactive({ ...@@ -145,8 +149,14 @@ const rules = reactive({
{ pattern: /^.{1,200}$/, "message": "备注必须是1-200位字符", trigger: "blur" } { pattern: /^.{1,200}$/, "message": "备注必须是1-200位字符", trigger: "blur" }
] ]
}); });
const getInstanceHeat = () => { const getInstanceHeat = () => {
loading.value = true
List.value = SchedulingBizInstantaneousHeatGet.data[0]
console.log("res.data===>", SchedulingBizInstantaneousHeatGet.data);
loading.value = false
}
/*const getInstanceHeat = () => {
loading.value = true loading.value = true
http.post("api/Scheduling/BizInstantaneousHeat/Get", false).then(res => { http.post("api/Scheduling/BizInstantaneousHeat/Get", false).then(res => {
if (res.success) { if (res.success) {
...@@ -155,7 +165,7 @@ const getInstanceHeat = () => { ...@@ -155,7 +165,7 @@ const getInstanceHeat = () => {
loading.value = false loading.value = false
} }
}) })
} }*/
const onSave = async () => { const onSave = async () => {
await formRef.value.validate() await formRef.value.validate()
await http.post("/api/Scheduling/BizInstantaneousHeat/Update", { ...List.value }, false).then((res) => { await http.post("/api/Scheduling/BizInstantaneousHeat/Update", { ...List.value }, false).then((res) => {
......
<script setup> <script setup>
import {onMounted, ref, reactive, onBeforeMount} from "vue"; import {onMounted, ref, reactive, onBeforeMount} from "vue";
import {ElMessage, ElMessageBox} from "element-plus"; 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 {vFloatNumber} from "@/utils/directives.js";
//静态
import {SchedulingWeatherConditionGet} from "@/dataJson/Scheduling/Phenomenon.js"
const data = ref() const data = ref()
const dataBackup = ref([]) const dataBackup = ref([])
const searchKey = ref('') // 查询参数 const searchKey = ref('') // 查询参数
...@@ -206,11 +209,16 @@ onMounted(() => { ...@@ -206,11 +209,16 @@ onMounted(() => {
}) })
function getData() { function getData() {
data.value = SchedulingWeatherConditionGet.data
dataBackup.value = [data.value]
}
/*function getData() {
getPhenomenon().then(res => { getPhenomenon().then(res => {
data.value = res.data data.value = res.data
dataBackup.value = [...data.value] dataBackup.value = [...data.value]
}) })
} }*/
function customSort(a, b) { function customSort(a, b) {
return b.phenomenonType - a.phenomenonType return b.phenomenonType - a.phenomenonType
...@@ -341,7 +349,8 @@ function customSort(a, b) { ...@@ -341,7 +349,8 @@ function customSort(a, b) {
</template> </template>
<template #footer> <template #footer>
<div class="dialog-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> <el-button type="primary" @click="handleClose">关闭</el-button>
</div> </div>
......
...@@ -2,16 +2,22 @@ ...@@ -2,16 +2,22 @@
import {computed, isRef, onBeforeMount, onMounted, reactive, ref, shallowRef} from "vue"; import {computed, isRef, onBeforeMount, onMounted, reactive, ref, shallowRef} from "vue";
import ReviseWindow from "./weatherManageSub/ReviseWindow.vue"; import ReviseWindow from "./weatherManageSub/ReviseWindow.vue";
import BindWindow from "./weatherManageSub/BindWindow.vue"; import BindWindow from "./weatherManageSub/BindWindow.vue";
import { /*import {
getWeatherMagData, getWeatherMagData,
alterWeatherMagData, alterWeatherMagData,
deleteWeatherMagData, deleteWeatherMagData,
getOrganizationStructureInterface getOrganizationStructureInterface
} from '@/api/scheduling.js' } from '@/api/scheduling.js'*/
import AddWindow from "./weatherManageSub/AddWindow.vue"; import AddWindow from "./weatherManageSub/AddWindow.vue";
import {ElMessage, ElMessageBox} from "element-plus"; import {ElMessage, ElMessageBox} from "element-plus";
import cloneDeep from 'lodash/cloneDeep' import cloneDeep from 'lodash/cloneDeep'
//静态
import {
homeGetOrg,
cusweatherGetData
} from '@/dataJson/Scheduling/WeatherManage.js'
const data = ref() const data = ref()
const dataBackup = ref([]); const dataBackup = ref([]);
const reviseWindowOpen = ref(false) // 修改按钮弹窗状态 const reviseWindowOpen = ref(false) // 修改按钮弹窗状态
...@@ -63,7 +69,7 @@ const cancelRevise = ()=>{ ...@@ -63,7 +69,7 @@ const cancelRevise = ()=>{
reviseWindowOpen.value = false reviseWindowOpen.value = false
getData() getData()
} }
const confirmRevise = val => { // 修改弹窗确认按钮事件 /*const confirmRevise = val => { // 修改弹窗确认按钮事件
let params = cloneDeep(val) let params = cloneDeep(val)
params.isAuto = params.isAuto === '自动模式' ? true : false params.isAuto = params.isAuto === '自动模式' ? true : false
params.isFixed = params.isFixed === '固定模式' ? true : false params.isFixed = params.isFixed === '固定模式' ? true : false
...@@ -92,8 +98,8 @@ const confirmRevise = val => { // 修改弹窗确认按钮事件 ...@@ -92,8 +98,8 @@ const confirmRevise = val => { // 修改弹窗确认按钮事件
type: 'error', type: 'error',
}) })
}) })
} }*/
const confirmBind = val => { /*const confirmBind = val => {
// console.log(val) // console.log(val)
let params = cloneDeep(val) let params = cloneDeep(val)
params.isAuto = params.isAuto === '自动模式' ? true : false params.isAuto = params.isAuto === '自动模式' ? true : false
...@@ -123,7 +129,7 @@ const confirmBind = val => { ...@@ -123,7 +129,7 @@ const confirmBind = val => {
bindWindowOpen.value = false bindWindowOpen.value = false
getData() getData()
}) })
} }*/
const onCancelBind = () => { const onCancelBind = () => {
bindWindowOpen.value = false bindWindowOpen.value = false
getData() getData()
...@@ -132,16 +138,21 @@ onBeforeMount(()=>{ ...@@ -132,16 +138,21 @@ onBeforeMount(()=>{
getData() getData()
getOrganizationStructure() getOrganizationStructure()
}) })
function getData() { function getData() {
data.value = cusweatherGetData.data
dataBackup.value = [...data.value]
}
/*function getData() {
getWeatherMagData().then(res => { getWeatherMagData().then(res => {
data.value = res.data data.value = res.data
dataBackup.value = [...data.value]; dataBackup.value = [...data.value];
}) })
} }*/
function handleAddWinOpenClose(){ function handleAddWinOpenClose(){
addWindowOpen.value = false addWindowOpen.value = false
} }
function handleAdd(val){ /*function handleAdd(val){
alterWeatherMagData(val).then(res=>{ alterWeatherMagData(val).then(res=>{
if(res.success){ if(res.success){
ElMessage({ ElMessage({
...@@ -162,7 +173,7 @@ function handleAdd(val){ ...@@ -162,7 +173,7 @@ function handleAdd(val){
type: 'error', type: 'error',
}) })
}) })
} // 新增数据提交 } */// 新增数据提交
function getCurrentDateTime() { function getCurrentDateTime() {
const now = new Date(); const now = new Date();
const year = now.getFullYear(); const year = now.getFullYear();
...@@ -188,13 +199,17 @@ function getSupply() { ...@@ -188,13 +199,17 @@ function getSupply() {
}) })
} // 根据组织结构获取供热站数据 } // 根据组织结构获取供热站数据
function getOrganizationStructure() { function getOrganizationStructure() {
organizationStructure.value = homeGetOrg.data
getSupply()
}
/*function getOrganizationStructure() {
getOrganizationStructureInterface().then(res => { getOrganizationStructureInterface().then(res => {
organizationStructure.value = res.data organizationStructure.value = res.data
getSupply() getSupply()
}).catch(err => { }).catch(err => {
ElMessage.error('接口异常,获取数据失败.') ElMessage.error('接口异常,获取数据失败.')
}) })
} // 获取组织结构 }*/ // 获取组织结构
function resetSearch(){ function resetSearch(){
isAutoSearchKey.value = '' isAutoSearchKey.value = ''
......
<script setup> <script setup>
import { onMounted, ref, watch, watchEffect, reactive } from "vue"; import { onMounted, ref, watch, watchEffect, reactive } from "vue";
import { ElMessage, ElMessageBox } from "element-plus"; 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 store from "@/store/index.js";
import { vFloatNumber } from "@/utils/directives.js"; import { vFloatNumber } from "@/utils/directives.js";
//静态
import { SchedulingWindConfigurationGet } from "@/dataJson/Scheduling/WindManage.js"
const data = ref(); const data = ref();
const dataBackup = ref([]); const dataBackup = ref([]);
const searchKey = ref(""); // 查询参数 const searchKey = ref(""); // 查询参数
...@@ -235,11 +238,15 @@ onMounted(() => { ...@@ -235,11 +238,15 @@ onMounted(() => {
}); });
function getData() { function getData() {
data.value = SchedulingWindConfigurationGet.data;
dataBackup.value = [...data.value]
}
/*function getData() {
getWind().then((res) => { getWind().then((res) => {
data.value = res.data; data.value = res.data;
dataBackup.value = [...data.value]; dataBackup.value = [...data.value];
}); });
} }*/
function resetInput() { function resetInput() {
addForm.value = { addForm.value = {
...@@ -290,7 +297,8 @@ function customSort(a, b) { ...@@ -290,7 +297,8 @@ function customSort(a, b) {
<template #default="scope"> <template #default="scope">
<div class="table-operate-column"> <div class="table-operate-column">
<el-button link @click="revise(scope.row)" type="primary">修改</el-button> <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> </div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -336,7 +344,8 @@ function customSort(a, b) { ...@@ -336,7 +344,8 @@ function customSort(a, b) {
</template> </template>
<template #footer> <template #footer>
<div class="dialog-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> <el-button type="primary" @click="handleClose">关闭</el-button>
</div> </div>
</template> </template>
...@@ -383,7 +392,8 @@ function customSort(a, b) { ...@@ -383,7 +392,8 @@ function customSort(a, b) {
</template> </template>
<template #footer> <template #footer>
<div class="dialog-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> <el-button type="primary" @click="handleClose">关闭</el-button>
</div> </div>
</template> </template>
......
...@@ -302,7 +302,9 @@ const rules = reactive({ ...@@ -302,7 +302,9 @@ const rules = reactive({
</template> </template>
<template #footer> <template #footer>
<div class="dialog-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> <el-button type="primary" @click="handleClose">关闭</el-button>
</div> </div>
</template> </template>
......
...@@ -230,7 +230,9 @@ function unique(arr){ ...@@ -230,7 +230,9 @@ function unique(arr){
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<!-- :disabled="isSaveOper"--> <!-- :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> <el-button type="primary" @click="emit('onCancel')">关闭</el-button>
</div> </div>
</template> </template>
......
...@@ -308,7 +308,9 @@ function onClose() { ...@@ -308,7 +308,9 @@ function onClose() {
</template> </template>
<template #footer> <template #footer>
<div class="dialog-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> <el-button type="primary" @click="onClose">关闭</el-button>
</div> </div>
</template> </template>
......
...@@ -32,8 +32,8 @@ export default defineConfig({ ...@@ -32,8 +32,8 @@ export default defineConfig({
changeOrigin: true, // 允许跨域 changeOrigin: true, // 允许跨域
}, },
'/AIapi': { '/AIapi': {
// target: 'http://106.3.97.198:20050/', target: 'http://106.3.97.198:20050/',
target: 'http://192.168.0.9:8099/', // 目标服务器地址 //target: 'http://192.168.0.9:8099/', // 目标服务器地址
//target: 'http://localhost:5013/', // 目标服务器地址 //target: 'http://localhost:5013/', // 目标服务器地址
changeOrigin: true, // 允许跨域 changeOrigin: true, // 允许跨域
rewrite: (path) => path.replace(/^\/AIapi/, ''), //路径重写,把'/ddapi'替换为'' 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