address-client 3.2.88 → 3.2.90

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.
@@ -10,85 +10,85 @@ var proxy = httpProxy.createProxyServer()
10
10
 
11
11
  // Define HTTP proxies to your custom API backend
12
12
  // https://github.com/chimurai/http-proxy-middleware
13
- var str = 'https://qnjtkf.cn:8401/#', str2 = 'https://qnjtkf.cn:8401/#'
14
- var str3 = 'https://qnjtkf.cn:8401/#'
13
+ var str = 'http://127.0.0.1:8288', str2= 'http://192.168.50.4:8400/'
14
+ var str3= 'http://192.168.50.4:8400/'
15
15
  var proxyTable = {
16
- // '/rs/entity': {
17
- // target: str3
18
- // // secure:true,
19
- // // changeOrigin:true
20
- // // target: 'http://127.0.0.1:8080'
21
- // },
22
- // '/webapps': {
23
- // target: str3,
24
- // secure: true,
25
- // changeOrigin: true
26
- // // target: 'http://127.0.0.1:8080'
27
- // },
28
- // '/rs/logic/getLogin': {
29
- // target: str3,
30
- // secure: true,
31
- // changeOrigin: true
32
- // },
33
- // '/rs/logic/getInitData': {
34
- // target: str3,
35
- // secure: true,
36
- // changeOrigin: true
37
- // },
38
- // '/rs/logic/getSaleInitData': {
39
- // target: str3,
40
- // secure: true,
41
- // changeOrigin: true
42
- // },
43
- // // '/rs/logic':{
44
- // // target: str3,
45
- // // secure:true,
46
- // // changeOrigin:true
47
- // // // target: 'http://127.0.0.1:8080'
48
- // // },
49
- // '/rs/vue': {
50
- // target: str3,
51
- // secure: true,
52
- // changeOrigin: true
53
- // },
54
- // '/rs/user': {
55
- // target: str3,
56
- // secure: true,
57
- // changeOrigin: true
58
- // },
59
- // '/rs/db': {
60
- // target: str3,
61
- // secure: true,
62
- // changeOrigin: true
63
- // },
64
- // '/rs/search': {
65
- // target: str3,
66
- // secure: true,
67
- // changeOrigin: true
68
- // // target: 'http://127.0.0.1:8080'
69
- // },
70
- // '/rs/data': {
16
+ '/rs/entity': {
17
+ target: str
18
+ // secure:true,
19
+ // changeOrigin:true
20
+ // target: 'http://127.0.0.1:8080'
21
+ },
22
+ '/webapps':{
23
+ target: str3,
24
+ secure:true,
25
+ changeOrigin:true
26
+ // target: 'http://127.0.0.1:8080'
27
+ },
28
+ '/rs/logic/getLogin': {
29
+ target: str3,
30
+ secure:true,
31
+ changeOrigin:true
32
+ },
33
+ '/rs/logic/getInitData': {
34
+ target: str3,
35
+ secure:true,
36
+ changeOrigin:true,
37
+ },
38
+ '/rs/logic/getSaleInitData': {
39
+ target: str3,
40
+ secure:true,
41
+ changeOrigin:true
42
+ },
43
+ // '/rs/logic':{
71
44
  // target: str3,
72
- // secure: true,
73
- // changeOrigin: true
74
- // },
75
- // '/rs/sql': {
76
- // target: str
77
- // // secure: true,
78
- // // changeOrigin:true
79
- // // target: 'http://127.0.0.1:8080'
80
- // },
81
- // '/rs/logic': {
82
- // target: str
83
- // // secure: true,
84
- // // changeOrigin:true
45
+ // secure:true,
46
+ // changeOrigin:true
85
47
  // // target: 'http://127.0.0.1:8080'
86
48
  // },
49
+ '/rs/vue': {
50
+ target: str3,
51
+ secure:true,
52
+ changeOrigin:true
53
+ },
54
+ '/rs/user': {
55
+ target: str3,
56
+ secure:true,
57
+ changeOrigin:true
58
+ },
59
+ '/rs/db': {
60
+ target: str3,
61
+ secure:true,
62
+ changeOrigin:true
63
+ },
64
+ '/rs/search': {
65
+ target: str3,
66
+ secure:true,
67
+ changeOrigin:true
68
+ // target: 'http://127.0.0.1:8080'
69
+ },
70
+ '/rs/data': {
71
+ target: str3,
72
+ secure:true,
73
+ changeOrigin:true
74
+ },
75
+ '/rs/sql': {
76
+ target: str
77
+ // secure: true,
78
+ // changeOrigin:true
79
+ // target: 'http://127.0.0.1:8080'
80
+ },
81
+ '/rs/logic': {
82
+ target: str
83
+ // secure: true,
84
+ // changeOrigin:true
85
+ // target: 'http://127.0.0.1:8080'
86
+ },
87
87
  '/rs': {
88
88
  // target: 'http://192.168.50.199:8300'
89
89
  target: str3,
90
- secure: true,
91
- changeOrigin: true
90
+ secure:true,
91
+ changeOrigin:true
92
92
  }
93
93
  }
94
94
 
@@ -104,7 +104,7 @@ var hotMiddleware = require('webpack-hot-middleware')(compiler)
104
104
  // force page reload when html-webpack-plugin template changes
105
105
  compiler.plugin('compilation', function (compilation) {
106
106
  compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
107
- hotMiddleware.publish({action: 'reload'})
107
+ hotMiddleware.publish({ action: 'reload' })
108
108
  cb()
109
109
  })
110
110
  })
@@ -113,7 +113,7 @@ compiler.plugin('compilation', function (compilation) {
113
113
  Object.keys(proxyTable).forEach(function (context) {
114
114
  var options = proxyTable[context]
115
115
  if (typeof options === 'string') {
116
- options = {target: options}
116
+ options = { target: options }
117
117
  }
118
118
  app.use(proxyMiddleware(context, options))
119
119
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "address-client",
3
- "version": "3.2.88",
3
+ "version": "3.2.90",
4
4
  "description": "地址管理前台组件",
5
5
  "author": "wanbochao",
6
6
  "license": "ISC",
package/src/App.vue CHANGED
@@ -1,60 +1,16 @@
1
- <template>
2
- <app-base class="bg" @click="isTimeOut">
3
- <div class='flex'>
4
- <article>
5
- <route :comp="{name: 'login'}"></route>
6
- </article>
7
- </div>
8
- </app-base>
9
- </template>
10
-
11
- <script>
12
- import Vue from 'vue'
13
- export default {
14
- data () {
15
- return {
16
- lastTime: null, // 最后一次点击的时间
17
- currentTime: null, // 当前点击的时间
18
- // 获取一次不在获取控制
19
- getConfig: false,
20
- config: {
21
- timeOut: 0, // 单位: 分钟
22
- exitPrompt: '因您长时间未操作, 请重新登陆!'
23
- },
24
- }
25
- },
26
- ready () {
27
- Vue.mmType = 'nginx'
28
- Vue.HWQMM = [51, 150, 231, 300, 565, 708, 721, 952, 738, 560, 935, 912, 1274, 1148, 840, 1440]
29
- },
30
- created () {
31
- this.lastTime = new Date().getTime()
32
- },
33
- methods: {
34
- async isTimeOut () {
35
- // 获取config配置
36
- if (!this.getConfig && this.$login.f && this.$login.f.dir) {
37
- await this.$getConfig(this, 'App')
38
- this.getConfig = true
39
- }
40
- // 无配置,不开启
41
- if (this.config.timeOut <= 0) return
42
- // 记录这次点击的时间
43
- this.currentTime = new Date().getTime()
44
- // 判断上次最后一次点击的时间和这次点击的时间间隔是否大于超时时间
45
- if (this.currentTime - this.lastTime > (this.config.timeOut * 60 * 1000)) {
46
- // 如果是登录状态
47
- if (this.$login.f.id) {
48
- await this.$showMessage(this.config.exitPrompt)
49
- window.location.reload()
50
- } else {
51
- this.lastTime = new Date().getTime()
52
- }
53
- } else {
54
- // 如果在超时时间内点击,则把这次点击的时间记录覆盖掉之前存的最后一次点击的时间
55
- this.lastTime = new Date().getTime()
56
- }
57
- }
58
- }
59
- }
60
- </script>
1
+ <template>
2
+ <app-base class="bg">
3
+ <div class='flex'>
4
+ <article>
5
+ <route :comp="{name: 'login'}"></route>
6
+ <!--<address-model :isshow="true" :isbasch="false"></address-model>-->
7
+ </article>
8
+ </div>
9
+ </app-base>
10
+ </template>
11
+
12
+ <script>
13
+ export default {
14
+
15
+ }
16
+ </script>
package/src/address.js CHANGED
@@ -55,6 +55,13 @@ export default function (filiale) {
55
55
  Vue.component('street-manage-list', (resolve) => { require(['./components/StreetManageList'], resolve) })
56
56
  // 新增/修改 街道办信息
57
57
  Vue.component('add-street-manage-msg', (resolve) => { require(['./components/AddStreetManageMsg'], resolve) })
58
+ // 社区管理
59
+ Vue.component('community-manage', (resolve) => { require(['./components/CommunityManage'], resolve) })
60
+ // 街道办列表
61
+ Vue.component('community-manage-list', (resolve) => { require(['./components/CommunityManageList'], resolve) })
62
+ // 新增/修改 街道办信息
63
+ Vue.component('add-community-manage-msg', (resolve) => { require(['./components/AddCommunityManageMsg'], resolve) })
64
+
58
65
  // 分公司特殊页面注册替换
59
66
  if (filiale) {
60
67
  let filialeComp = require(`./filiale/${filiale}/sale`).specialComp
@@ -0,0 +1,215 @@
1
+ <template>
2
+ <div class="span">
3
+ <validator name='v'>
4
+ <p class="bg-info text-center" style="padding: 8px;">{{ businesstype }}社区</p>
5
+ <div class="auto select-overspread form-horizontal">
6
+ <div style="text-align:right;margin-top:6px;" class="col-sm-12">
7
+ <!-- 社区-->
8
+ <div class="row">
9
+ <div class="col-sm-6 form-group"
10
+ :class="[$v.f_street_id.required ? 'has-error' : 'has-success']">
11
+ <label class="font_normal_body">街道/乡镇</label>
12
+ <input type="text" style="width:60%" class="input_search" v-show="false" v-model="communitymodel.f_street_id"
13
+ v-validate:f_street_id='{required: true }'>
14
+ <v-select
15
+ :value.sync="communitymodel.f_street_id" :value-single="true"
16
+ :options='streetlist' placeholder='请选择'
17
+ close-on-select search="true">
18
+ </v-select>
19
+ </div>
20
+ <div class="col-sm-6 form-group"
21
+ :class="[$v.f_community_code.required ? 'has-error' : 'has-success']">
22
+ <label class="font_normal_body">社区编号</label>
23
+ <input type="text" v-model="communitymodel.f_community_code"
24
+ @change="communityyanzheng"
25
+ class="input_search" style="width:60%" placeholder="社区编号"
26
+ v-validate:f_community_code='{required: true }'>
27
+ </div>
28
+ <div class="col-sm-6 form-group "
29
+ :class="[$v.f_community_name.required ? 'has-error' : 'has-success']">
30
+ <label class="font_normal_body">社区名称</label>
31
+ <input type="text" v-model="communitymodel.f_community_name"
32
+ class="input_search" style="width:60%" placeholder="社区名称"
33
+ v-validate:f_community_name='{required: true }'>
34
+ </div>
35
+ <div class="col-sm-6 form-group"
36
+ :class="[$v.f_community_director.required ? 'has-error' : 'has-success']">
37
+ <label class="font_normal_body">社区负责人</label>
38
+ <input type="text" v-show="false" v-model="communitymodel.f_community_director"
39
+ v-validate:f_community_director='{required: true }'>
40
+ <v-select :value.sync="communitymodel.f_community_director"
41
+ :value-single="true"
42
+ :options='directors'
43
+ placeholder='请选择'
44
+ close-on-select
45
+ search="true">
46
+ </v-select>
47
+ </div>
48
+ <div class="col-sm-6 form-group"
49
+ :class="[$v.f_director_phone.required ? 'has-error' : 'has-success']">
50
+ <label class="font_normal_body">负责人电话</label>
51
+ <input type="text" v-model="communitymodel.f_director_phone"
52
+ class="input_search" style="width:60%" placeholder="负责人电话"
53
+ v-validate:f_director_phone='{required: true }'>
54
+ </div>
55
+ <div class="col-sm-12 form-group">
56
+ <label class="font_normal_body " style="">备&emsp;&emsp;注</label>
57
+ <textarea class="input_textarea" rows="3" style="margin-top:25px;width:80%;height: auto;"
58
+ v-model="communitymodel.f_comments"></textarea>
59
+ </div>
60
+ </div>
61
+ <div class="row">
62
+ <div style="margin-top:40px;text-align:right;">
63
+ <button class="button_search button_spacing" @click="confirm()" :disabled='!$v.valid'>保存</button>
64
+ <button class="button_clear button_spacing" @click="cancel()">取消</button>
65
+ </div>
66
+ </div>
67
+ </div>
68
+ </div>
69
+ </validator>
70
+ </div>
71
+ </template>
72
+
73
+ <script>
74
+ import {HttpResetClass} from 'vue-client'
75
+
76
+ // let getAreaConfig = async function (self) {
77
+ // // 获取气价里面的配置
78
+ // await self.$getConfig(self, 'StreetManage')
79
+ // console.log('原地址配置', self.config)
80
+ // console.log('获取地址配置', self.config)
81
+ // Object.assign(self.model, self.config)
82
+ // }
83
+ export default {
84
+ title: '社区信息添加',
85
+ data() {
86
+ return {
87
+ //初始化省市区数据
88
+ config: {
89
+ hasnumber: true
90
+ },
91
+ streetlist: [],
92
+ directors: this.$appdata.getParam('社区负责人') ? this.$appdata.getParam('社区负责人') : [],
93
+ //街道办
94
+ communitymodel: {
95
+ f_pcd_id: '',
96
+ f_street_manage_id: '',
97
+ slice_area: null,
98
+ f_slice_area: null,
99
+ f_adjustable_id: null,
100
+ f_community_name: '',
101
+ f_comments: '',
102
+ f_community_code: '',
103
+ f_director_phone: '',
104
+ f_community_director: ''
105
+ }
106
+ }
107
+ },
108
+ props: ['f_filialeids', 'businesstype'],
109
+ ready() {
110
+ this.initdata()
111
+ },
112
+ methods: {
113
+ async communityyanzheng() {
114
+ console.log(this.communitymodel.f_community_code)
115
+ let res = await this.$resetpost('rs/sql/address_singleTableOrderBy', {
116
+ data: {
117
+ items: '*',
118
+ tablename: 't_community',
119
+ orderitem: 'id',
120
+ condition: `f_community_code = '${this.communitymodel.f_community_code}'`
121
+ }
122
+ }, {resolveMsg: null, rejectMsg: null})
123
+ if (res.data.length > 0) {
124
+ if (res.data[0].id != this.communitymodel.id) {
125
+ this.$showAlert('当前社区编号编号已存在', 'warning', 2000)
126
+ this.communitymodel.f_community_code = ''
127
+ }
128
+ }
129
+ },
130
+ //根据名字找数据
131
+ findbyid(list, name) {
132
+ var result
133
+ list.forEach((row, n) => {
134
+ if (name == row.id) {
135
+ result = row.data
136
+ }
137
+ })
138
+ return result
139
+ },
140
+ //初始化数据
141
+ initdata() {
142
+ this.streetlist = []
143
+ console.log("街道准备")
144
+ let HttpReset = new HttpResetClass()
145
+ HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
146
+ data: {
147
+ items: '*',
148
+ tablename: 't_street',
149
+ orderitem: 'id',
150
+ condition: ` f_filialeid = '${this.f_filialeids}'`
151
+ }
152
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'}).then((req) => {
153
+ let redata = []
154
+ req.data.forEach((row, n) => {
155
+ redata[n] = {
156
+ label: row.f_street,
157
+ value: row.id,
158
+ data: row,
159
+ id: row.id
160
+ }
161
+ })
162
+ this.streetlist = redata
163
+ })
164
+ },
165
+ // //省/市/区变化
166
+ // pcdChange(val) {
167
+ // console.log("省/市/区变化", val)
168
+ // this.$resetValidation()
169
+ // },
170
+ //保存
171
+ async confirm() {
172
+ await this.savestreet()
173
+ this.clearData()
174
+ this.$dispatch('confirm')
175
+ },
176
+ //保存街道
177
+ async savestreet() {
178
+ this.communitymodel.f_filialeid = this.f_filialeids
179
+ this.communitymodel.f_operator = this.$login.f.name
180
+ this.communitymodel.f_operatorid = this.$login.f.id
181
+ this.communitymodel.f_orgid = this.$login.f.orgid
182
+ this.communitymodel.f_orgname = this.$login.f.orgs
183
+ this.communitymodel.f_depid = this.$login.f.depids
184
+ this.communitymodel.f_depname = this.$login.f.deps
185
+ this.communitymodel.f_street = this.findbyid(this.streetlist, this.communitymodel.f_street_id).f_street
186
+ console.log('获取社区model', this.communitymodel)
187
+ await this.$resetpost('rs/logic/address_updateCommunityManage', this.communitymodel)
188
+ },
189
+ cancel() {
190
+ this.clearData()
191
+ this.$dispatch('cancel')
192
+ },
193
+ clearData() {
194
+ this.communitymodel = {
195
+ f_pcd_id: '',
196
+ f_slice_area: '',
197
+ f_adjustable_id: '',
198
+ f_street_manage_name: '',
199
+ f_street_manage_number: '',
200
+ f_comments: ''
201
+ }
202
+ }
203
+ },
204
+ watch: {
205
+ 'f_filialeids'() {
206
+ if (this.communitymodel.f_filialeid) {
207
+ if (this.communitymodel.f_filialeid != this.f_filialeids) {
208
+ this.$dispatch('cancel')
209
+ }
210
+ }
211
+ this.initdata()
212
+ }
213
+ }
214
+ }
215
+ </script>