system-clients 3.1.74-xianyang → 3.1.79-xianyang
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/equipment/PcAdd.vue +40 -55
- package/src/components/equipment/PcList.vue +5 -5
- package/src/components/equipment/PhoneAdd.vue +4 -4
- package/src/components/equipment/PhoneList.vue +4 -4
- package/src/components/equipment/PosAdd.vue +299 -315
- package/src/components/equipment/PosList.vue +254 -315
- package/src/components/equipment/PosManage.vue +150 -68
- package/src/components/server/ResSelect.vue +154 -150
- package/src/components/server/RightTree.vue +314 -315
@@ -1,68 +1,150 @@
|
|
1
|
-
<template>
|
2
|
-
<div class="flex-row">
|
3
|
-
<div :class="{'basic-main':!isChange,'binary-left':isChange}">
|
4
|
-
<pos-list :row="row" @
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
<
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
'
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
1
|
+
<template>
|
2
|
+
<div class="flex-row">
|
3
|
+
<div :class="{'basic-main':!isChange,'binary-left':isChange}">
|
4
|
+
<pos-list :row="row" @dblclick="selected" style="width:auto;" :f_filialeid.sync="f_filialeids" :isshowless="isChange" v-ref:list ></pos-list>
|
5
|
+
</div>
|
6
|
+
<div class="binary-right" style="margin-left: 10px; width: 40%;" v-if="isChange">
|
7
|
+
<pos-add :data="row" :info="infoadd" :f_filialeids.sync="f_filialeids" v-ref:addbox></pos-add>
|
8
|
+
</div>
|
9
|
+
|
10
|
+
<modal v-if="batchPos" :show.sync="batchPos" backdrop="false" >
|
11
|
+
<header slot="modal-header" class="modal-header">
|
12
|
+
<button type="button" class="close" @click="close"><span>×</span></button>
|
13
|
+
<h4 class="modal-title">批量操作</h4>
|
14
|
+
</header>
|
15
|
+
<article slot="modal-body" class="modal-body">
|
16
|
+
<form class="form-horizontal">
|
17
|
+
<div class="row">
|
18
|
+
<div>
|
19
|
+
<h4>注意事项</h4>
|
20
|
+
<p>1.如果需要对POS设备进行升级,批量选择的POS设备包含非正常状态,则只会对状态为正常的设备进行升级。</p>
|
21
|
+
<p>2.如果POS设备处于停用状态,则可以进行启用操作。如果设备处于启用状态,则可以进行停用和升级操作。</p>
|
22
|
+
<p>3.批量操作可能耗时较长,请刷新列表查看结果。</p>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
</form>
|
26
|
+
</article>
|
27
|
+
<footer slot="modal-footer" class="modal-footer">
|
28
|
+
<button type="button" class="button_search button_spacing" @click="batchRoot('2')">批量升级</button>
|
29
|
+
<button type="button" class="button_search button_spacing" @click="batchRoot('1')">批量启用</button>
|
30
|
+
<button type="button" class="button_search button_spacing" @click="batchRoot('0')">批量停用</button>
|
31
|
+
<button type="button" class="button_clear button_spacing" @click='close'>退出</button>
|
32
|
+
</footer>
|
33
|
+
</modal>
|
34
|
+
</div>
|
35
|
+
</template>
|
36
|
+
<script>
|
37
|
+
|
38
|
+
import PosList from './PosList'
|
39
|
+
import PosAdd from './PosAdd'
|
40
|
+
|
41
|
+
export default {
|
42
|
+
title: 'POS终端管理',
|
43
|
+
components: {
|
44
|
+
PosList, PosAdd
|
45
|
+
},
|
46
|
+
data () {
|
47
|
+
return {
|
48
|
+
isChange: false,
|
49
|
+
row: null,
|
50
|
+
infoadd: true, // 判断是否显示 升级 等按钮(true/false)
|
51
|
+
batchPos: false,
|
52
|
+
f_filialeids: ''
|
53
|
+
}
|
54
|
+
},
|
55
|
+
methods: {
|
56
|
+
// 批量操作
|
57
|
+
async batchRoot(val){
|
58
|
+
let arrs = []
|
59
|
+
let alertMessage=''
|
60
|
+
let selPos = this.$refs.list.selPos
|
61
|
+
if (val==='0'){
|
62
|
+
alertMessage='停用'
|
63
|
+
for (const tmp of selPos) {
|
64
|
+
if (tmp.f_state==='正常') arrs.push(tmp)
|
65
|
+
}
|
66
|
+
} else if (val==='1'){
|
67
|
+
alertMessage='启用'
|
68
|
+
for (const tmp of selPos) {
|
69
|
+
if (tmp.f_state==='停用') arrs.push(tmp)
|
70
|
+
}
|
71
|
+
} else if(val==='2'){
|
72
|
+
alertMessage='升级'
|
73
|
+
for (const tmp of selPos) {
|
74
|
+
if (tmp.f_state==='正常') arrs.push(tmp)
|
75
|
+
}
|
76
|
+
} else {
|
77
|
+
this.showAlert('出现异常,请重新进操作')
|
78
|
+
return
|
79
|
+
}
|
80
|
+
|
81
|
+
await this.$resetpost('rs/logic/batchPos',{data: {tasks: arrs, taskState: val}}, {rejectMsg: null, resolveMsg: null})
|
82
|
+
|
83
|
+
// 需要提示
|
84
|
+
this.$showAlert(`已经开始批量${alertMessage},选择${selPos.length},其中${arrs.length}台可以正常${alertMessage},具体请留意设备情况,并刷新列表查看执行结果!`)
|
85
|
+
this.isChange = false
|
86
|
+
this.close()
|
87
|
+
},
|
88
|
+
close(){
|
89
|
+
this.batchPos = false
|
90
|
+
},
|
91
|
+
selected (obj, idx) {
|
92
|
+
console.log(obj)
|
93
|
+
if (!(obj instanceof MouseEvent)) {
|
94
|
+
if (this.$refs.list.selPos.length > 0){
|
95
|
+
this.$showMessage(`系统检测到您进行了多选,是否进行批量操作?`, ['confirm', 'cancel']).then((res) => {
|
96
|
+
if (res==='confirm'){
|
97
|
+
this.batchPos = true
|
98
|
+
} else {
|
99
|
+
this.isChange = true
|
100
|
+
this.infoadd = true
|
101
|
+
this.row = obj
|
102
|
+
}
|
103
|
+
})
|
104
|
+
|
105
|
+
}else {
|
106
|
+
this.isChange = true
|
107
|
+
this.infoadd = true
|
108
|
+
this.row = obj
|
109
|
+
}
|
110
|
+
} else {
|
111
|
+
this.$showAlert('如需新增,请点击增加按钮!', 'info', 1000)
|
112
|
+
}
|
113
|
+
}
|
114
|
+
},
|
115
|
+
events: {
|
116
|
+
'search' () {
|
117
|
+
this.infoadd=true
|
118
|
+
this.isChange = false
|
119
|
+
this.row = null
|
120
|
+
this.$refs.list.$refs.paged.$refs.cri.search()
|
121
|
+
},
|
122
|
+
'research' () {
|
123
|
+
console.log('重新查询')
|
124
|
+
this.isChange = false
|
125
|
+
this.row = null
|
126
|
+
},
|
127
|
+
'refresh' () {
|
128
|
+
this.isChange = false
|
129
|
+
this.row = null
|
130
|
+
this.$refs.list.search()
|
131
|
+
},
|
132
|
+
'error' (name, row, res) {
|
133
|
+
this.isChange = false
|
134
|
+
this.row = null
|
135
|
+
},
|
136
|
+
'close' () {
|
137
|
+
this.isChange = false
|
138
|
+
this.row = null
|
139
|
+
// this.$refs.list.search()
|
140
|
+
},
|
141
|
+
'add' (val) {
|
142
|
+
this.f_filialeids = val
|
143
|
+
this.infoadd=false
|
144
|
+
this.row = null
|
145
|
+
this.isChange = true
|
146
|
+
this.$refs.list.$refs.paged.$refs.grid.selectStore.selected = null
|
147
|
+
}
|
148
|
+
}
|
149
|
+
}
|
150
|
+
</script>
|
@@ -1,150 +1,154 @@
|
|
1
|
-
<template>
|
2
|
-
<v-select :options='resoptions' placeholder='请选择'
|
3
|
-
:value.sync="selectres"
|
4
|
-
:multiple="isMul"
|
5
|
-
search="
|
6
|
-
:close-on-select="!isMul"
|
7
|
-
@change="resChange"
|
8
|
-
>
|
9
|
-
</v-select>
|
10
|
-
</template>
|
11
|
-
<script>
|
12
|
-
import {HttpResetClass} from 'vue-client'
|
13
|
-
|
14
|
-
export default {
|
15
|
-
title: '资源选择',
|
16
|
-
props: {
|
17
|
-
|
18
|
-
//资源类型
|
19
|
-
restype:'',
|
20
|
-
//资源数据
|
21
|
-
resObj:{},
|
22
|
-
isMul: {
|
23
|
-
type: Boolean,
|
24
|
-
default: true
|
25
|
-
},
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
},
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
}
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
this.
|
123
|
-
this.
|
124
|
-
|
125
|
-
|
126
|
-
this.resoptions
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
//监听初始化资源id
|
145
|
-
'
|
146
|
-
this.dealdata()
|
147
|
-
},
|
148
|
-
|
149
|
-
|
150
|
-
|
1
|
+
<template>
|
2
|
+
<v-select :options='resoptions' placeholder='请选择'
|
3
|
+
:value.sync="selectres"
|
4
|
+
:multiple="isMul"
|
5
|
+
:search="search"
|
6
|
+
:close-on-select="!isMul"
|
7
|
+
@change="resChange"
|
8
|
+
>
|
9
|
+
</v-select>
|
10
|
+
</template>
|
11
|
+
<script>
|
12
|
+
import {HttpResetClass} from 'vue-client'
|
13
|
+
|
14
|
+
export default {
|
15
|
+
title: '资源选择',
|
16
|
+
props: {
|
17
|
+
|
18
|
+
//资源类型
|
19
|
+
restype:'',
|
20
|
+
//资源数据
|
21
|
+
resObj:{},
|
22
|
+
isMul: {
|
23
|
+
type: Boolean,
|
24
|
+
default: true
|
25
|
+
},
|
26
|
+
search:{
|
27
|
+
type: Boolean,
|
28
|
+
default: true
|
29
|
+
},
|
30
|
+
//资源初始化数据
|
31
|
+
initresid: {
|
32
|
+
type: Array,
|
33
|
+
default() { return [] },
|
34
|
+
},
|
35
|
+
//父层id
|
36
|
+
parentresid: {
|
37
|
+
type: Array,
|
38
|
+
default() { return [] },
|
39
|
+
},
|
40
|
+
},
|
41
|
+
data () {
|
42
|
+
return {
|
43
|
+
//资源数据
|
44
|
+
resObj:{},
|
45
|
+
//资源数据列表
|
46
|
+
resoptions:[],
|
47
|
+
//选中资源数据
|
48
|
+
selectres: [],
|
49
|
+
}
|
50
|
+
},
|
51
|
+
ready () {
|
52
|
+
//获取资源列表
|
53
|
+
this.getResList()
|
54
|
+
},
|
55
|
+
methods:{
|
56
|
+
//树形结构变成list
|
57
|
+
findById(val) {
|
58
|
+
if(val){
|
59
|
+
if(this.checkidres(val)){
|
60
|
+
this.treetoList(val,'')
|
61
|
+
}else if(val.children.length>0){
|
62
|
+
for (let value of val.children) {
|
63
|
+
this.findById(value)
|
64
|
+
}
|
65
|
+
}
|
66
|
+
}
|
67
|
+
},
|
68
|
+
//树形结构变成list
|
69
|
+
treetoList(val,parentname) {
|
70
|
+
for (let value of val.children) {
|
71
|
+
this.ergodicList(value,parentname)
|
72
|
+
}
|
73
|
+
},
|
74
|
+
//找到跟节点
|
75
|
+
ergodicList (val,parentname) {
|
76
|
+
if(val.children.length > 0 ){
|
77
|
+
parentname=parentname+val.name
|
78
|
+
this.treetoList(val,parentname)
|
79
|
+
}else {
|
80
|
+
//截取组织机构【组织机构】
|
81
|
+
if(this.restype=='organization'){
|
82
|
+
parentname=parentname.replace("组织机构","")
|
83
|
+
this.resoptions.push({label: val.name+' - '+parentname, value: val.id})
|
84
|
+
}else{
|
85
|
+
this.resoptions.push({label: val.name, value: val.id})
|
86
|
+
}
|
87
|
+
}
|
88
|
+
},
|
89
|
+
//检查id是否存在
|
90
|
+
checkidres(val){
|
91
|
+
let flag=false
|
92
|
+
//如果没传值得话 不过滤
|
93
|
+
if(this.parentresid.length==0&&this.restype=='organization'){
|
94
|
+
flag=true
|
95
|
+
}
|
96
|
+
this.parentresid.forEach((item) => {
|
97
|
+
if(item==val.id){
|
98
|
+
flag=true
|
99
|
+
}
|
100
|
+
})
|
101
|
+
return flag;
|
102
|
+
},
|
103
|
+
//资源改变
|
104
|
+
resChange(val){
|
105
|
+
let orgnames=[]
|
106
|
+
Object.keys(this.resoptions).forEach((key) => {
|
107
|
+
if(this.selectres.includes(this.resoptions[key].value))
|
108
|
+
orgnames.push(this.resoptions[key].label)
|
109
|
+
})
|
110
|
+
console.log('资源改变。。', val, orgnames)
|
111
|
+
this.$dispatch('res-select', this.selectres, orgnames)
|
112
|
+
},
|
113
|
+
//获取资源数据
|
114
|
+
async getResList() {
|
115
|
+
|
116
|
+
let http = new HttpResetClass()
|
117
|
+
|
118
|
+
let req = await http.load('POST', '/rs/search', {data: {
|
119
|
+
source: `tool.getFullTree(this.getRights().where(row.getType()==$${this.restype}$))`,
|
120
|
+
userid: this.$login.f.id
|
121
|
+
}}, {resolveMsg: null, rejectMsg: '获取组织结构数据出错'})
|
122
|
+
this.resObj=req.data[0]
|
123
|
+
this.dealdata()
|
124
|
+
},
|
125
|
+
dealdata(){
|
126
|
+
this.resoptions=[]
|
127
|
+
this.findById(this.resObj);
|
128
|
+
//赋值资源数据
|
129
|
+
let arryselect=[]
|
130
|
+
this.resoptions.forEach((item) => {
|
131
|
+
if(this.initresid.length>0){
|
132
|
+
this.initresid.forEach((init) => {
|
133
|
+
if(item.value==init){
|
134
|
+
arryselect.push(item.value)
|
135
|
+
}
|
136
|
+
})
|
137
|
+
}
|
138
|
+
})
|
139
|
+
//赋值资源选中初始值
|
140
|
+
this.selectres=arryselect
|
141
|
+
}
|
142
|
+
},
|
143
|
+
watch: {
|
144
|
+
//监听初始化资源id
|
145
|
+
'initresid.length'(){
|
146
|
+
this.dealdata()
|
147
|
+
},
|
148
|
+
//监听初始化资源id
|
149
|
+
'parentresid'(){
|
150
|
+
this.dealdata()
|
151
|
+
},
|
152
|
+
},
|
153
|
+
}
|
154
|
+
</script>
|