@qqt-product/system 0.0.1 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +53240 -10634
- package/dist/index.umd.js +94 -21
- package/dist/lib/components/QAccountList/src/QAccountCreate.vue.d.ts +2878 -0
- package/dist/lib/components/QAccountList/src/QAccountDetail.vue.d.ts +2871 -0
- package/dist/lib/components/QAccountList/src/QAccountEdit.vue.d.ts +2878 -0
- package/dist/lib/components/QAccountList/src/QAccountList.vue.d.ts +23 -4
- package/dist/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue.d.ts +9 -4
- package/dist/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue.d.ts +9 -4
- package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordDetail.vue.d.ts +2864 -0
- package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue.d.ts +2 -3
- package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsDetail.vue.d.ts +2864 -0
- package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue.d.ts +2876 -0
- package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue.d.ts +29 -14
- package/dist/lib/components/QI18nList/src/QI18nList.vue.d.ts +2 -6
- package/dist/lib/components/QImChatGroupList/src/QImChatGroupList.vue.d.ts +5 -8
- package/dist/lib/components/QMqRecordList/src/QMqRecordList.vue.d.ts +9 -4
- package/dist/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue.d.ts +2872 -0
- package/dist/lib/components/QPermissionDataList/src/QPermissionDataList.vue.d.ts +126 -0
- package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue.d.ts +2864 -0
- package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue.d.ts +2887 -0
- package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue.d.ts +25 -5
- package/dist/lib/components/QPurchaseNoticeList/src/use-field-select-modal-hook.d.ts +7 -0
- package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue.d.ts +221 -28
- package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateModal.vue.d.ts +45 -0
- package/dist/lib/components/QQuartzJobList/src/QQuartzJobList.vue.d.ts +24 -5
- package/dist/lib/components/QRoleList/src/QRoleList.vue.d.ts +23 -7
- package/dist/lib/components/QRoleList/src/useConfigData.d.ts +1 -11
- package/dist/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue.d.ts +7 -3
- package/dist/lib/components/QUsageList/src/QUsageList.vue.d.ts +15 -35
- package/dist/lib/components/QUsageList/src/useConfigData.d.ts +111 -10
- package/dist/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue.d.ts +25 -0
- package/dist/lib/components/QcustomConfigEdit/component/regexComponent.d.ts +9 -10
- package/dist/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue.d.ts +1209 -0
- package/dist/lib/components/QcustomConfigEdit/src/useConfigData.d.ts +1 -1
- package/dist/lib/components/QcustomConfigList/src/QcustomConfigList.vue.d.ts +8 -7
- package/dist/lib/components/QsysConfigList/src/QsysConfigList.vue.d.ts +2 -3
- package/dist/lib/components/index.d.ts +2 -2
- package/dist/lib/components/integratedNodesList/src/QIntegratedNodesDetail.vue.d.ts +2863 -0
- package/dist/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue.d.ts +2872 -0
- package/dist/lib/components/integratedNodesList/src/index.vue.d.ts +8 -11
- package/dist/lib/components/integratedReportSearchList/src/index.vue.d.ts +16 -10
- package/dist/lib/components/loginAbnormalLogList/src/index.vue.d.ts +2 -9
- package/dist/lib/components/loginLogList/src/index.vue.d.ts +2 -8
- package/dist/lib/components/loginSupplierLogList/src/index.vue.d.ts +2 -12
- package/dist/lib/components/operateLogList/src/index.vue.d.ts +2 -13
- package/dist/style.css +1 -1
- package/dist/vite-env.d.ts +13 -13
- package/package.json +13 -11
- package/src/lib/components/QAccountList/src/QAccountCreate.vue +272 -0
- package/src/lib/components/QAccountList/src/QAccountDetail.vue +82 -14
- package/src/lib/components/QAccountList/src/QAccountEdit.vue +65 -33
- package/src/lib/components/QAccountList/src/QAccountList.vue +532 -530
- package/src/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue +143 -137
- package/src/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue +172 -166
- package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue +123 -124
- package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue +66 -18
- package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue +151 -122
- package/src/lib/components/QI18nList/src/QI18nList.vue +365 -361
- package/src/lib/components/QImChatGroupList/src/QImChatGroupList.vue +103 -94
- package/src/lib/components/QMqRecordList/src/QMqRecordList.vue +109 -105
- package/src/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue +3 -3
- package/src/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue +218 -221
- package/src/lib/components/QPermissionDataList/src/QPermissionDataList.vue +110 -117
- package/src/lib/components/QPermissionDataList/src/form.vue +109 -109
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue +1 -1
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue +120 -32
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue +189 -163
- package/src/lib/components/QPurchaseNoticeList/src/use-field-select-modal-hook.ts +84 -0
- package/src/lib/components/QPurchaseNoticeList/src/useConfigData.ts +22 -22
- package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue +134 -85
- package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateModal.vue +91 -0
- package/src/lib/components/QQuartzJobList/src/QQuartzJobList.vue +276 -263
- package/src/lib/components/QRoleList/src/QRoleList.vue +332 -288
- package/src/lib/components/QRoleList/src/useConfigData.ts +1 -6
- package/src/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue +304 -302
- package/src/lib/components/QUsageList/src/QUsageList.vue +287 -82
- package/src/lib/components/QUsageList/src/useConfigData.ts +147 -13
- package/src/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue +140 -140
- package/src/lib/components/QcustomConfigEdit/component/regexComponent.tsx +28 -28
- package/src/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue +130 -42
- package/src/lib/components/QcustomConfigEdit/src/QcustomConfigRender.tsx +2 -2
- package/src/lib/components/QcustomConfigEdit/src/useConfigData.ts +2 -2
- package/src/lib/components/QcustomConfigEdit/src/useConstant.ts +12 -12
- package/src/lib/components/QcustomConfigList/src/QcustomConfigList.vue +276 -268
- package/src/lib/components/QcustomConfigList/src/useConfigData.ts +1 -1
- package/src/lib/components/QsysConfigList/src/QsysConfigList.vue +124 -125
- package/src/lib/components/index.ts +78 -78
- package/src/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue +2 -10
- package/src/lib/components/integratedNodesList/src/index.vue +130 -136
- package/src/lib/components/integratedReportList/src/index.vue +55 -30
- package/src/lib/components/integratedReportSearchList/src/index.vue +106 -66
- package/src/lib/components/loginAbnormalLogList/src/index.vue +43 -50
- package/src/lib/components/loginLogList/src/index.vue +51 -57
- package/src/lib/components/loginSupplierLogList/src/index.vue +53 -63
- package/src/lib/components/operateLogList/src/index.vue +46 -57
- package/src/vite-env.d.ts +13 -13
- package/tsconfig.json +24 -24
- package/vite.config.ts +1 -1
- package/dist/lib/components/QCompanyermissionList/src/form.vue.d.ts +0 -80
- package/dist/lib/components/QCompanyermissionList/src/types.d.ts +0 -44
- package/dist/lib/components/integratedReportList/src/index.vue.d.ts +0 -70
- package/src/lib/components/QCompanyermissionList/src/editTree.vue +0 -291
- package/src/lib/components/QCompanyermissionList/src/form.vue +0 -238
- package/src/lib/components/QCompanyermissionList/src/index.vue +0 -309
- package/src/lib/components/QCompanyermissionList/src/types.ts +0 -44
|
@@ -1,309 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="permission-box">
|
|
3
|
-
<vxe-table
|
|
4
|
-
show-overflow
|
|
5
|
-
keep-source
|
|
6
|
-
ref="xTable"
|
|
7
|
-
height="auto"
|
|
8
|
-
:row-config="{ keyField: 'id' }"
|
|
9
|
-
:edit-config="{ trigger: 'click', mode: 'row', showStatus: true }"
|
|
10
|
-
:column-config="{ resizable: true }"
|
|
11
|
-
:data="permissionList"
|
|
12
|
-
:tree-config="{ transform: true, rowField: 'id', parentField: 'parentId' }"
|
|
13
|
-
:checkbox-config="{ labelField: 'name' }"
|
|
14
|
-
@checkbox-change="selectChangeEvent"
|
|
15
|
-
>
|
|
16
|
-
<vxe-column field="name" title="菜单名称" width="200" fixed="left" tree-node :edit-render="{}">
|
|
17
|
-
<template #edit="{ row }">
|
|
18
|
-
<vxe-input v-model="row.name" type="text"></vxe-input>
|
|
19
|
-
</template>
|
|
20
|
-
</vxe-column>
|
|
21
|
-
<vxe-column field="nameI18nKey" title="菜单名称国际化" width="180" :edit-render="{}">
|
|
22
|
-
<template #edit="{ row }">
|
|
23
|
-
<vxe-input v-model="row.nameI18nKey" type="text"></vxe-input>
|
|
24
|
-
</template>
|
|
25
|
-
</vxe-column>
|
|
26
|
-
<vxe-column field="icon" title="icon" width="80">
|
|
27
|
-
<template #default="{ row }">
|
|
28
|
-
<a-icon :class="`vxe-icon-${row.icon}`" />
|
|
29
|
-
</template>
|
|
30
|
-
</vxe-column>
|
|
31
|
-
<vxe-column field="menuType" title="菜单类型" width="100" :edit-render="{}">
|
|
32
|
-
<template #default="{ row }">
|
|
33
|
-
<span v-if="row.menuType === 0">一级菜单</span>
|
|
34
|
-
<span v-if="row.menuType === 1">子菜单</span>
|
|
35
|
-
<span v-if="row.menuType === 2">按钮/权限</span>
|
|
36
|
-
</template>
|
|
37
|
-
<template #edit="{ row }">
|
|
38
|
-
<vxe-select v-model="row.menuType" placeholder="请选择菜单类型">
|
|
39
|
-
<vxe-option v-for="menu in menuTypes" :key="menu.key" :value="menu.value" :label="menu.label"></vxe-option>
|
|
40
|
-
</vxe-select>
|
|
41
|
-
</template>
|
|
42
|
-
</vxe-column>
|
|
43
|
-
<vxe-column field="menuAttribute" title="菜单属性" width="100" :edit-render="{}">
|
|
44
|
-
<template #default="{ row }">
|
|
45
|
-
<span v-if="row.menuAttribute === '1'">采购</span>
|
|
46
|
-
<span v-if="row.menuAttribute === '2'">销售</span>
|
|
47
|
-
<span v-if="row.menuAttribute === '3'">公共</span>
|
|
48
|
-
<span v-if="row.menuAttribute === '4'">平台</span>
|
|
49
|
-
</template>
|
|
50
|
-
<template #edit="{ row }">
|
|
51
|
-
<vxe-select v-model="row.menuAttribute" placeholder="请选择菜单属性">
|
|
52
|
-
<vxe-option v-for="menuAttr in menuAttributeTypes" :key="menuAttr.key" :value="menuAttr.value" :label="menuAttr.label"></vxe-option>
|
|
53
|
-
</vxe-select>
|
|
54
|
-
</template>
|
|
55
|
-
</vxe-column>
|
|
56
|
-
<vxe-column field="component" title="路由视图" width="120" :edit-render="{}" :title-prefix="componentTypesTip">
|
|
57
|
-
<template #default="{ row }">
|
|
58
|
-
<span v-if="row.component === 'layouts/RouteView'">路由视图</span>
|
|
59
|
-
<span v-else-if="row.component === 'layouts/TabLayout'">Tab路由视图</span>
|
|
60
|
-
<span v-else-if="row.component === 'layouts/IframePageView'">Iframe路由视图</span>
|
|
61
|
-
<span v-else>自定义</span>
|
|
62
|
-
</template>
|
|
63
|
-
<template #edit="{ row }">
|
|
64
|
-
<vxe-select v-model="row.component" placeholder="请选择菜单类型">
|
|
65
|
-
<vxe-option v-for="com in componentTypes" :key="com.key" :value="com.value" :label="com.label"></vxe-option>
|
|
66
|
-
</vxe-select>
|
|
67
|
-
<!-- <vxe-input v-model="row.component" type="text"></vxe-input> -->
|
|
68
|
-
</template>
|
|
69
|
-
</vxe-column>
|
|
70
|
-
<vxe-column field="url" title="访问路径" width="180" :edit-render="{}" :title-prefix="{ content: '页面访问的真实路径' }">
|
|
71
|
-
<template #edit="{ row }">
|
|
72
|
-
<vxe-input v-model="row.url" type="text"></vxe-input>
|
|
73
|
-
</template>
|
|
74
|
-
</vxe-column>
|
|
75
|
-
<vxe-column field="perms" title="授权标识" width="250" :edit-render="{}">
|
|
76
|
-
<template #edit="{ row }">
|
|
77
|
-
<vxe-input v-model="row.perms" type="text"></vxe-input>
|
|
78
|
-
</template>
|
|
79
|
-
</vxe-column>
|
|
80
|
-
<!-- <vxe-column field="sortNo" title="排序"></vxe-column> -->
|
|
81
|
-
<vxe-column field="action" title="操作" width="380" fixed="right">
|
|
82
|
-
<template #default="{ row }">
|
|
83
|
-
<vxe-button v-if="row.menuType !== 2" type="text" status="primary" @click="insertRow(row, 'top')">顶部插入节点</vxe-button>
|
|
84
|
-
<vxe-button v-if="row.menuType !== 2" type="text" status="primary" @click="insertRow(row, 'bottom')">尾部插入节点</vxe-button>
|
|
85
|
-
<!-- <vxe-button v-if="row.menuType === 2" type="text" status="primary" @click="insertRow(row, 'current')">插入节点</vxe-button> -->
|
|
86
|
-
<!-- <vxe-button type="text" status="primary" @click="showDrawer('edit')">顶部插入节点</vxe-button>
|
|
87
|
-
<vxe-button type="text" status="primary" @click="showDrawer('new')">尾部插入节点</vxe-button> -->
|
|
88
|
-
<vxe-button type="text" status="danger" @click="removeRow(row)">删除</vxe-button>
|
|
89
|
-
<vxe-button type="text" status="success" v-if="(row.menuType === 0 && row.children && !row.children.length) || row.menuType === 1">说明</vxe-button>
|
|
90
|
-
</template>
|
|
91
|
-
</vxe-column>
|
|
92
|
-
</vxe-table>
|
|
93
|
-
<a-drawer :width="500" :title="drawerTitle" :placement="drawerPlacement" :visible="drawervisible" @close="closeDrawer">
|
|
94
|
-
<template #extra>
|
|
95
|
-
<a-button style="font-size: 12px; margin-right: 8px" size="small" @click="closeDrawer">取消</a-button>
|
|
96
|
-
<a-button style="font-size: 12px" type="primary" size="small" @click="closeDrawer">确定</a-button>
|
|
97
|
-
</template>
|
|
98
|
-
<permission-form></permission-form>
|
|
99
|
-
</a-drawer>
|
|
100
|
-
</div>
|
|
101
|
-
</template>
|
|
102
|
-
<script lang="ts">
|
|
103
|
-
import { defineComponent, reactive, ref, inject } from 'vue'
|
|
104
|
-
import { PermissionDataType } from './types'
|
|
105
|
-
import { VxeTableInstance, VxeTableEvents } from 'vxe-table'
|
|
106
|
-
// import type { DrawerProps } from 'ant-design-vue'
|
|
107
|
-
import { INJECT_HTTP, HttpClient } from '../../../../../src/lib/utils/global.types'
|
|
108
|
-
import PermissionForm from './form.vue'
|
|
109
|
-
export default defineComponent({
|
|
110
|
-
components: {
|
|
111
|
-
PermissionForm,
|
|
112
|
-
},
|
|
113
|
-
props: {
|
|
114
|
-
gridConfig: {
|
|
115
|
-
type: Object,
|
|
116
|
-
required: true,
|
|
117
|
-
},
|
|
118
|
-
},
|
|
119
|
-
setup(props) {
|
|
120
|
-
const tableOptions = ref(props.gridConfig)
|
|
121
|
-
// 菜单类型
|
|
122
|
-
const menuTypes = ref([
|
|
123
|
-
{
|
|
124
|
-
key: 0,
|
|
125
|
-
value: 0,
|
|
126
|
-
label: '一级菜单',
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
key: 1,
|
|
130
|
-
value: 1,
|
|
131
|
-
label: '子菜单',
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
key: 2,
|
|
135
|
-
value: 2,
|
|
136
|
-
label: '按钮/权限',
|
|
137
|
-
},
|
|
138
|
-
])
|
|
139
|
-
// 路由组件类型
|
|
140
|
-
const componentTypes = ref([
|
|
141
|
-
{
|
|
142
|
-
key: 0,
|
|
143
|
-
value: 'qCustom',
|
|
144
|
-
label: '自定义',
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
key: 1,
|
|
148
|
-
value: 'layouts/RouteView',
|
|
149
|
-
label: '路由视图',
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
key: 2,
|
|
153
|
-
value: 'layouts/TabLayout',
|
|
154
|
-
label: 'Tab路由视图',
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
key: 3,
|
|
158
|
-
value: 'layouts/IframePageView',
|
|
159
|
-
label: 'Iframe路由视图',
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
key: 4,
|
|
163
|
-
value: 'listEmbedding',
|
|
164
|
-
label: '列表内嵌',
|
|
165
|
-
},
|
|
166
|
-
])
|
|
167
|
-
const componentTypesTip = ref({
|
|
168
|
-
content: '自定义路由视图使用的是tab路由视图作为父级,并且要以访问路径要一致;列表内嵌属于列表明细页的路由,可任意定义,但是访问路径要比列表的深一级;其它路由视图是继承的关系',
|
|
169
|
-
})
|
|
170
|
-
// 菜单属性类型
|
|
171
|
-
const menuAttributeTypes = ref([
|
|
172
|
-
{
|
|
173
|
-
key: '1',
|
|
174
|
-
value: '1',
|
|
175
|
-
label: '采购',
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
key: '2',
|
|
179
|
-
value: '2',
|
|
180
|
-
label: '销售',
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
key: '3',
|
|
184
|
-
value: '3',
|
|
185
|
-
label: '公共',
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
key: '4',
|
|
189
|
-
value: '4',
|
|
190
|
-
label: '平台',
|
|
191
|
-
},
|
|
192
|
-
])
|
|
193
|
-
const drawerTitle = ref('新建')
|
|
194
|
-
const drawerPlacement = ref<any['placement']>('right')
|
|
195
|
-
const drawervisible = ref<boolean>(false)
|
|
196
|
-
const showDrawer = (type: string) => {
|
|
197
|
-
drawerTitle.value = type === 'new' ? '新建' : '编辑'
|
|
198
|
-
drawervisible.value = true
|
|
199
|
-
}
|
|
200
|
-
const closeDrawer = () => {
|
|
201
|
-
drawervisible.value = false
|
|
202
|
-
}
|
|
203
|
-
const qHttp = inject(INJECT_HTTP) as HttpClient
|
|
204
|
-
const permissionList = ref<PermissionDataType[]>([])
|
|
205
|
-
const tilePermissionList = (result: PermissionDataType[]) => {
|
|
206
|
-
result.forEach((data) => {
|
|
207
|
-
let menu = Object.assign({}, data)
|
|
208
|
-
menu.children && delete menu.children
|
|
209
|
-
permissionList.value.push(menu)
|
|
210
|
-
if (data.children) {
|
|
211
|
-
tilePermissionList(data.children)
|
|
212
|
-
}
|
|
213
|
-
})
|
|
214
|
-
}
|
|
215
|
-
qHttp.registerModuleAction('PermissionModule/getPermissionList').then((res) => {
|
|
216
|
-
if (res && res.success) {
|
|
217
|
-
tilePermissionList(res.result)
|
|
218
|
-
console.log(permissionList.value)
|
|
219
|
-
}
|
|
220
|
-
})
|
|
221
|
-
const xTable = ref<VxeTableInstance>()
|
|
222
|
-
// const xToolbar = ref<VxeToolbarInstance>()
|
|
223
|
-
const demo2 = reactive({
|
|
224
|
-
tableData: [
|
|
225
|
-
{ id: 10000, parentId: null, name: 'test abc1', type: 'mp3', size: 1024, date: '2020-08-01' },
|
|
226
|
-
{ id: 10050, parentId: null, name: 'Test2', type: 'mp4', size: null, date: '2021-04-01' },
|
|
227
|
-
{ id: 24300, parentId: 10050, name: 'Test3', type: 'avi', size: 1024, date: '2020-03-01' },
|
|
228
|
-
{ id: 20045, parentId: 24300, name: 'test abc4', type: 'html', size: 600, date: '2021-04-01' },
|
|
229
|
-
{ id: 10053, parentId: 24300, name: 'test abc96', type: 'avi', size: null, date: '2021-04-01' },
|
|
230
|
-
{ id: 24330, parentId: 10053, name: 'test abc5', type: 'txt', size: 25, date: '2021-10-01' },
|
|
231
|
-
{ id: 21011, parentId: 10053, name: 'Test6', type: 'pdf', size: 512, date: '2020-01-01' },
|
|
232
|
-
{ id: 22200, parentId: 10053, name: 'Test7', type: 'js', size: 1024, date: '2021-06-01' },
|
|
233
|
-
{ id: 23666, parentId: null, name: 'Test8', type: 'xlsx', size: 2048, date: '2020-11-01' },
|
|
234
|
-
{ id: 23677, parentId: 23666, name: 'Test7', type: 'js', size: 1024, date: '2021-06-01' },
|
|
235
|
-
{ id: 23671, parentId: 23677, name: 'Test7', type: 'js', size: 1024, date: '2021-06-01' },
|
|
236
|
-
{ id: 23672, parentId: 23677, name: 'Test7', type: 'js', size: 1024, date: '2021-06-01' },
|
|
237
|
-
{ id: 23688, parentId: 23666, name: 'Test7', type: 'js', size: 1024, date: '2021-06-01' },
|
|
238
|
-
{ id: 23681, parentId: 23688, name: 'Test7', type: 'js', size: 1024, date: '2021-06-01' },
|
|
239
|
-
{ id: 23682, parentId: 23688, name: 'Test7', type: 'js', size: 1024, date: '2021-06-01' },
|
|
240
|
-
{ id: 24555, parentId: null, name: 'test abc9', type: 'avi', size: 224, date: '2020-10-01' },
|
|
241
|
-
{ id: 24566, parentId: 24555, name: 'Test7', type: 'js', size: 1024, date: '2021-06-01' },
|
|
242
|
-
{ id: 24577, parentId: 24555, name: 'Test7', type: 'js', size: 1024, date: '2021-06-01' },
|
|
243
|
-
],
|
|
244
|
-
})
|
|
245
|
-
|
|
246
|
-
const selectChangeEvent: VxeTableEvents.CheckboxChange = ({ $table }) => {
|
|
247
|
-
const records = $table.getCheckboxRecords()
|
|
248
|
-
console.info(`勾选${records.length}个树形节点`, records)
|
|
249
|
-
}
|
|
250
|
-
// const http: qqtApi.Request = qqtApi.useHttp()
|
|
251
|
-
// http.registerModuleAction('PermissionModule/getPermissionList').then(() => {
|
|
252
|
-
// console.log(111)
|
|
253
|
-
// })
|
|
254
|
-
// 插入
|
|
255
|
-
const insertRow = async (currentRow: PermissionDataType, locat: string) => {
|
|
256
|
-
const $table = xTable.value
|
|
257
|
-
if ($table) {
|
|
258
|
-
const waitInsertData = {
|
|
259
|
-
id: Date.now(),
|
|
260
|
-
parentId: locat === 'current' ? currentRow.parentId : currentRow.id,
|
|
261
|
-
name: currentRow.name + '子菜单',
|
|
262
|
-
}
|
|
263
|
-
if (locat === 'current') {
|
|
264
|
-
const { row: newRow } = await $table.insertAt(waitInsertData, currentRow)
|
|
265
|
-
await $table.setEditRow(newRow)
|
|
266
|
-
} else if (locat === 'top') {
|
|
267
|
-
const { row: newRow } = await $table.insert(waitInsertData)
|
|
268
|
-
await $table.setTreeExpand(currentRow, true) // 将父节点展开
|
|
269
|
-
await $table.setEditRow(newRow)
|
|
270
|
-
} else if (locat === 'bottom') {
|
|
271
|
-
const { row: newRow } = await $table.insertAt(waitInsertData, -1)
|
|
272
|
-
await $table.setTreeExpand(currentRow, true) // 将父节点展开
|
|
273
|
-
await $table.setEditRow(newRow)
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
// 删除
|
|
278
|
-
const removeRow = async (currentRow: PermissionDataType) => {
|
|
279
|
-
if (xTable.value) {
|
|
280
|
-
const $table = xTable.value
|
|
281
|
-
await $table.remove(currentRow)
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
return {
|
|
285
|
-
tableOptions,
|
|
286
|
-
menuTypes,
|
|
287
|
-
componentTypes,
|
|
288
|
-
componentTypesTip,
|
|
289
|
-
menuAttributeTypes,
|
|
290
|
-
xTable,
|
|
291
|
-
insertRow,
|
|
292
|
-
removeRow,
|
|
293
|
-
drawerTitle,
|
|
294
|
-
drawerPlacement,
|
|
295
|
-
drawervisible,
|
|
296
|
-
showDrawer,
|
|
297
|
-
closeDrawer,
|
|
298
|
-
permissionList,
|
|
299
|
-
demo2,
|
|
300
|
-
selectChangeEvent,
|
|
301
|
-
}
|
|
302
|
-
},
|
|
303
|
-
})
|
|
304
|
-
</script>
|
|
305
|
-
<style scoped lang="scss">
|
|
306
|
-
.permission-box {
|
|
307
|
-
height: 100%;
|
|
308
|
-
}
|
|
309
|
-
</style>
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
export interface PermissionDataType {
|
|
2
|
-
id?: string
|
|
3
|
-
alwaysShow?: boolean
|
|
4
|
-
children?: PermissionDataType[] | null
|
|
5
|
-
companyMeunId?: string
|
|
6
|
-
component?: string
|
|
7
|
-
createBy?: string
|
|
8
|
-
createTime?: string
|
|
9
|
-
defaultMenu?: string
|
|
10
|
-
deleted?: string | number
|
|
11
|
-
description?: string
|
|
12
|
-
helpDocUrl?: string
|
|
13
|
-
hidden?: boolean
|
|
14
|
-
icon?: string
|
|
15
|
-
iconColor?: string
|
|
16
|
-
internalOrExternal?: boolean
|
|
17
|
-
isLeaf?: boolean
|
|
18
|
-
keepAlive?: boolean
|
|
19
|
-
key?: string
|
|
20
|
-
leaf?: boolean
|
|
21
|
-
menuAttribute?: number | string
|
|
22
|
-
menuType?: string | number
|
|
23
|
-
mobile?: boolean
|
|
24
|
-
name?: string
|
|
25
|
-
nameI18nKey?: string
|
|
26
|
-
parentId?: string
|
|
27
|
-
perms?: string
|
|
28
|
-
permsType?: string | number
|
|
29
|
-
purchasePermissionId?: string | number
|
|
30
|
-
redirect?: string
|
|
31
|
-
route?: boolean
|
|
32
|
-
sortNo?: string | number | null
|
|
33
|
-
status?: string | number
|
|
34
|
-
superQueryFlag?: boolean
|
|
35
|
-
title?: string
|
|
36
|
-
updateBy?: string
|
|
37
|
-
updateTime?: string
|
|
38
|
-
url?: string
|
|
39
|
-
}
|
|
40
|
-
export interface PermissionFormState {
|
|
41
|
-
username: string
|
|
42
|
-
nickname: string
|
|
43
|
-
checkNick: boolean
|
|
44
|
-
}
|