From 11da2aef4b4aa8ebff5b58b5241aaa6e0df56eb4 Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Tue, 18 Jun 2024 15:43:09 +0800
Subject: [PATCH] fix: bug修改
---
pages/actionChange/components/rectificationInfor.vue | 180 +++++++++++++++++++++++++++++++-----------------------------
1 files changed, 93 insertions(+), 87 deletions(-)
diff --git a/pages/actionChange/components/rectificationInfor.vue b/pages/actionChange/components/rectificationInfor.vue
index 8f532aa..c0a3476 100644
--- a/pages/actionChange/components/rectificationInfor.vue
+++ b/pages/actionChange/components/rectificationInfor.vue
@@ -8,43 +8,63 @@
<u-line color="#bbb" />
<view>
<view class="mainContent">
- <u--form labelPosition="left" label-width="70" :model="form" :border-bottom="false" :rules="rules"
+ <u--form labelPosition="left" label-width="80" :model="form" :border-bottom="false" :rules="rules"
ref="uForm">
- <view class="formItemContent">
- <u-form-item label="������������:" required :border-bottom="false">
- <view class="" v-if="pageState">
- {{ dictObj.yesOrNo[basicInfor.isChange] ||''}}
+ <view class="" v-if="pageState">
+ <p class="rowTip">
+ <view class="rowTipContenet">
+ <view class="wholeLine">
+ <text class="rowTipContenetLabel">������������:</text>
+ <text class="rowTipContenetAll">
+ {{ dictObj.yesOrNo[basicInfor.isChange] ||''}}
+ </text>
+ </view>
</view>
- <u-radio-group v-else v-model="form.isChange" @change="radioGroupChange">
- <u-radio :key="index" v-for="(item, index) in list"
- :custom-style="{marginRight: '8px'}" :label="item.name" :name="item.value" />
- </u-radio-group>
- </u-form-item>
+ <view class="rowTipContenet">
+ <view class="wholeLine">
+ <text class="rowTipContenetLabel">���������:</text>
+ <text class="rowTipContenetAll">{{ basicInfor.changeName ||''}}</text>
+ </view>
+ </view>
+ </p>
+ </view>
+ <view class="" v-else>
+ <view class="formItemContent">
+ <u-form-item label="������������:" :required="!pageState" :border-bottom="false">
+ <u-radio-group v-model="form.isChange" @change="radioGroupChange">
+ <u-radio :key="index" v-for="(item, index) in list"
+ :custom-style="{marginRight: '16px'}" :label="item.name"
+ :name="item.value" />
+ </u-radio-group>
+ </u-form-item>
+ </view>
+ <view class="formItemContent">
+ <u-form-item label="���������:" prop="changeName" :border-bottom="false"
+ :required="!pageState">
+ <u-input v-model="form.changeName" border="none" placeholder="���������" type="text" />
+ </u-form-item>
+ </view>
</view>
<view class="formItemContent">
- <u-form-item label="���������:" prop="changeName" :border-bottom="false" required>
- <view class="" v-if="pageState">
- {{ basicInfor.changeName ||''}}
- </view>
- <u-input v-else v-model="form.changeName" border="none" placeholder="���������" type="text" />
- </u-form-item>
- </view>
- <view class="formItemContent">
- <u-form-item label="������������" prop="changeDescribe" :border-bottom="false" required>
- <view class="" v-if="pageState">
+ <u-form-item label="������������:" prop="changeDescribe" :border-bottom="false"
+ :required="!pageState">
+ <view class="fonttest" v-if="pageState">
{{ basicInfor.changeDescribe ||''}}
</view>
- <u--textarea v-else v-model="form.changeDescribe" border="none" placeholder="���������������" />
+ <u--textarea v-else v-model="form.changeDescribe" border="none" />
</u-form-item>
</view>
-
<view class="formItemContent">
- <u-form-item label="������������" :border-bottom="false">
+ <u-form-item label="������������:" :border-bottom="false" :required="!pageState"
+ prop="fileListRequired">
<view class="fileBox" v-if="pageState">
<cl-upload v-model="fileList" :add="false" :action="`''`" cloud-type="other"
:remove="false" />
</view>
<view class="fileBox" v-else>
+ <view class="overFile">
+ <u--input v-model="form.fileListRequired" border="none"></u--input>
+ </view>
<fileUpload class="rowTipContenetAll" :sys-code="sysCode"
@handleFile="handleFile" />
</view>
@@ -86,20 +106,19 @@
return {
sysCode: '1010202',
list: [{
- name: '���',
- value: 0,
- },
- {
- name: '���',
- value: 1,
- },
- ],
+ name: '���',
+ value: 1,
+ }, {
+ name: '���',
+ value: 0,
+ }, ],
form: {
- isChange: 0,
+ isChange: 1,
changeName: '',
changeDescribe: '',
+ fileListRequired: ''
},
- dictObj: this.$storage.getJson('dictObj'),
+ dictObj: JSON.parse(uni.getStorageSync('dictObj') || '[]'),
fileList: [],
fileBaseList: [],
baseUrl: this.$storage.get('baseUrl'),
@@ -114,7 +133,12 @@
message: '���������',
trigger: ['blur', 'change']
},
- }
+ 'fileListRequired': {
+ required: true,
+ message: '���������������',
+ trigger: ['blur', 'change']
+ }
+ },
}
},
onLoad: function(option) {
@@ -131,8 +155,11 @@
let name = item.fileType === 1 ? 'name.png' : 'name.mp4'
this.fileList.push(`${this.baseUrl}/file/preview/${item.fileId}?${name}`) // ������
})
- console.log('this.fileList', this.basicInfor.fileBaseList)
- console.log('this.fileList', this.fileList)
+ }
+ let userInfor = JSON.parse(uni.getStorageSync('userInfor') || '{}')
+ console.log('userInfor', userInfor)
+ if (this.basicInfor.pageState === 'edit') {
+ this.form.changeName = userInfor.userName
}
},
methods: {
@@ -141,48 +168,56 @@
},
handleFile(data) {
this.fileBaseList = data
+ console.log('data', data)
+ this.form.fileListRequired = data.length > 0 ? '12323' : null
+ console.log('this.fileListRequired', this.form.fileListRequired)
this.form.fileChangeList = this.fileBaseList
},
formVali() {
return new Promise((resolve, reject) => {
if (!this.pageState) {
this.$refs.uForm.validate().then(res => {
- resolve(true)
- })
- .catch(errors => {
- reject(false)
- uni.$u.toast('������������')
- })
+ console.log('res', res)
+ resolve(true)
+ }).catch(errors => {
+ reject(false)
+ uni.$u.toast('������������')
+ })
} else {
resolve(true)
}
-
- });
-
+ })
}
},
}
</script>
-
<style scoped lang="scss">
/deep/.u-line {
margin: 19.23rpx 0px !important;
}
+ .fileBox {
+ .overFile {
+ z-index: -100;
+ position: absolute !important;
+ height: 96px !important;
+ opacity: 0;
+ }
+ }
+
.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;
+ font-size: 30.77rpx;
.headerCont {
display: flex;
justify-content: space-between;
- font-size: 15px;
+ font-size: 30.77rpx;
}
.mainContent {
@@ -190,7 +225,8 @@
font-weight: 500;
.rowTip {
- padding: 8px 0;
+ display: flex;
+ padding: 5px 0;
border-bottom: 1px dashed #bbb;
.wholeLine {
@@ -199,12 +235,15 @@
align-items: center;
.rowTipContenetLabel {
- min-width: 125rpx;
+ min-width: 144.23rpx;
+ font-size: 28.85rpx;
+ text-align: left;
}
- }
- .rowTipContenetAll {
- width: calc(100% - 125rpx; );
+ .rowTipContenetAll {
+ font-size: 28.85rpx;
+ width: calc(100% - 144.23rpx);
+ }
}
.rowTipContenet {
@@ -226,38 +265,5 @@
text-align: right !important;
}
}
- }
-
- .formItemContent {
- /deep/.u-form-item {
- padding: 8px 0;
- border-bottom: 1px dashed #bbb;
- }
-
- /deep/.u-form-item__body,
- /deep/.u-textarea {
- padding: 0 !important;
- }
-
- /deep/.u-form-item__body__left__content__label,
- /deep/.u-radio__text {
- font-size: 13px !important;
- }
- }
-
- .fileBox {
- display: -webkit-box;
- display: -webkit-flex;
- display: flex;
- position: relative;
- width: 100%;
- height: 100%;
- -webkit-box-orient: vertical;
- -webkit-box-direction: normal;
- -webkit-flex-direction: column;
- flex-direction: column;
- -webkit-box-pack: center;
- -webkit-justify-content: center;
- justify-content: center;
}
</style>
\ No newline at end of file
--
Gitblit v1.8.0