User and service type management interface 32/88232/1
authorguochuyicmri <guochuyi@chinamobile.com>
Wed, 22 May 2019 08:55:40 +0000 (16:55 +0800)
committerguochuyicmri <guochuyi@chinamobile.com>
Wed, 22 May 2019 08:55:50 +0000 (16:55 +0800)
Change-Id: I8cc018600880433891a434f312c37f97fc2e6107
Issue-ID: USECASEUI-211
Signed-off-by: guochuyicmri <guochuyi@chinamobile.com>
usecaseui-portal/src/app/components/customer/customer.component.html
usecaseui-portal/src/app/components/customer/customer.component.ts
usecaseui-portal/src/app/home/home.component.html

index 82ef281..fea9dfd 100644 (file)
@@ -24,7 +24,7 @@
         <div class="type">
           <p> {{"i18nTextDefine_Instance_Count_of_ServiceType" | translate}} </p>
           <app-bar [initData]="serviceInit" [chartData]="serviceData"></app-bar>
-          <div class="footname" style="width: 100%;height: 40px;line-height: 40px;text-align: center;color: #3C4F8C;margin-top: 20px">
+          <div class="footname" style="width: 100%;height: 40px;line-height: 40px;text-align: center;color: #3C4F8C;">
             <img src="./assets/images/customerBarUser.png" alt="customerName" style="margin-right: 5px;margin-bottom: 3px;">
             {{this.serviceInit["customer"]}}
           </div>
@@ -62,7 +62,7 @@
     </div>
     <div class="services_type_detail">
       <div class="services_add" *ngIf="servicesadd">
-        <input nz-input placeholder=" {{'i18nTextDefine_Input_ServicesType' | translate}} " class="services_name" nzSize="default">
+        <input nz-input placeholder=" {{'i18nTextDefine_Input_ServicesType' | translate}} " class="services_name" nzSize="default" [(ngModel)]="addNewServiceType">
         <button nz-button nzType="primary" class="services_addbut" (click) = "createNewServiceType()">{{"i18nTextDefine_Add" | translate}}</button>
       </div>
       <div class="services_list">
index b609de5..f59f72b 100644 (file)
@@ -175,7 +175,7 @@ export class CustomerComponent implements OnInit {
     serviceInit: Object = {
         customer: '',
         width: 280,
-        height: 210,
+        height: 190,
         option: {
             tooltip: {
                 show: true,
@@ -361,7 +361,10 @@ export class CustomerComponent implements OnInit {
 
     createNewCustomer() {
         let createParams = {
-            customerId: this.addNewCustomer
+            customerId: this.addNewCustomer,
+            'global-customer-id':this.addNewCustomer,
+            'subscriber-name':this.addNewCustomer,
+            'subscriber-type':'INFRA'
         };
         this.managemencs.createCustomer(this.addNewCustomer, createParams).subscribe((data) => {
             if (data["status"] == 'SUCCESS') {
@@ -417,11 +420,14 @@ export class CustomerComponent implements OnInit {
     createNewServiceType() {
         let createParams = {
             customer: this.selectCustomer,
-            ServiceType:this.addNewServiceType
+            ServiceType: this.addNewServiceType,
+            "service-type":this.addNewServiceType,
+            "temp-ub-sub-account-id":"sotnaccount"
         };
         this.managemencs.createServiceType(createParams).subscribe((data) => {
             if (data["status"] == 'SUCCESS') {
                 this.getCustomersColumn(this.selectCustomer);
+                this.getAllCustomers();
                 console.log(data, "Interface returned success")
             } else {
                 console.log(data, "Interface returned error")
@@ -444,12 +450,13 @@ export class CustomerComponent implements OnInit {
         this.deleteServiceTypeModelVisible = false;
         this.getServiceTypeVersion();
     }
-    getServiceTypeVersion(){
-        let params={
-            customerId:this.selectCustomer.id,
-            ServiceType:this.thisdeleteServiceType["type"]
+    getServiceTypeVersion() {
+        let paramss = {
+            customerId: this.selectCustomer,
+            ServiceType: this.thisdeleteServiceType["type"]
         };
-        this.managemencs.getdeleteServiceTypeVersion(params).subscribe((data) => {
+        this.managemencs.getdeleteServiceTypeVersion(paramss).subscribe((data) => {
+            console.log(data)
             if (data["status"] == 'SUCCESS') {
                 let params = {
                     customerId:this.selectCustomer,
@@ -466,9 +473,9 @@ export class CustomerComponent implements OnInit {
     deleteServiceType(params){
         this.managemencs.deleteSelectServiceType(params).subscribe((data) => {
             if (data["status"] == 'SUCCESS') {
-                this.getCustomersPie();
                 this.getServiceTypes(params.customerId);
                 this.getCustomersColumn(params.customerId);
+                this.getAllCustomers();
                 console.log(data, "Interface returned success")
             } else {
                 console.log(data, "Interface returned error")
index ba847ec..d429bf8 100644 (file)
@@ -72,7 +72,7 @@
     </div>
   </div>
   <div class="rightcontent" style="height: 96vh">
-    <div class="rt-content" >
+    <div class="rt-content">
       <div class="alarm">
         <h4>{{"i18nTextDefine_ALARM" | translate}}</h4>
         <app-pie [initData]="alarmChartInit" [chartData]="alarmChartData"></app-pie>