mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-08 18:36:46 +08:00
测评上传
This commit is contained in:
@@ -14,8 +14,6 @@ export const save = (obj) => http.post(`${ACTIVITYAPI}/evaluation/save`,obj)
|
||||
export const saveEvaluationDetail = (obj) => http.post(`${ACTIVITYAPI}/evaluation/detail/saveEvaluationDetail`,obj)
|
||||
//测评封面上传
|
||||
export const uploadImage = (obj) => http.post(`${ACTIVITYAPI}/evaluation/upload-image`,obj)
|
||||
//测评总下载
|
||||
export const downloadAll = (obj) => http.post(`${ACTIVITYAPI}/evaluation/detaildownload`,obj)
|
||||
//权限管理
|
||||
export const adminList = (obj) => http.post(`${ACTIVITYAPI}/permission/adminList`,obj)
|
||||
//权限启用
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</div>
|
||||
<div class="evadown">
|
||||
<div class="down_header">
|
||||
<div class="down_header_title">
|
||||
<div class="down_header_title" @click="downloadAll">
|
||||
<div class="down_header_btn">
|
||||
<div class="btnText">全量下载</div>
|
||||
</div>
|
||||
@@ -42,7 +42,7 @@
|
||||
>
|
||||
<template #operation="{ record, column }">
|
||||
<a-space>
|
||||
<a-button type="link">
|
||||
<a-button type="link" @click="downloadItem(record)">
|
||||
<a-tooltip>
|
||||
<template #title>下载</template>
|
||||
<span class="download"></span>
|
||||
@@ -146,9 +146,12 @@ import { useStore } from "vuex";
|
||||
state.params.pageNo = page
|
||||
state.params.pageSize = pageSize
|
||||
}
|
||||
const downloadAll = (record) => {
|
||||
window.open(`/activityApi/evaluation/download?id=${route.query.id}`);
|
||||
}
|
||||
const listData = async () => {
|
||||
await getPage({
|
||||
pid:route.query.id,
|
||||
id:route.query.id,
|
||||
|
||||
}).then((res) => {
|
||||
state.tableData = res.data.records,
|
||||
@@ -157,6 +160,9 @@ import { useStore } from "vuex";
|
||||
})
|
||||
|
||||
}
|
||||
const downloadItem = (record) => {
|
||||
window.open(`/activityApi/evaluation/detail/downloadById?id=${record.id}`)
|
||||
};
|
||||
const deleteItem = (record) => {
|
||||
dialog({
|
||||
content: '请您确认是否要删除该报告?',
|
||||
@@ -176,8 +182,10 @@ import { useStore } from "vuex";
|
||||
...toRefs(state),
|
||||
columns,
|
||||
deleteItem,
|
||||
downloadItem,
|
||||
pagination,
|
||||
listData,
|
||||
downloadAll,
|
||||
userInfo,
|
||||
}
|
||||
},
|
||||
|
||||
@@ -603,13 +603,13 @@ import {getCookieForName} from "@/api/method";
|
||||
import { useRouter } from "vue-router";
|
||||
import dialog from "@/utils/dialog";
|
||||
import NameInput from "@/components/project/NameInput";
|
||||
import { boeRequest } from "@/api/request";
|
||||
import axios from 'axios';
|
||||
import JSONbig from 'json-bigint';
|
||||
import {
|
||||
list,
|
||||
importList,
|
||||
save,
|
||||
uploadImage,
|
||||
downloadAll,
|
||||
adminList,
|
||||
saveEvaluationDetail,
|
||||
updateStatus,
|
||||
@@ -850,7 +850,7 @@ import { message } from "ant-design-vue";
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
customRender: (value) =>{
|
||||
if(value.record.status == 1){
|
||||
if(value.record.status == 0){
|
||||
return "启用"
|
||||
}else{
|
||||
return "禁用"
|
||||
@@ -966,8 +966,7 @@ import { message } from "ant-design-vue";
|
||||
state.btShow = false
|
||||
}
|
||||
const downloadAll = async (record) => {
|
||||
console.log(record,'record')
|
||||
window.open(`/activityApi/evaluation/detaildownload?id=${record.id}`);
|
||||
window.open(`/activityApi/evaluation/download?id=${record.id}`);
|
||||
}
|
||||
const of_exit = () => {
|
||||
state.bg_check = false;
|
||||
@@ -1009,6 +1008,11 @@ import { message } from "ant-design-vue";
|
||||
})
|
||||
}
|
||||
if(state.valueAll.length != 0){
|
||||
state.valueAll.forEach((item)=>{
|
||||
if(item.createId){
|
||||
item.createId = userInfo.value.userId
|
||||
}
|
||||
})
|
||||
await saveEvaluationDetail({evaluationDetailListlist:state.valueAll,pid:state.uploadId}).then((res)=>{
|
||||
console.log(res.data,'json')
|
||||
})
|
||||
@@ -1017,7 +1021,7 @@ import { message } from "ant-design-vue";
|
||||
listData()
|
||||
}
|
||||
const showUpload = () => {
|
||||
console.log('aaaa')
|
||||
reportUpload()
|
||||
of_exit()
|
||||
}
|
||||
//上传图片
|
||||
@@ -1070,19 +1074,30 @@ import { message } from "ant-design-vue";
|
||||
if(state.uploadId){
|
||||
formDatas.append("pid", state.uploadId);
|
||||
formDatas.append("uploadName", userInfo.value.realName);
|
||||
formDatas.append("createId", userInfo.value.userId);
|
||||
formDatas.append("createName", userInfo.value.realName);
|
||||
}else{
|
||||
formDatas.append("uploadName", userInfo.value.realName);
|
||||
formDatas.append("createId", userInfo.value.userId);
|
||||
formDatas.append("createName", userInfo.value.realName);
|
||||
}
|
||||
await importList(formDatas).then((res)=>{
|
||||
console.log(res,'res')
|
||||
if(res.code === 200){
|
||||
state.idValue = res.data.map(item=>item.id)
|
||||
console.log(state.idValue,'idValue')
|
||||
userInfo.value.realName
|
||||
state.valueAll = res.data
|
||||
console.log(state.valueAll,'valueAll')
|
||||
}
|
||||
})
|
||||
// try {
|
||||
// const response = await axios.post('/activityApi/evaluation/import', formDatas);
|
||||
// const jsonData = JSONbig({ storeAsString: true }).parse(response.data);
|
||||
|
||||
// if (jsonData.code === 200) {
|
||||
// console.log(jsonData.data, 'jsondata.data')
|
||||
// }
|
||||
// } catch (error) {
|
||||
// console.error("Error fetching data:", error);
|
||||
// }
|
||||
return false
|
||||
}
|
||||
const handleChange = (info) => {
|
||||
@@ -1117,7 +1132,7 @@ import { message } from "ant-design-vue";
|
||||
content: '请您确认是否要清空全部报告?',
|
||||
ok: () => {
|
||||
clear({
|
||||
createId:record.id,
|
||||
createId:userInfo.value.userId,
|
||||
id:record.id
|
||||
}).then((res)=>{
|
||||
console.log(res,'data')
|
||||
@@ -1141,7 +1156,6 @@ import { message } from "ant-design-vue";
|
||||
// }
|
||||
// 编辑
|
||||
const openEdit = (record) => {
|
||||
console.log({...record},'record')
|
||||
state.bg_check = true
|
||||
state.btShow = true
|
||||
state.btShowEdit = false
|
||||
@@ -1234,6 +1248,10 @@ import { message } from "ant-design-vue";
|
||||
const of_power = () => {
|
||||
state.bg_power = false
|
||||
}
|
||||
const powerTrue = () => {
|
||||
console.log(state.checkclick,'sss')
|
||||
of_power()
|
||||
}
|
||||
const textEnableAdd = async (record) => {
|
||||
console.log(record,'record')
|
||||
await updateStatus({status:0,id:record.id}).then((res)=>{
|
||||
@@ -1242,6 +1260,7 @@ import { message } from "ant-design-vue";
|
||||
message.success('启用成功')
|
||||
record.statusList = 0
|
||||
state.saveList.push(record)
|
||||
saveListItem()
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -1268,6 +1287,7 @@ import { message } from "ant-design-vue";
|
||||
textEnableAdd,
|
||||
powerSetting,
|
||||
of_power,
|
||||
powerTrue,
|
||||
textDeleteAdd,
|
||||
searchStatusVal2,
|
||||
serchList,
|
||||
|
||||
Reference in New Issue
Block a user