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

zc数字资源删除条件

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