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
Show 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 @@
...
@@ -21,34 +21,34 @@
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"row wrap"
>
<div
class=
"col-12"
>
<div
class=
"col-12"
>
<
el-input
v-model=
"objOption.GoalMoney"
placeholder=
"金额
"
<
q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.GoalMoney"
ref=
"GoalMoney2
"
@
keyup
.
native=
"checkInteger(objOption,'GoalMoney')"
></el-input
>
label=
"目标金额"
:rules=
"[val => !!val || '请填写目标金额']"
/
>
</div>
</div>
</div>
</div>
<div
class=
"row wrap"
style=
"margin-top:10px;"
>
<div
class=
"row wrap"
style=
"margin-top:10px;"
>
<div
class=
"col-12"
>
<div
class=
"col-12"
>
<
selectTree
:treeData=
'DeptList'
:defaultArray=
"returnString"
nodeKey=
"DeptId"
:multiple=
"false"
<
q-select
filled
stack-label
v-model=
"objOption.Dept_Id"
:options=
"DeptList"
emit-value
map-options
label
Key=
"DeptName"
childrenKey=
"ChildList"
tipText=
"选择部门"
@
getChild=
"getChild"
></selectTree
>
label
=
"所属部门"
option-label=
"DeptName"
option-value=
"DeptId"
/
>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
template
v-if=
"isShow==2"
>
<
template
v-if=
"isShow==2"
>
<div
class=
"row wrap"
>
<div
class=
"row wrap"
>
<div
class=
"col-12"
>
<div
class=
"col-12"
>
<el-date-picker
v-model=
"value2"
style=
"width:100%"
type=
"month"
<el-date-picker
v-model=
"value2"
style=
"width:100%"
type=
"month"
value-format=
"yyyy-MM"
placeholder=
"选择月"
>
value-format=
"yyyy-MM"
placeholder=
"选择月"
>
</el-date-picker>
</el-date-picker>
</div>
</div>
</div>
</div>
<div
class=
"row wrap"
style=
"margin-top:10px;"
>
<div
class=
"row wrap"
style=
"margin-top:10px;"
>
<div
class=
"col-12"
>
<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>
</div>
<div
class=
"row wrap"
style=
"margin-top:10px;"
>
<div
class=
"row wrap"
style=
"margin-top:10px;"
>
<div
class=
"col-12"
>
<div
class=
"col-12"
>
<
selectTree
:treeData=
'DeptList'
:defaultArray=
"returnString2"
nodeKey=
"DeptId"
:multiple=
"false"
<
q-select
filled
stack-label
v-model=
"updateMsg.Dept_Id"
:options=
"DeptList"
emit-value
map-options
label
Key=
"DeptName"
childrenKey=
"ChildList"
tipText=
"选择部门"
@
getChild=
"getChild"
></selectTree
>
label
=
"所属部门"
option-label=
"DeptName"
option-value=
"DeptId"
/
>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -56,10 +56,10 @@
...
@@ -56,10 +56,10 @@
<q-separator
/>
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<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=
"取消"
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"
<q-btn
label=
"立即提交"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
v-if=
"isShow==1"
@
click=
"saveNeed"
/>
:loading=
"saveLoading"
@
click=
"saveNeed"
/>
<q-btn
label=
"立即提交"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
v-if=
"isShow==2"
:loading=
"saveLoading"
<q-btn
label=
"立即提交"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
v-if=
"isShow==2"
@
click=
"saveTarget"
/>
:loading=
"saveLoading"
@
click=
"saveTarget"
/>
</q-card-actions>
</q-card-actions>
</q-card>
</q-card>
</q-dialog>
</q-dialog>
...
@@ -72,7 +72,6 @@
...
@@ -72,7 +72,6 @@
}
from
'../../api/system/index'
}
from
'../../api/system/index'
//部门
//部门
import
{
import
{
getDeptTree
,
getDeptList
getDeptList
}
from
'../../api/system/dept'
}
from
'../../api/system/dept'
import
selectTree
from
'../../components/common/select-tree'
import
selectTree
from
'../../components/common/select-tree'
...
@@ -93,7 +92,7 @@
...
@@ -93,7 +92,7 @@
value
:
''
,
value
:
''
,
objOption
:
{
objOption
:
{
GoalMoney
:
""
,
GoalMoney
:
""
,
Dept_Id
:
0
,
Dept_Id
:
13
,
TimeList
:
[],
TimeList
:
[],
},
},
updateMsg
:
{
updateMsg
:
{
...
@@ -105,39 +104,25 @@
...
@@ -105,39 +104,25 @@
},
},
optionTitle
:
""
,
optionTitle
:
""
,
DeptList
:
[],
// 部门下拉
DeptList
:
[],
// 部门下拉
returnString
:
[],
//默认岗位
isShow
:
1
,
isShow
:
1
,
value2
:
''
,
value2
:
''
,
returnString2
:[]
}
}
},
},
created
()
{
this
.
queryDeptList
();
},
mounted
()
{
mounted
()
{
this
.
initObj
();
this
.
initObj
();
this
.
queryDeptTree
();
},
},
methods
:
{
methods
:
{
//获取部门结构树
queryDeptList
()
{
queryDeptTree
()
{
var
qMsg
=
{};
getDeptTree
({}).
then
(
res
=>
{
getDeptList
(
qMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
DeptList
=
res
.
Data
;
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
)
{
dateChange
(
val
)
{
this
.
objOption
.
TimeList
.
push
(
val
)
// 这里记得格式化
this
.
objOption
.
TimeList
.
push
(
val
)
// 这里记得格式化
...
@@ -156,9 +141,8 @@
...
@@ -156,9 +141,8 @@
this
.
updateMsg
.
MonthStr
=
res
.
Data
.
MonthStr
;
this
.
updateMsg
.
MonthStr
=
res
.
Data
.
MonthStr
;
this
.
updateMsg
.
GoalMoney
=
res
.
Data
.
GoalMoney
;
this
.
updateMsg
.
GoalMoney
=
res
.
Data
.
GoalMoney
;
this
.
updateMsg
.
Dept_Id
=
res
.
Data
.
Dept_Id
;
this
.
updateMsg
.
Dept_Id
=
res
.
Data
.
Dept_Id
;
this
.
returnString2
.
push
(
res
.
Data
.
Dept_Id
);
this
.
isShow
=
2
;
this
.
isShow
=
2
;
this
.
value2
=
this
.
updateMsg
.
YearStr
+
'-'
+
this
.
updateMsg
.
MonthStr
;
this
.
value2
=
this
.
updateMsg
.
YearStr
+
'-'
+
this
.
updateMsg
.
MonthStr
;
})
})
this
.
optionTitle
=
"修改目标"
this
.
optionTitle
=
"修改目标"
}
else
{
}
else
{
...
@@ -192,12 +176,12 @@
...
@@ -192,12 +176,12 @@
})
})
},
},
//修改保存
//修改保存
saveTarget
(){
saveTarget
()
{
if
(
this
.
value2
)
{
if
(
this
.
value2
)
{
let
myDate
=
this
.
value2
.
split
(
'-'
);
let
myDate
=
this
.
value2
.
split
(
'-'
);
this
.
updateMsg
.
YearStr
=
myDate
[
0
];
this
.
updateMsg
.
YearStr
=
myDate
[
0
];
this
.
updateMsg
.
MonthStr
=
myDate
[
1
];
this
.
updateMsg
.
MonthStr
=
myDate
[
1
];
}
else
{
}
else
{
this
.
updateMsg
.
YearStr
=
''
;
this
.
updateMsg
.
YearStr
=
''
;
this
.
updateMsg
.
MonthStr
=
''
;
this
.
updateMsg
.
MonthStr
=
''
;
}
}
...
@@ -219,5 +203,4 @@
...
@@ -219,5 +203,4 @@
}
}
}
}
}
}
</
script
>
</
script
>
\ No newline at end of file
src/pages/system/stuTarget.vue
View file @
9a9fddd5
...
@@ -3,13 +3,14 @@
...
@@ -3,13 +3,14 @@
<div
class=
"page-content"
>
<div
class=
"page-content"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table"
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table"
separator=
"none"
:data=
"dataList"
:columns=
"columns"
row-key=
"name"
>
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>
<div
class=
"col-2 q-table__title"
>
目标管理
</div>
<q-space
/>
<q-space
/>
<div
class=
"page-option"
>
<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>
</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>
</div>
</
template
>
</
template
>
<
template
v-slot:body-cell-Id=
"props"
>
<
template
v-slot:body-cell-Id=
"props"
>
...
@@ -49,25 +50,46 @@
...
@@ -49,25 +50,46 @@
data
()
{
data
()
{
return
{
return
{
columns
:
[{
columns
:
[{
name
:
'DeptName'
,
label
:
'部门'
,
field
:
'DeptName'
,
align
:
'left'
},
{
name
:
'YearStr'
,
name
:
'YearStr'
,
label
:
'年份'
,
label
:
'年份'
,
field
:
'YearStr'
,
field
:
'YearStr'
,
align
:
'left'
align
:
'left'
},
{
},
{
name
:
'MonthStr'
,
label
:
'月份'
,
field
:
'MonthStr'
,
align
:
'left'
},
{
name
:
'GoalMoney'
,
name
:
'GoalMoney'
,
label
:
'金额'
,
label
:
'金额'
,
field
:
'GoalMoney'
,
field
:
'GoalMoney'
,
align
:
'left'
align
:
'left'
},
{
},
{
name
:
'CreateBy
'
,
name
:
'CreateByName
'
,
label
:
'创建人'
,
label
:
'创建人'
,
align
:
'left'
,
align
:
'left'
,
field
:
'CreateBy'
field
:
'CreateByName'
},
{
},
{
name
:
'CreateTimeStr'
,
label
:
'创建时间'
,
align
:
'left'
,
field
:
'CreateTimeStr'
},
{
name
:
'Id'
,
name
:
'Id'
,
label
:
'操作'
,
label
:
'操作'
,
field
:
'Id'
field
:
'Id'
}],
}
],
msg
:
{
msg
:
{
pageIndex
:
1
,
pageIndex
:
1
,
pageSize
:
12
,
pageSize
:
12
,
...
@@ -80,7 +102,7 @@
...
@@ -80,7 +102,7 @@
loading
:
true
,
loading
:
true
,
isShowTargetForm
:
false
,
isShowTargetForm
:
false
,
customObj
:
{},
customObj
:
{},
dateTime
:
''
dateTime
:
''
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -88,12 +110,12 @@
...
@@ -88,12 +110,12 @@
},
},
methods
:
{
methods
:
{
//选择日期
//选择日期
dateChange
(
val
){
dateChange
(
val
)
{
if
(
val
)
{
if
(
val
)
{
let
myDate
=
val
.
split
(
'-'
);
let
myDate
=
val
.
split
(
'-'
);
this
.
msg
.
YearStr
=
myDate
[
0
];
this
.
msg
.
YearStr
=
myDate
[
0
];
this
.
msg
.
MonthStr
=
myDate
[
1
];
this
.
msg
.
MonthStr
=
myDate
[
1
];
}
else
{
}
else
{
this
.
msg
.
YearStr
=
''
;
this
.
msg
.
YearStr
=
''
;
this
.
msg
.
MonthStr
=
''
;
this
.
msg
.
MonthStr
=
''
;
}
}
...
@@ -159,10 +181,8 @@
...
@@ -159,10 +181,8 @@
}
}
},
},
}
}
</
script
>
</
script
>
<
style
lang=
"sass"
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.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