修改文档拆分的权限
This commit is contained in:
@@ -459,7 +459,7 @@ module.exports = {
|
|||||||
gbt: 'GB/T',
|
gbt: 'GB/T',
|
||||||
gso: 'GSO',
|
gso: 'GSO',
|
||||||
batchSetting: '批量设置',
|
batchSetting: '批量设置',
|
||||||
clauseContent: '条文内容',
|
clauseContent: '条款内容',
|
||||||
clauseNo: '条款号',
|
clauseNo: '条款号',
|
||||||
clauseName: '条款名称',
|
clauseName: '条款名称',
|
||||||
selectDirectoryTerms: '请选择添加条款的目录位置',
|
selectDirectoryTerms: '请选择添加条款的目录位置',
|
||||||
|
|||||||
@@ -32,6 +32,9 @@ export const constantRouterMap = [
|
|||||||
{
|
{
|
||||||
path: '/documentTool/StandardSplitSheet',
|
path: '/documentTool/StandardSplitSheet',
|
||||||
name: 'documentTool-StandardSplitSheet',
|
name: 'documentTool-StandardSplitSheet',
|
||||||
|
meta: {
|
||||||
|
title: '标准分解单'
|
||||||
|
},
|
||||||
component: () => import(/* webpackChunkName: "user" */ '@/views/documentTool/documentSplit/StandardSplitSheet')
|
component: () => import(/* webpackChunkName: "user" */ '@/views/documentTool/documentSplit/StandardSplitSheet')
|
||||||
},
|
},
|
||||||
// 新旧拆分单对比
|
// 新旧拆分单对比
|
||||||
@@ -44,19 +47,37 @@ export const constantRouterMap = [
|
|||||||
{
|
{
|
||||||
path: '/documentTool/InitiateComparison',
|
path: '/documentTool/InitiateComparison',
|
||||||
name: 'documentTool-InitiateComparison',
|
name: 'documentTool-InitiateComparison',
|
||||||
|
meta: {
|
||||||
|
title: '新旧拆分单对比-发起比对'
|
||||||
|
},
|
||||||
component: () => import(/* webpackChunkName: "user" */ '@/views/documentTool/documentComparison/InitiateComparison')
|
component: () => import(/* webpackChunkName: "user" */ '@/views/documentTool/documentComparison/InitiateComparison')
|
||||||
},
|
},
|
||||||
// 新旧拆分单对比-文档对比
|
// 新旧拆分单对比-文档对比
|
||||||
{
|
{
|
||||||
path: '/documentTool/DocumentDataComparison',
|
path: '/documentTool/DocumentDataComparison',
|
||||||
name: 'documentTool-DocumentDataComparison',
|
name: 'documentTool-DocumentDataComparison',
|
||||||
|
meta: {
|
||||||
|
title: '新旧拆分单对比-文档对比'
|
||||||
|
},
|
||||||
component: () => import(/* webpackChunkName: "user" */ '@/views/documentTool/documentComparison/DocumentDataComparison')
|
component: () => import(/* webpackChunkName: "user" */ '@/views/documentTool/documentComparison/DocumentDataComparison')
|
||||||
},
|
},
|
||||||
// 新旧拆分单对比-对比结果
|
// 新旧拆分单对比-对比结果
|
||||||
{
|
{
|
||||||
path: '/documentTool/ComparisonResults',
|
path: '/documentTool/ComparisonResults',
|
||||||
name: 'documentTool-ComparisonResults',
|
name: 'documentTool-ComparisonResults',
|
||||||
|
meta: {
|
||||||
|
title: '新旧拆分单对比-对比结果'
|
||||||
|
},
|
||||||
component: () => import(/* webpackChunkName: "user" */ '@/views/documentTool/documentComparison/ComparisonResults')
|
component: () => import(/* webpackChunkName: "user" */ '@/views/documentTool/documentComparison/ComparisonResults')
|
||||||
|
},
|
||||||
|
// 文档拆分详情
|
||||||
|
{
|
||||||
|
path: '/documentTool/DocumentSplitDetail',
|
||||||
|
name: 'documentTool-DocumentSplitDetail',
|
||||||
|
meta: {
|
||||||
|
title: '文档拆分详情'
|
||||||
|
},
|
||||||
|
component: () => import(/* webpackChunkName: "user" */ '@/views/documentTool/documentSplit/DocumentSplitDetail')
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -73,12 +94,6 @@ export const constantRouterMap = [
|
|||||||
// }
|
// }
|
||||||
// ]
|
// ]
|
||||||
// },
|
// },
|
||||||
// 文档拆分详情
|
|
||||||
{
|
|
||||||
path: '/documentTool/DocumentSplitDetail',
|
|
||||||
name: 'documentTool-DocumentSplitDetail',
|
|
||||||
component: () => import(/* webpackChunkName: "user" */ '@/views/documentTool/documentSplit/DocumentSplitDetail')
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: '/404',
|
path: '/404',
|
||||||
component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
|
component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ export const ConfigurableTableMixin = {
|
|||||||
*/
|
*/
|
||||||
searchReset () {
|
searchReset () {
|
||||||
this.searchParams = {}
|
this.searchParams = {}
|
||||||
|
this.queryParam = {}
|
||||||
this.selectedRowKeys = []
|
this.selectedRowKeys = []
|
||||||
this.getTableHeader()
|
this.getTableHeader()
|
||||||
this.loadData(1)
|
this.loadData(1)
|
||||||
|
|||||||
@@ -99,20 +99,12 @@ import { releaseSplitStandard, changePermission, withdraw } from '@api/documentT
|
|||||||
import ImportSplitResultModal from './modules/ImportSplitResultModal.vue'
|
import ImportSplitResultModal from './modules/ImportSplitResultModal.vue'
|
||||||
import UserSelectModal from '../../../components/selection/UserSelectModal.vue'
|
import UserSelectModal from '../../../components/selection/UserSelectModal.vue'
|
||||||
import { SplitStatus, StandardSource } from '@/enums/commonEnums'
|
import { SplitStatus, StandardSource } from '@/enums/commonEnums'
|
||||||
import { mapGetters } from 'vuex'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DocumentSplit',
|
name: 'DocumentSplit',
|
||||||
components: { JTable, SplitText, ImportSplitResultModal, UserSelectModal },
|
components: { JTable, SplitText, ImportSplitResultModal, UserSelectModal },
|
||||||
mixins: [JeroListMixin],
|
mixins: [JeroListMixin],
|
||||||
computed: {
|
computed: {},
|
||||||
...mapGetters(['userInfo']),
|
|
||||||
administrators () {
|
|
||||||
const adminRoleList = window._CONFIG.adminRoleCode.split(',')
|
|
||||||
const userRoleList = this.userInfo.roleCode.split(',')
|
|
||||||
return userRoleList.some(tt => adminRoleList.includes(tt))
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
operationList: [
|
operationList: [
|
||||||
|
|||||||
@@ -66,26 +66,34 @@
|
|||||||
<!--表格部分-->
|
<!--表格部分-->
|
||||||
<div class="page-right-box">
|
<div class="page-right-box">
|
||||||
<div class="table-page-search-wrapper">
|
<div class="table-page-search-wrapper">
|
||||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
<a-form layout="inline" @keyup.enter.native="searchQuery(queryParam)">
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :md="8"
|
<a-col :md="6"
|
||||||
:sm="12"
|
:sm="12"
|
||||||
style="line-height: 48px">
|
style="line-height: 48px">
|
||||||
<a-form-item :label="'条款号'" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item :label="$t('docTool.split.clauseNo')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-input :placeholder="$t('pleaseEnter')+'条款号'"
|
<a-input :placeholder="$t('pleaseEnter') + $t('docTool.split.clauseNo') "
|
||||||
v-model="queryParam.clauseNo"></a-input>
|
v-model="queryParam.item_num"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="8"
|
<a-col :md="6"
|
||||||
:sm="12"
|
:sm="12"
|
||||||
style="line-height: 48px">
|
style="line-height: 48px">
|
||||||
<a-form-item :label="'条款内容'" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item :label="$t('docTool.split.clauseName')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-input :placeholder="$t('pleaseEnter')+'条款内容'"
|
<a-input :placeholder="$t('pleaseEnter') + $t('docTool.split.clauseName') "
|
||||||
v-model="queryParam.clauseContent"></a-input>
|
v-model="queryParam.item_title"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :md="6"
|
||||||
|
:sm="12"
|
||||||
|
style="line-height: 48px">
|
||||||
|
<a-form-item :label="$t('docTool.split.clauseContent') " :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-input :placeholder="$t('pleaseEnter')+$t('docTool.split.clauseContent')"
|
||||||
|
v-model="queryParam.item_content"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<div style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
<div style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
||||||
<a-button icon="search" type="primary" @click="searchQuery" style="margin-left: 8px">
|
<a-button icon="search" type="primary" @click="searchQuery(queryParam)" style="margin-left: 8px">
|
||||||
{{$t('query')}}
|
{{$t('query')}}
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button icon="reload" type="primary" ghost style="margin-left: 8px"
|
<a-button icon="reload" type="primary" ghost style="margin-left: 8px"
|
||||||
@@ -93,16 +101,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-form>
|
</a-form>
|
||||||
<!-- <search ref="searchRef"-->
|
|
||||||
<!-- :url="url"-->
|
|
||||||
<!-- :get-query-condition-func="getQueryConditionFunc"-->
|
|
||||||
<!-- @search="searchQuery"-->
|
|
||||||
<!-- @reset="searchReset" />-->
|
|
||||||
</div>
|
</div>
|
||||||
<!--操作按钮-->
|
<!--操作按钮-->
|
||||||
<div class="table-operator">
|
<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">{{ $t('newlyAdded') }}</a-button>-->
|
||||||
<!--导入-->
|
<!--导入-->
|
||||||
<span @click="handleImport">
|
<span @click="handleImport">
|
||||||
<a-button type="primary" icon="download" ghost v-if="!menuId">{{ $t('import') }}</a-button>
|
<a-button type="primary" icon="download" ghost v-if="!menuId">{{ $t('import') }}</a-button>
|
||||||
@@ -266,19 +269,19 @@ export default {
|
|||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
dataIndex: 'item_num',
|
dataIndex: 'item_num',
|
||||||
title: '条款号',
|
title: this.$t('docTool.split.clauseNo'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 150
|
width: 150
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'item_name',
|
dataIndex: 'item_title',
|
||||||
title: '条款名称',
|
title: this.$t('docTool.split.clauseName'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 150
|
width: 150
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'item_content',
|
dataIndex: 'item_content',
|
||||||
title: '条款内容',
|
title: this.$t('docTool.split.clauseContent'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 150,
|
width: 150,
|
||||||
scopedSlots: { customRender: 'item_content' }
|
scopedSlots: { customRender: 'item_content' }
|
||||||
@@ -300,17 +303,17 @@ export default {
|
|||||||
// 编辑
|
// 编辑
|
||||||
{
|
{
|
||||||
text: this.$t('edit'),
|
text: this.$t('edit'),
|
||||||
clickEvent: 'handleEdit',
|
clickEvent: 'handleEdit'
|
||||||
},
|
},
|
||||||
// 复制
|
// 复制
|
||||||
{
|
{
|
||||||
text: this.$t('copy'),
|
text: this.$t('copy'),
|
||||||
clickEvent: 'handleCopy',
|
clickEvent: 'handleCopy'
|
||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
{
|
{
|
||||||
text: this.$t('delete'),
|
text: this.$t('delete'),
|
||||||
clickEvent: 'handleDelete',
|
clickEvent: 'handleDelete'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
url: {
|
url: {
|
||||||
|
|||||||
@@ -10,163 +10,36 @@
|
|||||||
<div class="custom-drawer-style-scroll">
|
<div class="custom-drawer-style-scroll">
|
||||||
<a-spin :spinning="loading">
|
<a-spin :spinning="loading">
|
||||||
<!--表单部分-->
|
<!--表单部分-->
|
||||||
<a-form-model :model="formInline" v-if="isFormInline" class="form-add" :rules="rules" ref="ruleForm">
|
<a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm">
|
||||||
<div class="form-flex-box">
|
<div class="form-flex-box">
|
||||||
<template v-for="(item, index) in dataList">
|
<div class="box-title-text form-flex-item">
|
||||||
<div :key="index"
|
|
||||||
class="box-title-text form-flex-item"
|
|
||||||
v-if="!hiddenFieldList.includes(item.dbFieldName)">
|
|
||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
<span class="required" v-if="item.fieldMustInput === '1'">*</span>
|
<span class="required">*</span>
|
||||||
<span class="title-text-text" :title="item.dbFieldTxt">{{ item.dbFieldTxt }}</span>
|
<span class="title-text-text" :title="$t('docTool.split.clauseNo')">{{ $t('docTool.split.clauseNo') }}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="item-model" :prop="item.dbFieldName">
|
<a-form-model-item class="item-model" :prop="'item_num'">
|
||||||
<!--条文解读-->
|
<a-input class="box-input"
|
||||||
<template v-if="item.dbFieldName === 'interpretation_articles'">
|
:disabled="disabled"
|
||||||
<div class="unscramble-item"
|
v-model="formInline.item_num"
|
||||||
v-for="(unscramble, unscrambleIndex) in interpretationArticlesList"
|
:maxLength="50"
|
||||||
:key="unscrambleIndex + 'interpretation_articles'">
|
@change="event => event.target.value = event.target.value.trim()"
|
||||||
<div class="unscramble-item-content">
|
:placeholder="$t('pleaseEnter')+$t('docTool.split.clauseNo')"/>
|
||||||
<!--文本-->
|
|
||||||
<a-input type="textarea" :maxLength="500" v-model="unscramble.itemContent" />
|
|
||||||
</div>
|
|
||||||
<div class="unscramble-item-operate">
|
|
||||||
<a-button @click="handleAddUnscramble(unscrambleIndex)" icon='plus'></a-button>
|
|
||||||
<a-button @click="handleDeleteUnscramble(unscrambleIndex, unscramble)" icon='minus'
|
|
||||||
:disabled="interpretationArticlesList.length === 1 && unscrambleIndex === interpretationArticlesList.length - 1">
|
|
||||||
</a-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<!-- 1, 日期单选 -->
|
|
||||||
<a-date-picker v-else-if="item.fieldShowType === FieldType.DATE_SINGLE.value"
|
|
||||||
class="box-input"
|
|
||||||
:placeholder="$t('pleaseSelect')+item.dbFieldTxt + getPlaceholderSuffix(item)"
|
|
||||||
:getCalendarContainer="(trigger) => trigger.parentNode"
|
|
||||||
format="YYYY-MM-DD"
|
|
||||||
value-format="YYYY-MM-DD"
|
|
||||||
v-model="formInline[item.dbFieldName]"
|
|
||||||
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
|
||||||
@change="updateDom"
|
|
||||||
style="width: 100%" />
|
|
||||||
<!-- 2, 单选用户 -->
|
|
||||||
<user-selection v-else-if="item.fieldShowType === FieldType.USER_SINGLE.value"
|
|
||||||
:placeholder="$t('pleaseSelect')+item.dbFieldTxt + getPlaceholderSuffix(item)"
|
|
||||||
v-model="formInline[item.dbFieldName]"
|
|
||||||
:filedName="item.dbFieldName"
|
|
||||||
@nameChange="userSelectNameChange"
|
|
||||||
:nameStr="formInline[item.dbFieldName + '_dictText']"
|
|
||||||
type="radio"
|
|
||||||
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)" />
|
|
||||||
<!-- 3, 单选组织机构 -->
|
|
||||||
<j-select-depart v-else-if="item.fieldShowType === FieldType.ORGAN_SINGLE.value"
|
|
||||||
v-model="formInline[item.dbFieldName]"
|
|
||||||
:backDepart="true" />
|
|
||||||
<!-- 4, 日期多选 -->
|
|
||||||
<j-multiple-date-picker v-else-if="item.fieldShowType === FieldType.DATE_MORE.value"
|
|
||||||
class="box-input"
|
|
||||||
v-model="formInline[item.dbFieldName]"
|
|
||||||
:fieldName="item.dbFieldName"
|
|
||||||
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)" />
|
|
||||||
<!-- 5, 多行文本 -->
|
|
||||||
<a-textarea v-else-if="item.fieldShowType === FieldType.TEXTAREA.value"
|
|
||||||
:placeholder="$t('pleaseEnter')+item.dbFieldTxt + getPlaceholderSuffix(item)"
|
|
||||||
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
|
||||||
:maxLength="500"
|
|
||||||
v-model="formInline[item.dbFieldName]" :rows="4" />
|
|
||||||
<!-- 6, 标准多选 -->
|
|
||||||
<standard-selection v-else-if="item.fieldShowType === FieldType.STANDARD_MORE.value"
|
|
||||||
:source="flag"
|
|
||||||
:disabledSourceSearch="true"
|
|
||||||
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
|
||||||
v-model="formInline[item.dbFieldName]" />
|
|
||||||
<!-- 7, 多选组织机构 -->
|
|
||||||
<j-select-depart v-else-if="item.fieldShowType === FieldType.ORGAN_MORE.value"
|
|
||||||
v-model="formInline[item.dbFieldName]"
|
|
||||||
:multi="true"
|
|
||||||
:backDepart="true"
|
|
||||||
:treeOpera="true" />
|
|
||||||
<!-- 8, 上传文件 -->
|
|
||||||
<a-button v-else-if="item.fieldShowType === FieldType.FILE_UP.value" type="primary" class="button-text"
|
|
||||||
@click="clickButtonToUpload(item)">
|
|
||||||
{{
|
|
||||||
(formInline[item.dbFieldName] === 'null' || formInline[item.dbFieldName] === ''
|
|
||||||
|| formInline[item.dbFieldName] === null || formInline[item.dbFieldName] === undefined)
|
|
||||||
? $t('uploadFile.clickUpload')
|
|
||||||
: $t('uploadFile.viewUploadedFiles')
|
|
||||||
}}
|
|
||||||
</a-button>
|
|
||||||
<!-- 9, 文本框 -->
|
|
||||||
<a-input v-else-if="item.fieldShowType === FieldType.TEXT_BOX.value"
|
|
||||||
class="box-input"
|
|
||||||
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
|
||||||
v-model="formInline[item.dbFieldName]"
|
|
||||||
:maxLength="50"
|
|
||||||
@change="event => event.target.value = event.target.value.trim()"
|
|
||||||
:placeholder="(specialPlaceholder[item.dbFieldName] || $t('pleaseEnter')+item.dbFieldTxt) || + getPlaceholderSuffix(item)" />
|
|
||||||
<!-- 10, 下拉单选(数据字典) -->
|
|
||||||
<j-dict-select-tag v-else-if="item.fieldShowType === FieldType.OPTION_SINGLE.value"
|
|
||||||
class="box-input"
|
|
||||||
v-model="formInline[item.dbFieldName]"
|
|
||||||
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
|
||||||
:placeholder="$t('pleaseSelect')+item.dbFieldTxt + getPlaceholderSuffix(item)"
|
|
||||||
:type="radioDictSelect.includes(item.dbFieldName)? 'radio' : 'select'"
|
|
||||||
:triggerChange="false"
|
|
||||||
@change="updateDom"
|
|
||||||
:dictCode="item.dictField" />
|
|
||||||
<!-- 11, 下拉多选(数据字典) -->
|
|
||||||
<j-multi-select-tag v-else-if="item.fieldShowType === FieldType.OPTION_MORE.value"
|
|
||||||
class="box-input"
|
|
||||||
v-model="formInline[item.dbFieldName]"
|
|
||||||
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
|
||||||
:placeholder="$t('pleaseSelect')+item.dbFieldTxt + getPlaceholderSuffix(item)"
|
|
||||||
:type="'select'"
|
|
||||||
@change="updateDom"
|
|
||||||
:triggerChange="false"
|
|
||||||
:dictCode="item.dictField" />
|
|
||||||
<!-- 12, 树选择 -->
|
|
||||||
<s-tree-select
|
|
||||||
v-else-if="item.fieldShowType === FieldType.TREE.value"
|
|
||||||
v-model="formInline[item.dbFieldName]"
|
|
||||||
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
|
||||||
:tree-data="optionsData[item.dbFieldName]"
|
|
||||||
tree-checkable
|
|
||||||
treeCheckStrictly
|
|
||||||
:label-in-value="false"
|
|
||||||
@change="updateDom"
|
|
||||||
:placeholder="$t('pleaseSelect')+item.dbFieldTxt + getPlaceholderSuffix(item)" />
|
|
||||||
<!-- 14, 年份选择 -->
|
|
||||||
<j-date v-else-if="item.fieldShowType === FieldType.YEAR_PICKER.value"
|
|
||||||
show-type="year"
|
|
||||||
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
|
||||||
v-model="formInline[item.dbFieldName]"
|
|
||||||
:default-value="defaultValue[item.dbFieldName]"
|
|
||||||
date-format="YYYY"
|
|
||||||
:placeholder="$t('pleaseSelect')+item.dbFieldTxt + getPlaceholderSuffix(item)" />
|
|
||||||
<!-- 15, 树选择(单选) -->
|
|
||||||
<s-tree-select v-else-if="item.fieldShowType === FieldType.TREE_SINGLE.value"
|
|
||||||
v-model="formInline[item.dbFieldName]"
|
|
||||||
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
|
||||||
:tree-data="optionsData[item.dbFieldName]"
|
|
||||||
:label-in-value="false"
|
|
||||||
@change="updateDom"
|
|
||||||
:placeholder="$t('pleaseSelect')+item.dbFieldTxt + getPlaceholderSuffix(item)" />
|
|
||||||
<!--16、树形弹框选择-->
|
|
||||||
<tree-selection v-else-if="item.fieldShowType === FieldType.TREE_MODAL_SELECT.value"
|
|
||||||
:placeholder="$t('pleaseSelect')+item.dbFieldTxt + getPlaceholderSuffix(item)"
|
|
||||||
v-model="formInline[item.dbFieldName]"
|
|
||||||
:filedName="item.dbFieldName"
|
|
||||||
type="checkbox"
|
|
||||||
:options-href="item.fieldHref"
|
|
||||||
:nameStr="formInline[item.dbFieldName + '_dictText']"
|
|
||||||
:dict-id="item.dictId"
|
|
||||||
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
|
||||||
:children-column-name="getTreeSelectionChildrenColumnName(item)"
|
|
||||||
:is-tag-library-restriction="item.dbFieldName === 'property_tag'"
|
|
||||||
:search-field-name="item.dbFieldName === 'property_tag' ? 'firstNodeName' : null" />
|
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
|
||||||
|
<div class="box-title-text form-flex-item">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="title-text-text" :title="$t('docTool.split.clauseName')">{{ $t('docTool.split.clauseName') }}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="item-model">
|
||||||
|
<a-input class="box-input"
|
||||||
|
:disabled="disabled"
|
||||||
|
v-model="formInline.item_title"
|
||||||
|
:maxLength="2000"
|
||||||
|
@change="event => event.target.value = event.target.value.trim()"
|
||||||
|
:placeholder="$t('pleaseEnter')+$t('docTool.split.clauseName')"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<upload-file ref="uploadFile" @change="uploadFileChange" :return-url="false"></upload-file>
|
<upload-file ref="uploadFile" @change="uploadFileChange" :return-url="false"></upload-file>
|
||||||
</a-form-model>
|
</a-form-model>
|
||||||
@@ -220,36 +93,22 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import UploadFile from '../../../../components/UploadFile.vue'
|
import UploadFile from '../../../../components/UploadFile.vue'
|
||||||
import StandardSelection from '../../../../components/selection/StandardSelection.vue'
|
|
||||||
// 类型选择弹框
|
// 类型选择弹框
|
||||||
import SplitDetailAddTypeCheck from './SplitDetailAddTypeCheck.vue'
|
import SplitDetailAddTypeCheck from './SplitDetailAddTypeCheck.vue'
|
||||||
import SplitDetailAddTable from './SplitDetailAddTable.vue'
|
import SplitDetailAddTable from './SplitDetailAddTable.vue'
|
||||||
import {
|
import {
|
||||||
getDocSplitEditForm,
|
|
||||||
getDocSplitEditFormData,
|
|
||||||
addClause,
|
addClause,
|
||||||
editClause,
|
editClause,
|
||||||
getEditClauseContent,
|
getEditClauseContent
|
||||||
getInterpretationArticlesList
|
|
||||||
} from '../../../../api/documentToolApi.js'
|
} from '../../../../api/documentToolApi.js'
|
||||||
import UserSelection from '../../../../components/selection/UserSelection.vue'
|
|
||||||
import JMultipleDatePicker from '../../../../components/JMultipleDatePicker.vue'
|
|
||||||
import { ClauseUsableRange, FieldType, TypeOfClauseItem, YesOrNoEnum } from '../../../../enums/commonEnums'
|
import { ClauseUsableRange, FieldType, TypeOfClauseItem, YesOrNoEnum } from '../../../../enums/commonEnums'
|
||||||
import { getAction } from '../../../../api/manage'
|
|
||||||
import { getFormDictTreeList } from '../../../../api/api'
|
|
||||||
import STreeSelect from '../../../../components/STreeSelect'
|
|
||||||
import TreeSelection from '../../../../components/selection/TreeSelection'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SplitAddForm',
|
name: 'SplitAddForm',
|
||||||
components: {
|
components: {
|
||||||
TreeSelection,
|
|
||||||
JMultipleDatePicker, UserSelection,
|
|
||||||
SplitDetailAddTable,
|
SplitDetailAddTable,
|
||||||
UploadFile,
|
UploadFile,
|
||||||
StandardSelection,
|
|
||||||
SplitDetailAddTypeCheck,
|
SplitDetailAddTypeCheck,
|
||||||
STreeSelect
|
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
@@ -269,7 +128,15 @@ export default {
|
|||||||
isFormInline: false,
|
isFormInline: false,
|
||||||
dataList: [],
|
dataList: [],
|
||||||
ruleList: [],
|
ruleList: [],
|
||||||
rules: {},
|
rules: {
|
||||||
|
item_num: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('docTool.split.clauseNo') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'blur'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
uploadName: '',
|
uploadName: '',
|
||||||
type: 'add',
|
type: 'add',
|
||||||
loading: false,
|
loading: false,
|
||||||
@@ -278,7 +145,6 @@ export default {
|
|||||||
itemVal: {},
|
itemVal: {},
|
||||||
contentTrees: '',
|
contentTrees: '',
|
||||||
isTableEdit: false,
|
isTableEdit: false,
|
||||||
interpretationArticlesList: [] // 条文解读数据
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
@@ -299,30 +165,7 @@ export default {
|
|||||||
default: ''
|
default: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {},
|
||||||
// 是否长期有效,是的话新认证实施日期、已认证实施日期、新注册实施日期为多选,否则为单选
|
|
||||||
'formInline.is_long_effect': {
|
|
||||||
handler (value) {
|
|
||||||
const indexArr = []
|
|
||||||
// 新认证实施日期
|
|
||||||
indexArr[0] = this.dataList.findIndex(tt => tt.dbFieldName === 'new_cer_implement_date')
|
|
||||||
// 已认证实施日期
|
|
||||||
indexArr[1] = this.dataList.findIndex(tt => tt.dbFieldName === 'cer_implement_date')
|
|
||||||
// 新注册实施日期
|
|
||||||
indexArr[2] = this.dataList.findIndex(tt => tt.dbFieldName === 'new_register_implement_date')
|
|
||||||
if (value === YesOrNoEnum.YES.value) {
|
|
||||||
indexArr.forEach(index => {
|
|
||||||
this.$set(this.dataList[index], 'fieldShowType', FieldType.DATE_MORE.value)
|
|
||||||
})
|
|
||||||
} else if (value === YesOrNoEnum.NO.value) {
|
|
||||||
indexArr.forEach(index => {
|
|
||||||
this.$set(this.dataList[index], 'fieldShowType', FieldType.DATE_SINGLE.value)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
this.$forceUpdate()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
/**
|
||||||
* 新增
|
* 新增
|
||||||
@@ -332,7 +175,6 @@ export default {
|
|||||||
this.formInline = {}
|
this.formInline = {}
|
||||||
this.contentList = []
|
this.contentList = []
|
||||||
this.type = 'add'
|
this.type = 'add'
|
||||||
this.getForm()
|
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 编辑
|
* 编辑
|
||||||
@@ -342,146 +184,10 @@ export default {
|
|||||||
this.visible = true
|
this.visible = true
|
||||||
this.type = 'edit'
|
this.type = 'edit'
|
||||||
this.itemVal = item
|
this.itemVal = item
|
||||||
this.formInline = {}
|
this.formInline = { ...item }
|
||||||
this.getForm(() => {
|
this.getClauseContentList()
|
||||||
this.loadFormInfo()
|
|
||||||
this.getClauseContentList()
|
|
||||||
this.initInterpretationArticlesList()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 获取表单字段
|
|
||||||
* @param callBack
|
|
||||||
*/
|
|
||||||
getForm (callBack) {
|
|
||||||
this.loading = true
|
|
||||||
const params = {
|
|
||||||
flag: this.flag,
|
|
||||||
type: this.type
|
|
||||||
}
|
|
||||||
getDocSplitEditForm(params).then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
this.dataList = res.result
|
|
||||||
this.ruleList = res.result
|
|
||||||
this.integrateData()
|
|
||||||
this.getOptionsData()
|
|
||||||
callBack && callBack()
|
|
||||||
}
|
|
||||||
}).finally(() => {
|
|
||||||
this.loading = false
|
|
||||||
})
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 处理需要通过接口获取的下拉数据
|
|
||||||
*/
|
|
||||||
getOptionsData () {
|
|
||||||
const formList = Object.values(this.dataList).reduce((acc, cur) => acc.concat(cur), [])
|
|
||||||
formList.forEach(item => {
|
|
||||||
if (item.fieldShowType === FieldType.TREE.value || item.fieldShowType === FieldType.TREE_SINGLE.value) {
|
|
||||||
// 展示类型是树选择,且有接口的
|
|
||||||
if (item.fieldHref) {
|
|
||||||
getAction(item.fieldHref).then(res => {
|
|
||||||
if (res.success) {
|
|
||||||
this.$set(this.optionsData, item.dbFieldName, res.result)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else if (item.dictId) {
|
|
||||||
getFormDictTreeList({ dictId: item.dictId }).then(res => {
|
|
||||||
if (res.success) {
|
|
||||||
this.$set(this.optionsData, item.dbFieldName, res.result)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 设置表单校验信息
|
|
||||||
*/
|
|
||||||
integrateData () {
|
|
||||||
this.isFormInline = false
|
|
||||||
const ruleList = JSON.parse(JSON.stringify(this.ruleList))
|
|
||||||
console.log(this.ruleList)
|
|
||||||
const rules = {}
|
|
||||||
ruleList.forEach((res, index) => {
|
|
||||||
const rule = []
|
|
||||||
if (res.fieldMustInput === '1') {
|
|
||||||
if ([FieldType.TEXT_BOX.value, FieldType.TEXTAREA.value].includes(res.fieldShowType)) {
|
|
||||||
rule.push({
|
|
||||||
required: true,
|
|
||||||
message: res.dbFieldTxt + this.$t('cannotEmpty'),
|
|
||||||
trigger: 'blur'
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
rule.push({
|
|
||||||
required: true,
|
|
||||||
message: res.dbFieldTxt + this.$t('cannotEmpty'),
|
|
||||||
trigger: 'change'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if ([FieldType.TEXT_BOX.value, FieldType.TEXTAREA.value].includes(res.fieldShowType)) {
|
|
||||||
rule.push({
|
|
||||||
required: false,
|
|
||||||
message: res.dbFieldTxt + this.$t('cannotEmpty'),
|
|
||||||
trigger: 'blur'
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
rule.push({
|
|
||||||
required: false,
|
|
||||||
message: res.dbFieldTxt + this.$t('cannotEmpty'),
|
|
||||||
trigger: 'change'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (rule.length > 0) {
|
|
||||||
rules[res.dbFieldName] = rule
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.rules = rules
|
|
||||||
this.isFormInline = true
|
|
||||||
this.loading = false
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 获取表单信息
|
|
||||||
*/
|
|
||||||
loadFormInfo () {
|
|
||||||
getDocSplitEditFormData({ id: this.itemVal.id }).then(res => {
|
|
||||||
if (res.success) {
|
|
||||||
// 处理树结构多选回显
|
|
||||||
const formList = Object.values(this.dataList).reduce((acc, cur) => acc.concat(cur), [])
|
|
||||||
const treeMultipleField = formList.filter(tt => tt.fieldShowType === FieldType.TREE.value)
|
|
||||||
const data = res.result || {}
|
|
||||||
treeMultipleField.forEach(field => {
|
|
||||||
const valueArr = []
|
|
||||||
if (data[field.dbFieldName]) {
|
|
||||||
const values = data[field.dbFieldName].split(',')
|
|
||||||
for (let i = 0; i < values.length; i++) {
|
|
||||||
valueArr[i] = {
|
|
||||||
value: values[i]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
data[field.dbFieldName] = valueArr
|
|
||||||
} else {
|
|
||||||
data[field.dbFieldName] = undefined
|
|
||||||
}
|
|
||||||
})
|
|
||||||
const dictField = formList.filter(tt => tt.fieldShowType === FieldType.OPTION_SINGLE.value)
|
|
||||||
dictField.forEach(field => {
|
|
||||||
data[field.dbFieldName] = data[field.dbFieldName] || null
|
|
||||||
})
|
|
||||||
// 是否长期有效默认选否
|
|
||||||
if (!data.is_long_effect) {
|
|
||||||
data.is_long_effect = YesOrNoEnum.NO.value
|
|
||||||
}
|
|
||||||
// 处理条文解读
|
|
||||||
if (!data.interpretation_articles) {
|
|
||||||
data.interpretation_articles = ''
|
|
||||||
}
|
|
||||||
this.formInline = Object.assign({}, { ...data })
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取条款内容列表
|
* 获取条款内容列表
|
||||||
*/
|
*/
|
||||||
@@ -610,14 +316,12 @@ export default {
|
|||||||
this.visible = false
|
this.visible = false
|
||||||
this.formInline = {}
|
this.formInline = {}
|
||||||
this.contentList = []
|
this.contentList = []
|
||||||
this.interpretationArticlesList = []
|
|
||||||
},
|
},
|
||||||
handleSave () {
|
handleSave () {
|
||||||
if (this.submitFlag) {
|
if (this.submitFlag) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.$refs.ruleForm.validate(valid => {
|
this.$refs.ruleForm.validate(valid => {
|
||||||
console.log(valid)
|
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.submitFlag = true
|
this.submitFlag = true
|
||||||
this.loading = true
|
this.loading = true
|
||||||
@@ -650,7 +354,6 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
formData.itemValEOList = contentList
|
formData.itemValEOList = contentList
|
||||||
formData.interpretationArticlesList = this.interpretationArticlesList.filter(tt => !!tt.itemContent)
|
|
||||||
formData.delItemIds = this.deleteIds.join(',')
|
formData.delItemIds = this.deleteIds.join(',')
|
||||||
submitFunc(formData).then(res => {
|
submitFunc(formData).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
@@ -667,39 +370,6 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
|
||||||
* 新增一条条文解读
|
|
||||||
* @param index
|
|
||||||
*/
|
|
||||||
handleAddUnscramble (index) {
|
|
||||||
this.interpretationArticlesList.splice(index + 1, 0, { id: '', itemContent: null, displaySeq: 1 })
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 删除条文解读
|
|
||||||
*/
|
|
||||||
handleDeleteUnscramble (index, item) {
|
|
||||||
this.interpretationArticlesList.splice(index, 1)
|
|
||||||
if (item.id) {
|
|
||||||
this.deleteIds.push(item.id)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 获取条文解读数据
|
|
||||||
*/
|
|
||||||
initInterpretationArticlesList () {
|
|
||||||
getInterpretationArticlesList({ id: this.itemVal.id }).then(res => {
|
|
||||||
if (res.success) {
|
|
||||||
if (res.result && res.result.length > 0) {
|
|
||||||
this.interpretationArticlesList = res.result
|
|
||||||
} else {
|
|
||||||
this.interpretationArticlesList = [{
|
|
||||||
itemContent: null,
|
|
||||||
displaySeq: 1
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
updateDom () {
|
updateDom () {
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user