feat:合并

This commit is contained in:
李晓鸽
2022-11-01 16:39:11 +08:00
23 changed files with 18249 additions and 6734 deletions

11384
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -38,34 +38,10 @@ import http from "./config";
// 接口-请求 // 接口-请求
// 创建编辑单层项目 // 创建编辑单层项目
export const createProject = (obj) => http.post('/admin/project/edit', { export const createProject = (obj) => http.post('/admin/project/edit', obj)
"attach": obj.attach,
"beginTime": obj.beginTime,
"boeFlag": obj.boeFlag,
"category": obj.category,
"courseSyncFlag": obj.courseSyncFlag,
"endTime": obj.endTime,
"level": obj.level,
"manager": obj.manager,
"managerId": obj.managerId,
"name": obj.name,
"notice": obj.notice,
"noticeFlag": obj.noticeFlag,
"picUrl": obj.picUrl,
"remark": obj.remark,
"sourceBelongId": obj.sourceBelongId,
"status": obj.status,
"systemId": obj.systemId,
"templateId": obj.templateId,
"type": obj.type
})
// 创建多层项目 // 创建多层项目
export const createStoreyProject = () => http.post('/admin/project/edit', { export const createStoreyProject = (obj) => http.post('/admin/project/edit', obj)
})
// 获取项目列表 // 获取项目列表
export const getProjectList = () => http.post('/admin/project/list', { export const getProjectList = (obj) => http.post('/admin/project/list', obj)
})

14
src/api/indexExam.js Normal file
View File

@@ -0,0 +1,14 @@
import http from "./config";
// 创建考试信息接口
export const createExamination = (obj) => http.post('/examination/createExamination',obj,{
headers: {
'token': '123'
}
});
// 根据Id删除考试信息
export const deleteExaminationById = (obj) => http.post('/examination/deleteExaminationById',obj);
// 根据ID获取考试信息详情
export const queryExaminationDetailById = (obj) => http.post('/examination/queryExaminationDetailById',obj);
// 创建考试信息接口
export const updateExamination = (obj) => http.post('/examination/updateExamination',obj);

View File

@@ -0,0 +1,19 @@
import http from "./config";
//创建外链接口
export const createExternalChain = (obj) => http.post('/link/createLinks', obj)
//外链信息删除接口
export const deleteLink = (obj) => http.post('/link/deleteLink', { params: obj })
//获取外链详细信息接口
export const getLink = (obj) => http.post('/link/getOne', { params: obj })
// 更新外链数据
export const updateLinks = (obj) => http.post('/link/updateLinks', obj)
//修改为必修的接口
export const updateToCompulsory = (obj) => http.post('/link/updateToCompulsory', { params: obj })
//修改为选修的接口
export const updateToElective = (obj) => http.post('/link/updateToElective', { params: obj })

8
src/api/indexTaskadd.js Normal file
View File

@@ -0,0 +1,8 @@
import http from "./config";
//获取任务列表
export const getTask = (obj) => http.get('/admin/project/detail', { params: obj }, {
headers: {
'token': '123'
}
})

14
src/api/indexWork.js Normal file
View File

@@ -0,0 +1,14 @@
import http from "./config";
// 创建作业信息接口
export const createWorkTask = (obj) => http.post('/work/createWorkTask',obj,{
headers: {
'token': '123'
}
});
// 删除作业信息接口
export const deleteWorkTask = (obj) => http.post('/work/deleteWorkTask',obj);
// 根据ID获取作业信息详情
export const queryWorkDetailById = (obj) => http.post('/work/queryWorkDetailById',obj);
// 修改作业信息接口
export const updateWorkTaskUsing = (obj) => http.post('/work/updateWorkTask',obj);

View File

@@ -120,7 +120,7 @@
<a-input <a-input
v-model:value="inputV3" v-model:value="inputV3"
style="width: 424px; height: 32px" style="width: 424px; height: 32px"
placeholder="请输入授课老师" placeholder="请输入活动地址"
/> />
</div> </div>
</div> </div>
@@ -145,7 +145,7 @@
border-radius: 8px; border-radius: 8px;
overflow: hidden; overflow: hidden;
" "
:v-model:value="inputV4" v-model:value="inputV4"
/> />
<span style="color: #999999; margin-left: 8px">分钟</span> <span style="color: #999999; margin-left: 8px">分钟</span>
</div> </div>
@@ -161,7 +161,7 @@
border-radius: 8px; border-radius: 8px;
overflow: hidden; overflow: hidden;
" "
:v-model:value="inputV5" v-model:value="inputV5"
/> />
<span style="color: #999999; margin-left: 8px">分钟</span> <span style="color: #999999; margin-left: 8px">分钟</span>
</div> </div>
@@ -182,7 +182,7 @@
border-radius: 8px; border-radius: 8px;
overflow: hidden; overflow: hidden;
" "
:v-model:value="inputV6" v-model:value="inputV6"
/> />
<span style="color: #999999; margin-left: 8px" <span style="color: #999999; margin-left: 8px"
>分钟提前签退则记为早退</span >分钟提前签退则记为早退</span
@@ -209,7 +209,7 @@
</div> </div>
</div> </div>
<div class="main_btns"> <div class="main_btns">
<button class="btn1">取消</button> <button class="btn1" @click="closeDrawer">取消</button>
<button class="btn2" @click="createActivity">确定</button> <button class="btn2" @click="createActivity">确定</button>
</div> </div>
</div> </div>
@@ -217,8 +217,9 @@
</template> </template>
<script> <script>
import { reactive, toRefs, ref } from "vue"; import { reactive, toRefs, ref } from "vue";
import * as api from "../../api/activity"; import * as api from "../../api/indexActivity";
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
import { toDate } from "../../api/method.js";
const rowSelection = ref({ const rowSelection = ref({
checkStrictly: false, checkStrictly: false,
onChange: (selectedRowKeys, selectedRows) => { onChange: (selectedRowKeys, selectedRows) => {
@@ -261,6 +262,15 @@ export default {
const closeDrawer = () => { const closeDrawer = () => {
ctx.emit("update:addactiveVisible", false); ctx.emit("update:addactiveVisible", false);
state.radioV1 = ""; state.radioV1 = "";
state.inputV1 = "";
state.inputV2 = "";
state.inputV3 = "";
state.inputV4 = "";
state.inputV5 = "";
state.inputV6 = "";
state.textV1 = "";
state.textV2 = "";
state.time = "";
}; };
const afterVisibleChange = (bool) => { const afterVisibleChange = (bool) => {
console.log("state", bool); console.log("state", bool);
@@ -273,18 +283,21 @@ export default {
//创建活动 //创建活动
const createActivity = () => { const createActivity = () => {
if(!state.inputV1) return message.info("请输入活动名称"); if(!state.inputV1) return message.warning("请输入活动名称");
if(!state.inputV2) return message.info("请输入活动时长"); if(!state.inputV2) return message.warning("请输入活动时长");
if(!state.textV1) return message.info("请输入活动公告"); if(!state.textV1) return message.warning("请输入活动公告");
if(!state.inputV3) return message.info("请输入活动地址"); if(!state.inputV3) return message.warning("请输入活动地址");
let startTime = toDate(new Date(state.time[0].$d).getTime() / 1000, "Y-M-D");
let endTime = toDate(new Date(state.time[1].$d).getTime() / 1000, "Y-M-D");
let obj = { let obj = {
activityAddress: state.inputV3, //活动地址 activityAddress: state.inputV3, //活动地址
activityDuration: state.inputV2, //活动时长 activityDuration: state.inputV2, //活动时长
activityEndTime: "", //活动结束时间 activityExplain: state.textV2, //活动说明
activityEndTime: endTime, //活动结束时间
activityId: 0, //活动ID activityId: 0, //活动ID
activityName: state.inputV1, //活动名称 activityName: state.inputV1, //活动名称
activityNotice: state.textV1, //活动公告 activityNotice: state.textV1, //活动公告
activityStartTime: "", //活动开始时间 activityStartTime: startTime, //活动开始时间
activityTag: "", //活动逻辑删除标识 activityTag: "", //活动逻辑删除标识
afterSignIn: state.inputV5, //活动开始后多少分钟签到 afterSignIn: state.inputV5, //活动开始后多少分钟签到
beforeSignIn: state.inputV4, //活动开始前多少分钟签到 beforeSignIn: state.inputV4, //活动开始前多少分钟签到
@@ -301,6 +314,17 @@ export default {
setTimeout(() => { setTimeout(() => {
console.log("创建成功", res); console.log("创建成功", res);
message.success("创建成功"); message.success("创建成功");
state.radioV1 = "";
state.inputV1 = "";
state.inputV2 = "";
state.inputV3 = "";
state.inputV4 = "";
state.inputV5 = "";
state.inputV6 = "";
state.textV1 = "";
state.textV2 = "";
state.time = "";
ctx.emit("update:addactiveVisible", false);
}, 1000); }, 1000);
}) })
.catch((err) => { .catch((err) => {
@@ -341,6 +365,9 @@ export default {
.contentMain { .contentMain {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.ant-picker {
border-radius: 8px;
}
.main_left { .main_left {
padding-right: 30px; padding-right: 30px;
flex: 1; flex: 1;

View File

@@ -63,7 +63,7 @@
</div> </div>
</div> </div>
<div class="main_btns"> <div class="main_btns">
<button class="btn1">取消</button> <button class="btn1" @click="closeDrawer">取消</button>
<button class="btn2" @click="createDiscuss">确定</button> <button class="btn2" @click="createDiscuss">确定</button>
</div> </div>
</div> </div>
@@ -71,7 +71,7 @@
</template> </template>
<script> <script>
import { reactive, toRefs, ref } from "vue"; import { reactive, toRefs, ref } from "vue";
import * as api from "../../api/discuss"; import * as api from "../../api/indexDiscuss";
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
const rowSelection = ref({ const rowSelection = ref({
checkStrictly: false, checkStrictly: false,
@@ -109,7 +109,7 @@ export default {
const closeDrawer = () => { const closeDrawer = () => {
ctx.emit("update:adddiscussVisible", false); ctx.emit("update:adddiscussVisible", false);
state.inputV1 = ""; state.inputV1 = "";
state.textV2 = ""; state.textV1 = "";
}; };
const afterVisibleChange = (bool) => { const afterVisibleChange = (bool) => {
console.log("state", bool); console.log("state", bool);
@@ -117,7 +117,7 @@ export default {
//创建讨论 //创建讨论
const createDiscuss = () => { const createDiscuss = () => {
if(!state.inputV1) return message.info("请输入讨论名称"); if(!state.inputV1) return message.warning("请输入讨论名称");
let obj = { let obj = {
discussName: state.inputV1, //讨论名称 discussName: state.inputV1, //讨论名称
discussExplain: state.textV1, //讨论说明 discussExplain: state.textV1, //讨论说明
@@ -136,8 +136,12 @@ export default {
.then((res) => { .then((res) => {
setTimeout(() => { setTimeout(() => {
console.log("创建成功", res); console.log("创建成功", res);
state.inputV1 = "";
state.textV1 = "";
message.success("创建成功"); message.success("创建成功");
ctx.emit("update:adddiscussVisible", false);
}, 1000); }, 1000);
}) })
.catch((err) => { .catch((err) => {
console.log("创建失败", err); console.log("创建失败", err);

View File

@@ -63,8 +63,7 @@
<a-range-picker <a-range-picker
style="width: 424px" style="width: 424px"
v-model:value="time" v-model:value="time"
format="YYYY-MM-DD" format="YYYY-MM-DD HH:mm:ss"
@change="onChange"
:placeholder="[' 开始时间', ' 结束时间']" :placeholder="[' 开始时间', ' 结束时间']"
/> />
</div> </div>
@@ -76,7 +75,7 @@
<div class="textarea"> <div class="textarea">
<a-upload <a-upload
v-model:file-list="fileList" v-model:file-list="fileList"
name="avatar" name="file"
list-type="picture-card" list-type="picture-card"
class="avatar-uploader" class="avatar-uploader"
:show-upload-list="false" :show-upload-list="false"
@@ -107,30 +106,8 @@ import { reactive, toRefs, ref } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import * as api from "../../api/indexEval"; import * as api from "../../api/indexEval";
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
// import { toDate } from "../../api/method"; import { toDate } from "../../api/method";
import { toDate } from "../../api/method.js";
const router = useRouter(); const router = useRouter();
const rowSelection = ref({
checkStrictly: false,
onChange: (selectedRowKeys, selectedRows) => {
console.log(
`selectedRowKeys: ${selectedRowKeys}`,
"selectedRows: ",
selectedRows
);
},
onSelect: (record, selected, selectedRows) => {
console.log(record, selected, selectedRows);
},
onSelectAll: (selected, selectedRows, changeRows) => {
console.log(selected, selectedRows, changeRows);
},
});
function getBase64(img, callback) {
const reader = new FileReader();
reader.addEventListener("load", () => callback(reader.result));
reader.readAsDataURL(img);
}
export default { export default {
name: "AddEval", name: "AddEval",
// components: { // components: {
@@ -146,88 +123,115 @@ export default {
inputV1: "", inputV1: "",
inputV2: "", inputV2: "",
time: undefined, time: undefined,
endTime: undefined, endTimes : "",
startTime: undefined, startTimes: "",
picUrl: "",
tableData: [],
deletePathId: null, //删除路径id
editPathId: null, //修改路径id
currentPage: 1, //当前页
tableDataTotal: -1, //学习路径列表总数
pageSize: 10, //每页10条数据
}); });
const closeDrawer = () => { const closeDrawer = () => {
ctx.emit("update:addevalVisible", false); ctx.emit("update:addevalVisible", false);
state.inputV1 = ""; state.inputV1 = "";
state.inputV2 = ""; state.inputV2 = "";
state.time = undefined;
}; };
const afterVisibleChange = (bool) => { const afterVisibleChange = (bool) => {
console.log("state", bool); console.log("state", bool);
}; };
const onChange = () => {
console.log(
"state.time[0]",
toDate(new Date(state.time[0].$d).getTime() / 1000, "Y-M-D"),
state.time[1]
);
state.endTime = state.time[0].$d.toString;
state.startTime = state.time[1].$d.toString;
};
//上传组件 //上传组件
function getBase64(img, callback) {
const reader = new FileReader();
reader.addEventListener('load', () => callback(reader.result));
reader.readAsDataURL(img);
}
const fileList = ref([]); const fileList = ref([]);
const loading = ref(false); const loading = ref(false);
const imageUrl = ref(""); const imageUrl = ref("");
const handleChange = (info) => { const handleChange = (info) => {
if (info.file.status === "uploading") { if (info.file.status === 'uploading') {
loading.value = true; loading.value = true;
return; return;
} }
if (info.file.status === 'done') {
if (info.file.status === "done") { console.log('上传图片返回的信息 %o', info)
// Get this url from response in real world. state.picUrl = info.file.response.data;
getBase64(info.file.originFileObj, (base64Url) => { // Get this url from response in real world.
imageUrl.value = base64Url; getBase64(info.file.originFileObj, (base64Url) => {
imageUrl.value = base64Url;
loading.value = false; loading.value = false;
}); });
} }
if (info.file.status === 'error') {
if (info.file.status === "error") { loading.value = false;
loading.value = false; message.error('upload error');
message.error("upload error"); }
}
}; };
const beforeUpload = (file) => {
const isJpgOrPng =
file.type === "image/jpeg" || file.type === "image/png";
if (!isJpgOrPng) { const beforeUpload = (file) => {
message.error("You can only upload JPG file!"); const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
} if (!isJpgOrPng) {
message.error('You can only upload JPG file!');
}
const isLt2M = file.size / 1024 / 1024 < 1;
if (!isLt2M) {
message.error('Image must smaller than 1MB!');
}
return isJpgOrPng && isLt2M;
};
const isLt2M = file.size / 1024 / 1024 < 2; // const getTableDate = (tableData) => {
// let data = tableData;
// let array = [];
// data.map((value, index) => {
// let obj = {
// id: value.routerId,
// number: (state.currentPage - 1) * state.pageSize + index + 1,
// manager: value.name ? value.name : "-",
// state:
// value.status === 0
// ? "草稿"
// : value.status === 1
// ? "已发布"
// : value.status === -1
// ? "已停用"
// : "-",
// creater: value.createName ? value.createName : "-",
// pubtime: value.publishTime
// ? toDate(value.publishTime, "Y-M-D h:m:s")
// : "-",
// cretime: value.createTime
// ? toDate(value.createTime, "Y-M-D h:m:s")
// : "-",
// remark: value.remark ? value.remark : "-",
// };
// array.push(obj);
// });
// state.tableData = array;
// };
if (!isLt2M) {
message.error("Image must smaller than 2MB!");
}
return isJpgOrPng && isLt2M;
};
// const fileUp = () => {
// let obj = {
// file
// }
// }
//创建测评信息 //创建测评信息
const createEvalText = () => { const createEvalText = () => {
if (!state.inputV1) return message.info("请输入测评名称"); if (!state.inputV1) return message.info("请输入测评名称");
console.log(state.time); if ( state.time != undefined) {
console.log(state.time[0]); state.endTimes = toDate(new Date(state.time[0].$d).getTime() / 1000, "Y-M-D")
console.log(state.time[0].$d.toString); state.startTimes = toDate(new Date(state.time[1].$d).getTime() / 1000, "Y-M-D")
console.log(state.time[1].$d.toString); }
let obj = { let obj = {
evaluationName: state.inputV1, evaluationName: state.inputV1,
createTime: "", createTime: "",
createUser: 0, createUser: 0,
evaluationEndTime: state.endTime, evaluationEndTime: state.endTimes,
evaluationFlag: "", evaluationFlag: "",
evaluationId: "", evaluationId: "",
evaluationPictureAddress: "", evaluationPictureAddress: state.picUrl,
evaluationStartTime: state.startTime, evaluationStartTime: state.startTimes,
evaluationTag: "", evaluationTag: "",
evaluationTypeId: 0, evaluationTypeId: 0,
evaluationTypeName: "", evaluationTypeName: "",
@@ -240,7 +244,6 @@ export default {
setTimeout(() => { setTimeout(() => {
console.log("创建成功", res); console.log("创建成功", res);
message.success("创建成功"); message.success("创建成功");
console.log(obj);
// state.createLoading = false; // state.createLoading = false;
router.push("/leveladd"); router.push("/leveladd");
// getLearnPath(); // getLearnPath();
@@ -252,13 +255,103 @@ export default {
}); });
}; };
// //获取学习路径列表
// const getEvalPath = () => {
// let obj = {
// pageNo: state.currentPage,
// pageSize: state.pageSize,
// };
// api
// .queryEvaluationDetailById(obj)
// .then((res) => {
// if (res.status === 200) {
// console.log("获取任务列表数据", res.data.data);
// let arr = res.data.data.rows;
// if (
// arr.length === 0 &&
// res.data.data.total > 0 &&
// state.currentPage > 1
// ) {
// state.currentPage = state.currentPage - 1;
// getEvalPath();
// }
// getTableDate(arr);
// state.tableDataTotal = Number(res.data.data.total);
// }
// })
// .catch((err) => {
// console.log("获取学习路径失败", err);
// });
// };
// //翻页 需要去pa里绑定 @change="changePagination"
// const changePagination = (page) => {
// state.currentPage = page;
// getEvalPath();
// // console.log("翻页", page, pageSize);
// };
// //删除评估
// const deleteEvalPath = () => {
// let obj = {
// routerId: state.deletePathId,
// type: -2,
// };
// api
// .deleteEvaluationById(obj)
// .then((res) => {
// console.log("删除成功", res);
// message.success("删除成功");
// // state.deleteModal = false;
// getEvalPath();
// })
// .catch((err) => {
// console.log("删除失败", err);
// });
// };
// //编辑评估
// const editEvalPath = () => {
// if (!state.pathName) return message.info("请输入路径图名称");
// // if (!state.organizationSelectName) return message.info("请选择归属组织");
// // state.createLoading = true;
// let obj = {
// routerId: state.editPathId,
// name: state.pathName,
// picUrl: "",
// remark: state.pathIntro,
// status: 0,
// };
// api
// .updateEvaluation(obj)
// .then((res) => {
// setTimeout(() => {
// console.log("修改成功", res);
// message.success("修改成功");
// // state.createLoading = false;
// // state.currentPage = 1;
// // state.out1 = false;
// // router.push("/leveladd");
// getEvalPath();
// }, 1000);
// })
// .catch((err) => {
// console.log("修改失败", err);
// // state.createLoading = false;
// });
// };
// onMounted(() => {
// // console.log("执行");
// getEvalPath();
// });
return { return {
...toRefs(state), ...toRefs(state),
afterVisibleChange, afterVisibleChange,
closeDrawer, closeDrawer,
rowSelection, //增删改查
createEvalText, createEvalText,
onChange, // getEvalPath,
// changePagination,
// deleteEvalPath,
// editEvalPath,
//上传组件 //上传组件
fileList, fileList,
loading, loading,

View File

@@ -63,6 +63,7 @@
<div class="btnbox"> <div class="btnbox">
<a-range-picker <a-range-picker
style="width: 424px" style="width: 424px"
v-model:value="choosedTime"
:placeholder="[' 开始时间', ' 结束时间']" :placeholder="[' 开始时间', ' 结束时间']"
/> />
</div> </div>
@@ -78,7 +79,15 @@
<span style="margin-right: 3px">附件</span> <span style="margin-right: 3px">附件</span>
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-upload
v-model:file-list="fileList"
name="file"
action="/api/file/upload"
:headers="headers"
@change="handleChange"
>
<button class="xkbtn">上传附件</button> <button class="xkbtn">上传附件</button>
</a-upload>
</div> </div>
</div> </div>
<div class="main_item" style="margin-top:-25px;"> <div class="main_item" style="margin-top:-25px;">
@@ -91,14 +100,18 @@
</div> </div>
</div> </div>
<div class="main_btns"> <div class="main_btns">
<button class="btn1">取消</button> <button class="btn1" @click="closeDrawer">取消</button>
<button class="btn2">确定</button> <button class="btn2" @click="addHomework">确定</button>
</div> </div>
</div> </div>
</a-drawer> </a-drawer>
</template> </template>
<script> <script>
import { reactive, toRefs, ref } from "vue"; import { reactive, toRefs, ref } from "vue";
import {message} from"ant-design-vue";
import {createWorkTask} from "@/api/indexWork"
import dayjs from 'dayjs';
const rowSelection = ref({ const rowSelection = ref({
checkStrictly: false, checkStrictly: false,
onChange: (selectedRowKeys, selectedRows) => { onChange: (selectedRowKeys, selectedRows) => {
@@ -129,18 +142,65 @@ export default {
const state = reactive({ const state = reactive({
inputV1: "", inputV1: "",
textV1:"", textV1:"",
choosedTime:[],
}); });
const handleChange = info => {
if (info.file.status !== 'uploading') {
console.log(info.file, info.fileList);
}
if (info.file.status === 'done') {
message.success(`${info.file.name} 文件上传成功`);
} else if (info.file.status === 'error') {
message.error(`${info.file.name} 文件上传失败.`);
}
};
const fileList = ref([]);
const closeDrawer = () => { const closeDrawer = () => {
ctx.emit("update:addhomeworkVisible", false); ctx.emit("update:addhomeworkVisible", false);
}; };
const afterVisibleChange = (bool) => { const afterVisibleChange = (bool) => {
console.log("state", bool); console.log("state", bool);
}; };
const addHomework = () => {
if(state.choosedTime.length && state.inputV1 && state.textV1){
createWorkTask({
"createTime": "",
"createUser": 0,
"submitEndTime": dayjs(state.choosedTime[1]).format("YYYY-MM-DD"),
"submitStartTime": dayjs(state.choosedTime[0]).format("YYYY-MM-DD"),
"updateTime": "",
"updateUser": 0,
"workEnclosureAddress": "",
"workFlag": "",
"workId": 0,
"workName": state.inputV1,
"workRequirement": state.textV1,
"workTag": ""
}).then((res)=>{
message.success(`添加成功${res}`)
ctx.emit("update:addhomeworkVisible", false);
}).catch((err)=>{
message.error(`添加失败${err}`)
})
}
else{
message.error(`字段不能为空`)
return 0
}
}
return { return {
...toRefs(state), ...toRefs(state),
afterVisibleChange, afterVisibleChange,
closeDrawer, closeDrawer,
rowSelection, rowSelection,
addHomework,
handleChange,
fileList,
headers: {
"token":"123"
},
}; };
}, },
}; };

View File

@@ -2,7 +2,7 @@
<a-drawer <a-drawer
:visible="addinvistVisible" :visible="addinvistVisible"
class="drawerStyle addinvistDrawer" class="drawerStyle addinvistDrawer"
width="80%" width="70%"
title="添加评估" title="添加评估"
placement="right" placement="right"
@after-visible-change="afterVisibleChange" @after-visible-change="afterVisibleChange"
@@ -19,68 +19,50 @@
<div class="contentMain"> <div class="contentMain">
<div class="main_left"> <div class="main_left">
<div class="main_item"> <div class="main_item">
<div class="signbox"> <div class="fi_input">
<div class="sign">
<img
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
</div>
<span style="margin-right: 3px">测评名称</span>
</div>
<div class="btnbox">
<a-input <a-input
v-model:value="inputV1" v-model:value="inputV1"
style="width: 424px; height: 32px" style="width: 424px; height: 40px"
placeholder="请输入评名称" placeholder="请输入评名称"
maxlength="20" maxlength="20"
/> />
</div> </div>
</div> <div class="btns">
<div class="main_item"> <div class="search"></div>
<div class="signbox"> <div class="btnText">搜索</div>
<div class="sign">
<img
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
</div>
<span style="margin-right: 3px">选择考试</span>
</div> </div>
<div class="btnbox"> <div class="btnsn">
<a-select <div class="search"></div>
dropdownClassName="dropdown-style" <div class="btnText">重置</div>
style="width: 424px"
placeholder="请输入考试名称"
:options="options1"
allowClear
showSearch
/>
</div>
</div>
<div class="main_item">
<div class="signbox">
<span style="margin-right: 3px">有效期</span>
</div>
<div class="btnbox">
<a-range-picker
style="width: 424px"
:placeholder="[' 开始时间', ' 结束时间']"
/>
</div> </div>
</div> </div>
<div class="main_item2"> <div class="main_item2">
<div class="signbox"> <a-table
<span style="margin-right: 3px">活动说明</span> style="border: 1px solid #f2f6fe"
</div> :columns="tableDataFunc()"
<div class="textarea"> :data-source="tableData"
<a-textarea :loading="tableDataTotal === -1 ? true : false"
v-model:value="textV1" expandRowByClick="true"
placeholder="请输入评估说明" @expand="expandTable"
allow-clear :pagination="false"
maxlength="150" :row-selection="{
/> columnWidth: 30,
</div> selectedRowKeys: selectedRowKeys,
onChange: onSelectChange,
}"
/>
<div class="pa">
<a-pagination
showSizeChanger="true"
showQuickJumper="true"
hideOnSinglePage="true"
:pageSize="pageSize"
:current="currentPage"
:total="tableDataTotal"
class="pagination"
/>
</div>
</div> </div>
</div> </div>
</div> </div>
@@ -92,33 +74,11 @@
</a-drawer> </a-drawer>
</template> </template>
<script> <script>
import { reactive, toRefs, ref } from "vue"; import { reactive, toRefs} from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import * as api from "../../api/indexInvist"; import * as api from "../../api/indexInvist";
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
const router = useRouter(); const router = useRouter();
const options1 = ref([
{
value: "value1",
label: "请选择状态",
},
]);
const rowSelection = ref({
checkStrictly: false,
onChange: (selectedRowKeys, selectedRows) => {
console.log(
`selectedRowKeys: ${selectedRowKeys}`,
"selectedRows: ",
selectedRows
);
},
onSelect: (record, selected, selectedRows) => {
console.log(record, selected, selectedRows);
},
onSelectAll: (selected, selectedRows, changeRows) => {
console.log(selected, selectedRows, changeRows);
},
});
export default { export default {
name: "AddInvist", name: "AddInvist",
// components: { // components: {
@@ -132,26 +92,103 @@ export default {
setup(props, ctx) { setup(props, ctx) {
const state = reactive({ const state = reactive({
inputV1: "", inputV1: "",
textV1: "", time: undefined,
tableData: [
{
key: 1,
name: "评估",
num: "2",
creator: "管理员",
time: "2022-07-21 14:30:25",
},
{
key: 2,
name: "评估",
num: "8",
creator: "管理员",
time: "2022-07-21 14:30:25",
},
{
key: 3,
name: "评估",
num: "5",
creator: "管理员",
time: "2022-07-21 14:30:25",
},
{
key: 4,
name: "评估",
num: "20",
creator: "管理员",
time: "2022-07-21 14:30:25",
},
],
}); });
const closeDrawer = () => { const closeDrawer = () => {
ctx.emit("update:addinvistVisible", false); ctx.emit("update:addinvistVisible", false);
state.inputV1 = ""; state.inputV1 = "";
state.textV1 = "";
}; };
const afterVisibleChange = (bool) => { const afterVisibleChange = (bool) => {
console.log("state", bool); console.log("state", bool);
}; };
const tableDataFunc = () => {
const columns = [
{
title: "名称",
dataIndex: "name",
// width: "30%",
key: "name",
width: '150px',
align: "left",
className: "classify",
scopedSlots: { customRender: "action" }, //引入的插槽
customRender: (text) => {
// console.log(text.record.checked1);
return (
<div class="racona">
<span> {text.record.name}</span>
{/**
<div class="img"></div>
<a-checkbox class="ch" checked={text.record.checkedd}>
{text.record.lei}
</a-checkbox>
*/}
</div>
);
},
},
{
title: "题数",
dataIndex: "num",
key: "num",
width: '80px',
align: "center",
},
{
title: "创建人",
dataIndex: "creator",
key: "creator",
width: '150px',
align: "center",
},
{
title: "创建时间",
dataIndex: "time",
key: "time",
width: '200px',
align: "center",
},
];
return columns;
};
//创建评估信息 //创建评估信息
const createInvist = () => { const createInvist = () => {
if (!state.inputV1) return message.info("请输入测评名称");
// if (!state.inputV2) return message.info("请选择测评");
// if (!state.organizationSelectName) return message.info("请选择归属组织");
// state.createLoading = true;
let obj = { let obj = {
appraiseName: state.inputV1, appraiseName: state.inputV1,
appraiseEndTime: "", appraiseEndTime: "",
appraiseExplain: state.textV1, appraiseExplain: "",
appraiseFlag: "", appraiseFlag: "",
appraiseId: 0, appraiseId: 0,
appraiseStartTime: "", appraiseStartTime: "",
@@ -183,8 +220,7 @@ export default {
...toRefs(state), ...toRefs(state),
afterVisibleChange, afterVisibleChange,
closeDrawer, closeDrawer,
rowSelection, tableDataFunc,
options1,
createInvist, createInvist,
}; };
}, },
@@ -215,84 +251,74 @@ export default {
justify-content: space-between; justify-content: space-between;
.main_left { .main_left {
padding-right: 30px; padding-right: 30px;
flex: 1;
border-right: 1px solid #e8e8e8;
.main_item { .main_item {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 32px; margin-bottom: 32px;
.signbox { .fi_input{
width: 120px; margin-right: 20px;
}
.btns{
margin-right: 20px;
padding: 0px 26px 0px 26px;
height: 38px;
background: #409eff;
border-radius: 8px;
//border: 1px solid rgba(64, 158, 255, 1);
display: flex; display: flex;
justify-content: end;
align-items: center; align-items: center;
.sign { justify-content: center;
margin-right: 5px; margin-right: 14px;
flex-shrink: 0;
cursor: pointer;
.search {
width: 15px;
height: 17px;
background-image: url("../../assets/images/courseManage/search0.png");
background-size: 100% 100%;
}
.btnText {
font-size: 14px;
font-weight: 400;
color: #ffffff;
line-height: 36px;
margin-left: 5px;
} }
} }
.btnbox { .btnsn {
padding: 0px 26px 0px 26px;
height: 38px;
background: #ffffff;
border-radius: 8px;
border: 1px solid rgba(64, 158, 255, 1);
display: flex; display: flex;
flex: 1;
align-items: center; align-items: center;
.xkbtn { justify-content: center;
cursor: pointer; margin-right: 14px;
width: 130px; flex-shrink: 0;
height: 40px; cursor: pointer;
background: #388be1; .search {
border-radius: 8px; width: 16px;
border: 0; height: 18px;
margin-right: 8px; background-image: url("../../assets/images/courseManage/reset1.png");
color: #fff; background-size: 100% 100%;
}
.btnText {
font-size: 14px;
font-weight: 400;
color: #409eff;
line-height: 36px;
margin-left: 5px;
} }
} }
} }
.main_item2 { .main_item2 {
display: flex; .pa {
align-items: flex-start; width: 100%;
margin-bottom: 32px; margin:15px auto;
.signbox {
width: 120px;
display: flex; display: flex;
justify-content: end; justify-content: center;
align-items: center;
.sign {
margin-right: 5px;
}
}
.kqszbox {
.qdqtbox {
margin-left: 56px;
}
.setbox {
display: flex;
flex-wrap: wrap;
margin-top: 10px;
margin-bottom: 24px;
.timerbox {
margin-top: 6px;
margin-right: 32px;
display: flex;
align-items: center;
flex-wrap: nowrap;
}
}
}
.btnbox2 {
display: flex;
flex-direction: column;
justify-content: flex-start;
.xkbtn {
cursor: pointer;
width: 130px;
height: 40px;
background: #388be1;
border-radius: 8px;
border: 0;
margin-right: 16px 8px 32px 0;
color: #fff;
margin-top: 16px;
margin-bottom: 60px;
}
} }
} }
} }

View File

@@ -65,7 +65,6 @@
<a-range-picker <a-range-picker
style="width: 424px" style="width: 424px"
v-model:value="time" v-model:value="time"
format="YYYY-MM-DD HH:MM"
:placeholder="[' 开始时间', ' 结束时间']" :placeholder="[' 开始时间', ' 结束时间']"
/> />
</div> </div>
@@ -110,7 +109,7 @@
<div class="signbox"> <div class="signbox">
<span style="margin-right: 3px">直播封面</span> <span style="margin-right: 3px">直播封面</span>
</div> </div>
<div class="textarea"> <div class="textarea" style="overflow: hidden">
<a-upload <a-upload
v-model:file-list="fileList" v-model:file-list="fileList"
name="avatar" name="avatar"
@@ -279,7 +278,7 @@
</div> </div>
</div> </div>
<div class="main_btns"> <div class="main_btns">
<button class="btn1">取消</button> <button class="btn1" @click="closeDrawer">取消</button>
<button class="btn2" @click="createLiveBroadcast">确定</button> <button class="btn2" @click="createLiveBroadcast">确定</button>
</div> </div>
</div> </div>
@@ -289,6 +288,13 @@
import { reactive, toRefs, ref } from "vue"; import { reactive, toRefs, ref } from "vue";
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
import * as api from "../../api/indexLiveBroadcast"; import * as api from "../../api/indexLiveBroadcast";
import { toDate } from "@/api/method";
function getBase64(img, callback) {
const reader = new FileReader();
reader.addEventListener("load", () => callback(reader.result));
reader.readAsDataURL(img);
}
const options1 = ref([ const options1 = ref([
{ {
value: "value1", value: "value1",
@@ -465,6 +471,8 @@ export default {
inputV8: "", //结束前多少分钟开始签退 inputV8: "", //结束前多少分钟开始签退
textV1: "", textV1: "",
radioV1: "", //标准设置的单选 radioV1: "", //标准设置的单选
imageUrl: "", //上传图片地址
loading: false,
switchC1: "", switchC1: "",
checkedC1: "", checkedC1: "",
checkedC2: true, checkedC2: true,
@@ -474,6 +482,18 @@ export default {
ctx.emit("update:addliveVisible", false); ctx.emit("update:addliveVisible", false);
state.radioV1 = ""; state.radioV1 = "";
state.playback = false; state.playback = false;
state.inputV6 = "";
state.inputV7 = "";
state.inputV2 = "";
state.inputV3 = "";
state.inputV1 = "";
state.inputV4 = "";
state.inputV5 = "";
state.inputV8 = "";
state.time = "";
state.textV1 = "";
state.switchC1 = "";
state.imageUrl = "";
}; };
const afterVisibleChange = (bool) => { const afterVisibleChange = (bool) => {
console.log("state", bool); console.log("state", bool);
@@ -487,23 +507,66 @@ export default {
state.radioV1 = ""; state.radioV1 = "";
} }
}; };
const handleChange = (info) => {
if (info.file.status === "uploading") {
state.loading = true;
return;
}
if (info.file.status === "done") {
// Get this url from response in real world.
getBase64(info.file.originFileObj, (base64Url) => {
state.imageUrl = base64Url;
state.loading = false;
});
}
if (info.file.status === "error") {
state.loading = false;
message.error("upload error");
}
};
const beforeUpload = (file) => {
const isJpgOrPng =
file.type === "image/jpeg" || file.type === "image/png";
if (!isJpgOrPng) {
message.error("You can only upload JPG file!");
}
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isLt2M) {
message.error("Image must smaller than 2MB!");
}
return isJpgOrPng && isLt2M;
};
//创建直播 //创建直播
const createLiveBroadcast = () => { const createLiveBroadcast = () => {
if (!state.inputV1) return message.info("请输入直播名称"); if (!state.inputV1) return message.warning("请输入直播名称");
if (!state.time) return message.info("请输入直播时间"); if (!state.time) return message.warning("请输入直播时间");
if (!state.inputV2) return message.info("请输入直播时长"); if (!state.inputV2) return message.warning("请输入直播时长");
const regular = /^[+]{0,1}(\d+)$/; const regular = /^[+]{0,1}(\d+)$/;
if (!regular.test(state.inputV2)) { if (!regular.test(state.inputV2)) {
return message.info("直播时长需大于0"); return message.warning("直播时长需大于0");
} }
// if (!state.inputV3) return message.info("请输入授课老师"); // if (!state.inputV3) return message.info("请输入授课老师");
let check = state.checkedC2 * 1; let check = state.checkedC2 * 1;
let startTime = state.time[0].$d; // let startTime = state.time[0].$d;
let endTime = state.time[1].$d; // let endTime = state.time[1].$d;
console.log(startTime); //时间需要处理 // console.log(startTime); //时间需要处理
console.log(endTime); // console.log(endTime);
let startTime = toDate(
new Date(state.time[0].$d).getTime() / 1000,
"Y-M-D"
);
let endTime = toDate(
new Date(state.time[1].$d).getTime() / 1000,
"Y-M-D"
);
let obj = { let obj = {
afterSignIn: state.inputV6, afterSignIn: state.inputV6,
beforeSignIn: state.inputV7, beforeSignIn: state.inputV7,
@@ -511,8 +574,8 @@ export default {
createUser: 0, createUser: 0,
// liveCover: state.fileList,//直播封面 // liveCover: state.fileList,//直播封面
liveDuration: state.inputV2, liveDuration: state.inputV2,
// liveEndTime: endTime, liveEndTime: endTime,
// liveStartTime: startTime, liveStartTime: startTime,
liveExplain: state.textV1, liveExplain: state.textV1,
liveFlag: "", liveFlag: "",
liveId: 0, liveId: 0,
@@ -532,6 +595,11 @@ export default {
.createLiveBroadcast(obj) .createLiveBroadcast(obj)
.then((res) => { .then((res) => {
console.log(res.data.data, 1111); console.log(res.data.data, 1111);
console.log(state, 2222);
message.success("提交成功");
closeDrawer();
// state = {}
}) })
.catch((err) => { .catch((err) => {
console.log(err, 2222); console.log(err, 2222);
@@ -548,6 +616,8 @@ export default {
rowSelection, rowSelection,
cloradio1, cloradio1,
createLiveBroadcast, createLiveBroadcast,
handleChange,
beforeUpload,
}; };
}, },
}; };

View File

@@ -1,268 +1,299 @@
<template> <template>
<a-drawer <a-drawer
:visible="addrefVisible" :visible="addrefVisible"
class="drawerStyle addrefDrawer" class="drawerStyle addrefDrawer"
width="80%" width="80%"
title="添加外链" title="添加外链"
placement="right" placement="right"
@after-visible-change="afterVisibleChange" @after-visible-change="afterVisibleChange"
> >
<div class="drawerMain"> <div class="drawerMain">
<div class="header"> <div class="header">
<div class="headerTitle">添加外链</div> <div class="headerTitle">添加外链</div>
<img <img
style="width: 29px; height: 29px; cursor: pointer" style="width: 29px; height: 29px; cursor: pointer"
src="../../assets/images/basicinfo/close.png" src="../../assets/images/basicinfo/close.png"
@click="closeDrawer" @click="closeDrawer"
/> />
</div> </div>
<div class="contentMain"> <div class="contentMain">
<div class="main_left"> <div class="main_left">
<div class="main_item"> <div class="main_item">
<div class="signbox"> <div class="signbox">
<div class="sign"> <div class="sign">
<img <img
src="@/assets/images/coursewareManage/asterisk.png" src="@/assets/images/coursewareManage/asterisk.png"
alt="" alt=""
/> />
</div>
<span style="margin-right: 3px">外链名称</span>
</div> </div>
<div class="btnbox"> <span style="margin-right: 3px">外链名称</span>
<a-input </div>
v-model:value="inputV1" <div class="btnbox">
style="width: 424px; height: 32px" <a-input
placeholder="请输入外链名称" v-model:value="inputV1"
style="width: 424px; height: 32px"
placeholder="请输入外链名称"
maxlength="20" maxlength="20"
/>
</div>
</div>
<div class="main_item">
<div class="signbox">
<div class="sign">
<img
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/> />
</div> </div>
<span style="margin-right: 3px">链接</span>
</div> </div>
<div class="main_item"> <div class="btnbox">
<div class="signbox"> <a-input
<div class="sign"> v-model:value="inputV2"
<img style="width: 424px; height: 32px"
src="@/assets/images/coursewareManage/asterisk.png" placeholder="请输入链接"
alt="" />
/>
</div>
<span style="margin-right: 3px">链接</span>
</div>
<div class="btnbox">
<a-input
v-model:value="inputV2"
style="width: 424px; height: 32px"
placeholder="请输入链接"
/>
</div>
</div> </div>
<div class="main_item2"> </div>
<div class="signbox"> <div class="main_item2">
<span style="margin-right: 3px">外链说明</span> <div class="signbox">
</div> <span style="margin-right: 3px">外链说明</span>
<div class="textarea"> </div>
<a-textarea <div class="textarea">
v-model:value="textV1" <a-textarea
placeholder="请输入外链说明" v-model:value="textV1"
allow-clear placeholder="请输入外链说明"
/> allow-clear
</div> />
</div> </div>
</div> </div>
</div> </div>
<div class="main_btns">
<button class="btn1">取消</button>
<button class="btn2">确定</button>
</div>
</div> </div>
</a-drawer> <div class="main_btns">
</template> <button class="btn1" @click="closeDrawer">取消</button>
<button class="btn2" @click="createExternalChain">确定</button>
</div>
</div>
</a-drawer>
</template>
<script> <script>
import { reactive, toRefs, ref } from "vue"; import { reactive, toRefs, ref } from "vue";
const rowSelection = ref({ import * as api from "../../api/indexExternalChain";
checkStrictly: false, import { message } from "ant-design-vue";
onChange: (selectedRowKeys, selectedRows) => { const rowSelection = ref({
console.log( checkStrictly: false,
`selectedRowKeys: ${selectedRowKeys}`, onChange: (selectedRowKeys, selectedRows) => {
"selectedRows: ", console.log(
selectedRows `selectedRowKeys: ${selectedRowKeys}`,
); "selectedRows: ",
selectedRows
);
},
onSelect: (record, selected, selectedRows) => {
console.log(record, selected, selectedRows);
},
onSelectAll: (selected, selectedRows, changeRows) => {
console.log(selected, selectedRows, changeRows);
},
});
export default {
name: "AddRef",
// components: {
// },
props: {
addrefVisible: {
type: Boolean,
default: false,
}, },
onSelect: (record, selected, selectedRows) => { },
console.log(record, selected, selectedRows); setup(props, ctx) {
}, const state = reactive({
onSelectAll: (selected, selectedRows, changeRows) => { inputV1: "",
console.log(selected, selectedRows, changeRows); inputV2: "",
}, textV1: "",
}); });
export default { const closeDrawer = () => {
name: "AddRef", ctx.emit("update:addrefVisible", false);
// components: { state.inputV2 = "";
// }, state.inputV1 = "";
props: { state.textV1 = "";
addrefVisible: { };
type: Boolean, const afterVisibleChange = (bool) => {
default: false, console.log("state", bool);
}, };
}, const createExternalChain = () => {
setup(props, ctx) { if (!state.inputV1) return message.warning("请输入外链名称");
const state = reactive({ if (!state.inputV2) return message.warning("请输入链接");
inputV1: "", let obj = {
inputV2: "", createUser: 0,
textV1:"", createTime: "",
}); linkAddress: state.inputV2,
const closeDrawer = () => { linkDescription: state.textV1,
ctx.emit("update:addrefVisible", false); linkFlag: "",
linkId: 0,
linkName: state.inputV1,
linkTag: "",
updateTime: "",
updateUser: 0,
}; };
const afterVisibleChange = (bool) => { api
console.log("state", bool); .createExternalChain(obj)
}; .then((res) => {
return { console.log(res.data.data);
...toRefs(state), message.success("提交成功");
afterVisibleChange, closeDrawer();
closeDrawer, })
rowSelection, .catch((err) => {
}; console.log(err);
}, });
}; };
</script> return {
...toRefs(state),
afterVisibleChange,
closeDrawer,
rowSelection,
createExternalChain,
};
},
};
</script>
<style lang="scss"> <style lang="scss">
.ant-table-striped :deep(.table-striped) td { .ant-table-striped :deep(.table-striped) td {
background-color: #fafafa !important; background-color: #fafafa !important;
} }
.addrefDrawer { .addrefDrawer {
.drawerMain { .drawerMain {
.header { .header {
height: 73px; height: 73px;
border-bottom: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.headerTitle { .headerTitle {
font-size: 18px; font-size: 18px;
font-weight: 600; font-weight: 600;
color: #333333; color: #333333;
line-height: 25px; line-height: 25px;
margin-left: 24px; margin-left: 24px;
}
} }
.contentMain { }
display: flex; .contentMain {
justify-content: space-between; display: flex;
.main_left { justify-content: space-between;
padding-right: 30px; .main_left {
flex: 1; padding-right: 30px;
border-right: 1px solid #e8e8e8; flex: 1;
.main_item { border-right: 1px solid #e8e8e8;
.main_item {
display: flex;
align-items: center;
margin-bottom: 32px;
.signbox {
width: 120px;
display: flex; display: flex;
justify-content: end;
align-items: center; align-items: center;
margin-bottom: 32px; .sign {
.signbox { margin-right: 5px;
width: 120px;
display: flex;
justify-content: end;
align-items: center;
.sign {
margin-right: 5px;
}
}
.btnbox {
display: flex;
flex: 1;
align-items: center;
.xkbtn {
cursor: pointer;
width: 130px;
height: 40px;
background: #388be1;
border-radius: 8px;
border: 0;
margin-right: 8px;
color: #fff;
}
} }
} }
.main_item2 { .btnbox {
display: flex; display: flex;
align-items: flex-start; flex: 1;
margin-bottom: 32px; align-items: center;
.signbox { .xkbtn {
width: 120px; cursor: pointer;
display: flex; width: 130px;
justify-content: end; height: 40px;
align-items: center; background: #388be1;
.sign { border-radius: 8px;
margin-right: 5px; border: 0;
} margin-right: 8px;
} color: #fff;
.kqszbox {
.qdqtbox {
margin-left: 56px;
}
.setbox {
display: flex;
flex-wrap: wrap;
margin-top: 10px;
margin-bottom: 24px;
.timerbox {
margin-top: 6px;
margin-right: 32px;
display: flex;
align-items: center;
flex-wrap: nowrap;
}
}
}
.btnbox2 {
display: flex;
flex-direction: column;
justify-content: flex-start;
.xkbtn {
cursor: pointer;
width: 130px;
height: 40px;
background: #388be1;
border-radius: 8px;
border: 0;
margin-right: 16px 8px 32px 0;
color: #fff;
margin-top: 16px;
margin-bottom: 60px;
}
} }
} }
} }
} .main_item2 {
.main_btns { display: flex;
height: 72px; align-items: flex-start;
width: 100%; margin-bottom: 32px;
bottom: 0; .signbox {
left: 0; width: 120px;
display: flex; display: flex;
align-items: center; justify-content: end;
justify-content: center; align-items: center;
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16); .sign {
.btn1 { margin-right: 5px;
width: 100px; }
height: 40px; }
border: 1px solid #4ea6ff; .kqszbox {
border-radius: 8px; .qdqtbox {
color: #4ea6ff; margin-left: 56px;
background-color: #fff; }
cursor: pointer; .setbox {
} display: flex;
.btn2 { flex-wrap: wrap;
cursor: pointer; margin-top: 10px;
width: 100px; margin-bottom: 24px;
height: 40px; .timerbox {
background: #4ea6ff; margin-top: 6px;
border-radius: 8px; margin-right: 32px;
border: 0; display: flex;
margin-left: 15px; align-items: center;
color: #fff; flex-wrap: nowrap;
}
}
}
.btnbox2 {
display: flex;
flex-direction: column;
justify-content: flex-start;
.xkbtn {
cursor: pointer;
width: 130px;
height: 40px;
background: #388be1;
border-radius: 8px;
border: 0;
margin-right: 16px 8px 32px 0;
color: #fff;
margin-top: 16px;
margin-bottom: 60px;
}
}
} }
} }
} }
.main_btns {
height: 72px;
width: 100%;
bottom: 0;
left: 0;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
.btn1 {
width: 100px;
height: 40px;
border: 1px solid #4ea6ff;
border-radius: 8px;
color: #4ea6ff;
background-color: #fff;
cursor: pointer;
}
.btn2 {
cursor: pointer;
width: 100px;
height: 40px;
background: #4ea6ff;
border-radius: 8px;
border: 0;
margin-left: 15px;
color: #fff;
}
}
} }
</style> }
</style>

View File

@@ -43,7 +43,7 @@
</div> </div>
<div class="textarea"> <div class="textarea">
<a-textarea <a-textarea
v-model:value="textV1" v-model:value="testV1"
placeholder="请输入考试说明" placeholder="请输入考试说明"
allow-clear allow-clear
maxlength="150" maxlength="150"
@@ -66,6 +66,7 @@
style="width: 424px" style="width: 424px"
placeholder="请输入考试名称" placeholder="请输入考试名称"
:options="options1" :options="options1"
v-model:value="choosedTest"
allowClear allowClear
showSearch showSearch
/> />
@@ -83,6 +84,7 @@
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-range-picker <a-range-picker
v-model:value="testTime"
style="width: 424px" style="width: 424px"
:placeholder="[' 开始时间', ' 结束时间']" :placeholder="[' 开始时间', ' 结束时间']"
/> />
@@ -199,14 +201,17 @@
</div> </div>
</div> </div>
<div class="main_btns"> <div class="main_btns">
<button class="btn1">取消</button> <button class="btn1" @click="closeDrawer">取消</button>
<button class="btn2">确定</button> <button class="btn2" @click="addTest">确定</button>
</div> </div>
</div> </div>
</a-drawer> </a-drawer>
</template> </template>
<script> <script>
import { reactive, toRefs, ref } from "vue"; import { reactive, toRefs, ref } from "vue";
import {message} from"ant-design-vue";
import {createExamination} from "@/api/indexExam"
import dayjs from 'dayjs';
const rowSelection = ref({ const rowSelection = ref({
checkStrictly: false, checkStrictly: false,
onChange: (selectedRowKeys, selectedRows) => { onChange: (selectedRowKeys, selectedRows) => {
@@ -244,7 +249,19 @@ export default {
radioV2: "", radioV2: "",
radioV3: "", radioV3: "",
radioV4: "", radioV4: "",
choosedTest: "",
testTime:"",
}); });
const options1 = ref([
{
label:'math',
value:'math',
},
{
label:'eng',
value:'eng',
},
])
const closeDrawer = () => { const closeDrawer = () => {
ctx.emit("update:addtestVisible", false); ctx.emit("update:addtestVisible", false);
state.radioV1 = ""; state.radioV1 = "";
@@ -252,6 +269,44 @@ export default {
state.radioV3 = ""; state.radioV3 = "";
state.radioV4 = ""; state.radioV4 = "";
}; };
const addTest = () => {
if(state.testTime.length
&& state.inputV1&& state.inputV2&& state.inputV3&& state.inputV4
&& state.radioV1&& state.radioV2&& state.radioV3
){
createExamination({
"createTime": "",
"createUser": 0,
"examinationDuration": state.inputV2,
"examinationEndTime": dayjs(state.testTime[1]).format("YYYY-MM-DD"),
"examinationExplain": state.testV1,
"examinationFlag": "",
"examinationId": 0,
"examinationLimit": state.inputV3,
"examinationName": state.inputV1,
"examinationPaperId": 0,
"examinationPaperName": state.choosedTest,
"examinationStartTime": dayjs(state.testTime[0]).format("YYYY-MM-DD"),
"examinationTag": "",
"passLine": state.inputV4,
"questionArrangement": state.radioV4,
"scoringModel": state.radioV3,
"showAnalysis": state.radioV2,
"showAnswers": state.radioV1,
"updateTime": "",
"updateUser": 0
}).then((res)=>{
message.success(`添加成功${res}`)
ctx.emit("update:addtestVisible", false);
}).catch((err)=>{
message.error(`添加失败${err}`)
})
}
else{
message.error(`字段不能为空`)
return 0
}
}
const afterVisibleChange = (bool) => { const afterVisibleChange = (bool) => {
console.log("state", bool); console.log("state", bool);
}; };
@@ -284,6 +339,8 @@ export default {
cloradio2, cloradio2,
cloradio3, cloradio3,
cloradio4, cloradio4,
addTest,
options1,
}; };
}, },
}; };

View File

@@ -271,7 +271,8 @@
style="width: 17px; height: 18px; margin-right: 8px" style="width: 17px; height: 18px; margin-right: 8px"
src="../../assets/images/basicinfo/add.png" src="../../assets/images/basicinfo/add.png"
/> />
<span class="headerLeftText">新建面授课</span> <span v-if="ft_eidt" class="headerLeftText">编辑面授课</span>
<span v-else class="headerLeftText">新建面授课</span>
</div> </div>
<div style="margin-right: 57px; cursor: pointer"> <div style="margin-right: 57px; cursor: pointer">
<img <img
@@ -1022,7 +1023,8 @@
<div class="cst_main"> <div class="cst_main">
<div class="cstm_header"> <div class="cstm_header">
<div class="add_icon"></div> <div class="add_icon"></div>
<span>新建开课</span> <span v-if="kk_eidt" >编辑开课</span>
<span v-else >新建开课</span>
<div class="close_exit" @click="cstm_exit"></div> <div class="close_exit" @click="cstm_exit"></div>
</div> </div>
<div class="cstm_title"> <div class="cstm_title">
@@ -2247,6 +2249,7 @@ export default defineComponent({
valueE1: "", valueE1: "",
valueE2: "", valueE2: "",
//确定面授 //确定面授
ft_eidt:false,
qdms_inputV1: "", qdms_inputV1: "",
qdms_inputV2: "", qdms_inputV2: "",
qdms_inputV3: "", qdms_inputV3: "",
@@ -2259,6 +2262,7 @@ export default defineComponent({
gl_inputV1: "", gl_inputV1: "",
gl_inputV2: "", gl_inputV2: "",
//开课 //开课
kk_eidt: false,
kkinputV1: "", kkinputV1: "",
kkinputV2: "", kkinputV2: "",
//新建开课 //新建开课
@@ -2483,7 +2487,13 @@ export default defineComponent({
</div> </div>
</div> </div>
<div class="ops2"> <div class="ops2">
<div class="jc" style={{ width: "30px" }}> <div class="jc" style={{ width: "30px" }}
onClick={() => {
state.ft_hs = true;
state.ft_eidt = true;
}
}
>
编辑 编辑
</div> </div>
</div> </div>
@@ -2701,7 +2711,11 @@ export default defineComponent({
> >
签到 签到
</div> </div>
<div class="jc">编辑</div> <div class="jc"
onClick={() => {
state.cstm_hs = true;
state.kk_eidt = true;
}}>编辑</div>
<div <div
class="jc" class="jc"
onClick={() => { onClick={() => {
@@ -2944,6 +2958,7 @@ export default defineComponent({
}; };
const ft_exit = () => { const ft_exit = () => {
state.ft_hs = false; state.ft_hs = false;
state.ft_eidt = false;
state.hideshow = true; state.hideshow = true;
}; };
const om_exit = () => { const om_exit = () => {
@@ -2964,6 +2979,7 @@ export default defineComponent({
}; };
const cstm_exit = () => { const cstm_exit = () => {
state.cstm_hs = false; state.cstm_hs = false;
state.kk_eidt = false;
state.xjkkradioV1 = ""; state.xjkkradioV1 = "";
state.xjkkradioV2 = ""; state.xjkkradioV2 = "";
state.xjkkinputV1 = ""; state.xjkkinputV1 = "";

View File

@@ -85,7 +85,7 @@
<div class="co1">{{ value2.length }}/100</div> <div class="co1">{{ value2.length }}/100</div>
</div> </div>
<div class="btn"> <div class="btn">
<button class="btn1">取消</button> <button class="btn1" @click="closeModal">取消</button>
<button class="btn2" @click="editChapter">确定</button> <button class="btn2" @click="editChapter">确定</button>
</div> </div>
</div> </div>
@@ -504,7 +504,7 @@
import { reactive, toRefs, onMounted, onUnmounted } from "vue"; import { reactive, toRefs, onMounted, onUnmounted } from "vue";
import AddStu from "../../components/drawers/AddLevelAddStu"; import AddStu from "../../components/drawers/AddLevelAddStu";
import ImpStu from "../../components/drawers/AddLevelImportStu"; import ImpStu from "../../components/drawers/AddLevelImportStu";
import * as api from "../../api/level"; import * as api from "../../api/indexLevel";
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
export default { export default {
name: "LevelAddDetail", name: "LevelAddDetail",
@@ -813,6 +813,7 @@ export default {
//新建或编辑关卡 //新建或编辑关卡
const editChapter = () => { const editChapter = () => {
if(!state.value1) return message.warning("请输入关卡名称");
let obj = { let obj = {
name: state.value1, name: state.value1,
remark: state.value2, remark: state.value2,
@@ -824,6 +825,9 @@ export default {
setTimeout(() => { setTimeout(() => {
console.log("创建成功", res); console.log("创建成功", res);
message.success("创建成功"); message.success("创建成功");
state.value1 = "";
state.value2 = "";
state.modal = false;
// state.createLoading = false; // state.createLoading = false;
//state.currentPage = 1; //state.currentPage = 1;
// getLearnPath(); // getLearnPath();
@@ -838,14 +842,14 @@ export default {
}; };
const closeDrawer = () => { const closeDrawer = () => {
state.visible = false; state.visible = false;
state.value1 = "";
state.value2 = "";
}; };
const showModal = () => { const showModal = () => {
state.modal = true; state.modal = true;
}; };
const closeModal = () => { const closeModal = () => {
state.modal = false; state.modal = false;
state.value1 = "";
state.value2 = "";
}; };
const afterVisibleChange = (bool) => { const afterVisibleChange = (bool) => {
console.log("visible", bool); console.log("visible", bool);
@@ -1317,9 +1321,9 @@ export default {
width: 100px; width: 100px;
height: 40px; height: 40px;
border-radius: 4px; border-radius: 4px;
border: 1px solid #387df7; border: 1px solid #409EFF;
font-size: 14px; font-size: 14px;
color: #387df7; color: #409EFF;
cursor: pointer; cursor: pointer;
background: #ffffff; background: #ffffff;
margin-right: 20px; margin-right: 20px;
@@ -1332,7 +1336,7 @@ export default {
color: #fff; color: #fff;
cursor: pointer; cursor: pointer;
border: 0; border: 0;
background: #388be1; background: #409EFF;
} }
} }
} }

View File

@@ -24,9 +24,11 @@
<div class="inname">分类</div> <div class="inname">分类</div>
</div> </div>
<div class="in select"> <div class="in select">
<a-select :getPopupContainer="triggerNode => { <a-select :getPopupContainer="
return triggerNode.parentNode || document.body (triggerNode) => {
}" v-model:value="classifySelect" placeholder="四个养成" style="width: 100%" :options="classifyList" return triggerNode.parentNode || document.body;
}
" v-model:value="classifySelect" placeholder="四个养成" style="width: 100%" :options="classifyList"
@change="classificationChange" allowClear showSearch> @change="classificationChange" allowClear showSearch>
</a-select> </a-select>
</div> </div>
@@ -42,13 +44,17 @@
border: 1px solid rgba(78, 166, 255, 1); border: 1px solid rgba(78, 166, 255, 1);
border-radius: 5px; border-radius: 5px;
cursor: pointer; cursor: pointer;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
"> ">
<a-upload v-model:file-list="fileList" name="file" list-type="picture-card" class="avatar-uploader" <a-upload v-model:file-list="fileList" name="file" list-type="picture-card" class="avatar-uploader"
:show-upload-list="false" action="/api/file/upload" :before-upload="beforeUpload" @change="handleChange"> :show-upload-list="false" action="/api/file/upload" :before-upload="beforeUpload" @change="handleChange">
<img style="width: 100px;height: 100px;margin-bottom: 4px;margin-right: 4px;" v-if="imageUrl" <img style="
:src="imageUrl" alt="avatar" /> width: 100px;
height: 100px;
margin-bottom: 4px;
margin-right: 4px;
" v-if="imageUrl" :src="imageUrl" alt="avatar" />
<div v-else> <div v-else>
<!-- <loading-outlined v-if="loading"></loading-outlined> --> <!-- <loading-outlined v-if="loading"></loading-outlined> -->
<!-- <plus-outlined v-else></plus-outlined> --> <!-- <plus-outlined v-else></plus-outlined> -->
@@ -76,9 +82,11 @@
<div class="inname">项目经理</div> <div class="inname">项目经理</div>
</div> </div>
<div class="in select"> <div class="in select">
<a-select :getPopupContainer="triggerNode => { <a-select :getPopupContainer="
return triggerNode.parentNode || document.body (triggerNode) => {
}" :value="classifySelect1" placeholder="请选择项目经理" style="width: 100%" :options="classifyList1" return triggerNode.parentNode || document.body;
}
" :value="classifySelect1" placeholder="请选择项目经理" style="width: 100%" :options="classifyList1"
@change="classificationChange1" allowClear showSearch> @change="classificationChange1" allowClear showSearch>
</a-select> </a-select>
</div> </div>
@@ -188,11 +196,13 @@
<script> <script>
import { reactive, toRefs, ref } from "vue"; import { reactive, toRefs, ref } from "vue";
import { message } from 'ant-design-vue'; import { message } from 'ant-design-vue';
import { useRouter } from "vue-router";
import * as api from "../../api/index"; import * as api from "../../api/index";
export default { export default {
name: "projectAdd", name: "projectAdd",
setup() { setup() {
const router = useRouter();
const state = reactive({ const state = reactive({
classifySelect: null, classifySelect: null,
classifySelectId: null, classifySelectId: null,
@@ -315,8 +325,8 @@ export default {
// 项目时间选择函数 // 项目时间选择函数
console.log('Formatted Selected Time: ', dateString); console.log('Formatted Selected Time: ', dateString);
console.log('Formatted Selected TimeStamp', new Date(dateString[0]).getTime()) console.log('Formatted Selected TimeStamp', new Date(dateString[0]).getTime())
beginTime = new Date(dateString[0]).getTime(); beginTime = new Date(dateString[0]).getTime() / 1000;
endTime = new Date(dateString[1]).getTime(); endTime = new Date(dateString[1]).getTime() / 1000;
}; };
@@ -409,7 +419,7 @@ export default {
"boeFlag": boeFlag, "boeFlag": boeFlag,
"attach": attach, "attach": attach,
"templateId": 10, "templateId": 10,
"parentId": 0,
"category": 0, "category": 0,
"notice": "", "notice": "",
"noticeFlag": 0, "noticeFlag": 0,
@@ -427,8 +437,19 @@ export default {
api.createProject(obj).then(res => { api.createProject(obj).then(res => {
console.log(res) console.log(res)
if (res.status == 200 && res.data.code == 200) {
router.push({
path: '/taskpage',
query: { id: res.data.data.projectId }
});
} else {
message.destroy();
message.error("创建失败,请检查当前网络状态。")
}
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
message.destroy();
message.error("创建失败,请检查当前网络状态。")
}) })
}; };
@@ -726,8 +747,8 @@ export default {
width: 100px; width: 100px;
height: 40px; height: 40px;
border-radius: 8px; border-radius: 8px;
background: #409EFF; background: #409eff;
color: #FFFFFF; color: #ffffff;
margin-right: 14px; margin-right: 14px;
} }
@@ -738,9 +759,9 @@ export default {
width: 100px; width: 100px;
height: 40px; height: 40px;
border-radius: 8px; border-radius: 8px;
border: 1px solid #409EFF; border: 1px solid #409eff;
background: #FFFFFF; background: #ffffff;
color: #409EFF; color: #409eff;
} }
} }

File diff suppressed because it is too large Load Diff

View File

@@ -15,7 +15,13 @@
<div class="btnText">添加阶段</div> <div class="btnText">添加阶段</div>
</div> </div>
<div class="maincon" style="background-color: #fff"> <div class="maincon" style="background-color: #fff">
<div class="item" :class="isactive == index && isActive == true ? 'bgcactive' : '' " v-for="(item , index ) in level" @click="changebgc(index)" :key="item.id"> <div
class="item"
:class="isactive == index && isActive == true ? 'bgcactive' : ''"
v-for="(item, index) in level"
@click="changebgc(index)"
:key="item.id"
>
<div class="itemle"> <div class="itemle">
<div class="tit">{{ item.tit }}</div> <div class="tit">{{ item.tit }}</div>
<div class="name">{{ item.name }}</div> <div class="name">{{ item.name }}</div>
@@ -506,7 +512,7 @@
<div class="btnText" @click="delete_exit">取消</div> <div class="btnText" @click="delete_exit">取消</div>
</div> </div>
<div class="del_btn btn2"> <div class="del_btn btn2">
<div class="btnText" @click="showModal">确定</div> <div class="btnText" @click="showModal1">确定</div>
</div> </div>
</div> </div>
</div> </div>
@@ -530,6 +536,10 @@ import AddActive from "../../components/drawers/AddActive.vue";
import AddEval from "../../components/drawers/AddEval.vue"; import AddEval from "../../components/drawers/AddEval.vue";
import AddInvist from "../../components/drawers/AddInvist.vue"; import AddInvist from "../../components/drawers/AddInvist.vue";
import AddVote from "../../components/drawers/AddVote.vue"; import AddVote from "../../components/drawers/AddVote.vue";
import { message } from "ant-design-vue";
import * as api from "../../api/indexTaskadd";
import * as apilive from "../../api/indexLiveBroadcast";
import * as apieval from "../../api/indexEval";
const drawercolumns = [ const drawercolumns = [
{ {
title: "项目名称", title: "项目名称",
@@ -648,6 +658,8 @@ export default {
name: "中级产品经理", name: "中级产品经理",
}, },
], ],
//任务数据
tableData: [ tableData: [
{ {
key: 1, key: 1,
@@ -841,7 +853,8 @@ export default {
cancelModal: false, //确认取消阶段弹窗 cancelModal: false, //确认取消阶段弹窗
deleteModal: false, //确认删除弹窗 deleteModal: false, //确认删除弹窗
isactive: -1, isactive: -1,
isActive:false, isActive: false,
deleteLiveID: null, //删除直播id
}); });
const selectProjectName = (value, index) => { const selectProjectName = (value, index) => {
console.log("value", value, index); console.log("value", value, index);
@@ -966,6 +979,7 @@ export default {
style="color:#4EA6FF;cursor:pointer" style="color:#4EA6FF;cursor:pointer"
onClick={() => { onClick={() => {
showDelete(); showDelete();
{/* deleteEvalText(); */}
}} }}
> >
删除 删除
@@ -978,6 +992,59 @@ export default {
]; ];
return columns; return columns;
}; };
//获取任务列表
const getTask = () => {
let obj = {
projectId: 1,
};
api
.getTask(obj)
.then((res) => {
if (res.status == 200) {
console.log(res.data.data.stageList, 22222);
}
})
.catch((err) => {
console.log(err);
});
};
//删除直播
const deleteLiveBroadcast = () => {
let obj = {
liveId: state.deleteLiveID,
};
apilive
.deleteLiveBroadcast(obj)
.then((res) => {
console.log("删除成功", res);
message.success("删除成功");
//重新获取列表
getTask();
})
.catch((err) => {
console.log(err);
});
};
//删除评估测试
const deleteEvalText = () => {
let obj = {
evaluationId:state.deleteLiveID,
};
apieval
.deleteEvaluationById(obj)
.then((res) => {
console.log("删除成功", res);
message.success("删除成功");
state.deleteModal = false;
//重新获取列表
getTask();
})
.catch((err) => {
console.log("删除失败", err);
});
};
const onSelectChange = (selectedRowKeys) => { const onSelectChange = (selectedRowKeys) => {
console.log("selectedRowKeys changed: ", selectedRowKeys); console.log("selectedRowKeys changed: ", selectedRowKeys);
state.selectedRowKeys = selectedRowKeys; state.selectedRowKeys = selectedRowKeys;
@@ -996,6 +1063,10 @@ export default {
//关闭确认框 //关闭确认框
closeConfirm(); closeConfirm();
}; };
const showModal1 = () => {
//关闭确认框
state.deleteModal = false;
};
const closeModal = () => { const closeModal = () => {
state.stage = false; state.stage = false;
}; };
@@ -1003,6 +1074,7 @@ export default {
document.getElementsByTagName("main")[0].style.background = document.getElementsByTagName("main")[0].style.background =
"rgb(245, 247, 250,1)"; "rgb(245, 247, 250,1)";
document.getElementsByTagName("main")[0].style.boxShadow = "none"; document.getElementsByTagName("main")[0].style.boxShadow = "none";
getTask();
}); });
onUnmounted(() => { onUnmounted(() => {
document.getElementsByTagName("main")[0].style.background = "#ffffff"; document.getElementsByTagName("main")[0].style.background = "#ffffff";
@@ -1066,7 +1138,7 @@ export default {
const changebgc = (index) => { const changebgc = (index) => {
state.isactive = index; state.isactive = index;
state.isActive = !state.isActive; state.isActive = !state.isActive;
} };
return { return {
...toRefs(state), ...toRefs(state),
selectProjectName, selectProjectName,
@@ -1093,10 +1165,14 @@ export default {
showConfirm, showConfirm,
closeConfirm, closeConfirm,
showCancel, showCancel,
showModal1,
closeCancel, closeCancel,
showDelete, showDelete,
closeDelete, closeDelete,
changebgc, changebgc,
getTask,
deleteLiveBroadcast,
deleteEvalText,
}; };
}, },
}; };
@@ -1226,10 +1302,10 @@ export default {
padding: 0 !important; padding: 0 !important;
.modalHeader { .modalHeader {
background: linear-gradient( background: linear-gradient(
0deg, 0deg,
rgba(78, 166, 255, 0) 0%, rgba(78, 166, 255, 0) 0%,
rgba(78, 166, 255, 0.2) 100% rgba(78, 166, 255, 0.2) 100%
); );
} }
.modalMain { .modalMain {
.ant-input-textarea-show-count { .ant-input-textarea-show-count {
@@ -1327,8 +1403,8 @@ export default {
.in { .in {
margin-left: 14px; margin-left: 14px;
flex: 1; flex: 1;
.ant-radio-wrapper { // .ant-radio-wrapper {
} // }
.ant-input-affix-wrapper { .ant-input-affix-wrapper {
width: 384px; width: 384px;
border-radius: 8px; border-radius: 8px;
@@ -1527,9 +1603,9 @@ export default {
right: 16px; right: 16px;
} }
} }
.bgcactive{ .bgcactive {
opacity:1; opacity: 1;
transition:all .5s; transition: all 0.5s;
} }
} }
} }

File diff suppressed because it is too large Load Diff