diff --git a/src/apps/AppServicePublic/Add.vue b/src/apps/AppServicePublic/Add.vue index 1995c55b..435233c9 100644 --- a/src/apps/AppServicePublic/Add.vue +++ b/src/apps/AppServicePublic/Add.vue @@ -9,13 +9,13 @@ - + - + @@ -45,10 +45,11 @@ export default { props: {}, data() { return { - show: false, + id: '', forms: { title: '', status: '', + statusValue: '', content: '', fileIds: [], areaId: '', @@ -59,43 +60,45 @@ export default { } }, computed: { ...mapState(['user']) }, - created() { + onLoad(o) { + console.log(o) + this.id = o.id this.areaIdProps = this.user.areaId this.$dict.load('realityStatus').then(() => { this.getDetail() }) }, + mounted() {}, 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 || '[]') - } - } - }) - }, + // getDetail() { + // this.$http.post(`/app/appvisitvondolence/queryDetailById?id=${this.id}`).then((res) => { + // if (res?.data) { + // this.forms = res.data + // this.forms.statusValue = res.data.status + // this.forms.status = this.$dict.getLabel('realityStatus', res.data.status) + // if (res.data.images) { + // this.forms.images = JSON.parse(res.data.images || '[]') + // } + // } + // }) + // }, submit() { if (this.flag) return this.$refs.uForm.validate((valid) => { if (valid) { - if (!this.forms.create_user_name) { - return this.$u.toast('请选择走访慰问对象') - } if (!this.forms.title) { - return this.$u.toast('请输入入户走访事项') + return this.$u.toast('请输入标题') + } + if (!this.forms.content) { + return this.$u.toast('请输入正文') } const imgs = [] - if (this.forms.images) { - this.forms.images.map((e) => { - console.log(e) + if (this.forms.fileIds) { + this.forms.fileIds.map((e) => { imgs.push({ url: e.url, id: e.id }) }) } @@ -103,26 +106,19 @@ export default { this.flag = true this.$http .post(`/app/appvisitvondolence/addOrUpdate`, { - areaId: this.forms.areaId, - applicationId: this.forms.applicationId, - name: this.forms.create_user_name, - optionId: this.forms.applicationId, - reality: this.forms.realityValue ? this.forms.realityValue : this.forms.reality, title: this.forms.title, - description: this.forms.description, - createUserId: this.user.id, - createUserName: this.user.name, - images: JSON.stringify(imgs) || [], + status: this.forms.statusValue ? this.forms.statusValue : this.forms.status, + areaId: this.forms.areaId, + content: this.forms.content, + // images: JSON.stringify(imgs) || [], + images: imgs || [], id: this.id, }) .then((res) => { - console.log(4) if (res.code == 0) { - console.log(5) this.$u.toast('发布成功') this.flag = false - uni.navigateTo({ url: `./AppWalkask` }) - console.log(6) + uni.navigateTo({ url: `./AppServicePublic` }) } }) } else { @@ -132,24 +128,12 @@ export default { }, areaSelect(e) { - if (e.type == 5) { - this.forms.areaId = e.id - } else { - return this.$u.toast('请选择到村') - } + this.forms.areaId = e.id }, - backlist(e) { - console.log(e.item) - this.forms.create_user_name = e.item.create_user_name - this.forms.applicationId = e.appId - this.forms.optionId = e.item.id - // this.addList = true - }, - - realityStstus(e) { - this.forms.reality = e[0].label - this.forms.realityValue = e[0].value + selectStatus(e) { + this.forms.status = e[0].label + this.forms.statusValue = e[0].value }, }, } diff --git a/src/apps/AppServicePublic/AppServicePublic.vue b/src/apps/AppServicePublic/AppServicePublic.vue index f87c1268..78f79b9c 100644 --- a/src/apps/AppServicePublic/AppServicePublic.vue +++ b/src/apps/AppServicePublic/AppServicePublic.vue @@ -8,27 +8,32 @@ @@ -38,6 +43,8 @@
+ +
@@ -57,6 +64,8 @@ export default { current: 1, size: 10, pages: 0, + deletShow: false, + deletId: '', } }, computed: { @@ -92,20 +101,37 @@ export default { }, areaSelect(e) { - if (e.type == 5) { - this.areaId = e.id - } else { - return this.$u.toast('请选择到村') - } + this.areaId = e.id this.getList() }, - goDetail(item) { - uni.navigateTo({ url: `./Detail?id=${item.id}` }) + toAdd(item, type) { + if (type == '1') { + console.log('详情') + uni.navigateTo({ url: `./Detail?id=${item.id}` }) + } + if (type == '2') { + console.log('编辑') + uni.navigateTo({ url: `./Add?id=${item.id}` }) + } + if (type == null) { + console.log('添加') + uni.navigateTo({ url: `./Add` }) + } }, - toAdd() { - uni.navigateTo({ url: `./Add` }) + toDetele(item) { + this.deletShow = true + this.deletId = item.id + }, + + delet() { + this.$http.post(`/app/appvisitvondolence/delete?ids=${this.deletId}`).then((res) => { + if (res.code == 0) { + this.$u.toast('删除成功!') + this.getList() + } + }) }, }, onReachBottom() { @@ -135,45 +161,58 @@ uni-page-body { padding: 20px 30px; } - .u-card { - ::v-deep .u-card__body { - .body { - position: relative; - .u-body-item { - .title { - font-size: 36px; - font-weight: 500; - margin-bottom: 16px; + ::v-deep .AiCard { + background: #f3f6f9; + .start { + background: #fff; + padding: 32px; + border-radius: 16px; + .title { + font-size: 32px; + font-weight: 500; + color: #333333; + margin-bottom: 16px; + } + .flex { + display: flex; + justify-content: space-between; + .left { + .garydiv { + font-size: 28px; + color: #999999; + background: #eeeeee; + border-radius: 24px; + padding: 4px 16px; } - .flex { - display: flex; - justify-content: space-between; - .left { - .garydiv { - font-size: 28px; - color: #999999; - background: #eeeeee; - border-radius: 24px; - padding: 4px 16px; - } - .times { - margin-left: 16px; - font-size: 28px; - color: #999999; - } - } + .times { + margin-left: 16px; + font-size: 28px; + color: #999999; + } + } - .right { - font-size: 28px; - color: #999; - .font { - color: #4181ff; - } - } + .right { + font-size: 28px; + color: #999; + .font { + color: #4181ff; } } } } + .mask { + .moreMenu { + .menu { + text-align: center; + line-height: 80px; + width: 192px; + height: 80px; + font-size: 28px; + font-weight: 400; + color: #333333; + } + } + } } .AiFixedBtn { diff --git a/src/apps/AppServicePublic/Detail.vue b/src/apps/AppServicePublic/Detail.vue index d5121757..d7528ddf 100644 --- a/src/apps/AppServicePublic/Detail.vue +++ b/src/apps/AppServicePublic/Detail.vue @@ -25,13 +25,32 @@ export default { components: {}, props: {}, data() { - return {} + return { + data: [], + id: '', + } }, computed: {}, watch: {}, - created() {}, + onLoad(o) { + this.id = o.id + this.$dict.load('realityStatus').then(() => { + // this.getDetail() + }) + }, mounted() {}, - methods: {}, + methods: { + getDetail() { + this.$http.post(`/app/appvisitvondolence/queryDetailById?id=${this.id}`).then((res) => { + if (res?.data) { + this.data = res.data + if (this.data.images) { + this.data.images = JSON.parse(this.data.images || '[]') + } + } + }) + }, + }, } diff --git a/src/apps/AppSpecialPeople/AppSpecialPeople.vue b/src/apps/AppSpecialPeople/AppSpecialPeople.vue index 7371efda..3717679d 100644 --- a/src/apps/AppSpecialPeople/AppSpecialPeople.vue +++ b/src/apps/AppSpecialPeople/AppSpecialPeople.vue @@ -18,7 +18,7 @@ export default { data() { return { - component: 'add', + component: 'Detail', params: {} } }, diff --git a/src/apps/AppSpecialPeople/components/detail.vue b/src/apps/AppSpecialPeople/components/detail.vue index f0a46dda..b2368f90 100644 --- a/src/apps/AppSpecialPeople/components/detail.vue +++ b/src/apps/AppSpecialPeople/components/detail.vue @@ -1,6 +1,102 @@ @@ -10,16 +106,20 @@ export default { data() { return { - + areaId: '', + tabIndex: 1, + addressArea: '' } }, computed: { ...mapState(['user']) }, mounted() { - + this.areaId = this.user.areaId }, methods: { - + areaSelect() { + + } } } @@ -27,6 +127,205 @@ export default { \ No newline at end of file diff --git a/src/apps/AppSpecialPeople/components/img/down-icon.png b/src/apps/AppSpecialPeople/components/img/down-icon.png new file mode 100644 index 00000000..b0db859f Binary files /dev/null and b/src/apps/AppSpecialPeople/components/img/down-icon.png differ diff --git a/src/apps/AppSpecialPeople/components/img/local-icon.png b/src/apps/AppSpecialPeople/components/img/local-icon.png new file mode 100644 index 00000000..3e23aff6 Binary files /dev/null and b/src/apps/AppSpecialPeople/components/img/local-icon.png differ diff --git a/src/apps/AppSpecialPeople/components/img/search-icon.png b/src/apps/AppSpecialPeople/components/img/search-icon.png new file mode 100644 index 00000000..e3cb75af Binary files /dev/null and b/src/apps/AppSpecialPeople/components/img/search-icon.png differ diff --git a/src/apps/AppSpecialPeople/components/img/user-img.png b/src/apps/AppSpecialPeople/components/img/user-img.png new file mode 100644 index 00000000..ae49d85f Binary files /dev/null and b/src/apps/AppSpecialPeople/components/img/user-img.png differ diff --git a/src/apps/AppWalkask/add.vue b/src/apps/AppWalkask/add.vue index 48367c68..a2bc2de9 100644 --- a/src/apps/AppWalkask/add.vue +++ b/src/apps/AppWalkask/add.vue @@ -4,34 +4,30 @@
- + - + - + - + - +
{{ forms.title.length }}/30
- +
{{ forms.description.length }}/500
@@ -51,7 +47,7 @@