Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vue-gantt
Overview
Overview
Details
Activity
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
杨子
vue-gantt
Commits
62b2607f
Commit
62b2607f
authored
Jun 27, 2022
by
杨子
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化代码
parent
56954193
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
24 additions
and
33 deletions
+24
-33
.env.prod
.env.prod
+3
-3
package.json
package.json
+1
-1
GGanttBar.vue
src/components/GGanttBar.vue
+0
-1
GGanttRow.vue
src/components/GGanttRow.vue
+0
-3
GanttView.vue
src/components/GanttView.vue
+0
-2
index.ts
src/router/index.ts
+8
-15
index.ts
src/utils/index.ts
+11
-0
AboutView.vue
src/views/AboutView.vue
+0
-5
v-gantt.zip
v-gantt.zip
+0
-0
vue.config.js
vue.config.js
+1
-3
No files found.
.env.
localProduction
→
.env.
prod
View file @
62b2607f
# 生产环境配置
ENV = '
local
'
ENV = '
production
'
NODE_ENV = production
#Jeeplus快速开发平台/后台地址
VUE_APP_SERVER_URL = 'http://127.0.0.1:
8080
/helicopter'
VUE_APP_SERVER_URL = 'http://127.0.0.1:
12081
/helicopter'
#单点登录设置
VUE_APP_SSO_LOGIN = 'false'
VUE_APP_CAS_SERVER = 'https://www.cainiao.com:8443/cas'
...
...
package.json
View file @
62b2607f
...
...
@@ -5,7 +5,7 @@
"scripts"
:
{
"serve"
:
"vue-cli-service serve"
,
"build"
:
"vue-cli-service build"
,
"build:
localProduction"
:
"vue-cli-service build --mode localProduction
"
,
"build:
prod"
:
"vue-cli-service build --mode prod
"
,
"test:unit"
:
"vue-cli-service test:unit"
,
"test:e2e"
:
"vue-cli-service test:e2e"
,
"lint"
:
"vue-cli-service lint"
...
...
src/components/GGanttBar.vue
View file @
62b2607f
...
...
@@ -150,7 +150,6 @@ window.addEventListener("resize", () => {
xStart
.
value
=
mapTimeToPosition
(
bar
.
value
[
barStart
.
value
]);
xEnd
.
value
=
mapTimeToPosition
(
bar
.
value
[
barEnd
.
value
]);
});
console
.
log
(
bar
.
value
.
ganttBarConfig
.
top
);
const
barStyle
=
computed
(()
=>
{
let
top
=
`
${
rowHeight
.
value
*
0.1
}
px`
...
...
src/components/GGanttRow.vue
View file @
62b2607f
...
...
@@ -78,9 +78,6 @@ const rowStyle = computed(() => {
return
Math
.
max
(
acc
,
bar
.
ganttBarConfig
.
top
)
},
0
)
console
.
log
(
'maxTop'
,
maxTop
);
if
(
maxTop
>
0
)
{
height
=
(
rowHeight
.
value
*
0.8
*
maxTop
)
+
(
rowHeight
.
value
*
0.1
)
*
(
maxTop
+
1
)
}
...
...
src/components/GanttView.vue
View file @
62b2607f
...
...
@@ -139,8 +139,6 @@ httpRequest
});
formatter
(
result
);
console
.
log
(
result
);
value
.
list
=
result
}
return
value
...
...
src/router/index.ts
View file @
62b2607f
import
{
createRouter
,
createWebHistory
,
RouteRecordRaw
}
from
'vue-router'
import
{
createRouter
,
createWebH
ashHistory
,
createWebH
istory
,
RouteRecordRaw
}
from
'vue-router'
import
Gantt
from
'../views/Gantt.vue'
import
{
getQueryString
}
from
'../utils'
const
routes
:
Array
<
RouteRecordRaw
>
=
[
{
path
:
'/'
,
name
:
'gantt'
,
component
:
Gantt
},
{
path
:
'/about'
,
name
:
'about'
,
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component
:
()
=>
import
(
/* webpackChunkName: "about" */
'../views/AboutView.vue'
)
component
:
()
=>
import
(
/* webpackChunkName: "about" */
'../views/Gantt.vue'
)
}
]
const
router
=
createRouter
({
history
:
createWebHistory
(
process
.
env
.
BASE_URL
),
history
:
createWebH
ashH
istory
(
process
.
env
.
BASE_URL
),
routes
})
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
sessionStorage
.
setItem
(
'taskResultId'
,
to
.
query
.
id
as
string
)
sessionStorage
.
setItem
(
'token'
,
to
.
query
.
token
as
string
)
next
()
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
sessionStorage
.
setItem
(
'taskResultId'
,
getQueryString
(
'id'
)
as
string
)
sessionStorage
.
setItem
(
'token'
,
getQueryString
(
'token'
)
as
string
)
next
()
})
export
default
router
src/utils/index.ts
0 → 100644
View file @
62b2607f
function
getQueryString
(
name
:
string
)
{
let
reg
=
new
RegExp
(
"(^|&)"
+
name
+
"=([^&]*)(&|$)"
,
"i"
);
let
r
=
window
.
location
.
search
.
substr
(
1
).
match
(
reg
);
if
(
r
!=
null
)
{
return
decodeURIComponent
(
r
[
2
]);
};
return
null
;
}
export
{
getQueryString
}
\ No newline at end of file
src/views/AboutView.vue
deleted
100644 → 0
View file @
56954193
<
template
>
<div
class=
"about"
>
<h1>
This is an about page
</h1>
</div>
</
template
>
v-gantt.zip
0 → 100644
View file @
62b2607f
File added
vue.config.js
View file @
62b2607f
const
{
defineConfig
}
=
require
(
'@vue/cli-service'
)
module
.
exports
=
defineConfig
({
transpileDependencies
:
true
,
publicPath
:
process
.
env
.
NODE_ENV
===
'production'
?
'/v-gantt/'
:
'/'
,
publicPath
:
'./'
,
devServer
:
{
port
:
3001
,
proxy
:
{
...
...
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