修改禅道已知bug
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
<div class='diolag-area'>
|
||||
<a-spin :spinning='spinLoading'>
|
||||
<a-form-model
|
||||
@keyup.enter.native="searchQuery"
|
||||
class='tag-module'
|
||||
ref='ruleForm'
|
||||
:model='form'
|
||||
|
||||
@@ -395,7 +395,7 @@
|
||||
dataIndex: res.db_field_name,
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
sorter: res.sort
|
||||
sorter: res.sort,
|
||||
})
|
||||
this.columns[index].scopedSlots = {
|
||||
customRender: 'titleName',
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<a-form-model-item class="itemModel" prop="paramsTemplateName">
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.paramsTemplateName"
|
||||
v-model.trim="formInline.paramsTemplateName"
|
||||
:placeholder="$t('PleaseEnter')+$t('parameterTemplate')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
@@ -87,7 +87,7 @@ export default {
|
||||
visible: false,
|
||||
rules: {
|
||||
paramsTemplateName:[
|
||||
{ required: true, message: this.$t('PleaseEnter')+this.$t('parameterTemplate'), trigger: 'change' },
|
||||
{ required: true, message: this.$t('PleaseEnter')+this.$t('parameterTemplate'), trigger: 'blur' },
|
||||
{ min:1, max: 50, message: this.$t('cantExeed')+'50'+this.$t('characters'), trigger: 'blur' },
|
||||
],
|
||||
description:[
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<a-form-model-item class="itemModel" prop="nioNumber">
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.nioNumber"
|
||||
v-model.trim="formInline.nioNumber"
|
||||
:placeholder="$t('PleaseEnter')+$t('NNiONumber')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
@@ -55,7 +55,7 @@
|
||||
<a-form-model-item class="itemModel" prop="paramsName">
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.paramsName"
|
||||
v-model.trim="formInline.paramsName"
|
||||
:placeholder="$t('PleaseEnter')+$t('NParameterName')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
@@ -127,7 +127,7 @@
|
||||
style='height: 95px; width: 100%'
|
||||
type="textarea"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.description"
|
||||
v-model.trim="formInline.description"
|
||||
:placeholder="$t('PleaseEnter')+$t('NParameterDescription')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
@@ -204,7 +204,7 @@
|
||||
<a-input class="box-input add-input"
|
||||
:disabled="disabled"
|
||||
type="textarea"
|
||||
v-model="formInline.controlValues"
|
||||
v-model.trim="formInline.controlValues"
|
||||
:placeholder="$t('PleaseEnter')+$t('NcontrolAlternatives')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
@@ -349,12 +349,12 @@ export default {
|
||||
visible: false,
|
||||
rules: {
|
||||
nioNumber:[
|
||||
{ required: true, message: this.$t('PleaseEnter')+this.$t('NiONumber'), trigger: 'change' },
|
||||
{ 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,}$/,
|
||||
message: this.$t('onlyThree'),
|
||||
trigger: 'change'
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
certCategory: [
|
||||
@@ -364,7 +364,7 @@ export default {
|
||||
{ required: true, message: this.$t('pleaseSelect')+this.$t('Required'), trigger: 'change' },
|
||||
],
|
||||
paramsName: [
|
||||
{ required: true, message: this.$t('pleaseSelect')+this.$t('ParameterName'), trigger: 'change' },
|
||||
{ required: true, message: this.$t('pleaseSelect')+this.$t('ParameterName'), trigger: 'blur' },
|
||||
{ min:1, max: 30, message: this.$t('cantExeed')+'30'+this.$t('characters'), trigger: 'blur' },
|
||||
],
|
||||
technologyTerritory: [
|
||||
@@ -386,7 +386,7 @@ export default {
|
||||
{ required: true, message: this.$t('PleaseEnter')+this.$t('controlVerification'), trigger: 'change' },
|
||||
],
|
||||
controlValues: [
|
||||
{ required: true, message: this.$t('PleaseEnter')+this.$t('controlAlternatives'), trigger: 'change' },
|
||||
{ required: true, message: this.$t('PleaseEnter')+this.$t('controlAlternatives'), trigger: 'blur' },
|
||||
{ min:1, max: 500, message: this.$t('cantExeed')+'500'+this.$t('characters'), trigger: 'blur' },
|
||||
],
|
||||
},
|
||||
|
||||
@@ -1,262 +0,0 @@
|
||||
<template>
|
||||
<div class="doc-detail">
|
||||
<!-- 认证参数收集——清单信息-->
|
||||
<div class="Virtual-detail-header" style="position: fixed;top: 0">
|
||||
<div class="Virtual-detail-title">
|
||||
<span style="line-height: 74px;display: inline-block;float: left">
|
||||
<a-icon type="left-circle" theme="filled" style="margin-right: 6px;font-size: 30px;color: #21c9cc;"/>
|
||||
</span>
|
||||
<span>
|
||||
{{this.title}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="Virtual-detail-text-right" v-if="textTitle === $t('listOfRegulations')">
|
||||
<div class="operator-text" @click="commentClick">
|
||||
<a-icon type="message"/>
|
||||
{{$t('comment')}}
|
||||
</div>
|
||||
<div class="operator-text" @click="historicalVersionClick">
|
||||
<a-icon type="clock-circle"/>
|
||||
{{$t('historicalVersion')}}
|
||||
</div>
|
||||
<div class="operator-text" @click="UpdateLogClick">
|
||||
<a-icon type="reload"/>
|
||||
{{$t('UpdateLog')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 67px 0 0 0;background: #ffffff;height:100%">
|
||||
<div class="detail-content" style="height: 100%">
|
||||
<div class="Virtual-detail-left">
|
||||
<div class="Virtual-detail-left-text" :title="$t('projectDetails')"
|
||||
@click="textClick(0,$t('projectDetails'))">
|
||||
<a-icon type="container"/>
|
||||
{{$t('projectDetails')}}
|
||||
</div>
|
||||
<div class="Virtual-detail-left-text" v-has="'projectLawsInventory:list'" :title="$t('listOfRegulations')"
|
||||
@click="textClick(1,$t('listOfRegulations'))">
|
||||
<a-icon type="container"/>
|
||||
{{$t('listOfRegulations')}}
|
||||
</div>
|
||||
<div class="Virtual-detail-left-text" :title="$t('taskList')" @click="textClick(2,$t('taskList'))">
|
||||
<a-icon type="container"/>
|
||||
{{$t('taskList')}}
|
||||
</div>
|
||||
<div class="Virtual-detail-left-text" v-has="'ncrTrack:queryPageInfo'" :title="$t('nonConformance')"
|
||||
@click="textClick(3,$t('nonConformance'))">
|
||||
<a-icon type="container"/>
|
||||
{{$t('nonConformance')}}
|
||||
</div>
|
||||
<div class="Virtual-detail-left-text" :title="$t('TaskParameterCollection')"
|
||||
@click="textClick(4,$t('TaskParameterCollection'))">
|
||||
<a-icon type="container"/>
|
||||
{{$t('TaskParameterCollection')}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="Virtual-detail-right">
|
||||
<ProjectDetailsName @TaskListChange="TaskListChange" v-if="textTitle === $t('projectDetails')"/>
|
||||
<listOfRegulations v-else-if="textTitle === $t('listOfRegulations')"/>
|
||||
<TaskList :isDisplayNum="isDisplayNum" :areaOfResponsibility="areaOfResponsibility"
|
||||
v-else-if="textTitle === $t('taskList')"/>
|
||||
<ParameterItemCollectionList v-else-if="textTitle === $t('TaskParameterCollection')"
|
||||
:paramsManifest='paramsManifest'/>
|
||||
<nonConformance v-else-if="textTitle === $t('nonConformance')"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<updateLog :url="url" ref="updateLogRef"/>
|
||||
<historicalVersionList ref="historicalVersionListRef"/>
|
||||
<commentList ref="commentListRef"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TaskList from '@views/projectManagement/components/TaskList'
|
||||
import listOfRegulations from '@views/projectManagement/components/listOfRegulations'
|
||||
import ProjectDetailsName from '@views/projectManagement/components/ProjectDetails'
|
||||
import ParameterItemCollectionList from '../components/ParameterItemCollectionList'
|
||||
import nonConformance from '@views/projectManagement/components/nonConformance'
|
||||
import updateLog from '@comp/UpdateLog'
|
||||
import historicalVersionList from '@views/projectManagement/components/historicalVersionList'
|
||||
import commentList from '@views/projectManagement/components/commentList'
|
||||
import { getAction, postAction, deleteAction, downloadFile } from '@api/manage'
|
||||
|
||||
export default {
|
||||
name: 'ProjectDetails',
|
||||
components: {
|
||||
TaskList,
|
||||
listOfRegulations,
|
||||
ProjectDetailsName,
|
||||
ParameterItemCollectionList,
|
||||
nonConformance,
|
||||
updateLog,
|
||||
historicalVersionList,
|
||||
commentList
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: this.$t('projectDetails'),
|
||||
textTitle: this.$t('TaskParameterCollection'),
|
||||
isDisplayNum: '',
|
||||
areaOfResponsibility: {},
|
||||
url: {
|
||||
logList: '/project/projectLawsInventoryLogEO/page',
|
||||
historicalVersionUrl: '',
|
||||
queryUserPremissionByProjectLibraryId: '/project/projectCertificationDirectoryEO/queryUserPremissionByProjectLibraryId'
|
||||
},
|
||||
paramsManifest: {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.textColor()
|
||||
this.getTaskId()
|
||||
// 清单信息
|
||||
this.paramsManifest = JSON.parse(localStorage.getItem('paramsManifest'))
|
||||
},
|
||||
created() {
|
||||
document.title = this.$t('projectDetails') + '-' + this.$route.query.projectName
|
||||
},
|
||||
methods: {
|
||||
textColor() {
|
||||
let textColor = document.getElementsByClassName('Virtual-detail-left-text-color')
|
||||
if (textColor && textColor.length > 0) {
|
||||
textColor[0].classList.remove('Virtual-detail-left-text-color')
|
||||
}
|
||||
let text = document.getElementsByClassName('Virtual-detail-left-text')
|
||||
if (text && text.length > 0) {
|
||||
for (let i = 0; i < text.length; i++) {
|
||||
if (text[i].title == this.$t('TaskParameterCollection')) {
|
||||
text[i].classList.add('Virtual-detail-left-text-color')
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
textClick(num, name) {
|
||||
this.textTitle = name
|
||||
let textColor = document.getElementsByClassName('Virtual-detail-left-text-color')
|
||||
if (textColor && textColor.length > 0) {
|
||||
textColor[0].classList.remove('Virtual-detail-left-text-color')
|
||||
}
|
||||
let text = document.getElementsByClassName('Virtual-detail-left-text')
|
||||
for (let i = 0; i < text.length; i++) {
|
||||
if (text[i].title == name) {
|
||||
text[i].classList.add('Virtual-detail-left-text-color')
|
||||
} else if (text[i].title == name) {
|
||||
text[i].classList.add('Virtual-detail-left-text-color')
|
||||
} else if (text[i].title == name) {
|
||||
text[i].classList.add('Virtual-detail-left-text-color')
|
||||
} else if (text[i].title == name) {
|
||||
text[i].classList.add('Virtual-detail-left-text-color')
|
||||
} else if (text[i].title == name) {
|
||||
text[i].classList.add('Virtual-detail-left-text-color')
|
||||
}
|
||||
}
|
||||
},
|
||||
UpdateLogClick() {
|
||||
this.$refs.updateLogRef.getList({ projectLibraryId: this.$route.query.id })
|
||||
},
|
||||
historicalVersionClick() {
|
||||
this.$refs.historicalVersionListRef.getList()
|
||||
},
|
||||
commentClick() {
|
||||
this.$refs.commentListRef.getData()
|
||||
},
|
||||
getTaskId() {
|
||||
let query = {
|
||||
projectLibraryId: this.$route.query.id
|
||||
}
|
||||
getAction(this.url.queryUserPremissionByProjectLibraryId, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.isDisplayNum = res.result
|
||||
}
|
||||
})
|
||||
},
|
||||
TaskListChange(item) {
|
||||
this.areaOfResponsibility = item
|
||||
this.textTitle = this.$t('taskList')
|
||||
let textColor = document.getElementsByClassName('Virtual-detail-left-text-color')
|
||||
if (textColor && textColor.length > 0) {
|
||||
textColor[0].classList.remove('Virtual-detail-left-text-color')
|
||||
}
|
||||
let text = document.getElementsByClassName('Virtual-detail-left-text')
|
||||
for (let i = 0; i < text.length; i++) {
|
||||
if (text[i].title == this.$t('taskList')) {
|
||||
text[i].classList.add('Virtual-detail-left-text-color')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.doc-detail {
|
||||
background: #fff;
|
||||
height: 100%;
|
||||
|
||||
.Virtual-detail-header {
|
||||
width: 100%;
|
||||
height: 68px;
|
||||
line-height: 68px;
|
||||
padding: 0 32px 0 32px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 2px #eff1f3 solid;
|
||||
background: #fff;
|
||||
|
||||
.Virtual-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;
|
||||
}
|
||||
}
|
||||
|
||||
.Virtual-detail-left {
|
||||
width: 240px;
|
||||
padding: 16px 24px;
|
||||
box-sizing: border-box;
|
||||
font-size: 16px;
|
||||
line-height: 3;
|
||||
float: left;
|
||||
|
||||
.Virtual-detail-left-text {
|
||||
padding: 2px 12px;
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.Virtual-detail-right {
|
||||
border-left: 2px #eff1f3 solid;
|
||||
width: calc(100% - 240px);
|
||||
height: 100%;
|
||||
float: left;
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.Virtual-detail-left-text-color {
|
||||
background: #eff1f3;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.Virtual-detail-text-right {
|
||||
|
||||
}
|
||||
</style>
|
||||
+1006
-922
File diff suppressed because it is too large
Load Diff
@@ -49,7 +49,7 @@
|
||||
:dataSource='dataSource'
|
||||
:pagination='false'
|
||||
:loading='loading'
|
||||
:scroll='{x: 600}'
|
||||
:scroll="{x: 600}"
|
||||
:rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}'
|
||||
@change='handleTableChange'>
|
||||
<span slot="paramsManifestClick" slot-scope="text,record">
|
||||
@@ -371,6 +371,7 @@
|
||||
pageNo: this.pageNo,
|
||||
...this.queryParam
|
||||
}
|
||||
this.loading = true
|
||||
getAction(this.url.list, query).then((res) => {
|
||||
if (res.success) {
|
||||
if (res.result.current > 1 && res.result.records.length == 0) {
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text"
|
||||
:title="$t('configurationName')">{{$t('configurationName')}}</span>
|
||||
<span class="title-text-text"
|
||||
:title="$t('configurationName')">{{$t('configurationName')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="nioNumber">
|
||||
<a-input class="box-input"
|
||||
@@ -48,8 +48,8 @@
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text"
|
||||
:title="$t('Model')">{{$t('Model')}}</span>
|
||||
<span class="title-text-text"
|
||||
:title="$t('Model')">{{$t('Model')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="nioNumber">
|
||||
<a-input class="box-input"
|
||||
@@ -79,8 +79,8 @@
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text"
|
||||
:title="$t('electricMachinery')">{{$t('electricMachinery')}}</span>
|
||||
<span class="title-text-text"
|
||||
:title="$t('electricMachinery')">{{$t('electricMachinery')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="nioNumber">
|
||||
<a-input class="box-input"
|
||||
@@ -95,8 +95,11 @@
|
||||
<div class="title-text">
|
||||
<!-- <span class="title-text-text" :title="$t('Required')">{{$t('Required')}}</span>-->
|
||||
</div>
|
||||
<a-button style="margin-right: .8rem" @click="addConfiguration(index)">{{$t('addConfiguration')}}</a-button>
|
||||
<a-button @click="deleteConfiguration(item.id,index)" type="primary" :loading="confirmLoading">{{$t('deleteConfiguration')}}</a-button>
|
||||
<a-button style="margin-right: .8rem" @click="addConfiguration(index)">{{$t('addConfiguration')}}
|
||||
</a-button>
|
||||
<a-button @click="deleteConfiguration(item.id,index)" type="primary" :loading="confirmLoading">
|
||||
{{$t('deleteConfiguration')}}
|
||||
</a-button>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@@ -112,337 +115,340 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
|
||||
import uploadFile from '@/components/uploadFile/file'
|
||||
import axios from 'axios'
|
||||
export default {
|
||||
name: 'addModel',
|
||||
components: {
|
||||
uploadFile
|
||||
},
|
||||
props: {
|
||||
itemId: {
|
||||
type: String,
|
||||
default: '',
|
||||
require: true
|
||||
},
|
||||
url: {
|
||||
type: Object,
|
||||
default: '',
|
||||
require: true
|
||||
},
|
||||
itemRow: {
|
||||
type: Object,
|
||||
default: '',
|
||||
require: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formInline: {},
|
||||
confirmLoading: false,
|
||||
visible: false,
|
||||
rules: {
|
||||
// nioNumber:[
|
||||
// { required: true, message: this.$t('PleaseEnter')+this.$t('NiONumber'), trigger: 'change' },
|
||||
// ]
|
||||
},
|
||||
disabled: false,
|
||||
projectNameList: [],
|
||||
title: '',
|
||||
stateOne: '',
|
||||
contentList : [],
|
||||
paramsConfigEOList: [
|
||||
{
|
||||
id: '',
|
||||
// displaySeq: 0,
|
||||
configName: '', // 配置名称
|
||||
version: '', // 版本
|
||||
carType: '', // 车型
|
||||
battery: '', // 电池
|
||||
motor: '', // 电机
|
||||
}
|
||||
],
|
||||
conIndex: 0,
|
||||
deleteConfigIds: '',
|
||||
deleteConfigIdsArray: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
|
||||
import uploadFile from '@/components/uploadFile/file'
|
||||
import axios from 'axios'
|
||||
|
||||
},
|
||||
methods: {
|
||||
getNameList() {
|
||||
getAction('project/projectNameInfoEO/list', {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.projectNameList = res.result || []
|
||||
} else {
|
||||
this.projectNameList = []
|
||||
}
|
||||
})
|
||||
export default {
|
||||
name: 'addModel',
|
||||
components: {
|
||||
uploadFile
|
||||
},
|
||||
addModel(id) {
|
||||
this.paramsConfigEOList = []
|
||||
this.visible = true
|
||||
this.title = this.$t('MaintainConfigureInfo')
|
||||
this.formInline = {}
|
||||
this.getconList(id)
|
||||
props: {
|
||||
itemId: {
|
||||
type: String,
|
||||
default: '',
|
||||
require: true
|
||||
},
|
||||
url: {
|
||||
type: Object,
|
||||
default: '',
|
||||
require: true
|
||||
},
|
||||
itemRow: {
|
||||
type: Object,
|
||||
default: '',
|
||||
require: true
|
||||
}
|
||||
},
|
||||
getconList(id) {
|
||||
getAction(`${this.url.conList}?paramsManifestId=${id}`, {}).then((res) => {
|
||||
if (res.success) {
|
||||
if(res.result.length === 0) {
|
||||
this.paramsConfigEOList = [
|
||||
{
|
||||
id: '',
|
||||
// displaySeq: 0,
|
||||
configName: '', // 配置名称
|
||||
version: '', // 版本
|
||||
carType: '', // 车型
|
||||
battery: '', // 电池
|
||||
motor: '', // 电机
|
||||
}
|
||||
]
|
||||
data() {
|
||||
return {
|
||||
formInline: {},
|
||||
confirmLoading: false,
|
||||
visible: false,
|
||||
rules: {
|
||||
// nioNumber:[
|
||||
// { required: true, message: this.$t('PleaseEnter')+this.$t('NiONumber'), trigger: 'change' },
|
||||
// ]
|
||||
},
|
||||
disabled: false,
|
||||
projectNameList: [],
|
||||
title: '',
|
||||
stateOne: '',
|
||||
contentList: [],
|
||||
paramsConfigEOList: [
|
||||
{
|
||||
id: '',
|
||||
// displaySeq: 0,
|
||||
configName: '', // 配置名称
|
||||
version: '', // 版本
|
||||
carType: '', // 车型
|
||||
battery: '', // 电池
|
||||
motor: '' // 电机
|
||||
}
|
||||
],
|
||||
conIndex: 0,
|
||||
deleteConfigIds: '',
|
||||
deleteConfigIdsArray: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
getNameList() {
|
||||
getAction('project/projectNameInfoEO/list', {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.projectNameList = res.result || []
|
||||
} else {
|
||||
this.paramsConfigEOList = res.result
|
||||
this.projectNameList = []
|
||||
}
|
||||
this.visible = true
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
},
|
||||
addConfiguration(item) {
|
||||
if(this.itemRow.configFlag) {
|
||||
this.paramsConfigEOList.splice(item.displaySeq + 1,0,{
|
||||
id: '',
|
||||
configName: '', // 配置名称
|
||||
version: '', // 版本
|
||||
carType: '', // 车型
|
||||
battery: '', // 电池
|
||||
motor: '', // 电机
|
||||
})
|
||||
} else {
|
||||
this.$message.warning(this.$t('Theselectedconfiguration'))
|
||||
}
|
||||
},
|
||||
deleteConfiguration(displaySeq,index) {
|
||||
if(this.paramsConfigEOList.length === 1) {
|
||||
this.$message.warning(this.$t('oneconfigurationInformation'))
|
||||
return
|
||||
}
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('ConfirmDelete'),
|
||||
onOk() {
|
||||
_this.deleteConfigIdsArray.push(displaySeq)
|
||||
_this.deleteConfigIds = _this.deleteConfigIdsArray.join(',')
|
||||
let _tt = _this.paramsConfigEOList.splice(index,1)
|
||||
if(_tt.length === 1) {
|
||||
_this.$message.success(_this.$t('DeleteSucceeded'))
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
},
|
||||
handleSubmit() {
|
||||
let flag = 1
|
||||
this.paramsConfigEOList.forEach((item) => {
|
||||
// 配置名称
|
||||
if(item.configName.trim() == ''){
|
||||
this.$message.warning(this.$t('configurationName')+this.$t('cannotEmpty'))
|
||||
flag = 0
|
||||
return
|
||||
} else if(item.configName.length > 25){
|
||||
this.$message.warning(this.$t('configurationName')+this.$t('cantExeed')+'25'+this.$t('characters'))
|
||||
flag = 0
|
||||
return
|
||||
}
|
||||
// 车型
|
||||
if(item.carType.trim() == ''){
|
||||
this.$message.warning(this.$t('Model')+this.$t('cannotEmpty'))
|
||||
flag = 0
|
||||
return
|
||||
} else if(item.carType.length > 20){
|
||||
this.$message.warning(this.$t('Model')+this.$t('cantExeed')+'20'+this.$t('characters'))
|
||||
flag = 0
|
||||
return
|
||||
}
|
||||
// 版本
|
||||
if(item.version.trim() == ''){
|
||||
this.$message.warning(this.$t('Version')+this.$t('cannotEmpty'))
|
||||
flag = 0
|
||||
return
|
||||
} else if(item.version.length > 20){
|
||||
this.$message.warning(this.$t('Version')+this.$t('cantExeed')+'20'+this.$t('characters'))
|
||||
flag = 0
|
||||
return
|
||||
}
|
||||
// 电池
|
||||
if(item.battery.trim() == ''){
|
||||
this.$message.warning(this.$t('Battery')+this.$t('cannotEmpty'))
|
||||
flag = 0
|
||||
return
|
||||
} else if(item.battery.length > 20){
|
||||
this.$message.warning(this.$t('Battery')+this.$t('cantExeed')+'20'+this.$t('characters'))
|
||||
flag = 0
|
||||
return
|
||||
}
|
||||
// 电机
|
||||
if(item.motor.trim() == ''){
|
||||
this.$message.warning(this.$t('electricMachinery')+this.$t('cannotEmpty'))
|
||||
flag = 0
|
||||
return
|
||||
} else if(item.motor.length > 20){
|
||||
this.$message.warning(this.$t('electricMachinery')+this.$t('cantExeed')+'20'+this.$t('characters'))
|
||||
flag = 0
|
||||
return
|
||||
}
|
||||
})
|
||||
if(flag == 1){
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
let querycontentList = {}
|
||||
let paramsManifestId = { paramsManifestId : this.itemId }
|
||||
querycontentList = {
|
||||
paramsConfigEOList: this.paramsConfigEOList,
|
||||
deleteConfigIds: this.deleteConfigIds
|
||||
},
|
||||
addModel(id) {
|
||||
this.paramsConfigEOList = []
|
||||
this.visible = true
|
||||
this.title = this.$t('MaintainConfigureInfo')
|
||||
this.formInline = {}
|
||||
this.getconList(id)
|
||||
},
|
||||
getconList(id) {
|
||||
getAction(`${this.url.conList}?paramsManifestId=${id}`, {}).then((res) => {
|
||||
if (res.success) {
|
||||
if (res.result.length === 0) {
|
||||
this.paramsConfigEOList = [
|
||||
{
|
||||
id: '',
|
||||
// displaySeq: 0,
|
||||
configName: '', // 配置名称
|
||||
version: '', // 版本
|
||||
carType: '', // 车型
|
||||
battery: '', // 电池
|
||||
motor: '' // 电机
|
||||
}
|
||||
]
|
||||
} else {
|
||||
this.paramsConfigEOList = res.result
|
||||
}
|
||||
let querycontentListItem = { ...querycontentList, ...paramsManifestId }
|
||||
this.confirmLoading = true
|
||||
postAction(this.url.conAdd, querycontentListItem).then((res) => {
|
||||
if (res.success) {
|
||||
this.confirmLoading = false
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.visible = false
|
||||
this.deleteConfigIds = ''
|
||||
this.deleteConfigIdsArray = []
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
this.visible = true
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
},
|
||||
addConfiguration(item) {
|
||||
if (this.itemRow.configFlag) {
|
||||
this.paramsConfigEOList.splice(item.displaySeq + 1, 0, {
|
||||
id: '',
|
||||
configName: '', // 配置名称
|
||||
version: '', // 版本
|
||||
carType: '', // 车型
|
||||
battery: '', // 电池
|
||||
motor: '' // 电机
|
||||
})
|
||||
} else {
|
||||
this.$message.warning(this.$t('Theselectedconfiguration'))
|
||||
}
|
||||
},
|
||||
deleteConfiguration(displaySeq, index) {
|
||||
if (this.paramsConfigEOList.length === 1) {
|
||||
this.$message.warning(this.$t('oneconfigurationInformation'))
|
||||
return
|
||||
}
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('ConfirmDelete'),
|
||||
onOk() {
|
||||
if (displaySeq) {
|
||||
_this.deleteConfigIdsArray.push(displaySeq)
|
||||
}
|
||||
_this.deleteConfigIds = _this.deleteConfigIdsArray.join(',')
|
||||
let _tt = _this.paramsConfigEOList.splice(index, 1)
|
||||
if (_tt.length === 1) {
|
||||
_this.$message.success(_this.$t('DeleteSucceeded'))
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
},
|
||||
handleSubmit() {
|
||||
let flag = 1
|
||||
this.paramsConfigEOList.forEach((item) => {
|
||||
// 配置名称
|
||||
if (item.configName.trim() == '') {
|
||||
this.$message.warning(this.$t('configurationName') + this.$t('cannotEmpty'))
|
||||
flag = 0
|
||||
return
|
||||
} else if (item.configName.length > 25) {
|
||||
this.$message.warning(this.$t('configurationName') + this.$t('cantExeed') + '25' + this.$t('characters'))
|
||||
flag = 0
|
||||
return
|
||||
}
|
||||
// 车型
|
||||
if (item.carType.trim() == '') {
|
||||
this.$message.warning(this.$t('Model') + this.$t('cannotEmpty'))
|
||||
flag = 0
|
||||
return
|
||||
} else if (item.carType.length > 20) {
|
||||
this.$message.warning(this.$t('Model') + this.$t('cantExeed') + '20' + this.$t('characters'))
|
||||
flag = 0
|
||||
return
|
||||
}
|
||||
// 版本
|
||||
if (item.version.trim() == '') {
|
||||
this.$message.warning(this.$t('Version') + this.$t('cannotEmpty'))
|
||||
flag = 0
|
||||
return
|
||||
} else if (item.version.length > 20) {
|
||||
this.$message.warning(this.$t('Version') + this.$t('cantExeed') + '20' + this.$t('characters'))
|
||||
flag = 0
|
||||
return
|
||||
}
|
||||
// 电池
|
||||
if (item.battery.trim() == '') {
|
||||
this.$message.warning(this.$t('Battery') + this.$t('cannotEmpty'))
|
||||
flag = 0
|
||||
return
|
||||
} else if (item.battery.length > 20) {
|
||||
this.$message.warning(this.$t('Battery') + this.$t('cantExeed') + '20' + this.$t('characters'))
|
||||
flag = 0
|
||||
return
|
||||
}
|
||||
// 电机
|
||||
if (item.motor.trim() == '') {
|
||||
this.$message.warning(this.$t('electricMachinery') + this.$t('cannotEmpty'))
|
||||
flag = 0
|
||||
return
|
||||
} else if (item.motor.length > 20) {
|
||||
this.$message.warning(this.$t('electricMachinery') + this.$t('cantExeed') + '20' + this.$t('characters'))
|
||||
flag = 0
|
||||
return
|
||||
}
|
||||
})
|
||||
if (flag == 1) {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
let querycontentList = {}
|
||||
let paramsManifestId = { paramsManifestId: this.itemId }
|
||||
querycontentList = {
|
||||
paramsConfigEOList: this.paramsConfigEOList,
|
||||
deleteConfigIds: this.deleteConfigIds
|
||||
}
|
||||
let querycontentListItem = { ...querycontentList, ...paramsManifestId }
|
||||
this.confirmLoading = true
|
||||
postAction(this.url.conAdd, querycontentListItem).then((res) => {
|
||||
if (res.success) {
|
||||
this.confirmLoading = false
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.visible = false
|
||||
this.deleteConfigIds = ''
|
||||
this.deleteConfigIdsArray = []
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.formAdd .ant-form-item-label {
|
||||
width: 130px;
|
||||
}
|
||||
.formAdd .ant-form-item-label {
|
||||
width: 130px;
|
||||
}
|
||||
|
||||
.formAdd .ant-form-item-control-wrapper {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
.formAdd .ant-form-item-control-wrapper {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/*.formAdd .ant-form-item {*/
|
||||
/* margin-bottom: 20px;*/
|
||||
/*}*/
|
||||
/*.formAdd .ant-form-item {*/
|
||||
/* margin-bottom: 20px;*/
|
||||
/*}*/
|
||||
|
||||
.itemModel .ant-form-item-control-wrapper {
|
||||
width: 100%;
|
||||
}
|
||||
.itemModel .ant-form-item-control-wrapper {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.box-input .ant-select-selection--single {
|
||||
height: 38px;
|
||||
}
|
||||
.box-input .ant-select-selection--single {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-select-selection--multiple {
|
||||
height: 38px;
|
||||
}
|
||||
.box-input .ant-select-selection--multiple {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-select-selection__rendered {
|
||||
line-height: 38px;
|
||||
height: 38px;
|
||||
}
|
||||
.box-input .ant-select-selection__rendered {
|
||||
line-height: 38px;
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-select-selection--multiple .ant-select-selection__rendered > ul > li {
|
||||
margin-top: 6px;
|
||||
}
|
||||
.box-input .ant-select-selection--multiple .ant-select-selection__rendered > ul > li {
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.box-input .ant-calendar-picker {
|
||||
line-height: 38px;
|
||||
height: 38px;
|
||||
}
|
||||
.box-input .ant-calendar-picker {
|
||||
line-height: 38px;
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-calendar-picker-input {
|
||||
height: 38px;
|
||||
}
|
||||
.box-input .ant-calendar-picker-input {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-input-number-input-wrap {
|
||||
line-height: 38px;
|
||||
height: 38px;
|
||||
}
|
||||
.box-input .ant-input-number-input-wrap {
|
||||
line-height: 38px;
|
||||
height: 38px;
|
||||
}
|
||||
</style>
|
||||
<style scoped>
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
/*align-items: center;*/
|
||||
}
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
/*align-items: center;*/
|
||||
}
|
||||
|
||||
.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: 48px;
|
||||
}
|
||||
.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: 48px;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
height: 38px;
|
||||
width: 100%;
|
||||
}
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
height: 38px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.itemModel {
|
||||
width: calc(100% - 130px);
|
||||
display: inline-block;
|
||||
margin-top: 2px;
|
||||
}
|
||||
.itemModel {
|
||||
width: calc(100% - 130px);
|
||||
display: inline-block;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.Required {
|
||||
color: red;
|
||||
margin-right: 4px;
|
||||
}
|
||||
.Required {
|
||||
color: red;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.title-text-text {
|
||||
margin-top: 9px;
|
||||
}
|
||||
.title-text-text {
|
||||
margin-top: 9px;
|
||||
}
|
||||
|
||||
|
||||
.formAdd {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
.formAdd {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
|
||||
.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;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.ant-input-disabled {
|
||||
color: rgba(0, 0, 0, 0.65) !important;
|
||||
}
|
||||
.ant-input-disabled {
|
||||
color: rgba(0, 0, 0, 0.65) !important;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user