提交 9c715641 编写于 作者: huangwensu's avatar huangwensu

问题修复

上级 33e64af6
......@@ -95,7 +95,7 @@
<el-row>
<el-col :span="10">
<el-form-item label="模块名称" prop="name">
<el-input v-model="item.name" size="mini" placeholder="请选择模块名称" style="width:288px;"></el-input>
<el-input v-model="item.name" :disabled="idType == 2 || item.moduleType == 2 || (item.id != '' && item.openFlag == 2)" size="mini" placeholder="请选择模块名称" style="width:288px;"></el-input>
</el-form-item>
</el-col>
<el-col :span="10" v-if="idType == 1">
......@@ -195,7 +195,7 @@
<el-form-item label="课程名称">
<el-input v-model="item3.content1" :disabled="item.moduleType == 2 || idType == 2 || (item.id != '' && item.openFlag == 2)" size="mini" maxlength='30' placeholder="请输入课程名称" style="width:288px;"></el-input>
<span v-if="item2.numFlag == 2 && index3 == 0 && item.moduleType == 1 && idType == 1 && (item.id == '' || (item.id != '' && item.openFlag == 1))"><i class="el-icon-circle-plus" @click="addMatterCourse(index,index1,index2)" style="color:#449284;"></i></span>
<span v-if="item2.numFlag == 2 && index3 > 0 && item.moduleType == 11 && idType == 1 && (item.id == '' || (item.id != '' && item.openFlag == 1))"><i class="el-icon-delete" @click="deleteMatterCourse(index,index1,index2,index3)" style="color:red;"></i></span>
<span v-if="item2.numFlag == 2 && index3 > 0 && item.moduleType == 1 && idType == 1 && (item.id == '' || (item.id != '' && item.openFlag == 1))"><i class="el-icon-delete" @click="deleteMatterCourse(index,index1,index2,index3)" style="color:red;"></i></span>
</el-form-item>
</el-col>
<el-col :span="10" class="item-icon">
......@@ -957,25 +957,25 @@ export default {
vm.GET('portalComponent/ModuleList',{openFlag: 2}).then((res) => {
if( res.code == '000000') {
vm.resourceArray = res.data.moduleModelList
// for(let i = 0; i < vm.componentList.moduleModelList.length; i++) {
// if(vm.componentList.moduleModelList[i].moduleType == 2 ) {
// for(let j = 0; j < vm.resourceArray.length; j++) {
// if( vm.componentList.moduleModelList[i].id == vm.resourceArray[j].id) {
// vm.resourceArray.splice(j,1)
// }
// }
// }
// }
for(let i = 0; i < vm.componentList.moduleModelList.length; i++) {
vm.compareArray(vm.componentList.moduleModelList[i].id)
}
}
})
},
compareArray(id) {
for(let j = 0; j < vm.resourceArray.length; j++) {
if( id == vm.resourceArray[j].id) {
vm.resourceArray.splice(j,1)
}
}
},
// 选择资源包
selectChange(val) {
if(vm.resourceArray && vm.resourceArray.length > 0) {
for(let i = 0; i < vm.resourceArray.length; i++) {
if(val == vm.resourceArray[i].id) {
vm.dialogData = vm.resourceArray[i]
vm.resourceArray.splice(i,1)
break
}
}
......@@ -984,36 +984,11 @@ export default {
// 确定选择预设模块
submitDialog() {
vm.columnFormVisible = false
let flag = true
if(isNotEmptyUtils(vm.dialogData)) {
for(let i = 0; i < vm.componentList.moduleModelList.length; i++) {
if(vm.componentList.moduleModelList[i].id == vm.dialogData.id) {
flag = false
vm.$confirm('该模块已经被添加到本组件,是否还需要再添加一次?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
showClose: false,
type: 'warning'
}).then(() => {
vm.dialogData.moduleType = 2
vm.dialogData.mappingId = null
vm.componentList.moduleModelList.push(vm.dialogData)
vm.firstTab = vm.componentList.moduleModelList.length + ''
}).catch(() => {
vm.$message({
type: 'info',
message: '已取消选择'
})
})
break
}
}
if(flag) {
vm.dialogData.moduleType = 2
vm.dialogData.mappingId = null
vm.componentList.moduleModelList.push(vm.dialogData)
vm.firstTab = vm.componentList.moduleModelList.length + ''
}
vm.dialogData.moduleType = 2
vm.dialogData.mappingId = null
vm.componentList.moduleModelList.push(vm.dialogData)
vm.firstTab = vm.componentList.moduleModelList.length + ''
vm.dialogData = []
vm.selectResource.resourceModuleSelect = ''
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册