update 文档拆分
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<div class="page-left-right-layout">
|
||||
<!--树部分-->
|
||||
<div class="page-left-box">
|
||||
<a-input-search class="tree-search" v-model="searchValue" :placeholder="$t('nodeQuickLookup')" @search="onSearch" />
|
||||
<a-input-search class="tree-search" v-model="searchValue" :placeholder="$t('nodeQuickLookup')" @search="onSearch"/>
|
||||
<div class="page-tree-box page-tree-box-has-search">
|
||||
<a-spin :spinning="loading">
|
||||
<a-tree :show-line="true" :show-icon="true" :tree-data="treeData" :selected-keys="selectedKeys">
|
||||
@@ -12,7 +12,7 @@
|
||||
@mouseenter="handleTreeMouseover(record.id)"
|
||||
@mouseleave="handleTreeMouseout(record.id)"
|
||||
@click="handleSelectTreeNode(record)">
|
||||
<a-icon class="parent-node-icon" type="folder" v-if="record.dataRef.children && record.dataRef.children.length > 0" />
|
||||
<a-icon class="parent-node-icon" type="folder" v-if="record.dataRef.children && record.dataRef.children.length > 0"/>
|
||||
<a-tooltip>
|
||||
<template #title>
|
||||
{{ record.name }}{{ record.itemName }}
|
||||
@@ -24,21 +24,20 @@
|
||||
<a-button icon="plus"
|
||||
class="tree-operate-node-btn"
|
||||
@click.stop="orgAdd(record)"
|
||||
v-has="'split:sarFileSplitMenu:add'">
|
||||
</a-button>
|
||||
v-has="'split:sarFileSplitMenu:add'"></a-button>
|
||||
<!--编辑-->
|
||||
<a-button class="tree-operate-node-btn"
|
||||
@click.stop="orgEdit(record)"
|
||||
v-if="record.pid"
|
||||
v-has="'split:sarFileSplitMenu:update'">
|
||||
<i class="iconfont icon-bianji" />
|
||||
<i class="iconfont icon-bianji"/>
|
||||
</a-button>
|
||||
<!--删除,根节点不能删除-->
|
||||
<a-button class="tree-operate-node-btn"
|
||||
v-if="record.pid"
|
||||
v-has="'split:sarFileSplitMenu:delete'"
|
||||
@click.stop="orgDelete(record)">
|
||||
<i class="iconfont icon-shanchu_" />
|
||||
<i class="iconfont icon-shanchu_"/>
|
||||
</a-button>
|
||||
<!--节点上移,是否可以上移在树形数据中应该有字段标识-->
|
||||
<a-button icon="up"
|
||||
@@ -55,26 +54,6 @@
|
||||
v-has="'split:sarFileSplitMenu:moveDown'">
|
||||
</a-button>
|
||||
</div>
|
||||
<!--<template #overlay>-->
|
||||
<!-- <a-menu v-if="$route.query.createBy === userInfo.username || administrators"-->
|
||||
<!-- @click="({ key: menuKey }) => onContextMenuClick(treeKey, menuKey, record)">-->
|
||||
<!-- <a-menu-item key="1" @click="orgAdd" v-has="'split:sarFileSplitMenu:add'">-->
|
||||
<!-- {{ $t('newNode') }}-->
|
||||
<!-- </a-menu-item>-->
|
||||
<!-- <a-menu-item key="2" @click="orgEdit" v-has="'split:sarFileSplitMenu:update'">-->
|
||||
<!-- {{ $t('modifyNode') }}-->
|
||||
<!-- </a-menu-item>-->
|
||||
<!-- <a-menu-item key="3" @click="orgDelete" v-if="deleteNode"-->
|
||||
<!-- v-has="'split:sarFileSplitMenu:delete'">{{ $t('deleteNode') }}-->
|
||||
<!-- </a-menu-item>-->
|
||||
<!-- <a-menu-item key="4" @click="orgMoveUp" v-if="deleteNode && moveUpFlag"-->
|
||||
<!-- v-has="'split:sarFileSplitMenu:moveUp'">{{ $t('moveUp') }}-->
|
||||
<!-- </a-menu-item>-->
|
||||
<!-- <a-menu-item key="5" @click="orgmoveDown" v-if="deleteNode && moveDownFlag"-->
|
||||
<!-- v-has="'split:sarFileSplitMenu:moveDown'">{{ $t('moveDown') }}-->
|
||||
<!-- </a-menu-item>-->
|
||||
<!-- </a-menu>-->
|
||||
<!--</template>-->
|
||||
</div>
|
||||
</template>
|
||||
</a-tree>
|
||||
@@ -89,12 +68,12 @@
|
||||
:get-query-condition-func="getQueryConditionFunc"
|
||||
search-has="split:sarFileSplitItems:search"
|
||||
@search="searchQuery"
|
||||
@reset="searchReset" />
|
||||
@reset="searchReset"/>
|
||||
</div>
|
||||
<!--操作按钮-->
|
||||
<div class="table-operator">
|
||||
<!--新增-->
|
||||
<a-button icon="plus" type="primary" @click="handleAdd" v-has="'split:sarFileSplitItems:add'">{{ $t('newlyAdded') }}</a-button>
|
||||
<!--<a-button icon="plus" type="primary" @click="handleAdd" v-has="'split:sarFileSplitItems:add'">{{ $t('newlyAdded') }}</a-button>-->
|
||||
<!--导入-->
|
||||
<a-upload name="file"
|
||||
:showUploadList="false"
|
||||
@@ -114,7 +93,10 @@
|
||||
{{ $t('export') }}
|
||||
</a-button>
|
||||
<!--批量删除-->
|
||||
<a-button type="primary" icon="delete" ghost @click="batchDel" v-has="'split:sarFileSplitItems:delete'">{{ $t('batchDelete') }}</a-button>
|
||||
<a-button type="primary" icon="delete" ghost @click="batchDel" v-has="'split:sarFileSplitItems:delete'">{{
|
||||
$t('batchDelete')
|
||||
}}
|
||||
</a-button>
|
||||
<!--模板下载-->
|
||||
<a-button type="primary"
|
||||
icon="download"
|
||||
@@ -124,7 +106,7 @@
|
||||
{{ $t('templateDownload') }}
|
||||
</a-button>
|
||||
<!--批量复制-->
|
||||
<a-button type="primary" ghost @click="handleCopyManage" v-has="'split:sarFileSplitItems:copy'">
|
||||
<a-button type="primary" ghost @click="handleCopy" v-has="'split:sarFileSplitItems:copy'">
|
||||
{{ $t('docTool.split.batchCopy') }}
|
||||
</a-button>
|
||||
<!--批量编辑-->
|
||||
@@ -132,7 +114,7 @@
|
||||
{{ $t('docTool.split.batchEdit') }}
|
||||
</a-button>
|
||||
<!--合并条款-->
|
||||
<a-button type="primary" ghost @click="handleMergeManage" v-has="'split:sarFileSplitItems:merge'">
|
||||
<a-button type="primary" ghost @click="handleMerge" v-has="'split:sarFileSplitItems:merge'">
|
||||
{{ $t('docTool.split.mergerClause') }}
|
||||
</a-button>
|
||||
</div>
|
||||
@@ -147,7 +129,8 @@
|
||||
:pagination="ipagination"
|
||||
:scroll="{x: '100%'}"
|
||||
:operation-list="operationList"
|
||||
@change="tableOnChange">
|
||||
@change="tableOnChange"
|
||||
@operationClick="operationClick">
|
||||
|
||||
<!-- 详情-->
|
||||
<template slot="detailClick" slot-scope="{text, record}">
|
||||
@@ -159,7 +142,7 @@
|
||||
</template>
|
||||
|
||||
<!--条文内容-->
|
||||
<template slot="Item_content" slot-scope="{text, record}">
|
||||
<template slot="item_content" slot-scope="{text, record}">
|
||||
<div class="table-text" @click="showContent(text,record)">
|
||||
{{ text && text !== 'null' ? text.replace(/<.*?>/ig, ' ') : '' }}
|
||||
</div>
|
||||
@@ -171,15 +154,15 @@
|
||||
</div>
|
||||
|
||||
<!-- 条款详情 -->
|
||||
<split-clause-detail ref="splitClauseDetail"></split-clause-detail>
|
||||
<split-clause-detail ref="splitClauseDetail"/>
|
||||
<!-- 添加节点 -->
|
||||
<split-detail-node-add ref="splitDetailNodeAdd" @ok="nodeAddOk" @update="nodeUpdateOk"></split-detail-node-add>
|
||||
<split-detail-node-add ref="splitDetailNodeAdd" @ok="nodeAddOk"/>
|
||||
<!-- 批量设置弹框 -->
|
||||
<split-detail-batch-setting ref="splitDetailBatchSetting" @ok="batchSettingOk"></split-detail-batch-setting>
|
||||
<split-detail-batch-setting ref="splitDetailBatchSetting" @ok="batchSettingOk"/>
|
||||
<!--条款添加-->
|
||||
<split-add-form ref="modalForm" :flag="'4'"
|
||||
:url="url" :infoId="infoId" :menuId="menuId" :itemId="itemId"
|
||||
@sumber="sumber"></split-add-form>
|
||||
@sumber="sumber"/>
|
||||
</internal-detail-page>
|
||||
</template>
|
||||
|
||||
@@ -269,15 +252,15 @@ export default {
|
||||
}
|
||||
],
|
||||
url: {
|
||||
list: '/split/sarFileSplitItems/getSplitItemsByPage',
|
||||
list: '/laws/DocumentTool/documentSplit/queryDocumentSplitDetail',
|
||||
importUrl: '/split/sarFileSplitItems/importSplitItems', // 导入
|
||||
exportXlsUrl: '/split/sarFileSplitItems/exportSplitInfoZip', // 导出
|
||||
delete: '/split/sarFileSplitItems/batchDeleteItems', // 删除
|
||||
deleteBatch: '/split/sarFileSplitItems/batchDeleteItems', // 批量删除
|
||||
delete: '/laws/DocumentTool/documentSplit/deleteDocumentSplitDetail', // 删除
|
||||
deleteBatch: '/laws/DocumentTool/documentSplit/deleteBatchDocumentSplitDetail', // 批量删除
|
||||
downTemplateUrl: '/split/sarFileSplitItems/exportTemplate' // 模板下载
|
||||
},
|
||||
disabledMixinsCreate: true,
|
||||
tableSlotField: ['Item_content']
|
||||
tableSlotField: ['item_content']
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -375,15 +358,13 @@ export default {
|
||||
this.$refs.splitDetailNodeAdd.edit(record.dataRef, this.infoId)
|
||||
},
|
||||
// 添加节点完成后的回调
|
||||
nodeAddOk () {
|
||||
nodeAddOk (expandId) {
|
||||
if (expandId && expandId.length > 0) {
|
||||
this.onExpand(expandId)
|
||||
}
|
||||
this.loadMenuData()
|
||||
this.loadData()
|
||||
},
|
||||
// 修改节点完成后的回调
|
||||
nodeUpdateOk (expandId) {
|
||||
this.onExpand(expandId)
|
||||
this.loadMenuData()
|
||||
},
|
||||
// 树形删除
|
||||
orgDelete (record) {
|
||||
this.$confirm({
|
||||
@@ -428,7 +409,7 @@ export default {
|
||||
const query = {
|
||||
moveFlag: 'down',
|
||||
infoId: this.infoId,
|
||||
SarFileSplitMenu: {
|
||||
sarFileSplitMenu: {
|
||||
id: record.dataRef.id,
|
||||
pId: record.dataRef.pid,
|
||||
displaySeq: record.dataRef.displaySeq
|
||||
@@ -444,11 +425,14 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
onContextMenuClick (treeKey, menuKey) {
|
||||
// console.log(`treeKey: ${treeKey}, menuKey: ${menuKey}`);
|
||||
},
|
||||
// 复制按钮
|
||||
handleCopyManage (record) {
|
||||
/**
|
||||
* 批量复制
|
||||
*/
|
||||
handleCopy () {
|
||||
if (!this.selectedRowKeys || this.selectedRowKeys.length === 0) {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
return
|
||||
}
|
||||
const ids = []
|
||||
const infoIds = []
|
||||
const menuIds = []
|
||||
@@ -485,42 +469,40 @@ export default {
|
||||
},
|
||||
// 新增
|
||||
handleAdd () {
|
||||
// console.log('this.menuId',this.menuId)
|
||||
if (!this.menuId) {
|
||||
this.$message.warning(this.$t('docTool.split.selectDirectoryTerms'))
|
||||
return
|
||||
}
|
||||
if (this.menuId) {
|
||||
this.formTitle = this.$t('add')
|
||||
this.itemId = ''
|
||||
this.addVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.modalForm.add()
|
||||
})
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectDirectoryTerms'))
|
||||
this.$refs.modalForm.add()
|
||||
}
|
||||
},
|
||||
// 合并条款
|
||||
handleMergeManage () {
|
||||
handleMerge () {
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length < 2) {
|
||||
this.$message.warning(this.$t('leastTwo'))
|
||||
} else {
|
||||
const ids = this.selectedRowKeys.join(',')
|
||||
this.$confirm({
|
||||
title: this.$t('docTool.split.mergeTerms'),
|
||||
content: '',
|
||||
onOk: () => {
|
||||
merageClause({ ids: ids }).then(res => {
|
||||
if (res.data.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.onClearSelected()
|
||||
this.loadMenuData()
|
||||
this.loadData()
|
||||
this.selectedRowKeys = []
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
const ids = this.selectedRowKeys.join(',')
|
||||
this.$confirm({
|
||||
title: this.$t('docTool.split.mergeTerms'),
|
||||
content: '',
|
||||
onOk: () => {
|
||||
merageClause({ ids: ids }).then(res => {
|
||||
if (res.data.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.onClearSelected()
|
||||
this.loadMenuData()
|
||||
this.loadData()
|
||||
this.selectedRowKeys = []
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 批量设置
|
||||
handleManage () {
|
||||
|
||||
Reference in New Issue
Block a user