feat: tool
This commit is contained in:
parent
11fa3c4814
commit
db7b267326
@ -253,6 +253,12 @@
|
|||||||
<AppIcon iconName="app-operation" class="mr-4"></AppIcon>
|
<AppIcon iconName="app-operation" class="mr-4"></AppIcon>
|
||||||
{{ $t('common.param.initParam') }}
|
{{ $t('common.param.initParam') }}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
|
<el-dropdown-item
|
||||||
|
v-if="isSystemShare"
|
||||||
|
icon="Lock"
|
||||||
|
@click.stop="openAuthorizedWorkspaceDialog(item)"
|
||||||
|
>{{ $t('views.system.shared.authorized_workspace') }}</el-dropdown-item
|
||||||
|
>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
v-if="!item.template_id && permissionPrecise.export()"
|
v-if="!item.template_id && permissionPrecise.export()"
|
||||||
@click.stop="exportTool(item)"
|
@click.stop="exportTool(item)"
|
||||||
@ -289,6 +295,10 @@
|
|||||||
ref="addInternalFunctionDialogRef"
|
ref="addInternalFunctionDialogRef"
|
||||||
@refresh="confirmAddInternalFunction"
|
@refresh="confirmAddInternalFunction"
|
||||||
/>
|
/>
|
||||||
|
<AuthorizedWorkspace
|
||||||
|
ref="AuthorizedWorkspaceDialogRef"
|
||||||
|
v-if="isSystemShare"
|
||||||
|
></AuthorizedWorkspace>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
@ -299,6 +309,7 @@ import { useRoute } from 'vue-router'
|
|||||||
import InitParamDrawer from '@/views/tool/component/InitParamDrawer.vue'
|
import InitParamDrawer from '@/views/tool/component/InitParamDrawer.vue'
|
||||||
import ToolFormDrawer from '@/views/tool/ToolFormDrawer.vue'
|
import ToolFormDrawer from '@/views/tool/ToolFormDrawer.vue'
|
||||||
import CreateFolderDialog from '@/components/folder-tree/CreateFolderDialog.vue'
|
import CreateFolderDialog from '@/components/folder-tree/CreateFolderDialog.vue'
|
||||||
|
import AuthorizedWorkspace from '@/views/shared/AuthorizedWorkspaceDialog.vue'
|
||||||
import { isAppIcon } from '@/utils/common'
|
import { isAppIcon } from '@/utils/common'
|
||||||
import { MsgSuccess, MsgConfirm, MsgError } from '@/utils/message'
|
import { MsgSuccess, MsgConfirm, MsgError } from '@/utils/message'
|
||||||
import { EditionConst, PermissionConst, RoleConst } from '@/utils/permission/data'
|
import { EditionConst, PermissionConst, RoleConst } from '@/utils/permission/data'
|
||||||
@ -322,6 +333,14 @@ const type = computed(() => {
|
|||||||
return 'workspace'
|
return 'workspace'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const isShared = computed(() => {
|
||||||
|
return folder.currentFolder.id === 'share'
|
||||||
|
})
|
||||||
|
const isSystemShare = computed(() => {
|
||||||
|
return type.value === 'systemShare'
|
||||||
|
})
|
||||||
|
|
||||||
const permissionPrecise = computed(() => {
|
const permissionPrecise = computed(() => {
|
||||||
return permissionMap['tool'][type.value]
|
return permissionMap['tool'][type.value]
|
||||||
})
|
})
|
||||||
@ -345,18 +364,19 @@ const paginationConfig = reactive({
|
|||||||
total: 0,
|
total: 0,
|
||||||
})
|
})
|
||||||
|
|
||||||
const currentFolder = ref<any>({})
|
|
||||||
|
|
||||||
const isShared = computed(() => {
|
|
||||||
return folder.currentFolder.id === 'share'
|
|
||||||
})
|
|
||||||
|
|
||||||
const search_type_change = () => {
|
const search_type_change = () => {
|
||||||
search_form.value = { name: '', create_user: '' }
|
search_form.value = { name: '', create_user: '' }
|
||||||
}
|
}
|
||||||
const ToolFormDrawerRef = ref()
|
const ToolFormDrawerRef = ref()
|
||||||
const ToolDrawertitle = ref('')
|
const ToolDrawertitle = ref('')
|
||||||
|
|
||||||
|
const AuthorizedWorkspaceDialogRef = ref()
|
||||||
|
function openAuthorizedWorkspaceDialog(row: any) {
|
||||||
|
if (AuthorizedWorkspaceDialogRef.value) {
|
||||||
|
AuthorizedWorkspaceDialogRef.value.open(row, 'Tool')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function openCreateDialog(data?: any) {
|
function openCreateDialog(data?: any) {
|
||||||
// 有template_id的不允许编辑,是模板转换来的
|
// 有template_id的不允许编辑,是模板转换来的
|
||||||
if (data?.template_id) {
|
if (data?.template_id) {
|
||||||
@ -500,7 +520,7 @@ function configInitParams(item: any) {
|
|||||||
|
|
||||||
const toolStoreDialogRef = ref<InstanceType<typeof ToolStoreDialog>>()
|
const toolStoreDialogRef = ref<InstanceType<typeof ToolStoreDialog>>()
|
||||||
function openToolStoreDialog() {
|
function openToolStoreDialog() {
|
||||||
toolStoreDialogRef.value?.open(currentFolder.value.id)
|
toolStoreDialogRef.value?.open(folder.currentFolder.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
const addInternalFunctionDialogRef = ref<InstanceType<typeof AddInternalFunctionDialog>>()
|
const addInternalFunctionDialogRef = ref<InstanceType<typeof AddInternalFunctionDialog>>()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user