Commit 05afe206 authored by xinzhedeai's avatar xinzhedeai

高区应急系统h5 山东通 初始化

parents
Pipeline #391 canceled with stages
body {
min-width: 320px;
max-width: 750px;
width: 10rem;
margin: 0 auto;
line-height: 1.5;
font-family: Arial, Helvetica;
background: #f2f2f2;
}
/* 如果屏幕超过了750px,就按照750px显示 */
@media screen and (min-width: 750px) {
html {
/* 提高权重 */
font-size: 75px!important;
}
}
a {
text-decoration: none;
font-size: .3333rem;
}
.search-content {
display: flex;
position: fixed;
top: 0;
left: 50%;
transform: translateX(-50%);
width: 10rem;
height: 1.1733rem;
background-color: #ffc001;
}
.search-content .classify {
width: .5867rem;
height: .9333rem;
margin: .16rem .3333rem .1333rem;
background: url(../images/classify.png) no-repeat;
background-size: .5867rem .9333rem;
}
.search-content .search {
flex: 1;
}
.search-content .search input {
outline: none;
border: 0;
width: 100%;
height: .88rem;
font-size: .3333rem;
background-color: #fff2cc;
margin-top: .1333rem;
border-radius: .44rem;
color: #757575;
padding-left: .7333rem;
}
.search-content .login {
width: 1rem;
height: .9333rem;
margin: .1333rem;
color: #fff;
text-align: center;
line-height: .9333rem;
}
\ No newline at end of file
/*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */
/**
* 1. Change the default font family in all browsers (opinionated).
* 2. Correct the line height in all browsers.
* 3. Prevent adjustments of font size after orientation changes in
* IE on Windows Phone and in iOS.
*/
/* Document
========================================================================== */
html {
font-family: sans-serif; /* 1 */
line-height: 1.15; /* 2 */
-ms-text-size-adjust: 100%; /* 3 */
-webkit-text-size-adjust: 100%; /* 3 */
}
/* Sections
========================================================================== */
/**
* Remove the margin in all browsers (opinionated).
*/
body {
margin: 0;
}
/**
* Add the correct display in IE 9-.
*/
article,
aside,
footer,
header,
nav,
section {
display: block;
}
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/* Grouping content
========================================================================== */
/**
* Add the correct display in IE 9-.
* 1. Add the correct display in IE.
*/
figcaption,
figure,
main { /* 1 */
display: block;
}
/**
* Add the correct margin in IE 8.
*/
figure {
margin: 1em 40px;
}
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
box-sizing: content-box; /* 1 */
height: 0; /* 1 */
overflow: visible; /* 2 */
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
pre {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/* Text-level semantics
========================================================================== */
/**
* 1. Remove the gray background on active links in IE 10.
* 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
*/
a {
background-color: transparent; /* 1 */
-webkit-text-decoration-skip: objects; /* 2 */
}
/**
* Remove the outline on focused links when they are also active or hovered
* in all browsers (opinionated).
*/
a:active,
a:hover {
outline-width: 0;
}
/**
* 1. Remove the bottom border in Firefox 39-.
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: none; /* 1 */
text-decoration: underline; /* 2 */
text-decoration: underline dotted; /* 2 */
}
/**
* Prevent the duplicate application of `bolder` by the next rule in Safari 6.
*/
b,
strong {
font-weight: inherit;
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder;
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/**
* Add the correct font style in Android 4.3-.
*/
dfn {
font-style: italic;
}
/**
* Add the correct background and color in IE 9-.
*/
mark {
background-color: #ff0;
color: #000;
}
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/* Embedded content
========================================================================== */
/**
* Add the correct display in IE 9-.
*/
audio,
video {
display: inline-block;
}
/**
* Add the correct display in iOS 4-7.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Remove the border on images inside links in IE 10-.
*/
img {
border-style: none;
}
/**
* Hide the overflow in IE.
*/
svg:not(:root) {
overflow: hidden;
}
/* Forms
========================================================================== */
/**
* 1. Change the font styles in all browsers (opinionated).
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
optgroup,
select,
textarea {
font-family: sans-serif; /* 1 */
font-size: 100%; /* 1 */
line-height: 1.15; /* 1 */
margin: 0; /* 2 */
}
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/
button,
input { /* 1 */
overflow: visible;
}
/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button,
select { /* 1 */
text-transform: none;
}
/**
* 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
* controls in Android 4.
* 2. Correct the inability to style clickable types in iOS and Safari.
*/
button,
html [type="button"], /* 1 */
[type="reset"],
[type="submit"] {
-webkit-appearance: button; /* 2 */
}
/**
* Remove the inner border and padding in Firefox.
*/
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
/**
* Restore the focus styles unset by the previous rule.
*/
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: 1px dotted ButtonText;
}
/**
* Change the border, margin, and padding in all browsers (opinionated).
*/
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box; /* 1 */
color: inherit; /* 2 */
display: table; /* 1 */
max-width: 100%; /* 1 */
padding: 0; /* 3 */
white-space: normal; /* 1 */
}
/**
* 1. Add the correct display in IE 9-.
* 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
display: inline-block; /* 1 */
vertical-align: baseline; /* 2 */
}
/**
* Remove the default vertical scrollbar in IE.
*/
textarea {
overflow: auto;
}
/**
* 1. Add the correct box sizing in IE 10-.
* 2. Remove the padding in IE 10-.
*/
[type="checkbox"],
[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type="search"] {
-webkit-appearance: textfield; /* 1 */
outline-offset: -2px; /* 2 */
}
/**
* Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
*/
[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button; /* 1 */
font: inherit; /* 2 */
}
/* Interactive
========================================================================== */
/*
* Add the correct display in IE 9-.
* 1. Add the correct display in Edge, IE, and Firefox.
*/
details, /* 1 */
menu {
display: block;
}
/*
* Add the correct display in all browsers.
*/
summary {
display: list-item;
}
/* Scripting
========================================================================== */
/**
* Add the correct display in IE 9-.
*/
canvas {
display: inline-block;
}
/**
* Add the correct display in IE.
*/
template {
display: none;
}
/* Hidden
========================================================================== */
/**
* Add the correct display in IE 10-.
*/
[hidden] {
display: none;
}
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
/**
* author: dabao
*/
window.addEventListener("load", function() {
var VUE = new Vue({
el: '#app',
data() {
return {
value: '',
a: 'ssss',
checked: '1',
username: '',
password: '',
showPopup: false,
showPopup1: false,
columns: ['杭州', '宁波', '温州', '绍兴', '湖州', '嘉兴', '金华', '衢州'],
minDate: new Date(2020, 0, 1),
maxDate: new Date(2025, 10, 1),
currentDate: new Date(2021, 0, 17),
createDate: '',
radio: '1',
showCalender: false,
date: new Date(2025, 10, 1),
show: true,
fileList: [
// { url: 'https://img01.yzcdn.cn/vant/leaf.jpg' },
// Uploader 根据文件后缀来判断是否为图片文件,
],
}
},
mounted() {
},
methods: {
nav(){
location.href = './views/yh-company.html';
},
formatDate(date) {
return `${date.getFullYear() + 1}/${date.getMonth() + 1}/${date.getDate()}`;
},
onConfirm(date) {
console.log('dat********e', date)
// const [start, end] = date;
// VUE.show = false;
// this.date = `${this.formatDate(start)} - ${this.formatDate(end)}`;
},
afterRead(file) {
// 此时可以自行将文件上传至服务器
console.log(file);
},
confirmDate(value) {
console.log('value', value)
this.createDate = this.formatDate(new Date(value))
VUE.showPopup = false
console.log('value', VUE.showPopup)
},
onConfirm1(value, index) {
this.value = value;
this.showPopup1 = false;
},
onConfirm4calender(value, index) {
this.value = value;
this.showCalender = false;
},
onChange1(picker, value, index) {},
onCancel1() {},
},
});
});
\ No newline at end of file
This diff is collapsed.
(function flexible (window, document) {
var docEl = document.documentElement
var dpr = window.devicePixelRatio || 1
// adjust body font size
function setBodyFontSize () {
if (document.body) {
document.body.style.fontSize = (12 * dpr) + 'px'
}
else {
document.addEventListener('DOMContentLoaded', setBodyFontSize)
}
}
setBodyFontSize();
// set 1rem = viewWidth / 10
function setRemUnit () {
var rem = docEl.clientWidth / 10
docEl.style.fontSize = rem + 'px'
}
setRemUnit()
// reset rem unit on page resize
window.addEventListener('resize', setRemUnit)
window.addEventListener('pageshow', function (e) {
if (e.persisted) {
setRemUnit()
}
})
// detect 0.5px supports
if (dpr >= 2) {
var fakeBody = document.createElement('body')
var testElement = document.createElement('div')
testElement.style.border = '.5px solid transparent'
fakeBody.appendChild(testElement)
docEl.appendChild(fakeBody)
if (testElement.offsetHeight === 1) {
docEl.classList.add('hairlines')
}
docEl.removeChild(fakeBody)
}
}(window, document))
/** axios封装
* 请求拦截、相应拦截、错误统一处理
*/
// 环境的切换
axios.defaults.baseURL = 'http://124.223.155.127'
axios.defaults.timeout = 50000
// post请求头
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8'
axios.defaults.headers.common['systemId'] = '1'
axios.defaults.headers.common['accessToken'] = 'DE3BBA77F18F04E4E0B70F3B8DC0BC9243A16C3164F3DC22F467E37058EE73FD'
// 请求拦截器
axios.interceptors.request.use(config => {
return config
})
var http = {
get: function(url, params) {
return new Promise((resolve, reject) => {
axios
.get(url, {
params: params
})
.then(res => {
resolve(res.data)
})
.catch(err => {
reject(err.data)
})
})
},
post: function(url, params) {
return new Promise((resolve, reject) => {
axios
.post(url, {
params: params
})
.then(res => {
let response = res.data
console.log('res.statusCode', response)
if(response.statusCode >= 300){
// alert('系统发生错误')
return
}
resolve(res.data)
})
.catch(err => {
reject(err.data)
})
})
},
}
var jsVersion = +(new Date()) // '?v=202106091751';
var contextPath = '.'
if(getPageN() === 'index'){
contextPath = '.'
}else{
contextPath = '..'
}
// css
document.write('<link rel="icon" href="https://whjqaqscxt.weihai.cn/favicon.ico">');
document.write('<link rel="stylesheet" type="text/css" href="' + contextPath + '/css/normalize.css" />');
document.write('<link rel="stylesheet" type="text/css" href="' + contextPath + '/css/vant.css" />');
document.write('<link rel="stylesheet" type="text/css" href="' + contextPath + '/css/index.css?rev=' + jsVersion + '" />');
//plupload
document.write('<script type="text/javascript" src="' + contextPath + '/js/vue.min.js"></script>\
<script type="text/javascript" src="' + contextPath + '/js/vant.min.js"></script>\
<script type="text/javascript" src="' + contextPath + '/js/flexible.js"></script>\
<script type="text/javascript" src="' + contextPath + '/js/axios.min.js"></script>\
<script type="text/javascript" src="' + contextPath + '/js/http.js?rev=' + jsVersion + '"></script>');
if (getPageN()) { // 加载同名js
document.write('<script type="text/javascript" src="./' + getPageN() + '.js?rev=' + jsVersion + '"></script>');
}
function getPageN(){
var pageN = window.location.pathname;
pageN = pageN.substring(pageN.lastIndexOf("/") + 1, pageN.indexOf("."));
return pageN
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
<!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="../js/includeHead.js"></script>
<style>
.bgImg {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAATBJREFUWEdjZBhgwDjA9jMMPgf49b6vZ/j/v4GSkPn3/6/jllLRA8SYgRECMAcYKnC8IMYAdDXnH/yQoIoDcjwESbb/ybvfDBtOfWEYdQDVQgAUpKfv/ECJClMVDjAflzgoCv4zMOBMgIyMjAc2FQs2wgzFmQhBaYDaDmBkYHBgYGRsINoBpKZCQonQr+fd/1EHkBQCoCAlFSCXA7497/aD9G8uEXIE0SRHASxOkR0RYMYD5oIswiUOy4ZUccCzd39RLJISYgbzcYlTNQRIDX70XEBxCAx5B6B7gKxESE5RTNVEiC+10zwXDPk0MJoLKM4FlKaBoeMAcFMcGfz/32CsxPGe1BAAqT9774cgqMrFqhfU30CSA7WMwE0yanRGSHYstGk2+LpmJPuEQg0DHgIApKUsP22DHJIAAAAASUVORK5CYII=');
background-repeat: no-repeat;
padding-left: 0.6rem;
height: 0.5rem;
line-height: 0.5rem;
background-size: contain;
font-size: 0.6rem;
}
.list-content-fz{
font-size: 0.4itemWrapperrem;
}
.itemWrapper{
box-shadow: 0.03rem 0.03rem 0.03rem #eee, -0.03rem -0.03rem 0.015rem #eee;
border-radius: 0.15rem;
overflow: hidden;
padding-left: 0.5rem;
}
/**
* 框架样式覆盖修改
*/
.van-cell__value{overflow: unset; }
.van-cell:after{border-bottom:none;}
</style>
</head>
<body>
<div id="app">
<div class="searchWrapper">
<van-search v-model="value" placeholder="请输入搜索关键词" />
</div>
<div class="content">
<van-list v-model:loading="loading" :offset="10" :finished="finished" finished-text="没有更多了" @load="getList">
<van-cell v-for="item in list" :key="item">
<div class="itemWrapper" @click="nav(item)">
<p class="bgImg">
<span id="">
测试企业gognsi {{item}}
</span>
</p>
<p class="list-content-fz">企业负责人</p>
<p class="list-content-fz">联系方式:13245345345</p>
</div>
</van-cell>
</van-list>
</div>
<!-- div>img+div>h2+span+span
</div>
</body>
</html>
\ No newline at end of file
/**
* author: dabao
*/
window.addEventListener("load", function() {
var VUE = new Vue({
el: '#app',
data() {
return {
value: '',
list: [],
loading: false,
finished: false,
}
},
mounted() {
this.getList()
},
methods: {
nav(item){
location.href='./yh-list.html'
},
getList(){
console.log('到底了,开始加载。。。。')
for (let i = 0; i < 10; i++) {
this.list.push(this.list.length + 1);
}
console.log(this.list)
// 加载状态结束
this.loading = false;
// // 数据全部加载完成
if (this.list.length >= 40) {
this.finished = true;
}
}
},
});
});
\ No newline at end of file
<!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="../js/includeHead.js"></script>
<style>
html, body{
background-color: #fff;
}
.content{
}
.pd-01rem{
padding-bottom: 0.1rem;
}
/* 表单相关 */
.formValue{
float: right;
}
.formSubmitBtnWrapper{
display: flex;
justify-content: center;
margin-top: 0.2rem;
margin-bottom:0.2rem;
}
.formSubmitBtnWrapper .van-button{
width: 4rem;
}
/**
* 框架样式覆盖修改
*/
.van-cell__value{overflow: unset; }
.van-cell:after{border-bottom:none;}
.van-radio-group--horizontal{float: right;}
</style>
</head>
<body>
<div id="app">
<div class="content">
<van-cell-group>
<van-cell is-link @click="showPopup=true">检查日期<span class="formValue">{{createDate}}</span></van-cell>
<van-popup v-model="showPopup" position="bottom" :style="{ height: '30%' }">
<van-datetime-picker v-model="currentDate" type="date" title="选择年月日" @confirm="confirmDate" @cancel="showPopup=false" />
</van-cell-group>
<van-cell-group>
<van-field v-model="hdInspectExpert" label="检查人员" placeholder="" />
</van-cell-group>
<van-cell-group>
<van-cell>隐患类型:
<van-radio-group v-model="hdLevel" direction="horizontal">
<van-radio name="1">一般隐患</van-radio>
<van-radio name="2">重大隐患</van-radio>
</van-radio-group>
</van-cell>
</van-cell-group>
<van-cell-group>
<van-cell is-link @click="showPopup4findQuestion=true">安全类别:<span class="formValue">{{findQuestion}}</span></van-cell>
<van-popup v-model="showPopup4findQuestion" round position="bottom">
<van-picker show-toolbar :columns="columns4findQuestion" @cancel="showPopup4findQuestion = false" @confirm="onConfirm4findQuestion" />
</van-popup>
</van-cell-group>
<van-cell-group>
<van-cell is-link @click="showPopup4findQuestion=true">安全检查类别:<span class="formValue">{{findQuestion}}</span></van-cell>
<van-popup v-model="showPopup4findQuestion" round position="bottom">
<van-picker show-toolbar :columns="columns4findQuestion" @cancel="showPopup4findQuestion = false" @confirm="onConfirm4findQuestion" />
</van-popup>
</van-cell-group>
<van-cell-group>
<van-cell is-link @click="showPopup4findQuestion=true">安全检查内容:<span class="formValue">{{findQuestion}}</span></van-cell>
<van-popup v-model="showPopup4findQuestion" round position="bottom">
<van-picker show-toolbar :columns="columns4findQuestion" @cancel="showPopup4findQuestion = false" @confirm="onConfirm4findQuestion" />
</van-popup>
</van-cell-group>
<van-cell-group>
<van-cell is-link @click="showPopup4findQuestion=true">发现问题:<span class="formValue">{{findQuestion}}</span></van-cell>
<van-popup v-model="showPopup4findQuestion" round position="bottom">
<van-picker show-toolbar :columns="columns4findQuestion" @cancel="showPopup4findQuestion = false" @confirm="onConfirm4findQuestion" />
</van-popup>
</van-cell-group>
<van-cell-group>
<van-field v-model="value" label="隐患描述" placeholder="" />
</van-cell-group>
<van-cell-group>
<van-field v-model="value" label="检查依据" placeholder="" />
</van-cell-group>
<van-cell-group>
<van-field v-model="value" label="整改建议" placeholder="" />
</van-cell-group>
<van-cell-group>
<van-cell is-link @click="showPopup=true">整改期限<span class="formValue">{{createDate}}</span></van-cell>
<van-popup v-model="showPopup" position="bottom" :style="{ height: '30%' }">
<van-datetime-picker v-model="currentDate" type="date" title="选择年月日" @confirm="confirmDate" @cancel="showPopup=false" />
</van-popup>
</van-cell-group>
<van-cell-group>
<van-cell>隐患照片:
<div style="width: 1.5rem;">
<van-uploader v-model="fileList" :max-count="1" />
</div></van-cell>
</van-cell-group>
<div class="formSubmitBtnWrapper"><van-button type="info" size="small" @click="">提交</van-button></div>
</div>
</div>
</body>
</html>
\ No newline at end of file
/**
* author: dabao
*/
window.addEventListener("load", function() {
var VUE = new Vue({
el: '#app',
data() {
return {
hdInspectExpert: '',
hdLevel: '',
username: '',
password: '',
value: '',
fileList: [],
value2: '',
value3: '',
pattern: /\d{6}/,
showPopup: false,
currentDate: '',
createDate: '',
showPopup4findQuestion: false,
columns4findQuestion: ['杭州', '宁波', '温州', '绍兴', '湖州', '嘉兴', '金华', '衢州'],
findQuestion: '',
}
},
mounted() {
this.getList()
},
methods: {
formatDate(date) {
return `${date.getFullYear() + 1}/${date.getMonth() + 1}/${date.getDate()}`;
},
onConfirm4findQuestion(value, index) {
this.findQuestion = value;
this.showPopup4findQuestion = false;
},
confirmDate(value) {
console.log('value', value)
this.createDate = this.formatDate(new Date(value))
VUE.showPopup = false
console.log('value', VUE.showPopup)
},
// 校验函数返回 true 表示校验通过,false 表示不通过
validator(val) {
return /1\d{10}/.test(val);
},
// 异步校验函数返回 Promise
asyncValidator(val) {
return new Promise((resolve) => {
Toast.loading('验证中...');
setTimeout(() => {
Toast.clear();
resolve(/\d{6}/.test(val));
}, 1000);
});
},
onFailed(errorInfo) {
console.log('failed', errorInfo);
},
onSubmit(values) {
console.log('submit', values);
},
nav(item) {
location.href = './yh-list.html'
},
getList() {
console.log('到底了,开始加载。。。。')
for (let i = 0; i < 10; i++) {
this.list.push(this.list.length + 1);
}
console.log(this.list)
// 加载状态结束
this.loading = false;
// // 数据全部加载完成
if (this.list.length >= 40) {
this.finished = true;
}
}
},
});
});
\ No newline at end of file
<!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="../js/includeHead.js"></script>
<style>
.bgImg {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAATBJREFUWEdjZBhgwDjA9jMMPgf49b6vZ/j/v4GSkPn3/6/jllLRA8SYgRECMAcYKnC8IMYAdDXnH/yQoIoDcjwESbb/ybvfDBtOfWEYdQDVQgAUpKfv/ECJClMVDjAflzgoCv4zMOBMgIyMjAc2FQs2wgzFmQhBaYDaDmBkYHBgYGRsINoBpKZCQonQr+fd/1EHkBQCoCAlFSCXA7497/aD9G8uEXIE0SRHASxOkR0RYMYD5oIswiUOy4ZUccCzd39RLJISYgbzcYlTNQRIDX70XEBxCAx5B6B7gKxESE5RTNVEiC+10zwXDPk0MJoLKM4FlKaBoeMAcFMcGfz/32CsxPGe1BAAqT9774cgqMrFqhfU30CSA7WMwE0yanRGSHYstGk2+LpmJPuEQg0DHgIApKUsP22DHJIAAAAASUVORK5CYII=');
background-repeat: no-repeat;
padding-left: 0.6rem;
height: 0.5rem;
line-height: 0.5rem;
background-size: contain;
font-size: 0.6rem;
}
.list-content-fz{
font-size: 0.4itemWrapperrem;
}
.itemWrapper{
box-shadow: 0.03rem 0.03rem 0.03rem #eee, -0.03rem -0.03rem 0.015rem #eee;
border-radius: 0.15rem;
overflow: hidden;
padding-left: 0.5rem;
}
.searchWrapper{
display: flex;
background-color: #fff;
justify-content: end;
padding-right: 0.4rem;
padding-top: 0.3rem;
}
.pd-01rem{
padding-bottom: 0.1rem;
}
/**
* 框架样式覆盖修改
*/
.van-cell__value{overflow: unset; }
.van-cell:after{border-bottom:none;}
</style>
</head>
<body>
<div id="app">
<div class="searchWrapper">
<van-button type="info" size="small" @click="add">新增</van-button>
</div>
<div class="content">
<van-list v-model:loading="loading" :offset="10" :finished="finished" finished-text="没有更多了" @load="getList">
<van-cell v-for="item in list" :key="item">
<div class="itemWrapper" >
<p class="bgImg">
<span id="">
隐患描述 {{item}}
</span>
</p>
<p class="list-content-fz">
<van-tag v-if="item%1==0" type="info">整改中</van-tag>
<van-tag v-if="item%2==0" type="warning">待审核</van-tag>
<van-tag v-if="item%3==0" type="primary">审核通过</van-tag>
<van-tag v-if="item%4==0" type="danger">审核未通过</van-tag>
</p>
<div class="pd-01rem">
<van-button type="info" size="mini">查看</van-button>
<van-button type="info" size="mini">编辑</van-button>
<van-button type="info" size="mini">删除</van-button>
<van-button type="info" size="mini">导出</van-button>
</div>
</div>
</van-cell>
</van-list>
</div>
<!-- div>img+div>h2+span+span
</div>
</body>
</html>
\ No newline at end of file
/**
* author: dabao
*/
window.addEventListener("load", function() {
var VUE = new Vue({
el: '#app',
data() {
return {
value: '',
list: [],
loading: false,
finished: false,
}
},
mounted() {
this.getList()
},
methods: {
nav(item){
location.href='./yh-list.html'
},
add(){
location.href='./yh-list-detail.html'
},
getList(){
console.log('到底了,开始加载。。。。')
for (let i = 0; i < 10; i++) {
this.list.push(this.list.length + 1);
}
console.log(this.list)
// 加载状态结束
this.loading = false;
// // 数据全部加载完成
if (this.list.length >= 40) {
this.finished = true;
}
}
},
});
});
\ 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