This commit is contained in:
yanran200730
2022-05-24 16:31:10 +08:00
parent e7c61c8293
commit 2b8e4dc41d
19 changed files with 255 additions and 72 deletions

View File

@@ -92,7 +92,13 @@
},
mounted () {
this.configList = JSON.parse(JSON.stringify(this.config))
this.configList = JSON.parse(JSON.stringify(this.config)).map(v => {
if (v.fieldType === '7') {
v.defaultValue = this.$dayjs().format('YYYY-MM-DD')
}
return v
})
uni.$on('change', e => {
this.configList = e

View File

@@ -80,8 +80,8 @@
this.isShowDate = date.status === '1'
this.isShowAddress = address.status === '1'
this.title = title.defaultValue || '巡查日志'
this.weather = weather.defaultValue || '晴转多云'
this.address = date.defaultValue || '武汉天地'
this.address = uni.getStorageSync('address').address || ''
this.weather = uni.getStorageSync('address').weather || ''
this.reporter = reporter.defaultValue || ''
this.date = date.defaultValue || this.$dayjs(new Date).format('YYYY-MM-DD')
this.remark = remark.defaultValue || ''
@@ -92,7 +92,19 @@
},
mounted () {
this.configList = JSON.parse(JSON.stringify(this.config))
this.configList = JSON.parse(JSON.stringify(this.config)).map(v => {
if (v.fieldType === '3') {
v.defaultValue = uni.getStorageSync('address').address || ''
}
if (v.fieldType === '2') {
v.defaultValue = uni.getStorageSync('address').weather || ''
}
if (v.fieldType === '7') {
v.defaultValue = this.$dayjs().format('YYYY-MM-DD')
}
return v
})
uni.$on('change', e => {
this.configList = e

View File

@@ -103,8 +103,8 @@
this.isShowDate = date.status === '1'
this.isShowAddress = address.status === '1'
this.title = title.defaultValue || '巡查日志'
this.address = address.defaultValue || '武汉天地'
this.title = title.defaultValue || ''
this.address = address.defaultValue || ''
this.hoster = hoster.defaultValue || ''
this.date = date.defaultValue || this.$dayjs(new Date).format('YYYY-MM-DD')
this.remark = remark.defaultValue || ''
@@ -118,7 +118,13 @@
},
mounted () {
this.configList = JSON.parse(JSON.stringify(this.config))
this.configList = JSON.parse(JSON.stringify(this.config)).map(v => {
if (v.fieldType === '7') {
v.defaultValue = this.$dayjs().format('YYYY-MM-DD')
}
return v
})
uni.$on('change', e => {
this.configList = e

View File

@@ -91,7 +91,13 @@
},
mounted () {
this.configList = JSON.parse(JSON.stringify(this.config))
this.configList = JSON.parse(JSON.stringify(this.config)).map(v => {
if (v.fieldType === '7') {
v.defaultValue = this.$dayjs().format('YYYY-MM-DD')
}
return v
})
uni.$on('change', e => {
this.configList = e