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
603bc8b1
Commit
603bc8b1
authored
Oct 27, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit
parent
fe3dbe01
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
93 additions
and
177 deletions
+93
-177
opration.vue
components/page/opration.vue
+37
-67
index.vue
pages/project/plan/index.vue
+19
-16
index.vue
pages/project/task/index.vue
+37
-94
No files found.
components/page/opration.vue
View file @
603bc8b1
...
...
@@ -52,25 +52,13 @@ export default {
titles
:
this
.
title
};
},
disalbe
:
{
// 0 启用 1 禁用 2权限不足
type
:
Number
,
default
:
0
,
},
},
data
()
{
return
{
text
:
""
,
css
:
"detail"
,
};
},
created
()
{
var
oprates
=
{
detail
:
"查看"
,
edit
:
"编辑"
,
add
:
"添加"
,
delete
:
"删除"
,
remove
:
"删除"
,
remove
:
"删除"
};
if
(
oprates
[
this
.
oprate
])
{
...
...
@@ -81,76 +69,58 @@ data() {
}
else
if
(
this
.
type
==
"icon"
)
{
this
.
css
=
"icon"
;
}
if
(
this
.
disalbe
)
{
this
.
css
=
"disable"
},
mounted
()
{
if
(
this
.
disable
)
{
this
.
colors
=
"#ccc"
;
this
.
titles
=
''
}
},
methods
:
{
handler
()
{
if
(
this
.
disalbe
==
0
)
{
if
(
!
this
.
disable
)
{
if
(
this
.
oprate
==
"delete"
||
this
.
oprate
==
"remove"
)
{
this
.
$Modal
.
confirm
({
title
:
this
.
title
,
content
:
"<p>"
+
this
.
msg
+
"</p>"
,
onOk
:
()
=>
{
this
.
$emit
(
"click"
,
event
);
}
,
}
});
}
else
{
this
.
$emit
(
"click"
,
event
);
}
}
}
},
watch
:
{
v
()
{},
disable
(
v
)
{
if
(
v
)
{
this
.
colors
=
"#ccc"
;
this
.
titles
=
''
;
}
else
{
this
.
colors
=
this
.
color
;
this
.
titles
=
this
.
title
;
},
mounted
()
{
if
(
this
.
disable
)
{
this
.
colors
=
"#ccc"
;
this
.
titles
=
''
}
},
methods
:
{
handler
()
{
if
(
!
this
.
disable
)
{
if
(
this
.
oprate
==
"delete"
||
this
.
oprate
==
"remove"
)
{
this
.
$Modal
.
confirm
({
title
:
this
.
title
,
content
:
"<p>"
+
this
.
msg
+
"</p>"
,
onOk
:
()
=>
{
this
.
$emit
(
"click"
,
event
);
}
});
}
else
{
this
.
$emit
(
"click"
,
event
);
}
}
}
},
watch
:
{
v
()
{},
disable
(
v
)
{
if
(
v
)
{
this
.
colors
=
"#ccc"
;
this
.
titles
=
''
;
}
else
{
this
.
colors
=
this
.
color
;
this
.
titles
=
this
.
title
;
}
this
.
disable
=
v
},
color
(
v
)
{
if
(
v
&&
v
!=
''
)
{
this
.
colors
=
v
}
}
this
.
disable
=
v
},
color
(
v
)
{
if
(
v
&&
v
!=
''
)
{
this
.
colors
=
v
}
},
title
(
v
)
{
if
(
v
&&
v
!=
''
)
{
this
.
titles
=
v
}
},
},
};
},
title
(
v
)
{
if
(
v
&&
v
!=
''
)
{
this
.
titles
=
v
}
},
},
};
</
script
>
<
style
lang=
"less"
>
...
...
pages/project/plan/index.vue
View file @
603bc8b1
...
...
@@ -158,13 +158,12 @@ export default {
},
},
{
attrs
:
{
icon
:
"md-arrow-dropright-circle"
,
type
:
"icon"
,
title
:
"派发"
,
oprate
:
"edit"
,
disalbe
:
1
,
},
on
:
{
click
:
()
=>
this
.
copy
(
params
.
row
.
id
)
},
key
:
"type"
,
width
:
90
,
title
:
this
.
l
(
"type"
),
align
:
"left"
,
high
:
true
,
code
:
"mes.project_plan.Type"
,
},
{
key
:
"title"
,
...
...
@@ -175,15 +174,19 @@ export default {
high
:
true
,
},
{
attrs
:
{
icon
:
"md-create"
,
type
:
"icon"
,
title
:
"编辑"
,
oprate
:
"edit"
,
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
},
}
),
h
(
"op"
,
key
:
"status"
,
title
:
this
.
l
(
"status"
),
align
:
"left"
,
high
:
true
,
code
:
"mes.project_plan.Status"
,
},
{
key
:
"startDate"
,
title
:
this
.
l
(
"startDate"
),
align
:
"left"
,
high
:
true
,
type
:
"date"
},
{
key
:
"endDate"
,
title
:
this
.
l
(
"endDate"
),
...
...
pages/project/task/index.vue
View file @
603bc8b1
...
...
@@ -349,105 +349,45 @@ export default {
this
.
detail
=
()
=>
import
(
'./add'
)
this
.
modal
=
true
;
},
productSearch
(
id
,
item
,
planIds
)
{
this
.
planId
=
item
.
selected
?
id
:
''
;
this
.
planIdsCur
=
item
.
selected
?
planIds
:
[]
let
where
=
{
planId
:
{
op
:
"In"
,
value
:
item
.
selected
?
planIds
:
[]
},
projectId
:
{
op
:
"Equal"
,
value
:
this
.
$route
.
params
.
id
},
};
this
.
$refs
.
grid
.
reload
(
where
);
},
updatepart
(
valId
,
valStatus
)
{
let
params
=
{
id
:
valId
,
status
:
valStatus
,
}
Api
.
updatepart
(
params
).
then
(
r
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
$Message
.
success
(
'操作成功'
)
}
else
{
this
.
$Message
.
error
(
'操作失败'
)
}
}).
catch
(
err
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
'操作失败'
)
console
.
warn
(
err
)
})
},
},
mounted
()
{
console
.
log
(
this
);
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
methods
:
{
ok
()
{
this
.
$refs
.
grid
.
load
();
this
.
modal
=
false
;
this
.
curId
=
0
;
},
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
},
add
()
{
this
.
curId
=
0
;
this
.
title
=
"新增"
;
this
.
fullScreen
=
false
;
this
.
detail
=
()
=>
import
(
"./add"
);
this
.
modal
=
true
;
},
highSearch
()
{
this
.
curId
=
0
;
this
.
title
=
"高级搜索"
;
this
.
fullScreen
=
false
;
this
.
detail
=
()
=>
import
(
"./search"
);
this
.
detail
=
()
=>
import
(
'./search'
)
this
.
modal
=
true
;
},
copy
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"克隆"
;
this
.
fullScreen
=
false
;
this
.
detail
=
()
=>
import
(
"./add"
);
this
.
detail
=
()
=>
import
(
'./add'
)
this
.
modal
=
true
;
},
view
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"详情"
;
this
.
fullScreen
=
false
;
this
.
detail
=
()
=>
import
(
"./detail"
);
this
.
detail
=
()
=>
import
(
'./detail'
)
this
.
modal
=
true
;
},
edit
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"编辑"
;
this
.
fullScreen
=
false
;
this
.
detail
=
()
=>
import
(
"./edit"
);
this
.
detail
=
()
=>
import
(
'./edit'
)
this
.
modal
=
true
;
},
remove
(
id
)
{
Api
.
delete
(
id
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
$Message
.
success
(
"删除成功"
);
this
.
$Message
.
success
(
'删除成功'
)
}
})
;
})
},
cancel
()
{
this
.
curId
=
0
;
this
.
modal
=
false
;
this
.
modal
=
false
},
onHide
()
{
// this.$Message.info("收起左侧树")
...
...
@@ -457,59 +397,62 @@ export default {
//this.$Message.info("展开左侧树")
this
.
showMenu
=
true
;
},
productSearch
(
id
,
item
,
productIds
,
ids
)
{
productSearch
(
id
,
item
,
planIds
)
{
this
.
planId
=
item
.
selected
?
id
:
''
;
this
.
planIdsCur
=
item
.
selected
?
planIds
:
[]
let
where
=
{
bom
Id
:
{
plan
Id
:
{
op
:
"In"
,
value
:
ids
,
value
:
item
.
selected
?
planIds
:
[]
},
projectId
:
{
op
:
"Equal"
,
value
:
this
.
$route
.
params
.
id
},
};
this
.
$refs
.
grid
.
reload
(
where
);
},
update
status
(
valId
,
valStatus
)
{
update
part
(
valId
,
valStatus
)
{
let
params
=
{
id
:
valId
,
status
:
valStatus
,
detail
:
""
,
};
Api
.
updatestatus
(
params
)
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
$Message
.
success
(
"操作成功"
);
}
else
{
this
.
$Message
.
error
(
"操作失败"
);
}
})
.
catch
((
err
)
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"操作失败"
);
console
.
warn
(
err
);
});
}
Api
.
updatepart
(
params
).
then
(
r
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
$Message
.
success
(
'操作成功'
)
}
else
{
this
.
$Message
.
error
(
'操作失败'
)
}
}).
catch
(
err
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
'操作失败'
)
console
.
warn
(
err
)
})
},
onSelect
(
val
)
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
)
;
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
)
},
viewRecord
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"查看记录"
;
this
.
fullScreen
=
true
;
this
.
detail
=
()
=>
import
(
"./detail"
);
this
.
detail
=
()
=>
import
(
'./detail'
)
this
.
modal
=
true
;
},
addRecord
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"新增记录"
;
this
.
fullScreen
=
true
;
this
.
detail
=
()
=>
import
(
"../record/add"
);
this
.
detail
=
()
=>
import
(
'../record/add'
)
this
.
modal
=
true
;
},
l
(
key
)
{
let
vkey
=
"project_task"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
}
,
}
,
}
;
return
this
.
$t
(
vkey
)
||
key
}
}
}
</
script
>
<
style
lang=
"less"
>
...
...
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