Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
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
周远喜
mes-ui
Commits
05ddc09a
Commit
05ddc09a
authored
Oct 22, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
checkTime
parent
80f449b2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
89 additions
and
49 deletions
+89
-49
zh-CN.js
i18n/locale/zh-CN.js
+2
-1
index1.vue
pages/project/groupUser/index1.vue
+87
-48
No files found.
i18n/locale/zh-CN.js
View file @
05ddc09a
...
@@ -1913,6 +1913,7 @@ export default {
...
@@ -1913,6 +1913,7 @@ export default {
groupId
:
'项目组Id'
,
groupId
:
'项目组Id'
,
authority
:
'权限'
,
authority
:
'权限'
,
whour
:
'可用工日'
,
whour
:
'可用工日'
,
whourpd
:
'可用工时/天'
whourpd
:
'可用工时/天'
,
joindate
:
'加盟日'
}
}
}
}
pages/project/groupUser/index1.vue
View file @
05ddc09a
...
@@ -13,6 +13,10 @@
...
@@ -13,6 +13,10 @@
<state
v-if=
"edit != index"
code=
"project.group.status"
:value=
"row.status"
type=
"text"
></state>
<state
v-if=
"edit != index"
code=
"project.group.status"
:value=
"row.status"
type=
"text"
></state>
<Dictionary
v-else
code=
"project.group.status"
v-model=
"cur.status"
></Dictionary>
<Dictionary
v-else
code=
"project.group.status"
v-model=
"cur.status"
></Dictionary>
</
template
>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"joindate"
>
<span
v-if=
"edit != index"
v-text=
"row.joindate"
></span>
<DatePicker
v-else
v-model=
"cur.joindate"
type=
"date"
transfer
placeholder=
"请选择加入日期"
@
on-change=
"getTime"
></DatePicker>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"whour"
>
<
template
slot-scope=
"{ row, index }"
slot=
"whour"
>
<span
v-if=
"edit != index"
v-text=
"row.whour"
></span>
<span
v-if=
"edit != index"
v-text=
"row.whour"
></span>
<InputNumber
v-else
type=
"text"
v-model
.
trim=
"cur.whour"
/>
<InputNumber
v-else
type=
"text"
v-model
.
trim=
"cur.whour"
/>
...
@@ -100,6 +104,12 @@ export default {
...
@@ -100,6 +104,12 @@ export default {
align
:
"center"
,
align
:
"center"
,
slot
:
'status'
slot
:
'status'
},
},
{
key
:
"joindate"
,
title
:
this
.
l
(
"joindate"
),
align
:
"center"
,
slot
:
'joindate'
},
{
{
key
:
"whour"
,
key
:
"whour"
,
title
:
this
.
l
(
"whour"
),
title
:
this
.
l
(
"whour"
),
...
@@ -155,22 +165,6 @@ export default {
...
@@ -155,22 +165,6 @@ export default {
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
},
},
methods
:
{
methods
:
{
changeAuthority
(
val
)
{
if
(
this
.
authorityCur
!=
1
&&
this
.
authorityCount
==
1
&&
val
==
1
)
{
this
.
$Message
.
error
(
"已存在项目经理,请选择其他权限!"
)
this
.
cur
.
authority
=
null
}
},
getAuthority
()
{
if
(
this
.
list
.
length
>
0
)
{
this
.
list
.
forEach
(
el
=>
{
if
(
el
.
authority
==
1
)
{
this
.
authorityCount
=
1
}
})
}
},
load
(
v
)
{
load
(
v
)
{
let
params
=
{
let
params
=
{
conditions
:
[{
conditions
:
[{
...
@@ -186,17 +180,16 @@ export default {
...
@@ -186,17 +180,16 @@ export default {
}
}
})
})
},
},
ok
()
{
//获取是否权限里有项目经理选项
this
.
load
(
this
.
eid
)
getAuthority
()
{
this
.
modal
=
false
if
(
this
.
list
.
length
>
0
)
{
this
.
curId
=
''
;
this
.
list
.
forEach
(
el
=>
{
},
if
(
el
.
authority
==
1
)
{
add
()
{
this
.
authorityCount
=
1
alert
(
this
.
eid
)
}
this
.
curId
=
''
;
})
this
.
title
=
"新增"
;
this
.
detail
=
()
=>
import
(
'./add'
)
}
this
.
modal
=
true
;
},
},
addList
()
{
addList
()
{
this
.
edit
=
this
.
list
.
length
;
this
.
edit
=
this
.
list
.
length
;
...
@@ -204,6 +197,7 @@ export default {
...
@@ -204,6 +197,7 @@ export default {
userId
:
null
,
userId
:
null
,
role
:
null
,
role
:
null
,
status
:
null
,
status
:
null
,
joindate
:
''
,
whour
:
14
,
whour
:
14
,
whourpd
:
7.0
,
whourpd
:
7.0
,
authority
:
null
,
authority
:
null
,
...
@@ -212,24 +206,6 @@ export default {
...
@@ -212,24 +206,6 @@ export default {
this
.
authorityCur
=
0
this
.
authorityCur
=
0
this
.
list
.
push
(
this
.
cur
);
this
.
list
.
push
(
this
.
cur
);
},
},
copy
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"克隆"
;
this
.
detail
=
()
=>
import
(
'./add'
)
this
.
modal
=
true
;
},
view
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"详情"
;
this
.
detail
=
()
=>
import
(
'./detail'
)
this
.
modal
=
true
;
},
editRow1
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"编辑"
;
this
.
detail
=
()
=>
import
(
'./edit'
)
this
.
modal
=
true
;
},
editRow
(
row
,
index
)
{
editRow
(
row
,
index
)
{
let
lastListGroupId
=
this
.
list
[
this
.
list
.
length
-
1
].
groupId
let
lastListGroupId
=
this
.
list
[
this
.
list
.
length
-
1
].
groupId
if
(
lastListGroupId
==
undefined
)
{
if
(
lastListGroupId
==
undefined
)
{
...
@@ -241,12 +217,28 @@ export default {
...
@@ -241,12 +217,28 @@ export default {
this
.
cur
.
role
=
row
.
role
this
.
cur
.
role
=
row
.
role
this
.
cur
.
status
=
row
.
status
this
.
cur
.
status
=
row
.
status
this
.
cur
.
authority
=
row
.
authority
this
.
cur
.
authority
=
row
.
authority
this
.
cur
.
joindate
=
row
.
joindate
?
row
.
joindate
:
''
this
.
cur
.
whour
=
row
.
whour
?
row
.
whour
:
14
this
.
cur
.
whour
=
row
.
whour
?
row
.
whour
:
14
this
.
cur
.
whourpd
=
row
.
whourpd
?
row
.
whourpd
:
7.0
this
.
cur
.
whourpd
=
row
.
whourpd
?
row
.
whourpd
:
7.0
this
.
cur
.
note
=
row
.
note
this
.
cur
.
note
=
row
.
note
this
.
authorityCur
=
row
.
authority
this
.
authorityCur
=
row
.
authority
this
.
edit
=
index
this
.
edit
=
index
},
},
changeAuthority
(
val
)
{
if
(
this
.
authorityCur
!=
1
&&
this
.
authorityCount
==
1
&&
val
==
1
)
{
this
.
$Message
.
error
(
"已存在项目经理,请选择其他权限!"
)
this
.
cur
.
authority
=
null
}
},
getTime
(
value
)
{
if
(
value
!=
''
)
{
this
.
cur
.
joindate
=
this
.
getFormatDateStart
(
value
);
}
else
{
this
.
cur
.
joindate
=
''
}
},
delRow
(
id
)
{
delRow
(
id
)
{
Api
.
delete
(
id
).
then
((
r
)
=>
{
Api
.
delete
(
id
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
if
(
r
.
success
)
{
...
@@ -263,6 +255,7 @@ export default {
...
@@ -263,6 +255,7 @@ export default {
this
.
edit
=
-
1
;
this
.
edit
=
-
1
;
},
},
//新增保存或修改保存
save
()
{
save
()
{
this
.
cur
.
groupId
=
this
.
eid
this
.
cur
.
groupId
=
this
.
eid
if
(
this
.
cur
.
userId
==
null
||
this
.
cur
.
userId
==
''
)
{
if
(
this
.
cur
.
userId
==
null
||
this
.
cur
.
userId
==
''
)
{
...
@@ -309,14 +302,60 @@ export default {
...
@@ -309,14 +302,60 @@ export default {
})
})
}
}
},
},
cancel
()
{
this
.
curId
=
this
.
eid
;
getFormatDateStart
(
dates
)
{
this
.
modal
=
false
const
d
=
new
Date
(
dates
);
const
resDate
=
d
.
getFullYear
()
+
"-"
+
this
.
p
(
d
.
getMonth
()
+
1
)
+
"-"
+
this
.
p
(
d
.
getDate
())
return
resDate
;
},
p
(
s
)
{
return
s
<
10
?
"0"
+
s
:
s
;
},
},
l
(
key
)
{
l
(
key
)
{
let
vkey
=
"project_group_user"
+
"."
+
key
;
let
vkey
=
"project_group_user"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
return
this
.
$t
(
vkey
)
||
key
},
//old弹框模式方法start
ok
()
{
this
.
load
(
this
.
eid
)
this
.
modal
=
false
this
.
curId
=
''
;
},
add
()
{
alert
(
this
.
eid
)
this
.
curId
=
''
;
this
.
title
=
"新增"
;
this
.
detail
=
()
=>
import
(
'./add'
)
this
.
modal
=
true
;
},
copy
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"克隆"
;
this
.
detail
=
()
=>
import
(
'./add'
)
this
.
modal
=
true
;
},
view
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"详情"
;
this
.
detail
=
()
=>
import
(
'./detail'
)
this
.
modal
=
true
;
},
editRow1
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"编辑"
;
this
.
detail
=
()
=>
import
(
'./edit'
)
this
.
modal
=
true
;
},
cancel
()
{
this
.
curId
=
this
.
eid
;
this
.
modal
=
false
}
}
//old弹框模式方法end
},
},
watch
:
{
watch
:
{
eid
(
v
)
{
eid
(
v
)
{
...
...
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