Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
罗超
confucius
Commits
9a9fddd5
Commit
9a9fddd5
authored
Jan 20, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
7221bde1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
79 additions
and
76 deletions
+79
-76
target-form.vue
src/components/system/target-form.vue
+30
-47
stuTarget.vue
src/pages/system/stuTarget.vue
+49
-29
No files found.
src/components/system/target-form.vue
View file @
9a9fddd5
...
...
@@ -21,34 +21,34 @@
</div>
<div
class=
"row wrap"
>
<div
class=
"col-12"
>
<
el-input
v-model=
"objOption.GoalMoney"
placeholder=
"金额
"
@
keyup
.
native=
"checkInteger(objOption,'GoalMoney')"
></el-input
>
<
q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.GoalMoney"
ref=
"GoalMoney2
"
label=
"目标金额"
:rules=
"[val => !!val || '请填写目标金额']"
/
>
</div>
</div>
<div
class=
"row wrap"
style=
"margin-top:10px;"
>
<div
class=
"col-12"
>
<
selectTree
:treeData=
'DeptList'
:defaultArray=
"returnString"
nodeKey=
"DeptId"
:multiple=
"false"
label
Key=
"DeptName"
childrenKey=
"ChildList"
tipText=
"选择部门"
@
getChild=
"getChild"
></selectTree
>
<
q-select
filled
stack-label
v-model=
"objOption.Dept_Id"
:options=
"DeptList"
emit-value
map-options
label
=
"所属部门"
option-label=
"DeptName"
option-value=
"DeptId"
/
>
</div>
</div>
</
template
>
<
template
v-if=
"isShow==2"
>
<div
class=
"row wrap"
>
<div
class=
"col-12"
>
<el-date-picker
v-model=
"value2"
style=
"width:100%"
type=
"month"
value-format=
"yyyy-MM"
placeholder=
"选择月"
>
<el-date-picker
v-model=
"value2"
style=
"width:100%"
type=
"month"
value-format=
"yyyy-MM"
placeholder=
"选择月"
>
</el-date-picker>
</div>
</div>
<div
class=
"row wrap"
style=
"margin-top:10px;"
>
<div
class=
"col-12"
>
<el-input
v-model=
"updateMsg.GoalMoney"
placeholder=
"金额"
@
keyup
.
native=
"checkInteger(updateMsg,'GoalMoney')"
></el-input>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"updateMsg.GoalMoney"
ref=
"GoalMoney2"
label=
"目标金额"
:rules=
"[val => !!val || '请填写目标金额']"
/>
</div>
</div>
<div
class=
"row wrap"
style=
"margin-top:10px;"
>
<div
class=
"col-12"
>
<
selectTree
:treeData=
'DeptList'
:defaultArray=
"returnString2"
nodeKey=
"DeptId"
:multiple=
"false"
label
Key=
"DeptName"
childrenKey=
"ChildList"
tipText=
"选择部门"
@
getChild=
"getChild"
></selectTree
>
<
q-select
filled
stack-label
v-model=
"updateMsg.Dept_Id"
:options=
"DeptList"
emit-value
map-options
label
=
"所属部门"
option-label=
"DeptName"
option-value=
"DeptId"
/
>
</div>
</div>
</
template
>
...
...
@@ -56,10 +56,10 @@
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
label=
"取消"
flat
color=
"grey-10"
style=
"font-weight:400 !important"
@
click=
"closeSaveForm"
/>
<q-btn
label=
"立即提交"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
v-if=
"isShow==1"
:loading=
"saveLoading"
@
click=
"saveNeed"
/>
<q-btn
label=
"立即提交"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
v-if=
"isShow==2"
:loading=
"saveLoading"
@
click=
"saveTarget"
/>
<q-btn
label=
"立即提交"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
v-if=
"isShow==1"
:loading=
"saveLoading"
@
click=
"saveNeed"
/>
<q-btn
label=
"立即提交"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
v-if=
"isShow==2"
:loading=
"saveLoading"
@
click=
"saveTarget"
/>
</q-card-actions>
</q-card>
</q-dialog>
...
...
@@ -72,7 +72,6 @@
}
from
'../../api/system/index'
//部门
import
{
getDeptTree
,
getDeptList
}
from
'../../api/system/dept'
import
selectTree
from
'../../components/common/select-tree'
...
...
@@ -93,7 +92,7 @@
value
:
''
,
objOption
:
{
GoalMoney
:
""
,
Dept_Id
:
0
,
Dept_Id
:
13
,
TimeList
:
[],
},
updateMsg
:
{
...
...
@@ -105,39 +104,25 @@
},
optionTitle
:
""
,
DeptList
:
[],
// 部门下拉
returnString
:
[],
//默认岗位
isShow
:
1
,
value2
:
''
,
returnString2
:[]
value2
:
''
,
}
},
created
()
{
this
.
queryDeptList
();
},
mounted
()
{
this
.
initObj
();
this
.
queryDeptTree
();
},
methods
:
{
//获取部门结构树
queryDeptTree
()
{
getDeptTree
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
DeptList
=
res
.
Data
;
}
})
queryDeptList
()
{
var
qMsg
=
{};
getDeptList
(
qMsg
).
then
(
res
=>
{
this
.
DeptList
=
res
.
Data
;
});
},
getChild
(
deptArray
)
{
var
tempStr
=
""
;
if
(
deptArray
&&
deptArray
!=
''
)
{
tempStr
=
deptArray
;
}
if
(
tempStr
)
{
this
.
objOption
.
Dept_Id
=
tempStr
;
this
.
updateMsg
.
Dept_Id
=
tempStr
;
}
else
{
this
.
objOption
.
Dept_Id
=
0
;
this
.
updateMsg
.
Dept_Id
=
0
;
}
},
//选择月份
dateChange
(
val
)
{
this
.
objOption
.
TimeList
.
push
(
val
)
// 这里记得格式化
...
...
@@ -156,9 +141,8 @@
this
.
updateMsg
.
MonthStr
=
res
.
Data
.
MonthStr
;
this
.
updateMsg
.
GoalMoney
=
res
.
Data
.
GoalMoney
;
this
.
updateMsg
.
Dept_Id
=
res
.
Data
.
Dept_Id
;
this
.
returnString2
.
push
(
res
.
Data
.
Dept_Id
);
this
.
isShow
=
2
;
this
.
value2
=
this
.
updateMsg
.
YearStr
+
'-'
+
this
.
updateMsg
.
MonthStr
;
this
.
value2
=
this
.
updateMsg
.
YearStr
+
'-'
+
this
.
updateMsg
.
MonthStr
;
})
this
.
optionTitle
=
"修改目标"
}
else
{
...
...
@@ -192,12 +176,12 @@
})
},
//修改保存
saveTarget
(){
if
(
this
.
value2
)
{
saveTarget
()
{
if
(
this
.
value2
)
{
let
myDate
=
this
.
value2
.
split
(
'-'
);
this
.
updateMsg
.
YearStr
=
myDate
[
0
];
this
.
updateMsg
.
MonthStr
=
myDate
[
1
];
}
else
{
}
else
{
this
.
updateMsg
.
YearStr
=
''
;
this
.
updateMsg
.
MonthStr
=
''
;
}
...
...
@@ -219,5 +203,4 @@
}
}
}
</
script
>
</
script
>
\ No newline at end of file
src/pages/system/stuTarget.vue
View file @
9a9fddd5
...
...
@@ -3,13 +3,14 @@
<div
class=
"page-content"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table"
separator=
"none"
:data=
"dataList"
:columns=
"columns"
row-key=
"name"
>
<template
v-slot:top
=
"props"
>
<template
v-slot:top
>
<div
class=
"col-2 q-table__title"
>
目标管理
</div>
<q-space
/>
<div
class=
"page-option"
>
<el-date-picker
v-model=
"dateTime"
size=
"small"
style=
"margin-right:10px;"
type=
"month"
value-format=
"yyyy-MM"
@
change=
"dateChange"
placeholder=
"选择月"
>
<el-date-picker
v-model=
"dateTime"
size=
"small"
style=
"margin-right:10px;"
type=
"month"
value-format=
"yyyy-MM"
@
change=
"dateChange"
placeholder=
"选择月"
>
</el-date-picker>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
icon=
"add"
label=
"新增
阶段
"
@
click=
"addObj(null)"
/>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
icon=
"add"
label=
"新增
目标
"
@
click=
"addObj(null)"
/>
</div>
</
template
>
<
template
v-slot:body-cell-Id=
"props"
>
...
...
@@ -49,25 +50,46 @@
data
()
{
return
{
columns
:
[{
name
:
'YearStr'
,
label
:
'年份'
,
field
:
'YearStr'
,
align
:
'left'
},
{
name
:
'GoalMoney'
,
label
:
'金额'
,
field
:
'GoalMoney'
,
align
:
'left'
},
{
name
:
'CreateBy'
,
label
:
'创建人'
,
align
:
'left'
,
field
:
'CreateBy'
},
{
name
:
'Id'
,
label
:
'操作'
,
field
:
'Id'
}],
name
:
'DeptName'
,
label
:
'部门'
,
field
:
'DeptName'
,
align
:
'left'
},
{
name
:
'YearStr'
,
label
:
'年份'
,
field
:
'YearStr'
,
align
:
'left'
},
{
name
:
'MonthStr'
,
label
:
'月份'
,
field
:
'MonthStr'
,
align
:
'left'
},
{
name
:
'GoalMoney'
,
label
:
'金额'
,
field
:
'GoalMoney'
,
align
:
'left'
},
{
name
:
'CreateByName'
,
label
:
'创建人'
,
align
:
'left'
,
field
:
'CreateByName'
},
{
name
:
'CreateTimeStr'
,
label
:
'创建时间'
,
align
:
'left'
,
field
:
'CreateTimeStr'
},
{
name
:
'Id'
,
label
:
'操作'
,
field
:
'Id'
}
],
msg
:
{
pageIndex
:
1
,
pageSize
:
12
,
...
...
@@ -80,7 +102,7 @@
loading
:
true
,
isShowTargetForm
:
false
,
customObj
:
{},
dateTime
:
''
dateTime
:
''
}
},
mounted
()
{
...
...
@@ -88,12 +110,12 @@
},
methods
:
{
//选择日期
dateChange
(
val
){
if
(
val
)
{
dateChange
(
val
)
{
if
(
val
)
{
let
myDate
=
val
.
split
(
'-'
);
this
.
msg
.
YearStr
=
myDate
[
0
];
this
.
msg
.
MonthStr
=
myDate
[
1
];
}
else
{
}
else
{
this
.
msg
.
YearStr
=
''
;
this
.
msg
.
MonthStr
=
''
;
}
...
...
@@ -159,10 +181,8 @@
}
},
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
</
style
>
\ No newline at end of file
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