gy-webcode2 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/components/bar.vue +37 -0
  2. package/components/breadcrumb.vue +127 -0
  3. package/components/javaEditor.vue +88 -0
  4. package/components/sqlEditor.vue +92 -0
  5. package/components/waterfall.vue +484 -0
  6. package/css/common.scss +106 -0
  7. package/css/layout.scss +338 -0
  8. package/css/login.scss +122 -0
  9. package/css/modules/button.scss +2 -0
  10. package/css/modules/color.scss +58 -0
  11. package/css/modules/common.scss +217 -0
  12. package/css/modules/elementUI.scss +426 -0
  13. package/css/modules/form.scss +56 -0
  14. package/css/modules/header.scss +342 -0
  15. package/css/modules/sidebar.scss +214 -0
  16. package/css/modules/table.scss +134 -0
  17. package/css/modules/tabs.scss +54 -0
  18. package/css/modules/tags.scss +149 -0
  19. package/css/modules/tree.scss +120 -0
  20. package/css/modules/tree_check.scss +53 -0
  21. package/css/theme/colors/cheng.scss +17 -0
  22. package/css/theme/colors/default.scss +19 -0
  23. package/css/theme/colors/hong.scss +17 -0
  24. package/css/theme/colors/huang.scss +17 -0
  25. package/css/theme/colors/lv.scss +17 -0
  26. package/css/theme/colors/qing.scss +17 -0
  27. package/css/theme/colors/shenaln.scss +17 -0
  28. package/css/theme/colors/zi.scss +18 -0
  29. package/css/theme/global.scss +8 -0
  30. package/css/theme/styles/default.scss +11 -0
  31. package/css/theme/styles/hailan.scss +11 -0
  32. package/css/theme/styles/shenlan.scss +11 -0
  33. package/css/theme/theme.scss +78 -0
  34. package/extend/axios.js +173 -0
  35. package/extend/formatTime.js +54 -0
  36. package/img/btnActive/1.png +0 -0
  37. package/img/btnActive/2.png +0 -0
  38. package/img/btnActive/3.png +0 -0
  39. package/img/btnActive/4.png +0 -0
  40. package/img/btnActive/5.png +0 -0
  41. package/img/btnActive/6.png +0 -0
  42. package/img/btnActive/7.png +0 -0
  43. package/img/btnActive/8.png +0 -0
  44. package/img/login_bg.jpg +0 -0
  45. package/img/login_bg2.jpg +0 -0
  46. package/img/login_bg2.png +0 -0
  47. package/img/mrtx.jpg +0 -0
  48. package/img/slogan.png +0 -0
  49. package/img/theme/pageStyle_1.png +0 -0
  50. package/img/theme/pageStyle_2.png +0 -0
  51. package/img/theme/pageStyle_3.png +0 -0
  52. package/index.js +17 -0
  53. package/jsconfig.json +19 -0
  54. package/package.json +15 -0
  55. package/plugins/jsencrypt.js +5370 -0
  56. package/plugins/jsencrypt.min.js +1 -0
  57. package/plugins/swiper-4.5.3/css/swiper.css +619 -0
  58. package/plugins/swiper-4.5.3/css/swiper.min.css +12 -0
  59. package/plugins/swiper-4.5.3/js/swiper.esm.bundle.js +7184 -0
  60. package/plugins/swiper-4.5.3/js/swiper.esm.js +7166 -0
  61. package/plugins/swiper-4.5.3/js/swiper.js +8149 -0
  62. package/plugins/swiper-4.5.3/js/swiper.min.js +13 -0
  63. package/plugins/swiper-4.5.3/js/swiper.min.js.map +1 -0
  64. package/scripts/$u.mixin.js +27 -0
  65. package/scripts/crypto.js +184 -0
  66. package/scripts/jsencrypt.js +180 -0
  67. package/scripts/md5.js +259 -0
  68. package/scripts/numberAnimate.js +134 -0
  69. package/scripts/uuid.js +33 -0
  70. package/updateLog.txt +0 -0
@@ -0,0 +1,37 @@
1
+ <template>
2
+ <div class="wrapper_bar">
3
+ <el-scrollbar style="height:calc(100% - 17px);">
4
+ <div :style="`height:100%;padding:${top} ${right} ${bottom} ${left}`">
5
+ <slot></slot>
6
+ </div>
7
+ </el-scrollbar>
8
+ </div>
9
+ </template>
10
+
11
+ <script>
12
+ export default {
13
+ props: {
14
+ left: {
15
+ default: "0"
16
+ },
17
+ right: {
18
+ default: "0"
19
+ },
20
+ top: {
21
+ default: "0"
22
+ },
23
+ bottom: {
24
+ default: "0"
25
+ }
26
+ },
27
+ created() {
28
+ // console.log(this.left)
29
+ }
30
+ };
31
+ </script>
32
+
33
+ <style>
34
+ .wrapper_bar .el-scrollbar__wrap {
35
+ overflow-x: auto;
36
+ }
37
+ </style>
@@ -0,0 +1,127 @@
1
+ <template>
2
+ <div class="breadcrumb">
3
+ <div class="row1">
4
+ <div class="title ">
5
+ <span class="">{{headerName}}</span>
6
+ <span class="iconBox">
7
+ <i class="el-icon-arrow-right"></i>
8
+ </span>
9
+ <span @click="menuClick" :class="{myHover:breadcrumb_list.length,s1:breadcrumb_list.length == 0}" >
10
+ {{$store.state.menu.menuActive.name}}
11
+ </span>
12
+ <template v-for="item,index in breadcrumb_list">
13
+ <span class="iconBox">
14
+ <i class="el-icon-arrow-right"></i>
15
+ </span>
16
+ <span :class="{hover2:index < breadcrumb_list.length -1,s1:index == breadcrumb_list.length -1}" @click="itemClick(item,index)">
17
+ {{item.name}}
18
+ </span>
19
+ <!-- v-if="index < breadcrumb_list.length -1" -->
20
+ <!-- <span v-else >
21
+ {{item.name}}
22
+ </span> -->
23
+ </template>
24
+ </div>
25
+
26
+ </div>
27
+ <div class="pageHeader" v-if="pageHeaderShow">
28
+ <div class="name">
29
+ <span :class="{myHover:breadcrumb_list.length}" @click="backClick()">
30
+ <template v-if="breadcrumb_list.length">
31
+ <i class="el-icon-arrow-left"></i>
32
+ {{breadcrumb_list[breadcrumb_list.length -1].name}}
33
+ </template>
34
+ <template v-else>
35
+ {{$store.state.menu.menuActive.name}}
36
+ </template>
37
+ </span>
38
+ </div>
39
+ <div>
40
+ <slot name="other"></slot>
41
+ </div>
42
+ </div>
43
+ </div>
44
+ </template>
45
+
46
+ <script>
47
+ export default {
48
+ // props:['name','showBack','goBack','pageHeaderShow'],
49
+ props:{
50
+ name:{
51
+ type:String,
52
+ default:""
53
+ },
54
+ pageHeaderShow:{
55
+ type:Boolean,
56
+ default:true,
57
+ },
58
+ },
59
+ computed:{
60
+ activePath() {
61
+ return this.$store.state.menu.activePath
62
+ },
63
+ headerName() {
64
+ const list = this.$store.state.menu.data[0] || [];
65
+ let isFind = list.list.find((item2,index2) => {
66
+ if(index2 == this.activePath && item2.ismy == 1){
67
+ return true;
68
+ }
69
+ })
70
+ if(isFind){
71
+ return isFind.name
72
+ }
73
+ return ''
74
+ },
75
+ names(){
76
+ return this.name ? this.name.split(',') : []
77
+ },
78
+ breadcrumb_list(){
79
+ return this.$store.state.menu.breadcrumb_list;
80
+ }
81
+
82
+ },
83
+ created(){
84
+ let breadcrumb_list = this.$store.state.menu.breadcrumb_list;
85
+ if(this.names.length){
86
+ this.names.forEach(item => {
87
+ breadcrumb_list.push({
88
+ name:item,
89
+ click:this.backClick
90
+ })
91
+ })
92
+ }
93
+ },
94
+ methods:{
95
+ backClick(){
96
+ // if(this.showBack){
97
+ this.$emit('goBack');
98
+ // }
99
+ },
100
+ itemClick(data,index){
101
+ if(index < this.breadcrumb_list.length -1){
102
+ this.breadcrumb_list[index + 1].click()
103
+ }
104
+ },
105
+ menuClick(){
106
+ if(this.breadcrumb_list.length){
107
+ this.breadcrumb_list[0].click()
108
+ }
109
+ }
110
+ },
111
+ beforeDestroy(){
112
+ let breadcrumb_list = this.$store.state.menu.breadcrumb_list;
113
+ if(this.names.length){
114
+ this.names.forEach(item => {
115
+ let isFind = breadcrumb_list.findIndex(i => i.name == item)
116
+ if(isFind > -1){
117
+ breadcrumb_list.splice(isFind,1)
118
+ }
119
+ })
120
+ }
121
+ }
122
+ }
123
+ </script>
124
+
125
+ <style>
126
+
127
+ </style>
@@ -0,0 +1,88 @@
1
+ <template>
2
+ <div class="pa" style="border:1px solid #ccc;left:0;right:0;top:0;bottom:0;">
3
+ <textarea ref="mycode" class="codesql" ></textarea>
4
+ </div>
5
+ </template>
6
+
7
+ <script>
8
+
9
+
10
+ import CodeMirror from "codemirror/lib/codemirror";
11
+ import "codemirror/addon/edit/matchbrackets";
12
+ import "codemirror/mode/clike/clike";
13
+ export default {
14
+ props:['code',"refresh",'autofocus'],
15
+ data(){
16
+ return {
17
+ // code: '//按Ctrl键进行代码提示',
18
+ editor:null,
19
+ editCode:"",
20
+ }
21
+ },
22
+ created(){
23
+ // console.log(this.code);
24
+ },
25
+ watch:{
26
+ code(val){
27
+ this.editor.setValue(this.code)
28
+ },
29
+ refresh(val){
30
+ if(val){
31
+ this.editor.refresh()
32
+ }
33
+ }
34
+ },
35
+ mounted(){
36
+ this.init();
37
+ },
38
+ methods:{
39
+ init(){
40
+ let mime = 'text/x-java'
41
+ let theme = 'ambiance'//设置主题,不设置的会使用默认主题
42
+ this.editor = CodeMirror.fromTextArea(this.$refs.mycode, {
43
+ mode: mime,//选择对应代码编辑器的语言,我这边选的是数据库,根据个人情况自行设置即可
44
+ indentWithTabs: true,
45
+ smartIndent: true,
46
+ lineNumbers: true,
47
+ matchBrackets: true,
48
+ // theme: theme,
49
+ autofocus: this.autofocus,
50
+ extraKeys: {'Ctrl': 'autocomplete'},//自定义快捷键
51
+ hintOptions: {//自定义提示选项
52
+ tables: {
53
+ users: ['name', 'score', 'birthDate'],
54
+ countries: ['name', 'population', 'size']
55
+ }
56
+ }
57
+ })
58
+ //代码自动提示功能,记住使用cursorActivity事件不要使用change事件,这是一个坑,那样页面直接会卡死
59
+ // this.editor.on('cursorActivity', () =>{
60
+ // this.$emit('update:code',this.editor.getValue())
61
+ // // editor.showHint()
62
+ // })
63
+ this.editor.setSize('100%', '100%');
64
+ if(this.code){
65
+ this.editor.setValue(this.code)
66
+
67
+ }
68
+ },
69
+ getNewCode(){
70
+ return this.editor.getValue();
71
+ },
72
+ getContent(){
73
+ return this.editor.getValue();
74
+ },
75
+ setValue(val){
76
+ this.editor.setValue(val)
77
+ },
78
+ getValue(){
79
+ return this.editor.getValue();
80
+ }
81
+ }
82
+ }
83
+ </script>
84
+ <style lang="scss" scoped>
85
+ @import "~codemirror/theme/ambiance.css";
86
+ @import "~codemirror/lib/codemirror.css";
87
+ </style>
88
+
@@ -0,0 +1,92 @@
1
+ <template>
2
+ <div class="pa" style="border:1px solid #ccc;left:0;right:0;top:0;bottom:0;">
3
+ <textarea ref="mycode" class="codesql" ></textarea>
4
+ </div>
5
+ </template>
6
+
7
+ <script>
8
+
9
+
10
+ import CodeMirror from "codemirror/lib/codemirror";
11
+ import "codemirror/addon/edit/matchbrackets";
12
+ import "codemirror/addon/selection/active-line";
13
+ import "codemirror/mode/sql/sql";
14
+ import "codemirror/addon/hint/show-hint";
15
+ import "codemirror/addon/hint/sql-hint";
16
+ export default {
17
+ props:['code',"refresh" ,'autofocus'],
18
+ data(){
19
+ return {
20
+ // code: '//按Ctrl键进行代码提示',
21
+ editor:null,
22
+ editCode:"",
23
+ }
24
+ },
25
+ created(){
26
+ // this.editor.replaceSelection(val) //插入代码函数
27
+ },
28
+ watch:{
29
+ code(val){
30
+ this.editor.setValue(this.code)
31
+ },
32
+ refresh(val){
33
+ if(val){
34
+ this.editor.refresh()
35
+ }
36
+ }
37
+ },
38
+ mounted(){
39
+ this.init();
40
+ },
41
+ methods:{
42
+ init(){
43
+ let mime = 'text/x-sql'
44
+ let theme = 'ambiance'//设置主题,不设置的会使用默认主题
45
+ this.editor = CodeMirror.fromTextArea(this.$refs.mycode, {
46
+ mode: mime,//选择对应代码编辑器的语言,我这边选的是数据库,根据个人情况自行设置即可
47
+ indentWithTabs: true,
48
+ smartIndent: true,
49
+ lineNumbers: true,
50
+ matchBrackets: true,
51
+ // theme: theme,
52
+ autofocus: this.autofocus,
53
+ extraKeys: {'Ctrl': 'autocomplete'},//自定义快捷键
54
+ hintOptions: {//自定义提示选项
55
+ tables: {
56
+ users: ['name', 'score', 'birthDate'],
57
+ countries: ['name', 'population', 'size']
58
+ }
59
+ }
60
+ })
61
+ //代码自动提示功能,记住使用cursorActivity事件不要使用change事件,这是一个坑,那样页面直接会卡死
62
+ // this.editor.on('cursorActivity', () =>{
63
+ // this.$emit('update:code',this.editor.getValue())
64
+ // // editor.showHint()
65
+ // })
66
+ this.editor.setSize('100%', '100%');
67
+ if(this.code){
68
+ this.editor.setValue(this.code)
69
+
70
+ }
71
+ },
72
+ getNewCode(){
73
+ return this.editor.getValue();
74
+ },
75
+ getContent(){
76
+ return this.editor.getValue();
77
+ },
78
+ setValue(val){
79
+ this.editor.setValue(val)
80
+ },
81
+ getValue(){
82
+ return this.editor.getValue();
83
+ }
84
+ }
85
+ }
86
+ </script>
87
+ <style lang="scss" scoped>
88
+ @import "~codemirror/theme/ambiance.css";
89
+ @import "~codemirror/lib/codemirror.css";
90
+ @import "~codemirror/addon/hint/show-hint.css";
91
+ </style>
92
+