对接手机端

This commit is contained in:
范强强
2023-06-08 17:19:36 +08:00
parent 4cc6e22c30
commit 40727cedba
5 changed files with 96 additions and 11 deletions
+10 -2
View File
@@ -172,9 +172,16 @@
}
})
},
recentBrowseAdd(browseType, id) {
let query = {
browseType: browseType,
browseDataId: id
}
postAction('/phone/recentBrowse/add', query).then((res) => {
})
},
collectionClick(item) {
this.recentBrowseAdd('Document Library', item.documentId)
this.$router.push({
path: '/phoneDocumentDetails',
query: {
@@ -183,6 +190,7 @@
})
},
problemKnowledgeBaseClick(item) {
this.recentBrowseAdd('Knowledge sharing', item.id)
this.$router.push({
path: '/phoneProblemKnowledgeBase',
query: {
+10 -1
View File
@@ -88,14 +88,23 @@
}
})
},
recentBrowseAdd(browseType, id) {
let query = {
browseType: browseType,
browseDataId: id
}
postAction('/phone/recentBrowse/add', query).then((res) => {
})
},
collectionClick(item) {
this.recentBrowseAdd('Document Library', item.documentId)
this.$router.push({
path: '/phoneDocumentDetails',
query: {
id: item.documentId
}
})
},
}
}
}
</script>
@@ -8,18 +8,19 @@
</div>
<div class="content">
<div class="content-text" v-for="item in 8">
<div class="content-text" @click="recentBrowsingClick(item)" v-for="(item,index) in recentBrowsingList"
:key="index">
<div class="content-text-left">
<div class="content-text-top">
<span class="content-text-top-left">
测试类别
</span>
<span class="content-text-top-right">
测试检验项目
{{item.title || '--'}}
</span>
<!-- <span class="content-text-top-right">-->
<!-- 测试检验项目-->
<!-- </span>-->
</div>
<div class="content-text-button">
<span>ISO 898-1-2013</span>
<span>{{item.browseTypeName}}</span>
</div>
</div>
<div class="content-text-right">
@@ -31,14 +32,61 @@
</template>
<script>
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
import { mapGetters } from 'vuex'
import { kkFileView } from '@/utils/kkfileView'
export default {
name: 'phoneRecentBrowsing',
data() {
return {
url: {
page: '/phone/recentBrowse/page'
},
recentBrowsingList: []
}
},
mounted() {
document.title = 'NIO GRP'
this.getRecentBrowsing()
},
methods: {
...mapGetters(['userInfo']),
iconClick() {
this.$router.go(-1)
},
getRecentBrowsing() {
let query = {
createBy: this.userInfo().username,
pageNo: 1,
pageSize: 30
}
getAction(this.url.page, query).then((res) => {
if (res.success) {
this.recentBrowsingList = res.result.records || []
} else {
this.recentBrowsingList = []
}
})
},
recentBrowsingClick(item) {
if (item.browseType == 'Document Library') {
this.$router.push({
path: '/phoneDocumentDetails',
query: {
id: item.browseDataId
}
})
} else if (item.browseType == 'Regulatory Monthly Report') {
kkFileView(item.title, item.fileId)
} else if (item.browseType == 'Knowledge sharing') {
this.$router.push({
path: '/phoneProblemKnowledgeBase',
query: {
id: item.browseDataId
}
})
}
}
}
}
@@ -108,6 +156,15 @@
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 500;
color: #040B29;
word-break: break-all;
overflow: hidden;
display: -webkit-box;
text-overflow: ellipsis;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
/*! autoprefixer: on;*/
text-justify: inter-ideograph;
}
.content-text-button {
+1 -1
View File
@@ -23,7 +23,7 @@
</div>
<div class="content-box-value">
<div class="left-img">
<img src="~@/assets/wendang.png" alt="">
<img src="~@/assets/icon_wiki.png" alt="">
</div>
<div class="text-left">
<div class="text-left-top">{{$t('problemKnowledgeBase')}}</div>
+12 -1
View File
@@ -333,15 +333,25 @@
this.pageNo = 1
this.getList()
},
recentBrowseAdd(browseType, id) {
let query = {
browseType: browseType,
browseDataId: id
}
postAction('/phone/recentBrowse/add', query).then((res) => {
})
},
dataClick(item) {
if (item.module_type_flag == 'WDK') {
this.recentBrowseAdd('Document Library', item.id.slice(0, 32))
this.$router.push({
path: '/phoneDocumentDetails',
query: {
id: item.id
id: item.id.slice(0, 32)
}
})
} else if (item.module_type_flag == 'WTZSK' || item.module_type_flag == 'ZSFX') {
this.recentBrowseAdd('Knowledge sharing', item.id)
this.$router.push({
path: '/phoneProblemKnowledgeBase',
query: {
@@ -349,6 +359,7 @@
}
})
} else if (item.module_type_flag == 'FGYB') {
this.recentBrowseAdd('Regulatory Monthly Report', item.id)
kkFileView(item.file_name, item.file_id)
}
},