|
@@ -586,8 +586,8 @@
|
|
|
<el-radio class="ml-4" value="2">
|
|
|
仅当前节点
|
|
|
</el-radio>
|
|
|
- <!-- <el-radio value="1">当前及父节点</el-radio> -->
|
|
|
- <el-radio value="1">当前及子节点</el-radio>
|
|
|
+ <el-radio value="1">当前及父节点</el-radio>
|
|
|
+ <!-- <el-radio value="1">当前及子节点</el-radio> -->
|
|
|
</el-radio-group>
|
|
|
</div>
|
|
|
<div class="right">
|
|
@@ -1026,6 +1026,7 @@
|
|
|
:limit="1"
|
|
|
:on-exceed="handleExceed"
|
|
|
:before-upload="beforeUpload"
|
|
|
+ :on-progress="handleProgress"
|
|
|
>
|
|
|
<div class="mt-24px text-black">将文件拖动到此处,<span class="text-blue">或点击上传</span></div>
|
|
|
<div class="mt-8px text-12px">支持的文件格式:.xls,.xlsx</div>
|
|
@@ -1843,8 +1844,8 @@ const copyContractNodeSubmitBusinessData = async (form, table, classify) => {
|
|
|
const addNodeModal = ref(false)
|
|
|
const addTreeNodeId = ref('')
|
|
|
const addTreeNodeOldId = ref('')
|
|
|
-const addTreeNodeType = ref('1')
|
|
|
-// const addTreeNodeType = ref('3')
|
|
|
+// const addTreeNodeType = ref('1')
|
|
|
+const addTreeNodeType = ref('3')
|
|
|
const isCustom = ref(null)
|
|
|
//新增自定义节点
|
|
|
const addNodeModalCus = ref(false)
|
|
@@ -2660,6 +2661,18 @@ const beforeUpload = (file) => {
|
|
|
}
|
|
|
return true
|
|
|
}
|
|
|
+// 添加进度条处理函数
|
|
|
+// 添加进度条处理函数
|
|
|
+const handleProgress = (event, file) => {
|
|
|
+ // 控制上传进度最大显示99%
|
|
|
+ if (event.percent >= 99) {
|
|
|
+ file.percentage = 99
|
|
|
+ } else {
|
|
|
+ file.percentage = event.percent
|
|
|
+ }
|
|
|
+}
|
|
|
+// 添加进度条处理函数
|
|
|
+
|
|
|
const handleExceed = (files) => {
|
|
|
dialogUploadRef.value.clearFiles()
|
|
|
const file = files[0]
|
|
@@ -2673,11 +2686,17 @@ const handleSuccess = (res) => {
|
|
|
confirmLoading.value = false
|
|
|
if (res.code === 200) {
|
|
|
window.$message.success(res.msg || '上传成功')
|
|
|
+ // 上传成功时才显示100%
|
|
|
+ const uploadFiles = dialogUploadRef.value?.uploadFiles || []
|
|
|
+ uploadFiles.forEach(file => {
|
|
|
+ file.percentage = 100
|
|
|
+ })
|
|
|
|
|
|
divisionImportDialog.value = false
|
|
|
+
|
|
|
setTimeout(()=>{
|
|
|
window?.location?.reload() //刷新页面
|
|
|
- }, 1000)
|
|
|
+ }, 4000)
|
|
|
} else {
|
|
|
window.$message.error(res.msg || '上传失败')
|
|
|
}
|
|
@@ -2694,7 +2713,7 @@ const handleError = (error) => {
|
|
|
}
|
|
|
}
|
|
|
const confirmTap = ()=>{
|
|
|
-
|
|
|
+ confirmLoading.value = true
|
|
|
dialogUploadRef.value.submit()
|
|
|
|
|
|
|