Commit 8fb161c1 authored by xinzhedeai's avatar xinzhedeai

add:yh-check

parent 8967a9cf
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0, viewprot-fit:cover">
<title>高区“码”上</title>
<script type="text/javascript" src="../sdk/includeHead.js"></script>
<style>
.wrapper {
padding: 0.2rem;
background-color: #fff;
background: #F5F6FA;
}
/* 条件查询样式 */
.header .van-search__label{
background-color: #fff;
padding-right: .24rem;
}
.header .van-search__content{
padding-left: 0;
}
.header .van-search__content .van-cell{
padding-left: 0.24rem;
}
.tag {
display: inline-block;
width: 0.9rem;
height: 0.42rem;
line-height: 0.42rem;
text-align: center;
background: #00B55E;
border-radius: 21px;
font-weight: 500;
font-size: 0.28rem;
color: #FFFFFF;
}
/* 添加以下样式 */
.van-tabs__line {
background-color: #1989fa;
}
.blue-text {
color: #1989fa;
font-weight: 500;
}
.van-list {
background: #fff;
border-radius: 8px;
margin: 0 0.1rem;
}
.van-cell {
padding: 12px 16px;
}
.van-tab__text {
font-weight: bold;
font-size: 0.3rem;
}
.van-tab--active {
color: #1081E3;
}
.van-field__label {
font-weight: bold;
}
.van-field__control {
color: #737373;
}
</style>
</head>
<body>
<div id="app">
<div class="wrapper">
<!-- 商户头部信息 -->
<div class="header">
<van-search
v-model="shanghuName"
show-action
label="查询商家"
placeholder="请输入商家关键词"
@search="onSearch"
>
<template #action>
<div @click="onSearch"></div>
</template>
</van-search>
</div>
<!-- Tab栏 -->
<van-tabs v-model:active="activeTab" title-active-color="#1989fa" line-height="2px"
style="margin-bottom: 15px;">
<van-tab title="全部"></van-tab>
<van-tab title="待审核"></van-tab>
<van-tab title="待整改"></van-tab>
<van-tab title="已整改"></van-tab>
<!-- <van-tab title="整改逾期"></van-tab> -->
</van-tabs>
<!-- 隐患列表 -->
<van-list>
<van-cell v-for="item in filteredHazards" :key="item.id">
<div style="width: 100%;">
<!-- 第一行:隐患描述 -->
<div style="
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: #333;
font-size: 0.3rem;
font-weight: bold;
font-family: PingFang SC;
">{{ item.description }}</div>
<!-- 第二行:状态和时间 -->
<div style="display: flex; justify-content: space-between; margin: 8px 0;">
<van-tag :type="statusTagType(item.status)">
{{ item.status }}
</van-tag>
<span style="color: #737373; font-size: 0.28rem;margin-left: -1.4rem;">检查时间:{{ item.date }}</span>
<van-icon name="arrow" style="color: #1081E3;" @click="viewDetail(item.id)" />
</div>
<!-- 第三行:商家和箭头 -->
<div style="display: flex; justify-content: space-between; align-items: center;">
<span style="color: #666; font-size: 0.28rem;">商家名称:威海市宝威酒店有限公司{{ item.shop }}</span>
</div>
</div>
</van-cell>
</van-list>
</div>
<script>
// 在原有Vue实例中添加
new Vue({
el: '#app',
data() {
return {
shanghuName: '',
// 新增子Tab数据
subActiveTab: 0,
hazardList: [{
id: 1,
description: '消防通道被货物堵塞,存在严重安全隐患需要立即整改',
status: '待审核',
date: '2024-03-15',
shop: 'XX餐饮店',
type: 2
},
{
id: 2,
description: '消防通道被货物堵塞,存在严重安全隐患需要立即整改',
status: '待整改',
date: '2024-03-15',
shop: 'XX餐饮店',
type: 2
},
// 更多示例数据...
],
activeTab: 0,
}
},
computed: {
filteredHazards() {
const statusMap = ['全部', '待审核', '待整改', '已整改'];
return this.hazardList.filter(item =>
this.subActiveTab === 0 ? true : item.status === statusMap[this.subActiveTab]
);
}
},
methods: {
onSearch(){
console.log('xxxx')
},
// 新增选择确认方法
onConfirmType(value) {
this.formData.type = value;
this.showTypePicker = false;
},
onConfirmTime(time) {
this.formData.businessHours = time;
this.showTimePicker = false;
},
statusTagType(status) {
const types = {
'待审核': 'warning',
'待整改': 'primary',
'已整改': 'success',
'整改逾期': 'danger',
};
return types[status] || '';
},
viewDetail(id) {
console.log('查看详情:', id);
// 这里添加跳转逻辑
}
}
});
</script>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment