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
f1a5844e
Commit
f1a5844e
authored
Nov 30, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
f0447fae
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
617 additions
and
522 deletions
+617
-522
bug.js
api/bug.js
+12
-0
index.vue
layouts/basic-layout/header-bug/index.vue
+92
-66
default.vue
layouts/default.vue
+8
-8
index.vue
pages/account/login/index.vue
+2
-2
index.vue
pages/bug/index.vue
+503
-446
No files found.
api/bug.js
View file @
f1a5844e
/*
* @Author: your name
* @Date: 2020-03-30 13:55:31
* @LastEditTime: 2020-11-30 13:54:01
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \mes-ui\api\bug.js
*/
import
Api
from
'@/plugins/request'
export
default
{
index
:
`
${
bugUrl
}
/bugmain/paged`
,
...
...
@@ -31,4 +39,8 @@ export default {
get
(
params
)
{
return
Api
.
get
(
`
${
bugUrl
}
/bugmain/get`
,
params
);
},
//获取当前用户的未解决bug
bugcount
()
{
return
Api
.
post
(
`
${
bugUrl
}
/bugmain/bugcount`
);
},
}
\ No newline at end of file
layouts/basic-layout/header-bug/index.vue
View file @
f1a5844e
<!--
* @Author: your name
* @Date: 2020-03-30 14:07:08
* @LastEditTime: 2020-11-30 15:15:43
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \mes-ui\layouts\basic-layout\header-bug\index.vue
-->
<
template
>
<span
class=
"i-layout-header-trigger i-layout-header-trigger-min"
>
<span
class=
"i-layout-header-trigger i-layout-header-trigger-min"
>
<Dropdown
transfer
trigger=
"hover"
@
on-click=
"handleClickUserDropdown"
>
<span
@
click=
"openModelBugAdd"
>
<Badge
:count=
"bugCount === 0 ? null : bugCount"
:overflow-count=
"99"
:offset=
"[10, 0]"
>
<Icon
type=
"ios-bug"
size=
"18"
/>
</Badge>
</span>
<Icon
type=
"md-arrow-dropdown"
></Icon>
<DropdownMenu
slot=
"list"
>
<DropdownItem
name=
"bug"
>
bug列表
</DropdownItem>
</DropdownMenu>
<span
@
click=
"openModelBugAdd"
>
<Badge
:count=
"bugCount === 0 ? null : bugCount"
:overflow-count=
"99"
:offset=
"[10, 0]"
>
<Icon
type=
"ios-bug"
size=
"18"
/>
</Badge>
</span>
<Icon
type=
"md-arrow-dropdown"
></Icon>
<DropdownMenu
slot=
"list"
>
<DropdownItem
name=
"bug"
>
bug列表
</DropdownItem>
</DropdownMenu>
</Dropdown>
<Modal
title=
"新增bug"
v-model=
"bugAdd"
fullscreen
:z-index=
"999"
>
<addBugModal
ref=
"addBug"
></addBugModal>
<div
slot=
"footer"
>
<Button
@
click=
"addCancel"
>
取消
</Button>
<Button
type=
"primary"
@
click=
"addSave"
>
确定
</Button>
</div>
<addBugModal
ref=
"addBug"
></addBugModal>
<div
slot=
"footer"
>
<Button
@
click=
"addCancel"
>
取消
</Button>
<Button
type=
"primary"
@
click=
"addSave"
>
确定
</Button>
</div>
</Modal>
</span>
</span>
</
template
>
<
script
>
import
addBugModal
from
"@/pages/bug/component/add"
;
import
{
mapState
}
from
"vuex"
;
export
default
{
name
:
"addBug"
,
components
:
{
addBugModal
name
:
"addBug"
,
components
:
{
addBugModal
,
},
data
()
{
return
{
bugAdd
:
false
,
bugCount
:
this
.
$store
.
state
.
countBug
,
};
},
computed
:
{},
methods
:
{
async
handleClickUserDropdown
(
name
)
{
if
(
name
===
"bug"
)
{
this
.
$router
.
push
({
name
:
"bug"
,
});
}
},
data
()
{
return
{
bugAdd
:
false
,
bugCount
:
this
.
$store
.
state
.
countBug
};
openModelBugAdd
()
{
this
.
bugAdd
=
true
;
this
.
$refs
.
addBug
.
getEid
();
this
.
$refs
.
addBug
.
initial
();
},
computed
:
{},
methods
:
{
async
handleClickUserDropdown
(
name
)
{
if
(
name
===
"bug"
)
{
this
.
$router
.
push
({
name
:
"bug"
});
}
},
openModelBugAdd
()
{
this
.
bugAdd
=
true
;
this
.
$refs
.
addBug
.
getEid
();
this
.
$refs
.
addBug
.
initial
();
},
addCancel
()
{
this
.
$refs
.
addBug
.
resetFields
();
this
.
bugAdd
=
false
;
},
addSave
()
{
let
param
=
this
.
$refs
.
addBug
.
addBugInfo
();
//alert(JSON.stringify(param))
if
(
param
.
id
==
null
)
{
//增加确定
this
.
$http
.
bug
.
createorupdate
(
param
).
then
(
res
=>
{
if
(
res
.
result
.
status
)
{
this
.
$Message
.
success
(
"新增成功!"
);
let
newId
=
res
.
result
.
bugId
;
this
.
$refs
.
addBug
.
updateEid
(
newId
);
}
else
{
this
.
$Message
.
error
(
"新增失败!"
);
}
this
.
$refs
.
addBug
.
resetFields
();
this
.
bugAdd
=
false
;
});
}
else
{
this
.
$Message
.
error
(
"新增失败!"
);
}
}
addCancel
()
{
this
.
$refs
.
addBug
.
resetFields
();
this
.
bugAdd
=
false
;
},
created
()
{},
mounted
()
{
this
.
$store
.
commit
(
"setCountBug"
,
66
);
}
addSave
()
{
let
param
=
this
.
$refs
.
addBug
.
addBugInfo
();
//alert(JSON.stringify(param))
if
(
param
.
id
==
null
)
{
//增加确定
this
.
$http
.
bug
.
createorupdate
(
param
).
then
((
res
)
=>
{
if
(
res
.
result
.
status
)
{
this
.
$Message
.
success
(
"新增成功!"
);
let
newId
=
res
.
result
.
bugId
;
this
.
$refs
.
addBug
.
updateEid
(
newId
);
}
else
{
this
.
$Message
.
error
(
"新增失败!"
);
}
this
.
$refs
.
addBug
.
resetFields
();
this
.
bugAdd
=
false
;
});
}
else
{
this
.
$Message
.
error
(
"新增失败!"
);
}
},
},
created
()
{},
mounted
()
{
//获取当前用户未解决bug数量
this
.
$http
.
bug
.
bugcount
().
then
((
res
)
=>
{
if
(
res
.
success
)
{
this
.
$store
.
commit
(
"setCountBug"
,
res
.
result
);
this
.
bugCount
=
this
.
$store
.
state
.
countBug
;
}
});
},
watch
:
{
"$store.state.countBug"
(
v
)
{
if
(
v
>=
0
)
{
this
.
bugCount
=
v
;
}
},
},
};
</
script
>
layouts/default.vue
View file @
f1a5844e
...
...
@@ -19,7 +19,7 @@ export default {
components
:
{
MainLayout
},
data
()
{
return
{
menus
:
[]
menus
:
[]
,
};
},
async
fetch
({
store
,
params
})
{
...
...
@@ -66,11 +66,11 @@ export default {
this
.
$store
.
commit
(
"admin/menu/setOpenNames"
,
openNames
);
}
// this.appRouteChange(to, from);
}
}
,
},
methods
:
{
getMenu
()
{
this
.
$http
.
sysUser
.
getusermenu
().
then
(
res
=>
{
this
.
$http
.
sysUser
.
getusermenu
().
then
(
(
res
)
=>
{
if
(
res
.
result
)
{
this
.
menus
=
res
.
result
[
0
].
children
;
this
.
toMenu
(
this
.
menus
);
...
...
@@ -85,11 +85,11 @@ export default {
// const openNames = getSiderSubmenu(path, menuSider);
// this.$store.commit("admin/menu/setOpenNames", openNames);
}
}
});
},
toMenu
(
list
)
{
list
.
forEach
(
datas
=>
{
list
.
forEach
(
(
datas
)
=>
{
var
that
=
this
;
var
listObj
=
{};
datas
.
path
=
datas
.
url
;
...
...
@@ -105,7 +105,7 @@ export default {
datas
.
meta
=
{
auth
:
false
,
title
:
datas
.
title
,
closable
:
true
closable
:
true
,
};
datas
.
name
=
name
;
if
(
datas
.
children
!=
null
)
{
...
...
@@ -113,7 +113,7 @@ export default {
}
});
this
.
menusNew
=
list
;
}
}
}
,
}
,
};
</
script
>
\ No newline at end of file
pages/account/login/index.vue
View file @
f1a5844e
...
...
@@ -79,8 +79,8 @@ export default {
// this.oidc();
},
mounted
()
{
//正确写法
this
.
$refs
.
iTenantCode
.
focus
();
//正确写法
this
.
$refs
.
iTenantCode
.
focus
();
},
methods
:
{
...
mapActions
(
"admin/account"
,
[
"login"
]),
...
...
pages/bug/index.vue
View file @
f1a5844e
This diff is collapsed.
Click to expand it.
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