fix: test
							parent
							
								
									bb5e784429
								
							
						
					
					
						commit
						cfda3a9f0d
					
				|  | @ -1,6 +1,6 @@ | |||
| <template> | ||||
|   <ItemCard title="告警列表" v-bind="$attrs"> | ||||
|     <el-button slot="operate" type="primary" plain>查看更多</el-button> | ||||
|     <el-button slot="operate" type="primary" plain @click="goPage">查看更多</el-button> | ||||
|     <cb-table :data="tableList" :params="params" :get-list="getItemList" :total="total"> | ||||
|       <el-table-column type="index" width="50" label="序号"> </el-table-column> | ||||
|       <el-table-column show-overflow-tooltip label="标题" prop="alarmName"></el-table-column> | ||||
|  | @ -14,11 +14,21 @@ | |||
|       <el-table-column show-overflow-tooltip label="时间" prop="createTime"></el-table-column> | ||||
|       <el-table-column show-overflow-tooltip label="操作" width="80"> | ||||
|         <template slot-scope="scope"> | ||||
|           <cb-link @click="handleWarningOperation(scope.row)">查看工单</cb-link> | ||||
|           <cb-link @click="getDetail(scope.row)">查看详情</cb-link> | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|       <span slot="pagination"></span> | ||||
|     </cb-table> | ||||
|     <cb-detail-right v-if="dialog.visible" :title="detailData.alarmName" @goBack="goBack"> | ||||
|       <div slot="custom_content"> | ||||
|         <div class="message-card"> | ||||
|           <pre class="site-message-detail">{{ detailData.content }}</pre> | ||||
|           <el-divider></el-divider> | ||||
|           <div class="text-right m-b-sm">发送人:{{ detailData.senderName }}</div> | ||||
|           <div class="text-right">创建时间:{{ detailData.gmtCreate }}</div> | ||||
|         </div> | ||||
|       </div> | ||||
|     </cb-detail-right> | ||||
|   </ItemCard> | ||||
| </template> | ||||
| 
 | ||||
|  | @ -39,28 +49,40 @@ export default { | |||
|         page: 1, | ||||
|         rows: 10 | ||||
|       }, | ||||
|       total: 0 | ||||
|       total: 0, | ||||
|       dialog: { | ||||
|         visible: false | ||||
|       }, | ||||
|       detailData: {} | ||||
|     } | ||||
|   }, | ||||
|   created() { | ||||
|     this.getItemList() | ||||
|   }, | ||||
|   methods: { | ||||
|     goBack() { | ||||
|       this.dialog.visible = false | ||||
|     }, | ||||
|     // 获取详情 | ||||
|     async getDetail(row) { | ||||
|       this.detailData = row | ||||
|       this.dialog.visible = true | ||||
|     }, | ||||
|     getSeverity(val) { | ||||
|       const map = { | ||||
|         1: { | ||||
|         4: { | ||||
|           text: '严重告警', | ||||
|           icon: 严重 | ||||
|         }, | ||||
|         2: { | ||||
|         3: { | ||||
|           text: '重要告警', | ||||
|           icon: 重要 | ||||
|         }, | ||||
|         3: { | ||||
|         2: { | ||||
|           text: '次要告警', | ||||
|           icon: 次要 | ||||
|         }, | ||||
|         4: { | ||||
|         1: { | ||||
|           text: '常规告警', | ||||
|           icon: 常规 | ||||
|         } | ||||
|  | @ -78,8 +100,8 @@ export default { | |||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     handleWarningOperation(row) { | ||||
|       console.log('处理告警', row) | ||||
|     goPage() { | ||||
|       this.$router.push({ path: '/oms-web/dashbaord?redirect=/alarm/current' }) | ||||
|     } | ||||
|   } | ||||
| } | ||||
|  | @ -90,4 +112,14 @@ export default { | |||
|   align-items: center; | ||||
|   gap: 13px; | ||||
| } | ||||
| .message-card { | ||||
|   padding: 20px; | ||||
|   font-size: 14px; | ||||
|   line-height: 20px; | ||||
| } | ||||
| 
 | ||||
| .site-message-detail { | ||||
|   white-space: pre-wrap; | ||||
|   word-break: break-all; | ||||
| } | ||||
| </style> | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue