mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-24 10:12:54 +08:00
Merge branch 'master' of ssh://gitlab.dongwu-inc.com:10022/BOE/fe-manage
This commit is contained in:
40
src/App.vue
40
src/App.vue
@@ -42,18 +42,50 @@ export default defineComponent({
|
||||
});
|
||||
|
||||
const currentRouteName = computed(() => route.name);
|
||||
|
||||
//获取组织树
|
||||
const orgTree = () => {
|
||||
let obj = {
|
||||
id: 0,
|
||||
keyWord: "",
|
||||
pageNo: 0,
|
||||
pageSize: 20,
|
||||
};
|
||||
api
|
||||
.orgtree()
|
||||
.getOrgInfo(obj)
|
||||
.then((res) => {
|
||||
console.log("获取集团组织成功", res);
|
||||
if (res.status === 200) {
|
||||
store.commit("getOrgtreeList", res.data.data);
|
||||
// console.log("获取组织树成功", res.data.data);
|
||||
// state.orgtreeList = res.data.data;
|
||||
if (res.status === 200) {
|
||||
let arr = res.data.data.rows;
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
let object = {
|
||||
keyWord: "",
|
||||
id: arr[i].id,
|
||||
pageNo: 1,
|
||||
pageSize: 20,
|
||||
};
|
||||
api
|
||||
.getOrgInfo(object)
|
||||
.then((res) => {
|
||||
// console.log("获取子元素", res);
|
||||
if (res.status === 200) {
|
||||
arr[i].treeChildList = res.data.data.rows;
|
||||
if (i === arr.length - 1) {
|
||||
store.commit("getOrgtreeList", arr);
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取子元素失败", err);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取集团组织失败", err);
|
||||
console.log("获取组织树失败", err);
|
||||
});
|
||||
};
|
||||
orgTree();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2022-11-04 22:45:31
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2022-11-22 18:04:47
|
||||
* @LastEditTime: 2022-11-24 15:11:25
|
||||
* @FilePath: /fe-manage/src/api/index1.js
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
@@ -44,7 +44,7 @@ import qs from "qs";
|
||||
|
||||
//上传文件
|
||||
export const uploadFile = (obj) =>
|
||||
http.post("/test/testRequest", qs.stringify({ obj }));
|
||||
http.post("/test/testRequest", qs.stringify({ obj }));
|
||||
|
||||
// 接口-请求
|
||||
|
||||
@@ -56,7 +56,7 @@ export const getLearnPath = (obj) => http.post("/admin/router/list", obj);
|
||||
export const handleLearnPath = (obj) => http.post("/admin/router/handle", obj);
|
||||
//获取路径图统计数据
|
||||
export const getLearnCount = (routerId) =>
|
||||
http.get("/admin/router/getCount", { params: { routerId: routerId } });
|
||||
http.get("/admin/router/getCount", { params: { routerId: routerId } });
|
||||
|
||||
//新建或编辑关卡
|
||||
export const editChapter = (obj) => http.post("/admin/router/editChapter", obj);
|
||||
@@ -66,19 +66,19 @@ export const setConfig = (obj) => http.post("/admin/router/setConfig", obj);
|
||||
export const getStudent = (obj) => http.post("/admin/router/studentList", obj);
|
||||
//获取路径图详情-包含关卡及任务列表
|
||||
export const getRouterDetail = (routerId) =>
|
||||
http.get("/admin/router/detail", {
|
||||
params: {
|
||||
routerId: routerId,
|
||||
},
|
||||
});
|
||||
http.get("/admin/router/detail", {
|
||||
params: {
|
||||
routerId: routerId,
|
||||
},
|
||||
});
|
||||
//添加学员
|
||||
export const addStudent = (obj) => http.post("/admin/router/addStudent", obj);
|
||||
//删除学员
|
||||
export const delStudent = (obj) =>
|
||||
http.post("/admin/router/deleteStudent", obj);
|
||||
http.post("/admin/router/deleteStudent", obj);
|
||||
// 获取学员路径图进度明细
|
||||
export const stuProgress = (obj) =>
|
||||
http.post("/admin/router/studentProcess", obj);
|
||||
http.post("/admin/router/studentProcess", obj);
|
||||
|
||||
//项目基础信息-----------------------------------
|
||||
//项目积分榜单
|
||||
@@ -88,20 +88,35 @@ export const billboard = (obj) => http.post("/admin/project/billboard", obj);
|
||||
//项目基础信息-----------------------------------
|
||||
|
||||
//获取字典信息
|
||||
export const getDict = (obj) => http.post("/dict/getList", obj);
|
||||
//获取组织树
|
||||
export const getOrgTree = (obj) => http.post("/admin/router/orgList", obj);
|
||||
export const getDict = (obj) => http.post('/dict/getList', obj)
|
||||
//获取组织树一级列表
|
||||
export const getOrgTree = (obj) => http.post('/admin/router/orgList', obj)
|
||||
//根据id获取组织树一级元素下所有子元素
|
||||
export const orgTreeList = (obj) => http.post('/admin/router/orgTreeList', obj)
|
||||
//根据id获取部门下学员
|
||||
export const searchUsersByOrgId = (obj) => http.post('/admin/router/searchUsersByOrgId', obj)
|
||||
|
||||
//获取组织信息(修改版)
|
||||
export const getOrgInfo = (obj) => http.post('/admin/orgStruct/getOrgInfo', obj)
|
||||
//获取员工(修改版)
|
||||
export const getMemberInfo = (obj) => http.post('/admin/orgStruct/getMemberInfo', obj)
|
||||
//获取受众(修改版)
|
||||
export const getAudienceInfo = (obj) => http.post('/admin/orgStruct/getAudienceInfo', obj)
|
||||
//获取授权(修改版)
|
||||
export const optionAuthPerm = (obj) => http.post('/admin/AuthPerm/optionAuthPerm', obj)
|
||||
|
||||
|
||||
|
||||
// 获取组织结构树
|
||||
export const orgtree = () => http.get("/org/tree");
|
||||
|
||||
//获取积分列表
|
||||
export const noticeList = (projectId) =>
|
||||
http.post(
|
||||
`http://localhost:8080/api/admin/project/noticeList?projectId=` +
|
||||
projectId +
|
||||
``
|
||||
);
|
||||
http.post(
|
||||
`http://localhost:8080/api/admin/project/noticeList?projectId=` +
|
||||
projectId +
|
||||
``
|
||||
);
|
||||
|
||||
// 测试方法
|
||||
// import * as api from '../../api/index'
|
||||
|
||||
@@ -162,6 +162,7 @@ function autoComma(number) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
//新建延迟
|
||||
const commonData = {
|
||||
timeout: 50
|
||||
}
|
||||
@@ -368,6 +369,8 @@ const commonData = {
|
||||
|
||||
//组织树
|
||||
const organizationalTree = []
|
||||
|
||||
const iframeUrl = "https://u-pre.boe.com/pc/iframe"
|
||||
export {
|
||||
toDate,
|
||||
getWeek,
|
||||
@@ -375,4 +378,5 @@ export {
|
||||
formatNumber,
|
||||
commonData,
|
||||
organizationalTree,
|
||||
iframeUrl,
|
||||
}
|
||||
68
src/components/Modals/addOnlineCourse.vue
Normal file
68
src/components/Modals/addOnlineCourse.vue
Normal file
@@ -0,0 +1,68 @@
|
||||
<!--
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2022-11-24 16:39:48
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2022-11-24 16:53:00
|
||||
* @FilePath: /fe-manage/src/components/Modals/addOnlineCourse.vue
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
-->
|
||||
<template>
|
||||
<!-- 新建在线课弹窗 -->
|
||||
<div>
|
||||
<a-modal
|
||||
:visible="addOnlineCoursevisible"
|
||||
:footer="null"
|
||||
:closable="false"
|
||||
wrapClassName="modalStyle addOnlineCourseStyle"
|
||||
:zIndex="9999"
|
||||
@cancel="closeModal"
|
||||
>
|
||||
<iframe
|
||||
id="iframe"
|
||||
style="width: 100%; height: 100%"
|
||||
:src="iframeUrl + 'course/noapproved'"
|
||||
name="myframe"
|
||||
sandbox="allow-forms allow-scripts allow-same-origin allow-popups"
|
||||
></iframe>
|
||||
</a-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { reactive, toRefs } from "vue";
|
||||
// import {getTask} from "../../api/indexTaskadd"
|
||||
// import dayjs from "dayjs";
|
||||
// import {message} from "ant-design-vue"
|
||||
import { iframeUrl } from "@/api/method";
|
||||
|
||||
export default {
|
||||
name: "addOnlineCourse",
|
||||
props: {
|
||||
addOnlineCoursevisible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
// console.log("学习路径", props.addOnlineCoursevisible, ctx);
|
||||
const state = reactive({
|
||||
iframeUrl: iframeUrl,
|
||||
});
|
||||
const closeModal = () => {
|
||||
ctx.emit("update:addOnlineCoursevisible", false);
|
||||
};
|
||||
return {
|
||||
...toRefs(state),
|
||||
closeModal,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" >
|
||||
.addOnlineCourseStyle {
|
||||
.ant-modal {
|
||||
width: 80% !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -493,7 +493,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 确认添加部门弹窗 -->
|
||||
<!-- 确认添加部门弹窗 -->
|
||||
<a-modal
|
||||
v-model:visible="showOrgModal"
|
||||
:footer="null"
|
||||
@@ -527,10 +527,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { reactive, toRefs, onMounted, onUnmounted } from "vue";
|
||||
import { reactive, toRefs, onMounted, onUnmounted, computed } from "vue";
|
||||
import elementResizeDetectorMaker from "element-resize-detector";
|
||||
import { message } from "ant-design-vue";
|
||||
import { toDate } from "../../api/method";
|
||||
import { useStore } from "vuex";
|
||||
export default {
|
||||
name: "ProjCheckShip",
|
||||
props: {
|
||||
@@ -540,8 +541,9 @@ export default {
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const store = useStore();
|
||||
const state = reactive({
|
||||
screenHeight: document.body.clientHeight, // 屏幕高度
|
||||
screenHeight: document.body.clientHeight, // 屏幕高度
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
tableDataTotal: 50,
|
||||
@@ -1042,11 +1044,15 @@ export default {
|
||||
selectedRowKeys2: [], //表格选中的key
|
||||
//受众关联-------------------------------------
|
||||
});
|
||||
//获取组织树
|
||||
state.treeData = computed(() => {
|
||||
return store.state.orgtreeList ? store.state.orgtreeList : [];
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
state.activeKey = "1";
|
||||
ctx.emit("update:ProjCheckvisible", false);
|
||||
};
|
||||
const afterVisibleChange = (bool) => {
|
||||
const afterVisibleChange = (bool) => {
|
||||
console.log("state", bool);
|
||||
};
|
||||
|
||||
@@ -1393,7 +1399,7 @@ export default {
|
||||
};
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
...toRefs(state),
|
||||
afterVisibleChange,
|
||||
closeDrawer,
|
||||
onSelectChange,
|
||||
|
||||
@@ -82,8 +82,14 @@
|
||||
allow-clear
|
||||
:tree-data="treeData"
|
||||
@select="departmentSelect"
|
||||
v-model:selectedKeys="selectedKeys"
|
||||
:selectedKeys="selectedKeys"
|
||||
v-model:expandedKeys="openKeys"
|
||||
:fieldNames="{
|
||||
children: 'treeChildList',
|
||||
key: 'id',
|
||||
title: 'name',
|
||||
value: 'name',
|
||||
}"
|
||||
>
|
||||
<template #suffixIcon></template>
|
||||
</a-tree>
|
||||
@@ -150,7 +156,7 @@
|
||||
</div>
|
||||
<div class="btnn">
|
||||
<button class="btn1">取消</button>
|
||||
<button class="btn2">确定</button>
|
||||
<button class="btn2" @click="addAuth">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -188,10 +194,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { reactive, toRefs, onMounted, onUnmounted } from "vue";
|
||||
import { reactive, toRefs, onMounted, onUnmounted, computed } from "vue";
|
||||
import elementResizeDetectorMaker from "element-resize-detector";
|
||||
// import { message } from "ant-design-vue";
|
||||
import * as api from "../../api/index1";
|
||||
import { useStore } from "vuex";
|
||||
export default {
|
||||
name: "ProjOwnerShip",
|
||||
props: {
|
||||
@@ -199,13 +206,21 @@ export default {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
selectProjectId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const store = useStore();
|
||||
|
||||
const state = reactive({
|
||||
screenHeight: document.body.clientHeight, // 屏幕高度
|
||||
//快速选人分页-----
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
tableDataTotal: 50,
|
||||
tableDataTotal: -1,
|
||||
//快速选人分页------
|
||||
pageSize1: 10,
|
||||
currentPage1: 1,
|
||||
tableDataTotal1: 50,
|
||||
@@ -462,180 +477,186 @@ export default {
|
||||
],
|
||||
//快速选人的table
|
||||
tabledata: [
|
||||
{
|
||||
key: 1,
|
||||
name: "小李小李小李",
|
||||
bum: "产研部",
|
||||
numb: "000000",
|
||||
guishu: "产品部",
|
||||
},
|
||||
{
|
||||
key: 2,
|
||||
name: "小刘小刘小刘",
|
||||
bum: "产研部",
|
||||
numb: "000000",
|
||||
guishu: "产品部",
|
||||
},
|
||||
{
|
||||
key: 3,
|
||||
name: "小李小李",
|
||||
bum: "产研部",
|
||||
numb: "000000",
|
||||
guishu: "产品部",
|
||||
},
|
||||
{
|
||||
key: 4,
|
||||
name: "小李",
|
||||
bum: "产研部",
|
||||
numb: "000000",
|
||||
guishu: "产品部",
|
||||
},
|
||||
{
|
||||
key: 5,
|
||||
name: "小李",
|
||||
bum: "产研部",
|
||||
numb: "000000",
|
||||
guishu: "产品部",
|
||||
},
|
||||
{
|
||||
key: 6,
|
||||
name: "小李",
|
||||
bum: "产研部",
|
||||
numb: "000000",
|
||||
guishu: "产品部",
|
||||
},
|
||||
{
|
||||
key: 7,
|
||||
name: "小李",
|
||||
bum: "产研部",
|
||||
numb: "000000",
|
||||
guishu: "产品部",
|
||||
},
|
||||
{
|
||||
key: 8,
|
||||
name: "小李",
|
||||
bum: "产研部",
|
||||
numb: "000000",
|
||||
guishu: "产品部",
|
||||
},
|
||||
{
|
||||
key: 9,
|
||||
name: "小小李",
|
||||
bum: "产研部",
|
||||
numb: "000000",
|
||||
guishu: "产品部",
|
||||
},
|
||||
{
|
||||
key: 10,
|
||||
name: "小小李",
|
||||
bum: "产研部",
|
||||
numb: "000000",
|
||||
guishu: "产品部",
|
||||
},
|
||||
{
|
||||
key: 11,
|
||||
name: "小小李",
|
||||
bum: "产研部",
|
||||
numb: "000000",
|
||||
guishu: "产品部",
|
||||
},
|
||||
{
|
||||
key: 12,
|
||||
name: "小小李",
|
||||
bum: "产研部",
|
||||
numb: "000000",
|
||||
guishu: "产品部",
|
||||
},
|
||||
// {
|
||||
// key: 1,
|
||||
// name: "小李小李小李",
|
||||
// bum: "产研部",
|
||||
// numb: "000000",
|
||||
// guishu: "产品部",
|
||||
// },
|
||||
],
|
||||
tablecolumns: [
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "name",
|
||||
key: "name",
|
||||
// width: 30,
|
||||
align: "left",
|
||||
width: 80,
|
||||
align: "center",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "numb",
|
||||
key: "numb",
|
||||
// width: 30,
|
||||
width: 80,
|
||||
align: "center",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "归属组织",
|
||||
dataIndex: "guishu",
|
||||
key: "guishu",
|
||||
// width: 30,
|
||||
width: 80,
|
||||
align: "center",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "部门",
|
||||
dataIndex: "bum",
|
||||
key: "bum",
|
||||
// width: 30,
|
||||
width: 80,
|
||||
align: "center",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
},
|
||||
],
|
||||
|
||||
//快速选人-------------------------------------
|
||||
valueSelectboe: null, //快速选人的选择组织
|
||||
choosepeople: [], //总的数组
|
||||
selectedKeys: [], //选中部门
|
||||
selectedKeys: [], //选中部门的key
|
||||
selectDepartment: null, //选中部门名称
|
||||
showMore: false, //是否显示快速选人的查看更多
|
||||
showHidden: false, //是否显示收回
|
||||
selectedRowKeys: [], //表格选中的key
|
||||
selectPeopleArr: [], //表格选中的人
|
||||
//快速选人-------------------------------------
|
||||
});
|
||||
|
||||
//获取组织树
|
||||
const getOrgTree = () => {
|
||||
let obj = {
|
||||
keyword: "",
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
};
|
||||
api
|
||||
.getOrgTree(obj)
|
||||
.then((res) => {
|
||||
if (res.status === 200) {
|
||||
console.log("获取组织树成功", res);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取组织树失败", err);
|
||||
});
|
||||
};
|
||||
|
||||
const closeDrawer = () => {
|
||||
state.activeKey = "1";
|
||||
ctx.emit("update:ProjOwnervisible", false);
|
||||
};
|
||||
|
||||
const afterVisibleChange = (bool) => {
|
||||
console.log("state", bool);
|
||||
console.log("state", bool, props);
|
||||
if (bool) {
|
||||
getPeoples();
|
||||
optionAuthPerm();
|
||||
}
|
||||
};
|
||||
|
||||
const getClientHeight = () => {
|
||||
state.screenHeight = document.body.clientHeight;
|
||||
};
|
||||
// //监测快速选人的高度
|
||||
// const getClientHeightSelecteds = () => {
|
||||
// state.selectedsHeight = document.getElementById('selecteds').offsetHeight
|
||||
// console.log('selectedsHeight',state.selectedsHeight)
|
||||
//获取组织树
|
||||
state.treeData = computed(() => {
|
||||
return store.state.orgtreeList ? store.state.orgtreeList : [];
|
||||
});
|
||||
//获取选中部门的人员信息
|
||||
const getPeoples = () => {
|
||||
let obj = {
|
||||
keyWord: "",
|
||||
id: 0,
|
||||
org: state.selectedKeys[0],
|
||||
pageNo: state.currentPage,
|
||||
pageSize: state.pageSize,
|
||||
};
|
||||
if (!state.selectedKeys[0]) {
|
||||
state.tableDataTotal = 0;
|
||||
return;
|
||||
}
|
||||
// console.log("obj", obj);
|
||||
api
|
||||
.getMemberInfo(obj)
|
||||
.then((res) => {
|
||||
// console.log("获取学员成功", res.data);
|
||||
if (res.data.code === 200) {
|
||||
let arr = res.data.data.rows;
|
||||
let array = [];
|
||||
arr.map((value) => {
|
||||
// console.log("学员信息", value);
|
||||
let obj = {
|
||||
key: value.id,
|
||||
id: value.id,
|
||||
name: value.realName ? value.realName : "-",
|
||||
bum: state.selectDepartment ? state.selectDepartment : "-",
|
||||
numb: value.userNo ? value.userNo : "-",
|
||||
guishu: state.selectDepartment ? state.selectDepartment : "-",
|
||||
};
|
||||
array.push(obj);
|
||||
});
|
||||
state.tabledata = array;
|
||||
state.tableDataTotal = res.data.data.total;
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取学员失败", err);
|
||||
});
|
||||
};
|
||||
|
||||
//分页
|
||||
const changePagination = () => {
|
||||
getPeoples();
|
||||
};
|
||||
//获取授权
|
||||
const optionAuthPerm = () => {
|
||||
let obj = {
|
||||
keyWord: "",
|
||||
tag: 1, //归属权
|
||||
opt: 1, //查询
|
||||
type: 2, //项目
|
||||
// refId: props.selectProjectId, //项目id
|
||||
refId: 64,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
studentList: [],
|
||||
};
|
||||
console.log("obj", obj);
|
||||
api
|
||||
.optionAuthPerm(obj)
|
||||
.then((res) => {
|
||||
console.log("获取授权成功", res);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取授权失败", err);
|
||||
});
|
||||
};
|
||||
//修改归属权
|
||||
const changeOwnership = () => {
|
||||
let obj = {
|
||||
keyWord: "",
|
||||
tag: 2, //归属权
|
||||
opt: 3, //修改
|
||||
type: 2, //项目
|
||||
// refId: props.selectProjectId, //项目id
|
||||
refId: 64,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
// studentList: state.selectPeopleArr,
|
||||
studentList: [{ id: "966733333637632000", name: "何丹" }],
|
||||
};
|
||||
console.log("修改归属权obj", obj);
|
||||
api
|
||||
.optionAuthPerm(obj)
|
||||
.then((res) => {
|
||||
console.log("修改授权成功", res);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("修改授权失败", err);
|
||||
});
|
||||
};
|
||||
//确认修改归属权
|
||||
const addAuth = () => {
|
||||
changeOwnership();
|
||||
};
|
||||
|
||||
// };
|
||||
onMounted(() => {
|
||||
// console.log("11111", 1);
|
||||
window.addEventListener("resize", getClientHeight, false);
|
||||
// window.addEventListener("resize", getClientHeightSelecteds, false);
|
||||
// judgeUrl();
|
||||
|
||||
getOrgTree();
|
||||
});
|
||||
onUnmounted(() => {
|
||||
window.removeEventListener("resize", getClientHeight, false);
|
||||
@@ -645,15 +666,35 @@ export default {
|
||||
// 开始 快速选人------------------------------------------------------------------
|
||||
//选中部门
|
||||
const departmentSelect = (e, k) => {
|
||||
console.log("选中的部门", e, k);
|
||||
state.selectedKeys = [k.node.key];
|
||||
if (k.node.treeChildList === null) {
|
||||
state.selectedKeys = [k.node.key];
|
||||
state.selectDepartment = k.node.name;
|
||||
getPeoples();
|
||||
}
|
||||
// console.log("kkkkkk", k);
|
||||
// state.selectedKeys = [k.node.key];
|
||||
// state.selectDepartment = k.node.name;
|
||||
// getPeoples();
|
||||
};
|
||||
//快速选人 选中的数组
|
||||
const onSelectChange = (selectedRowKeys, item) => {
|
||||
// console.log("selectedRowKeys changed: ", selectedRowKeys,item);
|
||||
console.log("selectedRowKeys changed: ", selectedRowKeys, item);
|
||||
state.selectedRowKeys = selectedRowKeys;
|
||||
state.choosepeople = item.reverse();
|
||||
selectedsHeight();
|
||||
|
||||
//选中的人
|
||||
let arr = [];
|
||||
for (let i = 0; i < item.length; i++) {
|
||||
console.log("item[i]", item[i]);
|
||||
let obj = {
|
||||
id: item[i].id,
|
||||
name: item[i].name,
|
||||
};
|
||||
arr.push(obj);
|
||||
}
|
||||
state.selectPeopleArr = arr;
|
||||
|
||||
// selectedsHeight();
|
||||
};
|
||||
//单个删除选中的人
|
||||
const deleteChoosePeople = (item) => {
|
||||
@@ -752,6 +793,10 @@ export default {
|
||||
|
||||
deleteAll,
|
||||
expandTree,
|
||||
changePagination,
|
||||
optionAuthPerm,
|
||||
changeOwnership,
|
||||
addAuth,
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -1016,6 +1061,14 @@ export default {
|
||||
// }
|
||||
}
|
||||
.tabb {
|
||||
flex: 1;
|
||||
// .ant-table-wrapper {
|
||||
// min-height: 500px;
|
||||
// }
|
||||
.ant-radio {
|
||||
margin-left: 8px;
|
||||
// margin-right: 3px;
|
||||
}
|
||||
.ant-table-thead > tr > th {
|
||||
background-color: rgba(240, 246, 252, 1);
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
|
||||
@@ -1,466 +1,497 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:visible="STvisible"
|
||||
class="drawerStyle TimeManage"
|
||||
placement="right"
|
||||
width="60%"
|
||||
@after-visible-change="afterVisibleChange"
|
||||
>
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
<div class="headerTitle">选择考试</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"
|
||||
<a-drawer
|
||||
:visible="STvisible"
|
||||
class="drawerStyle TimeManage"
|
||||
placement="right"
|
||||
width="60%"
|
||||
@after-visible-change="afterVisibleChange"
|
||||
>
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
<div class="headerTitle">选择考试</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"
|
||||
/>
|
||||
</div>
|
||||
<div class="main">
|
||||
<div class="search">
|
||||
<div class="sealeft">
|
||||
<div class="namecon" style="margin-right: 30px">
|
||||
<div class="name">试卷名称:</div>
|
||||
<a-input
|
||||
v-model:value="inputPname"
|
||||
style="width: 270px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入试卷名称或序号"
|
||||
/>
|
||||
</div>
|
||||
<div class="namecon" style="margin-right: 30px">
|
||||
<div class="name">创建人:</div>
|
||||
<a-input
|
||||
v-model:value="inputCname"
|
||||
style="width: 240px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入创建人"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btns">
|
||||
<div
|
||||
class="btn btn1"
|
||||
style="margin-right: 20px"
|
||||
@click="searchTaskList"
|
||||
>
|
||||
<div class="img1"></div>
|
||||
<div class="wz">搜索</div>
|
||||
</div>
|
||||
<div class="btn btn2" @click="resetTaskList">
|
||||
<div class="img2"></div>
|
||||
<div class="wz">重置</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnss" style="margin-top: 20px">
|
||||
<div class="btn btn1" @click="newTest()" style="margin-right: 20px">
|
||||
<div class="wz">新建考试</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab" style="margin-top: 20px; margin-bottom: 100px">
|
||||
<a-table
|
||||
style="border: 1px solid #f2f6fe"
|
||||
:columns="tableDataFunc()"
|
||||
:data-source="tableData"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
:row-selection="{
|
||||
selectedRowKeys: selectedRowKeys,
|
||||
onChange: onSelectChange,
|
||||
hideSelectAll: true,
|
||||
}"
|
||||
:scroll="{ x: 900 }"
|
||||
:pagination="false"
|
||||
/>
|
||||
</div>
|
||||
<div class="main">
|
||||
<div class="search">
|
||||
<div class="sealeft">
|
||||
<div class="namecon" style="margin-right: 30px">
|
||||
<div class="name">试卷名称:</div>
|
||||
<a-input
|
||||
v-model:value="inputPname"
|
||||
style="width: 270px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入试卷名称或序号"
|
||||
/>
|
||||
</div>
|
||||
<div class="namecon" style="margin-right: 30px">
|
||||
<div class="name">创建人:</div>
|
||||
<a-input
|
||||
v-model:value="inputCname"
|
||||
style="width: 240px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入创建人"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btns">
|
||||
<div
|
||||
class="btn btn1"
|
||||
style="margin-right: 20px"
|
||||
@click="searchTaskList"
|
||||
>
|
||||
<div class="img1"></div>
|
||||
<div class="wz">搜索</div>
|
||||
</div>
|
||||
<div class="btn btn2" @click="resetTaskList">
|
||||
<div class="img2"></div>
|
||||
<div class="wz">重置</div>
|
||||
</div>
|
||||
<div class="tableBox">
|
||||
<div class="pa">
|
||||
<a-pagination
|
||||
showSizeChanger="true"
|
||||
showQuickJumper="true"
|
||||
hideOnSinglePage="true"
|
||||
:pageSize="pageSize"
|
||||
:current="currentPage"
|
||||
:total="tableDataTotal"
|
||||
class="pagination"
|
||||
@change="onChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnss" style="margin-top: 20px">
|
||||
<div class="btn btn1" @click="newTest()" style="margin-right: 20px">
|
||||
<div class="wz">新建考试</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab" style="margin-top: 20px; margin-bottom: 100px">
|
||||
<a-table
|
||||
style="border: 1px solid #f2f6fe"
|
||||
:columns="tableDataFunc()"
|
||||
:data-source="tableData"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
:row-selection="{selectedRowKeys:selectedRowKeys, onChange:onSelectChange, hideSelectAll:true}"
|
||||
:scroll="{ x: 900 }"
|
||||
:pagination="false"
|
||||
/>
|
||||
<div class="tableBox">
|
||||
<div class="pa">
|
||||
<a-pagination
|
||||
showSizeChanger="true"
|
||||
showQuickJumper="true"
|
||||
hideOnSinglePage="true"
|
||||
:pageSize="pageSize"
|
||||
:current="currentPage"
|
||||
:total="tableDataTotal"
|
||||
class="pagination"
|
||||
@change="onChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnn">
|
||||
<button class="btn1">取消</button>
|
||||
<button class="btn2" @click="CreatSTText()">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
<div class="btnn">
|
||||
<button class="btn1">取消</button>
|
||||
<button class="btn2" @click="CreatSTText()">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
|
||||
<!-- 新建考试 -->
|
||||
<a-modal
|
||||
v-model:visible="addExamVisible"
|
||||
:footer="null"
|
||||
:closable="false"
|
||||
wrapClassName="modalStyle addExamModal"
|
||||
:zIndex="9999"
|
||||
>
|
||||
<iframe
|
||||
id="iframe"
|
||||
style="width: 100%; height: 100%"
|
||||
:src="iframeUrl + '/exam/tests'"
|
||||
name="myframe"
|
||||
sandbox="allow-forms allow-scripts allow-same-origin allow-popups"
|
||||
></iframe>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { toRefs, reactive } from "vue";
|
||||
import * as api from "../../api/indexTest";
|
||||
import { message } from 'ant-design-vue';
|
||||
export default {
|
||||
name: "STest",
|
||||
props: {
|
||||
STvisible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
import { toRefs, reactive } from "vue";
|
||||
import * as api from "../../api/indexTest";
|
||||
import { message } from "ant-design-vue";
|
||||
import { iframeUrl } from "../../api/method";
|
||||
export default {
|
||||
name: "STest",
|
||||
props: {
|
||||
STvisible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
inputPname: "",
|
||||
inputCname: "",
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
tableDataTotal: 0,
|
||||
projectName: "",
|
||||
tableData: [],
|
||||
selectedRowKeys:[],
|
||||
//需要传给父亲的参数
|
||||
SelectTestData:{},
|
||||
},
|
||||
|
||||
});
|
||||
//点击确认后执行此方法将参数传给父亲
|
||||
const CreatSTText = ()=> {
|
||||
ctx.emit('getSTData',state.SelectTestData)
|
||||
closeDrawer()
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
inputPname: "",
|
||||
inputCname: "",
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
tableDataTotal: 0,
|
||||
projectName: "",
|
||||
tableData: [],
|
||||
selectedRowKeys: [],
|
||||
//需要传给父亲的参数
|
||||
SelectTestData: {},
|
||||
|
||||
addExamVisible: false, //新建考试弹窗
|
||||
iframeUrl: iframeUrl,
|
||||
});
|
||||
//点击确认后执行此方法将参数传给父亲
|
||||
const CreatSTText = () => {
|
||||
ctx.emit("getSTData", state.SelectTestData);
|
||||
closeDrawer();
|
||||
};
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:STvisible", false);
|
||||
};
|
||||
|
||||
const afterVisibleChange = (bol) => {
|
||||
if (bol == true) {
|
||||
getManageList();
|
||||
}
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:STvisible", false);
|
||||
};
|
||||
};
|
||||
|
||||
const afterVisibleChange = (bol) => {
|
||||
if (bol == true) {
|
||||
getManageList()
|
||||
}
|
||||
};
|
||||
|
||||
const tableDataFunc = ()=> {
|
||||
{
|
||||
const columns = [
|
||||
{
|
||||
title: "序号",
|
||||
dataIndex: "paperId",
|
||||
key: "paperId",
|
||||
width: 90,
|
||||
align: "center",
|
||||
className: "h head",
|
||||
},
|
||||
{
|
||||
title: "试卷名称",
|
||||
dataIndex: "testName",
|
||||
key: "testName",
|
||||
width: 110,
|
||||
align: "center",
|
||||
className: "h head",
|
||||
},
|
||||
{
|
||||
title: "随机模式",
|
||||
dataIndex: "paperMode",
|
||||
key: "paperMode",
|
||||
width: 110,
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
{
|
||||
title: "创建人",
|
||||
dataIndex: "sysCreateBy",
|
||||
key: "sysCreateBy",
|
||||
width: 90,
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
{
|
||||
title: "最近更新时间",
|
||||
dataIndex: "sysUpdateTime",
|
||||
key: "sysUpdateTime",
|
||||
width: 150,
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
]
|
||||
return columns;
|
||||
}
|
||||
};
|
||||
|
||||
const onChange = (pageNumber) => {
|
||||
console.log("Page: ", pageNumber);
|
||||
};
|
||||
|
||||
const onSelectChange = (selectedRowKeys,selectedRows) => {
|
||||
if(selectedRowKeys.length>1){
|
||||
return
|
||||
}
|
||||
state.selectedRowKeys = selectedRowKeys;
|
||||
state.SelectTestData = selectedRows[0];
|
||||
console.log('state.SelectTestData---------------',state.SelectTestData);
|
||||
const tableDataFunc = () => {
|
||||
{
|
||||
const columns = [
|
||||
{
|
||||
title: "序号",
|
||||
dataIndex: "paperId",
|
||||
key: "paperId",
|
||||
width: 90,
|
||||
align: "center",
|
||||
className: "h head",
|
||||
},
|
||||
{
|
||||
title: "试卷名称",
|
||||
dataIndex: "testName",
|
||||
key: "testName",
|
||||
width: 110,
|
||||
align: "center",
|
||||
className: "h head",
|
||||
},
|
||||
{
|
||||
title: "随机模式",
|
||||
dataIndex: "paperMode",
|
||||
key: "paperMode",
|
||||
width: 110,
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
{
|
||||
title: "创建人",
|
||||
dataIndex: "sysCreateBy",
|
||||
key: "sysCreateBy",
|
||||
width: 90,
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
{
|
||||
title: "最近更新时间",
|
||||
dataIndex: "sysUpdateTime",
|
||||
key: "sysUpdateTime",
|
||||
width: 150,
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
];
|
||||
return columns;
|
||||
}
|
||||
};
|
||||
|
||||
const newTest = ()=> {
|
||||
console.log('创建考试没设计图');
|
||||
const onChange = (pageNumber) => {
|
||||
console.log("Page: ", pageNumber);
|
||||
};
|
||||
|
||||
const onSelectChange = (selectedRowKeys, selectedRows) => {
|
||||
if (selectedRowKeys.length > 1) {
|
||||
return;
|
||||
}
|
||||
const getTableDate = (tableData) => {
|
||||
state.selectedRowKeys = selectedRowKeys;
|
||||
state.SelectTestData = selectedRows[0];
|
||||
console.log("state.SelectTestData---------------", state.SelectTestData);
|
||||
};
|
||||
|
||||
const newTest = () => {
|
||||
console.log("创建考试没设计图");
|
||||
state.addExamVisible = true;
|
||||
};
|
||||
const getTableDate = (tableData) => {
|
||||
let data = tableData;
|
||||
let array = [];
|
||||
data.map((value, index) => {
|
||||
let obj = {
|
||||
key: index+1,
|
||||
key: index + 1,
|
||||
sysCreateBy: value.sysCreateBy,
|
||||
paperId: value.paperId,
|
||||
testName:value.testName,
|
||||
paperMode:value.paperMode,
|
||||
testName: value.testName,
|
||||
paperMode: value.paperMode,
|
||||
sysUpdateTime: value.sysUpdateTime,
|
||||
};
|
||||
array.push(obj);
|
||||
});
|
||||
state.tableData = array;
|
||||
};
|
||||
//获取任务管理列表
|
||||
const getManageList = () => {
|
||||
let obj = {
|
||||
// "keyWord": "",
|
||||
// "pageIndex": 0,
|
||||
// "pageSize": 0,
|
||||
// "published": true,
|
||||
"keyWord": "",
|
||||
"orderAsc": true,
|
||||
"orderFiled": "",
|
||||
"pageIndex": 0,
|
||||
"pageSize": 0
|
||||
};
|
||||
api
|
||||
.queryExaminationPaper(obj)
|
||||
.then((res) => {
|
||||
getTableDate(res.data.data)
|
||||
})
|
||||
.catch(() => {
|
||||
message.destroy()
|
||||
message.error("获取选择考试列表失败")
|
||||
});
|
||||
//获取任务管理列表
|
||||
const getManageList = () => {
|
||||
let obj = {
|
||||
// "keyWord": "",
|
||||
// "pageIndex": 0,
|
||||
// "pageSize": 0,
|
||||
// "published": true,
|
||||
keyWord: "",
|
||||
orderAsc: true,
|
||||
orderFiled: "",
|
||||
pageIndex: 0,
|
||||
pageSize: 0,
|
||||
};
|
||||
|
||||
//搜索任务列表 没接口
|
||||
const searchTaskList = () => {
|
||||
let objser = {
|
||||
name: "",
|
||||
pageNo: state.pageNo,
|
||||
pageSize: state.pageSize,
|
||||
projectId: 27,
|
||||
api
|
||||
.queryExaminationPaper(obj)
|
||||
.then((res) => {
|
||||
getTableDate(res.data.data);
|
||||
})
|
||||
.catch(() => {
|
||||
message.destroy();
|
||||
message.error("获取选择考试列表失败");
|
||||
});
|
||||
};
|
||||
|
||||
//搜索任务列表 没接口
|
||||
const searchTaskList = () => {
|
||||
let objser = {
|
||||
name: "",
|
||||
pageNo: state.pageNo,
|
||||
pageSize: state.pageSize,
|
||||
projectId: 27,
|
||||
// projectTaskId: props.projectTaskId,
|
||||
projectTaskId: 370,
|
||||
status: -1,
|
||||
};
|
||||
if (state.name !== "" || state.projectName !== "") {
|
||||
api
|
||||
.taskStudentList(objser)
|
||||
.then((res) => {
|
||||
state.pageNo = res.data.data.pageNo;
|
||||
state.pageSize = res.data.data.pageSize;
|
||||
state.pageSize = res.data.data.pageSize;
|
||||
let newArr = [];
|
||||
for (let i = 0; i < res.data.data.rows.length; i++) {
|
||||
if (res.data.data.rows[i].userInfoBo.userName == state.name)
|
||||
newArr.push(res.data.data.rows[i].userInfoBo);
|
||||
}
|
||||
state.tabledata = newArr;
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
}
|
||||
projectTaskId: 370,
|
||||
status: -1,
|
||||
};
|
||||
|
||||
//重置任务列表
|
||||
const resetTaskList = () => {
|
||||
state.inputPname = "";
|
||||
state.inputCname = "";
|
||||
state.tableData = [];
|
||||
state.selectedRowKeys = [];
|
||||
state.SelectTestData = [];
|
||||
state.currentPage = 1;
|
||||
getManageList();
|
||||
};
|
||||
return {
|
||||
...toRefs(state),
|
||||
closeDrawer,
|
||||
afterVisibleChange,
|
||||
getTableDate,
|
||||
onSelectChange,
|
||||
CreatSTText,
|
||||
newTest,
|
||||
tableDataFunc,
|
||||
onChange,
|
||||
getManageList,
|
||||
searchTaskList,
|
||||
resetTaskList,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
if (state.name !== "" || state.projectName !== "") {
|
||||
api
|
||||
.taskStudentList(objser)
|
||||
.then((res) => {
|
||||
state.pageNo = res.data.data.pageNo;
|
||||
state.pageSize = res.data.data.pageSize;
|
||||
state.pageSize = res.data.data.pageSize;
|
||||
let newArr = [];
|
||||
for (let i = 0; i < res.data.data.rows.length; i++) {
|
||||
if (res.data.data.rows[i].userInfoBo.userName == state.name)
|
||||
newArr.push(res.data.data.rows[i].userInfoBo);
|
||||
}
|
||||
state.tabledata = newArr;
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
};
|
||||
|
||||
//重置任务列表
|
||||
const resetTaskList = () => {
|
||||
state.inputPname = "";
|
||||
state.inputCname = "";
|
||||
state.tableData = [];
|
||||
state.selectedRowKeys = [];
|
||||
state.SelectTestData = [];
|
||||
state.currentPage = 1;
|
||||
getManageList();
|
||||
};
|
||||
return {
|
||||
...toRefs(state),
|
||||
closeDrawer,
|
||||
afterVisibleChange,
|
||||
getTableDate,
|
||||
onSelectChange,
|
||||
CreatSTText,
|
||||
newTest,
|
||||
tableDataFunc,
|
||||
onChange,
|
||||
getManageList,
|
||||
searchTaskList,
|
||||
resetTaskList,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.TimeManage {
|
||||
.drawerMain {
|
||||
min-width: 550px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
overflow-x: auto;
|
||||
.TimeManage {
|
||||
.drawerMain {
|
||||
min-width: 550px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.header {
|
||||
height: 73px;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.header {
|
||||
height: 73px;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
display: flex;
|
||||
flex-shrink: 0;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
.headerTitle {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
line-height: 25px;
|
||||
}
|
||||
flex-shrink: 0;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
.headerTitle {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
line-height: 25px;
|
||||
}
|
||||
.main {
|
||||
}
|
||||
.main {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
padding-right: 10px;
|
||||
.search {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
padding-right: 10px;
|
||||
.search {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 20px;
|
||||
justify-content: space-between;
|
||||
|
||||
.sealeft {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 20px;
|
||||
justify-content: space-between;
|
||||
|
||||
.sealeft {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.namecon {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
margin-bottom: 10px;
|
||||
.name {
|
||||
margin-top: 8px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
.btns {
|
||||
.namecon {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
|
||||
.btn {
|
||||
cursor: pointer;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.img1 {
|
||||
width: 15px;
|
||||
height: 17px;
|
||||
background-image: url(../../assets/images/courseManage/search0.png);
|
||||
background-size: 100% 100%;
|
||||
margin-right: 7px;
|
||||
}
|
||||
.img2 {
|
||||
width: 16px;
|
||||
height: 18px;
|
||||
background-image: url(../../assets/images/courseManage/reset1.png);
|
||||
background-size: 100% 100%;
|
||||
margin-right: 7px;
|
||||
}
|
||||
}
|
||||
|
||||
.btn1 {
|
||||
background: #409eff;
|
||||
|
||||
color: #ffffff;
|
||||
}
|
||||
.btn2 {
|
||||
background: #ffffff;
|
||||
|
||||
color: #388be1;
|
||||
border: 1px solid #388be1;
|
||||
margin-bottom: 10px;
|
||||
.name {
|
||||
margin-top: 8px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
.btnss {
|
||||
.btns {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
|
||||
|
||||
.btn {
|
||||
cursor: pointer;
|
||||
width: 130px;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.img1 {
|
||||
width: 15px;
|
||||
height: 17px;
|
||||
background-image: url(../../assets/images/courseManage/search0.png);
|
||||
background-size: 100% 100%;
|
||||
margin-right: 7px;
|
||||
}
|
||||
.img2 {
|
||||
width: 16px;
|
||||
height: 18px;
|
||||
background-image: url(../../assets/images/courseManage/reset1.png);
|
||||
background-size: 100% 100%;
|
||||
margin-right: 7px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.btn1 {
|
||||
background: #409eff;
|
||||
|
||||
color: #ffffff;
|
||||
}
|
||||
.btn2 {
|
||||
background: #ffffff;
|
||||
|
||||
color: #388be1;
|
||||
border: 1px solid #388be1;
|
||||
}
|
||||
}
|
||||
.tab {
|
||||
th,th.h {
|
||||
background-color: #eff4fc !important;
|
||||
}
|
||||
|
||||
.ant-table-tbody
|
||||
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
|
||||
> td {
|
||||
background: #f6f9fd;
|
||||
}
|
||||
.tableBox {
|
||||
.pa {
|
||||
margin-top: 15px;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
.ant-pagination-prev,
|
||||
.ant-pagination-next,
|
||||
.ant-pagination-item,
|
||||
.ant-pagination-options {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
.btnss {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
|
||||
.btn {
|
||||
cursor: pointer;
|
||||
width: 130px;
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.btn1 {
|
||||
background: #409eff;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
.tab {
|
||||
th,
|
||||
th.h {
|
||||
background-color: #eff4fc !important;
|
||||
}
|
||||
|
||||
.ant-table-tbody
|
||||
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
|
||||
> td {
|
||||
background: #f6f9fd;
|
||||
}
|
||||
.tableBox {
|
||||
.pa {
|
||||
margin-top: 15px;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
.ant-pagination-prev,
|
||||
.ant-pagination-next,
|
||||
.ant-pagination-item,
|
||||
.ant-pagination-options {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btnn {
|
||||
height: 72px;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.btnn {
|
||||
height: 72px;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
|
||||
.btn1 {
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
border: 1px solid #4ea6ff;
|
||||
border-radius: 8px;
|
||||
color: #4ea6ff;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
|
||||
.btn1 {
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
border: 1px solid #4ea6ff;
|
||||
border-radius: 8px;
|
||||
color: #4ea6ff;
|
||||
background-color: #fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
.btn2 {
|
||||
cursor: pointer;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
background: #409eff;
|
||||
border-radius: 8px;
|
||||
border: 0;
|
||||
margin-left: 15px;
|
||||
color: #fff;
|
||||
}
|
||||
cursor: pointer;
|
||||
}
|
||||
.btn2 {
|
||||
cursor: pointer;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
background: #409eff;
|
||||
border-radius: 8px;
|
||||
border: 0;
|
||||
margin-left: 15px;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
.addExamModal {
|
||||
.ant-modal {
|
||||
width: 80% !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2022-11-09 09:26:26
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2022-11-21 17:43:07
|
||||
* @LastEditTime: 2022-11-23 17:25:31
|
||||
* @FilePath: /fe-manage/src/store/index.js
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
import { createStore } from "vuex";
|
||||
|
||||
// import * as api from '../api/index1'
|
||||
export default createStore({
|
||||
state: {
|
||||
openpages: localStorage.getItem("openpages")
|
||||
@@ -22,7 +22,7 @@ export default createStore({
|
||||
|
||||
assessmentName: "",
|
||||
routerId: null,
|
||||
projectTemplateId:null,
|
||||
projectTemplateId: null,
|
||||
orgtreeList: [],
|
||||
},
|
||||
getters: {},
|
||||
@@ -41,12 +41,15 @@ export default createStore({
|
||||
console.log("state.assessmentName");
|
||||
console.log(state.assessmentName);
|
||||
},
|
||||
getOrgtreeList(state, orgtreeList) {
|
||||
state.orgtreeList = orgtreeList;
|
||||
//获取组织树
|
||||
getOrgtreeList(state, data) {
|
||||
state.orgtreeList = data
|
||||
},
|
||||
SET_projectTemplateId (state,projectTemplateId) {
|
||||
SET_projectTemplateId(state, projectTemplateId) {
|
||||
state.projectTemplateId = projectTemplateId;
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
actions: {},
|
||||
modules: {},
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2022-11-09 09:26:26
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2022-11-22 20:13:01
|
||||
* @LastEditTime: 2022-11-24 16:16:10
|
||||
* @FilePath: /fe-manage/src/views/courselibrary/CourseManage.vue
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
-->
|
||||
@@ -11,8 +11,8 @@
|
||||
<div class="courseManage">
|
||||
<iframe
|
||||
id="iframe"
|
||||
style="width: 100%l; height: 100%"
|
||||
src="https://u-pre.boe.com/pc/iframe/course/coursewares"
|
||||
style="width: 100%; height: 100%"
|
||||
:src="iframeUrl + '/course/coursewares'"
|
||||
name="myframe"
|
||||
sandbox="allow-forms allow-scripts allow-same-origin allow-popups"
|
||||
></iframe>
|
||||
@@ -20,12 +20,14 @@
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs, onMounted } from "vue";
|
||||
|
||||
import { iframeUrl } from "../../api/method";
|
||||
export default {
|
||||
name: "CourseManage",
|
||||
|
||||
setup() {
|
||||
const state = reactive({});
|
||||
const state = reactive({
|
||||
iframeUrl: iframeUrl,
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
// console.log("执行");
|
||||
|
||||
@@ -2118,6 +2118,9 @@
|
||||
<!-- 添加授权侧弹窗 -->
|
||||
<corpowerlist v-model:corpowerlistVisible="corpowerlistvisible" />
|
||||
<!-- 添加授权侧弹窗 -->
|
||||
<!-- 新建在线课弹窗 -->
|
||||
<addOnlineCourse v-model:addOnlineCoursevisible="addOnlineCoursevisible" />
|
||||
<!-- 新建在线课弹窗 -->
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -2133,6 +2136,7 @@ import {
|
||||
import { message } from "ant-design-vue";
|
||||
import OwnPower from "../../components/drawers/OwnPower.vue";
|
||||
import Corpowerlist from "../../components/drawers/CorPowerlist.vue";
|
||||
import addOnlineCourse from "../../components/Modals/addOnlineCourse.vue";
|
||||
import {
|
||||
list,
|
||||
edit,
|
||||
@@ -2601,6 +2605,7 @@ export default defineComponent({
|
||||
Corpowerlist,
|
||||
Editor,
|
||||
Toolbar,
|
||||
addOnlineCourse,
|
||||
},
|
||||
setup() {
|
||||
const state = reactive({
|
||||
@@ -3067,6 +3072,7 @@ export default defineComponent({
|
||||
checked4: false,
|
||||
offcoursePlanId: 0,
|
||||
filesList: [],
|
||||
addOnlineCoursevisible: false, //新建面授弹窗
|
||||
});
|
||||
|
||||
// 富文本 sssssssssssssss
|
||||
@@ -3655,6 +3661,9 @@ export default defineComponent({
|
||||
state.qdms_inputV1 = state.xzinputV1;
|
||||
state.xzinputV1 = "";
|
||||
}
|
||||
if (state.bs_hs&& state.valueE1 != "") {
|
||||
state.addOnlineCoursevisible = true;
|
||||
}
|
||||
};
|
||||
const ft_exit = () => {
|
||||
state.ft_hs = false;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2022-11-16 20:59:33
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2022-11-16 21:09:01
|
||||
* @LastEditTime: 2022-11-24 16:21:04
|
||||
* @FilePath: /fe-manage/src/views/examine/CourseReviewedN.vue
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
-->
|
||||
@@ -382,6 +382,23 @@
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
|
||||
<!-- 审核在线课 -->
|
||||
<a-modal
|
||||
v-model:visible="onlineClassesVisible"
|
||||
:footer="null"
|
||||
:closable="false"
|
||||
wrapClassName="modalStyle onlineClassesStyle"
|
||||
:zIndex="9999"
|
||||
>
|
||||
<iframe
|
||||
id="iframe"
|
||||
style="width: 100%; height: 100%"
|
||||
:src="iframeUrl + 'course/noapproved'"
|
||||
name="myframe"
|
||||
sandbox="allow-forms allow-scripts allow-same-origin allow-popups"
|
||||
></iframe>
|
||||
</a-modal>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -390,7 +407,7 @@ import { list, courseAuditView } from "../../api/indexAudit";
|
||||
import { toDate } from "../../api/method";
|
||||
import { message } from "ant-design-vue";
|
||||
import { Editor, Toolbar } from "@wangeditor/editor-for-vue";
|
||||
|
||||
import { iframeUrl } from "../../api/method";
|
||||
export default {
|
||||
name: "CoursereViewedN",
|
||||
components: {
|
||||
@@ -503,6 +520,10 @@ export default {
|
||||
],
|
||||
// 待审核课程的数据
|
||||
tableData1: [],
|
||||
|
||||
//审核在线课嵌套页面
|
||||
onlineClassesVisible: false,
|
||||
iframeUrl: iframeUrl,
|
||||
});
|
||||
|
||||
const getFaceList = (obj) => {
|
||||
|
||||
@@ -333,51 +333,131 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="btns">
|
||||
<div class="btn1" @click="edit = !edit">
|
||||
<div class="btn1" @click="editRule">
|
||||
<span class="btn1text">保存</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="edit" class="pjcb_content">
|
||||
<div class="content content1">
|
||||
<span>当前设计下,学员可以获得 </span
|
||||
><span class="scoretext">{{ scoresum }}</span
|
||||
><span>积分</span>
|
||||
</div>
|
||||
<div class="content content2">
|
||||
<span>完成【必修/选修】获得 </span
|
||||
><span class="scoretext">{{ score1 }} </span><span>积分</span>
|
||||
</div>
|
||||
<div class="content content3">
|
||||
<span>优秀学员可获得 </span
|
||||
><span class="scoretext">{{ score2 }}</span
|
||||
><span>积分</span>
|
||||
</div>
|
||||
<div class="content content1">
|
||||
<span>当前设计下,学员可以获得 </span
|
||||
><span class="scoretext">{{ scoresum }}</span
|
||||
><span>积分</span>
|
||||
</div>
|
||||
<div v-else class="pjcb_content">
|
||||
<div class="content content1">
|
||||
<span>当前设计下,学员可以获得 </span
|
||||
><span class="scoretext">{{ scoresum }}</span
|
||||
><span>积分</span>
|
||||
</div>
|
||||
<div class="content content2">
|
||||
<span>完成【必修/选修】获得 </span
|
||||
><span
|
||||
><a-input
|
||||
v-model:value="score1"
|
||||
:bordered="false"
|
||||
@change="getScore"
|
||||
/> </span
|
||||
><span>积分</span>
|
||||
</div>
|
||||
<div class="content content3">
|
||||
<span>优秀学员可获得 </span
|
||||
><span
|
||||
><a-input v-model:value="score2" :bordered="false" /></span
|
||||
><span>积分</span>
|
||||
</div>
|
||||
<div class="content content2">
|
||||
<span>完成【必修/选修】获得 </span
|
||||
><span class="scoretext">{{ score1 }} </span><span>积分</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
<span>完成作业成绩不低于 </span
|
||||
><span class="scoretext">{{ done2 }}</span
|
||||
><span>分获得</span> <span class="scoretext">{{ done3 }}</span
|
||||
><span>积分</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
<span>前</span><span class="scoretext">{{ four1 }}</span
|
||||
><span>名学完在线课程获得</span>
|
||||
<span class="scoretext">{{ four2 }}</span
|
||||
><span style="margin-right: 50px">积分</span> <span>前</span
|
||||
><span class="scoretext">{{ four3 }}</span
|
||||
><span>名提交作业且成绩不低于</span>
|
||||
<span class="scoretext">{{ four4 }}</span
|
||||
><span>分获得</span> <span class="scoretext">{{ four5 }}</span
|
||||
><span>积分</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
<span>考试成绩高于</span
|
||||
><span class="scoretext">{{ five1 }}</span
|
||||
><span>分获得</span> <span class="scoretext">{{ five2 }}</span
|
||||
><span>积分</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
<span>考勤正常学员获得 </span
|
||||
><span class="scoretext">{{ six1 }}</span
|
||||
><span>积分</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
<span>成为小组长获得</span
|
||||
><span class="scoretext">{{ seven1 }}</span
|
||||
><span style="margin-right: 50px">积分</span>
|
||||
<span>优秀学员可获得</span>
|
||||
<span class="scoretext">{{ seven2 }}</span
|
||||
><span>积分</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="pjcb_content">
|
||||
<div class="content content1">
|
||||
<span>当前设计下,学员可以获得 </span
|
||||
><span class="scoretext">{{ scoresum }}</span
|
||||
><span>积分</span>
|
||||
</div>
|
||||
<div class="content content2">
|
||||
<span>完成【必修/选修】获得 </span
|
||||
><span
|
||||
><a-input
|
||||
v-model:value="score1"
|
||||
:bordered="false"
|
||||
@change="getScore"
|
||||
/> </span
|
||||
><span>积分</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
<span>完成作业成绩不低于 </span
|
||||
><a-input v-model:value="done2" :bordered="false" /><span
|
||||
>分获得</span
|
||||
>
|
||||
<a-input v-model:value="done3" :bordered="false" /><span
|
||||
>积分</span
|
||||
>
|
||||
</div>
|
||||
<div class="content">
|
||||
<span>前</span
|
||||
><a-input v-model:value="four1" :bordered="false" /><span
|
||||
>名学完在线课程获得</span
|
||||
>
|
||||
<a-input v-model:value="four2" :bordered="false" /><span
|
||||
style="margin-right: 50px"
|
||||
>积分</span
|
||||
>
|
||||
<span>前</span
|
||||
><a-input v-model:value="four3" :bordered="false" /><span
|
||||
>名提交作业且成绩不低于</span
|
||||
>
|
||||
<a-input v-model:value="four4" :bordered="false" /><span
|
||||
>分获得</span
|
||||
>
|
||||
<a-input v-model:value="four5" :bordered="false" /><span
|
||||
>积分</span
|
||||
>
|
||||
</div>
|
||||
<div class="content">
|
||||
<span>考试成绩高于</span
|
||||
><a-input v-model:value="five1" :bordered="false" /><span
|
||||
>分获得</span
|
||||
>
|
||||
<a-input v-model:value="five2" :bordered="false" /><span
|
||||
>积分</span
|
||||
>
|
||||
</div>
|
||||
<div class="content">
|
||||
<span>考勤正常学员获得 </span
|
||||
><a-input v-model:value="six1" :bordered="false" /><span
|
||||
>积分</span
|
||||
>
|
||||
</div>
|
||||
<div class="content">
|
||||
<span>成为小组长获得</span
|
||||
><a-input v-model:value="seven1" :bordered="false" /><span
|
||||
style="margin-right: 50px"
|
||||
>积分</span
|
||||
>
|
||||
<span>优秀学员可获得</span>
|
||||
<a-input v-model:value="seven2" :bordered="false" /><span
|
||||
>积分</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
@@ -561,10 +641,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref, reactive, defineComponent, toRefs, onMounted} from "vue";
|
||||
import { ref, reactive, defineComponent, toRefs, onMounted,computed} from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
import * as api from "@/api/indexTemplate"
|
||||
import { useRouter } from "vue-router";
|
||||
import {scoreRule,setScoreRule} from "@/api/indexTaskadd"
|
||||
import { useStore } from "vuex";
|
||||
export default defineComponent({
|
||||
name: "LibraryAdd",
|
||||
@@ -688,8 +769,19 @@ export default defineComponent({
|
||||
value3: false,
|
||||
value4: false,
|
||||
hideshow: true,
|
||||
score1: 5,
|
||||
score2: 5,
|
||||
score1: null,
|
||||
done2: null,
|
||||
done3: null,
|
||||
four1: null,
|
||||
four2: null,
|
||||
four3: null,
|
||||
four4: null,
|
||||
four5: null,
|
||||
five1: null,
|
||||
five2: null,
|
||||
six1: null,
|
||||
seven1: null,
|
||||
seven2: null,
|
||||
edit: true,
|
||||
// 共享文档列表
|
||||
docList:[
|
||||
@@ -731,6 +823,23 @@ export default defineComponent({
|
||||
const changecheck2 = () => {
|
||||
state.checked2 = !state.checked2;
|
||||
};
|
||||
const scoresum = computed(() => {
|
||||
// console.log(Object.prototype.toString.call(Number(state.score1)));
|
||||
// if (Object.prototype.toString.call(state.score1) !== "[object Number]") {
|
||||
// message.destroy();
|
||||
// return message.warning("请输入合法数字");
|
||||
// }
|
||||
return (
|
||||
Number(state.score1) +
|
||||
Number(state.done3) +
|
||||
Number(state.four2) +
|
||||
Number(state.four5) +
|
||||
Number(state.five2) +
|
||||
Number(state.six1) +
|
||||
Number(state.seven1) +
|
||||
Number(state.seven2)
|
||||
);
|
||||
});
|
||||
const changecheck3 = () => {
|
||||
state.checked3 = !state.checked3;
|
||||
};
|
||||
@@ -760,7 +869,10 @@ export default defineComponent({
|
||||
];
|
||||
return typeRules[type];
|
||||
};
|
||||
onMounted(() => {getDetail()});
|
||||
onMounted(() => {
|
||||
getDetail();
|
||||
getScoreRule();
|
||||
});
|
||||
// 获取详情
|
||||
const getDetail = () => {
|
||||
api.templateDetail(store.state.projectTemplateId).then(res => {
|
||||
@@ -772,6 +884,7 @@ export default defineComponent({
|
||||
state.projectInfo.manager = res.data.data.projectTemplateInfo.manager
|
||||
state.projectInfo.notice = res.data.data.projectTemplateInfo.notice
|
||||
state.projectInfo.sourceBelongId = res.data.data.projectTemplateInfo.sourceBelongId
|
||||
state.projectInfo.managerId = res.data.data.projectTemplateInfo.managerId
|
||||
state.projectInfo.remark = res.data.data.stageList.remark
|
||||
state.projectInfo.courseSyncFlag = res.data.data.projectTemplateInfo.courseSyncFlag
|
||||
state.projectInfo.level = res.data.data.projectTemplateInfo.level
|
||||
@@ -802,11 +915,25 @@ export default defineComponent({
|
||||
// 发布公告
|
||||
const addNotice = () => {
|
||||
let obj = {
|
||||
"notice": state.projectInfo.notice,
|
||||
"projectId": store.state.projectTemplateId,
|
||||
"title": ""
|
||||
};
|
||||
api.templateEdit(obj).methods(obj).then(res => {
|
||||
"name": state.projectInfo.name,
|
||||
"category": state.projectInfo.category,
|
||||
"picUrl": "x",
|
||||
"beginTime": Number(state. projectInfo.beginTime) || 1,
|
||||
"endTime": 1,
|
||||
"manager": state.projectInfo.manager,
|
||||
"managerId": state.projectInfo.managerId || 0,
|
||||
"sourceBelongId": state.projectInfo.sourceBelongId,
|
||||
"level": state.projectInfo.level,
|
||||
"systemId": state.projectInfo.systemId,
|
||||
"boeFlag": state.projectInfo.boeFlag ? 1:0,
|
||||
"courseSyncFlag": state.projectInfo.courseSyncFlag? 1:0,
|
||||
"notice": state.projectInfo.notice,
|
||||
"noticeFlag": 0,
|
||||
"projectTemplateId": store.state.projectTemplateId,
|
||||
"remark": "",
|
||||
"status": 0,
|
||||
};
|
||||
api.templateEdit(obj).then(res => {
|
||||
message.success("公告发布成功")
|
||||
console.log(res)
|
||||
}).catch(err => {
|
||||
@@ -881,6 +1008,94 @@ export default defineComponent({
|
||||
console.log(err)
|
||||
})
|
||||
}
|
||||
const getScoreRule = () => {
|
||||
scoreRule({
|
||||
projectId: store.state.projectTemplateId,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log("获取了项目积分规则", res.data.data);
|
||||
let result = res.data.data;
|
||||
scoresum.value = result.totalScore; //Write operation failed: computed value is readonly
|
||||
state.seven1 = result.leaderScore;
|
||||
state.score1 = result.courseScore;
|
||||
state.done2 = result.homeworkItem[1].scoreLimit;
|
||||
state.done3 = result.homeworkItem[1].score;
|
||||
state.four1 = result.topCompleteCourseItem[0].numLimit;
|
||||
state.four2 = result.topCompleteCourseItem[0].score;
|
||||
state.four3 = result.homeworkItem[0].numLimit;
|
||||
state.four4 = result.homeworkItem[0].scoreLimit;
|
||||
state.four5 = result.homeworkItem[0].score;
|
||||
state.five1 = result.examItem[0].scoreLimit;
|
||||
state.five2 = result.examItem[0].score;
|
||||
state.six1 = result.signScore;
|
||||
state.seven1 = result.leaderScore;
|
||||
state.seven2 = result.topStudentScore;
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取项目积分规则失败了", err);
|
||||
});
|
||||
};
|
||||
//设置积分规则
|
||||
const editRule = () => {
|
||||
let obj = {
|
||||
courseScore: state.score1,
|
||||
examItem: [
|
||||
{
|
||||
numLimit: 0,
|
||||
score: state.five2,
|
||||
scoreLimit: state.five1,
|
||||
type: 3,
|
||||
},
|
||||
],
|
||||
|
||||
homeworkItem: [
|
||||
//有名次要求的提交作业
|
||||
{
|
||||
numLimit: state.four3,
|
||||
score: state.four5,
|
||||
scoreLimit: state.four4,
|
||||
type: 2,
|
||||
},
|
||||
//无名次要求的提交作业
|
||||
{
|
||||
numLimit: 0,
|
||||
score: state.done3,
|
||||
scoreLimit: state.done2,
|
||||
type: 2,
|
||||
},
|
||||
],
|
||||
leaderScore: state.seven1,
|
||||
projectId: store.state.projectTemplateId,
|
||||
signScore: state.six1,
|
||||
topCompleteCourseItem: [
|
||||
{
|
||||
numLimit: state.four1,
|
||||
score: state.four2,
|
||||
scoreLimit: 0,
|
||||
type: 1,
|
||||
},
|
||||
],
|
||||
topStudentScore: state.seven2,
|
||||
totalScore: scoresum.value,
|
||||
};
|
||||
console.log(obj);
|
||||
setScoreRule(obj)
|
||||
.then((res) => {
|
||||
console.log(res.data, "修改成功");
|
||||
message.destroy();
|
||||
return message.success("修改积分规则成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err.data);
|
||||
message.destroy();
|
||||
return message.warning("修改积分规则失败");
|
||||
});
|
||||
// scoreRule({
|
||||
// projectId: props.projectId,
|
||||
// });
|
||||
|
||||
state.edit = true;
|
||||
};
|
||||
return {
|
||||
...toRefs(state),
|
||||
value,
|
||||
@@ -896,14 +1111,11 @@ export default defineComponent({
|
||||
stateEdit,
|
||||
taskEdit,
|
||||
toEdit,
|
||||
getScoreRule,
|
||||
editRule,
|
||||
scoresum,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// 计算属性的 getter
|
||||
scoresum: function () {
|
||||
return Number(this.score1) + Number(this.score2);
|
||||
},
|
||||
},
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<style lang="scss">
|
||||
|
||||
@@ -1119,11 +1119,17 @@
|
||||
</a-modal>
|
||||
|
||||
<!-- 归属权抽屉 -->
|
||||
<proj-owner-ship v-model:ProjOwnervisible="ProjOwnervisible" />
|
||||
<proj-owner-ship
|
||||
v-model:ProjOwnervisible="ProjOwnervisible"
|
||||
:selectProjectId="selectProjectId"
|
||||
/>
|
||||
<!-- 授权名单抽屉 -->
|
||||
<proj-power-list v-model:ProjPvisible="ProjPvisible" />
|
||||
<!-- 查看权抽屉 -->
|
||||
<proj-check-ship v-model:ProjCheckvisible="ProjCheckvisible" />
|
||||
<proj-check-ship
|
||||
v-model:ProjCheckvisible="ProjCheckvisible"
|
||||
:selectProjectId="selectProjectId"
|
||||
/>
|
||||
<!-- 管理权抽屉 -->
|
||||
<proj-manage-ship v-model:ProjManagevisible="ProjManagevisible" />
|
||||
</div>
|
||||
@@ -1194,6 +1200,8 @@ export default {
|
||||
deleteProjectId: null, //删除的项目id
|
||||
templateProjectId: null, //存为模版的项目id
|
||||
copyProjectId: null, //复制项目id
|
||||
|
||||
selectProjectId: null, //选择的授权id
|
||||
});
|
||||
// 数据接入 - start -
|
||||
const router = useRouter();
|
||||
@@ -2172,9 +2180,6 @@ export default {
|
||||
width: 100,
|
||||
align: "center",
|
||||
customRender: (value) => {
|
||||
{
|
||||
console.log("获取项目", value);
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
{value.record.type !== 3
|
||||
@@ -2258,7 +2263,7 @@ export default {
|
||||
<div
|
||||
onClick={() => {
|
||||
console.log("点击了111");
|
||||
showProjOwner();
|
||||
showProjOwner(value.record.projectId);
|
||||
}}
|
||||
>
|
||||
归属权
|
||||
@@ -3248,8 +3253,9 @@ export default {
|
||||
state.sonproject = false;
|
||||
};
|
||||
|
||||
const showProjOwner = () => {
|
||||
const showProjOwner = (id) => {
|
||||
state.ProjOwnervisible = true;
|
||||
state.selectProjectId = id;
|
||||
};
|
||||
const showProjPrower = () => {
|
||||
state.ProjPvisible = true;
|
||||
|
||||
@@ -346,7 +346,7 @@ export default {
|
||||
storage.remove("projectAddId");
|
||||
setTimeout(() => {
|
||||
router.push({
|
||||
path: "/manage/libraryAdd",
|
||||
path: "/libraryAdd",
|
||||
});
|
||||
}, 400);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user