Commit 1386b9f6 authored by lei's avatar lei

add:安全等级详情页面;home.html.css.js;shanghu_home.html.css.js;

parent f747b514
This diff is collapsed.
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
id="app" id="app"
class="page_wrapper" class="page_wrapper"
v-cloak v-cloak
v-if="!['consumers'].includes(userInfo.userType)" v-if="!['consumers'].includes(userInfo.userType)"
> >
<!-- 第二层:商户图标、名称、等级、场所类型和地址 --> <!-- 第二层:商户图标、名称、等级、场所类型和地址 -->
<div <div
...@@ -103,7 +103,24 @@ ...@@ -103,7 +103,24 @@
<div class="merchant-info"> <div class="merchant-info">
<div class="name-rank"> <div class="name-rank">
<span class="merchant-name">{{userInfo.unitName}}</span> <span class="merchant-name">{{userInfo.unitName}}</span>
<span class="user-rank">安全等级:绿</span> <span
class="user-rank green"
v-if="userInfo.safeLevel==0"
@click="gotoPage('anquan_level')"
>安全等级:绿</span
>
<span
class="user-rank yellow"
v-if="userInfo.safeLevel==1"
@click="gotoPage('anquan_level')"
>安全等级:黄</span
>
<span
class="user-rank red"
v-if="userInfo.safeLevel==2"
@click="gotoPage('anquan_level')"
>安全等级:红</span
>
</div> </div>
<div class="divider"></div> <div class="divider"></div>
<div class="type-address"> <div class="type-address">
......
...@@ -38,12 +38,13 @@ window.onload = function () { ...@@ -38,12 +38,13 @@ window.onload = function () {
}, },
], ],
userInfo: { userInfo: {
userType: 'sj1', // 登录用户type userType: 'sj1', // 登录用户type
userType: 'consumers', // 登录用户type userType: 'consumers', // 登录用户type
userId: '1', // 登录用户id userId: '1', // 登录用户id
userName: '张三', // 登录用户name userName: '张三', // 登录用户name
deptId: '1', // 登录用户部门id deptId: '1', // 登录用户部门id
deptName: '部门1', // 登录用户部门name deptName: '部门1', // 登录用户部门name
safeLevel: '0', //0:绿、1:黄、2:红
role: 'dudao', role: 'dudao',
roleName: '', roleName: '',
}, },
...@@ -167,7 +168,10 @@ window.onload = function () { ...@@ -167,7 +168,10 @@ window.onload = function () {
navTo(url) { navTo(url) {
// gemhoUtil.nav2asd(url) // gemhoUtil.nav2asd(url)
}, },
gotoPage(stringifyUrl) {
let url = gemhoUtil.setParameter(`src/_${stringifyUrl}.html`)
gemhoUtil.navigatePage(url, '跳转中...')
},
init() { init() {
// 在组件挂载后执行 // 在组件挂载后执行
// 调用你的方法 // 调用你的方法
...@@ -217,7 +221,7 @@ window.onload = function () { ...@@ -217,7 +221,7 @@ window.onload = function () {
}, },
}, },
(res) => { (res) => {
console.log(JSON.parse(res), 'JSON.parse(res)') console.log(JSON.parse(res), 'JSON.parse(res)')
if (!res) { if (!res) {
// 中台返回为undefined 重新请求 // 中台返回为undefined 重新请求
vant.Toast.clear() vant.Toast.clear()
...@@ -237,6 +241,7 @@ window.onload = function () { ...@@ -237,6 +241,7 @@ window.onload = function () {
userId: '1', // 登录用户id userId: '1', // 登录用户id
userName: '张三', // 登录用户name userName: '张三', // 登录用户name
deptId: '1', // 登录用户部门id deptId: '1', // 登录用户部门id
safeLevel: result.data.merchantInfoNumVo?.safeLevel, //0:绿、1:黄、2:红
deptName: result.data.roleDeptNameVo.deptName, // 登录用户部门name deptName: result.data.roleDeptNameVo.deptName, // 登录用户部门name
businessAddress: businessAddress:
result.data.merchantInfoNumVo?.businessAddress, // result.data.merchantInfoNumVo?.businessAddress, //
...@@ -248,32 +253,32 @@ window.onload = function () { ...@@ -248,32 +253,32 @@ window.onload = function () {
merId: result.data.merchantInfoNumVo?.id, // merId: result.data.merchantInfoNumVo?.id, //
} }
gemhoUtil.setCookie('userType', this.userInfo.userType) gemhoUtil.setCookie('userType', this.userInfo.userType)
if(this.userInfo.userType === 'consumers'){ // 2025年5月14日新增消费者逻辑 if (this.userInfo.userType === 'consumers') { // 2025年5月14日新增消费者逻辑
// 根据url地址的merid获取商户信息 // 根据url地址的merid获取商户信息
if(gemhoUtil.getParameter('merId')){ // 消费者直接在爱山东扫商户码进入首页 if (gemhoUtil.getParameter('merId')) { // 消费者直接在爱山东扫商户码进入首页
// this.getMerInfo() // this.getMerInfo()
param = { param = {
merId: gemhoUtil.getParameter('merId'), merId: gemhoUtil.getParameter('merId'),
pageName: 'src/_consumer_home', pageName: 'src/_consumer_home',
} }
let url = gemhoUtil.setParameter(`${param.pageName}.html`, param) let url = gemhoUtil.setParameter(`${param.pageName}.html`, param)
gemhoUtil.navigatePage(url, '跳转中...') gemhoUtil.navigatePage(url, '跳转中...')
return return
}else{ // 消费者不扫码后,直接退出到爱山东首页。(用户直接在爱山东点击应用进入首页) } else { // 消费者不扫码后,直接退出到爱山东首页。(用户直接在爱山东点击应用进入首页)
vant.Dialog.alert({ vant.Dialog.alert({
title: '信息提示', title: '信息提示',
message: '请扫描商户码访问~', message: '请扫描商户码访问~',
}).then(() => { // 关闭当前访问页面回到爱山东 }).then(() => { // 关闭当前访问页面回到爱山东
lightAppJssdk.navigation.close({ lightAppJssdk.navigation.close({
success: function (data) { }, success: function (data) { },
fail: function (data) { }, fail: function (data) { },
}) })
}); });
} }
return return
}else if (this.userInfo.userType === 'shop') { } else if (this.userInfo.userType === 'shop') {
this.defaultMenuList[1].navTo = 'checkrecord' this.defaultMenuList[1].navTo = 'checkrecord'
} else { } else {
this.defaultMenuList[1].navTo = 'shanghu_list' this.defaultMenuList[1].navTo = 'shanghu_list'
...@@ -317,7 +322,7 @@ window.onload = function () { ...@@ -317,7 +322,7 @@ window.onload = function () {
pageSize: this.size, pageSize: this.size,
date: this.selectedDate, date: this.selectedDate,
sort: 'lawId,desc', sort: 'lawId,desc',
merId: gemhoUtil.getParameter('merId'), merId: gemhoUtil.getParameter('merId'),
}, },
}, },
(res) => { (res) => {
...@@ -348,6 +353,6 @@ window.onload = function () { ...@@ -348,6 +353,6 @@ window.onload = function () {
return `${year}${month}月` return `${year}${month}月`
}, },
}, },
}) })
} }
...@@ -10,14 +10,14 @@ axios.defaults.headers.post['Content-Type'] = 'application/json' ...@@ -10,14 +10,14 @@ axios.defaults.headers.post['Content-Type'] = 'application/json'
// axios.defaults.headers.common['Authorization'] = gemhoUtil.getCookie('token') // axios.defaults.headers.common['Authorization'] = gemhoUtil.getCookie('token')
// 消费者token // // 消费者token
axios.defaults.headers.common['Authorization'] = // axios.defaults.headers.common['Authorization'] =
'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiLmtojotLnogIUiLCJsb2dpbl91c2VyX2tleSI6ImExNWIwMDNjLWRlYWItNGU2MC04ODg4LTJiODNjMzVkNDUzNSJ9.l6gHzFX-U5rKGJ7zoDA4jMBIxkhVgCjWr5ynFg1DR6xspM9Ls6raTxyEo2Kr61UbG2UD6P2kN63vF_U8nX8afg' // 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiLmtojotLnogIUiLCJsb2dpbl91c2VyX2tleSI6ImExNWIwMDNjLWRlYWItNGU2MC04ODg4LTJiODNjMzVkNDUzNSJ9.l6gHzFX-U5rKGJ7zoDA4jMBIxkhVgCjWr5ynFg1DR6xspM9Ls6raTxyEo2Kr61UbG2UD6P2kN63vF_U8nX8afg'
// // 商户token // 商户token
// axios.defaults.headers.common['Authorization'] = axios.defaults.headers.common['Authorization'] =
// 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiLlvKDlrZ3lvakiLCJsb2dpbl91c2VyX2tleSI6ImYzZDMwY2Q4LWY5ODAtNGE0NC1iNzE1LTZiMTJlNGQyZTQ1OCJ9.HjtdJuJS7NjTw4GMaAtDtOeA2EnF75pXVQefzwkdrxQdxyHB6L8h0XhKSB5A_YMsznQMd4DZrGZ5TPEmc1fueg' 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxMzg2MzE1OTk4NyIsImxvZ2luX3VzZXJfa2V5IjoiMDc1ZWVkOGUtYjZjNC00OTE3LWJlYjYtY2RhOTBmYWY2YTkwIn0.7IcT8J7AGWR7vlesikjZvDYYvSY46TKIU2F41g8V7z6naxJQOlOKt-IXTzTo2QmlSF5Eo7hbxfTy7OJxdT4MWw'
// admin账号token // admin账号token
// axios.defaults.headers.common['Authorization'] = // axios.defaults.headers.common['Authorization'] =
......
/* 全局样式重置 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
-webkit-tap-highlight-color: transparent;
}
/* 基础样式 */
body {
font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
line-height: 1.5;
color: #333;
background-color: #f8f8f8;
padding-bottom: 20px;
}
/* 表格样式 */
.table-container {
margin: 15px;
background-color: #fff;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
table {
width: 100%;
border-collapse: collapse;
}
th,
td {
padding: 12px 15px;
text-align: center;
border-bottom: 1px solid #eee;
border-right: 1px solid #eee;
}
/* 最后一列去除右边框 */
th:last-child,
td:last-child {
border-right: none;
}
th {
font-size: 20px;
color: #666;
font-weight: bold;
}
td {
font-size: 16px;
}
/* 等级标识样式 */
.level-icon {
display: inline-block;
width: 24px;
height: 24px;
margin-right: 10px;
vertical-align: middle;
text-align: center;
line-height: 24px;
color: #fff;
}
.green .level-icon {
background-color: #4caf50;
}
.yellow .level-icon {
background-color: #ffc107;
}
.red .level-icon {
background-color: #f44336;
}
/* 第一列宽度调整 */
th:first-child,
td:first-child {
width: 100px;
}
/* 最后一行去除下边框 */
tr:last-child td {
border-bottom: none;
}
/* 注释样式 */
.note {
margin: 15px;
font-size: 12px;
color: #999;
line-height: 1.4;
}
<!DOCTYPE html>
<html>
<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>
</head>
</head>
<body>
<div id="app">
<div class="wrapper" >
<van-nav-bar
title="安全等级说明"
left-arrow
@click-left="onClickLeft"
></van-nav-bar>
<div class="table-container">
<table>
<thead>
<tr>
<th>等级</th>
<th>判定条件</th>
</tr>
</thead>
<tbody>
<tr class="green">
<td><span class="level-icon">绿</span></td>
<td>1个月内自查数≥1次 且 超期未整改≤2次</td>
</tr>
<tr class="yellow">
<td><span class="level-icon"></span></td>
<td>1个月内自查数=0 或 超期未整改>2次</td>
</tr>
<tr class="red">
<td><span class="level-icon"></span></td>
<td>2个月内自查数=0 或 超期未整改>4次</td>
</tr>
</tbody>
</table>
</div>
<p class="note">注:等级根据企业自查、整改数据实时变动</p>
</div>
</div>
</body>
</html>
\ No newline at end of file
/**
* author: dabao
* date: 2024-03-15
* description: 安全等级
*/
var VUE = null
window.addEventListener("load", function () {
VUE = new Vue({
el: '#app',
data() {
return {
}
},
methods: {
// 跳转
onClickLeft() {
window.history.back()
}
}
});
})
\ No newline at end of file
This diff is collapsed.
html, html,
body { body {
letter-spacing: .01rem; letter-spacing: 0.01rem;
} }
.wrapper { .wrapper {
/* padding: 0.2rem; */ /* padding: 0.2rem; */
background-color: #fff; background-color: #fff;
} }
.header { .header {
padding: .2rem; padding: 0.2rem;
} }
.header .title { .header .title {
font-weight: bold; font-weight: bold;
font-size: 0.32rem; font-size: 0.32rem;
color: #000000; color: #000000;
display: flex; display: flex;
justify-content: start; justify-content: start;
align-items: center; align-items: center;
gap: 0.2rem; gap: 0.2rem;
padding: 0.3rem 0.3rem; padding: 0.3rem 0.3rem;
} }
.header .title img { .header .title img {
width: 0.51rem; width: 0.51rem;
height: 0.52rem; height: 0.52rem;
} }
.detail { .detail {
width: 6.5rem; width: 6.5rem;
/* height: 1.88rem; */ /* height: 1.88rem; */
background: #F5F6FA; background: #f5f6fa;
border-radius: 0.01rem; border-radius: 0.01rem;
/* padding-left: 0.2rem; */ /* padding-left: 0.2rem; */
padding: 0.3rem; padding: 0.3rem;
margin-bottom: 0.2rem; margin-bottom: 0.2rem;
display: flex; display: flex;
align-items: start; align-items: start;
flex-direction: column; flex-direction: column;
justify-content: space-around; justify-content: space-around;
/* padding-bottom: 0.1rem; /* padding-bottom: 0.1rem;
gap: 0.1rem; */ gap: 0.1rem; */
} }
.detail .van-col { .detail .van-col {
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: 500;
font-size: 0.28rem; font-size: 0.28rem;
color: #737373; color: #737373;
} }
.detail span { .detail span {
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: 500;
font-size: 0.28rem; font-size: 0.28rem;
color: #737373; color: #737373;
} }
.detail .detail_link { .detail .detail_link {
position: absolute; position: absolute;
right: .3rem; right: 0.3rem;
font-size: .26rem; font-size: 0.26rem;
color: #1081E3; color: #1081e3;
cursor: pointer; cursor: pointer;
} }
.func_btn { .func_btn {
width: 7.12rem; width: 7.12rem;
height: 0.8rem; height: 0.8rem;
background: #1081E3; background: #1081e3;
border-radius: 0.1rem; border-radius: 0.1rem;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: 500;
font-size: 0.3rem; font-size: 0.3rem;
color: #FFFFFF; color: #ffffff;
margin: 0 auto; margin: 0 auto;
border-width: 0; border-width: 0;
margin-left: .2rem; margin-left: 0.2rem;
cursor: pointer; cursor: pointer;
} }
.func_btn span { .func_btn span {
font-size: 0.5rem; font-size: 0.5rem;
vertical-align: -0.05rem; vertical-align: -0.05rem;
margin-right: .1rem; margin-right: 0.1rem;
} }
.tag { .tag {
display: inline-block; display: inline-block;
width: 1.9rem; width: 1.9rem;
height: 0.42rem; height: 0.42rem;
line-height: 0.42rem; line-height: 0.42rem;
text-align: center; text-align: center;
background: #00B55E; border-radius: 21px;
border-radius: 21px; font-weight: 500;
font-weight: 500; font-size: 0.28rem;
font-size: 0.28rem; color: #ffffff;
color: #FFFFFF; }
.green {
background: #00b55e;
}
.yellow {
background: rgba(255, 148, 21, 1);
}
.red {
background: rgba(255, 33, 49, 1);
} }
/* 添加以下样式 */ /* 添加以下样式 */
.van-tabs__line { .van-tabs__line {
background-color: #1989fa; background-color: #1989fa;
} }
.blue-text { .blue-text {
color: #1989fa; color: #1989fa;
font-weight: 500; font-weight: 500;
} }
.van-list { .van-list {
background: #fff; background: #fff;
border-radius: 8px; border-radius: 8px;
margin: 0 0.1rem; margin: 0 0.1rem;
} }
.subNavWrapper .van-cell { .subNavWrapper .van-cell {
padding: 12px 10px; padding: 12px 10px;
} }
.van-tab { .van-tab {
color: #000; color: #000;
} }
.van-tab__text { .van-tab__text {
font-weight: bold; font-weight: bold;
font-size: 0.3rem; font-size: 0.3rem;
/* color: #000; */ /* color: #000; */
} }
.van-tab--active { .van-tab--active {
color: #1081e3;
color: #1081E3;
} }
.van-field__label { .van-field__label {
font-weight: bold; font-weight: bold;
} }
.van-field__control { .van-field__control {
color: #737373; color: #737373;
} }
.subNavWrapper { .subNavWrapper {
background-color: #F5F6FA; background-color: #f5f6fa;
padding: 0.2rem 0.2rem; padding: 0.2rem 0.2rem;
margin-top: -0.3rem; margin-top: -0.3rem;
} }
.subNavWrapper .van-tab__text { .subNavWrapper .van-tab__text {
color: #5B5B5B; color: #5b5b5b;
} }
.subNavWrapper .van-tab--active span { .subNavWrapper .van-tab--active span {
color: #fff; color: #fff;
font-size: 0.28rem; font-size: 0.28rem;
} }
.subNavWrapper .van-tabs__nav--card { .subNavWrapper .van-tabs__nav--card {
border: none !important; border: none !important;
} }
.subNavWrapper .van-tabs--card { .subNavWrapper .van-tabs--card {
margin-bottom: 0.3rem; margin-bottom: 0.3rem;
} }
.subNavWrapper .van-tabs__nav--card .van-tab { .subNavWrapper .van-tabs__nav--card .van-tab {
color: #5B5B5B; color: #5b5b5b;
border: none !important; border: none !important;
} }
.subNavWrapper .van-tabs__nav--card .van-tab.van-tab--active { .subNavWrapper .van-tabs__nav--card .van-tab.van-tab--active {
color: #FFFFFF; color: #ffffff;
background: #58A5E8; background: #58a5e8;
border-radius: 0.4rem; border-radius: 0.4rem;
} }
.subNavWrapper .van-list { .subNavWrapper .van-list {
background: #F5F6FA; background: #f5f6fa;
} }
.subNavWrapper .van-cell { .subNavWrapper .van-cell {
margin-bottom: .3rem; margin-bottom: 0.3rem;
} }
.subNavWrapper .van-tabs__nav { .subNavWrapper .van-tabs__nav {
background: #F5F6FA; background: #f5f6fa;
margin: 0; margin: 0;
} }
.navToBtn { .navToBtn {
color: #5B5B5B; color: #5b5b5b;
font-size: .36rem; font-size: 0.36rem;
margin-top: .04rem; margin-top: 0.04rem;
position: absolute; position: absolute;
right: 0; right: 0;
} }
\ No newline at end of file
...@@ -15,7 +15,10 @@ ...@@ -15,7 +15,10 @@
<div class="header"> <div class="header">
<!-- <div class="level">安全等级</div> --> <!-- <div class="level">安全等级</div> -->
<div class="title"> <div class="title">
<img src="../image/code/sj.png" alt=""><span>{{merInformation.unitName}}</span><span class="tag">安全等级-绿</span> <img src="../image/code/sj.png" alt=""><span>{{merInformation.unitName}}</span>
<span class="tag green" v-if="merInformation.safeLevel==0" @click="gotoPage('anquan_level')">安全等级-绿</span>
<span class="tag yellow" v-if="merInformation.safeLevel==1" @click="gotoPage('anquan_level')">安全等级-黄</span>
<span class="tag red" v-if="merInformation.safeLevel==2" @click="gotoPage('anquan_level')">安全等级-红</span>
</div> </div>
<div class="detail"> <div class="detail">
<van-row> <van-row>
......
...@@ -85,6 +85,10 @@ window.addEventListener("load", function () { ...@@ -85,6 +85,10 @@ window.addEventListener("load", function () {
} }
}, },
gotoPage(stringifyUrl) {
let url = gemhoUtil.setParameter(`src/_${stringifyUrl}.html`)
gemhoUtil.navigatePage(url, '跳转中...')
},
// 新增选择确认方法 // 新增选择确认方法
onConfirmType(value) { onConfirmType(value) {
this.formData.type = value; this.formData.type = value;
......
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