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
7f4784df
Commit
7f4784df
authored
Sep 21, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文档分类
parent
79722922
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
897 additions
and
494 deletions
+897
-494
user.vue
components/page/user.vue
+1
-1
workShopName.vue
components/page/workShopName.vue
+2
-1
zh-CN.js
i18n/locale/zh-CN.js
+25
-1
add.vue
pages/materiel/classification/add.vue
+3
-2
edit.vue
pages/materiel/classification/edit.vue
+2
-2
add.vue
pages/word/classification/add.vue
+319
-116
api.js
pages/word/classification/api.js
+26
-27
detail.vue
pages/word/classification/detail.vue
+29
-18
edit.vue
pages/word/classification/edit.vue
+289
-96
index.vue
pages/word/classification/index.vue
+122
-118
search.vue
pages/word/classification/search.vue
+79
-112
No files found.
components/page/user.vue
View file @
7f4784df
...
@@ -87,6 +87,6 @@ export default {
...
@@ -87,6 +87,6 @@ export default {
color: @s1-color;
color: @s1-color;
}
}
.s0 {
.s0 {
color:
#ddd
;
color:
@table-color
;
}
}
</
style
>
</
style
>
\ No newline at end of file
components/page/workShopName.vue
View file @
7f4784df
...
@@ -40,6 +40,7 @@ export default {
...
@@ -40,6 +40,7 @@ export default {
};
};
</
script
>
</
script
>
<
style
lang=
"less"
>
<
style
lang=
"less"
>
@import "../../assets/css/custom.less";
.s2 {
.s2 {
color: red;
color: red;
}
}
...
@@ -47,6 +48,6 @@ export default {
...
@@ -47,6 +48,6 @@ export default {
color: #333;
color: #333;
}
}
.s0 {
.s0 {
color:
#ddd
;
color:
@table-color
;
}
}
</
style
>
</
style
>
\ No newline at end of file
i18n/locale/zh-CN.js
View file @
7f4784df
...
@@ -1707,5 +1707,29 @@ export default {
...
@@ -1707,5 +1707,29 @@ export default {
messageType
:
'类别'
,
messageType
:
'类别'
,
content
:
'内容'
,
content
:
'内容'
,
},
//文档分类
document_category
:{
creationTime
:
'创建时间'
,
creatorUserId
:
'创建人'
,
lastModificationTime
:
'更新时间'
,
lastModifierUserId
:
'更新人'
,
isDeleted
:
'删除人'
,
deletionTime
:
'删除时间'
,
deleterUserId
:
'删除人'
,
name
:
'分类名称'
,
upId
:
'上级id'
,
level
:
'层级'
,
totalDocument
:
'分类下总文档数'
,
tenantId
:
'租户id'
,
type
:
'类别'
,
englishFullName
:
'英文全称'
,
englishName
:
'英文简称'
,
status
:
''
,
inheritCategoryId
:
'继承'
,
//继承分类id
template
:
'上传模板'
,
//模板路径
templateId
:
''
,
status
:
'状态'
,
description
:
'备注'
}
}
}
}
pages/materiel/classification/add.vue
View file @
7f4784df
...
@@ -29,8 +29,9 @@
...
@@ -29,8 +29,9 @@
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"24"
>
<Col
:span=
"24"
>
<h4>
扩展属性
</h4>
<Divider
orientation=
"left"
>
扩展属性
</Divider>
<Table
:columns=
"columns"
:data=
"checkList"
>
<!--
<h4>
扩展属性
</h4>
-->
<Table
:columns=
"columns"
:data=
"checkList"
border
>
<template
slot-scope=
"
{ row, index }" slot="title">
<template
slot-scope=
"
{ row, index }" slot="title">
<div
v-if=
"row.fieldType==1||row.fieldType==2"
>
{{
row
.
title
}}
</div>
<div
v-if=
"row.fieldType==1||row.fieldType==2"
>
{{
row
.
title
}}
</div>
<Input
<Input
...
...
pages/materiel/classification/edit.vue
View file @
7f4784df
...
@@ -29,8 +29,8 @@
...
@@ -29,8 +29,8 @@
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"24"
>
<Col
:span=
"24"
>
<h4>
扩展属性
</h4
>
<Divider
orientation=
"left"
>
扩展属性
</Divider
>
<Table
border
:columns=
"columns"
:data=
"checkList"
>
<Table
border
:columns=
"columns"
:data=
"checkList"
>
<template
slot-scope=
"
{ row, index }" slot="title">
<template
slot-scope=
"
{ row, index }" slot="title">
<div
v-if=
"row.fieldType==1||row.fieldType==2"
>
{{
row
.
title
}}
</div>
<div
v-if=
"row.fieldType==1||row.fieldType==2"
>
{{
row
.
title
}}
</div>
<Input
<Input
...
...
pages/word/classification/add.vue
View file @
7f4784df
<
template
>
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"
9
0"
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"
10
0"
>
<Row>
<Row>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('
title')"
prop=
"titl
e"
>
<FormItem
:label=
"l('
name')"
prop=
"nam
e"
>
<Input
v-model=
"entity.
titl
e"
></Input>
<Input
v-model=
"entity.
nam
e"
></Input>
</FormItem>
</FormItem>
</Col>
</Col>
<!--
<Col
:span=
"12"
>
<FormItem
:label=
"l('tenantId')"
prop=
"tenantId"
>
<InputNumber
v-model=
"entity.tenantId"
></InputNumber>
</FormItem>
</Col>
-->
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('code')"
prop=
"code"
>
<FormItem
:label=
"l('type')"
prop=
"type"
>
<Input
v-model=
"entity.code"
></Input>
<Dictionary
code=
"word_classification_type"
v-model=
"entity.type"
></Dictionary>
<!--
<InputNumber
v-model=
"entity.type"
></InputNumber>
-->
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('
description')"
prop=
"description
"
>
<FormItem
:label=
"l('
englishFullName')"
prop=
"englishFullName
"
>
<Input
v-model=
"entity.
description
"
></Input>
<Input
v-model=
"entity.
englishFullName
"
></Input>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
v-if=
"user"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('userName')"
prop=
"userName"
>
<FormItem
:label=
"l('englishName')"
prop=
"englishName"
>
<UserSelect
<Input
v-model=
"entity.englishName"
></Input>
ref=
"userSelected"
:roleTitle=
"roleTitle"
v-model=
"entity.userIds"
:multiple=
"true"
@
on-change=
"userChange"
/>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
label=
"物料类型"
prop=
"materialType"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<Select
v-model=
"entity.materialType"
multiple
@
on-change=
"changeVal"
>
<Dictionary
code=
"word_classification_status"
v-model=
"entity.status"
></Dictionary>
<Option
v-for=
"item in list"
:value=
"item.id"
:key=
"item.id"
>
{{
item
.
name
}}
</Option>
<!--
<InputNumber
v-model=
"entity.status"
></InputNumber>
-->
</Select>
</FormItem>
</FormItem>
</Col>
</Col>
</Row>
<Col
:span=
"12"
>
<FormItem
:label=
"l('inheritCategoryId')"
prop=
"inheritCategoryId"
>
<!--
<Checkbox
v-model=
"entity.inheritCategoryId"
></Checkbox>
-->
<RadioGroup
v-model=
"entity.inheritCategoryId"
>
<Radio
label=
"1"
>
是
</Radio>
<Radio
label=
"0"
>
否
</Radio>
</RadioGroup>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('description')"
prop=
"description"
>
<Input
v-model=
"entity.description"
type=
"textarea"
:rows=
"5"
></Input>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('template')"
prop=
"template"
>
<!--
<Input
v-model=
"entity.template"
type=
"textarea"
:rows=
"5"
></Input>
-->
<files
ref=
"refFile"
:parms=
"parms"
files
/>
</FormItem>
</Col>
<!--
<Col
:span=
"24"
>
<FormItem
:label=
"l('templateId')"
prop=
"templateId"
>
<Input
v-model=
"entity.templateId"
></Input>
</FormItem>
</Col>
-->
<Col
:span=
"24"
>
<Divider
orientation=
"left"
>
扩展属性
</Divider>
<Table
:columns=
"columns"
:data=
"checkList"
border
>
<template
slot-scope=
"
{ row, index }" slot="title">
<div
v-if=
"row.fieldType==1||row.fieldType==2"
>
{{
row
.
title
}}
</div>
<Input
v-model=
"row.title"
placeholder=
"请输入名称"
@
on-blur=
"setRow(row,index)"
v-if=
"row.fieldType==3"
/>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"note"
>
<!--
<Input
v-if=
"row.dataType==3"
v-model=
"row.note"
placeholder=
"请输入字典编码"
@
on-blur=
"setRow(row,index)"
/>
-->
<Select
v-if=
"row.dataType==3"
v-model=
"row.note"
clearable
transfer
@
on-change=
"setRow(row,index)"
>
<Option
v-for=
"item in codeList"
:value=
"item.code"
:key=
"item.code"
>
{{
item
.
name
}}
</Option>
</Select>
<span
v-else
>
{{
row
.
note
}}
</span>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"dataType"
>
<Dictionary
@
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=
"unitName"
>
<Dictionary
v-if=
"row.dataType==1||row.dataType==2"
@
on-change=
"setRow(row,index)"
v-model=
"row.unitName"
code=
"material.main.unitName"
type=
"select"
placeholder=
"请选择单位"
: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"
>
<a
@
click=
"remove(index,row)"
style=
"color:#FF7A8B"
v-if=
"row.fieldType>1"
>
删除
</a>
</
template
>
</Table>
<Button
type=
"dashed"
long
@
click=
"addNew"
class=
"mt10"
>
新增属性
</Button>
</Col>
<Col
:span=
"24"
class=
"tr mt10"
>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Col>
</Row>
</Form>
</Form>
</template>
</template>
<
script
>
<
script
>
...
@@ -47,104 +134,218 @@ export default {
...
@@ -47,104 +134,218 @@ export default {
name
:
"Add"
,
name
:
"Add"
,
data
()
{
data
()
{
return
{
return
{
list
:
[],
disabled
:
false
,
roleTitle
:
"库管员"
,
entity
:
{
entity
:
{
creationTime
:
null
,
// creationTime: null,
creatorUserId
:
null
,
creatorUserId
:
this
.
$store
.
state
.
userInfo
.
userId
,
lastModificationTime
:
null
,
// creator: this.$store.state.userInfo.userName,
lastModifierUserId
:
null
,
// lastModificationTime: null,
isDeleted
:
null
,
// lastModifierUserId: null,
deleterUserId
:
null
,
// isDeleted: null,
deletionTime
:
null
,
// deletionTime: null,
upId
:
this
.
upId
,
// deleterUserId: null,
materialType
:
""
,
name
:
""
,
materialTypeName
:
""
,
upId
:
0
,
title
:
""
,
level
:
1
,
//层级,顶级1,
code
:
""
,
totalDocument
:
0
,
status
:
null
,
// tenantId: null,
type
:
0
,
englishFullName
:
""
,
englishName
:
""
,
status
:
0
,
description
:
""
,
description
:
""
,
level
:
this
.
level
,
inheritCategoryId
:
"0"
,
//0否,1是
userName
:
""
,
template
:
""
,
userIds
:
""
,
templateId
:
""
,
codeRuleType
:
""
,
},
},
rules
:
{
rules
:
{
titl
e
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
nam
e
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
},
},
};
checkList
:
[
{
field
:
"code"
,
title
:
"编号"
,
note
:
""
,
dataType
:
0
,
unitName
:
""
,
required
:
true
,
isunique
:
false
,
fieldType
:
1
,
categoryId
:
0
,
action
:
1
,
add
:
0
,
//新增标识
},
},
props
:
{
{
v
:
Object
,
field
:
"version"
,
eid
:
Number
,
title
:
"版本"
,
level
:
Number
,
note
:
""
,
upId
:
Number
,
dataType
:
0
,
user
:
{
unitName
:
""
,
type
:
Boolean
,
required
:
true
,
default
:
true
,
isunique
:
false
,
fieldType
:
1
,
categoryId
:
0
,
action
:
1
,
add
:
0
,
//新增标识
},
},
{
field
:
"name"
,
title
:
"标题"
,
note
:
""
,
dataType
:
0
,
unitName
:
""
,
required
:
true
,
isunique
:
false
,
fieldType
:
1
,
//共有属性(不能删除)
categoryId
:
0
,
action
:
1
,
add
:
0
,
//新增标识
},
},
mounted
()
{
{
this
.
getList
();
field
:
"description"
,
title
:
"文档详细说明"
,
note
:
""
,
dataType
:
0
,
unitName
:
""
,
required
:
true
,
isunique
:
false
,
fieldType
:
1
,
//共有属性(不能删除)
categoryId
:
0
,
action
:
1
,
add
:
0
,
//新增标识
},
],
columns
:
[
{
title
:
"序号"
,
type
:
"index"
,
width
:
80
,
align
:
"center"
,
},
},
methods
:
{
getList
()
{
let
data
=
{
conditions
:
[
{
{
fieldName
:
"upId"
,
title
:
"属性名称"
,
fieldValue
:
0
,
key
:
"title"
,
conditionalType
:
"Equal"
,
slot
:
"title"
,
},
{
title
:
"属性类型"
,
key
:
"dataType"
,
align
:
"center"
,
slot
:
"dataType"
,
width
:
200
,
},
{
title
:
"设置"
,
key
:
"note"
,
align
:
"center"
,
slot
:
"note"
,
},
{
title
:
"单位"
,
key
:
"unitName"
,
align
:
"center"
,
slot
:
"unitName"
,
width
:
"150"
,
},
{
title
:
"必填"
,
key
:
"required"
,
align
:
"center"
,
slot
:
"required"
,
width
:
80
,
},
{
title
:
"唯一"
,
key
:
"isUnique"
,
align
:
"center"
,
slot
:
"isUnique"
,
width
:
80
,
},
{
width
:
80
,
title
:
"操作"
,
slot
:
"action"
,
align
:
"center"
,
},
},
],
],
parms
:
{
app
:
"material"
,
eid
:
null
,
name
:
""
,
field
:
""
,
},
};
};
Api
.
list
(
data
).
then
((
r
)
=>
{
this
.
list
=
r
.
result
;
// console.log(this.list);
});
},
},
changeVal
(
val
)
{
props
:
{
let
code
=
[];
row
:
Object
,
let
type
=
[];
eid
:
Number
,
for
(
let
i
=
0
;
i
<
this
.
list
.
length
;
i
++
)
{
},
let
obj
=
this
.
list
[
i
];
mounted
()
{
for
(
let
j
=
0
;
j
<
val
.
length
;
j
++
)
{
// if (this.eid > 0) {
if
(
obj
.
id
==
val
[
j
])
{
// this.load(this.eid);
code
.
push
(
obj
.
code
);
// }
type
.
push
(
obj
.
codeRuleType
);
this
.
parms
.
eid
=
this
.
$u
.
guid
();
}
this
.
$refs
.
refFile
.
intFiles
();
},
methods
:
{
addNew
()
{
let
maxId
=
0
;
this
.
checkList
.
map
((
u
)
=>
{
if
(
u
.
mid
>
maxId
)
{
maxId
=
u
.
mid
;
}
}
});
let
obj
=
{
mid
:
maxId
+
1
,
field
:
"c"
+
maxId
,
title
:
""
,
note
:
""
,
unitName
:
""
,
dataType
:
0
,
required
:
false
,
isunique
:
false
,
fieldType
:
3
,
categoryId
:
0
,
action
:
1
,
add
:
0
,
//新增标识
};
this
.
checkList
.
push
(
obj
);
},
remove
(
index
,
row
)
{
if
(
row
.
add
==
0
)
{
//新增的删除,直接删
this
.
checkList
.
splice
(
index
,
1
);
}
else
{
row
.
action
=
2
;
//返回的默认删除,删除后保存在arr数组中,添加标识action = 2,然后点击保存的时候,一起传给后台
this
.
$set
(
this
.
checkList
,
index
,
row
);
this
.
arr
.
push
(
row
);
this
.
checkList
.
splice
(
index
,
1
);
}
}
},
this
.
entity
.
materialTypeName
=
code
.
join
(
","
);
setRow
(
row
,
index
)
{
this
.
entity
.
codeRuleType
=
type
.
join
(
","
);
this
.
$set
(
this
.
checkList
,
index
,
row
);
},
},
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
let
userNam
=
""
;
if
(
this
.
$refs
.
refFile
.
nameList
.
length
>
0
)
{
let
userId
=
""
;
this
.
entity
.
templateId
=
this
.
parms
.
eid
;
if
(
this
.
user
)
{
}
else
{
userId
=
this
.
entity
.
userIds
.
join
(
","
);
// this.entity.filePath = "";
userNam
=
this
.
$refs
.
userSelected
.
getSelectNames
().
join
(
","
);
this
.
entity
.
templateId
=
""
;
}
if
(
this
.
row
.
id
)
{
this
.
entity
.
upId
=
this
.
row
.
id
;
this
.
entity
.
level
=
this
.
row
.
level
;
}
else
{
this
.
entity
.
upId
=
0
;
this
.
entity
.
level
=
1
;
}
}
let
materialType
=
this
.
entity
.
materialType
.
join
(
","
);
let
data
=
{
let
paramsdata
=
{
cat
:
this
.
entity
,
id
:
this
.
entity
.
id
,
pros
:
this
.
checkList
,
upId
:
this
.
entity
.
upId
,
title
:
this
.
entity
.
title
,
//库位名称
code
:
this
.
entity
.
code
,
//库位编号
description
:
this
.
entity
.
description
,
//位置
level
:
this
.
entity
.
level
,
userName
:
userNam
,
//库管员
userIds
:
userId
,
//库管员id
materialType
:
materialType
,
//物料类型
materialTypeName
:
this
.
entity
.
materialTypeName
,
//物料编码
codeRuleType
:
this
.
entity
.
codeRuleType
,
};
};
Api
.
create
(
data
)
Api
.
create
(
paramsdata
)
.
then
((
r
)
=>
{
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$Message
.
success
(
"保存成功"
);
...
@@ -154,6 +355,7 @@ export default {
...
@@ -154,6 +355,7 @@ export default {
}
}
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败"
);
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
console
.
warn
(
err
);
});
});
...
@@ -163,25 +365,26 @@ export default {
...
@@ -163,25 +365,26 @@ export default {
handleClose
()
{
handleClose
()
{
this
.
$emit
(
"on-close"
);
this
.
$emit
(
"on-close"
);
},
},
load
(
v
)
{
// load(v) {
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
// Api.get({ id: v }).then((r) => {
this
.
entity
=
r
.
result
;
// this.entity = r.result;
this
.
entity
.
id
=
0
;
// this.entity.id = 0;
});
// });
},
// },
userChange
(
val
)
{},
l
(
key
)
{
l
(
key
)
{
key
=
"
store_room_location
"
+
"."
+
key
;
key
=
"
document_category
"
+
"."
+
key
;
return
this
.
$t
(
key
);
return
this
.
$t
(
key
);
},
},
},
},
watch
:
{
watch
:
{
v
()
{
// v() {
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
);
// this.entity = this.$u.clone(this.v);
},
// },
user
(
v
)
{
// eid(v) {
this
.
user
=
v
;
// if (v > 0) {
},
// this.load(v);
// }
// },
},
},
};
};
</
script
>
</
script
>
\ No newline at end of file
pages/word/classification/api.js
View file @
7f4784df
import
Api
from
'@/plugins/request'
import
Api
from
'@/plugins/request'
export
default
{
export
default
{
index
:
`
${
material
}
/documentcategory/paged`
,
index
:
`
${
material
}
/documentcategory/paged`
,
paged
(
params
)
{
paged
(
params
)
{
return
Api
.
post
(
`
${
material
}
/documentcategory/paged`
,
params
);
return
Api
.
post
(
`
${
material
}
/documentcategory/paged`
,
params
);
},
},
getList
(
params
)
{
get
(
params
)
{
return
Api
.
post
(
`
${
material
}
/documentcategory/list`
,
params
);
return
Api
.
get
(
`
${
material
}
/documentcategory/get`
,
params
);
},
},
get
(
params
)
{
create
(
params
)
{
return
Api
.
get
(
`
${
material
}
/documentcategory/get`
,
params
);
return
Api
.
post
(
`
${
material
}
/documentcategory/create`
,
params
);
},
},
create
(
params
)
{
update
(
params
){
return
Api
.
post
(
`
${
material
}
/documentcategory/create`
,
params
);
return
Api
.
post
(
`
${
material
}
/documentcategory/update`
,
params
);
},
update
(
params
)
{
return
Api
.
post
(
`
${
material
}
/documentcategory/update`
,
params
);
},
},
delete
(
id
)
{
delete
(
id
)
{
return
Api
.
delete
(
`
${
material
}
/documentcategory/delete`
,
{
return
Api
.
delete
(
`
${
material
}
/documentcategory/delete`
,{
params
:{
id
:
id
}});
params
:
{
id
:
id
}
});
},
},
list
(
params
)
{
deletes
(
params
)
{
return
Api
.
post
(
`
${
material
}
/
category/list`
,
params
);
//物料类型列表
return
Api
.
post
(
`
${
material
}
/
documentcategory/batchdelete`
,
params
);
},
},
}
//文档属性定义列表
list
(
params
){
return
Api
.
post
(
`
${
material
}
/documentpropertydefinition/list`
,
params
);
},
}
\ No newline at end of file
pages/word/classification/detail.vue
View file @
7f4784df
<
template
>
<
template
>
<div
class=
"detail"
>
<div
class=
"detail"
>
<Row>
<Row>
<Filed
:span=
"12"
:name=
"l('title')"
>
{{
entity
.
title
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('creationTime')"
>
{{
entity
.
creationTime
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('code')"
>
{{
entity
.
code
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('description')"
>
{{
entity
.
description
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('level')"
>
<state
code=
"store.level"
:value=
"entity.level+''"
type=
"text"
></state>
</Filed>
<Filed
:span=
"12"
:name=
"l('creatorUserId')"
>
<Filed
:span=
"12"
:name=
"l('creatorUserId')"
>
<User
:value=
"entity.creatorUserId"
/>
<User
:value=
"entity.creatorUserId"
/>
</Filed>
</Filed>
<Filed
:span=
"12"
:name=
"l('creationTime')"
>
{{
entity
.
creationTime
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('name')"
>
{{
entity
.
name
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('lastModifierUserId')"
>
<Filed
:span=
"12"
:name=
"l('level')"
>
{{
entity
.
level
}}
</Filed>
<User
:value=
"entity.lastModifierUserId"
/>
<Filed
:span=
"12"
:name=
"l('totalDocument')"
>
{{
entity
.
totalDocument
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('type')"
>
<state
code=
"word_classification_type"
:value=
"entity.type+''"
type=
"text"
></state>
</Filed>
<Filed
:span=
"12"
:name=
"l('englishFullName')"
>
{{
entity
.
englishFullName
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('englishName')"
>
{{
entity
.
englishName
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('status')"
>
<state
code=
"word_classification_status"
:value=
"entity.status+''"
type=
"text"
></state>
</Filed>
<Filed
:span=
"12"
:name=
"l('description')"
>
{{
entity
.
description
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('inheritCategoryId')"
>
{{
entity
.
inheritCategoryId
==
0
?
"否"
:
"是"
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('template')"
>
<files
ref=
"refFile"
:parms=
"parms"
fileFormat
:showList=
"false"
/>
</Filed>
</Filed>
<Filed
:span=
"12"
:name=
"l('lastModificationTime')"
>
{{
entity
.
lastModificationTime
}}
</Filed>
<Filed
:span=
"24"
name=
"物料编号"
>
{{
entity
.
materialTypeName
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('userName')"
>
{{
entity
.
userName
}}
</Filed>
</Row>
</Row>
</div>
</div>
</
template
>
</
template
>
...
@@ -31,6 +35,12 @@ export default {
...
@@ -31,6 +35,12 @@ export default {
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
},
},
parms
:
{
app
:
"material"
,
eid
:
null
,
name
:
""
,
field
:
""
,
},
};
};
},
},
props
:
{
props
:
{
...
@@ -45,14 +55,15 @@ export default {
...
@@ -45,14 +55,15 @@ export default {
load
(
v
)
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
;
this
.
entity
=
r
.
result
;
this
.
$emit
(
"on-load"
);
this
.
parms
.
eid
=
r
.
result
.
templateId
;
// this.$emit("on-load");
});
});
},
},
handleClose
()
{
//
handleClose() {
this
.
$emit
(
"on-close"
);
//
this.$emit("on-close");
},
//
},
l
(
key
)
{
l
(
key
)
{
key
=
"
store_room_location
"
+
"."
+
key
;
key
=
"
document_category
"
+
"."
+
key
;
return
this
.
$t
(
key
);
return
this
.
$t
(
key
);
},
},
},
},
...
...
pages/word/classification/edit.vue
View file @
7f4784df
...
@@ -2,42 +2,131 @@
...
@@ -2,42 +2,131 @@
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<Row>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('
title')"
prop=
"titl
e"
>
<FormItem
:label=
"l('
name')"
prop=
"nam
e"
>
<Input
v-model=
"entity.
titl
e"
></Input>
<Input
v-model=
"entity.
nam
e"
></Input>
</FormItem>
</FormItem>
</Col>
</Col>
<!--
<Col
:span=
"12"
>
<FormItem
:label=
"l('tenantId')"
prop=
"tenantId"
>
<InputNumber
v-model=
"entity.tenantId"
></InputNumber>
</FormItem>
</Col>
-->
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('code')"
prop=
"code"
>
<FormItem
:label=
"l('type')"
prop=
"type"
>
<Input
v-model=
"entity.code"
></Input>
<Dictionary
code=
"word_classification_type"
v-model=
"entity.type"
></Dictionary>
<!--
<InputNumber
v-model=
"entity.type"
></InputNumber>
-->
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('
description')"
prop=
"description
"
>
<FormItem
:label=
"l('
englishFullName')"
prop=
"englishFullName
"
>
<Input
v-model=
"entity.
description
"
></Input>
<Input
v-model=
"entity.
englishFullName
"
></Input>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
v-if=
"user"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('userName')"
prop=
"userName"
>
<FormItem
:label=
"l('englishName')"
prop=
"englishName"
>
<UserSelect
<Input
v-model=
"entity.englishName"
></Input>
ref=
"userSelected"
:roleTitle=
"roleTitle"
v-model=
"entity.userIds"
:multiple=
"true"
/>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
label=
"物料类型"
prop=
"materialType"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<Select
v-model=
"materialType"
multiple
@
on-change=
"changeVal"
>
<Dictionary
code=
"word_classification_status"
v-model=
"entity.status"
></Dictionary>
<Option
v-for=
"item in list"
:value=
"item.id"
:key=
"item.id"
>
{{
item
.
name
}}
</Option>
<!--
<InputNumber
v-model=
"entity.status"
></InputNumber>
-->
</Select>
</FormItem>
</FormItem>
</Col>
</Col>
</Row>
<Col
:span=
"12"
>
<FormItem
:label=
"l('inheritCategoryId')"
prop=
"inheritCategoryId"
>
<!--
<Checkbox
v-model=
"entity.inheritCategoryId"
></Checkbox>
-->
<RadioGroup
v-model=
"entity.inheritCategoryId"
>
<Radio
label=
"1"
>
是
</Radio>
<Radio
label=
"0"
>
否
</Radio>
</RadioGroup>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('description')"
prop=
"description"
>
<Input
v-model=
"entity.description"
type=
"textarea"
:rows=
"5"
></Input>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('template')"
prop=
"templateId"
>
<!--
<Input
v-model=
"entity.template"
type=
"textarea"
:rows=
"5"
></Input>
-->
<files
ref=
"refFile"
:parms=
"parms"
files
/>
</FormItem>
</Col>
<!--
<Col
:span=
"24"
>
<FormItem
:label=
"l('templateId')"
prop=
"templateId"
>
<Input
v-model=
"entity.templateId"
></Input>
</FormItem>
</Col>
-->
<Col
:span=
"24"
>
<Divider
orientation=
"left"
>
扩展属性
</Divider>
<Table
:columns=
"columns"
:data=
"checkList"
border
>
<template
slot-scope=
"
{ row, index }" slot="title">
<div
v-if=
"row.fieldType==1||row.fieldType==2"
>
{{
row
.
title
}}
</div>
<Input
v-model=
"row.title"
placeholder=
"请输入名称"
@
on-blur=
"setRow(row,index)"
v-if=
"row.fieldType==3"
/>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"note"
>
<!--
<Input
v-if=
"row.dataType==3"
v-model=
"row.note"
placeholder=
"请输入字典编码"
@
on-blur=
"setRow(row,index)"
/>
-->
<Select
v-if=
"row.dataType==3"
v-model=
"row.note"
clearable
transfer
@
on-change=
"setRow(row,index)"
>
<Option
v-for=
"item in codeList"
:value=
"item.code"
:key=
"item.code"
>
{{
item
.
name
}}
</Option>
</Select>
<span
v-else
>
{{
row
.
note
}}
</span>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"dataType"
>
<Dictionary
@
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=
"unitName"
>
<Dictionary
v-if=
"row.dataType==1||row.dataType==2"
@
on-change=
"setRow(row,index)"
v-model=
"row.unitName"
code=
"material.main.unitName"
type=
"select"
placeholder=
"请选择单位"
: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"
>
<a
@
click=
"remove(index,row)"
style=
"color:#FF7A8B"
v-if=
"row.fieldType>1"
>
删除
</a>
</
template
>
</Table>
<Button
type=
"dashed"
long
@
click=
"addNew"
class=
"mt10"
>
新增属性
</Button>
</Col>
<Col
:span=
"24"
class=
"tr mt10"
>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Col>
</Row>
</Form>
</Form>
</template>
</template>
<
script
>
<
script
>
...
@@ -46,104 +135,211 @@ export default {
...
@@ -46,104 +135,211 @@ export default {
name
:
"Edit"
,
name
:
"Edit"
,
data
()
{
data
()
{
return
{
return
{
list
:
[],
disabled
:
false
,
roleTitle
:
"库管"
,
entity
:
{},
entity
:
{
materialType
:
[],
codeRuleType
:
""
,
},
materialType
:
[],
rules
:
{
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
},
},
checkList
:
[
{
field
:
"code"
,
title
:
"编号"
,
note
:
""
,
dataType
:
0
,
unitName
:
""
,
required
:
true
,
isunique
:
false
,
fieldType
:
1
,
categoryId
:
0
,
action
:
1
,
add
:
0
,
//新增标识
},
{
field
:
"version"
,
title
:
"版本"
,
note
:
""
,
dataType
:
0
,
unitName
:
""
,
required
:
true
,
isunique
:
false
,
fieldType
:
1
,
categoryId
:
0
,
action
:
1
,
add
:
0
,
//新增标识
},
{
field
:
"name"
,
title
:
"标题"
,
note
:
""
,
dataType
:
0
,
unitName
:
""
,
required
:
true
,
isunique
:
false
,
fieldType
:
1
,
//共有属性(不能删除)
categoryId
:
0
,
action
:
1
,
add
:
0
,
//新增标识
},
{
field
:
"description"
,
title
:
"文档详细说明"
,
note
:
""
,
dataType
:
0
,
unitName
:
""
,
required
:
true
,
isunique
:
false
,
fieldType
:
1
,
//共有属性(不能删除)
categoryId
:
0
,
action
:
1
,
add
:
0
,
//新增标识
},
],
columns
:
[
{
title
:
"序号"
,
type
:
"index"
,
width
:
80
,
align
:
"center"
,
},
{
title
:
"属性名称"
,
key
:
"title"
,
slot
:
"title"
,
},
{
title
:
"属性类型"
,
key
:
"dataType"
,
align
:
"center"
,
slot
:
"dataType"
,
width
:
200
,
},
{
title
:
"设置"
,
key
:
"note"
,
align
:
"center"
,
slot
:
"note"
,
},
{
title
:
"单位"
,
key
:
"unitName"
,
align
:
"center"
,
slot
:
"unitName"
,
width
:
"150"
,
},
{
title
:
"必填"
,
key
:
"required"
,
align
:
"center"
,
slot
:
"required"
,
width
:
80
,
},
{
title
:
"唯一"
,
key
:
"isUnique"
,
align
:
"center"
,
slot
:
"isUnique"
,
width
:
80
,
},
{
width
:
80
,
title
:
"操作"
,
slot
:
"action"
,
align
:
"center"
,
},
],
parms
:
{
app
:
"material"
,
eid
:
null
,
name
:
""
,
field
:
""
,
},
};
};
},
},
props
:
{
props
:
{
v
:
Object
,
eid
:
Number
,
eid
:
Number
,
level
:
Number
,
upId
:
Number
,
user
:
{
type
:
Boolean
,
default
:
true
,
},
},
},
mounted
()
{
mounted
()
{
if
(
this
.
eid
>
0
)
{
if
(
this
.
eid
>
0
)
{
this
.
load
(
this
.
eid
);
this
.
load
(
this
.
eid
);
}
}
this
.
getList
();
},
},
methods
:
{
methods
:
{
getList
()
{
load
(
v
)
{
let
data
=
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
conditions
:
[
this
.
entity
=
r
.
result
;
this
.
entity
.
inheritCategoryId
=
r
.
result
.
inheritCategoryId
+
""
;
this
.
parms
.
eid
=
r
.
result
.
templateId
;
let
conditions
=
[
{
{
fieldName
:
"upId"
,
fieldValue
:
0
,
conditionalType
:
"Equal"
,
conditionalType
:
"Equal"
,
fieldName
:
"categoryId"
,
fieldValue
:
r
.
result
.
id
,
},
},
],
];
};
Api
.
list
({
Api
.
list
(
data
).
then
((
r
)
=>
{
conditions
:
conditions
,
this
.
list
=
r
.
result
;
sortBy
:
"id"
,
isDesc
:
false
,
}).
then
((
r
)
=>
{
if
(
r
.
result
)
{
r
.
result
.
map
((
u
)
=>
{
u
.
mid
=
u
.
id
;
});
});
},
this
.
checkList
=
r
.
result
;
changeVal
(
val
)
{
let
code
=
[];
let
type
=
[];
for
(
let
i
=
0
;
i
<
this
.
list
.
length
;
i
++
)
{
let
obj
=
this
.
list
[
i
];
for
(
let
j
=
0
;
j
<
val
.
length
;
j
++
)
{
if
(
obj
.
id
==
val
[
j
])
{
code
.
push
(
obj
.
code
);
type
.
push
(
obj
.
codeRuleType
);
}
}
}
});
});
},
remove
(
index
,
row
)
{
if
(
row
.
add
==
0
)
{
this
.
checkList
.
splice
(
index
,
1
);
}
else
{
row
.
action
=
2
;
this
.
$set
(
this
.
checkList
,
index
,
row
);
this
.
arr
.
push
(
row
);
this
.
checkList
.
splice
(
index
,
1
);
}
}
this
.
entity
.
materialTypeName
=
code
.
join
(
","
);
this
.
entity
.
codeRuleType
=
type
.
join
(
","
);
},
},
load
(
v
)
{
setRow
(
row
,
index
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
$set
(
this
.
checkList
,
index
,
row
);
r
.
result
.
userIds
=
this
.
$u
.
toIntArray
(
r
.
result
.
userIds
);
},
this
.
entity
=
r
.
result
;
addNew
()
{
var
uids
=
[];
let
maxId
=
0
;
let
ids
=
[];
this
.
checkList
.
map
((
u
)
=>
{
ids
=
r
.
result
.
materialType
.
split
(
","
);
if
(
u
.
mid
>
maxId
)
{
ids
.
map
((
u
)
=>
{
maxId
=
u
.
mid
;
uids
.
push
(
parseInt
(
u
));
}
});
this
.
materialType
=
uids
;
});
});
let
obj
=
{
mid
:
maxId
+
1
,
field
:
"c"
+
maxId
,
title
:
""
,
note
:
""
,
dataType
:
"0"
,
required
:
false
,
isunique
:
false
,
fieldType
:
3
,
categoryId
:
0
,
action
:
1
,
add
:
0
,
//新增标识
};
this
.
checkList
.
push
(
obj
);
},
},
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
let
materialType
=
this
.
materialType
.
join
(
","
);
if
(
this
.
$refs
.
refFile
.
nameList
.
length
>
0
)
{
let
userNam
=
""
;
this
.
entity
.
templateId
=
this
.
parms
.
eid
;
let
userId
=
""
;
}
else
{
if
(
this
.
user
)
{
// this.entity.filePath = "";
userId
=
this
.
entity
.
userIds
.
join
(
","
);
this
.
entity
.
templateId
=
""
;
userNam
=
this
.
$refs
.
userSelected
.
getSelectNames
().
join
(
","
);
}
}
let
paramsdata
=
{
let
data
=
{
id
:
this
.
entity
.
id
,
cat
:
this
.
entity
,
upId
:
this
.
entity
.
upId
,
pros
:
this
.
checkList
,
title
:
this
.
entity
.
title
,
//库位名称
code
:
this
.
entity
.
code
,
//库位编号
description
:
this
.
entity
.
description
,
//位置
level
:
this
.
entity
.
level
,
userName
:
userNam
,
//库管员
userIds
:
userId
,
//库管员id
creationTime
:
this
.
entity
.
creationTime
,
creatorUserId
:
this
.
entity
.
creatorUserId
,
materialType
:
materialType
,
//物料类型
materialTypeName
:
this
.
entity
.
materialTypeName
,
//物料编码
codeRuleType
:
this
.
entity
.
codeRuleType
,
};
};
Api
.
update
(
params
data
)
Api
.
update
(
data
)
.
then
((
r
)
=>
{
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$Message
.
success
(
"保存成功"
);
...
@@ -163,7 +359,7 @@ export default {
...
@@ -163,7 +359,7 @@ export default {
this
.
$emit
(
"on-close"
);
this
.
$emit
(
"on-close"
);
},
},
l
(
key
)
{
l
(
key
)
{
key
=
"
store_room_location
"
+
"."
+
key
;
key
=
"
document_category
"
+
"."
+
key
;
return
this
.
$t
(
key
);
return
this
.
$t
(
key
);
},
},
},
},
...
@@ -173,9 +369,6 @@ export default {
...
@@ -173,9 +369,6 @@ export default {
this
.
load
(
v
);
this
.
load
(
v
);
}
}
},
},
user
(
v
)
{
this
.
user
=
v
;
},
},
},
};
};
</
script
>
</
script
>
\ No newline at end of file
pages/word/classification/index.vue
View file @
7f4784df
...
@@ -8,16 +8,9 @@
...
@@ -8,16 +8,9 @@
</div>
</div>
</div>
</div>
<TreeGrid
:columns=
"columns"
:items=
"treeData"
></TreeGrid>
<TreeGrid
:columns=
"columns"
:items=
"treeData"
></TreeGrid>
<Modal
v-model=
"modal"
:title=
"title"
width=
"1000"
footer-hide
>
<component
<Modal
v-model=
"modal"
:title=
"title"
width=
"1200"
footer-hide
>
:is=
"detail"
<component
:is=
"detail"
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"ok"
:row=
"row"
/>
:eid=
"curId"
:level=
"level"
:upId=
"upId"
:user=
"user"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
</Modal>
</Modal>
</div>
</div>
</
template
>
</
template
>
...
@@ -30,63 +23,110 @@ export default {
...
@@ -30,63 +23,110 @@ export default {
Search
,
Search
,
},
},
head
:
{
head
:
{
title
:
"
库房库位
"
,
title
:
"
文档分类
"
,
author
:
"henq"
,
author
:
"henq"
,
description
:
"
store_room_location 7/10/2020 8:57:0
3 AM"
,
description
:
"
document_category 9/18/2020 9:33:4
3 AM"
,
},
},
data
()
{
data
()
{
return
{
return
{
easySearch
:
{
keys
:
{
op
:
"title,code,userName"
,
value
:
null
},
},
searchValue
:
""
,
//搜索库位名称
searchValue
:
""
,
//搜索库位名称
keys
:
""
,
treeData
:
[],
treeDataOld
:
[],
row
:
{},
modal
:
false
,
modal
:
false
,
title
:
"新增"
,
title
:
"新增"
,
detail
:
null
,
detail
:
null
,
curId
:
0
,
curId
:
0
,
level
:
null
,
upId
:
null
,
user
:
true
,
treeData
:
[],
treeDataOld
:
[],
columns
:
[
columns
:
[
// {
// key: "id",
// title: this.$t("id"),
// hide: true,
// align: "left",
// high: true,
// },
{
{
key
:
"
titl
e"
,
key
:
"
nam
e"
,
title
:
this
.
l
(
"
titl
e"
),
title
:
this
.
l
(
"
nam
e"
),
align
:
"left"
,
align
:
"left"
,
easy
:
true
,
high
:
true
,
},
},
{
{
key
:
"code"
,
key
:
"creationTime"
,
title
:
this
.
l
(
"code"
),
title
:
this
.
l
(
"creationTime"
),
align
:
"left"
,
width
:
180
,
align
:
"center"
,
},
{
key
:
"creatorUserId"
,
title
:
this
.
l
(
"creatorUserId"
),
align
:
"center"
,
},
},
{
key
:
"level"
,
title
:
this
.
l
(
"level"
),
align
:
"center"
,
high
:
true
},
{
{
key
:
"description"
,
key
:
"totalDocument"
,
title
:
this
.
l
(
"description"
),
title
:
this
.
l
(
"totalDocument"
),
align
:
"left"
,
align
:
"center"
,
width
:
160
,
},
// {
// key: "tenantId",
// title: this.l("tenantId"),
// align: "left",
// high: true,
// hide: true,
// },
{
key
:
"type"
,
title
:
this
.
l
(
"type"
),
align
:
"center"
,
high
:
true
,
code
:
"word_classification_type"
,
},
},
{
{
key
:
"
level
"
,
key
:
"
englishFullName
"
,
title
:
this
.
l
(
"
level
"
),
title
:
this
.
l
(
"
englishFullName
"
),
align
:
"left"
,
align
:
"left"
,
code
:
"store.level"
,
easy
:
true
,
high
:
true
,
},
},
{
{
key
:
"
materialType
Name"
,
key
:
"
english
Name"
,
title
:
"物料编号"
,
title
:
this
.
l
(
"englishName"
)
,
align
:
"left"
,
align
:
"left"
,
easy
:
true
,
high
:
true
,
},
{
key
:
"status"
,
title
:
this
.
l
(
"status"
),
align
:
"center"
,
high
:
true
,
code
:
"word_classification_status"
,
},
{
key
:
"inheritCategoryId"
,
title
:
this
.
l
(
"inheritCategoryId"
),
align
:
"center"
,
high
:
true
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
[
h
(
"span"
,
params
.
row
.
inheritCategoryId
==
0
?
"否"
:
"是"
),
]);
},
},
},
{
{
key
:
"
userName
"
,
key
:
"
description
"
,
title
:
this
.
l
(
"
userName
"
),
title
:
this
.
l
(
"
description
"
),
align
:
"left"
,
align
:
"left"
,
},
},
{
{
title
:
"操作"
,
title
:
"操作"
,
key
:
"action"
,
key
:
"action"
,
width
:
30
0
,
width
:
18
0
,
align
:
"center"
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
return
h
(
"div"
,
{
class
:
"action"
},
[
...
@@ -111,7 +151,7 @@ export default {
...
@@ -111,7 +151,7 @@ export default {
"op"
,
"op"
,
{
{
attrs
:
{
oprate
:
"edit"
},
attrs
:
{
oprate
:
"edit"
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
)
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
},
},
},
"编辑"
"编辑"
),
),
...
@@ -119,7 +159,7 @@ export default {
...
@@ -119,7 +159,7 @@ export default {
"op"
,
"op"
,
{
{
attrs
:
{
oprate
:
"delete"
},
attrs
:
{
oprate
:
"delete"
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
)
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
},
},
},
"删除"
"删除"
),
),
...
@@ -130,7 +170,7 @@ export default {
...
@@ -130,7 +170,7 @@ export default {
};
};
},
},
mounted
()
{
mounted
()
{
this
.
laodaction
(
this
.
keys
);
this
.
laodaction
(
this
.
searchValue
);
},
},
async
fetch
({
store
,
params
})
{
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
...
@@ -140,7 +180,7 @@ export default {
...
@@ -140,7 +180,7 @@ export default {
let
params
=
{
let
params
=
{
conditions
:
[
conditions
:
[
{
{
fieldName
:
"
titl
e"
,
fieldName
:
"
nam
e"
,
fieldValue
:
name
,
fieldValue
:
name
,
conditionalType
:
"Like"
,
conditionalType
:
"Like"
,
},
},
...
@@ -163,76 +203,27 @@ export default {
...
@@ -163,76 +203,27 @@ export default {
});
});
},
},
//查询
//查询
searchData
()
{
var
name
=
this
.
searchValue
;
this
.
laodaction
(
name
);
},
handleSearch
()
{
handleSearch
()
{
let
tree
=
this
.
$u
.
clone
(
this
.
treeDataOld
);
let
value
=
this
.
searchValue
;
if
(
value
.
trim
()
==
""
)
{
this
.
treeData
=
this
.
$u
.
clone
(
this
.
treeDataOld
);
}
else
{
//不满足搜索条件的待删除元素索引数组
let
removeArr
=
[];
for
(
let
i
=
0
;
i
<
tree
.
length
;
i
++
)
{
let
node
=
tree
[
i
];
this
.
searchTree
(
node
,
i
,
value
,
removeArr
);
}
//遍历删除不满足条件的节点
for
(
let
j
=
removeArr
.
length
-
1
;
j
>=
0
;
j
--
)
{
tree
.
splice
(
removeArr
[
j
],
1
);
}
this
.
treeData
=
tree
;
}
},
searchTree
(
node
,
index
,
value
,
removeArr
)
{
let
children
=
node
.
children
;
//针对非叶子节点,需要递归其children节点
if
(
children
&&
children
.
length
>
0
)
{
let
innderArr
=
[];
for
(
let
i
=
0
;
i
<
children
.
length
;
i
++
)
{
this
.
searchTree
(
children
[
i
],
i
,
value
,
innderArr
);
}
if
(
node
.
title
.
indexOf
(
value
)
===
-
1
)
{
for
(
let
j
=
innderArr
.
length
-
1
;
j
>=
0
;
j
--
)
{
children
.
splice
(
innderArr
[
j
],
1
);
}
if
(
node
.
children
.
length
===
0
)
{
removeArr
.
push
(
index
);
}
}
}
else
{
//叶子节点,直接进行匹配
if
(
node
.
title
.
indexOf
(
value
)
===
-
1
)
{
removeArr
.
push
(
index
);
}
}
},
addOk
()
{
var
name
=
this
.
searchValue
;
var
name
=
this
.
searchValue
;
this
.
laodaction
(
name
);
this
.
laodaction
(
name
);
this
.
modal
=
false
;
// this.curId = 0
},
},
ok
()
{
ok
()
{
var
name
=
this
.
searchValue
;
this
.
laodaction
(
this
.
searchValue
);
this
.
laodaction
(
name
);
this
.
modal
=
false
;
this
.
modal
=
false
;
this
.
curId
=
0
;
this
.
curId
=
0
;
},
},
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
},
add
()
{
add
()
{
this
.
curId
=
0
;
this
.
curId
=
0
;
this
.
level
=
1
;
this
.
title
=
"新增"
;
this
.
user
=
true
;
(
this
.
upId
=
0
),
(
this
.
title
=
"新增"
);
this
.
detail
=
()
=>
import
(
"./add"
);
this
.
detail
=
()
=>
import
(
"./add"
);
this
.
modal
=
true
;
this
.
modal
=
true
;
},
},
addrow
(
params
)
{
addrow
(
row
)
{
this
.
curId
=
0
;
this
.
curId
=
0
;
this
.
user
=
false
;
this
.
row
=
row
;
(
this
.
upId
=
params
.
id
),
(
this
.
title
=
"新增"
);
this
.
detail
=
()
=>
import
(
"./add"
);
this
.
detail
=
()
=>
import
(
"./add"
);
this
.
modal
=
true
;
this
.
modal
=
true
;
},
},
...
@@ -248,37 +239,50 @@ export default {
...
@@ -248,37 +239,50 @@ export default {
this
.
detail
=
()
=>
import
(
"./detail"
);
this
.
detail
=
()
=>
import
(
"./detail"
);
this
.
modal
=
true
;
this
.
modal
=
true
;
},
},
edit
(
row
)
{
edit
(
id
)
{
this
.
curId
=
row
.
id
;
this
.
curId
=
id
;
this
.
title
=
"编辑"
;
this
.
title
=
"编辑"
;
if
(
row
.
upId
==
0
)
{
this
.
user
=
true
;
}
else
{
this
.
user
=
false
;
}
this
.
detail
=
()
=>
import
(
"./edit"
);
this
.
detail
=
()
=>
import
(
"./edit"
);
this
.
modal
=
true
;
this
.
modal
=
true
;
},
},
remove
(
row
)
{
remove
(
id
)
{
if
(
row
.
children
&&
row
.
children
.
length
==
0
)
{
Api
.
delete
(
id
).
then
((
r
)
=>
{
Api
.
delete
(
row
.
id
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
laodaction
(
this
.
searchValue
);
this
.
$Message
.
success
(
"删除成功"
);
this
.
$Message
.
success
(
"删除成功"
);
var
name
=
this
.
searchValue
;
this
.
laodaction
(
name
);
}
}
});
});
}
else
{
this
.
$Message
.
error
(
"此节点有子节点,不能删除!"
);
return
false
;
}
},
},
cancel
()
{
cancel
()
{
this
.
curId
=
0
;
this
.
curId
=
0
;
this
.
modal
=
false
;
this
.
modal
=
false
;
},
},
l
(
key
)
{
l
(
key
)
{
let
vkey
=
"store_room_location"
+
"."
+
key
;
/*
document_category:{
creationTime:'创建时间',
creatorUserId:'创建人',
lastModificationTime:'更新时间',
lastModifierUserId:'更新人',
isDeleted:'删除人',
deletionTime:'删除时间',
deleterUserId:'删除人',
name:'分类名称',
upId:'上级id',
level:'层级',
totalDocument:'分类下总文档数',
tenantId:'租户id',
type:'类别',
englishFullName:'英文全称',
englishName:'英文简称',
status:'',
description:'',
inheritCategoryId:'继承分类id',
template:'模板路径',
templateId:'',
}
*/
let
vkey
=
"document_category"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
return
this
.
$t
(
vkey
)
||
key
;
},
},
},
},
...
...
pages/word/classification/search.vue
View file @
7f4784df
<
template
>
<
template
>
<Form
ref=
"form"
:model=
"condition"
:label-width=
"90"
>
<Form
ref=
"form"
:model=
"condition"
:label-width=
"90"
>
<Row>
<Row>
<Col
:span=
"12"
:v-if=
"condition.id.show"
>
<Col
:span=
"12"
:v-if=
"condition.id.show"
><FormItem
:label=
"$t('id')"
prop=
"id"
>
<Input
v-model=
"condition.id.value"
>
</Input>
<FormItem
:label=
"$t('id')"
prop=
"id"
>
</FormItem></Col>
<Input
v-model=
"condition.id.value"
></Input>
<Col
:span=
"12"
:v-if=
"condition.creationTime.show"
><FormItem
:label=
"l('creationTime')"
prop=
"creationTime"
>
<DatePicker
type=
"daterange"
v-model=
"condition.creationTime.value"
></DatePicker>
</FormItem>
</FormItem></Col>
</Col>
<Col
:span=
"12"
:v-if=
"condition.creatorUserId.show"
><FormItem
:label=
"l('creatorUserId')"
prop=
"creatorUserId"
>
<Input
v-model=
"condition.creatorUserId.value"
>
</Input>
<Col
:span=
"12"
:v-if=
"condition.creationTime.show"
>
</FormItem></Col>
<FormItem
:label=
"l('creationTime')"
prop=
"creationTime"
>
<Col
:span=
"12"
:v-if=
"condition.lastModificationTime.show"
><FormItem
:label=
"l('lastModificationTime')"
prop=
"lastModificationTime"
>
<DatePicker
type=
"daterange"
v-model=
"condition.lastModificationTime.value"
></DatePicker>
<DatePicker
type=
"daterange"
v-model=
"condition.creationTime.value"
></DatePicker>
</FormItem></Col>
</FormItem>
<Col
:span=
"12"
:v-if=
"condition.lastModifierUserId.show"
><FormItem
:label=
"l('lastModifierUserId')"
prop=
"lastModifierUserId"
>
<Input
v-model=
"condition.lastModifierUserId.value"
>
</Input>
</Col>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.creatorUserId.show"
>
<Col
:span=
"12"
:v-if=
"condition.deletionTime.show"
><FormItem
:label=
"l('deletionTime')"
prop=
"deletionTime"
>
<DatePicker
type=
"daterange"
v-model=
"condition.deletionTime.value"
></DatePicker>
<FormItem
:label=
"l('creatorUserId')"
prop=
"creatorUserId"
>
</FormItem></Col>
<Input
v-model=
"condition.creatorUserId.value"
></Input>
<Col
:span=
"12"
:v-if=
"condition.name.show"
><FormItem
:label=
"l('name')"
prop=
"name"
>
<Input
v-model=
"condition.name.value"
>
</Input>
</FormItem>
</FormItem></Col>
</Col>
<Col
:span=
"12"
:v-if=
"condition.upId.show"
><FormItem
:label=
"l('upId')"
prop=
"upId"
>
<Input
v-model=
"condition.upId.value"
>
</Input>
<Col
:span=
"12"
:v-if=
"condition.lastModificationTime.show"
>
</FormItem></Col>
<FormItem
:label=
"l('lastModificationTime')"
prop=
"lastModificationTime"
>
<Col
:span=
"12"
:v-if=
"condition.level.show"
><FormItem
:label=
"l('level')"
prop=
"level"
>
<Input
v-model=
"condition.level.value"
>
</Input>
<DatePicker
type=
"daterange"
v-model=
"condition.lastModificationTime.value"
></DatePicker>
</FormItem></Col>
</FormItem>
<Col
:span=
"12"
:v-if=
"condition.totalDocument.show"
><FormItem
:label=
"l('totalDocument')"
prop=
"totalDocument"
>
<Input
v-model=
"condition.totalDocument.value"
>
</Input>
</Col>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.lastModifierUserId.show"
>
<Col
:span=
"12"
:v-if=
"condition.tenantId.show"
><FormItem
:label=
"l('tenantId')"
prop=
"tenantId"
>
<Input
v-model=
"condition.tenantId.value"
>
</Input>
<FormItem
:label=
"l('lastModifierUserId')"
prop=
"lastModifierUserId"
>
</FormItem></Col>
<Input
v-model=
"condition.lastModifierUserId.value"
></Input>
<Col
:span=
"12"
:v-if=
"condition.type.show"
><FormItem
:label=
"l('type')"
prop=
"type"
>
<Input
v-model=
"condition.type.value"
>
</Input>
</FormItem>
</FormItem></Col>
</Col>
<Col
:span=
"12"
:v-if=
"condition.englishFullName.show"
><FormItem
:label=
"l('englishFullName')"
prop=
"englishFullName"
>
<Input
v-model=
"condition.englishFullName.value"
>
</Input>
<Col
:span=
"12"
:v-if=
"condition.deletionTime.show"
>
</FormItem></Col>
<FormItem
:label=
"l('deletionTime')"
prop=
"deletionTime"
>
<Col
:span=
"12"
:v-if=
"condition.englishName.show"
><FormItem
:label=
"l('englishName')"
prop=
"englishName"
>
<Input
v-model=
"condition.englishName.value"
>
</Input>
<DatePicker
type=
"daterange"
v-model=
"condition.deletionTime.value"
></DatePicker>
</FormItem></Col>
</FormItem>
<Col
:span=
"12"
:v-if=
"condition.status.show"
><FormItem
:label=
"l('status')"
prop=
"status"
>
<Input
v-model=
"condition.status.value"
>
</Input>
</Col>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.upId.show"
>
<Col
:span=
"24"
:v-if=
"condition.description.show"
><FormItem
:label=
"l('description')"
prop=
"description"
>
<Input
v-model=
"condition.description.value"
>
</Input>
<FormItem
:label=
"l('upId')"
prop=
"upId"
>
</FormItem></Col>
<Input
v-model=
"condition.upId.value"
></Input>
<Col
:span=
"12"
:v-if=
"condition.inheritCategoryId.show"
><FormItem
:label=
"l('inheritCategoryId')"
prop=
"inheritCategoryId"
>
<Input
v-model=
"condition.inheritCategoryId.value"
>
</Input>
</FormItem>
</FormItem></Col>
</Col>
<Col
:span=
"24"
:v-if=
"condition.template.show"
><FormItem
:label=
"l('template')"
prop=
"template"
>
<Input
v-model=
"condition.template.value"
>
</Input>
<Col
:span=
"12"
:v-if=
"condition.materialType.show"
>
</FormItem></Col>
<FormItem
:label=
"l('materialType')"
prop=
"materialType"
>
<Col
:span=
"24"
:v-if=
"condition.templateId.show"
><FormItem
:label=
"l('templateId')"
prop=
"templateId"
>
<Input
v-model=
"condition.templateId.value"
>
</Input>
<Input
v-model=
"condition.materialType.value"
></Input>
</FormItem></Col>
</FormItem>
</Col>
<Col
:span=
"12"
:v-if=
"condition.title.show"
>
<FormItem
:label=
"l('title')"
prop=
"title"
>
<Input
v-model=
"condition.title.value"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
:v-if=
"condition.code.show"
>
<FormItem
:label=
"l('code')"
prop=
"code"
>
<Input
v-model=
"condition.code.value"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
:v-if=
"condition.status.show"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<Input
v-model=
"condition.status.value"
></Input>
</FormItem>
</Col>
<Col
:span=
"24"
:v-if=
"condition.description.show"
>
<FormItem
:label=
"l('description')"
prop=
"description"
>
<Input
v-model=
"condition.description.value"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
:v-if=
"condition.level.show"
>
<FormItem
:label=
"l('level')"
prop=
"level"
>
<Input
v-model=
"condition.level.value"
></Input>
</FormItem>
</Col>
<Col
:span=
"24"
:v-if=
"condition.userName.show"
>
<FormItem
:label=
"l('userName')"
prop=
"userName"
>
<Input
v-model=
"condition.userName.value"
></Input>
</FormItem>
</Col>
<Col
:span=
"24"
:v-if=
"condition.userIds.show"
>
<FormItem
:label=
"l('userIds')"
prop=
"userIds"
>
<Input
v-model=
"condition.userIds.value"
></Input>
</FormItem>
</Col>
</Row>
</Row>
</Form>
</Form>
</
template
>
</
template
>
<
script
>
<
script
>
import
Api
from
"./api"
;
import
Api
from
'./api'
export
default
{
export
default
{
name
:
"Add"
,
name
:
'Add'
,
data
()
{
data
()
{
return
{
return
{
condition
:
{
condition
:
{
id
:
{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
id
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
creationTime
:
{
op
:
"Range"
,
value
:
null
,
show
:
true
},
creationTime
:{
op
:
"Range"
,
value
:
null
,
show
:
true
},
creatorUserId
:
{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
creatorUserId
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
lastModificationTime
:
{
op
:
"Range"
,
value
:
null
,
show
:
true
},
lastModificationTime
:{
op
:
"Range"
,
value
:
null
,
show
:
true
},
lastModifierUserId
:
{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
lastModifierUserId
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
deletionTime
:
{
op
:
"Range"
,
value
:
null
,
show
:
true
},
deletionTime
:{
op
:
"Range"
,
value
:
null
,
show
:
true
},
upId
:
{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
name
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
materialType
:
{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
upId
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
title
:
{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
level
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
code
:
{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
totalDocument
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
status
:
{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
tenantId
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
description
:
{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
type
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
level
:
{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
englishFullName
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
userName
:
{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
englishName
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
userIds
:
{
op
:
"Equal"
,
value
:
null
,
show
:
true
}
status
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
description
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
inheritCategoryId
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
template
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
templateId
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
},
}
}
};
},
},
methods
:
{
methods
:
{
handleClose
()
{
handleClose
()
{
this
.
$emit
(
"on-close"
);
this
.
$emit
(
'on-close'
)
},
},
l
(
key
)
{
l
(
key
)
{
key
=
"store_room_location"
+
"."
+
key
;
key
=
"document_category"
+
"."
+
key
;
return
this
.
$t
(
key
);
return
this
.
$t
(
key
)
}
}
}
}
}
};
</
script
>
</
script
>
\ No newline at end of file
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