触摸屏-直流
Lufaneng 1 year ago
parent f0c4e647b2
commit c708b6e337

@ -17,22 +17,22 @@
<!-- 主体区域 -->
<div class="control-content">
<!-- <div style="width: 100%;">
<el-button @click="handleDeal" class="handleBtn" type="success">
<div style="width: 100%;">
<!-- <el-button @click="handleDeal" class="handleBtn" type="success">
<el-icon>
<Delete />
</el-icon>
批量处理
</el-button>
</el-button> -->
<el-button @click="handleDel" class="delBtn" type="danger">
<el-icon>
<Delete />
</el-icon>
批量删除
</el-button>
</div> -->
<el-table :data="tableData" style="width: 100%" height="450" stripe v-loading="loading" @selection-change="handleSelectionChange" row-key="id" ref="multipleTableRef">
<!-- <el-table-column type="selection" :selectable="selectable" width="55" /> -->
</div>
<el-table :data="showTableData" style="width: 100%" height="380" stripe v-loading="loading" @selection-change="handleSelectionChange" row-key="id" ref="multipleTableRef">
<el-table-column type="selection" :selectable="selectable" width="55" />
<el-table-column align="center" prop="id" label="序号" />
<el-table-column align="center" prop="loop_idx" label="回路地址" />
<el-table-column align="center" prop="fault_msg" label="故障信息" />
@ -47,13 +47,13 @@
{{ row.fault_time ? dayjs(row.fault_time).format('YYYY-MM-DD HH:mm:ss') : '' }}
</template>
</el-table-column>
<el-table-column align="center" prop="voltage" label="处理状态">
<!-- <el-table-column align="center" prop="voltage" label="处理状态">
<template #default="{ row }">
{{ row.operate_status == 0 ? '未处理' : '已处理' }}
</template>
</el-table-column>
</el-table-column> -->
</el-table>
<!-- <el-pagination v-if="total > 0" @size-change="handleSizeChange" @current-change="handleCurrentChange" :page-sizes="[10, 30, 50, 100]" :total="total" :pager-count="5" v-model:page-size="pageSize" v-model:current-page="currentPage" background layout="prev, pager, next,jumper" /> -->
<el-pagination v-if="total > 0" @size-change="handleSizeChange" @current-change="handleCurrentChange" :page-sizes="[10, 30, 50, 100]" :total="total" :pager-count="5" v-model:page-size="pageSize" v-model:current-page="currentPage" background layout="prev, pager, next,jumper" />
</div>
</div>
<!-- 底部信息 -->
@ -98,18 +98,20 @@ const currentTime = ref('')
const systemRuntime = ref('38分钟')
// const commit_uid = sessionStorage.getItem('central_control_comm_uid')
const commit_uid = sessionStorage.getItem('central_control_comm_uid')
// const commit_uid = '868656077692382'
const loading = ref(false)
const total = ref(0)
const pageSize = ref(10)
const pageSize = ref(8)
const currentPage = ref(1)
const handleSizeChange = () => {
currentPage.value = 1
getData()
// getData()
}
const handleCurrentChange = () => {
getData()
// getData()
showTableData.value = tableData.value.slice((currentPage.value - 1) * 8, (currentPage.value - 1) * 8 + 8)
}
const tableData = ref([])
@ -165,10 +167,13 @@ const handleDeal = () => {
})
}
const showTableData = ref([])
const getData = () => {
currentPage.value = 1
const params = {
"limit": pageSize.value,
"page": currentPage.value,
// "limit": pageSize.value,
// "page": currentPage.value,
"and": {
"comm_uid": [
commit_uid
@ -185,8 +190,9 @@ const getData = () => {
loading.value = true
tableData.value = []
RPC.post('/m9z/fault/list', params).then(res => {
total.value = res.count || 0
total.value = res.rows.length || 0
tableData.value = res.rows || []
showTableData.value = tableData.value.slice(0, 8)
}).finally(() => {
loading.value = false
})

@ -59,7 +59,8 @@ export default defineConfig({
open: true,
proxy: {
'/jsonrpc': {
target: 'https://lamp-dev.ruixininfo.com',
// target: 'https://lamp-dev.ruixininfo.com',
target: 'http://10.21.77.100:71',
changeOrigin: true,
secure: false,
},

Loading…
Cancel
Save