3 Commits 2c94c03d71 ... 4c70b10192

Author SHA1 Message Date
  xuhaowei 4c70b10192 零部件计划/验证审批 审批人下拉选项不显示材料工程师和试验工程师 2 months ago
  xuhaowei 36ea7cbbfc Merge branch 'qirui-v2' of http://git.nationrel.cn:3000/NEW-Enterprise/DVP-VUE_V1.0 into qirui-v2 2 months ago
  xuhaowei 0c20c170d4 奇瑞-DVP 所有责任人下拉框,在选人时,鼠标移入时,显示该人员的全部部门信息 2 months ago

+ 14 - 4
src/App.vue

@@ -227,7 +227,7 @@ export default {
               value: _that.performanceModule
             });
             _that.versionNO = res.data.versionNO.toString();
-            _that.storageOwnerInfo(res.data.ownerId,res.data.owner);
+            _that.storageOwnerInfo(res.data.ownerId,res.data.owner,res.data.ownerJobNumber,res.data.fullLevelDepartment);
           } else {
             _that.$message.error(res.message, 1);
           }
@@ -239,7 +239,7 @@ export default {
             _that.projectNo = res.data.projectNo;
             _that.systemName = res.data.systemName;
             _that.versionNO = res.data.versionNO.toString();
-            _that.storageOwnerInfo(res.data.ownerId,res.data.owner);
+            _that.storageOwnerInfo(res.data.ownerId,res.data.owner,res.data.ownerJobNumber,res.data.fullLevelDepartment);
           } else {
             _that.$message.error(res.message, 1);
           }
@@ -249,7 +249,7 @@ export default {
         _that.$api.getComponentsDvpBasicInformation(data).then( res => {
           if (res.flag) {
             _that.projectNo = res.data.projectNo;
-            _that.storageOwnerInfo(res.data.ownerId,res.data.owner);
+            _that.storageOwnerInfo(res.data.ownerId,res.data.owner,res.data.ownerJobNumber,res.data.fullLevelDepartment);
           } else {
             _that.$message.error(res.message,1);
           }
@@ -640,7 +640,7 @@ export default {
         }
     },
     // 储存Owner信息
-    storageOwnerInfo(ownerId,ownerName) {
+    storageOwnerInfo(ownerId, ownerName, ownerJobNumber, ownerFullDepartment) {
       // 储存dvpOwnerId
       this.$store.dispatch("dvp/set", {
         key: "dvpOwnerId",
@@ -656,6 +656,16 @@ export default {
         key: "ownerDepartmentId",
         value: getUrlParam("departmentId")
       });
+      // 储存ownerJobNumber
+      this.$store.dispatch("dvp/set", {
+        key: "ownerJobNumber",
+        value: ownerJobNumber
+      });
+      // 储存ownerFullDepartment
+      this.$store.dispatch("dvp/set", {
+        key: "ownerFullDepartment",
+        value: ownerFullDepartment
+      });
     },
 
     /**

+ 28 - 19
src/components/SubmitApprovalModal/SubmitApprovalModal.vue

@@ -110,7 +110,7 @@
             <a-card v-if='userTaskFlag' :title="$t('dvp.approver')" class='mt10'>
               <a-row
                   :gutter='24'
-                  v-for='(userTask, index) in userTaskList'
+                  v-for='userTask in userTaskList'
                   :key='userTask.key'
                   style="padding:12px;"
               >
@@ -685,24 +685,33 @@ export default {
 		 */
 		handleUserSearch(val) {
 			let _that = this;
-				_that.$api.getUserPageList({
-					pageNo: 1,
-					pageSize: 10,
-					userName: val
-				}).then(res => {
-					if (res.flag) {
-						let resData = res.data.data;
-						_that.userList = [];
-						_that.userList = resData.map(item => {
-							return {
-								name: item.userName + '/' + item.account + '/' + item.departmentName,
-								value: item.userId
-							};
-						});
-					} else {
-						_that.$notification.error({ message: res.message });
-					}
-				});
+      _that.$api.getUserPageList({
+        pageNo: 1,
+        pageSize: 10,
+        userName: val
+      }).then(res => {
+        if (res.flag) {
+          let resData = res.data.data;
+          let filterData = [];
+          // 零部件DVP 计划/验证审批
+          if (_that.inputArgs.approveType === '71') {
+            // 过滤掉材料工程师和试验工程师
+            filterData = resData.filter(item => {
+              return !(item.userId === _that.inputArgs.testEngineerId || item.userId === _that.inputArgs.materialsEngineerId);
+            });
+          } else {
+            filterData = resData;
+          }
+          _that.userList = filterData.map(item => {
+            return {
+              name: item.userName + '/' + item.account + '/' + item.departmentName,
+              value: item.userId
+            };
+          });
+        } else {
+          _that.$notification.error({ message: res.message });
+        }
+      });
 		},
 		/**
 		 * 零部件dvp材料工程师/试验工程师信息检索

+ 2 - 0
src/store/getters.js

@@ -19,6 +19,8 @@ const getters = {
 	dvpOwnerId: state => state.dvp.dvpOwnerId,
 	dvpOwnerName: state => state.dvp.dvpOwnerName,
 	ownerDepartmentId: state => state.dvp.ownerDepartmentId,
+  ownerJobNumber: state => state.dvp.ownerJobNumber,
+  ownerFullDepartment: state => state.dvp.ownerFullDepartment,
 	dvpType: state => state.dvp.dvpType,
 	cpacId: state => state.dvp.cpacId,
 	footerButtonFlag: state => state.dvp.footerButtonFlag

+ 29 - 6
src/views/componentsDVP/dvpPlan/edit.vue

@@ -68,7 +68,22 @@
               <!--测试负责人-->
               <a-col :lg='6' :md='24' :sm='24' :xl='6' :xs='24'>
                 <a-form-item :label="$t('plan.dvp.test-user')">
-                  <a-select v-model="formData.testOwner" :options="testOwnerList"  allowClear :placeholder="$t('global-btn.please-select') + $t('plan.dvp.test-user')"></a-select>
+                  <a-select v-model="formData.testOwner" allowClear :placeholder="$t('global-btn.please-select') + $t('plan.dvp.test-user')">
+                    <a-select-option
+                      v-for='item in testOwnerList'
+                      :key='item.label'
+                      :value='item.value'
+                    >
+                      <a-tooltip placement="right">
+                        <template #title>
+                          <div style="white-space: pre-wrap; word-break: break-all;">
+                            {{ formatDetailInfo(item.detailInfo, 40) }}
+                          </div>
+                        </template>
+                        <span>{{ item.label }}</span>
+                      </a-tooltip>
+                    </a-select-option>
+                  </a-select>
                 </a-form-item>
               </a-col>
               <!--测试地点-->
@@ -911,7 +926,8 @@ export default {
             if (item.permission === 1) {
               let options = {
                 label: item.name,
-                value: item.userId
+                value: item.userId,
+                detailInfo: item.name + '|' + item.fullLevelDepartment + '|' + item.jobNumber
               };
               this.testOwnerList.push(options);
             }
@@ -922,26 +938,33 @@ export default {
             if (index === -1) {
               let tempData = {
                 label: data.name,
-                value: data.userId
+                value: data.userId,
+                detailInfo: data.name + '|' + data.fullLevelDepartment + '|' + data.jobNumber
               };
               this.testOwnerList.push(tempData);
             }
           });
           // 是否包含Owner
           let ownerFlag = this.testOwnerList.find(item => item.value === this.$store.getters.dvpOwnerId);
+          let ownerName = this.$store.getters.dvpOwnerName;
+          let ownerJobNumber = this.$store.getters.ownerJobNumber;
+          let ownerFullDepartment = this.$store.getters.ownerFullDepartment;
           if (!ownerFlag) {
             // 测试负责人要包括DVP的Owner
             let owner = {
               label: this.$store.getters.dvpOwnerName,
-              value: this.$store.getters.dvpOwnerId
+              value: this.$store.getters.dvpOwnerId,
+              detailInfo: ownerName + '|' + ownerFullDepartment + '|' + ownerJobNumber
             }
             this.testOwnerList.push(owner);
           }
         }
       });
     },
-
-
+    // 格式化detailInfo 每40个字符换行
+    formatDetailInfo(detailInfo, maxLength) {
+      return detailInfo.replace(/.{1,${maxLength}}/g, text => text + ' ');
+    },
     /**
      * 获取FND代码下拉选数据
      */

+ 29 - 6
src/views/componentsDVP/dvpPlan/editModal/editDvp.vue

@@ -83,7 +83,22 @@
           <!--测试负责人-->
           <a-col :lg="16" :md="24" :sm="24" :xl="12" :xs="24">
             <a-form-item :label="$t('plan.dvp.test-user')" required>
-              <a-select v-model="editParam.testOwner" :options="testOwnerList" :filter-option="handleFilterDataList" allowClear :placeholder="$t('global-btn.please-select') + $t('plan.dvp.test-user')"></a-select>
+              <a-select v-model="editParam.testOwner" allowClear :placeholder="$t('global-btn.please-select') + $t('plan.dvp.test-user')">
+                <a-select-option
+                  v-for='item in testOwnerList'
+                  :key='item.label'
+                  :value='item.value'
+                >
+                  <a-tooltip placement="right">
+                    <template #title>
+                      <div style="white-space: pre-wrap; word-break: break-all;">
+                        {{ formatDetailInfo(item.detailInfo, 40) }}
+                      </div>
+                    </template>
+                    <span>{{ item.label }}</span>
+                  </a-tooltip>
+                </a-select-option>
+              </a-select>
             </a-form-item>
           </a-col>
           <!--测试阶段-->
@@ -283,7 +298,6 @@ export default {
     }
   },
   mounted() {
-    this.initSelectData();
   },
   methods: {
 
@@ -323,7 +337,8 @@ export default {
             if (item.permission === 1){
               let options = {
                 label: item.name,
-                value: item.userId
+                value: item.userId,
+                detailInfo: item.name + '|' + item.fullLevelDepartment + '|' + item.jobNumber
               };
               this.testOwnerList.push(options);
             }
@@ -334,25 +349,33 @@ export default {
             if (index === -1) {
               let tempData = {
                 label: data.name,
-                value: data.userId
+                value: data.userId,
+                detailInfo: data.name + '|' + data.fullLevelDepartment + '|' + data.jobNumber
               };
               this.testOwnerList.push(tempData);
             }
           });
           // 是否包含Owner
           let ownerFlag = this.testOwnerList.find(item => item.value === this.$store.getters.dvpOwnerId);
+          let ownerName = this.$store.getters.dvpOwnerName;
+          let ownerJobNumber = this.$store.getters.ownerJobNumber;
+          let ownerFullDepartment = this.$store.getters.ownerFullDepartment;
           if (!ownerFlag) {
             // 测试负责人要包括DVP的Owner
             let owner = {
               label: this.$store.getters.dvpOwnerName,
-              value: this.$store.getters.dvpOwnerId
+              value: this.$store.getters.dvpOwnerId,
+              detailInfo: ownerName + '|' + ownerFullDepartment + '|' + ownerJobNumber
             }
             this.testOwnerList.push(owner);
           }
         }
       });
     },
-
+    // 格式化detailInfo 每40个字符换行
+    formatDetailInfo(detailInfo, maxLength) {
+      return detailInfo.replace(/.{1,${maxLength}}/g, text => text + ' ');
+    },
     /**
      * 零部件编号级联下拉选择
      * @param val

+ 22 - 5
src/views/componentsDVP/dvpPlan/editModal/editTableRow.vue

@@ -192,10 +192,23 @@
               <a-form-item :label="$t('plan.dvp.test-user')" required>
                 <a-select
                   v-model="editParam.testOwner"
-                  :options="testOwnerList"
                   :filter-option="handleFilterDataList"
                   allowClear
                   :placeholder="$t('global-btn.please-select') + $t('plan.dvp.test-user')">
+                  <a-select-option
+                      v-for='item in testOwnerList'
+                      :key='item.label'
+                      :value='item.value'
+                    >
+                      <a-tooltip placement="right">
+                        <template #title>
+                          <div style="white-space: pre-wrap; word-break: break-all;">
+                            {{ formatDetailInfo(item.detailInfo, 40) }}
+                          </div>
+                        </template>
+                        <span>{{ item.label }}</span>
+                      </a-tooltip>
+                    </a-select-option>
                 </a-select>
               </a-form-item>
             </a-col>
@@ -447,7 +460,8 @@ export default {
             if (item.permission === 1){
               let options = {
                 label: item.name,
-                value: item.userId
+                value: item.userId,
+                detailInfo: item.name + '|' + item.fullLevelDepartment + '|' + item.jobNumber
               };
               this.testOwnerList.push(options);
             }
@@ -458,7 +472,8 @@ export default {
             if (index === -1) {
               let tempData = {
                 label: data.name,
-                value: data.userId
+                value: data.userId,
+                detailInfo: data.name + '|' + data.fullLevelDepartment + '|' + data.jobNumber
               };
               this.testOwnerList.push(tempData);
             }
@@ -475,7 +490,6 @@ export default {
           }
         }
       });
-
       // 获取等效报告下拉选
       let data = {
         dvpId: this.$store.getters.dvpId
@@ -494,7 +508,10 @@ export default {
         }
       });
     },
-
+    // 格式化detailInfo 每40个字符换行
+    formatDetailInfo(detailInfo, maxLength) {
+      return detailInfo.replace(/.{1,${maxLength}}/g, text => text + ' ');
+    },
     /**
      * 非空校验 判断是否为空
      * @returns {boolean}

+ 20 - 8
src/views/fullVehicle/dvpPlan/components/addDvpTest.vue

@@ -75,7 +75,14 @@
                   :key='item.accountName'
                   :value='item.userId'
                 >
-                  {{ item.account + " " + item.userName + " 【 " + item.departmentName + " 】" }}
+                  <a-tooltip placement="right">
+                    <template #title>
+                      <div style="white-space: pre-wrap; word-break: break-all;">
+                        {{ formatDetailInfo(item.detailInfo, 40) }}
+                      </div>
+                    </template>
+                    <span>{{ item.account + " " + item.userName + " 【 " + item.departmentName + " 】" }}</span>
+                  </a-tooltip>
                 </a-select-option>
               </a-select>
             </a-form-item>
@@ -539,13 +546,18 @@ export default {
               accountName: v.account + v.userName,
               account: v.account,
               departmentId: v.departmentId,
-              departmentName: v.departmentName
-            };
-          });
-        } else {
-          _that.$notification.error({message: res.message});
-        }
-      });
+              departmentName: v.departmentName,
+              detailInfo: v.userName + '|' + v.fullLevelDepartmentName + '|' + v.account
+						};
+					});
+				} else {
+					_that.$notification.error({message: res.message});
+				}
+			});
+		},
+    // 格式化detailInfo 每40个字符换行
+    formatDetailInfo(detailInfo, maxLength) {
+      return detailInfo.replace(/.{1,${maxLength}}/g, text => text + ' ');
     },
     /**
      * 试验负责人下拉选择

+ 2 - 1
src/views/fullVehicle/dvpPlan/components/dvpPlan.vue

@@ -665,7 +665,8 @@ export default {
           let data = res.data.dvpFullVehicleDetail;
           if (res.data.dvpFullVehicleDetail && res.data.columnDataModel) {
             this.addFormData = data;
-            this.addFormData.testOwner = data.engineerUserId;
+            this.addFormData.testOwner = res.data.engineerUserName;
+            this.$refs.addDvpTest.testOwnerId = data.engineerUserId;
             this.addFormData.count = data.vehicleCount;
             this.addFormData.node = data.projectNodeId;
             this.addFormData.testType = (data.testType).toString();

+ 43 - 5
src/views/systemDVP/dvpPlan/index.vue

@@ -96,7 +96,22 @@
             <!--试验责任方-->
             <a-col :lg='6' :md='24' :sm='24' :xl='6' :xs='24'>
               <a-form-item :label="$t('base.info.test-responsible-party')">
-                <a-select allowClear v-model="formData.testOwner" :options="testOwnerList" @change="handleTestOwner" :placeholder="$t('plan.dvp.please_select-study-director')"></a-select>
+                <a-select allowClear v-model="formData.testOwner" @change="handleTestOwner" :placeholder="$t('plan.dvp.please_select-study-director')">
+                  <a-select-option
+                    v-for='item in testOwnerList'
+                    :key='item.label'
+                    :value='item.value'
+                  >
+                    <a-tooltip placement="right">
+                      <template #title>
+                        <div style="white-space: pre-wrap; word-break: break-all;">
+                          {{ formatDetailInfo(item.detailInfo, 40) }}
+                        </div>
+                      </template>
+                      <span>{{ item.label }}</span>
+                    </a-tooltip>
+                  </a-select-option>
+                </a-select>
               </a-form-item>
             </a-col>
             <!--试验阶段-->
@@ -295,7 +310,22 @@
           <!-- 试验责任方 -->
           <a-col v-if="causeShowFlag" :lg="16" :md="24" :sm="24" :xl="12" :xs="24">
             <a-form-item required :label="$t('base.info.test-responsible-party')">
-              <a-select allowClear v-model="editParam.testOwnerId" :options="testOwnerList" @change="handleEditTestOwner" :placeholder="$t('plan.dvp.please_select-study-director')"></a-select>
+              <a-select allowClear v-model="editParam.testOwnerId" @change="handleEditTestOwner" :placeholder="$t('plan.dvp.please_select-study-director')">
+                <a-select-option
+                  v-for='item in testOwnerList'
+                  :key='item.label'
+                  :value='item.value'
+                >
+                  <a-tooltip placement="right">
+                    <template #title>
+                      <div style="white-space: pre-wrap; word-break: break-all;">
+                        {{ formatDetailInfo(item.detailInfo, 40) }}
+                      </div>
+                    </template>
+                    <span>{{ item.label }}</span>
+                  </a-tooltip>
+                </a-select-option>
+              </a-select>
             </a-form-item>
           </a-col>
         </a-form>
@@ -971,25 +1001,33 @@ export default {
             if (item.permission === 1){
               let options = {
                 label: item.name,
-                value: item.userId
+                value: item.userId,
+                detailInfo: item.name + '|' + item.fullLevelDepartment + '|' + item.jobNumber
               };
               this.testOwnerList.push(options);
             }
           });
           // 是否包含Owner
           let ownerFlag = this.testOwnerList.find(item => item.value === this.$store.getters.dvpOwnerId);
+          let ownerName = this.$store.getters.dvpOwnerName;
+          let ownerJobNumber = this.$store.getters.ownerJobNumber;
+          let ownerFullDepartment = this.$store.getters.ownerFullDepartment;
           if (!ownerFlag) {
             // 测试负责人要包括DVP的Owner
             let owner = {
               label: this.$store.getters.dvpOwnerName,
-              value: this.$store.getters.dvpOwnerId
+              value: this.$store.getters.dvpOwnerId,
+              detailInfo: ownerName + '|' + ownerFullDepartment + '|' + ownerJobNumber
             }
             this.testOwnerList.push(owner);
           }
         }
       });
     },
-
+    // 格式化detailInfo 每40个字符换行
+    formatDetailInfo(detailInfo, maxLength) {
+      return detailInfo.replace(/.{1,${maxLength}}/g, text => text + ' ');
+    },
     /**
      * 查询
      */