Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage
This commit is contained in:
@@ -836,3 +836,7 @@ ALTER TABLE `laws_weilai`.`problem_knowledge_base`
|
||||
MODIFY COLUMN `buss_document_library_id` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文档库id' AFTER `target_market`,
|
||||
MODIFY COLUMN `stand_number` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标准编号' AFTER `buss_document_library_id`,
|
||||
MODIFY COLUMN `stand_title` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标准标题' AFTER `stand_number`;
|
||||
|
||||
-- 问题知识库 字段类型修改 2022-08-09
|
||||
ALTER TABLE `laws_weilai`.`problem_knowledge_base`
|
||||
MODIFY COLUMN `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '内容(正文)' AFTER `stand_title`;
|
||||
|
||||
+5
-3
@@ -59,6 +59,7 @@ public class CountryCardManageReleaseDetailEOController extends JeroController<C
|
||||
QueryWrapper<CountryCardManageReleaseDetailEO> queryWrapper = QueryGenerator.initQueryWrapper(countryCardManageReleaseDetailEO, req.getParameterMap());
|
||||
Page<CountryCardManageReleaseDetailEO> page = new Page<CountryCardManageReleaseDetailEO>(pageNo, pageSize);
|
||||
IPage<CountryCardManageReleaseDetailEO> pageList = countryCardManageReleaseDetailEOService.page(page, queryWrapper);
|
||||
this.countryCardManageReleaseDetailEOService.disposeData(pageList.getRecords(),countryCardManageReleaseDetailEO.getCut());
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
@@ -70,9 +71,10 @@ public class CountryCardManageReleaseDetailEOController extends JeroController<C
|
||||
@AutoLog(value = "问题知识库-country_card-管理发布明细表-列表查询")
|
||||
@ApiOperation(value="问题知识库-country_card-管理发布明细表-列表查询", notes="问题知识库-country_card-管理发布明细表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<CountryCardManageReleaseDetailEO>> queryList() {
|
||||
List<CountryCardManageReleaseDetailEO> list = countryCardManageReleaseDetailEOService.queryList();
|
||||
return Result.OK(list);
|
||||
public Result<List<CountryCardManageReleaseDetailEO>> queryList(CountryCardManageReleaseDetailEO countryCardManageReleaseDetailEO,HttpServletRequest req) {
|
||||
List<CountryCardManageReleaseDetailEO> result = countryCardManageReleaseDetailEOService.queryList(countryCardManageReleaseDetailEO,req);
|
||||
this.countryCardManageReleaseDetailEOService.disposeData(result,countryCardManageReleaseDetailEO.getCut());
|
||||
return Result.OK(result);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ public class CountryCardManageReleaseEOController extends JeroController<Country
|
||||
Page<CountryCardManageReleaseEO> page = new Page<CountryCardManageReleaseEO>(pageNo, pageSize);
|
||||
IPage<CountryCardManageReleaseEO> pageList = countryCardManageReleaseEOService.page(page, queryWrapper);
|
||||
this.countryCardManageReleaseEOService.disposeData(pageList.getRecords(),cut);
|
||||
return Result.OK(pageList);
|
||||
return Result.OK(cut,pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+12
-4
@@ -1,21 +1,18 @@
|
||||
package com.jero.modules.problemKnowledgeBase.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
@@ -70,6 +67,10 @@ public class CountryCardManageReleaseDetailEO implements Serializable {
|
||||
@Excel(name = "模板表id", width = 15)
|
||||
@ApiModelProperty(value = "模板表id")
|
||||
private java.lang.String countryCardTempId;
|
||||
/**标签名称**/
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "标签名称")
|
||||
private java.lang.String countryCardTempIdName;
|
||||
|
||||
/**描述*/
|
||||
@Excel(name = "描述", width = 15)
|
||||
@@ -81,4 +82,11 @@ public class CountryCardManageReleaseDetailEO implements Serializable {
|
||||
@ApiModelProperty(value = "内容")
|
||||
private java.lang.String content;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String cut;
|
||||
|
||||
/**标签类型**/
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "标签类型")
|
||||
private String lableType;
|
||||
}
|
||||
|
||||
+1
@@ -67,6 +67,7 @@ public class CountryCardManageReleaseEO implements Serializable {
|
||||
/**适用市场*/
|
||||
@Excel(name = "适用市场", width = 15)
|
||||
@ApiModelProperty(value = "适用市场")
|
||||
@Dict(dicCode = "region")
|
||||
private java.lang.String applyMarket;
|
||||
|
||||
/**发布状态*/
|
||||
|
||||
+3
-7
@@ -1,8 +1,6 @@
|
||||
package com.jero.modules.problemKnowledgeBase.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
@@ -18,8 +16,6 @@ import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库表
|
||||
@@ -100,9 +96,9 @@ public class ProblemKnowledgeBaseEO implements Serializable {
|
||||
|
||||
/**内容(正文)*/
|
||||
@Excel(name = "内容(正文)", width = 15)
|
||||
private transient java.lang.String contentString;
|
||||
private java.lang.String content;
|
||||
|
||||
private byte[] content;
|
||||
/*private byte[] content;
|
||||
|
||||
public byte[] getContent(){
|
||||
if(contentString==null){
|
||||
@@ -126,7 +122,7 @@ public class ProblemKnowledgeBaseEO implements Serializable {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}*/
|
||||
/**附件*/
|
||||
@Excel(name = "附件", width = 15)
|
||||
@ApiModelProperty(value = "附件")
|
||||
|
||||
+10
-1
@@ -2,6 +2,8 @@ package com.jero.modules.problemKnowledgeBase.service;
|
||||
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardManageReleaseDetailEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -57,5 +59,12 @@ public interface ICountryCardManageReleaseDetailEOService extends IService<Count
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<CountryCardManageReleaseDetailEO> queryList();
|
||||
List<CountryCardManageReleaseDetailEO> queryList(CountryCardManageReleaseDetailEO countryCardManageReleaseDetailEO, HttpServletRequest req);
|
||||
|
||||
/**
|
||||
* 处理数据
|
||||
* @param datas
|
||||
* @param cut
|
||||
*/
|
||||
void disposeData(List<CountryCardManageReleaseDetailEO> datas, String cut);
|
||||
}
|
||||
|
||||
+42
-2
@@ -1,15 +1,28 @@
|
||||
package com.jero.modules.problemKnowledgeBase.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardManageReleaseDetailEO;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardTempEO;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardTempItemEO;
|
||||
import com.jero.modules.problemKnowledgeBase.mapper.CountryCardManageReleaseDetailEOMapper;
|
||||
import com.jero.modules.problemKnowledgeBase.service.ICountryCardManageReleaseDetailEOService;
|
||||
import com.jero.modules.problemKnowledgeBase.service.ICountryCardTempEOService;
|
||||
import com.jero.modules.problemKnowledgeBase.service.ICountryCardTempItemEOService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库-country_card-管理发布明细表
|
||||
* @Author: jero-boot
|
||||
@@ -20,6 +33,9 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
||||
public class CountryCardManageReleaseDetailEOServiceImpl extends ServiceImpl<CountryCardManageReleaseDetailEOMapper, CountryCardManageReleaseDetailEO> implements ICountryCardManageReleaseDetailEOService {
|
||||
|
||||
@Autowired
|
||||
private ICountryCardTempEOService countryCardTempEOService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -86,7 +102,31 @@ public class CountryCardManageReleaseDetailEOServiceImpl extends ServiceImpl<Cou
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<CountryCardManageReleaseDetailEO> queryList() {
|
||||
return list();
|
||||
public List<CountryCardManageReleaseDetailEO> queryList(CountryCardManageReleaseDetailEO countryCardManageReleaseDetailEO, HttpServletRequest req) {
|
||||
QueryWrapper<CountryCardManageReleaseDetailEO> queryWrapper = QueryGenerator.initQueryWrapper(countryCardManageReleaseDetailEO, req.getParameterMap());
|
||||
List<CountryCardManageReleaseDetailEO> result = this.list(queryWrapper);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disposeData(List<CountryCardManageReleaseDetailEO> datas, String cut) {
|
||||
if (CollectionUtils.isNotEmpty(datas)) {
|
||||
//获取模板
|
||||
List<CountryCardTempEO> countryCardTempEOList = this.countryCardTempEOService.list();
|
||||
|
||||
datas.forEach(data -> {
|
||||
List<CountryCardTempEO> countryCardTemp = countryCardTempEOList.stream().filter(countryCardTempEO -> {
|
||||
boolean flag = false;
|
||||
if (StringUtils.equals(data.getCountryCardTempId(), countryCardTempEO.getId())) {
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
data.setCountryCardTempIdName(countryCardTemp.get(0).getLableName());
|
||||
|
||||
data.setLableType(countryCardTemp.get(0).getLableType());
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+28
-1
@@ -2,10 +2,14 @@ package com.jero.modules.problemKnowledgeBase.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardManageReleaseDetailEO;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardManageReleaseEO;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardTempEO;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardTempItemEO;
|
||||
import com.jero.modules.problemKnowledgeBase.enums.LableTypeEnum;
|
||||
import com.jero.modules.problemKnowledgeBase.mapper.CountryCardTempEOMapper;
|
||||
import com.jero.modules.problemKnowledgeBase.service.ICountryCardManageReleaseDetailEOService;
|
||||
import com.jero.modules.problemKnowledgeBase.service.ICountryCardManageReleaseEOService;
|
||||
import com.jero.modules.problemKnowledgeBase.service.ICountryCardTempEOService;
|
||||
import com.jero.modules.problemKnowledgeBase.service.ICountryCardTempItemEOService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
@@ -13,6 +17,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -35,6 +40,10 @@ public class CountryCardTempEOServiceImpl extends ServiceImpl<CountryCardTempEOM
|
||||
|
||||
@Autowired
|
||||
private ICountryCardTempItemEOService countryCardTempItemEOService;
|
||||
@Autowired
|
||||
private ICountryCardManageReleaseEOService countryCardManageReleaseEOService;
|
||||
@Autowired
|
||||
private ICountryCardManageReleaseDetailEOService countryCardManageReleaseDetailEOService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@@ -53,7 +62,18 @@ public class CountryCardTempEOServiceImpl extends ServiceImpl<CountryCardTempEOM
|
||||
/*if(StringUtils.equals(countryCardTempEO.getLableType(), LableTypeEnum.PULL_SINGLE.getValue())){
|
||||
this.countryCardTempItemEOService.batchInsert(countryCardTempEO.getCountryCardTempItemEOList(),countryCardTempEO.getId(),countryCardTempEO.getCut());
|
||||
}*/
|
||||
}
|
||||
//模板新增的时候,获取现在系统中已经有的country Card数据,country Card管理发布明细表插入数据
|
||||
List<CountryCardManageReleaseEO> countryCardManageReleaseEOList = this.countryCardManageReleaseEOService.list();
|
||||
if(CollectionUtils.isNotEmpty(countryCardManageReleaseEOList)){
|
||||
List<CountryCardManageReleaseDetailEO> releaseDetailEOList = new ArrayList<>();
|
||||
countryCardManageReleaseEOList.forEach(manageReleaseEO -> {
|
||||
CountryCardManageReleaseDetailEO countryCardManageReleaseDetailEO = new CountryCardManageReleaseDetailEO();
|
||||
countryCardManageReleaseDetailEO.setCountryCardTempId(countryCardTempEO.getId());
|
||||
countryCardManageReleaseDetailEO.setCountryCardManageReleaseId(manageReleaseEO.getId());
|
||||
});
|
||||
this.countryCardManageReleaseDetailEOService.saveBatch(releaseDetailEOList);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
@@ -82,6 +102,9 @@ public class CountryCardTempEOServiceImpl extends ServiceImpl<CountryCardTempEOM
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
QueryWrapper<CountryCardManageReleaseDetailEO> manageReleaseDetailDeleteWrapper = new QueryWrapper<>();
|
||||
manageReleaseDetailDeleteWrapper.lambda().eq(CountryCardManageReleaseDetailEO::getCountryCardTempId,id);
|
||||
this.countryCardManageReleaseDetailEOService.remove(manageReleaseDetailDeleteWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -97,6 +120,10 @@ public class CountryCardTempEOServiceImpl extends ServiceImpl<CountryCardTempEOM
|
||||
QueryWrapper<CountryCardTempItemEO> itemDeleteWrapper = new QueryWrapper<>();
|
||||
itemDeleteWrapper.lambda().in(CountryCardTempItemEO::getCountryCardTempId,ids);
|
||||
this.countryCardTempItemEOService.remove(itemDeleteWrapper);
|
||||
|
||||
QueryWrapper<CountryCardManageReleaseDetailEO> manageReleaseDetailDeleteWrapper = new QueryWrapper<>();
|
||||
manageReleaseDetailDeleteWrapper.lambda().in(CountryCardManageReleaseDetailEO::getCountryCardTempId,ids);
|
||||
this.countryCardManageReleaseDetailEOService.remove(manageReleaseDetailDeleteWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+10
-6
@@ -96,7 +96,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<countryCardReleaseModel ref="countryCardReleaseModelRef"/>
|
||||
<countryCardReleaseAdd ref="countryCardReleaseAddRef"/>
|
||||
<countryCardReleaseAdd ref="countryCardReleaseAddRef" @countryCardReleaseAddForm="countryCardReleaseAddForm"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -128,13 +128,13 @@
|
||||
{
|
||||
title: this.$t('applicableMarket'),
|
||||
align: 'center',
|
||||
dataIndex: 'applicableMarket',
|
||||
dataIndex: 'applyMarket',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('releaseStatus'),
|
||||
align: 'center',
|
||||
dataIndex: 'releaseStatus',
|
||||
dataIndex: 'releaseStatus_dictText',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
@@ -165,11 +165,15 @@
|
||||
this.pageNo = page
|
||||
this.getList()
|
||||
},
|
||||
SizeChange(page,pageSize) {
|
||||
SizeChange(page, pageSize) {
|
||||
this.pageNo = 1
|
||||
this.pageSize = pageSize
|
||||
this.getList()
|
||||
},
|
||||
countryCardReleaseAddForm() {
|
||||
this.pageNo = 1
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
let queryParam = JSON.parse(JSON.stringify(this.queryParam))
|
||||
Object.keys(queryParam).forEach(val => {
|
||||
@@ -224,8 +228,8 @@
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
},
|
||||
edit() {
|
||||
this.$refs.countryCardReleaseAddRef.edit()
|
||||
edit(record) {
|
||||
this.$refs.countryCardReleaseAddRef.edit(JSON.parse(JSON.stringify(record)))
|
||||
},
|
||||
subscribe(record) {
|
||||
let _this = this
|
||||
|
||||
+68
-20
@@ -43,25 +43,26 @@
|
||||
:loading="loading">
|
||||
<span slot="content" slot-scope="text,record,index">
|
||||
<a-input class="box-input"
|
||||
v-if="false"
|
||||
v-model="record.problemLabel"
|
||||
v-if="record.lableType == 8"
|
||||
v-model="record.content"
|
||||
:placeholder="$t('PleaseEnter')"/>
|
||||
<a-select :placeholder="$t('PleaseSelect')"
|
||||
style="width: 100%"
|
||||
v-if="false"
|
||||
v-model="record.projectNameId">
|
||||
<a-select-option v-for="(item, key) in record.projectNameList"
|
||||
v-else-if="record.lableType == 3"
|
||||
v-model="record.content">
|
||||
<a-select-option v-for="(item, key) in record.countryCardTempItemEOList"
|
||||
:key="key"
|
||||
:value="item.id">
|
||||
<span style="display: inline-block;width: 100%" :title=" item.projectName ">
|
||||
{{ item.projectName}}
|
||||
<span style="display: inline-block;width: 100%" :title=" item.itemText ">
|
||||
{{ item.itemText}}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
<a-button type="primary" class="button-text"
|
||||
@click="clickButtonToUpload('verifyDeliverableTemplate',index)">
|
||||
{{ (record.verifyDeliverableTemplate === 'null' || record.verifyDeliverableTemplate === '' ||
|
||||
record.verifyDeliverableTemplate == null) ? $t('clickUpload') : $t('viewUploadedFiles')
|
||||
v-else-if="record.lableType == 7"
|
||||
@click="clickButtonToUpload('content',index)">
|
||||
{{ (record.content === 'null' || record.content === '' ||
|
||||
record.content == null) ? $t('clickUpload') : $t('viewUploadedFiles')
|
||||
}}
|
||||
</a-button>
|
||||
</span>
|
||||
@@ -89,8 +90,10 @@
|
||||
data() {
|
||||
return {
|
||||
url: {
|
||||
list: '',
|
||||
deleteOne: ''
|
||||
list: '/problemKnowledgeBase/countryCardTempEO/list',
|
||||
deleteOne: '',
|
||||
add: '/problemKnowledgeBase/countryCardManageReleaseEO/add',
|
||||
edit: '/problemKnowledgeBase/countryCardManageReleaseDetailEO/editBatch'
|
||||
},
|
||||
title: '',
|
||||
formInline: {},
|
||||
@@ -98,7 +101,7 @@
|
||||
applyMarket: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('LabelType') + this.$t('cannotEmpty'),
|
||||
message: this.$t('applicableMarket') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
]
|
||||
@@ -113,21 +116,23 @@
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('LabelName'),
|
||||
dataIndex: 'LabelName',
|
||||
dataIndex: 'lableName',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
ellipsis: true,
|
||||
width: 220
|
||||
},
|
||||
{
|
||||
title: this.$t('describe'),
|
||||
dataIndex: 'describe',
|
||||
dataIndex: 'description',
|
||||
align: 'center',
|
||||
width: 260,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('content'),
|
||||
align: 'center',
|
||||
fixed: 'right',
|
||||
width: 180,
|
||||
width: 260,
|
||||
scopedSlots: { customRender: 'content' }
|
||||
}
|
||||
]
|
||||
@@ -139,11 +144,13 @@
|
||||
add() {
|
||||
this.visible = true
|
||||
this.title = this.$t('newlyAdded')
|
||||
this.replacePage()
|
||||
this.getApplyMarketList()
|
||||
},
|
||||
edit() {
|
||||
edit(row) {
|
||||
this.visible = true
|
||||
this.title = this.$t('edit')
|
||||
this.editReplacePage(row)
|
||||
this.getApplyMarketList()
|
||||
},
|
||||
getApplyMarketList() {
|
||||
@@ -186,13 +193,54 @@
|
||||
handleSubmit() {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
|
||||
let url = ''
|
||||
if (this.title == this.$t('newlyAdded')) {
|
||||
url = this.url.add
|
||||
} else {
|
||||
url = this.url.edit
|
||||
}
|
||||
this.confirmLoading = true
|
||||
let content = []
|
||||
this.dataList.forEach(res => {
|
||||
content.push({
|
||||
countryCardTempId: res.id,
|
||||
description: res.description,
|
||||
content: res.content
|
||||
})
|
||||
})
|
||||
let query = {
|
||||
countryCardManageReleaseDetailEOList: content,
|
||||
applyMarket: this.formInline.applyMarket
|
||||
}
|
||||
postAction(url, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.visible = false
|
||||
this.confirmLoading = false
|
||||
this.$emit('countryCardReleaseAddForm')
|
||||
} else {
|
||||
this.confirmLoading = false
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
replacePage() {
|
||||
this.loading = true
|
||||
postAction(this.url.list, {}).then((res) => {
|
||||
getAction(this.url.list, {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataList = res.result || []
|
||||
this.loading = false
|
||||
} else {
|
||||
this.dataList = []
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
editReplacePage(row) {
|
||||
this.loading = true
|
||||
getAction('/problemKnowledgeBase/countryCardManageReleaseDetailEO/list', { editReplacePage: row.id }).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataList = res.result || []
|
||||
this.loading = false
|
||||
|
||||
+2
-2
@@ -124,7 +124,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction, downloadFile,deleteAction } from '@/api/manage'
|
||||
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
|
||||
import optionMaintenance from './optionMaintenance'
|
||||
|
||||
export default {
|
||||
@@ -289,7 +289,7 @@
|
||||
},
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
if (this.formInline.lableType == 3) {
|
||||
if (this.formInline.lableType == 3 && !this.formInline.id) {
|
||||
deleteAction(this.url.deleteOne, { countryCardTempId: this.dropDownOptionsId }).then((res) => {
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user