fix 1、增加文本名称检索

2、列表增加更新时间
3、去掉删除功能
This commit is contained in:
赵霄
2023-09-20 15:05:11 +08:00
parent 147c34bcd8
commit 14a8c6b887
3 changed files with 46 additions and 13 deletions
+39 -8
View File
@@ -1,5 +1,19 @@
<template>
<div class="page">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<!--标准号/标准名称-->
<a-col :md="6" :sm="12">
<a-form-item label="文档名称">
<a-input placeholder="请输入文档名称" v-model="queryParam.fileName"></a-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="8">
<a-button type="primary" @click="searchQuery" icon="search" class="search-btn">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" ghost class="search-btn">重置</a-button>
</a-col>
</a-row>
</a-form>
<a-button class="operate-btn" type="primary" @click="handleAdd">新增</a-button>
<a-table
bordered
@@ -18,7 +32,7 @@
<template slot="operation" slot-scope="text, record">
<a class="table-operate-btn" @click="handleEdit(record)">编辑</a>
<a class="table-operate-btn" @click="handleDelete(record.id)">删除</a>
<!--<a class="table-operate-btn" @click="handleDelete(record.id)">删除</a>-->
</template>
</a-table>
@@ -50,14 +64,12 @@ export default {
total: 0
},
columns: [
// 项目来源
{
dataIndex: 'fileName',
title: '文档名称',
align: 'center',
scopedSlots: { customRender: 'text' }
},
// 项目名称
{
dataIndex: 'createTime',
title: '创建时间',
@@ -65,7 +77,13 @@ export default {
align: 'center',
scopedSlots: { customRender: 'text' }
},
// 操作
{
dataIndex: 'updateTime',
title: '更新时间',
width: 250,
align: 'center',
scopedSlots: { customRender: 'text' }
},
{
title: '操作',
fixed: 'right',
@@ -77,7 +95,8 @@ export default {
dataSource: [],
url: {
list: '/onlyoffice/pageList'
}
},
queryParam: {}
}
},
created () {
@@ -101,7 +120,8 @@ export default {
pageNo: this.ipagination.current,
pageSize: this.ipagination.pageSize,
column: 'createTime',
order: 'desc'
order: 'desc',
fileName: this.queryParam.fileName ? '*' + this.queryParam.fileName + '*' : null
}
this.loading = true
getList(params).then((res) => {
@@ -160,6 +180,13 @@ export default {
},
modalFormOk () {
this.loadData()
},
searchReset () {
this.queryParam = {}
this.loadData(1)
},
searchQuery () {
this.loadData(1)
}
}
}
@@ -172,7 +199,7 @@ export default {
}
.operate-btn {
margin-bottom: 20px;
margin: 20px 0;
}
/*表格中换行文本的样式*/
@@ -187,6 +214,10 @@ export default {
}
.table-operate-btn:last-child {
color: red;
//color: red;
}
.search-btn {
margin: 5px 0 0 10px;
}
</style>