Merge branch 'temp' of http://123.60.103.97:3000/xuziqiang/SaaS-lib into temp
This commit is contained in:
@@ -39,7 +39,18 @@ const equipment = {
|
|||||||
meta: {
|
meta: {
|
||||||
title: '分组管理',
|
title: '分组管理',
|
||||||
keepAlive: false,
|
keepAlive: false,
|
||||||
// backApi: [],
|
operates: [
|
||||||
|
{ title: '新增分组', code: 'GroupAdd' },
|
||||||
|
{ title: '删除分组', code: 'GroupDelete' },
|
||||||
|
{ title: '编辑分组', code: 'GroupEdit' },
|
||||||
|
{ title: '删除点位', code: 'GroupPointDelete' },
|
||||||
|
{ title: '编辑点位', code: 'GroupPointEdit' },
|
||||||
|
{ title: '导入点位', code: 'GroupPointImport' },
|
||||||
|
{ title: '导出点位', code: 'GroupPointExports' },
|
||||||
|
{ title: '模版下载', code: 'GroupTempDownload' },
|
||||||
|
{ title: '批量分组', code: 'GroupBatchGroup' },
|
||||||
|
{ title: '公式编辑', code: 'GroupFormulaEdit' },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@@ -225,7 +225,7 @@ export const tableConfig = (el, elGroup, elFormula, defaultParams) => {
|
|||||||
headerActions: [
|
headerActions: [
|
||||||
{
|
{
|
||||||
label: '编辑',
|
label: '编辑',
|
||||||
name: 'groupEdit',
|
name: 'GroupEdit',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
dynamicDisabled: () => !defaultParams.value?.id,
|
dynamicDisabled: () => !defaultParams.value?.id,
|
||||||
handle: (a, b) => {
|
handle: (a, b) => {
|
||||||
@@ -234,7 +234,7 @@ export const tableConfig = (el, elGroup, elFormula, defaultParams) => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '批量删除',
|
label: '批量删除',
|
||||||
name: 'groupBatDelete',
|
name: 'GroupDelete',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
dynamicDisabled: (data: any) => {
|
dynamicDisabled: (data: any) => {
|
||||||
return data.list.length === 0;
|
return data.list.length === 0;
|
||||||
@@ -247,7 +247,7 @@ export const tableConfig = (el, elGroup, elFormula, defaultParams) => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '批量导出',
|
label: '批量导出',
|
||||||
name: 'groupExports',
|
name: 'GroupPointExports',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
dynamicDisabled: (data: any) => {
|
dynamicDisabled: (data: any) => {
|
||||||
return data.list.length === 0;
|
return data.list.length === 0;
|
||||||
@@ -259,7 +259,7 @@ export const tableConfig = (el, elGroup, elFormula, defaultParams) => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '批量导入',
|
label: '批量导入',
|
||||||
name: 'groupImport',
|
name: 'GroupPointImport',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
extra: {
|
extra: {
|
||||||
// api: props.postImportApi, // 导入接口名
|
// api: props.postImportApi, // 导入接口名
|
||||||
@@ -277,7 +277,7 @@ export const tableConfig = (el, elGroup, elFormula, defaultParams) => {
|
|||||||
|
|
||||||
{
|
{
|
||||||
label: '模板下载',
|
label: '模板下载',
|
||||||
name: 'groupTemDownload',
|
name: 'GroupTempDownload',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
handle: () => {
|
handle: () => {
|
||||||
// http.get('/asset/file/whiteListUser.xlsx');
|
// http.get('/asset/file/whiteListUser.xlsx');
|
||||||
@@ -291,7 +291,7 @@ export const tableConfig = (el, elGroup, elFormula, defaultParams) => {
|
|||||||
actions: [
|
actions: [
|
||||||
{
|
{
|
||||||
label: '删除',
|
label: '删除',
|
||||||
name: 'groupDelete',
|
name: 'GroupDelete',
|
||||||
dynamicParams: { linkIds: 'linkId[]' },
|
dynamicParams: { linkIds: 'linkId[]' },
|
||||||
confirm: true,
|
confirm: true,
|
||||||
isClearCheck: true,
|
isClearCheck: true,
|
||||||
@@ -346,7 +346,7 @@ export const tableConfigCal = (el, elGroup, elFormula, defaultParams) => {
|
|||||||
headerActions: [
|
headerActions: [
|
||||||
{
|
{
|
||||||
label: '编辑',
|
label: '编辑',
|
||||||
name: 'groupEdit',
|
name: 'GroupPointEdit',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
handle: (a, b) => {
|
handle: (a, b) => {
|
||||||
el.value.toggle();
|
el.value.toggle();
|
||||||
@@ -354,7 +354,7 @@ export const tableConfigCal = (el, elGroup, elFormula, defaultParams) => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '批量删除',
|
label: '批量删除',
|
||||||
name: 'groupTemDownload',
|
name: 'GroupPointDelete',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
dynamicDisabled: (data: any) => {
|
dynamicDisabled: (data: any) => {
|
||||||
return data.list.length === 0;
|
return data.list.length === 0;
|
||||||
@@ -367,7 +367,7 @@ export const tableConfigCal = (el, elGroup, elFormula, defaultParams) => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '批量导出',
|
label: '批量导出',
|
||||||
name: 'groupExports',
|
name: 'GroupPointExports',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
dynamicDisabled: (data: any) => {
|
dynamicDisabled: (data: any) => {
|
||||||
return data.list.length === 0;
|
return data.list.length === 0;
|
||||||
@@ -379,7 +379,7 @@ export const tableConfigCal = (el, elGroup, elFormula, defaultParams) => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '批量导入',
|
label: '批量导入',
|
||||||
name: 'groupImport',
|
name: 'GroupPointImport',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
extra: {
|
extra: {
|
||||||
// api: props.postImportApi, // 导入接口名
|
// api: props.postImportApi, // 导入接口名
|
||||||
@@ -397,7 +397,7 @@ export const tableConfigCal = (el, elGroup, elFormula, defaultParams) => {
|
|||||||
|
|
||||||
{
|
{
|
||||||
label: '模板下载',
|
label: '模板下载',
|
||||||
name: 'groupTemDownload',
|
name: 'GroupTempDownload',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
handle: () => {
|
handle: () => {
|
||||||
// http.get('/asset/file/whiteListUser.xlsx');
|
// http.get('/asset/file/whiteListUser.xlsx');
|
||||||
@@ -407,7 +407,7 @@ export const tableConfigCal = (el, elGroup, elFormula, defaultParams) => {
|
|||||||
|
|
||||||
{
|
{
|
||||||
label: '批量分组',
|
label: '批量分组',
|
||||||
name: 'groupBatGroup',
|
name: 'GroupBatchGroup',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
dynamicDisabled: (data: any) => {
|
dynamicDisabled: (data: any) => {
|
||||||
return data.list.length === 0;
|
return data.list.length === 0;
|
||||||
@@ -421,7 +421,7 @@ export const tableConfigCal = (el, elGroup, elFormula, defaultParams) => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '公式编辑',
|
label: '公式编辑',
|
||||||
name: 'groupFormulaEdit',
|
name: 'GroupFormulaEdit',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
handle: () => {
|
handle: () => {
|
||||||
elFormula.value.toggle();
|
elFormula.value.toggle();
|
||||||
@@ -435,7 +435,7 @@ export const tableConfigCal = (el, elGroup, elFormula, defaultParams) => {
|
|||||||
actions: [
|
actions: [
|
||||||
{
|
{
|
||||||
label: '删除',
|
label: '删除',
|
||||||
name: 'groupDelete',
|
name: 'GroupPointDelete',
|
||||||
dynamicParams: { ids: 'id[]' },
|
dynamicParams: { ids: 'id[]' },
|
||||||
confirm: true,
|
confirm: true,
|
||||||
isReload: true,
|
isReload: true,
|
||||||
|
@@ -27,9 +27,11 @@
|
|||||||
<template #overlay>
|
<template #overlay>
|
||||||
<a-menu>
|
<a-menu>
|
||||||
<template v-for="(item, index) in filterAction(actionList, data)" :key="index">
|
<template v-for="(item, index) in filterAction(actionList, data)" :key="index">
|
||||||
|
<!-- <div v-auth.all="item.name"> -->
|
||||||
<a-menu-item @click="item.func(data)">
|
<a-menu-item @click="item.func(data)">
|
||||||
<span>{{ item.title }}</span>
|
<span>{{ item.title }}</span>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
|
<!-- </div> -->
|
||||||
</template>
|
</template>
|
||||||
</a-menu>
|
</a-menu>
|
||||||
</template>
|
</template>
|
||||||
@@ -54,6 +56,8 @@
|
|||||||
import NsModalFrom from '/@/components/ns-modal-form.vue';
|
import NsModalFrom from '/@/components/ns-modal-form.vue';
|
||||||
import { group } from '/@/api/deviceManage';
|
import { group } from '/@/api/deviceManage';
|
||||||
import { http } from '/nerv-lib/util/http';
|
import { http } from '/nerv-lib/util/http';
|
||||||
|
import { authorizationService } from '/nerv-lib/saas/store/modules/authorization-service';
|
||||||
|
const { checkAllPermission } = authorizationService();
|
||||||
|
|
||||||
type opType = 'up' | 'down';
|
type opType = 'up' | 'down';
|
||||||
const { getParams } = useParams();
|
const { getParams } = useParams();
|
||||||
@@ -156,14 +160,15 @@
|
|||||||
if (data.id === 'all') {
|
if (data.id === 'all') {
|
||||||
list = ['addNodeSon'];
|
list = ['addNodeSon'];
|
||||||
}
|
}
|
||||||
return actions.filter(({ key }) => list.includes(key));
|
const res = actions.filter(({ key, name }) => list.includes(key) && checkAllPermission(name));
|
||||||
|
return res;
|
||||||
};
|
};
|
||||||
const actionList = [
|
const actionList = [
|
||||||
{ title: '新增子节点', key: 'addNodeSon', func: (data) => addNodeSon(data) },
|
{ title: '新增子节点', name: 'GroupAdd', key: 'addNodeSon', func: (data) => addNodeSon(data) },
|
||||||
{ title: '编辑', key: 'editNode', func: (data) => editNode(data) },
|
{ title: '编辑', name: 'GroupEdit', key: 'editNode', func: (data) => editNode(data) },
|
||||||
{ title: '上移', key: 'moveUp', func: (data) => moveNode(data, 'up') },
|
{ title: '上移', name: 'Group', key: 'moveUp', func: (data) => moveNode(data, 'up') },
|
||||||
{ title: '下移', key: 'moveDown', func: (data) => moveNode(data, 'down') },
|
{ title: '下移', name: 'Group', key: 'moveDown', func: (data) => moveNode(data, 'down') },
|
||||||
{ title: '删除', key: 'deleteNode', func: (data) => deleteNode(data) },
|
{ title: '删除', name: 'GroupDelete', key: 'deleteNode', func: (data) => deleteNode(data) },
|
||||||
];
|
];
|
||||||
const handleSelect = (key, record) => {
|
const handleSelect = (key, record) => {
|
||||||
//清除选中行数据
|
//清除选中行数据
|
||||||
|
@@ -34,7 +34,7 @@ export const tableConfig = (orgId) => {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
rowSelection: null,
|
rowSelection: null,
|
||||||
scroll: { x: 2000 },
|
// scroll: { x: 2000 },
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: '设备名称',
|
title: '设备名称',
|
||||||
|
Reference in New Issue
Block a user