Commit 8b1a087f authored by xinzhedeai's avatar xinzhedeai

code better

parent 52588906
......@@ -5,7 +5,7 @@
<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>
<title>高区应急系统-首页</title>
<script type="text/javascript" src="./js/includeHead.js"></script>
<style>
.wrapper .item {
......
......@@ -6,65 +6,14 @@ window.addEventListener("load", function() {
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(type){
location.href = './views/'+ type +'.html';
gemhoUtil.navigatePage('./views/'+ type +'.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
......@@ -149,7 +149,7 @@ var http = {
a.style = 'display: none';
var url = window.URL.createObjectURL(blob);
a.href = url;
a.setAttribute('download', 'YH-'+ getTargetDateYMD().replaceAll('-', '') +'.docx')
a.setAttribute('download', 'YH-'+ gemhoUtil.getTargetDateYMD().replaceAll('-', '') +'.docx')
a.click();
a.remove();
window.URL.revokeObjectURL(url);
......
......@@ -5,23 +5,20 @@ if(getPageN() === 'index'){
}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/common.css?rev=' + jsVersion + '" />');
//plupload
// js
// <script type="text/javascript" src="' + contextPath + '/js/vant.min.js"></script>\
document.write('<script type="text/javascript" src="' + contextPath + '/js/vue.min.js"></script>\
<script type="text/javascript" src="https://cdn.bootcdn.net/ajax/libs/vant/2.12.54/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/util.js"></script>\
<script type="text/javascript" src="' + contextPath + '/js/common.js"></script>\
<script type="text/javascript" src="' + contextPath + '/js/flexible.js"></script>\
<script type="text/javascript" src="' + contextPath + '/js/util.js?rev=' + jsVersion + '"></script>\
<script type="text/javascript" src="' + contextPath + '/js/common.js?rev=' + jsVersion + '"></script>\
<script type="text/javascript" src="' + contextPath + '/js/http.js?rev=' + jsVersion + '"></script>');
......
This diff is collapsed.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<script type="text/javascript" src="../js/includeHead.js"></script>
</head>
<body>
</body>
</html>
\ No newline at end of file
......@@ -51,8 +51,7 @@
<body>
<div id="app" class="page-wrapper">
<div class="search-wrapper">
<van-search v-model="companyName" placeholder="请输入搜索关键词" @search="onSearch" @clear="onClear" />
<van-search v-model="companyName" placeholder="请输入公司名称" @search="onSearch" @clear="onClear" />
</div>
<div class="list-content-wrapper" v-cloak>
......@@ -61,9 +60,7 @@
<van-cell v-for="item in list" :key="item">
<div class="list-item-wrapper" @click="nav(item)">
<p class="bgImg">
<!-- <span id=""> -->
{{item.companyName}}
<!-- </span> -->
</p>
<p class="list-content-fz">企业负责人: {{item.companyChargePer}}</p>
<p class="list-content-fz">联系方式:{{item.companyChargeTel}}</p>
......@@ -71,8 +68,6 @@
</van-cell>
</van-list>
</div>
<!-- div>img+div>h2+span+span
</div>
</body>
</html>
\ No newline at end of file
......@@ -17,11 +17,10 @@ window.addEventListener("load", function() {
}
},
mounted() {
// this.getList()
},
methods: {
nav(item){
location.href='./yh-list.html?companyId='+item.companyId+'&rev='+(+new Date())
gemhoUtil.navigatePage('./yh-list.html?companyId='+item.companyId);
},
resetSearchForm(){
this.page = 0
......
......@@ -71,20 +71,14 @@ window.addEventListener("load", function() {
hdRectificationDateModel: '',
showPopup4hdRectificationDate: false,
fileList: [],
// columns4findQuestion: ['杭州', '宁波', '温州', '绍兴', '湖州', '嘉兴', '金华', '衢州'],
// findQuestion: '',
}
},
mounted() {
if(getParameter('type') === 'detail'){
if(gemhoUtil.getParameter('type') === 'detail'){
this.editAble = false
this.detail()
}else if(getParameter('type') === 'edit'){
}else if(gemhoUtil.getParameter('type') === 'edit'){
this.editAble = true
this.detail()
}else{ // 新增
......
......@@ -51,8 +51,6 @@
</van-cell>
</van-list>
</div>
<!-- div>img+div>h2+span+span
</div>
</body>
</html>
\ No newline at end of file
......@@ -27,10 +27,7 @@ window.addEventListener("load", function() {
vant.Toast({
message: '操作成功',
})
// this.list.splice(index, 1);
this.loading = false; // 加载状态结束
console.log('导出响应结果', res)
})
},
del(item, index){
......@@ -40,7 +37,6 @@ window.addEventListener("load", function() {
message: '此操作将删除所选项,确认删除?',
})
.then(() => {
// on confirm
http.delete('/api/thHiddenDanger',{
id: [item.hdId]
}).then((res)=>{
......@@ -60,19 +56,19 @@ window.addEventListener("load", function() {
// location.h ref='./yh-list.html'
},
add(){
location.href='./yh-list-detail.html?companyId='+getParameter('companyId')+'&type=add'
gemhoUtil.navigatePage('./yh-list-detail.html?companyId='+gemhoUtil.getParameter('companyId')+'&type=add')
},
detail(item){
location.href='./yh-list-detail.html?companyId='+getParameter('companyId')+'&hdId='+item.hdId+'&type=detail'
gemhoUtil.navigatePage('./yh-list-detail.html?companyId='+gemhoUtil.getParameter('companyId')+'&hdId='+item.hdId+'&type=detail')
},
edit(item){
location.href='./yh-list-detail.html?companyId='+getParameter('companyId')+'&hdId='+item.hdId+'&type=edit'
gemhoUtil.navigatePage('./yh-list-detail.html?companyId='+gemhoUtil.getParameter('companyId')+'&hdId='+item.hdId+'&type=edit')
},
getList(){
http.get('/api/thHiddenDanger',{
page: this.page++,// 每次请求增加下一页
size: this.size,
companyId: getParameter('companyId'),
companyId: gemhoUtil.getParameter('companyId'),
county: localStorage.getItem('appCounty'),
sort: 'hdId,desc',
}).then((res)=>{
......
......@@ -72,7 +72,7 @@ window.addEventListener("load", function() {
methods: {
detail(){
var hdId = getParameter('hdId')
var hdId = gemhoUtil.getParameter('hdId')
http.get('/api/hiddenDangerToVerify', {
page: 0, // 每次请求增加下一页
size: 1,
......
......@@ -15,10 +15,13 @@ window.addEventListener("load", function() {
size: 10,
total: 0,
companyName: '',
curVerifyStatus: '',
curVerifyStatus: '全部',
curVerifyStatusVal: '',
showPopup4verifyStatus: false,
verifyStatusList: [{
name: "全部",
value: '',
},{
name: "待审核",
value: 3,
},
......@@ -65,9 +68,6 @@ window.addEventListener("load", function() {
console.log('search', val)
this.getList()
},
nav(item) {
// location.href='./yh-list.html'
},
pass(item, index){
console.log(item)
vant.Dialog.confirm({
......@@ -113,8 +113,8 @@ window.addEventListener("load", function() {
})
},
detail(item) {
location.href = './yh-verify-detail.html?companyId=' + getParameter('companyId') +
'&hdId=' + item.hdId + '&type=detail'
gemhoUtil.navigatePage('./yh-verify-detail.html?companyId=' + gemhoUtil.getParameter('companyId') +
'&hdId=' + item.hdId + '&type=detail')
},
getList() {
http.get('/api/hiddenDangerToVerify', {
......@@ -125,20 +125,16 @@ window.addEventListener("load", function() {
enName: this.companyName,
sort: 'verify_status,asc',
}).then((res) => {
this.loading = false; // 加载状态结束
console.log('响应结果', res.content)
this.list.push(...res.content);
this.total = res.totalElements
console.log('响应结果list', this.list)
console.log('响应结果totalElements', res.totalElements)
if (this.page * this.size >= this.total) {
this.finished = true; // 下滑不在刷新数据
}
})
}
},
});
......
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