Compare commits

...

2 Commits

Author SHA1 Message Date
xyc
6d627d6908 Merge branch 'master' into insp 2025-05-19 13:34:04 +08:00
xyc
6a867c07e6 更新 2025-05-19 13:21:28 +08:00

View File

@ -76,7 +76,7 @@
</div>
<div class="bjandshanchu">
<div class="one" @click="handleE(item)">编辑</div>
<!-- <div class="two" v-if="item.type == '2'" @click="downloadFile(item)">下载</div>-->
<div class="two" v-if="item.type == '2'" @click="downloadFile(item)">下载</div>
<div class="two" v-if="item.type == '2'" @click="preview(item)">预览</div>
<div class="two" @click="clickStaff(item.id)" v-hasPermi="['inspectionFile:inspectionFilePermis:edit']">
分配权限
@ -175,6 +175,7 @@
<template #description>
<div class="step-content">
<div class="step-file-name">文件名称{{ item.fileName }}</div>
<div class="step-time">修改人{{ item.nickname }}</div>
<div class="step-time">修改时间{{ formatDate(item.createTime) }}</div>
<div class="step-time">提醒时间{{ formatDate(item.warnTime) }}</div>
<div class="step-download" @click="downloadFile(item)" v-if="item.type == '2'">📂 下载历史文件</div>
@ -337,18 +338,23 @@ export default {
number: 0,
uploadList: [],
totalUploadCount: 0,
servicePackageId: "jiance",
dictType:"ins_file_role",
//
queryParams: {
pageNum: 1,
pageSize: 10,
servicePackageId: "jiance",
type: null,
fatherId: null,
dictType: 'ins_file_role'
},
fatherId: '',
oldFatherId: '',
//
form: {},
form: {servicePackageId: this.servicePackageId},
isShowFile: false,
//
rules: {
fileList: [
@ -421,6 +427,8 @@ export default {
this.queryParams.pageNum = 1
const data = {
fatherId: this.fatherId,
servicePackageId: this.servicePackageId,
dictType: this.dictType,
fileName: this.fatherId === '' || this.fatherId == null || this.fatherId === undefined ? this.queryParams.fileName : ''
}
this.getFolderList(data)
@ -451,7 +459,10 @@ export default {
handleFileClick(row) {
if (row.type === '2') {
// this.fileUrl = 'https://view.xdocin.com/view?src=' + this.imageUrl + row.filePath
this.fileUrl = 'https://view.officeapps.live.com/op/view.aspx?src=' + this.imageUrl + row.filePath
this.fileUrl = 'https://view.officeapps.live.com/op/view.aspx?src=' +
(row.filePath.includes('http')
? this.inspectionFileUrl + row.filePath.replace(/^.*?uploads\//, 'uploads/')
: this.previewUrl + row.filePath);
this.$nextTick(() => {
// this.$refs.filePreview.show()
this.selectFile = row
@ -530,7 +541,9 @@ export default {
const data = {
pageNum: 1,
pageSize: 10,
fatherId: id
fatherId: id,
servicePackageId: this.servicePackageId,
dictType: this.dictType
}
this.getFolderList(data)
},
@ -592,7 +605,8 @@ export default {
createTime: null,
createBy: null,
updateTime: null,
updateBy: null
updateBy: null,
servicePackageId: this.servicePackageId
};
this.resetForm("form");
},
@ -650,14 +664,14 @@ export default {
this.title = "修改";
console.log(item)
//itemiditemid
this.folderList = this.disableIfExistsInTree(this.folderList, item.id)
this.folderList = this.disableIfExistsInTree(this.folderList, item.id)
},
disableIfExistsInTree(treeData, targetId) {
console.log(treeData, targetId, '执行');
function traverse(nodes, parentDisabled = false) {
return nodes.map(node => {
let newNode = { ...node };
let newNode = {...node};
//
if (newNode.children && newNode.children.length > 0) {
@ -723,6 +737,7 @@ export default {
item.fileName = this.getFileNameWithoutExtension(item.name)
item.filePath = item.url
item.warnTime = this.form.warnTime
item.servicePackageId = "jiance"
})
addBatchInspectionFile(this.fileList).then(res => {
this.$modal.msgSuccess("新增成功");