mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-15 22:06:45 +08:00
合并
This commit is contained in:
6
package-lock.json
generated
6
package-lock.json
generated
@@ -9578,7 +9578,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/sortablejs": {
|
"node_modules/sortablejs": {
|
||||||
"version": "1.15.0",
|
"version": "1.15.0",
|
||||||
"resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.15.0.tgz",
|
"resolved": "https://registry.npmmirror.com/sortablejs/-/sortablejs-1.15.0.tgz",
|
||||||
"integrity": "sha512-bv9qgVMjUMf89wAvM6AxVvS/4MX3sPeN0+agqShejLU5z5GX4C75ow1O2e5k4L6XItUyAK3gH6AxSbXrOM5e8w=="
|
"integrity": "sha512-bv9qgVMjUMf89wAvM6AxVvS/4MX3sPeN0+agqShejLU5z5GX4C75ow1O2e5k4L6XItUyAK3gH6AxSbXrOM5e8w=="
|
||||||
},
|
},
|
||||||
"node_modules/source-map": {
|
"node_modules/source-map": {
|
||||||
@@ -10524,7 +10524,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/vuedraggable": {
|
"node_modules/vuedraggable": {
|
||||||
"version": "4.1.0",
|
"version": "4.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/vuedraggable/-/vuedraggable-4.1.0.tgz",
|
"resolved": "https://registry.npmmirror.com/vuedraggable/-/vuedraggable-4.1.0.tgz",
|
||||||
"integrity": "sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==",
|
"integrity": "sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"sortablejs": "1.14.0"
|
"sortablejs": "1.14.0"
|
||||||
@@ -10535,7 +10535,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/vuedraggable/node_modules/sortablejs": {
|
"node_modules/vuedraggable/node_modules/sortablejs": {
|
||||||
"version": "1.14.0",
|
"version": "1.14.0",
|
||||||
"resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.14.0.tgz",
|
"resolved": "https://registry.npmmirror.com/sortablejs/-/sortablejs-1.14.0.tgz",
|
||||||
"integrity": "sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w=="
|
"integrity": "sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w=="
|
||||||
},
|
},
|
||||||
"node_modules/vuex": {
|
"node_modules/vuex": {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: lixg lixg@dongwu-inc.com
|
* @Author: lixg lixg@dongwu-inc.com
|
||||||
* @Date: 2022-11-21 14:32:52
|
* @Date: 2022-11-21 14:32:52
|
||||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||||
* @LastEditTime: 2022-11-22 20:17:22
|
* @LastEditTime: 2022-11-23 09:59:26
|
||||||
* @FilePath: /fe-manage/src/api/config.js
|
* @FilePath: /fe-manage/src/api/config.js
|
||||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
*/
|
*/
|
||||||
@@ -26,7 +26,7 @@ http.interceptors.request.use(
|
|||||||
const token = localStorage.getItem("token");
|
const token = localStorage.getItem("token");
|
||||||
if (token) {
|
if (token) {
|
||||||
// config.headers.token = token;
|
// config.headers.token = token;
|
||||||
config.headers.token = 123456; //测试1111
|
config.headers.token = token; //测试1111
|
||||||
} else {
|
} else {
|
||||||
console.log("当前请求页面无token,请执行操作!!!");
|
console.log("当前请求页面无token,请执行操作!!!");
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,7 @@
|
|||||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
*/
|
*/
|
||||||
import http from "./config";
|
import http from "./config";
|
||||||
import qs from 'qs';
|
import qs from "qs";
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 接口传参数方式(get)
|
* 接口传参数方式(get)
|
||||||
@@ -33,7 +32,7 @@ import qs from 'qs';
|
|||||||
* (request的Header:'Content-Type'= 'application/x-www-form-urlencoded')
|
* (request的Header:'Content-Type'= 'application/x-www-form-urlencoded')
|
||||||
* let data = {"code":"1234","name":"yyyy"};
|
* let data = {"code":"1234","name":"yyyy"};
|
||||||
* axios.post(`${this.$url}/test/testRequest`,qs.stringify({data})).then()
|
* axios.post(`${this.$url}/test/testRequest`,qs.stringify({data})).then()
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* 3.'Content-Type'= 'application/json,传参格式为 raw (JSON格式)。
|
* 3.'Content-Type'= 'application/json,传参格式为 raw (JSON格式)。
|
||||||
* (全局请求头:'Content-Type'= 'application/x-www-form-urlencoded')
|
* (全局请求头:'Content-Type'= 'application/x-www-form-urlencoded')
|
||||||
@@ -44,59 +43,65 @@ import qs from 'qs';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
//上传文件
|
//上传文件
|
||||||
export const uploadFile = (obj) => http.post('/test/testRequest', qs.stringify({ obj }));
|
export const uploadFile = (obj) =>
|
||||||
|
http.post("/test/testRequest", qs.stringify({ obj }));
|
||||||
|
|
||||||
// 接口-请求
|
// 接口-请求
|
||||||
|
|
||||||
//创建学习路径
|
//创建学习路径
|
||||||
export const createLearnPath = (obj) => http.post('/admin/router/edit', obj);
|
export const createLearnPath = (obj) => http.post("/admin/router/edit", obj);
|
||||||
// 获取学习路径图列表
|
// 获取学习路径图列表
|
||||||
export const getLearnPath = (obj) => http.post('/admin/router/list', obj);
|
export const getLearnPath = (obj) => http.post("/admin/router/list", obj);
|
||||||
//学习路径图的发布、停用、删除
|
//学习路径图的发布、停用、删除
|
||||||
export const handleLearnPath = (obj) => http.post('/admin/router/handle', obj);
|
export const handleLearnPath = (obj) => http.post("/admin/router/handle", obj);
|
||||||
//获取路径图统计数据
|
//获取路径图统计数据
|
||||||
export const getLearnCount = (routerId) => http.get('/admin/router/getCount', { params: { routerId: routerId } })
|
export const getLearnCount = (routerId) =>
|
||||||
|
http.get("/admin/router/getCount", { params: { routerId: routerId } });
|
||||||
|
|
||||||
//新建或编辑关卡
|
//新建或编辑关卡
|
||||||
export const editChapter = (obj) => http.post('/admin/router/editChapter', obj);
|
export const editChapter = (obj) => http.post("/admin/router/editChapter", obj);
|
||||||
// 编辑路径图设置
|
// 编辑路径图设置
|
||||||
export const setConfig = (obj) => http.post('/admin/router/setConfig', obj);
|
export const setConfig = (obj) => http.post("/admin/router/setConfig", obj);
|
||||||
//获取学员列表
|
//获取学员列表
|
||||||
export const getStudent = (obj) => http.post('/admin/router/studentList', obj);
|
export const getStudent = (obj) => http.post("/admin/router/studentList", obj);
|
||||||
//获取路径图详情-包含关卡及任务列表
|
//获取路径图详情-包含关卡及任务列表
|
||||||
export const getRouterDetail = (routerId) => http.get('/admin/router/detail', {
|
export const getRouterDetail = (routerId) =>
|
||||||
params: {
|
http.get("/admin/router/detail", {
|
||||||
routerId: routerId,
|
params: {
|
||||||
}
|
routerId: routerId,
|
||||||
});
|
},
|
||||||
|
});
|
||||||
//添加学员
|
//添加学员
|
||||||
export const addStudent = (obj) => http.post('/admin/router/addStudent', obj);
|
export const addStudent = (obj) => http.post("/admin/router/addStudent", obj);
|
||||||
//删除学员
|
//删除学员
|
||||||
export const delStudent = (obj) => http.post('/admin/router/deleteStudent', obj);
|
export const delStudent = (obj) =>
|
||||||
|
http.post("/admin/router/deleteStudent", obj);
|
||||||
// 获取学员路径图进度明细
|
// 获取学员路径图进度明细
|
||||||
export const stuProgress = (obj) => http.post('/admin/router/studentProcess', obj);
|
export const stuProgress = (obj) =>
|
||||||
|
http.post("/admin/router/studentProcess", obj);
|
||||||
|
|
||||||
//项目基础信息-----------------------------------
|
//项目基础信息-----------------------------------
|
||||||
//项目积分榜单
|
//项目积分榜单
|
||||||
export const scoreRank = (obj) => http.post('/admin/project/scoreRank', obj);
|
export const scoreRank = (obj) => http.post("/admin/project/scoreRank", obj);
|
||||||
//排行榜
|
//排行榜
|
||||||
export const billboard = (obj) => http.post('/admin/project/billboard', obj);
|
export const billboard = (obj) => http.post("/admin/project/billboard", obj);
|
||||||
//项目基础信息-----------------------------------
|
//项目基础信息-----------------------------------
|
||||||
|
|
||||||
//获取字典信息
|
//获取字典信息
|
||||||
export const getDict = (obj) => http.post('/dict/getList', obj)
|
export const getDict = (obj) => http.post("/dict/getList", obj);
|
||||||
//获取组织树
|
//获取组织树
|
||||||
export const getOrgTree = (obj) => http.post('/admin/router/orgList', obj)
|
export const getOrgTree = (obj) => http.post("/admin/router/orgList", obj);
|
||||||
|
|
||||||
|
|
||||||
// 获取组织结构树
|
// 获取组织结构树
|
||||||
export const orgtree = () => http.get('/org/tree');
|
export const orgtree = () => http.get("/org/tree");
|
||||||
|
|
||||||
|
|
||||||
//获取积分列表
|
//获取积分列表
|
||||||
export const noticeList = (projectId) => http.post(`http://localhost:8080/api/admin/project/noticeList?projectId=` + projectId + ``)
|
export const noticeList = (projectId) =>
|
||||||
|
http.post(
|
||||||
|
`http://localhost:8080/api/admin/project/noticeList?projectId=` +
|
||||||
|
projectId +
|
||||||
|
``
|
||||||
|
);
|
||||||
|
|
||||||
// 测试方法
|
// 测试方法
|
||||||
// import * as api from '../../api/index'
|
// import * as api from '../../api/index'
|
||||||
@@ -106,5 +111,4 @@ export const noticeList = (projectId) => http.post(`http://localhost:8080/api/ad
|
|||||||
// console.log(err)
|
// console.log(err)
|
||||||
// })
|
// })
|
||||||
|
|
||||||
|
// export const choiceEvaluation = (obj) => http.post('/evaluation/choiceEvaluation', obj);
|
||||||
// export const choiceEvaluation = (obj) => http.post('/evaluation/choiceEvaluation', obj);
|
|
||||||
|
|||||||
@@ -10,4 +10,10 @@ export const projlist = (obj) => http.post('/admin/project/list', obj)
|
|||||||
export const listView = (obj) => http.post('/admin/project/listView', obj)
|
export const listView = (obj) => http.post('/admin/project/listView', obj)
|
||||||
|
|
||||||
//获取面授课已审核列表
|
//获取面授课已审核列表
|
||||||
export const courseListView = (obj) => http.post('/admin/offcourse/listReview', obj)
|
export const courseListView = (obj) => http.post('/admin/offcourse/listReview', obj)
|
||||||
|
|
||||||
|
//项目审核日志
|
||||||
|
export const auditList = (obj) => http.post('/admin/project/auditList', obj)
|
||||||
|
|
||||||
|
//项目审核
|
||||||
|
export const auditView = (obj) => http.post('/admin/project/auditView', obj)
|
||||||
@@ -3,19 +3,52 @@ import http from "./config";
|
|||||||
/**
|
/**
|
||||||
* 1
|
* 1
|
||||||
*/
|
*/
|
||||||
|
//添加课程学员
|
||||||
|
export const addStudent = (obj) =>
|
||||||
|
http.post("/admin/offcourse/addStudent", obj);
|
||||||
//删除开课
|
//删除开课
|
||||||
export const deletePlan = (obj) =>
|
export const deletePlan = (obj) =>
|
||||||
http.delete("/admin/offcourse/deletePlan", obj);
|
http.delete(
|
||||||
|
"/admin/offcourse/deletePlan",
|
||||||
|
{ params: obj },
|
||||||
|
{
|
||||||
|
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
||||||
|
}
|
||||||
|
);
|
||||||
|
//获取面授课详情
|
||||||
|
export const detail = (obj) =>
|
||||||
|
http.post("/admin/offcourse/detail", obj, {
|
||||||
|
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
||||||
|
});
|
||||||
|
//获取面授课开课详情
|
||||||
|
export const detailPlan = (obj) =>
|
||||||
|
http.post("/admin/offcourse/detailPlan", obj, {
|
||||||
|
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
||||||
|
});
|
||||||
//新建或编辑面授课
|
//新建或编辑面授课
|
||||||
export const edit = (obj) => http.post("/admin/offcourse/edit", obj);
|
export const edit = (obj) => http.post("/admin/offcourse/edit", obj);
|
||||||
//新建或编辑面授课开课
|
//新建或编辑面授课开课
|
||||||
export const editPlan = (obj) => http.post("/admin/offcourse/editPlan", obj);
|
export const editPlan = (obj) => http.post("/admin/offcourse/editPlan", obj);
|
||||||
//操作面授课(发布,撤回,删除)
|
//课程导出
|
||||||
|
export const exportP = (obj) => http.post("/admin/offcourse/export", obj);
|
||||||
|
//操作面授课(发布,撤回,删除,审核,停用)
|
||||||
export const handle = (obj) => http.post("/admin/offcourse/handle", obj);
|
export const handle = (obj) => http.post("/admin/offcourse/handle", obj);
|
||||||
|
//学员操作-支持批量
|
||||||
|
export const handleStudent = (obj) =>
|
||||||
|
http.post("/admin/offcourse/handleStudent", obj);
|
||||||
//获取面授课列表
|
//获取面授课列表
|
||||||
export const list = (obj) => http.post("/admin/offcourse/list", obj);
|
export const list = (obj) => http.post("/admin/offcourse/list", obj);
|
||||||
|
//获取面授课已审核列表
|
||||||
|
export const listReview = (obj) =>
|
||||||
|
http.post("/admin/offcourse/listReview", obj);
|
||||||
//面授课开课列表
|
//面授课开课列表
|
||||||
export const planList = (obj) => http.post("/admin/offcourse/planList", obj);
|
export const planList = (obj) => http.post("/admin/offcourse/planList", obj);
|
||||||
|
//学员导出
|
||||||
|
export const studentExport = (obj) =>
|
||||||
|
http.post("/admin/offcourse/studentExport", obj);
|
||||||
//获取学员列表
|
//获取学员列表
|
||||||
export const studentList = (obj) =>
|
export const studentList = (obj) =>
|
||||||
http.post("/admin/offcourse/studentList", obj);
|
http.post("/admin/offcourse/studentList", obj);
|
||||||
|
//学习记录列表
|
||||||
|
export const studyRecordList = (obj) =>
|
||||||
|
http.post("/admin/offcourse/studyRecordList", obj);
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
import http from "./config";
|
import http from "./config";
|
||||||
|
|
||||||
//获取面授课开课详情
|
//获取面授课开课详情
|
||||||
export const queryFaceDetailById = (offcoursePlanId) => http.post(`http://localhost:8080/api/admin/offcourse/detailPlan?offcoursePlanId=` + offcoursePlanId + ``)
|
export const queryFaceDetailById = (offcoursePlanId) => http.post(`http://localhost:8080/manageApi/admin/offcourse/detailPlan?offcoursePlanId=` + offcoursePlanId + ``)
|
||||||
|
|
||||||
|
//新建或编辑面授课开课
|
||||||
|
export const editPlan = (obj) => http.post('/admin/offcourse/editPlan', obj)
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
import http from "./config";
|
import http from "./config";
|
||||||
|
|
||||||
// 获取路径图概览
|
// 获取路径图概览
|
||||||
export const getRouterOverview = (routerId) => http.get(`/admin/router/overview?routerId=${routerId}`)
|
export const getRouterOverview = (routerId) => http.get(`/admin/router/overview?routerId=${routerId}`)
|
||||||
|
|
||||||
|
//新建或编辑路径图
|
||||||
|
export const editRoutered = (obj) => http.post('/admin/router/edit', obj)
|
||||||
@@ -6,7 +6,7 @@ import http from "./config";
|
|||||||
// projectId: projectId,
|
// projectId: projectId,
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
export const noticeList = (projectId) => http.post(`http://localhost:8080/manageApi/admin/project/noticeList?projectId=` + projectId + ``)
|
export const noticeList = (obj) => http.post('/admin/project/noticeList', obj)
|
||||||
|
|
||||||
//发布项目公告
|
//发布项目公告
|
||||||
export const publishNotice = (obj) => http.post('/admin/project/publishNotice', obj)
|
export const publishNotice = (obj) => http.post('/admin/project/publishNotice', obj)
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
<!-- 评估列表 -->
|
||||||
<template>
|
<template>
|
||||||
<a-drawer
|
<a-drawer
|
||||||
:visible="assessmentVisible"
|
:visible="assessmentVisible"
|
||||||
@@ -46,7 +47,7 @@
|
|||||||
expandRowByClick="true"
|
expandRowByClick="true"
|
||||||
@expand="expandTable"
|
@expand="expandTable"
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
:row-selection=" rowSelection "
|
:row-selection="rowSelection"
|
||||||
filterMultiple:false
|
filterMultiple:false
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@@ -65,7 +66,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
</template>
|
</template>
|
||||||
@@ -78,32 +78,34 @@ export default {
|
|||||||
// components: {
|
// components: {
|
||||||
// },
|
// },
|
||||||
props: {
|
props: {
|
||||||
assessmentVisible: {
|
assessmentVisible: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
isface: {
|
||||||
|
type: Number,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
setup(props, ctx) {
|
setup(props, ctx) {
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
assessmentVisible:false,
|
assessmentVisible: false,
|
||||||
assessment:null,
|
assessment: null,
|
||||||
inputV1:"",
|
inputV1: "",
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
tableDataTotal: 0,
|
tableDataTotal: 0,
|
||||||
tableData: [],
|
tableData: [],
|
||||||
selectedRowKeys:[],
|
selectedRowKeys: [],
|
||||||
});
|
});
|
||||||
const closeDrawer = () => {
|
const closeDrawer = () => {
|
||||||
ctx.emit("update:assessmentVisible", false);
|
ctx.emit("update:assessmentVisible", false);
|
||||||
};
|
};
|
||||||
const afterVisibleChange = (bool) => {
|
const afterVisibleChange = (bool) => {
|
||||||
console.log("state getAllInvistText", bool);
|
console.log("state getAllInvistText", bool);
|
||||||
if(props.assessmentVisible){
|
if (props.assessmentVisible) {
|
||||||
getAllInvistText();
|
getAllInvistText();
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
const tableDataFunc = () => {
|
const tableDataFunc = () => {
|
||||||
const columns = [
|
const columns = [
|
||||||
@@ -142,11 +144,16 @@ export default {
|
|||||||
};
|
};
|
||||||
const rowSelection = {
|
const rowSelection = {
|
||||||
type: "radio",
|
type: "radio",
|
||||||
onSelect:(selectedRows)=>{
|
onSelect: (selectedRows) => {
|
||||||
state.assessment = selectedRows;
|
state.assessment = selectedRows;
|
||||||
console.log("selectedRows=======",state.assessment);
|
console.log("selectedRows=======", state.assessment);
|
||||||
ctx.emit("checkedAss", state.assessment);
|
if (props.isface == 1) {
|
||||||
state.selectedRowKeys = []
|
ctx.emit("faceAssess", state.assessment);
|
||||||
|
} else {
|
||||||
|
ctx.emit("checkedAss", state.assessment);
|
||||||
|
}
|
||||||
|
|
||||||
|
state.selectedRowKeys = [];
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -166,7 +173,7 @@ export default {
|
|||||||
data.map((value, index) => {
|
data.map((value, index) => {
|
||||||
let obj = {
|
let obj = {
|
||||||
key: index,
|
key: index,
|
||||||
assessmentId:value.assessmentId,
|
assessmentId: value.assessmentId,
|
||||||
num: value.essayQuestionVoList.length,
|
num: value.essayQuestionVoList.length,
|
||||||
name: value.assessmentName ? value.assessmentName : "-",
|
name: value.assessmentName ? value.assessmentName : "-",
|
||||||
creator: value.createUser ? value.createUser : "-",
|
creator: value.createUser ? value.createUser : "-",
|
||||||
@@ -174,17 +181,16 @@ export default {
|
|||||||
};
|
};
|
||||||
array.push(obj);
|
array.push(obj);
|
||||||
});
|
});
|
||||||
state.selectedRowKeys = [],
|
(state.selectedRowKeys = []), (state.tableData = array);
|
||||||
state.tableData = array;
|
|
||||||
};
|
};
|
||||||
//获取全部评估信息接口
|
//获取全部评估信息接口
|
||||||
const getAllInvistText = () => {
|
const getAllInvistText = () => {
|
||||||
api
|
api
|
||||||
.queryAssessmentDetailList({
|
.queryAssessmentDetailList({
|
||||||
assessmentName:state.inputV1,
|
assessmentName: state.inputV1,
|
||||||
pageNo: state.currentPage,
|
pageNo: state.currentPage,
|
||||||
pageSize: state.pageSize,
|
pageSize: state.pageSize,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
let arr = res.data.data.rows;
|
let arr = res.data.data.rows;
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
@@ -199,7 +205,6 @@ export default {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//重置评估信息
|
//重置评估信息
|
||||||
const resetInvist = () => {
|
const resetInvist = () => {
|
||||||
state.inputV1 = "";
|
state.inputV1 = "";
|
||||||
@@ -243,7 +248,7 @@ export default {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
.main_left {
|
.main_left {
|
||||||
padding-right: 30px;
|
padding-right: 30px;
|
||||||
margin-top:32px;
|
margin-top: 32px;
|
||||||
.main_item {
|
.main_item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -48,7 +48,24 @@
|
|||||||
<span style="margin-right: 3px">选择课程:</span>
|
<span style="margin-right: 3px">选择课程:</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="btnbox" @click="showDrawerSelFacet">
|
<div class="btnbox" @click="showDrawerSelFacet">
|
||||||
<button class="xkbtn">授课课程</button>
|
<button class="xkbtn">
|
||||||
|
{{ chooseCourse == null ? "授课" : "修改" }}课程
|
||||||
|
</button>
|
||||||
|
<a-tag
|
||||||
|
style="
|
||||||
|
width: 104px;
|
||||||
|
height: 32px;
|
||||||
|
border-radius: 4px;
|
||||||
|
color: #388be1;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
"
|
||||||
|
color="#ECF3FC"
|
||||||
|
v-if="chooseCourse !== null"
|
||||||
|
closable
|
||||||
|
@close="closeTag"
|
||||||
|
>{{ chooseCourseName }}</a-tag
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<!-- 选择面授侧弹窗 -->
|
<!-- 选择面授侧弹窗 -->
|
||||||
<div>
|
<div>
|
||||||
@@ -259,7 +276,22 @@
|
|||||||
<a-checkbox v-model:checked="checkedAssessment"
|
<a-checkbox v-model:checked="checkedAssessment"
|
||||||
>需要评估</a-checkbox
|
>需要评估</a-checkbox
|
||||||
>
|
>
|
||||||
<button class="xkbtn">选择评估</button>
|
<button class="xkbtn" @click="showAssessment">选择评估</button>
|
||||||
|
<a-tag
|
||||||
|
style="
|
||||||
|
width: 104px;
|
||||||
|
height: 32px;
|
||||||
|
border-radius: 4px;
|
||||||
|
color: #388be1;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
"
|
||||||
|
color="#ECF3FC"
|
||||||
|
v-if="chooseMent !== null"
|
||||||
|
closable
|
||||||
|
@close="closeTag"
|
||||||
|
>{{ chooseMentName }}</a-tag
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -271,12 +303,35 @@
|
|||||||
<div class="btnbox" @click="showDrawerAddHomework">
|
<div class="btnbox" @click="showDrawerAddHomework">
|
||||||
<button class="xkbtn">配置</button>
|
<button class="xkbtn">配置</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 添加作业侧弹窗 -->
|
<!-- 添加作业侧弹窗 -->
|
||||||
<div>
|
<div>
|
||||||
<add-homework v-model:addhomeworkVisible="addhomeworkvisible" />
|
<add-homework
|
||||||
|
v-model:addhomeworkVisible="addhomeworkvisible"
|
||||||
|
@getWork="getWork"
|
||||||
|
v-model:face="face"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<!-- 添加作业侧弹窗 -->
|
<!-- 添加作业侧弹窗 -->
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<a-tag
|
||||||
|
style="
|
||||||
|
width: 104px;
|
||||||
|
height: 32px;
|
||||||
|
border-radius: 4px;
|
||||||
|
color: #388be1;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-left: 120px;
|
||||||
|
"
|
||||||
|
color="#ECF3FC"
|
||||||
|
v-if="chooseWork !== null"
|
||||||
|
closable
|
||||||
|
@close="closeTagWork"
|
||||||
|
>{{ chooseWorkName }}</a-tag
|
||||||
|
>
|
||||||
|
</div>
|
||||||
<div class="main_item">
|
<div class="main_item">
|
||||||
<div class="signbox">
|
<div class="signbox">
|
||||||
<span style="margin-right: 3px">配置考试:</span>
|
<span style="margin-right: 3px">配置考试:</span>
|
||||||
@@ -295,7 +350,13 @@
|
|||||||
<span style="margin-right: 3px">附件:</span>
|
<span style="margin-right: 3px">附件:</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<button class="xkbtn">上传附件</button>
|
<a-upload
|
||||||
|
@change="handleChange"
|
||||||
|
action="/manageApi/file/upload"
|
||||||
|
v-model:file-list="fileList"
|
||||||
|
>
|
||||||
|
<button class="xkbtn">上传附件</button></a-upload
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -304,6 +365,11 @@
|
|||||||
<button class="btn1">取消</button>
|
<button class="btn1">取消</button>
|
||||||
<button class="btn2" @click="updateFaceTeach">确定</button>
|
<button class="btn2" @click="updateFaceTeach">确定</button>
|
||||||
</div>
|
</div>
|
||||||
|
<assessment-list
|
||||||
|
v-model:assessmentVisible="assessmentVisible"
|
||||||
|
v-model:isface="isface"
|
||||||
|
@faceAssess="faceAssess"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
</template>
|
</template>
|
||||||
@@ -315,21 +381,24 @@ import AddTest from "../../components/drawers/AddTest.vue";
|
|||||||
import { ProjectEditTask, RouterEditTask } from "@/api/indexTask";
|
import { ProjectEditTask, RouterEditTask } from "@/api/indexTask";
|
||||||
// import * as method from "../../api/method"
|
// import * as method from "../../api/method"
|
||||||
import { message } from "ant-design-vue";
|
import { message } from "ant-design-vue";
|
||||||
import { queryFaceDetailById } from "../../api/indexFace";
|
import { queryFaceDetailById, editPlan } from "../../api/indexFace";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
|
import AssessmentList from "../drawers/ AssessmentList.vue";
|
||||||
|
// import { toDate } from "../../api/method";
|
||||||
export default {
|
export default {
|
||||||
name: "AddFaceteach",
|
name: "AddFaceteach",
|
||||||
components: {
|
components: {
|
||||||
SelFacet,
|
SelFacet,
|
||||||
AddHomework,
|
AddHomework,
|
||||||
AddTest,
|
AddTest,
|
||||||
|
AssessmentList,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
addfaceteachVisible: {
|
addfaceteachVisible: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
EditEvalId: {
|
EditFaceId: {
|
||||||
// 要编辑的workId
|
// 要编辑的workId
|
||||||
type: Number,
|
type: Number,
|
||||||
default: null,
|
default: null,
|
||||||
@@ -390,13 +459,42 @@ export default {
|
|||||||
checkedHolidy: false,
|
checkedHolidy: false,
|
||||||
checkedAssessment: false,
|
checkedAssessment: false,
|
||||||
chooseTime: [],
|
chooseTime: [],
|
||||||
|
fileList: [],
|
||||||
|
chooseCourse: null, //选择的在线课程
|
||||||
|
chooseCourseName: null, //选择的课程的名字
|
||||||
|
face: true, //面授传给配置作业的标识
|
||||||
|
chooseWork: null, //配置的work
|
||||||
|
chooseWorkName: null, //配置的work名字
|
||||||
|
chooseMent: null,
|
||||||
|
chooseMentName: null,
|
||||||
|
assessmentVisible: false,
|
||||||
|
isface: 1,
|
||||||
});
|
});
|
||||||
|
const clear = () => {
|
||||||
|
state.inputV1 = null;
|
||||||
|
state.inputV2 = null;
|
||||||
|
state.inputV3 = null;
|
||||||
|
state.inputV4 = null;
|
||||||
|
state.inputV5 = null;
|
||||||
|
state.inputV6 = null;
|
||||||
|
state.inputV7 = null;
|
||||||
|
state.chooseTime = [];
|
||||||
|
state.textV1 = null;
|
||||||
|
state.radioV1 = "";
|
||||||
|
state.radioV2 = "";
|
||||||
|
state.checkedHolidy = false;
|
||||||
|
state.checkedAssessment = false;
|
||||||
|
state.chooseMent = null;
|
||||||
|
state.chooseWork = null;
|
||||||
|
state.chooseCourse = null;
|
||||||
|
};
|
||||||
const closeDrawer = () => {
|
const closeDrawer = () => {
|
||||||
ctx.emit("update:addfaceteachVisible", false);
|
ctx.emit("update:addfaceteachVisible", false);
|
||||||
state.radioV1 = "";
|
state.radioV1 = "";
|
||||||
state.radioV2 = "";
|
state.radioV2 = "";
|
||||||
localStorage.setItem("stageId", props.chooseStageId);
|
localStorage.setItem("stageId", props.chooseStageId);
|
||||||
localStorage.setItem("chapterId", props.isactive);
|
localStorage.setItem("chapterId", props.isactive);
|
||||||
|
clear();
|
||||||
};
|
};
|
||||||
const afterVisibleChange = (bool) => {
|
const afterVisibleChange = (bool) => {
|
||||||
if (bool && props.edit) {
|
if (bool && props.edit) {
|
||||||
@@ -427,7 +525,7 @@ export default {
|
|||||||
//查询面授
|
//查询面授
|
||||||
const queryFaceTeach = () => {
|
const queryFaceTeach = () => {
|
||||||
//暂时写一个假的offcoursePlanId
|
//暂时写一个假的offcoursePlanId
|
||||||
queryFaceDetailById(2).then((res) => {
|
queryFaceDetailById(props.EditFaceId).then((res) => {
|
||||||
// state.inputV1 = res.data.data.name;
|
// state.inputV1 = res.data.data.name;
|
||||||
// state.inputV2 = res.data.data.teacherId;
|
// state.inputV2 = res.data.data.teacherId;
|
||||||
console.log("获取到了面授课开课详情", res.data.data);
|
console.log("获取到了面授课开课详情", res.data.data);
|
||||||
@@ -447,6 +545,7 @@ export default {
|
|||||||
state.inputV5 = result.beforeStart;
|
state.inputV5 = result.beforeStart;
|
||||||
state.inputV6 = result.afterStart;
|
state.inputV6 = result.afterStart;
|
||||||
state.inputV7 = result.beforeEnd;
|
state.inputV7 = result.beforeEnd;
|
||||||
|
state.fileList = JSON.parse(result.attach);
|
||||||
// state.radioV1 = result.
|
// state.radioV1 = result.
|
||||||
state.checkedHolidy =
|
state.checkedHolidy =
|
||||||
result.completeType == 1
|
result.completeType == 1
|
||||||
@@ -473,10 +572,79 @@ export default {
|
|||||||
};
|
};
|
||||||
|
|
||||||
//新建或编辑面授
|
//新建或编辑面授
|
||||||
const updateFaceTeach = () => {};
|
// 新增任务
|
||||||
const upDateTable = () => {};
|
const updateFaceTeach = () => {
|
||||||
|
if (
|
||||||
|
state.inputV1 == "" ||
|
||||||
|
state.chooseCourse == null ||
|
||||||
|
state.inputV2 == "" ||
|
||||||
|
state.chooseTime == [] ||
|
||||||
|
state.inputV3 == "" ||
|
||||||
|
state.inputV4 == ""
|
||||||
|
) {
|
||||||
|
message.destroy();
|
||||||
|
return message.warning("请输入必填字段");
|
||||||
|
} else {
|
||||||
|
let obj = {
|
||||||
|
address: state.inputV4,
|
||||||
|
afterStart: state.inputV6,
|
||||||
|
applyFlag: 1,
|
||||||
|
attach: JSON.stringify(state.fileList),
|
||||||
|
beforeEnd: state.inputV7,
|
||||||
|
beforeStart: state.inputV5,
|
||||||
|
// beginTime: dayjs(state.chooseTime[0]).format("YYYY-MM-DD"),
|
||||||
|
beginTime: parseInt(
|
||||||
|
new Date(state.chooseTime[0].$d).getTime() / 1000
|
||||||
|
),
|
||||||
|
completeType: state.radioV1 == "1" ? 2 : 1,
|
||||||
|
description: state.textV1,
|
||||||
|
// endTime: dayjs(state.chooseTime[1]).format("YYYY-MM-DD"),
|
||||||
|
endTime: parseInt(new Date(state.chooseTime[0].$d).getTime() / 1000),
|
||||||
|
evalFlag: state.checkedAssessment == true ? 1 : 0,
|
||||||
|
evaluateId:
|
||||||
|
state.chooseMent == null ? 0 : state.chooseMent.assessmentId,
|
||||||
|
homeWorkId: 0,
|
||||||
|
name: state.inputV1,
|
||||||
|
noProjectMember: state.radioV2 == "1" ? 0 : 1,
|
||||||
|
offcourseId: 0,
|
||||||
|
offcoursePlanId: props.edit ? props.EditFaceId : 0,
|
||||||
|
projectMember: state.radioV2 == "1" ? 1 : 0,
|
||||||
|
signFlag: 0,
|
||||||
|
signWordFlag: 0,
|
||||||
|
teacherId: 0,
|
||||||
|
testId: 0,
|
||||||
|
};
|
||||||
|
|
||||||
|
if (props.edit) {
|
||||||
|
editPlan(obj)
|
||||||
|
.then((res) => {
|
||||||
|
updateTask(res);
|
||||||
|
closeDrawer();
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
message.error(`添加失败${err}`);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
editPlan(obj)
|
||||||
|
.then((res) => {
|
||||||
|
updateTask(res);
|
||||||
|
closeDrawer();
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
message.error(`添加失败${err}`);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const upDateTable = (value) => {
|
||||||
|
console.log("gg", value);
|
||||||
|
console.log("gg", value[0].name);
|
||||||
|
state.chooseCourse = value[0];
|
||||||
|
state.chooseCourseName = value[0].name;
|
||||||
|
};
|
||||||
|
|
||||||
//更新任务列表
|
//更新任务列表
|
||||||
|
// 新增编辑或新增项目任务
|
||||||
const updateTask = (res) => {
|
const updateTask = (res) => {
|
||||||
if (props.isLevel == 1) {
|
if (props.isLevel == 1) {
|
||||||
let editObj1 = {
|
let editObj1 = {
|
||||||
@@ -511,17 +679,44 @@ export default {
|
|||||||
ProjectEditTask(editObj)
|
ProjectEditTask(editObj)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
message.success(
|
message.success(
|
||||||
`${props.EditTestId ? "编辑" : "新增"}阶段任务成功`
|
`${props.EditFaceId ? "编辑" : "新增"}阶段任务成功`
|
||||||
);
|
);
|
||||||
ctx.emit("changeData", false);
|
ctx.emit("changeData", false);
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
message.error(`${props.EditTestId ? "编辑" : "新增"}阶段任务失败`);
|
message.error(`${props.EditFaceId ? "编辑" : "新增"}阶段任务失败`);
|
||||||
});
|
});
|
||||||
} else if (props.isLevel == 3) {
|
} else if (props.isLevel == 3) {
|
||||||
console.log("");
|
console.log("");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
const closeTag = () => {
|
||||||
|
state.chooseCourse = null;
|
||||||
|
state.chooseCourseName = null;
|
||||||
|
};
|
||||||
|
const closeTagWork = () => {
|
||||||
|
state.chooseWork = null;
|
||||||
|
state.chooseWorkName = null;
|
||||||
|
};
|
||||||
|
const getWork = (value) => {
|
||||||
|
console.log("getWork", value);
|
||||||
|
state.chooseWork = value;
|
||||||
|
state.chooseWorkName = value.workName;
|
||||||
|
console.log("getWorkName", value.workName);
|
||||||
|
};
|
||||||
|
const handleChange = ({ file, fileList }) => {
|
||||||
|
if (file.status !== "uploading") {
|
||||||
|
console.log(file, fileList);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const showAssessment = () => {
|
||||||
|
state.assessmentVisible = true;
|
||||||
|
};
|
||||||
|
const faceAssess = (value) => {
|
||||||
|
console.log(value);
|
||||||
|
state.chooseMent = value;
|
||||||
|
state.chooseMentName = value.name;
|
||||||
|
};
|
||||||
return {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
showDrawerSelFacet,
|
showDrawerSelFacet,
|
||||||
@@ -534,6 +729,13 @@ export default {
|
|||||||
updateFaceTeach,
|
updateFaceTeach,
|
||||||
updateTask,
|
updateTask,
|
||||||
upDateTable,
|
upDateTable,
|
||||||
|
closeTag,
|
||||||
|
getWork,
|
||||||
|
closeTagWork,
|
||||||
|
clear,
|
||||||
|
handleChange,
|
||||||
|
showAssessment,
|
||||||
|
faceAssess,
|
||||||
// change,
|
// change,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -77,7 +77,7 @@
|
|||||||
<a-upload
|
<a-upload
|
||||||
v-model:file-list="fileList"
|
v-model:file-list="fileList"
|
||||||
name="file"
|
name="file"
|
||||||
action="/api/file/upload"
|
action="/manageApi/file/upload"
|
||||||
@change="handleChange"
|
@change="handleChange"
|
||||||
>
|
>
|
||||||
<button class="xkbtn" type="button">上传附件</button>
|
<button class="xkbtn" type="button">上传附件</button>
|
||||||
@@ -96,7 +96,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="main_btns">
|
<div class="main_btns">
|
||||||
<a-button class="btn1" @click="closeDrawer">取消</a-button>
|
<a-button class="btn1" @click="closeDrawer">取消</a-button>
|
||||||
<a-button class="btn2" html-type="submit">确定</a-button>
|
<a-button class="btn2" html-type="submit" @click="cle">确定</a-button>
|
||||||
</div>
|
</div>
|
||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
@@ -164,6 +164,10 @@ export default {
|
|||||||
type: Number,
|
type: Number,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
|
face: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
setup(props, ctx) {
|
setup(props, ctx) {
|
||||||
const formState = reactive({
|
const formState = reactive({
|
||||||
@@ -362,6 +366,13 @@ export default {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const cle = () => {
|
||||||
|
console.log("xx", formState);
|
||||||
|
if (props.face) {
|
||||||
|
ctx.emit("getWork", formState);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
afterVisibleChange,
|
afterVisibleChange,
|
||||||
closeDrawer,
|
closeDrawer,
|
||||||
@@ -375,6 +386,7 @@ export default {
|
|||||||
formRef,
|
formRef,
|
||||||
// layout,
|
// layout,
|
||||||
rules,
|
rules,
|
||||||
|
cle,
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -62,12 +62,17 @@ export default {
|
|||||||
state.notice = array;
|
state.notice = array;
|
||||||
};
|
};
|
||||||
const getNotice = () => {
|
const getNotice = () => {
|
||||||
noticeList(props.projectId)
|
let obj = {
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
projectId: props.projectId,
|
||||||
|
};
|
||||||
|
noticeList(obj)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log("获取公告列表成功");
|
console.log("获取公告列表成功");
|
||||||
let result = res.data.data;
|
let result = res.data.data;
|
||||||
if (result.length > 0) {
|
if (result.total > 0) {
|
||||||
setNoticeData(result);
|
setNoticeData(result.rows);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
|||||||
@@ -56,10 +56,10 @@ export default {
|
|||||||
return message.warning("请输入公告内容");
|
return message.warning("请输入公告内容");
|
||||||
} else {
|
} else {
|
||||||
let obj = {
|
let obj = {
|
||||||
createId: state.projectInfo.createId,
|
// createId: state.projectInfo.createId,
|
||||||
createName: state.projectInfo.createName,
|
// createName: state.projectInfo.createName,
|
||||||
notice: state.noticeContent,
|
notice: state.noticeContent,
|
||||||
noticeId: 0,
|
// noticeId: 0,
|
||||||
projectId: props.projectId,
|
projectId: props.projectId,
|
||||||
title: "",
|
title: "",
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -118,6 +118,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="detaile" @click="subMit">
|
||||||
|
<button class="debtn">提交</button>
|
||||||
|
</div>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
<a-tab-pane key="2" tab="修改记录"> </a-tab-pane>
|
<a-tab-pane key="2" tab="修改记录"> </a-tab-pane>
|
||||||
</a-tabs>
|
</a-tabs>
|
||||||
@@ -130,6 +133,8 @@
|
|||||||
import { toRefs, reactive } from "vue";
|
import { toRefs, reactive } from "vue";
|
||||||
import { getTask } from "../../api/indexTaskadd";
|
import { getTask } from "../../api/indexTaskadd";
|
||||||
import { toDate } from "../../api/method";
|
import { toDate } from "../../api/method";
|
||||||
|
import { auditView } from "../../api/indexAudit";
|
||||||
|
import { message } from "ant-design-vue";
|
||||||
export default {
|
export default {
|
||||||
name: "ProjectAudit",
|
name: "ProjectAudit",
|
||||||
components: {},
|
components: {},
|
||||||
@@ -138,10 +143,18 @@ export default {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
projectId: {
|
chooseProject: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
|
chooseCreateId: {
|
||||||
|
type: Number,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
chooseCreater: {
|
||||||
|
type: String,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
setup(props, ctx) {
|
setup(props, ctx) {
|
||||||
@@ -256,6 +269,25 @@ export default {
|
|||||||
const changeDe = () => {
|
const changeDe = () => {
|
||||||
state.showDetail = !state.showDetail;
|
state.showDetail = !state.showDetail;
|
||||||
};
|
};
|
||||||
|
const subMit = () => {
|
||||||
|
auditView({
|
||||||
|
createId: props.chooseCreateId,
|
||||||
|
createName: props.chooseCreater,
|
||||||
|
description: state.valueSuggest,
|
||||||
|
pass: state.valuePass == "1" ? 1 : -1,
|
||||||
|
projectId: props.chooseProject,
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
console.log("提交成功", res);
|
||||||
|
message.destroy();
|
||||||
|
message.success("提交成功");
|
||||||
|
closeDrawer();
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err);
|
||||||
|
message.warning("提交失败");
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
@@ -263,6 +295,7 @@ export default {
|
|||||||
afterVisibleChange,
|
afterVisibleChange,
|
||||||
getTaskInfo,
|
getTaskInfo,
|
||||||
changeDe,
|
changeDe,
|
||||||
|
subMit,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ export default {
|
|||||||
|
|
||||||
state.selectedRowKeys = selectedRowKeys;
|
state.selectedRowKeys = selectedRowKeys;
|
||||||
state.selectedRows = selectedRows;
|
state.selectedRows = selectedRows;
|
||||||
console.log(selectedRows);
|
console.log("选择了", state.selectedRows[0].name);
|
||||||
};
|
};
|
||||||
const closeDrawer = () => {
|
const closeDrawer = () => {
|
||||||
ctx.emit("update:selfacetVisible", false);
|
ctx.emit("update:selfacetVisible", false);
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { toRefs, reactive } from "vue";
|
import { toRefs, reactive } from "vue";
|
||||||
import { studentScoreList } from "../../api/indexProjStu";
|
import { studentScoreList } from "../../api/indexProjStu";
|
||||||
import { toDate } from "@/api/method";
|
// import { toDate } from "@/api/method";
|
||||||
export default {
|
export default {
|
||||||
name: "StuScoreDetail",
|
name: "StuScoreDetail",
|
||||||
props: {
|
props: {
|
||||||
@@ -151,10 +151,10 @@ export default {
|
|||||||
let array = [];
|
let array = [];
|
||||||
data.map((item) => {
|
data.map((item) => {
|
||||||
let obj = {
|
let obj = {
|
||||||
time: toDate(item.createTime / 1000, "Y-M-D h-m"),
|
time: item.createTime,
|
||||||
score: item.score,
|
score: item.score,
|
||||||
type: "完成任务",
|
type: "完成任务",
|
||||||
from: item.source,
|
from: item.source == "" ? "-" : item.source,
|
||||||
};
|
};
|
||||||
array.push(obj);
|
array.push(obj);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export default createStore({
|
|||||||
|
|
||||||
assessmentName: "",
|
assessmentName: "",
|
||||||
routerId: null,
|
routerId: null,
|
||||||
|
projectTemplateId:null,
|
||||||
orgtreeList: [],
|
orgtreeList: [],
|
||||||
},
|
},
|
||||||
getters: {},
|
getters: {},
|
||||||
@@ -43,6 +43,9 @@ export default createStore({
|
|||||||
},
|
},
|
||||||
getOrgtreeList(state, orgtreeList) {
|
getOrgtreeList(state, orgtreeList) {
|
||||||
state.orgtreeList = orgtreeList;
|
state.orgtreeList = orgtreeList;
|
||||||
|
},
|
||||||
|
SET_projectTemplateId (state,projectTemplateId) {
|
||||||
|
state.projectTemplateId = projectTemplateId;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
actions: {},
|
actions: {},
|
||||||
|
|||||||
@@ -84,3 +84,36 @@ export function filterCommon(arr, key) {
|
|||||||
});
|
});
|
||||||
return newData;
|
return newData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getdateToTime(date) {
|
||||||
|
let now = new Date(parseInt(date)),
|
||||||
|
y = now.getFullYear(),
|
||||||
|
m = now.getMonth() + 1,
|
||||||
|
d = now.getDate(),
|
||||||
|
hh = now.getHours(),
|
||||||
|
mm = now.getMinutes();
|
||||||
|
return `${y}-${m < 10 ? "0" + m : m}-${d < 10 ? "0" + d : d} ${hh}:${mm}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
//计算两个时间之间的时间差 多少天时分秒
|
||||||
|
export function intervalTime(startTime) {
|
||||||
|
const curTime = new Date().getTime(); //计算当前时间戳
|
||||||
|
const date3 = curTime - startTime; //时间差的毫秒数
|
||||||
|
//计算出相差天数
|
||||||
|
const days = Math.floor(date3 / (24 * 3600 * 1000));
|
||||||
|
//计算出小时数
|
||||||
|
const leave1 = date3 % (24 * 3600 * 1000); //计算天数后剩余的毫秒数
|
||||||
|
const hours = Math.floor(leave1 / (3600 * 1000));
|
||||||
|
//计算相差分钟数
|
||||||
|
const leave2 = leave1 % (3600 * 1000); //计算小时数后剩余的毫秒数
|
||||||
|
const minutes = Math.floor(leave2 / (60 * 1000));
|
||||||
|
//计算相差秒数
|
||||||
|
const leave3 = leave2 % (60 * 1000); //计算分钟数后剩余的毫秒数
|
||||||
|
const seconds = Math.round(leave3 / 1000);
|
||||||
|
return {
|
||||||
|
days,
|
||||||
|
hours,
|
||||||
|
minutes,
|
||||||
|
seconds,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -195,7 +195,7 @@ export default {
|
|||||||
};
|
};
|
||||||
courseListView(objn)
|
courseListView(objn)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log("获取已审核课程成功", res);
|
console.log("获取已审核课程成功", res.data.data);
|
||||||
let result = res.data.data.rows;
|
let result = res.data.data.rows;
|
||||||
state.total = res.data.data.total;
|
state.total = res.data.data.total;
|
||||||
setTableData(result);
|
setTableData(result);
|
||||||
|
|||||||
@@ -106,11 +106,50 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 审核日志弹窗 -->
|
||||||
|
<a-modal
|
||||||
|
v-model:visible="projAuditModal"
|
||||||
|
:footer="null"
|
||||||
|
:closable="closeBack"
|
||||||
|
wrapClassName="projAuditModal"
|
||||||
|
centered="true"
|
||||||
|
@after-visible-change="changeAu"
|
||||||
|
>
|
||||||
|
<div class="delete">
|
||||||
|
<div class="del_header"></div>
|
||||||
|
<div class="del_main">
|
||||||
|
<div class="header">
|
||||||
|
<div class="icon"></div>
|
||||||
|
<span>审核记录</span>
|
||||||
|
<div class="close_exit" @click="closeProjAuditModal"></div>
|
||||||
|
</div>
|
||||||
|
<div class="body">
|
||||||
|
<a-table
|
||||||
|
style="width: 90%"
|
||||||
|
:columns="columnsAudit"
|
||||||
|
:data-source="tableDataAudit"
|
||||||
|
:loading="tableDataTotalAudit === -1 ? true : false"
|
||||||
|
expandRowByClick="true"
|
||||||
|
@expand="expandTable"
|
||||||
|
:pagination="false"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="del_btnbox">
|
||||||
|
<div class="del_btn btn1" @click="closeProjAuditModal">
|
||||||
|
<div class="btnText">取消</div>
|
||||||
|
</div>
|
||||||
|
<div class="del_btn btn2" @click="closeProjAuditModal">
|
||||||
|
<div class="btnText">确定</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a-modal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { reactive, toRefs, onMounted } from "vue";
|
import { reactive, toRefs, onMounted } from "vue";
|
||||||
import { listView } from "../../api/indexAudit";
|
import { listView, auditList } from "../../api/indexAudit";
|
||||||
import { toDate } from "@/api/method";
|
import { toDate } from "@/api/method";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
|
|
||||||
@@ -137,6 +176,8 @@ export default {
|
|||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
total: null,
|
total: null,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
projAuditModal: false,
|
||||||
|
closeBack: false,
|
||||||
columns1: [
|
columns1: [
|
||||||
{
|
{
|
||||||
title: "序号",
|
title: "序号",
|
||||||
@@ -194,15 +235,55 @@ export default {
|
|||||||
dataIndex: "opt",
|
dataIndex: "opt",
|
||||||
key: "opt",
|
key: "opt",
|
||||||
align: "center",
|
align: "center",
|
||||||
customRender: () => {
|
customRender: (value) => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<span>审核日志</span>
|
<span
|
||||||
|
onClick={() => {
|
||||||
|
showProjAuditModal(value.record.id);
|
||||||
|
}}
|
||||||
|
style="cursor:pointer"
|
||||||
|
>
|
||||||
|
审核日志
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
//审核记录的表
|
||||||
|
columnsAudit: [
|
||||||
|
{
|
||||||
|
title: "审核人",
|
||||||
|
dataIndex: "name",
|
||||||
|
key: "name",
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
title: "审核状态",
|
||||||
|
dataIndex: "belong",
|
||||||
|
key: "belong",
|
||||||
|
align: "center",
|
||||||
|
// width: "10%",
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
title: "审核时间",
|
||||||
|
dataIndex: "time",
|
||||||
|
key: "time",
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
title: "备注",
|
||||||
|
dataIndex: "description",
|
||||||
|
key: "description",
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
//审核记录的数据
|
||||||
|
tableDataAudit: [],
|
||||||
tableData1: [
|
tableData1: [
|
||||||
{
|
{
|
||||||
number: "1",
|
number: "1",
|
||||||
@@ -220,7 +301,7 @@ export default {
|
|||||||
let objn = obj || {
|
let objn = obj || {
|
||||||
beginTime: 0,
|
beginTime: 0,
|
||||||
createName: "",
|
createName: "",
|
||||||
endTime: 0,
|
endTime: "",
|
||||||
manager: "",
|
manager: "",
|
||||||
name: "",
|
name: "",
|
||||||
pageNo: state.currentPage,
|
pageNo: state.currentPage,
|
||||||
@@ -229,10 +310,12 @@ export default {
|
|||||||
};
|
};
|
||||||
listView(objn)
|
listView(objn)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log("获取已审核项目成功", res);
|
console.log("获取已审核项目成功", res.data.data.rows);
|
||||||
let result = res.data.data.rows;
|
let result = res.data.data;
|
||||||
state.total = res.data.data.total;
|
state.total = res.data.data.total;
|
||||||
setTableData(result);
|
if (result.total > 0) {
|
||||||
|
setTableData(result.rows);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log("获取已审核项目失败", err);
|
console.log("获取已审核项目失败", err);
|
||||||
@@ -240,19 +323,23 @@ export default {
|
|||||||
};
|
};
|
||||||
const setTableData = (tabledata) => {
|
const setTableData = (tabledata) => {
|
||||||
let data = tabledata;
|
let data = tabledata;
|
||||||
|
let array = [];
|
||||||
data.map((item) => {
|
data.map((item) => {
|
||||||
let obj = {
|
let obj = {
|
||||||
number: item.projectId,
|
number: item.projectId,
|
||||||
name: getName(item),
|
// 需要加上
|
||||||
belong: getBelong(item),
|
// name: getName(item),
|
||||||
|
// belong: getBelong(item),
|
||||||
manager: item.manager,
|
manager: item.manager,
|
||||||
status: item.status == 2 ? "通过" : "拒绝",
|
status: item.status == 2 ? "通过" : "拒绝",
|
||||||
creater: item.createName,
|
creater: item.createName,
|
||||||
time: toDate(item.beginTime, "Y-M-D h-m"),
|
time: toDate(item.beginTime, "Y-M-D h-m"),
|
||||||
msg: item.description,
|
msg: item.description,
|
||||||
|
id: item.projectId,
|
||||||
};
|
};
|
||||||
state.tableData1.push(obj);
|
array.push(obj);
|
||||||
});
|
});
|
||||||
|
state.tableData1 = array;
|
||||||
};
|
};
|
||||||
const getName = (item) => {
|
const getName = (item) => {
|
||||||
if (
|
if (
|
||||||
@@ -323,6 +410,49 @@ export default {
|
|||||||
state.valuestate = null;
|
state.valuestate = null;
|
||||||
getProjList();
|
getProjList();
|
||||||
};
|
};
|
||||||
|
const closeProjAuditModal = () => {
|
||||||
|
state.projAuditModal = false;
|
||||||
|
};
|
||||||
|
const showProjAuditModal = (id) => {
|
||||||
|
state.projAuditModal = true;
|
||||||
|
auditList({
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
project_id: id,
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
console.log("获取到了审核日志列表", res);
|
||||||
|
let result = res.data.data;
|
||||||
|
if (result.total > 0) {
|
||||||
|
setAudit(result.rows);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log("审核日志列表获取失败", err);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const setAudit = (table) => {
|
||||||
|
let data = table;
|
||||||
|
let array = [];
|
||||||
|
data.map((item) => {
|
||||||
|
let obj = {
|
||||||
|
name: item.create_name,
|
||||||
|
belong:
|
||||||
|
item.status == 1
|
||||||
|
? "提交待审核"
|
||||||
|
: item.status == 2
|
||||||
|
? "通过"
|
||||||
|
: item.status == 3
|
||||||
|
? "拒绝"
|
||||||
|
: "-",
|
||||||
|
time: item.createTime,
|
||||||
|
description: item.description,
|
||||||
|
};
|
||||||
|
array.push(obj);
|
||||||
|
});
|
||||||
|
state.tableDataAudit = array;
|
||||||
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getProjList();
|
getProjList();
|
||||||
});
|
});
|
||||||
@@ -336,11 +466,128 @@ export default {
|
|||||||
changePagination,
|
changePagination,
|
||||||
search,
|
search,
|
||||||
reset,
|
reset,
|
||||||
|
closeProjAuditModal,
|
||||||
|
showProjAuditModal,
|
||||||
|
setAudit,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
.projAuditModal {
|
||||||
|
.ant-modal {
|
||||||
|
width: 816px !important;
|
||||||
|
min-height: 420px !important;
|
||||||
|
.ant-modal-content {
|
||||||
|
width: 816px !important;
|
||||||
|
min-height: 420px !important;
|
||||||
|
.ant-modal-body {
|
||||||
|
width: 816px !important;
|
||||||
|
min-height: 420px !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
.delete {
|
||||||
|
z-index: 999;
|
||||||
|
width: 816px;
|
||||||
|
min-height: 420px;
|
||||||
|
background: #ffffff;
|
||||||
|
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.21);
|
||||||
|
border-radius: 4px;
|
||||||
|
// position: absolute;
|
||||||
|
// left: 50%;
|
||||||
|
// top: 10%;
|
||||||
|
// transform: translate(-50%, -50%);
|
||||||
|
.del_header {
|
||||||
|
position: absolute;
|
||||||
|
width: calc(100%);
|
||||||
|
height: 68px;
|
||||||
|
background: linear-gradient(
|
||||||
|
rgba(78, 166, 255, 0.2) 0%,
|
||||||
|
rgba(78, 166, 255, 0) 100%
|
||||||
|
);
|
||||||
|
}
|
||||||
|
.del_main {
|
||||||
|
width: 100%;
|
||||||
|
position: relative;
|
||||||
|
.header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding-top: 20px;
|
||||||
|
padding-left: 26px;
|
||||||
|
font-size: 16px;
|
||||||
|
.icon {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
margin-right: 10px;
|
||||||
|
background-image: url(@/assets/images/taskpage/gan.png);
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
.close_exit {
|
||||||
|
position: absolute;
|
||||||
|
right: 42px;
|
||||||
|
cursor: pointer;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
background-image: url(@/assets/images/coursewareManage/close.png);
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.body {
|
||||||
|
width: 100%;
|
||||||
|
margin: 34px auto 56px auto;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: column;
|
||||||
|
// background-color: red;
|
||||||
|
position: relative;
|
||||||
|
.ant-table-empty {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
.back {
|
||||||
|
position: absolute;
|
||||||
|
top: 30px;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #666666;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.del_btnbox {
|
||||||
|
display: flex;
|
||||||
|
margin: 30px auto;
|
||||||
|
justify-content: center;
|
||||||
|
.del_btn {
|
||||||
|
width: 100px;
|
||||||
|
height: 40px;
|
||||||
|
background: rgba(64, 158, 255, 0);
|
||||||
|
border-radius: 8px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
flex-shrink: 0;
|
||||||
|
cursor: pointer;
|
||||||
|
.btnText {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 400;
|
||||||
|
line-height: 40px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.btn1 {
|
||||||
|
border: 1px solid rgba(64, 158, 255, 1);
|
||||||
|
color: #4ea6ff;
|
||||||
|
margin-right: 14px;
|
||||||
|
}
|
||||||
|
.btn2 {
|
||||||
|
background-color: #4ea6ff;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.projectviewed {
|
.projectviewed {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
.tmpl {
|
.tmpl {
|
||||||
|
|||||||
@@ -101,7 +101,9 @@
|
|||||||
<!-- 审核项目页面 -->
|
<!-- 审核项目页面 -->
|
||||||
<project-audit
|
<project-audit
|
||||||
v-model:ProjAuditvisible="ProjAuditvisible"
|
v-model:ProjAuditvisible="ProjAuditvisible"
|
||||||
v-model:projectId="projectId"
|
v-model:chooseProject="chooseProject"
|
||||||
|
v-model:chooseCreateId="chooseCreateId"
|
||||||
|
v-model:chooseCreater="chooseCreater"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -134,6 +136,9 @@ export default {
|
|||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
total: null,
|
total: null,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
chooseProject: null, //要审核的项目
|
||||||
|
chooseCreateId: null,
|
||||||
|
chooseCreater: null,
|
||||||
columns1: [
|
columns1: [
|
||||||
{
|
{
|
||||||
title: "序号",
|
title: "序号",
|
||||||
@@ -185,13 +190,17 @@ export default {
|
|||||||
dataIndex: "opt",
|
dataIndex: "opt",
|
||||||
key: "opt",
|
key: "opt",
|
||||||
align: "center",
|
align: "center",
|
||||||
customRender: () => {
|
customRender: (value) => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<span
|
<span
|
||||||
style="cursor:pointer"
|
style="cursor:pointer"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
showProjAudit();
|
showProjAudit(
|
||||||
|
value.record.projectId,
|
||||||
|
value.record.createId,
|
||||||
|
value.record.creater
|
||||||
|
);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
审核
|
审核
|
||||||
@@ -213,8 +222,11 @@ export default {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
const showProjAudit = () => {
|
const showProjAudit = (id, createId, creater) => {
|
||||||
state.ProjAuditvisible = true;
|
state.ProjAuditvisible = true;
|
||||||
|
state.chooseProject = id;
|
||||||
|
state.chooseCreateId = createId;
|
||||||
|
state.chooseCreater = creater;
|
||||||
};
|
};
|
||||||
const getProjList = (obj) => {
|
const getProjList = (obj) => {
|
||||||
let objn = obj || {
|
let objn = obj || {
|
||||||
@@ -252,6 +264,8 @@ export default {
|
|||||||
status: "待审核",
|
status: "待审核",
|
||||||
creater: item.createName,
|
creater: item.createName,
|
||||||
time: toDate(item.createTime, "Y-M-D h-m"),
|
time: toDate(item.createTime, "Y-M-D h-m"),
|
||||||
|
projectId: item.projectId,
|
||||||
|
createId: item.createId,
|
||||||
};
|
};
|
||||||
array.push(obj);
|
array.push(obj);
|
||||||
});
|
});
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -230,12 +230,25 @@
|
|||||||
<div class="lin"></div>
|
<div class="lin"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="itcon">
|
<div class="itcon" @click="showAddface">
|
||||||
<div class="img">
|
<div class="img">
|
||||||
<img src="../../assets/images/leveladd/mian.png" />
|
<img src="../../assets/images/leveladd/mian.png" />
|
||||||
</div>
|
</div>
|
||||||
<div class="text">面授</div>
|
<div class="text">面授</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 添加面授 -->
|
||||||
|
<add-faceteach
|
||||||
|
@changeData="updateTableData"
|
||||||
|
v-model:edit="edit"
|
||||||
|
v-model:isactive="isactive"
|
||||||
|
v-model:routerId="routerId"
|
||||||
|
v-model:chooseStageId="chooseStageId"
|
||||||
|
v-model:routerTaskId="routerTaskId"
|
||||||
|
v-model:addfaceteachVisible="addfaceteachVisible"
|
||||||
|
v-model:EditFaceId="EditFaceId"
|
||||||
|
:isLevel="isLevel"
|
||||||
|
/>
|
||||||
|
<!-- 添加面授 -->
|
||||||
<div class="lin"></div>
|
<div class="lin"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
@@ -1042,6 +1055,7 @@ import AddInvist from "../../components/drawers/AddInvist.vue";
|
|||||||
import AddVote from "../../components/vote/AddVote.vue";
|
import AddVote from "../../components/vote/AddVote.vue";
|
||||||
import AddLive from "../../components/drawers/AddLive.vue";
|
import AddLive from "../../components/drawers/AddLive.vue";
|
||||||
import AddRef from "../../components/drawers/AddRef.vue";
|
import AddRef from "../../components/drawers/AddRef.vue";
|
||||||
|
import AddFaceteach from "../../components/drawers/AddFaceteach.vue";
|
||||||
import * as api from "../../api/indexLevel";
|
import * as api from "../../api/indexLevel";
|
||||||
import { GetRouterDetail } from "../../api/indexTask";
|
import { GetRouterDetail } from "../../api/indexTask";
|
||||||
import { message } from "ant-design-vue";
|
import { message } from "ant-design-vue";
|
||||||
@@ -1072,6 +1086,7 @@ export default {
|
|||||||
AddRef,
|
AddRef,
|
||||||
draggable,
|
draggable,
|
||||||
UnlockMode,
|
UnlockMode,
|
||||||
|
AddFaceteach,
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
@@ -1225,6 +1240,11 @@ export default {
|
|||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
tableDataTotal: 0,
|
tableDataTotal: 0,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
visible: false,
|
||||||
|
//项目
|
||||||
|
editproj: false,
|
||||||
|
addprojvisible: false,
|
||||||
|
addfaceteachVisible: false,
|
||||||
AddSvisible: false, //添加学员抽屉
|
AddSvisible: false, //添加学员抽屉
|
||||||
AddImpStuvisible: false, //导入学员抽屉
|
AddImpStuvisible: false, //导入学员抽屉
|
||||||
addlivevisible: false, //添加直播抽屉
|
addlivevisible: false, //添加直播抽屉
|
||||||
@@ -1248,6 +1268,7 @@ export default {
|
|||||||
EditEvalId: "",
|
EditEvalId: "",
|
||||||
EditInvistId: "",
|
EditInvistId: "",
|
||||||
EditVoteId: "",
|
EditVoteId: "",
|
||||||
|
EditFaceId: "",
|
||||||
//项目
|
//项目
|
||||||
EditProjId: "",
|
EditProjId: "",
|
||||||
routerTaskId: "",
|
routerTaskId: "",
|
||||||
@@ -1396,6 +1417,12 @@ export default {
|
|||||||
state.EditWorkId = id;
|
state.EditWorkId = id;
|
||||||
state.routerTaskId = eleId;
|
state.routerTaskId = eleId;
|
||||||
};
|
};
|
||||||
|
//面授抽屉
|
||||||
|
const showAddface = (id, eleId) => {
|
||||||
|
state.addfaceteachVisible = true;
|
||||||
|
state.EditFaceId = id;
|
||||||
|
state.routerTaskId = eleId;
|
||||||
|
};
|
||||||
//案例抽屉
|
//案例抽屉
|
||||||
const showDrawerAddCase = (id, eleId) => {
|
const showDrawerAddCase = (id, eleId) => {
|
||||||
state.addcasevisible = true;
|
state.addcasevisible = true;
|
||||||
@@ -1519,7 +1546,7 @@ export default {
|
|||||||
});
|
});
|
||||||
if (state.level.length > 0) {
|
if (state.level.length > 0) {
|
||||||
let chapter = localStorage.getItem("chapterId");
|
let chapter = localStorage.getItem("chapterId");
|
||||||
if (chapter !== null) {
|
if (chapter !== "null") {
|
||||||
dataAssignment(chapter); //用哪个的任务表
|
dataAssignment(chapter); //用哪个的任务表
|
||||||
state.isactive = chapter; //哪个亮
|
state.isactive = chapter; //哪个亮
|
||||||
} else {
|
} else {
|
||||||
@@ -1878,6 +1905,8 @@ export default {
|
|||||||
showDrawerAddOnline(id, eleId);
|
showDrawerAddOnline(id, eleId);
|
||||||
} else if (type == "案例") {
|
} else if (type == "案例") {
|
||||||
showDrawerAddCase(id, eleId);
|
showDrawerAddCase(id, eleId);
|
||||||
|
} else if (type == "面授") {
|
||||||
|
showAddface(id, eleId);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -2068,6 +2097,7 @@ export default {
|
|||||||
deleteChapter,
|
deleteChapter,
|
||||||
|
|
||||||
showModeVisible,
|
showModeVisible,
|
||||||
|
showAddface,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -565,9 +565,11 @@ import { ref, reactive, defineComponent, toRefs, onMounted} from "vue";
|
|||||||
import { message } from "ant-design-vue";
|
import { message } from "ant-design-vue";
|
||||||
import * as api from "@/api/indexTemplate"
|
import * as api from "@/api/indexTemplate"
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
|
import { useStore } from "vuex";
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "LibraryAdd",
|
name: "LibraryAdd",
|
||||||
setup() {
|
setup() {
|
||||||
|
const store = useStore();
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
//任务大纲列表
|
//任务大纲列表
|
||||||
taskSyllabus: [
|
taskSyllabus: [
|
||||||
@@ -761,11 +763,12 @@ export default defineComponent({
|
|||||||
onMounted(() => {getDetail()});
|
onMounted(() => {getDetail()});
|
||||||
// 获取详情
|
// 获取详情
|
||||||
const getDetail = () => {
|
const getDetail = () => {
|
||||||
api.templateDetail(1).then(res => {
|
api.templateDetail(store.state.projectTemplateId).then(res => {
|
||||||
state.taskSyllabus = []
|
state.taskSyllabus = []
|
||||||
console.log(res);
|
console.log(res);
|
||||||
state.projectInfo.name = res.data.data.projectTemplateInfo.name
|
state.projectInfo.name = res.data.data.projectTemplateInfo.name
|
||||||
state.projectInfo.beginTime = res.data.data.projectTemplateInfo.createTime
|
let time = new Date(Number(res.data.data.projectTemplateInfo.createTime))
|
||||||
|
state.projectInfo.beginTime = time.toLocaleDateString()
|
||||||
state.projectInfo.manager = res.data.data.projectTemplateInfo.manager
|
state.projectInfo.manager = res.data.data.projectTemplateInfo.manager
|
||||||
state.projectInfo.notice = res.data.data.projectTemplateInfo.notice
|
state.projectInfo.notice = res.data.data.projectTemplateInfo.notice
|
||||||
state.projectInfo.sourceBelongId = res.data.data.projectTemplateInfo.sourceBelongId
|
state.projectInfo.sourceBelongId = res.data.data.projectTemplateInfo.sourceBelongId
|
||||||
@@ -811,7 +814,7 @@ export default defineComponent({
|
|||||||
"notice": state.projectInfo.notice,
|
"notice": state.projectInfo.notice,
|
||||||
"noticeFlag": 0,
|
"noticeFlag": 0,
|
||||||
"picUrl": "",
|
"picUrl": "",
|
||||||
"projectTemplateId": 0,
|
"projectTemplateId": store.state.projectTemplateId,
|
||||||
"remark": "",
|
"remark": "",
|
||||||
"sourceBelongId": 0,
|
"sourceBelongId": 0,
|
||||||
"status": 0,
|
"status": 0,
|
||||||
@@ -860,7 +863,7 @@ export default defineComponent({
|
|||||||
const stateEdit = () => {
|
const stateEdit = () => {
|
||||||
let obj={
|
let obj={
|
||||||
"name": "",
|
"name": "",
|
||||||
"projectTemplateId": 0,
|
"projectTemplateId": store.state.projectTemplateId,
|
||||||
"remark": "",
|
"remark": "",
|
||||||
"stageId": 0
|
"stageId": 0
|
||||||
}
|
}
|
||||||
@@ -880,7 +883,7 @@ export default defineComponent({
|
|||||||
"flag": true,
|
"flag": true,
|
||||||
"name": "",
|
"name": "",
|
||||||
"projectTaskId": 0,
|
"projectTaskId": 0,
|
||||||
"projectTemplateId": 0,
|
"projectTemplateId": store.state.projectTemplateId,
|
||||||
"stageId": 0,
|
"stageId": 0,
|
||||||
"type": 0
|
"type": 0
|
||||||
}
|
}
|
||||||
@@ -920,7 +923,6 @@ export default defineComponent({
|
|||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.content7 {
|
.content7 {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
|
|
||||||
.set_tit {
|
.set_tit {
|
||||||
margin-left: 34px;
|
margin-left: 34px;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
|
|||||||
@@ -1055,6 +1055,68 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
|
<!-- 项目提交审核弹窗 -->
|
||||||
|
<a-modal
|
||||||
|
v-model:visible="reviewModal"
|
||||||
|
:footer="null"
|
||||||
|
:closable="false"
|
||||||
|
wrapClassName="CopyModal"
|
||||||
|
centered="true"
|
||||||
|
>
|
||||||
|
<div class="delete">
|
||||||
|
<div class="del_header"></div>
|
||||||
|
<div class="del_main">
|
||||||
|
<div class="header">
|
||||||
|
<div class="icon"></div>
|
||||||
|
<span>提示</span>
|
||||||
|
<div class="close_exit" @click="closeReviewModal"></div>
|
||||||
|
</div>
|
||||||
|
<div class="body">
|
||||||
|
<span>您确定要提交审核吗</span>
|
||||||
|
<div class="back"></div>
|
||||||
|
</div>
|
||||||
|
<div class="del_btnbox">
|
||||||
|
<div class="del_btn btn1" @click="closeReviewModal">
|
||||||
|
<div class="btnText">取消</div>
|
||||||
|
</div>
|
||||||
|
<div class="del_btn btn2" @click="reviewProject">
|
||||||
|
<div class="btnText">确定</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a-modal>
|
||||||
|
<!-- 项目撤回审核弹窗 -->
|
||||||
|
<a-modal
|
||||||
|
v-model:visible="recallReviewModal"
|
||||||
|
:footer="null"
|
||||||
|
:closable="false"
|
||||||
|
wrapClassName="CopyModal"
|
||||||
|
centered="true"
|
||||||
|
>
|
||||||
|
<div class="delete">
|
||||||
|
<div class="del_header"></div>
|
||||||
|
<div class="del_main">
|
||||||
|
<div class="header">
|
||||||
|
<div class="icon"></div>
|
||||||
|
<span>提示</span>
|
||||||
|
<div class="close_exit" @click="closeRecallReviewModal"></div>
|
||||||
|
</div>
|
||||||
|
<div class="body">
|
||||||
|
<span>您确定要撤回审核吗</span>
|
||||||
|
<div class="back"></div>
|
||||||
|
</div>
|
||||||
|
<div class="del_btnbox">
|
||||||
|
<div class="del_btn btn1" @click="closeRecallReviewModal">
|
||||||
|
<div class="btnText">取消</div>
|
||||||
|
</div>
|
||||||
|
<div class="del_btn btn2" @click="recallReviewProject">
|
||||||
|
<div class="btnText">确定</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a-modal>
|
||||||
|
|
||||||
<!-- 归属权抽屉 -->
|
<!-- 归属权抽屉 -->
|
||||||
<proj-owner-ship v-model:ProjOwnervisible="ProjOwnervisible" />
|
<proj-owner-ship v-model:ProjOwnervisible="ProjOwnervisible" />
|
||||||
@@ -1102,6 +1164,9 @@ export default {
|
|||||||
backModal: false, //撤回弹窗
|
backModal: false, //撤回弹窗
|
||||||
closeBack: false, //撤回弹窗关闭图标
|
closeBack: false, //撤回弹窗关闭图标
|
||||||
reminderModal: false, //温馨提示弹窗
|
reminderModal: false, //温馨提示弹窗
|
||||||
|
reviewModal: false, //提交审核
|
||||||
|
recallReviewModal: false, //撤回审核
|
||||||
|
|
||||||
ProjOwnervisible: false,
|
ProjOwnervisible: false,
|
||||||
ProjPvisible: false,
|
ProjPvisible: false,
|
||||||
ProjCheckvisible: false,
|
ProjCheckvisible: false,
|
||||||
@@ -2000,6 +2065,28 @@ export default {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//打开提交审核弹窗
|
||||||
|
const showReviewModal = () => {
|
||||||
|
state.reviewModal = true;
|
||||||
|
};
|
||||||
|
//确认提交审核
|
||||||
|
const reviewProject = () => {};
|
||||||
|
//关闭提交审核弹窗
|
||||||
|
const closeReviewModal = () => {
|
||||||
|
state.reviewModal = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
//打开撤回审核弹窗
|
||||||
|
const showRecallReviewModal = () => {
|
||||||
|
state.recallReviewModal = true;
|
||||||
|
};
|
||||||
|
//确认提交审核
|
||||||
|
const recallReviewProject = () => {};
|
||||||
|
//关闭提交审核弹窗
|
||||||
|
const closeRecallReviewModal = () => {
|
||||||
|
state.recallReviewModal = false;
|
||||||
|
};
|
||||||
|
|
||||||
// 数据接入 - end -
|
// 数据接入 - end -
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
@@ -2853,7 +2940,9 @@ export default {
|
|||||||
</div>
|
</div>
|
||||||
{value.record.status === 0 || value.record.status === -2 ? (
|
{value.record.status === 0 || value.record.status === -2 ? (
|
||||||
<span
|
<span
|
||||||
onClick={() => {}}
|
onClick={() => {
|
||||||
|
showReviewModal();
|
||||||
|
}}
|
||||||
style="cursor:pointer"
|
style="cursor:pointer"
|
||||||
class="operation3"
|
class="operation3"
|
||||||
>
|
>
|
||||||
@@ -2861,7 +2950,9 @@ export default {
|
|||||||
</span>
|
</span>
|
||||||
) : value.record.status === 1 ? (
|
) : value.record.status === 1 ? (
|
||||||
<span
|
<span
|
||||||
onClick={() => {}}
|
onClick={() => {
|
||||||
|
showRecallReviewModal();
|
||||||
|
}}
|
||||||
style="cursor:pointer"
|
style="cursor:pointer"
|
||||||
class="operation3"
|
class="operation3"
|
||||||
>
|
>
|
||||||
@@ -3205,6 +3296,12 @@ export default {
|
|||||||
showProjCheck,
|
showProjCheck,
|
||||||
showProjManage,
|
showProjManage,
|
||||||
closeProjectPub,
|
closeProjectPub,
|
||||||
|
showReviewModal,
|
||||||
|
reviewProject,
|
||||||
|
closeReviewModal,
|
||||||
|
showRecallReviewModal,
|
||||||
|
recallReviewProject,
|
||||||
|
closeRecallReviewModal,
|
||||||
|
|
||||||
tableData,
|
tableData,
|
||||||
columns,
|
columns,
|
||||||
|
|||||||
@@ -196,7 +196,12 @@
|
|||||||
<div>
|
<div>
|
||||||
<add-faceteach
|
<add-faceteach
|
||||||
v-model:addfaceteachVisible="addfaceteachvisible"
|
v-model:addfaceteachVisible="addfaceteachvisible"
|
||||||
v-model:EditEvalId="EditEvalId"
|
v-model:EditFaceId="EditFaceId"
|
||||||
|
v-model:edit="edit"
|
||||||
|
:isLevel="isLevel"
|
||||||
|
v-model:projectId="projectId"
|
||||||
|
v-model:chooseStageId="chooseStageId"
|
||||||
|
@changeData="updateTableData"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<!-- 添加面授侧弹窗 -->
|
<!-- 添加面授侧弹窗 -->
|
||||||
@@ -1129,6 +1134,7 @@ export default {
|
|||||||
EditCaseId: null, //要编辑的案例id
|
EditCaseId: null, //要编辑的案例id
|
||||||
EditOnlineId: null, //要编辑的在线id
|
EditOnlineId: null, //要编辑的在线id
|
||||||
EditFaceTeach: null,
|
EditFaceTeach: null,
|
||||||
|
EditFaceId: null,
|
||||||
EditEvalId: null,
|
EditEvalId: null,
|
||||||
EditInvistId: null,
|
EditInvistId: null,
|
||||||
EditVoteId: null, //编辑需要投票的id
|
EditVoteId: null, //编辑需要投票的id
|
||||||
@@ -1548,7 +1554,7 @@ export default {
|
|||||||
// console.log("任务列表", stage, arr);
|
// console.log("任务列表", stage, arr);
|
||||||
// getTableData(arr);
|
// getTableData(arr);
|
||||||
}
|
}
|
||||||
|
//获取阶段列表
|
||||||
let stagearr = res.data.data.stageList;
|
let stagearr = res.data.data.stageList;
|
||||||
let arrlist = state.curLevel;
|
let arrlist = state.curLevel;
|
||||||
console.log(stagearr, 111111);
|
console.log(stagearr, 111111);
|
||||||
@@ -1556,7 +1562,7 @@ export default {
|
|||||||
getStageData(stagearr);
|
getStageData(stagearr);
|
||||||
stagearr.map((value) => {
|
stagearr.map((value) => {
|
||||||
console.log(value);
|
console.log(value);
|
||||||
arrlist.push();
|
arrlist.push(value);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//给阶段id赋初始值
|
//给阶段id赋初始值
|
||||||
@@ -1808,8 +1814,10 @@ export default {
|
|||||||
state.EditOnlineId = id;
|
state.EditOnlineId = id;
|
||||||
state.projectTaskId = eleId;
|
state.projectTaskId = eleId;
|
||||||
};
|
};
|
||||||
const showDrawerFaceteach = () => {
|
const showDrawerFaceteach = (id, eleId) => {
|
||||||
state.addfaceteachvisible = true;
|
state.addfaceteachvisible = true;
|
||||||
|
state.EditFaceId = id;
|
||||||
|
state.projectTaskId = eleId;
|
||||||
};
|
};
|
||||||
const showDrawerAddCase = (id, eleId) => {
|
const showDrawerAddCase = (id, eleId) => {
|
||||||
state.addcasevisible = true;
|
state.addcasevisible = true;
|
||||||
@@ -2009,6 +2017,8 @@ export default {
|
|||||||
showDrawerAddTest(id, eleId);
|
showDrawerAddTest(id, eleId);
|
||||||
} else if (type == "在线") {
|
} else if (type == "在线") {
|
||||||
showDrawerOnline(id, eleId);
|
showDrawerOnline(id, eleId);
|
||||||
|
} else if (type == "面授") {
|
||||||
|
showDrawerFaceteach(id, eleId);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const showdeAll = () => {
|
const showdeAll = () => {
|
||||||
|
|||||||
@@ -6124,6 +6124,11 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.btnbox{
|
||||||
|
.ant-upload-list{
|
||||||
|
display:none !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
.onemain {
|
.onemain {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
margin-left: 55px;
|
margin-left: 55px;
|
||||||
|
|||||||
@@ -47,6 +47,8 @@
|
|||||||
<script>
|
<script>
|
||||||
import { reactive, defineComponent, toRefs, onMounted } from "vue";
|
import { reactive, defineComponent, toRefs, onMounted } from "vue";
|
||||||
import { message } from "ant-design-vue";
|
import { message } from "ant-design-vue";
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
|
import { useStore } from "vuex";
|
||||||
import * as api from "@/api/indexTemplate"
|
import * as api from "@/api/indexTemplate"
|
||||||
const columns1 = [
|
const columns1 = [
|
||||||
{
|
{
|
||||||
@@ -90,6 +92,9 @@ const columns1 = [
|
|||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "TemplateLibrary",
|
name: "TemplateLibrary",
|
||||||
setup() {
|
setup() {
|
||||||
|
const store = useStore();
|
||||||
|
// 编辑页面跳转过来时候,自动填充表格
|
||||||
|
const router = useRouter();
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
value1: null,
|
value1: null,
|
||||||
tableData1: [
|
tableData1: [
|
||||||
@@ -101,15 +106,6 @@ export default defineComponent({
|
|||||||
stutime: "2022-10-31 23:12:00",
|
stutime: "2022-10-31 23:12:00",
|
||||||
operation: "operation",
|
operation: "operation",
|
||||||
projectTemplateId: 1,
|
projectTemplateId: 1,
|
||||||
},
|
|
||||||
{
|
|
||||||
key: "2",
|
|
||||||
name: "测试模板2",
|
|
||||||
status: "未发布",
|
|
||||||
creator: "李部长",
|
|
||||||
stutime: "2022-10-31 23:12:00",
|
|
||||||
operation: "operation",
|
|
||||||
projectTemplateId: 2,
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
@@ -124,12 +120,10 @@ export default defineComponent({
|
|||||||
{value.status === "已发布" ? (
|
{value.status === "已发布" ? (
|
||||||
<div class="nselect">
|
<div class="nselect">
|
||||||
<div class="ops2">
|
<div class="ops2">
|
||||||
<router-link to="/libraryadd">
|
<div class="jc" onClick={() => {toLibraryAdd(value.projectTemplateId)}}>
|
||||||
<div class="jc">
|
|
||||||
查看{" "}
|
查看{" "}
|
||||||
<span style="color:#E9E9E9;margin-left:15px;">|</span>
|
<span style="color:#E9E9E9;margin-left:15px;">|</span>
|
||||||
</div>
|
</div>
|
||||||
</router-link>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="ops3">
|
<div class="ops3">
|
||||||
<div class="jc"
|
<div class="jc"
|
||||||
@@ -150,12 +144,10 @@ export default defineComponent({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ops2">
|
<div class="ops2">
|
||||||
<router-link to="/libraryadd">
|
<div class="jc" onClick={() => {toLibraryAdd(value.projectTemplateId)}}>
|
||||||
<div class="jc">
|
|
||||||
查看
|
查看
|
||||||
<span style="color:#E9E9E9;margin-left:15px;">|</span>
|
<span style="color:#E9E9E9;margin-left:15px;">|</span>
|
||||||
</div>
|
</div>
|
||||||
</router-link>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="ops3">
|
<div class="ops3">
|
||||||
<div class="jc"
|
<div class="jc"
|
||||||
@@ -189,26 +181,28 @@ export default defineComponent({
|
|||||||
const getLibraryList = () => {
|
const getLibraryList = () => {
|
||||||
let obj = {
|
let obj = {
|
||||||
"beginTime": 0,
|
"beginTime": 0,
|
||||||
"endTime": 0,
|
|
||||||
"name": "",
|
"name": "",
|
||||||
"pageNo": pagination.current,
|
"pageNo": pagination.current,
|
||||||
"pageSize": 10,
|
"pageSize": 10,
|
||||||
"status": 0 || 1
|
"status": 0
|
||||||
}
|
}
|
||||||
api.templateList(obj).then((res) => {
|
api.templateList(obj).then((res) => {
|
||||||
|
state.tableData1 = []
|
||||||
console.log(res);
|
console.log(res);
|
||||||
let resData = res.data.data.rows
|
let resData = res.data.data.rows
|
||||||
if (resData.length) {
|
if (resData.length) {
|
||||||
for (let i in resData) {
|
for (let i in resData) {
|
||||||
state.tableData1[i].id = i + 1;
|
state.tableData1.push({
|
||||||
state.tableData1[i].projectTemplateId = resData[i].projectTemplateId;
|
id : i + 1,
|
||||||
state.tableData1[i].status = resData[i].status ? "已发布" : "未发布";
|
projectTemplateId:resData[i].projectTemplateId,
|
||||||
state.tableData1[i].name = resData[i].name;
|
status:resData[i].status ? "已发布" : "未发布",
|
||||||
state.tableData1[i].creator = resData[i].createName;
|
name:resData[i].name,
|
||||||
state.tableData1[i].stutime = resData[i].publishTime;
|
creator:resData[i].createName,
|
||||||
state.tableData1[i].operation = "operation";
|
stutime:resData[i].publishTime,
|
||||||
|
operation:"operation"
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
getTableDate1()
|
||||||
} else {
|
} else {
|
||||||
message.warning("获取的列表数据为空值")
|
message.warning("获取的列表数据为空值")
|
||||||
}
|
}
|
||||||
@@ -227,55 +221,21 @@ export default defineComponent({
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
const searchLevel = () => {
|
const searchLevel = () => {
|
||||||
state.tableData1 = [
|
getLibraryList();
|
||||||
{
|
setTimeout(() => {
|
||||||
key: "1",
|
const result = state.tableData1.filter(item => item.name.includes(state.value1))
|
||||||
name: "测试模板1",
|
state.tableData1 = result;
|
||||||
status: "已发布",
|
},100)
|
||||||
creator: "李部长",
|
|
||||||
stutime: "2022-10-31 23:12:00",
|
|
||||||
operation: "operation",
|
|
||||||
projectTemplateId: 1,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: "2",
|
|
||||||
name: "测试模板2",
|
|
||||||
status: "未发布",
|
|
||||||
creator: "李部长",
|
|
||||||
stutime: "2022-10-31 23:12:00",
|
|
||||||
operation: "operation",
|
|
||||||
projectTemplateId: 2,
|
|
||||||
}
|
|
||||||
];
|
|
||||||
const result = state.tableData1.filter(item => item.name.includes(state.value1))
|
|
||||||
state.tableData1 = result;
|
|
||||||
getTableDate1()
|
|
||||||
};
|
};
|
||||||
const resetLevel = () => {
|
const resetLevel = () => {
|
||||||
state.value1 = '';
|
state.value1 = '';
|
||||||
// getLibraryList();
|
getLibraryList();
|
||||||
state.tableData1 = [
|
|
||||||
{
|
|
||||||
key: "1",
|
|
||||||
name: "测试模板1",
|
|
||||||
status: "已发布",
|
|
||||||
creator: "李部长",
|
|
||||||
stutime: "2022-10-31 23:12:00",
|
|
||||||
operation: "operation",
|
|
||||||
projectTemplateId: 1,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: "2",
|
|
||||||
name: "测试模板2",
|
|
||||||
status: "未发布",
|
|
||||||
creator: "李部长",
|
|
||||||
stutime: "2022-10-31 23:12:00",
|
|
||||||
operation: "operation",
|
|
||||||
projectTemplateId: 2,
|
|
||||||
}
|
|
||||||
]
|
|
||||||
getTableDate1()
|
getTableDate1()
|
||||||
};
|
};
|
||||||
|
const toLibraryAdd = (id) => {
|
||||||
|
router.push("/libraryAdd");
|
||||||
|
store.state.projectTemplateId = id
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
@@ -284,6 +244,7 @@ export default defineComponent({
|
|||||||
searchLevel,
|
searchLevel,
|
||||||
resetLevel,
|
resetLevel,
|
||||||
pagination,
|
pagination,
|
||||||
|
toLibraryAdd,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1045,6 +1045,7 @@
|
|||||||
import draggable from "vuedraggable";
|
import draggable from "vuedraggable";
|
||||||
import { storage } from "../../api/storage";
|
import { storage } from "../../api/storage";
|
||||||
import UnlockMode from "../../components/drawers/UnlockMode.vue";
|
import UnlockMode from "../../components/drawers/UnlockMode.vue";
|
||||||
|
import {useStore} from "vuex";
|
||||||
// import * as api1 from "../../api/index1";
|
// import * as api1 from "../../api/index1";
|
||||||
|
|
||||||
const drawercolumns = [
|
const drawercolumns = [
|
||||||
@@ -1105,6 +1106,7 @@
|
|||||||
UnlockMode,
|
UnlockMode,
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
|
const store = useStore();
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
projectId: storage.get("projectId")
|
projectId: storage.get("projectId")
|
||||||
? JSON.parse(storage.get("projectId"))
|
? JSON.parse(storage.get("projectId"))
|
||||||
@@ -1507,8 +1509,7 @@
|
|||||||
const getTask = () => {
|
const getTask = () => {
|
||||||
state.tableData = []
|
state.tableData = []
|
||||||
api
|
api
|
||||||
// .templateDetail(state.projectId || 1)
|
.templateDetail(store.state.projectTemplateId)
|
||||||
.templateDetail(1)
|
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
console.log("22222", res.data.data.stageList);
|
console.log("22222", res.data.data.stageList);
|
||||||
@@ -1706,7 +1707,7 @@
|
|||||||
if (state.updateStageID) {
|
if (state.updateStageID) {
|
||||||
let obj = {
|
let obj = {
|
||||||
name: state.valuesname,
|
name: state.valuesname,
|
||||||
projectTemplateId: 1,
|
projectTemplateId: store.state.projectTemplateId,
|
||||||
remark: state.valuesnotice,
|
remark: state.valuesnotice,
|
||||||
stageId:state.updateStageID,
|
stageId:state.updateStageID,
|
||||||
};
|
};
|
||||||
@@ -1728,7 +1729,7 @@
|
|||||||
} else {
|
} else {
|
||||||
let obj = {
|
let obj = {
|
||||||
name: state.valuesname,
|
name: state.valuesname,
|
||||||
projectTemplateId: 1,
|
projectTemplateId: store.state.projectTemplateId,
|
||||||
remark: state.valuesnotice,
|
remark: state.valuesnotice,
|
||||||
stageId:0,
|
stageId:0,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -311,17 +311,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { reactive, toRefs, ref } from "vue";
|
import { reactive, toRefs, ref,onMounted } from "vue";
|
||||||
import { message } from "ant-design-vue";
|
import { message } from "ant-design-vue";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
// import dayjs from "dayjs";
|
// import dayjs from "dayjs";
|
||||||
import * as api from "../../api/indexTemplate";
|
import * as api from "../../api/indexTemplate";
|
||||||
import { storage } from "../../api/storage";
|
import { storage } from "../../api/storage";
|
||||||
|
import {useStore} from "vuex";
|
||||||
// import { toDate } from "../../api/method";
|
// import { toDate } from "../../api/method";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "projectAdd",
|
name: "projectAdd",
|
||||||
setup() {
|
setup() {
|
||||||
|
const store = useStore();
|
||||||
// 编辑页面跳转过来时候,自动填充表格
|
// 编辑页面跳转过来时候,自动填充表格
|
||||||
const routers = useRoute();
|
const routers = useRoute();
|
||||||
const isEdit = ref(false);
|
const isEdit = ref(false);
|
||||||
@@ -580,23 +582,7 @@ export default {
|
|||||||
console.log(`selected ${key}`, classifyList4);
|
console.log(`selected ${key}`, classifyList4);
|
||||||
// systemid = key;
|
// systemid = key;
|
||||||
};
|
};
|
||||||
//模版滚动加载信息
|
|
||||||
const templateScroll = (e) => {
|
|
||||||
// console.log("滚动", e, b);
|
|
||||||
const { target } = e;
|
|
||||||
const scrllHeight = target.scrollHeight - target.scrollTop;
|
|
||||||
const clientHeight = target.clientHeight;
|
|
||||||
// console.log("scrllHeight", scrllHeight, clientHeight);
|
|
||||||
if (scrllHeight === 0 && clientHeight === 0) {
|
|
||||||
state.currentPage = 1;
|
|
||||||
} else if (scrllHeight - clientHeight == 0) {
|
|
||||||
// 下拉到底部时
|
|
||||||
if (state.currentPage < state.totalPages) {
|
|
||||||
// 如果滑到底部,则加载下一页
|
|
||||||
state.currentPage++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// const removeFile = (file) => {
|
// const removeFile = (file) => {
|
||||||
// const index = fileList1.value.indexOf(file);
|
// const index = fileList1.value.indexOf(file);
|
||||||
@@ -619,6 +605,9 @@ export default {
|
|||||||
// attach = attachStr;
|
// attach = attachStr;
|
||||||
// };
|
// };
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
})
|
||||||
|
|
||||||
const errorMsgs = {
|
const errorMsgs = {
|
||||||
name: "请输入模板名称",
|
name: "请输入模板名称",
|
||||||
category: "请选择模板分类",
|
category: "请选择模板分类",
|
||||||
@@ -646,11 +635,11 @@ export default {
|
|||||||
"sourceBelongId": state.projectInfo.sourceBelongId,
|
"sourceBelongId": state.projectInfo.sourceBelongId,
|
||||||
"level": state.projectInfo.level,
|
"level": state.projectInfo.level,
|
||||||
"systemId": state.projectInfo.systemId,
|
"systemId": state.projectInfo.systemId,
|
||||||
"boeFlag": state.projectInfo.boeFlag,
|
"boeFlag": state.projectInfo.boeFlag ? 1:0,
|
||||||
"courseSyncFlag": state.projectInfo.courseSyncFlag,
|
"courseSyncFlag": state.projectInfo.courseSyncFlag? 1:0,
|
||||||
"notice": "",
|
"notice": "",
|
||||||
"noticeFlag": 0,
|
"noticeFlag": 0,
|
||||||
"projectTemplateId": 0,
|
"projectTemplateId": store.state.projectTemplateId,
|
||||||
"remark": "",
|
"remark": "",
|
||||||
"status": 0,
|
"status": 0,
|
||||||
|
|
||||||
@@ -667,25 +656,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
api
|
api
|
||||||
.templateEdit({
|
.templateEdit(obj)
|
||||||
"beginTime": 0,
|
|
||||||
"boeFlag": 0,
|
|
||||||
"category": 0,
|
|
||||||
"courseSyncFlag": 0,
|
|
||||||
"endTime": 0,
|
|
||||||
"level": 0,
|
|
||||||
"manager": "",
|
|
||||||
"managerId": "",
|
|
||||||
"name": "",
|
|
||||||
"notice": "",
|
|
||||||
"noticeFlag": 0,
|
|
||||||
"picUrl": "",
|
|
||||||
"projectTemplateId": 0,
|
|
||||||
"remark": "",
|
|
||||||
"sourceBelongId": 0,
|
|
||||||
"status": 0,
|
|
||||||
"systemId": 0
|
|
||||||
})
|
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
if (res.status == 200 && res.data.code == 200) {
|
if (res.status == 200 && res.data.code == 200) {
|
||||||
@@ -708,35 +679,6 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
// 编辑项目模板
|
|
||||||
const editTemplate = () => {
|
|
||||||
let obj = {
|
|
||||||
"beginTime": state.projectInfo.time,
|
|
||||||
"boeFlag": state.projectInfo.boeFlag,
|
|
||||||
"category": 0,
|
|
||||||
"courseSyncFlag": state.projectInfo.courseSyncFlag,
|
|
||||||
"endTime": state.projectInfo.time,
|
|
||||||
"level": state.projectInfo.level,
|
|
||||||
"manager": state.projectInfo.manager,
|
|
||||||
"managerId": "",
|
|
||||||
"name": state.projectInfo.name,
|
|
||||||
"notice": "",
|
|
||||||
"noticeFlag": 0,
|
|
||||||
"picUrl": "",
|
|
||||||
"projectTemplateId": 0,
|
|
||||||
"remark": state.projectInfo.remark,
|
|
||||||
"sourceBelongId": state.projectInfo.sourceBelongId,
|
|
||||||
"status": 0,
|
|
||||||
"systemId": state.projectInfo.systemId
|
|
||||||
};
|
|
||||||
api.templateEdit(obj).methods(obj).then(res => {
|
|
||||||
message.success("编辑成功")
|
|
||||||
console.log(res)
|
|
||||||
}).catch(err => {
|
|
||||||
message.error("编辑失败"+err)
|
|
||||||
console.log(err)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
@@ -766,8 +708,6 @@ export default {
|
|||||||
isEdit,
|
isEdit,
|
||||||
backPage,
|
backPage,
|
||||||
dateFormatList,
|
dateFormatList,
|
||||||
editTemplate,
|
|
||||||
templateScroll,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,762 +0,0 @@
|
|||||||
<!-- 评估管理-创建评估页面 -->
|
|
||||||
<template>
|
|
||||||
<div class="researchadd">
|
|
||||||
<div class="header">
|
|
||||||
<span class="title">创建评估</span>
|
|
||||||
<router-link to="/researchmanage" class="goback">
|
|
||||||
<span class="return"></span>
|
|
||||||
<router-link class="returntext" to="/researchmanage">
|
|
||||||
返回
|
|
||||||
</router-link>
|
|
||||||
</router-link>
|
|
||||||
</div>
|
|
||||||
<div class="addtype">
|
|
||||||
<div class="addtypen">创建评估类型</div>
|
|
||||||
<div class="types" @click="handleTypes(1)">单选题</div>
|
|
||||||
<div class="types" @click="handleTypes(2)">多选题</div>
|
|
||||||
<div class="types" @click="handleTypes(3)">问答题</div>
|
|
||||||
<div class="types" @click="handleTypes(4)">评分题</div>
|
|
||||||
</div>
|
|
||||||
<div v-for="(item, index) in allFormsData" :key="index">
|
|
||||||
<ResearchAddSingle v-if="item.type === 1" :item="item" @del="handleDel" />
|
|
||||||
<ResearchAddMulti v-if="item.type === 2" :item="item" @del="handleDel" />
|
|
||||||
<ResearchAddAsk v-if="item.type === 3" :item="item" @del="handleDel" />
|
|
||||||
<ResearchAddPin v-if="item.type === 4" :item="item" @del="handleDel" />
|
|
||||||
</div>
|
|
||||||
<div class="opinion name2">
|
|
||||||
<div class="namebox">
|
|
||||||
<div class="inname" style="margin-top: 13px">您的其他意见</div>
|
|
||||||
</div>
|
|
||||||
<div class="in">
|
|
||||||
<a-textarea
|
|
||||||
v-model:value="valueMore"
|
|
||||||
style="height: 110px"
|
|
||||||
show-count
|
|
||||||
:maxlength="200"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="footer">
|
|
||||||
<div class="btn">
|
|
||||||
<a-button
|
|
||||||
type="primary"
|
|
||||||
style="
|
|
||||||
width: 100px;
|
|
||||||
height: 40px;
|
|
||||||
border-radius: 8px;
|
|
||||||
background-color: #409eff;
|
|
||||||
"
|
|
||||||
@click="handleSave"
|
|
||||||
>
|
|
||||||
保存
|
|
||||||
</a-button>
|
|
||||||
<a-button
|
|
||||||
type="primary"
|
|
||||||
ghost
|
|
||||||
style="
|
|
||||||
width: 100px;
|
|
||||||
height: 40px;
|
|
||||||
margin-left: 14px;
|
|
||||||
border-radius: 8px;
|
|
||||||
"
|
|
||||||
@click="handleAllCancel"
|
|
||||||
>
|
|
||||||
取消
|
|
||||||
</a-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import { reactive, toRefs, computed } from "vue";
|
|
||||||
// import { message } from "ant-design-vue";
|
|
||||||
// import { createResearch } from "../../api/indexResearch";
|
|
||||||
import ResearchAddSingle from "./components/ResearchAddSingle.vue";
|
|
||||||
import ResearchAddMulti from "./components/ResearchAddMulti.vue";
|
|
||||||
import ResearchAddAsk from "./components/ResearchAddAsk.vue";
|
|
||||||
import ResearchAddPin from "./components/ResearchAddPin.vue";
|
|
||||||
import { sortBy, traverseArr, filterCommon } from "../../utils/utils";
|
|
||||||
import {
|
|
||||||
queryResearchDetailById,
|
|
||||||
editResearchMessage,
|
|
||||||
createResearch,
|
|
||||||
} from "@/api/indexResearch";
|
|
||||||
import { useRouter } from "vue-router";
|
|
||||||
import store from "@/store";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "ResearchAdd",
|
|
||||||
components: {
|
|
||||||
ResearchAddSingle,
|
|
||||||
ResearchAddMulti,
|
|
||||||
ResearchAddAsk,
|
|
||||||
ResearchAddPin,
|
|
||||||
},
|
|
||||||
setup() {
|
|
||||||
const router = useRouter();
|
|
||||||
const state = reactive({
|
|
||||||
assessmentId: "", //编辑时候传
|
|
||||||
assessmentName: "",
|
|
||||||
assessmentNameNew: computed(() => store.state.assessmentName),
|
|
||||||
|
|
||||||
allFormsData: [],
|
|
||||||
valueMore: "",
|
|
||||||
});
|
|
||||||
|
|
||||||
const getInfoDate = async () => {
|
|
||||||
let id = router.currentRoute.value.params.id;
|
|
||||||
if (id) {
|
|
||||||
state.assessmentId = id;
|
|
||||||
let renderArr = [];
|
|
||||||
let res = await queryResearchDetailById({
|
|
||||||
assessmentId: state.assessmentId,
|
|
||||||
});
|
|
||||||
console.log("res1111111111");
|
|
||||||
console.log(res);
|
|
||||||
state.assessmentName = res.assessmentName;
|
|
||||||
state.valueMore = res.assessmentMark;
|
|
||||||
renderArr.concat(
|
|
||||||
res.singleStemVoList,
|
|
||||||
res.multipleStemVoList,
|
|
||||||
res.essayQuestionVoList,
|
|
||||||
res.scoringQuestionVoList
|
|
||||||
);
|
|
||||||
sortBy(renderArr, "orderNumber"); //序号
|
|
||||||
console.log("renderArr");
|
|
||||||
console.log(renderArr);
|
|
||||||
this.allFormsData = parseData(renderArr, "questionType"); //类型
|
|
||||||
console.log("this.allFormsData");
|
|
||||||
console.log(this.allFormsData);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
getInfoDate();
|
|
||||||
|
|
||||||
// 转换成前端格式
|
|
||||||
const parseData = (arr, typeKey) => {
|
|
||||||
console.log(arr);
|
|
||||||
console.log(typeKey);
|
|
||||||
const resultArr = [];
|
|
||||||
arr.forEach((item) => {
|
|
||||||
let obj = {};
|
|
||||||
if (item[typeKey] === 1) {
|
|
||||||
let restList = traverseArr(item.assessmentSingleChoiceVoList, {
|
|
||||||
inputVal: "singleOptionName",
|
|
||||||
imgVal: "singleOptionPictureAddress",
|
|
||||||
}).map((itm, idx) => {
|
|
||||||
itm.id = idx + 1;
|
|
||||||
return itm;
|
|
||||||
});
|
|
||||||
|
|
||||||
obj = {
|
|
||||||
type: item[typeKey],
|
|
||||||
valueSingle: item.singleStemName,
|
|
||||||
singleList: restList,
|
|
||||||
};
|
|
||||||
resultArr.push(obj);
|
|
||||||
}
|
|
||||||
if (item[typeKey] === 2) {
|
|
||||||
let restList = traverseArr(item.multipleChoiceVoList, {
|
|
||||||
inputVal: "multipleOptionName",
|
|
||||||
imgVal: "multipleOptionPictureAddress",
|
|
||||||
}).map((itm, idx) => {
|
|
||||||
itm.id = idx + 1;
|
|
||||||
return itm;
|
|
||||||
});
|
|
||||||
|
|
||||||
obj = {
|
|
||||||
type: item[typeKey],
|
|
||||||
valueMutil: item.multipleStemName,
|
|
||||||
mutilList: restList,
|
|
||||||
};
|
|
||||||
resultArr.push(obj);
|
|
||||||
}
|
|
||||||
if (item[typeKey] === 3) {
|
|
||||||
obj = {
|
|
||||||
type: item[typeKey],
|
|
||||||
valueAsk: item.assessmentQaTitle,
|
|
||||||
valueAskDesc: item.assessmentQaDescribe,
|
|
||||||
};
|
|
||||||
resultArr.push(obj);
|
|
||||||
}
|
|
||||||
if (item[typeKey] === 4) {
|
|
||||||
obj = {
|
|
||||||
type: item[typeKey],
|
|
||||||
valuePin: item.assessmentScTitle,
|
|
||||||
minScore: item.assessmentScore, //?
|
|
||||||
maxScore: item.assessmentScore, //?
|
|
||||||
pinQuan: item.weightScale,
|
|
||||||
};
|
|
||||||
resultArr.push(obj);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
resultArr.map((itm, idx) => {
|
|
||||||
itm.id = idx + 1;
|
|
||||||
return itm;
|
|
||||||
});
|
|
||||||
console.log(resultArr);
|
|
||||||
return resultArr;
|
|
||||||
};
|
|
||||||
// 转换成后端格式
|
|
||||||
const restData = (arr, typeKey) => {
|
|
||||||
console.log("转换成后端格式");
|
|
||||||
console.log(arr);
|
|
||||||
console.log(typeKey);
|
|
||||||
const resultArr = [];
|
|
||||||
arr.forEach((item) => {
|
|
||||||
let obj = {};
|
|
||||||
if (item[typeKey] === 1) {
|
|
||||||
console.log(11111111111);
|
|
||||||
let restList = traverseArr(item.singleList, {
|
|
||||||
singleOptionName: "inputVal",
|
|
||||||
singleOptionPictureAddress: "imgVal",
|
|
||||||
}).map((itm, idx) => {
|
|
||||||
itm.optionOrderNum = idx + 1;
|
|
||||||
return itm;
|
|
||||||
});
|
|
||||||
console.log(restList);
|
|
||||||
|
|
||||||
obj = {
|
|
||||||
questionType: item[typeKey],
|
|
||||||
singleStemName: item.valueSingle,
|
|
||||||
singleList: restList,
|
|
||||||
};
|
|
||||||
resultArr.push(obj);
|
|
||||||
}
|
|
||||||
if (item[typeKey] === 2) {
|
|
||||||
let restList = traverseArr(item.mutilList, {
|
|
||||||
multipleOptionName: "inputVal",
|
|
||||||
multipleOptionPictureAddress: "imgVal",
|
|
||||||
}).map((itm, idx) => {
|
|
||||||
itm.optionOrderNum = idx + 1;
|
|
||||||
return itm;
|
|
||||||
});
|
|
||||||
|
|
||||||
obj = {
|
|
||||||
questionType: item[typeKey],
|
|
||||||
multipleStemName: item.valueMutil,
|
|
||||||
mutilList: restList,
|
|
||||||
};
|
|
||||||
resultArr.push(obj);
|
|
||||||
}
|
|
||||||
if (item[typeKey] === 3) {
|
|
||||||
obj = {
|
|
||||||
questionType: item[typeKey],
|
|
||||||
assessmentQaTitle: item.valueAsk,
|
|
||||||
assessmentQaDescribe: item.valueAskDesc,
|
|
||||||
};
|
|
||||||
resultArr.push(obj);
|
|
||||||
}
|
|
||||||
if (item[typeKey] === 4) {
|
|
||||||
obj = {
|
|
||||||
questionType: item[typeKey],
|
|
||||||
assessmentScTitle: item.valuePin,
|
|
||||||
assessmentScore: item.minScore, //?
|
|
||||||
assessmentScore1: item.maxScore, //?
|
|
||||||
weightScale: item.pinQuan,
|
|
||||||
};
|
|
||||||
resultArr.push(obj);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
resultArr.map((itm, idx) => {
|
|
||||||
itm.orderNumber = idx + 1;
|
|
||||||
return itm;
|
|
||||||
});
|
|
||||||
console.log(resultArr);
|
|
||||||
return resultArr;
|
|
||||||
};
|
|
||||||
// 解散传值
|
|
||||||
const parseItem = (arr) => {
|
|
||||||
console.log(676767);
|
|
||||||
console.log(arr);
|
|
||||||
const filterComObj = filterCommon(arr, "questionType");
|
|
||||||
console.log("filterComObj");
|
|
||||||
console.log(filterComObj);
|
|
||||||
let resultObj = {};
|
|
||||||
for (let key in filterComObj) {
|
|
||||||
console.log("key");
|
|
||||||
console.log(key);
|
|
||||||
if (key === "1") {
|
|
||||||
let arrSingle = filterComObj[key];
|
|
||||||
console.log(arrSingle);
|
|
||||||
let arr = [];
|
|
||||||
arrSingle.forEach((item) => {
|
|
||||||
if (item.singleList.length) {
|
|
||||||
item.singleList.forEach((itm) => {
|
|
||||||
arr.push({
|
|
||||||
...itm,
|
|
||||||
singleStemName: item.singleStemName,
|
|
||||||
orderNumber: item.orderNumber,
|
|
||||||
questionType: item.questionType,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
resultObj.assessmentSingleChoiceDtoList = arr;
|
|
||||||
}
|
|
||||||
if (key === "2") {
|
|
||||||
let arrMulti = filterComObj[key];
|
|
||||||
let arr = [];
|
|
||||||
arrMulti.forEach((item) => {
|
|
||||||
if (item.mutilList.length) {
|
|
||||||
item.mutilList.forEach((itm) => {
|
|
||||||
arr.push({
|
|
||||||
...itm,
|
|
||||||
multipleStemName: item.multipleStemName,
|
|
||||||
orderNumber: item.orderNumber,
|
|
||||||
questionType: item.questionType,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
resultObj.assessmentMultipleChoiceDtoList = arr;
|
|
||||||
}
|
|
||||||
if (key === "3") {
|
|
||||||
resultObj.assessmentEssayQuestionDtoList = filterComObj[key];
|
|
||||||
}
|
|
||||||
if (key === "4") {
|
|
||||||
resultObj.assessmentScoringQuestionDtoList = filterComObj[key];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
console.log("resultObj");
|
|
||||||
console.log(resultObj);
|
|
||||||
return resultObj;
|
|
||||||
};
|
|
||||||
const creatFromData = (type) => {
|
|
||||||
let obj = {};
|
|
||||||
switch (type) {
|
|
||||||
case 1:
|
|
||||||
obj = {
|
|
||||||
type,
|
|
||||||
id: state.allFormsData.length,
|
|
||||||
valueSingle: "",
|
|
||||||
singleList: [
|
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
inputVal: "",
|
|
||||||
imgVal: "",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
obj = {
|
|
||||||
type,
|
|
||||||
id: state.allFormsData.length,
|
|
||||||
valueMutil: "",
|
|
||||||
mutilList: [
|
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
inputVal: "",
|
|
||||||
imgVal: "",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
obj = {
|
|
||||||
type,
|
|
||||||
id: state.allFormsData.length,
|
|
||||||
valueAsk: "",
|
|
||||||
valueAskDesc: "",
|
|
||||||
};
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
obj = {
|
|
||||||
type,
|
|
||||||
id: state.allFormsData.length,
|
|
||||||
valuePin: "",
|
|
||||||
minScore: 1,
|
|
||||||
maxScore: 10,
|
|
||||||
pinQuan: 100,
|
|
||||||
};
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return obj;
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleTypes = (type) => {
|
|
||||||
state.allFormsData.push(creatFromData(type));
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleDel = ({ id }) => {
|
|
||||||
state.allFormsData.forEach((item, index) => {
|
|
||||||
if (item.id === id) {
|
|
||||||
state.allFormsData.splice(index, 1);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
state.allFormsData.map((item, index) => {
|
|
||||||
item.id = index + 1;
|
|
||||||
return item;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleSave = () => {
|
|
||||||
let resultPost = {};
|
|
||||||
let filterData = parseItem(restData(state.allFormsData, "type"));
|
|
||||||
console.log(777);
|
|
||||||
console.log(filterData);
|
|
||||||
console.log(state.allFormsData);
|
|
||||||
console.log("当前权重设置是百分制 请重新配置");
|
|
||||||
|
|
||||||
if (state.assessmentId) {
|
|
||||||
resultPost = {
|
|
||||||
assessmentId: state.assessmentId,
|
|
||||||
assessmentName: state.assessmentName
|
|
||||||
? state.assessmentName
|
|
||||||
: "编辑测试",
|
|
||||||
assessmentMark: state.assessmentMark,
|
|
||||||
...filterData,
|
|
||||||
};
|
|
||||||
console.log("resultPost2222222222");
|
|
||||||
console.log(resultPost);
|
|
||||||
editResearchMessage(resultPost).then((res) => {
|
|
||||||
console.log(res);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
resultPost = {
|
|
||||||
assessmentName: state.assessmentNameNew,
|
|
||||||
assessmentMark: state.assessmentMark,
|
|
||||||
...filterData,
|
|
||||||
};
|
|
||||||
console.log("resultPost111111");
|
|
||||||
console.log(resultPost);
|
|
||||||
createResearch(resultPost).then((res) => {
|
|
||||||
console.log(res);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const handleAllCancel = () => {
|
|
||||||
state.allFormsData = [];
|
|
||||||
};
|
|
||||||
|
|
||||||
return {
|
|
||||||
...toRefs(state),
|
|
||||||
handleTypes,
|
|
||||||
handleSave,
|
|
||||||
handleAllCancel,
|
|
||||||
handleDel,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style lang="scss">
|
|
||||||
.researchadd {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
.header {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
.title {
|
|
||||||
color: #000000;
|
|
||||||
font-size: 18px;
|
|
||||||
//line-height: 36px;
|
|
||||||
padding-top: 30px;
|
|
||||||
padding-left: 37px;
|
|
||||||
//font-weight: 500;
|
|
||||||
}
|
|
||||||
.goback {
|
|
||||||
padding-right: 70px;
|
|
||||||
//padding-top: 37px;
|
|
||||||
position: relative;
|
|
||||||
.return {
|
|
||||||
display: inline-block;
|
|
||||||
width: 42px;
|
|
||||||
height: 42px;
|
|
||||||
margin-top: 17px;
|
|
||||||
margin-right: 10px;
|
|
||||||
background-image: url("../../assets/images/projectadd/return.png");
|
|
||||||
}
|
|
||||||
.returntext {
|
|
||||||
display: inline-block;
|
|
||||||
position: absolute;
|
|
||||||
top: 27px;
|
|
||||||
color: #4ea6ff;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.addtype {
|
|
||||||
display: flex;
|
|
||||||
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
|
||||||
margin-right: 20px;
|
|
||||||
align-items: center;
|
|
||||||
margin-left: 41px;
|
|
||||||
.addtypen {
|
|
||||||
color: #6f6f6f;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
.types {
|
|
||||||
cursor: pointer;
|
|
||||||
width: 80px;
|
|
||||||
height: 40px;
|
|
||||||
color: #409eff;
|
|
||||||
border: 1px solid #409eff;
|
|
||||||
border-radius: 4px;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
margin: 20px 10px;
|
|
||||||
}
|
|
||||||
.typesCur {
|
|
||||||
color: #fff;
|
|
||||||
background: #409eff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.content {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
||||||
width: 70%;
|
|
||||||
min-width: 690px;
|
|
||||||
margin-left: 38px;
|
|
||||||
margin-top: 20px;
|
|
||||||
.tagbox {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
.tagname {
|
|
||||||
width: 90px;
|
|
||||||
height: 32px;
|
|
||||||
margin-top: 24px;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
margin-left: 134px;
|
|
||||||
background: rgba(78, 166, 255, 0.1);
|
|
||||||
border-radius: 4px;
|
|
||||||
color: rgba(64, 158, 255, 1);
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
.deleteop {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
width: 100px;
|
|
||||||
height: 40px;
|
|
||||||
margin-top: 20px;
|
|
||||||
margin-right: 30px;
|
|
||||||
border: 1px solid #409eff;
|
|
||||||
border-radius: 8px;
|
|
||||||
cursor: pointer;
|
|
||||||
.del_text {
|
|
||||||
color: #409eff;
|
|
||||||
font-size: 14px;
|
|
||||||
margin-left: 5px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.scorebox {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
margin-top: 20px;
|
|
||||||
margin-left: 70px;
|
|
||||||
.scoretext {
|
|
||||||
font-size: 14px;
|
|
||||||
color: #56a3f9;
|
|
||||||
}
|
|
||||||
.number {
|
|
||||||
display: flex;
|
|
||||||
border: 1px solid #d7e5fd;
|
|
||||||
border-radius: 5px;
|
|
||||||
margin: 0 10px;
|
|
||||||
padding: 5px;
|
|
||||||
.btn {
|
|
||||||
width: 40px;
|
|
||||||
height: 40px;
|
|
||||||
border: 1px solid #56a3f9;
|
|
||||||
border-radius: 8px;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
margin: 5px;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #56a3f9;
|
|
||||||
line-height: 24px;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.curBtn {
|
|
||||||
background: #56a3f9;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.picture {
|
|
||||||
width: 100px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
margin-top: 20px;
|
|
||||||
margin-left: 133px;
|
|
||||||
.pictureimg {
|
|
||||||
width: 100px;
|
|
||||||
height: 100px;
|
|
||||||
}
|
|
||||||
.picturename {
|
|
||||||
color: #6f6f6f;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.options {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
.delete {
|
|
||||||
cursor: pointer;
|
|
||||||
margin-top: 32px;
|
|
||||||
margin-left: 20px;
|
|
||||||
// float: right;
|
|
||||||
color: #4ea6ff;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
.name2 {
|
|
||||||
display: flex;
|
|
||||||
align-items: flex-start;
|
|
||||||
}
|
|
||||||
.name {
|
|
||||||
width: 60%;
|
|
||||||
// background-color: lightcoral;
|
|
||||||
display: flex;
|
|
||||||
margin-top: 20px;
|
|
||||||
//align-items: center;
|
|
||||||
//height: 40px;
|
|
||||||
// border: 1px solid black;
|
|
||||||
.namebox {
|
|
||||||
width: 120px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: flex-end;
|
|
||||||
flex-shrink: 0;
|
|
||||||
.nameimg {
|
|
||||||
width: 10px;
|
|
||||||
height: 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.inname {
|
|
||||||
color: #6f6f6f;
|
|
||||||
font-size: 14px;
|
|
||||||
margin-left: 7px;
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
.in {
|
|
||||||
margin-left: 14px;
|
|
||||||
flex: 1;
|
|
||||||
.assess {
|
|
||||||
display: flex;
|
|
||||||
width: 226px;
|
|
||||||
height: 40px;
|
|
||||||
border: 1px solid #56a3f9;
|
|
||||||
//margin-bottom: 20px;
|
|
||||||
.assesstype {
|
|
||||||
width: 50%;
|
|
||||||
background: #56a3f9;
|
|
||||||
color: #ffffff;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
.assesswhole {
|
|
||||||
width: 50%;
|
|
||||||
background: rgba(86, 163, 249, 0.1);
|
|
||||||
font-size: 14px;
|
|
||||||
color: #6f6f6f;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
.ratio {
|
|
||||||
position: absolute;
|
|
||||||
right: 10px;
|
|
||||||
top: 8px;
|
|
||||||
color: #6f6f6f;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.addimg {
|
|
||||||
cursor: pointer;
|
|
||||||
color: rgba(78, 166, 255, 1);
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
.text {
|
|
||||||
color: rgba(109, 117, 132, 1);
|
|
||||||
font-size: 14px;
|
|
||||||
//line-height: 24px;
|
|
||||||
}
|
|
||||||
.ant-radio-wrapper {
|
|
||||||
}
|
|
||||||
.ant-input {
|
|
||||||
border-radius: 5px;
|
|
||||||
// height: 120%;
|
|
||||||
width: 100%;
|
|
||||||
height: 35px;
|
|
||||||
}
|
|
||||||
.ant-select-selector {
|
|
||||||
border-radius: 5px;
|
|
||||||
// height: 120%;
|
|
||||||
width: 100%;
|
|
||||||
height: 40px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.numberInp {
|
|
||||||
width: 200px;
|
|
||||||
.ant-input-number {
|
|
||||||
width: 200px;
|
|
||||||
height: 40px;
|
|
||||||
border-radius: 8px;
|
|
||||||
}
|
|
||||||
// .ant-input-number-input-wrap {
|
|
||||||
// width: 200px;
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.name2 {
|
|
||||||
display: flex;
|
|
||||||
align-items: flex-start;
|
|
||||||
}
|
|
||||||
.opinion {
|
|
||||||
display: flex;
|
|
||||||
margin-top: 30px;
|
|
||||||
.namebox {
|
|
||||||
width: 120px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: flex-end;
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
.in {
|
|
||||||
margin-left: 14px;
|
|
||||||
width: 500px;
|
|
||||||
.ant-input-textarea-show-count {
|
|
||||||
position: relative;
|
|
||||||
height: 110px;
|
|
||||||
}
|
|
||||||
.ant-input-textarea-show-count::after {
|
|
||||||
position: absolute;
|
|
||||||
right: 10px;
|
|
||||||
bottom: 0px;
|
|
||||||
}
|
|
||||||
.ant-input {
|
|
||||||
border-radius: 8px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.footer {
|
|
||||||
width: 100%;
|
|
||||||
margin-top: 31px;
|
|
||||||
margin-bottom: 14px;
|
|
||||||
.btn {
|
|
||||||
display: flex;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
justify-content: center;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.uploadContent {
|
|
||||||
display: block !important;
|
|
||||||
.uploadBtn {
|
|
||||||
margin-left: 120px !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
Reference in New Issue
Block a user