|
|
@ -21,7 +21,7 @@ |
|
|
<!-- <a-button type="primary" size="small" class="mr-3" @click="paste">粘贴</a-button> --> |
|
|
<!-- <a-button type="primary" size="small" class="mr-3" @click="paste">粘贴</a-button> --> |
|
|
|
|
|
|
|
|
<div class="inline-block"> |
|
|
<div class="inline-block"> |
|
|
<a-upload name="file" :action="action" :headers="headers" :max-count="1" @change="handleChange"> |
|
|
<a-upload name="param" :action="action" :headers="headers" :showUploadList="false" :max-count="1" @change="handleChange"> |
|
|
<a-button type="primary" size="small" class="mr-3">文件</a-button> |
|
|
<a-button type="primary" size="small" class="mr-3">文件</a-button> |
|
|
</a-upload> |
|
|
</a-upload> |
|
|
</div> |
|
|
</div> |
|
|
@ -44,6 +44,7 @@ import Reviewer from '@/components/tall/Reviewer/Reviewer.vue'; |
|
|
|
|
|
|
|
|
const store = useStore(); |
|
|
const store = useStore(); |
|
|
const projectId = computed(() => store.getters['project/projectId']); |
|
|
const projectId = computed(() => store.getters['project/projectId']); |
|
|
|
|
|
const sessionProjectId = sessionStorage.getItem('projectId'); |
|
|
const roleId = computed(() => store.state.role.roleId); |
|
|
const roleId = computed(() => store.state.role.roleId); |
|
|
|
|
|
|
|
|
const deliver = inject('deliver'); // 交付物初始值 |
|
|
const deliver = inject('deliver'); // 交付物初始值 |
|
|
@ -71,6 +72,7 @@ function handleChange(info) { |
|
|
|
|
|
|
|
|
// 提交交付物 |
|
|
// 提交交付物 |
|
|
async function submit() { |
|
|
async function submit() { |
|
|
|
|
|
console.log(reviewerRef.value); |
|
|
const { checkedCheckers } = reviewerRef.value; // 拿到选择检查人组件中选中的检查人 |
|
|
const { checkedCheckers } = reviewerRef.value; // 拿到选择检查人组件中选中的检查人 |
|
|
// 提交前的验证 |
|
|
// 提交前的验证 |
|
|
if (!validateDeliverForm(checkedCheckers)) return; |
|
|
if (!validateDeliverForm(checkedCheckers)) return; |
|
|
@ -85,21 +87,24 @@ async function submit() { |
|
|
|
|
|
|
|
|
const { url } = store.state.projects.project; |
|
|
const { url } = store.state.projects.project; |
|
|
|
|
|
|
|
|
const param = { |
|
|
const params = { |
|
|
projectId: projectId.value, |
|
|
param: { |
|
|
roleId: roleId.value, |
|
|
projectId: projectId.value || sessionProjectId, |
|
|
deliverId: deliver.value.deliverId, |
|
|
roleId: roleId.value, |
|
|
fileList: [linkValue.value], |
|
|
deliverId: deliver.value.deliverId, |
|
|
checkerList, |
|
|
fileList: [linkValue.value], |
|
|
msgId: task.msgId, |
|
|
checkerList, |
|
|
|
|
|
msgId: task.msgId, |
|
|
|
|
|
}, |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
const data = await submitDeliverInfo(param, url); |
|
|
const data = await submitDeliverInfo(params, url); |
|
|
message.info('提交交付物信息成功'); |
|
|
message.info('提交交付物信息成功'); |
|
|
resetControlState(); // 重置控件的初始状态 |
|
|
resetControlState(); // 重置控件的初始状态 |
|
|
emits('upload-success'); |
|
|
emits('upload-success'); |
|
|
} catch (error) { |
|
|
} catch (error) { |
|
|
message.info('提交交付物信息失败'); |
|
|
message.info('提交交付物信息失败'); |
|
|
|
|
|
submitBtnLoading.value = false; // 按钮loading |
|
|
throw new Error(error); |
|
|
throw new Error(error); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|