3 次代碼提交 d211af1d85 ... eebce87003

作者 SHA1 備註 提交日期
  dongfeng eebce87003 Merge remote-tracking branch 'origin/qirui-v2' into qirui-v2 10 月之前
  dongfeng feaf463b55 Merge remote-tracking branch 'origin/qirui-v2' into qirui-v2 10 月之前
  dongfeng 498b47f1c3 项目DVP编制-计划页面 新建 编辑弹窗 10 月之前

+ 14 - 0
src/locales/lang/en-US/dvpPlan.js

@@ -19,4 +19,18 @@ export default {
     'plan.dvp.collapse':'Collapse',
     'plan.dvp.test-type': 'Test type',
     'plan.dvp.quantity': 'Quantity',
+    'plan.dvp.create-dvp': 'Create DVP',
+    'plan.dvp.edit-dvp': 'Edit DVP',
+    'plan.dvp.number-of-vehicles': 'Number of vehicles',
+    'plan.dvp.project-node': 'Project node',
+    'plan.dvp.please_select-number-of-vehicles': 'Please select number of vehicles',
+    'plan.dvp.please_enter-description-of-the-vehicle-status': 'Please enter description of the vehicle status',
+    'plan.dvp.please_enter-test-location': 'Please enter test location',
+    'plan.dvp.please_select-test-type': 'Please select test type',
+    'plan.dvp.please_select-project-node': 'Please select project node',
+    'plan.dvp.please_select-study-director': 'Please select study director',
+    'plan.dvp.please_select-sample-vehicle-plan-delivery-time': 'Please select sample vehicle plan delivery time',
+    'plan.dvp.please_select-scheduled-start-time': 'Please select scheduled start time',
+    'plan.dvp.please_select-scheduled-end-time': 'Please select scheduled end time',
+    'plan.dvp.please_enter-description-of-the-purpose-of-the-test-vehicle': 'Please enter description of the purpose of the test vehicle',
 }

+ 4 - 1
src/locales/lang/en-US/globalBtn.js

@@ -27,6 +27,7 @@ export default {
     'global-btn.ok': 'Ok',
     'global-btn.release': 'Release',
     'global-btn.submit-approval': 'Submit approval',
+    'global-btn.new': 'New',
 
     'global-btn.return': 'Return',
     'global-btn.download-template': 'Download Template',
@@ -53,5 +54,7 @@ export default {
     'global-btn.please-select': 'Please select',
     /** 表格:共计条数 */
     'global-constant.table.show-total': 'A total of {total} data',
-    'global-constant.operation': 'operation'
+    'global-constant.operation': 'operation',
+    'global-constant.please-enter': 'Please enter',
+    'global-constant.please-select': 'Please select',
 }

+ 15 - 2
src/locales/lang/zh-CN/dvpPlan.js

@@ -19,5 +19,18 @@ export default {
     'plan.dvp.collapse':'收起',
     'plan.dvp.test-type': '试验类型',
     'plan.dvp.quantity': '数量',
-
-}
+    'plan.dvp.create-dvp': '新建DVP',
+    'plan.dvp.edit-dvp': '编辑DVP',
+    'plan.dvp.number-of-vehicles': '车辆数量',
+    'plan.dvp.project-node': '项目节点',
+    'plan.dvp.please_select-number-of-vehicles': '请选择车辆数量',
+    'plan.dvp.please_enter-description-of-the-vehicle-status': '请输入车辆状态描述',
+    'plan.dvp.please_enter-test-location': '请输入试验地点',
+    'plan.dvp.please_select-test-type': '请选择试验类型',
+    'plan.dvp.please_select-project-node': '请选择项目节点',
+    'plan.dvp.please_select-study-director': '请选择试验负责人',
+    'plan.dvp.please_select-sample-vehicle-plan-delivery-time': '请选择样车计划提供时间',
+    'plan.dvp.please_select-scheduled-start-time': '请选择计划开始时间',
+    'plan.dvp.please_select-scheduled-end-time': '请选择计划结束时间',
+    'plan.dvp.please_enter-description-of-the-purpose-of-the-test-vehicle': '请输入试验车用途描述',
+}

+ 4 - 1
src/locales/lang/zh-CN/globalBtn.js

@@ -30,6 +30,7 @@ export default {
     'global-btn.ok': '确定',
     'global-btn.release': '发布',
     'global-btn.submit-approval': '提交审批',
+    'global-btn.new': '新建',
 
     'global-btn.return': '返回',
     'global-btn.download-template': '下载模版',
@@ -53,5 +54,7 @@ export default {
     'global-btn.please-select': '请选择',
     /** 表格:共计条数 */
     'global-constant.table.show-total': '共 {total} 条数据',
-    'global-constant.operation': '操作'
+    'global-constant.operation': '操作',
+    'global-constant.please-enter': '请输入',
+    'global-constant.please-select': '请选择',
 }

+ 4 - 0
src/providers/http.js

@@ -500,5 +500,9 @@ export const api = {
     // dvp编制-基本信息初始化
     initDvpBasicInformation: function (paramObj) {
         return fetch('/DFMEA/dvp/fullVehicle/getDvpBasicInformation', paramObj);
+    },
+    // dvp编制-计划页试验数据编辑初始化
+    editDvpTestInit: function (paramObj) {
+        return post('/DFMEA/dvp/fullVehicle/editDvpTestDetailInit', paramObj);
     }
 };

+ 411 - 0
src/views/fullVehicle/dvpPlan/AddModal/addDvpTest.vue

@@ -0,0 +1,411 @@
+<template>
+	<a-modal
+		:title="permissionFlag === 1 ? $t('plan.dvp.create-dvp')
+		: permissionFlag === 2 ? $t('plan.dvp.edit-dvp') : ''"
+		:visible="addFlag"
+		:width="800"
+		@ok="save"
+		@cancel="closeModal"
+		:footer="null"
+	>
+		<div>
+			<a-form layout='vertical'>
+				<a-row :gutter='24'>
+					<a-col :md="12" :sm="12">
+						<a-form-item :label="$t('plan.dvp.vehicle-performance-module')">
+							<a-input disabled v-model="performanceModule" :maxLength="128"/>
+						</a-form-item>
+					</a-col>
+          <a-col :md="12" :sm="12">
+            <a-form-item :required='true' :label="$t('plan.dvp.description-of-the-purpose-of-the-test-vehicle')">
+              <a-input v-model="addFormData.vehicleUse" :maxLength="128" :placeholder="$t('plan.dvp.please_enter-description-of-the-purpose-of-the-test-vehicle')"/>
+            </a-form-item>
+          </a-col>
+				</a-row>
+				<a-row :gutter='24'>
+          <a-col :md="12" :sm="12">
+            <a-form-item :required='true' :label="$t('plan.dvp.test-type')">
+              <a-select allowClear v-model="addFormData.testType" :options="testTypeList" @change="handleTestType" :placeholder="$t('plan.dvp.please_select-test-type')">
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="12" :sm="12">
+            <a-form-item :required='true' :label="$t('plan.dvp.description-of-the-vehicle-status')">
+              <a-input v-model="addFormData.vehicleState" :maxLength="128" :placeholder="$t('plan.dvp.please_enter-description-of-the-vehicle-status')"/>
+            </a-form-item>
+          </a-col>
+				</a-row>
+				<a-row :gutter='24'>
+          <a-col :md="12" :sm="12">
+            <a-form-item :required='true' :label="$t('plan.dvp.number-of-vehicles')">
+              <a-select allowClear v-model="addFormData.count" :options="countList" @change="handleCount" :placeholder="$t('plan.dvp.please_select-number-of-vehicles')">
+
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col  :md='12' :sm='12'  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" :placeholder="$t('global-constant.please-select') + item.name">
+
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="12" :sm="12">
+            <a-form-item :required='true' :label="$t('plan.dvp.test-location')">
+              <a-input v-model="addFormData.testSite" :maxLength="128" :placeholder="$t('plan.dvp.please_enter-test-location')"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="12" :sm="12">
+            <a-form-item :required='true' :label="$t('plan.dvp.study-director')">
+              <a-select allowClear v-model="addFormData.testOwner" :options="testOwnerList" @change="handleTestOwner" :placeholder="$t('plan.dvp.please_select-study-director')">
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="12" :sm="12">
+            <a-form-item :required='true' :label="$t('plan.dvp.project-node')">
+              <a-select allowClear v-model="addFormData.projectNode" :options="projectNodeList" @change="handleProjectNode" :placeholder="$t('plan.dvp.please_select-project-node')">
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="12" :sm="12">
+            <a-form-item :required='true' :label="$t('plan.dvp.sample-vehicle-plan-delivery-time')">
+              <a-date-picker v-model="addFormData.prototypePlanTime" style="width: 100%" allowClear @change="handlePlanTime" :placeholder="$t('plan.dvp.please_select-sample-vehicle-plan-delivery-time')"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="12" :sm="12">
+            <a-form-item :required='true' :label="$t('plan.dvp.scheduled-start-time')">
+              <a-date-picker v-model="addFormData.planStartTime" style="width: 100%" allowClear @change="handleStartTime" :placeholder="$t('plan.dvp.please_select-scheduled-start-time')"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="12" :sm="12">
+            <a-form-item :required='true' :label="$t('plan.dvp.scheduled-end-time')">
+              <a-date-picker v-model="addFormData.planEndTime" style="width: 100%" allowClear @change="handleEndTime" :placeholder="$t('plan.dvp.please_select-scheduled-end-time')"/>
+            </a-form-item>
+          </a-col>
+				</a-row>
+			</a-form>
+			<div slot="footer"
+                 v-if="permissionFlag !== 3"
+                 class="mt10 text-right">
+				<a-button @click="closeModal">
+					{{ $t('global-btn.cancel') }}
+				</a-button>
+				<a-button
+					type="primary"
+					class="ml10"
+					@click="save()"
+					v-preventReClick>
+					{{ $t('global-btn.confirm') }}
+				</a-button>
+			</div>
+		</div>
+	</a-modal>
+</template>
+
+<script>
+export default {
+	name: "AddDvpTest",
+	components: {},
+	props: {
+		addFlag: {
+			type: Boolean,
+			default: false
+		},
+		addFormData: {
+			type: Object,
+			default() {
+				return {
+          testId: undefined, // 试验id
+          vehicleUse: undefined, // 试验车用途描述
+          testType: undefined, // 试验类型
+          vehicleState: undefined, // 车辆状态
+          count: undefined, // 车辆数量
+          testSite: undefined, // 试验地点
+          testOwner: undefined, // 试验负责人
+          projectNode: undefined, // 节点
+          prototypePlanTime: undefined, // 样车计划提供时间
+          planStartTime: undefined, // 计划开始时间
+          planEndTime: undefined, // 计划结束时间
+          columnDataModel: [] // 下拉选数据
+				};
+			}
+		},
+    performanceModule: {
+      type: String,
+      default: undefined
+    },
+    dvpId: {
+      type: Number,
+      default: 0
+    },
+		permissionFlag: {
+			type: Number,
+			default: 1
+		}
+	},
+	data() {
+		return {
+			// 功能库功能类型下拉选择
+			functionTypeList: [],
+      selectDataList: [],
+      testTypeList: [
+        {
+          label: "Mule car",
+          value: "0"
+        },
+        {
+          label: "摸底",
+          value: "1"
+        },
+        {
+          label: "调校",
+          value: "2"
+        },
+        {
+          label: "验收",
+          value: "3"
+        },
+        {
+          label: "一致性",
+          value: "4"
+        }
+      ],
+      countList: [],
+      testOwnerList: [],
+      projectNodeList: [],
+      /** 动态下拉选框 选中数据存储 */
+      searchSelectData: {},
+		};
+	},
+	watch: {
+		// 初始化参数:功能编号
+		addFormData(addFormData) {
+			this.addFormData.vehicleUse = addFormData.vehicleUse;
+			this.addFormData.testType = addFormData.testType;
+			this.addFormData.vehicleState = addFormData.vehicleState;
+			this.addFormData.count = addFormData.count;
+			this.addFormData.testSite = addFormData.testSite;
+			this.addFormData.testOwner = addFormData.testOwner;
+			this.addFormData.projectNode = addFormData.node;
+      this.addFormData.prototypePlanTime = addFormData.prototypePlanTime;
+      this.addFormData.planStartTime = addFormData.planStartTime;
+      this.addFormData.planEndTime = addFormData.planEndTime;
+      this.addFormData.columnDataModel = addFormData.columnDataModel;
+		}
+	},
+	mounted() {
+  },
+	methods: {
+    initSearchSelectData() {
+      let searchData = this.addFormData.columnDataModel;
+      if (searchData && searchData.length > 0) {
+        searchData.forEach(item => {
+          this.searchSelectData[item.columnId] = item.columnValueId
+        });
+      }
+    },
+    /**
+     * 初始化下拉选数据
+     */
+    initSelectList(dvpId){
+      let data = {
+        dvpId: dvpId
+      };
+      this.$api.initSelectList(data).then(res => {
+        if (res.flag){
+          let selectList = res.data;
+          if (selectList && selectList.length > 0) {
+            selectList.forEach(item => {
+              let config = item.configOption;
+              let selectData = {}
+              selectData.id = item.id;
+              selectData.name = item.name;
+              selectData.configData = [];
+              if (config && config.length > 0) {
+                config.forEach(eachData => {
+                  let eachOption = {}
+                  eachOption.key = eachData.id;
+                  eachOption.value = eachData.id;
+                  eachOption.label = eachData.name;
+                  selectData.configData.push(eachOption);
+                })
+              };
+              this.selectDataList.push(selectData);
+              this.initSearchSelectData();
+            })
+          };
+        }
+      });
+    },
+		/**
+		 * 关闭模态框
+		 */
+		closeModal() {
+			this.$emit("closeModal");
+      this.selectDataList = [];
+      this.searchSelectData = {};
+		},
+		/**
+		 * 非空校验 判断是否为空
+		 * @returns {boolean}
+		 */
+		isNull() {
+			let _this = this;
+			let message = [];
+			if (!_this.addFormData.vehicleUse) {
+				message.push(_this.$t('global-constant.please-enter') + _this.$t('plan.dvp.description-of-the-purpose-of-the-test-vehicle'));
+			}
+			if (!_this.addFormData.vehicleState) {
+				message.push(_this.$t('global-constant.please-enter') + _this.$t('plan.dvp.description-of-the-vehicle-status'));
+			}
+			if (!_this.addFormData.testType) {
+				message.push(_this.$t('global-constant.please-select') + _this.$t('plan.dvp.test-type'));
+			}
+			if (!_this.addFormData.count) {
+				message.push(_this.$t('global-constant.please-select') + _this.$t('plan.dvp.number-of-vehicles'));
+			}
+      if (!_this.addFormData.testSite) {
+        message.push(_this.$t('global-constant.please-enter') + _this.$t('plan.dvp.test-location'));
+      }
+      if (!_this.addFormData.testOwner) {
+        message.push(_this.$t('global-constant.please-select') + _this.$t('plan.dvp.study-director'));
+      }
+      if (!_this.addFormData.testOwner) {
+        message.push(_this.$t('global-constant.please-select') + _this.$t('plan.dvp.project-node'));
+      }
+      if (!_this.addFormData.testOwner) {
+        message.push(_this.$t('global-constant.please-select') + _this.$t('plan.dvp.sample-vehicle-plan-delivery-time'));
+      }
+      if (!_this.addFormData.testOwner) {
+        message.push(_this.$t('global-constant.please-select') + _this.$t('plan.dvp.scheduled-start-time'));
+      }
+      if (!_this.addFormData.testOwner) {
+        message.push(_this.$t('global-constant.please-select') + _this.$t('plan.dvp.scheduled-end-time'));
+      }
+			if (message && message.length > 0) {
+				for (let i = 0; i < message.length; i++) {
+					_this.$notification.warning({message: message[i]});
+				}
+				return false;
+			}
+			return true;
+		},
+		/**
+		 * 新建/编辑 保存
+		 * @returns {boolean}
+		 */
+		save() {
+			let _this = this;
+			if (!_this.isNull()) {
+				return false;
+			}
+			_this.tableLoading = true;
+			let data = {
+				functionId: _this.addFormData.functionId,
+				functionNo: _this.addFormData.functionNo,
+				functionName: _this.addFormData.functionName,
+				requireName: _this.addFormData.requireName,
+				nodeTypeId: _this.addFormData.nodeTypeId,
+				cpacId: _this.addFormData.cpacId,
+				versionNo: _this.addFormData.versionNo
+			};
+			// 新建
+			if (_this.permissionFlag === 1) {
+				_this.$api.createFunction(data).then(res => {
+					if (res.flag) {
+						_this.$message.success(this.$t('fmeamanager.operation-succeeded'), 1);
+            _this.closeModal();
+						_this.$emit("initData");
+					} else {
+						_this.$notification.error({message: res.message});
+					}
+				}).finally(() => {
+					_this.tableLoading = false;
+				});
+			} else if (_this.permissionFlag === 2) {
+				// 编辑
+				_this.$api.editSaveFunction(data).then(res => {
+					if (res.flag) {
+						_this.$message.success(this.$t('fmeamanager.operation-succeeded'), 1);
+						_this.closeModal();
+						_this.$emit("initData");
+					} else {
+						_this.addFormData.functionNo = res.data.functionNo;
+						_this.addFormData.functionName = res.data.functionName;
+						_this.addFormData.cpacId = res.data.cpacId;
+						_this.addFormData.nodeTypeId = res.data.nodeTypeId;
+						_this.addFormData.requireName = res.data.requireName;
+						_this.addFormData.versionNo = res.data.versionNo;
+						_this.$forceUpdate();
+						_this.$notification.error({message: res.message});
+					}
+				}).finally(() => {
+					_this.tableLoading = false;
+				});
+			}
+		},
+    /**
+     * 试验类型下拉改变
+     */
+    handleTestType(val) {
+      this.addFormData.testType = val;
+    },
+    /**
+     * 车辆数量下拉改变
+     * @param val
+     */
+    handleCount(val) {
+      this.addFormData.count = val;
+    },
+    /**
+     * 试验负责人下拉改变
+     * @param val
+     */
+    handleTestOwner(val) {
+      this.addFormData.testOwner = val;
+    },
+    /**
+     * 项目节点下拉改变
+     * @param val
+     */
+    handleProjectNode(val) {
+      this.addFormData.projectNode = val;
+    },
+    /**
+     * 样车提供时间 时间选择器Change方法
+     */
+    handlePlanTime(date, dateString){
+      if (!dateString) {
+        this.addFormData.prototypePlanTime = "";
+        return;
+      }
+      this.addFormData.prototypePlanTime = dateString;
+    },
+    /**
+     * 计划开始时间 时间选择器Change方法
+     */
+    handleStartTime(date, dateString){
+      if (!dateString) {
+        this.addFormData.planStartTime = "";
+        return;
+      }
+      this.addFormData.planStartTime = dateString;
+    },
+    /**
+     * 计划结束时间 时间选择器Change方法
+     */
+    handleEndTime(date, dateString){
+      if (!dateString) {
+        this.addFormData.planEndTime = "";
+        return;
+      }
+      this.addFormData.planEndTime = dateString;
+    },
+	}
+};
+</script>
+<style lang='less' scoped>
+.text-right {
+	text-align: right;
+}
+</style>

+ 121 - 82
src/views/fullVehicle/dvpPlan/index.vue

@@ -1,4 +1,5 @@
 <template>
+  <div>
   <a-row class="content-box">
     <a-card class="layoutCard">
       <a-form layout='vertical'>
@@ -53,11 +54,7 @@
             <!--节点-->
           <a-col :xl='6' :lg='6' :md='24' :sm='24' :xs='24'>
             <a-form-item :label="$t('plan.dvp.panel-point')">
-             <a-input
-               allowClear
-               :maxLength='50'
-               v-model.trim="formData.projectNode"
-               :placeholder="$t('plan.dvp.please-enter-panel-point')"/>
+             <a-input allowClear :maxLength='50' v-model.trim="formData.projectNode"/>
             </a-form-item>
           </a-col>
             <!--样车计划提供时间-->
@@ -79,85 +76,87 @@
             </a-form-item>
           </a-col>
           </span>
-        </a-row>
-        <a-row :gutter="24">
-          <a-form-item class='tr' :label="'\xa0'">
-            <a-col :xl='24' :lg='24' :md='24' :sm='24' :xs='24'>
-              <!-- 展开/收起 -->
-              <a @click="toggleAdvance">
-                {{ advanceExpand ? $t('plan.dvp.collapse') : $t('plan.dvp.expand') }}
-                <a-icon :type="advanceExpand ? 'up' : 'down'"/>
+          </a-row>
+          <a-row :gutter="24">
+            <a-form-item class='tr' :label="'\xa0'">
+              <a-col :xl='24' :lg='24' :md='24' :sm='24' :xs='24'>
+                <!-- 展开/收起 -->
+                <a @click="toggleAdvance">
+                  {{ advanceExpand ? $t('plan.dvp.collapse') : $t('plan.dvp.expand') }}
+                  <a-icon :type="advanceExpand ? 'up' : 'down'"/>
+                </a>
+                <!-- 重置 -->
+                <a-button @click='reset' type="primary" class="mr10">
+                  {{ $t('global-btn.reset') }}
+                </a-button>
+                <!-- 查询 -->
+                <a-button @click='search' type="primary" class="mr10">
+                  {{ $t('global-btn.search') }}
+                </a-button>
+              </a-col>
+            </a-form-item>
+          </a-row>
+        </a-form>
+      </a-card>
+      <a-card class="layoutCard" :style="{ height: tableHeight }">
+        <a-form-item class='tr' >
+          <!-- 新建 -->
+          <a-button @click='saveDvpPlan' type="primary" class="mr10">
+            {{ $t('global-btn.new') }}
+          </a-button>
+          <!-- 导入 -->
+          <a-button disabled @click='importFile' type="primary" class="mr10">
+            {{ $t('global-btn.import') }}
+          </a-button>
+          <!-- 导出 -->
+          <a-button disabled @click='exportFile'>
+            {{ $t('global-btn.export') }}
+          </a-button>
+        </a-form-item>
+        <a-table
+            size="small"
+            :columns='tableColumns'
+            :dataSource='tableData'
+            :rowKey='(record, index) => { return index; }'
+            :scroll='{ x: 1850, y: tableHeightValue }'
+            :pagination='pagination'
+            :loading='tableLoading'
+            @change='handlePageChange'
+        >
+          <!-- 序号列 -->
+          <template slot='index' slot-scope='text, record, index'>
+            <span>{{ (pagination.current - 1) * pagination.pageSize + index + 1 }}</span>
+          </template>
+          <template slot="action" slot-scope="text, record">
+            <span>
+              <!-- 编辑 -->
+              <a class='operation-btn ml16' @click='editDvpTest(record)'>
+                <a-tooltip :title="$t('global-btn.edit')">
+                  <i class="iconfont iconicon-bainji"></i>
+                </a-tooltip>
               </a>
-              <!-- 重置 -->
-              <a-button @click='reset' type="primary" class="mr10">
-                {{ $t('global-btn.reset') }}
-              </a-button>
-              <!-- 查询 -->
-              <a-button @click='search' type="primary" class="mr10">
-                {{ $t('global-btn.search') }}
-              </a-button>
-            </a-col>
-          </a-form-item>
-        </a-row>
-      </a-form>
-    </a-card>
-    <a-card class="layoutCard" :style="{ height: tableHeight }">
-      <a-form-item class='tr' >
-        <!-- 新建 -->
-        <a-button @click='saveDvpPlan' type="primary" class="mr10">
-          {{ $t('global-btn.reset') }}
-        </a-button>
-        <!-- 导入 -->
-        <a-button @click='importFile' type="primary" class="mr10">
-          {{ $t('global-btn.import') }}
-        </a-button>
-        <!-- 导出 -->
-        <a-button @click='exportFile'>
-          {{ $t('global-btn.export') }}
-        </a-button>
-      </a-form-item>
-      <a-table
-          size="small"
-          :columns='tableColumns'
-          :dataSource='tableData'
-          :rowKey='(record, index) => { return index; }'
-          :scroll='{ x: 1850, y: tableHeightValue }'
-          :pagination='pagination'
-          :loading='tableLoading'
-          @change='handlePageChange'
-      >
-        <!-- 序号列 -->
-        <template slot='index' slot-scope='text, record, index'>
-          <span>{{ (pagination.current - 1) * pagination.pageSize + index + 1 }}</span>
-        </template>
-        <template slot="action" slot-scope="text, record">
-          <span>
-            <!-- 编辑 -->
-            <a
-                href='javascript:'
-                @click='update(record)'
-            >
-              <a-tooltip :title="$t('workbench.edit')">
-                <i class="iconfont iconicon-bainji"></i>
-              </a-tooltip>
-            </a>
-            <a class='operation-btn ml16' @click="deleteDvpData(record)">
-              <!-- 删除 -->
-              <a-tooltip :title="$t('workbench.delete')">
-                <i class="iconfont iconshanchu"></i>
-              </a-tooltip>
-            </a>
-          </span>
-        </template>
-      </a-table>
-    </a-card>
-  </a-row>
-
+              <a class='operation-btn' @click="deleteDvpData(record)">
+                <!-- 删除 -->
+                <a-tooltip :title="$t('global-btn.delete')">
+                  <i class="iconfont iconshanchu"></i>
+                </a-tooltip>
+              </a>
+            </span>
+          </template>
+        </a-table>
+      </a-card>
+    </a-row>
+    <AddDvpTest :addFlag="addFlag" :permissionFlag="permissionFlag" :addFormData="addFormData" :performanceModule="performanceModule" @closeModal="closeModal" ref="addDvpTest" ></AddDvpTest>
+  </div>
 </template>
 
 <script>
 
+
+import AddDvpTest from "./AddModal/addDvpTest";
+
 export default {
+  components: {AddDvpTest},
   data() {
     return{
       /** 下拉选数据集合 根据后端返回数据生成对应的下拉选 */
@@ -334,13 +333,19 @@ export default {
         //操作
         {
           title: this.$t('global-constant.operation'),
-          // dataIndex: 'quantity',
           align: 'center',
           width: 100,
+          fixed: 'right',
           scopedSlots: {customRender: 'action'},
           ellipsis: true
         }
-      ]
+      ],
+      /** 新建弹窗标识 */
+      addFlag: false,
+      dvpId: 0,
+      performanceModule: undefined,
+      permissionFlag: 0,
+      addFormData: {}
     }
   },
   mounted() {
@@ -440,7 +445,17 @@ export default {
      * 新建DVP计划试验数据
      */
     saveDvpPlan() {
-
+      this.addFlag = true;
+      this.permissionFlag = 1;
+      this.performanceModule = this.tableData[0].performanceModule;
+      this.$refs.addDvpTest.initSelectList(parseInt(getUrlParam("dvpId")));
+    },
+    /**
+     * 关闭模态框
+     */
+    closeModal() {
+      this.addFlag = false;
+      this.addFormData = {};
     },
     /**
      * 导入
@@ -594,7 +609,31 @@ export default {
      * 编辑dvp计划试验数据
      * @param data
      */
-    update(data) {
+    editDvpTest(record) {
+      let data = {
+        dvpId: this.$store.getters.dvpId,
+        testId: record.testId
+      }
+      this.$api.editDvpTestInit(data).then(res => {
+        if (res.flag) {
+          this.addFormData.testId = res.data.dvpFullVehiclePlanInitModel.testId;
+          this.addFormData.vehicleUse = res.data.dvpFullVehiclePlanInitModel.vehicleUse;
+          this.addFormData.testType = res.data.dvpFullVehiclePlanInitModel.testType;
+          this.addFormData.vehicleState = res.data.dvpFullVehiclePlanInitModel.vehicleState;
+          this.addFormData.count = res.data.dvpFullVehiclePlanInitModel.count;
+          this.addFormData.testSite = res.data.dvpFullVehiclePlanInitModel.testSite;
+          this.addFormData.testOwner = res.data.dvpFullVehiclePlanInitModel.testOwner;
+          this.addFormData.projectNode = res.data.dvpFullVehiclePlanInitModel.node;
+          this.addFormData.prototypePlanTime = res.data.dvpFullVehiclePlanInitModel.prototypePlanTime;
+          this.addFormData.planStartTime = res.data.dvpFullVehiclePlanInitModel.planStartTime;
+          this.addFormData.planEndTime = res.data.dvpFullVehiclePlanInitModel.planEndTime;
+          this.addFormData.columnDataModel = res.data.dvpFullVehiclePlanInitModel.columnDataModel;
+          this.addFlag = true;
+          this.permissionFlag = 2;
+          this.performanceModule = record.performanceModule;
+          this.$refs.addDvpTest.initSelectList(parseInt(getUrlParam("dvpId")));
+        }
+      });
 
     }
   }