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

This commit is contained in:
wangzhijiang
2022-08-03 18:15:29 +08:00
33 changed files with 3278 additions and 166 deletions
@@ -22,10 +22,7 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -197,4 +194,23 @@ public class ParamsReportDetailEOController extends JeroController<ParamsReportD
return Result.OK(paramsReportConfigEO);
}
/**
* 暂存
*
* @param paramsReportDetailVO
* @return
*/
@AutoLog(value = "上报库参数项-保存")
@ApiOperation(value="参数项收集清单-保存", notes="参数项收集清单-保存")
@PostMapping(value = "/save")
@RequiresPermissions("report:detail:export:save")
public Result<?> save(@RequestBody ParamsReportDetailVO paramsReportDetailVO) {
boolean isSuccess = paramsReportDetailEOService.save(paramsReportDetailVO.getConfigDataList(), paramsReportDetailVO.getParamsManifestId());
if (isSuccess) {
return Result.OK("保存成功!");
} else {
return Result.error("保存失败!");
}
}
}
@@ -23,4 +23,11 @@ public interface IParamsReportConfigDataEOService extends IService<ParamsReportC
ParamsReportConfigDataEO queryByConfigIdAndCollectManifestId(String paramsConfigId, String paramsCollectManifestId);
List<ParamsReportConfigDataEO> queryByConfigIdListAndCollectManifestId(List<String> paramsConfigIdList, String paramsCollectManifestId);
/**
* 查询清单的所有配置数据
* @param configIdList
* @return
*/
List<ParamsReportConfigDataEO> queryListByConfigIdList(List<String> configIdList);
}
@@ -1,7 +1,8 @@
package com.jero.modules.cert.report.service;
import com.jero.modules.cert.report.entity.ParamsReportConfigEO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jero.modules.cert.report.entity.ParamsReportConfigEO;
import java.util.List;
/**
@@ -12,5 +13,10 @@ import java.util.List;
*/
public interface IParamsReportConfigEOService extends IService<ParamsReportConfigEO> {
/**
* 列表查询
* @param paramsManifestId
* @return
*/
List<ParamsReportConfigEO> queryList(String paramsManifestId);
}
@@ -56,4 +56,7 @@ public interface IParamsReportDetailEOService extends IService<ParamsReportDetai
// 自定义导出-excel模板
void exportCustomExcel(ParamsReportDetailVO paramsReportDetailVO, HttpServletResponse response, HttpServletRequest request);
// 保存
boolean save(List<Map<String, Object>> configDataList, String paramsManifestId);
}
@@ -1,5 +1,6 @@
package com.jero.modules.cert.report.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jero.modules.cert.report.entity.ParamsReportConfigDataEO;
@@ -38,4 +39,20 @@ public class ParamsReportConfigDataEOServiceImpl extends ServiceImpl<ParamsRepor
public List<ParamsReportConfigDataEO> queryByConfigIdListAndCollectManifestId(List<String> paramsConfigIdList, String paramsCollectManifestId) {
return baseMapper.selectByConfigIdListAndCollectManifestId(paramsConfigIdList, paramsCollectManifestId);
}
/**
* 查询清单的所有配置数据
* @param configIdList
* @return
*/
@Override
public List<ParamsReportConfigDataEO> queryListByConfigIdList(List<String> configIdList) {
if (CollectionUtil.isNotEmpty(configIdList)) {
LambdaQueryWrapper<ParamsReportConfigDataEO> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.in(ParamsReportConfigDataEO::getParamsConfigId, configIdList);
return list(queryWrapper);
}
return null;
}
}
@@ -20,6 +20,7 @@ import com.jero.modules.cert.collect.enums.CollectManifestStateEnum;
import com.jero.modules.cert.collect.enums.ConfigDataTypeEnum;
import com.jero.modules.cert.collect.vo.ParamsConfigDataVO;
import com.jero.modules.cert.report.entity.*;
import com.jero.modules.cert.report.enums.ExportTemplateStateEnum;
import com.jero.modules.cert.report.enums.ExportTypeEnum;
import com.jero.modules.cert.report.mapper.ParamsReportDetailEOMapper;
import com.jero.modules.cert.report.service.*;
@@ -674,7 +675,8 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
public List<Map<String, String>> getTemplateLabelList() {
// 查询所有导出模板
LambdaQueryWrapper<ParamsExportTemplateEO> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.orderByDesc(ParamsExportTemplateEO::getCreateTime);
queryWrapper.eq(ParamsExportTemplateEO::getState, ExportTemplateStateEnum.ENABLE.getValue())
.orderByDesc(ParamsExportTemplateEO::getCreateTime);
List<ParamsExportTemplateEO> paramsExportTemplateEOList = paramsExportTemplateEOService.list(queryWrapper);
List<Map<String, String>> templateLabelList = new ArrayList<>();
@@ -1366,6 +1368,103 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
}
@Override
public boolean save(List<Map<String, Object>> configDataList, String paramsManifestId) {
List<ParamsReportConfigDataEO> newConfigDataEOList = new ArrayList<>();
List<ParamsReportConfigEO> paramsReportConfigEOList = paramsReportConfigEOService.queryList(paramsManifestId); // 查询配置列
List<String> paramsReportConfigIdList = paramsReportConfigEOList.stream().map(ParamsConfigEO::getId).collect(Collectors.toList());
List<ParamsReportConfigDataEO> paramsReportConfigDataEOList = paramsReportConfigDataEOService.queryListByConfigIdList(paramsReportConfigIdList); // 查询所有配置数据
// 处理数据
for (Map<String, Object> map : configDataList) {
String paramsCollectManifestId = (String) map.get("id");
// 添加配置数据
for (Map.Entry<String, Object> entry : map.entrySet()) {
ParamsReportConfigDataEO paramsReportConfigDataEO = new ParamsReportConfigDataEO();
if ("id".equals(entry.getKey())) {
continue;
}
// 取值
String paramsReportConfigEOId = entry.getKey();
Map<String, Object> paramsReportConfigDataMap = (Map<String, Object>) entry.getValue();
// 无法转ParamsConfigDataVO(遍历会出现该异常 LinkedHashMap cannot be cast to ParamsConfigDataVO
List<Map<String, Object>> configDataVOList = (List<Map<String, Object>>) paramsReportConfigDataMap.get("list");
// 判断是新增还是修改
ParamsConfigDataEO oldConfigDataEO = getConfigDataEOByConfigIdAndCollectManifestId(paramsReportConfigEOId, paramsCollectManifestId, paramsReportConfigDataEOList);
if (ObjectUtil.isNotEmpty(oldConfigDataEO)) {
paramsReportConfigDataEO.setId(oldConfigDataEO.getId());
}
paramsReportConfigDataEO.setParamsCollectManifestId(paramsCollectManifestId);
paramsReportConfigDataEO.setParamsConfigId(paramsReportConfigEOId);
if (CollectionUtil.isNotEmpty(configDataVOList)) {
for (Map<String, Object> paramsConfigDataVO : configDataVOList) {
String type = (String) paramsConfigDataVO.get("type");
String dataValue = (String) paramsConfigDataVO.get("dataValue");
if (type.equals(ConfigDataTypeEnum.TEXT.getValue())) {
paramsReportConfigDataEO.setTextData(dataValue);
} else if (type.equals(ConfigDataTypeEnum.PULL.getValue())
|| type.equals(ConfigDataTypeEnum.PULL_MORE.getValue())) {
paramsReportConfigDataEO.setPullData(dataValue);
} else if (type.equals(ConfigDataTypeEnum.FILE.getValue())) {
if (StringUtils.isNotEmpty(dataValue) && dataValue.contains(",")) { // 新加多个文件
// 处理文件connectId
String[] fileIdList = dataValue.split(",");
String connectId = UUID.randomUUID().toString().replace("-", "");
List<OSSFile> updateFileList = new ArrayList<>();
for (int i = 0; i < fileIdList.length; i++) {
OSSFile ossFile = new OSSFile();
ossFile.setId(fileIdList[i]);
ossFile.setConnectId(connectId);
updateFileList.add(ossFile);
}
ossFileService.updateBatchById(updateFileList);
dataValue = connectId;
} else if (StringUtils.isNotEmpty(dataValue) && !dataValue.contains(",")) {
List<OSSFile> ossFiles = ossFileService.getFileInfosByConnectId(dataValue);
if(CollectionUtil.isEmpty(ossFiles)){ // 新加了一个文件
String connectId = UUID.randomUUID().toString().replace("-", "");
//修改文件表关联信息connect_id
List<OSSFile> oSSFileList = new ArrayList<>();
for (String fileId : dataValue.split(",")) {
OSSFile ossFile = new OSSFile();
ossFile.setId(fileId);
ossFile.setConnectId(connectId);
oSSFileList.add(ossFile);
}
ossFileService.updateFileInfo(oSSFileList);
dataValue = connectId;
}
}
paramsReportConfigDataEO.setFileConnectId(dataValue);
}
}
}
newConfigDataEOList.add(paramsReportConfigDataEO);
}
}
// 批量更新
return paramsReportConfigDataEOService.saveOrUpdateBatch(newConfigDataEOList);
}
private ParamsReportConfigDataEO getConfigDataEOByConfigIdAndCollectManifestId(String configId, String collectManifestId, List<ParamsReportConfigDataEO> paramsReportConfigDataEOList) {
List<ParamsReportConfigDataEO> configDataEOList = paramsReportConfigDataEOList.stream()
.filter(e-> configId.equals(e.getParamsConfigId()) && collectManifestId.equals(e.getParamsCollectManifestId()))
.collect(Collectors.toList());
if (CollectionUtil.isNotEmpty(configDataEOList)) {
return configDataEOList.get(0);
}
return null;
}
/**
* 实体对象转成Map
* @param obj 实体对象
@@ -3,6 +3,9 @@ package com.jero.modules.cert.report.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
import java.util.Map;
@Data
public class ParamsReportDetailVO {
@@ -37,6 +40,9 @@ public class ParamsReportDetailVO {
@ApiModelProperty(value = "对应参数模板发布版本")
private Integer paramsTemplatePublishVersion;
@ApiModelProperty(value = "保存专用")
private List<Map<String, Object>> configDataList; // 保存专用
// 导出通用
private String cut;
private String exportName;
@@ -98,12 +98,12 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
String nioNumber = paramsInfoEO.getNioNumber();
String paramsTemplateId = paramsInfoEO.getParamsTemplateId();
// 校验nio编号 格式:字母数字横杠(-)
String nioNumberRegex = "^[A-Za-z0-9-/. ]+$";
String nioNumberRegex = "^[A-Za-z0-9-/ ]+$";
if (!nioNumber.matches(nioNumberRegex)) {
if (CutEnum.CN.getValue().equals(paramsInfoEO.getCut())) {
throw new JeroBootException("NIO编号格式错误,仅能为字母,数字,横杠(-),小数点(.)左斜杠,空格!");
throw new JeroBootException("NIO编号格式错误,仅能为字母,数字,横杠(-),左斜杠,空格!");
} else {
throw new JeroBootException("NIO number formatting errors, can only letters,numbers,dash (-),dot (.),left slash,spaces!");
throw new JeroBootException("NIO number formatting errors, can only letters,numbers,dash (-),left slash,spaces!");
}
}
@@ -176,12 +176,12 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
String paramsTemplateId = paramsInfoEO.getParamsTemplateId();
// 校验nio编号 格式:字母数字横杠(-)
String nioNumberRegex = "^[A-Za-z0-9-/. ]+$";
String nioNumberRegex = "^[A-Za-z0-9-/ ]+$";
if (!nioNumber.matches(nioNumberRegex)) {
if (CutEnum.CN.getValue().equals(paramsInfoEO.getCut())) {
throw new JeroBootException("NIO编号格式错误,仅能为字母,数字,横杠(-),小数点(.)左斜杠,空格!");
throw new JeroBootException("NIO编号格式错误,仅能为字母,数字,横杠(-),左斜杠,空格!");
} else {
throw new JeroBootException("NIO number formatting errors, can only letters,numbers,dash (-),dot (.),left slash,spaces!");
throw new JeroBootException("NIO number formatting errors, can only letters,numbers,dash (-),left slash,spaces!");
}
}
@@ -1134,12 +1134,12 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
countError += (int)resultMap.get("countError");
if (StringUtils.isNotEmpty(dto.getNioNumber())) {
// 校验nio编号 格式:字母数字横杠(-)
String nioNumberRegex = "^[A-Za-z0-9-/. ]+$";
String nioNumberRegex = "^[A-Za-z0-9-/ ]+$";
if (!nioNumber.matches(nioNumberRegex)) {
if(CutEnum.CN.getValue().equals(cut)) {
errorMsg += "NIO编号格式错误,仅能为字母,数字,横杠(-),小数点(.)左斜杠,空格;";
errorMsg += "NIO编号格式错误,仅能为字母,数字,横杠(-),左斜杠,空格;";
} else {
errorMsg += "NIO number formatting errors, can only letters, numbers, dash (-),dot (.),left slash,spaces;";
errorMsg += "NIO number formatting errors, can only letters, numbers, dash (-),left slash,spaces;";
}
countError++;
}
@@ -1389,12 +1389,12 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
countError += (int)resultMap.get("countError");
if (StringUtils.isNotEmpty(ccDto.getNioNumber())) {
// 校验nio编号 格式:字母数字横杠(-)
String nioNumberRegex = "^[A-Za-z0-9-/. ]+$";
String nioNumberRegex = "^[A-Za-z0-9-/ ]+$";
if (!nioNumber.matches(nioNumberRegex)) {
if(CutEnum.CN.getValue().equals(cut)) {
errorMsg += "nio编号格式错误,仅能为字母,数字,横杠(-),小数点(.)左斜杠,空格;";
errorMsg += "nio编号格式错误,仅能为字母,数字,横杠(-),左斜杠,空格;";
} else {
errorMsg += "NIO number formatting errors, can only letters, numbers, dash (-),dot (.),left slash,spaces;";
errorMsg += "NIO number formatting errors, can only letters, numbers, dash (-),left slash,spaces;";
}
countError++;
}
@@ -534,7 +534,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
sysUser.setUsername(ppEmployee.getWorker_user_id());
sysUser.setRealname(ppEmployee.getFormatted_name());
sysUser.setStatus("Active".equals(ppEmployee.getEmployee_status())? CommonConstant.USER_UNFREEZE : CommonConstant.USER_FREEZE);
sysUser.setDelFlag("1".equals(ppEmployee.getDelete_flag())? CommonConstant.DEL_FLAG_0 : CommonConstant.DEL_FLAG_1);
// sysUser.setDelFlag("1".equals(ppEmployee.getDelete_flag())? CommonConstant.DEL_FLAG_0 : CommonConstant.DEL_FLAG_1);
sysUser.setThirdId(ppEmployee.getWorker_user_id());
sysUser.setWorkNo(ppEmployee.getEmployee_id());
sysUser.setWorkerType("Employee".equals(ppEmployee.getWorker_type())? CommonConstant.WORKER_TYPE_1 : CommonConstant.WORKER_TYPE_2);
+13 -1
View File
@@ -788,7 +788,7 @@ module.exports = {
copyParamDetailList: 'Copy Parameter List',
collectionCompletionTime: 'Collection Completion Time',
parameterTemplateName: 'Parameter Template Name',
onlyThree: 'Only letters, numbers, dashes (-), and decimal points (.) can be entered. , left slash, space six kinds of content ',
onlyThree: 'enter only letters, numbers, hyphens (-), left slashes, and Spaces',
templateName: 'Template Name',
pleaseSelectData: 'Please Select Data',
templateCopy: 'Template Copy',
@@ -1221,4 +1221,16 @@ module.exports = {
dre:'dre',
applicableInstructionsMarketList:'Applicable instructions of market list',
pleaseSelectTheDataCompared:'Please select the data to be compared',
problemLabel:'Problem label',
personCharge:'Person in charge',
addLabel:'Add Label',
editLabel:'Edit Label',
applicableMarket:'Applicable market',
templateMaintenance:'Template maintenance',
associatedWebsite:'Associated website',
dropDownOptions:'Drop down options',
dropDownOptionMaintenance:'Drop down option maintenance',
displayInformation:'Display information',
addComparison:'Add comparison',
showOrNot:'Show or not',
}
+13 -1
View File
@@ -804,7 +804,7 @@ module.exports = {
copyParamDetailList: '复制参数清单',
collectionCompletionTime: '收集完成时间',
parameterTemplateName: '参数模板名称',
onlyThree: '只能输入字母数字横杠-小数点.左斜杠空格种内容',
onlyThree: '只能输入字母数字横杠-左斜杠空格种内容',
templateName: '模板名称',
pleaseSelectData: '请选择数据',
templateCopy: '模板复制',
@@ -1324,4 +1324,16 @@ module.exports = {
dre:'填写人',
applicableInstructionsMarketList:'市场清单适用说明',
pleaseSelectTheDataCompared:'请选择需要对比的数据',
problemLabel:'问题标签',
personCharge:'负责人',
addLabel:'新增标签',
editLabel:'编辑标签',
applicableMarket:'适用市场',
templateMaintenance:'模板维护',
associatedWebsite:'关联网址',
dropDownOptions:'下拉选项',
dropDownOptionMaintenance:'下拉选项维护',
displayInformation:'展示信息',
addComparison:'添加对比',
showOrNot:'是否展示',
}
@@ -0,0 +1,795 @@
<template>
<div style="height: 100%">
<div class='box'>
<!-- 纯文本-->
<div v-if='detailDate.controlType === "1"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type==="text"'>
<!-- 文本校验 分情况-->
<!-- 1 -->
<!-- 2 中文-->
<!-- 3 正整数-->
<!-- 4 政府点数-->
<!-- 5 证书或小数-->
<!-- 6 一位小数-->
<!-- 7 两位小数-->
<!-- 8 三位小数-->
<!-- 9 四为小数-->
<!-- -->
<div v-if="item.controlVerify == '1'">
<a-input class="box-input inputWid"
:maxLength="1000"
:placeholder="$t('pleaseEnter')"
v-model="item.dataValue"/>
</div>
<!-- 中文-->
<div v-else-if="item.controlVerify == '2'">
<a-input class="box-input inputWid"
:placeholder="$t('pleaseEnter')+$t('chinese')"
@input="onInput"
onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\u4E00-\u9FA5]/g,''))"
v-model="item.dataValue"/>
</div>
<!-- 正整数 -->
<div v-else-if="item.controlVerify == '3'">
<a-input-number class="box-input inputWid add--number"
:max="99999"
:precision="0"
:placeholder="$t('enterPositiveInteger')"
v-model="item.dataValue"/>
</div>
<!-- 正浮点书 -->
<div v-else-if="item.controlVerify == '4'">
<a-input class="box-input inputWid"
onkeyup="(this.v=function(){this.value=this.value.replace(/[^\d\.]/g,'');}).call(this)"
:placeholder="$t('pleaseEnter')+$t('Positivefloatingpointnumber')"
v-model="item.dataValue"/>
</div>
<!-- 整数或小数 -->
<div v-else-if="item.controlVerify == '5'">
<a-input-number class="box-input inputWid add--number"
:max="99999"
:placeholder="$t('pleaseEnter')+$t('integerOrDecimal')"
v-model="item.dataValue"/>
</div>
<!-- 一位小数 -->
<div v-else-if="item.controlVerify == '6'">
<a-input-number class="box-input inputWid add--number"
:max="99999"
:precision="1"
:placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')"
v-model="item.dataValue"/>
</div>
<!-- 两位小数-->
<div v-else-if="item.controlVerify == '7'">
<a-input-number class="box-input inputWid add--number"
:max="99999"
:precision="2"
:placeholder="$t('pleaseEnter')+$t('TwoDecimalplaces')"
v-model="item.dataValue"/>
</div>
<!-- 三位小数-->
<div v-else-if="item.controlVerify == '8'">
<a-input-number class="box-input inputWid add--number"
:max="99999"
:precision="3"
:placeholder="$t('pleaseEnter')+$t('Threedecimalplaces')"
v-model="item.dataValue"/>
</div>
<!-- 四位小数-->
<div v-else-if="item.controlVerify == '9'">
<a-input-number class="box-input inputWid add--number"
:max="99999"
:precision="4"
:placeholder="$t('pleaseEnter')+$t('FourDecimalplaces')"
v-model="item.dataValue"/>
</div>
</div>
</div>
</div>
<!-- 默认值-->
<div v-if='detailDate.controlType === "11"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type==="text"'>
<!-- 文本校验 分情况-->
<!-- 1 无-->
<!-- 2 中文-->
<!-- 3 正整数-->
<!-- 4 政府点数-->
<!-- 5 证书或小数-->
<!-- 6 一位小数-->
<!-- 7 两位小数-->
<!-- 8 三位小数-->
<!-- 9 四为小数-->
<!-- 无 -->
<div>
<a-input class="box-input inputWid"
:maxLength="1000"
:placeholder="$t('pleaseEnter')"
v-model="item.dataValue"/>
</div>
</div>
</div>
</div>
<!-- 纯下拉单选-->
<div v-else-if='detailDate.controlType === "2"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type === "pull"'>
<a-select v-model="item.dataValue"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class='selectWid'
allowClear>
<a-select-option v-for="(item, key) in item.controlValue" :key="key" :value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.label ">
{{ item.label }}
</span>
</a-select-option>
</a-select>
</div>
</div>
</div>
<!-- 纯下拉多选-->
<div v-else-if='detailDate.controlType === "3"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' style='flex: 1' class='add-width'>
<div v-if='item.type==="pull_more"'>
<a-select v-model="item.dataValue"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
mode="multiple" class='selectWid'
allowClear>
<a-select-option v-for="(item, key) in item.controlValue" :key="key" :value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.label ">
{{ item.label }}
</span>
</a-select-option>
</a-select>
</div>
</div>
</div>
<!-- 纯附件-->
<div v-else-if='detailDate.controlType === "4"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' style='flex: 1' class='add-width'>
<div v-if='item.type==="file"'>
<a-button type="primary" class="button-text inputWid"
@click="clickButtonToUpload(item)">
{{ (item.dataValue === 'null' || item.dataValue === '' ||
item.dataValue == null) ? $t('clickUpload') : $t('viewUploadedFiles')}}
</a-button>
</div>
</div>
</div>
<!-- 文本+下拉单选-->
<div v-else-if='detailDate.controlType === "5"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type==="pull"'>
<a-select v-model="item.dataValue"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class='selectWid'
allowClear>
<a-select-option v-for="(itemin, key) in item.controlValue" :key="key" :value="itemin.value">
<span style="display: inline-block;width: 100%" :title=" itemin.label ">
{{ itemin.label }}
</span>
</a-select-option>
</a-select>
</div>
<div v-else-if='item.type==="text"'>
<!-- 文本校验 分情况-->
<!-- 1 无-->
<!-- 2 中文-->
<!-- 3 正整数-->
<!-- 4 政府点数-->
<!-- 5 证书或小数-->
<!-- 6 一位小数-->
<!-- 7 两位小数-->
<!-- 8 三位小数-->
<!-- 9 四为小数-->
<!-- 无 -->
<div v-if="item.controlVerify == '1'">
<a-input class="box-input inputWid"
:maxLength="1000"
:placeholder="$t('pleaseEnter')"
v-model="item.dataValue"/>
</div>
<!-- 中文-->
<div v-else-if="item.controlVerify == '2'">
<a-input class="box-input inputWid"
:maxLength="1000"
:placeholder="$t('pleaseEnter')+$t('chinese')"
@input="onInput"
onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\u4E00-\u9FA5]/g,''))"
v-model="item.dataValue"/>
</div>
<!-- 正整数 -->
<div v-else-if="item.controlVerify == '3'">
<a-input-number class="box-input inputWid add--number"
:max="99999"
:precision="0"
:placeholder="$t('enterPositiveInteger')"
v-model="item.dataValue"/>
</div>
<!-- 正浮点书 -->
<div v-else-if="item.controlVerify == '4'">
<a-input class="box-input inputWid"
onkeyup="(this.v=function(){this.value=this.value.replace(/[^\d\.]/g,'');}).call(this)"
:placeholder="$t('pleaseEnter')+$t('Positivefloatingpointnumber')"
v-model="item.dataValue"/>
</div>
<!-- 整数或小数 -->
<div v-else-if="item.controlVerify == '5'">
<a-input-number class="box-input inputWid add--number"
:max="99999"
:placeholder="$t('pleaseEnter')+$t('integerOrDecimal')"
v-model="item.dataValue"/>
</div>
<!-- 一位小数 -->
<div v-else-if="item.controlVerify == '6'">
<a-input-number class="box-input inputWid add--number"
:max="99999"
:precision="1"
:placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')"
v-model="item.dataValue"/>
</div>
<!-- 两位小数-->
<div v-else-if="item.controlVerify == '7'">
<a-input-number class="box-input inputWid add--number"
:max="99999"
:precision="2"
:placeholder="$t('pleaseEnter')+$t('TwoDecimalplaces')"
v-model="item.dataValue"/>
</div>
<!-- 三位小数-->
<div v-else-if="item.controlVerify == '8'">
<a-input-number class="box-input inputWid add--number"
:max="99999"
:precision="3"
:placeholder="$t('pleaseEnter')+$t('Threedecimalplaces')"
v-model="item.dataValue"/>
</div>
<!-- 四位小数-->
<div v-else-if="item.controlVerify == '9'">
<a-input-number class="box-input inputWid add--number"
:max="99999"
:precision="4"
:placeholder="$t('pleaseEnter')+$t('FourDecimalplaces')"
v-model="item.dataValue"/>
</div>
</div>
</div>
</div>
<!-- 文本+下拉多选-->
<div v-else-if='detailDate.controlType === "6"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type==="text"'>
<!-- 文本校验 分情况-->
<!-- 1 无-->
<!-- 2 中文-->
<!-- 3 正整数-->
<!-- 4 政府点数-->
<!-- 5 证书或小数-->
<!-- 6 一位小数-->
<!-- 7 两位小数-->
<!-- 8 三位小数-->
<!-- 9 四为小数-->
<!-- 无 -->
<div v-if="item.controlVerify == '1'">
<a-input class="box-input inputWid"
:maxLength="1000"
:placeholder="$t('pleaseEnter')"
v-model="item.dataValue"/>
</div>
<!-- 中文-->
<div v-else-if="item.controlVerify == '2'">
<a-input class="box-input inputWid"
:maxLength="1000"
@input="onInput"
onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\u4E00-\u9FA5]/g,''))"
:placeholder="$t('pleaseEnter')+$t('chinese')"
v-model="item.dataValue"/>
</div>
<!-- 正整数 -->
<div v-else-if="item.controlVerify == '3'">
<a-input-number class="box-input inputWid add--number"
:max="99999"
:precision="0"
:placeholder="$t('enterPositiveInteger')"
v-model="item.dataValue"/>
</div>
<!-- 正浮点书 -->
<div v-else-if="item.controlVerify == '4'">
<a-input class="box-input inputWid"
onkeyup="(this.v=function(){this.value=this.value.replace(/[^\d\.]/g,'');}).call(this)"
:placeholder="$t('pleaseEnter')+$t('Positivefloatingpointnumber')"
v-model="item.dataValue"/>
</div>
<!-- 整数或小数 -->
<div v-else-if="item.controlVerify == '5'">
<a-input-number class="box-input inputWid add--number"
:max="99999"
:placeholder="$t('pleaseEnter')+$t('integerOrDecimal')"
v-model="item.dataValue"/>
</div>
<!-- 一位小数 -->
<div v-else-if="item.controlVerify == '6'">
<a-input-number class="box-input inputWid add--number"
:max="99999"
:precision="1"
:placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')"
v-model="item.dataValue"/>
</div>
<!-- 两位小数-->
<div v-else-if="item.controlVerify == '7'">
<a-input-number class="box-input inputWid add--number"
:max="99999"
:precision="2"
:placeholder="$t('pleaseEnter')+$t('TwoDecimalplaces')"
v-model="item.dataValue"/>
</div>
<!-- 三位小数-->
<div v-else-if="item.controlVerify == '8'">
<a-input-number class="box-input inputWid"
:max="99999"
:precision="3"
:placeholder="$t('pleaseEnter')+$t('Threedecimalplaces')"
v-model="item.dataValue"/>
</div>
<!-- 四位小数-->
<div v-else-if="item.controlVerify == '9'">
<a-input-number class="box-input inputWid add--number"
:max="99999"
:precision="4"
:placeholder="$t('pleaseEnter')+$t('FourDecimalplaces')"
v-model="item.dataValue"/>
</div>
</div>
<div v-if='item.type==="pull_more"'>
<a-select v-model="item.dataValue"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
mode="multiple" class='selectWid'
allowClear>
<a-select-option v-for="(item, key) in item.controlValue" :key="key" :value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.label ">
{{ item.label }}
</span>
</a-select-option>
</a-select>
</div>
</div>
</div>
<!-- 文本+附件-->
<div v-else-if='detailDate.controlType === "7"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type==="text"'>
<!-- 文本校验 分情况-->
<!-- 1 无-->
<!-- 2 中文-->
<!-- 3 正整数-->
<!-- 4 政府点数-->
<!-- 5 证书或小数-->
<!-- 6 一位小数-->
<!-- 7 两位小数-->
<!-- 8 三位小数-->
<!-- 9 四为小数-->
<!-- 无 -->
<div v-if="item.controlVerify == '1'">
<a-input class="box-input inputWid"
:maxLength="1000"
:placeholder="$t('pleaseEnter')"
v-model="item.dataValue"/>
</div>
<!-- 中文-->
<div v-else-if="item.controlVerify == '2'">
<a-input class="box-input inputWid"
:maxLength="1000"
@input="onInput"
onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\u4E00-\u9FA5]/g,''))"
:placeholder="$t('pleaseEnter')+$t('chinese')"
v-model="item.dataValue"/>
</div>
<!-- 正整数 -->
<div v-else-if="item.controlVerify == '3'">
<a-input-number class="box-input inputWid add--number"
:max="99999"
:precision="0"
:placeholder="$t('enterPositiveInteger')"
v-model="item.dataValue"/>
</div>
<!-- 正浮点书 -->
<div v-else-if="item.controlVerify == '4'">
<a-input class="box-input inputWid"
onkeyup="(this.v=function(){this.value=this.value.replace(/[^\d\.]/g,'');}).call(this)"
:placeholder="$t('pleaseEnter')+$t('Positivefloatingpointnumber')"
v-model="item.dataValue"/>
</div>
<!-- 整数或小数 -->
<div v-else-if="item.controlVerify == '5'">
<a-input-number class="box-input inputWid add--number"
:max="99999"
:placeholder="$t('pleaseEnter')+$t('integerOrDecimal')"
v-model="item.dataValue"/>
</div>
<!-- 一位小数 -->
<div v-else-if="item.controlVerify == '6'">
<a-input-number class="box-input inputWid add--number"
:max="99999"
:precision="1"
:placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')"
v-model="item.dataValue"/>
</div>
<!-- 两位小数-->
<div v-else-if="item.controlVerify == '7'">
<a-input-number class="box-input inputWid add--number"
:max="99999"
:precision="2"
:placeholder="$t('pleaseEnter')+$t('TwoDecimalplaces')"
v-model="item.dataValue"/>
</div>
<!-- 三位小数-->
<div v-else-if="item.controlVerify == '8'">
<a-input-number class="box-input inputWid add--number"
:max="99999"
:precision="3"
:placeholder="$t('pleaseEnter')+$t('Threedecimalplaces')"
v-model="item.dataValue"/>
</div>
<!-- 四位小数-->
<div v-else-if="item.controlVerify == '9'">
<a-input-number class="box-input inputWid add--number"
:max="99999"
:precision="4"
:placeholder="$t('pleaseEnter')+$t('FourDecimalplaces')"
v-model="item.dataValue"/>
</div>
</div>
<div v-if='item.type==="file"'>
<a-button type="primary" class="button-text inputWid"
@click="clickButtonToUpload(item)">
{{ (item.dataValue === 'null' || item.dataValue === '' ||
item.dataValue == null) ? $t('clickUpload') : $t('viewUploadedFiles')}}
</a-button>
</div>
</div>
</div>
<!-- 下拉单选+附件-->
<div v-else-if='detailDate.controlType === "8"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type==="pull"'>
<a-select v-model="item.dataValue"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class='selectWid'
allowClear>
<a-select-option v-for="(itemin, key) in item.controlValue" :key="key" :value="itemin.value">
<span style="display: inline-block;width: 100%" :title=" itemin.label ">
{{ itemin.label }}
</span>
</a-select-option>
</a-select>
</div>
<div v-else-if='item.type==="file"'>
<a-button type="primary" class="button-text inputWid"
@click="clickButtonToUpload(item)">
{{ (item.dataValue === 'null' || item.dataValue === '' ||
item.dataValue == null) ? $t('clickUpload') : $t('viewUploadedFiles')}}
</a-button>
</div>
</div>
</div>
<!-- 下拉多选+附件-->
<div v-else-if='detailDate.controlType === "9"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type==="pull_more"'>
<a-select v-model="item.dataValue"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
mode="multiple" class='selectWid'
allowClear>
<a-select-option v-for="(item, key) in item.controlValue" :key="key" :value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.label ">
{{ item.label }}
</span>
</a-select-option>
</a-select>
</div>
<div v-else-if='item.type==="file"'>
<a-button type="primary" class="button-text inputWid"
@click="clickButtonToUpload(item)">
{{ (item.dataValue === 'null' || item.dataValue === '' ||
item.dataValue == null) ? $t('clickUpload') : $t('viewUploadedFiles')}}
</a-button>
</div>
</div>
</div>
<!-- 文本+下拉单选+附件-->
<div v-else-if='detailDate.controlType === "10"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type==="pull"'>
<a-select v-model="item.dataValue"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class='selectWid'
allowClear>
<a-select-option v-for="(itemin, key) in item.controlValue" :key="key" :value="itemin.value">
<span style="display: inline-block;width: 100%" class="itemOption" :title=" itemin.label ">
{{ itemin.label }}
</span>
</a-select-option>
</a-select>
</div>
<div v-if='item.type==="text"'>
<!-- 文本校验 分情况-->
<!-- 1 无-->
<!-- 2 中文-->
<!-- 3 正整数-->
<!-- 4 政府点数-->
<!-- 5 证书或小数-->
<!-- 6 一位小数-->
<!-- 7 两位小数-->
<!-- 8 三位小数-->
<!-- 9 四为小数-->
<!-- 无 -->
<div v-if="item.controlVerify == '1'">
<a-input class="box-input inputWid"
:maxLength="1000"
:placeholder="$t('pleaseEnter')"
v-model="item.dataValue"/>
</div>
<!-- 中文-->
<div v-else-if="item.controlVerify == '2'">
<a-input class="box-input inputWid"
:maxLength="1000"
:placeholder="$t('pleaseEnter')+$t('chinese')"
@input="onInput"
onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\u4E00-\u9FA5]/g,''))"
v-model="item.dataValue"/>
</div>
<!-- 正整数 -->
<div v-else-if="item.controlVerify == '3'">
<a-input-number class="box-input inputWid add--number"
:max="99999"
:precision="0"
:placeholder="$t('enterPositiveInteger')"
v-model="item.dataValue"/>
</div>
<!-- 正浮点书 -->
<div v-else-if="item.controlVerify == '4'">
<a-input class="box-input inputWid"
onkeyup="(this.v=function(){this.value=this.value.replace(/[^\d\.]/g,'');}).call(this)"
:placeholder="$t('pleaseEnter')+$t('Positivefloatingpointnumber')"
v-model="item.dataValue"/>
</div>
<!-- 整数或小数 -->
<div v-else-if="item.controlVerify == '5'">
<a-input-number class="box-input inputWid add--number"
:max="99999"
:placeholder="$t('pleaseEnter')+$t('integerOrDecimal')"
v-model="item.dataValue"/>
</div>
<!-- 一位小数 -->
<div v-else-if="item.controlVerify == '6'">
<a-input-number class="box-input inputWid add--number"
:max="99999"
:precision="1"
:placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')"
v-model="item.dataValue"/>
</div>
<!-- 两位小数-->
<div v-else-if="item.controlVerify == '7'">
<a-input-number class="box-input inputWid add--number"
:max="99999"
:precision="2"
:placeholder="$t('pleaseEnter')+$t('TwoDecimalplaces')"
v-model="item.dataValue"/>
</div>
<!-- 三位小数-->
<div v-else-if="item.controlVerify == '8'">
<a-input-number class="box-input inputWid add--number"
:max="99999"
:precision="3"
:placeholder="$t('pleaseEnter')+$t('Threedecimalplaces')"
v-model="item.dataValue"/>
</div>
<!-- 四位小数-->
<div v-else-if="item.controlVerify == '9'">
<a-input-number class="box-input inputWid add--number"
:max="99999"
:precision="4"
:placeholder="$t('pleaseEnter')+$t('FourDecimalplaces')"
v-model="item.dataValue"/>
</div>
</div>
<div v-if='item.type==="file"'>
<a-button type="primary" class="button-text inputWid"
@click="clickButtonToUpload(item)">
{{ (item.dataValue === 'null' || item.dataValue === '' ||
item.dataValue == null) ? $t('clickUpload') : $t('viewUploadedFiles')}}
</a-button>
</div>
</div>
</div>
</div>
<uploadFileChangeDown ref="uploadFile" @uploadSuccess="uploadSuccess"
:detailDate='detailDate'></uploadFileChangeDown>
</div>
</template>
<script>
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
import uploadFileChangeDown from '@/components/uploadFileChangeDown/file'
export default {
name: 'index',
props: {
detailDate: {
type: Object,
default: {},
require: true
}
},
data() {
return {
isLock: '0',
formInline: {},
visible: false,
detailDatetransformation: []
}
},
components: {
uploadFileChangeDown
},
mounted() {
this.detailDate.list.forEach((item) => {
if (item.type === 'pull_more') {
console.log(item.dataValue)
}
// this.detailDatetransformation.push(item)
})
},
methods: {
onInput(r) {
let value = r.target.value
r.target.value = value.replace(/[^\u4e00-\u9fa5]/g, '')
this.detailDate.list.forEach((item) => {
if (item.controlVerify == '2') {
item.dataValue = r.target.value
}
})
},
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 }
// console.log('form',this.formInline)
} else {
// this.formInline[this.uploadName]=''
// this.formInline = { ...this.formInline }
// console.log('form',this.formInline)
}
this.detailDate.list.forEach((item, index) => {
if (item.type === 'file') {
item.dataValue = attIdList.join(',')
}
})
},
clickButtonToUpload(item) {
// if (item.isLock == '1') {
// this.$refs.uploadFile.disabled = true
// } else {
// this.$refs.uploadFile.disabled = false
// }
this.$refs.uploadFile.visible = true
getAction('sys/common/getFileInfos', { id: item.dataValue }).then((res) => {
if (res.success) {
this.$refs.uploadFile.perentHandleFunc(res.result)
} else {
this.$refs.uploadFile.perentHandleFunc()
}
})
}
},
watch: {
detailDate(newold, oldold) {
console.log(newold, oldold, 'll')
},
formInline: {
handler(newOld, oldval) {
console.log(newOld, oldval, 'll')
},
deep: true
}
}
}
</script>
<style>
.table .ant-table-column-title {
font-weight: bold;
}
/*.ant-table td {*/
/* white-space: nowrap;*/
/*}*/
.selectWid .ant-select-selection--multiple {
overflow: auto;
}
.selectWid .ant-select-selection--multiple::-webkit-scrollbar {
display: none; /* Chrome Safari */
}
.selectWid .ant-select-selection {
height: 38px !important;
line-height: 38px !important;
}
.selectWid .ant-select-selection__rendered {
line-height: 36px !important;
}
</style>
<style lang="less" scoped>
.box {
width: 100%;
height: calc(100% - 100px);
overflow: auto;
}
.text {
margin-right: 10px;
}
.page {
text-align: right;
margin-top: 20px;
}
.add_flex {
/*display: flex;*/
}
/deep/ .box {
overflow: hidden;
}
.add_flex_item {
width: 30%;
flex: 1;
}
.selectWid {
min-width: 150px;
}
.inputWid {
min-width: 150px;
height: 38px;
display: inline-block;
}
.add-width {
width: calc(33.3% - 5px);
margin-right: 5px;
float: left;
}
.add--number {
width: 101%;
}
.ant-input-disabled {
color: rgba(0, 0, 0, 0.65);
}
.ant-select-disabled {
color: rgba(0, 0, 0, 0.65);
}
.itemOption {
display: inline-block;
width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
}
</style>
+44 -44
View File
@@ -1,36 +1,36 @@
<template>
<div class='diolag-area'>
<a-spin :spinning='spinLoading'>
<a-form-model
class='tag-module'
ref='ruleForm'
:model='formData'
:rules='rules'
:label-col='labelCol'
:wrapper-col='wrapperCol'
>
<a-row :gutter='24'>
<a-col :span='9'>
<a-form-model-item :label="$t('entryName')" prop='projectName'>
<a-input
:placeholder="$t('PleaseEnter')+$t('entryName')"
v-model='formData.projectName' />
</a-form-model-item>
</a-col>
<a-col :span='9'>
<a-form-model-item :label="$t('ListTitle')" prop='ListTitle'>
<a-input
:placeholder="$t('PleaseEnter')+$t('ListTitle')"
v-model='formData.title' />
</a-form-model-item>
</a-col>
<a-col :span='6' style='margin-top: 4px;'>
<a-button class='box-button' type='primary' @click='searchQuery'>{{ $t('query') }}</a-button>
<a-button class='box-button' style='margin-left: 8px' @click='searchReset'>{{ $t('reset') }}</a-button>
</a-col>
</a-row>
</a-form-model>
</a-spin>
<!-- <a-spin :spinning='spinLoading'>-->
<!-- <a-form-model-->
<!-- class='tag-module'-->
<!-- ref='ruleForm'-->
<!-- :model='formData'-->
<!-- :rules='rules'-->
<!-- :label-col='labelCol'-->
<!-- :wrapper-col='wrapperCol'-->
<!-- >-->
<!-- <a-row :gutter='24'>-->
<!-- <a-col :span='9'>-->
<!-- <a-form-model-item :label="$t('entryName')" prop='projectName'>-->
<!-- <a-input-->
<!-- :placeholder="$t('PleaseEnter')+$t('entryName')"-->
<!-- v-model='formData.projectName' />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span='9'>-->
<!-- <a-form-model-item :label="$t('ListTitle')" prop='ListTitle'>-->
<!-- <a-input-->
<!-- :placeholder="$t('PleaseEnter')+$t('ListTitle')"-->
<!-- v-model='formData.title' />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span='6' style='margin-top: 4px;'>-->
<!-- <a-button class='box-button' type='primary' @click='searchQuery'>{{ $t('query') }}</a-button>-->
<!-- <a-button class='box-button' style='margin-left: 8px' @click='searchReset'>{{ $t('reset') }}</a-button>-->
<!-- </a-col>-->
<!-- </a-row>-->
<!-- </a-form-model>-->
<!-- </a-spin>-->
<a-table
class='table-area'
ref='table'
@@ -85,19 +85,19 @@ export default {
loading: false,
editId: '',
columns: [
{
title: this.$t('entryName'),
dataIndex: 'projectName',
key: 'showArea',
align: 'center',
ellipsis: true
},
{
title: this.$t('ListTitle'),
align: 'center',
dataIndex: 'title',
ellipsis: true
},
// {
// title: this.$t('entryName'),
// dataIndex: 'projectName',
// key: 'showArea',
// align: 'center',
// ellipsis: true
// },
// {
// title: this.$t('ListTitle'),
// align: 'center',
// dataIndex: 'title',
// ellipsis: true
// },
{
title: this.$t('Exporttype'),
align: 'center',
@@ -92,6 +92,8 @@
this.$route.path == '/virtualListDetails' ||
this.$route.path == '/taskListProcess' ||
this.$route.path == '/ProjectDetails' ||
this.$route.path == '/countryCardRelease' ||
this.$route.path == '/countryCardView' ||
this.$route.path == '/problemKnowledgeBaseAdd' ||
this.$route.path == '/problemKnowledgeBaseRelease' ||
this.$route.path == '/problemKnowledgeBaseView' ||
@@ -136,7 +136,7 @@
<script>
import eventBUs from '../../common/event'
import { getAction, postAction } from '@/api/manage'
import CollectionType from '@/components/CollectionType'
import CollectionType from '@/components/CollectionTypeDisabled'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import axios from 'axios'
import Vue from 'vue'
+10
View File
@@ -367,6 +367,16 @@ export const constantRouterMap = [
name: 'problemKnowledgeBaseRelease',
component: () => import(/* webpackChunkName: "user" */ '@/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseRelease')
},
{
path: '/countryCardView',
name: 'countryCardView',
component: () => import(/* webpackChunkName: "user" */ '@/views/businessSupport/problemKnowledgeBase/components/countryCardView')
},
{
path: '/countryCardRelease',
name: 'countryCardRelease',
component: () => import(/* webpackChunkName: "user" */ '@/views/businessSupport/problemKnowledgeBase/components/countryCardRelease')
},
{
path: '/problemKnowledgeBaseView',
name: 'problemKnowledgeBaseView',
@@ -0,0 +1,172 @@
<template>
<a-modal
:title="title"
:width="700"
:visible="visible"
:confirm-loading="confirmLoading"
:maskClosable="false"
@ok="handleOk"
@cancel="handleCancel"
>
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<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('problemLabel')">{{$t('problemLabel')}}</span>
</div>
<a-form-model-item class="itemModel" prop="problemLabel">
<a-input class="box-input"
v-model="formInline.problemLabel"
:placeholder="$t('PleaseEnter')+$t('problemLabel')"/>
</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('personCharge')">{{$t('personCharge')}}</span>
</div>
<a-form-model-item class="itemModel" prop="personChargeName">
<PersonnelSelection
:query="{db_field_name:'personCharge',db_field_txt:$t('personCharge')}"
:personneQuery="formInline"
@change="PersonnelSelectionChange"
v-model="formInline.personChargeName"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-modal>
</template>
<script>
import PersonnelSelection from '@/components/PersonnelSelection/index'
import { getAction, postAction, downloadFile } from '@/api/manage'
export default {
name: 'classificationMaintenanceAdd',
components: {
PersonnelSelection
},
data() {
return {
visible: false,
confirmLoading: false,
formInline: {},
rules: {
personChargeName: [
{
required: true,
message: this.$t('personCharge') + this.$t('cannotEmpty'),
trigger: 'change'
},
{
max: 100,
message: this.$t('personCharge') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'change'
}
],
problemLabel: [
{
required: true,
message: this.$t('problemLabel') + this.$t('cannotEmpty'),
trigger: 'blur'
},
{
max: 100,
message: this.$t('problemLabel') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'blur'
}
]
},
title: ''
}
},
mounted() {
},
methods: {
add() {
this.visible = true
this.title = this.$t('addLabel')
this.$nextTick(() => {
this.formInline = {}
this.$refs.ruleForm.clearValidate()
})
},
edit(data) {
this.visible = true
this.title = this.$t('editLabel')
this.$nextTick(() => {
this.formInline = data
this.$refs.ruleForm.clearValidate()
})
},
PersonnelSelectionChange(value, id) {
this.formInline[value] = id
this.formInline = { ...this.formInline }
},
handleOk() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
}
})
},
handleCancel() {
this.visible = false
}
}
}
</script>
<style scoped>
.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;
}
.formAdd {
margin-bottom: 40px;
}
.Required {
color: red;
margin-right: 4px;
}
</style>
@@ -0,0 +1,206 @@
<template>
<div>
<a-drawer
:title="$t('classificationMaintenance')"
:maskClosable="false"
:width="1000"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<div style="margin-bottom: 60px">
<div class="box-title">
<div @click="addLabelClick" class="operator-text">
<a-icon type="plus"/>
{{$t('addLabel')}}
</div>
</div>
<a-table
:columns="columns"
:scroll="{x: '100%',y:'calc(100vh - 300px)'}"
:data-source="dataList"
:pagination="false"
:loading="loading">
<span slot="operation" slot-scope="text,record">
<a style="margin-right: 8px" @click="edit(record)">{{$t('edit')}}</a>
<a @click="deleteData">{{$t('delete')}}</a>
</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">
<a-button @click="handleCancel" type="danger">{{$t('cancel')}}</a-button>
</div>
</a-drawer>
<classificationMaintenanceAdd ref="classificationMaintenanceAddRef"
@classificationMaintenanceAddForm="classificationMaintenanceAddForm"/>
</div>
</template>
<script>
import { getAction, postAction, deleteAction } from '@/api/manage'
import classificationMaintenanceAdd from './classificationMaintenanceAdd'
export default {
name: 'classificationMaintenanceModel',
components: {
classificationMaintenanceAdd
},
data() {
return {
url: {
list: '',
deleteOne: ''
},
visible: false,
selectedRowKeys: [],
dataList: [{}],
loading: false,
pageNo: 1,
pageSize: 10,
total: 0,
columns: [
{
title: this.$t('number'),
align: 'center',
width: 70,
customRender: function(t, r, index) {
return parseInt(index) + 1
}
},
{
title: this.$t('problemLabel'),
dataIndex: 'title',
align: 'center',
ellipsis: true
},
{
title: this.$t('personCharge'),
dataIndex: 'region',
align: 'center',
ellipsis: true
},
{
title: this.$t('operation'),
align: 'center',
fixed: 'right',
width: 180,
scopedSlots: { customRender: 'operation' }
}
]
}
},
mounted() {
},
methods: {
getData() {
this.visible = true
},
handleCancel() {
this.visible = false
},
onChange(page, pageSize) {
this.pageNo = page
this.replacePage()
},
addLabelClick() {
this.$refs.classificationMaintenanceAddRef.add()
},
edit(val) {
this.$refs.classificationMaintenanceAddRef.edit(JSON.parse(JSON.stringify(val)))
},
deleteData(val) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
deleteAction(_this.url.deleteOne, { id: val.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getList()
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
},
classificationMaintenanceAddForm() {
this.pageNo = 1
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) => {
if (res.success) {
this.dataList = res.result.records || []
this.total = res.result.total
this.loading = false
} else {
this.dataList = []
this.total = 0
this.loading = false
}
})
}
}
}
</script>
<style scoped>
.page {
text-align: right;
margin-top: 20px;
}
.drawer-bootom-button {
position: absolute;
bottom: 0;
width: 100%;
z-index: 100;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
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;
}
</style>
@@ -1,13 +1,243 @@
<template>
<div class="box">
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('applicableMarket')">
<span>{{$t('applicableMarket')}}</span>
</div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('applicableMarket')"
v-model="queryParam.applicableMarket"></a-input>
</div>
</a-col>
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<div class="box-content-right">
<div @click="managePublishingClick" class="operator-text">
<a-icon type="carry-out"/>
{{$t('managePublishing')}}
</div>
</div>
<div class="content-box">
<div class="content-box-box" @click="contentClick()">
<img src="../../../../assets/mobileHome.png" class="content-box-box-img" alt="">
<span class="content-box-box-text">
中国
</span>
</div>
<div class="content-box-box">
<img src="../../../../assets/mobileHome.png" class="content-box-box-img" alt="">
<span class="content-box-box-text">
中国
</span>
</div>
<div class="content-box-box">
<img src="../../../../assets/mobileHome.png" class="content-box-box-img" alt="">
<span class="content-box-box-text">
中国
</span>
</div>
<div class="content-box-box">
<img src="../../../../assets/mobileHome.png" class="content-box-box-img" alt="">
<span class="content-box-box-text">
中国
</span>
</div>
<div class="content-box-box">
<img src="../../../../assets/mobileHome.png" class="content-box-box-img" alt="">
<span class="content-box-box-text">
中国
</span>
</div>
<div class="content-box-box">
<img src="../../../../assets/mobileHome.png" class="content-box-box-img" alt="">
<span class="content-box-box-text">
中国
</span>
</div>
<div class="page">
<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="pageOnChange"
@showSizeChange="SizeChange"
/>
</div>
</div>
</div>
</template>
<script>
import { getAction, postAction, downloadFile } from '@/api/manage'
export default {
name: 'countryCardList'
name: 'countryCardList',
data() {
return {
queryParam: {},
conList: [],
pageSize: 10,
total: 0,
pageNo: 1
}
},
mounted() {
},
methods: {
searchQuery() {
},
searchReset() {
},
pageOnChange(page, pageSize) {
this.pageNo = page
this.getList()
},
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.getList()
},
getList() {
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize
}
postAction(this.url.getInfoList, query).then((res) => {
if (res.success) {
this.conList = res.result.records
this.total = res.result.total
} else {
this.conList = []
}
})
},
managePublishingClick() {
let newUrl = this.$router.resolve({
path: '/countryCardRelease',
query: {}
})
window.open(newUrl.href, '_blank')
},
contentClick() {
let newUrl = this.$router.resolve({
path: '/countryCardView',
query: {}
})
window.open(newUrl.href, '_blank')
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
.page {
text-align: right;
margin-top: 20px;
}
.box-title-text {
line-height: 1.4;
display: flex;
align-items: center;
margin-bottom: 10px;
}
.title-text {
width: 20%;
min-width: 110px;
color: #000F16;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
margin-top: 3px;
text-align: right;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.box-input {
display: inline-block;
width: 70%;
height: 38px;
margin-top: 2px;
}
.box-button {
height: 38px;
/*margin-top: 2px;*/
}
.content-box {
width: 100%;
}
.content-box-box {
width: calc(33.3% - 20px);
height: 160px;
border: 1px #d9d9d9 solid;
cursor: pointer;
border-radius: 4px;
float: left;
margin-right: 30px;
margin-bottom: 30px;
}
.content-box-box:nth-child(3n+3) {
margin-right: 0;
}
.content-box-box-img {
width: 70%;
height: 100%;
border-right: 1px #d9d9d9 solid;
}
.content-box-box-text {
display: inline-block;
width: 30%;
text-align: center;
font-size: 18px;
font-weight: 500;
color: #040B29;
}
.box-content-right {
width: 100%;
text-align: right;
margin-top: 20px;
}
.operator-text {
cursor: pointer;
margin-right: 53px;
font-size: 14px;
font-weight: 400;
color: #040B29;
display: inline-block;
}
.operator-text:last-child {
margin-right: 13px;
}
</style>
@@ -0,0 +1,380 @@
<template>
<div class="doc-detail">
<div class="doc-detail-wrap">
<div class="doc-detail-header" style="position: fixed;top: 0">
<div class="doc-detail-title">
<span style="line-height: 66px;display: inline-block;float: left">
<a-icon type="arrow-left" style="margin-right: 6px;"/>
</span>
{{$t('managePublishing')}}
</div>
</div>
<div style="padding-top: 68px;background: #fff">
<div class="detail-content" style="padding: 24px">
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('applicableMarket')">
<span>{{$t('applicableMarket')}}</span>
</div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('applicableMarket')"
v-model="queryParam.applicableMarket"></a-input>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('releaseStatus')">
<span>{{$t('releaseStatus')}}</span>
</div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('releaseStatus')"
v-model="queryParam.releaseStatus"></a-input>
</div>
</a-col>
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<div class="box-content-right">
<div @click="BatchDeleteClick" class="operator-text">
<a-icon type="delete"/>
{{$t('BatchDelete')}}
</div>
<div @click="templateMaintenanceClick" class="operator-text">
<a-icon type="carry-out"/>
{{$t('templateMaintenance')}}
</div>
<div @click="newlyAddedClick" class="operator-text">
<a-icon type="plus"/>
{{$t('newlyAdded')}}
</div>
</div>
<div>
<a-table
ref="table"
size="middle"
:loading="loading"
:pagination="false"
:scroll="{x: '100%'}"
rowKey="id"
:data-source="dataSource"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:columns="columns"
>
<span slot="operation" slot-scope="text,record">
<a class="text-operation" @click="viewClick(record)">{{$t('view')}}</a>
<a class="text-operation"
@click="subscribe(record)">
{{!record.releaseCondition || record.releaseCondition == 'draft' ? $t('release') :$t('withdraw')}}
</a>
<a class="text-operation"
@click="edit(record)">{{$t('edit')}}</a>
<a class="text-operation"
@click="deleteData(record)">{{$t('delete')}}</a>
</span>
</a-table>
<div class="page" v-if="dataSource && 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"
:current="pageNo"
@change="pageOnChange"
@showSizeChange="SizeChange"
/>
</div>
</div>
</div>
</div>
</div>
<countryCardReleaseModel ref="countryCardReleaseModelRef"/>
</div>
</template>
<script>
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
import countryCardReleaseModel from './countryCardReleaseModel'
export default {
name: 'countryCardRelease',
components: {
countryCardReleaseModel
},
data() {
return {
queryParam: {},
loading: false,
dataSource: [{}],
total: 0,
pageSize: 10,
pageNo: 1,
url: {
list: '',
deleteBatch: ''
},
selectedRowKeys: [],
columns: [
{
title: this.$t('applicableMarket'),
align: 'center',
dataIndex: 'applicableMarket',
ellipsis: true
},
{
title: this.$t('releaseStatus'),
align: 'center',
dataIndex: 'releaseStatus',
ellipsis: true
},
{
title: this.$t('operation'),
align: 'center',
fixed: 'right',
width: 260,
scopedSlots: { customRender: 'operation' }
}
]
}
},
mounted() {
document.title = 'Country Card-' + this.$t('managePublishing')
},
methods: {
searchQuery() {
this.pageNo = 1
this.getList()
},
searchReset() {
this.queryParam = {}
this.pageNo = 1
this.getList()
},
pageOnChange(page) {
this.pageNo = page
this.getList()
},
SizeChange(pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.getList()
},
getList() {
let queryParam = JSON.parse(JSON.stringify(this.queryParam))
Object.keys(queryParam).forEach(val => {
if (queryParam[val] instanceof Array) {
queryParam[val] = queryParam[val].join(',')
}
})
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize,
...queryParam
}
this.loading = true
getAction(this.url.list, query).then((res) => {
if (res.success) {
this.dataSource = res.result.records || []
this.total = res.result.total
this.loading = false
} else {
this.loading = false
}
})
},
onSelectChange(value) {
this.selectedRowKeys = value
},
newlyAddedClick() {
},
templateMaintenanceClick() {
this.$refs.countryCardReleaseModelRef.getData()
},
BatchDeleteClick() {
if (this.selectedRowKeys.length > 0) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmBatchDeletion'),
onOk() {
let idList = JSON.parse(JSON.stringify(_this.selectedRowKeys))
getAction(_this.url.deleteBatch, { ids: idList.join(',') }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.selectedRowKeys = []
_this.getList()
} else {
_this.$message.warning(res.message)
}
})
}
})
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
edit() {
},
subscribe() {
},
viewClick() {
let newUrl = this.$router.resolve({
path: '/countryCardView',
query: {}
})
window.open(newUrl.href, '_blank')
},
deleteData(val) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
deleteAction(_this.url.deleteBatch, { ids: val.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getList()
} else {
_this.$message.warning(res.message)
}
})
}
})
}
}
}
</script>
<style scoped lang="less">
@import '~@assets/less/common.less';
.doc-detail {
background: #fff;
height: 100%;
.doc-detail-wrap {
.doc-detail-header {
width: 100%;
height: 68px;
line-height: 68px;
padding: 0 0 0 32px;
box-sizing: border-box;
display: flex;
justify-content: space-between;
border-bottom: 2px #eff1f3 solid;
z-index: 1000;
background: #fff;
.doc-detail-title {
display: inline-block;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
font-size: 20px;
font-weight: 400;
color: #040B29;
line-height: 68px;
}
.doc-detail-right {
width: 800px;
line-height: 68px;
display: flex;
.doc-detail-btn {
margin-left: 10px;
}
}
}
.content-box {
padding: 0 32px;
box-sizing: border-box;
}
.header-text {
font-size: 16px;
font-weight: 400;
height: 80px;
color: #000F16;
line-height: 80px;
}
.processBackground-text {
font-size: 16px;
color: #000F16;
}
}
}
.page {
text-align: right;
margin-top: 20px;
}
.box-title-text {
line-height: 1.4;
display: flex;
align-items: center;
margin-bottom: 10px;
}
.title-text {
width: 20%;
min-width: 110px;
color: #000F16;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
margin-top: 3px;
text-align: right;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.box-input {
display: inline-block;
width: 70%;
height: 38px;
margin-top: 2px;
}
.box-button {
height: 38px;
/*margin-top: 2px;*/
}
.box-content-right {
width: 100%;
text-align: right;
margin-top: 20px;
margin-bottom: 20px;
}
.operator-text {
cursor: pointer;
margin-right: 53px;
font-size: 14px;
font-weight: 400;
color: #040B29;
display: inline-block;
}
.operator-text:last-child {
margin-right: 13px;
}
.text-operation {
margin-right: 8px;
}
</style>
@@ -0,0 +1,210 @@
<template>
<div>
<a-drawer
:title="$t('templateMaintenance')"
:maskClosable="false"
:width="1000"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<div style="margin-bottom: 60px">
<div class="box-title">
<div @click="addLabelClick" class="operator-text">
<a-icon type="plus"/>
{{$t('newlyAdded')}}
</div>
</div>
<a-table
:columns="columns"
:scroll="{x: '100%',y:'calc(100vh - 300px)'}"
:data-source="dataList"
:pagination="false"
:loading="loading">
<span slot="operation" slot-scope="text,record">
<a style="margin-right: 8px" @click="edit(record)">{{$t('edit')}}</a>
<a @click="deleteData">{{$t('delete')}}</a>
</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">
<a-button @click="handleCancel" type="danger">{{$t('cancel')}}</a-button>
</div>
</a-drawer>
<countryCardReleaseModelAdd ref="countryCardReleaseModelAddRef"
@countryCardReleaseModelAddForm="countryCardReleaseModelAddForm"/>
</div>
</template>
<script>
import { getAction, postAction, downloadFile,deleteAction } from '@/api/manage'
import countryCardReleaseModelAdd from './countryCardReleaseModelAdd'
export default {
name: 'countryCardReleaseModel',
components: {
countryCardReleaseModelAdd
},
data() {
return {
url: {
list: '',
deleteOne: ''
},
visible: false,
selectedRowKeys: [],
dataList: [{}],
loading: false,
pageNo: 1,
pageSize: 10,
total: 0,
columns: [
{
title: this.$t('LabelName'),
dataIndex: 'LabelName',
align: 'center',
ellipsis: true,
width: 200
},
{
title: this.$t('LabelType'),
dataIndex: 'LabelType',
align: 'center',
ellipsis: true,
width: 200
},
{
title: this.$t('DisplayOrder'),
dataIndex: 'DisplayOrder',
align: 'center',
ellipsis: true,
width: 160
},
{
title: this.$t('operation'),
align: 'center',
fixed: 'right',
width: 180,
scopedSlots: { customRender: 'operation' }
}
]
}
},
mounted() {
},
methods: {
getData() {
this.visible = true
},
handleCancel() {
this.visible = false
},
onChange(page, pageSize) {
this.pageNo = page
this.replacePage()
},
countryCardReleaseModelAddForm() {
this.pageNo = 1
this.replacePage()
},
addLabelClick() {
this.$refs.countryCardReleaseModelAddRef.add()
},
edit(val) {
this.$refs.countryCardReleaseModelAddRef.edit(JSON.parse(JSON.stringify(val)))
},
deleteData(val) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
deleteAction(_this.url.deleteOne, { id: val.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getList()
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
},
classificationMaintenanceAddForm() {
this.pageNo = 1
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) => {
if (res.success) {
this.dataList = res.result.records || []
this.total = res.result.total
this.loading = false
} else {
this.dataList = []
this.total = 0
this.loading = false
}
})
}
}
}
</script>
<style scoped>
.page {
text-align: right;
margin-top: 20px;
}
.drawer-bootom-button {
position: absolute;
bottom: 0;
width: 100%;
z-index: 100;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
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;
}
</style>
@@ -0,0 +1,256 @@
<template>
<a-modal
:title="title"
:width="700"
:visible="visible"
:confirm-loading="confirmLoading"
:maskClosable="false"
@ok="handleOk"
@cancel="handleCancel"
>
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<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('LabelName')">{{$t('LabelName')}}</span>
</div>
<a-form-model-item class="itemModel" prop="LabelName">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.LabelName"
:placeholder="$t('PleaseEnter')+$t('LabelName')"/>
</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('LabelType')">{{$t('LabelType')}}</span>
</div>
<a-form-model-item class="itemModel" prop="LabelType">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.LabelType"
:placeholder="$t('PleaseEnter')+$t('LabelType')"/>
</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('dropDownOptions')">{{$t('dropDownOptions')}}</span>
</div>
<a-form-model-item class="itemModel" prop="dropDownOptions">
<a-button class="submit" @click="dropDownOptionsClick" type="primary">
{{$t('dropDownOptionMaintenance')}}
</a-button>
</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"
:disabled="disabled"
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="title-text-text"
:title="$t('associatedWebsite')">{{$t('associatedWebsite')}}</span>
</div>
<a-form-model-item class="itemModel" prop="associatedWebsite">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.associatedWebsite"
:placeholder="$t('PleaseEnter')+$t('associatedWebsite')"/>
</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="title-text-text"
:title="$t('describe')">{{$t('describe')}}</span>
</div>
<a-form-model-item class="itemModel" prop="describe">
<a-textarea
:placeholder="$t('PleaseEnter')+$t('describe')"
:disabled="disabled"
v-model="formInline.describe" :rows="4"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-modal>
</template>
<script>
import { getAction, postAction, downloadFile } from '@/api/manage'
export default {
name: 'countryCardReleaseModelAdd',
data() {
return {
visible: false,
disabled: false,
confirmLoading: false,
formInline: {},
rules: {
LabelName: [
{
required: true,
message: this.$t('personCharge') + this.$t('cannotEmpty'),
trigger: 'blur'
},
{
max: 100,
message: this.$t('personCharge') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'blur'
}
],
LabelType: [
{
required: true,
message: this.$t('problemLabel') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
DisplayOrder: [
{
required: true,
message: this.$t('DisplayOrder') + this.$t('cannotEmpty'),
trigger: 'blur'
}
],
associatedWebsite: [
{
max: 100,
message: this.$t('associatedWebsite') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'blur'
}
],
describe: [
{
max: 300,
message: this.$t('describe') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
trigger: 'blur'
}
]
},
title: ''
}
},
mounted() {
},
methods: {
add() {
this.visible = true
this.title = this.$t('addLabel')
this.$nextTick(() => {
this.formInline = {}
this.$refs.ruleForm.clearValidate()
})
},
edit(data) {
this.visible = true
this.title = this.$t('editLabel')
this.$nextTick(() => {
this.formInline = data
this.$refs.ruleForm.clearValidate()
})
},
PersonnelSelectionChange(value, id) {
this.formInline[value] = id
this.formInline = { ...this.formInline }
},
handleOk() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
}
})
},
handleCancel() {
this.visible = false
}
}
}
</script>
<style scoped>
.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;
}
.formAdd {
margin-bottom: 40px;
}
.Required {
color: red;
margin-right: 4px;
}
.submit {
height: 38px;
}
</style>
@@ -0,0 +1,263 @@
<template>
<div class="doc-detail">
<div class="doc-detail-wrap">
<div class="doc-detail-header" style="position: fixed;top: 0">
<div class="doc-detail-title">
<span style="line-height: 66px;display: inline-block;float: left">
<a-icon type="arrow-left" style="margin-right: 6px;"/>
</span>
{{$t('See')}}
</div>
</div>
<div style="padding-top: 68px;background: #fff">
<div class="detail-content" style="padding: 24px;white-space: nowrap">
<div class="box-content-right">
<div @click="displayInformationClick" class="operator-text">
<a-icon type="eye"/>
{{$t('displayInformation')}}
</div>
<div @click="newlyAddedClick" class="operator-text">
<a-icon type="plus"/>
{{$t('addComparison')}}
</div>
</div>
<div class="content-box">
<div class="content-box-left">
<div class="content-box-left-text">
hadhasdasdhadashdjk
</div>
<div class="content-box-left-text">
hadhasdasdhadashdjk
</div>
<div class="content-box-left-text">
hadhasdasdhadashdjk
</div>
<div class="content-box-left-text">
hadhasdasdhadashdjk
</div>
<div class="content-box-left-text">
hadhasdasdhadashdjk
</div>
<div class="content-box-left-text">
hadhasdasdhadashdjk
</div>
<div class="content-box-left-text">
hadhasdasdhadashdjk
</div>
<div class="content-box-left-text">
hadhasdasdhadashdjk
</div>
<div class="content-box-left-text">
hadhasdasdhadashdjk
</div>
</div>
<div class="content-box-right" v-for="item1 in 9">
<div class="content-box-box-top">
<img src="../../../../assets/mobileHome.png" class="content-box-box-img" alt="">
<span class="content-box-box-text">
中国
</span>
</div>
<div class="content-box-box" v-for="item in 9">
<img src="../../../../assets/mobileHome.png" class="content-box-box-img" alt="">
<span class="content-box-box-text">
中国
</span>
</div>
</div>
</div>
</div>
</div>
</div>
<displayInformationModel ref="displayInformationModelRef"/>
</div>
</template>
<script>
import { getAction, postAction, downloadFile } from '@/api/manage'
import displayInformationModel from './displayInformationModel'
export default {
name: 'countryCardView',
components: {
displayInformationModel
},
data() {
return {}
},
mounted() {
},
methods: {
displayInformationClick() {
this.$refs.displayInformationModelRef.getData()
},
newlyAddedClick() {
}
}
}
</script>
<style scoped lang="less">
@import '~@assets/less/common.less';
.doc-detail {
background: #fff;
height: 100%;
.doc-detail-wrap {
.doc-detail-header {
width: 100%;
height: 68px;
line-height: 68px;
padding: 0 0 0 32px;
box-sizing: border-box;
display: flex;
justify-content: space-between;
border-bottom: 2px #eff1f3 solid;
z-index: 1000;
background: #fff;
.doc-detail-title {
display: inline-block;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
font-size: 20px;
font-weight: 400;
color: #040B29;
line-height: 68px;
}
.doc-detail-right {
width: 800px;
line-height: 68px;
display: flex;
.doc-detail-btn {
margin-left: 10px;
}
}
}
.header-text {
font-size: 16px;
font-weight: 400;
height: 80px;
color: #000F16;
line-height: 80px;
}
.processBackground-text {
font-size: 16px;
color: #000F16;
}
}
}
.box-content-right {
width: 100%;
text-align: right;
margin-bottom: 20px;
}
.operator-text {
cursor: pointer;
margin-right: 53px;
font-size: 14px;
font-weight: 400;
color: #040B29;
display: inline-block;
}
.operator-text:last-child {
margin-right: 13px;
}
.content-box {
overflow: auto;
white-space: nowrap;
position: relative;
}
.content-box-left {
width: 200px;
background: #fff;
z-index: 111;
display: inline-block;
position: sticky;
left: 0;
border-top: 1px #d9d9d9 solid;
border-left: 1px #d9d9d9 solid;
border-bottom: 1px #d9d9d9 solid;
border-right: 1px #d9d9d9 solid;
}
.content-box-left-text {
font-size: 16px;
color: #040B29;
font-weight: 400;
text-align: center;
border-bottom: 1px #d9d9d9 solid;
height: 80px;
line-height: 80px;
}
.content-box-left-text:last-child {
border-bottom: none;
}
.content-box-box-top {
width: 340px;
height: 160px;
display: inline-block;
cursor: pointer;
border-left: 1px #d9d9d9 solid;
border-top: 1px #d9d9d9 solid;
border-right: 1px #d9d9d9 solid;
border-bottom: 1px #d9d9d9 solid;
position: sticky;
top: 0;
z-index: 111;
background: #fff;
}
.content-box-right {
width: 339px;
position: relative;
display: inline-block;
border-top: 1px #d9d9d9 solid;
border-right: 1px #d9d9d9 solid;
border-bottom: 1px #d9d9d9 solid;
}
.content-box-right:last-child {
border-right: 1px #d9d9d9 solid;
}
.content-box-box-img {
width: 70%;
height: 100%;
}
.content-box-box-text {
display: inline-block;
width: 30%;
text-align: center;
font-size: 18px;
font-weight: 500;
color: #040B29;
}
.content-box-box {
width: 100%;
height: 80px;
border-bottom: 1px #d9d9d9 solid;
cursor: pointer;
}
.content-box-box:last-child {
border-bottom: none;
}
</style>
@@ -0,0 +1,156 @@
<template>
<div>
<a-drawer
:title="$t('displayInformation')"
:maskClosable="false"
:width="800"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<div style="margin-bottom: 60px">
<a-table
:columns="columns"
:scroll="{x: '100%',y:'calc(100vh - 300px)'}"
:data-source="dataList"
:pagination="false"
:loading="loading">
<span slot="showOrNot" slot-scope="text,record">
<a-checkbox :value="text"></a-checkbox>
</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">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div>
</a-drawer>
</div>
</template>
<script>
import { getAction, postAction, deleteAction } from '@/api/manage'
export default {
name: 'displayInformationModel',
data() {
return {
url: {
list: '',
deleteOne: ''
},
visible: false,
selectedRowKeys: [],
dataList: [{}],
loading: false,
pageNo: 1,
pageSize: 10,
confirmLoading:false,
total: 0,
columns: [
{
title: this.$t('LabelName'),
dataIndex: 'LabelName',
align: 'center',
ellipsis: true
},
{
title: this.$t('showOrNot'),
dataIndex: 'showOrNot',
align: 'center',
ellipsis: true,
scopedSlots: { customRender: 'showOrNot' }
}
]
}
},
mounted() {
},
methods: {
getData() {
this.visible = true
},
handleCancel() {
this.visible = false
},
handleSubmit(){
},
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) => {
if (res.success) {
this.dataList = res.result.records || []
this.total = res.result.total
this.loading = false
} else {
this.dataList = []
this.total = 0
this.loading = false
}
})
}
}
}
</script>
<style scoped>
.page {
text-align: right;
margin-top: 20px;
}
.drawer-bootom-button {
position: absolute;
bottom: 0;
width: 100%;
z-index: 100;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
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;
}
</style>
@@ -76,14 +76,19 @@
@showSizeChange="SizeChange"
/>
</div>
<classificationMaintenanceModel ref="classificationMaintenanceModelRef"/>
</div>
</template>
<script>
import { getAction, postAction, downloadFile } from '@/api/manage'
import classificationMaintenanceModel from './classificationMaintenanceModel'
export default {
name: 'problemKnowledgeBaseList',
components: {
classificationMaintenanceModel
},
data() {
return {
searchContent: '',
@@ -109,11 +114,7 @@
},
classificationClick() {
let newUrl = this.$router.resolve({
path: '/problemKnowledgeBaseView',
query: {}
})
window.open(newUrl.href, '_blank')
this.$refs.classificationMaintenanceModelRef.getData()
},
managePublishingClick() {
let newUrl = this.$router.resolve({
@@ -154,12 +155,8 @@
},
titleClick(item) {
let newUrl = this.$router.resolve({
path: '/docManage/library/detail',
query: {
id: item.id.slice(0, 32),
title: item.title,
serial_number: item.serial_number
}
path: '/problemKnowledgeBaseView',
query: {}
})
window.open(newUrl.href, '_blank')
}
@@ -11,16 +11,150 @@
</div>
<div style="padding-top: 68px;background: #fff">
<div class="detail-content" style="padding: 24px">
<div class="content-text">
<div class="text-field" v-for="(item,index) in standardContentList" :key="index">
<span class="text-field-left" :title="item.title">{{item.title}}</span>
<span class="text-field-right text-field-right-url"
@click="clickButtonToUpload(queryForm[item.value])"
v-if="item.type == 2 && queryForm[item.value]"
>{{ $t('viewFile') }}</span>
<span class="text-field-right"
:title="queryForm[item.value]" v-else>
{{queryForm[item.value]}}fdgdgdfg
</span>
</div>
</div>
<div class="content">
sfdsfdsf的防控流感的飞机过来看的结果东法兰克感觉地方给了地方国家的分开两个就地方孤苦伶仃附件给领导反馈
独守空房了就收到付款了的角色发看来都是风景但是考虑附件第三方库老师积分迪斯科浪费绝对是分类的课时费
是反抗拉萨的飞机罗斯福就点十六分就但是发
迪斯科浪费电视机分厘卡的设计分类的水库附近的说服力但是积分的历史房价多少发了多少给京东方管理看豆腐干豆腐干看
a fjsd fklsdjfk s是否考虑技术的反抗类毒素就发的撒开了房间但是发离开打扫房间是开了房间都是老师JFK了的身份圣诞快乐就是的反抗类毒素解放迪斯科浪费是
考虑到房价打开拉萨附近分离技术的领导是否打开拉萨范德萨发了开始就发的考虑是否就但是考虑发及代理商开发就十分大师傅看
</div>
<div class="content-icon">
<span class="content-icon-text">
<a-icon class="icon" type="eye"/>
<span>123456</span>
</span>
<span class="content-icon-text">
<a-icon class="icon" type="like"/>
<span>123456</span>
</span>
<span class="content-icon-text">
<a-icon class="icon" type="star"/>
<span>123456</span>
</span>
</div>
<div class="box-text">
<div class="header-text">
{{$t('comment')}}
</div>
</div>
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<a-form-model-item class="itemModel" prop="approvalOpinion">
<a-textarea :placeholder="$t('pleaseEnter')+$t('comment')"
v-model="formInline.approvalOpinion"
:rows="4"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
<div class="content-button">
<a-button class="header-btn submit" @click="release" type="primary">{{$t('release')}}</a-button>
</div>
<div>
<div class="box-text">
<div class="header-text">
<span style="margin-right: 20px">张三</span>
2022-12-12 10:10:12
</div>
</div>
<div class="content">
sfdsfdsf的防控流感的飞机过来看的结果东法兰克感觉地方给了地方国家的分开两个就地方孤苦伶仃附件给领导反馈
独守空房了就收到付款了的角色发看来都是风景但是考虑附件第三方库老师积分迪斯科浪费绝对是分类的课时费
是反抗拉萨的飞机罗斯福就点十六分就但是发
迪斯科浪费电视机分厘卡的设计分类的水库附近的说服力但是积分的历史房价多少发了多少给京东方管理看豆腐干豆腐干看
a fjsd fklsdjfk s是否考虑技术的反抗类毒素就发的撒开了房间但是发离开打扫房间是开了房间都是老师JFK了的身份圣诞快乐就是的反抗类毒素解放迪斯科浪费是
考虑到房价打开拉萨附近分离技术的领导是否打开拉萨范德萨发了开始就发的考虑是否就但是考虑发及代理商开发就十分大师傅看
</div>
<div class="box-text">
<div class="header-text">
<span style="margin-right: 20px">张三</span>
2022-12-12 10:10:12
</div>
</div>
<div class="content">
sfdsfdsf的防控流感的飞机过来看的结果东法兰克感觉地方给了地方国家的分开两个就地方孤苦伶仃附件给领导反馈
独守空房了就收到付款了的角色发看来都是风景但是考虑附件第三方库老师积分迪斯科浪费绝对是分类的课时费
是反抗拉萨的飞机罗斯福就点十六分就但是发
迪斯科浪费电视机分厘卡的设计分类的水库附近的说服力但是积分的历史房价多少发了多少给京东方管理看豆腐干豆腐干看
a fjsd fklsdjfk s是否考虑技术的反抗类毒素就发的撒开了房间但是发离开打扫房间是开了房间都是老师JFK了的身份圣诞快乐就是的反抗类毒素解放迪斯科浪费是
考虑到房价打开拉萨附近分离技术的领导是否打开拉萨范德萨发了开始就发的考虑是否就但是考虑发及代理商开发就十分大师傅看
</div>
</div>
</div>
</div>
</div>
<viewFileModel ref="viewFileModelRef"/>
</div>
</template>
<script>
import viewFileModel from '@/components/viewFileModel/index'
import { getAction, postAction, downloadFile } from '@/api/manage'
export default {
name: 'problemKnowledgeBaseView'
name: 'problemKnowledgeBaseView',
components: {
viewFileModel
},
data() {
return {
standardContentList: [
{
title: this.$t('problemClassification'),
value: ''
},
{
title: this.$t('market'),
value: ''
},
{
title: this.$t('standardNo'),
value: ''
},
{
title: this.$t('standardName'),
value: ''
},
{
title: this.$t('enclosure'),
type: 2,
value: ''
}
],
queryForm: {},
formInline: {},
rules: {}
}
},
mounted() {
document.title = this.$t('applicableInstructionsMarketList')
},
methods: {
clickButtonToUpload(item) {
this.$refs.viewFileModelRef.clickButtonToUpload(item)
},
release() {
}
}
}
</script>
@@ -85,4 +219,132 @@
}
}
}
.box-text {
display: flex;
justify-content: space-between;
height: 60px;
line-height: 40px;
.header-text {
font-size: 16px;
font-weight: 400;
color: #000F16;
}
}
.content-text {
width: 100%;
display: flex;
flex-wrap: wrap;
.text-field {
width: 33%;
margin-bottom: 8px;
.text-field-left {
width: 124px;
display: inline-block;
font-size: 14px;
font-weight: 400;
color: #6F7385;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
margin-right: 24px;
}
.text-field-right {
width: calc(100% - 200px);
display: inline-block;
font-size: 16px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
color: #040B29;
font-weight: 400;
}
.text-field-right-url {
color: #00B3BE !important;
cursor: pointer;
margin-top: 10px;
}
}
}
.content {
font-size: 16px;
color: #040B29;
font-weight: 400;
}
.content-icon {
height: 40px;
line-height: 40px;
font-size: 16px;
color: #040B29;
font-weight: 400;
text-align: right;
margin-top: 20px;
}
.content-icon-text {
display: inline-block;
padding: 0 20px;
cursor: pointer;
line-height: 40px;
}
.content-icon-text .icon {
font-size: 24px;
color: #3b4249 !important;
}
.content-icon-text span {
display: inline-block;
margin-left: 4px;
}
.box-title-text {
line-height: 1.4;
display: flex;
/*align-items: center;*/
}
.title-text {
width: 88px;
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: 48px;
color: #000F16;
}
.box-input {
display: inline-block;
height: 38px;
width: 100%;
}
.itemModel {
width: 100%;
display: inline-block;
margin-top: 2px;
margin-bottom: 12px;
}
.content-button {
text-align: right;
}
.header-btn {
height: 38px;
}
</style>
@@ -27,7 +27,7 @@
</div>
</div>
<div style="padding-top: 68px;background: #fff">
<div class="detail-content">
<div class="detail-content" style="padding-bottom: 20px">
<div style="width: 100%;height: auto;overflow: hidden">
<div class="detail-content-left">
<div class="detail-content-left-header">
@@ -324,6 +324,7 @@
if (res.success) {
this.loading = false
this.$message.success(this.$t('OperationSuccessful'))
} else {
this.loading = false
this.$message.warning(this.$t('operationFailed'))
@@ -26,19 +26,10 @@
<div class="title-text" :title="$t('releaseSituation')">
<span>{{$t('releaseSituation')}}</span>
</div>
<a-select :placeholder="$t('PleaseSelect')+$t('releaseSituation')"
class="box-input"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
allowClear
v-model="queryParam.flowStatus">
<a-select-option v-for="(item, key) in gatherResultList"
:key="key"
:value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.name">
{{ item.name }}
</span>
</a-select-option>
</a-select>
<j-dict-select-tag class="box-input" v-model="queryParam.releaseCondition"
:placeholder="$t('PleaseSelect')+$t('releaseSituation')"
:type="'select'"
:triggerChange="false" dictCode="release_condition"/>
</div>
</a-col>
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
@@ -66,7 +66,7 @@
:title="$t('WhetherMergeParameters')">{{$t('WhetherMergeParameters')}}</span>
</div>
<a-form-model-item class="itemModel" prop="combineFlag">
<a-radio-group style="margin-top: 2px" @change="flagChange" class="box-input" v-model="formInline.combineFlag">
<a-radio-group style="margin-top: 2px" @change="flagChange" defaultValue='1' class="box-input" v-model="formInline.combineFlag">
<a-radio value="1">
{{$t('nonjoinder')}}
</a-radio>
@@ -82,11 +82,11 @@
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="Required" v-if='required'>*</span>
<span class="Required" v-if='!required'>*</span>
<span class="title-text-text"
:title="$t('MergeSeparator')">{{$t('MergeSeparator')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="required?'separator':''">
<a-form-model-item class="itemModel" :prop="!required?'separator':''">
<!-- :disabled="disabled"-->
<a-input class="box-input"
v-model="formInline.separator"
@@ -132,6 +132,11 @@ export default {
rules: {
separator:[
{ required: true, message: this.$t('PleaseEnter')+this.$t('MergeSeparator'), trigger: 'change' },
{
pattern: /[`~!@$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~@%&*\-+={}|']/,
message: this.$t('punctuationmark'),
trigger: 'blur'
}
],
certCategory:[
{ required: true, message: this.$t('PleaseEnter')+this.$t('certificationCategory'), trigger: 'change' },
@@ -188,9 +193,9 @@ export default {
flagChange(value){
console.log(value.target.value)
if(value.target.value == 2){
this.required = true
}else{
this.required = false
}else{
this.required = true
}
},
getNameList() {
@@ -81,12 +81,17 @@
</div>
</div>
<div class="table-operator">
<!-- 保存-->
<div @click="handlePreservation" class="operator-text" v-has="'report:detail:export:save'">
<a-icon type="check-circle"/>
{{$t('preservation')}}
</div>
<div @click="ConventionalExport" class="operator-text" v-has="'report:detail:export:normal'">
<!-- <a-icon type="plus"/>-->
<a-icon type="download"/>
{{$t('ConventionalExport')}}
</div>
<div @click="CustomExport" class="operator-text" v-has="'report:detail:export:custom'">
<!-- <a-icon type="delete"/>-->
<a-icon type="download"/>
{{$t('CustomExport')}}
</div>
</div>
@@ -134,6 +139,7 @@
<!-- </div>-->
<conventionalModel :url="url" ref="conventionalModel"/>
<customelModel :url="url" ref="customelModel"/>
<JLoading :loading="textLoading">{{this.$t('pleaseWaitWhileRunning')}}</JLoading>
</a-card>
</template>
@@ -159,6 +165,7 @@ export default {
columns:[],
selectedRowKeys: [],
formInline: {},
textLoading:false,
url: {
tableHeader: 'report/detail/getHeader',
tableList: 'report/detail/list',
@@ -286,6 +293,59 @@ export default {
this.formInline[value] = id
this.formInline = { ...this.formInline }
},
// 保存
handlePreservation(num) {
let _this = this
let postDate = []
let data = JSON.parse(JSON.stringify(this.dataSource))
let selectedRowKeysValue = []
data.forEach(res => {
selectedRowKeysValue.push(res)
})
console.log(selectedRowKeysValue)
for (let i = 0; i < selectedRowKeysValue.length; i++) {
let postDateobj = {}
let itemIn = Object.keys(selectedRowKeysValue[i])
console.log(itemIn)
for (let j = 0; j < itemIn.length; j++) {
if (itemIn[j] !== 'sdt' && selectedRowKeysValue[i][itemIn[j]].list) {
if (selectedRowKeysValue[i][itemIn[j]] instanceof Object && !(selectedRowKeysValue[i][itemIn[j]] instanceof Array)) {
postDateobj[itemIn[j]] = selectedRowKeysValue[i][itemIn[j]]
for (let k = 0; k < selectedRowKeysValue[i][itemIn[j]].list.length; k++) {
console.log(selectedRowKeysValue[i][itemIn[j]].list[k].dataValue)
if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'pull_more' && selectedRowKeysValue[i][itemIn[j]].list[k].dataValue !== null && selectedRowKeysValue[i][itemIn[j]].list[k].dataValue instanceof Array) {
selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.join(',')
}
if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'text' && selectedRowKeysValue[i][itemIn[j]].list[k].dataValue !== null) {
selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.toString()
}
}
}
}
}
postDateobj.id = selectedRowKeysValue[i].id
postDate.push(postDateobj)
}
let configDataList = { configDataList: postDate }
if (selectedRowKeysValue && selectedRowKeysValue.length > 0) {
this.textLoading = true
let query = {
...configDataList,
paramsManifestId: this.$route.query.id
}
postAction('/report/detail/save', query).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
this.$refs.CollectionTabel.getTableList()
this.textLoading = false
} else {
_this.$message.warning(_this.$t('operationFailed'))
this.textLoading = false
}
})
} else {
}
},
getTableList() {
// console.log('this.searchParmestable',this.searchParmes)
let pageNo = JSON.parse(JSON.stringify(this.pageNo))
@@ -319,70 +379,6 @@ export default {
getDataSource(data) {
this.dataSource = data
},
handlePreservation(num) {
let _this = this
let postDate = []
let data = JSON.parse(JSON.stringify(this.dataSource))
let selectedRowKeysValue = []
data.forEach(res => {
if (res.state == 'Wait Fill' || res.state == '待填写') {
selectedRowKeysValue.push(res)
}
})
for (let i = 0; i < selectedRowKeysValue.length; i++) {
let postDateobj = {}
let itemIn = Object.keys(selectedRowKeysValue[i])
for (let j = 0; j < itemIn.length; j++) {
if (itemIn[j] !== 'sdt') {
if (selectedRowKeysValue[i][itemIn[j]] instanceof Object && !(selectedRowKeysValue[i][itemIn[j]] instanceof Array)) {
postDateobj[itemIn[j]] = selectedRowKeysValue[i][itemIn[j]]
for (let k = 0; k < selectedRowKeysValue[i][itemIn[j]].list.length; k++) {
if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'pull_more') {
selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.join(',')
}
if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'text' && selectedRowKeysValue[i][itemIn[j]].list[k].dataValue !== null) {
selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.toString()
}
}
}
}
}
postDateobj.id = selectedRowKeysValue[i].id
postDate.push(postDateobj)
}
let configDataList = { configDataList: postDate }
if (selectedRowKeysValue && selectedRowKeysValue.length > 0) {
if (num && num == 1) {
this.textLoading = true
}
let query = {
...configDataList,
paramsManifestId: this.paramsManifest.id
}
postAction('/params/collectManifest/save', query).then((res) => {
if (res.success) {
if (num && num == 1) {
_this.$message.success(_this.$t('OperationSuccessful'))
this.textLoading = false
}
setTimeout(() => {
if (this.currentPersonRole == 'dre') {
this.handlePreservation()
}
}, 10000)
} else {
if (num && num == 1) {
_this.$message.warning(_this.$t('operationFailed'))
this.textLoading = false
}
}
})
} else {
if (num && num == 1) {
this.$message.warning(this.$t('theCurrentListSaved'))
}
}
},
LoginUserType(val, currentPersonRole, userType) {
this.RoleType = []
if (this.currentPersonRole == '') {
@@ -376,7 +376,7 @@ export default {
{ required: true, message: this.$t('PleaseEnter')+this.$t('NiONumber'), trigger: 'blur' },
{ min:1, max: 15, message: this.$t('cantExeed')+'15'+this.$t('characters'), trigger: 'blur' },
{
pattern: /^[0-9a-zA-Z-/. ]{1,}$/,
pattern: /^[0-9a-zA-Z-/ ]{1,}$/,
message: this.$t('onlyThree'),
trigger: 'blur'
}
@@ -219,6 +219,8 @@
html += params[i].marker + params[i].seriesName + ":" + params[i].value;
if (_this.queryParam.value == 1) {
html += "%" + "<br>";
}else{
html +="<br>";
}
}
return html;