提交 6cfc7c8e authored 作者: 赵明's avatar 赵明

联调更新

上级 2c731736
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="8">
<a-form-item label="小区名称">
<a-input placeholder="请输入小区名称" v-model="queryParam.communityName"></a-input>
</a-form-item>
</a-col>
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<a-button type="primary" @click="searchQuery">查询</a-button>
<a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<!-- <a-button type="primary" icon="download" @click="handleExportXls('t_property_settled')">导出</a-button> -->
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDels">
<a-icon type="delete"/>
删除关联
</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px">批量操作
<a-icon type="down"/>
</a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i>已选择&nbsp;<a style="font-weight: 600">{{
selectedRowKeys.length
}}</a>&nbsp;&nbsp;
<a style="margin-left: 24px" v-if="selectedRowKeys.length > 0" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="communityCode"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange"
>
<span slot="empowerDate" slot-scope="text, record">
<span>{{ record.empowerBeginDate }}{{ record.empowerEndDate }}</span>
</span>
<span slot="action" slot-scope="text, record">
<a @click="showDeleteConfirm(record)">删除关联</a>
</span>
<!-- 字符串超长截取省略号显示 -->
<span slot="url" slot-scope="text">
<j-ellipsis :value="text" :length="25"/>
</span>
<!-- 字符串超长截取省略号显示-->
<span slot="component" slot-scope="text">
<j-ellipsis :value="text"/>
</span>
</a-table>
</div>
<!-- table区域-end -->
<notice-modal ref="modalForm" @ok="modalFormOk"></notice-modal>
<!-- 删除关联 -->
</a-card>
</template>
<script>
// import { getPropertyListApi, getSystemSubmenu, getSystemSubmenuBatch } from '@/api/api'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import NoticeModal from './modules/NoticeModal'
import {deleteAction} from '@/api/manage'
import {filterDictTextByCache} from '@/components/dict/JDictSelectUtil'
const columns = [
{
title: '小区名称',
dataIndex: 'communityName',
key: 'communityName',
align: 'center'
},
{
title: '所属区域',
dataIndex: 'communityArea',
key: 'communityArea',
align: 'center'
},
{
title: '占地面积(㎡)',
dataIndex: 'coverArea',
key: 'coverArea',
align: 'center'
},
{
title: '总栋数',
dataIndex: 'buildingNum',
key: 'buildingNum',
align: 'center'
},
{
title: '房屋数量',
dataIndex: 'houseNum',
key: 'houseNum',
align: 'center'
},
{
title: '联系人',
dataIndex: 'adminName',
key: 'adminName',
align: 'center'
},
{
title: '联系方式',
dataIndex: 'adminPhone',
key: 'adminPhone',
align: 'center'
},
{
title: '创建时间',
dataIndex: 'updateTime',
key: 'updateTime',
align: 'center'
},
{
title: '操作',
dataIndex: 'action',
scopedSlots: {customRender: 'action'},
align: 'center',
width: 150
}
]
export default {
name: 'PermissionListAsync',
mixins: [JeecgListMixin],
components: {
NoticeModal
},
data() {
return {
// 表头
columns: columns,
deteleId: '',
url: {
list: "/property-central/shop/shopCommunity/getShopCommunity",
delete: '/property-central/shop/shopCommunity/deleteByCommunityCode',
deleteBatch: '/property-central/shop/shopCommunity/deleteBatch'
},
}
},
methods: {
handlePerssion(roleId) {
this.$refs.modalUserRole.show(roleId);
},
showDeleteConfirm(record) {
var that = this;
this.$confirm({
title: '确定是否删除关联小区?',
okText: '删除',
okType: 'danger',
cancelText: '否',
onOk() {
return deleteAction(that.url.delete, {communityCode: record.communityCode}).then((res) => {
if (res.success) {
that.$message.success(res.message)
that.searchQuery()
}
})
},
onCancel() {
console.log('Cancel');
},
});
},
batchDels() {
if (this.selectedRowKeys.length <= 0) {
this.$message.warning('请选择一条记录!');
return;
} else {
var ids = "";
for (var a = 0; a < this.selectedRowKeys.length; a++) {
ids += this.selectedRowKeys[a] + ",";
}
var that = this;
this.$confirm({
title: "确认删除",
content: "是否删除选中数据?",
onOk: function () {
that.loading = true;
deleteAction(that.url.deleteBatch, {communityCodes: ids}).then((res) => {
if (res.success) {
//重新计算分页问题
that.reCalculatePage(that.selectedRowKeys.length)
that.$message.success(res.message);
that.loadData();
that.onClearSelected();
} else {
that.$message.warning(res.message);
}
}).finally(() => {
that.loading = false;
});
}
});
}
},
handleAdd() {
this.$refs.modalForm.add()
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
差异被折叠。
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<a-button class="bbtn" @click="updateCurrentDepart">小区查找</a-button>
<property-settled-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></property-settled-form>
<login-switch-house ref="loginSelect" :closable="true" title="小区查找" @success="loginSelectOk" ></login-switch-house>
</j-modal>
</template>
<script>
import PropertySettledForm from './NoticeForm'
import { httpAction, getAction } from '@/api/manage'
import LoginSwitchHouse from '@/components/tools/LoginSwitchHouse'
export default {
name: 'PropertySettledModal',
components: {
PropertySettledForm,
LoginSwitchHouse
},
data () {
return {
title:'',
width: '70%',
visible: false,
disableSubmit: true
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
async updateCurrentDepart(){
let { result } = await getAction('/property-company/community/companyCommunity/getList',{ })
this.$refs.loginSelect.show(result)
},
loginSelectOk(res) {
this.$refs.realForm.edit(res);
this.disableSubmit=false
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less">
.bbtn{
position: absolute;
right: 120px;
top: 12px;
z-index: 333;
}
</style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论