Browse Source

'调整内容'

main
hflllll 1 month ago
parent
commit
3afefacd24
1 changed files with 18 additions and 2 deletions
  1. +18
    -2
      subPages/home/maintainanceSubmit.vue

+ 18
- 2
subPages/home/maintainanceSubmit.vue View File

@ -16,6 +16,7 @@
placeholder="请填写"
class="input-field"
ref="maintainerInput"
disabled
/>
</view>
</view>
@ -263,6 +264,7 @@
export default {
data() {
return {
userId: '',
timeValue: Number(new Date()),
nextTimeValue: Number(new Date()),
//
@ -291,6 +293,19 @@ export default {
}
},
methods: {
//
async getPersonalInfo() {
try {
const res = await this.$api.user.queryUser()
if (res.code === 200) {
this.userId = res.result.id
this.maintenanceName = res.result.nickName
}
} catch (error) {
console.error('获取个人信息失败:', error)
}
},
//
showDatePicker() {
this.$refs.datePicker.open()
@ -441,7 +456,7 @@ export default {
// costList,,;
//
const formData = {
maintenanceName: this.maintenanceName,
maintenanceName: this.userId,
maintenanceDate: this.maintenanceDate,
stateFrontText: this.stateFrontText,
stateFrontImage: this.stateFrontImage?.join(',') || '',
@ -481,7 +496,8 @@ export default {
}
}
},
onLoad(options) {
async onLoad(options) {
await this.getPersonalInfo()
this.showpieceId = options.id


Loading…
Cancel
Save