refactor: clean up whitespace and formatting in index.vue
This commit is contained in:
parent
caa03dc489
commit
723aaf30c3
@ -203,7 +203,9 @@
|
||||
{{ $t('views.application.status.published') }}
|
||||
</span>
|
||||
<el-divider direction="vertical"/>
|
||||
<el-icon class="mr-8"><Clock /></el-icon>
|
||||
<el-icon class="mr-8">
|
||||
<Clock/>
|
||||
</el-icon>
|
||||
<span class="color-secondary">{{ dateFormat(item.update_time) }}</span>
|
||||
</div>
|
||||
<div v-else class="flex align-center">
|
||||
@ -233,7 +235,9 @@
|
||||
@click.stop="settingApplication(item)"
|
||||
v-if="permissionPrecise.edit(item.id)"
|
||||
>
|
||||
<el-icon><Setting /></el-icon>
|
||||
<el-icon>
|
||||
<Setting/>
|
||||
</el-icon>
|
||||
{{ $t('common.setting') }}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
@ -263,7 +267,8 @@
|
||||
icon="Delete"
|
||||
@click.stop="deleteApplication(item)"
|
||||
v-if="permissionPrecise.delete(item.id)"
|
||||
>{{ $t('common.delete') }}</el-dropdown-item
|
||||
>{{ $t('common.delete') }}
|
||||
</el-dropdown-item
|
||||
>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
@ -343,6 +348,7 @@ const applicationList = ref<any[]>([])
|
||||
const CopyApplicationDialogRef = ref()
|
||||
|
||||
const MoveToDialogRef = ref()
|
||||
|
||||
function openMoveToDialog(data: any) {
|
||||
const obj = {
|
||||
id: data.id,
|
||||
@ -350,6 +356,7 @@ function openMoveToDialog(data: any) {
|
||||
}
|
||||
MoveToDialogRef.value?.open(obj)
|
||||
}
|
||||
|
||||
function refreshApplicationList(row: any) {
|
||||
const index = applicationList.value.findIndex((v) => v.id === row.id)
|
||||
applicationList.value.splice(index, 1)
|
||||
@ -370,8 +377,11 @@ const get_route=(item: any)=>{
|
||||
RoleConst.WORKSPACE_MANAGE.getWorkspaceRole,
|
||||
PermissionConst.APPLICATION_EDIT.getWorkspacePermissionWorkspaceManageRole,
|
||||
PermissionConst.APPLICATION_EDIT.getApplicationWorkspaceResourcePermission(item.id)], 'OR')) {
|
||||
if(item.type=='WORK_FLOW'){ return `/application/${item.id}/workflow`}else{
|
||||
return `/application/${item.id}/${item.type}/setting`}
|
||||
if (item.type == 'WORK_FLOW') {
|
||||
return `/application/${item.id}/workflow`
|
||||
} else {
|
||||
return `/application/${item.id}/${item.type}/setting`
|
||||
}
|
||||
} else if (hasPermission([new ComplexPermission([RoleConst.USER], [PermissionConst.APPLICATION.getApplicationWorkspaceResourcePermission(item.id)], [EditionConst.IS_EE, EditionConst.IS_PE], 'AND'),
|
||||
new ComplexPermission([RoleConst.WORKSPACE_MANAGE.getWorkspaceRole,], [PermissionConst.APPLICATION_ACCESS_READ.getWorkspacePermissionWorkspaceManageRole], [EditionConst.IS_EE, EditionConst.IS_PE], 'OR'),
|
||||
new ComplexPermission([], [PermissionConst.APPLICATION_ACCESS_READ.getApplicationWorkspaceResourcePermission(item.id)], [EditionConst.IS_EE, EditionConst.IS_PE], 'OR'),], 'OR')) {
|
||||
@ -388,21 +398,9 @@ const get_route=(item: any)=>{
|
||||
}
|
||||
|
||||
const CreateApplicationDialogRef = ref()
|
||||
|
||||
function openCreateDialog(type?: string) {
|
||||
common
|
||||
.asyncGetValid(ValidType.Application, ValidCount.Application, loading)
|
||||
.then(async (res: any) => {
|
||||
if (res?.data) {
|
||||
CreateApplicationDialogRef.value.open(folder.currentFolder?.id || 'default', type)
|
||||
} else if (res?.code === 400) {
|
||||
MsgConfirm(t('common.tip'), t('views.application.tip.professionalMessage'), {
|
||||
cancelButtonText: t('common.confirm'),
|
||||
confirmButtonText: t('common.professional'),
|
||||
}).then(() => {
|
||||
window.open('https://maxkb.cn/pricing.html', '_blank')
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const search_type_change = () => {
|
||||
@ -489,7 +487,8 @@ function deleteApplication(row: any) {
|
||||
MsgSuccess(t('common.deleteSuccess'))
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch(() => {
|
||||
})
|
||||
}
|
||||
|
||||
const exportApplication = (application: any) => {
|
||||
@ -528,6 +527,7 @@ const importApplication = (file: any) => {
|
||||
|
||||
// 文件夹相关
|
||||
const CreateFolderDialogRef = ref()
|
||||
|
||||
function openCreateFolder() {
|
||||
CreateFolderDialogRef.value.open(SourceTypeEnum.APPLICATION, folder.currentFolder.id)
|
||||
}
|
||||
@ -549,6 +549,7 @@ function clickFolder(item: any) {
|
||||
applicationList.value = []
|
||||
getList()
|
||||
}
|
||||
|
||||
function folderClickHandle(row: any) {
|
||||
if (row.id === folder.currentFolder?.id) {
|
||||
return
|
||||
@ -557,6 +558,7 @@ function folderClickHandle(row: any) {
|
||||
applicationList.value = []
|
||||
getList()
|
||||
}
|
||||
|
||||
function refreshFolder() {
|
||||
applicationList.value = []
|
||||
getFolder()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user