address-client 1.3.52 → 1.3.53-heat
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 +14 -14
- package/index.html +1 -0
- package/package.json +97 -97
- package/src/address.js +37 -37
- package/src/components/AddressManage.vue +170 -170
- package/src/components/AreaList.vue +1 -1
- package/src/components/NewAddressInfo.vue +434 -434
- package/src/components/UserAddress.vue +316 -316
- package/.gradle/3.5.1/file-changes/last-build.bin +0 -0
- package/.gradle/3.5.1/taskHistory/taskHistory.lock +0 -0
- package/.gradle/buildOutputCleanup/built.bin +0 -0
- package/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/.gradle/buildOutputCleanup/cache.properties.lock +0 -1
- package/.npmignore +0 -9
- package/AddressClient.iml +0 -13
- package/build/.npmignore +0 -1
- package/yarn.lock +0 -7463
package/build.gradle
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
buildscript {
|
|
2
|
-
repositories {
|
|
3
|
-
mavenCentral()
|
|
4
|
-
jcenter()
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
version = '1.3.
|
|
9
|
-
|
|
10
|
-
apply plugin: 'java'
|
|
11
|
-
task release(type:Exec) {
|
|
12
|
-
workingDir '.'
|
|
13
|
-
commandLine 'cmd', '/c', 'release.bat ' + version
|
|
14
|
-
}
|
|
1
|
+
buildscript {
|
|
2
|
+
repositories {
|
|
3
|
+
mavenCentral()
|
|
4
|
+
jcenter()
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
version = '1.3.52'
|
|
9
|
+
|
|
10
|
+
apply plugin: 'java'
|
|
11
|
+
task release(type:Exec) {
|
|
12
|
+
workingDir '.'
|
|
13
|
+
commandLine 'cmd', '/c', 'release.bat ' + version
|
|
14
|
+
}
|
package/index.html
CHANGED
package/package.json
CHANGED
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "address-client",
|
|
3
|
-
"version": "1.3.
|
|
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
|
-
"less-loader": "^2.2.3",
|
|
27
|
-
"vue": "^1.0.17"
|
|
28
|
-
},
|
|
29
|
-
"devDependencies": {
|
|
30
|
-
"babel-core": "^6.0.0",
|
|
31
|
-
"babel-loader": "^6.0.0",
|
|
32
|
-
"babel-plugin-transform-runtime": "^6.0.0",
|
|
33
|
-
"babel-preset-es2015": "^6.0.0",
|
|
34
|
-
"babel-preset-stage-2": "^6.0.0",
|
|
35
|
-
"chai": "^3.5.0",
|
|
36
|
-
"co": "^4.6.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
|
-
"echarts": "^4.1.0",
|
|
42
|
-
"eslint": "^2.0.0",
|
|
43
|
-
"eslint-config-standard": "^5.1.0",
|
|
44
|
-
"eslint-friendly-formatter": "^1.2.2",
|
|
45
|
-
"eslint-loader": "^1.3.0",
|
|
46
|
-
"eslint-plugin-html": "^1.3.0",
|
|
47
|
-
"eslint-plugin-promise": "^1.0.8",
|
|
48
|
-
"eslint-plugin-standard": "^1.3.2",
|
|
49
|
-
"eslint-plugin-vue": "^0.1.1",
|
|
50
|
-
"eventsource-polyfill": "^0.9.6",
|
|
51
|
-
"express": "^4.13.3",
|
|
52
|
-
"extract-text-webpack-plugin": "^1.0.1",
|
|
53
|
-
"file-loader": "^0.8.4",
|
|
54
|
-
"function-bind": "^1.0.2",
|
|
55
|
-
"html-webpack-plugin": "^2.8.1",
|
|
56
|
-
"http-proxy-middleware": "^0.11.0",
|
|
57
|
-
"inject-loader": "^2.0.1",
|
|
58
|
-
"isparta-loader": "^2.0.0",
|
|
59
|
-
"jasmine-core": "^2.4.1",
|
|
60
|
-
"jquery": "^3.3.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
|
-
"less": "^2.7.3",
|
|
71
|
-
"mkdirp": "^0.5.1",
|
|
72
|
-
"mocha": "^3.2.0",
|
|
73
|
-
"ncp": "^2.0.0",
|
|
74
|
-
"rimraf": "^2.5.0",
|
|
75
|
-
"sale-client": "^1.2.5",
|
|
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
|
-
"system-clients": "^1.6.1",
|
|
82
|
-
"url-loader": "^0.5.7",
|
|
83
|
-
"vue-client": "^1.17.11",
|
|
84
|
-
"vue-hot-reload-api": "^1.2.0",
|
|
85
|
-
"vue-html-loader": "^1.0.0",
|
|
86
|
-
"vue-loader": "^8.2.1",
|
|
87
|
-
"vue-resource": "^1.5.0",
|
|
88
|
-
"vue-router": "^0.7.13",
|
|
89
|
-
"vue-strap": "^1.0.9",
|
|
90
|
-
"vue-style-loader": "^1.0.0",
|
|
91
|
-
"vue-validator": "2.1.7",
|
|
92
|
-
"webpack": "^1.12.2",
|
|
93
|
-
"webpack-dev-middleware": "^1.4.0",
|
|
94
|
-
"webpack-hot-middleware": "^2.6.0",
|
|
95
|
-
"webpack-merge": "^0.8.3"
|
|
96
|
-
}
|
|
97
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "address-client",
|
|
3
|
+
"version": "1.3.53-heat",
|
|
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
|
+
"less-loader": "^2.2.3",
|
|
27
|
+
"vue": "^1.0.17"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"babel-core": "^6.0.0",
|
|
31
|
+
"babel-loader": "^6.0.0",
|
|
32
|
+
"babel-plugin-transform-runtime": "^6.0.0",
|
|
33
|
+
"babel-preset-es2015": "^6.0.0",
|
|
34
|
+
"babel-preset-stage-2": "^6.0.0",
|
|
35
|
+
"chai": "^3.5.0",
|
|
36
|
+
"co": "^4.6.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
|
+
"echarts": "^4.1.0",
|
|
42
|
+
"eslint": "^2.0.0",
|
|
43
|
+
"eslint-config-standard": "^5.1.0",
|
|
44
|
+
"eslint-friendly-formatter": "^1.2.2",
|
|
45
|
+
"eslint-loader": "^1.3.0",
|
|
46
|
+
"eslint-plugin-html": "^1.3.0",
|
|
47
|
+
"eslint-plugin-promise": "^1.0.8",
|
|
48
|
+
"eslint-plugin-standard": "^1.3.2",
|
|
49
|
+
"eslint-plugin-vue": "^0.1.1",
|
|
50
|
+
"eventsource-polyfill": "^0.9.6",
|
|
51
|
+
"express": "^4.13.3",
|
|
52
|
+
"extract-text-webpack-plugin": "^1.0.1",
|
|
53
|
+
"file-loader": "^0.8.4",
|
|
54
|
+
"function-bind": "^1.0.2",
|
|
55
|
+
"html-webpack-plugin": "^2.8.1",
|
|
56
|
+
"http-proxy-middleware": "^0.11.0",
|
|
57
|
+
"inject-loader": "^2.0.1",
|
|
58
|
+
"isparta-loader": "^2.0.0",
|
|
59
|
+
"jasmine-core": "^2.4.1",
|
|
60
|
+
"jquery": "^3.3.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
|
+
"less": "^2.7.3",
|
|
71
|
+
"mkdirp": "^0.5.1",
|
|
72
|
+
"mocha": "^3.2.0",
|
|
73
|
+
"ncp": "^2.0.0",
|
|
74
|
+
"rimraf": "^2.5.0",
|
|
75
|
+
"sale-client": "^1.2.5",
|
|
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
|
+
"system-clients": "^1.6.1",
|
|
82
|
+
"url-loader": "^0.5.7",
|
|
83
|
+
"vue-client": "^1.17.11",
|
|
84
|
+
"vue-hot-reload-api": "^1.2.0",
|
|
85
|
+
"vue-html-loader": "^1.0.0",
|
|
86
|
+
"vue-loader": "^8.2.1",
|
|
87
|
+
"vue-resource": "^1.5.0",
|
|
88
|
+
"vue-router": "^0.7.13",
|
|
89
|
+
"vue-strap": "^1.0.9",
|
|
90
|
+
"vue-style-loader": "^1.0.0",
|
|
91
|
+
"vue-validator": "2.1.7",
|
|
92
|
+
"webpack": "^1.12.2",
|
|
93
|
+
"webpack-dev-middleware": "^1.4.0",
|
|
94
|
+
"webpack-hot-middleware": "^2.6.0",
|
|
95
|
+
"webpack-merge": "^0.8.3"
|
|
96
|
+
}
|
|
97
|
+
}
|
package/src/address.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import Vue from 'vue'
|
|
2
|
-
import App from './App'
|
|
3
|
-
import { all } from 'vue-client'
|
|
4
|
-
// import 'babel-polyfill'
|
|
5
|
-
import AddressSelect from './components/AddressSelect'
|
|
6
|
-
import AddressModel from './components/AddressModel'
|
|
7
|
-
|
|
8
|
-
export default function () {
|
|
9
|
-
|
|
10
|
-
Vue.config.silent = false
|
|
11
|
-
|
|
12
|
-
Vue.component('address-select', AddressSelect)
|
|
13
|
-
Vue.component('address-model', AddressModel)
|
|
14
|
-
/** ********************** pc端 *********************** **/
|
|
15
|
-
// 添加地址
|
|
16
|
-
Vue.component('address-add-address', (resolve) => { require(['./components/AddressAddAddress'], resolve) })
|
|
17
|
-
// 地址选择树
|
|
18
|
-
// Vue.component('address-select', (resolve) => { require(['./components/AddressSelect'], resolve) })
|
|
19
|
-
// 地址树
|
|
20
|
-
Vue.component('address-tree', (resolve) => { require(['./components/AddressTree'], resolve) })
|
|
21
|
-
//小区树
|
|
22
|
-
Vue.component('area-tree', (resolve) => { require(['./components/AreaTree'], resolve) })
|
|
23
|
-
//地址管理父组件
|
|
24
|
-
Vue.component('address-manage', (resolve) => { require(['./components/AddressManage'], resolve) })
|
|
25
|
-
//地址列表
|
|
26
|
-
Vue.component('address-list', (resolve) => { require(['./components/AddressList'], resolve) })
|
|
27
|
-
//地址管理
|
|
28
|
-
Vue.component('user-address', (resolve) => { require(['./components/UserAddress'], resolve) })
|
|
29
|
-
//地址建档
|
|
30
|
-
Vue.component('address-files', (resolve) => { require(['./components/AddressFiles'], resolve) })
|
|
31
|
-
//小区建档(旧)
|
|
32
|
-
Vue.component('area-files', (resolve) => { require(['./components/AreaFiles'], resolve) })
|
|
33
|
-
//小区建档(新)
|
|
34
|
-
Vue.component('area-list', (resolve) => { require(['./components/AreaList'], resolve) })
|
|
35
|
-
|
|
36
|
-
Vue.dataUrl = ''
|
|
37
|
-
}
|
|
1
|
+
import Vue from 'vue'
|
|
2
|
+
import App from './App'
|
|
3
|
+
import { all } from 'vue-client'
|
|
4
|
+
// import 'babel-polyfill'
|
|
5
|
+
import AddressSelect from './components/AddressSelect'
|
|
6
|
+
import AddressModel from './components/AddressModel'
|
|
7
|
+
|
|
8
|
+
export default function () {
|
|
9
|
+
|
|
10
|
+
Vue.config.silent = false
|
|
11
|
+
|
|
12
|
+
Vue.component('address-select', AddressSelect)
|
|
13
|
+
Vue.component('address-model', AddressModel)
|
|
14
|
+
/** ********************** pc端 *********************** **/
|
|
15
|
+
// 添加地址
|
|
16
|
+
Vue.component('address-add-address', (resolve) => { require(['./components/AddressAddAddress'], resolve) })
|
|
17
|
+
// 地址选择树
|
|
18
|
+
// Vue.component('address-select', (resolve) => { require(['./components/AddressSelect'], resolve) })
|
|
19
|
+
// 地址树
|
|
20
|
+
Vue.component('address-tree', (resolve) => { require(['./components/AddressTree'], resolve) })
|
|
21
|
+
//小区树
|
|
22
|
+
Vue.component('area-tree', (resolve) => { require(['./components/AreaTree'], resolve) })
|
|
23
|
+
//地址管理父组件
|
|
24
|
+
Vue.component('address-manage', (resolve) => { require(['./components/AddressManage'], resolve) })
|
|
25
|
+
//地址列表
|
|
26
|
+
Vue.component('address-list', (resolve) => { require(['./components/AddressList'], resolve) })
|
|
27
|
+
//地址管理
|
|
28
|
+
Vue.component('user-address', (resolve) => { require(['./components/UserAddress'], resolve) })
|
|
29
|
+
//地址建档
|
|
30
|
+
Vue.component('address-files', (resolve) => { require(['./components/AddressFiles'], resolve) })
|
|
31
|
+
//小区建档(旧)
|
|
32
|
+
Vue.component('area-files', (resolve) => { require(['./components/AreaFiles'], resolve) })
|
|
33
|
+
//小区建档(新)
|
|
34
|
+
Vue.component('area-list', (resolve) => { require(['./components/AreaList'], resolve) })
|
|
35
|
+
|
|
36
|
+
Vue.dataUrl = ''
|
|
37
|
+
}
|
|
@@ -1,170 +1,170 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div id="unit" class="flex-row">
|
|
3
|
-
<div class="flex" style="flex: 1; width:65%">
|
|
4
|
-
<address-list @select-changed="selected" v-ref:addresslist :f_filialeids.sync="f_filialeids"></address-list>
|
|
5
|
-
</div>
|
|
6
|
-
<div style="width:35%" v-show="useraddressShow">
|
|
7
|
-
<user-address v-ref:useraddress :f_filialeids.sync="f_filialeids" :row="row"></user-address>
|
|
8
|
-
</div>
|
|
9
|
-
</div>
|
|
10
|
-
</template>
|
|
11
|
-
|
|
12
|
-
<script>
|
|
13
|
-
|
|
14
|
-
import {HttpResetClass} from 'vue-client'
|
|
15
|
-
|
|
16
|
-
let loadStreetAndResGen = async function (self, model, row) {
|
|
17
|
-
self.street = []
|
|
18
|
-
self.residential = []
|
|
19
|
-
self.area = []
|
|
20
|
-
let loc = self.f_filialeids.split('.')
|
|
21
|
-
// 获取区县
|
|
22
|
-
let condition = `f_type='区' and f_locationId = ${loc[loc.length-2]}`
|
|
23
|
-
let res = await self.$resetpost('rs/sql/address_singleTableOrderBy', {data: {items: 'id,f_name',tablename: 't_address',orderitem: 'f_name' ,condition: condition}},{resolveMsg: null, rejectMsg: '获取区县失败!'})
|
|
24
|
-
res.data.forEach((row)=>{
|
|
25
|
-
self.area.push({label:row.f_name, value:row.id})
|
|
26
|
-
})
|
|
27
|
-
if (row.f_area) {
|
|
28
|
-
self.area.forEach((item) => {
|
|
29
|
-
if (item.label === row.f_area) {
|
|
30
|
-
model.f_area = item.value
|
|
31
|
-
// 用于区分变化
|
|
32
|
-
row.f_area_id = item.value
|
|
33
|
-
}
|
|
34
|
-
})
|
|
35
|
-
}
|
|
36
|
-
if (model.f_area) {
|
|
37
|
-
let streetCondition = `f_type='街道' and f_parentId = ${model.f_area}`
|
|
38
|
-
console.log('我是修正是发的获取街道请求')
|
|
39
|
-
let getStreet = await
|
|
40
|
-
self.$resetpost('rs/sql/address_singleTableOrderBy', {
|
|
41
|
-
data: {
|
|
42
|
-
items: 'id,f_name',
|
|
43
|
-
tablename: 't_address',
|
|
44
|
-
orderitem: 'f_name',
|
|
45
|
-
condition: streetCondition
|
|
46
|
-
}
|
|
47
|
-
}, {resolveMsg: null, rejectMsg: '获取街道失败!'})
|
|
48
|
-
getStreet.data.forEach((row) => {
|
|
49
|
-
self.street.push({label: row.f_name, value: row.id})
|
|
50
|
-
})
|
|
51
|
-
self.street.forEach((item) => {
|
|
52
|
-
if(item.label === row.f_street){
|
|
53
|
-
model.f_street = item.value
|
|
54
|
-
row.f_street_id = item.value
|
|
55
|
-
}
|
|
56
|
-
})
|
|
57
|
-
} else {
|
|
58
|
-
model.f_street = ''
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
if (model.f_street) {
|
|
62
|
-
let resCondition = `f_type='小区' and f_parentId = ${model.f_street}`
|
|
63
|
-
console.log('我是修正是发的获取小区请求')
|
|
64
|
-
let getResCondition = await self.$resetpost('rs/sql/address_singleTableOrderBy', {data: {items: 'id,f_name',tablename: 't_address',orderitem: 'f_name' ,condition: resCondition}},{resolveMsg: null, rejectMsg: '获取小区失败!'})
|
|
65
|
-
getResCondition.data.forEach((row)=>{
|
|
66
|
-
self.residential.push({label:row.f_name, value:row.id})
|
|
67
|
-
})
|
|
68
|
-
self.residential.forEach((item) => {
|
|
69
|
-
if (item.label === row.f_residential_area) {
|
|
70
|
-
model.f_residential_area = item.value
|
|
71
|
-
row.f_residential_area_id = item.value
|
|
72
|
-
}
|
|
73
|
-
})
|
|
74
|
-
} else {
|
|
75
|
-
model.f_residential_area = ''
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export default {
|
|
80
|
-
title: '地址管理',
|
|
81
|
-
data () {
|
|
82
|
-
return {
|
|
83
|
-
//分公司id串
|
|
84
|
-
f_filialeids: this.$login.f.f_orgids,
|
|
85
|
-
area: [],
|
|
86
|
-
street: [],
|
|
87
|
-
residential: [],
|
|
88
|
-
row: {},
|
|
89
|
-
useraddressShow: false
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
props:{
|
|
93
|
-
//控制显示确定按钮
|
|
94
|
-
ishujiao:{
|
|
95
|
-
type: Boolean,
|
|
96
|
-
default: false
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
methods:{
|
|
100
|
-
selected(obj){
|
|
101
|
-
this.useraddressShow = true
|
|
102
|
-
this.row = obj.val
|
|
103
|
-
//选择状态变为true
|
|
104
|
-
this.$refs.useraddress.revise = true
|
|
105
|
-
//true则是特殊地址
|
|
106
|
-
if(this.row.f_special==1){
|
|
107
|
-
this.$refs.useraddress.special = true
|
|
108
|
-
}else{
|
|
109
|
-
this.$refs.useraddress.special = false
|
|
110
|
-
}
|
|
111
|
-
this.$refs.useraddress.model.id = this.row.id
|
|
112
|
-
this.$refs.useraddress.model.f_residential_area_id = this.row.f_residential_area_id
|
|
113
|
-
|
|
114
|
-
loadStreetAndResGen(this, this.$refs.useraddress.model, this.row)
|
|
115
|
-
this.$refs.useraddress.model.f_building = this.row.f_building
|
|
116
|
-
this.$refs.useraddress.model.f_unit = this.row.f_unit
|
|
117
|
-
this.$refs.useraddress.model.f_floor = this.row.f_floor
|
|
118
|
-
this.$refs.useraddress.model.f_room = this.row.f_room
|
|
119
|
-
|
|
120
|
-
this.$refs.useraddress.model.f_address = this.row.f_address.replace(''+(this.row.f_area?this.row.f_area:'')+(this.row.f_street?this.row.f_street:''),'')
|
|
121
|
-
//下拉数据清空
|
|
122
|
-
this.$refs.useraddress.area = this.area
|
|
123
|
-
this.$refs.useraddress.street = this.street
|
|
124
|
-
this.$refs.useraddress.residentialArea = this.residential
|
|
125
|
-
}
|
|
126
|
-
},
|
|
127
|
-
events:{
|
|
128
|
-
'add'(val){
|
|
129
|
-
this.row = {}
|
|
130
|
-
this.useraddressShow = true
|
|
131
|
-
//true为新增特殊地址
|
|
132
|
-
if(val){
|
|
133
|
-
this.$refs.useraddress.special = true
|
|
134
|
-
}else{
|
|
135
|
-
this.$refs.useraddress.special = false
|
|
136
|
-
}
|
|
137
|
-
//选择状态变为false
|
|
138
|
-
this.$refs.useraddress.revise = false
|
|
139
|
-
//获取区/县数据
|
|
140
|
-
this.$refs.useraddress.init()
|
|
141
|
-
//清空输入数据
|
|
142
|
-
this.$refs.useraddress.partclear1()
|
|
143
|
-
this.$refs.useraddress.partclear2()
|
|
144
|
-
},
|
|
145
|
-
'cancel'(){
|
|
146
|
-
this.useraddressShow = false
|
|
147
|
-
},
|
|
148
|
-
'refresh'(){
|
|
149
|
-
//重新查询
|
|
150
|
-
this.$refs.addresslist.$refs.paged.$refs.cri.search()
|
|
151
|
-
},
|
|
152
|
-
//点了确定
|
|
153
|
-
'confirm'(){
|
|
154
|
-
if(this.$refs.useraddress.revise){
|
|
155
|
-
//看看地址是否上传工单
|
|
156
|
-
this.$resetpost('rs/sql/address_singleTable',{data: {items: 'id',tablename: 't_service',condition: `f_addressid='${this.row.id}'`}}, {resolveMsg: null, rejectMsg: null}).then((rs)=>{
|
|
157
|
-
if(rs.data.length>0){
|
|
158
|
-
this.$showAlert('该地址已下发通气单','warning',900)
|
|
159
|
-
}else{
|
|
160
|
-
this.$dispatch('re-ref',this.row)
|
|
161
|
-
console.log("返回事件",this.row)
|
|
162
|
-
}
|
|
163
|
-
})
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
</script>
|
|
169
|
-
<style>
|
|
170
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div id="unit" class="flex-row">
|
|
3
|
+
<div class="flex" style="flex: 1; width:65%">
|
|
4
|
+
<address-list @select-changed="selected" v-ref:addresslist :f_filialeids.sync="f_filialeids"></address-list>
|
|
5
|
+
</div>
|
|
6
|
+
<div style="width:35%" v-show="useraddressShow">
|
|
7
|
+
<user-address v-ref:useraddress :f_filialeids.sync="f_filialeids" :row="row"></user-address>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
|
|
14
|
+
import {HttpResetClass} from 'vue-client'
|
|
15
|
+
|
|
16
|
+
let loadStreetAndResGen = async function (self, model, row) {
|
|
17
|
+
self.street = []
|
|
18
|
+
self.residential = []
|
|
19
|
+
self.area = []
|
|
20
|
+
let loc = self.f_filialeids.split('.')
|
|
21
|
+
// 获取区县
|
|
22
|
+
let condition = `f_type='区' and f_locationId = ${loc[loc.length-2]?loc[loc.length-2]:''}`
|
|
23
|
+
let res = await self.$resetpost('rs/sql/address_singleTableOrderBy', {data: {items: 'id,f_name',tablename: 't_address',orderitem: 'f_name' ,condition: condition}},{resolveMsg: null, rejectMsg: '获取区县失败!'})
|
|
24
|
+
res.data.forEach((row)=>{
|
|
25
|
+
self.area.push({label:row.f_name, value:row.id})
|
|
26
|
+
})
|
|
27
|
+
if (row.f_area) {
|
|
28
|
+
self.area.forEach((item) => {
|
|
29
|
+
if (item.label === row.f_area) {
|
|
30
|
+
model.f_area = item.value
|
|
31
|
+
// 用于区分变化
|
|
32
|
+
row.f_area_id = item.value
|
|
33
|
+
}
|
|
34
|
+
})
|
|
35
|
+
}
|
|
36
|
+
if (model.f_area) {
|
|
37
|
+
let streetCondition = `f_type='街道' and f_parentId = ${model.f_area?model.f_area:''}`
|
|
38
|
+
console.log('我是修正是发的获取街道请求')
|
|
39
|
+
let getStreet = await
|
|
40
|
+
self.$resetpost('rs/sql/address_singleTableOrderBy', {
|
|
41
|
+
data: {
|
|
42
|
+
items: 'id,f_name',
|
|
43
|
+
tablename: 't_address',
|
|
44
|
+
orderitem: 'f_name',
|
|
45
|
+
condition: streetCondition
|
|
46
|
+
}
|
|
47
|
+
}, {resolveMsg: null, rejectMsg: '获取街道失败!'})
|
|
48
|
+
getStreet.data.forEach((row) => {
|
|
49
|
+
self.street.push({label: row.f_name, value: row.id})
|
|
50
|
+
})
|
|
51
|
+
self.street.forEach((item) => {
|
|
52
|
+
if(item.label === row.f_street){
|
|
53
|
+
model.f_street = item.value
|
|
54
|
+
row.f_street_id = item.value
|
|
55
|
+
}
|
|
56
|
+
})
|
|
57
|
+
} else {
|
|
58
|
+
model.f_street = ''
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (model.f_street) {
|
|
62
|
+
let resCondition = `f_type='小区' and f_parentId = ${model.f_street}`
|
|
63
|
+
console.log('我是修正是发的获取小区请求')
|
|
64
|
+
let getResCondition = await self.$resetpost('rs/sql/address_singleTableOrderBy', {data: {items: 'id,f_name',tablename: 't_address',orderitem: 'f_name' ,condition: resCondition}},{resolveMsg: null, rejectMsg: '获取小区失败!'})
|
|
65
|
+
getResCondition.data.forEach((row)=>{
|
|
66
|
+
self.residential.push({label:row.f_name, value:row.id})
|
|
67
|
+
})
|
|
68
|
+
self.residential.forEach((item) => {
|
|
69
|
+
if (item.label === row.f_residential_area) {
|
|
70
|
+
model.f_residential_area = item.value
|
|
71
|
+
row.f_residential_area_id = item.value
|
|
72
|
+
}
|
|
73
|
+
})
|
|
74
|
+
} else {
|
|
75
|
+
model.f_residential_area = ''
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export default {
|
|
80
|
+
title: '地址管理',
|
|
81
|
+
data () {
|
|
82
|
+
return {
|
|
83
|
+
//分公司id串
|
|
84
|
+
f_filialeids: this.$login.f.f_orgids,
|
|
85
|
+
area: [],
|
|
86
|
+
street: [],
|
|
87
|
+
residential: [],
|
|
88
|
+
row: {},
|
|
89
|
+
useraddressShow: false
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
props:{
|
|
93
|
+
//控制显示确定按钮
|
|
94
|
+
ishujiao:{
|
|
95
|
+
type: Boolean,
|
|
96
|
+
default: false
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
methods:{
|
|
100
|
+
selected(obj){
|
|
101
|
+
this.useraddressShow = true
|
|
102
|
+
this.row = obj.val
|
|
103
|
+
//选择状态变为true
|
|
104
|
+
this.$refs.useraddress.revise = true
|
|
105
|
+
//true则是特殊地址
|
|
106
|
+
if(this.row.f_special==1){
|
|
107
|
+
this.$refs.useraddress.special = true
|
|
108
|
+
}else{
|
|
109
|
+
this.$refs.useraddress.special = false
|
|
110
|
+
}
|
|
111
|
+
this.$refs.useraddress.model.id = this.row.id
|
|
112
|
+
this.$refs.useraddress.model.f_residential_area_id = this.row.f_residential_area_id
|
|
113
|
+
|
|
114
|
+
loadStreetAndResGen(this, this.$refs.useraddress.model, this.row)
|
|
115
|
+
this.$refs.useraddress.model.f_building = this.row.f_building
|
|
116
|
+
this.$refs.useraddress.model.f_unit = this.row.f_unit
|
|
117
|
+
this.$refs.useraddress.model.f_floor = this.row.f_floor
|
|
118
|
+
this.$refs.useraddress.model.f_room = this.row.f_room
|
|
119
|
+
|
|
120
|
+
this.$refs.useraddress.model.f_address = this.row.f_address.replace(''+(this.row.f_area?this.row.f_area:'')+(this.row.f_street?this.row.f_street:''),'')
|
|
121
|
+
//下拉数据清空
|
|
122
|
+
this.$refs.useraddress.area = this.area
|
|
123
|
+
this.$refs.useraddress.street = this.street
|
|
124
|
+
this.$refs.useraddress.residentialArea = this.residential
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
events:{
|
|
128
|
+
'add'(val){
|
|
129
|
+
this.row = {}
|
|
130
|
+
this.useraddressShow = true
|
|
131
|
+
//true为新增特殊地址
|
|
132
|
+
if(val){
|
|
133
|
+
this.$refs.useraddress.special = true
|
|
134
|
+
}else{
|
|
135
|
+
this.$refs.useraddress.special = false
|
|
136
|
+
}
|
|
137
|
+
//选择状态变为false
|
|
138
|
+
this.$refs.useraddress.revise = false
|
|
139
|
+
//获取区/县数据
|
|
140
|
+
this.$refs.useraddress.init()
|
|
141
|
+
//清空输入数据
|
|
142
|
+
this.$refs.useraddress.partclear1()
|
|
143
|
+
this.$refs.useraddress.partclear2()
|
|
144
|
+
},
|
|
145
|
+
'cancel'(){
|
|
146
|
+
this.useraddressShow = false
|
|
147
|
+
},
|
|
148
|
+
'refresh'(){
|
|
149
|
+
//重新查询
|
|
150
|
+
this.$refs.addresslist.$refs.paged.$refs.cri.search()
|
|
151
|
+
},
|
|
152
|
+
//点了确定
|
|
153
|
+
'confirm'(){
|
|
154
|
+
if(this.$refs.useraddress.revise){
|
|
155
|
+
//看看地址是否上传工单
|
|
156
|
+
this.$resetpost('rs/sql/address_singleTable',{data: {items: 'id',tablename: 't_service',condition: `f_addressid='${this.row.id}'`}}, {resolveMsg: null, rejectMsg: null}).then((rs)=>{
|
|
157
|
+
if(rs.data.length>0){
|
|
158
|
+
this.$showAlert('该地址已下发通气单','warning',900)
|
|
159
|
+
}else{
|
|
160
|
+
this.$dispatch('re-ref',this.row)
|
|
161
|
+
console.log("返回事件",this.row)
|
|
162
|
+
}
|
|
163
|
+
})
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
</script>
|
|
169
|
+
<style>
|
|
170
|
+
</style>
|