Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
sheng du
CountingDreams
Commits
ca51386b
Commit
ca51386b
authored
1 year ago
by
sheng du
Browse files
Options
Download
Email Patches
Plain Diff
开发基本完成
parent
360dbb0b
Changes
48
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
53 additions
and
20 deletions
+53
-20
package.json
package.json
+1
-1
src/assets/img/enterpriseAvater.png
src/assets/img/enterpriseAvater.png
+0
-0
src/assets/img/login-left-top.png
src/assets/img/login-left-top.png
+0
-0
src/assets/img/login-logo-back.png
src/assets/img/login-logo-back.png
+0
-0
src/assets/img/login-logo.png
src/assets/img/login-logo.png
+0
-0
src/assets/img/login-right-bottom.png
src/assets/img/login-right-bottom.png
+0
-0
src/assets/img/nav/materials.png
src/assets/img/nav/materials.png
+0
-0
src/assets/img/nav/materialsActive.png
src/assets/img/nav/materialsActive.png
+0
-0
src/assets/img/test-business.png
src/assets/img/test-business.png
+0
-0
src/assets/img/test-honor.png
src/assets/img/test-honor.png
+0
-0
src/components/App/AppHeader/index.vue
src/components/App/AppHeader/index.vue
+5
-2
src/components/App/BreadCrumb/index.vue
src/components/App/BreadCrumb/index.vue
+3
-1
src/components/App/ImgUploader/index.vue
src/components/App/ImgUploader/index.vue
+1
-1
src/components/App/PubDialog/index.vue
src/components/App/PubDialog/index.vue
+2
-2
src/components/App/SideBar/index.vue
src/components/App/SideBar/index.vue
+3
-1
src/components/App/SubHeader/index.vue
src/components/App/SubHeader/index.vue
+17
-3
src/components/App/Table/TableHeader/index.vue
src/components/App/Table/TableHeader/index.vue
+2
-2
src/components/App/Table/index.vue
src/components/App/Table/index.vue
+3
-2
src/router/index.js
src/router/index.js
+5
-4
src/store/tabledata/index.js
src/store/tabledata/index.js
+11
-1
No files found.
package.json
View file @
ca51386b
{
"name"
:
"
templat
"
,
"name"
:
"
countingdreams
"
,
"version"
:
"0.1.0"
,
"private"
:
true
,
"scripts"
:
{
...
...
This diff is collapsed.
Click to expand it.
src/assets/img/enterpriseAvater.png
0 → 100644
View file @
ca51386b
17.7 KB
This diff is collapsed.
Click to expand it.
src/assets/img/login-left-top.png
0 → 100644
View file @
ca51386b
22.3 KB
This diff is collapsed.
Click to expand it.
src/assets/img/login-logo-back.png
0 → 100644
View file @
ca51386b
66.8 KB
This diff is collapsed.
Click to expand it.
src/assets/img/login-logo.png
0 → 100644
View file @
ca51386b
9.37 KB
This diff is collapsed.
Click to expand it.
src/assets/img/login-right-bottom.png
0 → 100644
View file @
ca51386b
9.92 KB
This diff is collapsed.
Click to expand it.
src/assets/img/nav/materials.png
0 → 100644
View file @
ca51386b
433 Bytes
This diff is collapsed.
Click to expand it.
src/assets/img/nav/materialsActive.png
0 → 100644
View file @
ca51386b
467 Bytes
This diff is collapsed.
Click to expand it.
src/assets/img/test-business.png
0 → 100644
View file @
ca51386b
125 KB
This diff is collapsed.
Click to expand it.
src/assets/img/test-honor.png
0 → 100644
View file @
ca51386b
13.1 KB
This diff is collapsed.
Click to expand it.
src/components/App/AppHeader/index.vue
View file @
ca51386b
...
...
@@ -5,18 +5,18 @@
<span
class=
"welcome"
>
欢迎来到数字空间!
</span>
<img
src=
"@/assets/img/user.png"
alt=
""
/>
<span
class=
"user-name"
>
刘云
</span>
<span
class=
"user-name"
>
{{
userInfo
?.
name
}}
</span>
<img
src=
"@/assets/img/login-out.png"
@
click=
"loginOut"
alt=
""
/>
</div>
</div>
</
template
>
<
script
>
import
dayjs
from
"
dayjs
"
;
import
{
mapState
}
from
"
vuex
"
;
// import { appName } from "@/config";
// import { asyncRoutesSort } from "@/router";
// import cloneDeep from "lodash/cloneDeep";
// console.log(asyncRoutes);
export
default
{
name
:
"
AppHeader
"
,
data
()
{
...
...
@@ -32,6 +32,9 @@ export default {
};
},
computed
:
{
...
mapState
({
userInfo
:
(
state
)
=>
state
.
user
.
userInfo
,
}),
// menus() {
// return cloneDeep(asyncRoutesSort);
// },
...
...
This diff is collapsed.
Click to expand it.
src/components/App/BreadCrumb/index.vue
View file @
ca51386b
...
...
@@ -82,7 +82,9 @@ export default {
this
.
$store
.
dispatch
(
"
app/removeCacheRoutes
"
,
findItem
.
parent
.
name
);
}
//从列表去掉
this
.
pathList
=
this
.
pathList
.
filter
((
item
)
=>
item
?.
path
!=
targetName
);
this
.
pathList
=
this
.
pathList
.
filter
(
(
item
)
=>
item
?.
path
!=
targetName
);
if
(
this
.
$route
.
path
==
targetName
)
{
//关闭当前页面跳转到最后一个页面
this
.
$router
.
replace
(
this
.
pathList
[
this
.
pathList
.
length
-
1
]?.
path
);
...
...
This diff is collapsed.
Click to expand it.
src/components/App/ImgUploader/index.vue
View file @
ca51386b
...
...
@@ -86,7 +86,7 @@ export default {
// this.imgList = [...this.value, base64];
// };
// reader.onerror = (error) => {
// console.log(error);
//
//
console.log(error);
// };
},
deleteImg
(
item
,
index
)
{
...
...
This diff is collapsed.
Click to expand it.
src/components/App/PubDialog/index.vue
View file @
ca51386b
...
...
@@ -35,7 +35,7 @@ export default {
type
:
String
,
default
:
()
=>
"
标题
"
,
},
width
:{
width
:
{
type
:
String
,
default
:
()
=>
"
720px
"
,
},
...
...
@@ -52,7 +52,7 @@ export default {
},
methods
:
{
beforeClose
()
{
// console.log(
'
beforeClose
'
);
// console.log(
"
beforeClose
"
);
// this.dialogVisible = false;
this
.
$emit
(
"
beforeClose
"
);
},
...
...
This diff is collapsed.
Click to expand it.
src/components/App/SideBar/index.vue
View file @
ca51386b
...
...
@@ -24,7 +24,7 @@ export default {
}),
menus
()
{
let
allMenu
=
this
.
treeMap
(
cloneDeep
(
asyncRoutesSort
));
console
.
log
(
allMenu
);
//
console.log(allMenu);
// let findFatherItem = allMenu;
return
allMenu
||
[];
...
...
@@ -68,7 +68,9 @@ export default {
});
// console.log(res);
res
=
res
.
filter
(
//这里可控制菜单是否 关联权限
(
item
)
=>
!
item
.
meta
.
hidden
&&
this
.
userAuth
.
includes
(
item
.
name
)
// (item) => !item.meta.hidden
);
return
res
?.
length
?
res
:
null
;
},
...
...
This diff is collapsed.
Click to expand it.
src/components/App/SubHeader/index.vue
View file @
ca51386b
...
...
@@ -2,11 +2,20 @@
<div
class=
"sub-header"
>
<div
class=
"user-info flex"
>
<div
class=
"avatar"
>
<img
src=
"@/assets/img/avatar-test.png"
alt=
""
/>
<img
v-if=
"userInfo?.type == 1"
src=
"@/assets/img/avatar-test.png"
alt=
""
/>
<img
v-if=
"userInfo?.type == 2"
src=
"@/assets/img/enterpriseAvater.png"
alt=
""
/>
</div>
<div
class=
"info"
>
<div>
您好,欢迎登录~
</div>
<div
class=
"name"
>
李云
</div>
<div
class=
"name"
>
{{
userInfo
?.
name
}}
</div>
<div
class=
"level"
>
<span>
认证等级:
</span>
<div
class=
"level-box"
>
四级认证
</div>
...
...
@@ -17,12 +26,17 @@
</
template
>
<
script
>
import
{
mapState
}
from
"
vuex
"
;
export
default
{
name
:
"
SubHeader
"
,
data
()
{
return
{};
},
computed
:
{},
computed
:
{
...
mapState
({
userInfo
:
(
state
)
=>
state
.
user
.
userInfo
,
}),
},
watch
:
{},
methods
:
{},
};
...
...
This diff is collapsed.
Click to expand it.
src/components/App/Table/TableHeader/index.vue
View file @
ca51386b
...
...
@@ -281,7 +281,7 @@ export default {
},
methods
:
{
reset
()
{
console
.
log
(
this
.
data
);
//
console.log(this.data);
for
(
let
p
in
this
.
data
)
{
// if (Array.isArray(this.data[p])) {
// // const index = parseInt(p.substring(6));
...
...
@@ -390,7 +390,7 @@ export default {
let
selectVal
=
this
.
select
.
val
;
// console.log(this.ranges);
// setTimeout(() => {
// console.log(this.ranges);
//
//
console.log(this.ranges);
// }, 2000);
this
.
ranges
.
keys
.
forEach
((
key
,
index
)
=>
{
paramsRanges
[
key
]
=
this
.
ranges
.
val
?
this
.
ranges
.
val
[
index
]
:
""
;
...
...
This diff is collapsed.
Click to expand it.
src/components/App/Table/index.vue
View file @
ca51386b
...
...
@@ -361,7 +361,7 @@ export default {
}
// console.log(data);
}
//console.log(params);
//
console.log(params);
let
res
=
await
this
.
fetcher
(
params
);
setTimeout
(()
=>
{
if
(
!
res
)
{
...
...
@@ -375,6 +375,7 @@ export default {
this
.
scrollTop
();
},
300
);
}
catch
(
e
)
{
console
.
error
(
e
);
// console.log(e);
this
.
loading
=
false
;
}
...
...
@@ -385,7 +386,7 @@ export default {
this
.
mergeColumns
();
this
.
calcHeight
();
this
.
scrollTop
();
// console.log(
'
手动修改data
',
data);
// console.log(
"
手动修改data
",
data);
},
sortChange
({
column
,
prop
,
order
})
{
...
...
This diff is collapsed.
Click to expand it.
src/router/index.js
View file @
ca51386b
...
...
@@ -49,7 +49,7 @@ const genRouter = function(requireContext) {
};
const
mapSort
=
function
(
menus
)
{
console
.
log
(
menus
);
//
console.log(menus);
//递归,对路由进行排序,添加name和icon
const
_menus
=
menus
.
sort
((
a
,
b
)
=>
{
...
...
@@ -76,7 +76,7 @@ const routes = [
},
{
path
:
"
/login
"
,
name
:
'
login
'
,
name
:
"
login
"
,
component
:
()
=>
import
(
/* webpackChunkName: "accout" */
"
@/views/login.vue
"
),
// redirect: "/index"
...
...
@@ -99,7 +99,7 @@ const router = new VueRouter({
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
let
userAuth
=
store
.
state
.
user
.
userAuth
;
console
.
log
(
to
,
userAuth
);
//
console.log(to, userAuth);
if
(
to
.
meta
.
keepAlive
)
{
store
.
dispatch
(
"
app/addCacheRoutes
"
,
to
.
name
);
}
...
...
@@ -110,11 +110,12 @@ router.beforeEach((to, from, next) => {
next
();
}
else
{
router
.
replace
(
"
/login
"
);
next
();
}
});
router
.
addRoutes
(
asyncRoutes
);
console
.
log
(
router
);
//
console.log(router);
export
default
router
;
export
{
asyncRoutes
,
asyncRoutesSort
};
...
...
This diff is collapsed.
Click to expand it.
src/store/tabledata/index.js
View file @
ca51386b
import
testCardPhoto
from
"
@/assets/img/test-card-photo.png
"
;
import
testBusiness
from
"
@/assets/img/test-business.png
"
;
export
default
{
namespaced
:
true
,
state
:
{
...
...
@@ -12,12 +13,21 @@ export default {
time
:
"
2023-01-13
"
,
},
],
enterprisePhoto
:
[
{
id
:
1
,
name
:
"
营业执照
"
,
pic
:
testBusiness
,
picList
:
[
testBusiness
],
time
:
"
2023-01-13
"
,
},
],
},
actions
:
{
//修改列表数据
changeTableData
({
commit
},
paylod
)
{
const
{
field
,
data
}
=
paylod
;
console
.
log
(
field
,
data
);
//
console.log(field, data);
commit
(
"
SET_TABLE_DATA
"
,
{
field
,
data
});
},
},
...
...
This diff is collapsed.
Click to expand it.
Prev
1
2
3
Next
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