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
2e96f4bc
Commit
2e96f4bc
authored
Sep 01, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'product' of git.mes123.com:zhouyx/mes-ui into product-rjt
parents
f8aed324
c4b7b181
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
801 additions
and
749 deletions
+801
-749
add.vue
pages/materiel/classification/add.vue
+1
-0
edit.vue
pages/materiel/classification/edit.vue
+1
-0
index.vue
pages/materiel/classification/index.vue
+416
-385
sonAdd.vue
pages/materiel/classification/sonAdd.vue
+2
-1
sonEdit.vue
pages/materiel/classification/sonEdit.vue
+11
-10
add.vue
pages/materiel/masterData/add.vue
+15
-14
edit.vue
pages/materiel/masterData/edit.vue
+22
-21
index.vue
pages/materiel/masterData/index.vue
+333
-318
No files found.
pages/materiel/classification/add.vue
View file @
2e96f4bc
...
@@ -110,6 +110,7 @@ export default {
...
@@ -110,6 +110,7 @@ export default {
code
:
0
,
code
:
0
,
status
:
0
,
status
:
0
,
codeRuleId
:
this
.
nodeInfo
.
codeRuleId
,
codeRuleId
:
this
.
nodeInfo
.
codeRuleId
,
codeRuleType
:
this
.
nodeInfo
.
codeRuleType
,
},
},
disabled
:
false
,
disabled
:
false
,
codeList
:
[],
codeList
:
[],
...
...
pages/materiel/classification/edit.vue
View file @
2e96f4bc
...
@@ -108,6 +108,7 @@ export default {
...
@@ -108,6 +108,7 @@ export default {
upId
:
0
,
upId
:
0
,
code
:
0
,
code
:
0
,
codeRuleId
:
this
.
nodeInfo
.
codeRuleId
,
codeRuleId
:
this
.
nodeInfo
.
codeRuleId
,
codeRuleType
:
this
.
nodeInfo
.
codeRuleType
,
},
},
arr
:
[],
arr
:
[],
disabled
:
false
,
disabled
:
false
,
...
...
pages/materiel/classification/index.vue
View file @
2e96f4bc
This diff is collapsed.
Click to expand it.
pages/materiel/classification/sonAdd.vue
View file @
2e96f4bc
...
@@ -52,7 +52,8 @@ export default {
...
@@ -52,7 +52,8 @@ export default {
upId
:
this
.
nodeInfo
.
id
,
upId
:
this
.
nodeInfo
.
id
,
code
:
0
,
code
:
0
,
status
:
0
,
status
:
0
,
codeRuleId
:
this
.
nodeInfo
.
codeRuleId
codeRuleId
:
this
.
nodeInfo
.
codeRuleId
,
codeRuleType
:
this
.
nodeInfo
.
codeRuleType
,
},
},
upName
:
this
.
nodeInfo
.
title
,
upName
:
this
.
nodeInfo
.
title
,
disabled
:
false
,
disabled
:
false
,
...
...
pages/materiel/classification/sonEdit.vue
View file @
2e96f4bc
...
@@ -51,13 +51,14 @@ export default {
...
@@ -51,13 +51,14 @@ export default {
entity
:
{
entity
:
{
upId
:
0
,
upId
:
0
,
code
:
0
,
code
:
0
,
codeRuleId
:
this
.
nodeInfo
.
codeRuleId
codeRuleId
:
this
.
nodeInfo
.
codeRuleId
,
codeRuleType
:
this
.
nodeInfo
.
codeRuleType
,
},
},
upName
:
this
.
nodeInfo
.
title
,
upName
:
this
.
nodeInfo
.
title
,
disabled
:
false
,
disabled
:
false
,
rules
:
{
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
,
}
}
,
};
};
},
},
props
:
[
"nodeInfo"
],
props
:
[
"nodeInfo"
],
...
@@ -69,25 +70,25 @@ export default {
...
@@ -69,25 +70,25 @@ export default {
},
},
methods
:
{
methods
:
{
get
()
{
get
()
{
Api
.
get
({
id
:
this
.
nodeInfo
.
id
}).
then
(
r
=>
{
Api
.
get
({
id
:
this
.
nodeInfo
.
id
}).
then
(
(
r
)
=>
{
if
(
r
.
result
)
{
if
(
r
.
result
)
{
this
.
entity
=
r
.
result
;
this
.
entity
=
r
.
result
;
}
}
});
});
},
},
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
v
=>
{
this
.
$refs
.
form
.
validate
(
(
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
Api
.
update
({
categoryDto
:
this
.
entity
,
pro
:
[]
})
Api
.
update
({
categoryDto
:
this
.
entity
,
pro
:
[]
})
.
then
(
r
=>
{
.
then
(
(
r
)
=>
{
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
,
this
.
entity
);
this
.
$emit
(
"on-ok"
,
this
.
entity
);
}
else
{
}
else
{
this
.
$Message
.
error
(
r
.
error
.
message
);
this
.
$Message
.
error
(
r
.
error
.
message
);
}
}
})
})
.
catch
(
err
=>
{
.
catch
(
(
err
)
=>
{
this
.
disabled
=
false
;
this
.
disabled
=
false
;
this
.
$Message
.
error
(
r
.
error
.
message
);
this
.
$Message
.
error
(
r
.
error
.
message
);
});
});
...
@@ -96,7 +97,7 @@ export default {
...
@@ -96,7 +97,7 @@ export default {
},
},
handleClose
()
{
handleClose
()
{
this
.
$emit
(
"on-close"
);
this
.
$emit
(
"on-close"
);
}
}
,
}
}
,
};
};
</
script
>
</
script
>
pages/materiel/masterData/add.vue
View file @
2e96f4bc
...
@@ -91,14 +91,15 @@ export default {
...
@@ -91,14 +91,15 @@ export default {
codeRuleId
:
this
.
nodeInfo
.
codeRuleId
,
codeRuleId
:
this
.
nodeInfo
.
codeRuleId
,
categoryId
:
this
.
nodeInfo
.
categoryId
,
//左侧树点击的id
categoryId
:
this
.
nodeInfo
.
categoryId
,
//左侧树点击的id
customProperties
:
{},
customProperties
:
{},
rootCategoryId
:
this
.
nodeInfo
.
rootCategoryId
//左侧树点击的数据的最顶层id
rootCategoryId
:
this
.
nodeInfo
.
rootCategoryId
,
//左侧树点击的数据的最顶层id
codeRuleType
:
this
.
nodeInfo
.
codeRuleType
,
},
},
disabled
:
false
,
disabled
:
false
,
rules
:
{
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
,
},
},
fileds
:
[]
//扩展属性
fileds
:
[]
,
//扩展属性
};
};
},
},
async
fetch
({
store
,
params
})
{
async
fetch
({
store
,
params
})
{
...
@@ -113,17 +114,17 @@ export default {
...
@@ -113,17 +114,17 @@ export default {
{
{
conditionalType
:
"Equal"
,
conditionalType
:
"Equal"
,
fieldName
:
"categoryId"
,
fieldName
:
"categoryId"
,
fieldValue
:
this
.
nodeInfo
.
rootCategoryId
fieldValue
:
this
.
nodeInfo
.
rootCategoryId
,
}
}
,
];
];
Api
.
listTable
({
Api
.
listTable
({
conditions
:
conditions
,
conditions
:
conditions
,
sortBy
:
"id"
,
sortBy
:
"id"
,
isDesc
:
false
isDesc
:
false
,
}).
then
(
r
=>
{
}).
then
(
(
r
)
=>
{
if
(
r
.
result
)
{
if
(
r
.
result
)
{
this
.
fileds
=
r
.
result
.
filter
(
function
(
item
)
{
this
.
fileds
=
r
.
result
.
filter
(
function
(
item
)
{
item
.
span
=
12
;
item
.
span
=
12
;
if
(
item
.
dataType
>
4
)
{
if
(
item
.
dataType
>
4
)
{
item
.
span
=
24
;
item
.
span
=
24
;
...
@@ -131,7 +132,7 @@ export default {
...
@@ -131,7 +132,7 @@ export default {
delete
item
[
"id"
];
delete
item
[
"id"
];
return
item
.
fieldType
!=
1
;
return
item
.
fieldType
!=
1
;
});
});
this
.
fileds
.
map
(
u
=>
{
this
.
fileds
.
map
(
(
u
)
=>
{
let
v
=
""
;
let
v
=
""
;
if
(
u
.
dataType
==
1
||
u
.
dataType
==
2
)
{
if
(
u
.
dataType
==
1
||
u
.
dataType
==
2
)
{
v
=
0
;
v
=
0
;
...
@@ -158,12 +159,12 @@ export default {
...
@@ -158,12 +159,12 @@ export default {
},
},
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
v
=>
{
this
.
$refs
.
form
.
validate
(
(
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
// let categoryDto = this.entity;
// let categoryDto = this.entity;
// let pro = this.checkList.concat(this.arr);
// let pro = this.checkList.concat(this.arr);
Api
.
create
(
this
.
entity
)
Api
.
create
(
this
.
entity
)
.
then
(
r
=>
{
.
then
(
(
r
)
=>
{
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
this
.
$emit
(
"on-ok"
);
...
@@ -171,7 +172,7 @@ export default {
...
@@ -171,7 +172,7 @@ export default {
this
.
$Message
.
error
(
r
.
error
.
message
);
this
.
$Message
.
error
(
r
.
error
.
message
);
}
}
})
})
.
catch
(
err
=>
{
.
catch
(
(
err
)
=>
{
this
.
disabled
=
false
;
this
.
disabled
=
false
;
this
.
$Message
.
error
(
r
.
error
.
message
);
this
.
$Message
.
error
(
r
.
error
.
message
);
});
});
...
@@ -180,7 +181,7 @@ export default {
...
@@ -180,7 +181,7 @@ export default {
},
},
handleClose
()
{
handleClose
()
{
this
.
$emit
(
"on-close"
);
this
.
$emit
(
"on-close"
);
}
}
,
}
}
,
};
};
</
script
>
</
script
>
pages/materiel/masterData/edit.vue
View file @
2e96f4bc
...
@@ -89,14 +89,15 @@ export default {
...
@@ -89,14 +89,15 @@ export default {
categoryId
:
this
.
nodeInfo
.
categoryId
,
//左侧树点击的id
categoryId
:
this
.
nodeInfo
.
categoryId
,
//左侧树点击的id
customProperties
:
{},
customProperties
:
{},
rootCategoryId
:
this
.
nodeInfo
.
rootCategoryId
,
//左侧树点击的数据的最顶层id
rootCategoryId
:
this
.
nodeInfo
.
rootCategoryId
,
//左侧树点击的数据的最顶层id
version
:
null
version
:
null
,
codeRuleType
:
this
.
nodeInfo
.
codeRuleType
,
},
},
fileds
:
[],
fileds
:
[],
checkList
:
[],
checkList
:
[],
disabled
:
false
,
disabled
:
false
,
rules
:
{
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
,
}
}
,
};
};
},
},
async
fetch
({
store
,
params
})
{
async
fetch
({
store
,
params
})
{
...
@@ -114,16 +115,16 @@ export default {
...
@@ -114,16 +115,16 @@ export default {
{
{
conditionalType
:
"Equal"
,
conditionalType
:
"Equal"
,
fieldName
:
"categoryId"
,
fieldName
:
"categoryId"
,
fieldValue
:
this
.
nodeInfo
.
rootCategoryId
fieldValue
:
this
.
nodeInfo
.
rootCategoryId
,
}
}
,
];
];
Api
.
listTable
({
Api
.
listTable
({
conditions
:
conditions
,
conditions
:
conditions
,
sortBy
:
"id"
,
sortBy
:
"id"
,
isDesc
:
false
isDesc
:
false
,
}).
then
(
r
=>
{
}).
then
(
(
r
)
=>
{
if
(
r
.
result
)
{
if
(
r
.
result
)
{
this
.
fileds
=
r
.
result
.
filter
(
function
(
item
)
{
this
.
fileds
=
r
.
result
.
filter
(
function
(
item
)
{
item
.
span
=
12
;
item
.
span
=
12
;
if
(
item
.
dataType
>
4
)
{
if
(
item
.
dataType
>
4
)
{
item
.
span
=
24
;
item
.
span
=
24
;
...
@@ -131,7 +132,7 @@ export default {
...
@@ -131,7 +132,7 @@ export default {
delete
item
[
"id"
];
delete
item
[
"id"
];
return
item
.
fieldType
!=
1
;
return
item
.
fieldType
!=
1
;
});
});
this
.
fileds
.
map
(
u
=>
{
this
.
fileds
.
map
(
(
u
)
=>
{
let
v
=
""
;
let
v
=
""
;
if
(
u
.
dataType
==
1
||
u
.
dataType
==
2
)
{
if
(
u
.
dataType
==
1
||
u
.
dataType
==
2
)
{
v
=
0
;
v
=
0
;
...
@@ -143,7 +144,7 @@ export default {
...
@@ -143,7 +144,7 @@ export default {
});
});
},
},
get
()
{
get
()
{
Api
.
get
({
id
:
this
.
eid
}).
then
(
r
=>
{
Api
.
get
({
id
:
this
.
eid
}).
then
(
(
r
)
=>
{
if
(
r
.
result
)
{
if
(
r
.
result
)
{
this
.
entity
=
r
.
result
;
this
.
entity
=
r
.
result
;
this
.
entity
.
version
=
parseInt
(
r
.
result
.
version
);
this
.
entity
.
version
=
parseInt
(
r
.
result
.
version
);
...
@@ -155,23 +156,23 @@ export default {
...
@@ -155,23 +156,23 @@ export default {
{
{
conditionalType
:
"In"
,
conditionalType
:
"In"
,
fieldName
:
"fieldType"
,
fieldName
:
"fieldType"
,
fieldValue
:
"1,2"
fieldValue
:
"1,2"
,
},
},
{
{
conditionalType
:
"Equal"
,
conditionalType
:
"Equal"
,
fieldName
:
"categoryId"
,
fieldName
:
"categoryId"
,
fieldValue
:
"0"
fieldValue
:
"0"
,
}
}
,
];
];
Api
.
listTable
({
Api
.
listTable
({
conditions
:
conditions
,
conditions
:
conditions
,
sortBy
:
"id"
,
sortBy
:
"id"
,
isDesc
:
false
isDesc
:
false
,
}).
then
(
r
=>
{
}).
then
(
(
r
)
=>
{
if
(
r
.
result
)
{
if
(
r
.
result
)
{
var
arr
=
r
.
result
;
var
arr
=
r
.
result
;
this
.
checkList
=
arr
.
filter
(
function
(
item
)
{
this
.
checkList
=
arr
.
filter
(
function
(
item
)
{
item
.
mid
=
item
.
id
;
item
.
mid
=
item
.
id
;
delete
item
[
"id"
];
//删除属性id
delete
item
[
"id"
];
//删除属性id
return
item
;
return
item
;
...
@@ -195,12 +196,12 @@ export default {
...
@@ -195,12 +196,12 @@ export default {
},
},
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
v
=>
{
this
.
$refs
.
form
.
validate
(
(
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
// let categoryDto = this.entity;
// let categoryDto = this.entity;
// let pro = this.checkList.concat(this.arr);
// let pro = this.checkList.concat(this.arr);
Api
.
update
(
this
.
entity
)
Api
.
update
(
this
.
entity
)
.
then
(
r
=>
{
.
then
(
(
r
)
=>
{
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
this
.
$emit
(
"on-ok"
);
...
@@ -208,7 +209,7 @@ export default {
...
@@ -208,7 +209,7 @@ export default {
this
.
$Message
.
error
(
r
.
error
.
message
);
this
.
$Message
.
error
(
r
.
error
.
message
);
}
}
})
})
.
catch
(
err
=>
{
.
catch
(
(
err
)
=>
{
this
.
disabled
=
false
;
this
.
disabled
=
false
;
this
.
$Message
.
error
(
r
.
error
.
message
);
this
.
$Message
.
error
(
r
.
error
.
message
);
});
});
...
@@ -217,7 +218,7 @@ export default {
...
@@ -217,7 +218,7 @@ export default {
},
},
handleClose
()
{
handleClose
()
{
this
.
$emit
(
"on-close"
);
this
.
$emit
(
"on-close"
);
}
}
,
}
}
,
};
};
</
script
>
</
script
>
pages/materiel/masterData/index.vue
View file @
2e96f4bc
This diff is collapsed.
Click to expand it.
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