测评上传

This commit is contained in:
zhangsir
2024-03-29 10:05:26 +08:00
parent e1b3bb133d
commit 7fb7667ef0
2 changed files with 38 additions and 25 deletions

View File

@@ -62,7 +62,7 @@
</template>
<script>
import { ref,onMounted, reactive,toRefs,computed } from "vue";
import { ref,onMounted, reactive,toRefs,computed,watch } from "vue";
import dialog from "@/utils/dialog";
import { getPage,deleteById } from "@/api/evaluation";
import { useRoute } from "vue-router";
@@ -149,7 +149,15 @@ import {boeRequest} from "@/api/request";
state.params.pageSize = pageSize
listData()
}
watch(()=>state.params.pageSize,(val)=>{
state.params.pageNo = 1
listData()
})
const downloadAll = (record) => {
if(state.total == 0){
message.info('请先上传报告')
return
}
window.open(`/activityApi/evaluation/download?id=${route.query.id}`);
}
const listData = async () => {

View File

@@ -1099,6 +1099,10 @@ import { message } from "ant-design-vue";
state.btShow = trueFalse(record.permission,4)
}
const downloadAll = async (record) => {
if(record.reportReleaseNums == 0){
message.info('请先上传报告')
return
}
window.open(`/activityApi/evaluation/download?id=${record.id}`);
}
const of_exit = () => {
@@ -1138,22 +1142,6 @@ import { message } from "ant-design-vue";
}
state.tableLoading = true
if(state.uploadStatus||state.btShow){
console.log(state.uploadStatus,'state.uploadStatus')
await save({
id: state.uploadDownId,
creatId:userInfo.value.userId,
creatName:userInfo.value.realName,
prefix:'',
remarks:state.formData.remarks,
evaluationName:state.formData.evaluationName,
// detailIds:state.idValue,
downloadUrls:state.downloadUrl,
imagePath:state.formData.cover
}).then((res)=>{
console.log(res.data,'data')
})
}
if(state.valueAll.length != 0 && !state.loadData){
if(state.valueAll.length >1){
state.bg_results = true
@@ -1164,14 +1152,31 @@ import { message } from "ant-design-vue";
}
})
//
await saveEvaluationDetail({evaluationDetailListlist:state.valueAll,pid:state.uploadId}).then((res)=>{
if(res.code == 200){
message.success(res.msg)
}
if(res.data.code == -1){
message.error('保存失败')
}
console.log(res,'aaa')
// await saveEvaluationDetail({evaluationDetailListlist:state.valueAll,pid:state.uploadId}).then((res)=>{
// if(res.code == 200){
// message.success(res.msg)
// }
// if(res.data.code == -1){
// message.error('保存失败')
// }
// console.log(res,'aaa')
// })
}
if(state.uploadStatus||state.btShow){
console.log(state.uploadStatus,'state.uploadStatus')
await save({
id: state.uploadDownId,
creatId:userInfo.value.userId,
creatName:userInfo.value.realName,
prefix:'',
remarks:state.formData.remarks,
evaluationName:state.formData.evaluationName,
// detailIds:state.idValue,
evaluationDetailList:state.valueAll,
downloadUrls:state.downloadUrl,
imagePath:state.formData.cover
}).then((res)=>{
console.log(res.data,'data')
})
}
//else{