|
@@ -1,14 +1,14 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <div v-if="(tableList.length>0 || pageInfo.page>1)&&contextFlag">
|
|
|
+ <div v-if="contextFlag">
|
|
|
<save-form
|
|
|
:inline="true"
|
|
|
class="searchForm"
|
|
|
ref="searchForm"
|
|
|
@submit="search"
|
|
|
@reset="reset"
|
|
|
- :saveKey="'courseTimerSetting'"
|
|
|
- :model.sync="searchForm"
|
|
|
+ :saveKey="'/baseRulesClassSetting/courseTimerSetting'"
|
|
|
+ :model="searchForm"
|
|
|
>
|
|
|
<el-form-item :rules="[]">
|
|
|
<el-select
|
|
@@ -96,17 +96,23 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<pagination
|
|
|
- :saveKey="'courseTimerSetting'"
|
|
|
sync
|
|
|
:total.sync="pageInfo.total"
|
|
|
:page.sync="pageInfo.page"
|
|
|
+ :saveKey="'/baseRulesClassSetting/courseTimerSetting'"
|
|
|
:limit.sync="pageInfo.limit"
|
|
|
:page-sizes="pageInfo.page_size"
|
|
|
@pagination="getList"
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <emptyPage @submit="openJob('create')" title='乐团课时长设置' btnTitle='新建乐团课时长设置' :context='context' v-if="!(tableList.length>0 || pageInfo.page>1)&&contextFlag" />
|
|
|
+ <emptyPage
|
|
|
+ @submit="openJob('create')"
|
|
|
+ title="乐团课时长设置"
|
|
|
+ btnTitle="新建乐团课时长设置"
|
|
|
+ :context="context"
|
|
|
+ v-if="!contextFlag"
|
|
|
+ />
|
|
|
|
|
|
<el-dialog
|
|
|
:title="isAdd ? '新增课时时长' : '修改课时时长'"
|
|
@@ -134,16 +140,16 @@ import pagination from "@/components/Pagination/index";
|
|
|
import { musicCourseType } from "@/utils/searchArray";
|
|
|
import {
|
|
|
getOrganizationCourseDurationSettings,
|
|
|
- delOrganizationCourseDurationSettings,
|
|
|
+ delOrganizationCourseDurationSettings
|
|
|
} from "@/api/specialSetting";
|
|
|
import courseTimeForm from "./modals/courseTimeForm";
|
|
|
-import emptyPage from '@/components/emptyPage'
|
|
|
+import emptyPage from "@/components/emptyPage";
|
|
|
const initSearch = {
|
|
|
courseScheduleType: null,
|
|
|
- organId: null,
|
|
|
+ organId: null
|
|
|
};
|
|
|
export default {
|
|
|
- components: { pagination, courseTimeForm,emptyPage },
|
|
|
+ components: { pagination, courseTimeForm, emptyPage },
|
|
|
data() {
|
|
|
return {
|
|
|
tableList: [],
|
|
@@ -152,15 +158,16 @@ export default {
|
|
|
limit: 10, // 限制显示条数
|
|
|
page: 1, // 当前页
|
|
|
total: 0, // 总条数
|
|
|
- page_size: [10, 20, 40, 50], // 选择限制显示条数
|
|
|
+ page_size: [10, 20, 40, 50] // 选择限制显示条数
|
|
|
},
|
|
|
searchForm: { ...initSearch },
|
|
|
courseType: musicCourseType,
|
|
|
isAdd: true,
|
|
|
courseVisible: false,
|
|
|
activeRow: null,
|
|
|
- context:'创建分部后,可根据各分部的实际情况在本界面添加各类型乐团课程的单课时时长,添加完成后,各分部乐团在排课时可选择此处设置的单课时时长进行排课,同一种课程类型可设置多种单课时时长,帮助进行乐团课时时长的规范管理。',
|
|
|
- contextFlag:false
|
|
|
+ context:
|
|
|
+ "创建分部后,可根据各分部的实际情况在本界面添加各类型乐团课程的单课时时长,添加完成后,各分部乐团在排课时可选择此处设置的单课时时长进行排课,同一种课程类型可设置多种单课时时长,帮助进行乐团课时时长的规范管理。",
|
|
|
+ contextFlag: true
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -173,11 +180,11 @@ export default {
|
|
|
const res = await getOrganizationCourseDurationSettings({
|
|
|
...this.searchForm,
|
|
|
page: this.pageInfo.page,
|
|
|
- rows: this.pageInfo.limit,
|
|
|
+ rows: this.pageInfo.limit
|
|
|
});
|
|
|
- this.contextFlag = true
|
|
|
this.pageInfo.total = res.data.total;
|
|
|
this.tableList = res.data.rows;
|
|
|
+ this.contextFlag = this.tableList.length > 0 ? true : false;
|
|
|
} catch (e) {}
|
|
|
},
|
|
|
search() {
|
|
@@ -212,19 +219,18 @@ export default {
|
|
|
this.$confirm("是否删除?", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
+ type: "warning"
|
|
|
}).then(async () => {
|
|
|
try {
|
|
|
const res = await delOrganizationCourseDurationSettings({
|
|
|
- id: row.id,
|
|
|
+ id: row.id
|
|
|
});
|
|
|
this.$message.success("删除成功");
|
|
|
this.getList();
|
|
|
} catch {}
|
|
|
});
|
|
|
- },
|
|
|
- },
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
-<style lang="scss" scoped>
|
|
|
-</style>
|
|
|
+<style lang="scss" scoped></style>
|