Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
9e1dcf8f
提交
9e1dcf8f
编写于
2月 12, 2020
作者:
guangjun.yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
机构验证问题
上级
77ef2fcd
变更
2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
68 行增加
和
17 行删除
+68
-17
edit-entry.vue
src/views/education/edit-entry.vue
+21
-3
edit-manager.vue
src/views/education/edit-manager.vue
+47
-14
未找到文件。
src/views/education/edit-entry.vue
浏览文件 @
9e1dcf8f
...
@@ -275,9 +275,6 @@ export default {
...
@@ -275,9 +275,6 @@ export default {
}
}
};
};
let checkOrgNameList = (rule, value, callback) => {
};
return {
return {
curmbFirst: "
教培项目
",
curmbFirst: "
教培项目
",
curmbSecond: "
项目组件
",
curmbSecond: "
项目组件
",
...
@@ -441,6 +438,26 @@ export default {
...
@@ -441,6 +438,26 @@ export default {
}
}
});
});
},
},
checkOrgNameList() {
let nameList = this.formData.organizationNameList;
for(let i = 0; i < nameList.length; i ++) {
if(!nameList[i]) {
this.$message.error('发起机构列表中不能为空');
return false;
}
}
for(let i = 0; i < nameList.length - 1; i ++) {
for(let j = i + 1; j < nameList.length; j ++) {
if(nameList[i] == nameList[j]) {
this.$message.error('发起机构列表中不能重复');
return false;
}
}
}
return true;
},
submitForm(formName) {
submitForm(formName) {
let flag = null;
let flag = null;
this.$refs[formName].validate(valid => {
this.$refs[formName].validate(valid => {
...
@@ -723,6 +740,7 @@ export default {
...
@@ -723,6 +740,7 @@ export default {
complete(type) {
complete(type) {
//1是暂存,2是完成
//1是暂存,2是完成
if (type == 2) {
if (type == 2) {
if(!this.checkOrgNameList()) return;
if (!vm.formData.attachmentUrl1) {
if (!vm.formData.attachmentUrl1) {
vm.uploadImgMessage = true;
vm.uploadImgMessage = true;
} else {
} else {
...
...
src/views/education/edit-manager.vue
浏览文件 @
9e1dcf8f
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
</el-col>
</el-col>
</el-form-item>
</el-form-item>
<el-form-item
label=
"发起机构名称:"
>
<el-form-item
label=
"发起机构名称:"
>
<!--
<el-form-item
label=
"发起机构名称:"
prop=
"organizationName"
>
-->
<!--
<el-form-item
label=
"发起机构名称:"
prop=
"organizationName
List
"
>
-->
<el-col
:span=
"13"
v-for=
"(item, index) in formData.organizationNameList"
:key=
"index"
>
<el-col
:span=
"13"
v-for=
"(item, index) in formData.organizationNameList"
:key=
"index"
>
<el-input
<el-input
size=
"small"
size=
"small"
...
@@ -1008,6 +1008,19 @@ export default {
...
@@ -1008,6 +1008,19 @@ export default {
callback(new Error(`请输入0~100正整数`));
callback(new Error(`请输入0~100正整数`));
}
}
};
};
let checkOrgListName = (rule, value, callback) => {
console.log(rule, value, callback);
// const val = parseFloat(value);
// const isInteger = Number.isInteger(val);
// // if((isInteger && val > 0) || checkNeedRule(val)){
// if (!value || (isInteger && val >= 0 && val <= 100)) {
// callback();
// } else {
// callback(new Error(`请输入0~100正整数`));
// }
};
return {
return {
idTypeValue: 1,
idTypeValue: 1,
idTypeProject: "",
idTypeProject: "",
...
@@ -1312,15 +1325,18 @@ export default {
...
@@ -1312,15 +1325,18 @@ export default {
},
},
{ validator: checkProjectStr, trigger: "
blur
" }
{ validator: checkProjectStr, trigger: "
blur
" }
],
],
organizationName: [
// organizationName: [
{ required: true, message: "
请填写发起机构名称
", trigger: "
blur
" },
// { required: true, message: "
请填写发起机构名称
", trigger: "
blur
" },
{
// {
min: 1,
// min: 1,
max: 16,
// max: 16,
message: "
超过
12
个最大字数限制,请精简字数或使用简称
",
// message: "
超过
12
个最大字数限制,请精简字数或使用简称
",
trigger: "
blur
"
// trigger: "
blur
"
}
// }
],
// ],
// organizationNameList: [
// { validator: checkOrgListName, trigger: "
blur
" }
// ],
duringTime: [
duringTime: [
{
{
required: true,
required: true,
...
@@ -1428,6 +1444,26 @@ export default {
...
@@ -1428,6 +1444,26 @@ export default {
}
}
}
}
},
},
checkOrgNameList() {
let nameList = this.formData.organizationNameList;
for(let i = 0; i < nameList.length; i ++) {
if(!nameList[i]) {
this.$message.error('发起机构列表中不能为空');
return false;
}
}
for(let i = 0; i < nameList.length - 1; i ++) {
for(let j = i + 1; j < nameList.length; j ++) {
if(nameList[i] == nameList[j]) {
this.$message.error('发起机构列表中不能重复');
return false;
}
}
}
return true;
},
//表单校验
//表单校验
submitForm(formName) {
submitForm(formName) {
let flag = null;
let flag = null;
...
@@ -1983,6 +2019,7 @@ export default {
...
@@ -1983,6 +2019,7 @@ export default {
nextStep
()
{
nextStep
()
{
if
(
this
.
active
==
0
)
{
if
(
this
.
active
==
0
)
{
let
formName
=
"formData"
;
let
formName
=
"formData"
;
if
(
!
this
.
checkOrgNameList
())
return
;
let
removeState
=
this
.
submitForm
(
formName
);
let
removeState
=
this
.
submitForm
(
formName
);
if
(
!
vm
.
formData
.
attachmentUrl1
)
{
if
(
!
vm
.
formData
.
attachmentUrl1
)
{
vm
.
uploadImgMessage
=
true
;
vm
.
uploadImgMessage
=
true
;
...
@@ -2831,7 +2868,6 @@ export default {
...
@@ -2831,7 +2868,6 @@ export default {
idList
,
idList
,
this
.
changedOrganization2
this
.
changedOrganization2
);
);
//debugger;
if
(
intersect
.
length
>
0
)
{
if
(
intersect
.
length
>
0
)
{
//选中
//选中
//this.$refs.multipleOrganization.toggleRowSelection(row);
//this.$refs.multipleOrganization.toggleRowSelection(row);
...
@@ -2986,7 +3022,6 @@ export default {
...
@@ -2986,7 +3022,6 @@ export default {
this
.
changedPerson
,
this
.
changedPerson
,
differenceScope
differenceScope
);
);
// debugger;
for
(
let
i
=
0
;
i
<
unionScope
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
unionScope
.
length
;
i
++
)
{
scope
+=
unionScope
[
i
]
+
"|"
;
scope
+=
unionScope
[
i
]
+
"|"
;
}
}
...
@@ -3057,7 +3092,6 @@ export default {
...
@@ -3057,7 +3092,6 @@ export default {
idList
,
idList
,
this
.
changedPerson2
this
.
changedPerson2
);
);
// debugger;
if
(
intersect
.
length
>
0
)
{
if
(
intersect
.
length
>
0
)
{
//选中
//选中
//this.$refs.multiplePerson.toggleRowSelection(row);
//this.$refs.multiplePerson.toggleRowSelection(row);
...
@@ -3217,7 +3251,6 @@ export default {
...
@@ -3217,7 +3251,6 @@ export default {
idList
,
idList
,
this
.
changedEcology2
this
.
changedEcology2
);
);
// debugger;
if
(
intersect
.
length
>
0
)
{
if
(
intersect
.
length
>
0
)
{
//选中
//选中
}
else
if
(
intersect2
.
length
>
0
)
{
}
else
if
(
intersect2
.
length
>
0
)
{
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录