Commit 82c244d8 authored by 罗超's avatar 罗超

修改

parent cdce09dc
...@@ -4,7 +4,10 @@ import request from './request' ...@@ -4,7 +4,10 @@ import request from './request'
class NoticeService { class NoticeService {
// 提交訂單 // 提交訂單
static async getNoticeList(param:any):Promise<HttpResponse>{ 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)
} }
} }
......
...@@ -69,19 +69,18 @@ ...@@ -69,19 +69,18 @@
<q-dialog class="no-padding" v-model="noticeDialogVisible" persistent> <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;"> <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"> <div class="text-h6 text-weight-bold full-width text-center">
{{ noticeDialogData.Title }} {{ noticeDialogData.title }}
</div> </div>
<div class="text-center" style="font-size: 12px; font-weight: 400;"> <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">{{ $t('notice.column.releaseDate') }} {{ noticeDialogData.notice_date }}</span>
<span class="text-grey-500 q-ml-md">{{ $t('notice.column.releaseDate') }} {{ noticeDialogData.Notice_date }}</span>
</div> </div>
<div style="overflow-y: auto;" class="text-body2 q-mt-md full-width col q-pa-md" v-html="noticeDialogData.Content"></div> <div style="overflow-y: auto;" class="text-body2 q-mt-md full-width col q-pa-md" v-html="noticeDialogData.content"></div>
<div class="q-mt-md row items-center" v-if="fileList.length > 0"> <div class="q-mt-md row items-center" v-if="noticeDialogData.fileList.length > 0">
<span class="text-grey-500">{{ $t('notice.detail.file') }}</span> <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.Name" @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.name" @click="downloadFile(x)" />
</div> </div>
<div class="q-mt-md text-right"> <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> </div>
</q-card> </q-card>
</q-dialog> </q-dialog>
...@@ -122,7 +121,7 @@ export default { ...@@ -122,7 +121,7 @@ export default {
}) })
const { t } = useI18n() const { t } = useI18n()
const downloadFile = async (file: any) => { const downloadFile = async (file: any) => {
const url = 'http://imgfile.oytour.com/'+file.Url const url = 'http://imgfile.oytour.com/'+file.url
try { try {
const response = await fetch(url) const response = await fetch(url)
const blob = await response.blob() const blob = await response.blob()
...@@ -166,13 +165,7 @@ export default { ...@@ -166,13 +165,7 @@ export default {
() => noticeDialogData.value, () => noticeDialogData.value,
(n, o) => { (n, o) => {
console.log(n) console.log(n)
noticeDialogVisible.value = (noticeDialogData.value && noticeDialogData.value?.Id > 0) 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 = []
}
}, },
{ immediate: true, deep: true } { immediate: true, deep: true }
) )
...@@ -203,22 +196,30 @@ export default { ...@@ -203,22 +196,30 @@ export default {
}) })
} }
} }
const closeNoticeDialog = () => {
noticeDialogVisible.value = false
noticeDialogData.value = null
//localStorage.removeItem('lastNotice')
}
const getNoticeList = async () => { const getNoticeList = async () => {
// @TODO 获取公告列表 try {
// const res = await NoticeService.getNoticeList({ const res = await NoticeService.getNoticeNewDetail({})
// pageIndex: 1, if(res.data.resultCode == ApiResult.SUCCESS){
// pageSize: 100, const lastNotice = localStorage.getItem('lastNotice')
// Title: '', if(lastNotice!=res.data.data.id){
// StartDate: '', noticeDialogData.value = res.data.data
// EndDate: '', localStorage.setItem('lastNotice',res.data.data.id)
// status: 1 }
// }) }
// console.log(res) } catch (error) {
console.log(error)
}
} }
onMounted(() => { onMounted(() => {
if (!localStorage.getItem('baseifo')) { if (!localStorage.getItem('baseifo')) {
methods.getConfigData() methods.getConfigData()
} }
getNoticeList()
setInterval(() => { setInterval(() => {
data.isDadge = false data.isDadge = false
setTimeout(() => { setTimeout(() => {
...@@ -236,6 +237,7 @@ export default { ...@@ -236,6 +237,7 @@ export default {
noticeDialogVisible, noticeDialogVisible,
noticeDialogData, noticeDialogData,
downloadFile, downloadFile,
closeNoticeDialog,
fileList fileList
} }
} }
......
...@@ -86,11 +86,8 @@ const queryParams = reactive({ ...@@ -86,11 +86,8 @@ const queryParams = reactive({
StartDate: '', StartDate: '',
EndDate: '', EndDate: '',
Title: '', Title: '',
Is_top: -1,
Status: 1,
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 10,
UpdateBy: -1,
total: 0, total: 0,
pageCount: 0 pageCount: 0
}) })
...@@ -98,15 +95,15 @@ const loading = ref(false) ...@@ -98,15 +95,15 @@ const loading = ref(false)
const canHide = ref(false) const canHide = ref(false)
const rows = ref<any[]>([]) const rows = ref<any[]>([])
const columns = ref([ const columns = ref([
{ name: 'Title', label: t('notice.search.title'), align: 'left', field: 'Title' }, { name: 'Title', label: t('notice.search.title'), align: 'left', field: 'title' },
{ name: 'UpdateName', label: t('notice.column.publisher'), align: 'left', field: 'UpdateName' }, { name: 'UpdateName', label: t('notice.column.publisher'), align: 'left', field: 'updateName' },
{ name: 'Notice_date', label: t('notice.column.releaseDate'), align: 'left', field: 'Notice_date' }, { name: 'Notice_date', label: t('notice.column.releaseDate'), align: 'left', field: 'notice_date' },
{ name: 'Action', label: t('notice.column.action'), align: 'left' }, { name: 'Action', label: t('notice.column.action'), align: 'left' },
]) ])
const columnsMobile = ref([ const columnsMobile = ref([
{ name: 'Title', label: t('notice.search.title'), align: 'left', field: 'Title' }, { name: 'Title', label: t('notice.search.title'), align: 'left', field: 'title' },
{ name: 'UpdateName', label: t('notice.column.publisher'), align: 'left', field: 'UpdateName' }, { name: 'UpdateName', label: t('notice.column.publisher'), align: 'left', field: 'updateName' },
{ name: 'Notice_date', label: t('notice.column.releaseDate'), align: 'left', field: 'Notice_date' } { name: 'Notice_date', label: t('notice.column.releaseDate'), align: 'left', field: 'notice_date' }
]) ])
const searchCnt = computed(() => { const searchCnt = computed(() => {
let cnt = 0 let cnt = 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment