safecheck-client 3.0.30-49 → 3.0.30-50

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.
@@ -1,147 +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">公&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
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
- this.users.push({label: user.name, value: user.name})
124
- // }
125
- // }
126
- })
127
- if(this.users.length > 0){
128
- this.users = [{label: '全部', value: ''},...this.users]
129
- }
130
- let temp = []
131
- this.users = this.users.filter(item=>{
132
- if (!temp.includes(item.label)){
133
- temp.push(item.label)
134
- return true
135
- }
136
- return false
137
- })
138
- this.$emit('alluser',this.allUsers)
139
- //tag
140
- }
141
- }
142
- }
143
- </script>
144
-
145
- <style scoped>
146
-
147
- </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">公&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
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,19 +1,19 @@
1
- // 分公司特殊组件页面注册
2
- import Vue from "vue";
3
-
4
- //手机特殊目录注册到该文件中
5
- let specialComp = {
6
- 'check-user-list': (resolve) => { require(['./pc/checkUserList'], resolve) },
7
- 'select-check-plan': (resolve) => { require(['./pc/SelectCheckPlan'], resolve) },
8
- 'check-detail': (resolve) => { require(['./pc/CheckDetail'], resolve) },
9
- 'print-material-bill': (resolve) => { require(['./pc/PrintMaterialBill'], resolve) },
10
- 'check-search-user':(resolve) => {require(['./pc/CheckSearchUser'], resolve)},
11
- 'defect-main-new2': (resolve) => {require(['./pc/DefectMainNew'], resolve)},
12
- 'role-selector-safe': (resolve) => {require(['./pc/RoleSelector'], resolve)},
13
- 'new-check-paper': (resolve) => {require(['./pc/NewCheckpaper'], resolve)}
14
- }
15
- exports.specialComp = specialComp
16
-
17
-
18
-
19
-
1
+ // 分公司特殊组件页面注册
2
+ import Vue from "vue";
3
+
4
+ //手机特殊目录注册到该文件中
5
+ let specialComp = {
6
+ 'check-user-list': (resolve) => { require(['./pc/checkUserList'], resolve) },
7
+ 'select-check-plan': (resolve) => { require(['./pc/SelectCheckPlan'], resolve) },
8
+ 'check-detail': (resolve) => { require(['./pc/CheckDetail'], resolve) },
9
+ 'print-material-bill': (resolve) => { require(['./pc/PrintMaterialBill'], resolve) },
10
+ 'check-search-user':(resolve) => {require(['./pc/CheckSearchUser'], resolve)},
11
+ 'defect-main-new2': (resolve) => {require(['./pc/DefectMainNew'], resolve)},
12
+ 'role-selector-safe': (resolve) => {require(['./pc/RoleSelector'], resolve)},
13
+ 'new-check-paper': (resolve) => {require(['./pc/NewCheckpaper'], resolve)}
14
+ }
15
+ exports.specialComp = specialComp
16
+
17
+
18
+
19
+