Bläddra i källkod

Merge remote-tracking branch 'origin/qirui-v2' into qirui-v2

dongfeng 10 månader sedan
förälder
incheckning
e2997a7c4e

+ 8 - 0
.env.1081

@@ -0,0 +1,8 @@
+NODE_ENV=production
+
+VUE_APP_ENV=1081
+
+VUE_APP_PREVIEW=true
+VUE_APP_API_BASE_URL=/api
+
+VUE_APP_DDLogin=0

+ 12 - 0
.env.domainUat

@@ -0,0 +1,12 @@
+NODE_ENV=production
+
+VUE_APP_ENV=domainUat
+
+VUE_APP_PREVIEW=true
+VUE_APP_API_BASE_URL=/api
+VUE_APP_DDLogin=1
+
+VUE_APP_WatermarkJsUrl="http://wmk-pv.saicmotor.com"
+
+VUE_APP_Wmshost="wmk-pv.saicmotor.com:80"
+VUE_APP_Water_Name="dfmea-pv-网页水印"

+ 7 - 0
.env.fmea

@@ -0,0 +1,7 @@
+NODE_ENV=production
+
+VUE_APP_ENV=fmea
+
+VUE_APP_PREVIEW=true
+VUE_APP_API_BASE_URL=/api
+VUE_APP_DDLogin=1

+ 13 - 0
.env.local8080

@@ -0,0 +1,13 @@
+NODE_ENV=production
+
+VUE_APP_ENV=local8080
+
+VUE_APP_PREVIEW=true
+VUE_APP_API_BASE_URL=/api
+
+VUE_APP_DDLogin=0
+
+VUE_APP_WatermarkJsUrl="http://10.91.198.60"
+
+VUE_APP_Wmshost="10.91.198.60:8888"
+VUE_APP_Water_Name="dfmea-qa-网页水印"

+ 13 - 0
.env.production

@@ -0,0 +1,13 @@
+NODE_ENV=development
+
+VUE_APP_ENV=production
+
+VUE_APP_PREVIEW=false
+VUE_APP_API_BASE_URL=/api
+
+#访问水印js文件设置的变量
+VUE_APP_WatermarkJsUrl="http://wmk-pv.saicmotor.com"
+
+VUE_APP_Wmshost="wmk-pv.saicmotor.com:80"
+
+VUE_APP_Water_Name="dfmea-pv-网页水印"

+ 13 - 0
.env.test

@@ -0,0 +1,13 @@
+NODE_ENV=production
+
+VUE_APP_ENV=test
+
+VUE_APP_PREVIEW=true
+VUE_APP_API_BASE_URL=/api
+
+VUE_APP_DDLogin=0
+
+VUE_APP_WatermarkJsUrl="http://10.91.198.60"
+
+VUE_APP_Wmshost="10.91.198.60:8888"
+VUE_APP_Water_Name="dfmea-qa-网页水印"

+ 8 - 0
.env.test57_171_8080

@@ -0,0 +1,8 @@
+NODE_ENV=production
+
+VUE_APP_ENV=test57_171_8080
+
+VUE_APP_PREVIEW=true
+VUE_APP_API_BASE_URL=/api
+
+VUE_APP_DDLogin=0

+ 13 - 0
.env.test8080

@@ -0,0 +1,13 @@
+NODE_ENV=production
+
+VUE_APP_ENV=test8080
+
+VUE_APP_PREVIEW=true
+VUE_APP_API_BASE_URL=/api
+
+VUE_APP_DDLogin=0
+
+VUE_APP_WatermarkJsUrl="http://10.91.198.60"
+
+VUE_APP_Wmshost="10.91.198.60:8888"
+VUE_APP_Water_Name="dfmea-qa-网页水印"

+ 8 - 0
.env.uat

@@ -0,0 +1,8 @@
+NODE_ENV=production
+
+VUE_APP_ENV=uat
+
+VUE_APP_PREVIEW=true
+VUE_APP_API_BASE_URL=/api
+
+VUE_APP_DDLogin=0

+ 1 - 0
package.json

@@ -86,6 +86,7 @@
     "babel-core": "^6.26.3",
     "babel-loader": "^7.1.5",
     "babel-plugin-import": "^1.13.0",
+    "babel-plugin-transform-remove-console": "^6.9.4",
     "babel-polyfill": "^6.26.0",
     "babel-preset-env": "^1.7.0",
     "babel-preset-es2015": "^6.24.1",

+ 1 - 1
src/App.vue

@@ -311,7 +311,7 @@ export default {
 
     // 进度条切换事件
     onChange(val) {
-      if (val <= this.libStep || this.dvpType === "2"){
+      if (val <= this.libStep){
         this.stepsList.forEach(item => {
           item.background = 'transparent';
           item.status = 'wait';

+ 6 - 7
src/views/componentsDVP/baseInfo/baseInfo/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <a-card class="backCard">
+  <a-card class="back-card">
     <!-- 编辑 -->
     <a-button
       v-if="$api.btnPms && !isEdit"
@@ -18,7 +18,7 @@
       @click="doSave()">
         {{ $t('global-btn.save') }}
     </a-button>
-    <div class="pad12">
+    <div class="pad-12">
       <a-form layout="inline">
         <a-row :gutter="24">
           <!-- 项目编号 -->
@@ -145,7 +145,7 @@
               <span v-if="!isEdit" class="ml8">{{ baseInfo.partEngineer }}</span>
               <a-select
                 v-else
-                class="selectWidth"
+                class="select-width"
                 v-model="partsEngineer"
                 :filter-option="filterOption"
                 :options="engineerList"
@@ -228,7 +228,6 @@ export default {
         partEngineerId: this.partsEngineerId,
         dvpType: 2,
       };
-      console.log(this.baseInfo.materialsEngineerId)
       //保存基本信息-工程师
       this.$api.updateDvpBasicInformation(basicInfoData).then(res => {
         if (res.flag) {
@@ -284,17 +283,17 @@ export default {
 .ant-pro-basicLayout-content {
   margin: 10px;
 }
-.backCard {
+.back-card {
   border: hidden;
   border-radius: 0px;
 }
-.pad12 {
+.pad-12 {
   padding: 12px;
 }
 .mr-24 {
   margin-right: -24px;
 }
-.selectWidth {
+.select-width {
   width: 240px;
 }
 </style>

+ 1 - 1
src/views/componentsDVP/baseInfo/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="background" :style="{ height: dynamicHeight }">
-    <a-tabs  :activeKey='tabKey' @change="callback" tabPosition='left' size='large'>
+    <a-tabs  :activeKey='tabKey' @change="callback" destroyInactiveTabPane tabPosition='left' size='large'>
       <!-- 基本信息 -->
       <a-tab-pane :key="'1'" :tab="$t('base.info.baseInfo')">
         <div class='tab-card'>

+ 22 - 15
src/views/fullVehicle/baseInfo/baseInfo/index.vue

@@ -114,16 +114,23 @@
           <!-- 需求负责人 -->
           <a-col :xl="12" :lg="8" :md="12" :sm="24" :xs="24">
             <a-form-item :label="$t('base.info.requirement.owner')">
-              <span v-if="!isEdit" class="ml8">{{ ownerName }}</span>
+              <span v-if="!isEdit" class="ml8">{{ baseInfo.owner }}</span>
               <a-select
                 v-else
                 class="select-width"
-                v-model="baseInfo.owner"
+                v-model="owner"
                 :filter-option="filterOption"
-                :options="requirementOwnerList"
                 :placeholder="$t('base.info.please-choose-owner')"
-                showSearch>
+                showSearch
+                @change="changeOwner"
+              >
                 <a-icon slot="suffixIcon" type="search"/>
+                <a-select-option
+                  v-for="item in requirementOwnerList"
+                  :key="item.userId"
+                >
+                  {{ item.fullname }}
+                </a-select-option>
               </a-select>
             </a-form-item>
           </a-col>
@@ -155,7 +162,6 @@ export default {
       isEdit: false,      // 编辑标识
       owner: undefined,   // 责任人
       requirementOwnerList: [],      // 责任人字典
-      ownerName: undefined
     };
   },
   created() {},
@@ -173,7 +179,6 @@ export default {
       _that.$api.initDvpBasicInformation(data).then(res =>{
         if (res.flag){
           _that.baseInfo = res.data;
-          _that.ownerName = res.data.owner;
           //处理"年",只显示年份不显示后面日期与时间
           if (_that.baseInfo.year){
             _that.baseInfo.year = _that.baseInfo.year.slice(0,4)
@@ -192,23 +197,21 @@ export default {
     getRequirementOwner(){
       this.$api.getAllUsers().then(res =>{
         if (res.flag){
-          let userList = res.data;
-          userList.forEach(item =>{
-            let options = {
-              label: item.fullname,  //后端返回的不是驼峰命名,所以这样写
-              value: item.userId
-            };
-            this.requirementOwnerList.push(options);
-          });
+          this.requirementOwnerList = res.data;
+        } else {
+          this.$message.error(res.message, 1);
         }
       });
     },
     // 保存
     doSave() {
+      if (!this.owner) {
+        return this.$message.warning(this.$t('base.info.please-choose-owner'), 1);
+      }
       //基本信息保存请求参数-目前只能更改需求负责人
       let basicInfoData = {
         dvpId: this.$store.getters.dvpId,
-        ownerId: this.baseInfo.owner,
+        ownerId: this.owner,
         dvpType: 0,
       };
       //保存基本信息-需求负责人
@@ -225,6 +228,10 @@ export default {
     // 编辑
     doEdit() {
       this.isEdit = true;
+    },
+    // 责任人下拉选项变换时
+    changeOwner(value, options) {
+      this.owner = options ? options.data.key : undefined;
     },
 		// 下拉选项过滤
 		filterOption(input, option) {

+ 1 - 1
src/views/fullVehicle/baseInfo/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="background" :style="{ height: dynamicHeight }">
-    <a-tabs  :activeKey='tabKey' @change="callback" tabPosition='left' size='large'>
+    <a-tabs  :activeKey='tabKey' @change="callback" destroyInactiveTabPane tabPosition='left' size='large'>
       <!-- 基本信息 -->
       <a-tab-pane
         :key="'1'"

+ 6 - 6
src/views/systemDVP/baseInfo/baseInfo/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <a-card class="backCard">
+  <a-card class="back-card">
     <!-- 编辑 -->
     <a-button
       v-if="$api.btnPms && !isEdit"
@@ -18,7 +18,7 @@
       @click="doSave()">
         {{ $t('global-btn.save') }}
     </a-button>
-    <div class="pad12">
+    <div class="pad-12">
       <a-form layout="inline">
         <a-row :gutter="24">
           <!-- 项目编号 -->
@@ -129,7 +129,7 @@
               <span v-if="!isEdit" class="ml8">{{ baseInfo.owner }}</span>
               <a-select
                 v-else
-                class="selectWidth"
+                class="select-width"
                 v-model="owner"
                 :filter-option="filterOption"
                 :placeholder="$t('base.info.please-choose-owner')"
@@ -252,17 +252,17 @@ export default {
 .ant-pro-basicLayout-content {
   margin: 10px;
 }
-.backCard {
+.back-card {
   border: hidden;
   border-radius: 0px;
 }
-.pad12 {
+.pad-12 {
   padding: 12px;
 }
 .mr-24 {
   margin-right: -24px;
 }
-.selectWidth {
+.select-width {
   width: 240px;
 }
 </style>

+ 1 - 1
src/views/systemDVP/baseInfo/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="background" :style="{ height: dynamicHeight }">
-    <a-tabs  :activeKey='tabKey' @change="callback" tabPosition='left' size='large'>
+    <a-tabs  :activeKey='tabKey' @change="callback" destroyInactiveTabPane tabPosition='left' size='large'>
       <!-- 基本信息 -->
       <a-tab-pane :key="'1'" :tab="$t('base.info.baseInfo')">
         <div class='tab-card'>