mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 12:26:47 +08:00
feat:关卡列表数据接入
This commit is contained in:
@@ -85,6 +85,7 @@
|
||||
|
||||
<a-input
|
||||
v-model:value="formState.examinationDuration"
|
||||
type="number"
|
||||
style="width: 388px; height: 32px;
|
||||
margin-left: 35px;"
|
||||
/>
|
||||
@@ -100,6 +101,7 @@
|
||||
|
||||
<a-input-number
|
||||
:min="-1" :precision="0"
|
||||
type="number"
|
||||
v-model:value="formState.examinationLimit"
|
||||
style="width: 88px; height: 32px;
|
||||
border-radius: 8px;overflow: hidden;"
|
||||
@@ -161,6 +163,7 @@
|
||||
|
||||
<a-input
|
||||
v-model:value="formState.passLine"
|
||||
type="number"
|
||||
style="width: 88px; height: 32px;margin-left: 35px;"
|
||||
/>
|
||||
</a-form-item>
|
||||
@@ -197,6 +200,8 @@
|
||||
import { reactive, ref } from "vue";
|
||||
import {message} from"ant-design-vue";
|
||||
import {createExamination,queryExaminationDetailById,updateExamination} from "@/api/indexExam"
|
||||
import { ProjectEditTask } from "@/api/indexTask"
|
||||
|
||||
import dayjs from 'dayjs';
|
||||
const rowSelection = ref({
|
||||
checkStrictly: false,
|
||||
@@ -225,7 +230,7 @@ export default {
|
||||
},
|
||||
examinationId: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
default: -1,
|
||||
}
|
||||
},
|
||||
setup(props, ctx) {
|
||||
@@ -429,21 +434,38 @@ export default {
|
||||
if(id) {
|
||||
updateExamination(obj).then((res)=>{
|
||||
console.log(res);
|
||||
message.success(`编辑成功`)
|
||||
closeDrawer();
|
||||
}).catch(()=>{
|
||||
message.error(`编辑失败`)
|
||||
})
|
||||
} else {
|
||||
createExamination(obj).then((res)=>{
|
||||
message.success(`添加成功${res}`)
|
||||
closeDrawer();
|
||||
createExamination(obj).then(()=>{
|
||||
}).catch((err)=>{
|
||||
message.error(`添加失败${err}`)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
let editObj = {
|
||||
"courseId": 0,
|
||||
"duration": 0,
|
||||
"flag": true,
|
||||
"name": "",
|
||||
"projectId": 0,
|
||||
"projectTaskId": props.examinationId || '',
|
||||
"stageId": 0,
|
||||
"type": 5
|
||||
}
|
||||
// 新增编辑或新增项目
|
||||
ProjectEditTask(editObj).then(res => {
|
||||
console.log(` 编辑项目成功的打印 ${res}`);
|
||||
message.success(`${props.examinationId? '编辑' : '新增'}阶段任务成功`)
|
||||
closeDrawer();
|
||||
}).catch(err => {
|
||||
message.error(`${props.examinationId? '编辑' : '新增'}阶段任务失败`)
|
||||
console.log(` 编辑项目失败的打印 ${err}`);
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
const afterVisibleChange = (bool) => {
|
||||
console.log("formState", bool);
|
||||
|
||||
Reference in New Issue
Block a user