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
ce6bdfbc
Commit
ce6bdfbc
authored
Mar 03, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改OKR部分功能
parent
314ff401
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
867 additions
and
125 deletions
+867
-125
quasar.conf.js
quasar.conf.js
+1
-1
work.js
src/api/okr/work.js
+42
-0
guide.vue
src/components/okr/guide.vue
+7
-6
kr-union.vue
src/components/okr/kr-union.vue
+432
-0
okr-add.vue
src/components/okr/okr-add.vue
+225
-79
okr-emp-info.vue
src/components/okr/okr-emp-info.vue
+9
-3
okr-info.vue
src/components/okr/okr-info.vue
+15
-3
okr-process.vue
src/components/okr/okr-process.vue
+5
-1
okr-query.vue
src/components/okr/okr-query.vue
+19
-13
Work.vue
src/pages/Work.vue
+9
-4
index.vue
src/pages/okr/index.vue
+36
-15
okr-align-view.vue
src/pages/okr/okr-align-view.vue
+67
-0
No files found.
quasar.conf.js
View file @
ce6bdfbc
...
@@ -48,7 +48,7 @@ module.exports = function (ctx) {
...
@@ -48,7 +48,7 @@ module.exports = function (ctx) {
build
:
{
build
:
{
vueRouterMode
:
'hash'
,
// available values: 'hash', 'history'
vueRouterMode
:
'hash'
,
// available values: 'hash', 'history'
env
:
ctx
.
dev
?
{
env
:
ctx
.
dev
?
{
API
:
'http://192.168.1.
27:8300
/api'
API
:
'http://192.168.1.
13:8085
/api'
}
:
{
}
:
{
API
:
'http://eduapi.oytour.com/api'
API
:
'http://eduapi.oytour.com/api'
},
},
...
...
src/api/okr/work.js
View file @
ce6bdfbc
...
@@ -226,3 +226,45 @@ export function setObjectiveStatus(data){
...
@@ -226,3 +226,45 @@ export function setObjectiveStatus(data){
data
data
})
})
}
}
export
function
queryKRRuleList
(
data
){
return
request
({
url
:
'/OKRPeriod/GetOKRRuleDownLoadList'
,
method
:
'post'
,
data
})
}
export
function
queryMyManageDepartment
(
data
){
return
request
({
url
:
'/OKRPeriod/GetOKRMyManageDepartment'
,
method
:
'post'
,
data
})
}
export
function
queryMyChildEmployeeList
(
data
){
return
request
({
url
:
'/OKRPeriod/GetOKRMyChildEmployeeList'
,
method
:
'post'
,
data
})
}
export
function
setKRRule
(
data
){
return
request
({
url
:
'/OKRPeriod/SetOKRKeyResultUseRule'
,
method
:
'post'
,
data
})
}
export
function
queryKRRuleRangeList
(
data
){
return
request
({
url
:
'/OKRPeriod/GetOKRKeyResultRuleReList'
,
method
:
'post'
,
data
})
}
export
function
deleteKRRule
(
data
){
return
request
({
url
:
'/OKRPeriod/CancelOKRKeyResultUseRule'
,
method
:
'post'
,
data
})
}
\ No newline at end of file
src/components/okr/guide.vue
View file @
ce6bdfbc
<
template
>
<
template
>
<
q-dialog
v-model=
"dialog"
maximized
full-height
seamless
position=
"right
"
>
<
div
style=
"height:100%
"
>
<q-card
style=
"
margin-top:61px;width:420px
"
class=
"no-border-radius classinfo_Dialog"
>
<q-card
style=
"
width:420px;height:100%
"
class=
"no-border-radius classinfo_Dialog"
>
<q-tabs
<q-tabs
v-model=
"tab"
v-model=
"tab"
class=
"text-primary"
class=
"text-primary"
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<q-tab
name=
"two"
label=
"最佳范例"
/>
<q-tab
name=
"two"
label=
"最佳范例"
/>
</q-tabs>
</q-tabs>
<div
class=
"WritingAssistant-tabContent-1nYI5"
v-if=
"tab=='one'"
>
<div
class=
"WritingAssistant-tabContent-1nYI5
scroll myscroll"
style=
"height:calc(100% - 48px)
"
v-if=
"tab=='one'"
>
<div
class=
"WritingGuide-section-1XCZt"
>
<div
class=
"WritingGuide-section-1XCZt"
>
<h3
class=
"WritingGuide-title-3wBKZ"
>
<h3
class=
"WritingGuide-title-3wBKZ"
>
如何写出好的 Objective?
如何写出好的 Objective?
...
@@ -108,14 +108,14 @@
...
@@ -108,14 +108,14 @@
</div>
</div>
<div
class=
"WritingGuide-otherPrinciple-2AhOv"
>
<div
class=
"WritingGuide-otherPrinciple-2AhOv"
style=
"margin-bottom:20px;"
>
<h3
class=
"WritingGuide-title-3wBKZ"
>
<h3
class=
"WritingGuide-title-3wBKZ"
>
其他制定原则
其他制定原则
</h3>
</h3>
<ul><li>
Objective 和每个 Objective 对应的 Key Result 数量应控制在 3-5 个
</li><li>
及时与上级、合作方沟通目标,达成一致
</li><li>
想要了解更多?
<a
href=
"https://bytedance.feishu.cn/docs/doccnNcwoql8HhrXSYZ7phudjMg"
target=
"_blank"
rel=
"noopener noreferrer"
>
OKR 制定常见误区
</a></li></ul>
<ul><li>
Objective 和每个 Objective 对应的 Key Result 数量应控制在 3-5 个
</li><li>
及时与上级、合作方沟通目标,达成一致
</li><li>
想要了解更多?
<a
href=
"https://bytedance.feishu.cn/docs/doccnNcwoql8HhrXSYZ7phudjMg"
target=
"_blank"
rel=
"noopener noreferrer"
>
OKR 制定常见误区
</a></li></ul>
</div>
</div>
</div>
</div>
<div
v-else
class=
"WritingAssistant-tabContent-1nYI5"
>
<div
v-else
class=
"WritingAssistant-tabContent-1nYI5
scroll myscroll"
style=
"height:calc(100% - 48px)
"
>
<div
class=
"BestCase-tagContainer-1k1dW"
>
<div
class=
"BestCase-tagContainer-1k1dW"
>
<div
v-for=
"(x,y) in list"
:key=
"y"
class=
"BestCase-tag-206SU"
:class=
"
{'BestCase-focused-2aQSy':index == y}" @click="index=y,Selectlist = list[y].list">
<div
v-for=
"(x,y) in list"
:key=
"y"
class=
"BestCase-tag-206SU"
:class=
"
{'BestCase-focused-2aQSy':index == y}" @click="index=y,Selectlist = list[y].list">
{{
x
.
title
}}
{{
x
.
title
}}
...
@@ -171,13 +171,14 @@
...
@@ -171,13 +171,14 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
style=
"margin-bottom:10px"
>
</div>
</div>
</div>
</q-card>
</q-card>
<div
class=
"dialog-out-close"
@
click=
"closeSaveForm"
<div
class=
"dialog-out-close"
@
click=
"closeSaveForm"
style=
"height:40px !important;border-top-left-radius: 4px !important;border-bottom-left-radius: 4px !important;"
>
style=
"height:40px !important;border-top-left-radius: 4px !important;border-bottom-left-radius: 4px !important;"
>
<q-icon
name=
"iconfont icon-jujue1"
size=
"26px"
/>
<q-icon
name=
"iconfont icon-jujue1"
size=
"26px"
/>
</div>
</div>
</
q-dialog
>
</
div
>
</
template
>
</
template
>
<
script
>
<
script
>
...
...
src/components/okr/kr-union.vue
0 → 100644
View file @
ce6bdfbc
This diff is collapsed.
Click to expand it.
src/components/okr/okr-add.vue
View file @
ce6bdfbc
This diff is collapsed.
Click to expand it.
src/components/okr/okr-emp-info.vue
View file @
ce6bdfbc
...
@@ -74,9 +74,10 @@
...
@@ -74,9 +74,10 @@
评论
评论
</q-tooltip>
</q-tooltip>
</q-btn>
</q-btn>
<q-btn
unelevated
color=
"white icon-btn q-mr-md"
>
<q-btn
unelevated
color=
"white icon-btn q-mr-md"
@
click=
"showOkrStatus"
>
<inline-svg
<inline-svg
class=
"svg-icon svg-icon-secondary"
class=
"svg-icon"
:class=
"{'svg-icon-secondary':!isShowRemark,'svg-icon-white':isShowRemark}"
src=
"icons/svg/Code/Spy.svg"
src=
"icons/svg/Code/Spy.svg"
></inline-svg>
></inline-svg>
<q-tooltip
content-class=
"bg-dark"
>
<q-tooltip
content-class=
"bg-dark"
>
...
@@ -178,7 +179,8 @@ export default {
...
@@ -178,7 +179,8 @@ export default {
reloading
:
true
,
reloading
:
true
,
isShowBox
:
false
,
isShowBox
:
false
,
likeStatus
:
false
,
likeStatus
:
false
,
auditPeroids
:
[]
auditPeroids
:
[],
isShowRemark
:
false
};
};
},
},
watch
:
{
watch
:
{
...
@@ -216,6 +218,10 @@ export default {
...
@@ -216,6 +218,10 @@ export default {
this
.
queryLikeState
();
this
.
queryLikeState
();
},
},
methods
:
{
methods
:
{
showOkrStatus
(){
this
.
isShowRemark
=!
this
.
isShowRemark
this
.
$emit
(
'remark-status'
,
this
.
isShowRemark
)
},
queryLikeState
()
{
queryLikeState
()
{
queryUserIsLike
({
UserId
:
this
.
user
.
Id
}).
then
(
r
=>
{
queryUserIsLike
({
UserId
:
this
.
user
.
Id
}).
then
(
r
=>
{
this
.
likeStatus
=
r
.
Data
;
this
.
likeStatus
=
r
.
Data
;
...
...
src/components/okr/okr-info.vue
View file @
ce6bdfbc
...
@@ -45,9 +45,10 @@
...
@@ -45,9 +45,10 @@
评论
评论
</q-tooltip>
</q-tooltip>
</q-btn>
</q-btn>
<q-btn
unelevated
color=
"white icon-btn q-mr-md"
>
<q-btn
unelevated
:color=
"isShowRemark?'secondary':'white'"
@
click=
"showOkrStatus"
class=
"icon-btn q-mr-md"
>
<inline-svg
<inline-svg
class=
"svg-icon svg-icon-secondary"
class=
"svg-icon"
:class=
"{'svg-icon-secondary':!isShowRemark,'svg-icon-white':isShowRemark}"
src=
"icons/svg/Code/Spy.svg"
src=
"icons/svg/Code/Spy.svg"
></inline-svg>
></inline-svg>
<q-tooltip
content-class=
"bg-dark"
>
<q-tooltip
content-class=
"bg-dark"
>
...
@@ -98,6 +99,7 @@
...
@@ -98,6 +99,7 @@
@
cancel=
"changeUpdate"
@
cancel=
"changeUpdate"
class=
"q-mb-lg"
class=
"q-mb-lg"
:ref=
"`object_${i}`"
:ref=
"`object_${i}`"
:period=
'periodList[periodId]'
></okr-add>
></okr-add>
</div>
</div>
<!-- <okr-add
<!-- <okr-add
...
@@ -185,7 +187,8 @@ export default {
...
@@ -185,7 +187,8 @@ export default {
showPower
:
false
,
showPower
:
false
,
krPwoerInfo
:
{},
krPwoerInfo
:
{},
powerType
:
3
,
powerType
:
3
,
isShowBox
:
false
isShowBox
:
false
,
isShowRemark
:
false
};
};
},
},
watch
:
{
watch
:
{
...
@@ -201,6 +204,10 @@ export default {
...
@@ -201,6 +204,10 @@ export default {
this
.
user
=
this
.
userObj
this
.
user
=
this
.
userObj
},
},
methods
:
{
methods
:
{
showOkrStatus
(){
this
.
isShowRemark
=!
this
.
isShowRemark
this
.
$emit
(
'remark-status'
,
this
.
isShowRemark
)
},
hideHistory
()
{
hideHistory
()
{
this
.
isShowBox
=
false
;
this
.
isShowBox
=
false
;
},
},
...
@@ -237,6 +244,11 @@ export default {
...
@@ -237,6 +244,11 @@ export default {
init
()
{
init
()
{
queryOKRPeriodList
().
then
(
r
=>
{
queryOKRPeriodList
().
then
(
r
=>
{
this
.
periodList
=
r
.
Data
;
this
.
periodList
=
r
.
Data
;
this
.
periodList
.
forEach
((
x
,
i
)
=>
{
if
(
x
.
IsCurrent
==
1
){
this
.
periodId
=
i
}
})
this
.
$emit
(
"change"
,
this
.
periodList
[
this
.
periodId
].
Id
)
this
.
$emit
(
"change"
,
this
.
periodList
[
this
.
periodId
].
Id
)
this
.
queryMyObjective
();
this
.
queryMyObjective
();
});
});
...
...
src/components/okr/okr-process.vue
View file @
ce6bdfbc
...
@@ -22,12 +22,14 @@
...
@@ -22,12 +22,14 @@
style=
"width:240px;"
style=
"width:240px;"
>
>
<div
class=
"col"
>
<div
class=
"col"
>
<q-tooltip
content-class=
"bg-dark"
v-if=
"kr.RuleId>0"
>
已使用系统模板,无法手动更新进度,如需更新请删除关联模板
</q-tooltip>
<div
class=
"text-subtitle2 text-weight-bold"
>
起始值
</div>
<div
class=
"text-subtitle2 text-weight-bold"
>
起始值
</div>
<q-input
<q-input
dense
dense
style=
"height:30px"
style=
"height:30px"
v-model=
"kr.StartValue"
v-model=
"kr.StartValue"
@
keyup=
"validateInput('StartValue')"
@
keyup=
"validateInput('StartValue')"
:disable=
"kr.RuleId>0"
>
>
</q-input>
</q-input>
</div>
</div>
...
@@ -38,6 +40,7 @@
...
@@ -38,6 +40,7 @@
style=
"height:30px"
style=
"height:30px"
v-model=
"kr.CurrentValue"
v-model=
"kr.CurrentValue"
@
keyup=
"validateInput('CurrentValue')"
@
keyup=
"validateInput('CurrentValue')"
:disable=
"kr.RuleId>0"
>
>
</q-input>
</q-input>
</div>
</div>
...
@@ -48,6 +51,7 @@
...
@@ -48,6 +51,7 @@
style=
"height:30px"
style=
"height:30px"
v-model=
"kr.EndValue"
v-model=
"kr.EndValue"
@
keyup=
"validateInput('EndValue')"
@
keyup=
"validateInput('EndValue')"
:disable=
"kr.RuleId>0"
>
>
</q-input>
</q-input>
</div>
</div>
...
@@ -142,7 +146,7 @@ export default {
...
@@ -142,7 +146,7 @@ export default {
calcProcess
()
{
calcProcess
()
{
let
crt
=
this
.
kr
.
CurrentValue
-
this
.
kr
.
StartValue
;
let
crt
=
this
.
kr
.
CurrentValue
-
this
.
kr
.
StartValue
;
if
(
crt
>
0
)
{
if
(
crt
>
0
)
{
this
.
kr
.
Progress
=
(
crt
*
100
)
/
this
.
kr
.
EndValue
;
this
.
kr
.
Progress
=
(
(
crt
*
100
)
/
(
this
.
kr
.
EndValue
-
this
.
kr
.
StartValue
)).
toFixed
(
2
)
;
}
else
{
}
else
{
this
.
kr
.
Progress
=
0
;
this
.
kr
.
Progress
=
0
;
}
}
...
...
src/components/okr/okr-query.vue
View file @
ce6bdfbc
...
@@ -40,27 +40,19 @@
...
@@ -40,27 +40,19 @@
direction=
"down"
direction=
"down"
v-if=
"newObjective.ChildList && newObjective.ChildList.length > 0"
v-if=
"newObjective.ChildList && newObjective.ChildList.length > 0"
></okr-align>
></okr-align>
</div>
</
template
>
<
template
v-slot:prepend
>
<div
class=
"relative-position"
>
<inline-svg
v-if=
"newBoxState"
class=
"svg-icon svg-icon-primary"
src=
"icons/svg/Communication/Flag.svg"
></inline-svg>
<div
<div
class=
"absolute"
class=
"absolute"
style=
"
bottom:0px;right:5
px;height:14px;"
style=
"
top:0px;right:0
px;height:14px;"
v-if=
"newObjective.IsLock == 1"
v-if=
"newObjective.IsLock == 1"
>
>
<inline-svg
<inline-svg
v-if=
"!newBoxState"
class=
"svg-icon svg-icon-grey"
class=
"svg-icon svg-icon-grey"
src=
"icons/svg/General/Lock.svg"
src=
"icons/svg/General/Lock.svg"
width=
"14px"
width=
"14px"
height=
"14px"
height=
"14px"
></inline-svg>
></inline-svg>
<q-tooltip
content-class=
"bg-dark"
>
已设为保密内容,请勿外传
</q-tooltip>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -148,6 +140,19 @@
...
@@ -148,6 +140,19 @@
class=
"flex row"
class=
"flex row"
v-if=
"newObjective.Title && newObjective.Title.length > 0"
v-if=
"newObjective.Title && newObjective.Title.length > 0"
>
>
<div
class=
"q-mr-lg"
v-if=
"x.RuleId > 0"
style=
"margin-top:22px"
>
<inline-svg
class=
"svg-icon svg-icon-secondary"
src=
"icons/svg/General/Save.svg"
width=
"20px"
height=
"20px"
></inline-svg>
<q-tooltip
content-class=
"bg-dark"
>
使用模板「
{{
x
.
RuleName
}}
」自动更新进度,
<br
/>
更新时间间隔一小时
</q-tooltip
>
</div>
<div>
<div>
<span
class=
"block remark-font text-right"
>
进度
</span>
<span
class=
"block remark-font text-right"
>
进度
</span>
<q-btn
dense
flat
color=
"white"
text-color=
"dark"
>
<q-btn
dense
flat
color=
"white"
text-color=
"dark"
>
...
@@ -168,7 +173,7 @@
...
@@ -168,7 +173,7 @@
<span>
{{
x
.
Progress
}}
%
</span>
<span>
{{
x
.
Progress
}}
%
</span>
</q-btn>
</q-btn>
</div>
</div>
<div
class=
"q-mx-lg"
style=
"width:
47
px;text-align:right"
>
<div
class=
"q-mx-lg"
style=
"width:
51
px;text-align:right"
>
<span
class=
"block remark-font text-right"
>
权重
</span>
<span
class=
"block remark-font text-right"
>
权重
</span>
<q-btn
<q-btn
dense
dense
...
@@ -221,7 +226,7 @@
...
@@ -221,7 +226,7 @@
<div
class=
"text-subtitle2 text-weight-bold q-my-xs"
>
<div
class=
"text-subtitle2 text-weight-bold q-my-xs"
>
进度记录
进度记录
</div>
</div>
<div
class=
"text-body2"
v-html=
"
newObjective.ProgressRemark
"
></div>
<div
class=
"text-body2"
v-html=
"
decodeURIComponent(newObjective.ProgressRemark)
"
></div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -383,6 +388,7 @@ export default {
...
@@ -383,6 +388,7 @@ export default {
created
()
{
created
()
{
this
.
newObjective
=
this
.
objective
;
this
.
newObjective
=
this
.
objective
;
this
.
audit
.
ObjectiveId
=
this
.
objective
.
Id
;
this
.
audit
.
ObjectiveId
=
this
.
objective
.
Id
;
},
},
watch
:
{
watch
:
{
objective
:
{
objective
:
{
...
...
src/pages/Work.vue
View file @
ce6bdfbc
<
template
>
<
template
>
<div
class=
"flex column full-height"
style=
"padding-top:54px !important;"
>
<div
class=
"flex column full-height"
style=
"padding-top:54px !important;"
>
<!--
<img
alt=
"Quasar logo"
src=
"~assets/quasar-logo-full.svg"
>
-->
<!--
<img
alt=
"Quasar logo"
src=
"~assets/quasar-logo-full.svg"
>
-->
<div
class=
"sub-header"
v-if=
"AccountType==2 || ispower==true"
>
<div
class=
"sub-header"
>
<!--
<div
style=
"margin: 0 auto;width: 130px;"
>
<!--
<div
style=
"margin: 0 auto;width: 130px;"
>
<el-tabs
v-model=
"model"
>
<el-tabs
v-model=
"model"
>
<el-tab-pane
:label=
"item.label"
:name=
"item.value"
:key=
"item.value"
v-for=
"(item, index) in options"
></el-tab-pane>
<el-tab-pane
:label=
"item.label"
:name=
"item.value"
:key=
"item.value"
v-for=
"(item, index) in options"
></el-tab-pane>
...
@@ -32,11 +32,11 @@
...
@@ -32,11 +32,11 @@
</q-list>
</q-list>
</q-menu>
</q-menu>
</q-btn>
</q-btn>
<q-btn
@
click=
"changeMenu(2)"
flat
:color=
"chosenMenu==2?'primary':'blue-grey-14'"
:class=
"[chosenMenu==2?'text-weight-bold':'']"
label=
"备课管理"
>
<q-btn
@
click=
"changeMenu(2)"
v-if=
"AccountType==2 || ispower==true"
flat
:color=
"chosenMenu==2?'primary':'blue-grey-14'"
:class=
"[chosenMenu==2?'text-weight-bold':'']"
label=
"备课管理"
>
</q-btn>
</q-btn>
</div>
</div>
<div
v-if=
"chosenMenu==1"
class=
"flex col"
style=
"flex: 1"
>
<div
v-if=
"chosenMenu==1"
class=
"flex col"
style=
"flex: 1"
>
<okr></okr>
<okr
v-if=
"okrMenu==1"
></okr>
</div>
</div>
<div
v-if=
"chosenMenu==2"
class=
"col"
style=
"height: 750px;overflow: auto"
>
<div
v-if=
"chosenMenu==2"
class=
"col"
style=
"height: 750px;overflow: auto"
>
<teachplan></teachplan>
<teachplan></teachplan>
...
@@ -47,6 +47,7 @@
...
@@ -47,6 +47,7 @@
<
script
>
<
script
>
import
teachplan
from
'./course/teacherLesson'
import
teachplan
from
'./course/teacherLesson'
import
okr
from
'./okr/index'
import
okr
from
'./okr/index'
import
alignView
from
'./okr/okr-align-view'
export
default
{
export
default
{
components
:{
components
:{
teachplan
,
teachplan
,
...
@@ -62,7 +63,8 @@
...
@@ -62,7 +63,8 @@
model
:
'one'
,
model
:
'one'
,
AccountType
:
1
,
AccountType
:
1
,
ispower
:
false
,
//是否显示备课管理
ispower
:
false
,
//是否显示备课管理
chosenMenu
:
1
chosenMenu
:
1
,
okrMenu
:
0
}
}
},
},
created
()
{
created
()
{
...
@@ -90,6 +92,9 @@
...
@@ -90,6 +92,9 @@
},
},
methods
:{
methods
:{
changeMenu
(
i
){
changeMenu
(
i
){
if
(
i
==
1
){
this
.
okrMenu
=
1
}
this
.
chosenMenu
=
i
this
.
chosenMenu
=
i
},
},
getMapList
(
list
){
getMapList
(
list
){
...
...
src/pages/okr/index.vue
View file @
ce6bdfbc
...
@@ -334,9 +334,22 @@
...
@@ -334,9 +334,22 @@
<okr-info
<okr-info
:user-obj=
"userParam"
:user-obj=
"userParam"
@
change=
"queryMyList"
@
change=
"queryMyList"
@
remark-status=
"updateOkrRemarkStatus"
v-if=
"!isOtherUser"
v-if=
"!isOtherUser"
></okr-info>
></okr-info>
<okr-emp-info
:user-id=
"userInfo.Id"
:user-obj=
"chosenUser"
v-if=
"isOtherUser"
:audit-mode=
"auditMode"
:peroids=
"auditPeroids"
@
finish=
"deleteAuditUser"
@
addAudit=
"insertAuditUser"
></okr-emp-info>
<okr-emp-info
:user-id=
"userInfo.Id"
:user-obj=
"chosenUser"
@
remark-status=
"updateOkrRemarkStatus"
v-if=
"isOtherUser"
:audit-mode=
"auditMode"
:peroids=
"auditPeroids"
@
finish=
"deleteAuditUser"
@
addAudit=
"insertAuditUser"
></okr-emp-info>
</div>
<div
class=
"col-auto"
v-if=
"showOkrRemark"
style=
"height:100%"
>
<gruid></gruid>
</div>
</div>
</div>
</div>
</template>
</template>
...
@@ -351,6 +364,7 @@ import {
...
@@ -351,6 +364,7 @@ import {
import
{
queryEmployee
}
from
"../../api/users/user"
;
import
{
queryEmployee
}
from
"../../api/users/user"
;
import
okrInfo
from
"../../components/okr/okr-info"
;
import
okrInfo
from
"../../components/okr/okr-info"
;
import
okrEmpInfo
from
"../../components/okr/okr-emp-info"
;
import
okrEmpInfo
from
"../../components/okr/okr-emp-info"
;
import
gruid
from
"../../components/okr/guide"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -364,13 +378,15 @@ export default {
...
@@ -364,13 +378,15 @@ export default {
usersList
:
[],
usersList
:
[],
showResult
:
false
,
showResult
:
false
,
aduitsList
:
[],
aduitsList
:
[],
auditMode
:
false
,
auditMode
:
false
,
auditPeroids
:
""
auditPeroids
:
""
,
showOkrRemark
:
false
};
};
},
},
components
:
{
components
:
{
okrInfo
,
okrInfo
,
okrEmpInfo
okrEmpInfo
,
gruid
},
},
computed
:
{
computed
:
{
...
mapGetters
([
"userInfo"
])
...
mapGetters
([
"userInfo"
])
...
@@ -391,20 +407,23 @@ export default {
...
@@ -391,20 +407,23 @@ export default {
this
.
$root
.
$off
(
"openUserObj"
,
this
.
openUserObjective
);
this
.
$root
.
$off
(
"openUserObj"
,
this
.
openUserObjective
);
},
},
methods
:
{
methods
:
{
insertAuditUser
(
obj
){
updateOkrRemarkStatus
(
val
)
{
this
.
showOkrRemark
=
val
;
},
insertAuditUser
(
obj
)
{
let
index
=
-
1
;
let
index
=
-
1
;
this
.
aduitsList
.
forEach
((
x
,
i
)
=>
{
this
.
aduitsList
.
forEach
((
x
,
i
)
=>
{
if
(
x
.
Id
==
obj
.
Id
)
{
if
(
x
.
Id
==
obj
.
Id
)
{
if
(
x
.
PeriodIds
.
split
(
','
).
indexOf
(
obj
.
PeriodIds
)
==-
1
)
{
if
(
x
.
PeriodIds
.
split
(
","
).
indexOf
(
obj
.
PeriodIds
)
==
-
1
)
{
x
.
PeriodIds
+=
','
+
obj
.
PeriodIds
x
.
PeriodIds
+=
","
+
obj
.
PeriodIds
;
}
}
}
}
});
});
if
(
index
==-
1
)
{
if
(
index
==
-
1
)
{
this
.
aduitsList
.
push
(
obj
)
this
.
aduitsList
.
push
(
obj
)
;
}
}
},
},
deleteAuditUser
(
id
){
deleteAuditUser
(
id
)
{
let
index
=
0
;
let
index
=
0
;
this
.
aduitsList
.
forEach
((
x
,
i
)
=>
{
this
.
aduitsList
.
forEach
((
x
,
i
)
=>
{
if
(
x
.
Id
==
id
)
{
if
(
x
.
Id
==
id
)
{
...
@@ -463,15 +482,16 @@ export default {
...
@@ -463,15 +482,16 @@ export default {
this
.
getMe
();
this
.
getMe
();
this
.
isOtherUser
=
false
;
this
.
isOtherUser
=
false
;
}
else
{
}
else
{
this
.
auditMode
=
m
.
indexOf
(
'aduits_'
)
!=-
1
&&
obj
.
PeriodIds
!=
''
this
.
auditMode
=
m
.
indexOf
(
"aduits_"
)
!=
-
1
&&
obj
.
PeriodIds
!=
""
;
this
.
chosenUser
=
obj
;
this
.
chosenUser
=
obj
;
this
.
isOtherUser
=
true
;
this
.
isOtherUser
=
true
;
this
.
auditPeroids
=
obj
.
PeriodIds
this
.
auditPeroids
=
obj
.
PeriodIds
;
}
}
this
.
showOkrRemark
=
false
},
},
openUserObjective
(
obj
)
{
openUserObjective
(
obj
)
{
this
.
isOtherUser
=
obj
.
Id
!=
this
.
userInfo
.
Id
;
this
.
isOtherUser
=
obj
.
Id
!=
this
.
userInfo
.
Id
;
console
.
log
(
this
.
isOtherUser
,
obj
.
Id
,
this
.
userInfo
)
console
.
log
(
this
.
isOtherUser
,
obj
.
Id
,
this
.
userInfo
);
if
(
this
.
isOtherUser
)
{
if
(
this
.
isOtherUser
)
{
this
.
chosenUser
=
obj
;
this
.
chosenUser
=
obj
;
}
else
{
}
else
{
...
@@ -479,10 +499,11 @@ export default {
...
@@ -479,10 +499,11 @@ export default {
}
}
this
.
activeMenu
=
""
;
this
.
activeMenu
=
""
;
this
.
searchText
=
""
;
this
.
searchText
=
""
;
this
.
auditMode
=
false
;
this
.
auditMode
=
false
;
this
.
auditPeroids
=
""
;
this
.
auditPeroids
=
""
;
this
.
usersList
=
[];
this
.
usersList
=
[];
this
.
showResult
=
false
;
this
.
showResult
=
false
;
this
.
showOkrRemark
=
false
;
},
},
getMe
()
{
getMe
()
{
this
.
userParam
=
{
this
.
userParam
=
{
...
...
src/pages/okr/okr-align-view.vue
0 → 100644
View file @
ce6bdfbc
<
template
>
<div>
<div
style=
"height:100%;"
>
<RelationGraph
ref=
"seeksRelationGraph"
:options=
"graphOptions"
:on-node-click=
"onNodeClick"
:on-line-click=
"onLineClick"
/>
</div>
</div>
</
template
>
<
script
>
import
RelationGraph
from
"relation-graph"
;
export
default
{
name
:
"Demo"
,
components
:
{
RelationGraph
},
data
()
{
return
{
graphOptions
:
{
allowSwitchLineShape
:
true
,
allowSwitchJunctionPoint
:
true
,
defaultJunctionPoint
:
"border"
// 这里可以参考"Graph 图谱"中的参数进行设置
}
};
},
mounted
()
{
this
.
showSeeksGraph
();
},
methods
:
{
showSeeksGraph
(
query
)
{
var
__graph_json_data
=
{
rootId
:
"a"
,
nodes
:
[
{
id
:
"a"
,
text
:
"A"
,
borderColor
:
"yellow"
},
{
id
:
"b"
,
text
:
"B"
,
color
:
"#43a2f1"
,
fontColor
:
"yellow"
},
{
id
:
"c"
,
text
:
"C"
,
nodeShape
:
1
,
width
:
80
,
height
:
60
},
{
id
:
"e"
,
text
:
"E"
,
nodeShape
:
0
,
width
:
150
,
height
:
150
}
],
links
:
[
{
from
:
"a"
,
to
:
"b"
,
text
:
"关系1"
,
color
:
"#43a2f1"
},
{
from
:
"a"
,
to
:
"c"
,
text
:
"关系2"
},
{
from
:
"a"
,
to
:
"e"
,
text
:
"关系3"
},
{
from
:
"b"
,
to
:
"e"
,
color
:
"#67C23A"
}
]
};
// 以上数据中的node和link可以参考"Node节点"和"Link关系"中的参数进行配置
this
.
$refs
.
seeksRelationGraph
.
setJsonData
(
__graph_json_data
,
seeksRGGraph
=>
{
// Called when the relation-graph is completed
}
);
},
onNodeClick
(
nodeObject
,
$event
)
{
console
.
log
(
"onNodeClick:"
,
nodeObject
);
},
onLineClick
(
lineObject
,
$event
)
{
console
.
log
(
"onLineClick:"
,
lineObject
);
}
}
};
</
script
>
<
style
></
style
>
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