|
@@ -37,7 +37,7 @@
|
|
|
action="#"
|
|
action="#"
|
|
|
v-model:file-list="fileList"
|
|
v-model:file-list="fileList"
|
|
|
:http-request="handlePostFile"
|
|
:http-request="handlePostFile"
|
|
|
- :auto-upload="false"
|
|
|
|
|
|
|
+ :auto-upload="true"
|
|
|
:disabled="isEdit === 'view'"
|
|
:disabled="isEdit === 'view'"
|
|
|
:limit="1"
|
|
:limit="1"
|
|
|
:on-change="handleChange"
|
|
:on-change="handleChange"
|
|
@@ -223,6 +223,7 @@ const uploadRef = ref()
|
|
|
const fileList = ref<UploadFile[]>([]) // 文件列表
|
|
const fileList = ref<UploadFile[]>([]) // 文件列表
|
|
|
const accept = '.doc,.docx,.pdf'
|
|
const accept = '.doc,.docx,.pdf'
|
|
|
const fileLoading = ref(false) // 表单的加载中
|
|
const fileLoading = ref(false) // 表单的加载中
|
|
|
|
|
+const isSubmit = ref(false) // 是否提交审核(区分仅上传关联 vs 上传后提交审核)
|
|
|
|
|
|
|
|
const showFileUrl = computed(() => {
|
|
const showFileUrl = computed(() => {
|
|
|
return fileList.value.length > 0
|
|
return fileList.value.length > 0
|
|
@@ -291,7 +292,12 @@ const handlePostFile = async (options: UploadRequestOptions) => {
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
onSuccess(manualUrl)
|
|
onSuccess(manualUrl)
|
|
|
- handleSubmitOperationReport(manualUrl)
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (isSubmit.value) {
|
|
|
|
|
+ handleSubmitOperationReport(manualUrl)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ relaseReport(manualUrl)
|
|
|
|
|
+ }
|
|
|
} catch (error: any) {
|
|
} catch (error: any) {
|
|
|
onError(error)
|
|
onError(error)
|
|
|
ElMessage.error('上传失败,请您重新上传!')
|
|
ElMessage.error('上传失败,请您重新上传!')
|
|
@@ -299,7 +305,19 @@ const handlePostFile = async (options: UploadRequestOptions) => {
|
|
|
fileLoading.value = false
|
|
fileLoading.value = false
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+// 关联文件到任务单(仅关联不提交审核)
|
|
|
|
|
+const relaseReport = (manualUrl: string) => {
|
|
|
|
|
+ const { reportId, templateId } = props.editInspectionplanParams
|
|
|
|
|
+ const params = {
|
|
|
|
|
+ id: reportId,
|
|
|
|
|
+ manualUrl,
|
|
|
|
|
+ templateId
|
|
|
|
|
+ }
|
|
|
|
|
+ PipeTaskOrderApi.releaseManualReport(params).then(() => {
|
|
|
|
|
+ ElMessage.success('关联文件成功')
|
|
|
|
|
+ editData.value.manualUrl = manualUrl
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
// 提交审核
|
|
// 提交审核
|
|
|
const handleSubmitOperationReport = async (manualUrl = '') => {
|
|
const handleSubmitOperationReport = async (manualUrl = '') => {
|
|
|
// 弹窗选择审批人
|
|
// 弹窗选择审批人
|
|
@@ -358,6 +376,7 @@ const handleSubmitBefore = async () => {
|
|
|
// console.log(props.editInspectionplanParams, 'props.editInspectionplanParams')
|
|
// console.log(props.editInspectionplanParams, 'props.editInspectionplanParams')
|
|
|
// if (props.isEdit === 'add' && !fileList.value.length) return ElMessage.error('请先上传方案文件')
|
|
// if (props.isEdit === 'add' && !fileList.value.length) return ElMessage.error('请先上传方案文件')
|
|
|
if (!fileList.value.length) return ElMessage.error('请先上传方案文件')
|
|
if (!fileList.value.length) return ElMessage.error('请先上传方案文件')
|
|
|
|
|
+ isSubmit.value = true
|
|
|
getSchemeReviewerList()
|
|
getSchemeReviewerList()
|
|
|
}
|
|
}
|
|
|
|
|
|