"use strict";var app=angular.module("app",["ui.router","templatescache","ngAnimate"]);angular.module("app").run(["$rootScope","$state","$stateParams",function(s,r,e){s.$state=r,s.$stateParams=e}]).config(["$stateProvider","$urlRouterProvider",function(s,r){r.otherwise("/simple"),s.state("simple",{url:"/simple",templateUrl:"templates/simple.html"}).state("details",{url:"/details",templateUrl:"templates/details.html"}).state("simple-enterprise",{url:"/simple-enterprise",templateUrl:"templates/simple-enterprise.html"}).state("details-enterprise",{url:"/details-enterprise",templateUrl:"templates/details-enterprise.html"}).state("details-new",{url:"/details-new",templateUrl:"templates/details-new.html"}).state("details-new.qrcode",{url:"/qrcode",templateUrl:"templates/details-new-qrcode.html"}).state("details-new.info",{url:"/info",templateUrl:"templates/details-new-info.html"})}]),angular.module("templatescache",[]).run(["$templateCache",function(s){s.put("templates/details-enterprise.html",'
\r\n
\r\n \r\n
\r\n
\r\n {{user.name}}\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
纳税人编号
\r\n
{{user.l.substring(7)}}
\r\n
\r\n
\r\n
所属行业
\r\n
{{user.branch}}
\r\n
\r\n
\r\n
企业地址
\r\n
{{user.duty}}
\r\n
\r\n
\r\n
办税人电话
\r\n
{{user.tel}}
\r\n
办税人手机
\r\n
{{user.mob}}
\r\n
\r\n
\r\n
法人邮箱
\r\n
{{user.email}}
\r\n
法人手机
\r\n
{{user.sMob}}
\r\n
\r\n \r\n
\r\n
\r\n
'),s.put("templates/details-new-info.html",'
\r\n \r\n
'),s.put("templates/details-new-qrcode.html",'
\r\n
\r\n
'),s.put("templates/details-new.html",'
\r\n
\r\n
\r\n \r\n
\r\n {{user.name}} ({{user.shortL}})\r\n
\r\n 个性签名:\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n\r\n
\r\n
'),s.put("templates/details.html",'
\r\n
\r\n \r\n
\r\n
\r\n

\r\n {{user.name}}({{user.shortL}})
\r\n
\r\n {{user.watchword !== null || user.watchword !== undefined || user.watchword !== \'\'?\'他什么都没有留下\':user.watchword}}
\r\n

\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
单位名称
\r\n
{{user.comp}}
\r\n
用户性别
\r\n
{{getSex()}}
\r\n
\r\n
\r\n
职务名称
\r\n
{{user.duty}}
\r\n
处室名称
\r\n
{{user.branch}}
\r\n
\r\n
\r\n
办公电话
\r\n
{{user.tel}}
\r\n
手机长号
\r\n
{{user.mob}}
\r\n
\r\n
\r\n
办公室号
\r\n
{{user.officeID}}
\r\n
手机短号
\r\n
{{user.sMob}}
\r\n
\r\n
\r\n
办公邮箱
\r\n
{{user.email}}
\r\n
\r\n
\r\n
\r\n
\r\n
'),s.put("templates/simple-enterprise.html",'
\r\n
\r\n \r\n
\r\n
\r\n

{{user.name}}

\r\n

\r\n 行业:{{user.branch}}
\r\n 地址:{{user.duty}}\r\n

\r\n

\r\n 电话:{{user.tel}}
\r\n 手机:{{user.mob}}
\r\n 邮箱:{{user.email}}\r\n

\r\n
\r\n
\r\n
'),s.put("templates/simple.html",'
\r\n
\r\n \r\n
\r\n
\r\n

{{user.name}}

\r\n

\r\n 处室:{{user.branch}}
\r\n 职务:{{user.duty}}\r\n

\r\n

\r\n 电话:{{user.tel}}
\r\n 手机:{{user.mob}}
\r\n 邮箱:{{user.email}}\r\n

\r\n
\r\n
\r\n
')}]),angular.module("app").controller("UserController",["$scope","$state",function(s,r){lxtalkClient.Invoke("{FB60F992-A0FD-47B3-AAA7-E80DF209C5A4}","_Register","",s),s.getSex=function(r){return void 0===s.user?"保密":0==s.user.sex?"男":1==s.user.sex?"女":"保密"},s.isActive="details-new.info"==r.$current.name,s.$on("$stateChangeStart",function(r,e,l,n,i,a){s.isActive="details-new.info"==e.name}),s.update=function(r){var e=JSON.parse(r);s.user=e;var l=/-([\W\w]*)/,n=l.exec(s.user.l);s.user.shortL=null==n?s.user.l:n[1]}}]),function(){function s(s){function r(r,e,l){var n="BEGIN:VCARD \r\nVERSION:3.0\r\nFN:"+r.user.name+"\r\nTEL;HOME:"+r.user.sMob+"\r\nTEL;WORK:"+r.user.tel+"\r\nTEL;CELL:"+r.user.mob+"\r\nORG:"+r.user.comp+"\r\nTITLE:"+r.user.duty+"\r\nEMAIL:"+r.user.email+"\r\nEND:VCARD\r\n";e.qrcode({render:"canvas",text:s.toUtf8(n),width:200,height:200,typeNumber:-1,correctLevel:0,background:"#ffffff",foreground:"#2D7B94"})}var e={link:r,restrict:"A",scope:{user:"=ngUser"}};return e}angular.module("app").directive("qrcode",s),s.$inject=["Utilities"]}(),angular.module("app").factory("Utilities",function(){return{toUtf8:function(s){var r,e,l,n;for(r="",l=s.length,e=0;e=1&&n<=127?r+=s.charAt(e):n>2047?(r+=String.fromCharCode(224|n>>12&15),r+=String.fromCharCode(128|n>>6&63),r+=String.fromCharCode(128|n>>0&63)):(r+=String.fromCharCode(192|n>>6&31),r+=String.fromCharCode(128|n>>0&63));return r}}});