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
8c0f4574
Commit
8c0f4574
authored
Jul 29, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'product' of
http://git.mes123.com/zhouyx/mes-ui
into product
parents
f7f10fe3
7a5b4b1f
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
154 additions
and
102 deletions
+154
-102
dataGrid.vue
components/page/dataGrid.vue
+12
-0
workShopName.vue
components/page/workShopName.vue
+52
-0
index.vue
pages/crm/statistical/index.vue
+1
-1
index.vue
pages/mesPlan/index.vue
+5
-2
add.vue
pages/technology/details/add.vue
+56
-11
index.vue
pages/technology/details/index.vue
+1
-84
iview.js
plugins/iview.js
+2
-0
index.js
store/index.js
+25
-4
No files found.
components/page/dataGrid.vue
View file @
8c0f4574
...
...
@@ -528,6 +528,18 @@ export default {
});
}
};
}
if
(
u
.
type
==
"workShopName"
)
{
u
.
render
=
(
h
,
params
)
=>
{
let
values
=
u
.
key
;
if
(
params
.
row
[
values
])
{
return
h
(
"WorkShopName"
,
{
props
:
{
value
:
params
.
row
[
values
]
}
});
}
};
}
if
(
u
.
type
==
"date"
||
u
.
type
==
"dateTime"
)
{
u
.
render
=
(
h
,
params
)
=>
{
...
...
components/page/workShopName.vue
0 → 100644
View file @
8c0f4574
<
template
>
<div>
<label>
{{
workShop
.
name
}}
</label>
</div>
</
template
>
<
script
>
export
default
{
name
:
"workShopName"
,
props
:
{
value
:
{
type
:
[
Number
,
String
],
default
:
0
,
},
},
data
()
{
return
{
data
:
[],
workShop
:
{},
};
},
mounted
()
{
this
.
load
();
},
methods
:
{
load
()
{
if
(
this
.
value
)
{
var
depart
=
this
.
$store
.
getters
.
getDepartment
(
this
.
value
);
if
(
depart
)
{
this
.
workShop
=
depart
;
}
}
},
},
watch
:
{
value
(
v
)
{
if
(
v
>
0
)
this
.
load
();
},
},
};
</
script
>
<
style
lang=
"less"
>
.s2 {
color: red;
}
.s1 {
color: #333;
}
.s0 {
color: #ddd;
}
</
style
>
\ No newline at end of file
pages/crm/statistical/index.vue
View file @
8c0f4574
...
...
@@ -131,7 +131,7 @@ export default {
]
}
Api
.
getpaged
(
parme
).
then
((
res
)
=>
{
console
.
log
(
res
)
//
console.log(res)
})
},
openview
(
rowData
){
...
...
pages/mesPlan/index.vue
View file @
8c0f4574
...
...
@@ -275,7 +275,8 @@ export default {
title
:
this
.
l
(
"productingPreparationPeople"
),
align
:
"left"
,
high
:
true
,
hide
:
true
hide
:
true
,
type
:
'workShopName'
},
{
key
:
"productingPreparationFinishDate"
,
...
...
@@ -289,7 +290,8 @@ export default {
title
:
this
.
l
(
"quotationPeople"
),
align
:
"left"
,
high
:
true
,
hide
:
true
hide
:
true
,
type
:
"user"
},
{
key
:
"quotationFinishDate"
,
...
...
@@ -530,6 +532,7 @@ export default {
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
await
store
.
dispatch
(
'loadDepartments'
);
//加载部门
},
computed
:
{
searchList
()
{
...
...
pages/technology/details/add.vue
View file @
8c0f4574
...
...
@@ -196,18 +196,34 @@ export default {
realWorkingHours
:
0
,
realRuntime
:
0
,
isParticipateIntime
:
null
,
equipType
:
""
equipType
:
""
,
},
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
}
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
equipTypeId
:
[
{
required
:
true
,
message
:
"请选择任务类型"
,
trigger
:
"change"
,
type
:
"number"
,
},
],
resourceType
:
[
{
required
:
true
,
message
:
"请选择任务类型"
,
trigger
:
"change"
,
type
:
"number"
,
},
],
},
};
},
props
:
{
v
:
Object
,
eid
:
Number
,
headid
:
Number
,
maxNum
:
Number
maxNum
:
Number
,
},
mounted
()
{
if
(
this
.
eid
>
0
)
{
...
...
@@ -216,13 +232,13 @@ export default {
},
methods
:
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
v
=>
{
this
.
$refs
.
form
.
validate
(
(
v
)
=>
{
if
(
v
)
{
this
.
disabled
=
true
;
this
.
entity
.
routingHeaderId
=
this
.
headid
;
this
.
entity
.
taskSeq
=
this
.
maxNum
;
Api
.
create
(
this
.
entity
)
.
then
(
r
=>
{
.
then
(
(
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
...
...
@@ -231,7 +247,7 @@ export default {
this
.
$Message
.
error
(
"保存失败"
);
}
})
.
catch
(
err
=>
{
.
catch
(
(
err
)
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
...
...
@@ -239,11 +255,14 @@ export default {
}
});
},
clearEquip
()
{
alert
(
"dfr"
);
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
Api
.
get
({
id
:
v
}).
then
(
(
r
)
=>
{
this
.
entity
=
r
.
result
;
this
.
entity
.
id
=
0
;
});
...
...
@@ -275,12 +294,38 @@ export default {
equipChange
(
v
,
items
)
{
this
.
entity
.
equipType
=
items
.
equip_name
;
this
.
entity
.
equipTypeId
=
items
.
id
;
if
(
v
!=
null
)
{
this
.
rules
.
equipTypeId
[
0
].
required
=
true
;
this
.
rules
.
resourceType
[
0
].
required
=
false
;
}
else
{
if
(
this
.
entity
.
resourceId
!=
null
&&
this
.
entity
.
resourceId
>
0
)
{
this
.
rules
.
equipTypeId
[
0
].
required
=
false
;
this
.
rules
.
resourceType
[
0
].
required
=
true
;
}
else
{
this
.
rules
.
equipTypeId
[
0
].
required
=
true
;
this
.
rules
.
resourceType
[
0
].
required
=
true
;
}
}
},
resourceChange
(
v
,
items
)
{
this
.
entity
.
resourceId
=
v
[
1
];
this
.
entity
.
resourceType
=
v
[
0
];
this
.
entity
.
resourceCode
=
items
[
1
].
__label
;
}
if
(
v
!=
null
)
{
this
.
rules
.
equipTypeId
[
0
].
required
=
false
;
this
.
rules
.
resourceType
[
0
].
required
=
true
;
}
else
{
if
(
this
.
entity
.
equipTypeId
!=
null
&&
this
.
entity
.
equipTypeId
>
0
)
{
this
.
rules
.
equipTypeId
[
0
].
required
=
true
;
this
.
rules
.
resourceType
[
0
].
required
=
false
;
}
else
{
this
.
rules
.
equipTypeId
[
0
].
required
=
true
;
this
.
rules
.
resourceType
[
0
].
required
=
true
;
}
}
},
},
watch
:
{
v
()
{
...
...
@@ -290,8 +335,8 @@ export default {
if
(
v
>
0
)
{
this
.
load
(
v
);
}
}
}
}
,
}
,
};
</
script
>
<
style
type=
"less"
>
...
...
pages/technology/details/index.vue
View file @
8c0f4574
...
...
@@ -166,90 +166,7 @@ export default {
align
:
"right"
,
hide
:
true
},
// {
// key: "resourceId",
// title: this.l("resourceId"),
// align: "left"
// },
// {
// key: "setupTime",
// title: this.l("setupTime"),
// align: "left"
// },
// {
// key: "transportTime",
// title: this.l("transportTime"),
// align: "left"
// },
// {
// key: "checkTime",
// title: this.l("checkTime"),
// align: "left"
// },
// {
// key: "checkFlag",
// title: this.l("checkFlag"),
// align: "left",
// code: "Process.routing_detail.check_flag"
// },
// {
// key: "departmentId",
// title: this.l("departmentId"),
// align: "left"
// },
// {
// key: "milestoneId",
// title: this.l("milestoneId"),
// align: "left"
// },
// { key: "phaseId", title: this.l("phaseId"), align: "left", high: true },
// {
// key: "status",
// title: this.l("status"),
// align: "left",
// code: "Process.Status"
// },
// {
// key: "performanceHours",
// title: this.l("performanceHours"),
// align: "left"
// },
// {
// key: "resourceCode",
// title: this.l("resourceCode"),
// align: "left",
// easy: true
// },
// {
// key: "realWorkingHours",
// title: this.l("realWorkingHours"),
// align: "left"
// },
// {
// key: "performanceWorkingHours",
// title: this.l("performanceWorkingHours"),
// align: "left"
// },
// {
// key: "equipTypeId",
// title: this.l("equipTypeId"),
// align: "left"
// },
// {
// key: "note",
// title: this.l("note"),
// align: "left",
// easy: true
// },
{
key
:
"creationTime"
,
title
:
this
.
l
(
"creationTime"
),
...
...
plugins/iview.js
View file @
8c0f4574
...
...
@@ -29,6 +29,7 @@ import RoleSelect from '@/components/page/roleSelect.vue'
import
UserExamSelect
from
'@/components/page/userExamSelect.vue'
import
DepartmentSelect
from
'@/components/page/departmentSelect.vue'
import
WorkShopSelect
from
'@/components/page/workShopSelect.vue'
import
WorkShopName
from
'@/components/page/workShopName.vue'
import
workShopDefault
from
'@/components/page/workShopDefault.vue'
import
WorkShop
from
'@/components/page/workShop.vue'
import
EquipSelect
from
'@/components/page/equipSelect.vue'
...
...
@@ -105,6 +106,7 @@ Vue.component("Materiel", Materiel)
Vue
.
component
(
"RoleSelect"
,
RoleSelect
)
Vue
.
component
(
"UserExamSelect"
,
UserExamSelect
)
Vue
.
component
(
"WorkShopSelect"
,
WorkShopSelect
)
Vue
.
component
(
"WorkShopName"
,
WorkShopName
)
Vue
.
component
(
"workShopDefault"
,
workShopDefault
)
Vue
.
component
(
"WorkShop"
,
WorkShop
)
Vue
.
component
(
"EquipSelect"
,
EquipSelect
)
...
...
store/index.js
View file @
8c0f4574
...
...
@@ -4,10 +4,12 @@ export const state = () => ({
counter
:
0
,
dictionary
:
new
Map
(),
//所有字典项
userMap
:
new
Map
(),
//所有用户缓存;
departmentsMap
:
new
Map
(),
//部门缓存;
userInfo
:
{
userId
:
0
,
userName
:
""
},
departments
:{},
//部门列表
cart
:
[],
count
:
0
,
countAps
:
0
,
//aps排产
...
...
@@ -41,7 +43,13 @@ export const getters = {
if
(
state
.
userMap
&&
state
.
userMap
.
get
)
{
return
state
.
userMap
.
get
(
key
);
}
}
},
getDepartment
:
(
state
)
=>
(
key
)
=>
{
let
items
=
state
.
departmentsMap
.
get
(
key
);
if
(
items
)
{
return
items
;
}
},
}
export
const
mutations
=
{
increment
(
state
)
{
...
...
@@ -78,6 +86,10 @@ export const mutations = {
},
setCountRun
(
state
,
count
)
{
//设置流水排产数量
state
.
countRun
=
count
;
},
setDepartments
(
state
,
departmentsMap
)
{
state
.
departmentsMap
=
departmentsMap
;
}
}
...
...
@@ -113,7 +125,6 @@ export const actions = {
let
{
result
}
=
await
Api
.
get
(
url
);
var
map
=
new
Map
();
for
(
const
key
in
result
)
{
...
...
@@ -128,8 +139,18 @@ export const actions = {
r
.
result
.
map
(
u
=>
{
umap
.
set
(
u
.
id
,
u
);
});
commit
(
"setUsers"
,
umap
)
}
commit
(
"setUsers"
,
umap
);
},
async
loadDepartments
({
commit
})
{
let
rdep
=
await
Api
.
get
(
`
${
systemUrl
}
/department/getplantdepartments`
);
var
mapDep
=
new
Map
();
rdep
.
result
.
items
.
map
(
u
=>
{
mapDep
.
set
(
u
.
id
,
u
);
});
commit
(
"setDepartments"
,
mapDep
);
},
}
export
const
plugins
=
[
...
...
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