system-clients 1.6.40 → 1.6.41-ezhou

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.
package/build.gradle CHANGED
@@ -1,4 +1,4 @@
1
- version = '1.6.19'
1
+ version = '1.6.18'
2
2
 
3
3
  task release(type:Exec) {
4
4
  workingDir '.'
package/package.json CHANGED
@@ -1,102 +1,103 @@
1
- {
2
- "name": "system-clients",
3
- "version": "1.6.40",
4
- "description": "系统基础框架",
5
- "main": "src/index.js",
6
- "directories": {
7
- "example": "examples",
8
- "test": "test"
9
- },
10
- "scripts": {
11
- "example": "node build/example-server.js",
12
- "dev": "node build/dev-server.js",
13
- "lint": "eslint src/**.js test/e2e/**.js test/unit/specs/** build/**.js",
14
- "build": "rimraf dist && mkdirp dist && ncp static dist/static && cross-env NODE_ENV=production webpack --progress --hide-modules --config build/webpack.prod.conf.js",
15
- "e2e": "node test/e2e/runner.js",
16
- "unit": "karma start test/unit/karma.conf.js",
17
- "release": "npm set registry http://registry.npmjs.org && npm publish && npm set registry http://registry.npm.taobao.org"
18
- },
19
- "dependencies": {
20
- "base64-js": "^1.3.0",
21
- "js-base64": "^2.4.9",
22
- "jsencrypt": "^3.0.0-rc.1",
23
- "less": "^2.7.1",
24
- "less-loader": "^2.2.3",
25
- "src": "^1.1.2",
26
- "vue": "^1.0.17"
27
- },
28
- "devDependencies": {
29
- "babel-core": "^6.0.0",
30
- "babel-loader": "^6.0.0",
31
- "babel-plugin-transform-runtime": "^6.0.0",
32
- "babel-preset-es2015": "^6.0.0",
33
- "babel-preset-stage-2": "^6.0.0",
34
- "chai": "^3.5.0",
35
- "connect-history-api-fallback": "^1.1.0",
36
- "cross-env": "^1.0.7",
37
- "cross-spawn": "^2.1.5",
38
- "css-loader": "^0.23.0",
39
- "eslint": "^2.0.0",
40
- "eslint-config-standard": "^5.1.0",
41
- "eslint-friendly-formatter": "^1.2.2",
42
- "eslint-loader": "^1.3.0",
43
- "eslint-plugin-html": "^1.3.0",
44
- "eslint-plugin-promise": "^1.0.8",
45
- "eslint-plugin-standard": "^1.3.2",
46
- "eslint-plugin-vue": "^0.1.1",
47
- "eventsource-polyfill": "^0.9.6",
48
- "express": "^4.13.3",
49
- "extract-text-webpack-plugin": "^1.0.1",
50
- "file-loader": "^0.8.4",
51
- "function-bind": "^1.0.2",
52
- "html-webpack-plugin": "^2.8.1",
53
- "http-proxy-middleware": "^0.11.0",
54
- "inject-loader": "^2.0.1",
55
- "isparta-loader": "^2.0.0",
56
- "jasmine-core": "^2.4.1",
57
- "jquery": "^3.3.1",
58
- "json-loader": "^0.5.4",
59
- "karma": "^1.4.1",
60
- "karma-chrome-launcher": "^2.2.0",
61
- "karma-coverage": "^1.1.1",
62
- "karma-mocha": "^1.3.0",
63
- "karma-sinon-chai": "^1.3.1",
64
- "karma-sourcemap-loader": "^0.3.7",
65
- "karma-spec-reporter": "0.0.31",
66
- "karma-webpack": "^2.0.2",
67
- "manage-client": "^1.4.20",
68
- "mkdirp": "^0.5.1",
69
- "mocha": "^3.2.0",
70
- "ncp": "^2.0.0",
71
- "nightwatch": "^0.8.18",
72
- "rimraf": "^2.5.0",
73
- "selenium-server": "2.52.0",
74
- "sinon": "^2.1.0",
75
- "sinon-chai": "^2.8.0",
76
- "style": "0.0.3",
77
- "style-loader": "^0.20.3",
78
- "url-loader": "^0.5.7",
79
- "vue-client": "^1.18.5",
80
- "vue-hot-reload-api": "^1.2.0",
81
- "vue-html-loader": "^1.0.0",
82
- "vue-loader": "^8.2.1",
83
- "vue-resource": "^1.5.0",
84
- "vue-router": "^0.7.13",
85
- "vue-strap": "^1.0.9",
86
- "vue-style-loader": "^1.0.0",
87
- "vue-validator": "^3.0.0-alpha.2",
88
- "webpack": "^1.12.2",
89
- "webpack-dev-middleware": "^1.4.0",
90
- "webpack-hot-middleware": "^2.6.0",
91
- "webpack-merge": "^0.8.3"
92
- },
93
- "repository": {
94
- "type": "git",
95
- "url": "https://gitee.com/aotu/System"
96
- },
97
- "keywords": [
98
- "system_clients"
99
- ],
100
- "author": "杨文宇",
101
- "license": "ISC"
102
- }
1
+ {
2
+ "name": "system-clients",
3
+ "version": "1.6.41-ezhou",
4
+ "description": "系统基础框架",
5
+ "main": "src/index.js",
6
+ "directories": {
7
+ "example": "examples",
8
+ "test": "test"
9
+ },
10
+ "scripts": {
11
+ "example": "node build/example-server.js",
12
+ "dev": "node build/dev-server.js",
13
+ "lint": "eslint src/**.js test/e2e/**.js test/unit/specs/** build/**.js",
14
+ "build": "rimraf dist && mkdirp dist && ncp static dist/static && cross-env NODE_ENV=production webpack --progress --hide-modules --config build/webpack.prod.conf.js",
15
+ "e2e": "node test/e2e/runner.js",
16
+ "unit": "karma start test/unit/karma.conf.js",
17
+ "release": "npm set registry http://registry.npmjs.org && npm publish && npm set registry http://registry.npm.taobao.org"
18
+ },
19
+ "dependencies": {
20
+ "base64-js": "^1.3.0",
21
+ "js-base64": "^2.4.9",
22
+ "jsencrypt": "^3.0.0-rc.1",
23
+ "less": "^2.7.1",
24
+ "less-loader": "^2.2.3",
25
+ "src": "^1.1.2",
26
+ "vue": "^1.0.17"
27
+ },
28
+ "devDependencies": {
29
+ "babel-core": "^6.0.0",
30
+ "babel-loader": "^6.0.0",
31
+ "babel-plugin-transform-runtime": "^6.0.0",
32
+ "babel-preset-es2015": "^6.0.0",
33
+ "babel-preset-stage-2": "^6.0.0",
34
+ "chai": "^3.5.0",
35
+ "connect-history-api-fallback": "^1.1.0",
36
+ "cross-env": "^1.0.7",
37
+ "cross-spawn": "^2.1.5",
38
+ "css-loader": "^0.23.0",
39
+ "eslint": "^2.0.0",
40
+ "eslint-config-standard": "^5.1.0",
41
+ "eslint-friendly-formatter": "^1.2.2",
42
+ "eslint-loader": "^1.3.0",
43
+ "eslint-plugin-html": "^1.3.0",
44
+ "eslint-plugin-promise": "^1.0.8",
45
+ "eslint-plugin-standard": "^1.3.2",
46
+ "eslint-plugin-vue": "^0.1.1",
47
+ "eventsource-polyfill": "^0.9.6",
48
+ "express": "^4.13.3",
49
+ "extract-text-webpack-plugin": "^1.0.1",
50
+ "file-loader": "^0.8.4",
51
+ "function-bind": "^1.0.2",
52
+ "html-webpack-plugin": "^2.8.1",
53
+ "http-proxy-middleware": "^0.11.0",
54
+ "inject-loader": "^2.0.1",
55
+ "isparta-loader": "^2.0.0",
56
+ "jasmine-core": "^2.4.1",
57
+ "jquery": "^3.3.1",
58
+ "json-loader": "^0.5.4",
59
+ "jsencrypt": "3.0.0-rc.1",
60
+ "karma": "^1.4.1",
61
+ "karma-chrome-launcher": "^2.2.0",
62
+ "karma-coverage": "^1.1.1",
63
+ "karma-mocha": "^1.3.0",
64
+ "karma-sinon-chai": "^1.3.1",
65
+ "karma-sourcemap-loader": "^0.3.7",
66
+ "karma-spec-reporter": "0.0.31",
67
+ "karma-webpack": "^2.0.2",
68
+ "manage-client": "^1.4.20",
69
+ "mkdirp": "^0.5.1",
70
+ "mocha": "^3.2.0",
71
+ "ncp": "^2.0.0",
72
+ "nightwatch": "^0.8.18",
73
+ "rimraf": "^2.5.0",
74
+ "selenium-server": "2.52.0",
75
+ "sinon": "^2.1.0",
76
+ "sinon-chai": "^2.8.0",
77
+ "style": "0.0.3",
78
+ "style-loader": "^0.20.3",
79
+ "url-loader": "^0.5.7",
80
+ "vue-client": "1.22.26-ezhou",
81
+ "vue-hot-reload-api": "^1.2.0",
82
+ "vue-html-loader": "^1.0.0",
83
+ "vue-loader": "^8.2.1",
84
+ "vue-resource": "^1.5.0",
85
+ "vue-router": "^0.7.13",
86
+ "vue-strap": "^1.0.9",
87
+ "vue-style-loader": "^1.0.0",
88
+ "vue-validator": "^3.0.0-alpha.2",
89
+ "webpack": "^1.12.2",
90
+ "webpack-dev-middleware": "^1.4.0",
91
+ "webpack-hot-middleware": "^2.6.0",
92
+ "webpack-merge": "^0.8.3"
93
+ },
94
+ "repository": {
95
+ "type": "git",
96
+ "url": "https://gitee.com/aotu/System"
97
+ },
98
+ "keywords": [
99
+ "system_clients"
100
+ ],
101
+ "author": "杨文宇",
102
+ "license": "ISC"
103
+ }
@@ -2,53 +2,49 @@
2
2
  <div class='over'>
3
3
  <tree :model='functions' :is-click="false" v-ref:tree @toggle="toggled">
4
4
  <span partial :class="{ 'tree-img': isFolder(row), 'tree-span': !isFolder(row) }">
5
- <img v-if="isFolder(row)" :src="row.data.icon" alt="">{{row.data.name}}
5
+ <img v-if="isFolder(row)" :src="row.data.icon" alt="">{{ row.data.name }}
6
6
  </span>
7
7
  </tree>
8
8
  </div>
9
9
  </template>
10
10
  <script>
11
- import Vue from 'vue'
11
+ import Vue from 'vue'
12
12
 
13
13
  export default {
14
- props: ['functions', 'userid','tabs'],
14
+ props: ['functions', 'userid', 'tabs'],
15
15
  title: '左侧树菜单',
16
- data () {
16
+ data() {
17
17
  return {
18
18
  index: -1,
19
19
  name: null,
20
- tbcg:[]
20
+ tbcg: []
21
21
  }
22
22
  },
23
23
  methods: {
24
- open (row) {
24
+ open(row) {
25
25
  if (row.data.name === '资源管理') {
26
26
  this.$parent.changeMain(row.data.id)
27
27
  return
28
28
  }
29
29
  if (row.data.navigate) {
30
- let isExist = false
31
- this.tbcg.forEach((tab) => {
32
- if(tab.comp.name == row.data.link) {
33
- isExist = true
34
- }
35
- })
36
- if (!isExist){
37
- this.$goto('embbed-page', {domainName: row.data.navigate, title: row.data.name, compName: row.data.link, login: Vue.$login, param: Vue.$appdata}, 'main')
38
- }else {
39
- this.$emit('isnodo',row.data.link)
40
- }
30
+ this.$goto('embbed-page', {
31
+ domainName: row.data.navigate,
32
+ title: row.data.name,
33
+ compName: row.data.link,
34
+ login: Vue.$login,
35
+ param: Vue.$appdata
36
+ }, 'main')
41
37
  } else if (row.data.link) {
42
38
  let isExist = false
43
39
  this.tbcg.forEach((tab) => {
44
- if(tab.comp.name == row.data.link) {
40
+ if (tab.comp.name == row.data.link) {
45
41
  isExist = true
46
42
  }
47
43
  })
48
- if (!isExist){
44
+ if (!isExist) {
49
45
  this.$goto(row.data.link, {f: this.functions}, 'main')
50
- }else {
51
- this.$emit('isnodo',row.data.link)
46
+ } else {
47
+ this.$emit('isnodo', row.data.link)
52
48
  }
53
49
  }
54
50
  },
@@ -63,19 +59,19 @@ export default {
63
59
  // 当前激活页签有,index为-1,说明菜单收缩
64
60
  this.changeSelected(index)
65
61
  },
66
- selfFindIndex (name) {
62
+ selfFindIndex(name) {
67
63
  return this.$refs.tree.toNode.findIndex((item) => {
68
64
  return item.data.link === name
69
65
  })
70
66
  },
71
- changeSelected (index) {
67
+ changeSelected(index) {
72
68
  if (index === -1) {
73
69
  this.$refs.tree.selectStore.select(null)
74
- }else {
70
+ } else {
75
71
  this.$refs.tree.selectStore.select(this.$refs.tree.toNode[index])
76
72
  }
77
73
  },
78
- toggled () {
74
+ toggled() {
79
75
  if (this.name && this.index === -1) {
80
76
  let index = this.selfFindIndex(this.name)
81
77
  if (index !== -1) {
@@ -90,8 +86,8 @@ export default {
90
86
  this.open(data.val)
91
87
  }
92
88
  },
93
- watch:{
94
- 'tabs'(val){
89
+ watch: {
90
+ 'tabs'(val) {
95
91
  this.tbcg = val
96
92
  }
97
93
  }
@@ -77,6 +77,8 @@
77
77
  <modal> -->
78
78
  <!-- 注册模态框结束 -->
79
79
  <!--<load-data @ready="onReady"></load-data>-->
80
+ <!-- 修改密码组件 -->
81
+ <modify-pw :show.sync="modifyPwShow" v-if="modifyPwShow"></modify-pw>
80
82
  </div>
81
83
  </template>
82
84
 
@@ -121,8 +123,15 @@
121
123
  throw new Error('Mac地址验证失败, 请联系管理员!!')
122
124
  }
123
125
  }
124
-
125
- self.$goto('home-page', {functions: self.$login.f})
126
+ // 弱口令验证
127
+ //跳转过来的不进行验证
128
+ if (self.config.weakPassword && !(/^(?:(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*[^A-Za-z0-9])).{8,16}$/.test(self.model.password))) {
129
+ self.$showMessage('登录系统: 此账户的密码过于简单,请修改密码后重新登陆!!!', ['confirm']).then((res) => {
130
+ self.modifyPwShow = true
131
+ })
132
+ } else {
133
+ self.$goto('home-page', {functions: self.$login.f})
134
+ }
126
135
  } catch (ret) {
127
136
  console.error('登录失败', ret)
128
137
  let msg
@@ -162,8 +171,10 @@
162
171
  data () {
163
172
  return {
164
173
  config: {
165
- isMac: false
174
+ isMac: false,
175
+ weakPassword:true
166
176
  },
177
+ modifyPwShow :false,
167
178
  login: false,
168
179
  model: {},
169
180
  show: false,
@@ -1,159 +1,159 @@
1
- <template>
2
- <dropdown :model='model' class="auto" id="res-tree" v-if="!islist">
3
- <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
4
- <span>{{ resname }}</span>
5
- <span class="caret"></span>
6
- </button>
7
- <tree :model='model' :is-click="false" slot="dropdown-menu" class="dropdown-menu auto" role="menu">
8
- <span partial>
9
- <span class="glyphicon glyphicon-chevron-up" v-show="row.open&&row.data.children.length>0" style="color:balck;"></span>
10
- <span class="glyphicon glyphicon-chevron-down" v-show="!row.open&&row.data.children.length>0" style="color:balck;"></span>
11
- <span class="RightTreeCanSelect" v-if="row.data.hasright" @click.stop="$parent.$parent.$parent.selectclick(row.data)">{{row.data.name}}</span>
12
- <span class="RightTreeCanNotSelect" v-else>{{row.data.name}}</span>
13
- <span class="glyphicon glyphicon-ok " v-show="$parent.$parent.$parent.isSelect(row.data.name)" style="color:balck;"></span>
14
- </span>
15
- </tree>
16
- </dropdown>
17
- <v-select v-if="islist"
18
- placeholder='请选择'
19
- :options='childrenOptions'
20
- @change="selectclick"
21
- :value-single="true"
22
- close-on-select clear-button></v-select>
23
- </template>
24
- <script>
25
- import co from 'co'
26
- import { PagedList, HttpResetClass } from 'vue-client'
27
- import * as ldapHelper from '../../util/LdapHelper'
28
-
29
- let saveGen = function * (self) {
30
- //获取分公司树
31
- let data = {
32
- source: self.source,
33
- userid: self.userid
34
- }
35
- let http = new HttpResetClass()
36
- let ret = yield http.load('POST', `${self.Url}/rs/search`, data, {resolveMsg: null, rejectMsg: null})
37
- // 去掉前面的两层节点
38
- ret.data[0].children[0].children.forEach((item) => {
39
- self.model.push(item)
40
- })
41
- // 给资源添加父关系
42
- ldapHelper.procParent(self.model)
43
- if (self.islist) {
44
- self.treetoList(self.model)
45
- }
46
- self.selectRes()
47
- }
48
-
49
- export default {
50
- title: '资源树',
51
- props: {
52
- userid: {
53
- type: String,
54
- require: true
55
- },
56
- source: {
57
- type: String,
58
- require: true
59
- },
60
- resname: {
61
- default: '请选择组织'
62
- },
63
- resid: {
64
- },
65
- resobj:{
66
- type: Object,
67
- },
68
- islist: {
69
- type: Boolean,
70
- default: false
71
- },
72
- //是否有查看上级的权限
73
- Url:{
74
- type: String,
75
- default:''
76
- }
77
- },
78
- data () {
79
- return {
80
- model: [
81
-
82
- ],
83
- childrenOptions: []
84
- }
85
- },
86
- methods: {
87
- // 当外面传入的选中对象发生变化时调用
88
- selectRes () {
89
- if (this.resid) {
90
- // 当外面传入了新的选中数据后,根据外面传入的数据进行选择
91
- let str = this.resid
92
- let res = ldapHelper.find(this.model, str.substring(0, str.length - 1))
93
- this.selectclick(res)
94
- }
95
- },
96
- //点击资源的方法
97
- selectclick (row) {
98
- this.resname = row.name
99
- let newobj={
100
- "res": ldapHelper.getFullName(row, 'name'),
101
- "resids": ldapHelper.getFullName(row, 'id') + '.',
102
- }
103
- this.$emit('re-res', newobj)
104
- },
105
- //检查是否显示对勾
106
- isSelect(val) {
107
- if(this.resname==val){
108
- return true
109
- }else{
110
- return false
111
- }
112
- },
113
- //树形结构变成list
114
- treetoList(val) {
115
- for (let value of val) {
116
- this.ergodicList(value)
117
- }
118
- },
119
- //找到跟节点
120
- ergodicList (val) {
121
- val.children.length > 0 ? this.treetoList(val.children) : this.childrenOptions.push({label: val.name, value: val})
122
- },
123
- //处理显示默认值
124
- dealResObj (val) {
125
- try{
126
- var arr=val.res.split(".")
127
- //截取最后一个分公司名字
128
- this.resname=arr[arr.length-1].toString()
129
- this.resid = val.resids
130
- }catch (e){
131
- this.resname='请选择组织'
132
- }
133
- }
134
- },
135
- events: {
136
-
137
- },
138
- ready () {
139
- this.dealResObj (this.resobj)
140
- let gen = saveGen(this)
141
- return co(gen)
142
- },
143
- watch: {
144
- }
145
- }
146
- </script>
147
- <style lang="less">
148
- #res-tree {
149
- .list-group-item {
150
- background-color: #FFF;
151
- color: #000;
152
- padding: 5px;
153
- border:0px;
154
- }
155
- }
156
- #res-tree .list-group {
157
- width: 250px;
158
- }
159
- </style>
1
+ <template>
2
+ <dropdown :model='model' class="auto" id="res-tree" v-if="!islist">
3
+ <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
4
+ <span>{{ resname }}</span>
5
+ <span class="caret"></span>
6
+ </button>
7
+ <tree :model='model' :is-click="false" slot="dropdown-menu" class="dropdown-menu auto" role="menu">
8
+ <span partial>
9
+ <span class="glyphicon glyphicon-chevron-up" v-show="row.open&&row.data.children.length>0" style="color:balck;"></span>
10
+ <span class="glyphicon glyphicon-chevron-down" v-show="!row.open&&row.data.children.length>0" style="color:balck;"></span>
11
+ <span class="RightTreeCanSelect" v-if="row.data.hasright" @click.stop="$parent.$parent.$parent.selectclick(row.data)">{{row.data.name}}</span>
12
+ <span class="RightTreeCanNotSelect" v-else>{{row.data.name}}</span>
13
+ <span class="glyphicon glyphicon-ok " v-show="$parent.$parent.$parent.isSelect(row.data.name)" style="color:balck;"></span>
14
+ </span>
15
+ </tree>
16
+ </dropdown>
17
+ <v-select v-if="islist"
18
+ placeholder='请选择'
19
+ :options='childrenOptions'
20
+ @change="selectclick"
21
+ :value-single="true"
22
+ close-on-select clear-button></v-select>
23
+ </template>
24
+ <script>
25
+ import co from 'co'
26
+ import { PagedList, HttpResetClass } from 'vue-client'
27
+ import * as ldapHelper from '../../util/LdapHelper'
28
+
29
+ let saveGen = function * (self) {
30
+ //获取分公司树
31
+ let data = {
32
+ source: self.source,
33
+ userid: self.userid
34
+ }
35
+ let http = new HttpResetClass()
36
+ let ret = yield http.load('POST', `${self.Url}/rs/search`, data, {resolveMsg: null, rejectMsg: null})
37
+ // 去掉前面的两层节点
38
+ ret.data[0].children[0].children.forEach((item) => {
39
+ self.model.push(item)
40
+ })
41
+ // 给资源添加父关系
42
+ ldapHelper.procParent(self.model)
43
+ if (self.islist) {
44
+ self.treetoList(self.model)
45
+ }
46
+ self.selectRes()
47
+ }
48
+
49
+ export default {
50
+ title: '资源树',
51
+ props: {
52
+ userid: {
53
+ type: String,
54
+ require: true
55
+ },
56
+ source: {
57
+ type: String,
58
+ require: true
59
+ },
60
+ resname: {
61
+ default: '请选择组织'
62
+ },
63
+ resid: {
64
+ },
65
+ resobj:{
66
+ type: Object,
67
+ },
68
+ islist: {
69
+ type: Boolean,
70
+ default: false
71
+ },
72
+ //是否有查看上级的权限
73
+ Url:{
74
+ type: String,
75
+ default:''
76
+ }
77
+ },
78
+ data () {
79
+ return {
80
+ model: [
81
+
82
+ ],
83
+ childrenOptions: []
84
+ }
85
+ },
86
+ methods: {
87
+ // 当外面传入的选中对象发生变化时调用
88
+ selectRes () {
89
+ if (this.resid) {
90
+ // 当外面传入了新的选中数据后,根据外面传入的数据进行选择
91
+ let str = this.resid
92
+ let res = ldapHelper.find(this.model, str.substring(0, str.length - 1))
93
+ this.selectclick(res)
94
+ }
95
+ },
96
+ //点击资源的方法
97
+ selectclick (row) {
98
+ this.resname = row.name
99
+ let newobj={
100
+ "res": ldapHelper.getFullName(row, 'name'),
101
+ "resids": ldapHelper.getFullName(row, 'id') + '.',
102
+ }
103
+ this.$emit('re-res', newobj)
104
+ },
105
+ //检查是否显示对勾
106
+ isSelect(val) {
107
+ if(this.resname==val){
108
+ return true
109
+ }else{
110
+ return false
111
+ }
112
+ },
113
+ //树形结构变成list
114
+ treetoList(val) {
115
+ for (let value of val) {
116
+ this.ergodicList(value)
117
+ }
118
+ },
119
+ //找到跟节点
120
+ ergodicList (val) {
121
+ val.children.length > 0 ? this.treetoList(val.children) : this.childrenOptions.push({label: val.name, value: val})
122
+ },
123
+ //处理显示默认值
124
+ dealResObj (val) {
125
+ try{
126
+ var arr=val.res.split(".")
127
+ //截取最后一个分公司名字
128
+ this.resname=arr[arr.length-1].toString()
129
+ this.resid = val.resids
130
+ }catch (e){
131
+ this.resname='请选择组织'
132
+ }
133
+ }
134
+ },
135
+ events: {
136
+
137
+ },
138
+ ready () {
139
+ this.dealResObj (this.resobj)
140
+ let gen = saveGen(this)
141
+ return co(gen)
142
+ },
143
+ watch: {
144
+ }
145
+ }
146
+ </script>
147
+ <style lang="less">
148
+ #res-tree {
149
+ .list-group-item {
150
+ background-color: #FFF;
151
+ color: #000;
152
+ padding: 5px;
153
+ border:0px;
154
+ }
155
+ }
156
+ #res-tree .list-group {
157
+ width: 250px;
158
+ }
159
+ </style>
@@ -1,42 +1,42 @@
1
- <template>
2
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
3
- <label class="control-label">组织机构</label>
4
- <right-tree :userid.sync='obj.userid'
5
- :source.sync='obj.source'
6
- :resobj='obj'
7
- @re-res="getRes"></right-tree>
8
- </div>
9
- </template>
10
- <script>
11
- import { PagedList, HttpResetClass } from 'vue-client'
12
-
13
- export default {
14
- title: '资源树菜单',
15
- props: {
16
- },
17
- data () {
18
- return {
19
- obj: {
20
- userid: this.$login.f.id,
21
- source: `tool.getFullTree(this.getRights().where(row.getType() == $organization$))`,
22
- res: this.$login.f.f_fengongsi,
23
- resids: this.$login.f.f_orgids
24
- },
25
- }
26
- },
27
- ready () {
28
- //this.getRes1()
29
- },
30
- methods:{
31
- getRes (obj) {
32
- this.obj.res = obj.res
33
- this.obj.resids = obj.resids
34
- },
35
- },
36
- watch: {
37
-
38
- },
39
- }
40
- </script>
41
- <style media="screen">
42
- </style>
1
+ <template>
2
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
3
+ <label class="control-label">组织机构</label>
4
+ <right-tree :userid.sync='obj.userid'
5
+ :source.sync='obj.source'
6
+ :resobj='obj'
7
+ @re-res="getRes"></right-tree>
8
+ </div>
9
+ </template>
10
+ <script>
11
+ import { PagedList, HttpResetClass } from 'vue-client'
12
+
13
+ export default {
14
+ title: '资源树菜单',
15
+ props: {
16
+ },
17
+ data () {
18
+ return {
19
+ obj: {
20
+ userid: this.$login.f.id,
21
+ source: `tool.getFullTree(this.getRights().where(row.getType() == $organization$))`,
22
+ res: this.$login.f.f_fengongsi,
23
+ resids: this.$login.f.f_orgids
24
+ },
25
+ }
26
+ },
27
+ ready () {
28
+ //this.getRes1()
29
+ },
30
+ methods:{
31
+ getRes (obj) {
32
+ this.obj.res = obj.res
33
+ this.obj.resids = obj.resids
34
+ },
35
+ },
36
+ watch: {
37
+
38
+ },
39
+ }
40
+ </script>
41
+ <style media="screen">
42
+ </style>
@@ -0,0 +1,30 @@
1
+ import AesEncryptJS from "crypto-js"
2
+
3
+ export default {
4
+ /**
5
+ * AES加密
6
+ * @param word
7
+ * @returns {*}
8
+ */
9
+ AESEncrypt(word, encryKey){
10
+ var key = AesEncryptJS.enc.Utf8.parse(encryKey);
11
+ var srcs = AesEncryptJS.enc.Utf8.parse(word);
12
+ var encrypted = AesEncryptJS.AES.encrypt(srcs, key, {mode:AesEncryptJS.mode.ECB,padding: AesEncryptJS.pad.Pkcs7});
13
+ return encrypted.toString();
14
+ },
15
+ /**
16
+ * AES解密
17
+ * @param word
18
+ * @returns {*}
19
+ */
20
+ AESDecrypt(word, encryKey){
21
+ var key = AesEncryptJS.enc.Utf8.parse(encryKey);
22
+ var decrypt = AesEncryptJS.AES.decrypt(word, key, {mode:AesEncryptJS.mode.ECB,padding: AesEncryptJS.pad.Pkcs7});
23
+ var ret = AesEncryptJS.enc.Utf8.stringify(decrypt).toString();
24
+ try{
25
+ return JSON.parse(ret) ;
26
+ }catch (e){
27
+ return ret
28
+ }
29
+ },
30
+ }
@@ -1,15 +1,17 @@
1
1
  import Vue from 'vue'
2
2
  import JSEncrypt from 'jsencrypt'
3
3
  import {HttpResetClass} from 'vue-client'
4
+ import cryptJS from './EncryptUtil'
4
5
 
5
6
  let loginGen = async function (name, password) {
6
7
  let data = {name: name, password: password}
7
8
  // rsa加密
8
9
  let encrypt = new JSEncrypt();
9
10
  encrypt.setPublicKey('MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqPvovSfXcwBbW8cKMCgwqNpsYuzF8RPAPFb7LGsnVo44JhM/xxzDyzoYtdfNmtbIuKVi9PzIsyp6rg+09gbuI6UGwBZ5DWBDBMqv5MPdOF5dCQkB2Bbr5yPfURPENypUz+pBFBg41d+BC+rwRiXELwKy7Y9caD/MtJyHydj8OUwIDAQAB');
11
+ data = '$' + encrypt.encrypt(JSON.stringify(data));
10
12
  console.log(data)
11
13
 
12
- let getLogin = await Vue.resetpost('/rs/logic/getLogin', data, {resolveMsg: null, rejectMsg: null}, 'RSA')
14
+ let getLogin = await Vue.resetpost('/rs/logic/getLogin', data, {resolveMsg: null, rejectMsg: null})
13
15
  if (getLogin.data.states === '登录成功') {
14
16
  // 调用远程登录服务,获取所有有权访问的功能
15
17
  data = {username: name, password: password}
@@ -191,6 +193,7 @@ let loginGen = async function (name, password) {
191
193
  }
192
194
 
193
195
  let GetLoginInfoService = {
196
+ SinglePageToken: {},
194
197
  // 登录后要处理的异步对象
195
198
  afterLogin: [],
196
199
  //验证码开关
@@ -210,6 +213,7 @@ let GetLoginInfoService = {
210
213
  * @param password
211
214
  */
212
215
  login (name, password) {
216
+ Vue.$login.SinglePageToken = cryptJS.AESEncrypt(JSON.stringify({name: name, password: password}), "3KMKqvgwR8ULbR8Z")
213
217
  return loginGen(name, password)
214
218
  },
215
219
 
@@ -3,5 +3,5 @@ import Validator from 'vue-validator'
3
3
  Vue.use(Validator)
4
4
  //密码强度验证器(必须为为大小写字母、阿拉伯数字、字符)
5
5
  Vue.validator('strongpassword', function (val) {
6
- return /^(?:(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*[^A-Za-z0-9])).*$/.test(val)
6
+ return /^(?:(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*[^A-Za-z0-9])).{8,16}$/.test(val)
7
7
  });
package/src/system.js CHANGED
@@ -16,9 +16,9 @@ import TestResourceTree from './components/server/TestResourceTree'
16
16
  import RightTree from './components/server/RightTree'
17
17
  import TestRightTree from './components/server/TestRightTree'
18
18
  export default function (val) {
19
- //验证码开关赋值
20
- if(val!=null){
21
- GetLoginInfoService.Verification=val
19
+ // 验证码开关赋值
20
+ if (val != null) {
21
+ GetLoginInfoService.Verification = val
22
22
  }
23
23
  Vue.use(GetLoginInfoService)
24
24
  Vue.use(GetAppDataService)
@@ -35,8 +35,6 @@ export default function (val) {
35
35
  Vue.component('right-tree', RightTree)
36
36
  Vue.component('test-right-tree', TestRightTree)
37
37
 
38
-
39
-
40
38
  // 参数管理(新)
41
39
  Vue.component('param-manage', (resolve) => { require(['./components/parammanage/ParamManage'], resolve) })
42
40
  // 参数管理
package/.npmignore DELETED
@@ -1,9 +0,0 @@
1
- .idea/
2
- .DS_Store
3
- node_modules/
4
- dist/static/*.map
5
- npm-debug.log
6
- selenium-debug.log
7
- test/unit/coverage
8
- test/e2e/reports
9
- yarn.lock
package/build/.npmignore DELETED
@@ -1 +0,0 @@
1
- /dev-server.js
package/src/.npmignore DELETED
@@ -1 +0,0 @@
1
- /main.js