首页修改

(cherry picked from commit 9a3d0c18aca85c97451b226ff27ab2e91187c85e)
This commit is contained in:
Xia Zekun
2024-09-06 17:25:21 +08:00
committed by mzaxd
parent d7015d373b
commit 91de072668
3 changed files with 47 additions and 17 deletions
+29 -9
View File
@@ -1,11 +1,8 @@
<template>
<div class="home">
首页
<br>
<van-button type="info" @click="toSearch" style="margin-left: 0.1rem">标准检索</van-button>
<van-button type="info" @click="toMyTodo" style="margin-left: 0.1rem">我的待办</van-button>
<van-button type="info" @click="logout" style="margin-left: 0.1rem">退出登录</van-button>
<br>
<div class="container">
<van-button type="primary" @click="toSearch" class="functional-button1">标准检索</van-button>
<van-button type="primary" @click="toMyTodo" class="functional-button">我的待办</van-button>
<van-button type="danger" plain @click="logout" class="exit-button">退出登录</van-button>
</div>
</template>
@@ -43,7 +40,30 @@ export default {
</script>
<style scoped>
.home {
font-size: 0.28rem;
.container {
display: flex;
flex-direction: column;
justify-content: space-between;
}
.functional-button1 {
width: 90%;
height: 50px;
border-radius: 5px;
margin: 30px 5% 10px 5%;
}
.functional-button {
width: 90%;
height: 50px;
border-radius: 5px;
margin: 10px 5%;
}
.exit-button {
width: 90%;
height: 50px;
border-radius: 5px;
margin: 120% 5% 10px 5%;
}
</style>
+15 -7
View File
@@ -171,6 +171,7 @@ import { previewPdf } from '@/utils/previewPdf'
import { dealUrl } from '@/utils/kkFilePreview'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import { getFileInfo } from '@/api/api'
import { Toast } from 'vant'
export default {
name: 'GeneralSearch',
@@ -357,7 +358,8 @@ export default {
console.log(this.selectOptions)
callback && callback()
} else {
this.$message.warning(res.message)
// this.$message.warning(res.message)
Toast(res.message)
this.selectOptions = {}
}
}).finally(() => {
@@ -414,7 +416,8 @@ export default {
sessionStorage.setItem('ipagination', JSON.stringify(this.ipagination))
// console.log('this.ipagination', this.ipagination)
} else {
this.$message.warning(res.message)
// this.$message.warning(res.message)
Toast(res.message)
}
}).finally(() => {
this.loading = false
@@ -575,10 +578,12 @@ export default {
if (res.result) {
this.filePreview13(record)
} else {
this.$message.warn('您没有查看该文件的权限')
// this.$message.warn('您没有查看该文件的权限')
Toast('您没有查看该文件的权限')
}
} else {
this.$message.warn(res.message)
// this.$message.warn(res.message)
Toast(res.message)
}
})
} else {
@@ -594,7 +599,8 @@ export default {
// 获取并处理过程稿件数据
let res = await this.getFormFunc({ type: 1 })
if (!res.success) {
this.$message.warn(res.message)
// this.$message.warn(res.message)
Toast(res.message)
console.log('getFormFunc error:', res)
return
}
@@ -614,8 +620,9 @@ export default {
// 获取并处理详情数据
res = await this.getDocumentInfoFunc({ id: record.id, type: 1 })
if (!res.success) {
this.$message.warn(res.message)
// this.$message.warn(res.message)
console.log('getDocumentInfoFunc error:', res)
Toast('找不到该数据的文件信息')
return
}
const detailData = Object.assign({}, res.result || {})
@@ -662,7 +669,8 @@ export default {
file = await this.selectNewestFile(newestFileList)
if (file === null) { // 没有找到文件就退出
console.log('没有找到符合要求的文件!')
this.$message.error('该标准暂无预览文件,请联系标准管理员。')
// this.$message.error('该标准暂无预览文件,请联系标准管理员。')
Toast('该标准暂无预览文件,请联系标准管理员。')
return
}
console.log('seletedFile', file)
+3 -1
View File
@@ -11,6 +11,8 @@ module.exports = {
'nav-bar-title-text-color': white,
'nav-bar-background-color': primaryColor,
// 分页
'pagination-item-default-color': primaryColor
'pagination-item-default-color': primaryColor,
// 按钮
'button-primary-background-color': primaryColor
}
}