|
@@ -142,6 +142,9 @@
|
|
|
<el-input v-model="row.dutyUser"/>
|
|
|
</template>
|
|
|
<template #action="{row,index}">
|
|
|
+ <HcFileUpload1 @change="newUploadsChange($event, row)" @progress="newUploadsProgress($event, row)" v-if="row.id">
|
|
|
+ <el-button type="primary" plain size="small" :loading="row['newBtnLoading']">上传新文件</el-button>
|
|
|
+ </HcFileUpload1>
|
|
|
<el-button type="danger" plain size="small" :loading="row['delBtnLoading']" @click="delUploadData(row,index)">删除</el-button>
|
|
|
</template>
|
|
|
</HcTable>
|
|
@@ -228,6 +231,7 @@ import {useAppStore} from "~src/store";
|
|
|
import {useRouter, useRoute} from 'vue-router'
|
|
|
import ProjectTree from "./components/ProjectTree.vue"
|
|
|
import HcFileUpload from "./components/HcFileUpload.vue"
|
|
|
+import HcFileUpload1 from "./components/HcFileUpload1.vue"
|
|
|
import {getStoreData, setStoreData} from '~src/utils/storage'
|
|
|
import projectScanningApi from "~api/other-file/projectScanning";
|
|
|
import {downloadBlob, getArrValue, deepClone} from "vue-utils-plus"
|
|
@@ -495,7 +499,7 @@ const tableUploadColumn = ref([
|
|
|
{key:'isApproval', name: '是否需要审批'},
|
|
|
{key:'isNeedCertification', name: '是否需要认证'},
|
|
|
{key:'dutyUser', name: '责任者'},
|
|
|
- {key:'action', name: '操作', width: 100}
|
|
|
+ {key:'action', name: '操作', width: 180}
|
|
|
])
|
|
|
const setTableUploadColumn = () => {
|
|
|
if (isBuiltDrawing.value === 1) {
|
|
@@ -510,7 +514,7 @@ const setTableUploadColumn = () => {
|
|
|
{key:'isApproval', name: '是否需要审批'},
|
|
|
{key:'isNeedCertification', name: '是否需要认证'},
|
|
|
{key:'dutyUser', name: '责任者'},
|
|
|
- {key:'action', name: '操作', width: 100}
|
|
|
+ {key:'action', name: '操作', width: 180}
|
|
|
]
|
|
|
} else {
|
|
|
tableUploadColumn.value = [
|
|
@@ -520,7 +524,7 @@ const setTableUploadColumn = () => {
|
|
|
{key:'isApproval', name: '是否需要审批'},
|
|
|
{key:'isNeedCertification', name: '是否需要认证'},
|
|
|
{key:'dutyUser', name: '责任者'},
|
|
|
- {key:'action', name: '操作', width: 100}
|
|
|
+ {key:'action', name: '操作', width: 180}
|
|
|
]
|
|
|
}
|
|
|
}
|
|
@@ -575,6 +579,26 @@ const tableInput = (val,row,isv) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+//上传新文件
|
|
|
+const newUploadsChange = ({fileList}, row) => {
|
|
|
+ if (fileList.length > 0) {
|
|
|
+ const item = fileList[0]
|
|
|
+ const name = item['originalName'] || ''
|
|
|
+ const fileName = name.substring(0, name.lastIndexOf("."))
|
|
|
+ //更新数据
|
|
|
+ row.fileName = fileName;
|
|
|
+ row.ossFileName = item?.name || ''
|
|
|
+ row.fileUrl = item?.link || ''
|
|
|
+ row.pdfFileUrl = item?.pdfUrl || ''
|
|
|
+ row.filePage = item?.page || ''
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+const newUploadsProgress = (val, row) => {
|
|
|
+ row.newBtnLoading = val
|
|
|
+}
|
|
|
+
|
|
|
//删除
|
|
|
const delUploadData = async (row,index) => {
|
|
|
if (row['ossFileName']) {
|
|
@@ -652,6 +676,7 @@ const batchEditClick = () => {
|
|
|
const result = rows.every(({status})=> {
|
|
|
return status !== 1 && status !== 2
|
|
|
})
|
|
|
+ console.log(rows)
|
|
|
//判断状态
|
|
|
if (result) {
|
|
|
tableUploadType.value = 'edit'
|
|
@@ -914,3 +939,10 @@ const onmousedown = () => {
|
|
|
<style lang="scss" scoped>
|
|
|
@import '../../styles/other-file/project-scanning.scss';
|
|
|
</style>
|
|
|
+
|
|
|
+<style lang="scss">
|
|
|
+.el-table td.el-table__cell .hc-file-upload-box {
|
|
|
+ display: inline-block;
|
|
|
+ margin-right: 12px;
|
|
|
+}
|
|
|
+</style>
|