Ver Fonte

Merge branch 'master' of http://36.137.93.232:3000/hf/byte-sailing-new

cz há 2 anos atrás
pai
commit
90898daaaf

+ 1 - 0
package.json

@@ -24,6 +24,7 @@
     "@antv/x6-plugin-snapline": "^2.1.6",
     "@antv/x6-plugin-stencil": "^2.0.2",
     "@antv/x6-plugin-transform": "^2.1.6",
+    "@antv/x6-vue-shape": "^2.0.11",
     "@vue-flow/additional-components": "^1.3.3",
     "@vue-flow/core": "^1.18.2",
     "@vueup/vue-quill": "^1.0.0-alpha.40",

Diff do ficheiro suprimidas por serem muito extensas
+ 2225 - 920
src/assets/icons/iconfont/demo_index.html


+ 243 - 23
src/assets/icons/iconfont/iconfont.css

@@ -1,8 +1,8 @@
 @font-face {
   font-family: "iconfont"; /* Project id 3933484 */
-  src: url('iconfont.woff2?t=1680573314108') format('woff2'),
-       url('iconfont.woff?t=1680573314108') format('woff'),
-       url('iconfont.ttf?t=1680573314108') format('truetype');
+  src: url('iconfont.woff2?t=1682059695084') format('woff2'),
+       url('iconfont.woff?t=1682059695084') format('woff'),
+       url('iconfont.ttf?t=1682059695084') format('truetype');
 }
 
 .iconfont {
@@ -13,6 +13,246 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-iconm_shez:before {
+  content: "\e830";
+}
+
+.icon-iconm_woddd:before {
+  content: "\e831";
+}
+
+.icon-icomx_jiangdzjzy:before {
+  content: "\e818";
+}
+
+.icon-icomx_banli:before {
+  content: "\e819";
+}
+
+.icon-icomx_jiand:before {
+  content: "\e81a";
+}
+
+.icon-icomx_shez:before {
+  content: "\e81b";
+}
+
+.icon-icomx_fenz:before {
+  content: "\e81c";
+}
+
+.icon-icomx_jiansgr:before {
+  content: "\e81d";
+}
+
+.icon-icomx_kehukb:before {
+  content: "\e81e";
+}
+
+.icon-iconm_jiansgr:before {
+  content: "\e81f";
+}
+
+.icon-icomx_yinhangk:before {
+  content: "\e820";
+}
+
+.icon-icomx_zhaop:before {
+  content: "\e821";
+}
+
+.icon-icomx_shujzs:before {
+  content: "\e822";
+}
+
+.icon-iconm_zhaop:before {
+  content: "\e823";
+}
+
+.icon-iconm_jiand:before {
+  content: "\e824";
+}
+
+.icon-iconm_fenz:before {
+  content: "\e825";
+}
+
+.icon-iconm_kehukb:before {
+  content: "\e826";
+}
+
+.icon-iconm_banli:before {
+  content: "\e827";
+}
+
+.icon-icomx_erwm:before {
+  content: "\e828";
+}
+
+.icon-iconm_jiangdzjzy:before {
+  content: "\e829";
+}
+
+.icon-iconm_erwm:before {
+  content: "\e82a";
+}
+
+.icon-icomx_woddd:before {
+  content: "\e82b";
+}
+
+.icon-iconm_yinhangk:before {
+  content: "\e82c";
+}
+
+.icon-iconm_shujzs:before {
+  content: "\e82d";
+}
+
+.icon-iconm_xiadje:before {
+  content: "\e82e";
+}
+
+.icon-icomx_xiadje:before {
+  content: "\e82f";
+}
+
+.icon-icomx_bianj:before {
+  content: "\e783";
+}
+
+.icon-iconm_baozch:before {
+  content: "\e7bc";
+}
+
+.icon-icomx_baozch:before {
+  content: "\e816";
+}
+
+.icon-iconm_bianj:before {
+  content: "\e817";
+}
+
+.icon-icomx_quertj1:before {
+  content: "\e812";
+}
+
+.icon-icomx_dizhi:before {
+  content: "\e814";
+}
+
+.icon-icomm_dizhi:before {
+  content: "\e815";
+}
+
+.icon-iconm_tianjia1:before {
+  content: "\e810";
+}
+
+.icon-icomx_sahnchu1:before {
+  content: "\e811";
+}
+
+.icon-iconm_jianshao1:before {
+  content: "\e813";
+}
+
+.icon-iconm_quertj:before {
+  content: "\e7f9";
+}
+
+.icon-icomx_jiansan:before {
+  content: "\e80d";
+}
+
+.icon-iconm_jiansan:before {
+  content: "\e80e";
+}
+
+.icon-icomx_quertj:before {
+  content: "\e80f";
+}
+
+.icon-iconm_tupian:before {
+  content: "\e7f0";
+}
+
+.icon-icomx_tupian:before {
+  content: "\e7f6";
+}
+
+.icon-iconm_shouy:before {
+  content: "\e803";
+}
+
+.icon-iconm_shoucang:before {
+  content: "\e804";
+}
+
+.icon-icomx_shouy:before {
+  content: "\e805";
+}
+
+.icon-icomx_zixun:before {
+  content: "\e806";
+}
+
+.icon-iconm_fenx:before {
+  content: "\e807";
+}
+
+.icon-icomx_shoucang:before {
+  content: "\e808";
+}
+
+.icon-iconm_zixun:before {
+  content: "\e809";
+}
+
+.icon-icomx_fenx:before {
+  content: "\e80a";
+}
+
+.icon-iconm_kefu:before {
+  content: "\e80b";
+}
+
+.icon-icomx_kefu:before {
+  content: "\e80c";
+}
+
+.icon-icomx_xitxx:before {
+  content: "\e7fb";
+}
+
+.icon-iconm_xitxx:before {
+  content: "\e7fc";
+}
+
+.icon-iconm_yewtx:before {
+  content: "\e7fd";
+}
+
+.icon-iconm_qunliao:before {
+  content: "\e7fe";
+}
+
+.icon-icomx_yewtx:before {
+  content: "\e7ff";
+}
+
+.icon-icomx_qunliao:before {
+  content: "\e800";
+}
+
+.icon-icomx_miandr:before {
+  content: "\e801";
+}
+
+.icon-iconm_miandr:before {
+  content: "\e802";
+}
+
 .icon-icomx_xialan1:before {
   content: "\e7f3";
 }
@@ -25,10 +265,6 @@
   content: "\e7f2";
 }
 
-.icon-iconm_quertj1:before {
-  content: "\e7f0";
-}
-
 .icon-iconm_gongndh:before {
   content: "\e7ed";
 }
@@ -49,10 +285,6 @@
   content: "\e7f5";
 }
 
-.icon-icomx_quertj:before {
-  content: "\e7f6";
-}
-
 .icon-iconm_fangdck:before {
   content: "\e7f7";
 }
@@ -61,10 +293,6 @@
   content: "\e7f8";
 }
 
-.icon-iconm_quertj:before {
-  content: "\e7f9";
-}
-
 .icon-iconm_gengdxq:before {
   content: "\e7fa";
 }
@@ -585,10 +813,6 @@
   content: "\e782";
 }
 
-.icon-icomx_baozch:before {
-  content: "\e783";
-}
-
 .icon-icomx_daozdj:before {
   content: "\e784";
 }
@@ -813,10 +1037,6 @@
   content: "\e7bb";
 }
 
-.icon-iconm_baozch:before {
-  content: "\e7bc";
-}
-
 .icon-iconm_kucpd:before {
   content: "\e7bd";
 }

Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
src/assets/icons/iconfont/iconfont.js


+ 420 - 35
src/assets/icons/iconfont/iconfont.json

@@ -6,6 +6,426 @@
   "description": "",
   "glyphs": [
     {
+      "icon_id": "35160921",
+      "name": "iconm_shez",
+      "font_class": "iconm_shez",
+      "unicode": "e830",
+      "unicode_decimal": 59440
+    },
+    {
+      "icon_id": "35160922",
+      "name": "iconm_woddd",
+      "font_class": "iconm_woddd",
+      "unicode": "e831",
+      "unicode_decimal": 59441
+    },
+    {
+      "icon_id": "35160897",
+      "name": "icomx_jiangdzjzy",
+      "font_class": "icomx_jiangdzjzy",
+      "unicode": "e818",
+      "unicode_decimal": 59416
+    },
+    {
+      "icon_id": "35160898",
+      "name": "icomx_banli",
+      "font_class": "icomx_banli",
+      "unicode": "e819",
+      "unicode_decimal": 59417
+    },
+    {
+      "icon_id": "35160899",
+      "name": "icomx_jiand",
+      "font_class": "icomx_jiand",
+      "unicode": "e81a",
+      "unicode_decimal": 59418
+    },
+    {
+      "icon_id": "35160900",
+      "name": "icomx_shez",
+      "font_class": "icomx_shez",
+      "unicode": "e81b",
+      "unicode_decimal": 59419
+    },
+    {
+      "icon_id": "35160901",
+      "name": "icomx_fenz",
+      "font_class": "icomx_fenz",
+      "unicode": "e81c",
+      "unicode_decimal": 59420
+    },
+    {
+      "icon_id": "35160902",
+      "name": "icomx_jiansgr",
+      "font_class": "icomx_jiansgr",
+      "unicode": "e81d",
+      "unicode_decimal": 59421
+    },
+    {
+      "icon_id": "35160903",
+      "name": "icomx_kehukb",
+      "font_class": "icomx_kehukb",
+      "unicode": "e81e",
+      "unicode_decimal": 59422
+    },
+    {
+      "icon_id": "35160904",
+      "name": "iconm_jiansgr",
+      "font_class": "iconm_jiansgr",
+      "unicode": "e81f",
+      "unicode_decimal": 59423
+    },
+    {
+      "icon_id": "35160905",
+      "name": "icomx_yinhangk",
+      "font_class": "icomx_yinhangk",
+      "unicode": "e820",
+      "unicode_decimal": 59424
+    },
+    {
+      "icon_id": "35160906",
+      "name": "icomx_zhaop",
+      "font_class": "icomx_zhaop",
+      "unicode": "e821",
+      "unicode_decimal": 59425
+    },
+    {
+      "icon_id": "35160907",
+      "name": "icomx_shujzs",
+      "font_class": "icomx_shujzs",
+      "unicode": "e822",
+      "unicode_decimal": 59426
+    },
+    {
+      "icon_id": "35160908",
+      "name": "iconm_zhaop",
+      "font_class": "iconm_zhaop",
+      "unicode": "e823",
+      "unicode_decimal": 59427
+    },
+    {
+      "icon_id": "35160909",
+      "name": "iconm_jiand",
+      "font_class": "iconm_jiand",
+      "unicode": "e824",
+      "unicode_decimal": 59428
+    },
+    {
+      "icon_id": "35160910",
+      "name": "iconm_fenz",
+      "font_class": "iconm_fenz",
+      "unicode": "e825",
+      "unicode_decimal": 59429
+    },
+    {
+      "icon_id": "35160911",
+      "name": "iconm_kehukb",
+      "font_class": "iconm_kehukb",
+      "unicode": "e826",
+      "unicode_decimal": 59430
+    },
+    {
+      "icon_id": "35160912",
+      "name": "iconm_banli",
+      "font_class": "iconm_banli",
+      "unicode": "e827",
+      "unicode_decimal": 59431
+    },
+    {
+      "icon_id": "35160913",
+      "name": "icomx_erwm",
+      "font_class": "icomx_erwm",
+      "unicode": "e828",
+      "unicode_decimal": 59432
+    },
+    {
+      "icon_id": "35160914",
+      "name": "iconm_jiangdzjzy",
+      "font_class": "iconm_jiangdzjzy",
+      "unicode": "e829",
+      "unicode_decimal": 59433
+    },
+    {
+      "icon_id": "35160915",
+      "name": "iconm_erwm",
+      "font_class": "iconm_erwm",
+      "unicode": "e82a",
+      "unicode_decimal": 59434
+    },
+    {
+      "icon_id": "35160916",
+      "name": "icomx_woddd",
+      "font_class": "icomx_woddd",
+      "unicode": "e82b",
+      "unicode_decimal": 59435
+    },
+    {
+      "icon_id": "35160917",
+      "name": "iconm_yinhangk",
+      "font_class": "iconm_yinhangk",
+      "unicode": "e82c",
+      "unicode_decimal": 59436
+    },
+    {
+      "icon_id": "35160918",
+      "name": "iconm_shujzs",
+      "font_class": "iconm_shujzs",
+      "unicode": "e82d",
+      "unicode_decimal": 59437
+    },
+    {
+      "icon_id": "35160919",
+      "name": "iconm_xiadje",
+      "font_class": "iconm_xiadje",
+      "unicode": "e82e",
+      "unicode_decimal": 59438
+    },
+    {
+      "icon_id": "35160920",
+      "name": "icomx_xiadje",
+      "font_class": "icomx_xiadje",
+      "unicode": "e82f",
+      "unicode_decimal": 59439
+    },
+    {
+      "icon_id": "35023657",
+      "name": "icomx_bianj",
+      "font_class": "icomx_bianj",
+      "unicode": "e783",
+      "unicode_decimal": 59267
+    },
+    {
+      "icon_id": "35023658",
+      "name": "iconm_baozch",
+      "font_class": "iconm_baozch",
+      "unicode": "e7bc",
+      "unicode_decimal": 59324
+    },
+    {
+      "icon_id": "35023659",
+      "name": "icomx_baozch",
+      "font_class": "icomx_baozch",
+      "unicode": "e816",
+      "unicode_decimal": 59414
+    },
+    {
+      "icon_id": "35023660",
+      "name": "iconm_bianj",
+      "font_class": "iconm_bianj",
+      "unicode": "e817",
+      "unicode_decimal": 59415
+    },
+    {
+      "icon_id": "34992867",
+      "name": "icomx_quertj1",
+      "font_class": "icomx_quertj1",
+      "unicode": "e812",
+      "unicode_decimal": 59410
+    },
+    {
+      "icon_id": "34982254",
+      "name": "icomx_dizhi ",
+      "font_class": "icomx_dizhi",
+      "unicode": "e814",
+      "unicode_decimal": 59412
+    },
+    {
+      "icon_id": "34982255",
+      "name": "icomm_dizhi",
+      "font_class": "icomm_dizhi",
+      "unicode": "e815",
+      "unicode_decimal": 59413
+    },
+    {
+      "icon_id": "34980389",
+      "name": "iconm_tianjia1",
+      "font_class": "iconm_tianjia1",
+      "unicode": "e810",
+      "unicode_decimal": 59408
+    },
+    {
+      "icon_id": "34980390",
+      "name": "icomx_sahnchu1",
+      "font_class": "icomx_sahnchu1",
+      "unicode": "e811",
+      "unicode_decimal": 59409
+    },
+    {
+      "icon_id": "34980392",
+      "name": "iconm_jianshao1",
+      "font_class": "iconm_jianshao1",
+      "unicode": "e813",
+      "unicode_decimal": 59411
+    },
+    {
+      "icon_id": "34977553",
+      "name": "iconm_quertj",
+      "font_class": "iconm_quertj",
+      "unicode": "e7f9",
+      "unicode_decimal": 59385
+    },
+    {
+      "icon_id": "34977554",
+      "name": "icomx_jiansan",
+      "font_class": "icomx_jiansan",
+      "unicode": "e80d",
+      "unicode_decimal": 59405
+    },
+    {
+      "icon_id": "34977555",
+      "name": "iconm_jiansan",
+      "font_class": "iconm_jiansan",
+      "unicode": "e80e",
+      "unicode_decimal": 59406
+    },
+    {
+      "icon_id": "34977556",
+      "name": "icomx_quertj",
+      "font_class": "icomx_quertj",
+      "unicode": "e80f",
+      "unicode_decimal": 59407
+    },
+    {
+      "icon_id": "34943268",
+      "name": "iconm_tupian",
+      "font_class": "iconm_tupian",
+      "unicode": "e7f0",
+      "unicode_decimal": 59376
+    },
+    {
+      "icon_id": "34943269",
+      "name": "icomx_tupian",
+      "font_class": "icomx_tupian",
+      "unicode": "e7f6",
+      "unicode_decimal": 59382
+    },
+    {
+      "icon_id": "34934852",
+      "name": "iconm_shouy",
+      "font_class": "iconm_shouy",
+      "unicode": "e803",
+      "unicode_decimal": 59395
+    },
+    {
+      "icon_id": "34934853",
+      "name": "iconm_shoucang",
+      "font_class": "iconm_shoucang",
+      "unicode": "e804",
+      "unicode_decimal": 59396
+    },
+    {
+      "icon_id": "34934854",
+      "name": "icomx_shouy",
+      "font_class": "icomx_shouy",
+      "unicode": "e805",
+      "unicode_decimal": 59397
+    },
+    {
+      "icon_id": "34934855",
+      "name": "icomx_zixun",
+      "font_class": "icomx_zixun",
+      "unicode": "e806",
+      "unicode_decimal": 59398
+    },
+    {
+      "icon_id": "34934856",
+      "name": "iconm_fenx",
+      "font_class": "iconm_fenx",
+      "unicode": "e807",
+      "unicode_decimal": 59399
+    },
+    {
+      "icon_id": "34934857",
+      "name": "icomx_shoucang",
+      "font_class": "icomx_shoucang",
+      "unicode": "e808",
+      "unicode_decimal": 59400
+    },
+    {
+      "icon_id": "34934858",
+      "name": "iconm_zixun",
+      "font_class": "iconm_zixun",
+      "unicode": "e809",
+      "unicode_decimal": 59401
+    },
+    {
+      "icon_id": "34934859",
+      "name": "icomx_fenx",
+      "font_class": "icomx_fenx",
+      "unicode": "e80a",
+      "unicode_decimal": 59402
+    },
+    {
+      "icon_id": "34934860",
+      "name": "iconm_kefu",
+      "font_class": "iconm_kefu",
+      "unicode": "e80b",
+      "unicode_decimal": 59403
+    },
+    {
+      "icon_id": "34934861",
+      "name": "icomx_kefu",
+      "font_class": "icomx_kefu",
+      "unicode": "e80c",
+      "unicode_decimal": 59404
+    },
+    {
+      "icon_id": "34895620",
+      "name": "icomx_xitxx",
+      "font_class": "icomx_xitxx",
+      "unicode": "e7fb",
+      "unicode_decimal": 59387
+    },
+    {
+      "icon_id": "34895621",
+      "name": "iconm_xitxx",
+      "font_class": "iconm_xitxx",
+      "unicode": "e7fc",
+      "unicode_decimal": 59388
+    },
+    {
+      "icon_id": "34895622",
+      "name": "iconm_yewtx",
+      "font_class": "iconm_yewtx",
+      "unicode": "e7fd",
+      "unicode_decimal": 59389
+    },
+    {
+      "icon_id": "34895623",
+      "name": "iconm_qunliao",
+      "font_class": "iconm_qunliao",
+      "unicode": "e7fe",
+      "unicode_decimal": 59390
+    },
+    {
+      "icon_id": "34895624",
+      "name": "icomx_yewtx",
+      "font_class": "icomx_yewtx",
+      "unicode": "e7ff",
+      "unicode_decimal": 59391
+    },
+    {
+      "icon_id": "34895625",
+      "name": "icomx_qunliao",
+      "font_class": "icomx_qunliao",
+      "unicode": "e800",
+      "unicode_decimal": 59392
+    },
+    {
+      "icon_id": "34895627",
+      "name": "icomx_miandr",
+      "font_class": "icomx_miandr",
+      "unicode": "e801",
+      "unicode_decimal": 59393
+    },
+    {
+      "icon_id": "34895628",
+      "name": "iconm_miandr",
+      "font_class": "iconm_miandr",
+      "unicode": "e802",
+      "unicode_decimal": 59394
+    },
+    {
       "icon_id": "34887337",
       "name": "icomx_xialan ",
       "font_class": "icomx_xialan1",
@@ -27,13 +447,6 @@
       "unicode_decimal": 59378
     },
     {
-      "icon_id": "34887201",
-      "name": "iconm_quertj",
-      "font_class": "iconm_quertj1",
-      "unicode": "e7f0",
-      "unicode_decimal": 59376
-    },
-    {
       "icon_id": "34887144",
       "name": "iconm_gongndh",
       "font_class": "iconm_gongndh",
@@ -69,13 +482,6 @@
       "unicode_decimal": 59381
     },
     {
-      "icon_id": "34887153",
-      "name": "icomx_quertj",
-      "font_class": "icomx_quertj",
-      "unicode": "e7f6",
-      "unicode_decimal": 59382
-    },
-    {
       "icon_id": "34887154",
       "name": "iconm_fangdck",
       "font_class": "iconm_fangdck",
@@ -90,13 +496,6 @@
       "unicode_decimal": 59384
     },
     {
-      "icon_id": "34887156",
-      "name": "iconm_quertj",
-      "font_class": "iconm_quertj",
-      "unicode": "e7f9",
-      "unicode_decimal": 59385
-    },
-    {
       "icon_id": "34887157",
       "name": "iconm_gengdxq",
       "font_class": "iconm_gengdxq",
@@ -1007,13 +1406,6 @@
       "unicode_decimal": 59266
     },
     {
-      "icon_id": "34839862",
-      "name": "icomx_baozch",
-      "font_class": "icomx_baozch",
-      "unicode": "e783",
-      "unicode_decimal": 59267
-    },
-    {
       "icon_id": "34839863",
       "name": "icomx_daozdj",
       "font_class": "icomx_daozdj",
@@ -1406,13 +1798,6 @@
       "unicode_decimal": 59323
     },
     {
-      "icon_id": "34839919",
-      "name": "iconm_baozch",
-      "font_class": "iconm_baozch",
-      "unicode": "e7bc",
-      "unicode_decimal": 59324
-    },
-    {
       "icon_id": "34839920",
       "name": "iconm_kucpd",
       "font_class": "iconm_kucpd",

BIN
src/assets/icons/iconfont/iconfont.ttf


BIN
src/assets/icons/iconfont/iconfont.woff


BIN
src/assets/icons/iconfont/iconfont.woff2


+ 1 - 1
src/components/Editor/index.vue

@@ -33,7 +33,7 @@ const data = reactive({
         [{ list: "ordered" }, { list: "bullet" }],
         [{ indent: "-1" }, { indent: "+1" }],
         [{ header: 1 }, { header: 2 }],
-        ["image"],
+        // ["image"],
         [{ direction: "rtl" }],
         [{ color: [] }, { background: [] }],
       ],

+ 11 - 11
src/views/finance/fundManage/accountPayment/index.vue

@@ -348,17 +348,17 @@ const formConfig = computed(() => {
 			prop: 'remark',
 			label: '摘要',
 		},
-		{
-			type: 'upload',
-			prop: 'upload',
-			label: '摘要',
-		},
-		{
-			type: 'slot',
-			slotName: 'productPic',
-			prop: 'fileList',
-			label: '上传附件',
-		},
+		// {
+		// 	type: 'upload',
+		// 	prop: 'upload',
+		// 	label: '摘要',
+		// },
+		// {
+		// 	type: 'slot',
+		// 	slotName: 'productPic',
+		// 	prop: 'fileList',
+		// 	label: '上传附件',
+		// },
 	]
 })
 const newPassword = () => {

+ 3 - 0
src/views/login.vue

@@ -16,6 +16,7 @@
 									placeholder="请输入租户号"
 									prefix-icon="user"
 									@keyup.enter="handleLogin"
+									autocomplete="email"
 									v-model="loginForm.tenantId">
 									
 								</el-input>
@@ -25,6 +26,7 @@
 									placeholder="请输入账号"
 									prefix-icon="UserFilled"
 									@keyup.enter="handleLogin"
+									autocomplete="username"
 									v-model="loginForm.username">
 								</el-input>
 							</el-form-item>
@@ -34,6 +36,7 @@
 									prefix-icon="View"
 									type="password"
 									v-model="loginForm.password"
+									autocomplete="current-password"
 									@keyup.enter="handleLogin">
 								</el-input>
 							</el-form-item>

+ 6 - 2
src/views/process/processConfig/processChart.vue

@@ -35,13 +35,13 @@ onMounted(() => {
 	display: flex;
 	justify-content: space-between;
 	.from {
-		width: 300px;
+		width: 400px;
 		background: #fff;
 		border-radius: 5px;
 		padding: 20px;
 	}
 	.content {
-		width: calc(100% - 320px);
+		width: calc(100% - 420px);
 		border-radius: 5px;
 		padding: 20px;
 		background: #fff;
@@ -50,4 +50,8 @@ onMounted(() => {
 .chart-warp {
 	height: calc(100vh - 280px);
 }
+
+</style>
+<style>
+
 </style>

+ 197 - 226
src/views/process/processConfig/vueFlow.vue

@@ -63,16 +63,20 @@ import { Selection } from '@antv/x6-plugin-selection'
 import { Snapline } from '@antv/x6-plugin-snapline'
 import { Keyboard } from '@antv/x6-plugin-keyboard'
 import { Clipboard } from '@antv/x6-plugin-clipboard'
+import { register } from '@antv/x6-vue-shape'
 import { History } from '@antv/x6-plugin-history'
 import Cookies from 'js-cookie'
-import { ElMessage, ElMessageBox } from "element-plus";
+import { ElMessage, ElMessageBox } from 'element-plus'
+import startBtn from './startBtn.vue'
+import endBtn from './endBtn.vue'
+import handleBtn from './handleBtn.vue'
+
 defineProps({
-  title: {
-    type: Object,
-    default: '',
-  },
-  
-});
+	title: {
+		type: Object,
+		default: '',
+	},
+})
 const { proxy } = getCurrentInstance()
 const internalInstance = getCurrentInstance()
 const dialogVisible = ref(false)
@@ -170,7 +174,7 @@ const formConfig = computed(() => {
 			prop: 'handleObjectId',
 			placeholder: '请选择办理人',
 			data: [],
-		}, 
+		},
 		{
 			type: 'input',
 			prop: 'handlingMethod',
@@ -194,6 +198,7 @@ const formConfig = computed(() => {
 				{
 					label: '通过',
 					value: 1,
+					disabled:true,
 				},
 				{
 					label: '驳回',
@@ -234,24 +239,26 @@ const formOption = reactive({
 let graph
 const submitForm = () => {
 	byform.value.handleSubmit((valid) => {
+		
 		flowDefinitionNodeObj.value[formData.data.id] = formData.data
 		console.log(flowDefinitionNodeObj.value)
 		dialogVisible.value = false
+		formData.data.cell.setData({
+			title: formData.data.nodeName,
+		});
 	})
-	
-
 }
 
 const submitFormData = {
-	flowInfoId:null,
-	titleTemplate:null,
-	tenantId:Cookies.get('tenantId'),
-	nodeObject:'',
-	lineObject:'',
-	flowDefinitionNodeList:[],
+	flowInfoId: null,
+	titleTemplate: null,
+	tenantId: Cookies.get('tenantId'),
+	nodeObject: '',
+	lineObject: '',
+	flowDefinitionNodeList: [],
 }
 const submitAll = () => {
-	if(proxy.title == '') {
+	if (proxy.title == '') {
 		ElMessage({
 			message: '请输入流程标题',
 			type: 'warning',
@@ -263,42 +270,49 @@ const submitAll = () => {
 	console.log(nodeList)
 	const isStart = false
 	for (let i = 0; i < nodeList.length; i++) {
-		const element = nodeList[i];
+		const element = nodeList[i]
+		console.log(element)
+		console.log(flowDefinitionNodeObj)
 		//是办理节点
-		if(element.id != 1 && element.shape != "edge") {
-			console.log(element)
-			if(!flowDefinitionNodeObj.value[element.id]) {
+		if (element.shape != "start-btn" && element.shape != 'edge') {
+			
+			if (!flowDefinitionNodeObj.value[element.id]) {
 				ElMessage({
 					message: '有节点未配置,请检查节点',
 					type: 'warning',
 				})
 				return
 			}
-			submitFormData.flowDefinitionNodeList.push({...flowDefinitionNodeObj.value[element.id],nodeType:2})
+			submitFormData.flowDefinitionNodeList.push({
+				...flowDefinitionNodeObj.value[element.id],
+				nodeType: 2,
+			})
 		}
-		if(element.id == "1") {
+		if (element.shape == "start-btn") {
 			submitFormData.flowDefinitionNodeList.push({
-				nodeName:'开始',
-				nodeType:1,
-				id:1,
-				nodeButtonSet:'',
-				parentId:0,
+				nodeName: '开始',
+				nodeType: 1,
+				id: 1,
+				nodeButtonSet: '',
+				parentId: 0,
 			})
 		}
 		//说明是线
-		if(element.shape == "edge") {
-			console.log(flowDefinitionNodeObj)
-			if(!flowDefinitionNodeObj.value[element.target.cell]) {
+		if (element.shape == 'edge') {
+			
+			if (!flowDefinitionNodeObj.value[element.target.cell]) {
 				ElMessage({
 					message: '有节点未配置,请检查节点',
 					type: 'warning',
 				})
 				return
 			}
-			flowDefinitionNodeObj.value[element.target.cell].id = element.target.cell
-			flowDefinitionNodeObj.value[element.target.cell].parentId = element.source.cell
+			flowDefinitionNodeObj.value[element.target.cell].id =
+				element.target.cell
+			flowDefinitionNodeObj.value[element.target.cell].parentId =
+				element.source.cell
 			submitFormData.flowDefinitionNodeList = []
-		}		
+		}
 	}
 	addVersion()
 	console.log(flowDefinitionNodeObj.value)
@@ -307,27 +321,27 @@ const submitAll = () => {
 //选取一个随机不重复的正整数id
 const randomId = () => {
 	const id = Math.floor(Math.random() * 100000000000000000)
-	if(flowDefinitionNodeObj.value[id]) {
+	if (flowDefinitionNodeObj.value[id]) {
 		randomId()
 	} else {
 		return id
 	}
 }
 
-
 const addVersion = () => {
 	const idObg = {}
 	for (let i = 0; i < submitFormData.flowDefinitionNodeList.length; i++) {
-		const element = submitFormData.flowDefinitionNodeList[i];
-		if(element.parentId == null && element.nodeName == '结束') {
+		const element = submitFormData.flowDefinitionNodeList[i]
+		console.log(element)
+		if (element.parentId == null && element.nodeName == '结束') {
 			ElMessage({
 				message: '有结束节点未连线,请配置',
 				type: 'warning',
 			})
 			return
 		}
-		if(isNaN(element.id)) {
-			if(idObg[element.id]) {
+		if (isNaN(element.id)) {
+			if (idObg[element.id]) {
 				element.id = idObg[element.id]
 			} else {
 				const id = randomId()
@@ -335,8 +349,8 @@ const addVersion = () => {
 				element.id = id
 			}
 		}
-		if(isNaN(element.parentId) && element.nodeName != '开始') {
-			if(idObg[element.parentId]) {
+		if (isNaN(element.parentId) && element.nodeName != '开始') {
+			if (idObg[element.parentId]) {
 				element.parentId = idObg[element.parentId]
 			} else {
 				const id = randomId()
@@ -345,34 +359,30 @@ const addVersion = () => {
 			}
 		}
 		//nodeButtonSet转成字符串类型,用逗号隔开
-		if(element.nodeButtonSet) {
+		if (element.nodeButtonSet) {
 			element.nodeButtonSet = element.nodeButtonSet.join(',')
 		}
 	}
 	console.log(submitFormData)
-	
-	proxy.post('/flowDefinition/addVersion',submitFormData)
-		.then((res) => {
-			console.log(res)
-			ElMessage({
-				message: '保存成功',
-				type: 'success',
-			})
+
+	proxy.post('/flowDefinition/addVersion', submitFormData).then((res) => {
+		console.log(res)
+		ElMessage({
+			message: '保存成功',
+			type: 'success',
 		})
+	})
 }
 
 //将组数里的id和parentId转换成整正整数类型
 const changeId = (arr) => {
 	for (let i = 0; i < arr.length; i++) {
-		const element = arr[i];
+		const element = arr[i]
 		element.id = parseInt(element.id)
 		element.parentId = parseInt(element.parentId)
 	}
 }
 
-
-
-
 const deleteFlowDefinitionNodeObj = (id) => {
 	graph.removeNode(formData.data.id)
 	delete flowDefinitionNodeObj.value[id]
@@ -381,8 +391,13 @@ const deleteFlowDefinitionNodeObj = (id) => {
 
 const gethandleObjectList = (e) => {
 	formData.data.handleObjectId = ''
-	if(e === 1) {
-		proxy.get('/tenantUser/list?pageNum=1&pageSize=1000&tenantId=' + submitFormData.tenantId,{})
+	if (e === 1) {
+		proxy
+			.get(
+				'/tenantUser/list?pageNum=1&pageSize=1000&tenantId=' +
+					submitFormData.tenantId,
+				{}
+			)
 			.then((res) => {
 				formConfig.value[2].data = res.rows.map((item) => {
 					return {
@@ -392,10 +407,15 @@ const gethandleObjectList = (e) => {
 				})
 			})
 	}
-	if(e === 3 || e === 2) {
-		proxy.get('/tenantDept/list?pageNum=1&pageSize=1000&tenantId=' + submitFormData.tenantId,{})
+	if (e === 3 || e === 2) {
+		proxy
+			.get(
+				'/tenantDept/list?pageNum=1&pageSize=1000&tenantId=' +
+					submitFormData.tenantId,
+				{}
+			)
 			.then((res) => {
-				formConfig.value[2].data =res.data.map(item=> {
+				formConfig.value[2].data = res.data.map((item) => {
 					return {
 						label: item.deptName,
 						value: item.deptId,
@@ -403,11 +423,15 @@ const gethandleObjectList = (e) => {
 				})
 			})
 	}
-	if(e === 4) {
-		
+	if (e === 4) {
 	}
-	if(e === 5) {
-		proxy.get('/tenantRole/list?pageNum=1&pageSize=1000&tenantId=' + submitFormData.tenantId,{})
+	if (e === 5) {
+		proxy
+			.get(
+				'/tenantRole/list?pageNum=1&pageSize=1000&tenantId=' +
+					submitFormData.tenantId,
+				{}
+			)
 			.then((res) => {
 				formConfig.value[2].data = res.rows.map((item) => {
 					return {
@@ -417,39 +441,34 @@ const gethandleObjectList = (e) => {
 				})
 			})
 	}
-	
-	
 }
 
-const getTenantDept = () => {
-	
-}
+const getTenantDept = () => {}
 getTenantDept()
 
 const recursive = (data) => {
-  data.map((item) => {
-    item.label = item.deptName;
-    item.id = item.deptId;
-    if (item.children) {
-      recursive(item.children);
-    } else {
-      item.children = [];
-    }
-  });
-};
+	data.map((item) => {
+		item.label = item.deptName
+		item.id = item.deptId
+		if (item.children) {
+			recursive(item.children)
+		} else {
+			item.children = []
+		}
+	})
+}
 
 const pushRoom = (port: any) => {
 	console.log(port)
-	if(port.node.label == '结束') {
+	if (port.node.shape == 'end-btn') {
 		flowDefinitionNodeObj.value[port.node.id] = {
-			nodeName:'结束',
-			nodeType:99,
-			id:port.id,
-			nodeButtonSet:'',
-			parentId:null,
+			nodeName: '结束',
+			nodeType: 99,
+			id: port.id,
+			nodeButtonSet: '',
+			parentId: null,
 		}
 	}
-	console.log(flowDefinitionNodeObj.value)
 }
 //用于存储流程定义节点数据
 
@@ -466,8 +485,10 @@ const antvInit = () => {
 			minScale: 0.5,
 			maxScale: 3,
 		},
-		connecting: {
-			router: 'manhattan',
+		
+		connecting: { 
+			allowLoop:false,
+			// router: 'manhattan',
 			connector: {
 				name: 'rounded',
 				args: {
@@ -515,19 +536,19 @@ const antvInit = () => {
 	const stencil = new Stencil({
 		title: '流程图',
 		target: graph,
-		stencilGraphWidth: 200,
+		stencilGraphWidth: 360,
 		stencilGraphHeight: 180,
 		collapsable: true,
 		groups: [
 			{
 				title: '基础流程图',
 				name: 'group1',
-			},
+			}, 
 		],
 		layoutOptions: {
 			columns: 2,
-			columnWidth: 80,
-			rowHeight: 55,
+			columnWidth: 170,
+			rowHeight: 100,
 		},
 	})
 	document.getElementById('stencil')!.appendChild(stencil.container)
@@ -589,8 +610,17 @@ const antvInit = () => {
 	})
 	// #endregion
 	graph.on('cell:click', ({ e, x, y, cell, view }) => {
-		console.log(cell)
-		if (cell.label === '开始' || cell.label === '结束' || cell.shape === 'edge') {
+		if (cell.shape === 'start-btn') return
+		if(cell.shape === 'end-btn' || cell.shape === 'edge') {
+			ElMessageBox.confirm("是否删除", "提示", {
+				confirmButtonText: "确定",
+				cancelButtonText: "取消",
+				type: "warning",
+			}).then(() => {
+				console.log(cell)
+				graph.removeNode(cell.id)
+				// delete flowDefinitionNodeObj.value[id]
+			});
 			return
 		}
 		if (flowDefinitionNodeObj.value[cell.id]) {
@@ -599,7 +629,7 @@ const antvInit = () => {
 			formData.data = {
 				id: cell.id,
 				cell: cell,
-				nodeButtonSet:[1],
+				nodeButtonSet: [1],
 			}
 		}
 
@@ -705,109 +735,35 @@ const antvInit = () => {
 		},
 		true
 	)
-
-	Graph.registerNode(
-		'custom-polygon',
-		{
-			inherit: 'polygon',
-			width: 66,
-			height: 36,
-			attrs: {
-				body: {
-					strokeWidth: 1,
-					stroke: '#5F95FF',
-					fill: '#EFF4FF',
-				},
-				text: {
-					fontSize: 12,
-					fill: '#262626',
-				},
-			},
-			ports: {
-				...ports,
-				items: [
-					{
-						group: 'top',
-					},
-					{
-						group: 'bottom',
-					},
-				],
-			},
-		},
-		true
-	)
-
-	Graph.registerNode(
-		'custom-circle',
-		{
-			inherit: 'circle',
-			width: 45,
-			height: 45,
-			attrs: {
-				body: {
-					strokeWidth: 1,
-					stroke: '#5F95FF',
-					fill: '#EFF4FF',
-				},
-				text: {
-					fontSize: 12,
-					fill: '#262626',
-				},
-			},
-			ports: { ...ports },
-		},
-		true
-	)
-
-	Graph.registerNode(
-		'custom-image',
-		{
-			inherit: 'rect',
-			width: 52,
-			height: 52,
-			markup: [
-				{
-					tagName: 'rect',
-					selector: 'body',
-				},
-				{
-					tagName: 'image',
-				},
-				{
-					tagName: 'text',
-					selector: 'label',
-				},
-			],
-			attrs: {
-				body: {
-					stroke: '#5F95FF',
-					fill: '#5F95FF',
-				},
-				image: {
-					width: 26,
-					height: 26,
-					refX: 13,
-					refY: 16,
-				},
-				label: {
-					refX: 3,
-					refY: 2,
-					textAnchor: 'left',
-					textVerticalAnchor: 'top',
-					fontSize: 12,
-					fill: '#fff',
-				},
-			},
-			ports: { ...ports },
+	register({
+		shape: 'start-btn',
+		width: 150,
+		height: 90,
+		component: startBtn,
+		effect: ["title"],
+		ports: { ...ports },
+		data: {
+			title: 80,
 		},
-		true
-	)
-	let firstLi = document.createElement('li')
-	firstLi.innerText = '指标详情'
-	console.log(firstLi)
+	})
+	register({
+		shape: 'handle-btn',
+		width: 150,
+		height: 90,
+		effect: ["title"],
+		component: handleBtn,
+		ports: { ...ports },
+	})
+	register({
+		shape: 'end-btn',
+		width: 150,
+		height: 90,
+		effect: ["title"],
+		component: endBtn,
+		ports: { ...ports },
+	})
 	const r1 = graph.createNode({
-		shape: 'custom-rect',
+		shape: 'start-btn',
 		label: '开始',
 		zIndex: 100,
 		attrs: {
@@ -816,56 +772,66 @@ const antvInit = () => {
 				ry: 26,
 			},
 		},
-		tools: [
-			{
-				name: 'button',
-				args: {
-					firstLi,
-				},
-			},
-		],
+		data: {
+			title: 80,
+		},
+	
 	})
 	const r2 = graph.createNode({
-		shape: 'custom-rect',
+		shape: 'handle-btn',
 		label: '办理',
-	})
-	const r3 = graph.createNode({
-		shape: 'custom-rect',
+		zIndex: 100,
 		attrs: {
 			body: {
-				rx: 6,
-				ry: 6,
+				rx: 40,
+				ry: 46,
 			},
 		},
-		label: '分支',
 	})
-	const r4 = graph.createNode({
-		shape: 'custom-polygon',
+	const r3 = graph.createNode({
+		shape: 'end-btn',
+		label: '结束',
+		zIndex: 100,
 		attrs: {
 			body: {
-				refPoints: '0,10 10,0 20,10 10,20',
+				rx: 20,
+				ry: 26,
 			},
 		},
-		label: '结束',
 	})
-	stencil.load([ r2,  r4], 'group1')
+	stencil.load([r2, r3], 'group1')
+	// const startNode = graph.addNode({
+	// 	shape: 'custom-rect',
+	// 	label: '开始',
+	// 	id: 1,
+	// 	x: 500,
+	// 	y: 100,
+	// })
+	
 	graph.addNode({
-		shape: 'custom-rect',
-		label: '开始',
-		id: 1,
+		shape: 'start-btn',
 		x: 500,
-		y: 100,
+		y: 20,
+		label: '开始',
+		attrs: {
+			
+		},
 	})
+	
 }
 onMounted(() => {
 	antvInit()
 	//获取url router参数
-	const router = useRouter();
+	const router = useRouter()
 	submitFormData.flowInfoId = router.currentRoute.value.query.id
 	submitFormData.tenantId = router.currentRoute.value.query.tenantId
 })
 </script>
 <style lang="scss">
+
+.x6-widget-stencil-group-title {
+	display: none !important;
+}
 .x6-widget-stencil-title {
 	display: none;
 }
@@ -878,15 +844,20 @@ onMounted(() => {
 	justify-content: space-between;
 	overflow: hidden;
 	height: 600px;
+	.x6-graph{
+		width: 100%!important;
+	}
 	#stencil {
-		position: absolute;
-		top: 0;
-		left: 0;
+		position: fixed;
+		top: 250px;
+		left: 40px;
 		z-index: 100;
-		width: 200px;
+		width: 360px;
 		height: 500px;
 		background: #fff;
-		border-right: 1px solid #e8e8e8;
+		overflow: hidden;
+		background: #eee;
+		border-radius: 20px;
 	}
 	#container {
 	}

+ 1 - 1
src/views/salesMange/shipmentMange/document/index.vue

@@ -364,7 +364,7 @@ const submitForm = () => {
     );
   });
 };
-const openAddAcceptCode = ref(true);
+const openAddAcceptCode = ref(false);
 const loadingTwo = ref(false);
 const submitTwo = ref(null);
 const fileList = ref([]);

+ 3 - 3
src/views/system/dept2/index.vue

@@ -81,14 +81,14 @@
               link
               type="primary"
               @click="getDtl(scope.row)"
-              v-hasPermi="['system:dept:edit']"
+              
               >修改</el-button
             >
             <el-button
               link
               type="primary"
               @click="handleAdd(scope.row)"
-              v-hasPermi="['system:dept:add']"
+              
               >新增</el-button
             >
             <el-button
@@ -96,7 +96,7 @@
               link
               type="primary"
               @click="listDelete(scope.row)"
-              v-hasPermi="['system:dept:remove']"
+              
               >删除</el-button
             >
           </template>

+ 1 - 9
src/views/system/role2/index.vue

@@ -239,12 +239,7 @@ const treeChange = (e) => {
 const openModal = () => {
   dialogVisible.value = true;
   modalType.value = "add";
-  formData.data = {
-    tableData: [
-      { num: 111, age: 222, renyuan: 2 },
-      { num: 111, age: 222, renyuan: 1 },
-    ],
-  };
+  formData.data = {};
 };
 const TreetenantId = ref("");
 const selection = ref({
@@ -302,8 +297,6 @@ const submitTree = () => {
 };
 
 const submitForm = () => {
-  console.log(formData.data);
-  return;
   byform.value.handleSubmit((valid) => {
     const method = modalType.value == "add" ? "POST" : "PUT";
     console.log(method);
@@ -317,7 +310,6 @@ const submitForm = () => {
     });
   });
 };
-
 const getDtl = (row) => {
   formData.data = { ...row };
   delete formData.data.menuIds;

+ 8 - 1
src/views/system/tenant/index.vue

@@ -271,7 +271,7 @@ const formConfig = computed(() => {
       type: "input",
       prop: "enterpriseName",
       label: "企业名称",
-      maxlength: 100,
+      maxlength: 50,
     },
     {
       type: "radio",
@@ -353,6 +353,13 @@ const noRepeat = (arr) => {
 };
 const submitTree = () => {
   let data = noRepeat(tree.value.getHalfCheckedKeys().concat(tree.value.getCheckedKeys()));
+  if(data.length == 0) {
+    ElMessage({
+      message: "请至少选择一个菜单",
+      type: "error",
+    });
+    return;
+  }
   proxy
     .post("/tenantInfo/bindingMenu", {
       tenantId: selection.value.data[0].tenantId,

+ 24 - 5
src/views/system/user2/index.vue

@@ -131,11 +131,23 @@ const sourceList = ref({
 })
 let dialogVisible = ref(false)
 let modalType = ref('add')
+const validatePass = (rule, value, callback) => {
+	
+  if (!formData.data.password && modalType.value == 'add') {
+    callback(new Error('请输入账号和密码'))
+  } else {
+    
+    callback()
+  }
+}
 let rules = ref({
 	roleKey: [{ required: true, message: '请选择部门', trigger: 'blur' }],
 	nickName: [{ required: true, message: '姓名不能为空', trigger: 'blur' }],
-	userName: [{ required: true, message: '用户名不能为空', trigger: 'blur' }],
+	userName: [{validator: validatePass, required: true, message: '请输入账号和密码', trigger: 'blur' }],
+	password: [{ required: true, message: '密码不能为空', trigger: 'blur' }],
+	
 })
+
 const userId = ref('')
 const { proxy } = getCurrentInstance()
 const password = ref('')
@@ -457,6 +469,7 @@ const submitForm = () => {
 				})
 				dialogVisible.value = false
 				getList()
+				getDept()
 			})
 	})
 }
@@ -512,10 +525,16 @@ const submitPassword = (password1) => {
 }
 
 const getDtl = (row) => {
-	formData.data = { ...row }
-	modalType.value = 'edit'
-	console.log(modalType.value)
-	dialogVisible.value = true
+	
+	//system/user/1
+	proxy.get(`/tenantUser/${row.userId}`).then((res) => {
+		console.log(res)
+		formData.data = {...row,roleIds:res.roleIds}
+		modalType.value = 'edit'
+		console.log(modalType.value)
+		dialogVisible.value = true
+	})
+	
 }
 getTreeList()
 getList()

+ 267 - 0
src/views/systemTenant/tenant/dept/index.vue

@@ -0,0 +1,267 @@
+<template>
+  <div class="tenant">
+    <byTable
+      :hideTable="true"
+      :hidePagination="true"
+      :source="sourceList.data"
+      :pagination="sourceList.pagination"
+      :config="config"
+      :loading="loading"
+      highlight-current-row
+      :action-list="[
+        {
+          text: '添加机构',
+          action: () => openModal(),
+        },
+      ]"
+      @get-list="getList">
+    </byTable>
+    <div style="padding: 0 20px 20px 20px; background-color: white">
+      <el-table
+        v-loading="loading"
+        :data="sourceList.data"
+        row-key="deptId"
+        :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
+        default-expand-all>
+        <el-table-column prop="deptName" label="机构名称" min-width="260" />
+        <el-table-column prop="type" label="机构类型" width="100">
+          <template #default="{ row }">
+            <span>{{ dictValueLabel(row.type, typeList) }} </span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="orderNum" label="排序" width="100" />
+        <el-table-column label="创建时间" align="center" prop="createTime" width="200">
+          <template #default="{ row }">
+            <span>{{ row.createTime }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" align="center" width="180">
+          <template #default="{ row }">
+            <el-button link type="primary" @click="getDtl(row)">修改</el-button>
+            <el-button link type="primary" @click="openModal(row.deptId)">添加子项</el-button>
+            <el-button v-if="row.parentId != 0" link type="primary" @click="listDelete(row)">删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+
+    <el-dialog :title="modalType == 'add' ? '添加机构' : '编辑机构'" v-if="dialogVisible" v-model="dialogVisible" width="600" v-loading="loadingDialog">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
+        <template #parentId>
+          <div style="width: 100%">
+            <el-tree-select
+              v-model="formData.data.parentId"
+              :data="sourceList.data"
+              check-strictly
+              :render-after-expand="false"
+              node-key="deptId"
+              :props="defaultProps" />
+          </div>
+        </template>
+        <template #orderNum>
+          <div style="width: 100%">
+            <el-input-number
+              v-model="formData.data.orderNum"
+              placeholder="请输入排序"
+              style="width: 100%"
+              :precision="0"
+              :controls="false"
+              :min="0"
+              :max="99999" />
+          </div>
+        </template>
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitForm()" size="large">确 定</el-button>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import { computed, ref } from "vue";
+import byTable from "@/components/byTable/index";
+import { ElMessage, ElMessageBox } from "element-plus";
+import byForm from "@/components/byForm/index";
+import useUserStore from "@/store/modules/user";
+
+const { proxy } = getCurrentInstance();
+
+const defaultProps = {
+  children: "children",
+  label: "deptName",
+};
+const userList = ref([]);
+const typeList = ref([
+  {
+    label: "公司",
+    value: "0",
+  },
+  {
+    label: "业务中心",
+    value: "1",
+  },
+  {
+    label: "部门",
+    value: "2",
+  },
+  {
+    label: "组",
+    value: "3",
+  },
+]);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 0,
+    pageNum: 1,
+    pageSize: 9999,
+    keyword: "",
+    tenantId: useUserStore().user.tenantId,
+  },
+});
+const loading = ref(false);
+const config = computed(() => {
+  return [];
+});
+const getDict = () => {
+  proxy.get("/tenantUser/list", { pageNum: 1, pageSize: 10000, tenantId: useUserStore().user.tenantId }).then((res) => {
+    userList.value = res.rows.map((item) => {
+      return {
+        label: item.nickName,
+        value: item.userId,
+      };
+    });
+  });
+};
+const getList = async (req) => {
+  if (req) {
+    req.deptName = req.keyword;
+  }
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy.get("/tenantDept/list", sourceList.value.pagination).then((res) => {
+    sourceList.value.data = proxy.handleTree(res.data, "deptId");
+    console.log(sourceList.value.data);
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+  });
+};
+getDict();
+getList();
+const modalType = ref("add");
+const dialogVisible = ref(false);
+const loadingDialog = ref(false);
+const submit = ref(null);
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
+});
+const formData = reactive({
+  data: {},
+});
+const formConfig = computed(() => {
+  return [
+    {
+      type: "slot",
+      prop: "parentId",
+      slotName: "parentId",
+      label: "上级机构",
+    },
+    {
+      type: "input",
+      prop: "deptName",
+      label: "机构名称",
+    },
+    {
+      type: "select",
+      prop: "type",
+      label: "机构类型",
+      data: typeList.value,
+    },
+    {
+      type: "select",
+      prop: "leaderId",
+      label: "负责人",
+      data: userList.value,
+      itemWidth: 50,
+    },
+    {
+      type: "select",
+      prop: "directorId",
+      label: "总监",
+      data: userList.value,
+      itemWidth: 50,
+    },
+    {
+      type: "slot",
+      prop: "orderNum",
+      slotName: "orderNum",
+      label: "部门排序",
+    },
+  ];
+});
+const rules = ref({
+  parentId: [{ required: true, message: "请选择上级机构", trigger: "change" }],
+  deptName: [{ required: true, message: "请输入机构名称", trigger: "blur" }],
+  type: [{ required: true, message: "请选择机构类型", trigger: "change" }],
+  orderNum: [{ required: true, message: "请输入部门排序", trigger: "blur" }],
+});
+const openModal = (val) => {
+  modalType.value = "add";
+  formData.data = {
+    parentId: val || "",
+    tenantId: useUserStore().user.tenantId,
+  };
+  loadingDialog.value = false;
+  dialogVisible.value = true;
+};
+const submitForm = () => {
+  submit.value.handleSubmit(() => {
+    loadingDialog.value = true;
+    const method = modalType.value == "add" ? "POST" : "PUT";
+    if (!formData.data.parentId) formData.data.parentId = 0;
+    proxy.post("/tenantDept", formData.data, method).then(() => {
+      ElMessage({
+        message: modalType.value == "add" ? "添加成功" : "编辑成功",
+        type: "success",
+      });
+      dialogVisible.value = false;
+      getList();
+    });
+  });
+};
+const listDelete = (row) => {
+  ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
+    confirmButtonText: "确定",
+    cancelButtonText: "取消",
+    type: "warning",
+  }).then(() => {
+    proxy.post("/tenantDept/" + row.deptId, {}, "delete").then((res) => {
+      ElMessage({
+        message: "删除成功",
+        type: "success",
+      });
+      getList();
+    });
+  });
+};
+const getDtl = (row) => {
+  formData.data = { ...row };
+  modalType.value = "edit";
+  dialogVisible.value = true;
+};
+</script>
+
+<style lang="scss" scoped>
+.tenant {
+  padding: 20px;
+}
+::v-deep(.el-input-number .el-input__inner) {
+  text-align: left;
+}
+</style>

+ 254 - 0
src/views/systemTenant/tenant/dict/dictTenantDtl.vue

@@ -0,0 +1,254 @@
+<template>
+  <div class="dictTenantDtl">
+    <el-button type="primary" @click="openModal">添加</el-button>
+    <div class="content">
+      <byTable
+        :source="sourceList.data"
+        :pagination="sourceList.pagination"
+        :config="config"
+        :loading="loading"
+        highlight-current-row
+        :hideSearch="true"
+        @get-list="getList">
+        <template #slotName="{ item }">
+          {{ item.createTime }}
+        </template>
+      </byTable>
+    </div>
+    <el-dialog :title="modalType == 'add' ? '新增' : '编辑'" v-model="dialogVisible" width="400" v-loading="loading">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform"> </byForm>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitForm('byform')" size="large" :loading="submitLoading"> 确 定 </el-button>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import { ElMessage, ElMessageBox } from "element-plus";
+import byTable from "@/components/byTable/index";
+import byForm from "@/components/byForm/index";
+import { computed, ref, watch } from "vue";
+import useUserStore from "@/store/modules/user";
+
+const { proxy } = getCurrentInstance();
+const loading = ref(false);
+const submitLoading = ref(false);
+defineProps({
+  data: {
+    type: Object,
+    default: false,
+  },
+});
+watch(proxy.data, (newValue, oldValue) => {
+  getList();
+});
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 3,
+    pageNum: 1,
+    pageSize: 10,
+  },
+});
+let dialogVisible = ref(false);
+let modalType = ref("add");
+let rules = ref({
+  dictKey: [{ required: true, message: "请输入key", trigger: "blur" }],
+  dictValue: [{ required: true, message: "请输入val", trigger: "blur" }],
+  sort: [{ required: true, message: "请输入排序", trigger: "blur" }],
+});
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "键",
+        prop: "dictKey",
+      },
+    },
+    {
+      attrs: {
+        label: "值",
+        prop: "dictValue",
+      },
+    },
+    {
+      attrs: {
+        label: "排序",
+        prop: "sort",
+      },
+    },
+    {
+      attrs: {
+        label: "操作",
+        width: "200",
+        align: "right",
+      },
+      // 渲染 el-button,一般用在最后一列。
+      renderHTML(row) {
+        if (row.type == 2) {
+          return [
+            {
+              attrs: {
+                label: "修改",
+                type: "primary",
+                text: true,
+              },
+              el: "button",
+              click() {
+                getDtl(row);
+              },
+            },
+            {
+              attrs: {
+                label: "删除",
+                type: "primary",
+                text: true,
+              },
+              el: "button",
+              click() {
+                // 弹窗提示是否删除
+                ElMessageBox.confirm("此操作将删除该数据, 是否继续?", "提示", {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning",
+                }).then(() => {
+                  // 删除
+                  proxy
+                    .post("/dictTenantData/delete", {
+                      id: row.id,
+                    })
+                    .then((res) => {
+                      ElMessage({
+                        message: "删除成功",
+                        type: "success",
+                      });
+                      getList();
+                    });
+                });
+              },
+            },
+          ];
+        }
+      },
+    },
+  ];
+});
+
+let formData = reactive({
+  data: {},
+  treeData: [],
+});
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
+});
+const byform = ref(null);
+const formConfig = computed(() => {
+  return [
+    {
+      type: "input",
+      prop: "dictKey",
+      label: "键",
+      required: true,
+    },
+    {
+      type: "input",
+      prop: "dictValue",
+      label: "值",
+    },
+    {
+      label: "排序",
+      prop: "sort",
+      type: "input",
+      itemType: "number",
+    },
+  ];
+});
+const getList = async (req) => {
+  sourceList.value.pagination = {
+    ...sourceList.value.pagination,
+    ...req,
+    dictCode: proxy.data.data.code,
+    tenantId: useUserStore().user.tenantId,
+  };
+  loading.value = true;
+  proxy.post("/dictTenantData/page", sourceList.value.pagination).then((message) => {
+    sourceList.value.data = message.rows;
+    sourceList.value.pagination.total = message.total;
+    console.log(sourceList.value.data);
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+  });
+};
+const openModal = () => {
+  dialogVisible.value = true;
+  modalType.value = "add";
+  formData.data = {};
+};
+
+const submitForm = () => {
+  console.log(byform.value);
+  byform.value.handleSubmit((valid) => {
+    submitLoading.value = true;
+    formData.data.dictCode = proxy.data.data.code;
+    formData.data.tenantId = useUserStore().user.tenantId;
+    proxy
+      .post("/dictTenantData/" + modalType.value, formData.data)
+      .then((res) => {
+        ElMessage({
+          message: modalType.value == "add" ? "添加成功" : "编辑成功",
+          type: "success",
+        });
+        dialogVisible.value = false;
+        submitLoading.value = false;
+        getList();
+      })
+      .catch((err) => {
+        submitLoading.value = false;
+      });
+  });
+};
+
+const getDtl = (row) => {
+  formData.data = { ...row };
+  modalType.value = "edit";
+  dialogVisible.value = true;
+};
+
+const changeStatus = (row) => {
+  modalType.value = "edit";
+  let status = row.status ? 0 : 1;
+  proxy.post("/tenantInfo/detail", { id: row.id }).then((res) => {
+    res.status = status;
+    formData.data = res;
+    ElMessageBox.confirm("你是否确认此操作?", "提示", {
+      confirmButtonText: "确定",
+      cancelButtonText: "取消",
+      type: "warning",
+    }).then(() => {
+      // 删除
+      proxy.post("/tenantInfo/" + modalType.value, formData.data).then((res) => {
+        ElMessage({
+          message: "操作成功",
+          type: "success",
+        });
+        getList();
+      });
+    });
+  });
+};
+getList();
+</script>
+
+<style lang="scss" scoped>
+.dictTenantDtl {
+}
+.tenant {
+  padding: 20px;
+}
+</style>

+ 318 - 0
src/views/systemTenant/tenant/dict/index.vue

@@ -0,0 +1,318 @@
+<template>
+  <div class="user">
+    <byTable
+      :source="sourceList.data"
+      :pagination="sourceList.pagination"
+      :config="config"
+      :loading="loading"
+      highlight-current-row
+      :selectConfig="selectConfig"
+      :action-list="[
+        {
+          text: '添加字典',
+          action: () => openModal('add'),
+        },
+      ]"
+      @get-list="getList">
+      <template #slotName="{ item }">
+        {{ item.createTime }}
+      </template>
+    </byTable>
+
+    <el-dialog :title="modalType == 'add' ? '新增' : '编辑'" v-if="dialogVisible" v-model="dialogVisible" width="500" v-loading="loading">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform"> </byForm>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitForm('byform')" size="large" :loading="submitLoading"> 确 定 </el-button>
+      </template>
+    </el-dialog>
+
+    <el-dialog title="字典维护" v-if="dictCommonModal" v-model="dictCommonModal" width="1000" class="dictCommonModal" v-loading="loading">
+      <dictTenantDtl :data="formData"></dictTenantDtl>
+      <template #footer>
+        <el-button @click="dictCommonModal = false" size="large">关闭</el-button>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import { ElMessage, ElMessageBox } from "element-plus";
+import byTable from "@/components/byTable/index";
+import byForm from "@/components/byForm/index";
+import dictTenantDtl from "./dictTenantDtl.vue";
+import { computed, ref } from "vue";
+import useUserStore from "@/store/modules/user";
+
+const dictCommonModal = ref(false);
+const loading = ref(false);
+const submitLoading = ref(false);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 0,
+    pageNum: 1,
+    pageSize: 10,
+    tenantId: useUserStore().user.tenantId,
+  },
+});
+let dialogVisible = ref(false);
+let modalType = ref("add");
+let rules = ref({
+  code: [{ required: true, message: "请输入字典编码", trigger: "blur" }],
+  name: [{ required: true, message: "请输入字典名称", trigger: "blur" }],
+  status: [{ required: true, message: "请选择字典状态", trigger: "blur" }],
+});
+const { proxy } = getCurrentInstance();
+const selectConfig = computed(() => {
+  return [
+    {
+      label: "字典来源",
+      prop: "type",
+      data: [
+        {
+          label: "业务字典",
+          value: "1",
+        },
+        {
+          label: "自定义字典",
+          value: "2",
+        },
+      ],
+    },
+    {
+      label: "状态",
+      prop: "status",
+      data: [
+        {
+          label: "禁用",
+          value: "0",
+        },
+        {
+          label: "启用",
+          value: "1",
+        },
+      ],
+    },
+  ];
+});
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "字典类型",
+        prop: "type",
+      },
+      render(type) {
+        //1审核中 2审核通过 3审核不通过
+        return type == 2 ? "自定义字典" : "业务字典";
+      },
+    },
+    {
+      attrs: {
+        label: "字典编码",
+      },
+      renderHTML(row) {
+        return [
+          {
+            attrs: {
+              label: row.code,
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              openDtlModal(row);
+            },
+          },
+        ];
+      },
+    },
+    {
+      attrs: {
+        label: "字典名称",
+        prop: "name",
+      },
+    },
+
+    {
+      attrs: {
+        label: "状态",
+        width: 100,
+        prop: "status",
+      },
+      render(status) {
+        //1审核中 2审核通过 3审核不通过
+        return status == 0 ? "禁用" : "启用";
+      },
+    },
+    {
+      attrs: {
+        label: "备注",
+        prop: "remark",
+      },
+    },
+
+    {
+      attrs: {
+        label: "操作",
+        width: "200",
+        align: "right",
+      },
+      // 渲染 el-button,一般用在最后一列。
+      renderHTML(row) {
+        if (row.type == 2) {
+          return [
+            {
+              attrs: {
+                label: "修改",
+                type: "primary",
+                text: true,
+              },
+              el: "button",
+              click() {
+                getDtl(row);
+              },
+            },
+            {
+              attrs: {
+                label: "删除",
+                type: "primary",
+                text: true,
+              },
+              el: "button",
+              click() {
+                // 弹窗提示是否删除
+                ElMessageBox.confirm("此操作将删除该数据, 是否继续?", "提示", {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning",
+                }).then(() => {
+                  // 删除
+                  proxy
+                    .post("/dictTenantType/delete", {
+                      id: row.id,
+                    })
+                    .then((res) => {
+                      ElMessage({
+                        message: "删除成功",
+                        type: "success",
+                      });
+                      getList();
+                    });
+                });
+              },
+            },
+          ];
+        }
+      },
+    },
+  ];
+});
+let formData = reactive({
+  data: {},
+});
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
+});
+const byform = ref(null);
+const formConfig = computed(() => {
+  return [
+    {
+      type: "input",
+      prop: "code",
+      label: "字典编码",
+      required: true,
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "字典名称",
+    },
+    {
+      label: "启用状态",
+      prop: "status",
+      type: "select",
+      data: [
+        {
+          label: "禁用",
+          value: "0",
+        },
+        {
+          label: "启用",
+          value: "1",
+        },
+      ],
+    },
+    {
+      type: "input",
+      prop: "remark",
+      label: "备注",
+      border: true,
+    },
+  ];
+});
+const openDtlModal = (row) => {
+  formData.data = { ...row, tenantId: useUserStore().user.tenantId };
+  dictCommonModal.value = true;
+};
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy.post("/dictTenantType/page", sourceList.value.pagination).then((message) => {
+    sourceList.value.data = message.rows;
+    sourceList.value.pagination.total = message.total;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+  });
+};
+const openModal = () => {
+  dialogVisible.value = true;
+  modalType.value = "add";
+  formData.data = {
+    userType: 1,
+  };
+};
+const submitForm = () => {
+  byform.value.handleSubmit(() => {
+    proxy
+      .post("/dictTenantType/" + (modalType.value == "add" ? "add" : "edit"), {
+        ...formData.data,
+        tenantId: useUserStore().user.tenantId,
+      })
+      .then((res) => {
+        ElMessage({
+          message: modalType.value == "add" ? "添加成功" : "编辑成功",
+          type: "success",
+        });
+        dialogVisible.value = false;
+        getList();
+      });
+  });
+};
+const getDept = () => {
+  proxy.get("/system/user/deptTree").then((res) => {
+    formConfig.value[0].data = res.data;
+  });
+};
+const getDtl = (row) => {
+  formData.data = { ...row };
+  modalType.value = "edit";
+  dialogVisible.value = true;
+};
+getDept();
+getList();
+</script>
+
+<style lang="scss" scoped>
+.dictCommonModal .el-dialog__body {
+  background: #eee;
+}
+.user {
+  padding: 20px;
+}
+</style>

+ 288 - 0
src/views/systemTenant/tenant/role/index.vue

@@ -0,0 +1,288 @@
+<template>
+  <div class="tenant">
+    <byTable
+      :source="sourceList.data"
+      :pagination="sourceList.pagination"
+      :config="config"
+      :loading="loading"
+      highlight-current-row
+      :table-events="{
+        select: select,
+      }"
+      :action-list="[
+        {
+          text: '权限配置',
+          plain: true,
+          action: () => openRoomModal(),
+          disabled: selection.data.length != 1,
+        },
+        {
+          text: '添加角色',
+          action: () => openModal(),
+        },
+      ]"
+      @get-list="getList">
+    </byTable>
+
+    <el-dialog :title="modalType == 'add' ? '添加角色' : '编辑角色'" v-if="dialogVisible" v-model="dialogVisible" width="600" v-loading="loadingDialog">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit"> </byForm>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitForm()" size="large">确 定</el-button>
+      </template>
+    </el-dialog>
+
+    <el-dialog title="权限配置" v-model="roomDialogVisible" width="500" v-loading="loadingDialog">
+      <el-tree :data="treeData" show-checkbox node-key="id" :default-checked-keys="formAuthority.treeData" :props="defaultProps" ref="tree"> </el-tree>
+      <template #footer>
+        <el-button @click="roomDialogVisible = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitTree()" size="large"> 确 定 </el-button>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import { computed, ref } from "vue";
+import byTable from "@/components/byTable/index";
+import { ElMessage, ElMessageBox } from "element-plus";
+import byForm from "@/components/byForm/index";
+import useUserStore from "@/store/modules/user";
+
+const { proxy } = getCurrentInstance();
+const defaultProps = {
+  children: "children",
+  label: "label",
+};
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 0,
+    pageNum: 1,
+    pageSize: 10,
+    keyword: "",
+    tenantId: useUserStore().user.tenantId,
+  },
+});
+const loading = ref(false);
+const config = computed(() => {
+  return [
+    {
+      type: "selection",
+      attrs: {
+        label: "多选",
+        prop: "remark",
+      },
+    },
+    {
+      attrs: {
+        label: "角色编码",
+        prop: "roleKey",
+      },
+    },
+    {
+      attrs: {
+        label: "角色名称",
+        prop: "roleName",
+        align: "left",
+      },
+    },
+    {
+      attrs: {
+        label: "创建时间",
+        prop: "createTime",
+      },
+    },
+    {
+      attrs: {
+        label: "操作",
+        width: "200",
+        align: "right",
+      },
+      renderHTML(row) {
+        return [
+          {
+            attrs: {
+              label: "修改",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              getDtl(row);
+            },
+          },
+          {
+            attrs: {
+              label: "删除",
+              type: "danger",
+              text: true,
+            },
+            el: "button",
+            click() {
+              ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning",
+              }).then(() => {
+                proxy
+                  .post(
+                    "/tenantRole/" + row.roleId,
+                    {
+                      id: row.roleId,
+                    },
+                    "delete"
+                  )
+                  .then((res) => {
+                    ElMessage({
+                      message: "删除成功",
+                      type: "success",
+                    });
+                    getList();
+                  });
+              });
+            },
+          },
+        ];
+      },
+    },
+  ];
+});
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy.get("/tenantRole/list", sourceList.value.pagination).then((res) => {
+    sourceList.value.data = res.rows;
+    sourceList.value.pagination.total = res.total;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+  });
+};
+getList();
+const modalType = ref("add");
+const dialogVisible = ref(false);
+const loadingDialog = ref(false);
+const submit = ref(null);
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
+});
+const formData = reactive({
+  data: {},
+});
+const formConfig = computed(() => {
+  return [
+    {
+      type: "input",
+      prop: "roleKey",
+      label: "角色编码",
+    },
+    {
+      type: "input",
+      prop: "roleName",
+      label: "角色名称",
+    },
+  ];
+});
+const rules = ref({
+  roleKey: [{ required: true, message: "请输入角色编码", trigger: "blur" }],
+  roleName: [{ required: true, message: "请输入角色名称", trigger: "blur" }],
+});
+const openModal = (val) => {
+  modalType.value = "add";
+  formData.data = {
+    tenantId: useUserStore().user.tenantId,
+  };
+  loadingDialog.value = false;
+  dialogVisible.value = true;
+};
+const submitForm = () => {
+  submit.value.handleSubmit(() => {
+    const method = modalType.value == "add" ? "POST" : "PUT";
+    loadingDialog.value = true;
+    proxy.post("/tenantRole", { ...formData.data, roleSort: 1, status: "0" }, method).then(() => {
+      ElMessage({
+        message: modalType.value == "add" ? "添加成功" : "编辑成功",
+        type: "success",
+      });
+      dialogVisible.value = false;
+      getList();
+    });
+  });
+};
+const getDtl = (row) => {
+  formData.data = { ...row };
+  modalType.value = "edit";
+  dialogVisible.value = true;
+};
+let roomDialogVisible = ref(false);
+const treeData = ref([]);
+const formAuthority = reactive({
+  treeData: [],
+});
+const selection = ref({
+  data: [],
+});
+const select = (_selection, row) => {
+  selection.value.data = _selection;
+  console.log(_selection.length);
+};
+const getSubset = (list, data) => {
+  for (let i = 0; i < list.length; i++) {
+    if (list[i].children && list[i].children.length > 0) {
+      getSubset(list[i].children, data);
+    } else {
+      data.push(list[i].id);
+    }
+  }
+  return data;
+};
+const tree = ref(null);
+const openRoomModal = () => {
+  proxy.get("/tenantRole/roleMenuTreeSelect/" + selection.value.data[0].roleId).then((res) => {
+    if (res.code == 200) {
+      treeData.value = res.menus;
+      let data = getSubset(res.menus, []);
+      formAuthority.treeData = res.checkedKeys.filter((item) => {
+        return data.some((i) => item == i);
+      });
+      roomDialogVisible.value = true;
+    }
+  });
+};
+const noRepeat = (arr) => {
+  var newArr = [...new Set(arr)];
+  return newArr;
+};
+const submitTree = () => {
+  let data = noRepeat(tree.value.getHalfCheckedKeys().concat(tree.value.getCheckedKeys()));
+  proxy
+    .post(
+      "/tenantRole",
+      {
+        ...selection.value.data[0],
+        menuIds: data,
+      },
+      "PUT"
+    )
+    .then(() => {
+      ElMessage({
+        message: "保存成功",
+        type: "success",
+      });
+      roomDialogVisible.value = false;
+    });
+};
+</script>
+
+<style lang="scss" scoped>
+.tenant {
+  padding: 20px;
+}
+::v-deep(.el-input-number .el-input__inner) {
+  text-align: left;
+}
+</style>

+ 375 - 0
src/views/systemTenant/tenant/user/index.vue

@@ -0,0 +1,375 @@
+<template>
+  <div class="tenant">
+    <byTable
+      :source="sourceList.data"
+      :pagination="sourceList.pagination"
+      :config="config"
+      :loading="loading"
+      highlight-current-row
+      :action-list="[
+        {
+          text: '添加用户',
+          action: () => openModal(),
+        },
+      ]"
+      @get-list="getList">
+    </byTable>
+
+    <el-dialog :title="modalType == 'add' ? '添加用户' : '编辑用户'" v-if="dialogVisible" v-model="dialogVisible" width="600" v-loading="loadingDialog">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
+        <template #deptId>
+          <div style="width: 100%">
+            <el-tree-select
+              v-model="formData.data.deptId"
+              :data="deptList.data"
+              check-strictly
+              :render-after-expand="false"
+              node-key="deptId"
+              :props="defaultProps" />
+          </div>
+        </template>
+        <template #account>
+          <el-input style="width: 150px; margin-right: 10px" v-model="formData.data.userName" placeholder="请输入用户名"></el-input>
+          <el-input style="width: 150px; margin-right: 10px" v-model="formData.data.password" placeholder="密码"></el-input>
+          <span style="color: #409eff; cursor: pointer" @click="newPassword">随机生成</span>
+        </template>
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitForm()" size="large">确 定</el-button>
+      </template>
+    </el-dialog>
+
+    <el-dialog title="修改密码" v-if="roomDialogVisible" v-model="roomDialogVisible" width="300" v-loading="loading">
+      <template #footer>
+        <el-input v-model="password" type="password" placeholder="请输入新密码" show-password style="margin-bottom: 20px" />
+        <el-button @click="roomDialogVisible = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitPassword(password)" size="large" :loading="submitLoading"> 确 定 </el-button>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import { computed, ref } from "vue";
+import byTable from "@/components/byTable/index";
+import { ElMessage, ElMessageBox } from "element-plus";
+import byForm from "@/components/byForm/index";
+import useUserStore from "@/store/modules/user";
+
+const { proxy } = getCurrentInstance();
+
+const defaultProps = {
+  children: "children",
+  label: "deptName",
+};
+const deptList = ref([]);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 0,
+    pageNum: 1,
+    pageSize: 10,
+    keyword: "",
+    tenantId: useUserStore().user.tenantId,
+  },
+});
+const loading = ref(false);
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "部门",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "姓名",
+        prop: "nickName",
+        align: "left",
+      },
+    },
+    {
+      attrs: {
+        label: "用户名",
+        prop: "userName",
+      },
+    },
+    {
+      attrs: {
+        label: "系统用户",
+        prop: "userType",
+      },
+      render(userType) {
+        return userType == 1 ? "是" : "否";
+      },
+    },
+    {
+      attrs: {
+        label: "手机号",
+        prop: "phonenumber",
+      },
+    },
+    {
+      attrs: {
+        label: "工号",
+        prop: "jobNumber",
+      },
+    },
+    {
+      attrs: {
+        label: "操作",
+        width: "200",
+        align: "right",
+      },
+      renderHTML(row) {
+        return [
+          {
+            attrs: {
+              label: "修改密码",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              userId.value = row.userId;
+              roomDialogVisible.value = true;
+            },
+          },
+          {
+            attrs: {
+              label: "修改",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              if (!sourceList.value.pagination.tenantId) {
+                ElMessage({
+                  message: "请选择租户",
+                  type: "warning",
+                });
+                return;
+              }
+              getDtl(row);
+            },
+          },
+          {
+            attrs: {
+              label: "删除",
+              type: "danger",
+              text: true,
+            },
+            el: "button",
+            click() {
+              ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning",
+              }).then(() => {
+                proxy
+                  .post(
+                    "/tenantUser/" + row.userId,
+                    {
+                      id: row.userId,
+                    },
+                    "delete"
+                  )
+                  .then(() => {
+                    ElMessage({
+                      message: "删除成功",
+                      type: "success",
+                    });
+                    getList();
+                  });
+              });
+            },
+          },
+        ];
+      },
+    },
+  ];
+});
+const getDict = () => {
+  proxy.get("/tenantDept/list", { pageNum: 1, pageSize: 10000, tenantId: useUserStore().user.tenantId }).then((res) => {
+    deptList.value.data = proxy.handleTree(res.data, "deptId");
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+  });
+};
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy.get("/tenantUser/list", sourceList.value.pagination).then((res) => {
+    res.rows.map((item) => {
+      item.deptName = item.dept ? item.dept.deptName : item.dept;
+    });
+    sourceList.value.data = res.rows;
+    sourceList.value.pagination.total = res.total;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+  });
+};
+getDict();
+getList();
+const modalType = ref("add");
+const dialogVisible = ref(false);
+const loadingDialog = ref(false);
+const submit = ref(null);
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
+});
+const formData = reactive({
+  data: {},
+});
+const formConfig = computed(() => {
+  return [
+    {
+      type: "slot",
+      prop: "deptId",
+      slotName: "deptId",
+      label: "部门名称",
+    },
+    {
+      type: "input",
+      prop: "nickName",
+      label: "姓名",
+    },
+    {
+      type: "slot",
+      prop: "userName",
+      slotName: "account",
+      label: "账户信息",
+    },
+    {
+      type: "radio",
+      prop: "userType",
+      label: "系统用户",
+      required: true,
+      disabled: true,
+      border: true,
+      data: [
+        {
+          label: "是",
+          id: 1,
+        },
+        {
+          label: "否",
+          id: 0,
+        },
+      ],
+    },
+    {
+      type: "select",
+      label: "角色",
+      prop: "roleIds",
+      multiple: true,
+      data: [],
+      isLoad: {
+        url: `/tenantRole/list?pageNum=1&pageSize=10000&tenantId=${sourceList.value.pagination.tenantId}`,
+        labelKey: "roleName",
+        labelVal: "roleId",
+        method: "get",
+        resUrl: "rows",
+      },
+    },
+    {
+      type: "input",
+      prop: "phonenumber",
+      label: "手机号",
+      required: true,
+      itemWidth: 50,
+      itemType: "text",
+    },
+    {
+      type: "input",
+      prop: "jobNumber",
+      label: "工号",
+      required: true,
+      itemWidth: 50,
+      itemType: "text",
+    },
+  ];
+});
+const rules = ref({
+  deptId: [{ required: true, message: "请选择部门名称", trigger: "change" }],
+  nickName: [{ required: true, message: "请输入姓名", trigger: "blur" }],
+  userName: [{ required: true, message: "请输入用户名", trigger: "blur" }],
+  roleIds: [{ required: true, message: "请选择角色", trigger: "change" }],
+  phonenumber: [{ required: true, message: "请输入手机号", trigger: "blur" }],
+});
+const openModal = () => {
+  modalType.value = "add";
+  formData.data = {
+    userType: 1,
+    tenantId: useUserStore().user.tenantId,
+  };
+  loadingDialog.value = false;
+  dialogVisible.value = true;
+};
+const submitForm = () => {
+  submit.value.handleSubmit(() => {
+    const method = modalType.value == "add" ? "POST" : "PUT";
+    proxy.post("/tenantUser", formData.data, method).then((res) => {
+      ElMessage({
+        message: modalType.value == "add" ? "添加成功" : "编辑成功",
+        type: "success",
+      });
+      dialogVisible.value = false;
+      getList();
+    });
+  });
+};
+const getDtl = (row) => {
+  formData.data = { ...row };
+  modalType.value = "edit";
+  dialogVisible.value = true;
+};
+const newPassword = () => {
+  formData.data.password = generatePassword();
+};
+const userId = ref('')
+const password = ref("");
+const roomDialogVisible = ref(false);
+const submitPassword = (password1) => {
+  if (!password1) {
+    ElMessage({
+      message: "请输入新密码",
+      type: "warning",
+    });
+    return;
+  }
+  proxy
+    .post(
+      "/tenantUser/resetPwd",
+      {
+        password: password1,
+        userId: userId.value,
+      },
+      "PUT"
+    )
+    .then(() => {
+      ElMessage({
+        message: "重置成功",
+        type: "success",
+      });
+      roomDialogVisible.value = false;
+      password.value = "";
+    });
+};
+</script>
+
+<style lang="scss" scoped>
+.tenant {
+  padding: 20px;
+}
+::v-deep(.el-input-number .el-input__inner) {
+  text-align: left;
+}
+</style>

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff