update 文档拆分

This commit is contained in:
赵霄
2023-10-12 17:42:03 +08:00
parent 505c07fd88
commit 999ca5f719
15 changed files with 388 additions and 62 deletions
@@ -158,10 +158,11 @@
</a-tooltip>
</template>
<template slot="showContent" slot-scope="text, record">
<span class="content-show"
@click="showContent(text,record)">{{ record.iterms_conditions && record.iterms_conditions !== 'null' ? record.iterms_conditions.replace(/<.*?>/ig, ' ') : ''
}}</span>
<!--条文内容-->
<template slot="Item_content" slot-scope="{text, record}">
<div class="table-text" @click="showContent(text,record)">
{{ text && text !== 'null' ? text.replace(/<.*?>/ig, ' ') : '' }}
</div>
</template>
</j-table>
@@ -205,6 +206,7 @@ import {
getClauseTreeData
} from '../../../api/documentToolApi.js'
import Search from '../../../components/customField/Search.vue'
import { isHasPermission } from '../../../utils/hasPermission.js'
export default {
name: 'DocumentSplitDetail',
@@ -236,9 +238,9 @@ export default {
fullWidth: '',
parameter: {},
administrators: false,
showAction: this.isCanOperate,
showAction: false,
flag: '4', // 查询要用到
operateSlotName: 'action',
getQueryConditionFunc: getDocSplitSearch,
getTableHeaderFunc: getDocSplitTableHeader,
treeData: [],
@@ -247,15 +249,23 @@ export default {
mouseInNodeKey: null, // 鼠标悬浮的节点key值
// 操作栏
operationList: [
// 编辑
{
text: this.$t('edit'),
clickEvent: 'handleEdit',
has: 'split:sarFileSplitItems:update'
clickEvent: 'handleEdit'
// has: 'split:sarFileSplitItems:update'
},
// 复制
{
text: this.$t('copy'),
clickEvent: 'handleEdit'
// has: 'split:sarFileSplitItems:update'
},
// 删除
{
text: this.$t('delete'),
clickEvent: 'handleDelete',
has: 'split:sarFileSplitItems:delete'
clickEvent: 'handleDelete'
// has: 'split:sarFileSplitItems:delete'
}
],
url: {
@@ -265,26 +275,32 @@ export default {
delete: '/split/sarFileSplitItems/batchDeleteItems', // 删除
deleteBatch: '/split/sarFileSplitItems/batchDeleteItems', // 批量删除
downTemplateUrl: '/split/sarFileSplitItems/exportTemplate' // 模板下载
}
},
disabledMixinsCreate: true,
tableSlotField: ['Item_content']
}
},
computed: {
isCanOperate () {
return !!(this.$route.query.createBy === this.userInfo.username || this.administrators)
},
// 页面标题是标准名称
pageTitle () {
return this.$route.query.standardName
},
...mapGetters(['userInfo'])
},
created () {
mounted () {
this.operateColumn.scopedSlots.customRender = 'action'
this.showAction = this.$route.query.createBy === this.userInfo.username || this.administrators
this.infoId = this.$route.query.infoId
this.filters = {
menu_id: this.menuId,
info_id: this.infoId
}
},
mounted () {
this.getTableHeader()
this.loadData()
// 过滤没有权限的按钮
if (this.needFilterTableBtn) {
this.operationList = this.operationList.filter(item => !item.has || isHasPermission(item.has))
}
this.administrators = false
if (this.userInfo.userRoleList && this.userInfo.userRoleList.length > 0) {
this.userInfo.userRoleList.forEach(res => {
@@ -340,7 +356,6 @@ export default {
getClauseTreeData(params).then(res => {
if (res.success) {
this.treeData = res.result || []
console.log(this.treeData)
}
}).finally(() => {
this.loading = false