更新0801

This commit is contained in:
xyc 2025-08-01 13:43:03 +08:00
parent 24bc3c0872
commit 49a81f5fb9
2 changed files with 13 additions and 13 deletions

View File

@ -7,8 +7,8 @@ const permission = {
state: { state: {
routes: [], routes: [],
addRoutes: [], addRoutes: [],
sidebarRouters: [], // 左侧边菜单的路由,被 Sidebar/index.vue 使用 sidebarRouters: [], // 左侧边菜单的路由,被 Sidebar/file.vue 使用
topbarRouters: [], // 顶部菜单的路由,被 TopNav/index.vue 使用 topbarRouters: [], // 顶部菜单的路由,被 TopNav/file.vue 使用
}, },
mutations: { mutations: {
SET_ROUTES: (state, routes) => { SET_ROUTES: (state, routes) => {

View File

@ -289,14 +289,14 @@ import {
addBatchInspectionFile, queryTreeFolder addBatchInspectionFile, queryTreeFolder
} from './api/file' } from './api/file'
import driveFileUpload from '@/components/FileUpload/index.vue' import driveFileUpload from '@/components/FileUpload/index.vue'
import { getAccessToken } from '@/utils/auth' import {getAccessToken} from '@/utils/auth'
// import cos from "@/utils/cosUpload" // import cos from "@/utils/cosUpload"
import cos from '@/utils/cos' import cos from '@/utils/cos'
import {getLastPathSegment} from "@/utils/ruoyi"; import {getLastPathSegment} from "@/utils/ruoyi";
export default { export default {
name: 'index', name: 'index',
components: { driveFileUpload }, components: {driveFileUpload},
data() { data() {
return { return {
uploadProgress: 0, uploadProgress: 0,
@ -309,7 +309,7 @@ export default {
// //
ids: [], ids: [],
fileList: [], fileList: [],
headers: { Authorization: 'Bearer ' + getAccessToken() }, // headers: {Authorization: 'Bearer ' + getAccessToken()}, //
// //
single: true, single: true,
// //
@ -409,7 +409,7 @@ export default {
this.queryParams.dictType = 'repair_report_role'; this.queryParams.dictType = 'repair_report_role';
break; break;
} }
this.queryParams.fatherId= this.$route.query.folderId || null // this.queryParams.fatherId = this.$route.query.folderId || null //
this.fatherId = this.queryParams.fatherId this.fatherId = this.queryParams.fatherId
this.getList() this.getList()
@ -529,7 +529,7 @@ export default {
}) })
} }
}, },
getRowClassName({ row }) { getRowClassName({row}) {
console.log('返回的class', row.id === this.selectFile.id ? 'highlight-row' : '') console.log('返回的class', row.id === this.selectFile.id ? 'highlight-row' : '')
// //
return row.id === this.selectFile.id ? 'highlight-row' : '' return row.id === this.selectFile.id ? 'highlight-row' : ''
@ -742,7 +742,7 @@ export default {
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) {
@ -837,7 +837,7 @@ export default {
}, },
// //
Deleteanniu(id) { Deleteanniu(id) {
this.$modal.confirm('是否确认删除inspectionFile编号为"' + id + '"的数据项?').then(function() { this.$modal.confirm('是否确认删除inspectionFile编号为"' + id + '"的数据项?').then(function () {
return delInspectionFile(id) return delInspectionFile(id)
}).then(() => { }).then(() => {
this.getList() this.getList()
@ -852,7 +852,7 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const ids = row.id || this.ids const ids = row.id || this.ids
this.$modal.confirm('是否确认删除inspectionFile编号为"' + ids + '"的数据项?').then(function() { this.$modal.confirm('是否确认删除inspectionFile编号为"' + ids + '"的数据项?').then(function () {
return delInspectionFile(ids) return delInspectionFile(ids)
}).then(() => { }).then(() => {
this.getList() this.getList()
@ -931,14 +931,14 @@ export default {
return reject() return reject()
} }
this.$message.success('上传成功:' + data.Location) this.$message.success('上传成功:' + data.Location)
this.fileList.push({ name: file.name, url: data.Location }) this.fileList.push({name: file.name, url: data.Location})
resolve() resolve()
} }
) )
}) })
}, },
// 使 cos-js-sdk // 使 cos-js-sdk
async uploadToCOS({ file }) { async uploadToCOS({file}) {
const fileName = `files/${file.name}` // const fileName = `files/${file.name}` //
cos.putObject( cos.putObject(
{ {
@ -1126,7 +1126,7 @@ export default {
/* 时间样式 */ /* 时间样式 */
.step-time { .step-time {
font-size: 14px; font-size: 14px;
//color: #666; //color: #666;
} }
/* 文件名称高亮 */ /* 文件名称高亮 */