拆分详情
This commit is contained in:
@@ -550,6 +550,10 @@ module.exports = {
|
||||
text:'text',
|
||||
picture:'picture',
|
||||
searchScope:'Search Scope',
|
||||
newNode:'new node',
|
||||
modifyNode:'modify node',
|
||||
deleteNode:'delete node',
|
||||
searchScope:'Search Scope',
|
||||
ImplementationDate:'Implementation Date',
|
||||
vehicleInProductionDate:'vehicle in Production Date'
|
||||
}
|
||||
@@ -554,6 +554,9 @@ module.exports = {
|
||||
text:'文本',
|
||||
picture:'图片',
|
||||
searchScope:'检索范围',
|
||||
newNode:'新增节点',
|
||||
modifyNode:'修改节点',
|
||||
deleteNode:'删除节点',
|
||||
ImplementationDate:'新车型实施日期',
|
||||
vehicleInProductionDate:'在产车实施日期'
|
||||
}
|
||||
@@ -0,0 +1,235 @@
|
||||
<template>
|
||||
<div style="height: 100%">
|
||||
<div class="box">
|
||||
<a-table
|
||||
class="table"
|
||||
rowKey="id"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:pagination="false"
|
||||
:scroll="{x: true}"
|
||||
:data-source="dataSource"
|
||||
:loading="loading"
|
||||
:columns="columns"
|
||||
@change="tableOnChange"
|
||||
>
|
||||
<span slot="operation" slot-scope="record">
|
||||
<a v-for="(ol,index) in OperationList"
|
||||
@click="OperationClick(ol,record)">
|
||||
<span class="text">
|
||||
{{ol.text}}
|
||||
</span>
|
||||
</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
<div class="page" v-if="dataSource.length > 0">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="pageSize"
|
||||
:total="total"
|
||||
@change="onChange"
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import eventBUs from '../../common/event'
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: 'SplitTable',
|
||||
props: {
|
||||
//接口
|
||||
url: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
// 操作按钮
|
||||
OperationList: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
flag: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
//是否显示操作;默认不显示
|
||||
showAction: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
jsonBody: [],
|
||||
checkboxList: [],
|
||||
tableAll: false,
|
||||
indeterminate: false,
|
||||
columns: [],
|
||||
selectedRowKeys: [],
|
||||
dataSource: [],
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
searchParmes: {},
|
||||
loading: false,
|
||||
orderBy: '1',
|
||||
orderByField: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
eventBUs.$on('searchQuery', search => {
|
||||
Object.keys(search).forEach(res => {
|
||||
if (search[res] instanceof Array) {
|
||||
search[res] = search[res].join(',')
|
||||
}
|
||||
})
|
||||
this.searchParmes = search
|
||||
this.getData()
|
||||
this.getTableList()
|
||||
})
|
||||
eventBUs.$on('searchReset', target => {
|
||||
this.searchParmes = {}
|
||||
this.selectedRowKeys = []
|
||||
this.getData()
|
||||
this.getTableList()
|
||||
})
|
||||
this.getData()
|
||||
this.getTableList()
|
||||
},
|
||||
methods: {
|
||||
|
||||
getTextWith(text, fontStyle) {
|
||||
var canvas = document.createElement('canvas')
|
||||
var context = canvas.getContext('2d')
|
||||
context.font = fontStyle || '14px' // 设置字体样式
|
||||
var dimension = context.measureText(text)
|
||||
return dimension.width + 40
|
||||
},
|
||||
getData() {
|
||||
let params = {
|
||||
flag: this.flag
|
||||
}
|
||||
getAction(this.url.tableHeader, params).then((res) => {
|
||||
if (res.success) {
|
||||
var jsonHead = res.result
|
||||
this.columns = []
|
||||
// res.db_field_txt
|
||||
jsonHead.forEach((res, index) => {
|
||||
this.columns.push({
|
||||
title: res.db_field_txt,
|
||||
dataIndex: res.db_field_name,
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
sorter: res.sort
|
||||
})
|
||||
if (res.click) {
|
||||
this.columns[index].scopedSlots = {
|
||||
customRender: 'detailClick'
|
||||
}
|
||||
} else {
|
||||
this.columns[index].scopedSlots = {
|
||||
customRender: 'detailText'
|
||||
}
|
||||
}
|
||||
})
|
||||
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' }
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
tableOnChange(pagination, filters, sorter) {
|
||||
this.orderBy = sorter.order == 'ascend' ? '1' : '2'
|
||||
this.orderByField = sorter.columnKey
|
||||
this.getTableList()
|
||||
},
|
||||
getTableList() {
|
||||
let pageNo = JSON.parse(JSON.stringify(this.pageNo))
|
||||
let pageSize = JSON.parse(JSON.stringify(this.pageSize))
|
||||
let params = {
|
||||
...this.searchParmes,
|
||||
orderBy: this.orderBy,
|
||||
orderByField: this.orderByField,
|
||||
pageNo: pageNo + '',
|
||||
pageSize: pageSize + ''
|
||||
}
|
||||
this.loading = true
|
||||
getAction(this.url.tableList, params).then((res) => {
|
||||
if (res.success) {
|
||||
if (res.result.current > 1 && res.result.records.length == 0) {
|
||||
this.pageNo = res.result.current - 1
|
||||
this.getTableList()
|
||||
return
|
||||
}
|
||||
this.dataSource = res.result.records
|
||||
this.total = res.result.total
|
||||
this.loading = false
|
||||
} else {
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
onChange(page, pageSize) {
|
||||
this.pageNo = page
|
||||
this.getTableList()
|
||||
},
|
||||
SizeChange(page, pageSize) {
|
||||
this.pageNo = 1
|
||||
this.pageSize = pageSize
|
||||
this.getTableList()
|
||||
},
|
||||
onSelectChange(value) {
|
||||
this.selectedRowKeys = value
|
||||
this.$emit('onSelectChange', value)
|
||||
},
|
||||
OperationClick(ol, item) {
|
||||
this.$emit(ol.ClickEvent, item)
|
||||
},
|
||||
detailClick(item, index) {
|
||||
this.$emit('detailClick', item)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.table .ant-table-column-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.ant-table td {
|
||||
white-space: nowrap;
|
||||
}
|
||||
</style>
|
||||
<style scoped>
|
||||
.box {
|
||||
width: 100%;
|
||||
height: calc(100% - 100px);
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.text {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.page {
|
||||
text-align: right;
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -2,26 +2,27 @@
|
||||
<div class="splitting">
|
||||
<a-card :bordered="false">
|
||||
<div class="splitting-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="12">
|
||||
<a-form-item :label="$t('standard')">
|
||||
<j-input :placeholder="$t('enterNumber')" v-model="queryParams.attId"></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item :label="$t('title')">
|
||||
<j-input :placeholder="$t('enterTitle')" v-model="queryParams.title"></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="searchQuery" icon="search">{{$t('query')}}</a-button>
|
||||
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">{{$t('reset')}}</a-button>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
<search :flag="'3'" :url="url"/>
|
||||
<!-- <a-form layout="inline" @keyup.enter.native="searchQuery">-->
|
||||
<!-- <a-row :gutter="24">-->
|
||||
<!-- <a-col :md="6" :sm="12">-->
|
||||
<!-- <a-form-item :label="$t('standard')">-->
|
||||
<!-- <j-input :placeholder="$t('enterNumber')" v-model="queryParams.attId"></j-input>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- <a-col :md="6" :sm="8">-->
|
||||
<!-- <a-form-item :label="$t('title')">-->
|
||||
<!-- <j-input :placeholder="$t('enterTitle')" v-model="queryParams.title"></j-input>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- <a-col :md="6" :sm="8">-->
|
||||
<!-- <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">-->
|
||||
<!-- <a-button type="primary" @click="searchQuery" icon="search">{{$t('query')}}</a-button>-->
|
||||
<!-- <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">{{$t('reset')}}</a-button>-->
|
||||
<!-- </span>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- </a-row>-->
|
||||
<!-- </a-form>-->
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div class="operator-text" @click="handleModule">
|
||||
@@ -38,34 +39,44 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="splitting-table">
|
||||
<a-table
|
||||
ref="table"
|
||||
size="middle"
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:dataSource="tableData"
|
||||
:pagination="false"
|
||||
:loading="loading"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||
@change="handleTableChange">
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a class="action-margin" @click="backDocument(record)">{{$t('backDocument')}}</a>
|
||||
<a class="action-margin" @click="detail(record)">{{$t('See')}}</a>
|
||||
<a class="table-del" @click="deleteDetail(record)">{{$t('delete')}}</a>
|
||||
</span>
|
||||
</a-table>
|
||||
<div class="page" v-if="tableData.length > 0">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+` ${total} `+ $t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:current="queryParams.pageNo"
|
||||
:page-size.sync="queryParams.pageSize"
|
||||
:total="total"
|
||||
@change="onChangePage"
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
</div>
|
||||
<table-data
|
||||
:url="url"
|
||||
:flag="'3'"
|
||||
:OperationList="OperationList"
|
||||
showAction
|
||||
@onSelectChange="onSelectChange"
|
||||
@backDocument="backDocument"
|
||||
@handleDel="handleDel"
|
||||
@detailClick="detailClick"
|
||||
></table-data>
|
||||
<!-- <a-table-->
|
||||
<!-- ref="table"-->
|
||||
<!-- size="middle"-->
|
||||
<!-- rowKey="id"-->
|
||||
<!-- :columns="columns"-->
|
||||
<!-- :dataSource="tableData"-->
|
||||
<!-- :pagination="false"-->
|
||||
<!-- :loading="loading"-->
|
||||
<!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"-->
|
||||
<!-- @change="handleTableChange">-->
|
||||
<!-- <span slot="action" slot-scope="text, record">-->
|
||||
<!-- <a class="action-margin" @click="backDocument(record)">{{$t('backDocument')}}</a>-->
|
||||
<!-- <a class="action-margin" @click="detail(record)">{{$t('See')}}</a>-->
|
||||
<!-- <a class="table-del" @click="deleteDetail(record)">{{$t('delete')}}</a>-->
|
||||
<!-- </span>-->
|
||||
<!-- </a-table>-->
|
||||
<!-- <div class="page" v-if="tableData.length > 0">-->
|
||||
<!-- <a-pagination-->
|
||||
<!-- :show-total="total => $t('total')+` ${total} `+ $t('strip')"-->
|
||||
<!-- show-quick-jumper-->
|
||||
<!-- show-size-changer-->
|
||||
<!-- :current="queryParams.pageNo"-->
|
||||
<!-- :page-size.sync="queryParams.pageSize"-->
|
||||
<!-- :total="total"-->
|
||||
<!-- @change="onChangePage"-->
|
||||
<!-- @showSizeChange="SizeChange"-->
|
||||
<!-- />-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<split-text v-if="splitVisible" :splitVisible="splitVisible" @visible="sVisible"></split-text>
|
||||
<import-result v-if="importsVisible" :importsVisible="importsVisible" @visible="iVisible"></import-result>
|
||||
@@ -74,6 +85,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import search from '@/components/search/index'
|
||||
import TableData from '@/components/SplitTable/index'
|
||||
import SplitText from './modules/SplitText'
|
||||
import ImportResult from './modules/ImportResult'
|
||||
import { getAction, postAction, deleteAction } from '@/api/manage'
|
||||
@@ -84,6 +97,8 @@
|
||||
export default {
|
||||
name: 'splitting',
|
||||
components: {
|
||||
search,
|
||||
TableData,
|
||||
SplitText,
|
||||
ImportResult
|
||||
},
|
||||
@@ -135,6 +150,27 @@
|
||||
width: 170
|
||||
}
|
||||
],
|
||||
OperationList: [
|
||||
{
|
||||
text: this.$t('backDocument'),
|
||||
ClickEvent: 'backDocument'
|
||||
}, //回传至文档库
|
||||
{
|
||||
text: this.$t('See'),
|
||||
ClickEvent: 'detailClick'
|
||||
}, //查看
|
||||
{
|
||||
text: this.$t('delete'),
|
||||
ClickEvent: 'handleDel'
|
||||
} //删除
|
||||
],
|
||||
url:{
|
||||
tableHeader: 'language/switch/getHeader', //表格头部字段
|
||||
seachList: 'language/switch/queryCondition', //搜索字段
|
||||
tableList: 'split/sarFileSplitInfo/page', //表格数据
|
||||
// getAddForm: 'ocr/ocrRecord/getForm', // 表单的字段
|
||||
// addInfo: 'ocr/OcrRestful/addOcrRecord', //新增
|
||||
},
|
||||
queryParams:{
|
||||
pageNo:1,
|
||||
pageSize:10
|
||||
@@ -280,23 +316,26 @@
|
||||
backDocument(val){
|
||||
this.$confirm({
|
||||
content: this.$t('backDocument'),
|
||||
onOk() {
|
||||
deleteAction(``, { id: val.id }).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.loadData()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
onOk:
|
||||
async () =>
|
||||
{
|
||||
// deleteAction(``, { id: val.id }).then((res) => {
|
||||
// if (res.success) {
|
||||
// this.$message.success(res.message)
|
||||
// this.loadData()
|
||||
// } else {
|
||||
// this.$message.warning(res.message)
|
||||
// }
|
||||
// })
|
||||
}
|
||||
})
|
||||
},
|
||||
//查看
|
||||
detail(val){
|
||||
detailClick(val){
|
||||
this.$router.push({
|
||||
path:'/docManage/splitting/splitDetail',
|
||||
query:val
|
||||
query: { infoId:val.id }
|
||||
})
|
||||
},
|
||||
|
||||
@@ -310,11 +349,8 @@
|
||||
|
||||
<style lang="less" scoped>
|
||||
.splitting{
|
||||
.splitting-search-wrapper{
|
||||
.splitting-search-wrapper {
|
||||
margin-bottom: 20px;
|
||||
.table-page-search-submitButtons{
|
||||
float: none!important;
|
||||
}
|
||||
|
||||
}
|
||||
.splitting-table{
|
||||
@@ -330,4 +366,15 @@
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style lang="less">
|
||||
.splitting-search-wrapper {
|
||||
.table-page-search-submitButtons {
|
||||
/*float: none!important;*/
|
||||
|
||||
.ant-col-sm-24 {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -14,47 +14,268 @@
|
||||
<a-form-model
|
||||
class="split-content"
|
||||
:model="form"
|
||||
:rules="validatorRules"
|
||||
:rules="rules"
|
||||
ref="splitEditForm"
|
||||
:label-col="labelCol"
|
||||
:wrapper-col="wrapperCol"
|
||||
>
|
||||
<a-row :gutter="24">
|
||||
<div v-for="(item,index) in dataList" :key="index">
|
||||
|
||||
<a-col :span="12" v-if="item.field_show_type === '1' || item.field_show_type === '11'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model="formInline[item.db_field_name]"
|
||||
:placeholder="$t('PleaseEnter')+item.db_field_txt"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="12" v-else-if="item.field_show_type === '2'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<a-input-number class="box-input"
|
||||
:placeholder="$t('PleaseEnter')+item.db_field_txt"
|
||||
:disabled="disabled"
|
||||
v-model="formInline[item.db_field_name]" :min="1" :max="99999999"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="12" v-else-if="item.field_show_type === '3'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<j-dict-select-tag class="box-input" v-model="formInline[item.db_field_name]"
|
||||
:disabled="disabled"
|
||||
@input="handleInput(item.db_field_name)"
|
||||
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="item.dict_field"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="12" v-else-if="item.field_show_type === '4'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<j-multi-select-tag class="box-input" v-model="formInline[item.db_field_name]"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="item.dict_field"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12" v-else-if="item.field_show_type === '5'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<a-date-picker class="box-input"
|
||||
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
||||
@change="dateChange(item)"
|
||||
format="YYYY-MM-DD"
|
||||
v-model="formInline[item.db_field_name]"
|
||||
:disabled="disabled"
|
||||
style="width: 100%"/>
|
||||
<!-- :disabledDate="disabledDate"-->
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12" v-else-if="item.field_show_type === '6'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<a-range-picker class="box-input" v-model="formInline[item.db_field_name]"
|
||||
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
||||
:disabled="disabled"
|
||||
@change="onChange(item.db_field_name)"></a-range-picker>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="12" v-else-if="item.field_show_type === '7'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<a-button type="primary" class="button-text"
|
||||
@click="clickButtonToUpload(item)">
|
||||
{{ (formInline[item.db_field_name] === 'null' || formInline[item.db_field_name] === '' ||
|
||||
formInline[item.db_field_name] == null) ? $t('clickUpload') : $t('viewUploadedFiles')
|
||||
}}
|
||||
</a-button>
|
||||
<!-- <span class="button-text-text" v-if="formInline[item.db_field_name]">-->
|
||||
<!-- {{formInline[item.db_field_name].split(',').length}}-->
|
||||
<!-- </span>-->
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="24" v-else-if="item.field_show_type === '8'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<a-textarea
|
||||
:placeholder="$t('PleaseEnter')+item.db_field_txt"
|
||||
:disabled="disabled"
|
||||
v-model="formInline[item.db_field_name]" :rows="4"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="24" v-else-if="item.field_show_type === '9' || item.field_show_type == 'sel_user'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<PersonnelSelection :query="item"
|
||||
:personneQuery="formInline"
|
||||
@change="PersonnelSelectionChange"
|
||||
:disabled="disabled"
|
||||
v-model="formInline[item.db_field_name]"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="24" v-else-if="item.field_show_type === '10'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<Standardselection :query="item"
|
||||
@change="StandardselectionChange"
|
||||
:disabled="disabled"
|
||||
:standard="formInline"
|
||||
v-model="formInline[item.db_field_name]"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="12" v-else-if="item.field_show_type === 'RADIO'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<j-dict-select-tag v-model="formInline[item.db_field_name]"
|
||||
:disabled="disabled"
|
||||
@input="handleInput(item.db_field_name)"
|
||||
:placeholder="$t('selectStatus')"
|
||||
:type="'radio'" :triggerChange="false" :dictCode="item.dict_field"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="12" v-else-if="item.field_show_type === '0'">
|
||||
<div class="box-title-text" :title="item.db_field_txt">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text">{{item.db_field_txt}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<a-tree-select
|
||||
v-model="formInline[item.db_field_name]"
|
||||
:maxTagCount="1"
|
||||
style="width: 100%"
|
||||
:tree-data="item.tree"
|
||||
tree-checkable
|
||||
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
||||
/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="12" v-else-if="item.field_show_type === 'CHECKBOX'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<j-multi-select-tag class="box-input" v-model="formInline[item.db_field_name]"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('selectStatus')" :type="'checkbox'"
|
||||
:triggerChange="false" :dictCode="item.dict_field"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</div>
|
||||
</a-row>
|
||||
|
||||
|
||||
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"></uploadFile>
|
||||
|
||||
|
||||
<!-- 条款号-->
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-form-model-item :label="$t('clauseNo')" prop="number">
|
||||
<a-input v-model="form.number" :placeholder="$t('pleaseEnter')+$t('clauseNo')" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!-- 条款名称-->
|
||||
<a-col :span="12">
|
||||
<a-form-model-item :label="$t('clauseName')" prop="name">
|
||||
<a-input v-model="form.name" :placeholder="$t('pleaseEnter')+$t('clauseName')" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<!-- 功能领域-->
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-form-model-item :label="$t('functionalAreas')" prop="funArea">
|
||||
<j-dict-select-tag type="list" v-model="form.funArea" dictCode="function_territory" :placeholder="$t('pleaseSelect')+$t('functionalAreas')" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!-- 技术领域-->
|
||||
<a-col :span="12">
|
||||
<a-form-model-item :label="$t('technicalField')" prop="tecArea">
|
||||
<j-dict-select-tag type="list" v-model="form.tecArea" dictCode="technology_territory" :placeholder="$t('pleaseSelect')+$t('technicalField')" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<!-- 信息类别-->
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-form-model-item :label="$t('informationCategory')" prop="infoType">
|
||||
<j-dict-select-tag type="list" v-model="form.infoType" dictCode="xxx" :placeholder="$t('pleaseSelect')+$t('informationCategory')" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<!-- <a-row :gutter="24">-->
|
||||
<!-- <a-col :span="12">-->
|
||||
<!-- <a-form-model-item :label="$t('clauseNo')" prop="number">-->
|
||||
<!-- <a-input v-model="form.number" :placeholder="$t('pleaseEnter')+$t('clauseNo')" />-->
|
||||
<!-- </a-form-model-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!--<!– 条款名称–>-->
|
||||
<!-- <a-col :span="12">-->
|
||||
<!-- <a-form-model-item :label="$t('clauseName')" prop="name">-->
|
||||
<!-- <a-input v-model="form.name" :placeholder="$t('pleaseEnter')+$t('clauseName')" />-->
|
||||
<!-- </a-form-model-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- </a-row>-->
|
||||
<!--<!– 功能领域–>-->
|
||||
<!-- <a-row :gutter="24">-->
|
||||
<!-- <a-col :span="12">-->
|
||||
<!-- <a-form-model-item :label="$t('functionalAreas')" prop="funArea">-->
|
||||
<!-- <j-dict-select-tag type="list" v-model="form.funArea" dictCode="function_territory" :placeholder="$t('pleaseSelect')+$t('functionalAreas')" />-->
|
||||
<!-- </a-form-model-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!--<!– 技术领域–>-->
|
||||
<!-- <a-col :span="12">-->
|
||||
<!-- <a-form-model-item :label="$t('technicalField')" prop="tecArea">-->
|
||||
<!-- <j-dict-select-tag type="list" v-model="form.tecArea" dictCode="technology_territory" :placeholder="$t('pleaseSelect')+$t('technicalField')" />-->
|
||||
<!-- </a-form-model-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- </a-row>-->
|
||||
<!--<!– 信息类别–>-->
|
||||
<!-- <a-row :gutter="24">-->
|
||||
<!-- <a-col :span="12">-->
|
||||
<!-- <a-form-model-item :label="$t('informationCategory')" prop="infoType">-->
|
||||
<!-- <j-dict-select-tag type="list" v-model="form.infoType" dictCode="xxx" :placeholder="$t('pleaseSelect')+$t('informationCategory')" />-->
|
||||
<!-- </a-form-model-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- </a-row>-->
|
||||
<!-- 内容简介-->
|
||||
<span class="con-divider">{{$t('contentValidity')}}</span>
|
||||
<a-divider dashed />
|
||||
@@ -130,10 +351,10 @@
|
||||
>
|
||||
<a-form :form="form" :label-col="{ span: 8 }" :wrapper-col="{ span: 14 }">
|
||||
<a-form-item :label="$t('numberRows')">
|
||||
<a-input-number v-model="rowCount" :min="1" :placeholder="$t('pleaseEnter')+$t('numberRows')" :formatter="limitNumber" :parser="limitNumber" />
|
||||
<a-input-number v-model="rowCount" :min="1" :max="99999" :placeholder="$t('pleaseEnter')+$t('numberRows')" :formatter="limitNumber" :parser="limitNumber" />
|
||||
</a-form-item>
|
||||
<a-form-item :label="$t('numberColumns')">
|
||||
<a-input-number v-model="colCount" :min="1" :placeholder="$t('pleaseEnter')+$t('numberColumns')" :formatter="limitNumber" :parser="limitNumber" />
|
||||
<a-input-number v-model="colCount" :min="1" :max="99999" :placeholder="$t('pleaseEnter')+$t('numberColumns')" :formatter="limitNumber" :parser="limitNumber" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-modal>
|
||||
@@ -156,11 +377,20 @@
|
||||
|
||||
<script>
|
||||
import Vue from 'vue'
|
||||
import uploadFile from '@/components/uploadFile/file'
|
||||
import Standardselection from '@/components/Standardselection/index'
|
||||
import PersonnelSelection from '@/components/PersonnelSelection/index'
|
||||
import SplitUpload from '@/components/SplitUpload/index'
|
||||
import UEditor from '@/components/ueditor/index'
|
||||
import moment from 'moment'
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
// import eventBUs from '../../common/event'
|
||||
export default {
|
||||
name: 'splitAddForm',
|
||||
components:{
|
||||
uploadFile,
|
||||
Standardselection,
|
||||
PersonnelSelection,
|
||||
SplitUpload,
|
||||
UEditor
|
||||
},
|
||||
@@ -188,27 +418,19 @@
|
||||
textNumber:1,
|
||||
Title:this.$t('add'),
|
||||
confirmLoading: false,
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 5 },
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 },
|
||||
},
|
||||
visible:false,
|
||||
addConVisible:false,
|
||||
form:{},
|
||||
validatorRules:{
|
||||
number:[
|
||||
{ required:true,message: this.$t('pleaseEnter')+this.$t('clauseNo'),trigger: 'blur' },
|
||||
{ min:1, max: 200, message: this.$t('cantExeed')+'200'+this.$t('characters'), trigger: 'blur' }
|
||||
],
|
||||
name:[
|
||||
{ required:true,message: this.$t('pleaseEnter')+this.$t('clauseName'),trigger: 'blur' },
|
||||
{ min:1, max: 200, message: this.$t('cantExeed')+'200'+this.$t('characters'), trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
// validatorRules:{
|
||||
// number:[
|
||||
// { required:true,message: this.$t('pleaseEnter')+this.$t('clauseNo'),trigger: 'blur' },
|
||||
// { min:1, max: 200, message: this.$t('cantExeed')+'200'+this.$t('characters'), trigger: 'blur' }
|
||||
// ],
|
||||
// name:[
|
||||
// { required:true,message: this.$t('pleaseEnter')+this.$t('clauseName'),trigger: 'blur' },
|
||||
// { min:1, max: 200, message: this.$t('cantExeed')+'200'+this.$t('characters'), trigger: 'blur' }
|
||||
// ]
|
||||
// },
|
||||
addIndex:'',
|
||||
addImgVisible:false, //上传图片弹框
|
||||
titleImg:this.$t('uploadPictures'),
|
||||
@@ -321,11 +543,42 @@
|
||||
tableColVisible:false,
|
||||
colCount:'', //列数
|
||||
rowCount:'', //行数
|
||||
formInline: {},
|
||||
isFormInline: false,
|
||||
rules: {},
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 6 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 17 }
|
||||
},
|
||||
dataList: [],
|
||||
ruleList: [],
|
||||
rules: {},
|
||||
confirmLoading: false,
|
||||
uploadName: '',
|
||||
type: 'add',
|
||||
}
|
||||
},
|
||||
props:{
|
||||
addVisible:Boolean,
|
||||
formTitle:String,
|
||||
addVisible: {
|
||||
type:Boolean,
|
||||
default:false
|
||||
},
|
||||
formTitle:{
|
||||
type:String,
|
||||
default:''
|
||||
},
|
||||
url: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
flag: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
},
|
||||
watch:{
|
||||
selected(val){
|
||||
@@ -363,6 +616,7 @@
|
||||
},
|
||||
//保存
|
||||
splitSave(){
|
||||
console.log('formInline',this.formInline)
|
||||
this.$refs.splitEditForm.validate(valid=>{
|
||||
if(valid){
|
||||
|
||||
@@ -398,7 +652,7 @@
|
||||
this.tableColVisible=true
|
||||
|
||||
}
|
||||
console.log('conteend',this.contentList)
|
||||
// console.log('conteend',this.contentList)
|
||||
},
|
||||
handleCancel(){
|
||||
this.addConVisible=false
|
||||
@@ -487,7 +741,152 @@
|
||||
this.$refs.ueditor.setContent(this.ueContent)
|
||||
})
|
||||
}
|
||||
console.log('cont1111',this.addIndex,this.contentList)
|
||||
// console.log('cont1111',this.addIndex,this.contentList)
|
||||
},
|
||||
dateChange(item) {
|
||||
this.formInline[item.db_field_name] = this.formInline[item.db_field_name] ? moment(this.formInline[item.db_field_name]).format('YYYY-MM-DD') : ''
|
||||
},
|
||||
onChange(item) {
|
||||
let dateOne = moment(this.formInline[item][0]).format('YYYY-MM-DD')
|
||||
let dateTwo = moment(this.formInline[item][1]).format('YYYY-MM-DD')
|
||||
this.formInline[item] = dateOne ? [dateOne, dateTwo] : []
|
||||
},
|
||||
|
||||
clickButtonToUpload(item) {
|
||||
this.$refs.uploadFile.perentHandleFunc()
|
||||
this.$refs.uploadFile.state = item.flag
|
||||
this.$refs.uploadFile.visible = true
|
||||
this.uploadName = item.db_field_name
|
||||
getAction('sys/common/getFileInfos', { id: this.formInline[item.db_field_name] }).then((res) => {
|
||||
if (res.success) {
|
||||
this.$refs.uploadFile.perentHandleFunc(res.result)
|
||||
} else {
|
||||
this.$refs.uploadFile.perentHandleFunc()
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 上传文件的回调 */
|
||||
uploadSuccess(data) {
|
||||
let attIdList = []
|
||||
if (data && data.length > 0) {
|
||||
data.map(item => {
|
||||
attIdList.push(item.id || data.name)
|
||||
})
|
||||
}
|
||||
/** 赋值给当前对应的表单文件 */
|
||||
this.formInline[this.uploadName] = attIdList.join(',')
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
handleInput(value) {
|
||||
this.$nextTick(() => {
|
||||
this.formInline = { ...this.formInline }
|
||||
this.$refs.splitEditForm.validateField([value])
|
||||
})
|
||||
},
|
||||
IntegrateData() {
|
||||
this.isFormInline = false
|
||||
let ruleList = []
|
||||
// this.ruleList.forEach(res => {
|
||||
// Object.keys(res).forEach(val => {
|
||||
// res[val].forEach(ol => {
|
||||
// ruleList.push(ol)
|
||||
// })
|
||||
// })
|
||||
// })
|
||||
let rules = {}
|
||||
this.ruleList.forEach((res, index) => {
|
||||
const rule = []
|
||||
if (res.field_must_input == 1) {
|
||||
if (res.field_show_type === '1') {
|
||||
rule.push({
|
||||
required: true,
|
||||
message: res.db_field_txt + this.$t('cannotEmpty'),
|
||||
trigger: 'blur'
|
||||
})
|
||||
} else if (res.field_show_type === '4' || res.field_show_type === '6' ||
|
||||
res.field_show_type === '5' || res.field_show_type === '7'
|
||||
) {
|
||||
rule.push({
|
||||
required: true,
|
||||
message: res.db_field_txt + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
})
|
||||
} else if (res.field_show_type === '2') {
|
||||
rule.push({
|
||||
required: true,
|
||||
message: res.db_field_txt + this.$t('cannotEmpty'),
|
||||
trigger: 'blur'
|
||||
})
|
||||
} else if (res.field_show_type === '8' || res.field_show_type === '9' || res.field_show_type === '10' || res.field_show_type === '11') {
|
||||
rule.push({
|
||||
required: true,
|
||||
message: res.db_field_txt + this.$t('cannotEmpty'),
|
||||
trigger: 'blur'
|
||||
})
|
||||
} else if (res.field_show_type === '3') {
|
||||
rule.push({
|
||||
required: true,
|
||||
message: res.db_field_txt + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
})
|
||||
}
|
||||
}
|
||||
if (res.field_show_type === '1' || res.field_show_type === '2' ||
|
||||
res.field_show_type === '8' || res.field_show_type === '9' || res.field_show_type === '10'
|
||||
|| res.field_show_type === '11') {
|
||||
rule.push({
|
||||
max: res.db_length,
|
||||
message: res.db_field_txt + '不能超出' + res.db_length + '个字符',
|
||||
trigger: 'blur'
|
||||
})
|
||||
}
|
||||
if (rule.length > 0) {
|
||||
rules[res.db_field_name] = rule
|
||||
}
|
||||
})
|
||||
this.$set(this, 'rules', rules)
|
||||
console.log(this.rules)
|
||||
this.isFormInline = true
|
||||
this.confirmLoading = false
|
||||
},
|
||||
getForm(callBack) {
|
||||
this.confirmLoading = true
|
||||
let params = {
|
||||
flag: this.flag,
|
||||
type: this.type
|
||||
}
|
||||
getAction(this.url.getAddForm, params).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataList = res.result
|
||||
this.ruleList = res.result
|
||||
// console.log('res',this.dataList)
|
||||
this.IntegrateData()
|
||||
callBack && callBack()
|
||||
}
|
||||
})
|
||||
},
|
||||
edit(item) {
|
||||
this.type = 'edit'
|
||||
this.getForm(() => {
|
||||
getAction(this.url.getDocumentInfo, { id: item.id }).then((res) => {
|
||||
if (res.success) {
|
||||
this.formInline = res.result[0]
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
add() {
|
||||
this.formInline = {}
|
||||
this.type = 'add'
|
||||
this.getForm()
|
||||
},
|
||||
StandardselectionChange(value, id) {
|
||||
this.formInline[value + '_id'] = id
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
PersonnelSelectionChange(value, id) {
|
||||
this.formInline[value + '_id'] = id
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
//正则替换小数点
|
||||
limitNumber(value) {
|
||||
@@ -511,6 +910,38 @@
|
||||
}
|
||||
.split-table-drawer{
|
||||
.split-content{
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
.title-text {
|
||||
width: 114px;
|
||||
text-align: right;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
.Required {
|
||||
color: red;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.title-text-text {
|
||||
margin-top: 9px;
|
||||
}
|
||||
}
|
||||
.itemModel {
|
||||
width: calc(100% - 130px);
|
||||
display: inline-block;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
.con-divider{
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
|
||||
@@ -22,15 +22,15 @@
|
||||
<span v-else>{{ title }}</span>
|
||||
</template>
|
||||
</a-tree>
|
||||
<div :style="tmpStyle" v-if="NodeTreeItem">
|
||||
<div v-if="NodeTreeItem" :style="tmpStyle" >
|
||||
<div class="menu-item" @click="orgAdd">
|
||||
新增节点
|
||||
{{$t('newNode')}}
|
||||
</div>
|
||||
<div class="menu-item" @click="orgEdit">
|
||||
修改节点
|
||||
{{$t('modifyNode')}}
|
||||
</div>
|
||||
<div class="menu-item menu-bottom" @click="orgDelete" v-if="NodeTreeItem">
|
||||
删除节点
|
||||
{{$t('deleteNode')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -38,32 +38,33 @@
|
||||
<div class="split-detail-right">
|
||||
<div class="split-detail-right-wraper">
|
||||
<div class="split-detail-search-header">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery(queryParams)">
|
||||
<a-form-model
|
||||
class="split-detail-content"
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
>
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-model-item :label="$t('clauseName')" class="split-item">
|
||||
<j-input :placeholder="$t('pleaseEnter') + $t('clauseName')" v-model="queryParams.serialNumber"></j-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-model-item :label="$t('clauseContent')" class="split-item">
|
||||
<j-input :placeholder="$t('pleaseEnter')+$t('clauseContent')" v-model="queryParams.title"></j-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="6">
|
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="searchQuery" icon="search">{{$t('query')}}</a-button>
|
||||
<a-button @click="searchReset" icon="reload" style="margin-left: 8px">{{ $t('reset') }}</a-button>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</a-form>
|
||||
<search :flag="'4'" :url="url"/>
|
||||
<!-- <a-form layout="inline" @keyup.enter.native="searchQuery(queryParams)">-->
|
||||
<!-- <a-form-model-->
|
||||
<!-- class="split-detail-content"-->
|
||||
<!-- :model="queryParams"-->
|
||||
<!-- ref="queryForm"-->
|
||||
<!-- >-->
|
||||
<!-- <a-row :gutter="24">-->
|
||||
<!-- <a-col :md="6" :sm="8">-->
|
||||
<!-- <a-form-model-item :label="$t('clauseName')" class="split-item">-->
|
||||
<!-- <j-input :placeholder="$t('pleaseEnter') + $t('clauseName')" v-model="queryParams.serialNumber"></j-input>-->
|
||||
<!-- </a-form-model-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- <a-col :md="6" :sm="8">-->
|
||||
<!-- <a-form-model-item :label="$t('clauseContent')" class="split-item">-->
|
||||
<!-- <j-input :placeholder="$t('pleaseEnter')+$t('clauseContent')" v-model="queryParams.title"></j-input>-->
|
||||
<!-- </a-form-model-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- <a-col :md="6" :sm="6">-->
|
||||
<!-- <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">-->
|
||||
<!-- <a-button type="primary" @click="searchQuery" icon="search">{{$t('query')}}</a-button>-->
|
||||
<!-- <a-button @click="searchReset" icon="reload" style="margin-left: 8px">{{ $t('reset') }}</a-button>-->
|
||||
<!-- </span>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- </a-row>-->
|
||||
<!-- </a-form-model>-->
|
||||
<!-- </a-form>-->
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div class="operator-text" @click="handleCopyManage">
|
||||
@@ -100,27 +101,36 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="split-detail-table">
|
||||
<a-table :data-source="tableData" :columns="columns" rowKey="id" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :pagination="false" :loading="loading" class="tag-con-table">
|
||||
<template slot="clauseContent" slot-scope="text, record">
|
||||
<a class="content-show" href="javascript:;" :title="record.serialContent" @click="showContent">{{record.serialContent}}</a>
|
||||
</template>
|
||||
<template slot="action" slot-scope="text, record">
|
||||
<a class="action-edit" href="javascript:;" @click="onEdit(record)">{{$t('edit')}}</a>
|
||||
<a class="action-delete" href="javascript:;" @click="onCancel(record)">{{$t('delete')}}</a>
|
||||
</template>
|
||||
</a-table>
|
||||
<div class="page" v-if="tableData.length > 0">
|
||||
<a-pagination
|
||||
:show-total= "total => $t('total')+` ${total} `+ $t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:current="queryParams.pageNo"
|
||||
:page-size.sync="queryParams.pageSize"
|
||||
:total="total"
|
||||
@change="onChangePage"
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
</div>
|
||||
<table-data
|
||||
:url="url"
|
||||
:flag="'4'"
|
||||
:OperationList="OperationList"
|
||||
showAction
|
||||
@onSelectChange="onSelectChange"
|
||||
@deleteClick="deleteClick"
|
||||
@editClick="editClick"
|
||||
></table-data>
|
||||
<!-- <a-table :data-source="tableData" :columns="columns" rowKey="id" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :pagination="false" :loading="loading" class="tag-con-table">-->
|
||||
<!-- <template slot="clauseContent" slot-scope="text, record">-->
|
||||
<!-- <a class="content-show" href="javascript:;" :title="record.serialContent" @click="showContent">{{record.serialContent}}</a>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template slot="action" slot-scope="text, record">-->
|
||||
<!-- <a class="action-edit" href="javascript:;" @click="onEdit(record)">{{$t('edit')}}</a>-->
|
||||
<!-- <a class="action-delete" href="javascript:;" @click="onCancel(record)">{{$t('delete')}}</a>-->
|
||||
<!-- </template>-->
|
||||
<!-- </a-table>-->
|
||||
<!-- <div class="page" v-if="tableData.length > 0">-->
|
||||
<!-- <a-pagination-->
|
||||
<!-- :show-total= "total => $t('total')+` ${total} `+ $t('strip')"-->
|
||||
<!-- show-quick-jumper-->
|
||||
<!-- show-size-changer-->
|
||||
<!-- :current="queryParams.pageNo"-->
|
||||
<!-- :page-size.sync="queryParams.pageSize"-->
|
||||
<!-- :total="total"-->
|
||||
<!-- @change="onChangePage"-->
|
||||
<!-- @showSizeChange="SizeChange"-->
|
||||
<!-- />-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -136,6 +146,7 @@
|
||||
</a-modal>
|
||||
<!-- 添加节点-->
|
||||
<a-modal
|
||||
class="add-menus"
|
||||
:title="menuTitle"
|
||||
:visible="menuRightVisible"
|
||||
:confirm-loading="confirmLoading"
|
||||
@@ -151,15 +162,19 @@
|
||||
:label-col="labelCol"
|
||||
:wrapper-col="wrapperCol"
|
||||
>
|
||||
<a-form-model-item :label="$t('clauseNo')" prop="clauseNo">
|
||||
<a-input v-model="form.clauseNo" :placeholder="$t('PleaseEnter')+$t('clauseNo')" />
|
||||
<a-form-model-item :label="$t('clauseNo')" prop="name">
|
||||
<a-input v-model="form.name" :placeholder="$t('PleaseEnter')+$t('clauseNo')" />
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :label="$t('clauseName')" prop="clauseName">
|
||||
<a-input v-model="form.clauseName" :placeholder="$t('PleaseEnter')+$t('clauseName')" />
|
||||
<a-form-model-item :label="$t('clauseName')" prop="itemName">
|
||||
<a-input v-model="form.itemName" :placeholder="$t('PleaseEnter')+$t('clauseName')" />
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :label="$t('serialNumber')" prop="displaySeq">
|
||||
<a-input-number v-model="form.displaySeq" :min="1" :max="99999" :placeholder="$t('PleaseEnter')+$t('serialNumber')" :formatter="limitNumber" :parser="limitNumber" style="width: 100%" />
|
||||
<!-- <a-input-number v-model="rowCount" :min="1" :placeholder="$t('pleaseEnter')+$t('numberRows')" :formatter="limitNumber" :parser="limitNumber" />-->
|
||||
</a-form-model-item>
|
||||
</a-form-model>
|
||||
</a-modal>
|
||||
<split-add-form v-if="addVisible" :addVisible="addVisible" :formTitle="formTitle" @closeVisible="closeVisible"></split-add-form>
|
||||
<split-add-form ref="splitForm" v-if="addVisible" :addVisible="addVisible" :formTitle="formTitle" :flag="'4'" :url="url" @closeVisible="closeVisible"></split-add-form>
|
||||
<upload ref="uploadSplit" @uploadSuccess="uploadSuccess"></upload>
|
||||
</div>
|
||||
</a-card>
|
||||
@@ -167,12 +182,16 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
|
||||
import { getAction, postAction, deleteAction, putAction, downloadFile } from '@/api/manage'
|
||||
import search from '@/components/search/index'
|
||||
import TableData from '@/components/SplitTable/index'
|
||||
import upload from '@/components/uploadFile/file.vue'
|
||||
import SplitAddForm from './SplitAddForm'
|
||||
export default {
|
||||
name: 'SplitDetail',
|
||||
components:{
|
||||
search,
|
||||
TableData,
|
||||
SplitAddForm,
|
||||
upload
|
||||
},
|
||||
@@ -284,18 +303,45 @@
|
||||
menuRightVisible:false,
|
||||
form:{},
|
||||
rules: {
|
||||
clauseNo: [
|
||||
name: [
|
||||
{ required: true, message: this.$t('PleaseEnter')+this.$t('clauseNo'), trigger: 'blur' },
|
||||
{ min: 1, max: 20, message: this.$t('cantExeed') + '20' + this.$t('characters'), trigger: 'blur' },
|
||||
],
|
||||
clauseName: [
|
||||
itemName: [
|
||||
{ required: true, message: this.$t('PleaseEnter')+this.$t('clauseName'), trigger: 'blur' },
|
||||
{ min: 1, max: 20, message: this.$t('cantExeed') + '20' + this.$t('characters'), trigger: 'blur' },
|
||||
],
|
||||
}
|
||||
displaySeq: [
|
||||
{ required: true, message: this.$t('PleaseEnter')+this.$t('serialNumber'), trigger: 'blur' },
|
||||
// { min: 1, max: 99999, message: this.$t('cantExeed') + '99999' + this.$t('characters'), trigger: 'blur' },
|
||||
],
|
||||
},
|
||||
infoId:'',
|
||||
// NodeTreeItemVisible:false,
|
||||
flag:false, //提交按钮标识
|
||||
isEdit:false,
|
||||
OperationList: [ //操作栏
|
||||
{
|
||||
text: this.$t('edit'),
|
||||
ClickEvent: 'editClick'
|
||||
}, //编辑
|
||||
{
|
||||
text: this.$t('delete'),
|
||||
ClickEvent: 'deleteClick'
|
||||
} //删除
|
||||
],
|
||||
url:{
|
||||
tableHeader: 'language/switch/getHeader', //表格头部字段
|
||||
seachList: 'language/switch/queryCondition', //搜索字段
|
||||
// tableList: 'split/sarFileSplitInfo/page', //表格数据
|
||||
getAddForm: 'language/switch/getForm', // 表单的字段
|
||||
// addInfo: 'ocr/OcrRestful/addOcrRecord', //新增
|
||||
},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.infoId=this.$route.query.infoId
|
||||
// console.log('info',this.$route.query)
|
||||
this.loadMenuData()
|
||||
this.generateList(this.gData);
|
||||
},
|
||||
@@ -398,7 +444,8 @@
|
||||
},
|
||||
//鼠标右键
|
||||
rightClick({event,node}){
|
||||
// console.log('eee',event,node)
|
||||
console.log('eee',event,node)
|
||||
// this.NodeTreeItemVisible=true
|
||||
const x =
|
||||
event.currentTarget.offsetLeft + event.currentTarget.clientWidth;
|
||||
const y = event.currentTarget.offsetTop;
|
||||
@@ -406,9 +453,15 @@
|
||||
pageX: x,
|
||||
pageY: y,
|
||||
id: node._props.dataRef.id,
|
||||
name:node._props.dataRef.name,
|
||||
itemName:node._props.dataRef.itemName,
|
||||
displaySeq:node._props.dataRef.displaySeq,
|
||||
title: node._props.dataRef.title,
|
||||
pid: node._props.dataRef.pid || null
|
||||
};
|
||||
this.nodeItem=JSON.parse(JSON.stringify(this.NodeTreeItem))
|
||||
// this.form.pid=this.NodeTreeItem.id
|
||||
// this.form.id=this.NodeTreeItem.id
|
||||
this.tmpStyle = {
|
||||
position: 'absolute',
|
||||
maxHeight: 40,
|
||||
@@ -418,10 +471,12 @@
|
||||
background:`#FFFFFF`,
|
||||
zIndex:`2`
|
||||
};
|
||||
// console.log('NodeTreeItem',this.NodeTreeItem)
|
||||
},
|
||||
// 用于点击空白处隐藏增删改菜单
|
||||
clearMenu () {
|
||||
this.NodeTreeItem = null;
|
||||
// this.NodeTreeItemVisible=false
|
||||
},
|
||||
//选择树节点
|
||||
onSelect(selectedKeys){
|
||||
@@ -429,16 +484,39 @@
|
||||
},
|
||||
//树形新增
|
||||
orgAdd(){
|
||||
this.menuTitle=this.$t('add')
|
||||
this.isEdit=false
|
||||
this.form={}
|
||||
this.menuRightVisible=true
|
||||
|
||||
},
|
||||
//树形修改
|
||||
orgEdit(){
|
||||
|
||||
this.menuTitle=this.$t('edit')
|
||||
this.isEdit=true
|
||||
this.form.id=this.nodeItem.id
|
||||
this.form.pid=this.nodeItem.pid
|
||||
this.form.name=this.nodeItem.name
|
||||
this.form.itemName=this.nodeItem.itemName
|
||||
this.form.displaySeq=this.nodeItem.displaySeq
|
||||
this.menuRightVisible=true
|
||||
},
|
||||
//树形删除
|
||||
orgDelete(){
|
||||
|
||||
this.$confirm({
|
||||
content: this.$t('areYouSure'),
|
||||
onOk:
|
||||
async () => {
|
||||
getAction(`split/sarFileSplitMenu/deleteMenu`, { id: this.nodeItem.id }).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.loadMenuData()
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancelMenuRight(){
|
||||
this.menuRightVisible=false
|
||||
@@ -446,7 +524,48 @@
|
||||
//增加条款确定
|
||||
hideModalMenuRight(){
|
||||
this.menuRightVisible=false
|
||||
|
||||
let expandId=[]
|
||||
expandId.push(this.form.pid)
|
||||
if(!this.isEdit){
|
||||
let params={
|
||||
infoId: this.infoId,
|
||||
pid:this.nodeItem.id,
|
||||
...this.form,
|
||||
}
|
||||
this.flag=true
|
||||
// console.log('parms',this.params)
|
||||
postAction(`split/sarFileSplitMenu/addMenu`,params).then(res=>{
|
||||
if(res.success){
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.onExpand(expandId)
|
||||
this.form={}
|
||||
this.loadMenuData()
|
||||
}else{
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
}).finally(()=>{
|
||||
this.flag=false
|
||||
})
|
||||
}else{
|
||||
let params = {
|
||||
infoId: this.infoId,
|
||||
...this.form,
|
||||
}
|
||||
this.flag=true
|
||||
// console.log('parms',params)
|
||||
putAction(`split/sarFileSplitMenu/updateMenu`,params).then(res=>{
|
||||
if(res.success){
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.onExpand(expandId)
|
||||
this.form={}
|
||||
this.loadMenuData()
|
||||
}else{
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
}).finally(()=>{
|
||||
this.flag=false
|
||||
})
|
||||
}
|
||||
},
|
||||
//获取列表数据
|
||||
loadData(){
|
||||
@@ -487,6 +606,7 @@
|
||||
if(res.success){
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.loadData()
|
||||
|
||||
}else{
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
@@ -499,6 +619,9 @@
|
||||
handleAddManage(){
|
||||
this.formTitle=this.$t('add')
|
||||
this.addVisible=true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.splitForm.add()
|
||||
})
|
||||
},
|
||||
closeVisible(val){
|
||||
this.addVisible=val
|
||||
@@ -559,12 +682,15 @@
|
||||
});
|
||||
},
|
||||
//编辑
|
||||
onEdit(val){
|
||||
editClick(val){
|
||||
this.formTitle=this.$t('edit')
|
||||
this.addVisible=true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.splitForm.edit()
|
||||
})
|
||||
},
|
||||
//删除
|
||||
onCancel(val){
|
||||
deleteClick(val){
|
||||
|
||||
},
|
||||
//选择框
|
||||
@@ -681,6 +807,17 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
//正则替换小数点
|
||||
limitNumber(value) {
|
||||
if (typeof value === 'string') {
|
||||
return !isNaN(Number(value)) ? value.replace(/\./g, '') : 0
|
||||
} else if (typeof value === 'number') {
|
||||
return !isNaN(value) ? String(value).replace(/\./g, '') : 0
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -756,4 +893,18 @@
|
||||
min-width: 100px;
|
||||
}
|
||||
}
|
||||
.add-menus{
|
||||
.ant-modal-wrap{
|
||||
.ant-modal-footer{
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
.split-detail-right-wraper{
|
||||
.table-page-search-submitButtons{
|
||||
.ant-col-md-6{
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -4,8 +4,8 @@
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="12">
|
||||
<a-form-item :label="$t('LabeItemName')">
|
||||
<a-input :placeholder="$t('PleaseEnterLabelName')" v-model="queryParams.dictName"></a-input>
|
||||
<a-form-item :label="$t('LabelName')">
|
||||
<a-input :placeholder="$t('PleaseEnter')+$t('LabelName')" v-model="queryParams.dictName"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="12">
|
||||
<a-form-item :label="$t('LabeItemName')">
|
||||
<a-input :placeholder="$t('PleaseEnterLabelName')" v-model="queryParam.dbFieldTxt"></a-input>
|
||||
<a-form-item :label="$t('ChineseName')">
|
||||
<a-input :placeholder="$t('PleaseEnter')+$t('ChineseName')" v-model="queryParam.dbFieldTxt"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
|
||||
Reference in New Issue
Block a user