feat:合并

This commit is contained in:
lixg
2022-12-20 15:59:59 +08:00
11 changed files with 2908 additions and 2877 deletions

View File

@@ -317,6 +317,7 @@ export default {
textV2: "", textV2: "",
radioV1: "", radioV1: "",
time: "", time: "",
isClick: false
}); });
const closeDrawer = () => { const closeDrawer = () => {
ctx.emit("update:addactiveVisible", false); ctx.emit("update:addactiveVisible", false);
@@ -464,6 +465,13 @@ export default {
return message.warning("请输入活动地址"); return message.warning("请输入活动地址");
} }
if(state.isClick){
message.destroy();
message.error('请勿频繁点击')
return
}
state.isClick = true;
let obj = { let obj = {
activityAddress: state.inputV3, //活动地址 activityAddress: state.inputV3, //活动地址
activityDuration: state.inputV2, //活动时长 activityDuration: state.inputV2, //活动时长
@@ -489,10 +497,12 @@ export default {
ctx.emit("changeData", false); ctx.emit("changeData", false);
message.destroy(); message.destroy();
message.success("更新成功"); message.success("更新成功");
state.isClick = false;
}) })
.catch(() => { .catch(() => {
message.destroy(); message.destroy();
message.error("更新失败"); message.error("更新失败");
state.isClick = false;
}); });
} else { } else {
//新建活动信息 //新建活动信息
@@ -504,10 +514,12 @@ export default {
closeDrawer(); closeDrawer();
await updateTask(res); await updateTask(res);
ctx.emit("changeData", false); ctx.emit("changeData", false);
state.isClick = false;
}) })
.catch(() => { .catch(() => {
message.destroy(); message.destroy();
message.error("创建失败"); message.error("创建失败");
state.isClick = false;
}); });
} }
}; };

View File

@@ -171,6 +171,7 @@ export default {
time: undefined, time: undefined,
caseId: null, caseId: null,
caseName: "", caseName: "",
isClick: false
}); });
const closeDrawer = () => { const closeDrawer = () => {
ctx.emit("update:addcaseVisible", false); ctx.emit("update:addcaseVisible", false);
@@ -279,6 +280,12 @@ export default {
message.destroy(); message.destroy();
return message.warning("请先选中关卡"); return message.warning("请先选中关卡");
} }
if(state.isClick){
message.destroy();
message.error('请勿频繁点击')
return
}
state.isClick = true;
for (let i = 0; i < state.apiTaskList.length; i++) { for (let i = 0; i < state.apiTaskList.length; i++) {
RouterEditTask({ RouterEditTask({
chapterId: props.isactive, chapterId: props.isactive,
@@ -293,12 +300,20 @@ export default {
ctx.emit("changeData", false); ctx.emit("changeData", false);
closeDrawer(); closeDrawer();
state.addLoading = false; state.addLoading = false;
state.isClick = false;
}) })
.catch(() => { .catch(() => {
message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`); message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
state.isClick = false;
}); });
} }
} else if (props.isLevel == 2) { } else if (props.isLevel == 2) {
if(state.isClick){
message.destroy();
message.error('请勿频繁点击')
return
}
state.isClick = true;
for (let i = 0; i < state.apiTaskList.length; i++) { for (let i = 0; i < state.apiTaskList.length; i++) {
apiTask apiTask
.addTask({ .addTask({
@@ -314,13 +329,21 @@ export default {
message.success(`${props.edit ? "编辑" : "新增"}任务成功`); message.success(`${props.edit ? "编辑" : "新增"}任务成功`);
ctx.emit("changeData", false); ctx.emit("changeData", false);
closeDrawer(); closeDrawer();
state.isClick = false;
}) })
.catch(() => { .catch(() => {
message.destroy(); message.destroy();
message.error(`${props.edit ? "编辑" : "新增"}任务失败`); message.error(`${props.edit ? "编辑" : "新增"}任务失败`);
state.isClick = false;
}); });
} }
} else if (props.isLevel == 3) { } else if (props.isLevel == 3) {
if(state.isClick){
message.destroy();
message.error('请勿频繁点击')
return
}
state.isClick = true;
for (let i = 0; i < state.apiTaskList.length; i++) { for (let i = 0; i < state.apiTaskList.length; i++) {
apiTask apiTask
.addTaskTemplate({ .addTaskTemplate({
@@ -336,10 +359,12 @@ export default {
message.success(`${props.edit ? "编辑" : "新增"}任务成功`); message.success(`${props.edit ? "编辑" : "新增"}任务成功`);
ctx.emit("changeData", false); ctx.emit("changeData", false);
closeDrawer(); closeDrawer();
state.isClick = false;
}) })
.catch(() => { .catch(() => {
message.destroy(); message.destroy();
message.error(`${props.edit ? "编辑" : "新增"}任务失败`); message.error(`${props.edit ? "编辑" : "新增"}任务失败`);
state.isClick = false;
}); });
} }
} }

View File

@@ -495,6 +495,7 @@ export default {
innerPersion: false, innerPersion: false,
outPersion: false, outPersion: false,
assessmentName: null, assessmentName: null,
isClick: false
}); });
const clear = () => { const clear = () => {
state.courseName = ""; state.courseName = "";
@@ -643,6 +644,12 @@ export default {
message.destroy(); message.destroy();
return message.warning("请输入必填字段"); return message.warning("请输入必填字段");
} else { } else {
if(state.isClick){
message.destroy();
message.error("请勿频繁点击")
return
}
state.isClick = true;
let type = state.onlySign ? "1," : "0,"; let type = state.onlySign ? "1," : "0,";
let t = state.completeLeave ? "1" : "0"; let t = state.completeLeave ? "1" : "0";
let p = state.innerPersion ? "1," : "0,"; let p = state.innerPersion ? "1," : "0,";
@@ -681,10 +688,12 @@ export default {
// message.success(`添加成功`); // message.success(`添加成功`);
await updateTask(res); await updateTask(res);
ctx.emit("changeData", false); ctx.emit("changeData", false);
state.isClick = false;
closeDrawer(); closeDrawer();
}) })
.catch((e) => { .catch((e) => {
console.log(e); console.log(e);
state.isClick = false;
message.destroy(); message.destroy();
message.error(`添加失败`); message.error(`添加失败`);
}); });

View File

@@ -194,6 +194,7 @@ export default {
const state = reactive({ const state = reactive({
addLoading: false, addLoading: false,
workEnclosureAddress: "", workEnclosureAddress: "",
isClick: false
}); });
const formRef = ref(); const formRef = ref();
@@ -364,29 +365,47 @@ export default {
workName: formState.workName, workName: formState.workName,
workRequirement: formState.workRequirement, workRequirement: formState.workRequirement,
}; };
if (props.EditWorkId > 0) { if (props.EditWorkId > 0) {
if(state.isClick){
message.destroy();
message.error('请勿频繁点击')
return
}
state.isClick = true;
updateWorkTaskUsing(obj) updateWorkTaskUsing(obj)
.then(async (res) => { .then(async (res) => {
// console.log("添加成功", res); // console.log("添加成功", res);
await updateTask(res); await updateTask(res);
ctx.emit("changeData", false); ctx.emit("changeData", false);
closeDrawer(); closeDrawer();
state.isClick = false;
}) })
.catch((err) => { .catch((err) => {
message.destroy(); message.destroy();
message.error(`添加失败${err}`); message.error(`添加失败${err}`);
state.isClick = false;
}); });
} else { } else {
if(state.isClick){
message.destroy();
message.error('请勿频繁点击')
return
}
state.isClick = true;
createWorkTask(obj) createWorkTask(obj)
.then(async (res) => { .then(async (res) => {
console.log("添加成功", res); console.log("添加成功", res);
await updateTask(res); await updateTask(res);
ctx.emit("changeData", false); ctx.emit("changeData", false);
closeDrawer(); closeDrawer();
state.isClick = false;
}) })
.catch((err) => { .catch((err) => {
message.destroy(); message.destroy();
message.error(`添加失败${err}`); message.error(`添加失败${err}`);
state.isClick = false;
}); });
} }
}; };

View File

@@ -1,472 +1,509 @@
<template> <template>
<a-drawer <a-drawer :visible="addinvistVisible" class="drawerStyle addinvistDrawer" width="70%" title="添加评估" placement="right"
:visible="addinvistVisible" @after-visible-change="afterVisibleChange">
class="drawerStyle addinvistDrawer" <div class="drawerMain">
width="70%" <div class="header">
title="添加评估" <div v-if="edit" class="headerTitle">编辑评估</div>
placement="right" <div v-else class="headerTitle">添加评估</div>
@after-visible-change="afterVisibleChange" <img style="width: 29px; height: 29px; cursor: pointer" src="../../assets/images/basicinfo/close.png"
> @click="closeDrawer" />
<div class="drawerMain"> </div>
<div class="header"> <div class="contentMain">
<div v-if="edit" class="headerTitle">编辑评估</div> <div class="main">
<div v-else class="headerTitle">添加评估</div> <div class="main_left">
<img <AssessmentAll v-model:assessmentVisible="assessmentVisible" v-model:assessmentId="assessmentId"
style="width: 29px; height: 29px; cursor: pointer" v-model:assessmentName="assessmentName" />
src="../../assets/images/basicinfo/close.png" </div>
@click="closeDrawer" </div>
/> </div>
</div> <div class="main_btns">
<div class="contentMain"> <button class="btn1" @click="closeDrawer">取消</button>
<div class="main"> <button class="btn2" @click="updateTask">确定</button>
<div class="main_left"> </div>
<AssessmentAll </div>
v-model:assessmentVisible="assessmentVisible" </a-drawer>
v-model:assessmentId="assessmentId"
v-model:assessmentName="assessmentName"
/>
</div>
</div>
</div>
<div class="main_btns">
<button class="btn1" @click="closeDrawer">取消</button>
<button class="btn2" @click="updateTask">确定</button>
</div>
</div>
</a-drawer>
</template> </template>
<script> <script>
import { reactive, toRefs } from "vue"; import { reactive, toRefs } from "vue";
import * as apiTask from "../../api/indexTaskadd"; import * as apiTask from "../../api/indexTaskadd";
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
import { import {
RouterEditTask, RouterEditTask,
IsExistence, IsExistence,
IsExistenceProject, IsExistenceProject,
IsExistenceProjectTemplate, IsExistenceProjectTemplate,
} from "@/api/indexTask"; } from "@/api/indexTask";
import { addTempTask } from "../../api/indexTaskadd"; import { addTempTask } from "../../api/indexTaskadd";
import AssessmentAll from "@/components/drawers/AssessmentAll.vue"; import AssessmentAll from "@/components/drawers/AssessmentAll.vue";
export default { export default {
name: "AddInvist", name: "AddInvist",
components: { components: {
AssessmentAll, AssessmentAll,
}, },
props: { props: {
addinvistVisible: { addinvistVisible: {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
EditInvistId: { EditInvistId: {
type: Number, type: Number,
default: null, default: null,
}, },
edit: { edit: {
// 是否为编辑 // 是否为编辑
type: Boolean, type: Boolean,
default: null, default: null,
}, },
projectId: { projectId: {
type: Number, type: Number,
default: null, default: null,
}, },
chooseStageId: { chooseStageId: {
type: Number, type: Number,
default: null, default: null,
}, },
routerTaskId: { routerTaskId: {
type: Number, type: Number,
default: 0, default: 0,
}, },
isLevel: { isLevel: {
// 是否是关卡页面触发 // 是否是关卡页面触发
type: Number, type: Number,
default: null, default: null,
}, },
projectTaskId: { projectTaskId: {
// 要编辑的projectId // 要编辑的projectId
type: Number, type: Number,
default: null, default: null,
}, },
routerId: { routerId: {
type: Number, type: Number,
default: null, default: null,
}, },
isactive: { isactive: {
type: Number, type: Number,
default: null, default: null,
}, },
projectTemplateId: { projectTemplateId: {
type: Number, type: Number,
default: null, default: null,
}, },
}, },
setup(props, ctx) { setup(props, ctx) {
const state = reactive({ const state = reactive({
inputV1: "", inputV1: "",
time: undefined, time: undefined,
currentPage: 1, currentPage: 1,
pageSize: 10, pageSize: 10,
tableDataTotal: 0, tableDataTotal: 0,
tableData: [], tableData: [],
assessmentId: null, assessmentId: null,
assessmentName: "", assessmentName: "",
assessment: null, assessment: null,
assessment1: null, assessment1: null,
assessmentVisible: false, assessmentVisible: false,
titleTag: false, titleTag: false,
}); isClick: false
// const getCheckedAss = (ass) => { });
// state.assessmentId = ass.assessmentId; // const getCheckedAss = (ass) => {
// state.assessment = ass; // state.assessmentId = ass.assessmentId;
// console.log("state.assessment1",state.assessment); // state.assessment = ass;
// // console.log("state.assessment1",state.assessment);
// }; //
// };
const closeDrawer = () => { const closeDrawer = () => {
ctx.emit("update:addinvistVisible", false); ctx.emit("update:addinvistVisible", false);
ctx.emit("update:edit", false); ctx.emit("update:edit", false);
state.assessmentId = null; state.assessmentId = null;
state.assessmentName = null; state.assessmentName = null;
state.inputV1 = ""; state.inputV1 = "";
// ctx.emit("changeData", false); // ctx.emit("changeData", false);
localStorage.setItem("stageId", props.chooseStageId); localStorage.setItem("stageId", props.chooseStageId);
localStorage.setItem("chapterId", props.isactive); localStorage.setItem("chapterId", props.isactive);
}; };
const checkAssDrawer = () => { const checkAssDrawer = () => {
state.assessmentVisible = true; state.assessmentVisible = true;
}; };
const afterVisibleChange = (bool) => { const afterVisibleChange = (bool) => {
if (bool && props.EditInvistId > 0) { if (bool && props.EditInvistId > 0) {
state.assessmentVisible = true; state.assessmentVisible = true;
state.assessmentId = props.EditInvistId; state.assessmentId = props.EditInvistId;
} else { } else {
state.assessmentId = null; state.assessmentId = null;
state.assessmentName = null; state.assessmentName = null;
} }
}; };
const updateTask = () => { const updateTask = () => {
console.log( console.log(
"state.assessmentId ", "state.assessmentId ",
state.assessmentId, state.assessmentId,
state.assessmentName state.assessmentName
); );
if (!state.assessmentId) { if (!state.assessmentId) {
return message.warning("请选择评估"); return message.warning("请选择评估");
} }
let l_data_id = []; let l_data_id = [];
l_data_id.push(Number(state.assessmentId)); l_data_id.push(Number(state.assessmentId));
console.log("state.assessment", state.assessment, state.assessmentId); console.log("state.assessment", state.assessment, state.assessmentId);
if (props.isLevel == 1) { if (props.isLevel == 1) {
if (!props.isactive) { if (!props.isactive) {
message.destroy(); message.destroy();
return message.warning("请先选中关卡"); return message.warning("请先选中关卡");
} }
IsExistence({ if(state.isClick){
chapterId: Number(props.isactive), message.destroy();
courseTaskId: l_data_id, message.error('请勿频繁点击')
routerId: props.routerId, return
type: 11, }
}) state.isClick = true;
.then((res) => { IsExistence({
console.log("shifouchongfu", res); chapterId: Number(props.isactive),
console.log("路径图中是否包含此评估了", res); courseTaskId: l_data_id,
if (res.data.data.length) { routerId: props.routerId,
let strdata = res.data.data; type: 11,
let tipStr = ""; })
for (let i = 0; i < strdata.length; i++) { .then((res) => {
if (i == strdata.length - 1) { console.log("shifouchongfu", res);
tipStr += strdata[i].courseName; console.log("路径图中是否包含此评估了", res);
} else { if (res.data.data.length) {
tipStr += strdata[i].courseName + "/"; let strdata = res.data.data;
} let tipStr = "";
} for (let i = 0; i < strdata.length; i++) {
message.destroy(); if (i == strdata.length - 1) {
message.warning("评估(" + tipStr + ")重复添加"); tipStr += strdata[i].courseName;
return; } else {
} else { tipStr += strdata[i].courseName + "/";
RouterEditTask({ }
chapterId: props.isactive, }
courseId: state.assessmentId, message.destroy();
name: state.assessmentName, message.warning("评估(" + tipStr + ")重复添加");
routerId: props.routerId, state.isClick = false;
routerTaskId: props.routerTaskId || 0, return;
type: 11, } else {
}) RouterEditTask({
.then(() => { chapterId: props.isactive,
message.destroy(); courseId: state.assessmentId,
message.success( name: state.assessmentName,
`${props.edit ? "编辑" : "新增"}关卡任务成功` routerId: props.routerId,
); routerTaskId: props.routerTaskId || 0,
ctx.emit("changeData", false); type: 11,
closeDrawer(); })
state.addLoading = false; .then(() => {
}) message.destroy();
.catch(() => { message.success(
message.destroy(); `${props.edit ? "编辑" : "新增"}关卡任务成功`
message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`); );
}); ctx.emit("changeData", false);
} closeDrawer();
}) state.addLoading = false;
.catch((err) => { state.isClick = false;
console.log(err); })
}); .catch(() => {
} else if (props.isLevel == 2) { message.destroy();
IsExistenceProject({ message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
courseTaskId: l_data_id, state.isClick = false;
projectId: props.projectId, });
stageId: props.chooseStageId || 0, }
type: 11, })
}) .catch((err) => {
.then((res) => { console.log(err);
console.log(res); state.isClick = false;
console.log("项目中是否包含此评估了", res); });
if (res.data.data.length) { } else if (props.isLevel == 2) {
let strdata = res.data.data; if(state.isClick){
let tipStr = ""; message.destroy();
for (let i = 0; i < strdata.length; i++) { message.error('请勿频繁点击')
if (i == strdata.length - 1) { return
tipStr += strdata[i].courseName; }
} else { state.isClick = true;
tipStr += strdata[i].courseName + "/"; IsExistenceProject({
} courseTaskId: l_data_id,
} projectId: props.projectId,
message.destroy(); stageId: props.chooseStageId || 0,
message.warning("评估(" + tipStr + ")重复添加"); type: 11,
return; })
} else { .then((res) => {
apiTask console.log(res);
.addTask({ console.log("项目中是否包含此评估了", res);
courseId: state.assessmentId, if (res.data.data.length) {
name: state.assessmentName, let strdata = res.data.data;
projectId: props.projectId, let tipStr = "";
projectTaskId: props.projectTaskId || 0, for (let i = 0; i < strdata.length; i++) {
stageId: props.chooseStageId || 0, if (i == strdata.length - 1) {
type: 11, tipStr += strdata[i].courseName;
}) } else {
.then(() => { tipStr += strdata[i].courseName + "/";
message.success(`${props.edit ? "编辑" : "新增"}任务成功`); }
ctx.emit("changeData", false); }
closeDrawer(); message.destroy();
}) message.warning("评估(" + tipStr + ")重复添加");
.catch(() => { state.isClick = false;
message.error(`${props.edit ? "编辑" : "新增"}任务失败`); return;
}); } else {
} apiTask
}) .addTask({
.catch((err) => { courseId: state.assessmentId,
console.log(err); name: state.assessmentName,
}); projectId: props.projectId,
} else if (props.isLevel == 3) { projectTaskId: props.projectTaskId || 0,
IsExistenceProjectTemplate({ stageId: props.chooseStageId || 0,
courseTaskId: l_data_id, type: 11,
projectTemplateId: props.projectTemplateId, })
stageId: props.chooseStageId || 0, .then(() => {
type: 11, message.success(`${props.edit ? "编辑" : "新增"}任务成功`);
}).then((res) => { ctx.emit("changeData", false);
console.log(res); closeDrawer();
console.log("项目中是否包含此评估了", res); state.isClick = false;
if (res.data.data.length) { })
let strdata = res.data.data; .catch(() => {
let tipStr = ""; message.error(`${props.edit ? "编辑" : "新增"}任务失败`);
for (let i = 0; i < strdata.length; i++) { state.isClick = false;
if (i == strdata.length - 1) { });
tipStr += strdata[i].courseName; }
} else { })
tipStr += strdata[i].courseName + "/"; .catch((err) => {
} console.log(err);
} state.isClick = false;
message.destroy(); });
message.warning("评估(" + tipStr + ")重复添加"); } else if (props.isLevel == 3) {
return; if(state.isClick){
} else { message.destroy();
addTempTask({ message.error('请勿频繁点击')
courseId: state.assessmentId, return
name: state.assessmentName, }
projectTemplateId: props.projectTemplateId, state.isClick = true;
projectTaskId: props.projectTaskId || 0, IsExistenceProjectTemplate({
stageId: props.chooseStageId || 0, courseTaskId: l_data_id,
type: 11, projectTemplateId: props.projectTemplateId,
}) templateStageId: props.chooseStageId || 0,
.then(() => { type: 11,
message.destroy(); }).then((res) => {
message.success(`${props.edit ? "编辑" : "新增"}任务成功`); console.log(res);
ctx.emit("changeData", false); console.log("项目中是否包含此评估了", res);
closeDrawer(); if (res.data.data.length) {
}) let strdata = res.data.data;
.catch(() => { let tipStr = "";
message.destroy(); for (let i = 0; i < strdata.length; i++) {
message.error(`${props.edit ? "编辑" : "新增"}任务失败`); if (i == strdata.length - 1) {
}); tipStr += strdata[i].courseName;
} } else {
}); tipStr += strdata[i].courseName + "/";
} }
}; }
message.destroy();
message.warning("评估(" + tipStr + ")重复添加");
state.isClick = false;
return;
} else {
addTempTask({
courseId: state.assessmentId,
name: state.assessmentName,
projectTemplateId: props.projectTemplateId,
projectTaskId: props.projectTaskId || 0,
stageId: props.chooseStageId || 0,
type: 11,
})
.then(() => {
message.destroy();
message.success(`${props.edit ? "编辑" : "新增"}任务成功`);
ctx.emit("changeData", false);
closeDrawer();
state.isClick = false;
})
.catch(() => {
message.destroy();
message.error(`${props.edit ? "编辑" : "新增"}任务失败`);
state.isClick = false;
});
}
});
}
};
return { return {
...toRefs(state), ...toRefs(state),
afterVisibleChange, afterVisibleChange,
closeDrawer, closeDrawer,
updateTask, updateTask,
checkAssDrawer, checkAssDrawer,
}; };
}, },
}; };
</script> </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;
} }
.addinvistDrawer { .addinvistDrawer {
.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 {
font-size: 18px;
font-weight: 600;
color: #333333;
line-height: 25px;
margin-left: 24px;
}
}
.contentMain {
.main {
width: 100%;
.main_left {
padding-right: 30px;
margin-top: 32px;
.main_item {
display: flex;
align-items: center;
.fi_input { .headerTitle {
margin-right: 20px; font-size: 18px;
} font-weight: 600;
.btns { color: #333333;
margin-right: 20px; line-height: 25px;
padding: 0px 26px 0px 26px; margin-left: 24px;
height: 38px; }
background: #4ea6ff; }
border-radius: 8px;
//border: 1px solid rgba(64, 158, 255, 1);
display: flex;
align-items: center;
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;
}
}
.btnsn {
padding: 0px 26px 0px 26px;
height: 38px;
background: #ffffff;
border-radius: 8px;
border: 1px solid rgba(64, 158, 255, 1);
display: flex;
align-items: center;
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: #4ea6ff;
line-height: 36px;
margin-left: 5px;
}
}
}
.main_notice {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 3px;
height: 40px;
background-color: #e9f6fe;
.mntc_left {
display: flex;
align-items: center;
.title {
color: rgba(0, 0, 0, 0.65);
margin-right: 17px;
}
.data {
color: #4ea6ff;
}
.notice_icon {
width: 14px;
height: 14px;
margin-right: 9px;
margin-left: 9px;
background-image: url(@/assets/images/coursewareManage/gan.png);
background-size: 100% 100%;
}
}
.mntc_right {
cursor: pointer;
}
}
}
}
}
.main_btns { .contentMain {
height: 72px; .main {
width: 100%; width: 100%;
bottom: 0; .main_left {
left: 0; padding-right: 30px;
display: flex; margin-top: 32px;
align-items: center;
justify-content: center; .main_item {
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16); display: flex;
.btn1 { align-items: center;
width: 100px;
height: 40px; .fi_input {
border: 1px solid #4ea6ff; margin-right: 20px;
border-radius: 8px; }
color: #4ea6ff;
background-color: #fff; .btns {
cursor: pointer; margin-right: 20px;
} padding: 0px 26px 0px 26px;
.btn2 { height: 38px;
cursor: pointer; background: #4ea6ff;
width: 100px; border-radius: 8px;
height: 40px; //border: 1px solid rgba(64, 158, 255, 1);
background: #4ea6ff; display: flex;
border-radius: 8px; align-items: center;
border: 0; justify-content: center;
margin-left: 15px; margin-right: 14px;
color: #fff; 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;
}
}
.btnsn {
padding: 0px 26px 0px 26px;
height: 38px;
background: #ffffff;
border-radius: 8px;
border: 1px solid rgba(64, 158, 255, 1);
display: flex;
align-items: center;
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: #4ea6ff;
line-height: 36px;
margin-left: 5px;
}
}
}
.main_notice {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 3px;
height: 40px;
background-color: #e9f6fe;
.mntc_left {
display: flex;
align-items: center;
.title {
color: rgba(0, 0, 0, 0.65);
margin-right: 17px;
}
.data {
color: #4ea6ff;
}
.notice_icon {
width: 14px;
height: 14px;
margin-right: 9px;
margin-left: 9px;
background-image: url(@/assets/images/coursewareManage/gan.png);
background-size: 100% 100%;
}
}
.mntc_right {
cursor: pointer;
}
}
}
}
}
.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

@@ -485,6 +485,7 @@ export default {
switchC2: false, switchC2: false,
assessmentVisible: false, assessmentVisible: false,
assessmentName: "", assessmentName: "",
isClick: false
}); });
const closeDrawer = () => { const closeDrawer = () => {
ctx.emit("update:addliveVisible", false); ctx.emit("update:addliveVisible", false);
@@ -699,6 +700,13 @@ export default {
message.destroy(); message.destroy();
return message.warning("请输入直播公告"); return message.warning("请输入直播公告");
} }
if(state.isClick){
message.destroy();
message.error('请勿频繁点击')
return
}
state.isClick = true;
const regular = /^[+]{0,1}(\d+)$/; const regular = /^[+]{0,1}(\d+)$/;
if (!regular.test(state.inputV2)) { if (!regular.test(state.inputV2)) {
message.destroy(); message.destroy();
@@ -749,9 +757,11 @@ export default {
message.success("提交成功"); message.success("提交成功");
closeDrawer(); closeDrawer();
await updateTask(res); await updateTask(res);
state.isClick = false;
}) })
.catch((err) => { .catch((err) => {
console.log(err); console.log(err);
state.isClick = false;
}); });
} else { } else {
api api
@@ -761,8 +771,11 @@ export default {
message.success("提交成功"); message.success("提交成功");
await updateTask(res); await updateTask(res);
closeDrawer(); closeDrawer();
state.isClick = false;
}) })
.catch(() => {}); .catch(() => {
state.isClick = false;
});
} }
}; };
const beforeUpload = (file) => { const beforeUpload = (file) => {

File diff suppressed because it is too large Load Diff

View File

@@ -155,6 +155,7 @@ export default {
inputV2: "", inputV2: "",
textV1: "", textV1: "",
title: null, title: null,
isClick: false
}); });
const closeDrawer = () => { const closeDrawer = () => {
ctx.emit("update:addrefVisible", false); ctx.emit("update:addrefVisible", false);
@@ -253,6 +254,14 @@ export default {
return message.warning("请输入合法的链接地址"); return message.warning("请输入合法的链接地址");
} }
} }
if(state.isClick){
message.destroy();
message.error('请勿频繁点击')
return
}
state.isClick = true;
let obj = { let obj = {
linkAddress: state.inputV2, linkAddress: state.inputV2,
linkDescription: state.textV1, linkDescription: state.textV1,
@@ -266,8 +275,11 @@ export default {
message.success("编辑成功"); message.success("编辑成功");
await updateTask(res); await updateTask(res);
ctx.emit("changeData", false); ctx.emit("changeData", false);
state.isClick = false;
}) })
.catch(() => {}); .catch(() => {
state.isClick = false;
});
} else { } else {
api api
.createExternalChain(obj) .createExternalChain(obj)
@@ -275,8 +287,11 @@ export default {
message.success("提交成功"); message.success("提交成功");
await updateTask(res); await updateTask(res);
ctx.emit("changeData", false); ctx.emit("changeData", false);
state.isClick = false;
}) })
.catch(() => {}); .catch(() => {
state.isClick = false;
});
} }
}; };
// 查询任务 // 查询任务

File diff suppressed because it is too large Load Diff

View File

@@ -362,7 +362,7 @@ const {
loading: audiLoading, loading: audiLoading,
total: audiTotal total: audiTotal
} = useBoeApiPage(AUDIENCE_LIST, audienceName.value, { } = useBoeApiPage(AUDIENCE_LIST, audienceName.value, {
init: false, init: true,
result: res => res.result.audienceList.map(e => ({...e, id: e.id + ''})), result: res => res.result.audienceList.map(e => ({...e, id: e.id + ''})),
totalPage: res => res.result.totalPage, totalPage: res => res.result.totalPage,
total: res => res.result.totalElement total: res => res.result.totalElement
@@ -612,6 +612,7 @@ watch(visiable, () => {
stuSelectKeys.value = [] stuSelectKeys.value = []
orgSelectKeys.value = [] orgSelectKeys.value = []
auditSelectKeys.value = [] auditSelectKeys.value = []
stuData.value = []
selectsData.value = { selectsData.value = {
stageId: '', stageId: '',
studentList: [], studentList: [],

File diff suppressed because it is too large Load Diff