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
c549472c
Commit
c549472c
authored
Jul 03, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分类
parent
3fc95151
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
59 deletions
+40
-59
add.vue
pages/materiel/classification/add.vue
+21
-31
edit.vue
pages/materiel/classification/edit.vue
+19
-28
No files found.
pages/materiel/classification/add.vue
View file @
c549472c
...
@@ -42,34 +42,28 @@
...
@@ -42,34 +42,28 @@
</
template
>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"note"
>
<
template
slot-scope=
"{ row, index }"
slot=
"note"
>
<!--
<Input
v-if=
"row.dataType==3"
v-model=
"row.note"
placeholder=
"请输入字典编码"
@
on-blur=
"setRow(row,index)"
/>
-->
<!--
<Input
v-if=
"row.dataType==3"
v-model=
"row.note"
placeholder=
"请输入字典编码"
@
on-blur=
"setRow(row,index)"
/>
-->
<Select
<Select
v-if=
"row.dataType==3"
v-if=
"row.dataType==3"
v-model=
"row.note"
v-model=
"row.note"
clearable
clearable
transfer
transfer
v-else
@
on-change=
"setRow(row,index)"
@
on-change=
"setRow(row,index)"
>
>
<Option
v-for=
"item in codeList"
:value=
"item.code"
:key=
"item.code"
>
{{
item
.
name
}}
</Option>
<Option
</Select>
v-for=
"item in codeList"
:value=
"item.code"
:key=
"item.code"
>
{{
item
.
name
}}
</Option>
</Select>
<span
v-else
>
{{
row
.
note
}}
</span>
<span
v-else
>
{{
row
.
note
}}
</span>
</
template
>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"dataType"
>
<
template
slot-scope=
"{ row, index }"
slot=
"dataType"
>
<Dictionary
<Dictionary
@
on-change=
"setRow(row,index)"
@
on-change=
"setRow(row,index)"
v-model=
"row.dataType"
v-model=
"row.dataType"
code=
"materail.category.dataType"
code=
"materail.category.dataType"
type=
"select"
type=
"select"
:value=
"row.dataType"
:value=
"row.dataType"
:key=
"row.dataType"
:key=
"row.dataType"
></Dictionary>
></Dictionary>
</
template
>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"unitName"
>
<
template
slot-scope=
"{ row, index }"
slot=
"unitName"
>
<Dictionary
<Dictionary
v-if=
"row.dataType==1||row.dataType==2"
v-if=
"row.dataType==1||row.dataType==2"
@
on-change=
"setRow(row,index)"
@
on-change=
"setRow(row,index)"
...
@@ -88,11 +82,7 @@
...
@@ -88,11 +82,7 @@
<Checkbox
v-model=
"row.isUnique"
@
on-change=
"setRow(row,index)"
></Checkbox>
<Checkbox
v-model=
"row.isUnique"
@
on-change=
"setRow(row,index)"
></Checkbox>
</
template
>
</
template
>
<
template
<
template
slot-scope=
"{ row, index }"
slot=
"action"
>
slot-scope=
"{ row, index }"
slot=
"action"
v-if=
"row.fieldType==2||row.fieldType==3"
>
<a
@
click=
"remove(index,row)"
style=
"color:#FF7A8B"
>
删除
</a>
<a
@
click=
"remove(index,row)"
style=
"color:#FF7A8B"
>
删除
</a>
</
template
>
</
template
>
</Table>
</Table>
...
@@ -140,13 +130,13 @@ export default {
...
@@ -140,13 +130,13 @@ export default {
key
:
"dataType"
,
key
:
"dataType"
,
align
:
"center"
,
align
:
"center"
,
slot
:
"dataType"
,
slot
:
"dataType"
,
width
:
200
width
:
200
},
},
{
{
title
:
"设置"
,
title
:
"设置"
,
key
:
"note"
,
key
:
"note"
,
align
:
"center"
,
align
:
"center"
,
slot
:
"note"
,
slot
:
"note"
},
},
{
{
title
:
"单位"
,
title
:
"单位"
,
...
@@ -170,7 +160,7 @@ export default {
...
@@ -170,7 +160,7 @@ export default {
width
:
80
width
:
80
},
},
{
{
width
:
80
,
width
:
80
,
title
:
"操作"
,
title
:
"操作"
,
slot
:
"action"
,
slot
:
"action"
,
align
:
"center"
align
:
"center"
...
@@ -213,7 +203,7 @@ export default {
...
@@ -213,7 +203,7 @@ export default {
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
.
fieldType
>
1
;
return
item
.
fieldType
>
1
;
});
});
}
}
});
});
...
...
pages/materiel/classification/edit.vue
View file @
c549472c
...
@@ -42,34 +42,29 @@
...
@@ -42,34 +42,29 @@
</
template
>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"note"
>
<
template
slot-scope=
"{ row, index }"
slot=
"note"
>
<!--
<Input
v-if=
"row.dataType==3"
v-model=
"row.note"
placeholder=
"请输入字典编码"
@
on-blur=
"setRow(row,index)"
/>
-->
<!--
<Input
v-if=
"row.dataType==3"
v-model=
"row.note"
placeholder=
"请输入字典编码"
@
on-blur=
"setRow(row,index)"
/>
-->
<Select
<Select
v-if=
"row.dataType==3"
v-if=
"row.dataType==3"
v-model=
"row.note"
v-model=
"row.note"
clearable
clearable
transfer
transfer
v-else
@
on-change=
"setRow(row,index)"
@
on-change=
"setRow(row,index)"
>
>
<Option
<Option
v-for=
"item in codeList"
:value=
"item.code"
:key=
"item.code"
>
{{
item
.
name
}}
</Option>
v-for=
"item in codeList"
</Select>
:value=
"item.code"
:key=
"item.code"
>
{{
item
.
name
}}
</Option>
</Select>
<span
v-else
>
{{
row
.
note
}}
</span>
<span
v-else
>
{{
row
.
note
}}
</span>
</
template
>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"dataType"
>
<
template
slot-scope=
"{ row, index }"
slot=
"dataType"
>
<Dictionary
<Dictionary
@
on-change=
"setRow(row,index)"
@
on-change=
"setRow(row,index)"
v-model=
"row.dataType"
v-model=
"row.dataType"
code=
"materail.category.dataType"
code=
"materail.category.dataType"
type=
"select"
type=
"select"
:value=
"row.dataType"
:value=
"row.dataType"
:key=
"row.dataType"
:key=
"row.dataType"
></Dictionary>
></Dictionary>
</
template
>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"unitName"
>
<
template
slot-scope=
"{ row, index }"
slot=
"unitName"
>
<Dictionary
<Dictionary
v-if=
"row.dataType==1||row.dataType==2"
v-if=
"row.dataType==1||row.dataType==2"
@
on-change=
"setRow(row,index)"
@
on-change=
"setRow(row,index)"
...
@@ -88,11 +83,7 @@
...
@@ -88,11 +83,7 @@
<Checkbox
v-model=
"row.isUnique"
@
on-change=
"setRow(row,index)"
></Checkbox>
<Checkbox
v-model=
"row.isUnique"
@
on-change=
"setRow(row,index)"
></Checkbox>
</
template
>
</
template
>
<
template
<
template
slot-scope=
"{ row, index }"
slot=
"action"
>
slot-scope=
"{ row, index }"
slot=
"action"
v-if=
"row.fieldType==2||row.fieldType==3"
>
<a
@
click=
"remove(index,row)"
style=
"color:#FF7A8B"
>
删除
</a>
<a
@
click=
"remove(index,row)"
style=
"color:#FF7A8B"
>
删除
</a>
</
template
>
</
template
>
</Table>
</Table>
...
@@ -144,7 +135,7 @@ export default {
...
@@ -144,7 +135,7 @@ export default {
title
:
"备注"
,
title
:
"备注"
,
key
:
"note"
,
key
:
"note"
,
slot
:
"note"
slot
:
"note"
},
},
{
{
title
:
"单位"
,
title
:
"单位"
,
key
:
"unitName"
,
key
:
"unitName"
,
...
...
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