system-clients 3.1.94 → 3.1.97

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.
@@ -118,6 +118,8 @@
118
118
  import Vue from 'vue'
119
119
  import {HttpResetClass} from 'vue-client'
120
120
 
121
+
122
+
121
123
  let saveGen = function *(self) {
122
124
  try {
123
125
  yield self.$login.login(self.model.ename, self.model.password)
@@ -205,23 +207,20 @@
205
207
  export default {
206
208
  title: '登录',
207
209
  async ready () {
208
- let http = new HttpResetClass()
209
- let res = await http.load('POST', 'rs/sql/singleTable',
210
- {data:{
211
- tablename: 't_changedeclare',
212
- condition: ` f_type ='变更通知' `
213
- }
214
- }, {resolveMsg: null, rejectMsg: '获取通知出错!!'})
215
- if(res.data.length>0){
216
- console.log("---------------获取通知",res.data[0].f_change_message)
217
- this.notice=res.data[0].f_change_message
218
- }
219
-
220
- if (this.$login && this.$login.getUrlCompileParames('name') && this.$login.getUrlCompileParames('password')) {
221
- this.model.ename = this.$login.getUrlCompileParames('name')
222
- this.model.password = this.$login.getUrlCompileParames('password')
223
- this.confirm()
224
- }
210
+ try{
211
+ let http = new HttpResetClass()
212
+ let res = await http.load('POST', 'rs/sql/singleTable',
213
+ {data:{
214
+ tablename: 't_changedeclare',
215
+ condition: ` f_type ='变更通知' `
216
+ }
217
+ }, {resolveMsg: null, rejectMsg: null})
218
+ if(res.data.length>0){
219
+ console.log("---------------获取通知",res.data[0].f_change_message)
220
+ this.notice=res.data[0].f_change_message
221
+ }
222
+ }catch(e){}
223
+ this.loginother();
225
224
  $('#login-button').click(function (event) {
226
225
  event.preventDefault()
227
226
  $('form').fadeOut(500)
@@ -243,7 +242,8 @@
243
242
  isMac: false,
244
243
  depPrompt: false,
245
244
  weakPassword: false,
246
- title: '燃气客服系统'
245
+ title: '燃气客服系统',
246
+ distanceLogin: false
247
247
  },
248
248
  login: false,
249
249
  depPromptShow: false,
@@ -256,10 +256,27 @@
256
256
  modifyPwShow: false,
257
257
  logoandroid:false,
258
258
  showus:false,
259
- notice:''
259
+ notice:'',
260
+ loginotherflag :true
260
261
  }
261
262
  },
262
263
  methods: {
264
+ async loginother(){
265
+ if (this.config.distanceLogin) {
266
+ if (this.$login && this.$login.getUrlParames('name') ) {
267
+ let ename = this.$login.getUrlParames('name');
268
+ let logininfo = await this.$resetpost('rs/logic/getLoginData',{data:{ename:ename}},{resolveMsg: null, rejectMsg: null});
269
+ if(logininfo.data){
270
+ if(logininfo.data.ename && logininfo.data.password){
271
+ this.model.ename = logininfo.data.ename
272
+ this.model.password =logininfo.data.password
273
+ let gen = saveGen(this)
274
+ return co(gen)
275
+ }
276
+ }
277
+ }
278
+ }
279
+ },
263
280
  theme(){
264
281
  // var elementList = document.querySelectorAll('body');
265
282
  // console.log(elementList)
@@ -1,196 +1,196 @@
1
- <template>
2
- <div :class="style" v-show="companyshow">
3
- <label class="font_normal_body">公&emsp;&emsp;司</label>
4
- <right-tree @re-res="getorg"
5
- :mustselect="mustselect"
6
- :initresid='initres.org'></right-tree>
7
- </div>
8
- <div :class="style" v-show="departmentshow">
9
- <label class="font_normal_body">部&emsp;&emsp;门</label>
10
- <res-select restype='department' v-ref:department
11
- @res-select="getdep"
12
- :parentresid="depresid"
13
- :initresid='initres.dep'
14
- :mustselect="mustselect"
15
- :is-mul="mul">
16
- </res-select>
17
- </div>
18
- <div :class="style" v-show="operatorshow && (!cascade)">
19
- <label class="font_normal_body">人&emsp;&emsp;员</label>
20
- <res-select restype='user'
21
- @res-select="getuser"
22
- :parentresid="depresid"
23
- :initresid='initres.user'
24
- :mustselect="mustselect"
25
- :is-mul="mul">
26
- </res-select>
27
- </div>
28
- <div :class="style" v-show="operatorshow && cascade">
29
- <label class="font_normal_body">人&emsp;&emsp;员</label>
30
- <res-select restype='user'
31
- @res-select="getuser"
32
- :parentresid="userresid"
33
- :initresid='initres.user'
34
- :mustselect="mustselect"
35
- :is-mul="mul">
36
- </res-select>
37
- </div>
38
- <div :class="style " v-if="sliceareashow" >
39
- <label class="font_normal_body">片&emsp;&emsp;区</label>
40
- <v-select :value.sync="slice_area" v-model="slice_area" @change='getarea'
41
- :options='sliceArea' placeholder='片区/管理站' filer-key="name"
42
- close-on-select v-ref:slice>
43
- </v-select>
44
- </div>
45
- </template>
46
- <script>
47
- import plugin from '../../plugins/GetLoginInfoService'
48
- import { HttpResetClass } from 'vue-client'
49
- export default {
50
- title: '资源选择测试',
51
- props: {
52
- style: {
53
- type: String,
54
- default: 'col-sm-2 form-group'
55
- },
56
- mul: {
57
- type: Boolean,
58
- default: true
59
- },
60
- //初始值
61
- initres: {
62
- type: Object,
63
- default: null,
64
- },
65
- showComponent:{
66
- default:['company','department','operator','slicearea']
67
- },
68
- //人员是否和部门关联
69
- cascade: {
70
- type: Boolean,
71
- default: true
72
- },
73
- selectin: {
74
- type: Boolean,
75
- default: false
76
- }
77
- },
78
- data () {
79
- return {
80
- orgresid:[this.$login.f.orgid],
81
- depresid:[],
82
- userresid:[],
83
- sliceArea: [],
84
- slice_area:[],
85
- companyshow:false,
86
- departmentshow:false,
87
- operatorshow:false,
88
- sliceareashow:false,
89
- mustselect:false,
90
- obj:{
91
- orgnames:[],
92
- depnames:[],
93
- operatornames:[]
94
- }
95
- }
96
- },
97
- ready () {
98
- if(this.$login.r.includes('部门默认选中')&& this.selectin){
99
- this.initres.dep = [this.$login.f.depids]
100
- }
101
- if(this.$login.r.includes('人员默认选中')&& this.selectin){
102
- this.initres.user = [this.$login.f.id]
103
- if(this.$login.r.includes('人员强制选中')){
104
- this.mustselect = true
105
- }
106
- }
107
- this.initComponent();
108
- this.initAreas(this.$login.f.orgid)
109
- },
110
- methods:{
111
- initComponent(){
112
- let self=this;
113
- this.showComponent.find((item)=>{
114
- switch(item){
115
- case 'company': self.companyshow=true; break;
116
- case 'department': self.departmentshow=true; break;
117
- case 'operator': self.operatorshow=true; break;
118
- case 'slicearea': self.sliceareashow=true; break;
119
- }
120
- })
121
- },
122
- // 初始化片区
123
- async initAreas (val) {
124
- if (val) {
125
- let http = new HttpResetClass()
126
- let getAllArea = await http.load('POST', '/rs/search', {
127
- source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
128
- userid: this.$login.f.id
129
- }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
130
- let arr = getAllArea.data.filter((res) => {
131
- return res.parentid == val
132
- })
133
- this.sliceArea = []
134
- this.slice_area = []
135
- arr.forEach((res) => {
136
- this.sliceArea.push({label: res.name, value: {name: res.name, code:res.number}})
137
- })
138
- }
139
- },
140
- returnOrg(ids){
141
- let limit = this.$login.r.includes('数据授权限定')
142
-
143
- let condition;
144
- if(this.depresid.length > 0)
145
- condition = " and f_orgid in " + plugin.convertToIn(this.depresid);
146
- else
147
- condition = " and f_orgid = " + this.$login.f.orgid;
148
- if(this.userresid.length > 0){
149
- condition += " and f_depid in " + plugin.convertToIn(this.userresid);
150
- } else {
151
- if (limit) {
152
- let depids = []
153
- for (let row of this.$refs.department.resoptions) {
154
- depids.push(row.value)
155
- }
156
- let depid = depids.length ? plugin.convertToIn(depids) : ('')
157
- condition += " and f_depid in " + depid;
158
- }
159
- }
160
- if(ids && ids.length > 0){
161
- condition += " and f_operatorid in " + plugin.convertToIn(ids);
162
- }
163
- if(this.slice_area.length>0){
164
- condition += " and f_zones = '" + this.slice_area[0].name+"'"
165
- }
166
- this.$dispatch('re-res',condition,this.obj)
167
- },
168
- getorg (obj) {
169
- this.depresid=obj.resids
170
- this.obj.orgnames = obj.res
171
- this.initAreas(obj.resids)
172
- this.returnOrg();
173
- },
174
- getdep(obj,val) {
175
- this.obj.depnames = val
176
- this.userresid=obj
177
- this.returnOrg();
178
- },
179
- getuser(obj) {
180
- this.obj.operatornames = obj
181
- this.returnOrg(obj);
182
- },
183
- getarea(val) {
184
- this.slice_area=val
185
- if(this.obj.operatornames){
186
- this.returnOrg(this.obj.operatornames);
187
- }else{
188
- this.returnOrg();
189
- }
190
- }
191
- },
192
- watch: {
193
-
194
- }
195
- }
196
- </script>
1
+ <template>
2
+ <div :class="style" v-show="companyshow">
3
+ <label class="font_normal_body">公&emsp;&emsp;司</label>
4
+ <right-tree @re-res="getorg"
5
+ :mustselect="mustselect"
6
+ :initresid='initres.org'></right-tree>
7
+ </div>
8
+ <div :class="style" v-show="departmentshow">
9
+ <label class="font_normal_body">部&emsp;&emsp;门</label>
10
+ <res-select restype='department' v-ref:department
11
+ @res-select="getdep"
12
+ :parentresid="depresid"
13
+ :initresid='initres.dep'
14
+ :mustselect="mustselect"
15
+ :is-mul="mul">
16
+ </res-select>
17
+ </div>
18
+ <div :class="style" v-show="operatorshow && (!cascade)">
19
+ <label class="font_normal_body">人&emsp;&emsp;员</label>
20
+ <res-select restype='user'
21
+ @res-select="getuser"
22
+ :parentresid="depresid"
23
+ :initresid='initres.user'
24
+ :mustselect="mustselect"
25
+ :is-mul="mul">
26
+ </res-select>
27
+ </div>
28
+ <div :class="style" v-show="operatorshow && cascade">
29
+ <label class="font_normal_body">人&emsp;&emsp;员</label>
30
+ <res-select restype='user'
31
+ @res-select="getuser"
32
+ :parentresid="userresid"
33
+ :initresid='initres.user'
34
+ :mustselect="mustselect"
35
+ :is-mul="mul">
36
+ </res-select>
37
+ </div>
38
+ <div :class="style " v-if="sliceareashow" >
39
+ <label class="font_normal_body">片&emsp;&emsp;区</label>
40
+ <v-select :value.sync="slice_area" v-model="slice_area" @change='getarea'
41
+ :options='sliceArea' placeholder='片区/管理站' filer-key="name"
42
+ close-on-select v-ref:slice>
43
+ </v-select>
44
+ </div>
45
+ </template>
46
+ <script>
47
+ import plugin from '../../plugins/GetLoginInfoService'
48
+ import { HttpResetClass } from 'vue-client'
49
+ export default {
50
+ title: '资源选择测试',
51
+ props: {
52
+ style: {
53
+ type: String,
54
+ default: 'col-sm-2 form-group'
55
+ },
56
+ mul: {
57
+ type: Boolean,
58
+ default: true
59
+ },
60
+ //初始值
61
+ initres: {
62
+ type: Object,
63
+ default: null,
64
+ },
65
+ showComponent:{
66
+ default:['company','department','operator','slicearea']
67
+ },
68
+ //人员是否和部门关联
69
+ cascade: {
70
+ type: Boolean,
71
+ default: true
72
+ },
73
+ selectin: {
74
+ type: Boolean,
75
+ default: false
76
+ }
77
+ },
78
+ data () {
79
+ return {
80
+ orgresid:[this.$login.f.orgid],
81
+ depresid:[],
82
+ userresid:[],
83
+ sliceArea: [],
84
+ slice_area:[],
85
+ companyshow:false,
86
+ departmentshow:false,
87
+ operatorshow:false,
88
+ sliceareashow:false,
89
+ mustselect:false,
90
+ obj:{
91
+ orgnames:[],
92
+ depnames:[],
93
+ operatornames:[]
94
+ }
95
+ }
96
+ },
97
+ ready () {
98
+ if(this.$login.r.includes('部门默认选中')&& this.selectin){
99
+ this.initres.dep = [this.$login.f.depids]
100
+ }
101
+ if(this.$login.r.includes('人员默认选中')&& this.selectin){
102
+ this.initres.user = [this.$login.f.id]
103
+ if(this.$login.r.includes('人员强制选中')){
104
+ this.mustselect = true
105
+ }
106
+ }
107
+ this.initComponent();
108
+ this.initAreas(this.$login.f.orgid)
109
+ },
110
+ methods:{
111
+ initComponent(){
112
+ let self=this;
113
+ this.showComponent.find((item)=>{
114
+ switch(item){
115
+ case 'company': self.companyshow=true; break;
116
+ case 'department': self.departmentshow=true; break;
117
+ case 'operator': self.operatorshow=true; break;
118
+ case 'slicearea': self.sliceareashow=true; break;
119
+ }
120
+ })
121
+ },
122
+ // 初始化片区
123
+ async initAreas (val) {
124
+ if (val) {
125
+ let http = new HttpResetClass()
126
+ let getAllArea = await http.load('POST', '/rs/search', {
127
+ source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
128
+ userid: this.$login.f.id
129
+ }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
130
+ let arr = getAllArea.data.filter((res) => {
131
+ return res.parentid == val
132
+ })
133
+ this.sliceArea = []
134
+ this.slice_area = []
135
+ arr.forEach((res) => {
136
+ this.sliceArea.push({label: res.name, value: {name: res.name, code:res.number}})
137
+ })
138
+ }
139
+ },
140
+ returnOrg(ids){
141
+ let limit = this.$login.r.includes('数据授权限定')
142
+
143
+ let condition;
144
+ if(this.depresid.length > 0)
145
+ condition = " and f_orgid in " + plugin.convertToIn(this.depresid);
146
+ else
147
+ condition = " and f_orgid = " + this.$login.f.orgid;
148
+ if(this.userresid.length > 0){
149
+ condition += " and f_depid in " + plugin.convertToIn(this.userresid);
150
+ } else {
151
+ if (limit) {
152
+ let depids = []
153
+ for (let row of this.$refs.department.resoptions) {
154
+ depids.push(row.value)
155
+ }
156
+ let depid = depids.length ? plugin.convertToIn(depids) : ('')
157
+ condition += " and f_depid in " + depid;
158
+ }
159
+ }
160
+ if(ids && ids.length > 0){
161
+ condition += " and f_operatorid in " + plugin.convertToIn(ids);
162
+ }
163
+ if(this.slice_area.length>0){
164
+ condition += " and f_zones = '" + this.slice_area[0].name+"'"
165
+ }
166
+ this.$dispatch('re-res',condition,this.obj)
167
+ },
168
+ getorg (obj) {
169
+ this.depresid=obj.resids
170
+ this.obj.orgnames = obj.res
171
+ this.initAreas(obj.resids)
172
+ this.returnOrg();
173
+ },
174
+ getdep(obj,val) {
175
+ this.obj.depnames = val
176
+ this.userresid=obj
177
+ this.returnOrg();
178
+ },
179
+ getuser(obj) {
180
+ this.obj.operatornames = obj
181
+ this.returnOrg(obj);
182
+ },
183
+ getarea(val) {
184
+ this.slice_area=val
185
+ if(this.obj.operatornames){
186
+ this.returnOrg(this.obj.operatornames);
187
+ }else{
188
+ this.returnOrg();
189
+ }
190
+ }
191
+ },
192
+ watch: {
193
+
194
+ }
195
+ }
196
+ </script>