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