mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-13 04:46:46 +08:00
Merge branch 'master' of http://gitlab.dongwu-inc.com:10080/BOE/fe-manage
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
* @Author: lixg lixg@dongwu-inc.com
|
* @Author: lixg lixg@dongwu-inc.com
|
||||||
* @Date: 2022-11-07 17:06:45
|
* @Date: 2022-11-07 17:06:45
|
||||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
* @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
|
* @FilePath: /fe-manage/src/api/index.js
|
||||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
* @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 taskStudentList = (obj) => http.post('/admin/project/taskStudentList', obj)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//获取讨论信息
|
//获取讨论信息
|
||||||
export const getDiscussDetail=(obj)=>http.post('/discuss/getDiscussDetail',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={
|
const commonData={
|
||||||
timeout:50
|
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 {
|
export {
|
||||||
toDate,
|
toDate,
|
||||||
getWeek,
|
getWeek,
|
||||||
autoComma,
|
autoComma,
|
||||||
commonData,
|
commonData,
|
||||||
|
organizationalTree,
|
||||||
}
|
}
|
||||||
@@ -7,25 +7,45 @@
|
|||||||
:closable="closableQR"
|
:closable="closableQR"
|
||||||
wrapClassName="codeModal"
|
wrapClassName="codeModal"
|
||||||
style="margin-top: 400px"
|
style="margin-top: 400px"
|
||||||
:zIndex="9999"
|
:zIndex="999"
|
||||||
@cancel="qr_exit"
|
@cancel="qr_exit"
|
||||||
>
|
>
|
||||||
<div id="qrcode" class="QR">
|
<div id="qrcode" class="QR">
|
||||||
<div class="qr_header"></div>
|
<div class="qr_header"></div>
|
||||||
<div class="qr_main">
|
<div class="qr_main">
|
||||||
<div class="qrm_header">
|
<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 class="close_exit" @click="closeCodeModal"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="downloadCode" style="">
|
||||||
<div class="qrm_body">
|
<div class="qrm_body">
|
||||||
<div class="codename">{{codeInfo.name?codeInfo.name:''}}</div>
|
<div class="codename">
|
||||||
|
{{ codeInfo.name ? codeInfo.name : "" }}
|
||||||
|
</div>
|
||||||
<qrcode-vue
|
<qrcode-vue
|
||||||
:value="codeInfo.url?codeInfo.url:''"
|
:value="codeInfo.url ? codeInfo.url : ''"
|
||||||
:size="qrcodeSize"
|
:size="qrcodeSize"
|
||||||
style="width: 200px; height: 200px"
|
style="width: 200px; height: 200px"
|
||||||
></qrcode-vue>
|
></qrcode-vue>
|
||||||
</div>
|
</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">
|
<div class="qrm_footer">
|
||||||
<span style="margin-left: 52px">下载二维码</span>
|
<span style="margin-left: 52px">下载二维码</span>
|
||||||
<div class="qrmbtn" @click="downloadQr(200)">
|
<div class="qrmbtn" @click="downloadQr(200)">
|
||||||
@@ -47,7 +67,8 @@
|
|||||||
<script>
|
<script>
|
||||||
import { reactive, toRefs, watch } from "vue";
|
import { reactive, toRefs, watch } from "vue";
|
||||||
import QrcodeVue from "qrcode.vue";
|
import QrcodeVue from "qrcode.vue";
|
||||||
// import html2canvas from "html2canvas";
|
import html2canvas from "html2canvas";
|
||||||
|
import { message } from "ant-design-vue";
|
||||||
export default {
|
export default {
|
||||||
name: "TwoDimensionalCode",
|
name: "TwoDimensionalCode",
|
||||||
components: {
|
components: {
|
||||||
@@ -68,85 +89,29 @@ export default {
|
|||||||
type: String,
|
type: String,
|
||||||
default: "",
|
default: "",
|
||||||
},
|
},
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
setup(props, ctx) {
|
setup(props, ctx) {
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
qrcodeUrl: "https://www.baidu.com/",
|
|
||||||
qrcodeSize: 800,
|
qrcodeSize: 800,
|
||||||
codeInfo: {},
|
codeInfo: {},
|
||||||
|
courseUrl: "https://www.baidu.com/",
|
||||||
|
showUrl: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
//下载二维码图片
|
//下载二维码图片
|
||||||
const downloadQr = (num) => {
|
const downloadQr = (num) => {
|
||||||
state.qrcodeSize = num;
|
state.qrcodeSize = num;
|
||||||
// let filename = `${new Date().getTime()}.png`;
|
html2canvas(
|
||||||
// let canvas = document.getElementsByTagName("canvas")[0];
|
document.querySelectorAll(".downloadCode")[Number(props.index)],
|
||||||
// let imageUrl = canvas.toDataURL("image/png");
|
{
|
||||||
|
useCORS: true, //支持图片跨域
|
||||||
// let canvasBox = document.createElement("canvas");
|
}
|
||||||
// let ctx = canvasBox.getContext("2d");
|
).then((canvas) => {
|
||||||
// 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);
|
// 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 filename = `${new Date().getTime()}.png`;
|
||||||
let imageUrl = canvas.toDataURL("image/png");
|
let imageUrl = canvas.toDataURL("image/png");
|
||||||
let a = document.createElement("a");
|
let a = document.createElement("a");
|
||||||
@@ -155,6 +120,35 @@ console.log('document.getElementsByClassName',document.getElementsByClassName('c
|
|||||||
a.href = imageUrl;
|
a.href = imageUrl;
|
||||||
document.body.appendChild(a);
|
document.body.appendChild(a);
|
||||||
a.click();
|
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); // 移除选中的元素
|
||||||
|
|
||||||
|
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 = () => {
|
const closeCodeModal = () => {
|
||||||
ctx.emit("update:codevisible", false);
|
ctx.emit("update:codevisible", false);
|
||||||
@@ -166,12 +160,20 @@ console.log('document.getElementsByClassName',document.getElementsByClassName('c
|
|||||||
url: "",
|
url: "",
|
||||||
};
|
};
|
||||||
state.codeInfo = Object.assign(obj, props.codeInfo);
|
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 {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
downloadQr,
|
downloadQr,
|
||||||
closeCodeModal,
|
closeCodeModal,
|
||||||
|
copyUrl,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -229,8 +231,8 @@ console.log('document.getElementsByClassName',document.getElementsByClassName('c
|
|||||||
}
|
}
|
||||||
.qrm_body {
|
.qrm_body {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 22px;
|
padding-top: 22px;
|
||||||
margin-bottom: 32px;
|
padding-bottom: 32px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -242,6 +244,51 @@ console.log('document.getElementsByClassName',document.getElementsByClassName('c
|
|||||||
margin-bottom: 20px;
|
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 {
|
.qrm_footer {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -510,6 +510,7 @@ export default {
|
|||||||
.main_item {
|
.main_item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
margin-top: 32px;
|
||||||
margin-bottom: 32px;
|
margin-bottom: 32px;
|
||||||
.signbox {
|
.signbox {
|
||||||
width: 120px;
|
width: 120px;
|
||||||
|
|||||||
@@ -9,7 +9,8 @@
|
|||||||
>
|
>
|
||||||
<div class="drawerMain">
|
<div class="drawerMain">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="headerTitle">添加案例</div>
|
<div v-if="edit" class="headerTitle">编辑案例</div>
|
||||||
|
<div v-else class="headerTitle">添加案例</div>
|
||||||
<img
|
<img
|
||||||
style="width: 29px; height: 29px; cursor: pointer"
|
style="width: 29px; height: 29px; cursor: pointer"
|
||||||
src="../../assets/images/basicinfo/close.png"
|
src="../../assets/images/basicinfo/close.png"
|
||||||
@@ -35,7 +36,7 @@
|
|||||||
<div class="search"></div>
|
<div class="search"></div>
|
||||||
<div class="btnText">搜索</div>
|
<div class="btnText">搜索</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn btn2">
|
<div class="btn btn2" @click="resetCase()">
|
||||||
<div class="search"></div>
|
<div class="search"></div>
|
||||||
<div class="btnText">重置</div>
|
<div class="btnText">重置</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -43,16 +44,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="main_table">
|
<div class="main_table">
|
||||||
<a-table
|
<a-table class="ant-table-striped" :row-class-name="
|
||||||
class="ant-table-striped"
|
|
||||||
:row-class-name="
|
|
||||||
(_record, index) => (index % 2 === 1 ? 'table-striped' : null)
|
(_record, index) => (index % 2 === 1 ? 'table-striped' : null)
|
||||||
"
|
" :row-selection="rowSelection" :columns="tableDataFunc()" :data-source="tableData"
|
||||||
:row-selection="rowSelection"
|
:loading="tableDataTotal === -1 ? true : false" expandRowByClick="true" this.getMilitaryDeployment()
|
||||||
:columns="columns1"
|
@expand="expandTable" :pagination="false" filterMultiple:false
|
||||||
:data-source="tableData1"
|
|
||||||
:loading="tableDataTotal === -1 ? true : false"
|
|
||||||
:pagination="false"
|
|
||||||
/>
|
/>
|
||||||
<div class="pa">
|
<div class="pa">
|
||||||
<a-pagination
|
<a-pagination
|
||||||
@@ -63,148 +59,242 @@
|
|||||||
:current="currentPage"
|
:current="currentPage"
|
||||||
:total="tableDataTotal"
|
:total="tableDataTotal"
|
||||||
class="pagination"
|
class="pagination"
|
||||||
|
@change="handelChangePage"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="main_btns">
|
<div class="main_btns">
|
||||||
<button class="btn1">取消</button>
|
<button class="btn1" @click="closeDrawer">取消</button>
|
||||||
<button class="btn2">确定</button>
|
<button class="btn2" @click="updateTask">确定</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { reactive, toRefs, ref } from "vue";
|
import { reactive, toRefs, onMounted } from "vue";
|
||||||
const columns1 = [
|
import * as api from "../../api/indexInvist.js";
|
||||||
{
|
import * as apiTask from "../../api/indexTaskadd";
|
||||||
title: "案例标题",
|
import { message } from "ant-design-vue";
|
||||||
width: "40%",
|
import { RouterEditTask } from "@/api/indexTask";
|
||||||
dataIndex: "title",
|
import dayjs from "dayjs";
|
||||||
key: "num",
|
|
||||||
align: "center",
|
export default {
|
||||||
ellipsis: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "作者",
|
|
||||||
width: "25%",
|
|
||||||
dataIndex: "name",
|
|
||||||
key: "name",
|
|
||||||
align: "center",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "导入时间",
|
|
||||||
width: "35%",
|
|
||||||
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);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
export default {
|
|
||||||
name: "AddCase",
|
name: "AddCase",
|
||||||
props: {
|
props: {
|
||||||
addcaseVisible: {
|
addcaseVisible: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
EditCaseId: {
|
||||||
|
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: Boolean,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
projectTaskId: { // 要编辑的projectId
|
||||||
|
type: Number,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
routerId: {
|
||||||
|
type: Number,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
isactive: {
|
||||||
|
type: Number,
|
||||||
|
default: null,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
setup(props, ctx) {
|
setup(props, ctx) {
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
tableData1: [
|
tableData: [
|
||||||
{
|
{
|
||||||
key: "1",
|
key: "1",
|
||||||
title: "基于BOE显示PNL工厂的工序平1111112222222221111111111111122222333335555",
|
title: "基于BOE显示PNL工厂的工序平1111112222222221111111111111122222333335555",
|
||||||
name: "李玉冰",
|
name: "李玉冰",
|
||||||
time: "2022-10-31 23:12:00",
|
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,
|
currentPage: 1,
|
||||||
tableDataTotal: 100,
|
tableDataTotal: 0,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
inputV1:'',
|
inputV1: '',
|
||||||
|
time: undefined,
|
||||||
|
assessmentId: null,
|
||||||
|
assessmentName: "",
|
||||||
});
|
});
|
||||||
const closeDrawer = () => {
|
const closeDrawer = () => {
|
||||||
ctx.emit("update:addcaseVisible", false);
|
ctx.emit("update:addcaseVisible", false);
|
||||||
|
ctx.emit("update:edit", false);
|
||||||
};
|
};
|
||||||
const afterVisibleChange = (bool) => {
|
const afterVisibleChange = (bool) => {
|
||||||
console.log("state", 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;
|
||||||
|
},
|
||||||
|
};
|
||||||
|
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);
|
||||||
|
});
|
||||||
|
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) {
|
||||||
|
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 {
|
||||||
|
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);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//重置案例信息
|
||||||
|
const resetCase = () => {
|
||||||
|
state.inputV1 = "";
|
||||||
|
getAllCaseText();
|
||||||
|
};
|
||||||
|
onMounted(() => {
|
||||||
|
// createCase();
|
||||||
|
getAllCaseText();
|
||||||
|
});
|
||||||
return {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
afterVisibleChange,
|
afterVisibleChange,
|
||||||
closeDrawer,
|
closeDrawer,
|
||||||
columns1,
|
tableDataFunc,
|
||||||
rowSelection,
|
rowSelection,
|
||||||
|
handelChangePage,
|
||||||
|
getTableDate,
|
||||||
|
updateTask,
|
||||||
|
getAllCaseText,
|
||||||
|
resetCase,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.ant-table-striped :deep(.table-striped) td {
|
.ant-table-striped :deep(.table-striped) td {
|
||||||
background-color: #fafafa !important;
|
background-color: #fafafa !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -382,4 +472,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -301,6 +301,7 @@ export default {
|
|||||||
.main_item {
|
.main_item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
margin-top: 32px;
|
||||||
margin-bottom: 32px;
|
margin-bottom: 32px;
|
||||||
.signbox {
|
.signbox {
|
||||||
width: 120px;
|
width: 120px;
|
||||||
|
|||||||
@@ -323,6 +323,7 @@ export default {
|
|||||||
.main_item {
|
.main_item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
margin-top: 32px;
|
||||||
margin-bottom: 32px;
|
margin-bottom: 32px;
|
||||||
.signbox {
|
.signbox {
|
||||||
width: 120px;
|
width: 120px;
|
||||||
|
|||||||
@@ -400,20 +400,25 @@ export default {
|
|||||||
.main_item {
|
.main_item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
margin-top: 32px;
|
||||||
margin-bottom: 32px;
|
margin-bottom: 32px;
|
||||||
|
|
||||||
.signbox {
|
.signbox {
|
||||||
width: 120px;
|
width: 120px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: end;
|
justify-content: end;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.sign {
|
.sign {
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.btnbox {
|
.btnbox {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.xkbtn {
|
.xkbtn {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
width: 130px;
|
width: 130px;
|
||||||
@@ -426,21 +431,25 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.main_item2 {
|
.main_item2 {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
margin-bottom: 32px;
|
margin-bottom: 32px;
|
||||||
|
|
||||||
.signbox {
|
.signbox {
|
||||||
width: 120px;
|
width: 120px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: end;
|
justify-content: end;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.kqszbox {
|
.kqszbox {
|
||||||
.qdqtbox {
|
.qdqtbox {
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.qdbtn,
|
.qdbtn,
|
||||||
.qtbtn {
|
.qtbtn {
|
||||||
width: 75px;
|
width: 75px;
|
||||||
@@ -451,15 +460,18 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
.btntext {
|
.btntext {
|
||||||
color: #387df7;
|
color: #387df7;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.setbox {
|
.setbox {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
|
|
||||||
.timerbox {
|
.timerbox {
|
||||||
margin-top: 6px;
|
margin-top: 6px;
|
||||||
margin-right: 32px;
|
margin-right: 32px;
|
||||||
@@ -469,10 +481,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.btnbox2 {
|
.btnbox2 {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
|
|
||||||
.xkbtn {
|
.xkbtn {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
width: 130px;
|
width: 130px;
|
||||||
@@ -488,11 +502,14 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.main_right {
|
.main_right {
|
||||||
width: 337px;
|
width: 337px;
|
||||||
|
|
||||||
.main_item {
|
.main_item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
margin-top: 32px;
|
||||||
margin-bottom: 32px;
|
margin-bottom: 32px;
|
||||||
.signbox {
|
.signbox {
|
||||||
width: 120px;
|
width: 120px;
|
||||||
|
|||||||
@@ -443,6 +443,7 @@ export default {
|
|||||||
.main_item {
|
.main_item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
margin-top: 32px;
|
||||||
margin-bottom: 32px;
|
margin-bottom: 32px;
|
||||||
|
|
||||||
.signbox {
|
.signbox {
|
||||||
|
|||||||
@@ -702,6 +702,7 @@ export default {
|
|||||||
.main_item {
|
.main_item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
margin-top: 32px;
|
||||||
margin-bottom: 32px;
|
margin-bottom: 32px;
|
||||||
.signbox {
|
.signbox {
|
||||||
width: 120px;
|
width: 120px;
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
<div class="search"></div>
|
<div class="search"></div>
|
||||||
<div class="btnText">搜索</div>
|
<div class="btnText">搜索</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn btn2" @click="resetInvist">
|
<div class="btn btn2" @click="resetOnline()">
|
||||||
<div class="search"></div>
|
<div class="search"></div>
|
||||||
<div class="btnText">重置</div>
|
<div class="btnText">重置</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -241,7 +241,7 @@ export default {
|
|||||||
const handelChangePage = (page, pageSize) => {
|
const handelChangePage = (page, pageSize) => {
|
||||||
state.currentPage = page;
|
state.currentPage = page;
|
||||||
state.pageSize = pageSize;
|
state.pageSize = pageSize;
|
||||||
getAllInvistText();
|
getAllOnlineText();
|
||||||
};
|
};
|
||||||
const getTableDate = (tableData) => {
|
const getTableDate = (tableData) => {
|
||||||
let data = tableData;
|
let data = tableData;
|
||||||
@@ -260,7 +260,7 @@ export default {
|
|||||||
state.tableData = array;
|
state.tableData = array;
|
||||||
};
|
};
|
||||||
//获取全部在线信息接口
|
//获取全部在线信息接口
|
||||||
const getAllInvistText = () => {
|
const getAllOnlineText = () => {
|
||||||
api
|
api
|
||||||
.queryAssessmentDetailList({
|
.queryAssessmentDetailList({
|
||||||
assessmentName: "",
|
assessmentName: "",
|
||||||
@@ -323,13 +323,13 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//重置在线信息
|
//重置在线信息
|
||||||
const resetInvist = () => {
|
const resetOnline = () => {
|
||||||
state.inputV1 = "";
|
state.inputV1 = "";
|
||||||
getAllInvistText();
|
getAllOnlineText();
|
||||||
};
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// createInvist();
|
// createOnline();
|
||||||
getAllInvistText();
|
getAllOnlineText();
|
||||||
});
|
});
|
||||||
return {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
@@ -338,9 +338,10 @@ export default {
|
|||||||
tableDataFunc,
|
tableDataFunc,
|
||||||
rowSelection,
|
rowSelection,
|
||||||
handelChangePage,
|
handelChangePage,
|
||||||
|
getAllOnlineText,
|
||||||
getTableDate,
|
getTableDate,
|
||||||
updateTask,
|
updateTask,
|
||||||
resetInvist,
|
resetOnline,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -371,6 +372,7 @@ export default {
|
|||||||
.main_items {
|
.main_items {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
margin-top: 32px;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
.mi_ipts {
|
.mi_ipts {
|
||||||
|
|||||||
@@ -200,7 +200,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { reactive, ref, toRefs } from "vue";
|
import { reactive, ref, toRefs } from "vue";
|
||||||
import {message} from"ant-design-vue";
|
import {message} from"ant-design-vue";
|
||||||
import {createExamination,queryExaminationDetailById,updateExamination} from "@/api/indexExam"
|
import {createExamination,queryExaminationDetailById,updateExamination} from "@/api/indexExam"
|
||||||
@@ -564,7 +564,7 @@ export default {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.ant-table-striped :deep(.table-striped) td {
|
.ant-table-striped :deep(.table-striped) td {
|
||||||
background-color: #fafafa !important;
|
background-color: #fafafa !important;
|
||||||
}
|
}
|
||||||
@@ -595,6 +595,7 @@ export default {
|
|||||||
.main_item {
|
.main_item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
margin-top: 32px;
|
||||||
margin-bottom: 32px;
|
margin-bottom: 32px;
|
||||||
.signbox {
|
.signbox {
|
||||||
width: 120px;
|
width: 120px;
|
||||||
|
|||||||
@@ -400,6 +400,7 @@ export default {
|
|||||||
.main_item {
|
.main_item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
margin-top: 32px;
|
||||||
margin-bottom: 32px;
|
margin-bottom: 32px;
|
||||||
.signbox {
|
.signbox {
|
||||||
width: 120px;
|
width: 120px;
|
||||||
|
|||||||
@@ -433,6 +433,7 @@ export default {
|
|||||||
.main_item {
|
.main_item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
margin-top: 32px;
|
||||||
margin-bottom: 32px;
|
margin-bottom: 32px;
|
||||||
margin-top: 32px;;
|
margin-top: 32px;;
|
||||||
.signbox {
|
.signbox {
|
||||||
|
|||||||
@@ -121,169 +121,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-tab-pane>
|
</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>
|
</a-tabs>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -356,134 +194,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
<div class="btnn">
|
<div class="btnn">
|
||||||
@@ -492,44 +203,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</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>
|
</a-drawer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { reactive, toRefs, onMounted, onUnmounted } from "vue";
|
import { reactive, toRefs, onMounted, onUnmounted } from "vue";
|
||||||
import elementResizeDetectorMaker from "element-resize-detector";
|
import elementResizeDetectorMaker from "element-resize-detector";
|
||||||
import { message } from "ant-design-vue";
|
// import { message } from "ant-design-vue";
|
||||||
import { toDate } from "../../api/method";
|
// import { toDate } from "../../api/method";
|
||||||
export default {
|
export default {
|
||||||
name: "OwnPower",
|
name: "OwnPower",
|
||||||
props: {
|
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, //快速选人的选择组织
|
valueSelectboe: null, //快速选人的选择组织
|
||||||
choosepeople: [], //总的数组
|
choosepeople: [], //总的数组
|
||||||
@@ -1023,23 +576,7 @@ export default {
|
|||||||
showHidden: false, //是否显示收回
|
showHidden: false, //是否显示收回
|
||||||
selectedRowKeys: [], //表格选中的key
|
selectedRowKeys: [], //表格选中的key
|
||||||
//快速选人-------------------------------------
|
//快速选人-------------------------------------
|
||||||
//添加组织-------------------------------------
|
|
||||||
|
|
||||||
selectedKeys1: [], //选中部门的key
|
|
||||||
chooseorganization: [], //添加组织的选择组织
|
|
||||||
chooseorganization1: [], //显示到右侧的数组
|
|
||||||
showMore1: false, //是否显示添加组织的查看更多
|
|
||||||
showHidden1: false, //是否显示添加组织的收回
|
|
||||||
|
|
||||||
showOrgModal: false, //确认弹窗
|
|
||||||
//添加组织-------------------------------------
|
|
||||||
|
|
||||||
//受众关联-------------------------------------
|
|
||||||
relationpeople: [], //总的数组
|
|
||||||
showMore2: false, //是否显示快速选人的查看更多
|
|
||||||
showHidden2: false, //是否显示收回
|
|
||||||
selectedRowKeys2: [], //表格选中的key
|
|
||||||
//受众关联-------------------------------------
|
|
||||||
});
|
});
|
||||||
const closeDrawer = () => {
|
const closeDrawer = () => {
|
||||||
state.activeKey = "1";
|
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 = () => {
|
const deleteAll = () => {
|
||||||
@@ -1374,30 +701,13 @@ export default {
|
|||||||
state.showHidden = false; //是否显示收回
|
state.showHidden = false; //是否显示收回
|
||||||
state.selectedRowKeys = []; //表格选中的key
|
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 {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
afterVisibleChange,
|
afterVisibleChange,
|
||||||
closeDrawer,
|
closeDrawer,
|
||||||
onSelectChange,
|
onSelectChange,
|
||||||
onSelectChange2,
|
|
||||||
// change,
|
// change,
|
||||||
departmentSelect,
|
departmentSelect,
|
||||||
deleteChoosePeople,
|
deleteChoosePeople,
|
||||||
@@ -1405,23 +715,10 @@ export default {
|
|||||||
morePeopleShow,
|
morePeopleShow,
|
||||||
morePeopleHidden,
|
morePeopleHidden,
|
||||||
|
|
||||||
departmentSelect1,
|
|
||||||
addOrgModal,
|
|
||||||
addOrg,
|
|
||||||
closeOrgModal,
|
|
||||||
selectedsHeight1,
|
|
||||||
morePeopleShow1,
|
|
||||||
morePeopleHidden1,
|
|
||||||
deleteChoosePeople1,
|
|
||||||
|
|
||||||
selectedsHeight2,
|
|
||||||
morePeopleShow2,
|
|
||||||
morePeopleHidden2,
|
|
||||||
deleteChoosePeople2,
|
|
||||||
|
|
||||||
deleteAll,
|
deleteAll,
|
||||||
|
|
||||||
searchOrg,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -38,13 +38,13 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex; margin-bottom: 20px">
|
<div style="display: flex; margin-bottom: 20px">
|
||||||
<div class="btn btn1">
|
<div class="btn btn1" @click="searchLearnPath">
|
||||||
<div class="search"></div>
|
<div class="search"></div>
|
||||||
<div class="btnText" @click="searchLearnPath">搜索</div>
|
<div class="btnText" >搜索</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="btnn btn2">
|
<div class="btnn btn2" @click="resetLearnPath">
|
||||||
<div class="search"></div>
|
<div class="search"></div>
|
||||||
<div class="btnText" @click="resetLearnPath">重置</div>
|
<div class="btnText" >重置</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1349,7 +1349,7 @@ export default {
|
|||||||
.getLearnPath(obj)
|
.getLearnPath(obj)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
// console.log("获取路径列表数据", res.data.data);
|
console.log("获取路径列表数据", res.data.data);
|
||||||
let arr = res.data.data.rows;
|
let arr = res.data.data.rows;
|
||||||
if (
|
if (
|
||||||
arr.length === 0 &&
|
arr.length === 0 &&
|
||||||
|
|||||||
@@ -3,7 +3,12 @@
|
|||||||
<div class="projectAdd">
|
<div class="projectAdd">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<span class="title">创建/编辑单层项目</span>
|
<span class="title">创建/编辑单层项目</span>
|
||||||
<div @click="backPage" style="cursor: pointer;" to="/projectmanage" class="goback">
|
<div
|
||||||
|
@click="backPage"
|
||||||
|
style="cursor: pointer"
|
||||||
|
to="/projectmanage"
|
||||||
|
class="goback"
|
||||||
|
>
|
||||||
<span class="return"></span><span class="returntext">返回</span>
|
<span class="return"></span><span class="returntext">返回</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -11,34 +16,58 @@
|
|||||||
<div class="main">
|
<div class="main">
|
||||||
<div class="name">
|
<div class="name">
|
||||||
<div class="namebox">
|
<div class="namebox">
|
||||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
<img
|
||||||
|
class="nameimg"
|
||||||
|
src="../../assets/images/basicinfo/asterisk.png"
|
||||||
|
/>
|
||||||
<div class="inname">项目名称</div>
|
<div class="inname">项目名称</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<a-input v-model:value="projectName" placeholder="请输入项目名称" show-count :maxlength="30" />
|
<a-input
|
||||||
|
v-model:value="projectName"
|
||||||
|
placeholder="请输入项目名称"
|
||||||
|
show-count
|
||||||
|
:maxlength="30"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
<div class="namebox">
|
<div class="namebox">
|
||||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
<img
|
||||||
|
class="nameimg"
|
||||||
|
src="../../assets/images/basicinfo/asterisk.png"
|
||||||
|
/>
|
||||||
<div class="inname">分类</div>
|
<div class="inname">分类</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="in select">
|
<div class="in select">
|
||||||
<a-select :getPopupContainer="
|
<a-select
|
||||||
|
:getPopupContainer="
|
||||||
(triggerNode) => {
|
(triggerNode) => {
|
||||||
return triggerNode.parentNode || document.body;
|
return triggerNode.parentNode || document.body;
|
||||||
}
|
}
|
||||||
" v-model:value="classifySelect" placeholder="四个养成" style="width: 100%" :options="classifyList"
|
"
|
||||||
@change="classificationChange" allowClear showSearch>
|
v-model:value="classifySelect"
|
||||||
|
placeholder="四个养成"
|
||||||
|
style="width: 100%"
|
||||||
|
:options="classifyList"
|
||||||
|
@change="classificationChange"
|
||||||
|
allowClear
|
||||||
|
showSearch
|
||||||
|
>
|
||||||
</a-select>
|
</a-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
<div class="namebox">
|
<div class="namebox">
|
||||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
<img
|
||||||
|
class="nameimg"
|
||||||
|
src="../../assets/images/basicinfo/asterisk.png"
|
||||||
|
/>
|
||||||
<div class="inname">封面图</div>
|
<div class="inname">封面图</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="box" style="
|
<div
|
||||||
|
class="box"
|
||||||
|
style="
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
border: 1px solid rgba(78, 166, 255, 1);
|
border: 1px solid rgba(78, 166, 255, 1);
|
||||||
@@ -46,15 +75,29 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
">
|
"
|
||||||
<a-upload v-model:file-list="fileList" name="file" list-type="picture-card" class="avatar-uploader"
|
>
|
||||||
:show-upload-list="false" action="/api/file/upload" :before-upload="beforeUpload" @change="handleChange">
|
<a-upload
|
||||||
<img style="
|
v-model:file-list="fileList"
|
||||||
|
name="file"
|
||||||
|
list-type="picture-card"
|
||||||
|
class="avatar-uploader"
|
||||||
|
:show-upload-list="false"
|
||||||
|
action="/api/file/upload"
|
||||||
|
:before-upload="beforeUpload"
|
||||||
|
@change="handleChange"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
style="
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
" v-if="imageUrl" :src="imageUrl" alt="avatar" />
|
"
|
||||||
|
v-if="imageUrl"
|
||||||
|
:src="imageUrl"
|
||||||
|
alt="avatar"
|
||||||
|
/>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<!-- <loading-outlined v-if="loading"></loading-outlined> -->
|
<!-- <loading-outlined v-if="loading"></loading-outlined> -->
|
||||||
<!-- <plus-outlined v-else></plus-outlined> -->
|
<!-- <plus-outlined v-else></plus-outlined> -->
|
||||||
@@ -67,43 +110,71 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
<div class="namebox">
|
<div class="namebox">
|
||||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
<img
|
||||||
|
class="nameimg"
|
||||||
|
src="../../assets/images/basicinfo/asterisk.png"
|
||||||
|
/>
|
||||||
<div class="inname">项目时间</div>
|
<div class="inname">项目时间</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<a-range-picker separator="至" :placeholder="[' 开始时间', ' 结束时间']" v-model:value="rangevalue"
|
<a-range-picker
|
||||||
style="width: 100%; height: 40px; border-radius: 5px" @change="onRangeChange" />
|
separator="至"
|
||||||
|
:placeholder="[' 开始时间', ' 结束时间']"
|
||||||
|
v-model:value="rangevalue"
|
||||||
|
style="width: 100%; height: 40px; border-radius: 5px"
|
||||||
|
@change="onRangeChange"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
<div class="namebox">
|
<div class="namebox">
|
||||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
<img
|
||||||
|
class="nameimg"
|
||||||
|
src="../../assets/images/basicinfo/asterisk.png"
|
||||||
|
/>
|
||||||
<div class="inname">项目经理</div>
|
<div class="inname">项目经理</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<a-select :getPopupContainer="
|
<a-select
|
||||||
|
:getPopupContainer="
|
||||||
(triggerNode) => {
|
(triggerNode) => {
|
||||||
return triggerNode.parentNode || document.body;
|
return triggerNode.parentNode || document.body;
|
||||||
}
|
}
|
||||||
" :value="classifySelect1" mode="multiple" placeholder="请选择项目经理" style="width: 100%" :options="classifyList1"
|
"
|
||||||
@change="classificationChange1" allowClear showSearch>
|
:value="classifySelect1"
|
||||||
|
mode="multiple"
|
||||||
|
placeholder="请选择项目经理"
|
||||||
|
style="width: 100%"
|
||||||
|
:options="classifyList1"
|
||||||
|
@change="classificationChange1"
|
||||||
|
allowClear
|
||||||
|
showSearch
|
||||||
|
>
|
||||||
</a-select>
|
</a-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
<div class="namebox">
|
<div class="namebox">
|
||||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
<img
|
||||||
|
class="nameimg"
|
||||||
|
src="../../assets/images/basicinfo/asterisk.png"
|
||||||
|
/>
|
||||||
<div class="inname">资源归属</div>
|
<div class="inname">资源归属</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="in select">
|
<div class="in select">
|
||||||
<a-select :getPopupContainer="
|
<a-select
|
||||||
|
:getPopupContainer="
|
||||||
(triggerNode) => {
|
(triggerNode) => {
|
||||||
return triggerNode.parentNode || document.body;
|
return triggerNode.parentNode || document.body;
|
||||||
}
|
}
|
||||||
" v-model:value="classifySelect2" placeholder="自动带出 可修改" :options="classifyList2"
|
"
|
||||||
@change="classificationChange2" />
|
v-model:value="classifySelect2"
|
||||||
|
placeholder="自动带出 可修改"
|
||||||
|
:options="classifyList2"
|
||||||
|
@change="classificationChange2"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name name2">
|
<div class="name name2">
|
||||||
@@ -111,7 +182,13 @@
|
|||||||
<div class="inname" style="margin-top: 13px">项目说明</div>
|
<div class="inname" style="margin-top: 13px">项目说明</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<a-textarea v-model:value="remark" style="height: 80px" placeholder="请输入说明" show-count :maxlength="200" />
|
<a-textarea
|
||||||
|
v-model:value="remark"
|
||||||
|
style="height: 80px"
|
||||||
|
placeholder="请输入说明"
|
||||||
|
show-count
|
||||||
|
:maxlength="200"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name name2">
|
<div class="name name2">
|
||||||
@@ -119,52 +196,81 @@
|
|||||||
<div class="inname">同步学习记录</div>
|
<div class="inname">同步学习记录</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<a-radio @click="changeChecked" v-model:checked="checked"><span style="
|
<a-radio @click="changeChecked" v-model:checked="checked"
|
||||||
|
><span
|
||||||
|
style="
|
||||||
width: 100%;
|
width: 100%;
|
||||||
color: rgba(109, 117, 132, 1);
|
color: rgba(109, 117, 132, 1);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
">同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)</span></a-radio>
|
"
|
||||||
|
>同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)</span
|
||||||
|
></a-radio
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
<div class="namebox">
|
<div class="namebox">
|
||||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
<img
|
||||||
|
class="nameimg"
|
||||||
|
src="../../assets/images/basicinfo/asterisk.png"
|
||||||
|
/>
|
||||||
<div class="inname">项目级别</div>
|
<div class="inname">项目级别</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="in select">
|
<div class="in select">
|
||||||
<a-select :getPopupContainer="
|
<a-select
|
||||||
|
:getPopupContainer="
|
||||||
(triggerNode) => {
|
(triggerNode) => {
|
||||||
return triggerNode.parentNode || document.body;
|
return triggerNode.parentNode || document.body;
|
||||||
}
|
}
|
||||||
" v-model:value="classifySelect3" :options="classifyList3" @change="classificationChange3"
|
"
|
||||||
placeholder="集团级/组织级/现地级/部门级" />
|
v-model:value="classifySelect3"
|
||||||
|
:options="classifyList3"
|
||||||
|
@change="classificationChange3"
|
||||||
|
placeholder="集团级/组织级/现地级/部门级"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
<div class="namebox">
|
<div class="namebox">
|
||||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
<img
|
||||||
|
class="nameimg"
|
||||||
|
src="../../assets/images/basicinfo/asterisk.png"
|
||||||
|
/>
|
||||||
<div class="inname">培训体系</div>
|
<div class="inname">培训体系</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="in select">
|
<div class="in select">
|
||||||
<a-select :getPopupContainer="
|
<a-select
|
||||||
|
:getPopupContainer="
|
||||||
(triggerNode) => {
|
(triggerNode) => {
|
||||||
return triggerNode.parentNode || document.body;
|
return triggerNode.parentNode || document.body;
|
||||||
}
|
}
|
||||||
" v-model:value="classifySelect4" :options="classifyList4" @change="classificationChange4"
|
"
|
||||||
placeholder="集团级/组织级/现地级/部门级" />
|
v-model:value="classifySelect4"
|
||||||
|
:options="classifyList4"
|
||||||
|
@change="classificationChange4"
|
||||||
|
placeholder="集团级/组织级/现地级/部门级"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
<div class="namebox">
|
<div class="namebox">
|
||||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
<img
|
||||||
|
class="nameimg"
|
||||||
|
src="../../assets/images/basicinfo/asterisk.png"
|
||||||
|
/>
|
||||||
<div class="inname">是否BOEU实施</div>
|
<div class="inname">是否BOEU实施</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<a-radio @click="changeChecked1" v-model:checked="checked1"><span style="
|
<a-radio @click="changeChecked1" v-model:checked="checked1"
|
||||||
|
><span
|
||||||
|
style="
|
||||||
width: 100%;
|
width: 100%;
|
||||||
color: rgba(109, 117, 132, 1);
|
color: rgba(109, 117, 132, 1);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
">BOEU实施</span></a-radio>
|
"
|
||||||
|
>BOEU实施</span
|
||||||
|
></a-radio
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="name name2">
|
<!-- <div class="name name2">
|
||||||
@@ -191,19 +297,37 @@
|
|||||||
<div class="name">
|
<div class="name">
|
||||||
<div class="inname" style="width: 50px">模版</div>
|
<div class="inname" style="width: 50px">模版</div>
|
||||||
<div class="in select" style="margin-left: 2px">
|
<div class="in select" style="margin-left: 2px">
|
||||||
<a-select v-if="isEdit" disabled="true" :getPopupContainer="
|
<a-select
|
||||||
|
v-if="isEdit"
|
||||||
|
disabled="true"
|
||||||
|
:getPopupContainer="
|
||||||
(triggerNode) => {
|
(triggerNode) => {
|
||||||
return triggerNode.parentNode || document.body;
|
return triggerNode.parentNode || document.body;
|
||||||
}
|
}
|
||||||
" v-model:value="classifySelect5" placeholder="请选择模版" :size="size" style="width: 100%" :options="classifyList5"
|
"
|
||||||
@change="classificationChange5">
|
v-model:value="classifySelect5"
|
||||||
|
placeholder="请选择模版"
|
||||||
|
:size="size"
|
||||||
|
style="width: 100%"
|
||||||
|
:options="classifyList5"
|
||||||
|
@change="classificationChange5"
|
||||||
|
>
|
||||||
</a-select>
|
</a-select>
|
||||||
<a-select v-else :getPopupContainer="
|
<a-select
|
||||||
|
v-else
|
||||||
|
:getPopupContainer="
|
||||||
(triggerNode) => {
|
(triggerNode) => {
|
||||||
return triggerNode.parentNode || document.body;
|
return triggerNode.parentNode || document.body;
|
||||||
}
|
}
|
||||||
" v-model:value="classifySelect5" placeholder="请选择模版" :size="size" style="width: 100%" :options="classifyList5"
|
"
|
||||||
@change="classificationChange5">
|
v-model:value="classifySelect5"
|
||||||
|
placeholder="请选择模版"
|
||||||
|
:size="size"
|
||||||
|
style="width: 100%"
|
||||||
|
:options="classifyList5"
|
||||||
|
@change="classificationChange5"
|
||||||
|
@popupScroll="templateScroll"
|
||||||
|
>
|
||||||
</a-select>
|
</a-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -211,7 +335,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<div class="btn">
|
<div class="btn">
|
||||||
<a-button v-on:click="createProject" type="primary" class="btn1">确定</a-button>
|
<a-button v-on:click="createProject" type="primary" class="btn1"
|
||||||
|
>确定</a-button
|
||||||
|
>
|
||||||
<a-button @click="backPage" class="btn2">取消</a-button>
|
<a-button @click="backPage" class="btn2">取消</a-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -221,10 +347,10 @@
|
|||||||
import { reactive, toRefs, ref } from "vue";
|
import { reactive, toRefs, ref } from "vue";
|
||||||
import { message } from "ant-design-vue";
|
import { message } from "ant-design-vue";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
import dayjs from 'dayjs';
|
import dayjs from "dayjs";
|
||||||
import * as api from "../../api/index";
|
import * as api from "../../api/index";
|
||||||
import { storage } from '../../api/storage';
|
import { storage } from "../../api/storage";
|
||||||
import { toDate } from '../../api/method'
|
import { toDate } from "../../api/method";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "projectAdd",
|
name: "projectAdd",
|
||||||
@@ -239,35 +365,38 @@ export default {
|
|||||||
isEdit.value = true;
|
isEdit.value = true;
|
||||||
peojectID = routers.query.projectId;
|
peojectID = routers.query.projectId;
|
||||||
// 需要编辑
|
// 需要编辑
|
||||||
api.getProjectDetail({ projectId: routers.query.projectId }).then(res => {
|
api
|
||||||
|
.getProjectDetail({ projectId: routers.query.projectId })
|
||||||
|
.then((res) => {
|
||||||
if (res.status == 200 && res.data.code == 200) {
|
if (res.status == 200 && res.data.code == 200) {
|
||||||
let info = res.data.data.projectInfo;
|
let info = res.data.data.projectInfo;
|
||||||
console.log(info)
|
console.log(info);
|
||||||
// projectName classifySelect imageUrl * classifySelect1 * remark checked classifySelect3 classifySelect4 changeChecked1 *
|
// projectName classifySelect imageUrl * classifySelect1 * remark checked classifySelect3 classifySelect4 changeChecked1 *
|
||||||
projectName.value = info.name;
|
projectName.value = info.name;
|
||||||
state.classifySelect = classifyList.value[1]; // info.category
|
state.classifySelect = classifyList.value[1]; // info.category
|
||||||
imageUrl.value = info.picUrl;
|
imageUrl.value = info.picUrl;
|
||||||
|
|
||||||
let start = toDate(info.beginTime/1000,'YYYY/MM/DD');
|
let start = toDate(info.beginTime / 1000, "YYYY/MM/DD");
|
||||||
let end = toDate(info.endTime/1000,'YYYY/MM/DD');
|
let end = toDate(info.endTime / 1000, "YYYY/MM/DD");
|
||||||
state.rangevalue = [
|
state.rangevalue = [
|
||||||
dayjs(start, 'YYYY/MM/DD'),
|
dayjs(start, "YYYY/MM/DD"),
|
||||||
dayjs(end, 'YYYY/MM/DD'),
|
dayjs(end, "YYYY/MM/DD"),
|
||||||
];
|
];
|
||||||
|
|
||||||
let manageName = info.manager.split(",");
|
let manageName = info.manager.split(",");
|
||||||
let manageValue = info.managerId.split(",");
|
let manageValue = info.managerId.split(",");
|
||||||
let optionsManage = []
|
let optionsManage = [];
|
||||||
for (let i = 0; i < manageName.length; i++) {
|
for (let i = 0; i < manageName.length; i++) {
|
||||||
let obj = {
|
let obj = {
|
||||||
label: manageName[i],
|
label: manageName[i],
|
||||||
value: manageValue[i]
|
value: manageValue[i],
|
||||||
|
};
|
||||||
|
optionsManage.push(obj);
|
||||||
}
|
}
|
||||||
optionsManage.push(obj)
|
console.log(optionsManage);
|
||||||
}
|
|
||||||
console.log(optionsManage)
|
|
||||||
state.classifySelect1 = optionsManage;
|
state.classifySelect1 = optionsManage;
|
||||||
state.classifySelect2 = classifyList2.value[info.sourceBelongId - 1];
|
state.classifySelect2 =
|
||||||
|
classifyList2.value[info.sourceBelongId - 1];
|
||||||
remark.value = info.remark;
|
remark.value = info.remark;
|
||||||
state.checked = info.boeFlag ? info.boeFlag : false;
|
state.checked = info.boeFlag ? info.boeFlag : false;
|
||||||
state.classifySelect3 = classifyList3.value[info.level];
|
state.classifySelect3 = classifyList3.value[info.level];
|
||||||
@@ -277,8 +406,8 @@ export default {
|
|||||||
|
|
||||||
projectType = 1;
|
projectType = 1;
|
||||||
picUrl = info.picUrl;
|
picUrl = info.picUrl;
|
||||||
beginTime = Number(info.beginTime/1000);
|
beginTime = Number(info.beginTime / 1000);
|
||||||
endTime = Number(info.endTime/1000);
|
endTime = Number(info.endTime / 1000);
|
||||||
manager = info.manager;
|
manager = info.manager;
|
||||||
managerId = info.managerId;
|
managerId = info.managerId;
|
||||||
sourceBelongIdC = Number(info.sourceBelongId);
|
sourceBelongIdC = Number(info.sourceBelongId);
|
||||||
@@ -287,40 +416,46 @@ export default {
|
|||||||
systemid = info.systemId;
|
systemid = info.systemId;
|
||||||
boeFlag = info.boeFlag;
|
boeFlag = info.boeFlag;
|
||||||
}
|
}
|
||||||
}).catch(err => { console.log(err) })
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
if (storage.get("projectAddId")) {
|
if (storage.get("projectAddId")) {
|
||||||
isEdit.value = true;
|
isEdit.value = true;
|
||||||
peojectID = storage.get("projectAddId");
|
peojectID = storage.get("projectAddId");
|
||||||
// 需要编辑
|
// 需要编辑
|
||||||
api.getProjectDetail({ projectId: storage.get("projectAddId") }).then(res => {
|
api
|
||||||
|
.getProjectDetail({ projectId: storage.get("projectAddId") })
|
||||||
|
.then((res) => {
|
||||||
if (res.status == 200 && res.data.code == 200) {
|
if (res.status == 200 && res.data.code == 200) {
|
||||||
let info = res.data.data.projectInfo;
|
let info = res.data.data.projectInfo;
|
||||||
console.log("我是从本地存储获取的id", info)
|
console.log("我是从本地存储获取的id", info);
|
||||||
projectName.value = info.name;
|
projectName.value = info.name;
|
||||||
state.classifySelect = classifyList.value[1]; // info.category
|
state.classifySelect = classifyList.value[1]; // info.category
|
||||||
imageUrl.value = info.picUrl;
|
imageUrl.value = info.picUrl;
|
||||||
|
|
||||||
let start = toDate(info.beginTime/1000,'YYYY/MM/DD');
|
let start = toDate(info.beginTime / 1000, "YYYY/MM/DD");
|
||||||
let end = toDate(info.endTime/1000,'YYYY/MM/DD');
|
let end = toDate(info.endTime / 1000, "YYYY/MM/DD");
|
||||||
state.rangevalue = [
|
state.rangevalue = [
|
||||||
dayjs(start, 'YYYY/MM/DD'),
|
dayjs(start, "YYYY/MM/DD"),
|
||||||
dayjs(end, 'YYYY/MM/DD'),
|
dayjs(end, "YYYY/MM/DD"),
|
||||||
];
|
];
|
||||||
|
|
||||||
let manageName = info.manager.split(",");
|
let manageName = info.manager.split(",");
|
||||||
let manageValue = info.managerId.split(",");
|
let manageValue = info.managerId.split(",");
|
||||||
let optionsManage = []
|
let optionsManage = [];
|
||||||
for (let i = 0; i < manageName.length; i++) {
|
for (let i = 0; i < manageName.length; i++) {
|
||||||
let obj = {
|
let obj = {
|
||||||
label: manageName[i],
|
label: manageName[i],
|
||||||
value: manageValue[i]
|
value: manageValue[i],
|
||||||
|
};
|
||||||
|
optionsManage.push(obj);
|
||||||
}
|
}
|
||||||
optionsManage.push(obj)
|
console.log(optionsManage);
|
||||||
}
|
|
||||||
console.log(optionsManage)
|
|
||||||
state.classifySelect1 = optionsManage;
|
state.classifySelect1 = optionsManage;
|
||||||
state.classifySelect2 = classifyList2.value[info.sourceBelongId - 1];
|
state.classifySelect2 =
|
||||||
|
classifyList2.value[info.sourceBelongId - 1];
|
||||||
remark.value = info.remark;
|
remark.value = info.remark;
|
||||||
state.checked = info.boeFlag ? info.boeFlag : false;
|
state.checked = info.boeFlag ? info.boeFlag : false;
|
||||||
state.classifySelect3 = classifyList3.value[info.level];
|
state.classifySelect3 = classifyList3.value[info.level];
|
||||||
@@ -329,8 +464,8 @@ export default {
|
|||||||
|
|
||||||
projectType = 1;
|
projectType = 1;
|
||||||
picUrl = info.picUrl;
|
picUrl = info.picUrl;
|
||||||
beginTime = Number(info.beginTime/1000);
|
beginTime = Number(info.beginTime / 1000);
|
||||||
endTime = Number(info.endTime/1000);
|
endTime = Number(info.endTime / 1000);
|
||||||
manager = info.manager;
|
manager = info.manager;
|
||||||
managerId = info.managerId;
|
managerId = info.managerId;
|
||||||
sourceBelongIdC = Number(info.sourceBelongId);
|
sourceBelongIdC = Number(info.sourceBelongId);
|
||||||
@@ -339,7 +474,10 @@ export default {
|
|||||||
systemid = info.systemId;
|
systemid = info.systemId;
|
||||||
boeFlag = info.boeFlag;
|
boeFlag = info.boeFlag;
|
||||||
}
|
}
|
||||||
}).catch(err => { console.log(err) })
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -347,10 +485,10 @@ export default {
|
|||||||
storage.remove("projectAddId");
|
storage.remove("projectAddId");
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
router.push({
|
router.push({
|
||||||
path: "/projectmanage"
|
path: "/projectmanage",
|
||||||
});
|
});
|
||||||
}, 400);
|
}, 400);
|
||||||
}
|
};
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
@@ -365,7 +503,12 @@ export default {
|
|||||||
classifySelect2: [],
|
classifySelect2: [],
|
||||||
classifySelect3: [],
|
classifySelect3: [],
|
||||||
classifySelect4: [],
|
classifySelect4: [],
|
||||||
rangevalue: []
|
rangevalue: [],
|
||||||
|
|
||||||
|
currentPage: 1, //当前页
|
||||||
|
tableDataTotal: -1, //模版列表总数
|
||||||
|
pageSize: 10, //每页10条数据
|
||||||
|
totalPages: 0, //总页数
|
||||||
});
|
});
|
||||||
|
|
||||||
const projectName = ref("");
|
const projectName = ref("");
|
||||||
@@ -481,7 +624,7 @@ export default {
|
|||||||
|
|
||||||
let beginTime = "";
|
let beginTime = "";
|
||||||
let endTime = "";
|
let endTime = "";
|
||||||
const dateFormatList = ['YYYY/MM/DD'];
|
const dateFormatList = ["YYYY/MM/DD"];
|
||||||
|
|
||||||
const onRangeChange = (value, dateString) => {
|
const onRangeChange = (value, dateString) => {
|
||||||
console.log("Selected Time: ", value);
|
console.log("Selected Time: ", value);
|
||||||
@@ -522,7 +665,7 @@ export default {
|
|||||||
let newoptions = [];
|
let newoptions = [];
|
||||||
for (let i = 0; i < state.classifySelect1.length; i++) {
|
for (let i = 0; i < state.classifySelect1.length; i++) {
|
||||||
if (state.classifySelect1[i].value) {
|
if (state.classifySelect1[i].value) {
|
||||||
newoptions.push(state.classifySelect1[i])
|
newoptions.push(state.classifySelect1[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
state.classifySelect1 = newoptions;
|
state.classifySelect1 = newoptions;
|
||||||
@@ -537,7 +680,7 @@ export default {
|
|||||||
{ value: 3, label: "项目三" },
|
{ value: 3, label: "项目三" },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
let sourceBelongIdC = '';
|
let sourceBelongIdC = "";
|
||||||
const classificationChange2 = (key) => {
|
const classificationChange2 = (key) => {
|
||||||
console.log(`selected ${key}`, classifyList2);
|
console.log(`selected ${key}`, classifyList2);
|
||||||
sourceBelongIdC = key;
|
sourceBelongIdC = key;
|
||||||
@@ -573,13 +716,121 @@ export default {
|
|||||||
|
|
||||||
// 模版
|
// 模版
|
||||||
const classifyList5 = ref([
|
const classifyList5 = ref([
|
||||||
{ value: 1, label: "模版一" },
|
// { value: 1, label: "模版一" },
|
||||||
{ value: 2, label: "模版二" },
|
// { value: 2, label: "模版二" },
|
||||||
{ value: 3, label: "模版三" },
|
// { value: 3, label: "模版三" },
|
||||||
{ value: 4, label: "模版四" },
|
// { value: 4, label: "模版四" },
|
||||||
]);
|
]);
|
||||||
const classificationChange5 = (key) => {
|
const classificationChange5 = (key) => {
|
||||||
console.log(`selected ${key}`, classifyList5);
|
console.log(`selected ${key}`, classifyList5.value);
|
||||||
|
//获取模版信息
|
||||||
|
let obj = {
|
||||||
|
projectId: Number(key),
|
||||||
|
};
|
||||||
|
api
|
||||||
|
.getProjectDetail(obj)
|
||||||
|
.then((res) => {
|
||||||
|
console.log("获取项目详情", res);
|
||||||
|
if (res.status === 200) {
|
||||||
|
let info = res.data.data.projectInfo;
|
||||||
|
console.log(info);
|
||||||
|
// projectName classifySelect imageUrl * classifySelect1 * remark checked classifySelect3 classifySelect4 changeChecked1 *
|
||||||
|
projectName.value = info.name;
|
||||||
|
state.classifySelect = classifyList.value[1]; // info.category
|
||||||
|
imageUrl.value = info.picUrl;
|
||||||
|
|
||||||
|
let start = toDate(info.beginTime / 1000, "YYYY/MM/DD");
|
||||||
|
let end = toDate(info.endTime / 1000, "YYYY/MM/DD");
|
||||||
|
state.rangevalue = [
|
||||||
|
dayjs(start, "YYYY/MM/DD"),
|
||||||
|
dayjs(end, "YYYY/MM/DD"),
|
||||||
|
];
|
||||||
|
|
||||||
|
let manageName = info.manager.split(",");
|
||||||
|
let manageValue = info.managerId.split(",");
|
||||||
|
let optionsManage = [];
|
||||||
|
for (let i = 0; i < manageName.length; i++) {
|
||||||
|
let obj = {
|
||||||
|
label: manageName[i],
|
||||||
|
value: manageValue[i],
|
||||||
|
};
|
||||||
|
optionsManage.push(obj);
|
||||||
|
}
|
||||||
|
console.log(optionsManage);
|
||||||
|
state.classifySelect1 = optionsManage;
|
||||||
|
state.classifySelect2 =
|
||||||
|
classifyList2.value[info.sourceBelongId - 1];
|
||||||
|
remark.value = info.remark;
|
||||||
|
state.checked = info.boeFlag ? info.boeFlag : false;
|
||||||
|
state.classifySelect3 = classifyList3.value[info.level];
|
||||||
|
state.classifySelect4 = classifyList4.value[info.systemId - 1];
|
||||||
|
state.checked1 = info.boeFlag ? info.boeFlag : false;
|
||||||
|
// fileList1.value = info.attach.split(",");
|
||||||
|
|
||||||
|
projectType = 1;
|
||||||
|
picUrl = info.picUrl;
|
||||||
|
beginTime = Number(info.beginTime / 1000);
|
||||||
|
endTime = Number(info.endTime / 1000);
|
||||||
|
manager = info.manager;
|
||||||
|
managerId = info.managerId;
|
||||||
|
sourceBelongIdC = Number(info.sourceBelongId);
|
||||||
|
courseSyncFlag = info.courseSyncFlag;
|
||||||
|
levels = info.level;
|
||||||
|
systemid = info.systemId;
|
||||||
|
boeFlag = info.boeFlag;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log("获取详情失败", err);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
//获取模版列表
|
||||||
|
const getTemplate = () => {
|
||||||
|
let obj = {
|
||||||
|
pageNo: state.currentPage,
|
||||||
|
pageSize: state.pageSize,
|
||||||
|
// projectId:id?id:''
|
||||||
|
};
|
||||||
|
api
|
||||||
|
.getProjectList(obj)
|
||||||
|
.then((res) => {
|
||||||
|
console.log("获取模版列表", res);
|
||||||
|
state.totalPages = Number(res.data.data.pages);
|
||||||
|
if (res.status === 200) {
|
||||||
|
let arr = res.data.data.rows;
|
||||||
|
let array = classifyList5.value;
|
||||||
|
arr.map((value) => {
|
||||||
|
let obj = {
|
||||||
|
value: value.projectId,
|
||||||
|
label: value.name,
|
||||||
|
};
|
||||||
|
array.push(obj);
|
||||||
|
});
|
||||||
|
classifyList5.value = array;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log("获取模版列表失败", err);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
getTemplate();
|
||||||
|
//模版滚动加载信息
|
||||||
|
const templateScroll = (e) => {
|
||||||
|
// console.log("滚动", e, b);
|
||||||
|
const { target } = e;
|
||||||
|
const scrllHeight = target.scrollHeight - target.scrollTop;
|
||||||
|
const clientHeight = target.clientHeight;
|
||||||
|
// console.log("scrllHeight", scrllHeight, clientHeight);
|
||||||
|
if (scrllHeight === 0 && clientHeight === 0) {
|
||||||
|
state.currentPage = 1;
|
||||||
|
} else if (scrllHeight - clientHeight == 0) {
|
||||||
|
// 下拉到底部时
|
||||||
|
if (state.currentPage < state.totalPages) {
|
||||||
|
// 如果滑到底部,则加载下一页
|
||||||
|
state.currentPage++;
|
||||||
|
getTemplate();
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 项目说明
|
// 项目说明
|
||||||
@@ -631,13 +882,13 @@ export default {
|
|||||||
sourceBelongId: "请选择资源归属",
|
sourceBelongId: "请选择资源归属",
|
||||||
level: "请填写项目级别",
|
level: "请填写项目级别",
|
||||||
systemId: "请填写项目培训体系",
|
systemId: "请填写项目培训体系",
|
||||||
boeFlag: "请选择是否BOE实施"
|
boeFlag: "请选择是否BOE实施",
|
||||||
};
|
};
|
||||||
|
|
||||||
const createProject = () => {
|
const createProject = () => {
|
||||||
console.log('我是否要编辑项目', isEdit.value)
|
console.log("我是否要编辑项目", isEdit.value);
|
||||||
if (isEdit.value) {
|
if (isEdit.value) {
|
||||||
console.log('我要编辑项目', peojectID)
|
console.log("我要编辑项目", peojectID);
|
||||||
let obj = {
|
let obj = {
|
||||||
projectId: Number(peojectID),
|
projectId: Number(peojectID),
|
||||||
name: projectName["value"],
|
name: projectName["value"],
|
||||||
@@ -682,7 +933,7 @@ export default {
|
|||||||
message.success("编辑成功");
|
message.success("编辑成功");
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
router.push({
|
router.push({
|
||||||
path: "/projectmanage"
|
path: "/projectmanage",
|
||||||
});
|
});
|
||||||
}, 1000);
|
}, 1000);
|
||||||
} else {
|
} else {
|
||||||
@@ -695,7 +946,6 @@ export default {
|
|||||||
message.destroy();
|
message.destroy();
|
||||||
message.error("编辑失败,请检查当前网络状态。");
|
message.error("编辑失败,请检查当前网络状态。");
|
||||||
});
|
});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
let obj = {
|
let obj = {
|
||||||
name: projectName["value"],
|
name: projectName["value"],
|
||||||
@@ -789,6 +1039,8 @@ export default {
|
|||||||
isEdit,
|
isEdit,
|
||||||
backPage,
|
backPage,
|
||||||
dateFormatList,
|
dateFormatList,
|
||||||
|
|
||||||
|
templateScroll,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -948,7 +1200,7 @@ export default {
|
|||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
// height: 120%;
|
// height: 120%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 40px;
|
// height: 40px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -132,7 +132,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 添加案例侧弹窗 -->
|
<!-- 添加案例侧弹窗 -->
|
||||||
<div>
|
<div>
|
||||||
<add-case v-model:addcaseVisible="addcasevisible" />
|
<add-case v-model:addcaseVisible="addcasevisible" @changeData="updateTableData" v-model:edit="edit"
|
||||||
|
v-model:projectId="projectId" v-model:chooseStageId="chooseStageId" v-model:projectTaskId="projectTaskId"
|
||||||
|
v-model:EditCaseId="EditCaseId" />
|
||||||
</div>
|
</div>
|
||||||
<!-- 添加案例侧弹窗 -->
|
<!-- 添加案例侧弹窗 -->
|
||||||
<div class="lin"></div>
|
<div class="lin"></div>
|
||||||
@@ -962,6 +964,8 @@ export default {
|
|||||||
EditActiveId: null, //要编辑的活动id
|
EditActiveId: null, //要编辑的活动id
|
||||||
EditWorkId: null, // 要编辑的作业id
|
EditWorkId: null, // 要编辑的作业id
|
||||||
EditTestId: null, // 要编辑的考试id
|
EditTestId: null, // 要编辑的考试id
|
||||||
|
EditCaseId:null,//要编辑的案例id
|
||||||
|
EditOnlineId:null,//要编辑的在线id
|
||||||
EditEvalId: null,
|
EditEvalId: null,
|
||||||
EditInvistId: null,
|
EditInvistId: null,
|
||||||
EditVoteId: null, //编辑需要投票的id
|
EditVoteId: null, //编辑需要投票的id
|
||||||
@@ -1519,8 +1523,10 @@ export default {
|
|||||||
const showDrawerFaceteach = () => {
|
const showDrawerFaceteach = () => {
|
||||||
state.addfaceteachvisible = true;
|
state.addfaceteachvisible = true;
|
||||||
};
|
};
|
||||||
const showDrawerAddCase = () => {
|
const showDrawerAddCase = (id, eleId) => {
|
||||||
state.addcasevisible = true;
|
state.addcasevisible = true;
|
||||||
|
state.EditCaseId = id;
|
||||||
|
state.projectTaskId = eleId;
|
||||||
};
|
};
|
||||||
const showDrawerAddHomework = (id, eleId) => {
|
const showDrawerAddHomework = (id, eleId) => {
|
||||||
state.EditWorkId = id;
|
state.EditWorkId = id;
|
||||||
|
|||||||
@@ -419,23 +419,7 @@
|
|||||||
<div
|
<div
|
||||||
class="operation"
|
class="operation"
|
||||||
style="cursor: pointer"
|
style="cursor: pointer"
|
||||||
:style="{
|
@click="showCodeModal"
|
||||||
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
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
二维码
|
二维码
|
||||||
</div>
|
</div>
|
||||||
@@ -1373,6 +1357,7 @@
|
|||||||
</a-modal>
|
</a-modal>
|
||||||
</div>
|
</div>
|
||||||
<!-- 删除弹窗 -->
|
<!-- 删除弹窗 -->
|
||||||
|
|
||||||
<!-- 面授管理二维码 -->
|
<!-- 面授管理二维码 -->
|
||||||
<a-modal
|
<a-modal
|
||||||
v-model:visible="copyModal"
|
v-model:visible="copyModal"
|
||||||
@@ -1490,6 +1475,15 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 编辑项目弹窗 -->
|
<!-- 编辑项目弹窗 -->
|
||||||
<proj-set v-model:editHs="editHs" v-model:projectId="projectId" />
|
<proj-set v-model:editHs="editHs" v-model:projectId="projectId" />
|
||||||
|
|
||||||
|
<!-- 二维码弹窗 -->
|
||||||
|
<two-dimensional-code
|
||||||
|
v-model:codevisible="codevisible"
|
||||||
|
:codeInfo="codeInfo"
|
||||||
|
index="0"
|
||||||
|
type="课程二维码"
|
||||||
|
/>
|
||||||
|
<!-- 二维码弹窗 -->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -1529,6 +1523,7 @@ import { getTask } from "../../api/indexTaskadd";
|
|||||||
import { toDate } from "../../api/method";
|
import { toDate } from "../../api/method";
|
||||||
import projSet from "../../components/Modals/projSet";
|
import projSet from "../../components/Modals/projSet";
|
||||||
import { overview } from "../../api/indexProjStu";
|
import { overview } from "../../api/indexProjStu";
|
||||||
|
import TwoDimensionalCode from "../../components/TwoDimensionalCode.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "taskPage",
|
name: "taskPage",
|
||||||
components: {
|
components: {
|
||||||
@@ -1550,6 +1545,7 @@ export default {
|
|||||||
TaskImpStu,
|
TaskImpStu,
|
||||||
projSet,
|
projSet,
|
||||||
NoticeHis,
|
NoticeHis,
|
||||||
|
TwoDimensionalCode,
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
@@ -1664,6 +1660,9 @@ export default {
|
|||||||
|
|
||||||
huodModal: false, //活动二维码弹窗
|
huodModal: false, //活动二维码弹窗
|
||||||
allDelete: false, //批量删除弹窗
|
allDelete: false, //批量删除弹窗
|
||||||
|
|
||||||
|
codevisible: false, //二维码弹窗
|
||||||
|
codeInfo: null, //二维码信息
|
||||||
pubproject: false,
|
pubproject: false,
|
||||||
stugroup: false,
|
stugroup: false,
|
||||||
canclestu: false,
|
canclestu: false,
|
||||||
@@ -2505,6 +2504,15 @@ export default {
|
|||||||
const showEditProj = () => {
|
const showEditProj = () => {
|
||||||
state.editHs = true;
|
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 = () => {
|
const studentData = () => {
|
||||||
@@ -3199,6 +3207,7 @@ export default {
|
|||||||
closehuodModal,
|
closehuodModal,
|
||||||
closezhibModal,
|
closezhibModal,
|
||||||
|
|
||||||
|
showCodeModal,
|
||||||
tabsChange,
|
tabsChange,
|
||||||
|
|
||||||
getTaskList,
|
getTaskList,
|
||||||
|
|||||||
@@ -91,10 +91,10 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div @click="changeCodevisible">显示二维码弹窗</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>
|
<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>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { reactive, toRefs } from "vue";
|
import { reactive, toRefs } from "vue";
|
||||||
|
|||||||
Reference in New Issue
Block a user