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
3e8bc86e
Commit
3e8bc86e
authored
May 15, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
outputtime
parent
1ff0d1f2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
131 additions
and
16 deletions
+131
-16
dataGrid.vue
components/page/dataGrid.vue
+11
-0
outputTime.vue
components/page/outputTime.vue
+89
-0
detail.vue
pages/technology/details/detail.vue
+5
-5
index.vue
pages/technology/details/index.vue
+24
-11
iview.js
plugins/iview.js
+2
-0
No files found.
components/page/dataGrid.vue
View file @
3e8bc86e
...
...
@@ -529,6 +529,17 @@ export default {
});
};
}
if
(
u
.
type
==
"outputTime"
)
{
u
.
render
=
(
h
,
params
)
=>
{
let
values
=
u
.
key
;
return
h
(
"OutputTime"
,
{
props
:
{
value
:
params
.
row
[
values
]
}
});
};
}
return
!
u
.
hide
;
});
return
cols
;
...
...
components/page/outputTime.vue
0 → 100644
View file @
3e8bc86e
<
template
>
<div
style=
"padding-top:5px"
>
{{
name
}}
</div>
</
template
>
<
script
>
export
default
{
name
:
"outputTime"
,
data
()
{
return
{
name
:
""
,
item
:
{},
items
:
[],
data
:
[]
};
},
props
:
{
value
:
{
type
:
[
String
,
Number
],
required
:
false
}
},
created
()
{},
mounted
()
{
this
.
setName
();
},
methods
:
{
setName
()
{
this
.
name
=
this
.
secondsFormat
(
this
.
value
);
},
secondsFormat
(
s
)
{
var
day
=
Math
.
floor
(
s
/
(
24
*
3600
));
// Math.floor()向下取整
var
hour
=
Math
.
floor
((
s
-
day
*
24
*
3600
)
/
3600
);
var
minute
=
Math
.
floor
((
s
-
day
*
24
*
3600
-
hour
*
3600
)
/
60
);
var
second
=
s
-
day
*
24
*
3600
-
hour
*
3600
-
minute
*
60
;
let
outStr
=
""
;
if
(
day
)
{
if
(
second
==
0
&&
minute
>
0
&&
hour
>
0
)
{
outStr
=
day
+
"天"
+
hour
+
"时"
+
minute
+
"分"
;
}
else
if
(
second
==
0
&&
minute
==
0
&&
hour
>
0
)
{
outStr
=
day
+
"天"
+
hour
+
"时"
;
}
else
if
(
second
==
0
&&
minute
==
0
&&
hour
==
0
)
{
outStr
=
day
+
"天"
;
}
else
{
outStr
=
day
+
"天"
+
hour
+
"时"
+
minute
+
"分"
+
second
+
"秒"
;
}
return
outStr
;
}
else
{
if
(
hour
)
{
if
(
second
==
0
&&
minute
>
0
)
{
outStr
=
hour
+
"时"
+
minute
+
"分"
;
}
else
if
(
second
==
0
&&
minute
==
0
)
{
outStr
=
hour
+
"时"
;
}
else
{
outStr
=
hour
+
"时"
+
minute
+
"分"
+
second
+
"秒"
;
}
return
outStr
;
}
else
{
if
(
minute
)
{
if
(
second
==
0
)
{
outStr
=
minute
+
"分"
;
}
else
{
outStr
=
minute
+
"分"
+
second
+
"秒"
;
}
return
outStr
;
}
else
{
if
(
second
)
{
return
second
+
"秒"
;
}
}
// if (second
<
10
)
{
// if (minute
<
10
)
{
// return "0" + minute + ":" + second + "0";
// } else {
// return minute + ":" + second + "0";
// }
// } else {
// return minute + ":" + second;
// }
}
}
}
},
computed
:
{},
watch
:
{
value
(
v
)
{
if
(
v
>
0
)
this
.
setName
();
}
}
};
</
script
>
\ No newline at end of file
pages/technology/details/detail.vue
View file @
3e8bc86e
...
...
@@ -13,14 +13,14 @@
<Filed
:span=
"12"
:name=
"l('isImportantResources')"
>
<state
code=
"Process.state"
:value=
"entity.isImportantResources"
type=
"text"
></state>
</Filed>
<Filed
:span=
"12"
:name=
"l('schedulingWorkingHours')"
>
{{
entity
.
schedulingWorkingHours
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('runtime')"
>
{{
entity
.
runtime
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('realRuntime')"
>
{{
entity
.
realRuntime
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('realWorkingHours')"
>
{{
entity
.
realWorkingHours
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('schedulingWorkingHours')"
>
<OutputTime
:value=
"entity.schedulingWorkingHours"
></OutputTime>
</Filed>
<Filed
:span=
"12"
:name=
"l('runtime')"
>
<OutputTime
:value=
"entity.runtime"
></OutputTime>
</Filed>
<Filed
:span=
"12"
:name=
"l('realRuntime')"
>
<OutputTime
:value=
"entity.realRuntime"
></OutputTime>
</Filed>
<Filed
:span=
"12"
:name=
"l('realWorkingHours')"
>
<OutputTime
:value=
"entity.realWorkingHours"
></OutputTime>
</Filed>
<Filed
:span=
"12"
:name=
"l('isOutside')"
>
<state
code=
"Process.state"
:value=
"entity.isOutside"
type=
"text"
></state>
</Filed>
<Filed
:span=
"12"
:name=
"l('outsideTime')"
>
{{
entity
.
outsideTime
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('outsideTime')"
>
<OutputTime
:value=
"entity.outsideTime"
></OutputTime>
</Filed>
<Filed
:span=
"12"
:name=
"l('isParticipateIntime')"
>
<state
code=
"Process.state"
:value=
"entity.isParticipateIntime"
type=
"text"
></state>
</Filed>
...
...
pages/technology/details/index.vue
View file @
3e8bc86e
...
...
@@ -94,7 +94,7 @@ export default {
key
:
"resourceCode"
,
title
:
this
.
l
(
"resourceCode"
),
align
:
"left"
,
easy
:
true
,
easy
:
true
},
{
key
:
"isImportantResources"
,
...
...
@@ -106,19 +106,27 @@ export default {
{
key
:
"schedulingWorkingHours"
,
title
:
this
.
l
(
"schedulingWorkingHours"
),
align
:
"right"
align
:
"right"
,
type
:
"outputTime"
,
},
{
key
:
"runtime"
,
title
:
this
.
l
(
"runtime"
),
align
:
"right"
},
{
key
:
"runtime"
,
title
:
this
.
l
(
"runtime"
),
align
:
"right"
,
type
:
"outputTime"
,
},
{
key
:
"realRuntime"
,
title
:
this
.
l
(
"realRuntime"
),
align
:
"right"
align
:
"right"
,
type
:
"outputTime"
,
},
{
key
:
"outsideTime"
,
title
:
this
.
l
(
"outsideTime"
),
align
:
"right"
align
:
"right"
,
type
:
"outputTime"
,
},
{
...
...
@@ -277,7 +285,12 @@ export default {
{
attrs
:
{
oprate
:
"detail"
},
on
:
{
click
:
()
=>
this
.
addStep
(
params
.
row
.
id
,
params
.
row
.
name
,
params
.
row
.
maxNumStep
)
click
:
()
=>
this
.
addStep
(
params
.
row
.
id
,
params
.
row
.
name
,
params
.
row
.
maxNumStep
)
}
},
"新增"
...
...
@@ -313,7 +326,7 @@ export default {
],
list
:
[],
maxNum
:
0
,
maxNumTemp
:
0
,
maxNumTemp
:
0
};
},
created
()
{
...
...
@@ -322,7 +335,7 @@ export default {
}
else
{
this
.
easySearch
.
routingHeaderId
.
value
=
this
.
$route
.
query
.
id
;
}
this
.
hid
=
Number
(
this
.
easySearch
.
routingHeaderId
.
value
);
this
.
hid
=
Number
(
this
.
easySearch
.
routingHeaderId
.
value
);
},
mounted
()
{
this
.
load
();
...
...
@@ -385,7 +398,7 @@ export default {
},
add
()
{
this
.
curId
=
0
;
this
.
maxNum
=
this
.
maxNumTemp
this
.
maxNum
=
this
.
maxNumTemp
;
this
.
title
=
"新增"
;
this
.
detail
=
()
=>
import
(
"./add"
);
this
.
modal
=
true
;
...
...
@@ -420,10 +433,10 @@ export default {
this
.
curId
=
0
;
this
.
modal
=
false
;
},
addStep
(
detailId
,
detailName
,
detailMaxNumStep
)
{
addStep
(
detailId
,
detailName
,
detailMaxNumStep
)
{
this
.
curId
=
detailId
;
this
.
curName
=
detailName
;
this
.
maxNum
=
detailMaxNumStep
;
this
.
maxNum
=
detailMaxNumStep
;
this
.
title
=
"新增工步"
;
this
.
detail
=
()
=>
import
(
"./routingStep/add"
);
this
.
modal
=
true
;
...
...
plugins/iview.js
View file @
3e8bc86e
...
...
@@ -46,6 +46,7 @@ import ProductSelect from '@/components/page/productSelect.vue'
import
DTSpan
from
'@/components/page/dtSpan.vue'
import
DTSearch
from
'@/components/page/dtSearch.vue'
import
InputTime
from
'@/components/page/inputTime.vue'
import
OutputTime
from
'@/components/page/outputTime.vue'
// import FormMaking from 'form-making'
// import 'form-making/dist/FormMaking.css'
...
...
@@ -98,6 +99,7 @@ Vue.component("ProductSelect", ProductSelect)
Vue
.
component
(
"DTSpan"
,
DTSpan
)
Vue
.
component
(
"DTSearch"
,
DTSearch
)
Vue
.
component
(
"InputTime"
,
InputTime
)
Vue
.
component
(
"OutputTime"
,
OutputTime
)
//注入mock
// require("../mock")
...
...
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