system-clients 4.0.11 → 4.0.12

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.
File without changes
@@ -0,0 +1,2 @@
1
+ #Thu Apr 17 15:32:17 CST 2025
2
+ gradle.version=3.5.1
package/package.json CHANGED
@@ -1,105 +1,105 @@
1
- {
2
- "name": "system-clients",
3
- "version": "4.0.11",
4
- "description": "系统基础框架",
5
- "main": "src/index.js",
6
- "directories": {
7
- "doc": "doc",
8
- "example": "examples",
9
- "test": "test"
10
- },
11
- "scripts": {
12
- "example": "node build/example-server.js",
13
- "dev": "node build/dev-server.js",
14
- "lint": "eslint src/**.js test/e2e/**.js test/unit/specs/** build/**.js",
15
- "build": "rimraf dist && mkdirp dist && ncp static dist/static && cross-env NODE_ENV=production webpack --progress --hide-modules --config build/webpack.prod.conf.js",
16
- "e2e": "node test/e2e/runner.js",
17
- "unit": "karma start test/unit/karma.conf.js",
18
- "makeall": "rimraf dist && mkdirp dist && ncp static dist/static && cross-env NODE_OPTIONS=--max_old_space_size=4096 NODE_ENV=production webpack --progress --hide-modules --config build/webpack.example.conf.js",
19
- "release": "npm set registry http://registry.npmjs.org && npm publish && npm set registry http://registry.npm.taobao.org"
20
- },
21
- "dependencies": {
22
- "base64-js": "^1.3.0",
23
- "js-base64": "^2.4.9",
24
- "less": "^2.7.1",
25
- "less-loader": "^2.2.3",
26
- "nyc": "^15.1.0",
27
- "src": "^1.1.2",
28
- "vue": "^1.0.17"
29
- },
30
- "devDependencies": {
31
- "babel-core": "^6.0.0",
32
- "babel-loader": "^6.0.0",
33
- "babel-plugin-transform-runtime": "^6.0.0",
34
- "babel-preset-es2015": "^6.0.0",
35
- "babel-preset-stage-2": "^6.0.0",
36
- "chai": "^3.5.0",
37
- "connect-history-api-fallback": "^1.1.0",
38
- "cross-env": "^1.0.7",
39
- "cross-spawn": "^2.1.5",
40
- "css-loader": "^0.23.0",
41
- "eslint": "^2.0.0",
42
- "eslint-config-standard": "^5.1.0",
43
- "eslint-friendly-formatter": "^1.2.2",
44
- "eslint-loader": "^1.3.0",
45
- "eslint-plugin-html": "^1.3.0",
46
- "eslint-plugin-promise": "^1.0.8",
47
- "eslint-plugin-standard": "^1.3.2",
48
- "eslint-plugin-vue": "^0.1.1",
49
- "eventsource-polyfill": "^0.9.6",
50
- "express": "^4.13.3",
51
- "extract-text-webpack-plugin": "^1.0.1",
52
- "file-loader": "^0.8.4",
53
- "function-bind": "^1.0.2",
54
- "html-webpack-plugin": "^2.8.1",
55
- "http-proxy-middleware": "^0.11.0",
56
- "inject-loader": "^2.0.1",
57
- "isparta-loader": "^2.0.0",
58
- "jasmine-core": "^2.4.1",
59
- "jquery": "^3.3.1",
60
- "jsencrypt": "^3.0.0-rc.1",
61
- "json-loader": "^0.5.4",
62
- "karma": "^1.4.1",
63
- "karma-chrome-launcher": "^2.2.0",
64
- "karma-coverage": "^1.1.1",
65
- "karma-mocha": "^1.3.0",
66
- "karma-sinon-chai": "^1.3.1",
67
- "karma-sourcemap-loader": "^0.3.7",
68
- "karma-spec-reporter": "0.0.31",
69
- "karma-webpack": "^2.0.2",
70
- "manage-client": "^1.4.20",
71
- "mkdirp": "^0.5.1",
72
- "mocha": "^3.2.0",
73
- "ncp": "^2.0.0",
74
- "nightwatch": "^0.8.18",
75
- "rimraf": "^2.5.0",
76
- "selenium-server": "2.52.0",
77
- "sinon": "^2.1.0",
78
- "sinon-chai": "^2.8.0",
79
- "style": "0.0.3",
80
- "style-loader": "^0.20.3",
81
- "url-loader": "^0.5.7",
82
- "vue-client": "1.24.160",
83
- "vue-hot-reload-api": "^1.2.0",
84
- "vue-html-loader": "^1.0.0",
85
- "vue-loader": "^8.2.1",
86
- "vue-resource": "^1.5.0",
87
- "vue-router": "^0.7.13",
88
- "vue-strap": "^1.0.9",
89
- "vue-style-loader": "^1.0.0",
90
- "vue-validator": "2.1.7",
91
- "webpack": "^1.12.2",
92
- "webpack-dev-middleware": "^1.4.0",
93
- "webpack-hot-middleware": "^2.6.0",
94
- "webpack-merge": "^0.8.3"
95
- },
96
- "repository": {
97
- "type": "git",
98
- "url": "https://gitee.com/aotu/System"
99
- },
100
- "keywords": [
101
- "system_clients"
102
- ],
103
- "author": "杨文宇",
104
- "license": "ISC"
105
- }
1
+ {
2
+ "name": "system-clients",
3
+ "version": "4.0.12",
4
+ "description": "系统基础框架",
5
+ "main": "src/index.js",
6
+ "directories": {
7
+ "doc": "doc",
8
+ "example": "examples",
9
+ "test": "test"
10
+ },
11
+ "scripts": {
12
+ "example": "node build/example-server.js",
13
+ "dev": "node build/dev-server.js",
14
+ "lint": "eslint src/**.js test/e2e/**.js test/unit/specs/** build/**.js",
15
+ "build": "rimraf dist && mkdirp dist && ncp static dist/static && cross-env NODE_ENV=production webpack --progress --hide-modules --config build/webpack.prod.conf.js",
16
+ "e2e": "node test/e2e/runner.js",
17
+ "unit": "karma start test/unit/karma.conf.js",
18
+ "makeall": "rimraf dist && mkdirp dist && ncp static dist/static && cross-env NODE_OPTIONS=--max_old_space_size=4096 NODE_ENV=production webpack --progress --hide-modules --config build/webpack.example.conf.js",
19
+ "release": "npm set registry http://registry.npmjs.org && npm publish && npm set registry http://registry.npm.taobao.org"
20
+ },
21
+ "dependencies": {
22
+ "base64-js": "^1.3.0",
23
+ "js-base64": "^2.4.9",
24
+ "less": "^2.7.1",
25
+ "less-loader": "^2.2.3",
26
+ "nyc": "^15.1.0",
27
+ "src": "^1.1.2",
28
+ "vue": "^1.0.17"
29
+ },
30
+ "devDependencies": {
31
+ "babel-core": "^6.0.0",
32
+ "babel-loader": "^6.0.0",
33
+ "babel-plugin-transform-runtime": "^6.0.0",
34
+ "babel-preset-es2015": "^6.0.0",
35
+ "babel-preset-stage-2": "^6.0.0",
36
+ "chai": "^3.5.0",
37
+ "connect-history-api-fallback": "^1.1.0",
38
+ "cross-env": "^1.0.7",
39
+ "cross-spawn": "^2.1.5",
40
+ "css-loader": "^0.23.0",
41
+ "eslint": "^2.0.0",
42
+ "eslint-config-standard": "^5.1.0",
43
+ "eslint-friendly-formatter": "^1.2.2",
44
+ "eslint-loader": "^1.3.0",
45
+ "eslint-plugin-html": "^1.3.0",
46
+ "eslint-plugin-promise": "^1.0.8",
47
+ "eslint-plugin-standard": "^1.3.2",
48
+ "eslint-plugin-vue": "^0.1.1",
49
+ "eventsource-polyfill": "^0.9.6",
50
+ "express": "^4.13.3",
51
+ "extract-text-webpack-plugin": "^1.0.1",
52
+ "file-loader": "^0.8.4",
53
+ "function-bind": "^1.0.2",
54
+ "html-webpack-plugin": "^2.8.1",
55
+ "http-proxy-middleware": "^0.11.0",
56
+ "inject-loader": "^2.0.1",
57
+ "isparta-loader": "^2.0.0",
58
+ "jasmine-core": "^2.4.1",
59
+ "jquery": "^3.3.1",
60
+ "jsencrypt": "^3.0.0-rc.1",
61
+ "json-loader": "^0.5.4",
62
+ "karma": "^1.4.1",
63
+ "karma-chrome-launcher": "^2.2.0",
64
+ "karma-coverage": "^1.1.1",
65
+ "karma-mocha": "^1.3.0",
66
+ "karma-sinon-chai": "^1.3.1",
67
+ "karma-sourcemap-loader": "^0.3.7",
68
+ "karma-spec-reporter": "0.0.31",
69
+ "karma-webpack": "^2.0.2",
70
+ "manage-client": "^1.4.20",
71
+ "mkdirp": "^0.5.1",
72
+ "mocha": "^3.2.0",
73
+ "ncp": "^2.0.0",
74
+ "nightwatch": "^0.8.18",
75
+ "rimraf": "^2.5.0",
76
+ "selenium-server": "2.52.0",
77
+ "sinon": "^2.1.0",
78
+ "sinon-chai": "^2.8.0",
79
+ "style": "0.0.3",
80
+ "style-loader": "^0.20.3",
81
+ "url-loader": "^0.5.7",
82
+ "vue-client": "1.24.160",
83
+ "vue-hot-reload-api": "^1.2.0",
84
+ "vue-html-loader": "^1.0.0",
85
+ "vue-loader": "^8.2.1",
86
+ "vue-resource": "^1.5.0",
87
+ "vue-router": "^0.7.13",
88
+ "vue-strap": "^1.0.9",
89
+ "vue-style-loader": "^1.0.0",
90
+ "vue-validator": "2.1.7",
91
+ "webpack": "^1.12.2",
92
+ "webpack-dev-middleware": "^1.4.0",
93
+ "webpack-hot-middleware": "^2.6.0",
94
+ "webpack-merge": "^0.8.3"
95
+ },
96
+ "repository": {
97
+ "type": "git",
98
+ "url": "https://gitee.com/aotu/System"
99
+ },
100
+ "keywords": [
101
+ "system_clients"
102
+ ],
103
+ "author": "杨文宇",
104
+ "license": "ISC"
105
+ }
@@ -1,186 +1,186 @@
1
- <template>
2
- <v-select :options='resoptions' placeholder='请选择'
3
- :value.sync="selectres"
4
- :multiple="isMul"
5
- search="true"
6
- :disabled="mustselect"
7
- :close-on-select="!isMul"
8
- @change="resChange"
9
- >
10
- </v-select>
11
- </template>
12
- <script>
13
- import {HttpResetClass} from 'vue-client'
14
-
15
- export default {
16
- title: '资源选择',
17
- props: {
18
-
19
- //资源类型
20
- restype:'',
21
- //是否只查询营业厅
22
- specialquery: {
23
- type: Boolean,
24
- default: false
25
- },
26
- //资源数据
27
- resObj:{},
28
- isMul: {
29
- type: Boolean,
30
- default: true
31
- },
32
- //资源初始化数据
33
- initresid: {
34
- type: Array,
35
- default() { return [] },
36
- },
37
- //父层id
38
- parentresid: {
39
- type: Array,
40
- default() { return [] },
41
- },
42
- mustselect: {
43
- type: Boolean,
44
- default: false
45
- },
46
- },
47
- data () {
48
- return {
49
- //资源数据
50
- resObj:{},
51
- //资源数据列表
52
- resoptions:[],
53
- //选中资源数据
54
- selectres: [],
55
- }
56
- },
57
- ready () {
58
- //获取资源列表
59
- this.getResList()
60
- },
61
- methods:{
62
- //树形结构变成list
63
- findById(val) {
64
- if(val){
65
- if(this.checkidres(val)){
66
- this.treetoList(val,'')
67
- }else if(val.children.length>0){
68
- for (let value of val.children) {
69
- this.findById(value)
70
- }
71
- }
72
- }
73
- },
74
- //树形结构变成list
75
- treetoList(val,parentname) {
76
- for (let value of val.children) {
77
- this.ergodicList(value,parentname)
78
- }
79
- },
80
- //找到跟节点
81
- ergodicList (val,parentname) {
82
- if(val.children.length > 0 ){
83
- if (val.name !== '组织机构' && parentname !== '资源管理'){
84
- this.resoptions.push({label: parentname === '组织机构' ? val.name : val.name+' - '+parentname, value: val.id})
85
- }
86
- parentname=parentname+val.name
87
- this.treetoList(val,parentname)
88
- }else {
89
- //截取组织机构【组织机构】
90
- if(this.restype=='organization'){
91
- parentname=parentname.replace("组织机构","")
92
- this.resoptions.push({label: val.name+' - '+parentname, value: val.id})
93
- } else if (this.restype == 'department') {
94
- if (this.specialquery) {
95
- if (val.f_dep_type === '营业厅') {
96
- this.resoptions.push({label: val.name, value: val.id})
97
- }
98
- } else {
99
- if (this.$login.r.includes('部门默认选中') && this.$login.r.includes('限制查询当前部门')) {
100
- if (val.id == this.initresid[0]) {
101
- this.resoptions.push({label: val.name, value: val.id})
102
- }
103
- } else {
104
- this.resoptions.push({label: val.name, value: val.id})
105
- }
106
- }
107
- } else {
108
- this.resoptions.push({label: val.name, value: val.id})
109
- }
110
- }
111
- },
112
- //检查id是否存在
113
- checkidres(val){
114
- let flag=false
115
- //如果没传值得话 不过滤
116
- if(this.parentresid.length==0&&this.restype=='organization'){
117
- flag=true
118
- }
119
- this.parentresid.forEach((item) => {
120
- if(item==val.id){
121
- flag=true
122
- }
123
- })
124
- return flag;
125
- },
126
- //资源改变
127
- resChange(val){
128
- let orgnames=[]
129
- Object.keys(this.resoptions).forEach((key) => {
130
- if(this.selectres.includes(this.resoptions[key].value))
131
- orgnames.push(this.resoptions[key].label)
132
- })
133
- console.log('资源改变。。', val, orgnames)
134
- this.$dispatch('res-select', this.selectres, orgnames)
135
- },
136
- //获取资源数据
137
- async getResList() {
138
-
139
- let http = new HttpResetClass()
140
-
141
- let req = await http.load('POST', '/rs/search', {data: {
142
- source: `tool.getFullTree(this.getRights().where(row.getType()==$${this.restype}$))`,
143
- userid: this.$login.f.id
144
- }}, {resolveMsg: null, rejectMsg: '获取组织结构数据出错'})
145
- this.resObj=req.data[0]
146
- this.dealdata()
147
- },
148
- dealdata(){
149
- this.resoptions=[]
150
- this.findById(this.resObj);
151
- //赋值资源数据
152
- let arryselect=[]
153
- this.resoptions.forEach((item) => {
154
- if(this.initresid.length>0){
155
- this.initresid.forEach((init) => {
156
- if(item.value==init){
157
- arryselect.push(item.value)
158
- }
159
- })
160
- }
161
- })
162
- //赋值资源选中初始值
163
- this.selectres=arryselect
164
- }
165
- },
166
- watch: {
167
- //监听初始化资源id
168
- 'initresid.length'() {
169
- this.dealdata()
170
- },
171
- //监听初始化资源id
172
- 'parentresid'() {
173
- this.dealdata()
174
- },
175
- initresid: {
176
- handler(newVal, oldVal) {
177
- // 避免重复触发
178
- if (JSON.stringify(newVal) === JSON.stringify(oldVal)) {
179
- return;
180
- }
181
- this.dealdata();
182
- },
183
- }
184
- }
185
- }
186
- </script>
1
+ <template>
2
+ <v-select :options='resoptions' placeholder='请选择'
3
+ :value.sync="selectres"
4
+ :multiple="isMul"
5
+ search="true"
6
+ :disabled="mustselect"
7
+ :close-on-select="!isMul"
8
+ @change="resChange"
9
+ >
10
+ </v-select>
11
+ </template>
12
+ <script>
13
+ import {HttpResetClass} from 'vue-client'
14
+
15
+ export default {
16
+ title: '资源选择',
17
+ props: {
18
+
19
+ //资源类型
20
+ restype:'',
21
+ //是否只查询营业厅
22
+ specialquery: {
23
+ type: Boolean,
24
+ default: false
25
+ },
26
+ //资源数据
27
+ resObj:{},
28
+ isMul: {
29
+ type: Boolean,
30
+ default: true
31
+ },
32
+ //资源初始化数据
33
+ initresid: {
34
+ type: Array,
35
+ default() { return [] },
36
+ },
37
+ //父层id
38
+ parentresid: {
39
+ type: Array,
40
+ default() { return [] },
41
+ },
42
+ mustselect: {
43
+ type: Boolean,
44
+ default: false
45
+ },
46
+ },
47
+ data () {
48
+ return {
49
+ //资源数据
50
+ resObj:{},
51
+ //资源数据列表
52
+ resoptions:[],
53
+ //选中资源数据
54
+ selectres: [],
55
+ }
56
+ },
57
+ ready () {
58
+ //获取资源列表
59
+ this.getResList()
60
+ },
61
+ methods:{
62
+ //树形结构变成list
63
+ findById(val) {
64
+ if(val){
65
+ if(this.checkidres(val)){
66
+ this.treetoList(val,'')
67
+ }else if(val.children.length>0){
68
+ for (let value of val.children) {
69
+ this.findById(value)
70
+ }
71
+ }
72
+ }
73
+ },
74
+ //树形结构变成list
75
+ treetoList(val,parentname) {
76
+ for (let value of val.children) {
77
+ this.ergodicList(value,parentname)
78
+ }
79
+ },
80
+ //找到跟节点
81
+ ergodicList (val,parentname) {
82
+ if(val.children.length > 0 ){
83
+ if (val.name !== '组织机构' && parentname !== '资源管理'){
84
+ this.resoptions.push({label: parentname === '组织机构' ? val.name : val.name+' - '+parentname, value: val.id})
85
+ }
86
+ parentname=parentname+val.name
87
+ this.treetoList(val,parentname)
88
+ }else {
89
+ //截取组织机构【组织机构】
90
+ if(this.restype=='organization'){
91
+ parentname=parentname.replace("组织机构","")
92
+ this.resoptions.push({label: val.name+' - '+parentname, value: val.id})
93
+ } else if (this.restype == 'department') {
94
+ if (this.specialquery) {
95
+ if (val.f_dep_type === '营业厅') {
96
+ this.resoptions.push({label: val.name, value: val.id})
97
+ }
98
+ } else {
99
+ if (this.$login.r.includes('部门默认选中') && this.$login.r.includes('限制查询当前部门')) {
100
+ if (val.id == this.initresid[0]) {
101
+ this.resoptions.push({label: val.name, value: val.id})
102
+ }
103
+ } else {
104
+ this.resoptions.push({label: val.name, value: val.id})
105
+ }
106
+ }
107
+ } else {
108
+ this.resoptions.push({label: val.name, value: val.id})
109
+ }
110
+ }
111
+ },
112
+ //检查id是否存在
113
+ checkidres(val){
114
+ let flag=false
115
+ //如果没传值得话 不过滤
116
+ if(this.parentresid.length==0&&this.restype=='organization'){
117
+ flag=true
118
+ }
119
+ this.parentresid.forEach((item) => {
120
+ if(item==val.id){
121
+ flag=true
122
+ }
123
+ })
124
+ return flag;
125
+ },
126
+ //资源改变
127
+ resChange(val){
128
+ let orgnames=[]
129
+ Object.keys(this.resoptions).forEach((key) => {
130
+ if(this.selectres.includes(this.resoptions[key].value))
131
+ orgnames.push(this.resoptions[key].label)
132
+ })
133
+ console.log('资源改变。。', val, orgnames)
134
+ this.$dispatch('res-select', this.selectres, orgnames)
135
+ },
136
+ //获取资源数据
137
+ async getResList() {
138
+
139
+ let http = new HttpResetClass()
140
+
141
+ let req = await http.load('POST', '/rs/search', {data: {
142
+ source: `tool.getFullTree(this.getRights().where(row.getType()==$${this.restype}$))`,
143
+ userid: this.$login.f.id
144
+ }}, {resolveMsg: null, rejectMsg: '获取组织结构数据出错'})
145
+ this.resObj=req.data[0]
146
+ this.dealdata()
147
+ },
148
+ dealdata(){
149
+ this.resoptions=[]
150
+ this.findById(this.resObj);
151
+ //赋值资源数据
152
+ let arryselect=[]
153
+ this.resoptions.forEach((item) => {
154
+ if(this.initresid.length>0){
155
+ this.initresid.forEach((init) => {
156
+ if(item.value==init){
157
+ arryselect.push(item.value)
158
+ }
159
+ })
160
+ }
161
+ })
162
+ //赋值资源选中初始值
163
+ this.selectres=arryselect
164
+ }
165
+ },
166
+ watch: {
167
+ //监听初始化资源id
168
+ 'initresid.length'() {
169
+ this.dealdata()
170
+ },
171
+ //监听初始化资源id
172
+ 'parentresid'() {
173
+ this.dealdata()
174
+ },
175
+ initresid: {
176
+ handler(newVal, oldVal) {
177
+ // 避免重复触发
178
+ if (JSON.stringify(newVal) === JSON.stringify(oldVal)) {
179
+ return;
180
+ }
181
+ this.dealdata();
182
+ },
183
+ }
184
+ }
185
+ }
186
+ </script>