|
@@ -52,7 +52,7 @@
|
|
<a-upload name="file" :showUploadList="false" :customRequest="(file) => handleImportXls(file, getImportUrl, reload)">
|
|
<a-upload name="file" :showUploadList="false" :customRequest="(file) => handleImportXls(file, getImportUrl, reload)">
|
|
<a-button preIcon="ant-design:import-outlined" type="primary">导入</a-button>
|
|
<a-button preIcon="ant-design:import-outlined" type="primary">导入</a-button>
|
|
</a-upload>
|
|
</a-upload>
|
|
- <a-button preIcon="ant-design:export-outlined" type="primary" @click="handleExportXls('单表示例', getExportUrl,exportParams)">导出</a-button>
|
|
|
|
|
|
+ <a-button preIcon="ant-design:export-outlined" type="primary" @click="handleExportXls('单表示例', getExportUrl, exportParams)">导出</a-button>
|
|
<a-button preIcon="ant-design:filter" type="primary" @click="">高级查询</a-button>
|
|
<a-button preIcon="ant-design:filter" type="primary" @click="">高级查询</a-button>
|
|
<a-button preIcon="ant-design:plus-outlined" type="primary" @click="openTab">打开Tab页</a-button>
|
|
<a-button preIcon="ant-design:plus-outlined" type="primary" @click="openTab">打开Tab页</a-button>
|
|
<a-button preIcon="ant-design:retweet-outlined" type="primary" @click="customSearch = !customSearch">{{
|
|
<a-button preIcon="ant-design:retweet-outlined" type="primary" @click="customSearch = !customSearch">{{
|
|
@@ -60,7 +60,7 @@
|
|
}}</a-button>
|
|
}}</a-button>
|
|
<a-button preIcon="ant-design:import-outlined" type="primary" @click="handleImport">弹窗导入</a-button>
|
|
<a-button preIcon="ant-design:import-outlined" type="primary" @click="handleImport">弹窗导入</a-button>
|
|
|
|
|
|
- <super-query :config="superQueryConfig" @search="handleSuperQuery"/>
|
|
|
|
|
|
+ <super-query :config="superQueryConfig" @search="handleSuperQuery" />
|
|
|
|
|
|
<a-dropdown v-if="checkedKeys.length > 0">
|
|
<a-dropdown v-if="checkedKeys.length > 0">
|
|
<template #overlay>
|
|
<template #overlay>
|
|
@@ -81,12 +81,12 @@
|
|
<TableAction :actions="getActions(record)" />
|
|
<TableAction :actions="getActions(record)" />
|
|
</template>
|
|
</template>
|
|
</BasicTable>
|
|
</BasicTable>
|
|
- <DemoModal @register="registerModal" @success="reload" :isDisabled="isDisabled"/>
|
|
|
|
|
|
+ <DemoModal @register="registerModal" @success="reload" :isDisabled="isDisabled" />
|
|
<JImportModal @register="registerModalJimport" :url="getImportUrl" online />
|
|
<JImportModal @register="registerModalJimport" :url="getImportUrl" online />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
- import { ref, unref, reactive, toRaw, watch,computed } from 'vue';
|
|
|
|
|
|
+ import { ref, unref, reactive, toRaw, watch, computed } from 'vue';
|
|
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
|
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
|
import { useModal } from '/@/components/Modal';
|
|
import { useModal } from '/@/components/Modal';
|
|
import DemoModal from './DemoModal.vue';
|
|
import DemoModal from './DemoModal.vue';
|
|
@@ -99,7 +99,7 @@
|
|
import { useGo } from '/@/hooks/web/usePage';
|
|
import { useGo } from '/@/hooks/web/usePage';
|
|
import { router } from '/@/router';
|
|
import { router } from '/@/router';
|
|
import { filterObj } from '/@/utils/common/compUtils';
|
|
import { filterObj } from '/@/utils/common/compUtils';
|
|
-
|
|
|
|
|
|
+
|
|
const go = useGo();
|
|
const go = useGo();
|
|
const checkedKeys = ref<Array<string | number>>([]);
|
|
const checkedKeys = ref<Array<string | number>>([]);
|
|
const [registerModal, { openModal }] = useModal();
|
|
const [registerModal, { openModal }] = useModal();
|
|
@@ -108,7 +108,7 @@
|
|
const min = ref();
|
|
const min = ref();
|
|
const max = ref();
|
|
const max = ref();
|
|
const isDisabled = ref(false);
|
|
const isDisabled = ref(false);
|
|
-
|
|
|
|
|
|
+
|
|
const [registerTable, { reload, setProps }] = useTable({
|
|
const [registerTable, { reload, setProps }] = useTable({
|
|
title: '单表示例',
|
|
title: '单表示例',
|
|
api: getDemoList,
|
|
api: getDemoList,
|
|
@@ -135,7 +135,7 @@
|
|
bordered: true,
|
|
bordered: true,
|
|
showIndexColumn: false,
|
|
showIndexColumn: false,
|
|
tableSetting: { fullScreen: true },
|
|
tableSetting: { fullScreen: true },
|
|
- canResize: false,
|
|
|
|
|
|
+
|
|
rowKey: 'id',
|
|
rowKey: 'id',
|
|
actionColumn: {
|
|
actionColumn: {
|
|
width: 180,
|
|
width: 180,
|
|
@@ -159,13 +159,13 @@
|
|
openModalJimport(true);
|
|
openModalJimport(true);
|
|
}
|
|
}
|
|
|
|
|
|
- const exportParams = computed(()=>{
|
|
|
|
|
|
+ const exportParams = computed(() => {
|
|
let paramsForm = {};
|
|
let paramsForm = {};
|
|
if (checkedKeys.value && checkedKeys.value.length > 0) {
|
|
if (checkedKeys.value && checkedKeys.value.length > 0) {
|
|
paramsForm['selections'] = checkedKeys.value.join(',');
|
|
paramsForm['selections'] = checkedKeys.value.join(',');
|
|
}
|
|
}
|
|
- return filterObj(paramsForm)
|
|
|
|
- })
|
|
|
|
|
|
+ return filterObj(paramsForm);
|
|
|
|
+ });
|
|
/**
|
|
/**
|
|
* 操作列定义
|
|
* 操作列定义
|
|
* @param record
|
|
* @param record
|
|
@@ -194,7 +194,7 @@
|
|
* 选择事件
|
|
* 选择事件
|
|
*/
|
|
*/
|
|
function onSelectChange(selectedRowKeys: (string | number)[]) {
|
|
function onSelectChange(selectedRowKeys: (string | number)[]) {
|
|
- console.log("checkedKeys------>",checkedKeys)
|
|
|
|
|
|
+ console.log('checkedKeys------>', checkedKeys);
|
|
checkedKeys.value = selectedRowKeys;
|
|
checkedKeys.value = selectedRowKeys;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -289,13 +289,13 @@
|
|
//自定义查询----end---------
|
|
//自定义查询----end---------
|
|
|
|
|
|
const superQueryConfig = reactive({
|
|
const superQueryConfig = reactive({
|
|
- name:{ title: "名称", view: "text", type: "string", order: 1 },
|
|
|
|
- sex:{ title: "性别", view: "list", type: "string", dictCode:'sex', order: 2 },
|
|
|
|
|
|
+ name: { title: '名称', view: 'text', type: 'string', order: 1 },
|
|
|
|
+ sex: { title: '性别', view: 'list', type: 'string', dictCode: 'sex', order: 2 },
|
|
});
|
|
});
|
|
-
|
|
|
|
|
|
+
|
|
function handleSuperQuery(params) {
|
|
function handleSuperQuery(params) {
|
|
- Object.keys(params).map(k=>{
|
|
|
|
- queryParam[k] = params[k]
|
|
|
|
|
|
+ Object.keys(params).map((k) => {
|
|
|
|
+ queryParam[k] = params[k];
|
|
});
|
|
});
|
|
searchQuery();
|
|
searchQuery();
|
|
}
|
|
}
|