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

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

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

Loading…
Cancel
Save