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
bf3077f9
Commit
bf3077f9
authored
Jun 18, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加编辑修改
parent
76a2fb9e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
31 deletions
+35
-31
add.vue
pages/materiel/classification/add.vue
+14
-14
edit.vue
pages/materiel/classification/edit.vue
+21
-17
No files found.
pages/materiel/classification/add.vue
View file @
bf3077f9
...
...
@@ -152,12 +152,12 @@ export default {
key
:
"title"
,
slot
:
"title"
},
{
{
title
:
"属性类型"
,
key
:
"dataType"
,
align
:
"center"
,
slot
:
"dataType"
,
width
:
150
width
:
150
},
{
title
:
"备注"
,
...
...
@@ -166,7 +166,7 @@ export default {
slot
:
"note"
,
width
:
"150"
},
// {
// title: "是否显示",
// key: "result",
...
...
@@ -192,14 +192,14 @@ export default {
key
:
"required"
,
align
:
"center"
,
slot
:
"required"
,
width
:
80
width
:
80
},
{
title
:
"唯一"
,
key
:
"isUnique"
,
align
:
"center"
,
slot
:
"isUnique"
,
width
:
80
width
:
80
},
{
title
:
"操作"
,
...
...
@@ -242,7 +242,7 @@ export default {
if
(
r
.
result
)
{
var
arr
=
r
.
result
;
this
.
checkList
=
arr
.
filter
(
function
(
item
)
{
item
.
mid
=
item
.
id
;
item
.
mid
=
item
.
id
;
delete
item
[
"id"
];
//删除属性id
return
item
;
});
...
...
@@ -269,15 +269,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
maxId
=
0
;
this
.
checkList
.
map
(
u
=>
{
if
(
u
.
mid
>
maxId
)
{
maxId
=
u
.
mid
;
}
})
})
;
let
obj
=
{
mid
:
maxId
+
1
,
field
:
"c"
+
maxId
,
mid
:
maxId
+
1
,
field
:
"c"
+
maxId
,
title
:
""
,
note
:
""
,
dataType
:
""
,
...
...
@@ -288,7 +288,7 @@ export default {
action
:
1
,
add
:
0
//新增标识
};
this
.
checkList
.
push
(
obj
);
this
.
checkList
.
unshift
(
obj
);
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
v
=>
{
...
...
pages/materiel/classification/edit.vue
View file @
bf3077f9
...
...
@@ -150,12 +150,12 @@ export default {
key
:
"title"
,
slot
:
"title"
},
{
{
title
:
"属性类型"
,
key
:
"dataType"
,
align
:
"center"
,
slot
:
"dataType"
,
width
:
150
width
:
150
},
{
title
:
"备注"
,
...
...
@@ -179,14 +179,14 @@ export default {
key
:
"required"
,
align
:
"center"
,
slot
:
"required"
,
width
:
80
width
:
80
},
{
title
:
"唯一"
,
key
:
"isUnique"
,
align
:
"center"
,
slot
:
"isUnique"
,
width
:
80
width
:
80
},
{
title
:
"操作"
,
...
...
@@ -225,12 +225,16 @@ export default {
fieldValue
:
this
.
nodeInfo
.
id
}
];
Api
.
listTable
({
conditions
:
conditions
,
sortBy
:
'id'
,
isDesc
:
false
}).
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
;
})
r
.
result
.
map
(
u
=>
{
u
.
mid
=
u
.
id
;
})
;
this
.
checkList
=
r
.
result
;
}
});
...
...
@@ -248,16 +252,16 @@ export default {
setRow
(
row
,
index
)
{
this
.
$set
(
this
.
checkList
,
index
,
row
);
},
addNew
()
{
let
maxId
=
0
;
this
.
checkList
.
map
(
u
=>
{
if
(
u
.
mid
>
maxId
)
{
maxId
=
u
.
mid
;
addNew
()
{
let
maxId
=
0
;
this
.
checkList
.
map
(
u
=>
{
if
(
u
.
mid
>
maxId
)
{
maxId
=
u
.
mid
;
}
})
})
;
let
obj
=
{
mid
:
maxId
+
1
,
field
:
"c"
+
maxId
,
mid
:
maxId
+
1
,
field
:
"c"
+
maxId
,
title
:
""
,
note
:
""
,
dataType
:
""
,
...
...
@@ -268,7 +272,7 @@ export default {
action
:
1
,
add
:
0
//新增标识
};
this
.
checkList
.
push
(
obj
);
this
.
checkList
.
unshift
(
obj
);
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
v
=>
{
...
...
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