提交 610b73e2 authored 作者: 翟畅's avatar 翟畅

zc数字资源删除条件

上级 a577b6c2
...@@ -189,10 +189,9 @@ import { audioListAPI } from '@/api/resource/audio' ...@@ -189,10 +189,9 @@ import { audioListAPI } from '@/api/resource/audio'
import { pictureSaveAPI,pictureBatchUpdateAPI, detailsAPI } from '@/api/resource/annex' import { pictureSaveAPI,pictureBatchUpdateAPI, detailsAPI } from '@/api/resource/annex'
import { sortListAPI, authorLibraryAPI,labelListAPI,deleteFileAPI, getBookRelationAPI, } from '@/api/common' import { sortListAPI, authorLibraryAPI,labelListAPI,deleteFileAPI, getBookRelationAPI, } from '@/api/common'
import { authorRecDelAPI } from '@/api/resource/author' import { authorRecDelAPI } from '@/api/resource/author'
import { fileUrl } from '@/utils/global'
import { formatSort } from '@/utils/format' import { formatSort } from '@/utils/format'
import { valValidate } from '@/utils/validate' import { valValidate } from '@/utils/validate'
import {pdfFileUrl,baseUrl} from '@/utils/global' import {pdfFileUrl, baseUrl, fileUrl} from '@/utils/global'
import { confirm } from "@/utils/function"; import { confirm } from "@/utils/function";
import store from '@/store' import store from '@/store'
import relationBookDialog from "@/components/dialog/relation_book_dialog"; import relationBookDialog from "@/components/dialog/relation_book_dialog";
...@@ -553,7 +552,11 @@ export default { ...@@ -553,7 +552,11 @@ export default {
}, },
reviewAnnex(pdf) { reviewAnnex(pdf) {
window.open('https://www.class.com.cn/pdf/web/viewer.html?id=' + pdf) if(this.dataForm.typeView == 'PDF'){
window.open('https://www.class.com.cn/pdf/web/viewer.html?id=' + pdf)
}else{
window.open(this.fileUrl + '?fileName=' + pdf + '&isOnLine=true')
}
// if(pdf){ // if(pdf){
// let userId = !store.getters.token?sessionStorage.getItem('token'):store.getters.token; // let userId = !store.getters.token?sessionStorage.getItem('token'):store.getters.token;
// window.open(`${this.baseUrl}/pdfreader/pdf/viewer/${pdf}?userId=${userId}`) // window.open(`${this.baseUrl}/pdfreader/pdf/viewer/${pdf}?userId=${userId}`)
......
...@@ -599,8 +599,17 @@ import searchDia from "@/components/dialog/searchTips"; ...@@ -599,8 +599,17 @@ import searchDia from "@/components/dialog/searchTips";
} else { } else {
//批量删除 //批量删除
tipText = "批量"; tipText = "批量";
if (this.isExist(this.chooiceList)) { if (this.isExist(this.chooiceList)) {//至少选中一条
//至少选中一条 const dataType1 = this.chooiceList.some(data => data.status == 1);
const dataType2 = this.chooiceList.some(data => data.lockingState == '1');
if (dataType1) {
this.$message.warning("请先下架,再删除数据");
return;
}
if (dataType2) {
this.$message.warning("请先解除锁定并下架,再删除数据");
return;
}
arr = getSelectionIds(this.chooiceList); arr = getSelectionIds(this.chooiceList);
} else { } else {
return; return;
......
...@@ -497,10 +497,15 @@ export default { ...@@ -497,10 +497,15 @@ export default {
} else{//批量删除 } else{//批量删除
tipText = '批量' tipText = '批量'
if(this.isExist(this.chooiceList)) {//是否选中数据 if(this.isExist(this.chooiceList)) {//是否选中数据
const dataType = this.chooiceList.some(data => data.status == 1) const dataType1 = this.chooiceList.some(data => data.status == 1);
if(dataType) { const dataType2 = this.chooiceList.some(data => data.lockingState == '1');
this.$message.warning('请先下架,再删除数据') if (dataType1) {
return this.$message.warning("请先下架,再删除数据");
return;
}
if (dataType2) {
this.$message.warning("请先解除锁定并下架,再删除数据");
return;
} }
arr = getSelectionIds(this.chooiceList) arr = getSelectionIds(this.chooiceList)
} else{ } else{
......
...@@ -581,8 +581,17 @@ import searchDia from "@/components/dialog/searchTips"; ...@@ -581,8 +581,17 @@ import searchDia from "@/components/dialog/searchTips";
} else { } else {
//批量删除 //批量删除
tipText = "批量"; tipText = "批量";
if (this.isExist(this.chooiceList)) { if (this.isExist(this.chooiceList)) { //至少选中一条
//至少选中一条 const dataType1 = this.chooiceList.some(data => data.status == 1);
const dataType2 = this.chooiceList.some(data => data.lockingState == '1');
if (dataType1) {
this.$message.warning("请先下架,再删除数据");
return;
}
if (dataType2) {
this.$message.warning("请先解除锁定并下架,再删除数据");
return;
}
arr = getSelectionIds(this.chooiceList); arr = getSelectionIds(this.chooiceList);
} else { } else {
return; return;
......
...@@ -619,13 +619,17 @@ export default { ...@@ -619,13 +619,17 @@ export default {
} else { } else {
//批量删除 //批量删除
tipText = "批量"; tipText = "批量";
if (this.isExist(this.chooiceList)) { if (this.isExist(this.chooiceList)) {//是否选中数据
//是否选中数据 const dataType1 = this.chooiceList.some(data => data.status == 1);
const dataType = this.chooiceList.some(data => data.status == 1); const dataType2 = this.chooiceList.some(data => data.lockingState == '1');
if (dataType) { if (dataType1) {
this.$message.warning("请先下架,再删除数据"); this.$message.warning("请先下架,再删除数据");
return; return;
} }
if (dataType2) {
this.$message.warning("请先解除锁定并下架,再删除数据");
return;
}
arr = getSelectionIds(this.chooiceList); arr = getSelectionIds(this.chooiceList);
} else { } else {
return; return;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论