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
35d2f07e
Commit
35d2f07e
authored
Sep 23, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wendiang
parent
b49a2fef
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
14 deletions
+49
-14
index.vue
pages/word/document/index.vue
+22
-5
word.vue
pages/word/document/word.vue
+27
-9
No files found.
pages/word/document/index.vue
View file @
35d2f07e
...
...
@@ -33,7 +33,7 @@
</a>
</div>
<Content
:class=
"!showMenu?'con_bord':''"
>
<Word
ref=
"dataTable"
:treeId=
'treeId
'
/>
<Word
ref=
"dataTable"
:treeId=
"treeId"
:addShow=
"addShow"
:ids=
'ids
'
/>
</Content>
</Layout>
</div>
...
...
@@ -58,7 +58,9 @@ export default {
model8
:
""
,
keys
:
""
,
expand
:
false
,
treeId
:
0
,
treeId
:
0
,
addShow
:
false
,
ids
:[]
};
},
mounted
()
{
...
...
@@ -131,13 +133,28 @@ export default {
change
(
a
,
b
)
{
// console.log(a)
console
.
log
(
b
);
if
(
b
.
children
.
length
==
0
)
{
this
.
treeId
=
b
.
id
;
if
(
b
.
children
.
length
==
0
)
{
this
.
addShow
=
true
;
this
.
$refs
.
dataTable
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
}
else
{
this
.
treeId
=
0
;
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
);
}
});
}
}
alert
(
this
.
treeId
)
console
.
log
(
ids
)
this
.
ids
=
ids
;
},
renderContent
(
h
,
{
root
,
node
,
data
})
{
return
h
(
...
...
pages/word/document/word.vue
View file @
35d2f07e
...
...
@@ -80,7 +80,7 @@ export default {
keys
:
{
op
:
"refName,name"
,
value
:
null
},
categoryId
:
{
op
:
"In"
,
value
:
this
.
treeId
,
value
:
this
.
ids
,
},
},
modal
:
false
,
...
...
@@ -255,6 +255,8 @@ export default {
},
props
:
{
treeId
:
Number
,
addShow
:
Boolean
,
ids
:
Array
,
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
...
...
@@ -291,10 +293,14 @@ export default {
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
},
add
()
{
if
(
this
.
addShow
==
false
)
{
this
.
$Message
.
error
(
"请在分类最子集新增文档"
);
}
else
{
this
.
curId
=
0
;
this
.
title
=
"新增"
;
this
.
detail
=
()
=>
import
(
"./add"
);
this
.
modal
=
true
;
}
},
copy
(
id
)
{
this
.
curId
=
id
;
...
...
@@ -347,11 +353,23 @@ export default {
},
},
watch
:
{
treeId
(
v
)
{
if
(
v
!=
0
)
{
this
.
easySearch
.
categoryId
.
value
=
v
;
// treeId(v) {
// alert(v)
// if (v != 0) {
// // this.easySearch.categoryId.value = v;
// this.$refs.grid.reload(this.easySearch);
// }
// },
ids
:
{
handler
(
newName
,
oldName
)
{
// console.log("ovo", newName, oldName);
// console.log(newName);
this
.
easySearch
.
categoryId
.
value
=
newName
;
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
}
},
// immediate: true,
deep
:
true
,
},
},
};
...
...
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