From 34dbf82112e28c111ffb2efdf2653ee42df80b21 Mon Sep 17 00:00:00 2001
From: lin <sbla5888@163.com>
Date: Wed, 28 Feb 2024 14:15:49 +0800
Subject: [PATCH] 街道管理员查询不出物业公司(物业公司加一列)
---
src/views/article/components/discussionManageChild.vue | 97 ++++++++++++++++++++++++++----------------------
1 files changed, 53 insertions(+), 44 deletions(-)
diff --git a/src/views/article/components/discussionManageChild.vue b/src/views/article/components/discussionManageChild.vue
index 5301181..5a2ab3b 100644
--- a/src/views/article/components/discussionManageChild.vue
+++ b/src/views/article/components/discussionManageChild.vue
@@ -1,6 +1,6 @@
<template>
<div>
- <el-dialog title="" append-to-body :visible.sync="dialogVisibles" width="60%" :before-close="handleClose">
+ <el-dialog title="" append-to-body :visible.sync="dialogVisibles" width="50%" :before-close="handleClose">
<avue-form ref="DisCussFrom" :option="option" v-model="disCussFrom" @submit="handleSubmit"></avue-form>
</el-dialog>
</div>
@@ -31,12 +31,14 @@
getDictionary
} from '@/api/system/dict'
+ // import {
+ // getList as getHouseholdList,
+ // getDetatils as getHouseholdDetail
+ // } from "@/api/userHouse/list/houseHold"
+
import {
- getList as getHouseholdList,
- getDetatils as getHouseholdDetail
- } from "@/api/userHouse/list/houseHold"
-
-
+ getUserlnfoByDistrictlds
+ } from "@/api/system/user"
export default {
data() {
@@ -86,26 +88,14 @@
addBtn: false,
searchMenuSpan: 3,
menuWidth: 500,
- column: [
- // {
- // label: '标题',
- // prop: 'title',
- // searchSpan: 4,
- // span: 6,
- // },
- {
- label: '参与人数',
- prop: 'topsCount',
- searchSpan: 4,
- display: false,
- span: 6,
- },
- {
+ column: [{
label: '开启投票',
prop: 'openFlag',
type: 'radio',
button: true,
- span: 6,
+ row: true,
+ span: 12,
+ offset: 8,
value: 0,
dicData: [{
label: '开启',
@@ -124,7 +114,9 @@
prop: 'voteRestrictions',
type: 'radio',
button: true,
- span: 6,
+ row: true,
+ span: 12,
+ offset: 8,
dicData: [{
label: '一人一票',
value: 0
@@ -143,7 +135,9 @@
prop: 'signatureFlag',
type: 'radio',
button: true,
- span: 6,
+ row: true,
+ span: 12,
+ offset: 8,
dicData: [{
label: '不需要',
value: 0
@@ -157,12 +151,15 @@
trigger: "blur",
}, ],
value: 0
- }, {
+ },
+ {
label: '指定用户',
prop: 'appointUser',
type: 'radio',
button: true,
- span: 6,
+ row: true,
+ span: 12,
+ offset: 8,
dicData: [{
label: '不限制',
value: 0
@@ -177,16 +174,19 @@
}, ],
value: 0
},
-
{
display: false,
label: "选择用户",
prop: "userIds",
- type: 'select',
- span: 6,
+ tags: true,
+ type: "tree",
+ multiple: true,
+ span: 12,
+ offset: 8,
remote: true,
hide: true,
- dicUrl: "",
+ row: true,
+ // dicUrl: `/api/blade-system/user/getUserlnfoByDistrictlds?districtlds={{}}`,
props: {
label: 'name',
value: 'id',
@@ -201,11 +201,13 @@
{
label: "截止时间",
- span: 6,
+ span: 12,
+ offset: 8,
+ row: true,
prop: "endTime",
type: "datetime",
- format: "yyyy-MM-dd hh:mm:ss",
- valueFormat: "yyyy-MM-dd hh:mm:ss",
+ format: "yyyy-MM-dd HH:mm:ss",
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
// format: "yyyy-MM-dd hh:mm:ss",
// valueFormat: "yyyy-MM-dd hh:mm:ss",
rules: [{
@@ -254,6 +256,12 @@
}
},
methods: {
+ getuserInfoByDistrictId() {
+ getUserlnfoByDistrictlds(this.discussion.articleRange).then(res => {
+ const column = this.findObject(this.option.column, "userIds")
+ column.dicData = res.data.data
+ })
+ },
getUserList() {
let dicUrl = `/api/blade-household/household/selectHouseholdList?searchKey={{key}}&limit=20`
const column = this.findObject(this.option.column, "userIds")
@@ -263,6 +271,10 @@
handleSubmit(row, done) {
row.articleId = this.articleId
row.eventType = 1
+ row.userIds = JSON.stringify(row.userIds)
+ if (row.appointUser == 0) {
+ row.userIds = ''
+ }
addPd(row).then(
() => {
this.onLoad(this.discussion)
@@ -279,9 +291,11 @@
)
},
init(data) {
+ console.log("====>", data);
this.$refs.DisCussFrom && this.$refs.DisCussFrom.resetForm()
this.dialogVisibles = true
this.disCussFrom = {}
+ // this.disCussFrom = data;
this.discussion = data
this.articleId = data.id
this.onLoad(data)
@@ -294,24 +308,19 @@
console.log(this.$refs, 90999)
},
- onLoad(data, params = {
+ onLoad(row, params = {
eventType: 1,
- articleId: data.id
+ articleId: row.id
}) {
this.loading = true
getListPd(1, 10, Object.assign(params, this.query)).then(res => {
const data = res.data.data
this.page.total = data.total
this.disCussFrom = data.records[0]
-
- getPersonPublicSelect({
- id: this.disCussFrom.userIds
- }).then(res => {
- const column = this.findObject(this.option.column, "userIds")
- column.dicData = res.data.data
-
- this.loading = false
- })
+ if (this.disCussFrom && this.disCussFrom.userIds) {
+ this.disCussFrom.userIds = JSON.parse(this.disCussFrom.userIds)
+ }
+ this.getuserInfoByDistrictId()
})
}
}
--
Gitblit v1.9.3