Просмотр исходного кода

Merge branch 'master' of https://github.com/java110/MicroCommunity

wuxw лет назад: 6
Родитель
Сommit
b1b52d61ac

+ 5 - 3
WebService/src/main/resources/components/inspectionPlanPackage/edit-inspectionPlan/editInspectionPlan.js

@@ -23,7 +23,8 @@
                 departmentId:'',
                 departmentName:'',
                 createUserId:'',
-                createUserName:''
+                createUserName:'',
+                inspectionRouteName:''
             }
         },
         _initMethod: function () {
@@ -65,7 +66,7 @@
                 //传输数据到machineSelect2组件
                 vc.emit('editInspectionPlan', 'inspectionRouteSelect2', 'setInspectionRoute', {
                     inspectionRouteId: vc.component.editInspectionPlanInfo.inspectionRouteId,
-                    routeName: vc.component.editInspectionPlanInfo.routeName,
+                    routeName: vc.component.editInspectionPlanInfo.inspectionRouteName,
                 });
 
 
@@ -244,7 +245,8 @@
                     departmentId:'',
                     departmentName:'',
                     createUserId:'',
-                    createUserName:''
+                    createUserName:'',
+                    inspectionRouteName:''
                 };
                 vc.component.editInspectionPlanInfo.signTypes = signTypes;
                 vc.component.editInspectionPlanInfo.states = states;

+ 14 - 7
WebService/src/main/resources/components/inspectionRoutePackage/inspectionRoute-select2/inspectionRouteSelect2.js

@@ -27,14 +27,20 @@
         _initEvent: function () {
             vc.on('inspectionRouteSelect2', 'setInspectionRoute', function (_param) {
                 vc.copyObject(_param, this.inspectionRouteSelect2Info);
-                // var option = new Option(_param.routeName, _param.inspectionRouteId, true, true);
-                // this.inspectionRouteSelect2Info.inspectionRouteSelector.append(option);
-                var routeIds = _param.inspectionRouteId.split(",");
-                var routeIdArray = new Array()
-                for( var i = 0; i < routeIds.length; i++){
-                    routeIdArray[i] = routeIds[i];
+                var name = _param.routeName.split(",");
+                var ids = _param.inspectionRouteId.split(",");
+                for( var i = 0; i < name.length; i++){
+                    var option = new Option(name[i],ids[i], true, true);
+                    this.inspectionRouteSelect2Info.inspectionRouteSelector.append(option);
                 }
-                $("#inspectionRouteSelector").val(routeIdArray).trigger("change");
+                //var option = new Option(_param.routeName, _param.inspectionRouteId, true, true);
+
+                // var routeIds = _param.inspectionRouteId.split(",");
+                // var routeIdArray = new Array()
+                // for( var i = 0; i < routeIds.length; i++){
+                //     routeIdArray[i] = routeIds[i];
+                // }
+                // $("#inspectionRouteSelector").val(routeIdArray).trigger("change");
             });
 
             vc.on('inspectionRouteSelect2', 'clearInspectionRoute', function (_param) {
@@ -44,6 +50,7 @@
                     routeName: '',
                     inspectionRouteSelector: {}
                 };
+                $("#inspectionRouteSelector").val(null).trigger('change');
             });
         },
         methods: {