更新0801
This commit is contained in:
parent
24bc3c0872
commit
49a81f5fb9
@ -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) => {
|
||||||
|
|||||||
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 文件名称高亮 */
|
/* 文件名称高亮 */
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user