From 3c3e7065c6a51229d0fd7ec35506769f54c88909 Mon Sep 17 00:00:00 2001 From: "aoli.qu" <408346101@qq.com> Date: Wed, 25 Aug 2021 15:28:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=81=E8=A3=85=E6=90=9C=E7=B4=A2=E8=A1=A8?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/SearchCom/index.vue | 67 +++++++++++++++++++++ src/components/index.js | 4 +- src/views/sys/dictionary/DictionaryList.vue | 42 ++++++------- 3 files changed, 88 insertions(+), 25 deletions(-) create mode 100644 src/components/SearchCom/index.vue diff --git a/src/components/SearchCom/index.vue b/src/components/SearchCom/index.vue new file mode 100644 index 0000000..044bc94 --- /dev/null +++ b/src/components/SearchCom/index.vue @@ -0,0 +1,67 @@ + + + + + diff --git a/src/components/index.js b/src/components/index.js index 401ae0d..fa768d6 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -26,6 +26,7 @@ import StandardFormRow from '@/components/StandardFormRow' import ArticleListContent from '@/components/ArticleListContent' import Dialog from '@/components/Dialog' +import SearchCom from '@/components/SearchCom' export { AvatarList, @@ -52,5 +53,6 @@ export { StandardFormRow, ArticleListContent, - Dialog + Dialog, + SearchCom } diff --git a/src/views/sys/dictionary/DictionaryList.vue b/src/views/sys/dictionary/DictionaryList.vue index 0f6d770..02c4d12 100644 --- a/src/views/sys/dictionary/DictionaryList.vue +++ b/src/views/sys/dictionary/DictionaryList.vue @@ -2,27 +2,12 @@
- - - - - - - - - - - - - - 查询 - 重置 - - - 新增 - - - + +
import { dictionaryPage, dictionaryDel } from '@/api/sys/dictionary' -import { STable } from '@/components' +import { STable, SearchCom } from '@/components' import DictionaryForm from './DictionaryForm' export default { name: 'DictionaryList', components: { STable, + SearchCom, DictionaryForm }, data () { return { - queryParam: { dictionaryName: null, dictionaryCode: null }, + queryParam: { dictionaryName: null, dictionaryCode: null, status: null, createTime: null }, selectedRowKeys: [], // 选中行的key 出选择框时需要配置 selectedRows: [], // 选中行的数据 columns: [ @@ -84,6 +70,14 @@ export default { } }, computed: { + queryOptions: function () { + const list = [{ 'value': 1, 'name': '类型1' }, { 'value': 2, 'name': '类型2' }] + return [ + { type: 'input', placeholder: '词典名称', key: 'dictionaryName' }, + { type: 'date', placeholder: '请选择开始时间', key: 'createTime', format: 'YYYY-MM-DD HH:mm:ss' }, + { type: 'select', placeholder: '请选择类型', key: 'status', options: [{ name: '类型', id: undefined }, ...list] } + ] + }, rowSelection () { return { selectedRowKeys: this.selectedRowKeys, @@ -106,7 +100,7 @@ export default { }, // 删 handleDelete (record) { - dictionaryDel({ ids: record.id, deleteReason: "" }).then(() => { + dictionaryDel({ ids: record.id, deleteReason: '' }).then(() => { this.$refs.table.refresh() }) },