mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-07 01:46:43 +08:00
Merge remote-tracking branch 'boe/dev0731' into dev0731
This commit is contained in:
2
.env
2
.env
@@ -2,6 +2,8 @@
|
||||
VUE_APP_BASE=/manage
|
||||
# api项目基础url
|
||||
VUE_APP_BASE_API=/manageApi
|
||||
# systemApi
|
||||
VUE_APP_SYS_API=/systemapi
|
||||
#文件路径
|
||||
VUE_APP_FILE_PATH=/upload/
|
||||
# 代理url 本地调试,不可以用在其他地方
|
||||
|
||||
36
src/api/case.js
Normal file
36
src/api/case.js
Normal file
@@ -0,0 +1,36 @@
|
||||
import http from "./configSys";
|
||||
import httpUserbase from './confign'
|
||||
|
||||
// 案例列表
|
||||
export const RECOMMEND_PAGE = "/systemapi/xboe/m/boe/cases/recommend/page post";
|
||||
//发起案例列表或案例管理列表
|
||||
export const isTopList = (data) => http.post('/xboe/m/boe/cases/isTopList', data, {
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
})
|
||||
//下载失败数据
|
||||
export const downloadErrorData = (params) => http.get('/xboe/m/boe/cases/recommend/download', { params })
|
||||
//导入失败或成功返回的数据
|
||||
export const downloadErrorRecords = (params) => http.get('/xboe/m/boe/cases/recommend/import-info', { params })
|
||||
//案例推荐导入
|
||||
// export const uploadCaseData = (data, config) => http({
|
||||
// method: 'POST',
|
||||
// url: '/xboe/m/boe/cases/recommend/import',
|
||||
// data,
|
||||
// ...config,
|
||||
// headers: { "Content-Type": "multipart/form-data" },
|
||||
// })
|
||||
// 案例删除接口deleteResearch
|
||||
export const deleteResearch = (params) => http.get("xboe/m/boe/cases/recommend/delete", { params });
|
||||
// 案例信息下载接口
|
||||
export const caseInfoDownload = (data) => http.post('xboe/m/boe/cases/recommend/info_download', data, { responseType: 'blob' })
|
||||
// 案例撤回接口
|
||||
export const rePushOrWithdraw = (data) => http.post('xboe/m/boe/cases/recommend/rePushOrWithdraw', data)
|
||||
// 案例推荐
|
||||
export const caseRecommend = (data) => http.post('/xboe/m/boe/cases/recommend/launch', data,{
|
||||
timeout:20000
|
||||
})
|
||||
|
||||
//案例推荐选人的查询列表
|
||||
export const userList = (data) => httpUserbase.post('/user/list', data)
|
||||
70
src/api/configSys.js
Normal file
70
src/api/configSys.js
Normal file
@@ -0,0 +1,70 @@
|
||||
|
||||
import {message} from "ant-design-vue";
|
||||
import axios from "axios";
|
||||
import router from "@/router";
|
||||
import Cookies from 'vue-cookies'
|
||||
// import { getCookie } from '../api/method'
|
||||
// const Qs = require("qs");
|
||||
|
||||
// axios.defaults.headers.post["Content-Type"] =
|
||||
// "application/x-www-form-urlencoded";
|
||||
// export const FILE_UPLOAD_URL = process.env.VUE_APP_BASE_API + '/file/upload'
|
||||
// export const BATCH_IMPORT_SCORE = process.env.VUE_APP_BASE_API + '/admin/offcourse/batchImportScore'
|
||||
axios.defaults.withCredentials = true;
|
||||
const http = axios.create({
|
||||
baseURL: process.env.VUE_APP_SYS_API,
|
||||
timeout: 1000 * 15,
|
||||
headers: {"Content-Type": "application/json",},
|
||||
});
|
||||
|
||||
http.interceptors.request.use(
|
||||
(config) => {
|
||||
const token = Cookies.get("token")
|
||||
if (token) {
|
||||
config.headers.token = token; //测试1111
|
||||
} else{
|
||||
message.error('未获取到登录信息,请先登录')
|
||||
}
|
||||
return config;
|
||||
},
|
||||
(err) => {
|
||||
console.log("登陆前拦截", err);
|
||||
return Promise.reject(err);
|
||||
}
|
||||
);
|
||||
|
||||
http.interceptors.response.use(
|
||||
(response) => {
|
||||
// console.log('response', response)
|
||||
const {
|
||||
data: {code},
|
||||
} = response;
|
||||
if (code === 0 || code === 200) {
|
||||
return response.data?response.data:response;
|
||||
}
|
||||
if(code==500){
|
||||
return message.error('请求失败');
|
||||
}
|
||||
if(code==601){
|
||||
message.error('token过期请重新登陆');
|
||||
}
|
||||
if (code === 1000) {
|
||||
(process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'alpine') ? router.push({path: 'login'}) : (window.location.href = process.env.VUE_APP_LOGIN_URL)
|
||||
return Promise.reject(response);
|
||||
}
|
||||
// show && message.error(msg);
|
||||
// console.log("api %o", msg);
|
||||
// return Promise.reject(response);
|
||||
return response
|
||||
},
|
||||
function (error) {
|
||||
if (error.message == "timeout of 1ms exceeded") {
|
||||
message.destroy();
|
||||
message.error("请求超时");
|
||||
}
|
||||
console.log("api error %o", error);
|
||||
return message.error(error.message);
|
||||
}
|
||||
);
|
||||
|
||||
export default http;
|
||||
@@ -413,8 +413,22 @@ export default {
|
||||
) {
|
||||
state.list = [
|
||||
{
|
||||
name: "案例管理",
|
||||
},
|
||||
name: "案例",
|
||||
}, {
|
||||
name:'案例管理'
|
||||
}
|
||||
];
|
||||
}
|
||||
if (
|
||||
n.indexOf("/caserecommended") !== -1 ||
|
||||
n.indexOf("/CaseRecommended") !== -1
|
||||
) {
|
||||
state.list = [
|
||||
{
|
||||
name: "案例",
|
||||
}, {
|
||||
name:'案例推荐'
|
||||
}
|
||||
];
|
||||
}
|
||||
if (
|
||||
|
||||
1127
src/components/CaseManage/CommonRecommend.vue
Normal file
1127
src/components/CaseManage/CommonRecommend.vue
Normal file
File diff suppressed because it is too large
Load Diff
@@ -174,26 +174,26 @@
|
||||
<router-link to="/researchmanage">评估管理</router-link>
|
||||
</a-menu-item>
|
||||
|
||||
<!-- <a-sub-menu key="sub6">-->
|
||||
<!-- <template #icon>-->
|
||||
<!-- <div class="imgBox">-->
|
||||
<!-- <img-->
|
||||
<!-- style="width: 22px; height: 22px"-->
|
||||
<!-- src="../assets/images/navleft/review.png"-->
|
||||
<!-- />-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template #title>系统管理</template>-->
|
||||
<!-- <a-menu-item key="sub6-1">-->
|
||||
<!-- <span-->
|
||||
<!-- :class="{-->
|
||||
<!-- circleActive: selectedKeys[0] === 'sub6-1',-->
|
||||
<!-- circle: selectedKeys[0]!=='sub6-1',-->
|
||||
<!-- }"-->
|
||||
<!-- ></span>-->
|
||||
<!-- <router-link to="/dictmanage">字典管理</router-link>-->
|
||||
<!-- </a-menu-item>-->
|
||||
<!-- </a-sub-menu>-->
|
||||
<!-- <a-sub-menu key="sub6">
|
||||
<template #icon>
|
||||
<div class="imgBox">
|
||||
<img
|
||||
style="width: 22px; height: 22px"
|
||||
src="../assets/images/navleft/review.png"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<template #title>系统管理</template>
|
||||
<a-menu-item key="sub6-1">
|
||||
<span
|
||||
:class="{
|
||||
circleActive: selectedKeys[0] === 'sub6-1',
|
||||
circle: selectedKeys[0]!=='sub6-1',
|
||||
}"
|
||||
></span>
|
||||
<router-link to="/dictmanage">字典管理</router-link>
|
||||
</a-menu-item>
|
||||
</a-sub-menu> -->
|
||||
<a-menu-item key="sub21" @titleClick="titleClick" v-if="checkMenu('audiencemanage')">
|
||||
<div class="imgBox">
|
||||
<img
|
||||
@@ -289,7 +289,7 @@
|
||||
<router-link to="/examinationcenter">考试管理</router-link>
|
||||
</a-menu-item>
|
||||
</a-sub-menu>
|
||||
<a-menu-item key="sub12" @titleClick="titleClick" v-if="checkMenu('casemanage')">
|
||||
<!-- <a-menu-item key="sub12" @titleClick="titleClick" v-if="checkMenu('casemanage')">
|
||||
<div class="imgBox">
|
||||
<img
|
||||
style="width: 20px; height: 20px"
|
||||
@@ -297,7 +297,40 @@
|
||||
/>
|
||||
</div>
|
||||
<router-link to="/casemanage">案例管理</router-link>
|
||||
</a-menu-item>
|
||||
</a-menu-item> -->
|
||||
<!-- 案例修改 -->
|
||||
<!-- <a-sub-menu key="sub12" @titleClick="titleClick" v-if="checkMenu('casemanage')"> -->
|
||||
<a-sub-menu key="sub12" @titleClick="titleClick" >
|
||||
<template #icon>
|
||||
<div class="imgBox">
|
||||
<img
|
||||
style="width: 16px; height: 16px"
|
||||
src="../assets/images/navleft/case.png"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<template #title>案例</template>
|
||||
<a-menu-item key="sub12-1">
|
||||
<span
|
||||
:class="{
|
||||
circleActive: selectedKeys[0] === 'sub12-1' ? true : false,
|
||||
circle: selectedKeys[0] === 'sub12-1' ? false : true,
|
||||
}"
|
||||
></span>
|
||||
<router-link to="/casemanage">案例管理</router-link>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="sub12-2">
|
||||
<span
|
||||
:class="{
|
||||
circleActive: selectedKeys[0] === 'sub12-2' ? true : false,
|
||||
circle: selectedKeys[0] === 'sub12-2' ? false : true,
|
||||
}"
|
||||
></span>
|
||||
<router-link to="/caserecommended">案例推荐</router-link>
|
||||
</a-menu-item>
|
||||
</a-sub-menu>
|
||||
|
||||
|
||||
<a-menu-item key="sub13" @titleClick="titleClick" v-if="checkMenu('articlemanage')">
|
||||
<div class="imgBox">
|
||||
<img
|
||||
@@ -731,9 +764,15 @@ export default {
|
||||
{
|
||||
href: "/casemanage",
|
||||
openKeys: "sub12",
|
||||
selectedKeys: "sub12",
|
||||
selectedKeys: "sub12-1",
|
||||
pagename: "案例管理",
|
||||
},
|
||||
{
|
||||
href: "/caserecommended",
|
||||
openKeys: "sub12",
|
||||
selectedKeys: "sub12-2",
|
||||
pagename: "案例推荐",
|
||||
},
|
||||
{
|
||||
href: "/articlemanage",
|
||||
openKeys: "sub13",
|
||||
|
||||
790
src/components/drawers/InitiateRecommend.vue
Normal file
790
src/components/drawers/InitiateRecommend.vue
Normal file
@@ -0,0 +1,790 @@
|
||||
<template>
|
||||
<a-drawer class="recommend" :visible="visible" width="80%" :title="title" @close="closeDrawer" :maskClosable="false">
|
||||
<!-- 搜索框及按钮 -->
|
||||
<div class="filter">
|
||||
<div class="filterItems">
|
||||
<div class="select">
|
||||
<a-input v-model:value="searchDataInfo.keyWord" style="width: 270px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入案例标题" />
|
||||
</div>
|
||||
<div class="select">
|
||||
<a-input v-model:value="searchDataInfo.authorName" style="width: 270px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入作者名字" />
|
||||
</div>
|
||||
<div style="display: flex; margin-bottom: 20px">
|
||||
<div class="btn btn1" @click="handleSearch(1)">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">搜索</div>
|
||||
</div>
|
||||
<div class="btn btn1" @click="handleRest" style="width: 105px">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">重置</div>
|
||||
</div>
|
||||
<div class="btn btn1" @click="handleImportInfo" style="width: 105px">
|
||||
<div class=""></div>
|
||||
<div class="btnText">导入</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btns" style="display: flex;flex-direction: column;">
|
||||
<div v-if="selectNum" class="btnText">已选择 <span style="color:#4ea6ff ;"> {{ selectNum }}
|
||||
</span>
|
||||
条案例</div>
|
||||
<div v-if="state.caseTitleList.length" class="btnText">已导入 <span style="color:#4ea6ff ;">
|
||||
{{ state.caseTitleList.length }}</span> 条案例</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 表格 -->
|
||||
<div style="display: flex; overflow-x: auto; overflow-y: auto;justify-content: space-between;">
|
||||
<div class="tableBox" style="margin-top: 30px;min-height: 800px;overflow: hidden;">
|
||||
<a-table style="border: 1px solid #f2f6fe;" :columns="state.columns" :data-source="state.dataSource"
|
||||
:loading="!loading" :row-selection="rowSelection" :pagination="pagination" />
|
||||
</div>
|
||||
<div class="right1" style="min-width: 200px">
|
||||
<div class="onerow">
|
||||
<div class="onleft">
|
||||
<div class="already">已选</div>
|
||||
</div>
|
||||
</div>
|
||||
<div :style="{ 'max-height': state.screenHeight - 240 + 'px' }" style="overflow-y: auto">
|
||||
<div class="selecteds">
|
||||
<div v-for="(item, i) in state.selectedRow" :key="i">
|
||||
<div v-if="i < 11">
|
||||
<div class="chose">
|
||||
{{ item.title.length > 6 ? item.title.slice(0, 6) + '...' : item.title }}
|
||||
<div class="ch" @click="remove(item.id)"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-if="state.member">
|
||||
<div class="chose">
|
||||
{{ item.title.length > 6 ? item.title.slice(0, 6) + '...' : item.title }}
|
||||
<div class="ch" @click="remove(item.id)"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!state.member && state.selectedRow?.length > 10" class="ifsw">
|
||||
<div @click="state.member = !state.member" class="“sw”">查看更多></div>
|
||||
</div>
|
||||
<div v-if="state.member && state.selectedRow?.length > 10" class="ifsw">
|
||||
<div @click="state.member = !state.member" class="sw">收起<</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 底部按钮和下一步的弹窗 -->
|
||||
<div class="btnn">
|
||||
<button class="btn2" @click="closeDrawer">取消</button>
|
||||
<CommonRecommend :type="state.type" :id="state.selectedRowKeys" @finash="submitCall" :stage="state.stage">
|
||||
<a-button class="btn2">
|
||||
下一步
|
||||
</a-button>
|
||||
</CommonRecommend>
|
||||
</div>
|
||||
</a-drawer>
|
||||
<!-- 导入的提示框 -->
|
||||
<a-modal class="modal" v-model:visible="state.AMvisible" :closable="false" :maskClosable="false" ok-text="确定"
|
||||
cancel-text="取消" @ok="closeModal" @cancel="closeModal">
|
||||
<div class="importInfo" style="padding: 24px;">
|
||||
<div class="imptHeader">
|
||||
<span>导入</span>
|
||||
<div class="defeat">
|
||||
<div class="detext" @click="downloadTemplate(1)">
|
||||
下载导入模版
|
||||
</div>
|
||||
</div>
|
||||
<div class="defeat">
|
||||
<div class="detext" @click="downloadTemplate(2)">
|
||||
下载最新案例列表
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="upload">
|
||||
<a-upload :file-list="state.fileList" :action="state.uploadAction" name="file" @change="handleChange"
|
||||
:showUploadList="false" :multiple="false">
|
||||
<a-button style="width: 150px;">
|
||||
上传文件
|
||||
</a-button>
|
||||
</a-upload>
|
||||
<span class="ant-upload-hint">支持文件格式:.xls/.xlsx</span>
|
||||
</div>
|
||||
<div class="progress" v-if="state.status">
|
||||
<div class="nameAndProgress" style="display: flex;justify-content: space-between;padding-right: 36px;">
|
||||
<span>{{ state.fileName }}</span>
|
||||
<span> {{
|
||||
{
|
||||
done: "上传完成",
|
||||
uploading: "正在上传",
|
||||
error: "上传失败",
|
||||
removed: "正在上传",
|
||||
}[state.status] }}</span>
|
||||
</div>
|
||||
<a-progress :percent="state.uploadpercent" status="active" :strokeColor="state.progressColor" />
|
||||
</div>
|
||||
<div class="importDetail" style="display: flex;flex-direction: column;" v-if="state.importId">
|
||||
<span>导入 {{ state.totalNum }} 条,成功 {{ state.successNum }} 条,失败 <span style="color: red;">{{ state.failNum
|
||||
}}</span>
|
||||
条。</span>
|
||||
<div v-if="state.failNum" class="defeat">
|
||||
<span class="detext" @click="downloadErrorInfo">
|
||||
下载失败数据
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
<!-- 下一步添加学员 -->
|
||||
</template>
|
||||
<script setup>
|
||||
import { reactive, ref, computed, nextTick } from 'vue';
|
||||
import { Form, message } from "ant-design-vue";
|
||||
import { isTopList, downloadErrorRecords } from '@/api/case'
|
||||
import CommonRecommend from "@/components/CaseManage/CommonRecommend";
|
||||
import useDownload from '@/hooks/useDownload'
|
||||
defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: '添加案例'
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['update:visible'])
|
||||
const loading = ref(false)
|
||||
const state = reactive({
|
||||
allSelectedRow: [],
|
||||
caseTitleList: [],
|
||||
totalNum: 0,//上传的总条数
|
||||
successNum: 0,//成功的条数
|
||||
failNum: 0,//失败的条数
|
||||
status: '',//上传的状态
|
||||
progressColor: '',//进度条颜色
|
||||
type: 1,//添加学员
|
||||
stage: '',//
|
||||
importId: '',//导入id
|
||||
selectedRowKeys: [],//案例标题的id
|
||||
selectedRow: [],//选择的每一行数据
|
||||
dataSource: [],//表格的数据
|
||||
AMvisible: false,//导入modal框显示隐藏
|
||||
uploadpercent: -1,//导入进度
|
||||
fileName: '',//下载的名字
|
||||
uploadAction: process.env.VUE_APP_SYS_API + '/xboe/m/boe/cases/recommend/import',//下载地址
|
||||
fileList: [],//上传列表
|
||||
member: false,//收起和展开
|
||||
screenHeight: document.body.clientHeight,//高度
|
||||
columns: [
|
||||
{
|
||||
title: "案例标题",
|
||||
dataIndex: "title",
|
||||
key: "title",
|
||||
align: "left",
|
||||
className: "h",
|
||||
width: '75%',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "作者名称",
|
||||
dataIndex: "authorName",
|
||||
key: "authorName",
|
||||
width: '20%',
|
||||
align: "center",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
}
|
||||
]
|
||||
})
|
||||
const downloadTemplate = (type) => {
|
||||
let downInfo = {
|
||||
1: {
|
||||
url: '/xboe/m/boe/cases/recommend/download-template',
|
||||
name: '导入模版'
|
||||
},
|
||||
2: {
|
||||
url: '/xboe/m/boe/cases/exportCaseTitle',
|
||||
name: '最新案例列表'
|
||||
}
|
||||
}
|
||||
try {
|
||||
useDownload(downInfo[type].url, {}, downInfo[type].name)
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
//删除选中
|
||||
const remove = (id) => {
|
||||
state.selectedRowKeys = state.selectedRowKeys.filter(item => item !== id)
|
||||
state.selectedRow = state.selectedRow.filter(item => item.id !== id)
|
||||
// 过滤导入删除的条数
|
||||
state.caseTitleList = state.caseTitleList.filter(item => state.selectedRow.some(sel => sel.id == item.id))
|
||||
}
|
||||
// 下一步返回的刷新列表
|
||||
function submitCall(flag) {
|
||||
searchDataInfo.pageIndex = 1
|
||||
flag && getTopList()
|
||||
}
|
||||
// 计算选择的条数
|
||||
const selectNum = computed(() => state.selectedRowKeys.length - state.caseTitleList.length)
|
||||
|
||||
// 查询数据
|
||||
const searchDataInfo = reactive({
|
||||
pageIndex: 1,
|
||||
pageSize: 10,
|
||||
keyWord: "",
|
||||
authorName: '',
|
||||
});
|
||||
const total = ref(0)
|
||||
|
||||
// 分页
|
||||
const pagination = computed(() => ({
|
||||
total: total.value,
|
||||
showSizeChanger: false,
|
||||
current: searchDataInfo.pageIndex,
|
||||
pageSize: searchDataInfo.pageSize,
|
||||
onChange: changePagination,
|
||||
}));
|
||||
const changePagination = (e) => {
|
||||
console.log(e);
|
||||
loading.value = false
|
||||
searchDataInfo.pageIndex = e
|
||||
nextTick(getTopList);
|
||||
};
|
||||
// 计算全选
|
||||
const rowSelection = computed(() => {
|
||||
return {
|
||||
selectedRowKeys: state.selectedRowKeys,
|
||||
onChange: onSelectChange,
|
||||
preserveSelectedRowKeys: true,
|
||||
getCheckboxProps: record => ({
|
||||
disabled: state.caseTitleList.some((item) => record.id == item.id)
|
||||
}),
|
||||
}
|
||||
});
|
||||
//计算出来已选中状态
|
||||
const onSelectChange = (selectedRowKeys, selectedRow) => {
|
||||
state.selectedRowKeys = selectedRowKeys
|
||||
// 过滤取消的
|
||||
// state.caseTitleList = state.caseTitleList.filter((item) => selectedRowKeys.includes(item.id))
|
||||
// state.selectedRow = selectedRow.filter(Boolean)
|
||||
const mergedArray = state.caseTitleList.concat(selectedRow.filter(Boolean));
|
||||
state.selectedRow = Object.values(
|
||||
mergedArray.reduce((acc, obj) => {
|
||||
acc[obj.id] = obj;
|
||||
return acc;
|
||||
}, {})
|
||||
);
|
||||
console.log(state.selectedRow, state.caseTitleList);
|
||||
|
||||
};
|
||||
|
||||
// 请求列表数据是formdata类型的
|
||||
const getTopList = () => {
|
||||
isTopList(searchDataInfo).then((res) => {
|
||||
loading.value = true;
|
||||
console.log(res);
|
||||
res?.data?.result?.list?.forEach(element => {
|
||||
element.key = element.id
|
||||
});
|
||||
state.dataSource = res?.data?.result?.list || []
|
||||
total.value = res?.data?.result?.count
|
||||
}).catch((err) => {
|
||||
message.error(err);
|
||||
loading.value = false;
|
||||
})
|
||||
}
|
||||
getTopList()
|
||||
|
||||
// 搜索
|
||||
const handleSearch = (num) => {
|
||||
if (num == 1) searchDataInfo.pageIndex = 1
|
||||
console.log(searchDataInfo);
|
||||
getTopList()
|
||||
}
|
||||
|
||||
//错误案例下载
|
||||
const downloadErrorInfo = () => {
|
||||
if (!state.importId) {
|
||||
message.warn('暂无失败数据')
|
||||
return
|
||||
}
|
||||
let url = `${process.env.VUE_APP_SYS_API}/xboe/m/boe/cases/recommend/download?importId=` + state.importId
|
||||
console.log(url);
|
||||
window.open(url, '_self');
|
||||
}
|
||||
|
||||
|
||||
const { resetFields } = Form.useForm(searchDataInfo, {});
|
||||
//重置
|
||||
const handleRest = () => {
|
||||
resetFields()
|
||||
getTopList()
|
||||
}
|
||||
|
||||
// 取消抽屉
|
||||
const closeDrawer = async () => {
|
||||
state.selectedRowKeys = []
|
||||
state.selectedRow = []
|
||||
state.caseTitleList = []
|
||||
resetFields()
|
||||
emit('update:visible', false)
|
||||
await nextTick()
|
||||
getTopList()
|
||||
}
|
||||
|
||||
//导入按钮
|
||||
const handleImportInfo = () => {
|
||||
state.AMvisible = true
|
||||
}
|
||||
|
||||
// modal取消按钮
|
||||
const closeModal = () => {
|
||||
state.fileList = []
|
||||
state.status = '',
|
||||
state.progressColor = '',
|
||||
state.importId = '',
|
||||
state.AMvisible = false
|
||||
|
||||
}
|
||||
// 根据数组id去重
|
||||
const deduplicateArrayById = (arr) => {
|
||||
// 使用 Set 数据结构保存不重复的 id
|
||||
const idSet = new Set();
|
||||
// 使用 map 方法遍历数组,检查并去重对象
|
||||
const deduplicatedArray = arr.filter(obj => {
|
||||
const id = obj.id;
|
||||
if (!idSet.has(id)) {
|
||||
idSet.add(id);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
return deduplicatedArray;
|
||||
|
||||
}
|
||||
//上传文件
|
||||
const handleChange = (info) => {
|
||||
state.progressColor = ''
|
||||
state.uploadpercent = -1
|
||||
state.fileList = []
|
||||
state.importId = ''
|
||||
|
||||
if (info) {
|
||||
var FileExt = info.file.name.replace(/.+\./, "");
|
||||
if (["xls", "xlsx"].indexOf(FileExt.toLowerCase()) === -1) {
|
||||
state.fileList = [];
|
||||
state.uploadpercent = -1;
|
||||
message.destroy();
|
||||
message.error("请上传正确的文件格式");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
state.fileList = info.fileList
|
||||
state.fileName = info.file.name;
|
||||
state.status = info.file.status
|
||||
state.uploadpercent = parseInt(info.file.percent);
|
||||
const status = info.file.status;
|
||||
if (status !== "uploading") {
|
||||
console.log(info.file, info.fileList);
|
||||
}
|
||||
if (status === "done") {
|
||||
console.log("info", info?.file?.response?.result);
|
||||
const { caseIdList, importId, caseTitleList } = info?.file?.response?.result
|
||||
state.importId = importId
|
||||
message.success(`${info.file.name}上传成功`);
|
||||
state.progressColor = '#52c41a'
|
||||
let caseList = caseTitleList.map((item) => {
|
||||
return {
|
||||
id: item.caseId,
|
||||
title: item.caseTitle
|
||||
}
|
||||
})
|
||||
state.caseTitleList = caseList
|
||||
|
||||
state.selectedRowKeys = [...new Set([...caseIdList, ...state.selectedRowKeys])]
|
||||
state.selectedRow = deduplicateArrayById([...state.selectedRow, ...caseList]);
|
||||
|
||||
console.log(caseList, state.selectedRow);
|
||||
//发请求看失败的数据
|
||||
downloadErrorRecords({ importId }).then((res) => {
|
||||
const { totalNum, successNum, failNum } = res?.data?.result
|
||||
state.totalNum = totalNum
|
||||
state.successNum = successNum
|
||||
state.failNum = failNum
|
||||
})
|
||||
|
||||
} else if (status === "error") {
|
||||
state.progressColor = 'red'
|
||||
state.status = 'error'
|
||||
if (info.file.response.message) {
|
||||
return message.error(`${info.file.response.message},上传失败`);
|
||||
}
|
||||
message.error(`${info.file.name}上传失败`);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="scss" scoped>
|
||||
//上传
|
||||
.modal {
|
||||
:global(.ant-modal-header) {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
:global(.ant-modal-footer) {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.importInfo {
|
||||
.imptHeader {
|
||||
display: flex;
|
||||
margin-bottom: 40px;
|
||||
|
||||
.defeat {
|
||||
margin-left: 40px;
|
||||
color: #0982ff;
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.upload {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 40px;
|
||||
|
||||
.ant-upload-hint {
|
||||
margin-left: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.importDetail {
|
||||
margin-top: 40px;
|
||||
|
||||
.defeat {
|
||||
color: #0982ff;
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.recommend {
|
||||
:global(.ant-drawer-header-title) {
|
||||
flex-direction: row-reverse !important;
|
||||
}
|
||||
|
||||
:global(.ant-drawer-close) {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.btnn {
|
||||
height: 72px;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
background-color: #fff;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
|
||||
|
||||
.btn1 {
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
border: 1px solid #4ea6ff;
|
||||
border-radius: 8px;
|
||||
color: #4ea6ff;
|
||||
background-color: #fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn2 {
|
||||
cursor: pointer;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
background: #4ea6ff;
|
||||
border-radius: 8px;
|
||||
border: 0;
|
||||
margin-left: 15px;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
// 头部
|
||||
.filter {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.filterItems {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.select {
|
||||
margin-right: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
padding: 0 26px 0 26px;
|
||||
height: 38px;
|
||||
background: #4ea6ff;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 14px;
|
||||
flex-shrink: 0;
|
||||
cursor: pointer;
|
||||
|
||||
.search {
|
||||
background-size: 100%;
|
||||
}
|
||||
|
||||
.btnText {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
line-height: 36px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.btnn {
|
||||
padding: 0 26px 0 26px;
|
||||
height: 38px;
|
||||
background: #4ea6ff;
|
||||
border-radius: 8px;
|
||||
border: 1px solid rgba(64, 158, 255, 1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 14px;
|
||||
flex-shrink: 0;
|
||||
cursor: pointer;
|
||||
|
||||
.search {
|
||||
background-size: 100%;
|
||||
}
|
||||
|
||||
.btnText {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #fff;
|
||||
line-height: 36px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.btn1 {
|
||||
.search {
|
||||
width: 15px;
|
||||
height: 17px;
|
||||
background-image: url("../../assets/images/courseManage/search0.png");
|
||||
}
|
||||
}
|
||||
|
||||
.btn2 {
|
||||
.search {
|
||||
width: 16px;
|
||||
height: 18px;
|
||||
background-image: url("../../assets/images/courseManage/reset0.png");
|
||||
}
|
||||
}
|
||||
|
||||
.btn1:active {
|
||||
background: #0982ff;
|
||||
}
|
||||
|
||||
.btn2:active {
|
||||
background: rgba(64, 158, 255, 0.2);
|
||||
}
|
||||
}
|
||||
|
||||
.btns {
|
||||
display: flex;
|
||||
|
||||
.btn {
|
||||
padding: 0 26px;
|
||||
height: 38px;
|
||||
background: #4ea6ff;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 14px;
|
||||
flex-shrink: 0;
|
||||
cursor: pointer;
|
||||
|
||||
.search {
|
||||
background-size: 100%;
|
||||
}
|
||||
|
||||
.btnText {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
line-height: 36px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.btn3 {
|
||||
margin-right: 0;
|
||||
|
||||
.search {
|
||||
width: 17px;
|
||||
height: 18px;
|
||||
background-image: url("../../assets/images/courseManage/add0.png");
|
||||
}
|
||||
}
|
||||
|
||||
.btn3:active {
|
||||
background: #0982ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//底部
|
||||
.right1 {
|
||||
border-left: 1px solid #f2f6fe;
|
||||
margin-left: 20px;
|
||||
|
||||
.onerow {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-right: 40px;
|
||||
flex-wrap: wrap;
|
||||
|
||||
width: 100%;
|
||||
|
||||
.onleft {
|
||||
display: flex;
|
||||
text-align: center;
|
||||
|
||||
.already {
|
||||
color: rgba(51, 51, 51, 1);
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
margin-left: 32px;
|
||||
white-space: nowrap;
|
||||
// margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.count {
|
||||
color: #4ea6ff;
|
||||
font-size: 16px;
|
||||
margin: 0 6px;
|
||||
}
|
||||
|
||||
.peo {
|
||||
color: rgba(51, 51, 51, 1);
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
.clbox {
|
||||
margin-right: 50px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
width: 104px;
|
||||
height: 32px;
|
||||
border-radius: 4px;
|
||||
background: #4ea6ff;
|
||||
|
||||
.colose {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background-image: url(../../assets/images/basicinfo/ch.png);
|
||||
background-size: 100%;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.allclear {
|
||||
color: rgba(255, 255, 255, 1);
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.selecteds {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-left: 32px;
|
||||
|
||||
.person {
|
||||
width: 100%;
|
||||
margin-top: 20px;
|
||||
border-top: 1px solid #f2f6fe;
|
||||
}
|
||||
|
||||
.chose {
|
||||
min-width: 64px;
|
||||
height: 24px;
|
||||
margin-top: 25px;
|
||||
margin-right: 25px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 2px;
|
||||
border: 1px solid rgba(56, 139, 225, 1);
|
||||
color: rgba(56, 139, 225, 1);
|
||||
font-size: 12px;
|
||||
position: relative;
|
||||
padding: 0 10px;
|
||||
|
||||
.ch {
|
||||
position: absolute;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background-image: url(../../assets/images/basicinfo/ch.png);
|
||||
right: -8px;
|
||||
top: -8px;
|
||||
}
|
||||
}
|
||||
|
||||
.ifsw {
|
||||
display: flex;
|
||||
align-items: end;
|
||||
justify-content: center;
|
||||
color: #4ea6ff;
|
||||
}
|
||||
|
||||
.sw {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: justify;
|
||||
color: #4ea6ff;
|
||||
margin-top: 23px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.dept {
|
||||
width: 100%;
|
||||
margin-top: 30px;
|
||||
border-top: 1px solid #f2f6fe;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
33
src/hooks/useDownload.js
Normal file
33
src/hooks/useDownload.js
Normal file
@@ -0,0 +1,33 @@
|
||||
import http from "@/api/configSys";
|
||||
/**
|
||||
* @param {String} url [请求的url地址]
|
||||
* @param {Object} params [参数]
|
||||
* @param {String} fileName [导出文件名称] 默认值 导出文件
|
||||
* @param {String} fileType [导出文件类型] 默认值 xls
|
||||
* @param {string} mimeType [导出文件类型]
|
||||
*/
|
||||
const useDownload = (url, params = {}, fileName = '导出文件', fileType = 'xls', mimeType = 'application/vnd.ms-excel;charset=UTF-8') => {
|
||||
return new Promise((resolve, reject) => {
|
||||
http.post(url, params, { responseType: 'blob' })
|
||||
.then(res => {
|
||||
resolve(res.data);
|
||||
if (!res.data) {
|
||||
return
|
||||
}
|
||||
const link = document.createElement('a');// 创建a标签
|
||||
let blob = new Blob([res.data], { type: mimeType }); // 设置文件类型
|
||||
link.style.display = "none";
|
||||
link.href = URL.createObjectURL(blob); // 创建URL
|
||||
link.setAttribute("download", `${fileName}.${fileType}`);
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
URL.revokeObjectURL(link.href);
|
||||
document.body.removeChild(link);
|
||||
})
|
||||
.catch(err => {
|
||||
reject(err.data);
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
export default useDownload
|
||||
@@ -17,7 +17,7 @@
|
||||
frameborder="0"
|
||||
name="myframe"
|
||||
security="restricted"
|
||||
sandbox="allow-forms allow-scripts allow-same-origin allow-popups"
|
||||
sandbox="allow-forms allow-scripts allow-same-origin allow-popups allow-downloads"
|
||||
></iframe>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
779
src/views/case/CaseRecommended.vue
Normal file
779
src/views/case/CaseRecommended.vue
Normal file
@@ -0,0 +1,779 @@
|
||||
<!-- 评估管理页面 -->
|
||||
<template>
|
||||
<div class="researchmanage">
|
||||
<!-- 搜索框及按钮 -->
|
||||
<div class="filter">
|
||||
<div class="filterItems">
|
||||
<div class="select">
|
||||
<a-input v-model:value="searchData.recommendName" style="width: 270px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入姓名" />
|
||||
</div>
|
||||
<div class="select">
|
||||
<div class="select addTimeBox">
|
||||
<div class="addTime">推荐时间:</div>
|
||||
<a-range-picker v-model:value="recommendTimeList" style="width: 420px" @change="timeChange"
|
||||
format="YYYY-MM-DD" valueFormat="YYYY-MM-DD" separator="至" :placeholder="[' 开始时间', ' 结束时间']" />
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex; margin-bottom: 20px">
|
||||
<div class="btn btn1" @click="getList(1)">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">搜索</div>
|
||||
</div>
|
||||
<div class="btn btn2" @click="handleRest" style="width: 105px">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">重置</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btns">
|
||||
<div class="btn btn3" @click="handleNew">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">发起推荐</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 搜索框及按钮 -->
|
||||
<!-- 表格 -->
|
||||
<div class="tableBox">
|
||||
<a-table style="border: 1px solid #f2f6fe" :columns="column" :data-source="state.data" :loading="!loading"
|
||||
:scroll="{ x: 1100 }" :pagination="false">
|
||||
<template #operation="{ record }">
|
||||
<a-space style="padding-right: 10px">
|
||||
<a-button @click="downloadInfo(record)" type="link">信息下载
|
||||
</a-button>
|
||||
<a-button @click="() => handleOper(record, 'withdraw', record.pushProgress)" type="link">
|
||||
{{ state.status[record.pushProgress] }}
|
||||
</a-button>
|
||||
<a-button @click="handleOper(record, 'del')" type="link">删除
|
||||
</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
<div class="pa" style="display: flex; justify-content: flex-end; padding: 0 38px">
|
||||
<a-pagination show-quick-jumper :pageSize="searchData.pageSize" :current="searchData.pageIndex" :total="state.total"
|
||||
class="pagination" @change="handelChangePage" show-size-changer />
|
||||
</div>
|
||||
<InitiateRecommend v-model:visible="newNext" :title="添加案例"></InitiateRecommend>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="jsx">
|
||||
import { ref, onMounted, reactive, watch } from "vue";
|
||||
import { Form, message } from "ant-design-vue";
|
||||
import { boeRequest } from "@/api/request";
|
||||
import useDownload from '@/hooks/useDownload'
|
||||
import {
|
||||
RECOMMEND_PAGE,
|
||||
deleteResearch,
|
||||
caseInfoDownload,
|
||||
rePushOrWithdraw,
|
||||
} from "@/api/case";
|
||||
import dialog from "@/utils/dialog";
|
||||
import InitiateRecommend from "@/components/drawers/InitiateRecommend.vue";
|
||||
import { checkMenu } from "@/utils/utils";
|
||||
const column = [
|
||||
{
|
||||
title: "推荐人",
|
||||
dataIndex: "recommendBy",
|
||||
key: "recommendBy",
|
||||
width: "10%",
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: ({ text }) => {
|
||||
return text ? text : "-";
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "推荐时间",
|
||||
dataIndex: "recommendTime",
|
||||
key: "recommendTime",
|
||||
width: "10%",
|
||||
align: "center",
|
||||
className: "h",
|
||||
customRender: ({ text }) => {
|
||||
return text ? text : "-";
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "案例数",
|
||||
dataIndex: "caseCount",
|
||||
key: "caseCount",
|
||||
width: "10%",
|
||||
align: "center",
|
||||
className: "h",
|
||||
customRender: ({ text }) => {
|
||||
return text ? text : "-";
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "用户数",
|
||||
dataIndex: "userCount",
|
||||
key: "userCount",
|
||||
width: "10%",
|
||||
align: "center",
|
||||
className: "h",
|
||||
customRender: ({ text }) => {
|
||||
return text ? text : "-";
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "推送进度",
|
||||
dataIndex: "pushProgress",
|
||||
key: "pushProgress",
|
||||
width: "10%",
|
||||
align: "center",
|
||||
className: "h",
|
||||
customRender: ({ text }) => {
|
||||
switch (text) {
|
||||
case 1:
|
||||
return <span>推送中</span>;
|
||||
case 2:
|
||||
return <span>推送中</span>;
|
||||
case 3:
|
||||
return <span>已完成</span>;
|
||||
case 4:
|
||||
return <span style={{ color: "red" }}>推送失败</span>;
|
||||
case 5:
|
||||
return <span>推送撤回</span>;
|
||||
default:
|
||||
return <span>-</span>;
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "查看率",
|
||||
dataIndex: "viewRate",
|
||||
key: "viewRate",
|
||||
width: "10%",
|
||||
align: "center",
|
||||
className: "h",
|
||||
customRender: ({ text }) => {
|
||||
return text ? text : "0%";
|
||||
},
|
||||
},
|
||||
];
|
||||
const authenticationColumn = {
|
||||
title: "操作",
|
||||
width: "20%",
|
||||
className: "h",
|
||||
dataIndex: "id",
|
||||
key: "id",
|
||||
fixed: "right",
|
||||
align: "center",
|
||||
slots: { customRender: "operation" },
|
||||
}
|
||||
|
||||
const state = reactive({
|
||||
data: [],
|
||||
total: 0,
|
||||
status: {
|
||||
1: "撤回",
|
||||
2: "撤回",
|
||||
3: "撤回",
|
||||
4: "重新推送",
|
||||
5: "重新推送",
|
||||
},
|
||||
});
|
||||
// 查询数据
|
||||
const searchData = ref({
|
||||
pageIndex: 1,
|
||||
pageSize: 10,
|
||||
recommendName: "",
|
||||
recommendTimeList: [],
|
||||
});
|
||||
const newNext = ref(false);
|
||||
const recommendTimeList = ref([]);
|
||||
const loading = ref(false);
|
||||
watch(newNext, (value) => {
|
||||
if (!value) {
|
||||
searchData.value.pageIndex = 1;
|
||||
getList()
|
||||
}
|
||||
})
|
||||
|
||||
const getList = (num) => {
|
||||
if (num === 1) searchData.value.pageIndex = 1;
|
||||
boeRequest(RECOMMEND_PAGE, searchData.value)
|
||||
.then((res) => {
|
||||
loading.value = true;
|
||||
state.data = res?.result?.list || [];
|
||||
state.total = res?.result?.totalPages || 0;
|
||||
})
|
||||
.catch(() => {
|
||||
loading.value = false;
|
||||
});
|
||||
};
|
||||
|
||||
// 获取列表数据
|
||||
getList();
|
||||
|
||||
onMounted(() => {
|
||||
// 是否需要触发新建弹框
|
||||
let str = location.href;
|
||||
let isOpen = str.includes("openCreate=true");
|
||||
if (isOpen) {
|
||||
newNext.value = true;
|
||||
}
|
||||
column.push(authenticationColumn)
|
||||
});
|
||||
|
||||
const { resetFields } = Form.useForm(searchData, {});
|
||||
|
||||
const handle = (record) => ({
|
||||
withdraw: async () => {
|
||||
try {
|
||||
// editReleaseStatus({ assessmentId: record.id, releaseStatus: 1 });
|
||||
await rePushOrWithdraw({ casesRecommendId: record.id });
|
||||
getList();
|
||||
} catch (error) {
|
||||
message.info("推送失败!");
|
||||
}
|
||||
},
|
||||
del: async () => {
|
||||
loading.value = true;
|
||||
await deleteResearch({ id: record.id })
|
||||
.then(() => {
|
||||
message.info("删除成功!");
|
||||
getList();
|
||||
})
|
||||
.catch(() => (loading.value = false));
|
||||
},
|
||||
});
|
||||
|
||||
const handleMsg = {
|
||||
del: "你确定要删除这条案例吗?",
|
||||
withdraw1: "你确认要撤回此次推送吗?",
|
||||
withdraw2: "你确认要撤回此次推送吗?",
|
||||
withdraw3: "你确认要撤回此次推送吗?",
|
||||
withdraw4: "您确定要重新推送此案例吗?",
|
||||
withdraw5: "您确定要重新推送此案例吗?",
|
||||
};
|
||||
|
||||
function handleOper(record, type, status = '') {
|
||||
dialog({ content: handleMsg[status ? type + status : type], ok: handle(record)[type] });
|
||||
}
|
||||
// 信息下载
|
||||
const downloadInfo = (record) => {
|
||||
try {
|
||||
useDownload('/xboe/m/boe/cases/recommend/info_download', { casesRecommendId: record.id }, '案例信息')
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
};
|
||||
|
||||
const handelChangePage = (page, pageSize) => {
|
||||
loading.value = false;
|
||||
searchData.value.pageSize = pageSize;
|
||||
searchData.value.pageIndex = page;
|
||||
getList();
|
||||
};
|
||||
|
||||
function timeChange(time, timeStr) {
|
||||
searchData.value.recommendTimeList = time ? time : [];
|
||||
}
|
||||
|
||||
const handleRest = () => {
|
||||
recommendTimeList.value = [];
|
||||
resetFields();
|
||||
getList();
|
||||
};
|
||||
|
||||
const handleNew = () => {
|
||||
newNext.value = true;
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
content: " ";
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.addTimeBox {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.addTime {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
margin-left: 10px;
|
||||
color: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
.ant-picker {
|
||||
padding-left: 85px;
|
||||
}
|
||||
|
||||
.ant-picker-range .ant-picker-active-bar {
|
||||
margin-left: 85px;
|
||||
}
|
||||
}
|
||||
|
||||
.out {
|
||||
//display: flex;
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 680px;
|
||||
// height: 525px;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 0 10px rgba(118, 136, 166, 0.21);
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
|
||||
.top {
|
||||
width: 100%;
|
||||
height: 68px;
|
||||
|
||||
background: linear-gradient(rgba(78, 166, 255, 0.2) 0%,
|
||||
rgba(78, 166, 255, 0) 100%);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.topimg {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
margin-left: 27px;
|
||||
}
|
||||
|
||||
.topc {
|
||||
color: #000000;
|
||||
font-size: 16px;
|
||||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.mid {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
.d {
|
||||
// margin-top: 8px;
|
||||
// color: #ff4e4e;
|
||||
margin-left: -5px;
|
||||
}
|
||||
|
||||
.name {
|
||||
width: 78%;
|
||||
// background-color: lightcoral;
|
||||
display: flex;
|
||||
margin-top: 20px;
|
||||
align-items: center;
|
||||
height: 40px;
|
||||
// border: 1px solid black;
|
||||
|
||||
.inname {
|
||||
color: #6f6f6f;
|
||||
font-size: 14px;
|
||||
margin-left: 7px;
|
||||
}
|
||||
|
||||
.in {
|
||||
margin-left: 14px;
|
||||
width: 81%;
|
||||
|
||||
.ant-input {
|
||||
border-radius: 5px;
|
||||
// height: 120%;
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.showcount {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
color: #c7cbd2;
|
||||
bottom: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
width: 33%;
|
||||
margin-top: 30px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 30px;
|
||||
|
||||
.samtn {
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
font-size: 14px;
|
||||
border: 1px solid #4ea6ff;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn1 {
|
||||
background-color: #fff;
|
||||
color: #4ea6ff;
|
||||
}
|
||||
|
||||
.btn2 {
|
||||
margin-left: 10px;
|
||||
background-color: #4ea6ff;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.researchmanage {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
|
||||
.filter {
|
||||
margin-left: 38px;
|
||||
margin-right: 38px;
|
||||
margin-top: 30px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.filterItems {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.select {
|
||||
margin-right: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
padding: 0 26px 0 26px;
|
||||
height: 38px;
|
||||
background: #4ea6ff;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 14px;
|
||||
flex-shrink: 0;
|
||||
cursor: pointer;
|
||||
|
||||
.search {
|
||||
background-size: 100%;
|
||||
}
|
||||
|
||||
.btnText {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
line-height: 36px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.btnn {
|
||||
padding: 0 26px 0 26px;
|
||||
height: 38px;
|
||||
background: #4ea6ff;
|
||||
border-radius: 8px;
|
||||
border: 1px solid rgba(64, 158, 255, 1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 14px;
|
||||
flex-shrink: 0;
|
||||
cursor: pointer;
|
||||
|
||||
.search {
|
||||
background-size: 100%;
|
||||
}
|
||||
|
||||
.btnText {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #fff;
|
||||
line-height: 36px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.btn1 {
|
||||
.search {
|
||||
width: 15px;
|
||||
height: 17px;
|
||||
background-image: url("../../assets/images/courseManage/search0.png");
|
||||
}
|
||||
}
|
||||
|
||||
.btn2 {
|
||||
.search {
|
||||
width: 16px;
|
||||
height: 18px;
|
||||
background-image: url("../../assets/images/courseManage/reset0.png");
|
||||
}
|
||||
}
|
||||
|
||||
// .btn1:hover {
|
||||
// background: rgba(64, 158, 255, 0.76);
|
||||
|
||||
// .search {
|
||||
// background-image: url("../../assets/images/courseManage/search0.png");
|
||||
// }
|
||||
|
||||
// .btnText {
|
||||
// color: #ffffff;
|
||||
// }
|
||||
// }
|
||||
|
||||
.btn1:active {
|
||||
background: #0982ff;
|
||||
}
|
||||
|
||||
// .btn2:hover {
|
||||
// background: rgba(64, 158, 255, 0.1);
|
||||
// }
|
||||
|
||||
.btn2:active {
|
||||
background: rgba(64, 158, 255, 0.2);
|
||||
}
|
||||
}
|
||||
|
||||
.btns {
|
||||
display: flex;
|
||||
|
||||
.btn {
|
||||
padding: 0 26px;
|
||||
height: 38px;
|
||||
background: #4ea6ff;
|
||||
border-radius: 8px;
|
||||
//border: 1px solid rgba(64, 158, 255, 1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 14px;
|
||||
flex-shrink: 0;
|
||||
cursor: pointer;
|
||||
|
||||
.search {
|
||||
background-size: 100%;
|
||||
}
|
||||
|
||||
.btnText {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
line-height: 36px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.btn3 {
|
||||
margin-right: 0;
|
||||
|
||||
.search {
|
||||
width: 17px;
|
||||
height: 18px;
|
||||
background-image: url("../../assets/images/courseManage/add0.png");
|
||||
}
|
||||
}
|
||||
|
||||
// .btn3:hover {
|
||||
// background: rgba(64, 158, 255, 0.76);
|
||||
|
||||
// .search {
|
||||
// background-image: url("../../assets/images/courseManage/add0.png");
|
||||
// }
|
||||
|
||||
// .btnText {
|
||||
// color: #ffffff;
|
||||
// }
|
||||
// }
|
||||
|
||||
.btn3:active {
|
||||
background: #0982ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tableBox {
|
||||
margin: 20px 38px 30px;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
|
||||
th.ant-table-cell {
|
||||
background-color: #eff4fc !important;
|
||||
text-align: center;
|
||||
color: #999ba3;
|
||||
}
|
||||
|
||||
td.ant-table-cell {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.pa {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-bottom: 20px;
|
||||
|
||||
.pagination {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.ant-pagination-item-link,
|
||||
.ant-pagination-item,
|
||||
.ant-select-selector,
|
||||
.ant-pagination-options-quick-jumper input {
|
||||
border-radius: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.unout {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.operation {
|
||||
display: flex;
|
||||
justify-content: right;
|
||||
|
||||
.fb {
|
||||
display: flex;
|
||||
margin-right: 20px;
|
||||
|
||||
.jc {
|
||||
color: #4ea6ff;
|
||||
font-size: 14px;
|
||||
margin-left: 20px;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.DelModal {
|
||||
.ant-modal {
|
||||
.ant-modal-content {
|
||||
width: 424px !important;
|
||||
|
||||
.ant-modal-body {
|
||||
.delete {
|
||||
z-index: 9999;
|
||||
width: 424px;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 1px 35px 0 rgba(118, 136, 166, 0.21);
|
||||
border-radius: 4px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 10%;
|
||||
transform: translate(-50%, -50%);
|
||||
|
||||
.del_header {
|
||||
position: absolute;
|
||||
width: calc(100%);
|
||||
height: 40px;
|
||||
background: linear-gradient(rgba(78, 166, 255, 0.2) 0%,
|
||||
rgba(78, 166, 255, 0) 100%);
|
||||
}
|
||||
|
||||
.del_main {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-top: 20px;
|
||||
padding-left: 26px;
|
||||
font-size: 16px;
|
||||
|
||||
.del-icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
position: relative;
|
||||
margin-right: 10px;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-right: 10px;
|
||||
background-image: url(@/assets/images/coursewareManage/QR.png);
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
.close_exit {
|
||||
position: absolute;
|
||||
right: 42px;
|
||||
cursor: pointer;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background-image: url(@/assets/images/coursewareManage/close.png);
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.body {
|
||||
width: 100%;
|
||||
margin: 34px auto 56px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.del_btnbox {
|
||||
display: flex;
|
||||
margin: 30px auto;
|
||||
justify-content: center;
|
||||
|
||||
.del_btn {
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
background: rgba(64, 158, 255, 0);
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 14px;
|
||||
flex-shrink: 0;
|
||||
cursor: pointer;
|
||||
|
||||
.btnText {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
.btn1 {
|
||||
border: 1px solid rgba(64, 158, 255, 1);
|
||||
color: #4ea6ff;
|
||||
}
|
||||
|
||||
.btn2 {
|
||||
background-color: #4ea6ff;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -2211,7 +2211,16 @@ export default defineComponent({
|
||||
return text ? text : "-";
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
title: "关键字",
|
||||
dataIndex: "tips",
|
||||
key: "tips",
|
||||
align: "left",
|
||||
customCell :() => {return {style: {maxWidth: '200px',overflow: 'hidden',whiteSpace: 'nowrap',textOverflow:'ellipsis',cursor:'pointer'}}},
|
||||
customRender: ({ text }) => {
|
||||
return <a-tooltip placement="topLeft" title = {text} >{text ? text : "-"}</a-tooltip>
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "内容分类",
|
||||
width: 130,
|
||||
@@ -3754,6 +3763,9 @@ export default defineComponent({
|
||||
|
||||
//编辑开课
|
||||
const handelEditStu = async (item) => {
|
||||
if (item.expenseStatus) {
|
||||
return message.warning("该开课在审批中,不可进行编辑!");
|
||||
}
|
||||
state.offcourseId = item.offcourseId;
|
||||
state.itemType = item.type;
|
||||
state.offcoursePlanId = item.id;
|
||||
@@ -4256,6 +4268,9 @@ export default defineComponent({
|
||||
delete_exit1();
|
||||
};
|
||||
const handleDeleteKaike = (value) => {
|
||||
if (value.expenseStatus) {
|
||||
return message.warning("该开课在审批中,不可进行删除!");
|
||||
}
|
||||
state.offcoursePlanId = value.id;
|
||||
|
||||
state.delete_hs = true;
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
</div>
|
||||
<div class="mbl_items" v-if="detail.tips">
|
||||
<div class="item_nam">
|
||||
<span style="margin-right: 14px">内容标签:</span>
|
||||
<span style="margin-right: 14px">关键字:</span>
|
||||
</div>
|
||||
<div class="item_inp">
|
||||
{{ filterTxt(detail.tips) }}
|
||||
|
||||
@@ -328,7 +328,7 @@
|
||||
<div class="mb_right">
|
||||
<div class="mbl_items">
|
||||
<div class="item_nam">
|
||||
<span style="margin-right: 14px">内容标签</span>
|
||||
<span style="margin-right: 14px">关键字</span>
|
||||
</div>
|
||||
<div class="item_inp">
|
||||
|
||||
@@ -339,7 +339,7 @@
|
||||
<a-input
|
||||
v-model:value="tags_val_single"
|
||||
style="width: 440px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入内容标签按回车键添加内容标签,可添加多个内容标签。"
|
||||
placeholder="请输入关键字按回车键添加关键字,可添加多个关键字。"
|
||||
@pressEnter="handleTagChange"
|
||||
/>
|
||||
<img
|
||||
|
||||
Reference in New Issue
Block a user