shuishen
2024-01-08 c9b3952131b7273bf4f29c00975b6d737a3aae64
走访日志和议事管理,人员选择更改
2 files modified
1 files added
234 ■■■■■ changed files
src/api/public.js 9 ●●●●● patch | view | raw | blame | history
src/views/article/components/discussionManageChild.vue 189 ●●●● patch | view | raw | blame | history
src/views/cGovernance/gridWorkLog.vue 36 ●●●●● patch | view | raw | blame | history
src/api/public.js
New file
@@ -0,0 +1,9 @@
import request from "@/router/axios";
export const getPersonPublicSelect = (params) => {
  return request({
    url: "/api/blade-household/household/selectHouseholdList",
    method: "get",
    params: params,
  });
};
src/views/article/components/discussionManageChild.vue
@@ -7,6 +7,8 @@
</template>
<script>
import { getPersonPublicSelect } from "@/api/public"
  import {
    getListPd,
    getDetailPd,
@@ -172,135 +174,34 @@
              }, ],
              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: "确定",
                selection: true,
                column: [{
                    label: "社区",
                    prop: "neiName",
                    // search: true,
                    searchSpan: 4,
                  }, {
                    label: "姓名",
                    prop: "name",
                    searchSpan: 4,
                    rules: [{
                      required: true,
                      message: "请输入姓名",
                      trigger: "blur",
                    }, ],
                    display: true,
                    hide: true,
                  },
                  {
                    label: "小区",
                    prop: "aoiCode",
                    searchSpan: 5,
                    type: 'tree',
                    search: true,
                    parent: false,
                    dicUrl: `/api/blade-district/district/getDistrictTree`,
                    props: {
                      label: "name",
                      value: "aoiCode"
                    },
                    // defaultExpandedKeys: ["361102003"],
                    span: 12,
                    labelWidth: 120,
                    width: 220,
                    // overHidden: true,
                    rules: [{
                      required: true,
                      message: "请选择小区",
                      trigger: "blur",
                    }, ],
                    // disabled: true
                    display: true,
                    // hide: true,
                  },
                  {
                    label: "楼栋",
                    prop: "building",
                    search: true,
                    searchSpan: 4,
                  },
                  {
                    label: "单元",
                    prop: "unit",
                    search: true,
                    searchSpan: 4,
                  },
                  {
                    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
                    //分页查询信息
                    callback({
                      total: total,
                      data: data
                    })
                  })
                }
              },
                    display: false,
                    label: "选择用户",
                    prop: "userIds",
                    type: 'select',
                    span: 6,
                    remote: true,
                    hide: true,
                    dicUrl: "",
              props: {
                label: 'name',
                value: 'id'
              }
                        value: 'id',
            },
                    dicData: [],
                    formatter: (row) => {
                        console.log(row, 1212213)
                        return row.name
                    },
                    rules: [
                        {
                            required: true,
                            message: '请输入姓名',
                            trigger: 'blur'
                        }
                    ],
                },
            {
              label: "截止时间",
              span: 6,
@@ -325,10 +226,29 @@
        discussion: {},
      }
    },
    created () {
        this.getUserList()
    },
    mounted() {
    },
    watch: {
        "disCussFrom.userIds": {
            handler (val) {
                if (val) {
                    getPersonPublicSelect({
                        id: val
                    }).then(res => {
                        const column = this.findObject(this.option.column, "userIds")
                        column.dicData = res.data.data
                    })
                }
            }
        },
      'disCussFrom.appointUser': {
        handler(newData) {
          const column = this.findObject(this.option.column, "userIds")
@@ -338,20 +258,6 @@
            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: {
@@ -365,6 +271,12 @@
      }
    },
    methods: {
        getUserList () {
            let dicUrl = `/blade-household/household/selectHouseholdList?searchKey={{key}}&limit=20`
            const column = this.findObject(this.option.column, "userIds")
            column.dicUrl = dicUrl
        },
      handleSubmit(row, done) {
        row.articleId = this.articleId
        row.eventType = 1
@@ -384,6 +296,7 @@
        )
      },
      init(data) {
            this.$refs.DisCussFrom && this.$refs.DisCussFrom.resetForm()
        this.dialogVisibles = true
        this.disCussFrom = {}
        this.discussion = data
src/views/cGovernance/gridWorkLog.vue
@@ -20,7 +20,7 @@
</template>
<script>
import { getAllHouseHold } from "@/api/userHouse/list/houseHold"
import { getPersonPublicSelect } from "@/api/public"
import { getList, remove, update, add, getGridWorkLog } from "@/api/grid/gridWorkLog"
import { getList as getHouseholdList, getDetatils as getHouseholdDetail } from "@/api/userHouse/list/houseHold"
import { mapGetters } from "vuex"
@@ -128,8 +128,7 @@
                        },
                        dicData: [],
                        formatter: (row) => {
                            this.form.phone = row.phoneNumber
                            this.form.address = row.currentAddress
                            console.log(row, 1111)
                            return row.name
                        },
@@ -257,6 +256,24 @@
    },
    watch: {
        "form.householdId": {
            handler (val) {
                if (val) {
                    getPersonPublicSelect({
                        id: val
                    }).then(res => {
                        const column = this.findObject(this.option.column, "householdId")
                        column.dicData = res.data.data
                        this.form.phone = res.data.data[0].phoneNumber
                        this.form.address = res.data.data[0].currentAddress
                    })
                }
            }
        },
        'form.personType': {
            handler (newData) {
                let householdIdColumn = this.findObject(
@@ -330,11 +347,9 @@
    methods: {
        getUserList (param = '') {
            let dicUrl = `/blade-household/household/selectHouseholdList?labelId=${param}&searchKey={{key}}`
            let dicUrl = `/blade-household/household/selectHouseholdList?labelId=${param}&searchKey={{key}}&limit=20`
            const column = this.findObject(this.option.column, "householdId")
            column.dicUrl = dicUrl
            console.log(param, this.option.column, 9999)
        },
        rowSave (row, done, loading) {
@@ -455,15 +470,6 @@
                        })
                        this.form.url = urls.join(",")
                    }
                    let params = {
                        id: this.form.householdId
                    }
                    getAllHouseHold(params).then(res => {
                        const column = this.findObject(this.option.column, "householdId")
                        column.dicData = res.data.data
                    })
                })
            }
            // con