safecheck-client 3.0.30-50 → 3.0.30-52
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 +133 -133
- package/src/App.vue +31 -31
- package/src/components/Util.js +15 -0
- package/src/components/pc/Edit.vue +111 -35
- package/src/components/pc/PaperEdit.vue +56 -53
- package/src/filiale/fugou/android/AddPlanItem.vue +413 -0
- package/src/filiale/fugou/android.js +10 -0
- package/src/filiale/wensu/pc/DefectPaperNew.vue +1138 -1138
- package/src/filiale/wensu/pc/RoleSelector.vue +150 -150
- package/src/filiale/yangchunboneng/pc/CheckBookDetails.vue +213 -213
- package/src/main.js +33 -33
@@ -1,150 +1,150 @@
|
|
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">公  司</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
|
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
|
-
export default {
|
25
|
-
name: "RoleSelector",
|
26
|
-
props: {
|
27
|
-
valueMultiple: {
|
28
|
-
type: Boolean,
|
29
|
-
default: false
|
30
|
-
},
|
31
|
-
roleName: {
|
32
|
-
type: String,
|
33
|
-
default: '安检员'
|
34
|
-
},
|
35
|
-
roleLable: {
|
36
|
-
type: String,
|
37
|
-
default: '安检员'
|
38
|
-
},
|
39
|
-
leftWidth: {
|
40
|
-
type: String,
|
41
|
-
default: '60%'
|
42
|
-
},
|
43
|
-
rightWidth: {
|
44
|
-
type: String,
|
45
|
-
default: '60%'
|
46
|
-
},
|
47
|
-
value: {
|
48
|
-
default: ''
|
49
|
-
},
|
50
|
-
resobjprop: {
|
51
|
-
default: {}
|
52
|
-
}
|
53
|
-
},
|
54
|
-
data() {
|
55
|
-
return {
|
56
|
-
source: `tool.getChildrenOfResName($${this.roleName}$)`,
|
57
|
-
// source: `root.getResourceById($${this.$login.f.orgid}$,$organization$).getSpecialResByType($user$).where(row.getAttributes().get($rolestr$).indexOf($${this.roleName}$) != -1)`,
|
58
|
-
allUsers: [],
|
59
|
-
users: [],
|
60
|
-
selVal:'',
|
61
|
-
resids: [],
|
62
|
-
changeval: ''
|
63
|
-
}
|
64
|
-
},
|
65
|
-
watch: {
|
66
|
-
'value' (val) {
|
67
|
-
console.log("969696",val)
|
68
|
-
if (val) {
|
69
|
-
if(this.valueMultiple){
|
70
|
-
|
71
|
-
}else{
|
72
|
-
this.selVal = val
|
73
|
-
}
|
74
|
-
|
75
|
-
}
|
76
|
-
}
|
77
|
-
},
|
78
|
-
ready () {
|
79
|
-
let http = new HttpResetClass()
|
80
|
-
http.load('POST', '/rs/search', {data: {source: this.source, userid: this.$login.f.id}}, {resolveMsg: null, rejectMsg: null})
|
81
|
-
.then(res => {
|
82
|
-
//tag)
|
83
|
-
this.allUsers = res.data
|
84
|
-
this.filterUser(this.resids)
|
85
|
-
})
|
86
|
-
},
|
87
|
-
methods: {
|
88
|
-
valuechange (val) {
|
89
|
-
console.log(`val instanceof Array======${!val instanceof Array}`)
|
90
|
-
if((typeof val === 'object' && !val instanceof Array) || (val instanceof Event)){
|
91
|
-
return
|
92
|
-
}
|
93
|
-
if (this.valueMultiple && Array.isArray(val)){
|
94
|
-
if (val && val.length > 0) {
|
95
|
-
let valuesele = `(`
|
96
|
-
for (let i = 0;i < val.length ;i++) {
|
97
|
-
valuesele += `'${val[i]}',`
|
98
|
-
}
|
99
|
-
this.value = valuesele.substring(0,valuesele.length -1 ) + ')'
|
100
|
-
}else{
|
101
|
-
this.value = ''
|
102
|
-
}
|
103
|
-
}else{
|
104
|
-
this.value = val
|
105
|
-
}
|
106
|
-
// this.changeval = val
|
107
|
-
},
|
108
|
-
getRes(obj) {
|
109
|
-
this.resids = obj.resids
|
110
|
-
//tag
|
111
|
-
this.filterUser(this.resids)
|
112
|
-
this.$dispatch('re-res',obj)
|
113
|
-
},
|
114
|
-
filterUser(resids) {
|
115
|
-
// 处理第一次进入页面值异常问题
|
116
|
-
if(resids.length > 0 && typeof resids[0] == "object"){
|
117
|
-
resids = resids[0]
|
118
|
-
}
|
119
|
-
this.users = []
|
120
|
-
this.allUsers.forEach(user => {
|
121
|
-
// if (resids.indexOf(user.orgid) != -1) {
|
122
|
-
// if (typeof user.name == "string"){
|
123
|
-
if(user.state == '在职'){
|
124
|
-
this.users.push({label: user.name, value: user.name})
|
125
|
-
}
|
126
|
-
|
127
|
-
// }
|
128
|
-
// }
|
129
|
-
})
|
130
|
-
if(this.users.length > 0){
|
131
|
-
this.users = [{label: '全部', value: ''},...this.users]
|
132
|
-
}
|
133
|
-
let temp = []
|
134
|
-
this.users = this.users.filter(item=>{
|
135
|
-
if (!temp.includes(item.label)){
|
136
|
-
temp.push(item.label)
|
137
|
-
return true
|
138
|
-
}
|
139
|
-
return false
|
140
|
-
})
|
141
|
-
this.$emit('alluser',this.allUsers)
|
142
|
-
//tag
|
143
|
-
}
|
144
|
-
}
|
145
|
-
}
|
146
|
-
</script>
|
147
|
-
|
148
|
-
<style scoped>
|
149
|
-
|
150
|
-
</style>
|
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">公  司</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
|
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
|
+
export default {
|
25
|
+
name: "RoleSelector",
|
26
|
+
props: {
|
27
|
+
valueMultiple: {
|
28
|
+
type: Boolean,
|
29
|
+
default: false
|
30
|
+
},
|
31
|
+
roleName: {
|
32
|
+
type: String,
|
33
|
+
default: '安检员'
|
34
|
+
},
|
35
|
+
roleLable: {
|
36
|
+
type: String,
|
37
|
+
default: '安检员'
|
38
|
+
},
|
39
|
+
leftWidth: {
|
40
|
+
type: String,
|
41
|
+
default: '60%'
|
42
|
+
},
|
43
|
+
rightWidth: {
|
44
|
+
type: String,
|
45
|
+
default: '60%'
|
46
|
+
},
|
47
|
+
value: {
|
48
|
+
default: ''
|
49
|
+
},
|
50
|
+
resobjprop: {
|
51
|
+
default: {}
|
52
|
+
}
|
53
|
+
},
|
54
|
+
data() {
|
55
|
+
return {
|
56
|
+
source: `tool.getChildrenOfResName($${this.roleName}$)`,
|
57
|
+
// source: `root.getResourceById($${this.$login.f.orgid}$,$organization$).getSpecialResByType($user$).where(row.getAttributes().get($rolestr$).indexOf($${this.roleName}$) != -1)`,
|
58
|
+
allUsers: [],
|
59
|
+
users: [],
|
60
|
+
selVal:'',
|
61
|
+
resids: [],
|
62
|
+
changeval: ''
|
63
|
+
}
|
64
|
+
},
|
65
|
+
watch: {
|
66
|
+
'value' (val) {
|
67
|
+
console.log("969696",val)
|
68
|
+
if (val) {
|
69
|
+
if(this.valueMultiple){
|
70
|
+
|
71
|
+
}else{
|
72
|
+
this.selVal = val
|
73
|
+
}
|
74
|
+
|
75
|
+
}
|
76
|
+
}
|
77
|
+
},
|
78
|
+
ready () {
|
79
|
+
let http = new HttpResetClass()
|
80
|
+
http.load('POST', '/rs/search', {data: {source: this.source, userid: this.$login.f.id}}, {resolveMsg: null, rejectMsg: null})
|
81
|
+
.then(res => {
|
82
|
+
//tag)
|
83
|
+
this.allUsers = res.data
|
84
|
+
this.filterUser(this.resids)
|
85
|
+
})
|
86
|
+
},
|
87
|
+
methods: {
|
88
|
+
valuechange (val) {
|
89
|
+
console.log(`val instanceof Array======${!val instanceof Array}`)
|
90
|
+
if((typeof val === 'object' && !val instanceof Array) || (val instanceof Event)){
|
91
|
+
return
|
92
|
+
}
|
93
|
+
if (this.valueMultiple && Array.isArray(val)){
|
94
|
+
if (val && val.length > 0) {
|
95
|
+
let valuesele = `(`
|
96
|
+
for (let i = 0;i < val.length ;i++) {
|
97
|
+
valuesele += `'${val[i]}',`
|
98
|
+
}
|
99
|
+
this.value = valuesele.substring(0,valuesele.length -1 ) + ')'
|
100
|
+
}else{
|
101
|
+
this.value = ''
|
102
|
+
}
|
103
|
+
}else{
|
104
|
+
this.value = val
|
105
|
+
}
|
106
|
+
// this.changeval = val
|
107
|
+
},
|
108
|
+
getRes(obj) {
|
109
|
+
this.resids = obj.resids
|
110
|
+
//tag
|
111
|
+
this.filterUser(this.resids)
|
112
|
+
this.$dispatch('re-res',obj)
|
113
|
+
},
|
114
|
+
filterUser(resids) {
|
115
|
+
// 处理第一次进入页面值异常问题
|
116
|
+
if(resids.length > 0 && typeof resids[0] == "object"){
|
117
|
+
resids = resids[0]
|
118
|
+
}
|
119
|
+
this.users = []
|
120
|
+
this.allUsers.forEach(user => {
|
121
|
+
// if (resids.indexOf(user.orgid) != -1) {
|
122
|
+
// if (typeof user.name == "string"){
|
123
|
+
if(user.state == '在职'){
|
124
|
+
this.users.push({label: user.name, value: user.name})
|
125
|
+
}
|
126
|
+
|
127
|
+
// }
|
128
|
+
// }
|
129
|
+
})
|
130
|
+
if(this.users.length > 0){
|
131
|
+
this.users = [{label: '全部', value: ''},...this.users]
|
132
|
+
}
|
133
|
+
let temp = []
|
134
|
+
this.users = this.users.filter(item=>{
|
135
|
+
if (!temp.includes(item.label)){
|
136
|
+
temp.push(item.label)
|
137
|
+
return true
|
138
|
+
}
|
139
|
+
return false
|
140
|
+
})
|
141
|
+
this.$emit('alluser',this.allUsers)
|
142
|
+
//tag
|
143
|
+
}
|
144
|
+
}
|
145
|
+
}
|
146
|
+
</script>
|
147
|
+
|
148
|
+
<style scoped>
|
149
|
+
|
150
|
+
</style>
|