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
9e0461c0
Commit
9e0461c0
authored
Apr 03, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tree
parent
00540e2a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
87 additions
and
55 deletions
+87
-55
storeHouseLeft.vue
components/modalTree/storeHouseLeft.vue
+9
-1
add.vue
pages/crm/contract/add.vue
+4
-2
edit.vue
pages/crm/contract/edit.vue
+1
-1
shopIndex.vue
pages/crm/customer/shopIndex.vue
+13
-2
shopTreeLeft.vue
pages/crm/customer/shopTreeLeft.vue
+60
-49
No files found.
components/modalTree/storeHouseLeft.vue
View file @
9e0461c0
...
...
@@ -43,7 +43,15 @@ export default {
default
:
0
}
},
mounted
()
{},
mounted
()
{
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
return
(()
=>
{
window
.
screenHeight
=
window
.
innerHeight
;
this
.
divHeight
=
window
.
innerHeight
-
180
+
"px"
;
})();
};
},
created
()
{
this
.
loadTree
()
var
theight
=
window
.
innerHeight
-
180
+
'px'
...
...
pages/crm/contract/add.vue
View file @
9e0461c0
...
...
@@ -3,7 +3,7 @@
<Row>
<Col
:span=
"12"
>
<FormItem
:label=
"l('projectId')"
prop=
"projectId"
>
<InputNumber
v-model=
"entity.projectId"
style=
"width:240px"
></InputNumber>
<InputNumber
v-model=
"entity.projectId"
:min=
"1"
style=
"width:240px"
></InputNumber>
</FormItem>
</Col>
<Col
:span=
"12"
>
...
...
@@ -50,7 +50,9 @@ export default {
data
()
{
return
{
disabled
:
false
,
entity
:
{},
entity
:
{
projectId
:
1
},
rules
:
{
name
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
},
...
...
pages/crm/contract/edit.vue
View file @
9e0461c0
...
...
@@ -3,7 +3,7 @@
<Row>
<Col
:span=
"12"
>
<FormItem
:label=
"l('projectId')"
prop=
"projectId"
>
<InputNumber
v-model=
"entity.projectId"
style=
"width:240px"
></InputNumber>
<InputNumber
v-model=
"entity.projectId"
:min=
"1"
style=
"width:240px"
></InputNumber>
</FormItem>
</Col>
<Col
:span=
"12"
>
...
...
pages/crm/customer/shopIndex.vue
View file @
9e0461c0
...
...
@@ -18,6 +18,7 @@
:action=
"action"
:conditions=
"easySearch"
style=
"margin-top: 45px;"
:height=
"tdHeight"
>
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
...
...
@@ -103,6 +104,7 @@ export default {
editModal
:
false
,
detailModal
:
false
,
deletelModal
:
false
,
tdHeight
:
""
,
curId
:
0
,
curId1
:
0
,
curShopName
:
''
,
...
...
@@ -250,8 +252,17 @@ export default {
},
mounted
()
{
this
.
loadData
()
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
return
(()
=>
{
window
.
screenHeight
=
window
.
innerHeight
;
this
.
tdHeight
=
window
.
screenHeight
-
265
;
})();
};
},
created
()
{
this
.
tdHeight
=
window
.
innerHeight
-
265
;
},
created
()
{},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
},
...
...
@@ -352,6 +363,6 @@ export default {
</
script
>
<
style
lang=
"less"
scoped
>
.full {
margin-top:
0;
margin-top:0;
}
</
style
>
\ No newline at end of file
pages/crm/customer/shopTreeLeft.vue
View file @
9e0461c0
...
...
@@ -16,21 +16,22 @@
</Button>
</ButtonGroup>
</h3>
<div
class=
"tree"
>
<div
class=
"tree"
:style=
"
{height:divHeight}"
>
<Tree
ref=
"tree"
:data=
"tree"
@
on-select-change=
"change"
:render=
"renderContent"
/>
</div>
</div>
</
template
>
<
script
>
import
Api
from
'./api'
import
Api
from
"./api"
;
export
default
{
name
:
'shopTreeLeft'
,
name
:
"shopTreeLeft"
,
data
()
{
return
{
expand
:
true
,
ids
:
[],
tree
:
[]
}
tree
:
[],
divHeight
:
""
};
},
props
:
{
CId
:
{
...
...
@@ -38,57 +39,67 @@ export default {
default
:
0
}
},
mounted
()
{},
mounted
()
{
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
return
(()
=>
{
window
.
screenHeight
=
window
.
innerHeight
;
this
.
divHeight
=
window
.
innerHeight
-
240
+
"px"
;
})();
};
},
created
()
{
this
.
loadTree
()
this
.
loadTree
();
var
theight
=
window
.
innerHeight
-
240
+
"px"
;
this
.
divHeight
=
theight
;
},
methods
:
{
toggle
()
{
this
.
expand
=
!
this
.
expand
this
.
getTrees
(
this
.
tree
)
this
.
expand
=
!
this
.
expand
;
this
.
getTrees
(
this
.
tree
)
;
//this.loadTree()
},
async
loadTree
()
{
//alert(this.CId)
Api
.
getshoptree
({
Id
:
this
.
CId
}).
then
(
(
r
)
=>
{
Api
.
getshoptree
({
Id
:
this
.
CId
}).
then
(
r
=>
{
if
(
r
.
success
)
{
if
(
r
.
result
.
length
>
0
)
{
this
.
tree
=
r
.
result
this
.
change1
(
this
.
tree
)
this
.
tree
=
r
.
result
;
this
.
change1
(
this
.
tree
)
;
}
else
{
this
.
tree
=
[
{
title
:
'暂无组织信息'
,
value
:
-
100
,
expand
:
true
,
children
:
[]
}
],
this
.
$emit
(
'storeIds'
,
[
-
100
])
this
.
$emit
(
'treeData'
,
r
.
result
)
(
this
.
tree
=
[
{
title
:
"暂无组织信息"
,
value
:
-
100
,
expand
:
true
,
children
:
[]
}
]
)
,
this
.
$emit
(
"storeIds"
,
[
-
100
]);
this
.
$emit
(
"treeData"
,
r
.
result
);
}
}
})
})
;
},
//重构左侧树
getTrees
(
trees
)
{
var
expand
=
this
.
expand
var
expand
=
this
.
expand
;
trees
.
forEach
((
data
,
index
)
=>
{
var
that
=
this
data
.
expand
=
expand
var
that
=
this
;
data
.
expand
=
expand
;
if
(
data
.
children
.
length
>
0
)
{
this
.
getTrees
(
data
.
children
)
this
.
getTrees
(
data
.
children
)
;
}
})
return
trees
})
;
return
trees
;
},
renderContent
(
h
,
{
root
,
node
,
data
})
{
return
h
(
'span'
,
"span"
,
{
style
:
{
color
:
'#000'
,
//根据选中状态设置样式
cursor
:
'pointer'
,
background
:
node
.
node
.
selected
?
'#AAD8D4'
:
'#ffffff'
,
paddingLeft
:
'10px'
,
paddingRight
:
'10px'
,
paddingTop
:
'3px'
,
paddingBottom
:
'3px'
color
:
"#000"
,
//根据选中状态设置样式
cursor
:
"pointer"
,
background
:
node
.
node
.
selected
?
"#AAD8D4"
:
"#ffffff"
,
paddingLeft
:
"10px"
,
paddingRight
:
"10px"
,
paddingTop
:
"3px"
,
paddingBottom
:
"3px"
},
on
:
{
// click: () => {
...
...
@@ -99,47 +110,47 @@ export default {
}
},
data
.
title
)
)
;
},
//得到此树节点下所有是产品的Id
getAllIds
(
trees
)
{
trees
.
forEach
((
data
,
index
)
=>
{
var
that
=
this
this
.
ids
.
push
(
data
.
value
)
var
that
=
this
;
this
.
ids
.
push
(
data
.
value
)
;
if
(
data
.
children
.
length
>
0
)
{
this
.
getAllIds
(
data
.
children
)
this
.
getAllIds
(
data
.
children
)
;
}
})
})
;
},
change
(
value
)
{
if
(
value
.
length
>
0
)
{
this
.
ids
=
[]
this
.
getAllIds
(
value
)
this
.
ids
=
[]
;
this
.
getAllIds
(
value
)
;
if
(
this
.
ids
.
length
>
0
)
{
this
.
$emit
(
'storeIds'
,
this
.
ids
)
this
.
$emit
(
"storeIds"
,
this
.
ids
);
//this.easySearch.storeId.value = this.ids
}
else
{
this
.
$emit
(
'storeIds'
,
[
-
1
])
this
.
$emit
(
"storeIds"
,
[
-
1
]);
}
}
else
{
this
.
$emit
(
'storeIds'
,
[
-
1
])
this
.
$emit
(
"storeIds"
,
[
-
1
]);
}
this
.
$emit
(
'treeData'
,
value
)
this
.
$emit
(
"treeData"
,
value
);
},
change1
(
value
)
{
if
(
value
.
length
>
0
)
{
this
.
ids
=
[]
this
.
getAllIds
(
value
)
this
.
ids
=
[]
;
this
.
getAllIds
(
value
)
;
if
(
this
.
ids
.
length
>
0
)
{
this
.
$emit
(
'storeIds'
,
this
.
ids
)
this
.
$emit
(
"storeIds"
,
this
.
ids
);
}
else
{
this
.
$emit
(
'storeIds'
,
[
-
1
])
this
.
$emit
(
"storeIds"
,
[
-
1
]);
}
}
else
{
this
.
$emit
(
'storeIds'
,
[
-
1
])
this
.
$emit
(
"storeIds"
,
[
-
1
]);
}
}
}
}
}
;
</
script
>
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