文档库详情添加收藏和分享
This commit is contained in:
@@ -14,33 +14,45 @@
|
|||||||
<span v-html="serial_number"></span>
|
<span v-html="serial_number"></span>
|
||||||
<!-- <span> {{$t('StandardDetails')}}</span>-->
|
<!-- <span> {{$t('StandardDetails')}}</span>-->
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="doc-detail-right">
|
<div class="doc-detail-right">
|
||||||
<div @click="UpdateLog" v-has="'bussLog:page'" class="operator-text-text" :title="$t('UpdateLog')">
|
<div @click="UpdateLog" v-has="'bussLog:page'" class="operator-text-text" :title="$t('UpdateLog')">
|
||||||
<a-icon type="reload"/>
|
<a-icon type="reload"/>
|
||||||
{{$t('UpdateLog')}}
|
{{$t('UpdateLog')}}
|
||||||
</div>
|
</div>
|
||||||
<div @click="DocumentSplitting" v-has="'bussLog:splitting'" class="operator-text-text"
|
<!-- <div @click="DocumentSplitting" v-has="'bussLog:splitting'" class="operator-text-text"-->
|
||||||
:title="$t('DocumentSplitting')">
|
<!-- :title="$t('DocumentSplitting')">-->
|
||||||
<a-icon type="codepen"/>
|
<!-- <a-icon type="codepen"/>-->
|
||||||
{{$t('DocumentSplitting')}}
|
<!-- {{$t('DocumentSplitting')}}-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<!-- <div @click="DocumentTranslationClick" v-has="'bussLog:translation'" class="operator-text-text"-->
|
<!-- <div @click="DocumentTranslationClick" v-has="'bussLog:translation'" class="operator-text-text"-->
|
||||||
<!-- :title="$t('DocumentTranslation')">-->
|
<!-- :title="$t('DocumentTranslation')">-->
|
||||||
<!-- <a-icon type="file-pdf"/>-->
|
<!-- <a-icon type="file-pdf"/>-->
|
||||||
<!-- {{$t('DocumentTranslation')}}-->
|
<!-- {{$t('DocumentTranslation')}}-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<div @click="DocumentComparisonClick" v-has="'bussLog:comparison'" class="operator-text-text"
|
<!-- <div @click="DocumentComparisonClick" v-has="'bussLog:comparison'" class="operator-text-text"-->
|
||||||
:title="$t('DocumentComparison')">
|
<!-- :title="$t('DocumentComparison')">-->
|
||||||
<a-icon type="wallet"/>
|
<!-- <a-icon type="wallet"/>-->
|
||||||
{{$t('DocumentComparison')}}
|
<!-- {{$t('DocumentComparison')}}-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div @click="KnowledgeDatabaseClick" v-has="'bussLog:database'" class="operator-text-text"
|
<div @click="KnowledgeDatabaseClick" v-has="'bussLog:database'" class="operator-text-text"
|
||||||
:title="$t('problemKnowledgeBase')">
|
:title="$t('problemKnowledgeBase')">
|
||||||
<a-icon type="folder"/>
|
<a-icon type="folder"/>
|
||||||
{{$t('problemKnowledgeBase')}}
|
{{$t('problemKnowledgeBase')}}
|
||||||
</div>
|
</div>
|
||||||
|
<div @click="CollectionClick({'collectFlag':collectFlag,'id':documentId})"
|
||||||
|
v-has="'document:addCollect'" class="operator-text-text"
|
||||||
|
:title="$t('Collection')">
|
||||||
|
<a-icon class="icon" type="star"/>
|
||||||
|
{{collectFlag == '1'?$t('CancelCollection'):$t('Collection')}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div @click="shareClick" v-has="'document:pullMessage'" class="operator-text-text"
|
||||||
|
:title="$t('share')">
|
||||||
|
<a-icon type="share-alt"/>
|
||||||
|
{{$t('share')}}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 68px;background: #fff" class="detail-box">
|
<div style="margin-top: 68px;background: #fff" class="detail-box">
|
||||||
@@ -168,14 +180,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="detail-content-right">-->
|
<!-- <div class="detail-content-right">-->
|
||||||
<!-- <div class="detail-content-right-text"-->
|
<!-- <div class="detail-content-right-text"-->
|
||||||
<!-- :class="{'detail-content-right-text-one':item.pname ? true : false}"-->
|
<!-- :class="{'detail-content-right-text-one':item.pname ? true : false}"-->
|
||||||
<!-- v-for="(item,index) in rightTitleList"-->
|
<!-- v-for="(item,index) in rightTitleList"-->
|
||||||
<!-- @click="detailTextClick(index,item.name)">-->
|
<!-- @click="detailTextClick(index,item.name)">-->
|
||||||
<!-- {{item.name}}-->
|
<!-- {{item.name}}-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a-modal
|
<a-modal
|
||||||
@@ -219,7 +231,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
<a-modal
|
<a-modal
|
||||||
:title="'标准'"
|
:title="$t('standardOne')"
|
||||||
:width="600"
|
:width="600"
|
||||||
:visible="visibleRelated"
|
:visible="visibleRelated"
|
||||||
:maskClosable="false"
|
:maskClosable="false"
|
||||||
@@ -242,7 +254,7 @@
|
|||||||
</a-table>
|
</a-table>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
<a-modal
|
<a-modal
|
||||||
:title="'查看文件'"
|
:title="$t('viewFileOne')"
|
||||||
:width="600"
|
:width="600"
|
||||||
:visible="visibleFile"
|
:visible="visibleFile"
|
||||||
:maskClosable="false"
|
:maskClosable="false"
|
||||||
@@ -279,19 +291,26 @@
|
|||||||
</a-modal>
|
</a-modal>
|
||||||
<JLoading :loading="loading">{{$t('dataLoading')}}</JLoading>
|
<JLoading :loading="loading">{{$t('dataLoading')}}</JLoading>
|
||||||
<uploadFile ref="uploadFile" :isUploadFile="true" :disabled="true"></uploadFile>
|
<uploadFile ref="uploadFile" :isUploadFile="true" :disabled="true"></uploadFile>
|
||||||
|
<libraryPush
|
||||||
|
:url="url"
|
||||||
|
ref="libraryPushRef"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getAction, postAction, downFile, downloadFile } from '@/api/manage'
|
import { getAction, postAction, downFile, downloadFile } from '@/api/manage'
|
||||||
import { Base64 } from 'js-base64'
|
import { Base64 } from 'js-base64'
|
||||||
import uploadFile from '@/components/uploadFile/file'
|
import uploadFile from '@/components/uploadFile/file'
|
||||||
|
import libraryPush from '@/components/libraryPush/index'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
|
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
|
||||||
|
import eventBUs from '../../../../common/event'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'docIndex',
|
name: 'docIndex',
|
||||||
components: {
|
components: {
|
||||||
uploadFile
|
uploadFile,
|
||||||
|
libraryPush
|
||||||
},
|
},
|
||||||
mixins: [ResizeColumnProvide, ResizeHeader],
|
mixins: [ResizeColumnProvide, ResizeHeader],
|
||||||
data() {
|
data() {
|
||||||
@@ -301,7 +320,8 @@
|
|||||||
list: 'log/bussLogEO/page',
|
list: 'log/bussLogEO/page',
|
||||||
getTitle: '/document/bussDocumentLibraryEO/getTitle',
|
getTitle: '/document/bussDocumentLibraryEO/getTitle',
|
||||||
getPage: '/document/phasedImplementationDetailsEO/page',
|
getPage: '/document/phasedImplementationDetailsEO/page',
|
||||||
getMenuList: 'document/bussDocumentLibraryEO/getMenuList'
|
getMenuList: 'document/bussDocumentLibraryEO/getMenuList',
|
||||||
|
pullMessage: 'document/bussDocumentLibraryEO/pullMessage'//推送
|
||||||
},
|
},
|
||||||
titleHeader: '',
|
titleHeader: '',
|
||||||
visibleFile: false,
|
visibleFile: false,
|
||||||
@@ -348,6 +368,7 @@
|
|||||||
tabletotal: 0,
|
tabletotal: 0,
|
||||||
visibleRelated: false,
|
visibleRelated: false,
|
||||||
dataSourceFile: [],
|
dataSourceFile: [],
|
||||||
|
documentId: this.$route.query.documentId === undefined ? this.$route.query.id : this.$route.query.documentId,
|
||||||
rightTitleList: [],
|
rightTitleList: [],
|
||||||
columnsGrading: [
|
columnsGrading: [
|
||||||
{
|
{
|
||||||
@@ -401,7 +422,9 @@
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
width: 180
|
width: 180
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
subscribeFlag: '',
|
||||||
|
collectFlag: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -414,9 +437,53 @@
|
|||||||
})
|
})
|
||||||
this.getPage()
|
this.getPage()
|
||||||
this.getRightTitle()
|
this.getRightTitle()
|
||||||
|
this.getWdkCollectAndSubscribeInfoByUser()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapGetters(['userInfo']),
|
...mapGetters(['userInfo']),
|
||||||
|
shareClick() {
|
||||||
|
let _id = this.$route.query.documentId === undefined ? this.$route.query.id : this.$route.query.documentId
|
||||||
|
this.$refs.libraryPushRef.getPush(_id.split(','))
|
||||||
|
},
|
||||||
|
getWdkCollectAndSubscribeInfoByUser() {
|
||||||
|
let _id = this.$route.query.documentId === undefined ? this.$route.query.id : this.$route.query.documentId
|
||||||
|
getAction('/collection/onlCgformCollection/getWdkCollectAndSubscribeInfoByUser', { id: _id }).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
if (res.result.subscribeList && res.result.subscribeList.length > 0) {
|
||||||
|
this.subscribeFlag = '1'
|
||||||
|
} else {
|
||||||
|
this.subscribeFlag = '0'
|
||||||
|
}
|
||||||
|
if (res.result.collectionList && res.result.collectionList.length > 0) {
|
||||||
|
this.collectFlag = '1'
|
||||||
|
} else {
|
||||||
|
this.collectFlag = '0'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
CollectionClick(val) {
|
||||||
|
let _this = this
|
||||||
|
this.$confirm({
|
||||||
|
content: val.collectFlag == 0 || !val.collectFlag ? _this.$t('ConfirmCollection') : _this.$t('cancelConfirmCollection'),
|
||||||
|
onOk() {
|
||||||
|
let url = ''
|
||||||
|
if (val.collectFlag == 0 || !val.collectFlag) {
|
||||||
|
url = 'document/bussDocumentLibraryEO/addCollect'
|
||||||
|
} else {
|
||||||
|
url = 'document/bussDocumentLibraryEO/cancelCollect'
|
||||||
|
}
|
||||||
|
getAction(url, { id: val.id }).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||||
|
_this.getWdkCollectAndSubscribeInfoByUser()
|
||||||
|
} else {
|
||||||
|
_this.$message.warning(_this.$t('operationFailed'))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
DocumentTranslationClick() {
|
DocumentTranslationClick() {
|
||||||
let serial_number = ''
|
let serial_number = ''
|
||||||
if (this.detailList.length > 0) {
|
if (this.detailList.length > 0) {
|
||||||
@@ -485,10 +552,10 @@
|
|||||||
getAction(this.url.getInfo, { id: _id }).then((res) => {
|
getAction(this.url.getInfo, { id: _id }).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.detailList = res.result
|
this.detailList = res.result
|
||||||
this.$nextTick(() => {
|
// this.$nextTick(() => {
|
||||||
let detailContentRightText = document.getElementsByClassName('detail-content-right-text')
|
// let detailContentRightText = document.getElementsByClassName('detail-content-right-text')
|
||||||
detailContentRightText[0].classList.add('detail-content-right-text-color')
|
// detailContentRightText[0].classList.add('detail-content-right-text-color')
|
||||||
})
|
// })
|
||||||
this.loading = false
|
this.loading = false
|
||||||
} else {
|
} else {
|
||||||
this.detailList = []
|
this.detailList = []
|
||||||
@@ -1124,9 +1191,10 @@
|
|||||||
/*font-weight: bold;*/
|
/*font-weight: bold;*/
|
||||||
color: #01A0AC;
|
color: #01A0AC;
|
||||||
}
|
}
|
||||||
::v-deep .ant-table-column-title{
|
|
||||||
font-weight: 400!important;
|
::v-deep .ant-table-column-title {
|
||||||
color: #040B29!important;
|
font-weight: 400 !important;
|
||||||
|
color: #040B29 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .ant-table-column-title {
|
::v-deep .ant-table-column-title {
|
||||||
|
|||||||
Reference in New Issue
Block a user