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

This commit is contained in:
zyx.net
2022-08-09 13:38:10 +08:00
7 changed files with 181 additions and 98 deletions
@@ -21,10 +21,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStream;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
* @Description: 文档对比信息条款评论表
@@ -168,13 +165,19 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
@Override
public void exportResXls(HttpServletResponse response, String infoId, String selectIds, boolean includeComments, String cut) {
LambdaQueryWrapper<SarFileCompareItemComment> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(SarFileCompareItemComment::getInfoId, infoId);
if (!StringUtils.isEmpty(selectIds)) {
queryWrapper.in(SarFileCompareItemComment::getId, Arrays.asList(selectIds.split(",")));
List<SarFileCompareItemComment> list = null;
if (includeComments && StringUtils.isEmpty(selectIds)) {
//只导出全文评论的情况
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);
OutputStream os = null;
@@ -230,7 +233,7 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
row.createCell(6).setCellValue(itemComment.getComment());
i++;
}
if (includeComments) {
if (includeComments || StringUtils.isEmpty(selectIds)) {
Row row = sheet.createRow(i);
if (CutEnum.CN.getValue().equals(cut)) {
row.createCell(0).setCellValue("全文评论");
@@ -167,4 +167,14 @@ public class CountryCardTempItemEOController extends JeroController<CountryCardT
return super.importExcel(request, response, CountryCardTempItemEO.class);
}
@AutoLog(value = "Country Card模板维护-字典项表-通过模板维护表id删除")
@ApiOperation(value="Country Card模板维护-字典项表-通过模板维护表id删除", notes="Country Card模板维护-字典项表-通过模板维护表id删除")
@DeleteMapping(value = "/deleteByCountryCardTempId")
public Result<?> deleteByCountryCardTempId(@RequestParam(name="countryCardTempId",required=true) String countryCardTempId) {
QueryWrapper<CountryCardTempItemEO> deleteWrapper = new QueryWrapper<>();
deleteWrapper.lambda().eq(CountryCardTempItemEO::getCountryCardTempId,countryCardTempId);
this.countryCardTempItemEOService.remove(deleteWrapper);
return Result.OK("删除成功!");
}
}
@@ -91,7 +91,7 @@
},
{
title: this.$t('personCharge'),
dataIndex: 'chargePersonName',
dataIndex: 'chargePersonIdName',
align: 'center',
width: 240,
ellipsis: true
@@ -9,6 +9,31 @@
@close="handleCancel"
:visible="visible"
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">
<a-table
:columns="columns"
@@ -41,18 +66,6 @@
</a-button>
</span>
</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 class="drawer-bootom-button">
@@ -80,15 +93,23 @@
deleteOne: ''
},
title: '',
formInline: {},
rules: {
applyMarket: [
{
required: true,
message: this.$t('LabelType') + this.$t('cannotEmpty'),
trigger: 'change'
}
]
},
visible: false,
selectedRowKeys: [],
dataList: [{}],
loading: false,
pageNo: 1,
pageSize: 10,
total: 0,
confirmLoading: false,
index: '',
applyMarketList: [],
columns: [
{
title: this.$t('LabelName'),
@@ -118,10 +139,21 @@
add() {
this.visible = true
this.title = this.$t('newlyAdded')
this.getApplyMarketList()
},
edit() {
this.visible = true
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) {
this.$refs.uploadFile.perentHandleFunc()
@@ -152,31 +184,20 @@
this.visible = false
},
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() {
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize
}
this.loading = true
postAction(this.url.list, query).then((res) => {
postAction(this.url.list, {}).then((res) => {
if (res.success) {
this.dataList = res.result.records || []
this.total = res.result.total
this.dataList = res.result || []
this.loading = false
} else {
this.dataList = []
this.total = 0
this.loading = false
}
})
@@ -204,21 +225,6 @@
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 {
height: 38px;
width: 100%;
@@ -227,4 +233,45 @@
border: 1px #00B3BE solid;
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>
@@ -37,6 +37,7 @@
</div>
<a-form-model-item class="itemModel" prop="lableType">
<a-select :placeholder="$t('PleaseSelect')+$t('LabelType')"
:disabled="lableTypeDisabled"
@change="lableTypeChange"
v-model="formInline.lableType">
<a-select-option v-for="(item, key) in lableTypeList"
@@ -123,7 +124,7 @@
</template>
<script>
import { getAction, postAction, downloadFile } from '@/api/manage'
import { getAction, postAction, downloadFile,deleteAction } from '@/api/manage'
import optionMaintenance from './optionMaintenance'
export default {
@@ -137,6 +138,7 @@
disabled: false,
confirmLoading: false,
formInline: {},
lableTypeDisabled: false,
isDisplay: false,
lableTypeList: [
{
@@ -198,7 +200,8 @@
dropDownOptionsId: '',
url: {
add: '/problemKnowledgeBase/countryCardTempEO/add',
edit: '/problemKnowledgeBase/countryCardTempEO/edit'
edit: '/problemKnowledgeBase/countryCardTempEO/edit',
deleteOne: '/problemKnowledgeBase/countryCardTempItemEO/deleteByCountryCardTempId'
}
}
},
@@ -231,6 +234,8 @@
this.visible = true
this.isDisplay = false
this.title = this.$t('addLabel')
this.dropDownOptionsId = ''
this.lableTypeDisabled = false
this.$nextTick(() => {
this.formInline = {}
this.$refs.ruleForm.clearValidate()
@@ -239,8 +244,10 @@
edit(data) {
this.visible = true
this.title = this.$t('editLabel')
this.lableTypeDisabled = true
this.$nextTick(() => {
this.formInline = data
this.dropDownOptionsId = this.formInline.id
if (this.formInline.lableType == 3) {
this.isDisplay = true
} else {
@@ -261,7 +268,11 @@
url = this.url.edit
} else {
url = this.url.add
if (this.formInline.lableType == 3) {
this.formInline.id = this.dropDownOptionsId
}
}
this.confirmLoading = true
postAction(url, this.formInline).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
@@ -278,6 +289,10 @@
},
handleCancel() {
this.visible = false
if (this.formInline.lableType == 3) {
deleteAction(this.url.deleteOne, { countryCardTempId: this.dropDownOptionsId }).then((res) => {
})
}
}
}
}
@@ -46,7 +46,7 @@
</div>
</a-drawer>
<optionMaintenanceAdd ref="optionMaintenanceAddRef"
@classificationMaintenanceAddForm="optionMaintenanceAddForm"/>
@optionMaintenanceAddForm="optionMaintenanceAddForm"/>
</div>
</template>
@@ -76,20 +76,23 @@
columns: [
{
title: this.$t('name'),
dataIndex: 'name',
dataIndex: 'itemText',
align: 'center',
width: 200,
ellipsis: true
},
{
title: this.$t('enName'),
dataIndex: 'enName',
align: 'center',
width: 200,
ellipsis: true
},
{
title: this.$t('describe'),
dataIndex: 'describe',
dataIndex: 'description',
align: 'center',
width: 260,
ellipsis: true
},
{
@@ -17,9 +17,9 @@
<span class="title-text-text"
:title="$t('name')">{{$t('name')}}</span>
</div>
<a-form-model-item class="itemModel" prop="name">
<a-form-model-item class="itemModel" prop="itemText">
<a-input class="box-input"
v-model="formInline.name"
v-model.trim="formInline.itemText"
:placeholder="$t('PleaseEnter')+$t('name')"/>
</a-form-model-item>
</div>
@@ -35,28 +35,28 @@
</div>
<a-form-model-item class="itemModel" prop="enName">
<a-input class="box-input"
v-model="formInline.enName"
v-model.trim="formInline.enName"
:placeholder="$t('PleaseEnter')+$t('enName')"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('DisplayOrder')">{{$t('DisplayOrder')}}</span>
</div>
<a-form-model-item class="itemModel" prop="DisplayOrder">
<a-input-number class="box-input"
v-model="formInline.DisplayOrder"
:placeholder="$t('PleaseEnter')+$t('DisplayOrder')"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<!-- <a-row :gutter="24">-->
<!-- <a-col :span="24">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="Required">*</span>-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('DisplayOrder')">{{$t('DisplayOrder')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" prop="DisplayOrder">-->
<!-- <a-input-number class="box-input"-->
<!-- v-model="formInline.DisplayOrder"-->
<!-- :placeholder="$t('PleaseEnter')+$t('DisplayOrder')"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </a-row>-->
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
@@ -64,11 +64,11 @@
<span class="title-text-text"
:title="$t('describe')">{{$t('describe')}}</span>
</div>
<a-form-model-item class="itemModel" prop="describe">
<a-form-model-item class="itemModel" prop="description">
<a-textarea
:placeholder="$t('PleaseEnter')+$t('describe')"
:disabled="disabled"
v-model="formInline.describe" :rows="4"/>
v-model.trim="formInline.description" :rows="4"/>
</a-form-model-item>
</div>
</a-col>
@@ -78,7 +78,7 @@
</template>
<script>
import { getAction, postAction, downloadFile } from '@/api/manage'
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
export default {
name: 'optionMaintenanceAdd',
@@ -90,7 +90,7 @@
disabled: false,
dataId: '',
rules: {
name: [
itemText: [
{
required: true,
message: this.$t('name') + this.$t('cannotEmpty'),
@@ -114,14 +114,14 @@
trigger: 'blur'
}
],
DisplayOrder: [
{
required: true,
message: this.$t('DisplayOrder') + this.$t('cannotEmpty'),
trigger: 'blur'
}
],
describe: [
// DisplayOrder: [
// {
// required: true,
// message: this.$t('DisplayOrder') + this.$t('cannotEmpty'),
// trigger: 'blur'
// }
// ],
description: [
{
max: 300,
message: this.$t('describe') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
@@ -165,18 +165,23 @@
this.$refs.ruleForm.validate(valid => {
if (valid) {
let url = ''
let Action
if (this.formInline.id) {
url = this.url.edit
Action = putAction
} else {
url = this.url.add
Action = postAction
}
this.formInline.countryCardTempId = this.dataId
postAction(url, this.formInline).then((res) => {
if (!this.formInline.id) {
this.formInline.countryCardTempId = this.dataId
}
Action(url, this.formInline).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.confirmLoading = false
this.$emit('countryCardReleaseModelAddForm')
this.$emit('optionMaintenanceAddForm')
} else {
this.confirmLoading = false
this.$message.warning(this.$t('operationFailed'))