From 1ba1b90dcde6dc3c82362ffd73a766c9b111e0e9 Mon Sep 17 00:00:00 2001
From: linwei <872216696@qq.com>
Date: Sat, 06 Jan 2024 15:43:22 +0800
Subject: [PATCH] 议事限制人员
---
src/views/article/components/discussionManageChild.vue | 146 +++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 137 insertions(+), 9 deletions(-)
diff --git a/src/views/article/components/discussionManageChild.vue b/src/views/article/components/discussionManageChild.vue
index e6cd35e..daa6662 100644
--- a/src/views/article/components/discussionManageChild.vue
+++ b/src/views/article/components/discussionManageChild.vue
@@ -1,7 +1,7 @@
<template>
<div>
- <el-dialog title="" append-to-body :visible.sync="dialogVisibles" width="80%" :before-close="handleClose">
+ <el-dialog title="" append-to-body :visible.sync="dialogVisibles" width="60%" :before-close="handleClose">
<avue-form ref="DisCussFrom" :option="option" v-model="disCussFrom" @submit="handleSubmit"></avue-form>
</el-dialog>
</div>
@@ -28,6 +28,13 @@
import {
getDictionary
} from '@/api/system/dict'
+
+ import {
+ getList as getHouseholdList,
+ getDetatils as getHouseholdDetail
+ } from "@/api/userHouse/list/houseHold"
+
+
export default {
data() {
@@ -78,27 +85,24 @@
searchMenuSpan: 3,
menuWidth: 500,
column: [{
- label: 'ID',
- prop: 'id',
- searchSpan: 4,
- display: false,
- },
- {
label: '标题',
prop: 'title',
searchSpan: 4,
+ span: 6,
},
{
label: '参与人数',
prop: 'topsCount',
searchSpan: 4,
display: false,
+ span: 6,
},
{
label: '开启投票',
prop: 'openFlag',
type: 'radio',
button: true,
+ span: 6,
value: 0,
dicData: [{
label: '开启',
@@ -117,6 +121,7 @@
prop: 'voteRestrictions',
type: 'radio',
button: true,
+ span: 6,
dicData: [{
label: '一人一票',
value: 0
@@ -135,6 +140,7 @@
prop: 'signatureFlag',
type: 'radio',
button: true,
+ span: 6,
dicData: [{
label: '不需要',
value: 0
@@ -153,6 +159,7 @@
prop: 'appointUser',
type: 'radio',
button: true,
+ span: 6,
dicData: [{
label: '不限制',
value: 0
@@ -168,7 +175,103 @@
value: 0
},
{
+ label: "选择用户",
+ prop: "userIds",
+ hide: true,
+ // type: "table",
+ display: false,
+ span: 6,
+ // labelWidth: 120,
+ searchSpan: 4,
+ search: true,
+ children: {
+ border: true,
+ height: 400,
+ searchShow: true,
+ searchMenuSpan: 6,
+ submitText: "确定",
+ column: [{
+ label: "姓名",
+ prop: "name",
+ search: true,
+ searchSpan: 4,
+ rules: [{
+ required: true,
+ message: "请输入姓名",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ label: "联系方式",
+ prop: "phoneNumber",
+ search: true,
+ searchSpan: 4,
+ rules: [{
+ required: true,
+ message: "请输入联系方式",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ label: "地址",
+ search: true,
+ searchSpan: 8,
+ prop: "currentAddress",
+ display: false
+ },
+ ],
+ },
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0
+ },
+ formatter: (row) => {
+ this.form.phoneNumber = row.phoneNumber
+ return row.name
+ },
+ onLoad: ({
+ page,
+ value,
+ data
+ }, callback) => {
+ //首次加载去查询对应的值
+ if (value) {
+ getHouseholdDetail(value).then(res => {
+ var resData = res.data.data
+ // 查询对应行数据
+ callback(resData)
+ return
+ })
+ }
+ if (page) {
+ this.loading = true
+ var params = {
+ ...data,
+ townStreetCode: "361102005"
+ }
+ getHouseholdList(page.currentPage, page.pageSize, Object.assign(params)).then(res => {
+ const resData = res.data.data
+ var total = resData.total
+ var data = resData.records
+ this.loading = false
+ this.selectionClear()
+ //分页查询信息
+ callback({
+ total: total,
+ data: data
+ })
+ })
+ }
+ },
+ props: {
+ label: 'name',
+ value: 'id'
+ }
+ },
+ {
label: "截止时间",
+ span: 6,
prop: "endTime",
type: "datetime",
format: "yyyy-MM-dd hh:mm:ss",
@@ -192,6 +295,32 @@
},
mounted() {
+ },
+ watch: {
+ 'disCussFrom.appointUser': {
+ handler(newData) {
+ const column = this.findObject(this.option.column, "userIds");
+ if (newData == 1) {
+ column.display = true
+ } else {
+ column.display = false
+ }
+ },
+ },
+ "disCussFrom.userIds": {
+ // form是表单或者表格绑定的数据集,v-model='form'
+ handler(val) {
+ this.$nextTick(() => {
+ console.log(this.$refs, 66666)
+ // getHouseholdDetail(val).then(res => {
+ // const data = res.data.data
+ // this.form.phoneNumber = data.phoneNumber
+ // this.form.currentAddress = data.currentAddress
+ // })
+ })
+ },
+ immediate: true,
+ },
},
computed: {
...mapGetters(["permission"]),
@@ -232,7 +361,6 @@
handleClose() {
this.dialogVisibles = false
- this.disCussFrom = {}
this.$refs.DisCussFrom && this.$refs.DisCussFrom.resetForm()
console.log(this.$refs, 90999)
@@ -258,4 +386,4 @@
.el-pagination {
margin-top: 20px;
}
-</style>
+</style>
\ No newline at end of file
--
Gitblit v1.9.3