seimin пре 3 година
родитељ
комит
67677a47a9

+ 539 - 0
assets/fonts/seimin/font/demo.css

@@ -0,0 +1,539 @@
1
+/* Logo 字体 */
2
+@font-face {
3
+  font-family: "iconfont logo";
4
+  src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
5
+  src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
6
+    url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
7
+    url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
8
+    url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
9
+}
10
+
11
+.logo {
12
+  font-family: "iconfont logo";
13
+  font-size: 160px;
14
+  font-style: normal;
15
+  -webkit-font-smoothing: antialiased;
16
+  -moz-osx-font-smoothing: grayscale;
17
+}
18
+
19
+/* tabs */
20
+.nav-tabs {
21
+  position: relative;
22
+}
23
+
24
+.nav-tabs .nav-more {
25
+  position: absolute;
26
+  right: 0;
27
+  bottom: 0;
28
+  height: 42px;
29
+  line-height: 42px;
30
+  color: #666;
31
+}
32
+
33
+#tabs {
34
+  border-bottom: 1px solid #eee;
35
+}
36
+
37
+#tabs li {
38
+  cursor: pointer;
39
+  width: 100px;
40
+  height: 40px;
41
+  line-height: 40px;
42
+  text-align: center;
43
+  font-size: 16px;
44
+  border-bottom: 2px solid transparent;
45
+  position: relative;
46
+  z-index: 1;
47
+  margin-bottom: -1px;
48
+  color: #666;
49
+}
50
+
51
+
52
+#tabs .active {
53
+  border-bottom-color: #f00;
54
+  color: #222;
55
+}
56
+
57
+.tab-container .content {
58
+  display: none;
59
+}
60
+
61
+/* 页面布局 */
62
+.main {
63
+  padding: 30px 100px;
64
+  width: 960px;
65
+  margin: 0 auto;
66
+}
67
+
68
+.main .logo {
69
+  color: #333;
70
+  text-align: left;
71
+  margin-bottom: 30px;
72
+  line-height: 1;
73
+  height: 110px;
74
+  margin-top: -50px;
75
+  overflow: hidden;
76
+  *zoom: 1;
77
+}
78
+
79
+.main .logo a {
80
+  font-size: 160px;
81
+  color: #333;
82
+}
83
+
84
+.helps {
85
+  margin-top: 40px;
86
+}
87
+
88
+.helps pre {
89
+  padding: 20px;
90
+  margin: 10px 0;
91
+  border: solid 1px #e7e1cd;
92
+  background-color: #fffdef;
93
+  overflow: auto;
94
+}
95
+
96
+.icon_lists {
97
+  width: 100% !important;
98
+  overflow: hidden;
99
+  *zoom: 1;
100
+}
101
+
102
+.icon_lists li {
103
+  width: 100px;
104
+  margin-bottom: 10px;
105
+  margin-right: 20px;
106
+  text-align: center;
107
+  list-style: none !important;
108
+  cursor: default;
109
+}
110
+
111
+.icon_lists li .code-name {
112
+  line-height: 1.2;
113
+}
114
+
115
+.icon_lists .icon {
116
+  display: block;
117
+  height: 100px;
118
+  line-height: 100px;
119
+  font-size: 42px;
120
+  margin: 10px auto;
121
+  color: #333;
122
+  -webkit-transition: font-size 0.25s linear, width 0.25s linear;
123
+  -moz-transition: font-size 0.25s linear, width 0.25s linear;
124
+  transition: font-size 0.25s linear, width 0.25s linear;
125
+}
126
+
127
+.icon_lists .icon:hover {
128
+  font-size: 100px;
129
+}
130
+
131
+.icon_lists .svg-icon {
132
+  /* 通过设置 font-size 来改变图标大小 */
133
+  width: 1em;
134
+  /* 图标和文字相邻时,垂直对齐 */
135
+  vertical-align: -0.15em;
136
+  /* 通过设置 color 来改变 SVG 的颜色/fill */
137
+  fill: currentColor;
138
+  /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
139
+      normalize.css 中也包含这行 */
140
+  overflow: hidden;
141
+}
142
+
143
+.icon_lists li .name,
144
+.icon_lists li .code-name {
145
+  color: #666;
146
+}
147
+
148
+/* markdown 样式 */
149
+.markdown {
150
+  color: #666;
151
+  font-size: 14px;
152
+  line-height: 1.8;
153
+}
154
+
155
+.highlight {
156
+  line-height: 1.5;
157
+}
158
+
159
+.markdown img {
160
+  vertical-align: middle;
161
+  max-width: 100%;
162
+}
163
+
164
+.markdown h1 {
165
+  color: #404040;
166
+  font-weight: 500;
167
+  line-height: 40px;
168
+  margin-bottom: 24px;
169
+}
170
+
171
+.markdown h2,
172
+.markdown h3,
173
+.markdown h4,
174
+.markdown h5,
175
+.markdown h6 {
176
+  color: #404040;
177
+  margin: 1.6em 0 0.6em 0;
178
+  font-weight: 500;
179
+  clear: both;
180
+}
181
+
182
+.markdown h1 {
183
+  font-size: 28px;
184
+}
185
+
186
+.markdown h2 {
187
+  font-size: 22px;
188
+}
189
+
190
+.markdown h3 {
191
+  font-size: 16px;
192
+}
193
+
194
+.markdown h4 {
195
+  font-size: 14px;
196
+}
197
+
198
+.markdown h5 {
199
+  font-size: 12px;
200
+}
201
+
202
+.markdown h6 {
203
+  font-size: 12px;
204
+}
205
+
206
+.markdown hr {
207
+  height: 1px;
208
+  border: 0;
209
+  background: #e9e9e9;
210
+  margin: 16px 0;
211
+  clear: both;
212
+}
213
+
214
+.markdown p {
215
+  margin: 1em 0;
216
+}
217
+
218
+.markdown>p,
219
+.markdown>blockquote,
220
+.markdown>.highlight,
221
+.markdown>ol,
222
+.markdown>ul {
223
+  width: 80%;
224
+}
225
+
226
+.markdown ul>li {
227
+  list-style: circle;
228
+}
229
+
230
+.markdown>ul li,
231
+.markdown blockquote ul>li {
232
+  margin-left: 20px;
233
+  padding-left: 4px;
234
+}
235
+
236
+.markdown>ul li p,
237
+.markdown>ol li p {
238
+  margin: 0.6em 0;
239
+}
240
+
241
+.markdown ol>li {
242
+  list-style: decimal;
243
+}
244
+
245
+.markdown>ol li,
246
+.markdown blockquote ol>li {
247
+  margin-left: 20px;
248
+  padding-left: 4px;
249
+}
250
+
251
+.markdown code {
252
+  margin: 0 3px;
253
+  padding: 0 5px;
254
+  background: #eee;
255
+  border-radius: 3px;
256
+}
257
+
258
+.markdown strong,
259
+.markdown b {
260
+  font-weight: 600;
261
+}
262
+
263
+.markdown>table {
264
+  border-collapse: collapse;
265
+  border-spacing: 0px;
266
+  empty-cells: show;
267
+  border: 1px solid #e9e9e9;
268
+  width: 95%;
269
+  margin-bottom: 24px;
270
+}
271
+
272
+.markdown>table th {
273
+  white-space: nowrap;
274
+  color: #333;
275
+  font-weight: 600;
276
+}
277
+
278
+.markdown>table th,
279
+.markdown>table td {
280
+  border: 1px solid #e9e9e9;
281
+  padding: 8px 16px;
282
+  text-align: left;
283
+}
284
+
285
+.markdown>table th {
286
+  background: #F7F7F7;
287
+}
288
+
289
+.markdown blockquote {
290
+  font-size: 90%;
291
+  color: #999;
292
+  border-left: 4px solid #e9e9e9;
293
+  padding-left: 0.8em;
294
+  margin: 1em 0;
295
+}
296
+
297
+.markdown blockquote p {
298
+  margin: 0;
299
+}
300
+
301
+.markdown .anchor {
302
+  opacity: 0;
303
+  transition: opacity 0.3s ease;
304
+  margin-left: 8px;
305
+}
306
+
307
+.markdown .waiting {
308
+  color: #ccc;
309
+}
310
+
311
+.markdown h1:hover .anchor,
312
+.markdown h2:hover .anchor,
313
+.markdown h3:hover .anchor,
314
+.markdown h4:hover .anchor,
315
+.markdown h5:hover .anchor,
316
+.markdown h6:hover .anchor {
317
+  opacity: 1;
318
+  display: inline-block;
319
+}
320
+
321
+.markdown>br,
322
+.markdown>p>br {
323
+  clear: both;
324
+}
325
+
326
+
327
+.hljs {
328
+  display: block;
329
+  background: white;
330
+  padding: 0.5em;
331
+  color: #333333;
332
+  overflow-x: auto;
333
+}
334
+
335
+.hljs-comment,
336
+.hljs-meta {
337
+  color: #969896;
338
+}
339
+
340
+.hljs-string,
341
+.hljs-variable,
342
+.hljs-template-variable,
343
+.hljs-strong,
344
+.hljs-emphasis,
345
+.hljs-quote {
346
+  color: #df5000;
347
+}
348
+
349
+.hljs-keyword,
350
+.hljs-selector-tag,
351
+.hljs-type {
352
+  color: #a71d5d;
353
+}
354
+
355
+.hljs-literal,
356
+.hljs-symbol,
357
+.hljs-bullet,
358
+.hljs-attribute {
359
+  color: #0086b3;
360
+}
361
+
362
+.hljs-section,
363
+.hljs-name {
364
+  color: #63a35c;
365
+}
366
+
367
+.hljs-tag {
368
+  color: #333333;
369
+}
370
+
371
+.hljs-title,
372
+.hljs-attr,
373
+.hljs-selector-id,
374
+.hljs-selector-class,
375
+.hljs-selector-attr,
376
+.hljs-selector-pseudo {
377
+  color: #795da3;
378
+}
379
+
380
+.hljs-addition {
381
+  color: #55a532;
382
+  background-color: #eaffea;
383
+}
384
+
385
+.hljs-deletion {
386
+  color: #bd2c00;
387
+  background-color: #ffecec;
388
+}
389
+
390
+.hljs-link {
391
+  text-decoration: underline;
392
+}
393
+
394
+/* 代码高亮 */
395
+/* PrismJS 1.15.0
396
+https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
397
+/**
398
+ * prism.js default theme for JavaScript, CSS and HTML
399
+ * Based on dabblet (http://dabblet.com)
400
+ * @author Lea Verou
401
+ */
402
+code[class*="language-"],
403
+pre[class*="language-"] {
404
+  color: black;
405
+  background: none;
406
+  text-shadow: 0 1px white;
407
+  font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
408
+  text-align: left;
409
+  white-space: pre;
410
+  word-spacing: normal;
411
+  word-break: normal;
412
+  word-wrap: normal;
413
+  line-height: 1.5;
414
+
415
+  -moz-tab-size: 4;
416
+  -o-tab-size: 4;
417
+  tab-size: 4;
418
+
419
+  -webkit-hyphens: none;
420
+  -moz-hyphens: none;
421
+  -ms-hyphens: none;
422
+  hyphens: none;
423
+}
424
+
425
+pre[class*="language-"]::-moz-selection,
426
+pre[class*="language-"] ::-moz-selection,
427
+code[class*="language-"]::-moz-selection,
428
+code[class*="language-"] ::-moz-selection {
429
+  text-shadow: none;
430
+  background: #b3d4fc;
431
+}
432
+
433
+pre[class*="language-"]::selection,
434
+pre[class*="language-"] ::selection,
435
+code[class*="language-"]::selection,
436
+code[class*="language-"] ::selection {
437
+  text-shadow: none;
438
+  background: #b3d4fc;
439
+}
440
+
441
+@media print {
442
+
443
+  code[class*="language-"],
444
+  pre[class*="language-"] {
445
+    text-shadow: none;
446
+  }
447
+}
448
+
449
+/* Code blocks */
450
+pre[class*="language-"] {
451
+  padding: 1em;
452
+  margin: .5em 0;
453
+  overflow: auto;
454
+}
455
+
456
+:not(pre)>code[class*="language-"],
457
+pre[class*="language-"] {
458
+  background: #f5f2f0;
459
+}
460
+
461
+/* Inline code */
462
+:not(pre)>code[class*="language-"] {
463
+  padding: .1em;
464
+  border-radius: .3em;
465
+  white-space: normal;
466
+}
467
+
468
+.token.comment,
469
+.token.prolog,
470
+.token.doctype,
471
+.token.cdata {
472
+  color: slategray;
473
+}
474
+
475
+.token.punctuation {
476
+  color: #999;
477
+}
478
+
479
+.namespace {
480
+  opacity: .7;
481
+}
482
+
483
+.token.property,
484
+.token.tag,
485
+.token.boolean,
486
+.token.number,
487
+.token.constant,
488
+.token.symbol,
489
+.token.deleted {
490
+  color: #905;
491
+}
492
+
493
+.token.selector,
494
+.token.attr-name,
495
+.token.string,
496
+.token.char,
497
+.token.builtin,
498
+.token.inserted {
499
+  color: #690;
500
+}
501
+
502
+.token.operator,
503
+.token.entity,
504
+.token.url,
505
+.language-css .token.string,
506
+.style .token.string {
507
+  color: #9a6e3a;
508
+  background: hsla(0, 0%, 100%, .5);
509
+}
510
+
511
+.token.atrule,
512
+.token.attr-value,
513
+.token.keyword {
514
+  color: #07a;
515
+}
516
+
517
+.token.function,
518
+.token.class-name {
519
+  color: #DD4A68;
520
+}
521
+
522
+.token.regex,
523
+.token.important,
524
+.token.variable {
525
+  color: #e90;
526
+}
527
+
528
+.token.important,
529
+.token.bold {
530
+  font-weight: bold;
531
+}
532
+
533
+.token.italic {
534
+  font-style: italic;
535
+}
536
+
537
+.token.entity {
538
+  cursor: help;
539
+}

+ 326 - 0
assets/fonts/seimin/font/demo_index.html

@@ -0,0 +1,326 @@
1
+<!DOCTYPE html>
2
+<html>
3
+<head>
4
+  <meta charset="utf-8"/>
5
+  <title>iconfont Demo</title>
6
+  <link rel="shortcut icon" href="//img.alicdn.com/imgextra/i2/O1CN01ZyAlrn1MwaMhqz36G_!!6000000001499-73-tps-64-64.ico" type="image/x-icon"/>
7
+  <link rel="icon" type="image/svg+xml" href="//img.alicdn.com/imgextra/i4/O1CN01EYTRnJ297D6vehehJ_!!6000000008020-55-tps-64-64.svg"/>
8
+  <link rel="stylesheet" href="https://g.alicdn.com/thx/cube/1.3.2/cube.min.css">
9
+  <link rel="stylesheet" href="demo.css">
10
+  <link rel="stylesheet" href="iconfont.css">
11
+  <script src="iconfont.js"></script>
12
+  <!-- jQuery -->
13
+  <script src="https://a1.alicdn.com/oss/uploads/2018/12/26/7bfddb60-08e8-11e9-9b04-53e73bb6408b.js"></script>
14
+  <!-- 代码高亮 -->
15
+  <script src="https://a1.alicdn.com/oss/uploads/2018/12/26/a3f714d0-08e6-11e9-8a15-ebf944d7534c.js"></script>
16
+  <style>
17
+    .main .logo {
18
+      margin-top: 0;
19
+      height: auto;
20
+    }
21
+
22
+    .main .logo a {
23
+      display: flex;
24
+      align-items: center;
25
+    }
26
+
27
+    .main .logo .sub-title {
28
+      margin-left: 0.5em;
29
+      font-size: 22px;
30
+      color: #fff;
31
+      background: linear-gradient(-45deg, #3967FF, #B500FE);
32
+      -webkit-background-clip: text;
33
+      -webkit-text-fill-color: transparent;
34
+    }
35
+  </style>
36
+</head>
37
+<body>
38
+  <div class="main">
39
+    <h1 class="logo"><a href="https://www.iconfont.cn/" title="iconfont 首页" target="_blank">
40
+      <img width="200" src="https://img.alicdn.com/imgextra/i3/O1CN01Mn65HV1FfSEzR6DKv_!!6000000000514-55-tps-228-59.svg">
41
+      
42
+    </a></h1>
43
+    <div class="nav-tabs">
44
+      <ul id="tabs" class="dib-box">
45
+        <li class="dib active"><span>Unicode</span></li>
46
+        <li class="dib"><span>Font class</span></li>
47
+        <li class="dib"><span>Symbol</span></li>
48
+      </ul>
49
+      
50
+      <a href="https://www.iconfont.cn/manage/index?manage_type=myprojects&projectId=2879659" target="_blank" class="nav-more">查看项目</a>
51
+      
52
+    </div>
53
+    <div class="tab-container">
54
+      <div class="content unicode" style="display: block;">
55
+          <ul class="icon_lists dib-box">
56
+          
57
+            <li class="dib">
58
+              <span class="icon dash">&#xe612;</span>
59
+                <div class="name">lock</div>
60
+                <div class="code-name">&amp;#xe612;</div>
61
+              </li>
62
+          
63
+            <li class="dib">
64
+              <span class="icon dash">&#xe69e;</span>
65
+                <div class="name">unlock</div>
66
+                <div class="code-name">&amp;#xe69e;</div>
67
+              </li>
68
+          
69
+            <li class="dib">
70
+              <span class="icon dash">&#xe8b5;</span>
71
+                <div class="name">扫一扫</div>
72
+                <div class="code-name">&amp;#xe8b5;</div>
73
+              </li>
74
+          
75
+            <li class="dib">
76
+              <span class="icon dash">&#xe609;</span>
77
+                <div class="name">fangdajing</div>
78
+                <div class="code-name">&amp;#xe609;</div>
79
+              </li>
80
+          
81
+            <li class="dib">
82
+              <span class="icon dash">&#xe7b7;</span>
83
+                <div class="name">查号</div>
84
+                <div class="code-name">&amp;#xe7b7;</div>
85
+              </li>
86
+          
87
+            <li class="dib">
88
+              <span class="icon dash">&#xe6bf;</span>
89
+                <div class="name">修改密码</div>
90
+                <div class="code-name">&amp;#xe6bf;</div>
91
+              </li>
92
+          
93
+          </ul>
94
+          <div class="article markdown">
95
+          <h2 id="unicode-">Unicode 引用</h2>
96
+          <hr>
97
+
98
+          <p>Unicode 是字体在网页端最原始的应用方式,特点是:</p>
99
+          <ul>
100
+            <li>支持按字体的方式去动态调整图标大小,颜色等等。</li>
101
+            <li>默认情况下不支持多色,直接添加多色图标会自动去色。</li>
102
+          </ul>
103
+          <blockquote>
104
+            <p>注意:新版 iconfont 支持两种方式引用多色图标:SVG symbol 引用方式和彩色字体图标模式。(使用彩色字体图标需要在「编辑项目」中开启「彩色」选项后并重新生成。)</p>
105
+          </blockquote>
106
+          <p>Unicode 使用步骤如下:</p>
107
+          <h3 id="-font-face">第一步:拷贝项目下面生成的 <code>@font-face</code></h3>
108
+<pre><code class="language-css"
109
+>@font-face {
110
+  font-family: 'dash';
111
+  src: url('iconfont.woff2?t=1641978201239') format('woff2'),
112
+       url('iconfont.woff?t=1641978201239') format('woff'),
113
+       url('iconfont.ttf?t=1641978201239') format('truetype');
114
+}
115
+</code></pre>
116
+          <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
117
+<pre><code class="language-css"
118
+>.dash {
119
+  font-family: "dash" !important;
120
+  font-size: 16px;
121
+  font-style: normal;
122
+  -webkit-font-smoothing: antialiased;
123
+  -moz-osx-font-smoothing: grayscale;
124
+}
125
+</code></pre>
126
+          <h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面</h3>
127
+<pre>
128
+<code class="language-html"
129
+>&lt;span class="dash"&gt;&amp;#x33;&lt;/span&gt;
130
+</code></pre>
131
+          <blockquote>
132
+            <p>"dash" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
133
+          </blockquote>
134
+          </div>
135
+      </div>
136
+      <div class="content font-class">
137
+        <ul class="icon_lists dib-box">
138
+          
139
+          <li class="dib">
140
+            <span class="icon dash dash-lock"></span>
141
+            <div class="name">
142
+              lock
143
+            </div>
144
+            <div class="code-name">.dash-lock
145
+            </div>
146
+          </li>
147
+          
148
+          <li class="dib">
149
+            <span class="icon dash dash-unlock"></span>
150
+            <div class="name">
151
+              unlock
152
+            </div>
153
+            <div class="code-name">.dash-unlock
154
+            </div>
155
+          </li>
156
+          
157
+          <li class="dib">
158
+            <span class="icon dash dash-saoyisao"></span>
159
+            <div class="name">
160
+              扫一扫
161
+            </div>
162
+            <div class="code-name">.dash-saoyisao
163
+            </div>
164
+          </li>
165
+          
166
+          <li class="dib">
167
+            <span class="icon dash dash-fangdajing"></span>
168
+            <div class="name">
169
+              fangdajing
170
+            </div>
171
+            <div class="code-name">.dash-fangdajing
172
+            </div>
173
+          </li>
174
+          
175
+          <li class="dib">
176
+            <span class="icon dash dash-chahao"></span>
177
+            <div class="name">
178
+              查号
179
+            </div>
180
+            <div class="code-name">.dash-chahao
181
+            </div>
182
+          </li>
183
+          
184
+          <li class="dib">
185
+            <span class="icon dash dash-xiugaimima"></span>
186
+            <div class="name">
187
+              修改密码
188
+            </div>
189
+            <div class="code-name">.dash-xiugaimima
190
+            </div>
191
+          </li>
192
+          
193
+        </ul>
194
+        <div class="article markdown">
195
+        <h2 id="font-class-">font-class 引用</h2>
196
+        <hr>
197
+
198
+        <p>font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。</p>
199
+        <p>与 Unicode 使用方式相比,具有如下特点:</p>
200
+        <ul>
201
+          <li>相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。</li>
202
+          <li>因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。</li>
203
+        </ul>
204
+        <p>使用步骤如下:</p>
205
+        <h3 id="-fontclass-">第一步:引入项目下面生成的 fontclass 代码:</h3>
206
+<pre><code class="language-html">&lt;link rel="stylesheet" href="./iconfont.css"&gt;
207
+</code></pre>
208
+        <h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h3>
209
+<pre><code class="language-html">&lt;span class="dash dash-xxx"&gt;&lt;/span&gt;
210
+</code></pre>
211
+        <blockquote>
212
+          <p>"
213
+            dash" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
214
+        </blockquote>
215
+      </div>
216
+      </div>
217
+      <div class="content symbol">
218
+          <ul class="icon_lists dib-box">
219
+          
220
+            <li class="dib">
221
+                <svg class="icon svg-icon" aria-hidden="true">
222
+                  <use xlink:href="#dash-lock"></use>
223
+                </svg>
224
+                <div class="name">lock</div>
225
+                <div class="code-name">#dash-lock</div>
226
+            </li>
227
+          
228
+            <li class="dib">
229
+                <svg class="icon svg-icon" aria-hidden="true">
230
+                  <use xlink:href="#dash-unlock"></use>
231
+                </svg>
232
+                <div class="name">unlock</div>
233
+                <div class="code-name">#dash-unlock</div>
234
+            </li>
235
+          
236
+            <li class="dib">
237
+                <svg class="icon svg-icon" aria-hidden="true">
238
+                  <use xlink:href="#dash-saoyisao"></use>
239
+                </svg>
240
+                <div class="name">扫一扫</div>
241
+                <div class="code-name">#dash-saoyisao</div>
242
+            </li>
243
+          
244
+            <li class="dib">
245
+                <svg class="icon svg-icon" aria-hidden="true">
246
+                  <use xlink:href="#dash-fangdajing"></use>
247
+                </svg>
248
+                <div class="name">fangdajing</div>
249
+                <div class="code-name">#dash-fangdajing</div>
250
+            </li>
251
+          
252
+            <li class="dib">
253
+                <svg class="icon svg-icon" aria-hidden="true">
254
+                  <use xlink:href="#dash-chahao"></use>
255
+                </svg>
256
+                <div class="name">查号</div>
257
+                <div class="code-name">#dash-chahao</div>
258
+            </li>
259
+          
260
+            <li class="dib">
261
+                <svg class="icon svg-icon" aria-hidden="true">
262
+                  <use xlink:href="#dash-xiugaimima"></use>
263
+                </svg>
264
+                <div class="name">修改密码</div>
265
+                <div class="code-name">#dash-xiugaimima</div>
266
+            </li>
267
+          
268
+          </ul>
269
+          <div class="article markdown">
270
+          <h2 id="symbol-">Symbol 引用</h2>
271
+          <hr>
272
+
273
+          <p>这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
274
+            这种用法其实是做了一个 SVG 的集合,与另外两种相比具有如下特点:</p>
275
+          <ul>
276
+            <li>支持多色图标了,不再受单色限制。</li>
277
+            <li>通过一些技巧,支持像字体那样,通过 <code>font-size</code>, <code>color</code> 来调整样式。</li>
278
+            <li>兼容性较差,支持 IE9+,及现代浏览器。</li>
279
+            <li>浏览器渲染 SVG 的性能一般,还不如 png。</li>
280
+          </ul>
281
+          <p>使用步骤如下:</p>
282
+          <h3 id="-symbol-">第一步:引入项目下面生成的 symbol 代码:</h3>
283
+<pre><code class="language-html">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;
284
+</code></pre>
285
+          <h3 id="-css-">第二步:加入通用 CSS 代码(引入一次就行):</h3>
286
+<pre><code class="language-html">&lt;style&gt;
287
+.icon {
288
+  width: 1em;
289
+  height: 1em;
290
+  vertical-align: -0.15em;
291
+  fill: currentColor;
292
+  overflow: hidden;
293
+}
294
+&lt;/style&gt;
295
+</code></pre>
296
+          <h3 id="-">第三步:挑选相应图标并获取类名,应用于页面:</h3>
297
+<pre><code class="language-html">&lt;svg class="icon" aria-hidden="true"&gt;
298
+  &lt;use xlink:href="#icon-xxx"&gt;&lt;/use&gt;
299
+&lt;/svg&gt;
300
+</code></pre>
301
+          </div>
302
+      </div>
303
+
304
+    </div>
305
+  </div>
306
+  <script>
307
+  $(document).ready(function () {
308
+      $('.tab-container .content:first').show()
309
+
310
+      $('#tabs li').click(function (e) {
311
+        var tabContent = $('.tab-container .content')
312
+        var index = $(this).index()
313
+
314
+        if ($(this).hasClass('active')) {
315
+          return
316
+        } else {
317
+          $('#tabs li').removeClass('active')
318
+          $(this).addClass('active')
319
+
320
+          tabContent.hide().eq(index).fadeIn()
321
+        }
322
+      })
323
+    })
324
+  </script>
325
+</body>
326
+</html>

+ 39 - 0
assets/fonts/seimin/font/iconfont.css

@@ -0,0 +1,39 @@
1
+@font-face {
2
+  font-family: "dash"; /* Project id 2879659 */
3
+  src: url('iconfont.woff2?t=1641978201239') format('woff2'),
4
+       url('iconfont.woff?t=1641978201239') format('woff'),
5
+       url('iconfont.ttf?t=1641978201239') format('truetype');
6
+}
7
+
8
+.dash {
9
+  font-family: "dash" !important;
10
+  font-size: 16px;
11
+  font-style: normal;
12
+  -webkit-font-smoothing: antialiased;
13
+  -moz-osx-font-smoothing: grayscale;
14
+}
15
+
16
+.dash-lock:before {
17
+  content: "\e612";
18
+}
19
+
20
+.dash-unlock:before {
21
+  content: "\e69e";
22
+}
23
+
24
+.dash-saoyisao:before {
25
+  content: "\e8b5";
26
+}
27
+
28
+.dash-fangdajing:before {
29
+  content: "\e609";
30
+}
31
+
32
+.dash-chahao:before {
33
+  content: "\e7b7";
34
+}
35
+
36
+.dash-xiugaimima:before {
37
+  content: "\e6bf";
38
+}
39
+

Разлика између датотеке није приказан због своје велике величине
+ 1 - 0
assets/fonts/seimin/font/iconfont.js


+ 51 - 0
assets/fonts/seimin/font/iconfont.json

@@ -0,0 +1,51 @@
1
+{
2
+  "id": "2879659",
3
+  "name": "ITSM(微信新)",
4
+  "font_family": "dash",
5
+  "css_prefix_text": "dash-",
6
+  "description": "引入一个新的字体图标",
7
+  "glyphs": [
8
+    {
9
+      "icon_id": "1802972",
10
+      "name": "lock",
11
+      "font_class": "lock",
12
+      "unicode": "e612",
13
+      "unicode_decimal": 58898
14
+    },
15
+    {
16
+      "icon_id": "10972117",
17
+      "name": "unlock",
18
+      "font_class": "unlock",
19
+      "unicode": "e69e",
20
+      "unicode_decimal": 59038
21
+    },
22
+    {
23
+      "icon_id": "11372685",
24
+      "name": "扫一扫",
25
+      "font_class": "saoyisao",
26
+      "unicode": "e8b5",
27
+      "unicode_decimal": 59573
28
+    },
29
+    {
30
+      "icon_id": "463375",
31
+      "name": "fangdajing",
32
+      "font_class": "fangdajing",
33
+      "unicode": "e609",
34
+      "unicode_decimal": 58889
35
+    },
36
+    {
37
+      "icon_id": "1788495",
38
+      "name": "查号",
39
+      "font_class": "chahao",
40
+      "unicode": "e7b7",
41
+      "unicode_decimal": 59319
42
+    },
43
+    {
44
+      "icon_id": "6282784",
45
+      "name": "修改密码",
46
+      "font_class": "xiugaimima",
47
+      "unicode": "e6bf",
48
+      "unicode_decimal": 59071
49
+    }
50
+  ]
51
+}

BIN
assets/fonts/seimin/font/iconfont.ttf


BIN
assets/fonts/seimin/font/iconfont.woff


BIN
assets/fonts/seimin/font/iconfont.woff2


+ 3 - 1
assets/i18n/en.json

@@ -16,7 +16,9 @@
16 16
   "modal":{
17 17
     "button": {
18 18
       "OK": "OK",
19
-      "CANCEL": "Cancel"
19
+      "CANCEL": "Cancel",
20
+      "NO": "NO",
21
+      "YES": "YES"
20 22
     }
21 23
   },
22 24
   "topbar": {

+ 3 - 1
assets/i18n/zh.json

@@ -65,7 +65,9 @@
65 65
             "SELECT": "选择确认",
66 66
             "CLOSE": "关闭窗口",
67 67
             "REFRESH": "刷新数据",
68
-            "TRAVERSAL": "遍历数据"
68
+            "TRAVERSAL": "遍历数据",
69
+            "NO": "否",
70
+            "YES": "是"
69 71
         }
70 72
     },
71 73
     "topbar": {

+ 1 - 1
assets/js/controllers/consumables/consumablesCtrl.js

@@ -987,7 +987,7 @@ app.controller('hc_consumablesCtrl', ["$scope", "$http", "i18nService", "$rootSc
987 987
                         // data.list
988 988
                         $scope.myData = myData.list;
989 989
                         myData.list.map(v=>{
990
-                            var ids = v.companyIds.split(',');
990
+                            var ids = v.companyIds?v.companyIds.split(','):[];
991 991
                             var strArr = [];
992 992
                             ids.forEach(v1=>{
993 993
                                 data.list.forEach(v2=>{

+ 359 - 122
assets/js/controllers/desk/chartCtrl.js

@@ -101,119 +101,149 @@ app.controller('chartCtrl', ["$scope", "i18nService", "$rootScope", "$state", "$
101 101
     $scope.gridOptions.getRowIdentity = function (row) {
102 102
         return row.id;
103 103
     };
104
+    //处理图标与文字
105
+    $scope.transfertip = function (item) {
106
+        var tip = "";
107
+        if (item.operationLog) {
108
+            tip = item.operationLog.userName;
109
+        }
110
+        return tip;
111
+    }
112
+    $scope.transferColor = function (item) {
113
+        var color = "";
114
+        if (item.operationLog) {
115
+            if (item.operationLog.opValue == 1) {
116
+                color = "dash dash-lock redfont";
117
+            } else {
118
+                color = "dash dash-unlock greenfont";
119
+            }
120
+        } else {
121
+            color = "dash dash-unlock greenfont";
122
+        }
123
+        return color;
124
+    }
104 125
     //表格列表显示
105 126
     if ($scope.repairMain.valueconfig == 1) {//报修主体为报修人
106
-        $scope.gridOptions.columnDefs = [{
107
-            name: 'item',
108
-            displayName: '序号',
109
-            width:50,
110
-            cellTemplate: '<div>' +
111
-                '<div class="ui-grid-cell-contents">{{row.entity.item}}</div>' +
112
-                '</div>'
113
-        },{
114
-            name: 'bxcode',
115
-            displayName: '报修单号',
116
-            width:150,
117
-            cellTemplate: '<div>' +
118
-                '<div class="ui-grid-cell-contents">{{row.entity.bxcode}}</div>' +
119
-                '</div>'
120
-        }, {
121
-            name: 'incidentDescription',
122
-            displayName: '事件描述',
123
-            width:150,
124
-            cellTemplate: '<div>' +
125
-                '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center"  >{{row.entity.incidentDescription}}</div>' +
126
-                '</div>'
127
-        },
128
-        // {
129
-        //     name: 'incidentDescription1',
130
-        //     displayName: '报修科室',
131
-        //     width: '12%',
132
-        //     cellTemplate: '<div>' +
133
-        //         '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center"  >{{row.entity.incidentDescription1}}</div>' +
134
-        //         '</div>'
135
-        // },
136
-        {
137
-            name: 'address',
138
-            displayName: '故障地点',
139
-            width:150,
140
-            cellTemplate: '<div>' +
141
-                '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center"  >{{row.entity.place.place||""}} {{row.entity.address}}</div>' +
142
-                '</div>'
143
-        }, {
144
-            name: 'contacts',
145
-            displayName: '联系人',
146
-            width:150,
147
-            cellTemplate: '<div>' +
148
-                '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center"  >{{row.entity.contacts}}</div>' +
149
-                '</div>'
150
-        },{
151
-            name: 'requester.account',
152
-            displayName: '学工号',
153
-            width:150,
154
-            cellTemplate: '<div>' +
155
-                '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center"  >{{row.entity.requester.account}}</div>' +
156
-                '</div>'
157
-        }, {
158
-            name: 'contactsInformation',
159
-            displayName: '联系电话',
160
-            width:150,
161
-            cellTemplate: '<div>' +
162
-                '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center"  >{{row.entity.contactsInformation}}</div>' +
163
-                '</div>'
164
-        },{
165
-            name: 'incident.acceptUser.name',
166
-            displayName: '受理人',
167
-            width:150,
168
-            cellTemplate: '<div>' +
169
-                '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center" ng-if="row.entity.incident&&row.entity.incident.acceptUser">{{row.entity.incident.acceptUser.name||""}}</div>' +
170
-                '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center" ng-if="row.entity.rejectUser">{{row.entity.rejectUser.name||""}}</div>' +
171
-                '</div>'
172
-        },
173
-        // {
174
-        //     name: 'requester.name',
175
-        //     displayName: '报修人',
176
-        //     width: '10%',
177
-        //     cellTemplate: '<div>' +
178
-        //         '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center"  >{{row.entity.requester.name}}</div>' +
179
-        //         '</div>'
180
-        // }, 
181
-        {
182
-            name: 'serviceState.name',
183
-            displayName: '状态',
184
-            width:150,
185
-            cellTemplate: '<div>' +
186
-                '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center"  >{{row.entity.serviceState.name}}</div>' +
187
-                '</div>'
188
-        }, {
189
-            name: 'createTime',
190
-            displayName: '报修时间',
191
-            width:150,
192
-            cellTemplate: '<div>' +
193
-                '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center">{{grid.appScope.transferTime(row.entity.createTime)}}</div>' +
194
-                '</div>'
127
+        $scope.gridOptions.columnDefs = [
128
+            {
129
+                name: 'id',
130
+                displayName: '',
131
+                width: 35,
132
+                cellTemplate: '<div>' +
133
+                    '<div class="ui-grid-cell-contents" tooltip={{grid.appScope.transfertip(row.entity)}} tooltip-placement="right"><i style="font-size: 18px !important;" class="{{grid.appScope.transferColor(row.entity)}}"></i></div></div>' +
134
+                    '</div>'
135
+            },
136
+            {
137
+                name: 'item',
138
+                displayName: '序号',
139
+                width: 50,
140
+                cellTemplate: '<div>' +
141
+                    '<div class="ui-grid-cell-contents">{{row.entity.item}}</div>' +
142
+                    '</div>'
143
+            }, {
144
+                name: 'bxcode',
145
+                displayName: '报修单号',
146
+                width: 150,
147
+                cellTemplate: '<div>' +
148
+                    '<div class="ui-grid-cell-contents">{{row.entity.bxcode}}</div>' +
149
+                    '</div>'
150
+            }, {
151
+                name: 'incidentDescription',
152
+                displayName: '事件描述',
153
+                width: 150,
154
+                cellTemplate: '<div>' +
155
+                    '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center"  >{{row.entity.incidentDescription}}</div>' +
156
+                    '</div>'
157
+            },
158
+            // {
159
+            //     name: 'incidentDescription1',
160
+            //     displayName: '报修科室',
161
+            //     width: '12%',
162
+            //     cellTemplate: '<div>' +
163
+            //         '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center"  >{{row.entity.incidentDescription1}}</div>' +
164
+            //         '</div>'
195 165
             // },
166
+            {
167
+                name: 'address',
168
+                displayName: '故障地点',
169
+                width: 150,
170
+                cellTemplate: '<div>' +
171
+                    '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center"  >{{row.entity.place.place||""}} {{row.entity.address}}</div>' +
172
+                    '</div>'
173
+            }, {
174
+                name: 'contacts',
175
+                displayName: '联系人',
176
+                width: 150,
177
+                cellTemplate: '<div>' +
178
+                    '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center"  >{{row.entity.contacts}}</div>' +
179
+                    '</div>'
180
+            }, {
181
+                name: 'requester.account',
182
+                displayName: '学工号',
183
+                width: 150,
184
+                cellTemplate: '<div>' +
185
+                    '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center"  >{{row.entity.requester.account}}</div>' +
186
+                    '</div>'
187
+            }, {
188
+                name: 'contactsInformation',
189
+                displayName: '联系电话',
190
+                width: 150,
191
+                cellTemplate: '<div>' +
192
+                    '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center"  >{{row.entity.contactsInformation}}</div>' +
193
+                    '</div>'
194
+            }, {
195
+                name: 'incident.acceptUser.name',
196
+                displayName: '受理人',
197
+                width: 150,
198
+                cellTemplate: '<div>' +
199
+                    '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center" ng-if="row.entity.incident&&row.entity.incident.acceptUser">{{row.entity.incident.acceptUser.name||""}}</div>' +
200
+                    '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center" ng-if="row.entity.rejectUser">{{row.entity.rejectUser.name||""}}</div>' +
201
+                    '</div>'
202
+            },
196 203
             // {
197
-            //     name: '生成事件',
198
-            //     width: 80,
199
-            //     cellTemplate: '<div class="links cl-effect-1">' +
200
-            //         '<a ng-click="grid.appScope.selectRowFunction(row.entity)" tooltip="新建事件" tooltip-placement="left"><i class="fa fa-pencil-square-o"></i></a>' +
204
+            //     name: 'requester.name',
205
+            //     displayName: '报修人',
206
+            //     width: '10%',
207
+            //     cellTemplate: '<div>' +
208
+            //         '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center"  >{{row.entity.requester.name}}</div>' +
201 209
             //         '</div>'
202
-        },
203
-        {
204
-            name: '操作',
205
-            width:200,
206
-            cellTemplate: '<wechatoperator item="row.entity" colobject="col">',
207
-            enableFiltering: false
208
-        }
210
+            // }, 
211
+            {
212
+                name: 'serviceState.name',
213
+                displayName: '状态',
214
+                width: 150,
215
+                cellTemplate: '<div>' +
216
+                    '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center"  >{{row.entity.serviceState.name}}</div>' +
217
+                    '</div>'
218
+            }, {
219
+                name: 'createTime',
220
+                displayName: '报修时间',
221
+                width: 150,
222
+                cellTemplate: '<div>' +
223
+                    '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center">{{grid.appScope.transferTime(row.entity.createTime)}}</div>' +
224
+                    '</div>'
225
+                // },
226
+                // {
227
+                //     name: '生成事件',
228
+                //     width: 80,
229
+                //     cellTemplate: '<div class="links cl-effect-1">' +
230
+                //         '<a ng-click="grid.appScope.selectRowFunction(row.entity)" tooltip="新建事件" tooltip-placement="left"><i class="fa fa-pencil-square-o"></i></a>' +
231
+                //         '</div>'
232
+            },
233
+            {
234
+                name: '操作',
235
+                width: 200,
236
+                cellTemplate: '<wechatoperator item="row.entity" colobject="col">',
237
+                enableFiltering: false
238
+            }
209 239
         ];
210 240
         // 是否展示资产
211
-        if($scope.wxIncidentWithCmdb == 1){
212
-            let index = $scope.gridOptions.columnDefs.findIndex(v=>v.name == 'address');
213
-            $scope.gridOptions.columnDefs.splice(index,0,{
241
+        if ($scope.wxIncidentWithCmdb == 1) {
242
+            let index = $scope.gridOptions.columnDefs.findIndex(v => v.name == 'address');
243
+            $scope.gridOptions.columnDefs.splice(index, 0, {
214 244
                 name: 'assetId',
215 245
                 displayName: '资产',
216
-                width:150
246
+                width: 150
217 247
             })
218 248
         }
219 249
     } else if ($scope.repairMain.valueconfig == 2) {//报修主体为科室
@@ -224,17 +254,17 @@ app.controller('chartCtrl', ["$scope", "i18nService", "$rootScope", "$state", "$
224 254
             cellTemplate: '<div>' +
225 255
                 '<div class="ui-grid-cell-contents">{{row.entity.item}}</div>' +
226 256
                 '</div>'
227
-        },{
257
+        }, {
228 258
             name: 'bxcode',
229 259
             displayName: '报修单号',
230
-            width:150,
260
+            width: 150,
231 261
             cellTemplate: '<div>' +
232 262
                 '<div class="ui-grid-cell-contents">{{row.entity.bxcode}}</div>' +
233 263
                 '</div>'
234 264
         }, {
235 265
             name: 'incidentDescription',
236 266
             displayName: '事件描述',
237
-            width:150,
267
+            width: 150,
238 268
             cellTemplate: '<div>' +
239 269
                 '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center"  >{{row.entity.incidentDescription}}</div>' +
240 270
                 '</div>'
@@ -250,28 +280,28 @@ app.controller('chartCtrl', ["$scope", "i18nService", "$rootScope", "$state", "$
250 280
         {
251 281
             name: 'address',
252 282
             displayName: '故障地点',
253
-            width:150,
283
+            width: 150,
254 284
             cellTemplate: '<div>' +
255 285
                 '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center"  >{{row.entity.place.place||""}} {{row.entity.address}}</div>' +
256 286
                 '</div>'
257 287
         }, {
258 288
             name: 'departmentDTO.dept',
259 289
             displayName: '报修科室',
260
-            width:150,
290
+            width: 150,
261 291
             cellTemplate: '<div>' +
262 292
                 '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center"  >{{row.entity.departmentDTO.dept}}</div>' +
263 293
                 '</div>'
264 294
         }, {
265 295
             name: 'contacts',
266 296
             displayName: '联系人',
267
-            width:150,
297
+            width: 150,
268 298
             cellTemplate: '<div>' +
269 299
                 '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center"  >{{row.entity.contacts}}</div>' +
270 300
                 '</div>'
271 301
         }, {
272 302
             name: 'contactsInformation',
273 303
             displayName: '联系电话',
274
-            width:150,
304
+            width: 150,
275 305
             cellTemplate: '<div>' +
276 306
                 '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center"  >{{row.entity.contactsInformation}}</div>' +
277 307
                 '</div>'
@@ -287,14 +317,14 @@ app.controller('chartCtrl', ["$scope", "i18nService", "$rootScope", "$state", "$
287 317
         {
288 318
             name: 'serviceState.name',
289 319
             displayName: '状态',
290
-            width:150,
320
+            width: 150,
291 321
             cellTemplate: '<div>' +
292 322
                 '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center"  >{{row.entity.serviceState.name}}</div>' +
293 323
                 '</div>'
294 324
         }, {
295 325
             name: 'createTime',
296 326
             displayName: '报修时间',
297
-            width:150,
327
+            width: 150,
298 328
             cellTemplate: '<div>' +
299 329
                 '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center">{{grid.appScope.transferTime(row.entity.createTime)}}</div>' +
300 330
                 '</div>'
@@ -308,7 +338,7 @@ app.controller('chartCtrl', ["$scope", "i18nService", "$rootScope", "$state", "$
308 338
         },
309 339
         {
310 340
             name: '操作',
311
-            width:200,
341
+            width: 200,
312 342
             cellTemplate: '<wechatoperator item="row.entity" colobject="col">',
313 343
             enableFiltering: false
314 344
         }
@@ -747,17 +777,17 @@ app.controller('chartCtrl', ["$scope", "i18nService", "$rootScope", "$state", "$
747 777
     $scope.timer = $interval(function () {
748 778
         $scope.refreshData2('expand-right', $scope.fileData);
749 779
     }, $rootScope.refreshTime);
750
-    
780
+
751 781
     console.log($state.params);
752
-    if($state.params.tab){
753
-        if($state.params.tab == '-1'){
782
+    if ($state.params.tab) {
783
+        if ($state.params.tab == '-1') {
754 784
             $scope.searchstate = '';
755 785
             $scope.fileData.wxincident = {};
756
-        }else{
786
+        } else {
757 787
             $scope.searchstate = $state.params.tab;
758 788
             $scope.fileData.wxincident.serviceState.id = $scope.searchstate;
759 789
         }
760
-    }else{
790
+    } else {
761 791
         //默认未受理
762 792
         $scope.searchstate = 1650;
763 793
         if (sessionStorage.getItem('jry_data')) {
@@ -771,11 +801,40 @@ app.controller('chartCtrl', ["$scope", "i18nService", "$rootScope", "$state", "$
771 801
     });
772 802
     $scope.refreshData('expand-right', $scope.fileData);
773 803
 }]);
774
-app.controller('Wechatoperator', ['$rootScope', '$http', '$scope', '$modal', function ($rootScope, $http, $scope, $modal) {
804
+app.controller('Wechatoperator', ['$rootScope', '$http', '$scope', '$modal', 'api_user_data', function ($rootScope, $http, $scope, $modal, api_user_data) {
775 805
     $scope.handle = false;
776 806
     $scope.see = false;
777 807
     $scope.toHandle = false;
778 808
     var loginUser = $rootScope.user;
809
+    // 是否是服务台经理
810
+    $scope.isFuwutaijingli = loginUser.role.filter(v => v.rolecode == 'call center admin').length > 0;
811
+    // 是否显示解除锁定
812
+    $scope.isUnLock = false;
813
+    console.log($scope.item)
814
+    if ($scope.item.operationLog) {
815
+        $scope.isUnLock = ($scope.item.operationLog.userId == loginUser.id) && ($scope.item.operationLog.opValue == 1);
816
+    } else {
817
+        $scope.isUnLock = false;
818
+    }
819
+    // 是否显示处理--锁定相关的操作
820
+    $scope.isChuli = false;
821
+    if ($scope.isFuwutaijingli) {
822
+        //如果有服务台经理角色
823
+        $scope.isChuli = true;
824
+    } else {
825
+        //如果没有服务台经理角色
826
+        if ($scope.item.operationLog) {
827
+            if ($scope.item.operationLog.opValue == 1) {
828
+                //如果锁定
829
+                $scope.isChuli = $scope.item.operationLog.userId == loginUser.id;
830
+            } else {
831
+                //如果没锁定
832
+                $scope.isChuli = true;
833
+            }
834
+        } else {
835
+            $scope.isChuli = true;
836
+        }
837
+    }
779 838
     $scope.chuli = false;
780 839
     for (var i = 0; i < loginUser.menu.length; i++) {
781 840
         if (loginUser.menu[i].link == "weixinbaozhang_chuli") {
@@ -808,9 +867,186 @@ app.controller('Wechatoperator', ['$rootScope', '$http', '$scope', '$modal', fun
808 867
     }
809 868
     //处理
810 869
     $scope.handleFn = function () {
811
-        $scope.colobject.grid.appScope.toHandleFunction($scope.item);
870
+        console.log($scope.item)
871
+        // $scope.colobject.grid.appScope.toHandleFunction($scope.item);
872
+        //是否包含服务台经理角色
873
+        var isFuwutaijingli = loginUser.role.filter(v => v.rolecode == 'call center admin').length > 0;
874
+        if (!isFuwutaijingli) {
875
+            if ($scope.item.operationLog) {
876
+                //有锁定操作记录的
877
+                var p1 = {
878
+                    idx: 0,
879
+                    sum: 1000,
880
+                    operationLog: {
881
+                        id: $scope.item.operationLog.id,
882
+                        extra1: $scope.item.id,
883
+                        opType: 'wxincidentLock'
884
+                    }
885
+                };
886
+                api_user_data.fetchDataList('operationLog', p1).then(function (result) {
887
+                    if (result.status == 200) {
888
+                        var opValue = result.list[0].opValue;//查询锁定状态
889
+                        var userName = result.list[0].userName;//查询锁定人
890
+                        var userId = result.list[0].userId;//查询锁定人ID
891
+                        if (opValue == 1&&userId!=loginUser.id) {
892
+                            //如果锁定了,并不是锁定人操作
893
+                            $modal.open({
894
+                                templateUrl: 'assets/views/delete.html',
895
+                                controller: function ($scope, scope, $modalInstance, api_user_data, SweetAlert) {
896
+                                    $scope.title = '提示';
897
+                                    $scope.connect = '该报修已被【' + userName + '】锁定!';
898
+                                    $scope.yesFlag = true;
899
+                                    //选择“取消”或“确定”
900
+                                    $scope.cancel = function () {
901
+                                        $modalInstance.dismiss('cancel');
902
+                                        scope.$parent.$parent.$parent.$parent.$parent.$parent.$parent.$parent.refreshData('expand-right', $scope.fileData);
903
+                                    };
904
+                                },
905
+                                size: 'sm',
906
+                                resolve: {
907
+                                    scope: function () {
908
+                                        return $scope;
909
+                                    }
910
+                                }
911
+                            });
912
+                        } else if(opValue == 1&&userId==loginUser.id){
913
+                            //如果锁定了,并是锁定人操作
914
+                            $scope.colobject.grid.appScope.toHandleFunction($scope.item);
915
+                        }else{
916
+                            //如果没有锁定
917
+                            $scope.operateUnLock($scope.item.operationLog.id)
918
+                        }
919
+                    }
920
+                })
921
+            } else {
922
+                //没有锁定记录的
923
+                $scope.operateUnLock();
924
+            }
925
+
926
+        } else {
927
+            $scope.colobject.grid.appScope.toHandleFunction($scope.item);
928
+        }
812 929
         // $scope.doEdit($scope.item.id);
813 930
     }
931
+    //是否锁定,id是日志ID,有是修改,没有是新增
932
+    $scope.operateUnLock = function (id) {
933
+        $modal.open({
934
+            templateUrl: 'assets/views/delete.html',
935
+            controller: function ($scope, scope, $modalInstance, api_user_data, SweetAlert) {
936
+                $scope.title = '提示';
937
+                $scope.connect = '是否锁定?锁定后其他人(服务台经理除外)无法操作此报修!';
938
+                $scope.noFlag = true;
939
+                //选择“是”
940
+                $scope.yes = function () {
941
+                    if (scope.item) {
942
+                        var postData = {
943
+                            operationLog: {
944
+                                extra1: scope.item.id,
945
+                                userId: loginUser.id,
946
+                                userName: loginUser.name,
947
+                                opType: 'wxincidentLock',
948
+                                opValue: '1'
949
+                            }
950
+                        };
951
+                        if(id){
952
+                            postData.operationLog.id = id;
953
+                        }
954
+                        api_user_data.addData('operationLog', postData).then(function (response) {
955
+                            if (response.data) {
956
+                                $modalInstance.dismiss('cancel');
957
+                                SweetAlert.swal({
958
+                                    title: "锁定成功!",
959
+                                    type: "success",
960
+                                    confirmButtonColor: "#007AFF"
961
+                                }, function () {
962
+                                    scope.colobject.grid.appScope.toHandleFunction(scope.item);
963
+                                });
964
+                            } else {
965
+                                SweetAlert.swal({
966
+                                    title: "操作异常!",
967
+                                    text: "系统异常,请稍后重试,或者联系管理员!",
968
+                                    type: "error"
969
+                                });
970
+                            }
971
+                        })
972
+                    }
973
+                };
974
+                //选择“取消”
975
+                $scope.cancel = function () {
976
+                    $modalInstance.dismiss('cancel');
977
+                };
978
+                //选择“否”
979
+                $scope.no = function () {
980
+                    $modalInstance.dismiss('cancel');
981
+                    scope.colobject.grid.appScope.toHandleFunction(scope.item);
982
+                };
983
+            },
984
+            size: 'sm',
985
+            resolve: {
986
+                scope: function () {
987
+                    return $scope;
988
+                }
989
+            }
990
+        });
991
+    }
992
+    //解锁
993
+    $scope.unLock = function(){
994
+        $modal.open({
995
+            templateUrl: 'assets/views/delete.html',
996
+            controller: function ($scope, scope, $modalInstance, api_user_data, SweetAlert) {
997
+                $scope.title = '提示';
998
+                $scope.connect = '是否解锁?';
999
+                $scope.noFlag = true;
1000
+                //选择“是”
1001
+                $scope.yes = function () {
1002
+                    if (scope.item) {
1003
+                        var postData = {
1004
+                            operationLog: {
1005
+                                id:scope.item.operationLog.id,
1006
+                                extra1: scope.item.id,
1007
+                                userId: loginUser.id,
1008
+                                userName: loginUser.name,
1009
+                                opType: 'wxincidentLock',
1010
+                                opValue: '0'
1011
+                            }
1012
+                        };
1013
+                        api_user_data.addData('operationLog', postData).then(function (response) {
1014
+                            if (response.data) {
1015
+                                $modalInstance.dismiss('cancel');
1016
+                                SweetAlert.swal({
1017
+                                    title: "解锁成功!",
1018
+                                    type: "success",
1019
+                                    confirmButtonColor: "#007AFF"
1020
+                                }, function () {
1021
+                                    scope.$parent.$parent.$parent.$parent.$parent.$parent.$parent.$parent.refreshData('expand-right', $scope.fileData);
1022
+                                });
1023
+                            } else {
1024
+                                SweetAlert.swal({
1025
+                                    title: "操作异常!",
1026
+                                    text: "系统异常,请稍后重试,或者联系管理员!",
1027
+                                    type: "error"
1028
+                                });
1029
+                            }
1030
+                        })
1031
+                    }
1032
+                };
1033
+                //选择“取消”
1034
+                $scope.cancel = function () {
1035
+                    $modalInstance.dismiss('cancel');
1036
+                };
1037
+                //选择“否”
1038
+                $scope.no = function () {
1039
+                    $modalInstance.dismiss('cancel');
1040
+                };
1041
+            },
1042
+            size: 'sm',
1043
+            resolve: {
1044
+                scope: function () {
1045
+                    return $scope;
1046
+                }
1047
+            }
1048
+        });
1049
+    }
814 1050
     //查看事件
815 1051
     $scope.seeIncident = function () {
816 1052
         $scope.colobject.grid.appScope.seeIncidentFunction($scope.item);
@@ -828,7 +1064,8 @@ app.directive('wechatoperator', function () {
828 1064
         template: '<div class="links cl-effect-1 ui-grid-cell-contents pull-left" >' +
829 1065
             // '<a ng-click="edit()"  ng-show="{{handle}}" tooltip="生成事件" tooltip-placement="left">生成事件</a>' +
830 1066
             // '<a ng-click="edit()" class="bianjifont">生成事件</a>' +
831
-            '<a ng-click="handleFn()"  ng-show="{{handle&&chuli}}" class="bianjifont">处理</a>' +
1067
+            '<a ng-click="handleFn()"  ng-show="{{(handle&&chuli)&&isChuli}}" class="bianjifont">处理</a>' +
1068
+            '<a ng-click="unLock()"  ng-show="{{isUnLock}}" class="bianjifont">解除锁定</a>' +
832 1069
             '<a ng-click="look()"  ng-show="{{see}}" class="bianjifont">查看</a>' +
833 1070
             // '<a ng-click="look()"  ng-show="{{toHandle}}" class="bianjifont">查看详情</a>' +
834 1071
             '<a ng-click="seeIncident()"  ng-show="{{toHandle}}" class="bianjifont">查看事件</a>' +

+ 11 - 2
assets/views/delete.html

@@ -9,8 +9,17 @@
9 9
     </div>
10 10
 </div>
11 11
 <div class="modal-footer modelfooter-hint pointfont padding-bottom-15">
12
-    <div type="button" class="btn btn-primary" ng-click="ok()" translate="modal.button.OK ">OK</div>
13
-    <div type="button" class=" btn btn-default" ng-click="cancel() " translate="modal.button.CANCEL ">Cancel</div>
12
+    <ng-container ng-if="noFlag&&!yesFlag">
13
+        <div type="button" class="btn btn-primary" ng-click="yes()" translate="modal.button.YES ">YES</div>
14
+        <div type="button" class=" btn btn-default" ng-click="no() " translate="modal.button.NO ">NO</div>
15
+    </ng-container>
16
+    <ng-container ng-if="yesFlag&&!noFlag">
17
+        <div type="button" class="btn btn-primary" ng-click="cancel()" translate="modal.button.OK ">OK</div>
18
+    </ng-container>
19
+    <ng-container ng-if="!noFlag&&!yesFlag">
20
+        <div type="button" class="btn btn-primary" ng-click="ok()" translate="modal.button.OK ">OK</div>
21
+        <div type="button" class=" btn btn-default" ng-click="cancel() " translate="modal.button.CANCEL ">Cancel</div>
22
+    </ng-container>
14 23
 </div>
15 24
 
16 25
 <!-- <div class="col-xs-12 padding-top-15 padding-bottom-15 subfooter center" ng-style='width'>

+ 1 - 0
index.html

@@ -35,6 +35,7 @@
35 35
     <link rel="stylesheet" href="assets/css/plugins.css">
36 36
     <link rel="stylesheet" type="text/css" href="assets/fonts/fontcvg/iconfont.css" />
37 37
     <link rel="stylesheet" type="text/css" href="assets/fonts/fontcvg/demo.css" />
38
+    <link rel="stylesheet" type="text/css" href="assets/fonts/seimin/font/iconfont.css" />
38 39
     <!-- <link rel="stylesheet" type="text/css" href="assets/css/svgIconFont/iconfont.css" />
39 40
     <link rel="stylesheet" type="text/css" href="assets/css/svgIconFont/demo.css" /> -->
40 41
     <link rel="stylesheet" type="text/css" href="assets/css/demo/demo3.css" />