Merge pull request '增加表格行双击事件' (#364) from KaneLeung/Admin.NET.Pro:v2 into v2
Reviewed-on: https://code.adminnet.top/Admin.NET/Admin.NET.Pro/pulls/364
This commit is contained in:
commit
64b36285fb
@ -206,6 +206,7 @@ import { useUserInfo } from '/@@/stores/userInfo';
|
||||
import { VxeGridInstance, VxeGridListeners, VxeGridPropTypes } from 'vxe-table';
|
||||
import { useVxeTable } from '/@@/hooks/useVxeTableOptionsHook';
|
||||
import { Local } from '/@@/utils/storage';
|
||||
import { auth } from '/@@/utils/authFunction';
|
||||
|
||||
@if(@Model.TableField.Any(x=>x.EffectType == "DatePicker")){
|
||||
@:import { formatDate } from '/@@/utils/formatTime';
|
||||
@ -340,7 +341,7 @@ const checkTableColumnVisible = (tableColumnName: any) => {
|
||||
@if(@Model.TableField.Any(t => t.ColumnName == "CreateTime") && @Model.TableField.Any(t => t.ColumnName == "UpdateTime") && @Model.TableField.Any(t => t.ColumnName == "CreateUserId")){
|
||||
@:{ title: '修改记录', width: 100, showOverflow: 'tooltip', slots: { default: 'row_record' } },
|
||||
}
|
||||
{ title: '操作', fixed: 'right', width: 180, showOverflow: true, slots: { default: 'row_buttons' } },
|
||||
{ field: 'buttons', title: '操作', fixed: 'right', width: 180, showOverflow: true, slots: { default: 'row_buttons' } },
|
||||
],
|
||||
@if(@Model.TableField.Any(x=>x.Statistical == "Y")){
|
||||
@:footerMethod: ({ columns, data }) => {
|
||||
@ -523,6 +524,10 @@ const handleDelete = (row: any) => {
|
||||
state.localPageParam.defaultSort = { field: field, order: order!, descStr: 'desc' };
|
||||
Local.set(localPageParamKey, state.localPageParam);
|
||||
},
|
||||
// 双击行事件
|
||||
async cellDblclick({ row }) {
|
||||
if (auth('@(@Model.LowerClassName)/update')) await handleEdit(row);
|
||||
},
|
||||
};
|
||||
|
||||
@foreach (var column in Model.QueryWhetherList) {
|
||||
|
||||
10
Web/src/views/system/cache/index.vue
vendored
10
Web/src/views/system/cache/index.vue
vendored
@ -11,8 +11,12 @@
|
||||
<div class="card-header">
|
||||
<span>缓存列表</span>
|
||||
<div>
|
||||
<el-button icon="ele-Refresh" size="small" type="success" circle plain @click="handleQuery" v-auth="'sysCache/keyList'" />
|
||||
<el-button icon="ele-DeleteFilled" size="small" type="danger" circle plain @click="clearCache" v-auth="'sysCache/clear'"> </el-button>
|
||||
<el-tooltip :content="$t('message.list.query')" placement="bottom-start">
|
||||
<el-button icon="ele-Refresh" size="small" type="success" circle plain @click="handleQuery" v-auth="'sysCache/keyList'" />
|
||||
</el-tooltip>
|
||||
<el-tooltip :content="$t('message.list.delete')" placement="bottom-start">
|
||||
<el-button icon="ele-DeleteFilled" size="small" type="danger" circle plain @click="clearCache" v-auth="'sysCache/clear'"> </el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -59,6 +63,7 @@ import VueJsonPretty from 'vue-json-pretty';
|
||||
import 'vue-json-pretty/lib/styles.css';
|
||||
import { Splitpanes, Pane } from 'splitpanes';
|
||||
import 'splitpanes/dist/splitpanes.css';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import NoticeBar from '/@/components/noticeBar/index.vue';
|
||||
|
||||
@ -67,6 +72,7 @@ const scEcharts = defineAsyncComponent(() => import('/@/components/scEcharts/ind
|
||||
import { getAPI } from '/@/utils/axios-utils';
|
||||
import { SysCacheApi } from '/@/api-services';
|
||||
|
||||
const { t } = useI18n();
|
||||
const treeRef = ref<InstanceType<typeof ElTree>>();
|
||||
const currentNode = ref<any>({});
|
||||
const state = reactive({
|
||||
|
||||
@ -220,6 +220,10 @@ const gridEvents: VxeGridListeners<SysCodeGen> = {
|
||||
state.localPageParam.defaultSort = { field: field, order: order!, descStr: 'desc' };
|
||||
Local.set(localPageParamKey, state.localPageParam);
|
||||
},
|
||||
// 双击行事件
|
||||
async cellDblclick({ row }) {
|
||||
await handleEdit(row);
|
||||
},
|
||||
};
|
||||
|
||||
// 打开配置
|
||||
|
||||
@ -73,6 +73,7 @@ import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
import { VxeGridInstance, VxeGridListeners, VxeGridPropTypes } from 'vxe-table';
|
||||
import { useVxeTable } from '/@/hooks/useVxeTableOptionsHook';
|
||||
import { Local } from '/@/utils/storage';
|
||||
import { auth } from '/@/utils/authFunction';
|
||||
|
||||
import EditConfig from '/@/views/system/config/component/editConfig.vue';
|
||||
import ModifyRecord from '/@/components/table/modifyRecord.vue';
|
||||
@ -200,6 +201,10 @@ const gridEvents: VxeGridListeners<SysConfig> = {
|
||||
state.localPageParam.defaultSort = { field: field, order: order!, descStr: 'desc' };
|
||||
Local.set(localPageParamKey, state.localPageParam);
|
||||
},
|
||||
// 双击行事件
|
||||
async cellDblclick({ row }) {
|
||||
if (auth('sysConfig/update')) await handleEdit(row);
|
||||
},
|
||||
};
|
||||
|
||||
// 获取分组
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
</el-card>
|
||||
|
||||
<el-card class="full-table" shadow="hover" style="margin-top: 5px">
|
||||
<vxe-grid ref="xGrid" class="xGrid-style" v-bind="options">
|
||||
<vxe-grid ref="xGrid" class="xGrid-style" v-bind="options" v-on="gridEvents">
|
||||
<template #toolbar_buttons>
|
||||
<el-button-group>
|
||||
<el-button icon="ele-Plus" type="primary" @click="handleAddTable"> 增加表 </el-button>
|
||||
@ -407,8 +407,9 @@ const moveColumn = (row: any, direction: 'up' | 'down') => {
|
||||
|
||||
// 表格事件
|
||||
const gridEvents: VxeGridListeners<DbColumnOutput> = {
|
||||
async proxyQuery() {
|
||||
state.columnData = xGrid.value?.getTableData().tableData ?? [];
|
||||
// 双击行事件
|
||||
async cellDblclick({ row }) {
|
||||
await showEditColumn(row);
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@ -141,6 +141,7 @@ import { VxeGridInstance, VxeGridListeners, VxeGridPropTypes } from 'vxe-table';
|
||||
import { useVxeTable } from '/@/hooks/useVxeTableOptionsHook';
|
||||
import { Local } from '/@/utils/storage';
|
||||
import { useUserInfo } from '/@/stores/userInfo';
|
||||
import { auth } from '/@/utils/authFunction';
|
||||
|
||||
import EditDictType from '/@/views/system/dict/component/editDictType.vue';
|
||||
import EditDcitData from '/@/views/system/dict/component/editDictData.vue';
|
||||
@ -393,6 +394,10 @@ const gridEventsDictData: VxeGridListeners<SysDictData> = {
|
||||
state.localPageParamDictData.defaultSort = { field: field, order: order!, descStr: 'desc' };
|
||||
// Local.set(localPageParamKey, state.localPageParam);
|
||||
},
|
||||
// 双击行事件
|
||||
async cellDblclick({ row }) {
|
||||
if (auth('sysDictType/update') && state.currentDictTypeRow.sysFlag !== 1) await handleEditDictData(row);
|
||||
},
|
||||
};
|
||||
|
||||
// 更新前端字典缓存
|
||||
|
||||
@ -146,6 +146,7 @@ import { VxeGridInstance, VxeGridListeners, VxeGridPropTypes } from 'vxe-table';
|
||||
import { useVxeTable } from '/@/hooks/useVxeTableOptionsHook';
|
||||
import { Local } from '/@/utils/storage';
|
||||
import { downloadByUrl } from '/@/utils/download';
|
||||
import { auth } from '/@/utils/authFunction';
|
||||
|
||||
import { Splitpanes, Pane } from 'splitpanes';
|
||||
import 'splitpanes/dist/splitpanes.css';
|
||||
@ -322,6 +323,10 @@ const gridEvents: VxeGridListeners<SysFile> = {
|
||||
state.localPageParam.defaultSort = { field: field, order: order!, descStr: 'desc' };
|
||||
Local.set(localPageParamKey, state.localPageParam);
|
||||
},
|
||||
// 双击行事件
|
||||
async cellDblclick({ row }) {
|
||||
if (auth('sysFile/update')) await handleEdit(row);
|
||||
},
|
||||
};
|
||||
|
||||
// 树组件点击
|
||||
|
||||
@ -67,7 +67,7 @@
|
||||
<el-empty :image-size="200" />
|
||||
</template>
|
||||
<template #row_content="{ row }">
|
||||
<vxe-table ref="xGridTrigger" class="xGrid-style" :data="(row as JobDetailOutput).jobTriggers" style="margin: 5px" align="center">
|
||||
<vxe-table ref="xGridTrigger" class="xGrid-style" :data="(row as JobDetailOutput).jobTriggers" @cell-dblclick="({ row }) => openEditJobTrigger(row)" style="margin: 5px" align="center">
|
||||
<!-- <vxe-column type="checkbox" width="40" fixed="left"></vxe-column> -->
|
||||
<vxe-column field="seq" type="seq" width="40" fixed="left"></vxe-column>
|
||||
<vxe-column field="triggerId" title="触发器编号" :minWidth="180" showOverflow="tooltip"></vxe-column>
|
||||
@ -258,6 +258,7 @@ import { useRouter } from 'vue-router';
|
||||
import { Timer } from '@element-plus/icons-vue';
|
||||
import { VxeGridInstance, VxeGridListeners, VxeGridPropTypes } from 'vxe-table';
|
||||
import { useVxeTable } from '/@/hooks/useVxeTableOptionsHook';
|
||||
import { auth } from '/@/utils/authFunction';
|
||||
|
||||
import EditJobDetail from '/@/views/system/job/component/editJobDetail.vue';
|
||||
import EditJobTrigger from '/@/views/system/job/component/editJobTrigger.vue';
|
||||
@ -396,6 +397,10 @@ const gridEventsJob: VxeGridListeners<JobDetailOutput> = {
|
||||
async sortChange({ field, order }) {
|
||||
state.jobPageParam.defaultSort = { field: field, order: order!, descStr: 'desc' };
|
||||
},
|
||||
// 双击行事件
|
||||
async cellDblclick({ row }) {
|
||||
if (auth('sysJob/updateJobDetail')) await handleEdit(row);
|
||||
},
|
||||
};
|
||||
|
||||
// 打开新增触发器页面
|
||||
|
||||
@ -90,6 +90,7 @@ import { auths } from '/@/utils/authFunction';
|
||||
import { VxeGridInstance, VxeGridListeners, VxeGridPropTypes } from 'vxe-table';
|
||||
import { useVxeTable } from '/@/hooks/useVxeTableOptionsHook';
|
||||
import { Local } from '/@/utils/storage';
|
||||
import { auth } from '/@/utils/authFunction';
|
||||
|
||||
import ModifyRecord from '/@/components/table/modifyRecord.vue';
|
||||
|
||||
@ -220,6 +221,10 @@ const gridEvents: VxeGridListeners<SysLdap> = {
|
||||
state.localPageParam.defaultSort = { field: field, order: order!, descStr: 'desc' };
|
||||
Local.set(localPageParamKey, state.localPageParam);
|
||||
},
|
||||
// 双击行事件
|
||||
async cellDblclick({ row }) {
|
||||
if (auth('sysLdap/update')) await handleEdit(row);
|
||||
},
|
||||
};
|
||||
|
||||
// 同步域账户
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
</el-card>
|
||||
|
||||
<el-card class="full-table" shadow="hover" style="margin-top: 5px">
|
||||
<vxe-grid ref="xGrid" class="xGrid-style" v-bind="options" v-on="gridEvents">
|
||||
<vxe-grid ref="xGrid" class="xGrid-style" v-bind="options" v-on="gridEvents" @cell-dblclick="handleView">
|
||||
<template #toolbar_buttons> </template>
|
||||
<template #toolbar_tools>
|
||||
<vxe-button circle icon="vxe-icon-upload" name="导入" code="showImport" class="mr12" />
|
||||
@ -152,7 +152,7 @@ const options = useVxeTable<SysLogDiff>(
|
||||
{ field: 'elapsed', title: '耗时(ms)', width: 100, showOverflow: 'tooltip' },
|
||||
// { field: 'beforeData', title: '操作前记录', minWidth: 150, showOverflow: 'tooltip' },
|
||||
// { field: 'afterData', title: '操作后记录', minWidth: 150, showOverflow: 'tooltip' },
|
||||
{ title: '操作', fixed: 'right', width: 100, showOverflow: true, slots: { default: 'row_buttons' } },
|
||||
{ field: 'buttons', title: '操作', fixed: 'right', width: 100, showOverflow: true, slots: { default: 'row_buttons' } },
|
||||
],
|
||||
},
|
||||
// vxeGrid配置参数(此处可覆写任何参数),参考vxe-table官方文档
|
||||
|
||||
@ -82,6 +82,7 @@ import { useVxeTable } from '/@/hooks/useVxeTableOptionsHook';
|
||||
import SvgIcon from '/@/components/svgIcon/index.vue';
|
||||
import { Hide } from '@element-plus/icons-vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { auth } from '/@/utils/authFunction';
|
||||
|
||||
import EditMenu from '/@/views/system/menu/component/editMenu.vue';
|
||||
import ModifyRecord from '/@/components/table/modifyRecord.vue';
|
||||
@ -205,6 +206,10 @@ const gridEvents: VxeGridListeners<SysMenu> = {
|
||||
async proxyQuery() {
|
||||
state.menuData = xGrid.value?.getTableData().tableData ?? [];
|
||||
},
|
||||
// 双击行事件
|
||||
async cellDblclick({ row }) {
|
||||
if (auth('sysMenu/update')) await handleEdit(row);
|
||||
},
|
||||
};
|
||||
|
||||
// 全部展开
|
||||
|
||||
@ -77,6 +77,7 @@ import { VxeGridInstance, VxeGridListeners, VxeGridPropTypes } from 'vxe-table';
|
||||
import { useVxeTable } from '/@/hooks/useVxeTableOptionsHook';
|
||||
import { Local } from '/@/utils/storage';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { auth } from '/@/utils/authFunction';
|
||||
|
||||
import EditNotice from '/@/views/system/notice/component/editNotice.vue';
|
||||
import ModifyRecord from '/@/components/table/modifyRecord.vue';
|
||||
@ -200,6 +201,10 @@ const gridEvents: VxeGridListeners<SysNotice> = {
|
||||
state.localPageParam.defaultSort = { field: field, order: order!, descStr: 'desc' };
|
||||
Local.set(localPageParamKey, state.localPageParam);
|
||||
},
|
||||
// 双击行事件
|
||||
async cellDblclick({ row }) {
|
||||
if (auth('sysNotice/update') && row.status !== 1) await handleEdit(row);
|
||||
},
|
||||
};
|
||||
|
||||
// 发布
|
||||
|
||||
@ -75,6 +75,7 @@ import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
import { VxeGridInstance, VxeGridListeners, VxeGridPropTypes } from 'vxe-table';
|
||||
import { useVxeTable } from '/@/hooks/useVxeTableOptionsHook';
|
||||
import { Local } from '/@/utils/storage';
|
||||
import { auth } from '/@/utils/authFunction';
|
||||
|
||||
import EditOAuthUser from '/@/views/system/oAuthUser/component/editOAuthUser.vue';
|
||||
import ModifyRecord from '/@/components/table/modifyRecord.vue';
|
||||
@ -192,5 +193,9 @@ const gridEvents: VxeGridListeners<SysOAuthUser> = {
|
||||
state.localPageParam.defaultSort = { field: field, order: order!, descStr: 'desc' };
|
||||
Local.set(localPageParamKey, state.localPageParam);
|
||||
},
|
||||
// 双击行事件
|
||||
async cellDblclick({ row }) {
|
||||
if (auth('sysOAuthUser/update') && row.status !== 1) await handleEdit(row);
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@ -62,6 +62,7 @@ import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
import { VxeGridInstance, VxeGridListeners, VxeGridPropTypes } from 'vxe-table';
|
||||
import { useVxeTable } from '/@/hooks/useVxeTableOptionsHook';
|
||||
import { Local } from '/@/utils/storage';
|
||||
import { auth } from '/@/utils/authFunction';
|
||||
|
||||
import EditOpenAccess from '/@/views/system/openAccess/component/editOpenAccess.vue';
|
||||
import HelpView from '/@/views/system/openAccess/component/helpView.vue';
|
||||
@ -181,6 +182,10 @@ const gridEvents: VxeGridListeners<OpenAccessOutput> = {
|
||||
state.localPageParam.defaultSort = { field: field, order: order!, descStr: 'desc' };
|
||||
Local.set(localPageParamKey, state.localPageParam);
|
||||
},
|
||||
// 双击行事件
|
||||
async cellDblclick({ row }) {
|
||||
if (auth('sysOpenAccess/update')) await handleEdit(row);
|
||||
},
|
||||
};
|
||||
|
||||
// 打开说明页面
|
||||
|
||||
@ -82,6 +82,7 @@ import { useVxeTable } from '/@/hooks/useVxeTableOptionsHook';
|
||||
import { Splitpanes, Pane } from 'splitpanes';
|
||||
import 'splitpanes/dist/splitpanes.css';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { auth } from '/@/utils/authFunction';
|
||||
|
||||
import OrgTree from '/@/views/system/org/component/orgTree.vue';
|
||||
import EditOrg from '/@/views/system/org/component/editOrg.vue';
|
||||
@ -231,6 +232,10 @@ const gridEvents: VxeGridListeners<SysOrg> = {
|
||||
async proxyQuery() {
|
||||
state.treeData = xGrid.value?.getTableData().tableData ?? [];
|
||||
},
|
||||
// 双击行事件
|
||||
async cellDblclick({ row }) {
|
||||
if (auth('sysOrg/update')) await handleEdit(row);
|
||||
},
|
||||
};
|
||||
|
||||
// 树组件点击
|
||||
|
||||
@ -60,6 +60,7 @@ import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
import { VxeGridInstance, VxeGridListeners, VxeGridPropTypes } from 'vxe-table';
|
||||
import { useVxeTable } from '/@/hooks/useVxeTableOptionsHook';
|
||||
import { Local } from '/@/utils/storage';
|
||||
import { auth } from '/@/utils/authFunction';
|
||||
|
||||
import EditPlugin from '/@/views/system/plugin/component/editPlugin.vue';
|
||||
import ModifyRecord from '/@/components/table/modifyRecord.vue';
|
||||
@ -176,5 +177,9 @@ const gridEvents: VxeGridListeners<SysPlugin> = {
|
||||
state.localPageParam.defaultSort = { field: field, order: order!, descStr: 'desc' };
|
||||
Local.set(localPageParamKey, state.localPageParam);
|
||||
},
|
||||
// 双击行事件
|
||||
async cellDblclick({ row }) {
|
||||
if (auth('sysPlugin/update')) await handleEdit(row);
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@ -80,6 +80,7 @@ import { VxeGridInstance, VxeGridListeners, VxeGridPropTypes } from 'vxe-table';
|
||||
import { useVxeTable } from '/@/hooks/useVxeTableOptionsHook';
|
||||
import { Local } from '/@/utils/storage';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { auth } from '/@/utils/authFunction';
|
||||
|
||||
import EditPos from '/@/views/system/pos/component/editPos.vue';
|
||||
import ModifyRecord from '/@/components/table/modifyRecord.vue';
|
||||
@ -215,5 +216,9 @@ const gridEvents: VxeGridListeners<PagePosOutput> = {
|
||||
state.localPageParam.defaultSort = { field: field, order: order!, descStr: 'desc' };
|
||||
Local.set(localPageParamKey, state.localPageParam);
|
||||
},
|
||||
// 双击行事件
|
||||
async cellDblclick({ row }) {
|
||||
if (auth('sysPos/update')) await handleEdit(row);
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@ -63,6 +63,7 @@ import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
import { VxeGridInstance, VxeGridListeners, VxeGridPropTypes } from 'vxe-table';
|
||||
import { useVxeTable } from '/@/hooks/useVxeTableOptionsHook';
|
||||
import { Local } from '/@/utils/storage';
|
||||
import { auth } from '/@/utils/authFunction';
|
||||
|
||||
import EditPrint from '/@/views/system/print/component/editPrint.vue';
|
||||
import ModifyRecord from '/@/components/table/modifyRecord.vue';
|
||||
@ -188,5 +189,9 @@ const gridEvents: VxeGridListeners<SysPrint> = {
|
||||
state.localPageParam.defaultSort = { field: field, order: order!, descStr: 'desc' };
|
||||
Local.set(localPageParamKey, state.localPageParam);
|
||||
},
|
||||
// 双击行事件
|
||||
async cellDblclick({ row }) {
|
||||
if (auth('sysPrint/update')) await handleEdit(row);
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@ -87,6 +87,7 @@ import { useVxeTable } from '/@/hooks/useVxeTableOptionsHook';
|
||||
import { Local } from '/@/utils/storage';
|
||||
import { Splitpanes, Pane } from 'splitpanes';
|
||||
import 'splitpanes/dist/splitpanes.css';
|
||||
import { auth } from '/@/utils/authFunction';
|
||||
|
||||
import RegionTree from './component/regionTree.vue';
|
||||
import EditRegion from './component/editRegion.vue';
|
||||
@ -231,6 +232,10 @@ const gridEvents: VxeGridListeners<SysRegion> = {
|
||||
state.localPageParam.defaultSort = { field: field, order: order!, descStr: 'desc' };
|
||||
Local.set(localPageParamKey, state.localPageParam);
|
||||
},
|
||||
// 双击行事件
|
||||
async cellDblclick({ row }) {
|
||||
if (auth('sysRegion/update')) await handleEdit(row);
|
||||
},
|
||||
};
|
||||
|
||||
// 树组件点击
|
||||
|
||||
@ -75,6 +75,7 @@ import { useRouter } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { Splitpanes, Pane } from 'splitpanes';
|
||||
import 'splitpanes/dist/splitpanes.css';
|
||||
import { auth } from '/@/utils/authFunction';
|
||||
|
||||
import ReportGroupPanel from './component/reportGroupPanel/index.vue';
|
||||
import EditReportConfig from '/@/views/system/reportConfig/component/editReportConfig.vue';
|
||||
@ -209,6 +210,10 @@ const gridEvents: VxeGridListeners<ReportConfigOutput> = {
|
||||
state.localPageParam.defaultSort = { field: field, order: order!, descStr: 'desc' };
|
||||
Local.set(localPageParamKey, state.localPageParam);
|
||||
},
|
||||
// 双击行事件
|
||||
async cellDblclick({ row }) {
|
||||
if (auth('sysReportConfig/update') && row.status !== 1) await handleEdit(row);
|
||||
},
|
||||
};
|
||||
|
||||
const handleGroupNodeClick = (g: SysReportGroup) => {
|
||||
|
||||
@ -60,6 +60,7 @@ import { VxeGridInstance, VxeGridListeners, VxeGridPropTypes } from 'vxe-table';
|
||||
import { useVxeTable } from '/@/hooks/useVxeTableOptionsHook';
|
||||
import { Local } from '/@/utils/storage';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { auth } from '/@/utils/authFunction';
|
||||
|
||||
import EditReportDataSource from '/@/views/system/reportDataSource/component/editReportDataSource.vue';
|
||||
import ModifyRecord from '/@/components/table/modifyRecord.vue';
|
||||
@ -178,6 +179,10 @@ const gridEvents: VxeGridListeners<SysReportDataSource> = {
|
||||
state.localPageParam.defaultSort = { field: field, order: order!, descStr: 'desc' };
|
||||
Local.set(localPageParamKey, state.localPageParam);
|
||||
},
|
||||
// 双击行事件
|
||||
async cellDblclick({ row }) {
|
||||
if (auth('sysReportDataSource/update') && row.status !== 1) await handleEdit(row);
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@ -86,6 +86,7 @@ import { VxeGridInstance, VxeGridListeners, VxeGridPropTypes } from 'vxe-table';
|
||||
import { useVxeTable } from '/@/hooks/useVxeTableOptionsHook';
|
||||
import { Local } from '/@/utils/storage';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { auth } from '/@/utils/authFunction';
|
||||
|
||||
import EditRole from '/@/views/system/role/component/editRole.vue';
|
||||
import GrantMenu from '/@/views/system/role/component/grantMenu.vue';
|
||||
@ -234,6 +235,10 @@ const gridEvents: VxeGridListeners<PageRoleOutput> = {
|
||||
state.localPageParam.defaultSort = { field: field, order: order!, descStr: 'desc' };
|
||||
Local.set(localPageParamKey, state.localPageParam);
|
||||
},
|
||||
// 双击行事件
|
||||
async cellDblclick({ row }) {
|
||||
if (auth('sysRole/update')) await handleEdit(row);
|
||||
},
|
||||
};
|
||||
|
||||
// 打开授权菜单页面
|
||||
|
||||
@ -106,6 +106,7 @@ import { ElMessageBox, ElMessage, ElButton } from 'element-plus';
|
||||
import { VxeGridInstance, VxeGridListeners, VxeGridPropTypes } from 'vxe-table';
|
||||
import { useVxeTable } from '/@/hooks/useVxeTableOptionsHook';
|
||||
import { Local } from '/@/utils/storage';
|
||||
import { auth } from '/@/utils/authFunction';
|
||||
|
||||
import EditTenant from '/@/views/system/tenant/component/editTenant.vue';
|
||||
import GrantMenu from '/@/views/system/tenant/component/grantMenu.vue';
|
||||
@ -236,6 +237,10 @@ const gridEvents: VxeGridListeners<TenantOutput> = {
|
||||
state.localPageParam.defaultSort = { field: field, order: order!, descStr: 'desc' };
|
||||
Local.set(localPageParamKey, state.localPageParam);
|
||||
},
|
||||
// 双击行事件
|
||||
async cellDblclick({ row }) {
|
||||
if (auth('sysTenant/update')) await handleEdit(row);
|
||||
},
|
||||
};
|
||||
|
||||
// 打开授权菜单页面
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<el-card class="full-table" shadow="hover" style="margin-top: 5px">
|
||||
<vxe-grid ref="xGrid" class="xGrid-style" v-bind="options" v-on="gridEvents">
|
||||
<template #toolbar_buttons>
|
||||
<el-button type="primary" icon="ele-Plus" @click="handleAdd" v-auth="'sysNotice/add'"> 新增 </el-button>
|
||||
<el-button type="primary" icon="ele-Plus" @click="handleAdd"> 新增 </el-button>
|
||||
</template>
|
||||
<template #toolbar_tools> </template>
|
||||
<template #empty>
|
||||
@ -140,5 +140,9 @@ const gridEvents: VxeGridListeners<SysUpgrade> = {
|
||||
state.localPageParam.defaultSort = { field: field, order: order!, descStr: 'desc' };
|
||||
Local.set(localPageParamKey, state.localPageParam);
|
||||
},
|
||||
// 双击行事件
|
||||
async cellDblclick({ row }) {
|
||||
await handleEdit(row);
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@ -111,6 +111,7 @@ import XEUtils from 'xe-utils';
|
||||
import { Splitpanes, Pane } from 'splitpanes';
|
||||
import 'splitpanes/dist/splitpanes.css';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { auth } from '/@/utils/authFunction';
|
||||
|
||||
import OrgTree from '/@/views/system/org/component/orgTree.vue';
|
||||
import EditUser from '/@/views/system/user/component/editUser.vue';
|
||||
@ -276,6 +277,10 @@ const gridEvents: VxeGridListeners<UserOutput> = {
|
||||
state.localPageParam.defaultSort = { field: field, order: order!, descStr: 'desc' };
|
||||
Local.set(localPageParamKey, state.localPageParam);
|
||||
},
|
||||
// 双击行事件
|
||||
async cellDblclick({ row }) {
|
||||
if (auth('sysUser/update')) await handleEdit(row);
|
||||
},
|
||||
};
|
||||
|
||||
// 修改状态
|
||||
|
||||
Loading…
Reference in New Issue
Block a user