|
|
@ -14,18 +14,22 @@
|
|
|
|
<a-col :md="6" :sm="24">
|
|
|
|
<a-col :md="6" :sm="24">
|
|
|
|
<a-form-item label="存储位置">
|
|
|
|
<a-form-item label="存储位置">
|
|
|
|
<a-select v-model="queryParam.attachmentType">
|
|
|
|
<a-select v-model="queryParam.attachmentType">
|
|
|
|
<a-select-option value="local">本地</a-select-option>
|
|
|
|
<a-select-option
|
|
|
|
<a-select-option value="smms">SM.MS</a-select-option>
|
|
|
|
v-for="item in Object.keys(attachmentType)"
|
|
|
|
<a-select-option value="upyun">又拍云</a-select-option>
|
|
|
|
:key="item"
|
|
|
|
<a-select-option value="qnyun">七牛云</a-select-option>
|
|
|
|
:value="item"
|
|
|
|
<a-select-option value="aliyun">阿里云</a-select-option>
|
|
|
|
>{{ attachmentType[item].text }}</a-select-option>
|
|
|
|
</a-select>
|
|
|
|
</a-select>
|
|
|
|
</a-form-item>
|
|
|
|
</a-form-item>
|
|
|
|
</a-col>
|
|
|
|
</a-col>
|
|
|
|
<a-col :md="6" :sm="24">
|
|
|
|
<a-col :md="6" :sm="24">
|
|
|
|
<a-form-item label="文件类型">
|
|
|
|
<a-form-item label="文件类型">
|
|
|
|
<a-select v-model="queryParam.mediaType">
|
|
|
|
<a-select v-model="queryParam.mediaType">
|
|
|
|
<a-select-option v-for="(item,index) in mediaTypes" :key="index" :value="item">{{ item }}</a-select-option>
|
|
|
|
<a-select-option
|
|
|
|
|
|
|
|
v-for="(item,index) in mediaTypes"
|
|
|
|
|
|
|
|
:key="index"
|
|
|
|
|
|
|
|
:value="item"
|
|
|
|
|
|
|
|
>{{ item }}</a-select-option>
|
|
|
|
</a-select>
|
|
|
|
</a-select>
|
|
|
|
</a-form-item>
|
|
|
|
</a-form-item>
|
|
|
|
</a-col>
|
|
|
|
</a-col>
|
|
|
@ -46,7 +50,7 @@
|
|
|
|
<a-col :span="24">
|
|
|
|
<a-col :span="24">
|
|
|
|
<a-list
|
|
|
|
<a-list
|
|
|
|
:grid="{ gutter: 12, xs: 1, sm: 2, md: 4, lg: 6, xl: 6, xxl: 6 }"
|
|
|
|
:grid="{ gutter: 12, xs: 1, sm: 2, md: 4, lg: 6, xl: 6, xxl: 6 }"
|
|
|
|
:dataSource="attachments"
|
|
|
|
:dataSource="formattedDatas"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<a-list-item slot="renderItem" slot-scope="item, index" :key="index">
|
|
|
|
<a-list-item slot="renderItem" slot-scope="item, index" :key="index">
|
|
|
|
<a-card :bodyStyle="{ padding: 0 }" hoverable @click="showDetailDrawer(item)">
|
|
|
|
<a-card :bodyStyle="{ padding: 0 }" hoverable @click="showDetailDrawer(item)">
|
|
|
@ -103,6 +107,7 @@ export default {
|
|
|
|
mixins: [mixin, mixinDevice],
|
|
|
|
mixins: [mixin, mixinDevice],
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
|
|
|
|
attachmentType: attachmentApi.type,
|
|
|
|
uploadVisible: false,
|
|
|
|
uploadVisible: false,
|
|
|
|
selectAttachment: {},
|
|
|
|
selectAttachment: {},
|
|
|
|
attachments: [],
|
|
|
|
attachments: [],
|
|
|
@ -125,6 +130,14 @@ export default {
|
|
|
|
drawerVisiable: false
|
|
|
|
drawerVisiable: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
computed: {
|
|
|
|
|
|
|
|
formattedDatas() {
|
|
|
|
|
|
|
|
return this.attachments.map(attachment => {
|
|
|
|
|
|
|
|
attachment.typeProperty = this.attachmentType[attachment.type]
|
|
|
|
|
|
|
|
return attachment
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
|
this.loadAttachments()
|
|
|
|
this.loadAttachments()
|
|
|
|
this.loadMediaTypes()
|
|
|
|
this.loadMediaTypes()
|
|
|
|