Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
282c77d6
提交
282c77d6
编写于
12月 11, 2019
作者:
chendeli
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
edit 逻辑
上级
65346331
变更
2
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
360 行增加
和
92 行删除
+360
-92
create-component.vue
src/views/education/create-component.vue
+34
-9
edit-manager.vue
src/views/education/edit-manager.vue
+326
-83
未找到文件。
src/views/education/create-component.vue
浏览文件 @
282c77d6
...
@@ -78,14 +78,15 @@
...
@@ -78,14 +78,15 @@
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-form-item
v-if=
"hasCertificate"
label=
"组件完成(%)"
prop=
"certificateCondition"
>
<el-form-item
label=
"组件完成(%)"
prop=
"certificateCondition"
>
<el-input-number
<el-input-number
v-model=
"portalComponent.certificateCondition"
v-model=
"portalComponent.certificateCondition"
controls-position=
"right"
controls-position=
"right"
@
change=
"handleChange"
@
change=
"handleChange"
:disabled=
"componentStatus == 3 || componentStatus == 4"
:disabled=
"componentStatus == 3 || componentStatus == 4"
:step=
"10"
:precision=
"0"
:min=
"10"
:step=
"1"
:min=
"0"
:max=
"100"
>
:max=
"100"
>
</el-input-number>
</el-input-number>
</el-form-item>
</el-form-item>
...
@@ -107,6 +108,13 @@
...
@@ -107,6 +108,13 @@
<el-input
v-model=
"item.name"
@
blur=
"moduleNameValidate(index)"
:disabled=
"fieldDisabled(item)"
size=
"small"
placeholder=
"请选择模块名称"
style=
"width:288px;"
></el-input>
<el-input
v-model=
"item.name"
@
blur=
"moduleNameValidate(index)"
:disabled=
"fieldDisabled(item)"
size=
"small"
placeholder=
"请选择模块名称"
style=
"width:288px;"
></el-input>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
<el-row>
<!--
<el-col
:span=
"10"
>
<el-form-item
label=
"模块名称"
prop=
"name"
>
<el-input
v-model=
"item.name"
@
blur=
"moduleNameValidate(index)"
:disabled=
"fieldDisabled(item)"
size=
"small"
placeholder=
"请选择模块名称"
style=
"width:288px;"
></el-input>
</el-form-item>
</el-col>
-->
<el-col
:span=
"8"
v-if=
"idType == 1"
>
<el-col
:span=
"8"
v-if=
"idType == 1"
>
<el-form-item
label=
"是否对外开放"
prop=
"openFlag"
>
<el-form-item
label=
"是否对外开放"
prop=
"openFlag"
>
<el-radio-group
v-model=
"item.openFlag"
@
change=
"selectIsOpen(index)"
:disabled=
"fieldDisabled(item) || item.openDisabled"
>
<el-radio-group
v-model=
"item.openFlag"
@
change=
"selectIsOpen(index)"
:disabled=
"fieldDisabled(item) || item.openDisabled"
>
...
@@ -115,6 +123,14 @@
...
@@ -115,6 +123,14 @@
</el-radio-group>
</el-radio-group>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"8"
v-if=
"idType == 1"
>
<el-form-item
label=
"通过标准"
prop=
"passType"
>
<el-radio-group
v-model=
"item.passType"
@
change=
"selectStandard(index)"
:disabled=
"fieldDisabled(item) || item.openDisabled"
>
<el-radio
:label=
"1"
>
全部完成
</el-radio>
<el-radio
:label=
"2"
>
无要求
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col
:span=
"6"
v-if=
"idType == 1"
>
<el-col
:span=
"6"
v-if=
"idType == 1"
>
<el-form-item
label=
"是否启用"
prop=
"status"
>
<el-form-item
label=
"是否启用"
prop=
"status"
>
<el-radio-group
v-model=
"item.status"
@
change=
"selectIsOpenStatus(index)"
:disabled=
"fieldDisabled(item)"
>
<el-radio-group
v-model=
"item.status"
@
change=
"selectIsOpenStatus(index)"
:disabled=
"fieldDisabled(item)"
>
...
@@ -405,14 +421,15 @@ export default {
...
@@ -405,14 +421,15 @@ export default {
imageUrl
:
''
,
imageUrl
:
''
,
seqNo
:
''
,
seqNo
:
''
,
certificateId
:
''
,
// 0 没有证书,配置证书为否
certificateId
:
''
,
// 0 没有证书,配置证书为否
certificateCondition
:
'
6
0'
,
// 证书完成率
certificateCondition
:
'
10
0'
,
// 证书完成率
status
:
''
status
:
''
},
},
componentList
:
{
componentList
:
{
moduleModelList
:
[{
moduleModelList
:
[{
id
:
''
,
id
:
''
,
name
:
''
,
name
:
''
,
openFlag
:
''
,
// 1 否 不开放 2 是 开放
openFlag
:
''
,
// 1 否 不开放 2 是 开放,
passType
:
'1'
,
//1:全部完成 2:无要求
templetModelList
:
[]
templetModelList
:
[]
}]
}]
},
},
...
@@ -510,6 +527,10 @@ export default {
...
@@ -510,6 +527,10 @@ export default {
})
})
}
}
},
},
selectStandard
(
index
){
},
// 删除图片
// 删除图片
deleteImg
()
{
deleteImg
()
{
vm
.
portalComponent
.
imageUrl
=
''
vm
.
portalComponent
.
imageUrl
=
''
...
@@ -520,14 +541,19 @@ export default {
...
@@ -520,14 +541,19 @@ export default {
vm
.
portalComponent
.
certificateId
=
''
vm
.
portalComponent
.
certificateId
=
''
if
(
val
==
'否'
)
{
if
(
val
==
'否'
)
{
vm
.
hasCertificate
=
false
vm
.
hasCertificate
=
false
vm
.
portalComponent
.
certificateCondition
=
0
//
vm.portalComponent.certificateCondition = 0
}
else
{
}
else
{
vm
.
hasCertificate
=
true
vm
.
hasCertificate
=
true
vm
.
portalComponent
.
certificateCondition
=
6
0
//vm.portalComponent.certificateCondition = 10
0
}
}
vm
.
portalComponent
.
certificateCondition
=
100
},
},
// 获取组件完成率
// 获取组件完成率
handleChange
(
value
)
{
handleChange
(
value
)
{
console
.
log
(
value
)
if
(
value
==
1
){
}
vm
.
portalComponent
.
certificateCondition
=
value
vm
.
portalComponent
.
certificateCondition
=
value
},
},
// 获取证书下拉列表
// 获取证书下拉列表
...
@@ -854,6 +880,7 @@ export default {
...
@@ -854,6 +880,7 @@ export default {
openFlag
:
1
,
// 1不开放 2开放
openFlag
:
1
,
// 1不开放 2开放
moduleType
:
1
,
// 2为从预设模块中添加
moduleType
:
1
,
// 2为从预设模块中添加
status
:
1
,
// 1 不启用 2启用
status
:
1
,
// 1 不启用 2启用
passType
:
1
,
templetModelList
:
[]
templetModelList
:
[]
});
});
vm
.
componentList
.
moduleModelList
[(
vm
.
componentList
.
moduleModelList
.
length
-
1
)].
openDisabled
=
true
;
vm
.
componentList
.
moduleModelList
[(
vm
.
componentList
.
moduleModelList
.
length
-
1
)].
openDisabled
=
true
;
...
@@ -1397,5 +1424,3 @@ export default {
...
@@ -1397,5 +1424,3 @@ export default {
}
}
}
}
</
style
>
</
style
>
src/views/education/edit-manager.vue
浏览文件 @
282c77d6
...
@@ -756,33 +756,26 @@
...
@@ -756,33 +756,26 @@
>
{{tag.name}}
</el-tag>
>
{{tag.name}}
</el-tag>
</el-col>
</el-col>
</el-form-item>
</el-form-item>
<el-form-item
label=
"学习时长控制
:"
class=
"time-contrl"
>
<el-form-item
required
label=
"学习时长
:"
class=
"time-contrl"
>
<el-col
:span=
"10"
>
<el-col
:span=
"10"
>
<el-radio-group
class=
"el-time-ctr"
v-model=
"formComponent.courseRequire"
:disabled=
"projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6"
>
<el-radio-group
class=
"el-time-ctr"
v-model=
"formComponent.courseRequire"
:disabled=
"projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6"
>
<el-radio
:label=
"1"
>
是(
则项目中各课程须达到课程配置中的观看时长要求才允许
通过)
</el-radio>
<el-radio
:label=
"1"
>
是(
必须达到课程配置的观看时长要求才算
通过)
</el-radio>
<el-radio
:label=
"0"
>
否
</el-radio>
<el-radio
:label=
"0"
>
否
</el-radio>
</el-radio-group>
</el-radio-group>
</el-col>
</el-col>
</el-form-item>
</el-form-item>
<el-form-item
label=
"配置证书:"
>
<el-col
:span=
"10"
>
<el-radio-group
class=
"el-configure"
v-model=
"formComponent.configure"
:disabled=
"projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6"
>
<el-radio
:label=
"1"
>
是
</el-radio>
<el-radio
:label=
"2"
>
否
</el-radio>
</el-radio-group>
</el-col>
</el-form-item>
</el-form>
</el-form>
<el-form
<el-form
ref=
"formExam"
ref=
"formExam"
label-width=
"150px"
label-width=
"150px"
:model=
"formExam"
:model=
"formExam"
class=
"achievement"
class=
"achievement"
v-show=
"formComponent.configure == 1"
>
>
<el-form-item
label=
"项目成绩评定条件
"
>
<el-form-item
required
label=
"项目通过标准
"
>
<el-select
<el-select
v-model=
"formExam.
certificate
Type"
v-model=
"formExam.
pass
Type"
placeholder=
"请选择"
placeholder=
"请选择"
style=
"width: 350px"
style=
"width: 350px"
@
change=
"updateCertificateType"
@
change=
"updateCertificateType"
...
@@ -796,13 +789,63 @@
...
@@ -796,13 +789,63 @@
></el-option>
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<div
v-show=
"formExam.certificateType == 2"
v-for=
"(item , index) in formExam.exam"
:key=
"index"
>
<el-form-item
label=
"发放证书"
>
<el-form-item
required
label=
"累计学习时长大于等于:"
v-show=
"formExam.passType == 3"
>
<el-col
:span=
"6"
>
<el-input
placeholder=
"请输入"
v-model=
"formComponent.passTotalLearnTime"
style=
"width:200px"
>
<
template
slot=
"append"
>
分钟
</
template
>
</el-input>
</el-form-item>
<!--add 选择平均分展示-->
<div
class=
"mleft60"
v-show=
"formExam.passType == 2"
>
<div
class=
"mini-source"
>
<div
class=
"source-item"
>
项目中最高
<el-input
placeholder=
"请输入数字"
size=
"mini"
v-model=
"formComponent.passExamCount"
style=
"width:150px"
>
<
template
slot=
"append"
>
门
</
template
>
</el-input>
考试成绩的平均分大于等于
<el-input
placeholder=
"请输入数字"
size=
"mini"
v-model=
"formComponent.passAverageScore"
style=
"width:150px"
>
<
template
slot=
"append"
>
分
</
template
>
</el-input>
则项目通过
</div>
</div>
</div>
<el-form-item
required
label=
"配置证书:"
>
<el-col
:span=
"10"
>
<el-radio-group
class=
"el-configure"
v-model=
"formComponent.configure"
:disabled=
"projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6"
>
<el-radio
:label=
"1"
>
是
</el-radio>
<el-radio
:label=
"2"
>
否
</el-radio>
</el-radio-group>
</el-col>
</el-form-item>
<!--edit 选择配置证书展示-->
<div
v-show=
"formComponent.configure == 1 && formExam.passType == 2"
v-for=
"(item , index) in formExam.exam"
:key=
"index"
>
<div
class=
"mleft60"
>
<div
class=
"soure-configure"
>
<div
class=
"configure-item mb15"
>
<span
class=
"configure-item-l"
>
平均分:
</span>
<el-input
placeholder=
"请输入数字"
size=
"mini"
v-model=
"item.rangeMin"
style=
"width:215px"
>
<
template
slot=
"append"
>
分
</
template
>
</el-input>
~
<el-input
placeholder=
"请输入数字"
size=
"mini"
v-model=
"item.rangeMax"
style=
"width:215px"
>
<
template
slot=
"append"
>
分
</
template
>
</el-input>
</div>
<div
class=
"configure-item"
>
<span
class=
"configure-item-l"
>
发放证书:
</span>
<el-select
<el-select
v-model=
"item.certificateId"
v-model=
"item.certificateId"
placeholder=
"请选择证书"
placeholder=
"请选择证书"
style=
""
size=
"mini"
style=
"width: 450px;"
@
change=
"updateCertificate(index)"
@
change=
"updateCertificate(index)"
:disabled=
"projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6"
:disabled=
"projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6"
>
>
...
@@ -813,13 +856,25 @@
...
@@ -813,13 +856,25 @@
:value=
"item.value"
:value=
"item.value"
></el-option>
></el-option>
</el-select>
</el-select>
</el-col>
</div>
<!-- <el-form-item label="发放证书" style="width:100px;">
<el-col :span="3">
<el-col :span="3">
<el-button @click="addCertificate" icon="el-icon-plus" circle></el-button>
<el-button @click="addCertificate" icon="el-icon-plus" circle></el-button>
<el-button @click="reduceCertificate(index)" icon="el-icon-minus" circle></el-button>
<el-button @click="reduceCertificate(index)" icon="el-icon-minus" circle></el-button>
</el-col>
</el-col>
</el-form-item>
</el-form-item> -->
<el-form-item
label=
"项目中最高"
>
<div
class=
"configure-option"
>
<el-button
size=
"mini"
@
click=
"addCertificate"
icon=
"el-icon-plus"
circle
></el-button>
<el-button
size=
"mini"
@
click=
"reduceCertificate(index)"
icon=
"el-icon-minus"
circle
></el-button>
</div>
</div>
</div>
<!-- <el-form-item label="项目中最高">
<el-col :span="3">
<el-col :span="3">
<el-input v-model="item.examCount" @change="updateCount(index)" :disabled="projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6"></el-input>
<el-input v-model="item.examCount" @change="updateCount(index)" :disabled="projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6"></el-input>
</el-col>
</el-col>
...
@@ -831,9 +886,10 @@
...
@@ -831,9 +886,10 @@
<el-col :span="3">
<el-col :span="3">
<el-input v-model="item.rangeMax" @change="updateMax(index)" :disabled="projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6"></el-input>
<el-input v-model="item.rangeMax" @change="updateMax(index)" :disabled="projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6"></el-input>
</el-col>
</el-col>
</el-form-item>
</el-form-item> -->
</div>
</div>
<el-form-item
v-show=
"formExam.certificateType == 1
"
label=
"发放证书"
>
<el-form-item
required
v-show=
"formComponent.configure == 1 && (formExam.passType == 1 || formExam.passType == 3)
"
label=
"发放证书"
>
<el-select
<el-select
v-model=
"formComponent.certificate"
v-model=
"formComponent.certificate"
placeholder=
"请选择证书"
placeholder=
"请选择证书"
...
@@ -1055,6 +1111,9 @@ export default {
...
@@ -1055,6 +1111,9 @@ export default {
configure: 2,
configure: 2,
certificate: "",
certificate: "",
courseRequire: 0, //0:不控制 1:按课程时长配置要求
courseRequire: 0, //0:不控制 1:按课程时长配置要求
passExamCount:'',
passAverageScore:'',
passTotalLearnTime:''
},
},
tagsComponent: [],
tagsComponent: [],
projectStatus: "",
projectStatus: "",
...
@@ -1063,6 +1122,7 @@ export default {
...
@@ -1063,6 +1122,7 @@ export default {
//考试数据
//考试数据
formExam: {
formExam: {
certificateType: 1,
certificateType: 1,
passType:1,
exam: [{
exam: [{
examCount: 1,
examCount: 1,
rangeMin: '',
rangeMin: '',
...
@@ -1072,14 +1132,19 @@ export default {
...
@@ -1072,14 +1132,19 @@ export default {
}]
}]
},
},
certificateTypeList: [
certificateTypeList: [
{
label: '所有组件通过',
value: 1,
},
{
{
label: '根据平均分
发证书
',
label: '根据平均分
设定
',
value: 2,
value: 2,
},
},
{
{
label: '
所有组件通过即发放
',
label: '
根据项目内学习时长设定
',
value:
1
,
value:
3
,
}
}
,
],
],
visibleName: false,
visibleName: false,
organizationContent: '',
organizationContent: '',
...
@@ -1320,7 +1385,11 @@ export default {
...
@@ -1320,7 +1385,11 @@ export default {
}
}
//初始化考试平均分配置数据
//初始化考试平均分配置数据
this.formExam.certificateType = editData.projectData.certificateType;
this.formExam.certificateType = editData.projectData.certificateType;
this.formExam.passType = editData.projectData.passType;
this.formExam.exam = editData.certificateRule;
this.formExam.exam = editData.certificateRule;
this.formComponent.passAverageScore = editData.projectData.passAverageScore > 0 ? editData.projectData.passAverageScore : ''
this.formComponent.passExamCount = editData.projectData.passExamCount > 0 ? editData.projectData.passExamCount : ''
this.formComponent.passTotalLearnTime = editData.projectData.passTotalLearnTime > 0 ? editData.projectData.passTotalLearnTime : ''
if(this.formExam.exam.length == 0) {
if(this.formExam.exam.length == 0) {
this.formExam.exam = [{
this.formExam.exam = [{
examCount: 1,
examCount: 1,
...
@@ -1528,14 +1597,23 @@ export default {
...
@@ -1528,14 +1597,23 @@ export default {
projectId: this.projectId,
projectId: this.projectId,
type: type,
type: type,
status: this.projectStatus,
status: this.projectStatus,
certificateType: this.formExam.
certificateType
,
certificateType: this.formExam.
passType == 2 ? 2 : 1
,
getCertificateRule: [],
getCertificateRule: [],
courseRequire: this.formComponent.courseRequire,
courseRequire: this.formComponent.courseRequire,
passType:this.formExam.passType
};
};
if(this.formExam.passType == 2){
param.passAverageScore = this.formComponent.passAverageScore
param.passExamCount = this.formComponent.passExamCount
}
if(this.formExam.passType == 3){
param.passTotalLearnTime = this.formComponent.passTotalLearnTime
}
// console.log('排序后',vm.tagsComponent,'param',param);
// console.log('排序后',vm.tagsComponent,'param',param);
if(this.formComponent.configure == 1) {
if(this.formComponent.configure == 1) {
// 2.多证书有规
// 2.多证书有规
if(this.formExam.
certificate
Type == 2) {
if(this.formExam.
pass
Type == 2) {
let ruleData = vm.formExam.exam;
let ruleData = vm.formExam.exam;
for(let o=0;o<ruleData.length;o++) {
for(let o=0;o<ruleData.length;o++) {
if(ruleData[o].certificateId != '' && ruleData[o].certificateId != null) {
if(ruleData[o].certificateId != '' && ruleData[o].certificateId != null) {
...
@@ -3071,6 +3149,9 @@ export default {
...
@@ -3071,6 +3149,9 @@ export default {
// }
// }
},
},
addCertificate
()
{
addCertificate
()
{
if
(
vm
.
formExam
.
exam
.
length
==
5
){
return
;
}
let
obj
=
{
let
obj
=
{
examCount
:
1
,
examCount
:
1
,
rangeMin
:
''
,
rangeMin
:
''
,
...
@@ -3185,6 +3266,11 @@ export default {
...
@@ -3185,6 +3266,11 @@ export default {
}
}
}
}
},
},
// add 校验输入是否为整数
checkIntFun
(
str
){
let
r
=
/^
\+?[
0-9
]
*$/
;
return
r
.
test
(
str
);
},
//更新项目成绩评定条件
//更新项目成绩评定条件
updateCertificateType
()
{
updateCertificateType
()
{
console
.
log
(
'更新certificateType'
,
vm
.
formExam
.
certificateType
)
console
.
log
(
'更新certificateType'
,
vm
.
formExam
.
certificateType
)
...
@@ -3200,26 +3286,138 @@ export default {
...
@@ -3200,26 +3286,138 @@ export default {
vm
.
formComponent
.
certificate
=
''
;
vm
.
formComponent
.
certificate
=
''
;
}
}
},
},
//校验分数是否存在交叉
checkCrossFun
(
d
){
let
isRepart
=
false
;
//alert(d.length)
if
(
d
.
length
>
0
){
for
(
let
i
=
1
;
i
<
d
.
length
;
i
++
){
// console.log(d[i])
if
(
d
[
i
].
rangeMin
<
d
[
i
-
1
].
rangeMax
&&
d
[
i
].
rangeMin
>
d
[
i
-
1
].
rangeMin
){
isRepart
=
true
;
//alert(isRepart)
break
;
}
}
}
return
isRepart
},
//校验考试通过平均分配置
//校验考试通过平均分配置
checkCertificate
()
{
checkCertificate
()
{
if
(
vm
.
formComponent
.
configure
==
2
)
{
// if(vm.formComponent.configure == 2) {
return
true
;
// return true;
// }
if
(
vm
.
formExam
.
passType
==
2
)
{
if
(
vm
.
formComponent
.
passExamCount
==
''
){
this
.
$message
({
message
:
'项目最高门数不能为空!'
,
type
:
'warning'
});
return
false
;
}
if
(
!
vm
.
checkIntFun
(
parseInt
(
vm
.
formComponent
.
passExamCount
))){
this
.
$message
({
message
:
'项目最高门数只能是数字!'
,
type
:
'warning'
});
return
false
;
}
if
(
vm
.
formComponent
.
passAverageScore
==
''
){
this
.
$message
({
message
:
'项目通过分数不能为空!'
,
type
:
'warning'
});
return
false
;
}
if
(
!
vm
.
checkIntFun
(
vm
.
formComponent
.
passAverageScore
)){
this
.
$message
({
message
:
'项目通过分数只能是数字!'
,
type
:
'warning'
});
return
false
;
}
}
if
(
vm
.
formExam
.
passType
==
3
){
if
(
vm
.
formComponent
.
passTotalLearnTime
===
''
){
this
.
$message
({
message
:
'学习时长不能为空'
,
type
:
'warning'
});
return
false
;
}
if
(
!
vm
.
checkIntFun
(
vm
.
formComponent
.
passTotalLearnTime
)){
this
.
$message
({
message
:
'学习时长只能是数字!'
,
type
:
'warning'
});
return
false
;
}
if
(
vm
.
formComponent
.
passTotalLearnTime
==
0
){
this
.
$message
({
message
:
'学习时长必须大于0'
,
type
:
'warning'
});
return
false
;
}
}
}
console
.
log
(
vm
.
formExam
.
exam
)
//空判断
//空判断
if
(
vm
.
formExam
.
certificateType
==
2
)
{
if
(
vm
.
formComponent
.
configure
==
1
)
{
if
(
vm
.
formExam
.
passType
==
2
){
let
checkIdList
=
[];
let
checkIdList
=
[];
let
isCross
=
vm
.
checkCrossFun
(
vm
.
formExam
.
exam
);
if
(
isCross
){
this
.
$message
({
message
:
'分数段之间不能有交叉重合分数'
,
type
:
'warning'
});
return
false
;
}
for
(
let
i
=
0
;
i
<
vm
.
formExam
.
exam
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
vm
.
formExam
.
exam
.
length
;
i
++
)
{
checkIdList
[
i
]
=
vm
.
formExam
.
exam
[
i
].
certificateId
;
checkIdList
[
i
]
=
vm
.
formExam
.
exam
[
i
].
certificateId
;
if
(
vm
.
formExam
.
exam
[
i
].
certificateId
==
''
){
if
(
vm
.
formExam
.
exam
[
i
].
certificateId
==
''
){
vm
.
$message
(
'证书不能为空'
);
// vm.$message('证书不能为空');
this
.
$message
({
message
:
'证书不能为空'
,
type
:
'warning'
});
return
false
;
}
// if(vm.formExam.exam[i].examCount == ''){
// // vm.$message('考试门数不能为空');
// this.$message({
// message: '考试门数不能为空',
// type: 'warning'
// });
// return false;
// }
if
(
!
vm
.
checkIntFun
(
vm
.
formExam
.
exam
[
i
].
rangeMax
)
||
!
vm
.
checkIntFun
(
vm
.
formExam
.
exam
[
i
].
rangeMin
)){
this
.
$message
({
message
:
'分数只能是整数'
,
type
:
'warning'
});
return
false
;
return
false
;
}
}
if
(
vm
.
formExam
.
exam
[
i
].
examCount
==
''
){
if
(
vm
.
formExam
.
exam
[
i
].
rangeMin
>
vm
.
formExam
.
exam
[
i
].
rangeMax
){
vm
.
$message
(
'考试门数不能为空'
);
this
.
$message
({
message
:
'分数最小值不能大于最大值'
,
type
:
'warning'
});
return
false
;
return
false
;
}
}
if
(
vm
.
formExam
.
exam
[
i
].
rangeMin
==
''
||
vm
.
formExam
.
exam
[
i
].
rangeMax
==
''
){
if
(
vm
.
formExam
.
exam
[
i
].
rangeMin
==
''
||
vm
.
formExam
.
exam
[
i
].
rangeMax
==
''
){
vm
.
$message
(
'分数不能为空'
);
//vm.$message('分数不能为空');
this
.
$message
({
message
:
'分数不能为空'
,
type
:
'warning'
});
return
false
;
return
false
;
}
}
}
}
...
@@ -3227,25 +3425,43 @@ export default {
...
@@ -3227,25 +3425,43 @@ export default {
checkIdList
=
checkIdList
.
sort
();
checkIdList
=
checkIdList
.
sort
();
for
(
let
j
=
0
;
j
<
checkIdList
.
length
-
1
;
j
++
)
{
for
(
let
j
=
0
;
j
<
checkIdList
.
length
-
1
;
j
++
)
{
if
(
checkIdList
[
j
]
==
checkIdList
[
j
+
1
])
{
if
(
checkIdList
[
j
]
==
checkIdList
[
j
+
1
])
{
vm
.
$message
(
'证书不能重复选择'
);
//vm.$message('证书不能重复选择');
this
.
$message
({
message
:
'证书不能重复选择'
,
type
:
'warning'
});
return
false
;
return
false
;
}
}
}
}
// 考试门数必须相同
// 考试门数必须相同
for
(
let
i
=
0
;
i
<
vm
.
formExam
.
exam
.
length
-
1
;
i
++
)
{
// for(let i=0;i
<
vm
.
formExam
.
exam
.
length
-
1
;
i
++
)
{
if
(
vm
.
formExam
.
exam
[
i
].
examCount
!=
vm
.
formExam
.
exam
[
i
+
1
].
examCount
)
{
// if (vm.formExam.exam[i].examCount != vm.formExam.exam[i+1].examCount) {
vm
.
$message
(
'考试门数必须相同'
);
// // vm.$message('考试门数必须相同');
// this.$message({
// message: '考试门数必须相同',
// type: 'warning'
// });
// return false;
// }
// }
}
else
{
if
(
this
.
formComponent
.
certificate
==
''
){
this
.
$message
({
message
:
'考试门数不能为空'
,
type
:
'warning'
});
return
false
;
return
false
;
}
}
}
}
}
else
if
(
vm
.
formExam
.
certificateType
==
1
)
{
}
else
if
(
vm
.
formExam
.
certificateType
==
1
)
{
//组件通过即发放 证书必填
//组件通过即发放 证书必填
if
(
vm
.
formComponent
.
configure
==
1
&&
vm
.
formExam
.
certificateType
==
1
)
{
//
if(vm.formComponent.configure == 1 && vm.formExam.certificateType == 1) {
if
(
vm
.
formComponent
.
certificate
==
''
)
{
//
if(vm.formComponent.certificate == '') {
vm
.
$message
(
'证书不能为空!'
);
//
vm.$message('证书不能为空!');
return
false
;
//
return false;
}
//
}
}
//
}
}
}
return
true
;
return
true
;
},
},
...
@@ -3613,6 +3829,33 @@ export default {
...
@@ -3613,6 +3829,33 @@ export default {
.rim
{
.rim
{
border
:
1px
solid
#dddddd
;
border
:
1px
solid
#dddddd
;
}
}
.mleft60
{
margin-left
:
60px
;
}
.soure-configure
{
background
:
#F9F9F9
;
padding
:
15px
;
width
:
550px
;
font-size
:
12px
;
color
:
#606266
;
position
:relative
;
margin-bottom
:
20px
;
.configure-option
{
position
:
absolute
;
right
:
-95px
;
top
:
50%
;
margin-top
:
-15px
;
}
.mb15
{
margin-bottom
:
15px
}
.configure-item
{
.configure-item-l
{
display
:
inline-block
;
width
:
60px
;
text-align
:
right
;
}
}
}
.mini-source
{
background
:
#F9F9F9
;
width
:
650px
;
padding
:
15px
;
margin-bottom
:
20px
;
.source-item
{
padding-top
:
0px
;
font-size
:
12px
;
line-height
:
28px
;
color
:
#606266
;
}
}
.step-content
{
.step-content
{
overflow
:
hidden
;
overflow
:
hidden
;
height
:
60px
;
height
:
60px
;
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录