system-clients 3.1.89-20 → 3.1.89-20-rongchuang-1

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 (199) hide show
  1. package/.babelrc +5 -5
  2. package/.editorconfig +9 -9
  3. package/.eslintrc.js +16 -16
  4. package/.gradle/6.8/executionHistory/executionHistory.bin +0 -0
  5. package/.gradle/6.8/executionHistory/executionHistory.lock +0 -0
  6. package/.gradle/6.8/fileChanges/last-build.bin +0 -0
  7. package/.gradle/6.8/fileHashes/fileHashes.bin +0 -0
  8. package/.gradle/6.8/fileHashes/fileHashes.lock +0 -0
  9. package/.gradle/{buildOutputCleanup/built.bin → 6.8/gc.properties} +0 -0
  10. package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  11. package/.gradle/buildOutputCleanup/cache.properties +2 -2
  12. package/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  13. package/.gradle/checksums/checksums.lock +0 -0
  14. package/.gradle/configuration-cache/gc.properties +0 -0
  15. package/CHANGELOG.md +51 -51
  16. package/README.md +36 -36
  17. package/SystemClient.iml +11 -11
  18. package/build/css-loaders.js +34 -34
  19. package/build/dev-client.js +8 -8
  20. package/build/example-server.js +80 -80
  21. package/build/release.sh +28 -28
  22. package/build/utils.js +71 -71
  23. package/build/webpack.base.conf.js +75 -75
  24. package/build/webpack.dev.conf.js +31 -31
  25. package/build/webpack.example.conf.js +49 -49
  26. package/build/webpack.prod.conf.js +60 -60
  27. package/build/webpack.test.conf.js +31 -31
  28. package/build.gradle +6 -6
  29. package/config/dev.env.js +6 -6
  30. package/config/index.js +38 -38
  31. package/config/prod.env.js +3 -3
  32. package/config/test.env.js +6 -6
  33. package/doc/Login.md +7 -7
  34. package/examples/ReadCard/App.vue +23 -23
  35. package/examples/ReadCard/index.html +11 -11
  36. package/examples/ReadCard/main.js +12 -12
  37. package/gradle/wrapper/gradle-wrapper.jar +0 -0
  38. package/gradle/wrapper/gradle-wrapper.properties +5 -0
  39. package/gradlew +185 -0
  40. package/gradlew.bat +89 -0
  41. package/index.html +21 -21
  42. package/package.json +1 -1
  43. package/release.bat +5 -5
  44. package/src/App.vue +24 -24
  45. package/src/LodopFuncs.js +123 -123
  46. package/src/assets/binding.svg +1 -1
  47. package/src/assets/unbind.svg +1 -1
  48. package/src/assets//345/205/254/345/221/212.svg +1 -1
  49. package/src/assets//347/207/203/346/260/224/347/274/264/350/264/271.eps +116 -116
  50. package/src/assets//350/201/224/347/263/273/346/210/221/344/273/254.svg +1 -1
  51. package/src/components/List.vue +51 -51
  52. package/src/components/Main.vue +676 -589
  53. package/src/components/Table.js +74 -74
  54. package/src/components/Util.js +343 -343
  55. package/src/components/equipment/EquipmentManage.vue +65 -65
  56. package/src/components/equipment/PcAdd.vue +105 -105
  57. package/src/components/equipment/PcList.vue +119 -119
  58. package/src/components/equipment/PcManage.vue +60 -60
  59. package/src/components/equipment/PhoneAdd.vue +94 -94
  60. package/src/components/equipment/PhoneList.vue +102 -102
  61. package/src/components/equipment/PhoneManage.vue +60 -60
  62. package/src/components/equipment/PosAdd.vue +299 -299
  63. package/src/components/equipment/PosList.vue +254 -254
  64. package/src/components/equipment/PosManage.vue +150 -150
  65. package/src/components/materialManage/materialData.vue +44 -44
  66. package/src/components/materialManage/materialList.vue +255 -255
  67. package/src/components/parammanage/ParamManage.vue +42 -42
  68. package/src/components/parammanage/ParamManages.vue +43 -43
  69. package/src/components/parammanage/ParamPages.vue +222 -222
  70. package/src/components/parammanage/SinglePages.vue +167 -167
  71. package/src/components/server/AddChangeMsg.vue +66 -66
  72. package/src/components/server/ChangeDeclare.vue +45 -45
  73. package/src/components/server/IconTree.vue +26 -26
  74. package/src/components/server/ImageVieweTest.vue +56 -56
  75. package/src/components/server/ImageViewer.vue +350 -350
  76. package/src/components/server/LeftTree.vue +111 -111
  77. package/src/components/server/LoadData.vue +36 -36
  78. package/src/components/server/Menu.vue +188 -188
  79. package/src/components/server/ModifyPw.vue +106 -106
  80. package/src/components/server/ResSelect.vue +155 -155
  81. package/src/components/server/ResSelectGroup.vue +196 -196
  82. package/src/components/server/RightTree.vue +348 -348
  83. package/src/components/server/RoleSelector.vue +88 -88
  84. package/src/components/server/TestResSelect.vue +58 -58
  85. package/src/components/server/TestResSelectGroup.vue +388 -388
  86. package/src/components/server/TestRightTree.vue +42 -42
  87. package/src/index.js +7 -7
  88. package/src/plugins/GetLoginInfoService.js +4 -2
  89. package/src/plugins/HeatGetLoginInfoService.js +491 -491
  90. package/src/plugins/validation.js +7 -7
  91. package/src/project/ProjectPage.vue +24 -24
  92. package/src/project/State.js +17 -17
  93. package/src/stores/AppData.js +38 -38
  94. package/src/stores/HeatAppData.js +38 -38
  95. package/src/styles/fonts/glyphicons-halflings-regular.svg +287 -287
  96. package/src/styles/less/.csscomb.json +304 -304
  97. package/src/styles/less/.csslintrc +19 -19
  98. package/src/styles/less/alerts.less +73 -73
  99. package/src/styles/less/aofeng/animate.min.css +10 -10
  100. package/src/styles/less/aofeng/expandcss.less +569 -569
  101. package/src/styles/less/aofeng/themeOne/loginStyle.less +1586 -1586
  102. package/src/styles/less/aofeng/themeOne/systemStyle.less +2650 -2650
  103. package/src/styles/less/aofeng/themeOne.less +17 -17
  104. package/src/styles/less/aofeng/themeTwo/newStyle1.less +415 -415
  105. package/src/styles/less/aofeng/themeTwo.less +3 -3
  106. package/src/styles/less/badges.less +66 -66
  107. package/src/styles/less/bootstrap.less +66 -66
  108. package/src/styles/less/breadcrumbs.less +26 -26
  109. package/src/styles/less/button-groups.less +247 -247
  110. package/src/styles/less/buttons.less +172 -172
  111. package/src/styles/less/carousel.less +269 -269
  112. package/src/styles/less/close.less +34 -34
  113. package/src/styles/less/code.less +69 -69
  114. package/src/styles/less/component-animations.less +33 -33
  115. package/src/styles/less/dropdowns.less +216 -216
  116. package/src/styles/less/fonts-list.less +25 -25
  117. package/src/styles/less/forms.less +626 -626
  118. package/src/styles/less/glyphicons.less +305 -305
  119. package/src/styles/less/grid.less +84 -84
  120. package/src/styles/less/input-groups.less +167 -167
  121. package/src/styles/less/jumbotron.less +52 -52
  122. package/src/styles/less/labels.less +64 -64
  123. package/src/styles/less/list-group.less +141 -141
  124. package/src/styles/less/manageStyle/manageChile.less +180 -180
  125. package/src/styles/less/manageStyle/manageStyle.less +1102 -1102
  126. package/src/styles/less/manageStyle/safeStyle.less +498 -498
  127. package/src/styles/less/media.less +66 -66
  128. package/src/styles/less/mixins/alerts.less +14 -14
  129. package/src/styles/less/mixins/background-variant.less +9 -9
  130. package/src/styles/less/mixins/border-radius.less +18 -18
  131. package/src/styles/less/mixins/buttons.less +69 -69
  132. package/src/styles/less/mixins/center-block.less +7 -7
  133. package/src/styles/less/mixins/clearfix.less +22 -22
  134. package/src/styles/less/mixins/forms.less +90 -90
  135. package/src/styles/less/mixins/gradients.less +59 -59
  136. package/src/styles/less/mixins/grid-framework.less +92 -92
  137. package/src/styles/less/mixins/grid.less +122 -122
  138. package/src/styles/less/mixins/hide-text.less +21 -21
  139. package/src/styles/less/mixins/image.less +33 -33
  140. package/src/styles/less/mixins/labels.less +12 -12
  141. package/src/styles/less/mixins/list-group.less +30 -30
  142. package/src/styles/less/mixins/nav-divider.less +10 -10
  143. package/src/styles/less/mixins/nav-vertical-align.less +9 -9
  144. package/src/styles/less/mixins/opacity.less +8 -8
  145. package/src/styles/less/mixins/pagination.less +24 -24
  146. package/src/styles/less/mixins/panels.less +24 -24
  147. package/src/styles/less/mixins/progress-bar.less +10 -10
  148. package/src/styles/less/mixins/reset-filter.less +8 -8
  149. package/src/styles/less/mixins/reset-text.less +18 -18
  150. package/src/styles/less/mixins/resize.less +6 -6
  151. package/src/styles/less/mixins/responsive-visibility.less +15 -15
  152. package/src/styles/less/mixins/size.less +10 -10
  153. package/src/styles/less/mixins/tab-focus.less +9 -9
  154. package/src/styles/less/mixins/table-row.less +44 -44
  155. package/src/styles/less/mixins/text-emphasis.less +9 -9
  156. package/src/styles/less/mixins/text-overflow.less +8 -8
  157. package/src/styles/less/mixins/vendor-prefixes.less +227 -227
  158. package/src/styles/less/mixins.less +40 -40
  159. package/src/styles/less/modals.less +151 -151
  160. package/src/styles/less/navbar.less +660 -660
  161. package/src/styles/less/navs.less +285 -285
  162. package/src/styles/less/normalize.less +424 -424
  163. package/src/styles/less/pager.less +76 -76
  164. package/src/styles/less/pagination.less +89 -89
  165. package/src/styles/less/panels.less +275 -275
  166. package/src/styles/less/popovers.less +131 -131
  167. package/src/styles/less/print.less +101 -101
  168. package/src/styles/less/progress-bars.less +87 -87
  169. package/src/styles/less/responsive-embed.less +35 -35
  170. package/src/styles/less/responsive-utilities.less +194 -194
  171. package/src/styles/less/scaffolding.less +161 -161
  172. package/src/styles/less/stand.less +207 -207
  173. package/src/styles/less/theme.less +291 -291
  174. package/src/styles/less/thumbnails.less +36 -36
  175. package/src/styles/less/tooltip.less +102 -102
  176. package/src/styles/less/utilities.less +55 -55
  177. package/src/styles/less/wells.less +29 -29
  178. package/src/system.js +87 -87
  179. package/src/systemphone.js +11 -11
  180. package/src/util/LdapHelper.js +75 -75
  181. package/test/e2e/custom-assertions/elementCount.js +26 -26
  182. package/test/e2e/nightwatch.conf.js +40 -40
  183. package/test/e2e/runner.js +30 -30
  184. package/test/e2e/specs/test.js +14 -14
  185. package/test/unit/.eslintrc +5 -5
  186. package/test/unit/index.js +13 -13
  187. package/test/unit/init.js +10 -10
  188. package/test/unit/karma.conf.js +49 -49
  189. package/test/unit/specs/base64.spec.js +5 -5
  190. package/test/unit/specs/components/parammanage/ParamPage.spec.js +20 -20
  191. package/test/unit/specs/components/parammanage/SinglePage.spec.js +20 -20
  192. package/test/unit/specs/components/server/LeftTree/App.vue +18 -18
  193. package/test/unit/specs/components/server/LeftTree/LeftTree.spec.js +22 -22
  194. package/test/unit/specs/components/server/LoadData.spec.js +24 -24
  195. package/test/unit/specs/components/server/Login.spec.js +61 -61
  196. package/test/unit/specs/components/server/RightTree.spec.js +50 -50
  197. package/test/unit/specs/plugins/GetLoginInfoService.spec.js +55 -55
  198. package/test/unit/test.html +76 -76
  199. package/.gradle/buildOutputCleanup/cache.properties.lock +0 -1
@@ -1,589 +1,676 @@
1
- <template>
2
- <div @click="hindsetting1()" :class="{'with-watermark':showwatermakeflag}">
3
- <!-- <div class="system-main" id="box" v-el:box v-if="!isManger">-->
4
- <!-- <div class="system-logo" style="height: auto">-->
5
- <!-- <img :src="imgs.logoimg" alt=""/>-->
6
- <!-- <label>{{systemname}}</label>-->
7
- <!-- <div class="system-logo-chi" >-->
8
- <!-- <div v-if="userpane" class="auto system-logo-prompt" style="float: right">-->
9
- <!-- <span>{{orgpathnames}}</span>-->
10
- <!-- </div>-->
11
- <!-- &lt;!&ndash;<div class="system-logo-chi-img1" style="float: right" @mouseenter="mouseenteruser()" @mouseleave="mouseleaveuser()"></div>&ndash;&gt;-->
12
- <!-- <span style="float: right; padding-top: 2px" @mouseenter="mouseenteruser()" @mouseleave="mouseleaveuser()" class="system-logo-chi-span-1">{{$login.f.name}}</span>-->
13
- <!-- <span style="border-left: 1px solid;float: right;padding-top: 2px" class="system-logo-chi-span-1"> <img src="../../static/newStyle/login-f.png" height="20" width="20"> </span>-->
14
- <!-- <a href="index.html" onclick="return confirm('您确定要退出系统吗?');" style="float: right;padding-top: 2px">-->
15
- <!-- <img src="../../static/newStyle/system-off.png" alt="" >-->
16
- <!-- <span class="system-logo-chi-span-1">退出系统</span>-->
17
- <!-- </a>-->
18
- <!-- <div style="float: right" :class="{'dropstyle':setting,'dropstyle-1':!setting}">-->
19
- <!-- <dropdown class="auto" >-->
20
- <!-- <span data-toggle="dropdown" @click="hindsetting()" >-->
21
- <!-- <img :src="srcsetting" alt=""><span>系统设置</span>-->
22
- <!-- </span>-->
23
- <!-- <ul slot="dropdown-menu" class="dropdown-menu dropdown-menu-up dropstyle-chi" >-->
24
- <!-- &lt;!&ndash; <li>系统信息及设置</li>&ndash;&gt;-->
25
- <!-- <li style="color: #ffffff;white-space: nowrap" @click="show=true">修改密码</li>-->
26
- <!-- <li style="color: #ffffff;white-space: nowrap" @click="AddChangeMsgShow=true">系统版本</li>-->
27
- <!-- </ul>-->
28
- <!-- </dropdown>-->
29
- <!-- </div>-->
30
-
31
- <!-- </div>-->
32
- <!-- </div>-->
33
- <!-- <div class="system-left tree-flex" :class="{'system-left-1': !treeOrIcon}" id="top" v-el:top >-->
34
- <!-- <div class="system-left-chi" :class="{'system-left-icon': !treeOrIcon}" >-->
35
- <!-- <div class="span system-left-tree" >-->
36
- <!-- <left-tree :functions='functions.functions' :userid='userid' @isnodo="isnodo" :treeOrIcon="treeOrIcon" :tabs="tabs" v-ref:tree></left-tree>-->
37
- <!-- &lt;!&ndash; <icon-tree :functions='functions.functions' :userid='userid' v-show="!treeOrIcon"></icon-tree>&ndash;&gt;-->
38
- <!-- </div>-->
39
- <!-- </div>-->
40
- <!-- <div class="system-foot-stretch" >-->
41
- <!-- <a @click="changeShow()"><img src="../../static/images/lefticon/菜单伸缩.png" alt=""></a>-->
42
- <!-- </div>-->
43
- <!-- </div>-->
44
-
45
-
46
- <!-- <div class="system-right" :class="{'system-right-1': !treeOrIcon}" id="bottom" v-el:bottom>-->
47
- <!-- <div class="span">-->
48
- <!-- <echarts-box v-if="$refs.mic.tabs.length === 0"></echarts-box>-->
49
- <!-- <dynamic :comps='[]' :showup="true" :showhide="false" name='main' :selecttab.sync="selecttab" @tab-changed="tabChange" @tabscg="tabcg" v-ref:mic v-show="!($refs.mic.tabs.length === 0)"></dynamic>-->
50
- <!-- </div>-->
51
- <!-- </div>-->
52
- <!-- <div class="system-foot" v-el:bottom>-->
53
-
54
- <!-- <div class="system-foot-box">-->
55
-
56
- <!-- </div>-->
57
- <!-- </div>-->
58
- <!-- </div>-->
59
- <div class='flex-row system-main' id="box" v-el:box v-if="!isManger">
60
- <div class="auto " :class="{'login-operator1':$refs.mic.tabs.length === 0,'login-operator':$refs.mic.tabs.length != 0}">
61
- <span>
62
- <img
63
- src="../assets/people.png" height="15" width="15">
64
- 登录人:</span>
65
- <label>{{orgpathnames}}</label>
66
- </div>
67
- <div class="system-left tree-flex" :class="{'tree-flex-icon': !treeOrIcon}" id="top" v-el:top >
68
- <div class="system-left-chi" :class="{'system-left-icon': !treeOrIcon}" >
69
- <div class="span system-left-tree " style="height:85%">
70
- <h3>{{systemname}}</h3>
71
- <!-- <div class="span" style="margin-bottom:10px;padding-bottom:5px;padding-top:5px;flex: 1;border-top: 1px solid #e5e5e5;border-bottom: 1px solid #e5e5e5;">-->
72
- <left-tree :functions='functions.functions' :userid='userid' @isnodo="isnodo" v-show="treeOrIcon" :tabs="tabs" v-ref:tree></left-tree>
73
- <!--&lt;!&ndash; <icon-tree :functions='functions.functions' :userid='userid' v-show="!treeOrIcon"></icon-tree>&ndash;&gt;-->
74
- </div>
75
-
76
- <div class="tree-flex-footer">
77
- <!-- <a @click="changeShow()"><img :src="imgs.open" alt=""><span v-if="treeOrIcon">菜单伸缩</span></a>-->
78
- <!-- <a><img src="../../../static/treeset.png" alt="">系统设置</a> -->
79
- <dropdown class="auto">
80
- <button type="button" data-toggle="dropdown">
81
- <img :src="imgs.set" alt=""><span v-if="treeOrIcon">系统设置</span>
82
- </button>
83
- <ul slot="dropdown-menu" class="dropdown-menu dropdown-menu-up">
84
- <li>系统信息及设置</li>
85
- <!-- <li>{{name}}</li> -->
86
- <li>{{date}}</li>
87
- <li @click="show=true">修改密码</li>
88
- <li @click="AddChangeMsgShow=true">系统版本:1.0.0</li>
89
- </ul>
90
-
91
- </dropdown>
92
- <a href="index.html" @click.prevent="logOut">
93
- <img :src="imgs.out" alt="" ><span v-if="treeOrIcon">退出系统</span>
94
- </a>
95
- </div>
96
- </div>
97
- </div>
98
- <!-- <div class="line" id="line" v-show="treeOrIcon" v-el:line></div> -->
99
-
100
- <div class="flex right-bg system-right" id="bottom" v-el:bottom>
101
- <!-- <operator-badge></operator-badge> -->
102
- <div class="span">
103
- <echarts-box v-if="$refs.mic.tabs.length === 0"></echarts-box>
104
- <dynamic :comps='[]' name='main' :selecttab.sync="selecttab" @tab-changed="tabChange" @tabscg="tabcg" v-ref:mic v-show="!($refs.mic.tabs.length === 0)"></dynamic>
105
- </div>
106
- </div>
107
- </div>
108
- <div v-show="isManger">
109
- <route v-ref:route></route>
110
- </div>
111
-
112
- <!-- 变更录入 模态框 -->
113
- <add-changemsg :show="AddChangeMsgShow" v-on:toggle = "AddChangeMsgShow = false"></add-changemsg>
114
- <!-- 修改密码组件 -->
115
- <modify-pw :show.sync="show" v-if="show"></modify-pw>
116
- <!-- 修改密码模态框 -->
117
- </div>
118
- </template>
119
-
120
- <script>
121
- import vue from 'vue'
122
- import co from 'co'
123
-
124
- let getwartermakr = async function(self){
125
- let param = {
126
- tablename:'t_singlevalue',
127
- condition: " 1=1 and name=\'水印内容\'"
128
- };
129
- let result =await self.$resetpost('rs/sql/saleSingleTable',{data:param},{resolveMsg: null, rejectMsg: null});
130
- if(result && result.data.length>0){
131
- self.showwatermakeflag = true;
132
- createWaterMark(result.data[0].value);
133
- }else{
134
- self.showwatermakeflag = false;
135
- }
136
- }
137
-
138
- let createWaterMark = function(userName){
139
- let style;
140
- if (style) style.remove();
141
- let width = window.parseInt(document.body.clientWidth);
142
- let canvasWidth = width / window.parseInt(width / 320);
143
- let fontFamily = window.getComputedStyle(document.body)["font-family"];
144
- let canvas = document.createElement("canvas");
145
- canvas.width = canvasWidth;
146
- canvas.height = 200;
147
- let ctx = canvas.getContext("2d");
148
- ctx.rotate((-20 * Math.PI) / 180);
149
- ctx.font = `20px ${fontFamily}`;
150
- ctx.fillStyle = "rgba(8,8,8,.1)";
151
- ctx.fillText(userName, 50, 200);
152
- let imgSrc = canvas.toDataURL("image/png");
153
- style = document.createElement("style");
154
- style.innerHTML = `.with-watermark:before{
155
- content: "";
156
- width: 100%;
157
- height: 100%;
158
- display: block;
159
- position: absolute;
160
- background-image: url("${imgSrc}");
161
- }`;
162
- (document.head.append || document.head.appendChild).apply(document.head, [style]);
163
- }
164
-
165
- window.onunload = () => {
166
- vue.http({url: `rs/user/update/${this.$login.f.ename}`, method: 'GET'})
167
- }
168
- window.onbeforeunload = () => {
169
- vue.http({url: `rs/user/update/${this.$login.f.ename}`, method: 'GET'})
170
- }
171
- export default {
172
- title: '主界面',
173
- props: ['functions', 'userid'],
174
- data () {
175
- return {
176
- // 左侧树下部三个小图标
177
- imgs: {
178
- open: '/images/lefticon/菜单伸缩.png',
179
- set: '/images/lefticon/系统设置.png',
180
- out: '/images/lefticon/退出系统.png',
181
- img1: '/images/newStyle/login-user.png',
182
- logoimg: '/static/newStyle/fife.png'
183
- // img2: '/images/lefticon/退出系统.png',
184
- },
185
- treeOrIcon: false,
186
- isManger: false,
187
- show: false,
188
- orgpathnames: `${this.$login.f.orgs}-${this.$login.f.deps}-${this.$login.f.name}`,
189
- systemname: '客服系统',
190
- date: this.$login.toStandardDateString(),
191
- tabs:[], //已初始化页签数组
192
- selecttab:'',
193
- setting:true,
194
- srcsetting:'../../static/newStyle/setting.png',
195
- showwatermakeflag:false,
196
- // headerHint: true, // 右侧顶部提示信息
197
- // value: 25645.26,
198
- // AddChangeMsgShow: false,
199
- // showsum: false
200
- }
201
- },
202
- ready () {
203
- getwartermakr(this);
204
- let component = this.$login.getUrlCompileParames('component')
205
- if (component) {
206
- this.isManger = true
207
- this.$refs.route.init(component, {data: this.functions.functions})
208
- }
209
- if(this.$login.f.password == '1'){
210
- this.$showMessage('本地登录系统为此账户的初始密码,请确认修改密码!!!', ['confirm', 'cancel']).then((res) => {
211
- if(res == 'confirm')
212
- this.show = true
213
- })
214
- }
215
- console.log("系统名称",this.$appdata.getSingleValue("系统名称"))
216
- this.systemname = this.$appdata.getSingleValue("系统名称")? this.$appdata.getSingleValue("系统名称"):'客服系统'
217
- // let oBox = this.getElement("box")
218
- // let oTop = this.getElement("top")
219
- // let oBottom = this.getElement("bottom")
220
- // let oLine = this.getElement("line")
221
- // let that = this
222
- // oLine.onmousedown = function(e) {
223
- // let disX = (e || event).clientX
224
- // oLine.left = oLine.offsetLeft
225
- // document.onmousemove = function(e) {
226
- // let iT = oLine.left + ((e || event).clientX - disX)
227
- // var e = e || window.event
228
- // let tarnameb = e.target || e.srcElement
229
- // let maxT = oBox.clientWight - oLine.offsetWidth
230
- // oLine.style.margin = 0
231
- // iT < 0 && (iT = 0)
232
- // iT > maxT && (iT = maxT)
233
- // oLine.style.left = oTop.style.width = iT + "px"
234
- // oBottom.style.width = oBox.clientWidth - iT + "px"
235
- // that.$set('treeWidth', iT)
236
- // return false
237
- // }
238
- // document.onmouseup = function() {
239
- // document.onmousemove = null
240
- // document.onmouseup = null
241
- // oLine.releaseCapture && oLine.releaseCapture()
242
- // }
243
- // oLine.setCapture && oLine.setCapture()
244
- // return false
245
- // }
246
- this.changeShow()
247
- },
248
- methods: {
249
- hindsetting(){
250
-
251
- this.setting=!this.setting
252
- if(this.setting){
253
- this.srcsetting='../../static/newStyle/setting.png'
254
- }else {
255
- this.srcsetting='../../static/newStyle/setting1.png'
256
- }
257
-
258
- },
259
- hindsetting1(){
260
-
261
- if(!this.setting){
262
- this.srcsetting='../../static/newStyle/setting.png'
263
- this.setting=true
264
- }
265
-
266
- },
267
- isnodo(val){
268
- console.log(val,'ss')
269
- this.selecttab = val
270
- },
271
- unfurl () {
272
- if(this.showsum){
273
- this.showsum = false
274
- } else {
275
- this.showsum = true
276
- }
277
- },
278
- // getElement(id) {
279
- // return document.getElementById(id)
280
- // },
281
- changeShow () {
282
- // this.treeOrIcon = !this.treeOrIcon
283
- // let oBox = this.getElement("box")
284
- // let oTop = this.getElement("top")
285
- // let oBottom = this.getElement("bottom")
286
- // let oLine = this.getElement("line")
287
- // if (this.treeOrIcon) {
288
- // // oLine.style.left = oTop.style.width = 300 + "px"
289
- // oTop.style.width = 150 + "px"
290
- // oBottom.style.width = oBox.clientWidth - 150 + "px"
291
- // }else {
292
- // oLine.style.left = oTop.style.width = 50 + "px"
293
- // oBottom.style.width = oBox.clientWidth - 50 + "px"
294
- // }
295
- // }
296
- this.treeOrIcon = !this.treeOrIcon
297
- // if (this.treeOrIcon) {
298
- // this.$els.top.style.width = 14 + "%"
299
- // this.$els.bottom.style.width = this.$els.box.clientWidth - 14 + "%"
300
- // }else {
301
- // this.$els.top.style.width = 8 + "%"
302
- // this.$els.bottom.style.width = this.$els.box.clientWidth - 8 + "%"
303
- // }
304
- },
305
- changeMain(userid) {
306
- this.$goto('res-main', {userid: this.userid}, 'self')
307
- },
308
- tabChange (name) {
309
- console.log(name,'tabchanage')
310
- this.selecttab = name
311
- this.$refs.tree.changeSelect(name)
312
- },
313
- tabcg(val){
314
- console.log(val)
315
- this.tabs = val
316
- },
317
- logOut () {
318
- console.log(this.$login.f)
319
- this.$showMessage('您确定要退出系统吗?', ['confirm', 'cancel']).then(async (res) => {
320
- if (res == 'confirm') {
321
- let data = {
322
- userid: this.$login.f.id,
323
- username: this.$login.f.name,
324
- usertelephone: this.$login.f.f_user_telephone
325
- }
326
- await this.$resetpost('rs/logic/logOut', data, {resolveMsg: '退出成功', rejectMsg: null})
327
- window.location.reload()
328
- }
329
- })
330
- }
331
- },
332
- computed: {
333
- nowDate () {
334
- return this.$login.getNowDate()
335
- }
336
- }
337
- }
338
- </script>
339
- <style lang="less">
340
- /* 组件内通用样式 */
341
- .select-error {
342
- button {
343
- border-bottom: 1px solid #a94442!important;
344
- }
345
- }
346
- // input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{
347
- // -webkit-appearance:textfield;
348
- // }
349
- /* 表单输入框组 */
350
- .form-input-group {
351
- display: flex;
352
-
353
- label {
354
- width: 100px;
355
- text-align: right;
356
- + * {
357
- flex: 1;
358
- }
359
- }
360
- }
361
- // 日期组件在表单中沾满
362
- .form-horizontal .datepicker {
363
- width: 100%;
364
- }
365
- // 下拉选择框占据剩余全部空间
366
- .select-overspread {
367
- .form-group {
368
- // margin: 0px 5px 10px 0px;
369
- .form-control {
370
- margin-right: 0px;
371
- }
372
- }
373
- .btn-group, .btn-group-vertical {
374
- width: 100%;
375
- // padding-right: 5px;
376
- button {
377
- width: 100%;
378
- display: flex;
379
- justify-content: space-between;
380
- align-items: center;
381
- }
382
- }
383
- .dropdown-menu {
384
- width: 100%
385
- }
386
- }
387
- // 需要特定宽度的的样式
388
- .width-60 {
389
- width: 60px;
390
- }
391
- .userpanel {
392
- font-weight: 300;
393
- color: #333;
394
- position: fixed;
395
- right: 30px;
396
- top: 45px;
397
- background-color: white;
398
- box-shadow: darkgrey 0.5px 0.5px 0.5px 0.5px ;
399
- padding: 4px 10px 4px 10px;
400
- border-radius:2px;
401
- }
402
- .width-80 {
403
- width: 80px;
404
- }
405
- .width-100 {
406
- width: 100px;
407
- }
408
-
409
-
410
-
411
- /*右侧区域的背景*/
412
- .right-bg {
413
- width: 100%;
414
- flex: 1;
415
- color: #304A66;
416
- }
417
- .tree-flex {
418
- height: 100%;
419
- // width: 150px;
420
- /*width: 60px;*/
421
- background: #4a7cae;
422
- color: #fff;
423
-
424
- }
425
- .tree-flex-icon {
426
- width: 50px;
427
- /*transition: 0.5s;*/
428
- > .span {
429
- overflow-x: visible;
430
- }
431
- }
432
- .tree-flex h3 {
433
- text-align: center;
434
- margin: 1em 0;
435
- }
436
-
437
- .tree-flex-footer {
438
- height: 50px;
439
- display: flex;
440
- flex-direction:column;
441
- color: #fff;
442
- }
443
- .tree-flex-footer a,.tree-flex-footer button{
444
- flex: 1;
445
- padding: 8px 5px;
446
- font-size: 1.2em;
447
- // border-top: 1px solid #697D93;
448
- border-top: 1px solid #4a7cae;
449
- text-decoration: none;
450
- color: #fff;
451
- cursor: pointer;
452
- }
453
- .tree-flex-footer button {
454
- height: auto;
455
- width: 100%;
456
- border-radius: 0px;
457
- background-color: rgba(255,255,255,0);
458
- border: none;
459
- border-top: 1px solid #4a7cae;
460
- // border-top: 1px solid #697D93;
461
- text-align: left;
462
- }
463
- .tree-flex-footer button:hover{
464
- outline: none;
465
- background-color: rgba(255,255,255,0.2);
466
- }
467
- .tree-flex-footer button:focus {
468
- outline: none;
469
- background-color: rgba(255,255,255,0.5);
470
- }
471
- .tree-flex-footer a:hover {
472
- color: #FFF;
473
- background-color: rgba(255,255,255,0.2);
474
- }
475
- .tree-flex .btn-group {
476
- height: 50px!important;
477
- }
478
-
479
- .tree-flex .dropdown-menu {
480
- /* 控制显示列表的样式 */
481
- background: #4a7cae;
482
- border-radius: 0px;
483
- color: #fff;
484
- width: auto;
485
- margin: 0px;
486
- padding: 0px;
487
- }
488
- .tree-flex .dropdown-menu-up {
489
- /* bottom,top控制上下,left和right控制左右*/
490
- left: 100%!important;
491
- top: auto!important;
492
- bottom: 0;
493
- }
494
- .tree-flex .dropdown-menu-down {
495
- /* bottom,top控制上下,left和right控制左右*/
496
- left: 100%!important;
497
- top: 0!important;
498
- }
499
- .tree-flex .dropdown-menu li{
500
- text-align: center;
501
- line-height: 50px;
502
- border-bottom: 1px solid #697D93;
503
- font-size: 1.2em;
504
- width: auto;
505
- white-space: nowrap;
506
- cursor: default;
507
-
508
- }
509
- .tree-flex .dropdown-menu li + li {
510
- text-align: left;
511
- border: 0;
512
- line-height: 40px;
513
- padding-left: 15px;
514
- padding-right: 15px;
515
- font-size: 1em;
516
- cursor: pointer;
517
- }
518
- .tree-flex .dropdown-menu li + li:hover {
519
- background-color: rgba(255,255,255,0.2);
520
- }
521
- .tree-flex .dropdown-menu li a {
522
- border: none;
523
- color: #fff;
524
- height: 40px;
525
- line-height: 40px;
526
- font-size: 1em;
527
- padding: 0px;
528
- }
529
- .tree-flex .dropdown-menu li a:hover {
530
- color: #fff;
531
- background-color: rgba(255,255,255,0);
532
- }
533
- .tree-flex img{
534
- height: 1.2em;
535
- width: 1.2em;
536
- margin-right: 15px;
537
- margin-left: 5px;
538
- }
539
- .line {
540
- height: 100%;
541
- width: 5px;
542
- background: #4C637B;
543
- cursor: e-resize;
544
- }
545
- /*为树(tree)组件写的样式*/
546
- .tree-img {
547
- font-size: 1.2em;
548
- }
549
-
550
- /*将较长信息截断显示,鼠标悬停显示全部信息*/
551
- .cutout50 {
552
- max-width: 50px;
553
- overflow:hidden;
554
- text-overflow: ellipsis;
555
- white-space: nowrap;
556
- }
557
-
558
- /* 滚动条样式 */
559
- /*---滚动条默认显示样式--*/
560
- ::-webkit-scrollbar-thumb{
561
- // display: none;
562
- background-color:rgba(0,0,0,0.4);
563
- /*background-color:red;*/
564
- height:50px;
565
- outline-offset:-2px;
566
- /*outline:2px solid #fff;*/
567
- -webkit-border-radius:4px;
568
- /*border: 2px solid #fff;*/
569
- }
570
-
571
- /*---鼠标点击滚动条显示样式--*/
572
- ::-webkit-scrollbar-thumb:hover{
573
- // display: inherit;
574
- background-color:rgba(0,0,0,0.4);
575
- height:50px;
576
- -webkit-border-radius:4px;
577
- }
578
- /*---滚动条大小--*/
579
- ::-webkit-scrollbar{
580
- width:8px;
581
- height:8px;
582
- }
583
- /*---滚动框背景样式--*/
584
- ::-webkit-scrollbar-track-piece{
585
- /* 全透明,不显示 */
586
- background-color:rgba(255,255,255,0);
587
- -webkit-border-radius:0;
588
- }
589
- </style>
1
+ <template>
2
+ <div @click="hindsetting1()" :class="{'with-watermark':showwatermakeflag}">
3
+ <!-- <div class="system-main" id="box" v-el:box v-if="!isManger">-->
4
+ <!-- <div class="system-logo" style="height: auto">-->
5
+ <!-- <img :src="imgs.logoimg" alt=""/>-->
6
+ <!-- <label>{{systemname}}</label>-->
7
+ <!-- <div class="system-logo-chi" >-->
8
+ <!-- <div v-if="userpane" class="auto system-logo-prompt" style="float: right">-->
9
+ <!-- <span>{{orgpathnames}}</span>-->
10
+ <!-- </div>-->
11
+ <!-- &lt;!&ndash;<div class="system-logo-chi-img1" style="float: right" @mouseenter="mouseenteruser()" @mouseleave="mouseleaveuser()"></div>&ndash;&gt;-->
12
+ <!-- <span style="float: right; padding-top: 2px" @mouseenter="mouseenteruser()" @mouseleave="mouseleaveuser()" class="system-logo-chi-span-1">{{$login.f.name}}</span>-->
13
+ <!-- <span style="border-left: 1px solid;float: right;padding-top: 2px" class="system-logo-chi-span-1"> <img src="../../static/newStyle/login-f.png" height="20" width="20"> </span>-->
14
+ <!-- <a href="index.html" onclick="return confirm('您确定要退出系统吗?');" style="float: right;padding-top: 2px">-->
15
+ <!-- <img src="../../static/newStyle/system-off.png" alt="" >-->
16
+ <!-- <span class="system-logo-chi-span-1">退出系统</span>-->
17
+ <!-- </a>-->
18
+ <!-- <div style="float: right" :class="{'dropstyle':setting,'dropstyle-1':!setting}">-->
19
+ <!-- <dropdown class="auto" >-->
20
+ <!-- <span data-toggle="dropdown" @click="hindsetting()" >-->
21
+ <!-- <img :src="srcsetting" alt=""><span>系统设置</span>-->
22
+ <!-- </span>-->
23
+ <!-- <ul slot="dropdown-menu" class="dropdown-menu dropdown-menu-up dropstyle-chi" >-->
24
+ <!-- &lt;!&ndash; <li>系统信息及设置</li>&ndash;&gt;-->
25
+ <!-- <li style="color: #ffffff;white-space: nowrap" @click="show=true">修改密码</li>-->
26
+ <!-- <li style="color: #ffffff;white-space: nowrap" @click="AddChangeMsgShow=true">系统版本</li>-->
27
+ <!-- </ul>-->
28
+ <!-- </dropdown>-->
29
+ <!-- </div>-->
30
+
31
+ <!-- </div>-->
32
+ <!-- </div>-->
33
+ <!-- <div class="system-left tree-flex" :class="{'system-left-1': !treeOrIcon}" id="top" v-el:top >-->
34
+ <!-- <div class="system-left-chi" :class="{'system-left-icon': !treeOrIcon}" >-->
35
+ <!-- <div class="span system-left-tree" >-->
36
+ <!-- <left-tree :functions='functions.functions' :userid='userid' @isnodo="isnodo" :treeOrIcon="treeOrIcon" :tabs="tabs" v-ref:tree></left-tree>-->
37
+ <!-- &lt;!&ndash; <icon-tree :functions='functions.functions' :userid='userid' v-show="!treeOrIcon"></icon-tree>&ndash;&gt;-->
38
+ <!-- </div>-->
39
+ <!-- </div>-->
40
+ <!-- <div class="system-foot-stretch" >-->
41
+ <!-- <a @click="changeShow()"><img src="../../static/images/lefticon/菜单伸缩.png" alt=""></a>-->
42
+ <!-- </div>-->
43
+ <!-- </div>-->
44
+
45
+
46
+ <!-- <div class="system-right" :class="{'system-right-1': !treeOrIcon}" id="bottom" v-el:bottom>-->
47
+ <!-- <div class="span">-->
48
+ <!-- <echarts-box v-if="$refs.mic.tabs.length === 0"></echarts-box>-->
49
+ <!-- <dynamic :comps='[]' :showup="true" :showhide="false" name='main' :selecttab.sync="selecttab" @tab-changed="tabChange" @tabscg="tabcg" v-ref:mic v-show="!($refs.mic.tabs.length === 0)"></dynamic>-->
50
+ <!-- </div>-->
51
+ <!-- </div>-->
52
+ <!-- <div class="system-foot" v-el:bottom>-->
53
+
54
+ <!-- <div class="system-foot-box">-->
55
+
56
+ <!-- </div>-->
57
+ <!-- </div>-->
58
+ <!-- </div>-->
59
+ <div class='flex-row system-main' id="box" v-el:box v-if="!isManger">
60
+ <div class="auto " :class="{'login-operator1':$refs.mic.tabs.length === 0,'login-operator':$refs.mic.tabs.length != 0}">
61
+ <span>
62
+ <img
63
+ src="../assets/people.png" height="15" width="15">
64
+ 登录人:</span>
65
+ <label>{{orgpathnames}}</label>
66
+ </div>
67
+ <div class="system-left tree-flex" :class="{'tree-flex-icon': !treeOrIcon}" id="top" v-el:top >
68
+ <div class="system-left-chi" :class="{'system-left-icon': !treeOrIcon}" >
69
+ <div class="span system-left-tree " style="height:85%">
70
+ <h3>{{systemname}}</h3>
71
+ <!-- <div class="span" style="margin-bottom:10px;padding-bottom:5px;padding-top:5px;flex: 1;border-top: 1px solid #e5e5e5;border-bottom: 1px solid #e5e5e5;">-->
72
+ <left-tree :functions='functions.functions' :userid='userid' @isnodo="isnodo" v-show="treeOrIcon" :tabs="tabs" v-ref:tree></left-tree>
73
+ <!--&lt;!&ndash; <icon-tree :functions='functions.functions' :userid='userid' v-show="!treeOrIcon"></icon-tree>&ndash;&gt;-->
74
+ </div>
75
+
76
+ <div class="tree-flex-footer">
77
+ <!-- <a @click="changeShow()"><img :src="imgs.open" alt=""><span v-if="treeOrIcon">菜单伸缩</span></a>-->
78
+ <!-- <a><img src="../../../static/treeset.png" alt="">系统设置</a> -->
79
+ <dropdown class="auto">
80
+ <button type="button" data-toggle="dropdown">
81
+ <img :src="imgs.set" alt=""><span v-if="treeOrIcon">系统设置</span>
82
+ </button>
83
+ <ul slot="dropdown-menu" class="dropdown-menu dropdown-menu-up">
84
+ <li>系统信息及设置</li>
85
+ <!-- <li>{{name}}</li> -->
86
+ <li>{{date}}</li>
87
+ <li @click="show=true">修改密码</li>
88
+ <li @click="AddChangeMsgShow=true">系统版本:1.0.0</li>
89
+ </ul>
90
+
91
+ </dropdown>
92
+ <a href="index.html" @click.prevent="logOut">
93
+ <img :src="imgs.out" alt="" ><span v-if="treeOrIcon">退出系统</span>
94
+ </a>
95
+ </div>
96
+ </div>
97
+ </div>
98
+ <!-- <div class="line" id="line" v-show="treeOrIcon" v-el:line></div> -->
99
+
100
+ <div class="flex right-bg system-right" id="bottom" v-el:bottom>
101
+ <!-- <operator-badge></operator-badge> -->
102
+ <div class="span">
103
+ <echarts-box v-if="$refs.mic.tabs.length === 0"></echarts-box>
104
+ <dynamic :comps='[]' name='main' :selecttab.sync="selecttab" @tab-changed="tabChange" @tabscg="tabcg" v-ref:mic v-show="!($refs.mic.tabs.length === 0)"></dynamic>
105
+ </div>
106
+ </div>
107
+ </div>
108
+ <div v-show="isManger">
109
+ <route v-ref:route></route>
110
+ </div>
111
+
112
+ <!-- 变更录入 模态框 -->
113
+ <add-changemsg :show="AddChangeMsgShow" v-on:toggle = "AddChangeMsgShow = false"></add-changemsg>
114
+ <!-- 修改密码组件 -->
115
+ <modify-pw :show.sync="show" v-if="show"></modify-pw>
116
+ <!-- 修改密码模态框 -->
117
+ </div>
118
+ </template>
119
+
120
+ <script>
121
+ import vue from 'vue'
122
+ import co from 'co'
123
+
124
+ let getwartermakr = async function(self){
125
+ let param = {
126
+ tablename:'t_singlevalue',
127
+ condition: " 1=1 and name=\'水印内容\'"
128
+ };
129
+ let result =await self.$resetpost('rs/sql/saleSingleTable',{data:param},{resolveMsg: null, rejectMsg: null});
130
+ if(result && result.data.length>0){
131
+ self.showwatermakeflag = true;
132
+ createWaterMark(result.data[0].value);
133
+ }else{
134
+ self.showwatermakeflag = false;
135
+ }
136
+ }
137
+
138
+ let createWaterMark = function(userName){
139
+ let style;
140
+ if (style) style.remove();
141
+ let width = window.parseInt(document.body.clientWidth);
142
+ let canvasWidth = width / window.parseInt(width / 320);
143
+ let fontFamily = window.getComputedStyle(document.body)["font-family"];
144
+ let canvas = document.createElement("canvas");
145
+ canvas.width = canvasWidth;
146
+ canvas.height = 200;
147
+ let ctx = canvas.getContext("2d");
148
+ ctx.rotate((-20 * Math.PI) / 180);
149
+ ctx.font = `20px ${fontFamily}`;
150
+ ctx.fillStyle = "rgba(8,8,8,.1)";
151
+ ctx.fillText(userName, 50, 200);
152
+ let imgSrc = canvas.toDataURL("image/png");
153
+ style = document.createElement("style");
154
+ style.innerHTML = `.with-watermark:before{
155
+ content: "";
156
+ width: 100%;
157
+ height: 100%;
158
+ display: block;
159
+ position: absolute;
160
+ background-image: url("${imgSrc}");
161
+ }`;
162
+ (document.head.append || document.head.appendChild).apply(document.head, [style]);
163
+ }
164
+
165
+ window.onunload = () => {
166
+ vue.http({url: `rs/user/update/${this.$login.f.ename}`, method: 'GET'})
167
+ }
168
+ window.onbeforeunload = () => {
169
+ vue.http({url: `rs/user/update/${this.$login.f.ename}`, method: 'GET'})
170
+ }
171
+ export default {
172
+ title: '主界面',
173
+ props: ['functions', 'userid'],
174
+ data () {
175
+ return {
176
+ // 左侧树下部三个小图标
177
+ imgs: {
178
+ open: '/images/lefticon/菜单伸缩.png',
179
+ set: '/images/lefticon/系统设置.png',
180
+ out: '/images/lefticon/退出系统.png',
181
+ img1: '/images/newStyle/login-user.png',
182
+ logoimg: '/static/newStyle/fife.png'
183
+ // img2: '/images/lefticon/退出系统.png',
184
+ },
185
+ treeOrIcon: false,
186
+ isManger: false,
187
+ show: false,
188
+ orgpathnames: `${this.$login.f.orgs}-${this.$login.f.deps}-${this.$login.f.name}`,
189
+ systemname: '客服系统',
190
+ date: this.$login.toStandardDateString(),
191
+ tabs:[], //已初始化页签数组
192
+ selecttab:'',
193
+ setting:true,
194
+ srcsetting:'../../static/newStyle/setting.png',
195
+ showwatermakeflag:false,
196
+ // headerHint: true, // 右侧顶部提示信息
197
+ // value: 25645.26,
198
+ // AddChangeMsgShow: false,
199
+ // showsum: false
200
+ lockReconnect: false, // 避免重复连接
201
+ timeout: 10000, // 10秒发一次心跳
202
+ connectNumber: 10, // 重连次数
203
+ timeoutObj: null,
204
+ serverTimeoutObj: null
205
+ }
206
+ },
207
+ ready () {
208
+ getwartermakr(this);
209
+ let component = this.$login.getUrlCompileParames('component')
210
+ if (component) {
211
+ this.isManger = true
212
+ this.$refs.route.init(component, {data: this.functions.functions})
213
+ }
214
+ if(this.$login.f.password == '1'){
215
+ this.$showMessage('本地登录系统为此账户的初始密码,请确认修改密码!!!', ['confirm', 'cancel']).then((res) => {
216
+ if(res == 'confirm')
217
+ this.show = true
218
+ })
219
+ }
220
+ console.log("系统名称",this.$appdata.getSingleValue("系统名称"))
221
+ this.systemname = this.$appdata.getSingleValue("系统名称")? this.$appdata.getSingleValue("系统名称"):'客服系统'
222
+ // let oBox = this.getElement("box")
223
+ // let oTop = this.getElement("top")
224
+ // let oBottom = this.getElement("bottom")
225
+ // let oLine = this.getElement("line")
226
+ // let that = this
227
+ // oLine.onmousedown = function(e) {
228
+ // let disX = (e || event).clientX
229
+ // oLine.left = oLine.offsetLeft
230
+ // document.onmousemove = function(e) {
231
+ // let iT = oLine.left + ((e || event).clientX - disX)
232
+ // var e = e || window.event
233
+ // let tarnameb = e.target || e.srcElement
234
+ // let maxT = oBox.clientWight - oLine.offsetWidth
235
+ // oLine.style.margin = 0
236
+ // iT < 0 && (iT = 0)
237
+ // iT > maxT && (iT = maxT)
238
+ // oLine.style.left = oTop.style.width = iT + "px"
239
+ // oBottom.style.width = oBox.clientWidth - iT + "px"
240
+ // that.$set('treeWidth', iT)
241
+ // return false
242
+ // }
243
+ // document.onmouseup = function() {
244
+ // document.onmousemove = null
245
+ // document.onmouseup = null
246
+ // oLine.releaseCapture && oLine.releaseCapture()
247
+ // }
248
+ // oLine.setCapture && oLine.setCapture()
249
+ // return false
250
+ // }
251
+ this.changeShow()
252
+ vue.prototype.$connectNumber = this.connectNumber
253
+ this.initWebSocket()
254
+ },
255
+ methods: {
256
+ // 清除
257
+ reset () {
258
+ clearTimeout(this.timeoutObj)
259
+ clearTimeout(this.serverTimeoutObj)
260
+ },
261
+ // 发送心跳
262
+ start () {
263
+ // 重置
264
+ vue.prototype.$connectNumber = this.connectNumber
265
+ this.timeoutObj = setTimeout(() => {
266
+ this.$socket.send('ping')
267
+ console.log('ping!')
268
+ this.serverTimeoutObj = setTimeout(() => {
269
+ this.$socket.close()
270
+ }, this.timeout)
271
+ }, this.timeout)
272
+ },
273
+ // 重连
274
+ reconnect () {
275
+ if (this.lockReconnect) return
276
+ if (this.$connectNumber <= 0) {
277
+ vue.showMessage('连接已断开,将无法接收消息,请重新登录', ['confirm']).then((res) => {
278
+ if (res === 'confirm') {
279
+ location.reload()
280
+ }
281
+ })
282
+ return
283
+ }
284
+ this.$connectNumber--
285
+ setTimeout(() => {
286
+ console.log('连接异常,尝试重新连接。。。。')
287
+ this.initWebSocket()
288
+ this.lockReconnect = false
289
+ }, 1000 * 60)
290
+ },
291
+ // 初始化
292
+ initWebSocket () {
293
+ let path = `ws://${location.host}/ws?token=${this.$login.f.id}`
294
+ try {
295
+ if ('WebSocket' in window) {
296
+ // 创建对象
297
+ vue.prototype.$socket = new WebSocket(path)
298
+ } else {
299
+ this.$showMessage('您的浏览器不支持websocket的协议,建议使用新版谷歌浏览器,请勿使用IE浏览器,360浏览器请使用极速模式,不要使用兼容模式!"')
300
+ }
301
+ } catch (e) {
302
+ this.reconnect()
303
+ }
304
+
305
+ this.$socket.onopen = this.onOpen // 连接成功
306
+ this.$socket.onmessage = this.onMessage // 收到消息时回调
307
+ this.$socket.onclose = this.onClose // 连接关闭时回调
308
+ this.$socket.onerror = this.onError // 通讯异常
309
+ },
310
+ // 通讯异常
311
+ onError () {
312
+ this.reconnect()
313
+ },
314
+ // 连接成功
315
+ onOpen () {
316
+ console.log('webSocket连接成功')
317
+ this.start()
318
+ },
319
+ // 收到消息时回调函数
320
+ onMessage (event) {
321
+ if (event.data === 'pong') {
322
+ this.reset()
323
+ this.start()
324
+ return
325
+ }
326
+ let data = JSON.parse(event.data)
327
+ this.$broadcast('onMessage', data)
328
+ this.$showMessage(data.message)
329
+ },
330
+ // 关闭连接时回调函数
331
+ onClose () {
332
+ console.log('webSocket连接断开')
333
+ this.reset()
334
+ this.reconnect()
335
+ },
336
+ hindsetting(){
337
+
338
+ this.setting=!this.setting
339
+ if(this.setting){
340
+ this.srcsetting='../../static/newStyle/setting.png'
341
+ }else {
342
+ this.srcsetting='../../static/newStyle/setting1.png'
343
+ }
344
+
345
+ },
346
+ hindsetting1(){
347
+
348
+ if(!this.setting){
349
+ this.srcsetting='../../static/newStyle/setting.png'
350
+ this.setting=true
351
+ }
352
+
353
+ },
354
+ isnodo(val){
355
+ console.log(val,'ss')
356
+ this.selecttab = val
357
+ },
358
+ unfurl () {
359
+ if(this.showsum){
360
+ this.showsum = false
361
+ } else {
362
+ this.showsum = true
363
+ }
364
+ },
365
+ // getElement(id) {
366
+ // return document.getElementById(id)
367
+ // },
368
+ changeShow () {
369
+ // this.treeOrIcon = !this.treeOrIcon
370
+ // let oBox = this.getElement("box")
371
+ // let oTop = this.getElement("top")
372
+ // let oBottom = this.getElement("bottom")
373
+ // let oLine = this.getElement("line")
374
+ // if (this.treeOrIcon) {
375
+ // // oLine.style.left = oTop.style.width = 300 + "px"
376
+ // oTop.style.width = 150 + "px"
377
+ // oBottom.style.width = oBox.clientWidth - 150 + "px"
378
+ // }else {
379
+ // oLine.style.left = oTop.style.width = 50 + "px"
380
+ // oBottom.style.width = oBox.clientWidth - 50 + "px"
381
+ // }
382
+ // }
383
+ this.treeOrIcon = !this.treeOrIcon
384
+ // if (this.treeOrIcon) {
385
+ // this.$els.top.style.width = 14 + "%"
386
+ // this.$els.bottom.style.width = this.$els.box.clientWidth - 14 + "%"
387
+ // }else {
388
+ // this.$els.top.style.width = 8 + "%"
389
+ // this.$els.bottom.style.width = this.$els.box.clientWidth - 8 + "%"
390
+ // }
391
+ },
392
+ changeMain(userid) {
393
+ this.$goto('res-main', {userid: this.userid}, 'self')
394
+ },
395
+ tabChange (name) {
396
+ console.log(name,'tabchanage')
397
+ this.selecttab = name
398
+ this.$refs.tree.changeSelect(name)
399
+ },
400
+ tabcg(val){
401
+ console.log(val)
402
+ this.tabs = val
403
+ },
404
+ logOut () {
405
+ console.log(this.$login.f)
406
+ this.$showMessage('您确定要退出系统吗?', ['confirm', 'cancel']).then(async (res) => {
407
+ if (res == 'confirm') {
408
+ let data = {
409
+ userid: this.$login.f.id,
410
+ username: this.$login.f.name,
411
+ usertelephone: this.$login.f.f_user_telephone
412
+ }
413
+ await this.$resetpost('rs/logic/logOut', data, {resolveMsg: '退出成功', rejectMsg: null})
414
+ window.location.reload()
415
+ }
416
+ })
417
+ }
418
+ },
419
+ computed: {
420
+ nowDate () {
421
+ return this.$login.getNowDate()
422
+ }
423
+ }
424
+ }
425
+ </script>
426
+ <style lang="less">
427
+ /* 组件内通用样式 */
428
+ .select-error {
429
+ button {
430
+ border-bottom: 1px solid #a94442!important;
431
+ }
432
+ }
433
+ // input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{
434
+ // -webkit-appearance:textfield;
435
+ // }
436
+ /* 表单输入框组 */
437
+ .form-input-group {
438
+ display: flex;
439
+
440
+ label {
441
+ width: 100px;
442
+ text-align: right;
443
+ + * {
444
+ flex: 1;
445
+ }
446
+ }
447
+ }
448
+ // 日期组件在表单中沾满
449
+ .form-horizontal .datepicker {
450
+ width: 100%;
451
+ }
452
+ // 下拉选择框占据剩余全部空间
453
+ .select-overspread {
454
+ .form-group {
455
+ // margin: 0px 5px 10px 0px;
456
+ .form-control {
457
+ margin-right: 0px;
458
+ }
459
+ }
460
+ .btn-group, .btn-group-vertical {
461
+ width: 100%;
462
+ // padding-right: 5px;
463
+ button {
464
+ width: 100%;
465
+ display: flex;
466
+ justify-content: space-between;
467
+ align-items: center;
468
+ }
469
+ }
470
+ .dropdown-menu {
471
+ width: 100%
472
+ }
473
+ }
474
+ // 需要特定宽度的的样式
475
+ .width-60 {
476
+ width: 60px;
477
+ }
478
+ .userpanel {
479
+ font-weight: 300;
480
+ color: #333;
481
+ position: fixed;
482
+ right: 30px;
483
+ top: 45px;
484
+ background-color: white;
485
+ box-shadow: darkgrey 0.5px 0.5px 0.5px 0.5px ;
486
+ padding: 4px 10px 4px 10px;
487
+ border-radius:2px;
488
+ }
489
+ .width-80 {
490
+ width: 80px;
491
+ }
492
+ .width-100 {
493
+ width: 100px;
494
+ }
495
+
496
+
497
+
498
+ /*右侧区域的背景*/
499
+ .right-bg {
500
+ width: 100%;
501
+ flex: 1;
502
+ color: #304A66;
503
+ }
504
+ .tree-flex {
505
+ height: 100%;
506
+ // width: 150px;
507
+ /*width: 60px;*/
508
+ background: #4a7cae;
509
+ color: #fff;
510
+
511
+ }
512
+ .tree-flex-icon {
513
+ width: 50px;
514
+ /*transition: 0.5s;*/
515
+ > .span {
516
+ overflow-x: visible;
517
+ }
518
+ }
519
+ .tree-flex h3 {
520
+ text-align: center;
521
+ margin: 1em 0;
522
+ }
523
+
524
+ .tree-flex-footer {
525
+ height: 50px;
526
+ display: flex;
527
+ flex-direction:column;
528
+ color: #fff;
529
+ }
530
+ .tree-flex-footer a,.tree-flex-footer button{
531
+ flex: 1;
532
+ padding: 8px 5px;
533
+ font-size: 1.2em;
534
+ // border-top: 1px solid #697D93;
535
+ border-top: 1px solid #4a7cae;
536
+ text-decoration: none;
537
+ color: #fff;
538
+ cursor: pointer;
539
+ }
540
+ .tree-flex-footer button {
541
+ height: auto;
542
+ width: 100%;
543
+ border-radius: 0px;
544
+ background-color: rgba(255,255,255,0);
545
+ border: none;
546
+ border-top: 1px solid #4a7cae;
547
+ // border-top: 1px solid #697D93;
548
+ text-align: left;
549
+ }
550
+ .tree-flex-footer button:hover{
551
+ outline: none;
552
+ background-color: rgba(255,255,255,0.2);
553
+ }
554
+ .tree-flex-footer button:focus {
555
+ outline: none;
556
+ background-color: rgba(255,255,255,0.5);
557
+ }
558
+ .tree-flex-footer a:hover {
559
+ color: #FFF;
560
+ background-color: rgba(255,255,255,0.2);
561
+ }
562
+ .tree-flex .btn-group {
563
+ height: 50px!important;
564
+ }
565
+
566
+ .tree-flex .dropdown-menu {
567
+ /* 控制显示列表的样式 */
568
+ background: #4a7cae;
569
+ border-radius: 0px;
570
+ color: #fff;
571
+ width: auto;
572
+ margin: 0px;
573
+ padding: 0px;
574
+ }
575
+ .tree-flex .dropdown-menu-up {
576
+ /* bottom,top控制上下,left和right控制左右*/
577
+ left: 100%!important;
578
+ top: auto!important;
579
+ bottom: 0;
580
+ }
581
+ .tree-flex .dropdown-menu-down {
582
+ /* bottom,top控制上下,left和right控制左右*/
583
+ left: 100%!important;
584
+ top: 0!important;
585
+ }
586
+ .tree-flex .dropdown-menu li{
587
+ text-align: center;
588
+ line-height: 50px;
589
+ border-bottom: 1px solid #697D93;
590
+ font-size: 1.2em;
591
+ width: auto;
592
+ white-space: nowrap;
593
+ cursor: default;
594
+
595
+ }
596
+ .tree-flex .dropdown-menu li + li {
597
+ text-align: left;
598
+ border: 0;
599
+ line-height: 40px;
600
+ padding-left: 15px;
601
+ padding-right: 15px;
602
+ font-size: 1em;
603
+ cursor: pointer;
604
+ }
605
+ .tree-flex .dropdown-menu li + li:hover {
606
+ background-color: rgba(255,255,255,0.2);
607
+ }
608
+ .tree-flex .dropdown-menu li a {
609
+ border: none;
610
+ color: #fff;
611
+ height: 40px;
612
+ line-height: 40px;
613
+ font-size: 1em;
614
+ padding: 0px;
615
+ }
616
+ .tree-flex .dropdown-menu li a:hover {
617
+ color: #fff;
618
+ background-color: rgba(255,255,255,0);
619
+ }
620
+ .tree-flex img{
621
+ height: 1.2em;
622
+ width: 1.2em;
623
+ margin-right: 15px;
624
+ margin-left: 5px;
625
+ }
626
+ .line {
627
+ height: 100%;
628
+ width: 5px;
629
+ background: #4C637B;
630
+ cursor: e-resize;
631
+ }
632
+ /*为树(tree)组件写的样式*/
633
+ .tree-img {
634
+ font-size: 1.2em;
635
+ }
636
+
637
+ /*将较长信息截断显示,鼠标悬停显示全部信息*/
638
+ .cutout50 {
639
+ max-width: 50px;
640
+ overflow:hidden;
641
+ text-overflow: ellipsis;
642
+ white-space: nowrap;
643
+ }
644
+
645
+ /* 滚动条样式 */
646
+ /*---滚动条默认显示样式--*/
647
+ ::-webkit-scrollbar-thumb{
648
+ // display: none;
649
+ background-color:rgba(0,0,0,0.4);
650
+ /*background-color:red;*/
651
+ height:50px;
652
+ outline-offset:-2px;
653
+ /*outline:2px solid #fff;*/
654
+ -webkit-border-radius:4px;
655
+ /*border: 2px solid #fff;*/
656
+ }
657
+
658
+ /*---鼠标点击滚动条显示样式--*/
659
+ ::-webkit-scrollbar-thumb:hover{
660
+ // display: inherit;
661
+ background-color:rgba(0,0,0,0.4);
662
+ height:50px;
663
+ -webkit-border-radius:4px;
664
+ }
665
+ /*---滚动条大小--*/
666
+ ::-webkit-scrollbar{
667
+ width:8px;
668
+ height:8px;
669
+ }
670
+ /*---滚动框背景样式--*/
671
+ ::-webkit-scrollbar-track-piece{
672
+ /* 全透明,不显示 */
673
+ background-color:rgba(255,255,255,0);
674
+ -webkit-border-radius:0;
675
+ }
676
+ </style>