[update] 修改标准选择组件,删除文档库,修改个人中心和企标中标准号跳转

This commit is contained in:
lideqin
2023-09-14 15:17:09 +08:00
parent a1e4a12ff6
commit 05a0c929d6
20 changed files with 52 additions and 2178 deletions
+25 -25
View File
@@ -2,39 +2,39 @@
module.exports = {
// 我的收藏
collection: {
standardCategory: '标准类别',
standardNo: '标准号',
standardName: '标准名称',
cancelCollection: '取消收藏',
releaseDate: '发布日期',
newCarTypeDate: '新车型实施日期',
productCarDate: '在产车实施日期',
standardState: '标准状态'
standardCategory: 'Standard Class',
standardNo: 'Standard Number',
standardName: 'Standard Name',
cancelCollection: 'Cancel Collection',
releaseDate: 'Release Date',
newCarTypeDate: 'New Model Implementation Date',
productCarDate: 'On The Production Date',
standardState: 'Standard State'
},
// 已发分享
sentShare: {
transmitSearch: '转发搜索',
enterTransmitSearch: '请输入转发信息',
owningPlate: '所属板块',
title: '标题',
recipient: '接收人',
transmitTime: '转发时间'
transmitSearch: 'Forward Search',
enterTransmitSearch: 'Please Enter Forward Information',
owningPlate: 'Owning Plate',
title: 'Title',
recipient: 'Receiver',
transmitTime: 'Forwarding Time'
},
// 已收分享
receivedShare: {
pushSearch: '推送搜索',
enterPushInfo: '请输入推送信息',
owningPlate: '所属板块',
title: '标题',
forwarder: '转发人',
receiptTime: '接收时间'
pushSearch: 'Push Search',
enterPushInfo: 'Please Enter Push Information',
owningPlate: 'Owning Plate',
title: 'Title',
forwarder: 'Forwarder',
receiptTime: 'reception Time'
},
// 浏览记录
browsingHistory: {
clearBrowsingHistory: '清除浏览记录',
standardNo: '标准编号',
standardName: '标准名称',
browsingTime: '浏览时间',
confirmClearBrowsingHistory: '确认清除浏览记录'
clearBrowsingHistory: 'Clear Browsing History',
standardNo: 'Standard Number',
standardName: 'Standard Name',
browsingTime: 'Browsing Time',
confirmClearBrowsingHistory: 'confirm to clear browsing history'
}
}
+3 -2
View File
@@ -247,6 +247,7 @@
</template>
<script>
import '@assets/less/common.less'
import JDictSelectTag from '../dict/JDictSelectTag'
import JMultiSelectTag from '../dict/JMultiSelectTag'
import UploadFile from '../UploadFile'
@@ -463,7 +464,7 @@ export default {
},
// 标准选择变化
standardSelectionChange (value, id) {
this.formInline[value + '_id'] = id
this.formInline[value + '_by'] = id
this.formInline = { ...this.formInline }
},
// 选择用户得到用户名
@@ -499,7 +500,7 @@ export default {
</script>
<style scoped lang="less">
@import '~@assets/less/common.less';
/deep/ .ant-form-item-children {
width: 100%;
@@ -8,7 +8,7 @@
{{this.$t('standardSelect.standardSelection')}}
</a-button>
</div>
<standard-selection-modal ref="standardSelectionModal" v-bind="$attrs" @input="modalInput" @change="modalChange"></standard-selection-modal>
<standard-selection-modal ref="standardSelectionModal" v-bind="$attrs" :query="query" @input="modalInput" @change="modalChange"></standard-selection-modal>
</div>
</template>
@@ -19,7 +19,7 @@ export default {
name: 'StandardSelection',
components: { StandardSelectionModal },
props: {
type: {
query: {
type: Object,
default: () => {
return {}
@@ -28,12 +28,6 @@ export default {
value: {
type: String,
default: ''
},
standard: {
type: String,
default: () => {
return {}
}
}
},
computed: {
@@ -55,6 +49,7 @@ export default {
},
// 输入框输入监听
indexClick (event) {
console.log(event.target.value)
this.$emit('input', event.target.value)
},
modalInput (value) {
@@ -16,7 +16,7 @@
<a-form-item :label="$t('standardSelect.source')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-dict-select-tag style="width: 100%" v-model="queryParam.source"
:placeholder="$t('pleaseSelect')+$t('standardSelect.source')"
:triggerChange="false" :dictCode="standard_source"/>
:triggerChange="false" dictCode="standard_source"/>
</a-form-item>
</a-col>
<a-col :sm="8">
@@ -59,14 +59,14 @@ export default {
name: 'StandardSelectionModal',
components: { JDictSelectTag },
props: {
type: {
query: {
type: Object,
default: () => {
return {}
}
},
standard: {
type: String,
type: Object,
default: () => {
return {}
}
@@ -120,10 +120,7 @@ export default {
width: 480
}
],
dataList: [],
url: {
searchList: 'document/bussDocumentLibraryEO/queryCondition' // 搜索字段
}
dataList: []
}
},
methods: {
-5
View File
@@ -322,11 +322,6 @@ export const constantRouterMap = [
}
]
},
{
path: '/documentManage/library/detail',
name: 'documentIndex',
component: () => import(/* webpackChunkName: "user" */ '@/views/documentManage/modules/LibraryDetail')
},
// 文档对比-发起对比
{
path: '/initiateDocumentComparison',
@@ -1,534 +0,0 @@
<template>
<a-card :bordered="false">
<div class="table-page-search-wrapper">
<search ref="searchRef" :flag="flag" :url="url" @search="searchQuery" @reset="searchReset" />
</div>
<div class="table-operator">
<div class="operator-text" @click="handleBatchDel">
<a-icon type="delete" />
{{ $t('batchDelete') }}
</div>
<div class="operator-text" @click="handleExportXls">
<a-icon type="export" />
{{ $t('dataExport') }}
</div>
<div class="operator-text" @click="handleFileExport">
<a-icon type="mail" />
{{ $t('exportWithFile') }}
</div>
<div class="operator-text" @click="handleCompare">
<a-icon type="share-alt" />
{{ $t('share') }}
</div>
<div class="operator-text" @click="downTemplate">
<a-icon type="download" />
{{ $t('templateDownload') }}
</div>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"
@change="handleImport">
<div class="operator-text">
<a-icon type="import" />
{{ $t('import') }}
</div>
</a-upload>
<div class="operator-text" @click="handleAdd">
<a-icon type="plus" />
{{ $t('newlyAdded') }}
</div>
</div>
<div>
<j-table
v-if="columns && columns.length > 0"
:columns="columns"
:dataSource="dataSource"
:can-drag="true"
rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:pagination="ipagination"
:scroll="{x: '100%'}"
@change="tableOnChange">
<!-- 在混入里已经过滤过没有权限的按钮了 -->
<template slot="operation" slot-scope="{text, record}">
<a v-for="(operation, index) in operationList.slice(0, operateMaxNum)" :key="index" @click="operationClick(operation,record)">
<template v-if="operation.text === $t('docLibrary.cancelCollection')">
{{ !record.collectFlag || record.collectFlag === '0' ? $t('docLibrary.collection') : $t('docLibrary.cancelCollection')
}}
</template>
<template v-else-if="operation.text === $t('docLibrary.cancelSubscribe')">
{{ !record.subscribeFlag || record.subscribeFlag === '0' ? $t('docLibrary.subscribe') : $t('docLibrary.cancelSubscribe')
}}
</template>
<template v-else>
{{ operation.text }}
</template>
</a>
<a-divider v-if="operationList.length >= operateMaxNum" type="vertical" />
<a-dropdown v-if="operationList.length >= operateMaxNum">
<a class="ant-dropdown-link">
{{ $t('more') }} <a-icon type="down"/>
</a>
<a-menu slot="overlay">
<a-menu-item v-for="(operation, index) in operationList.slice(operateMaxNum)" :key="index">
<a @click="operationClick(operation,record)">
<span v-if="operation.text === $t('docLibrary.cancelCollection')" class="text">
{{ !record.collectFlag || record.collectFlag === '0' ? $t('docLibrary.collection') : $t('docLibrary.cancelCollection')
}}
</span>
<span v-else-if="operation.text === $t('docLibrary.cancelSubscribe')" class="text">
{{ !record.subscribeFlag || record.subscribeFlag === '0' ? $t('docLibrary.subscribe') : $t('docLibrary.cancelSubscribe')
}}
</span>
<span v-else class="text">
{{ operation.text }}
</span>
</a>
</a-menu-item>
</a-menu>
</a-dropdown>
</template>
<!-- 详情-->
<template slot="detailClick" slot-scope="{text, record}">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<a class="table-text textName" @click="detailClick(record)" v-if="text || text === 0">{{ text }}</a>
<div class="table-text" v-else>{{ global.emptyLine }}</div>
</a-tooltip>
</template>
</j-table>
</div>
<library-add-form
ref="addFormRef"
:url="url"
:flag="'1'"
@ok="libraryAddFormOk"
/>
<libraryPush
:url="url"
ref="libraryPushRef"
@clearSelected="clearSelected"
/>
</a-card>
</template>
<script>
import '@assets/less/common.less'
// 搜索组件
import Search from '@/components/customField/Search'
// 新增、编辑组件
import LibraryAddForm from './modules/LibraryAddForm'
// 推送组件
import LibraryPush from './modules/LibraryPush'
import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import { downFile, downloadFile, getAction } from '@/api/manage'
import Modal from 'ant-design-vue'
import store from '@/store'
import JTable from '@comp/jero/JTable.vue'
import { ConfigurableTableMixin } from '@/mixins/ConfigurableTableMixin'
export default {
name: 'DocumentLibrary',
components: { JTable, Search, LibraryPush, LibraryAddForm },
mixins: [ConfigurableTableMixin],
data () {
return {
flag: '1',
operationList: [
{
text: this.$t('docLibrary.cancelCollection'),
clickEvent: 'collection',
has: 'document:addCollect'
},
{
text: this.$t('docLibrary.cancelSubscribe'),
clickEvent: 'subscribe',
has: 'document:addSubscribe'
},
{
text: this.$t('edit'),
clickEvent: 'editTable',
has: 'document:updateInfo'
},
{
text: this.$t('delete'),
clickEvent: 'deleteTable',
has: 'document:deleteBatch'
}
],
selectedRowKeys: [],
loading: false,
tokenHeader: { 'X-Access-Token': Vue.ls.get(ACCESS_TOKEN) },
// url传参严格按照当前命名
url: {
tableHeader: '/laws/common/getCommonHeader', // 表格头部字段
getSearchList: '/laws/common/getQueryCondition', // 搜索字段
list: '/laws/common/getCommonPage', // 表格数据
getAddForm: '/laws/common/getFormModel', // 表单的字段
addInfo: 'document/bussDocumentLibraryEO/addInfo', // 新增
updateInfo: 'document/bussDocumentLibraryEO/updateInfo', // 编辑
getDocumentInfo: 'document/bussDocumentLibraryEO/getDocumentInfoById', // 查看
deleteBatch: 'document/bussDocumentLibraryEO/deleteBatch', // 删除
pullMessage: 'document/bussDocumentLibraryEO/pullMessage', // 推送
importZipUrl: '/document/bussDocumentLibraryEO/importZip', // 导入
verifyBind: '/document/bussDocumentLibraryEO/verifyBind', // 验证当前的数据是否可以删除
getPage: '/document/phasedImplementationDetailsEO/page',
exportXlsUrl: '', // 导出
exportZipUrl: '', // 带文件导出
downTemplateUrl: '' // 下载导入模板
},
showAction: true, // 是否显示操作列
dataSource: [
{
collectFlag: '0',
id: 'fd045f5c5d734087a884a63664ee91f1',
issue_time: '',
region: '',
serial_number: '0621001编号',
state: '现行',
subscribeFlag: '0',
technology_territory: '',
title: '0621001标题',
title_en: '0621001Title'
}
]
}
},
computed: {
importExcelUrl () {
return `${window._CONFIG.domianURL}${this.url.importZipUrl}`
}
},
methods: {
// 新增
handleAdd () {
this.$refs.addFormRef.add()
},
// 批量删除
handleBatchDel () {
if (this.selectedRowKeys.length > 0) {
this.$confirm({
content: this.$t('confirmBatchDeletion'),
onOk: () => {
const selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
this.verifyBind(selectedRowKeys.join(','), () => {
getAction(this.url.deleteBatch, { ids: selectedRowKeys.join(',') }).then((res) => {
if (res.success) {
this.$message.success(this.$t('operationSuccessful'))
this.selectedRowKeys = []
this.$refs.tableData.$emit('searchGetData')
} else {
this.$message.warning(this.$t('operationFailed'))
}
})
})
}
})
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
// 验证传入的idList是否都可以删除,不明白具体为什么要判断??
verifyBind (selectedRowKeys, callBack) {
getAction(this.url.verifyBind, { ids: selectedRowKeys }).then((res) => {
if (res.success) {
callBack && callBack()
} else {
this.$message.warning(res.message)
}
})
},
// 推送
handleCompare () {
if (this.selectedRowKeys.length > 0) {
this.$nextTick(() => {
this.$refs.libraryPushRef.getPush(this.selectedRowKeys)
})
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
// 表格的操作按钮点击
operationClick (operation, record) {
if (this[operation.clickEvent]) {
this[operation.clickEvent](record)
}
},
// 编辑按钮
editTable (val) {
this.$refs.addFormRef.edit(val)
},
// 删除按钮
deleteTable (val) {
this.$confirm({
content: this.$t('ConfirmDelete'),
onOk: () => {
this.verifyBind(val.id, () => {
getAction(this.url.deleteBatch, { ids: val.id }).then((res) => {
if (res.success) {
this.$message.success(this.$t('operationSuccessful'))
this.$refs.tableData.$emit('searchGetData')
} else {
this.$message.warning(this.$t('operationFailed'))
}
})
})
}
})
},
// 收藏按钮
collection (val) {
this.$confirm({
content: val.collectFlag === '0' || !val.collectFlag ? this.$t('docLibrary.confirmCollection') : this.$t('docLibrary.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.$refs.tableData.$emit('searchGetData')
} else {
this.$message.warning(this.$t('operationFailed'))
}
})
}
})
},
// 订阅按钮
subscribe (val) {
this.$confirm({
content: val.subscribeFlag === '0' || !val.subscribeFlag ? this.$t('docLibrary.confirmSubscribe') : this.$t('docLibrary.cancelConfirmSubscribe'),
onOk: () => {
let url = ''
if (val.subscribeFlag === '0' || !val.subscribeFlag) {
url = 'document/bussDocumentLibraryEO/addSubscribe'
} else {
url = 'document/bussDocumentLibraryEO/cancelSubscribe'
}
getAction(url, { id: val.id }).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.$refs.tableData.$emit('searchGetData')
} else {
this.$message.warning(this.$t('operationFailed'))
}
})
}
})
},
// 处理列表中的点击事件
detailClick (item) {
const newUrl = this.$router.resolve({
path: '/documentManage/library/detail',
query: item
})
window.open(newUrl.href, '_blank')
},
// 清楚表格选中
clearSelected () {
this.selectedRowKeys = []
},
// 下载模板
downTemplate (fileName) {
if (!fileName || typeof fileName !== 'string') {
fileName = '模板文件'
}
downloadFile(this.url.downTemplateUrl, fileName + '.xlsx')
},
deselect () {
this.$refs.tableDataRef.selectedRowKeys = []
this.selectedRowKeys = []
},
// 带文件导出
handleFileExport (fileName) {
if (this.selectedRowKeys.length > 0) {
if (!fileName || typeof fileName !== 'string') {
fileName = '导出文件'
}
const param = {
...this.$refs.searchRef.queryParam,
id: this.selectedRowKeys.join(','),
flag: 'file'
}
console.log('导出参数', param)
// 加一个大的提示
const modalLoading = this.$info({
title: '提示',
content: <span>正在导出请稍候 <a-spin size="small" /></span>,
keyboard: false
})
// 把知道了这个按钮去掉
this.$nextTick(() => {
document.getElementsByClassName('ant-modal-confirm-btns')[0].style = 'display:none'
})
downFile(this.url.exportZipUrl, param).then((data) => {
if (!data) {
this.$message.warning('文件下载失败')
}
}).finally(() => {
// 销毁这个提示
modalLoading.destroy()
this.deselect()
})
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
// 导出
handleExportXls (fileName) {
if (!fileName || typeof fileName !== 'string') {
fileName = '导出文件'
}
const param = {
...this.$refs.searchRef.queryParam,
id: this.selectedRowKeys.join(',')
}
console.log('导出参数', param)
// 加一个大的提示
const modalLoading = this.$info({
title: '提示',
content: <span>正在导出请稍候 <a-spin size="small" /></span>,
keyboard: false
})
// 把知道了这个按钮去掉
this.$nextTick(() => {
document.getElementsByClassName('ant-modal-confirm-btns')[0].style = 'display:none'
})
downFile(this.url.exportXlsUrl, param).then((data) => {
if (!data) {
this.$message.warning('文件下载失败')
return
}
if (typeof window.navigator.msSaveBlob !== 'undefined') {
window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xls')
} else {
const url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
const link = document.createElement('a')
link.style.display = 'none'
link.href = url
link.setAttribute('download', fileName + '.xls')
document.body.appendChild(link)
link.click()
document.body.removeChild(link) // 下载完成移除元素
window.URL.revokeObjectURL(url) // 释放掉blob对象
}
}).finally(() => {
// 销毁这个提示
modalLoading.destroy()
this.deselect()
})
},
handleImport (info) {
this.spinning = true
if (info.file.status !== 'uploading') {
console.log(info.file, info.fileList)
}
if (info.file.status === 'done') {
if (info.file.response.success) {
if (info.file.response.code === 201) {
let { message } = info.file.response
const { name } = info.file
const content = []
if (message) {
message = message.split('</br>')
message.forEach(res => {
if (res) {
content.push(< div> {res} < /div>)
}
})
}
this.$warning({
title: name,
content: (
< div>
{content}
< /div>
)
})
} else {
this.$refs.tableData.$emit('searchGetData')
this.$message.success(this.$t('operationSuccessful'))
}
this.spinning = false
} else {
const data = info.file.response
const token = Vue.ls.get(ACCESS_TOKEN)
if ((token && data.message.includes('Token失效')) || (token && data.message.includes('token')) || (token && data.message.includes('用户不存在'))) {
this.spinning = false
Modal.error({
title: '登录已过期',
content: '很抱歉,登录已过期,请重新登录',
okText: '重新登录',
mask: false,
onOk: () => {
store.dispatch('Logout').then(() => {
Vue.ls.remove(ACCESS_TOKEN)
window.location.reload()
})
}
})
return
}
let { message } = info.file.response
const { name } = info.file
const content = []
if (message) {
message = message.split('</br>')
message.forEach(res => {
if (res) {
content.push(< div> {res} < /div>)
}
})
}
this.$warning({
title: name,
content: (
< div>
{content}
< /div>
)
})
this.spinning = false
}
} else if (info.file.status === 'error') {
if (info.file.response.status === 500) {
const data = info.file.response
const token = Vue.ls.get(ACCESS_TOKEN)
if ((token && data.message.includes('Token失效')) || (token && data.message.includes('token')) || (token && data.message.includes('用户不存在'))) {
Modal.error({
title: '登录已过期',
content: '很抱歉,登录已过期,请重新登录',
okText: '重新登录',
mask: false,
onOk: () => {
store.dispatch('Logout').then(() => {
Vue.ls.remove(ACCESS_TOKEN)
window.location.reload()
})
}
})
}
this.spinning = false
} else {
this.$message.error(this.$t('operationFailed'))
this.spinning = false
}
}
},
// 新增和编辑表单成功提交的回调
libraryAddFormOk () {
this.loadData()
}
}
}
</script>
<style scoped>
</style>
@@ -1,223 +0,0 @@
<template>
<a-drawer
:title="title"
:maskClosable="false"
:width="drawerWidth"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<add-form
ref="addFormDataRef"
@submitFormData="submitFormData"
:flag="'1'"
v-if="visible"
:url="url"
/>
<div>
<div class="header-text" style='margin-bottom: 0px'>
{{$t('docLibrary.detailsPhasedImplementation')}}
</div>
<a-button key="submit" type="primary" @click="newlyAdded" style='float: right; z-index: 99; margin-bottom: 5px'>
{{ $t('newlyAdded') }}
</a-button>
<a-table
:loading="loading"
:pagination="false"
:data-source="dataGradto"
:columns="columnsGrading"
rowKey='id'
:scroll="{x: '100%'}"
>
<span slot="gradOperation" slot-scope="text,result,index">
<a @click="handleEdit(result,index)" style="margin-right: 10px">
{{$t('edit')}}
</a>
<a @click="deleteLib(result,index)" style="margin-right: 10px">
{{$t('delete')}}
</a>
</span>
<span slot="standNumberOrClause">
<span :title="$t('docLibrary.statuteNumberClause')">{{$t('docLibrary.statuteNumberClause')}}</span>
</span>
<span slot="implementationDateTwo">
<span :title="$t('docLibrary.implementationDateTwo')">{{$t('docLibrary.implementationDateTwo')}}</span>
</span>
<span slot="typeofImplementation">
<span :title="$t('docLibrary.typeofImplementation')">{{$t('docLibrary.typeofImplementation')}}</span>
</span>
</a-table>
</div>
<div class="drawer-bootom-button">
<a-button style="margin-right: 8px" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div>
<phased-implementation-modal ref="phasedImplementationModal" @submit="handleTableEditSubmit"></phased-implementation-modal>
</a-drawer>
</template>
<script>
// 新增表单组件
import AddForm from '@/components/customField/AddForm'
// 新增,编辑分阶段实施详情组件
import PhasedImplementationModal from './PhasedImplementationModal'
import { postAction } from '@/api/manage'
export default {
name: 'LibraryAddForm',
components: { AddForm, PhasedImplementationModal },
data () {
return {
title: this.$t('add'),
drawerWidth: 900,
visible: false,
confirmLoading: false,
dataList: [],
// 分阶段实施详情的表格相关数据
loading: false,
dataGradto: [],
columnsGrading: [
{
dataIndex: 'standNumberOrClause',
align: 'left',
ellipsis: true,
width: 160,
scopedSlots: { title: 'standNumberOrClause' }
},
{
// title: this.$t('Typeofimplementation'),
dataIndex: 'implementationTypeText',
align: 'left',
ellipsis: true,
width: 150,
scopedSlots: { title: 'typeofimplementation' }
},
{
// title: this.$t('implementationDateTwo'),
dataIndex: 'implementationDate',
align: 'left',
ellipsis: true,
width: 190,
scopedSlots: { title: 'implementationDateTwo' }
},
{
title: this.$t('remarks'),
dataIndex: 'remarks',
align: 'left',
ellipsis: true,
width: 204
},
{
title: this.$t('operation'),
align: 'left',
fixed: 'right',
width: 180,
scopedSlots: { customRender: 'gradOperation' }
}
]
}
},
props: {
flag: {
type: String,
default: ''
},
// 接口
url: {
type: Object,
default: () => {
return {}
}
}
},
methods: {
handleCancel () {
this.visible = false
},
add () {
this.confirmLoading = false
this.title = this.$t('add')
this.visible = true
this.$nextTick(() => {
this.$refs.addFormDataRef.add()
})
},
edit (item) {
this.confirmLoading = false
this.title = this.$t('edit')
this.visible = true
this.$nextTick(() => {
this.$refs.addFormDataRef.edit(item)
})
},
// 分阶段实施详情的新增
newlyAdded () {
this.$refs.phasedImplementationModal.add()
},
// 分阶段实施详情的编辑
handleEdit (record, index) {
this.$refs.phasedImplementationModal.edit(record, index)
},
// 分阶段实施详情的删除
deleteLib (val, index) {
this.$confirm({
content: this.$t('confirmDeletion'),
onOk: () => {
this.dataGradto.splice(index, 1)
this.dataGradto = [...this.dataGradto]
}
})
},
// 表格编辑弹框的提交
handleTableEditSubmit (formData, index) {
if (index) {
// 说明是编辑
this.dataGradto[index] = formData
} else {
this.dataGradto.push(formData)
}
},
handleSubmit () {
this.confirmLoading = true
this.$refs.addFormDataRef.submit()
},
// 表单提交的回调,获取表单数据
submitFormData (formInline) {
let url = ''
if (formInline.id) {
url = this.url.updateInfo
} else {
url = this.url.addInfo
}
postAction(url, formInline).then((res) => {
if (res.success) {
this.confirmLoading = false
this.$message.success(this.$t('operationSuccessful'))
if (this.formInline.id) {
this.$emit('ok')
} else {
this.$emit('ok')
}
} else {
this.confirmLoading = false
this.$message.warning(res.message)
}
})
}
}
}
</script>
<style scoped lang="less">
@import '~@assets/less/common.less';
.header-text {
font-size: 16px;
font-weight: bold;
margin-left: 15px;
/*border-bottom: 1px #d9d9d9 dashed;*/
height: 30px;
margin-bottom: 30px;
}
</style>
@@ -1,748 +0,0 @@
<template>
<div class="doc-detail">
<div class="doc-detail-wrap">
<div class="doc-detail-header" style="position: fixed; top: 0">
<div class="doc-detail-title">
<a-tooltip placement="topLeft">
<template slot="title">
<span v-html="serialNumber"></span>
</template>
<span v-html="serialNumber"></span>
</a-tooltip>
</div>
<div class="doc-detail-right">
<!-- v-has="'bussLog:page'"-->
<div @click="updateLog" class="operator-text-text" :title="$t('docLibrary.updateLog')">
<a-icon type="reload"/>
{{$t('docLibrary.updateLog')}}
</div>
<!-- v-has="'bussLog:database'"-->
<div @click="knowledgeDatabaseClick" class="operator-text-text"
:title="$t('docLibrary.problemKnowledgeBase')">
<a-icon type="folder"/>
{{ $t('docLibrary.problemKnowledgeBase') }}
</div>
<!-- v-has="'document:addCollect'"-->
<div @click="collectionClick({'collectFlag':collectFlag,'id':documentId})" class="operator-text-text"
:title="$t('docLibrary.collection')">
<a-icon class="icon" type="star"/>
{{ collectFlag == '1' ? $t('docLibrary.cancelCollection') : $t('docLibrary.collection') }}
</div>
<!-- v-has="'document:pullMessage'"-->
<div @click="shareClick" 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">
<div class="detail-content">
<div v-for="(item, index) in detailList" :key="index" class="content-box">
<div v-for="(val, index) in Object.keys(item)" :key="index" class="content">
<div class="header-text fixed-position">
{{ val }}
</div>
<div class="content-text" v-if="val === $t('essentialInformation')">
<div class="text-field" v-for="(ol,index1) in item[val]" :key="index1"
:class="{'text-content-button-one': ol.field_show_type === 8 ? true : false,
'text-content-button-Two': index1 === 1 || index1 === 9 ? true : false}">
<span v-if="ol.field_show_type === 10" class="text-field-left-index" :title="ol.db_field_txt">{{ol.db_field_txt}}</span>
<span v-else class="text-field-left" :title="ol.db_field_txt">{{ol.db_field_txt}}</span>
<span class="text-field-right text-field-right-text" v-if="index1 === 9"
:title="ol.value">{{ol.value ? ol.value : '--'}}</span>
<span class="text-field-right text-field-right-color" v-else-if="ol.urlClick" @click="urlClick(ol)"
:title="ol.value">{{ol.value ? ol.value : '--'}}</span>
<span class="text-field-right" v-else-if="ol.field_show_type === 7">
<a-button type="primary" class="button-text"
v-if="ol.value && ol.value.length > 0"
@click="clickButtonToUpload(ol.value)">
{{$t('uploadFile.viewUploadedFiles')}}
</a-button>
<span v-else>--</span>
</span>
<span class="text-field-right-index"
v-else-if="ol.field_show_type === 10">
<template v-for="(valItem, index) in ol.list">
<span class="text-field-right-color-text"
:key="index"
:title="valItem.title"
@click="relatedClick(valItem)"
v-if="ol.list && ol.list.length > 0">
{{valItem.title}}
</span>
<span :key="index" v-else>--</span>
</template>
</span>
<span class="text-field-right" v-else :title="ol.value">{{ol.value ? ol.value : '--'}}</span>
</div>
</div>
<div class="text-information" v-else-if="val === $t('docLibrary.textInformation')">
<div class="text-information-box" v-for="(ol,index1) in item[val]" :key="index1">
<div class="text-information-box-title fixed-position">
{{ol.db_field_txt}}
</div>
<div class="text-information-box-box">
<template v-for="(valItem, index) in ol.value">
<div class="text-information-box-box-text" :key="index" v-if="ol.value && ol.value.length > 0">
<span @click="pdfPreview(valItem)"
:title="valItem.fileName"
class="left-conte-td-information">{{valItem.fileName}}</span>
<a-icon class="left-conte-td-information-icon"
@click="download(valItem)"
:title="$t('download')"
type="vertical-align-bottom"/>
<a-icon class="left-conte-td-information-icon"
@click="breakdown(valItem)"
v-if="valItem.splitFlag === 1"
:title="$t('docLibrary.standardBreakdown')"
type="profile"/>
</div>
</template>
</div>
</div>
</div>
<div class="content-text" v-else>
<div class="text-field" :class="{'text-content-button-one':ol.field_show_type === 8 ? true : false}"
v-for="(ol, index1) in item[val]" :key="index1">
<span v-if="ol.field_show_type === 10" class="text-field-left-Index" :title="ol.db_field_txt">{{ol.db_field_txt}}</span>
<span class="text-field-left" v-else :title="ol.db_field_txt">{{ol.db_field_txt}}</span>
<span class="text-field-right text-field-right-color" v-if="ol.urlClick" @click="urlClick(ol)"
:title="ol.value">{{ol.value ? ol.value : '--'}}</span>
<span class="text-field-right" v-else-if="ol.field_show_type === 7">
<a-button type="primary" class="button-text"
v-if="ol.value && ol.value.length > 0"
@click="clickButtonToUpload(ol.value)">
{{$t('uploadFile.viewUploadedFiles')}}
</a-button>
<span v-else>--</span>
</span>
<span class="text-field-right-Index"
v-else-if="ol.field_show_type === 10">
<template v-for="(valItem, index) in ol.list">
<span class="text-field-right-color-text"
:key="index"
@click="relatedClick(valItem)"
:title="valItem.title"
v-if="ol.list && ol.list.length > 0">
{{valItem.title}}
</span>
<span :key="index" v-else>--</span>
</template>
</span>
<span class="text-field-right" v-else :title="ol.value">{{ol.value ? ol.value : '--'}}</span>
</div>
</div>
</div>
</div>
<div class="content-box">
<div class="content">
<div class="header-text fixed-position">
{{$t('docLibrary.detailsPhasedImplementation')}}
</div>
<a-table
:scroll="{x: '100%'}"
:data-source="dataGrad"
:columns="columnsGrading"
:pagination="ipagination"
>
</a-table>
</div>
</div>
</div>
</div>
</div>
<uploadFile ref="uploadFile" :isUploadFile="true" :disabled="true"></uploadFile>
<libraryPush
:url="url"
ref="libraryPushRef"
/>
<library-detail-update-log ref="libraryDetailUpdateLog"></library-detail-update-log>
<library-detail-file-modal ref="libraryDetailFileModal"></library-detail-file-modal>
</div>
</template>
<script>
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
import UploadFile from '@/components/UploadFile'
// 分享弹框
import LibraryPush from './LibraryPush'
// 更新log弹框
import LibraryDetailUpdateLog from './LibraryDetailUpdateLog'
// 文件查看弹框
import LibraryDetailFileModal from './LibraryDetailFileModal'
import { mapGetters } from 'vuex'
import { downloadFile, getAction } from '@/api/manage'
import { Base64 } from 'js-base64'
export default {
name: 'LibraryDetail',
mixins: [ResizeColumnProvide, ResizeHeader],
components: { UploadFile, LibraryPush, LibraryDetailUpdateLog, LibraryDetailFileModal },
data () {
return {
url: {
getInfo: 'document/bussDocumentLibraryEO/getInfoById',
getTitle: '/document/bussDocumentLibraryEO/getTitle',
getPage: '/document/phasedImplementationDetailsEO/page',
getMenuList: 'document/bussDocumentLibraryEO/getMenuList',
pullMessage: 'document/bussDocumentLibraryEO/pullMessage', // 推送
getWdkCollectAndSubscribeInfoByUser: ''
},
loading: false,
detailList: [],
ipagination: {
current: 1,
pageSize: 50,
pageSizeOptions: ['10', '50', '100', '150', '200'],
showTotal: (total, range) => {
return range[0] + '-' + range[1] + ' ' + this.$t('total') + ' ' + total + ' ' + this.$t('strip')
},
showQuickJumper: true,
showSizeChanger: true,
total: 0
},
dataGrad: [],
serialNumber: '',
downLoadFileUrl: window._CONFIG.domianPreviewURL + '/sys/common/download',
downLoadImgUrl: window._CONFIG.domianWebImgURL + '/sys/common/download',
documentId: this.$route.query.documentId === undefined ? this.$route.query.id : this.$route.query.documentId,
columnsGrading: [
{
title: this.$t('docLibrary.statuteNumberClause'),
dataIndex: 'standNumberOrClause',
align: 'left',
ellipsis: true,
width: '25%'
},
{
title: this.$t('docLibrary.typeofImplementation'),
dataIndex: 'implementationTypeText',
align: 'left',
ellipsis: true,
width: '15%'
},
{
title: this.$t('docLibrary.implementationDateTwo'),
dataIndex: 'implementationDate',
align: 'left',
ellipsis: true,
width: '15%'
},
{
title: this.$t('remarks'),
dataIndex: 'remarks',
align: 'left',
width: '45%'
}
],
collectFlag: ''
}
},
created () {
this.loading = true
document.title = this.$t('docLibrary.documentLibraryDetails')
this.getTitle(() => {
this.getInfoById()
})
this.getPage()
this.getWdkCollectAndSubscribeInfoByUser()
},
methods: {
...mapGetters(['userInfo']),
// 分享按钮点击
shareClick () {
const _id = this.$route.query.documentId === undefined ? this.$route.query.id : this.$route.query.documentId
this.$refs.libraryPushRef.getPush(_id.split(','))
},
// 获取收藏状态是已收藏还是未收藏
getWdkCollectAndSubscribeInfoByUser () {
const _id = this.$route.query.documentId === undefined ? this.$route.query.id : this.$route.query.documentId
getAction(this.url.getWdkCollectAndSubscribeInfoByUser, { id: _id }).then((res) => {
if (res.success) {
if (res.result.collectionList && res.result.collectionList.length > 0) {
this.collectFlag = '1'
} else {
this.collectFlag = '0'
}
}
})
},
// 收藏按钮点击
collectionClick (val) {
this.$confirm({
content: val.collectFlag === 0 || !val.collectFlag ? this.$t('docLibrary.confirmCollection') : this.$t('docLibrary.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'))
}
})
}
})
},
// 知识分享按钮点击
knowledgeDatabaseClick () {
let serialNumber = ''
if (this.detailList.length > 0) {
this.detailList[0][this.$t('essentialInformation')].forEach(res => {
if (res.db_field_name === 'serialNumber') {
serialNumber = res.value
}
})
}
const newUrl = this.$router.resolve({
path: '/problemknowledgeBase',
query: {
serial_number: serialNumber
}
})
window.open(newUrl.href, '_blank')
},
// 获取详情页标题
getTitle (callback) {
const _id = this.$route.query.documentId === undefined ? this.$route.query.id : this.$route.query.documentId
getAction(this.url.getTitle, { id: _id }).then((res) => {
if (res.success) {
this.serialNumber = res.result
callback && callback()
} else {
this.serialNumber = ''
}
})
},
// 获取详情信息
getInfoById () {
const _id = this.$route.query.documentId === undefined ? this.$route.query.id : this.$route.query.documentId
getAction(this.url.getInfo, { id: _id }).then((res) => {
if (res.success) {
this.detailList = res.result
this.loading = false
} else {
this.detailList = []
}
})
},
// 获取分阶段实施详情信息
getPage () {
const tableQuery = {
pageNo: this.ipagination.current,
pageSize: this.ipagination.pageSize,
bussDocumentLibraryId: this.$route.query.id
}
getAction(this.url.getPage, tableQuery).then((res) => {
if (res.success) {
this.dataGrad = res.result.records
this.ipagination.total = res.result.total
} else {
this.dataGrad = []
}
}).finally(() => {
this.loading = false
})
},
// 基本信息的文件按钮点击
clickButtonToUpload (item) {
this.$refs.libraryDetailFileModal.open(item)
},
// pdf文件预览
pdfPreview (fileQuery) {
const fileName = fileQuery.fileName
const index1 = fileName.lastIndexOf('.')
const index2 = fileName.length
const fileSuffix = fileName.substring(index1, index2)
if (fileSuffix === '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id + '&userName=' + this.userInfo().username))
} else if (fileSuffix === '.docx' || fileSuffix === '.doc') {
const url = window._CONFIG.onlinePreviewDomainURL + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') {
const url = window._CONFIG.onlinePreviewDomainURL + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else if (fileSuffix === '.png' || fileSuffix === '.jpeg' || fileSuffix === '.gif' || fileSuffix === '.jpg') {
const url = window._CONFIG.onlinePreviewDomainURL + '?url=' + Base64.encode(this.downLoadImgUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else {
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
}
},
// 文件下载
download (item) {
downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id, userName: this.userInfo().username })
},
// 点击更新log按钮
updateLog () {
this.$refs.libraryDetailUpdateLog.open()
},
// url跳转事件
urlClick (item) {
window.open(item.value)
},
// 基本信息中添加时类型是标准选择的点击
relatedClick (val) {
const newUrl = this.$router.resolve({
path: '/documentManage/library/detail',
query: val
})
window.open(newUrl.href, '_blank')
},
// 拆分过的文件的查看?
breakdown (item) {
const newUrl = this.$router.resolve({
path: '/documentTool/split/detail',
query: {
infoId: item.splitInfoId
}
})
window.open(newUrl.href, '_blank')
}
}
}
</script>
<style>
.tooltip-color .ant-tooltip-inner {
color: #333;
background-color: #fff !important;
}
.tooltip-color .ant-tooltip-arrow::before {
background-color: #fff;
}
</style>
<style scoped lang="less">
@import '~@assets/less/common.less';
body {
height: auto;
transition: all .5s linear !important;
}
.doc-detail {
background: #fff;
height: 100%;
.detail-content {
/*width: calc(100% - 212px);*/
width: 100%;
}
.doc-detail-wrap {
.doc-detail-header {
width: 100%;
height: 68px;
line-height: 68px;
padding: 0 0 0 32px;
box-sizing: border-box;
display: flex;
justify-content: space-between;
border-bottom: 2px #eff1f3 solid;
background: #fff;
.doc-detail-title {
display: inline-block;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
font-size: 20px;
font-weight: 400;
color: #040B29;
line-height: 68px;
}
.doc-detail-right {
/*width: 800px;*/
line-height: 68px;
display: flex;
align-items: center;
.doc-detail-btn {
margin-left: 10px;
}
}
}
.content-box {
/*padding: 0 40px 0 32px;*/
/*box-sizing: border-box;*/
}
.header-text {
font-size: 16px;
font-weight: bold;
height: 90px;
color: #000F16;
line-height: 110px;
}
.content-text {
width: 100%;
display: flex;
flex-wrap: wrap;
.text-field {
width: 33%;
margin-bottom: 8px;
.text-field-left {
width: 114px;
display: inline-block;
font-size: 14px;
font-weight: 400;
color: #6F7385;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
margin-right: 6px;
}
.text-field-right {
width: calc(100% - 130px);
display: inline-block;
font-size: 14px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
word-break: break-word;
color: #040B29;
/*font-weight: bold;*/
}
}
.text-content-button-one {
width: 100%;
.text-field-left {
width: 114px;
display: inline-block;
font-size: 14px;
font-weight: 400;
color: #6F7385;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
margin-right: 6px;
float: left;
}
.text-field-right {
width: calc(66.6% - 130px);
display: inline-block;
font-size: 14px;
text-overflow: ellipsis;
white-space: pre-wrap;
word-break: break-word;
overflow: visible;
float: left;
color: #040B29;
/*font-weight: bold;*/
}
}
.text-content-button-Two {
width: 67%;
.text-field-left {
width: 114px;
display: inline-block;
font-size: 14px;
font-weight: 400;
color: #6F7385;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
margin-right: 6px;
float: left;
}
.text-field-right {
width: calc(100% - 130px);
display: inline-block;
font-size: 14px;
text-overflow: ellipsis;
white-space: pre-wrap;
word-break: break-word;
overflow: hidden;
float: left;
color: #040B29;
/*font-weight: bold;*/
}
.text-field-right-text {
width: calc(50% - 140px);
}
}
}
}
}
.detail-box {
padding: 0 110px 0 110px;
box-sizing: border-box;
}
.operator-text-text {
cursor: pointer;
margin-right: 16px;
font-size: 14px;
font-weight: 400;
color: #040B29;
display: inline-block;
width: 130px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
text-align: center;
height: 40px;
border: 1px solid #CED0D8;
border-radius: 4px;
line-height: 40px;
padding: 0 5px;
}
.content-box:last-child {
margin-bottom: 20px;
}
.td-information {
border: 1px #eff1f3 solid;
text-align: center;
}
.conte-td-information {
color: #01A0AC;
font-size: 14px;
font-weight: 400;
}
.left-conte-td-information {
max-width: calc(100% - 30px);
display: inline-block;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
margin-right: 4px;
color: #01A0AC;
cursor: pointer;
font-size: 14px;
}
.left-conte-td-information-icon {
color: #01A0AC;
cursor: pointer;
margin-right: 6px;
font-size: 14px;
}
.text-field-right-color {
color: #00B3BE !important;
cursor: pointer;
}
/deep/ .ant-table-placeholder {
margin-top: 0px !important;
}
.text {
margin-right: 10px
}
.text-information {
display: flex;
flex-wrap: wrap;
&-box {
width: calc(33.3% - 10px);
height: auto;
display: inline-block;
overflow: hidden;
margin-right: 15px;
}
&-box:nth-child(3n) {
margin-right: 0;
}
&-box-title {
background: #f3f6f6;
border-radius: 4px;
width: 100%;
display: inline-block;
height: 44px;
padding: 0 16px;
line-height: 44px;
color: #040B29;
font-weight: 500;
font-size: 14px;
}
&-box-box {
width: 100%;
height: auto;
padding: 10px 16px 10px 16px;
overflow: hidden;
}
&-box-box-text {
width: 100%;
margin-right: 20px;
height: 36px;
float: left;
display: flex;
align-items: center;
}
}
.text-field-left-index {
width: 114px;
display: inline-block;
font-size: 14px;
font-weight: 400;
color: #6F7385;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
margin-right: 6px;
float: left;
}
.text-field-right-index {
width: calc(100% - 130px);
display: inline-block;
font-size: 14px;
word-break: break-word;
float: left;
}
.text-field-right-color-text {
width: calc(50% - 20px);
margin-right: 20px;
font-size: 14px;
display: inline-block;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
cursor: pointer;
/*font-weight: bold;*/
color: #01A0AC;
}
/deep/ .ant-table-column-title {
font-weight: 400 !important;
color: #040B29 !important;
}
/deep/ .ant-table-column-title {
font-weight: 400 !important;
color: #040B29 !important;
}
</style>
@@ -1,142 +0,0 @@
<template>
<a-modal
:title="$t('docLibrary.viewFileOne')"
:width="600"
:visible="visible"
:maskClosable="false"
@cancel="visible = false"
>
<template slot="footer">
<a-button key="back" @click="visible = false">
{{$t('cancel')}}
</a-button>
</template>
<a-table
class="table"
:columns="columns"
:pagination="false"
:scroll="{x:500,y: 400}"
:data-source="dataSource"
:loading="loading"
>
<span slot="fileOperation" slot-scope="record">
<a class="text" @click="pdfPreview(record)"
:disabled="record.fileSuffix === '.pdf' || record.fileSuffix === '.docx' || record.fileSuffix === '.doc'
|| record.fileSuffix === '.jpg' || record.fileSuffix === '.png' || record.fileSuffix === '.gif'
|| record.fileSuffix === '.jpeg' || record.fileSuffix === '.xlsx' || record.fileSuffix === '.xls' ? false : true">
{{$t('view')}}
</a>
<a class="text" @click="download(record)">
{{$t('download')}}
</a>
<a class="text" @click="breakdown(record)" v-if="record.splitFlag === 1">
{{$t('docLibrary.standardBreakdown')}}
</a>
</span>
</a-table>
</a-modal>
</template>
<script>
import { getAction, downloadFile } from '@/api/manage'
import { Base64 } from 'js-base64'
export default {
name: 'LibraryDetailFileModal',
data () {
return {
visible: false,
ipagination: {
current: 1,
pageSize: 50,
pageSizeOptions: ['10', '50', '100', '150', '200'],
showTotal: (total, range) => {
return range[0] + '-' + range[1] + ' ' + this.$t('total') + ' ' + total + ' ' + this.$t('strip')
},
showQuickJumper: true,
showSizeChanger: true,
total: 0
},
columns: [
{
title: this.$t('fileName'),
dataIndex: 'fileName',
align: 'left',
width: 260,
ellipsis: true
},
{
title: this.$t('operation'),
align: 'left',
width: 130,
scopedSlots: { customRender: 'fileOperation' }
}
],
dataSource: [],
loading: false
}
},
methods: {
open (item) {
this.visible = true
this.getFileList(item)
},
getFileList (item) {
this.loading = true
this.visibleFile = true
getAction('document/bussDocumentLibraryEO/getFileInfos', { id: item.join(',') }).then((res) => {
if (res.success) {
this.dataSource = res.result
this.dataSource.forEach((val) => {
const fileName = val.fileName
const index1 = fileName.lastIndexOf('.')
const index2 = fileName.length
const fileSuffix = fileName.substring(index1, index2)
val.fileSuffix = fileSuffix
})
} else {
this.dataSource = []
}
}).finally(() => {
this.loading = false
})
},
pdfPreview (fileQuery) {
const fileName = fileQuery.fileName
const index1 = fileName.lastIndexOf('.')
const index2 = fileName.length
const fileSuffix = fileName.substring(index1, index2)
if (fileSuffix === '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id + '&userName=' + this.userInfo().username))
} else if (fileSuffix === '.docx' || fileSuffix === '.doc') {
const url = window._CONFIG.onlinePreviewDomainURL + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') {
const url = window._CONFIG.onlinePreviewDomainURL + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else if (fileSuffix === '.png' || fileSuffix === '.jpeg' || fileSuffix === '.gif' || fileSuffix === '.jpg') {
const url = window._CONFIG.onlinePreviewDomainURL + '?url=' + Base64.encode(this.downLoadImgUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else {
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
}
},
download (item) {
downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id, userName: this.userInfo().username })
},
breakdown (item) {
const newUrl = this.$router.resolve({
path: '/docManage/splitting/splitDetail',
query: {
infoId: item.splitInfoId
}
})
window.open(newUrl.href, '_blank')
}
}
}
</script>
<style scoped>
</style>
@@ -1,116 +0,0 @@
<template>
<a-modal
:title="$t('docLibrary.updateLog')"
:width="900"
:visible="visible"
:confirm-loading="confirmLoading"
:maskClosable="false"
@ok="handleOk"
@cancel="handleCancel"
>
<a-table
class="table"
:components="drag(columns,'columns')"
:columns="columns"
:pagination="ipagination"
:scroll="{x: '100%',y: 400}"
:data-source="dataSource"
:loading="loading"
>
<span slot="content" slot-scope="text">
<a-tooltip placement="topLeft" overlayClassName="tooltip-color">
<template slot="title">
<span v-html="text"></span>
</template>
<span v-html="text"></span>
</a-tooltip>
</span>
</a-table>
</a-modal>
</template>
<script>
import { getAction } from '@/api/manage'
export default {
name: 'LibraryDetailUpdateLog',
data () {
return {
visible: false, // 更新日志弹框是否可见
confirmLoading: false,
ipagination: {
current: 1,
pageSize: 50,
pageSizeOptions: ['10', '50', '100', '150', '200'],
showTotal: (total, range) => {
return range[0] + '-' + range[1] + ' ' + this.$t('total') + ' ' + total + ' ' + this.$t('strip')
},
showQuickJumper: true,
showSizeChanger: true,
total: 0
},
columns: [
{
title: this.$t('docLibrary.modificationContent'),
dataIndex: 'content',
align: 'left',
ellipsis: true,
scopedSlots: { customRender: 'content' },
width: 484
},
{
title: this.$t('docLibrary.modificationTime'),
dataIndex: 'createTime',
align: 'left',
ellipsis: true,
width: 180
},
{
title: this.$t('docLibrary.personnel'),
dataIndex: 'createBy',
align: 'left',
ellipsis: true,
width: 180
}
],
dataSource: [],
loading: false,
url: {
list: 'log/bussLogEO/page',
}
}
},
methods: {
open () {
this.visible = true
this.bussLogList()
},
bussLogList () {
const query = {
pageNo: this.ipagination.current,
pageSize: this.ipagination.pageSize,
documentId: this.$route.query.id
}
this.loading = true
getAction(this.url.list, query).then((res) => {
if (res.success) {
this.dataSource = res.result.records
this.ipagination.total = res.result.total
}
}).finally(() => {
this.loading = false
})
},
handleOk () {
this.visible = false
},
handleCancel () {
this.visible = false
},
}
}
</script>
<style scoped>
</style>
@@ -1,184 +0,0 @@
<template>
<a-drawer
:title="$t('share')"
:maskClosable="false"
:width="600"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<a-spin :spinning="confirmLoading">
<a-input-search style="margin-bottom: 8px" v-model="searchModel"
@search="onSearch"
allowClear
:placeholder="$t('nodeQuickLookup')"/>
<div class="drawer-content">
<a-tree
v-if="visibleTree"
style="margin-bottom: 60px;height: 600px"
checkable
:autoExpandParent="false"
:tree-data="gData"
@select="onSelect"
@check="checkChange"
@expand="onExpand"
:defaultExpandedKeys="defaultExpandedKeys"
>
</a-tree>
</div>
</a-spin>
<div class="drawer-bootom-button">
<a-button @click="handleCancel" style="margin-right: 16px">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="submitLoading">{{$t('submit')}}</a-button>
</div>
</a-drawer>
</template>
<script>
import { getAction, postAction } from '../../../api/manage'
export default {
name: 'LibraryPush',
props: {
url: {
type: Object,
default: () => {
return {}
}
}
},
data () {
return {
gData: [],
searchModel: '',
autoExpandParent: true,
expandedKeys: [],
visible: false,
confirmLoading: false,
selectedKey: [],
tableKey: [],
userIds: [],
departId: '',
defaultExpandedKeys: [],
submitLoading: false,
visibleTree: false,
flag: ''
}
},
methods: {
getPush (data, flag) {
this.tableKey = data
this.flag = flag
this.searchModel = ''
this.visible = true
this.visibleTree = false
this.$nextTick(() => {
this.departId = ''
this.queryDepartUserTreeList()
})
},
onSelect (selectedKeys) {
this.selectedKey = selectedKeys
},
onExpand (selectedKeys, val) {
if (this.searchModel === '' || !this.searchModel) {
if (val.expanded) {
if (this.departId === val.node.value) {
} else {
this.departId = val.node.value
this.queryDepartUserTreeList()
}
}
}
},
handleCancel () {
this.visible = false
this.visibleTree = false
},
handleSubmit () {
let query = {}
if (this.flag) {
query = {
documentIds: this.tableKey.join(','),
userIds: this.userIds.join(','),
departIds: this.userIds.join(','),
flag: this.flag
}
} else {
query = {
documentIds: this.tableKey.join(','),
userIds: this.userIds.join(','),
departIds: this.userIds.join(',')
}
}
this.submitLoading = true
this.confirmLoading = true
getAction(this.url.pullMessage, query).then((res) => {
this.confirmLoading = false
this.submitLoading = false
if (res.success) {
this.$message.success(this.$t('operationSuccessful'))
this.userIds = []
this.visible = false
this.visibleTree = false
this.$emit('clearSelected')
this.$emit('searchGetData')
} else {
this.$message.warning(this.$t('operationFailed'))
}
})
},
onSearch (e) {
this.gData = []
this.departId = ''
this.visibleTree = false
if (e) {
this.getUserAndDepart()
} else {
this.queryDepartUserTreeList()
}
},
getUserAndDepart () {
getAction('sys/user/getUserAndDepart', { name: this.searchModel }).then((res) => {
this.gData = res || []
this.visibleTree = true
})
},
queryDepartUserTreeList () {
let gData = JSON.parse(JSON.stringify(this.gData))
if (gData && gData.length > 0) {
gData = JSON.stringify(gData)
} else {
gData = ''
}
this.confirmLoading = true
postAction('sys/user/queryDepartUserTreeList', {
departId: this.departId,
json: gData
}).then((res) => {
this.confirmLoading = false
if (res.success) {
this.gData = res.result
this.defaultExpandedKeys = [this.departId]
this.visibleTree = true
} else {
this.gData = []
}
})
},
checkChange (e) {
this.userIds = e
}
}
}
</script>
<style scoped lang="less">
@import '~@assets/less/common.less';
.drawer-content {
height: calc(100% - 60px);
overflow: auto;
}
</style>
@@ -1,173 +0,0 @@
<template>
<a-modal
:title="title"
:width="900"
:visible="visible"
:confirm-loading="confirmLoading"
:maskClosable="false"
@cancel="visible = false"
>
<a-form-model :rules="rules" :model="tableDataGrad"
ref="tableRuleForm">
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="required">*</span>
<span :title="$t('docLibrary.statuteNumberClause')">{{$t('docLibrary.statuteNumberClause')}}</span>
</div>
<a-form-model-item class="item-model" prop="standNumberOrClause">
<a-input class="box-input" v-model.trim="tableDataGrad.standNumberOrClause"
:placeholder="$t('pleaseEnter')+$t('docLibrary.statuteNumberClause')"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="required">*</span>
<span :title="$t('docLibrary.typeofImplementation')">{{$t('docLibrary.typeofImplementation')}}</span>
</div>
<a-form-model-item class="item-model" prop="implementationType">
<j-multi-select-tag class="box-input" v-model="tableDataGrad.implementationType"
:placeholder="$t('pleaseSelect')+$t('docLibrary.typeofImplementation')"
:type="'select'"
@changeQuery='implementationTypeChange'
:triggerChange="false" dictCode="shi2_shi1_lei4_xing2"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="required">*</span>
<span :title="$t('docLibrary.implementationDateTwo')">{{$t('docLibrary.implementationDateTwo')}}</span>
</div>
<a-form-model-item class="item-model" prop="implementationDate">
<a-date-picker class="box-input" v-model="tableDataGrad.implementationDate"
:placeholder="$t('pleaseSelect')+$t('docLibrary.implementationDateTwo')"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
style="width: 100%"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span :title="$t('remarks')">{{$t('remarks')}}</span>
</div>
<a-form-model-item class="item-model" style="height: auto" prop="remarks">
<a-textarea :placeholder="$t('pleaseEnter')+$t('remarks')"
:rows="4" v-model="tableDataGrad.remarks"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
<template slot="footer">
<a-button key="back" @click="visible = false">
{{ $t('cancel') }}
</a-button>
<a-button key="submit" type="primary" @click="handleTableSubmit">
{{ $t('determine') }}
</a-button>
</template>
</a-modal>
</template>
<script>
import JMultiSelectTag from '@/components/dict/JMultiSelectTag'
export default {
name: 'PhasedImplementationModal',
components: { JMultiSelectTag },
data () {
return {
visible: false,
title: '',
confirmLoading: false,
rules: {
standNumberOrClause: [
{
required: true,
message: this.$t('docLibrary.statuteNumberClause') + this.$t('cannotEmpty'),
trigger: 'blur'
},
{
// required: true,
max: 200,
message: this.$t('docLibrary.statuteNumberClause') + this.$t('cannotExceed') + 200 + this.$t('characters'),
trigger: 'blur'
}
],
implementationType: [
{
required: true,
message: this.$t('docLibrary.typeofImplementation') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
implementationDate: [
{
required: true,
message: this.$t('docLibrary.implementationDateTwo') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
remarks: [
{
// required: true,
max: 1000,
message: this.$t('remarks') + this.$t('cannotExceed') + 1000 + this.$t('characters'),
trigger: 'blur'
}
]
},
tableDataGrad: {},
index: 0,
isEdit: false
}
},
methods: {
add () {
this.title = this.$t('newlyAdded')
this.visible = true
this.isEdit = false
this.tableDataGrad = {}
},
edit (record, index) {
this.title = this.$t('edit')
this.visible = true
this.isEdit = true
this.index = index
this.tableDataGrad = Object.assign({}, record)
},
// 实施类型下拉框改变
implementationTypeChange (val) {
this.tableDataGrad.implementationTypeText = val
},
// 分阶段实施详情的新增弹框
handleTableSubmit () {
this.$refs.tableRuleForm.validate(valid => {
if (valid) {
if (this.isEdit) {
this.$emit('submit', this.tableDataGrad, this.index)
} else {
this.$emit('submit', this.tableDataGrad)
}
this.visibleGrad = false
}
})
}
}
}
</script>
<style scoped>
</style>
@@ -111,7 +111,8 @@
<template v-slot:toDetail="{text, record}">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<a class="link-a" @click="handleGoDetail(record)">{{ text }}</a>
<a v-if="text" class="link-a" @click="handleGoDetail(record)">{{ text }}</a>
<div v-else class="table-text">{{ global.emptyLine }}</div>
</a-tooltip>
</template>
@@ -153,7 +153,8 @@
<template v-slot:toDetailOld="{text, record}">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<a class="link-a" @click="handleGoDetailOld(record)">{{ text }}</a>
<a v-if="text" class="link-a" @click="handleGoDetailOld(record)">{{ text }}</a>
<div v-else class="table-text">{{ global.emptyLine }}</div>
</a-tooltip>
</template>
@@ -161,7 +162,8 @@
<template v-slot:toDetailNew="{text, record}">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<a class="link-a" @click="handleGoDetailNew(record)">{{ text }}</a>
<a v-if="text" class="link-a" @click="handleGoDetailNew(record)">{{ text }}</a>
<div v-else class="table-text">{{ global.emptyLine }}</div>
</a-tooltip>
</template>
@@ -78,7 +78,8 @@
<template v-slot:enterpriseStandardNum="{text, record}">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<a class="link-a" @click="handleGoDetail(record)">{{ text }}</a>
<a v-if="text" class="link-a" @click="handleGoDetail(record)">{{ text }}</a>
<div v-else class="table-text">{{ global.emptyLine }}</div>
</a-tooltip>
</template>
@@ -60,7 +60,8 @@
<template v-slot:toDetail="{text, record}">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<a class="link-a" @click="handleGoDetail(record)">{{ text }}</a>
<a v-if="text" class="link-a" @click="handleGoDetail(record)">{{ text }}</a>
<div v-else class="table-text">{{ global.emptyLine }}</div>
</a-tooltip>
</template>
@@ -77,7 +77,8 @@
<template v-slot:toDetail="{text, record}">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<a class="link-a" @click="handleGoDetail(record)">{{ text }}</a>
<a v-if="text" class="link-a" @click="handleGoDetail(record)">{{ text }}</a>
<div v-else class="table-text">{{ global.emptyLine }}</div>
</a-tooltip>
</template>
@@ -31,7 +31,8 @@
<template v-slot:toDetail="{text, record}">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<a class="link-a" @click="handleGoDetail(record)">{{ text }}</a>
<a v-if="text" class="link-a" @click="handleGoDetail(record)">{{ text }}</a>
<div v-else class="table-text">{{ global.emptyLine }}</div>
</a-tooltip>
</template>
@@ -49,14 +49,14 @@
:pagination="ipagination"
:loading="loading"
:scroll="{x: '100%'}"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<!--标准号标准名称-->
<template v-slot:toDetail="{text, record}">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<a class="link-a" @click="handleGoDetail(record)">{{ text }}</a>
<a v-if="text" class="link-a" @click="handleGoDetail(record)">{{ text }}</a>
<div v-else class="table-text">{{ global.emptyLine }}</div>
</a-tooltip>
</template>
@@ -106,8 +106,7 @@ export default {
title: this.$t('personalCenter.receivedShare.receiptTime'),
align: 'center',
width: 180,
dataIndex: 'receiptTime',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'receiptTime' }
}
],
url: {