项目选择课程灰掉自主课程

This commit is contained in:
Yjhon 2022-02-26 18:06:23 +08:00
parent d9e2960173
commit 11b0e529a5
2 changed files with 9 additions and 5 deletions

View File

@ -40,7 +40,7 @@
</span> </span>
</s-table> </s-table>
</a-space> </a-space>
<project-course-select ref="CourseSelect" @selectKeyDataSubmit="selectKeyDataChange" :selectRows="selData"></project-course-select> <project-course-select ref="CourseSelect" @selectKeyDataSubmit="selectKeyDataChange" :tabDisabled="tabDisabled" :selectRows="selData"></project-course-select>
<a-col :span="24" style="text-align: center;margin-top: 10px;"> <a-col :span="24" style="text-align: center;margin-top: 10px;">
<a-button type="primary" size="default" @click="toPrep" style="margin-right: 8px;">上一步</a-button> <a-button type="primary" size="default" @click="toPrep" style="margin-right: 8px;">上一步</a-button>
<a-button type="primary" size="default" @click="toNext">下一步</a-button> <a-button type="primary" size="default" @click="toNext">下一步</a-button>
@ -87,6 +87,7 @@ export default {
// //
return { return {
form: this.projectForm, form: this.projectForm,
tabDisabled: false,
selData: [], selData: [],
labelCol: {}, labelCol: {},
wrapperCol: {}, wrapperCol: {},
@ -206,6 +207,7 @@ export default {
}) })
this.queryParam.ids = arr.join(',') this.queryParam.ids = arr.join(',')
} }
if(this.form.projectType === 0) this.tabDisabled = true;
}, },
//list //list
selectKeyDataChange(childValue) { selectKeyDataChange(childValue) {
@ -218,7 +220,7 @@ export default {
// - 访this // - 访this
created() { created() {
this.initIds() this.initIds();
}, },
mounted() { }, // - 访DOM mounted() { }, // - 访DOM
beforeCreate() { }, // - beforeCreate() { }, // -

View File

@ -5,7 +5,7 @@
<a-col :span="4" id="tree"> <a-col :span="4" id="tree">
<a-menu v-model="menuKey" mode="horizontal" @select="menuChack"> <a-menu v-model="menuKey" mode="horizontal" @select="menuChack">
<a-menu-item key="sys">系统课程</a-menu-item> <a-menu-item key="sys">系统课程</a-menu-item>
<a-menu-item key="self">自主课程</a-menu-item> <a-menu-item key="self" :disabled="tabDis">自主课程</a-menu-item>
</a-menu> </a-menu>
<!-- :defaultExpandedKeys="defaultExpandedKeys" --> <!-- :defaultExpandedKeys="defaultExpandedKeys" -->
<a-tree :treeData="treeData" @select="onSelect" :defaultExpandAll="true" :replaceFields="replaceFields"> <a-tree :treeData="treeData" @select="onSelect" :defaultExpandAll="true" :replaceFields="replaceFields">
@ -63,15 +63,17 @@ export default {
selectRows: { selectRows: {
type: Array, type: Array,
}, },
tabDisabled: {
type: Boolean,
}
}, },
data() { data() {
// //
return { return {
visible: false, // visible: false, //
modalTitle: '', modalTitle: '',
tabDis: this.tabDisabled,
menuKey: ['sys'], // menuKey: ['sys'], //
// //
queryParam: { name: '', classType: 1, type: 1 }, queryParam: { name: '', classType: 1, type: 1 },
replaceFields: { children: 'children', title: 'name', key: 'value', value: 'id' }, replaceFields: { children: 'children', title: 'name', key: 'value', value: 'id' },