|
@@ -59,6 +59,20 @@
|
|
|
@click="addDomain(result)">新增梯度</el-button>
|
|
|
</el-form-item>
|
|
|
|
|
|
+ <el-form-item prop="vipGroupCategoryIds"
|
|
|
+ label="课程类型"
|
|
|
+ style="width: 500px">
|
|
|
+ <el-select style="width: 100% !important;"
|
|
|
+ v-model="result.vipGroupCategoryIds"
|
|
|
+ multiple
|
|
|
+ placeholder="请选择">
|
|
|
+ <el-option v-for="item in vipGroupCategoryList"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"> </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
<el-form-item prop="organIdList"
|
|
|
label="适用分部"
|
|
|
style="width: 500px">
|
|
@@ -69,8 +83,21 @@
|
|
|
<el-option v-for="item in branchList"
|
|
|
:key="item.value"
|
|
|
:label="item.label"
|
|
|
- :value="item.value"
|
|
|
- :disabled="item.disabled"> </el-option>
|
|
|
+ :value="item.value"> </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item prop="teacherId"
|
|
|
+ label="老师"
|
|
|
+ style="width: 500px">
|
|
|
+ <el-select style="width: 100% !important;"
|
|
|
+ v-model="result.teacherId"
|
|
|
+ multiple
|
|
|
+ placeholder="请选择">
|
|
|
+ <el-option v-for="item in branchList"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"> </el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
@@ -84,8 +111,9 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import store from '@/store'
|
|
|
-import { branchQueryPage, queryOrganIdList } from '@/api/specialSetting'
|
|
|
+import { branchQueryPage } from '@/api/specialSetting'
|
|
|
import { courseScheduleRewardsQuery, getUserRole, courseScheduleRewardsAdd, courseScheduleRewardsUpdate } from '@/api/systemManage'
|
|
|
+import { vipGroupCategory } from "@/api/vipSeting"
|
|
|
export default {
|
|
|
data () {
|
|
|
return {
|
|
@@ -95,10 +123,13 @@ export default {
|
|
|
pageInfo: this.$route.query.pageInfo,
|
|
|
branchList: [],
|
|
|
useBranchId: [], // 使用的分部编号
|
|
|
+ vipGroupCategoryList: [],
|
|
|
result: {
|
|
|
name: null,
|
|
|
rewardMode: null,
|
|
|
+ vipGroupCategoryIds: null,
|
|
|
organIdList: null,
|
|
|
+ teacherId: null,
|
|
|
courseScheduleType: 'VIP',
|
|
|
domains: [{
|
|
|
min: null,
|
|
@@ -122,26 +153,23 @@ export default {
|
|
|
methods: {
|
|
|
async __init () {
|
|
|
this.$refs.form.resetFields()
|
|
|
- // 获取已经配置过的分部编号
|
|
|
- let result = await queryOrganIdList()
|
|
|
- let branchList = await branchQueryPage({ delFlag: 0, rows: 9999 })
|
|
|
- if (result.code == 200) {
|
|
|
- this.useBranchId = result.data
|
|
|
+ let vipGroupCategoryList = await vipGroupCategory({ page:1, rows: 9999 })
|
|
|
+ if(vipGroupCategoryList.code == 200) {
|
|
|
+ vipGroupCategoryList.data.forEach(item => {
|
|
|
+ this.vipGroupCategoryList.push({
|
|
|
+ label: item.name,
|
|
|
+ value: item.id
|
|
|
+ })
|
|
|
+ })
|
|
|
}
|
|
|
+
|
|
|
+ let branchList = await branchQueryPage({ delFlag: 0, rows: 9999 })
|
|
|
if (branchList.code == 200) {
|
|
|
branchList.data.rows.forEach(item => {
|
|
|
let tempArr = {}
|
|
|
- if (this.useBranchId.indexOf(item.id) != -1) {
|
|
|
- tempArr = {
|
|
|
- label: item.name,
|
|
|
- value: item.id,
|
|
|
- disabled: true
|
|
|
- }
|
|
|
- } else {
|
|
|
- tempArr = {
|
|
|
- label: item.name,
|
|
|
- value: item.id
|
|
|
- }
|
|
|
+ tempArr = {
|
|
|
+ label: item.name,
|
|
|
+ value: item.id
|
|
|
}
|
|
|
this.branchList.push(tempArr)
|
|
|
})
|
|
@@ -173,13 +201,6 @@ export default {
|
|
|
}],
|
|
|
errorText: null
|
|
|
}
|
|
|
-
|
|
|
- // 修改可以取消选中
|
|
|
- this.branchList.forEach(item => {
|
|
|
- if (tempList.indexOf(item.value) != -1) {
|
|
|
- item.disabled = false
|
|
|
- }
|
|
|
- })
|
|
|
}
|
|
|
}
|
|
|
|