【update】标签管理优化 + 文档拆分查看代码修改接口
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
NODE_ENV=production
|
NODE_ENV=production
|
||||||
VUE_APP_PLATFORM_NAME=JeroBoot 企业级快速开发平台
|
VUE_APP_PLATFORM_NAME=JeroBoot 企业级快速开发平台
|
||||||
VUE_APP_SSO=false
|
VUE_APP_SSO=false
|
||||||
|
VUE_TAG_FLAG=0
|
||||||
+2
-1
@@ -1 +1,2 @@
|
|||||||
NODE_ENV=development
|
NODE_ENV=development
|
||||||
|
VUE_APP_TAG_FLAG=0
|
||||||
+2
-1
@@ -1 +1,2 @@
|
|||||||
NODE_ENV=production
|
NODE_ENV=production
|
||||||
|
VUE_APP_TAG_FLAG=1
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
NODE_ENV=production
|
NODE_ENV=production
|
||||||
VUE_APP_API_BASE_URL=http://boot.jero.com:8080/laws-sinotruk
|
VUE_APP_API_BASE_URL=http://boot.jero.com:8080/laws-sinotruk
|
||||||
VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas
|
VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas
|
||||||
VUE_APP_ONLINE_BASE_URL=http://fileview.jero.com/onlinePreview
|
VUE_APP_ONLINE_BASE_URL=http://fileview.jero.com/onlinePreview
|
||||||
|
VUE_APP_TAG_FLAG=1
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
// 本地工具-即文档功能对应的接口
|
||||||
|
|
||||||
|
import { getAction } from './manage'
|
||||||
|
|
||||||
|
// 文档拆分-获取查询条件-todo 全部需要修改接口
|
||||||
|
const getDocumentSplitSearchForm = (params) => getAction('/split/sarFileSplitInfo/queryCondition', params)
|
||||||
|
// 文档拆分-获取表单模型
|
||||||
|
const getDocumentSplitFormModal = (params) => getAction('/laws/standard/domestic/getFormModel', params)
|
||||||
|
// 文档拆分-获取信息
|
||||||
|
const getDocumentSplitDocumentInfo = (params) => getAction('/laws/standard/domestic/getByIdAndModule', params)
|
||||||
|
// 文档拆分-获取表头信息
|
||||||
|
const getDocumentSplitTableHeader = (params) => getAction('/split/sarFileSplitInfo/getHeader', params)
|
||||||
|
|
||||||
|
export {
|
||||||
|
// 文档拆分
|
||||||
|
getDocumentSplitSearchForm,
|
||||||
|
getDocumentSplitFormModal,
|
||||||
|
getDocumentSplitDocumentInfo,
|
||||||
|
getDocumentSplitTableHeader
|
||||||
|
|
||||||
|
}
|
||||||
@@ -7,7 +7,16 @@
|
|||||||
<a-radio-button v-for="(item, key) in dictOptions" :key="key" :value="item.value">{{ item.text }}</a-radio-button>
|
<a-radio-button v-for="(item, key) in dictOptions" :key="key" :value="item.value">{{ item.text }}</a-radio-button>
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
|
|
||||||
<a-select v-else-if="tagType==='select'" :getPopupContainer = "getPopupContainer" :placeholder="placeholder" :disabled="disabled" :value="getValueSting" @change="handleInput">
|
<a-select
|
||||||
|
v-else-if="tagType==='select'"
|
||||||
|
:getPopupContainer = "getPopupContainer"
|
||||||
|
:placeholder="placeholder"
|
||||||
|
:disabled="disabled"
|
||||||
|
:value="getValueSting"
|
||||||
|
show-search
|
||||||
|
:filter-option="filterOption"
|
||||||
|
@change="handleInput"
|
||||||
|
>
|
||||||
<a-select-option :value="undefined">请选择</a-select-option>
|
<a-select-option :value="undefined">请选择</a-select-option>
|
||||||
<a-select-option v-for="(item, key) in dictOptions" :key="key" :value="item.value">
|
<a-select-option v-for="(item, key) in dictOptions" :key="key" :value="item.value">
|
||||||
<span style="display: inline-block;width: 100%" :title=" item.text || item.label ">
|
<span style="display: inline-block;width: 100%" :title=" item.text || item.label ">
|
||||||
@@ -63,6 +72,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
filterOption (input, option) {
|
||||||
|
const text = option.componentOptions.children[0].text || option.componentOptions.children[0].data.attrs.title
|
||||||
|
return text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||||
|
},
|
||||||
initDictData () {
|
initDictData () {
|
||||||
// 优先从缓存中读取字典配置
|
// 优先从缓存中读取字典配置
|
||||||
if (getDictItemsFromCache(this.dictCode)) {
|
if (getDictItemsFromCache(this.dictCode)) {
|
||||||
|
|||||||
@@ -4,18 +4,18 @@
|
|||||||
<search flag="3" :url="url"/>
|
<search flag="3" :url="url"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-operator">
|
<div class="table-operator">
|
||||||
<!-- v-has="'split:sarFileSplitInfo:splitFile'"-->
|
<!-- -->
|
||||||
<div class="operator-text" @click="handleModule">
|
<div class="operator-text" @click="handleModule" v-has="'split:sarFileSplitInfo:splitFile'">
|
||||||
<a-icon type="plus"/>
|
<a-icon type="plus"/>
|
||||||
{{ $t('docTool.split.splitText') }}
|
{{ $t('docTool.split.splitText') }}
|
||||||
</div>
|
</div>
|
||||||
<!-- v-has="'split:sarFileSplitInfo:splitResult'"-->
|
<!-- -->
|
||||||
<div class="operator-text" @click="handleExport">
|
<div class="operator-text" @click="handleExport" v-has="'split:sarFileSplitInfo:splitResult'">
|
||||||
<a-icon type="import" :rotate="-90"/>
|
<a-icon type="import" :rotate="-90"/>
|
||||||
{{ $t('docTool.split.importResults') }}
|
{{ $t('docTool.split.importResults') }}
|
||||||
</div>
|
</div>
|
||||||
<!-- v-has="'split:sarFileSplitInfo:deleteBatch'"-->
|
<!-- -->
|
||||||
<div class="operator-text" @click="handleDel">
|
<div class="operator-text" @click="handleDel" v-has="'split:sarFileSplitInfo:deleteBatch'">
|
||||||
<a-icon type="delete"/>
|
<a-icon type="delete"/>
|
||||||
{{ $t('batchDelete') }}
|
{{ $t('batchDelete') }}
|
||||||
</div>
|
</div>
|
||||||
@@ -37,10 +37,8 @@
|
|||||||
{{ operation.text }}
|
{{ operation.text }}
|
||||||
</a>
|
</a>
|
||||||
<a-divider v-if="operationList.length >= operateMaxNum" type="vertical" />
|
<a-divider v-if="operationList.length >= operateMaxNum" type="vertical" />
|
||||||
<a-dropdown v-if="operationList.length >= operateMaxNum">
|
<a-dropdown placement="bottomCenter">
|
||||||
<a class="ant-dropdown-link">
|
<a-icon type="more" class="operate-icon-btn operate-icon-more" />
|
||||||
{{ $t('more') }} <a-icon type="down"/>
|
|
||||||
</a>
|
|
||||||
<a-menu slot="overlay">
|
<a-menu slot="overlay">
|
||||||
<a-menu-item v-for="(operation, index) in operationList.slice(operateMaxNum)" :key="index">
|
<a-menu-item v-for="(operation, index) in operationList.slice(operateMaxNum)" :key="index">
|
||||||
<a @click="operationClick(operation,record)">
|
<a @click="operationClick(operation,record)">
|
||||||
@@ -75,6 +73,7 @@ import SplitText from './modules/SplitText'
|
|||||||
import ImportResult from './modules/ImportResult'
|
import ImportResult from './modules/ImportResult'
|
||||||
import { httpAction, getAction } from '@/api/manage'
|
import { httpAction, getAction } from '@/api/manage'
|
||||||
import { ConfigurableTableMixin } from '@/mixins/ConfigurableTableMixin'
|
import { ConfigurableTableMixin } from '@/mixins/ConfigurableTableMixin'
|
||||||
|
import { getDocumentSplitSearchForm, getDocumentSplitTableHeader } from '../../api/documentToolApi'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DocumentSplit',
|
name: 'DocumentSplit',
|
||||||
@@ -84,26 +83,31 @@ export default {
|
|||||||
return {
|
return {
|
||||||
selectedRowKeys: [],
|
selectedRowKeys: [],
|
||||||
operationList: [
|
operationList: [
|
||||||
// 回传至文档库
|
|
||||||
{
|
|
||||||
text: this.$t('docTool.split.backDocument'),
|
|
||||||
clickEvent: 'backDocument'
|
|
||||||
},
|
|
||||||
// 查看
|
// 查看
|
||||||
{
|
{
|
||||||
text: this.$t('view'),
|
text: this.$t('view'),
|
||||||
clickEvent: 'detailClick'
|
clickEvent: 'detailClick',
|
||||||
|
has: ''
|
||||||
|
},
|
||||||
|
// 回传至文档库
|
||||||
|
{
|
||||||
|
text: this.$t('docTool.split.backDocument'),
|
||||||
|
clickEvent: 'backDocument',
|
||||||
|
has: ''
|
||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
{
|
{
|
||||||
text: this.$t('delete'),
|
text: this.$t('delete'),
|
||||||
clickEvent: 'deleteDetail'
|
clickEvent: 'deleteDetail',
|
||||||
|
has: ''
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
getTableHeaderFunc: getDocumentSplitTableHeader,
|
||||||
|
getQueryConditionFunc: getDocumentSplitSearchForm,
|
||||||
url: {
|
url: {
|
||||||
// tableHeader: '/split/sarFileSplitInfo/getHeader', // 表格头部字段
|
// tableHeader: '/split/sarFileSplitInfo/getHeader', // 表格头部字段
|
||||||
searchList: '/split/sarFileSplitInfo/queryCondition', // 搜索字段
|
// searchList: '/split/sarFileSplitInfo/queryCondition', // 搜索字段
|
||||||
// list: '/split/sarFileSplitInfo/page', // 表格数据
|
list: '/split/sarFileSplitInfo/page', // 表格数据
|
||||||
deleteBatch: '', // 批量删除
|
deleteBatch: '', // 批量删除
|
||||||
deleteUrl: '',
|
deleteUrl: '',
|
||||||
backDocument: '' // 回传至文档库
|
backDocument: '' // 回传至文档库
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
<a-divider dashed />
|
<a-divider dashed />
|
||||||
<!--所属模块-->
|
<!--所属模块-->
|
||||||
<a-form-model-item :label="$t('system.tag.module')" prop="isModel">
|
<a-form-model-item :label="$t('system.tag.module')" prop="isModel">
|
||||||
<a-select :placeholder="$t('pleaseSelect') + $t('system.tag.module')" disabled v-model="form.isModel">
|
<a-select :placeholder="$t('pleaseSelect') + $t('system.tag.module')" disabled v-model="form.isModel" show-search :filter-option="filterOption">
|
||||||
<a-select-option v-for="item in moduleArr" :key="item.value" :value="item.value">
|
<a-select-option v-for="item in moduleArr" :key="item.value" :value="item.value">
|
||||||
{{ translate(item.langKey) }}
|
{{ translate(item.langKey) }}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
@@ -69,7 +69,12 @@
|
|||||||
<!--选项内容-->
|
<!--选项内容-->
|
||||||
<a-form-model-item v-if="isTagContent" :label="$t('system.tag.optionContent')" prop="dictId" key="dictId">
|
<a-form-model-item v-if="isTagContent" :label="$t('system.tag.optionContent')" prop="dictId" key="dictId">
|
||||||
<template>
|
<template>
|
||||||
<a-select :placeholder="$t('pleaseSelect') + $t('system.tag.optionContent')" v-model="form.dictId">
|
<a-select
|
||||||
|
:placeholder="$t('pleaseSelect') + $t('system.tag.optionContent')"
|
||||||
|
v-model="form.dictId"
|
||||||
|
show-search
|
||||||
|
:filter-option="filterOption"
|
||||||
|
>
|
||||||
<a-select-option v-for="item in contentOption" :key="item.id" :value="item.id">
|
<a-select-option v-for="item in contentOption" :key="item.id" :value="item.id">
|
||||||
{{ item.dictName }}
|
{{ item.dictName }}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
@@ -238,12 +243,16 @@ export default {
|
|||||||
},
|
},
|
||||||
add () {
|
add () {
|
||||||
this.edit({
|
this.edit({
|
||||||
isModel: this.type
|
isModel: this.type,
|
||||||
|
fieldMustInput: 1,
|
||||||
|
isShowList: 1,
|
||||||
|
isQuery: 1
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
edit (record) {
|
edit (record) {
|
||||||
this.$refs.editForm && this.$refs.editForm.resetFields()
|
this.$refs.editForm && this.$refs.editForm.resetFields()
|
||||||
this.form = Object.assign({}, record)
|
this.form = Object.assign({}, record)
|
||||||
|
this.form.isModel = 4
|
||||||
this.isEdit = !!this.form.id
|
this.isEdit = !!this.form.id
|
||||||
this.initData()
|
this.initData()
|
||||||
this.visible = true
|
this.visible = true
|
||||||
@@ -363,6 +372,10 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
filterOption (input, option) {
|
||||||
|
const text = option.componentOptions.children[0].text || option.componentOptions.children[0].data.attrs.title
|
||||||
|
return text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,6 +40,8 @@
|
|||||||
v-model="model.parentId"
|
v-model="model.parentId"
|
||||||
:placeholder="$t('pleaseSelect')"
|
:placeholder="$t('pleaseSelect')"
|
||||||
allowClear
|
allowClear
|
||||||
|
showSearch
|
||||||
|
tree-node-filter-prop="title"
|
||||||
>
|
>
|
||||||
</a-tree-select>
|
</a-tree-select>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ export default {
|
|||||||
/* 排序参数--按照排序字段失序 */
|
/* 排序参数--按照排序字段失序 */
|
||||||
isorter: {
|
isorter: {
|
||||||
column: 'sortOrder',
|
column: 'sortOrder',
|
||||||
order: 'ascend'
|
order: 'asc'
|
||||||
},
|
},
|
||||||
// 树形结构对应的接口
|
// 树形结构对应的接口
|
||||||
treeUrl: {
|
treeUrl: {
|
||||||
|
|||||||
@@ -44,17 +44,10 @@
|
|||||||
:scroll="{x: '100%'}"
|
:scroll="{x: '100%'}"
|
||||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||||
@change="handleTableChange">
|
@change="handleTableChange">
|
||||||
<template slot="text" slot-scope="text">
|
<div slot="action" class="table-action" slot-scope="{text, record}">
|
||||||
<a-tooltip overlay-class-name="tooltip-style">
|
<a class="action-edit" @click="handleEdit(record)" v-if="canOpeFlag && record.isReadOnly===0" v-has="'tag:edit'"
|
||||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
|
||||||
<div class="table-text">{{ text || text === 0 ? text : global.emptyLine }}</div>
|
|
||||||
</a-tooltip>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<div slot="action" class="table-action" slot-scope="text, record">
|
|
||||||
<a class="action-edit" @click="handleEdit(record)" v-has="'tag:edit'" v-if="record.isReadOnly===0"
|
|
||||||
>{{ $t('edit') }}</a>
|
>{{ $t('edit') }}</a>
|
||||||
<a class="table-del" v-if="record.isReadOnly===2 || record.isReadOnly===0" v-has="'tag:logicDelete'" @click="handleDelete(record.id)"
|
<a class="table-del" @click="handleDelete(record.id)" v-has="'tag:logicDelete'" v-if="canOpeFlag && (record.isReadOnly===2 || record.isReadOnly===0)"
|
||||||
>{{ $t('delete') }}</a>
|
>{{ $t('delete') }}</a>
|
||||||
</div>
|
</div>
|
||||||
</j-table>
|
</j-table>
|
||||||
@@ -93,44 +86,56 @@ export default {
|
|||||||
filters: {
|
filters: {
|
||||||
isModel: this.type
|
isModel: this.type
|
||||||
},
|
},
|
||||||
|
/* 排序参数 */
|
||||||
|
isorter: {
|
||||||
|
column: 'orderNum',
|
||||||
|
order: 'asc'
|
||||||
|
},
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: this.$t('system.tag.attributeName'),
|
title: this.$t('system.tag.attributeName'),
|
||||||
align: 'left',
|
align: 'left',
|
||||||
width: 100,
|
// width: 100,
|
||||||
dataIndex: 'dbFieldTxt'
|
dataIndex: 'dbFieldTxt',
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('system.tag.attributeNameEnglish'),
|
title: this.$t('system.tag.attributeNameEnglish'),
|
||||||
align: 'left',
|
align: 'left',
|
||||||
width: 100,
|
width: 100,
|
||||||
dataIndex: 'dbFieldEnName'
|
dataIndex: 'dbFieldEnName',
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('system.tag.attributeType'),
|
title: this.$t('system.tag.attributeType'),
|
||||||
align: 'left',
|
align: 'left',
|
||||||
width: 100,
|
width: 100,
|
||||||
dataIndex: 'fieldShowTypeName'
|
dataIndex: 'fieldShowType_dictText',
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('system.tag.fieldLength'),
|
title: this.$t('system.tag.fieldLength'),
|
||||||
align: 'left',
|
align: 'left',
|
||||||
width: 80,
|
width: 80,
|
||||||
dataIndex: 'dbLength'
|
dataIndex: 'dbLength',
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('system.tag.displayOrder'),
|
title: this.$t('system.tag.displayOrder'),
|
||||||
align: 'left',
|
align: 'left',
|
||||||
width: 80,
|
width: 80,
|
||||||
dataIndex: 'orderNum'
|
dataIndex: 'orderNum',
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('operation'),
|
title: this.$t('operation'),
|
||||||
scopedSlots: { customRender: 'action' },
|
scopedSlots: { customRender: 'action' },
|
||||||
align: 'left',
|
align: 'center',
|
||||||
|
fixed: 'right',
|
||||||
width: 170
|
width: 170
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
canOpeFlag: process.env.VUE_APP_TAG_FLAG === '0' // 是否可以操作编辑和删除,开发环境可以
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,9 +58,9 @@
|
|||||||
>
|
>
|
||||||
<!--todo 需要查看下是否有这个字段,并且看一下判断是否必然-->
|
<!--todo 需要查看下是否有这个字段,并且看一下判断是否必然-->
|
||||||
<div slot="action" class="table-action" slot-scope="{text, record}">
|
<div slot="action" class="table-action" slot-scope="{text, record}">
|
||||||
<a class="action-edit" @click="handleEdit(record)" v-if="record.isReadOnly===0" v-has="'tag:edit'"
|
<a class="action-edit" @click="handleEdit(record)" v-if="canOpeFlag && record.isReadOnly===0" v-has="'tag:edit'"
|
||||||
>{{ $t('edit') }}</a>
|
>{{ $t('edit') }}</a>
|
||||||
<a class="table-del" v-if="record.isReadOnly===2 || record.isReadOnly===0" v-has="'tag:logicDelete'" @click="handleDelete(record.id)"
|
<a class="table-del" v-if="canOpeFlag && (record.isReadOnly===2 || record.isReadOnly===0)" v-has="'tag:logicDelete'" @click="handleDelete(record.id)"
|
||||||
>{{ $t('delete') }}</a>
|
>{{ $t('delete') }}</a>
|
||||||
</div>
|
</div>
|
||||||
</j-table>
|
</j-table>
|
||||||
@@ -108,6 +108,11 @@ export default {
|
|||||||
filters: {
|
filters: {
|
||||||
isModel: this.type
|
isModel: this.type
|
||||||
},
|
},
|
||||||
|
/* 排序参数 */
|
||||||
|
isorter: {
|
||||||
|
column: 'orderNum',
|
||||||
|
order: 'asc'
|
||||||
|
},
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: this.$t('system.tag.attributeName'),
|
title: this.$t('system.tag.attributeName'),
|
||||||
@@ -152,7 +157,8 @@ export default {
|
|||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
width: 150
|
width: 150
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
canOpeFlag: process.env.VUE_APP_TAG_FLAG === '0' // 是否可以操作编辑和删除,开发环境可以
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -174,6 +180,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
|
console.log('-----------process.env.VUE_TAG_FLAG--------', process.env)
|
||||||
this.getShowAreaData()
|
this.getShowAreaData()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user