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