|
|
|
|
@ -63,6 +63,32 @@
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<template v-slot:overview_parent_id>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label" style="font-weight: bold">
|
|
|
|
|
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>关联体系(数据总览归集到):
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-select
|
|
|
|
|
filterable
|
|
|
|
|
clearable
|
|
|
|
|
v-model="form.overview_parent_id"
|
|
|
|
|
:disabled="Number(form.is_chart) !== 1"
|
|
|
|
|
placeholder="不选择则统计归自己(仅对“是否统计=是”生效)"
|
|
|
|
|
style="width: 100%;"
|
|
|
|
|
>
|
|
|
|
|
<el-option :key="0" label="不归集(统计归自己)" :value="null" />
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in overviewParentOptions"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.id"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<template v-slot:wait_tip>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
@ -227,7 +253,8 @@
|
|
|
|
|
import myMixins from "@/mixin/selectMixin.js";
|
|
|
|
|
import {
|
|
|
|
|
show,
|
|
|
|
|
save
|
|
|
|
|
save,
|
|
|
|
|
index
|
|
|
|
|
} from "@/api/course/courseType.js"
|
|
|
|
|
export default {
|
|
|
|
|
mixins: [myMixins],
|
|
|
|
|
@ -238,12 +265,14 @@
|
|
|
|
|
isShow: false,
|
|
|
|
|
type: 'add',
|
|
|
|
|
id: '',
|
|
|
|
|
overviewParentOptions: [],
|
|
|
|
|
form: {
|
|
|
|
|
name:'',
|
|
|
|
|
sort:0,
|
|
|
|
|
open_mobile:0,
|
|
|
|
|
status:1,
|
|
|
|
|
is_chart:0,
|
|
|
|
|
overview_parent_id: null,
|
|
|
|
|
wait_tip:"",
|
|
|
|
|
pass_tip:"",
|
|
|
|
|
fault_tip:'',
|
|
|
|
|
@ -268,6 +297,28 @@
|
|
|
|
|
},
|
|
|
|
|
created() {},
|
|
|
|
|
methods: {
|
|
|
|
|
async fetchOverviewParentOptions(excludeId = null) {
|
|
|
|
|
try {
|
|
|
|
|
const res = await index({
|
|
|
|
|
page: 1,
|
|
|
|
|
page_size: 999,
|
|
|
|
|
sort_name: 'sort',
|
|
|
|
|
sort_type: 'ASC',
|
|
|
|
|
filter: [
|
|
|
|
|
{ key: 'is_chart', op: 'eq', value: 1 },
|
|
|
|
|
{ key: 'is_history', op: 'eq', value: 0 },
|
|
|
|
|
// 仅允许选择根体系作为“归集目标”(只允许一层)
|
|
|
|
|
{ key: 'overview_parent_id', op: 'null', value: 0 }
|
|
|
|
|
]
|
|
|
|
|
}, true)
|
|
|
|
|
const list = (res && res.data) ? res.data : (res && res.list && res.list.data ? res.list.data : [])
|
|
|
|
|
this.overviewParentOptions = (list || [])
|
|
|
|
|
.filter(item => item && item.id && String(item.id) !== String(excludeId))
|
|
|
|
|
.map(item => ({ id: item.id, name: item.name }))
|
|
|
|
|
} catch (e) {
|
|
|
|
|
this.overviewParentOptions = []
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
submit() {
|
|
|
|
|
if (this.id) {
|
|
|
|
|
this.form.id = this.id
|
|
|
|
|
@ -298,6 +349,7 @@
|
|
|
|
|
this.form.status = res.status?res.status:0
|
|
|
|
|
this.form.open_mobile = res.open_mobile?res.open_mobile:0
|
|
|
|
|
this.form.is_chart = res.is_chart?res.is_chart:0
|
|
|
|
|
this.form.overview_parent_id = (res.overview_parent_id === null || res.overview_parent_id === undefined || res.overview_parent_id === '') ? null : Number(res.overview_parent_id)
|
|
|
|
|
this.form.wait_tip = res.wait_tip?res.wait_tip:''
|
|
|
|
|
this.form.pass_tip = res.pass_tip?res.pass_tip:''
|
|
|
|
|
this.form.fault_tip = res.fault_tip?res.fault_tip:''
|
|
|
|
|
@ -311,6 +363,9 @@
|
|
|
|
|
this.form.auto_schoolmate = res.auto_schoolmate?res.auto_schoolmate:(res.auto_schoolmate==0?0:'')
|
|
|
|
|
this.form.is_history = res.is_history?res.is_history:0
|
|
|
|
|
this.form.is_count_genban = res.is_count_genban?res.is_count_genban:0
|
|
|
|
|
|
|
|
|
|
// 编辑时:拉取可选根体系,排除自己
|
|
|
|
|
this.fetchOverviewParentOptions(this.id)
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
@ -322,6 +377,9 @@
|
|
|
|
|
console.log("form",this.form)
|
|
|
|
|
if (this.type === 'editor') {
|
|
|
|
|
this.getDetail()
|
|
|
|
|
} else {
|
|
|
|
|
// 新增时:拉取可选根体系
|
|
|
|
|
this.fetchOverviewParentOptions(null)
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
this.id = ''
|
|
|
|
|
@ -331,6 +389,7 @@
|
|
|
|
|
open_mobile:0,
|
|
|
|
|
status:1,
|
|
|
|
|
is_chart:0,
|
|
|
|
|
overview_parent_id: null,
|
|
|
|
|
wait_tip:"",
|
|
|
|
|
pass_tip:"",
|
|
|
|
|
fault_tip:'',
|
|
|
|
|
|