对接手机端

This commit is contained in:
范强强
2023-06-08 11:24:17 +08:00
parent 3cfd409afd
commit 469426cfb7
8 changed files with 168 additions and 46 deletions
+2 -1
View File
@@ -1875,5 +1875,6 @@ module.exports = {
send:'Send',
pleaseProcessThePC:'Please process it on the PC',
clickAndSelect:'Click and select',
phoneCreationTime:'Creation Time'
phoneCreationTime:'Creation Time',
theCurrentFormatSupportPreview:'The current format does not support preview',
}
+2 -1
View File
@@ -1976,5 +1976,6 @@ module.exports = {
send:'发送',
pleaseProcessThePC:'请在PC端处理',
clickAndSelect:'点击选择',
phoneCreationTime:'创建时间'
phoneCreationTime:'创建时间',
theCurrentFormatSupportPreview:'当前格式不支持预览',
}
+21
View File
@@ -0,0 +1,21 @@
import { Base64 } from 'js-base64'
import { Toast } from 'vant'
window._CONFIG['domianPreviewURL'] = 'http://localhost:8082/jero-boot'
window._CONFIG['domianWebImgURL'] = 'http://localhost:8082/jero-boot'
let downLoadFileUrl = window._CONFIG['domianPreviewURL'] + '/sys/common/download'
let downLoadImgUrl = window._CONFIG['domianWebImgURL'] + '/sys/common/download'
export function kkFileView(fileName, fileId) {
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
window._CONFIG['onlinePreviewDomainURL'] = 'http://localhost:8012/onlinePreview'
if (fileSuffix == '.docx' || fileSuffix == '.doc' || fileSuffix == '.pdf' || fileSuffix == '.xlsx' || fileSuffix == '.xls') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(downLoadFileUrl + '/' + fileId + fileSuffix)
window.open(url, '_blank')
} else if (fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(downLoadImgUrl + '/' + fileId + fileSuffix)
window.open(url, '_blank')
}else {
Toast('当前格式不支持预览')
}
}
@@ -20,9 +20,33 @@
<div v-for="(item,index) in detailList">
<div v-for="val in Object.keys(item)">
<van-collapse-item v-if="val == $t('essentialInformation')" :title="val" name="1">
<div class="content-box-type" v-for="(ol,index1) in item[val]">
<span class="content-box-left">{{ol.db_field_txt}}</span>
<span class="content-box-text">{{ol.value || '--'}}</span>
<div class="content-box-type-box" v-for="(ol,index1) in item[val]">
<div class="content-box-type-num" v-if="ol.field_show_type == 10">
<span class="content-box-left-num">{{ol.db_field_txt}}</span>
<span class="content-box-text-num"
v-if="!ol.list">--</span>
<span class="content-box-text-num"
v-for="valItem in ol.list"
@click="numClick(valItem)"
v-else-if="ol.list && ol.list.length > 0">
{{valItem.title}}
</span>
</div>
<div class="content-box-type-num" v-else-if="ol.field_show_type == 8">
<span class="content-box-left-num">{{ol.db_field_txt}}</span>
<span class="content-box-text-num" style="color: #040B29">
{{ol.value || '--'}}
</span>
</div>
<div class="content-box-type" v-else-if="ol.urlClick">
<span class="content-box-left">{{ol.db_field_txt}}</span>
<span class="content-box-text" style="color: #01A0AC"
@click="urlClick(ol)">{{ol.value || '--'}}</span>
</div>
<div class="content-box-type" v-else>
<span class="content-box-left">{{ol.db_field_txt}}</span>
<span class="content-box-text">{{ol.value || '--'}}</span>
</div>
</div>
</van-collapse-item>
@@ -33,7 +57,7 @@
{{ol.db_field_txt}}
</div>
<div v-if="ol.value && ol.value.length > 0">
<div class="textInformationFile" v-for="valItem in ol.value">
<div class="textInformationFile" @click="fileClick(valItem)" v-for="valItem in ol.value">
{{valItem.fileName}}
</div>
</div>
@@ -75,6 +99,7 @@
<script>
import { getAction, postAction, downFile } from '@/api/manage'
import { kkFileView } from '@/utils/kkfileView'
export default {
name: 'phoneDocumentDetails',
@@ -88,14 +113,14 @@
getPage: '/document/phasedImplementationDetailsEO/page',
getMenuList: 'document/bussDocumentLibraryEO/getMenuList'
},
show:false,
show: false,
serial_number: '',
detailList: [],
loading: false,
finished: false,
pageNo: 0,
dataGrad: [],
textLoading:this.$t('loading')
textLoading: this.$t('loading')
}
},
@@ -106,13 +131,21 @@
_this.getInfoById()
})
},
watch: {
'$route': function(res) {
let _this = this
this.getTitle(function() {
_this.getInfoById()
})
}
},
methods: {
iconClick() {
this.$router.go(-1)
},
getTitle(callback) {
this.show = true
let _id = this.$route.query.id || '93280f73b02148e3b34f1655fe3a6ade'
let _id = this.$route.query.id
getAction(this.url.getTitle, { id: _id }).then((res) => {
if (res.success) {
this.serial_number = res.result
@@ -123,7 +156,7 @@
})
},
getInfoById() {
let _id = this.$route.query.id || '93280f73b02148e3b34f1655fe3a6ade'
let _id = this.$route.query.id
getAction(this.url.getInfo, { id: _id }).then((res) => {
if (res.success) {
this.detailList = res.result
@@ -137,7 +170,7 @@
let query = {
pageNo: this.pageNo,
pageSize: 10,
bussDocumentLibraryId: this.$route.query.id || '93280f73b02148e3b34f1655fe3a6ade'
bussDocumentLibraryId: this.$route.query.id
}
getAction(this.url.getPage, query).then((res) => {
if (res.success) {
@@ -162,6 +195,20 @@
this.pageNo++
this.getPage()
}
},
fileClick(item) {
kkFileView(item.fileName, item.id)
},
urlClick(item) {
window.open(item.value)
},
numClick(item) {
this.$router.push({
path: '/phoneDocumentDetails',
query: {
id: item.id
}
})
}
}
}
@@ -281,13 +328,16 @@
margin-bottom: 0.6rem;
}
.content-box-type {
display: flex;
.content-box-type-box {
margin-top: 0.08rem;
margin-bottom: 0.4rem;
}
.content-box-type:last-child {
.content-box-type {
display: flex;
}
.content-box-type-box:last-child {
margin-bottom: 0.1rem;
}
@@ -301,6 +351,29 @@
min-width: 2rem;
}
.content-box-left-num {
display: inline-block;
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #6F7385;
width: 100%;
flex: none;
}
.content-box-text-num {
text-align: left;
width: 100%;
margin-top: 0.2rem;
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 500;
color: #01A0AC;
word-break: break-all;
flex: none;
display: inline-block;
}
.content-box-text {
text-align: right;
margin-left: 0.3rem;
+7 -4
View File
@@ -6,10 +6,10 @@
</div>
</div>
<div class="name-header">
Yingxi.Sun
{{user.username}}
</div>
<div class="eamil-header">
XXXXXXXXXXXX@nio.cn
{{user.email}}
</div>
<div class="content-box-top" @click="recentBrowsingClick">
@@ -45,7 +45,7 @@
<span class="content-box-text-one">
{{$t('languageSwitching')}}
</span>
<span class="lang" v-if="checked">英文</span>
<span class="lang" v-if="checked">En</span>
<span class="lang" v-else>中文</span>
<van-switch @change="checkedChange" :loading="isLoading" v-model="checked"/>
</div>
@@ -79,13 +79,16 @@
return {
active: 'home',
checked: localStorage.getItem('language') == 'en-us' ? true : false,
isLoading: false
isLoading: false,
user: {}
}
},
mounted() {
document.title = 'NIO GRP'
this.user = this.userInfo()
},
methods: {
...mapGetters(['userInfo']),
onChange(value) {
if (value == 'toDoCenter') {
this.$router.push({
@@ -29,7 +29,9 @@
</div>
<div class="contentFile" v-if="queryForm.accessoryFileNameList && queryForm.accessoryFileNameList.length > 0">
<div class="contentFile-text" v-for="item in queryForm.accessoryFileNameList">
<div class="contentFile-text"
@click="fileClick(item)"
v-for="item in queryForm.accessoryFileNameList">
{{item.fileName}}
</div>
</div>
@@ -131,6 +133,7 @@
<script>
import { getAction, postAction, putAction } from '@/api/manage'
import { mapGetters } from 'vuex'
import { kkFileView } from '@/utils/kkfileView'
import { deleteAction } from '../../api/manage'
import { Dialog, Toast } from 'vant'
@@ -317,6 +320,9 @@
vanField.focus()
})
},
fileClick(item) {
kkFileView(item.fileName, item.id)
},
messageClick(item) {
this.isDisplay = true
this.num = 2
@@ -56,6 +56,7 @@
</div>
<div class="content-box-type-text-one"
v-else
@click="dataSourceFileClick(item)"
v-for="item in dataSourceFile">
{{item.fileName}}
</div>
@@ -93,7 +94,8 @@
<div class="van-desgin">
{{item.approvalOpinion}}
</div>
<div class="van-file" v-if="item.approvalFileName && item.approvalFileName.length > 0"
<div class="van-file" @click="approvalFileClick(item,index1)"
v-if="item.approvalFileName && item.approvalFileName.length > 0"
v-for="(val,index1) in item.approvalFileName" :key="index1">
{{val}}
</div>
@@ -199,6 +201,7 @@
import moment from 'moment'
import axios from 'axios'
import Vue from 'vue'
import { kkFileView } from '@/utils/kkfileView'
import { ACCESS_TOKEN } from '@/store/mutation-types'
export default {
@@ -249,6 +252,12 @@
},
methods: {
...mapGetters(['userInfo']),
dataSourceFileClick(item) {
kkFileView(item.fileName, item.id)
},
approvalFileClick(item, index) {
kkFileView(item.approvalFileName[index], item.approvalFile[index])
},
iconClick() {
this.$router.go(-1)
},
@@ -663,9 +672,11 @@
color: #595E72;
width: 100%;
}
::v-deep .van-form .van-cell__value{
margin-top: 0.1rem;
::v-deep .van-form .van-cell__value {
margin-top: 0.1rem;
}
::v-deep .van-form .van-radio__icon .van-icon {
width: 0.45rem;
height: 0.45rem;
+30 -24
View File
@@ -33,66 +33,66 @@
<div class="content-box-content" @click="dataClick(item)" v-for="(item,index) in list" :key="index">
<div v-if="item.module_type_flag == 'WDK'">
<div class="content-box-title">
{{item.serial_number}}
{{item.serial_number || '--'}}
</div>
<div class="content-box-type">
<span class="content-box-left"
:class="{'content-box-left-En-WDK':language == 'en-us' ? true : false}"
>{{$t('title')}}</span>
<span class="content-box-text">{{item.title}}</span>
<span class="content-box-text">{{item.title || '--'}}</span>
</div>
<div class="content-box-type">
<span class="content-box-left"
:class="{'content-box-left-En-WDK':language == 'en-us' ? true : false}">{{$t('status')}}</span>
<span class="content-box-text">{{item.state}}</span>
<span class="content-box-text">{{item.state_dictText || '--'}}</span>
</div>
<div class="content-box-type">
<span class="content-box-left"
:class="{'content-box-left-En-WDK':language == 'en-us' ? true : false}">{{$t('category')}}</span>
<span class="content-box-text">{{item.module_type}}</span>
<span class="content-box-text">{{item.module_type || '--'}}</span>
</div>
</div>
<div v-else-if="item.module_type_flag == 'WTZSK' || item.module_type_flag == 'ZSFX'">
<div class="content-box-title">
{{item.title}}
{{item.title || '--'}}
</div>
<div class="content-box-type">
<span class="content-box-left-problemKnow"
:class="{'content-box-left-problemKnow-En':language == 'en-us' ? true : false}"
>{{$t('creator')}}</span>
<span class="content-box-text">张三</span>
<span class="content-box-text">{{item.create_by || '--'}}</span>
</div>
<div class="content-box-type">
<span class="content-box-left-problemKnow"
:class="{'content-box-left-problemKnow-En':language == 'en-us' ? true : false}">
{{$t('phoneCreationTime')}}
</span>
<span class="content-box-text">2023-10-12 10:20:30</span>
<span class="content-box-text">{{item.create_time_str || '--'}}</span>
</div>
<div class="content-box-type">
<span class="content-box-left-problemKnow"
:class="{'content-box-left-problemKnow-En':language == 'en-us' ? true : false}">{{$t('category')}}</span>
<span class="content-box-text">{{item.module_type}}</span>
<span class="content-box-text">{{item.module_type || '--'}}</span>
</div>
</div>
<div v-else-if="item.module_type_flag == 'FGYB'">
<div class="content-box-title">
{{item.title}}
{{item.title || '--'}}
</div>
<div class="content-box-type">
<span class="content-box-left-monthly"
:class="{'content-box-left-monthly-En':language == 'en-us' ? true : false}">{{$t('uploadedBy')}}</span>
<span class="content-box-text">李四会计师大后方会计师大后方迪斯科解放但还是分的考生</span>
<span class="content-box-text">{{item.create_by || '--'}}</span>
</div>
<div class="content-box-type">
<span class="content-box-left-monthly"
:class="{'content-box-left-monthly-En':language == 'en-us' ? true : false}">{{$t('uploadTime')}}</span>
<span class="content-box-text">2023-10-12 10:20:30</span>
<span class="content-box-text">{{item.create_time_str || '--'}}</span>
</div>
<div class="content-box-type">
<span class="content-box-left-monthly"
:class="{'content-box-left-monthly-En':language == 'en-us' ? true : false}">{{$t('category')}}</span>
<span class="content-box-text">{{item.module_type}}</span>
<span class="content-box-text">{{item.module_type || '--'}}</span>
</div>
</div>
</div>
@@ -110,17 +110,17 @@
<div class="content-box-content" @click="dataClick(item)" v-for="(item,index) in documentLibraryList"
:key="index">
<div class="content-box-title">
{{item.serial_number}}
{{item.serial_number || '--'}}
</div>
<div class="content-box-type">
<span class="content-box-left"
:class="{'content-box-left-En':language == 'en-us' ? true : false}">{{$t('title')}}</span>
<span class="content-box-text">{{item.title}}</span>
<span class="content-box-text">{{item.title || '--'}}</span>
</div>
<div class="content-box-type">
<span class="content-box-left"
:class="{'content-box-left-En':language == 'en-us' ? true : false}">{{$t('status')}}</span>
<span class="content-box-text">现行</span>
<span class="content-box-text">{{item.state_dictText}}</span>
</div>
</div>
</van-list>
@@ -137,20 +137,20 @@
<div class="content-box-content" @click="dataClick(item)" v-for="(item,index) in problemKnowledgeBaseList"
:key="index">
<div class="content-box-title">
{{item.title}}
{{item.title || '--'}}
</div>
<div class="content-box-type">
<span class="content-box-left-problemKnow"
:class="{'content-box-left-problemKnow-En':language == 'en-us' ? true : false}"
>{{$t('creator')}}</span>
<span class="content-box-text">张三是可见度发挥是的看见反函数反抗精神的回复的考试分数</span>
<span class="content-box-text">{{item.create_by || '--'}}</span>
</div>
<div class="content-box-type">
<span class="content-box-left-problemKnow"
:class="{'content-box-left-problemKnow-En':language == 'en-us' ? true : false}">
{{$t('phoneCreationTime')}}
</span>
<span class="content-box-text">2023-10-12 10:20:30</span>
<span class="content-box-text">{{item.create_time_str || '--'}}</span>
</div>
</div>
</van-list>
@@ -167,17 +167,17 @@
<div class="content-box-content" @click="dataClick(item)" v-for="(item,index) in monthlyReportRegulationsList"
:key="index">
<div class="content-box-title">
{{item.title}}
{{item.title || '--'}}
</div>
<div class="content-box-type">
<span class="content-box-left-monthly"
:class="{'content-box-left-monthly-En':language == 'en-us' ? true : false}">{{$t('uploadedBy')}}</span>
<span class="content-box-text">李四会计师大后方会计师大后方迪斯科解放但还是分的考生</span>
<span class="content-box-text">{{item.create_by || '--'}}</span>
</div>
<div class="content-box-type">
<span class="content-box-left-monthly"
:class="{'content-box-left-monthly-En':language == 'en-us' ? true : false}">{{$t('uploadTime')}}</span>
<span class="content-box-text">2023-10-12 10:20:30</span>
<span class="content-box-text">{{item.create_time_str || '--'}}</span>
</div>
</div>
</van-list>
@@ -188,6 +188,8 @@
<script>
import { getAction, postAction, downloadFile } from '@/api/manage'
import { Base64 } from 'js-base64'
import { kkFileView } from '@/utils/kkfileView'
export default {
name: 'phoneSearchList',
@@ -203,9 +205,11 @@
finished: false,
language: localStorage.getItem('language'),
pageNo: 0,
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download',
url: {
wholeUrl: 'search/document/getFullTextInfoList',
documentLibraryUrl: 'search/document/getInfoList',
documentLibraryUrl: 'search/document/getParagraphInfoList',
problemKnowledgeBaseUrl: '/search/document/getProblemKnowledgeBasePage',
monthlyReportRegulationsUrl: '/search/lawsMonthlyReport/page'
}
@@ -247,13 +251,15 @@
id: item.id
}
})
} else if (item.module_type_flag == 'WDK') {
} else if (item.module_type_flag == 'WTZSK' || item.module_type_flag == 'ZSFX') {
this.$router.push({
path: '/phoneDocumentDetails',
path: '/phoneProblemKnowledgeBase',
query: {
id: item.id
}
})
} else if (item.module_type_flag == 'FGYB') {
kkFileView(item.file_name, item.file_id)
}
},
onLoad() {