字典列表新增
This commit is contained in:
+1
-1
@@ -57,7 +57,7 @@ public class SysCategoryController {
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("sys:category:list")
|
||||
// @RequiresPermissions("sys:category:list")
|
||||
@GetMapping(value = "/rootList")
|
||||
public Result<IPage<SysCategory>> queryPageList(SysCategory sysCategory,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
class="doc-table-drawer"
|
||||
title="调取已入库文件"
|
||||
placement="right"
|
||||
v-if="visible"
|
||||
:visible="visible"
|
||||
:after-visible-change="afterVisibleChange"
|
||||
@close="onClose"
|
||||
@@ -12,46 +11,54 @@
|
||||
>
|
||||
<div class="doc-table-content">
|
||||
<div class="doc-header">
|
||||
<a-form layout="inline" v-model="queryParams" @keyup.enter.native="searchQuery(queryParams)">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="12">
|
||||
<a-form-item :label="'编号'">
|
||||
<j-input :placeholder="'请输入编号'" v-model="queryParams.serialNumber"></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="12">
|
||||
<a-form-item :label="'标题'">
|
||||
<j-input :placeholder="'请输入标题'" v-model="queryParams.title"></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="searchQuery" icon="search">{{$t('query')}}</a-button>
|
||||
<a-button @click="searchReset" icon="reload" style="margin-left: 8px">清空</a-button>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
<search :url="url" :flag="'condition'"></search>
|
||||
<!-- <a-form layout="inline" v-model="queryParams" @keyup.enter.native="searchQuery(queryParams)">-->
|
||||
<!-- <a-row :gutter="24">-->
|
||||
<!-- <a-col :md="6" :sm="12">-->
|
||||
<!-- <a-form-item :label="'编号'">-->
|
||||
<!-- <j-input :placeholder="'请输入编号'" v-model="queryParams.serialNumber"></j-input>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- <a-col :md="6" :sm="12">-->
|
||||
<!-- <a-form-item :label="'标题'">-->
|
||||
<!-- <j-input :placeholder="'请输入标题'" v-model="queryParams.title"></j-input>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- <a-col :md="6" :sm="8">-->
|
||||
<!-- <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">-->
|
||||
<!-- <a-button type="primary" @click="searchQuery" icon="search">{{$t('query')}}</a-button>-->
|
||||
<!-- <a-button @click="searchReset" icon="reload" style="margin-left: 8px">清空</a-button>-->
|
||||
<!-- </span>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- </a-row>-->
|
||||
<!-- </a-form>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="doc-table-detail">
|
||||
<a-table bordered :data-source="tableSource" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="tag-con-table" :pagination="false" >
|
||||
<span slot="num" slot-scope="text,records,index">
|
||||
{{ (queryParams.pageNo-1)*queryParams.pageSize+Number(index)+1 }}
|
||||
</span>
|
||||
</a-table>
|
||||
<div class="page" v-if="tableSource.length > 0">
|
||||
<a-pagination
|
||||
:show-total="total => `共 ${total} 条`"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="queryParams.pageSize"
|
||||
:total="total"
|
||||
@change="onChangePage"
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
</div>
|
||||
<tableData
|
||||
:flag="'header'"
|
||||
:url="url"
|
||||
:showAction="false"
|
||||
@onSelectChange="onSelectChange"
|
||||
/>
|
||||
</div>
|
||||
<!-- <a-table bordered :data-source="tableSource" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="tag-con-table" :pagination="false" >-->
|
||||
<!-- <span slot="num" slot-scope="text,records,index">-->
|
||||
<!-- {{ (queryParams.pageNo-1)*queryParams.pageSize+Number(index)+1 }}-->
|
||||
<!-- </span>-->
|
||||
<!-- </a-table>-->
|
||||
<!-- <div class="page" v-if="tableSource.length > 0">-->
|
||||
<!-- <a-pagination-->
|
||||
<!-- :show-total="total => `共 ${total} 条`"-->
|
||||
<!-- show-quick-jumper-->
|
||||
<!-- show-size-changer-->
|
||||
<!-- :page-size.sync="queryParams.pageSize"-->
|
||||
<!-- :total="total"-->
|
||||
<!-- @change="onChangePage"-->
|
||||
<!-- @showSizeChange="SizeChange"-->
|
||||
<!-- />-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="doc-table-footer">
|
||||
<a-button type="primary" class="btn-export" @click="tableExport">导入</a-button>
|
||||
<a-button type="primary" @click="onClose">取消</a-button>
|
||||
@@ -62,8 +69,15 @@
|
||||
|
||||
<script>
|
||||
import { getAction, postAction, deleteAction } from '@/api/manage'
|
||||
import search from '@/components/search/index'
|
||||
import tableData from '@/components/tableDate/index'
|
||||
export default {
|
||||
name: 'docTable',
|
||||
components:{
|
||||
search,
|
||||
tableData,
|
||||
|
||||
},
|
||||
props:{
|
||||
drawVisible:Boolean,
|
||||
drawTableSorce:Array,
|
||||
@@ -79,6 +93,7 @@
|
||||
title:''
|
||||
},
|
||||
total:0,
|
||||
OperationList:[],
|
||||
ipagination: {
|
||||
defaultPageSize: 10,
|
||||
defaultCurrent: 1,
|
||||
@@ -137,11 +152,18 @@
|
||||
ellipsis: true,
|
||||
},
|
||||
],
|
||||
url:{
|
||||
tableHeader: 'document/bussDocumentLibraryEO/getHeaderOrConditionForOcr', //表格头部字段
|
||||
seachList: 'document/bussDocumentLibraryEO/getHeaderOrConditionForOcr', //搜索字段
|
||||
tableList: 'document/bussDocumentLibraryEO/ocrPageInfo', //表格数据
|
||||
// getAddForm: 'ocr/ocrRecord/getForm', // 表单的字段
|
||||
// addInfo: 'ocr/OcrRestful/addOcrRecord', //新增
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.visible=this.drawVisible
|
||||
this.loadData()
|
||||
// this.loadData()
|
||||
// this.tableSource= [...this.drawTableSorce]
|
||||
},
|
||||
methods: {
|
||||
@@ -172,6 +194,7 @@
|
||||
|
||||
},
|
||||
onSelectChange(rowKeys){
|
||||
|
||||
console.log('key',rowKeys)
|
||||
},
|
||||
//点击页数
|
||||
@@ -212,4 +235,14 @@
|
||||
margin-right: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<style lang="less">
|
||||
|
||||
.doc-header{
|
||||
.table-page-search-submitButtons{
|
||||
float: none!important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -30,11 +30,11 @@
|
||||
:wrapper-col="wrapperCol"
|
||||
|
||||
>
|
||||
<a-form-model-item label="名称" prop="dictName">
|
||||
<a-input v-model="form.dictName" placeholder="请输入名称" />
|
||||
<a-form-model-item label="名称" prop="itemText">
|
||||
<a-input v-model="form.itemText" placeholder="请输入名称" />
|
||||
</a-form-model-item>
|
||||
<a-form-model-item label="英文名称" prop="dictEnName">
|
||||
<a-input v-model="form.dictEnName" placeholder="请输入英文名称" />
|
||||
<a-form-model-item label="英文名称" prop="itemValue">
|
||||
<a-input v-model="form.itemValue" placeholder="请输入英文名称" />
|
||||
</a-form-model-item>
|
||||
<a-form-model-item label="父级名称" prop="dictCode" v-if="parentVisible">
|
||||
<a-tree-select
|
||||
@@ -87,14 +87,16 @@
|
||||
form:{},
|
||||
newVisible:false,
|
||||
rules:{
|
||||
dictName:[
|
||||
{ required: true, message: '请输入展示区域', trigger: 'blur' },
|
||||
itemText:[
|
||||
{ required: true, message: '请输入名称', trigger: 'blur' },
|
||||
{ min:1, max: 30, message: '长度在 1 - 30字符', trigger: 'blur' },
|
||||
],
|
||||
dictEnName:[
|
||||
itemValue:[
|
||||
{ required: true, message: '请输入英文名称', trigger: 'blur' },
|
||||
{ min:1, max: 100, message: '长度在 1 - 100字符', trigger: 'blur' },
|
||||
],
|
||||
description:[
|
||||
{ required: true, message: '请输入描述', trigger: 'blur' },
|
||||
{ min:1, max: 300, message: '长度在 1 - 300字符', trigger: 'blur' },
|
||||
]
|
||||
},
|
||||
@@ -154,24 +156,45 @@
|
||||
},
|
||||
mounted() {
|
||||
this.loadData()
|
||||
this.getParents()
|
||||
},
|
||||
methods:{
|
||||
//获取父级列表
|
||||
getParents(){
|
||||
let params={
|
||||
sysDictId:this.record.id
|
||||
}
|
||||
getAction(`sys/dict/loadDictItem`,params).then(res=>{
|
||||
if(res.success){
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
//获取列表数据
|
||||
loadData(){
|
||||
this.dataFlag=false
|
||||
let params={
|
||||
...this.queryParams,
|
||||
dictId:this.record.id
|
||||
}
|
||||
getAction(`sys/dictItem/page`,params).then(res=>{
|
||||
if(res.success){
|
||||
this.total=res.result.total
|
||||
if(this.dictVal=='list'){
|
||||
if(this.dictVal=='list'){
|
||||
let params={
|
||||
...this.queryParams,
|
||||
dictId:this.record.id
|
||||
}
|
||||
|
||||
getAction(`sys/dictItem/page`,params).then(res=>{
|
||||
if(res.success){
|
||||
this.total=res.result.total
|
||||
this.tableData=[...res.result.records]
|
||||
this.dataFlag=true
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
}else if(this.dictVal=='tree'){
|
||||
getAction(`sys/category/rootList`,{
|
||||
sysDictId:this.record.id
|
||||
}).then(res=>{
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
//搜索
|
||||
search(){
|
||||
@@ -200,19 +223,26 @@
|
||||
hideModal(){
|
||||
let params={
|
||||
...this.form,
|
||||
|
||||
dictId:this.record.id
|
||||
}
|
||||
if(this.isEdit){
|
||||
params.dictId=this.record.id
|
||||
putAction(``,params).then(res=>{
|
||||
putAction(`sys/dictItem/edit`,params).then(res=>{
|
||||
if(res.success){
|
||||
this.$message.success(res.message)
|
||||
this.loadData()
|
||||
this.newVisible=false
|
||||
}else{
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}else{
|
||||
postAction(`sys/dictItem/add`,params).then(res=>{
|
||||
if(res.success){
|
||||
this.$message.success(res.message)
|
||||
this.loadData()
|
||||
this.newVisible=false
|
||||
}else{
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -223,6 +253,7 @@
|
||||
},
|
||||
//列表编辑
|
||||
editDict(rec,val){
|
||||
this.isEdit=true
|
||||
this.form={...rec}
|
||||
this.newVisible=val
|
||||
this.parentVisible=false
|
||||
|
||||
Reference in New Issue
Block a user