mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-15 13:56:45 +08:00
feat:合并
This commit is contained in:
11384
package-lock.json
generated
11384
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -38,34 +38,10 @@ import http from "./config";
|
||||
// 接口-请求
|
||||
|
||||
// 创建编辑单层项目
|
||||
export const createProject = (obj) => http.post('/admin/project/edit', {
|
||||
"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 createProject = (obj) => http.post('/admin/project/edit', obj)
|
||||
|
||||
// 创建多层项目
|
||||
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
14
src/api/indexExam.js
Normal 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);
|
||||
|
||||
19
src/api/indexExternalChain.js
Normal file
19
src/api/indexExternalChain.js
Normal 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
8
src/api/indexTaskadd.js
Normal 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
14
src/api/indexWork.js
Normal 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);
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
<a-input
|
||||
v-model:value="inputV3"
|
||||
style="width: 424px; height: 32px"
|
||||
placeholder="请输入授课老师"
|
||||
placeholder="请输入活动地址"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -145,7 +145,7 @@
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
"
|
||||
:v-model:value="inputV4"
|
||||
v-model:value="inputV4"
|
||||
/>
|
||||
<span style="color: #999999; margin-left: 8px">分钟</span>
|
||||
</div>
|
||||
@@ -161,7 +161,7 @@
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
"
|
||||
:v-model:value="inputV5"
|
||||
v-model:value="inputV5"
|
||||
/>
|
||||
<span style="color: #999999; margin-left: 8px">分钟</span>
|
||||
</div>
|
||||
@@ -182,7 +182,7 @@
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
"
|
||||
:v-model:value="inputV6"
|
||||
v-model:value="inputV6"
|
||||
/>
|
||||
<span style="color: #999999; margin-left: 8px"
|
||||
>分钟(提前签退则记为早退)</span
|
||||
@@ -209,7 +209,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_btns">
|
||||
<button class="btn1">取消</button>
|
||||
<button class="btn1" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="createActivity">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -217,8 +217,9 @@
|
||||
</template>
|
||||
<script>
|
||||
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 { toDate } from "../../api/method.js";
|
||||
const rowSelection = ref({
|
||||
checkStrictly: false,
|
||||
onChange: (selectedRowKeys, selectedRows) => {
|
||||
@@ -261,6 +262,15 @@ export default {
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:addactiveVisible", false);
|
||||
state.radioV1 = "";
|
||||
state.inputV1 = "";
|
||||
state.inputV2 = "";
|
||||
state.inputV3 = "";
|
||||
state.inputV4 = "";
|
||||
state.inputV5 = "";
|
||||
state.inputV6 = "";
|
||||
state.textV1 = "";
|
||||
state.textV2 = "";
|
||||
state.time = "";
|
||||
};
|
||||
const afterVisibleChange = (bool) => {
|
||||
console.log("state", bool);
|
||||
@@ -273,18 +283,21 @@ export default {
|
||||
|
||||
//创建活动
|
||||
const createActivity = () => {
|
||||
if(!state.inputV1) return message.info("请输入活动名称");
|
||||
if(!state.inputV2) return message.info("请输入活动时长");
|
||||
if(!state.textV1) return message.info("请输入活动公告");
|
||||
if(!state.inputV3) return message.info("请输入活动地址");
|
||||
if(!state.inputV1) return message.warning("请输入活动名称");
|
||||
if(!state.inputV2) return message.warning("请输入活动时长");
|
||||
if(!state.textV1) return message.warning("请输入活动公告");
|
||||
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 = {
|
||||
activityAddress: state.inputV3, //活动地址
|
||||
activityDuration: state.inputV2, //活动时长
|
||||
activityEndTime: "", //活动结束时间
|
||||
activityExplain: state.textV2, //活动说明
|
||||
activityEndTime: endTime, //活动结束时间
|
||||
activityId: 0, //活动ID
|
||||
activityName: state.inputV1, //活动名称
|
||||
activityNotice: state.textV1, //活动公告
|
||||
activityStartTime: "", //活动开始时间
|
||||
activityStartTime: startTime, //活动开始时间
|
||||
activityTag: "", //活动逻辑删除标识
|
||||
afterSignIn: state.inputV5, //活动开始后多少分钟签到
|
||||
beforeSignIn: state.inputV4, //活动开始前多少分钟签到
|
||||
@@ -301,6 +314,17 @@ export default {
|
||||
setTimeout(() => {
|
||||
console.log("创建成功", res);
|
||||
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);
|
||||
})
|
||||
.catch((err) => {
|
||||
@@ -341,6 +365,9 @@ export default {
|
||||
.contentMain {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.ant-picker {
|
||||
border-radius: 8px;
|
||||
}
|
||||
.main_left {
|
||||
padding-right: 30px;
|
||||
flex: 1;
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_btns">
|
||||
<button class="btn1">取消</button>
|
||||
<button class="btn1" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="createDiscuss">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -71,7 +71,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs, ref } from "vue";
|
||||
import * as api from "../../api/discuss";
|
||||
import * as api from "../../api/indexDiscuss";
|
||||
import { message } from "ant-design-vue";
|
||||
const rowSelection = ref({
|
||||
checkStrictly: false,
|
||||
@@ -109,7 +109,7 @@ export default {
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:adddiscussVisible", false);
|
||||
state.inputV1 = "";
|
||||
state.textV2 = "";
|
||||
state.textV1 = "";
|
||||
};
|
||||
const afterVisibleChange = (bool) => {
|
||||
console.log("state", bool);
|
||||
@@ -117,7 +117,7 @@ export default {
|
||||
|
||||
//创建讨论
|
||||
const createDiscuss = () => {
|
||||
if(!state.inputV1) return message.info("请输入讨论名称");
|
||||
if(!state.inputV1) return message.warning("请输入讨论名称");
|
||||
let obj = {
|
||||
discussName: state.inputV1, //讨论名称
|
||||
discussExplain: state.textV1, //讨论说明
|
||||
@@ -136,8 +136,12 @@ export default {
|
||||
.then((res) => {
|
||||
setTimeout(() => {
|
||||
console.log("创建成功", res);
|
||||
state.inputV1 = "";
|
||||
state.textV1 = "";
|
||||
message.success("创建成功");
|
||||
ctx.emit("update:adddiscussVisible", false);
|
||||
}, 1000);
|
||||
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("创建失败", err);
|
||||
|
||||
@@ -63,8 +63,7 @@
|
||||
<a-range-picker
|
||||
style="width: 424px"
|
||||
v-model:value="time"
|
||||
format="YYYY-MM-DD"
|
||||
@change="onChange"
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
:placeholder="[' 开始时间', ' 结束时间']"
|
||||
/>
|
||||
</div>
|
||||
@@ -76,7 +75,7 @@
|
||||
<div class="textarea">
|
||||
<a-upload
|
||||
v-model:file-list="fileList"
|
||||
name="avatar"
|
||||
name="file"
|
||||
list-type="picture-card"
|
||||
class="avatar-uploader"
|
||||
:show-upload-list="false"
|
||||
@@ -107,30 +106,8 @@ import { reactive, toRefs, ref } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import * as api from "../../api/indexEval";
|
||||
import { message } from "ant-design-vue";
|
||||
// import { toDate } from "../../api/method";
|
||||
import { toDate } from "../../api/method.js";
|
||||
import { toDate } from "../../api/method";
|
||||
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 {
|
||||
name: "AddEval",
|
||||
// components: {
|
||||
@@ -146,88 +123,115 @@ export default {
|
||||
inputV1: "",
|
||||
inputV2: "",
|
||||
time: undefined,
|
||||
endTime: undefined,
|
||||
startTime: undefined,
|
||||
endTimes : "",
|
||||
startTimes: "",
|
||||
picUrl: "",
|
||||
tableData: [],
|
||||
deletePathId: null, //删除路径id
|
||||
editPathId: null, //修改路径id
|
||||
currentPage: 1, //当前页
|
||||
tableDataTotal: -1, //学习路径列表总数
|
||||
pageSize: 10, //每页10条数据
|
||||
});
|
||||
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:addevalVisible", false);
|
||||
state.inputV1 = "";
|
||||
state.inputV2 = "";
|
||||
state.time = undefined;
|
||||
};
|
||||
const afterVisibleChange = (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 loading = ref(false);
|
||||
const imageUrl = ref("");
|
||||
|
||||
const handleChange = (info) => {
|
||||
if (info.file.status === "uploading") {
|
||||
loading.value = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.file.status === "done") {
|
||||
// Get this url from response in real world.
|
||||
getBase64(info.file.originFileObj, (base64Url) => {
|
||||
imageUrl.value = base64Url;
|
||||
const handleChange = (info) => {
|
||||
if (info.file.status === 'uploading') {
|
||||
loading.value = true;
|
||||
return;
|
||||
}
|
||||
if (info.file.status === 'done') {
|
||||
console.log('上传图片返回的信息 %o', info)
|
||||
state.picUrl = info.file.response.data;
|
||||
// Get this url from response in real world.
|
||||
getBase64(info.file.originFileObj, (base64Url) => {
|
||||
imageUrl.value = base64Url;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
if (info.file.status === "error") {
|
||||
loading.value = false;
|
||||
message.error("upload error");
|
||||
}
|
||||
}
|
||||
if (info.file.status === 'error') {
|
||||
loading.value = 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 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 < 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 = () => {
|
||||
if (!state.inputV1) return message.info("请输入测评名称");
|
||||
console.log(state.time);
|
||||
console.log(state.time[0]);
|
||||
console.log(state.time[0].$d.toString);
|
||||
console.log(state.time[1].$d.toString);
|
||||
if ( state.time != undefined) {
|
||||
state.endTimes = toDate(new Date(state.time[0].$d).getTime() / 1000, "Y-M-D")
|
||||
state.startTimes = toDate(new Date(state.time[1].$d).getTime() / 1000, "Y-M-D")
|
||||
}
|
||||
|
||||
let obj = {
|
||||
evaluationName: state.inputV1,
|
||||
createTime: "",
|
||||
createUser: 0,
|
||||
evaluationEndTime: state.endTime,
|
||||
evaluationEndTime: state.endTimes,
|
||||
evaluationFlag: "",
|
||||
evaluationId: "",
|
||||
evaluationPictureAddress: "",
|
||||
evaluationStartTime: state.startTime,
|
||||
evaluationPictureAddress: state.picUrl,
|
||||
evaluationStartTime: state.startTimes,
|
||||
evaluationTag: "",
|
||||
evaluationTypeId: 0,
|
||||
evaluationTypeName: "",
|
||||
@@ -240,7 +244,6 @@ export default {
|
||||
setTimeout(() => {
|
||||
console.log("创建成功", res);
|
||||
message.success("创建成功");
|
||||
console.log(obj);
|
||||
// state.createLoading = false;
|
||||
router.push("/leveladd");
|
||||
// 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 {
|
||||
...toRefs(state),
|
||||
afterVisibleChange,
|
||||
closeDrawer,
|
||||
rowSelection,
|
||||
//增删改查
|
||||
createEvalText,
|
||||
onChange,
|
||||
// getEvalPath,
|
||||
// changePagination,
|
||||
// deleteEvalPath,
|
||||
// editEvalPath,
|
||||
//上传组件
|
||||
fileList,
|
||||
loading,
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
<div class="btnbox">
|
||||
<a-range-picker
|
||||
style="width: 424px"
|
||||
v-model:value="choosedTime"
|
||||
:placeholder="[' 开始时间', ' 结束时间']"
|
||||
/>
|
||||
</div>
|
||||
@@ -78,7 +79,15 @@
|
||||
<span style="margin-right: 3px">附件:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-upload
|
||||
v-model:file-list="fileList"
|
||||
name="file"
|
||||
action="/api/file/upload"
|
||||
:headers="headers"
|
||||
@change="handleChange"
|
||||
>
|
||||
<button class="xkbtn">上传附件</button>
|
||||
</a-upload>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_item" style="margin-top:-25px;">
|
||||
@@ -91,14 +100,18 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_btns">
|
||||
<button class="btn1">取消</button>
|
||||
<button class="btn2">确定</button>
|
||||
<button class="btn1" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="addHomework">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs, ref } from "vue";
|
||||
import {message} from"ant-design-vue";
|
||||
import {createWorkTask} from "@/api/indexWork"
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
const rowSelection = ref({
|
||||
checkStrictly: false,
|
||||
onChange: (selectedRowKeys, selectedRows) => {
|
||||
@@ -129,18 +142,65 @@ export default {
|
||||
const state = reactive({
|
||||
inputV1: "",
|
||||
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 = () => {
|
||||
ctx.emit("update:addhomeworkVisible", false);
|
||||
};
|
||||
const afterVisibleChange = (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 {
|
||||
...toRefs(state),
|
||||
afterVisibleChange,
|
||||
closeDrawer,
|
||||
rowSelection,
|
||||
addHomework,
|
||||
handleChange,
|
||||
fileList,
|
||||
headers: {
|
||||
"token":"123"
|
||||
},
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<a-drawer
|
||||
:visible="addinvistVisible"
|
||||
class="drawerStyle addinvistDrawer"
|
||||
width="80%"
|
||||
width="70%"
|
||||
title="添加评估"
|
||||
placement="right"
|
||||
@after-visible-change="afterVisibleChange"
|
||||
@@ -19,68 +19,50 @@
|
||||
<div class="contentMain">
|
||||
<div class="main_left">
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<div class="sign">
|
||||
<img
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<span style="margin-right: 3px">测评名称:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<div class="fi_input">
|
||||
<a-input
|
||||
v-model:value="inputV1"
|
||||
style="width: 424px; height: 32px"
|
||||
placeholder="请输入测评名称"
|
||||
style="width: 424px; height: 40px"
|
||||
placeholder="请输入评估名称"
|
||||
maxlength="20"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<div class="sign">
|
||||
<img
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<span style="margin-right: 3px">选择考试:</span>
|
||||
<div class="btns">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">搜索</div>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-select
|
||||
dropdownClassName="dropdown-style"
|
||||
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 class="btnsn">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">重置</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_item2">
|
||||
<div class="signbox">
|
||||
<span style="margin-right: 3px">活动说明:</span>
|
||||
</div>
|
||||
<div class="textarea">
|
||||
<a-textarea
|
||||
v-model:value="textV1"
|
||||
placeholder="请输入评估说明"
|
||||
allow-clear
|
||||
maxlength="150"
|
||||
/>
|
||||
</div>
|
||||
<a-table
|
||||
style="border: 1px solid #f2f6fe"
|
||||
:columns="tableDataFunc()"
|
||||
:data-source="tableData"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
expandRowByClick="true"
|
||||
@expand="expandTable"
|
||||
:pagination="false"
|
||||
:row-selection="{
|
||||
columnWidth: 30,
|
||||
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>
|
||||
@@ -92,33 +74,11 @@
|
||||
</a-drawer>
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs, ref } from "vue";
|
||||
import { reactive, toRefs} from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import * as api from "../../api/indexInvist";
|
||||
import { message } from "ant-design-vue";
|
||||
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 {
|
||||
name: "AddInvist",
|
||||
// components: {
|
||||
@@ -132,26 +92,103 @@ export default {
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
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 = () => {
|
||||
ctx.emit("update:addinvistVisible", false);
|
||||
state.inputV1 = "";
|
||||
state.textV1 = "";
|
||||
};
|
||||
const afterVisibleChange = (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 = () => {
|
||||
if (!state.inputV1) return message.info("请输入测评名称");
|
||||
// if (!state.inputV2) return message.info("请选择测评");
|
||||
// if (!state.organizationSelectName) return message.info("请选择归属组织");
|
||||
// state.createLoading = true;
|
||||
let obj = {
|
||||
appraiseName: state.inputV1,
|
||||
appraiseEndTime: "",
|
||||
appraiseExplain: state.textV1,
|
||||
appraiseExplain: "",
|
||||
appraiseFlag: "",
|
||||
appraiseId: 0,
|
||||
appraiseStartTime: "",
|
||||
@@ -183,8 +220,7 @@ export default {
|
||||
...toRefs(state),
|
||||
afterVisibleChange,
|
||||
closeDrawer,
|
||||
rowSelection,
|
||||
options1,
|
||||
tableDataFunc,
|
||||
createInvist,
|
||||
};
|
||||
},
|
||||
@@ -215,84 +251,74 @@ export default {
|
||||
justify-content: space-between;
|
||||
.main_left {
|
||||
padding-right: 30px;
|
||||
flex: 1;
|
||||
border-right: 1px solid #e8e8e8;
|
||||
.main_item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 32px;
|
||||
.signbox {
|
||||
width: 120px;
|
||||
.fi_input{
|
||||
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;
|
||||
justify-content: end;
|
||||
align-items: center;
|
||||
.sign {
|
||||
margin-right: 5px;
|
||||
justify-content: center;
|
||||
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;
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
.xkbtn {
|
||||
cursor: pointer;
|
||||
width: 130px;
|
||||
height: 40px;
|
||||
background: #388be1;
|
||||
border-radius: 8px;
|
||||
border: 0;
|
||||
margin-right: 8px;
|
||||
color: #fff;
|
||||
justify-content: center;
|
||||
margin-right: 14px;
|
||||
flex-shrink: 0;
|
||||
cursor: pointer;
|
||||
.search {
|
||||
width: 16px;
|
||||
height: 18px;
|
||||
background-image: url("../../assets/images/courseManage/reset1.png");
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
.btnText {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #409eff;
|
||||
line-height: 36px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.main_item2 {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 32px;
|
||||
.signbox {
|
||||
width: 120px;
|
||||
.pa {
|
||||
width: 100%;
|
||||
margin:15px auto;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
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;
|
||||
}
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +65,6 @@
|
||||
<a-range-picker
|
||||
style="width: 424px"
|
||||
v-model:value="time"
|
||||
format="YYYY-MM-DD HH:MM"
|
||||
:placeholder="[' 开始时间', ' 结束时间']"
|
||||
/>
|
||||
</div>
|
||||
@@ -110,7 +109,7 @@
|
||||
<div class="signbox">
|
||||
<span style="margin-right: 3px">直播封面:</span>
|
||||
</div>
|
||||
<div class="textarea">
|
||||
<div class="textarea" style="overflow: hidden">
|
||||
<a-upload
|
||||
v-model:file-list="fileList"
|
||||
name="avatar"
|
||||
@@ -279,7 +278,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_btns">
|
||||
<button class="btn1">取消</button>
|
||||
<button class="btn1" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="createLiveBroadcast">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -289,6 +288,13 @@
|
||||
import { reactive, toRefs, ref } from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
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([
|
||||
{
|
||||
value: "value1",
|
||||
@@ -465,6 +471,8 @@ export default {
|
||||
inputV8: "", //结束前多少分钟开始签退
|
||||
textV1: "",
|
||||
radioV1: "", //标准设置的单选
|
||||
imageUrl: "", //上传图片地址
|
||||
loading: false,
|
||||
switchC1: "",
|
||||
checkedC1: "",
|
||||
checkedC2: true,
|
||||
@@ -474,6 +482,18 @@ export default {
|
||||
ctx.emit("update:addliveVisible", false);
|
||||
state.radioV1 = "";
|
||||
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) => {
|
||||
console.log("state", bool);
|
||||
@@ -487,23 +507,66 @@ export default {
|
||||
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 = () => {
|
||||
if (!state.inputV1) return message.info("请输入直播名称");
|
||||
if (!state.time) return message.info("请输入直播时间");
|
||||
if (!state.inputV2) return message.info("请输入直播时长");
|
||||
if (!state.inputV1) return message.warning("请输入直播名称");
|
||||
if (!state.time) return message.warning("请输入直播时间");
|
||||
if (!state.inputV2) return message.warning("请输入直播时长");
|
||||
const regular = /^[+]{0,1}(\d+)$/;
|
||||
if (!regular.test(state.inputV2)) {
|
||||
return message.info("直播时长需大于0");
|
||||
return message.warning("直播时长需大于0");
|
||||
}
|
||||
|
||||
// if (!state.inputV3) return message.info("请输入授课老师");
|
||||
let check = state.checkedC2 * 1;
|
||||
let startTime = state.time[0].$d;
|
||||
let endTime = state.time[1].$d;
|
||||
console.log(startTime); //时间需要处理
|
||||
console.log(endTime);
|
||||
// let startTime = state.time[0].$d;
|
||||
// let endTime = state.time[1].$d;
|
||||
// console.log(startTime); //时间需要处理
|
||||
// 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 = {
|
||||
afterSignIn: state.inputV6,
|
||||
beforeSignIn: state.inputV7,
|
||||
@@ -511,8 +574,8 @@ export default {
|
||||
createUser: 0,
|
||||
// liveCover: state.fileList,//直播封面
|
||||
liveDuration: state.inputV2,
|
||||
// liveEndTime: endTime,
|
||||
// liveStartTime: startTime,
|
||||
liveEndTime: endTime,
|
||||
liveStartTime: startTime,
|
||||
liveExplain: state.textV1,
|
||||
liveFlag: "",
|
||||
liveId: 0,
|
||||
@@ -532,6 +595,11 @@ export default {
|
||||
.createLiveBroadcast(obj)
|
||||
.then((res) => {
|
||||
console.log(res.data.data, 1111);
|
||||
console.log(state, 2222);
|
||||
message.success("提交成功");
|
||||
closeDrawer();
|
||||
|
||||
// state = {}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err, 2222);
|
||||
@@ -548,6 +616,8 @@ export default {
|
||||
rowSelection,
|
||||
cloradio1,
|
||||
createLiveBroadcast,
|
||||
handleChange,
|
||||
beforeUpload,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,268 +1,299 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:visible="addrefVisible"
|
||||
class="drawerStyle addrefDrawer"
|
||||
width="80%"
|
||||
title="添加外链"
|
||||
placement="right"
|
||||
@after-visible-change="afterVisibleChange"
|
||||
>
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
<div class="headerTitle">添加外链</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"
|
||||
/>
|
||||
</div>
|
||||
<div class="contentMain">
|
||||
<div class="main_left">
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<div class="sign">
|
||||
<img
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<span style="margin-right: 3px">外链名称:</span>
|
||||
<a-drawer
|
||||
:visible="addrefVisible"
|
||||
class="drawerStyle addrefDrawer"
|
||||
width="80%"
|
||||
title="添加外链"
|
||||
placement="right"
|
||||
@after-visible-change="afterVisibleChange"
|
||||
>
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
<div class="headerTitle">添加外链</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"
|
||||
/>
|
||||
</div>
|
||||
<div class="contentMain">
|
||||
<div class="main_left">
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<div class="sign">
|
||||
<img
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-input
|
||||
v-model:value="inputV1"
|
||||
style="width: 424px; height: 32px"
|
||||
placeholder="请输入外链名称"
|
||||
<span style="margin-right: 3px">外链名称:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-input
|
||||
v-model:value="inputV1"
|
||||
style="width: 424px; height: 32px"
|
||||
placeholder="请输入外链名称"
|
||||
maxlength="20"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<div class="sign">
|
||||
<img
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<span style="margin-right: 3px">链接:</span>
|
||||
</div>
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<div class="sign">
|
||||
<img
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
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 class="btnbox">
|
||||
<a-input
|
||||
v-model:value="inputV2"
|
||||
style="width: 424px; height: 32px"
|
||||
placeholder="请输入链接"
|
||||
/>
|
||||
</div>
|
||||
<div class="main_item2">
|
||||
<div class="signbox">
|
||||
<span style="margin-right: 3px">外链说明:</span>
|
||||
</div>
|
||||
<div class="textarea">
|
||||
<a-textarea
|
||||
v-model:value="textV1"
|
||||
placeholder="请输入外链说明"
|
||||
allow-clear
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_item2">
|
||||
<div class="signbox">
|
||||
<span style="margin-right: 3px">外链说明:</span>
|
||||
</div>
|
||||
<div class="textarea">
|
||||
<a-textarea
|
||||
v-model:value="textV1"
|
||||
placeholder="请输入外链说明"
|
||||
allow-clear
|
||||
/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_btns">
|
||||
<button class="btn1">取消</button>
|
||||
<button class="btn2">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
<div class="main_btns">
|
||||
<button class="btn1" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="createExternalChain">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs, ref } from "vue";
|
||||
const rowSelection = ref({
|
||||
checkStrictly: false,
|
||||
onChange: (selectedRowKeys, selectedRows) => {
|
||||
console.log(
|
||||
`selectedRowKeys: ${selectedRowKeys}`,
|
||||
"selectedRows: ",
|
||||
selectedRows
|
||||
);
|
||||
import { reactive, toRefs, ref } from "vue";
|
||||
import * as api from "../../api/indexExternalChain";
|
||||
import { message } from "ant-design-vue";
|
||||
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 {
|
||||
name: "AddRef",
|
||||
// components: {
|
||||
// },
|
||||
props: {
|
||||
addrefVisible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
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,
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
inputV1: "",
|
||||
inputV2: "",
|
||||
textV1:"",
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:addrefVisible", false);
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
inputV1: "",
|
||||
inputV2: "",
|
||||
textV1: "",
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:addrefVisible", false);
|
||||
state.inputV2 = "";
|
||||
state.inputV1 = "";
|
||||
state.textV1 = "";
|
||||
};
|
||||
const afterVisibleChange = (bool) => {
|
||||
console.log("state", bool);
|
||||
};
|
||||
const createExternalChain = () => {
|
||||
if (!state.inputV1) return message.warning("请输入外链名称");
|
||||
if (!state.inputV2) return message.warning("请输入链接");
|
||||
let obj = {
|
||||
createUser: 0,
|
||||
createTime: "",
|
||||
linkAddress: state.inputV2,
|
||||
linkDescription: state.textV1,
|
||||
linkFlag: "",
|
||||
linkId: 0,
|
||||
linkName: state.inputV1,
|
||||
linkTag: "",
|
||||
updateTime: "",
|
||||
updateUser: 0,
|
||||
};
|
||||
const afterVisibleChange = (bool) => {
|
||||
console.log("state", bool);
|
||||
};
|
||||
return {
|
||||
...toRefs(state),
|
||||
afterVisibleChange,
|
||||
closeDrawer,
|
||||
rowSelection,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
api
|
||||
.createExternalChain(obj)
|
||||
.then((res) => {
|
||||
console.log(res.data.data);
|
||||
message.success("提交成功");
|
||||
closeDrawer();
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
};
|
||||
return {
|
||||
...toRefs(state),
|
||||
afterVisibleChange,
|
||||
closeDrawer,
|
||||
rowSelection,
|
||||
createExternalChain,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.ant-table-striped :deep(.table-striped) td {
|
||||
background-color: #fafafa !important;
|
||||
}
|
||||
.addrefDrawer {
|
||||
.drawerMain {
|
||||
.header {
|
||||
height: 73px;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.headerTitle {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
line-height: 25px;
|
||||
margin-left: 24px;
|
||||
}
|
||||
.ant-table-striped :deep(.table-striped) td {
|
||||
background-color: #fafafa !important;
|
||||
}
|
||||
.addrefDrawer {
|
||||
.drawerMain {
|
||||
.header {
|
||||
height: 73px;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.headerTitle {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
line-height: 25px;
|
||||
margin-left: 24px;
|
||||
}
|
||||
.contentMain {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.main_left {
|
||||
padding-right: 30px;
|
||||
flex: 1;
|
||||
border-right: 1px solid #e8e8e8;
|
||||
.main_item {
|
||||
}
|
||||
.contentMain {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.main_left {
|
||||
padding-right: 30px;
|
||||
flex: 1;
|
||||
border-right: 1px solid #e8e8e8;
|
||||
.main_item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 32px;
|
||||
.signbox {
|
||||
width: 120px;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
align-items: center;
|
||||
margin-bottom: 32px;
|
||||
.signbox {
|
||||
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;
|
||||
}
|
||||
.sign {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
.main_item2 {
|
||||
.btnbox {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 32px;
|
||||
.signbox {
|
||||
width: 120px;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
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;
|
||||
}
|
||||
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_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;
|
||||
.main_item2 {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 32px;
|
||||
.signbox {
|
||||
width: 120px;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.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>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
</div>
|
||||
<div class="textarea">
|
||||
<a-textarea
|
||||
v-model:value="textV1"
|
||||
v-model:value="testV1"
|
||||
placeholder="请输入考试说明"
|
||||
allow-clear
|
||||
maxlength="150"
|
||||
@@ -66,6 +66,7 @@
|
||||
style="width: 424px"
|
||||
placeholder="请输入考试名称"
|
||||
:options="options1"
|
||||
v-model:value="choosedTest"
|
||||
allowClear
|
||||
showSearch
|
||||
/>
|
||||
@@ -83,6 +84,7 @@
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-range-picker
|
||||
v-model:value="testTime"
|
||||
style="width: 424px"
|
||||
:placeholder="[' 开始时间', ' 结束时间']"
|
||||
/>
|
||||
@@ -199,14 +201,17 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_btns">
|
||||
<button class="btn1">取消</button>
|
||||
<button class="btn2">确定</button>
|
||||
<button class="btn1" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="addTest">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs, ref } from "vue";
|
||||
import {message} from"ant-design-vue";
|
||||
import {createExamination} from "@/api/indexExam"
|
||||
import dayjs from 'dayjs';
|
||||
const rowSelection = ref({
|
||||
checkStrictly: false,
|
||||
onChange: (selectedRowKeys, selectedRows) => {
|
||||
@@ -244,7 +249,19 @@ export default {
|
||||
radioV2: "",
|
||||
radioV3: "",
|
||||
radioV4: "",
|
||||
choosedTest: "",
|
||||
testTime:"",
|
||||
});
|
||||
const options1 = ref([
|
||||
{
|
||||
label:'math',
|
||||
value:'math',
|
||||
},
|
||||
{
|
||||
label:'eng',
|
||||
value:'eng',
|
||||
},
|
||||
])
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:addtestVisible", false);
|
||||
state.radioV1 = "";
|
||||
@@ -252,6 +269,44 @@ export default {
|
||||
state.radioV3 = "";
|
||||
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) => {
|
||||
console.log("state", bool);
|
||||
};
|
||||
@@ -284,6 +339,8 @@ export default {
|
||||
cloradio2,
|
||||
cloradio3,
|
||||
cloradio4,
|
||||
addTest,
|
||||
options1,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -271,7 +271,8 @@
|
||||
style="width: 17px; height: 18px; margin-right: 8px"
|
||||
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 style="margin-right: 57px; cursor: pointer">
|
||||
<img
|
||||
@@ -1022,7 +1023,8 @@
|
||||
<div class="cst_main">
|
||||
<div class="cstm_header">
|
||||
<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>
|
||||
<div class="cstm_title">
|
||||
@@ -2247,6 +2249,7 @@ export default defineComponent({
|
||||
valueE1: "",
|
||||
valueE2: "",
|
||||
//确定面授
|
||||
ft_eidt:false,
|
||||
qdms_inputV1: "",
|
||||
qdms_inputV2: "",
|
||||
qdms_inputV3: "",
|
||||
@@ -2259,6 +2262,7 @@ export default defineComponent({
|
||||
gl_inputV1: "",
|
||||
gl_inputV2: "",
|
||||
//开课
|
||||
kk_eidt: false,
|
||||
kkinputV1: "",
|
||||
kkinputV2: "",
|
||||
//新建开课
|
||||
@@ -2483,7 +2487,13 @@ export default defineComponent({
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
@@ -2701,7 +2711,11 @@ export default defineComponent({
|
||||
>
|
||||
签到
|
||||
</div>
|
||||
<div class="jc">编辑</div>
|
||||
<div class="jc"
|
||||
onClick={() => {
|
||||
state.cstm_hs = true;
|
||||
state.kk_eidt = true;
|
||||
}}>编辑</div>
|
||||
<div
|
||||
class="jc"
|
||||
onClick={() => {
|
||||
@@ -2944,6 +2958,7 @@ export default defineComponent({
|
||||
};
|
||||
const ft_exit = () => {
|
||||
state.ft_hs = false;
|
||||
state.ft_eidt = false;
|
||||
state.hideshow = true;
|
||||
};
|
||||
const om_exit = () => {
|
||||
@@ -2964,6 +2979,7 @@ export default defineComponent({
|
||||
};
|
||||
const cstm_exit = () => {
|
||||
state.cstm_hs = false;
|
||||
state.kk_eidt = false;
|
||||
state.xjkkradioV1 = "";
|
||||
state.xjkkradioV2 = "";
|
||||
state.xjkkinputV1 = "";
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
<div class="co1">{{ value2.length }}/100</div>
|
||||
</div>
|
||||
<div class="btn">
|
||||
<button class="btn1">取消</button>
|
||||
<button class="btn1" @click="closeModal">取消</button>
|
||||
<button class="btn2" @click="editChapter">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -504,7 +504,7 @@
|
||||
import { reactive, toRefs, onMounted, onUnmounted } from "vue";
|
||||
import AddStu from "../../components/drawers/AddLevelAddStu";
|
||||
import ImpStu from "../../components/drawers/AddLevelImportStu";
|
||||
import * as api from "../../api/level";
|
||||
import * as api from "../../api/indexLevel";
|
||||
import { message } from "ant-design-vue";
|
||||
export default {
|
||||
name: "LevelAddDetail",
|
||||
@@ -813,6 +813,7 @@ export default {
|
||||
|
||||
//新建或编辑关卡
|
||||
const editChapter = () => {
|
||||
if(!state.value1) return message.warning("请输入关卡名称");
|
||||
let obj = {
|
||||
name: state.value1,
|
||||
remark: state.value2,
|
||||
@@ -824,6 +825,9 @@ export default {
|
||||
setTimeout(() => {
|
||||
console.log("创建成功", res);
|
||||
message.success("创建成功");
|
||||
state.value1 = "";
|
||||
state.value2 = "";
|
||||
state.modal = false;
|
||||
// state.createLoading = false;
|
||||
//state.currentPage = 1;
|
||||
// getLearnPath();
|
||||
@@ -838,14 +842,14 @@ export default {
|
||||
};
|
||||
const closeDrawer = () => {
|
||||
state.visible = false;
|
||||
state.value1 = "";
|
||||
state.value2 = "";
|
||||
};
|
||||
const showModal = () => {
|
||||
state.modal = true;
|
||||
};
|
||||
const closeModal = () => {
|
||||
state.modal = false;
|
||||
state.value1 = "";
|
||||
state.value2 = "";
|
||||
};
|
||||
const afterVisibleChange = (bool) => {
|
||||
console.log("visible", bool);
|
||||
@@ -1317,9 +1321,9 @@ export default {
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #387df7;
|
||||
border: 1px solid #409EFF;
|
||||
font-size: 14px;
|
||||
color: #387df7;
|
||||
color: #409EFF;
|
||||
cursor: pointer;
|
||||
background: #ffffff;
|
||||
margin-right: 20px;
|
||||
@@ -1332,7 +1336,7 @@ export default {
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
border: 0;
|
||||
background: #388be1;
|
||||
background: #409EFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,9 +24,11 @@
|
||||
<div class="inname">分类</div>
|
||||
</div>
|
||||
<div class="in select">
|
||||
<a-select :getPopupContainer="triggerNode => {
|
||||
return triggerNode.parentNode || document.body
|
||||
}" v-model:value="classifySelect" placeholder="四个养成" style="width: 100%" :options="classifyList"
|
||||
<a-select :getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
" v-model:value="classifySelect" placeholder="四个养成" style="width: 100%" :options="classifyList"
|
||||
@change="classificationChange" allowClear showSearch>
|
||||
</a-select>
|
||||
</div>
|
||||
@@ -42,13 +44,17 @@
|
||||
border: 1px solid rgba(78, 166, 255, 1);
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
">
|
||||
<a-upload v-model:file-list="fileList" name="file" list-type="picture-card" class="avatar-uploader"
|
||||
:show-upload-list="false" action="/api/file/upload" :before-upload="beforeUpload" @change="handleChange">
|
||||
<img style="width: 100px;height: 100px;margin-bottom: 4px;margin-right: 4px;" v-if="imageUrl"
|
||||
:src="imageUrl" alt="avatar" />
|
||||
<img style="
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
margin-bottom: 4px;
|
||||
margin-right: 4px;
|
||||
" v-if="imageUrl" :src="imageUrl" alt="avatar" />
|
||||
<div v-else>
|
||||
<!-- <loading-outlined v-if="loading"></loading-outlined> -->
|
||||
<!-- <plus-outlined v-else></plus-outlined> -->
|
||||
@@ -76,9 +82,11 @@
|
||||
<div class="inname">项目经理</div>
|
||||
</div>
|
||||
<div class="in select">
|
||||
<a-select :getPopupContainer="triggerNode => {
|
||||
return triggerNode.parentNode || document.body
|
||||
}" :value="classifySelect1" placeholder="请选择项目经理" style="width: 100%" :options="classifyList1"
|
||||
<a-select :getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
" :value="classifySelect1" placeholder="请选择项目经理" style="width: 100%" :options="classifyList1"
|
||||
@change="classificationChange1" allowClear showSearch>
|
||||
</a-select>
|
||||
</div>
|
||||
@@ -188,11 +196,13 @@
|
||||
<script>
|
||||
import { reactive, toRefs, ref } from "vue";
|
||||
import { message } from 'ant-design-vue';
|
||||
import { useRouter } from "vue-router";
|
||||
import * as api from "../../api/index";
|
||||
|
||||
export default {
|
||||
name: "projectAdd",
|
||||
setup() {
|
||||
const router = useRouter();
|
||||
const state = reactive({
|
||||
classifySelect: null,
|
||||
classifySelectId: null,
|
||||
@@ -315,8 +325,8 @@ export default {
|
||||
// 项目时间选择函数
|
||||
console.log('Formatted Selected Time: ', dateString);
|
||||
console.log('Formatted Selected TimeStamp', new Date(dateString[0]).getTime())
|
||||
beginTime = new Date(dateString[0]).getTime();
|
||||
endTime = new Date(dateString[1]).getTime();
|
||||
beginTime = new Date(dateString[0]).getTime() / 1000;
|
||||
endTime = new Date(dateString[1]).getTime() / 1000;
|
||||
};
|
||||
|
||||
|
||||
@@ -409,7 +419,7 @@ export default {
|
||||
"boeFlag": boeFlag,
|
||||
"attach": attach,
|
||||
"templateId": 10,
|
||||
|
||||
"parentId": 0,
|
||||
"category": 0,
|
||||
"notice": "",
|
||||
"noticeFlag": 0,
|
||||
@@ -427,8 +437,19 @@ export default {
|
||||
|
||||
api.createProject(obj).then(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 => {
|
||||
console.log(err)
|
||||
message.destroy();
|
||||
message.error("创建失败,请检查当前网络状态。")
|
||||
})
|
||||
};
|
||||
|
||||
@@ -726,8 +747,8 @@ export default {
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
background: #409EFF;
|
||||
color: #FFFFFF;
|
||||
background: #409eff;
|
||||
color: #ffffff;
|
||||
margin-right: 14px;
|
||||
}
|
||||
|
||||
@@ -738,9 +759,9 @@ export default {
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #409EFF;
|
||||
background: #FFFFFF;
|
||||
color: #409EFF;
|
||||
border: 1px solid #409eff;
|
||||
background: #ffffff;
|
||||
color: #409eff;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -15,7 +15,13 @@
|
||||
<div class="btnText">添加阶段</div>
|
||||
</div>
|
||||
<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="tit">{{ item.tit }}</div>
|
||||
<div class="name">{{ item.name }}</div>
|
||||
@@ -506,7 +512,7 @@
|
||||
<div class="btnText" @click="delete_exit">取消</div>
|
||||
</div>
|
||||
<div class="del_btn btn2">
|
||||
<div class="btnText" @click="showModal">确定</div>
|
||||
<div class="btnText" @click="showModal1">确定</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -530,6 +536,10 @@ import AddActive from "../../components/drawers/AddActive.vue";
|
||||
import AddEval from "../../components/drawers/AddEval.vue";
|
||||
import AddInvist from "../../components/drawers/AddInvist.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 = [
|
||||
{
|
||||
title: "项目名称",
|
||||
@@ -648,6 +658,8 @@ export default {
|
||||
name: "中级产品经理",
|
||||
},
|
||||
],
|
||||
|
||||
//任务数据
|
||||
tableData: [
|
||||
{
|
||||
key: 1,
|
||||
@@ -841,7 +853,8 @@ export default {
|
||||
cancelModal: false, //确认取消阶段弹窗
|
||||
deleteModal: false, //确认删除弹窗
|
||||
isactive: -1,
|
||||
isActive:false,
|
||||
isActive: false,
|
||||
deleteLiveID: null, //删除直播id
|
||||
});
|
||||
const selectProjectName = (value, index) => {
|
||||
console.log("value", value, index);
|
||||
@@ -966,6 +979,7 @@ export default {
|
||||
style="color:#4EA6FF;cursor:pointer"
|
||||
onClick={() => {
|
||||
showDelete();
|
||||
{/* deleteEvalText(); */}
|
||||
}}
|
||||
>
|
||||
删除
|
||||
@@ -978,6 +992,59 @@ export default {
|
||||
];
|
||||
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) => {
|
||||
console.log("selectedRowKeys changed: ", selectedRowKeys);
|
||||
state.selectedRowKeys = selectedRowKeys;
|
||||
@@ -996,6 +1063,10 @@ export default {
|
||||
//关闭确认框
|
||||
closeConfirm();
|
||||
};
|
||||
const showModal1 = () => {
|
||||
//关闭确认框
|
||||
state.deleteModal = false;
|
||||
};
|
||||
const closeModal = () => {
|
||||
state.stage = false;
|
||||
};
|
||||
@@ -1003,6 +1074,7 @@ export default {
|
||||
document.getElementsByTagName("main")[0].style.background =
|
||||
"rgb(245, 247, 250,1)";
|
||||
document.getElementsByTagName("main")[0].style.boxShadow = "none";
|
||||
getTask();
|
||||
});
|
||||
onUnmounted(() => {
|
||||
document.getElementsByTagName("main")[0].style.background = "#ffffff";
|
||||
@@ -1066,7 +1138,7 @@ export default {
|
||||
const changebgc = (index) => {
|
||||
state.isactive = index;
|
||||
state.isActive = !state.isActive;
|
||||
}
|
||||
};
|
||||
return {
|
||||
...toRefs(state),
|
||||
selectProjectName,
|
||||
@@ -1093,10 +1165,14 @@ export default {
|
||||
showConfirm,
|
||||
closeConfirm,
|
||||
showCancel,
|
||||
showModal1,
|
||||
closeCancel,
|
||||
showDelete,
|
||||
closeDelete,
|
||||
changebgc,
|
||||
getTask,
|
||||
deleteLiveBroadcast,
|
||||
deleteEvalText,
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -1226,10 +1302,10 @@ export default {
|
||||
padding: 0 !important;
|
||||
.modalHeader {
|
||||
background: linear-gradient(
|
||||
0deg,
|
||||
rgba(78, 166, 255, 0) 0%,
|
||||
rgba(78, 166, 255, 0.2) 100%
|
||||
);
|
||||
0deg,
|
||||
rgba(78, 166, 255, 0) 0%,
|
||||
rgba(78, 166, 255, 0.2) 100%
|
||||
);
|
||||
}
|
||||
.modalMain {
|
||||
.ant-input-textarea-show-count {
|
||||
@@ -1327,8 +1403,8 @@ export default {
|
||||
.in {
|
||||
margin-left: 14px;
|
||||
flex: 1;
|
||||
.ant-radio-wrapper {
|
||||
}
|
||||
// .ant-radio-wrapper {
|
||||
// }
|
||||
.ant-input-affix-wrapper {
|
||||
width: 384px;
|
||||
border-radius: 8px;
|
||||
@@ -1527,9 +1603,9 @@ export default {
|
||||
right: 16px;
|
||||
}
|
||||
}
|
||||
.bgcactive{
|
||||
opacity:1;
|
||||
transition:all .5s;
|
||||
.bgcactive {
|
||||
opacity: 1;
|
||||
transition: all 0.5s;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user