展示区域列表
This commit is contained in:
@@ -1,7 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="diolag-area">
|
<div class="diolag-area">
|
||||||
<a-button type="primary" @click="showModal">新增</a-button>
|
<div class="table-operator">
|
||||||
<a-modal class="area-module" v-model="newVisible" title="新增" ok-text="保存" cancel-text="取消" @ok="hideModal" @cancel="cancelModel" v-if="newVisible">
|
<div class="operator-text" @click="showModal">
|
||||||
|
<a-icon type="plus" />
|
||||||
|
{{$t('add')}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- <a-button type="primary" @click="showModal">新增</a-button>-->
|
||||||
|
<a-modal class="area-module" v-model="newVisible" :title="$t('add')" :ok-text="$t('preservation')" :cancel-text="$t('cancel')" @ok="hideModal" @cancel="cancelModel" v-if="newVisible">
|
||||||
<a-form-model
|
<a-form-model
|
||||||
class="tag-module"
|
class="tag-module"
|
||||||
ref="ruleForm"
|
ref="ruleForm"
|
||||||
@@ -53,12 +59,11 @@
|
|||||||
<a-table
|
<a-table
|
||||||
class="table-area"
|
class="table-area"
|
||||||
ref="table"
|
ref="table"
|
||||||
bordered
|
|
||||||
size="middle"
|
size="middle"
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:dataSource="areaTable"
|
:dataSource="areaTable"
|
||||||
:pagination="ipagination"
|
:pagination="false"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||||
@change="handleTableChange">
|
@change="handleTableChange">
|
||||||
@@ -74,8 +79,20 @@
|
|||||||
>
|
>
|
||||||
<a style="color:red" href="javascript:;">删除</a>
|
<a style="color:red" href="javascript:;">删除</a>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
</span>
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
|
<div class="page" v-if="areaTable.length > 0">
|
||||||
|
<a-pagination
|
||||||
|
:show-total="total => `共 ${total} 条`"
|
||||||
|
show-quick-jumper
|
||||||
|
show-size-changer
|
||||||
|
:current="queryParams.pageNo"
|
||||||
|
:page-size.sync="queryParams.pageSize"
|
||||||
|
:total="total"
|
||||||
|
@change="onChangePage"
|
||||||
|
@showSizeChange="SizeChange"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -88,6 +105,11 @@
|
|||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
|
queryParams:{
|
||||||
|
pageNo:1,
|
||||||
|
pageSize:10
|
||||||
|
},
|
||||||
|
total:0,
|
||||||
selectedRowKeys: [],
|
selectedRowKeys: [],
|
||||||
loading: false,
|
loading: false,
|
||||||
ipagination:true,
|
ipagination:true,
|
||||||
@@ -179,9 +201,7 @@
|
|||||||
if(this.form.id){
|
if(this.form.id){
|
||||||
putAction(`tag/onlCgformArea/edit`,this.form).then((res)=>{
|
putAction(`tag/onlCgformArea/edit`,this.form).then((res)=>{
|
||||||
if(res.success){
|
if(res.success){
|
||||||
this.$notification.success({
|
this.$message.success(res.result);
|
||||||
message: res.result,
|
|
||||||
});
|
|
||||||
this.$emit('updateOk',res.result)
|
this.$emit('updateOk',res.result)
|
||||||
this.form={
|
this.form={
|
||||||
isModel:'',
|
isModel:'',
|
||||||
@@ -195,9 +215,7 @@
|
|||||||
//新增
|
//新增
|
||||||
postAction(`/tag/onlCgformArea/add`,this.form).then(res=>{
|
postAction(`/tag/onlCgformArea/add`,this.form).then(res=>{
|
||||||
if(res.success){
|
if(res.success){
|
||||||
this.$notification.success({
|
this.$message.success( res.result,);
|
||||||
message: res.result,
|
|
||||||
});
|
|
||||||
this.$emit('submitOk',res.result)
|
this.$emit('submitOk',res.result)
|
||||||
this.form={
|
this.form={
|
||||||
isModel:'',
|
isModel:'',
|
||||||
@@ -248,6 +266,16 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
//点击页数
|
||||||
|
onChangePage(page,pageSize){
|
||||||
|
this.queryParams.pageNo = page
|
||||||
|
this.$emit('Ok')
|
||||||
|
},
|
||||||
|
//一页显示条数
|
||||||
|
SizeChange(page,pageSize){
|
||||||
|
this.queryParams.pageSize = pageSize
|
||||||
|
this.$emit('Ok')
|
||||||
|
},
|
||||||
//正则替换小数点
|
//正则替换小数点
|
||||||
limitNumber(value) {
|
limitNumber(value) {
|
||||||
if (typeof value === 'string') {
|
if (typeof value === 'string') {
|
||||||
@@ -263,6 +291,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
@import '~@assets/less/common.less';
|
||||||
.diolag-area{
|
.diolag-area{
|
||||||
.table-area{
|
.table-area{
|
||||||
margin: 20px 0;
|
margin: 20px 0;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="list-table">
|
<div class="list-table">
|
||||||
<a-table bordered :data-source="tableData" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :pagination="false" class="tag-con-table">
|
<a-table :data-source="tableData" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :pagination="false" class="tag-con-table">
|
||||||
|
|
||||||
<template slot="action" slot-scope="text, record">
|
<template slot="action" slot-scope="text, record">
|
||||||
<a class="action-edit" href="javascript:;" @click="actionEdit(record)">编辑</a>
|
<a class="action-edit" href="javascript:;" @click="actionEdit(record)">编辑</a>
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
<div class="tree-table">
|
<div class="tree-table">
|
||||||
<div class="tree-table-content">
|
<div class="tree-table-content">
|
||||||
<a-table
|
<a-table
|
||||||
bordered
|
|
||||||
class="tree-table-con"
|
class="tree-table-con"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:data-source="tabData"
|
:data-source="tabData"
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
<new-drawer v-if="drawerVisible&&editFlag" :drawerVisible="drawerVisible" :isTagContent="isTagContent" :editData="editData" :editId="editId" :submitEdit="submitEdit" @closeTag="closeTag" ></new-drawer>
|
<new-drawer v-if="drawerVisible&&editFlag" :drawerVisible="drawerVisible" :isTagContent="isTagContent" :editData="editData" :editId="editId" :submitEdit="submitEdit" @closeTag="closeTag" ></new-drawer>
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
<a-modal class="show-area" v-model="areaVisible" :title="$t('ExhibitionAreaManagement')" :footer="null" @cancel="hideModal">
|
<a-modal class="show-area" v-model="areaVisible" :title="$t('ExhibitionAreaManagement')" :footer="null" @cancel="hideModal">
|
||||||
<area-manage v-if="areaVisible" @diaHide="diaHide" :areaTable="areaTable" @submitOk="submitOk" @deleteOk="deleteOk" @updateOk="updateOk"></area-manage>
|
<area-manage v-if="areaVisible" @diaHide="diaHide" :total="areaTotal" :areaTable="areaTable" @submitOk="submitOk" @deleteOk="deleteOk" @updateOk="updateOk"></area-manage>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
<div class="tag-doc-tab">
|
<div class="tag-doc-tab">
|
||||||
<a-spin :spinning="spinning" tip="Loading...">
|
<a-spin :spinning="spinning" tip="Loading...">
|
||||||
@@ -203,6 +203,7 @@
|
|||||||
],
|
],
|
||||||
areaVisible:false,
|
areaVisible:false,
|
||||||
areaTable:[],
|
areaTable:[],
|
||||||
|
areaTotal:0,
|
||||||
drawerVisible:false,
|
drawerVisible:false,
|
||||||
value:1,
|
value:1,
|
||||||
editId:'',
|
editId:'',
|
||||||
@@ -240,6 +241,7 @@
|
|||||||
getAction(`/tag/onlCgformArea/list`,{}).then(res=>{
|
getAction(`/tag/onlCgformArea/list`,{}).then(res=>{
|
||||||
if(res.success){
|
if(res.success){
|
||||||
this.areaTable=res.result
|
this.areaTable=res.result
|
||||||
|
this.areaTotal=res.total
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -403,6 +405,14 @@
|
|||||||
width: 800px!important;
|
width: 800px!important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.diolag-area{
|
||||||
|
.table-operator{
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
.page{
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user