mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 03:46:45 +08:00
合并
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2022-11-07 17:06:45
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2022-11-09 09:32:35
|
||||
* @LastEditTime: 2022-11-15 16:43:26
|
||||
* @FilePath: /fe-manage/src/api/index.js
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
@@ -64,8 +64,8 @@ export const handleProject = (obj) => http.post('/admin/project/handle', obj)
|
||||
export const taskStudentList = (obj) => http.post('/admin/project/taskStudentList', obj)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//获取讨论信息
|
||||
export const getDiscussDetail=(obj)=>http.post('/discuss/getDiscussDetail',obj)
|
||||
|
||||
//获取模版列表
|
||||
export const getTemplate=(obj)=>http.post('/admin/project/template/list',obj)
|
||||
|
||||
@@ -165,9 +165,212 @@ function autoComma(number) {
|
||||
const commonData={
|
||||
timeout:50
|
||||
}
|
||||
|
||||
|
||||
//组织树
|
||||
const organizationalTree= [
|
||||
{
|
||||
title: "京东方",
|
||||
value: "京东方",
|
||||
children: [
|
||||
{
|
||||
title: "产研部",
|
||||
value: "产研部",
|
||||
children: [
|
||||
{
|
||||
title: "产品部",
|
||||
value: "产品部",
|
||||
},
|
||||
{
|
||||
title: "研究部",
|
||||
value: "研究部",
|
||||
},
|
||||
{
|
||||
title: "研究部2",
|
||||
value: "研究部2",
|
||||
},
|
||||
{
|
||||
title: "研究3",
|
||||
value: "研究3",
|
||||
},
|
||||
{
|
||||
title: "研究4",
|
||||
value: "研究4",
|
||||
},
|
||||
{
|
||||
title: "研究部5",
|
||||
value: "研究部5",
|
||||
},
|
||||
{
|
||||
title: "研究部6",
|
||||
value: "研究部6",
|
||||
},
|
||||
{
|
||||
title: "研究部7",
|
||||
value: "研究部7",
|
||||
},
|
||||
{
|
||||
title: "研究部8",
|
||||
value: "研究部8",
|
||||
},
|
||||
{
|
||||
title: "研究部9",
|
||||
value: "研究部9",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "二级标题",
|
||||
value: "二级标题",
|
||||
children: [
|
||||
{
|
||||
title: "三级标题",
|
||||
value: "三级标题",
|
||||
children: [
|
||||
{
|
||||
title: "四级标题",
|
||||
value: "四级标题",
|
||||
children: [
|
||||
{
|
||||
title: "五级标题",
|
||||
value: "五级标题",
|
||||
children: [
|
||||
{
|
||||
title: "六级标题",
|
||||
value: "六级标题",
|
||||
children: [
|
||||
{
|
||||
title: "七级标题",
|
||||
value: "七级标题",
|
||||
children: [
|
||||
{
|
||||
title: "八级标题",
|
||||
value: "八级标题",
|
||||
children: [
|
||||
{
|
||||
title: "九级标题",
|
||||
value: "九级标题",
|
||||
children: [
|
||||
{
|
||||
title: "十级标题",
|
||||
value: "十级标题",
|
||||
children: [
|
||||
{
|
||||
title: "十一级标题",
|
||||
value: "十一级标题",
|
||||
children: [
|
||||
{
|
||||
title: "十二级标题",
|
||||
value: "十二级标题",
|
||||
children: [
|
||||
{
|
||||
title:
|
||||
"十三级标题十三级标题十三级标题十三级标题",
|
||||
value: "十三级标题",
|
||||
children: [
|
||||
{
|
||||
title:
|
||||
"十四级标题",
|
||||
value:
|
||||
"十四级标题",
|
||||
children: [
|
||||
{
|
||||
title:
|
||||
"十五级标题",
|
||||
value:
|
||||
"十五级标题",
|
||||
children: [
|
||||
{
|
||||
title:
|
||||
"十六级标题",
|
||||
value:
|
||||
"十六级标题",
|
||||
children:
|
||||
[
|
||||
{
|
||||
title:
|
||||
"十七级标题",
|
||||
value:
|
||||
"十七级标题",
|
||||
children:
|
||||
[
|
||||
{
|
||||
title:
|
||||
"十八级标题",
|
||||
value:
|
||||
"十八级标题",
|
||||
children:
|
||||
[
|
||||
{
|
||||
title:
|
||||
"十九级标题",
|
||||
value:
|
||||
"十九级标题",
|
||||
children:
|
||||
[
|
||||
{
|
||||
title:
|
||||
"二十级标题二十级标题",
|
||||
value:
|
||||
"二十级标题二十级标题",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "人力资源部",
|
||||
value: "人力资源部",
|
||||
children: [
|
||||
{
|
||||
title: "人事部",
|
||||
value: "人事部",
|
||||
},
|
||||
{
|
||||
title: "行政部",
|
||||
value: "行政部",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
export {
|
||||
toDate,
|
||||
getWeek,
|
||||
autoComma,
|
||||
commonData,
|
||||
organizationalTree,
|
||||
}
|
||||
@@ -7,25 +7,45 @@
|
||||
:closable="closableQR"
|
||||
wrapClassName="codeModal"
|
||||
style="margin-top: 400px"
|
||||
:zIndex="9999"
|
||||
:zIndex="999"
|
||||
@cancel="qr_exit"
|
||||
>
|
||||
<div id="qrcode" class="QR">
|
||||
<div class="qr_header"></div>
|
||||
<div class="qr_main">
|
||||
<div class="qrm_header">
|
||||
<span style="title">{{codeInfo.title?codeInfo.title:''}}</span>
|
||||
<span style="title">{{
|
||||
codeInfo.title ? codeInfo.title : ""
|
||||
}}</span>
|
||||
<div class="close_exit" @click="closeCodeModal"></div>
|
||||
</div>
|
||||
<div class="qrm_body">
|
||||
<div class="codename">{{codeInfo.name?codeInfo.name:''}}</div>
|
||||
<qrcode-vue
|
||||
:value="codeInfo.url?codeInfo.url:''"
|
||||
:size="qrcodeSize"
|
||||
style="width: 200px; height: 200px"
|
||||
></qrcode-vue>
|
||||
<div class="downloadCode" style="">
|
||||
<div class="qrm_body">
|
||||
<div class="codename">
|
||||
{{ codeInfo.name ? codeInfo.name : "" }}
|
||||
</div>
|
||||
<qrcode-vue
|
||||
:value="codeInfo.url ? codeInfo.url : ''"
|
||||
:size="qrcodeSize"
|
||||
style="width: 200px; height: 200px"
|
||||
></qrcode-vue>
|
||||
</div>
|
||||
</div>
|
||||
<div class="codeUrl" :style="{ display: showUrl ? 'flex' : 'none' }">
|
||||
<div class="codeUrlLink">链接</div>
|
||||
<a-input
|
||||
:value="codeInfo.url ? codeInfo.url : ''"
|
||||
disabled
|
||||
class="codeUrlInp"
|
||||
/>
|
||||
<a-input
|
||||
:value="codeInfo.url ? codeInfo.url : ''"
|
||||
id="courseUrl"
|
||||
class="codeUrlInp"
|
||||
style="position: absolute; opacity: 0; z-index: -1"
|
||||
/>
|
||||
<div @click="copyUrl" class="codeUrlCopy">复制链接</div>
|
||||
</div>
|
||||
|
||||
<div class="qrm_footer">
|
||||
<span style="margin-left: 52px">下载二维码</span>
|
||||
<div class="qrmbtn" @click="downloadQr(200)">
|
||||
@@ -47,7 +67,8 @@
|
||||
<script>
|
||||
import { reactive, toRefs, watch } from "vue";
|
||||
import QrcodeVue from "qrcode.vue";
|
||||
// import html2canvas from "html2canvas";
|
||||
import html2canvas from "html2canvas";
|
||||
import { message } from "ant-design-vue";
|
||||
export default {
|
||||
name: "TwoDimensionalCode",
|
||||
components: {
|
||||
@@ -64,97 +85,70 @@ export default {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
index: {
|
||||
index: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
qrcodeUrl: "https://www.baidu.com/",
|
||||
qrcodeSize: 800,
|
||||
codeInfo: {},
|
||||
courseUrl: "https://www.baidu.com/",
|
||||
showUrl: false,
|
||||
});
|
||||
|
||||
//下载二维码图片
|
||||
const downloadQr = (num) => {
|
||||
state.qrcodeSize = num;
|
||||
// let filename = `${new Date().getTime()}.png`;
|
||||
// let canvas = document.getElementsByTagName("canvas")[0];
|
||||
// let imageUrl = canvas.toDataURL("image/png");
|
||||
html2canvas(
|
||||
document.querySelectorAll(".downloadCode")[Number(props.index)],
|
||||
{
|
||||
useCORS: true, //支持图片跨域
|
||||
}
|
||||
).then((canvas) => {
|
||||
// console.log("canvas", canvas, canvas.width, canvas.style.width);
|
||||
let filename = `${new Date().getTime()}.png`;
|
||||
let imageUrl = canvas.toDataURL("image/png");
|
||||
let a = document.createElement("a");
|
||||
a.style.display = "none";
|
||||
a.download = filename;
|
||||
a.href = imageUrl;
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
});
|
||||
// let canvas =document.getElementsByClassName('codeModal')[Number(props.index)].getElementsByTagName('canvas')[0];
|
||||
// let filename = `${new Date().getTime()}.png`;
|
||||
// let imageUrl = canvas.toDataURL("image/png");
|
||||
// let a = document.createElement("a");
|
||||
// a.style.display = "none";
|
||||
// a.download = filename;
|
||||
// a.href = imageUrl;
|
||||
// document.body.appendChild(a);
|
||||
// a.click();
|
||||
};
|
||||
//复制链接
|
||||
const copyUrl = () => {
|
||||
// const range = document.createRange(); //创建range对象
|
||||
// range.selectNode(document.getElementById('courseUrl')); //获取复制内容的 id 选择器
|
||||
// const selection = window.getSelection(); //创建 selection对象
|
||||
// if (selection.rangeCount > 0) selection.removeAllRanges(); //如果页面已经有选取了的话,会自动删除这个选区,没有选区的话,会把这个选取加入选区
|
||||
// selection.addRange(range); //将range对象添加到selection选区当中,会高亮文本块
|
||||
// document.execCommand("Copy"); //复制选中的文字到剪贴板
|
||||
// message.success('复制成功')
|
||||
// selection.removeRange(range); // 移除选中的元素
|
||||
|
||||
// let canvasBox = document.createElement("canvas");
|
||||
// let ctx = canvasBox.getContext("2d");
|
||||
// var img = new Image();
|
||||
// // 需要添加文字的图片
|
||||
// img.src = imageUrl;
|
||||
// // 等待图片加载完成
|
||||
// img.onload = function () {
|
||||
// // 将图片添加到canvas
|
||||
// ctx.drawImage(img, 0, 0, 1240, 2208);
|
||||
// // 设置字体
|
||||
// ctx.font = "73px 微软雅黑 bolder";
|
||||
// // 设置字体颜色
|
||||
// ctx.fillStyle = "#955f17";
|
||||
// ctx.textAlign = "center";
|
||||
// // 添加文字和位置
|
||||
// ctx.fillText("微信名", 621, 1050);
|
||||
|
||||
// // 导出为图片
|
||||
// let url = canvasBox.toDataURL("image/png");
|
||||
// let a = document.createElement("a");
|
||||
// a.style.display = "none";
|
||||
// a.download = filename;
|
||||
// a.href = url;
|
||||
// document.body.appendChild(a);
|
||||
// a.click();
|
||||
// };
|
||||
|
||||
// // let a = document.createElement("a");
|
||||
// // a.style.display = "none";
|
||||
// // a.download = filename;
|
||||
// // a.href = imageUrl;
|
||||
// // document.body.appendChild(a);
|
||||
// // a.click();
|
||||
|
||||
// html2canvas(document.querySelector("#qrcode"), {
|
||||
// useCORS: true, //支持图片跨域
|
||||
// }).then((canvas) => {
|
||||
// // var extra_canvas = document.createElement("canvas");
|
||||
// // extra_canvas.setAttribute('width',num);
|
||||
// // extra_canvas.setAttribute('height',num);
|
||||
// // var ctx = extra_canvas.getContext('2d');
|
||||
// // ctx.drawImage(canvas,0,0,num,num);
|
||||
// // let filename = `${new Date().getTime()}.png`;
|
||||
// // var imageUrl = extra_canvas.toDataURL("image/png",1.0);
|
||||
|
||||
// console.log("canvas", canvas, canvas.width, canvas.style.width);
|
||||
|
||||
// // // let ctx = canvas.getContext('2d');
|
||||
// // // ctx.drawImage(canvas,0,0,canvas.width, canvas.height);
|
||||
// // // canvas.width=num
|
||||
// // // canvas.height=num
|
||||
// // // canvas.style.width=num+'px'
|
||||
// // // canvas.style.height=num+'px'
|
||||
// // let filename = `${new Date().getTime()}.png`;
|
||||
// // let imageUrl = canvas.toDataURL("image/png");
|
||||
// // let a = document.createElement("a");
|
||||
// // a.style.display = "none";
|
||||
// // a.download = filename;
|
||||
// // a.href = imageUrl;
|
||||
// // document.body.appendChild(a);
|
||||
// // a.click();
|
||||
// });
|
||||
console.log('document.getElementsByClassName',document.getElementsByClassName('codeModal'),Number(props.index))
|
||||
let canvas =document.getElementsByClassName('codeModal')[Number(props.index)].getElementsByTagName('canvas')[0];
|
||||
let filename = `${new Date().getTime()}.png`;
|
||||
let imageUrl = canvas.toDataURL("image/png");
|
||||
let a = document.createElement("a");
|
||||
a.style.display = "none";
|
||||
a.download = filename;
|
||||
a.href = imageUrl;
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
var input = document.createElement("input"); // 创建input对象
|
||||
input.value = state.codeInfo.url ? state.codeInfo.url : ""; // 设置复制内容
|
||||
document.body.appendChild(input); // 添加临时实例
|
||||
input.select(); // 选择实例内容
|
||||
document.execCommand("Copy"); // 执行复制
|
||||
document.body.removeChild(input); // 删除临时实例
|
||||
message.success("复制成功!");
|
||||
};
|
||||
const closeCodeModal = () => {
|
||||
ctx.emit("update:codevisible", false);
|
||||
@@ -166,12 +160,20 @@ console.log('document.getElementsByClassName',document.getElementsByClassName('c
|
||||
url: "",
|
||||
};
|
||||
state.codeInfo = Object.assign(obj, props.codeInfo);
|
||||
console.log("codeInfo22222", state.codeInfo,props.index);
|
||||
console.log("codeInfo22222", state.codeInfo, props.index, props.type);
|
||||
|
||||
if (props.type === "签到二维码") {
|
||||
state.showUrl = false;
|
||||
console.log(" state.showUrl", state.showUrl);
|
||||
} else if (props.type === "课程二维码") {
|
||||
state.showUrl = true;
|
||||
}
|
||||
});
|
||||
return {
|
||||
...toRefs(state),
|
||||
downloadQr,
|
||||
closeCodeModal,
|
||||
copyUrl,
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -229,8 +231,8 @@ console.log('document.getElementsByClassName',document.getElementsByClassName('c
|
||||
}
|
||||
.qrm_body {
|
||||
width: 100%;
|
||||
margin-top: 22px;
|
||||
margin-bottom: 32px;
|
||||
padding-top: 22px;
|
||||
padding-bottom: 32px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
@@ -242,6 +244,51 @@ console.log('document.getElementsByClassName',document.getElementsByClassName('c
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
.codeUrl {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 24px;
|
||||
.codeUrlLink {
|
||||
width: 72px;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #c7cbd2;
|
||||
line-height: 20px;
|
||||
border: 1px solid #c7cbd2;
|
||||
border-right: 0px solid #c7cbd2;
|
||||
}
|
||||
.codeUrlInp {
|
||||
width: 305px;
|
||||
height: 40px;
|
||||
border: 1px solid #c7cbd2;
|
||||
}
|
||||
.ant-input-disabled {
|
||||
background-color: rgba(0, 0, 0, 0) !important;
|
||||
}
|
||||
.ant-input[disabled] {
|
||||
background-color: rgba(0, 0, 0, 0) !important;
|
||||
}
|
||||
.codeUrlCopy {
|
||||
width: 96px;
|
||||
height: 40px;
|
||||
background-color: #388be1;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
line-height: 20px;
|
||||
cursor: pointer;
|
||||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
.qrm_footer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
347
src/components/drawers/ AssessmentList.vue
Normal file
347
src/components/drawers/ AssessmentList.vue
Normal file
@@ -0,0 +1,347 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:visible="assessmentVisible"
|
||||
class="drawerStyle addinvistDrawer"
|
||||
width="70%"
|
||||
title="添加评估"
|
||||
placement="right"
|
||||
@after-visible-change="afterVisibleChange"
|
||||
>
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
<div v-if="edit" class="headerTitle">编辑评估</div>
|
||||
<div v-else class="headerTitle">添加评估</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"
|
||||
/>
|
||||
</div>
|
||||
<div class="contentMain">
|
||||
<div class="main_left">
|
||||
<div class="main_item">
|
||||
<div class="fi_input">
|
||||
<a-input
|
||||
v-model:value="inputV1"
|
||||
style="width: 424px; height: 40px"
|
||||
placeholder="请输入评估名称"
|
||||
maxlength="20"
|
||||
/>
|
||||
</div>
|
||||
<div class="btns" @click="getAllInvistText">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">搜索</div>
|
||||
</div>
|
||||
<div class="btnsn" @click="resetInvist">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">重置</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_item2">
|
||||
<a-table
|
||||
style="border: 1px solid #f2f6fe"
|
||||
:columns="tableDataFunc()"
|
||||
:data-source="tableData"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
expandRowByClick="true"
|
||||
@expand="expandTable"
|
||||
:pagination="false"
|
||||
:row-selection="rowSelection"
|
||||
filterMultiple:false
|
||||
/>
|
||||
|
||||
<div class="pa">
|
||||
<a-pagination
|
||||
showSizeChanger="true"
|
||||
showQuickJumper="true"
|
||||
hideOnSinglePage="true"
|
||||
:pageSize="pageSize"
|
||||
:current="currentPage"
|
||||
:total="tableDataTotal"
|
||||
class="pagination"
|
||||
@change="handelChangePage"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs} from "vue";
|
||||
import * as api from "../../api/indexInvist.js";
|
||||
import dayjs from "dayjs";
|
||||
export default {
|
||||
name: "AssessmentList",
|
||||
// components: {
|
||||
// },
|
||||
props: {
|
||||
assessmentVisible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
assessmentVisible:false,
|
||||
assessment:null,
|
||||
inputV1:"",
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
tableDataTotal: 0,
|
||||
tableData: [],
|
||||
selectedRowKeys:[],
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:assessmentVisible", false);
|
||||
|
||||
};
|
||||
const afterVisibleChange = (bool) => {
|
||||
console.log("state getAllInvistText", bool);
|
||||
if(props.assessmentVisible){
|
||||
getAllInvistText();
|
||||
}
|
||||
|
||||
};
|
||||
const tableDataFunc = () => {
|
||||
const columns = [
|
||||
{
|
||||
title: "名称",
|
||||
dataIndex: "name",
|
||||
// width: "30%",
|
||||
key: "name",
|
||||
width: "150px",
|
||||
align: "left",
|
||||
className: "classify",
|
||||
},
|
||||
{
|
||||
title: "题数",
|
||||
dataIndex: "num",
|
||||
key: "num",
|
||||
width: "80px",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "创建人",
|
||||
dataIndex: "creator",
|
||||
key: "creator",
|
||||
width: "150px",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "创建时间",
|
||||
dataIndex: "time",
|
||||
key: "time",
|
||||
width: "200px",
|
||||
align: "center",
|
||||
},
|
||||
];
|
||||
return columns;
|
||||
};
|
||||
const rowSelection = {
|
||||
type: "radio",
|
||||
onSelect:(selectedRows,)=>{
|
||||
state.assessment = selectedRows;
|
||||
console.log("selectedRows=======",state.assessment);
|
||||
ctx.emit("checkedAss", state.assessment);
|
||||
state.selectedRowKeys = [],
|
||||
closeDrawer();
|
||||
}
|
||||
|
||||
};
|
||||
const handelChangePage = (page, pageSize) => {
|
||||
state.currentPage = page;
|
||||
state.pageSize = pageSize;
|
||||
getAllInvistText();
|
||||
};
|
||||
const getTableDate = (tableData) => {
|
||||
let data = tableData;
|
||||
let array = [];
|
||||
data.map((value, index) => {
|
||||
let obj = {
|
||||
key: index,
|
||||
assessmentId:value.assessmentId,
|
||||
num: value.essayQuestionVoList.length,
|
||||
name: value.assessmentName ? value.assessmentName : "-",
|
||||
creator: value.createUser ? value.createUser : "-",
|
||||
time: dayjs(value.createTime).format("YYYY-MM-DD"),
|
||||
};
|
||||
array.push(obj);
|
||||
});
|
||||
state.selectedRowKeys = [],
|
||||
state.tableData = array;
|
||||
};
|
||||
//获取全部评估信息接口
|
||||
const getAllInvistText = () => {
|
||||
api
|
||||
.queryAssessmentDetailList({
|
||||
assessmentName:state.inputV1,
|
||||
pageNo: state.currentPage,
|
||||
pageSize: state.pageSize,
|
||||
})
|
||||
.then((res) => {
|
||||
let arr = res.data.data.rows;
|
||||
if (res.status === 200) {
|
||||
// console.log("获取全部评估信息", res.data.data);
|
||||
getTableDate(arr);
|
||||
state.tableDataTotal = Number(res.data.data.total);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取全部评估信息接口失败", err);
|
||||
// state.createLoading = false;
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
//重置评估信息
|
||||
const resetInvist = () => {
|
||||
state.inputV1 = "";
|
||||
getAllInvistText();
|
||||
};
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
afterVisibleChange,
|
||||
closeDrawer,
|
||||
tableDataFunc,
|
||||
rowSelection,
|
||||
getAllInvistText,
|
||||
resetInvist,
|
||||
handelChangePage,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.ant-table-striped :deep(.table-striped) td {
|
||||
background-color: #fafafa !important;
|
||||
}
|
||||
.addinvistDrawer {
|
||||
.drawerMain {
|
||||
.header {
|
||||
height: 73px;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.headerTitle {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
line-height: 25px;
|
||||
margin-left: 24px;
|
||||
}
|
||||
}
|
||||
.contentMain {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.main_left {
|
||||
padding-right: 30px;
|
||||
margin-top:32px;
|
||||
.main_item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 32px;
|
||||
.fi_input {
|
||||
margin-right: 20px;
|
||||
}
|
||||
.btns {
|
||||
margin-right: 20px;
|
||||
padding: 0px 26px 0px 26px;
|
||||
height: 38px;
|
||||
background: #409eff;
|
||||
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 {
|
||||
width: 15px;
|
||||
height: 17px;
|
||||
background-image: url("../../assets/images/courseManage/search0.png");
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
.btnText {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
line-height: 36px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
.btnsn {
|
||||
padding: 0px 26px 0px 26px;
|
||||
height: 38px;
|
||||
background: #ffffff;
|
||||
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 {
|
||||
width: 16px;
|
||||
height: 18px;
|
||||
background-image: url("../../assets/images/courseManage/reset1.png");
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
.btnText {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #409eff;
|
||||
line-height: 36px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.main_item2 {
|
||||
.pa {
|
||||
width: 100%;
|
||||
margin: 15px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.main_btns {
|
||||
height: 72px;
|
||||
width: 100%;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -275,7 +275,7 @@ export default {
|
||||
default: 0,
|
||||
},
|
||||
isLevel: { // 是否是关卡页面触发
|
||||
type: Boolean,
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
EditWorkId: { // 要编辑的workId
|
||||
@@ -358,7 +358,7 @@ export default {
|
||||
}
|
||||
};
|
||||
const updateTask = (res) => {
|
||||
if(props.isLevel){
|
||||
if(props.isLevel == 1 ){
|
||||
RouterEditTask({
|
||||
chapterId:props.isactive,
|
||||
courseId: res.data.data.activityId,
|
||||
@@ -373,7 +373,7 @@ export default {
|
||||
}).catch(err => {
|
||||
console.log("新增关卡任务失败",err);
|
||||
})
|
||||
}else{
|
||||
}else if(props.isLevel==2){
|
||||
apiTask.addTask({
|
||||
courseId: res.data.data.activityId,
|
||||
duration: res.data.data.activityDuration,
|
||||
@@ -389,6 +389,8 @@ export default {
|
||||
.catch((err)=> {
|
||||
console.log("更新任务列表失败",err);
|
||||
})
|
||||
}else if(props.isLevel == 3){
|
||||
console.log("模板库更新更新任务列表");
|
||||
}
|
||||
}
|
||||
//创建活动
|
||||
@@ -503,12 +505,14 @@ export default {
|
||||
border-radius: 8px;
|
||||
}
|
||||
.main_left {
|
||||
margin-top:32px;
|
||||
padding-right: 30px;
|
||||
flex: 1;
|
||||
border-right: 1px solid #e8e8e8;
|
||||
.main_item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 32px;
|
||||
margin-bottom: 32px;
|
||||
.signbox {
|
||||
width: 120px;
|
||||
|
||||
@@ -1,210 +1,302 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:visible="addcaseVisible"
|
||||
class="drawerStyle addcaseDrawer"
|
||||
width="80%"
|
||||
title="添加案例"
|
||||
placement="right"
|
||||
@after-visible-change="afterVisibleChange"
|
||||
>
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
<div class="headerTitle">添加案例</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"
|
||||
/>
|
||||
</div>
|
||||
<div class="contentMain">
|
||||
<div class="main_items">
|
||||
<div class="mi_ipts">
|
||||
<div class="mii_ipt">
|
||||
<div class="ipt_name">案例标题:</div>
|
||||
<div class="fi_input">
|
||||
<a-input
|
||||
v-model:value="inputV1"
|
||||
style="width: 264px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入项目名称"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mi_btns">
|
||||
<div class="btn btn1">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">搜索</div>
|
||||
</div>
|
||||
<div class="btn btn2">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">重置</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="main_table">
|
||||
<a-table
|
||||
class="ant-table-striped"
|
||||
:row-class-name="
|
||||
(_record, index) => (index % 2 === 1 ? 'table-striped' : null)
|
||||
"
|
||||
:row-selection="rowSelection"
|
||||
:columns="columns1"
|
||||
:data-source="tableData1"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
:pagination="false"
|
||||
/>
|
||||
<div class="pa">
|
||||
<a-pagination
|
||||
showSizeChanger="true"
|
||||
showQuickJumper="true"
|
||||
hideOnSinglePage="true"
|
||||
:pageSize="pageSize"
|
||||
:current="currentPage"
|
||||
:total="tableDataTotal"
|
||||
class="pagination"
|
||||
<a-drawer
|
||||
:visible="addcaseVisible"
|
||||
class="drawerStyle addcaseDrawer"
|
||||
width="80%"
|
||||
title="添加案例"
|
||||
placement="right"
|
||||
@after-visible-change="afterVisibleChange"
|
||||
>
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
<div v-if="edit" class="headerTitle">编辑案例</div>
|
||||
<div v-else class="headerTitle">添加案例</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"
|
||||
/>
|
||||
</div>
|
||||
<div class="contentMain">
|
||||
<div class="main_items">
|
||||
<div class="mi_ipts">
|
||||
<div class="mii_ipt">
|
||||
<div class="ipt_name">案例标题:</div>
|
||||
<div class="fi_input">
|
||||
<a-input
|
||||
v-model:value="inputV1"
|
||||
style="width: 264px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入项目名称"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_btns">
|
||||
<button class="btn1">取消</button>
|
||||
<button class="btn2">确定</button>
|
||||
<div class="mi_btns">
|
||||
<div class="btn btn1">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">搜索</div>
|
||||
</div>
|
||||
<div class="btn btn2" @click="resetCase()">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">重置</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="main_table">
|
||||
<a-table class="ant-table-striped" :row-class-name="
|
||||
(_record, index) => (index % 2 === 1 ? 'table-striped' : null)
|
||||
" :row-selection="rowSelection" :columns="tableDataFunc()" :data-source="tableData"
|
||||
:loading="tableDataTotal === -1 ? true : false" expandRowByClick="true" this.getMilitaryDeployment()
|
||||
@expand="expandTable" :pagination="false" filterMultiple:false
|
||||
/>
|
||||
<div class="pa">
|
||||
<a-pagination
|
||||
showSizeChanger="true"
|
||||
showQuickJumper="true"
|
||||
hideOnSinglePage="true"
|
||||
:pageSize="pageSize"
|
||||
:current="currentPage"
|
||||
:total="tableDataTotal"
|
||||
class="pagination"
|
||||
@change="handelChangePage"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs, ref } from "vue";
|
||||
const columns1 = [
|
||||
{
|
||||
title: "案例标题",
|
||||
width: "40%",
|
||||
dataIndex: "title",
|
||||
key: "num",
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
<div class="main_btns">
|
||||
<button class="btn1" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="updateTask">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs, onMounted } from "vue";
|
||||
import * as api from "../../api/indexInvist.js";
|
||||
import * as apiTask from "../../api/indexTaskadd";
|
||||
import { message } from "ant-design-vue";
|
||||
import { RouterEditTask } from "@/api/indexTask";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
export default {
|
||||
name: "AddCase",
|
||||
props: {
|
||||
addcaseVisible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
{
|
||||
title: "作者",
|
||||
width: "25%",
|
||||
dataIndex: "name",
|
||||
key: "name",
|
||||
align: "center",
|
||||
EditCaseId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
{
|
||||
title: "导入时间",
|
||||
width: "35%",
|
||||
dataIndex: "time",
|
||||
key: "time",
|
||||
align: "center",
|
||||
edit: { // 是否为编辑
|
||||
type: Boolean,
|
||||
default: null,
|
||||
},
|
||||
];
|
||||
const rowSelection = ref({
|
||||
checkStrictly: false,
|
||||
onChange: (selectedRowKeys, selectedRows) => {
|
||||
console.log(
|
||||
`selectedRowKeys: ${selectedRowKeys}`,
|
||||
"selectedRows: ",
|
||||
selectedRows
|
||||
);
|
||||
projectId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
onSelect: (record, selected, selectedRows) => {
|
||||
console.log(record, selected, selectedRows);
|
||||
chooseStageId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
onSelectAll: (selected, selectedRows, changeRows) => {
|
||||
console.log(selected, selectedRows, changeRows);
|
||||
routerTaskId: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
});
|
||||
export default {
|
||||
name: "AddCase",
|
||||
props: {
|
||||
addcaseVisible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
isLevel: { // 是否是关卡页面触发
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
projectTaskId: { // 要编辑的projectId
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
routerId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
isactive: {
|
||||
type: Number,
|
||||
default: null,
|
||||
}
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
tableData: [
|
||||
{
|
||||
key: "1",
|
||||
title: "基于BOE显示PNL工厂的工序平1111112222222221111111111111122222333335555",
|
||||
name: "李玉冰",
|
||||
time: "2022-10-31 23:12:00",
|
||||
},
|
||||
],
|
||||
currentPage: 1,
|
||||
tableDataTotal: 0,
|
||||
pageSize: 10,
|
||||
inputV1: '',
|
||||
time: undefined,
|
||||
assessmentId: null,
|
||||
assessmentName: "",
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:addcaseVisible", false);
|
||||
ctx.emit("update:edit", false);
|
||||
};
|
||||
const afterVisibleChange = (bool) => {
|
||||
console.log("state", bool);
|
||||
};
|
||||
const tableDataFunc = () => {
|
||||
const columns = [
|
||||
{
|
||||
title: "案例标题",
|
||||
dataIndex: "tit",
|
||||
key: "tit",
|
||||
width: "400px",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "作者",
|
||||
dataIndex: "name",
|
||||
// width: "30%",
|
||||
key: "name",
|
||||
width: "100px",
|
||||
align: "center",
|
||||
className: "classify",
|
||||
},
|
||||
{
|
||||
title: "导入时间",
|
||||
dataIndex: "time",
|
||||
key: "time",
|
||||
width: "200px",
|
||||
align: "center",
|
||||
},
|
||||
];
|
||||
return columns;
|
||||
};
|
||||
const rowSelection = {
|
||||
onSelect: (selectedRows, selected, selectedRowKeys) => {
|
||||
console.log(
|
||||
"selectedRowKeys", selectedRowKeys, "selectedRows", selectedRows, "selected", selected);
|
||||
console.log(selectedRows.assessmentId);
|
||||
state.assessmentId = selectedRows.assessmentId;
|
||||
state.assessmentName = selectedRows.name;
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
tableData1: [
|
||||
{
|
||||
key: "1",
|
||||
title: "基于BOE显示PNL工厂的工序平1111112222222221111111111111122222333335555",
|
||||
name: "李玉冰",
|
||||
time: "2022-10-31 23:12:00",
|
||||
},
|
||||
{
|
||||
key: "2",
|
||||
title: "OEM 企业一线用工之路探索",
|
||||
name: "李玉冰",
|
||||
time: "2022-10-31 23:12:00",
|
||||
},
|
||||
{
|
||||
key: "3",
|
||||
title: " 销售数字化转型的痛苦与探索",
|
||||
name: "李玉冰",
|
||||
time: "2022-10-31 23:12:00",
|
||||
},
|
||||
{
|
||||
key: "4",
|
||||
title: "疫情突发,技能人才招聘的相关…",
|
||||
name: "李玉冰",
|
||||
time: "2022-10-31 23:12:00",
|
||||
},
|
||||
{
|
||||
key: "5",
|
||||
title: "设计效率提升之工具化",
|
||||
name: "李玉冰",
|
||||
time: "2022-10-31 23:12:00",
|
||||
},
|
||||
{
|
||||
key: "6",
|
||||
title: "疫情突发,技能人才招聘的相关…",
|
||||
name: "李玉冰",
|
||||
time: "2022-10-31 23:12:00",
|
||||
},
|
||||
{
|
||||
key: "7",
|
||||
title: "基于BOE显示PNL工厂的工序平…",
|
||||
name: "李玉冰",
|
||||
time: "2022-10-31 23:12:00",
|
||||
},
|
||||
{
|
||||
key: "8",
|
||||
title: "基于BOE显示PNL工厂的工序平…",
|
||||
name: "李玉冰",
|
||||
time: "2022-10-31 23:12:00",
|
||||
},
|
||||
{
|
||||
key: "9",
|
||||
title: "基于BOE显示PNL工厂的工序平…",
|
||||
name: "李玉冰",
|
||||
time: "2022-10-31 23:12:00",
|
||||
},
|
||||
],
|
||||
currentPage: 1,
|
||||
tableDataTotal: 100,
|
||||
pageSize: 10,
|
||||
inputV1:'',
|
||||
};
|
||||
const handelChangePage = (page, pageSize) => {
|
||||
state.currentPage = page;
|
||||
state.pageSize = pageSize;
|
||||
getAllCaseText();
|
||||
};
|
||||
const getTableDate = (tableData) => {
|
||||
let data = tableData;
|
||||
let array = [];
|
||||
data.map((value, index) => {
|
||||
let obj = {
|
||||
key: index,
|
||||
assessmentId: value.assessmentId,
|
||||
num: value.essayQuestionVoList.length,
|
||||
name: value.assessmentName ? value.assessmentName : "-",
|
||||
creator: value.createUser ? value.createUser : "-",
|
||||
time: dayjs(value.createTime).format("YYYY-MM-DD"),
|
||||
};
|
||||
array.push(obj);
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:addcaseVisible", false);
|
||||
};
|
||||
const afterVisibleChange = (bool) => {
|
||||
console.log("state", bool);
|
||||
};
|
||||
return {
|
||||
...toRefs(state),
|
||||
afterVisibleChange,
|
||||
closeDrawer,
|
||||
columns1,
|
||||
rowSelection,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.ant-table-striped :deep(.table-striped) td {
|
||||
state.tableData = array;
|
||||
};
|
||||
//获取全部案例信息接口
|
||||
const getAllCaseText = () => {
|
||||
api
|
||||
.queryAssessmentDetailList({
|
||||
assessmentName: "",
|
||||
pageNo: state.currentPage,
|
||||
pageSize: state.pageSize,
|
||||
})
|
||||
.then((res) => {
|
||||
let arr = res.data.data.rows;
|
||||
if (res.status === 200) {
|
||||
// console.log("获取案例信息", res.data.data);
|
||||
getTableDate(arr);
|
||||
state.tableDataTotal = Number(res.data.data.total);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取全部在线信息接口失败", err);
|
||||
// state.createLoading = false;
|
||||
});
|
||||
};
|
||||
const updateTask = () => {
|
||||
console.log("jinlaile=================", state.assessmentName)
|
||||
if (props.isLevel==1) {
|
||||
RouterEditTask({
|
||||
chapterId: props.isactive,
|
||||
courseId: state.assessmentId,
|
||||
name: state.assessmentName,
|
||||
routerId: props.routerId,
|
||||
routerTaskId: props.routerTaskId || 0,
|
||||
type: 3,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res, 11111);
|
||||
message.success(`${props.edit ? '编辑' : '新增'}关卡任务成功`)
|
||||
ctx.emit("changeData", false);
|
||||
closeDrawer();
|
||||
state.addLoading = false;
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err, 1111);
|
||||
});
|
||||
} else if(props.isLevel==2){
|
||||
console.log("=========projectTaskId", props.projectTaskId);
|
||||
apiTask
|
||||
.addTask({
|
||||
courseId: state.assessmentId,
|
||||
name: state.assessmentName,
|
||||
projectId: props.projectId,
|
||||
projectTaskId: props.projectTaskId || 0,
|
||||
stageId: props.chooseStageId,
|
||||
type: 3,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log("调用项目添加接口后111", res.data, 11111);
|
||||
ctx.emit("changeData", false);
|
||||
closeDrawer();
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err, 111111);
|
||||
});
|
||||
}else if(props.isLevel==3){
|
||||
console.log("模板库");
|
||||
}
|
||||
}
|
||||
//重置案例信息
|
||||
const resetCase = () => {
|
||||
state.inputV1 = "";
|
||||
getAllCaseText();
|
||||
};
|
||||
onMounted(() => {
|
||||
// createCase();
|
||||
getAllCaseText();
|
||||
});
|
||||
return {
|
||||
...toRefs(state),
|
||||
afterVisibleChange,
|
||||
closeDrawer,
|
||||
tableDataFunc,
|
||||
rowSelection,
|
||||
handelChangePage,
|
||||
getTableDate,
|
||||
updateTask,
|
||||
getAllCaseText,
|
||||
resetCase,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.ant-table-striped :deep(.table-striped) td {
|
||||
background-color: #fafafa !important;
|
||||
}
|
||||
|
||||
@@ -227,6 +319,7 @@
|
||||
}
|
||||
.contentMain {
|
||||
.main_items {
|
||||
margin-top:32px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 12px;
|
||||
@@ -381,4 +474,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
@@ -124,7 +124,7 @@ export default {
|
||||
},
|
||||
isLevel: {
|
||||
// 是否是关卡页面触发
|
||||
type: Boolean,
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
EditWorkId: {
|
||||
@@ -207,8 +207,7 @@ export default {
|
||||
}
|
||||
};
|
||||
const updateTask = (res) => {
|
||||
console.log("jinlaile ========", props.isLevel);
|
||||
if (props.isLevel) {
|
||||
if (props.isLevel == 1) {
|
||||
RouterEditTask({
|
||||
chapterId: props.isactive,
|
||||
courseId: res.data.data.discussId,
|
||||
@@ -223,22 +222,16 @@ export default {
|
||||
.catch((err) => {
|
||||
console.log("新增关卡任务失败", err);
|
||||
});
|
||||
} else {
|
||||
apiTask
|
||||
.addTask({
|
||||
courseId: res.data.data.discussId,
|
||||
name: res.data.data.discussName,
|
||||
projectId: props.projectId,
|
||||
projectTaskId: props.projectTaskId || 0,
|
||||
stageId: props.chooseStageId,
|
||||
type: 8,
|
||||
})
|
||||
.then((r) => {
|
||||
console.log("新增关卡任务成功", r);
|
||||
})
|
||||
.catch((r) => {
|
||||
console.log("更新阶段任务失败", r);
|
||||
});
|
||||
} else if (props.isLevel == 2) {
|
||||
apiTask.addTask({
|
||||
courseId: res.data.data.discussId,
|
||||
name: res.data.data.discussName,
|
||||
routerId: props.routerId,
|
||||
routerTaskId: props.routerTaskId || 0,
|
||||
type: 8,
|
||||
});
|
||||
} else if (props.isLevel == 3) {
|
||||
console.log("模板库任务");
|
||||
}
|
||||
};
|
||||
const updateDiscussInfo = () => {
|
||||
@@ -318,12 +311,14 @@ export default {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.main_left {
|
||||
margin-top: 32px;
|
||||
padding-right: 30px;
|
||||
flex: 1;
|
||||
border-right: 1px solid #e8e8e8;
|
||||
.main_item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 32px;
|
||||
margin-bottom: 32px;
|
||||
.signbox {
|
||||
width: 120px;
|
||||
|
||||
@@ -135,7 +135,7 @@ export default {
|
||||
default: 0,
|
||||
},
|
||||
isLevel: { // 是否是关卡页面触发
|
||||
type: Boolean,
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
projectTaskId: { // 要编辑的projectId
|
||||
@@ -195,7 +195,7 @@ export default {
|
||||
});
|
||||
}
|
||||
const updateTask = (res)=>{
|
||||
if(props.isLevel){
|
||||
if(props.isLevel ==1){
|
||||
apitaskadd
|
||||
.addTask({
|
||||
courseId: res.data.data.evaluationId,
|
||||
@@ -212,7 +212,7 @@ export default {
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
}else{
|
||||
}else if(props.isLevel ==2){
|
||||
RouterEditTask({
|
||||
chapterId: props.isactive,
|
||||
courseId: res.data.data.evaluationId,
|
||||
@@ -226,6 +226,8 @@ export default {
|
||||
}).catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
}else if(props.isLevel ==3){
|
||||
console.log("模板库任务")
|
||||
}
|
||||
}
|
||||
//创建或编辑测评信息
|
||||
@@ -316,12 +318,14 @@ export default {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.main_left {
|
||||
margin-top:32px;
|
||||
padding-right: 30px;
|
||||
flex: 1;
|
||||
border-right: 1px solid #e8e8e8;
|
||||
.main_item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 32px;
|
||||
margin-bottom: 32px;
|
||||
.signbox {
|
||||
width: 120px;
|
||||
|
||||
@@ -271,32 +271,17 @@
|
||||
</div>
|
||||
<div class="main_btns">
|
||||
<button class="btn1">取消</button>
|
||||
<button class="btn2">确定</button>
|
||||
<button class="btn2" @click ="updateFaceTeach">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs, ref } from "vue";
|
||||
import { reactive, toRefs} from "vue";
|
||||
import SelFacet from "../../components/drawers/SelFacet.vue";
|
||||
import AddHomework from "../../components/drawers/AddHomework.vue";
|
||||
import AddTest from "../../components/drawers/AddTest.vue";
|
||||
const rowSelection = ref({
|
||||
checkStrictly: false,
|
||||
onChange: (selectedRowKeys, selectedRows) => {
|
||||
console.log(
|
||||
`selectedRowKeys: ${selectedRowKeys}`,
|
||||
"selectedRows: ",
|
||||
selectedRows
|
||||
);
|
||||
},
|
||||
onSelect: (record, selected, selectedRows) => {
|
||||
console.log(record, selected, selectedRows);
|
||||
},
|
||||
onSelectAll: (selected, selectedRows, changeRows) => {
|
||||
console.log(selected, selectedRows, changeRows);
|
||||
},
|
||||
});
|
||||
|
||||
export default {
|
||||
name: "AddFaceteach",
|
||||
components: {
|
||||
@@ -309,6 +294,47 @@ export default {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
EditEvalId: {
|
||||
// 要编辑的workId
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
edit: {
|
||||
// 是否为编辑
|
||||
type: Boolean,
|
||||
default: null,
|
||||
},
|
||||
projectId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
chooseStageId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
routerTaskId: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
isLevel: {
|
||||
// 是否是关卡页面触发
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
|
||||
projectTaskId: {
|
||||
// 要编辑的projectId
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
routerId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
isactive: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
@@ -333,6 +359,9 @@ export default {
|
||||
};
|
||||
const afterVisibleChange = (bool) => {
|
||||
console.log("state", bool);
|
||||
if(bool){
|
||||
queryFaceTeach();
|
||||
}
|
||||
};
|
||||
const showDrawerSelFacet = () => {
|
||||
state.selfacetvisible = true;
|
||||
@@ -353,6 +382,18 @@ export default {
|
||||
state.radioV2 = "";
|
||||
}
|
||||
}
|
||||
//查询面授
|
||||
const queryFaceTeach=()=>{
|
||||
|
||||
}
|
||||
//更新任务列表
|
||||
const updateTask=()=>{
|
||||
|
||||
}
|
||||
//新建或编辑面授
|
||||
const updateFaceTeach=()=>{
|
||||
|
||||
}
|
||||
return {
|
||||
...toRefs(state),
|
||||
showDrawerSelFacet,
|
||||
@@ -360,9 +401,10 @@ export default {
|
||||
showDrawerAddTest,
|
||||
afterVisibleChange,
|
||||
closeDrawer,
|
||||
rowSelection,
|
||||
cloradio1,
|
||||
cloradio2,
|
||||
updateFaceTeach,
|
||||
updateTask,
|
||||
// change,
|
||||
};
|
||||
},
|
||||
@@ -400,99 +442,116 @@ export default {
|
||||
.main_item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 32px;
|
||||
.signbox {
|
||||
width: 120px;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
align-items: center;
|
||||
.sign {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
.btnbox {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
.xkbtn {
|
||||
cursor: pointer;
|
||||
width: 130px;
|
||||
height: 40px;
|
||||
background: #388be1;
|
||||
border-radius: 8px;
|
||||
border: 0;
|
||||
margin-right: 8px;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
.main_item2 {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 32px;
|
||||
.signbox {
|
||||
width: 120px;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
align-items: center;
|
||||
}
|
||||
.kqszbox {
|
||||
.qdqtbox {
|
||||
margin-left: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.qdbtn,
|
||||
.qtbtn {
|
||||
width: 75px;
|
||||
height: 24px;
|
||||
background: rgba(56, 139, 225, 0.16);
|
||||
border-radius: 2px;
|
||||
border: 1px solid #387df7;
|
||||
margin-top: 32px;
|
||||
margin-bottom: 32px;
|
||||
|
||||
.signbox {
|
||||
width: 120px;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.btntext {
|
||||
color: #387df7;
|
||||
|
||||
.sign {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
.setbox {
|
||||
|
||||
.btnbox {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 24px;
|
||||
.timerbox {
|
||||
margin-top: 6px;
|
||||
margin-right: 32px;
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
|
||||
.xkbtn {
|
||||
cursor: pointer;
|
||||
width: 130px;
|
||||
height: 40px;
|
||||
background: #388be1;
|
||||
border-radius: 8px;
|
||||
border: 0;
|
||||
margin-right: 8px;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.main_item2 {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 32px;
|
||||
|
||||
.signbox {
|
||||
width: 120px;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.kqszbox {
|
||||
.qdqtbox {
|
||||
margin-left: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.qdbtn,
|
||||
.qtbtn {
|
||||
width: 75px;
|
||||
height: 24px;
|
||||
background: rgba(56, 139, 225, 0.16);
|
||||
border-radius: 2px;
|
||||
border: 1px solid #387df7;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: center;
|
||||
|
||||
.btntext {
|
||||
color: #387df7;
|
||||
}
|
||||
}
|
||||
|
||||
.setbox {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 24px;
|
||||
|
||||
.timerbox {
|
||||
margin-top: 6px;
|
||||
margin-right: 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btnbox2 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
|
||||
.xkbtn {
|
||||
cursor: pointer;
|
||||
width: 130px;
|
||||
height: 40px;
|
||||
background: #388be1;
|
||||
border-radius: 8px;
|
||||
border: 0;
|
||||
margin-right: 16px 8px 32px 0;
|
||||
color: #fff;
|
||||
margin-top: 16px;
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.btnbox2 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
.xkbtn {
|
||||
cursor: pointer;
|
||||
width: 130px;
|
||||
height: 40px;
|
||||
background: #388be1;
|
||||
border-radius: 8px;
|
||||
border: 0;
|
||||
margin-right: 16px 8px 32px 0;
|
||||
color: #fff;
|
||||
margin-top: 16px;
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.main_right {
|
||||
width: 337px;
|
||||
.main_item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.main_right {
|
||||
width: 337px;
|
||||
|
||||
.main_item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 32px;
|
||||
margin-bottom: 32px;
|
||||
.signbox {
|
||||
width: 120px;
|
||||
|
||||
@@ -161,7 +161,7 @@ export default {
|
||||
},
|
||||
isLevel: {
|
||||
// 是否是关卡页面触发
|
||||
type: Boolean,
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
EditWorkId: {
|
||||
@@ -245,7 +245,7 @@ export default {
|
||||
// };
|
||||
const handleFinish = (values) => {
|
||||
console.log(values);
|
||||
updateWork(props.workId);
|
||||
updteHomeWork();
|
||||
};
|
||||
|
||||
const handleFinishFailed = (errors) => {
|
||||
@@ -288,77 +288,40 @@ export default {
|
||||
console.log("state", bool);
|
||||
};
|
||||
|
||||
const updateWork = () => {
|
||||
state.addLoading = true;
|
||||
if (props.edit) {
|
||||
// 编辑任务
|
||||
myUpdateWorkTaskUsing();
|
||||
} else {
|
||||
// 创建任务
|
||||
console.log("创建任务***************");
|
||||
myCreateWorkTask();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// 新增任务
|
||||
const myCreateWorkTask = () => {
|
||||
const updteHomeWork = () => {
|
||||
let obj = {
|
||||
createTime: "",
|
||||
createUser: 0,
|
||||
submitEndTime: dayjs(formState.choosedTime[1]).format("YYYY-MM-DD"),
|
||||
submitStartTime: dayjs(formState.choosedTime[0]).format("YYYY-MM-DD"),
|
||||
updateTime: "",
|
||||
updateUser: 0,
|
||||
workEnclosureAddress: "",
|
||||
workFlag: "",
|
||||
workId: 0,
|
||||
workId: props.edit?props.EditWorkId:0,
|
||||
workName: formState.workName,
|
||||
workRequirement: formState.workRequirement,
|
||||
workTag: "",
|
||||
};
|
||||
createWorkTask(obj)
|
||||
if(props.edit){
|
||||
updateWorkTaskUsing(obj)
|
||||
.then((res) => {
|
||||
if (props.isLevel) {
|
||||
// 如果是关卡页面进入 ---------------------------------
|
||||
myRouterEditTask(res.data.data.workId);
|
||||
} else {
|
||||
myProjectEditTask(res.data.data.workId);
|
||||
}
|
||||
updateTask(res);
|
||||
closeDrawer();
|
||||
})
|
||||
.catch((err) => {
|
||||
message.error(`添加失败${err}`);
|
||||
});
|
||||
};
|
||||
// 编辑任务
|
||||
const myUpdateWorkTaskUsing = () => {
|
||||
let editObj = {
|
||||
createTime: "",
|
||||
createUser: 0,
|
||||
submitEndTime: dayjs(formState.choosedTime[1]).format("YYYY-MM-DD"),
|
||||
submitStartTime: dayjs(formState.choosedTime[0]).format("YYYY-MM-DD"),
|
||||
updateTime: "",
|
||||
updateUser: 0,
|
||||
workEnclosureAddress: "",
|
||||
workFlag: "",
|
||||
workId: props.EditWorkId,
|
||||
workName: formState.workName,
|
||||
workRequirement: formState.workRequirement,
|
||||
workTag: "",
|
||||
};
|
||||
updateWorkTaskUsing(editObj)
|
||||
}else{
|
||||
createWorkTask(obj)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
if (props.isLevel) {
|
||||
// 如果是关卡页面进入 ---------------------------------
|
||||
myRouterEditTask(res.data.data.workId);
|
||||
} else {
|
||||
myProjectEditTask(res.data.data.workId);
|
||||
}
|
||||
updateTask(res);
|
||||
closeDrawer();
|
||||
})
|
||||
.catch((err) => {
|
||||
message.error(`编辑失败${err}`);
|
||||
message.error(`添加失败${err}`);
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// 查询任务
|
||||
const queryWork = () => {
|
||||
state.addLoading = true;
|
||||
@@ -381,57 +344,51 @@ export default {
|
||||
});
|
||||
};
|
||||
// 新增编辑或新增项目任务
|
||||
const myProjectEditTask = (workId) => {
|
||||
let editObj = {
|
||||
courseId: workId,
|
||||
duration: 60,
|
||||
flag: true,
|
||||
name: formState.workName,
|
||||
projectId: props.projectId,
|
||||
projectTaskId: props.projectTaskId || 0,
|
||||
stageId: props.chooseStageId,
|
||||
type: 4,
|
||||
};
|
||||
ProjectEditTask(editObj)
|
||||
.then((res) => {
|
||||
console.log(` 编辑项目成功的打印 ${res}`);
|
||||
message.success(`${props.edit ? "编辑" : "新增"}阶段任务成功`);
|
||||
ctx.emit("changeData", false);
|
||||
state.addLoading = false;
|
||||
closeDrawer();
|
||||
})
|
||||
.catch((err) => {
|
||||
message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
|
||||
console.log(` 编辑项目失败的打印 ${err}`);
|
||||
});
|
||||
};
|
||||
// 新增编辑或新增关卡任务
|
||||
const myRouterEditTask = (testId) => {
|
||||
let editObj1 = {
|
||||
const updateTask = (res) => {
|
||||
if(props.isLevel==1 ){
|
||||
let editObj1 = {
|
||||
chapterId: props.isactive,
|
||||
courseId: testId,
|
||||
duration: 30,
|
||||
flag: true,
|
||||
name: formState.workName,
|
||||
courseId: res.data.data.workId,
|
||||
name: res.data.data.workName,
|
||||
routerId: props.routerId,
|
||||
routerTaskId: props.routerTaskId || 0,
|
||||
type: 4,
|
||||
};
|
||||
|
||||
RouterEditTask(editObj1)
|
||||
.then((res) => {
|
||||
console.log(` 编辑关卡成功的打印 ${res}`);
|
||||
.then(() => {
|
||||
message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
|
||||
ctx.emit("changeData", false);
|
||||
state.addLoading = false;
|
||||
closeDrawer();
|
||||
})
|
||||
.catch((err) => {
|
||||
.catch(() => {
|
||||
message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
|
||||
console.log(` 编辑关卡失败的打印 ${err}`);
|
||||
});
|
||||
}else if(props.isLevel==2){
|
||||
let editObj = {
|
||||
courseId: res.data.data.workId,
|
||||
name:res.data.data.workName,
|
||||
projectId: props.edit?props.projectId:0,
|
||||
projectTaskId: props.projectTaskId || 0,
|
||||
stageId: props.chooseStageId,
|
||||
type: 4,
|
||||
};
|
||||
ProjectEditTask(editObj)
|
||||
.then(() => {
|
||||
message.success(`${props.edit ? "编辑" : "新增"}阶段任务成功`);
|
||||
ctx.emit("changeData", false);
|
||||
state.addLoading = false;
|
||||
})
|
||||
.catch(() => {
|
||||
message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
|
||||
});
|
||||
}else if(props.isLevel==3){
|
||||
console.log("模板库更新更新任务列表");
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
return {
|
||||
afterVisibleChange,
|
||||
closeDrawer,
|
||||
@@ -446,7 +403,6 @@ export default {
|
||||
formRef,
|
||||
// layout,
|
||||
rules,
|
||||
updateWork,
|
||||
...toRefs(state),
|
||||
};
|
||||
},
|
||||
@@ -484,10 +440,12 @@ export default {
|
||||
padding-right: 30px;
|
||||
flex: 1;
|
||||
border-right: 1px solid #e8e8e8;
|
||||
margin-top:32px;
|
||||
|
||||
.main_item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 32px;
|
||||
margin-bottom: 32px;
|
||||
|
||||
.signbox {
|
||||
|
||||
@@ -18,51 +18,38 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="contentMain">
|
||||
<div class="main">
|
||||
<div class="main_left">
|
||||
<div class="main_notice">
|
||||
<div class="mntc_left">
|
||||
<div class="notice_icon"></div>
|
||||
<div v-if="assessment==null">
|
||||
<span class="title">已选择 <span class ="data">0</span> 条</span>
|
||||
</div>
|
||||
<div v-else>
|
||||
<span class="title">已选择 <span class ="data">1</span> 条;</span>
|
||||
<span class="title">名称: <span class ="data">{{assessment.name}}</span> </span>
|
||||
<span class="title">题数: <span class ="data">{{assessment.num}}</span> </span>
|
||||
<span class="title">创建人: <span class ="data">{{assessment.creator}}</span> </span>
|
||||
<span class="title">创建时间: <span class ="data">{{assessment.time}}</span> </span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="main_item">
|
||||
<div class="fi_input">
|
||||
<a-input
|
||||
v-model:value="inputV1"
|
||||
style="width: 424px; height: 40px"
|
||||
placeholder="请输入评估名称"
|
||||
maxlength="20"
|
||||
/>
|
||||
</div>
|
||||
<div class="btns" @click="getAllInvistText">
|
||||
|
||||
<div class="btns" @click="checkAssDrawer">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">搜索</div>
|
||||
<div class="btnText">选择评估</div>
|
||||
<div class="main_item2">
|
||||
<AssessmentList
|
||||
v-model:assessmentVisible="assessmentVisible"
|
||||
@checkedAss="getCheckedAss"/>
|
||||
</div>
|
||||
<div class="btnsn" @click="resetInvist">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">重置</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_item2">
|
||||
<a-table
|
||||
style="border: 1px solid #f2f6fe"
|
||||
:columns="tableDataFunc()"
|
||||
:data-source="tableData"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
expandRowByClick="true"
|
||||
@expand="expandTable"
|
||||
:pagination="false"
|
||||
:row-selection="rowSelection"
|
||||
filterMultiple:false
|
||||
/>
|
||||
|
||||
<div class="pa">
|
||||
<a-pagination
|
||||
showSizeChanger="true"
|
||||
showQuickJumper="true"
|
||||
hideOnSinglePage="true"
|
||||
:pageSize="pageSize"
|
||||
:current="currentPage"
|
||||
:total="tableDataTotal"
|
||||
class="pagination"
|
||||
@change="handelChangePage"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_btns">
|
||||
@@ -70,19 +57,21 @@
|
||||
<button class="btn2" @click="updateTask">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs, onMounted } from "vue";
|
||||
import * as api from "../../api/indexInvist.js";
|
||||
import { reactive, toRefs} from "vue";
|
||||
import * as apiTask from "../../api/indexTaskadd";
|
||||
import { message } from "ant-design-vue";
|
||||
import dayjs from "dayjs";
|
||||
import AssessmentList from "./ AssessmentList.vue";
|
||||
import { RouterEditTask } from "@/api/indexTask";
|
||||
export default {
|
||||
name: "AddInvist",
|
||||
// components: {
|
||||
// },
|
||||
components: {
|
||||
AssessmentList,
|
||||
},
|
||||
props: {
|
||||
addinvistVisible: {
|
||||
type: Boolean,
|
||||
@@ -109,9 +98,10 @@ export default {
|
||||
default: 0,
|
||||
},
|
||||
isLevel: { // 是否是关卡页面触发
|
||||
type: Boolean,
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
|
||||
projectTaskId: { // 要编辑的projectId
|
||||
type: Number,
|
||||
default: null,
|
||||
@@ -123,7 +113,7 @@ export default {
|
||||
isactive: {
|
||||
type: Number,
|
||||
default: null,
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
setup(props, ctx) {
|
||||
@@ -134,118 +124,38 @@ export default {
|
||||
pageSize: 10,
|
||||
tableDataTotal: 0,
|
||||
tableData: [
|
||||
|
||||
],
|
||||
assessmentId:null,
|
||||
assessmentName:"",
|
||||
|
||||
|
||||
assessment:null,
|
||||
assessmentVisible:false,
|
||||
|
||||
});
|
||||
const getCheckedAss = (ass) =>{
|
||||
state.assessment = ass
|
||||
console.log("checed===",state.assessment);
|
||||
}
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:addinvistVisible", false);
|
||||
ctx.emit("update:edit", false);
|
||||
state.inputV1 = "";
|
||||
};
|
||||
const checkAssDrawer =() =>{
|
||||
state.assessmentVisible = true;
|
||||
}
|
||||
const afterVisibleChange = (bool) => {
|
||||
console.log("state", bool);
|
||||
};
|
||||
const tableDataFunc = () => {
|
||||
const columns = [
|
||||
{
|
||||
title: "名称",
|
||||
dataIndex: "name",
|
||||
// width: "30%",
|
||||
key: "name",
|
||||
width: "150px",
|
||||
align: "left",
|
||||
className: "classify",
|
||||
},
|
||||
{
|
||||
title: "题数",
|
||||
dataIndex: "num",
|
||||
key: "num",
|
||||
width: "80px",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "创建人",
|
||||
dataIndex: "creator",
|
||||
key: "creator",
|
||||
width: "150px",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "创建时间",
|
||||
dataIndex: "time",
|
||||
key: "time",
|
||||
width: "200px",
|
||||
align: "center",
|
||||
},
|
||||
];
|
||||
return columns;
|
||||
};
|
||||
const rowSelection = {
|
||||
type: "radio",
|
||||
onSelect: (selectedRows, selected, selectedRowKeys) => {
|
||||
console.log(
|
||||
"selectedRowKeys",selectedRowKeys,"selectedRows",selectedRows, "selected",selected );
|
||||
console.log(selectedRows.assessmentId);
|
||||
state.assessmentId =selectedRows.assessmentId;
|
||||
state.assessmentName = selectedRows.name;
|
||||
},
|
||||
|
||||
};
|
||||
const handelChangePage = (page, pageSize) => {
|
||||
state.currentPage = page;
|
||||
state.pageSize = pageSize;
|
||||
getAllInvistText();
|
||||
};
|
||||
const getTableDate = (tableData) => {
|
||||
let data = tableData;
|
||||
let array = [];
|
||||
data.map((value, index) => {
|
||||
let obj = {
|
||||
key: index,
|
||||
assessmentId:value.assessmentId,
|
||||
num: value.essayQuestionVoList.length,
|
||||
name: value.assessmentName ? value.assessmentName : "-",
|
||||
creator: value.createUser ? value.createUser : "-",
|
||||
time: dayjs(value.createTime).format("YYYY-MM-DD"),
|
||||
};
|
||||
array.push(obj);
|
||||
});
|
||||
state.tableData = array;
|
||||
};
|
||||
//获取全部评估信息接口
|
||||
const getAllInvistText = () => {
|
||||
|
||||
api
|
||||
.queryAssessmentDetailList({
|
||||
assessmentName:state.inputV1,
|
||||
pageNo: state.currentPage,
|
||||
pageSize: state.pageSize,
|
||||
})
|
||||
.then((res) => {
|
||||
let arr = res.data.data.rows;
|
||||
if (res.status === 200) {
|
||||
// console.log("获取全部评估信息", res.data.data);
|
||||
getTableDate(arr);
|
||||
state.tableDataTotal = Number(res.data.data.total);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取全部评估信息接口失败", err);
|
||||
// state.createLoading = false;
|
||||
});
|
||||
};
|
||||
|
||||
const updateTask =()=>{
|
||||
console.log("jinlaile=================",state.assessmentName)
|
||||
if(props.isLevel){
|
||||
if(state.assessment==null){
|
||||
return message.warning("请选择评估");
|
||||
}
|
||||
if(props.isLevel ==1){
|
||||
RouterEditTask({
|
||||
chapterId: props.isactive,
|
||||
courseId: state.assessmentId,
|
||||
name: state.assessmentName,
|
||||
courseId: state.assessment.assessmentId,
|
||||
name:state.assessment.name,
|
||||
routerId: props.routerId,
|
||||
routerTaskId: props.routerTaskId || 0,
|
||||
type: 11,
|
||||
@@ -260,12 +170,11 @@ export default {
|
||||
.catch((err) => {
|
||||
console.log(err, 1111);
|
||||
});
|
||||
}else{
|
||||
console.log("=========projectTaskId",props.projectTaskId);
|
||||
}else if(props.isLevel ==2){
|
||||
apiTask
|
||||
.addTask({
|
||||
courseId: state.assessmentId,
|
||||
name: state.assessmentName,
|
||||
courseId: state.assessment.assessmentId,
|
||||
name:state.assessment.name,
|
||||
projectId: props.projectId,
|
||||
projectTaskId: props.projectTaskId || 0,
|
||||
stageId: props.chooseStageId,
|
||||
@@ -279,28 +188,20 @@ export default {
|
||||
.catch((err) => {
|
||||
console.log(err, 111111);
|
||||
});
|
||||
}else if(props.isLevel == 3){
|
||||
console.log("模板库更新更新任务列表");
|
||||
}
|
||||
}
|
||||
|
||||
//重置评估信息
|
||||
const resetInvist = () => {
|
||||
state.inputV1 = "";
|
||||
getAllInvistText();
|
||||
};
|
||||
onMounted(() => {
|
||||
// createInvist();
|
||||
getAllInvistText();
|
||||
});
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
afterVisibleChange,
|
||||
closeDrawer,
|
||||
tableDataFunc,
|
||||
rowSelection,
|
||||
getAllInvistText,
|
||||
updateTask,
|
||||
resetInvist,
|
||||
handelChangePage,
|
||||
AssessmentList,
|
||||
checkAssDrawer,
|
||||
getCheckedAss,
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -328,14 +229,18 @@ export default {
|
||||
.contentMain {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.main{
|
||||
width:100%;
|
||||
.main_left {
|
||||
padding-right: 30px;
|
||||
margin-top:32px;
|
||||
.main_item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 32px;
|
||||
margin-bottom: 64px;
|
||||
.fi_input {
|
||||
margin-right: 20px;
|
||||
|
||||
}
|
||||
.btns {
|
||||
margin-right: 20px;
|
||||
@@ -391,19 +296,45 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.main_item2 {
|
||||
.pa {
|
||||
width: 100%;
|
||||
margin: 15px auto;
|
||||
.main_notice {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 32px;
|
||||
height: 40px;
|
||||
background-color: #e9f6fe;
|
||||
.mntc_left {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.title{
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
margin-right: 17px
|
||||
}
|
||||
.data{
|
||||
color: #388be1
|
||||
}
|
||||
.notice_icon {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
margin-right: 9px;
|
||||
margin-left: 9px;
|
||||
background-image: url(@/assets/images/coursewareManage/gan.png);
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
}
|
||||
.mntc_right {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.main_btns {
|
||||
height: 72px;
|
||||
width: 100%;
|
||||
margin-top: 180px;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
display: flex;
|
||||
|
||||
@@ -381,7 +381,7 @@ export default {
|
||||
},
|
||||
isLevel: {
|
||||
// 是否是关卡页面触发
|
||||
type: Boolean,
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
projectTaskId: {
|
||||
@@ -547,7 +547,7 @@ export default {
|
||||
return isJpgOrPng && isLt2M;
|
||||
};
|
||||
const updateTask = (res) => {
|
||||
if (props.isLevel) {
|
||||
if (props.isLevel == 1) {
|
||||
RouterEditTask({
|
||||
chapterId: props.isactive,
|
||||
courseId: res.data.data.liveId,
|
||||
@@ -565,7 +565,7 @@ export default {
|
||||
.catch((err) => {
|
||||
console.log(err, 1111);
|
||||
});
|
||||
} else {
|
||||
} else if (props.isLevel == 2) {
|
||||
apiTask
|
||||
.addTask({
|
||||
courseId: res.data.data.liveId,
|
||||
@@ -584,6 +584,8 @@ export default {
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
} else if (props.isLevel == 3) {
|
||||
console.log("mobnku");
|
||||
}
|
||||
};
|
||||
//创建直播
|
||||
@@ -743,9 +745,11 @@ export default {
|
||||
padding-right: 30px;
|
||||
flex: 1;
|
||||
border-right: 1px solid #e8e8e8;
|
||||
margin-top: 32px;
|
||||
.main_item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 32px;
|
||||
margin-bottom: 32px;
|
||||
.signbox {
|
||||
width: 120px;
|
||||
|
||||
@@ -8,8 +8,9 @@
|
||||
@after-visible-change="afterVisibleChange"
|
||||
>
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
<div class="headerTitle">添加在线</div>
|
||||
<div class="header">
|
||||
<div v-if="edit" class="headerTitle">编辑在线</div>
|
||||
<div v-else class="headerTitle">添加在线</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@@ -23,7 +24,7 @@
|
||||
<div class="ipt_name">课程编号:</div>
|
||||
<div class="fi_input">
|
||||
<a-input
|
||||
v-model:value="value1"
|
||||
v-model:value="inputV1"
|
||||
style="width: 240px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入项目名称"
|
||||
/>
|
||||
@@ -48,7 +49,7 @@
|
||||
<div class="search"></div>
|
||||
<div class="btnText">搜索</div>
|
||||
</div>
|
||||
<div class="btn btn2">
|
||||
<div class="btn btn2" @click="resetOnline()">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">重置</div>
|
||||
</div>
|
||||
@@ -75,11 +76,14 @@
|
||||
(_record, index) => (index % 2 === 1 ? 'table-striped' : null)
|
||||
"
|
||||
:row-selection="rowSelection"
|
||||
:columns="columns1"
|
||||
:data-source="tableData1"
|
||||
:columns="tableDataFunc()"
|
||||
:data-source="tableData"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
expandRowByClick="true"
|
||||
this.getMilitaryDeployment()
|
||||
@expand="expandTable"
|
||||
:pagination="false"
|
||||
filterMultiple:false
|
||||
/>
|
||||
<div class="pa">
|
||||
<a-pagination
|
||||
@@ -90,85 +94,25 @@
|
||||
:current="currentPage"
|
||||
:total="tableDataTotal"
|
||||
class="pagination"
|
||||
@change="handelChangePage"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_btns">
|
||||
<button class="btn1">取消</button>
|
||||
<button class="btn2">确定</button>
|
||||
<button class="btn1" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="updateTask">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs, ref } from "vue";
|
||||
const options1 = ref([
|
||||
{
|
||||
value: "value1",
|
||||
label: "请选择状态",
|
||||
},
|
||||
]);
|
||||
const columns1 = [
|
||||
{
|
||||
title: "课程编号",
|
||||
width: "20%",
|
||||
dataIndex: "num",
|
||||
key: "num",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "名称",
|
||||
width: "20%",
|
||||
dataIndex: "name",
|
||||
key: "name",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "内容分类",
|
||||
width: "13%",
|
||||
dataIndex: "content",
|
||||
key: "content",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "授课教师",
|
||||
width: "13%",
|
||||
dataIndex: "teacher",
|
||||
key: "teacher",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "创建人",
|
||||
width: "13%",
|
||||
dataIndex: "creator",
|
||||
key: "creator",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "完成时间",
|
||||
width: "20%",
|
||||
dataIndex: "time",
|
||||
key: "time",
|
||||
align: "center",
|
||||
},
|
||||
];
|
||||
const rowSelection = ref({
|
||||
checkStrictly: false,
|
||||
onChange: (selectedRowKeys, selectedRows) => {
|
||||
console.log(
|
||||
`selectedRowKeys: ${selectedRowKeys}`,
|
||||
"selectedRows: ",
|
||||
selectedRows
|
||||
);
|
||||
},
|
||||
onSelect: (record, selected, selectedRows) => {
|
||||
console.log(record, selected, selectedRows);
|
||||
},
|
||||
onSelectAll: (selected, selectedRows, changeRows) => {
|
||||
console.log(selected, selectedRows, changeRows);
|
||||
},
|
||||
});
|
||||
import { reactive, toRefs, onMounted } from "vue";
|
||||
import * as api from "../../api/indexInvist.js";
|
||||
import * as apiTask from "../../api/indexTaskadd";
|
||||
import { message } from "ant-design-vue";
|
||||
import { RouterEditTask } from "@/api/indexTask";
|
||||
import dayjs from "dayjs";
|
||||
export default {
|
||||
name: "AddOnline",
|
||||
props: {
|
||||
@@ -176,109 +120,229 @@ export default {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
EditInvistId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
edit: { // 是否为编辑
|
||||
type: Boolean,
|
||||
default: null,
|
||||
},
|
||||
projectId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
chooseStageId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
routerTaskId: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
isLevel: { // 是否是关卡页面触发
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
projectTaskId: { // 要编辑的projectId
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
routerId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
isactive: {
|
||||
type: Number,
|
||||
default: null,
|
||||
}
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
tableData1: [
|
||||
inputV1:"",
|
||||
options1 : [
|
||||
{
|
||||
key: "1",
|
||||
num: "JDF2022071100001",
|
||||
name: "时间管理课程",
|
||||
content: "通用力",
|
||||
teacher: "BOE教师",
|
||||
creator: "管理员",
|
||||
time: "2022-10-31 23:12:00",
|
||||
},
|
||||
{
|
||||
key: "2",
|
||||
num: "JDF2022071100001",
|
||||
name: "管理能力课程",
|
||||
content: "领导力",
|
||||
teacher: "BOE教师",
|
||||
creator: "管理员",
|
||||
time: "2022-10-31 23:12:00",
|
||||
},
|
||||
{
|
||||
key: "3",
|
||||
num: "JDF2022071100001",
|
||||
name: "快速换模SMED",
|
||||
content: "通用力",
|
||||
teacher: "BOE教师",
|
||||
creator: "管理员",
|
||||
time: "2022-10-31 23:12:00",
|
||||
},
|
||||
{
|
||||
key: "4",
|
||||
num: "JDF2022071100001",
|
||||
name: "巧妙对话人见人夸",
|
||||
content: "领导力",
|
||||
teacher: "BOE教师",
|
||||
creator: "管理员",
|
||||
time: "2022-10-31 23:12:00",
|
||||
},
|
||||
{
|
||||
key: "5",
|
||||
num: "JDF2022071100001",
|
||||
name: "管理能力课程",
|
||||
content: "领导力",
|
||||
teacher: "BOE教师",
|
||||
creator: "管理员",
|
||||
time: "2022-10-31 23:12:00",
|
||||
},
|
||||
{
|
||||
key: "6",
|
||||
num: "JDF2022071100001",
|
||||
name: "时间管理课程",
|
||||
content: "领导力",
|
||||
teacher: "BOE教师",
|
||||
creator: "管理员",
|
||||
time: "2022-10-31 23:12:00",
|
||||
},
|
||||
{
|
||||
key: "7",
|
||||
num: "JDF2022071100001",
|
||||
name: "时间管理课程",
|
||||
content: "领导力",
|
||||
teacher: "BOE教师",
|
||||
creator: "管理员",
|
||||
time: "2022-10-31 23:12:00",
|
||||
},
|
||||
{
|
||||
key: "8",
|
||||
num: "JDF2022071100001",
|
||||
name: "时间管理课程",
|
||||
content: "领导力",
|
||||
teacher: "BOE教师",
|
||||
creator: "管理员",
|
||||
time: "2022-10-31 23:12:00",
|
||||
},
|
||||
{
|
||||
key: "9",
|
||||
num: "JDF2022071100001",
|
||||
name: "时间管理课程",
|
||||
content: "领导力",
|
||||
teacher: "BOE教师",
|
||||
creator: "管理员",
|
||||
time: "2022-10-31 23:12:00",
|
||||
value: "value1",
|
||||
label: "未完成",
|
||||
},
|
||||
],
|
||||
time: undefined,
|
||||
assessmentId:null,
|
||||
assessmentName:"",
|
||||
tableData: [ ],
|
||||
currentPage: 1,
|
||||
tableDataTotal: 100,
|
||||
tableDataTotal: 0,
|
||||
pageSize: 10,
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:addonlineVisible", false);
|
||||
ctx.emit("update:edit", false);
|
||||
};
|
||||
const afterVisibleChange = (bool) => {
|
||||
console.log("state", bool);
|
||||
};
|
||||
const tableDataFunc = () => {
|
||||
const columns = [
|
||||
{
|
||||
title: "课程编号",
|
||||
dataIndex: "num",
|
||||
key: "num",
|
||||
width: "200px",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "名称",
|
||||
dataIndex: "name",
|
||||
// width: "30%",
|
||||
key: "name",
|
||||
width: "100px",
|
||||
align: "left",
|
||||
className: "classify",
|
||||
}, {
|
||||
title: "内容分类",
|
||||
dataIndex: "content",
|
||||
key: "content",
|
||||
width: "80px",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "授课教师",
|
||||
dataIndex: "teacher",
|
||||
key: "teacher",
|
||||
width: "80px",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "创建人",
|
||||
dataIndex: "creator",
|
||||
key: "creator",
|
||||
width: "80px",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "完成时间",
|
||||
dataIndex: "time",
|
||||
key: "time",
|
||||
width: "200px",
|
||||
align: "center",
|
||||
},
|
||||
];
|
||||
return columns;
|
||||
};
|
||||
const rowSelection = {
|
||||
onSelect: (selectedRows, selected, selectedRowKeys) => {
|
||||
console.log(
|
||||
"selectedRowKeys", selectedRowKeys, "selectedRows", selectedRows, "selected", selected);
|
||||
console.log(selectedRows.assessmentId);
|
||||
state.assessmentId = selectedRows.assessmentId;
|
||||
state.assessmentName = selectedRows.name;
|
||||
},
|
||||
};
|
||||
const handelChangePage = (page, pageSize) => {
|
||||
state.currentPage = page;
|
||||
state.pageSize = pageSize;
|
||||
getAllOnlineText();
|
||||
};
|
||||
const getTableDate = (tableData) => {
|
||||
let data = tableData;
|
||||
let array = [];
|
||||
data.map((value, index) => {
|
||||
let obj = {
|
||||
key: index,
|
||||
assessmentId: value.assessmentId,
|
||||
num: value.essayQuestionVoList.length,
|
||||
name: value.assessmentName ? value.assessmentName : "-",
|
||||
creator: value.createUser ? value.createUser : "-",
|
||||
time: dayjs(value.createTime).format("YYYY-MM-DD"),
|
||||
};
|
||||
array.push(obj);
|
||||
});
|
||||
state.tableData = array;
|
||||
};
|
||||
//获取全部在线信息接口
|
||||
const getAllOnlineText = () => {
|
||||
api
|
||||
.queryAssessmentDetailList({
|
||||
assessmentName: "",
|
||||
pageNo: state.currentPage,
|
||||
pageSize: state.pageSize,
|
||||
})
|
||||
.then((res) => {
|
||||
let arr = res.data.data.rows;
|
||||
if (res.status === 200) {
|
||||
// console.log("获取在线信息", res.data.data);
|
||||
getTableDate(arr);
|
||||
state.tableDataTotal = Number(res.data.data.total);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取全部在线信息接口失败", err);
|
||||
// state.createLoading = false;
|
||||
});
|
||||
};
|
||||
const updateTask =()=>{
|
||||
if(props.isLevel ==1){
|
||||
RouterEditTask({
|
||||
chapterId: props.isactive,
|
||||
courseId: state.assessmentId,
|
||||
name: state.assessmentName,
|
||||
routerId: props.routerId,
|
||||
routerTaskId: props.routerTaskId || 0,
|
||||
type: 1,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res, 11111);
|
||||
message.success(`${props.edit ? '编辑' : '新增'}关卡任务成功`)
|
||||
ctx.emit("changeData", false);
|
||||
closeDrawer();
|
||||
state.addLoading = false;
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err, 1111);
|
||||
});
|
||||
}else if(props.isLevel ==2){
|
||||
console.log("=========projectTaskId",props.projectTaskId);
|
||||
apiTask
|
||||
.addTask({
|
||||
courseId: state.assessmentId,
|
||||
name: state.assessmentName,
|
||||
projectId: props.projectId,
|
||||
projectTaskId: props.projectTaskId || 0,
|
||||
stageId: props.chooseStageId,
|
||||
type: 1,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log("调用项目添加接口后111", res.data, 11111);
|
||||
ctx.emit("changeData", false);
|
||||
closeDrawer();
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err, 111111);
|
||||
});
|
||||
}else if(props.isLevel ==3){
|
||||
console.log("");
|
||||
}
|
||||
}
|
||||
//重置在线信息
|
||||
const resetOnline = () => {
|
||||
state.inputV1 = "";
|
||||
getAllOnlineText();
|
||||
};
|
||||
onMounted(() => {
|
||||
// createOnline();
|
||||
getAllOnlineText();
|
||||
});
|
||||
return {
|
||||
...toRefs(state),
|
||||
afterVisibleChange,
|
||||
closeDrawer,
|
||||
options1,
|
||||
columns1,
|
||||
tableDataFunc,
|
||||
rowSelection,
|
||||
handelChangePage,
|
||||
getAllOnlineText,
|
||||
getTableDate,
|
||||
updateTask,
|
||||
resetOnline,
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -309,6 +373,7 @@ export default {
|
||||
.main_items {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 32px;
|
||||
margin-bottom: 12px;
|
||||
flex-wrap: wrap;
|
||||
.mi_ipts {
|
||||
|
||||
@@ -131,13 +131,10 @@ export default {
|
||||
default: 0,
|
||||
},
|
||||
isLevel: { // 是否是关卡页面触发
|
||||
type: Boolean,
|
||||
default: null,
|
||||
},
|
||||
EditWorkId: { // 要编辑的workId
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
|
||||
projectTaskId: { // 要编辑的projectId
|
||||
type: Number,
|
||||
default: null,
|
||||
@@ -186,8 +183,8 @@ export default {
|
||||
// message.error("handleFinishFailed");
|
||||
};
|
||||
const updateTask =(res)=>{
|
||||
console.log("jinlaile=================",res.data.data.linkId,props.isLevel,props.isactive,props.routerId,props.routerTaskId)
|
||||
if(props.isLevel){
|
||||
|
||||
if(props.isLevel ==1){
|
||||
RouterEditTask({
|
||||
chapterId: props.isactive,
|
||||
courseId: res.data.data.linkId,
|
||||
@@ -206,7 +203,7 @@ export default {
|
||||
.catch((err) => {
|
||||
console.log(err, 1111);
|
||||
});
|
||||
}else{
|
||||
}else if(props.isLevel ==2){
|
||||
apiTask
|
||||
.addTask({
|
||||
courseId:res.data.data.linkId,
|
||||
@@ -224,6 +221,8 @@ export default {
|
||||
.catch((err) => {
|
||||
console.log(err, 111111);
|
||||
});
|
||||
}else if(props.isLevel ==3){
|
||||
console.log("");
|
||||
}
|
||||
}
|
||||
//创建外链
|
||||
@@ -315,6 +314,7 @@ export default {
|
||||
padding-right: 30px;
|
||||
flex: 1;
|
||||
border-right: 1px solid #e8e8e8;
|
||||
margin-top:32px;
|
||||
.main_item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -200,29 +200,14 @@
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
<script>
|
||||
<script>
|
||||
import { reactive, ref, toRefs } from "vue";
|
||||
import {message} from"ant-design-vue";
|
||||
import {createExamination,queryExaminationDetailById,updateExamination} from "@/api/indexExam"
|
||||
import { ProjectEditTask, RouterEditTask } from "@/api/indexTask"
|
||||
|
||||
import dayjs from 'dayjs';
|
||||
const rowSelection = ref({
|
||||
checkStrictly: false,
|
||||
onChange: (selectedRowKeys, selectedRows) => {
|
||||
console.log(
|
||||
`selectedRowKeys: ${selectedRowKeys}`,
|
||||
"selectedRows: ",
|
||||
selectedRows
|
||||
);
|
||||
},
|
||||
onSelect: (record, selected, selectedRows) => {
|
||||
console.log(record, selected, selectedRows);
|
||||
},
|
||||
onSelectAll: (selected, selectedRows, changeRows) => {
|
||||
console.log(selected, selectedRows, changeRows);
|
||||
},
|
||||
});
|
||||
|
||||
export default {
|
||||
name: "AddTest",
|
||||
// components: {
|
||||
@@ -257,7 +242,7 @@ export default {
|
||||
default: null,
|
||||
},
|
||||
isLevel: { // 是否是关卡页面触发
|
||||
type: Boolean,
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
projectTaskId: { // 要编辑的projectId
|
||||
@@ -460,118 +445,51 @@ export default {
|
||||
}
|
||||
const updateTest = () => {
|
||||
state.addLoading = true;
|
||||
let obj = {
|
||||
"examinationDuration": formState.examinationDuration,
|
||||
"examinationEndTime": dayjs(formState.choosedTime[1]).format("YYYY-MM-DD"),
|
||||
"examinationExplain": formState.examinationExplain,
|
||||
"examinationId": props.edit?props.EditTestId : 0,
|
||||
"examinationLimit": formState.examinationLimit,
|
||||
"examinationName": formState.examinationName,
|
||||
"examinationPaperId": 0,
|
||||
"examinationPaperName": formState.choosedTest,
|
||||
"examinationStartTime": dayjs(formState.choosedTime[0]).format("YYYY-MM-DD"),
|
||||
"passLine": formState.passLine,
|
||||
"questionArrangement": formState.questionArrangement,
|
||||
"scoringModel": formState.scoringModel,
|
||||
"showAnalysis": formState.showAnalysis,
|
||||
"showAnswers": formState.showAnswers,
|
||||
}
|
||||
if(props.edit) { // 编辑任务
|
||||
myUpdateExamination()
|
||||
updateExamination(obj)
|
||||
.then((res)=>{
|
||||
updateTask(res);
|
||||
closeDrawer();
|
||||
}).catch(()=>{
|
||||
message.error(`编辑失败`)
|
||||
});
|
||||
}else { // 创建任务
|
||||
myCreateExamination()
|
||||
}
|
||||
createExamination(obj)
|
||||
.then((res)=>{
|
||||
updateTask(res);
|
||||
closeDrawer();
|
||||
}).catch(()=>{
|
||||
message.error(`编辑失败`)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const myUpdateExamination = () => {
|
||||
let obj = {
|
||||
"createTime": "",
|
||||
"createUser": 0,
|
||||
"examinationDuration": formState.examinationDuration,
|
||||
"examinationEndTime": dayjs(formState.choosedTime[1]).format("YYYY-MM-DD"),
|
||||
"examinationExplain": formState.examinationExplain,
|
||||
"examinationFlag": "",
|
||||
"examinationId": props.EditTestId,
|
||||
"examinationLimit": formState.examinationLimit,
|
||||
"examinationName": formState.examinationName,
|
||||
"examinationPaperId": 0,
|
||||
"examinationPaperName": formState.choosedTest,
|
||||
"examinationStartTime": dayjs(formState.choosedTime[0]).format("YYYY-MM-DD"),
|
||||
"examinationTag": "",
|
||||
"passLine": formState.passLine,
|
||||
"questionArrangement": formState.questionArrangement,
|
||||
"scoringModel": formState.scoringModel,
|
||||
"showAnalysis": formState.showAnalysis,
|
||||
"showAnswers": formState.showAnswers,
|
||||
"updateTime": "",
|
||||
"updateUser": 0
|
||||
}
|
||||
updateExamination(obj).then((res)=>{
|
||||
console.log(res);
|
||||
// 如果是关卡页面进入 ---------------------------------
|
||||
if(props.isLevel) {
|
||||
myRouterEditTask(res.data.data.examinationId)
|
||||
}else {
|
||||
myProjectEditTask(res.data.data.examinationId)
|
||||
}
|
||||
}).catch(()=>{
|
||||
message.error(`编辑失败`)
|
||||
})
|
||||
|
||||
}
|
||||
const myCreateExamination = () => {
|
||||
let obj = {
|
||||
"createTime": "",
|
||||
"createUser": 0,
|
||||
"examinationDuration": formState.examinationDuration,
|
||||
"examinationEndTime": dayjs(formState.choosedTime[1]).format("YYYY-MM-DD"),
|
||||
"examinationExplain": formState.examinationExplain,
|
||||
"examinationFlag": "",
|
||||
"examinationId": 0,
|
||||
"examinationLimit": formState.examinationLimit,
|
||||
"examinationName": formState.examinationName,
|
||||
"examinationPaperId": 0,
|
||||
"examinationPaperName": formState.choosedTest,
|
||||
"examinationStartTime": dayjs(formState.choosedTime[0]).format("YYYY-MM-DD"),
|
||||
"examinationTag": "",
|
||||
"passLine": formState.passLine,
|
||||
"questionArrangement": formState.questionArrangement,
|
||||
"scoringModel": formState.scoringModel,
|
||||
"showAnalysis": formState.showAnalysis,
|
||||
"showAnswers": formState.showAnswers,
|
||||
"updateTime": "",
|
||||
"updateUser": 0
|
||||
}
|
||||
createExamination(obj).then((res)=>{
|
||||
if(props.isLevel) {
|
||||
myRouterEditTask(res.data.data.examinationId)
|
||||
}else {
|
||||
myProjectEditTask(res.data.data.examinationId)
|
||||
}
|
||||
}).catch((err)=>{
|
||||
message.error(`添加失败${err}`)
|
||||
})
|
||||
}
|
||||
const myProjectEditTask = (testId) => {
|
||||
let editObj = {
|
||||
"courseId": testId,
|
||||
"duration": 50,
|
||||
"flag": true,
|
||||
"name": formState.examinationName,
|
||||
"projectId": props.projectId,
|
||||
"projectTaskId": props.projectTaskId || null,
|
||||
"stageId": props.chooseStageId,
|
||||
"type": 5
|
||||
}
|
||||
// 新增编辑或新增项目
|
||||
ProjectEditTask(editObj).then(res => {
|
||||
console.log(` 编辑项目成功的打印 ${res}`);
|
||||
message.success(`${props.EditTestId? '编辑' : '新增'}阶段任务成功`)
|
||||
ctx.emit("changeData", false);
|
||||
state.addLoading = false;
|
||||
closeDrawer();
|
||||
}).catch(err => {
|
||||
message.error(`${props.EditTestId? '编辑' : '新增'}阶段任务失败`)
|
||||
console.log(` 编辑项目失败的打印 ${err}`);
|
||||
})
|
||||
}
|
||||
|
||||
const myRouterEditTask = (testId) => {
|
||||
let editObj1 = {
|
||||
const updateTask = (res) => {
|
||||
if(props.isLevel == 1){
|
||||
let editObj1 = {
|
||||
"chapterId": props.isactive,
|
||||
"courseId": testId,
|
||||
"duration": 30,
|
||||
"flag": true,
|
||||
"name": formState.examinationName,
|
||||
"courseId": res.data.data.examinationId,
|
||||
"name": res.data.data.examinationName,
|
||||
"routerId": props.routerId,
|
||||
"routerTaskId": props.routerTaskId || 0,
|
||||
"type": 5
|
||||
}
|
||||
|
||||
RouterEditTask(editObj1).then(res => {
|
||||
console.log(` 编辑关卡成功的打印 ${res}`);
|
||||
message.success(`${props.edit ? '编辑' : '新增'}关卡任务成功`)
|
||||
@@ -581,7 +499,28 @@ export default {
|
||||
}).catch(err => {
|
||||
message.error(`${props.edit ? '编辑' : '新增'}关卡任务失败`)
|
||||
console.log(` 编辑关卡失败的打印 ${err}`);
|
||||
})
|
||||
});
|
||||
}else if(props.isLevel ==2){
|
||||
let editObj = {
|
||||
"courseId": res.data.data.examinationId,
|
||||
"duration": 0,
|
||||
"name": res.data.data.examinationName,
|
||||
"projectId": props.projectId,
|
||||
"projectTaskId": props.projectTaskId || 0,
|
||||
"stageId": props.chooseStageId,
|
||||
"type": 5
|
||||
}
|
||||
// 新增编辑或新增项目
|
||||
ProjectEditTask(editObj).then(() => {
|
||||
message.success(`${props.EditTestId? '编辑' : '新增'}阶段任务成功`)
|
||||
ctx.emit("changeData", false);
|
||||
}).catch(() => {
|
||||
message.error(`${props.EditTestId? '编辑' : '新增'}阶段任务失败`)
|
||||
});
|
||||
}else if(props.isLevel ==3){
|
||||
console.log("");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const cloradio1 = (value) => {
|
||||
@@ -608,7 +547,6 @@ export default {
|
||||
formState,
|
||||
afterVisibleChange,
|
||||
closeDrawer,
|
||||
rowSelection,
|
||||
cloradio1,
|
||||
cloradio2,
|
||||
cloradio3,
|
||||
@@ -628,7 +566,7 @@ export default {
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
<style lang="scss">
|
||||
.ant-table-striped :deep(.table-striped) td {
|
||||
background-color: #fafafa !important;
|
||||
}
|
||||
@@ -659,6 +597,7 @@ export default {
|
||||
.main_item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 32px;
|
||||
margin-bottom: 32px;
|
||||
.signbox {
|
||||
width: 120px;
|
||||
|
||||
@@ -75,8 +75,7 @@
|
||||
<cre-vote
|
||||
v-model:crevoteVisible="crevotevisible"
|
||||
@getData="getStemId"
|
||||
v-model:voteStemId="voteStemId"
|
||||
v-model:editStem="editStem"
|
||||
v-model:ballotId="ballotId"
|
||||
/>
|
||||
</div>
|
||||
<!-- 创建投票侧弹窗 -->
|
||||
@@ -122,42 +121,21 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_btns">
|
||||
<button class="btn1">取消</button>
|
||||
<button class="btn2" @click="creoredi()">确定</button>
|
||||
<button class="btn1" @click="closeDrawer()">取消</button>
|
||||
<button class="btn2" @click="updateVoteInfo()">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs, ref } from "vue";
|
||||
import CreVote from "../../components/drawers/CreVote.vue";
|
||||
import { reactive, toRefs} from "vue";
|
||||
import CreVote from "./CreVote.vue";
|
||||
import * as api from "../../api/indexVote";
|
||||
import * as apitaskadd from "../../api/indexTaskadd";
|
||||
import { message } from "ant-design-vue";
|
||||
import { toDate } from "../../api/method";
|
||||
import { RouterEditTask } from "@/api/indexTask";
|
||||
const options1 = ref([
|
||||
{
|
||||
value: "value1",
|
||||
label: "请选择状态",
|
||||
},
|
||||
]);
|
||||
const rowSelection = ref({
|
||||
checkStrictly: false,
|
||||
onChange: (selectedRowKeys, selectedRows) => {
|
||||
console.log(
|
||||
`selectedRowKeys: ${selectedRowKeys}`,
|
||||
"selectedRows: ",
|
||||
selectedRows
|
||||
);
|
||||
},
|
||||
onSelect: (record, selected, selectedRows) => {
|
||||
console.log(record, selected, selectedRows);
|
||||
},
|
||||
onSelectAll: (selected, selectedRows, changeRows) => {
|
||||
console.log(selected, selectedRows, changeRows);
|
||||
},
|
||||
});
|
||||
import dayjs from "dayjs";
|
||||
import * as apiTask from "../../api/indexTaskadd";
|
||||
|
||||
|
||||
export default {
|
||||
name: "AddVote",
|
||||
@@ -173,9 +151,9 @@ export default {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
learn: {
|
||||
voteId: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
default: null,
|
||||
},
|
||||
projectId: {
|
||||
type: Number,
|
||||
@@ -185,83 +163,71 @@ export default {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
voteId: {
|
||||
routerTaskId: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
isLevel: { // 是否是关卡页面触发
|
||||
type: Boolean,
|
||||
default: null,
|
||||
},
|
||||
projectTaskId: { // 要编辑的projectId
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
ballotId: {
|
||||
routerId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
isactive: {
|
||||
type: Number,
|
||||
default: null,
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
inputV1: "",
|
||||
textV1: "",
|
||||
creVote: false,
|
||||
crevotevisible: false,
|
||||
time: undefined,
|
||||
startTime:"",
|
||||
endTime:"",
|
||||
basevote: "",
|
||||
endTimes: "",
|
||||
startTimes: "",
|
||||
ascriptionId: "",
|
||||
voteStemId: null,
|
||||
voteId:"",
|
||||
voteStemName:"",
|
||||
ballotName: "",
|
||||
editStem: false, //编辑状态
|
||||
ballotId: "", //题干id
|
||||
ballotId: 0, //题干id
|
||||
optionId: "", //删除,修改选项id
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
state.inputV1 = "",
|
||||
state.inputV1 = "",
|
||||
state.textV1 = "",
|
||||
state.startTimes = "",
|
||||
state.time = undefined,
|
||||
state.endTimes = "",
|
||||
state.basevote = "",
|
||||
ctx.emit("update:addvoteVisible", false);
|
||||
ctx.emit("update:edit", false);
|
||||
};
|
||||
const afterVisibleChange = (bool) => {
|
||||
console.log("state", bool);
|
||||
// if (props.edit == true) {
|
||||
// queryVoteText()
|
||||
// }
|
||||
queryVoteInfo();
|
||||
};
|
||||
const showDrawerCreVote = () => {
|
||||
state.crevotevisible = true;
|
||||
if (state.creVote == true) {
|
||||
state.editStem = true
|
||||
}
|
||||
};
|
||||
const getStemId = (data) => {
|
||||
state.ballotName = data.ballotName;
|
||||
state.voteStemName = data.voteStemName;
|
||||
state.voteStemId = Number(data.voteStemId);
|
||||
state.ballotId = Number(data.ballotId)
|
||||
state.creVote = data.creVote;
|
||||
console.log('state.voteStemId', state.voteStemId);
|
||||
console.log('state.voteStemId', state.creVote);
|
||||
state.ballotId =data.ballotId;
|
||||
}
|
||||
//暂时没用 之前给子用传参来着
|
||||
// const changeVData = (data) => {
|
||||
// console.log("111", data);
|
||||
// state.creVote = data.creVote;
|
||||
// state.ascriptionId = data.ascriptionId;
|
||||
// state.voteStemId = data.voteStemId;
|
||||
// state.voteStemName = data.voteStemName;
|
||||
// console.log("222", state.creVote);
|
||||
// console.log("333", state.ascriptionId);
|
||||
// };
|
||||
|
||||
const delBox = () => {
|
||||
state.creVote = false;
|
||||
};
|
||||
|
||||
const updateTableData = (data) => {
|
||||
console.log(data, 'data');
|
||||
}
|
||||
|
||||
//删除题干信息接口
|
||||
const dleVoteStem = () => {
|
||||
let objdelstem = {
|
||||
@@ -275,17 +241,68 @@ export default {
|
||||
})
|
||||
}
|
||||
|
||||
//新建还是编辑方法
|
||||
const creoredi = () => {
|
||||
if (props.eidt == false) {
|
||||
createVoteText()
|
||||
//根据投票id获取投票信息
|
||||
const queryVoteInfo = ()=>{
|
||||
/**
|
||||
let obj = {
|
||||
voteId:props.voteId
|
||||
}
|
||||
else {
|
||||
changeVoteText()
|
||||
.queryVoteText(obj)
|
||||
.then((res)=>{
|
||||
console.log('获取投票信息成功',res);
|
||||
state.inputV1 = res.data.data.voteName
|
||||
state.time = [dayjs(res.data.data.voteEndTime).format("YYYY-MM-DD"), dayjs(res.data.data.voteEndTime).format("YYYY-MM-DD")]
|
||||
state.textV1 = res.data.data.voteExplain
|
||||
state.baseVote = res.data.data.baseVote
|
||||
state.ascriptionId = res.data.data.ascriptionId
|
||||
state.ballotId = res.data.data.ballotId
|
||||
})
|
||||
.catch((err)=>{
|
||||
console.log('获取投票信息失败',err);
|
||||
})
|
||||
**/
|
||||
|
||||
}
|
||||
const updateToTask =(res)=>{
|
||||
if(props.isLevel){
|
||||
RouterEditTask({
|
||||
chapterId: props.isactive,
|
||||
courseId: res.data.data.voteId,
|
||||
name: res.data.data.voteName,
|
||||
routerId: props.routerId,
|
||||
routerTaskId: props.routerTaskId || 0,
|
||||
type: 12,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res, 11111);
|
||||
message.success(`${props.edit ? '编辑' : '新增'}关卡任务成功`)
|
||||
ctx.emit("changeData", false);
|
||||
state.addLoading = false;
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err, 1111);
|
||||
});
|
||||
}else{
|
||||
apiTask
|
||||
.addTask({
|
||||
courseId:res.data.data.voteId,
|
||||
name: res.data.data.voteName,
|
||||
projectId: props.projectId,
|
||||
projectTaskId: props.projectTaskId || 0,
|
||||
stageId: props.chooseStageId,
|
||||
type: 12,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log("调用项目添加接口后111", res.data, 11111);
|
||||
ctx.emit("changeData", false);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err, 111111);
|
||||
});
|
||||
}
|
||||
}
|
||||
//创建投票信息
|
||||
const createVoteText = () => {
|
||||
//修改投票信息接口
|
||||
const updateVoteInfo = () => {
|
||||
if (!state.inputV1) {
|
||||
message.destroy();
|
||||
return message.info("请输入投票名称");
|
||||
@@ -294,137 +311,47 @@ export default {
|
||||
if (state.basevote == "") {
|
||||
state.basevote = 1;
|
||||
}
|
||||
|
||||
if (state.time != undefined) {
|
||||
state.endTimes = toDate(
|
||||
new Date(state.time[0].$d).getTime() / 1000,
|
||||
"Y-M-D"
|
||||
);
|
||||
state.startTimes = toDate(
|
||||
new Date(state.time[1].$d).getTime() / 1000,
|
||||
"Y-M-D"
|
||||
);
|
||||
if(state.time != undefined){
|
||||
state.startTime = dayjs(state.time[0]).format("YYYY-MM-DD");
|
||||
state.endTime = dayjs(state.time[1]).format("YYYY-MM-DD");
|
||||
}
|
||||
|
||||
|
||||
let obj = {
|
||||
voteId: props.edit?state.voteId : 0,
|
||||
voteName: state.inputV1,
|
||||
voteStartTime: state.startTime,
|
||||
voteEndTime: state.endTime,
|
||||
ballotId: state.ballotId,
|
||||
baseVote: state.basevote,
|
||||
createTime: "",
|
||||
createUser: 0,
|
||||
updateTime: "",
|
||||
updateUser: 0,
|
||||
voteEndTime: state.endTimes,
|
||||
voteExplain: state.textV1,
|
||||
voteFlag: "",
|
||||
voteId: 0,
|
||||
voteName: state.inputV1,
|
||||
voteStartTime: state.startTimes,
|
||||
voteTag: ""
|
||||
|
||||
};
|
||||
api
|
||||
.createVote(obj)
|
||||
.then((res) => {
|
||||
console.log("创建成功123", res);
|
||||
message.success("创建成功");
|
||||
let changeVoteId = {
|
||||
voteId: res.data.data.voteId,
|
||||
ballotId: state.ballotId,
|
||||
}
|
||||
ctx.emit("getData", changeVoteId);
|
||||
closeDrawer();
|
||||
if (props.learn == 0)
|
||||
//添加到项目任务列表
|
||||
apitaskadd
|
||||
.addTask({
|
||||
courseId: 0,
|
||||
duration: 0,
|
||||
flag: true,
|
||||
name: obj.voteName,
|
||||
projectId: props.projectId,
|
||||
projectTaskId: 0,
|
||||
stageId: props.chooseStageId,
|
||||
type: 12,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log("调用项目添加接口后", res.data);
|
||||
//自定义事件给父组件传值
|
||||
ctx.emit("changeData", false);
|
||||
//重新获取任务列表
|
||||
// apiTask.getTask({ projectId: 28 });
|
||||
// router.push("/taskadd");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
else {
|
||||
let editObj1 = {
|
||||
chapterId: 36,
|
||||
courseId: 0,
|
||||
duration: 0,
|
||||
flag: true,
|
||||
name: obj.voteName,
|
||||
routerId: 92,
|
||||
routerTaskId: 0,
|
||||
type: 12,
|
||||
};
|
||||
RouterEditTask(editObj1);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("创建失败", err);
|
||||
});
|
||||
};
|
||||
|
||||
//根据投票id获取投票信息
|
||||
// const queryVoteText = ()=>{
|
||||
// let objqurvt = {
|
||||
// voteStemId:state.voteStemId
|
||||
// //没有接口 个人认为应该是这个id
|
||||
// }
|
||||
// api
|
||||
// //目前没接口 大概写的
|
||||
// .queryVoteText(objqurvt)
|
||||
// .then((res)=>{
|
||||
// console.log('获取投票信息成功',res);
|
||||
// state.inputV1 = res.data.data.voteName
|
||||
// state.endTimes = res.data.data.voteEndTime
|
||||
// state.startTimes = res.data.data.voteStartTime
|
||||
// state.textV1 = res.data.data.voteExplain
|
||||
// state.baseVote = res.data.data.baseVote
|
||||
// state.ascriptionId = res.data.data.ascriptionId
|
||||
// state.ballotId = res.data.data.ballotId
|
||||
// })
|
||||
// .catch((err)=>{
|
||||
// console.log('获取投票信息失败',err);
|
||||
// })
|
||||
// }
|
||||
//修改投票信息接口
|
||||
const changeVoteText = () => {
|
||||
let objcvt = {
|
||||
ballotId: state.ballotId,
|
||||
baseVote: state.basevote,
|
||||
createTime: "",
|
||||
createUser: 0,
|
||||
updateTime: "",
|
||||
updateUser: 0,
|
||||
voteEndTime: state.endTimes,
|
||||
voteExplain: state.textV1,
|
||||
voteFlag: "",
|
||||
voteId: state.voteId,
|
||||
voteName: state.inputV1,
|
||||
voteStartTime: state.startTimes,
|
||||
voteTag: ""
|
||||
voteExplain: state.textV1,
|
||||
createUser:0,
|
||||
updateUser:0,
|
||||
voteTag:"",
|
||||
}
|
||||
api
|
||||
.editVote(objcvt)
|
||||
if(props.edit){
|
||||
api
|
||||
.editVote(obj)
|
||||
.then((res) => {
|
||||
updateToTask(res);
|
||||
closeDrawer();
|
||||
console.log('修改投票信息成功', res);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log('修改投票信息失败', err);
|
||||
})
|
||||
}else{
|
||||
api
|
||||
.createVote(obj)
|
||||
.then((res) => {
|
||||
updateToTask(res);
|
||||
closeDrawer();
|
||||
console.log('创建投票信息成功', res);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log('创建投票信息失败', err);
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
return {
|
||||
...toRefs(state),
|
||||
@@ -432,16 +359,11 @@ export default {
|
||||
afterVisibleChange,
|
||||
closeDrawer,
|
||||
getStemId,
|
||||
// changeVData,
|
||||
rowSelection,
|
||||
options1,
|
||||
queryVoteInfo,
|
||||
dleVoteStem,
|
||||
creoredi,
|
||||
createVoteText,
|
||||
changeVoteText,
|
||||
updateVoteInfo,
|
||||
delBox,
|
||||
// queryVoteText,
|
||||
updateTableData,
|
||||
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -474,9 +396,11 @@ export default {
|
||||
padding-right: 30px;
|
||||
flex: 1;
|
||||
border-right: 1px solid #e8e8e8;
|
||||
margin-top: 32px;
|
||||
.main_item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 32px;
|
||||
margin-bottom: 32px;
|
||||
.signbox {
|
||||
width: 120px;
|
||||
@@ -123,9 +123,9 @@ export default {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
editStem: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
ballotId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
@@ -204,13 +204,13 @@ export default {
|
||||
};
|
||||
const afterVisibleChange = (bool) => {
|
||||
console.log("state", bool);
|
||||
if (props.editStem == true) {
|
||||
if (props.ballotId != 0) {
|
||||
queryStemText()
|
||||
}
|
||||
};
|
||||
//创建题干还是编辑题干
|
||||
const creoredi = () => {
|
||||
if (props.eidtStem == false) {
|
||||
if (props.ballotId) {
|
||||
createQueTit()
|
||||
}
|
||||
else {
|
||||
@@ -320,13 +320,11 @@ export default {
|
||||
}
|
||||
//根据id获取题干信息
|
||||
const queryStemText = () => {
|
||||
let objqurst = {
|
||||
stemId: 1,
|
||||
ballotId: "",
|
||||
}
|
||||
api
|
||||
.queryStemByStemId(objqurst)
|
||||
.queryStemByStemId({ballotId:props.ballotId})
|
||||
.then((res) => {
|
||||
|
||||
|
||||
console.log('获取题干信息成功', res);
|
||||
state.inputV1 = res.data.data.voteName
|
||||
})
|
||||
@@ -435,7 +433,9 @@ export default {
|
||||
.main_item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 32px;
|
||||
margin-bottom: 32px;
|
||||
margin-top: 32px;;
|
||||
.signbox {
|
||||
width: 120px;
|
||||
display: flex;
|
||||
|
||||
@@ -121,169 +121,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="2" tab="添加组织" force-render>
|
||||
<div
|
||||
:style="{ height: screenHeight - 235 + 'px' }"
|
||||
style="overflow-y: auto"
|
||||
>
|
||||
<div class="tab2">
|
||||
<div class="nameinp">
|
||||
<div class="namee">组织:</div>
|
||||
<a-input
|
||||
v-model:value="com"
|
||||
style="width: 230px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入组织"
|
||||
/>
|
||||
</div>
|
||||
<div class="btns">
|
||||
<div class="btn1" @click="searchOrg">
|
||||
<div class="img1">
|
||||
<img
|
||||
src="../../assets/images/courseManage/search0.png"
|
||||
/>
|
||||
</div>
|
||||
<div class="wz">搜索</div>
|
||||
</div>
|
||||
<div class="btn2">
|
||||
<div class="img2">
|
||||
<img
|
||||
src="../../assets/images/courseManage/reset1.png"
|
||||
/>
|
||||
</div>
|
||||
<div class="wz">重置</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="t1">
|
||||
<div class="organize">姓名:</div>
|
||||
<a-input
|
||||
v-model:value="nameadd"
|
||||
style="width: 200px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入姓名"
|
||||
/>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="boeTree">
|
||||
<div class="boeTreeTitle">BOE组织树</div>
|
||||
|
||||
<a-tree
|
||||
class="treeMain treeMain2"
|
||||
:style="{ height: screenHeight - 430 + 'px' }"
|
||||
dropdownClassName="changetreedropdownboe"
|
||||
defaultExpandAll
|
||||
:dropdown-style="{
|
||||
maxHeight: '600px',
|
||||
}"
|
||||
placeholder="BOE组织树"
|
||||
allow-clear
|
||||
tree-default-expand-all
|
||||
:tree-data="treeData"
|
||||
@select="departmentSelect1"
|
||||
multiple
|
||||
v-model:selectedKeys="selectedKeys1"
|
||||
>
|
||||
<template #suffixIcon></template>
|
||||
</a-tree>
|
||||
<div
|
||||
class="boeTreeTitle"
|
||||
style="margin-top: 8px; cursor: pointer"
|
||||
@click="addOrgModal"
|
||||
>
|
||||
确认添加
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="3" tab="受众关联">
|
||||
<div
|
||||
:style="{ height: screenHeight - 235 + 'px' }"
|
||||
style="overflow-y: auto"
|
||||
>
|
||||
<div class="tab1">
|
||||
<div class="t1">
|
||||
<!-- <div class="nameinp">
|
||||
<div class="namee">选择受众:</div>
|
||||
<div class="select">
|
||||
<a-select
|
||||
v-model:value="choosevalue"
|
||||
style="width: 200px; border-radius: 8px"
|
||||
placeholder="请选择受众群体"
|
||||
:options="organizeList1"
|
||||
/>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="t1" style="margin-top: 10px">
|
||||
<div class="organize">受众名称:</div>
|
||||
<a-input
|
||||
v-model:value="nameaddd"
|
||||
style="width: 260px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入受众名称"
|
||||
/>
|
||||
</div>
|
||||
<div class="btns">
|
||||
<div class="btn1">
|
||||
<div class="img1">
|
||||
<img
|
||||
src="../../assets/images/courseManage/search0.png"
|
||||
/>
|
||||
</div>
|
||||
<div class="wz">搜索</div>
|
||||
</div>
|
||||
<div class="btn2">
|
||||
<div class="img2">
|
||||
<img
|
||||
src="../../assets/images/courseManage/reset1.png"
|
||||
/>
|
||||
</div>
|
||||
<div class="wz">重置</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="line">
|
||||
<div class="inline">
|
||||
<div class="left1">
|
||||
<div class="img"></div>
|
||||
<div class="text" style="margin-left: 10px">已选择</div>
|
||||
<div class="text2">2</div>
|
||||
<div class="text">项</div>
|
||||
<div class="text3">列表选项总计:</div>
|
||||
<div class="text4">9条</div>
|
||||
</div>
|
||||
<div class="right1">清空</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="tableBox tabb" style="margin-top: 16px">
|
||||
<a-table
|
||||
style="border: 1px solid #f2f6fe"
|
||||
:columns="tablecolumns2"
|
||||
:data-source="tabledata2"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
expandRowByClick="true"
|
||||
:scroll="{ x: 500 }"
|
||||
@expand="expandTable"
|
||||
:pagination="false"
|
||||
:row-selection="{
|
||||
columnWidth: 30,
|
||||
selectedRowKeys: selectedRowKeys2,
|
||||
onChange: onSelectChange2,
|
||||
}"
|
||||
/>
|
||||
<div class="pa" style="margin-top: 20px">
|
||||
<a-pagination
|
||||
showSizeChanger="true"
|
||||
showQuickJumper="true"
|
||||
hideOnSinglePage="true"
|
||||
:pageSize="pageSize2"
|
||||
:current="currentPage2"
|
||||
:total="tableDataTotal2"
|
||||
class="pagination"
|
||||
v-if="tabledata2 > 10"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
|
||||
</a-tabs>
|
||||
</div>
|
||||
</div>
|
||||
@@ -356,134 +194,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
<div class="tit">添加组织</div>
|
||||
<div style="position: relative; min-height: 180px">
|
||||
<div
|
||||
style="position: relative; height: 160px"
|
||||
class="selectedsBox"
|
||||
id="selectedsBox1"
|
||||
>
|
||||
<div class="selecteds" id="selecteds1">
|
||||
<!-- 遍历生成 -->
|
||||
<div
|
||||
class="chose"
|
||||
v-for="item in chooseorganization1"
|
||||
:key="item.key"
|
||||
>
|
||||
<div>{{ item.value }}</div>
|
||||
<div class="ch" @click="deleteChoosePeople1(item)"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="chose"
|
||||
style="
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-right: 20px;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
color: #409eff;
|
||||
line-height: 22px;
|
||||
"
|
||||
v-if="showMore1"
|
||||
@click="morePeopleShow1"
|
||||
>
|
||||
<div>
|
||||
查看更多
|
||||
<img
|
||||
style="width: 10px; height: 12px; margin-top: -2px"
|
||||
src="../../assets/images/projectadd/go.png"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="chose"
|
||||
style="
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-right: 20px;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
color: #409eff;
|
||||
line-height: 22px;
|
||||
"
|
||||
v-if="showHidden1"
|
||||
@click="morePeopleHidden1"
|
||||
>
|
||||
<div>
|
||||
收起
|
||||
<img
|
||||
style="width: 10px; height: 12px; margin-top: -2px"
|
||||
src="../../assets/images/projectadd/pickUp.png"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
<div class="tit">受众关联</div>
|
||||
<div
|
||||
style="position: relative; min-height: 180px; padding-bottom: 40px"
|
||||
>
|
||||
<div style="height: 160px" class="selectedsBox" id="selectedsBox2">
|
||||
<div class="selecteds" id="selecteds2">
|
||||
<!-- 遍历生成 -->
|
||||
<div
|
||||
class="chose"
|
||||
v-for="item in relationpeople"
|
||||
:key="item.key"
|
||||
>
|
||||
<div>{{ item.name }}</div>
|
||||
<div class="ch" @click="deleteRelationPeople(item)"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="chose"
|
||||
style="
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-right: 20px;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
color: #409eff;
|
||||
line-height: 22px;
|
||||
"
|
||||
v-if="showMore2"
|
||||
@click="morePeopleShow2"
|
||||
>
|
||||
<div>
|
||||
查看更多
|
||||
<img
|
||||
style="width: 10px; height: 12px; margin-top: -2px"
|
||||
src="../../assets/images/projectadd/go.png"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="chose"
|
||||
style="
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-right: 20px;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
color: #409eff;
|
||||
line-height: 22px;
|
||||
"
|
||||
v-if="showHidden2"
|
||||
@click="morePeopleHidden2"
|
||||
>
|
||||
<div>
|
||||
收起
|
||||
<img
|
||||
style="width: 10px; height: 12px; margin-top: -2px"
|
||||
src="../../assets/images/projectadd/pickUp.png"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnn">
|
||||
@@ -492,44 +203,15 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 确认添加部门弹窗 -->
|
||||
<a-modal
|
||||
v-model:visible="showOrgModal"
|
||||
:footer="null"
|
||||
wrapClassName="confirmAddOrg"
|
||||
centered="true"
|
||||
>
|
||||
<div class="delete">
|
||||
<div class="del_header"></div>
|
||||
<div class="del_main">
|
||||
<div class="header">
|
||||
<div class="icon"></div>
|
||||
<span>提示</span>
|
||||
<div class="close_exit" @click="closeOrgModal"></div>
|
||||
</div>
|
||||
<div class="body">
|
||||
<span>您确定要添加此组织吗</span>
|
||||
</div>
|
||||
<div class="del_btnbox">
|
||||
<div class="del_btn btn1" @click="closeOrgModal">
|
||||
<div class="btnText">取消</div>
|
||||
</div>
|
||||
<div class="del_btn btn2" @click="addOrg">
|
||||
<div class="btnText">确定</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
<!-- 确认添加部门弹窗 -->
|
||||
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { reactive, toRefs, onMounted, onUnmounted } from "vue";
|
||||
import elementResizeDetectorMaker from "element-resize-detector";
|
||||
import { message } from "ant-design-vue";
|
||||
import { toDate } from "../../api/method";
|
||||
// import { message } from "ant-design-vue";
|
||||
// import { toDate } from "../../api/method";
|
||||
export default {
|
||||
name: "OwnPower",
|
||||
props: {
|
||||
@@ -885,136 +567,7 @@ export default {
|
||||
},
|
||||
],
|
||||
|
||||
//受众关联table数据
|
||||
tabledata2: [
|
||||
{
|
||||
key: 1,
|
||||
name: "学习受众",
|
||||
time: "1668410969",
|
||||
number: "20",
|
||||
type: "普通受众",
|
||||
},
|
||||
{
|
||||
key: 2,
|
||||
name: "案例受众",
|
||||
time: "1668324569",
|
||||
number: "10",
|
||||
type: "普通受众",
|
||||
},
|
||||
{
|
||||
key: 3,
|
||||
name: "学习受众",
|
||||
time: "1668238169",
|
||||
number: "20",
|
||||
type: "普通受众",
|
||||
},
|
||||
{
|
||||
key: 4,
|
||||
name: "显示受众",
|
||||
time: "1668133769",
|
||||
number: "30",
|
||||
type: "普通受众2",
|
||||
},
|
||||
{
|
||||
key: 5,
|
||||
name: "惯例受众",
|
||||
time: "1668047369",
|
||||
number: "50",
|
||||
type: "普通受众",
|
||||
},
|
||||
{
|
||||
key: 6,
|
||||
name: "管理受众",
|
||||
time: "1667960969",
|
||||
number: "20",
|
||||
type: "普通受众",
|
||||
},
|
||||
{
|
||||
key: 7,
|
||||
name: "学习小组受众",
|
||||
time: "1667874569",
|
||||
number: "20",
|
||||
type: "普通受众",
|
||||
},
|
||||
{
|
||||
key: 8,
|
||||
name: "学习受众",
|
||||
time: "1667701769",
|
||||
number: "10",
|
||||
type: "普通受众",
|
||||
},
|
||||
{
|
||||
key: 9,
|
||||
name: "案例受众",
|
||||
time: "1667442569",
|
||||
number: "5",
|
||||
type: "普通受众",
|
||||
},
|
||||
{
|
||||
key: 10,
|
||||
name: "项目受众",
|
||||
time: "1667262569",
|
||||
number: "25",
|
||||
type: "普通受众",
|
||||
},
|
||||
],
|
||||
tablecolumns2: [
|
||||
{
|
||||
title: "受众名称",
|
||||
dataIndex: "name",
|
||||
key: "name",
|
||||
width: 30,
|
||||
align: "left",
|
||||
className: "h",
|
||||
},
|
||||
{
|
||||
title: "创建时间",
|
||||
dataIndex: "time",
|
||||
key: "time",
|
||||
width: 35,
|
||||
align: "center",
|
||||
className: "h",
|
||||
sorter: {
|
||||
compare: (a, b) => a.time - b.time,
|
||||
multiple: 3,
|
||||
},
|
||||
scopedSlots: { customRender: "action" }, //引入的插槽
|
||||
customRender: (text) => {
|
||||
// console.log(text.record.checked1);
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {toDate(Number(text.record.time), "Y-M-D h:m:s")}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "人数",
|
||||
dataIndex: "number",
|
||||
key: "number",
|
||||
width: 30,
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
{
|
||||
title: "类型",
|
||||
dataIndex: "type",
|
||||
key: "type",
|
||||
width: 40,
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
],
|
||||
organizeList1: [
|
||||
{
|
||||
value: "产品受众群体",
|
||||
label: "产品受众群体",
|
||||
},
|
||||
{
|
||||
value: "人力资源hrbp",
|
||||
label: "人力资源hrbp",
|
||||
},
|
||||
],
|
||||
|
||||
//快速选人-------------------------------------
|
||||
valueSelectboe: null, //快速选人的选择组织
|
||||
choosepeople: [], //总的数组
|
||||
@@ -1023,23 +576,7 @@ export default {
|
||||
showHidden: false, //是否显示收回
|
||||
selectedRowKeys: [], //表格选中的key
|
||||
//快速选人-------------------------------------
|
||||
//添加组织-------------------------------------
|
||||
|
||||
selectedKeys1: [], //选中部门的key
|
||||
chooseorganization: [], //添加组织的选择组织
|
||||
chooseorganization1: [], //显示到右侧的数组
|
||||
showMore1: false, //是否显示添加组织的查看更多
|
||||
showHidden1: false, //是否显示添加组织的收回
|
||||
|
||||
showOrgModal: false, //确认弹窗
|
||||
//添加组织-------------------------------------
|
||||
|
||||
//受众关联-------------------------------------
|
||||
relationpeople: [], //总的数组
|
||||
showMore2: false, //是否显示快速选人的查看更多
|
||||
showHidden2: false, //是否显示收回
|
||||
selectedRowKeys2: [], //表格选中的key
|
||||
//受众关联-------------------------------------
|
||||
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
state.activeKey = "1";
|
||||
@@ -1153,217 +690,7 @@ export default {
|
||||
|
||||
// 结束 快速选人------------------------------------------------------------------
|
||||
|
||||
// 开始 添加组织------------------------------------------------------------------
|
||||
//选中部门
|
||||
const departmentSelect1 = (e, k) => {
|
||||
console.log("选中的部门", e, k);
|
||||
if (!k.node.children) {
|
||||
state.selectedKeys1 = e.reverse();
|
||||
if (k.selected) {
|
||||
state.chooseorganization.unshift(k.node);
|
||||
} else {
|
||||
for (let i = 0; i < state.chooseorganization.length; i++) {
|
||||
if (state.chooseorganization[i].key === k.node.key) {
|
||||
state.chooseorganization.splice(i, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// console.log("选中的部门2", state.selectedKeys1, state.chooseorganization);
|
||||
};
|
||||
//点击确认添加-判断是否显示确定弹窗
|
||||
const addOrgModal = () => {
|
||||
if (state.chooseorganization.length === 0) {
|
||||
message.destroy();
|
||||
message.warning("请选择部门");
|
||||
} else {
|
||||
state.showOrgModal = true;
|
||||
}
|
||||
};
|
||||
//确定添加
|
||||
const addOrg = () => {
|
||||
console.log("chooseorganization", state.chooseorganization);
|
||||
state.chooseorganization1 = state.chooseorganization;
|
||||
selectedsHeight1();
|
||||
state.showOrgModal = false;
|
||||
};
|
||||
//取消添加
|
||||
const closeOrgModal = () => {
|
||||
state.showOrgModal = false;
|
||||
};
|
||||
|
||||
//单个删除选中的人
|
||||
const deleteChoosePeople1 = (item) => {
|
||||
console.log("item", item);
|
||||
let arr = state.chooseorganization;
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
if (arr[i].key === item.key) {
|
||||
arr.splice(i, 1);
|
||||
}
|
||||
}
|
||||
state.chooseorganization = arr;
|
||||
let array = state.selectedKeys1;
|
||||
for (let i = 0; i < array.length; i++) {
|
||||
if (array[i] === item.key) {
|
||||
array.splice(i, 1);
|
||||
}
|
||||
}
|
||||
state.selectedKeys1 = array;
|
||||
console.log("state.selectedKeys1", state.selectedKeys1);
|
||||
};
|
||||
|
||||
//根据右侧快速选人高度,判断是否显示更多
|
||||
const selectedsHeight1 = () => {
|
||||
let resize = elementResizeDetectorMaker();
|
||||
resize.listenTo(
|
||||
document.getElementById("ownpower").querySelector("#selecteds1"),
|
||||
function (ele) {
|
||||
console.log("ele", ele.offsetHeight);
|
||||
if (ele.offsetHeight > 160 && !state.showHidden1) {
|
||||
state.showMore1 = true;
|
||||
document
|
||||
.getElementById("ownpower")
|
||||
.querySelector("#selectedsBox1").style.overflow = "hidden";
|
||||
document
|
||||
.getElementById("ownpower")
|
||||
.querySelector("#selectedsBox1").style.height = "160px";
|
||||
} else if (ele.offsetHeight < 160) {
|
||||
state.showMore1 = false;
|
||||
state.showHidden1 = false;
|
||||
document
|
||||
.getElementById("ownpower")
|
||||
.querySelector("#selectedsBox1").style.overflow = "hidden";
|
||||
document
|
||||
.getElementById("ownpower")
|
||||
.querySelector("#selectedsBox1").style.height = "160px";
|
||||
}
|
||||
}
|
||||
);
|
||||
};
|
||||
const morePeopleShow1 = () => {
|
||||
state.showMore1 = false;
|
||||
state.showHidden1 = true;
|
||||
document
|
||||
.getElementById("ownpower")
|
||||
.querySelector("#selectedsBox1").style.overflow = "";
|
||||
document
|
||||
.getElementById("ownpower")
|
||||
.querySelector("#selectedsBox1").style.height = "";
|
||||
};
|
||||
const morePeopleHidden1 = () => {
|
||||
state.showMore1 = true;
|
||||
state.showHidden1 = false;
|
||||
document
|
||||
.getElementById("ownpower")
|
||||
.querySelector("#selectedsBox1").style.overflow = "hidden";
|
||||
document
|
||||
.getElementById("ownpower")
|
||||
.querySelector("#selectedsBox1").style.height = "160px";
|
||||
};
|
||||
//搜索组织
|
||||
const searchOrg = () => {
|
||||
let treeTitle = document
|
||||
.getElementById("ownpower")
|
||||
.querySelector(".treeMain2")
|
||||
.querySelectorAll(".ant-tree-title");
|
||||
if (state.com) {
|
||||
for (let i = 0; i < treeTitle.length; i++) {
|
||||
if (state.com === treeTitle[i].innerHTML) {
|
||||
document
|
||||
.getElementById("ownpower")
|
||||
.querySelector(".treeMain2")
|
||||
.scrollTo(0, treeTitle[i].offsetTop + 28 * i);
|
||||
return;
|
||||
} else if (i == treeTitle.length - 1) {
|
||||
message.destroy();
|
||||
message.warning("未找到该部门");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
message.destroy();
|
||||
message.warning("请输入组织名称");
|
||||
}
|
||||
};
|
||||
// 结束 添加组织------------------------------------------------------------------
|
||||
|
||||
// 开始 受众关联------------------------------------------------------------------
|
||||
|
||||
//受众关联 选中的数组
|
||||
const onSelectChange2 = (selectedRowKeys, item) => {
|
||||
// console.log("selectedRowKeys changed: ", selectedRowKeys,item);
|
||||
state.selectedRowKeys2 = selectedRowKeys;
|
||||
state.relationpeople = item.reverse();
|
||||
selectedsHeight2();
|
||||
};
|
||||
//单个删除选中的人
|
||||
const deleteChoosePeople2 = (item) => {
|
||||
let arr = state.relationpeople;
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
if (arr[i].key === item.key) {
|
||||
arr.splice(i, 1);
|
||||
}
|
||||
}
|
||||
state.relationpeople = arr;
|
||||
let array = state.selectedRowKeys2;
|
||||
for (let i = 0; i < array.length; i++) {
|
||||
if (array[i] === item.key) {
|
||||
array.splice(i, 1);
|
||||
}
|
||||
}
|
||||
state.selectedRowKeys2 = array;
|
||||
console.log("");
|
||||
};
|
||||
//根据右侧快速选人高度,判断是否显示更多
|
||||
const selectedsHeight2 = () => {
|
||||
let resize = elementResizeDetectorMaker();
|
||||
resize.listenTo(
|
||||
document.getElementById("ownpower").querySelector("#selecteds2"),
|
||||
function (ele) {
|
||||
console.log("ele", ele.offsetHeight);
|
||||
if (ele.offsetHeight > 160 && !state.showHidden2) {
|
||||
state.showMore2 = true;
|
||||
document
|
||||
.getElementById("ownpower")
|
||||
.querySelector("#selectedsBox2").style.overflow = "hidden";
|
||||
document
|
||||
.getElementById("ownpower")
|
||||
.querySelector("#selectedsBox2").style.height = "160px";
|
||||
} else if (ele.offsetHeight < 160) {
|
||||
state.showMore2 = false;
|
||||
state.showHidden2 = false;
|
||||
document
|
||||
.getElementById("ownpower")
|
||||
.querySelector("#selectedsBox2").style.overflow = "hidden";
|
||||
document
|
||||
.getElementById("ownpower")
|
||||
.querySelector("#selectedsBox2").style.height = "160px";
|
||||
}
|
||||
}
|
||||
);
|
||||
};
|
||||
const morePeopleShow2 = () => {
|
||||
state.showMore2 = false;
|
||||
state.showHidden2 = true;
|
||||
document
|
||||
.getElementById("ownpower")
|
||||
.querySelector("#selectedsBox2").style.overflow = "";
|
||||
document
|
||||
.getElementById("ownpower")
|
||||
.querySelector("#selectedsBox2").style.height = "";
|
||||
};
|
||||
const morePeopleHidden2 = () => {
|
||||
state.showMore2 = true;
|
||||
state.showHidden2 = false;
|
||||
document
|
||||
.getElementById("ownpower")
|
||||
.querySelector("#selectedsBox2").style.overflow = "hidden";
|
||||
document
|
||||
.getElementById("ownpower")
|
||||
.querySelector("#selectedsBox2").style.height = "160px";
|
||||
};
|
||||
|
||||
// 结束 受众关联------------------------------------------------------------------
|
||||
|
||||
|
||||
//全部清除
|
||||
const deleteAll = () => {
|
||||
@@ -1374,30 +701,13 @@ export default {
|
||||
state.showHidden = false; //是否显示收回
|
||||
state.selectedRowKeys = []; //表格选中的key
|
||||
//快速选人-------------------------------------
|
||||
//添加组织-------------------------------------
|
||||
|
||||
state.selectedKeys1 = []; //选中部门的key
|
||||
state.chooseorganization = []; //添加组织的选择组织
|
||||
state.chooseorganization1 = []; //显示到右侧的数组
|
||||
state.showMore1 = false; //是否显示添加组织的查看更多
|
||||
state.showHidden1 = false; //是否显示添加组织的收回
|
||||
|
||||
state.showOrgModal = false; //确认弹窗
|
||||
//添加组织-------------------------------------
|
||||
|
||||
//受众关联-------------------------------------
|
||||
state.relationpeople = []; //总的数组
|
||||
state.showMore2 = false; //是否显示快速选人的查看更多
|
||||
state.showHidden2 = false; //是否显示收回
|
||||
state.selectedRowKeys2 = []; //表格选中的key
|
||||
//受众关联-------------------------------------
|
||||
|
||||
};
|
||||
return {
|
||||
...toRefs(state),
|
||||
afterVisibleChange,
|
||||
closeDrawer,
|
||||
onSelectChange,
|
||||
onSelectChange2,
|
||||
// change,
|
||||
departmentSelect,
|
||||
deleteChoosePeople,
|
||||
@@ -1405,23 +715,10 @@ export default {
|
||||
morePeopleShow,
|
||||
morePeopleHidden,
|
||||
|
||||
departmentSelect1,
|
||||
addOrgModal,
|
||||
addOrg,
|
||||
closeOrgModal,
|
||||
selectedsHeight1,
|
||||
morePeopleShow1,
|
||||
morePeopleHidden1,
|
||||
deleteChoosePeople1,
|
||||
|
||||
selectedsHeight2,
|
||||
morePeopleShow2,
|
||||
morePeopleHidden2,
|
||||
deleteChoosePeople2,
|
||||
|
||||
|
||||
deleteAll,
|
||||
|
||||
searchOrg,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
>
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
<div class="headerTitle">添加投票任务</div>
|
||||
<div v-if="edit" class="headerTitle">编辑投票</div>
|
||||
<div v-else class="headerTitle">添加投票</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@@ -32,7 +33,7 @@
|
||||
<a-input
|
||||
v-model:value="inputV1"
|
||||
style="width: 424px; height: 32px"
|
||||
placeholder="请输入任务名称"
|
||||
placeholder="请输入投票名称"
|
||||
maxlength="20"
|
||||
/>
|
||||
</div>
|
||||
@@ -51,29 +52,37 @@
|
||||
<button
|
||||
class="xkbtn"
|
||||
:style="{ display: creVote ? 'none' : 'block' }"
|
||||
@click="showDrawerCreateVote"
|
||||
@click="showDrawerCreVote"
|
||||
>
|
||||
创建投票
|
||||
</button>
|
||||
<div>
|
||||
<CreateVote
|
||||
v-model:createVoteVisible="createVoteVisible"
|
||||
v-model:ballotId="ballotId"
|
||||
v-model:editChild="editChild"
|
||||
/>
|
||||
</div>
|
||||
<button
|
||||
class="xkbtn"
|
||||
:style="{ display: creVote ? 'block' : 'none' }"
|
||||
@click="showDrawerCreateVote"
|
||||
@click="showDrawerCreVote"
|
||||
>
|
||||
编辑投票
|
||||
</button>
|
||||
<div :style="{ display: creVote ? 'block' : 'none' }">
|
||||
<div class="fileTigan">
|
||||
<span style="color: #388be1">{{voteStemName}}</span>
|
||||
<div class="delBox" @click="delBox()"></div>
|
||||
<span style="color: #388be1">{{ballotName}}</span>
|
||||
<div class="delBox" @click="dleVoteStem()"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 创建投票侧弹窗 -->
|
||||
<div>
|
||||
<CreateVote
|
||||
v-model:createVoteVisible="createVoteVisible"
|
||||
|
||||
<cre-vote
|
||||
v-model:crevoteVisible="crevotevisible"
|
||||
@getData="getStemId"
|
||||
v-model:ballotId="ballotId"
|
||||
/>
|
||||
</div>
|
||||
<!-- 创建投票侧弹窗 -->
|
||||
@@ -85,7 +94,6 @@
|
||||
<div class="btnbox">
|
||||
<a-range-picker
|
||||
style="width: 424px"
|
||||
v-model:value="time"
|
||||
:placeholder="[' 开始时间', ' 结束时间']"
|
||||
/>
|
||||
</div>
|
||||
@@ -120,38 +128,38 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_btns">
|
||||
<button class="btn1">取消</button>
|
||||
<button class="btn2" @click="createVoteText()">确定</button>
|
||||
<button class="btn1" @click="closeDrawer()">取消</button>
|
||||
<button class="btn2" @click="updateVoteInfo()">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs} from "vue";
|
||||
import CreateVote from "./CreateVote.vue";
|
||||
import CreVote from "./CreateVote.vue";
|
||||
import * as api from "../../api/indexVote";
|
||||
import * as apitaskadd from "../../api/indexTaskadd";
|
||||
import { message } from "ant-design-vue";
|
||||
import { toDate } from "../../api/method";
|
||||
import { RouterEditTask } from "@/api/indexTask";
|
||||
import dayjs from 'dayjs';
|
||||
import dayjs from "dayjs";
|
||||
import * as apiTask from "../../api/indexTaskadd";
|
||||
|
||||
|
||||
export default {
|
||||
name: "AddVote",
|
||||
components: {
|
||||
CreateVote,
|
||||
CreVote,
|
||||
},
|
||||
props: {
|
||||
addvoteVisible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
EditVoteId:{
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
edit: { // 是否为编辑
|
||||
edit: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
voteId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
projectId: {
|
||||
@@ -167,7 +175,7 @@ export default {
|
||||
default: 0,
|
||||
},
|
||||
isLevel: { // 是否是关卡页面触发
|
||||
type: Boolean,
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
projectTaskId: { // 要编辑的projectId
|
||||
@@ -182,36 +190,55 @@ export default {
|
||||
type: Number,
|
||||
default: null,
|
||||
}
|
||||
|
||||
|
||||
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
voteName: "",
|
||||
voteExplain: "",
|
||||
inputV1: "",
|
||||
textV1: "",
|
||||
createVoteVisible: false,
|
||||
time: undefined,
|
||||
startTime:"",
|
||||
endTime:"",
|
||||
basevote: "",
|
||||
ascriptionId: "",
|
||||
voteStemId: null,
|
||||
voteId:"",
|
||||
voteStemName:"",
|
||||
ballotName: "",
|
||||
editStem: false, //编辑状态
|
||||
ballotId: 0, //题干id
|
||||
optionId: "", //删除,修改选项id
|
||||
editChild:false,
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
|
||||
state.inputV1 = "",
|
||||
state.textV1 = "",
|
||||
state.time = undefined,
|
||||
state.basevote = "",
|
||||
ctx.emit("update:addvoteVisible", false);
|
||||
ctx.emit("update:edit", false);
|
||||
};
|
||||
const afterVisibleChange = (bool) => {
|
||||
console.log("state", bool);
|
||||
queryVoteInfo();
|
||||
};
|
||||
const showDrawerCreateVote = () => {
|
||||
const showDrawerCreVote = () => {
|
||||
state.createVoteVisible = true;
|
||||
console.log("进来了====");
|
||||
};
|
||||
const changeVData = (data) => {
|
||||
state.ascriptionId = data.ascriptionId;
|
||||
state.editChild = props.edit;
|
||||
console.log("=======前")
|
||||
|
||||
};
|
||||
const getStemId = (data) => {
|
||||
state.ballotName = data.ballotName;
|
||||
state.ballotId =data.ballotId;
|
||||
}
|
||||
|
||||
const delBox = () => {
|
||||
dleVoteStem()
|
||||
state.creVote = false;
|
||||
};
|
||||
|
||||
//删除题干信息接口
|
||||
const dleVoteStem = () => {
|
||||
let objdelstem = {
|
||||
@@ -221,106 +248,135 @@ export default {
|
||||
.then((res) => {
|
||||
console.log('删除题干信息成功', res)
|
||||
message.success('删除题干信息成功')
|
||||
delBox()
|
||||
})
|
||||
}
|
||||
const updteVote = (res) =>{
|
||||
if (props.isLevel)
|
||||
apitaskadd
|
||||
.addTask({
|
||||
courseId: res.data.data.voteId,
|
||||
name: res.data.data.voteName,
|
||||
projectId: props.projectId,
|
||||
projectTaskId:props.projectTaskId || 0,
|
||||
stageId: props.chooseStageId,
|
||||
type: 12,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log("调用项目添加接口后", res.data);
|
||||
ctx.emit("changeData", false);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
else {
|
||||
RouterEditTask({
|
||||
chapterId: props.isactive,
|
||||
courseId: res.data.data.voteId,
|
||||
name: res.data.data.voteName,
|
||||
routerId: props.routerId,
|
||||
routerTaskId: props.routerTaskId,
|
||||
type: 12,
|
||||
}) .then((res) => {
|
||||
console.log("调用项目添加接口后", res.data);
|
||||
ctx.emit("changeData", false);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
}
|
||||
|
||||
//根据投票id获取投票信息
|
||||
const queryVoteInfo = ()=>{
|
||||
/**
|
||||
let obj = {
|
||||
voteId:props.voteId
|
||||
}
|
||||
.queryVoteText(obj)
|
||||
.then((res)=>{
|
||||
console.log('获取投票信息成功',res);
|
||||
state.inputV1 = res.data.data.voteName
|
||||
state.time = [dayjs(res.data.data.voteEndTime).format("YYYY-MM-DD"), dayjs(res.data.data.voteEndTime).format("YYYY-MM-DD")]
|
||||
state.textV1 = res.data.data.voteExplain
|
||||
state.baseVote = res.data.data.baseVote
|
||||
state.ascriptionId = res.data.data.ascriptionId
|
||||
state.ballotId = res.data.data.ballotId
|
||||
})
|
||||
.catch((err)=>{
|
||||
console.log('获取投票信息失败',err);
|
||||
})
|
||||
**/
|
||||
|
||||
}
|
||||
const updateToTask =(res)=>{
|
||||
if(props.isLevel ==1){
|
||||
RouterEditTask({
|
||||
chapterId: props.isactive,
|
||||
courseId: res.data.data.voteId,
|
||||
name: res.data.data.voteName,
|
||||
routerId: props.routerId,
|
||||
routerTaskId: props.routerTaskId || 0,
|
||||
type: 12,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res, 11111);
|
||||
message.success(`${props.edit ? '编辑' : '新增'}关卡任务成功`)
|
||||
ctx.emit("changeData", false);
|
||||
state.addLoading = false;
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err, 1111);
|
||||
});
|
||||
}else if(props.isLevel ==2){
|
||||
apiTask
|
||||
.addTask({
|
||||
courseId:res.data.data.voteId,
|
||||
name: res.data.data.voteName,
|
||||
projectId: props.projectId,
|
||||
projectTaskId: props.projectTaskId || 0,
|
||||
stageId: props.chooseStageId,
|
||||
type: 12,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log("调用项目添加接口后111", res.data, 11111);
|
||||
ctx.emit("changeData", false);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err, 111111);
|
||||
});
|
||||
}else if(props.isLevel ==3){
|
||||
console.log("");
|
||||
}
|
||||
}
|
||||
//创建投票信息
|
||||
const createVoteText = () => {
|
||||
if (!state.voteName) {
|
||||
//修改投票信息接口
|
||||
const updateVoteInfo = () => {
|
||||
if (!state.inputV1) {
|
||||
message.destroy();
|
||||
return message.info("请输入投票名称");
|
||||
}
|
||||
|
||||
if (state.basevote == "") {
|
||||
state.basevote = 1;
|
||||
}
|
||||
if (state.time != undefined) {
|
||||
state.time[0] = toDate(
|
||||
new Date(state.time[0].$d).getTime() / 1000,
|
||||
"Y-M-D"
|
||||
);
|
||||
state.time[1] = toDate(
|
||||
new Date(state.time[1].$d).getTime() / 1000,
|
||||
"Y-M-D"
|
||||
);
|
||||
if(state.time != undefined){
|
||||
state.startTime = dayjs(state.time[0]).format("YYYY-MM-DD");
|
||||
state.endTime = dayjs(state.time[1]).format("YYYY-MM-DD");
|
||||
}
|
||||
|
||||
let obj = {
|
||||
ascriptionId: state.ascriptionId,
|
||||
voteId: props.edit?state.voteId : 0,
|
||||
voteName: state.inputV1,
|
||||
voteStartTime: state.startTime,
|
||||
voteEndTime: state.endTime,
|
||||
ballotId: state.ballotId,
|
||||
baseVote: state.basevote,
|
||||
voteEndTime: dayjs(state.time[1]).format("YYYY-MM-DD"),
|
||||
voteExplain: state.voteExplain,
|
||||
voteName: state.voteName,
|
||||
voteStartTime: dayjs(state.time[0]).format("YYYY-MM-DD"),
|
||||
};
|
||||
voteExplain: state.textV1,
|
||||
createUser:0,
|
||||
updateUser:0,
|
||||
voteTag:"",
|
||||
}
|
||||
if(props.edit){
|
||||
api
|
||||
.editVote(obj)
|
||||
.then((res) => {
|
||||
console.log("创建成功123", res);
|
||||
message.success("创建成功");
|
||||
updteVote(res);
|
||||
updateToTask(res);
|
||||
closeDrawer();
|
||||
|
||||
console.log('修改投票信息成功', res);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("创建失败", err);
|
||||
});
|
||||
console.log('修改投票信息失败', err);
|
||||
})
|
||||
}else{
|
||||
api
|
||||
.createVote(obj)
|
||||
.then((res) => {
|
||||
updteVote(res);
|
||||
updateToTask(res);
|
||||
closeDrawer();
|
||||
|
||||
console.log('创建投票信息成功', res);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("创建失败", err);
|
||||
});
|
||||
}
|
||||
};
|
||||
console.log('创建投票信息失败', err);
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
return {
|
||||
...toRefs(state),
|
||||
showDrawerCreateVote,
|
||||
showDrawerCreVote,
|
||||
afterVisibleChange,
|
||||
closeDrawer,
|
||||
changeVData,
|
||||
getStemId,
|
||||
queryVoteInfo,
|
||||
dleVoteStem,
|
||||
createVoteText,
|
||||
updateVoteInfo,
|
||||
delBox,
|
||||
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -353,6 +409,7 @@ export default {
|
||||
padding-right: 30px;
|
||||
flex: 1;
|
||||
border-right: 1px solid #e8e8e8;
|
||||
margin-top: 32px;
|
||||
.main_item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -38,13 +38,13 @@
|
||||
/>
|
||||
</div>
|
||||
<div style="display: flex; margin-bottom: 20px">
|
||||
<div class="btn btn1">
|
||||
<div class="btn btn1" @click="searchLearnPath">
|
||||
<div class="search"></div>
|
||||
<div class="btnText" @click="searchLearnPath">搜索</div>
|
||||
<div class="btnText" >搜索</div>
|
||||
</div>
|
||||
<div class="btnn btn2">
|
||||
<div class="btnn btn2" @click="resetLearnPath">
|
||||
<div class="search"></div>
|
||||
<div class="btnText" @click="resetLearnPath">重置</div>
|
||||
<div class="btnText" >重置</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1349,7 +1349,7 @@ export default {
|
||||
.getLearnPath(obj)
|
||||
.then((res) => {
|
||||
if (res.status === 200) {
|
||||
// console.log("获取路径列表数据", res.data.data);
|
||||
console.log("获取路径列表数据", res.data.data);
|
||||
let arr = res.data.data.rows;
|
||||
if (
|
||||
arr.length === 0 &&
|
||||
|
||||
@@ -243,7 +243,7 @@
|
||||
<div>
|
||||
<add-homework
|
||||
v-model:addhomeworkVisible="addhomeworkvisible"
|
||||
:isLevel="true"
|
||||
:isLevel="isLevel"
|
||||
@changeData="updateTableData"
|
||||
v-model:isactive="isactive"
|
||||
v-model:edit="edit"
|
||||
@@ -266,7 +266,7 @@
|
||||
<div>
|
||||
<add-test
|
||||
v-model:addtestVisible="addtestvisible"
|
||||
:isLevel="true"
|
||||
:isLevel="isLevel"
|
||||
@changeData="updateTableData"
|
||||
v-model:isactive="isactive"
|
||||
v-model:edit="edit"
|
||||
@@ -288,7 +288,7 @@
|
||||
<div>
|
||||
<add-live
|
||||
v-model:addliveVisible="addlivevisible"
|
||||
:isLevel="true"
|
||||
:isLevel="isLevel"
|
||||
@changeData="updateTableData"
|
||||
v-model:isactive="isactive"
|
||||
v-model:routerId="routerId"
|
||||
@@ -310,7 +310,7 @@
|
||||
<div>
|
||||
<add-ref
|
||||
v-model:addrefVisible="addrefvisible"
|
||||
:isLevel="true"
|
||||
:isLevel="isLevel"
|
||||
@changeData="updateTableData"
|
||||
v-model:isactive="isactive"
|
||||
v-model:routerId="routerId"
|
||||
@@ -333,7 +333,7 @@
|
||||
<add-discuss
|
||||
v-model:adddiscussVisible="adddiscussvisible"
|
||||
@changeData="updateTableData"
|
||||
:isLevel="true"
|
||||
:isLevel="isLevel"
|
||||
v-model:isactive="isactive"
|
||||
v-model:edit="edit"
|
||||
v-model:routerId="routerId"
|
||||
@@ -354,7 +354,7 @@
|
||||
<div>
|
||||
<add-active
|
||||
v-model:addactiveVisible="addactivevisible"
|
||||
:isLevel="true"
|
||||
:isLevel="isLevel"
|
||||
v-model:edit="edit"
|
||||
v-model:isactive="isactive"
|
||||
@changeData="updateTableData"
|
||||
@@ -376,7 +376,7 @@
|
||||
<div>
|
||||
<add-eval
|
||||
v-model:addevalVisible="addevalvisible"
|
||||
:isLevel="true"
|
||||
:isLevel="isLevel"
|
||||
@changeData="updateTableData"
|
||||
v-model:isactive="isactive"
|
||||
v-model:edit="edit"
|
||||
@@ -399,7 +399,7 @@
|
||||
<div>
|
||||
<add-invist
|
||||
v-model:addinvistVisible="addinvistvisible"
|
||||
:isLevel="true"
|
||||
:isLevel="isLevel"
|
||||
@changeData="updateTableData"
|
||||
v-model:isactive="isactive"
|
||||
v-model:edit="edit"
|
||||
@@ -423,7 +423,7 @@
|
||||
<div>
|
||||
<add-vote
|
||||
v-model:addvoteVisible="addvotevisible"
|
||||
:isLevel="true"
|
||||
:isLevel="isLevel"
|
||||
@changeData="updateTableData"
|
||||
v-model:isactive="isactive"
|
||||
v-model:edit="edit"
|
||||
@@ -908,7 +908,7 @@ import AddDiscuss from "../../components/drawers/AddDiscuss.vue";
|
||||
import AddActive from "../../components/drawers/AddActive.vue";
|
||||
import AddEval from "../../components/drawers/AddEval.vue";
|
||||
import AddInvist from "../../components/drawers/AddInvist.vue";
|
||||
import AddVote from "../../components/drawers/AddVote.vue";
|
||||
import AddVote from "../../components/vote/AddVote.vue";
|
||||
import AddLive from "../../components/drawers/AddLive.vue";
|
||||
import AddRef from "../../components/drawers/AddRef.vue";
|
||||
import * as api from "../../api/indexLevel";
|
||||
@@ -1162,6 +1162,7 @@ export default {
|
||||
value2: "",
|
||||
selectedRowKeys: [],
|
||||
edit: false, //是否点击编辑
|
||||
isLevel:1,//学习路径1项目2模板库3
|
||||
gqxy_hs: true,
|
||||
isactive: 0,
|
||||
projectChecked: null, //项目单选框
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -97,7 +97,15 @@
|
||||
</div>
|
||||
<!-- 添加在线侧弹窗 -->
|
||||
<div>
|
||||
<add-online v-model:addonlineVisible="addonlinevisible" />
|
||||
<add-online
|
||||
v-model:addonlineVisible="addonlinevisible"
|
||||
@changeData="updateTableData"
|
||||
:isLevel="isLevel"
|
||||
v-model:edit="edit"
|
||||
v-model:projectId="projectId"
|
||||
v-model:chooseStageId="chooseStageId"
|
||||
v-model:projectTaskId="projectTaskId"
|
||||
v-model:EditOnlineId = "EditOnlineId"/>
|
||||
</div>
|
||||
<!-- 添加在线侧弹窗 -->
|
||||
<div class="lin"></div>
|
||||
@@ -111,7 +119,9 @@
|
||||
</div>
|
||||
<!-- 添加面授侧弹窗 -->
|
||||
<div>
|
||||
<add-faceteach v-model:addfaceteachVisible="addfaceteachvisible" />
|
||||
<add-faceteach v-model:addfaceteachVisible="addfaceteachvisible"
|
||||
v-model:EditEvalId="EditEvalId"
|
||||
/>
|
||||
</div>
|
||||
<!-- 添加面授侧弹窗 -->
|
||||
<div class="lin"></div>
|
||||
@@ -125,7 +135,14 @@
|
||||
</div>
|
||||
<!-- 添加案例侧弹窗 -->
|
||||
<div>
|
||||
<add-case v-model:addcaseVisible="addcasevisible" />
|
||||
<add-case v-model:addcaseVisible="addcasevisible"
|
||||
@changeData="updateTableData"
|
||||
:isLevel="isLevel"
|
||||
v-model:edit="edit"
|
||||
v-model:projectId="projectId"
|
||||
v-model:chooseStageId="chooseStageId"
|
||||
v-model:projectTaskId="projectTaskId"
|
||||
v-model:EditCaseId="EditCaseId" />
|
||||
</div>
|
||||
<!-- 添加案例侧弹窗 -->
|
||||
<div class="lin"></div>
|
||||
@@ -142,7 +159,7 @@
|
||||
<add-homework
|
||||
v-model:addhomeworkVisible="addhomeworkvisible"
|
||||
@changeData="updateTableData"
|
||||
:isLevel="false"
|
||||
v-model:isLevel="isLevel"
|
||||
v-model:edit="edit"
|
||||
v-model:projectId="projectId"
|
||||
v-model:chooseStageId="chooseStageId"
|
||||
@@ -165,7 +182,7 @@
|
||||
<add-test
|
||||
v-model:addtestVisible="addtestvisible"
|
||||
@changeData="updateTableData"
|
||||
:isLevel="false"
|
||||
:isLevel="isLevel"
|
||||
v-model:edit="edit"
|
||||
v-model:projectId="projectId"
|
||||
v-model:chooseStageId="chooseStageId"
|
||||
@@ -187,6 +204,7 @@
|
||||
<div>
|
||||
<add-live
|
||||
v-model:addliveVisible="addlivevisible"
|
||||
:isLevel="isLevel"
|
||||
@changeData="updateTableData"
|
||||
v-model:projectId="projectId"
|
||||
v-model:chooseStageId="chooseStageId"
|
||||
@@ -209,7 +227,7 @@
|
||||
<div>
|
||||
<add-ref
|
||||
v-model:addrefVisible="addrefvisible"
|
||||
:isLevel="false"
|
||||
:isLevel="isLevel"
|
||||
@changeData="updateTableData"
|
||||
v-model:projectId="projectId"
|
||||
v-model:chooseStageId="chooseStageId"
|
||||
@@ -233,6 +251,7 @@
|
||||
<add-discuss
|
||||
v-model:adddiscussVisible="adddiscussvisible"
|
||||
v-model:edit="edit"
|
||||
:isLevel="isLevel"
|
||||
v-model:projectId="projectId"
|
||||
v-model:chooseStageId="chooseStageId"
|
||||
v-model:EditDiscussId="EditDiscussId"
|
||||
@@ -258,6 +277,7 @@
|
||||
v-model:EditActiveId="EditActiveId"
|
||||
v-model:projectTaskId="projectTaskId"
|
||||
v-model:edit="edit"
|
||||
:isLevel="isLevel"
|
||||
v-model:chooseStageId="chooseStageId"
|
||||
@changeData="updateTableData"
|
||||
/>
|
||||
@@ -278,6 +298,7 @@
|
||||
v-model:addevalVisible="addevalvisible"
|
||||
@changeData="updateTableData"
|
||||
v-model:edit="edit"
|
||||
:isLevel="isLevel"
|
||||
v-model:projectId="projectId"
|
||||
v-model:chooseStageId="chooseStageId"
|
||||
v-model:projectTaskId="projectTaskId"
|
||||
@@ -300,6 +321,7 @@
|
||||
v-model:addinvistVisible="addinvistvisible"
|
||||
@changeData="updateTableData"
|
||||
v-model:edit="edit"
|
||||
:isLevel="isLevel"
|
||||
v-model:projectId="projectId"
|
||||
v-model:chooseStageId="chooseStageId"
|
||||
v-model:projectTaskId="projectTaskId"
|
||||
@@ -322,6 +344,7 @@
|
||||
@changeData="updateTableData"
|
||||
@getData="changeVData"
|
||||
v-model:edit="edit"
|
||||
:isLevel="isLevel"
|
||||
v-model:projectId="projectId"
|
||||
v-model:chooseStageId="chooseStageId"
|
||||
v-model:projectTaskId="projectTaskId"
|
||||
@@ -885,7 +908,7 @@ import AddDiscuss from "../../components/drawers/AddDiscuss.vue";
|
||||
import AddActive from "../../components/drawers/AddActive.vue";
|
||||
import AddEval from "../../components/drawers/AddEval.vue";
|
||||
import AddInvist from "../../components/drawers/AddInvist.vue";
|
||||
import AddVote from "../../components/drawers/AddVote.vue";
|
||||
import AddVote from "../../components/vote/AddVote.vue";
|
||||
import { message } from "ant-design-vue";
|
||||
import * as api from "../../api/indexTaskadd";
|
||||
import * as apistage from "../../api/indexStage";
|
||||
@@ -957,6 +980,7 @@ export default {
|
||||
chooseStageId: null,
|
||||
removeStageId: null,
|
||||
edit: false,
|
||||
isLevel:2,//学习路径1项目2模板库3
|
||||
// isRefEdit: 1, //外链编辑
|
||||
// isLiveEdit: 1, //直播编辑
|
||||
isRefEdit: false, //外链编辑
|
||||
@@ -968,6 +992,9 @@ export default {
|
||||
EditActiveId: null, //要编辑的活动id
|
||||
EditWorkId: null, // 要编辑的作业id
|
||||
EditTestId: null, // 要编辑的考试id
|
||||
EditCaseId:null,//要编辑的案例id
|
||||
EditOnlineId:null,//要编辑的在线id
|
||||
EditFaceTeach:null,
|
||||
EditEvalId: null,
|
||||
EditInvistId: null,
|
||||
EditVoteId: null, //编辑需要投票的id
|
||||
@@ -1564,14 +1591,18 @@ export default {
|
||||
document.getElementsByTagName("main")[0].style.boxShadow =
|
||||
"0px 1px 35px 0px rgba(118, 136, 166, 0.07)";
|
||||
});
|
||||
const showDrawerOnline = () => {
|
||||
const showDrawerOnline = (id, eleId) => {
|
||||
state.addonlinevisible = true;
|
||||
state.EditOnlineId = id;
|
||||
state.projectTaskId = eleId;
|
||||
};
|
||||
const showDrawerFaceteach = () => {
|
||||
state.addfaceteachvisible = true;
|
||||
};
|
||||
const showDrawerAddCase = () => {
|
||||
const showDrawerAddCase = (id, eleId) => {
|
||||
state.addcasevisible = true;
|
||||
state.EditCaseId = id;
|
||||
state.projectTaskId = eleId;
|
||||
};
|
||||
const showDrawerAddHomework = (id, eleId) => {
|
||||
state.EditWorkId = id;
|
||||
@@ -1607,15 +1638,17 @@ export default {
|
||||
};
|
||||
const showDrawerAddEval = (id, eleId) => {
|
||||
state.addevalvisible = true;
|
||||
// state.EditEvalId = id;
|
||||
state.evaluationId = id;
|
||||
state.projectTaskId = eleId;
|
||||
};
|
||||
const showDrawerAddInvist = (id, eleId) => {
|
||||
console.log(id, eleId, '213312');
|
||||
state.addinvistvisible = true;
|
||||
state.projectTaskId = eleId;
|
||||
};
|
||||
const showDrawerAddVote = (id, eleId) => {
|
||||
console.log(id, eleId, "95835325932953295325");
|
||||
console.log(id, eleId, '95835325932953295325');
|
||||
state.addvotevisible = true;
|
||||
state.EditVoteId = id;
|
||||
state.projectTaskId = eleId;
|
||||
@@ -1762,6 +1795,8 @@ export default {
|
||||
showDrawerAddHomework(id, eleId);
|
||||
} else if (type == "考试") {
|
||||
showDrawerAddTest(id, eleId);
|
||||
} else if (type == "在线") {
|
||||
showDrawerOnline(id, eleId);
|
||||
}
|
||||
};
|
||||
const showdeAll = () => {
|
||||
|
||||
@@ -419,23 +419,7 @@
|
||||
<div
|
||||
class="operation"
|
||||
style="cursor: pointer"
|
||||
:style="{
|
||||
display:
|
||||
item.type == '6' ||
|
||||
item.type == '9' ||
|
||||
item.type == '2'
|
||||
? 'flex'
|
||||
: 'none',
|
||||
}"
|
||||
@click="
|
||||
item.type == '2'
|
||||
? showCopyModal(item.type)
|
||||
: item.type == '6'
|
||||
? showzhibModal(item.type)
|
||||
: item.type == '9'
|
||||
? showhuodModal(item.type)
|
||||
: null
|
||||
"
|
||||
@click="showCodeModal"
|
||||
>
|
||||
二维码
|
||||
</div>
|
||||
@@ -1373,6 +1357,7 @@
|
||||
</a-modal>
|
||||
</div>
|
||||
<!-- 删除弹窗 -->
|
||||
|
||||
<!-- 面授管理二维码 -->
|
||||
<a-modal
|
||||
v-model:visible="copyModal"
|
||||
@@ -1490,6 +1475,15 @@
|
||||
</div>
|
||||
<!-- 编辑项目弹窗 -->
|
||||
<proj-set v-model:editHs="editHs" v-model:projectId="projectId" />
|
||||
|
||||
<!-- 二维码弹窗 -->
|
||||
<two-dimensional-code
|
||||
v-model:codevisible="codevisible"
|
||||
:codeInfo="codeInfo"
|
||||
index="0"
|
||||
type="课程二维码"
|
||||
/>
|
||||
<!-- 二维码弹窗 -->
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -1529,6 +1523,7 @@ import { getTask } from "../../api/indexTaskadd";
|
||||
import { toDate } from "../../api/method";
|
||||
import projSet from "../../components/Modals/projSet";
|
||||
import { overview } from "../../api/indexProjStu";
|
||||
import TwoDimensionalCode from "../../components/TwoDimensionalCode.vue";
|
||||
export default {
|
||||
name: "taskPage",
|
||||
components: {
|
||||
@@ -1550,6 +1545,7 @@ export default {
|
||||
TaskImpStu,
|
||||
projSet,
|
||||
NoticeHis,
|
||||
TwoDimensionalCode,
|
||||
},
|
||||
setup() {
|
||||
const state = reactive({
|
||||
@@ -1664,6 +1660,9 @@ export default {
|
||||
|
||||
huodModal: false, //活动二维码弹窗
|
||||
allDelete: false, //批量删除弹窗
|
||||
|
||||
codevisible: false, //二维码弹窗
|
||||
codeInfo: null, //二维码信息
|
||||
pubproject: false,
|
||||
stugroup: false,
|
||||
canclestu: false,
|
||||
@@ -2505,6 +2504,15 @@ export default {
|
||||
const showEditProj = () => {
|
||||
state.editHs = true;
|
||||
};
|
||||
//显示二维码弹窗
|
||||
const showCodeModal = () => {
|
||||
state.codevisible = true;
|
||||
state.codeInfo = {
|
||||
title: "课程二维码",
|
||||
name: "管理者进阶面授课程",
|
||||
url: "https://www.baidu.com/https://www.baidu.com/https://www.baidu.com/https://www.baidu.com/https://www.baidu.com/",
|
||||
};
|
||||
};
|
||||
|
||||
//学员管理列表操作
|
||||
const studentData = () => {
|
||||
@@ -3199,6 +3207,7 @@ export default {
|
||||
closehuodModal,
|
||||
closezhibModal,
|
||||
|
||||
showCodeModal,
|
||||
tabsChange,
|
||||
|
||||
getTaskList,
|
||||
|
||||
@@ -91,14 +91,14 @@
|
||||
</div>
|
||||
|
||||
<div @click="changeCodevisible">显示二维码弹窗</div>
|
||||
<two-dimensional-code v-model:codevisible="codevisible" :codeInfo="codeInfo" index="0"/>
|
||||
<two-dimensional-code v-model:codevisible="codevisible" :codeInfo="codeInfo" index="0" type="课程二维码"/>
|
||||
|
||||
<div @click="changeCodevisible2">显示二维码弹窗22</div>
|
||||
<two-dimensional-code v-model:codevisible="codevisible2" :codeInfo="codeInfo2" index="1"/>
|
||||
<two-dimensional-code v-model:codevisible="codevisible2" :codeInfo="codeInfo2" index="1" type="签到二维码"/>
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs } from "vue";
|
||||
import AddVote from "../../components/drawers/AddVote";
|
||||
import AddVote from "../../components/vote/AddVote";
|
||||
// import { PlusOutlined, LoadingOutlined } from "@ant-design/icons-vue";
|
||||
import { message } from "ant-design-vue";
|
||||
import * as api from "../../api/index1";
|
||||
|
||||
Reference in New Issue
Block a user