fix: 修复附件上传和展示问题
This commit is contained in:
@@ -28,6 +28,9 @@
|
||||
style="--el-switch-on-color:#BEA266 ; --el-switch-off-color:#cecdcd"
|
||||
/>
|
||||
</div>
|
||||
<el-button color="#DED0B2" style="margin-left: 10px"
|
||||
@click="handleCarbonCopy()" >立即抄送
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="process">
|
||||
<operation-render v-if="processViewer && data.operationList && data.operationList.length > 0&&!changeDiagram"
|
||||
@@ -36,6 +39,10 @@
|
||||
<process-diagram-viewer v-if="processViewer&&changeDiagram" :id-name="idName?idName:type"/>
|
||||
</div>
|
||||
</div>
|
||||
<user-picker :multiple="true" ref="carbonCopyUserRef" title="请选择抄送人员"
|
||||
v-model:value="carbonCopyUserList" @ok="carbonCopyUserPickerOk"
|
||||
@cancelOrClear="carbonCopyUserPickerOk"/>
|
||||
|
||||
<file-preview ref="filePreviewRef" :fullscreen="fullscreen" v-if="filePreviewShow"
|
||||
:fileName="filePreviewParam.fileName" :fileUrl="filePreviewParam.fileUrl"
|
||||
:fileType="filePreviewParam.fileType"/>
|
||||
@@ -49,6 +56,8 @@ import {ElLoading, ElNotification} from 'element-plus';
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
import {searchImplementationFileList} from "@/api/project-manage/attachment";
|
||||
import {getTags} from "@/api/project-manage";
|
||||
import {applyCcSend} from "@/api/expense-manage";
|
||||
import UserPicker from "@/views/workflow/process/common/UserPicker.vue";
|
||||
|
||||
const changeDiagram = ref(false)
|
||||
const props = defineProps({
|
||||
@@ -104,6 +113,8 @@ const props = defineProps({
|
||||
}
|
||||
})
|
||||
const form = ref()
|
||||
const carbonCopyUserList = ref([])
|
||||
const carbonCopyUserRef = ref()
|
||||
|
||||
const editSingleTableConfig = reactive({
|
||||
columns: [
|
||||
@@ -390,6 +401,40 @@ const _value = computed({
|
||||
emit("update:value", val);
|
||||
}
|
||||
})
|
||||
const handleCarbonCopy = () => {
|
||||
carbonCopyUserRef.value.showUserPicker()
|
||||
}
|
||||
const carbonCopyUserPickerOk = (userList) => {
|
||||
carbonCopyUserList.value = userList.map(item => item.id)
|
||||
console.log('localFormData.value', props.data)
|
||||
console.log("🚀 ~ file:'carbonCopyUserList.value ", carbonCopyUserList.value)
|
||||
|
||||
addUser()
|
||||
}
|
||||
const addUser = async () => {
|
||||
const res = await applyCcSend({
|
||||
instanceId: props.data.processInstanceId,
|
||||
// message:props.data.remark,
|
||||
projectId: route.query.projectId,
|
||||
state: props.data.state,
|
||||
userIds: carbonCopyUserList.value
|
||||
})
|
||||
console.log('res', res)
|
||||
if (res.code === 1000) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '抄送成功',
|
||||
type: 'error'
|
||||
})
|
||||
tableIns.value.refresh()
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
}
|
||||
const clickToPreview = (row) => {
|
||||
filePreviewShow.value = false
|
||||
filePreviewParam.value = {
|
||||
|
||||
Reference in New Issue
Block a user