Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage
This commit is contained in:
+1
-1
@@ -411,7 +411,7 @@ public class ParamsCollectManifestEOController extends JeroController<ParamsColl
|
||||
@ApiOperation(value="参数项收集清单-引用参数", notes="参数项收集清单-引用参数")
|
||||
@PostMapping(value = "/referParams")
|
||||
// @RequiresPermissions("params:collectManifest:refer")
|
||||
public Result<?> referParams(ParamsCollectManifestVO paramsCollectManifestVO) {
|
||||
public Result<?> referParams(@RequestBody ParamsCollectManifestVO paramsCollectManifestVO) {
|
||||
boolean isSuccess = paramsCollectManifestEOService.referParams(paramsCollectManifestVO);
|
||||
if (isSuccess) {
|
||||
return Result.OK("引用参数成功!");
|
||||
|
||||
+5
-3
@@ -19,6 +19,7 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -276,9 +277,10 @@ public class ParamsManifestEOController extends JeroController<ParamsManifestEO,
|
||||
@ApiOperation(value="参数清单-复制清单", notes="参数清单-复制清单")
|
||||
@PostMapping(value = "/copy")
|
||||
// @RequiresPermissions("params:manifest:copy")
|
||||
public Result<?> copy(ParamsManifestEO paramsManifestEO,
|
||||
@RequestParam(name="sourceManifestId",required=true) String sourceManifestId) {
|
||||
ParamsManifestEO manifestEO = paramsManifestEOService.copy(paramsManifestEO, sourceManifestId);
|
||||
public Result<?> copy(@RequestBody ParamsManifestVO paramsManifestVO) {
|
||||
ParamsManifestEO paramsManifestEO = new ParamsManifestEO();
|
||||
BeanUtils.copyProperties(paramsManifestVO, paramsManifestEO);
|
||||
ParamsManifestEO manifestEO = paramsManifestEOService.copy(paramsManifestEO, paramsManifestVO.getSourceManifestId());
|
||||
return Result.OK(manifestEO);
|
||||
}
|
||||
|
||||
|
||||
+5
-3
@@ -3,9 +3,8 @@ package com.jero.modules.cert.collect.entity;
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
@@ -64,16 +63,19 @@ public class ParamsConfigDataEO implements Serializable {
|
||||
/**文本类型数据*/
|
||||
@Excel(name = "文本类型数据", width = 15)
|
||||
@ApiModelProperty(value = "文本类型数据")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private String textData;
|
||||
|
||||
/**下拉类型数据*/
|
||||
@Excel(name = "下拉类型数据", width = 15)
|
||||
@ApiModelProperty(value = "下拉类型数据")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private String pullData;
|
||||
|
||||
/**附件类型数据*/
|
||||
@Excel(name = "附件类型数据", width = 15)
|
||||
@ApiModelProperty(value = "附件类型数据")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private String fileConnectId;
|
||||
|
||||
/**参数配置id*/
|
||||
|
||||
+4
@@ -101,4 +101,8 @@ public class ParamsManifestEO implements Serializable {
|
||||
|
||||
@TableField(exist = false)
|
||||
private Boolean configFlag; // true-可添加配置;false-不可添加配置
|
||||
|
||||
@TableField(exist = false)
|
||||
private String cut;
|
||||
|
||||
}
|
||||
|
||||
+17
-2
@@ -1232,7 +1232,11 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
String targetConfigIds = paramsCollectManifestVO.getTargetConfigIds();
|
||||
|
||||
if (targetConfigIds.contains(sourceConfigId)) {
|
||||
throw new JeroBootException("引用到的配置不能包含被引用配置!");
|
||||
if (CutEnum.EN.getValue().equals(paramsCollectManifestVO.getCut())) {
|
||||
throw new JeroBootException("References to the configuration does not contain the referenced configuration!");
|
||||
} else {
|
||||
throw new JeroBootException("引用到的配置不能包含被引用配置!");
|
||||
}
|
||||
}
|
||||
String[] paramsCollectManifestIdStr = paramsCollectManifestIds.split(",");
|
||||
String[] targetConfigIdStr = targetConfigIds.split(",");
|
||||
@@ -1262,7 +1266,18 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
// 清空引用到的配置的数据
|
||||
for (int j = 0; j < targetConfigIdStr.length; j++) {
|
||||
ParamsConfigDataEO targetConfigDataEO = paramsConfigDataEOService.queryByConfigIdAndCollectManifestId(targetConfigIdStr[j], paramsCollectManifestIdStr[i]);
|
||||
if (ObjectUtil.isNotEmpty(targetConfigDataEO)) {
|
||||
ParamsConfigDataEO updateConfigDataEO = new ParamsConfigDataEO();
|
||||
updateConfigDataEO.setId(targetConfigDataEO.getId());
|
||||
updateConfigDataEO.setTextData(null);
|
||||
updateConfigDataEO.setPullData(null);
|
||||
updateConfigDataEO.setFileConnectId(null);
|
||||
updateConfigDataEOList.add(updateConfigDataEO);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+22
-2
@@ -95,7 +95,11 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
|
||||
queryWrapper.eq(ParamsManifestEO::getProjectId, paramsManifestEO.getProjectId());
|
||||
List<ParamsManifestEO> paramsManifestEOList = list(queryWrapper);
|
||||
if (CollectionUtil.isNotEmpty(paramsManifestEOList)) {
|
||||
throw new JeroBootException("标题已存在!");
|
||||
if (CutEnum.EN.getValue().equals(paramsManifestEO.getCut())) {
|
||||
throw new JeroBootException("Title already exists!");
|
||||
} else {
|
||||
throw new JeroBootException("标题已存在!");
|
||||
}
|
||||
}
|
||||
|
||||
String paramsManifestId = UUID.randomUUID().toString().replace("-","");
|
||||
@@ -153,7 +157,11 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
|
||||
queryWrapper.eq(ParamsManifestEO::getProjectId, oldParamsManifestEO.getProjectId());
|
||||
List<ParamsManifestEO> paramsManifestEOList = list(queryWrapper);
|
||||
if (CollectionUtil.isNotEmpty(paramsManifestEOList)) {
|
||||
throw new JeroBootException("标题已存在!");
|
||||
if (CutEnum.EN.getValue().equals(paramsManifestEO.getCut())) {
|
||||
throw new JeroBootException("Title already exists!");
|
||||
} else {
|
||||
throw new JeroBootException("标题已存在!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -453,6 +461,18 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
|
||||
String paramsTemplateId = paramsManifestEO.getParamsTemplateId();
|
||||
int paramsTemplatePublishVersion = paramsManifestEO.getParamsTemplatePublishVersion();
|
||||
|
||||
LambdaQueryWrapper<ParamsManifestEO> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ParamsManifestEO::getTitle, paramsManifestEO.getTitle());
|
||||
queryWrapper.eq(ParamsManifestEO::getProjectId, paramsManifestEO.getProjectId());
|
||||
List<ParamsManifestEO> paramsManifestEOList = list(queryWrapper);
|
||||
if (CollectionUtil.isNotEmpty(paramsManifestEOList)) {
|
||||
if (CutEnum.EN.getValue().equals(paramsManifestEO.getCut())) {
|
||||
throw new JeroBootException("Title already exists!");
|
||||
} else {
|
||||
throw new JeroBootException("标题已存在!");
|
||||
}
|
||||
}
|
||||
|
||||
// 查询所有模板参数项
|
||||
List<ParamsInfoPublishEO> paramsInfoPublishEOList = paramsInfoPublishEOService.getListByPublishVersion(paramsTemplateId, paramsTemplatePublishVersion);
|
||||
|
||||
|
||||
+2
@@ -69,4 +69,6 @@ public class ParamsCollectManifestVO {
|
||||
private String sourceConfigId; // 引用参数专用
|
||||
@ApiModelProperty(value = "引用参数专用-到")
|
||||
private String targetConfigIds; // 引用参数专用
|
||||
|
||||
private String cut; // 引用参数专用
|
||||
}
|
||||
|
||||
+1
@@ -21,4 +21,5 @@ public class ParamsManifestVO {
|
||||
|
||||
private String ids;
|
||||
private String cut;
|
||||
private String sourceManifestId;
|
||||
}
|
||||
|
||||
@@ -618,7 +618,7 @@ module.exports = {
|
||||
TaskRequirements: 'Task Requirements',
|
||||
CertificationProgress: 'Homologation Progress',
|
||||
CurrentProjectStatusEvaluation: 'Current State',
|
||||
NiONumber: 'NiO number',
|
||||
NiONumber: 'NIO number',
|
||||
ParameterName: 'Parameter name',
|
||||
ParameterDescription: 'Parameter description',
|
||||
Version: 'Version',
|
||||
@@ -723,7 +723,7 @@ module.exports = {
|
||||
Dropdownradio: 'Drop down radio',
|
||||
Dropdownmultipleselection: 'Drop down multiple selection',
|
||||
a: '+',
|
||||
positiveInteger: 'positive integer',
|
||||
positiveInteger: 'Positive integer',
|
||||
|
||||
ParameteItemCollectionList: 'Parameter item collection list',
|
||||
Areyousureparameteritems: 'Are you sure to submit the selected parameter items?',
|
||||
@@ -731,8 +731,8 @@ module.exports = {
|
||||
theCurrent: 'The current status of this data is',
|
||||
thisbuttonCompleted: 'This button can only be operated when the status is completed',
|
||||
Frozenstatus: 'Frozen status, can only be viewed',
|
||||
chinese: 'chinese',
|
||||
integerOrDecimal: 'integer Or Decimal',
|
||||
chinese: 'Chinese',
|
||||
integerOrDecimal: 'Integer Or Decimal',
|
||||
OneDecimalPlace: 'One Decimal Place',
|
||||
TwoDecimalplaces: 'Two Decimal places',
|
||||
Threedecimalplaces: 'Threedecimalplaces',
|
||||
@@ -978,7 +978,19 @@ module.exports = {
|
||||
contentTemplate:'Content template',
|
||||
moveUp:'Move up',
|
||||
moveDown:'Move down',
|
||||
vehicleType:'Vehicle Type',
|
||||
usage:'Usage',
|
||||
implementationModel:'Implementation model',
|
||||
primaryCoverageCn:'Primary coverage (Cn)',
|
||||
primaryCoverageEn:'Primary coverage (En)',
|
||||
workProgressCn:'NIO Work progress (Cn)',
|
||||
workProgressEn:'NIO Work progress (En)',
|
||||
link:'Link',
|
||||
// 上报库
|
||||
Enable: 'Enable',
|
||||
Latestupdatetime: 'Latest update time',
|
||||
Exporthistory: 'Exporthistory',
|
||||
Exporttype: 'Export Type',
|
||||
Exporttime: 'Export Time',
|
||||
file: 'File'
|
||||
}
|
||||
@@ -970,20 +970,32 @@ module.exports = {
|
||||
chapterContents: '章节目录',
|
||||
chineseTitle: '中文标题',
|
||||
englishTitle: '英文标题',
|
||||
regulatoryContact:'法规联系人',
|
||||
exportStatus:'导出状态',
|
||||
monthlyTitleTemplate:'月报标题模板',
|
||||
monthlyIntegrationAndExport:'月报整合导出',
|
||||
addContent:'新增内容',
|
||||
editContent:'编辑内容',
|
||||
viewContent:'查看内容',
|
||||
monthSelection:'月份选择',
|
||||
fillInTheMonth:'填写月份',
|
||||
contentTemplate:'内容模板',
|
||||
bringInStandardInformation:'带入标准信息',
|
||||
moveUp:'上移',
|
||||
moveDown:'下移',
|
||||
regulatoryContact: '法规联系人',
|
||||
exportStatus: '导出状态',
|
||||
monthlyTitleTemplate: '月报标题模板',
|
||||
monthlyIntegrationAndExport: '月报整合导出',
|
||||
addContent: '新增内容',
|
||||
editContent: '编辑内容',
|
||||
viewContent: '查看内容',
|
||||
monthSelection: '月份选择',
|
||||
fillInTheMonth: '填写月份',
|
||||
contentTemplate: '内容模板',
|
||||
bringInStandardInformation: '带入标准信息',
|
||||
moveUp: '上移',
|
||||
moveDown: '下移',
|
||||
vehicleType: '适用车型',
|
||||
usage: '用法',
|
||||
implementationModel: '实施车型',
|
||||
primaryCoverageCn: '主要内容(中文)',
|
||||
primaryCoverageEn: '主要内容(英文)',
|
||||
workProgressCn: 'NIO工作进展(中文)',
|
||||
workProgressEn: 'NIO工作进展(英文)',
|
||||
link: '链接',
|
||||
// 上报库
|
||||
Enable: '启用',
|
||||
Latestupdatetime: '最新更新时间',
|
||||
Exporthistory: '导出历史',
|
||||
Exporttype: '导出类型',
|
||||
Exporttime: '导出时间',
|
||||
file: '文件'
|
||||
}
|
||||
@@ -190,36 +190,47 @@ export default {
|
||||
},
|
||||
// 引用参数确定
|
||||
handleSubmit() {
|
||||
let _this = this
|
||||
if(this.formInline.targetConfigIds instanceof Array){
|
||||
this.formInline.targetConfigIds = this.formInline.targetConfigIds.join(',')
|
||||
}
|
||||
let param = {ids: this.selectedRowKeysArray, ...this.formInline }
|
||||
axios({
|
||||
url: '/jero-boot/params/collectManifest/referParams',
|
||||
method: 'post',
|
||||
data: param,
|
||||
transformRequest: [function (data) {
|
||||
let ret = ''
|
||||
for (let it in data) {
|
||||
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
|
||||
}
|
||||
return ret
|
||||
}],
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'X-Access-Token':_this.token
|
||||
postAction('params/collectManifest/referParams', param).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.$emit('areaVisibleAssignedbyflag', false)
|
||||
this.$emit('GetgetTableList')
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
.then( (res) =>{
|
||||
console.log(res,'res')
|
||||
if (res.data.success) {
|
||||
_this.$message.success(res.data.message)
|
||||
this.$emit('areaVisibleAssignedbyflag', false)
|
||||
}else{
|
||||
_this.$message.warning(res.data.message)
|
||||
}
|
||||
})
|
||||
.catch( (error) =>{
|
||||
console.log(error);
|
||||
});
|
||||
// axios({
|
||||
// url: '/jero-boot/params/collectManifest/referParams',
|
||||
// method: 'post',
|
||||
// data: param,
|
||||
// transformRequest: [function (data) {
|
||||
// let ret = ''
|
||||
// for (let it in data) {
|
||||
// ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
|
||||
// }
|
||||
// return ret
|
||||
// }],
|
||||
// headers: {
|
||||
// 'Content-Type': 'application/x-www-form-urlencoded',
|
||||
// 'X-Access-Token':_this.token
|
||||
// }
|
||||
// })
|
||||
// .then( (res) =>{
|
||||
// console.log(res,'res')
|
||||
// if (res.data.success) {
|
||||
// _this.$message.success(res.data.message)
|
||||
// this.$emit('areaVisibleAssignedbyflag', false)
|
||||
// }else{
|
||||
// _this.$message.warning(res.data.message)
|
||||
// }
|
||||
// })
|
||||
// .catch( (error) =>{
|
||||
// console.log(error);
|
||||
// });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,361 @@
|
||||
<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.projectName' />
|
||||
</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'
|
||||
size='middle'
|
||||
rowKey='id'
|
||||
:columns='columns'
|
||||
:dataSource='areaTable'
|
||||
:pagination='false'
|
||||
:loading='loading'
|
||||
:scroll='{x: 600}'
|
||||
:rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}'
|
||||
@change='handleTableChange'>
|
||||
<span slot='click' slot-scope='text, record'>
|
||||
<a class='action-edit' @click='editArea(record)' v-has="'area:edit'">{{ text }}</a>
|
||||
</span>
|
||||
</a-table>
|
||||
<div class="page" style='display: flex;justify-content: flex-end;'>
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="pageSize"
|
||||
:total="total"
|
||||
@change="pageOnChange"
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
</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>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { putAction, postAction, getAction, deleteAction } from '@/api/manage'
|
||||
import axios from 'axios'
|
||||
import Vue from 'vue'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
|
||||
export default {
|
||||
name: 'diolagArea',
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
token:Vue.ls.get(ACCESS_TOKEN),
|
||||
title: this.$t('add'),
|
||||
total: 0,
|
||||
selectedRowKeysDate: {},
|
||||
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('Exporttype'),
|
||||
align: 'center',
|
||||
dataIndex: 'paramsTemplateName',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('Exporttime'),
|
||||
align: 'center',
|
||||
dataIndex: 'paramsTemplateName',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('file'),
|
||||
align: 'center',
|
||||
dataIndex: 'paramsTemplateName',
|
||||
ellipsis: true
|
||||
}
|
||||
],
|
||||
newVisible: false,
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 7 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 14 }
|
||||
},
|
||||
form: {},
|
||||
formData: {},
|
||||
rules: {
|
||||
title: [
|
||||
{ required: true, message: this.$t('enterTitle'), trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
areaTable: [],
|
||||
flag: false, //表单提交标识
|
||||
spinLoading: false,
|
||||
confirmLoading: false,
|
||||
selectedRowKeys: [],
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
listVisible: false,
|
||||
listVisibleRowDate: {}
|
||||
}
|
||||
},
|
||||
props: {
|
||||
version: {
|
||||
type: Number,
|
||||
default: '',
|
||||
required: false
|
||||
},
|
||||
projectId: {
|
||||
type: String,
|
||||
default: '',
|
||||
require: true
|
||||
},
|
||||
url: {
|
||||
type: Object,
|
||||
default: '',
|
||||
require: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadData()
|
||||
},
|
||||
methods: {
|
||||
// 清单列表传出数据
|
||||
listVisibleRow(val) {
|
||||
this.selectedRowKeys = []
|
||||
let newAreaTable=JSON.parse(JSON.stringify(this.areaTable))
|
||||
newAreaTable.forEach((item, index) => {
|
||||
if( item.id == this.listVisibleRowDate.id ) {
|
||||
let _obj = {...item}
|
||||
_obj.paramsTemplateId = val[0].id
|
||||
_obj.paramsTemplateName = val[0].paramsTemplateName
|
||||
this.areaTable.splice(index, 1,_obj)
|
||||
}
|
||||
})
|
||||
console.log(this.areaTable,'this.areaTable')
|
||||
this.listVisible = false
|
||||
},
|
||||
editArea(val) {
|
||||
this.listVisibleRowDate = val
|
||||
console.log(val)
|
||||
this.listVisible = true
|
||||
},
|
||||
pageOnChange(page, pageSize) {
|
||||
this.pageNo = page
|
||||
this.loadData()
|
||||
},
|
||||
SizeChange(page, pageSize) {
|
||||
this.pageNo = 1
|
||||
this.pageSize = pageSize
|
||||
this.loadData()
|
||||
},
|
||||
loadData() {
|
||||
let _this = this
|
||||
let params = {
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
...this.formData
|
||||
}
|
||||
this.loading = true
|
||||
axios({
|
||||
url: `/jero-boot/params/manifest/getAllManifest`,
|
||||
method: 'post',
|
||||
data: params,
|
||||
transformRequest: [function (data) {
|
||||
let ret = ''
|
||||
for (let it in data) {
|
||||
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
|
||||
}
|
||||
return ret
|
||||
}],
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'X-Access-Token':_this.token
|
||||
}
|
||||
})
|
||||
.then( (res) =>{
|
||||
if (res.data.success) {
|
||||
console.log(res.data)
|
||||
this.loading = false
|
||||
this.areaTable = res.data.result.records || []
|
||||
this.total = res.data.result.total
|
||||
}else{
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
.catch( (error) =>{
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
searchQuery() {
|
||||
this.loadData()
|
||||
},
|
||||
searchReset() {
|
||||
this.formData = {}
|
||||
this.loadData()
|
||||
},
|
||||
handleCancel() {
|
||||
this.$emit('areaVisible', false)
|
||||
},
|
||||
onSelectChange(selectedRowKeys, selectedRowKeysDate) {
|
||||
this.selectedRowKeysDate = selectedRowKeysDate
|
||||
this.selectedRowKeys = selectedRowKeys
|
||||
},
|
||||
handleTableChange(val) {
|
||||
console.log(',,,')
|
||||
},
|
||||
showModal() {
|
||||
this.title = this.$t('add')
|
||||
this.newVisible = true
|
||||
this.form = {}
|
||||
},
|
||||
//新增
|
||||
handleSubmit() {
|
||||
let _this = this
|
||||
if (this.selectedRowKeys.length == 0) {
|
||||
this.$message.warning(this.$t('pleaseSelectData'))
|
||||
} else if (this.selectedRowKeys.length > 1) {
|
||||
this.$message.warning(this.$t('OnlyOneSelected'))
|
||||
} else {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.flag = true
|
||||
this.spinLoading = true
|
||||
this.confirmLoading = true
|
||||
let _tt = {
|
||||
paramsTemplateId: this.selectedRowKeysDate[0].paramsTemplateId,
|
||||
projectId: this.selectedRowKeysDate[0].projectId,
|
||||
title: this.selectedRowKeysDate[0].title,
|
||||
paramsTemplatePublishVersion: this.selectedRowKeysDate[0].paramsTemplatePublishVersion,
|
||||
sourceManifestId: this.selectedRowKeysDate[0].id,
|
||||
}
|
||||
axios({
|
||||
url: `/jero-boot/params/manifest/copy`,
|
||||
method: 'post',
|
||||
data: _tt,
|
||||
transformRequest: [function (data) {
|
||||
let ret = ''
|
||||
for (let it in data) {
|
||||
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
|
||||
}
|
||||
return ret
|
||||
}],
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'X-Access-Token':_this.token
|
||||
}
|
||||
})
|
||||
.then( (res) =>{
|
||||
if (res.data.success) {
|
||||
_this.$emit('copysubmit')
|
||||
_this.$message.success(res.data.message)
|
||||
_this.flag = false
|
||||
_this.spinLoading = false
|
||||
_this.confirmLoading = false
|
||||
}else{
|
||||
_this.$message.warning(res.data.message)
|
||||
_this.flag = false
|
||||
_this.spinLoading = false
|
||||
_this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
.catch( (error) =>{
|
||||
console.log(error);
|
||||
});
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
selectedRowKeyS(val) {
|
||||
this.selectedRowKeys = val
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang='less' scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.diolag-area {
|
||||
.table-area {
|
||||
margin: 20px 0;
|
||||
|
||||
.action-edit {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.table-del {
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
.drawer-bootom-button{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.Required {
|
||||
color: red;
|
||||
margin-right: 4px;
|
||||
}
|
||||
</style>
|
||||
<style lang='less'>
|
||||
.area-module {
|
||||
.ant-modal-wrap {
|
||||
.ant-modal {
|
||||
.ant-modal-content {
|
||||
.ant-modal-footer {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
+319
-70
@@ -5,18 +5,96 @@
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('fillInTheMonth')">{{$t('fillInTheMonth')}}</span>
|
||||
:title="$t('title')">{{$t('title')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-month-picker class="box-input"
|
||||
v-model="formInline.fillInTheMonth"
|
||||
:placeholder="$t('fillInTheMonth')"/>
|
||||
<a-input class="box-input"
|
||||
:disabled="false"
|
||||
v-model="formInline.title"
|
||||
:placeholder="$t('PleaseEnter')+$t('title')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12" style="text-align: right">
|
||||
<div style="text-align: right">
|
||||
<a-button class="button-text" type="primary">{{$t('bringInStandardInformation')}}</a-button>
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('englishTitle')">{{$t('englishTitle')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-input class="box-input"
|
||||
:disabled="false"
|
||||
v-model="formInline.englishTitle"
|
||||
:placeholder="$t('PleaseEnter')+$t('englishTitle')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('technicalField')">{{$t('technicalField')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel-multi" prop="technologyTerritory">
|
||||
<a-tree-select
|
||||
tree-node-filter-prop="title"
|
||||
v-model="formInline.technologyTerritory"
|
||||
:maxTagCount="1"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
class="box-input"
|
||||
style="width: 100%"
|
||||
:tree-data="CategoryTreeList"
|
||||
tree-checkable
|
||||
:placeholder="$t('PleaseSelect')+$t('technicalField')"
|
||||
/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('vehicleType')">{{$t('vehicleType')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel-multi">
|
||||
<j-multi-select-tag class="box-input" v-model="formInline.vehicleType"
|
||||
:placeholder="$t('PleaseSelect')+$t('vehicleType')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'car_type'"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('scopeOfApplication')">{{$t('scopeOfApplication')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel-multi">
|
||||
<j-multi-select-tag class="box-input" v-model="formInline.shi4_yong4_fan4_wei2"
|
||||
:placeholder="$t('PleaseSelect')+$t('scopeOfApplication')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'apply_scope'"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('status')">{{$t('status')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.status"
|
||||
@input="handleInput('status')"
|
||||
:placeholder="$t('PleaseSelect')+$t('status')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'state'"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@@ -25,47 +103,160 @@
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('chapterContents')">{{$t('chapterContents')}}</span>
|
||||
:title="$t('usage')">{{$t('usage')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('chapterContents')"
|
||||
:disabled="disabled"
|
||||
class="box-input"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
allowClear
|
||||
v-model="formInline.chapterContents">
|
||||
<a-select-option v-for="(item, key) in chapterContentsList"
|
||||
: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="formInline.usage"
|
||||
@input="handleInput('usage')"
|
||||
:placeholder="$t('PleaseSelect')+$t('usage')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'usage'"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('contentTemplate')">{{$t('contentTemplate')}}</span>
|
||||
<span class="title-text-text"
|
||||
:title="$t('implementationModel')">{{$t('implementationModel')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('contentTemplate')"
|
||||
:disabled="disabled"
|
||||
class="box-input"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
allowClear
|
||||
v-model="formInline.chapterContents">
|
||||
<a-select-option v-for="(item, key) in contentTemplateList"
|
||||
:key="key"
|
||||
:value="item.value">
|
||||
<span style="display: inline-block;width: 100%" :title=" item.name ">
|
||||
{{ item.name }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.implementationModel"
|
||||
:placeholder="$t('PleaseEnter')+$t('implementationModel')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('releaseDate')">{{$t('releaseDate')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.releaseDate"
|
||||
:placeholder="$t('PleaseEnter')+$t('releaseDate')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('ImplementationDate')">{{$t('ImplementationDate')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.ImplementationDate"
|
||||
:placeholder="$t('PleaseEnter')+$t('ImplementationDate')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('vehicleInProductionDate')">{{$t('vehicleInProductionDate')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.vehicleInProductionDate"
|
||||
:placeholder="$t('PleaseEnter')+$t('vehicleInProductionDate')"/>
|
||||
</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('primaryCoverageCn')">{{$t('primaryCoverageCn')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-textarea
|
||||
:placeholder="$t('PleaseEnter')+$t('primaryCoverageCn')"
|
||||
v-model.trim="formInline.useExplain" :rows="4"/>
|
||||
</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('primaryCoverageEn')">{{$t('primaryCoverageEn')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-textarea
|
||||
:placeholder="$t('PleaseEnter')+$t('primaryCoverageEn')"
|
||||
v-model.trim="formInline.useExplain" :rows="4"/>
|
||||
</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('workProgressCn')">{{$t('workProgressCn')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-textarea
|
||||
:placeholder="$t('PleaseEnter')+$t('workProgressCn')"
|
||||
v-model.trim="formInline.useExplain" :rows="4"/>
|
||||
</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('workProgressEn')">{{$t('workProgressEn')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-textarea
|
||||
:placeholder="$t('PleaseEnter')+$t('workProgressEn')"
|
||||
v-model.trim="formInline.useExplain" :rows="4"/>
|
||||
</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('regulatoryContact')">{{$t('regulatoryContact')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-input class="box-input"
|
||||
:disabled="false"
|
||||
v-model="formInline.regulatoryContact"
|
||||
:placeholder="$t('PleaseEnter')+$t('regulatoryContact')"/>
|
||||
</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('link')">{{$t('link')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-input class="box-input"
|
||||
:disabled="false"
|
||||
v-model="formInline.link"
|
||||
:placeholder="$t('PleaseEnter')+$t('link')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -76,46 +267,104 @@
|
||||
<script>
|
||||
export default {
|
||||
name: 'defaultTemplate',
|
||||
data(){
|
||||
return{
|
||||
rules: {
|
||||
name: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('VirtualListName') + this.$t('cannotEmpty'),
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
max: 100,
|
||||
message: this.$t('VirtualListName') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
useExplain: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('instructionForUse') + this.$t('cannotEmpty'),
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
max: 500,
|
||||
message: this.$t('instructionForUse') + this.$t('cannotExceed') + 500 + this.$t('Characters'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
},
|
||||
formInline:{},
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
|
||||
data() {
|
||||
return {
|
||||
rules: {
|
||||
name: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('VirtualListName') + this.$t('cannotEmpty'),
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
max: 100,
|
||||
message: this.$t('VirtualListName') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
useExplain: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('instructionForUse') + this.$t('cannotEmpty'),
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
max: 500,
|
||||
message: this.$t('instructionForUse') + this.$t('cannotExceed') + 500 + this.$t('Characters'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
},
|
||||
formInline: {},
|
||||
CategoryTreeList: [],
|
||||
disabled: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
handleInput(value) {
|
||||
this.$nextTick(() => {
|
||||
this.formInline = { ...this.formInline }
|
||||
this.$refs.ruleForm.validateField([value])
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 114px;
|
||||
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;
|
||||
}
|
||||
|
||||
.title-text-text {
|
||||
margin-top: 9px;
|
||||
}
|
||||
|
||||
.formAdd {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -81,6 +81,7 @@
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<defaultTemplate/>
|
||||
</a-form-model>
|
||||
</a-spin>
|
||||
<div class="drawer-bootom-button">
|
||||
@@ -92,8 +93,13 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import defaultTemplate from './defaultTemplate'
|
||||
|
||||
export default {
|
||||
name: 'fillAdd',
|
||||
components: {
|
||||
defaultTemplate
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
rules: {
|
||||
|
||||
@@ -4,22 +4,20 @@
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('zoneOfApplication')">
|
||||
<span>{{$t('zoneOfApplication')}}</span>
|
||||
<div class="title-text" :title="$t('entryName')">
|
||||
<span>{{$t('entryName')}}</span>
|
||||
</div>
|
||||
<j-dict-select-tag class="box-input" v-model="queryParam.region"
|
||||
:placeholder="$t('PleaseSelect')+$t('zoneOfApplication')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'region'"/>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('entryName')"
|
||||
v-model="queryParam.projectName"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('parameterTemplate')">
|
||||
<span>{{$t('parameterTemplate')}}</span>
|
||||
<div class="title-text" :title="$t('ListTitle')">
|
||||
<span>{{$t('ListTitle')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('parameterTemplate')"
|
||||
v-model="queryParam.paramsTemplateName"></a-input>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('ListTitle')"
|
||||
v-model="queryParam.title"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
||||
@@ -30,20 +28,6 @@
|
||||
</span>
|
||||
</a-row>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div @click="handleAdd" class="operator-text" v-has="'params:template:add'">
|
||||
<a-icon type="plus"/>
|
||||
{{$t('newlyAdded')}}
|
||||
</div>
|
||||
<div @click="handlecody" class="operator-text" v-has="'params:template:copy'">
|
||||
<a-icon type="copy"/>
|
||||
{{$t('copy')}}
|
||||
</div>
|
||||
<div @click="handleDel" class="operator-text" v-has="'params:template:delete'">
|
||||
<a-icon type="delete"/>
|
||||
{{$t('BatchDelete')}}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<a-table
|
||||
ref="table"
|
||||
@@ -61,12 +45,9 @@
|
||||
{{ text && text.length > 15 ? text.slice(0, 14) + '...' : text }}
|
||||
</a>
|
||||
</span>
|
||||
<span slot="titleName" slot-scope="text,record" :title="text">
|
||||
{{ text && text.length > 30 ? text.slice(0, 29) + '...' : text }}
|
||||
</span>
|
||||
<span slot="operation" slot-scope="text,record">
|
||||
<a class="text-operation" v-has="'params:template:edit'" @click="edit(record)">{{$t('edit')}}</a>
|
||||
<a class="text-operation" v-has="'params:template:delete'" @click="deleteLib(record)">{{$t('deleteLib')}}</a>
|
||||
<a class="text-operation" @click="handlecody(record)">{{$t('Exporthistory')}}</a>
|
||||
<a class="text-operation" @click="deleteLib(record)">{{$t('See')}}</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
@@ -81,37 +62,16 @@
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
</div>
|
||||
<addModel :url="url" ref="addModelRef" @addModelList="addModelList"/>
|
||||
<a-modal class="show-copy" v-model="areaVisible" :title="$t('templateCopy')" :footer="null" @cancel="hideModal">
|
||||
<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 add-text-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text"
|
||||
:title="$t('templateName')">{{$t('templateName')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="paramsTemplateName">
|
||||
<a-input class="box-input add-input"
|
||||
v-model="formInline.paramsTemplateName"
|
||||
:placeholder="$t('PleaseEnter')+$t('templateName')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
<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-modal class="show-drawer" :title="titleTag" width="900px" v-model="drawerVisible" :footer="null">
|
||||
<export-history v-if='drawerVisible' @areaVisible='drawerVisible = false'></export-history>
|
||||
</a-modal>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ExportHistory from '@/components/exporthistory/index'
|
||||
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
|
||||
import addModel from './components/addModel'
|
||||
import axios from 'axios'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import eventBUs from '../../../common/event'
|
||||
@@ -119,7 +79,7 @@ import Vue from 'vue'
|
||||
export default {
|
||||
name: 'index',
|
||||
components: {
|
||||
addModel,
|
||||
ExportHistory
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -138,12 +98,7 @@ export default {
|
||||
dataSource: [],
|
||||
confirmLoading: false,
|
||||
url: {
|
||||
list: 'params/template/page',
|
||||
add: 'params/template/add',
|
||||
edit: 'params/template/edit',
|
||||
deleteBatch: 'params/template/delete',
|
||||
deleteAll: 'params/template/deleteBatch',
|
||||
copy: 'params/template/copyById'
|
||||
list: 'params/report/page',
|
||||
},
|
||||
total: 0,
|
||||
pageSize: 10,
|
||||
@@ -154,19 +109,17 @@ export default {
|
||||
title: this.$t('entryName'),
|
||||
align: 'center',
|
||||
width: '10%',
|
||||
dataIndex: 'region_dictText',
|
||||
dataIndex: 'projectName',
|
||||
},
|
||||
{
|
||||
title: this.$t('ListTitle'),
|
||||
align: 'center',
|
||||
dataIndex: 'paramsTemplateName',
|
||||
scopedSlots: { customRender: 'projectName' }
|
||||
dataIndex: 'title',
|
||||
},
|
||||
{
|
||||
title: this.$t('Version'),
|
||||
align: 'center',
|
||||
dataIndex: 'description',
|
||||
scopedSlots: { customRender: 'titleName' }
|
||||
dataIndex: 'version',
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
@@ -179,6 +132,8 @@ export default {
|
||||
queryParam: {},
|
||||
areaVisible:false,
|
||||
paramsTemplateName: '',
|
||||
drawerVisible: false,
|
||||
titleTag: '导出历史'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -214,68 +169,13 @@ export default {
|
||||
this.selectedRowKeys = value
|
||||
this.selectedRowKeysArray = this.selectedRowKeys.join(',')
|
||||
},
|
||||
//添加
|
||||
handleAdd() {
|
||||
this.$refs.addModelRef.addModel()
|
||||
},
|
||||
// 复制
|
||||
handlecody(){
|
||||
if (this.selectedRowKeys.length > 1) {
|
||||
this.$message.warning(this.$t('OnlyOneSelected'))
|
||||
} else if(this.selectedRowKeys.length == 0){
|
||||
this.$message.warning(this.$t('pleaseSelectData'))
|
||||
} else {
|
||||
this.areaVisible=true
|
||||
this.formInline = {}
|
||||
}
|
||||
this.drawerVisible=true
|
||||
},
|
||||
hideModal(){
|
||||
this.visible = false;
|
||||
},
|
||||
//批量删除
|
||||
handleDel() {
|
||||
let param={
|
||||
ids: this.selectedRowKeysArray
|
||||
}
|
||||
if (this.selectedRowKeys.length > 0) {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('ConfirmBatchDeletion'),
|
||||
onOk() {
|
||||
axios({
|
||||
url: '/jero-boot/params/template/deleteBatch',
|
||||
method: 'post',
|
||||
data: param,
|
||||
transformRequest: [function (data) {
|
||||
let ret = ''
|
||||
for (let it in data) {
|
||||
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
|
||||
}
|
||||
return ret
|
||||
}],
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'X-Access-Token':_this.token
|
||||
}
|
||||
})
|
||||
.then( (res) =>{
|
||||
if (res.data.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.selectedRowKeys = []
|
||||
_this.getList()
|
||||
}else{
|
||||
_this.$message.warning(_this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
.catch( (error) =>{
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
},
|
||||
//编辑
|
||||
edit(item) {
|
||||
this.$refs.addModelRef.editModel(JSON.parse(JSON.stringify(item)))
|
||||
|
||||
@@ -275,39 +275,53 @@ export default {
|
||||
paramsTemplatePublishVersion: this.selectedRowKeysDate[0].paramsTemplatePublishVersion,
|
||||
sourceManifestId: this.selectedRowKeysDate[0].id,
|
||||
}
|
||||
axios({
|
||||
url: `/jero-boot/params/manifest/copy`,
|
||||
method: 'post',
|
||||
data: _tt,
|
||||
transformRequest: [function (data) {
|
||||
let ret = ''
|
||||
for (let it in data) {
|
||||
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
|
||||
}
|
||||
return ret
|
||||
}],
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'X-Access-Token':_this.token
|
||||
postAction('params/manifest/copy', _tt).then((res) => {
|
||||
if (res.success) {
|
||||
this.$emit('copysubmit')
|
||||
this.$message.success(res.message)
|
||||
this.flag = false
|
||||
this.spinLoading = false
|
||||
this.confirmLoading = false
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
this.flag = false
|
||||
this.spinLoading = false
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
.then( (res) =>{
|
||||
if (res.data.success) {
|
||||
_this.$emit('copysubmit')
|
||||
_this.$message.success(res.data.message)
|
||||
_this.flag = false
|
||||
_this.spinLoading = false
|
||||
_this.confirmLoading = false
|
||||
}else{
|
||||
_this.$message.warning(res.data.message)
|
||||
_this.flag = false
|
||||
_this.spinLoading = false
|
||||
_this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
.catch( (error) =>{
|
||||
console.log(error);
|
||||
});
|
||||
// axios({
|
||||
// url: `/jero-boot/params/manifest/copy`,
|
||||
// method: 'post',
|
||||
// data: _tt,
|
||||
// transformRequest: [function (data) {
|
||||
// let ret = ''
|
||||
// for (let it in data) {
|
||||
// ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
|
||||
// }
|
||||
// return ret
|
||||
// }],
|
||||
// headers: {
|
||||
// 'Content-Type': 'application/x-www-form-urlencoded',
|
||||
// 'X-Access-Token':_this.token
|
||||
// }
|
||||
// })
|
||||
// .then( (res) =>{
|
||||
// if (res.data.success) {
|
||||
// _this.$emit('copysubmit')
|
||||
// _this.$message.success(res.data.message)
|
||||
// _this.flag = false
|
||||
// _this.spinLoading = false
|
||||
// _this.confirmLoading = false
|
||||
// }else{
|
||||
// _this.$message.warning(res.data.message)
|
||||
// _this.flag = false
|
||||
// _this.spinLoading = false
|
||||
// _this.confirmLoading = false
|
||||
// }
|
||||
// })
|
||||
// .catch( (error) =>{
|
||||
// console.log(error);
|
||||
// });
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user