|
|
|
|
@ -25,10 +25,12 @@
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button @click="getDataList()">查询</el-button>
|
|
|
|
|
<el-button @click="resetForm()">重置</el-button>
|
|
|
|
|
<el-button v-hasPermi="['autogencode:pmtenant:save']" type="primary" @click="addOrUpdateHandle()">新增数据</el-button>
|
|
|
|
|
<el-button v-hasPermi="['autogencode:pmtenant:delete']" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div class="option-bth">
|
|
|
|
|
<el-button v-hasPermi="['autogencode:pmtenant:save']" plain size="small" type="primary" @click="addOrUpdateHandle()">新增租户</el-button>
|
|
|
|
|
<!-- <el-button v-hasPermi="['autogencode:pmtenant:delete']" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button> -->
|
|
|
|
|
</div>
|
|
|
|
|
<el-table
|
|
|
|
|
:data="dataList"
|
|
|
|
|
border
|
|
|
|
|
@ -142,12 +144,14 @@
|
|
|
|
|
layout="total, sizes, prev, pager, next, jumper">
|
|
|
|
|
</el-pagination>
|
|
|
|
|
<!-- 表单弹窗, 新增数据和修改数据 -->
|
|
|
|
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
|
|
|
|
<!-- <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> -->
|
|
|
|
|
<tenant-add-and-update ref="tenantAddOrUpdate" :ownerId="dataForm.id" @refreshDataList="getDataList"></tenant-add-and-update>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import AddOrUpdate from './pmtenant-add-and-update'
|
|
|
|
|
// import AddOrUpdate from './pmtenant-add-and-update'
|
|
|
|
|
import TenantAddAndUpdate from '@/views/pm/pmowner/tenant-add-and-update'
|
|
|
|
|
import * as api from '@/api/pmtenant.js'
|
|
|
|
|
export default {
|
|
|
|
|
props: {
|
|
|
|
|
@ -185,7 +189,8 @@
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
|
AddOrUpdate
|
|
|
|
|
// AddOrUpdate,
|
|
|
|
|
TenantAddAndUpdate
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
// 监听业主ID变化
|
|
|
|
|
@ -261,10 +266,9 @@
|
|
|
|
|
},
|
|
|
|
|
// 新增 / 修改
|
|
|
|
|
addOrUpdateHandle (id) {
|
|
|
|
|
this.addOrUpdateVisible = true
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.$refs.addOrUpdate.init(id, this.dataForm.ownerId)
|
|
|
|
|
})
|
|
|
|
|
if (this.$refs.tenantAddOrUpdate) {
|
|
|
|
|
this.$refs.tenantAddOrUpdate.init(id, this.dataForm.id)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 删除处理(支持单个删除和批量删除)
|
|
|
|
|
deleteHandle (id) {
|
|
|
|
|
@ -298,3 +302,11 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<style scoped>
|
|
|
|
|
.option-bth {
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
}
|
|
|
|
|
.divBox {
|
|
|
|
|
background-color: #EEEEEE;
|
|
|
|
|
}
|
|
|
|
|
</style>
|