Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
glsx-oss-account
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 0c343627
authored
Aug 09, 2021
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of 192.168.3.233:glsx-web/glsx-oss-account
2 parents
47a2a27b
9a22957b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
85 additions
and
73 deletions
src/views/productManage/components/SelectTree.vue
src/views/productManage/functionList/app.js
src/views/productManage/functionList/index.vue
src/views/productManage/menuList/app.js
src/views/productManage/menuList/index.vue
src/views/productManage/productList/app.js
src/views/productManage/components/SelectTree.vue
View file @
0c34362
...
...
@@ -96,8 +96,8 @@ export default {
mounted
()
{
if
(
this
.
form
[
this
.
targetItem
.
name
])
{
console
.
log
(
this
.
treeData
)
console
.
log
(
this
.
form
[
this
.
targetItem
.
name
]
)
//
console.log(this.treeData)
// console.log(this.form
)
this
.
form
[
this
.
targetItem
.
nameLabel
]
=
this
.
queryTree
(
this
.
treeData
,
this
.
form
[
this
.
targetItem
.
name
])
this
.
$nextTick
().
then
(()
=>
{
this
.
$refs
.
tree
.
setCheckedKeys
([
this
.
form
[
this
.
targetItem
.
name
]])
...
...
@@ -149,8 +149,8 @@ export default {
.el-input.el-input--suffix.rotate
.el-input__suffix
.el-icon-arrow-down
{
transform
:
rotate
(
-180deg
);
}
/*
.select-tree {
max-height:
35
0px;
.select-tree
{
max-height
:
40
0px
;
overflow-y
:
scroll
;
}
*/
}
</
style
>
\ No newline at end of file
src/views/productManage/functionList/app.js
View file @
0c34362
import
App
from
'./index.vue'
import
base
from
'@/base'
import
GlsxVueCommon
from
'glsx-vue-common'
import
notice
from
'@/common/notice'
base
.
getConfig
().
then
(
data
=>
{
const
{
vue
,
config
}
=
data
vue
.
use
(
GlsxVueCommon
,
config
)
vue
.
prototype
.
notice
=
notice
base
.
render
(
App
)
})
src/views/productManage/functionList/index.vue
View file @
0c34362
...
...
@@ -77,6 +77,7 @@
slot-scope=
"scope"
>
<select-tree
v-if=
"editVisible"
:form=
"editForm"
:targetItem=
"scope.scope"
:treeData=
"baseData.menuTreeList"
...
...
@@ -157,17 +158,7 @@ export default {
nameLabel
:
'parentName'
,
addHtml
:
'menuTree'
,
formName
:
'searchForm'
},
// {
// label: '商户账户类型',
// name: '',
// type: 'select',
// optionList: [],
// optionId: 'dictValue',
// optionLabel: 'dictLabel',
// optionsName: 'accounTypetList'
// },
{
},
{
label
:
'所属客户群体'
,
name
:
'ownCus'
,
firstVal
:
'ownedCusgroupType'
,
...
...
@@ -264,11 +255,9 @@ export default {
optionLabel
:
'dictLabel'
,
optionsName
:
'productList'
,
changeAttr
:
(
value
,
targetItem
)
=>
{
baseApi
.
getMenuTree
({
productId
:
value
}).
then
(
res
=>
{
this
.
baseData
.
menuTreeList
=
res
.
data
this
.
editForm
.
menuId
=
''
this
.
editForm
.
menuName
=
''
})
this
.
editForm
.
menuId
=
''
this
.
editForm
.
menuName
=
''
this
.
getMenuTree
(
value
)
}
},
{
label
:
'菜单'
,
...
...
@@ -311,7 +300,7 @@ export default {
this
.
editFormData
[
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
===
'ownedCusgroupValue'
)].
isDisabled
=
(
value
===
3
)
this
.
editRule
.
ownedCusgroupValue
[
0
].
required
=
(
value
!==
3
)
// this.$refs.editFormRef.$refs[this.editChildRef].validateField('ownedCusgroupValue')
if
(
value
!==
3
)
{
if
(
value
&&
(
value
!==
3
)
)
{
this
.
baseData
.
cusGroupList
=
this
.
baseData
[
this
.
attrToList
[
value
]]
this
.
getOptionsList
(
'editFormData'
,
false
)
}
...
...
@@ -474,10 +463,10 @@ export default {
},
editDisable
()
{
this
.
editFormData
[
this
.
editFormData
.
findIndex
(
item
=>
item
.
label
===
'产品'
)].
isDisabled
=
!!
this
.
editForm
.
id
this
.
editFormData
[
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
===
'ownedCusgroupValue'
)].
isDisabled
=
(
this
.
editForm
.
ownedCusgroupType
===
3
)
this
.
editFormData
[
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
===
'ownedCusgroupValue'
)].
isDisabled
=
(
!
this
.
editForm
.
ownedCusgroupType
||
(
this
.
editForm
.
ownedCusgroupType
===
3
)
)
this
.
editFormData
[
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
===
'functionValue'
)].
isDisabled
=
!!
this
.
editForm
.
id
this
.
editFormData
[
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
===
'newFunValue'
)].
isHide
=
!
this
.
editForm
.
id
this
.
editRule
.
ownedCusgroupValue
[
0
].
required
=
(
this
.
editForm
.
ownedCusgroupType
!==
3
)
this
.
editRule
.
ownedCusgroupValue
[
0
].
required
=
(
!
this
.
editForm
.
ownedCusgroupType
||
this
.
editForm
.
ownedCusgroupType
!==
3
)
// this.$refs.editFormRef.$refs[this.editChildRef].validateField('ownedCusgroupValue')
},
handleAdd
()
{
...
...
@@ -485,23 +474,40 @@ export default {
this
.
editDisable
()
this
.
$refs
.
editFormRef
&&
(
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
clearValidate
())
},
recoveryEdit
(
row
)
{
baseApi
.
getMenuTree
({
productId
:
row
.
productId
}).
then
(
res
=>
{
getMenuTree
(
productId
,
fn
)
{
baseApi
.
getMenuTree
({
productId
:
productId
}).
then
(
res
=>
{
this
.
baseData
.
menuTreeList
=
res
.
data
this
.
editForm
.
menuId
=
''
this
.
editForm
.
menuName
=
''
this
.
getOptionsList
(
'editFormData'
,
false
)
fn
&&
fn
()
})
},
recoveryEdit
(
row
)
{
if
(
this
.
editForm
.
ownedCusgroupType
&&
(
this
.
editForm
.
ownedCusgroupType
!==
3
))
{
this
.
baseData
.
cusGroupList
=
this
.
baseData
[
this
.
attrToList
[
this
.
editForm
.
ownedCusgroupType
]]
}
},
handleFunEdit
(
row
)
{
this
.
editForm
=
_
.
cloneDeep
(
row
)
if
(
this
.
editForm
.
ownedCusgroupValue
)
{
this
.
editForm
.
ownedCusgroupValue
=
this
.
editForm
.
ownedCusgroupValue
.
split
(
','
).
map
(
item
=>
+
item
)
}
recoveryEdit
(
row
)
this
.
handleAdd
()
this
.
recoveryEdit
(
row
)
this
.
getMenuTree
(
row
.
productId
,
()
=>
{
this
.
handleAdd
()
})
},
handleClose
()
{
this
.
editForm
=
{}
this
.
editForm
=
{
productId
:
''
,
menuId
:
''
,
menuName
:
''
,
ownedCusgroupValue
:
''
}
var
resetBaseNameList
=
[
'menuTreeList'
,
'cusGroupList'
]
resetBaseNameList
.
forEach
(
item
=>
{
this
.
baseData
[
item
]
=
[]
})
this
.
getOptionsList
(
'editFormData'
,
false
)
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
clearValidate
()
this
.
handleAdd
()
},
...
...
src/views/productManage/menuList/app.js
View file @
0c34362
// import App from './index.vue'
import
base
from
'@/base'
import
GlsxVueCommon
from
'glsx-vue-common'
import
notice
from
'@/common/notice'
const
Apps
=
require
.
context
(
'./'
,
false
,
/
\.
vue$/
)
Apps
.
keys
().
map
(
item
=>
{
console
.
log
(
item
)
base
.
getConfig
().
then
(
data
=>
{
const
{
vue
,
config
}
=
data
vue
.
use
(
GlsxVueCommon
,
config
)
vue
.
prototype
.
notice
=
notice
base
.
render
(
Apps
(
item
).
default
)
})
})
...
...
src/views/productManage/menuList/index.vue
View file @
0c34362
...
...
@@ -109,7 +109,6 @@
<
script
>
import
_
from
'lodash'
import
{
Util
}
from
'@/common/util'
import
SelectTree
from
'../components/SelectTree'
import
{
menuApi
,
baseApi
}
from
'@/api/productManage'
export
default
{
...
...
@@ -182,10 +181,7 @@ export default {
prop
:
'productName'
},
{
label
:
'更新时间'
,
prop
:
'updatedTime'
,
formatter
:
cellValue
=>
{
return
cellValue
.
updatedTime
?
Util
.
dateFormate
(
cellValue
.
updatedTime
,
'YYYY-MM-DD HH:mm:ss'
)
:
''
}
prop
:
'updatedTime'
}]
},
// 弹窗
...
...
@@ -235,11 +231,9 @@ export default {
optionLabel
:
'dictLabel'
,
optionsName
:
'productList'
,
changeAttr
:
(
value
,
targetItem
)
=>
{
baseApi
.
getMenuTree
({
productId
:
value
}).
then
(
res
=>
{
this
.
baseData
.
menuTreeList
=
res
.
data
this
.
editForm
.
parentId
=
''
this
.
editForm
.
parentName
=
''
})
this
.
editForm
.
parentId
=
''
this
.
editForm
.
parentName
=
''
this
.
getMenuTree
(
value
)
}
},
{
label
:
'菜单类型'
,
...
...
@@ -382,15 +376,6 @@ export default {
this
.
getOptionsList
(
'searchFormData'
)
this
.
getOptionsList
(
'editFormData'
,
false
)
})
baseApi
.
getMenuTree
().
then
(
res
=>
{
// console.log(res.data)
this
.
baseData
.
menuTreeList
=
res
.
data
this
.
baseData
.
menuTreeList
.
unshift
({
id
:
' '
,
menuName
:
'无(表示顶级菜单)'
,
childlist
:
[]
})
})
},
methods
:
{
...
...
@@ -416,26 +401,42 @@ export default {
resolve
(
this
.
tableSearchForm
)
})
},
isMenuSpecial
(
flag
=
true
)
{
console
.
log
(
flag
)
this
.
editForm
.
ownedCusgroupType
=
''
this
.
editForm
.
ownedCusgroupValue
=
[]
this
.
editForm
.
ownedMerchant
=
''
this
.
editFormData
[
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
===
'ownedCusgroupType'
)].
isHide
=
!
flag
this
.
editFormData
[
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
===
'ownedCusgroupValue'
)].
isHide
=
!
flag
this
.
editFormData
[
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
===
'ownedMerchant'
)].
isHide
=
!
flag
this
.
editRule
.
ownedCusgroupValue
[
0
].
required
=
flag
this
.
editRule
.
ownedCusgroupType
[
0
].
required
=
flag
getMenuTree
(
productId
,
fn
)
{
baseApi
.
getMenuTree
({
productId
:
productId
}).
then
(
res
=>
{
this
.
baseData
.
menuTreeList
=
res
.
data
this
.
baseData
.
menuTreeList
.
unshift
({
id
:
' '
,
menuName
:
'无(表示顶级菜单)'
,
childlist
:
[]
})
this
.
getOptionsList
(
'editFormData'
,
false
)
fn
&&
fn
()
})
},
isMenuSpecial
(
isSpecial
=
true
)
{
if
(
!
isSpecial
)
{
this
.
editForm
.
ownedCusgroupType
=
''
this
.
editForm
.
ownedCusgroupValue
=
[]
this
.
editForm
.
ownedMerchant
=
''
}
this
.
baseData
.
cusGroupList
=
isSpecial
?
this
.
baseData
[
this
.
attrToList
[
this
.
editForm
.
ownedCusgroupType
]]
:
[]
this
.
getOptionsList
(
'editFormData'
,
false
)
this
.
editFormData
[
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
===
'ownedCusgroupType'
)].
isHide
=
!
isSpecial
this
.
editFormData
[
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
===
'ownedCusgroupValue'
)].
isHide
=
!
isSpecial
this
.
editFormData
[
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
===
'ownedMerchant'
)].
isHide
=
!
isSpecial
this
.
editRule
.
ownedCusgroupValue
[
0
].
required
=
isSpecial
&&
(
this
.
editForm
.
ownedCusgroupType
!==
3
)
this
.
editRule
.
ownedCusgroupType
[
0
].
required
=
isSpecial
},
editDisable
()
{
this
.
editFormData
[
this
.
editFormData
.
findIndex
(
item
=>
item
.
label
===
'产品'
)].
isDisabled
=
!!
this
.
editForm
.
menuCode
this
.
editFormData
[
this
.
editFormData
.
findIndex
(
item
=>
item
.
label
===
'父级菜单'
)].
isDisabled
=
!!
this
.
editForm
.
menuCode
this
.
editFormData
[
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
===
'isSpecial'
)].
isDisabled
=
!!
this
.
editForm
.
menuCode
this
.
editFormData
[
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
===
'ownedCusgroupValue'
)].
isDisabled
=
!!
this
.
editForm
.
menuCode
&&
!
(
this
.
editForm
.
ownedCusgroupType
!==
3
)
},
handleAdd
()
{
handleAdd
(
isEdit
=
false
)
{
this
.
editVisible
=
!
this
.
editVisible
this
.
editDisable
()
this
.
isMenuSpecial
(
false
)
!
isEdit
&&
this
.
isMenuSpecial
(
false
)
this
.
$refs
.
editFormRef
&&
(
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
clearValidate
())
},
handleConfirm
()
{
...
...
@@ -469,15 +470,27 @@ export default {
ownedCusgroupValue
:
[],
ownedMerchant
:
''
}
var
resetBaseNameList
=
[
'menuTreeList'
,
'cusGroupList'
]
resetBaseNameList
.
forEach
(
item
=>
{
this
.
baseData
[
item
]
=
[]
})
this
.
getOptionsList
(
'editFormData'
,
false
)
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
clearValidate
()
this
.
handleAdd
()
},
handleEdit
(
row
)
{
// console.log(row)
this
.
editForm
=
_
.
cloneDeep
(
row
)
this
.
editForm
.
parentId
=
this
.
editForm
.
parentId
||
' '
this
.
handleAdd
()
this
.
editForm
.
isSpecial
&&
this
.
isMenuSpecial
(
true
)
if
(
!
this
.
editForm
.
parentId
)
{
this
.
editForm
.
parentId
=
' '
this
.
editForm
.
parentName
=
'无(表示顶级菜单)'
}
if
(
this
.
editForm
.
isSpecial
)
{
this
.
editForm
.
ownedCusgroupValue
&&
(
this
.
editForm
.
ownedCusgroupValue
=
this
.
editForm
.
ownedCusgroupValue
.
split
(
','
).
map
(
item
=>
+
item
))
this
.
isMenuSpecial
(
true
)
}
this
.
getMenuTree
(
this
.
editForm
.
productId
,
()
=>
{
this
.
handleAdd
(
true
)
})
},
handleDelete
(
row
)
{
this
.
$confirm
(
'是否删除菜单?'
,
'提示'
,
{
...
...
src/views/productManage/productList/app.js
View file @
0c34362
// import App from './index.vue'
import
base
from
'@/base'
import
GlsxVueCommon
from
'glsx-vue-common'
import
notice
from
'@/common/notice'
const
Apps
=
require
.
context
(
'./'
,
false
,
/
\.
vue$/
)
...
...
@@ -12,7 +11,6 @@ Apps.keys().map(item => {
config
}
=
data
vue
.
use
(
GlsxVueCommon
,
config
)
vue
.
prototype
.
notice
=
notice
base
.
render
(
Apps
(
item
).
default
)
})
})
Write
Preview
Markdown
is supported
Attach a file
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 post a comment