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 |   58 ++++++++++++++++++++++++++++++++++------------------------
 1 files changed, 34 insertions(+), 24 deletions(-)

diff --git a/src/views/article/components/discussionManageChild.vue b/src/views/article/components/discussionManageChild.vue
index 8e3f361..5a2ab3b 100644
--- a/src/views/article/components/discussionManageChild.vue
+++ b/src/views/article/components/discussionManageChild.vue
@@ -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() {
@@ -92,7 +94,7 @@
               type: 'radio',
               button: true,
               row: true,
-              span: 6,
+              span: 12,
               offset: 8,
               value: 0,
               dicData: [{
@@ -134,7 +136,7 @@
               type: 'radio',
               button: true,
               row: true,
-              span: 6,
+              span: 12,
               offset: 8,
               dicData: [{
                 label: '不需要',
@@ -172,18 +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,
               row: true,
-              dicUrl: "",
+              // dicUrl: `/api/blade-system/user/getUserlnfoByDistrictlds?districtlds={{}}`,
               props: {
                 label: 'name',
                 value: 'id',
@@ -198,13 +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: [{
@@ -253,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")
@@ -262,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)
@@ -278,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)
@@ -293,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]
-          if (this.disCussFrom.userIds) {
-            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