站点管理
This commit is contained in:
@@ -24,7 +24,7 @@ export const updatePass = (Rfold, Rfnew) => post2('api/pda/updatePass', {
|
||||
export const queryArea = () => post2('api/hand/queryDevice', {})
|
||||
// export const queryArea = () => {
|
||||
// let res = {
|
||||
// result: [{region_code: '1', region_name: 'A1', deviceArr: [{device_code: '1', device_name: 'A2', input_material: '1', status: '0'}, {device_code: '2', device_name: 'fffdf', status: '1'}, {device_code: '3', device_name: 'dffsfg', status: '2'}, {device_code: '1', device_name: 'A3', input_material: '1', status: '0'}, {device_code: '2', device_name: 'fffdf', status: '1'}, {device_code: '3', device_name: 'dffsfg', status: '2'}, {device_code: '1', device_name: 'A4', input_material: '1', status: '0'}, {device_code: '2', device_name: 'fffdf', status: '1'}, {device_code: '3', device_name: 'dffsfg', status: '2'}, {device_code: '1', device_name: 'A5', input_material: '1', status: '0'}, {device_code: '2', device_name: 'fffdf', status: '1'}, {device_code: '3', device_name: 'dffsfg', status: '2'}]}, {region_code: '2', region_name: 'A6'}, {region_code: '3', region_name: 'A7'}, {region_code: '11', region_name: 'A8'}, {region_code: '12', region_name: 'A9'}, {region_code: '13', region_name: 'A10'}, {region_code: '21', region_name: 'A11'}, {region_code: '22', region_name: 'JLDFJLLJ', deviceArr: [{device_code: '1', device_name: 'A2', input_material: '1', status: '0'}, {device_code: '2', device_name: 'fffdf', status: '1'}, {device_code: '3', device_name: 'dffsfg', status: '2'}, {device_code: '1', device_name: 'A3', input_material: '1', status: '0'}, {device_code: '2', device_name: 'fffdf', status: '1'}, {device_code: '3', device_name: 'dffsfg', status: '2'}, {device_code: '1', device_name: 'A4', input_material: '1', status: '0'}, {device_code: '2', device_name: 'fffdf', status: '1'}, {device_code: '3', device_name: 'dffsfg', status: '2'}, {device_code: '1', device_name: 'A5', input_material: '1', status: '0'}, {device_code: '2', device_name: 'fffdf', status: '1'}, {device_code: '3', device_name: 'dffsfg', status: '2'}]}]
|
||||
// result: {regionja: [{region_code: '1', region_name: 'A1', deviceArr: [{device_code: '1', device_name: 'AA1', input_material: '1', status: '0'}, {device_code: '2', device_name: 'AA2', status: '1'}, {device_code: '3', device_name: 'AA3', status: '2'}]}]}
|
||||
// }
|
||||
// return res
|
||||
// }
|
||||
@@ -42,7 +42,7 @@ export const queryPointByArea = (code) => post2('api/hand/queryPointByArea', {
|
||||
export const queryMaterial = () => post2('api/hand/queryMaterial', {})
|
||||
// 1.4点位状态绑定
|
||||
export const bindpoint = (code, mtype, type, status) => post2('api/hand/bindpoint', {
|
||||
device_code: code,
|
||||
device_codes: code,
|
||||
material_type: mtype,
|
||||
type: type,
|
||||
status: status
|
||||
|
||||
@@ -66,7 +66,8 @@ export default {
|
||||
areaArr: [],
|
||||
disabled1: false,
|
||||
scodeArr: [],
|
||||
scodenameArr: []
|
||||
scodenameArr: [],
|
||||
scodeoArr: []
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
@@ -88,12 +89,21 @@ export default {
|
||||
this.areaArr = [...res.result.regionja]
|
||||
},
|
||||
setInfo (e) {
|
||||
this.scodeArr.push(e.device_code)
|
||||
this.scodenameArr.push(e.device_name)
|
||||
let arr = this.scodeoArr.filter(el => { return e.device_code === el.device_code })
|
||||
if (this.scodeoArr.length === 0) {
|
||||
this.scodeoArr.push({device_code: e.device_code})
|
||||
this.scodeArr.push(e.device_code)
|
||||
this.scodenameArr.push(e.device_name)
|
||||
} else if (this.scodeoArr.length > 0 && arr.length === 0) {
|
||||
this.scodeoArr.push({device_code: e.device_code})
|
||||
this.scodeArr.push(e.device_code)
|
||||
this.scodenameArr.push(e.device_name)
|
||||
}
|
||||
},
|
||||
/** 清空点位选择 */
|
||||
cancle () {
|
||||
this.scodeArr = []
|
||||
this.scodeoArr = []
|
||||
this.scodenameArr = []
|
||||
this.disabled1 = false
|
||||
},
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</div>
|
||||
<div class="menu">
|
||||
<ul>
|
||||
<!-- <li @click="goInner('/SiteManage')">站点管理</li> -->
|
||||
<li @click="goInner('/SiteManage')">站点管理</li>
|
||||
<li @click="goInner('/CallManage')">呼叫管理</li>
|
||||
<li @click="goInner('/ZlManage')">指令管理</li>
|
||||
<li @click="goInner('/TaskManage')">任务管理</li>
|
||||
|
||||
@@ -34,12 +34,23 @@
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="submit-bar">
|
||||
<div class="dot_item">
|
||||
<p class="p1">设备号</p>
|
||||
<p class="p2">{{scodenameArr.toString()}}</p>
|
||||
</div>
|
||||
<div class="btn_block">
|
||||
<button class="btn btn1" :class="{'btn-disabled': scodeArr.length === 0}" @click="cancle">清 空</button>
|
||||
<button class="btn btn1" :class="{'btn-disabled': scodeArr.length === 0}" @click="toSure">确 认</button>
|
||||
</div>
|
||||
</section>
|
||||
<div v-if="active" class="msg_wrapper">
|
||||
<div class="msg_box">
|
||||
<div class="msg_item">
|
||||
<div class="label_item">当前设备</div>
|
||||
<div class="from_item">
|
||||
{{obj.device_name}}
|
||||
<!-- {{obj.device_name}} -->
|
||||
{{scodenameArr.toString()}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="msg_item">
|
||||
@@ -84,7 +95,10 @@ export default {
|
||||
value: '',
|
||||
obj: {},
|
||||
disabled1: false,
|
||||
disabled2: false
|
||||
disabled2: false,
|
||||
scodeArr: [],
|
||||
scodenameArr: [],
|
||||
scodeoArr: []
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
@@ -111,11 +125,32 @@ export default {
|
||||
this.options = [...res.result]
|
||||
},
|
||||
setInfo (e) {
|
||||
if (e.input_material === '1') {
|
||||
this.active = true
|
||||
this.obj = e
|
||||
this.value = e.material_type
|
||||
if (e.input_material !== '1') {
|
||||
return
|
||||
}
|
||||
let arr = this.scodeoArr.filter(el => { return e.device_code === el.device_code })
|
||||
if (this.scodeoArr.length === 0) {
|
||||
this.scodeoArr.push({device_code: e.device_code})
|
||||
this.scodeArr.push(e.device_code)
|
||||
this.scodenameArr.push(e.device_name)
|
||||
} else if (this.scodeoArr.length > 0 && arr.length === 0) {
|
||||
this.scodeoArr.push({device_code: e.device_code})
|
||||
this.scodeArr.push(e.device_code)
|
||||
this.scodenameArr.push(e.device_name)
|
||||
}
|
||||
// if (e.input_material === '1') {
|
||||
// this.active = true
|
||||
// this.obj = e
|
||||
// this.value = e.material_type
|
||||
// }
|
||||
},
|
||||
cancle () {
|
||||
this.scodeArr = []
|
||||
this.scodeoArr = []
|
||||
this.scodenameArr = []
|
||||
},
|
||||
toSure () {
|
||||
this.active = true
|
||||
},
|
||||
msgCancle () {
|
||||
this.active = false
|
||||
@@ -124,12 +159,12 @@ export default {
|
||||
},
|
||||
msgSure () {
|
||||
this.disabled2 = true
|
||||
this.handStatus(this.obj.device_code, this.value, '1', this.obj.status)
|
||||
this.handStatus(this.scodeArr, this.value, '1', this.obj.status)
|
||||
this.active = false
|
||||
},
|
||||
cleanUp () {
|
||||
this.disabled1 = true
|
||||
this.handStatus(this.obj.device_code, this.value, '2', this.obj.status)
|
||||
this.handStatus(this.scodeArr, this.value, '2', this.obj.status)
|
||||
this.active = false
|
||||
},
|
||||
async handStatus (code, mtype, type, no) {
|
||||
@@ -142,18 +177,21 @@ export default {
|
||||
this.initArea()
|
||||
this.refresh()
|
||||
this.value = ''
|
||||
this.cancle()
|
||||
this.disabled1 = false
|
||||
this.disabled2 = false
|
||||
}, 2000)
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
this.value = ''
|
||||
this.cancle()
|
||||
this.disabled1 = false
|
||||
this.disabled2 = false
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
this.value = ''
|
||||
this.cancle()
|
||||
this.disabled1 = false
|
||||
this.disabled2 = false
|
||||
}
|
||||
@@ -231,32 +269,9 @@ export default {
|
||||
background-color $green
|
||||
.orange
|
||||
background-color orange
|
||||
.submit-bar
|
||||
height 1.6rem
|
||||
padding .1rem
|
||||
.dot_item
|
||||
width 35%
|
||||
background-color #e5e5e5
|
||||
.p1
|
||||
display block
|
||||
height .6rem
|
||||
_font(.15rem,.6rem,,,center)
|
||||
border-bottom .01rem solid #fff
|
||||
overflow hidden
|
||||
.p2
|
||||
display block
|
||||
height .8rem
|
||||
padding 0 .05rem
|
||||
_font(.15rem,.8rem,,,center)
|
||||
overflow hidden
|
||||
.btn_block
|
||||
_wh(20%, 1.4rem)
|
||||
_fj()
|
||||
flex-direction column
|
||||
.btn1
|
||||
width 100%
|
||||
.content
|
||||
height calc(100% - 55px)
|
||||
height calc(100% - 220px)
|
||||
overflow-y scroll
|
||||
.msg_item_flex_2
|
||||
width 100%
|
||||
_fj()
|
||||
@@ -264,4 +279,32 @@ export default {
|
||||
width calc(50% - .1rem)
|
||||
.from_item
|
||||
border-bottom 1px solid #dcdfe6
|
||||
.submit-bar
|
||||
height 160px
|
||||
padding 10px
|
||||
.dot_item
|
||||
width 60%
|
||||
background-color #e5e5e5
|
||||
.p1
|
||||
display block
|
||||
height 60px
|
||||
_font(15px,60px,,,center)
|
||||
border-bottom 1px solid #fff
|
||||
overflow hidden
|
||||
.p2
|
||||
_fj(center)
|
||||
height 80px
|
||||
padding 0 5px
|
||||
_font(15px,20px,,,center)
|
||||
word-break: break-all;
|
||||
overflow hidden
|
||||
.btn_block
|
||||
_wh(20%, 140px)
|
||||
_fj()
|
||||
flex-direction column
|
||||
.btn
|
||||
font-size 16px
|
||||
line-height 60px
|
||||
.btn1
|
||||
width 100%
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user