[update] 文档拆分详情页布局
This commit is contained in:
@@ -21,7 +21,8 @@
|
||||
<span v-else-if="ol.text === $t('cancelSubscribe')" v-has="ol.has" class="text">
|
||||
{{ !record.subscribeFlag || record.subscribeFlag === 0 ? $t('subscribe') :$t('cancelSubscribe') }}
|
||||
</span>
|
||||
<span v-else v-has="ol.has" class="text">
|
||||
<!-- v-has="ol.has"-->
|
||||
<span v-else class="text">
|
||||
{{ ol.text }}
|
||||
</span>
|
||||
</a>
|
||||
@@ -200,6 +201,21 @@ export default {
|
||||
// scopedSlots: { customRender: 'operation' }
|
||||
// }
|
||||
]
|
||||
let width = 0
|
||||
if (this.operationList.length > 0) {
|
||||
for (let i = 0; i < this.operationList.length; i++) {
|
||||
width += this.getTextWith(this.operationList[i].text)
|
||||
}
|
||||
}
|
||||
if (this.showAction) {
|
||||
this.columns.push({
|
||||
title: this.$t('operation'),
|
||||
align: 'center',
|
||||
fixed: 'right',
|
||||
width: width,
|
||||
scopedSlots: { customRender: 'operation' }
|
||||
})
|
||||
}
|
||||
this.dataSource = [
|
||||
{
|
||||
collectFlag: '0',
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<a-card :bordered="false">
|
||||
<div class="left-tree-div">
|
||||
<div class="div-left">
|
||||
<div class="split-detail-left-tree">
|
||||
<div>
|
||||
<a-input-search style="margin-bottom: 8px" :placeholder="$t('nodeQuickLookup')" @change="onLeftChange"
|
||||
@search="onSearch"/>
|
||||
<a-tree
|
||||
|
||||
@@ -62,12 +62,12 @@ export default {
|
||||
// 查看
|
||||
{
|
||||
text: this.$t('view'),
|
||||
ClickEvent: 'detailClick'
|
||||
clickEvent: 'detailClick'
|
||||
},
|
||||
// 删除
|
||||
{
|
||||
text: this.$t('delete'),
|
||||
ClickEvent: 'deleteDetail'
|
||||
clickEvent: 'deleteDetail'
|
||||
}
|
||||
],
|
||||
url: {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
:rules="rules"
|
||||
ref="splitEditForm"
|
||||
>
|
||||
<a-row :gutter="24" class="split-form-row">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12" v-for="(item,index) in dataList" :key="index">
|
||||
<div class="box-title-text" v-if="item.field_show_type === '1' || item.field_show_type === '11'">
|
||||
<div class="title-text">
|
||||
@@ -143,7 +143,7 @@
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" :prop="item.db_field_name">
|
||||
<Standardselection :query="item"
|
||||
<standard-selection :query="item"
|
||||
:disabled="disabled"
|
||||
:standard="formInline"
|
||||
v-model="formInline[item.db_field_name]"/>
|
||||
@@ -329,16 +329,16 @@ import UploadFile from '@/components/UploadFile'
|
||||
import StandardSelection from '@/components/selection/StandardSelection'
|
||||
import SplitUpload from '@/components/splitUpload/SplitUpload'
|
||||
import UEditor from '@/components/uEditor/UEditor'
|
||||
import moment from 'moment'
|
||||
import axios from 'axios'
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import { getAction } from '@/api/manage'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import Vue from 'vue'
|
||||
|
||||
export default {
|
||||
name: 'SplitAddForm',
|
||||
components: {
|
||||
uploadFile,
|
||||
Standardselection,
|
||||
UploadFile,
|
||||
StandardSelection,
|
||||
SplitUpload,
|
||||
UEditor
|
||||
},
|
||||
@@ -726,7 +726,7 @@ export default {
|
||||
this.$message.warning(this.$t('oneTableAdded'))
|
||||
} else if (!ueContent || ueContent.length < 1) {
|
||||
this.$message.warning(this.$t('addATable'))
|
||||
} if (ueContent && ueContent.length == 1) {
|
||||
} if (ueContent && ueContent.length === 1) {
|
||||
this.tableVisible = false
|
||||
if (this.isTableEdit) {
|
||||
this.contentList[this.addIndex] = {
|
||||
|
||||
@@ -1,215 +1,211 @@
|
||||
<template>
|
||||
<div class="main-item">
|
||||
<div class="split-detail" @click="clearMenu" :style="'width:' + (fullWidth - 200) + 'px'">
|
||||
<a-card :bordered="false">
|
||||
<div class="split-detail-wrap">
|
||||
<div class="split-detail-left">
|
||||
<div class="split-detail-left-tree">
|
||||
<a-input-search style="margin-bottom: 8px" :placeholder="$t('nodeQuickLookup')" @change="onLeftChange"
|
||||
@search="onSearch" />
|
||||
<a-tree
|
||||
v-if="gData.length>0"
|
||||
:selected-keys="selectedKeys"
|
||||
:expanded-keys.sync="expandedKeys"
|
||||
:auto-expand-parent="autoExpandParent"
|
||||
:defaultExpandAll="true"
|
||||
:tree-data="gData"
|
||||
@expand="onExpand"
|
||||
@rightClick="rightClick"
|
||||
@select="onSelect"
|
||||
>
|
||||
<template #title="{ key: treeKey, title, record }">
|
||||
<a-dropdown :trigger="['contextmenu']">
|
||||
<a-card :bordered="false">
|
||||
<div class="left-tree-div">
|
||||
<div class="div-left">
|
||||
<div>
|
||||
<a-input-search style="margin-bottom: 8px" :placeholder="$t('nodeQuickLookup')" @change="onLeftChange"
|
||||
@search="onSearch" />
|
||||
<a-tree
|
||||
v-if="gData.length>0"
|
||||
:selected-keys="selectedKeys"
|
||||
:expanded-keys.sync="expandedKeys"
|
||||
:auto-expand-parent="autoExpandParent"
|
||||
:defaultExpandAll="true"
|
||||
:tree-data="gData"
|
||||
@expand="onExpand"
|
||||
@rightClick="rightClick"
|
||||
@select="onSelect"
|
||||
>
|
||||
<template #title="{ key: treeKey, title, record }">
|
||||
<a-dropdown :trigger="['contextmenu']">
|
||||
<span v-if="title.indexOf(searchValue) >= -1 && title.length <= 18" :title="title"
|
||||
class="expand-title">
|
||||
{{ title.substr(0, title.indexOf(searchValue)) }}<span style="color: #f50">{{ searchValue }}</span>
|
||||
{{ title.substr(title.indexOf(searchValue) + searchValue.length) }}
|
||||
</span>
|
||||
<span
|
||||
v-else-if="title.indexOf(searchValue) >= -1 && title.length > 18 && title.indexOf(searchValue)>18"
|
||||
:title="title">
|
||||
<span
|
||||
v-else-if="title.indexOf(searchValue) >= -1 && title.length > 18 && title.indexOf(searchValue)>18"
|
||||
:title="title">
|
||||
{{ title && title.length > 18 ? title.slice(0, 17) + '...' : title }}
|
||||
</span>
|
||||
<span
|
||||
v-else-if="title.indexOf(searchValue) >= -1 && title.length > 18 && title.indexOf(searchValue)<=18"
|
||||
:title="title">
|
||||
<span
|
||||
v-else-if="title.indexOf(searchValue) >= -1 && title.length > 18 && title.indexOf(searchValue)<=18"
|
||||
:title="title">
|
||||
{{ title.substr(0, title.indexOf(searchValue)) }}<span style="color: #f50">
|
||||
{{ title.indexOf(searchValue) + searchValue.length > 18 ? searchValue.substr(0, 18 - title.indexOf(searchValue)) : searchValue
|
||||
}}</span>{{ title.indexOf(searchValue) + searchValue.length > 18 ? '...' : title.substr(title.indexOf(searchValue) + searchValue.length, 18 - title.indexOf(searchValue) - searchValue.length) + '...'
|
||||
}}
|
||||
}}</span>{{ title.indexOf(searchValue) + searchValue.length > 18 ? '...' : title.substr(title.indexOf(searchValue) + searchValue.length, 18 - title.indexOf(searchValue) - searchValue.length) + '...'
|
||||
}}
|
||||
|
||||
</span>
|
||||
<span v-else :title="title">
|
||||
<span v-else :title="title">
|
||||
{{ title && title.length > 18 ? title.slice(0, 17) + '...' : title }}
|
||||
</span>
|
||||
<template #overlay>
|
||||
<a-menu v-if="$route.query.createBy === userData.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>
|
||||
</a-dropdown>
|
||||
<template #overlay>
|
||||
<a-menu v-if="$route.query.createBy === userData.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>
|
||||
</a-tree>
|
||||
</div>
|
||||
</div>
|
||||
<div class="split-detail-right">
|
||||
<div class="split-detail-right-wraper">
|
||||
<div class="split-detail-search-header">
|
||||
<search :flag="'4'" :url="url" :infoId="$route.query.infoId"
|
||||
:menuId="menuId" @resetSearch="resetSearch" @queryParams="queryParamsValues" />
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div class="operator-text" @click="handleCopyManage"
|
||||
v-if="$route.query.createBy === userData.username || administrators"
|
||||
v-has="'split:sarFileSplitItems:copy'">
|
||||
<a-icon type="copy" />
|
||||
{{ $t('copy') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleAddManage"
|
||||
v-if="$route.query.createBy === userData.username || administrators"
|
||||
v-has="'split:sarFileSplitItems:add'">
|
||||
<a-icon type="plus" />
|
||||
{{ $t('add') }}
|
||||
</div>
|
||||
<div class="operator-text upload-split"
|
||||
v-if="$route.query.createBy === userData.username || administrators"
|
||||
@click="handleImportManage" v-has="'split:sarFileSplitItems:import'">
|
||||
<a-icon type="import" :rotate="-90" v-if="uploadMenuId === undefined || uploadMenuId === ''" />
|
||||
{{ (uploadMenuId === '' || uploadMenuId === undefined) ? $t('import') : '' }}
|
||||
<upload v-if="menuId" ref="uploadSplit" :infoId="infoId" :menuId="uploadMenuId"
|
||||
@uploadSuccess="uploadSuccess"></upload>
|
||||
</div>
|
||||
<div class="operator-text" @click="handleExportManage"
|
||||
v-has="'split:sarFileSplitItems:export'">
|
||||
<a-icon type="export" :rotate="-90" />
|
||||
{{ $t('export') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleDownManage"
|
||||
v-if="$route.query.createBy === userData.username || administrators"
|
||||
v-has="'split:sarFileSplitItems:template'">
|
||||
<a-icon type="download" />
|
||||
{{ $t('templateDownload') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleMergeManage"
|
||||
v-if="$route.query.createBy === userData.username || administrators"
|
||||
v-has="'split:sarFileSplitItems:merge'">
|
||||
<a-icon type="snippets" />
|
||||
{{ $t('docTool.split.mergerClause') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleManage"
|
||||
v-if="$route.query.createBy === userData.username || administrators"
|
||||
v-has="'split:sarFileSplitItems:set'">
|
||||
<a-icon type="setting" />
|
||||
{{ $t('docTool.split.batchSetting') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleBatCancel"
|
||||
v-if="$route.query.createBy === userData.username || administrators"
|
||||
v-has="'split:sarFileSplitItems:delete'">
|
||||
<a-icon type="delete" />
|
||||
{{ $t('batchDelete') }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="split-detail-table">
|
||||
<table-data
|
||||
ref="splitDetailTable"
|
||||
:url="url"
|
||||
:flag="'4'"
|
||||
:operationList="operationList"
|
||||
:infoId="$route.query.infoId"
|
||||
:menuId="menuId"
|
||||
:showAction="$route.query.createBy === userData.username || administrators ? true :false"
|
||||
@onSelectChange="onSelectChange"
|
||||
@deleteClick="deleteClick"
|
||||
@editClick="editClick"
|
||||
@showContent="showContent"
|
||||
></table-data>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 条款详情 -->
|
||||
<a-modal
|
||||
:title="$t('docTool.split.clauseContent')"
|
||||
:visible="contentVisible"
|
||||
:confirm-loading="confirmLoading"
|
||||
:footer="false"
|
||||
@cancel="handleCancel"
|
||||
>
|
||||
<p v-html="contentValue"></p>
|
||||
</a-modal>
|
||||
<!-- 添加节点 -->
|
||||
<a-modal
|
||||
class="add-menus"
|
||||
:title="menuTitle"
|
||||
:visible="menuRightVisible"
|
||||
:confirm-loading="confirmLoading"
|
||||
@cancel="handleCancelMenuRight"
|
||||
@ok="hideModalMenuRight"
|
||||
>
|
||||
<a-form-model
|
||||
v-if="menuRightVisible"
|
||||
class="split-click-right-form"
|
||||
ref="ruleForm"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
:label-col="labelCol"
|
||||
:wrapper-col="wrapperCol"
|
||||
>
|
||||
<a-form-model-item :label="$t('docTool.split.clauseNo')" prop="name">
|
||||
<a-input class="box-input" v-model="form.name" :placeholder="$t('PleaseEnter')+$t('clauseNo')" :maxLength="200" />
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :label="$t('docTool.split.clauseName')" prop="itemName">
|
||||
<a-input class="box-input" v-model="form.itemName" :placeholder="$t('PleaseEnter')+$t('clauseName')" :maxLength="200" />
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :label="$t('serialNumber')" prop="displaySeq">
|
||||
<a-input-number v-model="form.displaySeq" :min="1" :max="99999"
|
||||
class="box-input"
|
||||
:placeholder="$t('pleaseEnter')+$t('serialNumber')"
|
||||
:formatter="limitNumber"
|
||||
:parser="limitNumber" style="width: 100%" />
|
||||
</a-form-model-item>
|
||||
</a-form-model>
|
||||
</a-modal>
|
||||
<!-- 批量设置弹框 -->
|
||||
<a-modal
|
||||
class="show-setting"
|
||||
:title="$t('docTool.split.batchSetting')"
|
||||
:visible="batSetVisible"
|
||||
:confirm-loading="confirmLoading"
|
||||
@ok="modalOk"
|
||||
@cancel="batSetCancel"
|
||||
style="width: 1000px;height: auto"
|
||||
>
|
||||
<add-form
|
||||
ref="fileForm"
|
||||
@submitFormData="submitFormData"
|
||||
:flag="'4'"
|
||||
v-if="batSetVisible&&ids"
|
||||
:url="urlBatSet">
|
||||
</add-form>
|
||||
</a-modal>
|
||||
<split-add-form ref="splitForm" :formTitle="formTitle" :flag="'4'"
|
||||
:url="url" :infoId="infoId" :menuId="menuId" :itemId="itemId" @closeVisible="closeVisible"
|
||||
@sumber="sumber"></split-add-form>
|
||||
|
||||
</a-dropdown>
|
||||
</template>
|
||||
</a-tree>
|
||||
</div>
|
||||
</a-card>
|
||||
</div>
|
||||
<div class="div-right">
|
||||
<div class="div-right-wrapper">
|
||||
<div class="right-search-header table-page-search-wrapper">
|
||||
<search :flag="'4'" :url="url" :infoId="$route.query.infoId"
|
||||
:menuId="menuId" @resetSearch="resetSearch" @queryParams="queryParamsValues" />
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div class="operator-text" @click="handleCopyManage"
|
||||
v-if="$route.query.createBy === userData.username || administrators"
|
||||
v-has="'split:sarFileSplitItems:copy'">
|
||||
<a-icon type="copy" />
|
||||
{{ $t('copy') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleAddManage">
|
||||
<!-- v-if="$route.query.createBy === userData.username || administrators"-->
|
||||
<!-- v-has="'split:sarFileSplitItems:add'"-->
|
||||
<a-icon type="plus" />
|
||||
{{ $t('add') }}
|
||||
</div>
|
||||
<div class="operator-text upload-split"
|
||||
v-if="$route.query.createBy === userData.username || administrators"
|
||||
@click="handleImportManage" v-has="'split:sarFileSplitItems:import'">
|
||||
<a-icon type="import" :rotate="-90" v-if="uploadMenuId === undefined || uploadMenuId === ''" />
|
||||
{{ (uploadMenuId === '' || uploadMenuId === undefined) ? $t('import') : '' }}
|
||||
<upload v-if="menuId" ref="uploadSplit" :infoId="infoId" :menuId="uploadMenuId"
|
||||
@uploadSuccess="uploadSuccess"></upload>
|
||||
</div>
|
||||
<div class="operator-text" @click="handleExportManage"
|
||||
v-has="'split:sarFileSplitItems:export'">
|
||||
<a-icon type="export" :rotate="-90" />
|
||||
{{ $t('export') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleDownManage"
|
||||
v-if="$route.query.createBy === userData.username || administrators"
|
||||
v-has="'split:sarFileSplitItems:template'">
|
||||
<a-icon type="download" />
|
||||
{{ $t('templateDownload') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleMergeManage"
|
||||
v-if="$route.query.createBy === userData.username || administrators"
|
||||
v-has="'split:sarFileSplitItems:merge'">
|
||||
<a-icon type="snippets" />
|
||||
{{ $t('docTool.split.mergerClause') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleManage"
|
||||
v-if="$route.query.createBy === userData.username || administrators"
|
||||
v-has="'split:sarFileSplitItems:set'">
|
||||
<a-icon type="setting" />
|
||||
{{ $t('docTool.split.batchSetting') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleBatCancel"
|
||||
v-if="$route.query.createBy === userData.username || administrators"
|
||||
v-has="'split:sarFileSplitItems:delete'">
|
||||
<a-icon type="delete" />
|
||||
{{ $t('batchDelete') }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="split-detail-table">
|
||||
<table-data
|
||||
ref="splitDetailTable"
|
||||
:url="url"
|
||||
:flag="'4'"
|
||||
:operationList="operationList"
|
||||
:infoId="$route.query.infoId"
|
||||
:menuId="menuId"
|
||||
:showAction="$route.query.createBy === userData.username || administrators ? true :false"
|
||||
@onSelectChange="onSelectChange"
|
||||
@deleteClick="deleteClick"
|
||||
@editClick="editClick"
|
||||
@showContent="showContent"
|
||||
></table-data>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 条款详情 -->
|
||||
<a-modal
|
||||
:title="$t('docTool.split.clauseContent')"
|
||||
:visible="contentVisible"
|
||||
:confirm-loading="confirmLoading"
|
||||
:footer="false"
|
||||
@cancel="handleCancel"
|
||||
>
|
||||
<p v-html="contentValue"></p>
|
||||
</a-modal>
|
||||
<!-- 添加节点 -->
|
||||
<a-modal
|
||||
class="add-menus"
|
||||
:title="menuTitle"
|
||||
:visible="menuRightVisible"
|
||||
:confirm-loading="confirmLoading"
|
||||
@cancel="handleCancelMenuRight"
|
||||
@ok="hideModalMenuRight"
|
||||
>
|
||||
<a-form-model
|
||||
v-if="menuRightVisible"
|
||||
class="split-click-right-form"
|
||||
ref="ruleForm"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
:label-col="labelCol"
|
||||
:wrapper-col="wrapperCol"
|
||||
>
|
||||
<a-form-model-item :label="$t('docTool.split.clauseNo')" prop="name">
|
||||
<a-input class="box-input" v-model="form.name" :placeholder="$t('PleaseEnter')+$t('clauseNo')" :maxLength="200" />
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :label="$t('docTool.split.clauseName')" prop="itemName">
|
||||
<a-input class="box-input" v-model="form.itemName" :placeholder="$t('PleaseEnter')+$t('clauseName')" :maxLength="200" />
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :label="$t('serialNumber')" prop="displaySeq">
|
||||
<a-input-number v-model="form.displaySeq" :min="1" :max="99999"
|
||||
class="box-input"
|
||||
:placeholder="$t('pleaseEnter')+$t('serialNumber')"
|
||||
:formatter="limitNumber"
|
||||
:parser="limitNumber" style="width: 100%" />
|
||||
</a-form-model-item>
|
||||
</a-form-model>
|
||||
</a-modal>
|
||||
<!-- 批量设置弹框 -->
|
||||
<a-modal
|
||||
class="show-setting"
|
||||
:title="$t('docTool.split.batchSetting')"
|
||||
:visible="batSetVisible"
|
||||
:confirm-loading="confirmLoading"
|
||||
@ok="modalOk"
|
||||
@cancel="batSetCancel"
|
||||
style="width: 1000px;height: auto"
|
||||
>
|
||||
<add-form
|
||||
ref="fileForm"
|
||||
@submitFormData="submitFormData"
|
||||
:flag="'4'"
|
||||
v-if="batSetVisible&&ids"
|
||||
:url="urlBatSet">
|
||||
</add-form>
|
||||
</a-modal>
|
||||
<split-add-form ref="splitForm" :formTitle="formTitle" :flag="'4'"
|
||||
:url="url" :infoId="infoId" :menuId="menuId" :itemId="itemId" @closeVisible="closeVisible"
|
||||
@sumber="sumber"></split-add-form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -218,7 +214,9 @@ import TableData from '@/components/customField/TableData'
|
||||
import AddForm from '@/components/customField/AddForm'
|
||||
import Vue from 'vue'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import mapGetters from 'vuex'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { postAction, getAction, putAction, downloadFile } from '@/api/manage'
|
||||
import moment from 'moment'
|
||||
|
||||
export default {
|
||||
name: 'SplitDetail',
|
||||
@@ -656,45 +654,22 @@ export default {
|
||||
this.$confirm({
|
||||
title: this.$t('confirmReplication'),
|
||||
content: '',
|
||||
onOk:
|
||||
async () => {
|
||||
axios({
|
||||
url: '/jero-boot/split/sarFileSplitItems/batchCopyItems',
|
||||
method: 'get',
|
||||
params: params,
|
||||
// transformRequest: [function (data) {
|
||||
// // Do whatever you want to transform the data
|
||||
// let ret = ''
|
||||
// for (let it in data) {
|
||||
// ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
|
||||
// }
|
||||
// return ret
|
||||
// }],
|
||||
headers: {
|
||||
// 'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'X-Access-Token': this.token
|
||||
onOk: () => {
|
||||
getAction('/split/sarFileSplitItems/batchCopyItems', params).then((res) => {
|
||||
if (res.data.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.selectClear()
|
||||
// this.loadData()
|
||||
this.loadMenuData()
|
||||
const queryParam = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId
|
||||
}
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.data.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.$emit('selectClear')
|
||||
this.selectClear()
|
||||
// this.loadData()
|
||||
this.loadMenuData()
|
||||
const queryParam = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId
|
||||
|
||||
}
|
||||
this.$refs.splitDetailTable.$emit('searchGetData', JSON.parse(JSON.stringify(queryParam)))
|
||||
// eventBUs.$emit('searchReset')
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
},
|
||||
onCancel () {
|
||||
this.$refs.splitDetailTable.$emit('searchGetData', JSON.parse(JSON.stringify(queryParam)))
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
} else if (menuIds.length === 0) {
|
||||
@@ -791,35 +766,23 @@ export default {
|
||||
this.$confirm({
|
||||
title: this.$t('docTool.split.mergeTerms'),
|
||||
content: '',
|
||||
onOk:
|
||||
async () => {
|
||||
axios({
|
||||
url: '/jero-boot/split/sarFileSplitItems/batchMergeItems',
|
||||
method: 'get',
|
||||
params: {
|
||||
ids: ids
|
||||
},
|
||||
headers: {
|
||||
'X-Access-Token': this.token
|
||||
onOk: () => {
|
||||
getAction('/split/sarFileSplitItems/batchMergeItems', { ids: ids }).then(res => {
|
||||
if (res.data.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.selectClear()
|
||||
this.loadMenuData()
|
||||
const queryParam = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId
|
||||
}
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.data.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.selectClear()
|
||||
this.loadMenuData()
|
||||
const queryParam = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId
|
||||
|
||||
}
|
||||
this.$refs.splitDetailTable.$emit('searchGetData', JSON.parse(JSON.stringify(queryParam)))
|
||||
this.selectedRowKeys = []
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
this.$refs.splitDetailTable.$emit('searchGetData', JSON.parse(JSON.stringify(queryParam)))
|
||||
this.selectedRowKeys = []
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -848,28 +811,20 @@ export default {
|
||||
url = this.url.addInfo
|
||||
}
|
||||
formInline.ids = this.ids
|
||||
axios({
|
||||
url: url,
|
||||
method: 'post',
|
||||
data: formInline,
|
||||
headers: {
|
||||
'X-Access-Token': this.token
|
||||
postAction(url, formInline).then((res) => {
|
||||
if (res.data.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.batSetVisible = false
|
||||
this.selectClear()
|
||||
const queryParam = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId
|
||||
}
|
||||
this.$refs.splitDetailTable.$emit('searchGetData', JSON.parse(JSON.stringify(queryParam)))
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.data.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.batSetVisible = false
|
||||
this.selectClear()
|
||||
const queryParam = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId
|
||||
}
|
||||
this.$refs.splitDetailTable.$emit('searchGetData', JSON.parse(JSON.stringify(queryParam)))
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
},
|
||||
// 批量删除
|
||||
handleBatCancel () {
|
||||
@@ -880,46 +835,22 @@ export default {
|
||||
this.$confirm({
|
||||
title: this.$t('confirmBatchDeletion'),
|
||||
content: '',
|
||||
onOk:
|
||||
async () => {
|
||||
axios({
|
||||
url: '/jero-boot/split/sarFileSplitItems/batchDeleteItems',
|
||||
method: 'post',
|
||||
data: params,
|
||||
transformRequest: [function (data) {
|
||||
// Do whatever you want to transform the data
|
||||
let ret = ''
|
||||
for (const it in data) {
|
||||
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
|
||||
}
|
||||
return ret
|
||||
}],
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'X-Access-Token': this.token
|
||||
onOk: () => {
|
||||
postAction('/split/sarFileSplitItems/batchDeleteItems', params).then((res) => {
|
||||
if (res.data.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.loadMenuData()
|
||||
const queryParam = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId
|
||||
}
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.data.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.loadMenuData()
|
||||
const queryParam = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId
|
||||
|
||||
}
|
||||
this.$refs.splitDetailTable.$emit('searchGetData', JSON.parse(JSON.stringify(queryParam)))
|
||||
this.selectClear()
|
||||
// eventBUs.$emit('searchReset')
|
||||
} else {
|
||||
this.$message.warning(res.data.message)
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error)
|
||||
})
|
||||
},
|
||||
onCancel () {
|
||||
this.$refs.splitDetailTable.$emit('searchGetData', JSON.parse(JSON.stringify(queryParam)))
|
||||
this.selectClear()
|
||||
// eventBUs.$emit('searchReset')
|
||||
} else {
|
||||
this.$message.warning(res.data.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
@@ -950,44 +881,21 @@ export default {
|
||||
this.$confirm({
|
||||
title: this.$t('areYouSure'),
|
||||
content: '',
|
||||
onOk:
|
||||
async () => {
|
||||
axios({
|
||||
url: '/jero-boot/split/sarFileSplitItems/batchDeleteItems',
|
||||
method: 'post',
|
||||
data: params,
|
||||
transformRequest: [function (data) {
|
||||
// Do whatever you want to transform the data
|
||||
let ret = ''
|
||||
for (const it in data) {
|
||||
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
|
||||
}
|
||||
return ret
|
||||
}],
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'X-Access-Token': this.token
|
||||
}
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.data.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.loadMenuData()
|
||||
const queryParam = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId
|
||||
onOk: () => {
|
||||
postAction('/split/sarFileSplitItems/batchDeleteItems', params).then((res) => {
|
||||
if (res.data.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.loadMenuData()
|
||||
const queryParam = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId
|
||||
|
||||
}
|
||||
this.$refs.splitDetailTable.$emit('searchGetData', JSON.parse(JSON.stringify(queryParam)))
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error)
|
||||
})
|
||||
},
|
||||
onCancel () {
|
||||
}
|
||||
this.$refs.splitDetailTable.$emit('searchGetData', JSON.parse(JSON.stringify(queryParam)))
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -1110,89 +1018,6 @@ export default {
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.split-detail {
|
||||
/*height: 100% !important;*/
|
||||
|
||||
.split-detail-wrap {
|
||||
/*display: flex;*/
|
||||
/*justify-content: space-between;*/
|
||||
|
||||
.split-detail-left {
|
||||
/*height: 100%;*/
|
||||
width: 230px;
|
||||
float: left;
|
||||
padding-right: 20px;
|
||||
/*border-right: 1px solid #E6E7EC;*/
|
||||
overflow-y: auto;
|
||||
|
||||
.split-detail-left-tree {
|
||||
|
||||
}
|
||||
|
||||
.menu-item {
|
||||
padding: 2px 8px;
|
||||
border: 1px solid #000000;
|
||||
border-bottom: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.menu-bottom {
|
||||
border-bottom: 1px solid #000000;
|
||||
}
|
||||
|
||||
.menu-item:hover {
|
||||
background: #00B3BE;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
.split-detail-right {
|
||||
padding-left: 20px;
|
||||
width: calc(100% - 230px);
|
||||
float: right;
|
||||
border-left: 1px solid #E6E7EC;
|
||||
/*flex: 1;*/
|
||||
|
||||
.split-detail-search-header {
|
||||
margin-bottom: 20px;
|
||||
|
||||
.table-page-search-submitButtons {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
.split-detail-table {
|
||||
.action-edit {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.content-show {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 3;
|
||||
-webkit-box-orient: vertical;
|
||||
height: 60px;
|
||||
line-height: 20px;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.page {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
.split-item {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
.page {
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .ant-table-body {
|
||||
overflow: hidden !important;
|
||||
}
|
||||
@@ -1205,39 +1030,6 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.split-detail-right-wraper {
|
||||
.table-page-search-submitButtons {
|
||||
.ant-col-md-6 {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
.split-detail-search-header {
|
||||
.ant-col-sm-8 {
|
||||
min-width: 300px;
|
||||
}
|
||||
|
||||
.ant-select-selection--multiple {
|
||||
ul {
|
||||
height: 36px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.upload-split {
|
||||
.ant-upload {
|
||||
color: #040B29;
|
||||
|
||||
}
|
||||
|
||||
.anticon-import {
|
||||
display: inline-block;
|
||||
margin-right: 3px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.show-setting {
|
||||
.ant-modal {
|
||||
min-width: 700px;
|
||||
@@ -1256,44 +1048,6 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.split-detail-left {
|
||||
|
||||
.ant-tree-node-content-wrapper-normal {
|
||||
|
||||
}
|
||||
|
||||
ant-tree-node-content-wrapper {
|
||||
.expand-title {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.ant-tree-title {
|
||||
span {
|
||||
//display: block;
|
||||
width: auto;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.ant-tree-child-tree {
|
||||
.ant-tree-title {
|
||||
span {
|
||||
//display: block;
|
||||
width: auto;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media screen and (min-width: 600px) and (max-width: 1600px) {
|
||||
.operator-text {
|
||||
margin-right: 20px !important;
|
||||
|
||||
Reference in New Issue
Block a user