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
c4b7b181
Commit
c4b7b181
authored
Sep 01, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jj
parent
cf460496
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
21 deletions
+22
-21
edit.vue
pages/materiel/masterData/edit.vue
+22
-21
No files found.
pages/materiel/masterData/edit.vue
View file @
c4b7b181
...
...
@@ -89,14 +89,15 @@ export default {
categoryId
:
this
.
nodeInfo
.
categoryId
,
//左侧树点击的id
customProperties
:
{},
rootCategoryId
:
this
.
nodeInfo
.
rootCategoryId
,
//左侧树点击的数据的最顶层id
version
:
null
version
:
null
,
codeRuleType
:
this
.
nodeInfo
.
codeRuleType
,
},
fileds
:
[],
checkList
:
[],
disabled
:
false
,
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
}
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
,
}
,
};
},
async
fetch
({
store
,
params
})
{
...
...
@@ -114,16 +115,16 @@ export default {
{
conditionalType
:
"Equal"
,
fieldName
:
"categoryId"
,
fieldValue
:
this
.
nodeInfo
.
rootCategoryId
}
fieldValue
:
this
.
nodeInfo
.
rootCategoryId
,
}
,
];
Api
.
listTable
({
conditions
:
conditions
,
sortBy
:
"id"
,
isDesc
:
false
}).
then
(
r
=>
{
isDesc
:
false
,
}).
then
(
(
r
)
=>
{
if
(
r
.
result
)
{
this
.
fileds
=
r
.
result
.
filter
(
function
(
item
)
{
this
.
fileds
=
r
.
result
.
filter
(
function
(
item
)
{
item
.
span
=
12
;
if
(
item
.
dataType
>
4
)
{
item
.
span
=
24
;
...
...
@@ -131,7 +132,7 @@ export default {
delete
item
[
"id"
];
return
item
.
fieldType
!=
1
;
});
this
.
fileds
.
map
(
u
=>
{
this
.
fileds
.
map
(
(
u
)
=>
{
let
v
=
""
;
if
(
u
.
dataType
==
1
||
u
.
dataType
==
2
)
{
v
=
0
;
...
...
@@ -143,7 +144,7 @@ export default {
});
},
get
()
{
Api
.
get
({
id
:
this
.
eid
}).
then
(
r
=>
{
Api
.
get
({
id
:
this
.
eid
}).
then
(
(
r
)
=>
{
if
(
r
.
result
)
{
this
.
entity
=
r
.
result
;
this
.
entity
.
version
=
parseInt
(
r
.
result
.
version
);
...
...
@@ -155,23 +156,23 @@ export default {
{
conditionalType
:
"In"
,
fieldName
:
"fieldType"
,
fieldValue
:
"1,2"
fieldValue
:
"1,2"
,
},
{
conditionalType
:
"Equal"
,
fieldName
:
"categoryId"
,
fieldValue
:
"0"
}
fieldValue
:
"0"
,
}
,
];
Api
.
listTable
({
conditions
:
conditions
,
sortBy
:
"id"
,
isDesc
:
false
}).
then
(
r
=>
{
isDesc
:
false
,
}).
then
(
(
r
)
=>
{
if
(
r
.
result
)
{
var
arr
=
r
.
result
;
this
.
checkList
=
arr
.
filter
(
function
(
item
)
{
this
.
checkList
=
arr
.
filter
(
function
(
item
)
{
item
.
mid
=
item
.
id
;
delete
item
[
"id"
];
//删除属性id
return
item
;
...
...
@@ -195,12 +196,12 @@ export default {
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
v
=>
{
this
.
$refs
.
form
.
validate
(
(
v
)
=>
{
if
(
v
)
{
// let categoryDto = this.entity;
// let pro = this.checkList.concat(this.arr);
Api
.
update
(
this
.
entity
)
.
then
(
r
=>
{
.
then
(
(
r
)
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
...
...
@@ -208,7 +209,7 @@ export default {
this
.
$Message
.
error
(
r
.
error
.
message
);
}
})
.
catch
(
err
=>
{
.
catch
(
(
err
)
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
r
.
error
.
message
);
});
...
...
@@ -217,7 +218,7 @@ export default {
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
}
}
}
,
}
,
};
</
script
>
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