diff --git a/pages/manage/call-manage.vue b/pages/manage/call-manage.vue
index 352b88a..dcdbd36 100644
--- a/pages/manage/call-manage.vue
+++ b/pages/manage/call-manage.vue
@@ -1,70 +1,27 @@
-
{{$t('call.sp')}}
-
-
- {{e.device_code}}
-
+
{{$t('call.ep')}}
-
-
- {{e.device_code}}
-
-
-
-
-
-
-
- {{e.en_region_name}}
- {{e.ko_region_name}}
- {{e.region_name}}
-
-
-
-
-
- {{el.en_device_name}}
- {{el.ko_device_name}}
- {{el.device_name}}
- {{el.device_code}}
-
-
+
-
-
+
-
-
-
-
-
- {{$t('call.sp')}}
- {{$t('call.ep')}}
-
-
-
@@ -78,151 +35,20 @@
data() {
return {
title: '',
- areaArr: [],
- pointArr: [],
- pkId: '',
disabled: false,
- code: '',
- sCode: '',
- nCode: '',
- show: false,
- distanceToTop: -300,
- distanceToLeft: -300,
- windowHeight: '',
- popHeight: '',
- filteredData: [],
- filterNo: '',
- popup: false
+ sCode: 'QFQ_2',
+ nCode: 'QFQ_4'
};
},
onLoad (options) {
this.title = options.title
- uni.getSystemInfo({
- success: (info) => {
- this.windowHeight = info.windowHeight
- }
- })
- },
- onReady () {
- const query = uni.createSelectorQuery().in(this)
- query
- .select('.pop_point_content')
- .boundingClientRect(data => {
- this.popHeight = data.height
- }).exec()
- },
- created () {
- this.initArea()
},
methods: {
- matchData (no) {
- this.filterNo = no
- let query = ''
- switch (no) {
- case 1:
- query = this.sCode.toLowerCase()
- break
- case 2:
- query = this.nCode.toLowerCase()
- break
- default:
- break
- }
- if (!query) {
- this.filteredData = []
- return
- }
- this.filteredData = this.pointArr.filter(item => {
- return item.device_code.toLowerCase().includes(query)
- })
- },
- async initArea () {
- let res = await queryArea()
- this.areaArr = [...res.data]
- if (this.areaArr.length > 0) {
- this.pkId = this.areaArr[0].region_code
- this.initPonit()
- }
- },
- getPonit (e) {
- this.pkId = this.pkId === e.region_code ? '' : e.region_code
- if (this.pkId) {
- this.initPonit()
- }
- },
- async initPonit () {
- let res = await queryPointByArea(this.pkId)
- this.pointArr = [...res.data]
- },
- setcode (el,index) {
- const query = uni.createSelectorQuery().in(this)
- query
- .select(`#site_item_box_${index}`)
- .boundingClientRect(data => {
- if (data) {
- this.distanceToTop = data.top + (data.height / 2) - 9
- this.distanceToLeft = data.left
- console.log(this.popHeight)
- if ((this.windowHeight - this.distanceToTop) < (this.popHeight + 20)) {
- this.popup = true
- } else {
- this.popup = false
- }
- }
- }).exec()
- this.show = true
- this.code = el.device_code
- },
- colsePop () {
- this.show = !this.show
- if (!this.show) {
- this.distanceToTop = -300
- this.distanceToLeft = -300
- }
- },
- popCode (code) {
- switch (code) {
- case 1:
- this.sCode = this.code
- break
- case 2:
- this.nCode = this.code
- break
- default:
- break
- }
- this.colsePop()
- },
- /** 清空点位选择 */
- cancle () {
- this.sCode = ''
- this.nCode = ''
- this.disabled = false
- },
async _callTask (type) {
this.disabled = true
- if (this.sCode === '' || this.nCode === '') {
- this.disabled = false
- return
- }
- if (this.sCode === this.nCode) {
- uni.showToast({
- // title: '任务起点终点不能相同',
- title: this.$t('call.toast'),
- icon: 'none'
- })
- this.disabled = false
- return
- }
try {
let res = await callTask(this.sCode, this.nCode, type)
- this.cancle()
- clearInterval(this.timer)
- this.timer = null
- setTimeout(() => {
- this.refresh()
- this.cancle()
- }, 2000)
+ this.disabled = false
uni.showToast({
title: res.desc,
icon: 'none'
diff --git a/pages/manage/call-manage_back.vue b/pages/manage/call-manage_back.vue
new file mode 100644
index 0000000..352b88a
--- /dev/null
+++ b/pages/manage/call-manage_back.vue
@@ -0,0 +1,246 @@
+
+
+
+
+
+
+
+
+ {{$t('call.sp')}}
+
+
+
+ {{e.device_code}}
+
+
+
+
+
+ {{$t('call.ep')}}
+
+
+
+ {{e.device_code}}
+
+
+
+
+
+
+
+ {{e.en_region_name}}
+ {{e.ko_region_name}}
+ {{e.region_name}}
+
+
+
+
+
+ {{el.en_device_name}}
+ {{el.ko_device_name}}
+ {{el.device_name}}
+ {{el.device_code}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{$t('call.sp')}}
+ {{$t('call.ep')}}
+
+
+
+
+
+
+
+
+