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
b62c2ed1
Commit
b62c2ed1
authored
Jun 17, 2020
by
周远喜
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'product' of
http://git.mes123.com/zhouyx/mes-ui
into product
parents
9b6cb7dd
94873de6
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
235 additions
and
148 deletions
+235
-148
add.vue
pages/materiel/classification/add.vue
+99
-55
api.js
pages/materiel/classification/api.js
+3
-1
edit.vue
pages/materiel/classification/edit.vue
+97
-57
masterData.vue
pages/materiel/classification/masterData.vue
+1
-1
sonAdd.vue
pages/materiel/classification/sonAdd.vue
+2
-2
add.vue
pages/materiel/masterData/add.vue
+5
-5
edit.vue
pages/materiel/masterData/edit.vue
+4
-5
masterData.vue
pages/materiel/masterData/masterData.vue
+24
-22
No files found.
pages/materiel/classification/add.vue
View file @
b62c2ed1
...
...
@@ -29,56 +29,91 @@
</FormItem>
</Col>
<Col
:span=
"24"
>
<h4>
扩展属性
</h4>
<Table
border
:columns=
"columns"
:data=
"checkList"
height=
"300"
>
<template
slot-scope=
"
{ row, index }" slot="title">
<div
v-if=
"row.fieldType==1||row.fieldType==2"
>
{{
row
.
title
}}
</div>
<Input
v-if=
"row.fieldType==3"
v-model=
"row.title"
placeholder=
"请输入"
@
on-blur=
"setRow(row,index)"
/>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"note"
>
<div
v-if=
"row.fieldType==1"
>
{{
row
.
note
}}
</div>
<Input
v-model=
"row.note"
placeholder=
"请输入字典编码"
@
on-blur=
"setRow(row,index)"
v-else
/>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"dataType"
>
<state
v-if=
"row.fieldType==1"
code=
"materail.category.dataType"
:value=
"row.dataType"
type=
"text"
></state>
<Dictionary
v-else
@
on-change=
"setRow(row,index)"
v-model=
"row.dataType"
code=
"materail.category.dataType"
type=
"select"
:value=
"row.dataType"
:key=
"row.dataType"
></Dictionary>
</
template
>
<!-- <template slot-scope="{ row, index }" slot="result">
<Input v-model="row.result" placeholder="请输入" @on-blur="setRow(row,index)" />
</template>-->
<
template
slot-scope=
"{ row, index }"
slot=
"required"
>
<Checkbox
v-model=
"row.required"
@
on-change=
"setRow(row,index)"
></Checkbox>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"isUnique"
>
<Checkbox
v-model=
"row.isUnique"
@
on-change=
"setRow(row,index)"
></Checkbox>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"action"
v-if=
"row.fieldType==2||row.fieldType==3"
>
<a
@
click=
"remove(index,row)"
style=
"color:#FF7A8B"
>
删除
</a>
</
template
>
</Table>
<Button
type=
"dashed"
long
@
click=
"addNew"
class=
"mt10"
>
新增属性
</Button>
<h4>
扩展属性
</h4>
<Table
border
:columns=
"columns"
:data=
"checkList"
height=
"450"
>
<template
slot-scope=
"
{ row, index }" slot="title">
<div
v-if=
"row.fieldType==1||row.fieldType==2"
>
{{
row
.
title
}}
</div>
<Input
v-if=
"row.fieldType==3"
v-model=
"row.title"
placeholder=
"请输入"
@
on-blur=
"setRow(row,index)"
/>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"note"
>
<div
v-if=
"row.fieldType==1"
>
{{
row
.
note
}}
</div>
<Input
v-model=
"row.note"
placeholder=
"请输入"
@
on-blur=
"setRow(row,index)"
v-else
/>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"dataType"
>
<Row>
<Col
:span=
"12"
>
<state
v-if=
"row.fieldType==1"
code=
"materail.category.dataType"
:value=
"row.dataType"
type=
"text"
></state>
<Dictionary
v-else
@
on-change=
"setRow(row,index)"
v-model=
"row.dataType"
code=
"materail.category.dataType"
type=
"select"
:value=
"row.dataType"
:key=
"row.dataType"
></Dictionary>
</Col>
<Col
:span=
"12"
v-if=
"row.dataType==3"
>
<div
v-if=
"row.fieldType==1"
>
'/'+
{{
row
.
dictionaryCode
}}
</div>
<Select
v-model=
"row.dictionaryCode"
clearable
transfer
v-else
@
on-change=
"setRow(row,index)"
>
<Option
v-for=
"item in codeList"
:value=
"item.code"
:key=
"item.code"
>
{{
item
.
name
}}
</Option>
</Select>
</Col>
</Row>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"unitName"
>
<state
v-if=
"row.fieldType==1"
code=
"material.main.unitName"
:value=
"row.unitName"
type=
"text"
></state>
<Dictionary
v-else
@
on-change=
"setRow(row,index)"
v-model=
"row.unitName"
code=
"material.main.unitName"
type=
"select"
:value=
"row.unitName"
:key=
"row.unitName"
></Dictionary>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"required"
>
<Checkbox
v-model=
"row.required"
@
on-change=
"setRow(row,index)"
></Checkbox>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"isUnique"
>
<Checkbox
v-model=
"row.isUnique"
@
on-change=
"setRow(row,index)"
></Checkbox>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"action"
v-if=
"row.fieldType==2||row.fieldType==3"
>
<a
@
click=
"remove(index,row)"
style=
"color:#FF7A8B"
>
删除
</a>
</
template
>
</Table>
<Button
type=
"dashed"
long
@
click=
"addNew"
class=
"mt10"
>
新增属性
</Button>
</Col>
<Col
:span=
"24"
class=
"tr mt10"
>
<FormItem>
...
...
@@ -104,6 +139,7 @@ export default {
codeRuleId
:
this
.
nodeInfo
.
codeRuleId
},
disabled
:
false
,
codeList
:
[],
columns
:
[
{
title
:
"序号"
,
...
...
@@ -126,7 +162,9 @@ export default {
{
title
:
"备注"
,
key
:
"note"
,
slot
:
"note"
align
:
"center"
,
slot
:
"note"
,
width
:
"150"
},
// {
...
...
@@ -139,13 +177,15 @@ export default {
title
:
"属性类型"
,
key
:
"dataType"
,
align
:
"center"
,
slot
:
"dataType"
slot
:
"dataType"
,
width
:
"200"
},
{
title
:
"单位"
,
key
:
"
company
"
,
key
:
"
unitName
"
,
align
:
"center"
,
slot
:
"company"
slot
:
"unitName"
,
width
:
"150"
},
{
title
:
"必填"
,
...
...
@@ -164,7 +204,6 @@ export default {
{
title
:
"操作"
,
slot
:
"action"
,
width
:
80
,
align
:
"center"
}
],
...
...
@@ -209,6 +248,11 @@ export default {
});
}
});
Api
.
getChildren
({
id
:
582
}).
then
(
r
=>
{
if
(
r
.
result
)
{
this
.
codeList
=
r
.
result
;
}
});
},
remove
(
index
,
row
)
{
if
(
row
.
add
==
0
)
{
...
...
pages/materiel/classification/api.js
View file @
b62c2ed1
...
...
@@ -26,5 +26,7 @@ export default {
delete
(
id
)
{
return
Api
.
delete
(
`
${
systemUrl
}
/category/delete`
,{
params
:{
id
:
id
}});
},
getChildren
(
params
){
return
Api
.
get
(
`
${
systemUrl
}
/Dictionary/getChildren`
,
params
);
//字典
},
}
\ No newline at end of file
pages/materiel/classification/edit.vue
View file @
b62c2ed1
...
...
@@ -29,56 +29,91 @@
</FormItem>
</Col>
<Col
:span=
"24"
>
<h4>
扩展属性
</h4>
<Table
border
:columns=
"columns"
:data=
"checkList"
height=
"300"
>
<template
slot-scope=
"
{ row, index }" slot="title">
<div
v-if=
"row.fieldType==1||row.fieldType==2"
>
{{
row
.
title
}}
</div>
<Input
v-if=
"row.fieldType==3"
v-model=
"row.title"
placeholder=
"请输入"
@
on-blur=
"setRow(row,index)"
/>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"note"
>
<div
v-if=
"row.fieldType==1"
>
{{
row
.
note
}}
</div>
<Input
v-model=
"row.note"
placeholder=
"请输入字典编码"
@
on-blur=
"setRow(row,index)"
v-else
/>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"dataType"
>
<state
v-if=
"row.fieldType==1"
code=
"materail.category.dataType"
:value=
"row.dataType"
type=
"text"
></state>
<Dictionary
v-else
@
on-change=
"setRow(row,index)"
v-model=
"row.dataType"
code=
"materail.category.dataType"
type=
"select"
:value=
"row.dataType"
:key=
"row.dataType"
></Dictionary>
</
template
>
<!-- <template slot-scope="{ row, index }" slot="result">
<Input v-model="row.result" placeholder="请输入" @on-blur="setRow(row,index)" />
</template>-->
<
template
slot-scope=
"{ row, index }"
slot=
"required"
>
<Checkbox
v-model=
"row.required"
@
on-change=
"setRow(row,index)"
></Checkbox>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"isUnique"
>
<Checkbox
v-model=
"row.isUnique"
@
on-change=
"setRow(row,index)"
></Checkbox>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"action"
v-if=
"row.fieldType==2||row.fieldType==3"
>
<a
@
click=
"remove(index,row)"
style=
"color:#FF7A8B"
>
删除
</a>
</
template
>
</Table>
<Button
type=
"dashed"
long
@
click=
"addNew"
class=
"mt10"
>
新增属性
</Button>
<h4>
属性配置
</h4>
</Col>
<Col
:span=
"24"
style=
"padding:20px 0 0px 10px;margin-bottom:10px;"
class=
"table-solt"
>
<!--fieldType 1.固有,2.默认,3自定义; -->
<Table
border
:columns=
"columns"
:data=
"checkList"
class=
"tableCommon"
height=
"450"
>
<template
slot-scope=
"
{ row, index }" slot="title">
<div
v-if=
"row.fieldType==1||row.fieldType==2"
>
{{
row
.
title
}}
</div>
<Input
v-else
v-model=
"row.title"
placeholder=
"请输入"
@
on-blur=
"setRow(row,index)"
/>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"note"
>
<div
v-if=
"row.fieldType==1"
>
{{
row
.
note
}}
</div>
<Input
v-model=
"row.note"
placeholder=
"请输入"
@
on-blur=
"setRow(row,index)"
v-else
/>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"dataType"
>
<Row>
<Col
:span=
"12"
>
<state
v-if=
"row.fieldType==1"
code=
"materail.category.dataType"
:value=
"row.dataType"
type=
"text"
></state>
<Dictionary
v-else
@
on-change=
"setRow(row,index)"
v-model=
"row.dataType"
code=
"materail.category.dataType"
type=
"select"
:value=
"row.dataType"
:key=
"row.dataType"
></Dictionary>
</Col>
<Col
:span=
"12"
v-if=
"row.dataType==3"
>
<div
v-if=
"row.fieldType==1"
>
'/'+
{{
row
.
dictionaryCode
}}
</div>
<Select
v-model=
"row.dictionaryCode"
clearable
transfer
v-else
@
on-change=
"setRow(row,index)"
>
<Option
v-for=
"item in codeList"
:value=
"item.code"
:key=
"item.code"
>
{{
item
.
name
}}
</Option>
</Select>
</Col>
</Row>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"unitName"
>
<state
v-if=
"row.fieldType==1"
code=
"material.main.unitName"
:value=
"row.unitName"
type=
"text"
></state>
<Dictionary
v-else
@
on-change=
"setRow(row,index)"
v-model=
"row.unitName"
code=
"material.main.unitName"
type=
"select"
:value=
"row.unitName"
:key=
"row.unitName"
></Dictionary>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"required"
>
<Checkbox
v-model=
"row.required"
@
on-change=
"setRow(row,index)"
></Checkbox>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"isUnique"
>
<Checkbox
v-model=
"row.isUnique"
@
on-change=
"setRow(row,index)"
></Checkbox>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"action"
v-if=
"row.fieldType==2||row.fieldType==3||!row.notEditDelete"
>
<!-- notEditDelete=true,删除不显示 -->
<a
@
click=
"remove(index,row)"
style=
"color:#FF7A8B"
>
删除
</a>
</
template
>
</Table>
</Col>
<Col
:span=
"24"
style=
"margin-bottom:20px;"
>
<Button
type=
"primary"
long
@
click=
"addNew"
class=
"mt10"
>
添加
</Button>
</Col>
<Col
:span=
"24"
class=
"tr mt10"
>
<FormItem>
...
...
@@ -127,13 +162,18 @@ export default {
key
:
"note"
,
slot
:
"note"
},
// {
// title: "是否显示",
// key: "result",
// align: "center",
// slot: "result"
// },
{
title
:
"属性类型"
,
key
:
"dataType"
,
align
:
"center"
,
slot
:
"dataType"
},
{
title
:
"单位"
,
key
:
"unitName"
,
align
:
"center"
,
slot
:
"unitName"
},
{
title
:
"必填"
,
key
:
"required"
,
...
...
pages/materiel/classification/masterData.vue
View file @
b62c2ed1
...
...
@@ -111,7 +111,7 @@ export default {
},
methods
:
{
search
()
{
alert
(
JSON
.
stringify
(
this
.
easySearch
));
//
alert(JSON.stringify(this.easySearch));
console
.
log
(
this
.
easySearch
);
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
},
...
...
pages/materiel/classification/sonAdd.vue
View file @
b62c2ed1
...
...
@@ -7,11 +7,11 @@
<Input
v-model=
"upName"
placeholder=
"请输入"
disabled
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<
!--
<
Col
:span=
"12"
>
<FormItem
label=
"编码"
prop=
"code"
>
<Input
v-model=
"entity.code"
placeholder=
"请输入"
disabled
></Input>
</FormItem>
</Col>
</Col>
-->
<Col
:span=
"12"
>
<FormItem
label=
"名称"
prop=
"name"
>
<Input
v-model=
"entity.name"
placeholder=
"请输入"
></Input>
...
...
pages/materiel/masterData/add.vue
View file @
b62c2ed1
...
...
@@ -2,27 +2,27 @@
<div>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<Col
:span=
"12"
>
<
!--
<
Col
:span=
"12"
>
<FormItem
label=
"编码"
prop=
"code"
>
<Input
v-model=
"entity.code"
placeholder=
"请输入"
disabled
></Input>
</FormItem>
</Col>
</Col>
-->
<Col
:span=
"12"
>
<FormItem
label=
"名称"
prop=
"name"
>
<Input
v-model=
"entity.name"
placeholder=
"请输入"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<
!--
<
Col
:span=
"12"
>
<FormItem
label=
"状态"
prop=
"status"
placeholder=
"请选择"
>
<Dictionary
code=
"mater
ail.category
.status"
code=
"mater
ial.main
.status"
v-model=
"entity.status"
type=
"select"
:value=
"entity.status"
:key=
"entity.status"
></Dictionary>
</FormItem>
</Col>
</Col>
-->
<Col
:span=
"12"
>
<FormItem
label=
"版本"
prop=
"version"
>
<Input
v-model=
"entity.version"
placeholder=
"请输入"
></Input>
...
...
pages/materiel/masterData/edit.vue
View file @
b62c2ed1
...
...
@@ -13,9 +13,9 @@
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
label=
"状态"
prop=
"status"
placeholder=
"请选择"
>
<Dictionary
code=
"mater
ail.category
.status"
<FormItem
label=
"状态"
prop=
"status"
placeholder=
"请选择"
v-if=
"entity.status==3||entity.status==2"
>
<Dictionary
code=
"mater
ial.main
.status"
v-model=
"entity.status"
type=
"select"
:value=
"entity.status"
...
...
@@ -67,7 +67,7 @@
<
script
>
import
Api
from
"./api"
;
export
default
{
props
:
[
"nodeInfo"
,
'eid'
],
props
:
[
"nodeInfo"
,
"eid"
],
data
()
{
return
{
arr
:
[],
...
...
@@ -162,7 +162,6 @@ export default {
});
},
remove
(
index
,
row
)
{
// if (row.add == 0) {
// //新增的删除,直接删
// this.checkList.splice(index, 1);
...
...
pages/materiel/masterData/masterData.vue
View file @
b62c2ed1
...
...
@@ -120,7 +120,7 @@ export default {
render
:
(
h
,
params
)
=>
{
return
h
(
"state"
,
{
props
:
{
code
:
"mater
ail.category
.status"
,
code
:
"mater
ial.main
.status"
,
type
:
"text"
,
value
:
params
.
row
.
status
+
""
}
...
...
@@ -137,19 +137,19 @@ export default {
title
:
"描述"
,
align
:
"left"
},
{
{
key
:
"creationTime"
,
title
:
"创建时间"
,
hide
:
false
,
align
:
"left"
,
type
:
"date"
},
{
{
key
:
"creatorUserId"
,
title
:
"创建人"
,
hide
:
false
,
hide
:
false
,
align
:
"left"
,
type
:
"user"
type
:
"user"
},
{
title
:
"操作"
,
...
...
@@ -241,24 +241,26 @@ export default {
}).
then
(
r
=>
{
if
(
r
.
result
)
{
var
items
=
r
.
result
.
filter
(
u
=>
{
return
!
this
.
columns
.
some
(
p
=>
{
return
p
.
key
==
u
.
field
;
})
&&
u
.
dataType
!=
5
;
return
(
!
this
.
columns
.
some
(
p
=>
{
return
p
.
key
==
u
.
field
;
})
&&
u
.
dataType
!=
5
);
});
this
.
cols
=
this
.
$u
.
clone
(
this
.
columns
);
let
extra
=
items
.
map
(
u
=>
{
var
col
=
{
key
:
u
.
field
,
title
:
u
.
title
this
.
cols
=
this
.
$u
.
clone
(
this
.
columns
);
let
extra
=
items
.
map
(
u
=>
{
var
col
=
{
key
:
u
.
field
,
title
:
u
.
title
};
if
(
u
.
dataType
==
3
)
{
col
.
code
=
u
.
note
;
if
(
u
.
dataType
==
3
)
{
col
.
code
=
u
.
note
;
}
return
col
})
this
.
cols
=
this
.
cols
.
concat
(
extra
);
var
action
=
this
.
cols
.
splice
(
this
.
columns
.
length
-
1
,
1
);
this
.
cols
.
push
(
this
.
columns
[
this
.
columns
.
length
-
1
]);
return
col
;
})
;
this
.
cols
=
this
.
cols
.
concat
(
extra
);
var
action
=
this
.
cols
.
splice
(
this
.
columns
.
length
-
1
,
1
);
this
.
cols
.
push
(
this
.
columns
[
this
.
columns
.
length
-
1
]);
}
});
},
...
...
@@ -330,8 +332,8 @@ export default {
watch
:
{
nodeInfo
:
{
handler
(
newName
,
oldName
)
{
console
.
log
(
"ovo"
,
newName
,
oldName
)
if
(
newName
.
rootCategoryId
)
{
console
.
log
(
"ovo"
,
newName
,
oldName
);
if
(
newName
.
rootCategoryId
)
{
this
.
initCols
();
}
if
(
newName
.
categoryId
)
{
...
...
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