| | |
| | | <el-tag>{{ row.userTypeName }}</el-tag> |
| | | </template> |
| | | |
| | | <template slot-scope="{row}" slot="phone"> |
| | | <el-button type="text" @click="showStringDispose(row, 'phoneflag')"> |
| | | {{ textDispose(row, 'phoneflag', 'phone') }} |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{row}" slot="userHouseLabelVOList"> |
| | | {{ labelDispose(row.userHouseLabelVOList) }} |
| | | </template> |
| | |
| | | |
| | | <el-dialog title="标签管理" append-to-body :visible.sync="labelFlag" center width="600px"> |
| | | <div id="" class="grid-container2"> |
| | | <div class="grid-item" :style="{ backgroundColor: item.color }" v-for="(item, index) in labelData " |
| | | @click="changLabel(item)"> |
| | | <div class="grid-item" :style="{ backgroundColor: item.color }" v-for="(item, index) in labelData" |
| | | :key="index" @click="changLabel(item)"> |
| | | {{ item.name }} |
| | | </div> |
| | | </div> |
| | |
| | | calcHeight: 80, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | searchMenuSpan: 3, |
| | | border: true, |
| | | index: true, |
| | | selection: true, |
| | |
| | | width: 180, |
| | | display: false |
| | | }, |
| | | |
| | | { |
| | | width: 132, |
| | | label: "小区", |
| | | parent: false, |
| | | label: "小区名称", |
| | | prop: "districtName", |
| | | searchSpan: 4, |
| | | search: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择小区", |
| | | trigger: "blur", |
| | | },], |
| | | type: 'tree', |
| | | dicUrl: `/api/blade-district/district/getDistrictTree`, |
| | | props: { |
| | | label: "name", |
| | | value: "id" |
| | | }, |
| | | defaultExpandedKeys: ["361102003"], |
| | | span: 12, |
| | | width: 220, |
| | | overHidden: true, |
| | | }, |
| | | |
| | | { |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | |
| | | width: 96, |
| | | label: "所属街道", |
| | | prop: "townStreetName", |
| | | search: true, |
| | | searchSpan: 4 |
| | | }, |
| | | |
| | | { |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | |
| | | width: 160, |
| | | label: "所属社区", |
| | | prop: "neiName", |
| | | search: true, |
| | | searchSpan: 4, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择所属社区", |
| | | trigger: "blur", |
| | | }], |
| | | }, |
| | | |
| | | { |
| | | hide: true, |
| | | label: "所属社区", |
| | | prop: "neiCode", |
| | | search: false, |
| | | width: 150, |
| | | type: "tree", |
| | | dicUrl: "/api/blade-system/region/tree", |
| | | props: { |
| | | label: "name", |
| | | value: "id", |
| | | }, |
| | | parent: false, |
| | | cascader: ["gridId"], |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择所属社区", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | |
| | | { |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | |
| | | width: 96, |
| | | label: "所属网格", |
| | | prop: "gridName", |
| | | }, |
| | | { |
| | | label: "手机", |
| | | prop: "phone", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入绑定手机", |
| | | message: "请选择所属网格", |
| | | trigger: "blur", |
| | | },], |
| | | }], |
| | | }, |
| | | |
| | | { |
| | | hide: true, |
| | | label: "所属网格", |
| | | prop: "gridId", |
| | | type: "tree", |
| | | cell: true, |
| | | props: { |
| | | label: "gridName", |
| | | value: "id", |
| | | }, |
| | | dicUrl: |
| | | "/api/blade-grid/grid/getGridList?communityCode={{neiCode}}", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择所属网格", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | |
| | | { |
| | | label: "房屋照片", |
| | | prop: "imageUrls", |
| | | width: 80, |
| | | type: "upload", |
| | | listType: "picture-card", |
| | | dataType: "string", |
| | | multiple: true, |
| | | action: "/api/blade-resource/oss/endpoint/put-file", |
| | | propsHttp: { |
| | | res: "data", |
| | | name: 'name', |
| | | url: "link", |
| | | }, |
| | | span: 24, |
| | | }, |
| | | |
| | | { |
| | | width: 110, |
| | | label: "电话", |
| | | prop: "phone", |
| | | slot: true, |
| | | }, |
| | | { |
| | | label: "幢", |
| | | prop: "building", |
| | | hide: true |
| | | }, |
| | | { |
| | | label: "单元", |
| | | prop: "unit", |
| | | hide: true |
| | | }, |
| | | { |
| | | label: "室", |
| | | prop: "room", |
| | | hide: true |
| | | }, |
| | | { |
| | | label: "楼层", |
| | |
| | | } |
| | | }, |
| | | |
| | | textDispose () { |
| | | return (row, flag, type) => { |
| | | if (row[flag] || row[type] == null) { |
| | | return row[type] |
| | | } else { |
| | | if (type == 'idCard') { |
| | | return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2") |
| | | } else { |
| | | return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2") |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | |
| | | labelDispose () { |
| | | return (list) => { |
| | | return list.map(item => item.labelName).join(',') |
| | |
| | | }) |
| | | }, |
| | | rowSave (row, done, loading) { |
| | | if (row.imageUrls.length > 0) { |
| | | var urls = [] |
| | | var split = row.imageUrls.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.imageUrls = urls.join(",") |
| | | } |
| | | |
| | | add(row).then(() => { |
| | | this.initFlag = false |
| | | this.onLoad(this.page) |
| | |
| | | }) |
| | | }, |
| | | rowUpdate (row, index, done, loading) { |
| | | if (row.imageUrls.length > 0) { |
| | | var urls = [] |
| | | var split = row.imageUrls.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.imageUrls = urls.join(",") |
| | | } |
| | | |
| | | update(row).then(() => { |
| | | this.initFlag = false |
| | | this.onLoad(this.page) |
| | |
| | | id: this.form.id |
| | | }).then(res => { |
| | | this.form = res.data.data |
| | | |
| | | if (this.form.imageUrls) { |
| | | if (this.form.imageUrls.length > 0) { |
| | | var urls = [] |
| | | var names = this.form.imageUrls.split(",") |
| | | names.forEach(name => { |
| | | urls.push(website.minioUrl + name) |
| | | }) |
| | | this.form.imageUrls = urls.join(",") |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | this.initFlag = true |
| | |
| | | onLoad (page, params = {}) { |
| | | this.loading = true |
| | | getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | const data = res.data.data |
| | | const data = { |
| | | ...res.data.data, |
| | | records: res.data.data.records.map(item => { |
| | | if (item.imageUrls) { |
| | | if (item.imageUrls.length > 0) { |
| | | var urls = [] |
| | | var names = item.imageUrls.split(",") |
| | | names.forEach(name => { |
| | | urls.push(website.minioUrl + name) |
| | | }) |
| | | item.imageUrls = urls.join(",") |
| | | } |
| | | } |
| | | |
| | | return { |
| | | ...item, |
| | | 'phoneflag': false, |
| | | } |
| | | }) |
| | | } |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | }, |
| | | showStringDispose (row, type) { |
| | | row[type] = !row[type] |
| | | } |
| | | } |
| | | } |