Commit 16d7325b authored by 黄奎's avatar 黄奎

页面修改

parent e76d6ba3
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
<q-input @change="getCourseJobList" clearable standout="bg-primary text-white" v-model="msg.JobName" <q-input @change="getCourseJobList" clearable standout="bg-primary text-white" v-model="msg.JobName"
label="作业名称" @clear="getCourseJobList" maxlength="20" /> label="作业名称" @clear="getCourseJobList" maxlength="20" />
</div> </div>
</div> </div>
</div> </div>
<div class="page-content"> <div class="page-content">
...@@ -25,7 +24,6 @@ ...@@ -25,7 +24,6 @@
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增作业" @click="EditQuestion(null)" /> <q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增作业" @click="EditQuestion(null)" />
</div> </div>
</template> </template>
<template v-slot:bottom> <template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount" <q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" /> :input="true" @input="changePage" />
...@@ -39,9 +37,6 @@ ...@@ -39,9 +37,6 @@
</q-td> </q-td>
</template> </template>
</q-table> </q-table>
<job-form v-if="isShowCourseJobForm" :CourseId="msg.CourseId" :seting-obj="courseJobObj" @close="closeQuestion"
@success="refreshQuestion">
</job-form>
</div> </div>
</div> </div>
</template> </template>
...@@ -49,13 +44,13 @@ ...@@ -49,13 +44,13 @@
import { import {
queryCourseJobPageList queryCourseJobPageList
} from '../../api/course/index'; } from '../../api/course/index';
import jobForm from '../../components/course/job-form';
export default { export default {
meta: { meta: {
title: "作业管理" title: "作业管理"
}, },
components: { components: {
jobForm
}, },
data() { data() {
return { return {
...@@ -93,8 +88,7 @@ ...@@ -93,8 +88,7 @@
JobName: "", //作业名称 JobName: "", //作业名称
}, },
pageCount: 0, pageCount: 0,
isShowCourseJobForm: false,
courseJobObj: null,
} }
}, },
created() { created() {
...@@ -106,7 +100,6 @@ ...@@ -106,7 +100,6 @@
this.getCourseJobList(); this.getCourseJobList();
}, },
methods: { methods: {
//删除问题 //删除问题
setQuestionStatus(item) { setQuestionStatus(item) {
this.$q.dialog({ this.$q.dialog({
...@@ -163,24 +156,21 @@ ...@@ -163,24 +156,21 @@
this.loading = false this.loading = false
}) })
}, },
//刷新页面
refreshQuestion() {
this.isShowCourseJobForm = false;
this.getCourseJobList();
},
//新增修改问题 //新增修改问题
EditQuestion(obj) { EditQuestion(obj) {
var jobId = 0;
if (obj) { if (obj) {
this.courseJobObj = obj jobId = obj.JobId;
} else {
this.courseJobObj = null
} }
this.isShowCourseJobForm = true var tempStr = '/course/jobinfo';
}, var tempRouter = this.$router.resolve({
//关闭弹窗 path: tempStr,
closeQuestion() { query: {
this.isShowCourseJobForm = false; CourseId: this.msg.CourseId,
this.courseJobObj = null; JobId: jobId
}
});
window.open(tempRouter.href,'_blank')
}, },
} }
} }
......
<template> <template>
<q-dialog v-model="persistent" persistent content-class="bg-grey-1" transition-show="scale" transition-hide="scale">
<q-card style="width: 800px;max-width:900px;"> <q-card style="width: 800px;max-width:900px;">
<q-card-section> <q-card-section>
<div class="text-h6">{{objOption.CourseId==0?'新增作业信息':'修改作业信息'}}</div> <div class="text-h6">{{objOption.CourseId==0?'新增作业信息':'修改作业信息'}}</div>
...@@ -37,13 +37,14 @@ ...@@ -37,13 +37,14 @@
</el-upload> </el-upload>
</q-card-section> </q-card-section>
<q-separator /> <q-separator />
<q-card-actions align="right" class="bg-white"> <q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeCourseForm" /> <q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeCourseForm" />
<q-btn label="立即提交" color="accent q-px-md" style="font-weight:400 !important" :loading="saveCourseLoading" <q-btn label="立即提交" color="accent q-px-md" style="font-weight:400 !important" :loading="saveCourseLoading"
@click="saveCourse" /> @click="saveCourse" />
</q-card-actions> </q-card-actions>
</q-card> </q-card>
</q-dialog>
</template> </template>
<script> <script>
...@@ -62,12 +63,10 @@ ...@@ -62,12 +63,10 @@
} from '../../api/common/common' } from '../../api/common/common'
import selectTree from '../common/select-tree'
import extEditor from '../common/ext-editor'
export default { export default {
components: { components: {
selectTree,
extEditor,
}, },
props: { props: {
saveObj: { saveObj: {
......
...@@ -494,9 +494,14 @@ const routes = [{ ...@@ -494,9 +494,14 @@ const routes = [{
component: () => component: () =>
import("pages/course/coursejob.vue") import("pages/course/coursejob.vue")
}, },
] ]
}, },
{
path: "/course/jobinfo", //作业详情管理
component: () =>
import("pages/course/jobinfo.vue")
},
{ {
path: "/test", //API测试 path: "/test", //API测试
component: () => component: () =>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment