Browse Source

问题处理UI

master
liujiangyong 2 years ago
parent
commit
37d91e0a82
  1. 13
      weapp/package/troubleshooting/index.js
  2. 4
      weapp/package/troubleshooting/index.json
  3. 38
      weapp/package/troubleshooting/index.wxml
  4. 50
      weapp/package/troubleshooting/index.wxss
  5. 45
      weapp/package/troubleshooting/shootingForm/index.wxml
  6. 18
      weapp/package/troubleshooting/shootingForm/index.wxss

13
weapp/package/troubleshooting/index.js

@ -14,7 +14,7 @@ Page({
userInfo: wx.getStorageSync("userInfo"),
//
dataList: [],
currentTab: '0',
currentTab: 0,
// 筛选选择
structList: [],
structResult: [],
@ -31,19 +31,14 @@ Page({
// 顶部tab切换
clickTab (e) {
this.setData({
currentTab: e.currentTarget.dataset.current
currentTab: e.detail.name
})
if (e.currentTarget.dataset.current == '0') {
} else if (e.currentTarget.dataset.current == '1') {
}
this.setData({
page: 0,
dataList: []
}, () => {
this.getData({
type: e.currentTarget.dataset.current == '0' ? 'backlog' : 'haveDone'
type: e.detail.name === 0 ? 'backlog' : 'haveDone'
});
})
},
@ -154,7 +149,7 @@ Page({
onDropDownClose () {
const { currentTab, startTime, endTime, pointList, structResult } = this.data
this.getData({
type: currentTab == '0' ? 'backlog' : 'haveDone',
type: currentTab === 0 ? 'backlog' : 'haveDone',
startTime,
endTime,
pointId: pointList.length ? (() => {

4
weapp/package/troubleshooting/index.json

@ -13,6 +13,8 @@
"van-checkbox-group": "@vant/weapp/checkbox-group/index",
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
"timePicker": "/components/timePicker/index",
"t-date-time-picker": "tdesign-miniprogram/date-time-picker/date-time-picker"
"t-date-time-picker": "tdesign-miniprogram/date-time-picker/date-time-picker",
"van-tab": "@vant/weapp/tab/index",
"van-tabs": "@vant/weapp/tabs/index"
}
}

38
weapp/package/troubleshooting/index.wxml

@ -1,14 +1,10 @@
<!-- package/bindTroubleshooting/index.wxml -->
<view class="page">
<!-- 顶部tab切换 -->
<view class='swiper-tab'>
<view class="swiper-tab-item" data-current="0" bindtap="clickTab" style="{{currentTab=='0' ? 'color:#1979ff' : 'color:black'}}">
待办事项
</view>
<view class="swiper-tab-item" data-current="1" bindtap="clickTab" style="{{currentTab=='1' ? 'color:#1979ff' : 'color:black'}}">
已办事项
</view>
</view>
<van-tabs active="{{ currentTab }}" bind:change="clickTab" color="#006BE3">
<van-tab title="待办事项"></van-tab>
<van-tab title="已办事项"></van-tab>
</van-tabs>
<view>
<van-dropdown-menu>
<van-dropdown-item title="{{ '结构物' }}" bind:close="onDropDownClose">
@ -49,12 +45,23 @@
</van-dropdown-item>
</van-dropdown-menu>
</view>
<view style="height:100vh - 98rpx; padding-top:24rpx; overflow:auto">
<van-cell-group inset class="mission-card">
<view wx:for="{{dataList}}">
<view style="height:100vh - 98rpx; overflow:auto; padding: 0rpx 30rpx 20rpx">
<view wx:for="{{dataList}}" class="mission-card">
<view class="mission-card-title">
<span>{{item.PatrolRecord.points.project.name}}</span>
<van-button wx:if="{{powerCheckDetail || currentTab == 0}}" type="info" round bind:tap="toShootingForm" data-shootingid="{{item.id}}">
<image class="icon" src="../../images/title_icon.svg"></image>
<view class="title">{{item.PatrolRecord.points.project.name}}</view>
</view>
<view style="width: 630rpx; margin: 0 auto;">
<text class="text-key">点位名称:</text><text class="text-value">{{item.PatrolRecord.points.itemData.name}}</text>
</view>
<view style="width: 630rpx; margin: 8px auto 0;">
<text class="text-key">异常等级:</text><text class="text-value">{{item.PatrolRecord.points.itemData.name}}</text>
</view>
<view style="width: 630rpx; margin: 8px auto 0;">
<text class="text-key">任务下发时间:</text><text class="text-value">{{item.createTime}}</text>
</view>
<view class="divider"></view>
<van-button class="btn" wx:if="{{powerCheckDetail || currentTab == 0}}" size="small" type="info" round bind:tap="toShootingForm" data-shootingid="{{item.id}}">
{{
currentTab == 0?
item.state == 1 ?'制定计划':
@ -83,12 +90,7 @@
}}
</span>
</view>
<van-field value="{{item.PatrolRecord.points.itemData.name}}" label="点位名称" readonly border="{{ false }}" />
<van-field value="{{item.PatrolRecord.points.itemData.name}}" label="异常等级" readonly border="{{ false }}" />
<van-field value="{{ item.createTime}}" label="任务下发时间" readonly border="{{ false }}" />
</view>
<view style="height:128rpx"/>
</van-cell-group>
<!-- 暂无数据 -->
<view wx:if="{{!dataList.length}}">
<image class="noData" src="../../images/noData.png"></image>

50
weapp/package/troubleshooting/index.wxss

@ -5,6 +5,14 @@
position: relative;
}
.divider {
width: 100%;
height: 0px;
border-top: 1px solid #F5F5F5;
margin-top: 19px;
margin-bottom: 9px;
}
/* 顶部tab */
.swiper-tab {
display: flex;
@ -41,17 +49,53 @@
}
/* 任务卡片 */
.mission-card {}
.mission-card {
background-color: #fff;
border-radius: 10rpx;
margin-bottom: 30rpx;
overflow: hidden;
}
.mission-card-title {
background-color: #fff;
overflow: auto;
padding: 24rpx 16px;
display: flex;
justify-content: space-between;
align-items: center
}
.mission-card-title .icon {
float: left;
width: 24px;
height: 24px;
margin-right: 5px;
}
.mission-card-title .title {
float: left;
font-size: 16px;
line-height: 24px;
font-weight: bold;
color: #333333;
}
.mission-card .text-key {
font-weight: 400;
font-size: 14px;
color: #000000a6;
}
.mission-card .text-value {
font-weight: 400;
font-size: 14px;
color: #000000d9;
}
.mission-card .btn {
float: right;
margin-right: 12px;
margin-bottom: 10px;
}
.value-class {
flex: none !important;
}

45
weapp/package/troubleshooting/shootingForm/index.wxml

@ -1,26 +1,28 @@
<page-meta page-style="{{ planStartTimePopupShow||planEndTimePopupShow ? 'overflow: hidden;' : '' }}" />
<view style="background:#F7F7FA; min-height:calc(100vh - 48rpx); padding:24rpx 0">
<van-cell-group inset class="mission-card">
<view style="background:#F7F7FA; min-height:calc(100vh - 48rpx); width: 100vw">
<van-cell-group class="mission-card">
<view class="mission-card-title">
<span>巡检信息</span>
<image class="icon" src="../../../images/title_icon.svg"></image>
<span class="title">巡检信息</span>
</view>
<van-field value="{{data.PatrolRecord.points.project.name}}" label="结构物名称" readonly border="{{ false }}" />
<van-field value="{{data.PatrolRecord.points.user.name}}" label="巡检人" readonly border="{{ false }}" />
<van-field value="{{data.PatrolRecord.points.user.department.name}}" label="巡检单位" readonly border="{{ false }}" />
<van-field value="{{data.PatrolRecord.inspectionTime}}" label="巡检时间" readonly border="{{ false }}" />
<van-field value="{{data.PatrolRecord.points.project.name}}" label="结构物名称" readonly />
<van-field value="{{data.PatrolRecord.points.user.name}}" label="巡检人" readonly />
<van-field value="{{data.PatrolRecord.points.user.department.name}}" label="巡检单位" readonly />
<van-field value="{{data.PatrolRecord.inspectionTime}}" label="巡检时间" readonly />
<view class="mission-card-title mission-center-card-title">
<image class="icon" src="../../../images/title_icon.svg"></image>
<span>问题详情</span>
</view>
<van-field value="{{data.PatrolRecord.points.itemData.name}}" label="点位" readonly accordion border="{{ false }}" />
<van-field value="{{data.PatrolRecord.points.itemData.name}}" label="点位" readonly accordion />
<van-collapse wx:if="{{data.PatrolRecord.points.inspectContent}}" value="{{ pointItemCollapseActiveNames }}" bind:change="onPointItemCollapseActiveChange" border="{{false}}">
<block wx:for="{{data.PatrolRecord.points.inspectContent}}" wx:key="index">
<van-collapse-item wx:if="{{!item.isNormal}}" name="{{item.itemName}}" border="{{false}}">
<view slot="title">
<van-field value="{{item.itemName}}" label="检查项" readonly border="{{ false }}" />
<van-field value="{{item.itemName}}" label="检查项" readonly />
</view>
<view slot="">
<van-field value="{{item.level}}" label="异常等级" readonly border="{{ false }}" />
<van-field value="{{item.msgInp||''}}" label="问题描述" readonly border="{{ false }}" />
<van-field value="{{item.level}}" label="异常等级" readonly />
<van-field value="{{item.msgInp||''}}" label="问题描述" readonly />
<van-cell border="{{false}}">
<view style="display:flex">
<view class="fs-cell-title" style="">现场照片</view>
@ -36,6 +38,7 @@
</block>
</van-collapse>
<view class="mission-card-title mission-center-card-title">
<image class="icon" src="../../../images/title_icon.svg"></image>
<span>维修计划信息</span>
</view>
<van-cell>
@ -49,7 +52,7 @@
</picker>
</view>
</van-cell>
<van-field value="{{maintenancePersonDepartmentShow}}" label="维修单位" placeholder="" readonly="{{true}}" border="{{ false }}" />
<van-field value="{{maintenancePersonDepartmentShow}}" label="维修单位" placeholder="" readonly="{{true}}" />
<van-cell>
<view style="display:flex">
<view class="fs-cell-title" style="">质检人</view>
@ -104,8 +107,8 @@
</view>
<van-field value="{{ planApproval }}" label="审批意见" type="textarea" placeholder="请输入" extra-event-params="{{true}}" autosize border="{{ isApprove }}" readonly="{{!isApprove}}" bind:input="onInputChange" data-type='planApproval' />
<block wx:if="{{data.state > 2}}">
<van-field value="{{planApprovalPerson}}" label="审批人" readonly="{{true}}" border="{{ false }}" />
<van-field value="{{planApprovalTime}}" label="审批日期" readonly="{{true}}" border="{{ false }}" />
<van-field value="{{planApprovalPerson}}" label="审批人" readonly="{{true}}" />
<van-field value="{{planApprovalTime}}" label="审批日期" readonly="{{true}}" />
</block>
</view>
<block wx:if="{{ (data.state > 3 && tabIndex == 0) ||(data.state > 4 && tabIndex == 1) }}">
@ -136,7 +139,7 @@
<view class="mission-card-title mission-center-card-title">
<span>质检验收</span>
</view>
<van-field value="{{data.checkPerson.name}}" label="验收人" readonly border="{{ false }}" />
<van-field value="{{data.checkPerson.name}}" label="验收人" readonly />
<van-field value="{{ cost }}" extra-event-params="{{true}}" label="成本(元)" type="digit" placeholder="请输入" border="{{ isCheck }}" bind:input="onInputChange" data-type='cost' readonly="{{!isCheck}}" />
<van-cell border="{{false}}">
<view style="display:flex">
@ -159,23 +162,23 @@
<van-field value="{{ checkDesc }}" extra-event-params="{{true}}" label="验收意见" type="textarea" placeholder="请输入" autosize border="{{ isCheck }}" bind:input="onInputChange" data-type='checkDesc' readonly="{{!isCheck}}" />
</block>
</van-cell-group>
<view style="margin:24px 16px">
<van-button wx:if="{{isPlanState|| isRepair}}" type="info" block style="" bindtap="confirm">
<view style="padding:43px 16px">
<van-button wx:if="{{isPlanState|| isRepair}}" round type="info" block style="" bindtap="confirm">
提交
</van-button>
<view wx:if="{{isApprove}}" style="display:flex; justify-content:space-between">
<van-button type="info" custom-style="width:calc((100vw - 32px - 24px) / 2)" bindtap="confirm" data-approve="agree">
<van-button round type="info" custom-style="width:calc((100vw - 32px - 24px) / 2)" bindtap="confirm" data-approve="agree">
同意
</van-button>
<van-button type="warning" custom-style="width:calc((100vw - 32px - 24px) / 2)" bindtap="confirm" data-approve="refuse">
<van-button round type="warning" custom-style="width:calc((100vw - 32px - 24px) / 2)" bindtap="confirm" data-approve="refuse">
驳回
</van-button>
</view>
<view wx:if="{{isCheck}}" style="display:flex; justify-content:space-between">
<van-button type="info" custom-style="width:calc((100vw - 32px - 24px) / 2)" bindtap="confirm" data-approve="agree">
<van-button round type="info" custom-style="width:calc((100vw - 32px - 24px) / 2)" bindtap="confirm" data-approve="agree">
验收通过
</van-button>
<van-button type="warning" custom-style="width:calc((100vw - 32px - 24px) / 2)" bindtap="confirm" data-approve="refuse">
<van-button round type="warning" custom-style="width:calc((100vw - 32px - 24px) / 2)" bindtap="confirm" data-approve="refuse">
验收不通过
</van-button>
</view>

18
weapp/package/troubleshooting/shootingForm/index.wxss

@ -5,12 +5,26 @@
overflow: auto;
padding: 24rpx 16px;
display: flex;
justify-content: space-between;
align-items: center
}
.mission-card-title .icon {
float: left;
width: 24px;
height: 24px;
margin-right: 5px;
}
.mission-card-title .title {
float: left;
font-size: 16px;
line-height: 24px;
font-weight: bold;
color: #333333;
}
.mission-center-card-title {
padding-top: 64rpx;
margin-top: 16px;
}
.fs-cell-title {

Loading…
Cancel
Save