Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
evm-store
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanli
evm-store
Commits
57b2d28e
Commit
57b2d28e
authored
Jul 19, 2021
by
wanli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(): 新增一个表单模板
parent
188b6189
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
92 additions
and
85 deletions
+92
-85
tools/frontend/src/router/index.js
tools/frontend/src/router/index.js
+1
-0
tools/frontend/src/views/Application/Device.vue
tools/frontend/src/views/Application/Device.vue
+5
-2
tools/frontend/src/views/Application/DeviceForm.vue
tools/frontend/src/views/Application/DeviceForm.vue
+86
-83
No files found.
tools/frontend/src/router/index.js
View file @
57b2d28e
...
...
@@ -208,6 +208,7 @@ const router = new Router({
},
{
path
:
"
/device/form
"
,
name
:
"
DeviceForm
"
,
component
:
()
=>
import
(
"
@/views/Application/DeviceForm
"
),
},
],
...
...
tools/frontend/src/views/Application/Device.vue
View file @
57b2d28e
...
...
@@ -79,7 +79,7 @@
</a-form>
</div>
<div
class=
"tableListOperator"
>
<a-button
icon=
"plus"
type=
"primary"
>
新建
</a-button>
<a-button
icon=
"plus"
type=
"primary"
@
click=
"onAdd"
>
新建
</a-button>
<span
v-show=
"selectedRowKeys.length > 0"
>
<a-button>
批量操作
</a-button>
<!--
<a-dropdown
overlay=
{menu}>
...
...
@@ -108,7 +108,7 @@
<template
slot=
"action"
slot-scope=
"text, record"
>
<a
href=
"javascript:;"
>
查看
</a>
<a-divider
type=
"vertical"
/>
<a
href=
"javascript:;"
>
配置
</a>
<a
href=
"javascript:;"
>
编辑
</a>
</
template
>
</a-table>
</div>
...
...
@@ -221,6 +221,9 @@ export default {
ARangePicker
:
DatePicker
.
RangePicker
,
},
methods
:
{
onAdd
()
{
this
.
$router
.
push
({
name
:
"
DeviceForm
"
,
params
:
{}
});
},
toggleForm
()
{
this
.
expandForm
=
!
this
.
expandForm
;
},
...
...
tools/frontend/src/views/Application/DeviceForm.vue
View file @
57b2d28e
<
template
>
<a-page-header-wrapper
:title=
"title"
>
<a-card
:body-style=
"
{ padding: '24px 32px' }" :bordered="false">
<a-form>
<a-form-item
:label=
"$t('title')
"
label=
"标题
"
:labelCol=
"
{ span: 7 }"
:wrapperCol="{ span: 10 }"
>
<a-input
:placeholder=
"$t('titleInput')
"
/>
<a-input
placeholder=
"给目标起个名字
"
/>
</a-form-item>
<a-form-item
:label=
"$t('date')
"
label=
"起止日期
"
:labelCol=
"
{ span: 7 }"
:wrapperCol="{ span: 10 }"
>
<a-range-picker
style=
"width: 100%"
/>
</a-form-item>
<a-form-item
:label=
"$t('describe')
"
label=
"目标描述
"
:labelCol=
"
{ span: 7 }"
:wrapperCol="{ span: 10 }"
>
<a-textarea
rows=
"4"
:placeholder=
"$t('describeInput')
"
/>
<a-textarea
rows=
"4"
placeholder=
"请输入你阶段性工作目标
"
/>
</a-form-item>
<a-form-item
:label=
"$t('metrics')
"
label=
"衡量标准
"
:labelCol=
"
{ span: 7 }"
:wrapperCol="{ span: 10 }"
>
<a-textarea
rows=
"4"
:placeholder=
"$t('metricsInput')
"
/>
<a-textarea
rows=
"4"
placeholder=
"请输入衡量标准
"
/>
</a-form-item>
<a-form-item
:label=
"$t('customer')
"
label=
"客户
"
:labelCol=
"
{ span: 7 }"
:wrapperCol="{ span: 10 }"
:required="false"
>
<a-input
:placeholder=
"$t('customerInput')
"
/>
<a-input
placeholder=
"请描述你服务的客户,内部客户直接 @姓名/工号
"
/>
</a-form-item>
<a-form-item
:label=
"$t('critics')
"
label=
"邀评人
"
:labelCol=
"
{ span: 7 }"
:wrapperCol="{ span: 10 }"
:required="false"
>
<a-input
:placeholder=
"$t('criticsInput')
"
/>
<a-input
placeholder=
"请直接 @姓名/工号,最多可邀请 5 人
"
/>
</a-form-item>
<a-form-item
:label=
"$t('weight')
"
label=
"权重
"
:labelCol=
"
{ span: 7 }"
:wrapperCol="{ span: 10 }"
:required="false"
...
...
@@ -55,32 +56,33 @@
<span>
%
</span>
</a-form-item>
<a-form-item
:label=
"$t('disclosure')
"
label=
"目标公开
"
:labelCol=
"
{ span: 7 }"
:wrapperCol="{ span: 10 }"
:required="false"
:help="$t('disclosureDesc')
"
help="客户、邀评人默认被分享
"
>
<a-radio-group
v-model=
"value"
>
<a-radio
:value=
"1"
>
{{
$t
(
"
public
"
)
}}
</a-radio>
<a-radio
:value=
"2"
>
{{
$t
(
"
partially
"
)
}}
</a-radio>
<a-radio
:value=
"3"
>
{{
$t
(
"
private
"
)
}}
</a-radio>
<a-radio
:value=
"1"
>
公开
</a-radio>
<a-radio
:value=
"2"
>
部分公开
</a-radio>
<a-radio
:value=
"3"
>
不公开
</a-radio>
</a-radio-group>
<a-select
mode=
"multiple"
v-if=
"value === 2"
>
<a-select-option
value=
"4"
>
{{
$t
(
"
colleague1
"
)
}}
</a-select-option>
<a-select-option
value=
"5"
>
{{
$t
(
"
colleague2
"
)
}}
</a-select-option>
<a-select-option
value=
"6"
>
{{
$t
(
"
colleague3
"
)
}}
</a-select-option>
<a-select-option
value=
"4"
>
同事甲
</a-select-option>
<a-select-option
value=
"5"
>
同事乙
</a-select-option>
<a-select-option
value=
"6"
>
同事丙
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
style=
"margin-top: 24px"
:wrapperCol=
"
{ span: 10, offset: 7 }"
>
<a-button
type=
"primary"
>
{{
$t
(
"
submit
"
)
}}
</a-button>
<a-button
style=
"margin-left: 8px"
>
{{
$t
(
"
save
"
)
}}
</a-button>
<a-button
type=
"primary"
>
提交
</a-button>
<a-button
style=
"margin-left: 8px"
>
保存
</a-button>
</a-form-item>
</a-form>
</a-card>
</a-page-header-wrapper>
</
template
>
<
script
>
...
...
@@ -144,11 +146,12 @@ export default {
data
()
{
return
{
value
:
1
,
title
:
"
添加
"
,
};
},
computed
:
{
desc
()
{
return
this
.
$t
(
"
pageDesc
"
)
;
return
"
表单页用于向用户收集或验证信息,基础表单常见于数据项较少的表单场景。
"
;
},
},
created
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment