From 52d463e03c1f074099ed8e8a6b7c3ddde52d2708 Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Fri, 27 Oct 2023 14:50:28 +0800
Subject: [PATCH] fix:小程序初版
---
pages/actionChange/components/basicInfor.vue | 339 +++++++++++++++++++++++++++++--------------------------
1 files changed, 178 insertions(+), 161 deletions(-)
diff --git a/pages/actionChange/components/basicInfor.vue b/pages/actionChange/components/basicInfor.vue
index f7e26bb..47de5eb 100644
--- a/pages/actionChange/components/basicInfor.vue
+++ b/pages/actionChange/components/basicInfor.vue
@@ -12,6 +12,22 @@
<p class="rowTip">
<view class="rowTipContenet">
<view class="wholeLine">
+ <text class="rowTipContenetLabel">������������:</text>
+ <text class="rowTipContenetAll">
+ {{ basicInfor.escalationTime ||'' }}
+ </text>
+ </view>
+ </view>
+ <view class="rowTipContenet">
+ <view class="wholeLine">
+ <text class="rowTipContenetLabel">���������:</text>
+ <text class="rowTipContenetAll">{{ basicInfor.escalationName ||'' }}</text>
+ </view>
+ </view>
+ </p>
+ <p class="rowTip">
+ <view class="rowTipContenet">
+ <view class="wholeLine">
<text class="rowTipContenetLabel">������������:</text>
<text class="rowTipContenetAll">
{{ unitName }}
@@ -41,7 +57,8 @@
<view class="wholeLine">
<text class="rowTipContenetLabel">������������:</text>
<text class="rowTipContenetAll">
- {{ dictObj.changeEnum[basicInfor.changeType] ||'' }}
+ <text>{{ dictObj.changeEnum[basicInfor.changeType]||'' }}</text>
+ <!-- <text>{{ basicInfor.residueDay||'' }}</text> -->
</text>
</view>
</view>
@@ -55,18 +72,6 @@
</text>
</view>
</view>
- <view class="rowTipContenet">
- <view class="wholeLine">
- <text class="rowTipContenetLabel">���������:</text>
- <text class="rowTipContenetAll">{{ basicInfor.escalationName ||'' }}</text>
- </view>
- </view>
- </p>
- <p class="rowTip">
- <view class="wholeLine">
- <text class="rowTipContenetLabel">������������:</text>
- <text class="rowTipContenetAll">{{ basicInfor.escalationTime ||'' }}</text>
- </view>
</p>
<p class="rowTip">
<view class="wholeLine">
@@ -74,161 +79,173 @@
<text class="rowTipContenetAll">{{ basicInfor.pollutePosition ||'' }}</text>
</view>
</p>
- <p class="rowTip">
- <view class="wholeLine">
- <text class="rowTipContenetLabel">������������:</text>
- <text v-if="fileList.length>0" class="rowTipContenetAll">
- <cl-upload
- v-model="fileList"
- :action="`''`"
- :add="false"
- cloud-type="other"
- :remove="false"
- />
- </text>
- </view>
- </p>
+ <view class="formItemContent">
+ <u--form labelPosition="left" label-width="75" :border-bottom="false" ref="uForm">
+ <u-form-item border-bottom label="������������:" :border-bottom="false">
+ <view class="fileBox">
+ <cl-upload v-model="fileList" :add="false" :action="`''`" cloud-type="other"
+ :remove="false" />
+ </view>
+ </u-form-item>
+ </u--form>
+ </view>
</view>
</view>
</view>
</view>
</template>
<script>
-export default {
- props: {
- basicInfor: {
- type: Object,
- default: ()=> {}
- },
- },
- data() {
- return {
- polluteList: this.$storage.getJson('polluteList'),
- unitList: this.$storage.getJson('unitList'),
- dictObj: this.$storage.getJson('dictObj'),
- fileList: [],
- baseUrl: this.$storage.get('baseUrl'),
- }
- },
- computed: {
- unitName(){
- let data ={}
- if(this.basicInfor.unitId){
- data=this.unitList&& this.unitList.find(
- (a)=> parseInt(a.unitId) === this.basicInfor.unitId
- )
- console.log('nnnnnn', this.unitList)
- console.log('nnnnnn', this.basicInfor.unitId)
-
- }
- return data.unitName || ''
- },
- escalationUnitName(){
- let data ={}
- if(this.basicInfor.unitId){
- data=this.unitList&& this.unitList.find(
- (a)=> parseInt(a.unitId) === this.basicInfor.escalationUnitId
- )
- console.log('nnnnnn', this.unitList)
- console.log('nnnnnn', this.basicInfor.unitId)
-
- }
- return data.unitName || ''
-
- },
- polluteType(){
- let data ={}
- if(this.basicInfor.polluteType){
- data=this.polluteList.find(
- (a)=> parseInt(a.dataKey) === this.basicInfor.polluteType
- )
- }
- return data.dataValue ||''
- }
- },
- watch: {
- basicInfor: {
- handler: function(newValue, oldValue) {
- // ������������������
- this.basicInfor=newValue
+ export default {
+ props: {
+ basicInfor: {
+ type: Object,
+ default: () => {}
},
- deep: true
- }
- },
- onLoad: function (option) {
- //option���object������������������������������������������������
- console.log(option) //���������������������������������������
- },
- mounted() {
- if(this.basicInfor.fileBaseList&&this.basicInfor.fileBaseList.length>0){
- this.basicInfor.fileBaseList.forEach(item=> {
- this.baseUrl='http://120.26.43.34:8081/api/'
- let name = item.fileType === 1 ? 'name.png' : ''
- this.fileList.push(`${this.baseUrl}/file/preview/${item.fileId}?${name}`) // ������
- this.fileList.push('http://120.26.43.34:8081/api//file/preview/145?name.png') // ������
- })
- console.log('this.fileList', this.basicInfor.fileBaseList)
- console.log('this.fileList', this.fileList)
- }
-
- },
- methods: {},
-}
+ },
+ data() {
+ return {
+ polluteList: [],
+ unitList: [],
+ dictObj: JSON.parse(uni.getStorageSync('dictObj') || '[]'),
+ fileList: [],
+ baseUrl: this.$storage.get('baseUrl'),
+ }
+ },
+ computed: {
+ unitName() {
+ let data = ''
+ if (this.basicInfor.unitId && this.unitList.length > 0) {
+ data = this.unitList && this.unitList.find(a => Number(a.unitId) === Number(this.basicInfor.unitId))
+ .unitName
+ }
+ return data
+ },
+ escalationUnitName() {
+ let data = ''
+ if (this.basicInfor.unitId && this.unitList.length > 0) {
+ data = this.unitList && this.unitList.find(a => Number(a.unitId) === Number(this.basicInfor
+ .escalationUnitId)).unitName
+ }
+ return data
+ },
+ polluteType() {
+ let data = ''
+ console.log('this.polluteList', this.polluteList)
+ console.log('this.basicInfor.polluteType', this.basicInfor.polluteType)
+ if (String(this.basicInfor.polluteType) && this.polluteList.length > 0) {
+ data = this.polluteList.find(a => Number(a.dataKey) === Number(this.basicInfor.polluteType)).dataValue
+ }
+ console.log('data', data)
+ return data
+ }
+ },
+ watch: {
+ basicInfor: {
+ handler: function(newValue, oldValue) {
+ // ������������������
+ this.basicInfor = newValue
+ },
+ deep: true
+ }
+ },
+ onLoad: function(option) {
+ //option���object������������������������������������������������
+ console.log(option) //���������������������������������������
+ },
+ created() {
+ this.getUnitList()
+ },
+ mounted() {
+ // ������������������list
+ if (this.basicInfor.fileBaseList && this.basicInfor.fileBaseList.length > 0) {
+ this.basicInfor.fileBaseList.forEach(item => {
+ let name = item.fileType === 1 ? 'name.png' : ''
+ this.fileList.push(`${this.baseUrl}/file/preview/${item.fileId}?${name}`) // ������
+ })
+ console.log('this.basicInfor.fileList', this.basicInfor.fileBaseList)
+ console.log('this.fileList', this.fileList)
+ }
+ },
+ methods: {
+ getUnitList() {
+ this.$http.httpGet('/allocation/unit').then(res => {
+ this.unitList = res.data
+ this.getContaminateList()
+ })
+ },
+ getContaminateList() {
+ this.$http.httpGet('/allocation/contaminate').then(res => {
+ this.polluteList = res.data
+ })
+ },
+ },
+ }
</script>
-
<style scoped lang="scss">
-/deep/.u-line {
- margin: 19.23rpx 0px !important;
-}
-.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;
- .headerCont {
- display: flex;
- justify-content: space-between;
- font-size: 15px;
- }
- .mainContent {
- margin-bottom: 10px;
- font-weight: 500;
- .rowTip {
- display: flex;
- padding: 8px 0;
- border-bottom: 1px dashed #bbb;
- .wholeLine {
- display: flex;
- width: 100%;
- align-items: center;
- .rowTipContenetLabel {
- min-width: 125rpx;
- }
- .rowTipContenetAll{
- width: calc(100% - 125rpx);
- }
- }
+ /deep/.u-line {
+ margin: 19.23rpx 0px !important;
+ }
- .rowTipContenet {
- width: 50%;
- text-align: left;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- .butsName {
- display: inline-block;
- margin-left: 19.23rpx;
- color: #1990ff;
- }
- }
- }
- .rowTipContenet_right {
- text-align: right !important;
- }
- }
-}
-</style>
+ .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: 30.77rpx;
+
+ .headerCont {
+ display: flex;
+ justify-content: space-between;
+ font-size: 30.77rpx;
+ }
+
+ .mainContent {
+ margin-bottom: 10px;
+ font-weight: 500;
+
+ .rowTip {
+ display: flex;
+ padding: 5px 0;
+ border-bottom: 1px dashed #bbb;
+
+ .wholeLine {
+ display: flex;
+ width: 100%;
+ align-items: center;
+
+ .rowTipContenetLabel {
+ min-width: 144.23rpx;
+ font-size: 28.85rpx;
+ text-align: left;
+ }
+
+ .rowTipContenetAll {
+ font-size: 28.85rpx;
+ width: calc(100% - 144.23rpx);
+ }
+ }
+
+ .rowTipContenet {
+ width: 50%;
+ text-align: left;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+
+ .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