New file |
| | |
| | | <template> |
| | | <view> |
| | | <view class="hearderInfor"> |
| | | <view> |
| | | <p class="unit"> |
| | | <text>责任单位:{{ userInfor.userName ||''}}</text> |
| | | </p> |
| | | </view> |
| | | <view class="headSculpture"> |
| | | <image alt="" src="/static/img/headSculpture.png" /> |
| | | <text>欢迎您:{{ userInfor.userName || ''}}</text> |
| | | </view> |
| | | </view> |
| | | <view> |
| | | <u-tabs :list="list" :scrollable="scrollable" @change="changeTap" /> |
| | | </view> |
| | | <view class="" v-if="userInfor.userName"> |
| | | <view :key="index" v-for="(item, index) in workOderList" class="workOrderDetail" |
| | | @tap="handleClick(item, 'edit')"> |
| | | <view class="mainContent"> |
| | | <p class="rowTip" style="justify-content: space-between"> |
| | | <text class=""> 交办单号: {{ item.allocationNum }} |
| | | </text> |
| | | <text class="rowTipContenet_right"> |
| | | <text catchtap class="butsName" @tap.stop="handleClick(item, 'view')"> 查看 </text> |
| | | <text catchtap class="butsName" @tap.stop="handleClick(item, 'edit')"> |
| | | {{ item.stateName }} |
| | | </text> |
| | | </text> |
| | | </p> |
| | | </view> |
| | | <u-line color="#bbb" /> |
| | | <view class="mainContent"> |
| | | <p class="rowTip"> |
| | | <view class="rowTipContenet"> |
| | | <view class="wholeLine"> |
| | | <text class="rowTipContenetLabel">责任主体:</text> |
| | | <text class="rowTipContenetAll"> |
| | | {{ unitList.find( |
| | | (a) => item && parseInt(a.unitId) === item.unitId |
| | | ).unitName |
| | | }} |
| | | </text> |
| | | </view> |
| | | </view> |
| | | <view class="rowTipContenet"> |
| | | <view class="wholeLine"> |
| | | <text class="rowTipContenetLabel">污染分类:</text> |
| | | <text class="rowTipContenetAll"> |
| | | {{ polluteList.find( |
| | | (a) => item && parseInt(a.dataKey) === item.polluteType |
| | | ).dataValue |
| | | }} |
| | | </text> |
| | | </view> |
| | | </view> |
| | | </p> |
| | | </view> |
| | | <view class="mainContent"> |
| | | <p class="rowTip"> |
| | | <view class="rowTipContenet"> |
| | | <view class="wholeLine"> |
| | | <text class="rowTipContenetLabel">整改类型:</text> |
| | | <text class="rowTipContenetAll"> |
| | | {{ dictObj.changeEnum[item.changeType] }} |
| | | </text> |
| | | </view> |
| | | </view> |
| | | <view class="rowTipContenet"> |
| | | <view class="wholeLine"> |
| | | <text class="rowTipContenetLabel">流程状态:</text> |
| | | <text class="rowTipContenetAll"> |
| | | {{ stateFormatter(item.state) }} |
| | | </text> |
| | | </view> |
| | | </view> |
| | | </p> |
| | | </view> |
| | | <view class="mainContent"> |
| | | <p class="rowTip"> |
| | | <view class="rowTipContenet"> |
| | | <view class="wholeLine"> |
| | | <text class="rowTipContenetLabel">上报时间:</text> |
| | | <text class="rowTipContenetAll"> |
| | | {{ item.escalationTime }} |
| | | </text> |
| | | </view> |
| | | </view> |
| | | <view class="rowTipContenet"> |
| | | <view class="wholeLine"> |
| | | <text class="rowTipContenetLabel">上报单位:</text> |
| | | <text class="rowTipContenetAll"> |
| | | {{ unitList.find( |
| | | (a) => |
| | | item && parseInt(a.unitId) === item.escalationUnitId |
| | | ).unitName |
| | | }} |
| | | </text> |
| | | </view> |
| | | </view> |
| | | </p> |
| | | </view> |
| | | <view class="mainContent"> |
| | | <p class="rowTip"> |
| | | <view class="wholeLine"> |
| | | <text class="rowTipContenetLabel">污染位置:</text> |
| | | <text class="rowTipContenetAll">{{ item.pollutePosition }}</text> |
| | | </view> |
| | | </p> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | import { |
| | | httpPost, |
| | | httpGet |
| | | } from '@/utils/http.js' |
| | | export default { |
| | | data() { |
| | | return { |
| | | scrollable: false, |
| | | userInfor: {}, |
| | | dictObj: [], |
| | | list: [{ |
| | | name: '全部', |
| | | value: 0, |
| | | }, { |
| | | name: '待处理', |
| | | value: 1, |
| | | }, { |
| | | name: '待完成', |
| | | value: 2, |
| | | }, { |
| | | name: '已完成', |
| | | value: 3, |
| | | }, ], |
| | | current: 0, |
| | | workOderList: [], |
| | | unitList: [], |
| | | polluteList: [], |
| | | } |
| | | }, |
| | | mounted() { |
| | | console.log('mounted this.userInfo', this.userInfo) |
| | | }, |
| | | created() { |
| | | console.log('created this.userInfo', this.userInfo) |
| | | this.getContaminateList() |
| | | this.getUnitList() |
| | | this.getWorkOrder() |
| | | }, |
| | | onShow() { |
| | | uni.showTabBar() |
| | | }, |
| | | methods: { |
| | | changeTap(data) { |
| | | this.current = data.value |
| | | this.getWorkOrder() |
| | | }, |
| | | // 获取责任单位list |
| | | getUnitList() { |
| | | this.$http.httpGet('/allocation/unit').then(res => { |
| | | this.unitList = res.data |
| | | this.userInfor = this.$storage.getJson('userInfo') |
| | | this.dictObj = this.$storage.getJson('dictObj') |
| | | this.$storage.setJson('unitList', this.unitList) |
| | | }) |
| | | }, |
| | | getContaminateList() { |
| | | this.$http.httpGet('/allocation/contaminate').then(res => { |
| | | this.polluteList = res.data |
| | | this.$storage.setJson('polluteList', this.polluteList) |
| | | }) |
| | | }, |
| | | stateFormatter(val) { |
| | | return this.dictObj.allocationApproveEnum[val] |
| | | }, |
| | | getWorkOrder() { |
| | | httpGet('/allocationApp/select', { |
| | | state: this.current, |
| | | startTime: '', |
| | | endTime: '', |
| | | }).then(res => { |
| | | this.workOderList = res.data |
| | | }) |
| | | }, |
| | | handleClick(e, pageState) { |
| | | this.$http.httpGet('/allocation/detail', { |
| | | id: e.allocationId |
| | | }).then(res => { |
| | | let data = res.data |
| | | data.pageState = pageState |
| | | let myData = JSON.stringify(data) |
| | | uni.navigateTo({ |
| | | url: '/pages/actionChange/workOrderDetails/index?infor=' + myData, |
| | | }) |
| | | }) |
| | | }, |
| | | }, |
| | | // onShow() {}, |
| | | } |
| | | </script> |
| | | <style scoped lang="scss"> |
| | | /deep/.uni-page-head { |
| | | display: none; |
| | | } |
| | | |
| | | .hearderInfor { |
| | | font-size: 26.92rpx; |
| | | height: 223.08rpx; |
| | | background-color: #3875c5; |
| | | color: #f2f2f2; |
| | | |
| | | .unit { |
| | | text-align: right; |
| | | padding-right: 19.23rpx; |
| | | padding-top: 19.23rpx; |
| | | } |
| | | |
| | | .headSculpture { |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | image { |
| | | height: 117.31rpx; |
| | | width: 117.31rpx; |
| | | margin: 0rpx 46.15rpx; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .textContent { |
| | | text-align: left; |
| | | width: 100%; |
| | | font-size: 28.85rpx; |
| | | } |
| | | |
| | | .workOrderDetail { |
| | | border: 1px solid #bbb; |
| | | border-radius: 5px; |
| | | min-height: 288.46rpx; |
| | | margin: 19.23rpx; |
| | | padding: 19.23rpx; |
| | | color: #101010; |
| | | font-weight: 700; |
| | | font-size: 26.92rpx; |
| | | |
| | | /deep/.u-line { |
| | | margin: 19.23rpx 0px !important; |
| | | } |
| | | |
| | | .mainContent { |
| | | margin-bottom: 10px; |
| | | |
| | | .rowTip { |
| | | display: flex; |
| | | |
| | | .wholeLine { |
| | | display: flex; |
| | | |
| | | .rowTipContenetLabel { |
| | | min-width: 125rpx; |
| | | } |
| | | } |
| | | |
| | | .rowTipContenetAll { |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | } |
| | | |
| | | .rowTipContenet { |
| | | width: 50%; |
| | | text-align: left; |
| | | } |
| | | } |
| | | |
| | | .butsName { |
| | | display: inline-block; |
| | | margin-left: 19.23rpx; |
| | | color: #1990ff; |
| | | } |
| | | |
| | | .rowTipContenet_right { |
| | | text-align: right !important; |
| | | } |
| | | } |
| | | } |
| | | </style> |