双屏机设备管理
This commit is contained in:
parent
e804ff9812
commit
e337b10466
|
|
@ -38,31 +38,31 @@ export function updateDeviceApi(data) {
|
|||
})
|
||||
}
|
||||
|
||||
// 删除设备信息
|
||||
export function deleteDeviceApi(data) {
|
||||
return request({
|
||||
url: '/smart-canteen/doubleScreenMachine/delete',
|
||||
method: 'post',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
},
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// export function deleteDeviceApi(deviceId){
|
||||
// const formData = new FormData()
|
||||
// formData.append('deviceId', deviceId)
|
||||
// // 删除设备信息
|
||||
// export function deleteDeviceApi(data) {
|
||||
// return request({
|
||||
// url: '/smart-canteen/doubleScreenMachine/delete',
|
||||
// method: 'post',
|
||||
// data: formData,
|
||||
// headers: {
|
||||
// "merchant-id":"378915229716713472",
|
||||
// },
|
||||
// header:'multipart/form-data'
|
||||
// url: '/smart-canteen/doubleScreenMachine/delete',
|
||||
// method: 'post',
|
||||
// headers: {
|
||||
// "merchant-id":"378915229716713472",
|
||||
// },
|
||||
// data: data
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
|
||||
export function deleteDeviceApi(deviceId){
|
||||
const formData = new FormData()
|
||||
formData.append('deviceId', deviceId)
|
||||
return request({
|
||||
url: '/smart-canteen/doubleScreenMachine/delete',
|
||||
method: 'post',
|
||||
data: formData,
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
},
|
||||
header:'multipart/form-data'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 获取指定日期菜谱计划菜品详情
|
||||
|
|
|
|||
|
|
@ -337,7 +337,7 @@ export default {
|
|||
let param= {
|
||||
"areaId":e,
|
||||
"canteenType":1,
|
||||
"pagenation"
|
||||
"pagenation":true
|
||||
}
|
||||
getCanteenByAreaApi(param).then((response) => {
|
||||
this.canteenOptions=response.rows||[]
|
||||
|
|
|
|||
|
|
@ -314,7 +314,20 @@
|
|||
activeName:"baseSetting",
|
||||
deviceData:{},
|
||||
// 表单参数
|
||||
baseForm: {},
|
||||
baseForm: {
|
||||
areaId:null,
|
||||
canteenId:null,
|
||||
stallId:null,
|
||||
deviceNum:"",
|
||||
deviceName:"",
|
||||
deviceSn:"",
|
||||
deviceIp:"",
|
||||
deviceKey:"",
|
||||
deviceAddr:"",
|
||||
deviceMac:"",
|
||||
deviceGateway:"",
|
||||
devicePwd:""
|
||||
},
|
||||
canteenOptions2:[],//弹窗-食堂下拉选
|
||||
stallOptions2:[],//弹窗-档口下拉选
|
||||
// 表单校验
|
||||
|
|
@ -382,18 +395,18 @@
|
|||
mounted(){
|
||||
this.getTreeData();
|
||||
if(this.$route.query.areaId){
|
||||
this.queryParams.areaId = this.$route.query.areaId+''
|
||||
this.queryParams.areaId = this.$route.query.areaId
|
||||
getCanteenByAreaApi({
|
||||
"areaId":this.queryParams.areaId,"canteenType": 1
|
||||
}).then((response) => {
|
||||
this.canteenOptions=response.rows||[]
|
||||
this.queryParams.canteenId=this.$route.query.canteenId+''
|
||||
this.queryParams.canteenId=this.$route.query.canteenId
|
||||
getStallByCanteenApi({
|
||||
canteenId:this.queryParams.canteenId
|
||||
}).then((response) => {
|
||||
this.stallOptions=response.rows||[];
|
||||
if(this.$route.query.canteenId){
|
||||
this.queryParams.stallId=this.$route.query.stallId+''
|
||||
this.queryParams.stallId=this.$route.query.stallId
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
@ -451,13 +464,13 @@
|
|||
"canteenId":this.queryParams.canteenId,
|
||||
"stallId":this.queryParams.stallId,
|
||||
"keyWord":this.queryParams.keyWord,
|
||||
"deviceType":20
|
||||
// "deviceType":20
|
||||
}
|
||||
console.log("param",param)
|
||||
let str = base64.encode(JSON.stringify(param))
|
||||
// console.log(str)
|
||||
getDeviceListPageApi({"content":str}).then(response => {
|
||||
this.tableListData = response.records;
|
||||
// let str = base64.encode(JSON.stringify(param))
|
||||
// console.log({"content":str})
|
||||
getDeviceListPageApi(param).then(response => {
|
||||
this.tableListData = response.rows;
|
||||
this.total = Number(response.total);
|
||||
this.loading = false;
|
||||
});
|
||||
|
|
@ -469,7 +482,20 @@
|
|||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.baseForm = {};
|
||||
this.baseForm = {
|
||||
areaId:null,
|
||||
canteenId:null,
|
||||
stallId:null,
|
||||
deviceNum:"",
|
||||
deviceName:"",
|
||||
deviceSn:"",
|
||||
deviceIp:"",
|
||||
deviceKey:"",
|
||||
deviceAddr:"",
|
||||
deviceMac:"",
|
||||
deviceGateway:"",
|
||||
devicePwd:""
|
||||
};
|
||||
this.resetForm("baseForm");
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
|
|
@ -489,9 +515,9 @@
|
|||
this.stallOptions2=response.rows||[]
|
||||
});
|
||||
this.baseForm = Object.assign({}, row)
|
||||
this.$set(this.baseForm,"areaId",row.areaId)
|
||||
this.$set(this.baseForm,"canteenId",row.canteenId)
|
||||
this.$set(this.baseForm,"stallId",row.stallId)
|
||||
this.$set(this.baseForm,"areaId",Number(row.areaId))
|
||||
this.$set(this.baseForm,"canteenId",Number(row.canteenId))
|
||||
this.$set(this.baseForm,"stallId",Number(row.stallId))
|
||||
// this.$set(this,"metadata",row.deviceMetadata)
|
||||
this.title = "修改";
|
||||
},
|
||||
|
|
@ -558,7 +584,7 @@
|
|||
handleDelete(row) {
|
||||
// const dictIds = row.dictId || this.ids;
|
||||
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
||||
return deleteDeviceApi({deviceId:row.deviceId});
|
||||
return deleteDeviceApi(row.deviceId);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ module.exports = {
|
|||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
target: `http://192.168.2.82:48380`,
|
||||
target: `http://192.168.2.80:48380`,
|
||||
// target: `http://192.168.0.244:58580`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue