对接手机端
This commit is contained in:
@@ -172,9 +172,16 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
recentBrowseAdd(browseType, id) {
|
||||||
|
let query = {
|
||||||
|
browseType: browseType,
|
||||||
|
browseDataId: id
|
||||||
|
}
|
||||||
|
postAction('/phone/recentBrowse/add', query).then((res) => {
|
||||||
|
})
|
||||||
|
},
|
||||||
collectionClick(item) {
|
collectionClick(item) {
|
||||||
|
this.recentBrowseAdd('Document Library', item.documentId)
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: '/phoneDocumentDetails',
|
path: '/phoneDocumentDetails',
|
||||||
query: {
|
query: {
|
||||||
@@ -183,6 +190,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
problemKnowledgeBaseClick(item) {
|
problemKnowledgeBaseClick(item) {
|
||||||
|
this.recentBrowseAdd('Knowledge sharing', item.id)
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: '/phoneProblemKnowledgeBase',
|
path: '/phoneProblemKnowledgeBase',
|
||||||
query: {
|
query: {
|
||||||
|
|||||||
@@ -88,14 +88,23 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
recentBrowseAdd(browseType, id) {
|
||||||
|
let query = {
|
||||||
|
browseType: browseType,
|
||||||
|
browseDataId: id
|
||||||
|
}
|
||||||
|
postAction('/phone/recentBrowse/add', query).then((res) => {
|
||||||
|
})
|
||||||
|
},
|
||||||
collectionClick(item) {
|
collectionClick(item) {
|
||||||
|
this.recentBrowseAdd('Document Library', item.documentId)
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: '/phoneDocumentDetails',
|
path: '/phoneDocumentDetails',
|
||||||
query: {
|
query: {
|
||||||
id: item.documentId
|
id: item.documentId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -8,18 +8,19 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="content">
|
<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-left">
|
||||||
<div class="content-text-top">
|
<div class="content-text-top">
|
||||||
<span class="content-text-top-left">
|
<span class="content-text-top-left">
|
||||||
测试类别
|
{{item.title || '--'}}
|
||||||
</span>
|
|
||||||
<span class="content-text-top-right">
|
|
||||||
测试检验项目
|
|
||||||
</span>
|
</span>
|
||||||
|
<!-- <span class="content-text-top-right">-->
|
||||||
|
<!-- 测试检验项目-->
|
||||||
|
<!-- </span>-->
|
||||||
</div>
|
</div>
|
||||||
<div class="content-text-button">
|
<div class="content-text-button">
|
||||||
<span>ISO 898-1-2013</span>
|
<span>{{item.browseTypeName}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content-text-right">
|
<div class="content-text-right">
|
||||||
@@ -31,14 +32,61 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
import { kkFileView } from '@/utils/kkfileView'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'phoneRecentBrowsing',
|
name: 'phoneRecentBrowsing',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
url: {
|
||||||
|
page: '/phone/recentBrowse/page'
|
||||||
|
},
|
||||||
|
recentBrowsingList: []
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
document.title = 'NIO GRP'
|
document.title = 'NIO GRP'
|
||||||
|
this.getRecentBrowsing()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
...mapGetters(['userInfo']),
|
||||||
iconClick() {
|
iconClick() {
|
||||||
this.$router.go(-1)
|
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-family: PingFang SC-Regular, PingFang SC;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #040B29;
|
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 {
|
.content-text-button {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="content-box-value">
|
<div class="content-box-value">
|
||||||
<div class="left-img">
|
<div class="left-img">
|
||||||
<img src="~@/assets/wendang.png" alt="">
|
<img src="~@/assets/icon_wiki.png" alt="">
|
||||||
</div>
|
</div>
|
||||||
<div class="text-left">
|
<div class="text-left">
|
||||||
<div class="text-left-top">{{$t('problemKnowledgeBase')}}</div>
|
<div class="text-left-top">{{$t('problemKnowledgeBase')}}</div>
|
||||||
|
|||||||
@@ -333,15 +333,25 @@
|
|||||||
this.pageNo = 1
|
this.pageNo = 1
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
|
recentBrowseAdd(browseType, id) {
|
||||||
|
let query = {
|
||||||
|
browseType: browseType,
|
||||||
|
browseDataId: id
|
||||||
|
}
|
||||||
|
postAction('/phone/recentBrowse/add', query).then((res) => {
|
||||||
|
})
|
||||||
|
},
|
||||||
dataClick(item) {
|
dataClick(item) {
|
||||||
if (item.module_type_flag == 'WDK') {
|
if (item.module_type_flag == 'WDK') {
|
||||||
|
this.recentBrowseAdd('Document Library', item.id.slice(0, 32))
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: '/phoneDocumentDetails',
|
path: '/phoneDocumentDetails',
|
||||||
query: {
|
query: {
|
||||||
id: item.id
|
id: item.id.slice(0, 32)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else if (item.module_type_flag == 'WTZSK' || item.module_type_flag == 'ZSFX') {
|
} else if (item.module_type_flag == 'WTZSK' || item.module_type_flag == 'ZSFX') {
|
||||||
|
this.recentBrowseAdd('Knowledge sharing', item.id)
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: '/phoneProblemKnowledgeBase',
|
path: '/phoneProblemKnowledgeBase',
|
||||||
query: {
|
query: {
|
||||||
@@ -349,6 +359,7 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else if (item.module_type_flag == 'FGYB') {
|
} else if (item.module_type_flag == 'FGYB') {
|
||||||
|
this.recentBrowseAdd('Regulatory Monthly Report', item.id)
|
||||||
kkFileView(item.file_name, item.file_id)
|
kkFileView(item.file_name, item.file_id)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user