Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
source-trace-manage-go
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tracing
source-trace-manage-go
Commits
05722b41
Commit
05722b41
authored
Sep 25, 2020
by
zL
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交部分代码
parent
c01eed3b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
94 deletions
+36
-94
App.vue
src/entry/refactoring/App.vue
+0
-4
main.ts
src/entry/refactoring/main.ts
+2
-2
router.ts
src/entry/refactoring/router.ts
+5
-5
Main.vue
src/entry/refactoring/views/Main.vue
+2
-39
MainHeader.vue
src/entry/refactoring/views/MainHeader.vue
+3
-9
MainMenu.vue
src/entry/refactoring/views/MainMenu.vue
+24
-35
No files found.
src/entry/refactoring/App.vue
View file @
05722b41
...
...
@@ -5,12 +5,8 @@
</
template
>
<
script
>
// import popUp from '@/components/popUp'
export
default
{
name
:
"app"
,
components
:
{
// popUp
},
};
</
script
>
...
...
src/entry/refactoring/main.ts
View file @
05722b41
...
...
@@ -6,10 +6,10 @@ import '../../plugins/element.js';
import
store
from
'./store'
;
import
md5
from
'js-md5'
Vue
.
prototype
.
$md5
=
md5
//
import Gfilters from '@/utils/tool/filter';
import
Gfilters
from
'@/utils/tool/filter'
;
Vue
.
use
(
axiosPlugin
);
Vue
.
config
.
productionTip
=
false
;
//
Gfilters(Vue);
Gfilters
(
Vue
);
new
Vue
({
router
,
store
,
...
...
src/entry/refactoring/router.ts
View file @
05722b41
...
...
@@ -22,11 +22,11 @@ let router = new Router({ // todo 移除旧页面
path
:
'/main'
,
component
:
()
=>
import
(
/* webpackChunkName: "main" */
'./views/Main.vue'
),
children
:
[
{
path
:
'/categoryManage'
,
name
:
'categoryManage'
,
component
:
()
=>
import
(
/* webpackChunkName: "categoryManage" */
'./views/category/Index.vue'
),
},
//
{
//
path: '/categoryManage',
//
name: 'categoryManage',
//
component: () => import(/* webpackChunkName: "categoryManage" */ './views/category/Index.vue'),
//
},
]
}
// {
...
...
src/entry/refactoring/views/Main.vue
View file @
05722b41
...
...
@@ -4,61 +4,24 @@
<main-menu
class=
"col_left"
/>
<div
class=
"col_right"
>
<main-header
/>
<div
class=
"main_wrapper"
v-if=
"freshFlag"
>
<div
class=
"main_wrapper"
>
<router-view
/>
</div>
</div>
<!--
<first-add
v-if=
"showFirstAdd"
@
finish=
"handleFinishAdd"
/>
-->
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
Component
,
Vue
}
from
"vue-property-decorator"
;
// 本地组件
import
MainHeader
from
"./MainHeader.vue"
;
import
MainMenu
from
"./MainMenu.vue"
;
// import FirstAdd from "@/views/FirstAdd.vue";
@
Component
({
components
:
{
MainMenu
,
MainHeader
,
// FirstAdd,
},
})
export
default
class
Main
extends
Vue
{
public
uid
:
string
=
""
;
// public showFirstAdd: boolean = true;
public
freshFlag
:
boolean
=
true
;
public
created
()
{
// this.getUid();
}
// public exit() {
// this.$router.push("/");
// }
/**
* 获取登录管理员的uid
*/
// public getUid() {
// this.uid = "10086";
// }
// public handleFinishAdd(isEdit: boolean) {
// this.showFirstAdd = false;
// if (isEdit) {
// this.freshMain();
// }
// }
// private freshMain() {
// this.freshFlag = false;
// this.$nextTick(() => {
// this.freshFlag = true;
// });
// }
}
export
default
class
Main
extends
Vue
{}
</
script
>
<
style
scoped
>
...
...
src/entry/refactoring/views/MainHeader.vue
View file @
05722b41
...
...
@@ -5,7 +5,7 @@
<i
class=
"iconfont iconShapecopy1"
></i>
<span
class=
"user-text"
>
UID:
{{
getid
||
"10086"
}}
</span>
<ul
class=
"menu_box"
>
<li
@
click=
"go(
'quit'
)"
>
退出
</li>
<li
@
click=
"go()"
>
退出
</li>
</ul>
<i
class=
"iconxiangyousanjiao iconfont"
></i>
</div>
...
...
@@ -14,21 +14,15 @@
<
script
lang=
"ts"
>
import
{
Component
,
Vue
}
from
"vue-property-decorator"
;
import
*
as
storage
from
"@/entry/refactoring/plugins/storage"
;
// import { getUserInfo } from "../../../views/userCenter/Api.service";
@
Component
export
default
class
MainHeader
extends
Vue
{
get
getid
()
{
return
JSON
.
parse
(
String
(
sessionStorage
.
getItem
(
'user'
))).
id
return
JSON
.
parse
(
String
(
sessionStorage
.
getItem
(
"user"
))).
id
;
}
public
go
(
target
:
string
)
{
// if (target === "user") this.$router.push("/userCenter");
// else {
// this.$store.commit("clearUserInfos");
// storage.cleanLogin();
public
go
()
{
sessionStorage
.
removeItem
(
"user"
);
this
.
$router
.
push
(
"/"
);
// }
}
// 获取用户基本信息
// async getUserInfos() {
...
...
src/entry/refactoring/views/MainMenu.vue
View file @
05722b41
...
...
@@ -3,8 +3,8 @@
<nav
class=
"main_menu"
>
<div
class=
"menu-item menu-item_first"
:class=
"
{'js-menu-item_active':currentRoute===
RoutePages.CategoryManage
}"
@click="selectPage(
RoutePages.CategoryManage
)"
:class=
"
{'js-menu-item_active':currentRoute===
0
}"
@click="selectPage(
0,'categoryManage'
)"
>
<div
class=
"menu-item_subject-icon"
>
<i
class=
"iconfont"
>

</i>
...
...
@@ -14,8 +14,8 @@
</div>
<div
class=
"menu-item menu-item_product"
:class=
"
{'js-menu-item_active':currentRoute===
RoutePages.ProductManage
}"
@click="
goworldtradebase
"
:class=
"
{'js-menu-item_active':currentRoute===
1
}"
@click="
selectPage(1)
"
>
<div
class=
"menu-item_product-icon"
>
<i
class=
"iconfont"
>

</i>
...
...
@@ -23,7 +23,11 @@
<div
class=
"menu-item-label"
>
溯源
</div>
<div
class=
"menu-item-active_border"
></div>
</div>
<div
class=
"menu-item menu-item_template"
@
click=
"newPage()"
>
<div
class=
"menu-item menu-item_template"
:class=
"
{'js-menu-item_active':currentRoute===2}"
@click="selectPage(2,'userCenter')"
>
<div
class=
"menu-item_template-icon"
>
<i
class=
"iconfont"
>

</i>
</div>
...
...
@@ -36,37 +40,22 @@
<
script
>
let
UrlPrefixObj
=
require
(
"@/config/UrlPrefix"
);
export
default
{
data
()
{},
methods
:
{},
data
()
{
return
{
currentRoute
:
0
,
};
},
methods
:
{
selectPage
(
idnex
,
path
)
{
if
(
idnex
===
1
)
{
window
.
open
(
UrlPrefixObj
.
model
.
CHAIN_BROWSER_URL_PREFIX
);
}
else
{
this
.
currentRoute
=
idnex
;
this
.
$router
.
push
({
path
:
path
});
}
},
},
};
// import { Component, Prop, Vue } from "vue-property-decorator";
// import { RoutePages } from "@/types/common";
// @Component
// export default class MainMenu extends Vue {
// public RoutePages = RoutePages;
// 选中效果
// data(){
// return{
// }
// },
// currentRoute() {
// return this.$route.matched[1].name;
// }
// 打开区块链浏览器
// goworldtradebase() {
// window.open(UrlPrefixObj.model.CHAIN_BROWSER_URL_PREFIX);
// }
// 跳转页面
// selectPage(page) {
// // this.$router.push(page);
// }
// newPage() {
// this.$router.push("/userCenter");
// }
// }
</
script
>
<
style
scoped
lang=
"less"
>
.main_menu {
...
...
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