safecheck-client 3.0.33-16 → 3.0.33-161

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.
Files changed (169) hide show
  1. package/index.html +6 -2
  2. package/package.json +133 -133
  3. package/src/App.vue +2 -2
  4. package/src/components/Util/ImgSelfSafePlus.vue +19 -10
  5. package/src/components/Util.js +7 -0
  6. package/src/components/android/AreaPlan.vue +2 -1
  7. package/src/components/android/CurrentCreate.vue +1 -1
  8. package/src/components/android/ImgSelfAndroid.vue +181 -181
  9. package/src/components/android/SafecheckDevices.vue +5 -1
  10. package/src/components/android/SafecheckOrderV.vue +18 -12
  11. package/src/components/map/checkScreen.vue +27 -21
  12. package/src/components/paper/PlanChooser.vue +4 -2
  13. package/src/components/pc/NewCheckpaper.vue +11 -8
  14. package/src/components/planmanage/PlanManage.vue +14 -4
  15. package/src/components/planmanage/checkPlanList.vue +2 -1
  16. package/src/components/planmanage/checkUserList.vue +2 -0
  17. package/src/components/report/HiddenSituation.vue +3 -3
  18. package/src/components/rongcheng/AspiratedPaperFeedbackm.vue +28 -2
  19. package/src/components/rongcheng/AspiratedPaperMessage.vue +1 -1
  20. package/src/components/rongcheng/DefectPaper.vue +1 -1
  21. package/src/components/rongcheng/PaperListNPSQ.vue +36 -1
  22. package/src/components/rongcheng/PaperListSQ.vue +32 -11
  23. package/src/components/rongcheng/PhoneUpUserinfo.vue +939 -802
  24. package/src/components/rongcheng/SafecheckOrderV.vue +1 -1
  25. package/src/components/rongcheng/report/CheckPlanAreaList.vue +1 -3
  26. package/src/components/safecheckNew/PaperList.vue +785 -0
  27. package/src/components/safecheckNew/android/AddPlanItem.vue +419 -0
  28. package/src/components/safecheckNew/android/AreaPlan.vue +561 -0
  29. package/src/components/safecheckNew/android/CurrentCreate.vue +1050 -0
  30. package/src/components/safecheckNew/android/Recheck.vue +379 -0
  31. package/src/components/safecheckNew/android/SafecheckDevices.vue +1400 -0
  32. package/src/components/safecheckNew/android/SafecheckOrderV.vue +2692 -0
  33. package/src/filiale/Util.js +5 -0
  34. package/src/filiale/baiyin/android/AndroidDefectDeal.vue +633 -0
  35. package/src/filiale/baiyin/android.js +10 -0
  36. package/src/filiale/baiyin/pc/CheckPlanAreaList.vue +485 -0
  37. package/src/filiale/baiyin/pc/CheckSearchUser.vue +1067 -0
  38. package/src/filiale/baiyin/pc/DefectListNew.vue +597 -0
  39. package/src/filiale/baiyin/pc/DefectMainNew.vue +63 -0
  40. package/src/filiale/baiyin/pc/DefectPaperNew.vue +1052 -0
  41. package/src/filiale/baiyin/pc/PaperList.vue +790 -0
  42. package/src/filiale/baiyin/pc/PlanChooser.vue +167 -0
  43. package/src/filiale/baiyin/pc/PlanManage.vue +834 -0
  44. package/src/filiale/baiyin/pc/RightTreeSafe.vue +348 -0
  45. package/src/filiale/baiyin/pc/RoleSelector.vue +160 -0
  46. package/src/filiale/baiyin/pc.js +20 -0
  47. package/src/filiale/bayan/android/AddPlanItem.vue +7 -2
  48. package/src/filiale/bayan/android/CheckPlanDown.vue +249 -0
  49. package/src/filiale/bayan/android/SafecheckOrderV.vue +20 -7
  50. package/src/filiale/bayan/android/SafecheckUserInfo.vue +566 -514
  51. package/src/filiale/bayan/android.js +1 -0
  52. package/src/filiale/bayan/pc/CheckDetail.vue +205 -0
  53. package/src/filiale/bayan/pc/CheckPlan.vue +59 -0
  54. package/src/filiale/bayan/pc/CheckPlanAreaList.vue +565 -0
  55. package/src/filiale/bayan/pc/CheckSearchUser.vue +1110 -0
  56. package/src/filiale/bayan/pc/DefectListNew.vue +597 -0
  57. package/src/filiale/bayan/pc/DefectMainNew.vue +63 -0
  58. package/src/filiale/bayan/pc/DefectPaperNew.vue +1218 -0
  59. package/src/filiale/bayan/pc/DeviceChange.vue +1838 -0
  60. package/src/filiale/bayan/pc/HiddenSituation.vue +256 -0
  61. package/src/filiale/bayan/pc/NewCheckpaper.vue +31 -1
  62. package/src/filiale/bayan/pc/PaperList.vue +119 -12
  63. package/src/filiale/bayan/pc/PlanManage.vue +29 -8
  64. package/src/filiale/bayan/pc/SelectCheckPlan.vue +333 -0
  65. package/src/filiale/bayan/pc.js +7 -0
  66. package/src/filiale/dexin/android/SafecheckOrderV.vue +123 -24
  67. package/src/filiale/fugou/android/SafecheckOrderV.vue +2796 -0
  68. package/src/filiale/fugou/android.js +2 -1
  69. package/src/filiale/fugou/pc/AddToCheckBook.vue +13 -14
  70. package/src/filiale/fugou/pc/CheckBook.vue +2 -0
  71. package/src/filiale/fugou/pc/CheckBookEntry.vue +2 -6
  72. package/src/filiale/fugou/pc/CheckBookList.vue +2 -2
  73. package/src/filiale/fugou/pc/CheckBookSearchUser.vue +35 -18
  74. package/src/filiale/fugou/pc/CheckBookUser.vue +102 -45
  75. package/src/filiale/fugou/pc/DefectPaperNew.vue +10 -6
  76. package/src/filiale/fugou/pc/PaperDefectMain.vue +12 -6
  77. package/src/filiale/fugou/pc/PaperList.vue +14 -6
  78. package/src/filiale/fugou/pc/PlanManage.vue +62 -8
  79. package/src/filiale/fugou/pc/checkUserList.vue +36 -35
  80. package/src/filiale/hanzhong/pc/CheckHiddenDanger.vue +15 -5
  81. package/src/filiale/hanzhong/pc/CheckSafeDetail.vue +12 -2
  82. package/src/filiale/hanzhong/pc/CheckSafeStatus.vue +12 -3
  83. package/src/filiale/hanzhong/pc/CheckSearchUser.vue +13 -0
  84. package/src/filiale/hanzhong/pc/CheckUserList.vue +30 -11
  85. package/src/filiale/hanzhong/pc/CheckerSafeDetail.vue +11 -2
  86. package/src/filiale/jingyang/pc/ReportCheckItemList.vue +543 -0
  87. package/src/filiale/jingyang/pc.js +1 -0
  88. package/src/filiale/kelai/pc/CheckPlanAreaList.vue +2 -22
  89. package/src/filiale/liaoyuan/pc/checkPlanList.vue +373 -0
  90. package/src/filiale/liaoyuan/pc.js +2 -1
  91. package/src/filiale/qianneng/pc/PaperList.vue +31 -1
  92. package/src/filiale/qingjian/android/PhoneUpUserinfo.vue +1270 -1268
  93. package/src/filiale/qingjian/android/SafecheckOrderV.vue +2844 -2779
  94. package/src/filiale/rongchuang/android/SafecheckDevices.vue +468 -748
  95. package/src/filiale/rongchuang/android/SafecheckOrderV.vue +984 -1234
  96. package/src/filiale/rongchuang/android.js +1 -0
  97. package/src/filiale/rongchuang/pc/NewCheckpaper.vue +294 -305
  98. package/src/filiale/rongchuang/pc/PaperList.vue +812 -0
  99. package/src/filiale/rongchuang/pc.js +1 -0
  100. package/src/filiale/siyang/android/PhoneRecordInfo.vue +214 -0
  101. package/src/filiale/siyang/android/SafecheckOrderV.vue +2796 -0
  102. package/src/filiale/siyang/android/SafecheckUserInfo.vue +789 -0
  103. package/src/filiale/siyang/android.js +11 -0
  104. package/src/filiale/siyang/pc/PaperDefectMain.vue +864 -0
  105. package/src/filiale/siyang/pc/PaperList.vue +834 -0
  106. package/src/filiale/siyang/pc/PlanManage.vue +839 -0
  107. package/src/filiale/siyang/pc/checkUserList.vue +781 -0
  108. package/src/filiale/siyang/pc.js +15 -0
  109. package/src/filiale/tianke/pc/checkScreen.vue +36 -31
  110. package/src/filiale/tongchuan/android/PhoneUpUserinfo.vue +60 -2
  111. package/src/filiale/tongchuan/android/SafecheckOrderV.vue +2 -3
  112. package/src/filiale/tongchuan/pc/NewCheckpaper.vue +1 -1
  113. package/src/filiale/tongchuan/pc/checkUserList.vue +2 -2
  114. package/src/filiale/weinan/android/PaperFeedback.vue +8 -8
  115. package/src/filiale/weinan/android/SafecheckDevices.vue +6 -2
  116. package/src/filiale/weinan/android/SafecheckOrderV.vue +16 -2
  117. package/src/filiale/weinan/android/SafecheckUserInfo.vue +7 -2
  118. package/src/filiale/weinan/pc/CheckSearchUser.vue +1078 -0
  119. package/src/filiale/weinan/pc/DefectListNew.vue +617 -0
  120. package/src/filiale/weinan/pc/DefectMainNew.vue +1 -1
  121. package/src/filiale/weinan/pc/DefectPaperNew.vue +7 -1
  122. package/src/filiale/weinan/pc.js +2 -0
  123. package/src/filiale/wenxi/android/CurrentCreate.vue +1 -1
  124. package/src/filiale/wenxi/android/PhoneUpUserinfo.vue +1 -1
  125. package/src/filiale/wenxi/android/SafecheckUserInfo.vue +85 -63
  126. package/src/filiale/wenxi/pc/NewCheckpaper.vue +1 -1
  127. package/src/filiale/yangchunboneng/android/AddPlanItem.vue +46 -1
  128. package/src/filiale/yangchunboneng/android/CurrentCreate.vue +45 -4
  129. package/src/filiale/yangchunboneng/android/DailyworkloadQuery.vue +2 -2
  130. package/src/filiale/yangchunboneng/android/NewCheckpaperAndroid.vue +1362 -1362
  131. package/src/filiale/yangchunboneng/android/PaperFeedback.vue +1731 -1731
  132. package/src/filiale/yangchunboneng/android/PhoneUpUserinfo.vue +1235 -0
  133. package/src/filiale/yangchunboneng/android/SafecheckDevices.vue +1332 -1332
  134. package/src/filiale/yangchunboneng/android/SafecheckOrderV.vue +2845 -2832
  135. package/src/filiale/yangchunboneng/android/SafecheckUserInfo.vue +887 -869
  136. package/src/filiale/yangchunboneng/android/safeHistoryLook.vue +2 -1
  137. package/src/filiale/yangchunboneng/android.js +1 -0
  138. package/src/filiale/yangchunboneng/pc/CheckBookList.vue +4 -4
  139. package/src/filiale/yangchunboneng/pc/CheckBookSearchUser.vue +76 -32
  140. package/src/filiale/yangchunboneng/pc/CheckBookUser.vue +72 -1
  141. package/src/filiale/yangchunboneng/pc/CheckSearchUser.vue +1192 -1018
  142. package/src/filiale/yangchunboneng/pc/PaperDefectMain.vue +944 -849
  143. package/src/filiale/yangchunboneng/pc/PaperList.vue +17 -0
  144. package/src/filiale/yongzhou/android/PaperFeedback.vue +1 -1
  145. package/src/filiale/yongzhou/android/SafecheckOrderV.vue +221 -256
  146. package/src/filiale/yongzhou/pc/CheckPlan.vue +59 -0
  147. package/src/filiale/yongzhou/pc/CheckSearchUser.vue +1 -1
  148. package/src/filiale/yongzhou/pc/DefectPaperNew.vue +1105 -0
  149. package/src/filiale/yongzhou/pc/NoCheckplanSafecheck.vue +412 -107
  150. package/src/filiale/yongzhou/pc/PaperDefectMain.vue +872 -0
  151. package/src/filiale/yongzhou/pc/PaperList.vue +1 -1
  152. package/src/filiale/yongzhou/pc/SelectCheckPlan.vue +364 -0
  153. package/src/filiale/yongzhou/pc/communityTypeDetailG.vue +56 -125
  154. package/src/filiale/yongzhou/pc/communityTypeDetailM.vue +94 -187
  155. package/src/filiale/yongzhou/pc/safeDetail.vue +311 -20
  156. package/src/filiale/yongzhou/pc/safeStatistics.vue +74 -24
  157. package/src/filiale/yongzhou/pc/safeStatisticsDay.vue +2 -2
  158. package/src/filiale/yongzhou/pc/safeStatisticsMonth.vue +2 -2
  159. package/src/filiale/yongzhou/pc/safeStatisticsYear.vue +47 -23
  160. package/src/filiale/yongzhou/pc/safeTable.vue +3 -3
  161. package/src/filiale/yongzhou/pc.js +4 -0
  162. package/src/filiale/yuansheng/android/AndroidDefectDeal.vue +652 -0
  163. package/src/filiale/yuansheng/android.js +1 -0
  164. package/src/filiale/zhongsheng/android/CurrentCreate.vue +7 -2
  165. package/src/filiale/zhongsheng/pc/DefectPaperWeiXiu.vue +6 -2
  166. package/src/main.js +33 -33
  167. package/src/rongcheng.js +3 -1
  168. package/src/safecheck-android.js +6 -0
  169. package/src/safecheck.js +3 -0
@@ -0,0 +1,348 @@
1
+ <template>
2
+ <dropdown :model='model' class="auto" id="res-tree" v-if="!islist" v-el:dropdown :style="{width:width}">
3
+ <button type="button" class="btn btn-default dropdown-toggle select-style" data-toggle="dropdown" style="width: 100%">
4
+ <span class='btn-content' :style="{textOverflow:'ellipsis',overflow: 'hidden'}">{{ orgnames }}</span>
5
+ <span class="caret"></span>
6
+ </button>
7
+ <div class="dropdown-menu auto" style="width:auto;max-height: 500px;overflow: auto" >
8
+ <input type="text" placeholder="Search"
9
+ placeholder='请输入'
10
+ slot="dropdown-menu"
11
+ v-model="searchText"
12
+ class="form-control" autocomplete="off"
13
+ @keydown.enter="buluer(searchText)">
14
+ <tree :filter="strsign" :model='model' v-ref:tree :is-click="false" role="menu">
15
+ <span partial>
16
+ <span class="glyphicon glyphicon-chevron-down" v-show="row.open&&row.data.children.length>0" style="color:balck;"></span>
17
+ <span class="glyphicon glyphicon-chevron-right" v-show="!row.open&&row.data.children.length>0" style="color:balck;"></span>
18
+ <span class="RightTreeCanSelect" v-if="row.data.hasright" @click.stop="$parent.$parent.$parent.selectclick(row.data)">{{row.data.name}}</span>
19
+ <span class="RightTreeCanNotSelect" v-else>{{row.data.name}}</span>
20
+ <span class="glyphicon glyphicon-ok " v-if="$parent.$parent.$parent.isSelect(row.data.id)" style="color:balck;"></span>
21
+ </span>
22
+ </tree>
23
+ </div>
24
+
25
+ </dropdown>
26
+ <v-select v-if="islist"
27
+ placeholder='请选择'
28
+ :options='childrenOptions'
29
+ @change="selectclick"
30
+ :value-single="true"
31
+ close-on-select></v-select>
32
+ </template>
33
+ <script>
34
+ import Vue from 'vue';
35
+ import co from 'co'
36
+ import { PagedList, HttpResetClass } from 'vue-client'
37
+ import * as ldapHelper from '../../../utils/LdapHelper'
38
+ let saveGen = function * (self) {
39
+ //获取分公司树
40
+ let data = {
41
+ source: self.source,
42
+ userid: self.userid
43
+ }
44
+ // if(self.$treeorg==null || (self.$treeorg!=null&&self.$treeorg.length==0)){
45
+ let http = new HttpResetClass()
46
+ let ret = yield http.load('POST', `${self.Url}/rs/search`, data, {resolveMsg: null, rejectMsg: null})
47
+ // 去掉前面的两层节点
48
+ ret.data[0].children[0].children.forEach((item) => {
49
+ self.model.push(item)
50
+ })
51
+ Vue.$treeorg = Vue.prototype.$treeorg = self.model;
52
+ // }
53
+ //if(self.$treeorg!=null){
54
+ // self.model = self.$treeorg;
55
+ //}
56
+ // 给资源添加父关系
57
+ ldapHelper.procParent(self.model)
58
+ // 树转列
59
+ // if (self.islist) {
60
+ // self.treetoList(self.model)
61
+ // }
62
+ if(self.initresid.length>0){
63
+ if(self.initresid[0] == ''){
64
+ self.initresid[0] = self.$login.f.f_orgids.substring(0,this.$login.f.f_orgids.length-1);
65
+ }
66
+ }else{
67
+ self.initresid = [];
68
+ self.initresid[0] = self.$login.f.f_orgids.substring(0,this.$login.f.f_orgids.length-1);
69
+ }
70
+ if(self.initresid&&self.initresid.length>0){
71
+ self.isselect = false;
72
+ self.initTreetoList(self.model)
73
+ self.initregion(self.childrenOptions)
74
+ self.childrenOptions.forEach((item) => {
75
+ if(item.id == null && item.value !=null ){
76
+ item = item.value
77
+ }
78
+ if(item.id==self.initresid[0]){
79
+ //默认加载如果已选中的和传入参数相等会取消选择,这种操作不应该被允许
80
+ if(self.orgids==item.id){
81
+ self.initdataone(item);
82
+ return;
83
+ }
84
+ self.selectclick(item);
85
+ self.isselect = true;
86
+ return;
87
+ }
88
+ })
89
+ //如果没有找到公司,说明是选择的是大区
90
+ if(!self.isselect){
91
+ self.childrenregionOption.forEach((item) => {
92
+ if(item.id == null && item.value !=null ){
93
+ item = item.value;
94
+ }
95
+ if(item.id==self.initresid[0]){
96
+ //默认加载如果已选中的和传入参数相等会取消选择,这种操作不应该被允许
97
+ if(self.orgids==item.id){
98
+ self.initdataone(item);
99
+ return;
100
+ }
101
+ self.selectclick(item);
102
+ return;
103
+ }
104
+ })
105
+ }
106
+ }
107
+ //self.selectRes()
108
+ }
109
+ export default {
110
+ title: '资源树',
111
+ props: {
112
+ searchText:'',
113
+ strsign:'',
114
+ source: {
115
+ type: String,
116
+ require: true,
117
+ default:`tool.getFullTree(this.getRights().where(row.getType() == $organization$))`
118
+ },
119
+ //资源初始化数据
120
+ initresid: {
121
+ type: Array,
122
+ default() { return [] },
123
+ },
124
+ resid: {
125
+ },
126
+ resobjprop:"",
127
+ islist: {
128
+ type: Boolean,
129
+ default: false
130
+ },
131
+ //是否有查看上级的权限
132
+ Url:{
133
+ type: String,
134
+ default:''
135
+ },
136
+ width:{
137
+ type:String,
138
+ default:'60%'
139
+ }
140
+ },
141
+ data () {
142
+ return {
143
+ resobj:{res:this.$login.f.f_fengongsi, resids:this.$login.f.f_orgids.substring(0,this.$login.f.f_orgids.length-1)},
144
+ userid: this.$login.f.id,
145
+ resname:[this.$login.f.f_fengongsi],
146
+ orgnames : "请选择",
147
+ //单选点击 返回所有子
148
+ orgids : null,
149
+ orgobj:null,
150
+ model: [
151
+
152
+ ],
153
+ childrenOptions: [],
154
+ childrenregionOption:[],
155
+ isselect: false
156
+ }
157
+ },
158
+ methods: {
159
+ selectRes () {
160
+ let newobj={
161
+ "res": [this.resname],
162
+ "resids": [this.orgids],
163
+ }
164
+ this.$emit('re-res', newobj)
165
+ },
166
+ //树形结构变成list
167
+ initTreetoList(val) {
168
+ for (let value of val) {
169
+ this.initErgodicList(value)
170
+ }
171
+ },
172
+ //找到跟节点
173
+ initErgodicList (val) {
174
+ if(val.children.length > 0){
175
+ this.childrenOptions.push(val)
176
+ this.treetoList(val.children)
177
+ }else{
178
+ this.childrenOptions.push(val)
179
+ }
180
+ },
181
+ initregion(val){
182
+ if(val ==null ) return;
183
+ val.forEach((item)=>{
184
+ if(item.name != null){
185
+ if(item.name.includes("公司")){
186
+ return;
187
+ }else{
188
+ this.initregion(item.children)
189
+ this.childrenregionOption.push({label:"",value:item})
190
+ //return item;
191
+ }
192
+ }else{
193
+ return;
194
+ }
195
+ })
196
+
197
+ },
198
+ async buluer (val) {
199
+ this.strsign=val
200
+ await new Promise(resolve => {
201
+ this.$nextTick(() => {
202
+ resolve()
203
+ })
204
+ })
205
+ },
206
+ //点击资源的方法
207
+ selectclick (row) {
208
+ if(this.orgids==row.id){
209
+ //取消点击
210
+ this.orgnames="请选择"
211
+ this.orgids=null
212
+ this.orgobj=null
213
+ let newobj={
214
+ "res": [],
215
+ "resids": [],
216
+ "orgobj": [],
217
+ }
218
+ this.$emit('re-res', newobj)
219
+ }else{
220
+ //点中点击
221
+ this.orgnames=row.name
222
+ this.orgids=row.id
223
+ this.orgobj=row
224
+ let objs=[]
225
+ let objids=[]
226
+ let objnames=[]
227
+ this.addResChild(row,objs)
228
+ objs.forEach((item) => {
229
+ objids.push(item.id)
230
+ objnames.push(item.name)
231
+ })
232
+ let newobj={
233
+ "res": objnames,
234
+ "resids": objids,
235
+ "orgobj": objs,
236
+ }
237
+ this.$emit('re-res', newobj)
238
+ }
239
+ },
240
+ initdataone(row){
241
+ //点中点击
242
+ this.orgnames=row.name
243
+ this.orgids=row.id
244
+ this.orgobj=row
245
+ let objs=[]
246
+ let objids=[]
247
+ let objnames=[]
248
+ this.addResChild(row,objs)
249
+ objs.forEach((item) => {
250
+ objids.push(item.id)
251
+ objnames.push(item.name)
252
+ })
253
+ let newobj={
254
+ "res": objnames,
255
+ "resids": objids,
256
+ "orgobj": objs,
257
+ }
258
+ this.$emit('re-res', newobj)
259
+ },
260
+ addResChild(val,objs){
261
+ objs.push(val)
262
+ if(val.children && val.children.length>0){
263
+ Object.keys(val.children).forEach((key) => {
264
+ this.addResChild(val.children[key],objs)
265
+ })
266
+ }
267
+ return objs
268
+ },
269
+ //检查是否显示对勾
270
+ isSelect(val) {
271
+ if(this.orgids==val){
272
+ return true
273
+ }else{
274
+ return false
275
+ }
276
+ },
277
+ //树形结构变成list
278
+ treetoList(val) {
279
+ for (let value of val) {
280
+ this.ergodicList(value)
281
+ }
282
+ },
283
+ //找到跟节点
284
+ ergodicList (val) {
285
+ val.children.length > 0 ? this.treetoList(val.children) : this.childrenOptions.push({label: val.name, value: val})
286
+ },
287
+ //处理显示默认值
288
+ dealResObj (val) {
289
+ try{
290
+ var arr=val.res.split(".")
291
+ //截取最后一个分公司名字
292
+ this.resname=arr[arr.length-1].toString()
293
+ this.orgnames=arr[arr.length-1].toString()
294
+ this.resid = val.resids
295
+ this.orgids = val.resids
296
+ }catch (e){
297
+ this.resname='请选择组织'
298
+ }
299
+ },
300
+ judgBoundary(){
301
+ //判断是否超出边界,超出移动
302
+ if(document.documentElement.offsetWidth< this.$els.dropdown.getBoundingClientRect().right){
303
+ this.left = document.documentElement.offsetWidth - this.$els.dropdown.getBoundingClientRect().right - 25
304
+ }
305
+ }
306
+ },
307
+ events: {
308
+
309
+ },
310
+ ready () {
311
+ this.dealResObj (this.resobj)
312
+ let gen = saveGen(this)
313
+ return co(gen)
314
+ },
315
+ watch: {
316
+ 'resobjprop'(){
317
+ //tag
318
+ this.dealResObj (this.resobjprop)
319
+ }
320
+ }
321
+ }
322
+ </script>
323
+ <style lang="less">
324
+ #res-tree {
325
+ .list-group-item {
326
+ background-color: #FFF;
327
+ color: #000;
328
+ padding: 5px 10px;
329
+ border:0px;
330
+ white-space: nowrap;
331
+ }
332
+ }
333
+ #res-tree .list-group {
334
+ width: auto;
335
+ min-width: 100%;
336
+ }
337
+ .hide-text-overflow{
338
+ overflow: hidden;
339
+ text-overflow: ellipsis
340
+ }
341
+ .select-style {
342
+ border: 0px;
343
+ /*border-bottom: 2px solid #C9CCCF;*/
344
+ border: 1px solid #93B2D3;
345
+ border-radius: 0px;
346
+ color: #555;
347
+ }
348
+ </style>
@@ -0,0 +1,160 @@
1
+ <template>
2
+ <div style="width: 100%;height: 100%">
3
+ <div class="col-sm-6 form-group" style="margin-bottom: 0px">
4
+ <label class="font_normal_body">公&emsp;&emsp;司</label>
5
+ <right-tree-safe :width="leftWidth" @re-res="getRes" :resobjprop.sync="resobjprop"></right-tree-safe>
6
+ </div>
7
+ <div class="col-sm-6 form-group" style="margin-bottom: 0px">
8
+ <label class="font_normal_body">{{ roleLable }}</label>
9
+ <v-select :value="selVal" v-model='selVal'
10
+ :value-single="!valueMultiple"
11
+ class="select_list select"
12
+ :options='users' :placeholder='roleName'
13
+ :close-on-select = 'valueClose'
14
+ :multiple="valueMultiple"
15
+ :width="rightWidth"
16
+ @change="valuechange">
17
+ </v-select>
18
+ </div>
19
+ </div>
20
+ </template>
21
+
22
+ <script>
23
+ import {HttpResetClass} from 'vue-client'
24
+
25
+ export default {
26
+ name: "RoleSelector",
27
+ props: {
28
+ valueMultiple: {
29
+ type: Boolean,
30
+ default: false
31
+ },
32
+ roleName: {
33
+ type: String,
34
+ default: '安检员'
35
+ },
36
+ roleLable: {
37
+ type: String,
38
+ default: '安检员'
39
+ },
40
+ leftWidth: {
41
+ type: String,
42
+ default: '60%'
43
+ },
44
+ rightWidth: {
45
+ type: String,
46
+ default: '60%'
47
+ },
48
+ value: {
49
+ default: ''
50
+ },
51
+ resobjprop: {
52
+ default: {}
53
+ },
54
+ valueClose: {
55
+ type: Boolean,
56
+ default: true
57
+ }
58
+ },
59
+ data() {
60
+ return {
61
+ source: `tool.getChildrenOfResName($${this.roleName}$)`,
62
+ //source: `root.getResourceById($${this.$login.f.f_orgids.substring(0,this.$login.f.f_orgids.length-1)}$,$organization$).getSpecialResByType($user$).where(row.getAttributes().get($rolesnames$).indexOf($${this.roleName}$) != -1)`,
63
+ allUsers: [],
64
+ users: [],
65
+ selVal: '',
66
+ organizationname:this.$login.f.f_fengongsi,
67
+ resids: [],
68
+ changeval: ''
69
+ }
70
+ },
71
+ watch: {
72
+ 'value'(val) {
73
+ console.log("969696", val)
74
+ if (val) {
75
+ if (this.valueMultiple) {
76
+
77
+ } else {
78
+ this.selVal = val
79
+ }
80
+
81
+ }
82
+ }
83
+ },
84
+ async ready() {
85
+ await this.search()
86
+ await this.filterUser(this.resids)
87
+ },
88
+ methods: {
89
+ async search() {
90
+ let http = new HttpResetClass()
91
+ const res = await http.load('POST', '/rs/search', {
92
+ data: {
93
+ source: this.source,
94
+ userid: this.$login.f.id
95
+ }
96
+ }, {resolveMsg: null, rejectMsg: null})
97
+ this.allUsers = res.data
98
+ },
99
+ valuechange(val) {
100
+ console.log(`val instanceof Array======${!val instanceof Array}`)
101
+ if ((typeof val === 'object' && !val instanceof Array) || (val instanceof Event)) {
102
+ return
103
+ }
104
+ if (this.valueMultiple && Array.isArray(val)) {
105
+ if (val && val.length > 0) {
106
+ let valuesele = `(`
107
+ for (let i = 0; i < val.length; i++) {
108
+ valuesele += `'${val[i]}',`
109
+ }
110
+ this.value = valuesele.substring(0, valuesele.length - 1) + ')'
111
+ } else {
112
+ this.value = ''
113
+ }
114
+ } else {
115
+ this.value = val
116
+ }
117
+ // this.changeval = val
118
+ },
119
+ getRes(obj) {
120
+ this.resids = obj.resids
121
+ this.organizationname = obj.res[0]
122
+ this.filterUser(this.resids)
123
+ this.$dispatch('re-res', obj)
124
+ },
125
+ async filterUser(resids) {
126
+ // 处理第一次进入页面值异常问题
127
+ if (resids.length > 0 && typeof resids[0] == "object") {
128
+ resids = resids[0]
129
+ }
130
+ if (resids[0]) {
131
+ this.source = `tool.getChildrenOfResName($${this.roleName}$)`
132
+ await this.search()
133
+ }
134
+ this.users = []
135
+ this.allUsers.forEach(user => {
136
+ if (this.organizationname == user.organizationname || !user.organizationname){
137
+ this.users.push({label: user.name, value: user.name})
138
+ }
139
+ })
140
+ if (!this.valueMultiple && this.users.length > 0) {
141
+ this.users = [{label: '全部', value: ''}, ...this.users]
142
+ }
143
+ let temp = []
144
+ this.users = this.users.filter(item => {
145
+ if (!temp.includes(item.label)) {
146
+ temp.push(item.label)
147
+ return true
148
+ }
149
+ return false
150
+ })
151
+ this.$emit('alluser', this.allUsers)
152
+ //tag
153
+ }
154
+ }
155
+ }
156
+ </script>
157
+
158
+ <style scoped>
159
+
160
+ </style>
@@ -0,0 +1,20 @@
1
+ // 分公司特殊组件页面注册
2
+ import Vue from "vue";
3
+
4
+ //手机特殊目录注册到该文件中
5
+ let specialComp = {
6
+ // 计划安检
7
+ 'plan-manage': (resolve) => { require(['./pc/PlanManage'], resolve) },
8
+ 'role-selector-safe': (resolve) => { require(['./pc/RoleSelector'], resolve) },
9
+ 'right-tree-safe': (resolve) => { require(['./pc/RightTreeSafe'], resolve) },
10
+ 'plan-chooser': (resolve) => { require(['./pc/PlanChooser'], resolve) },
11
+ 'paper-main': (resolve) => { require(['./pc/PaperList'], resolve) },
12
+ 'check-search-user': (resolve) => { require(['./pc/CheckSearchUser'], resolve) },
13
+ 'defect-main-new2': (resolve) => { require(['./pc/DefectMainNew'], resolve) },
14
+ 'check-plan-area-list': (resolve) => { require(['./pc/CheckPlanAreaList'], resolve) }
15
+ }
16
+ exports.specialComp = specialComp
17
+
18
+
19
+
20
+
@@ -304,6 +304,9 @@
304
304
  })
305
305
  //tag
306
306
  },
307
+ selfSearch(){
308
+ this.$refs.paged.$refs.cri.search()
309
+ },
307
310
  inspect (info){
308
311
  if(info.f_last_check_date){
309
312
  this.$showMessage("该用户最后一次安检时间为 "+info.f_last_check_date+" 是否继续对该用户进行安检",['confirm', 'cancel']).then((butt)=>{
@@ -321,7 +324,8 @@
321
324
  safe:true
322
325
  }
323
326
  this.$dispatch('gotoson',pardate)
324
- this.$goto('safecheck-order-v', {item: info, role: 'inspect'}, 'self', this.reload)
327
+ let _this = this
328
+ this.$goto('safecheck-order-v', {item: info, role: 'inspect'}, 'self', function(){_this.selfSearch()})
325
329
 
326
330
  })
327
331
  }
@@ -340,7 +344,8 @@
340
344
  safe:true
341
345
  }
342
346
  this.$dispatch('gotoson',pardate)
343
- this.$goto('safecheck-order-v', {item: info, role: 'inspect'}, 'self', this.reload)
347
+ let _this = this
348
+ this.$goto('safecheck-order-v', {item: info, role: 'inspect'}, 'self', function(){_this.selfSearch()})
344
349
 
345
350
  })
346
351
  }