重写页面
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<u-input v-model="forms.application" disabled placeholder="请选择走访对象" @click="toWalkObject" />
|
||||
<!-- @click="showObject = true" @click="toWalkObject" -->
|
||||
|
||||
<u-select v-model="showObject" :list="Objectlist" @confirm="applicaStatus"></u-select>
|
||||
<!-- <u-select v-model="showObject" :list="Objectlist" @confirm="applicaStatus"></u-select> -->
|
||||
|
||||
<u-icon name="arrow-right" color="#CCCCCC" style="position: absolute; top: 25px; right: 30px"></u-icon>
|
||||
</u-form-item>
|
||||
@@ -61,12 +61,15 @@ export default {
|
||||
components: {
|
||||
walkObject,
|
||||
},
|
||||
props: {},
|
||||
props: {
|
||||
params: {},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
backgroundNavbar: {
|
||||
backgroundColor: '#3975C6',
|
||||
},
|
||||
show: false,
|
||||
forms: {
|
||||
areaId: '',
|
||||
application: '',
|
||||
@@ -77,12 +80,6 @@ export default {
|
||||
images: [],
|
||||
},
|
||||
showAreaId: false,
|
||||
Objectlist: [
|
||||
{
|
||||
value: '0',
|
||||
label: '武汉',
|
||||
},
|
||||
],
|
||||
showObject: false,
|
||||
showStstus: false,
|
||||
flag: false,
|
||||
@@ -93,9 +90,10 @@ export default {
|
||||
},
|
||||
computed: { ...mapState(['user']) },
|
||||
created() {
|
||||
console.log(this.user)
|
||||
this.areaIdProps = this.user.areaId
|
||||
this.$dict.load('realityStatus').then(() => {})
|
||||
this.$dict.load('realityStatus').then(() => {
|
||||
this.getDetail()
|
||||
})
|
||||
},
|
||||
mounted() {
|
||||
this.$on('black', (data) => {
|
||||
@@ -103,6 +101,20 @@ export default {
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
getDetail() {
|
||||
this.$http.post(`/app/appvisitvondolence/queryDetailById?id=${this.params.id}`).then((res) => {
|
||||
if (res?.data) {
|
||||
this.forms = res.data
|
||||
this.forms.realityValue = res.data.reality
|
||||
this.forms.reality = this.$dict.getLabel('realityStatus', res.data.reality)
|
||||
|
||||
if (res.data.images) {
|
||||
this.forms.images = JSON.parse(res.data.images || '[]')
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
submit() {
|
||||
console.log(1)
|
||||
if (this.flag) return
|
||||
@@ -115,7 +127,6 @@ export default {
|
||||
if (!this.forms.title) {
|
||||
return this.$u.toast('请输入入户走访事项')
|
||||
}
|
||||
console.log(2)
|
||||
|
||||
const imgs = []
|
||||
if (this.forms.images) {
|
||||
@@ -125,14 +136,13 @@ export default {
|
||||
})
|
||||
}
|
||||
|
||||
console.log(3)
|
||||
this.flag = true
|
||||
this.$http
|
||||
.post(`/app/appvisitvondolence/addOrUpdate`, {
|
||||
areaId: this.forms.areaId,
|
||||
applicationId: '02fcf19c81154f6ea9560d9a9deee9f4',
|
||||
optionId: '4703806718f842a98a28df554c6aa6b2',
|
||||
reality: this.forms.reality == Number ? this.forms.reality : this.forms.realitylabel,
|
||||
reality: this.forms.realityValue ? this.forms.realityValue : this.forms.reality,
|
||||
title: this.forms.title,
|
||||
description: this.forms.description,
|
||||
createUserId: this.user.id,
|
||||
@@ -146,7 +156,7 @@ export default {
|
||||
console.log(5)
|
||||
this.$u.toast('保存成功')
|
||||
this.flag = false
|
||||
uni.navigateBack({})
|
||||
uni.navigateTo({ url: `./AppWalkask` })
|
||||
console.log(6)
|
||||
}
|
||||
})
|
||||
@@ -164,14 +174,7 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
applicaStatus(e) {
|
||||
console.log(e)
|
||||
this.forms.object = e[0].value
|
||||
this.forms.objectlabel = e[0].label
|
||||
},
|
||||
|
||||
realityStstus(e) {
|
||||
console.log(e)
|
||||
this.forms.reality = e[0].label
|
||||
this.forms.realityValue = e[0].value
|
||||
},
|
||||
@@ -193,15 +196,10 @@ export default {
|
||||
::v-deep .u-form {
|
||||
.u-form-item {
|
||||
margin-bottom: 16px;
|
||||
// padding-bottom: 10px !important;
|
||||
.u-form-item__body {
|
||||
// .u-form-item--right {
|
||||
// .u-form-item--right__content {
|
||||
.u-form-item--right__content__slot {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
.u-form-item:last-child {
|
||||
@@ -210,21 +208,11 @@ export default {
|
||||
}
|
||||
.avatars {
|
||||
.u-form-item__body {
|
||||
// .u-form-item--right {
|
||||
// .u-form-item--right__content {
|
||||
// .u-form-item--right__content__slot {
|
||||
// .ai-uploader {
|
||||
// .fileList {
|
||||
.default {
|
||||
width: 160px;
|
||||
height: 160px;
|
||||
}
|
||||
}
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user