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() }) },