Authored by 王涛

共通组件开发

Showing 36 changed files with 2001 additions and 369 deletions
1 # **说明** 1 # **说明**
2 - hg-monitor-web-base 基于天津现有功能作为基类 2 - hg-monitor-web-base 基于天津现有功能作为基类
3 -- hg-monitor-web-new 最新开发版本  
4 - hg-monitor-web-tj 天津21年10月后的个性化开发 3 - hg-monitor-web-tj 天津21年10月后的个性化开发
  4 +- hg-monitor-web-zj 杭州功能开发
5 5
6 -说明说明注意事项 版本开发,天津版本的开发可在base中修改,然后将代码复制到hg-monitor-web-tj代码中  
7 6
  7 +# **基础功能优化**
  8 +- 如果影响多个现场,则直接修改base工程下对应的接口和页面
  9 +- 各个地方的个性化优化,则使用文件覆盖的方式修改代码(在对应工程目录下创建相同的目录结构)
  10 +
  11 +# **功能升级**
  12 +- 某一个现场的功能需要在各个现场都升级的,则将代码复制到base中
  13 +- 如果升级某一个现场的版本,则将文件复制过去即可
@@ -10,24 +10,7 @@ @@ -10,24 +10,7 @@
10 margin-bottom: 6px; 10 margin-bottom: 6px;
11 } 11 }
12 12
13 -.assets-configmanager .tbl-header-class {  
14 - color: #1E9FFF;  
15 - font-weight: bold;  
16 -}  
17 -  
18 -.assets-configmanager .tbl-header-class th {  
19 - background: #EBF5F9 !important;  
20 - text-align: center;  
21 -}  
22 -  
23 -.assets-configmanager .tbl-header-class th .cell {  
24 - text-align: center !important;  
25 -}  
26 13
27 -.assets-configmanager .el-table__row td{  
28 - padding: 2px 0px;!important;  
29 - text-align: center;  
30 -}  
31 14
32 .config-view { 15 .config-view {
33 display: flex; 16 display: flex;
@@ -72,7 +55,10 @@ @@ -72,7 +55,10 @@
72 line-height: 40px; 55 line-height: 40px;
73 border: solid 1px #efefef; 56 border: solid 1px #efefef;
74 } 57 }
75 - 58 +.assets-configmanager .el-table__row td{
  59 + padding: 2px 0px;!important;
  60 + text-align: center;
  61 +}
76 /*.assets-configmanager .config-content-content::hover {*/ 62 /*.assets-configmanager .config-content-content::hover {*/
77 /*background-color: rgb(249, 249, 249);*/ 63 /*background-color: rgb(249, 249, 249);*/
78 /*}*/ 64 /*}*/
@@ -20,7 +20,13 @@ custom-class="config-dialog" @@ -20,7 +20,13 @@ custom-class="config-dialog"
20 .config-dialog .el-dialog__body{ 20 .config-dialog .el-dialog__body{
21 padding: 5px 10px!important; 21 padding: 5px 10px!important;
22 padding-bottom: 20px!important; 22 padding-bottom: 20px!important;
23 - min-height: 500px; 23 +}
  24 +
  25 +.el-form-item{
  26 + display: flex;
  27 +}
  28 +.el-form-item__content{
  29 + width: 60%;
24 } 30 }
25 31
26 32
@@ -5,3 +5,62 @@ @@ -5,3 +5,62 @@
5 text-align: left; 5 text-align: left;
6 height: 100%; 6 height: 100%;
7 } 7 }
  8 +
  9 +/*table-page start*/
  10 +/* 表格表头样式 header-row-class-name="tbl-header-class" */
  11 +.tbl-header-class {
  12 + color: #1E9FFF;
  13 + font-weight: bold;
  14 +}
  15 +.tbl-header-class th {
  16 + background: #EBF5F9 !important;
  17 + text-align: center;
  18 +}
  19 +.tbl-header-class th .cell {
  20 + text-align: center !important;
  21 +}
  22 +/* table-page end */
  23 +
  24 +/*穿梭框样式*/
  25 +.el-transfer .el-transfer-panel__item .el-checkbox__input{
  26 + left: 10px!important;
  27 +}
  28 +.el-transfer .el-transfer-panel{
  29 + width: 300px;
  30 +}
  31 +
  32 +.el-transfer .el-checkbox__label{
  33 + text-align: left;
  34 +}
  35 +
  36 +/*用户授权*/
  37 +.userright{
  38 + display: flex;
  39 + flex-direction: row;
  40 + flex-wrap: nowrap;
  41 + width: 210px;
  42 +}
  43 +.userright .userright-desc{
  44 + width: calc(100% - 23px);
  45 + text-align: left;
  46 + overflow: hidden;
  47 + text-overflow: ellipsis;
  48 +}
  49 +
  50 +.userright .userright-tag{
  51 + text-align: right;
  52 + width: 23px;
  53 + border-radius: 3px;
  54 + padding: 3px;
  55 + height: 15px;
  56 + line-height: 15px;
  57 + font-weight: bold;
  58 + font-size: 12px;
  59 +}
  60 +
  61 +.userright .users{
  62 + border: solid 1px rgb(179, 216, 255);
  63 +}
  64 +.userright .roles{
  65 + border: solid 1px rgb(251, 196, 196);
  66 +}
@@ -55,6 +55,120 @@ @@ -55,6 +55,120 @@
55 <ul class="icon_lists dib-box"> 55 <ul class="icon_lists dib-box">
56 56
57 <li class="dib"> 57 <li class="dib">
  58 + <span class="icon iconfont">&#xe610;</span>
  59 + <div class="name">目标库</div>
  60 + <div class="code-name">&amp;#xe610;</div>
  61 + </li>
  62 +
  63 + <li class="dib">
  64 + <span class="icon iconfont">&#xe612;</span>
  65 + <div class="name">下载</div>
  66 + <div class="code-name">&amp;#xe612;</div>
  67 + </li>
  68 +
  69 + <li class="dib">
  70 + <span class="icon iconfont">&#xe616;</span>
  71 + <div class="name">上传</div>
  72 + <div class="code-name">&amp;#xe616;</div>
  73 + </li>
  74 +
  75 + <li class="dib">
  76 + <span class="icon iconfont">&#xe61b;</span>
  77 + <div class="name">统计</div>
  78 + <div class="code-name">&amp;#xe61b;</div>
  79 + </li>
  80 +
  81 + <li class="dib">
  82 + <span class="icon iconfont">&#xe61c;</span>
  83 + <div class="name">权限</div>
  84 + <div class="code-name">&amp;#xe61c;</div>
  85 + </li>
  86 +
  87 + <li class="dib">
  88 + <span class="icon iconfont">&#xe61d;</span>
  89 + <div class="name">迎宾</div>
  90 + <div class="code-name">&amp;#xe61d;</div>
  91 + </li>
  92 +
  93 + <li class="dib">
  94 + <span class="icon iconfont">&#xe61e;</span>
  95 + <div class="name"></div>
  96 + <div class="code-name">&amp;#xe61e;</div>
  97 + </li>
  98 +
  99 + <li class="dib">
  100 + <span class="icon iconfont">&#xe621;</span>
  101 + <div class="name">删除</div>
  102 + <div class="code-name">&amp;#xe621;</div>
  103 + </li>
  104 +
  105 + <li class="dib">
  106 + <span class="icon iconfont">&#xe625;</span>
  107 + <div class="name">日志</div>
  108 + <div class="code-name">&amp;#xe625;</div>
  109 + </li>
  110 +
  111 + <li class="dib">
  112 + <span class="icon iconfont">&#xe626;</span>
  113 + <div class="name">告警</div>
  114 + <div class="code-name">&amp;#xe626;</div>
  115 + </li>
  116 +
  117 + <li class="dib">
  118 + <span class="icon iconfont">&#xe62e;</span>
  119 + <div class="name">流程</div>
  120 + <div class="code-name">&amp;#xe62e;</div>
  121 + </li>
  122 +
  123 + <li class="dib">
  124 + <span class="icon iconfont">&#xe65d;</span>
  125 + <div class="name">人员离开</div>
  126 + <div class="code-name">&amp;#xe65d;</div>
  127 + </li>
  128 +
  129 + <li class="dib">
  130 + <span class="icon iconfont">&#xe65e;</span>
  131 + <div class="name">人员进入</div>
  132 + <div class="code-name">&amp;#xe65e;</div>
  133 + </li>
  134 +
  135 + <li class="dib">
  136 + <span class="icon iconfont">&#xe660;</span>
  137 + <div class="name">轮巡</div>
  138 + <div class="code-name">&amp;#xe660;</div>
  139 + </li>
  140 +
  141 + <li class="dib">
  142 + <span class="icon iconfont">&#xe60f;</span>
  143 + <div class="name">好友</div>
  144 + <div class="code-name">&amp;#xe60f;</div>
  145 + </li>
  146 +
  147 + <li class="dib">
  148 + <span class="icon iconfont">&#xe8c8;</span>
  149 + <div class="name">224用户</div>
  150 + <div class="code-name">&amp;#xe8c8;</div>
  151 + </li>
  152 +
  153 + <li class="dib">
  154 + <span class="icon iconfont">&#xea62;</span>
  155 + <div class="name">角色管理</div>
  156 + <div class="code-name">&amp;#xea62;</div>
  157 + </li>
  158 +
  159 + <li class="dib">
  160 + <span class="icon iconfont">&#xe60d;</span>
  161 + <div class="name">列表模式</div>
  162 + <div class="code-name">&amp;#xe60d;</div>
  163 + </li>
  164 +
  165 + <li class="dib">
  166 + <span class="icon iconfont">&#xe62d;</span>
  167 + <div class="name">列表</div>
  168 + <div class="code-name">&amp;#xe62d;</div>
  169 + </li>
  170 +
  171 + <li class="dib">
58 <span class="icon iconfont">&#xe60c;</span> 172 <span class="icon iconfont">&#xe60c;</span>
59 <div class="name">AK-BT_对勾_B</div> 173 <div class="name">AK-BT_对勾_B</div>
60 <div class="code-name">&amp;#xe60c;</div> 174 <div class="code-name">&amp;#xe60c;</div>
@@ -378,9 +492,9 @@ @@ -378,9 +492,9 @@
378 <pre><code class="language-css" 492 <pre><code class="language-css"
379 >@font-face { 493 >@font-face {
380 font-family: 'iconfont'; 494 font-family: 'iconfont';
381 - src: url('iconfont.woff2?t=1632921801844') format('woff2'),  
382 - url('iconfont.woff?t=1632921801844') format('woff'),  
383 - url('iconfont.ttf?t=1632921801844') format('truetype'); 495 + src: url('iconfont.woff2?t=1633773106250') format('woff2'),
  496 + url('iconfont.woff?t=1633773106250') format('woff'),
  497 + url('iconfont.ttf?t=1633773106250') format('truetype');
384 } 498 }
385 </code></pre> 499 </code></pre>
386 <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3> 500 <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@@ -407,6 +521,177 @@ @@ -407,6 +521,177 @@
407 <ul class="icon_lists dib-box"> 521 <ul class="icon_lists dib-box">
408 522
409 <li class="dib"> 523 <li class="dib">
  524 + <span class="icon iconfont icon-icon--mubiaoku"></span>
  525 + <div class="name">
  526 + 目标库
  527 + </div>
  528 + <div class="code-name">.icon-icon--mubiaoku
  529 + </div>
  530 + </li>
  531 +
  532 + <li class="dib">
  533 + <span class="icon iconfont icon-icon--download"></span>
  534 + <div class="name">
  535 + 下载
  536 + </div>
  537 + <div class="code-name">.icon-icon--download
  538 + </div>
  539 + </li>
  540 +
  541 + <li class="dib">
  542 + <span class="icon iconfont icon-icon--shangchuan"></span>
  543 + <div class="name">
  544 + 上传
  545 + </div>
  546 + <div class="code-name">.icon-icon--shangchuan
  547 + </div>
  548 + </li>
  549 +
  550 + <li class="dib">
  551 + <span class="icon iconfont icon-icon--tongji"></span>
  552 + <div class="name">
  553 + 统计
  554 + </div>
  555 + <div class="code-name">.icon-icon--tongji
  556 + </div>
  557 + </li>
  558 +
  559 + <li class="dib">
  560 + <span class="icon iconfont icon-icon--quanxian"></span>
  561 + <div class="name">
  562 + 权限
  563 + </div>
  564 + <div class="code-name">.icon-icon--quanxian
  565 + </div>
  566 + </li>
  567 +
  568 + <li class="dib">
  569 + <span class="icon iconfont icon-icon--yingbing"></span>
  570 + <div class="name">
  571 + 迎宾
  572 + </div>
  573 + <div class="code-name">.icon-icon--yingbing
  574 + </div>
  575 + </li>
  576 +
  577 + <li class="dib">
  578 + <span class="icon iconfont icon-icon--yes"></span>
  579 + <div class="name">
  580 +
  581 + </div>
  582 + <div class="code-name">.icon-icon--yes
  583 + </div>
  584 + </li>
  585 +
  586 + <li class="dib">
  587 + <span class="icon iconfont icon-icon--shanchu"></span>
  588 + <div class="name">
  589 + 删除
  590 + </div>
  591 + <div class="code-name">.icon-icon--shanchu
  592 + </div>
  593 + </li>
  594 +
  595 + <li class="dib">
  596 + <span class="icon iconfont icon-icon-rizhi"></span>
  597 + <div class="name">
  598 + 日志
  599 + </div>
  600 + <div class="code-name">.icon-icon-rizhi
  601 + </div>
  602 + </li>
  603 +
  604 + <li class="dib">
  605 + <span class="icon iconfont icon-icon-gaojing"></span>
  606 + <div class="name">
  607 + 告警
  608 + </div>
  609 + <div class="code-name">.icon-icon-gaojing
  610 + </div>
  611 + </li>
  612 +
  613 + <li class="dib">
  614 + <span class="icon iconfont icon-icon-liucheng"></span>
  615 + <div class="name">
  616 + 流程
  617 + </div>
  618 + <div class="code-name">.icon-icon-liucheng
  619 + </div>
  620 + </li>
  621 +
  622 + <li class="dib">
  623 + <span class="icon iconfont icon-yuangongchelianglika"></span>
  624 + <div class="name">
  625 + 人员离开
  626 + </div>
  627 + <div class="code-name">.icon-yuangongchelianglika
  628 + </div>
  629 + </li>
  630 +
  631 + <li class="dib">
  632 + <span class="icon iconfont icon-yuangongcheliangjinr"></span>
  633 + <div class="name">
  634 + 人员进入
  635 + </div>
  636 + <div class="code-name">.icon-yuangongcheliangjinr
  637 + </div>
  638 + </li>
  639 +
  640 + <li class="dib">
  641 + <span class="icon iconfont icon-lunxun"></span>
  642 + <div class="name">
  643 + 轮巡
  644 + </div>
  645 + <div class="code-name">.icon-lunxun
  646 + </div>
  647 + </li>
  648 +
  649 + <li class="dib">
  650 + <span class="icon iconfont icon-haoyou"></span>
  651 + <div class="name">
  652 + 好友
  653 + </div>
  654 + <div class="code-name">.icon-haoyou
  655 + </div>
  656 + </li>
  657 +
  658 + <li class="dib">
  659 + <span class="icon iconfont icon-yonghu"></span>
  660 + <div class="name">
  661 + 224用户
  662 + </div>
  663 + <div class="code-name">.icon-yonghu
  664 + </div>
  665 + </li>
  666 +
  667 + <li class="dib">
  668 + <span class="icon iconfont icon-jiaoseguanli"></span>
  669 + <div class="name">
  670 + 角色管理
  671 + </div>
  672 + <div class="code-name">.icon-jiaoseguanli
  673 + </div>
  674 + </li>
  675 +
  676 + <li class="dib">
  677 + <span class="icon iconfont icon-liebiaomoshi"></span>
  678 + <div class="name">
  679 + 列表模式
  680 + </div>
  681 + <div class="code-name">.icon-liebiaomoshi
  682 + </div>
  683 + </li>
  684 +
  685 + <li class="dib">
  686 + <span class="icon iconfont icon-liebiao"></span>
  687 + <div class="name">
  688 + 列表
  689 + </div>
  690 + <div class="code-name">.icon-liebiao
  691 + </div>
  692 + </li>
  693 +
  694 + <li class="dib">
410 <span class="icon iconfont icon-bt_duigou_B"></span> 695 <span class="icon iconfont icon-bt_duigou_B"></span>
411 <div class="name"> 696 <div class="name">
412 AK-BT_对勾_B 697 AK-BT_对勾_B
@@ -894,6 +1179,158 @@ @@ -894,6 +1179,158 @@
894 1179
895 <li class="dib"> 1180 <li class="dib">
896 <svg class="icon svg-icon" aria-hidden="true"> 1181 <svg class="icon svg-icon" aria-hidden="true">
  1182 + <use xlink:href="#icon-icon--mubiaoku"></use>
  1183 + </svg>
  1184 + <div class="name">目标库</div>
  1185 + <div class="code-name">#icon-icon--mubiaoku</div>
  1186 + </li>
  1187 +
  1188 + <li class="dib">
  1189 + <svg class="icon svg-icon" aria-hidden="true">
  1190 + <use xlink:href="#icon-icon--download"></use>
  1191 + </svg>
  1192 + <div class="name">下载</div>
  1193 + <div class="code-name">#icon-icon--download</div>
  1194 + </li>
  1195 +
  1196 + <li class="dib">
  1197 + <svg class="icon svg-icon" aria-hidden="true">
  1198 + <use xlink:href="#icon-icon--shangchuan"></use>
  1199 + </svg>
  1200 + <div class="name">上传</div>
  1201 + <div class="code-name">#icon-icon--shangchuan</div>
  1202 + </li>
  1203 +
  1204 + <li class="dib">
  1205 + <svg class="icon svg-icon" aria-hidden="true">
  1206 + <use xlink:href="#icon-icon--tongji"></use>
  1207 + </svg>
  1208 + <div class="name">统计</div>
  1209 + <div class="code-name">#icon-icon--tongji</div>
  1210 + </li>
  1211 +
  1212 + <li class="dib">
  1213 + <svg class="icon svg-icon" aria-hidden="true">
  1214 + <use xlink:href="#icon-icon--quanxian"></use>
  1215 + </svg>
  1216 + <div class="name">权限</div>
  1217 + <div class="code-name">#icon-icon--quanxian</div>
  1218 + </li>
  1219 +
  1220 + <li class="dib">
  1221 + <svg class="icon svg-icon" aria-hidden="true">
  1222 + <use xlink:href="#icon-icon--yingbing"></use>
  1223 + </svg>
  1224 + <div class="name">迎宾</div>
  1225 + <div class="code-name">#icon-icon--yingbing</div>
  1226 + </li>
  1227 +
  1228 + <li class="dib">
  1229 + <svg class="icon svg-icon" aria-hidden="true">
  1230 + <use xlink:href="#icon-icon--yes"></use>
  1231 + </svg>
  1232 + <div class="name"></div>
  1233 + <div class="code-name">#icon-icon--yes</div>
  1234 + </li>
  1235 +
  1236 + <li class="dib">
  1237 + <svg class="icon svg-icon" aria-hidden="true">
  1238 + <use xlink:href="#icon-icon--shanchu"></use>
  1239 + </svg>
  1240 + <div class="name">删除</div>
  1241 + <div class="code-name">#icon-icon--shanchu</div>
  1242 + </li>
  1243 +
  1244 + <li class="dib">
  1245 + <svg class="icon svg-icon" aria-hidden="true">
  1246 + <use xlink:href="#icon-icon-rizhi"></use>
  1247 + </svg>
  1248 + <div class="name">日志</div>
  1249 + <div class="code-name">#icon-icon-rizhi</div>
  1250 + </li>
  1251 +
  1252 + <li class="dib">
  1253 + <svg class="icon svg-icon" aria-hidden="true">
  1254 + <use xlink:href="#icon-icon-gaojing"></use>
  1255 + </svg>
  1256 + <div class="name">告警</div>
  1257 + <div class="code-name">#icon-icon-gaojing</div>
  1258 + </li>
  1259 +
  1260 + <li class="dib">
  1261 + <svg class="icon svg-icon" aria-hidden="true">
  1262 + <use xlink:href="#icon-icon-liucheng"></use>
  1263 + </svg>
  1264 + <div class="name">流程</div>
  1265 + <div class="code-name">#icon-icon-liucheng</div>
  1266 + </li>
  1267 +
  1268 + <li class="dib">
  1269 + <svg class="icon svg-icon" aria-hidden="true">
  1270 + <use xlink:href="#icon-yuangongchelianglika"></use>
  1271 + </svg>
  1272 + <div class="name">人员离开</div>
  1273 + <div class="code-name">#icon-yuangongchelianglika</div>
  1274 + </li>
  1275 +
  1276 + <li class="dib">
  1277 + <svg class="icon svg-icon" aria-hidden="true">
  1278 + <use xlink:href="#icon-yuangongcheliangjinr"></use>
  1279 + </svg>
  1280 + <div class="name">人员进入</div>
  1281 + <div class="code-name">#icon-yuangongcheliangjinr</div>
  1282 + </li>
  1283 +
  1284 + <li class="dib">
  1285 + <svg class="icon svg-icon" aria-hidden="true">
  1286 + <use xlink:href="#icon-lunxun"></use>
  1287 + </svg>
  1288 + <div class="name">轮巡</div>
  1289 + <div class="code-name">#icon-lunxun</div>
  1290 + </li>
  1291 +
  1292 + <li class="dib">
  1293 + <svg class="icon svg-icon" aria-hidden="true">
  1294 + <use xlink:href="#icon-haoyou"></use>
  1295 + </svg>
  1296 + <div class="name">好友</div>
  1297 + <div class="code-name">#icon-haoyou</div>
  1298 + </li>
  1299 +
  1300 + <li class="dib">
  1301 + <svg class="icon svg-icon" aria-hidden="true">
  1302 + <use xlink:href="#icon-yonghu"></use>
  1303 + </svg>
  1304 + <div class="name">224用户</div>
  1305 + <div class="code-name">#icon-yonghu</div>
  1306 + </li>
  1307 +
  1308 + <li class="dib">
  1309 + <svg class="icon svg-icon" aria-hidden="true">
  1310 + <use xlink:href="#icon-jiaoseguanli"></use>
  1311 + </svg>
  1312 + <div class="name">角色管理</div>
  1313 + <div class="code-name">#icon-jiaoseguanli</div>
  1314 + </li>
  1315 +
  1316 + <li class="dib">
  1317 + <svg class="icon svg-icon" aria-hidden="true">
  1318 + <use xlink:href="#icon-liebiaomoshi"></use>
  1319 + </svg>
  1320 + <div class="name">列表模式</div>
  1321 + <div class="code-name">#icon-liebiaomoshi</div>
  1322 + </li>
  1323 +
  1324 + <li class="dib">
  1325 + <svg class="icon svg-icon" aria-hidden="true">
  1326 + <use xlink:href="#icon-liebiao"></use>
  1327 + </svg>
  1328 + <div class="name">列表</div>
  1329 + <div class="code-name">#icon-liebiao</div>
  1330 + </li>
  1331 +
  1332 + <li class="dib">
  1333 + <svg class="icon svg-icon" aria-hidden="true">
897 <use xlink:href="#icon-bt_duigou_B"></use> 1334 <use xlink:href="#icon-bt_duigou_B"></use>
898 </svg> 1335 </svg>
899 <div class="name">AK-BT_对勾_B</div> 1336 <div class="name">AK-BT_对勾_B</div>
1 @font-face { 1 @font-face {
2 font-family: "iconfont"; /* Project id 2843738 */ 2 font-family: "iconfont"; /* Project id 2843738 */
3 - src: url('iconfont.woff2?t=1632921801844') format('woff2'),  
4 - url('iconfont.woff?t=1632921801844') format('woff'),  
5 - url('iconfont.ttf?t=1632921801844') format('truetype'); 3 + src: url('iconfont.woff2?t=1633773106250') format('woff2'),
  4 + url('iconfont.woff?t=1633773106250') format('woff'),
  5 + url('iconfont.ttf?t=1633773106250') format('truetype');
6 } 6 }
7 7
8 .iconfont { 8 .iconfont {
@@ -13,6 +13,82 @@ @@ -13,6 +13,82 @@
13 -moz-osx-font-smoothing: grayscale; 13 -moz-osx-font-smoothing: grayscale;
14 } 14 }
15 15
  16 +.icon-icon--mubiaoku:before {
  17 + content: "\e610";
  18 +}
  19 +
  20 +.icon-icon--download:before {
  21 + content: "\e612";
  22 +}
  23 +
  24 +.icon-icon--shangchuan:before {
  25 + content: "\e616";
  26 +}
  27 +
  28 +.icon-icon--tongji:before {
  29 + content: "\e61b";
  30 +}
  31 +
  32 +.icon-icon--quanxian:before {
  33 + content: "\e61c";
  34 +}
  35 +
  36 +.icon-icon--yingbing:before {
  37 + content: "\e61d";
  38 +}
  39 +
  40 +.icon-icon--yes:before {
  41 + content: "\e61e";
  42 +}
  43 +
  44 +.icon-icon--shanchu:before {
  45 + content: "\e621";
  46 +}
  47 +
  48 +.icon-icon-rizhi:before {
  49 + content: "\e625";
  50 +}
  51 +
  52 +.icon-icon-gaojing:before {
  53 + content: "\e626";
  54 +}
  55 +
  56 +.icon-icon-liucheng:before {
  57 + content: "\e62e";
  58 +}
  59 +
  60 +.icon-yuangongchelianglika:before {
  61 + content: "\e65d";
  62 +}
  63 +
  64 +.icon-yuangongcheliangjinr:before {
  65 + content: "\e65e";
  66 +}
  67 +
  68 +.icon-lunxun:before {
  69 + content: "\e660";
  70 +}
  71 +
  72 +.icon-haoyou:before {
  73 + content: "\e60f";
  74 +}
  75 +
  76 +.icon-yonghu:before {
  77 + content: "\e8c8";
  78 +}
  79 +
  80 +.icon-jiaoseguanli:before {
  81 + content: "\ea62";
  82 +}
  83 +
  84 +.icon-liebiaomoshi:before {
  85 + content: "\e60d";
  86 +}
  87 +
  88 +.icon-liebiao:before {
  89 + content: "\e62d";
  90 +}
  91 +
16 .icon-bt_duigou_B:before { 92 .icon-bt_duigou_B:before {
17 content: "\e60c"; 93 content: "\e60c";
18 } 94 }
@@ -6,6 +6,139 @@ @@ -6,6 +6,139 @@
6 "description": "", 6 "description": "",
7 "glyphs": [ 7 "glyphs": [
8 { 8 {
  9 + "icon_id": "6501157",
  10 + "name": "目标库",
  11 + "font_class": "icon--mubiaoku",
  12 + "unicode": "e610",
  13 + "unicode_decimal": 58896
  14 + },
  15 + {
  16 + "icon_id": "6501167",
  17 + "name": "下载",
  18 + "font_class": "icon--download",
  19 + "unicode": "e612",
  20 + "unicode_decimal": 58898
  21 + },
  22 + {
  23 + "icon_id": "6501175",
  24 + "name": "上传",
  25 + "font_class": "icon--shangchuan",
  26 + "unicode": "e616",
  27 + "unicode_decimal": 58902
  28 + },
  29 + {
  30 + "icon_id": "6501180",
  31 + "name": "统计",
  32 + "font_class": "icon--tongji",
  33 + "unicode": "e61b",
  34 + "unicode_decimal": 58907
  35 + },
  36 + {
  37 + "icon_id": "6501181",
  38 + "name": "权限",
  39 + "font_class": "icon--quanxian",
  40 + "unicode": "e61c",
  41 + "unicode_decimal": 58908
  42 + },
  43 + {
  44 + "icon_id": "6501197",
  45 + "name": "迎宾",
  46 + "font_class": "icon--yingbing",
  47 + "unicode": "e61d",
  48 + "unicode_decimal": 58909
  49 + },
  50 + {
  51 + "icon_id": "6501235",
  52 + "name": "对",
  53 + "font_class": "icon--yes",
  54 + "unicode": "e61e",
  55 + "unicode_decimal": 58910
  56 + },
  57 + {
  58 + "icon_id": "6501295",
  59 + "name": "删除",
  60 + "font_class": "icon--shanchu",
  61 + "unicode": "e621",
  62 + "unicode_decimal": 58913
  63 + },
  64 + {
  65 + "icon_id": "6501299",
  66 + "name": "日志",
  67 + "font_class": "icon-rizhi",
  68 + "unicode": "e625",
  69 + "unicode_decimal": 58917
  70 + },
  71 + {
  72 + "icon_id": "6501308",
  73 + "name": "告警",
  74 + "font_class": "icon-gaojing",
  75 + "unicode": "e626",
  76 + "unicode_decimal": 58918
  77 + },
  78 + {
  79 + "icon_id": "6501325",
  80 + "name": "流程",
  81 + "font_class": "icon-liucheng",
  82 + "unicode": "e62e",
  83 + "unicode_decimal": 58926
  84 + },
  85 + {
  86 + "icon_id": "7087610",
  87 + "name": "人员离开",
  88 + "font_class": "yuangongchelianglika",
  89 + "unicode": "e65d",
  90 + "unicode_decimal": 58973
  91 + },
  92 + {
  93 + "icon_id": "7087612",
  94 + "name": "人员进入",
  95 + "font_class": "yuangongcheliangjinr",
  96 + "unicode": "e65e",
  97 + "unicode_decimal": 58974
  98 + },
  99 + {
  100 + "icon_id": "7098261",
  101 + "name": "轮巡",
  102 + "font_class": "lunxun",
  103 + "unicode": "e660",
  104 + "unicode_decimal": 58976
  105 + },
  106 + {
  107 + "icon_id": "1260",
  108 + "name": "好友",
  109 + "font_class": "haoyou",
  110 + "unicode": "e60f",
  111 + "unicode_decimal": 58895
  112 + },
  113 + {
  114 + "icon_id": "1727459",
  115 + "name": "224用户",
  116 + "font_class": "yonghu",
  117 + "unicode": "e8c8",
  118 + "unicode_decimal": 59592
  119 + },
  120 + {
  121 + "icon_id": "742126",
  122 + "name": "角色管理",
  123 + "font_class": "jiaoseguanli",
  124 + "unicode": "ea62",
  125 + "unicode_decimal": 60002
  126 + },
  127 + {
  128 + "icon_id": "201552",
  129 + "name": "列表模式",
  130 + "font_class": "liebiaomoshi",
  131 + "unicode": "e60d",
  132 + "unicode_decimal": 58893
  133 + },
  134 + {
  135 + "icon_id": "1304951",
  136 + "name": "列表",
  137 + "font_class": "liebiao",
  138 + "unicode": "e62d",
  139 + "unicode_decimal": 58925
  140 + },
  141 + {
9 "icon_id": "4198630", 142 "icon_id": "4198630",
10 "name": "AK-BT_对勾_B", 143 "name": "AK-BT_对勾_B",
11 "font_class": "bt_duigou_B", 144 "font_class": "bt_duigou_B",
  1 +<el-dialog :top="top" :title="title" v-model="show" custom-class="config-dialog"
  2 + :fullscreen="fullscreen" :show-close="showFooter"
  3 + :width="width" destroy-on-close @before-close="hideElDialog" :close-on-click-modal="false" :close-on-press-escape="false">
  4 + <slot>弹框内容</slot>
  5 +
  6 + <template #footer v-if="showFooter">
  7 + <span class="dialog-footer">
  8 + <el-button @click="hideElDialog">{{cancelText}}</el-button>
  9 + <el-button type="primary" @click="okFunc">{{okText}}</el-button>
  10 + </span>
  11 + </template>
  12 +</el-dialog>
  1 +/**
  2 + * 分页表格组件
  3 + */
  4 +export default {
  5 + name: 'dialogIndex',
  6 + template: '',
  7 + components: {},
  8 + props: {
  9 + top: {
  10 + type: String,
  11 + default: '2vh'
  12 + },
  13 + // 标题
  14 + title: {
  15 + type: String,
  16 + default: "新建"
  17 + },
  18 + // 取消文本
  19 + cancelText: {
  20 + type: String,
  21 + default: "取消"
  22 + },
  23 + // 确定文本
  24 + okText: {
  25 + type: String,
  26 + default: "确定"
  27 + },
  28 + showFooter:{
  29 + type: Boolean,
  30 + default: true
  31 + },
  32 + showDialogVisible: {
  33 + type: Boolean,
  34 + default: false
  35 + },
  36 + width: {
  37 + type: String,
  38 + default: '80%'
  39 + },
  40 + // 是否为全屏 Dialog
  41 + fullscreen: {
  42 + type: Boolean,
  43 + default: false
  44 + }
  45 +
  46 + },
  47 + data() {
  48 + return {}
  49 + },
  50 + setup(props, {attrs, slots, emit}) {
  51 +
  52 + let show = Vue.ref(false);
  53 +
  54 +
  55 + let hideElDialog = () =>{
  56 + emit('hidedialog');
  57 + }
  58 +
  59 + let okFunc = () =>{
  60 + emit('okfunc');
  61 + }
  62 +
  63 + // 监听编辑状态
  64 + Vue.watch(() => props.showDialogVisible, (newValue, oldVlaue) => {
  65 + // 编辑
  66 + show.value = newValue;
  67 + });
  68 +
  69 + return {
  70 + show,
  71 + okFunc,
  72 + hideElDialog
  73 + }
  74 + }
  75 +}
  1 +<div>
  2 + <el-row :gutter="5">
  3 + <el-col :span="layout.left">
  4 + <div style="border-radius: 3px;background-color: white"
  5 + :style="{'height':height+'px','max-height':height + 'px','overflow':'auto'}">
  6 + <div style="text-align: left;padding-left: 10px;padding-top: 3px;font-weight: bold">
  7 + <el-link type="info" :underline="false"><i class="iconfont icon-ziliaoku"></i> 文档管理</el-link>
  8 + </div>
  9 + <el-tree ref="tree" style="padding:6px;" :props="props" :data="treeData" node-key="id"
  10 + :expand-on-click-node="false" :expand-on-click-node="true"
  11 + :default-expanded-keys="[defaultKeys]" >
  12 + <template #default="{ node, data }">
  13 + <div style="display: flex;flex-direction: row;width: 100%;">
  14 + <div style="width: calc(100% - 85px);max-width: calc(100% - 85px);overflow: hidden;text-overflow: ellipsis;text-align: left;" @click="nodeClick(node, data)" :title="node.label">
  15 + {{node.label }}
  16 + </div>
  17 + <div style="width: 60px;">
  18 + <a @click="showFolder(true)" style="margin-right: 10px;">
  19 + <i class="el-icon-plus"></i>
  20 + </a>
  21 + <a @click="deleteDocument(data.id,'folder')">
  22 + <i class="el-icon-delete"></i>
  23 + </a>
  24 + </div>
  25 + </div>
  26 + </template>
  27 + </el-tree>
  28 + </div>
  29 + </el-col>
  30 + <el-col :span="layout.right">
  31 + <div style="border-radius: 3px"
  32 + :style="{'height':height+'px','max-height':height + 'px','overflow':'hidden'}">
  33 + <div style="display: flex;flex-direction: row;padding: 3px;background-color: white;padding-bottom: 5px;height:45px;border-bottom: solid 1px #EBEEF5">
  34 + <div style="width: calc(100% - 150px);padding-left: 6px;text-align: left;">
  35 + <el-input v-model="keyWord" placeholder="请输入关键字" :size="$global.elementSize"
  36 + style="width: 220px;margin-right:10px" clearable/>
  37 + <el-button icon="el-icon-search" :size="$global.elementSize" @click="searchFile">搜索</el-button>
  38 + <el-button :size="$global.elementSize" @click="showUserDialog(true)">
  39 + <i class="iconfont icon-icon--quanxian"></i>
  40 + 授权
  41 + </el-button>
  42 + <el-button :size="$global.elementSize" @click="uploadFile">
  43 + <i class="iconfont icon-icon--download"></i>
  44 + 下载
  45 + </el-button>
  46 + <el-button type="primary" :size="$global.elementSize" @click="showUploadFile(true)">
  47 + <i class="iconfont icon-icon--shangchuan"></i>
  48 + 上传
  49 + </el-button>
  50 + </div>
  51 + <div style="text-align: right;width: 150px">
  52 + <el-button-group>
  53 + <el-button :size="$global.elementSize" :type="activeBtn == 'view' ? 'primary' : ''"
  54 + @click="activeModel('view')">
  55 + <i class="iconfont icon-liebiaomoshi"></i>
  56 + </el-button>
  57 + <el-button :size="$global.elementSize" :type="activeBtn == 'list' ? 'primary' : ''"
  58 + @click="activeModel('list')">
  59 + <i class="iconfont icon-liebiao"></i>
  60 + </el-button>
  61 + </el-button-group>
  62 + </div>
  63 + </div>
  64 + <!--列表-->
  65 + <div v-if="activeBtn == 'list'">
  66 + <cm-table-page :columns="columns" :dataList="dataList" @loaddata="getPage" :showIndex="false"
  67 + :showBorder="false" :showSelection="true"
  68 + :showPage="false" :height="height - 54"></cm-table-page>
  69 + </div>
  70 + <div v-if="activeBtn == 'view'" style="display: flex;flex-wrap: wrap;background-color: white" :style="{'height':(height -50) +'px','max-height':(height -50) + 'px','overflow':'auto'}">
  71 + <div v-for="file in dataList" style="width: 120px;margin: 10px;position: relative">
  72 + <div style="position: absolute;right: 5px">
  73 + <el-checkbox v-model="file.checked" label="" :size="$global.elementSize"></el-checkbox>
  74 + <!--<el-link type="primary" :underline="false" @click="getFile(file)" style="margin-left: 5px">
  75 + <i class="iconfont icon-icon&#45;&#45;download"></i>
  76 + </el-link>-->
  77 + </div>
  78 + <el-link type="primary" :underline="false" @click="getFile(file)">
  79 + <i class="iconfont "
  80 + :class="iconclass[file.type] == undefined ? 'icon-wenjian' : iconclass[file.type]"
  81 + style="font-size: 50px;margin-right: 10px;"/>
  82 + </el-link>
  83 + <br/>
  84 + <el-link type="info" :underline="false" @click="getFile(file)">
  85 + {{file.fileName}}
  86 + </el-link>
  87 + </div>
  88 + <div v-if="dataList.length == 0" style=" text-align: center; width: 100%;">
  89 + <el-empty description="没有文件哦!"></el-empty>
  90 + </div>
  91 + </div>
  92 + </div>
  93 + </el-col>
  94 + </el-row>
  95 +
  96 + <cm-dialog :title="'新建“' + currentNodeData.name + '“子文件夹'" width="500px" :showDialogVisible="addDialogVisible" :showFooter="false">
  97 + <template v-slot>
  98 + <el-form
  99 + label-width="120px"
  100 + ref="ruleForm"
  101 + :model="docForm"
  102 + :rules="docRulesForm"
  103 + label-position="right"
  104 + label-width="120px">
  105 +
  106 + <el-form-item label="文档名称" prop="name">
  107 + <el-input :size="$global.elementSize" v-model="docForm.name" clearable ></el-input>
  108 + </el-form-item>
  109 +
  110 + <el-form-item label="文档编号" prop="docNo">
  111 + <el-input :size="$global.elementSize" v-model="docForm.docNo" clearable></el-input>
  112 + </el-form-item>
  113 +
  114 + <el-form-item label="文档类型" prop="type">
  115 + <el-input :size="$global.elementSize" v-model="docForm.type" clearable></el-input>
  116 + </el-form-item>
  117 +
  118 + <el-form-item label="排序" prop="sort">
  119 + <el-input :size="$global.elementSize" type="number" v-model="docForm.sort" clearable></el-input>
  120 + </el-form-item>
  121 +
  122 + <el-form-item>
  123 + <el-button :size="$global.elementSize" type="primary" @click="addFolder('ruleForm')">保存</el-button>
  124 + <el-button :size="$global.elementSize" @click="showFolder(false)">取消</el-button>
  125 + </el-form-item>
  126 + </el-form>
  127 + </template>
  128 + </cm-dialog>
  129 +
  130 + <cm-userright :showDialogVisible="showUserDialogVisible" :users="userFileRight.usernames" @callback="selectUser"
  131 + @hideDialog="showUserDialog"></cm-userright>
  132 +
  133 + <cm-upload :showDialogVisible="showUploadDialogVisible" @callback="uploadCallBack" @hideDialog="showUploadFile(false)"></cm-upload>
  134 +</div>
  1 +/**
  2 + * 分页表格组件
  3 + */
  4 +export default {
  5 + name: 'DocumentIndex',
  6 + template: '',
  7 + components: {},
  8 + props: {},
  9 + data() {
  10 + return {
  11 + props: {
  12 + label: 'name',
  13 + children: 'children'
  14 + },
  15 + docRulesForm: {
  16 + name: [
  17 + {
  18 + required: true,
  19 + message: '请填写文档名称!',
  20 + trigger: 'blur',
  21 + }
  22 + ]
  23 + }
  24 + }
  25 + },
  26 + setup() {
  27 + const {proxy} = Vue.getCurrentInstance();
  28 + let height = Vue.ref(window.innerHeight - 20);
  29 + let defaultKeys = Vue.ref('');
  30 + let iconclass = {
  31 + 'folder': 'icon-wenjianjia',
  32 + 'docx': 'icon-word-full',
  33 + 'doc': 'icon-word-full',
  34 + 'ppt': 'icon-ppt-full',
  35 + 'xlsx': 'icon-excel-full',
  36 + 'xls': 'icon-excel-full',
  37 + 'pdf': 'icon-pdf-full',
  38 + 'txt': 'icon-txt-full',
  39 + 'mp3': 'icon-audio',
  40 + 'json': 'icon-json-full',
  41 + 'bmp': 'icon-image-full',
  42 + 'jpg': 'icon-image-full',
  43 + 'png': 'icon-image-full',
  44 + 'tif': 'icon-image-full',
  45 + 'gif': 'icon-image-full',
  46 + 'pcx': 'icon-image-full',
  47 + 'tga': 'icon-image-full',
  48 + 'exif': 'icon-image-full',
  49 + 'fpx': 'icon-image-full',
  50 + 'svg': 'icon-image-full',
  51 + 'psd': 'icon-image-full',
  52 + 'cdr': 'icon-image-full',
  53 + 'pcd': 'icon-image-full',
  54 + 'dxf': 'icon-image-full',
  55 + 'ufo': 'icon-image-full',
  56 + 'eps': 'icon-image-full',
  57 + 'ai': 'icon-image-full',
  58 + 'raw': 'icon-image-full',
  59 + 'WMF': 'icon-image-full',
  60 + 'webp': 'icon-image-full',
  61 + 'avif': 'icon-image-full',
  62 + 'avi': 'icon-avi',
  63 + 'rmvb': 'icon-avi',
  64 + 'rm': 'icon-avi',
  65 + 'asf': 'icon-avi',
  66 + 'divx': 'icon-avi',
  67 + 'mpg': 'icon-avi',
  68 + 'mpeg': 'icon-avi',
  69 + 'mpe': 'icon-avi',
  70 + 'wmv': 'icon-avi',
  71 + 'mp4': 'icon-avi',
  72 + 'mkv': 'icon-avi',
  73 + 'vob': 'icon-avi',
  74 + 'zip': 'icon-zip-full',
  75 + }
  76 + let treeData = Vue.ref([]);
  77 + let currentNodeData = Vue.ref({});
  78 +
  79 + // 获取文件列表或者打开文件
  80 + let getFile = (item) => {
  81 + let id = item.id;
  82 + let type = item.type;
  83 + if (id && type && type == 'folder') {
  84 + getPage(id);
  85 + } else {
  86 + proxy.$global.viewer(item.localPath);
  87 + }
  88 + }
  89 +
  90 + let columns = Vue.ref([{
  91 + prop: 'fileName',
  92 + label: '文档名称',
  93 + sortable: true,
  94 + align: 'left',
  95 + click: function (row) {
  96 + getFile(row);
  97 + },
  98 + render: function (row) {
  99 + let cls = iconclass[row.type] == undefined ? 'icon-wenjian' : iconclass[row.type];
  100 + return `<i class="iconfont ${cls}" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>`
  101 + }
  102 + }, {
  103 + prop: 'createUser',
  104 + label: '提交人',
  105 + sortable: true,
  106 + width: '120px'
  107 + }, {
  108 + prop: 'createTime',
  109 + label: '提交时间',
  110 + sortable: true,
  111 + width: '180px'
  112 + }]);
  113 + // 表格数据
  114 + let dataList = Vue.ref([]);
  115 + // 总数
  116 + let total = Vue.ref(0);
  117 + // 当前展示视图
  118 + let activeBtn = Vue.ref('view');
  119 + // // 当前展示视图
  120 + // let viewEdit = Vue.ref(false);
  121 +
  122 + // 布局
  123 + let layout = Vue.ref({
  124 + left: 4,
  125 + right: 20
  126 + });
  127 +
  128 + let keyWord = Vue.ref('');
  129 +
  130 +
  131 + // 左侧树
  132 + let getTree = () => {
  133 + // 加载列表
  134 + proxy.$http.get("/inspection-report/doc/type/tree", {}, function (res) {
  135 + if (res && res.data) {
  136 + treeData.value = res.data;
  137 + currentNodeData.value = res.data[0];
  138 + let firstId = res.data[0].id;
  139 + defaultKeys.value = firstId;
  140 +
  141 + // 加载所有
  142 + getPage('');
  143 + }
  144 + })
  145 + }
  146 +
  147 + // 获取表格树
  148 + let getPage = (id) => {
  149 + let params = {
  150 + id: id,
  151 + name: keyWord.value,
  152 + types:null
  153 + }
  154 + // 加载列表
  155 + proxy.$http.get(`/inspection-report/file/file/documentPage`, params, function (res) {
  156 + if (res && res.data) {
  157 + dataList.value = res.data;
  158 + }
  159 + })
  160 + }
  161 +
  162 + /**
  163 + * 树节点点击
  164 + * @param node
  165 + * @param data
  166 + */
  167 + let nodeClick = (node, data) => {
  168 + let id = data.id;
  169 + currentNodeData.value = data;
  170 + getPage(id);
  171 + }
  172 +
  173 + /**
  174 + * 视图按钮切换
  175 + * @param code
  176 + */
  177 + let activeModel = (code) => {
  178 + activeBtn.value = code;
  179 + }
  180 +
  181 + // 刷新
  182 + let reload = () => {
  183 + // 属性tree
  184 + setTimeout(function () {
  185 + let id = currentNodeData.value.id;
  186 + getPage(id);
  187 +
  188 + getTree();
  189 + }, 1000)
  190 + }
  191 +
  192 +
  193 + /**
  194 + * 删除文档
  195 + * @param id 文档id
  196 + * @param type 文件夹或者文档
  197 + */
  198 + let deleteDocument = (id, type) => {
  199 + let msg = "您确认删除该文件?";
  200 + if (type == 'folder') {
  201 + msg = "您确认删除该文件以及文件下的文件?";
  202 + }
  203 + proxy.$global.confirm(msg, function () {
  204 + // ok
  205 + proxy.$http.get(`/inspection-report/file/file/delete`, {id: id, type: type}, function (res) {
  206 + if (res && res.code == 0) {
  207 + proxy.$global.showMsg('删除成功!');
  208 +
  209 + reload();
  210 + }
  211 + })
  212 +
  213 + });
  214 + }
  215 +
  216 + /**
  217 + * 展示添加弹框
  218 + * @param id 文档id
  219 + * @param type 文件夹或者文档
  220 + */
  221 + let addDialogVisible = Vue.ref(false);
  222 + let docForm = Vue.ref({
  223 + name: '',
  224 + docNo: '',
  225 + type: '',
  226 + sort: 100
  227 + });
  228 + let showFolder = (flg) => {
  229 + docForm.value = {
  230 + name: '',
  231 + docNo: '',
  232 + type: '',
  233 + sort: 100
  234 + };
  235 + addDialogVisible.value = flg;
  236 + }
  237 +
  238 + /**
  239 + * 添加文件夹
  240 + * @param id 文档id
  241 + * @param type 文件夹或者文档
  242 + */
  243 + let addFolder = (id) => {
  244 + proxy.$refs[id].validate((valid) => {
  245 + if (valid) {
  246 + let params = docForm.value;
  247 + params.pid = currentNodeData.value.id;
  248 + // 新增
  249 + proxy.$http.get(`/inspection-report/file/file/insertFolder`, params, function (res) {
  250 + if (res && res.code == 0) {
  251 + proxy.$global.showMsg("新建成功!");
  252 + }
  253 + })
  254 +
  255 + // 属性tree
  256 + reload();
  257 + showFolder(false);
  258 + } else {
  259 + console.log('error submit!!')
  260 + return false
  261 + }
  262 + })
  263 + }
  264 +
  265 + /**
  266 + * 搜索
  267 + */
  268 + let searchFile = () => {
  269 + getPage('');
  270 + // let id = currentNodeData.value.id;
  271 + // if (id) {
  272 + // getPage(id);
  273 + // } else {
  274 + // // 浏览器地址传文档id参数
  275 + // let docId = proxy.$global.getQueryVariable('docId');
  276 + // if (docId) {
  277 + // getPage(docId);
  278 + // } else {
  279 + // proxy.$global.showMsg('请选择文档类型!', 'warning');
  280 + // }
  281 + // }
  282 +
  283 + }
  284 +
  285 +
  286 +
  287 + // 用户授权
  288 + let showUserDialogVisible = Vue.ref(false);
  289 + let userFileRight = Vue.ref({}); // {roleIds: ["1"], usernames: ["admin"]}
  290 + let getCheckedFile = () => {
  291 + let arr = dataList.value.filter(function (v){
  292 + if(v.checked != undefined && v.checked == true){
  293 + return v;
  294 + }
  295 + })
  296 +
  297 + if(arr.length == 0){
  298 + proxy.$global.showMsg('请选择需要授权的文档!', 'warning');
  299 + return;
  300 + }
  301 +
  302 + if(arr.length == 1){
  303 + // 查询文件的权限
  304 + proxy.$http.get(`/inspection-report/doc/doc/auth/getGrant`, {docId:arr[0].id}, function (res) {
  305 + if (res && res.code == 0) {
  306 + let map = res.map;
  307 + if(map){
  308 + userFileRight.value = res.map;
  309 + }
  310 + }
  311 + })
  312 + } else {
  313 + // 多文件不查询权限
  314 + userFileRight.value = {};
  315 + }
  316 + return arr;
  317 + }
  318 + // 用户授权弹框
  319 + let showUserDialog = (flg) => {
  320 + if(flg){
  321 + let arr = getCheckedFile();
  322 + if(arr && arr.length > 0){
  323 + showUserDialogVisible.value = flg;
  324 + }
  325 + } else {
  326 + showUserDialogVisible.value = flg;
  327 + }
  328 +
  329 +
  330 + }
  331 + // 获取用户选择的权限
  332 + let selectUser = (userObj) => {
  333 +
  334 + let userIds = userObj.user.map(function (v) {
  335 + return v.username;
  336 + });
  337 + let roleCodes = userObj.role.map(function (v) {
  338 + return v.code;
  339 + });
  340 +
  341 + let docIds = getCheckedFile().map(function (v){
  342 + return v.id;
  343 + });
  344 +
  345 +
  346 + // 保存用户权限
  347 + let params = {
  348 + docIds:docIds.join(','),
  349 + roleIds:roleCodes.join(','),
  350 + usernames:userIds.join(',')
  351 + }
  352 + proxy.$http.get(`/inspection-report/doc/doc/auth/grant`, params, function (res) {
  353 + if (res && res.code == 0) {
  354 + proxy.$global.showMsg('授权成功!');
  355 + } else {
  356 + proxy.$global.showMsg('授权失败!', 'warning');
  357 + }
  358 + })
  359 + // 隐藏授权弹框
  360 + showUserDialog(false);
  361 + }
  362 +
  363 + // 上传
  364 + let showUploadDialogVisible = Vue.ref(false);
  365 + /**
  366 + * 上传
  367 + */
  368 + let showUploadFile = (flg) => {
  369 + showUploadDialogVisible.value = flg;
  370 + }
  371 + let uploadCallBack = () =>{
  372 +
  373 + }
  374 +
  375 +
  376 + /**
  377 + * 挂载完
  378 + */
  379 + Vue.onMounted(() => {
  380 + // 参数是否传文档id
  381 + let docId = proxy.$global.getQueryVariable('docId');
  382 + if (!docId) {
  383 + getTree();
  384 + } else {
  385 + layout.value = {
  386 + left: 0,
  387 + right: 24
  388 + }
  389 + getPage(docId);
  390 + }
  391 + })
  392 +
  393 + return {
  394 + /* viewEdit,*/
  395 + iconclass,
  396 + layout,
  397 + height,
  398 + treeData,
  399 + getFile,
  400 + columns,
  401 + dataList,
  402 + total,
  403 + defaultKeys,
  404 + nodeClick,
  405 + keyWord,
  406 + searchFile,
  407 + showUploadFile,
  408 + activeBtn,
  409 + activeModel,
  410 + deleteDocument,
  411 +
  412 + currentNodeData,
  413 + docForm,
  414 + addFolder,
  415 +
  416 + addDialogVisible,
  417 + showFolder,
  418 +
  419 + showUserDialogVisible,
  420 + userFileRight,
  421 + selectUser,
  422 + showUserDialog,
  423 +
  424 + showUploadDialogVisible
  425 +
  426 + }
  427 + }
  428 +}
@@ -114,7 +114,6 @@ export default { @@ -114,7 +114,6 @@ export default {
114 }, 114 },
115 watch: {}, 115 watch: {},
116 mounted() { 116 mounted() {
117 - console.log(111111111111);  
118 let that = this; 117 let that = this;
119 //加载资源列表 118 //加载资源列表
120 const { proxy } = Vue.getCurrentInstance() 119 const { proxy } = Vue.getCurrentInstance()
1 <div class="tree-container" :style="{'height':height+'px','max-height':height+'px','overflow':'hidden','padding':'0px'}"> 1 <div class="tree-container" :style="{'height':height+'px','max-height':height+'px','overflow':'hidden','padding':'0px'}">
2 - <div class="filter-view"> 2 + <div class="filter-view" v-if="showSearch">
3 <el-input v-model="filterText" size="samll" placeholder="请输入关键字" /> 3 <el-input v-model="filterText" size="samll" placeholder="请输入关键字" />
4 </div> 4 </div>
5 <div :style="{'height':height+'px','max-height':(height - 54)+'px','overflow':'auto','padding':'0px'}"> 5 <div :style="{'height':height+'px','max-height':(height - 54)+'px','overflow':'auto','padding':'0px'}">
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 <template #default="{ node, data }"> 7 <template #default="{ node, data }">
8 <div class="tree-node"> 8 <div class="tree-node">
9 <div class="tree-node-label">{{ node.label }}</div> 9 <div class="tree-node-label">{{ node.label }}</div>
10 - <div class="tree-node-tools"> 10 + <div class="tree-node-tools" v-if="showTools">
11 <a @click="append(data)"> 11 <a @click="append(data)">
12 <i class="el-icon-plus"></i> 12 <i class="el-icon-plus"></i>
13 </a> 13 </a>
@@ -5,6 +5,11 @@ export default { @@ -5,6 +5,11 @@ export default {
5 name: 'restypetree', 5 name: 'restypetree',
6 template: '', 6 template: '',
7 components: {}, 7 components: {},
  8 + props:{
  9 + treeData:[],
  10 + showTools:false,
  11 + showSearch:false
  12 + },
8 data() { 13 data() {
9 return { 14 return {
10 props : { 15 props : {
@@ -15,9 +20,9 @@ export default { @@ -15,9 +20,9 @@ export default {
15 }, 20 },
16 setup() { 21 setup() {
17 let height = Vue.ref(window.innerHeight - 130); 22 let height = Vue.ref(window.innerHeight - 130);
  23 + const treeNodeData = Vue.ref('');
18 const filterText = Vue.ref(''); 24 const filterText = Vue.ref('');
19 const {proxy} = Vue.getCurrentInstance(); 25 const {proxy} = Vue.getCurrentInstance();
20 - const treeData = Vue.ref([]);  
21 26
22 // 添加树节点 27 // 添加树节点
23 let append = (data) => { 28 let append = (data) => {
@@ -67,7 +72,7 @@ export default { @@ -67,7 +72,7 @@ export default {
67 72
68 return { 73 return {
69 height, 74 height,
70 - treeData, 75 + treeNodeData,
71 append, 76 append,
72 remove, 77 remove,
73 filterText, 78 filterText,
  1 +<div>
  2 + <!-- 表格-->
  3 + <el-table :border="showBorder" v-loading="loading" :data="dataList" stripe header-row-class-name="tbl-header-class" :height="height"
  4 + style="width: 100%;margin: 0px 0px;">
  5 + <el-table-column v-if="showIndex" type="index" :label="indexLabel" align="center" width="50"/>
  6 + <el-table-column v-if="showSelection" type="selection" width="55" />
  7 +
  8 + <el-table-column v-for="item in columns" :prop="item.prop" :label="item.label" :sortable="item.sortable == undefined ? false : item.sortable" :align="item.align == undefined ? 'center' : item.align "
  9 + :width="item.width">
  10 + <template #default="scope" v-if="item.prop =='resName'">
  11 + <el-link type="primary" @click="openDetailPage(scope.row)">{{scope.row.resName}}</el-link>
  12 + </template>
  13 + <template #default="scope" v-else>
  14 +
  15 + <div v-if="typeof(item.render) == 'function'" >
  16 + <div v-if="typeof(item.click) == 'function'">
  17 + <el-link type="primary" @click="item.click(scope.row)" v-html="item.render(scope.row)"></el-link>
  18 + </div>
  19 + <div v-else>
  20 + <el-link type="primary" v-html="item.render(scope.row)"></el-link>
  21 + </div>
  22 + </div>
  23 + <span v-else>
  24 + {{scope.row[item.prop]}}
  25 + </span>
  26 + </template>
  27 + </el-table-column>
  28 + </el-table>
  29 + <!-- 分页 -->
  30 + <div style='text-align: center;background-color: white' v-if="showPage">
  31 + <el-pagination
  32 + @size-change="handleSizeChange"
  33 + @prev-click="prePage"
  34 + @next-click="nextPage"
  35 + @current-change="handleCurrentChange"
  36 + :current-page="currentPage"
  37 + :page-sizes="pageSizes"
  38 + :page-size="pageSize"
  39 + :layout="layout"
  40 + :total="total">
  41 + </el-pagination>
  42 + </div>
  43 +</div>
  44 +
  1 +/**
  2 + * 分页表格组件
  3 + */
  4 +export default {
  5 + name: 'tablePageIndex',
  6 + template: '',
  7 + components: {},
  8 + props: {
  9 + // 展示分页
  10 + showPage: {
  11 + type: Boolean,
  12 + default: true
  13 + },
  14 + showBorder: {
  15 + type: Boolean,
  16 + default: true
  17 + },
  18 + // 高度
  19 + height: {
  20 + type: Number,
  21 + default: window.innerHeight
  22 + },
  23 + // 展示下标
  24 + showIndex: {
  25 + type: Boolean,
  26 + default: true
  27 + },
  28 + showSelection: {
  29 + type: Boolean,
  30 + default: false
  31 + },
  32 + indexLabel: {
  33 + type: String,
  34 + default: '序号'
  35 + },
  36 + currentPage: {
  37 + type: Number,
  38 + default: 1
  39 + },
  40 + // 分页页码设置
  41 + pageSizes: {
  42 + type: Array,
  43 + default: [50,100, 200, 300, 400]
  44 + },
  45 + // 默认展示
  46 + pageSize: {
  47 + type: Number,
  48 + default: 100
  49 + },
  50 + // 总数
  51 + total: {
  52 + type: Number,
  53 + default: 0
  54 + },
  55 + // 展示组件
  56 + layout: {
  57 + type: String,
  58 + default: "total, sizes, prev, pager, next, jumper"
  59 + },
  60 + // 列
  61 + columns: {
  62 + type: Array,
  63 + default: []
  64 + },
  65 + // 数据
  66 + dataList: {
  67 + type: Array,
  68 + default: []
  69 + },
  70 + loading:{
  71 + type: Boolean,
  72 + default: false
  73 + },
  74 + },
  75 + data() {
  76 + return {}
  77 + },
  78 + setup(props, {attrs, slots, emit}) {
  79 +
  80 + let callback = () =>{
  81 + emit('loaddata',props)
  82 + console.log("sssssssssssssssssssssss")
  83 + }
  84 +
  85 + // 每页展示多少条
  86 + let handleSizeChange = (val) => {
  87 + // console.log(`每页 ${val} 条`)
  88 + props.pageSize = val;
  89 +
  90 + callback();
  91 + }
  92 +
  93 + // 切换页码
  94 + let handleCurrentChange = (val) => {
  95 + // console.log(`当前页: ${val}`)
  96 + props.currentPage = val;
  97 +
  98 + callback();
  99 + }
  100 +
  101 + // 切换页码
  102 + let prePage = (val) => {
  103 + // console.log(`当前页: ${val}`)
  104 + props.currentPage = val - 1;
  105 + callback();
  106 + }
  107 +
  108 + // 切换页码
  109 + let nextPage = (val) => {
  110 + // console.log(`当前页: ${val}`)
  111 + props.currentPage = val + 1;
  112 + callback();
  113 + }
  114 +
  115 + // 监听编辑状态
  116 + // Vue.watch(() => filterText.value, (newValue, oldVlaue) => {
  117 + // proxy.$refs.tree.filter(newValue)
  118 + // });
  119 +
  120 + // 挂载完
  121 + Vue.onMounted(() => {
  122 + })
  123 +
  124 + return {
  125 + handleSizeChange,
  126 + handleCurrentChange,
  127 + prePage,
  128 + nextPage
  129 + }
  130 + }
  131 +}
  1 +<cm-dialog title="文件上传" width="500px" :showDialogVisible="show" @hidedialog="hidedialog" @okfunc="uploadFile" okText="上传">
  2 + <template v-slot>
  3 +
  4 + <el-upload
  5 + :accept="accept"
  6 + ref="upload"
  7 + :http-request="getFile"
  8 + :multiple="true"
  9 + :auto-upload="false">
  10 + <template #trigger>
  11 + <el-button size="small" type="primary">选择则文件</el-button>
  12 + </template>
  13 + 支持格式:
  14 + <el-tooltip placement="top" effect="light">
  15 + <template #content>
  16 + {{accept}}
  17 + </template>
  18 + <i class="el-icon-chat-round"></i>
  19 + </el-tooltip>
  20 + <template #tip>
  21 + <div class="el-upload__tip">
  22 + 文件命名规范建议:以文档编号+"-" 开头,如:3101-基本信息.xls
  23 + </div>
  24 + </template>
  25 + </el-upload>
  26 + </template>
  27 +</cm-dialog>
  1 +/**
  2 + * 分页表格组件
  3 + */
  4 +export default {
  5 + name: 'upLoadIndex',
  6 + template: '',
  7 + components: {},
  8 + props: {
  9 + showDialogVisible: {
  10 + type: Boolean,
  11 + default: false
  12 + },
  13 + fileList: {
  14 + type: Array,
  15 + default: []
  16 + },
  17 + callbackApi:{
  18 + type: String,
  19 + default: ''
  20 + },
  21 + accept: {
  22 + type: String,
  23 + default: [".3gpp",
  24 + '.ac3',
  25 + '.asf',
  26 + '.au',
  27 + '.csv',
  28 + '.doc',
  29 + '.dot',
  30 + '.dtd',
  31 + '.dwg',
  32 + '.dxf',
  33 + '.gif',
  34 + '.jp2',
  35 + '.jpe',
  36 + '.jpeg',
  37 + '.jpg',
  38 + '.json',
  39 + '.mp2',
  40 + '.mp3',
  41 + '.mp4',
  42 + '.mpeg',
  43 + '.mpg',
  44 + '.mpp',
  45 + '.ogg',
  46 + '.pdf',
  47 + '.png',
  48 + '.pot',
  49 + '.pps',
  50 + '.ppt',
  51 + '.rtf',
  52 + '.svf',
  53 + '.tif',
  54 + '.tiff',
  55 + '.txt',
  56 + '.wdb',
  57 + '.wps',
  58 + '.xlc',
  59 + '.xlm',
  60 + '.xls',
  61 + '.xlt',
  62 + '.xlw',
  63 + '.xml',
  64 + '.zip',
  65 + '.rar',
  66 + '.docx',
  67 + '.xlsx',
  68 + '.sql',
  69 + '.html',
  70 + '.js',
  71 + '.css'].join(',')
  72 + }
  73 + },
  74 + data() {
  75 + return {}
  76 + },
  77 + setup(props, {attrs, slots, emit}) {
  78 +
  79 + const {proxy} = Vue.getCurrentInstance();
  80 +
  81 + // 展示弹框
  82 + let show = Vue.ref(false);
  83 +
  84 + let hidedialog = () => {
  85 + emit('hideDialog', false);
  86 + }
  87 + let getFile = (param) =>{
  88 + console.log(param)
  89 + let fileObj = param.file
  90 + }
  91 +
  92 + // 上传按钮点击
  93 + let uploadFile = () => {
  94 + proxy.$refs.upload.submit()
  95 + }
  96 + // 监听编辑状态
  97 + Vue.watch(
  98 + () => props.showDialogVisible, (newValue, oldVlaue) => {
  99 + show.value = newValue;
  100 + }
  101 + );
  102 +
  103 + /**
  104 + * 挂载完
  105 + */
  106 + Vue.onMounted(() => {
  107 +
  108 + })
  109 +
  110 +
  111 + return {
  112 + getFile,
  113 + show,
  114 + uploadFile,
  115 + hidedialog
  116 + }
  117 + }
  118 +}
  1 +<cm-dialog title="用户授权" width="900px" :showDialogVisible="show" @hidedialog="hidedialog" @okfunc="getUser">
  2 + <template v-slot>
  3 + <el-transfer v-model="value" :props="props" filterable
  4 + :render-content="renderFunc"
  5 + :data="userArr" :titles="['所有用户/角色', '已授权用户/角色']"
  6 + :button-texts="['取消', '授权']">
  7 + <!--<template #left-footer>
  8 + <el-button class="transfer-footer" size="small">Operation</el-button>
  9 + </template>-->
  10 + </el-transfer>
  11 + </template>
  12 +</cm-dialog>
  1 +/**
  2 + * 分页表格组件
  3 + */
  4 +export default {
  5 + name: 'userRightIndex',
  6 + template: '',
  7 + components: {},
  8 + props: {
  9 + showDialogVisible: {
  10 + type: Boolean,
  11 + default: false
  12 + },
  13 + users: {
  14 + type: Array,
  15 + default: []
  16 + }
  17 + },
  18 + data() {
  19 + return {
  20 + props: {key: 'value', label: 'desc'}
  21 + }
  22 + },
  23 + setup(props, {attrs, slots, emit}) {
  24 + const {proxy} = Vue.getCurrentInstance();
  25 +
  26 + let v = Vue.ref(props.users);
  27 + let userArr = Vue.ref([]);
  28 + const getAllUser = () => {
  29 + // 查询全部用户
  30 + proxy.$http.get("/api-user/users?page=1&limit=10000&username=&nickname=&enabled=&orgId=&roles=", {}, function (res) {
  31 + if (res && res.data) {
  32 + res.data.map(function (v) {
  33 + let desc = [];
  34 + let orgName = v.orgName;
  35 + let nickname = v.nickname;
  36 + if (orgName) {
  37 + desc.push(orgName);
  38 + }
  39 + if (nickname) {
  40 + desc.push(nickname);
  41 + }
  42 +
  43 + userArr.value.push({
  44 + value: v.username,
  45 + type:'USER',
  46 + desc: `${desc.join(' / ')}`,
  47 + props : v
  48 + })
  49 + });
  50 + }
  51 + })
  52 +
  53 + // 查询全部角色
  54 + proxy.$http.get("/api-user/roles?page=1&limit=10000", {}, function (res) {
  55 + if (res && res.data) {
  56 + res.data.map(function (v) {
  57 + let desc = [];
  58 + let code = v.code;
  59 + let name = v.name;
  60 + if (name) {
  61 + desc.push(name);
  62 + }
  63 + if (code) {
  64 + desc.push(code);
  65 + }
  66 +
  67 + userArr.value.push({
  68 + value: v.id,
  69 + type:'ROLE',
  70 + desc: `${desc.join(' / ')}`,
  71 + props : v
  72 + })
  73 + });
  74 + }
  75 + })
  76 +
  77 + }
  78 +
  79 + let hidedialog = () => {
  80 + emit('hideDialog', false);
  81 + }
  82 +
  83 + let getUser = () => {
  84 + let arr = v.value;
  85 +
  86 + if (!arr || arr.length == 0) {
  87 + proxy.$global.showMsg("您没有选择用户!", "warning")
  88 + return;
  89 + }
  90 +
  91 +
  92 + let user = [];
  93 + let role = [];
  94 + userArr.value.filter(function (v){
  95 + if(arr.indexOf(v.value) != -1){
  96 + if(v.type == 'ROLE'){
  97 + role.push(v.props);
  98 + } else {
  99 + user.push(v.props);
  100 + }
  101 + }
  102 + })
  103 + let data = {
  104 + user:user,
  105 + role:role
  106 + }
  107 +
  108 + emit('callback', data);
  109 + }
  110 +
  111 + let renderFunc = (h, option) =>{
  112 + let desc = option.desc;
  113 + let type = option.type;
  114 + let tag = "用户";
  115 + let isUser = true;
  116 + if(type == 'ROLE'){
  117 + isUser = false;
  118 + tag = "角色";
  119 + }
  120 +
  121 + return h('div',{
  122 + class: {
  123 + 'userright': true
  124 + }
  125 + }, [
  126 + h('span',{
  127 + class: {
  128 + 'userright-desc': true
  129 + },
  130 + title:desc
  131 + }, desc),
  132 + h('span',{
  133 + class: {
  134 + 'userright-tag': true,
  135 + 'users': isUser,
  136 + 'roles': !isUser
  137 + }
  138 + },tag)
  139 + ])
  140 + }
  141 +
  142 +
  143 + // 展示弹框
  144 + let show = Vue.ref(false);
  145 + // 监听编辑状态
  146 + Vue.watch(
  147 + () => props.showDialogVisible, (newValue, oldVlaue) => {
  148 + show.value = newValue;
  149 + },
  150 + () => props.users, (newValue, oldVlaue) => {
  151 + v.value = newValue;
  152 + }
  153 + );
  154 +
  155 + /**
  156 + * 挂载完
  157 + */
  158 + Vue.onMounted(() => {
  159 + getAllUser();
  160 + })
  161 +
  162 + return {
  163 + show,
  164 + hidedialog,
  165 + userArr,
  166 + value: v,
  167 + getUser,
  168 + renderFunc
  169 + }
  170 + }
  171 +}
@@ -9,7 +9,7 @@ export default { @@ -9,7 +9,7 @@ export default {
9 }, 9 },
10 10
11 setup(props, {attrs, slots, emit}) { 11 setup(props, {attrs, slots, emit}) {
12 - 12 +
13 const isEdit = Vue.ref(false); 13 const isEdit = Vue.ref(false);
14 const oldVal = Vue.ref(''); 14 const oldVal = Vue.ref('');
15 15
@@ -18,7 +18,7 @@ export default { @@ -18,7 +18,7 @@ export default {
18 } 18 }
19 19
20 let changeProperty = (key) => { 20 let changeProperty = (key) => {
21 - let detail = props.detail; 21 + let detail = props.detail;
22 detail.propValueText = detail[detail.propertyEditInfo.text]; 22 detail.propValueText = detail[detail.propertyEditInfo.text];
23 emit('callback', key, detail.propValue,oldVal.value,detail.propValueText) 23 emit('callback', key, detail.propValue,oldVal.value,detail.propValueText)
24 } 24 }
@@ -40,5 +40,5 @@ export default { @@ -40,5 +40,5 @@ export default {
40 oldVal, 40 oldVal,
41 changeProperty 41 changeProperty
42 }; 42 };
43 - }, 43 + }
44 } 44 }
@@ -23,11 +23,21 @@ Promise.all([ @@ -23,11 +23,21 @@ Promise.all([
23 // 全局注册公共组件 23 // 全局注册公共组件
24 24
25 // 下拉列表资源树 25 // 下拉列表资源树
26 - .component('res-type-tree-input', Vue.defineAsyncComponent(() => myImport('components/common/inputrestypetree/index'))) 26 + .component('cm-res-type-tree-input', Vue.defineAsyncComponent(() => myImport('components/common/inputrestypetree/index')))
27 // 机房下拉 27 // 机房下拉
28 - .component('machine-room',Vue.defineAsyncComponent(() => myImport('components/common/machineroom/index'))) 28 + .component('cm-machine-room',Vue.defineAsyncComponent(() => myImport('components/common/machineroom/index')))
29 // 资源类型树 29 // 资源类型树
30 - .component('res-type-tree-view',Vue.defineAsyncComponent(() => myImport('components/common/restypetree/index'))); 30 + .component('cm-res-type-tree-view',Vue.defineAsyncComponent(() => myImport('components/common/restypetree/index')))
  31 + // 资源类型树
  32 + .component('cm-table-page',Vue.defineAsyncComponent(() => myImport('components/common/table-page/index')))
  33 + // 弹框
  34 + .component('cm-dialog',Vue.defineAsyncComponent(() => myImport('components/common/dialog/index')))
  35 + // 用户授权
  36 + .component('cm-userright',Vue.defineAsyncComponent(() => myImport('components/common/userright/index')))
  37 + // 上传组件
  38 + .component('cm-upload',Vue.defineAsyncComponent(() => myImport('components/common/upload/index')))
  39 + // 文档管理
  40 + .component('cm-document',Vue.defineAsyncComponent(() => myImport('components/common/document/index')));
31 41
32 app.config.globalProperties.$global = res[3].default 42 app.config.globalProperties.$global = res[3].default
33 app.config.globalProperties.$http = res[4].default 43 app.config.globalProperties.$http = res[4].default
@@ -3,7 +3,7 @@ window.myImport = (url) => { @@ -3,7 +3,7 @@ window.myImport = (url) => {
3 return new Promise((resolve, reject) => { 3 return new Promise((resolve, reject) => {
4 const ver = window.__ver || '' 4 const ver = window.__ver || ''
5 const baseUrl = window.__basrUrl || '/src/' 5 const baseUrl = window.__basrUrl || '/src/'
6 - console.log("加载组件===>"+baseUrl + url) 6 + // console.log("加载组件===>"+baseUrl + url)
7 // 先加载js 7 // 先加载js
8 import(baseUrl + url + '.js' + ver).then((resjs) => { 8 import(baseUrl + url + '.js' + ver).then((resjs) => {
9 const js = resjs.default 9 const js = resjs.default
@@ -29,12 +29,87 @@ global.showLoading = (callback) => { @@ -29,12 +29,87 @@ global.showLoading = (callback) => {
29 return loading; 29 return loading;
30 } 30 }
31 31
  32 +/**
  33 + * 提示消息
  34 + * @param msg
  35 + * @param type "success", "warning", "info", "error"
  36 + */
  37 +global.showMsg = (msg, type) => {
  38 + if(!type){
  39 + type = 'success';
  40 + }
  41 +
  42 + if(type == 'success'){
  43 + ElementPlus.ElMessage.success({
  44 + showClose: true,
  45 + message: msg,
  46 + type: type,
  47 + })
  48 + } else if(type == 'warning'){
  49 + ElementPlus.ElMessage.warning({
  50 + showClose: true,
  51 + message: msg,
  52 + type: type,
  53 + })
  54 + } else if(type == 'info'){
  55 + ElementPlus.ElMessage.info({
  56 + showClose: true,
  57 + message: msg,
  58 + type: type,
  59 + })
  60 + }else if(type == 'error'){
  61 + ElementPlus.ElMessage.error({
  62 + showClose: true,
  63 + message: msg,
  64 + type: type,
  65 + })
  66 + }
  67 +
  68 +}
  69 +global.confirm = (msg,okFunc,cancelFunc) =>{
  70 + ElementPlus.ElMessageBox.confirm(
  71 + msg,
  72 + '提示',
  73 + {
  74 + confirmButtonText: '确认',
  75 + cancelButtonText: '取消',
  76 + type: 'warning',
  77 + }
  78 + ).then(() => {
  79 + if(typeof(okFunc) == 'function'){
  80 + okFunc();
  81 + }
32 82
33 -global.showMsg = (msg, type = 'success') => {  
34 - ElementPlus.ElMessage.success({  
35 - message: msg,  
36 - type: type, 83 + }).catch(() => {
  84 + if(typeof(cancelFunc) == 'function'){
  85 + cancelFunc();
  86 + }
37 }) 87 })
38 } 88 }
39 89
  90 +/**
  91 + * 获取url参数
  92 + * @param variable
  93 + * @returns {string|boolean}
  94 + */
  95 +global.getQueryVariable = (variable) => {
  96 + var query = window.location.search.substring(1);
  97 + var vars = query.split("&");
  98 + for (var i = 0; i < vars.length; i++) {
  99 + var pair = vars[i].split("=");
  100 + if (pair[0] == variable) {
  101 + return pair[1];
  102 + }
  103 + }
  104 + return (false);
  105 +}
  106 +
  107 +global.viewer = (path) =>{
  108 + window.open("/src/lib/extend/pdfjs/web/viewer.html?test=" + encodeURIComponent(path));
  109 +}
  110 +
  111 +// 组件默认大小
  112 +global.elementSize = 'small';
  113 +
  114 +
40 export default global 115 export default global
@@ -5,11 +5,11 @@ @@ -5,11 +5,11 @@
5 </el-input> 5 </el-input>
6 </el-form-item> 6 </el-form-item>
7 <el-form-item label="" :disabled="initFlga"> 7 <el-form-item label="" :disabled="initFlga">
8 - <res-type-tree-input multiple clearable collapseTags @callback="getResType" /> 8 + <cm-res-type-tree-input multiple clearable collapseTags @callback="getResType" />
9 </el-form-item> 9 </el-form-item>
10 10
11 <el-form-item label=""> 11 <el-form-item label="">
12 - <machine-room @callback="getMachineRoom"></machine-room> 12 + <cm-machine-room @callback="getMachineRoom"></cm-machine-room>
13 </el-form-item> 13 </el-form-item>
14 14
15 <el-form-item> 15 <el-form-item>
1 <title>文档管理</title> 1 <title>文档管理</title>
2 -<iframe src="/vue3/index.html#/documentationManagement" class="layadmin-iframe"/> 2 +<iframe src="/vue3/index.html#/documentationManagement" class="layadmin-iframe" style="height: 99.5%!important;"/>
@@ -21,8 +21,7 @@ @@ -21,8 +21,7 @@
21 21
22 22
23 .tree-config .tree-node .tree-node-label{ 23 .tree-config .tree-node .tree-node-label{
24 - width: calc(100% - 40px);  
25 - text-align: left; 24 + width: calc(100% - 40px);text-align: left;
26 } 25 }
27 26
28 .tree-config .tree-node .tree-node-tools{ 27 .tree-config .tree-node .tree-node-tools{
1 -<div class="assets-configmanagers">  
2 -<!-- 文档管理-->  
3 - <div>  
4 - <!-- 左侧树结构 -->  
5 - <el-row>  
6 - <el-col :span="6" class='col-class'>  
7 - <el-tree :data="dataSource" :default-expanded-keys="[1]" :props="defaultProps" @node-click="handleNodeClick" />  
8 - </el-col>  
9 - <!-- 右侧显示 -->  
10 - <el-col :span="17" class='col-class'>  
11 - <el-tabs v-model="activeName" @tab-click="handleClick">  
12 - <el-tab-pane label="<" name="first">  
13 - <el-table :data="tableData" header-row-class-name="tbl-header-class" height="800px" style="width: 100%;margin: 20px 0;">  
14 - <el-table-column type="index" label="序号" align="center" width="50" />  
15 - <el-table-column prop="name" label="文件" min-width="380" >  
16 - <template #default="scope">  
17 - <el-link type="primary">{{scope.row.name}}</el-link>  
18 - </template>  
19 - </el-table-column>  
20 - <el-table-column prop="createTime" label="时间" align="center" min-width="180" />  
21 - </el-table>  
22 - </el-tab-pane>  
23 - <el-tab-pane label=">" name="second">  
24 - <el-table :data="tableData" header-row-class-name="tbl-header-class" height="800px" style="width: 100%;margin: 20px 0;">  
25 - <el-table-column type="index" label="序号" align="center" width="50" />  
26 - <el-table-column prop="name" label="文件" min-width="380" >  
27 - <template #default="scope">  
28 - <img style="width: 50px; height: 50px" src="./1.png"/>  
29 - <span>{{scope.row.name}}</span>  
30 - </template>  
31 - </el-table-column>  
32 - <el-table-column prop="createTime" label="时间" align="center" min-width="180" />  
33 - <!-- <el-table-column prop="name" label="文件名称" align="center" min-width="180" >-->  
34 - <!-- <template #default="scope">-->  
35 - <!-- <span>{{scope.row.name}}</span>-->  
36 - <!-- </template>-->  
37 - <!-- </el-table-column>-->  
38 - </el-table>  
39 - </el-tab-pane>  
40 - </el-tabs>  
41 - <div style="text-align: center">  
42 - <el-pagination @size-change="handleSizeChange"  
43 - @prev-click="prePage"  
44 - @next-click="nextPage"  
45 - @current-change="handleCurrentChange"  
46 - :current-page="pageInfo.page" :page-sizes="[50,100, 150, 200]" :page-size="pageInfo.limit"  
47 - layout="total, sizes, prev, pager, next, jumper" :total="pageInfo.total" />  
48 - </div>  
49 - </el-col>  
50 - </el-row>  
51 - </div>  
52 -</div>  
  1 +<div class="container">
  2 + <cm-document></cm-document>
  3 +</div>
@@ -3,135 +3,13 @@ export default { @@ -3,135 +3,13 @@ export default {
3 template: '', 3 template: '',
4 setup(props, {attrs, slots, emit}) { 4 setup(props, {attrs, slots, emit}) {
5 const { proxy } = Vue.getCurrentInstance() 5 const { proxy } = Vue.getCurrentInstance()
6 - let options= Vue.ref([  
7 - {  
8 - value: 'HTML',  
9 - label: 'HTML',  
10 - },  
11 - {  
12 - value: 'CSS',  
13 - label: 'CSS',  
14 - },  
15 - {  
16 - value: 'JavaScript',  
17 - label: 'JavaScript',  
18 - },  
19 - ])  
20 - let activeName= Vue.ref('first')  
21 - let value= Vue.ref([])  
22 - let imageUrl = Vue.ref('')  
23 - let rowData = Vue.ref('5')  
24 - let dialogVisible = Vue.ref(false)  
25 - let dialogVisibles = Vue.ref(false)  
26 - let tableData = Vue.ref([])  
27 -  
28 - let dataSource = Vue.ref([]);  
29 - let ruleForm = Vue.ref({  
30 - name: '',  
31 - region: '',  
32 - date1: '',  
33 - date2: '',  
34 - delivery: false,  
35 - type: [],  
36 - resource: '',  
37 - desc: '',  
38 - })  
39 - // 分页信息  
40 - const pageInfo = Vue.reactive({  
41 - total: 0,  
42 - limit: 50,  
43 - page: 1,  
44 - keyWords:''  
45 - })  
46 - let handleCell=(row)=>{  
47 - // this.$set(row,'show',true)  
48 - console.log(data)  
49 - }  
50 - // 搜索  
51 - let onSearch = () => {  
52 - var params = {  
53 - // page: pageInfo.page,  
54 - // limit: pageInfo.limit,  
55 - resName: 'admin',  
56 - // sortKey: '',  
57 - // resType: resTypeArr.value.join(','),  
58 - // resPositon: machineRoom.value,  
59 - // addr: '',  
60 - // maintenanceTimeEnd: '',  
61 - // maintenanceTimeStart: '',  
62 - // resCategory: 'assets'  
63 - };  
64 - proxy.$http.get("/inspection-report/file/file/all", params, function (res) {  
65 - if (res && res.data) {  
66 - tableData.value = res.data;  
67 - console.log(tableData,'tableDatatableData');  
68 - } else {  
69 - proxy.$global.showMsg('暂无数据!');  
70 - }  
71 - },function (){  
72 - proxy.$global.showMsg('没有查询到记录!');  
73 - });  
74 - var obj={  
75 - category:'id_fxbg_netsys_month',  
76 - name:'网络系统月度报告',  
77 - id:'id_fxbg_netsys_month',  
78 - }  
79 - proxy.$http.get("/inspection-report/file/file/page", obj, function (res) {  
80 - if (res && res.data) {  
81 - tableData.value = res.data;  
82 - } else {  
83 - proxy.$global.showMsg('暂无数据!');  
84 - }  
85 - },function (){  
86 - proxy.$global.showMsg('没有查询到记录!');  
87 - });  
88 - proxy.$http.get("/inspection-report/file/file/count",'', function (res) {  
89 - if (res && res.data) {  
90 - tableData.value = res.data;  
91 - } else {  
92 - proxy.$global.showMsg('暂无数据!');  
93 - }  
94 - },function (){  
95 - proxy.$global.showMsg('没有查询到记录!');  
96 - });  
97 - handleTree()  
98 - }  
99 - let handleNodeClick=(data)=> {  
100 - handleTree(data.id)  
101 - console.log(data)  
102 - }  
103 - let handleTree=(id)=>{  
104 - id=id?id:'分析报告'  
105 - var objs={  
106 - id:id  
107 - }  
108 - proxy.$http.get("/inspection-report/file/file/sort", objs, function (res) {  
109 - if (res && res.data) {  
110 - dataSource.value = res.data;  
111 - } else {  
112 - proxy.$global.showMsg('暂无数据!');  
113 - }  
114 - },function (){  
115 - proxy.$global.showMsg('没有查询到记录!');  
116 - });  
117 - }  
118 6
119 Vue.onMounted(() => { 7 Vue.onMounted(() => {
120 - onSearch() 8 +
121 }) 9 })
122 10
123 return { 11 return {
124 - activeName,  
125 - handleNodeClick,  
126 - handleTree,  
127 - pageInfo,  
128 - onSearch,  
129 - tableData,  
130 - value,  
131 - options,  
132 - handleCell,  
133 - ruleForm,  
134 - dataSource, 12 +
135 }; 13 };
136 }, 14 },
137 -}  
  15 +}
@@ -8,134 +8,7 @@ @@ -8,134 +8,7 @@
8 </el-col> 8 </el-col>
9 <!-- 右侧显示 --> 9 <!-- 右侧显示 -->
10 <el-col :span="19" class='col-class'> 10 <el-col :span="19" class='col-class'>
11 - <div>  
12 - <div>  
13 - <!-- 人员信息总汇-->  
14 - <el-divider content-position="left">人员信息总汇</el-divider>  
15 - <el-table border :data="tableData" stripe header-row-class-name="tbl-header-class" height="200px" style="width: 100%;margin: 20px 0;">  
16 - <el-table-column type="index" label="序号" align="center" width="50" />  
17 - <el-table-column prop="date" sortable label="运维人员姓名" align="center" min-width="180" />  
18 - <el-table-column prop="name" sortable label="在职状态" align="center" min-width="180" />  
19 - <el-table-column prop="name" sortable label="个人信息" align="center" min-width="180" >  
20 - <template #default="scope">  
21 - <span  
22 - :class="[scope.row.address == '√' ? 'yes': '',scope.row.address == '×' ? 'no': '',]"  
23 - >  
24 - {{scope.row.name}}  
25 - </span>  
26 - </template>  
27 - </el-table-column>  
28 - <el-table-column prop="name" sortable label="个人保密协议" align="center" width="180">  
29 - <template #default="scope">  
30 - <span  
31 - :class="[scope.row.address == '√' ? 'yes': '',scope.row.address == '×' ? 'no': '',]"  
32 - >  
33 - {{scope.row.name}}  
34 - </span>  
35 - </template>  
36 - </el-table-column>  
37 - <el-table-column prop="name" sortable label="月度总结" align="center" width="180" >  
38 - <template #default="scope">  
39 - <span  
40 - :class="[scope.row.address == '√' ? 'yes': '',scope.row.address == '×' ? 'no': '',]"  
41 - >  
42 - {{scope.row.name}}  
43 - </span>  
44 - </template>  
45 - </el-table-column>  
46 - </el-table>  
47 - <!-- 分页 -->  
48 - <div style='text-align: left;'>  
49 - <el-pagination  
50 - @size-change="handleSizeChange"  
51 - @current-change="handleCurrentChange"  
52 - :current-page="currentPage4"  
53 - :page-sizes="[100, 200, 300, 400]"  
54 - :page-size="100"  
55 - layout="total, sizes, prev, pager, next, jumper"  
56 - :total="400">  
57 - </el-pagination>  
58 - </div>  
59 - </div>  
60 - <div>  
61 - <!-- 项目评价总汇-->  
62 - <el-divider content-position="left">项目评价总汇</el-divider>  
63 - <el-table border :data="tableData" stripe header-row-class-name="tbl-header-class" height="200px" style="width: 100%;margin: 20px 0;">  
64 - <el-table-column type="index" label="序号" align="center" width="50" />  
65 - <el-table-column prop="date" label="年度" align="center" width="100" />  
66 - <el-table-column prop="name" label="1月" align="center" width="100" />  
67 - <el-table-column prop="name" label="2月" align="center" width="100" />  
68 - <el-table-column prop="name" label="3月" align="center" width="100" />  
69 - <el-table-column prop="name" label="4月" align="center" width="100" />  
70 - <el-table-column prop="name" label="5月" align="center" width="100" />  
71 - <el-table-column prop="name" label="6月" align="center" width="100" />  
72 - <el-table-column prop="name" label="7月" align="center" width="100" />  
73 - <el-table-column prop="name" label="8月" align="center" width="100" />  
74 - <el-table-column prop="name" label="9月" align="center" width="100" />  
75 - <el-table-column prop="name" label="10月" align="center" width="100" />  
76 - <el-table-column prop="name" label="11月" align="center" width="100" />  
77 - <el-table-column prop="name" label="12月" align="center" width="100" />  
78 - </el-table>  
79 - <!-- 分页 -->  
80 - <div style='text-align: left;'>  
81 - <el-pagination  
82 - @size-change="handleSizeChange"  
83 - @current-change="handleCurrentChange"  
84 - :current-page="currentPage4"  
85 - :page-sizes="[100, 200, 300, 400]"  
86 - :page-size="100"  
87 - layout="total, sizes, prev, pager, next, jumper"  
88 - :total="400">  
89 - </el-pagination>  
90 - </div>  
91 - </div>  
92 - <div>  
93 - <!-- 项目资料总汇-->  
94 - <el-divider content-position="left">项目资料总汇</el-divider>  
95 - <el-table border :data="tableData" stripe header-row-class-name="tbl-header-class" height="200px" style="width: 100%;margin: 20px 0;">  
96 - <el-table-column prop="date" label="日常资料" align="center" min-width="100" >  
97 - <template #default="scope">  
98 - <span  
99 - :class="[scope.row.address == '√' ? 'yes': '',scope.row.address == '×' ? 'no': '',]"  
100 - >  
101 - {{scope.row.name}}  
102 - </span>  
103 - </template>  
104 - </el-table-column>  
105 - <el-table-column prop="date" label="文档资料" align="center" min-width="100" >  
106 - <template #default="scope">  
107 - <span  
108 - :class="[scope.row.address == '√' ? 'yes': '',scope.row.address == '×' ? 'no': '',]"  
109 - >  
110 - {{scope.row.name}}  
111 - </span>  
112 - </template>  
113 - </el-table-column>  
114 - <el-table-column prop="name" label="项目保密协议" align="center" min-width="100" >  
115 - <template #default="scope">  
116 - <span  
117 - :class="[scope.row.address == '√' ? 'yes': '',scope.row.address == '×' ? 'no': '',]"  
118 - >  
119 - {{scope.row.name}}  
120 - </span>  
121 - </template>  
122 - </el-table-column>  
123 11
124 - </el-table>  
125 - <!-- 分页 -->  
126 - <div style='text-align: left;'>  
127 - <el-pagination  
128 - @size-change="handleSizeChange"  
129 - @current-change="handleCurrentChange"  
130 - :current-page="currentPage4"  
131 - :page-sizes="[100, 200, 300, 400]"  
132 - :page-size="100"  
133 - layout="total, sizes, prev, pager, next, jumper"  
134 - :total="400">  
135 - </el-pagination>  
136 - </div>  
137 - </div>  
138 - </div>  
139 <!-- 表单 --> 12 <!-- 表单 -->
140 <div> 13 <div>
141 <el-form 14 <el-form
@@ -395,4 +268,4 @@ @@ -395,4 +268,4 @@
395 </el-col> 268 </el-col>
396 </el-row> 269 </el-row>
397 </div> 270 </div>
398 -</div>  
  271 +</div>
1 <!--:style="{'height':height+'px','max-height':height+'px','overflow':'auto'}"--> 1 <!--:style="{'height':height+'px','max-height':height+'px','overflow':'auto'}"-->
2 -<div class="container tree-config" > 2 +<div class="container tree-config" :style="{'height':height+'px','max-height':height+'px','overflow':'auto'}">
3 <el-row :gutter="5"> 3 <el-row :gutter="5">
4 <el-col :span="4" > 4 <el-col :span="4" >
5 - <div class="card-item">  
6 - <div class="filter-view">  
7 - <el-input v-model="filterText" size="samll" placeholder="请输入关键字" />  
8 - </div>  
9 - <div :style="{'height':height+'px','max-height':(height - 54)+'px','overflow':'auto','padding':'0px'}">  
10 - <el-tree ref="tree" style="padding:6px;" :props="props" :data="treeData" node-key="id" default-expand-all :expand-on-click-node="false">  
11 - <template #default="{ node, data }">  
12 - <div class="tree-node">  
13 - <div class="tree-node-label">{{ node.label }}</div>  
14 - </div>  
15 - </template>  
16 - </el-tree>  
17 - </div>  
18 - </div> 5 + <cm-res-type-tree-view :treeData="treeData" :show-tools="true"></cm-res-type-tree-view>
19 </el-col> 6 </el-col>
20 <el-col :span="20" > 7 <el-col :span="20" >
21 <div class="card-item"> 8 <div class="card-item">
@@ -16,7 +16,7 @@ export default { @@ -16,7 +16,7 @@ export default {
16 }, 16 },
17 setup() { 17 setup() {
18 const {proxy} = Vue.getCurrentInstance(); 18 const {proxy} = Vue.getCurrentInstance();
19 - let height = Vue.ref(window.innerHeight); 19 + let height = Vue.ref(window.innerHeight - 50);
20 const treeData = Vue.ref([]); 20 const treeData = Vue.ref([]);
21 const tableData = Vue.ref([]); 21 const tableData = Vue.ref([]);
22 22