|
@@ -252,7 +252,10 @@
|
|
|
></resourceUpload>
|
|
></resourceUpload>
|
|
|
<!-- 发布模态框 -->
|
|
<!-- 发布模态框 -->
|
|
|
<releaseModal v-if="releaseVisible" @close="releaseVisible = false" @confirm="releaseConfirm"></releaseModal>
|
|
<releaseModal v-if="releaseVisible" @close="releaseVisible = false" @confirm="releaseConfirm"></releaseModal>
|
|
|
|
|
+ <div style="height: 20px"></div>
|
|
|
|
|
+ <span>容量</span><span style="color: #6abe39"> {{bToMb(storageMin)}}MB</span><span>/</span><span style="color: red">{{bToMb(storageMax)}}MB</span>
|
|
|
</a-card>
|
|
</a-card>
|
|
|
|
|
+
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
@@ -263,21 +266,11 @@
|
|
|
import resourceAuditApi from '@/api/resourceAudit.js'
|
|
import resourceAuditApi from '@/api/resourceAudit.js'
|
|
|
import permissionTree from './permissionTree.vue'
|
|
import permissionTree from './permissionTree.vue'
|
|
|
import auditModal from './auditModal.vue'
|
|
import auditModal from './auditModal.vue'
|
|
|
|
|
+ import { getstorage } from '@/api/myResource/user'
|
|
|
import CustomPagination from '@/components/customPagination.vue'
|
|
import CustomPagination from '@/components/customPagination.vue'
|
|
|
import tool from '@/utils/tool'
|
|
import tool from '@/utils/tool'
|
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
|
- import {
|
|
|
|
|
- FileOutlined,
|
|
|
|
|
- FileImageOutlined,
|
|
|
|
|
- FilePdfOutlined,
|
|
|
|
|
- FileWordOutlined,
|
|
|
|
|
- FileExcelOutlined,
|
|
|
|
|
- FilePptOutlined,
|
|
|
|
|
- FileTextOutlined,
|
|
|
|
|
- FileZipOutlined,
|
|
|
|
|
- PlaySquareOutlined
|
|
|
|
|
- } from '@ant-design/icons-vue'
|
|
|
|
|
// eslint-disable-next-line vue/no-setup-props-destructure
|
|
// eslint-disable-next-line vue/no-setup-props-destructure
|
|
|
const { pageType } = defineProps({
|
|
const { pageType } = defineProps({
|
|
|
pageType: {
|
|
pageType: {
|
|
@@ -324,6 +317,10 @@
|
|
|
const isState = ref(0) //是否是编辑 0:新增 1:编辑
|
|
const isState = ref(0) //是否是编辑 0:新增 1:编辑
|
|
|
const isVerifyStatus = ref(null) //未发布状态 0未发布 3已驳回
|
|
const isVerifyStatus = ref(null) //未发布状态 0未发布 3已驳回
|
|
|
const editResourcesId = ref(null) //资源id
|
|
const editResourcesId = ref(null) //资源id
|
|
|
|
|
+
|
|
|
|
|
+ const storageMin = ref(0) //资源id
|
|
|
|
|
+ const storageMax = ref(0) //资源id
|
|
|
|
|
+
|
|
|
// 搜索值
|
|
// 搜索值
|
|
|
const searchValue = ref('')
|
|
const searchValue = ref('')
|
|
|
//课程类型
|
|
//课程类型
|
|
@@ -556,6 +553,15 @@
|
|
|
loading.value = false
|
|
loading.value = false
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ const bToMb = (kb) =>{
|
|
|
|
|
+ if (typeof kb !== 'number' || kb < 0) {
|
|
|
|
|
+ throw new Error('请输入有效的非负数字');
|
|
|
|
|
+ }
|
|
|
|
|
+ return (kb / (1024*1024)).toFixed(2); // 保留两位小数
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
const changeCollegeMajor = (value, selectedOptions) => {
|
|
const changeCollegeMajor = (value, selectedOptions) => {
|
|
|
console.log('Selected:', value, selectedOptions)
|
|
console.log('Selected:', value, selectedOptions)
|
|
|
if (!value) {
|
|
if (!value) {
|
|
@@ -896,6 +902,12 @@
|
|
|
getFileformat()
|
|
getFileformat()
|
|
|
getResourceTypeTree()
|
|
getResourceTypeTree()
|
|
|
getListData()
|
|
getListData()
|
|
|
|
|
+ getstorage().then(res => {
|
|
|
|
|
+ console.log('容量', res)
|
|
|
|
|
+
|
|
|
|
|
+ storageMin.value = res.data.storageSize
|
|
|
|
|
+ storageMax.value = res.data.totalStorageSize
|
|
|
|
|
+ })
|
|
|
})
|
|
})
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|