safecheck-client 4.0.1-4 → 4.0.1-6
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/package.json +1 -1
- package/src/components/NewDefectList/DefectListNew.vue +663 -663
- package/src/components/NewDefectList/DefectPaperNew.vue +1184 -1184
- package/src/components/Util/SafecheckUpload.vue +281 -281
- package/src/components/android/PhoneUpUserinfo.vue +1249 -1249
- package/src/components/android/SafeRightTree.vue +218 -218
- package/src/components/android/SafecheckDevices.vue +1340 -1340
- package/src/components/paper/PaperList.vue +797 -797
- package/src/components/pc/CheckBook.vue +303 -303
- package/src/components/pc/CheckBookArea.vue +146 -146
- package/src/components/pc/CheckBookCompany.vue +144 -144
- package/src/components/pc/CheckBookDetails.vue +161 -161
- package/src/components/pc/CheckBookEntry.vue +60 -60
- package/src/components/pc/CheckBookSearchArea.vue +560 -560
- package/src/components/pc/CheckBookSearchUnit.vue +229 -229
- package/src/components/pc/CheckBookSearchUser.vue +659 -659
- package/src/components/pc/CheckBookSearchUserList.vue +674 -674
- package/src/components/pc/CheckBookUser.vue +333 -333
- package/src/components/pc/PaperDefectMain.vue +880 -880
- package/src/filiale/jinhong/pc/checkUserList.vue +742 -743
- package/src/filiale/meihekou/android/CheckPlanList.vue +198 -198
- package/src/filiale/meihekou/android/CheckPlanListArea.vue +190 -190
- package/src/filiale/meihekou/android/CurrentCreate.vue +1038 -1038
- package/src/filiale/meihekou/android/PaperFeedback.vue +1542 -1542
- package/src/filiale/meihekou/android/SafecheckDevices.vue +1340 -1340
- package/src/filiale/meihekou/android/SafecheckOrderV.vue +2433 -2433
- package/src/filiale/meihekou/android.js +22 -22
- package/src/filiale/meihekou/pc/NewCheckpaper.vue +2027 -2027
- package/src/filiale/qingjian/pc/NewCheckpaper.vue +1 -0
- package/src/main.js +33 -33
@@ -1,218 +1,218 @@
|
|
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">
|
4
|
-
<span class='btn-content' :style="{textOverflow:'ellipsis',overflow: 'hidden'}">{{ resname }}</span>
|
5
|
-
<span class="caret"></span>
|
6
|
-
</button>
|
7
|
-
<tree :model='model' :is-click="false" slot="dropdown-menu" class="dropdown-menu auto" role="menu">
|
8
|
-
<span partial>
|
9
|
-
<span class="glyphicon glyphicon-chevron-down" v-show="row.open&&row.data.children.length>0" style="color:balck;"></span>
|
10
|
-
<span class="glyphicon glyphicon-chevron-right" v-show="!row.open&&row.data.children.length>0" style="color:balck;"></span>
|
11
|
-
<span class="RightTreeCanSelect" v-if="row.data.hasright" @click.stop="$parent.$parent.$parent.selectclick(row.data)">{{row.data.name}}</span>
|
12
|
-
<span class="RightTreeCanNotSelect" v-else>{{row.data.name}}</span>
|
13
|
-
<span class="glyphicon glyphicon-ok " v-if="$parent.$parent.$parent.isSelect(row.data.id)" style="color:balck;"></span>
|
14
|
-
</span>
|
15
|
-
</tree>
|
16
|
-
</dropdown>
|
17
|
-
<v-select v-if="islist"
|
18
|
-
:placeholder='placeholder'
|
19
|
-
:options='childrenOptions'
|
20
|
-
@change="selectclick"
|
21
|
-
:value-single="true"
|
22
|
-
close-on-select></v-select>
|
23
|
-
</template>
|
24
|
-
<script>
|
25
|
-
import * as ldapHelper from '../../utils/LdapHelper'
|
26
|
-
import Vue from 'vue'
|
27
|
-
export default {
|
28
|
-
title: '资源树',
|
29
|
-
props: {
|
30
|
-
source: {
|
31
|
-
type: String,
|
32
|
-
require: true,
|
33
|
-
default:`tool.getFullTree(this.getRights().where(row.getType() == $organization$))`
|
34
|
-
},
|
35
|
-
resid: {
|
36
|
-
},
|
37
|
-
islist: {
|
38
|
-
type: Boolean,
|
39
|
-
default: false
|
40
|
-
},
|
41
|
-
//是否有查看上级的权限
|
42
|
-
Url:{
|
43
|
-
type: String,
|
44
|
-
default:''
|
45
|
-
}
|
46
|
-
},
|
47
|
-
data () {
|
48
|
-
return {
|
49
|
-
width:'100%',
|
50
|
-
resobj:{res:Vue.user.orgs, resids:Vue.user.orgid},
|
51
|
-
userid: Vue.user.id,
|
52
|
-
resname:[Vue.user.orgs],
|
53
|
-
orgnames : [Vue.user.orgs],
|
54
|
-
orgids : [Vue.user.orgid],
|
55
|
-
orgobj:[],
|
56
|
-
model: [
|
57
|
-
|
58
|
-
],
|
59
|
-
placeholder: this.$appdata.getSingleValue('安检-站点') || '维修站',
|
60
|
-
childrenOptions: []
|
61
|
-
}
|
62
|
-
},
|
63
|
-
methods: {
|
64
|
-
selectRes () {
|
65
|
-
let newobj={
|
66
|
-
"res": [this.resname],
|
67
|
-
"resids": [this.orgids],
|
68
|
-
}
|
69
|
-
this.$emit('re-res', newobj)
|
70
|
-
},
|
71
|
-
//点击资源的方法
|
72
|
-
selectclick (row) {
|
73
|
-
if(this.orgids.includes(row.id)){
|
74
|
-
this.orgnames=[]
|
75
|
-
this.orgids=[]
|
76
|
-
this.removeResChild(row)
|
77
|
-
this.orgnames.push(row.name)
|
78
|
-
this.orgids.push(row.id)
|
79
|
-
this.orgobj.push(row)
|
80
|
-
}else{
|
81
|
-
this.orgnames=[]
|
82
|
-
this.orgids=[]
|
83
|
-
this.orgobj=[]
|
84
|
-
this.addResChild(row)
|
85
|
-
}
|
86
|
-
console.log(this.orgnames.join(','))
|
87
|
-
this.resname = this.orgnames.length > 0 ? this.orgnames.join(','):this.placeholder
|
88
|
-
let newobj={
|
89
|
-
"res": this.orgnames,
|
90
|
-
"resids": this.orgids,
|
91
|
-
"orgobj": this.orgobj,
|
92
|
-
}
|
93
|
-
this.$emit('re-res', newobj)
|
94
|
-
},
|
95
|
-
addResChild(val){
|
96
|
-
// if(this.orgids.includes(val.id)){
|
97
|
-
// this.orgnames.splice(this.orgnames.indexOf(val.name),1)
|
98
|
-
// this.orgids.splice(this.orgids.indexOf(val.id),1)
|
99
|
-
// }
|
100
|
-
this.orgnames.push(val.name)
|
101
|
-
this.orgids.push(val.id)
|
102
|
-
this.orgobj.push(val)
|
103
|
-
if(val.children && val.children.length>0){
|
104
|
-
Object.keys(val.children).forEach((key) => {
|
105
|
-
this.addResChild(val.children[key])
|
106
|
-
})
|
107
|
-
}
|
108
|
-
},
|
109
|
-
removeResChild(val){
|
110
|
-
this.orgnames.splice(this.orgnames.indexOf(val.name),1)
|
111
|
-
this.orgids.splice(this.orgids.indexOf(val.id),1)
|
112
|
-
this.orgobj.splice(this.orgids.indexOf(val),1)
|
113
|
-
if(val.children && val.children.length>0){
|
114
|
-
Object.keys(val.children).forEach((key) => {
|
115
|
-
this.removeResChild(val.children[key])
|
116
|
-
})
|
117
|
-
}
|
118
|
-
},
|
119
|
-
//检查是否显示对勾
|
120
|
-
isSelect(val) {
|
121
|
-
if(this.orgids.includes(val)){
|
122
|
-
return true
|
123
|
-
}else{
|
124
|
-
return false
|
125
|
-
}
|
126
|
-
},
|
127
|
-
//树形结构变成list
|
128
|
-
treetoList(val) {
|
129
|
-
for (let value of val) {
|
130
|
-
this.ergodicList(value)
|
131
|
-
}
|
132
|
-
},
|
133
|
-
//找到跟节点
|
134
|
-
ergodicList (val) {
|
135
|
-
val.children.length > 0 ? this.treetoList(val.children) : this.childrenOptions.push({label: val.name, value: val})
|
136
|
-
},
|
137
|
-
//处理显示默认值
|
138
|
-
dealResObj (val) {
|
139
|
-
try{
|
140
|
-
var arr=val.res.split(".")
|
141
|
-
//截取最后一个分公司名字
|
142
|
-
this.resname=arr[arr.length-1].toString()
|
143
|
-
this.resid = val.resids
|
144
|
-
}catch (e){
|
145
|
-
this.resname=this.placeholder
|
146
|
-
}
|
147
|
-
},
|
148
|
-
judgBoundary(){
|
149
|
-
//判断是否超出边界,超出移动
|
150
|
-
if(document.documentElement.offsetWidth< this.$els.dropdown.getBoundingClientRect().right){
|
151
|
-
this.left = document.documentElement.offsetWidth - this.$els.dropdown.getBoundingClientRect().right - 25
|
152
|
-
}
|
153
|
-
}
|
154
|
-
},
|
155
|
-
events: {
|
156
|
-
|
157
|
-
},
|
158
|
-
ready () {
|
159
|
-
console.log('righttree ready')
|
160
|
-
if(this.$els.dropdown){
|
161
|
-
console.log('righttree1')
|
162
|
-
this.width = this.$els.dropdown.clientWidth * 0.7 +'px'
|
163
|
-
}
|
164
|
-
console.log('righttree2')
|
165
|
-
this.dealResObj (this.resobj)
|
166
|
-
console.log('righttree3')
|
167
|
-
var data = {
|
168
|
-
source: this.source,
|
169
|
-
userid: this.userid
|
170
|
-
}
|
171
|
-
console.log('向资源服务发送请求')
|
172
|
-
this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/search`, data,{
|
173
|
-
resolveMsg : null ,
|
174
|
-
rejectMsg : null,
|
175
|
-
}).then((ret) => {
|
176
|
-
console.log('向资源服务请求结束')
|
177
|
-
// 去掉前面的两层节点
|
178
|
-
ret.data[0].children[0].children.forEach((item) => {
|
179
|
-
this.model.push(item)
|
180
|
-
})
|
181
|
-
// 给资源添加父关系
|
182
|
-
ldapHelper.procParent(this.model)
|
183
|
-
if (this.islist) {
|
184
|
-
this.treetoList(this.model)
|
185
|
-
}
|
186
|
-
this.selectRes()
|
187
|
-
})
|
188
|
-
},
|
189
|
-
watch: {
|
190
|
-
}
|
191
|
-
}
|
192
|
-
</script>
|
193
|
-
<style lang="less">
|
194
|
-
#res-tree {
|
195
|
-
.list-group-item {
|
196
|
-
background-color: #FFF;
|
197
|
-
color: #000;
|
198
|
-
padding: 5px 10px;
|
199
|
-
border:0px;
|
200
|
-
white-space: nowrap;
|
201
|
-
}
|
202
|
-
}
|
203
|
-
#res-tree .list-group {
|
204
|
-
width: auto;
|
205
|
-
min-width: 100%;
|
206
|
-
}
|
207
|
-
.hide-text-overflow{
|
208
|
-
overflow: hidden;
|
209
|
-
text-overflow: ellipsis
|
210
|
-
}
|
211
|
-
.select-style {
|
212
|
-
border: 0px;
|
213
|
-
/*border-bottom: 2px solid #C9CCCF;*/
|
214
|
-
border: 1px solid #93B2D3;
|
215
|
-
border-radius: 0px;
|
216
|
-
color: #555;
|
217
|
-
}
|
218
|
-
</style>
|
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">
|
4
|
+
<span class='btn-content' :style="{textOverflow:'ellipsis',overflow: 'hidden'}">{{ resname }}</span>
|
5
|
+
<span class="caret"></span>
|
6
|
+
</button>
|
7
|
+
<tree :model='model' :is-click="false" slot="dropdown-menu" class="dropdown-menu auto" role="menu">
|
8
|
+
<span partial>
|
9
|
+
<span class="glyphicon glyphicon-chevron-down" v-show="row.open&&row.data.children.length>0" style="color:balck;"></span>
|
10
|
+
<span class="glyphicon glyphicon-chevron-right" v-show="!row.open&&row.data.children.length>0" style="color:balck;"></span>
|
11
|
+
<span class="RightTreeCanSelect" v-if="row.data.hasright" @click.stop="$parent.$parent.$parent.selectclick(row.data)">{{row.data.name}}</span>
|
12
|
+
<span class="RightTreeCanNotSelect" v-else>{{row.data.name}}</span>
|
13
|
+
<span class="glyphicon glyphicon-ok " v-if="$parent.$parent.$parent.isSelect(row.data.id)" style="color:balck;"></span>
|
14
|
+
</span>
|
15
|
+
</tree>
|
16
|
+
</dropdown>
|
17
|
+
<v-select v-if="islist"
|
18
|
+
:placeholder='placeholder'
|
19
|
+
:options='childrenOptions'
|
20
|
+
@change="selectclick"
|
21
|
+
:value-single="true"
|
22
|
+
close-on-select></v-select>
|
23
|
+
</template>
|
24
|
+
<script>
|
25
|
+
import * as ldapHelper from '../../utils/LdapHelper'
|
26
|
+
import Vue from 'vue'
|
27
|
+
export default {
|
28
|
+
title: '资源树',
|
29
|
+
props: {
|
30
|
+
source: {
|
31
|
+
type: String,
|
32
|
+
require: true,
|
33
|
+
default:`tool.getFullTree(this.getRights().where(row.getType() == $organization$))`
|
34
|
+
},
|
35
|
+
resid: {
|
36
|
+
},
|
37
|
+
islist: {
|
38
|
+
type: Boolean,
|
39
|
+
default: false
|
40
|
+
},
|
41
|
+
//是否有查看上级的权限
|
42
|
+
Url:{
|
43
|
+
type: String,
|
44
|
+
default:''
|
45
|
+
}
|
46
|
+
},
|
47
|
+
data () {
|
48
|
+
return {
|
49
|
+
width:'100%',
|
50
|
+
resobj:{res:Vue.user.orgs, resids:Vue.user.orgid},
|
51
|
+
userid: Vue.user.id,
|
52
|
+
resname:[Vue.user.orgs],
|
53
|
+
orgnames : [Vue.user.orgs],
|
54
|
+
orgids : [Vue.user.orgid],
|
55
|
+
orgobj:[],
|
56
|
+
model: [
|
57
|
+
|
58
|
+
],
|
59
|
+
placeholder: this.$appdata.getSingleValue('安检-站点') || '维修站',
|
60
|
+
childrenOptions: []
|
61
|
+
}
|
62
|
+
},
|
63
|
+
methods: {
|
64
|
+
selectRes () {
|
65
|
+
let newobj={
|
66
|
+
"res": [this.resname],
|
67
|
+
"resids": [this.orgids],
|
68
|
+
}
|
69
|
+
this.$emit('re-res', newobj)
|
70
|
+
},
|
71
|
+
//点击资源的方法
|
72
|
+
selectclick (row) {
|
73
|
+
if(this.orgids.includes(row.id)){
|
74
|
+
this.orgnames=[]
|
75
|
+
this.orgids=[]
|
76
|
+
this.removeResChild(row)
|
77
|
+
this.orgnames.push(row.name)
|
78
|
+
this.orgids.push(row.id)
|
79
|
+
this.orgobj.push(row)
|
80
|
+
}else{
|
81
|
+
this.orgnames=[]
|
82
|
+
this.orgids=[]
|
83
|
+
this.orgobj=[]
|
84
|
+
this.addResChild(row)
|
85
|
+
}
|
86
|
+
console.log(this.orgnames.join(','))
|
87
|
+
this.resname = this.orgnames.length > 0 ? this.orgnames.join(','):this.placeholder
|
88
|
+
let newobj={
|
89
|
+
"res": this.orgnames,
|
90
|
+
"resids": this.orgids,
|
91
|
+
"orgobj": this.orgobj,
|
92
|
+
}
|
93
|
+
this.$emit('re-res', newobj)
|
94
|
+
},
|
95
|
+
addResChild(val){
|
96
|
+
// if(this.orgids.includes(val.id)){
|
97
|
+
// this.orgnames.splice(this.orgnames.indexOf(val.name),1)
|
98
|
+
// this.orgids.splice(this.orgids.indexOf(val.id),1)
|
99
|
+
// }
|
100
|
+
this.orgnames.push(val.name)
|
101
|
+
this.orgids.push(val.id)
|
102
|
+
this.orgobj.push(val)
|
103
|
+
if(val.children && val.children.length>0){
|
104
|
+
Object.keys(val.children).forEach((key) => {
|
105
|
+
this.addResChild(val.children[key])
|
106
|
+
})
|
107
|
+
}
|
108
|
+
},
|
109
|
+
removeResChild(val){
|
110
|
+
this.orgnames.splice(this.orgnames.indexOf(val.name),1)
|
111
|
+
this.orgids.splice(this.orgids.indexOf(val.id),1)
|
112
|
+
this.orgobj.splice(this.orgids.indexOf(val),1)
|
113
|
+
if(val.children && val.children.length>0){
|
114
|
+
Object.keys(val.children).forEach((key) => {
|
115
|
+
this.removeResChild(val.children[key])
|
116
|
+
})
|
117
|
+
}
|
118
|
+
},
|
119
|
+
//检查是否显示对勾
|
120
|
+
isSelect(val) {
|
121
|
+
if(this.orgids.includes(val)){
|
122
|
+
return true
|
123
|
+
}else{
|
124
|
+
return false
|
125
|
+
}
|
126
|
+
},
|
127
|
+
//树形结构变成list
|
128
|
+
treetoList(val) {
|
129
|
+
for (let value of val) {
|
130
|
+
this.ergodicList(value)
|
131
|
+
}
|
132
|
+
},
|
133
|
+
//找到跟节点
|
134
|
+
ergodicList (val) {
|
135
|
+
val.children.length > 0 ? this.treetoList(val.children) : this.childrenOptions.push({label: val.name, value: val})
|
136
|
+
},
|
137
|
+
//处理显示默认值
|
138
|
+
dealResObj (val) {
|
139
|
+
try{
|
140
|
+
var arr=val.res.split(".")
|
141
|
+
//截取最后一个分公司名字
|
142
|
+
this.resname=arr[arr.length-1].toString()
|
143
|
+
this.resid = val.resids
|
144
|
+
}catch (e){
|
145
|
+
this.resname=this.placeholder
|
146
|
+
}
|
147
|
+
},
|
148
|
+
judgBoundary(){
|
149
|
+
//判断是否超出边界,超出移动
|
150
|
+
if(document.documentElement.offsetWidth< this.$els.dropdown.getBoundingClientRect().right){
|
151
|
+
this.left = document.documentElement.offsetWidth - this.$els.dropdown.getBoundingClientRect().right - 25
|
152
|
+
}
|
153
|
+
}
|
154
|
+
},
|
155
|
+
events: {
|
156
|
+
|
157
|
+
},
|
158
|
+
ready () {
|
159
|
+
console.log('righttree ready')
|
160
|
+
if(this.$els.dropdown){
|
161
|
+
console.log('righttree1')
|
162
|
+
this.width = this.$els.dropdown.clientWidth * 0.7 +'px'
|
163
|
+
}
|
164
|
+
console.log('righttree2')
|
165
|
+
this.dealResObj (this.resobj)
|
166
|
+
console.log('righttree3')
|
167
|
+
var data = {
|
168
|
+
source: this.source,
|
169
|
+
userid: this.userid
|
170
|
+
}
|
171
|
+
console.log('向资源服务发送请求')
|
172
|
+
this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/search`, data,{
|
173
|
+
resolveMsg : null ,
|
174
|
+
rejectMsg : null,
|
175
|
+
}).then((ret) => {
|
176
|
+
console.log('向资源服务请求结束')
|
177
|
+
// 去掉前面的两层节点
|
178
|
+
ret.data[0].children[0].children.forEach((item) => {
|
179
|
+
this.model.push(item)
|
180
|
+
})
|
181
|
+
// 给资源添加父关系
|
182
|
+
ldapHelper.procParent(this.model)
|
183
|
+
if (this.islist) {
|
184
|
+
this.treetoList(this.model)
|
185
|
+
}
|
186
|
+
this.selectRes()
|
187
|
+
})
|
188
|
+
},
|
189
|
+
watch: {
|
190
|
+
}
|
191
|
+
}
|
192
|
+
</script>
|
193
|
+
<style lang="less">
|
194
|
+
#res-tree {
|
195
|
+
.list-group-item {
|
196
|
+
background-color: #FFF;
|
197
|
+
color: #000;
|
198
|
+
padding: 5px 10px;
|
199
|
+
border:0px;
|
200
|
+
white-space: nowrap;
|
201
|
+
}
|
202
|
+
}
|
203
|
+
#res-tree .list-group {
|
204
|
+
width: auto;
|
205
|
+
min-width: 100%;
|
206
|
+
}
|
207
|
+
.hide-text-overflow{
|
208
|
+
overflow: hidden;
|
209
|
+
text-overflow: ellipsis
|
210
|
+
}
|
211
|
+
.select-style {
|
212
|
+
border: 0px;
|
213
|
+
/*border-bottom: 2px solid #C9CCCF;*/
|
214
|
+
border: 1px solid #93B2D3;
|
215
|
+
border-radius: 0px;
|
216
|
+
color: #555;
|
217
|
+
}
|
218
|
+
</style>
|