pref:批量上传&资源管理小优化 (#199)

This commit is contained in:
wang-liang0615 2023-10-12 15:06:39 +08:00 committed by GitHub
parent 4e1f25b389
commit cbe579fdb4
4 changed files with 15 additions and 8 deletions

View File

@ -99,7 +99,7 @@
align="center"
show-overflow>
<template #default="{ row }">
<span v-show="row.isGroup">
<span v-show="isGroup">
<a @click="handleDisplayMember(row)">成员</a>
<a-divider type="vertical" />
<a @click="handleGroupEdit(row)">编辑</a>

View File

@ -61,18 +61,18 @@ const genCmdbRoutes = async () => {
name: 'cmdb_disabled2',
meta: { title: '配置', disabled: true, },
},
{
path: '/cmdb/batch',
component: () => import('../views/batch'),
name: 'cmdb_batch',
meta: { 'title': '批量导入', icon: 'ops-cmdb-batch', selectedIcon: 'ops-cmdb-batch-selected', keepAlive: false }
},
{
path: '/cmdb/preference',
component: () => import('../views/preference/index'),
name: 'cmdb_preference',
meta: { title: '我的订阅', icon: 'ops-cmdb-preference', selectedIcon: 'ops-cmdb-preference-selected', keepAlive: false }
},
{
path: '/cmdb/batch',
component: () => import('../views/batch'),
name: 'cmdb_batch',
meta: { 'title': '批量导入', icon: 'ops-cmdb-batch', selectedIcon: 'ops-cmdb-batch-selected', keepAlive: false }
},
{
path: '/cmdb/ci_types',
name: 'ci_type',

View File

@ -5,7 +5,7 @@
</div>
<a-row>
<a-col :span="12">
<upload-file-form ref="uploadFileForm" @uploadDone="uploadDone"></upload-file-form>
<upload-file-form :ciType="ciType" ref="uploadFileForm" @uploadDone="uploadDone"></upload-file-form>
</a-col>
<a-col :span="24" v-if="ciType && uploadData.length">
<CiUploadTable :ciTypeAttrs="ciTypeAttrs" ref="ciUploadTable" :uploadData="uploadData"></CiUploadTable>

View File

@ -7,6 +7,7 @@
accept=".xls,.xlsx"
:showUploadList="false"
:fileList="fileList"
:disabled="!ciType"
>
<img :style="{ width: '80px', height: '80px' }" src="@/assets/file_upload.png" />
<p class="ant-upload-text">点击或拖拽文件至此上传</p>
@ -24,6 +25,12 @@ import { processFile } from '@/modules/cmdb/api/batch'
export default {
name: 'UploadFileForm',
props: {
ciType: {
type: Number,
default: 0,
}
},
data() {
return {
ciItemNum: 0,