Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas
Commits
28f9c364
提交
28f9c364
authored
6月 28, 2022
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: update
上级
76157cf0
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
25 行增加
和
10 行删除
+25
-10
Index.vue
src/modules/home/views/Index.vue
+5
-3
MyProjectList.vue
src/modules/project/components/MyProjectList.vue
+5
-2
ProjectList.vue
src/modules/project/components/ProjectList.vue
+2
-0
Index.vue
src/modules/project/views/Index.vue
+6
-2
View.vue
src/modules/project/views/View.vue
+4
-3
axios.ts
src/utils/axios.ts
+3
-0
没有找到文件。
src/modules/home/views/Index.vue
浏览文件 @
28f9c364
...
...
@@ -184,9 +184,11 @@ const rows: Record<string, any>[] = [
}
if
(
!
user
.
hasCompany
)
{
ElMessage
({
message
:
'请先注册您的企业'
})
}
else
if
(
!
user
.
companyEnabled
)
{
ElMessage
({
message
:
'您的企业已被禁用,请联系我们解禁'
})
}
else
{
}
// else if (!user.companyEnabled) {
// ElMessage({ message: '您的企业已被禁用,请联系我们解禁' })
// }
else
{
window
.
open
(
'/hr/posts/job'
)
}
}
...
...
src/modules/project/components/MyProjectList.vue
浏览文件 @
28f9c364
...
...
@@ -7,8 +7,11 @@ import { getMyProjectList, enableProject } from '../api'
import
{
useUserStore
}
from
'@/stores/user'
const
user
=
useUserStore
()
const
emit
=
defineEmits
<
{
(
e
:
'update'
):
void
}
>
()
const
user
=
useUserStore
()
const
router
=
useRouter
()
const
dataset
=
reactive
<
{
total
:
number
;
list
:
ProjectType
[]
}
>
({
total
:
0
,
list
:
[]
})
...
...
@@ -32,7 +35,6 @@ watch(
fetchList
()
}
)
onMounted
(()
=>
{
fetchList
()
})
...
...
@@ -45,6 +47,7 @@ function onEnable(status: 1 | 2, data: ProjectType) {
.
then
(()
=>
{
ElMessage
.
success
(
`
${
statusText
}
成功`
)
fetchList
()
emit
(
'update'
)
})
.
catch
(
res
=>
{
ElMessage
.
error
(
res
.
message
)
...
...
src/modules/project/components/ProjectList.vue
浏览文件 @
28f9c364
...
...
@@ -6,6 +6,7 @@ import { getProjectList } from '../api'
const
dataset
=
reactive
<
{
total
:
number
;
list
:
ProjectType
[]
}
>
({
total
:
0
,
list
:
[]
})
const
params
=
reactive
({
page
:
1
,
limit
:
4
})
let
loading
=
$ref
(
false
)
function
fetchList
()
{
loading
=
true
getProjectList
(
params
)
...
...
@@ -28,6 +29,7 @@ watch(
onMounted
(()
=>
{
fetchList
()
})
defineExpose
({
fetchList
})
</
script
>
<
template
>
...
...
src/modules/project/views/Index.vue
浏览文件 @
28f9c364
...
...
@@ -5,11 +5,15 @@ import ProjectList from '../components/ProjectList.vue'
import
{
useUserStore
}
from
'@/stores/user'
const
user
=
useUserStore
()
const
projectRef
=
ref
()
const
projectFresh
=
()
=>
{
projectRef
.
value
.
fetchList
()
}
</
script
>
<
template
>
<AppContainer
background=
"#fff"
>
<MyProjectList
v-if=
"user.hasCompany"
></MyProjectList>
<ProjectList></ProjectList>
<MyProjectList
v-if=
"user.hasCompany"
@
update=
"projectFresh"
></MyProjectList>
<ProjectList
ref=
"projectRef"
></ProjectList>
</AppContainer>
</
template
>
src/modules/project/views/View.vue
浏览文件 @
28f9c364
...
...
@@ -96,7 +96,7 @@ function formatDate(timeStr: string) {
<li
v-for=
"(item, index) in files"
:key=
"index"
>
<a
:href=
"item.url"
target=
"_blank"
>
<Picture
/>
<
p>
{{
item
.
name
}}
</p
>
<
div
class=
"project-files-name"
>
{{
item
.
name
}}
</div
>
<span>
预览
</span>
</a>
</li>
...
...
@@ -179,12 +179,13 @@ function formatDate(timeStr: string) {
width
:
2em
;
height
:
2em
;
}
p
{
.project-files-name
{
padding
:
14px
0
;
font-size
:
18px
;
font-weight
:
400
;
line-height
:
1
4px
;
line-height
:
1
.5
;
color
:
#2b2b2b
;
text-align
:
center
;
}
span
{
font-size
:
16px
;
...
...
src/utils/axios.ts
浏览文件 @
28f9c364
...
...
@@ -59,6 +59,9 @@ httpRequest.interceptors.response.use(
location
.
href
=
`
${
import
.
meta
.
env
.
VITE_LOGIN_URL
}
?rd=
${
encodeURIComponent
(
location
.
href
)}
`
return
Promise
.
reject
(
data
)
}
if
(
data
.
code
===
4009
)
{
ElMessage
.
error
(
data
.
message
)
}
return
Promise
.
reject
(
data
)
},
function
(
error
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论