Jelajahi Sumber

Merge branch 'master' of http://39.106.8.246:3003/BDTP/adm-frontend

qule 3 tahun lalu
induk
melakukan
059c5f4d37

+ 2 - 1
package.json

@@ -18,7 +18,8 @@
     "meri-design": "^1.5.515",
     "moment": "^2.29.1",
     "vue-router": "^3.5.3",
-    "vuex": "^3.6.2"
+    "vuex": "^3.6.2",
+    "jquery": "^3.3.1"
   },
   "devDependencies": {
     "@vue/cli-plugin-babel": "~4.5.0",

+ 3 - 7
public/systemConf.js

@@ -2,9 +2,9 @@ var __systemConf = {
   //路由根路径
   baseRouteUrl: 'adm-frontend',
   //基础数据根域名
-  baseServiceUrl: '/baseService',
+  baseServiceUrl: 'http://develop.ysbdtp.com',
   //系统图服务域名
-  sysGraphServiceUrl: '/sysGraphService',
+  sysGraphServiceUrl: 'http://develop.ysbdtp.com/adm-diagram',
   // 地图key
   mapKey: 'd42beb96e0e4fb0d49482975abeae1b7',
   //系统图的默认配置
@@ -88,8 +88,4 @@ if (typeof window != 'undefined') {
 
 if (typeof module != 'undefined') {
   module.exports = __systemConf;
-}
-
-// if (typeof export != 'undefined') {
-//   module.exports = __systemConf;
-// }
+}

TEMPAT SAMPAH
src/assets/css/chosen-sprite.png


TEMPAT SAMPAH
src/assets/css/chosen-sprite@2x.png


+ 492 - 0
src/assets/css/chosen.css

@@ -0,0 +1,492 @@
+/*!
+Chosen, a Select Box Enhancer for jQuery and Prototype
+by Patrick Filler for Harvest, http://getharvest.com
+
+Version 1.8.5
+Full source at https://github.com/harvesthq/chosen
+Copyright (c) 2011-2018 Harvest http://getharvest.com
+
+MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
+This file is generated by `grunt build`, do not edit it by hand.
+*/
+
+.chosen-container.chosen-with-drop-top .chosen-drop {
+    left: 0;
+    top: -220px;
+}
+
+.chosen-container {
+    position: relative;
+    display: inline-block;
+    vertical-align: middle;
+    font-size: 13px;
+    -webkit-user-select: none;
+    -moz-user-select: none;
+    -ms-user-select: none;
+    user-select: none
+}
+
+.chosen-container * {
+    -webkit-box-sizing: border-box;
+    box-sizing: border-box
+}
+
+.chosen-container .chosen-drop {
+    position: absolute;
+    top: 100%;
+    z-index: 1010;
+    width: 100%;
+    border: 1px solid #aaa;
+    border-top: 0;
+    background: #fff;
+    -webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
+    box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
+    display: none;
+    box-sizing: border-box;
+}
+
+.chosen-container.chosen-with-drop .chosen-drop {
+    display: block
+}
+
+.chosen-container a {
+    cursor: pointer
+}
+
+.chosen-container .chosen-single .group-name,
+.chosen-container .search-choice .group-name {
+    margin-right: 4px;
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    font-weight: 400;
+    color: #999
+}
+
+.chosen-container .chosen-single .group-name:after,
+.chosen-container .search-choice .group-name:after {
+    content: ":";
+    padding-left: 2px;
+    vertical-align: top
+}
+
+.chosen-container-single .chosen-single {
+    position: relative;
+    display: block;
+    overflow: hidden;
+    padding: 0 0 0 8px;
+    height: 25px;
+    border: 1px solid #aaa;
+    border-radius: 5px;
+    background-color: #fff;
+    background: -webkit-gradient(linear, left top, left bottom, color-stop(20%, #fff), color-stop(50%, #f6f6f6), color-stop(52%, #eee), to(#f4f4f4));
+    background: linear-gradient(#fff 20%, #f6f6f6 50%, #eee 52%, #f4f4f4 100%);
+    background-clip: padding-box;
+    -webkit-box-shadow: 0 0 3px #fff inset, 0 1px 1px rgba(0, 0, 0, .1);
+    box-shadow: 0 0 3px #fff inset, 0 1px 1px rgba(0, 0, 0, .1);
+    color: #444;
+    text-decoration: none;
+    white-space: nowrap;
+    line-height: 24px
+}
+
+.chosen-container-single .chosen-single input[type=text] {
+    cursor: pointer;
+    opacity: 0;
+    position: absolute;
+    width: 0
+}
+
+.chosen-container-single .chosen-default {
+    color: #999
+}
+
+.chosen-container-single .chosen-single span {
+    display: block;
+    overflow: hidden;
+    margin-right: 26px;
+    text-overflow: ellipsis;
+    white-space: nowrap
+}
+
+.chosen-container-single .chosen-single-with-deselect span {
+    margin-right: 38px
+}
+
+.chosen-container-single .chosen-single abbr {
+    position: absolute;
+    top: 6px;
+    right: 26px;
+    display: block;
+    width: 12px;
+    height: 12px;
+    background: url(chosen-sprite.png) -42px 1px no-repeat;
+    font-size: 1px
+}
+
+.chosen-container-single .chosen-single abbr:hover {
+    background-position: -42px -10px
+}
+
+.chosen-container-single.chosen-disabled .chosen-single abbr:hover {
+    background-position: -42px -10px
+}
+
+.chosen-container-single .chosen-single div {
+    position: absolute;
+    top: 0;
+    right: 0;
+    display: block;
+    width: 18px;
+    height: 100%
+}
+
+.chosen-container-single .chosen-single div b {
+    display: block;
+    width: 100%;
+    height: 100%;
+    background: url(chosen-sprite.png) no-repeat 0 2px
+}
+
+.chosen-container-single .chosen-search {
+    position: relative;
+    z-index: 1010;
+    margin: 0;
+    padding: 3px 4px;
+    white-space: nowrap
+}
+
+.chosen-container-single .chosen-search input[type=text] {
+    margin: 1px 0;
+    padding: 4px 20px 4px 5px;
+    width: 100%;
+    height: auto;
+    outline: 0;
+    border: 1px solid #aaa;
+    background: url(chosen-sprite.png) no-repeat 100% -20px;
+    font-size: 1em;
+    font-family: sans-serif;
+    line-height: normal;
+    border-radius: 0;
+    box-sizing: border-box;
+}
+
+.chosen-container-single .chosen-drop {
+    margin-top: -1px;
+    border-radius: 0 0 4px 4px;
+    background-clip: padding-box
+}
+
+.chosen-container-single.chosen-container-single-nosearch .chosen-search {
+    position: absolute;
+    opacity: 0;
+    pointer-events: none
+}
+
+.chosen-container .chosen-results {
+    color: #444;
+    position: relative;
+    overflow-x: hidden;
+    overflow-y: auto;
+    margin: 0 4px 4px 0;
+    padding: 0 0 0 4px;
+    max-height: 100px;
+    -webkit-overflow-scrolling: touch
+}
+
+.chosen-container .chosen-results li {
+    display: none;
+    margin: 0;
+    padding: 5px 6px;
+    list-style: none;
+    line-height: 15px;
+    word-wrap: break-word;
+    -webkit-touch-callout: none
+}
+
+.chosen-container .chosen-results li.active-result {
+    display: list-item;
+    cursor: pointer
+}
+
+.chosen-container .chosen-results li.disabled-result {
+    display: list-item;
+    color: #ccc;
+    cursor: default
+}
+
+.chosen-container .chosen-results li.highlighted {
+    background-color: #3875d7;
+    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(20%, #3875d7), color-stop(90%, #2a62bc));
+    background-image: linear-gradient(#3875d7 20%, #2a62bc 90%);
+    color: #fff
+}
+
+.chosen-container .chosen-results li.no-results {
+    color: #777;
+    display: list-item;
+    background: #f4f4f4
+}
+
+.chosen-container .chosen-results li.group-result {
+    display: list-item;
+    font-weight: 700;
+    cursor: default
+}
+
+.chosen-container .chosen-results li.group-option {
+    padding-left: 15px
+}
+
+.chosen-container .chosen-results li em {
+    font-style: normal;
+    text-decoration: underline
+}
+
+.chosen-container-multi .chosen-choices {
+    position: relative;
+    overflow: hidden;
+    margin: 0;
+    padding: 0 5px;
+    width: 100%;
+    height: auto;
+    border: 1px solid #aaa;
+    background-color: #fff;
+    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(1%, #eee), color-stop(15%, #fff));
+    background-image: linear-gradient(#eee 1%, #fff 15%);
+    cursor: text
+}
+
+.chosen-container-multi .chosen-choices li {
+    float: left;
+    list-style: none
+}
+
+.chosen-container-multi .chosen-choices li.search-field {
+    margin: 0;
+    padding: 0;
+    white-space: nowrap
+}
+
+.chosen-container-multi .chosen-choices li.search-field input[type=text] {
+    margin: 1px 0;
+    padding: 0;
+    height: 25px;
+    outline: 0;
+    border: 0!important;
+    background: 0 0!important;
+    -webkit-box-shadow: none;
+    box-shadow: none;
+    color: #999;
+    font-size: 100%;
+    font-family: sans-serif;
+    line-height: normal;
+    border-radius: 0;
+    width: 25px
+}
+
+.chosen-container-multi .chosen-choices li.search-choice {
+    position: relative;
+    margin: 3px 5px 3px 0;
+    padding: 3px 20px 3px 5px;
+    border: 1px solid #aaa;
+    max-width: 100%;
+    border-radius: 3px;
+    background-color: #eee;
+    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), to(#eee));
+    background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
+    background-size: 100% 19px;
+    background-repeat: repeat-x;
+    background-clip: padding-box;
+    -webkit-box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, .05);
+    box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, .05);
+    color: #333;
+    line-height: 13px;
+    cursor: default
+}
+
+.chosen-container-multi .chosen-choices li.search-choice span {
+    word-wrap: break-word
+}
+
+.chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
+    position: absolute;
+    top: 4px;
+    right: 3px;
+    display: block;
+    width: 12px;
+    height: 12px;
+    background: url(chosen-sprite.png) -42px 1px no-repeat;
+    font-size: 1px
+}
+
+.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover {
+    background-position: -42px -10px
+}
+
+.chosen-container-multi .chosen-choices li.search-choice-disabled {
+    padding-right: 5px;
+    border: 1px solid #ccc;
+    background-color: #e4e4e4;
+    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), to(#eee));
+    background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
+    color: #666
+}
+
+.chosen-container-multi .chosen-choices li.search-choice-focus {
+    background: #d4d4d4
+}
+
+.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close {
+    background-position: -42px -10px
+}
+
+.chosen-container-multi .chosen-results {
+    margin: 0;
+    padding: 0
+}
+
+.chosen-container-multi .chosen-drop .result-selected {
+    display: list-item;
+    color: #ccc;
+    cursor: default
+}
+
+.chosen-container-active .chosen-single {
+    border: 1px solid #5897fb;
+    -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .3);
+    box-shadow: 0 0 5px rgba(0, 0, 0, .3)
+}
+
+.chosen-container-active.chosen-with-drop .chosen-single {
+    border: 1px solid #aaa;
+    border-bottom-right-radius: 0;
+    border-bottom-left-radius: 0;
+    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(20%, #eee), color-stop(80%, #fff));
+    background-image: linear-gradient(#eee 20%, #fff 80%);
+    -webkit-box-shadow: 0 1px 0 #fff inset;
+    box-shadow: 0 1px 0 #fff inset
+}
+
+.chosen-container-active.chosen-with-drop .chosen-single div {
+    border-left: none;
+    background: 0 0
+}
+
+.chosen-container-active.chosen-with-drop .chosen-single div b {
+    background-position: -18px 2px
+}
+
+.chosen-container-active .chosen-choices {
+    border: 1px solid #5897fb;
+    -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .3);
+    box-shadow: 0 0 5px rgba(0, 0, 0, .3)
+}
+
+.chosen-container-active .chosen-choices li.search-field input[type=text] {
+    color: #222!important
+}
+
+.chosen-disabled {
+    opacity: .5!important;
+    cursor: default
+}
+
+.chosen-disabled .chosen-single {
+    cursor: default
+}
+
+.chosen-disabled .chosen-choices .search-choice .search-choice-close {
+    cursor: default
+}
+
+.chosen-rtl {
+    text-align: right
+}
+
+.chosen-rtl .chosen-single {
+    overflow: visible;
+    padding: 0 8px 0 0
+}
+
+.chosen-rtl .chosen-single span {
+    margin-right: 0;
+    margin-left: 26px;
+    direction: rtl
+}
+
+.chosen-rtl .chosen-single-with-deselect span {
+    margin-left: 38px
+}
+
+.chosen-rtl .chosen-single div {
+    right: auto;
+    left: 3px
+}
+
+.chosen-rtl .chosen-single abbr {
+    right: auto;
+    left: 26px
+}
+
+.chosen-rtl .chosen-choices li {
+    float: right
+}
+
+.chosen-rtl .chosen-choices li.search-field input[type=text] {
+    direction: rtl
+}
+
+.chosen-rtl .chosen-choices li.search-choice {
+    margin: 3px 5px 3px 0;
+    padding: 3px 5px 3px 19px
+}
+
+.chosen-rtl .chosen-choices li.search-choice .search-choice-close {
+    right: auto;
+    left: 4px
+}
+
+.chosen-rtl.chosen-container-single .chosen-results {
+    margin: 0 0 4px 4px;
+    padding: 0 4px 0 0
+}
+
+.chosen-rtl .chosen-results li.group-option {
+    padding-right: 15px;
+    padding-left: 0
+}
+
+.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div {
+    border-right: none
+}
+
+.chosen-rtl .chosen-search input[type=text] {
+    padding: 4px 5px 4px 20px;
+    background: url(chosen-sprite.png) no-repeat -30px -20px;
+    direction: rtl
+}
+
+.chosen-rtl.chosen-container-single .chosen-single div b {
+    background-position: 6px 2px
+}
+
+.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b {
+    background-position: -12px 2px
+}
+
+@media only screen and (-webkit-min-device-pixel-ratio:1.5),
+only screen and (min-resolution:144dpi),
+only screen and (min-resolution:1.5dppx) {
+    .chosen-container .chosen-results-scroll-down span,
+    .chosen-container .chosen-results-scroll-up span,
+    .chosen-container-multi .chosen-choices .search-choice .search-choice-close,
+    .chosen-container-single .chosen-search input[type=text],
+    .chosen-container-single .chosen-single abbr,
+    .chosen-container-single .chosen-single div b,
+    .chosen-rtl .chosen-search input[type=text] {
+        background-image: url(chosen-sprite@2x.png)!important;
+        background-size: 52px 37px!important;
+        background-repeat: no-repeat!important
+    }
+}

+ 477 - 0
src/assets/css/jsmind.css

@@ -0,0 +1,477 @@
+/*
+ * Released under BSD License
+ * Copyright (c) 2014-2015 hizzgdev@163.com
+ * 
+ * Project Home:
+ *   https://github.com/hizzgdev/jsmind/
+ */
+
+
+/* important section */
+
+.jsmind-inner {
+    position: relative;
+    overflow: auto;
+    width: 100%;
+    height: 100%;
+}
+
+
+/*box-shadow:0 0 2px #000;*/
+
+.jsmind-inner {
+    moz-user-select: -moz-none;
+    -moz-user-select: none;
+    -o-user-select: none;
+    -khtml-user-select: none;
+    -webkit-user-select: none;
+    -ms-user-select: none;
+    user-select: none;
+}
+
+
+/* z-index:1 */
+
+canvas {
+    position: absolute;
+    z-index: 1;
+}
+
+
+/* z-index:2 */
+
+jmnodes {
+    position: absolute;
+    z-index: 2;
+    background-color: rgba(0, 0, 0, 0);
+}
+
+
+/*background color is necessary*/
+
+jmnode {
+    position: absolute;
+    cursor: default;
+    max-width: 400px;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+}
+
+jmexpander {
+    position: absolute;
+    width: 11px;
+    height: 11px;
+    display: block;
+    overflow: hidden;
+    line-height: 12px;
+    font-size: 12px;
+    text-align: center;
+    border-radius: 6px;
+    border-width: 1px;
+    border-style: solid;
+    cursor: pointer;
+}
+
+
+/* default theme */
+
+jmnode {
+    padding: 10px;
+    background-color: #fff;
+    color: #333;
+    border-radius: 5px;
+    box-shadow: 1px 1px 1px #666;
+    font: 16px/1.125 Verdana, Arial, Helvetica, sans-serif;
+}
+
+jmnode:hover {
+    box-shadow: 2px 2px 8px #000;
+    background-color: #ebebeb;
+    color: #333;
+}
+
+jmnode.selected {
+    background-color: #11f;
+    color: #fff;
+    box-shadow: 2px 2px 8px #000;
+}
+
+jmnode.root {
+    font-size: 24px;
+}
+
+jmexpander {
+    border-color: gray;
+}
+
+jmexpander:hover {
+    border-color: #000;
+}
+
+@media screen and (max-device-width: 1024px) {
+    jmnode {
+        padding: 5px;
+        border-radius: 3px;
+        font-size: 14px;
+    }
+    jmnode.root {
+        font-size: 21px;
+    }
+}
+
+
+/* primary theme */
+
+jmnodes.theme-primary jmnode {
+    background-color: #428bca;
+    color: #fff;
+    border-color: #357ebd;
+}
+
+jmnodes.theme-primary jmnode:hover {
+    background-color: #3276b1;
+    border-color: #285e8e;
+}
+
+jmnodes.theme-primary jmnode.selected {
+    background-color: #f1c40f;
+    color: #fff;
+}
+
+jmnodes.theme-primary jmnode.root {}
+
+jmnodes.theme-primary jmexpander {}
+
+jmnodes.theme-primary jmexpander:hover {}
+
+
+/* warning theme */
+
+jmnodes.theme-warning jmnode {
+    background-color: #f0ad4e;
+    border-color: #eea236;
+    color: #fff;
+}
+
+jmnodes.theme-warning jmnode:hover {
+    background-color: #ed9c28;
+    border-color: #d58512;
+}
+
+jmnodes.theme-warning jmnode.selected {
+    background-color: #11f;
+    color: #fff;
+}
+
+jmnodes.theme-warning jmnode.root {}
+
+jmnodes.theme-warning jmexpander {}
+
+jmnodes.theme-warning jmexpander:hover {}
+
+
+/* danger theme */
+
+jmnodes.theme-danger jmnode {
+    background-color: #d9534f;
+    border-color: #d43f3a;
+    color: #fff;
+}
+
+jmnodes.theme-danger jmnode:hover {
+    background-color: #d2322d;
+    border-color: #ac2925;
+}
+
+jmnodes.theme-danger jmnode.selected {
+    background-color: #11f;
+    color: #fff;
+}
+
+jmnodes.theme-danger jmnode.root {}
+
+jmnodes.theme-danger jmexpander {}
+
+jmnodes.theme-danger jmexpander:hover {}
+
+
+/* success theme */
+
+jmnodes.theme-success jmnode {
+    background-color: #5cb85c;
+    border-color: #4cae4c;
+    color: #fff;
+}
+
+jmnodes.theme-success jmnode:hover {
+    background-color: #47a447;
+    border-color: #398439;
+}
+
+jmnodes.theme-success jmnode.selected {
+    background-color: #11f;
+    color: #fff;
+}
+
+jmnodes.theme-success jmnode.root {}
+
+jmnodes.theme-success jmexpander {}
+
+jmnodes.theme-success jmexpander:hover {}
+
+
+/* info theme */
+
+jmnodes.theme-info jmnode {
+    background-color: #5dc0de;
+    border-color: #46b8da;
+    ;
+    color: #fff;
+}
+
+jmnodes.theme-info jmnode:hover {
+    background-color: #39b3d7;
+    border-color: #269abc;
+}
+
+jmnodes.theme-info jmnode.selected {
+    background-color: #11f;
+    color: #fff;
+}
+
+jmnodes.theme-info jmnode.root {}
+
+jmnodes.theme-info jmexpander {}
+
+jmnodes.theme-info jmexpander:hover {}
+
+
+/* greensea theme */
+
+jmnodes.theme-greensea jmnode {
+    background-color: #1abc9c;
+    color: #fff;
+}
+
+jmnodes.theme-greensea jmnode:hover {
+    background-color: #16a085;
+}
+
+jmnodes.theme-greensea jmnode.selected {
+    background-color: #11f;
+    color: #fff;
+}
+
+jmnodes.theme-greensea jmnode.root {}
+
+jmnodes.theme-greensea jmexpander {}
+
+jmnodes.theme-greensea jmexpander:hover {}
+
+
+/* nephrite theme */
+
+jmnodes.theme-nephrite jmnode {
+    background-color: #2ecc71;
+    color: #fff;
+}
+
+jmnodes.theme-nephrite jmnode:hover {
+    background-color: #27ae60;
+}
+
+jmnodes.theme-nephrite jmnode.selected {
+    background-color: #11f;
+    color: #fff;
+}
+
+jmnodes.theme-nephrite jmnode.root {}
+
+jmnodes.theme-nephrite jmexpander {}
+
+jmnodes.theme-nephrite jmexpander:hover {}
+
+
+/* belizehole theme */
+
+jmnodes.theme-belizehole jmnode {
+    background-color: #3498db;
+    color: #fff;
+}
+
+jmnodes.theme-belizehole jmnode:hover {
+    background-color: #2980b9;
+}
+
+jmnodes.theme-belizehole jmnode.selected {
+    background-color: #11f;
+    color: #fff;
+}
+
+jmnodes.theme-belizehole jmnode.root {}
+
+jmnodes.theme-belizehole jmexpander {}
+
+jmnodes.theme-belizehole jmexpander:hover {}
+
+
+/* wisteria theme */
+
+jmnodes.theme-wisteria jmnode {
+    background-color: #9b59b6;
+    color: #fff;
+}
+
+jmnodes.theme-wisteria jmnode:hover {
+    background-color: #8e44ad;
+}
+
+jmnodes.theme-wisteria jmnode.selected {
+    background-color: #11f;
+    color: #fff;
+}
+
+jmnodes.theme-wisteria jmnode.root {}
+
+jmnodes.theme-wisteria jmexpander {}
+
+jmnodes.theme-wisteria jmexpander:hover {}
+
+
+/* asphalt theme */
+
+jmnodes.theme-asphalt jmnode {
+    background-color: #34495e;
+    color: #fff;
+}
+
+jmnodes.theme-asphalt jmnode:hover {
+    background-color: #2c3e50;
+}
+
+jmnodes.theme-asphalt jmnode.selected {
+    background-color: #11f;
+    color: #fff;
+}
+
+jmnodes.theme-asphalt jmnode.root {}
+
+jmnodes.theme-asphalt jmexpander {}
+
+jmnodes.theme-asphalt jmexpander:hover {}
+
+
+/* orange theme */
+
+jmnodes.theme-orange jmnode {
+    background-color: #f1c40f;
+    color: #fff;
+}
+
+jmnodes.theme-orange jmnode:hover {
+    background-color: #f39c12;
+}
+
+jmnodes.theme-orange jmnode.selected {
+    background-color: #11f;
+    color: #fff;
+}
+
+jmnodes.theme-orange jmnode.root {}
+
+jmnodes.theme-orange jmexpander {}
+
+jmnodes.theme-orange jmexpander:hover {}
+
+
+/* pumpkin theme */
+
+jmnodes.theme-pumpkin jmnode {
+    background-color: #e67e22;
+    color: #fff;
+}
+
+jmnodes.theme-pumpkin jmnode:hover {
+    background-color: #d35400;
+}
+
+jmnodes.theme-pumpkin jmnode.selected {
+    background-color: #11f;
+    color: #fff;
+}
+
+jmnodes.theme-pumpkin jmnode.root {}
+
+jmnodes.theme-pumpkin jmexpander {}
+
+jmnodes.theme-pumpkin jmexpander:hover {}
+
+
+/* pomegranate theme */
+
+jmnodes.theme-pomegranate jmnode {
+    background-color: #e74c3c;
+    color: #fff;
+}
+
+jmnodes.theme-pomegranate jmnode:hover {
+    background-color: #c0392b;
+}
+
+jmnodes.theme-pomegranate jmnode.selected {
+    background-color: #11f;
+    color: #fff;
+}
+
+jmnodes.theme-pomegranate jmnode.root {}
+
+jmnodes.theme-pomegranate jmexpander {}
+
+jmnodes.theme-pomegranate jmexpander:hover {}
+
+
+/* clouds theme */
+
+jmnodes.theme-clouds jmnode {
+    background-color: #ecf0f1;
+    color: #333;
+}
+
+jmnodes.theme-clouds jmnode:hover {
+    background-color: #bdc3c7;
+}
+
+jmnodes.theme-clouds jmnode.selected {
+    background-color: #11f;
+    color: #fff;
+}
+
+jmnodes.theme-clouds jmnode.root {}
+
+jmnodes.theme-clouds jmexpander {}
+
+jmnodes.theme-clouds jmexpander:hover {}
+
+
+/* asbestos theme */
+
+jmnodes.theme-asbestos jmnode {
+    background-color: #95a5a6;
+    color: #fff;
+}
+
+jmnodes.theme-asbestos jmnode:hover {
+    background-color: #7f8c8d;
+}
+
+jmnodes.theme-asbestos jmnode.selected {
+    background-color: #11f;
+    color: #fff;
+}
+
+jmnodes.theme-asbestos jmnode.root {}
+
+jmnodes.theme-asbestos jmexpander {}
+
+jmnodes.theme-asbestos jmexpander:hover {}

TEMPAT SAMPAH
src/assets/images/project/Add.png


TEMPAT SAMPAH
src/assets/images/project/Delete.png


File diff ditekan karena terlalu besar
+ 1378 - 0
src/assets/js/chosen.jquery.min.js


+ 328 - 0
src/assets/js/handsontable-chosen-editor.js

@@ -0,0 +1,328 @@
+/// chosen plugin
+import Handsontable from "handsontable-pro"
+import 'handsontable-pro/dist/handsontable.full.css'
+import zhCN from 'handsontable-pro/languages/zh-CN';
+import $ from 'jquery'
+(function(Handsontable) {
+    "use strict";
+
+    var ChosenEditor = Handsontable.editors.TextEditor.prototype.extend();
+
+    ChosenEditor.prototype.prepare = function(row, col, prop, td, originalValue, cellProperties) {
+
+        Handsontable.editors.TextEditor.prototype.prepare.apply(this, arguments);
+
+        this.options = {};
+
+        if (this.cellProperties.chosenOptions) {
+            this.options = $.extend(this.options, cellProperties.chosenOptions);
+        }
+
+        cellProperties.chosenOptions = $.extend({}, cellProperties.chosenOptions);
+    };
+
+    ChosenEditor.prototype.createElements = function() {
+        this.$body = $(document.body);
+
+        this.TEXTAREA = document.createElement('select');
+        //this.TEXTAREA.setAttribute('type', 'text');
+        this.$textarea = $(this.TEXTAREA);
+
+        Handsontable.dom.addClass(this.TEXTAREA, 'handsontableInput');
+
+        this.textareaStyle = this.TEXTAREA.style;
+        this.textareaStyle.width = 0;
+        this.textareaStyle.height = 0;
+
+        this.TEXTAREA_PARENT = document.createElement('DIV');
+        Handsontable.dom.addClass(this.TEXTAREA_PARENT, 'handsontableInputHolder');
+
+        this.textareaParentStyle = this.TEXTAREA_PARENT.style;
+        this.textareaParentStyle.top = 0;
+        this.textareaParentStyle.left = 0;
+        this.textareaParentStyle.display = 'none';
+        this.textareaParentStyle.width = "200px";
+
+        this.TEXTAREA_PARENT.appendChild(this.TEXTAREA);
+
+        this.instance.rootElement.appendChild(this.TEXTAREA_PARENT);
+
+        var that = this;
+        this.instance._registerTimeout(setTimeout(function() {
+            that.refreshDimensions();
+        }, 0));
+    };
+
+    var onChosenChanged = function() {
+        var options = this.cellProperties.chosenOptions;
+
+        if (!options.multiple) {
+            this.close();
+            this.finishEditing();
+        }
+    };
+    var onChosenClosed = function() {
+        var options = this.cellProperties.chosenOptions;
+
+        if (!options.multiple) {
+            this.close();
+            this.finishEditing();
+        } else {}
+    };
+    var onBeforeKeyDown = function(event) {
+        var instance = this;
+        var that = instance.getActiveEditor();
+
+        var keyCodes = Handsontable.helper.KEY_CODES;
+        var ctrlDown = (event.ctrlKey || event.metaKey) && !event.altKey; //catch CTRL but not right ALT (which in some systems triggers ALT+CTRL)
+
+        //Process only events that have been fired in the editor
+        if (event.target.tagName !== "INPUT") {
+            return;
+        }
+        if (event.keyCode === 17 || event.keyCode === 224 || event.keyCode === 91 || event.keyCode === 93) {
+            //when CTRL or its equivalent is pressed and cell is edited, don't prepare selectable text in textarea
+            event.stopImmediatePropagation();
+            return;
+        }
+
+        var target = event.target;
+
+        switch (event.keyCode) {
+            case keyCodes.ARROW_RIGHT:
+                if (Handsontable.dom.getCaretPosition(target) !== target.value.length) {
+                    event.stopImmediatePropagation();
+                } else {
+                    that.$textarea.trigger("chosen:close");
+                }
+                break;
+
+            case keyCodes.ARROW_LEFT:
+                if (Handsontable.dom.getCaretPosition(target) !== 0) {
+                    event.stopImmediatePropagation();
+                } else {
+                    that.$textarea.trigger("chosen:close");
+                }
+                break;
+
+            case keyCodes.ENTER:
+                if (that.cellProperties.chosenOptions.multiple) {
+                    event.stopImmediatePropagation();
+                    event.preventDefault();
+                    event.stopPropagation();
+                }
+
+                break;
+
+            case keyCodes.A:
+            case keyCodes.X:
+            case keyCodes.C:
+            case keyCodes.V:
+                if (ctrlDown) {
+                    event.stopImmediatePropagation(); //CTRL+A, CTRL+C, CTRL+V, CTRL+X should only work locally when cell is edited (not in table context)
+                }
+                break;
+
+            case keyCodes.BACKSPACE:
+                var txt = $(that.TEXTAREA_PARENT).find("input").val();
+                $(that.TEXTAREA_PARENT).find("input").val(txt.substr(0, txt.length - 1)).trigger("keyup.chosen");
+
+                event.stopImmediatePropagation();
+                break;
+            case keyCodes.DELETE:
+            case keyCodes.HOME:
+            case keyCodes.END:
+                event.stopImmediatePropagation(); //backspace, delete, home, end should only work locally when cell is edited (not in table context)
+                break;
+        }
+
+    };
+
+    ChosenEditor.prototype.open = function(keyboardEvent) {
+        this.refreshDimensions();
+        this.textareaParentStyle.display = 'block';
+        this.instance.addHook('beforeKeyDown', onBeforeKeyDown);
+
+        this.$textarea.css({
+            height: $(this.TD).height() + 4,
+            'min-width': $(this.TD).outerWidth() - 4
+        });
+
+        //display the list
+        this.$textarea.hide();
+
+        //make sure that list positions matches cell position
+        //this.$textarea.offset($(this.TD).offset());
+
+        var options = $.extend({}, this.options, {
+            width: "100%",
+            search_contains: true
+        });
+
+        if (options.multiple) {
+            this.$textarea.attr("multiple", true);
+        } else {
+            this.$textarea.attr("multiple", false);
+        }
+
+        this.$textarea.empty();
+        this.$textarea.append("<option value=''></option>");
+        var el = null;
+        var originalValue = (this.originalValue + "").split(",");
+        if (options.data && options.data.length) {
+            for (var i = 0; i < options.data.length; i++) {
+                // el = $("<option />");
+                // el.attr("value", options.data[i].Code);
+                // el.html(options.data[i].Name);
+
+                // if (originalValue.indexOf(options.data[i].Code + "") > -1) {
+                //     el.attr("selected", true);
+                // }
+
+                // this.$textarea.append(el);
+                if (options.data[i].content && options.data[i].content.length) {
+                    for (var k = 0; k < options.data[i].content.length; k++) {
+                        if (options.data[i].content[k] && options.data[i].content[k].length) {
+                            for (var j = 0; j < options.data[i].content[k].length; j++) {
+                                el = $("<option />");
+                                el.attr("value", options.data[i].content[k].content[j].Code);
+                                el.html(options.data[i].content[k].content[j].Name);
+
+                                if (originalValue.indexOf(options.data[i].content[k].content[j].Code + "") > -1) {
+                                    el.attr("selected", true);
+                                }
+                                this.$textarea.append(el);
+                            }
+                        } else {
+                            el = $("<option />");
+                            el.attr("value", options.data[i].content[k].Code);
+                            el.html(options.data[i].content[k].Name);
+
+                            if (originalValue.indexOf(options.data[i].content[k].Code + "") > -1) {
+                                el.attr("selected", true);
+                            }
+                            this.$textarea.append(el);
+                        }
+                    }
+                } else {
+                    el = $("<option />");
+                    el.attr("value", options.data[i].Code);
+                    el.html(options.data[i].Name);
+
+                    if (originalValue.indexOf(options.data[i].Code + "") > -1) {
+                        el.attr("selected", true);
+                    }
+                    this.$textarea.append(el);
+                }
+            }
+        }
+
+        if ($(this.TEXTAREA_PARENT).find(".chosen-container").length) {
+            this.$textarea.chosen("destroy");
+        }
+
+        this.$textarea.chosen(options);
+
+        var self = this;
+        setTimeout(function() {
+
+            self.$textarea.on('change', onChosenChanged.bind(self));
+            self.$textarea.on('chosen:hiding_dropdown', onChosenClosed.bind(self));
+
+            self.$textarea.trigger("chosen:open");
+
+            $(self.TEXTAREA_PARENT).find("input").on("keydown", function(e) {
+                if (e.keyCode === Handsontable.helper.KEY_CODES.ENTER /*|| e.keyCode === Handsontable.helper.KEY_CODES.BACKSPACE*/ ) {
+                    if ($(this).val()) {
+                        e.preventDefault();
+                        e.stopPropagation();
+                    } else {
+                        e.preventDefault();
+                        e.stopPropagation();
+
+                        self.close();
+                        self.finishEditing();
+                    }
+
+                }
+
+                if (e.keyCode === Handsontable.helper.KEY_CODES.BACKSPACE) {
+                    var txt = $(self.TEXTAREA_PARENT).find("input").val();
+
+                    $(self.TEXTAREA_PARENT).find("input").val(txt.substr(0, txt.length - 1)).trigger("keyup.chosen");
+
+                    e.preventDefault();
+                    e.stopPropagation();
+                }
+
+                if (e.keyCode === Handsontable.helper.KEY_CODES.ARROW_DOWN || e.keyCode === Handsontable.helper.KEY_CODES.ARROW_UP) {
+                    e.preventDefault();
+                    e.stopPropagation();
+                }
+
+            });
+
+            setTimeout(function() {
+                self.$textarea.trigger("chosen:activate").focus();
+
+                if (keyboardEvent && keyboardEvent.keyCode && keyboardEvent.keyCode != 113) {
+                    var key = keyboardEvent.keyCode;
+                    var keyText = (String.fromCharCode((96 <= key && key <= 105) ? key - 48 : key)).toLowerCase();
+
+                    $(self.TEXTAREA_PARENT).find("input").val(keyText).trigger("keyup.chosen");
+                    self.$textarea.trigger("chosen:activate");
+                }
+            }, 1);
+        }, 1);
+
+    };
+
+    ChosenEditor.prototype.init = function() {
+        Handsontable.editors.TextEditor.prototype.init.apply(this, arguments);
+    };
+
+    ChosenEditor.prototype.close = function() {
+        this.instance.listen();
+        this.instance.removeHook('beforeKeyDown', onBeforeKeyDown);
+        this.$textarea.off();
+        this.$textarea.hide();
+        Handsontable.editors.TextEditor.prototype.close.apply(this, arguments);
+    };
+
+    ChosenEditor.prototype.getValue = function() {
+        if (!this.$textarea.val()) {
+            return "";
+        }
+        if (typeof this.$textarea.val() === "object") {
+            return this.$textarea.val().join(",");
+        }
+        return this.$textarea.val();
+    };
+
+
+    ChosenEditor.prototype.focus = function() {
+        this.instance.listen();
+
+        // DO NOT CALL THE BASE TEXTEDITOR FOCUS METHOD HERE, IT CAN MAKE THIS EDITOR BEHAVE POORLY AND HAS NO PURPOSE WITHIN THE CONTEXT OF THIS EDITOR
+        //Handsontable.editors.TextEditor.prototype.focus.apply(this, arguments);
+    };
+
+    ChosenEditor.prototype.beginEditing = function(initialValue) {
+        var onBeginEditing = this.instance.getSettings().onBeginEditing;
+        if (onBeginEditing && onBeginEditing() === false) {
+            return;
+        }
+
+        Handsontable.editors.TextEditor.prototype.beginEditing.apply(this, arguments);
+
+    };
+
+    ChosenEditor.prototype.finishEditing = function(isCancelled, ctrlDown) {
+        this.instance.listen();
+        return Handsontable.editors.TextEditor.prototype.finishEditing.apply(this, arguments);
+    };
+
+    Handsontable.editors.ChosenEditor = ChosenEditor;
+    Handsontable.editors.registerEditor('chosen', ChosenEditor);
+
+})(Handsontable);

File diff ditekan karena terlalu besar
+ 2933 - 0
src/assets/js/jsmind.js


+ 9 - 6
src/components/frame/pageRight.vue

@@ -55,8 +55,8 @@
 <script>
 import { mapState } from "vuex";
 import { sessionStore } from "@/store/sessionStore";
-import { logicConfig } from '@/logicConfig'
-import uploadFile from '@/components/uploadFile'
+import { logicConfig } from "@/logicConfig";
+import uploadFile from "@/components/uploadFile";
 export default {
   props: [],
   data() {
@@ -66,6 +66,7 @@ export default {
     ...mapState(["breadcrumbs", "projects", "user"]),
     selectProject: {
       set(value) {
+        this.$store.commit("layout/setprojectId", value.id);
         this.$store.commit("updateSelectProject", value);
       },
       get() {
@@ -78,14 +79,16 @@ export default {
     loginOut: function () {
       this.$store.commit("loginOut");
       sessionStore.loginOut();
-      this.$router.replace({ path:  logicConfig.routerNameConfig.loginRouteName });
+      this.$router.replace({
+        path: logicConfig.routerNameConfig.loginRouteName,
+      });
     },
   },
   created() {},
   watch: {},
   mounted() {},
   components: {
-    uploadFile
+    uploadFile,
   },
 };
 </script>
@@ -109,7 +112,7 @@ export default {
   overflow: hidden;
 }
 
-.contentContainer >div:first-child{
+.contentContainer > div:first-child {
   height: 100%;
   overflow: hidden;
 }
@@ -159,4 +162,4 @@ export default {
 .userPropLine {
   border-bottom: solid 1px #c0c4cc;
 }
-</style>
+</style>

+ 269 - 0
src/components/old-adm/common/handsontable.vue

@@ -0,0 +1,269 @@
+<!--
+    id: 选填,没有得话给随机id
+    settting: handsontable得配置,其中必填data选项
+-->
+
+<template>
+  <div style="height: 100%; width: 100%">
+    <div :id="id" style="overflow: auto"></div>
+  </div>
+</template>
+<script>
+import Handsontable from "handsontable-pro";
+import "handsontable-pro/dist/handsontable.full.css";
+import zhCN from "handsontable-pro/languages/zh-CN";
+import tools from "@/utils/old-adm/scan/tools";
+import "@/assets/js/chosen.jquery.min";
+import "@/assets/js/handsontable-chosen-editor";
+import "@/assets/css/chosen.css";
+export default {
+  props: {
+    id: {
+      type: String,
+      default: function createRandomId() {
+        return (
+          (Math.random() * 10000000).toString(16).substr(0, 4) +
+          "-" +
+          new Date().getTime() +
+          "-" +
+          Math.random().toString().substr(2, 5)
+        );
+      },
+    },
+    // settings: {//必填
+    //   type: Object
+    // }
+  },
+  data() {
+    return {
+      hot: null,
+      filtersArr: [],
+      data: [],
+      deepArr: [], //删除存储数组
+    };
+  },
+  created() {},
+  mounted() {
+    // console.log(handsontable)
+    // this.init()
+  },
+  methods: {
+    getElement() {
+      return {
+        width: document.getElementById(this.id).clientWidth,
+        height: document.getElementById(this.id).parentNode.clientHeight,
+      };
+    },
+    // afterDocumentKeyDown(e) {
+    //     this.$emit("keyDown", e)
+    // },
+    trimmedRows() {
+      var plugin = this.hot.getPlugin("trimRows").trimmedRows;
+      let dataLength = this.hot.getSourceData().length;
+      let dataArr = new Array();
+      for (let i = 0; i < dataLength; i++) {
+        dataArr.push(i);
+      }
+      if (plugin.length <= 0) {
+        dataArr = undefined;
+      } else {
+        dataArr = this.array_diff(dataArr, plugin);
+      }
+      this.filtersArr = dataArr;
+      return dataArr || [];
+    },
+    //去除数组中相同的元素
+    array_diff(a, b) {
+      for (var i = 0; i < b.length; i++) {
+        for (var j = 0; j < a.length; j++) {
+          if (a[j] == b[i]) {
+            a.splice(j, 1);
+            j = j - 1;
+          }
+        }
+      }
+      return a;
+    },
+    //右键删除
+    removeFm(index, amout) {
+      let delData = tools.differenceArr(this.data, this.deepArr);
+      this.$emit("delete", delData);
+    },
+    //数据发生修改后(失焦)
+    tdChange(changeData, source) {
+      this.$emit("change", changeData, source);
+    },
+    /**
+     * 获取被排序后的数组
+     *
+     * @param changeData 发生改变的数据
+     * @param source     数组
+     *
+     * @return array     经过排序后或者经过搜索后的数组
+     */
+    getParam(changeData, source, hot, trimmedArr) {
+      let param = "";
+      //被筛选过后的数组
+      // let trimmedArr = this.trimmedRows();
+      //是否启用了排序
+      let isSort = hot.getPlugin("columnSorting").isSorted();
+      if (trimmedArr.length && isSort) {
+        //排序后的数组
+        let sortArr = hot.getPlugin("columnSorting").rowsMapper.__arrayMap;
+        param = changeData.map((item) => {
+          return hot.getSourceDataAtRow(trimmedArr[sortArr[item[0]]]);
+        });
+      } else if (isSort) {
+        //排序后的数组
+        let sortArr = hot.getPlugin("columnSorting").rowsMapper.__arrayMap;
+        param = changeData.map((item) => {
+          return hot.getSourceDataAtRow(sortArr[item[0]]);
+        });
+      } else if (trimmedArr.length) {
+        param = changeData.map((item) => {
+          return hot.getSourceDataAtRow(trimmedArr[item[0]]);
+        });
+      } else {
+        param = changeData.map((item) => {
+          return hot.getSourceDataAtRow(item[0]);
+        });
+      }
+      return param;
+    },
+    /**
+     *
+     * @param {handsontable修改参数} changeData
+     * @param {*} source
+     * @param {handsontabele实例} hot
+     * @param {排序数组} trimmedArr
+     *
+     * @return 修改数值的前一个对象
+     */
+    getUnshiftParam(changeData, source, hot, trimmedArr) {
+      //是否启用了排序
+      let isSort = hot.getPlugin("columnSorting").isSorted();
+      if (trimmedArr.length && isSort) {
+        //排序后的数组
+        let sortArr = hot.getPlugin("columnSorting").rowsMapper.__arrayMap;
+        return hot.getSourceDataAtRow(
+          trimmedArr[sortArr[changeData[0][0] - 1]]
+        );
+      } else if (isSort) {
+        //排序后的数组
+        let sortArr = hot.getPlugin("columnSorting").rowsMapper.__arrayMap;
+        return hot.getSourceDataAtRow(sortArr[changeData[0][0] - 1]);
+      } else if (trimmedArr.length) {
+        //进行了筛选
+        return hot.getSourceDataAtRow(trimmedArr[changeData[0][0] - 1]);
+      } else {
+        //没有进行排序和筛选
+        return hot.getSourceDataAtRow(changeData[0][0] - 1);
+      }
+    },
+    init(settings) {
+      var hotElement = document.getElementById(this.id);
+      this.data = settings.data;
+      this.deepArr = this.deepCopy(settings.data);
+      var hotSettings = Object.assign(
+        {
+          // width: this.getElement().width,
+          rowHeaders: true,
+          colHeaders: true,
+          filters: true,
+          height: this.getElement().height,
+          columnSorting: true, //添加排序
+          sortIndicator: true, //添加排序
+          renderAllRows: true,
+          autoColumnSize: true,
+          // observeChanges: false, //启用observeChanges插件
+          language: "zh-CN",
+          manualColumnResize: true,
+          manualColumnMove: true,
+          dropdownMenu: [
+            "filter_by_condition",
+            "filter_by_value",
+            "filter_action_bar",
+          ],
+          afterOnCellMouseDown: this.tableDown, //鼠标单击
+          afterChange: this.tdChange, //修改后
+          afterRemoveRow: this.removeFm, //右键删除
+          afterFilter: this.trimmedRows, //排序
+          // afterDocumentKeyDown: this.afterDocumentKeyDown, //鼠标单击
+        },
+        settings
+      );
+      hotSettings.maxRows = settings.maxRows;
+      if (!!this.hot && this.hot.hasOwnProperty("destroy")) {
+        this.hot.destroy();
+        this.hot = null;
+      }
+      this.hot = new Handsontable(hotElement, hotSettings);
+      // this.hot.view.wt.update('onCellDblClick', (row,cell) => {
+      //     //Get editor and begin edit mode on current cell (maintain current double click functionality)
+      //     var activeEditor = this.hot.getActiveEditor();
+      //     console.log(this.hot,activeEditor)
+      //     activeEditor.beginEditing();
+      //     this.onDblClick(activeEditor,row,cell)
+      //     //Do whatever you want...
+      // });
+      let pro = document.getElementById("hot-display-license-info");
+      if (!!pro) {
+        pro.parentNode.removeChild(pro);
+      }
+      return this.hot;
+    },
+    //双击
+    // onDblClick(activeEditor,row,cell){
+    //     console.log(111,activeEditor,row,cell)
+    // },
+    tableDown(el, rowArr) {
+      if (rowArr.row < 0) {
+        return false;
+      }
+      let filter = this.filtersArr;
+      //被筛选过后的数组
+      let trimmedArr = this.trimmedRows();
+      //是否启用了排序
+      let isSort = this.hot.getPlugin("columnSorting").isSorted();
+      let myHotMainArr = this.hot.getSourceData();
+      // debugger
+      if (trimmedArr.length && isSort) {
+        let sortArr = this.hot.getPlugin("columnSorting").rowsMapper.__arrayMap;
+        let infos = myHotMainArr[trimmedArr[sortArr[rowArr.row]]];
+        this.getInfors(infos, rowArr);
+      } else if (isSort) {
+        //排序后的数组
+        let sortArr = this.hot.getPlugin("columnSorting").rowsMapper.__arrayMap;
+        let infos = myHotMainArr[sortArr[rowArr.row]];
+        this.getInfors(infos, rowArr);
+      } else if (trimmedArr.length) {
+        let infos = myHotMainArr[trimmedArr[rowArr.row]];
+        this.getInfors(infos, rowArr);
+      } else {
+        let infos = myHotMainArr[rowArr.row];
+        this.getInfors(infos, rowArr);
+      }
+    },
+    getInfors(obj, row) {
+      this.$emit("mouseDown", obj, row);
+    },
+    //工具函数浅复制深拷贝,防止共用存储空间
+    deepCopy(obj) {
+      var out = [],
+        i = 0,
+        len = obj.length;
+      for (; i < len; i++) {
+        if (obj[i] instanceof Array) {
+          out[i] = this.deepcopy(obj[i]);
+        } else out[i] = obj[i];
+      }
+      return out;
+    },
+  },
+};
+</script>
+<style lang="less">
+.htDropdownMenu:not(.htGhostTable) {
+  z-index: 4060;
+}
+</style>

File diff ditekan karena terlalu besar
+ 726 - 643
src/components/old-adm/ledger/facility/addfacility.vue


+ 46 - 30
src/components/project-manage/components/anchor.vue

@@ -1,37 +1,53 @@
 <template>
-    <div>
-        <div v-for="item in points" :key="item.value" @click="go(item.value)">{{item.label}}</div>
+  <div class="anchor-container">
+    <div
+      class="anchor-item"
+      v-for="item in points"
+      :key="item.value"
+      @click="go(item.value)"
+    >
+      {{ item.label }}
     </div>
+  </div>
 </template>
 <script>
 export default {
-    data() {
-        return {
-            points: [
-                {
-                    label: '基本信息',
-                    value: 'basic'
-                },
-                {
-                    label: '地理信息',
-                    value: 'geo'
-                },
-                {
-                    label: '项目信息',
-                    value: 'project'
-                },
-                {
-                    label: '商业信息',
-                    value: 'business'
-                }
-            ]
-        }
+  data() {
+    return {
+      points: [
+        {
+          label: "基本信息",
+          value: "basic",
+        },
+        {
+          label: "地理信息",
+          value: "geo",
+        },
+        {
+          label: "项目信息",
+          value: "project",
+        },
+        {
+          label: "商业信息",
+          value: "business",
+        },
+      ],
+    };
+  },
+  methods: {
+    go(value) {
+      this.$emit("goAnchor", value);
     },
-    methods: {
-        go(value) {
-            this.$emit('goAnchor', value)
-        }
-    }
-}
+  },
+};
 </script>
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+.anchor-item {
+  margin: 16px 0 0 16px;
+  color: #8d9399;
+  cursor: pointer;
+  &:active {
+    color: #0091ff;
+  }
+}
+</style>

+ 50 - 0
src/components/project-manage/components/business.vue

@@ -1,14 +1,64 @@
 <template>
   <div class="business-container">
     <Title name="商业信息" />
+    <el-row>
+      <el-col :span="12">
+        <FormItem
+          label="资产管理方"
+          :initValue="formData.manage"
+          formType="input"
+      /></el-col>
+      <el-col :span="12">
+        <FormItem label="业主" :initValue="formData.owner" formType="input"
+      /></el-col>
+    </el-row>
+
+    <FormItem
+      label="物业公司"
+      :initValue="formData.property"
+      formType="input"
+    />
+    <el-row>
+      <el-col :span="12">
+        <FormItem
+          label="设计方"
+          :initValue="formData.design"
+          formType="input-handle"
+      /></el-col>
+      <el-col :span="12">
+        <FormItem
+          label="施工方"
+          :initValue="formData.build"
+          formType="input-handle"
+      /></el-col>
+    </el-row>
+    <FormItem
+      label="开业时间"
+      :initValue="formData.openDate"
+      formType="input"
+    />
   </div>
 </template>
 
 <script>
 import Title from "./title.vue";
+import FormItem from "./formItem.vue";
 export default {
   components: {
     Title,
+    FormItem,
+  },
+  data() {
+    return {
+      formData: {
+        manage: "",
+        owner: "",
+        property: "",
+        design: [{ value: "" }, { value: "" }],
+        build: [{ value: "" }],
+        openDate: "",
+      },
+    };
   },
 };
 </script>

+ 51 - 1
src/components/project-manage/components/formItem.vue

@@ -50,6 +50,7 @@
         :multiple="true"
       />
     </section>
+    <!-- 输入域 -->
     <Input
       v-if="formType === 'textarea'"
       v-model="value"
@@ -57,7 +58,27 @@
       :rows="6"
       :autofocus="false"
       :max-length="10"
+      :placeholder="placeholder"
     />
+    <!-- 增减输入框 -->
+
+    <div v-if="formType === 'input-handle'" class="inputs">
+      <div v-for="(item, index) in value" :key="index" class="input-item">
+        <Input v-model="item.value" :placeholder="placeholder"></Input>
+        <img
+          class="img"
+          src="@/assets/images/project/Add.png"
+          @click="inputHandle('plus')"
+          v-if="value.length === 1 || index > 0"
+        />
+        <img
+          class="img"
+          src="@/assets/images/project/Delete.png"
+          @click="inputHandle('reduce', index)"
+          v-if="value.length > 1"
+        />
+      </div>
+    </div>
   </div>
 </template>
 <script>
@@ -69,7 +90,10 @@ export default {
       default: "input",
     },
     initValue: [String, Number, Array, Object],
-    placeholder: "请输入",
+    placeholder: {
+      type: String,
+      default: "请输入",
+    },
     labelWidth: {
       type: Number,
       default: 100,
@@ -92,6 +116,16 @@ export default {
       value: this.initValue,
     };
   },
+  methods: {
+    inputHandle(type, index) {
+      if (type === "plus") {
+        this.value.push({ value: "" });
+      } else {
+        if (this.value.length === 1) return;
+        this.value.splice(index, 1);
+      }
+    },
+  },
   watch: {
     initValue(val, old) {
       if (val !== old) {
@@ -123,5 +157,21 @@ export default {
       }
     }
   }
+  .inputs {
+    display: flex;
+    flex-direction: column;
+    .input-item {
+      display: flex;
+      align-items: center;
+      .img {
+        &:nth-child(2) {
+          margin: 0 10px;
+        }
+      }
+      &:not(:nth-child(1)) {
+        margin-top: 8px;
+      }
+    }
+  }
 }
 </style>

+ 5 - 2
src/components/project-manage/components/geo.vue

@@ -124,7 +124,7 @@ export default {
         title: name,
       });
       marker.setLabel({
-        offset: new AMap.Pixel(0, 0), //设置文本标注偏移量
+        offset: new AMap.Pixel(8, 0), //设置文本标注偏移量
         content: `<div class='info'>${name}</div>`, //设置文本标注内容
         direction: "right", //设置文本标注方位
       });
@@ -164,6 +164,9 @@ export default {
   }
 }
 /deep/ .amap-marker-label {
-  background-color: red;
+  // background-color: red;
+  background: #ffffff;
+  border-radius: 4px;
+  padding: 8px 4px 8px 8px;
 }
 </style>

+ 29 - 3
src/components/project-manage/index.vue

@@ -1,13 +1,16 @@
 <template>
   <div class="container">
     <div class="left">
-      <Anchor />
+      <Anchor @goAnchor="goAnchor" />
     </div>
     <div class="right">
       <Basic name="基本信息" />
       <Geo />
       <Project />
       <Business />
+      <div class="bottom">
+        <Button type="primary">保存</Button>
+      </div>
     </div>
   </div>
 </template>
@@ -26,7 +29,16 @@ export default {
     Business,
   },
   mounted() {},
-  methods: {},
+  methods: {
+    goAnchor(anchor) {
+      let name = anchor + "-container";
+      let dom = document.querySelector(`.${name}`);
+      let right = document.querySelector(".right");
+      if (dom) {
+        right.scrollTop = dom.offsetTop - 120;
+      }
+    },
+  },
 };
 </script>
 <style lang="less" scoped>
@@ -38,9 +50,23 @@ export default {
   }
   .right {
     width: 100%;
-    padding: 20px;
+
     background-color: #ffffff;
     overflow-y: auto;
+    .basic-container,
+    .geo-container,
+    .project-container,
+    .business-container {
+      padding: 20px;
+    }
+    .bottom {
+      width: 100%;
+      height: 72px;
+      box-shadow: 0px 2px 10px rgba(31, 36, 41, 0.2);
+      // display: flex;
+      // align-items: center;
+      padding: 20px;
+    }
   }
 }
 </style>

+ 144 - 20
src/components/systemGraph/edit.vue

@@ -225,13 +225,21 @@
         </div>
         <div v-if="selGraphPartType == 3">
           <div class="title titleMargin">文字</div>
-          <div class="titleText eqName">1#进线柜</div>
+          <div class="titleText eqName" v-text="selText.text">1#进线柜</div>
           <div class="detailSplitLine"></div>
           <div class="title titleMargin">
             <span>x</span>
-            <span class="coridTitleText titleText">100</span>
+            <span
+              class="coridTitleText titleText"
+              v-text="(selText.absolutePosition || {}).x"
+              >100</span
+            >
             <span class="coridTitle2">y</span>
-            <span class="coridTitleText titleText">100</span>
+            <span
+              class="coridTitleText titleText"
+              v-text="(selText.absolutePosition || {}).y"
+              >100</span
+            >
           </div>
           <div class="detailSplitLine"></div>
           <div class="title titleMargin">字体样式</div>
@@ -257,14 +265,22 @@
           </div>
           <div class="title titleMargin">字体颜色</div>
           <div class="titleMargin fontColor">
-            <input type="color" v-model="fontColor" />
+            <input
+              type="color"
+              v-model="fontColor"
+              @change="selFontColorChange"
+            />
             <div v-text="fontColor"></div>
             <div>100%</div>
           </div>
           <div class="title titleMargin">背景颜色</div>
           <div class="titleMargin fontColor">
-            <input type="color" v-model="backColor" />
-            <div v-text="backColor"></div>
+            <input
+              type="color"
+              v-model="fontBackColor"
+              @change="selFontBackColorChange"
+            />
+            <div v-text="fontBackColor"></div>
             <div>100%</div>
           </div>
         </div>
@@ -278,7 +294,11 @@
         <div class="delBtn" v-if="selGraphPartType == 2 && operState == 1">
           删除管线
         </div>
-        <div class="delBtn" v-if="selGraphPartType == 3 && operState == 1">
+        <div
+          class="delBtn"
+          v-if="selGraphPartType == 3 && operState == 1"
+          @click="delText"
+        >
           删除文字
         </div>
       </div>
@@ -388,8 +408,8 @@ export default {
       selFontSize: {},
       //字体颜色
       fontColor: "#eb5757",
-      //背景颜色
-      backColor: "#ffffff",
+      //字体背景颜色
+      fontBackColor: "#ffffff",
       //系统图原始数据
       graphOriginInfo: {},
       //系统图数据
@@ -421,6 +441,23 @@ export default {
           }
        */
       selEquip: {},
+      /*选择的文本,格式如下:
+      {
+          id:'',
+          text:'',
+          style:{
+            color: '',
+            fontSize: '',
+            backGround:'',
+            fontWeight:1
+          },
+          //文本的绝对位置
+          absolutePosition: {
+            x: 1,
+            y: 1,
+          },
+        }*/
+      selText: {},
       //是否展示左侧系统图基础信息
       isVisibleLeft: true,
     };
@@ -447,7 +484,40 @@ export default {
       console.log(this.selLineEndPoint);
     },
     //字号选择事件
-    selFontSizeChange: function () {},
+    selFontSizeChange: function () {
+      //更新graphInfo中的数据
+      this.updateGraphInfo(3, 2, { id: this.selText.id });
+      //更新图形以及图形数据源
+      this.$refs.graphc.updateDataAndGraph(3, 2, {
+        id: this.selText.id,
+        fontSize: this.selFontSize.id,
+      });
+    },
+    //字体颜色改变事件
+    selFontColorChange: function () {
+      //更新graphInfo中的数据
+      this.updateGraphInfo(3, 3, { id: this.selText.id });
+      //更新图形以及图形数据源
+      this.$refs.graphc.updateDataAndGraph(3, 3, {
+        id: this.selText.id,
+        fontColor: this.fontColor,
+      });
+    },
+    //字体backColor颜色改变事件
+    selFontBackColorChange: function () {
+      //更新graphInfo中的数据
+      this.updateGraphInfo(3, 4, { id: this.selText.id });
+      //更新图形以及图形数据源
+      this.$refs.graphc.updateDataAndGraph(3, 4, {
+        id: this.selText.id,
+        fontColor: this.fontBackColor,
+      });
+    },
+    //删除选择的文本节点
+    delText: function () {
+      this.$refs.graphc.updateDataAndGraph(3, 5, { id: this.selText.id });
+      this.updateGraphInfo(3, 5, { id: this.selText.id });
+    },
     //根据系统图ID获取系统图数据
     getDiagramById: async function () {
       this.fullscreenLoading = true;
@@ -475,9 +545,30 @@ export default {
      * type 1 设备;  2 线;  3 文本
      */
     graphClickCall: function (dataObj, type) {
+      var _this = this;
       var oldPartType = this.selGraphPartType;
       this.selGraphPartType = type;
-      this.selEquip = dataObj || {};
+      switch (type) {
+        //设备
+        case 1:
+          this.selEquip = dataObj || {};
+          break;
+        //线
+        case 2:
+          // this.selEquip = dataObj || {};
+          break;
+        //文本
+        case 3:
+          this.selText = dataObj || {};
+          this.selFontSize =
+            _this.fontSizeArr.filter((_c) => {
+              return _c.id == _this.selText.style.fontSize;
+            })[0] || {};
+          this.fontColor = this.selText.style.color;
+          this.fontBackColor = this.selText.style.backGround;
+          break;
+      }
+
       var _this = this;
       //oldPartType为-1的时候,说明右侧面板之前是关闭的,那么展示后会导致图形区域变小,所以需要重绘图形
       if (oldPartType == -1) {
@@ -595,8 +686,8 @@ export default {
     },
     //删除选择的设备节点
     delEquip: function () {
-      this.$refs.graphc.removeChildFromStage(this.selEquip.id, 1);
-      this.removeFromData(this.selEquip.id);
+      this.$refs.graphc.updateDataAndGraph(1, 1, { id: this.selEquip.id });
+      this.updateGraphInfo(1, 1, { id: this.selEquip.id });
     },
     //graphInfo中移出对应的数据
     removeFromData: function (id) {
@@ -604,9 +695,6 @@ export default {
         this.graphInfo.template.frame.children
       );
 
-      var findArr = find(this.graphInfo.template.frame.children);
-      console.log(findArr);
-
       function remove(dataArr) {
         for (let i = 0; i < dataArr.length; i++) {
           let _dataObj = dataArr[i];
@@ -624,17 +712,53 @@ export default {
         }
         return null;
       }
+    },
 
-      function find(dataArr) {
+    /**
+     * 更新graphInfo中的数据
+     * dataType 1 设备;  2 线;  3 文本
+     * operType 1 移除设备节点;  2 更新文本字体大小;  3 更新文本颜色;  4 更新文本背景色;  5 移除文本节点
+     * exprObj 扩展数据,支持:{id:'数据id'}
+     */
+    updateGraphInfo: function (dataType, operType, exprObj) {
+      var _this = this;
+      _each(this.graphInfo.template.frame.children);
+
+      function _each(dataArr) {
         for (let i = 0; i < dataArr.length; i++) {
           let _dataObj = dataArr[i];
-          if (_dataObj.id == id) {
+
+          var _id =
+            dataType == 1
+              ? _dataObj.id
+              : dataType == 3
+              ? (_dataObj.label || {}).id
+              : "";
+          if (_id == exprObj.id) {
+            switch (operType) {
+              case 1:
+                dataArr.splice(i, 1);
+                break;
+              case 2:
+                _dataObj.label.style.fontSize = _this.selFontSize.id;
+                break;
+              case 3:
+                _dataObj.label.style.color = _this.fontColor;
+                break;
+              case 4:
+                _dataObj.label.style.backGround = _this.fontBackColor;
+                break;
+              case 5:
+                _dataObj.label.content = "";
+                break;
+            }
+
             return dataArr;
           }
           if (_dataObj.compType == "container") {
-            var result = find(_dataObj.children);
+            var result = _each(_dataObj.children);
             if (result) {
-              // _dataObj.children = result;
+              _dataObj.children = result;
               return dataArr;
             }
           }

+ 80 - 22
src/components/systemGraph/graph.vue

@@ -167,6 +167,7 @@ export default {
         var newHeight =
           _dataObj.legendObj.size.height * _this.canvasProObj.originalScale;
         graphicsRect.drawRect(newCordObj.x, newCordObj.y, newWidth, newHeight);
+        //设置点击范围,不然click事件不会触发
         graphicsRect.hitArea = graphicsRect.getBounds();
 
         graphicsRect.name = _dataObj.id;
@@ -206,6 +207,33 @@ export default {
         pixiApp.stage.addChild(legendSprite);
       });
 
+      //文本
+      _this.labelArr.forEach((_labelObj) => {
+        var pixiTextStyle = new PIXI.TextStyle({
+          fill: _labelObj.style.color,
+          fontSize: _labelObj.style.fontSize,
+          fontWeight: _labelObj.style.fontWeight,
+          // stroke: "#ffffff",
+          // strokeThickness: _this.defaultStyle.text.fontStrokeWidth,
+        });
+        var textInstance = new PIXI.Text(_labelObj.text, pixiTextStyle);
+        textInstance.name = _labelObj.id;
+
+        let newCordObj = _this.convertCoordToLeftOrigina({
+          x: _labelObj.absolutePosition.x,
+          y: _labelObj.absolutePosition.y,
+        });
+
+        textInstance.position.set(newCordObj.x, newCordObj.y);
+        // console.log(textInstance.width, "-", textInstance.height);
+        //启用事件
+        textInstance.interactive = true;
+        textInstance.on("click", (event) => {
+          _this.clickEventCall(event, 3);
+        });
+        pixiApp.stage.addChild(textInstance);
+      });
+
       return;
       //画线
       _this.dataSource.view.diagram.lines.forEach((_cLine) => {
@@ -256,6 +284,11 @@ export default {
        */
       function parseNode(dataArr, absolutePosition) {
         dataArr.forEach((_dataObj) => {
+          var newAbsolutePosition = {
+            x: _dataObj.location.x + absolutePosition.x,
+            y: _dataObj.location.y + absolutePosition.y,
+          };
+
           //文本
           if (_dataObj.label && _dataObj.label.content) {
             let _labelObj = _dataObj.label;
@@ -275,10 +308,11 @@ export default {
               _style.fontWeight ||
               window.__systemConf.systemGraph.peiDian.text.weight;
 
-            let textNewAbsolutePosition = {
-              x: _dataObj.location.x + absolutePosition.x,
-              y: _dataObj.location.y + absolutePosition.y,
+            var textNewAbsolutePosition = {
+              x: _labelObj.location.x + newAbsolutePosition.x,
+              y: _labelObj.location.y + newAbsolutePosition.y,
             };
+
             labelArr.push({
               id: _labelObj.id,
               text: _labelObj.content,
@@ -289,17 +323,12 @@ export default {
                 fontWeight: _style.fontWeight,
               },
               //文本的绝对位置
-              absolutePosition: {
-                x: 1,
-                y: 1,
-              },
+              absolutePosition: textNewAbsolutePosition,
             });
-          }
 
-          var newAbsolutePosition = {
-            x: _dataObj.location.x + absolutePosition.x,
-            y: _dataObj.location.y + absolutePosition.y,
-          };
+            _labelObj.style = _style;
+            _dataObj.label = _labelObj;
+          }
           switch (_dataObj.compType) {
             //容器
             case "container":
@@ -459,7 +488,6 @@ export default {
     clickEventCall: function (event, type) {
       var graphInstance = event.target || event.currentTarget;
       var dataId = graphInstance.name;
-      console.log("id:", dataId);
       var dataArr =
         type == 1
           ? this.nodeArr
@@ -502,25 +530,55 @@ export default {
      * id 数据ID,即元素的name
      * type 1 设备;  2 线;  3 文本
      */
-    removeChildFromStage: function (id, type) {
+    /**
+     * 更新graphInfo中的数据
+     * dataType 1 设备;  2 线;  3 文本
+     * operType 1 移除设备节点;  2 更新文本字体大小;  3 更新文本颜色;  4 更新文本背景色;  5 移除文本节点
+     * exprObj 扩展数据,支持:{id:'数据id',fontSize:'字体大小',fontColor:'文本颜色',fontBackColor:'文本背景色'}
+     */
+    updateDataAndGraph: function (dataType, operType, exprObj) {
+      // fill: _labelObj.style.color,
+      //     fontSize: _labelObj.style.fontSize,
+      //     fontWeight: _labelObj.style.fontWeight,
       var dataArr =
-        type == 1
+        dataType == 1
           ? this.nodeArr
-          : type == 2
+          : dataType == 2
           ? this.lineArr
-          : type == 3
+          : dataType == 3
           ? this.labelArr
           : [];
       for (let i = 0; i < dataArr.length; i++) {
         let _dataObj = dataArr[i];
-        if (_dataObj.id == id) {
-          dataArr.splice(i, 1);
+        if (_dataObj.id == exprObj.id) {
+          var stageChild = this.pixiApp.stage.getChildByName(exprObj.id);
+          var _stageStyle = stageChild.style;
+          switch (operType) {
+            case 1:
+            case 5:
+              dataArr.splice(i, 1);
+              this.pixiApp.stage.removeChild(stageChild);
+              break;
+            case 2:
+              _dataObj.style.fontSize = exprObj.fontSize;
+              _stageStyle.fontSize = exprObj.fontSize;
+              stageChild.style = _stageStyle;
+              break;
+            case 3:
+              _dataObj.style.color = exprObj.fontColor;
+              _stageStyle.fill = exprObj.fontColor;
+              stageChild.style = _stageStyle;
+              break;
+            case 4:
+              _dataObj.style.backGround = exprObj.fontBackColor;
+              // _stageStyle.fontSize = exprObj.fontSize;
+              // stageChild.style = _stageStyle;
+              break;
+          }
+
           break;
         }
       }
-
-      var child = this.pixiApp.stage.getChildByName(id);
-      this.pixiApp.stage.removeChild(child);
     },
   },
   created() {},

+ 9 - 0
src/controller/old-adm/ScanController.ts

@@ -408,6 +408,15 @@ class ScanController {
   static async floorQueryOutline(params) {
     return await this.http.postRequest(floor_pre + "/query-outline", params);
   }
+  /**
+   * 设备清单 - 创建设备-关联资产-关联系统
+   */
+  static async createEquipAndProperty(params) {
+    return await this.http.postRequest(
+      object_pre + "/equip/creat-equip-pro",
+      params
+    );
+  }
 }
 
 export default ScanController;

+ 1 - 0
src/main.js

@@ -5,6 +5,7 @@ import vueStore from './store'
 import ElementUI from 'element-ui'
 import 'element-ui/lib/theme-chalk/index.css'
 import './meri'
+import 'jquery/dist/jquery.min'
 // import {Button} from 'meri-design'
 // import 'meri-design/dist/index.css'
 Vue.use(ElementUI, { size: "small", zIndex: 1000 })

+ 13 - 0
src/router/system.js

@@ -9,6 +9,7 @@ import systemGraphEdit from "@/components/systemGraph/edit";
 
 import facilityLedger from "@/components/old-adm/ledger/facility/index";
 import deviceDetails from "@/components/old-adm/ledger/facility/details/index";
+import deviceadd from '@/components/old-adm/ledger/facility/addfacility'
 // 系统台账
 import systemLedger from '@/components/old-adm/ledger/system/index';
 import batchPointAssets from '@/components/old-adm/ledger/facility/batchPoint' //批量维护设备位置
@@ -75,6 +76,18 @@ export default [
         }
       },
       {
+        path: '/ledger/deviceadd',
+        name: 'deviceadd',
+        component: deviceadd,
+        meta: {
+          keepAlive: false,
+          breadcrumbs: [{label: '台账管理', path: '/ledger/facility'}, {
+            label: '设备台账',
+            path: '/ledger/facility'
+          }, {label: '添加设备'}]
+        }
+      },
+      {
         path: '/ledger/deviceDetails',
         name: 'deviceDetails',
         component: deviceDetails,

+ 3 - 3
src/store/modules/layout.ts

@@ -187,9 +187,9 @@ export default {
          * 改为调用运维平台的根据用户ID获取用户信息的接口
          * nh 2021.10.25
          */
-        let userId = store.state.ssoToken
-          ? store.state.ssoToken
-          : lStorage.get("ssoToken");
+        // let userId = store.state.ssoToken
+        //   ? store.state.ssoToken
+        //   : lStorage.get("ssoToken");
 
         let pd = lStorage.get("ssoPd");
         const user = new userController();

+ 2 - 1
vue.config.js

@@ -73,7 +73,8 @@ module.exports = {
   configureWebpack: {
     resolve: {
       alias: {
-        'vue$': 'vue/dist/vue.esm.js'
+        'vue$': 'vue/dist/vue.esm.js',
+        'jQuery': 'jquery/dist/jquery.min'
       }
     }
   }