对接导出
This commit is contained in:
@@ -0,0 +1,238 @@
|
||||
<template>
|
||||
<div>
|
||||
<a-drawer
|
||||
:title="'推送'"
|
||||
:maskClosable="false"
|
||||
:width="600"
|
||||
placement="right"
|
||||
:closable="true"
|
||||
@close="handleCancel"
|
||||
:visible="visible"
|
||||
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
||||
<a-input-search style="margin-bottom: 8px" placeholder="Search" @change="onChange" />
|
||||
<div class="drawer-content">
|
||||
<a-tree
|
||||
style="margin-bottom: 60px;height: 600px"
|
||||
checkable
|
||||
:loading="loading"
|
||||
:tree-data="gData"
|
||||
@select="onSelect"
|
||||
@check="onCheck"
|
||||
>
|
||||
</a-tree>
|
||||
</div>
|
||||
|
||||
<div class="drawer-bootom-button">
|
||||
<a-button @click="handleCancel" type="danger" style="margin-right: 16px">{{$t('cancel')}}</a-button>
|
||||
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'index',
|
||||
props: ['query', 'value'],
|
||||
data(){
|
||||
return{
|
||||
loading:true,
|
||||
gData:[
|
||||
{
|
||||
title: 'parent 1',
|
||||
key: '0-0',
|
||||
children: [
|
||||
{
|
||||
title: '张晨成',
|
||||
key: '0-0-0',
|
||||
disabled: true,
|
||||
children: [
|
||||
{ title: 'leaf', key: '0-0-0-0' },
|
||||
{ title: 'leaf', key: '0-0-0-1' },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'parent 1-1',
|
||||
key: '0-0-1',
|
||||
children: [{ key: '0-0-1-0', title: 'zcvc' }],
|
||||
},
|
||||
],
|
||||
}, {
|
||||
title: 'parent 1',
|
||||
key: '0-0',
|
||||
children: [
|
||||
{
|
||||
title: '张晨成',
|
||||
key: '0-0-0',
|
||||
disabled: true,
|
||||
children: [
|
||||
{ title: 'leaf', key: '0-0-0-0' },
|
||||
{ title: 'leaf', key: '0-0-0-1' },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'parent 1-1',
|
||||
key: '0-0-1',
|
||||
children: [{ key: '0-0-1-0', title: 'zcvc' }],
|
||||
},
|
||||
],
|
||||
}, {
|
||||
title: 'parent 1',
|
||||
key: '0-0',
|
||||
children: [
|
||||
{
|
||||
title: '张晨成',
|
||||
key: '0-0-0',
|
||||
disabled: true,
|
||||
children: [
|
||||
{ title: 'leaf', key: '0-0-0-0' },
|
||||
{ title: 'leaf', key: '0-0-0-1' },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'parent 1-1',
|
||||
key: '0-0-1',
|
||||
children: [{ key: '0-0-1-0', title: 'zcvc' }],
|
||||
},
|
||||
],
|
||||
}, {
|
||||
title: 'parent 1',
|
||||
key: '0-0',
|
||||
children: [
|
||||
{
|
||||
title: '张晨成',
|
||||
key: '0-0-0',
|
||||
disabled: true,
|
||||
children: [
|
||||
{ title: 'leaf', key: '0-0-0-0' },
|
||||
{ title: 'leaf', key: '0-0-0-1' },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'parent 1-1',
|
||||
key: '0-0-1',
|
||||
children: [{ key: '0-0-1-0', title: 'zcvc' }],
|
||||
},
|
||||
],
|
||||
}, {
|
||||
title: 'parent 1',
|
||||
key: '0-0',
|
||||
children: [
|
||||
{
|
||||
title: '张晨成',
|
||||
key: '0-0-0',
|
||||
disabled: true,
|
||||
children: [
|
||||
{ title: 'leaf', key: '0-0-0-0' },
|
||||
{ title: 'leaf', key: '0-0-0-1' },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'parent 1-1',
|
||||
key: '0-0-1',
|
||||
children: [{ key: '0-0-1-0', title: 'zcvc' }],
|
||||
},
|
||||
],
|
||||
}, {
|
||||
title: 'parent 1',
|
||||
key: '0-0',
|
||||
children: [
|
||||
{
|
||||
title: '张晨成',
|
||||
key: '0-0-0',
|
||||
disabled: true,
|
||||
children: [
|
||||
{ title: 'leaf', key: '0-0-0-0' },
|
||||
{ title: 'leaf', key: '0-0-0-1' },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'parent 1-1',
|
||||
key: '0-0-1',
|
||||
children: [{ key: '0-0-1-0', title: 'zcvc' }],
|
||||
},
|
||||
],
|
||||
}, {
|
||||
title: 'parent 1',
|
||||
key: '0-0',
|
||||
children: [
|
||||
{
|
||||
title: '张晨成',
|
||||
key: '0-0-0',
|
||||
disabled: true,
|
||||
children: [
|
||||
{ title: 'leaf', key: '0-0-0-0' },
|
||||
{ title: 'leaf', key: '0-0-0-1' },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'parent 1-1',
|
||||
key: '0-0-1',
|
||||
children: [{ key: '0-0-1-0', title: 'zcvc' }],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
autoExpandParent: true,
|
||||
expandedKeys:[],
|
||||
visible: false,
|
||||
confirmLoading:false,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods:{
|
||||
onSelect(selectedKeys, info) {
|
||||
console.log('selected', selectedKeys, info);
|
||||
},
|
||||
onCheck(checkedKeys, info) {
|
||||
console.log('onCheck', checkedKeys, info);
|
||||
},
|
||||
handleCancel(){
|
||||
this.visible = false
|
||||
},
|
||||
handleSubmit(){
|
||||
|
||||
},
|
||||
onChange(){
|
||||
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
height: 38px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.button-box {
|
||||
margin-left: 10px;
|
||||
height: 38px;
|
||||
line-height: 38px;
|
||||
|
||||
}
|
||||
.drawer-bootom-button {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 16px;
|
||||
text-align: right;
|
||||
left: 0;
|
||||
background: #fff;
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
.drawer-content{
|
||||
height: calc(100% - 60px);
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
@@ -15,10 +15,10 @@
|
||||
<span slot="operation" slot-scope="record">
|
||||
<a class="text" v-for="(ol,index) in OperationList"
|
||||
@click="OperationClick(ol,record)">
|
||||
<span v-if="ol.text == '收藏'">
|
||||
<span v-if="ol.text == '取消收藏'">
|
||||
{{!record.collectFlag || record.collectFlag == 0 ? '收藏' :'取消收藏'}}
|
||||
</span>
|
||||
<span v-else-if="ol.text == '订阅'">
|
||||
<span v-else-if="ol.text == '取消订阅'">
|
||||
{{!record.subscribeFlag || record.subscribeFlag == 0 ? '订阅' :'取消订阅'}}
|
||||
</span>
|
||||
<span v-else>
|
||||
@@ -135,12 +135,12 @@
|
||||
let width = 0
|
||||
if (this.OperationList.length > 0) {
|
||||
this.OperationList.forEach((res) => {
|
||||
width += res.text.length * 9 + width
|
||||
width += res.text.length * 5 + width
|
||||
})
|
||||
}
|
||||
if (this.showAction) {
|
||||
this.columns.push({
|
||||
title: '操作',
|
||||
title: this.$t('operation'),
|
||||
align: 'center',
|
||||
fixed: 'right',
|
||||
width: width,
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
<div class="table-page-search-wrapper">
|
||||
<search :flag="'1'" :url="url"/>
|
||||
<search ref="searchRef" :flag="'1'" :url="url"/>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div @click="handleDel" class="operator-text">
|
||||
<a-icon type="delete" />
|
||||
<a-icon type="delete"/>
|
||||
批量删除
|
||||
</div>
|
||||
<div @click="handleExport" class="operator-text">
|
||||
@@ -13,23 +13,23 @@
|
||||
数据导出
|
||||
</div>
|
||||
<div @click="handleFileExport" class="operator-text">
|
||||
<a-icon type="mail" />
|
||||
<a-icon type="mail"/>
|
||||
带文件导出
|
||||
</div>
|
||||
<div @click="handleCompare" class="operator-text">
|
||||
<a-icon type="rocket" :rotate="45" />
|
||||
<a-icon type="rocket" :rotate="45"/>
|
||||
推送
|
||||
</div>
|
||||
<div @click="handleModule" class="operator-text">
|
||||
<a-icon type="download" />
|
||||
<a-icon type="download"/>
|
||||
模板下载
|
||||
</div>
|
||||
<div @click="handleModule" class="operator-text">
|
||||
<a-icon type="import" :rotate="270" />
|
||||
<div @click="handleImport" class="operator-text">
|
||||
<a-icon type="import" :rotate="270"/>
|
||||
导入
|
||||
</div>
|
||||
<div @click="handleAdd" class="operator-text">
|
||||
<a-icon type="plus" />
|
||||
<a-icon type="plus"/>
|
||||
{{$t('add')}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -58,9 +58,9 @@
|
||||
:url="url"
|
||||
:flag="'1'"
|
||||
/>
|
||||
<frameAssembly
|
||||
<libraryPush
|
||||
:url="url"
|
||||
ref="frameAssemblyRef"
|
||||
ref="libraryPushRef"
|
||||
/>
|
||||
|
||||
</a-card>
|
||||
@@ -70,8 +70,8 @@
|
||||
import search from '@/components/search/index'
|
||||
import tableData from '@/components/tableDate/index'
|
||||
import addForm from './modules/addForm'
|
||||
import frameAssembly from '@/components/frameAssembly/index'
|
||||
import { getAction, postAction, deleteAction } from '@/api/manage'
|
||||
import libraryPush from '@/components/libraryPush/index'
|
||||
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
|
||||
import eventBUs from '../../../common/event'
|
||||
|
||||
export default {
|
||||
@@ -80,17 +80,17 @@
|
||||
search,
|
||||
addForm,
|
||||
tableData,
|
||||
frameAssembly
|
||||
libraryPush
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
OperationList: [
|
||||
{
|
||||
text: '收藏',
|
||||
text: '取消收藏',
|
||||
ClickEvent: 'Collection'
|
||||
},
|
||||
{
|
||||
text: '订阅',
|
||||
text: '取消订阅',
|
||||
ClickEvent: 'subscribe'
|
||||
},
|
||||
{
|
||||
@@ -122,21 +122,31 @@
|
||||
|
||||
},
|
||||
methods: {
|
||||
onSelectChange() {
|
||||
|
||||
},
|
||||
//导出
|
||||
handleExport() {
|
||||
|
||||
let query = {
|
||||
...this.$refs.searchRef.queryParam,
|
||||
id:this.idList.join(',')
|
||||
}
|
||||
downloadFile('document/bussDocumentLibraryEO/exportTemplate', '文档库.xls', query)
|
||||
},
|
||||
//带文件导出
|
||||
handleFileExport() {
|
||||
|
||||
let query = {
|
||||
...this.$refs.searchRef.queryParam,
|
||||
id:this.idList.join(',')
|
||||
}
|
||||
downloadFile('document/bussDocumentLibraryEO/exportZip', '文档库.zip', query)
|
||||
},
|
||||
//新增
|
||||
handleAdd() {
|
||||
this.$refs.addFormRef.add()
|
||||
},
|
||||
//下载模板
|
||||
handleModule() {
|
||||
|
||||
downloadFile('document/bussDocumentLibraryEO/exportTemplate', '文档库.xls', {})
|
||||
},
|
||||
//批量删除
|
||||
handleDel() {
|
||||
if (this.idList.length > 0) {
|
||||
let _this = this
|
||||
@@ -158,13 +168,14 @@
|
||||
this.$message.warning('请选择需要删除的数据')
|
||||
}
|
||||
},
|
||||
//推送
|
||||
handleCompare() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.frameAssemblyRef.visible = true
|
||||
this.$refs.libraryPushRef.visible = true
|
||||
})
|
||||
// this.$refs.addFormRef.add()
|
||||
},
|
||||
handleFileImport() {
|
||||
//导入
|
||||
handleImport(){
|
||||
|
||||
},
|
||||
//编辑按钮
|
||||
@@ -234,17 +245,17 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//选中的id
|
||||
onSelectChange(value) {
|
||||
this.idList = value
|
||||
},
|
||||
|
||||
//处理列表中的点击事件
|
||||
detailClick(item) {
|
||||
this.$router.push({
|
||||
path: '/docManage/library/detail',
|
||||
query: item
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user