feat: rescource style
This commit is contained in:
parent
5ba00faf82
commit
754c309b52
@ -15,9 +15,9 @@
|
|||||||
style="width: 120px"
|
style="width: 120px"
|
||||||
@change="search_type_change"
|
@change="search_type_change"
|
||||||
>
|
>
|
||||||
<el-option :label="$t('common.creator')" value="create_user"/>
|
<el-option :label="$t('common.creator')" value="create_user" />
|
||||||
|
|
||||||
<el-option :label="$t('common.name')" value="name"/>
|
<el-option :label="$t('common.name')" value="name" />
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-input
|
<el-input
|
||||||
v-if="search_type === 'name'"
|
v-if="search_type === 'name'"
|
||||||
@ -35,7 +35,7 @@
|
|||||||
filterable
|
filterable
|
||||||
style="width: 220px"
|
style="width: 220px"
|
||||||
>
|
>
|
||||||
<el-option v-for="u in user_options" :key="u.id" :value="u.id" :label="u.nick_name"/>
|
<el-option v-for="u in user_options" :key="u.id" :value="u.id" :label="u.nick_name" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -58,10 +58,10 @@
|
|||||||
style="background: none"
|
style="background: none"
|
||||||
class="mr-8"
|
class="mr-8"
|
||||||
>
|
>
|
||||||
<img :src="resetUrl(scope.row?.icon)" alt=""/>
|
<img :src="resetUrl(scope.row?.icon)" alt="" />
|
||||||
</el-avatar>
|
</el-avatar>
|
||||||
<el-avatar v-else class="avatar-green" shape="square" :size="24">
|
<el-avatar v-else class="avatar-green" shape="square" :size="24">
|
||||||
<img src="@/assets/node/icon_tool.svg" style="width: 58%" alt=""/>
|
<img src="@/assets/node/icon_tool.svg" style="width: 58%" alt="" />
|
||||||
</el-avatar>
|
</el-avatar>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
{{ scope.row.name }}
|
{{ scope.row.name }}
|
||||||
@ -101,7 +101,7 @@
|
|||||||
@click="statusVisible = !statusVisible"
|
@click="statusVisible = !statusVisible"
|
||||||
>
|
>
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<Filter/>
|
<Filter />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@ -126,10 +126,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
<el-button size="small" @click="filterStatusChange('clear')"
|
<el-button size="small" @click="filterStatusChange('clear')"
|
||||||
>{{ $t('common.clear') }}
|
>{{ $t('common.clear') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" @click="filterStatusChange" size="small"
|
<el-button type="primary" @click="filterStatusChange" size="small"
|
||||||
>{{ $t('common.confirm') }}
|
>{{ $t('common.confirm') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
@ -138,17 +138,17 @@
|
|||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div v-if="scope.row.is_publish" class="flex align-center">
|
<div v-if="scope.row.is_publish" class="flex align-center">
|
||||||
<el-icon class="color-success mr-8" style="font-size: 16px">
|
<el-icon class="color-success mr-8" style="font-size: 16px">
|
||||||
<SuccessFilled/>
|
<SuccessFilled />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
<span class="color-secondary">
|
<span class="color-secondary">
|
||||||
{{ $t('views.application.status.published') }}
|
{{ $t('views.application.status.published') }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="flex align-center">
|
<div v-else class="flex align-center">
|
||||||
<AppIcon iconName="app-disabled" class="color-secondary mr-8"></AppIcon>
|
<AppIcon iconName="app-disabled" class="color-secondary mr-8"></AppIcon>
|
||||||
<span class="color-secondary">
|
<span class="color-secondary">
|
||||||
{{ $t('views.application.status.unpublished') }}
|
{{ $t('views.application.status.unpublished') }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -171,7 +171,7 @@
|
|||||||
@click="workspaceVisible = !workspaceVisible"
|
@click="workspaceVisible = !workspaceVisible"
|
||||||
>
|
>
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<Filter/>
|
<Filter />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@ -196,10 +196,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
<el-button size="small" @click="filterWorkspaceChange('clear')"
|
<el-button size="small" @click="filterWorkspaceChange('clear')"
|
||||||
>{{ $t('common.clear') }}
|
>{{ $t('common.clear') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" @click="filterWorkspaceChange" size="small"
|
<el-button type="primary" @click="filterWorkspaceChange" size="small"
|
||||||
>{{ $t('common.confirm') }}
|
>{{ $t('common.confirm') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
@ -207,19 +207,22 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="nick_name" :label="$t('common.creator')" show-overflow-tooltip
|
<el-table-column
|
||||||
width="120"/>
|
prop="nick_name"
|
||||||
<el-table-column :label="$t('views.application.publishTime')" width="120">
|
:label="$t('common.creator')"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column :label="$t('views.application.publishTime')" width="180">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
{{ datetimeFormat(row.update_time) }}
|
{{ datetimeFormat(row.update_time) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('views.document.table.updateTime')" width="120">
|
<el-table-column :label="$t('views.document.table.updateTime')" width="180">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
{{ datetimeFormat(row.update_time) }}
|
{{ datetimeFormat(row.update_time) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('common.createTime')" width="120">
|
<el-table-column :label="$t('common.createTime')" width="180">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
{{ datetimeFormat(row.create_time) }}
|
{{ datetimeFormat(row.create_time) }}
|
||||||
</template>
|
</template>
|
||||||
@ -230,17 +233,17 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {onMounted, ref, reactive, computed} from 'vue'
|
import { onMounted, ref, reactive, computed } from 'vue'
|
||||||
import ApplicationResourceApi from '@/api/system-resource-management/application'
|
import ApplicationResourceApi from '@/api/system-resource-management/application'
|
||||||
import {t} from '@/locales'
|
import { t } from '@/locales'
|
||||||
import {isAppIcon, resetUrl} from '@/utils/common'
|
import { isAppIcon, resetUrl } from '@/utils/common'
|
||||||
import useStore from '@/stores'
|
import useStore from '@/stores'
|
||||||
import {datetimeFormat} from '@/utils/time'
|
import { datetimeFormat } from '@/utils/time'
|
||||||
import {loadPermissionApi} from "@/utils/dynamics-api/permission-api.ts";
|
import { loadPermissionApi } from '@/utils/dynamics-api/permission-api.ts'
|
||||||
import {isWorkFlow} from "@/utils/application.ts";
|
import { isWorkFlow } from '@/utils/application.ts'
|
||||||
import UserApi from "@/api/user/user.ts";
|
import UserApi from '@/api/user/user.ts'
|
||||||
|
|
||||||
const {user} = useStore()
|
const { user } = useStore()
|
||||||
|
|
||||||
const search_type = ref('name')
|
const search_type = ref('name')
|
||||||
const search_form = ref<any>({
|
const search_form = ref<any>({
|
||||||
@ -262,13 +265,16 @@ const workspaceVisible = ref(false)
|
|||||||
const workspaceArr = ref<any[]>([])
|
const workspaceArr = ref<any[]>([])
|
||||||
const statusVisible = ref(false)
|
const statusVisible = ref(false)
|
||||||
const statusArr = ref<any[]>([])
|
const statusArr = ref<any[]>([])
|
||||||
const statusOptions = ref<any[]>([{
|
const statusOptions = ref<any[]>([
|
||||||
label: t('views.application.status.published'),
|
{
|
||||||
value: true,
|
label: t('views.application.status.published'),
|
||||||
}, {
|
value: true,
|
||||||
label: t('views.application.status.unpublished'),
|
},
|
||||||
value: false,
|
{
|
||||||
}])
|
label: t('views.application.status.unpublished'),
|
||||||
|
value: false,
|
||||||
|
},
|
||||||
|
])
|
||||||
|
|
||||||
function filterWorkspaceChange(val: string) {
|
function filterWorkspaceChange(val: string) {
|
||||||
if (val === 'clear') {
|
if (val === 'clear') {
|
||||||
@ -297,7 +303,7 @@ async function getWorkspaceList() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const search_type_change = () => {
|
const search_type_change = () => {
|
||||||
search_form.value = {name: '', create_user: ''}
|
search_form.value = { name: '', create_user: '' }
|
||||||
}
|
}
|
||||||
|
|
||||||
function getList() {
|
function getList() {
|
||||||
@ -309,7 +315,7 @@ function getList() {
|
|||||||
params['workspace_ids'] = JSON.stringify(workspaceArr.value)
|
params['workspace_ids'] = JSON.stringify(workspaceArr.value)
|
||||||
}
|
}
|
||||||
if (statusArr.value.length > 0) {
|
if (statusArr.value.length > 0) {
|
||||||
params['status'] = JSON.stringify(statusArr.value)
|
params['status'] = JSON.stringify(statusArr.value)
|
||||||
}
|
}
|
||||||
ApplicationResourceApi.getApplication(paginationConfig, params, loading).then((res: any) => {
|
ApplicationResourceApi.getApplication(paginationConfig, params, loading).then((res: any) => {
|
||||||
paginationConfig.total = res.data?.total
|
paginationConfig.total = res.data?.total
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user