|
@@ -4,7 +4,7 @@
|
|
|
<BasicTable @register="registerTable">
|
|
<BasicTable @register="registerTable">
|
|
|
<template #toolbar>
|
|
<template #toolbar>
|
|
|
<Button type="primary" @click="handleAdd">
|
|
<Button type="primary" @click="handleAdd">
|
|
|
- 新增工具
|
|
|
|
|
|
|
+ 新增
|
|
|
</Button>
|
|
</Button>
|
|
|
<Button type="primary" danger :disabled="hasSelected" @click="handleBatchDelete">
|
|
<Button type="primary" danger :disabled="hasSelected" @click="handleBatchDelete">
|
|
|
批量删除
|
|
批量删除
|
|
@@ -27,8 +27,8 @@
|
|
|
{
|
|
{
|
|
|
label: '显隐',
|
|
label: '显隐',
|
|
|
tooltip: '显隐',
|
|
tooltip: '显隐',
|
|
|
- icon: 'ant-design:delete-outlined',
|
|
|
|
|
- color: 'error',
|
|
|
|
|
|
|
+ //icon: 'ant-design:delete-outlined',
|
|
|
|
|
+ //color: 'error',
|
|
|
onClick: handleShow.bind(null, record)
|
|
onClick: handleShow.bind(null, record)
|
|
|
},
|
|
},
|
|
|
// {
|
|
// {
|
|
@@ -42,8 +42,8 @@
|
|
|
</template>
|
|
</template>
|
|
|
</BasicTable>
|
|
</BasicTable>
|
|
|
</div>
|
|
</div>
|
|
|
- <ToolsDrawer v-if="ifShowDialog" @closeDialog="ifShowDialog = false" @onSubmit="onSubmit">
|
|
|
|
|
- </ToolsDrawer>
|
|
|
|
|
|
|
+ <!-- <ToolsDrawer v-if="ifShowDialog" @closeDialog="ifShowDialog = false" @onSubmit="onSubmit"></ToolsDrawer> -->
|
|
|
|
|
+ <ToolsModel @register="registerModal" @closeDialog="ifShowDialog = false" @onSubmit="onSubmit"></ToolsModel>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -53,6 +53,7 @@ import { defineComponent, onMounted, watch, ref, reactive, toRefs, computed, cre
|
|
|
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
|
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
|
|
import { Button } from 'ant-design-vue';
|
|
import { Button } from 'ant-design-vue';
|
|
|
import ToolsDrawer from './ToolsDrawer.vue';
|
|
import ToolsDrawer from './ToolsDrawer.vue';
|
|
|
|
|
+import ToolsModel from './ToolsModel.vue';
|
|
|
import { message, Modal } from 'ant-design-vue';
|
|
import { message, Modal } from 'ant-design-vue';
|
|
|
import moment from 'moment'
|
|
import moment from 'moment'
|
|
|
import { session } from '/@/utils/Memory';
|
|
import { session } from '/@/utils/Memory';
|
|
@@ -62,10 +63,11 @@ import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
|
|
import { useI18n } from '/@/hooks/web/useI18n';
|
|
import { useI18n } from '/@/hooks/web/useI18n';
|
|
|
import { h } from 'vue';
|
|
import { h } from 'vue';
|
|
|
import { Tag } from 'ant-design-vue';
|
|
import { Tag } from 'ant-design-vue';
|
|
|
|
|
+import { useModal } from '/@/components/Modal';
|
|
|
|
|
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
- components: { BasicTable, TableAction, Button, ToolsDrawer, ExclamationCircleOutlined },
|
|
|
|
|
|
|
+ components: { BasicTable,ToolsModel, TableAction, Button, ToolsDrawer, ExclamationCircleOutlined },
|
|
|
name: "tools",
|
|
name: "tools",
|
|
|
setup() {
|
|
setup() {
|
|
|
const { t } = useI18n(); //加载国际化
|
|
const { t } = useI18n(); //加载国际化
|
|
@@ -146,7 +148,7 @@ export default defineComponent({
|
|
|
}
|
|
}
|
|
|
const handleShow = (record) => {
|
|
const handleShow = (record) => {
|
|
|
Modal.confirm({
|
|
Modal.confirm({
|
|
|
- title: '隐藏提示',
|
|
|
|
|
|
|
+ title: '提示',
|
|
|
icon: createVNode(ExclamationCircleOutlined),
|
|
icon: createVNode(ExclamationCircleOutlined),
|
|
|
content: '确定隐藏该工具?',
|
|
content: '确定隐藏该工具?',
|
|
|
centered: true,
|
|
centered: true,
|
|
@@ -163,8 +165,10 @@ export default defineComponent({
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const ifShowDialog = ref(false)
|
|
const ifShowDialog = ref(false)
|
|
|
|
|
+ const [registerModal, { openModal }] = useModal();
|
|
|
const handleAdd = () => {
|
|
const handleAdd = () => {
|
|
|
ifShowDialog.value = true
|
|
ifShowDialog.value = true
|
|
|
|
|
+ openModal(true)
|
|
|
}
|
|
}
|
|
|
const onSubmit = () => {
|
|
const onSubmit = () => {
|
|
|
reload();
|
|
reload();
|
|
@@ -221,6 +225,7 @@ export default defineComponent({
|
|
|
// pageSize: 10,
|
|
// pageSize: 10,
|
|
|
hideOnSinglePage: false
|
|
hideOnSinglePage: false
|
|
|
},
|
|
},
|
|
|
|
|
+ canResize: false,
|
|
|
rowKey: (record) => record.id,
|
|
rowKey: (record) => record.id,
|
|
|
actionColumn: {
|
|
actionColumn: {
|
|
|
width: 200,
|
|
width: 200,
|
|
@@ -233,6 +238,7 @@ export default defineComponent({
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
return {
|
|
return {
|
|
|
|
|
+ registerModal,
|
|
|
handleShow,
|
|
handleShow,
|
|
|
hasSelected,
|
|
hasSelected,
|
|
|
ifShowDialog,
|
|
ifShowDialog,
|