Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
提交
议题看板
打开侧边栏
jingqi.liu
pica.cloud.web-education-admin
提交
99bf3cc0
提交
99bf3cc0
编写于
3月 23, 2019
作者:
zhentian.jia
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
提示错误 暂存 结束时间 字数限制
上级
f8517a6c
变更
1
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
96 行增加
和
49 行删除
+96
-49
add-manager.vue
src/views/education/add-manager.vue
+96
-49
未找到文件。
src/views/education/add-manager.vue
浏览文件 @
99bf3cc0
...
...
@@ -20,14 +20,21 @@
</el-col>
</el-row>
<div
class=
"first-step"
v-if=
"active === 0"
>
<el-form
ref=
"formData"
:model=
"formData"
:rules=
"rules"
label-width=
"150px"
>
<el-form
ref=
"formData"
:model=
"formData"
:rules=
"rules"
label-width=
"150px"
class=
"basic-form"
>
<el-form-item
label=
"项目名称:"
prop=
"projectName"
>
<el-col
:span=
"13"
>
<el-input
size=
"mini"
v-model=
"formData.projectName"
placeholder=
"请输入项目名称"
></el-input>
<el-input
size=
"mini"
v-model=
"formData.projectName"
placeholder=
"请输入项目名称"
style=
"width:83%;"
></el-input>
<span
class=
"word-num"
>
{{
(
formData
.
projectName
).
replace
(
/
\s
+/g
,
""
).
length
}}
/20
</span>
</el-col>
</el-form-item>
<el-form-item
label=
"项目时间:"
required
>
<el-col
:span=
"
3
"
>
<el-col
:span=
"
5
"
>
<el-form-item
prop=
"projectBegintime"
>
<el-date-picker
v-model=
"formData.projectBegintime"
...
...
@@ -36,12 +43,13 @@
placeholder=
"请选择开始时间"
value-format=
"yyyy-MM-dd HH:mm:ss"
:picker-options=
"pickerOptions0"
style=
"width: 100%;"
></el-date-picker>
</el-form-item>
</el-col>
<el-col
class=
"line"
:span=
"
0"
>
</el-col>
<el-col
:span=
"
4
"
>
<el-form-item
label
=
" "
prop=
"projectEndtime"
>
<el-col
class=
"line"
:span=
"
1"
>
~
</el-col>
<el-col
:span=
"
5
"
>
<el-form-item
label
prop=
"projectEndtime"
>
<el-date-picker
v-model=
"formData.projectEndtime"
size=
"mini"
...
...
@@ -50,6 +58,7 @@
value-format=
"yyyy-MM-dd HH:mm:ss"
:picker-options=
"pickerOptions1"
default-time=
"23:59:59"
style=
"width: 100%;"
></el-date-picker>
</el-form-item>
</el-col>
...
...
@@ -62,7 +71,9 @@
:autosize=
"
{ minRows: 5}"
placeholder="请输入项目简介"
v-model="formData.projectIntro"
style="width:83%;"
>
</el-input>
<span
class=
"word-num"
>
{{
(
formData
.
projectIntro
).
replace
(
/
\s
+/g
,
""
).
length
}}
/150
</span>
</el-col>
</el-form-item>
<el-form-item
label=
"列表图片:"
prop=
"attachmentUrl1"
>
...
...
@@ -132,7 +143,7 @@
</div>
</el-upload>
</el-form-item>
<el-form-item
label=
"
可下载附
件:"
>
<el-form-item
label=
"
添加下载文
件:"
>
<el-col
:span=
"10"
>
<el-upload
v-model=
"formData.attachmentUrl3"
...
...
@@ -208,12 +219,12 @@
:label=
"item.label"
:value=
"item.id"
></el-option>
</el-select>
-->
</el-select>
-->
<!--
<el-cascader
expand-trigger=
"hover"
:options=
"organizationRegion"
v-model=
"formOrganization.region"
></el-cascader>
-->
></el-cascader>
-->
</el-form-item>
<el-form-item>
<el-select
size=
"mini"
v-model=
"formOrganization.grade"
placeholder=
"全部医院级别"
>
...
...
@@ -497,7 +508,7 @@ export default {
attachmentUrl2
:
""
,
attachmentUrl3
:
""
,
attachmentMore1
:
{},
attachmentMore2
:
{}
,
attachmentMore2
:
{}
},
pickerOptions0
:
{
disabledDate
:
time
=>
{
...
...
@@ -612,7 +623,7 @@ export default {
},
rules
:
{
projectName
:
[
{
required
:
true
,
message
:
"请输入
活动
名称"
,
trigger
:
"blur"
},
{
required
:
true
,
message
:
"请输入
项目
名称"
,
trigger
:
"blur"
},
{
min
:
2
,
max
:
20
,
...
...
@@ -653,7 +664,13 @@ export default {
{
required
:
true
,
message
:
"请选择活动资源"
,
trigger
:
"change"
}
],
projectIntro
:
[
{
required
:
true
,
message
:
"请填写项目简介"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"请填写项目简介"
,
trigger
:
"blur"
},
{
min
:
1
,
max
:
500
,
message
:
"输入长度为1-500的内容,可包含中英文、数字及特殊符号"
,
trigger
:
"blur"
}
],
attachmentUrl1
:
[
{
required
:
true
,
message
:
"请选择列表图片"
,
trigger
:
"blur"
}
...
...
@@ -728,12 +745,12 @@ export default {
attachmentMore1
:
{
attachmentName
:
editData
.
attachmentData
[
0
].
attachmentName
,
attachmentExt
:
editData
.
attachmentData
[
0
].
attachmentExt
,
attachmentSize
:
editData
.
attachmentData
[
0
].
attachmentSize
,
attachmentSize
:
editData
.
attachmentData
[
0
].
attachmentSize
},
attachmentMore2
:
{
attachmentName
:
editData
.
attachmentData
[
1
].
attachmentName
,
attachmentExt
:
editData
.
attachmentData
[
1
].
attachmentExt
,
attachmentSize
:
editData
.
attachmentData
[
1
].
attachmentSize
,
attachmentSize
:
editData
.
attachmentData
[
1
].
attachmentSize
}
};
if
(
editData
.
attachmentData
.
length
>
2
)
{
...
...
@@ -742,7 +759,7 @@ export default {
name
:
editData
.
attachmentData
[
i
].
attachmentName
,
url
:
editData
.
attachmentData
[
i
].
attachmentUrl
,
attachmentExt
:
editData
.
attachmentData
[
i
].
attachmentExt
,
attachmentSize
:
editData
.
attachmentData
[
i
].
attachmentSize
,
attachmentSize
:
editData
.
attachmentData
[
i
].
attachmentSize
};
vm
.
fileList
.
push
(
pdfItem
);
}
...
...
@@ -765,16 +782,18 @@ export default {
let
req
=
{};
let
projectId
=
vm
.
getUrlSearch
(
window
.
location
.
href
,
"projectId"
);
if
(
projectId
!=
null
&&
projectId
!=
""
)
{
vm
.
GET
(
"portal/portalInfo/getProjectInfo/"
+
projectId
,
req
).
then
(
res
=>
{
if
(
res
.
code
==
"000000"
&&
res
.
data
.
projectData
!=
null
)
{
let
editData
=
res
.
data
;
this
.
setEditData
(
editData
);
this
.
projectStatus
=
res
.
data
.
projectData
.
projectStatus
;
//console.log('projectStatus:',this.projectStatus)
}
else
{
console
.
log
(
res
);
vm
.
GET
(
"portal/portalInfo/getProjectInfo/"
+
projectId
,
req
).
then
(
res
=>
{
if
(
res
.
code
==
"000000"
&&
res
.
data
.
projectData
!=
null
)
{
let
editData
=
res
.
data
;
this
.
setEditData
(
editData
);
this
.
projectStatus
=
res
.
data
.
projectData
.
projectStatus
;
//console.log('projectStatus:',this.projectStatus)
}
else
{
console
.
log
(
res
);
}
}
}
);
);
}
},
//编辑/更新 基础信息
...
...
@@ -839,14 +858,17 @@ export default {
//console.log(postData);
vm
.
POST
(
"portal/portalInfo/insertOrUpdate"
,
postData
).
then
(
res
=>
{
if
(
res
.
code
==
"000000"
)
{
console
.
log
(
res
);
this
.
active
++
;
this
.
stepData
=
[
false
,
true
,
false
];
//console.log(res);
this
.
projectId
=
res
.
data
.
id
;
this
.
projectStatus
=
res
.
data
.
projectStatus
;
//console.log('projectStatus:',this.projectStatus)
this
.
initRange
();
this
.
getDepartment
();
if
(
option
!=
"storage"
)
{
this
.
active
++
;
this
.
stepData
=
[
false
,
true
,
false
];
// this.projectId = res.data.id;
// this.projectStatus = res.data.projectStatus;
this
.
initRange
();
this
.
getDepartment
();
}
}
});
},
...
...
@@ -891,14 +913,14 @@ export default {
if
(
res
.
code
==
"000000"
)
{
//notify
vm
.
$message
({
type
:
'success'
,
message
:
'操作成功!'
type
:
"success"
,
message
:
"操作成功!"
});
this
.
$router
.
push
(
"item-manager"
);
}
else
{
vm
.
$message
({
message
:
res
.
message
,
type
:
'warning'
type
:
"warning"
});
}
});
...
...
@@ -926,11 +948,21 @@ export default {
storage
()
{
console
.
log
(
"暂存步骤"
+
(
this
.
active
+
1
));
if
(
this
.
active
==
0
)
{
//暂存步骤1
let
formName
=
"formData"
;
let
state
=
this
.
submitForm
(
formName
);
if
(
state
===
true
)
{
this
.
insertOrUpdate
();
if
(
this
.
formData
.
projectName
!=
""
)
{
let
param
=
{
projectName
:
this
.
formData
.
projectName
};
vm
.
GET
(
"portal/portalInfo/checkProjectName"
,
param
).
then
(
res
=>
{
//console.log(res);
if
(
res
.
code
==
"000000"
)
{
//移动到第二页 选择范围
this
.
insertOrUpdate
(
"storage"
);
}
else
{
this
.
$message
.
error
(
"项目名称"
+
res
.
message
);
}
});
}
else
{
this
.
$message
.
error
(
"请输入项目名称"
);
}
}
else
if
(
this
.
active
==
1
)
{
//暂存步骤2
...
...
@@ -959,8 +991,8 @@ export default {
//暂存范围
console
.
log
(
res
);
vm
.
$message
({
type
:
'info'
,
message
:
res
.
message
type
:
"info"
,
message
:
res
.
message
});
});
}
else
if
(
this
.
active
==
2
)
{
...
...
@@ -1056,8 +1088,8 @@ export default {
this
.
stepData
=
[
false
,
false
,
true
];
}
else
{
vm
.
$message
({
type
:
'info'
,
message
:
res
.
message
type
:
"info"
,
message
:
res
.
message
});
}
});
...
...
@@ -1100,8 +1132,8 @@ export default {
this
.
stepData
=
[
false
,
false
,
true
];
}
else
{
vm
.
$message
({
type
:
'info'
,
message
:
res
.
message
type
:
"info"
,
message
:
res
.
message
});
}
});
...
...
@@ -1120,7 +1152,7 @@ export default {
size
:
0.5
,
sizeText
:
"500K"
,
key
:
"attachmentUrl1"
,
more
:
"attachmentMore1"
,
more
:
"attachmentMore1"
};
this
.
beforeAvatarUpload
(
file
,
fileLimit
);
},
...
...
@@ -1132,7 +1164,7 @@ export default {
size
:
2
,
sizeText
:
"2.0M"
,
key
:
"attachmentUrl2"
,
more
:
"attachmentMore2"
,
more
:
"attachmentMore2"
};
if
(
this
.
formData
.
type
==
1
)
{
this
.
beforeAvatarUpload
(
file
,
fileLimit
);
...
...
@@ -1163,7 +1195,7 @@ export default {
name
:
path
.
name
,
url
:
path
.
fullPath
,
attachmentExt
:
path
.
ext
,
attachmentSize
:
path
.
size
,
attachmentSize
:
path
.
size
};
vm
.
fileList
.
push
(
fileItem
);
vm
.
$message
.
success
(
"上传成功"
);
...
...
@@ -1244,7 +1276,7 @@ export default {
vm
.
formData
[
fileLimit
.
more
]
=
{
attachmentName
:
path
.
name
,
attachmentExt
:
path
.
ext
,
attachmentSize
:
path
.
size
,
attachmentSize
:
path
.
size
};
vm
.
$message
.
success
(
"上传成功"
);
});
...
...
@@ -1294,6 +1326,7 @@ export default {
let
tabName
=
tab
.
name
;
if
(
tabName
==
"second"
)
{
//设定机构
this
.
getCheckedTree
();
this
.
getOrganization
();
}
else
if
(
tabName
==
"third"
)
{
//设定科室
...
...
@@ -1306,6 +1339,11 @@ export default {
this
.
getPeople
();
}
},
//获取勾选树
getCheckedTree
()
{
let
allTree
=
Object
.
assign
({},
this
.
treeData
[
0
].
children
);
console
.
log
(
allTree
);
},
//初始化范围树
setTreeData
(
administrative
)
{
let
treeIdList
=
[];
...
...
@@ -1378,7 +1416,7 @@ export default {
vm
.
GET
(
"portal/scope/v1/administrative/children"
,
req
).
then
(
res
=>
{
if
(
res
.
code
==
"000000"
)
{
let
administrative
=
res
.
data
.
administrative
;
console
.
log
(
administrative
);
//
console.log(administrative);
data
.
children
=
administrative
;
//data.children.push(newChild);
}
...
...
@@ -2040,6 +2078,15 @@ export default {
}
.first-step
{
margin-top
:
20px
;
.word-num
{
font-size
:
12px
;
color
:
#999
;
padding-top
:
5px
;
}
.line
{
margin-left
:
10px
;
width
:
20px
;
}
.bg-uploader
{
img
{
float
:
left
;
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录