单站监控 站点首页、故障告警页面新增工单按钮 点击跳转到工单列表页面

This commit is contained in:
白菜
2025-07-10 21:10:04 +08:00
parent 0336e67ac5
commit 28cf2d1946
2 changed files with 24 additions and 3 deletions

View File

@ -49,7 +49,6 @@
style="width: 100%;margin-top:25px;"> style="width: 100%;margin-top:25px;">
<el-table-column <el-table-column
prop="deviceName" prop="deviceName"
width="200"
label="设备名称"> label="设备名称">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -84,6 +83,14 @@
<span :class="['0','2'].includes(scope.row.status) ? 'warning-status' : ''">{{$store.state.ems.alarmStatusOptions[scope.row.status]}}</span> <span :class="['0','2'].includes(scope.row.status) ? 'warning-status' : ''">{{$store.state.ems.alarmStatusOptions[scope.row.status]}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
label="工单"
>
<template slot-scope="scope">
<el-button type="text" v-if="scope.row.ticketNo" @click="toTicket">已生成工单工单号{{scope.row.ticketNo}}</el-button>
<el-button type="primary" size="mini" v-else @click="toTicket">生成工单</el-button>
</template>
</el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination
v-show="tableData.length>0" v-show="tableData.length>0"
@ -135,6 +142,9 @@ export default {
}, },
methods:{ methods:{
formatDate, formatDate,
toTicket(){
this.$router.push({path:'/ticket'})
},
// 判断是否是同一天 // 判断是否是同一天
isSameDay(day1, day2) { isSameDay(day1, day2) {
const date1 = new Date(day1),date2 = new Date(day2) const date1 = new Date(day1),date2 = new Date(day2)
@ -146,13 +156,13 @@ export default {
handleSizeChange(val) { handleSizeChange(val) {
this.pageSize = val; this.pageSize = val;
this.$nextTick(()=>{ this.$nextTick(()=>{
this.getTableData() this.getData()
}) })
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.pageNum = val this.pageNum = val
this.$nextTick(()=>{ this.$nextTick(()=>{
this.getTableData() this.getData()
}) })
}, },
// 搜索 // 搜索

View File

@ -45,6 +45,14 @@
prop="alarmContent" prop="alarmContent"
label="告警内容"> label="告警内容">
</el-table-column> </el-table-column>
<el-table-column
label="工单"
>
<template slot-scope="scope">
<el-button type="text" v-if="scope.row.ticketNo" @click="toTicket">已生成工单工单号{{scope.row.ticketNo}}</el-button>
<el-button type="primary" size="mini" v-else @click="toTicket">生成工单</el-button>
</template>
</el-table-column>
</el-table> </el-table>
</div> </div>
</el-card> </el-card>
@ -92,6 +100,9 @@ export default {
} }
}, },
methods:{ methods:{
toTicket(){
this.$router.push({path:'/ticket'})
},
init(){ init(){
this.loading = true this.loading = true
getDzjkHomeView(this.siteId).then(response => { getDzjkHomeView(this.siteId).then(response => {