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
b366ac27
Commit
b366ac27
authored
Aug 27, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tenantCode
parent
2ca7dbc0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
217 additions
and
127 deletions
+217
-127
index.vue
pages/system/account/index.vue
+216
-126
account.js
store/admin/account.js
+1
-1
No files found.
pages/system/account/index.vue
View file @
b366ac27
<
template
>
<
template
>
<div>
<div>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
><template
slot=
"easySearch"
><Form
ref=
"formInline"
:model=
"easySearch"
inline
><FormItem
prop=
"keys"
><Input
placeholder=
"请输入关键字/////"
v-model=
"easySearch.keys.value"
/>
</FormItem>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
><template
slot=
"easySearch"
>
<FormItem><Button
type=
"primary"
@
click=
"search"
>
查询
</Button></FormItem>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
</Form></
template
>
<FormItem
prop=
"keys"
><Input
placeholder=
"请输入关键字/////"
v-model=
"easySearch.keys.value"
/>
</FormItem>
<FormItem><Button
type=
"primary"
@
click=
"search"
>
查询
</Button></FormItem>
</Form>
</
template
>
<
template
slot=
"searchForm"
>
<
template
slot=
"searchForm"
>
<Search
/>
<Search
/>
</
template
>
</
template
>
...
@@ -19,12 +22,12 @@
...
@@ -19,12 +22,12 @@
<Modal
v-model=
"detailModal"
title=
"详情"
>
<Modal
v-model=
"detailModal"
title=
"详情"
>
<Detail
:eid=
"curId"
/>
<Detail
:eid=
"curId"
/>
</Modal>
</Modal>
<Modal
v-model=
"deletelModal"
title=
"删除"
@
on-ok=
"removeOk"
<Modal
v-model=
"deletelModal"
title=
"删除"
@
on-ok=
"removeOk"
@
on-cancel=
"cancel"
>
@
on-cancel=
"cancel"
>
<p>
确定删除?
</p>
<p>
确定删除?
</p>
</Modal>
</Modal>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
Api
from
'./api'
import
Api
from
'./api'
import
Add
from
'./add'
import
Add
from
'./add'
...
@@ -33,15 +36,21 @@ import Detail from './detail'
...
@@ -33,15 +36,21 @@ import Detail from './detail'
import
Search
from
'./search'
import
Search
from
'./search'
export
default
{
export
default
{
name
:
'list'
,
name
:
'list'
,
components
:{
components
:
{
Add
,
Edit
,
Detail
,
Search
Add
,
Edit
,
Detail
,
Search
},
},
data
()
{
data
()
{
return
{
return
{
action
:
Api
.
index
,
action
:
Api
.
index
,
easySearch
:
{
easySearch
:
{
keys
:{
op
:
"name,loginName,password,token,source,remark"
,
value
:
null
}
keys
:
{
},
op
:
"name,loginName,password,token,source,remark"
,
value
:
null
}
},
addModal
:
false
,
addModal
:
false
,
editModal
:
false
,
editModal
:
false
,
detailModal
:
false
,
detailModal
:
false
,
...
@@ -49,42 +58,120 @@ keys:{op:"name,loginName,password,token,source,remark",value:null}
...
@@ -49,42 +58,120 @@ keys:{op:"name,loginName,password,token,source,remark",value:null}
curId
:
0
,
curId
:
0
,
columns
:
[
columns
:
[
//{ key:"id",title:this.l("id") ,hide:true ,align:"left" },
//{ key:"id",title:this.l("id") ,hide:true ,align:"left" },
{
key
:
"loginName"
,
title
:
this
.
l
(
"loginName"
)
,
easy
:
true
,
high
:
true
},
{
{
key
:
"name"
,
title
:
this
.
l
(
"name"
)
,
easy
:
true
,
high
:
true
},
key
:
"loginName"
,
{
key
:
"tenantName"
,
title
:
this
.
l
(
"tenantName"
)
,
easy
:
true
,
high
:
true
},
title
:
this
.
l
(
"loginName"
),
{
key
:
"creationTime"
,
title
:
this
.
l
(
"creationTime"
)
,
hide
:
true
,
align
:
"left"
},
easy
:
true
,
{
key
:
"creatorUserId"
,
title
:
this
.
l
(
"creatorUserId"
)
,
hide
:
true
,
align
:
"left"
},
high
:
true
{
key
:
"lastModificationTime"
,
title
:
this
.
l
(
"lastModificationTime"
)
,
hide
:
true
,
align
:
"left"
},
},
{
key
:
"lastModifierUserId"
,
title
:
this
.
l
(
"lastModifierUserId"
)
,
hide
:
true
,
align
:
"left"
},
{
{
key
:
"isDeleted"
,
title
:
this
.
l
(
"isDeleted"
)
,
hide
:
true
,
align
:
"left"
},
key
:
"name"
,
title
:
this
.
l
(
"name"
),
easy
:
true
,
high
:
true
},
{
key
:
"tenantName"
,
title
:
this
.
l
(
"tenantName"
),
easy
:
true
,
high
:
true
},
{
key
:
"creationTime"
,
title
:
this
.
l
(
"creationTime"
),
hide
:
true
,
align
:
"left"
},
{
key
:
"creatorUserId"
,
title
:
this
.
l
(
"creatorUserId"
),
hide
:
true
,
align
:
"left"
},
{
key
:
"lastModificationTime"
,
title
:
this
.
l
(
"lastModificationTime"
),
hide
:
true
,
align
:
"left"
},
{
key
:
"lastModifierUserId"
,
title
:
this
.
l
(
"lastModifierUserId"
),
hide
:
true
,
align
:
"left"
},
{
key
:
"isDeleted"
,
title
:
this
.
l
(
"isDeleted"
),
hide
:
true
,
align
:
"left"
},
// { key:"deleterUserId",title:this.l("deleterUserId") ,hide:true ,align:"left" },
// { key:"deleterUserId",title:this.l("deleterUserId") ,hide:true ,align:"left" },
// { key:"deletionTime",title:this.l("deletionTime") ,hide:true ,align:"left" },
// { key:"deletionTime",title:this.l("deletionTime") ,hide:true ,align:"left" },
{
key
:
"lastLoginTime"
,
title
:
this
.
l
(
"lastLoginTime"
)
,
align
:
"center"
,
width
:
260
,
high
:
true
},
{
{
key
:
"loginTimes"
,
title
:
this
.
l
(
"loginTimes"
)
,
align
:
"center"
,
width
:
160
,
high
:
true
},
key
:
"lastLoginTime"
,
{
key
:
"status"
,
title
:
this
.
l
(
"status"
)
,
align
:
"center"
,
width
:
160
,
high
:
true
,
code
:
'crm.customer.status'
},
title
:
this
.
l
(
"lastLoginTime"
),
align
:
"center"
,
width
:
260
,
high
:
true
},
{
key
:
"loginTimes"
,
title
:
this
.
l
(
"loginTimes"
),
align
:
"center"
,
width
:
160
,
high
:
true
},
{
key
:
"status"
,
title
:
this
.
l
(
"status"
),
align
:
"center"
,
width
:
160
,
high
:
true
,
code
:
'crm.customer.status'
},
{
{
title
:
'操作'
,
title
:
'操作'
,
key
:
'id'
,
key
:
'id'
,
width
:
140
,
width
:
140
,
align
:
'center'
,
align
:
'center'
,
render
:
(
h
,
params
)
=>
{
render
:
(
h
,
params
)
=>
{
return
h
(
'div'
,
{
class
:
"action"
},
[
return
h
(
'div'
,
{
class
:
"action"
},
[
// h('op', { attrs: { oprate: 'detail' }, on: { click: () => this.detail(params.row.id) } }, '查看'),
// h('op', { attrs: { oprate: 'detail' }, on: { click: () => this.detail(params.row.id) } }, '查看'),
h
(
'op'
,
{
attrs
:
{
oprate
:
'edit'
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
}
},
'编辑'
),
h
(
'op'
,
{
h
(
'op'
,
{
attrs
:
{
oprate
:
'remove'
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
}
},
'删除'
)
attrs
:
{
oprate
:
'edit'
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
}
},
'编辑'
),
h
(
'op'
,
{
attrs
:
{
oprate
:
'remove'
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
}
},
'删除'
)
])
])
}
}
},
},
]
]
}
}
},
},
mounted
()
{
mounted
()
{
console
.
log
(
this
);
console
.
log
(
this
);
},
},
async
fetch
({
store
,
params
})
{
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
},
},
methods
:
{
methods
:
{
addOk
()
{
addOk
()
{
this
.
$refs
.
grid
.
load
()
this
.
$refs
.
grid
.
load
()
this
.
addModal
=
false
this
.
addModal
=
false
...
@@ -109,7 +196,9 @@ keys:{op:"name,loginName,password,token,source,remark",value:null}
...
@@ -109,7 +196,9 @@ keys:{op:"name,loginName,password,token,source,remark",value:null}
this
.
curId
=
id
;
this
.
curId
=
id
;
},
},
removeOk
()
{
removeOk
()
{
Api
.
delete
({
id
:
this
.
curId
}).
then
((
r
)
=>
{
Api
.
delete
({
id
:
this
.
curId
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
$refs
.
grid
.
load
();
this
.
deletelModal
=
false
;
this
.
deletelModal
=
false
;
...
@@ -134,7 +223,7 @@ keys:{op:"name,loginName,password,token,source,remark",value:null}
...
@@ -134,7 +223,7 @@ keys:{op:"name,loginName,password,token,source,remark",value:null}
userId:'',
userId:'',
name:'',
name:'',
loginName:'',
loginName:'',
t
a
nantCode:'',
t
e
nantCode:'',
password:'',
password:'',
token:'',
token:'',
status:'',
status:'',
...
@@ -152,10 +241,11 @@ keys:{op:"name,loginName,password,token,source,remark",value:null}
...
@@ -152,10 +241,11 @@ keys:{op:"name,loginName,password,token,source,remark",value:null}
}
}
*/
*/
let
vkey
=
"account"
+
"."
+
key
;
let
vkey
=
"account"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
return
this
.
$t
(
vkey
)
||
key
}
}
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"less"
>
<
style
lang=
"less"
>
</
style
>
</
style
>
store/admin/account.js
View file @
b366ac27
...
@@ -41,7 +41,7 @@ export const actions = {
...
@@ -41,7 +41,7 @@ export const actions = {
if
(
res
.
result
)
{
if
(
res
.
result
)
{
util
.
cookies
.
set
(
'uuid'
,
res
.
result
.
userId
);
util
.
cookies
.
set
(
'uuid'
,
res
.
result
.
userId
);
util
.
cookies
.
set
(
't
anantCode'
,
res
.
result
.
ta
nantCode
);
util
.
cookies
.
set
(
't
enantCode'
,
res
.
result
.
te
nantCode
);
util
.
cookies
.
set
(
'token'
,
res
.
result
.
accessToken
);
util
.
cookies
.
set
(
'token'
,
res
.
result
.
accessToken
);
sessionStorage
.
setItem
(
'token'
,
res
.
result
.
accessToken
)
sessionStorage
.
setItem
(
'token'
,
res
.
result
.
accessToken
)
// // 设置 vuex 用户信息
// // 设置 vuex 用户信息
...
...
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