diff --git a/src/views/dataService/multimediaData/index.vue b/src/views/dataService/multimediaData/index.vue index 0b8ca89..771e1db 100644 --- a/src/views/dataService/multimediaData/index.vue +++ b/src/views/dataService/multimediaData/index.vue @@ -209,20 +209,28 @@ const state = reactive({ pageSize: 10, }, }, - selectList: [], selectListId: null, }); const openDialog = async (row, bool) => { + // if (row || state.multipleSelection) { + // if (state.disasterId == null) { + // ElMessage.warning('Please select the disaster first'); + // return false; + // } + // } state.selectListId = row.id; state.dialogVisible = true; }; const reviews = async (status) => { - let ids = state.selectList.map((item) => item.id); + let ids = state.multipleSelection.map((item) => item.id); //将ids 转为字符串 使用逗号分隔 ids = ids.join(','); - let res = await review(state.selectListId, status, state.searchName == '1' ? true : false); + if (state.multipleSelection) { + ids = state.selectListId; + } + let res = await review(ids, status, state.searchName == '1' ? true : false); if (res) { state.dialogVisible = false; ElMessage.success('success'); diff --git a/src/views/dataService/otherData/index.vue b/src/views/dataService/otherData/index.vue index 26e01e4..f84b75e 100644 --- a/src/views/dataService/otherData/index.vue +++ b/src/views/dataService/otherData/index.vue @@ -128,26 +128,7 @@ const auditData = (row) => { let id = row.id auditRef.value.openDialog([{ "id": id }]); } -//格式化字节 -const formatSize = (size) => { - var data = ""; - if (size < 0.1 * 1024) { //如果小于0.1KB转化成B - data = size.toFixed(2) + "B"; - } else if (size < 0.1 * 1024 * 1024) {//如果小于0.1MB转化成KB - data = (size / 1024).toFixed(2) + "KB"; - } else if (size < 0.1 * 1024 * 1024 * 1024) { //如果小于0.1GB转化成MB - data = (size / (1024 * 1024)).toFixed(2) + "MB"; - } else { //其他转化成GB - data = (size / (1024 * 1024 * 1024)).toFixed(2) + "GB"; - } - var sizestr = data + ""; - var len = sizestr.indexOf("\."); - var dec = sizestr.substr(len + 1, 2); - if (dec == "00") {//当小数点后为00时 去掉小数部分 - return sizestr.substring(0, len) + sizestr.substr(len + 3, 2); - } - return sizestr; -} + const formatSizeUnits = (size) => { if (size === 0) return '0 B'; var k = 1000, // or 1024 diff --git a/src/views/dataService/pictureInfo/index.vue b/src/views/dataService/pictureInfo/index.vue index 7c60e78..e80302d 100644 --- a/src/views/dataService/pictureInfo/index.vue +++ b/src/views/dataService/pictureInfo/index.vue @@ -10,14 +10,6 @@