From 46a94045f5370bffd74123f3b614e188d67bb553 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8A=B1=E6=9C=89=E6=B8=85=E9=A6=99=E6=9C=88=E6=9C=89?= =?UTF-8?q?=E9=98=B4?= <185154740@qq.com> Date: Fri, 10 Dec 2021 18:20:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=B0=E8=AE=BF=E4=BA=8B=E9=A1=B9=20?= =?UTF-8?q?=E7=8E=B0=E5=AE=9E=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/AppWalkask/components/add.vue | 122 +++++++++++++++---------- 1 file changed, 75 insertions(+), 47 deletions(-) diff --git a/src/apps/AppWalkask/components/add.vue b/src/apps/AppWalkask/components/add.vue index 9fb616ef..8c8810b1 100644 --- a/src/apps/AppWalkask/components/add.vue +++ b/src/apps/AppWalkask/components/add.vue @@ -3,42 +3,42 @@
-
+
- + - - + + - + - + - + - - -
{{ forms.things.length }}/30
+ + +
{{ forms.title.length }}/30
- - -
{{ forms.things.length }}/500
+ + +
{{ forms.description.length }}/500
- - + +
@@ -68,36 +68,21 @@ export default { backgroundNavbar: { backgroundColor: '#3975C6', }, - forms: { areaId: '', - object: '', + applicationId: '', reality: '', - realitylabel: '', - things: '', - content: '', - avatar: [], + realityValue: '', + title: '', + description: '', + images: [], }, showAreaId: false, - areaIdlist: [ - { - value: '1', - label: '江', - }, - { - value: '2', - label: '湖', - }, - ], Objectlist: [ { value: '0', label: '武汉', }, - { - value: '1', - label: '北京', - }, ], showObject: false, showStstus: false, @@ -114,34 +99,49 @@ export default { mounted() {}, methods: { submit() { + console.log(1) if (this.flag) return this.$refs.uForm.validate((valid) => { if (valid) { - if (!this.areaId) { + if (!this.forms.applicationId) { return this.$u.toast('请选择走访对象') } - if (!this.form.things) { + if (!this.forms.title) { return this.$u.toast('请输入入户走访事项') } + console.log(2) + const imgs = [] + if (this.forms.images) { + this.forms.images.map((e) => { + console.log(e) + imgs.push({ url: e.url, id: e.id }) + }) + } + + console.log(3) this.flag = true this.$instance .post(`/appjobresume/addOrUpdate`, { areaId: this.forms.areaId, - object: this.forms.object, + applicationId: '8883942d30aa4b76b33de1660d4870e4', + // object: this.forms.object, reality: this.forms.reality == Number ? this.forms.reality : this.forms.realitylabel, - things: this.forms.things, - content: this.forms.content, - avatar: this.forms.avatar[0], + title: this.forms.title, + description: this.forms.description, + images: imgs || [], // education: this.form.education == Number ? this.form.education : this.forms.educationValue, - id: this.id, + id: '', }) .then((res) => { + console.log(4) if (res.code == 0) { + console.log(5) this.$u.toast('保存成功') this.flag = false uni.navigateBack({}) + console.log(6) } }) } else { @@ -158,16 +158,16 @@ export default { } }, - changeObject(e) { + applicaStatus(e) { console.log(e) this.forms.object = e[0].value this.forms.objectlabel = e[0].label }, - changeStstus(e) { + realityStstus(e) { console.log(e) - this.forms.reality = e[0].value - this.forms.realitylabel = e[0].label + this.forms.reality = e[0].label + this.forms.realityValue = e[0].value }, toWalkObject() { @@ -187,13 +187,41 @@ export default { .add { height: 100%; padding-bottom: 112px; - .header-content { + .header-description { ::v-deep .u-form { .u-form-item { margin-bottom: 16px; + .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 { margin-bottom: 0; + padding-bottom: 20px !important; + } + .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; + } + } + // } + // } + // } + // } + // } } } }