|
@ -63,13 +63,13 @@ |
|
|
@click="handleDelete" |
|
|
@click="handleDelete" |
|
|
>删除</el-button> |
|
|
>删除</el-button> |
|
|
</el-col> --> |
|
|
</el-col> --> |
|
|
<el-col :span="1.5"> |
|
|
<!-- <el-col :span="1.5"> |
|
|
<el-button |
|
|
<el-button |
|
|
type="warning" |
|
|
type="warning" |
|
|
icon="Download" |
|
|
icon="Download" |
|
|
@click="handleExport" |
|
|
@click="handleExport" |
|
|
>导出</el-button> |
|
|
>导出</el-button> |
|
|
</el-col> |
|
|
</el-col> --> |
|
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> |
|
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> |
|
|
</el-row> |
|
|
</el-row> |
|
|
|
|
|
|
|
@ -81,9 +81,27 @@ |
|
|
<el-table-column label="机构名称" align="center" prop="orgName" /> |
|
|
<el-table-column label="机构名称" align="center" prop="orgName" /> |
|
|
<el-table-column label="推送接口" align="center" prop="sendIp" /> |
|
|
<el-table-column label="推送接口" align="center" prop="sendIp" /> |
|
|
<el-table-column label="标准值" align="center" prop="standard" /> |
|
|
<el-table-column label="标准值" align="center" prop="standard" /> |
|
|
<el-table-column label="是否推送" align="center" prop="available" /> |
|
|
<el-table-column label="是否推送" align="center" prop="available" > |
|
|
<el-table-column label="排除设备" align="center" prop="excludeDevices" show-overflow-tooltip="true"/> |
|
|
<template #default="scope"> |
|
|
<el-table-column label="是否计算总开关" align="center" prop="computeSwitchTotal" /> |
|
|
<el-switch |
|
|
|
|
|
v-model="scope.row.available" |
|
|
|
|
|
disabled |
|
|
|
|
|
/> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column label="排除设备" align="center" prop="excludeDevices" show-overflow-tooltip="true"> |
|
|
|
|
|
<template #default="scope"> |
|
|
|
|
|
{{getDevicesNames(scope.row.excludeDevices)}} |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column label="是否计算总开关" align="center" prop="computeSwitchTotal" > |
|
|
|
|
|
<template #default="scope"> |
|
|
|
|
|
<el-switch |
|
|
|
|
|
v-model="scope.row.computeSwitchTotal" |
|
|
|
|
|
disabled |
|
|
|
|
|
/> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
<el-table-column label="操作人" align="center" prop="operatorName" /> |
|
|
<el-table-column label="操作人" align="center" prop="operatorName" /> |
|
|
<el-table-column label="操作昵称" align="center" prop="operatorNickName" /> |
|
|
<el-table-column label="操作昵称" align="center" prop="operatorNickName" /> |
|
|
<el-table-column label="操作时间" align="center" prop="createTime"/> |
|
|
<el-table-column label="操作时间" align="center" prop="createTime"/> |
|
@ -168,7 +186,7 @@ |
|
|
|
|
|
|
|
|
<script setup name="HeatMainOperatorLog"> |
|
|
<script setup name="HeatMainOperatorLog"> |
|
|
import { listHeatapi, getHeatapi, delHeatapi, addHeatapi, updateHeatapi, listHeatapiNew } from "@/api/model/heatMainOperatorLog"; |
|
|
import { listHeatapi, getHeatapi, delHeatapi, addHeatapi, updateHeatapi, listHeatapiNew } from "@/api/model/heatMainOperatorLog"; |
|
|
|
|
|
import { listDeviceNoPage } from "@/api/model/device"; |
|
|
const { proxy } = getCurrentInstance(); |
|
|
const { proxy } = getCurrentInstance(); |
|
|
|
|
|
|
|
|
const heatapiList = ref([]); |
|
|
const heatapiList = ref([]); |
|
@ -180,6 +198,7 @@ const single = ref(true); |
|
|
const multiple = ref(true); |
|
|
const multiple = ref(true); |
|
|
const total = ref(0); |
|
|
const total = ref(0); |
|
|
const title = ref(""); |
|
|
const title = ref(""); |
|
|
|
|
|
const listDeviceAll = ref([]); |
|
|
const dc_operator_type = [{ label: "新增", value: "新增"},{ label: "修改", value: "修改"},{ label: "删除", value: "删除"}] |
|
|
const dc_operator_type = [{ label: "新增", value: "新增"},{ label: "修改", value: "修改"},{ label: "删除", value: "删除"}] |
|
|
const data = reactive({ |
|
|
const data = reactive({ |
|
|
form: {}, |
|
|
form: {}, |
|
@ -262,23 +281,6 @@ function handleSelectionChange(selection) { |
|
|
multiple.value = !selection.length; |
|
|
multiple.value = !selection.length; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** 新增按钮操作 */ |
|
|
|
|
|
function handleAdd() { |
|
|
|
|
|
reset(); |
|
|
|
|
|
open.value = true; |
|
|
|
|
|
title.value = "添加供热办推送主配置操作日志"; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 修改按钮操作 */ |
|
|
|
|
|
function handleUpdate(row) { |
|
|
|
|
|
reset(); |
|
|
|
|
|
const _id = row.id || ids.value |
|
|
|
|
|
getHeatapi(_id).then(response => { |
|
|
|
|
|
form.value = response.data; |
|
|
|
|
|
open.value = true; |
|
|
|
|
|
title.value = "修改供热办推送主配置操作日志"; |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 提交按钮 */ |
|
|
/** 提交按钮 */ |
|
|
function submitForm() { |
|
|
function submitForm() { |
|
@ -301,23 +303,34 @@ function submitForm() { |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** 删除按钮操作 */ |
|
|
|
|
|
function handleDelete(row) { |
|
|
|
|
|
const _ids = row.id || ids.value; |
|
|
function getDevicesNames(deviceIds){ |
|
|
proxy.$modal.confirm('是否确认删除供热办推送主配置操作日志编号为"' + _ids + '"的数据项?').then(function() { |
|
|
|
|
|
return delHeatapi(_ids); |
|
|
if(!deviceIds) return ''; |
|
|
}).then(() => { |
|
|
let deviceIdSet = new Set(deviceIds.split(',')); |
|
|
getList(); |
|
|
let deviceMap = new Map(); |
|
|
proxy.$modal.msgSuccess("删除成功"); |
|
|
listDeviceAll.value.forEach(device => { |
|
|
}).catch(() => {}); |
|
|
deviceMap.set(device.uuid, device.deviceName); |
|
|
|
|
|
}); |
|
|
|
|
|
let deviceNames = []; |
|
|
|
|
|
for (let deviceId of deviceIdSet) { |
|
|
|
|
|
let name = deviceMap.get(deviceId); |
|
|
|
|
|
if (name) { |
|
|
|
|
|
deviceNames.push(name); |
|
|
|
|
|
} else { |
|
|
|
|
|
console.log("该设备没能匹配到对应设备名称:"+deviceId) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
return deviceNames.join(','); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** 导出按钮操作 */ |
|
|
function getDevicesAll(){ |
|
|
function handleExport() { |
|
|
listDeviceNoPage().then(response => { |
|
|
proxy.download('model/heatapi/export', { |
|
|
listDeviceAll.value = response.data; |
|
|
...queryParams.value |
|
|
}); |
|
|
}, `heatapi_${new Date().getTime()}.xlsx`) |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
getDevicesAll(); |
|
|
getList(); |
|
|
getList(); |
|
|
</script> |
|
|
</script> |
|
|