272 lines
8.8 KiB
Vue
272 lines
8.8 KiB
Vue
|
<template>
|
|||
|
<view>
|
|||
|
<cu-custom bgColor="bg-gradual-blueness" :isBack="true">
|
|||
|
<block slot="backText">返回</block>
|
|||
|
<block slot="content">待整改隐患</block>
|
|||
|
</cu-custom>
|
|||
|
<view class="top-fixed">
|
|||
|
<view class="cu-bar search bg-white">
|
|||
|
<view class="search-form radius">
|
|||
|
<text class="cuIcon-search"></text>
|
|||
|
<input @input="InputBlur" placeholder="请输入关键字"></input>
|
|||
|
</view>
|
|||
|
<view class="action">
|
|||
|
<button class="cu-btn bg-green shadow-blur radius" @click="getQuery()">搜索</button>
|
|||
|
</view>
|
|||
|
</view>
|
|||
|
<view class="line"></view>
|
|||
|
</view>
|
|||
|
<scroll-view class="dy-scroll" @scrolltolower="scrolltolower" scroll-y
|
|||
|
:style="'top:'+sTop+'px;height:calc(100vh - '+totalHeight+'px)'">
|
|||
|
<view v-if="total>0" class="dy-list">
|
|||
|
<view v-for="(item,index) of list" :key="index" :data-id="item.HIDDEN_ID" class="dy-list-item p201 arrow"
|
|||
|
@click="$noMultipleClicks(gotRectify,item)">
|
|||
|
<view class="dy-title-flex">
|
|||
|
<view>
|
|||
|
<text v-if="item.HIDDENDESCR">
|
|||
|
{{ item.HIDDENDESCR.length > 15 ? item.HIDDENDESCR.substr(0, 15) + '...' : item.HIDDENDESCR }}
|
|||
|
</text>
|
|||
|
<text v-else>暂无</text>
|
|||
|
</view>
|
|||
|
<view>
|
|||
|
<text v-if="item.HIDDENLEVEL=='hiddenLevel0001'" class="cu-tag radius bg-yellow light">
|
|||
|
{{ item.HIDDENLEVELNAME }}
|
|||
|
</text>
|
|||
|
<text v-if="item.HIDDENLEVEL=='hiddenLevel0002'&&item.ISCONFIRM=='0'" class="cu-tag radius bg-grey light">
|
|||
|
未确认重大隐患
|
|||
|
</text>
|
|||
|
<text v-if="item.HIDDENLEVEL=='hiddenLevel0002'&&item.ISCONFIRM=='1'" class="cu-tag radius bg-red light">
|
|||
|
已确认重大隐患
|
|||
|
</text>
|
|||
|
</view>
|
|||
|
</view>
|
|||
|
<view class="dy-subtitle-flex">
|
|||
|
<text v-if="item.SOURCE=='4' || item.SOURCE=='5'">隐患来源:安全检查</text>
|
|||
|
<text v-if="item.SOURCE=='1'">隐患来源:隐患快报</text>
|
|||
|
<text v-if="item.SOURCE=='2'">隐患来源:风险管控清单检查</text>
|
|||
|
<text v-if="item.SOURCE=='3'">隐患来源:风险管控清单检查</text>
|
|||
|
<text v-if="item.SOURCE=='6'">隐患来源:消防管理检查(app端)</text>
|
|||
|
</view>
|
|||
|
<view class="dy-subtitle-flex">
|
|||
|
<text>整改类型:{{ item.RECTIFICATIONTYPE === '1' ? "立即整改" : "限期整改" }}</text>
|
|||
|
<text v-if="item.RECTIFICATIONTYPE === '2'">整改期限:{{ item.RECTIFICATIONDEADLINE }}</text>
|
|||
|
</view>
|
|||
|
<view class="dy-subtitle-flex">
|
|||
|
<text>隐患发现部门:{{ item.HIDDENFINDDEPTNAME ? item.HIDDENFINDDEPTNAME : '暂无' }}</text>
|
|||
|
</view>
|
|||
|
<view class="dy-subtitle-flex">
|
|||
|
<text>隐患发现人:{{ item.CREATORNAME ? item.CREATORNAME : '暂无' }}</text>
|
|||
|
<text v-if="item.CREATTIME">隐患发现时间:{{ item.CREATTIME.split(" ")[0] }}</text>
|
|||
|
</view>
|
|||
|
<view class="dy-subtitle-flex">
|
|||
|
<text>隐患整改部门:{{ item.RECTIFICATIONDEPTNAME ? item.RECTIFICATIONDEPTNAME : '暂无' }}</text>
|
|||
|
</view>
|
|||
|
<view class="dy-subtitle-flex">
|
|||
|
<text>整改人:{{ item.RECTIFICATIONORNAME ? item.RECTIFICATIONORNAME : '暂无' }}</text>
|
|||
|
<text v-if="item.RECTIFICATIONTIME">隐患整改时间:{{ item.RECTIFICATIONTIME }}</text>
|
|||
|
</view>
|
|||
|
<view class="dy-subtitle-flex">
|
|||
|
<button class="cu-btn bg-green shadow-blur radius" :disabled="item.IS_EXTENSION == '1'"
|
|||
|
@click.stop="getSqExtension(item)">
|
|||
|
{{ item.IS_EXTENSION == 0 ? "延期整改申请" : "延期整改申请中" }}
|
|||
|
</button>
|
|||
|
</view>
|
|||
|
</view>
|
|||
|
</view>
|
|||
|
<view v-else-if="dataFlag=='noData'" class="dy-null">
|
|||
|
<view class="dy-null-img">
|
|||
|
<image src="../../../../static/null.png" mode=""></image>
|
|||
|
</view>
|
|||
|
<view class="dy-null-title">
|
|||
|
暂无数据
|
|||
|
</view>
|
|||
|
</view>
|
|||
|
<view class="cu-tabbar-height"></view>
|
|||
|
</scroll-view>
|
|||
|
</view>
|
|||
|
</template>
|
|||
|
|
|||
|
<script>
|
|||
|
import {
|
|||
|
basePath, deptId, loginUserId, loginSession, loginUser
|
|||
|
} from '@/common/tool.js';
|
|||
|
|
|||
|
export default {
|
|||
|
data() {
|
|||
|
return {
|
|||
|
sTop: 0,
|
|||
|
totalHeight: 0,
|
|||
|
scrollLeft: 0,
|
|||
|
tabNav: ['未提交', '待整改', '待复查', '已复查', '已验收', '已超期'],
|
|||
|
page: 1,
|
|||
|
rows: 10,
|
|||
|
totalCount: 0,
|
|||
|
isEnd: false,
|
|||
|
total: 0,
|
|||
|
varList: [],
|
|||
|
noClick: true,
|
|||
|
dataFlag: 'noData',
|
|||
|
list: [],
|
|||
|
initflag: false,
|
|||
|
name: '',
|
|||
|
isIndex: 0
|
|||
|
}
|
|||
|
},
|
|||
|
onLoad() {
|
|||
|
this.getData();
|
|||
|
loginSession();
|
|||
|
},
|
|||
|
onReady() {
|
|||
|
let that = this;
|
|||
|
let CustomBar = this.CustomBar;
|
|||
|
uni.getSystemInfo({ //调用uni-app接口获取屏幕高度
|
|||
|
success(res) { //成功回调函数
|
|||
|
let titleH = uni.createSelectorQuery().select(".top-fixed"); //想要获取高度的元素名(class/id)
|
|||
|
titleH.boundingClientRect(data => {
|
|||
|
that._data.sTop = data.height //计算高度:元素高度=窗口高度-元素距离顶部的距离(data.top)
|
|||
|
that.totalHeight = data.height + CustomBar
|
|||
|
}).exec()
|
|||
|
}
|
|||
|
})
|
|||
|
},
|
|||
|
onShow() {
|
|||
|
var _this = this;
|
|||
|
|
|||
|
if (_this.initflag) {
|
|||
|
_this.initflag = false;
|
|||
|
_this.getQuery()
|
|||
|
}
|
|||
|
},
|
|||
|
methods: {
|
|||
|
getData() {
|
|||
|
var _this = this;
|
|||
|
if (_this.isEnd) {
|
|||
|
return
|
|||
|
}
|
|||
|
uni.showLoading({
|
|||
|
title: '请稍候'
|
|||
|
});
|
|||
|
let DISPOSESTATE = 2;
|
|||
|
uni.request({
|
|||
|
url: basePath + '/app/hidden/listRiskStandard', // /app/hidden/list
|
|||
|
method: 'POST',
|
|||
|
dataType: 'json',
|
|||
|
header: {
|
|||
|
'Content-type': 'application/x-www-form-urlencoded'
|
|||
|
},
|
|||
|
data: {
|
|||
|
tm: new Date().getTime(),
|
|||
|
// STATE:1,
|
|||
|
showCount: _this.rows,
|
|||
|
currentPage: _this.page,
|
|||
|
totalResult: _this.total,
|
|||
|
DISPOSESTATE: DISPOSESTATE,
|
|||
|
// isIndex:_this.isIndex,
|
|||
|
USERDEPT: loginUser.DEPARTMENT_ID,
|
|||
|
SELFUSERID: loginUserId,
|
|||
|
HIDDENDESCR: _this.name,
|
|||
|
CORPINFO_ID: loginUser.CORPINFO_ID,
|
|||
|
USER_ID: loginUser.USER_ID,
|
|||
|
},
|
|||
|
success: (res) => {
|
|||
|
// console.info(res.data);
|
|||
|
console.log("打印数据:", res.data.varList)
|
|||
|
if (res.data.result == 'success') {
|
|||
|
uni.hideLoading();
|
|||
|
_this.total = res.data.page.totalResult;
|
|||
|
if (_this.totalCount < res.data.page.totalResult) {
|
|||
|
var content = res.data.varList;
|
|||
|
_this.list = _this.list.concat(content);
|
|||
|
_this.page++;
|
|||
|
_this.totalCount += content.length;
|
|||
|
} else {
|
|||
|
_this.isEnd = true
|
|||
|
}
|
|||
|
|
|||
|
} else {
|
|||
|
uni.showToast({
|
|||
|
title: res.data.message,
|
|||
|
duration: 2000
|
|||
|
});
|
|||
|
}
|
|||
|
}
|
|||
|
});
|
|||
|
|
|||
|
},
|
|||
|
getSqExtension(e) {
|
|||
|
uni.navigateTo({
|
|||
|
url: '/pages/application/hidden-danger-management/hidden-danger-no-change/hidden-danger-extension-detail?sq=0&id=' + e.HIDDEN_ID+'&RECTIFICATIONDEADLINE='+e.RECTIFICATIONDEADLINE,
|
|||
|
});
|
|||
|
},
|
|||
|
getQuery() {
|
|||
|
var _this = this;
|
|||
|
_this.page = 1;
|
|||
|
_this.isEnd = false;
|
|||
|
_this.totalCount = 0;
|
|||
|
_this.total = 0;
|
|||
|
_this.list = [];
|
|||
|
_this.getData()
|
|||
|
},
|
|||
|
getlist() {
|
|||
|
var _this = this;
|
|||
|
_this.page = 1;
|
|||
|
_this.isEnd = false;
|
|||
|
_this.totalCount = 0;
|
|||
|
_this.total = 0;
|
|||
|
_this.list = [];
|
|||
|
_this.getData()
|
|||
|
},
|
|||
|
tabSelect(e) {
|
|||
|
this.TabCur = e.currentTarget.dataset.id;
|
|||
|
this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60;
|
|||
|
this.getQuery();
|
|||
|
},
|
|||
|
InputBlur(e) {
|
|||
|
this.name = e.detail.value
|
|||
|
},
|
|||
|
//跳转事件
|
|||
|
gotRectify(e) {
|
|||
|
if (e.HIDDENLEVEL == 'hiddenLevel0002' && e.ISCONFIRM == '0') {
|
|||
|
uni.showToast({
|
|||
|
title: '管理人员未确认该隐患',
|
|||
|
duration: 2000,
|
|||
|
icon: 'none'
|
|||
|
});
|
|||
|
} else {
|
|||
|
// 整改统一页面了
|
|||
|
uni.navigateTo({
|
|||
|
url: '/pages/application/hidden-danger-management/hidden-danger-no-change/hidden-danger-no-change-detail?id=' + e.HIDDEN_ID,
|
|||
|
});
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
},
|
|||
|
//跳转事件
|
|||
|
gotReview(e) {
|
|||
|
uni.navigateTo({
|
|||
|
url: '/pages/works/hidden-danger/hidden-danger-review?id=' + e,
|
|||
|
});
|
|||
|
},
|
|||
|
//跳转事件
|
|||
|
gotCheck(e) {
|
|||
|
uni.navigateTo({
|
|||
|
url: '/pages/works/hidden-danger/hidden-danger-check?id=' + e,
|
|||
|
});
|
|||
|
},
|
|||
|
//跳转事件
|
|||
|
gotDetail(e) {
|
|||
|
uni.navigateTo({
|
|||
|
url: '/pages/works/hidden-danger/hidden-danger-details?id=' + e,
|
|||
|
});
|
|||
|
},
|
|||
|
scrolltolower() {
|
|||
|
this.getData();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
</script>
|
|||
|
|
|||
|
<style>
|
|||
|
|
|||
|
</style>
|