Commit 8d1f37eb authored by 高飞's avatar 高飞

添加图片预览。PSD、MAP、TIF、TIFF,限制上传文件大小,修改上传文件类型

parent 7e70ee05
...@@ -22,4 +22,5 @@ ...@@ -22,4 +22,5 @@
} }
</script> </script>
<script src="static/js/protocolcheck.js"></script> <script src="static/js/protocolcheck.js"></script>
<script src="static/js/tiff.min.js"></script>
</html> </html>
\ No newline at end of file
...@@ -6471,6 +6471,11 @@ ...@@ -6471,6 +6471,11 @@
"find-up": "^4.0.0" "find-up": "^4.0.0"
} }
}, },
"pngjs": {
"version": "3.4.0",
"resolved": "https://registry.npmmirror.com/pngjs/-/pngjs-3.4.0.tgz",
"integrity": "sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w=="
},
"point-in-polygon": { "point-in-polygon": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/point-in-polygon/-/point-in-polygon-1.1.0.tgz", "resolved": "https://registry.npmjs.org/point-in-polygon/-/point-in-polygon-1.1.0.tgz",
...@@ -6608,6 +6613,14 @@ ...@@ -6608,6 +6613,14 @@
} }
} }
}, },
"psd.js": {
"version": "3.9.0",
"resolved": "https://registry.npmmirror.com/psd.js/-/psd.js-3.9.0.tgz",
"integrity": "sha512-gTNUszC/hjS+F3O0JkdWOdN7dVZzOaYfyF7X1VD0UOue5iWOaFzfxFbfZgYnXtYS1pze9V10Hd/K0pWY3My54g==",
"requires": {
"pngjs": "^3.4.0"
}
},
"pseudomap": { "pseudomap": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
......
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
"leader-line": "^1.0.7", "leader-line": "^1.0.7",
"object-assign": "^4.1.1", "object-assign": "^4.1.1",
"ol": "^6.5.0", "ol": "^6.5.0",
"psd.js": "^3.9.0",
"push.js": "^1.0.12", "push.js": "^1.0.12",
"quill": "^1.3.7", "quill": "^1.3.7",
"relation-graph": "^1.1.0", "relation-graph": "^1.1.0",
......
...@@ -38,6 +38,7 @@ import $ from "jquery"; ...@@ -38,6 +38,7 @@ import $ from "jquery";
import WebUploader from "webuploader"; import WebUploader from "webuploader";
import "webuploader/dist/webuploader.css"; import "webuploader/dist/webuploader.css";
import { ACCESS_TOKEN, ACCESS_USER, HTTP_STATUS } from "../../constant/user"; import { ACCESS_TOKEN, ACCESS_USER, HTTP_STATUS } from "../../constant/user";
import { format_file} from '../../util/http_util'
export default { export default {
props: { props: {
addFileInfo: { addFileInfo: {
...@@ -63,7 +64,9 @@ export default { ...@@ -63,7 +64,9 @@ export default {
children: 'children', children: 'children',
label: 'label' label: 'label'
}, },
fl_type:0 fl_type:0,
size:0,
maxSize:3*1024*1024*1024,//3个G
}; };
}, },
mounted() { mounted() {
...@@ -181,11 +184,16 @@ export default { ...@@ -181,11 +184,16 @@ export default {
}, },
} }
); );
//获取指定的文件格式
let fileTypes = format_file()+"";
let fileTypesArr = fileTypes.split(',');
let fileType = fileTypesArr.map(item=> item.slice(1));
//创建实例 //创建实例
var uploader = WebUploader.create({ var uploader = WebUploader.create({
accept: { accept: {
extensions: "pdf,doc,ppt,pptx,xls,xlsx,docx,txt,flv,mp4,avi,mvb,rmvb,rm,gif,jepg,bmp,tif,jpg,png,mp3", extensions: fileType.join(','),
mimeTypes: ".pdf,.doc,.ppt,.pptx,.xls,.xlsx,.docx,.txt,.flv,.mp4,.avi,.mvb,.rmvb,.rm,.gif,.jepg,.bmp,.tif,.jpg,.png,.mp3" mimeTypes: fileTypes
}, },
pick: { pick: {
id: '#picker', id: '#picker',
...@@ -201,8 +209,8 @@ export default { ...@@ -201,8 +209,8 @@ export default {
// 禁掉全局的拖拽功能。这样不会出现图片拖进页面的时候,把图片打开。 // 禁掉全局的拖拽功能。这样不会出现图片拖进页面的时候,把图片打开。
disableGlobalDnd: true, disableGlobalDnd: true,
fileNumLimit: 1024, fileNumLimit: 1024,
fileSizeLimit: 50 * 1024 * 1024 * 1024,//50G 验证文件总大小是否超出限制, 超出则不允许加入队列 fileSizeLimit: 3 * 1024 * 1024 * 1024,//3G 验证文件总大小是否超出限制, 超出则不允许加入队列
fileSingleSizeLimit: 10 * 1024 * 1024 * 1024 //10G 验证单个文件大小是否超出限制, 超出则不允许加入队列 fileSingleSizeLimit: 3 * 1024 * 1024 * 1024 //3G 验证单个文件大小是否超出限制, 超出则不允许加入队列
}); });
/** /**
* 当某个文件的分块在发送前触发,主要用来询问是否要添加附带参数,大文件在开起分片上传的前提下此事件可能会触发多次。 * 当某个文件的分块在发送前触发,主要用来询问是否要添加附带参数,大文件在开起分片上传的前提下此事件可能会触发多次。
...@@ -216,8 +224,16 @@ export default { ...@@ -216,8 +224,16 @@ export default {
$.extend(headers, _self.headers); $.extend(headers, _self.headers);
}; };
// 当有文件被添加进队列的时候触发 // 当有文件被添加进队列的时候触发
uploader.on("fileQueued", function (file) { uploader.on("fileQueued", function (file,fileList) {
_self.fileList.push({ name: file.name, id: file.id, percentage: 0, state: 0 }); _self.size = _self.size + file.size;
if(_self.size>_self.maxSize){
_self.$message({
type: "warning",
message: "总文件只能小于3G!",
});
return
}
_self.fileList.push({ name: file.name, id: file.id, percentage: 0, state: 0 ,file:file});
}); });
//单个文件开始上传 //单个文件开始上传
uploader.on("uploadStart", (file) => { uploader.on("uploadStart", (file) => {
...@@ -263,6 +279,7 @@ export default { ...@@ -263,6 +279,7 @@ export default {
methods: { methods: {
removeFileAll(){ removeFileAll(){
this.fileList = []; this.fileList = [];
this.size = 0;
}, },
upload() { upload() {
if(this.fileList.length==0){ if(this.fileList.length==0){
...@@ -287,10 +304,14 @@ export default { ...@@ -287,10 +304,14 @@ export default {
} }
this.uploader.removeFile(item.id); this.uploader.removeFile(item.id);
this.fileList.splice(index, 1); this.fileList.splice(index, 1);
this.size = this.size - item.file.size;
}, },
retry(item, index) { retry(item, index) {
item.description = ""; item.description = "";
this.uploader.retry(this.fileList.filter(e => e.id == item.id)[0].id); let file = this.filelist.filter(e =>e.id == item.id)[0];
file.pass = false;
this.uploader.retry(file.id);
// this.uploader.retry(this.fileList.filter(e => e.id == item.id)[0].id);
}, },
getProgressBar(file, percentage) { getProgressBar(file, percentage) {
let item = this.fileList.find(e => e.id == file.id); let item = this.fileList.find(e => e.id == file.id);
......
...@@ -402,19 +402,19 @@ let imageToBase64 = (file, that) => { ...@@ -402,19 +402,19 @@ let imageToBase64 = (file, that) => {
//文件上传限制格式 //文件上传限制格式
let format_file = () => { let format_file = () => {
return ".TXT,.DOC,.XLS,.PPT,.DOCX,.XLSX,.PPTX,.pdf,.JPG,.PNG,.JPEG,.TIFF,.SWF,.rar,.zip,.EXE,.FLV,.RMVB,.rm,.MP4,.MVB,.avi,.WMA,.MP3" return ".TXT,.DOC,.DOCX,.PDF,.PPT,.PPTX,.RIF,.XML,.HTML,.PSD,.JPEG,.JPG,.PNG,.BMP,.TIF,.TIFF,.MP4,.MOV,.AVI,.MTS,.WMV,.FLV,.MPEG,.MKV,.M4V,.MPG,.MP3,.WAV,.AIFF,.AIF,.WMA"
} }
//视频播放格式 //视频播放格式
let arr_video_format = () => { let arr_video_format = () => {
return ["FLV", "RMVB", "MP4", "MVB", "avi", "rm"] return ["MP4","MOV", "AVI", "MTS", "WMV", "FLV", "MPEG", "MKV", "M4V", "MPG"]
} }
//音频播放格式 //音频播放格式
let arr_sound_format = () => { let arr_sound_format = () => {
return ["WMA", "MP3"] return ["MP3", "WAV", "AIFF", "AIF", "WMA"]
} }
//图片 //图片
let arr_img_format = () => { let arr_img_format = () => {
return ["JPG", "PNG", "JPEG"] return ["PSD", "JPEG", "JPG", "PNG", "BMP", "TIF","TIFF"]
} }
//人物机构字段确认状态后缀名 //人物机构字段确认状态后缀名
let rw_jg_IsConfirm = () => { let rw_jg_IsConfirm = () => {
......
...@@ -361,6 +361,13 @@ ...@@ -361,6 +361,13 @@
<el-dialog :title="title_sound" :visible.sync="centerDialogVisible_sound" center width="500px" :destroyOnClose="true"> <el-dialog :title="title_sound" :visible.sync="centerDialogVisible_sound" center width="500px" :destroyOnClose="true">
<audio controls id="sound_id" :src="sound_src" controlslist="nodownload" class="audio-class"></audio> <audio controls id="sound_id" :src="sound_src" controlslist="nodownload" class="audio-class"></audio>
</el-dialog> </el-dialog>
<el-dialog :title="title_img" :visible.sync="centerDialogVisible_img" center width="800px"
:destroyOnClose="true">
<div style="text-align: center;" v-loading="loadings">
<el-image style="width: 750px; height: 500px" :src="img_src" :preview-src-list="[img_src]">
</el-image>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
...@@ -383,7 +390,8 @@ import { uuid } from "../../util/data_util"; ...@@ -383,7 +390,8 @@ import { uuid } from "../../util/data_util";
import VanillaTilt from "vanilla-tilt"; import VanillaTilt from "vanilla-tilt";
import "animate.css"; import "animate.css";
import { queryDoc, searchFiles } from '../../api/zfclk/wxgl'; import { queryDoc, searchFiles } from '../../api/zfclk/wxgl';
import VideoPlayer from "../../components/common/video_player.vue" import VideoPlayer from "../../components/common/video_player.vue";
import PSD from 'psd.js';
export default { export default {
data() { data() {
return { return {
...@@ -392,11 +400,15 @@ export default { ...@@ -392,11 +400,15 @@ export default {
centerDialogVisible_edit: false, centerDialogVisible_edit: false,
centerDialogVisible_video: false, centerDialogVisible_video: false,
centerDialogVisible_sound: false, centerDialogVisible_sound: false,
centerDialogVisible_img: false,
loadings: false,
title: "", //视频播放页面的titile title: "", //视频播放页面的titile
title_sound: "", //音频播放页面的titile title_sound: "", //音频播放页面的titile
title_txt: "", title_txt: "",
video_src: "", video_src: "",
sound_src: "", sound_src: "",
img_src: "",
title_img: "",
sc_time: "", //上传时间参数 sc_time: "", //上传时间参数
wd_name: "", //文档名称 wd_name: "", //文档名称
wd_classify: "", //文档类别 wd_classify: "", //文档类别
...@@ -454,6 +466,18 @@ export default { ...@@ -454,6 +466,18 @@ export default {
}, },
}, },
methods: { methods: {
loadTiff(url) {
let _this = this;
var xhr = new XMLHttpRequest();
xhr.responseType = 'arraybuffer';
xhr.open('GET', url);
xhr.onload = function (e) {
var tiff = new Tiff({buffer: xhr.response});
_this.loadings = false;
_this.img_src = tiff.toDataURL();
};
xhr.send();
},
//列表动画效果结束让全文动画开始 //列表动画效果结束让全文动画开始
afterLeave_lb(el) { afterLeave_lb(el) {
let _this = this; let _this = this;
...@@ -520,11 +544,26 @@ export default { ...@@ -520,11 +544,26 @@ export default {
img_type = true; img_type = true;
} }
}); });
if (video_type) { // if (video_type) {
item.imgUrl = 'api/rest/file/viewPicture/DocumentPicture?objectName=' + item.file.uuid + '&' + new Date().getTime(); // item.imgUrl = 'api/rest/file/viewPicture/DocumentPicture?objectName=' + item.file.uuid + '&' + new Date().getTime();
} // }
if (img_type) { if (img_type) {
if (item.file.type.toUpperCase() == 'BMP' || item.file.type.toUpperCase() == "JPEG" || item.file.type.toUpperCase() == "JPG" || item.file.type.toUpperCase() == "PNG") {
item.imgUrl = 'api/rest/file/viewPicture/Document?objectName=' + item.file.uuid + '&' + new Date().getTime(); item.imgUrl = 'api/rest/file/viewPicture/Document?objectName=' + item.file.uuid + '&' + new Date().getTime();
}else if(item.file.type.toUpperCase() == 'PSD'){
PSD.fromURL(item.imgUrl).then(function (psd) {
item.imgUrl = psd.image.toPng().src;
});
}else if(item.file.type.toUpperCase() == 'TIF'||item.file.type.toUpperCase() == 'TIFF'){
var xhr = new XMLHttpRequest();
xhr.responseType = 'arraybuffer';
xhr.open('GET', item.imgUrl);
xhr.onload = function (e) {
var tiff = new Tiff({buffer: xhr.response});
item.imgUrl = tiff.toDataURL();
};
xhr.send();
}
} }
}) })
_this.tableData = data.list; _this.tableData = data.list;
...@@ -591,6 +630,8 @@ export default { ...@@ -591,6 +630,8 @@ export default {
let video_type = false; let video_type = false;
//用户判断此格式是否是音频格式 //用户判断此格式是否是音频格式
let sound_type = false; let sound_type = false;
//用户判断此格式是否是图片
let img_type = false;
arr_video_format().forEach((name) => { arr_video_format().forEach((name) => {
if (name.toUpperCase() == row.file.type.toUpperCase()) { if (name.toUpperCase() == row.file.type.toUpperCase()) {
video_type = true; video_type = true;
...@@ -601,6 +642,11 @@ export default { ...@@ -601,6 +642,11 @@ export default {
sound_type = true; sound_type = true;
} }
}); });
arr_img_format().forEach((name) => {
if (name.toUpperCase() == row.file.type.toUpperCase()) {
img_type = true;
}
});
if (video_type) { if (video_type) {
_this.video_src = `api/rest/file/playVideo/Document?objectName=${row.file.uuid}` _this.video_src = `api/rest/file/playVideo/Document?objectName=${row.file.uuid}`
_this.title = "正在播放视频---" + row.name; _this.title = "正在播放视频---" + row.name;
...@@ -623,6 +669,30 @@ export default { ...@@ -623,6 +669,30 @@ export default {
if (document.getElementById("sound_id").currentTime != 0) if (document.getElementById("sound_id").currentTime != 0)
document.getElementById("sound_id").currentTime = 0; document.getElementById("sound_id").currentTime = 0;
}, 500); }, 500);
} else if (img_type) {
_this.loadings = true;
_this.title_img = "正在预览图片---" + row.name;
_this.centerDialogVisible_img = true;
setTimeout(function () {
let path_srt = "api/rest/file/download/Document/";
path_srt = path_srt + row.file.uuid;
if (row.file.type.toUpperCase() == 'BMP') {
_this.convertBMPtoPNG(path_srt, function (pngImage) {
_this.img_src = pngImage;
_this.loadings = false;
});
} else if (row.file.type.toUpperCase() == 'PSD') {
PSD.fromURL(path_srt).then(function (psd) {
_this.img_src = psd.image.toPng().src;
_this.loadings = false;
});
} else if(row.file.type.toUpperCase() == 'TIF'||row.file.type.toUpperCase() == 'TIFF') {
_this.loadTiff(path_srt);
}else{
_this.img_src = path_srt;
_this.loadings = false;
}
}, 500);
} else { } else {
get(`api/rest/file/exists?bucket=DocumentPDF&filename=${row.file.uuid}`).then(res => { get(`api/rest/file/exists?bucket=DocumentPDF&filename=${row.file.uuid}`).then(res => {
...@@ -893,6 +963,31 @@ export default { ...@@ -893,6 +963,31 @@ export default {
this.searchs(1); this.searchs(1);
this.wjfx_qh = true; this.wjfx_qh = true;
}, },
convertBMPtoPNG(bmpImage, callback) {
// 创建一个新的 Image 对象
const img = new Image();
img.onload = function () {
// 创建一个 Canvas 元素
const canvas = document.createElement('canvas');
canvas.width = img.width;
canvas.height = img.height;
// 获取 CanvasRenderingContext2D 对象
const ctx = canvas.getContext('2d');
// 将 BMP 图片绘制到 Canvas 上
ctx.drawImage(img, 0, 0);
// 将 Canvas 的内容转换为 PNG 格式的 DataURL
const pngImage = canvas.toDataURL('image/png');
// 调用回调函数并传递转换后的 PNG 图片
callback(pngImage);
};
// 设置 BMP 图片源
img.src = bmpImage;
}
}, },
mounted() { mounted() {
let _this = this; let _this = this;
...@@ -944,6 +1039,12 @@ export default { ...@@ -944,6 +1039,12 @@ export default {
document.getElementById("sound_id").pause(); document.getElementById("sound_id").pause();
} }
}, },
//图片弹框预览
centerDialogVisible_img: function (s) {
if (!s) {
this.img_src = "";
}
},
clientDetails: function (val) { clientDetails: function (val) {
this.clientDetails_type = val.type; this.clientDetails_type = val.type;
this.wjfx_qh = true; this.wjfx_qh = true;
......
...@@ -361,6 +361,13 @@ ...@@ -361,6 +361,13 @@
<el-dialog :title="title_sound" :visible.sync="centerDialogVisible_sound" center width="500px" :destroyOnClose="true"> <el-dialog :title="title_sound" :visible.sync="centerDialogVisible_sound" center width="500px" :destroyOnClose="true">
<audio controls id="sound_id" :src="sound_src" controlslist="nodownload" class="audio-class"></audio> <audio controls id="sound_id" :src="sound_src" controlslist="nodownload" class="audio-class"></audio>
</el-dialog> </el-dialog>
<el-dialog :title="title_img" :visible.sync="centerDialogVisible_img" center width="800px"
:destroyOnClose="true">
<div style="text-align: center;" v-loading="loadings">
<el-image style="width: 750px; height: 500px" :src="img_src" :preview-src-list="[img_src]">
</el-image>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
...@@ -383,7 +390,8 @@ import { uuid } from "../../util/data_util"; ...@@ -383,7 +390,8 @@ import { uuid } from "../../util/data_util";
import VanillaTilt from "vanilla-tilt"; import VanillaTilt from "vanilla-tilt";
import "animate.css"; import "animate.css";
import { queryDoc, searchFiles } from '../../api/zfclk/wxgl'; import { queryDoc, searchFiles } from '../../api/zfclk/wxgl';
import VideoPlayer from "../../components/common/video_player.vue" import VideoPlayer from "../../components/common/video_player.vue";
import PSD from 'psd.js';
export default { export default {
data() { data() {
return { return {
...@@ -392,11 +400,15 @@ export default { ...@@ -392,11 +400,15 @@ export default {
centerDialogVisible_edit: false, centerDialogVisible_edit: false,
centerDialogVisible_video: false, centerDialogVisible_video: false,
centerDialogVisible_sound: false, centerDialogVisible_sound: false,
centerDialogVisible_img: false,
loadings: false,
title: "", //视频播放页面的titile title: "", //视频播放页面的titile
title_sound: "", //音频播放页面的titile title_sound: "", //音频播放页面的titile
title_txt: "", title_txt: "",
video_src: "", video_src: "",
sound_src: "", sound_src: "",
img_src: "",
title_img: "",
sc_time: "", //上传时间参数 sc_time: "", //上传时间参数
wd_name: "", //文档名称 wd_name: "", //文档名称
wd_classify: "", //文档类别 wd_classify: "", //文档类别
...@@ -454,6 +466,18 @@ export default { ...@@ -454,6 +466,18 @@ export default {
}, },
}, },
methods: { methods: {
loadTiff(url) {
let _this = this;
var xhr = new XMLHttpRequest();
xhr.responseType = 'arraybuffer';
xhr.open('GET', url);
xhr.onload = function (e) {
var tiff = new Tiff({buffer: xhr.response});
_this.loadings = false;
_this.img_src = tiff.toDataURL();
};
xhr.send();
},
//列表动画效果结束让全文动画开始 //列表动画效果结束让全文动画开始
afterLeave_lb(el) { afterLeave_lb(el) {
let _this = this; let _this = this;
...@@ -520,11 +544,26 @@ export default { ...@@ -520,11 +544,26 @@ export default {
img_type = true; img_type = true;
} }
}); });
if (video_type) { // if (video_type) {
item.imgUrl = 'api/rest/file/viewPicture/DocumentPicture?objectName=' + item.file.uuid + '&' + new Date().getTime(); // item.imgUrl = 'api/rest/file/viewPicture/DocumentPicture?objectName=' + item.file.uuid + '&' + new Date().getTime();
} // }
if (img_type) { if (img_type) {
if (item.file.type.toUpperCase() == 'BMP' || item.file.type.toUpperCase() == "JPEG" || item.file.type.toUpperCase() == "JPG" || item.file.type.toUpperCase() == "PNG") {
item.imgUrl = 'api/rest/file/viewPicture/Document?objectName=' + item.file.uuid + '&' + new Date().getTime(); item.imgUrl = 'api/rest/file/viewPicture/Document?objectName=' + item.file.uuid + '&' + new Date().getTime();
}else if(item.file.type.toUpperCase() == 'PSD'){
PSD.fromURL(item.imgUrl).then(function (psd) {
item.imgUrl = psd.image.toPng().src;
});
}else if(item.file.type.toUpperCase() == 'TIF'||item.file.type.toUpperCase() == 'TIFF'){
var xhr = new XMLHttpRequest();
xhr.responseType = 'arraybuffer';
xhr.open('GET', item.imgUrl);
xhr.onload = function (e) {
var tiff = new Tiff({buffer: xhr.response});
item.imgUrl = tiff.toDataURL();
};
xhr.send();
}
} }
}) })
_this.tableData = data.list; _this.tableData = data.list;
...@@ -591,6 +630,8 @@ export default { ...@@ -591,6 +630,8 @@ export default {
let video_type = false; let video_type = false;
//用户判断此格式是否是音频格式 //用户判断此格式是否是音频格式
let sound_type = false; let sound_type = false;
//用户判断此格式是否是图片
let img_type = false;
arr_video_format().forEach((name) => { arr_video_format().forEach((name) => {
if (name.toUpperCase() == row.file.type.toUpperCase()) { if (name.toUpperCase() == row.file.type.toUpperCase()) {
video_type = true; video_type = true;
...@@ -601,6 +642,11 @@ export default { ...@@ -601,6 +642,11 @@ export default {
sound_type = true; sound_type = true;
} }
}); });
arr_img_format().forEach((name) => {
if (name.toUpperCase() == row.file.type.toUpperCase()) {
img_type = true;
}
});
if (video_type) { if (video_type) {
_this.video_src = `api/rest/file/playVideo/Document?objectName=${row.file.uuid}` _this.video_src = `api/rest/file/playVideo/Document?objectName=${row.file.uuid}`
_this.title = "正在播放视频---" + row.name; _this.title = "正在播放视频---" + row.name;
...@@ -623,6 +669,30 @@ export default { ...@@ -623,6 +669,30 @@ export default {
if (document.getElementById("sound_id").currentTime != 0) if (document.getElementById("sound_id").currentTime != 0)
document.getElementById("sound_id").currentTime = 0; document.getElementById("sound_id").currentTime = 0;
}, 500); }, 500);
} else if (img_type) {
_this.loadings = true;
_this.title_img = "正在预览图片---" + row.name;
_this.centerDialogVisible_img = true;
setTimeout(function () {
let path_srt = "api/rest/file/download/Document/";
path_srt = path_srt + row.file.uuid;
if (row.file.type.toUpperCase() == 'BMP') {
_this.convertBMPtoPNG(path_srt, function (pngImage) {
_this.img_src = pngImage;
_this.loadings = false;
});
} else if (row.file.type.toUpperCase() == 'PSD') {
PSD.fromURL(path_srt).then(function (psd) {
_this.img_src = psd.image.toPng().src;
_this.loadings = false;
});
} else if(row.file.type.toUpperCase() == 'TIF'||row.file.type.toUpperCase() == 'TIFF') {
_this.loadTiff(path_srt);
}else{
_this.img_src = path_srt;
_this.loadings = false;
}
}, 500);
} else { } else {
get(`api/rest/file/exists?bucket=DocumentPDF&filename=${row.file.uuid}`).then(res => { get(`api/rest/file/exists?bucket=DocumentPDF&filename=${row.file.uuid}`).then(res => {
...@@ -944,6 +1014,12 @@ export default { ...@@ -944,6 +1014,12 @@ export default {
document.getElementById("sound_id").pause(); document.getElementById("sound_id").pause();
} }
}, },
//图片弹框预览
centerDialogVisible_img: function (s) {
if (!s) {
this.img_src = "";
}
},
clientDetails: function (val) { clientDetails: function (val) {
this.clientDetails_type = val.type; this.clientDetails_type = val.type;
this.wjfx_qh = true; this.wjfx_qh = true;
......
...@@ -88,9 +88,9 @@ ...@@ -88,9 +88,9 @@
></i ></i
> >
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> --> </div> -->
<div class="card-div"> <div class="card-div">
<template v-for="(item, index) in tableData"> <template v-for="(item, index) in tableData">
<div class="cards-div animate__animated bk-xxzp-animation1" :class="[ <div class="cards-div animate__animated bk-xxzp-animation1" :class="[
...@@ -299,7 +299,8 @@ ...@@ -299,7 +299,8 @@
<el-input v-model="form_add.gjc" show-word-limit placeholder="请输入关键词,多个关键词使用英文逗号,隔开"></el-input> <el-input v-model="form_add.gjc" show-word-limit placeholder="请输入关键词,多个关键词使用英文逗号,隔开"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="文档描述"> <el-form-item label="文档描述">
<el-input type="textarea" placeholder="请输入文档描述" v-model="form_add.ms" maxlength="100" show-word-limit :rows="4"> <el-input type="textarea" placeholder="请输入文档描述" v-model="form_add.ms" maxlength="100" show-word-limit
:rows="4">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="选择文件" style="margin-bottom: 0px"> <el-form-item label="选择文件" style="margin-bottom: 0px">
...@@ -357,9 +358,17 @@ ...@@ -357,9 +358,17 @@
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :title="title_sound" :visible.sync="centerDialogVisible_sound" center width="500px" :destroyOnClose="true"> <el-dialog :title="title_sound" :visible.sync="centerDialogVisible_sound" center width="500px"
:destroyOnClose="true">
<audio controls id="sound_id" :src="sound_src" controlslist="nodownload" class="audio-class"></audio> <audio controls id="sound_id" :src="sound_src" controlslist="nodownload" class="audio-class"></audio>
</el-dialog> </el-dialog>
<el-dialog :title="title_img" :visible.sync="centerDialogVisible_img" center width="800px"
:destroyOnClose="true">
<div style="text-align: center;" v-loading="loadings">
<el-image style="width: 750px; height: 500px" :src="img_src" :preview-src-list="[img_src]">
</el-image>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
...@@ -382,7 +391,8 @@ import { uuid } from "../../util/data_util"; ...@@ -382,7 +391,8 @@ import { uuid } from "../../util/data_util";
import VanillaTilt from "vanilla-tilt"; import VanillaTilt from "vanilla-tilt";
import "animate.css"; import "animate.css";
import { queryDoc, searchFiles } from '../../api/zfclk/wxgl'; import { queryDoc, searchFiles } from '../../api/zfclk/wxgl';
import VideoPlayer from "../../components/common/video_player.vue" import VideoPlayer from "../../components/common/video_player.vue";
import PSD from 'psd.js';
export default { export default {
data() { data() {
return { return {
...@@ -391,11 +401,15 @@ export default { ...@@ -391,11 +401,15 @@ export default {
centerDialogVisible_edit: false, centerDialogVisible_edit: false,
centerDialogVisible_video: false, centerDialogVisible_video: false,
centerDialogVisible_sound: false, centerDialogVisible_sound: false,
centerDialogVisible_img: false,
loadings: false,
title: "", //视频播放页面的titile title: "", //视频播放页面的titile
title_sound: "", //音频播放页面的titile title_sound: "", //音频播放页面的titile
title_txt: "", title_txt: "",
video_src: "", video_src: "",
sound_src: "", sound_src: "",
img_src: "",
title_img: "",
sc_time: "", //上传时间参数 sc_time: "", //上传时间参数
wd_name: "", //文档名称 wd_name: "", //文档名称
wd_classify: "", //文档类别 wd_classify: "", //文档类别
...@@ -453,6 +467,18 @@ export default { ...@@ -453,6 +467,18 @@ export default {
}, },
}, },
methods: { methods: {
loadTiff(url) {
let _this = this;
var xhr = new XMLHttpRequest();
xhr.responseType = 'arraybuffer';
xhr.open('GET', url);
xhr.onload = function (e) {
var tiff = new Tiff({buffer: xhr.response});
_this.loadings = false;
_this.img_src = tiff.toDataURL();
};
xhr.send();
},
//列表动画效果结束让全文动画开始 //列表动画效果结束让全文动画开始
afterLeave_lb(el) { afterLeave_lb(el) {
let _this = this; let _this = this;
...@@ -499,18 +525,18 @@ export default { ...@@ -499,18 +525,18 @@ export default {
// complexKeywords:complexKeywords, // complexKeywords:complexKeywords,
// module: _this.clientDetails_type[0] == this.fl_type ? this.module_name : null, // module: _this.clientDetails_type[0] == this.fl_type ? this.module_name : null,
// treeId: _this.clientDetails_type[0] == this.fl_type ? null : _this.clientDetails_type[0], // treeId: _this.clientDetails_type[0] == this.fl_type ? null : _this.clientDetails_type[0],
module: _this.clientDetails_type.length==0 ? this.module_name:null, module: _this.clientDetails_type.length == 0 ? this.module_name : null,
treeIds: _this.clientDetails_type.length==0 ? null : _this.clientDetails_type, treeIds: _this.clientDetails_type.length == 0 ? null : _this.clientDetails_type,
}; };
if(_this.wd_name!=''){ if (_this.wd_name != '') {
if(_this.wd_name.charAt(0)=='&'||_this.wd_name.charAt(0)=='|'||_this.wd_name.charAt(_this.wd_name.length-1)=='&'||_this.wd_name.charAt(_this.wd_name.length-1)=='|'){ if (_this.wd_name.charAt(0) == '&' || _this.wd_name.charAt(0) == '|' || _this.wd_name.charAt(_this.wd_name.length - 1) == '&' || _this.wd_name.charAt(_this.wd_name.length - 1) == '|') {
this.$message({ this.$message({
type: "warning", type: "warning",
message: "不允许以&、|开头或结尾", message: "不允许以&、|开头或结尾",
}); });
return return
} }
if(_this.wd_name.includes('||')||_this.wd_name.includes('&&')||_this.wd_name.includes('&|')||_this.wd_name.includes('|&')){ if (_this.wd_name.includes('||') || _this.wd_name.includes('&&') || _this.wd_name.includes('&|') || _this.wd_name.includes('|&')) {
this.$message({ this.$message({
type: "warning", type: "warning",
message: "不能连续出现&、|或者&|、|&", message: "不能连续出现&、|或者&|、|&",
...@@ -518,28 +544,28 @@ export default { ...@@ -518,28 +544,28 @@ export default {
return return
} }
let result3 = _this.wd_name.split(/[|&]/); let result3 = _this.wd_name.split(/[|&]/);
if(result3.length>=2){ if (result3.length >= 2) {
let indexs = 0; let indexs = 0;
result3.forEach((item,index)=>{ result3.forEach((item, index) => {
if(index==0){ if (index == 0) {
indexs = indexs+item.length; indexs = indexs + item.length;
}else{ } else {
indexs = indexs+item.length+1; indexs = indexs + item.length + 1;
} }
complexKeywords.push({ complexKeywords.push({
keyword: item, keyword: item,
operatorWithNext: _this.wd_name[indexs]=='&'?'AND':'OR' operatorWithNext: _this.wd_name[indexs] == '&' ? 'AND' : 'OR'
}) })
}) })
_this.paramData = { _this.paramData = {
beginTime: startTime == "" ? null : startTime, beginTime: startTime == "" ? null : startTime,
endTime: endTime == "" ? null : endTime, endTime: endTime == "" ? null : endTime,
// name: _this.wd_name == "" ? null : _this.wd_name, // name: _this.wd_name == "" ? null : _this.wd_name,
complexKeywords:complexKeywords, complexKeywords: complexKeywords,
// module: _this.clientDetails_type[0] == this.fl_type ? this.module_name : null, // module: _this.clientDetails_type[0] == this.fl_type ? this.module_name : null,
// treeId: _this.clientDetails_type[0] == this.fl_type ? null : _this.clientDetails_type[0], // treeId: _this.clientDetails_type[0] == this.fl_type ? null : _this.clientDetails_type[0],
module: _this.clientDetails_type.length==0 ? this.module_name:null, module: _this.clientDetails_type.length == 0 ? this.module_name : null,
treeIds: _this.clientDetails_type.length==0 ? null : _this.clientDetails_type, treeIds: _this.clientDetails_type.length == 0 ? null : _this.clientDetails_type,
}; };
} }
} }
...@@ -555,29 +581,45 @@ export default { ...@@ -555,29 +581,45 @@ export default {
).then((data) => { ).then((data) => {
setTimeout(() => { setTimeout(() => {
if (data.list.length != 0) { if (data.list.length != 0) {
// data.list.forEach(item => { data.list.forEach(item => {
// //用户判断此格式是否是视频格式 //用户判断此格式是否是视频格式
// let video_type = false; let video_type = false;
// //用户判断此格式是否是音频格式 //用户判断此格式是否是音频格式
// let img_type = false; let img_type = false;
// arr_video_format().forEach((name) => { // arr_video_format().forEach((name) => {
// if (name.toUpperCase() == item.file.type.toUpperCase()) { // if (name.toUpperCase() == item.file.type.toUpperCase()) {
// video_type = true; // video_type = true;
// } // }
// }); // });
// arr_img_format().forEach((name) => { arr_img_format().forEach((name) => {
// if (name.toUpperCase() == item.file.type.toUpperCase()) { if (name.toUpperCase() == item.file.type.toUpperCase()) {
// img_type = true; img_type = true;
// } }
// }); });
// if (video_type) { // if (video_type) {
// item.imgUrl = 'api/rest/file/viewPicture/DocumentPicture?objectName=' + item.file.uuid + '&' + new Date().getTime(); // item.imgUrl = 'api/rest/file/viewPicture/DocumentPicture?objectName=' + item.file.uuid + '&' + new Date().getTime();
// } // }
// if (img_type) { if (img_type) {
// item.imgUrl = 'api/rest/file/viewPicture/Document?objectName=' + item.file.uuid + '&' + new Date().getTime(); if (item.file.type.toUpperCase() == 'BMP' || item.file.type.toUpperCase() == "JPEG" || item.file.type.toUpperCase() == "JPG" || item.file.type.toUpperCase() == "PNG") {
// } item.imgUrl = 'api/rest/file/viewPicture/Document?objectName=' + item.file.uuid + '&' + new Date().getTime();
// }) }else if(item.file.type.toUpperCase() == 'PSD'){
PSD.fromURL(item.imgUrl).then(function (psd) {
item.imgUrl = psd.image.toPng().src;
});
}else if(item.file.type.toUpperCase() == 'TIF'||item.file.type.toUpperCase() == 'TIFF'){
var xhr = new XMLHttpRequest();
xhr.responseType = 'arraybuffer';
xhr.open('GET', item.imgUrl);
xhr.onload = function (e) {
var tiff = new Tiff({buffer: xhr.response});
item.imgUrl = tiff.toDataURL();
};
xhr.send();
}
}
})
_this.tableData = data.list; _this.tableData = data.list;
console.log(_this.tableData)
} }
_this.total = data.totals; _this.total = data.totals;
_this.current_page = pageNum; _this.current_page = pageNum;
...@@ -641,6 +683,8 @@ export default { ...@@ -641,6 +683,8 @@ export default {
let video_type = false; let video_type = false;
//用户判断此格式是否是音频格式 //用户判断此格式是否是音频格式
let sound_type = false; let sound_type = false;
//用户判断此格式是否是图片
let img_type = false;
arr_video_format().forEach((name) => { arr_video_format().forEach((name) => {
if (name.toUpperCase() == row.file.type.toUpperCase()) { if (name.toUpperCase() == row.file.type.toUpperCase()) {
video_type = true; video_type = true;
...@@ -651,6 +695,11 @@ export default { ...@@ -651,6 +695,11 @@ export default {
sound_type = true; sound_type = true;
} }
}); });
arr_img_format().forEach((name) => {
if (name.toUpperCase() == row.file.type.toUpperCase()) {
img_type = true;
}
});
if (video_type) { if (video_type) {
_this.video_src = `api/rest/file/playVideo/Document?objectName=${row.file.uuid}` _this.video_src = `api/rest/file/playVideo/Document?objectName=${row.file.uuid}`
_this.title = "正在播放视频---" + row.name; _this.title = "正在播放视频---" + row.name;
...@@ -673,6 +722,30 @@ export default { ...@@ -673,6 +722,30 @@ export default {
if (document.getElementById("sound_id").currentTime != 0) if (document.getElementById("sound_id").currentTime != 0)
document.getElementById("sound_id").currentTime = 0; document.getElementById("sound_id").currentTime = 0;
}, 500); }, 500);
} else if (img_type) {
_this.loadings = true;
_this.title_img = "正在预览图片---" + row.name;
_this.centerDialogVisible_img = true;
setTimeout(function () {
let path_srt = "api/rest/file/download/Document/";
path_srt = path_srt + row.file.uuid;
if (row.file.type.toUpperCase() == 'BMP') {
_this.convertBMPtoPNG(path_srt, function (pngImage) {
_this.img_src = pngImage;
_this.loadings = false;
});
} else if (row.file.type.toUpperCase() == 'PSD') {
PSD.fromURL(path_srt).then(function (psd) {
_this.img_src = psd.image.toPng().src;
_this.loadings = false;
});
} else if(row.file.type.toUpperCase() == 'TIF'||row.file.type.toUpperCase() == 'TIFF') {
_this.loadTiff(path_srt);
}else{
_this.img_src = path_srt;
_this.loadings = false;
}
}, 500);
} else { } else {
get(`api/rest/file/exists?bucket=DocumentPDF&filename=${row.file.uuid}`).then(res => { get(`api/rest/file/exists?bucket=DocumentPDF&filename=${row.file.uuid}`).then(res => {
...@@ -943,6 +1016,31 @@ export default { ...@@ -943,6 +1016,31 @@ export default {
this.searchs(1); this.searchs(1);
this.wjfx_qh = true; this.wjfx_qh = true;
}, },
convertBMPtoPNG(bmpImage, callback) {
// 创建一个新的 Image 对象
const img = new Image();
img.onload = function () {
// 创建一个 Canvas 元素
const canvas = document.createElement('canvas');
canvas.width = img.width;
canvas.height = img.height;
// 获取 CanvasRenderingContext2D 对象
const ctx = canvas.getContext('2d');
// 将 BMP 图片绘制到 Canvas 上
ctx.drawImage(img, 0, 0);
// 将 Canvas 的内容转换为 PNG 格式的 DataURL
const pngImage = canvas.toDataURL('image/png');
// 调用回调函数并传递转换后的 PNG 图片
callback(pngImage);
};
// 设置 BMP 图片源
img.src = bmpImage;
}
}, },
mounted() { mounted() {
let _this = this; let _this = this;
...@@ -993,6 +1091,12 @@ export default { ...@@ -993,6 +1091,12 @@ export default {
document.getElementById("sound_id").pause(); document.getElementById("sound_id").pause();
} }
}, },
//图片弹框预览
centerDialogVisible_img: function (s) {
if (!s) {
this.img_src = "";
}
},
clientDetails: function (val) { clientDetails: function (val) {
this.clientDetails_type = val.type; this.clientDetails_type = val.type;
this.wjfx_qh = true; this.wjfx_qh = true;
...@@ -1015,17 +1119,17 @@ export default { ...@@ -1015,17 +1119,17 @@ export default {
var paragraphs = document.querySelectorAll('.text-div'); var paragraphs = document.querySelectorAll('.text-div');
var paragraphs1 = document.querySelectorAll('.desc'); var paragraphs1 = document.querySelectorAll('.desc');
var paragraphs2 = document.querySelectorAll('.bottom-span'); var paragraphs2 = document.querySelectorAll('.bottom-span');
setTimeout(function(){ setTimeout(function () {
paragraphs.forEach(function(paragraph) { paragraphs.forEach(function (paragraph) {
paragraph.style.height = '38px'; // 设置颜色为蓝色 paragraph.style.height = '38px'; // 设置颜色为蓝色
}); });
paragraphs1.forEach(function(paragraphs1) { paragraphs1.forEach(function (paragraphs1) {
paragraphs1.style.height = '56px'; // 设置颜色为蓝色 paragraphs1.style.height = '56px'; // 设置颜色为蓝色
}); });
paragraphs2.forEach(function(paragraphs2) { paragraphs2.forEach(function (paragraphs2) {
paragraphs2.style.height = '24px'; // 设置颜色为蓝色 paragraphs2.style.height = '24px'; // 设置颜色为蓝色
}); });
},1500) }, 1500)
}); });
}, },
}, },
...@@ -1353,7 +1457,8 @@ export default { ...@@ -1353,7 +1457,8 @@ export default {
font-weight: 900; font-weight: 900;
} }
} }
.desc{
.desc {
word-break: break-all; word-break: break-all;
text-overflow: ellipsis; text-overflow: ellipsis;
display: -webkit-box; display: -webkit-box;
...@@ -1366,6 +1471,7 @@ export default { ...@@ -1366,6 +1471,7 @@ export default {
color: #c7c7c7; color: #c7c7c7;
text-indent: 2em; text-indent: 2em;
} }
.bottom-span { .bottom-span {
text-align: right; text-align: right;
font-size: 12px; font-size: 12px;
......
...@@ -57,8 +57,8 @@ ...@@ -57,8 +57,8 @@
</el-table-column> </el-table-column>
<el-table-column prop="cz" label="操作" width="200" show-overflow-tooltip> <el-table-column prop="cz" label="操作" width="200" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
<i class="el-icon-copy-document" @click="fileCopys(scope.row)" style="color: #52a6ff;font-size: 18px;" <i class="el-icon-copy-document" @click="fileCopys(scope.row)"
title="转移"></i>&nbsp; style="color: #52a6ff;font-size: 18px;" title="转移"></i>&nbsp;
<i class="el-icon-view" @click="handleView(scope.$index, scope.row)" <i class="el-icon-view" @click="handleView(scope.$index, scope.row)"
title="预览"></i>&nbsp; title="预览"></i>&nbsp;
<i class="el-icon-download" @click="downloadLiterature(scope.$index, scope.row)" <i class="el-icon-download" @click="downloadLiterature(scope.$index, scope.row)"
...@@ -254,12 +254,14 @@ ...@@ -254,12 +254,14 @@
</span> </span>
</el-dialog> </el-dialog>
<el-dialog v-if="Visible_PsxzAdd" title="评审新增" :visible.sync="Visible_PsxzAdd" width="60%" <el-dialog v-if="Visible_PsxzAdd" title="评审新增" :visible.sync="Visible_PsxzAdd" width="60%" center
center class="xzwd psxz"> class="xzwd psxz">
<div style="width: 50%;"> <div style="width: 50%;">
<el-form :model="form_PsxzAdd" label-width="80px" style="margin-bottom: 0px" ref="formsPsxz" :rules="rulesPsxz"> <el-form :model="form_PsxzAdd" label-width="80px" style="margin-bottom: 0px" ref="formsPsxz"
:rules="rulesPsxz">
<el-form-item label="文档名称" prop="name"> <el-form-item label="文档名称" prop="name">
<el-input v-model="form_PsxzAdd.name" maxlength="20" show-word-limit placeholder="请输入文档名称"></el-input> <el-input v-model="form_PsxzAdd.name" maxlength="20" show-word-limit
placeholder="请输入文档名称"></el-input>
</el-form-item> </el-form-item>
<!-- <el-form-item label="文档类别"> <!-- <el-form-item label="文档类别">
<el-select v-model="form_add.region" placeholder="请选择文档类别"> <el-select v-model="form_add.region" placeholder="请选择文档类别">
...@@ -273,7 +275,8 @@ ...@@ -273,7 +275,8 @@
</el-select> </el-select>
</el-form-item> --> </el-form-item> -->
<el-form-item label="关键词"> <el-form-item label="关键词">
<el-input v-model="form_PsxzAdd.gjc" show-word-limit placeholder="请输入关键词,多个关键词使用英文逗号,隔开"></el-input> <el-input v-model="form_PsxzAdd.gjc" show-word-limit
placeholder="请输入关键词,多个关键词使用英文逗号,隔开"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="文档描述"> <el-form-item label="文档描述">
<el-input type="textarea" placeholder="请输入文档描述" v-model="form_PsxzAdd.ms" maxlength="100" <el-input type="textarea" placeholder="请输入文档描述" v-model="form_PsxzAdd.ms" maxlength="100"
...@@ -281,9 +284,9 @@ ...@@ -281,9 +284,9 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="选择文件" prop="fileList"> <el-form-item label="选择文件" prop="fileList">
<el-upload class="upload-demo" ref="upload" action="uploadUrl" :file-list="form_PsxzAdd.fileList" <el-upload class="upload-demo" ref="upload" action="uploadUrl"
:on-change="handleChangePsxz" :show-file-list="true" :auto-upload="false" :multiple="false" :file-list="form_PsxzAdd.fileList" :on-change="handleChangePsxz" :show-file-list="true"
:on-remove="handleRemovePsxz" :accept="format_files"> :auto-upload="false" :multiple="false" :on-remove="handleRemovePsxz" :accept="format_files">
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<div slot="tip" class="el-upload__tip"> <div slot="tip" class="el-upload__tip">
允许上传DOC、PPT、JPG、PNG、MP4等等 ,且不超过500M 允许上传DOC、PPT、JPG、PNG、MP4等等 ,且不超过500M
...@@ -291,8 +294,9 @@ ...@@ -291,8 +294,9 @@
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item label="预选节点" prop="fileList1"> <el-form-item label="预选节点" prop="fileList1">
<el-upload class="upload-demo" ref="upload" action="uploadUrl" :file-list="form_PsxzAdd.fileList1" <el-upload class="upload-demo" ref="upload" action="uploadUrl"
:on-change="handleChangePsxzExcel" :show-file-list="true" :auto-upload="false" :multiple="false" :file-list="form_PsxzAdd.fileList1" :on-change="handleChangePsxzExcel"
:show-file-list="true" :auto-upload="false" :multiple="false"
:on-remove="handleRemovePsxzExcel" accept="['.XLS','.XLSX']"> :on-remove="handleRemovePsxzExcel" accept="['.XLS','.XLSX']">
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<div slot="tip" class="el-upload__tip"> <div slot="tip" class="el-upload__tip">
...@@ -311,9 +315,10 @@ ...@@ -311,9 +315,10 @@
<div style="width: 50%;"> <div style="width: 50%;">
<el-form label-width="80px" style="margin-bottom: 0px" ref="formsPsxz1"> <el-form label-width="80px" style="margin-bottom: 0px" ref="formsPsxz1">
<el-form-item label="选择目录"> <el-form-item label="选择目录">
<el-tree class="myTree" :data="psxz_tree_data" node-key="id" show-checkbox :expand-on-click-node="false" <el-tree class="myTree" :data="psxz_tree_data" node-key="id" show-checkbox
highlight-current :props="defaultProps" :check-strictly="true" ref="treePsxz" :expand-on-click-node="false" highlight-current :props="defaultProps" :check-strictly="true"
:default-expanded-keys="psxzIds" @check-change="handleCheckChangePsxz" :indent=1> ref="treePsxz" :default-expanded-keys="psxzIds" @check-change="handleCheckChangePsxz"
:indent=1>
</el-tree> </el-tree>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -361,10 +366,8 @@ ...@@ -361,10 +366,8 @@
</BigfileUpload> </BigfileUpload>
</el-dialog> </el-dialog>
<el-dialog title="文件转移或复制转移" :visible.sync="centerDialogVisible_fileCopy" <el-dialog title="文件转移或复制转移" :visible.sync="centerDialogVisible_fileCopy" width="30%" center class="xzwd">
width="30%" center class="xzwd"> <FileCopy :treeData="tree_data" :treeId="defaultTreeId" :flType="fl_type" @onSubmit="fileCopyFun">
<FileCopy :treeData="tree_data" :treeId="defaultTreeId" :flType="fl_type"
@onSubmit="fileCopyFun">
</FileCopy> </FileCopy>
</el-dialog> </el-dialog>
...@@ -377,9 +380,17 @@ ...@@ -377,9 +380,17 @@
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :title="title_sound" :visible.sync="centerDialogVisible_sound" center width="500px" :destroyOnClose="true"> <el-dialog :title="title_sound" :visible.sync="centerDialogVisible_sound" center width="500px"
:destroyOnClose="true">
<audio controls id="sound_id" :src="sound_src" controlslist="nodownload" class="audio-class"></audio> <audio controls id="sound_id" :src="sound_src" controlslist="nodownload" class="audio-class"></audio>
</el-dialog> </el-dialog>
<el-dialog :title="title_img" :visible.sync="centerDialogVisible_img" center width="800px"
:destroyOnClose="true">
<div style="text-align: center;" v-loading="loadings">
<el-image style="width: 750px; height: 500px" :src="img_src" :preview-src-list="[img_src]">
</el-image>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
...@@ -407,7 +418,7 @@ import FileCopy from "../../components/common/filecopy.vue"; ...@@ -407,7 +418,7 @@ import FileCopy from "../../components/common/filecopy.vue";
import { fileMd5Sum, getFileMD5Progress } from '../../util/file_md5.js'; import { fileMd5Sum, getFileMD5Progress } from '../../util/file_md5.js';
import VideoPlayer from "../../components/common/video_player.vue"; import VideoPlayer from "../../components/common/video_player.vue";
import { downloadFile, downloadDocument } from "../../api/xxxl/llxx"; import { downloadFile, downloadDocument } from "../../api/xxxl/llxx";
import XLSX from "xlsx"; import PSD from 'psd.js';
export default { export default {
data() { data() {
return { return {
...@@ -416,12 +427,16 @@ export default { ...@@ -416,12 +427,16 @@ export default {
centerDialogVisible_edit: false, centerDialogVisible_edit: false,
centerDialogVisible_video: false, centerDialogVisible_video: false,
centerDialogVisible_sound: false, centerDialogVisible_sound: false,
Visible_PsxzAdd:false, centerDialogVisible_img: false,
Visible_PsxzAdd: false,
loadings: false,
title: "", //视频播放页面的titile title: "", //视频播放页面的titile
title_sound: "", //音频播放页面的titile title_sound: "", //音频播放页面的titile
title_txt: "", title_txt: "",
video_src: "", video_src: "",
title_img: "",
sound_src: "", sound_src: "",
img_src: "",
sc_time: "", //上传时间参数 sc_time: "", //上传时间参数
wd_name: "", //文档名称 wd_name: "", //文档名称
wd_classify: "", //文档类别 wd_classify: "", //文档类别
...@@ -436,11 +451,11 @@ export default { ...@@ -436,11 +451,11 @@ export default {
ms: "", ms: "",
gjc: "", gjc: "",
}, },
form_PsxzAdd:{ form_PsxzAdd: {
name: "", name: "",
region: "", region: "",
fileList: [], fileList: [],
fileList1:[], fileList1: [],
ms: "", ms: "",
gjc: "", gjc: "",
}, },
...@@ -473,7 +488,7 @@ export default { ...@@ -473,7 +488,7 @@ export default {
znjsfx_name: "", znjsfx_name: "",
clientDetails_type: [], //默认查询id为21的方案预案 clientDetails_type: [], //默认查询id为21的方案预案
clientDetails_check_type: [], clientDetails_check_type: [],
clientDetails_check_typePsxz:[], clientDetails_check_typePsxz: [],
ids: "", ids: "",
module_name: '', module_name: '',
fl_type: '', fl_type: '',
...@@ -497,17 +512,17 @@ export default { ...@@ -497,17 +512,17 @@ export default {
] ]
}, },
tree_data: [], tree_data: [],
psxz_tree_data:[], psxz_tree_data: [],
psxz_tree_dataCopy:[], psxz_tree_dataCopy: [],
psxzIds:[], psxzIds: [],
defaultProps: { defaultProps: {
children: 'children', children: 'children',
label: 'label' label: 'label'
}, },
centerDialogVisible_fileCopy:false, centerDialogVisible_fileCopy: false,
copyfileId:'', copyfileId: '',
defaultTreeId:'', defaultTreeId: '',
parameterArr:[], parameterArr: [],
}; };
}, },
components: { components: {
...@@ -528,14 +543,29 @@ export default { ...@@ -528,14 +543,29 @@ export default {
type: Array, type: Array,
default: [] default: []
} }
},
created() {
}, },
methods: { methods: {
fileCopys(row){ loadTiff(url) {
let _this = this;
var xhr = new XMLHttpRequest();
xhr.responseType = 'arraybuffer';
xhr.open('GET', url);
xhr.onload = function (e) {
var tiff = new Tiff({buffer: xhr.response});
_this.loadings = false;
_this.img_src = tiff.toDataURL();
};
xhr.send();
},
fileCopys(row) {
this.copyfileId = row.id; this.copyfileId = row.id;
this.defaultTreeId = row.treeId.split(","); this.defaultTreeId = row.treeId.split(",");
this.centerDialogVisible_fileCopy = true; this.centerDialogVisible_fileCopy = true;
}, },
fileCopyFun(data){ fileCopyFun(data) {
let _that = this; let _that = this;
// startLoading(); // startLoading();
post( post(
...@@ -544,7 +574,7 @@ export default { ...@@ -544,7 +574,7 @@ export default {
"&treeIds=" + "&treeIds=" +
data.data.join(','), data.data.join(','),
).then((data) => { ).then((data) => {
if(data==1){ if (data == 1) {
this.$message({ this.$message({
type: "success", type: "success",
message: "转移成功!!!", message: "转移成功!!!",
...@@ -606,18 +636,18 @@ export default { ...@@ -606,18 +636,18 @@ export default {
// complexKeywords:complexKeywords, // complexKeywords:complexKeywords,
// module: _this.clientDetails_type[0] == this.fl_type ? this.module_name : null, // module: _this.clientDetails_type[0] == this.fl_type ? this.module_name : null,
// treeId: _this.clientDetails_type[0] == this.fl_type ? null : _this.clientDetails_type[0], // treeId: _this.clientDetails_type[0] == this.fl_type ? null : _this.clientDetails_type[0],
module: _this.clientDetails_type.length==0 ? this.module_name:null, module: _this.clientDetails_type.length == 0 ? this.module_name : null,
treeIds: _this.clientDetails_type.length==0 ? null : _this.clientDetails_type, treeIds: _this.clientDetails_type.length == 0 ? null : _this.clientDetails_type,
}; };
if(_this.wd_name!=''){ if (_this.wd_name != '') {
if(_this.wd_name.charAt(0)=='&'||_this.wd_name.charAt(0)=='|'||_this.wd_name.charAt(_this.wd_name.length-1)=='&'||_this.wd_name.charAt(_this.wd_name.length-1)=='|'){ if (_this.wd_name.charAt(0) == '&' || _this.wd_name.charAt(0) == '|' || _this.wd_name.charAt(_this.wd_name.length - 1) == '&' || _this.wd_name.charAt(_this.wd_name.length - 1) == '|') {
this.$message({ this.$message({
type: "warning", type: "warning",
message: "不允许以&、|开头或结尾", message: "不允许以&、|开头或结尾",
}); });
return return
} }
if(_this.wd_name.includes('||')||_this.wd_name.includes('&&')||_this.wd_name.includes('&|')||_this.wd_name.includes('|&')){ if (_this.wd_name.includes('||') || _this.wd_name.includes('&&') || _this.wd_name.includes('&|') || _this.wd_name.includes('|&')) {
this.$message({ this.$message({
type: "warning", type: "warning",
message: "不能连续出现&、|或者&|、|&", message: "不能连续出现&、|或者&|、|&",
...@@ -625,28 +655,28 @@ export default { ...@@ -625,28 +655,28 @@ export default {
return return
} }
let result3 = _this.wd_name.split(/[|&]/); let result3 = _this.wd_name.split(/[|&]/);
if(result3.length>=2){ if (result3.length >= 2) {
let indexs = 0; let indexs = 0;
result3.forEach((item,index)=>{ result3.forEach((item, index) => {
if(index==0){ if (index == 0) {
indexs = indexs+item.length; indexs = indexs + item.length;
}else{ } else {
indexs = indexs+item.length+1; indexs = indexs + item.length + 1;
} }
complexKeywords.push({ complexKeywords.push({
keyword: item, keyword: item,
operatorWithNext: _this.wd_name[indexs]=='&'?'AND':'OR' operatorWithNext: _this.wd_name[indexs] == '&' ? 'AND' : 'OR'
}) })
}) })
_this.paramData = { _this.paramData = {
beginTime: startTime == "" ? null : startTime, beginTime: startTime == "" ? null : startTime,
endTime: endTime == "" ? null : endTime, endTime: endTime == "" ? null : endTime,
// name: _this.wd_name == "" ? null : _this.wd_name, // name: _this.wd_name == "" ? null : _this.wd_name,
complexKeywords:complexKeywords, complexKeywords: complexKeywords,
// module: _this.clientDetails_type[0] == this.fl_type ? this.module_name : null, // module: _this.clientDetails_type[0] == this.fl_type ? this.module_name : null,
// treeId: _this.clientDetails_type[0] == this.fl_type ? null : _this.clientDetails_type[0], // treeId: _this.clientDetails_type[0] == this.fl_type ? null : _this.clientDetails_type[0],
module: _this.clientDetails_type.length==0 ? this.module_name:null, module: _this.clientDetails_type.length == 0 ? this.module_name : null,
treeIds: _this.clientDetails_type.length==0 ? null : _this.clientDetails_type, treeIds: _this.clientDetails_type.length == 0 ? null : _this.clientDetails_type,
}; };
} }
} }
...@@ -731,6 +761,8 @@ export default { ...@@ -731,6 +761,8 @@ export default {
let video_type = false; let video_type = false;
//用户判断此格式是否是音频格式 //用户判断此格式是否是音频格式
let sound_type = false; let sound_type = false;
//用户判断此格式是否是图片
let img_type = false;
arr_video_format().forEach((name) => { arr_video_format().forEach((name) => {
if (name.toUpperCase() == row.file.type.toUpperCase()) { if (name.toUpperCase() == row.file.type.toUpperCase()) {
video_type = true; video_type = true;
...@@ -741,6 +773,11 @@ export default { ...@@ -741,6 +773,11 @@ export default {
sound_type = true; sound_type = true;
} }
}); });
arr_img_format().forEach((name) => {
if (name.toUpperCase() == row.file.type.toUpperCase()) {
img_type = true;
}
});
if (video_type) { if (video_type) {
_this.video_src = `api/rest/file/playVideo/Document?objectName=${row.file.uuid}` _this.video_src = `api/rest/file/playVideo/Document?objectName=${row.file.uuid}`
_this.title = "正在播放视频---" + row.name; _this.title = "正在播放视频---" + row.name;
...@@ -764,6 +801,30 @@ export default { ...@@ -764,6 +801,30 @@ export default {
if (document.getElementById("sound_id").currentTime != 0) if (document.getElementById("sound_id").currentTime != 0)
document.getElementById("sound_id").currentTime = 0; document.getElementById("sound_id").currentTime = 0;
}, 500); }, 500);
} else if (img_type) {
_this.loadings = true;
_this.title_img = "正在预览图片---" + row.name;
_this.centerDialogVisible_img = true;
setTimeout(function () {
let path_srt = "api/rest/file/download/Document/";
path_srt = path_srt + row.file.uuid;
if (row.file.type.toUpperCase() == 'BMP') {
_this.convertBMPtoPNG(path_srt, function (pngImage) {
_this.img_src = pngImage;
_this.loadings = false;
});
} else if (row.file.type.toUpperCase() == 'PSD') {
PSD.fromURL(path_srt).then(function (psd) {
_this.img_src = psd.image.toPng().src;
_this.loadings = false;
});
} else if(row.file.type.toUpperCase() == 'TIF'||row.file.type.toUpperCase() == 'TIFF') {
_this.loadTiff(path_srt);
}else{
_this.img_src = path_srt;
_this.loadings = false;
}
}, 500);
} else { } else {
// let path_srt = // let path_srt =
// "api/rest/3z/document/pdf/" + // "api/rest/3z/document/pdf/" +
...@@ -1126,22 +1187,22 @@ export default { ...@@ -1126,22 +1187,22 @@ export default {
let str = ''; let str = '';
this.psxzIds = [this.psxz_tree_data[0].id]; this.psxzIds = [this.psxz_tree_data[0].id];
if(this.psxz_tree_data.length>0){ if (this.psxz_tree_data.length > 0) {
if(this.psxz_tree_data[0].children.length>0){ if (this.psxz_tree_data[0].children.length > 0) {
str = str + this.zjdsfxz('产品类别代码'); str = str + this.zjdsfxz('产品类别代码');
str = str + this.zjdsfxz('年份代码'); str = str + this.zjdsfxz('年份代码');
str = str + this.zjdsfxz('单位名称代码'); str = str + this.zjdsfxz('单位名称代码');
str = str + this.zjdsfxz('产品类型代码'); str = str + this.zjdsfxz('产品类型代码');
} }
} }
if(str!=''){ if (str != '') {
let mesg = str.replace(/\n/g, '<br />'); let mesg = str.replace(/\n/g, '<br />');
this.$message({ this.$message({
type:'warning', type: 'warning',
dangerouslyUseHTMLString: true, dangerouslyUseHTMLString: true,
message: mesg message: mesg
}); });
}else{ } else {
let file_ext = this.form_PsxzAdd.fileList[0].name.substring( let file_ext = this.form_PsxzAdd.fileList[0].name.substring(
lastIndexOf(this.form_PsxzAdd.fileList[0].name, ".") + 1, lastIndexOf(this.form_PsxzAdd.fileList[0].name, ".") + 1,
this.form_PsxzAdd.fileList[0].name.length this.form_PsxzAdd.fileList[0].name.length
...@@ -1199,7 +1260,7 @@ export default { ...@@ -1199,7 +1260,7 @@ export default {
load.text = "完成中"; load.text = "完成中";
return fileUpload_PUT("api/rest/3z/document/upload", fd1);//文件信息上传 return fileUpload_PUT("api/rest/3z/document/upload", fd1);//文件信息上传
}).then(res => { }).then(res => {
this.parameterArr.map(i=>{ this.parameterArr.map(i => {
i.documentId = res; i.documentId = res;
}) })
console.log(this.parameterArr) console.log(this.parameterArr)
...@@ -1207,7 +1268,7 @@ export default { ...@@ -1207,7 +1268,7 @@ export default {
"api/rest/3z/document/addAttachment", "api/rest/3z/document/addAttachment",
this.parameterArr this.parameterArr
) )
}).then(res=>{ }).then(res => {
this.$message.success('上传成功'); this.$message.success('上传成功');
endLoading(); endLoading();
this.Visible_PsxzAdd = false; this.Visible_PsxzAdd = false;
...@@ -1235,10 +1296,10 @@ export default { ...@@ -1235,10 +1296,10 @@ export default {
//选择文件 //选择文件
handleChange(file, fileList) { handleChange(file, fileList) {
if (fileList.length > 0) { if (fileList.length > 0) {
if (fileList[fileList.length - 1].size > 500 * 1024 * 1024) { if (fileList[fileList.length - 1].size > 1* 1024 * 1024 * 1024) {
this.$message({ this.$message({
type: "warning", type: "warning",
message: "文件只能小于500M!", message: "文件只能小于1G!",
}); });
this.form_add.fileList = []; this.form_add.fileList = [];
return; return;
...@@ -1261,10 +1322,10 @@ export default { ...@@ -1261,10 +1322,10 @@ export default {
//选择文件 //选择文件
handleChangePsxz(file, fileList) { handleChangePsxz(file, fileList) {
if (fileList.length > 0) { if (fileList.length > 0) {
if (fileList[fileList.length - 1].size > 500 * 1024 * 1024) { if (fileList[fileList.length - 1].size > 1* 1024 * 1024 * 1024) {
this.$message({ this.$message({
type: "warning", type: "warning",
message: "文件只能小于500M!", message: "文件只能小于1G!",
}); });
this.form_PsxzAdd.fileList = []; this.form_PsxzAdd.fileList = [];
return; return;
...@@ -1301,29 +1362,29 @@ export default { ...@@ -1301,29 +1362,29 @@ export default {
} }
}); });
let obj = []; let obj = [];
obj_tab.forEach((item,index)=>{ obj_tab.forEach((item, index) => {
if(index<=3){ if (index <= 3) {
let arr = Object.values(item); let arr = Object.values(item);
obj.push(arr); obj.push(arr);
} }
}); });
let idsArr = []; let idsArr = [];
this.parameterArr = []; this.parameterArr = [];
obj.forEach(item1=>{ obj.forEach(item1 => {
let arr = this.psxz_tree_data[0].children.filter(item=>item.label==item1[0]); let arr = this.psxz_tree_data[0].children.filter(item => item.label == item1[0]);
if(arr.length>0 ){ if (arr.length > 0) {
if(item1[1]!='' && item1[1]!=undefined){ if (item1[1] != '' && item1[1] != undefined) {
item1[1] = item1[1]+''; item1[1] = item1[1] + '';
// let arrItem = item1[1].split(','); // let arrItem = item1[1].split(',');
// arrItem.forEach(i=>{ // arrItem.forEach(i=>{
// }) // })
let arrChildren = arr[0].children.filter(item=>item.label==item1[1]); let arrChildren = arr[0].children.filter(item => item.label == item1[1]);
if( arrChildren.length>0){ if (arrChildren.length > 0) {
idsArr.push(arrChildren[0].id); idsArr.push(arrChildren[0].id);
this.parameterArr.push({name:arr[0].label,value:arrChildren[0].label}) this.parameterArr.push({ name: arr[0].label, value: arrChildren[0].label })
} }
} }
}else{ } else {
//当前4大类没找到其中对应的某一个如:没找到“产品类别代码”等 //当前4大类没找到其中对应的某一个如:没找到“产品类别代码”等
} }
}) })
...@@ -1331,18 +1392,18 @@ export default { ...@@ -1331,18 +1392,18 @@ export default {
this.$refs.treePsxz.setCheckedKeys(idsArr); this.$refs.treePsxz.setCheckedKeys(idsArr);
let str = ''; let str = '';
this.psxzIds = [this.psxz_tree_data[0].id]; this.psxzIds = [this.psxz_tree_data[0].id];
if(this.psxz_tree_data.length>0){ if (this.psxz_tree_data.length > 0) {
if(this.psxz_tree_data[0].children.length>0){ if (this.psxz_tree_data[0].children.length > 0) {
str = str + this.zjdsfxz('产品类别代码'); str = str + this.zjdsfxz('产品类别代码');
str = str + this.zjdsfxz('年份代码'); str = str + this.zjdsfxz('年份代码');
str = str + this.zjdsfxz('单位名称代码'); str = str + this.zjdsfxz('单位名称代码');
str = str + this.zjdsfxz('产品类型代码'); str = str + this.zjdsfxz('产品类型代码');
} }
} }
if(str!=''){ if (str != '') {
let mesg = str.replace(/\n/g, '<br />'); let mesg = str.replace(/\n/g, '<br />');
this.$message({ this.$message({
type:'warning', type: 'warning',
dangerouslyUseHTMLString: true, dangerouslyUseHTMLString: true,
message: mesg message: mesg
}); });
...@@ -1351,20 +1412,20 @@ export default { ...@@ -1351,20 +1412,20 @@ export default {
}); });
} }
}, },
zjdsfxz(name){ zjdsfxz(name) {
let str = ''; let str = '';
let zjArr = this.psxz_tree_data[0].children.filter(item=>{ let zjArr = this.psxz_tree_data[0].children.filter(item => {
return item.label==name return item.label == name
});//获取当前类别对象 });//获取当前类别对象
this.psxz_tree_data[0].id; this.psxz_tree_data[0].id;
if(zjArr.length>0){ if (zjArr.length > 0) {
if(zjArr[0].children.length>0){ if (zjArr[0].children.length > 0) {
let arrId = []; let arrId = [];
zjArr[0].children.forEach(i=>{ zjArr[0].children.forEach(i => {
arrId.push(i.id); arrId.push(i.id);
}) })
if(!this.haveSameElements(this.clientDetails_check_typePsxz,arrId)){ if (!this.haveSameElements(this.clientDetails_check_typePsxz, arrId)) {
str = str+''+name+'”子节点未匹配\n'; str = str + '' + name + '”子节点未匹配\n';
this.psxzIds.push(zjArr[0].id); this.psxzIds.push(zjArr[0].id);
} }
} }
...@@ -1499,7 +1560,7 @@ export default { ...@@ -1499,7 +1560,7 @@ export default {
* @param obj 传入对象 * @param obj 传入对象
* @returns * @returns
*/ */
deepClone (obj) { deepClone(obj) {
if (obj === null || typeof obj !== 'object') { if (obj === null || typeof obj !== 'object') {
return obj; return obj;
} }
...@@ -1521,6 +1582,31 @@ export default { ...@@ -1521,6 +1582,31 @@ export default {
return newObj; return newObj;
}, {}); }, {});
} }
},
convertBMPtoPNG(bmpImage, callback) {
// 创建一个新的 Image 对象
const img = new Image();
img.onload = function () {
// 创建一个 Canvas 元素
const canvas = document.createElement('canvas');
canvas.width = img.width;
canvas.height = img.height;
// 获取 CanvasRenderingContext2D 对象
const ctx = canvas.getContext('2d');
// 将 BMP 图片绘制到 Canvas 上
ctx.drawImage(img, 0, 0);
// 将 Canvas 的内容转换为 PNG 格式的 DataURL
const pngImage = canvas.toDataURL('image/png');
// 调用回调函数并传递转换后的 PNG 图片
callback(pngImage);
};
// 设置 BMP 图片源
img.src = bmpImage;
} }
}, },
mounted() { mounted() {
...@@ -1565,7 +1651,7 @@ export default { ...@@ -1565,7 +1651,7 @@ export default {
name: "", name: "",
region: "", region: "",
fileList: [], fileList: [],
fileList1:[], fileList1: [],
ms: "", ms: "",
gjc: "", gjc: "",
}; };
...@@ -1587,6 +1673,12 @@ export default { ...@@ -1587,6 +1673,12 @@ export default {
document.getElementById("sound_id").pause(); document.getElementById("sound_id").pause();
} }
}, },
//图片弹框预览
centerDialogVisible_img: function (s) {
if (!s) {
this.img_src = "";
}
},
clientDetails: function (val) { clientDetails: function (val) {
this.clientDetails_type = val.type; this.clientDetails_type = val.type;
this.module_name = val.module_name; this.module_name = val.module_name;
...@@ -1610,7 +1702,7 @@ export default { ...@@ -1610,7 +1702,7 @@ export default {
this.psxz_tree_data = this.deepClone(val); this.psxz_tree_data = this.deepClone(val);
this.psxz_tree_dataCopy = this.deepClone(val); this.psxz_tree_dataCopy = this.deepClone(val);
this.psxzIds = []; this.psxzIds = [];
if(this.psxz_tree_data.length>0){ if (this.psxz_tree_data.length > 0) {
this.psxzIds.push(this.psxz_tree_data[0].id); this.psxzIds.push(this.psxz_tree_data[0].id);
// if(this.psxz_tree_data[0].children.length>0){ // if(this.psxz_tree_data[0].children.length>0){
// this.psxz_tree_data[0].children.map(item=>{ // this.psxz_tree_data[0].children.map(item=>{
...@@ -2043,12 +2135,14 @@ export default { ...@@ -2043,12 +2135,14 @@ export default {
margin-left: 75px; margin-left: 75px;
} }
} }
.psxz{
.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner{ .psxz {
.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
background-color: #409EFF; background-color: #409EFF;
border-color: #409EFF; border-color: #409EFF;
} }
.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner::after{
.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner::after {
border-color: #ffffff; border-color: #ffffff;
} }
} }
...@@ -2093,6 +2187,7 @@ export default { ...@@ -2093,6 +2187,7 @@ export default {
.myTree>.el-tree-node>.el-tree-node__content .el-checkbox { .myTree>.el-tree-node>.el-tree-node__content .el-checkbox {
display: none; display: none;
} }
.el-tree { .el-tree {
color: white; color: white;
background: transparent; background: transparent;
...@@ -2178,17 +2273,20 @@ export default { ...@@ -2178,17 +2273,20 @@ export default {
} }
} }
} }
.psxz{
.el-tree{ .psxz {
.el-tree {
margin-top: 0px; margin-top: 0px;
} }
.el-dialog__body { .el-dialog__body {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: flex-start; align-items: flex-start;
gap: 20px; gap: 20px;
} }
.el-tree > .el-tree-node > .el-tree-node__children{
.el-tree>.el-tree-node>.el-tree-node__children {
height: 380px; height: 380px;
overflow: auto !important; overflow: auto !important;
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment