diff --git a/psdc-ui/src/api/control/manual.js b/psdc-ui/src/api/control/manual.js
index 6e886f9..6ee57e7 100644
--- a/psdc-ui/src/api/control/manual.js
+++ b/psdc-ui/src/api/control/manual.js
@@ -3,4 +3,8 @@ import request from '@/utils/request'
/** 获取设备*/
export function getDevice() {
return request.get('/control/manual/deviceStatusList')
+}
+/** 获取调控日志列表*/
+export function getControlLogList(data) {
+ return request.post('/control/manual/controlLogList',data)
}
\ No newline at end of file
diff --git a/psdc-ui/src/views/control/manual/index.vue b/psdc-ui/src/views/control/manual/index.vue
index ed35d9c..9e72f2a 100644
--- a/psdc-ui/src/views/control/manual/index.vue
+++ b/psdc-ui/src/views/control/manual/index.vue
@@ -126,13 +126,13 @@
-
+
-
-
-
-
-
+
+
+
+
+
@@ -167,10 +167,11 @@
import { Download } from '@element-plus/icons-vue' //element字体图标
import { ref,reactive,onMounted } from 'vue'
import { ElMessageBox } from 'element-plus'
-import { getDevice } from '@/api/control/manual'
+import { getDevice,getControlLogList } from '@/api/control/manual'
onMounted(()=>{
getDeviceFun();
+ getControlLogListFun();
})
/** 获取所有设备*/
@@ -179,6 +180,13 @@ function getDeviceFun(){
getDevice().then((res)=>{
console.log(res.data)
deviceArr.value = res.data
+ for(let i = 0;i < res.data.length;i++){
+ if(res.data[i].deviceRunstatus == 1){
+ res.data[i].deviceRunstatus = '开启'
+ }else{
+ res.data[i].deviceRunstatus = '关闭'
+ }
+ }
})
}
@@ -212,47 +220,36 @@ const onSubmit3 = () => {
}
/** 数据表格处理*/
-const controlList = reactive([
- {
- devName:'11',
- content:'22',
- time:'33',
- person:'44',
- result:'55',
- },
- {
- devName:'11',
- content:'22',
- time:'33',
- person:'44',
- result:'55',
- },
- {
- devName:'11',
- content:'22',
- time:'33',
- person:'44',
- result:'55',
- },
- {
- devName:'11',
- content:'22',
- time:'33',
- person:'44',
- result:'55',
- }
-])
+const controlLogList = ref([])
+const tableLength = ref()
const currentPage = ref(1)
const pageSize = ref(5)
const small = ref(false)
const background = ref(false)
const disabled = ref(false)
const handleSizeChange = (val) => {
- console.log(`${val} items per page`)
+ getControlLogListFun()
}
const handleCurrentChange = (val) => {
- console.log(`current page: ${val}`)
+ getControlLogListFun()
}
+function getControlLogListFun(){
+ getControlLogList({
+ "deviceId": null,
+ "deviceName": null,
+ "deviceSn": null,
+ "controlKey": null,
+ "controlValue": null,
+ "controlResult": null,
+ "controlContext": null,
+ "pageNum": currentPage.value,
+ "pageSize": pageSize.value
+ }).then((res)=>{
+ tableLength.value = res.total
+ controlLogList.value = res.rows
+ })
+}
+
/** 策略导入处理*/
const drawerIshow = ref(false)
@@ -277,7 +274,7 @@ function confirmClick() {
height: 50%;
overflow-y: auto;
.dev_control_item{
- width: 24.45%;
+ width: 24%;
height: 47%;
margin-right: 12px;
margin-bottom: 12px;
@@ -396,5 +393,8 @@ function confirmClick() {
::v-deep .el-pager{
margin: 0 5px;
}
+::v-deep .el-table--fit{
+ background-color: #2D3D88;
+}