2 files modified
1 files added
| New file |
| | |
| | | import request from "@/router/axios"; |
| | | |
| | | export const getPersonPublicSelect = (params) => { |
| | | return request({ |
| | | url: "/api/blade-household/household/selectHouseholdList", |
| | | method: "get", |
| | | params: params, |
| | | }); |
| | | }; |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getPersonPublicSelect } from "@/api/public" |
| | | |
| | | import { |
| | | getListPd, |
| | | getDetailPd, |
| | |
| | | }, ], |
| | | 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, |
| | |
| | | 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") |
| | |
| | | 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: { |
| | |
| | | } |
| | | }, |
| | | 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 |
| | |
| | | ) |
| | | }, |
| | | init(data) { |
| | | this.$refs.DisCussFrom && this.$refs.DisCussFrom.resetForm() |
| | | this.dialogVisibles = true |
| | | this.disCussFrom = {} |
| | | this.discussion = data |
| | |
| | | </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" |
| | |
| | | }, |
| | | dicData: [], |
| | | formatter: (row) => { |
| | | this.form.phone = row.phoneNumber |
| | | this.form.address = row.currentAddress |
| | | console.log(row, 1111) |
| | | |
| | | return row.name |
| | | }, |
| | |
| | | }, |
| | | |
| | | 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( |
| | |
| | | |
| | | 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) { |
| | |
| | | }) |
| | | 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 |