Merge remote-tracking branch 'origin/dev-nwcc' into dev-nwcc

This commit is contained in:
liang.chao 2024-07-26 15:14:14 +08:00
commit 9b4d6ab400
3 changed files with 29 additions and 4 deletions

View File

@ -0,0 +1,6 @@
import request from '@/utils/request'
// 推送设备
export const pushNotificationsApi = (data) => {
return request.post('/base/machine/pushNotifications', data)
}

View File

@ -542,6 +542,7 @@ import {
supplierInfoList,
getListByMaType,
} from '@/api/store/tools'
import { pushNotificationsApi } from '@/api/dataPush' //
import { getProLists } from '@/api/base/base'
import { imgUpLoad } from '@/api/system/upload'
import { getTypeList } from '@/api/store/warehousing'
@ -755,7 +756,8 @@ export default {
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.maId)
// this.ids = selection.map((item) => item.maId)
this.ids = selection
// this.single = selection.length != 1
// this.multiple = !selection.length
},
@ -839,9 +841,26 @@ export default {
handlePush() {
this.$modal
.confirm('是否确认推送所选择的数据项?')
.then(() => {
.then(async () => {
console.log('推送', this.ids)
// this.$message.success('')
const deviceInfoList = this.ids.map((e) => {
const deviceInfo = {
itemType: e.itemType, //
deviceType: e.deviceType, //
specificationType: e.specificationType, //
maCode: e.maCode, //
maId: e.maId, // Id
typeId: e.typeId, // typeId
}
return deviceInfo
})
const res = await pushNotificationsApi(deviceInfoList)
if (res.code == 200) {
this.$message.success('推送成功!')
this.getList()
}
})
.catch(() => {
this.$message.info('已取消推送')

View File

@ -42,11 +42,11 @@ module.exports = {
// target: `https://test-cc.zhgkxt.com`,//线上环境-南网
// target: `https://z.csgmall.com.cn`,
target: `http://192.168.2.134:48080`, //超
// target: `http://192.168.2.134:48080`, //超
// target: `http://10.40.92.81:8080`, //韩/
// target: `http://192.168.2.81:28080`,//旭/
// target: `http://192.168.2.248:28080`, //帅
// target: `http://10.40.92.253:28080`, //福
target: `http://192.168.2.240:28080`, //福
//******** 注意事项 ********* */
//1.全局替换qrUrl二维码扫码提供的网址-发布服务器的地址target;