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

This commit is contained in:
zyx.net
2022-06-30 18:08:56 +08:00
8 changed files with 264 additions and 236 deletions
@@ -304,8 +304,6 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
updateById(updateParamsManifestEO); updateById(updateParamsManifestEO);
} else { } else {
manifestEO.setState(ManifestStateEnum.COLLECTING.getValue());
manifestEO.setFinishTime(null);
if (ManifestStateEnum.FINISHED.getValue().equals(manifestEO.getState())) { if (ManifestStateEnum.FINISHED.getValue().equals(manifestEO.getState())) {
// 更新清单状态和完成时间 // 更新清单状态和完成时间
ParamsManifestEO updateParamsManifestEO = new ParamsManifestEO(); ParamsManifestEO updateParamsManifestEO = new ParamsManifestEO();
@@ -314,6 +312,9 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
updateParamsManifestEO.setFinishTime(null); updateParamsManifestEO.setFinishTime(null);
updateById(updateParamsManifestEO); updateById(updateParamsManifestEO);
} }
manifestEO.setState(ManifestStateEnum.COLLECTING.getValue());
manifestEO.setFinishTime(null);
} }
// 添加配置标识,清单参数项状态为 待发起、变更时,可添加配置 // 添加配置标识,清单参数项状态为 待发起、变更时,可添加配置
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jero.common.api.vo.Result; import com.jero.common.api.vo.Result;
import com.jero.common.aspect.annotation.AutoLog; import com.jero.common.aspect.annotation.AutoLog;
import com.jero.common.constant.enums.CutEnum;
import com.jero.common.system.base.controller.JeroController; import com.jero.common.system.base.controller.JeroController;
import com.jero.modules.cert.template.entity.ParamsTemplateEO; import com.jero.modules.cert.template.entity.ParamsTemplateEO;
import com.jero.modules.cert.template.service.IParamsTemplateEOService; import com.jero.modules.cert.template.service.IParamsTemplateEOService;
@@ -188,10 +189,15 @@ public class ParamsTemplateEOController extends JeroController<ParamsTemplateEO,
@GetMapping(value = "/copyById") @GetMapping(value = "/copyById")
@RequiresPermissions("params:template:copy") @RequiresPermissions("params:template:copy")
public Result<?> copyById(@RequestParam(name="id") String id, public Result<?> copyById(@RequestParam(name="id") String id,
@RequestParam(name="paramsTemplateName") String paramsTemplateName) { @RequestParam(name="paramsTemplateName") String paramsTemplateName,
@RequestParam(name="cut") String cut) {
ParamsTemplateEO paramsTemplateEO = paramsTemplateEOService.copyById(id, paramsTemplateName); ParamsTemplateEO paramsTemplateEO = paramsTemplateEOService.copyById(id, paramsTemplateName);
if (CutEnum.EN.getValue().equals(cut)) {
return Result.OK("Copy successful", paramsTemplateEO);
} else {
return Result.OK("复制成功", paramsTemplateEO); return Result.OK("复制成功", paramsTemplateEO);
} }
}
/** /**
+1
View File
@@ -1028,6 +1028,7 @@ module.exports = {
FNumber: 'Number', FNumber: 'Number',
NNNiONumber: 'Number', NNNiONumber: 'Number',
NNiONumber: 'NIO Number', NNiONumber: 'NIO Number',
ParameterNo: 'Number',
NRequired: 'Is Must', NRequired: 'Is Must',
NParameterName: 'Params Name', NParameterName: 'Params Name',
NtechnicalField: 'Technical Field', NtechnicalField: 'Technical Field',
+1
View File
@@ -1033,6 +1033,7 @@ module.exports = {
FNumber: '账号', FNumber: '账号',
NNNiONumber: 'NIO编号', NNNiONumber: 'NIO编号',
NNiONumber: 'NIO编号', NNiONumber: 'NIO编号',
ParameterNo: '编号',
NRequired: '是否必填', NRequired: '是否必填',
NParameterName: '参数名称', NParameterName: '参数名称',
NtechnicalField: '技术领域', NtechnicalField: '技术领域',
@@ -236,13 +236,13 @@
<div class="title-text"> <div class="title-text">
<span class="Required">*</span> <span class="Required">*</span>
<span class="title-text-text" <span class="title-text-text"
:title="$t('NNNiONumber')">{{$t('NNNiONumber')}}</span> :title="$t('ParameterNo')">{{$t('ParameterNo')}}</span>
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<a-input class="box-input" <a-input class="box-input"
:disabled="disabled" :disabled="disabled"
v-model="item.paramsNumber" v-model="item.paramsNumber"
:placeholder="$t('PleaseEnter')+$t('NNNiONumber')"/> :placeholder="$t('PleaseEnter')+$t('ParameterNo')"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -1,7 +1,7 @@
<template> <template>
<a-card :bordered="false"> <a-card :bordered="false">
<div class="table-page-search-wrapper"> <div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery" > <a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24" class='add-padding'> <a-row :gutter="24" class='add-padding'>
<a-col :md="7" :sm="8"> <a-col :md="7" :sm="8">
<div class="box-title-text"> <div class="box-title-text">
@@ -57,6 +57,9 @@
{{ text && text.length > 50 ? text.slice(0, 49) + '...' : text }} {{ text && text.length > 50 ? text.slice(0, 49) + '...' : text }}
</a> </a>
</span> </span>
<span slot="collectionCompletionTime" slot-scope="text,record">
{{record.finishTime ? record.finishTime : '-'}}
</span>
<span slot="operation" slot-scope="text,record"> <span slot="operation" slot-scope="text,record">
<a class="text-operation" @click="configure(record)">{{$t('configure')}}</a> <a class="text-operation" @click="configure(record)">{{$t('configure')}}</a>
<a class="text-operation" @click="edit(record)">{{$t('edit')}}</a> <a class="text-operation" @click="edit(record)">{{$t('edit')}}</a>
@@ -77,8 +80,9 @@
/> />
</div> </div>
<!-- 参数模板--> <!-- 参数模板-->
<a-modal v-model="areaVisible" :title="$t('parameterTemplate')" width='750px' :footer="null"> <a-modal v-model="areaVisible" :maskClosable="false" :title="$t('parameterTemplate')" width='750px' :footer="null">
<parameter-template-add :url='url' ref='templateRef' v-if='areaVisible' @areaVisible='handleCancel' :version='version' <parameter-template-add :url='url' ref='templateRef' v-if='areaVisible' @areaVisible='handleCancel'
:version='version'
:projectId='this.$route.query.id'></parameter-template-add> :projectId='this.$route.query.id'></parameter-template-add>
</a-modal> </a-modal>
<!-- 配置--> <!-- 配置-->
@@ -87,9 +91,10 @@
<a-modal v-model="historicalVisible" :title="$t('historicalVersion')" width='750px' :footer="null"> <a-modal v-model="historicalVisible" :title="$t('historicalVersion')" width='750px' :footer="null">
<historical-version v-if='historicalVisible' :historicalRow='historicalRow'></historical-version> <historical-version v-if='historicalVisible' :historicalRow='historicalRow'></historical-version>
</a-modal> </a-modal>
<!-- 复制参数模板--> <!-- 复制参数模板-->
<a-modal class="show-drawer" :title="$t('Copyparameterlist')" width="700px" v-model="drawerVisible" :footer="null"> <a-modal class="show-drawer" :title="$t('Copyparameterlist')" width="700px" v-model="drawerVisible" :footer="null">
<project-collection-parameters v-if='drawerVisible' @areaVisible='drawerhandleCancel' :templateTitle='templatetitle' @copysubmit='copysubmit' <project-collection-parameters v-if='drawerVisible' @areaVisible='drawerhandleCancel'
:templateTitle='templatetitle' @copysubmit='copysubmit'
:selectedRowKeyS='selectedRowKeys' :rowId='rowId' :version='version' :url='url' :selectedRowKeyS='selectedRowKeys' :rowId='rowId' :version='version' :url='url'
:projectId='this.$route.query.id'></project-collection-parameters> :projectId='this.$route.query.id'></project-collection-parameters>
</a-modal> </a-modal>
@@ -139,7 +144,8 @@
{ {
title: this.$t('collectionCompletionTime'), title: this.$t('collectionCompletionTime'),
align: 'center', align: 'center',
dataIndex: 'finishTime' dataIndex: 'finishTime',
scopedSlots: { customRender: 'collectionCompletionTime' }
}, },
{ {
title: this.$t('Version'), title: this.$t('Version'),
@@ -177,7 +183,7 @@
deleteAll: 'params/manifest/deleteBatch', deleteAll: 'params/manifest/deleteBatch',
conAdd: 'params/config/addBatch', conAdd: 'params/config/addBatch',
conList: 'params/config/list', conList: 'params/config/list',
changeExtension:'params/manifest/changeExtension', changeExtension: 'params/manifest/changeExtension',
verifyConfig: 'params/manifest/verifyConfig' verifyConfig: 'params/manifest/verifyConfig'
}, },
loading: false, loading: false,
@@ -199,7 +205,7 @@
drawerVisible: false, drawerVisible: false,
drawerVisibleitem: false, drawerVisibleitem: false,
titleTag: '', titleTag: '',
selectedRowKeysvalArray: [], selectedRowKeysvalArray: []
} }
}, },
mounted() { mounted() {
@@ -214,7 +220,7 @@
localStorage.setItem('paramsManifest', JSON.stringify(item)) localStorage.setItem('paramsManifest', JSON.stringify(item))
let newUrl = _this.$router.resolve({ let newUrl = _this.$router.resolve({
path: '/ParameterItemCollection', path: '/ParameterItemCollection',
query: item, query: item
}) })
window.open(newUrl.href, '_blank') window.open(newUrl.href, '_blank')
} else { } else {
@@ -223,7 +229,7 @@
}) })
}, },
deleteLib(val) { deleteLib(val) {
if(val.state === '已完成' || val.state === 'Finished' ) { if (val.state === '已完成' || val.state === 'Finished') {
let _this = this let _this = this
this.$confirm({ this.$confirm({
content: _this.$t('ConfirmDelete'), content: _this.$t('ConfirmDelete'),
@@ -277,7 +283,7 @@
this.pageNo = 1 this.pageNo = 1
this.getlist() this.getlist()
}, },
onSelectChange(val,valArray) { onSelectChange(val, valArray) {
this.selectedRowKeys = val this.selectedRowKeys = val
this.selectedRowKeysArray = val.join(',') this.selectedRowKeysArray = val.join(',')
this.selectedRowKeysvalArray = valArray this.selectedRowKeysvalArray = valArray
@@ -286,7 +292,7 @@
this.areaVisible = true this.areaVisible = true
setTimeout(() => { setTimeout(() => {
this.$refs.templateRef.editData(edit) this.$refs.templateRef.editData(edit)
},50) }, 50)
}, },
handleAdd() { handleAdd() {
this.areaVisible = true this.areaVisible = true
@@ -294,11 +300,11 @@
// 变更扩展 // 变更扩展
handleModule() { handleModule() {
let _this = this let _this = this
if(this.selectedRowKeys.length == 0){ if (this.selectedRowKeys.length == 0) {
this.$message.warning(_this.$t('pleaseSelectData')) this.$message.warning(_this.$t('pleaseSelectData'))
}else if(this.selectedRowKeys.length > 1){ } else if (this.selectedRowKeys.length > 1) {
this.$message.warning(_this.$t('OnlyOneSelected')) this.$message.warning(_this.$t('OnlyOneSelected'))
} else if(this.selectedRowKeysvalArray[0].state === '已完成'|| this.selectedRowKeysvalArray[0].state ==='Finished'){ } else if (this.selectedRowKeysvalArray[0].state === '已完成' || this.selectedRowKeysvalArray[0].state === 'Finished') {
getAction(_this.url.changeExtension, { id: this.selectedRowKeys[0] }).then((res) => { getAction(_this.url.changeExtension, { id: this.selectedRowKeys[0] }).then((res) => {
if (res.success) { if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful')) _this.$message.success(_this.$t('OperationSuccessful'))
@@ -316,11 +322,11 @@
// 默认为0 可全部删除 // 默认为0 可全部删除
let flag = 1 let flag = 1
this.selectedRowKeysvalArray.forEach((item) => { this.selectedRowKeysvalArray.forEach((item) => {
if(item.state !== '已完成' && val.state !== 'Finished' ){ if (item.state !== '已完成' && val.state !== 'Finished') {
flag = 0 flag = 0
} }
}) })
if(flag) { if (flag) {
let param = { let param = {
ids: this.selectedRowKeysArray ids: this.selectedRowKeysArray
} }
@@ -501,8 +507,9 @@
cursor: pointer; cursor: pointer;
border-radius: 4px; border-radius: 4px;
} }
/deep/.add-padding{
margin-left: -89px!important; /deep/ .add-padding {
margin-left: -89px !important;
} }
</style> </style>
<style> <style>
@@ -11,16 +11,16 @@
> >
<a-row :gutter='24'> <a-row :gutter='24'>
<a-col :span='9'> <a-col :span='9'>
<a-form-model-item :label="$t('title')" prop='title'> <a-form-model-item class="itemAddAdmin" :label="$t('title')" prop='title'>
<a-input style='width: 420px' <a-input style='width: 420px'
:placeholder="$t('PleaseEnter')+$t('title')" :placeholder="$t('PleaseEnter')+$t('title')"
v-model='formData.title' /> v-model='formData.title'/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span='9'> <!-- <a-col :span='9'>-->
</a-col> <!-- </a-col>-->
<a-col :span='6'> <!-- <a-col :span='6'>-->
</a-col> <!-- </a-col>-->
</a-row> </a-row>
<a-row :gutter='24'> <a-row :gutter='24'>
<a-col :span='9'> <a-col :span='9'>
@@ -29,7 +29,7 @@
<j-dict-select-tag class='box-input' v-model='form.region' <j-dict-select-tag class='box-input' v-model='form.region'
:placeholder="$t('PleaseSelect')+$t('zoneOfApplication')" :placeholder="$t('PleaseSelect')+$t('zoneOfApplication')"
:type="'select'" :type="'select'"
:triggerChange='false' :dictCode="'region'" /> :triggerChange='false' :dictCode="'region'"/>
</a-form-model-item> </a-form-model-item>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
@@ -37,7 +37,7 @@
<a-form-model-item ref='paramsTemplateName' :label="$t('parameterTemplate')" prop='paramsTemplateName'> <a-form-model-item ref='paramsTemplateName' :label="$t('parameterTemplate')" prop='paramsTemplateName'>
<a-input <a-input
:placeholder="$t('PleaseEnter')+$t('parameterTemplate')" :placeholder="$t('PleaseEnter')+$t('parameterTemplate')"
v-model='form.paramsTemplateName' /> v-model='form.paramsTemplateName'/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span='6' style='margin-top: 5px'> <a-col :span='6' style='margin-top: 5px'>
@@ -79,9 +79,9 @@
</template> </template>
<script> <script>
import { putAction, postAction, getAction, deleteAction } from '@/api/manage' import { putAction, postAction, getAction, deleteAction } from '@/api/manage'
export default { export default {
name: 'diolagArea', name: 'diolagArea',
components: {}, components: {},
data() { data() {
@@ -119,7 +119,12 @@ export default {
formData: {}, formData: {},
rules: { rules: {
title: [ title: [
{ required: true, message: this.$t('enterTitle'), trigger: 'blur' } { required: true, message: this.$t('enterTitle'), trigger: 'blur' },
{
max: 200,
message: this.$t('title') + this.$t('cannotExceed') + 200 + this.$t('Characters'),
trigger: 'blur'
}
] ]
}, },
areaTable: [], areaTable: [],
@@ -203,7 +208,7 @@ export default {
editData(edit) { editData(edit) {
// 编辑一行的数据 // 编辑一行的数据
this.row = edit this.row = edit
this.formData = {...edit} this.formData = { ...edit }
this.selectedRowKeys = edit.paramsTemplateId.split(',') this.selectedRowKeys = edit.paramsTemplateId.split(',')
}, },
//新增 //新增
@@ -213,7 +218,7 @@ export default {
} else if (this.selectedRowKeys.length > 1) { } else if (this.selectedRowKeys.length > 1) {
this.$message.warning(this.$t('OnlyOneSelected')) this.$message.warning(this.$t('OnlyOneSelected'))
} else { } else {
if(this.formData.title !== undefined) { if (this.formData.title !== undefined) {
this.formData.title = this.formData.title.trim() this.formData.title = this.formData.title.trim()
} }
this.$refs.ruleForm.validate(valid => { this.$refs.ruleForm.validate(valid => {
@@ -230,7 +235,7 @@ export default {
if (this.formData.id) { if (this.formData.id) {
//编辑 //编辑
postDate = { postDate = {
id : this.formData.id, id: this.formData.id,
...postDate ...postDate
} }
postAction(`params/manifest/edit`, postDate).then(res => { postAction(`params/manifest/edit`, postDate).then(res => {
@@ -303,7 +308,7 @@ export default {
}) })
} }
}) })
}, }
// 编辑 // 编辑
}, },
watch: { watch: {
@@ -312,13 +317,13 @@ export default {
} }
} }
} }
</script> </script>
<style lang='less' scoped> <style lang='less' scoped>
@import '~@assets/less/common.less'; @import '~@assets/less/common.less';
.diolag-area { .diolag-area {
.table-area { .table-area {
margin: 20px 0; margin: 20px 0;
@@ -330,18 +335,20 @@ export default {
.table-del { .table-del {
color: red; color: red;
} }
} }
.drawer-bootom-button{
.drawer-bootom-button {
display: flex; display: flex;
justify-content: center; justify-content: center;
} }
.Required {
.Required {
color: red; color: red;
margin-right: 4px; margin-right: 4px;
} }
</style> </style>
<style lang='less'> <style lang='less'>
.area-module { .area-module {
.ant-modal-wrap { .ant-modal-wrap {
.ant-modal { .ant-modal {
.ant-modal-content { .ant-modal-content {
@@ -351,5 +358,10 @@ export default {
} }
} }
} }
} }
</style>
<style>
.itemAddAdmin .ant-form-item-control-wrapper .has-error .ant-form-explain {
white-space: nowrap!important;
}
</style> </style>
@@ -174,7 +174,7 @@ export default {
methods: { methods: {
// 清单列表传出数据 // 清单列表传出数据
listVisibleRow(val) { listVisibleRow(val) {
this.selectedRowKeys = [] // this.selectedRowKeys = []
let newAreaTable=JSON.parse(JSON.stringify(this.areaTable)) let newAreaTable=JSON.parse(JSON.stringify(this.areaTable))
newAreaTable.forEach((item, index) => { newAreaTable.forEach((item, index) => {
if( item.id == this.listVisibleRowDate.id ) { if( item.id == this.listVisibleRowDate.id ) {