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