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
5d763a79
Commit
5d763a79
authored
Sep 11, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产准备
parent
3f73768d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
116 additions
and
37 deletions
+116
-37
customProperties.vue
components/page/customProperties.vue
+70
-0
add.vue
pages/technology/details/routingsupporting/add.vue
+1
-1
add.vue
pages/technology/details/setup/add.vue
+42
-35
iview.js
plugins/iview.js
+3
-1
No files found.
components/page/customProperties.vue
0 → 100644
View file @
5d763a79
<
template
>
<Row>
<Col
v-for=
"li in fileds"
:key=
"li.field"
:span=
"li.span"
>
<FormItem
:label=
"li.title+':'"
:prop=
"li.name"
v-if=
"li.field!='name'&&li.field!='code'"
>
<div>
{{
li
.
newConten
}}
</div>
</FormItem>
</Col>
</Row>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
fileds
:
[],
//扩展属性
entity
:
{
// json: {},
},
};
},
props
:
[
"materialId"
,
"forItem"
],
mounted
()
{
// this.get();
},
watch
:
{
materialId
(
v
)
{
this
.
get
();
},
},
methods
:
{
get
()
{
this
.
$api
.
get
(
`
${
material
}
/custompropertydefinition/getmaterialdefinitionproperty`
,
{
materialId
:
this
.
materialId
}
)
.
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;
return
item
.
fieldType
;
});
this
.
fileds
.
map
((
u
)
=>
{
let
v
=
""
;
if
(
u
.
dataType
==
1
||
u
.
dataType
==
2
)
{
v
=
0
;
}
// console.log(u);
// this.$set(this.entity.customProperties,u.filed,v)
for
(
let
key
of
Object
.
keys
(
this
.
forItem
))
{
// console.log(key);
console
.
log
(
this
.
forItem
[
key
]);
if
(
key
==
u
.
field
)
{
// this.entity.json[key] = this.forItem[key];
return
(
u
.
newConten
=
this
.
forItem
[
key
]);
}
}
this
.
$emit
(
"onValue"
,
u
.
filed
,
v
);
// this.$set(this.entity, u.filed, v);
});
}
});
},
},
};
</
script
>
\ No newline at end of file
pages/technology/details/routingsupporting/add.vue
View file @
5d763a79
...
...
@@ -195,7 +195,7 @@ export default {
tempDetails
.
forEach
((
data
)
=>
{
let
tempObj
=
{};
tempObj
.
value
=
data
.
id
;
tempObj
.
label
=
data
.
name
;
tempObj
.
label
=
data
.
taskSeq
+
" "
+
data
.
name
;
tempD
.
push
(
tempObj
);
});
this
.
routingDetailList
=
tempD
;
...
...
pages/technology/details/setup/add.vue
View file @
5d763a79
...
...
@@ -41,12 +41,13 @@
<span>
{{
entity
.
materialNumber
}}
</span>
</FormItem>
</Col>
<Col
v-for=
"li in fileds"
:key=
"li.field"
:span=
"li.span"
>
<
!--
<
Col
v-for=
"li in fileds"
:key=
"li.field"
:span=
"li.span"
>
<FormItem
:label=
"li.title+':'"
:prop=
"li.name"
v-if=
"li.field!='name'&&li.field!='code'"
>
<div>
{{
li
.
newConten
}}
</div>
</FormItem>
</Col>
</Col>
-->
</Row>
<CustomProperties
:materialId=
"entity.materialId"
:forItem=
"forItem"
@
onValue=
"onValue"
/>
<Row>
<Col
span=
"24"
style=
"text-align:right"
>
<FormItem
label
>
...
...
@@ -80,6 +81,7 @@ export default {
quantity
:
0
,
json
:
{},
},
forItem
:
{},
rules
:
{
materialId
:
[
{
...
...
@@ -121,39 +123,44 @@ export default {
this
.
entity
.
materialNumber
=
e
.
mmcode
;
this
.
entity
.
json
.
nameMaterial
=
e
.
name
;
this
.
entity
.
json
.
materialNumber
=
e
.
mmcode
;
var
forItem
=
v
;
Api
.
getmaterialdefinitionproperty
({
materialId
:
e
.
materialId
}).
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;
return
item
.
fieldType
;
});
this
.
fileds
.
map
((
u
)
=>
{
let
v
=
""
;
if
(
u
.
dataType
==
1
||
u
.
dataType
==
2
)
{
v
=
0
;
}
console
.
log
(
u
);
// this.$set(this.entity.customProperties,u.filed,v)
for
(
let
key
of
Object
.
keys
(
forItem
))
{
// console.log(key);
// console.log(forItem[key]);
if
(
key
==
u
.
field
)
{
this
.
entity
.
json
[
key
]
=
forItem
[
key
];
return
(
u
.
newConten
=
forItem
[
key
]);
}
}
this
.
$set
(
this
.
entity
,
u
.
filed
,
v
);
});
}
}
);
this
.
forItem
=
v
;
// var forItem = v;
// Api.getmaterialdefinitionproperty({ materialId: e.materialId }).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;
// return item.fieldType;
// });
// this.fileds.map((u) => {
// let v = "";
// if (u.dataType == 1 || u.dataType == 2) {
// v = 0;
// }
// console.log(u);
// // this.$set(this.entity.customProperties,u.filed,v)
// for (let key of Object.keys(forItem)) {
// // console.log(key);
// // console.log(forItem[key]);
// if (key == u.field) {
// this.entity.json[key] = forItem[key];
// return (u.newConten = forItem[key]);
// }
// }
// this.$set(this.entity, u.filed, v);
// });
// }
// }
// );
},
onValue
(
filed
,
v
)
{
this
.
$set
(
this
.
entity
,
filed
,
v
);
},
clickChange
(
val
)
{
// this.routingDetailList.forEach((e) => {
...
...
plugins/iview.js
View file @
5d763a79
...
...
@@ -62,6 +62,8 @@ import InputTime from '@/components/page/inputTime.vue'
import
OutputTime
from
'@/components/page/outputTime.vue'
import
ViewerImg
from
'@/components/page/viewer.vue'
import
ImportExcel
from
'@/components/page/import/process.vue'
import
CustomProperties
from
'@/components/page/customProperties.vue'
// import FormMaking from 'form-making'
// import 'form-making/dist/FormMaking.css'
...
...
@@ -129,7 +131,7 @@ Vue.component("ViewerImg", ViewerImg)
Vue
.
component
(
"StoreTree"
,
StoreTree
)
Vue
.
component
(
"StoreSelect"
,
StoreSelect
)
Vue
.
component
(
"ImportExcel"
,
ImportExcel
)
Vue
.
component
(
"CustomProperties"
,
CustomProperties
)
//注入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