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
83d0eae1
Commit
83d0eae1
authored
Oct 19, 2020
by
周远喜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加页面,null处理
parent
4a7599b0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
149 additions
and
38 deletions
+149
-38
actions.vue
components/page/actions.vue
+93
-0
index.vue
pages/project/plan/index.vue
+45
-29
add.vue
pages/technology/details/add.vue
+4
-4
add.vue
pages/technology/details/routingqccard/add.vue
+5
-5
iview.js
plugins/iview.js
+2
-0
No files found.
components/page/actions.vue
0 → 100644
View file @
83d0eae1
<
template
>
<ul
class=
"actions"
>
<li
class=
"item"
v-for=
"(li, i) in items"
@
click=
"detail(li)"
>
<span
v-if=
"mode == 'text'"
class=
"text"
v-text=
"li.label"
></span>
<Tooltip
v-if=
"mode == 'icon'"
:content=
"li.label"
><Icon
:type=
"li.icon"
/></Tooltip>
<div
v-else
class=
"ib"
>
<Icon
type=
"li.icon"
/>
<span
class=
"text"
v-text=
"li.label"
></span>
</div>
</li>
</ul>
</
template
>
<
script
>
export
default
{
name
:
"actions"
,
data
()
{
return
{};
},
props
:
{
row
:
{
type
:
Object
,
},
items
:
{
type
:
Array
,
default
:
()
=>
{
return
[
{
label
:
"复制"
,
icon
:
"md-copy"
,
vclick
:
""
},
{
label
:
"新增"
,
icon
:
"md-add"
,
vclick
:
""
},
{
label
:
"删除"
,
icon
:
"md-trash"
,
vclick
:
""
},
{
label
:
"移动"
,
icon
:
"md-move"
,
vclick
:
""
},
{
label
:
"派发"
,
icon
:
"ios-alarm"
,
vclick
:
""
},
];
},
},
mode
:
{
// 显示类型
type
:
String
,
validator
:
(
value
)
=>
{
// 这个值必须匹配下列字符串中的一个
return
[
"icon"
,
"text"
,
"icon-text"
].
indexOf
(
value
)
!==
-
1
;
},
default
:
"icon"
,
},
disabled
:
{
type
:
Boolean
,
default
:
true
,
},
max
:
{
type
:
Number
,
default
:
3
,
},
},
methods
:
{
detail
(
li
)
{
if
(
li
.
confirm
)
{
var
msg
=
li
.
confirm
;
if
(
li
.
confirm
===
true
)
{
msg
=
`确定要
${
li
.
label
}
吗?`
;
}
this
.
$Modal
.
confirm
({
title
:
"操作确认"
,
content
:
msg
,
onOk
:
()
=>
{
this
.
$emit
(
"on-click"
,
this
.
row
,
li
);
},
});
}
else
{
this
.
$emit
(
"on-click"
,
this
.
row
,
li
);
}
},
},
};
</
script
>
<
style
lang=
"less"
>
.actions {
ul {
li {
float: left;
list-style: none;
width: 20px;
height: 20px;
text-align: center;
margin-left: 5px;
color: red;
}
}
}
</
style
>
\ No newline at end of file
pages/project/plan/index.vue
View file @
83d0eae1
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
<Icon
type=
"ios-arrow-down"
/>
<Icon
type=
"ios-arrow-down"
/>
</p>
</p>
项目信息
项目信息
<Actions/>
</Card>
</Card>
<Card>
<Card>
<TreeGrid
:columns=
"columns"
ref=
"grid"
:items=
"list"
<TreeGrid
:columns=
"columns"
ref=
"grid"
:items=
"list"
...
@@ -78,35 +79,47 @@ export default {
...
@@ -78,35 +79,47 @@ export default {
key
:
"action"
,
key
:
"action"
,
width
:
150
,
width
:
150
,
align
:
"center"
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
// render:(h,params)=>{
return
h
(
"div"
,
{
class
:
"action"
},
[
// return h("Actions"
h
(
// ,{
"op"
,
// attrs:{
{
// row:params,
attrs
:
{
oprate
:
"detail"
},
// },
on
:
{
click
:
()
=>
this
.
view
(
params
.
row
.
id
)
},
// on:{
},
// 'on-click':()=>this.rowclick
"查看"
// }
),
// }
//h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
// )
h
(
// }
"op"
,
// render: (h, params) => {
{
// return h("div", { class: "action" }, [
attrs
:
{
oprate
:
"edit"
},
// h(
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
},
// "op",
},
// {
"编辑"
// attrs: { oprate: "detail" },
),
// on: { click: () => this.view(params.row.id) },
h
(
// },
"op"
,
// "查看"
{
// ),
attrs
:
{
oprate
:
"delete"
},
// //h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
},
// h(
},
// "op",
"删除"
// {
),
// attrs: { oprate: "edit" },
]);
// on: { click: () => this.edit(params.row.id) },
},
// },
// "编辑"
// ),
// h(
// "op",
// {
// attrs: { oprate: "delete" },
// on: { click: () => this.remove(params.row.id) },
// },
// "删除"
// ),
// ]);
// },
},
},
{
{
key
:
"type"
,
key
:
"type"
,
...
@@ -175,6 +188,9 @@ export default {
...
@@ -175,6 +188,9 @@ export default {
this
.
list
=
r
.
result
;
this
.
list
=
r
.
result
;
})
})
},
},
rowclick
(
row
,
li
){
console
.
warn
(
"rowclick"
,
row
,
li
);
},
add
()
{
add
()
{
this
.
curId
=
0
;
this
.
curId
=
0
;
this
.
title
=
"新增"
;
this
.
title
=
"新增"
;
...
...
pages/technology/details/add.vue
View file @
83d0eae1
...
@@ -187,14 +187,14 @@ export default {
...
@@ -187,14 +187,14 @@ export default {
runtime
:
0
,
runtime
:
0
,
efficiencyValue
:
1
,
efficiencyValue
:
1
,
singleOut
:
1
,
singleOut
:
1
,
isOutside
:
null
,
isOutside
:
0
,
isImportant
:
null
,
isImportant
:
0
,
outsideTime
:
0
,
outsideTime
:
0
,
isImportantResources
:
null
,
isImportantResources
:
0
,
setupTime
:
0
,
setupTime
:
0
,
realWorkingHours
:
0
,
realWorkingHours
:
0
,
realRuntime
:
0
,
realRuntime
:
0
,
isParticipateIntime
:
null
,
isParticipateIntime
:
0
,
equipType
:
""
,
equipType
:
""
,
},
},
rules
:
{
rules
:
{
...
...
pages/technology/details/routingqccard/add.vue
View file @
83d0eae1
...
@@ -197,11 +197,11 @@ export default {
...
@@ -197,11 +197,11 @@ export default {
productionRequirement
:
""
,
productionRequirement
:
""
,
standard
:
""
,
standard
:
""
,
qualityTemplateName
:
""
,
qualityTemplateName
:
""
,
isImportant
:
null
,
isImportant
:
0
,
firstCheck
:
null
,
firstCheck
:
0
,
inspection
:
null
,
inspection
:
0
,
inspectionTime
:
null
,
inspectionTime
:
0
,
sampling
:
null
,
sampling
:
0
,
samplingBatch
:
""
,
samplingBatch
:
""
,
},
},
tempFile
:
""
,
tempFile
:
""
,
...
...
plugins/iview.js
View file @
83d0eae1
...
@@ -69,6 +69,7 @@ import CustomProperties from '@/components/page/customProperties.vue'
...
@@ -69,6 +69,7 @@ import CustomProperties from '@/components/page/customProperties.vue'
import
InputCode
from
'@/components/page/inputCode.vue'
import
InputCode
from
'@/components/page/inputCode.vue'
import
Pictrue
from
'@/components/page/pictrue.vue'
import
Pictrue
from
'@/components/page/pictrue.vue'
import
WordTree
from
'@/components/page/wordTree.vue'
import
WordTree
from
'@/components/page/wordTree.vue'
import
Actions
from
'@/components/page/actions.vue'
...
@@ -144,6 +145,7 @@ Vue.component("CustomProperties",CustomProperties)
...
@@ -144,6 +145,7 @@ Vue.component("CustomProperties",CustomProperties)
Vue
.
component
(
"InputCode"
,
InputCode
)
Vue
.
component
(
"InputCode"
,
InputCode
)
Vue
.
component
(
"Pictrue"
,
Pictrue
)
Vue
.
component
(
"Pictrue"
,
Pictrue
)
Vue
.
component
(
"WordTree"
,
WordTree
)
Vue
.
component
(
"WordTree"
,
WordTree
)
Vue
.
component
(
"Actions"
,
Actions
)
...
...
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