<!--
 * @Author: XHC
 * @Date: 2025-05-23 15:29:20
 * @LastEditors: XHC
 * @LastEditTime: 2025-05-23 16:28:13
 * @Description: 历史巡检
-->
<template>
	<view class="history">
		<view class="search-box">
			<uni-row :gutter="10">
				<uni-col :span="20">
					<uni-search-bar class="search" radius="15" bgColor="#EDF4FD" placeholder="搜索线路名称" clearButton="auto" cancelButton="none" @confirm="search" />
				</uni-col>
				<uni-col :span="4">
					<view class="screening"><uni-icons fontFamily="iconfont" color="#fff" :size="20">{{'&#xe621;'}}</uni-icons></view>
				</uni-col>
			</uni-row>
		</view>
		<uni-card class="list-card" v-for="(item, index) in listData" :key="index">
			<view class="head">
				<text class="title">{{ item.title }}</text>
				<uni-tag :inverted="true" :text="item.state" :type="item.state == '异常' ? 'warning' : 'success'" />
			</view>
			<view class="num grey">线路编号：{{ item.num }}</view>
			<view class="info-box grey">
				<view class="info"><uni-icons fontFamily="iconfont" color="#1469BC">{{'&#xe753;'}}</uni-icons> {{ item.info }}</view>
				<view class="info"><uni-icons fontFamily="iconfont" color="#808185">{{'&#xe74e;'}}</uni-icons> <text>{{ item.time }}</text></view>
			</view>
		</uni-card>
	</view>
</template>

<script setup>
import { reactive, ref } from "vue";

// 列表数据
let listData = reactive([
	{ title: '左岸白班机组', state: '异常', num: 'BHT-YX-XJ-L1.2', info: '运行部 :五值 :白班', time: '2025-02-20 11:20' },
	{ title: '左岸主变洞及出线场(上午)', state: '正常', num: 'BHT-YX-XJ-L1.2', info: '运行部 :五值 :白班', time: '2025-02-20 11:20' },
	{ title: '左岸白班机组', state: '异常', num: 'BHT-YX-XJ-L1.2', info: '运行部 :五值 :白班', time: '2025-02-20 11:20' },
	{ title: '左岸主变洞及出线场(上午)', state: '正常', num: 'BHT-YX-XJ-L1.2', info: '运行部 :五值 :白班', time: '2025-02-20 11:20' },
	{ title: '左岸白班机组', state: '异常', num: 'BHT-YX-XJ-L1.2', info: '运行部 :五值 :白班', time: '2025-02-20 11:20' },
	{ title: '左岸主变洞及出线场(上午)', state: '正常', num: 'BHT-YX-XJ-L1.2', info: '运行部 :五值 :白班', time: '2025-02-20 11:20' },
	{ title: '左岸白班机组', state: '异常', num: 'BHT-YX-XJ-L1.2', info: '运行部 :五值 :白班', time: '2025-02-20 11:20' },
	{ title: '左岸主变洞及出线场(上午)', state: '正常', num: 'BHT-YX-XJ-L1.2', info: '运行部 :五值 :白班', time: '2025-02-20 11:20' },
	
])

// 搜索
const search = () => {

}
</script>

<style lang="scss" scoped>
.history {
	.search-box {
		.screening {
			margin: 25rpx 15rpx 0 0;
			padding: 7rpx 0;
			background: #ffffff47;
			border-radius: 20rpx;
			text-align: center;
		}
	}
}
</style>