address-client 4.0.22 → 4.0.24

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.
@@ -1,185 +1,186 @@
1
- var express = require('express')
2
- var webpack = require('webpack')
3
- var config = require('./webpack.dev.conf')
4
- var proxyMiddleware = require('http-proxy-middleware')
5
- var httpProxy = require('http-proxy')
6
- var checkVersion = require('./versionCheck.js')
7
- checkVersion()
8
- var app = express()
9
- var compiler = webpack(config)
10
- var proxy = httpProxy.createProxyServer()
11
-
12
- // Define HTTP proxies to your custom API backend
13
- // https://github.com/chimurai/http-proxy-middleware
14
- var str = 'http://192.168.50.4:8400', str2= 'http://192.168.50.4:8400'
15
- var str3= 'http://192.168.50.4:8400'
16
- var proxyTable = {
17
- '/api/af-auth': {
18
- target: str
19
- },
20
- '/api/af-system': {
21
- target: str
22
- },
23
- '/api/af-revenue': {
24
- pathRewrite: {'/api/af-revenue': '/'},
25
- target: 'http://127.0.0.1:9026'
26
- },
27
- '/rs/entity': {
28
- target: str
29
- // secure:true,
30
- // changeOrigin:true
31
- // target: 'http://127.0.0.1:8080'
32
- },
33
- '/webapps':{
34
- target: str3,
35
- secure:true,
36
- changeOrigin:true
37
- // target: 'http://127.0.0.1:8080'
38
- },
39
- '/rs/logic/getLogin': {
40
- target: str3,
41
- secure:true,
42
- changeOrigin:true
43
- },
44
- '/rs/logic/getInitData': {
45
- target: str3,
46
- secure:true,
47
- changeOrigin:true,
48
- },
49
- '/rs/logic/getSaleInitData': {
50
- target: str3,
51
- secure:true,
52
- changeOrigin:true
53
- },
54
- // '/rs/logic':{
55
- // target: str3,
56
- // secure:true,
57
- // changeOrigin:true
58
- // // target: 'http://127.0.0.1:8080'
59
- // },
60
- '/rs/vue': {
61
- target: str3,
62
- secure:true,
63
- changeOrigin:true
64
- },
65
- '/rs/user': {
66
- target: str3,
67
- secure:true,
68
- changeOrigin:true
69
- },
70
- '/rs/db': {
71
- target: str3,
72
- secure:true,
73
- changeOrigin:true
74
- },
75
- '/rs/search': {
76
- target: str3,
77
- secure:true,
78
- changeOrigin:true
79
- // target: 'http://127.0.0.1:8080'
80
- },
81
- '/rs/data': {
82
- target: str3,
83
- secure:true,
84
- changeOrigin:true
85
- },
86
- '/rs/sql': {
87
- target: str
88
- // secure: true,
89
- // changeOrigin:true
90
- // target: 'http://127.0.0.1:8080'
91
- },
92
- '/rs/logic': {
93
- target: str
94
- // secure: true,
95
- // changeOrigin:true
96
- // target: 'http://127.0.0.1:8080'
97
- },
98
- '/rs': {
99
- // target: 'http://192.168.50.199:8300'
100
- target: str3,
101
- secure:true,
102
- changeOrigin:true
103
- }
104
- }
105
-
106
- var devMiddleware = require('webpack-dev-middleware')(compiler, {
107
- publicPath: config.output.publicPath,
108
- stats: {
109
- colors: true,
110
- chunks: false
111
- }
112
- })
113
-
114
- var hotMiddleware = require('webpack-hot-middleware')(compiler)
115
- // force page reload when html-webpack-plugin template changes
116
- compiler.plugin('compilation', function (compilation) {
117
- compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
118
- hotMiddleware.publish({ action: 'reload' })
119
- cb()
120
- })
121
- })
122
-
123
- // proxy api requests
124
- Object.keys(proxyTable).forEach(function (context) {
125
- var options = proxyTable[context]
126
- if (typeof options === 'string') {
127
- options = { target: options }
128
- }
129
- app.use(proxyMiddleware(context, options))
130
- })
131
-
132
- // handle fallback for HTML5 history API
133
- app.use(require('connect-history-api-fallback')())
134
-
135
- // serve webpack bundle output
136
- app.use(devMiddleware)
137
-
138
- // enable hot-reload and state-preserving
139
- // compilation error display
140
- app.use(hotMiddleware)
141
-
142
- // serve pure static assets
143
- app.use('/static', express.static('./static'))
144
-
145
- // app.all('/rs/*', function (req, res) {
146
- // proxy.web(req, res, {
147
- // target: 'http://127.0.0.1:8081/reports'
148
- // })
149
- // })
150
-
151
- // app.all('/rs/*', function (req, res) {
152
- // proxy.web(req, res, {
153
- // target: 'http://127.0.0.1:8081/ldap'
154
- // })
155
- // })
156
- // app.all('/excel/*', function (req, res) {
157
- // proxy.web(req, res, {
158
- // target: 'http://127.0.0.1:8081/charge'
159
- // })
160
- // })
161
-
162
- // app.all('/rs/*', function (req, res) {
163
- // proxy.web(req, res, {
164
- // target: 'http://127.0.0.1:82/charge'
165
- // })
166
- // })
167
-
168
- // app.all('/*', function (req, res) {
169
- // proxy.web(req, res, {
170
- // target: 'http://127.0.0.1:82'
171
- // })
172
- // })
173
- // app.all('/rs/user', function (req, res) {
174
- // proxy.web(req, res, {
175
- // target: 'http://127.0.0.1:82'
176
- // })
177
- // })
178
-
179
- module.exports = app.listen(8085, function (err) {
180
- if (err) {
181
- console.log(err)
182
- return
183
- }
184
- console.log('Listening at http://localhost:8085')
185
- })
1
+ var express = require('express')
2
+ var webpack = require('webpack')
3
+ var config = require('./webpack.dev.conf')
4
+ var proxyMiddleware = require('http-proxy-middleware')
5
+ var httpProxy = require('http-proxy')
6
+ var checkVersion = require('./versionCheck.js')
7
+ checkVersion()
8
+ var app = express()
9
+ var compiler = webpack(config)
10
+ var proxy = httpProxy.createProxyServer()
11
+
12
+ // Define HTTP proxies to your custom API backend
13
+ // https://github.com/chimurai/http-proxy-middleware
14
+ var str = 'http://139.9.204.64:31467', str2= 'http://139.9.204.64:31467'
15
+ var str3= 'http://139.9.204.64:31467'
16
+ var proxyTable = {
17
+ '/api/af-auth': {
18
+ target: str
19
+ },
20
+ '/api/af-system': {
21
+ target: str
22
+ },
23
+ '/api/af-revenue': {
24
+ // pathRewrite: {'/api/af-revenue': '/'},
25
+ // target: 'http://127.0.0.1:9026'
26
+ target: str
27
+ },
28
+ '/rs/entity': {
29
+ target: str
30
+ // secure:true,
31
+ // changeOrigin:true
32
+ // target: 'http://127.0.0.1:8080'
33
+ },
34
+ '/webapps':{
35
+ target: str3,
36
+ secure:true,
37
+ changeOrigin:true
38
+ // target: 'http://127.0.0.1:8080'
39
+ },
40
+ '/rs/logic/getLogin': {
41
+ target: str3,
42
+ secure:true,
43
+ changeOrigin:true
44
+ },
45
+ '/rs/logic/getInitData': {
46
+ target: str3,
47
+ secure:true,
48
+ changeOrigin:true,
49
+ },
50
+ '/rs/logic/getSaleInitData': {
51
+ target: str3,
52
+ secure:true,
53
+ changeOrigin:true
54
+ },
55
+ // '/rs/logic':{
56
+ // target: str3,
57
+ // secure:true,
58
+ // changeOrigin:true
59
+ // // target: 'http://127.0.0.1:8080'
60
+ // },
61
+ '/rs/vue': {
62
+ target: str3,
63
+ secure:true,
64
+ changeOrigin:true
65
+ },
66
+ '/rs/user': {
67
+ target: str3,
68
+ secure:true,
69
+ changeOrigin:true
70
+ },
71
+ '/rs/db': {
72
+ target: str3,
73
+ secure:true,
74
+ changeOrigin:true
75
+ },
76
+ '/rs/search': {
77
+ target: str3,
78
+ secure:true,
79
+ changeOrigin:true
80
+ // target: 'http://127.0.0.1:8080'
81
+ },
82
+ '/rs/data': {
83
+ target: str3,
84
+ secure:true,
85
+ changeOrigin:true
86
+ },
87
+ '/rs/sql': {
88
+ target: str
89
+ // secure: true,
90
+ // changeOrigin:true
91
+ // target: 'http://127.0.0.1:8080'
92
+ },
93
+ '/rs/logic': {
94
+ target: str
95
+ // secure: true,
96
+ // changeOrigin:true
97
+ // target: 'http://127.0.0.1:8080'
98
+ },
99
+ '/rs': {
100
+ // target: 'http://192.168.50.199:8300'
101
+ target: str3,
102
+ secure:true,
103
+ changeOrigin:true
104
+ }
105
+ }
106
+
107
+ var devMiddleware = require('webpack-dev-middleware')(compiler, {
108
+ publicPath: config.output.publicPath,
109
+ stats: {
110
+ colors: true,
111
+ chunks: false
112
+ }
113
+ })
114
+
115
+ var hotMiddleware = require('webpack-hot-middleware')(compiler)
116
+ // force page reload when html-webpack-plugin template changes
117
+ compiler.plugin('compilation', function (compilation) {
118
+ compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
119
+ hotMiddleware.publish({ action: 'reload' })
120
+ cb()
121
+ })
122
+ })
123
+
124
+ // proxy api requests
125
+ Object.keys(proxyTable).forEach(function (context) {
126
+ var options = proxyTable[context]
127
+ if (typeof options === 'string') {
128
+ options = { target: options }
129
+ }
130
+ app.use(proxyMiddleware(context, options))
131
+ })
132
+
133
+ // handle fallback for HTML5 history API
134
+ app.use(require('connect-history-api-fallback')())
135
+
136
+ // serve webpack bundle output
137
+ app.use(devMiddleware)
138
+
139
+ // enable hot-reload and state-preserving
140
+ // compilation error display
141
+ app.use(hotMiddleware)
142
+
143
+ // serve pure static assets
144
+ app.use('/static', express.static('./static'))
145
+
146
+ // app.all('/rs/*', function (req, res) {
147
+ // proxy.web(req, res, {
148
+ // target: 'http://127.0.0.1:8081/reports'
149
+ // })
150
+ // })
151
+
152
+ // app.all('/rs/*', function (req, res) {
153
+ // proxy.web(req, res, {
154
+ // target: 'http://127.0.0.1:8081/ldap'
155
+ // })
156
+ // })
157
+ // app.all('/excel/*', function (req, res) {
158
+ // proxy.web(req, res, {
159
+ // target: 'http://127.0.0.1:8081/charge'
160
+ // })
161
+ // })
162
+
163
+ // app.all('/rs/*', function (req, res) {
164
+ // proxy.web(req, res, {
165
+ // target: 'http://127.0.0.1:82/charge'
166
+ // })
167
+ // })
168
+
169
+ // app.all('/*', function (req, res) {
170
+ // proxy.web(req, res, {
171
+ // target: 'http://127.0.0.1:82'
172
+ // })
173
+ // })
174
+ // app.all('/rs/user', function (req, res) {
175
+ // proxy.web(req, res, {
176
+ // target: 'http://127.0.0.1:82'
177
+ // })
178
+ // })
179
+
180
+ module.exports = app.listen(8085, function (err) {
181
+ if (err) {
182
+ console.log(err)
183
+ return
184
+ }
185
+ console.log('Listening at http://localhost:8085')
186
+ })
package/package.json CHANGED
@@ -1,101 +1,101 @@
1
- {
2
- "name": "address-client",
3
- "version": "4.0.22",
4
- "description": "地址管理前台组件",
5
- "author": "wanbochao",
6
- "license": "ISC",
7
- "main": "src/index.js",
8
- "keywords": [
9
- "sale"
10
- ],
11
- "scripts": {
12
- "unit": "karma start test/unit/karma.conf.js",
13
- "example": "node build/example-server.js",
14
- "dev": "node build/dev-server.js",
15
- "lint": "eslint src/**.js test/e2e/**.js test/unit/specs/** build/**.js",
16
- "build": "rimraf dist && mkdirp dist && ncp static dist/static && cross-env NODE_ENV=production webpack --progress --hide-modules --config build/webpack.prod.conf.js",
17
- "e2e": "node test/e2e/runner.js",
18
- "make": "rimraf dist-android && mkdirp dist-android && ncp static dist-android/static && cross-env NODE_ENV=production webpack --progress --hide-modules --config build/webpack.prodandroid.conf.js && publish",
19
- "release": "bash build/release.sh"
20
- },
21
- "repository": {
22
- "type": "git",
23
- "url": "https://gitee.com/aote/address_management.git"
24
- },
25
- "dependencies": {
26
- "crypto-js": "^4.1.1",
27
- "less-loader": "^2.2.3",
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
- "co": "^4.6.0",
38
- "connect-history-api-fallback": "^1.1.0",
39
- "cross-env": "^1.0.7",
40
- "cross-spawn": "^2.1.5",
41
- "css-loader": "^0.23.0",
42
- "echarts": "^4.1.0",
43
- "eslint": "^2.0.0",
44
- "eslint-config-standard": "^5.1.0",
45
- "eslint-friendly-formatter": "^1.2.2",
46
- "eslint-loader": "^1.3.0",
47
- "eslint-plugin-html": "^1.3.0",
48
- "eslint-plugin-promise": "^1.0.8",
49
- "eslint-plugin-standard": "^1.3.2",
50
- "eslint-plugin-vue": "^0.1.1",
51
- "eventsource-polyfill": "^0.9.6",
52
- "express": "^4.13.3",
53
- "extract-text-webpack-plugin": "^1.0.1",
54
- "file-loader": "^0.8.4",
55
- "function-bind": "^1.0.2",
56
- "html-webpack-plugin": "^2.8.1",
57
- "http-proxy-middleware": "^0.11.0",
58
- "inject-loader": "^2.0.1",
59
- "isparta-loader": "^2.0.0",
60
- "jasmine-core": "^2.4.1",
61
- "jquery": "^3.3.1",
62
- "json-loader": "^0.5.4",
63
- "karma": "^1.4.1",
64
- "karma-chrome-launcher": "^2.2.0",
65
- "karma-coverage": "^1.1.1",
66
- "karma-mocha": "^1.3.0",
67
- "karma-sinon-chai": "^1.3.1",
68
- "karma-sourcemap-loader": "^0.3.7",
69
- "karma-spec-reporter": "0.0.31",
70
- "karma-webpack": "^2.0.2",
71
- "less": "^2.7.3",
72
- "mkdirp": "^0.5.1",
73
- "mocha": "^3.2.0",
74
- "ncp": "^2.0.0",
75
- "rimraf": "^2.5.0",
76
- "sale-client": "3.2.11-17",
77
- "selenium-server": "2.52.0",
78
- "sinon": "^2.1.0",
79
- "sinon-chai": "^2.8.0",
80
- "style": "0.0.3",
81
- "style-loader": "^0.20.3",
82
- "ldap-clients": "3.0.48",
83
- "system-clients": "3.3.2",
84
- "url-loader": "^0.5.7",
85
- "vue-client": "1.24.162",
86
- "vue-hot-reload-api": "^1.2.0",
87
- "vue-html-loader": "^1.0.0",
88
- "vue-loader": "^8.2.1",
89
- "vue-resource": "^1.5.0",
90
- "vue-router": "^0.7.13",
91
- "vue-strap": "^1.0.9",
92
- "vue-style-loader": "^1.0.0",
93
- "vue-validator": "2.1.7",
94
- "webpack": "^1.12.2",
95
- "webpack-dev-middleware": "^1.4.0",
96
- "webpack-hot-middleware": "^2.6.0",
97
- "webpack-merge": "^0.8.3",
98
- "jsencrypt": "3.0.0-rc.1",
99
- "axios": "0.15.3"
100
- }
101
- }
1
+ {
2
+ "name": "address-client",
3
+ "version": "4.0.24",
4
+ "description": "地址管理前台组件",
5
+ "author": "wanbochao",
6
+ "license": "ISC",
7
+ "main": "src/index.js",
8
+ "keywords": [
9
+ "sale"
10
+ ],
11
+ "scripts": {
12
+ "unit": "karma start test/unit/karma.conf.js",
13
+ "example": "node build/example-server.js",
14
+ "dev": "node build/dev-server.js",
15
+ "lint": "eslint src/**.js test/e2e/**.js test/unit/specs/** build/**.js",
16
+ "build": "rimraf dist && mkdirp dist && ncp static dist/static && cross-env NODE_ENV=production webpack --progress --hide-modules --config build/webpack.prod.conf.js",
17
+ "e2e": "node test/e2e/runner.js",
18
+ "make": "rimraf dist-android && mkdirp dist-android && ncp static dist-android/static && cross-env NODE_ENV=production webpack --progress --hide-modules --config build/webpack.prodandroid.conf.js && publish",
19
+ "release": "bash build/release.sh"
20
+ },
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "https://gitee.com/aote/address_management.git"
24
+ },
25
+ "dependencies": {
26
+ "crypto-js": "^4.1.1",
27
+ "less-loader": "^2.2.3",
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
+ "co": "^4.6.0",
38
+ "connect-history-api-fallback": "^1.1.0",
39
+ "cross-env": "^1.0.7",
40
+ "cross-spawn": "^2.1.5",
41
+ "css-loader": "^0.23.0",
42
+ "echarts": "^4.1.0",
43
+ "eslint": "^2.0.0",
44
+ "eslint-config-standard": "^5.1.0",
45
+ "eslint-friendly-formatter": "^1.2.2",
46
+ "eslint-loader": "^1.3.0",
47
+ "eslint-plugin-html": "^1.3.0",
48
+ "eslint-plugin-promise": "^1.0.8",
49
+ "eslint-plugin-standard": "^1.3.2",
50
+ "eslint-plugin-vue": "^0.1.1",
51
+ "eventsource-polyfill": "^0.9.6",
52
+ "express": "^4.13.3",
53
+ "extract-text-webpack-plugin": "^1.0.1",
54
+ "file-loader": "^0.8.4",
55
+ "function-bind": "^1.0.2",
56
+ "html-webpack-plugin": "^2.8.1",
57
+ "http-proxy-middleware": "^0.11.0",
58
+ "inject-loader": "^2.0.1",
59
+ "isparta-loader": "^2.0.0",
60
+ "jasmine-core": "^2.4.1",
61
+ "jquery": "^3.3.1",
62
+ "json-loader": "^0.5.4",
63
+ "karma": "^1.4.1",
64
+ "karma-chrome-launcher": "^2.2.0",
65
+ "karma-coverage": "^1.1.1",
66
+ "karma-mocha": "^1.3.0",
67
+ "karma-sinon-chai": "^1.3.1",
68
+ "karma-sourcemap-loader": "^0.3.7",
69
+ "karma-spec-reporter": "0.0.31",
70
+ "karma-webpack": "^2.0.2",
71
+ "less": "^2.7.3",
72
+ "mkdirp": "^0.5.1",
73
+ "mocha": "^3.2.0",
74
+ "ncp": "^2.0.0",
75
+ "rimraf": "^2.5.0",
76
+ "sale-client": "3.2.11-17",
77
+ "selenium-server": "2.52.0",
78
+ "sinon": "^2.1.0",
79
+ "sinon-chai": "^2.8.0",
80
+ "style": "0.0.3",
81
+ "style-loader": "^0.20.3",
82
+ "ldap-clients": "3.0.48",
83
+ "system-clients": "3.3.2",
84
+ "url-loader": "^0.5.7",
85
+ "vue-client": "1.24.162",
86
+ "vue-hot-reload-api": "^1.2.0",
87
+ "vue-html-loader": "^1.0.0",
88
+ "vue-loader": "^8.2.1",
89
+ "vue-resource": "^1.5.0",
90
+ "vue-router": "^0.7.13",
91
+ "vue-strap": "^1.0.9",
92
+ "vue-style-loader": "^1.0.0",
93
+ "vue-validator": "2.1.7",
94
+ "webpack": "^1.12.2",
95
+ "webpack-dev-middleware": "^1.4.0",
96
+ "webpack-hot-middleware": "^2.6.0",
97
+ "webpack-merge": "^0.8.3",
98
+ "jsencrypt": "3.0.0-rc.1",
99
+ "axios": "0.15.3"
100
+ }
101
+ }
@@ -0,0 +1,425 @@
1
+ <template>
2
+ <div class="flex" @keyup.enter="search">
3
+ <criteria-paged :model="model" v-ref:paged>
4
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
5
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
+ <div class="row">
7
+ <div :class="$parent.$parent.style">
8
+ <label class="font_normal_body">组织机构</label>
9
+ <res-select restype='organization'
10
+ @res-select="$parent.$parent.getorg"
11
+ is-mul="false"
12
+ :initresid='$parent.$parent.curorgid'>
13
+ </res-select>
14
+ </div>
15
+ <div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.areaShow">
16
+ <label class="font_normal_body">小区编号</label>
17
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_area_id"
18
+ condition="f_area_id = '{}'" placeholder="小区编号"/>
19
+ </div>
20
+ <div :class="$parent.$parent.style" v-if="false">
21
+ <label class="font_normal_body">省&emsp;&emsp;份</label>
22
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_province"
23
+ condition="f_province like '%{}%'" placeholder="省份"/>
24
+ </div>
25
+ <!--<div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.areaShow">-->
26
+ <div :class="$parent.$parent.style" v-if="false">
27
+ <label class="font_normal_body">城&emsp;&emsp;市</label>
28
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_city"
29
+ condition="f_city like '%{}%'" placeholder="城市"/>
30
+ </div>
31
+ <div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.areaShow">
32
+ <label class="font_normal_body">区&emsp;&emsp;县</label>
33
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_district"
34
+ condition="f_district like '%{}%'" placeholder="区县"/>
35
+ </div>
36
+ <div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.areaShow">
37
+ <label class="font_normal_body">街道/乡镇</label>
38
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_street"
39
+ condition="f_street like '%{}%'" placeholder="街道/乡镇"/>
40
+ </div>
41
+ <div class="col-sm-4 form-group button-range">
42
+ <button class="button_search button_spacing" @click="search()" >查询</button>
43
+ <button class="button_search button_spacing" @click="$parent.$parent.batchDelete()">批量删除</button>
44
+ <button v-if="!$parent.$parent.f_special" class="button_new button_spacing" style="width: max-content;" @click="$parent.$parent.add('小区')">添加小区</button>
45
+ <button v-if="$parent.$parent.f_special"class="button_new button_spacing" style="width: max-content;" @click="$parent.$parent.add('单位')">添加单位</button>
46
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
47
+ <export-excel :data="$parent.$parent.getCondition"
48
+ :field="$parent.$parent.getfield"
49
+ sqlurl="api/af-revenue/logic/exportfile"
50
+ sql-name="manage_getarealist"
51
+ template-name='小区信息查询导出'
52
+ :choose-col="true"></export-excel>
53
+ <div style="float: right" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
54
+ </div>
55
+ </div>
56
+ <div class="row" v-if="$parent.$parent.criteriaShow">
57
+ <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
58
+ <label class="font_normal_body">小区编号</label>
59
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_area_id"
60
+ condition="f_area_id = '{}'" placeholder="小区编号"/>
61
+ </div>
62
+ <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
63
+ <label class="font_normal_body">城&emsp;&emsp;市</label>
64
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_city"
65
+ condition="f_city like '%{}%'" placeholder="城市"
66
+ :size="model.f_city ? model.f_city.length*2 : 6"/>
67
+ </div>
68
+ <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
69
+ <label class="font_normal_body">区&emsp;&emsp;县</label>
70
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_district"
71
+ condition="f_district like '%{}%'" placeholder="区县"
72
+ :size="model.f_district ? model.f_district.length*2 : 6"/>
73
+ </div>
74
+ <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
75
+ <label class="font_normal_body">街道/乡镇</label>
76
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_street"
77
+ condition="f_street like '%{}%'" placeholder="街道/乡镇"
78
+ :size="model.f_street ? model.f_street.length*2 : 6"/>
79
+ </div>
80
+ <div :class="$parent.$parent.style">
81
+ <label class="font_normal_body">小区名称</label>
82
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_residential_area"
83
+ condition="f_residential_area like '%{}%'" placeholder="小区"
84
+ :size="model.f_residential_area ? model.f_residential_area.length*2 : 6"/>
85
+ </div>
86
+ <div :class="$parent.$parent.style">
87
+ <label class="font_normal_body">小区属性</label>
88
+ <v-select :options='$parent.$parent.areaAttributes' :value.sync="model.f_area_attributes"
89
+ close-on-select condition="f_area_attributes='{}'"
90
+ placeholder='小区属性' v-model="model.f_area_attributes"></v-select>
91
+ </div>
92
+ <div :class="$parent.$parent.style">
93
+ <label class="font_normal_body">房屋类型</label>
94
+ <v-select :options='$parent.$parent.housetype' :value.sync="model.f_house_type"
95
+ close-on-select condition="f_house_type='{}'"
96
+ placeholder='房屋类型' v-model="model.f_house_type"></v-select>
97
+ </div>
98
+ <div :class="$parent.$parent.style">
99
+ <label class="font_normal_body">安装位置</label>
100
+ <v-select :options='$parent.$parent.position' :value.sync="model.f_position"
101
+ close-on-select condition="f_position='{}'"
102
+ placeholder='安装位置' v-model="model.f_position"></v-select>
103
+ </div>
104
+ <div :class="$parent.$parent.style">
105
+ <label class="font_normal_body">&emsp;抄表员</label>
106
+ <v-select :options='$parent.$parent.inputtores' :value.sync="model.f_inputtor"
107
+ close-on-select condition="f_inputtor='{}'"
108
+ placeholder='抄表员' v-model="model.f_inputtor"></v-select>
109
+ </div>
110
+ </div>
111
+ </div>
112
+ </criteria>
113
+
114
+ <data-grid :model="model" partial='list' class="list_area table_sy" :optional="true" v-ref:grid>
115
+ <template partial='head'>
116
+ <th><nobr>序号</nobr></th>
117
+ <th v-if="false"><nobr>省份</nobr></th>
118
+ <th v-if="false"><nobr>城市</nobr></th>
119
+ <th v-show="!$parent.$parent.$parent.$parent.areaShow"><nobr>区/县</nobr></th>
120
+ <th><nobr>街道/乡镇</nobr></th>
121
+ <th><nobr>小区属性</nobr></th>
122
+ <!--民用小区信息开始-->
123
+ <th v-if="!$parent.$parent.$parent.f_special"><nobr>小区名称</nobr></th>
124
+ <th v-if="!$parent.$parent.$parent.f_special"><nobr>地址</nobr></th>
125
+ <th v-if="!$parent.$parent.$parent.f_special && !$parent.$parent.$parent.$parent.areaShow"><nobr>小区备注</nobr></th>
126
+ <!--民用小区信息结束-->
127
+ <!--非民用单位信息开始-->
128
+ <th v-if="$parent.$parent.$parent.f_special"><nobr>单位名称</nobr></th>
129
+ <th v-if="$parent.$parent.$parent.f_special"><nobr>单位地址</nobr></th>
130
+ <th v-if="$parent.$parent.$parent.f_special"><nobr>联系人</nobr></th>
131
+ <th v-if="$parent.$parent.$parent.f_special"><nobr>联系电话</nobr></th>
132
+ <!--非民用单位信息结束-->
133
+ <th v-show="!$parent.$parent.$parent.$parent.areaShow"><nobr>抄表员</nobr></th>
134
+ <th v-show="!$parent.$parent.$parent.$parent.areaShow"><nobr>房屋类型</nobr></th>
135
+ <th v-show="!$parent.$parent.$parent.$parent.areaShow"><nobr>安装位置</nobr></th>
136
+ <th v-show="!$parent.$parent.$parent.$parent.areaShow"><nobr>片区/管理站 </nobr></th>
137
+ <th><nobr>操作人</nobr></th>
138
+ <th><nobr>操作日期</nobr></th>
139
+ <th title="该小区下现有的地址数"><nobr>地址数</nobr></th>
140
+ <th><nobr>操作</nobr></th>
141
+ </template>
142
+ <template partial='body'>
143
+ <td style="text-align:center"><nobr>{{$index + 1}}</nobr></td>
144
+ <td style="text-align:center" v-if="false"><nobr>{{row.f_province}}</nobr></td>
145
+ <td style="text-align:center" v-if="false"><nobr>{{row.f_city}}</nobr></td>
146
+ <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_district}}</nobr></td>
147
+ <td style="text-align:center"><nobr>{{row.f_street}}</nobr></td>
148
+ <td style="text-align:center"><nobr>{{row.f_area_attributes}}</nobr></td>
149
+ <td style="text-align:center"><nobr>{{row.f_residential_area}}</nobr></td>
150
+ <td style="text-align:center"><nobr>{{row.f_area_address}}</nobr></td>
151
+ <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_comments}}</nobr></td>
152
+ <!--非民用单位信息开始-->
153
+ <td v-if="$parent.$parent.$parent.f_special" style="text-align:center"><nobr>{{row.f_linkname}}</nobr></td>
154
+ <td v-if="$parent.$parent.$parent.f_special" style="text-align:center"><nobr>{{row.f_linkphone}}</nobr></td>
155
+ <!--非民用单位信息结束-->
156
+ <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_inputtor}}</nobr></td>
157
+ <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_house_type}}</nobr></td>
158
+ <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_position}}</nobr></td>
159
+ <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_slice_area}}</nobr></td>
160
+ <td style="text-align:center"><nobr>{{row.f_operator}}</nobr></td>
161
+ <td style="text-align:center"><nobr>{{row.f_operate_date}}</nobr></td>
162
+ <td style="text-align:center"><button @click.stop="$parent.$parent.$parent.operates(row.id)" class="btn btn-link"><b>{{row.addressnum}}</b></button></td>
163
+ <td><nobr>
164
+ <!--<button type="button" name="button" class="btn btn-link"
165
+ @click.stop="$parent.$parent.$parent.modify(row)">修改</button>-->
166
+ <button v-if="!row.addressnum>0" type="button" name="button" class="btn btn-danger"
167
+ style="padding: 5px 12px"
168
+ @click.stop="$parent.$parent.$parent.delete(row)">删除</button>
169
+ </nobr>
170
+ </td>
171
+ </template>
172
+ <template partial='foot'></template>
173
+ </data-grid>
174
+ </criteria-paged>
175
+ <modal :show="showDelete" large backdrop="false" :width="900">
176
+ <header slot="modal-header" class="modal-header">
177
+ <p class="bg-info text-center" style="padding: 8px;">提示</p>
178
+ </header>
179
+ <article slot="modal-body" class="modal-body">
180
+ <p>您一共选中{{selectDataLen}}个小区,您确定是否要删除吗?</p>
181
+ </article>
182
+ <footer slot="modal-footer" class="modal-footer">
183
+ <button v-show="showDelete" type="button" class="button_search button_spacing" @click='confirmDelete()' :disabled='!$v.valid'>确认</button>
184
+ <button v-show="showDelete" type="button" class="button_clear button_spacing" @click='cancelDelete()'>取消</button>
185
+ </footer>
186
+ </modal>
187
+ </div>
188
+ </template>
189
+
190
+ <script>
191
+ import { PagedList } from 'vue-client'
192
+ let readyGen = async function (self) {
193
+ self.getfield = self.config.excelHeaders
194
+ self.search()
195
+ }
196
+ export default {
197
+
198
+ data () {
199
+ return {
200
+ showDelete: false,
201
+ criteriaShow: false,
202
+ model: new PagedList('api/af-revenue/sql/address_getarealist',20),
203
+ selectDataLen: 0,
204
+ addflag: false,
205
+ addtitle:'',
206
+ getfield: {},
207
+ getRowData:[],
208
+ // 公司下拉
209
+ curorgid: [this.$login.f.orgid],
210
+ f_orgid: '',
211
+ //初始化小区数据
212
+ areaslist:[],
213
+ config: {
214
+ // 导出列要和查询列相同
215
+ excelHeaders: {
216
+ 'f_district':'区/县',
217
+ 'f_street':'街道名称',
218
+ 'f_area_attributes':'小区属性',
219
+ 'f_residential_area':'小区名称',
220
+ 'f_area_address':'小区地址',
221
+ 'f_comments':'小区备注',
222
+ 'f_inputtor':'抄表员',
223
+ 'f_house_type':'房屋类型',
224
+ 'f_position':'安装位置',
225
+ 'f_slice_area':'片区/管理站',
226
+ 'f_operator':'操作人',
227
+ 'f_operate_date':'操作日期',
228
+ 'addressnum':'地址数'
229
+ }
230
+ },
231
+ housetype:[{label:'全部',value:''},{label: '楼房', value: '楼房'}, {label: '自建房', value: '自建房'}],
232
+ areaAttributes: [{label: '新小区', value: '新小区'}, {label: '老小区', value: '老小区'}],
233
+ position:this.$appdata.getParam('安装位置')?[{label:'全部',value:''},...this.$appdata.getParam('安装位置')]:[{label:'全部',value:''}]
234
+ }
235
+ },
236
+ title: '小区管理',
237
+ props:{
238
+ f_filialeids:{
239
+ type: String
240
+ },
241
+ style: {
242
+ type: String,
243
+ default: 'col-sm-2 form-group'
244
+ },
245
+ f_special:{
246
+ type: String
247
+ }
248
+ },
249
+ ready(){
250
+ readyGen(this)
251
+
252
+ },
253
+ methods: {
254
+ hidden() {
255
+ this.criteriaShow = !this.criteriaShow
256
+ },
257
+ search() {
258
+ this.$refs.paged.$refs.cri.search()
259
+ },
260
+ operates(areaid){
261
+ this.$parent.areaShow = false
262
+ this.$parent.addressShow = true
263
+ this.$parent.areaid = areaid
264
+ },
265
+ async delete(row){
266
+ if(row.id >= 0){
267
+ var id = row.id
268
+ let useraredss = await this.$resetpost('api/af-revenue/sql/address_singleTable',
269
+ {data: {
270
+ items: 'f_residential_area_id',
271
+ tablename: 't_user_address',
272
+ condition: `f_residential_area_id='${id}'`}
273
+ },
274
+ {resolveMsg: null, rejectMsg: null})
275
+ if(useraredss.data.length>0){
276
+ this.$showAlert('该小区下已有地址信息,无法删除!','warning',1000)
277
+ }else{
278
+ this.$resetdelete('api/af-revenue/entity/t_area', {id: id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
279
+ this.$dispatch('cancel')
280
+ })
281
+ }
282
+ }
283
+ },
284
+ add(val){
285
+ if (this.f_filialeids) {
286
+ this.$refs.paged.$refs.grid.selectStore.selected = null
287
+ this.$dispatch('add')
288
+ } else {
289
+ this.$showAlert('请先选择左上角的所在分公司', 'warning', 2000)
290
+ }
291
+ },
292
+ modify(val){
293
+ this.$refs.paged.$refs.grid.selectStore.selected = null
294
+ this.$dispatch('modify',val)
295
+ },
296
+ selfSearch (args) {
297
+
298
+ if (!this.f_orgid) {
299
+ this.getorg([this.$login.f.orgid])
300
+ }
301
+ if(this.f_special){
302
+ args.condition = `${args.condition} and s.f_special='1' and s.f_filialeid = '${this.f_filialeids}'`
303
+ }else{
304
+ args.condition = `${args.condition} and s.f_filialeid = ${this.f_orgid}`
305
+ }
306
+ this.model.search(args.condition, args.model)
307
+ this.$parent.addressShow = false
308
+ },
309
+ //清空
310
+ clear(){
311
+ this.$refs.paged.$refs.cri.model = {}
312
+ },
313
+ getorg (val) {
314
+ this.f_orgid = this.$login.convertToIn(val)
315
+ this.f_filialeids = val[0]
316
+ },
317
+ async batchDelete () {
318
+ let flag = true
319
+ if (this.f_filialeids) {
320
+ if (this.$refs.paged.$refs.grid.getRowData().length != 0) {
321
+ // 获取要批量删除的小区数据
322
+ this.getRowData = this.$refs.paged.$refs.grid.getRowData()
323
+ this.getRowData.forEach((row,n) => {
324
+ console.log(JSON.stringify(row) + '==========')
325
+ if (row.addressnum > 0 ) {
326
+ this.$showAlert('您所选择的小区下已有地址信息,无法删除!','warning',2000)
327
+ this.selectDataLen = 0
328
+ flag = false
329
+ }
330
+ })
331
+ if(flag){
332
+ this.selectDataLen = this.getRowData.length
333
+ console.log(this.selectDataLen + '-----------------------')
334
+ this.showDelete = true
335
+ }
336
+ } else {
337
+ this.$showAlert('请至少选择一项!', 'warning', 2000)
338
+ }
339
+ }else {
340
+ this.$showAlert('请先选择左上角的所在分公司!', 'warning', 2000)
341
+ }
342
+ },
343
+ confirmDelete () {
344
+ let msg = {
345
+ resolveMsg: '批量删除成功!',
346
+ rejectMsg: '批量删除失败!'
347
+ }
348
+ let oldAreaIds = this.getRowData
349
+ console.log('所选中的小区信息:=======' + JSON.stringify(oldAreaIds))
350
+ this.$resetpost('api/af-revenue/logic/batchDelete',{
351
+ data:{
352
+ oldAreaIds:oldAreaIds,
353
+ f_operator: this.$login.f.name,
354
+ f_operatorid: this.$login.f.id,
355
+ f_orgid: this.$login.f.orgid,
356
+ f_orgname: this.$login.f.orgs,
357
+ f_depid: this.$login.f.depids,
358
+ f_depname: this.$login.f.deps
359
+ }
360
+ },msg)
361
+ this.$refs.paged.$refs.grid.selectInit()
362
+ this.$refs.paged.$refs.cri.search()
363
+ this.showDelete = false
364
+ },
365
+ cancelDelete () {
366
+ this.$refs.paged.$refs.grid.selectInit()
367
+ this.$refs.paged.$refs.cri.search()
368
+ this.showDelete = false
369
+ },
370
+ // areaChange(val){
371
+ // console.log("小区变化",val)
372
+ // let selectArea // 选中的小区数据
373
+ // for (let row of this.areaslist) {
374
+ // if (val == row.value) {
375
+ // selectArea = row.data
376
+ // break
377
+ // }
378
+ // }
379
+ // if (selectArea) {
380
+ // this.areamodel.f_residential_area_id = selectArea.id
381
+ // this.areamodel.f_pcd = selectArea.f_pcd
382
+ // this.areamodel.f_pcd_id = selectArea.f_pcd_id
383
+ // this.areamodel.f_street = selectArea.f_street
384
+ // this.areamodel.f_street_id = selectArea.f_street_id
385
+ // this.areamodel.f_slice_area = selectArea.f_slice_area
386
+ // this.areamodel.f_residential_area = selectArea.f_residential_area
387
+ // }
388
+ // this.$nextTick(() => {
389
+ // this.$resetValidation()
390
+ // })
391
+ // },
392
+ },
393
+ watch:{
394
+
395
+ },
396
+ computed:{
397
+ getCondition() {
398
+ var condition=''
399
+ if(this.f_special){
400
+ condition = `${this.$refs.paged.$refs.cri.condition} and s.f_special='1' and s.f_filialeid = '${this.f_filialeids}'`
401
+ }else{
402
+ condition = `${this.$refs.paged.$refs.cri.condition} and s.f_filialeid = ${this.f_orgid}`
403
+ }
404
+ return {
405
+ condition: condition
406
+ }
407
+ },
408
+ inputtores () {
409
+ // 获取抄表员
410
+ let rs = new Array()
411
+ if (this.$login.f.f_gasman.length > 0) {
412
+ for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
413
+ let temp = {
414
+ label: this.$login.f.f_gasman[i].name,
415
+ value: this.$login.f.f_gasman[i].name
416
+ }
417
+ rs.push(temp)
418
+ }
419
+ }
420
+ return rs
421
+ }
422
+ }
423
+
424
+ }
425
+ </script>
@@ -1,9 +1,10 @@
1
- // 添加小区管理
2
- import Vue from 'vue'
3
-
4
- let specialComp = {
5
- // 'area-list': (resolve) => { require(['./AreaList'], resolve) },
6
- // 添加小区
7
- 'add-area-msg': (resolve) => { require(['./AddAreaMsg'], resolve) }
8
- }
9
- exports.specialComp = specialComp
1
+ // 添加小区管理
2
+ import Vue from 'vue'
3
+
4
+ let specialComp = {
5
+ //小区列表
6
+ 'area-list': (resolve) => { require(['./AreaList'], resolve) },
7
+ // 添加小区
8
+ 'add-area-msg': (resolve) => { require(['./AddAreaMsg'], resolve) }
9
+ }
10
+ exports.specialComp = specialComp
@@ -623,6 +623,7 @@
623
623
  this.initstreets(` f_filialeid = '${this.f_filialeids}' and id ='${selectArea.f_street_id}' `)
624
624
  this.initpcds(` f_filialeid = '${this.f_filialeids}' and id ='${selectArea.f_pcd_id}' `)
625
625
  this.model.f_slice_area = selectArea.f_slice_area
626
+ this.model.f_comments1=selectArea.f_comments
626
627
  // 拼接地址
627
628
  this.model.f_address = `${selectArea.f_street}${selectArea.f_residential_area}`
628
629
  }
package/src/main.js CHANGED
@@ -1,23 +1,23 @@
1
- import Vue from 'vue'
2
- import App from './App'
3
- import { all } from 'vue-client'
4
- import { system } from 'system-clients'
5
- import { ldap } from 'ldap-clients'
6
- import { sale } from 'sale-client'
7
- import address from './address'
8
-
9
- Vue.config.silent = true
10
-
11
- /** **************************通用组件******************************/
12
- all()
13
- address()
14
- system(false)
15
- ldap()
16
- sale()
17
- require('system-clients/src/styles/less/bootstrap.less')
18
-
19
-
20
- new Vue({
21
- el: 'body',
22
- components: { App }
23
- })
1
+ import Vue from 'vue'
2
+ import App from './App'
3
+ import { all } from 'vue-client'
4
+ import { system } from 'system-clients'
5
+ import { ldap } from 'ldap-clients'
6
+ import { sale } from 'sale-client'
7
+ import address from './address'
8
+
9
+ Vue.config.silent = true
10
+
11
+ /** **************************通用组件******************************/
12
+ all()
13
+ address('xinkang')
14
+ system(false)
15
+ ldap()
16
+ sale()
17
+ require('system-clients/src/styles/less/bootstrap.less')
18
+
19
+
20
+ new Vue({
21
+ el: 'body',
22
+ components: { App }
23
+ })