mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 04:16:47 +08:00
feat:增加选择模版等
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2022-11-07 17:06:45
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2022-11-09 09:32:35
|
||||
* @LastEditTime: 2022-11-15 16:43:26
|
||||
* @FilePath: /fe-manage/src/api/index.js
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
@@ -64,8 +64,8 @@ export const handleProject = (obj) => http.post('/admin/project/handle', obj)
|
||||
export const taskStudentList = (obj) => http.post('/admin/project/taskStudentList', obj)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//获取讨论信息
|
||||
export const getDiscussDetail=(obj)=>http.post('/discuss/getDiscussDetail',obj)
|
||||
|
||||
//获取模版列表
|
||||
export const getTemplate=(obj)=>http.post('/admin/project/template/list',obj)
|
||||
|
||||
@@ -165,9 +165,212 @@ function autoComma(number) {
|
||||
const commonData={
|
||||
timeout:50
|
||||
}
|
||||
|
||||
|
||||
//组织树
|
||||
const organizationalTree= [
|
||||
{
|
||||
title: "京东方",
|
||||
value: "京东方",
|
||||
children: [
|
||||
{
|
||||
title: "产研部",
|
||||
value: "产研部",
|
||||
children: [
|
||||
{
|
||||
title: "产品部",
|
||||
value: "产品部",
|
||||
},
|
||||
{
|
||||
title: "研究部",
|
||||
value: "研究部",
|
||||
},
|
||||
{
|
||||
title: "研究部2",
|
||||
value: "研究部2",
|
||||
},
|
||||
{
|
||||
title: "研究3",
|
||||
value: "研究3",
|
||||
},
|
||||
{
|
||||
title: "研究4",
|
||||
value: "研究4",
|
||||
},
|
||||
{
|
||||
title: "研究部5",
|
||||
value: "研究部5",
|
||||
},
|
||||
{
|
||||
title: "研究部6",
|
||||
value: "研究部6",
|
||||
},
|
||||
{
|
||||
title: "研究部7",
|
||||
value: "研究部7",
|
||||
},
|
||||
{
|
||||
title: "研究部8",
|
||||
value: "研究部8",
|
||||
},
|
||||
{
|
||||
title: "研究部9",
|
||||
value: "研究部9",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "二级标题",
|
||||
value: "二级标题",
|
||||
children: [
|
||||
{
|
||||
title: "三级标题",
|
||||
value: "三级标题",
|
||||
children: [
|
||||
{
|
||||
title: "四级标题",
|
||||
value: "四级标题",
|
||||
children: [
|
||||
{
|
||||
title: "五级标题",
|
||||
value: "五级标题",
|
||||
children: [
|
||||
{
|
||||
title: "六级标题",
|
||||
value: "六级标题",
|
||||
children: [
|
||||
{
|
||||
title: "七级标题",
|
||||
value: "七级标题",
|
||||
children: [
|
||||
{
|
||||
title: "八级标题",
|
||||
value: "八级标题",
|
||||
children: [
|
||||
{
|
||||
title: "九级标题",
|
||||
value: "九级标题",
|
||||
children: [
|
||||
{
|
||||
title: "十级标题",
|
||||
value: "十级标题",
|
||||
children: [
|
||||
{
|
||||
title: "十一级标题",
|
||||
value: "十一级标题",
|
||||
children: [
|
||||
{
|
||||
title: "十二级标题",
|
||||
value: "十二级标题",
|
||||
children: [
|
||||
{
|
||||
title:
|
||||
"十三级标题十三级标题十三级标题十三级标题",
|
||||
value: "十三级标题",
|
||||
children: [
|
||||
{
|
||||
title:
|
||||
"十四级标题",
|
||||
value:
|
||||
"十四级标题",
|
||||
children: [
|
||||
{
|
||||
title:
|
||||
"十五级标题",
|
||||
value:
|
||||
"十五级标题",
|
||||
children: [
|
||||
{
|
||||
title:
|
||||
"十六级标题",
|
||||
value:
|
||||
"十六级标题",
|
||||
children:
|
||||
[
|
||||
{
|
||||
title:
|
||||
"十七级标题",
|
||||
value:
|
||||
"十七级标题",
|
||||
children:
|
||||
[
|
||||
{
|
||||
title:
|
||||
"十八级标题",
|
||||
value:
|
||||
"十八级标题",
|
||||
children:
|
||||
[
|
||||
{
|
||||
title:
|
||||
"十九级标题",
|
||||
value:
|
||||
"十九级标题",
|
||||
children:
|
||||
[
|
||||
{
|
||||
title:
|
||||
"二十级标题二十级标题",
|
||||
value:
|
||||
"二十级标题二十级标题",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "人力资源部",
|
||||
value: "人力资源部",
|
||||
children: [
|
||||
{
|
||||
title: "人事部",
|
||||
value: "人事部",
|
||||
},
|
||||
{
|
||||
title: "行政部",
|
||||
value: "行政部",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
export {
|
||||
toDate,
|
||||
getWeek,
|
||||
autoComma,
|
||||
commonData,
|
||||
organizationalTree,
|
||||
}
|
||||
@@ -7,25 +7,45 @@
|
||||
:closable="closableQR"
|
||||
wrapClassName="codeModal"
|
||||
style="margin-top: 400px"
|
||||
:zIndex="9999"
|
||||
:zIndex="999"
|
||||
@cancel="qr_exit"
|
||||
>
|
||||
<div id="qrcode" class="QR">
|
||||
<div class="qr_header"></div>
|
||||
<div class="qr_main">
|
||||
<div class="qrm_header">
|
||||
<span style="title">{{codeInfo.title?codeInfo.title:''}}</span>
|
||||
<span style="title">{{
|
||||
codeInfo.title ? codeInfo.title : ""
|
||||
}}</span>
|
||||
<div class="close_exit" @click="closeCodeModal"></div>
|
||||
</div>
|
||||
<div class="downloadCode" style="">
|
||||
<div class="qrm_body">
|
||||
<div class="codename">{{codeInfo.name?codeInfo.name:''}}</div>
|
||||
<div class="codename">
|
||||
{{ codeInfo.name ? codeInfo.name : "" }}
|
||||
</div>
|
||||
<qrcode-vue
|
||||
:value="codeInfo.url ? codeInfo.url : ''"
|
||||
:size="qrcodeSize"
|
||||
style="width: 200px; height: 200px"
|
||||
></qrcode-vue>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="codeUrl" :style="{ display: showUrl ? 'flex' : 'none' }">
|
||||
<div class="codeUrlLink">链接</div>
|
||||
<a-input
|
||||
:value="codeInfo.url ? codeInfo.url : ''"
|
||||
disabled
|
||||
class="codeUrlInp"
|
||||
/>
|
||||
<a-input
|
||||
:value="codeInfo.url ? codeInfo.url : ''"
|
||||
id="courseUrl"
|
||||
class="codeUrlInp"
|
||||
style="position: absolute; opacity: 0; z-index: -1"
|
||||
/>
|
||||
<div @click="copyUrl" class="codeUrlCopy">复制链接</div>
|
||||
</div>
|
||||
<div class="qrm_footer">
|
||||
<span style="margin-left: 52px">下载二维码</span>
|
||||
<div class="qrmbtn" @click="downloadQr(200)">
|
||||
@@ -47,7 +67,8 @@
|
||||
<script>
|
||||
import { reactive, toRefs, watch } from "vue";
|
||||
import QrcodeVue from "qrcode.vue";
|
||||
// import html2canvas from "html2canvas";
|
||||
import html2canvas from "html2canvas";
|
||||
import { message } from "ant-design-vue";
|
||||
export default {
|
||||
name: "TwoDimensionalCode",
|
||||
components: {
|
||||
@@ -68,85 +89,29 @@ export default {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
qrcodeUrl: "https://www.baidu.com/",
|
||||
qrcodeSize: 800,
|
||||
codeInfo: {},
|
||||
courseUrl: "https://www.baidu.com/",
|
||||
showUrl: false,
|
||||
});
|
||||
|
||||
//下载二维码图片
|
||||
const downloadQr = (num) => {
|
||||
state.qrcodeSize = num;
|
||||
// let filename = `${new Date().getTime()}.png`;
|
||||
// let canvas = document.getElementsByTagName("canvas")[0];
|
||||
// let imageUrl = canvas.toDataURL("image/png");
|
||||
|
||||
// let canvasBox = document.createElement("canvas");
|
||||
// let ctx = canvasBox.getContext("2d");
|
||||
// var img = new Image();
|
||||
// // 需要添加文字的图片
|
||||
// img.src = imageUrl;
|
||||
// // 等待图片加载完成
|
||||
// img.onload = function () {
|
||||
// // 将图片添加到canvas
|
||||
// ctx.drawImage(img, 0, 0, 1240, 2208);
|
||||
// // 设置字体
|
||||
// ctx.font = "73px 微软雅黑 bolder";
|
||||
// // 设置字体颜色
|
||||
// ctx.fillStyle = "#955f17";
|
||||
// ctx.textAlign = "center";
|
||||
// // 添加文字和位置
|
||||
// ctx.fillText("微信名", 621, 1050);
|
||||
|
||||
// // 导出为图片
|
||||
// let url = canvasBox.toDataURL("image/png");
|
||||
// let a = document.createElement("a");
|
||||
// a.style.display = "none";
|
||||
// a.download = filename;
|
||||
// a.href = url;
|
||||
// document.body.appendChild(a);
|
||||
// a.click();
|
||||
// };
|
||||
|
||||
// // let a = document.createElement("a");
|
||||
// // a.style.display = "none";
|
||||
// // a.download = filename;
|
||||
// // a.href = imageUrl;
|
||||
// // document.body.appendChild(a);
|
||||
// // a.click();
|
||||
|
||||
// html2canvas(document.querySelector("#qrcode"), {
|
||||
// useCORS: true, //支持图片跨域
|
||||
// }).then((canvas) => {
|
||||
// // var extra_canvas = document.createElement("canvas");
|
||||
// // extra_canvas.setAttribute('width',num);
|
||||
// // extra_canvas.setAttribute('height',num);
|
||||
// // var ctx = extra_canvas.getContext('2d');
|
||||
// // ctx.drawImage(canvas,0,0,num,num);
|
||||
// // let filename = `${new Date().getTime()}.png`;
|
||||
// // var imageUrl = extra_canvas.toDataURL("image/png",1.0);
|
||||
|
||||
html2canvas(
|
||||
document.querySelectorAll(".downloadCode")[Number(props.index)],
|
||||
{
|
||||
useCORS: true, //支持图片跨域
|
||||
}
|
||||
).then((canvas) => {
|
||||
// console.log("canvas", canvas, canvas.width, canvas.style.width);
|
||||
|
||||
// // // let ctx = canvas.getContext('2d');
|
||||
// // // ctx.drawImage(canvas,0,0,canvas.width, canvas.height);
|
||||
// // // canvas.width=num
|
||||
// // // canvas.height=num
|
||||
// // // canvas.style.width=num+'px'
|
||||
// // // canvas.style.height=num+'px'
|
||||
// // let filename = `${new Date().getTime()}.png`;
|
||||
// // let imageUrl = canvas.toDataURL("image/png");
|
||||
// // let a = document.createElement("a");
|
||||
// // a.style.display = "none";
|
||||
// // a.download = filename;
|
||||
// // a.href = imageUrl;
|
||||
// // document.body.appendChild(a);
|
||||
// // a.click();
|
||||
// });
|
||||
console.log('document.getElementsByClassName',document.getElementsByClassName('codeModal'),Number(props.index))
|
||||
let canvas =document.getElementsByClassName('codeModal')[Number(props.index)].getElementsByTagName('canvas')[0];
|
||||
let filename = `${new Date().getTime()}.png`;
|
||||
let imageUrl = canvas.toDataURL("image/png");
|
||||
let a = document.createElement("a");
|
||||
@@ -155,6 +120,35 @@ console.log('document.getElementsByClassName',document.getElementsByClassName('c
|
||||
a.href = imageUrl;
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
});
|
||||
// let canvas =document.getElementsByClassName('codeModal')[Number(props.index)].getElementsByTagName('canvas')[0];
|
||||
// let filename = `${new Date().getTime()}.png`;
|
||||
// let imageUrl = canvas.toDataURL("image/png");
|
||||
// let a = document.createElement("a");
|
||||
// a.style.display = "none";
|
||||
// a.download = filename;
|
||||
// a.href = imageUrl;
|
||||
// document.body.appendChild(a);
|
||||
// a.click();
|
||||
};
|
||||
//复制链接
|
||||
const copyUrl = () => {
|
||||
// const range = document.createRange(); //创建range对象
|
||||
// range.selectNode(document.getElementById('courseUrl')); //获取复制内容的 id 选择器
|
||||
// const selection = window.getSelection(); //创建 selection对象
|
||||
// if (selection.rangeCount > 0) selection.removeAllRanges(); //如果页面已经有选取了的话,会自动删除这个选区,没有选区的话,会把这个选取加入选区
|
||||
// selection.addRange(range); //将range对象添加到selection选区当中,会高亮文本块
|
||||
// document.execCommand("Copy"); //复制选中的文字到剪贴板
|
||||
// message.success('复制成功')
|
||||
// selection.removeRange(range); // 移除选中的元素
|
||||
|
||||
var input = document.createElement("input"); // 创建input对象
|
||||
input.value = state.codeInfo.url ? state.codeInfo.url : ""; // 设置复制内容
|
||||
document.body.appendChild(input); // 添加临时实例
|
||||
input.select(); // 选择实例内容
|
||||
document.execCommand("Copy"); // 执行复制
|
||||
document.body.removeChild(input); // 删除临时实例
|
||||
message.success("复制成功!");
|
||||
};
|
||||
const closeCodeModal = () => {
|
||||
ctx.emit("update:codevisible", false);
|
||||
@@ -166,12 +160,20 @@ console.log('document.getElementsByClassName',document.getElementsByClassName('c
|
||||
url: "",
|
||||
};
|
||||
state.codeInfo = Object.assign(obj, props.codeInfo);
|
||||
console.log("codeInfo22222", state.codeInfo,props.index);
|
||||
console.log("codeInfo22222", state.codeInfo, props.index, props.type);
|
||||
|
||||
if (props.type === "签到二维码") {
|
||||
state.showUrl = false;
|
||||
console.log(" state.showUrl", state.showUrl);
|
||||
} else if (props.type === "课程二维码") {
|
||||
state.showUrl = true;
|
||||
}
|
||||
});
|
||||
return {
|
||||
...toRefs(state),
|
||||
downloadQr,
|
||||
closeCodeModal,
|
||||
copyUrl,
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -229,8 +231,8 @@ console.log('document.getElementsByClassName',document.getElementsByClassName('c
|
||||
}
|
||||
.qrm_body {
|
||||
width: 100%;
|
||||
margin-top: 22px;
|
||||
margin-bottom: 32px;
|
||||
padding-top: 22px;
|
||||
padding-bottom: 32px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
@@ -242,6 +244,51 @@ console.log('document.getElementsByClassName',document.getElementsByClassName('c
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
.codeUrl {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 24px;
|
||||
.codeUrlLink {
|
||||
width: 72px;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #c7cbd2;
|
||||
line-height: 20px;
|
||||
border: 1px solid #c7cbd2;
|
||||
border-right: 0px solid #c7cbd2;
|
||||
}
|
||||
.codeUrlInp {
|
||||
width: 305px;
|
||||
height: 40px;
|
||||
border: 1px solid #c7cbd2;
|
||||
}
|
||||
.ant-input-disabled {
|
||||
background-color: rgba(0, 0, 0, 0) !important;
|
||||
}
|
||||
.ant-input[disabled] {
|
||||
background-color: rgba(0, 0, 0, 0) !important;
|
||||
}
|
||||
.codeUrlCopy {
|
||||
width: 96px;
|
||||
height: 40px;
|
||||
background-color: #388be1;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
line-height: 20px;
|
||||
cursor: pointer;
|
||||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
.qrm_footer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -121,169 +121,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="2" tab="添加组织" force-render>
|
||||
<div
|
||||
:style="{ height: screenHeight - 235 + 'px' }"
|
||||
style="overflow-y: auto"
|
||||
>
|
||||
<div class="tab2">
|
||||
<div class="nameinp">
|
||||
<div class="namee">组织:</div>
|
||||
<a-input
|
||||
v-model:value="com"
|
||||
style="width: 230px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入组织"
|
||||
/>
|
||||
</div>
|
||||
<div class="btns">
|
||||
<div class="btn1" @click="searchOrg">
|
||||
<div class="img1">
|
||||
<img
|
||||
src="../../assets/images/courseManage/search0.png"
|
||||
/>
|
||||
</div>
|
||||
<div class="wz">搜索</div>
|
||||
</div>
|
||||
<div class="btn2">
|
||||
<div class="img2">
|
||||
<img
|
||||
src="../../assets/images/courseManage/reset1.png"
|
||||
/>
|
||||
</div>
|
||||
<div class="wz">重置</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="t1">
|
||||
<div class="organize">姓名:</div>
|
||||
<a-input
|
||||
v-model:value="nameadd"
|
||||
style="width: 200px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入姓名"
|
||||
/>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="boeTree">
|
||||
<div class="boeTreeTitle">BOE组织树</div>
|
||||
|
||||
<a-tree
|
||||
class="treeMain treeMain2"
|
||||
:style="{ height: screenHeight - 430 + 'px' }"
|
||||
dropdownClassName="changetreedropdownboe"
|
||||
defaultExpandAll
|
||||
:dropdown-style="{
|
||||
maxHeight: '600px',
|
||||
}"
|
||||
placeholder="BOE组织树"
|
||||
allow-clear
|
||||
tree-default-expand-all
|
||||
:tree-data="treeData"
|
||||
@select="departmentSelect1"
|
||||
multiple
|
||||
v-model:selectedKeys="selectedKeys1"
|
||||
>
|
||||
<template #suffixIcon></template>
|
||||
</a-tree>
|
||||
<div
|
||||
class="boeTreeTitle"
|
||||
style="margin-top: 8px; cursor: pointer"
|
||||
@click="addOrgModal"
|
||||
>
|
||||
确认添加
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="3" tab="受众关联">
|
||||
<div
|
||||
:style="{ height: screenHeight - 235 + 'px' }"
|
||||
style="overflow-y: auto"
|
||||
>
|
||||
<div class="tab1">
|
||||
<div class="t1">
|
||||
<!-- <div class="nameinp">
|
||||
<div class="namee">选择受众:</div>
|
||||
<div class="select">
|
||||
<a-select
|
||||
v-model:value="choosevalue"
|
||||
style="width: 200px; border-radius: 8px"
|
||||
placeholder="请选择受众群体"
|
||||
:options="organizeList1"
|
||||
/>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="t1" style="margin-top: 10px">
|
||||
<div class="organize">受众名称:</div>
|
||||
<a-input
|
||||
v-model:value="nameaddd"
|
||||
style="width: 260px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入受众名称"
|
||||
/>
|
||||
</div>
|
||||
<div class="btns">
|
||||
<div class="btn1">
|
||||
<div class="img1">
|
||||
<img
|
||||
src="../../assets/images/courseManage/search0.png"
|
||||
/>
|
||||
</div>
|
||||
<div class="wz">搜索</div>
|
||||
</div>
|
||||
<div class="btn2">
|
||||
<div class="img2">
|
||||
<img
|
||||
src="../../assets/images/courseManage/reset1.png"
|
||||
/>
|
||||
</div>
|
||||
<div class="wz">重置</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="line">
|
||||
<div class="inline">
|
||||
<div class="left1">
|
||||
<div class="img"></div>
|
||||
<div class="text" style="margin-left: 10px">已选择</div>
|
||||
<div class="text2">2</div>
|
||||
<div class="text">项</div>
|
||||
<div class="text3">列表选项总计:</div>
|
||||
<div class="text4">9条</div>
|
||||
</div>
|
||||
<div class="right1">清空</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="tableBox tabb" style="margin-top: 16px">
|
||||
<a-table
|
||||
style="border: 1px solid #f2f6fe"
|
||||
:columns="tablecolumns2"
|
||||
:data-source="tabledata2"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
expandRowByClick="true"
|
||||
:scroll="{ x: 500 }"
|
||||
@expand="expandTable"
|
||||
:pagination="false"
|
||||
:row-selection="{
|
||||
columnWidth: 30,
|
||||
selectedRowKeys: selectedRowKeys2,
|
||||
onChange: onSelectChange2,
|
||||
}"
|
||||
/>
|
||||
<div class="pa" style="margin-top: 20px">
|
||||
<a-pagination
|
||||
showSizeChanger="true"
|
||||
showQuickJumper="true"
|
||||
hideOnSinglePage="true"
|
||||
:pageSize="pageSize2"
|
||||
:current="currentPage2"
|
||||
:total="tableDataTotal2"
|
||||
class="pagination"
|
||||
v-if="tabledata2 > 10"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</div>
|
||||
</div>
|
||||
@@ -356,134 +194,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
<div class="tit">添加组织</div>
|
||||
<div style="position: relative; min-height: 180px">
|
||||
<div
|
||||
style="position: relative; height: 160px"
|
||||
class="selectedsBox"
|
||||
id="selectedsBox1"
|
||||
>
|
||||
<div class="selecteds" id="selecteds1">
|
||||
<!-- 遍历生成 -->
|
||||
<div
|
||||
class="chose"
|
||||
v-for="item in chooseorganization1"
|
||||
:key="item.key"
|
||||
>
|
||||
<div>{{ item.value }}</div>
|
||||
<div class="ch" @click="deleteChoosePeople1(item)"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="chose"
|
||||
style="
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-right: 20px;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
color: #409eff;
|
||||
line-height: 22px;
|
||||
"
|
||||
v-if="showMore1"
|
||||
@click="morePeopleShow1"
|
||||
>
|
||||
<div>
|
||||
查看更多
|
||||
<img
|
||||
style="width: 10px; height: 12px; margin-top: -2px"
|
||||
src="../../assets/images/projectadd/go.png"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="chose"
|
||||
style="
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-right: 20px;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
color: #409eff;
|
||||
line-height: 22px;
|
||||
"
|
||||
v-if="showHidden1"
|
||||
@click="morePeopleHidden1"
|
||||
>
|
||||
<div>
|
||||
收起
|
||||
<img
|
||||
style="width: 10px; height: 12px; margin-top: -2px"
|
||||
src="../../assets/images/projectadd/pickUp.png"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
<div class="tit">受众关联</div>
|
||||
<div
|
||||
style="position: relative; min-height: 180px; padding-bottom: 40px"
|
||||
>
|
||||
<div style="height: 160px" class="selectedsBox" id="selectedsBox2">
|
||||
<div class="selecteds" id="selecteds2">
|
||||
<!-- 遍历生成 -->
|
||||
<div
|
||||
class="chose"
|
||||
v-for="item in relationpeople"
|
||||
:key="item.key"
|
||||
>
|
||||
<div>{{ item.name }}</div>
|
||||
<div class="ch" @click="deleteRelationPeople(item)"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="chose"
|
||||
style="
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-right: 20px;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
color: #409eff;
|
||||
line-height: 22px;
|
||||
"
|
||||
v-if="showMore2"
|
||||
@click="morePeopleShow2"
|
||||
>
|
||||
<div>
|
||||
查看更多
|
||||
<img
|
||||
style="width: 10px; height: 12px; margin-top: -2px"
|
||||
src="../../assets/images/projectadd/go.png"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="chose"
|
||||
style="
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-right: 20px;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
color: #409eff;
|
||||
line-height: 22px;
|
||||
"
|
||||
v-if="showHidden2"
|
||||
@click="morePeopleHidden2"
|
||||
>
|
||||
<div>
|
||||
收起
|
||||
<img
|
||||
style="width: 10px; height: 12px; margin-top: -2px"
|
||||
src="../../assets/images/projectadd/pickUp.png"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnn">
|
||||
@@ -492,44 +203,15 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 确认添加部门弹窗 -->
|
||||
<a-modal
|
||||
v-model:visible="showOrgModal"
|
||||
:footer="null"
|
||||
wrapClassName="confirmAddOrg"
|
||||
centered="true"
|
||||
>
|
||||
<div class="delete">
|
||||
<div class="del_header"></div>
|
||||
<div class="del_main">
|
||||
<div class="header">
|
||||
<div class="icon"></div>
|
||||
<span>提示</span>
|
||||
<div class="close_exit" @click="closeOrgModal"></div>
|
||||
</div>
|
||||
<div class="body">
|
||||
<span>您确定要添加此组织吗</span>
|
||||
</div>
|
||||
<div class="del_btnbox">
|
||||
<div class="del_btn btn1" @click="closeOrgModal">
|
||||
<div class="btnText">取消</div>
|
||||
</div>
|
||||
<div class="del_btn btn2" @click="addOrg">
|
||||
<div class="btnText">确定</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
<!-- 确认添加部门弹窗 -->
|
||||
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { reactive, toRefs, onMounted, onUnmounted } from "vue";
|
||||
import elementResizeDetectorMaker from "element-resize-detector";
|
||||
import { message } from "ant-design-vue";
|
||||
import { toDate } from "../../api/method";
|
||||
// import { message } from "ant-design-vue";
|
||||
// import { toDate } from "../../api/method";
|
||||
export default {
|
||||
name: "OwnPower",
|
||||
props: {
|
||||
@@ -885,136 +567,7 @@ export default {
|
||||
},
|
||||
],
|
||||
|
||||
//受众关联table数据
|
||||
tabledata2: [
|
||||
{
|
||||
key: 1,
|
||||
name: "学习受众",
|
||||
time: "1668410969",
|
||||
number: "20",
|
||||
type: "普通受众",
|
||||
},
|
||||
{
|
||||
key: 2,
|
||||
name: "案例受众",
|
||||
time: "1668324569",
|
||||
number: "10",
|
||||
type: "普通受众",
|
||||
},
|
||||
{
|
||||
key: 3,
|
||||
name: "学习受众",
|
||||
time: "1668238169",
|
||||
number: "20",
|
||||
type: "普通受众",
|
||||
},
|
||||
{
|
||||
key: 4,
|
||||
name: "显示受众",
|
||||
time: "1668133769",
|
||||
number: "30",
|
||||
type: "普通受众2",
|
||||
},
|
||||
{
|
||||
key: 5,
|
||||
name: "惯例受众",
|
||||
time: "1668047369",
|
||||
number: "50",
|
||||
type: "普通受众",
|
||||
},
|
||||
{
|
||||
key: 6,
|
||||
name: "管理受众",
|
||||
time: "1667960969",
|
||||
number: "20",
|
||||
type: "普通受众",
|
||||
},
|
||||
{
|
||||
key: 7,
|
||||
name: "学习小组受众",
|
||||
time: "1667874569",
|
||||
number: "20",
|
||||
type: "普通受众",
|
||||
},
|
||||
{
|
||||
key: 8,
|
||||
name: "学习受众",
|
||||
time: "1667701769",
|
||||
number: "10",
|
||||
type: "普通受众",
|
||||
},
|
||||
{
|
||||
key: 9,
|
||||
name: "案例受众",
|
||||
time: "1667442569",
|
||||
number: "5",
|
||||
type: "普通受众",
|
||||
},
|
||||
{
|
||||
key: 10,
|
||||
name: "项目受众",
|
||||
time: "1667262569",
|
||||
number: "25",
|
||||
type: "普通受众",
|
||||
},
|
||||
],
|
||||
tablecolumns2: [
|
||||
{
|
||||
title: "受众名称",
|
||||
dataIndex: "name",
|
||||
key: "name",
|
||||
width: 30,
|
||||
align: "left",
|
||||
className: "h",
|
||||
},
|
||||
{
|
||||
title: "创建时间",
|
||||
dataIndex: "time",
|
||||
key: "time",
|
||||
width: 35,
|
||||
align: "center",
|
||||
className: "h",
|
||||
sorter: {
|
||||
compare: (a, b) => a.time - b.time,
|
||||
multiple: 3,
|
||||
},
|
||||
scopedSlots: { customRender: "action" }, //引入的插槽
|
||||
customRender: (text) => {
|
||||
// console.log(text.record.checked1);
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {toDate(Number(text.record.time), "Y-M-D h:m:s")}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "人数",
|
||||
dataIndex: "number",
|
||||
key: "number",
|
||||
width: 30,
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
{
|
||||
title: "类型",
|
||||
dataIndex: "type",
|
||||
key: "type",
|
||||
width: 40,
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
],
|
||||
organizeList1: [
|
||||
{
|
||||
value: "产品受众群体",
|
||||
label: "产品受众群体",
|
||||
},
|
||||
{
|
||||
value: "人力资源hrbp",
|
||||
label: "人力资源hrbp",
|
||||
},
|
||||
],
|
||||
|
||||
//快速选人-------------------------------------
|
||||
valueSelectboe: null, //快速选人的选择组织
|
||||
choosepeople: [], //总的数组
|
||||
@@ -1023,23 +576,7 @@ export default {
|
||||
showHidden: false, //是否显示收回
|
||||
selectedRowKeys: [], //表格选中的key
|
||||
//快速选人-------------------------------------
|
||||
//添加组织-------------------------------------
|
||||
|
||||
selectedKeys1: [], //选中部门的key
|
||||
chooseorganization: [], //添加组织的选择组织
|
||||
chooseorganization1: [], //显示到右侧的数组
|
||||
showMore1: false, //是否显示添加组织的查看更多
|
||||
showHidden1: false, //是否显示添加组织的收回
|
||||
|
||||
showOrgModal: false, //确认弹窗
|
||||
//添加组织-------------------------------------
|
||||
|
||||
//受众关联-------------------------------------
|
||||
relationpeople: [], //总的数组
|
||||
showMore2: false, //是否显示快速选人的查看更多
|
||||
showHidden2: false, //是否显示收回
|
||||
selectedRowKeys2: [], //表格选中的key
|
||||
//受众关联-------------------------------------
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
state.activeKey = "1";
|
||||
@@ -1153,217 +690,7 @@ export default {
|
||||
|
||||
// 结束 快速选人------------------------------------------------------------------
|
||||
|
||||
// 开始 添加组织------------------------------------------------------------------
|
||||
//选中部门
|
||||
const departmentSelect1 = (e, k) => {
|
||||
console.log("选中的部门", e, k);
|
||||
if (!k.node.children) {
|
||||
state.selectedKeys1 = e.reverse();
|
||||
if (k.selected) {
|
||||
state.chooseorganization.unshift(k.node);
|
||||
} else {
|
||||
for (let i = 0; i < state.chooseorganization.length; i++) {
|
||||
if (state.chooseorganization[i].key === k.node.key) {
|
||||
state.chooseorganization.splice(i, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// console.log("选中的部门2", state.selectedKeys1, state.chooseorganization);
|
||||
};
|
||||
//点击确认添加-判断是否显示确定弹窗
|
||||
const addOrgModal = () => {
|
||||
if (state.chooseorganization.length === 0) {
|
||||
message.destroy();
|
||||
message.warning("请选择部门");
|
||||
} else {
|
||||
state.showOrgModal = true;
|
||||
}
|
||||
};
|
||||
//确定添加
|
||||
const addOrg = () => {
|
||||
console.log("chooseorganization", state.chooseorganization);
|
||||
state.chooseorganization1 = state.chooseorganization;
|
||||
selectedsHeight1();
|
||||
state.showOrgModal = false;
|
||||
};
|
||||
//取消添加
|
||||
const closeOrgModal = () => {
|
||||
state.showOrgModal = false;
|
||||
};
|
||||
|
||||
//单个删除选中的人
|
||||
const deleteChoosePeople1 = (item) => {
|
||||
console.log("item", item);
|
||||
let arr = state.chooseorganization;
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
if (arr[i].key === item.key) {
|
||||
arr.splice(i, 1);
|
||||
}
|
||||
}
|
||||
state.chooseorganization = arr;
|
||||
let array = state.selectedKeys1;
|
||||
for (let i = 0; i < array.length; i++) {
|
||||
if (array[i] === item.key) {
|
||||
array.splice(i, 1);
|
||||
}
|
||||
}
|
||||
state.selectedKeys1 = array;
|
||||
console.log("state.selectedKeys1", state.selectedKeys1);
|
||||
};
|
||||
|
||||
//根据右侧快速选人高度,判断是否显示更多
|
||||
const selectedsHeight1 = () => {
|
||||
let resize = elementResizeDetectorMaker();
|
||||
resize.listenTo(
|
||||
document.getElementById("ownpower").querySelector("#selecteds1"),
|
||||
function (ele) {
|
||||
console.log("ele", ele.offsetHeight);
|
||||
if (ele.offsetHeight > 160 && !state.showHidden1) {
|
||||
state.showMore1 = true;
|
||||
document
|
||||
.getElementById("ownpower")
|
||||
.querySelector("#selectedsBox1").style.overflow = "hidden";
|
||||
document
|
||||
.getElementById("ownpower")
|
||||
.querySelector("#selectedsBox1").style.height = "160px";
|
||||
} else if (ele.offsetHeight < 160) {
|
||||
state.showMore1 = false;
|
||||
state.showHidden1 = false;
|
||||
document
|
||||
.getElementById("ownpower")
|
||||
.querySelector("#selectedsBox1").style.overflow = "hidden";
|
||||
document
|
||||
.getElementById("ownpower")
|
||||
.querySelector("#selectedsBox1").style.height = "160px";
|
||||
}
|
||||
}
|
||||
);
|
||||
};
|
||||
const morePeopleShow1 = () => {
|
||||
state.showMore1 = false;
|
||||
state.showHidden1 = true;
|
||||
document
|
||||
.getElementById("ownpower")
|
||||
.querySelector("#selectedsBox1").style.overflow = "";
|
||||
document
|
||||
.getElementById("ownpower")
|
||||
.querySelector("#selectedsBox1").style.height = "";
|
||||
};
|
||||
const morePeopleHidden1 = () => {
|
||||
state.showMore1 = true;
|
||||
state.showHidden1 = false;
|
||||
document
|
||||
.getElementById("ownpower")
|
||||
.querySelector("#selectedsBox1").style.overflow = "hidden";
|
||||
document
|
||||
.getElementById("ownpower")
|
||||
.querySelector("#selectedsBox1").style.height = "160px";
|
||||
};
|
||||
//搜索组织
|
||||
const searchOrg = () => {
|
||||
let treeTitle = document
|
||||
.getElementById("ownpower")
|
||||
.querySelector(".treeMain2")
|
||||
.querySelectorAll(".ant-tree-title");
|
||||
if (state.com) {
|
||||
for (let i = 0; i < treeTitle.length; i++) {
|
||||
if (state.com === treeTitle[i].innerHTML) {
|
||||
document
|
||||
.getElementById("ownpower")
|
||||
.querySelector(".treeMain2")
|
||||
.scrollTo(0, treeTitle[i].offsetTop + 28 * i);
|
||||
return;
|
||||
} else if (i == treeTitle.length - 1) {
|
||||
message.destroy();
|
||||
message.warning("未找到该部门");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
message.destroy();
|
||||
message.warning("请输入组织名称");
|
||||
}
|
||||
};
|
||||
// 结束 添加组织------------------------------------------------------------------
|
||||
|
||||
// 开始 受众关联------------------------------------------------------------------
|
||||
|
||||
//受众关联 选中的数组
|
||||
const onSelectChange2 = (selectedRowKeys, item) => {
|
||||
// console.log("selectedRowKeys changed: ", selectedRowKeys,item);
|
||||
state.selectedRowKeys2 = selectedRowKeys;
|
||||
state.relationpeople = item.reverse();
|
||||
selectedsHeight2();
|
||||
};
|
||||
//单个删除选中的人
|
||||
const deleteChoosePeople2 = (item) => {
|
||||
let arr = state.relationpeople;
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
if (arr[i].key === item.key) {
|
||||
arr.splice(i, 1);
|
||||
}
|
||||
}
|
||||
state.relationpeople = arr;
|
||||
let array = state.selectedRowKeys2;
|
||||
for (let i = 0; i < array.length; i++) {
|
||||
if (array[i] === item.key) {
|
||||
array.splice(i, 1);
|
||||
}
|
||||
}
|
||||
state.selectedRowKeys2 = array;
|
||||
console.log("");
|
||||
};
|
||||
//根据右侧快速选人高度,判断是否显示更多
|
||||
const selectedsHeight2 = () => {
|
||||
let resize = elementResizeDetectorMaker();
|
||||
resize.listenTo(
|
||||
document.getElementById("ownpower").querySelector("#selecteds2"),
|
||||
function (ele) {
|
||||
console.log("ele", ele.offsetHeight);
|
||||
if (ele.offsetHeight > 160 && !state.showHidden2) {
|
||||
state.showMore2 = true;
|
||||
document
|
||||
.getElementById("ownpower")
|
||||
.querySelector("#selectedsBox2").style.overflow = "hidden";
|
||||
document
|
||||
.getElementById("ownpower")
|
||||
.querySelector("#selectedsBox2").style.height = "160px";
|
||||
} else if (ele.offsetHeight < 160) {
|
||||
state.showMore2 = false;
|
||||
state.showHidden2 = false;
|
||||
document
|
||||
.getElementById("ownpower")
|
||||
.querySelector("#selectedsBox2").style.overflow = "hidden";
|
||||
document
|
||||
.getElementById("ownpower")
|
||||
.querySelector("#selectedsBox2").style.height = "160px";
|
||||
}
|
||||
}
|
||||
);
|
||||
};
|
||||
const morePeopleShow2 = () => {
|
||||
state.showMore2 = false;
|
||||
state.showHidden2 = true;
|
||||
document
|
||||
.getElementById("ownpower")
|
||||
.querySelector("#selectedsBox2").style.overflow = "";
|
||||
document
|
||||
.getElementById("ownpower")
|
||||
.querySelector("#selectedsBox2").style.height = "";
|
||||
};
|
||||
const morePeopleHidden2 = () => {
|
||||
state.showMore2 = true;
|
||||
state.showHidden2 = false;
|
||||
document
|
||||
.getElementById("ownpower")
|
||||
.querySelector("#selectedsBox2").style.overflow = "hidden";
|
||||
document
|
||||
.getElementById("ownpower")
|
||||
.querySelector("#selectedsBox2").style.height = "160px";
|
||||
};
|
||||
|
||||
// 结束 受众关联------------------------------------------------------------------
|
||||
|
||||
//全部清除
|
||||
const deleteAll = () => {
|
||||
@@ -1374,30 +701,13 @@ export default {
|
||||
state.showHidden = false; //是否显示收回
|
||||
state.selectedRowKeys = []; //表格选中的key
|
||||
//快速选人-------------------------------------
|
||||
//添加组织-------------------------------------
|
||||
|
||||
state.selectedKeys1 = []; //选中部门的key
|
||||
state.chooseorganization = []; //添加组织的选择组织
|
||||
state.chooseorganization1 = []; //显示到右侧的数组
|
||||
state.showMore1 = false; //是否显示添加组织的查看更多
|
||||
state.showHidden1 = false; //是否显示添加组织的收回
|
||||
|
||||
state.showOrgModal = false; //确认弹窗
|
||||
//添加组织-------------------------------------
|
||||
|
||||
//受众关联-------------------------------------
|
||||
state.relationpeople = []; //总的数组
|
||||
state.showMore2 = false; //是否显示快速选人的查看更多
|
||||
state.showHidden2 = false; //是否显示收回
|
||||
state.selectedRowKeys2 = []; //表格选中的key
|
||||
//受众关联-------------------------------------
|
||||
};
|
||||
return {
|
||||
...toRefs(state),
|
||||
afterVisibleChange,
|
||||
closeDrawer,
|
||||
onSelectChange,
|
||||
onSelectChange2,
|
||||
// change,
|
||||
departmentSelect,
|
||||
deleteChoosePeople,
|
||||
@@ -1405,23 +715,10 @@ export default {
|
||||
morePeopleShow,
|
||||
morePeopleHidden,
|
||||
|
||||
departmentSelect1,
|
||||
addOrgModal,
|
||||
addOrg,
|
||||
closeOrgModal,
|
||||
selectedsHeight1,
|
||||
morePeopleShow1,
|
||||
morePeopleHidden1,
|
||||
deleteChoosePeople1,
|
||||
|
||||
selectedsHeight2,
|
||||
morePeopleShow2,
|
||||
morePeopleHidden2,
|
||||
deleteChoosePeople2,
|
||||
|
||||
deleteAll,
|
||||
|
||||
searchOrg,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -38,13 +38,13 @@
|
||||
/>
|
||||
</div>
|
||||
<div style="display: flex; margin-bottom: 20px">
|
||||
<div class="btn btn1">
|
||||
<div class="btn btn1" @click="searchLearnPath">
|
||||
<div class="search"></div>
|
||||
<div class="btnText" @click="searchLearnPath">搜索</div>
|
||||
<div class="btnText" >搜索</div>
|
||||
</div>
|
||||
<div class="btnn btn2">
|
||||
<div class="btnn btn2" @click="resetLearnPath">
|
||||
<div class="search"></div>
|
||||
<div class="btnText" @click="resetLearnPath">重置</div>
|
||||
<div class="btnText" >重置</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1349,7 +1349,7 @@ export default {
|
||||
.getLearnPath(obj)
|
||||
.then((res) => {
|
||||
if (res.status === 200) {
|
||||
// console.log("获取路径列表数据", res.data.data);
|
||||
console.log("获取路径列表数据", res.data.data);
|
||||
let arr = res.data.data.rows;
|
||||
if (
|
||||
arr.length === 0 &&
|
||||
|
||||
@@ -3,7 +3,12 @@
|
||||
<div class="projectAdd">
|
||||
<div class="header">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
@@ -11,34 +16,58 @@
|
||||
<div class="main">
|
||||
<div class="name">
|
||||
<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>
|
||||
<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 class="name">
|
||||
<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>
|
||||
<div class="in select">
|
||||
<a-select :getPopupContainer="
|
||||
<a-select
|
||||
:getPopupContainer="
|
||||
(triggerNode) => {
|
||||
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>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<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>
|
||||
<div class="box" style="
|
||||
<div
|
||||
class="box"
|
||||
style="
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border: 1px solid rgba(78, 166, 255, 1);
|
||||
@@ -46,15 +75,29 @@
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
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">
|
||||
<img style="
|
||||
"
|
||||
>
|
||||
<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"
|
||||
>
|
||||
<img
|
||||
style="
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
margin-bottom: 4px;
|
||||
margin-right: 4px;
|
||||
" v-if="imageUrl" :src="imageUrl" alt="avatar" />
|
||||
"
|
||||
v-if="imageUrl"
|
||||
:src="imageUrl"
|
||||
alt="avatar"
|
||||
/>
|
||||
<div v-else>
|
||||
<!-- <loading-outlined v-if="loading"></loading-outlined> -->
|
||||
<!-- <plus-outlined v-else></plus-outlined> -->
|
||||
@@ -67,43 +110,71 @@
|
||||
</div>
|
||||
<div class="name">
|
||||
<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>
|
||||
|
||||
<div class="in">
|
||||
<a-range-picker separator="至" :placeholder="[' 开始时间', ' 结束时间']" v-model:value="rangevalue"
|
||||
style="width: 100%; height: 40px; border-radius: 5px" @change="onRangeChange" />
|
||||
<a-range-picker
|
||||
separator="至"
|
||||
:placeholder="[' 开始时间', ' 结束时间']"
|
||||
v-model:value="rangevalue"
|
||||
style="width: 100%; height: 40px; border-radius: 5px"
|
||||
@change="onRangeChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<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>
|
||||
<div class="in">
|
||||
<a-select :getPopupContainer="
|
||||
<a-select
|
||||
:getPopupContainer="
|
||||
(triggerNode) => {
|
||||
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>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<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>
|
||||
|
||||
<div class="in select">
|
||||
<a-select :getPopupContainer="
|
||||
<a-select
|
||||
:getPopupContainer="
|
||||
(triggerNode) => {
|
||||
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 class="name name2">
|
||||
@@ -111,7 +182,13 @@
|
||||
<div class="inname" style="margin-top: 13px">项目说明</div>
|
||||
</div>
|
||||
<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 class="name name2">
|
||||
@@ -119,52 +196,81 @@
|
||||
<div class="inname">同步学习记录</div>
|
||||
</div>
|
||||
<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%;
|
||||
color: rgba(109, 117, 132, 1);
|
||||
font-size: 14px;
|
||||
">同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)</span></a-radio>
|
||||
"
|
||||
>同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)</span
|
||||
></a-radio
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<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>
|
||||
<div class="in select">
|
||||
<a-select :getPopupContainer="
|
||||
<a-select
|
||||
:getPopupContainer="
|
||||
(triggerNode) => {
|
||||
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 class="name">
|
||||
<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>
|
||||
<div class="in select">
|
||||
<a-select :getPopupContainer="
|
||||
<a-select
|
||||
:getPopupContainer="
|
||||
(triggerNode) => {
|
||||
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 class="name">
|
||||
<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>
|
||||
<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%;
|
||||
color: rgba(109, 117, 132, 1);
|
||||
font-size: 14px;
|
||||
">BOEU实施</span></a-radio>
|
||||
"
|
||||
>BOEU实施</span
|
||||
></a-radio
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="name name2">
|
||||
@@ -191,19 +297,37 @@
|
||||
<div class="name">
|
||||
<div class="inname" style="width: 50px">模版</div>
|
||||
<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) => {
|
||||
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 v-else :getPopupContainer="
|
||||
<a-select
|
||||
v-else
|
||||
:getPopupContainer="
|
||||
(triggerNode) => {
|
||||
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>
|
||||
</div>
|
||||
</div>
|
||||
@@ -211,7 +335,9 @@
|
||||
</div>
|
||||
<div class="footer">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
@@ -221,10 +347,10 @@
|
||||
import { reactive, toRefs, ref } from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import dayjs from 'dayjs';
|
||||
import dayjs from "dayjs";
|
||||
import * as api from "../../api/index";
|
||||
import { storage } from '../../api/storage';
|
||||
import { toDate } from '../../api/method'
|
||||
import { storage } from "../../api/storage";
|
||||
import { toDate } from "../../api/method";
|
||||
|
||||
export default {
|
||||
name: "projectAdd",
|
||||
@@ -239,35 +365,38 @@ export default {
|
||||
isEdit.value = true;
|
||||
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) {
|
||||
let info = res.data.data.projectInfo;
|
||||
console.log(info)
|
||||
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');
|
||||
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'),
|
||||
dayjs(start, "YYYY/MM/DD"),
|
||||
dayjs(end, "YYYY/MM/DD"),
|
||||
];
|
||||
|
||||
let manageName = info.manager.split(",");
|
||||
let manageValue = info.managerId.split(",");
|
||||
let optionsManage = []
|
||||
let optionsManage = [];
|
||||
for (let i = 0; i < manageName.length; i++) {
|
||||
let obj = {
|
||||
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.classifySelect2 = classifyList2.value[info.sourceBelongId - 1];
|
||||
state.classifySelect2 =
|
||||
classifyList2.value[info.sourceBelongId - 1];
|
||||
remark.value = info.remark;
|
||||
state.checked = info.boeFlag ? info.boeFlag : false;
|
||||
state.classifySelect3 = classifyList3.value[info.level];
|
||||
@@ -287,40 +416,46 @@ export default {
|
||||
systemid = info.systemId;
|
||||
boeFlag = info.boeFlag;
|
||||
}
|
||||
}).catch(err => { console.log(err) })
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
} else {
|
||||
if (storage.get("projectAddId")) {
|
||||
isEdit.value = true;
|
||||
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) {
|
||||
let info = res.data.data.projectInfo;
|
||||
console.log("我是从本地存储获取的id", info)
|
||||
console.log("我是从本地存储获取的id", info);
|
||||
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');
|
||||
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'),
|
||||
dayjs(start, "YYYY/MM/DD"),
|
||||
dayjs(end, "YYYY/MM/DD"),
|
||||
];
|
||||
|
||||
let manageName = info.manager.split(",");
|
||||
let manageValue = info.managerId.split(",");
|
||||
let optionsManage = []
|
||||
let optionsManage = [];
|
||||
for (let i = 0; i < manageName.length; i++) {
|
||||
let obj = {
|
||||
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.classifySelect2 = classifyList2.value[info.sourceBelongId - 1];
|
||||
state.classifySelect2 =
|
||||
classifyList2.value[info.sourceBelongId - 1];
|
||||
remark.value = info.remark;
|
||||
state.checked = info.boeFlag ? info.boeFlag : false;
|
||||
state.classifySelect3 = classifyList3.value[info.level];
|
||||
@@ -339,7 +474,10 @@ export default {
|
||||
systemid = info.systemId;
|
||||
boeFlag = info.boeFlag;
|
||||
}
|
||||
}).catch(err => { console.log(err) })
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -347,10 +485,10 @@ export default {
|
||||
storage.remove("projectAddId");
|
||||
setTimeout(() => {
|
||||
router.push({
|
||||
path: "/projectmanage"
|
||||
path: "/projectmanage",
|
||||
});
|
||||
}, 400);
|
||||
}
|
||||
};
|
||||
|
||||
const router = useRouter();
|
||||
const state = reactive({
|
||||
@@ -365,7 +503,12 @@ export default {
|
||||
classifySelect2: [],
|
||||
classifySelect3: [],
|
||||
classifySelect4: [],
|
||||
rangevalue: []
|
||||
rangevalue: [],
|
||||
|
||||
currentPage: 1, //当前页
|
||||
tableDataTotal: -1, //模版列表总数
|
||||
pageSize: 10, //每页10条数据
|
||||
totalPages: 0, //总页数
|
||||
});
|
||||
|
||||
const projectName = ref("");
|
||||
@@ -481,7 +624,7 @@ export default {
|
||||
|
||||
let beginTime = "";
|
||||
let endTime = "";
|
||||
const dateFormatList = ['YYYY/MM/DD'];
|
||||
const dateFormatList = ["YYYY/MM/DD"];
|
||||
|
||||
const onRangeChange = (value, dateString) => {
|
||||
console.log("Selected Time: ", value);
|
||||
@@ -522,7 +665,7 @@ export default {
|
||||
let newoptions = [];
|
||||
for (let i = 0; i < state.classifySelect1.length; i++) {
|
||||
if (state.classifySelect1[i].value) {
|
||||
newoptions.push(state.classifySelect1[i])
|
||||
newoptions.push(state.classifySelect1[i]);
|
||||
}
|
||||
}
|
||||
state.classifySelect1 = newoptions;
|
||||
@@ -537,7 +680,7 @@ export default {
|
||||
{ value: 3, label: "项目三" },
|
||||
]);
|
||||
|
||||
let sourceBelongIdC = '';
|
||||
let sourceBelongIdC = "";
|
||||
const classificationChange2 = (key) => {
|
||||
console.log(`selected ${key}`, classifyList2);
|
||||
sourceBelongIdC = key;
|
||||
@@ -573,13 +716,121 @@ export default {
|
||||
|
||||
// 模版
|
||||
const classifyList5 = ref([
|
||||
{ value: 1, label: "模版一" },
|
||||
{ value: 2, label: "模版二" },
|
||||
{ value: 3, label: "模版三" },
|
||||
{ value: 4, label: "模版四" },
|
||||
// { value: 1, label: "模版一" },
|
||||
// { value: 2, label: "模版二" },
|
||||
// { value: 3, label: "模版三" },
|
||||
// { value: 4, label: "模版四" },
|
||||
]);
|
||||
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: "请选择资源归属",
|
||||
level: "请填写项目级别",
|
||||
systemId: "请填写项目培训体系",
|
||||
boeFlag: "请选择是否BOE实施"
|
||||
boeFlag: "请选择是否BOE实施",
|
||||
};
|
||||
|
||||
const createProject = () => {
|
||||
console.log('我是否要编辑项目', isEdit.value)
|
||||
console.log("我是否要编辑项目", isEdit.value);
|
||||
if (isEdit.value) {
|
||||
console.log('我要编辑项目', peojectID)
|
||||
console.log("我要编辑项目", peojectID);
|
||||
let obj = {
|
||||
projectId: Number(peojectID),
|
||||
name: projectName["value"],
|
||||
@@ -682,7 +933,7 @@ export default {
|
||||
message.success("编辑成功");
|
||||
setTimeout(() => {
|
||||
router.push({
|
||||
path: "/projectmanage"
|
||||
path: "/projectmanage",
|
||||
});
|
||||
}, 1000);
|
||||
} else {
|
||||
@@ -695,7 +946,6 @@ export default {
|
||||
message.destroy();
|
||||
message.error("编辑失败,请检查当前网络状态。");
|
||||
});
|
||||
|
||||
} else {
|
||||
let obj = {
|
||||
name: projectName["value"],
|
||||
@@ -789,6 +1039,8 @@ export default {
|
||||
isEdit,
|
||||
backPage,
|
||||
dateFormatList,
|
||||
|
||||
templateScroll,
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -948,7 +1200,7 @@ export default {
|
||||
border-radius: 5px;
|
||||
// height: 120%;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
// height: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -419,23 +419,7 @@
|
||||
<div
|
||||
class="operation"
|
||||
style="cursor: pointer"
|
||||
:style="{
|
||||
display:
|
||||
item.type == '6' ||
|
||||
item.type == '9' ||
|
||||
item.type == '2'
|
||||
? 'flex'
|
||||
: 'none',
|
||||
}"
|
||||
@click="
|
||||
item.type == '2'
|
||||
? showCopyModal(item.type)
|
||||
: item.type == '6'
|
||||
? showzhibModal(item.type)
|
||||
: item.type == '9'
|
||||
? showhuodModal(item.type)
|
||||
: null
|
||||
"
|
||||
@click="showCodeModal"
|
||||
>
|
||||
二维码
|
||||
</div>
|
||||
@@ -1373,6 +1357,7 @@
|
||||
</a-modal>
|
||||
</div>
|
||||
<!-- 删除弹窗 -->
|
||||
|
||||
<!-- 面授管理二维码 -->
|
||||
<a-modal
|
||||
v-model:visible="copyModal"
|
||||
@@ -1490,6 +1475,15 @@
|
||||
</div>
|
||||
<!-- 编辑项目弹窗 -->
|
||||
<proj-set v-model:editHs="editHs" v-model:projectId="projectId" />
|
||||
|
||||
<!-- 二维码弹窗 -->
|
||||
<two-dimensional-code
|
||||
v-model:codevisible="codevisible"
|
||||
:codeInfo="codeInfo"
|
||||
index="0"
|
||||
type="课程二维码"
|
||||
/>
|
||||
<!-- 二维码弹窗 -->
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -1529,6 +1523,7 @@ import { getTask } from "../../api/indexTaskadd";
|
||||
import { toDate } from "../../api/method";
|
||||
import projSet from "../../components/Modals/projSet";
|
||||
import { overview } from "../../api/indexProjStu";
|
||||
import TwoDimensionalCode from "../../components/TwoDimensionalCode.vue";
|
||||
export default {
|
||||
name: "taskPage",
|
||||
components: {
|
||||
@@ -1550,6 +1545,7 @@ export default {
|
||||
TaskImpStu,
|
||||
projSet,
|
||||
NoticeHis,
|
||||
TwoDimensionalCode,
|
||||
},
|
||||
setup() {
|
||||
const state = reactive({
|
||||
@@ -1664,6 +1660,9 @@ export default {
|
||||
|
||||
huodModal: false, //活动二维码弹窗
|
||||
allDelete: false, //批量删除弹窗
|
||||
|
||||
codevisible: false, //二维码弹窗
|
||||
codeInfo: null, //二维码信息
|
||||
pubproject: false,
|
||||
stugroup: false,
|
||||
canclestu: false,
|
||||
@@ -2505,6 +2504,15 @@ export default {
|
||||
const showEditProj = () => {
|
||||
state.editHs = true;
|
||||
};
|
||||
//显示二维码弹窗
|
||||
const showCodeModal = () => {
|
||||
state.codevisible = true;
|
||||
state.codeInfo = {
|
||||
title: "课程二维码",
|
||||
name: "管理者进阶面授课程",
|
||||
url: "https://www.baidu.com/https://www.baidu.com/https://www.baidu.com/https://www.baidu.com/https://www.baidu.com/",
|
||||
};
|
||||
};
|
||||
|
||||
//学员管理列表操作
|
||||
const studentData = () => {
|
||||
@@ -3199,6 +3207,7 @@ export default {
|
||||
closehuodModal,
|
||||
closezhibModal,
|
||||
|
||||
showCodeModal,
|
||||
tabsChange,
|
||||
|
||||
getTaskList,
|
||||
|
||||
@@ -91,10 +91,10 @@
|
||||
</div>
|
||||
|
||||
<div @click="changeCodevisible">显示二维码弹窗</div>
|
||||
<two-dimensional-code v-model:codevisible="codevisible" :codeInfo="codeInfo" index="0"/>
|
||||
<two-dimensional-code v-model:codevisible="codevisible" :codeInfo="codeInfo" index="0" type="课程二维码"/>
|
||||
|
||||
<div @click="changeCodevisible2">显示二维码弹窗22</div>
|
||||
<two-dimensional-code v-model:codevisible="codevisible2" :codeInfo="codeInfo2" index="1"/>
|
||||
<two-dimensional-code v-model:codevisible="codevisible2" :codeInfo="codeInfo2" index="1" type="签到二维码"/>
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs } from "vue";
|
||||
|
||||
Reference in New Issue
Block a user