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
a2c243e4
Commit
a2c243e4
authored
Apr 21, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'product' of git.mes123.com:zhouyx/mes-ui into product-rjt
parents
bfb1ee38
39328ab1
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
478 additions
and
304 deletions
+478
-304
dataGrid.vue
components/page/dataGrid.vue
+3
-4
index.vue
pages/account/login/index.vue
+2
-2
dispatch.less
pages/aps/dispatch/dispatch.less
+7
-0
index.vue
pages/aps/dispatch/index.vue
+307
-291
api.js
pages/resourceManagement/productionResources/api.js
+3
-0
index.vue
pages/resourceManagement/productionResources/index.vue
+105
-6
index.js
plugins/request/index.js
+1
-1
Dockerfile
static/Dockerfile
+7
-0
nginx.conf
static/nginx.conf
+43
-0
No files found.
components/page/dataGrid.vue
View file @
a2c243e4
...
...
@@ -111,7 +111,7 @@
<slot
name=
"batch"
></slot>
</div>
<Button
@
click=
"cancelFooterToolbar"
>
取消
</Button>
<Button
@
click=
"cancelFooterToolbar"
class=
"btn"
>
取消
</Button>
</FooterToolbar>
</div>
</
template
>
...
...
@@ -477,10 +477,9 @@ export default {
selectAll
(
status
)
{
this
.
$refs
.
table
.
selectAll
(
status
);
},
cancelFooterToolbar
()
{
cancelFooterToolbar
()
{
this
.
$refs
.
table
.
selectAll
(
false
);
this
.
footerToolbar
=
false
this
.
footerToolbar
=
false
;
}
},
computed
:
{
...
...
pages/account/login/index.vue
View file @
a2c243e4
...
...
@@ -14,9 +14,9 @@
<div
class=
"bg bg3"
>
1
</div>
</CarouselItem>
</Carousel>
<div
v-if=
"showI18n"
class=
"page-account-header"
>
<
!--
<
div
v-if=
"showI18n"
class=
"page-account-header"
>
<i-header-i18n
/>
</div>
</div>
-->
<div
class=
"main"
>
<div
class=
"ad"
>
<img
src=
"@/assets/images/login/ad.png"
/>
...
...
pages/aps/dispatch/dispatch.less
View file @
a2c243e4
...
...
@@ -31,6 +31,13 @@
.dispatch_part_body{
padding: 10px;
overflow-y: auto;
.h3_bg{
background: #a5adbf;
padding: 0 0 0 10px;
.h3_tag{
margin-left: 15px!important;
}
}
.dispatch_card{
margin: 10px 0;
.card{
...
...
pages/aps/dispatch/index.vue
View file @
a2c243e4
<
style
lang=
"less"
scoped
>
@import
'./dispatch.less'
;
@import
"./dispatch.less"
;
</
style
>
<
template
>
<div
class=
"dispatch myBug"
>
...
...
@@ -25,19 +25,24 @@
</RadioGroup>
</span>
</p>
<h4
class=
"tc"
v-if=
"this.listTask.length==0"
>
暂无数据
</h4>
<div
class=
"dispatch_part_body"
v-if=
"listShow == '订单'"
:style=
"
{height:byheight}">
<!--
{{
ids
}}
-->
<Collapse
simple
>
<Panel
v-for=
"(item,index) in listOrder"
:key=
"index"
:name=
"item.mesCode"
>
<b>
订单号:
{{
item
[
0
].
mesCode
}}
<Tag>
{{
item
.
length
}}
</Tag></b>
<!--
<Collapse
simple
>
-->
<div
v-for=
"(item,index) in listOrder"
:key=
"index"
:name=
"item.mesCode"
>
<h3
class=
"h3_bg"
>
订单号:
{{
item
[
0
].
mesCode
}}
<Tag
class=
"h3_tag"
>
{{
item
.
length
}}
</Tag>
</h3>
<!-- 订单号:
{{
item
[
0
].
mesCode
}}
{{
item
.
length
}}
-->
<p
slot=
"content"
>
<Row
:gutter=
"15"
class=
"card_body01"
>
<Row
:gutter=
"15"
class=
"card_body01"
>
<Col
span=
"8"
class=
"dispatch_card"
v-for=
"(li,index) in item"
:key=
"li.id"
>
<Card>
<p
slot=
"title"
class=
"card_top"
>
<Checkbox
v-model=
"li.checked"
:disabled=
"li.status!=-1"
>
<Icon
type=
"ios-pricetags"
/>
工序
{{
li
.
process_seq
}}
:
{{
li
.
process_name
}}
<Checkbox
v-model=
"li.checked"
:disabled=
"li.status!=-1"
>
<Icon
type=
"ios-pricetags"
/>
工序
{{
li
.
process_seq
}}
:
{{
li
.
process_name
}}
</Checkbox>
</p>
<div
class=
"h60"
>
...
...
@@ -55,7 +60,7 @@
title=
"删除"
type=
"icon"
icon=
"md-close-circle"
v-else-if=
"li.pid != 0"
v-else-if=
"li.
dispatchStatus!=2 && li.
pid != 0"
@
click=
"removeDetail(li,index)"
></op>
</p>
...
...
@@ -66,12 +71,12 @@
</Card>
</Col>
</Row>
</p>
</
Panel
>
</Collapse
>
</p>
</
div
>
<!--
</Collapse>
--
>
</div>
<div
class=
"dispatch_part_body"
v-else-if=
"listShow == '工单'"
:style=
"
{height:byheight}">
<Row
:gutter=
"15"
class=
"card_body01"
>
<Row
:gutter=
"15"
class=
"card_body01"
>
<Col
span=
"8"
class=
"dispatch_card"
v-for=
"(item,index) in listTask"
:key=
"index"
>
<Card>
<p
slot=
"title"
class=
"card_top"
>
...
...
@@ -97,7 +102,7 @@
title=
"删除"
type=
"icon"
icon=
"md-close-circle"
v-else-if=
"item.pid != 0"
v-else-if=
"item.
dispatchStatus!=2 && item.
pid != 0"
@
click=
"removeDetail(item,index)"
></op>
<!-- -->
...
...
@@ -130,6 +135,7 @@
</span>
</p>
<div
class=
"dispatch_part_body"
:style=
"
{height:byheight}">
<h4
class=
"tc"
v-if=
"listMan.length==0 || listSheBei.length==0"
>
暂无数据
</h4>
<div
class=
"shebei"
v-if=
"button2 == '设备'"
>
<Row
:gutter=
"15"
>
<!--
{{
shebeiId
}}
-->
...
...
@@ -138,7 +144,8 @@
span=
"12"
class=
"dispatch_card"
v-for=
"(item,index) in listSheBei"
:key=
"index"
>
:key=
"index"
>
<Card
class=
"card"
>
<p
slot=
"title"
class=
"card_top"
>
<label
@
click=
"setShebeiId(item.id)"
class=
"label"
>
...
...
@@ -170,14 +177,14 @@
<!--
{{
peploeId
}}
@on-change="setpepoleid" @on-change="setpepoleids"-->
<Row
:gutter=
"15"
>
<Col
span=
"8"
class=
"dispatch_card02"
v-for=
"(item,index) in listMan"
:key=
"index"
>
<CheckboxGroup
class=
"man_body"
>
<Checkbox
v-model=
"item.checked"
border
class=
'checkUser'
>
<!--
<Tooltip
:content=
"item.userName"
placement=
"top-start"
>
-->
<span
class=
"svg_name"
:title=
'item.userName'
>
{{
item
.
userName
}}
</span>
<!--
<span
class=
"svg"
>
{{
item
.
id
}}
</span>
-->
<!--
</Tooltip>
-->
</Checkbox>
</CheckboxGroup>
<CheckboxGroup
class=
"man_body"
>
<Checkbox
v-model=
"item.checked"
border
class=
"checkUser"
>
<!--
<Tooltip
:content=
"item.userName"
placement=
"top-start"
>
-->
<span
class=
"svg_name"
:title=
"item.userName"
>
{{
item
.
userName
}}
</span>
<!--
<span
class=
"svg"
>
{{
item
.
id
}}
</span>
-->
<!--
</Tooltip>
-->
</Checkbox>
</CheckboxGroup>
</Col>
</Row>
</div>
...
...
@@ -186,8 +193,14 @@
</Col>
</Row>
<!-- 拆分 fenModel -->
<Modal
v-model=
"chaiModal"
title=
"拆分工序"
:width=
"400"
:mask-closable=
"false"
ok-text=
"拆分"
@
on-ok=
"okChai()"
>
<Modal
v-model=
"chaiModal"
title=
"拆分工序"
:width=
"400"
:mask-closable=
"false"
ok-text=
"拆分"
@
on-ok=
"okChai()"
>
拆分数量:
<Tag>
{{
chaiNum
}}
</Tag>
<Slider
v-model=
"chaiNum"
:max=
"maxnum"
show-stops
:min=
"1"
></Slider>
...
...
@@ -217,10 +230,10 @@
<UserSelect
ref=
"userSelected"
v-model=
"entity.userIds"
:type=
"3"
:multiple=
"true"
style=
"width: 500px"
/>
<!-- :type="3" -->
</FormItem>
</Col>
<Col
span=
"24"
class=
"drawer_midell"
>
...
...
@@ -253,16 +266,16 @@
<Row>
<Col
span=
"24"
>
<FormItem
label=
"工时"
prop=
"taskTime"
>
<DatePicker
v-model=
"pentity.taskTime"
type=
"datetimerange"
placement=
"bottom-start"
:options=
"dateRange"
@
on-change=
"handleChange"
placeholder=
"请选择时间段"
style=
"width: 330px"
></DatePicker>
</FormItem>
<DatePicker
v-model=
"pentity.taskTime"
type=
"datetimerange"
placement=
"bottom-start"
:options=
"dateRange"
@
on-change=
"handleChange"
placeholder=
"请选择时间段"
style=
"width: 330px"
></DatePicker>
</FormItem>
</Col>
<Col
span=
"24"
class=
"drawer_midell"
>
<p
class=
"drawer_center"
>
...
...
@@ -291,27 +304,28 @@
</div>
</
template
>
<
script
>
import
Api
from
'./api'
import
Api
from
"./api"
;
export
default
{
components
:
{
},
components
:
{},
data
()
{
return
{
action
:
Api
.
index
,
toheight
:
'500px'
,
byheight
:
'450px'
,
button1
:
'全部'
,
button2
:
'设备'
,
listShow
:
'订单'
,
shebei
:
''
,
toheight
:
"500px"
,
byheight
:
"450px"
,
button1
:
"全部"
,
button2
:
"设备"
,
listShow
:
"订单"
,
shebei
:
""
,
curTask
:
null
,
dateRange
:
{
//禁选工时时间区间
disabledDate
(
date
)
{
return
date
&&
date
.
valueOf
()
<
Date
.
now
()
-
86400000
return
date
&&
date
.
valueOf
()
<
Date
.
now
()
-
86400000
;
}
},
shebeiId
:
-
1
,
footerToolbar
:
false
,
status
:
'1'
,
//排产状态
status
:
"1"
,
//排产状态
footerMore
:
true
,
//CheckItem!=null&&CheckItem!=''
footerModel
:
false
,
//底部按钮
facilityModal
:
false
,
//设备抽屉
...
...
@@ -319,358 +333,360 @@ export default {
listSheBei
:
[],
//设备列表
listMan
:
[],
//人员列表
listTask
:
[],
//工单列表数据
listTitle
:
[],
//订单号列表
listTitle
:
[],
//订单号列表
newList
:
[],
//选中数据
chaiModal
:
false
,
//拆分弹框
chaiNum
:
1
,
//拆分数量
maxnum
:
1
,
rowIndex
:
0
,
//多选项的index
chaiId
:
0
,
chaiId
:
0
,
entity
:
{
taskTime
:
''
,
//工时
taskTime
:
""
,
//工时
userIds
:
null
,
//选中人员
remark
:
''
//备注
remark
:
""
//备注
},
ruleValidate
:
{
taskTime
:
[{
required
:
true
,
type
:
'array'
,
message
:
"请选择工时时间段"
,
trigger
:
'blur'
,
fields
:
{
0
:
{
type
:
"date"
,
required
:
true
,
message
:
"请选择工时时间段"
},
1
:
{
type
:
"date"
,
required
:
true
,
message
:
"请选择工时时间段"
}
taskTime
:
[
{
required
:
true
,
type
:
"array"
,
message
:
"请选择工时时间段"
,
trigger
:
"blur"
,
fields
:
{
0
:
{
type
:
"date"
,
required
:
true
,
message
:
"请选择工时时间段"
},
1
:
{
type
:
"date"
,
required
:
true
,
message
:
"请选择工时时间段"
}
}
}
}
],
],
userIds
:
[
{
required
:
true
,
message
:
'请选择人员!'
,
trigger
:
'blur'
,
type
:
'array'
message
:
"请选择人员!"
,
trigger
:
"blur"
,
type
:
"array"
}
]
},
pentity
:
{
taskTime
:
''
,
//工时
remark
:
''
//备注
taskTime
:
""
,
//工时
remark
:
""
//备注
},
rulepepole
:{
taskTime
:
[{
required
:
true
,
type
:
'array'
,
message
:
"请选择工时时间段"
,
trigger
:
'blur'
,
fields
:
{
0
:
{
type
:
"date"
,
required
:
true
,
message
:
"请选择工时时间段"
},
1
:
{
type
:
"date"
,
required
:
true
,
message
:
"请选择工时时间段"
}
rulepepole
:
{
taskTime
:
[
{
required
:
true
,
type
:
"array"
,
message
:
"请选择工时时间段"
,
trigger
:
"blur"
,
fields
:
{
0
:
{
type
:
"date"
,
required
:
true
,
message
:
"请选择工时时间段"
},
1
:
{
type
:
"date"
,
required
:
true
,
message
:
"请选择工时时间段"
}
}
}
}
]
}
,
}
]
}
}
;
},
created
()
{
this
.
getUserInfoFn
()
this
.
byheight
=
window
.
innerHeight
-
208
+
'px'
this
.
getUserInfoFn
()
;
this
.
byheight
=
window
.
innerHeight
-
208
+
"px"
;
},
mounted
()
{
this
.
byheight
=
window
.
innerHeight
-
208
+
'px'
this
.
byheight
=
window
.
innerHeight
-
208
+
"px"
;
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
methods
:
{
getUserInfoFn
()
{
let
userId
=
this
.
$store
.
state
.
userInfo
.
userId
let
infoid
,
departId
Api
.
getUserDepartment
({
userId
:
userId
}).
then
(
(
res
)
=>
{
let
userId
=
this
.
$store
.
state
.
userInfo
.
userId
;
let
infoid
,
departId
;
Api
.
getUserDepartment
({
userId
:
userId
}).
then
(
res
=>
{
if
(
res
.
success
)
{
infoid
=
res
.
result
.
id
infoid
=
res
.
result
.
id
;
}
else
{
infoid
=
[]
this
.
$Message
.
error
(
'查询失败!'
)
infoid
=
[]
;
this
.
$Message
.
error
(
"查询失败!"
);
}
})
Api
.
getUserInfo
({
id
:
userId
}).
then
(
(
res
)
=>
{
})
;
Api
.
getUserInfo
({
id
:
userId
}).
then
(
res
=>
{
if
(
res
.
success
)
{
departId
=
res
.
result
.
departmentId
this
.
getEntryList
(
departId
)
this
.
getselectuser
(
departId
)
this
.
getlistall
(
departId
)
departId
=
res
.
result
.
departmentId
;
this
.
getEntryList
(
departId
)
;
this
.
getselectuser
(
departId
)
;
this
.
getlistall
(
departId
)
;
}
else
{
departId
=
''
this
.
$Message
.
error
(
'查询失败!'
)
departId
=
""
;
this
.
$Message
.
error
(
"查询失败!"
);
}
})
})
;
},
setShebeiId
(
id
)
{
this
.
shebeiId
=
id
this
.
footerToolbar
=
true
this
.
shebeiId
=
id
;
this
.
footerToolbar
=
true
;
},
// 获取查询人员
// 获取查询人员
getselectuser
(
id
)
{
let
parme
=
{
departmentId
:
id
,
type
:
'2'
}
Api
.
getUser
(
parme
).
then
(
(
res
)
=>
{
res
.
result
.
map
(
(
u
)
=>
{
u
.
checked
=
false
})
this
.
listMan
=
res
.
result
})
let
parme
=
{
departmentId
:
id
,
type
:
"2"
};
Api
.
getUser
(
parme
).
then
(
res
=>
{
res
.
result
.
map
(
u
=>
{
u
.
checked
=
false
;
})
;
this
.
listMan
=
res
.
result
;
})
;
},
// 获取查询设备
getlistall
(
id
)
{
let
parme
=
{
shopid
:
id
}
Api
.
getlistall
(
parme
).
then
(
(
res
)
=>
{
res
.
result
.
map
(
(
u
)
=>
{
u
.
checked
=
false
})
this
.
listSheBei
=
res
.
result
})
let
parme
=
{
shopid
:
id
}
;
Api
.
getlistall
(
parme
).
then
(
res
=>
{
res
.
result
.
map
(
u
=>
{
u
.
checked
=
false
;
})
;
this
.
listSheBei
=
res
.
result
;
})
;
},
// 获取用户工单 JSON.stringify(parme)
getEntryList
(
id
)
{
let
parme
=
{
departmentId
:
id
,
DispatchStatus
:
this
.
status
}
Api
.
getEntryList
(
parme
).
then
((
res
)
=>
{
var
savedUl
=
[]
var
pid
res
.
result
.
map
((
u
)
=>
{
if
(
u
.
pid
){
pid
=
u
.
pid
}
else
{
pid
=
0
}
let
detailnew
=
{
beginTime
:
u
.
beginTime
,
//开始时间
dispatchStatus
:
u
.
dispatchStatus
,
//
endTime
:
u
.
endTime
,
//
equipCode
:
u
.
equipCode
,
//
equipId
:
u
.
equipId
,
//
executeId
:
u
.
executeId
,
//
id
:
u
.
id
,
//
mesCode
:
u
.
mesCode
,
//
order_id
:
u
.
order_id
,
//
process_content
:
u
.
process_content
,
//
process_name
:
u
.
process_name
,
//
process_seq
:
u
.
process_seq
,
//
productName
:
u
.
productName
,
//
quantity
:
u
.
quantity
,
//
routingDetailId
:
u
.
routingDetailId
,
//
routingHeaderId
:
u
.
routingHeaderId
,
//
status
:
u
.
status
,
//
userIds
:
u
.
userIds
,
//
userNames
:
u
.
userNames
,
pid
:
pid
,
//拆分项id
}
savedUl
.
push
(
detailnew
)
})
this
.
listTask
=
savedUl
})
},
// 数组去重
getArray
(
a
)
{
const
hash
=
{}
const
len
=
a
.
length
const
result
=
[]
for
(
let
i
=
0
;
i
<
len
;
i
++
)
{
if
(
!
hash
[
a
[
i
]])
{
hash
[
a
[
i
]]
=
true
result
.
push
(
a
[
i
])
}
}
return
result
let
parme
=
{
departmentId
:
id
,
DispatchStatus
:
this
.
status
};
Api
.
getEntryList
(
parme
).
then
(
res
=>
{
var
savedUl
=
[];
var
pid
;
res
.
result
.
map
(
u
=>
{
if
(
u
.
pid
)
{
pid
=
u
.
pid
;
}
else
{
pid
=
0
;
}
let
detailnew
=
{
beginTime
:
u
.
beginTime
,
//开始时间
dispatchStatus
:
u
.
dispatchStatus
,
//
endTime
:
u
.
endTime
,
//
equipCode
:
u
.
equipCode
,
//
equipId
:
u
.
equipId
,
//
executeId
:
u
.
executeId
,
//
id
:
u
.
id
,
//
mesCode
:
u
.
mesCode
,
//
order_id
:
u
.
order_id
,
//
process_content
:
u
.
process_content
,
//
process_name
:
u
.
process_name
,
//
process_seq
:
u
.
process_seq
,
//
productName
:
u
.
productName
,
//
quantity
:
u
.
quantity
,
//
routingDetailId
:
u
.
routingDetailId
,
//
routingHeaderId
:
u
.
routingHeaderId
,
//
status
:
u
.
status
,
//
userIds
:
u
.
userIds
,
//
userNames
:
u
.
userNames
,
pid
:
pid
//拆分项id
};
savedUl
.
push
(
detailnew
);
});
this
.
listTask
=
savedUl
;
});
},
// 时间改变方法
handleChange
(
daterange
)
{
this
.
newList
.
map
(
(
u
)
=>
{
u
.
beginTime
=
daterange
[
0
]
u
.
endTime
=
daterange
[
1
]
})
this
.
newList
.
map
(
u
=>
{
u
.
beginTime
=
daterange
[
0
]
;
u
.
endTime
=
daterange
[
1
]
;
})
;
},
handleChangeTime
(
time
)
{
this
.
newList
.
map
(
(
u
)
=>
{
u
.
beginTime
=
time
[
0
]
u
.
endTime
=
time
[
1
]
})
this
.
newList
.
map
(
u
=>
{
u
.
beginTime
=
time
[
0
]
;
u
.
endTime
=
time
[
1
]
;
})
;
},
// 过滤条件
changeStatus
(
a
)
{
// console.log(a)
this
.
getUserInfoFn
()
this
.
getUserInfoFn
()
;
},
// 打开抽屉
openDrawer
()
{
let
chekids
=
this
.
ids
let
formData
=
this
.
listTask
let
timebegin
=
formData
[
0
].
beginTime
let
timend
=
formData
[
0
].
endTime
this
.
newList
=
[]
chekids
.
forEach
((
v
)
=>
{
var
item
=
formData
.
filter
((
u
)
=>
{
return
u
.
id
==
v
})
let
chekids
=
this
.
ids
;
let
formData
=
this
.
listTask
;
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
;
});
if
(
item
&&
item
[
0
])
{
this
.
newList
.
push
(
item
[
0
])
this
.
newList
.
push
(
item
[
0
])
;
}
})
if
(
this
.
button2
==
'设备'
)
{
this
.
entity
.
taskTime
=
[
timebegin
,
timend
]
this
.
facilityModal
=
true
})
;
if
(
this
.
button2
==
"设备"
)
{
this
.
entity
.
taskTime
=
[
timebegin
,
timend
];
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
)
}
})
})){
}
this
.
manModal
=
true
this
.
pentity
.
taskTime
=
[
timebegin
,
timend
];
// if (
// formData.map(t => {
// this.newList.filter(m => {
// if ((m.id = t.id)) {
// console.log(m.checked);
// }
// });
// })
// ) {
// }
this
.
manModal
=
true
;
}
console
.
log
(
'选中的数据'
,
this
.
newList
)
// console.log("选中的数据", this.newList);
},
// 设备派工
sendSheBei
()
{
let
item
=
this
.
newList
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
)
=>
{
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
)
{
let
params
=
{
isDispatch
:
1
,
//派工是1,保存是0
entryList
:
item
};
Api
.
saveTeamentry
(
params
).
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
$Message
.
success
(
'设备派工成功。'
)
this
.
getUserInfoFn
()
this
.
facilityModal
=
false
this
.
$Message
.
success
(
"设备派工成功。"
);
this
.
getUserInfoFn
()
;
this
.
facilityModal
=
false
;
}
else
{
this
.
$Message
.
error
(
'设备派工失败...'
)
this
.
$Message
.
error
(
"设备派工失败..."
);
}
})
}
else
{
this
.
$Message
.
error
(
'校验不通过...'
)
})
;
}
else
{
this
.
$Message
.
error
(
"校验不通过..."
);
}
})
})
;
},
// 人员派工
sendUser
()
{
let
item
=
this
.
newList
item
.
map
((
u
)
=>
{
u
.
userIds
=
this
.
peploeId
u
.
remark
=
this
.
pentity
.
remark
})
this
.
$refs
[
'formpepole'
].
validate
((
valid
)
=>
{
if
(
valid
){
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
)
=>
{
isDispatch
:
1
,
//派工是1,保存是0
entryList
:
item
};
Api
.
saveTeamentry
(
params
).
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
$Message
.
success
(
'人员派工成功。'
)
this
.
getUserInfoFn
()
this
.
manModal
=
false
this
.
$Message
.
success
(
"人员派工成功。"
);
this
.
getUserInfoFn
()
;
this
.
manModal
=
false
;
}
else
{
this
.
$Message
.
error
(
'人员派工失败...'
)
this
.
$Message
.
error
(
"人员派工失败..."
);
}
})
}
else
{
this
.
$Message
.
error
(
'校验不通过...'
)
})
;
}
else
{
this
.
$Message
.
error
(
"校验不通过..."
);
}
})
})
;
},
// 拆分方法
setChai
(
item
,
index
)
{
this
.
chaiModal
=
true
this
.
chaiNum
=
1
this
.
maxnum
=
item
.
quantity
-
1
this
.
rowIndex
=
index
},
okChai
()
{
var
detail
=
this
.
$u
.
clone
(
this
.
listTask
[
this
.
rowIndex
])
this
.
listTask
[
this
.
rowIndex
].
quantity
-=
this
.
chaiNum
detail
.
pid
=
detail
.
id
detail
.
id
=
0
detail
.
quantity
=
this
.
chaiNum
this
.
listTask
.
splice
(
this
.
rowIndex
+
1
,
0
,
detail
)
console
.
log
(
"拆分后数据"
,
this
.
listTask
)
this
.
saveFameData
()
this
.
getUserInfoFn
()
// console.log(item, index)
this
.
curTask
=
item
;
this
.
chaiModal
=
true
;
this
.
chaiNum
=
1
;
this
.
maxnum
=
item
.
quantity
-
1
;
this
.
rowIndex
=
index
;
},
// 拆分保存
saveFameData
()
{
let
params
=
{
isDispatch
:
0
,
//派工是1,保存是0
entryList
:
this
.
listTask
}
Api
.
saveTeamentry
(
params
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
this
.
$Message
.
success
(
'拆分成功。'
)
}
else
{
this
.
$Message
.
error
(
'拆分失败...'
)
}
})
okChai
()
{
var
old
=
this
.
$u
.
clone
(
this
.
curTask
);
var
add
=
this
.
$u
.
clone
(
this
.
curTask
);
old
.
quantity
-=
this
.
chaiNum
;
add
.
quantity
=
this
.
chaiNum
;
add
.
id
=
0
;
add
.
pid
=
old
.
id
;
let
params
=
{
isDispatch
:
0
,
//派工是1,保存是0
entryList
:
[
old
,
add
]
};
Api
.
saveTeamentry
(
params
).
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
getUserInfoFn
();
this
.
$Message
.
success
(
"拆分成功。"
);
}
else
{
this
.
$Message
.
error
(
"拆分失败..."
);
}
});
},
// 删除行
removeDetail
(
item
,
index
)
{
let
delid
=
{
id
:
item
.
id
}
Api
.
deleteItem
(
delid
).
then
(
(
res
)
=>
{
if
(
res
.
success
)
{
this
.
$Message
.
success
(
'拆分项已删除。'
)
this
.
getUserInfoFn
()
}
else
{
this
.
$Message
.
error
(
'拆分项删除失败!'
)
}
})
let
delid
=
{
id
:
item
.
id
};
Api
.
deleteItem
(
delid
).
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
$Message
.
success
(
"拆分项已删除。"
);
this
.
getUserInfoFn
();
}
else
{
this
.
$Message
.
error
(
"拆分项删除失败!"
);
}
});
// let oldList = this.listTask;
// let clickRow = oldList.filter(listRow=>listRow.process_name===item.process_name)[0];
// clickRow.quantity += this.chaiNum
// this.listTask.splice(index, 1)
// this.$Message.success('拆分项已删除。')
},
cancle
()
{
//取消
this
.
facilityModal
=
false
this
.
manModal
=
false
this
.
footerToolbar
=
false
},
cancle
()
{
//取消
this
.
facilityModal
=
false
;
this
.
manModal
=
false
;
this
.
footerToolbar
=
false
;
}
},
computed
:
{
ids
()
{
let
ids
=
[]
this
.
listTask
.
map
(
(
u
)
=>
{
let
ids
=
[]
;
this
.
listTask
.
map
(
u
=>
{
if
(
u
.
checked
)
{
ids
.
push
(
u
.
id
)
ids
.
push
(
u
.
id
)
;
}
})
})
;
if
(
ids
.
length
>
0
)
{
this
.
footerToolbar
=
true
this
.
footerToolbar
=
true
;
}
return
ids
return
ids
;
},
listOrder
(){
let
orders
=
this
.
$u
.
group
(
this
.
listTask
,
u
=>
{
return
u
.
mesCode
})
console
.
warn
(
"listOrder"
,
orders
)
listOrder
()
{
let
orders
=
this
.
$u
.
group
(
this
.
listTask
,
u
=>
{
return
u
.
mesCode
;
})
;
// console.warn("listOrder", orders);
return
orders
;
},
peploeId
()
{
let
peploeId
=
[]
this
.
listMan
.
map
(
(
u
)
=>
{
let
peploeId
=
[]
;
this
.
listMan
.
map
(
u
=>
{
if
(
u
.
checked
)
{
peploeId
.
push
(
u
.
id
)
peploeId
.
push
(
u
.
id
)
;
}
})
this
.
footerToolbar
=
true
return
peploeId
})
;
this
.
footerToolbar
=
true
;
return
peploeId
;
},
showOperate
()
{
return
this
.
ids
.
length
>
0
&&
(
this
.
shebeiId
>
0
||
this
.
peploeId
.
length
>
0
)
return
(
this
.
ids
.
length
>
0
&&
(
this
.
shebeiId
>
0
||
this
.
peploeId
.
length
>
0
)
);
}
},
watch
:
{},
}
watch
:
{}
}
;
</
script
>
<
style
lang=
"less"
>
</
style
>
\ No newline at end of file
pages/resourceManagement/productionResources/api.js
View file @
a2c243e4
...
...
@@ -17,6 +17,9 @@ export default {
update
(
params
)
{
return
Api
.
post
(
`
${
systemUrl
}
/equipcalendarwork/createorupdate`
,
params
);
},
set
(
params
)
{
return
Api
.
post
(
`
${
systemUrl
}
/planresource/setplanresource`
,
params
);
},
//删除:
delete
(
params
)
{
return
Api
.
delete
(
`
${
systemUrl
}
/planresource/delete`
,
{
params
:
params
});
...
...
pages/resourceManagement/productionResources/index.vue
View file @
a2c243e4
<
template
>
<div>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
:high=
"false"
>
<div
class=
"resources-p"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
:high=
"false"
@
on-selection-change=
"onSelect"
>
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
<FormItem
prop=
"keys"
>
<Input
placeholder=
"请输入
关键字资源名称/资源编号/资源
类型/部门"
v-model=
"easySearch.keys.value"
/>
<Input
placeholder=
"请输入
资源名称/编号/
类型/部门"
v-model=
"easySearch.keys.value"
/>
</FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
</FormItem>
</Form>
</
template
>
<
template
slot=
"batch"
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
class=
"form-row"
>
<Row>
<Col
span=
"8"
>
<FormItem
:label=
"l('isimportant')"
prop=
"isimportant"
>
<RadioGroup
v-model=
"entity.isimportant"
>
<Radio
label=
"0"
>
是
</Radio>
<Radio
label=
"1"
>
否
</Radio>
</RadioGroup>
</FormItem>
</Col>
<Col
span=
"12"
>
<FormItem
:label=
"l('capabilityValue')"
>
<InputNumber
v-model=
"entity.capabilityValue"
></InputNumber>
</FormItem>
</Col>
<Col
span=
"4"
>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
</FormItem>
</Col>
</Row>
</Form>
</
template
>
</DataGrid>
<Modal
v-model=
"editModal"
title=
"编辑"
footer-hide
>
...
...
@@ -38,14 +68,23 @@ export default {
easySearch
:
{
keys
:
{
op
:
"title,code,type,departTitle"
,
value
:
null
}
},
entity
:
{},
disabled
:
false
,
ids
:
[],
editModal
:
false
,
deletelModal
:
false
,
curId
:
0
,
rules
:
{
isimportant
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
capabilityValue
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
},
columns
:
[
{
key
:
"id"
,
title
:
this
.
l
(
"id"
),
hide
:
true
,
align
:
"left"
},
{
type
:
"selection"
,
width
:
70
,
align
:
"center"
},
// {
// key: "deleterUserId",
// title: this.l("deleterUserId"),
...
...
@@ -194,6 +233,46 @@ export default {
this
.
editModal
=
false
;
this
.
deletedlModal
=
false
;
},
onSelect
(
a
,
b
)
{
console
.
log
(
a
);
//批量选择
let
selectRows
=
a
;
this
.
ids
=
[];
selectRows
.
forEach
(
e
=>
{
this
.
ids
.
push
(
e
.
id
);
});
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
v
=>
{
if
(
v
)
{
this
.
disabled
=
true
;
let
data
=
{
ids
:
this
.
ids
,
isimportant
:
this
.
entity
.
isimportant
,
capabilityValue
:
this
.
entity
.
capabilityValue
};
Api
.
set
(
data
)
.
then
(
r
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
}
else
{
this
.
$Message
.
error
(
"保存失败"
);
}
})
.
catch
(
err
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
});
}
});
},
handleClose
()
{
this
.
footer
=
false
;
this
.
handleSelectAll
(
false
);
},
l
(
key
)
{
let
vkey
=
"plan_resource"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
...
...
@@ -202,4 +281,24 @@ export default {
};
</
script
>
<
style
lang=
"less"
>
.resources-p {
.form-row {
width: 600px;
margin-left: 50px;
margin-top: -45px;
.ivu-form-item-label {
color: #fff !important;
}
}
.ivu-footer-toolbar-right {
width: 1100px;
position: relative !important;
}
.btn {
position: absolute !important;
top: 12px !important;
right: 40px !important;
}
}
</
style
>
\ No newline at end of file
plugins/request/index.js
View file @
a2c243e4
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'
;
...
...
static/Dockerfile
0 → 100644
View file @
a2c243e4
FROM
nginx
WORKDIR
/usr/share/nginx/html
COPY
dist/ .
COPY
nginx.conf /etc/nginx/nginx.conf
RUN
cp
/usr/share/zoneinfo/Asia/Shanghai /etc/localtime
&&
echo
'Asia/Shanghai'
>
/etc/timezone
EXPOSE
3006
ENTRYPOINT
["nginx", "-g","daemon off;"]
static/nginx.conf
0 → 100644
View file @
a2c243e4
user
nginx
;
worker_processes
auto
;
error_log
/var/log/nginx/error.log
;
pid
/run/nginx.pid
;
include
/usr/share/nginx/modules/*.conf
;
events
{
worker_connections
1024
;
}
http
{
log_format
main
'
$remote_addr
-
$remote_user
[
$time_local
]
"
$request
"
'
'
$status
$body_bytes_sent
"
$http_referer
"
'
'"
$http_user_agent
"
"
$http_x_forwarded_for
"'
;
access_log
/var/log/nginx/access.log
main
;
sendfile
on
;
tcp_nopush
on
;
tcp_nodelay
on
;
keepalive_timeout
65
;
types_hash_max_size
2048
;
include
/etc/nginx/mime.types
;
default_type
application/octet-stream
;
include
/etc/nginx/conf.d/*.conf
;
server
{
listen
3006
;
root
/usr/share/nginx/html
;
location
/
{
try_files
$uri
$uri
/
@router
;
index
index.html
index.htm
;
}
location
@router
{
rewrite
^.*
$
.index.html
last
;
}
}
}
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