Browse Source

需求优化

master
xuhuajiao 1 month ago
parent
commit
de969f110e
  1. 28
      src/views/AIAssistant/AICataloging/running/module/detail.vue
  2. 28
      src/views/archiveKeeping/inStorage/pendingInArchive/file/index.vue
  3. 28
      src/views/archiveKeeping/inStorage/pendingInArchive/module/uploadFile/index.vue
  4. 11
      src/views/archiveUtilize/archiveSearch/module/resultList.vue
  5. 23
      src/views/archiveUtilize/utillizeRecord/myUtilizeList.vue
  6. 21
      src/views/archiveUtilize/utillizeRecord/recordList.vue
  7. 10
      src/views/archivesManage/managementLibrary/anjuan/tableList.vue
  8. 4
      src/views/archivesManage/managementLibrary/index.vue
  9. 4
      src/views/archivesManage/managementLibrary/juannei/index.vue
  10. 1
      src/views/archivesManage/managementLibrary/module/archivesInfo/index.vue
  11. 128
      src/views/archivesManage/managementLibrary/module/collectHeader.vue
  12. 28
      src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
  13. 28
      src/views/components/archivesDetail/uploadFile/index.vue
  14. 28
      src/views/prearchiveLibrary-old/module/detail.vue
  15. 28
      src/views/preview/index.vue
  16. 8
      src/views/system/processManage/runningProcess/module/businessDetails/index.vue
  17. 11
      src/views/system/user/cart.vue

28
src/views/AIAssistant/AICataloging/running/module/detail.vue

@ -87,9 +87,31 @@ export default {
}) })
}, },
getFileSize(fileSize) { getFileSize(fileSize) {
const fileSizeInKB = (fileSize / 1024).toFixed(2) + 'kB'
const fileSizeInB = fileSize + 'B'
return (fileSize / 1024) <= 0.01 ? fileSizeInB : fileSizeInKB
// 1. KB/
const sizeInKB = Number(fileSize)
if (isNaN(sizeInKB) || sizeInKB < 0) {
return '0 KB' // 0 KB
}
// 2. 1 MB = 1024 KB1 GB = 1024 MB
const KB = 1
const MB = 1024 * KB
const GB = 1024 * MB
// 3.
if (sizeInKB >= GB) {
// 1GBGB2
return (sizeInKB / GB).toFixed(2) + ' GB'
} else if (sizeInKB >= MB) {
// 1MB1GBMB2
return (sizeInKB / MB).toFixed(2) + ' MB'
} else if (sizeInKB < 1) {
// 1KB1 KB
return '1 KB'
} else {
// 1KB1MBKB2
return sizeInKB + ' KB'
}
} }
} }
} }

28
src/views/archiveKeeping/inStorage/pendingInArchive/file/index.vue

@ -163,9 +163,31 @@ export default {
}, },
methods: { methods: {
getFileSize(fileSize) { getFileSize(fileSize) {
const fileSizeInKB = (fileSize / 1024).toFixed(2) + 'kB'
const fileSizeInB = fileSize + 'B'
return (fileSize / 1024) <= 0.01 ? fileSizeInB : fileSizeInKB
// 1. KB/
const sizeInKB = Number(fileSize)
if (isNaN(sizeInKB) || sizeInKB < 0) {
return '0 KB' // 0 KB
}
// 2. 1 MB = 1024 KB1 GB = 1024 MB
const KB = 1
const MB = 1024 * KB
const GB = 1024 * MB
// 3.
if (sizeInKB >= GB) {
// 1GBGB2
return (sizeInKB / GB).toFixed(2) + ' GB'
} else if (sizeInKB >= MB) {
// 1MB1GBMB2
return (sizeInKB / MB).toFixed(2) + ' MB'
} else if (sizeInKB < 1) {
// 1KB1 KB
return '1 KB'
} else {
// 1KB1MBKB2
return sizeInKB + ' KB'
}
}, },
getCommonData(categoryLevel, parentId, type) { getCommonData(categoryLevel, parentId, type) {
this.getViewTable(categoryLevel, parentId, type) this.getViewTable(categoryLevel, parentId, type)

28
src/views/archiveKeeping/inStorage/pendingInArchive/module/uploadFile/index.vue

@ -165,9 +165,31 @@ export default {
}, },
methods: { methods: {
getFileSize(fileSize) { getFileSize(fileSize) {
const fileSizeInKB = (fileSize / 1024).toFixed(2) + ' KB'
const fileSizeInB = fileSize + 'B'
return (fileSize / 1024) <= 0.01 ? fileSizeInB : fileSizeInKB
// 1. KB/
const sizeInKB = Number(fileSize)
if (isNaN(sizeInKB) || sizeInKB < 0) {
return '0 KB' // 0 KB
}
// 2. 1 MB = 1024 KB1 GB = 1024 MB
const KB = 1
const MB = 1024 * KB
const GB = 1024 * MB
// 3.
if (sizeInKB >= GB) {
// 1GBGB2
return (sizeInKB / GB).toFixed(2) + ' GB'
} else if (sizeInKB >= MB) {
// 1MB1GBMB2
return (sizeInKB / MB).toFixed(2) + ' MB'
} else if (sizeInKB < 1) {
// 1KB1 KB
return '1 KB'
} else {
// 1KB1MBKB2
return sizeInKB + ' KB'
}
}, },
// //
async changeFile(e) { async changeFile(e) {

11
src/views/archiveUtilize/archiveSearch/module/resultList.vue

@ -529,11 +529,12 @@ export default {
{ {
value: 3, value: 3,
label: '打印' label: '打印'
},
{
value: 4,
label: '实体借阅'
}]
}
// {
// value: 4,
// label: ''
// }
]
this.$refs.lendFormRef.detailArcData.push(item) this.$refs.lendFormRef.detailArcData.push(item)
}) })
}).catch(() => { }).catch(() => {

23
src/views/archiveUtilize/utillizeRecord/myUtilizeList.vue

@ -34,7 +34,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="borrowReason" label="利用事由" /> <el-table-column prop="borrowReason" label="利用事由" />
<el-table-column prop="isEntityBorrow" label="包含实体借阅" align="center" width="110">
<!-- <el-table-column prop="isEntityBorrow" label="包含实体借阅" align="center" width="110">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
<span v-if="scope.row.isEntityBorrow === 0" class="iconfont icon-fou" /> <span v-if="scope.row.isEntityBorrow === 0" class="iconfont icon-fou" />
@ -47,11 +47,10 @@
<div> <div>
<span v-if="scope.row.isEntityBorrow === 0" class="iconfont icon-fou" /> <span v-if="scope.row.isEntityBorrow === 0" class="iconfont icon-fou" />
<span v-if="scope.row.isEntityBorrow > 0 && scope.row.isLend === 0" class="iconfont icon-shi" /> <span v-if="scope.row.isEntityBorrow > 0 && scope.row.isLend === 0" class="iconfont icon-shi" />
<!-- <span class="iconfont icon-dengdai" /> -->
<span v-if="scope.row.isEntityBorrow > 0 && scope.row.isLend > 0" class="iconfont icon-cuowu1" /> <span v-if="scope.row.isEntityBorrow > 0 && scope.row.isLend > 0" class="iconfont icon-cuowu1" />
</div> </div>
</template> </template>
</el-table-column>
</el-table-column> -->
<el-table-column prop="borrowType" label="状态" align="center" width="110"> <el-table-column prop="borrowType" label="状态" align="center" width="110">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
@ -105,25 +104,25 @@
<div class="title-style"><span>文件</span>{{ scope.row.archiveNo }}{{ scope.row.maintitle }}</div> <div class="title-style"><span>文件</span>{{ scope.row.archiveNo }}{{ scope.row.maintitle }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="utilizeType" label="利用方式" width="340">
<el-table-column prop="utilizeType" label="利用方式" width="300">
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox-group v-model="scope.row.utilizeType" class="checkbox-style"> <el-checkbox-group v-model="scope.row.utilizeType" class="checkbox-style">
<el-checkbox v-for="item in uselist" :key="item.value" :label="item.value" disabled>{{ item.label }}</el-checkbox> <el-checkbox v-for="item in uselist" :key="item.value" :label="item.value" disabled>{{ item.label }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="utilizeState" label="实体借阅状态" align="center" width="110">
<!-- 实体利用状态 -1.未确认流程(未审批) 0.无需借阅 1.同意借阅 2.不允许借阅 3.已归还 -->
<!-- <span v-if="scope.row.utilizeState === 0" class="row-state end-state">无需借阅</span> -->
<!-- <el-table-column prop="utilizeState" label="实体借阅状态" align="center" width="110">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
<!-- 实体利用状态 -1.未确认流程(未审批) 0.无需借阅 1.同意借阅 2.不允许借阅 3.已归还 -->
<span v-if="scope.row.utilizeState === -1" class="row-state soon-state">审批中</span> <span v-if="scope.row.utilizeState === -1" class="row-state soon-state">审批中</span>
<!-- <span v-if="scope.row.utilizeState === 0" class="row-state end-state">无需借阅</span> -->
<span v-if="scope.row.utilizeState === 1" class="row-state end-state">同意借阅</span> <span v-if="scope.row.utilizeState === 1" class="row-state end-state">同意借阅</span>
<span v-if="scope.row.utilizeState === 2" class="row-state cancel-state">不允许借阅</span> <span v-if="scope.row.utilizeState === 2" class="row-state cancel-state">不允许借阅</span>
<span v-if="scope.row.utilizeState === 3" class="row-state end-state">已归还</span> <span v-if="scope.row.utilizeState === 3" class="row-state end-state">已归还</span>
</div> </div>
</template> </template>
</el-table-column>
</el-table-column> -->
</el-table> </el-table>
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -179,11 +178,11 @@ export default {
{ {
value: 3, value: 3,
label: '打印' label: '打印'
},
{
value: 4,
label: '实体借阅'
} }
// {
// value: 4,
// label: ''
// }
], ],
statusOptions: [ statusOptions: [
{ value: null, label: '全部' }, { value: null, label: '全部' },

21
src/views/archiveUtilize/utillizeRecord/recordList.vue

@ -56,7 +56,7 @@
</el-table-column> </el-table-column>
<el-table-column v-if="!isUserCenter" prop="nickName" label="利用人" align="center" width="120" /> <el-table-column v-if="!isUserCenter" prop="nickName" label="利用人" align="center" width="120" />
<el-table-column prop="borrowReason" label="利用事由" /> <el-table-column prop="borrowReason" label="利用事由" />
<el-table-column prop="isEntityBorrow" label="包含实体借阅" align="center" width="110">
<!-- <el-table-column prop="isEntityBorrow" label="包含实体借阅" align="center" width="110">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
<span v-if="scope.row.isEntityBorrow === 0" class="iconfont icon-fou" /> <span v-if="scope.row.isEntityBorrow === 0" class="iconfont icon-fou" />
@ -69,11 +69,10 @@
<div> <div>
<span v-if="scope.row.isEntityBorrow === 0" class="iconfont icon-fou" /> <span v-if="scope.row.isEntityBorrow === 0" class="iconfont icon-fou" />
<span v-if="scope.row.isEntityBorrow > 0 && scope.row.isLend === 0" class="iconfont icon-shi" /> <span v-if="scope.row.isEntityBorrow > 0 && scope.row.isLend === 0" class="iconfont icon-shi" />
<!-- <span class="iconfont icon-dengdai" /> -->
<span v-if="scope.row.isEntityBorrow > 0 && scope.row.isLend > 0" class="iconfont icon-cuowu1" /> <span v-if="scope.row.isEntityBorrow > 0 && scope.row.isLend > 0" class="iconfont icon-cuowu1" />
</div> </div>
</template> </template>
</el-table-column>
</el-table-column> -->
<el-table-column prop="borrowType" label="状态" align="center" width="110"> <el-table-column prop="borrowType" label="状态" align="center" width="110">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
@ -116,17 +115,17 @@
<div class="title-style"><span>文件</span>{{ scope.row.archiveNo }}{{ scope.row.maintitle }}</div> <div class="title-style"><span>文件</span>{{ scope.row.archiveNo }}{{ scope.row.maintitle }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="utilizeType" label="利用方式" width="340">
<el-table-column prop="utilizeType" label="利用方式" width="300">
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox-group v-model="scope.row.utilizeType" class="checkbox-style"> <el-checkbox-group v-model="scope.row.utilizeType" class="checkbox-style">
<el-checkbox v-for="item in uselist" :key="item.value" :label="item.value" disabled>{{ item.label }}</el-checkbox> <el-checkbox v-for="item in uselist" :key="item.value" :label="item.value" disabled>{{ item.label }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="utilizeState" label="实体借阅状态" align="center" width="110">
<!-- 实体利用状态 -1.未确认流程(未审批) 0.无需借阅 1.同意借阅 2.不允许借阅 3.已归还 -->
<!-- <el-table-column prop="utilizeState" label="实体借阅状态" align="center" width="110">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
<!-- 实体利用状态 -1.未确认流程(未审批) 0.无需借阅 1.同意借阅 2.不允许借阅 3.已归还 -->
<span v-if="scope.row.utilizeState === -1" class="row-state soon-state">审批中</span> <span v-if="scope.row.utilizeState === -1" class="row-state soon-state">审批中</span>
<span v-if="scope.row.utilizeState === 0" class="row-state end-state">无需借阅</span> <span v-if="scope.row.utilizeState === 0" class="row-state end-state">无需借阅</span>
<span v-if="scope.row.utilizeState === 1" class="row-state end-state">同意借阅</span> <span v-if="scope.row.utilizeState === 1" class="row-state end-state">同意借阅</span>
@ -134,7 +133,7 @@
<span v-if="scope.row.utilizeState === 3" class="row-state end-state">已归还</span> <span v-if="scope.row.utilizeState === 3" class="row-state end-state">已归还</span>
</div> </div>
</template> </template>
</el-table-column>
</el-table-column> -->
</el-table> </el-table>
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -206,11 +205,11 @@ export default {
{ {
value: 3, value: 3,
label: '打印' label: '打印'
},
{
value: 4,
label: '实体借阅'
} }
// {
// value: 4,
// label: ''
// }
], ],
statusOptions: [ statusOptions: [
{ value: 1, label: '利用中' }, { value: 1, label: '利用中' },

10
src/views/archivesManage/managementLibrary/anjuan/tableList.vue

@ -62,14 +62,14 @@
<span :class="['row-state', 'row-warehousing', scope.row.folder_location ? 'state-active' : '' ]">{{ scope.row.folder_location ? '已入': '未入' }}</span> <span :class="['row-state', 'row-warehousing', scope.row.folder_location ? 'state-active' : '' ]">{{ scope.row.folder_location ? '已入': '未入' }}</span>
</template> </template>
</el-table-column> --> </el-table-column> -->
<el-table-column v-if="!isRecycle && selectedCategory.arrangeType===1" label="借阅" width="88" align="center" :fixed="parentsData.fixedStatusSelect.includes(4) ? 'right' : false">
<!-- <span class="row-state row-lending state-active">已借</span> -->
<!-- is_borrow 4 已归还 / 为空 - 未加入待借列表 - 在库 / 2 待借阅在待借列表/借出确认列表 - 待借 / 1待登记 - 不可借- 表示 / 3 待归还 - 已借 -->
<!-- <span :class="['row-state', 'row-lending', (borrowTxt[scope.$index] === '已借' )? 'state-active' : '' ]">{{ borrowTxt[scope.$index] }}</span> -->
<!-- <el-table-column v-if="!isRecycle && selectedCategory.arrangeType===1" label="借阅" width="88" align="center" :fixed="parentsData.fixedStatusSelect.includes(4) ? 'right' : false">
<template slot-scope="scope"> <template slot-scope="scope">
<span :class="['row-state', 'row-lending', scope.row.is_borrow ? 'state-active' : '' ]">{{ scope.row.is_borrow ? '已借': '未借' }}</span> <span :class="['row-state', 'row-lending', scope.row.is_borrow ? 'state-active' : '' ]">{{ scope.row.is_borrow ? '已借': '未借' }}</span>
<!-- <span class="row-state row-lending state-active">已借</span> -->
<!-- is_borrow 4 已归还 / 为空 - 未加入待借列表 - 在库 / 2 待借阅在待借列表/借出确认列表 - 待借 / 1待登记 - 不可借- 表示 / 3 待归还 - 已借 -->
<!-- <span :class="['row-state', 'row-lending', (borrowTxt[scope.$index] === '已借' )? 'state-active' : '' ]">{{ borrowTxt[scope.$index] }}</span> -->
</template> </template>
</el-table-column>
</el-table-column> -->
<el-table-column v-if="!isRecycle " label="开放" width="88" align="center" :fixed="parentsData.fixedStatusSelect.includes(5) ? 'right' : false"> <el-table-column v-if="!isRecycle " label="开放" width="88" align="center" :fixed="parentsData.fixedStatusSelect.includes(5) ? 'right' : false">
<template slot-scope="scope"> <template slot-scope="scope">
<span :class="['row-state', 'row-open', scope.row.open_state ? 'state-active' : '' ]">{{ scope.row.open_state ? '已开放': '未开放' }}</span> <span :class="['row-state', 'row-open', scope.row.open_state ? 'state-active' : '' ]">{{ scope.row.open_state ? '已开放': '未开放' }}</span>

4
src/views/archivesManage/managementLibrary/index.vue

@ -162,7 +162,7 @@ export default {
// { value: 1, label: '' }, // { value: 1, label: '' },
// { value: 2, label: '' }, // { value: 2, label: '' },
// { value: 3, label: '' }, // { value: 3, label: '' },
{ value: 4, label: '借阅' },
// { value: 4, label: '' },
{ value: 5, label: '开放' }, { value: 5, label: '开放' },
{ value: 6, label: '实体' }, { value: 6, label: '实体' },
{ value: 7, label: '审批锁定' } { value: 7, label: '审批锁定' }
@ -397,7 +397,7 @@ export default {
// { value: 1, label: '' }, // { value: 1, label: '' },
// { value: 2, label: '' }, // { value: 2, label: '' },
// { value: 3, label: '' }, // { value: 3, label: '' },
{ value: 4, label: '借阅' },
// { value: 4, label: '' },
{ value: 5, label: '开放' }, { value: 5, label: '开放' },
{ value: 6, label: '实体' }, { value: 6, label: '实体' },
{ value: 7, label: '审批锁定' } { value: 7, label: '审批锁定' }

4
src/views/archivesManage/managementLibrary/juannei/index.vue

@ -73,11 +73,11 @@
<span :class="['row-state', 'row-warehousing', scope.row.folder_location ? 'state-active' : '' ]">{{ scope.row.folder_location ? '已入': '未入' }}</span> <span :class="['row-state', 'row-warehousing', scope.row.folder_location ? 'state-active' : '' ]">{{ scope.row.folder_location ? '已入': '未入' }}</span>
</template> </template>
</el-table-column> --> </el-table-column> -->
<el-table-column v-if="!isRecycle" label="借阅" width="88" align="center" :fixed="parentsData.fixedStatusSelect.includes(4) ? 'right' : false">
<!-- <el-table-column v-if="!isRecycle" label="借阅" width="88" align="center" :fixed="parentsData.fixedStatusSelect.includes(4) ? 'right' : false">
<template slot-scope="scope"> <template slot-scope="scope">
<span :class="['row-state', 'row-lending', scope.row.is_borrow ? 'state-active' : '' ]">{{ scope.row.is_borrow ? '已借': '未借' }}</span> <span :class="['row-state', 'row-lending', scope.row.is_borrow ? 'state-active' : '' ]">{{ scope.row.is_borrow ? '已借': '未借' }}</span>
</template> </template>
</el-table-column>
</el-table-column> -->
<el-table-column v-if="!isRecycle " label="开放" width="88" align="center" :fixed="parentsData.fixedStatusSelect.includes(5) ? 'right' : false"> <el-table-column v-if="!isRecycle " label="开放" width="88" align="center" :fixed="parentsData.fixedStatusSelect.includes(5) ? 'right' : false">
<template slot-scope="scope"> <template slot-scope="scope">
<span :class="['row-state', 'row-open', scope.row.open_state ? 'state-active' : '' ]">{{ scope.row.open_state ? '已开放': '未开放' }}</span> <span :class="['row-state', 'row-open', scope.row.open_state ? 'state-active' : '' ]">{{ scope.row.open_state ? '已开放': '未开放' }}</span>

1
src/views/archivesManage/managementLibrary/module/archivesInfo/index.vue

@ -181,6 +181,7 @@ export default {
}, },
changeActiveTab(index) { changeActiveTab(index) {
this.archivesTabIndex = index this.archivesTabIndex = index
console.log('changeActiveTab', this.arcId)
if (this.archivesTabIndex === 2) { if (this.archivesTabIndex === 2) {
this.setXml() this.setXml()
} else if (this.archivesTabIndex === 3) { } else if (this.archivesTabIndex === 3) {

128
src/views/archivesManage/managementLibrary/module/collectHeader.vue

@ -292,70 +292,70 @@ export default {
value: null, value: null,
categoryMenu: [], categoryMenu: [],
statusOptions: [ statusOptions: [
{
label: '标签状态',
options: [
{
value: 1,
label: '未绑定'
},
{
value: 2,
label: '已绑定'
}
]
},
{
label: '装盒状态',
options: [
{
value: 3,
label: '未装盒'
},
{
value: 4,
label: '已装盒'
}
]
},
{
label: '入库状态',
options: [
{
value: 5,
label: '未入库'
},
{
value: 6,
label: '待入库'
},
{
value: 7,
label: '待出库'
},
{
value: 8,
label: '已入库'
}
]
},
{
label: '借阅状态',
options: [
{
value: 9,
label: '实体在库'
},
{
value: 10,
label: '实体待借'
},
{
value: 11,
label: '实体已借'
}
]
},
// {
// label: '',
// options: [
// {
// value: 1,
// label: ''
// },
// {
// value: 2,
// label: ''
// }
// ]
// },
// {
// label: '',
// options: [
// {
// value: 3,
// label: ''
// },
// {
// value: 4,
// label: ''
// }
// ]
// },
// {
// label: '',
// options: [
// {
// value: 5,
// label: ''
// },
// {
// value: 6,
// label: ''
// },
// {
// value: 7,
// label: ''
// },
// {
// value: 8,
// label: ''
// }
// ]
// },
// {
// label: '',
// options: [
// {
// value: 9,
// label: ''
// },
// {
// value: 10,
// label: ''
// },
// {
// value: 11,
// label: ''
// }
// ]
// },
{ {
label: '实体状态', label: '实体状态',
options: [ options: [

28
src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue

@ -1694,9 +1694,31 @@ export default {
this.aIAssistEnterVisible = false this.aIAssistEnterVisible = false
}, },
getFileSize(fileSize) { getFileSize(fileSize) {
const fileSizeInKB = (fileSize / 1024).toFixed(2) + 'kB'
const fileSizeInB = fileSize + 'B'
return (fileSize / 1024) <= 0.01 ? fileSizeInB : fileSizeInKB
// 1. KB/
const sizeInKB = Number(fileSize)
if (isNaN(sizeInKB) || sizeInKB < 0) {
return '0 KB' // 0 KB
}
// 2. 1 MB = 1024 KB1 GB = 1024 MB
const KB = 1
const MB = 1024 * KB
const GB = 1024 * MB
// 3.
if (sizeInKB >= GB) {
// 1GBGB2
return (sizeInKB / GB).toFixed(2) + ' GB'
} else if (sizeInKB >= MB) {
// 1MB1GBMB2
return (sizeInKB / MB).toFixed(2) + ' MB'
} else if (sizeInKB < 1) {
// 1KB1 KB
return '1 KB'
} else {
// 1KB1MBKB2
return sizeInKB + ' KB'
}
}, },
// deepseek // deepseek
async sendMessage(prompt, context) { async sendMessage(prompt, context) {

28
src/views/components/archivesDetail/uploadFile/index.vue

@ -229,9 +229,31 @@ export default {
localStorage.setItem('fileCurrent', JSON.stringify(row)) localStorage.setItem('fileCurrent', JSON.stringify(row))
}, },
getFileSize(fileSize) { getFileSize(fileSize) {
const fileSizeInKB = (fileSize / 1024).toFixed(2) + ' KB'
const fileSizeInB = fileSize + 'B'
return (fileSize / 1024) <= 0.01 ? fileSizeInB : fileSizeInKB
// 1. KB/
const sizeInKB = Number(fileSize)
if (isNaN(sizeInKB) || sizeInKB < 0) {
return '0 KB' // 0 KB
}
// 2. 1 MB = 1024 KB1 GB = 1024 MB
const KB = 1
const MB = 1024 * KB
const GB = 1024 * MB
// 3.
if (sizeInKB >= GB) {
// 1GBGB2
return (sizeInKB / GB).toFixed(2) + ' GB'
} else if (sizeInKB >= MB) {
// 1MB1GBMB2
return (sizeInKB / MB).toFixed(2) + ' MB'
} else if (sizeInKB < 1) {
// 1KB1 KB
return '1 KB'
} else {
// 1KB1MBKB2
return sizeInKB + ' KB'
}
}, },
// //
async changeFile(e) { async changeFile(e) {

28
src/views/prearchiveLibrary-old/module/detail.vue

@ -161,9 +161,31 @@ export default {
localStorage.setItem('fileCurrent', JSON.stringify(row)) localStorage.setItem('fileCurrent', JSON.stringify(row))
}, },
getFileSize(fileSize) { getFileSize(fileSize) {
const fileSizeInKB = (fileSize / 1024).toFixed(2) + ' KB'
const fileSizeInB = fileSize + 'B'
return (fileSize / 1024) <= 0.01 ? fileSizeInB : fileSizeInKB
// 1. KB/
const sizeInKB = Number(fileSize)
if (isNaN(sizeInKB) || sizeInKB < 0) {
return '0 KB' // 0 KB
}
// 2. 1 MB = 1024 KB1 GB = 1024 MB
const KB = 1
const MB = 1024 * KB
const GB = 1024 * MB
// 3.
if (sizeInKB >= GB) {
// 1GBGB2
return (sizeInKB / GB).toFixed(2) + ' GB'
} else if (sizeInKB >= MB) {
// 1MB1GBMB2
return (sizeInKB / MB).toFixed(2) + ' MB'
} else if (sizeInKB < 1) {
// 1KB1 KB
return '1 KB'
} else {
// 1KB1MBKB2
return sizeInKB + ' KB'
}
}, },
getDetial(rowId) { getDetial(rowId) {
const params = { const params = {

28
src/views/preview/index.vue

@ -162,9 +162,31 @@ export default {
}, },
methods: { methods: {
getFileSize(fileSize) { getFileSize(fileSize) {
const fileSizeInKB = (fileSize / 1024).toFixed(2) + 'kB'
const fileSizeInB = fileSize + 'B'
return (fileSize / 1024) <= 0.01 ? fileSizeInB : fileSizeInKB
// 1. KB/
const sizeInKB = Number(fileSize)
if (isNaN(sizeInKB) || sizeInKB < 0) {
return '0 KB' // 0 KB
}
// 2. 1 MB = 1024 KB1 GB = 1024 MB
const KB = 1
const MB = 1024 * KB
const GB = 1024 * MB
// 3.
if (sizeInKB >= GB) {
// 1GBGB2
return (sizeInKB / GB).toFixed(2) + ' GB'
} else if (sizeInKB >= MB) {
// 1MB1GBMB2
return (sizeInKB / MB).toFixed(2) + ' MB'
} else if (sizeInKB < 1) {
// 1KB1 KB
return '1 KB'
} else {
// 1KB1MBKB2
return sizeInKB + ' KB'
}
}, },
// //
downloadFile(row) { downloadFile(row) {

8
src/views/system/processManage/runningProcess/module/businessDetails/index.vue

@ -104,11 +104,11 @@ export default {
{ {
value: 3, value: 3,
label: '打印' label: '打印'
},
{
value: 4,
label: '实体借阅'
} }
// {
// value: 4,
// label: ''
// }
], ],
utilizeStateOptions: [ utilizeStateOptions: [
{ {

11
src/views/system/user/cart.vue

@ -190,11 +190,12 @@ export default {
{ {
value: 3, value: 3,
label: '打印' label: '打印'
},
{
value: 4,
label: '实体借阅'
}]
}
// {
// value: 4,
// label: ''
// }
]
}) })
this.$refs.lendFormRef.detailArcData = data this.$refs.lendFormRef.detailArcData = data
}) })

Loading…
Cancel
Save