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
27e53a04
Commit
27e53a04
authored
Oct 09, 2020
by
周远喜
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'product' of
http://git.mes123.com/zhouyx/mes-ui
into product
parents
a3f0f581
f7b792d3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
165 additions
and
154 deletions
+165
-154
api.js
components/page/api.js
+4
-1
wordTree.vue
components/page/wordTree.vue
+150
-0
api.js
pages/word/document/api.js
+1
-4
index.vue
pages/word/document/index.vue
+7
-148
iview.js
plugins/iview.js
+3
-1
No files found.
components/page/api.js
View file @
27e53a04
...
@@ -7,5 +7,8 @@ export default {
...
@@ -7,5 +7,8 @@ export default {
serialcode
(
params
)
{
serialcode
(
params
)
{
return
Api
.
post
(
`
${
systemUrl
}
/cache/generate_serialcode`
,
params
);
return
Api
.
post
(
`
${
systemUrl
}
/cache/generate_serialcode`
,
params
);
},
},
//文档分类列表
list
(
params
){
return
Api
.
post
(
`
${
material
}
/documentcategory/list`
,
params
);
},
}
}
\ No newline at end of file
components/page/wordTree.vue
0 → 100644
View file @
27e53a04
<
template
>
<div
class=
"flex fd tree-menu"
>
<h3>
<span>
文档分类
</span>
<div
class=
"fr mr10 mt10"
>
<ButtonGroup
class=
"fr ddi"
size=
"small"
>
<Button
:icon=
"expand ? 'md-arrow-dropright' : 'md-arrow-dropdown'"
@
click=
"toggle"
title=
"展开/合并"
></Button>
<Button
icon=
"md-refresh"
title=
"刷新"
@
click=
"loadTree()"
></Button>
<Button
icon=
"md-rewind"
title=
"收起"
@
click=
"hide"
></Button>
</ButtonGroup>
</div>
</h3>
<div
class=
"fg"
>
<Tree
:data=
"data"
ref=
"tree"
@
on-select-change=
"change"
:render=
"renderContent"
></Tree>
</div>
</div>
</
template
>
<
script
>
import
Api
from
"./api"
;
export
default
{
data
()
{
return
{
keys
:
""
,
expand
:
false
,
list
:
[],
};
},
computed
:
{
data
()
{
let
items
=
this
.
$u
.
clone
(
this
.
list
);
let
expand
=
this
.
expand
;
let
result
=
[];
search
(
this
.
keys
,
items
);
function
search
(
keys
,
data
)
{
data
.
map
((
u
)
=>
{
if
(
keys
.
length
<
u
.
title
)
{
u
.
expand
=
expand
;
result
.
push
(
u
);
}
else
{
u
.
expand
=
expand
;
if
(
u
.
title
.
indexOf
(
keys
)
>
-
1
)
{
result
.
push
(
u
);
}
else
if
(
u
.
children
)
{
search
(
keys
,
u
.
children
);
}
}
});
}
return
result
;
},
},
mounted
()
{
this
.
loadTree
();
},
methods
:
{
loadTree
()
{
let
data
=
{
conditions
:
[
{
fieldName
:
"status"
,
fieldValue
:
"1"
,
conditionalType
:
"Equal"
,
},
],
};
Api
.
list
(
data
).
then
((
r
)
=>
{
var
data
=
this
.
$u
.
toTree
(
r
.
result
,
0
,
(
u
)
=>
{
u
.
title
=
u
.
name
;
u
.
value
=
u
.
id
;
u
.
expand
=
true
;
},
"upId"
);
this
.
list
=
this
.
$u
.
clone
(
data
);
// console.log(this.list);
});
},
change
(
a
,
b
)
{
// console.log(a)
console
.
log
(
b
);
// if (b.children.length == 0) { //判断最底层才能添加文档
// this.addShow = true;
// this.$refs.dataTable.$refs.grid.reload(this.easySearch);
// } else {
// this.addShow = false;
// }
let
ids
=
[];
ids
.
push
(
b
.
value
);
if
(
b
.
children
)
{
addId
(
b
.
children
);
function
addId
(
data
)
{
data
.
map
((
u
)
=>
{
ids
.
push
(
u
.
value
);
if
(
u
.
children
)
{
addId
(
u
.
children
);
}
});
}
}
this
.
$emit
(
"change"
,
b
,
ids
);
},
renderContent
(
h
,
{
root
,
node
,
data
})
{
let
type
=
""
;
if
(
data
.
type
==
0
)
{
type
=
"md-folder"
;
}
else
if
(
data
.
type
==
1
)
{
type
=
"ios-copy"
;
}
else
{
type
=
"ios-book"
;
}
return
h
(
"span"
,
[
h
(
"Icon"
,
{
props
:
{
type
:
type
,
},
style
:
{
marginRight
:
"8px"
,
},
}),
h
(
"span"
,
data
.
title
),
]);
},
toggle
()
{
this
.
expand
=
!
this
.
expand
;
},
hide
()
{
this
.
$emit
(
"onHide"
);
},
},
};
</
script
>
\ No newline at end of file
pages/word/document/api.js
View file @
27e53a04
...
@@ -19,10 +19,7 @@ export default {
...
@@ -19,10 +19,7 @@ export default {
deletes
(
params
)
{
deletes
(
params
)
{
return
Api
.
post
(
`
${
material
}
/document/batchdelete`
,
params
);
return
Api
.
post
(
`
${
material
}
/document/batchdelete`
,
params
);
},
},
//文档分类列表
list
(
params
){
return
Api
.
post
(
`
${
material
}
/documentcategory/list`
,
params
);
},
//自定义属性
//自定义属性
listbyid
(
params
){
listbyid
(
params
){
return
Api
.
get
(
`
${
material
}
/documentpropertydefinition/listbyid`
,
params
);
return
Api
.
get
(
`
${
material
}
/documentpropertydefinition/listbyid`
,
params
);
...
...
pages/word/document/index.vue
View file @
27e53a04
...
@@ -2,39 +2,7 @@
...
@@ -2,39 +2,7 @@
<div
class=
"product-mix"
>
<div
class=
"product-mix"
>
<Layout>
<Layout>
<Sider
width=
"300"
v-if=
"showMenu"
>
<Sider
width=
"300"
v-if=
"showMenu"
>
<div
class=
"flex fd tree-menu"
>
<WordTree
@
change=
"change"
@
onHide=
"hide"
/>
<h3>
<span>
文档分类
</span>
<div
class=
"fr mr10 mt10"
>
<ButtonGroup
class=
"fr ddi"
size=
"small"
>
<Button
:icon=
"expand ? 'md-arrow-dropright' : 'md-arrow-dropdown'"
@
click=
"toggle"
title=
"展开/合并"
></Button>
<Button
icon=
"md-refresh"
title=
"刷新"
@
click=
"loadTree()"
></Button>
<Button
icon=
"md-rewind"
title=
"收起"
@
click=
"hide"
></Button>
</ButtonGroup>
</div>
</h3>
<div
class=
"search"
>
<Input
search
placeholder=
"关键字"
v-model=
"keys"
clearable
/>
</div>
<div
class=
"fg"
>
<div
class=
"tree"
>
<Tree
:data=
"data"
ref=
"tree"
@
on-select-change=
"change"
:render=
"renderContent"
></Tree>
</div>
</div>
</div>
</Sider>
</Sider>
<div
v-if=
"!showMenu"
class=
"show_menu"
>
<div
v-if=
"!showMenu"
class=
"show_menu"
>
<a
class=
"menu_play fr"
@
click=
"showMenuFn"
title=
"展开"
>
<a
class=
"menu_play fr"
@
click=
"showMenuFn"
title=
"展开"
>
...
@@ -70,135 +38,26 @@ export default {
...
@@ -70,135 +38,26 @@ export default {
return
{
return
{
list
:
[],
list
:
[],
showMenu
:
true
,
showMenu
:
true
,
model8
:
""
,
keys
:
""
,
expand
:
false
,
treeId
:
0
,
treeId
:
0
,
addShow
:
false
,
addShow
:
false
,
ids
:
[],
ids
:
[],
workFlowIds
:
""
,
workFlowIds
:
""
,
};
};
},
},
mounted
()
{
mounted
()
{},
this
.
loadTree
();
},
async
fetch
({
store
,
params
})
{
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
},
computed
:
{
data
()
{
let
items
=
this
.
$u
.
clone
(
this
.
list
);
let
expand
=
this
.
expand
;
let
result
=
[];
search
(
this
.
keys
,
items
);
function
search
(
keys
,
data
)
{
data
.
map
((
u
)
=>
{
if
(
keys
.
length
<
u
.
title
)
{
u
.
expand
=
expand
;
result
.
push
(
u
);
}
else
{
u
.
expand
=
expand
;
if
(
u
.
title
.
indexOf
(
keys
)
>
-
1
)
{
result
.
push
(
u
);
}
else
if
(
u
.
children
)
{
search
(
keys
,
u
.
children
);
}
}
});
}
return
result
;
},
},
methods
:
{
methods
:
{
loadTree
()
{
change
(
item
,
ids
)
{
let
data
=
{
this
.
treeId
=
item
.
id
;
conditions
:
[
this
.
workFlowIds
=
item
.
workFlowIds
;
{
this
.
ids
=
ids
;
fieldName
:
"status"
,
fieldValue
:
"1"
,
conditionalType
:
"Equal"
,
},
],
// sortBy: "code",
// isDesc: false,
};
Api
.
list
(
data
).
then
((
r
)
=>
{
var
data
=
this
.
$u
.
toTree
(
r
.
result
,
0
,
(
u
)
=>
{
u
.
title
=
u
.
name
;
u
.
value
=
u
.
id
;
u
.
expand
=
true
;
},
"upId"
);
this
.
list
=
this
.
$u
.
clone
(
data
);
// console.log(this.list);
});
},
toggle
()
{
if
(
this
.
model8
)
{
this
.
expand
=
!
this
.
expand
;
}
else
{
this
.
$Message
.
error
(
"请先选择类型"
);
}
},
},
hide
()
{
hide
()
{
this
.
showMenu
=
false
;
this
.
showMenu
=
false
;
},
},
change
(
a
,
b
)
{
// console.log(a)
console
.
log
(
b
);
this
.
treeId
=
b
.
id
;
this
.
workFlowIds
=
b
.
workFlowIds
;
//流程id
// if (b.children.length == 0) { //判断最底层才能添加文档
// this.addShow = true;
// this.$refs.dataTable.$refs.grid.reload(this.easySearch);
// } else {
// this.addShow = false;
// }
let
ids
=
[];
ids
.
push
(
b
.
value
);
if
(
b
.
children
)
{
addId
(
b
.
children
);
function
addId
(
data
)
{
data
.
map
((
u
)
=>
{
ids
.
push
(
u
.
value
);
if
(
u
.
children
)
{
addId
(
u
.
children
);
}
});
}
}
// console.log(ids)
this
.
ids
=
ids
;
},
renderContent
(
h
,
{
root
,
node
,
data
})
{
let
type
=
""
;
if
(
data
.
type
==
0
)
{
type
=
"md-folder"
;
}
else
if
(
data
.
type
==
1
)
{
type
=
"ios-copy"
;
}
else
{
type
=
"ios-book"
;
}
return
h
(
"span"
,
[
h
(
"Icon"
,
{
props
:
{
type
:
type
,
},
style
:
{
marginRight
:
"8px"
,
},
}),
h
(
"span"
,
data
.
title
),
]);
},
showMenuFn
()
{
showMenuFn
()
{
//this.$Message.info("展开左侧树")
//this.$Message.info("展开左侧树")
...
...
plugins/iview.js
View file @
27e53a04
...
@@ -67,7 +67,7 @@ import ImportExcel from '@/components/page/import/process.vue'
...
@@ -67,7 +67,7 @@ import ImportExcel from '@/components/page/import/process.vue'
import
CustomProperties
from
'@/components/page/customProperties.vue'
import
CustomProperties
from
'@/components/page/customProperties.vue'
import
InputCode
from
'@/components/page/inputCode.vue'
import
InputCode
from
'@/components/page/inputCode.vue'
import
Pictrue
from
'@/components/page/pictrue.vue'
import
Pictrue
from
'@/components/page/pictrue.vue'
import
WordTree
from
'@/components/page/wordTree.vue'
...
@@ -141,6 +141,8 @@ Vue.component("ImportExcel",ImportExcel)
...
@@ -141,6 +141,8 @@ Vue.component("ImportExcel",ImportExcel)
Vue
.
component
(
"CustomProperties"
,
CustomProperties
)
Vue
.
component
(
"CustomProperties"
,
CustomProperties
)
Vue
.
component
(
"InputCode"
,
InputCode
)
Vue
.
component
(
"InputCode"
,
InputCode
)
Vue
.
component
(
"Pictrue"
,
Pictrue
)
Vue
.
component
(
"Pictrue"
,
Pictrue
)
Vue
.
component
(
"WordTree"
,
WordTree
)
...
...
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