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
b9fefa69
Commit
b9fefa69
authored
Nov 12, 2020
by
luo ying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目模板页面及对应链接
parent
7e97534c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
411 additions
and
243 deletions
+411
-243
zh-CN.js
i18n/locale/zh-CN.js
+20
-12
importTemplate.vue
pages/project/plan/importTemplate.vue
+62
-29
detail.vue
pages/project/resources/templates/detail.vue
+128
-7
index.vue
pages/project/resources/templates/index.vue
+4
-1
jcTreeGrid.vue
pages/test/example/components/jcTreeGrid.vue
+1
-1
index.js
store/index.js
+196
-193
No files found.
i18n/locale/zh-CN.js
View file @
b9fefa69
...
...
@@ -946,7 +946,7 @@ export default {
taskCode
:
'甲方任务号'
,
putintDocmentCode
:
'甲方投产输入文件(编号)'
,
technologyDocmentCode
:
'甲方技术输入文件(编号)'
,
productionType
:
'生产类型'
productionType
:
'生产类型'
},
mes_part_task_plan_simulate
:
{
id
:
''
,
...
...
@@ -1137,8 +1137,8 @@ export default {
multipleEquip
:
"是否多台安排设备"
,
// 否 是
multipleEquipIds
:
"设备id"
,
//用英文逗号分隔
discrete
:
'离散值'
,
routingHeaderCode
:
'工艺编号'
,
routingHeaderName
:
'工艺名称'
,
routingHeaderCode
:
'工艺编号'
,
routingHeaderName
:
'工艺名称'
,
},
routing_header
:
{
id
:
''
,
...
...
@@ -1489,9 +1489,9 @@ export default {
endTime
:
'结束时间'
,
planEndTime
:
'计划结束时间'
,
action
:
'操作'
,
subWorkHourStatus
:
'工时状态'
,
routingHeaderCode
:
'工艺编号'
,
routingHeaderName
:
'工艺名称'
subWorkHourStatus
:
'工时状态'
,
routingHeaderCode
:
'工艺编号'
,
routingHeaderName
:
'工艺名称'
},
product_level
:
{
name
:
'名称'
,
...
...
@@ -1922,10 +1922,9 @@ export default {
whour
:
'可用工日'
,
whourpd
:
'可用工时/天'
,
joindate
:
'加入日期'
}
,
//文档分类
document_category
:
{
},
//文档分类
document_category
:
{
creationTime
:
'创建时间'
,
creatorUserId
:
'创建人'
,
lastModificationTime
:
'更新时间'
,
...
...
@@ -2017,8 +2016,8 @@ document_category: {
deletionTime
:
'删除时间'
,
deleterUserId
:
'删除人'
,
projectId
:
'项目id'
,
direction
:
"方向"
,
deliverable
:
"交付物"
,
direction
:
"方向"
,
deliverable
:
"交付物"
,
upId
:
'父级'
,
title
:
'标题'
,
status
:
'状态'
,
...
...
@@ -2159,6 +2158,15 @@ document_category: {
template
:
'模板'
,
attachment
:
'附件'
,
type
:
'模版类型'
,
direction
:
'方向'
,
projectId
:
'项目id'
,
upId
:
'父级'
,
status
:
'状态'
,
startDate
:
'开始日期'
,
endDate
:
'结束日期'
,
executor
:
'执行人'
,
deliverable
:
'交付物'
},
workHour
:
{
userTitle
:
'员工姓名'
,
...
...
pages/project/plan/importTemplate.vue
View file @
b9fefa69
<
template
>
<div>
<EditGrid
:columns=
"columns"
ref=
"grid"
:items=
"list"
>
</EditGrid>
<EditGrid
:columns=
"columns"
ref=
"grid"
:items=
"list"
>
</EditGrid>
<Modal
v-model=
"modal"
:title=
"title"
width=
"1200"
footer-hide
fullscreen
>
<component
:is=
"detail"
:eid=
"curId"
:v=
"row"
/>
</Modal>
</div>
</
template
>
<
script
>
...
...
@@ -16,8 +22,12 @@ export default {
},
data
()
{
return
{
title
:
''
,
modal
:
false
,
curId
:
0
,
list
:[],
row
:
null
,
list
:
[],
detail
:
null
,
columns
:
[
{
key
:
"id"
,
...
...
@@ -32,7 +42,24 @@ export default {
align
:
"left"
,
easy
:
true
,
high
:
true
,
render
:
(
h
,
params
)
=>
{
return
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
},
on
:
{
click
:
()
=>
this
.
view
(
params
.
row
)
},
},
params
.
row
.
title
);
},
},
// {
// key: "title",
// title: this.l("title"),
// align: "left",
// easy: true,
// high: true,
// },
{
key
:
"note"
,
title
:
this
.
l
(
"note"
),
...
...
@@ -69,19 +96,19 @@ export default {
h
(
"op"
,
{
attrs
:
{
oprate
:
"remove"
,
msg
:
"确定要导入模版吗?"
},
attrs
:
{
oprate
:
"remove"
,
msg
:
"确定要导入模版吗?"
},
on
:
{
click
:
()
=>
this
.
useTemplate
(
params
.
row
.
id
)
},
},
"导入"
),
// h(
// "op",
// {
// attrs: { oprate: "delete" },
// on: { click: () => this.remove(params.row.id) },
// },
// "删除"
// ),
// h(
// "op",
// {
// attrs: { oprate: "delete" },
// on: { click: () => this.remove(params.row.id) },
// },
// "删除"
// ),
]);
},
},
...
...
@@ -91,7 +118,7 @@ export default {
mounted
()
{
this
.
load
();
},
props
:
{
props
:
{
v
:
Object
,
eid
:
String
,
},
...
...
@@ -105,24 +132,30 @@ export default {
this
.
curId
=
""
;
},
load
()
{
Api
.
templates
({
}).
then
(
r
=>
{
this
.
list
=
r
.
result
;
})
Api
.
templates
({}).
then
((
r
)
=>
{
this
.
list
=
r
.
result
;
});
},
useTemplate
(
id
)
{
Api
.
useTemplate
({
id
:
id
,
projectId
:
this
.
eid
}).
then
(
r
=>
{
if
(
r
.
success
){
this
.
$Message
.
success
(
"导入成功"
);
this
.
$emit
(
"on-load"
)
}
})
Api
.
useTemplate
({
id
:
id
,
projectId
:
this
.
eid
,
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"导入成功"
);
this
.
$emit
(
"on-load"
);
}
});
},
view
(
row
)
{
console
.
log
(
"111"
);
console
.
log
(
row
);
this
.
title
=
"查看"
;
this
.
modal
=
true
;
this
.
row
=
row
;
this
.
curId
=
row
.
id
;
this
.
detail
=
()
=>
import
(
"../resources/templates/detail.vue"
);
},
l
(
key
)
{
let
vkey
=
"project_template"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
...
...
pages/project/resources/templates/detail.vue
View file @
b9fefa69
...
...
@@ -19,13 +19,21 @@
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('deleterUserId')"
>
{{
entity
.
deleterUserId
}}
</Filed>
-->
<Filed
:span=
"12"
:name=
"l('title')"
>
{{
entity
.
title
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('template')"
>
{{
entity
.
template
}}
</Filed>
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('template')"
>
{{
entity
.
template
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('attachment')"
>
{{
entity
.
attachment
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('type')"
>
{{
entity
.
type
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('type')"
>
{{
entity
.
type
}}
</Filed>
-->
<Filed
:span=
"8"
:name=
"l('title')"
>
{{
entity
.
title
}}
</Filed>
<Filed
:span=
"8"
:name=
"l('creationTime')"
>
{{
entity
.
creationTime
}}
</Filed>
<Filed
:span=
"8"
:name=
"l('creatorUserId')"
>
{{
entity
.
creatorUserId
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('note')"
>
{{
entity
.
note
}}
</Filed>
</Row>
<EditGrid
:columns=
"columns"
ref=
"grid"
:items=
"list"
:level=
"8"
>
</EditGrid>
</div>
</
template
>
<
script
>
...
...
@@ -39,20 +47,130 @@ export default {
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
},
exportTl
:
"项目目录"
,
list
:
[],
columns
:
[
{
key
:
"upId"
,
width
:
50
,
type
:
"selection"
,
align
:
"center"
,
},
{
key
:
"title"
,
title
:
this
.
l
(
"title"
),
align
:
"left"
,
tree
:
true
,
easy
:
true
,
high
:
true
,
export
:
true
,
},
{
key
:
"type"
,
width
:
90
,
title
:
this
.
l
(
"type"
),
align
:
"center"
,
high
:
true
,
code
:
"mes.project_plan.Type"
,
attr
:
{
type
:
"icon"
,
},
export
:
true
,
},
{
key
:
"direction"
,
title
:
this
.
l
(
"direction"
),
align
:
"center"
,
// code: "mes.project_plan.direction",
width
:
80
,
easy
:
true
,
high
:
true
,
export
:
true
,
},
{
key
:
"status"
,
title
:
this
.
l
(
"status"
),
align
:
"center"
,
width
:
80
,
high
:
true
,
// code: "mes.project_plan.Status",
export
:
true
,
},
{
key
:
"startDate"
,
title
:
"计划开始日期"
,
hide
:
true
,
export
:
true
,
},
{
key
:
"endDate"
,
title
:
"计划结束日期"
,
hide
:
true
,
export
:
true
,
},
{
key
:
"dateRange"
,
width
:
250
,
title
:
"计划日期"
,
align
:
"center"
,
render
(
h
,
param
)
{
return
h
(
"DateRange"
,
{
attrs
:
{
value
:
param
.
row
,
},
});
},
},
{
key
:
"executor"
,
title
:
this
.
l
(
"executor"
),
align
:
"left"
,
high
:
true
,
type
:
"users"
,
export
:
true
,
},
{
key
:
"deliverable"
,
title
:
this
.
l
(
"deliverable"
),
// code: "mes.project_plan.deliverable",
width
:
80
,
align
:
"center"
,
easy
:
true
,
high
:
true
,
export
:
true
,
},
],
};
},
props
:
{
eid
:
String
,
},
mounted
()
{
if
(
this
.
eid
)
{
if
(
this
.
eid
)
{
this
.
load
(
this
.
eid
);
}
},
async
fetch
({
store
,
params
})
{
// await store.dispatch("loadDictionary"); // 加载数据字典
},
methods
:
{
load
(
v
)
{
console
.
log
(
this
.
$store
.
state
.
dictionary
)
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
;
console
.
log
(
JSON
.
parse
(
this
.
entity
.
template
));
var
data
=
this
.
$u
.
toTree
(
JSON
.
parse
(
this
.
entity
.
template
),
null
,
(
u
)
=>
{
// console.log(u);
// u.expanded = true;
// u.selected = false;
// u.checked = false;
},
"upId"
);
this
.
list
=
data
;
this
.
$emit
(
"on-load"
);
});
},
...
...
@@ -66,7 +184,7 @@ export default {
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
""
)
{
if
(
v
!=
""
)
{
this
.
load
(
v
);
}
},
...
...
@@ -74,7 +192,10 @@ export default {
};
</
script
>
<
style
lang=
"less"
scoped
>
.detail{
.detail
{
width: 100%;
}
.detail .ivu-row{
height: auto;
}
</
style
>
style>
\ No newline at end of file
pages/project/resources/templates/index.vue
View file @
b9fefa69
...
...
@@ -21,7 +21,7 @@
<Button
type=
"primary"
@
click=
"add"
>
新增
</Button>
</
template
>
</DataGrid>
<Modal
v-model=
"modal"
:title=
"title"
width=
"1200"
footer-hide
>
<Modal
v-model=
"modal"
:title=
"title"
width=
"1200"
footer-hide
:fullscreen=
'fullscreen'
>
<component
:is=
"detail"
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
</Modal>
</div>
...
...
@@ -41,6 +41,7 @@ export default {
},
data
()
{
return
{
fullscreen
:
false
,
action
:
Api
.
index
,
easySearch
:
{
keys
:
{
op
:
"title"
,
value
:
null
},
...
...
@@ -180,6 +181,7 @@ export default {
},
mounted
()
{
console
.
log
(
this
);
console
.
log
(
"dictionary"
,
this
.
$store
.
state
.
dictionary
)
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
...
...
@@ -206,6 +208,7 @@ export default {
this
.
modal
=
true
;
},
view
(
id
)
{
this
.
fullscreen
=
true
;
this
.
curId
=
id
;
this
.
title
=
"详情"
;
this
.
detail
=
()
=>
import
(
"./detail"
);
...
...
pages/test/example/components/jcTreeGrid.vue
View file @
b9fefa69
...
...
@@ -5,7 +5,7 @@
<div
class=
"example_split"
></div>
<div
class=
"example-code"
:style=
"styleH"
>
<div
:style=
'opacity'
>
<pre><code
class=
"hljs"
><span
class=
"hljs-tag"
><
<
span
class=
"hljs-title"
>
template
</span>
>
</span>
<pre><code
class=
"hljs"
><span
class=
"hljs-tag"
><span
class=
"hljs-title"
>
template
</span>
>
</span>
<span
class=
"hljs-tag"
><<span
class=
"hljs-title"
>
Table
</span>
<span
class=
"hljs-attribute"
>
:columns
</span>
=
<span
class=
"hljs-value"
>
"columns1"
</span>
<span
class=
"hljs-attribute"
>
:data
</span>
=
<span
class=
"hljs-value"
>
"data1"
</span>
>
</span><span
class=
"hljs-tag"
></<span
class=
"hljs-title"
>
Table
</span>
>
</span>
<span
class=
"hljs-tag"
></<span
class=
"hljs-title"
>
template
</span>
>
</span>
<span
class=
"hljs-tag"
><<span
class=
"hljs-title"
>
script
</span>
>
</span><span
class=
"javascript"
>
...
...
store/index.js
View file @
b9fefa69
This diff is collapsed.
Click to expand it.
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