Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bigwood
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
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
罗超
bigwood
Commits
82c244d8
Commit
82c244d8
authored
Apr 13, 2025
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
cdce09dc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
35 deletions
+37
-35
notice.ts
src/api/notice.ts
+4
-1
MainLayout.vue
src/layouts/MainLayout.vue
+27
-25
List.vue
src/pages/notice/List.vue
+6
-9
No files found.
src/api/notice.ts
View file @
82c244d8
...
...
@@ -4,7 +4,10 @@ import request from './request'
class
NoticeService
{
// 提交訂單
static
async
getNoticeList
(
param
:
any
):
Promise
<
HttpResponse
>
{
return
request
(
'User_get_NoticeGetPageList'
,
param
)
return
request
(
'b2b_get_GetCustomerNoticePageList'
,
param
)
}
static
async
getNoticeNewDetail
(
param
:
any
):
Promise
<
HttpResponse
>
{
return
request
(
'b2b_get_GetCustomerNewNotice'
,
param
)
}
}
...
...
src/layouts/MainLayout.vue
View file @
82c244d8
...
...
@@ -69,19 +69,18 @@
<q-dialog
class=
"no-padding"
v-model=
"noticeDialogVisible"
persistent
>
<q-card
flat
class=
"q-pa-md column"
style=
"width:60vw;min-width: 375px; height: 80vh;"
>
<div
class=
"text-h6 text-weight-bold full-width text-center"
>
{{
noticeDialogData
.
T
itle
}}
{{
noticeDialogData
.
t
itle
}}
</div>
<div
class=
"text-center"
style=
"font-size: 12px; font-weight: 400;"
>
<span
class=
"text-grey-500"
>
{{
$t
(
'notice.column.publisher'
)
}}
:
{{
noticeDialogData
.
UpdateName
}}
</span>
<span
class=
"text-grey-500 q-ml-md"
>
{{
$t
(
'notice.column.releaseDate'
)
}}
{{
noticeDialogData
.
Notice_date
}}
</span>
<span
class=
"text-grey-500"
>
{{
$t
(
'notice.column.releaseDate'
)
}}
{{
noticeDialogData
.
notice_date
}}
</span>
</div>
<div
style=
"overflow-y: auto;"
class=
"text-body2 q-mt-md full-width col q-pa-md"
v-html=
"noticeDialogData.
C
ontent"
></div>
<div
class=
"q-mt-md row items-center"
v-if=
"fileList.length > 0"
>
<div
style=
"overflow-y: auto;"
class=
"text-body2 q-mt-md full-width col q-pa-md"
v-html=
"noticeDialogData.
c
ontent"
></div>
<div
class=
"q-mt-md row items-center"
v-if=
"
noticeDialogData.
fileList.length > 0"
>
<span
class=
"text-grey-500"
>
{{
$t
(
'notice.detail.file'
)
}}
:
</span>
<q-btn
v-for=
"(x,i) in
fileList"
dense
:key=
"i"
color=
"primary"
flat
unelevated
:label=
"x.N
ame"
@
click=
"downloadFile(x)"
/>
<q-btn
v-for=
"(x,i) in
noticeDialogData.fileList"
class=
"q-mr-md"
dense
:key=
"i"
color=
"primary"
flat
unelevated
:label=
"x.n
ame"
@
click=
"downloadFile(x)"
/>
</div>
<div
class=
"q-mt-md text-right"
>
<q-btn
color=
"primary"
flat
unelevated
@
click=
"
noticeDialogVisible = false
"
:label=
"$t('close')"
/>
<q-btn
color=
"primary"
flat
unelevated
@
click=
"
closeNoticeDialog
"
:label=
"$t('close')"
/>
</div>
</q-card>
</q-dialog>
...
...
@@ -122,7 +121,7 @@ export default {
})
const
{
t
}
=
useI18n
()
const
downloadFile
=
async
(
file
:
any
)
=>
{
const
url
=
'http://imgfile.oytour.com/'
+
file
.
U
rl
const
url
=
'http://imgfile.oytour.com/'
+
file
.
u
rl
try
{
const
response
=
await
fetch
(
url
)
const
blob
=
await
response
.
blob
()
...
...
@@ -166,13 +165,7 @@ export default {
()
=>
noticeDialogData
.
value
,
(
n
,
o
)
=>
{
console
.
log
(
n
)
noticeDialogVisible
.
value
=
(
noticeDialogData
.
value
&&
noticeDialogData
.
value
?.
Id
>
0
)
console
.
log
(
noticeDialogVisible
.
value
)
if
(
noticeDialogData
.
value
?.
File_url
){
fileList
.
value
=
JSON
.
parse
(
noticeDialogData
.
value
?.
File_url
)
}
else
{
fileList
.
value
=
[]
}
noticeDialogVisible
.
value
=
(
noticeDialogData
.
value
&&
noticeDialogData
.
value
?.
id
>
0
)
},
{
immediate
:
true
,
deep
:
true
}
)
...
...
@@ -203,22 +196,30 @@ export default {
})
}
}
const
closeNoticeDialog
=
()
=>
{
noticeDialogVisible
.
value
=
false
noticeDialogData
.
value
=
null
//localStorage.removeItem('lastNotice')
}
const
getNoticeList
=
async
()
=>
{
// @TODO 获取公告列表
// const res = await NoticeService.getNoticeList({
// pageIndex: 1,
// pageSize: 100,
// Title: '',
// StartDate: '',
// EndDate: '',
// status: 1
// })
// console.log(res)
try
{
const
res
=
await
NoticeService
.
getNoticeNewDetail
({})
if
(
res
.
data
.
resultCode
==
ApiResult
.
SUCCESS
){
const
lastNotice
=
localStorage
.
getItem
(
'lastNotice'
)
if
(
lastNotice
!=
res
.
data
.
data
.
id
){
noticeDialogData
.
value
=
res
.
data
.
data
localStorage
.
setItem
(
'lastNotice'
,
res
.
data
.
data
.
id
)
}
}
}
catch
(
error
)
{
console
.
log
(
error
)
}
}
onMounted
(()
=>
{
if
(
!
localStorage
.
getItem
(
'baseifo'
))
{
methods
.
getConfigData
()
}
getNoticeList
()
setInterval
(()
=>
{
data
.
isDadge
=
false
setTimeout
(()
=>
{
...
...
@@ -236,6 +237,7 @@ export default {
noticeDialogVisible
,
noticeDialogData
,
downloadFile
,
closeNoticeDialog
,
fileList
}
}
...
...
src/pages/notice/List.vue
View file @
82c244d8
...
...
@@ -86,11 +86,8 @@ const queryParams = reactive({
StartDate
:
''
,
EndDate
:
''
,
Title
:
''
,
Is_top
:
-
1
,
Status
:
1
,
pageIndex
:
1
,
pageSize
:
10
,
UpdateBy
:
-
1
,
total
:
0
,
pageCount
:
0
})
...
...
@@ -98,15 +95,15 @@ const loading = ref(false)
const
canHide
=
ref
(
false
)
const
rows
=
ref
<
any
[]
>
([])
const
columns
=
ref
([
{
name
:
'Title'
,
label
:
t
(
'notice.search.title'
),
align
:
'left'
,
field
:
'
T
itle'
},
{
name
:
'UpdateName'
,
label
:
t
(
'notice.column.publisher'
),
align
:
'left'
,
field
:
'
U
pdateName'
},
{
name
:
'Notice_date'
,
label
:
t
(
'notice.column.releaseDate'
),
align
:
'left'
,
field
:
'
N
otice_date'
},
{
name
:
'Title'
,
label
:
t
(
'notice.search.title'
),
align
:
'left'
,
field
:
'
t
itle'
},
{
name
:
'UpdateName'
,
label
:
t
(
'notice.column.publisher'
),
align
:
'left'
,
field
:
'
u
pdateName'
},
{
name
:
'Notice_date'
,
label
:
t
(
'notice.column.releaseDate'
),
align
:
'left'
,
field
:
'
n
otice_date'
},
{
name
:
'Action'
,
label
:
t
(
'notice.column.action'
),
align
:
'left'
},
])
const
columnsMobile
=
ref
([
{
name
:
'Title'
,
label
:
t
(
'notice.search.title'
),
align
:
'left'
,
field
:
'
T
itle'
},
{
name
:
'UpdateName'
,
label
:
t
(
'notice.column.publisher'
),
align
:
'left'
,
field
:
'
U
pdateName'
},
{
name
:
'Notice_date'
,
label
:
t
(
'notice.column.releaseDate'
),
align
:
'left'
,
field
:
'
N
otice_date'
}
{
name
:
'Title'
,
label
:
t
(
'notice.search.title'
),
align
:
'left'
,
field
:
'
t
itle'
},
{
name
:
'UpdateName'
,
label
:
t
(
'notice.column.publisher'
),
align
:
'left'
,
field
:
'
u
pdateName'
},
{
name
:
'Notice_date'
,
label
:
t
(
'notice.column.releaseDate'
),
align
:
'left'
,
field
:
'
n
otice_date'
}
])
const
searchCnt
=
computed
(()
=>
{
let
cnt
=
0
...
...
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