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
4d2772de
Commit
4d2772de
authored
Jun 17, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'product' of
http://git.mes123.com/zhouyx/mes-ui
into product
parents
18eb33e9
7667d67e
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
595 additions
and
79 deletions
+595
-79
dataGrid.vue
components/page/dataGrid.vue
+10
-2
analysis.vue
pages/dncmnc/mnc/analysis.vue
+73
-5
echart1.vue
pages/dncmnc/mnc/compose/echart1.vue
+126
-0
index.vue
pages/dncmnc/mnc/index.vue
+8
-8
mnc.less
pages/dncmnc/mnc/mnc.less
+35
-0
monitoring.vue
pages/dncmnc/mnc/monitoring.vue
+112
-2
add.vue
pages/materiel/classification/add.vue
+37
-5
edit.vue
pages/materiel/classification/edit.vue
+42
-16
index.vue
pages/materiel/classification/index.vue
+6
-2
add.vue
pages/materiel/masterData/add.vue
+57
-27
api.js
pages/materiel/masterData/api.js
+5
-2
edit.vue
pages/materiel/masterData/edit.vue
+1
-0
index.vue
pages/materiel/masterData/index.vue
+6
-2
masterData.vue
pages/materiel/masterData/masterData.vue
+64
-4
index.vue
pages/produce/execute/datafilling/index.vue
+13
-4
No files found.
components/page/dataGrid.vue
View file @
4d2772de
...
...
@@ -429,7 +429,7 @@ export default {
let
v
=
conditions
[
u
].
value
;
let
op
=
conditions
[
u
].
op
;
if
(
!
this
.
$u
.
isNull
(
v
))
{
if
(
op
==
"Range"
)
{
if
(
op
==
"Range"
&&
Array
.
isArray
(
v
)
)
{
let
times
=
[];
v
.
map
(
u
=>
{
if
(
!
this
.
$u
.
isNull
(
u
))
{
...
...
@@ -437,7 +437,7 @@ export default {
}
});
v
=
times
.
join
(
","
);
}
else
if
(
op
.
indexOf
(
"In"
)
>
-
1
)
{
}
else
if
(
op
.
indexOf
(
"In"
)
>
-
1
&&
Array
.
isArray
(
v
)
)
{
v
=
v
.
join
(
","
);
}
if
(
!
this
.
$u
.
isNull
(
v
))
{
...
...
@@ -544,6 +544,14 @@ export default {
},
height
()
{
this
.
tableHeight
=
this
.
height
;
},
"columns.length"
(){
this
.
columns
.
forEach
(
u
=>
{
if
(
!
u
.
hide
)
{
u
.
hide
=
false
;
}
});
this
.
columnsCur
=
this
.
$u
.
clone
(
this
.
columns
);
}
}
};
...
...
pages/dncmnc/mnc/analysis.vue
View file @
4d2772de
<
template
>
<div>
数据分析表
</div>
<div>
数据分析表
<Echart1
></Echart1>
</div>
</
template
>
<
script
>
import
Echart1
from
'./compose/echart1'
export
default
{
}
components
:
{
Echart1
,
},
data
()
{
return
{
// echarts选项
option
:
{
title
:
{
text
:
'折线图堆叠'
},
tooltip
:
{
trigger
:
'axis'
},
legend
:
{
data
:
[
'在用率'
,
'运行率'
,
'故障率'
,
'停机率'
],
right
:
'50px'
,
},
grid
:
{
left
:
'3%'
,
right
:
'4%'
,
bottom
:
'3%'
,
containLabel
:
true
},
toolbox
:
{
feature
:
{
saveAsImage
:
{}
}
},
xAxis
:
{
type
:
'category'
,
boundaryGap
:
false
,
data
:
[
'1月'
,
'2月'
,
'3月'
,
'4月'
,
'5月'
,
'6月'
,
'7月'
,
'8月'
,
'9月'
,
'10月'
,
'11月'
,
'12月'
]
},
yAxis
:
{
type
:
'value'
},
series
:
[
{
name
:
'在用率'
,
type
:
'line'
,
stack
:
'总量'
,
data
:
[
120
,
132
,
101
,
134
,
90
,
230
,
210
]
},
{
name
:
'运行率'
,
type
:
'line'
,
stack
:
'总量'
,
data
:
[
220
,
182
,
191
,
234
,
290
,
330
,
310
]
},
{
name
:
'故障率'
,
type
:
'line'
,
stack
:
'总量'
,
data
:
[
150
,
232
,
201
,
154
,
190
,
330
,
410
]
},
{
name
:
'停机率'
,
type
:
'line'
,
stack
:
'总量'
,
data
:
[
320
,
332
,
301
,
334
,
390
,
330
,
320
]
},
]
},
};
},
methods
:
{},
};
</
script
>
pages/dncmnc/mnc/compose/echart1.vue
0 → 100644
View file @
4d2772de
<
template
>
<div>
<div
id=
"myChart"
style=
"width:1200px;height:410px;margin:0 auto;top: -40px;"
></div>
</div>
</
template
>
<
script
>
export
default
{
name
:
'Echart1'
,
data
()
{
return
{
disabled
:
false
}
},
methods
:
{
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
loadEchart
()
{
// 基于准备好的dom,初始化echarts实例
var
myChart
=
this
.
$echarts
.
init
(
document
.
getElementById
(
'myChart'
))
var
option
=
{
title
:
{
text
:
'Total: 115 SampleSize: 5 Groups: 23 Max: 0.966 Min: 0.91 Dev: 0.022003 CPK: 1.34 PPK: 1.36 Ca: 0.1 Cp: 1.49 Pp: 1.51'
,
subtext
:
''
,
textStyle
:
{
fontWeight
:
'normal'
,
fontSize
:
'12px'
,
color
:
'#515A6E'
//legend颜色
},
left
:
'center'
,
top
:
'bottom'
},
color
:
{
type
:
'linear'
,
x
:
0
,
y
:
0
,
x2
:
0
,
y2
:
1
,
colorStops
:
[
{
offset
:
0
,
color
:
'#739ADD'
// 0% 处的颜色
},
{
offset
:
1
,
color
:
'#739ADD'
// 100% 处的颜色
}
],
global
:
false
// 缺省为 false
},
tooltip
:
{
trigger
:
'axis'
,
axisPointer
:
{
animation
:
false
}
},
xAxis
:
{
type
:
'category'
,
data
:
[
'2019'
,
'2020'
,
'2021'
,
'2022'
,
'2023'
,
'2024'
,
'2025'
,
'2026'
,
'2027'
,
'2028'
,
'2029'
,
'2030'
]
},
yAxis
:
{
type
:
'value'
,
axisLabel
:
{
formatter
:
'{value} ‰'
}
},
series
:
[
{
data
:
[
1.6
,
2.8
,
3.2
,
1.6
,
0.2
,
4.7
,
1.5
,
4.9
,
2.5
,
5.4
,
6.2
,
1.5
],
type
:
'line'
,
markLine
:
{
data
:
[
{
type
:
'max'
,
label
:
{
formatter
:
'2020目标值 6 ‰'
},
lineStyle
:
{
//警戒线的样式 ,虚实 颜色
type
:
'dashed'
,
color
:
'#0B5813'
,
width
:
2
}
},
{
type
:
'min'
,
label
:
{
formatter
:
'2030目标值 0.2 ‰'
},
lineStyle
:
{
//警戒线的样式 ,虚实 颜色
type
:
'dashed'
,
color
:
'#E99224'
,
width
:
2
}
}
]
}
}
]
}
// 绘制图表
myChart
.
setOption
(
option
)
}
},
mounted
()
{
this
.
loadEchart
()
}
}
</
script
>
pages/dncmnc/mnc/index.vue
View file @
4d2772de
...
...
@@ -124,32 +124,32 @@ export default {
productName
:
"德玛吉235550"
,
statu
:
"空闲"
,
productUrl
:
"shebei.png"
,
MachineType
:
"
机床类型
"
,
MachineCode
:
"
机床编码
"
,
MachineType
:
"
V1-256-16331
"
,
MachineCode
:
"
JCBM-06221
"
,
MachineIp
:
"1231-111-26012"
,
information
:
"V-5633-12112"
,
},{
productName
:
"德玛吉235536"
,
statu
:
"关机"
,
productUrl
:
"shebei.png"
,
MachineType
:
"
机床类型
"
,
MachineCode
:
"
机床编码
"
,
MachineType
:
"
V1-256-16332
"
,
MachineCode
:
"
JCBM-06222
"
,
MachineIp
:
"1231-111-26012"
,
information
:
"V-5633-12112"
,
},{
productName
:
"德玛吉235537"
,
statu
:
"故障"
,
productUrl
:
"shebei.png"
,
MachineType
:
"
机床类型
"
,
MachineCode
:
"
机床编码
"
,
MachineType
:
"
V1-256-16333
"
,
MachineCode
:
"
JCBM-06223
"
,
MachineIp
:
"1231-111-26012"
,
information
:
"V-5633-12112"
,
},{
productName
:
"德玛吉235537"
,
statu
:
"运行中"
,
productUrl
:
"shebei.png"
,
MachineType
:
"
机床类型
"
,
MachineCode
:
"
机床编码
"
,
MachineType
:
"
V1-256-16334
"
,
MachineCode
:
"
JCBM-06224
"
,
MachineIp
:
"1231-111-26012"
,
information
:
"V-5633-12112"
,
},
...
...
pages/dncmnc/mnc/mnc.less
0 → 100644
View file @
4d2772de
.set_card{
padding: 30px 30px 0;
.set_card_box{
border: 1px solid #CACBD0;
border-radius: 4px;
margin: 0 0 30px 0;
.set_top{
text-align: center;
background: #267feb42;
line-height: 38px;
color: #2680EB;
font-weight: bold;
}
.set_card_body{
padding: 10px;
.set_img{
min-width: 150px;
min-height: 120px;
text-align: center;
}
.bao_code{
line-height: 32px;
font-size: 16px;
font-weight: bold;
border-right: 1px solid #ccc;
padding: 30px 0 0 0;
margin: 0 10px 0 0;
}
.set_masage{
min-height: 125px;
}
}
}
}
\ No newline at end of file
pages/dncmnc/mnc/monitoring.vue
View file @
4d2772de
<
style
lang=
"less"
scoped
>
@import "./mnc.less";
</
style
>
<
template
>
<div>
单台设备监控页面
<a
class=
"back_href"
@
click=
"goView"
>
<Icon
type=
"ios-undo-outline"
size=
"24"
/>
返回设备监控
</a>
<div
class=
"set_card"
>
<Row
:gutter=
"30"
>
<Col
span=
"6"
>
<div
class=
"set_card_box"
>
<p
class=
"set_top"
>
设备属性
</p>
<div
class=
"set_card_body"
>
<Row>
<Col
span=
"10"
>
<img
class=
"set_img"
src=
"../image/shebei.png"
alt=
""
/>
</Col>
<Col
span=
"14"
>
<div
class=
"set_masage"
>
<p>
机床名称:德玛吉235537
</p>
<p>
机床类型:V1-256-16334
</p>
<p>
机床编码:JCBM-06224
</p>
<p>
机床IP:1231-111-26012
</p>
<p>
系统信息:V-5633-12112
</p>
</div>
</Col>
</Row>
</div>
</div>
</Col>
<Col
span=
"6"
>
<div
class=
"set_card_box"
>
<p
class=
"set_top"
>
当前任务信息
</p>
<div
class=
"set_card_body"
>
<div
class=
"set_masage"
>
<p>
当前程序号:德玛吉235537
</p>
<p>
零件号:V1-256-16334
</p>
<p>
加工工序号:JCBM-06224
</p>
<p>
当前任务号:RWBH-0617-001
</p>
<p>
工步卡号:GBKH-222-2011
</p>
</div>
</div>
</div>
</Col>
<Col
span=
"12"
>
<div
class=
"set_card_box"
>
<p
class=
"set_top"
>
设备报警信息
</p>
<div
class=
"set_card_body"
>
<Row>
<Col
span=
"5"
>
<div
class=
"set_img bao_code"
>
<p>
报警码
</p>
<p>
13366133
</p>
</div>
</Col>
<Col
span=
"19"
>
<div
class=
"set_masage"
>
<p><b>
报警原因:
</b></p>
<p>
磨损所致。 异常操作所致。 非法改变其功能所致。 超负荷使用。 设计上潜在不良因素。 维护手法欠佳。
设备故障一般是指设备失去或降低其规定功能的事件或现象,表现为设备生产运行异常,
指设备的某些零件失去原有的精度或性能,使设备不能正常运行、技术性能降低,致使设备中断生产或效率
</p>
</div>
</Col>
</Row>
</div>
</div>
</Col>
</Row>
<Row
:gutter=
"30"
>
<Col
span=
"6"
class=
"set_bottom"
>
<div
class=
"set_card_box"
>
<p
class=
"set_top"
>
设备状态
</p>
<div
class=
"set_card_body"
>
<div
class=
"set_img"
>
<img
src=
"../image/guz.png"
alt=
""
>
<p>
故障
</p>
</div>
<div
class=
"set_masage"
>
<p>
当前状态开始时间:
</p>
<p
class=
"time_bg"
>
11:45:05
</p>
<p>
当前状态持续时间:
</p>
<p
class=
"time_bg"
>
11:55:25
</p>
</div>
</div>
</div>
<div
class=
"set_card_box"
>
<p
class=
"set_top"
>
加工状态统计
</p>
<div
class=
"center"
>
图表
</div>
</div>
</Col>
<Col
span=
"18"
>
<div
class=
"set_card_box"
>
<p
class=
"set_top"
>
加工状态实时信息
</p>
<div
class=
"center"
>
图表
</div>
</div>
</Col>
</Row>
</div>
</div>
</
template
>
<
script
>
export
default
{
data
(){
return
{
};
},
methods
:{
goView
(){
//返回设备监控页面 获取id:this.$route.query.id
this
.
$router
.
push
(
"/dncmnc/mnc"
);
},
},
}
</
script
>
\ No newline at end of file
pages/materiel/classification/add.vue
View file @
4d2772de
...
...
@@ -150,16 +150,33 @@ export default {
{
title
:
"属性名称"
,
key
:
"title"
,
align
:
"center"
,
slot
:
"title"
},
{
title
:
"属性类型"
,
key
:
"dataType"
,
align
:
"center"
,
slot
:
"dataType"
,
width
:
150
},
{
title
:
"备注"
,
key
:
"note"
,
<<<<<<<
HEAD
align
:
"center"
,
slot
:
"note"
,
width
:
"150"
=======
slot
:
"note"
>>>>>>>
7667
d67eff74481dc10aa4e1489266881dc30077
},
// {
// title: "是否显示",
// key: "result",
// align: "center",
// slot: "result"
// },
{
title
:
"属性类型"
,
key
:
"dataType"
,
...
...
@@ -175,21 +192,27 @@ export default {
width
:
"150"
},
{
title
:
"
是否
必填"
,
title
:
"必填"
,
key
:
"required"
,
align
:
"center"
,
slot
:
"required"
slot
:
"required"
,
width
:
80
},
{
title
:
"
是否唯一属性
"
,
title
:
"
唯一
"
,
key
:
"isUnique"
,
align
:
"center"
,
slot
:
"isUnique"
slot
:
"isUnique"
,
width
:
80
},
{
title
:
"操作"
,
slot
:
"action"
,
<<<<<<<
HEAD
=======
width
:
80
,
>>>>>>>
7667
d67eff74481dc10aa4e1489266881dc30077
align
:
"center"
}
],
...
...
@@ -228,6 +251,7 @@ export default {
if
(
r
.
result
)
{
var
arr
=
r
.
result
;
this
.
checkList
=
arr
.
filter
(
function
(
item
)
{
item
.
mid
=
item
.
id
;
delete
item
[
"id"
];
//删除属性id
return
item
;
});
...
...
@@ -254,7 +278,15 @@ export default {
this
.
$set
(
this
.
checkList
,
index
,
row
);
},
addNew
()
{
let
maxId
=
0
;
this
.
checkList
.
map
(
u
=>
{
if
(
u
.
mid
>
maxId
){
maxId
=
u
.
mid
;
}
})
let
obj
=
{
mid
:
maxId
+
1
,
field
:
"c"
+
maxId
,
title
:
""
,
note
:
""
,
dataType
:
""
,
...
...
pages/materiel/classification/edit.vue
View file @
4d2772de
<
template
>
<div>
<div
class=
"p10"
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<!--
<Col
:span=
"12"
>
...
...
@@ -115,7 +115,7 @@
<Col
:span=
"24"
style=
"margin-bottom:20px;"
>
<Button
type=
"primary"
long
@
click=
"addNew"
class=
"mt10"
>
添加
</Button>
</Col>
<Col
:span=
"24"
style=
"text-align: right;
"
>
<Col
:span=
"24"
class=
"tr mt10
"
>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
...
...
@@ -148,15 +148,21 @@ export default {
{
title
:
"属性名称"
,
key
:
"title"
,
align
:
"center"
,
slot
:
"title"
},
{
title
:
"属性类型"
,
key
:
"dataType"
,
align
:
"center"
,
slot
:
"dataType"
,
width
:
150
},
{
title
:
"备注"
,
key
:
"note"
,
align
:
"center"
,
slot
:
"note"
},
<<<<<<<
HEAD
{
title
:
"属性类型"
,
key
:
"dataType"
,
...
...
@@ -169,22 +175,33 @@ export default {
align
:
"center"
,
slot
:
"unitName"
},
=======
// {
// title: "是否显示",
// key: "result",
// align: "center",
// slot: "result"
// },
>>>>>>>
7667
d67eff74481dc10aa4e1489266881dc30077
{
title
:
"
是否
必填"
,
title
:
"必填"
,
key
:
"required"
,
align
:
"center"
,
slot
:
"required"
slot
:
"required"
,
width
:
80
},
{
title
:
"
是否唯一属性
"
,
key
:
"is
u
nique"
,
title
:
"
唯一
"
,
key
:
"is
U
nique"
,
align
:
"center"
,
slot
:
"isunique"
slot
:
"isUnique"
,
width
:
80
},
{
title
:
"操作"
,
slot
:
"action"
,
width
:
10
0
,
width
:
8
0
,
align
:
"center"
}
],
...
...
@@ -218,9 +235,12 @@ export default {
fieldValue
:
this
.
nodeInfo
.
id
}
];
Api
.
listTable
({
conditions
:
conditions
}).
then
(
r
=>
{
Api
.
listTable
({
conditions
:
conditions
,
sortBy
:
'id'
,
isDesc
:
false
}).
then
(
r
=>
{
if
(
r
.
result
)
{
console
.
log
(
r
);
r
.
result
.
map
(
u
=>
{
u
.
mid
=
u
.
id
;
})
this
.
checkList
=
r
.
result
;
}
});
...
...
@@ -238,9 +258,16 @@ export default {
setRow
(
row
,
index
)
{
this
.
$set
(
this
.
checkList
,
index
,
row
);
},
addNew
()
{
let
arr
=
this
.
$u
.
clone
(
this
.
checkList
);
addNew
()
{
let
maxId
=
0
;
this
.
checkList
.
map
(
u
=>
{
if
(
u
.
mid
>
maxId
){
maxId
=
u
.
mid
;
}
})
let
obj
=
{
mid
:
maxId
+
1
,
field
:
"c"
+
maxId
,
title
:
""
,
note
:
""
,
dataType
:
""
,
...
...
@@ -249,10 +276,9 @@ export default {
fieldType
:
3
,
categoryId
:
0
,
action
:
1
,
add
:
0
add
:
0
//新增标识
};
arr
.
push
(
obj
);
this
.
checkList
=
arr
;
this
.
checkList
.
push
(
obj
);
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
v
=>
{
...
...
pages/materiel/classification/index.vue
View file @
4d2772de
...
...
@@ -68,7 +68,7 @@
<MasterData
ref=
"dataTable"
@
on-edit=
"editRow"
:root=
"root"
@
on-ok=
"ok"
/>
</Content>
</Layout>
<Modal
v-model=
"modal"
:title=
"title"
width=
"1
0
00"
footer-hide
:mask-closable=
"false"
>
<Modal
v-model=
"modal"
:title=
"title"
width=
"1
2
00"
footer-hide
:mask-closable=
"false"
>
<component
:is=
"detail"
:eid=
"curId"
...
...
@@ -133,10 +133,14 @@ export default {
},
listSlecet
()
{
let
data
=
{
conditions
:
[]
conditions
:
[]
,
sortBy
:
'id'
,
isDesc
:
false
};
Api
.
pagedSlecet
(
data
).
then
(
r
=>
{
this
.
cityList
=
r
.
result
.
items
;
this
.
downName
=
this
.
cityList
[
0
].
name
;
this
.
model8
=
this
.
cityList
[
0
].
id
;
this
.
nodeInfo
.
codeRuleId
=
this
.
cityList
[
0
].
id
;
this
.
loadTree
(
this
.
nodeInfo
.
codeRuleId
);
});
},
...
...
pages/materiel/masterData/add.vue
View file @
4d2772de
...
...
@@ -33,12 +33,34 @@
<Input
v-model=
"entity.description"
type=
"textarea"
placeholder=
"请输入..."
></Input>
</FormItem>
</Col>
</Row>
<div>
<h4>
扩展属性
</h4>
</div>
<Row>
<Col
v-for=
"li in fileds"
:key=
"li.field"
:span=
"li.span"
>
<FormItem
:label=
"li.title"
:prop=
"li.name"
>
<Input
v-if=
"li.dataType==0"
v-model=
"entity[li.field]"
></Input>
<InputNumber
v-if=
"li.dataType==1||li.dataType==2"
v-model=
"entity[li.field]"
class=
"w100"
></InputNumber>
<Dictionary
v-if=
"li.dataType==3"
v-model=
"entity[li.field]"
:code=
"li.note"
></Dictionary>
<Input
v-if=
"li.dataType==4"
v-model=
"entity[li.filed]"
></Input>
<DatePicker
v-if=
"li.dataType==5"
v-model=
"entity[li.field]"
type=
"date"
:placeholder=
"'选择'+li.title"
></DatePicker>
<InputFile
v-if=
"li.dataType==6"
v-model=
"entity[li.field]"
></InputFile>
<!--
<files
ref=
"refFile"
:parms=
"parms"
fileFormat
:Photos=
"true"
@
clickItem=
"clickData"
/>
-->
<InputFile
v-if=
"li.dataType==7"
v-model=
"entity[li.field]"
></InputFile>
<Input
v-if=
"li.dataType==8"
type=
"textarea"
v-model=
"entity[li.field]"
></Input>
</FormItem>
</Col>
<Col
:span=
"24"
>
<div
v-html=
"entity"
></div>
</Col>
<Col
:span=
"24"
style=
"text-align: right;"
>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</Col>
</Col>
</Row>
</Form>
</div>
...
...
@@ -53,6 +75,7 @@ export default {
entity
:
{
code
:
0
,
status
:
0
,
codeRuleId
:
this
.
nodeInfo
.
codeRuleId
,
categoryId
:
this
.
nodeInfo
.
categoryId
,
//左侧树点击的id
customProperties
:
{},
rootCategoryId
:
this
.
nodeInfo
.
rootCategoryId
//左侧树点击的数据的最顶层id
...
...
@@ -61,40 +84,47 @@ export default {
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
}
},
fileds
:[]
//扩展属性
};
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
moun
ted
()
{
// this.tableData
();
crea
ted
()
{
this
.
initFiled
();
},
methods
:
{
// tableData() {
// let conditions = [
// {
// conditionalType: "In",
// fieldName: "fieldType",
// fieldValue: "1,2"
// },
// {
// conditionalType: "Equal",
// fieldName: "categoryId",
// fieldValue: "0"
// }
// ];
initFiled
()
{
let
conditions
=
[
{
conditionalType
:
"Equal"
,
fieldName
:
"categoryId"
,
fieldValue
:
this
.
nodeInfo
.
rootCategoryId
}
];
// Api.listTable({ conditions: conditions }).then(r => {
// if (r.result) {
// var arr = r.result;
// this.checkList = arr.filter(function(item) {
// delete item["id"];
// return item;
// });
// }
// });
// },
Api
.
listTable
({
conditions
:
conditions
,
sortBy
:
'id'
,
isDesc
:
false
}).
then
(
r
=>
{
if
(
r
.
result
)
{
this
.
fileds
=
r
.
result
.
filter
(
function
(
item
)
{
item
.
span
=
12
;
if
(
item
.
dataType
>
4
){
item
.
span
=
24
}
delete
item
[
"id"
];
return
item
.
fieldType
!=
1
;
});
this
.
fileds
.
map
(
u
=>
{
let
v
=
''
;
if
(
u
.
dataType
==
1
||
u
.
dataType
==
2
){
v
=
0
;
}
// this.$set(this.entity.customProperties,u.filed,v)
this
.
$set
(
this
.
entity
,
u
.
filed
,
v
)
})
}
});
},
remove
(
index
,
row
)
{
if
(
row
.
add
==
0
)
{
//新增的删除,直接删
...
...
pages/materiel/masterData/api.js
View file @
4d2772de
...
...
@@ -11,14 +11,17 @@ export default {
list
(
params
){
return
Api
.
post
(
`
${
systemUrl
}
/category/list`
,
params
);
},
listTable
(
params
){
return
Api
.
post
(
`
${
systemUrl
}
/custompropertydefinition/list`
,
params
);
},
get
(
params
){
return
Api
.
get
(
`
${
systemUrl
}
/material/get`
,
params
);
},
create
(
params
){
return
Api
.
post
(
`
${
systemUrl
}
/material/create`
,
params
);
return
Api
.
post
(
`
${
systemUrl
}
/material/create
new
`
,
params
);
},
update
(
params
){
return
Api
.
post
(
`
${
systemUrl
}
/material/update`
,
params
);
return
Api
.
post
(
`
${
systemUrl
}
/material/update
new
`
,
params
);
},
delete
(
id
)
{
return
Api
.
delete
(
`
${
systemUrl
}
/material/delete`
,{
params
:{
id
:
id
}});
...
...
pages/materiel/masterData/edit.vue
View file @
4d2772de
...
...
@@ -53,6 +53,7 @@ export default {
entity
:
{
id
:
this
.
eid
,
code
:
0
,
codeRuleId
:
this
.
nodeInfo
.
codeRuleId
,
categoryId
:
this
.
nodeInfo
.
categoryId
,
//左侧树点击的id
customProperties
:
{},
rootCategoryId
:
this
.
nodeInfo
.
rootCategoryId
//左侧树点击的数据的最顶层id
...
...
pages/materiel/masterData/index.vue
View file @
4d2772de
...
...
@@ -105,12 +105,16 @@ export default {
}
});
},
listSlecet
()
{
listSlecet
()
{
let
data
=
{
conditions
:
[]
conditions
:
[]
,
sortBy
:
'id'
,
isDesc
:
false
};
Api
.
pagedSlecet
(
data
).
then
(
r
=>
{
this
.
cityList
=
r
.
result
.
items
;
this
.
downName
=
this
.
cityList
[
0
].
name
;
this
.
model8
=
this
.
cityList
[
0
].
id
;
this
.
nodeInfo
.
codeRuleId
=
this
.
cityList
[
0
].
id
;
this
.
loadTree
(
this
.
nodeInfo
.
codeRuleId
);
});
},
// chnangeClick(val){
...
...
pages/materiel/masterData/masterData.vue
View file @
4d2772de
<
template
>
<div
class=
"master-data"
>
<DataGrid
:columns=
"col
umn
s"
:columns=
"cols"
ref=
"grid"
:conditions=
"easySearch"
:action=
"action"
...
...
@@ -136,12 +136,25 @@ export default {
key
:
"description"
,
title
:
"描述"
,
align
:
"left"
},
{
key
:
"creationTime"
,
title
:
"创建时间"
,
hide
:
false
,
align
:
"left"
},
{
key
:
"creatorUserId"
,
title
:
"创建人"
,
hide
:
false
,
align
:
"left"
,
type
:
"user"
},
{
title
:
"操作"
,
key
:
"action"
,
width
:
26
0
,
align
:
"
left
"
,
width
:
15
0
,
align
:
"
center
"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
...
...
@@ -171,7 +184,8 @@ export default {
]);
}
}
]
],
//基础咧
cols
:
[]
//
};
},
async
fetch
({
store
,
params
})
{
...
...
@@ -179,6 +193,11 @@ export default {
},
created
()
{
this
.
tableHeight
=
window
.
innerHeight
-
220
;
if
(
this
.
nodeInfo
.
rootCategoryId
==
0
)
{
this
.
cols
=
this
.
columns
;
}
else
{
this
.
initCols
();
}
},
mounted
()
{
window
.
onresize
=
()
=>
{
...
...
@@ -205,6 +224,43 @@ export default {
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
},
initCols
()
{
let
conditions
=
[
{
conditionalType
:
"Equal"
,
fieldName
:
"categoryId"
,
fieldValue
:
this
.
nodeInfo
.
rootCategoryId
}
];
Api
.
listTable
({
conditions
:
conditions
,
sortBy
:
"id"
,
isDesc
:
false
}).
then
(
r
=>
{
if
(
r
.
result
)
{
var
items
=
r
.
result
.
filter
(
u
=>
{
return
!
this
.
columns
.
some
(
p
=>
{
return
p
.
key
==
u
.
field
;
})
&&
u
.
dataType
!=
5
;
});
this
.
cols
=
this
.
$u
.
clone
(
this
.
columns
);
let
extra
=
items
.
map
(
u
=>
{
var
col
=
{
key
:
u
.
field
,
title
:
u
.
title
};
if
(
u
.
dataType
==
3
){
col
.
code
=
u
.
note
;
}
return
col
})
this
.
cols
=
this
.
cols
.
concat
(
extra
);
var
action
=
this
.
cols
.
splice
(
this
.
columns
.
length
-
1
,
1
);
this
.
cols
.
push
(
this
.
columns
[
this
.
columns
.
length
-
1
]);
}
});
},
add
()
{
this
.
curId
=
0
;
this
.
title
=
"新增"
;
...
...
@@ -273,6 +329,10 @@ export default {
watch
:
{
nodeInfo
:
{
handler
(
newName
,
oldName
)
{
console
.
log
(
"ovo"
,
newName
,
oldName
)
if
(
newName
.
rootCategoryId
){
this
.
initCols
();
}
if
(
newName
.
categoryId
)
{
this
.
easySearch
.
categoryId
.
value
=
newName
.
ids
;
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
...
...
pages/produce/execute/datafilling/index.vue
View file @
4d2772de
...
...
@@ -262,9 +262,17 @@ export default {
},
columns12
:
[
{
title
:
"序号"
,
type
:
"index"
,
width
:
"70"
,
align
:
"center"
},
{
title
:
"参数名称"
,
key
:
"check_params"
},
{
title
:
"检验类型"
,
key
:
"check_type"
},
{
title
:
"汇报类型"
,
key
:
"fillintype"
},
{
title
:
"参数名称"
,
key
:
"check_params"
,
tooltip
:
true
},
{
title
:
"检验类型"
,
key
:
"inspect_type"
,
render
(
h
,
params
)
{
return
h
(
"state"
,{
props
:{
code
:
"QC.checktype"
,
value
:
params
.
row
.
inspect_type
}
})
},},
{
title
:
"汇报类型"
,
key
:
"fillintype_str"
,
width
:
100
},
{
title
:
"标准指标"
,
key
:
"standard"
},
{
title
:
"生产要求"
,
key
:
"production_requirement"
,
tooltip
:
true
},
{
title
:
"检测内容"
,
key
:
"check_content"
,
tooltip
:
true
},
...
...
@@ -340,11 +348,13 @@ export default {
{
title
:
"是否拍照"
,
key
:
"isPhotograph"
,
width
:
100
,
slot
:
"isPhotograph"
},
{
title
:
"模板"
,
key
:
"qualityTemplate"
,
width
:
80
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
...
...
@@ -659,7 +669,6 @@ export default {
this
.
$refs
.
usercard
.
loadentry
(
this
.
entryModel
,
fillModel
,
recordList
);
},
selfchecklistcheck
(
index
,
e
)
{
alert
(
e
);
this
.
recorddata
[
index
].
selfchecklist
.
checkstatus
=
e
;
this
.
recorddata
[
index
].
selfchecklist
.
fill_in_content
=
e
?
"1"
:
"0"
;
},
...
...
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