更改字段

This commit is contained in:
xiaokangsix 2024-04-25 22:53:11 +08:00
parent eec25fb144
commit 5b04760c2f
6 changed files with 2988 additions and 1706 deletions

2854
pages.json

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -95,7 +95,7 @@
pageNo: this.pageNo,
pageSize: this.pageSize,
sn: this.projectSn,
inspectTypeId: 2
type: 2
}
let _this = this
this.sendRequest({

View File

@ -1,42 +1,41 @@
<template>
<view class="taskList">
<headers class="fixedheader" :themeType="true" :showBack="true">
<view class="headerName">
检查任务
</view>
<view class="headerName"> 检查任务 </view>
</headers>
<scroll-view class="smallHeight" :style="{ 'padding-top': statusBarHeight + 45 + 'px' }" scroll-y>
<view class="task-list">
<view class="task-info flex">
<view class="info-item b-right">
<text>{{statisticsData.rectifyNum}}</text>
<text>{{ statisticsData.rectifyNum }}</text>
待整改
</view>
<view class="info-item b-right">
<text>{{statisticsData.reviewNum}}</text>
<view class="info-item b-right">
<text>{{ statisticsData.reviewNum }}</text>
待审核
</view>
<view class="info-item">
<text>{{statisticsData.closeNum}}</text>
<text>{{ statisticsData.closeNum }}</text>
已闭合
</view>
</view>
<view class="task-item" v-for="(item, index) in dataList" :key="index">
<view @click="junpPage(item)">
<view class="task-title">{{item.itemName}}</view>
<view class="task-num" v-if="item.count.inspectNum > 0">整改单数量{{item.count.inspectNum}}</view>
<view class="task-people" v-if="item.count.inspectNum > 0">检查人{{item.userlist.join("")}}</view>
<view class="task-title">{{ item.itemName }}</view>
<view class="task-num" v-if="item.count.inspectNum > 0">整改单数量{{ item.count.inspectNum }}</view>
<view class="task-people" v-if="item.count.inspectNum > 0">检查人{{ item.userlist.join('') }}</view>
</view>
<view class="task-btn" @click="addExamine(item)" v-if="item.count.inspectNum == 0">开始检查</view>
<view class="task-btn" @click="addExamine(item)" v-if="item.count.inspectNum > 0">再次检查</view>
<view class="task-status"
:class="{'status1': item.count.inspectNum > 0, 'status3': item.count.inspectNum == 0}">
{{ item.count.inspectNum == 0 ? "未检查" : "已检查"}}
<view class="task-status" :class="{
status1: item.count.inspectNum > 0,
status3: item.count.inspectNum == 0
}">
{{ item.count.inspectNum == 0 ? '未检查' : '已检查' }}
</view>
</view>
</view>
</scroll-view>
</view>
</template>
@ -47,8 +46,8 @@
data() {
return {
statusBarHeight: 0,
taskId: "",
userId: "",
taskId: '',
userId: '',
dataList: [],
statisticsData: {
closeNum: 0,
@ -64,13 +63,12 @@
onShow() {
this.dataList = []
this.pageNo = 1
this.statusBarHeight = uni.getStorageSync('systemInfo').statusBarHeight;
this.statusBarHeight = uni.getStorageSync('systemInfo').statusBarHeight
this.userId = JSON.parse(uni.getStorageSync('userInfo')).userId
this.queryList()
this.queryStatisticsNum()
},
onLoad(val) {
this.taskId = val.id
this.userId = JSON.parse(uni.getStorageSync('userInfo')).userId
// this.queryList()
@ -78,7 +76,8 @@
},
onReachBottom() {
console.log(1)
if (!this.isLoadMore) { //
if (!this.isLoadMore) {
//
this.isLoadMore = true
this.pageNo += 1
this.queryList()
@ -92,20 +91,20 @@
},
methods: {
junpPage(val) {
console.log(val)
if (val.count.inspectNum > 0) {
uni.navigateTo({
url: './dangerList?type=4&itemId=' + val.id
})
}
console.log(val, '质量管理')
// if (val.count.inspectNum > 0) {
uni.navigateTo({
url: './listTow?itemS=' + val.id
})
// }
},
addExamine(val) {
console.log(val);
console.log(val)
if (uni.getStorageSync('dangerData')) {
uni.removeStorageSync('dangerData');
uni.removeStorageSync('dangerData')
}
if (uni.getStorageSync('detailData')) {
uni.removeStorageSync('detailData');
uni.removeStorageSync('detailData')
}
uni.navigateTo({
// url: './addExamine?type=1&taskId=' + this.taskId + '&itemId=' + val.id
@ -124,10 +123,11 @@
url: 'xmgl/inspectTaskItemRecord/list',
method: 'post',
data: data,
success: (res) => {
success: res => {
// this.dataList = res.result.records
this.dataList = this.dataList.concat(res.result.records)
if (res.result.records.length < this.pageSize) { //
if (res.result.records.length < this.pageSize) {
//
this.isLoadMore = true
this.loadStatus = 'nomore'
} else {
@ -145,10 +145,10 @@
}
let _this = this
this.sendRequest({
url: 'xmgl/hiddenDangerInspectRecord/selectInspectTaskCount',
url: 'xmgl/qualityInspectionRecord/selectInspectTaskCount',
method: 'post',
data: data,
success: (res) => {
success: res => {
this.statisticsData = res.result
console.log(res.result)
}
@ -160,7 +160,7 @@
<style lang="scss" scoped>
.taskList {
background: #F6F6F6;
background: #f6f6f6;
// height: 100%;
min-height: 100%;
@ -190,8 +190,8 @@
height: 144rpx;
margin-bottom: 24rpx;
align-items: center;
box-shadow: 0 16rpx 20rpx #E8E8E8;
background: url("../../../static/safeMange/safe_bg.png") no-repeat center;
box-shadow: 0 16rpx 20rpx #e8e8e8;
background: url('../../../static/safeMange/safe_bg.png') no-repeat center;
background-size: 100% 100%;
.info-item {
@ -200,7 +200,7 @@
uni-text {
display: block;
color: #E26C0E;
color: #e26c0e;
font-weight: 600;
margin-bottom: 6rpx;
}
@ -215,10 +215,10 @@
background: #fff;
border-radius: 10rpx;
padding: 30rpx 28rpx 34rpx 42rpx;
box-shadow: 4rpx 16rpx 20rpx #E8E8E8;
box-shadow: 4rpx 16rpx 20rpx #e8e8e8;
position: relative;
font-size: 26rpx;
color: #6A6E7A;
color: #6a6e7a;
margin-bottom: 24rpx;
.task-title {
@ -234,7 +234,7 @@
.task-btn {
width: 170rpx;
height: 64rpx;
background: #127FEC;
background: #127fec;
color: #fff;
line-height: 64rpx;
text-align: center;
@ -252,18 +252,22 @@
}
.status1 {
color: #FF711E;
background: linear-gradient(to right, rgba(255, 133, 30, 0.2), rgba(255, 133, 30, 0.01));
color: #ff711e;
background: linear-gradient(to right,
rgba(255, 133, 30, 0.2),
rgba(255, 133, 30, 0.01));
}
.status2 {
color: #67B2FD;
background: linear-gradient(to right, rgba(103, 178, 253, 0.2), rgba(103, 178, 253, 0.01));
color: #67b2fd;
background: linear-gradient(to right,
rgba(103, 178, 253, 0.2),
rgba(103, 178, 253, 0.01));
}
.status3 {
color: #fff;
background: #CBCBCB;
background: #cbcbcb;
}
}
}

View File

@ -1,256 +1,258 @@
<template>
<view class="projectList">
<headers class="fixedheader" :themeType="true" :showBack="true">
<view class="headerName">
项目自检
</view>
</headers>
<scroll-view class="smallHeight" :style="{ 'padding-top': statusBarHeight + 45 + 'px' }" scroll-y>
<view class="project-list">
<view v-if="dataList&&dataList.length>0">
<view class="project-item flex a-center" v-for="(item,index) in dataList" :key="index"
@click="jumpPage(item)">
<view class="project-detail">
<view class="project-title">{{item.taskName}}</view>
<view class="project-content flex">
<view class="project-num content flex f-column j-center">
<text>{{item.count.inspectNum}}</text>隐患总数</view>
<view class="project-type content flex f-column j-center"><text
class="type1">{{item.count.notEndNum}}</text>未闭合总数</view>
<!-- <view class="project-type content flex f-column j-center"><text :class="{'type1': index < 2, 'type2': index > 1 }">{{index > 1 ? "已闭合":"待整改"}}</text>隐患整改情况</view> -->
<view class="content">检查类型{{item.inspectTypeName}}</view>
<view class="content">创建人{{item.createUserName}}</view>
</view>
<view class="project-date">计划检查时间{{item.startTime}}{{item.endTime}}</view>
</view>
<!-- <view class="project-status" :class="{'status1': index < 2, 'status2': index > 1}">
<view class="projectList">
<headers class="fixedheader" :themeType="true" :showBack="true">
<view class="headerName">
项目自检
</view>
</headers>
<scroll-view class="smallHeight" :style="{ 'padding-top': statusBarHeight + 45 + 'px' }" scroll-y>
<view class="project-list">
<view v-if="dataList&&dataList.length>0">
<view class="project-item flex a-center" v-for="(item,index) in dataList" :key="index"
@click="jumpPage(item)">
<view class="project-detail">
<view class="project-title">{{item.taskName}}</view>
<view class="project-content flex">
<view class="project-num content flex f-column j-center">
<text>{{item.count.inspectNum}}</text>隐患总数
</view>
<view class="project-type content flex f-column j-center"><text
class="type1">{{item.count.notEndNum}}</text>未闭合总数</view>
<!-- <view class="project-type content flex f-column j-center"><text :class="{'type1': index < 2, 'type2': index > 1 }">{{index > 1 ? "已闭合":"待整改"}}</text>隐患整改情况</view> -->
<view class="content">检查类型{{item.inspectTypeName}}</view>
<view class="content">创建人{{item.createUserName}}</view>
</view>
<view class="project-date">计划检查时间{{item.startTime}}{{item.endTime}}</view>
</view>
<!-- <view class="project-status" :class="{'status1': index < 2, 'status2': index > 1}">
{{index > 1 ? "任务已结束":"任务已下发"}}
</view> -->
</view>
<view class="loadMoreBox" v-if="isLoadMore">
<uni-load-more :status="loadStatus" iconType="auto"></uni-load-more>
</view>
</view>
</view>
<view class="loadMoreBox" v-if="isLoadMore">
<uni-load-more :status="loadStatus" iconType="auto"></uni-load-more>
</view>
</view>
<view class="no-data" v-else>
<image class="img" src="/static/noData.png"></image>
<text class="txt">暂无数据</text>
</view>
</view>
</scroll-view>
</view>
<view class="no-data" v-else>
<image class="img" src="/static/noData.png"></image>
<text class="txt">暂无数据</text>
</view>
</view>
</scroll-view>
</view>
</template>
<script>
import headers from '../../../components/headers/headers.vue'
export default {
data() {
return {
statusBarHeight: 0,
userId: "",
projectSn: "",
dataList: [],
loadStatus: 'more',
isLoadMore: false,
pageNo: 1,
pageSize: 10
}
},
onShow() {
this.dataList = []
this.pageNo = 1
this.statusBarHeight = uni.getStorageSync('systemInfo').statusBarHeight;
this.projectSn = JSON.parse(uni.getStorageSync('userInfo')).sn
this.userId = JSON.parse(uni.getStorageSync('userInfo')).userId
this.queryList()
},
onReachBottom() {
console.log(1)
if (!this.isLoadMore) { //
this.isLoadMore = true
this.pageNo += 1
this.queryList()
}
},
onPullDownRefresh() {
console.log(2)
this.pageNo = 1
this.dataList = []
this.queryList()
},
methods: {
jumpPage(val) {
uni.navigateTo({
url: './taskList?id=' + val.id
})
},
queryList() {
let data = {
inspectUser: this.userId,
pageNo: this.pageNo,
pageSize: this.pageSize,
sn: this.projectSn,
inspectTypeId: 1
}
let _this = this
this.sendRequest({
url: 'xmgl/inspectTaskRecord/list',
method: 'post',
data: data,
success: (res) => {
// this.dataList = res.result.records
this.dataList = this.dataList.concat(res.result.records)
if (res.result.records.length < this.pageSize) { //
this.isLoadMore = true
this.loadStatus = 'nomore'
} else {
this.isLoadMore = false
// that.loadStatus='more'
}
uni.stopPullDownRefresh()
console.log(res.result)
}
})
}
}
}
import headers from '../../../components/headers/headers.vue'
export default {
data() {
return {
statusBarHeight: 0,
userId: "",
projectSn: "",
dataList: [],
loadStatus: 'more',
isLoadMore: false,
pageNo: 1,
pageSize: 10
}
},
onShow() {
this.dataList = []
this.pageNo = 1
this.statusBarHeight = uni.getStorageSync('systemInfo').statusBarHeight;
this.projectSn = JSON.parse(uni.getStorageSync('userInfo')).sn
this.userId = JSON.parse(uni.getStorageSync('userInfo')).userId
this.queryList()
},
onReachBottom() {
console.log(1)
if (!this.isLoadMore) { //
this.isLoadMore = true
this.pageNo += 1
this.queryList()
}
},
onPullDownRefresh() {
console.log(2)
this.pageNo = 1
this.dataList = []
this.queryList()
},
methods: {
jumpPage(val) {
uni.navigateTo({
url: './taskList?id=' + val.id
})
},
queryList() {
let data = {
inspectUser: this.userId,
pageNo: this.pageNo,
pageSize: this.pageSize,
sn: this.projectSn,
type: 1
}
let _this = this
this.sendRequest({
url: 'xmgl/inspectTaskRecord/list',
method: 'post',
data: data,
success: (res) => {
// this.dataList = res.result.records
this.dataList = this.dataList.concat(res.result.records)
if (res.result.records.length < this.pageSize) { //
this.isLoadMore = true
this.loadStatus = 'nomore'
} else {
this.isLoadMore = false
// that.loadStatus='more'
}
uni.stopPullDownRefresh()
console.log(res.result)
}
})
}
}
}
</script>
<style lang="scss" scoped>
.projectList {
min-height: 100%;
background: #F6F6F6;
.projectList {
min-height: 100%;
background: #F6F6F6;
.fixedheader {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 2;
}
.fixedheader {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 2;
}
.smallHeight {
height: 100%;
box-sizing: border-box;
}
.smallHeight {
height: 100%;
box-sizing: border-box;
}
.flex {
display: flex;
}
.flex {
display: flex;
}
.f-column {
flex-direction: column;
}
.f-column {
flex-direction: column;
}
.a-center {
align-items: center;
}
.a-center {
align-items: center;
}
.j-center {
justify-content: center;
}
.j-center {
justify-content: center;
}
.type1 {
color: #FF7524;
}
.type1 {
color: #FF7524;
}
.type2 {
color: #127FEC;
}
.type2 {
color: #127FEC;
}
.project-list {
padding: 30rpx;
padding-top: 24rpx;
.project-list {
padding: 30rpx;
padding-top: 24rpx;
.project-item {
background: #fff;
width: 100%;
border-radius: 10rpx;
padding: 30rpx 24rpx 28rpx 42rpx;
box-sizing: border-box;
font-size: 24rpx;
margin-bottom: 24rpx;
box-shadow: 4rpx 16rpx 20rpx #E8E8E8;
.project-item {
background: #fff;
width: 100%;
border-radius: 10rpx;
padding: 30rpx 24rpx 28rpx 42rpx;
box-sizing: border-box;
font-size: 24rpx;
margin-bottom: 24rpx;
box-shadow: 4rpx 16rpx 20rpx #E8E8E8;
.project-detail {
margin-right: 18rpx;
.project-detail {
margin-right: 18rpx;
.project-title {
font-size: 30rpx;
font-weight: bold;
margin-bottom: 18rpx;
}
.project-title {
font-size: 30rpx;
font-weight: bold;
margin-bottom: 18rpx;
}
.project-content {
flex-wrap: wrap;
color: #71737F;
.project-content {
flex-wrap: wrap;
color: #71737F;
.content {
width: 50%;
margin-bottom: 8rpx;
}
.content {
width: 50%;
margin-bottom: 8rpx;
}
.project-num {
text-align: center;
margin-bottom: 20rpx;
.project-num {
text-align: center;
margin-bottom: 20rpx;
uni-text {
font-size: 30rpx;
font-weight: bold;
color: #2A2E3F;
margin-bottom: 4rpx;
}
}
uni-text {
font-size: 30rpx;
font-weight: bold;
color: #2A2E3F;
margin-bottom: 4rpx;
}
}
.project-type {
text-align: center;
margin-bottom: 20rpx;
.project-type {
text-align: center;
margin-bottom: 20rpx;
uni-text {
font-size: 30rpx;
margin-bottom: 4rpx;
// color: #2A2E3F;
}
}
}
uni-text {
font-size: 30rpx;
margin-bottom: 4rpx;
// color: #2A2E3F;
}
}
}
.project-date {
color: #71737F;
}
}
.project-date {
color: #71737F;
}
}
.project-status {
white-space: nowrap;
padding: 6rpx 18rpx;
color: #fff;
border-radius: 22rpx;
}
.project-status {
white-space: nowrap;
padding: 6rpx 18rpx;
color: #fff;
border-radius: 22rpx;
}
.status1 {
background: linear-gradient(to right, rgba(255, 133, 30, 1), rgba(255, 133, 30, 0.1));
}
.status1 {
background: linear-gradient(to right, rgba(255, 133, 30, 1), rgba(255, 133, 30, 0.1));
}
.status2 {
background: linear-gradient(to right, rgba(103, 178, 253, 1), rgba(103, 178, 253, 0.1));
}
}
}
}
.status2 {
background: linear-gradient(to right, rgba(103, 178, 253, 1), rgba(103, 178, 253, 0.1));
}
}
}
}
.no-data {
text-align: center;
.no-data {
text-align: center;
.img {
display: block;
height: 200rpx;
width: 200rpx;
margin: 0 auto;
margin-top: 60rpx;
margin-bottom: 60rpx;
}
.img {
display: block;
height: 200rpx;
width: 200rpx;
margin: 0 auto;
margin-top: 60rpx;
margin-bottom: 60rpx;
}
.txt {
color: #C0C4CC;
}
}
.txt {
color: #C0C4CC;
}
}
</style>

View File

@ -423,20 +423,6 @@
}
}
}
.overData {
display: flex;
align-items: center;
margin-top: 5%;
padding: 0 8px;
font-size: 14px;
}
.overData view:not(:last-child)::after {
content: '|';
margin: 0 10px;
color: #e9e9e9;
}
}
.overDataList {