| | |
| | | @click="handleDelete">删 除 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{row, size}" slot="principalPhone"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, 'principalPhoneflag')" |
| | | v-text="textDispose(row, 'principalPhoneflag', 'principalPhone')"> |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </template> |
| | |
| | | remove, |
| | | update, |
| | | add, |
| | | getPropertyCompanyDistrict |
| | | getPropertyCompanyDistrict, |
| | | getPropertyCompanyList |
| | | } from "@/api/property/propertyCompanyDistrict" |
| | | import { |
| | | mapGetters |
| | |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 210, |
| | | |
| | | dialogMenuPosition: 'center', |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 1150, |
| | |
| | | prop: "districtName", |
| | | search: true, |
| | | searchSpan: 4, |
| | | searchLabelWidth: 76, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入小区名称", |
| | |
| | | prop: "districtId", |
| | | search: false, |
| | | type: 'tree', |
| | | dicUrl: `/api/blade-district/district/getDistrictTree`, |
| | | dicUrl: `/api/blade-district/district/getDistrictTree?filterFlag=0`, |
| | | props: { |
| | | label: "name", |
| | | value: "id" |
| | |
| | | }, |
| | | |
| | | { |
| | | disabled: true, |
| | | hide: true, |
| | | label: '物业公司', |
| | | prop: 'deptId', |
| | | prop: 'propertyCompanyId', |
| | | type: 'tree', |
| | | span: 12, |
| | | dicUrl: `/api/blade-propertyCompany/propertyCompany/getPropertyCompanyList`, |
| | | dicData: [], |
| | | cascader: ['userId', 'principal'], |
| | | nodeClick: (data, node, nodeComp) => { |
| | | // this.$message.success(JSON.stringify(data)) |
| | | }, |
| | | props: { |
| | | label: "name", |
| | | value: "deptId" |
| | | value: "id" |
| | | }, |
| | | rules: [{ |
| | | required: true, |
| | |
| | | { |
| | | width: 110, |
| | | label: '项目经理', |
| | | prop: 'principal', |
| | | prop: 'principalName', |
| | | span: 12, |
| | | type: "tree", |
| | | multiple: true, |
| | | remote: true, |
| | | // multiple: true, |
| | | // remote: true, |
| | | props: { |
| | | label: 'name', |
| | | value: 'id' |
| | | }, |
| | | // dicData: [], |
| | | hide: true, |
| | | dicUrl: `/api/blade-system/user/getUserInfoByDeptId?deptId={{deptId}}`, |
| | | // hide: true, |
| | | // dicUrl: `/api/blade-system/user/getUserInfoByPropertyCompanyId?propertyCompanyId={{propertyCompanyId}}&roleId=1747504028253229058`, |
| | | change: ({ |
| | | value, |
| | | column, |
| | | item, |
| | | dic |
| | | }) => { |
| | | this.form.principalPhone = '' |
| | | |
| | | if (value) { |
| | | this.form.principalPhone = item.phone |
| | | } |
| | | }, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入项目经理", |
| | |
| | | trigger: 'blur' |
| | | } |
| | | ], |
| | | slot: true |
| | | }, |
| | | { |
| | | label: "物业成员", |
| | |
| | | }, |
| | | hide: true, |
| | | // dicData: [], |
| | | dicUrl: `/api/blade-system/user/getUserInfoByDeptId?deptId={{deptId}}`, |
| | | dicUrl: `/api/blade-system/user/getUserInfoByPropertyCompanyId?propertyCompanyId={{propertyCompanyId}}&roleId=1750763073214984194`, |
| | | }, |
| | | { |
| | | width: 100, |
| | |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | label: '电子合同', |
| | | type: 'upload', |
| | | listType: 'picture-img', |
| | | propsHttp: { |
| | | res: 'data', |
| | | url: 'link', |
| | | }, |
| | | canvasOption: { |
| | | text: ' ', |
| | | ratio: 0.1 |
| | | }, |
| | | action: '/api/blade-resource/oss/endpoint/put-file', |
| | | tip: '只能上传jpg/png图片,且不超过500kb', |
| | | span: 12, |
| | | row: true, |
| | | prop: 'electronicContract' |
| | | } |
| | | ], |
| | | }, |
| | | data: [], |
| | | curRoleDetails: {} |
| | | } |
| | | }, |
| | | watch: {}, |
| | | |
| | | computed: { |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | permissionList() { |
| | |
| | | }) |
| | | return ids.join(",") |
| | | }, |
| | | |
| | | textDispose() { |
| | | return (row, flag, type) => { |
| | | if (row[flag] || row[type] == null) { |
| | | return row[type] |
| | | } else { |
| | | if (type == 'principalIdCard') { |
| | | return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2") |
| | | } else { |
| | | return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2") |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | showStringDispose(row, type) { |
| | | row[type] = !row[type] |
| | | }, |
| | | |
| | | initData() { |
| | | getPropertyCompanyList().then(res => { |
| | | const column = this.findObject(this.option.column, "propertyCompanyId") |
| | | column.dicData = res.data.data |
| | | |
| | | this.form.propertyCompanyId = res.data.data[0].id |
| | | }) |
| | | }, |
| | | |
| | | rowSave(row, done, loading) { |
| | | row.userId = func.join(row.userId) |
| | | add(row).then( |
| | |
| | | } |
| | | ) |
| | | }, |
| | | |
| | | rowUpdate(row, index, done, loading) { |
| | | row.userId = func.join(row.userId) |
| | | update(row).then( |
| | |
| | | }) |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["add", "edit"].includes(type)) { |
| | | this.initData() |
| | | } |
| | | |
| | | if (["edit", "view"].includes(type)) { |
| | | getPropertyCompanyDistrict(this.form.id).then((res) => { |
| | | this.form = res.data.data |
| | |
| | | } |
| | | this.loading = true |
| | | getList(page.currentPage, page.pageSize, values).then((res) => { |
| | | const data = res.data.data |
| | | const data = { |
| | | ...res.data.data, |
| | | records: res.data.data.records.map(item => { |
| | | return { |
| | | ...item, |
| | | 'principalPhoneflag': false |
| | | } |
| | | }) |
| | | } |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.loading = false |