修改bug

This commit is contained in:
caoyang
2022-03-30 22:19:08 +08:00
parent 6324e40d2d
commit 66ecd07c6e
13 changed files with 90 additions and 97 deletions
+2 -1
View File
@@ -563,5 +563,6 @@ module.exports = {
batSetting:'batch setting',
selectDirectoryTerms:'please select the directory location to add terms',
StandardBreakdown:"Standard breakdown",
OnlyWord: 'only word files can be imported',
labelAreaDeleted:'If it is deleted, all label items under the display area will be deleted',
}
+3
View File
@@ -566,5 +566,8 @@ module.exports = {
documentSplitTemplate:'文档拆分模板',
batSetting:'批量设置',
selectDirectoryTerms:'请选择添加条款的目录位置',
OnlyWord:'只能导入word文件',
labelAreaDeleted:'若进行删除则该展示区域下标签项都将被删除',
StandardBreakdown:'标准分解单',
}
@@ -424,7 +424,7 @@
})
}
}
if (res.field_show_type === '1' || res.field_show_type === '2' ||
if (res.field_show_type === '1' ||
res.field_show_type === '8' || res.field_show_type === '9' || res.field_show_type === '10'
|| res.field_show_type === '11') {
rule.push({
@@ -95,10 +95,10 @@
<span class="Standard-breakdown" v-if="ol.splitFlag == 1" @click="breakdown(ol)">{{$t('StandardBreakdown')}}</span>
</td>
<td class="tdInformation rightTdInformation">
<span v-show="ol.value" @click="download(ol.value)">
<a-icon type="vertical-align-bottom"/>
{{$t('download')}}
</span>
<span v-if="ol.field_show_type==='7'" v-show="ol.value" @click="download(ol.value)">
<a-icon type="vertical-align-bottom"/>
{{$t('download')}}
</span>
</td>
</tr>
</table>
@@ -3,26 +3,6 @@
<a-card :bordered="false">
<div class="splitting-search-wrapper">
<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">
@@ -49,34 +29,6 @@
@deleteDetail="deleteDetail"
@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>
@@ -226,19 +178,16 @@
content: '',
onOk:
async () => {
// let formData = new FormData();
// formData.append('params', params)
// console.log('formdata',formData)
axios({
url: '/jero-boot/split/sarFileSplitInfo/deleteBatch',
method: 'post',
method: 'get',
data: params,
transformRequest: [function (data) {
let ret = ''
for (let it in data) {
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
}
return ret
}],
params:params,
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
// 'Content-Type': 'multipart/form-data',
'X-Access-Token':this.token
}
}).then(res => {
@@ -91,7 +91,7 @@
</template>
<script>
import { getAction, postAction, deleteAction, downFile } from '@/api/manage'
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
import SplitUpload from '@/components/SplitUpload/index'
import search from '@/components/search/index'
import TableData from '@/components/OcrTable/DocTable'
@@ -234,7 +234,8 @@
},
//模板下载
downLoad(){
let name = this.$t('documentSplitTemplate')+'.xls'
downloadFile('split/sarFileSplitItems/exportTemplate',name, {})
}
}
}
@@ -654,6 +654,7 @@
},
//保存
splitSave(){
console.log('vallll',this.contentList)
// console.log('formInline',this.formInline)
this.$refs.splitEditForm.validate(valid=>{
if(valid){
@@ -773,12 +774,12 @@
for(let i = this.contentList.length;i>this.addIndex;i--){
this.contentList[i+lengthImg-1]=this.contentList[i-1]
}
if(imgs && imgs.length > 0){
imgs.forEach(item => {
if(data && data.length > 0){
data.forEach(item => {
this.contentList[++this.addIndex]={
id:'',
type:'IMG',
itemContent:item.url
itemContent:item.id
}
})
}
@@ -810,6 +811,7 @@
type:'TABLE',
itemContent:val
}
},
//取消行数列数按钮
handleColCancel(){
@@ -553,7 +553,16 @@
url: '/jero-boot/split/sarFileSplitMenu/copyMenuNotChildren',
method: 'post',
data: params,
transformRequest: [function (data) {
// Do whatever you want to transform the data
let ret = ''
for (let it in data) {
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
}
return ret
}],
headers: {
// 'Content-Type': 'application/x-www-form-urlencoded',
'X-Access-Token':this.token
}
})
@@ -567,17 +576,6 @@
this.$message.warning(this.$t('operationFailed'))
}
})
// postAction(`split/sarFileSplitMenu/copyMenuNotChildren`,params).then(res=> {
// if(res.success){
// this.$message.success(this.$t('OperationSuccessful'))
// // this.loadData()
// this.loadMenuData()
// eventBUs.$emit('searchReset')
// }else{
// this.$message.warning(this.$t('operationFailed'))
// }
// })
},
onCancel() {},
});
@@ -621,7 +619,7 @@
let name = this.$t('DocumentSplitting')+'.zip'
let query = {
infoId:this.infoId,
exportName:name,
exportName:'',
idList:this.selectedRowKeys.join(',')
}
@@ -127,7 +127,7 @@
seachList: 'document/bussDocumentLibraryEO/getHeaderOrConditionForOcr', //搜索字段
tableList: 'document/bussDocumentLibraryEO/ocrPageInfo', //表格数据
},
type:'doc',
type:'',
OperationList:[]
}
},
@@ -205,7 +205,7 @@
if (file.file_name) {
let name = file.file_name.split('.')
let nameSuffix = name[name.length - 1]
if (nameSuffix.toLowerCase() === 'doc'||nameSuffix.toLowerCase() === 'docx') {
// if (nameSuffix.toLowerCase() === 'doc'||nameSuffix.toLowerCase() === 'docx') {
let params = {
attId: file.id,
standName: file.title,
@@ -236,9 +236,9 @@
}
})
// this.$emit('exportVisible',true)
} else {
this.$message.warning(this.$t('OnlyPDF'))
}
// } else {
// this.$message.warning(this.$t('OnlyWord'))
// }
}
}
}
@@ -7,7 +7,9 @@
</div>
</div>
<!-- <a-button type="primary" @click="showModal">新增</a-button>-->
<!-- <a-spin :spinning="spinLoading">-->
<a-modal class="area-module" v-model="newVisible" :title="title" :ok-text="$t('preservation')" :cancel-text="$t('cancel')" @ok="hideModal" @cancel="cancelModel" v-if="newVisible">
<a-spin :spinning="spinLoading">
<a-form-model
class="tag-module"
ref="ruleForm"
@@ -55,7 +57,9 @@
/>
</a-form-model-item>
</a-form-model>
</a-spin>
</a-modal>
<!-- </a-spin>-->
<a-table
class="table-area"
ref="table"
@@ -65,6 +69,7 @@
:dataSource="areaTable"
:pagination="false"
:loading="loading"
:scroll="{x: 600}"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<a slot="name" slot-scope="text">{{ text }}</a>
@@ -114,23 +119,26 @@
key: 'showArea',
align: "center",
width: 100,
ellipsis: true,
},
{
title: this.$t('enName'),
align: "center",
width: 100,
dataIndex: 'enName',
ellipsis: true,
},
{
title: this.$t('Module'),
align: "center",
width: 100,
dataIndex: 'isModelName',
ellipsis: true,
},
{
title: this.$t('SortNumber'),
align: "center",
width: 80,
width: 40,
dataIndex: 'sort',
},
{
@@ -138,7 +146,7 @@
dataIndex: 'action',
scopedSlots: {customRender: 'action'},
align: "center",
width: 120
width: 60
}
],
newVisible:false,
@@ -175,6 +183,7 @@
},
areaTable:[],
flag:false, //表单提交标识
spinLoading:false,
}
},
props:{
@@ -208,12 +217,16 @@
showModal() {
this.title=this.$t('add')
this.newVisible = true;
this.form={
}
},
//新增
hideModal() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
this.flag=true
this.spinLoading=true
//编辑
if(this.form.id){
putAction(`tag/onlCgformArea/edit`,this.form).then((res)=>{
@@ -227,10 +240,24 @@
sort:''
}
}else{
this.$message.warning(this.$t('operationFailed'))
this.$message.warning(res.message)
this.form={
isModel:'',
showArea:'',
enName:'',
sort:''
}
}
}).finally(()=>{
this.flag=false
this.spinLoading=false
this.newVisible = false;
this.form={
isModel:'',
showArea:'',
enName:'',
sort:''
}
})
}else{
//新增
@@ -245,15 +272,18 @@
sort:''
}
}else{
this.$message.warning(this.$t('operationFailed'))
// this.$message.warning(this.$t('operationFailed'))
this.$message.warning(res.message)
}
}
).finally(()=>{
this.flag=false
this.spinLoading=false
this.newVisible = false;
})
}
this.newVisible = false;
} else {
// console.log('error submit!!');
return false;
@@ -268,7 +298,7 @@
//删除按钮
deleteArea(val){
this.$confirm({
title: this.$t('ConfirmDelete'),
title: this.$t('labelAreaDeleted'),
content: '',
onOk:
async () => {
@@ -280,6 +310,7 @@
}
this.loadData()
}else{
// this.$message.warning(res.message)
if(res.message=='该“展示区域”有关联数据,无法删除!'){
this.$message.warning(this.$t('noDelete'))
}else{
@@ -4,7 +4,9 @@
<div class="dic-list-header">
<a-form :model="queryParams" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-form-item :label="$t('name')+':'">
<a-input v-model="queryParams.name" :placeholder="$t('enterName')" />
<a-input v-if="dictVal=='tree'" v-model="queryParams.name" :placeholder="$t('enterName')" />
<j-input v-if="dictVal=='list'" v-model="queryParams.itemText" :placeholder="$t('enterName')" />
</a-form-item>
</a-form>
<div class="form-btn">
@@ -50,7 +50,7 @@
<!-- <j-dict-select-tag type="list" v-model="form.dictName" dictCode="" placeholder="请选择选项内容" />-->
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="24" v-if="isLength">
<a-form-model-item :label="$t('FieldLength')" prop="dbLength">
<a-input-number v-model="form.dbLength" :min="1" :max="200" :placeholder="$t('PleaseEnterFieldLength')" style="width: 100%" :formatter="limitNumber" :parser="limitNumber" />
</a-form-model-item>
@@ -229,25 +229,31 @@
contentOption2:[],
isTagContent:false,
isSearch:true,
isLength:true,
flag:false, //表单提交标识
}
},
watch:{
'form.fieldShowType'(val){
// this.contentFlag=val
if(val==0){
if(val===0){
this.contentOption=[...this.contentOption2]
this.isTagContent=true
}else if(val==3||val==4){
}else if(val===3||val===4){
this.contentOption=[...this.contentOption1]
this.isTagContent=true
}else if(val==7) {
}else if(val===7) {
this.isSearch=false
this.form.isQuery=0
}else{
this.isTagContent=false
this.isSearch=true
}
if(val===1||val===8||val===9||val===10||val===11||val==='sel_user'){
this.isLength=true
}else{
this.isLength=false
}
},
},
computed: {
@@ -441,7 +441,7 @@
.show-area{
.ant-modal-wrap{
.ant-modal{
width: 800px!important;
width: 1000px!important;
}
}
.diolag-area{