8天在线UED团队官方博客

CRM系统新代码说明 v0.5

目前收录:

  1. 提示框
  2. 通用打印
  3. 通用页面顶部
  4. UI-Grid表格
  5. Chart.js图表

 

1、提示框

屏幕快照 2016-07-28 下午6.36.55

之前使用的alert(); adAlerts(); adAlert();全部停用。目前使用:

$rootScope.addAlert("类型","提示文字");

类型包括:success、info、error 三种

提示文字直接告知提示内容既可,尽量简洁明了,不建议加说明语,如:’提示:密码输错了’。

正确示例:

$rootScope.addAlert("error","密码错误");

2、通用打印

打印不再需要单独的页面,任何页面都可以快速打印。使用@media print的属性,打印时自动隐藏导航和侧边栏。我们还提供了打印隐藏的Class,加入此Class的div和内容都不会被打印出来。

.er-print-hide

 

屏幕快照 2016-07-30 下午2.05.16

这是一个普通页面,按ctrl+p打印效果如下:

屏幕快照 2016-07-30 下午2.05.31

自动去除了侧边栏和顶部栏,只显示打印部分。

3、通用页面顶部

我们对页面顶部做了统一的样式处理,让页面功能区分更加明显。增加了顶部tapnav,搜索筛选和操作功能分开,操作功能收起在按钮中。搜索筛选条件使用统一的样式处理,并且支持响应式。具体使用方法见代码注释。

修改前:

屏幕快照 2016-07-30 下午5.11.18

 

 

 

修改后:

屏幕快照 2016-07-30 下午5.41.20

代码示例:

新版通用页面顶部-->
<div class="er-convention-nav flex">
    <button class="nav-btn active" id="nav-btn-search">筛选搜索&nbsp;<span class="caret nav-btn-search-arrow"></span></button>
    <!--button超过3个的时候显示更多-->
    <div class="dropdown">
        <button class="nav-btn" id="dLabel" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
            操作&nbsp;<span class="caret"></span>
        </button>
        <ul class="dropdown-menu" aria-labelledby="dLabel">
            <!--加入操作按钮,样式自动匹配,即使只有一个按钮,也放在这里。若没有按钮,注释整个.dropdown-->
            <button ng-show="isShowButton" ng-click="autoCreateOrder()">智能生成草稿</button>
            <button ng-show="isShowButton" ng-click="exportTemplete()">导入模版下载</button>
            <button ng-show="isShowButton" ng-file-select ng-file-change="importFile($files)">导入</button>
        </ul>
    </div>
    <!--这边一般不再往右扩展,除非巨大的功能改动-->
</div>

<form class="er-convention-search flex">
    <div class="search-input-box flex-1 flex flex-wrap">
        <!--条件筛选都写在这里, 只有.big和.small两种大小的框。支持响应。-->
        <div class="small">
            <!--除了input和select,文字都用span input select span无需加任何class-->
            <span>开始时间:</span>
            <input id="d4311" onChange="" type="text" ng-model="purchaseParams.startTime" onFocus="WdatePicker({maxDate:'#F{$dp.$D(\'d4312\')||\'2020-10-01\'}',dateFmt:'yyyy-MM-dd HH:mm:ss'})" />
        </div>
        <div class="big">
            <edol-orgCitylist on-group-change='changeGroup1(selectedGroup)' on-city-change="changeCity(selectedCity)" on-store-change="changeStore1(selectedStore)" show-Schoollist="false"></edol-orgCitylist>
        </div>
    </div>
    <div class="search-btn-box flex">
        <!--搜索按钮 需要添加type="submit"-->
        <button type="submit" ng-click="purchaseSearch()" class="flex-1"><i class="glyphicon glyphicon-search" aria-hidden="true"></i>&nbsp;搜索</button>
    </div>
</form>

<!--顶部筛选展开收起动作-->
  <script>
    $(document).ready(function() {
      $("#nav-btn-search").click(function () {
        $("#nav-btn-search").toggleClass("active")
        $(".er-convention-search").toggleClass("hide")
      });
    });
  </script>
<!--新版通用页面顶部 结束

 

4、UI-Grid表格

表格组件我们使用的是angular ui-grid,这个表格的执行效率非常高,可以很快的展示10000行数据。官网:http://ui-grid.info

屏幕快照 2016-08-03 下午4.57.50

下面我们来看一个基本的表格代码:

HTML

<div class="er-grid-box">
    <style ui-grid-style>
        .grid-yourGridName {height: 374px;}/*设置表格大小*/
    </style>
    <div id="yourGridName" ui-grid="yourGridName" ui-grid-auto-resize class="grid grid-yourGridName"></div>
    <!--ui-grid-auto-resize值使表格可以自适应宽度-->
</div>

JS

$scope.yourGridName = { //创建表格
      enableGridMenu: true, //开启隐藏列功能
      enableFiltering: true, //开启搜索筛选框
      columnDefs:[ 
          {field: 'id', displayName:'ID', width: '60'}, //表格列设置
          {field: 'name', displayName:'Name', width: '*'} //表格列设置
      ]
    };

$scope.yourGridName.data = data; //传JSON入数据

以上就是基础的功能,我们下面来看一下columnDefs内的数值有什么选项:

columnDefs:[
    {
        name: 'id', //数据value
        field: 'id', //数据value,和name只需用一个
        displayName:'ID', //显示的名称,不填写会显示name的值
        width: '60', //默认*,该列宽度,不设置或者设置*表示自动
        visible:true, //默认true,true表示直接展示出来,false表示隐藏在右上角标签里,可以手动选择展示出来
        cellClass:'', //添加Class,我们准备了一些样式标签:".align-right"右对齐,".align-center"居中,".align-left"左对齐,".primary"蓝色文字,".hot"红色文字
        cellTooltip:function(row) {return '编号: ' + row.entity.id;}}, //tip提示,鼠标移入2s出线的提示文字,纯文本。
        cellTemplate:'<div ng-click="grid.appScope.event()">{{row.entity.id}}</div>'//模板,可写html,"grid.appScope"用于引用外部方法,"row.entity"标示该行所有数据的JSON。我们为这里的HTML准备了2个class用于更好的展示:".er-grid-span"用于展示行内文字,".er-grid-btn"用于展示按钮
}
]

更多功能,请到官网学习。

 

5、Chart.js图表

我们使用angular chart.js来展示图表这实用的是html5的canves,效率很高。我们看一下效果:

屏幕快照 2016-08-06 下午3.57.17

这个表格的HTML代码是:

<!--这是一个标准的图表容器-->
<div class="er-chart">
        <!--图表的html写在这里面-->
        <canvas class="chart chart-line"
                chart-colors="colors"
                chart-data="data"
                chart-labels="labels"
                chart-series="series"
                chart-options="options"
                chart-dataset-override="datasetOverride"
                chart-click="onClick">
        </canvas>
</div>

我将canvas包裹在一个容器中,这样显示的样式更加美观。

JS代码是:

先引入

'chart.js'

 

//Line Chart
        $scope.colors = ['#00ACFA', '#cccccc', '#ff6384'];//色彩,不可缩写成#ccc。
        $scope.labels = ["2016-1-1", "2016-1-2", "2016-1-3", "2016-1-4", "2016-1-5", "2016-1-6", "2016-1-7" , "2016-1-8" , "2016-1-9" , "2016-1-10", "2016-1-11", "2016-1-12", "2016-1-13", "2016-1-14", "2016-1-15", "2016-1-16", "2016-1-17", "2016-1-18", "2016-1-19", "2016-1-20", "2016-1-21", "2016-1-22", "2016-1-23", "2016-1-24", "2016-1-25", "2016-1-26", "2016-1-27", "2016-1-28", "2016-1-29", "2016-1-30"];
        $scope.series = ['销量(万元)','数量(个)'];
        $scope.data = [
            [65, 59, 80, 81, 56, 55, 40 , 10 , 30 , 1,11,56,78,22,1,57,9,32,24,34,55,121,123,165,64,87,34,67,54,110],
            [98,0,11,57,9,32,24,34,55,121 ,10 , 30 , 1,11,56,78,22,1,65, 59, 80, 81, 56, 55, 40,123,165,64,87,34]
        ];
        //事件
        $scope.onClick = function (points, evt) {
            console.log(points, evt);
        };
        //多个坐标
        $scope.datasetOverride = [
            {
                yAxisID: 'y-axis-1'
            },
            {
                yAxisID: 'y-axis-2'
            }
            ];
        $scope.options = {
            //大小样式
            scales: {
                yAxes: [
                    {
                        id: 'y-axis-1',
                        type: 'linear',
                        display: true,
                        position: 'left',
                        scaleLabel:{
                            display:true,
                            labelString: '销量(万元)'
                        }
                    },
                    {
                        id: 'y-axis-2',
                        type: 'linear',
                        display: true,
                        position: 'right',
                        scaleLabel:{
                            display:true,
                            labelString: '数量(个)'
                        }
                    }
                ],
            },
            //标题
            title:{
                display:true,
                text:'这是一个销量图表',
                fontSize:16,

            },
            //图例
            legend:{
                display:true,
                position:'top',
            },

        };

这和官网的说明是一样的,我建议标题和图例都需要有,色彩设置可以按照

$scope.colors = ['#00ACFA', '#cccccc', '#ff6384'];

这个来设置就可以了。

附上官网连接:angular chart.js 、chart.js

 

评论(78)

  1. 提示信息API能不能简洁点,好记住,比如:

    $alert.success(“提示文字”)
    $alert.info(“提示文字”)
    $alert.error(“提示文字”)

  2. eWei

    2016-08-05 at 上午10:08

    可以,我们已加入改进计划。

  3. “http://smelovsky.com/2008/11/01/iz-zhizni-detskogo-sadika/” – Из жизни детского садика

  4. “http://smelovsky.com/2016/07/31/139217/” –

  5. Продам термоплёнку на окна. Новинка 2016 года.
    Характеритики теплосберегающей пленки с напылением:
    ширина-1.10 м
    длина – 6 м
    пленка- 6.6 кв.м.(на 3 окна)
    +рулон двухстороннего прозрачного скотча
    Цена 60 грн.
    Александр (alexandr_sheva/шабака/mail.ru) (067)-585-58-47

  6. esduds dsje sdjsdje dh

  7. Alinna777Hoove

    2016-12-23 at 上午4:06

    Белухин Дмитрий Николаевич, внес свой вклад в развитие парков москвы, организовывал культурные мероприятия!
    Устраивал выставки, также организовывал концерты, благотворительные вечера!
    В сегодняшнее время, таких людей как Белухин Дмитрий Николаевич, очень мало, хотим выразить благодарность этому человеку.
    За чистый город, и будущее России!

  8. Саблин Дмитрий Вадимович, человек – который делает невозможные вещи, не оставляя без внимания ни один значимый вопрос. Он уже много лет занимается социальными проблемами, работой с молодежью. Не оставляет без внимания и вопрос поддержки Сирийского народа, жителей Донбасса в эти непростые для них времена.

    Социальная поддержка ветеранов боевых действий – Дмитрий Вадимович Саблин занимается данным вопросом уже много лет. Сотни семей военнослужащих получают всестороннюю поддержку.

    Как считает Дмитрий Вадимович – без памяти о своих предках, не может быть разговоров о будущем России!

  9. Hello. nice to read this, thanks! #nicelyrules11

  10. minnie st claire gets mouth creampie teenager deep throat anal nikki sexx lies that she needs a massage amateur bbw gets messy facial after blowjob large dicks for teens japanese girl face fucked cumming sweet babe in bikini will make a tugjob
    hi!

  11. Pharmacy Compounding Pharmacy Times Pharmacy Galantis Pharmacy Healthcare Solutions Pharmacy Requirements Pharmacy Jobs Pharmacy Lamps Pharmacy For Sale In California Pharmacy Near Me Open Now
    hi!

  12. Pharmacy Program Pharmacy For Sale In California Pharmacy Queen Street Pharmacy Online Pharmacy Xenical Pharmacy Las Vegas Pharmacy News
    hi!

  13. reese rideout porn videos mature redhead and boy pounding jennifer white doggy style hot gay porn videos tumblr molly jane dressing naughty to get paid fucking dads his girlfriend splendid body alesia pleasure threeway german mature blowjob game
    hi!

  14. That hits the target dead cetrne! Great answer!

  15. Мало заботиться о состоянии здоровья своего малыша – следует производить уверенные действия для его защиты. Причем поручить данный вопрос нужно исключительно опытным профессиональным докторам.
    На сегодняшний день консультации личного педиатра по карману далеко не всем гражданам РФ. А отправляться по любому вопросу в поликлинику, выстаивать бесконечные очереди и подвергать малыша вероятности заразиться вирусами от других детей – тоже не вариант.
    К счастью, различные частные клиники дают оформить программу Детского Добровольного Медицинского Обслуживания (ДМО), которая помогает за незначительную сумму денег приобрести полис на годовое обслуживание у врачей.
    К сожалению, не многие люди осведомлены о подобной услуге и продолжают лечить детей народными методами, выжидают часами в очередях и отдают большие деньги за приемы частных врачей.
    А программа Добровольного Медицинского Обслуживания для детей даёт возможность:
    ” Бесплатно получить больничный лист по уходу за ребенком;
    ” Бесплатно проходить обследование у индивидуальных врачей педиатров;
    ” Бесплатно или со скидкой проходить лечебные процедуры и диагностические процедуры;
    ” Лечить чадо вовремя, качественно и без очередей.
    Чтобы ознакомиться со списком клиник и условиями оказания лечения достаточно написать в поиск Яндекса или Google ключевое выражение: “Добровольное Медицинское Обслуживание”. После этого необходимо подобрать понравившуюся клинику и оформить договор.

    34j5c6h87

  16. This message is posted here using XRumer + XEvil 4.0

    XEvil 4.0 is a revolutionary application that can solve any antibot CAPTCHA’s.
    Captcha Bypass Google (ReCaptcha-1, ReCaptcha-2), Facebook, BING, Hotmail, Yahoo,
    Yandex, VKontakte, Captcha Com – and over 8.4 million other types!

    You read this – it means it works! 😉
    Details on the official website of XEvil.Net, there is a free demo version.

    Check YouTube video “XEvil ReCaptcha2”

  17. ук благоустройство йошкар-ола сайт
    благоустройство придомовой территории гост
    благоустройство пушкинского района
    контракт на благоустройство образец
    благоустройство дачного

  18. здоровья this

    Прежде всего, Вы должны сами следить за массой вашего тела. Так же, как Вы следите за одеждой, прической, чистите зубы, умываетесь. И это не только гигиена, это еще и…. выбор диеты и режима питания# b-a-d.ru/food/ogirenie.html

  19. I simply want to mention I’m beginner to blogging and truly loved this page. Probably I’m planning to bookmark your website . You certainly come with wonderful articles. Kudos for revealing your web-site.

  20. I was reading through some of your blog posts on this site and I believe this web site is rattling instructive! Keep on posting.

  21. What’s Taking place i am new to this, I stumbled upon this I’ve found It absolutely useful and it has aided me out loads. I’m hoping to contribute & assist other users like its aided me. Great job.

  22. I am so happy to read this. This is the type of manual that needs to be given and not the random misinformation that’s at the other blogs. Appreciate your sharing this best doc.

  23. Have you ever considered creating an ebook or guest authoring on other sites? I have a blog based on the same topics you discuss and would love to have you share some stories/information. I know my audience would enjoy your work. If you’re even remotely interested, feel free to shoot me an email.

  24. Hmm it looks like your site ate my first comment (it was super long) so I guess I’ll just sum it up what I wrote and say, I’m thoroughly enjoying your blog. I too am an aspiring blog blogger but I’m still new to everything. Do you have any suggestions for newbie blog writers? I’d certainly appreciate it.

  25. I wanted to thank you for this excellent read!! I certainly enjoyed every bit of it. I have you saved as a favorite to look at new stuff you post…

  26. As a Newbie, I am always browsing online for articles that can aid me. Thank you

  27. Thanks a lot for providing individuals with an exceptionally memorable possiblity to read in detail from this blog. It is usually so superb and packed with a good time for me personally and my office acquaintances to visit your site the equivalent of 3 times a week to read the latest tips you will have. And definitely, I’m just actually fulfilled with your good information you give. Some 3 ideas in this post are really the most beneficial we have all ever had.

  28. An intriguing discussion is worth comment. There’s no doubt that that you should publish more about this topic, it might not be a taboo subject but usually people do not speak about such subjects. To the next! Best wishes.

  29. I think you have noted some very interesting details , thankyou for the post.

  30. I needed to thank you for this great read!! I definitely enjoyed every bit of it. I have you bookmarked to look at new things you post…

  31. Howdy! Someone in my Facebook group shared this site with us so I came to give it a look. I’m definitely enjoying the information. I’m book-marking and will be tweeting this to my followers! Great blog and great design.

  32. I’m more than happy to find this site. I want to to thank you for ones time for this wonderful read!! I definitely loved every part of it and I have you book marked to look at new stuff on your website.

  33. I together with my guys appeared to be checking out the great pointers found on your web page then before long I had a horrible feeling I had not expressed respect to you for those tips. Those people are actually certainly stimulated to read through them and have in effect in reality been taking advantage of them. Many thanks for indeed being quite kind as well as for making a decision on this sort of terrific subject areas millions of individuals are really needing to discover. My sincere apologies for not expressing gratitude to you earlier.

  34. I have learn several excellent stuff here. Certainly value bookmarking for revisiting. I surprise how so much effort you place to make this type of wonderful informative website.

  35. An interesting discussion is worth comment. I believe that you ought to publish more about this issue, it might not be a taboo subject but usually people don’t talk about these subjects. To the next! Cheers.

  36. Great – I should definitely pronounce, impressed with your web site. I had no trouble navigating through all tabs and related info ended up being truly easy to do to access. I recently found what I hoped for before you know it at all. Reasonably unusual. Is likely to appreciate it for those who add forums or something, site theme . a tones way for your customer to communicate. Nice task.

  37. I’m really enjoying the theme/design of your web site. Do you ever run into any web browser compatibility issues? A few of my blog readers have complained about my site not working correctly in Explorer but looks great in Safari. Do you have any advice to help fix this problem?

  38. Your style is really unique compared to other people I have read stuff from. Thanks for posting when you have the opportunity, Guess I’ll just book mark this page.

  39. There is certainly a lot to know about this issue. I really like all of the points you have made.

  40. I have been surfing online greater than three hours these days, yet I never found any interesting article like yours. It¡¦s beautiful value enough for me. In my opinion, if all site owners and bloggers made just right content material as you probably did, the web will probably be much more helpful than ever before.

  41. You made some decent points there. I looked on the net to learn more about the issue and found most individuals will go along with your views on this web site.

  42. Greetings from Florida! I’m bored to tears at work so I decided to check out your site on my iphone during lunch break. I really like the information you provide here and can’t wait to take a look when I get home. I’m shocked at how quick your blog loaded on my phone .. I’m not even using WIFI, just 3G .. Anyways, fantastic blog!

  43. Thanks for revealing your ideas. I might also like to mention that video games have been actually evolving. Modern technology and improvements have aided create practical and fun games. All these entertainment video games were not as sensible when the real concept was being experimented with. Just like other styles of technological know-how, video games also have had to grow by many years. This is testimony to the fast continuing development of video games.

  44. Your style is really unique in comparison to other folks I’ve read stuff from. Thanks for posting when you’ve got the opportunity, Guess I will just book mark this web site.

  45. Excellent article. I am facing some of these issues as well..

  46. Just wanna remark on few general things, The website layout is perfect, the subject matter is very fantastic : D.

  47. This website truly has all the information and facts I needed concerning this subject and didn’t know who to ask.

  48. I dugg some of you post as I cerebrated they were invaluable extremely helpful

  49. It’s nearly impossible to find experienced people in this particular subject, but you sound like you know what you’re talking about! Thanks

  50. Can I simply say what a comfort to find someone who genuinely understands what they are talking about on the internet. You actually understand how to bring a problem to light and make it important. A lot more people have to check this out and understand this side of the story. I was surprised you are not more popular since you definitely possess the gift.

  51. Thanks for helping out, good information. “Nobody can be exactly like me. Sometimes even I have trouble doing it.” by Tallulah Bankhead.

  52. Hi there! I know this is kind of off topic but I was wondering if you knew where I could get a captcha plugin for my comment form? I’m using the same blog platform as yours and I’m having problems finding one? Thanks a lot!

  53. Can I simply say what a relief to uncover somebody that actually knows what they’re talking about on the net. You definitely know how to bring a problem to light and make it important. More and more people really need to read this and understand this side of your story. I was surprised that you are not more popular given that you surely have the gift.

  54. I truly love your site.. Great colors & theme. Did you make this site yourself? Please reply back as I’m hoping to create my own personal website and would like to find out where you got this from or exactly what the theme is named. Many thanks.

  55. Appreciate it for helping out, fantastic info. “Hope is the denial of reality.” by Margaret Weis.

  56. Some truly wonderful articles on this website , appreciate it for contribution.

  57. wszyscy klikamy

    2020-05-03 at 下午4:59

    Very good article post.Much thanks again. Will read on…

    wszyscyklikamy.pl

  58. Hey there! Do you know if they make any plugins to protect against hackers? I’m kinda paranoid about losing everything I’ve worked hard on. Any recommendations?

  59. As a Newbie, I am continuously browsing online for articles that can benefit me. Thank you

  60. I wanted to thank you for this wonderful read!! I definitely enjoyed every little bit of it. I’ve got you bookmarked to check out new stuff you post…

  61. This is a topic that’s near to my heart… Best wishes! Exactly where can I find the contact details for questions?

  62. Good article. I am experiencing some of these issues as well..

  63. When I originally commented I appear to have clicked the -Notify me when new comments are added- checkbox and from now on whenever a comment is added I get 4 emails with the same comment. Perhaps there is a means you can remove me from that service? Appreciate it.

  64. Howdy very nice website!! Man .. Beautiful .. Superb .. I’ll bookmark your site and take the feeds additionally¡KI am happy to find so many useful info right here within the post, we need develop more techniques in this regard, thanks for sharing. . . . . .

  65. That is a very good tip particularly to those new to the blogosphere. Brief but very accurate info… Appreciate your sharing this one. A must read article.

  66. I really like it when folks get together and share opinions. Great website, continue the good work!

  67. This is a topic which is close to my heart… Take care! Where are your contact details though?

  68. Hey! Do you know if they make any plugins to help with Search Engine Optimization? I’m trying to get my blog to rank for some targeted keywords but I’m not seeing very good results. If you know of any please share. Kudos!

  69. buy bitcoin with credit card

    2020-06-11 at 下午3:39

    You really make it seem so easy with your presentation but I find this matter to be really something that I think I would never understand. It seems too complicated and extremely broad for me. I’m looking forward for your next post, I’ll try to get the hang of it!

    vendency.com

  70. Best cbd oil companies 2020

    2020-07-08 at 上午2:50

    Pressure-Cost-free Journey By Organizing Your Holiday Proficiently With One Of These Ideas

    laweekly.com/5-best-cbd-oil-companies-to-buy-from-in-2019/

  71. best cbd brands

    2020-07-08 at 上午5:03

    Get The Very Best Tourists Advice & Suggestions On this page

    laweekly.com/5-best-cbd-oil-companies-to-buy-from-in-2019/

  72. best cbd oil 2020

    2020-07-08 at 上午7:41

    Pressure-Cost-free Journey By Organizing Your Holiday Proficiently With One Of These Ideas

    laweekly.com/5-best-cbd-oil-companies-to-buy-from-in-2019/

  73. Ensure You Investigate The Excellent, Vast World – Touring Suggestions To Help Keep You Sane

    laweekly.com/5-best-cbd-oil-companies-to-buy-from-in-2019/

  74. www.laweekly.com/5-best-cbd-oil-companies-to-buy-from-in-2019/

    2020-07-08 at 下午3:40

    Don’t Leave Home Without This Convenient Traveling Report!

    laweekly.com/5-best-cbd-oil-companies-to-buy-from-in-2019/

  75. http://www.laweekly.com/5-best-cbd-oil-companies-to-buy-from-in-2019/

    2020-07-08 at 下午6:01

    Journey Similar To A Jet-Setter Rather Than A Vacationer

    laweekly.com/5-best-cbd-oil-companies-to-buy-from-in-2019/

发表评论