Merge branch 'master' of ssh://gitlab.dongwu-inc.com:10022/BOE/fe-manage

This commit is contained in:
dongwug
2022-10-25 11:43:17 +08:00
9 changed files with 853 additions and 494 deletions

55
src/api/index1.js Normal file
View File

@@ -0,0 +1,55 @@
import http from "./config";
// import qs from 'qs';
/**
* 接口传参数方式get
* axios.get('/user', {
* params: {
* id: 12345
* name: user
* }
* }).then(res => console.log(res))
*
* 接口传参三种方式post/put/patch
*
* 1.'Content-Type'= 'multipart/form-data',传参格式为 formData。
* (全局请求头:'Content-Type'= 'application/x-www-form-urlencoded'
* request的Header:'Content-Type'= 'multipart/form-data'
* var formData=new FormData();
* formData.append('user',123456);formData.append('pass',12345678);
* axios.post("/notice",formData).then()
*
* 2.'Content-Type'= 'application/x-www-form-urlencoded',传参格式为 query 形式,使用$qs.stringify。
* (全局请求头:'Content-Type'= 'application/x-www-form-urlencoded'
* request的Header:'Content-Type'= 'application/x-www-form-urlencoded'
* let data = {"code":"1234","name":"yyyy"};
* axios.post(`${this.$url}/test/testRequest`,qs.stringify({data})).then()
*
* 3.'Content-Type'= 'application/json传参格式为 raw (JSON格式)。
* (全局请求头:'Content-Type'= 'application/x-www-form-urlencoded'
* request的Header:'Content-Type'= 'application/json;charset=UTF-8'
* let data = {"code":"1234","name":"yyyy"}
* axios.post(`${this.$url}/test/testRequest`,data).then()
*
*/
// 接口-请求
// 获取学习路径图列表
export const getLearnPath = (obj) => http.post('/admin/router/list', obj);
//获取关卡
export const getChapter = (obj) => http.post('/admin/router/detail', { params: obj });
//新建或编辑关卡
export const editChapter = (obj) => http.post('/admin/router/editChapter', obj);
// 测试方法
// import * as api from '../../api/index'
// api.getLearnPath({}).then(res => {
// console.log(res)
// }).catch(err => {
// console.log(err)
// })

View File

@@ -45,31 +45,94 @@ body {
/*对水平流动条有效*/
}
::-moz-scrollbar {
width: 6px;
/*对垂直流动条有效*/
height: 6px;
/*对水平流动条有效*/
}
::-o-scrollbar {
width: 6px;
/*对垂直流动条有效*/
height: 6px;
/*对水平流动条有效*/
}
.scrollbar {
width: 6px;
/*对垂直流动条有效*/
height: 6px;
/*对水平流动条有效*/
}
/*定义滚动条的轨道颜色、内阴影及圆角*/
::-webkit-scrollbar-track {
background-color: rgba(239, 244, 252, 1);
border-radius: 6px;
}
::-moz-scrollbar-track {
background-color: rgba(239, 244, 252, 1);
border-radius: 6px;
}
::-o-scrollbar-track {
background-color: rgba(239, 244, 252, 1);
border-radius: 6px;
}
.scrollbar-track {
background-color: rgba(239, 244, 252, 1);
border-radius: 6px;
}
/*定义滑块颜色、内阴影及圆角*/
::-webkit-scrollbar-thumb {
border-radius: 3px;
background-color: rgba(78, 166, 255, 1);
}
::-moz-scrollbar-thumb {
border-radius: 3px;
background-color: rgba(78, 166, 255, 1);
}
::-o-scrollbar-thumb {
border-radius: 3px;
background-color: rgba(78, 166, 255, 1);
}
.scrollbar-thumb {
border-radius: 3px;
background-color: rgba(78, 166, 255, 1);
}
/*定义两端按钮的样式*/
::-webkit-scrollbar-button {
background-color: cyan;
display: none;
}
::-moz-scrollbar-button {
background-color: cyan;
display: none;
}
::-o-scrollbar-button {
background-color: cyan;
display: none;
}
.scrollbar-button {
background-color: cyan;
display: none;
}
/*定义右下角汇合处的样式*/
::-webkit-scrollbar-corner {
background: rgba(239, 244, 252, 1);
;
}
::-moz-scrollbar-corner {
background: rgba(239, 244, 252, 1);
;
}
::-o-scrollbar-corner {
background: rgba(239, 244, 252, 1);
;
}
.scrollbar-corner {
background: rgba(239, 244, 252, 1);
;
}
//隐藏滚动条----------------------------------------------------------------
//禁止选中----------------------------------------------------------

View File

@@ -16,15 +16,15 @@
/>
</div>
<div class="main">
<div class="onerow">将此学员移动到</div>
<div class="secondrow">
<a-select
v-model:value="value"
style="width: 264px;border-radius: 8px"
placeholder="好好学习"
:options="stugroupList"
/>
</div>
<div class="onerow">将此学员移动到</div>
<div class="secondrow">
<a-select
v-model:value="value"
style="width: 264px; border-radius: 8px"
placeholder="好好学习"
:options="stugroupList"
/>
</div>
</div>
<div class="btnn">
<button class="btn1">取消</button>
@@ -32,7 +32,6 @@
</div>
</div>
</a-drawer>
</template>
<script>
@@ -47,23 +46,23 @@ export default {
},
setup(props, ctx) {
const state = reactive({
stugroupList: [
{
id: "1",
value: "好好学习",
label: "好好学习",
},
{
id: "2",
value: "天天向上",
label: "天天向上",
},
{
id: "3",
value: "好好学习",
label: "好好学习",
},
],
stugroupList: [
{
id: "1",
value: "好好学习",
label: "好好学习",
},
{
id: "2",
value: "天天向上",
label: "天天向上",
},
{
id: "3",
value: "好好学习",
label: "好好学习",
},
],
});
const closeDrawer = () => {
ctx.emit("update:Changevisible", false);
@@ -83,9 +82,8 @@ export default {
};
</script>
<style lang="scss" >
<style lang="scss">
.changegroup {
.drawerMain {
min-width: 600px;
margin: 0px 32px 0px 32px;
@@ -109,25 +107,24 @@ export default {
}
}
.main {
.onerow {
margin: 32px 0 32px 24px;
color: rgba(51, 51, 51, 1);
font-size: 16px;
.onerow {
margin: 32px 0 32px 24px;
color: rgba(51, 51, 51, 1);
font-size: 16px;
}
.secondrow {
margin-left: 24px;
.ant-select {
height: 40px;
}
.secondrow {
margin-left: 24px;
.ant-select {
height: 40px;
}
.ant-select-selector {
height: 100%;
border-radius: 8px;
}
.ant-select-selection-search-input {
height: 40px;
}
.ant-select-selector {
height: 100%;
border-radius: 8px;
}
.ant-select-selection-search-input {
height: 40px;
}
}
}
.btnn {
height: 72px;
@@ -161,4 +158,4 @@ export default {
}
}
}
</style>
</style>

View File

@@ -70,7 +70,7 @@
:data-source="tabledata"
:loading="tableDataTotal === -1 ? true : false"
expandRowByClick="true"
:scroll="{ x: 900, y: 350 }"
:scroll="{ x: 900 }"
@expand="expandTable"
:pagination="false"
/>

View File

@@ -6,7 +6,7 @@ const routes = [
{
path: '/',
name: '首页',
redirect: routesConfig[0].path
redirect: '/learningpath'
},
...routesConfig
]

View File

@@ -53,7 +53,6 @@
</div>
<div class="btns">
<!-- <router-link to="/projectadd">
<div class="btn btn3">
<div class="search"></div>
@@ -208,7 +207,6 @@
</div>
</div></a-modal
>
<!-- 编辑路径弹窗 -->
<a-modal
@@ -551,6 +549,7 @@ import OwnerShip from "../../components/drawers/Ownership";
import PowerList from "../../components/drawers/PowerList";
import QueryRight from "../../components/drawers/QueryRight";
import ManageRight from "../../components/drawers/ManageRight";
import * as api from "../../api/index1";
export default {
name: "learningPath",
components: { OwnerShip, PowerList, QueryRight, ManageRight },
@@ -801,8 +800,53 @@ export default {
];
return columns;
};
//获取学习路径列表
const getLearnPath = () => {
let obj = {
beginTime: 0,
endTime: 0,
name: "",
pageNo: 0,
pageSize: 0,
status: 0,
};
api
.getLearnPath(obj)
.then((res) => {
console.log("获取路径列表数据", res);
})
.catch((err) => {
console.log("获取学习路径失败", err);
});
let getChapterObj = {
routerId: 0,
};
api
.getChapter(getChapterObj)
.then((res) => {
console.log("获取关卡数据", res);
})
.catch((err) => {
console.log("获取关卡数据失败", err);
});
// let editChapterObj = {
// name: "测试关卡",
// remark: "这是测试关卡说明",
// routerId: 0,
// };
// api
// .editChapter(editChapterObj)
// .then((res) => {
// console.log("添加测试关卡数据", res);
// })
// .catch((err) => {
// console.log("添加测试关卡数据失败", err);
// });
};
onMounted(() => {
// console.log("执行");
getLearnPath();
});
const selectProjectName = (value, index) => {
console.log("value", value, index);
@@ -888,18 +932,28 @@ export default {
>
发布
</div>
<div class="jc" onClick={() => {
<div
class="jc"
onClick={() => {
state.out1 = true;
}}>编辑</div>
}}
>
编辑
</div>
</div>
) : (
<div></div>
)}
{value.state === "已发布" ? (
<div class="fb">
<div class="jc" onClick={() => {
<div
class="jc"
onClick={() => {
state.out1 = true;
}}>编辑</div>
}}
>
编辑
</div>
</div>
) : (
<div></div>
@@ -1649,7 +1703,7 @@ export default {
.btn {
padding: 0px 26px 0px 26px;
height: 38px;
background: #409EFF;
background: #409eff;
border-radius: 8px;
//border: 1px solid rgba(64, 158, 255, 1);
display: flex;
@@ -1664,7 +1718,7 @@ export default {
.btnText {
font-size: 14px;
font-weight: 400;
color: #FFFFFF;
color: #ffffff;
line-height: 36px;
margin-left: 5px;
}
@@ -1672,7 +1726,7 @@ export default {
.btnn {
padding: 0px 26px 0px 26px;
height: 38px;
background: #FFFFFF;
background: #ffffff;
border-radius: 8px;
border: 1px solid rgba(64, 158, 255, 1);
display: flex;
@@ -1687,7 +1741,7 @@ export default {
.btnText {
font-size: 14px;
font-weight: 400;
color: #409EFF;
color: #409eff;
line-height: 36px;
margin-left: 5px;
}
@@ -1716,7 +1770,7 @@ export default {
}
}
.btn1:active {
background: #0982FF;
background: #0982ff;
}
.btn2:hover {
background: rgba(64, 158, 255, 0.1);
@@ -1731,7 +1785,7 @@ export default {
.btn {
padding: 0px 26px 0px 26px;
height: 38px;
background: #409EFF;
background: #409eff;
border-radius: 8px;
//border: 1px solid rgba(64, 158, 255, 1);
display: flex;
@@ -1746,7 +1800,7 @@ export default {
.btnText {
font-size: 14px;
font-weight: 400;
color: #FFFFFF;
color: #ffffff;
line-height: 36px;
margin-left: 5px;
}
@@ -1769,7 +1823,7 @@ export default {
}
}
.btn3:active {
background: #0982FF;
background: #0982ff;
}
}
}

View File

@@ -80,13 +80,6 @@
total: tableDataTotal,
onChange: (page, pageSize) => {
currentPage = page;
// console.log('page', page)
// 加翻页查找代码
// this.setState({
// currentPage: page,
// }, () => {
// this.getMilitaryDeployment()
// })
},
}"
>
@@ -110,24 +103,24 @@
<!-- 无项目 -->
<div class="tableBox" style="display: none">
<div
class="taskbox"
@click="showModal1"
style="background: linear-gradient(180deg, #ddeaff, #f0f8fe)"
>
<div class="leftt">
<img src="../../assets/images/taskpage/left2.png" />
</div>
<div class="photo">
<img src="../../assets/images/projectadd/nopro.png" />
</div>
<div class="rightt">
<img src="../../assets/images/taskpage/right2.png" />
</div>
<div class="centerbox" style="color: rgba(78, 166, 255, 1)">
创建项目
</div>
<div class="centermain">点击创建项目任务</div>
</div>
class="taskbox"
@click="showModal1"
style="background: linear-gradient(180deg, #ddeaff, #f0f8fe)"
>
<div class="leftt">
<img src="../../assets/images/taskpage/left2.png" />
</div>
<div class="photo">
<img src="../../assets/images/projectadd/nopro.png" />
</div>
<div class="rightt">
<img src="../../assets/images/taskpage/right2.png" />
</div>
<div class="centerbox" style="color: rgba(78, 166, 255, 1)">
创建项目
</div>
<div class="centermain">点击创建项目任务</div>
</div>
</div>
<!-- 创建子项目弹窗 -->
<div>
@@ -589,7 +582,9 @@
</div>
<div class="body">
<span>是否结束项目</span>
<div class="back">项目结束后学员将无法继续学习此操作不可逆</div>
<div class="back">
项目结束后学员将无法继续学习此操作不可逆
</div>
</div>
<div class="del_btnbox">
<div class="del_btn btn1">
@@ -1070,7 +1065,6 @@ export default {
data.map((value) => {
if (value.children) {
//多层项目
console.log("11");
value.operation =
value.state === "草稿" ? (
<div class="operation">
@@ -1129,9 +1123,13 @@ export default {
<router-link to="/taskpage">基础信息</router-link>
</a-select-option>
<a-select-option value="存为模板" label="存为模板">
<div onClick={() => {
showStartModal();
}}>存为模板</div>
<div
onClick={() => {
showStartModal();
}}
>
存为模板
</div>
</a-select-option>
</a-select>
</div>
@@ -1173,9 +1171,14 @@ export default {
</a-select-option>
</a-select>
</div>
<span class="operation3" onClick={() => {
showCopyModal();
}}>复制</span>
<span
class="operation3"
onClick={() => {
showCopyModal();
}}
>
复制
</span>
<span class="more"></span>
</div>
) : value.state === "已结束" ? (
@@ -1215,12 +1218,22 @@ export default {
</a-select-option>
</a-select>
</div>
<span class="operation3" onClick={() => {
showCopyModal();
}}>复制</span>
<span class="more" onClick={() => {
showDeleteModal();
}}>删除</span>
<span
class="operation3"
onClick={() => {
showCopyModal();
}}
>
复制
</span>
<span
class="more"
onClick={() => {
showDeleteModal();
}}
>
删除
</span>
</div>
) : (
<div></div>
@@ -1278,14 +1291,22 @@ export default {
dropdownClassName="tabledropdown"
>
<a-select-option value="复制" label="复制">
<div onClick={() => {
showCopyModal();
}}>复制</div>
<div
onClick={() => {
showCopyModal();
}}
>
复制
</div>
</a-select-option>
<a-select-option value="删除" label="删除">
<div onClick={() => {
showDeleteModal();
}}>删除</div>
<div
onClick={() => {
showDeleteModal();
}}
>
删除
</div>
</a-select-option>
</a-select>
</div>
@@ -1331,9 +1352,14 @@ export default {
<router-link to="/classadd" class="operation3">
创建班级
</router-link>
<span class="more" onClick={() => {
<span
class="more"
onClick={() => {
showCopyModal();
}}>复制</span>
}}
>
复制
</span>
</div>
) : item.state === "已结束" ? (
<div class="operation">
@@ -1372,12 +1398,22 @@ export default {
</a-select-option>
</a-select>
</div>
<span class="operation3" onClick={() => {
<span
class="operation3"
onClick={() => {
showCopyModal();
}}>复制</span>
<span class="more" onClick={() => {
showDeleteModal();
}}>删除</span>
}}
>
复制
</span>
<span
class="more"
onClick={() => {
showDeleteModal();
}}
>
删除
</span>
</div>
) : (
<div></div>
@@ -1432,19 +1468,31 @@ export default {
dropdownClassName="tabledropdown"
>
<a-select-option value="复制" label="复制">
<div onClick={() => {
showCopyModal();
}}>复制</div>
<div
onClick={() => {
showCopyModal();
}}
>
复制
</div>
</a-select-option>
<a-select-option value="删除" label="删除">
<div onClick={() => {
showDeleteModal();
}}>删除</div>
<div
onClick={() => {
showDeleteModal();
}}
>
删除
</div>
</a-select-option>
<a-select-option value="存为模板" label="存为模板">
<div onClick={() => {
showStartModal();
}}>存为模板</div>
<div
onClick={() => {
showStartModal();
}}
>
存为模板
</div>
</a-select-option>
<a-select-option value="基础信息" label="基础信息">
<router-link to="/taskpage">基础信息</router-link>
@@ -1489,9 +1537,14 @@ export default {
</a-select-option>
</a-select>
</div>
<span class="operation3" onClick={() => {
showCopyModal();
}}>复制</span>
<span
class="operation3"
onClick={() => {
showCopyModal();
}}
>
复制
</span>
<div class="tableSelect">
<a-select
style="width: 50px"
@@ -1500,19 +1553,31 @@ export default {
dropdownClassName="tabledropdown"
>
<a-select-option value="撤回" label="撤回">
<div onClick={() => {
showBackModal();
}}>撤回</div>
<div
onClick={() => {
showBackModal();
}}
>
撤回
</div>
</a-select-option>
<a-select-option value="结束" label="结束">
<div onClick={() => {
showStopModal();
}}>结束</div>
<div
onClick={() => {
showStopModal();
}}
>
结束
</div>
</a-select-option>
<a-select-option value="存为模板" label="存为模板">
<div onClick={() => {
showStartModal();
}}>存为模板</div>
<div
onClick={() => {
showStartModal();
}}
>
存为模板
</div>
</a-select-option>
<a-select-option value="基础信息" label="基础信息">
<router-link to="/taskpage">基础信息</router-link>
@@ -1557,12 +1622,22 @@ export default {
</a-select-option>
</a-select>
</div>
<span class="operation3" onClick={() => {
showCopyModal();
}}>复制</span>
<span class="operation3" onClick={() => {
showCopyModal();
}}>复制</span>
<span
class="operation3"
onClick={() => {
showCopyModal();
}}
>
复制
</span>
<span
class="operation3"
onClick={() => {
showCopyModal();
}}
>
复制
</span>
<div class="tableSelect">
<a-select
style="width: 50px"
@@ -1571,14 +1646,22 @@ export default {
dropdownClassName="tabledropdown"
>
<a-select-option value="删除" label="删除">
<div onClick={() => {
showDeleteModal();
}}>删除</div>
<div
onClick={() => {
showDeleteModal();
}}
>
删除
</div>
</a-select-option>
<a-select-option value="存为模板" label="存为模板">
<div onClick={() => {
showStartModal();
}}>存为模板</div>
<div
onClick={() => {
showStartModal();
}}
>
存为模板
</div>
</a-select-option>
<a-select-option value="基础信息" label="基础信息">
<router-link to="/taskpage">基础信息</router-link>
@@ -1623,9 +1706,14 @@ export default {
</a-select-option>
</a-select>
</div>
<span class="operation3" onClick={() => {
showCopyModal();
}}>复制</span>
<span
class="operation3"
onClick={() => {
showCopyModal();
}}
>
复制
</span>
<div class="tableSelect">
<a-select
style="width: 50px"
@@ -1634,19 +1722,31 @@ export default {
dropdownClassName="tabledropdown"
>
<a-select-option value="结束" label="结束">
<div onClick={() => {
showStopModal();
}}>结束</div>
<div
onClick={() => {
showStopModal();
}}
>
结束
</div>
</a-select-option>
<a-select-option value="撤回" label="撤回">
<div onClick={() => {
showBackModal();
}}>撤回</div>
<div
onClick={() => {
showBackModal();
}}
>
撤回
</div>
</a-select-option>
<a-select-option value="存为模板" label="存为模板">
<div onClick={() => {
showStartModal();
}}>存为模板</div>
<div
onClick={() => {
showStartModal();
}}
>
存为模板
</div>
</a-select-option>
<a-select-option value="基础信息" label="基础信息">
<router-link to="/taskpage">基础信息</router-link>
@@ -1707,19 +1807,31 @@ export default {
dropdownClassName="tabledropdown"
>
<a-select-option value="复制" label="复制">
<div onClick={() => {
showCopyModal();
}}>复制</div>
<div
onClick={() => {
showCopyModal();
}}
>
复制
</div>
</a-select-option>
<a-select-option value="删除" label="删除">
<div onClick={() => {
showDeleteModal();
}}>删除</div>
<div
onClick={() => {
showDeleteModal();
}}
>
删除
</div>
</a-select-option>
<a-select-option value="存为模板" label="存为模板">
<div onClick={() => {
showStartModal();
}}>存为模板</div>
<div
onClick={() => {
showStartModal();
}}
>
存为模板
</div>
</a-select-option>
<a-select-option value="基础信息" label="基础信息">
<router-link to="/taskpage">基础信息</router-link>
@@ -1764,9 +1876,14 @@ export default {
</a-select-option>
</a-select>
</div>
<span class="operation3" onClick={() => {
<span
class="operation3"
onClick={() => {
showCopyModal();
}}>复制</span>
}}
>
复制
</span>
<div class="tableSelect">
<a-select
style="width: 50px"
@@ -1775,19 +1892,31 @@ export default {
dropdownClassName="tabledropdown"
>
<a-select-option value="撤回" label="撤回">
<div onClick={() => {
showBackModal();
}}>撤回</div>
<div
onClick={() => {
showBackModal();
}}
>
撤回
</div>
</a-select-option>
<a-select-option value="结束" label="结束">
<div onClick={() => {
showStopModal();
}}>结束</div>
<div
onClick={() => {
showStopModal();
}}
>
结束
</div>
</a-select-option>
<a-select-option value="存为模板" label="存为模板">
<div onClick={() => {
showStartModal();
}}>存为模板</div>
<div
onClick={() => {
showStartModal();
}}
>
存为模板
</div>
</a-select-option>
<a-select-option value="基础信息" label="基础信息">
<router-link to="/taskpage">基础信息</router-link>
@@ -1832,9 +1961,14 @@ export default {
</a-select-option>
</a-select>
</div>
<span class="operation3" onClick={() => {
<span
class="operation3"
onClick={() => {
showCopyModal();
}}>复制</span>
}}
>
复制
</span>
<div class="tableSelect">
<a-select
style="width: 50px"
@@ -1843,19 +1977,31 @@ export default {
dropdownClassName="tabledropdown"
>
<a-select-option value="删除" label="删除">
<div onClick={() => {
showDeleteModal();
}}>删除</div>
<div
onClick={() => {
showDeleteModal();
}}
>
删除
</div>
</a-select-option>
<a-select-option value="结束" label="结束">
<div onClick={() => {
showStopModal();
}}>结束</div>
<div
onClick={() => {
showStopModal();
}}
>
结束
</div>
</a-select-option>
<a-select-option value="存为模板" label="存为模板">
<div onClick={() => {
showStartModal();
}}>存为模板</div>
<div
onClick={() => {
showStartModal();
}}
>
存为模板
</div>
</a-select-option>
<a-select-option value="基础信息" label="基础信息">
<router-link to="/taskpage">基础信息</router-link>
@@ -1900,9 +2046,14 @@ export default {
</a-select-option>
</a-select>
</div>
<span class="operation3" onClick={() => {
<span
class="operation3"
onClick={() => {
showCopyModal();
}}>复制</span>
}}
>
复制
</span>
<div class="tableSelect">
<a-select
style="width: 50px"
@@ -1911,19 +2062,31 @@ export default {
dropdownClassName="tabledropdown"
>
<a-select-option value="撤回" label="撤回">
<div onClick={() => {
showBackModal();
}}>撤回</div>
<div
onClick={() => {
showBackModal();
}}
>
撤回
</div>
</a-select-option>
<a-select-option value="结束" label="结束">
<div onClick={() => {
showStopModal();
}}>结束</div>
<div
onClick={() => {
showStopModal();
}}
>
结束
</div>
</a-select-option>
<a-select-option value="存为模板" label="存为模板">
<div onClick={() => {
showStartModal();
}}>存为模板</div>
<div
onClick={() => {
showStartModal();
}}
>
存为模板
</div>
</a-select-option>
<a-select-option value="基础信息" label="基础信息">
<router-link to="/taskpage">基础信息</router-link>
@@ -1983,9 +2146,14 @@ export default {
{value.state === "草稿" ? (
<span class="operation3">发布</span>
) : (
<span class="operation3" onClick={() => {
showCopyModal();
}}>复制</span>
<span
class="operation3"
onClick={() => {
showCopyModal();
}}
>
复制
</span>
)}
<div class="tableSelect">
{value.state === "草稿" ? (
@@ -1996,23 +2164,31 @@ export default {
dropdownClassName="tabledropdown"
>
<a-select-option value="复制" label="复制">
<div onClick={() => {
showCopyModal();
}}>复制</div>
<div
onClick={() => {
showCopyModal();
}}
>
复制
</div>
</a-select-option>
<a-select-option value="删除" label="删除">
<div
onClick={() => {
showDeleteModal();
}}
showDeleteModal();
}}
>
删除
</div>
</a-select-option>
<a-select-option value="存为模板" label="存为模板">
<div onClick={() => {
showStartModal();
}}>存为模板</div>
<div
onClick={() => {
showStartModal();
}}
>
存为模板
</div>
</a-select-option>
<a-select-option value="基础信息" label="基础信息">
<router-link to="/taskpage">基础信息</router-link>
@@ -2026,23 +2202,31 @@ export default {
dropdownClassName="tabledropdown"
>
<a-select-option value="存为模板" label="存为模板">
<div onClick={() => {
showStartModal();
}}>存为模板</div>
<div
onClick={() => {
showStartModal();
}}
>
存为模板
</div>
</a-select-option>
<a-select-option value="结束" label="结束">
<div
onClick={() => {
showStopModal();
}}
showStopModal();
}}
>
结束
</div>
</a-select-option>
<a-select-option value="撤回" label="撤回">
<div onClick={() => {
showBackModal();
}}>撤回</div>
<div
onClick={() => {
showBackModal();
}}
>
撤回
</div>
</a-select-option>
<a-select-option value="基础信息" label="基础信息">
<router-link to="/taskpage">基础信息</router-link>
@@ -2056,15 +2240,19 @@ export default {
dropdownClassName="tabledropdown"
>
<a-select-option value="存为模板" label="存为模板">
<div onClick={() => {
showStartModal();
}}>存为模板</div>
<div
onClick={() => {
showStartModal();
}}
>
存为模板
</div>
</a-select-option>
<a-select-option value="删除" label="删除">
<div
onClick={() => {
showDeleteModal();
}}
showDeleteModal();
}}
>
删除
</div>
@@ -2082,6 +2270,7 @@ export default {
}
});
state.tableData = data;
console.log("tableData", state.tableData);
};
getTableDate();

View File

@@ -1,68 +1,65 @@
<template>
<div class="templatelibrary">
<div class="tmpl">
<div class="tmpl_header">
<div class="tmplh_inp">
<div class="inpbox">
<div class="inpbox1">
<span>模版名称</span>
<a-input
v-model:value="value1"
style="
width: 270px;
height: 40px;
border-radius: 8px;
margin-right: 14px;
"
placeholder="请输入项目名称"
/>
</div>
<div class="inpbox1">
<span>创建时间</span>
<a-date-picker
v-model="selectTime"
type="date"
placeholder="创建时间"
style="width: 270px; margin-right: 14px"
/>
</div>
</div>
<div class="tmpl_header">
<div class="tmplh_inp">
<div class="inpbox">
<div class="inpbox1">
<span>模版名称</span>
<a-input
v-model:value="value1"
style="
width: 270px;
height: 40px;
border-radius: 8px;
margin-right: 14px;
"
placeholder="请输入项目名称"
/>
</div>
<div class="tmplh_btn">
<div class="btn btn1">
<div class="search"></div>
<div class="btnText btnText1">搜索</div>
</div>
<div class="btn btn2">
<div class="search"></div>
<div class="btnText btnText2">重置</div>
</div>
<div class="inpbox1">
<span>创建时间</span>
<a-date-picker
v-model="selectTime"
type="date"
placeholder="创建时间"
style="width: 270px; margin-right: 14px"
/>
</div>
</div>
</div>
<div class="tmpl_body">
<div class="tmpl_tabbox">
<a-table
:columns="columns1"
:data-source="tableData1"
:loading="tableDataTotal === -1 ? true : false"
expandRowByClick="true"
@expand="expandTable"
:pagination="false"
/>
</div>
<div class="tmplh_btn">
<div class="btn btn1">
<div class="search"></div>
<div class="btnText btnText1">搜索</div>
</div>
<div class="btn btn2">
<div class="search"></div>
<div class="btnText btnText2">重置</div>
</div>
</div>
</div>
<div class="tmpl_body">
<div class="tmpl_tabbox">
<a-table
:columns="columns1"
:data-source="tableData1"
:loading="tableDataTotal === -1 ? true : false"
expandRowByClick="true"
@expand="expandTable"
:pagination="false"
/>
</div>
</div>
</div>
</div>
</template>
<script>
import { reactive, defineComponent, toRefs } from "vue";
const columns1 = [
{
title: "模版名称",
width: '20%',
width: "20%",
dataIndex: "name",
key: "name",
ellipsis: true,
@@ -70,247 +67,251 @@ const columns1 = [
},
{
title: "状态",
width: '15%',
width: "15%",
dataIndex: "status",
key: "status",
align: "center",
},
{
title: "创建人",
width: '18%',
width: "18%",
dataIndex: "creator",
key: "creator",
align: "center",
},
{
title: "最近学习时间",
width: '25%',
width: "25%",
dataIndex: "stutime",
key: "stutime",
align: "center",
},
{
title: "操作",
width: '22%',
width: "22%",
className: "h",
dataIndex: "operation",
key: "operation",
align: "center",
},
];
export default defineComponent({
name: "TemplateLibrary",
setup() {
const state = reactive({
tableData1: [
{
key: "1",
name: "管理者进阶-腾飞班Z1",
status: "已发布",
creator: "李部长",
stutime: "2022-10-31 23:12:00",
operation: "operation",
},
{
key: "2",
name: "管理者进阶-腾飞班Z2",
status: "已发布",
creator: "毛继禹",
stutime: "2022-10-31 23:12:00",
operation: "operation",
},
{
key: "3",
name: "管理者进阶-腾飞班Z3",
status: "已发布",
creator: "毛继禹",
stutime: "2022-10-31 23:12:00",
operation: "operation",
},
{
key: "4",
name: "管理者进阶-腾飞班Z4",
status: "未发布",
creator: "毛继禹",
stutime: "2022-10-31 23:12:00",
operation: "operation",
},
],
});
const getTableDate1 = () => {
let data = state.tableData1;
data.map((value) => {
{
//单层项目
value.operation = (
<div class="operation" style="justify-content: flex-end;">
<div class="nSelect">
{value.status === "已发布" ? (
<div class="nselect">
<div class="ops2">
<router-link to="/libraryadd">
<div class="jc">查看 <span style="color:#E9E9E9;margin-left:8px;">|</span></div>
</router-link>
name: "TemplateLibrary",
setup() {
const state = reactive({
tableData1: [
{
key: "1",
name: "管理者进阶-腾飞班Z1",
status: "已发布",
creator: "李部长",
stutime: "2022-10-31 23:12:00",
operation: "operation",
},
{
key: "2",
name: "管理者进阶-腾飞班Z2",
status: "已发布",
creator: "毛继禹",
stutime: "2022-10-31 23:12:00",
operation: "operation",
},
{
key: "3",
name: "管理者进阶-腾飞班Z3",
status: "已发布",
creator: "毛继禹",
stutime: "2022-10-31 23:12:00",
operation: "operation",
},
{
key: "4",
name: "管理者进阶-腾飞班Z4",
status: "未发布",
creator: "毛继禹",
stutime: "2022-10-31 23:12:00",
operation: "operation",
},
],
});
const getTableDate1 = () => {
let data = state.tableData1;
data.map((value) => {
{
//单层项目
value.operation = (
<div class="operation" style="justify-content: flex-end;">
<div class="nSelect">
{value.status === "已发布" ? (
<div class="nselect">
<div class="ops2">
<router-link to="/libraryadd">
<div class="jc">
查看{" "}
<span style="color:#E9E9E9;margin-left:8px;">|</span>
</div>
<div class="ops3">
<div class="jc">撤回</div>
</div>
</div>
) : (
<div></div>
)}
{value.status === "未发布" ? (
<div class="nselect">
<div class="ops1">
<div class="jc">发布<span style="color:#E9E9E9;margin-left:8px;">|</span></div>
</div>
<div class="ops2">
<router-link to="/libraryadd">
<div class="jc">查看<span style="color:#E9E9E9;margin-left:8px;">|</span></div>
</router-link>
</div>
<div class="ops3">
<div class="jc">删除</div>
</div>
</div>
) : (
<div></div>
)}
</router-link>
</div>
<div class="ops3">
<div class="jc">撤回</div>
</div>
);
}
});
state.tableData = data;
};
getTableDate1();
return {
...toRefs(state),
columns1,
}
}
})
</script>
<style lang="scss">
.templatelibrary{
width: 100%;
.tmpl{
width:100%;
.tmpl_header{
display:flex;
flex-wrap: wrap;
justify-content: space-between;
margin-bottom: 32px;
margin-left: 32px;
margin-right: 32px;
.tmplh_inp{
.inpbox{
display: flex;
margin-top: 32px;
.inpbox1{
display:flex;
justify-content: center;
align-items: center;
margin-right: 24px;
span{
white-space: nowrap;
}
}
}
}
.tmplh_btn{
display: flex;
margin-left: 38px;
margin-top: 32px;
.btn {
padding: 0px 26px 0px 26px;
height: 38px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
margin-left: 14px;
flex-shrink: 0;
.search {
background-size: 100%;
}
.btnText {
font-size: 14px;
font-weight: 400;
line-height: 36px;
margin-left: 5px;
}
.btnText1{
color: rgb(255, 255, 255);
}
.btnText2{
color: rgba(64, 158, 255, 1);
}
}
.btn1 {
background: #409EFF;
.search {
width: 15px;
height: 17px;
background-image: url("../../assets/images/courseManage/search0.png");
}
}
.btn2 {
background: #FFFFFF;
border: 1px solid #388BE1;
.search {
width: 16px;
height: 18px;
background-image: url("../../assets/images/courseManage/reset1.png");
}
}
.btn1:hover {
background: rgb(255, 255, 255);
border: 1px solid #388BE1;
.search {
background-image: url("../../assets/images/courseManage/search1.png");
}
.btnText {
color: rgba(64, 158, 255, 1);
}
}
.btn2:hover {
background: rgba(64, 158, 255, 1);
.search {
background-image: url("../../assets/images/courseManage/reset0.png");
}
.btnText {
color: #ffffff;
}
}
}
}
.tmpl_body{
.tmpl_tabbox{
.operation {
display: flex;
justify-content: center;
align-items: center;
color: #4ea6ff;
.nselect {
justify-content: center;
align-items: center;
display: flex;
.jc {
margin-left: 20px;
white-space: nowrap;
cursor: pointer;
}
}
}
}
}
</div>
) : (
<div></div>
)}
{value.status === "未发布" ? (
<div class="nselect">
<div class="ops1">
<div class="jc">
发布
<span style="color:#E9E9E9;margin-left:8px;">|</span>
</div>
</div>
<div class="ops2">
<router-link to="/libraryadd">
<div class="jc">
查看
<span style="color:#E9E9E9;margin-left:8px;">|</span>
</div>
</router-link>
</div>
<div class="ops3">
<div class="jc">删除</div>
</div>
</div>
) : (
<div></div>
)}
</div>
</div>
);
}
});
state.tableData = data;
};
getTableDate1();
return {
...toRefs(state),
columns1,
};
},
});
</script>
<style lang="scss">
.templatelibrary {
width: 100%;
.tmpl {
width: 100%;
.tmpl_header {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin-bottom: 32px;
margin-left: 32px;
margin-right: 32px;
.tmplh_inp {
.inpbox {
display: flex;
margin-top: 32px;
.inpbox1 {
display: flex;
justify-content: center;
align-items: center;
margin-right: 24px;
span {
white-space: nowrap;
}
}
}
}
.tmplh_btn {
display: flex;
margin-left: 38px;
margin-top: 32px;
.btn {
padding: 0px 26px 0px 26px;
height: 38px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
margin-left: 14px;
flex-shrink: 0;
.search {
background-size: 100%;
}
.btnText {
font-size: 14px;
font-weight: 400;
line-height: 36px;
margin-left: 5px;
}
.btnText1 {
color: rgb(255, 255, 255);
}
.btnText2 {
color: rgba(64, 158, 255, 1);
}
}
.btn1 {
background: #409eff;
.search {
width: 15px;
height: 17px;
background-image: url("../../assets/images/courseManage/search0.png");
}
}
.btn2 {
background: #ffffff;
border: 1px solid #388be1;
.search {
width: 16px;
height: 18px;
background-image: url("../../assets/images/courseManage/reset1.png");
}
}
.btn1:hover {
background: rgb(255, 255, 255);
border: 1px solid #388be1;
.search {
background-image: url("../../assets/images/courseManage/search1.png");
}
.btnText {
color: rgba(64, 158, 255, 1);
}
}
.btn2:hover {
background: rgba(64, 158, 255, 1);
.search {
background-image: url("../../assets/images/courseManage/reset0.png");
}
.btnText {
color: #ffffff;
}
}
}
}
</style>
.tmpl_body {
.tmpl_tabbox {
.operation {
display: flex;
justify-content: center;
align-items: center;
color: #4ea6ff;
.nselect {
justify-content: center;
align-items: center;
display: flex;
.jc {
margin-left: 20px;
white-space: nowrap;
cursor: pointer;
}
}
}
}
}
}
}
</style>

View File

@@ -7,7 +7,7 @@ module.exports = defineConfig({
target: "http://111.231.196.214:30001/",
changeOrigin: true,
secure: false,
ws: true,
ws: false,
pathRewrite: {
"^/api": "",
},