Merge remote-tracking branch 'origin/develop' into develop

# Conflicts:
#	src/components/drawers/AddDiscuss.vue
#	src/views/projectcenter/ProjectAdd.vue
This commit is contained in:
yuping
2022-12-01 18:54:17 +08:00
24 changed files with 325 additions and 183 deletions

View File

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