mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-25 02:32:54 +08:00
案例推荐主页的修改,信息下载之类的
This commit is contained in:
@@ -12,3 +12,9 @@ export const isTopList = (data) => http.post('/xboe/m/boe/cases/isTopList', data
|
||||
export const downloadErrorData = (params) => http.get('/xboe/m/boe/cases/recommend/download', { params })
|
||||
//推送消息
|
||||
export const recommendLaunch = (data = {}) => http.post("/xboe/m/boe/cases/recommend/launch", data);
|
||||
// 案例删除接口deleteResearch
|
||||
export const deleteResearch = (params) => http.get("xboe/m/boe/cases/recommend/delete", { params });
|
||||
// 案例信息下载接口
|
||||
export const caseInfoDownload = (params) => http.get('xboe/m/boe/cases/recommend/info_download', { params })
|
||||
// 案例撤回接口
|
||||
export const rePushOrWithdraw = (data) => http.post('xboe/m/boe/cases/recommend/rePushOrWithdraw', data)
|
||||
@@ -309,12 +309,26 @@ const handleImportInfo = () => {
|
||||
}
|
||||
//model确定按钮
|
||||
const hideModal = () => {
|
||||
console.log('确定');
|
||||
state.fileList = []
|
||||
state.status='',
|
||||
state.progressColor='',
|
||||
state.importId='',
|
||||
state.AMvisible = false
|
||||
}
|
||||
// modal取消按钮
|
||||
const closeModal = () => {
|
||||
console.log('取消');
|
||||
state.fileList = []
|
||||
state.status='',
|
||||
state.progressColor='',
|
||||
state.importId='',
|
||||
state.AMvisible = false
|
||||
|
||||
}
|
||||
//上传文件
|
||||
const handleChange = (info) => {
|
||||
console.log("info", info);
|
||||
console.log("info", info.file.percent);
|
||||
state.imptProgress = true
|
||||
state.status = '正在上传'
|
||||
state.progressColor = ''
|
||||
|
||||
@@ -40,9 +40,10 @@
|
||||
:scroll="{ x: 1500 }" :pagination="false">
|
||||
<template #operation="{ record }">
|
||||
<a-space style="padding-right: 10px">
|
||||
<a-button @click="handleOper(record, 'download')" type="link">信息下载
|
||||
<a-button @click="downloadInfo(record)" type="link">信息下载
|
||||
</a-button>
|
||||
<a-button @click="() => handleOper(record, 'withdraw')" type="link">撤回
|
||||
<a-button @click="() => handleOper(record, 'withdraw')" type="link">
|
||||
{{ state.status[record.pushProgress] }}
|
||||
</a-button>
|
||||
<a-button @click="handleOper(record, 'del')" type="link">删除
|
||||
</a-button>
|
||||
@@ -59,13 +60,9 @@
|
||||
</template>
|
||||
<script setup lang="jsx">
|
||||
import { ref, onMounted, reactive } from "vue";
|
||||
import {
|
||||
deleteResearch,
|
||||
editReleaseStatus,
|
||||
} from "@/api/indexResearch";
|
||||
import { Form, message } from "ant-design-vue";
|
||||
import { boeRequest } from "@/api/request";
|
||||
import { RECOMMEND_PAGE } from "@/api/case";
|
||||
import { RECOMMEND_PAGE, deleteResearch, caseInfoDownload, rePushOrWithdraw } from "@/api/case";
|
||||
import dialog from "@/utils/dialog";
|
||||
import InitiateRecommend from '@/components/drawers/InitiateRecommend.vue'
|
||||
|
||||
@@ -170,7 +167,14 @@ const column = [
|
||||
];
|
||||
const state = reactive({
|
||||
data: [],
|
||||
total: 0
|
||||
total: 0,
|
||||
status: {
|
||||
1: '撤回',
|
||||
2: '撤回',
|
||||
3: '撤回',
|
||||
4: '重新推送',
|
||||
5: '重新推送',
|
||||
}
|
||||
})
|
||||
// 查询数据
|
||||
const searchData = ref({
|
||||
@@ -212,27 +216,18 @@ onMounted(() => {
|
||||
const { resetFields } = Form.useForm(searchData, {});
|
||||
|
||||
const handle = (record) => ({
|
||||
push: () => {
|
||||
message.info("发布成功!");
|
||||
record.releaseStatus = "2";
|
||||
withdraw: async () => {
|
||||
try {
|
||||
editReleaseStatus({ assessmentId: record.id, releaseStatus: 2 });
|
||||
} catch (error) {
|
||||
message.info("发布失败!");
|
||||
}
|
||||
},
|
||||
withdraw: () => {
|
||||
message.info("撤回成功!");
|
||||
record.releaseStatus = "1";
|
||||
try {
|
||||
editReleaseStatus({ assessmentId: record.id, releaseStatus: 1 });
|
||||
// editReleaseStatus({ assessmentId: record.id, releaseStatus: 1 });
|
||||
await rePushOrWithdraw({ casesRecommendId: record.id })
|
||||
getList();
|
||||
} catch (error) {
|
||||
message.info("推送失败!");
|
||||
}
|
||||
},
|
||||
del: async () => {
|
||||
loading.value = true;
|
||||
await deleteResearch({ assessmentId: record.id }).then(() => {
|
||||
await deleteResearch({ id: record.id }).then(() => {
|
||||
message.info("删除成功!");
|
||||
getList();
|
||||
}).catch(() => loading.value = false)
|
||||
@@ -240,7 +235,6 @@ const handle = (record) => ({
|
||||
});
|
||||
|
||||
const handleMsg = {
|
||||
download: "你确定呀哦下载吗",
|
||||
withdraw: "你确认要撤回此次推送吗?",
|
||||
del: "你确定要删除这条案例吗?",
|
||||
};
|
||||
@@ -248,6 +242,14 @@ const handleMsg = {
|
||||
function handleOper(record, type) {
|
||||
dialog({ content: handleMsg[type], ok: handle(record)[type] });
|
||||
}
|
||||
// 信息下载
|
||||
const downloadInfo = (record) => {
|
||||
caseInfoDownload({ casesRecommendId: record.id }).then((res) => {
|
||||
console.log(res);
|
||||
}).catch(() => {
|
||||
message.info("信息下载失败");
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
const handelChangePage = (page, pageSize) => {
|
||||
|
||||
Reference in New Issue
Block a user