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
8b9ea898
Commit
8b9ea898
authored
Apr 21, 2020
by
康振飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调试拆分派工
parent
a4fff957
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
44 deletions
+47
-44
index.vue
pages/aps/dispatch/index.vue
+47
-44
No files found.
pages/aps/dispatch/index.vue
View file @
8b9ea898
...
@@ -520,6 +520,7 @@ export default {
...
@@ -520,6 +520,7 @@ export default {
let
timebegin
=
formData
[
0
].
beginTime
;
let
timebegin
=
formData
[
0
].
beginTime
;
let
timend
=
formData
[
0
].
endTime
;
let
timend
=
formData
[
0
].
endTime
;
this
.
newList
=
[];
this
.
newList
=
[];
console
.
log
(
"选中的id"
,
chekids
)
chekids
.
forEach
(
v
=>
{
chekids
.
forEach
(
v
=>
{
var
item
=
formData
.
filter
(
u
=>
{
var
item
=
formData
.
filter
(
u
=>
{
return
u
.
id
==
v
;
return
u
.
id
==
v
;
...
@@ -533,16 +534,16 @@ export default {
...
@@ -533,16 +534,16 @@ export default {
this
.
facilityModal
=
true
;
this
.
facilityModal
=
true
;
}
else
{
}
else
{
this
.
pentity
.
taskTime
=
[
timebegin
,
timend
];
this
.
pentity
.
taskTime
=
[
timebegin
,
timend
];
if
(
//
if (
formData
.
map
(
t
=>
{
//
formData.map(t => {
this
.
newList
.
filter
(
m
=>
{
//
this.newList.filter(m => {
if
((
m
.
id
=
t
.
id
))
{
//
if ((m.id = t.id)) {
console
.
log
(
m
.
checked
);
//
console.log(m.checked);
}
//
}
});
//
});
})
//
})
)
{
//
) {
}
//
}
this
.
manModal
=
true
;
this
.
manModal
=
true
;
}
}
console
.
log
(
"选中的数据"
,
this
.
newList
);
console
.
log
(
"选中的数据"
,
this
.
newList
);
...
@@ -550,53 +551,55 @@ export default {
...
@@ -550,53 +551,55 @@ export default {
// 设备派工
// 设备派工
sendSheBei
()
{
sendSheBei
()
{
let
item
=
this
.
newList
;
let
item
=
this
.
newList
;
console
.
log
(
item
)
item
.
map
(
u
=>
{
item
.
map
(
u
=>
{
u
.
userIds
=
this
.
entity
.
userIds
;
u
.
userIds
=
this
.
entity
.
userIds
;
u
.
remark
=
this
.
entity
.
remark
;
u
.
remark
=
this
.
entity
.
remark
;
u
.
equipId
=
this
.
shebeiId
;
u
.
equipId
=
this
.
shebeiId
;
});
});
this
.
$refs
[
"formValidate"
].
validate
(
valid
=>
{
//
this.$refs["formValidate"].validate(valid => {
if
(
valid
)
{
//
if (valid) {
Api
.
saveTeamentry
(
item
).
then
(
res
=>
{
//
Api.saveTeamentry(item).then(res => {
if
(
res
.
success
)
{
//
if (res.success) {
this
.
$Message
.
success
(
"设备派工成功。"
);
//
this.$Message.success("设备派工成功。");
this
.
getUserInfoFn
();
//
this.getUserInfoFn();
this
.
facilityModal
=
false
;
//
this.facilityModal = false;
}
else
{
//
} else {
this
.
$Message
.
error
(
"设备派工失败..."
);
//
this.$Message.error("设备派工失败...");
}
//
}
});
//
});
}
else
{
//
} else {
this
.
$Message
.
error
(
"校验不通过..."
);
//
this.$Message.error("校验不通过...");
}
//
}
});
//
});
},
},
// 人员派工
// 人员派工
sendUser
()
{
sendUser
()
{
let
item
=
this
.
newList
;
let
item
=
this
.
newList
;
console
.
log
(
"派工的数据"
,
item
)
item
.
map
(
u
=>
{
item
.
map
(
u
=>
{
u
.
userIds
=
this
.
peploeId
;
u
.
userIds
=
this
.
peploeId
;
u
.
remark
=
this
.
pentity
.
remark
;
u
.
remark
=
this
.
pentity
.
remark
;
});
});
this
.
$refs
[
"formpepole"
].
validate
(
valid
=>
{
//
this.$refs["formpepole"].validate(valid => {
if
(
valid
)
{
//
if (valid) {
let
params
=
{
//
let params = {
isDispatch
:
1
,
//派工是1,保存是0
//
isDispatch: 1, //派工是1,保存是0
entryList
:
item
//
entryList: item
};
//
};
Api
.
saveTeamentry
(
params
).
then
(
res
=>
{
//
Api.saveTeamentry(params).then(res => {
if
(
res
.
success
)
{
//
if (res.success) {
this
.
$Message
.
success
(
"人员派工成功。"
);
//
this.$Message.success("人员派工成功。");
this
.
getUserInfoFn
();
//
this.getUserInfoFn();
this
.
manModal
=
false
;
//
this.manModal = false;
}
else
{
//
} else {
this
.
$Message
.
error
(
"人员派工失败..."
);
//
this.$Message.error("人员派工失败...");
}
//
}
});
//
});
}
else
{
//
} else {
this
.
$Message
.
error
(
"校验不通过..."
);
//
this.$Message.error("校验不通过...");
}
//
}
});
//
});
},
},
// 拆分方法
// 拆分方法
setChai
(
item
,
index
)
{
setChai
(
item
,
index
)
{
...
...
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