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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
45 deletions
+48
-45
index.vue
pages/aps/dispatch/index.vue
+47
-44
index.js
plugins/request/index.js
+1
-1
No files found.
pages/aps/dispatch/index.vue
View file @
8b9ea898
...
...
@@ -520,6 +520,7 @@ export default {
let
timebegin
=
formData
[
0
].
beginTime
;
let
timend
=
formData
[
0
].
endTime
;
this
.
newList
=
[];
console
.
log
(
"选中的id"
,
chekids
)
chekids
.
forEach
(
v
=>
{
var
item
=
formData
.
filter
(
u
=>
{
return
u
.
id
==
v
;
...
...
@@ -533,16 +534,16 @@ export default {
this
.
facilityModal
=
true
;
}
else
{
this
.
pentity
.
taskTime
=
[
timebegin
,
timend
];
if
(
formData
.
map
(
t
=>
{
this
.
newList
.
filter
(
m
=>
{
if
((
m
.
id
=
t
.
id
))
{
console
.
log
(
m
.
checked
);
}
});
})
)
{
}
//
if (
//
formData.map(t => {
//
this.newList.filter(m => {
//
if ((m.id = t.id)) {
//
console.log(m.checked);
//
}
//
});
//
})
//
) {
//
}
this
.
manModal
=
true
;
}
console
.
log
(
"选中的数据"
,
this
.
newList
);
...
...
@@ -550,53 +551,55 @@ export default {
// 设备派工
sendSheBei
()
{
let
item
=
this
.
newList
;
console
.
log
(
item
)
item
.
map
(
u
=>
{
u
.
userIds
=
this
.
entity
.
userIds
;
u
.
remark
=
this
.
entity
.
remark
;
u
.
equipId
=
this
.
shebeiId
;
});
this
.
$refs
[
"formValidate"
].
validate
(
valid
=>
{
if
(
valid
)
{
Api
.
saveTeamentry
(
item
).
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
$Message
.
success
(
"设备派工成功。"
);
this
.
getUserInfoFn
();
this
.
facilityModal
=
false
;
}
else
{
this
.
$Message
.
error
(
"设备派工失败..."
);
}
});
}
else
{
this
.
$Message
.
error
(
"校验不通过..."
);
}
});
//
this.$refs["formValidate"].validate(valid => {
//
if (valid) {
//
Api.saveTeamentry(item).then(res => {
//
if (res.success) {
//
this.$Message.success("设备派工成功。");
//
this.getUserInfoFn();
//
this.facilityModal = false;
//
} else {
//
this.$Message.error("设备派工失败...");
//
}
//
});
//
} else {
//
this.$Message.error("校验不通过...");
//
}
//
});
},
// 人员派工
sendUser
()
{
let
item
=
this
.
newList
;
console
.
log
(
"派工的数据"
,
item
)
item
.
map
(
u
=>
{
u
.
userIds
=
this
.
peploeId
;
u
.
remark
=
this
.
pentity
.
remark
;
});
this
.
$refs
[
"formpepole"
].
validate
(
valid
=>
{
if
(
valid
)
{
let
params
=
{
isDispatch
:
1
,
//派工是1,保存是0
entryList
:
item
};
Api
.
saveTeamentry
(
params
).
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
$Message
.
success
(
"人员派工成功。"
);
this
.
getUserInfoFn
();
this
.
manModal
=
false
;
}
else
{
this
.
$Message
.
error
(
"人员派工失败..."
);
}
});
}
else
{
this
.
$Message
.
error
(
"校验不通过..."
);
}
});
//
this.$refs["formpepole"].validate(valid => {
//
if (valid) {
//
let params = {
//
isDispatch: 1, //派工是1,保存是0
//
entryList: item
//
};
//
Api.saveTeamentry(params).then(res => {
//
if (res.success) {
//
this.$Message.success("人员派工成功。");
//
this.getUserInfoFn();
//
this.manModal = false;
//
} else {
//
this.$Message.error("人员派工失败...");
//
}
//
});
//
} else {
//
this.$Message.error("校验不通过...");
//
}
//
});
},
// 拆分方法
setChai
(
item
,
index
)
{
...
...
plugins/request/index.js
View file @
8b9ea898
import
axios
from
'axios'
;
import
util
from
'@/libs/util'
;
import
util
from
'@/libs/util'
;
import
Setting
from
'@/setting'
;
import
QS
from
'querystring'
;
import
{
Message
,
Notice
}
from
'view-design'
;
...
...
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