telephone-clients 3.0.103-63 → 3.0.103-65
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 +2 -2
- package/src/App.vue +54 -54
- package/src/components/Util/RightTreeSafeDep.vue +350 -0
- package/src/components/pc/RoleSelectorDep.vue +158 -0
- package/src/components/pc/WorkListNew.vue +712 -706
- package/src/components/weinan/WorkListAll.vue +49 -25
- package/src/filiale/furuike/pc/WorkHistory.vue +576 -576
- package/src/filiale/qianneng/pc/MaterialDetailed.vue +260 -250
- package/src/filiale/qianneng/pc/RepairsWork.vue +992 -982
- package/src/filiale/qianneng/pc/WorkListAllNew.vue +741 -730
- package/src/filiale/rongcheng/CliWorkListAll.vue +699 -701
- package/src/filiale/shexian/android/RepairFirstV.vue +775 -775
- package/src/main.js +22 -22
- package/src/weinan.js +6 -0
|
@@ -0,0 +1,158 @@
|
|
|
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-dep :width="leftWidth" @re-res="getRes" :resobjprop.sync="resobjprop"></right-tree-safe-dep>
|
|
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.depids}$,$department$).getSpecialResByType($user$).where(row.getAttributes().get($rolestr$).indexOf($${this.roleName}$) != -1)`,
|
|
63
|
+
allUsers: [],
|
|
64
|
+
users: [],
|
|
65
|
+
selVal: '',
|
|
66
|
+
organizationname:this.$login.f.organizationname,
|
|
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 = `root.getResourceById($${resids[0]}$,$department$).getSpecialResByType($user$).where(row.getAttributes().get($rolestr$).indexOf($${this.roleName}$) != -1)`
|
|
132
|
+
await this.search()
|
|
133
|
+
}
|
|
134
|
+
this.users = []
|
|
135
|
+
this.allUsers.forEach(user => {
|
|
136
|
+
this.users.push({label: user.name, value: user.name})
|
|
137
|
+
})
|
|
138
|
+
if (!this.valueMultiple && this.users.length > 0) {
|
|
139
|
+
this.users = [{label: '全部', value: ''}, ...this.users]
|
|
140
|
+
}
|
|
141
|
+
let temp = []
|
|
142
|
+
this.users = this.users.filter(item => {
|
|
143
|
+
if (!temp.includes(item.label)) {
|
|
144
|
+
temp.push(item.label)
|
|
145
|
+
return true
|
|
146
|
+
}
|
|
147
|
+
return false
|
|
148
|
+
})
|
|
149
|
+
this.$emit('alluser', this.allUsers)
|
|
150
|
+
//tag
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
</script>
|
|
155
|
+
|
|
156
|
+
<style scoped>
|
|
157
|
+
|
|
158
|
+
</style>
|