This commit is contained in:
yuping
2022-12-01 02:23:32 +08:00
parent 99ea3719f0
commit 07be52e211
2 changed files with 49 additions and 17 deletions

View File

@@ -57,7 +57,8 @@
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-checkbox v-model:checked="checkedC1" @change="checkRadio" <a-checkbox v-model:checked="checkedC1" @change="checkRadio"
>允许评论</a-checkbox >允许评论
</a-checkbox
> >
</div> </div>
</div> </div>
@@ -71,12 +72,13 @@
</a-drawer> </a-drawer>
</template> </template>
<script> <script>
import { reactive, toRefs } from "vue"; import {reactive, toRefs} from "vue";
import * as api from "../../api/indexDiscuss"; import * as api from "../../api/indexDiscuss";
import * as apiTask from "../../api/indexTaskadd"; import * as apiTask from "../../api/indexTaskadd";
import { RouterEditTask } from "@/api/indexTask"; import {RouterEditTask} from "@/api/indexTask";
import { message } from "ant-design-vue"; import {message} from "ant-design-vue";
import { addTempTask } from "../../api/indexTaskadd"; import {addTempTask} from "../../api/indexTaskadd";
export default { export default {
name: "AddDiscuss", name: "AddDiscuss",
props: { props: {
@@ -170,7 +172,7 @@ export default {
if (props.edit) { if (props.edit) {
//编辑讨 //编辑讨
api api
.getDiscussDetail({ discussId: props.EditDiscussId }) .getDiscussDetail({discussId: props.EditDiscussId})
.then((res) => { .then((res) => {
//更新讨论信息 //更新讨论信息
state.inputV1 = res.data.data.discussName; state.inputV1 = res.data.data.discussName;
@@ -178,7 +180,8 @@ export default {
state.checkedC1 = state.checkedC1 =
res.data.data.discussSettings == "true" ? true : false; res.data.data.discussSettings == "true" ? true : false;
}) })
.catch(() => {}); .catch(() => {
});
} }
}; };
const afterVisibleChange = (bool) => { const afterVisibleChange = (bool) => {
@@ -186,9 +189,9 @@ export default {
queryDiscuss(); queryDiscuss();
} }
}; };
const updateTask = (res) => { const updateTask = async (res) => {
if (props.isLevel == 1) { if (props.isLevel == 1) {
RouterEditTask({ await RouterEditTask({
chapterId: props.isactive, chapterId: props.isactive,
courseId: res.data.data.discussId, courseId: res.data.data.discussId,
name: res.data.data.discussName, name: res.data.data.discussName,
@@ -203,7 +206,7 @@ export default {
//message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`); //message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
}); });
} else if (props.isLevel == 2) { } else if (props.isLevel == 2) {
apiTask await apiTask
.addTask({ .addTask({
courseId: res.data.data.discussId, courseId: res.data.data.discussId,
name: res.data.data.discussName, name: res.data.data.discussName,
@@ -220,7 +223,7 @@ export default {
}); });
} else if (props.isLevel == 3) { } else if (props.isLevel == 3) {
console.log(""); console.log("");
addTempTask({ await addTempTask({
courseId: res.data.data.discussId, courseId: res.data.data.discussId,
name: res.data.data.discussName, name: res.data.data.discussName,
projectTemplateId: props.projectTemplateId, projectTemplateId: props.projectTemplateId,
@@ -251,8 +254,8 @@ export default {
if (props.edit) { if (props.edit) {
api api
.updateDiscuss(obj) .updateDiscuss(obj)
.then((res) => { .then(async (res) => {
updateTask(res); await updateTask(res);
closeDrawer(); closeDrawer();
ctx.emit("changeData", false); ctx.emit("changeData", false);
message.destroy(); message.destroy();
@@ -265,8 +268,8 @@ export default {
} else { } else {
api api
.createDiscuss(obj) .createDiscuss(obj)
.then((res) => { .then(async (res) => {
updateTask(res); await updateTask(res);
closeDrawer(); closeDrawer();
ctx.emit("changeData", false); ctx.emit("changeData", false);
message.destroy(); message.destroy();
@@ -293,6 +296,7 @@ export default {
.ant-table-striped :deep(.table-striped) td { .ant-table-striped :deep(.table-striped) td {
background-color: #fafafa !important; background-color: #fafafa !important;
} }
.addrefDrawer { .addrefDrawer {
.drawerMain { .drawerMain {
.header { .header {
@@ -302,6 +306,7 @@ export default {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
flex-shrink: 0; flex-shrink: 0;
.headerTitle { .headerTitle {
font-size: 18px; font-size: 18px;
font-weight: 600; font-weight: 600;
@@ -310,35 +315,43 @@ export default {
margin-left: 24px; margin-left: 24px;
} }
} }
.contentMain { .contentMain {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.main_left { .main_left {
margin-top: 32px; margin-top: 32px;
padding-right: 30px; padding-right: 30px;
flex: 1; flex: 1;
border-right: 1px solid #e8e8e8; border-right: 1px solid #e8e8e8;
.main_item { .main_item {
display: flex; display: flex;
align-items: center; align-items: center;
margin-top: 32px; margin-top: 32px;
margin-bottom: 32px; margin-bottom: 32px;
.signbox { .signbox {
width: 120px; width: 120px;
display: flex; display: flex;
justify-content: end; justify-content: end;
align-items: center; align-items: center;
.sign { .sign {
margin-right: 5px; margin-right: 5px;
} }
} }
.btnbox { .btnbox {
display: flex; display: flex;
flex: 1; flex: 1;
align-items: center; align-items: center;
.ant-input { .ant-input {
height: 100%; height: 100%;
} }
.xkbtn { .xkbtn {
cursor: pointer; cursor: pointer;
width: 130px; width: 130px;
@@ -351,32 +364,40 @@ export default {
} }
} }
} }
.main_item2 { .main_item2 {
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
margin-bottom: 32px; margin-bottom: 32px;
.signbox { .signbox {
width: 120px; width: 120px;
display: flex; display: flex;
justify-content: end; justify-content: end;
align-items: center; align-items: center;
.sign { .sign {
margin-right: 5px; margin-right: 5px;
} }
} }
.textarea { .textarea {
width: 423px; width: 423px;
.ant-input { .ant-input {
width: 100%; width: 100%;
} }
.ant-input-textarea-show-count { .ant-input-textarea-show-count {
position: relative; position: relative;
} }
.ant-input-textarea-show-count::after { .ant-input-textarea-show-count::after {
position: absolute; position: absolute;
right: 10px; right: 10px;
bottom: 0px; bottom: 0px;
} }
.ant-input { .ant-input {
border-radius: 8px; border-radius: 8px;
} }
@@ -384,6 +405,7 @@ export default {
} }
} }
} }
.main_btns { .main_btns {
height: 72px; height: 72px;
width: 100%; width: 100%;
@@ -393,6 +415,7 @@ export default {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16); box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
.btn1 { .btn1 {
width: 100px; width: 100px;
height: 40px; height: 40px;
@@ -402,6 +425,7 @@ export default {
background-color: #fff; background-color: #fff;
cursor: pointer; cursor: pointer;
} }
.btn2 { .btn2 {
cursor: pointer; cursor: pointer;
width: 100px; width: 100px;

View File

@@ -114,11 +114,12 @@
</template> </template>
<script> <script>
import { toRefs, reactive } from "vue"; import {toRefs, reactive, onMounted} from "vue";
import { getTask } from "../../api/indexTaskadd"; import { getTask } from "../../api/indexTaskadd";
import { toDate } from "../../api/method"; import { toDate } from "../../api/method";
import { auditView } from "../../api/indexAudit"; import { auditView } from "../../api/indexAudit";
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
import * as api1 from "@/api/index1";
export default { export default {
name: "ProjectAudit", name: "ProjectAudit",
@@ -284,7 +285,14 @@ export default {
message.warning("提交失败"); message.warning("提交失败");
}); });
}; };
const getDictList = async (param) => api1.getDict({
pageNo: 1,
pageSize: 20,
setCode: param
}).then((res) => res.data.data.rows)
onMounted(async () => {
state.calssifyList = (await getDictList("faceclassClass")).map(e => ({ label: e.dictName, value: e.dictCode }))
});
return { return {
...toRefs(state), ...toRefs(state),
closeDrawer, closeDrawer,