更新0801
This commit is contained in:
parent
24bc3c0872
commit
49a81f5fb9
@ -7,8 +7,8 @@ const permission = {
|
||||
state: {
|
||||
routes: [],
|
||||
addRoutes: [],
|
||||
sidebarRouters: [], // 左侧边菜单的路由,被 Sidebar/index.vue 使用
|
||||
topbarRouters: [], // 顶部菜单的路由,被 TopNav/index.vue 使用
|
||||
sidebarRouters: [], // 左侧边菜单的路由,被 Sidebar/file.vue 使用
|
||||
topbarRouters: [], // 顶部菜单的路由,被 TopNav/file.vue 使用
|
||||
},
|
||||
mutations: {
|
||||
SET_ROUTES: (state, routes) => {
|
||||
|
@ -289,14 +289,14 @@ import {
|
||||
addBatchInspectionFile, queryTreeFolder
|
||||
} from './api/file'
|
||||
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/cos'
|
||||
import {getLastPathSegment} from "@/utils/ruoyi";
|
||||
|
||||
export default {
|
||||
name: 'index',
|
||||
components: { driveFileUpload },
|
||||
components: {driveFileUpload},
|
||||
data() {
|
||||
return {
|
||||
uploadProgress: 0,
|
||||
@ -309,7 +309,7 @@ export default {
|
||||
// 选中数组
|
||||
ids: [],
|
||||
fileList: [],
|
||||
headers: { Authorization: 'Bearer ' + getAccessToken() }, // 设置上传的请求头部
|
||||
headers: {Authorization: 'Bearer ' + getAccessToken()}, // 设置上传的请求头部
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
@ -409,7 +409,7 @@ export default {
|
||||
this.queryParams.dictType = 'repair_report_role';
|
||||
break;
|
||||
}
|
||||
this.queryParams.fatherId= this.$route.query.folderId || null // 明确初始状态
|
||||
this.queryParams.fatherId = this.$route.query.folderId || null // 明确初始状态
|
||||
|
||||
this.fatherId = this.queryParams.fatherId
|
||||
this.getList()
|
||||
@ -529,7 +529,7 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
getRowClassName({ row }) {
|
||||
getRowClassName({row}) {
|
||||
console.log('返回的class', 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) {
|
||||
return nodes.map(node => {
|
||||
let newNode = { ...node }
|
||||
let newNode = {...node}
|
||||
|
||||
// 递归处理子节点,同时传递父级的禁用状态
|
||||
if (newNode.children && newNode.children.length > 0) {
|
||||
@ -837,7 +837,7 @@ export default {
|
||||
},
|
||||
//新建删除
|
||||
Deleteanniu(id) {
|
||||
this.$modal.confirm('是否确认删除inspectionFile编号为"' + id + '"的数据项?').then(function() {
|
||||
this.$modal.confirm('是否确认删除inspectionFile编号为"' + id + '"的数据项?').then(function () {
|
||||
return delInspectionFile(id)
|
||||
}).then(() => {
|
||||
this.getList()
|
||||
@ -852,7 +852,7 @@ export default {
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids
|
||||
this.$modal.confirm('是否确认删除inspectionFile编号为"' + ids + '"的数据项?').then(function() {
|
||||
this.$modal.confirm('是否确认删除inspectionFile编号为"' + ids + '"的数据项?').then(function () {
|
||||
return delInspectionFile(ids)
|
||||
}).then(() => {
|
||||
this.getList()
|
||||
@ -931,14 +931,14 @@ export default {
|
||||
return reject()
|
||||
}
|
||||
this.$message.success('上传成功:' + data.Location)
|
||||
this.fileList.push({ name: file.name, url: data.Location })
|
||||
this.fileList.push({name: file.name, url: data.Location})
|
||||
resolve()
|
||||
}
|
||||
)
|
||||
})
|
||||
},
|
||||
// 直接使用 cos-js-sdk 进行上传
|
||||
async uploadToCOS({ file }) {
|
||||
async uploadToCOS({file}) {
|
||||
const fileName = `files/${file.name}` // 你的存储路径
|
||||
cos.putObject(
|
||||
{
|
||||
@ -1126,7 +1126,7 @@ export default {
|
||||
/* 时间样式 */
|
||||
.step-time {
|
||||
font-size: 14px;
|
||||
//color: #666;
|
||||
//color: #666;
|
||||
}
|
||||
|
||||
/* 文件名称高亮 */
|
||||
|
Loading…
Reference in New Issue
Block a user