970 lines
33 KiB
Java
970 lines
33 KiB
Java
<template>
|
||
<div class="search-con-text">
|
||
<div class="search-text-wrap">
|
||
<div class="text-left">
|
||
<div class="text-left-wrap" v-for="(item,index) in searchOption" :key="index">
|
||
<div class="text-left-select" v-if="item.field_show_type == '0'">
|
||
<span class="text-sel" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||
<a-tree-select
|
||
tree-node-filter-prop="title"
|
||
class="text-select"
|
||
v-model="queryParamOne[item.db_field_name]"
|
||
:maxTagCount="1"
|
||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||
:tree-data="item.tree"
|
||
tree-checkable
|
||
@click="treeClick(item.db_field_name)"
|
||
@change="treeChange"
|
||
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
||
/>
|
||
</div>
|
||
<div class="text-left-select" v-if="item.field_show_type == '1' || item.field_show_type == '8' ||
|
||
item.field_show_type == '9' || item.field_show_type == '10' || item.field_show_type == '11'">
|
||
<span class="text-sel" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||
<a-input class="text-select"
|
||
v-model="queryParamOne[item.db_field_name]"
|
||
:placeholder="$t('PleaseEnter')+item.db_field_txt"/>
|
||
</div>
|
||
<div class="text-left-select" v-if="item.field_show_type == '2'">
|
||
<span class="text-sel" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||
<a-input-number class="text-select" :placeholder="$t('PleaseEnter')+item.db_field_txt"
|
||
v-model="queryParamOne[item.db_field_name]" :min="1" :max="99999999"/>
|
||
</div>
|
||
<div class="text-left-select" v-if="item.field_show_type == '3'">
|
||
<span class="text-sel" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||
<j-dict-select-tag class="text-select" v-model="queryParamOne[item.db_field_name]"
|
||
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
||
:type="'select'"
|
||
:db_field_name="item.db_field_name"
|
||
@changeQuery="changeQuery"
|
||
:triggerChange="false" :dictCode="item.dict_field"/>
|
||
</div>
|
||
<div class="text-left-select" v-if="item.field_show_type == '4'">
|
||
<span class="text-sel" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||
<j-multi-select-tag class="text-select" v-model="queryParamOne[item.db_field_name]"
|
||
:db_field_name="item.db_field_name"
|
||
@changeQuery="changeQuery"
|
||
:placeholder="$t('PleaseSelect')+item.db_field_txt" :type="'select'"
|
||
:triggerChange="false" :dictCode="item.dict_field"/>
|
||
</div>
|
||
<!-- <div class="text-left-select" v-if="item.field_show_type == '5'">-->
|
||
<!-- <span class="text-sel" :title="item.db_field_txt">{{item.db_field_txt}}</span>-->
|
||
<!-- <a-date-picker class="text-select"-->
|
||
<!-- :placeholder="$t('PleaseSelect')+item.db_field_txt"-->
|
||
<!-- @change="dateChange(item.db_field_name)"-->
|
||
<!-- v-model="queryParamOne[item.db_field_name]"/>-->
|
||
<!-- </div>-->
|
||
<div class="text-left-select" v-if="item.field_show_type == '6' || item.field_show_type == '5'">
|
||
<span class="text-sel" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||
<a-range-picker class="text-select" v-model="queryParamOne[item.db_field_name]"
|
||
@change="onChange(item.db_field_name)"></a-range-picker>
|
||
</div>
|
||
</div>
|
||
<div class="table-page-search-submitButtons submitButtons">
|
||
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
|
||
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}
|
||
</a-button>
|
||
</div>
|
||
</div>
|
||
<div class="text-right">
|
||
<div class="search-text-list">
|
||
<div class="search-text-title">
|
||
<div class="search-header-left">
|
||
<span>{{$t('searchScope')}}:</span>
|
||
<span>{{queryParamSeach}}</span>
|
||
</div>
|
||
|
||
<div class="search-header-right">
|
||
<a-icon type="appstore" class="header-list" :title="$t('list')"
|
||
:class="{'header-list-active':isTrue }"
|
||
@click="selectListModel('list')"></a-icon>
|
||
<a-icon type="unordered-list" class="header-list" :title="$t('paragraph')"
|
||
:class="{'header-list-active':!isTrue }"
|
||
@click="selectListModel('unord')"></a-icon>
|
||
</div>
|
||
</div>
|
||
<a-table
|
||
v-if="isTrue"
|
||
ref="table"
|
||
size="middle"
|
||
@change="tableOnChange"
|
||
:components="drag(columns,'columns')"
|
||
:loading="loading"
|
||
:pagination="false"
|
||
:scroll="{x: '100%'}"
|
||
rowKey="id"
|
||
:data-source="dataSource"
|
||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||
:columns="columns"
|
||
>
|
||
<span slot="operation" slot-scope="record">
|
||
<a @click="Collection(record)" class="text-operation">
|
||
{{!record.collectFlag || record.collectFlag == 0 ? $t('Collection') :$t('CancelCollection')}}
|
||
</a>
|
||
<a @click="subscribe(record)" class="text-operation">
|
||
{{!record.subscribeFlag || record.subscribeFlag == 0 ? $t('subscribe') :$t('CancelSubscribe')}}
|
||
</a>
|
||
<a @click="handleCompare(record)" class="text-operation"> {{$t('Push')}}</a>
|
||
</span>
|
||
<span slot="serial_number" slot-scope="text,record">
|
||
<span style="cursor: pointer" :title="record.serial_number" class="textName" v-html="record.serial_number"
|
||
@click="titleClick(record)"></span>
|
||
</span>
|
||
<span slot="titleName" slot-scope="text,record">
|
||
<span style="cursor: pointer" class="textName" v-html="record.title"
|
||
:title="record.title"
|
||
@click="titleClick(record)"></span>
|
||
</span>
|
||
<span slot="file_name" slot-scope="text,record">
|
||
<a style="color:#21c9cc" @click="fileNameClick(record)">
|
||
{{record.file_name && record.file_name.length > 0 ? $t('view') : '--'}}
|
||
</a>
|
||
</span>
|
||
<!-- 字符串超长截取省略号显示-->
|
||
<!-- <span slot="templateContent" slot-scope="text">-->
|
||
<!-- <j-ellipsis :value="text" :length="25"/>-->
|
||
<!-- </span>-->
|
||
</a-table>
|
||
<div v-if="!isTrue" class="box-content">
|
||
<a-checkbox-group v-model="checkboxText">
|
||
<li v-for="item in conList" :key="item.id">
|
||
<div style="margin-bottom: 10px;position: relative">
|
||
<a-checkbox :value="item.id" class="checkbox-left"></a-checkbox>
|
||
<div class="text-text-right"
|
||
@click="titleClick(item)"
|
||
:class="{ 'null-input':item.checked }">
|
||
<div class="text-header">
|
||
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5">
|
||
<template slot="title">
|
||
<span v-html="item.module_type"></span>
|
||
</template>
|
||
<span v-html="item.module_type"></span>
|
||
</a-tooltip>
|
||
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5">
|
||
<template slot="title">
|
||
<span v-html="item.serial_number"></span>
|
||
</template>
|
||
<span style="cursor: pointer"
|
||
v-html="item.serial_number"></span>
|
||
</a-tooltip>
|
||
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5">
|
||
<template slot="title">
|
||
<span v-html="item.title"></span>
|
||
</template>
|
||
<span style="cursor: pointer" v-html="item.title"></span>
|
||
</a-tooltip>
|
||
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5">
|
||
<template slot="title">
|
||
<span v-html="item.file_name"></span>
|
||
</template>
|
||
<span style="cursor: pointer" v-html="item.file_name"></span>
|
||
</a-tooltip>
|
||
</div>
|
||
<!-- <a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5"-->
|
||
<!-- >-->
|
||
<!-- <template slot="title">-->
|
||
<!-- <span v-html="item.content"></span>-->
|
||
<!-- </template>-->
|
||
<div v-if="selectModel == ''" class="text-content" v-html="item.content"
|
||
>
|
||
</div>
|
||
<!-- </a-tooltip>-->
|
||
<!-- <a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5"-->
|
||
<!-- >-->
|
||
<!-- <template slot="title">-->
|
||
<!-- <span v-html="item.content"></span>-->
|
||
<!-- </template>-->
|
||
<div v-else-if="(item.file_text instanceof Array) && selectModel != ''"
|
||
class="text-content" v-html="item.content"></div>
|
||
<!-- </a-tooltip>-->
|
||
<!-- <a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5"-->
|
||
<!-- >-->
|
||
<!-- <template slot="title">-->
|
||
<!-- <span v-html="item.content"></span>-->
|
||
<!-- </template>-->
|
||
<div v-else-if="!item.file_text && selectModel != ''"
|
||
class="text-content" v-html="item.content"></div>
|
||
<!-- </a-tooltip>-->
|
||
<!-- <a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5" >-->
|
||
<!-- <template slot="title">-->
|
||
<!-- <span v-html="item.file_text"></span>-->
|
||
<!-- </template>-->
|
||
<div v-else class="text-content" v-html="item.file_text">
|
||
</div>
|
||
<!-- </a-tooltip>-->
|
||
</div>
|
||
</div>
|
||
</li>
|
||
</a-checkbox-group>
|
||
</div>
|
||
<div class="page">
|
||
<a-pagination
|
||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
||
show-quick-jumper
|
||
show-size-changer
|
||
:page-size.sync="pageSize"
|
||
:total="total"
|
||
:current="pageNo"
|
||
@change="pageOnChange"
|
||
@showSizeChange="SizeChange"
|
||
/>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<libraryPush
|
||
:url="url"
|
||
ref="libraryPushRef"
|
||
/>
|
||
<a-modal
|
||
:title="$t('viewFile')"
|
||
:width="500"
|
||
:visible="visible"
|
||
@cancel="visible=false"
|
||
>
|
||
<template slot="footer">
|
||
<a-button key="back" @click="visible = false">
|
||
{{$t('cancel')}}
|
||
</a-button>
|
||
</template>
|
||
<p v-for="(item,index) in fileList" :key="index"
|
||
class="fileText" :title="item.fileName" @click="fileClick(item)">{{ item.fileName }}</p>
|
||
</a-modal>
|
||
</div>
|
||
</template>
|
||
|
||
<script>
|
||
import eventBUs from '../../../../common/event'
|
||
import { getAction, postAction, downloadFile } from '@/api/manage'
|
||
import libraryPush from '@/components/libraryPush/index'
|
||
import moment from 'moment'
|
||
import { Base64 } from 'js-base64'
|
||
import { mapGetters } from 'vuex'
|
||
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
|
||
|
||
export default {
|
||
name: 'DocumentLibrary',
|
||
components: {
|
||
libraryPush
|
||
},
|
||
mixins:[ResizeHeader, ResizeColumnProvide],
|
||
data() {
|
||
return {
|
||
searchOption: [],
|
||
queryParam: {},
|
||
visible: false,
|
||
dataSource: [],
|
||
db_field_name: '',
|
||
url: {
|
||
queryCondition: 'search/document/queryCondition',
|
||
getInfoList: 'search/document/getInfoList',
|
||
pullMessage: 'document/bussDocumentLibraryEO/pullMessage',//推送
|
||
getParagraphInfoList: 'search/document/getParagraphInfoList'//段落
|
||
},
|
||
columns: [
|
||
{
|
||
title: this.$t('standard'),
|
||
align: 'left',
|
||
dataIndex: 'serial_number',
|
||
width: 170,
|
||
scopedSlots: { customRender: 'serial_number' }
|
||
},
|
||
{
|
||
title: this.$t('title'),
|
||
align: 'left',
|
||
dataIndex: 'title',
|
||
width: 170,
|
||
scopedSlots: { customRender: 'titleName' }
|
||
},
|
||
{
|
||
title: this.$t('fileName'),
|
||
align: 'left',
|
||
dataIndex: 'file_name',
|
||
ellipsis: true,
|
||
width: 170,
|
||
scopedSlots: { customRender: 'file_name' }
|
||
},
|
||
{
|
||
title: this.$t('status'),
|
||
align: 'left',
|
||
width: 140,
|
||
sorter: true,
|
||
ellipsis: true,
|
||
dataIndex: 'state'
|
||
},
|
||
{
|
||
title: this.$t('zoneOfApplication'),
|
||
align: 'left',
|
||
width: 170,
|
||
sorter: true,
|
||
ellipsis: true,
|
||
dataIndex: 'region'
|
||
},
|
||
// {
|
||
// title: this.$t('functionalAreas'),
|
||
// align: 'center',
|
||
// dataIndex: 'function_territory'
|
||
// },
|
||
{
|
||
title: this.$t('technicalField'),
|
||
align: 'left',
|
||
ellipsis: true,
|
||
width: 170,
|
||
dataIndex: 'technology_territory'
|
||
},
|
||
{
|
||
title: this.$t('releaseDate'),
|
||
align: 'left',
|
||
ellipsis: true,
|
||
width: 170,
|
||
sorter: true,
|
||
dataIndex: 'issue_time'
|
||
},
|
||
{
|
||
title: this.$t('vehicleInProductionDate'),
|
||
align: 'left',
|
||
ellipsis: true,
|
||
width: 210,
|
||
sorter: true,
|
||
dataIndex: 'implement_time'
|
||
},
|
||
{
|
||
title: this.$t('ImplementationDate'),
|
||
align: 'left',
|
||
ellipsis: true,
|
||
sorter: true,
|
||
width: 210,
|
||
dataIndex: 'xin1_che1_xing2_shi2_shi1_ri4_qi1'
|
||
},
|
||
{
|
||
title: this.$t('operation'),
|
||
align: 'left',
|
||
fixed: 'right',
|
||
width: 200,
|
||
scopedSlots: { customRender: 'operation' }
|
||
}
|
||
],
|
||
selectedRowKeys: [],
|
||
isTrue: true,
|
||
checkboxText: [],
|
||
conList: [],
|
||
total: 0,
|
||
pageSize: 10,
|
||
pageNo: 1,
|
||
loading: false,
|
||
selectModel: '',
|
||
fileList: [],
|
||
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
|
||
downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download',
|
||
queryParamSeach: '',
|
||
mapOne: {},
|
||
mapTwo: {},
|
||
selectModelName: '',
|
||
queryParamOne: {},
|
||
searchQueryOne: {},
|
||
orderBy: '1',
|
||
orderByField: ''
|
||
}
|
||
},
|
||
watch: {
|
||
checkboxText: function(value) {
|
||
this.conList.forEach(val => {
|
||
val.checked = false
|
||
})
|
||
if (value.length > 0) {
|
||
this.conList.forEach(val => {
|
||
value.forEach(res => {
|
||
if (res === val.id) {
|
||
val.checked = true
|
||
}
|
||
})
|
||
})
|
||
}
|
||
this.conList = [...this.conList]
|
||
}
|
||
},
|
||
mounted() {
|
||
this.getCondition()
|
||
this.getInfoList()
|
||
|
||
},
|
||
methods: {
|
||
...mapGetters(['userInfo']),
|
||
handleChange() {
|
||
|
||
},
|
||
selectListModel(val) {
|
||
this.pageNo = 1
|
||
this.queryParam = { ...this.queryParamOne, ...this.searchQueryOne }
|
||
this.isTrue = val == 'list' ? true : false
|
||
if (this.isTrue) {
|
||
this.getInfoList(1)
|
||
} else {
|
||
this.getParagraphInfoList(1)
|
||
}
|
||
},
|
||
onSelectChange(selectedRowKeys) {
|
||
this.selectedRowKeys = selectedRowKeys
|
||
},
|
||
checkedClick(item) {
|
||
if (item.checked) {
|
||
this.checkboxText = this.checkboxText.filter(res => {
|
||
return res !== item.id
|
||
})
|
||
} else {
|
||
this.checkboxText.push(item.id)
|
||
}
|
||
},
|
||
pageOnChange(page, pageSize) {
|
||
this.queryParam = { ...this.queryParamOne, ...this.searchQueryOne }
|
||
this.pageNo = page
|
||
if (this.isTrue) {
|
||
this.getInfoList(1)
|
||
} else {
|
||
this.getParagraphInfoList(1)
|
||
}
|
||
},
|
||
SizeChange(page, pageSize) {
|
||
this.queryParam = { ...this.queryParamOne, ...this.searchQueryOne }
|
||
this.pageNo = 1
|
||
this.pageSize = pageSize
|
||
if (this.isTrue) {
|
||
this.getInfoList(1)
|
||
} else {
|
||
this.getParagraphInfoList(1)
|
||
}
|
||
},
|
||
//收藏按钮
|
||
Collection(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.getInfoList(1)
|
||
} else {
|
||
_this.$message.warning(_this.$t('operationFailed'))
|
||
}
|
||
})
|
||
}
|
||
})
|
||
},
|
||
//订阅按钮
|
||
subscribe(val) {
|
||
let _this = this
|
||
this.$confirm({
|
||
content: val.subscribeFlag == 0 || !val.subscribeFlag ? _this.$t('ConfirmSubscribe') : _this.$t('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.getInfoList(1)
|
||
} else {
|
||
_this.$message.warning(_this.$t('operationFailed'))
|
||
}
|
||
})
|
||
}
|
||
})
|
||
},
|
||
//推送
|
||
handleCompare(val) {
|
||
let item = JSON.parse(JSON.stringify(val))
|
||
this.$nextTick(() => {
|
||
this.$refs.libraryPushRef.getPush(item.id.split(','))
|
||
})
|
||
},
|
||
dateChange(item) {
|
||
this.queryParamOne[item] = this.queryParamOne[item] ? moment(this.queryParamOne[item]).format('YYYY-MM-DD') : ''
|
||
this.queryParamOne[item + '_name'] = this.queryParamOne[item + '_name'] ? moment(this.queryParamOne[item + '_name']).format('YYYY-MM-DD') : ''
|
||
},
|
||
onChange(item) {
|
||
if (this.queryParamOne[item] && this.queryParamOne[item].length > 0) {
|
||
let dateOne = moment(this.queryParamOne[item][0]).format('YYYY-MM-DD')
|
||
let dateTwo = moment(this.queryParamOne[item][1]).format('YYYY-MM-DD')
|
||
this.queryParamOne[item] = [dateOne, dateTwo]
|
||
this.queryParamOne[item + '_name'] = [dateOne, dateTwo]
|
||
} else {
|
||
this.queryParamOne[item] = []
|
||
this.queryParamOne[item + '_name'] = []
|
||
}
|
||
},
|
||
getCondition() {
|
||
let query = {
|
||
flag: 1,
|
||
searchFlag: 0
|
||
}
|
||
getAction(this.url.queryCondition, query).then((res) => {
|
||
if (res.success) {
|
||
this.searchOption = res.result
|
||
} else {
|
||
this.searchOption = []
|
||
}
|
||
})
|
||
},
|
||
searchReset() {
|
||
this.pageNo = 1
|
||
this.queryParamOne = {}
|
||
this.queryParam = { ...this.queryParamOne, ...this.searchQueryOne }
|
||
this.queryParamSeach = ''
|
||
if (this.isTrue) {
|
||
this.getInfoList(1)
|
||
} else {
|
||
this.getParagraphInfoList(1)
|
||
}
|
||
},
|
||
searchQuery() {
|
||
this.ParamSeach()
|
||
this.queryParam = { ...this.queryParamOne, ...this.searchQueryOne }
|
||
this.pageNo = 1
|
||
if (this.isTrue) {
|
||
this.getInfoList(1)
|
||
} else {
|
||
this.getParagraphInfoList(1)
|
||
}
|
||
},
|
||
treeChange(value, text) {
|
||
this.queryParamOne[this.db_field_name + '_name'] = text
|
||
},
|
||
treeClick(db_field_name) {
|
||
this.db_field_name = db_field_name
|
||
},
|
||
ParamSeach() {
|
||
let queryParam = JSON.parse(JSON.stringify(this.searchQueryOne))
|
||
if (queryParam[this.selectModel]) {
|
||
this.queryParamSeach = this.selectModelName + ':' + queryParam[this.selectModel]
|
||
} else {
|
||
this.queryParamSeach = ''
|
||
}
|
||
},
|
||
searchData(data, selectModel, name) {
|
||
this.queryParam = {}
|
||
this.searchQueryOne = data || {}
|
||
this.queryParam = { ...this.queryParamOne, ...data }
|
||
this.selectModel = selectModel
|
||
this.selectModelName = name
|
||
this.ParamSeach()
|
||
this.pageNo = 1
|
||
if (this.isTrue) {
|
||
this.getInfoList(1)
|
||
} else {
|
||
this.getParagraphInfoList(1)
|
||
}
|
||
},
|
||
searchDataTwo(data, selectModel, name) {
|
||
this.queryParam = {}
|
||
this.searchQueryOne = data || {}
|
||
this.queryParam = { ...this.queryParamOne, ...data }
|
||
this.selectModel = selectModel
|
||
this.selectModelName = name
|
||
this.ParamSeach()
|
||
this.pageNo = 1
|
||
if (this.isTrue) {
|
||
this.getInfoList(2)
|
||
} else {
|
||
this.getParagraphInfoList(2)
|
||
}
|
||
},
|
||
ResetSearch() {
|
||
this.queryParam = {}
|
||
this.queryParamOne = {}
|
||
this.searchQueryOne = {}
|
||
this.checkboxText = []
|
||
this.selectedRowKeys = []
|
||
this.selectModel = ''
|
||
this.selectModelName = ''
|
||
this.ParamSeach()
|
||
this.pageNo = 1
|
||
if (this.isTrue) {
|
||
this.getInfoList(1)
|
||
} else {
|
||
this.getParagraphInfoList(1)
|
||
}
|
||
},
|
||
changeQuery(val, name) {
|
||
this.queryParamOne[name + '_name'] = val
|
||
},
|
||
tableOnChange(pagination, filters, sorter) {
|
||
this.orderBy = sorter.order == 'ascend' ? '1' : '2'
|
||
this.orderByField = sorter.columnKey
|
||
this.getInfoList()
|
||
},
|
||
getInfoList(num) {
|
||
let queryParam = JSON.parse(JSON.stringify(this.queryParam))
|
||
Object.keys(queryParam).forEach(val => {
|
||
if (queryParam[val] instanceof Array) {
|
||
queryParam[val] = queryParam[val].join(',')
|
||
}
|
||
if (val.includes('_name')) {
|
||
delete queryParam[val]
|
||
}
|
||
})
|
||
this.mapTwo = {}
|
||
if (num == 1) {
|
||
this.mapOne = queryParam
|
||
} else if (num == 2) {
|
||
this.mapTwo = queryParam
|
||
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
||
this.mapTwo.ids = selectedRowKeys.join(',')
|
||
}
|
||
let query = {
|
||
pageNo: this.pageNo,
|
||
pageSize: this.pageSize,
|
||
orderBy: this.orderBy,
|
||
orderByField: this.orderByField,
|
||
mapOne: this.mapOne,
|
||
mapTwo: this.mapTwo
|
||
}
|
||
this.loading = true
|
||
postAction(this.url.getInfoList, query).then((res) => {
|
||
if (res.success) {
|
||
this.dataSource = res.result.records
|
||
this.dataSource.forEach((val) => {
|
||
if (val[this.selectModel] && val[this.selectModel].includes(this.queryParam[this.selectModel])) {
|
||
val[this.selectModel] = val[this.selectModel].replace(this.queryParam[this.selectModel], `<text style="color:#21c9cc">${this.queryParam[this.selectModel]}</text>`)
|
||
}
|
||
})
|
||
this.total = res.result.total
|
||
this.loading = false
|
||
} else {
|
||
this.loading = false
|
||
}
|
||
})
|
||
},
|
||
getParagraphInfoList(num) {
|
||
let queryParam = JSON.parse(JSON.stringify(this.queryParam))
|
||
Object.keys(queryParam).forEach(val => {
|
||
if (queryParam[val] instanceof Array) {
|
||
queryParam[val] = queryParam[val].join(',')
|
||
}
|
||
if (val.includes('_name')) {
|
||
delete queryParam[val]
|
||
}
|
||
})
|
||
this.mapTwo = {}
|
||
if (num == 1) {
|
||
this.mapOne = queryParam
|
||
} else if (num == 2) {
|
||
this.mapTwo = queryParam
|
||
let checkboxText = JSON.parse(JSON.stringify(this.checkboxText))
|
||
this.mapTwo.ids = checkboxText.join(',')
|
||
}
|
||
let query = {
|
||
pageNo: this.pageNo,
|
||
pageSize: this.pageSize,
|
||
mapOne: this.mapOne,
|
||
mapTwo: this.mapTwo
|
||
}
|
||
this.loading = true
|
||
postAction(this.url.getParagraphInfoList, query).then((res) => {
|
||
if (res.success) {
|
||
this.conList = res.result.records
|
||
if (this.conList && this.conList.length > 0) {
|
||
this.conList.forEach(val => {
|
||
val.content = val.content.replace(/<img .*?>/g, '')
|
||
})
|
||
}
|
||
this.total = res.result.total
|
||
this.loading = false
|
||
} else {
|
||
this.loading = false
|
||
}
|
||
})
|
||
},
|
||
fileNameClick(row) {
|
||
this.fileList = row.file_name || []
|
||
if (this.fileList.length > 0) {
|
||
this.visible = true
|
||
}
|
||
},
|
||
fileClick(fileQuery) {
|
||
let fileName = fileQuery.fileName || fileQuery.file_name
|
||
let index1 = fileName.lastIndexOf('.')
|
||
let index2 = fileName.length
|
||
let 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') {
|
||
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
|
||
window.open(url, '_blank')
|
||
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
|
||
let 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'){
|
||
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadImgUrl + '/' + fileQuery.id + fileSuffix)
|
||
window.open(url, '_blank')
|
||
} else {
|
||
downloadFile('/sys/common/downLoadFile', fileQuery.fileName || fileQuery.file_name, { id: fileQuery.id })
|
||
}
|
||
},
|
||
titleClick(item) {
|
||
let newUrl = this.$router.resolve({
|
||
path: '/docManage/library/detail',
|
||
query: {
|
||
id: item.id.slice(0, 32),
|
||
title: item.title,
|
||
serial_number: item.serial_number
|
||
}
|
||
})
|
||
window.open(newUrl.href, '_blank')
|
||
}
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style>
|
||
.table .ant-table-column-title {
|
||
font-weight: bold;
|
||
}
|
||
|
||
.checkbox-left .ant-checkbox-inner {
|
||
width: 18px !important;
|
||
height: 18px !important;
|
||
line-height: 18px !important;
|
||
}
|
||
|
||
.tooltip-index {
|
||
max-width: calc(100% - 300px) !important;
|
||
}
|
||
</style>
|
||
<style lang="less" scoped>
|
||
@import'~@assets/less/common.less';
|
||
|
||
.search-con-text {
|
||
|
||
.search-text-wrap {
|
||
margin-top: -27px;
|
||
height: 100%;
|
||
display: flex;
|
||
justify-content: flex-start;
|
||
|
||
.text-left {
|
||
width: 358px;
|
||
padding: 24px 24px 24px 0;
|
||
box-sizing: border-box;
|
||
|
||
.text-left-wrap {
|
||
|
||
.text-left-select {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
margin-bottom: 24px;
|
||
line-height: 32px;
|
||
|
||
.text-sel {
|
||
font-size: 14px;
|
||
font-weight: 400;
|
||
color: #000F16;
|
||
text-align: right;
|
||
margin-right: 14px;
|
||
width: 112px;
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
|
||
.text-select {
|
||
width: calc(100% - 126px);
|
||
height: 38px;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
.text-right {
|
||
width: calc(100% - 358px);
|
||
position: relative;
|
||
padding: 26px 0 22px 24px;
|
||
box-sizing: border-box;
|
||
border-left: 2px solid #E6E7EC;
|
||
|
||
.search-text-title {
|
||
padding: 0 0 24px 0;
|
||
|
||
.search-header-left {
|
||
width: calc(100% - 80px);
|
||
display: inline-block;
|
||
}
|
||
|
||
span {
|
||
font-size: 14px;
|
||
font-weight: 400;
|
||
color: #040B29;
|
||
}
|
||
|
||
.search-header-right {
|
||
float: right;
|
||
margin-top: -7px;
|
||
|
||
a-icon {
|
||
|
||
border: 1px solid rgba(0, 0, 0, 0.65);
|
||
cursor: pointer;
|
||
padding: 2px 5px;
|
||
border-right: none;
|
||
}
|
||
|
||
a-icon:last-child {
|
||
border-right: 1px solid rgba(0, 0, 0, 0.65);
|
||
}
|
||
|
||
.header-list {
|
||
font-size: 20px;
|
||
border: 1px solid gray;
|
||
border-radius: 3px;
|
||
padding: 3px;
|
||
}
|
||
|
||
.header-list:hover {
|
||
color: #00B3BE;
|
||
border: 1px solid #00B3BE;
|
||
}
|
||
|
||
.header-list-active {
|
||
border: 1px solid #00B3BE;
|
||
color: #00B3BE;
|
||
}
|
||
}
|
||
}
|
||
|
||
.search-text-list {
|
||
ul {
|
||
padding: 0 0 0 18px;
|
||
margin: 0;
|
||
|
||
li {
|
||
list-style: none;
|
||
|
||
.text-content {
|
||
font-size: 14px;
|
||
font-weight: 400;
|
||
color: #040B29;
|
||
opacity: 0.8;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
.checkbox-left {
|
||
float: left;
|
||
position: absolute;
|
||
left: 0;
|
||
top: 50%;
|
||
transform: translateY(-50%);
|
||
}
|
||
|
||
.text-text-right {
|
||
padding: 19px 28px;
|
||
box-sizing: border-box;
|
||
margin-left: 38px;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.null-input {
|
||
background-color: #F2F4F8;
|
||
}
|
||
|
||
.text-header {
|
||
margin-bottom: 11px;
|
||
|
||
span {
|
||
margin-right: 52px;
|
||
font-size: 16px;
|
||
font-weight: bold;
|
||
color: #040B29;
|
||
display: inline-block;
|
||
max-width: 200px;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
}
|
||
}
|
||
|
||
.text-content {
|
||
font-size: 14px;
|
||
font-weight: 400;
|
||
color: #040B29;
|
||
opacity: 0.7;
|
||
overflow: hidden;
|
||
display: -webkit-box;
|
||
text-overflow: ellipsis;
|
||
/*! autoprefixer: off */
|
||
-webkit-box-orient: vertical;
|
||
-webkit-line-clamp: 4;
|
||
/*! autoprefixer: on;*/
|
||
text-justify: inter-ideograph;
|
||
word-break: break-all
|
||
}
|
||
|
||
.box-content {
|
||
padding: 0 0 0 8px;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.page {
|
||
text-align: right;
|
||
margin-top: 20px;
|
||
}
|
||
|
||
.text-operation {
|
||
margin-right: 8px;
|
||
}
|
||
|
||
.submitButtons {
|
||
text-align: center;
|
||
}
|
||
|
||
.fileText {
|
||
width: 100%;
|
||
cursor: pointer;
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
|
||
.textName {
|
||
width: 100%;
|
||
overflow: hidden;
|
||
display: -webkit-box;
|
||
text-overflow: ellipsis;
|
||
/*! autoprefixer: off */
|
||
-webkit-box-orient: vertical;
|
||
-webkit-line-clamp: 1;
|
||
/*! autoprefixer: on;*/
|
||
text-justify: inter-ideograph;
|
||
word-break: break-all
|
||
}
|
||
|
||
::v-deep p {
|
||
margin: 0;
|
||
padding: 0;
|
||
}
|
||
|
||
/*::v-deep .ant-select {*/
|
||
/* max-width: calc(100% - 126px) !important;*/
|
||
/*}*/
|
||
|
||
/deep/.ant-table-thead > tr > th {
|
||
font-weight: bolder;
|
||
}
|
||
|
||
///deep/.ant-table-tbody > tr > td {
|
||
// color: #040B29 ;
|
||
//}
|
||
</style> |