From d8b41fff43a2cee6a8f714ffa807623b15803786 Mon Sep 17 00:00:00 2001 From: quanyawei <401863037@qq.com> Date: Fri, 20 Oct 2023 15:21:35 +0800 Subject: [PATCH] fix:立行立改Uniapp小程序新建项目 --- pages/actionChange/agencyPage/index.vue | 291 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 291 insertions(+), 0 deletions(-) diff --git a/pages/actionChange/agencyPage/index.vue b/pages/actionChange/agencyPage/index.vue new file mode 100644 index 0000000..5c535ca --- /dev/null +++ b/pages/actionChange/agencyPage/index.vue @@ -0,0 +1,291 @@ +<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> \ No newline at end of file -- Gitblit v1.8.0