|
@@ -1,40 +1,54 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <a-row class="content-box">
|
|
|
- <a-card class="layoutCard">
|
|
|
- <a-form layout='vertical'>
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :xl='6' :lg='6' :md='12' :sm='24' :xs='24'>
|
|
|
- <a-form-item :label="$t('plan.dvp.description-of-the-purpose-of-the-test-vehicle')">
|
|
|
- <a-input>
|
|
|
-
|
|
|
- </a-input>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :xl='6' :lg='6' :md='12' :sm='24' :xs='24'>
|
|
|
- <a-form-item :label="$t('plan.dvp.description-of-the-vehicle-status')">
|
|
|
- <a-input>
|
|
|
-
|
|
|
- </a-input>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :xl='6' :lg='6' :md='12' :sm='24' :xs='24' v-for="(item,index) in selectDataList">
|
|
|
- <a-form-item :label="item.name">
|
|
|
- <a-select allowClear v-model="searchSelectData[item.id]" :options="item.configData" :key="index" >
|
|
|
-
|
|
|
- </a-select>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <span v-show="advanceExpand">
|
|
|
+ <a-row class="content-box">
|
|
|
+ <a-card class="layoutCard">
|
|
|
+ <a-form layout='vertical'>
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <!--试验车用途描述-->
|
|
|
+ <a-col :xl='6' :lg='6' :md='12' :sm='24' :xs='24'>
|
|
|
+ <a-form-item :label="$t('plan.dvp.description-of-the-purpose-of-the-test-vehicle')">
|
|
|
+ <a-input
|
|
|
+ allowClear
|
|
|
+ :maxLength='500'
|
|
|
+ v-model.trim="formData.vehicleUse"
|
|
|
+ :placeholder="$t('plan.dvp.please-enter-description-of-the-purpose-of-the-test-vehicle')"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <!--车辆状态描述-->
|
|
|
+ <a-col :xl='6' :lg='6' :md='12' :sm='24' :xs='24'>
|
|
|
+ <a-form-item :label="$t('plan.dvp.description-of-the-vehicle-status')">
|
|
|
+ <a-input
|
|
|
+ allowClear
|
|
|
+ :maxLength='500'
|
|
|
+ v-model.trim="formData.vehicleState"
|
|
|
+ :placeholder="$t('plan.dvp.please-enter-description-of-the-vehicle-status')"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <!--动态下拉选框-->
|
|
|
+ <a-col :xl='6' :lg='6' :md='12' :sm='24' :xs='24' v-for="(item,index) in selectDataList" :key="index" >
|
|
|
+ <a-form-item :label="item.name">
|
|
|
+ <a-select allowClear v-model="searchSelectData[item.id]" :options="item.configData" :key="index"></a-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <span v-show="advanceExpand">
|
|
|
+ <!--试验地点-->
|
|
|
<a-col :xl='6' :lg='6' :md='12' :sm='24' :xs='24'>
|
|
|
<a-form-item :label="$t('plan.dvp.test-location')">
|
|
|
- <a-input allowClear :maxLength='50' v-model.trim="formData.testSite"/>
|
|
|
+ <a-input
|
|
|
+ allowClear
|
|
|
+ :maxLength='50'
|
|
|
+ v-model.trim="formData.testSite"
|
|
|
+ :placeholder="$t('plan.dvp.please-enter-test-location')"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<!--试验负责人-->
|
|
|
<a-col :xl='6' :lg='6' :md='24' :sm='24' :xs='24'>
|
|
|
<a-form-item :label="$t('plan.dvp.study-director')">
|
|
|
- <a-input allowClear :maxLength='50' v-model.trim="formData.testOwner"/>
|
|
|
+ <a-input
|
|
|
+ allowClear
|
|
|
+ :maxLength='50'
|
|
|
+ v-model.trim="formData.testOwner"
|
|
|
+ :placeholder="$t('plan.dvp.please-enter-study-director')"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<!--节点-->
|
|
@@ -140,7 +154,6 @@
|
|
|
|
|
|
|
|
|
import AddDvpTest from "./AddModal/addDvpTest";
|
|
|
-import { getUrlParam } from "@/common/common";
|
|
|
|
|
|
export default {
|
|
|
components: {AddDvpTest},
|
|
@@ -215,6 +228,7 @@ export default {
|
|
|
tableData: [],
|
|
|
/** 表格列 */
|
|
|
tableColumns: [
|
|
|
+ //序号
|
|
|
{
|
|
|
title: this.$t('plan.dvp.serial-number'),
|
|
|
width: 50,
|
|
@@ -225,6 +239,7 @@ export default {
|
|
|
},
|
|
|
ellipsis: true
|
|
|
},
|
|
|
+ //性能模块
|
|
|
{
|
|
|
title: this.$t('plan.dvp.vehicle-performance-module'),
|
|
|
dataIndex: 'performanceModule',
|
|
@@ -232,6 +247,7 @@ export default {
|
|
|
// width: 100,
|
|
|
ellipsis: true
|
|
|
},
|
|
|
+ //试验车用途描述
|
|
|
{
|
|
|
title: this.$t('plan.dvp.description-of-the-purpose-of-the-test-vehicle'),
|
|
|
dataIndex: 'vehicleUse',
|
|
@@ -239,6 +255,7 @@ export default {
|
|
|
// width: 100,
|
|
|
ellipsis: true
|
|
|
},
|
|
|
+ //试验类型
|
|
|
{
|
|
|
title: this.$t('plan.dvp.test-type'),
|
|
|
dataIndex: 'testType',
|
|
@@ -246,6 +263,7 @@ export default {
|
|
|
// width: 100,
|
|
|
ellipsis: true
|
|
|
},
|
|
|
+ //车辆状态描述
|
|
|
{
|
|
|
title: this.$t('plan.dvp.description-of-the-vehicle-status'),
|
|
|
dataIndex: 'vehicleState',
|
|
@@ -253,6 +271,7 @@ export default {
|
|
|
// width: 100,
|
|
|
ellipsis: true
|
|
|
},
|
|
|
+ //数量
|
|
|
{
|
|
|
title: this.$t('plan.dvp.quantity'),
|
|
|
dataIndex: 'count',
|
|
@@ -263,6 +282,7 @@ export default {
|
|
|
],
|
|
|
/** 表格固定部分数据 */
|
|
|
tableRightColumns: [
|
|
|
+ //试验地点
|
|
|
{
|
|
|
title: this.$t('plan.dvp.test-location'),
|
|
|
dataIndex: 'testSite',
|
|
@@ -270,6 +290,7 @@ export default {
|
|
|
// width: 150,
|
|
|
ellipsis: true
|
|
|
},
|
|
|
+ //试验负责人
|
|
|
{
|
|
|
title: this.$t('plan.dvp.study-director'),
|
|
|
dataIndex: 'testOwner',
|
|
@@ -277,6 +298,7 @@ export default {
|
|
|
// width: 150,
|
|
|
ellipsis: true
|
|
|
},
|
|
|
+ //节点
|
|
|
{
|
|
|
title: this.$t('plan.dvp.panel-point'),
|
|
|
dataIndex: 'node',
|
|
@@ -284,6 +306,7 @@ export default {
|
|
|
// width: 150,
|
|
|
ellipsis: true
|
|
|
},
|
|
|
+ //样车计划提供时间
|
|
|
{
|
|
|
title: this.$t('plan.dvp.sample-vehicle-plan-delivery-time'),
|
|
|
dataIndex: 'prototypePlanTime',
|
|
@@ -291,6 +314,7 @@ export default {
|
|
|
// width: 150,
|
|
|
ellipsis: true
|
|
|
},
|
|
|
+ //计划开始时间
|
|
|
{
|
|
|
title: this.$t('plan.dvp.scheduled-start-time'),
|
|
|
dataIndex: 'planStartTime',
|
|
@@ -298,6 +322,7 @@ export default {
|
|
|
// width: 150,
|
|
|
ellipsis: true
|
|
|
},
|
|
|
+ //计划结束时间
|
|
|
{
|
|
|
title: this.$t('plan.dvp.scheduled-end-time'),
|
|
|
dataIndex: 'planEndTime',
|
|
@@ -305,6 +330,7 @@ export default {
|
|
|
// width: 150,
|
|
|
ellipsis: true
|
|
|
},
|
|
|
+ //操作
|
|
|
{
|
|
|
title: this.$t('global-constant.operation'),
|
|
|
align: 'center',
|
|
@@ -339,14 +365,19 @@ export default {
|
|
|
search() {
|
|
|
//判断动态下拉选是否有选中数据
|
|
|
if (this.searchSelectData) {
|
|
|
- let searchData = [];
|
|
|
- for (let i = 0; i < Object.keys(this.searchSelectData).length; i++) {
|
|
|
- let selectedDate = {}
|
|
|
- //keys 是下拉选框的id,区分是哪个下拉选框; value 是下拉选框选中项的id;
|
|
|
- selectedDate.configId = parseInt(Object.keys(this.searchSelectData)[i]);
|
|
|
- selectedDate.id = Object.values(this.searchSelectData)[i];
|
|
|
- searchData.push(selectedDate);
|
|
|
- }
|
|
|
+ let searchData = [];
|
|
|
+ for(let [key, value] of Object.entries(this.searchSelectData)){
|
|
|
+ let selectedDate = {};
|
|
|
+ //如果value没有值,就跳过这次循环,不将这个属性传给后端
|
|
|
+ if (value === undefined){
|
|
|
+ continue;
|
|
|
+ } else {
|
|
|
+ //keys 是下拉选框的id,区分是哪个下拉选框; value 是下拉选框选中项的id;
|
|
|
+ selectedDate.configId = parseInt(key);
|
|
|
+ selectedDate.id = value;
|
|
|
+ searchData.push(selectedDate);
|
|
|
+ }
|
|
|
+ }
|
|
|
//动态下拉选框选中数据,存进查询数据中
|
|
|
this.formData.dynamicConfig = searchData;
|
|
|
}
|
|
@@ -386,6 +417,7 @@ export default {
|
|
|
* 重置
|
|
|
*/
|
|
|
reset() {
|
|
|
+ this.searchSelectData = {};
|
|
|
this.planTime = undefined;
|
|
|
this.startTime = undefined;
|
|
|
this.endTime = undefined;
|
|
@@ -468,11 +500,11 @@ export default {
|
|
|
this.initData();
|
|
|
},
|
|
|
/**
|
|
|
- * 初始化下拉选数据
|
|
|
+ * 初始化动态下拉选框
|
|
|
*/
|
|
|
initSelectList(){
|
|
|
let data = {
|
|
|
- dvpId: getUrlParam("dvpId")
|
|
|
+ dvpId: this.$store.getters.dvpId
|
|
|
};
|
|
|
this.$api.initSelectList(data).then(res => {
|
|
|
if (res.flag){
|
|
@@ -504,7 +536,7 @@ export default {
|
|
|
*/
|
|
|
initData() {
|
|
|
let _that = this;
|
|
|
- _that.formData.dvpId = getUrlParam("dvpId");
|
|
|
+ _that.formData.dvpId = _that.$store.getters.dvpId;
|
|
|
_that.$api.initDvpList(_that.formData).then(res => {
|
|
|
if (res.flag) {
|
|
|
//清除之前添加的表头,防止重复添加
|
|
@@ -559,6 +591,7 @@ export default {
|
|
|
tempData.planEndTime = item.planEndTime; // 计划结束时间
|
|
|
_that.tableData.push(tempData);
|
|
|
})
|
|
|
+ _that.pagination.total = res.data.total;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -577,9 +610,8 @@ export default {
|
|
|
* @param data
|
|
|
*/
|
|
|
editDvpTest(record) {
|
|
|
- console.log("!!!",record);
|
|
|
let data = {
|
|
|
- dvpId: getUrlParam("dvpId"),
|
|
|
+ dvpId: this.$store.getters.dvpId,
|
|
|
testId: record.testId
|
|
|
}
|
|
|
this.$api.editDvpTestInit(data).then(res => {
|
|
@@ -608,7 +640,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
-<style>
|
|
|
+<style lang="less" scoped>
|
|
|
.content-box {
|
|
|
padding: 0 12px;
|
|
|
}
|
|
@@ -616,4 +648,4 @@ export default {
|
|
|
.layoutCard {
|
|
|
padding: 12px;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|