|
@@ -27,6 +27,10 @@
|
|
|
@click="handleDelete">删 除
|
|
@click="handleDelete">删 除
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
+ <template slot="residentialId" slot-scope="scope">{{scope.row.residentialName}}</template>
|
|
|
|
|
+ <template slot="residentialIdForm" slot-scope="scope">
|
|
|
|
|
+ <select-dialog-residential :disabled="residentialDisabled" :id="form.residentialId" :name="form.residentialName" :callback="selectCallback"></select-dialog-residential>
|
|
|
|
|
+ </template>
|
|
|
</avue-crud>
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
</basic-container>
|
|
|
</template>
|
|
</template>
|
|
@@ -35,8 +39,10 @@
|
|
|
import {getList, getDetail, add, update, remove} from "@/api/estate/parkingspace";
|
|
import {getList, getDetail, add, update, remove} from "@/api/estate/parkingspace";
|
|
|
import {getList as getResidentialList} from "@/api/community/residential";
|
|
import {getList as getResidentialList} from "@/api/community/residential";
|
|
|
import {mapGetters} from "vuex";
|
|
import {mapGetters} from "vuex";
|
|
|
|
|
+ import SelectDialogResidential from "../../components/select-dialog/select-dialog-residential";
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
|
|
+ components: {SelectDialogResidential},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
form: {},
|
|
form: {},
|
|
@@ -48,6 +54,7 @@
|
|
|
total: 0
|
|
total: 0
|
|
|
},
|
|
},
|
|
|
selectionList: [],
|
|
selectionList: [],
|
|
|
|
|
+ residentialDisabled: false,
|
|
|
option: {
|
|
option: {
|
|
|
height:'auto',
|
|
height:'auto',
|
|
|
calcHeight: 30,
|
|
calcHeight: 30,
|
|
@@ -134,38 +141,28 @@
|
|
|
trigger: "blur"
|
|
trigger: "blur"
|
|
|
}],
|
|
}],
|
|
|
},
|
|
},
|
|
|
- {
|
|
|
|
|
- label: "所属小区",
|
|
|
|
|
- prop: "residentialName",
|
|
|
|
|
- editDisplay: false,
|
|
|
|
|
- addDisplay: false,
|
|
|
|
|
- viewDisplay: false,
|
|
|
|
|
- },
|
|
|
|
|
{
|
|
{
|
|
|
label: "所属小区",
|
|
label: "所属小区",
|
|
|
prop: "residentialId",
|
|
prop: "residentialId",
|
|
|
type: "select",
|
|
type: "select",
|
|
|
- search: true,
|
|
|
|
|
- searchFilterable: true,
|
|
|
|
|
- remote: true,
|
|
|
|
|
- cascaderItem: ['parkingLotId'],
|
|
|
|
|
- // dicUrl: "/api/cyzh-community/residential/list?agencyId={{key}}",
|
|
|
|
|
- dicUrl: "/api/cyzh-community/residential/select?size=500&name={{key}}",
|
|
|
|
|
- // dicFormatter:(res)=>{
|
|
|
|
|
- // return res.data.records;//返回字典的层级结构
|
|
|
|
|
- // },
|
|
|
|
|
|
|
+ slot:true,
|
|
|
|
|
+ formslot:true,
|
|
|
|
|
+ // dicUrl: "/api/cyzh-community/residential/list?agencyId={{key}}&&size=9999",
|
|
|
|
|
+ dicUrl: "/api/cyzh-community/residential/list?size=500",
|
|
|
|
|
+ dicFormatter:(res)=>{
|
|
|
|
|
+ return res.data.records;//返回字典的层级结构
|
|
|
|
|
+ },
|
|
|
|
|
+ // dicFlag: false,
|
|
|
filterable: true,
|
|
filterable: true,
|
|
|
props: {
|
|
props: {
|
|
|
label: "name",
|
|
label: "name",
|
|
|
value: "id"
|
|
value: "id"
|
|
|
},
|
|
},
|
|
|
rules: [{
|
|
rules: [{
|
|
|
- required: true,
|
|
|
|
|
|
|
+ required: false,
|
|
|
message: "请选择所属小区",
|
|
message: "请选择所属小区",
|
|
|
trigger: "blur"
|
|
trigger: "blur"
|
|
|
- }],
|
|
|
|
|
- hide: true,
|
|
|
|
|
- // viewDisplay: false
|
|
|
|
|
|
|
+ }]
|
|
|
},
|
|
},
|
|
|
// {
|
|
// {
|
|
|
// label: "机构路径",
|
|
// label: "机构路径",
|
|
@@ -183,7 +180,7 @@
|
|
|
search: true,
|
|
search: true,
|
|
|
// dicFlag: false,
|
|
// dicFlag: false,
|
|
|
// remote: true,
|
|
// remote: true,
|
|
|
- dicUrl: "/api/cyzh-estate/parkinglot/list?size=100&residentialId={{key}}",
|
|
|
|
|
|
|
+ dicUrl: "/api/cyzh-estate/parkinglot/list",
|
|
|
props: {
|
|
props: {
|
|
|
label: 'parkName',
|
|
label: 'parkName',
|
|
|
value: 'id'
|
|
value: 'id'
|
|
@@ -249,14 +246,21 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
|
- "form.residentialId"() {
|
|
|
|
|
|
|
+ /*"form.residentialId"() {
|
|
|
getResidentialList(1, 10, {id: this.form.residentialId}).then(res => {
|
|
getResidentialList(1, 10, {id: this.form.residentialId}).then(res => {
|
|
|
this.form.residentialName = res.data.data.records[0].name;
|
|
this.form.residentialName = res.data.data.records[0].name;
|
|
|
JSON.stringify()
|
|
JSON.stringify()
|
|
|
})
|
|
})
|
|
|
- }
|
|
|
|
|
|
|
+ }*/
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ selectCallback(row){
|
|
|
|
|
+ this.form.residentialId = row.id;
|
|
|
|
|
+ this.form.residentialName = row.name;
|
|
|
|
|
+ if (this.option.column[5].prop == 'parkingLotId' && this.option.column[5].dicUrl.indexOf('residentialId') == -1){
|
|
|
|
|
+ this.option.column[5].dicUrl += '?residentialId=' + this.form.residentialId + '&size=100';
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
rowSave(row, done, loading) {
|
|
rowSave(row, done, loading) {
|
|
|
add(row).then(() => {
|
|
add(row).then(() => {
|
|
|
this.onLoad(this.page);
|
|
this.onLoad(this.page);
|
|
@@ -323,7 +327,9 @@
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
beforeOpen(done, type) {
|
|
beforeOpen(done, type) {
|
|
|
|
|
+ this.residentialDisabled = false;
|
|
|
if (["edit", "view"].includes(type)) {
|
|
if (["edit", "view"].includes(type)) {
|
|
|
|
|
+ this.residentialDisabled = type == "view";
|
|
|
getDetail(this.form.id).then(res => {
|
|
getDetail(this.form.id).then(res => {
|
|
|
this.form = res.data.data;
|
|
this.form = res.data.data;
|
|
|
});
|
|
});
|