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 @@
id="app"
class="page_wrapper"
v-cloak
v-if="!['consumers'].includes(userInfo.userType)"
v-if="!['consumers'].includes(userInfo.userType)"
>
<!-- 第二层:商户图标、名称、等级、场所类型和地址 -->
<div
......@@ -103,7 +103,24 @@
<div class="merchant-info">
<div class="name-rank">
<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 class="divider"></div>
<div class="type-address">
......
......@@ -38,12 +38,13 @@ window.onload = function () {
},
],
userInfo: {
userType: 'sj1', // 登录用户type
userType: 'sj1', // 登录用户type
userType: 'consumers', // 登录用户type
userId: '1', // 登录用户id
userName: '张三', // 登录用户name
deptId: '1', // 登录用户部门id
deptName: '部门1', // 登录用户部门name
safeLevel: '0', //0:绿、1:黄、2:红
role: 'dudao',
roleName: '',
},
......@@ -167,7 +168,10 @@ window.onload = function () {
navTo(url) {
// gemhoUtil.nav2asd(url)
},
gotoPage(stringifyUrl) {
let url = gemhoUtil.setParameter(`src/_${stringifyUrl}.html`)
gemhoUtil.navigatePage(url, '跳转中...')
},
init() {
// 在组件挂载后执行
// 调用你的方法
......@@ -217,7 +221,7 @@ window.onload = function () {
},
},
(res) => {
console.log(JSON.parse(res), 'JSON.parse(res)')
console.log(JSON.parse(res), 'JSON.parse(res)')
if (!res) {
// 中台返回为undefined 重新请求
vant.Toast.clear()
......@@ -237,6 +241,7 @@ window.onload = function () {
userId: '1', // 登录用户id
userName: '张三', // 登录用户name
deptId: '1', // 登录用户部门id
safeLevel: result.data.merchantInfoNumVo?.safeLevel, //0:绿、1:黄、2:红
deptName: result.data.roleDeptNameVo.deptName, // 登录用户部门name
businessAddress:
result.data.merchantInfoNumVo?.businessAddress, //
......@@ -248,32 +253,32 @@ window.onload = function () {
merId: result.data.merchantInfoNumVo?.id, //
}
gemhoUtil.setCookie('userType', this.userInfo.userType)
if(this.userInfo.userType === 'consumers'){ // 2025年5月14日新增消费者逻辑
// 根据url地址的merid获取商户信息
if(gemhoUtil.getParameter('merId')){ // 消费者直接在爱山东扫商户码进入首页
// this.getMerInfo()
param = {
merId: gemhoUtil.getParameter('merId'),
pageName: 'src/_consumer_home',
}
let url = gemhoUtil.setParameter(`${param.pageName}.html`, param)
gemhoUtil.navigatePage(url, '跳转中...')
return
}else{ // 消费者不扫码后,直接退出到爱山东首页。(用户直接在爱山东点击应用进入首页)
vant.Dialog.alert({
title: '信息提示',
message: '请扫描商户码访问~',
}).then(() => { // 关闭当前访问页面回到爱山东
lightAppJssdk.navigation.close({
success: function (data) { },
fail: function (data) { },
})
});
}
return
}else if (this.userInfo.userType === 'shop') {
if (this.userInfo.userType === 'consumers') { // 2025年5月14日新增消费者逻辑
// 根据url地址的merid获取商户信息
if (gemhoUtil.getParameter('merId')) { // 消费者直接在爱山东扫商户码进入首页
// this.getMerInfo()
param = {
merId: gemhoUtil.getParameter('merId'),
pageName: 'src/_consumer_home',
}
let url = gemhoUtil.setParameter(`${param.pageName}.html`, param)
gemhoUtil.navigatePage(url, '跳转中...')
return
} else { // 消费者不扫码后,直接退出到爱山东首页。(用户直接在爱山东点击应用进入首页)
vant.Dialog.alert({
title: '信息提示',
message: '请扫描商户码访问~',
}).then(() => { // 关闭当前访问页面回到爱山东
lightAppJssdk.navigation.close({
success: function (data) { },
fail: function (data) { },
})
});
}
return
} else if (this.userInfo.userType === 'shop') {
this.defaultMenuList[1].navTo = 'checkrecord'
} else {
this.defaultMenuList[1].navTo = 'shanghu_list'
......@@ -317,7 +322,7 @@ window.onload = function () {
pageSize: this.size,
date: this.selectedDate,
sort: 'lawId,desc',
merId: gemhoUtil.getParameter('merId'),
merId: gemhoUtil.getParameter('merId'),
},
},
(res) => {
......@@ -348,6 +353,6 @@ window.onload = function () {
return `${year}${month}月`
},
},
})
}
......@@ -10,14 +10,14 @@ axios.defaults.headers.post['Content-Type'] = 'application/json'
// axios.defaults.headers.common['Authorization'] = gemhoUtil.getCookie('token')
// 消费者token
axios.defaults.headers.common['Authorization'] =
'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiLmtojotLnogIUiLCJsb2dpbl91c2VyX2tleSI6ImExNWIwMDNjLWRlYWItNGU2MC04ODg4LTJiODNjMzVkNDUzNSJ9.l6gHzFX-U5rKGJ7zoDA4jMBIxkhVgCjWr5ynFg1DR6xspM9Ls6raTxyEo2Kr61UbG2UD6P2kN63vF_U8nX8afg'
// // 消费者token
// axios.defaults.headers.common['Authorization'] =
// 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiLmtojotLnogIUiLCJsb2dpbl91c2VyX2tleSI6ImExNWIwMDNjLWRlYWItNGU2MC04ODg4LTJiODNjMzVkNDUzNSJ9.l6gHzFX-U5rKGJ7zoDA4jMBIxkhVgCjWr5ynFg1DR6xspM9Ls6raTxyEo2Kr61UbG2UD6P2kN63vF_U8nX8afg'
// // 商户token
// axios.defaults.headers.common['Authorization'] =
// 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiLlvKDlrZ3lvakiLCJsb2dpbl91c2VyX2tleSI6ImYzZDMwY2Q4LWY5ODAtNGE0NC1iNzE1LTZiMTJlNGQyZTQ1OCJ9.HjtdJuJS7NjTw4GMaAtDtOeA2EnF75pXVQefzwkdrxQdxyHB6L8h0XhKSB5A_YMsznQMd4DZrGZ5TPEmc1fueg'
// 商户token
axios.defaults.headers.common['Authorization'] =
'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxMzg2MzE1OTk4NyIsImxvZ2luX3VzZXJfa2V5IjoiMDc1ZWVkOGUtYjZjNC00OTE3LWJlYjYtY2RhOTBmYWY2YTkwIn0.7IcT8J7AGWR7vlesikjZvDYYvSY46TKIU2F41g8V7z6naxJQOlOKt-IXTzTo2QmlSF5Eo7hbxfTy7OJxdT4MWw'
// admin账号token
// 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,
body {
letter-spacing: .01rem;
letter-spacing: 0.01rem;
}
.wrapper {
/* padding: 0.2rem; */
background-color: #fff;
/* padding: 0.2rem; */
background-color: #fff;
}
.header {
padding: .2rem;
padding: 0.2rem;
}
.header .title {
font-weight: bold;
font-size: 0.32rem;
color: #000000;
display: flex;
justify-content: start;
align-items: center;
gap: 0.2rem;
padding: 0.3rem 0.3rem;
font-weight: bold;
font-size: 0.32rem;
color: #000000;
display: flex;
justify-content: start;
align-items: center;
gap: 0.2rem;
padding: 0.3rem 0.3rem;
}
.header .title img {
width: 0.51rem;
height: 0.52rem;
width: 0.51rem;
height: 0.52rem;
}
.detail {
width: 6.5rem;
/* height: 1.88rem; */
background: #F5F6FA;
border-radius: 0.01rem;
/* padding-left: 0.2rem; */
padding: 0.3rem;
margin-bottom: 0.2rem;
display: flex;
align-items: start;
flex-direction: column;
justify-content: space-around;
/* padding-bottom: 0.1rem;
width: 6.5rem;
/* height: 1.88rem; */
background: #f5f6fa;
border-radius: 0.01rem;
/* padding-left: 0.2rem; */
padding: 0.3rem;
margin-bottom: 0.2rem;
display: flex;
align-items: start;
flex-direction: column;
justify-content: space-around;
/* padding-bottom: 0.1rem;
gap: 0.1rem; */
}
.detail .van-col {
font-family: PingFang SC;
font-weight: 500;
font-size: 0.28rem;
color: #737373;
font-family: PingFang SC;
font-weight: 500;
font-size: 0.28rem;
color: #737373;
}
.detail span {
font-family: PingFang SC;
font-weight: 500;
font-size: 0.28rem;
color: #737373;
font-family: PingFang SC;
font-weight: 500;
font-size: 0.28rem;
color: #737373;
}
.detail .detail_link {
position: absolute;
right: .3rem;
font-size: .26rem;
color: #1081E3;
cursor: pointer;
position: absolute;
right: 0.3rem;
font-size: 0.26rem;
color: #1081e3;
cursor: pointer;
}
.func_btn {
width: 7.12rem;
height: 0.8rem;
background: #1081E3;
border-radius: 0.1rem;
font-family: PingFang SC;
font-weight: 500;
font-size: 0.3rem;
color: #FFFFFF;
margin: 0 auto;
border-width: 0;
margin-left: .2rem;
cursor: pointer;
width: 7.12rem;
height: 0.8rem;
background: #1081e3;
border-radius: 0.1rem;
font-family: PingFang SC;
font-weight: 500;
font-size: 0.3rem;
color: #ffffff;
margin: 0 auto;
border-width: 0;
margin-left: 0.2rem;
cursor: pointer;
}
.func_btn span {
font-size: 0.5rem;
vertical-align: -0.05rem;
margin-right: .1rem;
font-size: 0.5rem;
vertical-align: -0.05rem;
margin-right: 0.1rem;
}
.tag {
display: inline-block;
width: 1.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;
display: inline-block;
width: 1.9rem;
height: 0.42rem;
line-height: 0.42rem;
text-align: center;
border-radius: 21px;
font-weight: 500;
font-size: 0.28rem;
color: #ffffff;
}
.green {
background: #00b55e;
}
.yellow {
background: rgba(255, 148, 21, 1);
}
.red {
background: rgba(255, 33, 49, 1);
}
/* 添加以下样式 */
.van-tabs__line {
background-color: #1989fa;
background-color: #1989fa;
}
.blue-text {
color: #1989fa;
font-weight: 500;
color: #1989fa;
font-weight: 500;
}
.van-list {
background: #fff;
border-radius: 8px;
margin: 0 0.1rem;
background: #fff;
border-radius: 8px;
margin: 0 0.1rem;
}
.subNavWrapper .van-cell {
padding: 12px 10px;
padding: 12px 10px;
}
.van-tab {
color: #000;
color: #000;
}
.van-tab__text {
font-weight: bold;
font-size: 0.3rem;
/* color: #000; */
font-weight: bold;
font-size: 0.3rem;
/* color: #000; */
}
.van-tab--active {
color: #1081E3;
color: #1081e3;
}
.van-field__label {
font-weight: bold;
font-weight: bold;
}
.van-field__control {
color: #737373;
color: #737373;
}
.subNavWrapper {
background-color: #F5F6FA;
padding: 0.2rem 0.2rem;
margin-top: -0.3rem;
background-color: #f5f6fa;
padding: 0.2rem 0.2rem;
margin-top: -0.3rem;
}
.subNavWrapper .van-tab__text {
color: #5B5B5B;
color: #5b5b5b;
}
.subNavWrapper .van-tab--active span {
color: #fff;
font-size: 0.28rem;
color: #fff;
font-size: 0.28rem;
}
.subNavWrapper .van-tabs__nav--card {
border: none !important;
border: none !important;
}
.subNavWrapper .van-tabs--card {
margin-bottom: 0.3rem;
margin-bottom: 0.3rem;
}
.subNavWrapper .van-tabs__nav--card .van-tab {
color: #5B5B5B;
border: none !important;
color: #5b5b5b;
border: none !important;
}
.subNavWrapper .van-tabs__nav--card .van-tab.van-tab--active {
color: #FFFFFF;
background: #58A5E8;
border-radius: 0.4rem;
color: #ffffff;
background: #58a5e8;
border-radius: 0.4rem;
}
.subNavWrapper .van-list {
background: #F5F6FA;
background: #f5f6fa;
}
.subNavWrapper .van-cell {
margin-bottom: .3rem;
margin-bottom: 0.3rem;
}
.subNavWrapper .van-tabs__nav {
background: #F5F6FA;
margin: 0;
background: #f5f6fa;
margin: 0;
}
.navToBtn {
color: #5B5B5B;
font-size: .36rem;
margin-top: .04rem;
position: absolute;
right: 0;
}
\ No newline at end of file
color: #5b5b5b;
font-size: 0.36rem;
margin-top: 0.04rem;
position: absolute;
right: 0;
}
......@@ -15,7 +15,10 @@
<div class="header">
<!-- <div class="level">安全等级</div> -->
<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 class="detail">
<van-row>
......
......@@ -85,6 +85,10 @@ window.addEventListener("load", function () {
}
},
gotoPage(stringifyUrl) {
let url = gemhoUtil.setParameter(`src/_${stringifyUrl}.html`)
gemhoUtil.navigatePage(url, '跳转中...')
},
// 新增选择确认方法
onConfirmType(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