Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage

This commit is contained in:
wangzhijiang
2022-08-09 13:48:39 +08:00
7 changed files with 179 additions and 108 deletions
@@ -21,10 +21,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.io.OutputStream; import java.io.OutputStream;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Arrays; import java.util.*;
import java.util.Date;
import java.util.List;
import java.util.Map;
/** /**
* @Description: 文档对比信息条款评论表 * @Description: 文档对比信息条款评论表
@@ -168,13 +165,19 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
@Override @Override
public void exportResXls(HttpServletResponse response, String infoId, String selectIds, boolean includeComments, String cut) { public void exportResXls(HttpServletResponse response, String infoId, String selectIds, boolean includeComments, String cut) {
LambdaQueryWrapper<SarFileCompareItemComment> queryWrapper = new LambdaQueryWrapper<>(); List<SarFileCompareItemComment> list = null;
queryWrapper.eq(SarFileCompareItemComment::getInfoId, infoId); if (includeComments && StringUtils.isEmpty(selectIds)) {
if (!StringUtils.isEmpty(selectIds)) { //只导出全文评论的情况
queryWrapper.in(SarFileCompareItemComment::getId, Arrays.asList(selectIds.split(","))); list = new ArrayList<>();
} else {
LambdaQueryWrapper<SarFileCompareItemComment> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(SarFileCompareItemComment::getInfoId, infoId);
if (!StringUtils.isEmpty(selectIds)) {
queryWrapper.in(SarFileCompareItemComment::getId, Arrays.asList(selectIds.split(",")));
}
queryWrapper.orderBy(true, true, SarFileCompareItemComment::getCreateTime);
list = this.list(queryWrapper);
} }
queryWrapper.orderBy(true, true, SarFileCompareItemComment::getCreateTime);
List<SarFileCompareItemComment> list = this.list(queryWrapper);
Map<String, SarFileCompareItem> sfcItemMap = SarFileCompareItemServiceImpl.queryMapByInfoId(infoId); Map<String, SarFileCompareItem> sfcItemMap = SarFileCompareItemServiceImpl.queryMapByInfoId(infoId);
OutputStream os = null; OutputStream os = null;
@@ -230,7 +233,7 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
row.createCell(6).setCellValue(itemComment.getComment()); row.createCell(6).setCellValue(itemComment.getComment());
i++; i++;
} }
if (includeComments) { if (includeComments || StringUtils.isEmpty(selectIds)) {
Row row = sheet.createRow(i); Row row = sheet.createRow(i);
if (CutEnum.CN.getValue().equals(cut)) { if (CutEnum.CN.getValue().equals(cut)) {
row.createCell(0).setCellValue("全文评论"); row.createCell(0).setCellValue("全文评论");
@@ -91,7 +91,7 @@
}, },
{ {
title: this.$t('personCharge'), title: this.$t('personCharge'),
dataIndex: 'chargePersonName', dataIndex: 'chargePersonIdName',
align: 'center', align: 'center',
width: 240, width: 240,
ellipsis: true ellipsis: true
@@ -9,6 +9,31 @@
@close="handleCancel" @close="handleCancel"
:visible="visible" :visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;"> style="height: 100%;overflow: auto;padding-bottom: 53px;">
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('applicableMarket')">{{$t('applicableMarket')}}</span>
</div>
<a-form-model-item class="itemModel" prop="applyMarket">
<a-select :placeholder="$t('PleaseSelect')+$t('applicableMarket')"
v-model="formInline.applyMarket">
<a-select-option v-for="(item, key) in applyMarketList"
:key="key"
:value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.title ">
{{ item.title}}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
<div style="margin-bottom: 60px"> <div style="margin-bottom: 60px">
<a-table <a-table
:columns="columns" :columns="columns"
@@ -41,18 +66,6 @@
</a-button> </a-button>
</span> </span>
</a-table> </a-table>
<div class="page" v-if="dataList.length > 0">
<a-pagination
:show-total="total => $t('total')+`${total}`+$t('strip')"
show-quick-jumper
show-size-changer
:page-size.sync="pageSize"
:total="total"
:current="pageNo"
@change="onChange"
@showSizeChange="SizeChange"
/>
</div>
</div> </div>
<div class="drawer-bootom-button"> <div class="drawer-bootom-button">
@@ -80,15 +93,23 @@
deleteOne: '' deleteOne: ''
}, },
title: '', title: '',
formInline: {},
rules: {
applyMarket: [
{
required: true,
message: this.$t('LabelType') + this.$t('cannotEmpty'),
trigger: 'change'
}
]
},
visible: false, visible: false,
selectedRowKeys: [], selectedRowKeys: [],
dataList: [{}], dataList: [{}],
loading: false, loading: false,
pageNo: 1,
pageSize: 10,
total: 0,
confirmLoading: false, confirmLoading: false,
index: '', index: '',
applyMarketList: [],
columns: [ columns: [
{ {
title: this.$t('LabelName'), title: this.$t('LabelName'),
@@ -118,10 +139,21 @@
add() { add() {
this.visible = true this.visible = true
this.title = this.$t('newlyAdded') this.title = this.$t('newlyAdded')
this.getApplyMarketList()
}, },
edit() { edit() {
this.visible = true this.visible = true
this.title = this.$t('edit') this.title = this.$t('edit')
this.getApplyMarketList()
},
getApplyMarketList() {
getAction('/problemKnowledgeBase/countryCardManageReleaseEO/getApplyMarketList', {}).then((res) => {
if (res.success) {
this.applyMarketList = res.result || []
} else {
this.applyMarketList = []
}
})
}, },
clickButtonToUpload(item, index) { clickButtonToUpload(item, index) {
this.$refs.uploadFile.perentHandleFunc() this.$refs.uploadFile.perentHandleFunc()
@@ -152,31 +184,20 @@
this.visible = false this.visible = false
}, },
handleSubmit() { handleSubmit() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
}, }
onChange(page, pageSize) { })
this.pageNo = page
this.replacePage()
},
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.replacePage()
}, },
replacePage() { replacePage() {
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize
}
this.loading = true this.loading = true
postAction(this.url.list, query).then((res) => { postAction(this.url.list, {}).then((res) => {
if (res.success) { if (res.success) {
this.dataList = res.result.records || [] this.dataList = res.result || []
this.total = res.result.total
this.loading = false this.loading = false
} else { } else {
this.dataList = [] this.dataList = []
this.total = 0
this.loading = false this.loading = false
} }
}) })
@@ -204,21 +225,6 @@
border-radius: 0 0 2px 2px; border-radius: 0 0 2px 2px;
} }
.box-title {
width: 100%;
text-align: right;
margin-bottom: 20px;
}
.operator-text {
cursor: pointer;
margin-right: 13px;
font-size: 14px;
font-weight: 400;
color: #040B29;
display: inline-block;
}
.button-text { .button-text {
height: 38px; height: 38px;
width: 100%; width: 100%;
@@ -227,4 +233,45 @@
border: 1px #00B3BE solid; border: 1px #00B3BE solid;
color: #00B3BE; color: #00B3BE;
} }
.box-title-text {
line-height: 1.4;
display: flex;
}
.title-text {
width: 84px;
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;
}
.box-input {
display: inline-block;
height: 38px;
width: 100%;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
}
.title-text-text {
margin-top: 9px;
}
.Required {
color: red;
margin-right: 4px;
}
</style> </style>
@@ -37,6 +37,7 @@
</div> </div>
<a-form-model-item class="itemModel" prop="lableType"> <a-form-model-item class="itemModel" prop="lableType">
<a-select :placeholder="$t('PleaseSelect')+$t('LabelType')" <a-select :placeholder="$t('PleaseSelect')+$t('LabelType')"
:disabled="lableTypeDisabled"
@change="lableTypeChange" @change="lableTypeChange"
v-model="formInline.lableType"> v-model="formInline.lableType">
<a-select-option v-for="(item, key) in lableTypeList" <a-select-option v-for="(item, key) in lableTypeList"
@@ -123,7 +124,7 @@
</template> </template>
<script> <script>
import { getAction, postAction, downloadFile } from '@/api/manage' import { getAction, postAction, downloadFile,deleteAction } from '@/api/manage'
import optionMaintenance from './optionMaintenance' import optionMaintenance from './optionMaintenance'
export default { export default {
@@ -137,6 +138,7 @@
disabled: false, disabled: false,
confirmLoading: false, confirmLoading: false,
formInline: {}, formInline: {},
lableTypeDisabled: false,
isDisplay: false, isDisplay: false,
lableTypeList: [ lableTypeList: [
{ {
@@ -198,7 +200,8 @@
dropDownOptionsId: '', dropDownOptionsId: '',
url: { url: {
add: '/problemKnowledgeBase/countryCardTempEO/add', add: '/problemKnowledgeBase/countryCardTempEO/add',
edit: '/problemKnowledgeBase/countryCardTempEO/edit' edit: '/problemKnowledgeBase/countryCardTempEO/edit',
deleteOne: '/problemKnowledgeBase/countryCardTempItemEO/deleteByCountryCardTempId'
} }
} }
}, },
@@ -231,6 +234,8 @@
this.visible = true this.visible = true
this.isDisplay = false this.isDisplay = false
this.title = this.$t('addLabel') this.title = this.$t('addLabel')
this.dropDownOptionsId = ''
this.lableTypeDisabled = false
this.$nextTick(() => { this.$nextTick(() => {
this.formInline = {} this.formInline = {}
this.$refs.ruleForm.clearValidate() this.$refs.ruleForm.clearValidate()
@@ -239,8 +244,10 @@
edit(data) { edit(data) {
this.visible = true this.visible = true
this.title = this.$t('editLabel') this.title = this.$t('editLabel')
this.lableTypeDisabled = true
this.$nextTick(() => { this.$nextTick(() => {
this.formInline = data this.formInline = data
this.dropDownOptionsId = this.formInline.id
if (this.formInline.lableType == 3) { if (this.formInline.lableType == 3) {
this.isDisplay = true this.isDisplay = true
} else { } else {
@@ -261,7 +268,11 @@
url = this.url.edit url = this.url.edit
} else { } else {
url = this.url.add url = this.url.add
if (this.formInline.lableType == 3) {
this.formInline.id = this.dropDownOptionsId
}
} }
this.confirmLoading = true
postAction(url, this.formInline).then((res) => { postAction(url, this.formInline).then((res) => {
if (res.success) { if (res.success) {
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
@@ -278,6 +289,10 @@
}, },
handleCancel() { handleCancel() {
this.visible = false this.visible = false
if (this.formInline.lableType == 3) {
deleteAction(this.url.deleteOne, { countryCardTempId: this.dropDownOptionsId }).then((res) => {
})
}
} }
} }
} }
@@ -46,7 +46,7 @@
</div> </div>
</a-drawer> </a-drawer>
<optionMaintenanceAdd ref="optionMaintenanceAddRef" <optionMaintenanceAdd ref="optionMaintenanceAddRef"
@classificationMaintenanceAddForm="optionMaintenanceAddForm"/> @optionMaintenanceAddForm="optionMaintenanceAddForm"/>
</div> </div>
</template> </template>
@@ -76,20 +76,23 @@
columns: [ columns: [
{ {
title: this.$t('name'), title: this.$t('name'),
dataIndex: 'name', dataIndex: 'itemText',
align: 'center', align: 'center',
width: 200,
ellipsis: true ellipsis: true
}, },
{ {
title: this.$t('enName'), title: this.$t('enName'),
dataIndex: 'enName', dataIndex: 'enName',
align: 'center', align: 'center',
width: 200,
ellipsis: true ellipsis: true
}, },
{ {
title: this.$t('describe'), title: this.$t('describe'),
dataIndex: 'describe', dataIndex: 'description',
align: 'center', align: 'center',
width: 260,
ellipsis: true ellipsis: true
}, },
{ {
@@ -17,9 +17,9 @@
<span class="title-text-text" <span class="title-text-text"
:title="$t('name')">{{$t('name')}}</span> :title="$t('name')">{{$t('name')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="name"> <a-form-model-item class="itemModel" prop="itemText">
<a-input class="box-input" <a-input class="box-input"
v-model="formInline.name" v-model.trim="formInline.itemText"
:placeholder="$t('PleaseEnter')+$t('name')"/> :placeholder="$t('PleaseEnter')+$t('name')"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -35,28 +35,28 @@
</div> </div>
<a-form-model-item class="itemModel" prop="enName"> <a-form-model-item class="itemModel" prop="enName">
<a-input class="box-input" <a-input class="box-input"
v-model="formInline.enName" v-model.trim="formInline.enName"
:placeholder="$t('PleaseEnter')+$t('enName')"/> :placeholder="$t('PleaseEnter')+$t('enName')"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="24"> <!-- <a-row :gutter="24">-->
<a-col :span="24"> <!-- <a-col :span="24">-->
<div class="box-title-text"> <!-- <div class="box-title-text">-->
<div class="title-text"> <!-- <div class="title-text">-->
<span class="Required">*</span> <!-- <span class="Required">*</span>-->
<span class="title-text-text" <!-- <span class="title-text-text"-->
:title="$t('DisplayOrder')">{{$t('DisplayOrder')}}</span> <!-- :title="$t('DisplayOrder')">{{$t('DisplayOrder')}}</span>-->
</div> <!-- </div>-->
<a-form-model-item class="itemModel" prop="DisplayOrder"> <!-- <a-form-model-item class="itemModel" prop="DisplayOrder">-->
<a-input-number class="box-input" <!-- <a-input-number class="box-input"-->
v-model="formInline.DisplayOrder" <!-- v-model="formInline.DisplayOrder"-->
:placeholder="$t('PleaseEnter')+$t('DisplayOrder')"/> <!-- :placeholder="$t('PleaseEnter')+$t('DisplayOrder')"/>-->
</a-form-model-item> <!-- </a-form-model-item>-->
</div> <!-- </div>-->
</a-col> <!-- </a-col>-->
</a-row> <!-- </a-row>-->
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="24"> <a-col :span="24">
<div class="box-title-text"> <div class="box-title-text">
@@ -64,11 +64,11 @@
<span class="title-text-text" <span class="title-text-text"
:title="$t('describe')">{{$t('describe')}}</span> :title="$t('describe')">{{$t('describe')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="describe"> <a-form-model-item class="itemModel" prop="description">
<a-textarea <a-textarea
:placeholder="$t('PleaseEnter')+$t('describe')" :placeholder="$t('PleaseEnter')+$t('describe')"
:disabled="disabled" :disabled="disabled"
v-model="formInline.describe" :rows="4"/> v-model.trim="formInline.description" :rows="4"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -78,7 +78,7 @@
</template> </template>
<script> <script>
import { getAction, postAction, downloadFile } from '@/api/manage' import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
export default { export default {
name: 'optionMaintenanceAdd', name: 'optionMaintenanceAdd',
@@ -90,7 +90,7 @@
disabled: false, disabled: false,
dataId: '', dataId: '',
rules: { rules: {
name: [ itemText: [
{ {
required: true, required: true,
message: this.$t('name') + this.$t('cannotEmpty'), message: this.$t('name') + this.$t('cannotEmpty'),
@@ -114,14 +114,14 @@
trigger: 'blur' trigger: 'blur'
} }
], ],
DisplayOrder: [ // DisplayOrder: [
{ // {
required: true, // required: true,
message: this.$t('DisplayOrder') + this.$t('cannotEmpty'), // message: this.$t('DisplayOrder') + this.$t('cannotEmpty'),
trigger: 'blur' // trigger: 'blur'
} // }
], // ],
describe: [ description: [
{ {
max: 300, max: 300,
message: this.$t('describe') + this.$t('cannotExceed') + 300 + this.$t('Characters'), message: this.$t('describe') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
@@ -165,18 +165,23 @@
this.$refs.ruleForm.validate(valid => { this.$refs.ruleForm.validate(valid => {
if (valid) { if (valid) {
let url = '' let url = ''
let Action
if (this.formInline.id) { if (this.formInline.id) {
url = this.url.edit url = this.url.edit
Action = putAction
} else { } else {
url = this.url.add url = this.url.add
Action = postAction
} }
this.formInline.countryCardTempId = this.dataId if (!this.formInline.id) {
postAction(url, this.formInline).then((res) => { this.formInline.countryCardTempId = this.dataId
}
Action(url, this.formInline).then((res) => {
if (res.success) { if (res.success) {
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
this.visible = false this.visible = false
this.confirmLoading = false this.confirmLoading = false
this.$emit('countryCardReleaseModelAddForm') this.$emit('optionMaintenanceAddForm')
} else { } else {
this.confirmLoading = false this.confirmLoading = false
this.$message.warning(this.$t('operationFailed')) this.$message.warning(this.$t('operationFailed'))
@@ -134,15 +134,15 @@
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="24"> <a-row :gutter="24" v-if='required'>
<a-col :span="24"> <a-col :span="24">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if='required'>*</span> <span class="Required">*</span>
<span class="title-text-text" <span class="title-text-text"
:title="$t('NcertificationCategory')">{{$t('NcertificationCategory')}}</span> :title="$t('NcertificationCategory')">{{$t('NcertificationCategory')}}</span>
</div> </div>
<a-form-model-item class="itemModel-multi" :prop="required?certCategory:''"> <a-form-model-item class="itemModel-multi" prop="certCategory">
<j-multi-select-tag-only-rz class="box-input" v-model="formInline.certCategory" <j-multi-select-tag-only-rz class="box-input" v-model="formInline.certCategory"
@change='Onchange' @change='Onchange'
v-on:changelabel='Onchangelabel' v-on:changelabel='Onchangelabel'
@@ -248,15 +248,15 @@
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="24"> <a-row :gutter="24" >
<a-col :span="24" v-if='contentList != []'> <a-col :span="24" v-if='required'>
<a-tabs> <a-tabs>
<a-tab-pane v-for='(item,index) in contentList' :tab="item.cut == 'cn' ? item.text : item.textEn" :key="index + 1"> <a-tab-pane v-for='(item,index) in contentList' :tab="item.cut == 'cn' ? item.text : item.textEn" :key="index + 1">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if='required'>*</span> <span class="Required">*</span>
<span class="title-text-text" <span class="title-text-text"
:title="$t('ParameterNo')">{{$t('ParameterNo')}}</span> :title="$t('ParameterNo')">{{$t('ParameterNo')}}</span>
</div> </div>
@@ -271,7 +271,7 @@
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if='required'>*</span> <span class="Required">*</span>
<span class="title-text-text" :title="$t('NParameterName')">{{$t('NParameterName')}}</span> <span class="title-text-text" :title="$t('NParameterName')">{{$t('NParameterName')}}</span>
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
@@ -679,7 +679,6 @@ export default {
return return
} }
let falg = 1 let falg = 1
if(this.formInline.controlType != 11){
this.contentList.forEach((item,index) => { this.contentList.forEach((item,index) => {
let reg = /^[0-9a-zA-Z-/. ]{1,}$/ let reg = /^[0-9a-zA-Z-/. ]{1,}$/
// 编号的限制 // 编号的限制
@@ -715,7 +714,6 @@ export default {
} }
} }
}) })
}
if(falg === 1) { if(falg === 1) {
this.$refs.ruleForm.validate(valid => { this.$refs.ruleForm.validate(valid => {