system-clients 3.0.46-fanxian → 3.0.47-fanxian

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 (97) hide show
  1. package/.babelrc +5 -5
  2. package/.editorconfig +9 -9
  3. package/.eslintrc.js +16 -16
  4. package/.gradle/buildOutputCleanup/cache.properties +2 -2
  5. package/CHANGELOG.md +51 -51
  6. package/README.md +36 -36
  7. package/SystemClient.iml +11 -11
  8. package/build/css-loaders.js +34 -34
  9. package/build/dev-client.js +8 -8
  10. package/build/example-server.js +80 -80
  11. package/build/release.sh +28 -28
  12. package/build/utils.js +71 -71
  13. package/build/webpack.dev.conf.js +31 -31
  14. package/build/webpack.example.conf.js +49 -49
  15. package/build/webpack.prod.conf.js +60 -60
  16. package/build/webpack.test.conf.js +31 -31
  17. package/build.gradle +6 -6
  18. package/config/dev.env.js +6 -6
  19. package/config/index.js +38 -38
  20. package/config/prod.env.js +3 -3
  21. package/config/test.env.js +6 -6
  22. package/doc/Login.md +7 -7
  23. package/examples/ReadCard/App.vue +23 -23
  24. package/examples/ReadCard/index.html +11 -11
  25. package/examples/ReadCard/main.js +12 -12
  26. package/index.html +21 -21
  27. package/package.json +1 -1
  28. package/release.bat +5 -5
  29. package/src/App.vue +24 -24
  30. package/src/LodopFuncs.js +123 -123
  31. package/src/assets/binding.svg +1 -1
  32. package/src/assets/unbind.svg +1 -1
  33. package/src/assets//345/205/254/345/221/212.svg +1 -1
  34. package/src/assets//347/207/203/346/260/224/347/274/264/350/264/271.eps +116 -116
  35. package/src/assets//350/201/224/347/263/273/346/210/221/344/273/254.svg +1 -1
  36. package/src/components/List.vue +51 -51
  37. package/src/components/Table.js +74 -74
  38. package/src/components/Util.js +343 -343
  39. package/src/components/equipment/EquipmentManage.vue +65 -65
  40. package/src/components/equipment/PcAdd.vue +105 -105
  41. package/src/components/equipment/PcList.vue +119 -119
  42. package/src/components/equipment/PcManage.vue +60 -60
  43. package/src/components/equipment/PhoneAdd.vue +94 -94
  44. package/src/components/equipment/PhoneList.vue +102 -102
  45. package/src/components/equipment/PhoneManage.vue +60 -60
  46. package/src/components/equipment/PosAdd.vue +137 -137
  47. package/src/components/equipment/PosList.vue +156 -156
  48. package/src/components/equipment/PosManage.vue +67 -67
  49. package/src/components/materialManage/materialData.vue +44 -44
  50. package/src/components/materialManage/materialList.vue +255 -255
  51. package/src/components/parammanage/ParamManage.vue +42 -42
  52. package/src/components/parammanage/ParamManages.vue +43 -43
  53. package/src/components/parammanage/ParamPage.vue +314 -314
  54. package/src/components/parammanage/ParamPages.vue +214 -214
  55. package/src/components/parammanage/SinglePage.vue +237 -237
  56. package/src/components/parammanage/SinglePages.vue +161 -161
  57. package/src/components/server/AddChangeMsg.vue +66 -66
  58. package/src/components/server/ChangeDeclare.vue +45 -45
  59. package/src/components/server/IconTree.vue +26 -26
  60. package/src/components/server/LeftTree.vue +111 -111
  61. package/src/components/server/LoadData.vue +36 -36
  62. package/src/components/server/Login.vue +625 -623
  63. package/src/components/server/Menu.vue +188 -188
  64. package/src/components/server/ModifyPw.vue +125 -106
  65. package/src/components/server/ResSelect.vue +150 -150
  66. package/src/components/server/ResSelectGroup.vue +140 -140
  67. package/src/components/server/RightTree.vue +263 -263
  68. package/src/components/server/RoleSelector.vue +88 -88
  69. package/src/components/server/TestResSelect.vue +58 -58
  70. package/src/components/server/TestResSelectGroup.vue +388 -388
  71. package/src/components/server/TestRightTree.vue +42 -42
  72. package/src/index.js +7 -7
  73. package/src/plugins/GetLoginInfoService.js +509 -498
  74. package/src/plugins/validation.js +7 -7
  75. package/src/project/ProjectPage.vue +24 -24
  76. package/src/project/State.js +17 -17
  77. package/src/stores/AppData.js +38 -38
  78. package/src/systemphone.js +11 -11
  79. package/src/util/LdapHelper.js +75 -75
  80. package/test/e2e/custom-assertions/elementCount.js +26 -26
  81. package/test/e2e/nightwatch.conf.js +40 -40
  82. package/test/e2e/runner.js +30 -30
  83. package/test/e2e/specs/test.js +14 -14
  84. package/test/unit/.eslintrc +5 -5
  85. package/test/unit/index.js +13 -13
  86. package/test/unit/init.js +10 -10
  87. package/test/unit/karma.conf.js +49 -49
  88. package/test/unit/specs/base64.spec.js +5 -5
  89. package/test/unit/specs/components/parammanage/ParamPage.spec.js +20 -20
  90. package/test/unit/specs/components/parammanage/SinglePage.spec.js +20 -20
  91. package/test/unit/specs/components/server/LeftTree/App.vue +18 -18
  92. package/test/unit/specs/components/server/LeftTree/LeftTree.spec.js +22 -22
  93. package/test/unit/specs/components/server/LoadData.spec.js +24 -24
  94. package/test/unit/specs/components/server/Login.spec.js +61 -61
  95. package/test/unit/specs/components/server/RightTree.spec.js +50 -50
  96. package/test/unit/specs/plugins/GetLoginInfoService.spec.js +55 -55
  97. package/test/unit/test.html +76 -76
@@ -1,263 +1,263 @@
1
- <template>
2
- <dropdown :model='model' class="auto" id="res-tree" v-if="!islist" v-el:dropdown :style="{width:width}">
3
- <button type="button" class="btn btn-default dropdown-toggle select-style" data-toggle="dropdown">
4
- <span class='btn-content' :style="{textOverflow:'ellipsis',overflow: 'hidden'}">{{ orgnames }}</span>
5
- <span class="caret"></span>
6
- </button>
7
- <div class="dropdown-menu auto" style="width:auto;max-height: 500px;overflow: auto" >
8
- <input type="text" placeholder="Search"
9
- placeholder='请输入'
10
- slot="dropdown-menu"
11
- v-model="searchText"
12
- class="form-control" autocomplete="off"
13
- @keydown.enter="buluer(searchText)">
14
- <tree :filter="strsign" :model='model' v-ref:tree :is-click="false" role="menu">
15
- <span partial>
16
- <span class="glyphicon glyphicon-chevron-down" v-show="row.open&&row.data.children.length>0" style="color:balck;"></span>
17
- <span class="glyphicon glyphicon-chevron-right" v-show="!row.open&&row.data.children.length>0" style="color:balck;"></span>
18
- <span class="RightTreeCanSelect" v-if="row.data.hasright" @click.stop="$parent.$parent.$parent.selectclick(row.data)">{{row.data.name}}</span>
19
- <span class="RightTreeCanNotSelect" v-else>{{row.data.name}}</span>
20
- <span class="glyphicon glyphicon-ok " v-if="$parent.$parent.$parent.isSelect(row.data.id)" style="color:balck;"></span>
21
- </span>
22
- </tree>
23
- </div>
24
-
25
- </dropdown>
26
- <v-select v-if="islist"
27
- placeholder='请选择'
28
- :options='childrenOptions'
29
- @change="selectclick"
30
- :value-single="true"
31
- close-on-select></v-select>
32
- </template>
33
- <script>
34
- import co from 'co'
35
- import { PagedList, HttpResetClass } from 'vue-client'
36
- import * as ldapHelper from '../../util/LdapHelper'
37
-
38
- let saveGen = function * (self) {
39
- //获取分公司树
40
- let data = {
41
- source: self.source,
42
- userid: self.userid
43
- }
44
- let http = new HttpResetClass()
45
- let ret = yield http.load('POST', `${self.Url}/rs/search`, data, {resolveMsg: null, rejectMsg: null})
46
- // 去掉前面的两层节点
47
- ret.data[0].children[0].children.forEach((item) => {
48
- self.model.push(item)
49
- })
50
- // 给资源添加父关系
51
- ldapHelper.procParent(self.model)
52
- // 树转列
53
- if (self.islist) {
54
- self.treetoList(self.model)
55
- }
56
- if(self.initresid&&self.initresid.length>0){
57
- self.initTreetoList(self.model)
58
- self.childrenOptions.forEach((item) => {
59
- if(item.id==self.initresid[0]){
60
- self.model=[]
61
- self.model.push(item)
62
- self.selectclick(item)
63
- }
64
- })
65
- }
66
- self.selectRes()
67
- }
68
- export default {
69
- title: '资源树',
70
- props: {
71
- searchText:'',
72
- strsign:'',
73
- source: {
74
- type: String,
75
- require: true,
76
- default:`tool.getFullTree(this.getRights().where(row.getType() == $organization$))`
77
- },
78
- //资源初始化数据
79
- initresid: {
80
- type: Array,
81
- default() { return [] },
82
- },
83
- resid: {
84
- },
85
- islist: {
86
- type: Boolean,
87
- default: false
88
- },
89
- //是否有查看上级的权限
90
- Url:{
91
- type: String,
92
- default:''
93
- },
94
- width:{
95
- type:String,
96
- default:'60%'
97
- }
98
- },
99
- data () {
100
- return {
101
- resobj:{res:this.$login.f.orgs, resids:this.$login.f.orgid},
102
- userid: this.$login.f.id,
103
- resname:[this.$login.f.orgs],
104
- orgnames : "请选择",
105
- //单选点击 返回所有子
106
- orgids : null,
107
- orgobj:null,
108
- model: [
109
-
110
- ],
111
- childrenOptions: []
112
- }
113
- },
114
- methods: {
115
- selectRes () {
116
- let newobj={
117
- "res": [this.resname],
118
- "resids": [this.orgids],
119
- }
120
- this.$emit('re-res', newobj)
121
- },
122
- //树形结构变成list
123
- initTreetoList(val) {
124
- for (let value of val) {
125
- this.initErgodicList(value)
126
- }
127
- },
128
- //找到跟节点
129
- initErgodicList (val) {
130
- if(val.children.length > 0){
131
- this.childrenOptions.push(val)
132
- this.treetoList(val.children)
133
- }else{
134
- this.childrenOptions.push(val)
135
- }
136
- },
137
- async buluer (val) {
138
- this.strsign=val
139
- await new Promise(resolve => {
140
- this.$nextTick(() => {
141
- resolve()
142
- })
143
- })
144
- },
145
- //点击资源的方法
146
- selectclick (row) {
147
- if(this.orgids==row.id){
148
- //取消点击
149
- this.orgnames="请选择"
150
- this.orgids=null
151
- this.orgobj=null
152
- let newobj={
153
- "res": [],
154
- "resids": [],
155
- "orgobj": [],
156
- }
157
- this.$emit('re-res', newobj)
158
- }else{
159
- //点中点击
160
- this.orgnames=row.name
161
- this.orgids=row.id
162
- this.orgobj=row
163
- let objs=[]
164
- let objids=[]
165
- let objnames=[]
166
- this.addResChild(row,objs)
167
- objs.forEach((item) => {
168
- objids.push(item.id)
169
- objnames.push(item.name)
170
- })
171
- let newobj={
172
- "res": objnames,
173
- "resids": objids,
174
- "orgobj": objs,
175
- }
176
- this.$emit('re-res', newobj)
177
- }
178
- },
179
- addResChild(val,objs){
180
- objs.push(val)
181
- if(val.children && val.children.length>0){
182
- Object.keys(val.children).forEach((key) => {
183
- this.addResChild(val.children[key],objs)
184
- })
185
- }
186
- return objs
187
- },
188
- //检查是否显示对勾
189
- isSelect(val) {
190
- if(this.orgids==val){
191
- return true
192
- }else{
193
- return false
194
- }
195
- },
196
- //树形结构变成list
197
- treetoList(val) {
198
- for (let value of val) {
199
- this.ergodicList(value)
200
- }
201
- },
202
- //找到跟节点
203
- ergodicList (val) {
204
- val.children.length > 0 ? this.treetoList(val.children) : this.childrenOptions.push({label: val.name, value: val})
205
- },
206
- //处理显示默认值
207
- dealResObj (val) {
208
- try{
209
- var arr=val.res.split(".")
210
- //截取最后一个分公司名字
211
- this.resname=arr[arr.length-1].toString()
212
- this.orgnames=arr[arr.length-1].toString()
213
- this.resid = val.resids
214
- this.orgids = val.resids
215
- }catch (e){
216
- this.resname='请选择组织'
217
- }
218
- },
219
- judgBoundary(){
220
- //判断是否超出边界,超出移动
221
- if(document.documentElement.offsetWidth< this.$els.dropdown.getBoundingClientRect().right){
222
- this.left = document.documentElement.offsetWidth - this.$els.dropdown.getBoundingClientRect().right - 25
223
- }
224
- }
225
- },
226
- events: {
227
-
228
- },
229
- ready () {
230
- this.dealResObj (this.resobj)
231
- let gen = saveGen(this)
232
- return co(gen)
233
- },
234
- watch: {
235
- }
236
- }
237
- </script>
238
- <style lang="less">
239
- #res-tree {
240
- .list-group-item {
241
- background-color: #FFF;
242
- color: #000;
243
- padding: 5px 10px;
244
- border:0px;
245
- white-space: nowrap;
246
- }
247
- }
248
- #res-tree .list-group {
249
- width: auto;
250
- min-width: 100%;
251
- }
252
- .hide-text-overflow{
253
- overflow: hidden;
254
- text-overflow: ellipsis
255
- }
256
- .select-style {
257
- border: 0px;
258
- /*border-bottom: 2px solid #C9CCCF;*/
259
- border: 1px solid #93B2D3;
260
- border-radius: 0px;
261
- color: #555;
262
- }
263
- </style>
1
+ <template>
2
+ <dropdown :model='model' class="auto" id="res-tree" v-if="!islist" v-el:dropdown :style="{width:width}">
3
+ <button type="button" class="btn btn-default dropdown-toggle select-style" data-toggle="dropdown">
4
+ <span class='btn-content' :style="{textOverflow:'ellipsis',overflow: 'hidden'}">{{ orgnames }}</span>
5
+ <span class="caret"></span>
6
+ </button>
7
+ <div class="dropdown-menu auto" style="width:auto;max-height: 500px;overflow: auto" >
8
+ <input type="text" placeholder="Search"
9
+ placeholder='请输入'
10
+ slot="dropdown-menu"
11
+ v-model="searchText"
12
+ class="form-control" autocomplete="off"
13
+ @keydown.enter="buluer(searchText)">
14
+ <tree :filter="strsign" :model='model' v-ref:tree :is-click="false" role="menu">
15
+ <span partial>
16
+ <span class="glyphicon glyphicon-chevron-down" v-show="row.open&&row.data.children.length>0" style="color:balck;"></span>
17
+ <span class="glyphicon glyphicon-chevron-right" v-show="!row.open&&row.data.children.length>0" style="color:balck;"></span>
18
+ <span class="RightTreeCanSelect" v-if="row.data.hasright" @click.stop="$parent.$parent.$parent.selectclick(row.data)">{{row.data.name}}</span>
19
+ <span class="RightTreeCanNotSelect" v-else>{{row.data.name}}</span>
20
+ <span class="glyphicon glyphicon-ok " v-if="$parent.$parent.$parent.isSelect(row.data.id)" style="color:balck;"></span>
21
+ </span>
22
+ </tree>
23
+ </div>
24
+
25
+ </dropdown>
26
+ <v-select v-if="islist"
27
+ placeholder='请选择'
28
+ :options='childrenOptions'
29
+ @change="selectclick"
30
+ :value-single="true"
31
+ close-on-select></v-select>
32
+ </template>
33
+ <script>
34
+ import co from 'co'
35
+ import { PagedList, HttpResetClass } from 'vue-client'
36
+ import * as ldapHelper from '../../util/LdapHelper'
37
+
38
+ let saveGen = function * (self) {
39
+ //获取分公司树
40
+ let data = {
41
+ source: self.source,
42
+ userid: self.userid
43
+ }
44
+ let http = new HttpResetClass()
45
+ let ret = yield http.load('POST', `${self.Url}/rs/search`, data, {resolveMsg: null, rejectMsg: null})
46
+ // 去掉前面的两层节点
47
+ ret.data[0].children[0].children.forEach((item) => {
48
+ self.model.push(item)
49
+ })
50
+ // 给资源添加父关系
51
+ ldapHelper.procParent(self.model)
52
+ // 树转列
53
+ if (self.islist) {
54
+ self.treetoList(self.model)
55
+ }
56
+ if(self.initresid&&self.initresid.length>0){
57
+ self.initTreetoList(self.model)
58
+ self.childrenOptions.forEach((item) => {
59
+ if(item.id==self.initresid[0]){
60
+ self.model=[]
61
+ self.model.push(item)
62
+ self.selectclick(item)
63
+ }
64
+ })
65
+ }
66
+ self.selectRes()
67
+ }
68
+ export default {
69
+ title: '资源树',
70
+ props: {
71
+ searchText:'',
72
+ strsign:'',
73
+ source: {
74
+ type: String,
75
+ require: true,
76
+ default:`tool.getFullTree(this.getRights().where(row.getType() == $organization$))`
77
+ },
78
+ //资源初始化数据
79
+ initresid: {
80
+ type: Array,
81
+ default() { return [] },
82
+ },
83
+ resid: {
84
+ },
85
+ islist: {
86
+ type: Boolean,
87
+ default: false
88
+ },
89
+ //是否有查看上级的权限
90
+ Url:{
91
+ type: String,
92
+ default:''
93
+ },
94
+ width:{
95
+ type:String,
96
+ default:'60%'
97
+ }
98
+ },
99
+ data () {
100
+ return {
101
+ resobj:{res:this.$login.f.orgs, resids:this.$login.f.orgid},
102
+ userid: this.$login.f.id,
103
+ resname:[this.$login.f.orgs],
104
+ orgnames : "请选择",
105
+ //单选点击 返回所有子
106
+ orgids : null,
107
+ orgobj:null,
108
+ model: [
109
+
110
+ ],
111
+ childrenOptions: []
112
+ }
113
+ },
114
+ methods: {
115
+ selectRes () {
116
+ let newobj={
117
+ "res": [this.resname],
118
+ "resids": [this.orgids],
119
+ }
120
+ this.$emit('re-res', newobj)
121
+ },
122
+ //树形结构变成list
123
+ initTreetoList(val) {
124
+ for (let value of val) {
125
+ this.initErgodicList(value)
126
+ }
127
+ },
128
+ //找到跟节点
129
+ initErgodicList (val) {
130
+ if(val.children.length > 0){
131
+ this.childrenOptions.push(val)
132
+ this.treetoList(val.children)
133
+ }else{
134
+ this.childrenOptions.push(val)
135
+ }
136
+ },
137
+ async buluer (val) {
138
+ this.strsign=val
139
+ await new Promise(resolve => {
140
+ this.$nextTick(() => {
141
+ resolve()
142
+ })
143
+ })
144
+ },
145
+ //点击资源的方法
146
+ selectclick (row) {
147
+ if(this.orgids==row.id){
148
+ //取消点击
149
+ this.orgnames="请选择"
150
+ this.orgids=null
151
+ this.orgobj=null
152
+ let newobj={
153
+ "res": [],
154
+ "resids": [],
155
+ "orgobj": [],
156
+ }
157
+ this.$emit('re-res', newobj)
158
+ }else{
159
+ //点中点击
160
+ this.orgnames=row.name
161
+ this.orgids=row.id
162
+ this.orgobj=row
163
+ let objs=[]
164
+ let objids=[]
165
+ let objnames=[]
166
+ this.addResChild(row,objs)
167
+ objs.forEach((item) => {
168
+ objids.push(item.id)
169
+ objnames.push(item.name)
170
+ })
171
+ let newobj={
172
+ "res": objnames,
173
+ "resids": objids,
174
+ "orgobj": objs,
175
+ }
176
+ this.$emit('re-res', newobj)
177
+ }
178
+ },
179
+ addResChild(val,objs){
180
+ objs.push(val)
181
+ if(val.children && val.children.length>0){
182
+ Object.keys(val.children).forEach((key) => {
183
+ this.addResChild(val.children[key],objs)
184
+ })
185
+ }
186
+ return objs
187
+ },
188
+ //检查是否显示对勾
189
+ isSelect(val) {
190
+ if(this.orgids==val){
191
+ return true
192
+ }else{
193
+ return false
194
+ }
195
+ },
196
+ //树形结构变成list
197
+ treetoList(val) {
198
+ for (let value of val) {
199
+ this.ergodicList(value)
200
+ }
201
+ },
202
+ //找到跟节点
203
+ ergodicList (val) {
204
+ val.children.length > 0 ? this.treetoList(val.children) : this.childrenOptions.push({label: val.name, value: val})
205
+ },
206
+ //处理显示默认值
207
+ dealResObj (val) {
208
+ try{
209
+ var arr=val.res.split(".")
210
+ //截取最后一个分公司名字
211
+ this.resname=arr[arr.length-1].toString()
212
+ this.orgnames=arr[arr.length-1].toString()
213
+ this.resid = val.resids
214
+ this.orgids = val.resids
215
+ }catch (e){
216
+ this.resname='请选择组织'
217
+ }
218
+ },
219
+ judgBoundary(){
220
+ //判断是否超出边界,超出移动
221
+ if(document.documentElement.offsetWidth< this.$els.dropdown.getBoundingClientRect().right){
222
+ this.left = document.documentElement.offsetWidth - this.$els.dropdown.getBoundingClientRect().right - 25
223
+ }
224
+ }
225
+ },
226
+ events: {
227
+
228
+ },
229
+ ready () {
230
+ this.dealResObj (this.resobj)
231
+ let gen = saveGen(this)
232
+ return co(gen)
233
+ },
234
+ watch: {
235
+ }
236
+ }
237
+ </script>
238
+ <style lang="less">
239
+ #res-tree {
240
+ .list-group-item {
241
+ background-color: #FFF;
242
+ color: #000;
243
+ padding: 5px 10px;
244
+ border:0px;
245
+ white-space: nowrap;
246
+ }
247
+ }
248
+ #res-tree .list-group {
249
+ width: auto;
250
+ min-width: 100%;
251
+ }
252
+ .hide-text-overflow{
253
+ overflow: hidden;
254
+ text-overflow: ellipsis
255
+ }
256
+ .select-style {
257
+ border: 0px;
258
+ /*border-bottom: 2px solid #C9CCCF;*/
259
+ border: 1px solid #93B2D3;
260
+ border-radius: 0px;
261
+ color: #555;
262
+ }
263
+ </style>