diff --git a/src/api/product/category.js b/src/api/product/category.js index aea97c7..d655a11 100644 --- a/src/api/product/category.js +++ b/src/api/product/category.js @@ -69,7 +69,8 @@ return request({ url: '/categoryInfo/listExport', method: 'post', - data + data, + responseType: 'blob' }) } diff --git a/src/api/product/category.js b/src/api/product/category.js index aea97c7..d655a11 100644 --- a/src/api/product/category.js +++ b/src/api/product/category.js @@ -69,7 +69,8 @@ return request({ url: '/categoryInfo/listExport', method: 'post', - data + data, + responseType: 'blob' }) } diff --git a/src/api/product/device.js b/src/api/product/device.js index e5b8b02..ccfa5cf 100644 --- a/src/api/product/device.js +++ b/src/api/product/device.js @@ -22,7 +22,7 @@ // 设备列表导出 const d_listExport = (data) => { - return instance.post('/deviceInfo/listExport', data) + return instance.post('/deviceInfo/listExport', data, { responseType: 'blob' }) } // 统计:累计激活设备数、今日设备在线数、今日设备在线率 diff --git a/src/api/product/category.js b/src/api/product/category.js index aea97c7..d655a11 100644 --- a/src/api/product/category.js +++ b/src/api/product/category.js @@ -69,7 +69,8 @@ return request({ url: '/categoryInfo/listExport', method: 'post', - data + data, + responseType: 'blob' }) } diff --git a/src/api/product/device.js b/src/api/product/device.js index e5b8b02..ccfa5cf 100644 --- a/src/api/product/device.js +++ b/src/api/product/device.js @@ -22,7 +22,7 @@ // 设备列表导出 const d_listExport = (data) => { - return instance.post('/deviceInfo/listExport', data) + return instance.post('/deviceInfo/listExport', data, { responseType: 'blob' }) } // 统计:累计激活设备数、今日设备在线数、今日设备在线率 diff --git a/src/api/product/product.js b/src/api/product/product.js index e4b9db1..beda1b5 100644 --- a/src/api/product/product.js +++ b/src/api/product/product.js @@ -29,5 +29,13 @@ const productDetail = (data) => { return instance.post('/productInfo/detail', data) } +// 绑定服务. +const bindServ = (data)=>{ + return instance.post('/productInfo/service/bind', data) +} +// 查询绑定列表 +const listBindService = (data)=>{ + return instance.post('productInfo/service/bindList', data) +} -export { listPage, add, update, productDelete, batchDelete, list, productDetail } +export { listPage, add, update, productDelete, batchDelete, list, productDetail, bindServ, listBindService } diff --git a/src/api/product/category.js b/src/api/product/category.js index aea97c7..d655a11 100644 --- a/src/api/product/category.js +++ b/src/api/product/category.js @@ -69,7 +69,8 @@ return request({ url: '/categoryInfo/listExport', method: 'post', - data + data, + responseType: 'blob' }) } diff --git a/src/api/product/device.js b/src/api/product/device.js index e5b8b02..ccfa5cf 100644 --- a/src/api/product/device.js +++ b/src/api/product/device.js @@ -22,7 +22,7 @@ // 设备列表导出 const d_listExport = (data) => { - return instance.post('/deviceInfo/listExport', data) + return instance.post('/deviceInfo/listExport', data, { responseType: 'blob' }) } // 统计:累计激活设备数、今日设备在线数、今日设备在线率 diff --git a/src/api/product/product.js b/src/api/product/product.js index e4b9db1..beda1b5 100644 --- a/src/api/product/product.js +++ b/src/api/product/product.js @@ -29,5 +29,13 @@ const productDetail = (data) => { return instance.post('/productInfo/detail', data) } +// 绑定服务. +const bindServ = (data)=>{ + return instance.post('/productInfo/service/bind', data) +} +// 查询绑定列表 +const listBindService = (data)=>{ + return instance.post('productInfo/service/bindList', data) +} -export { listPage, add, update, productDelete, batchDelete, list, productDetail } +export { listPage, add, update, productDelete, batchDelete, list, productDetail, bindServ, listBindService } diff --git a/src/api/product/snCodeField.js b/src/api/product/snCodeField.js index 2d006a9..1f31976 100644 --- a/src/api/product/snCodeField.js +++ b/src/api/product/snCodeField.js @@ -19,7 +19,7 @@ // 导出 const SN_listExport = (data) => { - return instance.post(`snInfo/listExport`, data) + return instance.post(`snInfo/listExport`, data, { responseType: 'blob' }) } export { SN_listExport, SN_batchDelete, SN_listPage, SN_delete, SN_add } diff --git a/src/api/product/category.js b/src/api/product/category.js index aea97c7..d655a11 100644 --- a/src/api/product/category.js +++ b/src/api/product/category.js @@ -69,7 +69,8 @@ return request({ url: '/categoryInfo/listExport', method: 'post', - data + data, + responseType: 'blob' }) } diff --git a/src/api/product/device.js b/src/api/product/device.js index e5b8b02..ccfa5cf 100644 --- a/src/api/product/device.js +++ b/src/api/product/device.js @@ -22,7 +22,7 @@ // 设备列表导出 const d_listExport = (data) => { - return instance.post('/deviceInfo/listExport', data) + return instance.post('/deviceInfo/listExport', data, { responseType: 'blob' }) } // 统计:累计激活设备数、今日设备在线数、今日设备在线率 diff --git a/src/api/product/product.js b/src/api/product/product.js index e4b9db1..beda1b5 100644 --- a/src/api/product/product.js +++ b/src/api/product/product.js @@ -29,5 +29,13 @@ const productDetail = (data) => { return instance.post('/productInfo/detail', data) } +// 绑定服务. +const bindServ = (data)=>{ + return instance.post('/productInfo/service/bind', data) +} +// 查询绑定列表 +const listBindService = (data)=>{ + return instance.post('productInfo/service/bindList', data) +} -export { listPage, add, update, productDelete, batchDelete, list, productDetail } +export { listPage, add, update, productDelete, batchDelete, list, productDetail, bindServ, listBindService } diff --git a/src/api/product/snCodeField.js b/src/api/product/snCodeField.js index 2d006a9..1f31976 100644 --- a/src/api/product/snCodeField.js +++ b/src/api/product/snCodeField.js @@ -19,7 +19,7 @@ // 导出 const SN_listExport = (data) => { - return instance.post(`snInfo/listExport`, data) + return instance.post(`snInfo/listExport`, data, { responseType: 'blob' }) } export { SN_listExport, SN_batchDelete, SN_listPage, SN_delete, SN_add } diff --git a/src/api/request/http.js b/src/api/request/http.js index 9a49dc5..a7f20d1 100644 --- a/src/api/request/http.js +++ b/src/api/request/http.js @@ -43,7 +43,7 @@ console.log('err ============') // 对于请求报错进行处理 Message.error(err.message) - return '' - // return Promise.reject(err) + // return '' + return Promise.reject(err) }) export { instance } diff --git a/src/api/product/category.js b/src/api/product/category.js index aea97c7..d655a11 100644 --- a/src/api/product/category.js +++ b/src/api/product/category.js @@ -69,7 +69,8 @@ return request({ url: '/categoryInfo/listExport', method: 'post', - data + data, + responseType: 'blob' }) } diff --git a/src/api/product/device.js b/src/api/product/device.js index e5b8b02..ccfa5cf 100644 --- a/src/api/product/device.js +++ b/src/api/product/device.js @@ -22,7 +22,7 @@ // 设备列表导出 const d_listExport = (data) => { - return instance.post('/deviceInfo/listExport', data) + return instance.post('/deviceInfo/listExport', data, { responseType: 'blob' }) } // 统计:累计激活设备数、今日设备在线数、今日设备在线率 diff --git a/src/api/product/product.js b/src/api/product/product.js index e4b9db1..beda1b5 100644 --- a/src/api/product/product.js +++ b/src/api/product/product.js @@ -29,5 +29,13 @@ const productDetail = (data) => { return instance.post('/productInfo/detail', data) } +// 绑定服务. +const bindServ = (data)=>{ + return instance.post('/productInfo/service/bind', data) +} +// 查询绑定列表 +const listBindService = (data)=>{ + return instance.post('productInfo/service/bindList', data) +} -export { listPage, add, update, productDelete, batchDelete, list, productDetail } +export { listPage, add, update, productDelete, batchDelete, list, productDetail, bindServ, listBindService } diff --git a/src/api/product/snCodeField.js b/src/api/product/snCodeField.js index 2d006a9..1f31976 100644 --- a/src/api/product/snCodeField.js +++ b/src/api/product/snCodeField.js @@ -19,7 +19,7 @@ // 导出 const SN_listExport = (data) => { - return instance.post(`snInfo/listExport`, data) + return instance.post(`snInfo/listExport`, data, { responseType: 'blob' }) } export { SN_listExport, SN_batchDelete, SN_listPage, SN_delete, SN_add } diff --git a/src/api/request/http.js b/src/api/request/http.js index 9a49dc5..a7f20d1 100644 --- a/src/api/request/http.js +++ b/src/api/request/http.js @@ -43,7 +43,7 @@ console.log('err ============') // 对于请求报错进行处理 Message.error(err.message) - return '' - // return Promise.reject(err) + // return '' + return Promise.reject(err) }) export { instance } diff --git a/src/api/server/operation.js b/src/api/server/operation.js index 25eb67a..404b354 100644 --- a/src/api/server/operation.js +++ b/src/api/server/operation.js @@ -1 +1,31 @@ import { instance } from '../request/http' +// 暂时无接口 +// 列表 +const listPage = (str, data) => { + return instance.post(`/serviceInfo/listPage?${str}`, data) +} +// 服务不分页 +const O_list = () => { + return instance.post(`/serviceInfo/list`, {}) +} +const O_add = (data) => { + return instance.post('/serviceInfo/add', data) +} +// 更新 +const O_update = (data) => { + return instance.post('/serviceInfo/update', data) +} +// 删除 +const O_delete = (data) => { + return instance.post('/serviceInfo/delete', data) +} +// 批量删除 +const O_batchDelete = (data) => { + return instance.post('/serviceInfo/batchDelete', data) +} + +export { + O_update, + O_batchDelete, O_delete, O_add, listPage + , O_list +} diff --git a/src/api/product/category.js b/src/api/product/category.js index aea97c7..d655a11 100644 --- a/src/api/product/category.js +++ b/src/api/product/category.js @@ -69,7 +69,8 @@ return request({ url: '/categoryInfo/listExport', method: 'post', - data + data, + responseType: 'blob' }) } diff --git a/src/api/product/device.js b/src/api/product/device.js index e5b8b02..ccfa5cf 100644 --- a/src/api/product/device.js +++ b/src/api/product/device.js @@ -22,7 +22,7 @@ // 设备列表导出 const d_listExport = (data) => { - return instance.post('/deviceInfo/listExport', data) + return instance.post('/deviceInfo/listExport', data, { responseType: 'blob' }) } // 统计:累计激活设备数、今日设备在线数、今日设备在线率 diff --git a/src/api/product/product.js b/src/api/product/product.js index e4b9db1..beda1b5 100644 --- a/src/api/product/product.js +++ b/src/api/product/product.js @@ -29,5 +29,13 @@ const productDetail = (data) => { return instance.post('/productInfo/detail', data) } +// 绑定服务. +const bindServ = (data)=>{ + return instance.post('/productInfo/service/bind', data) +} +// 查询绑定列表 +const listBindService = (data)=>{ + return instance.post('productInfo/service/bindList', data) +} -export { listPage, add, update, productDelete, batchDelete, list, productDetail } +export { listPage, add, update, productDelete, batchDelete, list, productDetail, bindServ, listBindService } diff --git a/src/api/product/snCodeField.js b/src/api/product/snCodeField.js index 2d006a9..1f31976 100644 --- a/src/api/product/snCodeField.js +++ b/src/api/product/snCodeField.js @@ -19,7 +19,7 @@ // 导出 const SN_listExport = (data) => { - return instance.post(`snInfo/listExport`, data) + return instance.post(`snInfo/listExport`, data, { responseType: 'blob' }) } export { SN_listExport, SN_batchDelete, SN_listPage, SN_delete, SN_add } diff --git a/src/api/request/http.js b/src/api/request/http.js index 9a49dc5..a7f20d1 100644 --- a/src/api/request/http.js +++ b/src/api/request/http.js @@ -43,7 +43,7 @@ console.log('err ============') // 对于请求报错进行处理 Message.error(err.message) - return '' - // return Promise.reject(err) + // return '' + return Promise.reject(err) }) export { instance } diff --git a/src/api/server/operation.js b/src/api/server/operation.js index 25eb67a..404b354 100644 --- a/src/api/server/operation.js +++ b/src/api/server/operation.js @@ -1 +1,31 @@ import { instance } from '../request/http' +// 暂时无接口 +// 列表 +const listPage = (str, data) => { + return instance.post(`/serviceInfo/listPage?${str}`, data) +} +// 服务不分页 +const O_list = () => { + return instance.post(`/serviceInfo/list`, {}) +} +const O_add = (data) => { + return instance.post('/serviceInfo/add', data) +} +// 更新 +const O_update = (data) => { + return instance.post('/serviceInfo/update', data) +} +// 删除 +const O_delete = (data) => { + return instance.post('/serviceInfo/delete', data) +} +// 批量删除 +const O_batchDelete = (data) => { + return instance.post('/serviceInfo/batchDelete', data) +} + +export { + O_update, + O_batchDelete, O_delete, O_add, listPage + , O_list +} diff --git a/src/components/guadMap/index.vue b/src/components/guadMap/index.vue index 6a0fd56..a68977e 100644 --- a/src/components/guadMap/index.vue +++ b/src/components/guadMap/index.vue @@ -89,29 +89,29 @@ fetchPositionData() { getDevicePosition() .then((res) => { - // this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 - this.deviceList = [ - { - deviceName: "燃气灶", - lat: "39.97", - lon: "116.3", - }, - { - deviceName: "燃气灶", - lat: "39.93", - lon: "116.15", - }, - { - deviceName: "燃气灶", - lat: "39.8", - lon: "116.22", - }, - { - deviceName: "燃气灶", - lat: "39.74", - lon: "116.33", - }, - ]; + this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 + // this.deviceList = [ + // { + // deviceName: "燃气灶", + // lat: "39.97", + // lon: "116.3", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.93", + // lon: "116.15", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.8", + // lon: "116.22", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.74", + // lon: "116.33", + // }, + // ]; // 初始化地图 this.initMap(); }) diff --git a/src/api/product/category.js b/src/api/product/category.js index aea97c7..d655a11 100644 --- a/src/api/product/category.js +++ b/src/api/product/category.js @@ -69,7 +69,8 @@ return request({ url: '/categoryInfo/listExport', method: 'post', - data + data, + responseType: 'blob' }) } diff --git a/src/api/product/device.js b/src/api/product/device.js index e5b8b02..ccfa5cf 100644 --- a/src/api/product/device.js +++ b/src/api/product/device.js @@ -22,7 +22,7 @@ // 设备列表导出 const d_listExport = (data) => { - return instance.post('/deviceInfo/listExport', data) + return instance.post('/deviceInfo/listExport', data, { responseType: 'blob' }) } // 统计:累计激活设备数、今日设备在线数、今日设备在线率 diff --git a/src/api/product/product.js b/src/api/product/product.js index e4b9db1..beda1b5 100644 --- a/src/api/product/product.js +++ b/src/api/product/product.js @@ -29,5 +29,13 @@ const productDetail = (data) => { return instance.post('/productInfo/detail', data) } +// 绑定服务. +const bindServ = (data)=>{ + return instance.post('/productInfo/service/bind', data) +} +// 查询绑定列表 +const listBindService = (data)=>{ + return instance.post('productInfo/service/bindList', data) +} -export { listPage, add, update, productDelete, batchDelete, list, productDetail } +export { listPage, add, update, productDelete, batchDelete, list, productDetail, bindServ, listBindService } diff --git a/src/api/product/snCodeField.js b/src/api/product/snCodeField.js index 2d006a9..1f31976 100644 --- a/src/api/product/snCodeField.js +++ b/src/api/product/snCodeField.js @@ -19,7 +19,7 @@ // 导出 const SN_listExport = (data) => { - return instance.post(`snInfo/listExport`, data) + return instance.post(`snInfo/listExport`, data, { responseType: 'blob' }) } export { SN_listExport, SN_batchDelete, SN_listPage, SN_delete, SN_add } diff --git a/src/api/request/http.js b/src/api/request/http.js index 9a49dc5..a7f20d1 100644 --- a/src/api/request/http.js +++ b/src/api/request/http.js @@ -43,7 +43,7 @@ console.log('err ============') // 对于请求报错进行处理 Message.error(err.message) - return '' - // return Promise.reject(err) + // return '' + return Promise.reject(err) }) export { instance } diff --git a/src/api/server/operation.js b/src/api/server/operation.js index 25eb67a..404b354 100644 --- a/src/api/server/operation.js +++ b/src/api/server/operation.js @@ -1 +1,31 @@ import { instance } from '../request/http' +// 暂时无接口 +// 列表 +const listPage = (str, data) => { + return instance.post(`/serviceInfo/listPage?${str}`, data) +} +// 服务不分页 +const O_list = () => { + return instance.post(`/serviceInfo/list`, {}) +} +const O_add = (data) => { + return instance.post('/serviceInfo/add', data) +} +// 更新 +const O_update = (data) => { + return instance.post('/serviceInfo/update', data) +} +// 删除 +const O_delete = (data) => { + return instance.post('/serviceInfo/delete', data) +} +// 批量删除 +const O_batchDelete = (data) => { + return instance.post('/serviceInfo/batchDelete', data) +} + +export { + O_update, + O_batchDelete, O_delete, O_add, listPage + , O_list +} diff --git a/src/components/guadMap/index.vue b/src/components/guadMap/index.vue index 6a0fd56..a68977e 100644 --- a/src/components/guadMap/index.vue +++ b/src/components/guadMap/index.vue @@ -89,29 +89,29 @@ fetchPositionData() { getDevicePosition() .then((res) => { - // this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 - this.deviceList = [ - { - deviceName: "燃气灶", - lat: "39.97", - lon: "116.3", - }, - { - deviceName: "燃气灶", - lat: "39.93", - lon: "116.15", - }, - { - deviceName: "燃气灶", - lat: "39.8", - lon: "116.22", - }, - { - deviceName: "燃气灶", - lat: "39.74", - lon: "116.33", - }, - ]; + this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 + // this.deviceList = [ + // { + // deviceName: "燃气灶", + // lat: "39.97", + // lon: "116.3", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.93", + // lon: "116.15", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.8", + // lon: "116.22", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.74", + // lon: "116.33", + // }, + // ]; // 初始化地图 this.initMap(); }) diff --git a/src/components/mycomponent/dialog/categoryAddDialog.vue b/src/components/mycomponent/dialog/categoryAddDialog.vue index c47e73c..d06f821 100644 --- a/src/components/mycomponent/dialog/categoryAddDialog.vue +++ b/src/components/mycomponent/dialog/categoryAddDialog.vue @@ -200,7 +200,6 @@ }, save() { this.$refs['dataForm'].validate((valid) => { - console.log(this.deptForm) if (valid) { if (this.title === '品类新增') { C_add(this.categoryInfo).then(res => { diff --git a/src/api/product/category.js b/src/api/product/category.js index aea97c7..d655a11 100644 --- a/src/api/product/category.js +++ b/src/api/product/category.js @@ -69,7 +69,8 @@ return request({ url: '/categoryInfo/listExport', method: 'post', - data + data, + responseType: 'blob' }) } diff --git a/src/api/product/device.js b/src/api/product/device.js index e5b8b02..ccfa5cf 100644 --- a/src/api/product/device.js +++ b/src/api/product/device.js @@ -22,7 +22,7 @@ // 设备列表导出 const d_listExport = (data) => { - return instance.post('/deviceInfo/listExport', data) + return instance.post('/deviceInfo/listExport', data, { responseType: 'blob' }) } // 统计:累计激活设备数、今日设备在线数、今日设备在线率 diff --git a/src/api/product/product.js b/src/api/product/product.js index e4b9db1..beda1b5 100644 --- a/src/api/product/product.js +++ b/src/api/product/product.js @@ -29,5 +29,13 @@ const productDetail = (data) => { return instance.post('/productInfo/detail', data) } +// 绑定服务. +const bindServ = (data)=>{ + return instance.post('/productInfo/service/bind', data) +} +// 查询绑定列表 +const listBindService = (data)=>{ + return instance.post('productInfo/service/bindList', data) +} -export { listPage, add, update, productDelete, batchDelete, list, productDetail } +export { listPage, add, update, productDelete, batchDelete, list, productDetail, bindServ, listBindService } diff --git a/src/api/product/snCodeField.js b/src/api/product/snCodeField.js index 2d006a9..1f31976 100644 --- a/src/api/product/snCodeField.js +++ b/src/api/product/snCodeField.js @@ -19,7 +19,7 @@ // 导出 const SN_listExport = (data) => { - return instance.post(`snInfo/listExport`, data) + return instance.post(`snInfo/listExport`, data, { responseType: 'blob' }) } export { SN_listExport, SN_batchDelete, SN_listPage, SN_delete, SN_add } diff --git a/src/api/request/http.js b/src/api/request/http.js index 9a49dc5..a7f20d1 100644 --- a/src/api/request/http.js +++ b/src/api/request/http.js @@ -43,7 +43,7 @@ console.log('err ============') // 对于请求报错进行处理 Message.error(err.message) - return '' - // return Promise.reject(err) + // return '' + return Promise.reject(err) }) export { instance } diff --git a/src/api/server/operation.js b/src/api/server/operation.js index 25eb67a..404b354 100644 --- a/src/api/server/operation.js +++ b/src/api/server/operation.js @@ -1 +1,31 @@ import { instance } from '../request/http' +// 暂时无接口 +// 列表 +const listPage = (str, data) => { + return instance.post(`/serviceInfo/listPage?${str}`, data) +} +// 服务不分页 +const O_list = () => { + return instance.post(`/serviceInfo/list`, {}) +} +const O_add = (data) => { + return instance.post('/serviceInfo/add', data) +} +// 更新 +const O_update = (data) => { + return instance.post('/serviceInfo/update', data) +} +// 删除 +const O_delete = (data) => { + return instance.post('/serviceInfo/delete', data) +} +// 批量删除 +const O_batchDelete = (data) => { + return instance.post('/serviceInfo/batchDelete', data) +} + +export { + O_update, + O_batchDelete, O_delete, O_add, listPage + , O_list +} diff --git a/src/components/guadMap/index.vue b/src/components/guadMap/index.vue index 6a0fd56..a68977e 100644 --- a/src/components/guadMap/index.vue +++ b/src/components/guadMap/index.vue @@ -89,29 +89,29 @@ fetchPositionData() { getDevicePosition() .then((res) => { - // this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 - this.deviceList = [ - { - deviceName: "燃气灶", - lat: "39.97", - lon: "116.3", - }, - { - deviceName: "燃气灶", - lat: "39.93", - lon: "116.15", - }, - { - deviceName: "燃气灶", - lat: "39.8", - lon: "116.22", - }, - { - deviceName: "燃气灶", - lat: "39.74", - lon: "116.33", - }, - ]; + this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 + // this.deviceList = [ + // { + // deviceName: "燃气灶", + // lat: "39.97", + // lon: "116.3", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.93", + // lon: "116.15", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.8", + // lon: "116.22", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.74", + // lon: "116.33", + // }, + // ]; // 初始化地图 this.initMap(); }) diff --git a/src/components/mycomponent/dialog/categoryAddDialog.vue b/src/components/mycomponent/dialog/categoryAddDialog.vue index c47e73c..d06f821 100644 --- a/src/components/mycomponent/dialog/categoryAddDialog.vue +++ b/src/components/mycomponent/dialog/categoryAddDialog.vue @@ -200,7 +200,6 @@ }, save() { this.$refs['dataForm'].validate((valid) => { - console.log(this.deptForm) if (valid) { if (this.title === '品类新增') { C_add(this.categoryInfo).then(res => { diff --git a/src/components/mycomponent/dialog/deviceInfoDialog.vue b/src/components/mycomponent/dialog/deviceInfoDialog.vue index 1ca24ff..30149bc 100644 --- a/src/components/mycomponent/dialog/deviceInfoDialog.vue +++ b/src/components/mycomponent/dialog/deviceInfoDialog.vue @@ -4,159 +4,416 @@
- - - + + +
- +
-
- - - -
+ + +
+
+ + + + + +
+
+ + + + + + +
+
+ + +
+ + +
+
+
+ + +
+
+
+ + + +
+
+ + +
+
+ + +
+
+
+
+ +
+
+
+
+ + + +
+
+ + +
+
+ + +
+
+
+
+ + + +
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ + + +
+
+ + + +
+
+ + +
+
+
+
+
+ +
-
- - - - - -
-
- - - - - - -
-
- - -
- - -
-
+
-
-
- - - -
-
- - -
-
- - -
-
+
@@ -166,6 +423,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -196,6 +456,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -205,6 +466,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -223,6 +486,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -246,6 +512,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -256,6 +523,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -268,6 +536,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -284,6 +554,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -312,6 +584,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -335,6 +610,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -358,6 +636,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -392,7 +672,7 @@ }, data() { return { - navSelect: 0, // 0 1 2 为导航栏的选项 + navSelect: '0', // 0 1 2 为导航栏的选项 rowInfo: {} } }, @@ -480,6 +760,7 @@ } .content_content { + padding: 0px 10px; // padding: 20px 0 60px 0; // box-sizing: border-box; diff --git a/src/api/product/category.js b/src/api/product/category.js index aea97c7..d655a11 100644 --- a/src/api/product/category.js +++ b/src/api/product/category.js @@ -69,7 +69,8 @@ return request({ url: '/categoryInfo/listExport', method: 'post', - data + data, + responseType: 'blob' }) } diff --git a/src/api/product/device.js b/src/api/product/device.js index e5b8b02..ccfa5cf 100644 --- a/src/api/product/device.js +++ b/src/api/product/device.js @@ -22,7 +22,7 @@ // 设备列表导出 const d_listExport = (data) => { - return instance.post('/deviceInfo/listExport', data) + return instance.post('/deviceInfo/listExport', data, { responseType: 'blob' }) } // 统计:累计激活设备数、今日设备在线数、今日设备在线率 diff --git a/src/api/product/product.js b/src/api/product/product.js index e4b9db1..beda1b5 100644 --- a/src/api/product/product.js +++ b/src/api/product/product.js @@ -29,5 +29,13 @@ const productDetail = (data) => { return instance.post('/productInfo/detail', data) } +// 绑定服务. +const bindServ = (data)=>{ + return instance.post('/productInfo/service/bind', data) +} +// 查询绑定列表 +const listBindService = (data)=>{ + return instance.post('productInfo/service/bindList', data) +} -export { listPage, add, update, productDelete, batchDelete, list, productDetail } +export { listPage, add, update, productDelete, batchDelete, list, productDetail, bindServ, listBindService } diff --git a/src/api/product/snCodeField.js b/src/api/product/snCodeField.js index 2d006a9..1f31976 100644 --- a/src/api/product/snCodeField.js +++ b/src/api/product/snCodeField.js @@ -19,7 +19,7 @@ // 导出 const SN_listExport = (data) => { - return instance.post(`snInfo/listExport`, data) + return instance.post(`snInfo/listExport`, data, { responseType: 'blob' }) } export { SN_listExport, SN_batchDelete, SN_listPage, SN_delete, SN_add } diff --git a/src/api/request/http.js b/src/api/request/http.js index 9a49dc5..a7f20d1 100644 --- a/src/api/request/http.js +++ b/src/api/request/http.js @@ -43,7 +43,7 @@ console.log('err ============') // 对于请求报错进行处理 Message.error(err.message) - return '' - // return Promise.reject(err) + // return '' + return Promise.reject(err) }) export { instance } diff --git a/src/api/server/operation.js b/src/api/server/operation.js index 25eb67a..404b354 100644 --- a/src/api/server/operation.js +++ b/src/api/server/operation.js @@ -1 +1,31 @@ import { instance } from '../request/http' +// 暂时无接口 +// 列表 +const listPage = (str, data) => { + return instance.post(`/serviceInfo/listPage?${str}`, data) +} +// 服务不分页 +const O_list = () => { + return instance.post(`/serviceInfo/list`, {}) +} +const O_add = (data) => { + return instance.post('/serviceInfo/add', data) +} +// 更新 +const O_update = (data) => { + return instance.post('/serviceInfo/update', data) +} +// 删除 +const O_delete = (data) => { + return instance.post('/serviceInfo/delete', data) +} +// 批量删除 +const O_batchDelete = (data) => { + return instance.post('/serviceInfo/batchDelete', data) +} + +export { + O_update, + O_batchDelete, O_delete, O_add, listPage + , O_list +} diff --git a/src/components/guadMap/index.vue b/src/components/guadMap/index.vue index 6a0fd56..a68977e 100644 --- a/src/components/guadMap/index.vue +++ b/src/components/guadMap/index.vue @@ -89,29 +89,29 @@ fetchPositionData() { getDevicePosition() .then((res) => { - // this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 - this.deviceList = [ - { - deviceName: "燃气灶", - lat: "39.97", - lon: "116.3", - }, - { - deviceName: "燃气灶", - lat: "39.93", - lon: "116.15", - }, - { - deviceName: "燃气灶", - lat: "39.8", - lon: "116.22", - }, - { - deviceName: "燃气灶", - lat: "39.74", - lon: "116.33", - }, - ]; + this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 + // this.deviceList = [ + // { + // deviceName: "燃气灶", + // lat: "39.97", + // lon: "116.3", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.93", + // lon: "116.15", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.8", + // lon: "116.22", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.74", + // lon: "116.33", + // }, + // ]; // 初始化地图 this.initMap(); }) diff --git a/src/components/mycomponent/dialog/categoryAddDialog.vue b/src/components/mycomponent/dialog/categoryAddDialog.vue index c47e73c..d06f821 100644 --- a/src/components/mycomponent/dialog/categoryAddDialog.vue +++ b/src/components/mycomponent/dialog/categoryAddDialog.vue @@ -200,7 +200,6 @@ }, save() { this.$refs['dataForm'].validate((valid) => { - console.log(this.deptForm) if (valid) { if (this.title === '品类新增') { C_add(this.categoryInfo).then(res => { diff --git a/src/components/mycomponent/dialog/deviceInfoDialog.vue b/src/components/mycomponent/dialog/deviceInfoDialog.vue index 1ca24ff..30149bc 100644 --- a/src/components/mycomponent/dialog/deviceInfoDialog.vue +++ b/src/components/mycomponent/dialog/deviceInfoDialog.vue @@ -4,159 +4,416 @@
- - - + + +
- +
-
- - - -
+ + +
+
+ + + + + +
+
+ + + + + + +
+
+ + +
+ + +
+
+
+ + +
+
+
+ + + +
+
+ + +
+
+ + +
+
+
+
+ +
+
+
+
+ + + +
+
+ + +
+
+ + +
+
+
+
+ + + +
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ + + +
+
+ + + +
+
+ + +
+
+
+
+
+ +
-
- - - - - -
-
- - - - - - -
-
- - -
- - -
-
+
-
-
- - - -
-
- - -
-
- - -
-
+
@@ -166,6 +423,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -196,6 +456,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -205,6 +466,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -223,6 +486,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -246,6 +512,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -256,6 +523,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -268,6 +536,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -284,6 +554,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -312,6 +584,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -335,6 +610,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -358,6 +636,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -392,7 +672,7 @@ }, data() { return { - navSelect: 0, // 0 1 2 为导航栏的选项 + navSelect: '0', // 0 1 2 为导航栏的选项 rowInfo: {} } }, @@ -480,6 +760,7 @@ } .content_content { + padding: 0px 10px; // padding: 20px 0 60px 0; // box-sizing: border-box; diff --git a/src/components/mycomponent/dialog/productBindDialog.vue b/src/components/mycomponent/dialog/productBindDialog.vue index 0ce020b..d387996 100644 --- a/src/components/mycomponent/dialog/productBindDialog.vue +++ b/src/components/mycomponent/dialog/productBindDialog.vue @@ -17,16 +17,16 @@ 添加服务
- - + + @@ -38,7 +38,7 @@
- + 保存 @@ -49,8 +49,8 @@ + diff --git a/src/api/product/category.js b/src/api/product/category.js index aea97c7..d655a11 100644 --- a/src/api/product/category.js +++ b/src/api/product/category.js @@ -69,7 +69,8 @@ return request({ url: '/categoryInfo/listExport', method: 'post', - data + data, + responseType: 'blob' }) } diff --git a/src/api/product/device.js b/src/api/product/device.js index e5b8b02..ccfa5cf 100644 --- a/src/api/product/device.js +++ b/src/api/product/device.js @@ -22,7 +22,7 @@ // 设备列表导出 const d_listExport = (data) => { - return instance.post('/deviceInfo/listExport', data) + return instance.post('/deviceInfo/listExport', data, { responseType: 'blob' }) } // 统计:累计激活设备数、今日设备在线数、今日设备在线率 diff --git a/src/api/product/product.js b/src/api/product/product.js index e4b9db1..beda1b5 100644 --- a/src/api/product/product.js +++ b/src/api/product/product.js @@ -29,5 +29,13 @@ const productDetail = (data) => { return instance.post('/productInfo/detail', data) } +// 绑定服务. +const bindServ = (data)=>{ + return instance.post('/productInfo/service/bind', data) +} +// 查询绑定列表 +const listBindService = (data)=>{ + return instance.post('productInfo/service/bindList', data) +} -export { listPage, add, update, productDelete, batchDelete, list, productDetail } +export { listPage, add, update, productDelete, batchDelete, list, productDetail, bindServ, listBindService } diff --git a/src/api/product/snCodeField.js b/src/api/product/snCodeField.js index 2d006a9..1f31976 100644 --- a/src/api/product/snCodeField.js +++ b/src/api/product/snCodeField.js @@ -19,7 +19,7 @@ // 导出 const SN_listExport = (data) => { - return instance.post(`snInfo/listExport`, data) + return instance.post(`snInfo/listExport`, data, { responseType: 'blob' }) } export { SN_listExport, SN_batchDelete, SN_listPage, SN_delete, SN_add } diff --git a/src/api/request/http.js b/src/api/request/http.js index 9a49dc5..a7f20d1 100644 --- a/src/api/request/http.js +++ b/src/api/request/http.js @@ -43,7 +43,7 @@ console.log('err ============') // 对于请求报错进行处理 Message.error(err.message) - return '' - // return Promise.reject(err) + // return '' + return Promise.reject(err) }) export { instance } diff --git a/src/api/server/operation.js b/src/api/server/operation.js index 25eb67a..404b354 100644 --- a/src/api/server/operation.js +++ b/src/api/server/operation.js @@ -1 +1,31 @@ import { instance } from '../request/http' +// 暂时无接口 +// 列表 +const listPage = (str, data) => { + return instance.post(`/serviceInfo/listPage?${str}`, data) +} +// 服务不分页 +const O_list = () => { + return instance.post(`/serviceInfo/list`, {}) +} +const O_add = (data) => { + return instance.post('/serviceInfo/add', data) +} +// 更新 +const O_update = (data) => { + return instance.post('/serviceInfo/update', data) +} +// 删除 +const O_delete = (data) => { + return instance.post('/serviceInfo/delete', data) +} +// 批量删除 +const O_batchDelete = (data) => { + return instance.post('/serviceInfo/batchDelete', data) +} + +export { + O_update, + O_batchDelete, O_delete, O_add, listPage + , O_list +} diff --git a/src/components/guadMap/index.vue b/src/components/guadMap/index.vue index 6a0fd56..a68977e 100644 --- a/src/components/guadMap/index.vue +++ b/src/components/guadMap/index.vue @@ -89,29 +89,29 @@ fetchPositionData() { getDevicePosition() .then((res) => { - // this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 - this.deviceList = [ - { - deviceName: "燃气灶", - lat: "39.97", - lon: "116.3", - }, - { - deviceName: "燃气灶", - lat: "39.93", - lon: "116.15", - }, - { - deviceName: "燃气灶", - lat: "39.8", - lon: "116.22", - }, - { - deviceName: "燃气灶", - lat: "39.74", - lon: "116.33", - }, - ]; + this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 + // this.deviceList = [ + // { + // deviceName: "燃气灶", + // lat: "39.97", + // lon: "116.3", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.93", + // lon: "116.15", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.8", + // lon: "116.22", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.74", + // lon: "116.33", + // }, + // ]; // 初始化地图 this.initMap(); }) diff --git a/src/components/mycomponent/dialog/categoryAddDialog.vue b/src/components/mycomponent/dialog/categoryAddDialog.vue index c47e73c..d06f821 100644 --- a/src/components/mycomponent/dialog/categoryAddDialog.vue +++ b/src/components/mycomponent/dialog/categoryAddDialog.vue @@ -200,7 +200,6 @@ }, save() { this.$refs['dataForm'].validate((valid) => { - console.log(this.deptForm) if (valid) { if (this.title === '品类新增') { C_add(this.categoryInfo).then(res => { diff --git a/src/components/mycomponent/dialog/deviceInfoDialog.vue b/src/components/mycomponent/dialog/deviceInfoDialog.vue index 1ca24ff..30149bc 100644 --- a/src/components/mycomponent/dialog/deviceInfoDialog.vue +++ b/src/components/mycomponent/dialog/deviceInfoDialog.vue @@ -4,159 +4,416 @@
- - - + + +
- +
-
- - - -
+ + +
+
+ + + + + +
+
+ + + + + + +
+
+ + +
+ + +
+
+
+ + +
+
+
+ + + +
+
+ + +
+
+ + +
+
+
+
+ +
+
+
+
+ + + +
+
+ + +
+
+ + +
+
+
+
+ + + +
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ + + +
+
+ + + +
+
+ + +
+
+
+
+
+ +
-
- - - - - -
-
- - - - - - -
-
- - -
- - -
-
+
-
-
- - - -
-
- - -
-
- - -
-
+
@@ -166,6 +423,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -196,6 +456,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -205,6 +466,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -223,6 +486,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -246,6 +512,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -256,6 +523,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -268,6 +536,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -284,6 +554,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -312,6 +584,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -335,6 +610,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -358,6 +636,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -392,7 +672,7 @@ }, data() { return { - navSelect: 0, // 0 1 2 为导航栏的选项 + navSelect: '0', // 0 1 2 为导航栏的选项 rowInfo: {} } }, @@ -480,6 +760,7 @@ } .content_content { + padding: 0px 10px; // padding: 20px 0 60px 0; // box-sizing: border-box; diff --git a/src/components/mycomponent/dialog/productBindDialog.vue b/src/components/mycomponent/dialog/productBindDialog.vue index 0ce020b..d387996 100644 --- a/src/components/mycomponent/dialog/productBindDialog.vue +++ b/src/components/mycomponent/dialog/productBindDialog.vue @@ -17,16 +17,16 @@ 添加服务
- - + + @@ -38,7 +38,7 @@
- + 保存 @@ -49,8 +49,8 @@ + diff --git a/src/components/mycomponent/input/inputVue.vue b/src/components/mycomponent/input/inputVue.vue index 8a50163..1c0cba5 100644 --- a/src/components/mycomponent/input/inputVue.vue +++ b/src/components/mycomponent/input/inputVue.vue @@ -7,7 +7,7 @@
- +
@@ -23,6 +23,10 @@ event: 'changeinput' }, props: { + readable: { + type: Boolean, + default: false + }, redStar: false, title: '', width: '', @@ -71,4 +75,16 @@ min-width: 68.45px; margin-right: 10px } + .readinput{ + + } + + diff --git a/src/api/product/category.js b/src/api/product/category.js index aea97c7..d655a11 100644 --- a/src/api/product/category.js +++ b/src/api/product/category.js @@ -69,7 +69,8 @@ return request({ url: '/categoryInfo/listExport', method: 'post', - data + data, + responseType: 'blob' }) } diff --git a/src/api/product/device.js b/src/api/product/device.js index e5b8b02..ccfa5cf 100644 --- a/src/api/product/device.js +++ b/src/api/product/device.js @@ -22,7 +22,7 @@ // 设备列表导出 const d_listExport = (data) => { - return instance.post('/deviceInfo/listExport', data) + return instance.post('/deviceInfo/listExport', data, { responseType: 'blob' }) } // 统计:累计激活设备数、今日设备在线数、今日设备在线率 diff --git a/src/api/product/product.js b/src/api/product/product.js index e4b9db1..beda1b5 100644 --- a/src/api/product/product.js +++ b/src/api/product/product.js @@ -29,5 +29,13 @@ const productDetail = (data) => { return instance.post('/productInfo/detail', data) } +// 绑定服务. +const bindServ = (data)=>{ + return instance.post('/productInfo/service/bind', data) +} +// 查询绑定列表 +const listBindService = (data)=>{ + return instance.post('productInfo/service/bindList', data) +} -export { listPage, add, update, productDelete, batchDelete, list, productDetail } +export { listPage, add, update, productDelete, batchDelete, list, productDetail, bindServ, listBindService } diff --git a/src/api/product/snCodeField.js b/src/api/product/snCodeField.js index 2d006a9..1f31976 100644 --- a/src/api/product/snCodeField.js +++ b/src/api/product/snCodeField.js @@ -19,7 +19,7 @@ // 导出 const SN_listExport = (data) => { - return instance.post(`snInfo/listExport`, data) + return instance.post(`snInfo/listExport`, data, { responseType: 'blob' }) } export { SN_listExport, SN_batchDelete, SN_listPage, SN_delete, SN_add } diff --git a/src/api/request/http.js b/src/api/request/http.js index 9a49dc5..a7f20d1 100644 --- a/src/api/request/http.js +++ b/src/api/request/http.js @@ -43,7 +43,7 @@ console.log('err ============') // 对于请求报错进行处理 Message.error(err.message) - return '' - // return Promise.reject(err) + // return '' + return Promise.reject(err) }) export { instance } diff --git a/src/api/server/operation.js b/src/api/server/operation.js index 25eb67a..404b354 100644 --- a/src/api/server/operation.js +++ b/src/api/server/operation.js @@ -1 +1,31 @@ import { instance } from '../request/http' +// 暂时无接口 +// 列表 +const listPage = (str, data) => { + return instance.post(`/serviceInfo/listPage?${str}`, data) +} +// 服务不分页 +const O_list = () => { + return instance.post(`/serviceInfo/list`, {}) +} +const O_add = (data) => { + return instance.post('/serviceInfo/add', data) +} +// 更新 +const O_update = (data) => { + return instance.post('/serviceInfo/update', data) +} +// 删除 +const O_delete = (data) => { + return instance.post('/serviceInfo/delete', data) +} +// 批量删除 +const O_batchDelete = (data) => { + return instance.post('/serviceInfo/batchDelete', data) +} + +export { + O_update, + O_batchDelete, O_delete, O_add, listPage + , O_list +} diff --git a/src/components/guadMap/index.vue b/src/components/guadMap/index.vue index 6a0fd56..a68977e 100644 --- a/src/components/guadMap/index.vue +++ b/src/components/guadMap/index.vue @@ -89,29 +89,29 @@ fetchPositionData() { getDevicePosition() .then((res) => { - // this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 - this.deviceList = [ - { - deviceName: "燃气灶", - lat: "39.97", - lon: "116.3", - }, - { - deviceName: "燃气灶", - lat: "39.93", - lon: "116.15", - }, - { - deviceName: "燃气灶", - lat: "39.8", - lon: "116.22", - }, - { - deviceName: "燃气灶", - lat: "39.74", - lon: "116.33", - }, - ]; + this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 + // this.deviceList = [ + // { + // deviceName: "燃气灶", + // lat: "39.97", + // lon: "116.3", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.93", + // lon: "116.15", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.8", + // lon: "116.22", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.74", + // lon: "116.33", + // }, + // ]; // 初始化地图 this.initMap(); }) diff --git a/src/components/mycomponent/dialog/categoryAddDialog.vue b/src/components/mycomponent/dialog/categoryAddDialog.vue index c47e73c..d06f821 100644 --- a/src/components/mycomponent/dialog/categoryAddDialog.vue +++ b/src/components/mycomponent/dialog/categoryAddDialog.vue @@ -200,7 +200,6 @@ }, save() { this.$refs['dataForm'].validate((valid) => { - console.log(this.deptForm) if (valid) { if (this.title === '品类新增') { C_add(this.categoryInfo).then(res => { diff --git a/src/components/mycomponent/dialog/deviceInfoDialog.vue b/src/components/mycomponent/dialog/deviceInfoDialog.vue index 1ca24ff..30149bc 100644 --- a/src/components/mycomponent/dialog/deviceInfoDialog.vue +++ b/src/components/mycomponent/dialog/deviceInfoDialog.vue @@ -4,159 +4,416 @@
- - - + + +
- +
-
- - - -
+ + +
+
+ + + + + +
+
+ + + + + + +
+
+ + +
+ + +
+
+
+ + +
+
+
+ + + +
+
+ + +
+
+ + +
+
+
+
+ +
+
+
+
+ + + +
+
+ + +
+
+ + +
+
+
+
+ + + +
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ + + +
+
+ + + +
+
+ + +
+
+
+
+
+ +
-
- - - - - -
-
- - - - - - -
-
- - -
- - -
-
+
-
-
- - - -
-
- - -
-
- - -
-
+
@@ -166,6 +423,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -196,6 +456,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -205,6 +466,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -223,6 +486,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -246,6 +512,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -256,6 +523,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -268,6 +536,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -284,6 +554,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -312,6 +584,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -335,6 +610,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -358,6 +636,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -392,7 +672,7 @@ }, data() { return { - navSelect: 0, // 0 1 2 为导航栏的选项 + navSelect: '0', // 0 1 2 为导航栏的选项 rowInfo: {} } }, @@ -480,6 +760,7 @@ } .content_content { + padding: 0px 10px; // padding: 20px 0 60px 0; // box-sizing: border-box; diff --git a/src/components/mycomponent/dialog/productBindDialog.vue b/src/components/mycomponent/dialog/productBindDialog.vue index 0ce020b..d387996 100644 --- a/src/components/mycomponent/dialog/productBindDialog.vue +++ b/src/components/mycomponent/dialog/productBindDialog.vue @@ -17,16 +17,16 @@ 添加服务
- - + + @@ -38,7 +38,7 @@
- + 保存 @@ -49,8 +49,8 @@ + diff --git a/src/components/mycomponent/input/inputVue.vue b/src/components/mycomponent/input/inputVue.vue index 8a50163..1c0cba5 100644 --- a/src/components/mycomponent/input/inputVue.vue +++ b/src/components/mycomponent/input/inputVue.vue @@ -7,7 +7,7 @@
- +
@@ -23,6 +23,10 @@ event: 'changeinput' }, props: { + readable: { + type: Boolean, + default: false + }, redStar: false, title: '', width: '', @@ -71,4 +75,16 @@ min-width: 68.45px; margin-right: 10px } + .readinput{ + + } + + diff --git a/src/utils/myUtils/mixins/infoDialog.js b/src/utils/myUtils/mixins/infoDialog.js index 4c492f3..ac6af5b 100644 --- a/src/utils/myUtils/mixins/infoDialog.js +++ b/src/utils/myUtils/mixins/infoDialog.js @@ -2,7 +2,7 @@ props: { isShowInfo: { type: Boolean, - default: true + default: false }, // title: '', dataInfo: { diff --git a/src/api/product/category.js b/src/api/product/category.js index aea97c7..d655a11 100644 --- a/src/api/product/category.js +++ b/src/api/product/category.js @@ -69,7 +69,8 @@ return request({ url: '/categoryInfo/listExport', method: 'post', - data + data, + responseType: 'blob' }) } diff --git a/src/api/product/device.js b/src/api/product/device.js index e5b8b02..ccfa5cf 100644 --- a/src/api/product/device.js +++ b/src/api/product/device.js @@ -22,7 +22,7 @@ // 设备列表导出 const d_listExport = (data) => { - return instance.post('/deviceInfo/listExport', data) + return instance.post('/deviceInfo/listExport', data, { responseType: 'blob' }) } // 统计:累计激活设备数、今日设备在线数、今日设备在线率 diff --git a/src/api/product/product.js b/src/api/product/product.js index e4b9db1..beda1b5 100644 --- a/src/api/product/product.js +++ b/src/api/product/product.js @@ -29,5 +29,13 @@ const productDetail = (data) => { return instance.post('/productInfo/detail', data) } +// 绑定服务. +const bindServ = (data)=>{ + return instance.post('/productInfo/service/bind', data) +} +// 查询绑定列表 +const listBindService = (data)=>{ + return instance.post('productInfo/service/bindList', data) +} -export { listPage, add, update, productDelete, batchDelete, list, productDetail } +export { listPage, add, update, productDelete, batchDelete, list, productDetail, bindServ, listBindService } diff --git a/src/api/product/snCodeField.js b/src/api/product/snCodeField.js index 2d006a9..1f31976 100644 --- a/src/api/product/snCodeField.js +++ b/src/api/product/snCodeField.js @@ -19,7 +19,7 @@ // 导出 const SN_listExport = (data) => { - return instance.post(`snInfo/listExport`, data) + return instance.post(`snInfo/listExport`, data, { responseType: 'blob' }) } export { SN_listExport, SN_batchDelete, SN_listPage, SN_delete, SN_add } diff --git a/src/api/request/http.js b/src/api/request/http.js index 9a49dc5..a7f20d1 100644 --- a/src/api/request/http.js +++ b/src/api/request/http.js @@ -43,7 +43,7 @@ console.log('err ============') // 对于请求报错进行处理 Message.error(err.message) - return '' - // return Promise.reject(err) + // return '' + return Promise.reject(err) }) export { instance } diff --git a/src/api/server/operation.js b/src/api/server/operation.js index 25eb67a..404b354 100644 --- a/src/api/server/operation.js +++ b/src/api/server/operation.js @@ -1 +1,31 @@ import { instance } from '../request/http' +// 暂时无接口 +// 列表 +const listPage = (str, data) => { + return instance.post(`/serviceInfo/listPage?${str}`, data) +} +// 服务不分页 +const O_list = () => { + return instance.post(`/serviceInfo/list`, {}) +} +const O_add = (data) => { + return instance.post('/serviceInfo/add', data) +} +// 更新 +const O_update = (data) => { + return instance.post('/serviceInfo/update', data) +} +// 删除 +const O_delete = (data) => { + return instance.post('/serviceInfo/delete', data) +} +// 批量删除 +const O_batchDelete = (data) => { + return instance.post('/serviceInfo/batchDelete', data) +} + +export { + O_update, + O_batchDelete, O_delete, O_add, listPage + , O_list +} diff --git a/src/components/guadMap/index.vue b/src/components/guadMap/index.vue index 6a0fd56..a68977e 100644 --- a/src/components/guadMap/index.vue +++ b/src/components/guadMap/index.vue @@ -89,29 +89,29 @@ fetchPositionData() { getDevicePosition() .then((res) => { - // this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 - this.deviceList = [ - { - deviceName: "燃气灶", - lat: "39.97", - lon: "116.3", - }, - { - deviceName: "燃气灶", - lat: "39.93", - lon: "116.15", - }, - { - deviceName: "燃气灶", - lat: "39.8", - lon: "116.22", - }, - { - deviceName: "燃气灶", - lat: "39.74", - lon: "116.33", - }, - ]; + this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 + // this.deviceList = [ + // { + // deviceName: "燃气灶", + // lat: "39.97", + // lon: "116.3", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.93", + // lon: "116.15", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.8", + // lon: "116.22", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.74", + // lon: "116.33", + // }, + // ]; // 初始化地图 this.initMap(); }) diff --git a/src/components/mycomponent/dialog/categoryAddDialog.vue b/src/components/mycomponent/dialog/categoryAddDialog.vue index c47e73c..d06f821 100644 --- a/src/components/mycomponent/dialog/categoryAddDialog.vue +++ b/src/components/mycomponent/dialog/categoryAddDialog.vue @@ -200,7 +200,6 @@ }, save() { this.$refs['dataForm'].validate((valid) => { - console.log(this.deptForm) if (valid) { if (this.title === '品类新增') { C_add(this.categoryInfo).then(res => { diff --git a/src/components/mycomponent/dialog/deviceInfoDialog.vue b/src/components/mycomponent/dialog/deviceInfoDialog.vue index 1ca24ff..30149bc 100644 --- a/src/components/mycomponent/dialog/deviceInfoDialog.vue +++ b/src/components/mycomponent/dialog/deviceInfoDialog.vue @@ -4,159 +4,416 @@
- - - + + +
- +
-
- - - -
+ + +
+
+ + + + + +
+
+ + + + + + +
+
+ + +
+ + +
+
+
+ + +
+
+
+ + + +
+
+ + +
+
+ + +
+
+
+
+ +
+
+
+
+ + + +
+
+ + +
+
+ + +
+
+
+
+ + + +
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ + + +
+
+ + + +
+
+ + +
+
+
+
+
+ +
-
- - - - - -
-
- - - - - - -
-
- - -
- - -
-
+
-
-
- - - -
-
- - -
-
- - -
-
+
@@ -166,6 +423,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -196,6 +456,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -205,6 +466,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -223,6 +486,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -246,6 +512,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -256,6 +523,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -268,6 +536,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -284,6 +554,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -312,6 +584,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -335,6 +610,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -358,6 +636,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -392,7 +672,7 @@ }, data() { return { - navSelect: 0, // 0 1 2 为导航栏的选项 + navSelect: '0', // 0 1 2 为导航栏的选项 rowInfo: {} } }, @@ -480,6 +760,7 @@ } .content_content { + padding: 0px 10px; // padding: 20px 0 60px 0; // box-sizing: border-box; diff --git a/src/components/mycomponent/dialog/productBindDialog.vue b/src/components/mycomponent/dialog/productBindDialog.vue index 0ce020b..d387996 100644 --- a/src/components/mycomponent/dialog/productBindDialog.vue +++ b/src/components/mycomponent/dialog/productBindDialog.vue @@ -17,16 +17,16 @@ 添加服务
- - + + @@ -38,7 +38,7 @@
- + 保存 @@ -49,8 +49,8 @@ + diff --git a/src/components/mycomponent/input/inputVue.vue b/src/components/mycomponent/input/inputVue.vue index 8a50163..1c0cba5 100644 --- a/src/components/mycomponent/input/inputVue.vue +++ b/src/components/mycomponent/input/inputVue.vue @@ -7,7 +7,7 @@
- +
@@ -23,6 +23,10 @@ event: 'changeinput' }, props: { + readable: { + type: Boolean, + default: false + }, redStar: false, title: '', width: '', @@ -71,4 +75,16 @@ min-width: 68.45px; margin-right: 10px } + .readinput{ + + } + + diff --git a/src/utils/myUtils/mixins/infoDialog.js b/src/utils/myUtils/mixins/infoDialog.js index 4c492f3..ac6af5b 100644 --- a/src/utils/myUtils/mixins/infoDialog.js +++ b/src/utils/myUtils/mixins/infoDialog.js @@ -2,7 +2,7 @@ props: { isShowInfo: { type: Boolean, - default: true + default: false }, // title: '', dataInfo: { diff --git a/src/utils/myUtils/mixins/listPage.js b/src/utils/myUtils/mixins/listPage.js index 07f3141..9b8c399 100644 --- a/src/utils/myUtils/mixins/listPage.js +++ b/src/utils/myUtils/mixins/listPage.js @@ -1,6 +1,7 @@ const listMixin = { data() { return { + loading: false, tableData: { rows: [] }, // 品牌表格数据 limit: 10, // 当前的行数 offset: 1, // 当前页 @@ -24,7 +25,7 @@ selectData() { this.queryInfo = { ...this.selectInfo } // 加入搜索内容 // 回到初始页 - if (this.offset == 1) { + if (this.offset === 1) { this.refresh() return } diff --git a/src/api/product/category.js b/src/api/product/category.js index aea97c7..d655a11 100644 --- a/src/api/product/category.js +++ b/src/api/product/category.js @@ -69,7 +69,8 @@ return request({ url: '/categoryInfo/listExport', method: 'post', - data + data, + responseType: 'blob' }) } diff --git a/src/api/product/device.js b/src/api/product/device.js index e5b8b02..ccfa5cf 100644 --- a/src/api/product/device.js +++ b/src/api/product/device.js @@ -22,7 +22,7 @@ // 设备列表导出 const d_listExport = (data) => { - return instance.post('/deviceInfo/listExport', data) + return instance.post('/deviceInfo/listExport', data, { responseType: 'blob' }) } // 统计:累计激活设备数、今日设备在线数、今日设备在线率 diff --git a/src/api/product/product.js b/src/api/product/product.js index e4b9db1..beda1b5 100644 --- a/src/api/product/product.js +++ b/src/api/product/product.js @@ -29,5 +29,13 @@ const productDetail = (data) => { return instance.post('/productInfo/detail', data) } +// 绑定服务. +const bindServ = (data)=>{ + return instance.post('/productInfo/service/bind', data) +} +// 查询绑定列表 +const listBindService = (data)=>{ + return instance.post('productInfo/service/bindList', data) +} -export { listPage, add, update, productDelete, batchDelete, list, productDetail } +export { listPage, add, update, productDelete, batchDelete, list, productDetail, bindServ, listBindService } diff --git a/src/api/product/snCodeField.js b/src/api/product/snCodeField.js index 2d006a9..1f31976 100644 --- a/src/api/product/snCodeField.js +++ b/src/api/product/snCodeField.js @@ -19,7 +19,7 @@ // 导出 const SN_listExport = (data) => { - return instance.post(`snInfo/listExport`, data) + return instance.post(`snInfo/listExport`, data, { responseType: 'blob' }) } export { SN_listExport, SN_batchDelete, SN_listPage, SN_delete, SN_add } diff --git a/src/api/request/http.js b/src/api/request/http.js index 9a49dc5..a7f20d1 100644 --- a/src/api/request/http.js +++ b/src/api/request/http.js @@ -43,7 +43,7 @@ console.log('err ============') // 对于请求报错进行处理 Message.error(err.message) - return '' - // return Promise.reject(err) + // return '' + return Promise.reject(err) }) export { instance } diff --git a/src/api/server/operation.js b/src/api/server/operation.js index 25eb67a..404b354 100644 --- a/src/api/server/operation.js +++ b/src/api/server/operation.js @@ -1 +1,31 @@ import { instance } from '../request/http' +// 暂时无接口 +// 列表 +const listPage = (str, data) => { + return instance.post(`/serviceInfo/listPage?${str}`, data) +} +// 服务不分页 +const O_list = () => { + return instance.post(`/serviceInfo/list`, {}) +} +const O_add = (data) => { + return instance.post('/serviceInfo/add', data) +} +// 更新 +const O_update = (data) => { + return instance.post('/serviceInfo/update', data) +} +// 删除 +const O_delete = (data) => { + return instance.post('/serviceInfo/delete', data) +} +// 批量删除 +const O_batchDelete = (data) => { + return instance.post('/serviceInfo/batchDelete', data) +} + +export { + O_update, + O_batchDelete, O_delete, O_add, listPage + , O_list +} diff --git a/src/components/guadMap/index.vue b/src/components/guadMap/index.vue index 6a0fd56..a68977e 100644 --- a/src/components/guadMap/index.vue +++ b/src/components/guadMap/index.vue @@ -89,29 +89,29 @@ fetchPositionData() { getDevicePosition() .then((res) => { - // this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 - this.deviceList = [ - { - deviceName: "燃气灶", - lat: "39.97", - lon: "116.3", - }, - { - deviceName: "燃气灶", - lat: "39.93", - lon: "116.15", - }, - { - deviceName: "燃气灶", - lat: "39.8", - lon: "116.22", - }, - { - deviceName: "燃气灶", - lat: "39.74", - lon: "116.33", - }, - ]; + this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 + // this.deviceList = [ + // { + // deviceName: "燃气灶", + // lat: "39.97", + // lon: "116.3", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.93", + // lon: "116.15", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.8", + // lon: "116.22", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.74", + // lon: "116.33", + // }, + // ]; // 初始化地图 this.initMap(); }) diff --git a/src/components/mycomponent/dialog/categoryAddDialog.vue b/src/components/mycomponent/dialog/categoryAddDialog.vue index c47e73c..d06f821 100644 --- a/src/components/mycomponent/dialog/categoryAddDialog.vue +++ b/src/components/mycomponent/dialog/categoryAddDialog.vue @@ -200,7 +200,6 @@ }, save() { this.$refs['dataForm'].validate((valid) => { - console.log(this.deptForm) if (valid) { if (this.title === '品类新增') { C_add(this.categoryInfo).then(res => { diff --git a/src/components/mycomponent/dialog/deviceInfoDialog.vue b/src/components/mycomponent/dialog/deviceInfoDialog.vue index 1ca24ff..30149bc 100644 --- a/src/components/mycomponent/dialog/deviceInfoDialog.vue +++ b/src/components/mycomponent/dialog/deviceInfoDialog.vue @@ -4,159 +4,416 @@
- - - + + +
- +
-
- - - -
+ + +
+
+ + + + + +
+
+ + + + + + +
+
+ + +
+ + +
+
+
+ + +
+
+
+ + + +
+
+ + +
+
+ + +
+
+
+
+ +
+
+
+
+ + + +
+
+ + +
+
+ + +
+
+
+
+ + + +
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ + + +
+
+ + + +
+
+ + +
+
+
+
+
+ +
-
- - - - - -
-
- - - - - - -
-
- - -
- - -
-
+
-
-
- - - -
-
- - -
-
- - -
-
+
@@ -166,6 +423,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -196,6 +456,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -205,6 +466,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -223,6 +486,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -246,6 +512,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -256,6 +523,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -268,6 +536,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -284,6 +554,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -312,6 +584,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -335,6 +610,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -358,6 +636,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -392,7 +672,7 @@ }, data() { return { - navSelect: 0, // 0 1 2 为导航栏的选项 + navSelect: '0', // 0 1 2 为导航栏的选项 rowInfo: {} } }, @@ -480,6 +760,7 @@ } .content_content { + padding: 0px 10px; // padding: 20px 0 60px 0; // box-sizing: border-box; diff --git a/src/components/mycomponent/dialog/productBindDialog.vue b/src/components/mycomponent/dialog/productBindDialog.vue index 0ce020b..d387996 100644 --- a/src/components/mycomponent/dialog/productBindDialog.vue +++ b/src/components/mycomponent/dialog/productBindDialog.vue @@ -17,16 +17,16 @@ 添加服务
- - + + @@ -38,7 +38,7 @@
- + 保存 @@ -49,8 +49,8 @@ + diff --git a/src/components/mycomponent/input/inputVue.vue b/src/components/mycomponent/input/inputVue.vue index 8a50163..1c0cba5 100644 --- a/src/components/mycomponent/input/inputVue.vue +++ b/src/components/mycomponent/input/inputVue.vue @@ -7,7 +7,7 @@
- +
@@ -23,6 +23,10 @@ event: 'changeinput' }, props: { + readable: { + type: Boolean, + default: false + }, redStar: false, title: '', width: '', @@ -71,4 +75,16 @@ min-width: 68.45px; margin-right: 10px } + .readinput{ + + } + + diff --git a/src/utils/myUtils/mixins/infoDialog.js b/src/utils/myUtils/mixins/infoDialog.js index 4c492f3..ac6af5b 100644 --- a/src/utils/myUtils/mixins/infoDialog.js +++ b/src/utils/myUtils/mixins/infoDialog.js @@ -2,7 +2,7 @@ props: { isShowInfo: { type: Boolean, - default: true + default: false }, // title: '', dataInfo: { diff --git a/src/utils/myUtils/mixins/listPage.js b/src/utils/myUtils/mixins/listPage.js index 07f3141..9b8c399 100644 --- a/src/utils/myUtils/mixins/listPage.js +++ b/src/utils/myUtils/mixins/listPage.js @@ -1,6 +1,7 @@ const listMixin = { data() { return { + loading: false, tableData: { rows: [] }, // 品牌表格数据 limit: 10, // 当前的行数 offset: 1, // 当前页 @@ -24,7 +25,7 @@ selectData() { this.queryInfo = { ...this.selectInfo } // 加入搜索内容 // 回到初始页 - if (this.offset == 1) { + if (this.offset === 1) { this.refresh() return } diff --git a/src/views/business/historyBusiness.vue b/src/views/business/historyBusiness.vue index bddce18..4398baa 100644 --- a/src/views/business/historyBusiness.vue +++ b/src/views/business/historyBusiness.vue @@ -13,7 +13,7 @@
预计工期
- +
diff --git a/src/api/product/category.js b/src/api/product/category.js index aea97c7..d655a11 100644 --- a/src/api/product/category.js +++ b/src/api/product/category.js @@ -69,7 +69,8 @@ return request({ url: '/categoryInfo/listExport', method: 'post', - data + data, + responseType: 'blob' }) } diff --git a/src/api/product/device.js b/src/api/product/device.js index e5b8b02..ccfa5cf 100644 --- a/src/api/product/device.js +++ b/src/api/product/device.js @@ -22,7 +22,7 @@ // 设备列表导出 const d_listExport = (data) => { - return instance.post('/deviceInfo/listExport', data) + return instance.post('/deviceInfo/listExport', data, { responseType: 'blob' }) } // 统计:累计激活设备数、今日设备在线数、今日设备在线率 diff --git a/src/api/product/product.js b/src/api/product/product.js index e4b9db1..beda1b5 100644 --- a/src/api/product/product.js +++ b/src/api/product/product.js @@ -29,5 +29,13 @@ const productDetail = (data) => { return instance.post('/productInfo/detail', data) } +// 绑定服务. +const bindServ = (data)=>{ + return instance.post('/productInfo/service/bind', data) +} +// 查询绑定列表 +const listBindService = (data)=>{ + return instance.post('productInfo/service/bindList', data) +} -export { listPage, add, update, productDelete, batchDelete, list, productDetail } +export { listPage, add, update, productDelete, batchDelete, list, productDetail, bindServ, listBindService } diff --git a/src/api/product/snCodeField.js b/src/api/product/snCodeField.js index 2d006a9..1f31976 100644 --- a/src/api/product/snCodeField.js +++ b/src/api/product/snCodeField.js @@ -19,7 +19,7 @@ // 导出 const SN_listExport = (data) => { - return instance.post(`snInfo/listExport`, data) + return instance.post(`snInfo/listExport`, data, { responseType: 'blob' }) } export { SN_listExport, SN_batchDelete, SN_listPage, SN_delete, SN_add } diff --git a/src/api/request/http.js b/src/api/request/http.js index 9a49dc5..a7f20d1 100644 --- a/src/api/request/http.js +++ b/src/api/request/http.js @@ -43,7 +43,7 @@ console.log('err ============') // 对于请求报错进行处理 Message.error(err.message) - return '' - // return Promise.reject(err) + // return '' + return Promise.reject(err) }) export { instance } diff --git a/src/api/server/operation.js b/src/api/server/operation.js index 25eb67a..404b354 100644 --- a/src/api/server/operation.js +++ b/src/api/server/operation.js @@ -1 +1,31 @@ import { instance } from '../request/http' +// 暂时无接口 +// 列表 +const listPage = (str, data) => { + return instance.post(`/serviceInfo/listPage?${str}`, data) +} +// 服务不分页 +const O_list = () => { + return instance.post(`/serviceInfo/list`, {}) +} +const O_add = (data) => { + return instance.post('/serviceInfo/add', data) +} +// 更新 +const O_update = (data) => { + return instance.post('/serviceInfo/update', data) +} +// 删除 +const O_delete = (data) => { + return instance.post('/serviceInfo/delete', data) +} +// 批量删除 +const O_batchDelete = (data) => { + return instance.post('/serviceInfo/batchDelete', data) +} + +export { + O_update, + O_batchDelete, O_delete, O_add, listPage + , O_list +} diff --git a/src/components/guadMap/index.vue b/src/components/guadMap/index.vue index 6a0fd56..a68977e 100644 --- a/src/components/guadMap/index.vue +++ b/src/components/guadMap/index.vue @@ -89,29 +89,29 @@ fetchPositionData() { getDevicePosition() .then((res) => { - // this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 - this.deviceList = [ - { - deviceName: "燃气灶", - lat: "39.97", - lon: "116.3", - }, - { - deviceName: "燃气灶", - lat: "39.93", - lon: "116.15", - }, - { - deviceName: "燃气灶", - lat: "39.8", - lon: "116.22", - }, - { - deviceName: "燃气灶", - lat: "39.74", - lon: "116.33", - }, - ]; + this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 + // this.deviceList = [ + // { + // deviceName: "燃气灶", + // lat: "39.97", + // lon: "116.3", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.93", + // lon: "116.15", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.8", + // lon: "116.22", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.74", + // lon: "116.33", + // }, + // ]; // 初始化地图 this.initMap(); }) diff --git a/src/components/mycomponent/dialog/categoryAddDialog.vue b/src/components/mycomponent/dialog/categoryAddDialog.vue index c47e73c..d06f821 100644 --- a/src/components/mycomponent/dialog/categoryAddDialog.vue +++ b/src/components/mycomponent/dialog/categoryAddDialog.vue @@ -200,7 +200,6 @@ }, save() { this.$refs['dataForm'].validate((valid) => { - console.log(this.deptForm) if (valid) { if (this.title === '品类新增') { C_add(this.categoryInfo).then(res => { diff --git a/src/components/mycomponent/dialog/deviceInfoDialog.vue b/src/components/mycomponent/dialog/deviceInfoDialog.vue index 1ca24ff..30149bc 100644 --- a/src/components/mycomponent/dialog/deviceInfoDialog.vue +++ b/src/components/mycomponent/dialog/deviceInfoDialog.vue @@ -4,159 +4,416 @@
- - - + + +
- +
-
- - - -
+ + +
+
+ + + + + +
+
+ + + + + + +
+
+ + +
+ + +
+
+
+ + +
+
+
+ + + +
+
+ + +
+
+ + +
+
+
+
+ +
+
+
+
+ + + +
+
+ + +
+
+ + +
+
+
+
+ + + +
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ + + +
+
+ + + +
+
+ + +
+
+
+
+
+ +
-
- - - - - -
-
- - - - - - -
-
- - -
- - -
-
+
-
-
- - - -
-
- - -
-
- - -
-
+
@@ -166,6 +423,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -196,6 +456,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -205,6 +466,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -223,6 +486,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -246,6 +512,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -256,6 +523,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -268,6 +536,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -284,6 +554,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -312,6 +584,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -335,6 +610,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -358,6 +636,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -392,7 +672,7 @@ }, data() { return { - navSelect: 0, // 0 1 2 为导航栏的选项 + navSelect: '0', // 0 1 2 为导航栏的选项 rowInfo: {} } }, @@ -480,6 +760,7 @@ } .content_content { + padding: 0px 10px; // padding: 20px 0 60px 0; // box-sizing: border-box; diff --git a/src/components/mycomponent/dialog/productBindDialog.vue b/src/components/mycomponent/dialog/productBindDialog.vue index 0ce020b..d387996 100644 --- a/src/components/mycomponent/dialog/productBindDialog.vue +++ b/src/components/mycomponent/dialog/productBindDialog.vue @@ -17,16 +17,16 @@ 添加服务
- - + + @@ -38,7 +38,7 @@
- + 保存 @@ -49,8 +49,8 @@ + diff --git a/src/components/mycomponent/input/inputVue.vue b/src/components/mycomponent/input/inputVue.vue index 8a50163..1c0cba5 100644 --- a/src/components/mycomponent/input/inputVue.vue +++ b/src/components/mycomponent/input/inputVue.vue @@ -7,7 +7,7 @@
- +
@@ -23,6 +23,10 @@ event: 'changeinput' }, props: { + readable: { + type: Boolean, + default: false + }, redStar: false, title: '', width: '', @@ -71,4 +75,16 @@ min-width: 68.45px; margin-right: 10px } + .readinput{ + + } + + diff --git a/src/utils/myUtils/mixins/infoDialog.js b/src/utils/myUtils/mixins/infoDialog.js index 4c492f3..ac6af5b 100644 --- a/src/utils/myUtils/mixins/infoDialog.js +++ b/src/utils/myUtils/mixins/infoDialog.js @@ -2,7 +2,7 @@ props: { isShowInfo: { type: Boolean, - default: true + default: false }, // title: '', dataInfo: { diff --git a/src/utils/myUtils/mixins/listPage.js b/src/utils/myUtils/mixins/listPage.js index 07f3141..9b8c399 100644 --- a/src/utils/myUtils/mixins/listPage.js +++ b/src/utils/myUtils/mixins/listPage.js @@ -1,6 +1,7 @@ const listMixin = { data() { return { + loading: false, tableData: { rows: [] }, // 品牌表格数据 limit: 10, // 当前的行数 offset: 1, // 当前页 @@ -24,7 +25,7 @@ selectData() { this.queryInfo = { ...this.selectInfo } // 加入搜索内容 // 回到初始页 - if (this.offset == 1) { + if (this.offset === 1) { this.refresh() return } diff --git a/src/views/business/historyBusiness.vue b/src/views/business/historyBusiness.vue index bddce18..4398baa 100644 --- a/src/views/business/historyBusiness.vue +++ b/src/views/business/historyBusiness.vue @@ -13,7 +13,7 @@
预计工期
- +
diff --git a/src/views/business/report.vue b/src/views/business/report.vue index 33c1a3d..d833399 100644 --- a/src/views/business/report.vue +++ b/src/views/business/report.vue @@ -316,12 +316,12 @@
-
+
+
添加项目需求
-
@@ -421,22 +421,27 @@ }, methods: { save() { - this.addInfo.productList = { + if(this.valiateForm()){ + this.addInfo.productList = { productCode: this.addInfo.productList.productCode, productQuantity: this.addInfo.productList.productQuantity, productPrice: this.addInfo.productList.productPrice, productName: '' } add(this.addInfo).then(res => { - console.log(res) - if (res) { + this.setData() this.$message({ message: '保存成功', type: 'success' }) - } - }) - this.setData() + }) + } else { + this.$message({ + message: '请先完整填写报备信息', + type: 'error' + }) + } + }, close() { this.setData() @@ -462,7 +467,6 @@ this.form.countyList = res }) }, - handleAddBtn() { const obj = {} obj.brandName = '' @@ -525,6 +529,12 @@ this.$set(this.showEdit, index, false) // vue添加属性的方法 } }) + row.productCode = this.addInfo.productList.productCode + row.brandName = this.brandName + console.log(this.categoryIds) + row.categoryIds = this.categoryIds + row.productQuantity = this.addInfo.productList.productQuantity + row.productPrice = this.addInfo.productList.productPrice }, setData() { this.addInfo = { @@ -553,6 +563,17 @@ agentPhone: '', productList: [] } + }, + valiateForm() { + let arr = [] + for(var item in this.addInfo) { + if(this.addInfo[item]){ + arr.push(1) + }else{ + arr.push(0) + } + } + return arr.every(item => item === 1) } } } @@ -568,7 +589,7 @@ .report-from { .from-title { - font-size: 22px; + font-size: 16px; font-weight: bold; background-color: #28739e; color: white; diff --git a/src/api/product/category.js b/src/api/product/category.js index aea97c7..d655a11 100644 --- a/src/api/product/category.js +++ b/src/api/product/category.js @@ -69,7 +69,8 @@ return request({ url: '/categoryInfo/listExport', method: 'post', - data + data, + responseType: 'blob' }) } diff --git a/src/api/product/device.js b/src/api/product/device.js index e5b8b02..ccfa5cf 100644 --- a/src/api/product/device.js +++ b/src/api/product/device.js @@ -22,7 +22,7 @@ // 设备列表导出 const d_listExport = (data) => { - return instance.post('/deviceInfo/listExport', data) + return instance.post('/deviceInfo/listExport', data, { responseType: 'blob' }) } // 统计:累计激活设备数、今日设备在线数、今日设备在线率 diff --git a/src/api/product/product.js b/src/api/product/product.js index e4b9db1..beda1b5 100644 --- a/src/api/product/product.js +++ b/src/api/product/product.js @@ -29,5 +29,13 @@ const productDetail = (data) => { return instance.post('/productInfo/detail', data) } +// 绑定服务. +const bindServ = (data)=>{ + return instance.post('/productInfo/service/bind', data) +} +// 查询绑定列表 +const listBindService = (data)=>{ + return instance.post('productInfo/service/bindList', data) +} -export { listPage, add, update, productDelete, batchDelete, list, productDetail } +export { listPage, add, update, productDelete, batchDelete, list, productDetail, bindServ, listBindService } diff --git a/src/api/product/snCodeField.js b/src/api/product/snCodeField.js index 2d006a9..1f31976 100644 --- a/src/api/product/snCodeField.js +++ b/src/api/product/snCodeField.js @@ -19,7 +19,7 @@ // 导出 const SN_listExport = (data) => { - return instance.post(`snInfo/listExport`, data) + return instance.post(`snInfo/listExport`, data, { responseType: 'blob' }) } export { SN_listExport, SN_batchDelete, SN_listPage, SN_delete, SN_add } diff --git a/src/api/request/http.js b/src/api/request/http.js index 9a49dc5..a7f20d1 100644 --- a/src/api/request/http.js +++ b/src/api/request/http.js @@ -43,7 +43,7 @@ console.log('err ============') // 对于请求报错进行处理 Message.error(err.message) - return '' - // return Promise.reject(err) + // return '' + return Promise.reject(err) }) export { instance } diff --git a/src/api/server/operation.js b/src/api/server/operation.js index 25eb67a..404b354 100644 --- a/src/api/server/operation.js +++ b/src/api/server/operation.js @@ -1 +1,31 @@ import { instance } from '../request/http' +// 暂时无接口 +// 列表 +const listPage = (str, data) => { + return instance.post(`/serviceInfo/listPage?${str}`, data) +} +// 服务不分页 +const O_list = () => { + return instance.post(`/serviceInfo/list`, {}) +} +const O_add = (data) => { + return instance.post('/serviceInfo/add', data) +} +// 更新 +const O_update = (data) => { + return instance.post('/serviceInfo/update', data) +} +// 删除 +const O_delete = (data) => { + return instance.post('/serviceInfo/delete', data) +} +// 批量删除 +const O_batchDelete = (data) => { + return instance.post('/serviceInfo/batchDelete', data) +} + +export { + O_update, + O_batchDelete, O_delete, O_add, listPage + , O_list +} diff --git a/src/components/guadMap/index.vue b/src/components/guadMap/index.vue index 6a0fd56..a68977e 100644 --- a/src/components/guadMap/index.vue +++ b/src/components/guadMap/index.vue @@ -89,29 +89,29 @@ fetchPositionData() { getDevicePosition() .then((res) => { - // this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 - this.deviceList = [ - { - deviceName: "燃气灶", - lat: "39.97", - lon: "116.3", - }, - { - deviceName: "燃气灶", - lat: "39.93", - lon: "116.15", - }, - { - deviceName: "燃气灶", - lat: "39.8", - lon: "116.22", - }, - { - deviceName: "燃气灶", - lat: "39.74", - lon: "116.33", - }, - ]; + this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 + // this.deviceList = [ + // { + // deviceName: "燃气灶", + // lat: "39.97", + // lon: "116.3", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.93", + // lon: "116.15", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.8", + // lon: "116.22", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.74", + // lon: "116.33", + // }, + // ]; // 初始化地图 this.initMap(); }) diff --git a/src/components/mycomponent/dialog/categoryAddDialog.vue b/src/components/mycomponent/dialog/categoryAddDialog.vue index c47e73c..d06f821 100644 --- a/src/components/mycomponent/dialog/categoryAddDialog.vue +++ b/src/components/mycomponent/dialog/categoryAddDialog.vue @@ -200,7 +200,6 @@ }, save() { this.$refs['dataForm'].validate((valid) => { - console.log(this.deptForm) if (valid) { if (this.title === '品类新增') { C_add(this.categoryInfo).then(res => { diff --git a/src/components/mycomponent/dialog/deviceInfoDialog.vue b/src/components/mycomponent/dialog/deviceInfoDialog.vue index 1ca24ff..30149bc 100644 --- a/src/components/mycomponent/dialog/deviceInfoDialog.vue +++ b/src/components/mycomponent/dialog/deviceInfoDialog.vue @@ -4,159 +4,416 @@
- - - + + +
- +
-
- - - -
+ + +
+
+ + + + + +
+
+ + + + + + +
+
+ + +
+ + +
+
+
+ + +
+
+
+ + + +
+
+ + +
+
+ + +
+
+
+
+ +
+
+
+
+ + + +
+
+ + +
+
+ + +
+
+
+
+ + + +
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ + + +
+
+ + + +
+
+ + +
+
+
+
+
+ +
-
- - - - - -
-
- - - - - - -
-
- - -
- - -
-
+
-
-
- - - -
-
- - -
-
- - -
-
+
@@ -166,6 +423,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -196,6 +456,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -205,6 +466,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -223,6 +486,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -246,6 +512,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -256,6 +523,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -268,6 +536,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -284,6 +554,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -312,6 +584,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -335,6 +610,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -358,6 +636,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -392,7 +672,7 @@ }, data() { return { - navSelect: 0, // 0 1 2 为导航栏的选项 + navSelect: '0', // 0 1 2 为导航栏的选项 rowInfo: {} } }, @@ -480,6 +760,7 @@ } .content_content { + padding: 0px 10px; // padding: 20px 0 60px 0; // box-sizing: border-box; diff --git a/src/components/mycomponent/dialog/productBindDialog.vue b/src/components/mycomponent/dialog/productBindDialog.vue index 0ce020b..d387996 100644 --- a/src/components/mycomponent/dialog/productBindDialog.vue +++ b/src/components/mycomponent/dialog/productBindDialog.vue @@ -17,16 +17,16 @@ 添加服务
- - + + @@ -38,7 +38,7 @@
- + 保存 @@ -49,8 +49,8 @@ + diff --git a/src/components/mycomponent/input/inputVue.vue b/src/components/mycomponent/input/inputVue.vue index 8a50163..1c0cba5 100644 --- a/src/components/mycomponent/input/inputVue.vue +++ b/src/components/mycomponent/input/inputVue.vue @@ -7,7 +7,7 @@
- +
@@ -23,6 +23,10 @@ event: 'changeinput' }, props: { + readable: { + type: Boolean, + default: false + }, redStar: false, title: '', width: '', @@ -71,4 +75,16 @@ min-width: 68.45px; margin-right: 10px } + .readinput{ + + } + + diff --git a/src/utils/myUtils/mixins/infoDialog.js b/src/utils/myUtils/mixins/infoDialog.js index 4c492f3..ac6af5b 100644 --- a/src/utils/myUtils/mixins/infoDialog.js +++ b/src/utils/myUtils/mixins/infoDialog.js @@ -2,7 +2,7 @@ props: { isShowInfo: { type: Boolean, - default: true + default: false }, // title: '', dataInfo: { diff --git a/src/utils/myUtils/mixins/listPage.js b/src/utils/myUtils/mixins/listPage.js index 07f3141..9b8c399 100644 --- a/src/utils/myUtils/mixins/listPage.js +++ b/src/utils/myUtils/mixins/listPage.js @@ -1,6 +1,7 @@ const listMixin = { data() { return { + loading: false, tableData: { rows: [] }, // 品牌表格数据 limit: 10, // 当前的行数 offset: 1, // 当前页 @@ -24,7 +25,7 @@ selectData() { this.queryInfo = { ...this.selectInfo } // 加入搜索内容 // 回到初始页 - if (this.offset == 1) { + if (this.offset === 1) { this.refresh() return } diff --git a/src/views/business/historyBusiness.vue b/src/views/business/historyBusiness.vue index bddce18..4398baa 100644 --- a/src/views/business/historyBusiness.vue +++ b/src/views/business/historyBusiness.vue @@ -13,7 +13,7 @@
预计工期
- +
diff --git a/src/views/business/report.vue b/src/views/business/report.vue index 33c1a3d..d833399 100644 --- a/src/views/business/report.vue +++ b/src/views/business/report.vue @@ -316,12 +316,12 @@
-
+
+
添加项目需求
-
@@ -421,22 +421,27 @@ }, methods: { save() { - this.addInfo.productList = { + if(this.valiateForm()){ + this.addInfo.productList = { productCode: this.addInfo.productList.productCode, productQuantity: this.addInfo.productList.productQuantity, productPrice: this.addInfo.productList.productPrice, productName: '' } add(this.addInfo).then(res => { - console.log(res) - if (res) { + this.setData() this.$message({ message: '保存成功', type: 'success' }) - } - }) - this.setData() + }) + } else { + this.$message({ + message: '请先完整填写报备信息', + type: 'error' + }) + } + }, close() { this.setData() @@ -462,7 +467,6 @@ this.form.countyList = res }) }, - handleAddBtn() { const obj = {} obj.brandName = '' @@ -525,6 +529,12 @@ this.$set(this.showEdit, index, false) // vue添加属性的方法 } }) + row.productCode = this.addInfo.productList.productCode + row.brandName = this.brandName + console.log(this.categoryIds) + row.categoryIds = this.categoryIds + row.productQuantity = this.addInfo.productList.productQuantity + row.productPrice = this.addInfo.productList.productPrice }, setData() { this.addInfo = { @@ -553,6 +563,17 @@ agentPhone: '', productList: [] } + }, + valiateForm() { + let arr = [] + for(var item in this.addInfo) { + if(this.addInfo[item]){ + arr.push(1) + }else{ + arr.push(0) + } + } + return arr.every(item => item === 1) } } } @@ -568,7 +589,7 @@ .report-from { .from-title { - font-size: 22px; + font-size: 16px; font-weight: bold; background-color: #28739e; color: white; diff --git a/src/views/operation/retailerList.vue b/src/views/operation/retailerList.vue index 4f061c8..2964d08 100644 --- a/src/views/operation/retailerList.vue +++ b/src/views/operation/retailerList.vue @@ -68,12 +68,11 @@
- - - - - - + + @@ -103,21 +102,6 @@ address3: '0.5', address4: '每天必做' } - // { - // date: '2016-05-04', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1517 弄' - // }, - // { - // date: '2016-05-01', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1519 弄' - // }, - // { - // date: '2016-05-03', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1516 弄' - // } ], options: [ { @@ -125,7 +109,8 @@ label: '黄金糕' } ], - value: '' + value: '', + input:'' } }, methods: { diff --git a/src/api/product/category.js b/src/api/product/category.js index aea97c7..d655a11 100644 --- a/src/api/product/category.js +++ b/src/api/product/category.js @@ -69,7 +69,8 @@ return request({ url: '/categoryInfo/listExport', method: 'post', - data + data, + responseType: 'blob' }) } diff --git a/src/api/product/device.js b/src/api/product/device.js index e5b8b02..ccfa5cf 100644 --- a/src/api/product/device.js +++ b/src/api/product/device.js @@ -22,7 +22,7 @@ // 设备列表导出 const d_listExport = (data) => { - return instance.post('/deviceInfo/listExport', data) + return instance.post('/deviceInfo/listExport', data, { responseType: 'blob' }) } // 统计:累计激活设备数、今日设备在线数、今日设备在线率 diff --git a/src/api/product/product.js b/src/api/product/product.js index e4b9db1..beda1b5 100644 --- a/src/api/product/product.js +++ b/src/api/product/product.js @@ -29,5 +29,13 @@ const productDetail = (data) => { return instance.post('/productInfo/detail', data) } +// 绑定服务. +const bindServ = (data)=>{ + return instance.post('/productInfo/service/bind', data) +} +// 查询绑定列表 +const listBindService = (data)=>{ + return instance.post('productInfo/service/bindList', data) +} -export { listPage, add, update, productDelete, batchDelete, list, productDetail } +export { listPage, add, update, productDelete, batchDelete, list, productDetail, bindServ, listBindService } diff --git a/src/api/product/snCodeField.js b/src/api/product/snCodeField.js index 2d006a9..1f31976 100644 --- a/src/api/product/snCodeField.js +++ b/src/api/product/snCodeField.js @@ -19,7 +19,7 @@ // 导出 const SN_listExport = (data) => { - return instance.post(`snInfo/listExport`, data) + return instance.post(`snInfo/listExport`, data, { responseType: 'blob' }) } export { SN_listExport, SN_batchDelete, SN_listPage, SN_delete, SN_add } diff --git a/src/api/request/http.js b/src/api/request/http.js index 9a49dc5..a7f20d1 100644 --- a/src/api/request/http.js +++ b/src/api/request/http.js @@ -43,7 +43,7 @@ console.log('err ============') // 对于请求报错进行处理 Message.error(err.message) - return '' - // return Promise.reject(err) + // return '' + return Promise.reject(err) }) export { instance } diff --git a/src/api/server/operation.js b/src/api/server/operation.js index 25eb67a..404b354 100644 --- a/src/api/server/operation.js +++ b/src/api/server/operation.js @@ -1 +1,31 @@ import { instance } from '../request/http' +// 暂时无接口 +// 列表 +const listPage = (str, data) => { + return instance.post(`/serviceInfo/listPage?${str}`, data) +} +// 服务不分页 +const O_list = () => { + return instance.post(`/serviceInfo/list`, {}) +} +const O_add = (data) => { + return instance.post('/serviceInfo/add', data) +} +// 更新 +const O_update = (data) => { + return instance.post('/serviceInfo/update', data) +} +// 删除 +const O_delete = (data) => { + return instance.post('/serviceInfo/delete', data) +} +// 批量删除 +const O_batchDelete = (data) => { + return instance.post('/serviceInfo/batchDelete', data) +} + +export { + O_update, + O_batchDelete, O_delete, O_add, listPage + , O_list +} diff --git a/src/components/guadMap/index.vue b/src/components/guadMap/index.vue index 6a0fd56..a68977e 100644 --- a/src/components/guadMap/index.vue +++ b/src/components/guadMap/index.vue @@ -89,29 +89,29 @@ fetchPositionData() { getDevicePosition() .then((res) => { - // this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 - this.deviceList = [ - { - deviceName: "燃气灶", - lat: "39.97", - lon: "116.3", - }, - { - deviceName: "燃气灶", - lat: "39.93", - lon: "116.15", - }, - { - deviceName: "燃气灶", - lat: "39.8", - lon: "116.22", - }, - { - deviceName: "燃气灶", - lat: "39.74", - lon: "116.33", - }, - ]; + this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 + // this.deviceList = [ + // { + // deviceName: "燃气灶", + // lat: "39.97", + // lon: "116.3", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.93", + // lon: "116.15", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.8", + // lon: "116.22", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.74", + // lon: "116.33", + // }, + // ]; // 初始化地图 this.initMap(); }) diff --git a/src/components/mycomponent/dialog/categoryAddDialog.vue b/src/components/mycomponent/dialog/categoryAddDialog.vue index c47e73c..d06f821 100644 --- a/src/components/mycomponent/dialog/categoryAddDialog.vue +++ b/src/components/mycomponent/dialog/categoryAddDialog.vue @@ -200,7 +200,6 @@ }, save() { this.$refs['dataForm'].validate((valid) => { - console.log(this.deptForm) if (valid) { if (this.title === '品类新增') { C_add(this.categoryInfo).then(res => { diff --git a/src/components/mycomponent/dialog/deviceInfoDialog.vue b/src/components/mycomponent/dialog/deviceInfoDialog.vue index 1ca24ff..30149bc 100644 --- a/src/components/mycomponent/dialog/deviceInfoDialog.vue +++ b/src/components/mycomponent/dialog/deviceInfoDialog.vue @@ -4,159 +4,416 @@
- - - + + +
- +
-
- - - -
+ + +
+
+ + + + + +
+
+ + + + + + +
+
+ + +
+ + +
+
+
+ + +
+
+
+ + + +
+
+ + +
+
+ + +
+
+
+
+ +
+
+
+
+ + + +
+
+ + +
+
+ + +
+
+
+
+ + + +
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ + + +
+
+ + + +
+
+ + +
+
+
+
+
+ +
-
- - - - - -
-
- - - - - - -
-
- - -
- - -
-
+
-
-
- - - -
-
- - -
-
- - -
-
+
@@ -166,6 +423,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -196,6 +456,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -205,6 +466,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -223,6 +486,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -246,6 +512,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -256,6 +523,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -268,6 +536,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -284,6 +554,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -312,6 +584,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -335,6 +610,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -358,6 +636,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -392,7 +672,7 @@ }, data() { return { - navSelect: 0, // 0 1 2 为导航栏的选项 + navSelect: '0', // 0 1 2 为导航栏的选项 rowInfo: {} } }, @@ -480,6 +760,7 @@ } .content_content { + padding: 0px 10px; // padding: 20px 0 60px 0; // box-sizing: border-box; diff --git a/src/components/mycomponent/dialog/productBindDialog.vue b/src/components/mycomponent/dialog/productBindDialog.vue index 0ce020b..d387996 100644 --- a/src/components/mycomponent/dialog/productBindDialog.vue +++ b/src/components/mycomponent/dialog/productBindDialog.vue @@ -17,16 +17,16 @@ 添加服务
- - + + @@ -38,7 +38,7 @@
- + 保存 @@ -49,8 +49,8 @@ + diff --git a/src/components/mycomponent/input/inputVue.vue b/src/components/mycomponent/input/inputVue.vue index 8a50163..1c0cba5 100644 --- a/src/components/mycomponent/input/inputVue.vue +++ b/src/components/mycomponent/input/inputVue.vue @@ -7,7 +7,7 @@
- +
@@ -23,6 +23,10 @@ event: 'changeinput' }, props: { + readable: { + type: Boolean, + default: false + }, redStar: false, title: '', width: '', @@ -71,4 +75,16 @@ min-width: 68.45px; margin-right: 10px } + .readinput{ + + } + + diff --git a/src/utils/myUtils/mixins/infoDialog.js b/src/utils/myUtils/mixins/infoDialog.js index 4c492f3..ac6af5b 100644 --- a/src/utils/myUtils/mixins/infoDialog.js +++ b/src/utils/myUtils/mixins/infoDialog.js @@ -2,7 +2,7 @@ props: { isShowInfo: { type: Boolean, - default: true + default: false }, // title: '', dataInfo: { diff --git a/src/utils/myUtils/mixins/listPage.js b/src/utils/myUtils/mixins/listPage.js index 07f3141..9b8c399 100644 --- a/src/utils/myUtils/mixins/listPage.js +++ b/src/utils/myUtils/mixins/listPage.js @@ -1,6 +1,7 @@ const listMixin = { data() { return { + loading: false, tableData: { rows: [] }, // 品牌表格数据 limit: 10, // 当前的行数 offset: 1, // 当前页 @@ -24,7 +25,7 @@ selectData() { this.queryInfo = { ...this.selectInfo } // 加入搜索内容 // 回到初始页 - if (this.offset == 1) { + if (this.offset === 1) { this.refresh() return } diff --git a/src/views/business/historyBusiness.vue b/src/views/business/historyBusiness.vue index bddce18..4398baa 100644 --- a/src/views/business/historyBusiness.vue +++ b/src/views/business/historyBusiness.vue @@ -13,7 +13,7 @@ 预计工期
- +
diff --git a/src/views/business/report.vue b/src/views/business/report.vue index 33c1a3d..d833399 100644 --- a/src/views/business/report.vue +++ b/src/views/business/report.vue @@ -316,12 +316,12 @@
-
+
+
添加项目需求
-
@@ -421,22 +421,27 @@ }, methods: { save() { - this.addInfo.productList = { + if(this.valiateForm()){ + this.addInfo.productList = { productCode: this.addInfo.productList.productCode, productQuantity: this.addInfo.productList.productQuantity, productPrice: this.addInfo.productList.productPrice, productName: '' } add(this.addInfo).then(res => { - console.log(res) - if (res) { + this.setData() this.$message({ message: '保存成功', type: 'success' }) - } - }) - this.setData() + }) + } else { + this.$message({ + message: '请先完整填写报备信息', + type: 'error' + }) + } + }, close() { this.setData() @@ -462,7 +467,6 @@ this.form.countyList = res }) }, - handleAddBtn() { const obj = {} obj.brandName = '' @@ -525,6 +529,12 @@ this.$set(this.showEdit, index, false) // vue添加属性的方法 } }) + row.productCode = this.addInfo.productList.productCode + row.brandName = this.brandName + console.log(this.categoryIds) + row.categoryIds = this.categoryIds + row.productQuantity = this.addInfo.productList.productQuantity + row.productPrice = this.addInfo.productList.productPrice }, setData() { this.addInfo = { @@ -553,6 +563,17 @@ agentPhone: '', productList: [] } + }, + valiateForm() { + let arr = [] + for(var item in this.addInfo) { + if(this.addInfo[item]){ + arr.push(1) + }else{ + arr.push(0) + } + } + return arr.every(item => item === 1) } } } @@ -568,7 +589,7 @@ .report-from { .from-title { - font-size: 22px; + font-size: 16px; font-weight: bold; background-color: #28739e; color: white; diff --git a/src/views/operation/retailerList.vue b/src/views/operation/retailerList.vue index 4f061c8..2964d08 100644 --- a/src/views/operation/retailerList.vue +++ b/src/views/operation/retailerList.vue @@ -68,12 +68,11 @@
- - - - - - + + @@ -103,21 +102,6 @@ address3: '0.5', address4: '每天必做' } - // { - // date: '2016-05-04', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1517 弄' - // }, - // { - // date: '2016-05-01', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1519 弄' - // }, - // { - // date: '2016-05-03', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1516 弄' - // } ], options: [ { @@ -125,7 +109,8 @@ label: '黄金糕' } ], - value: '' + value: '', + input:'' } }, methods: { diff --git a/src/views/operation/watchList.vue b/src/views/operation/watchList.vue index 1b06442..af68692 100644 --- a/src/views/operation/watchList.vue +++ b/src/views/operation/watchList.vue @@ -129,21 +129,6 @@ address4: '100元', address5: '是' } - // { - // date: '2016-05-04', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1517 弄' - // }, - // { - // date: '2016-05-01', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1519 弄' - // }, - // { - // date: '2016-05-03', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1516 弄' - // } ], options: [ { diff --git a/src/api/product/category.js b/src/api/product/category.js index aea97c7..d655a11 100644 --- a/src/api/product/category.js +++ b/src/api/product/category.js @@ -69,7 +69,8 @@ return request({ url: '/categoryInfo/listExport', method: 'post', - data + data, + responseType: 'blob' }) } diff --git a/src/api/product/device.js b/src/api/product/device.js index e5b8b02..ccfa5cf 100644 --- a/src/api/product/device.js +++ b/src/api/product/device.js @@ -22,7 +22,7 @@ // 设备列表导出 const d_listExport = (data) => { - return instance.post('/deviceInfo/listExport', data) + return instance.post('/deviceInfo/listExport', data, { responseType: 'blob' }) } // 统计:累计激活设备数、今日设备在线数、今日设备在线率 diff --git a/src/api/product/product.js b/src/api/product/product.js index e4b9db1..beda1b5 100644 --- a/src/api/product/product.js +++ b/src/api/product/product.js @@ -29,5 +29,13 @@ const productDetail = (data) => { return instance.post('/productInfo/detail', data) } +// 绑定服务. +const bindServ = (data)=>{ + return instance.post('/productInfo/service/bind', data) +} +// 查询绑定列表 +const listBindService = (data)=>{ + return instance.post('productInfo/service/bindList', data) +} -export { listPage, add, update, productDelete, batchDelete, list, productDetail } +export { listPage, add, update, productDelete, batchDelete, list, productDetail, bindServ, listBindService } diff --git a/src/api/product/snCodeField.js b/src/api/product/snCodeField.js index 2d006a9..1f31976 100644 --- a/src/api/product/snCodeField.js +++ b/src/api/product/snCodeField.js @@ -19,7 +19,7 @@ // 导出 const SN_listExport = (data) => { - return instance.post(`snInfo/listExport`, data) + return instance.post(`snInfo/listExport`, data, { responseType: 'blob' }) } export { SN_listExport, SN_batchDelete, SN_listPage, SN_delete, SN_add } diff --git a/src/api/request/http.js b/src/api/request/http.js index 9a49dc5..a7f20d1 100644 --- a/src/api/request/http.js +++ b/src/api/request/http.js @@ -43,7 +43,7 @@ console.log('err ============') // 对于请求报错进行处理 Message.error(err.message) - return '' - // return Promise.reject(err) + // return '' + return Promise.reject(err) }) export { instance } diff --git a/src/api/server/operation.js b/src/api/server/operation.js index 25eb67a..404b354 100644 --- a/src/api/server/operation.js +++ b/src/api/server/operation.js @@ -1 +1,31 @@ import { instance } from '../request/http' +// 暂时无接口 +// 列表 +const listPage = (str, data) => { + return instance.post(`/serviceInfo/listPage?${str}`, data) +} +// 服务不分页 +const O_list = () => { + return instance.post(`/serviceInfo/list`, {}) +} +const O_add = (data) => { + return instance.post('/serviceInfo/add', data) +} +// 更新 +const O_update = (data) => { + return instance.post('/serviceInfo/update', data) +} +// 删除 +const O_delete = (data) => { + return instance.post('/serviceInfo/delete', data) +} +// 批量删除 +const O_batchDelete = (data) => { + return instance.post('/serviceInfo/batchDelete', data) +} + +export { + O_update, + O_batchDelete, O_delete, O_add, listPage + , O_list +} diff --git a/src/components/guadMap/index.vue b/src/components/guadMap/index.vue index 6a0fd56..a68977e 100644 --- a/src/components/guadMap/index.vue +++ b/src/components/guadMap/index.vue @@ -89,29 +89,29 @@ fetchPositionData() { getDevicePosition() .then((res) => { - // this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 - this.deviceList = [ - { - deviceName: "燃气灶", - lat: "39.97", - lon: "116.3", - }, - { - deviceName: "燃气灶", - lat: "39.93", - lon: "116.15", - }, - { - deviceName: "燃气灶", - lat: "39.8", - lon: "116.22", - }, - { - deviceName: "燃气灶", - lat: "39.74", - lon: "116.33", - }, - ]; + this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 + // this.deviceList = [ + // { + // deviceName: "燃气灶", + // lat: "39.97", + // lon: "116.3", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.93", + // lon: "116.15", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.8", + // lon: "116.22", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.74", + // lon: "116.33", + // }, + // ]; // 初始化地图 this.initMap(); }) diff --git a/src/components/mycomponent/dialog/categoryAddDialog.vue b/src/components/mycomponent/dialog/categoryAddDialog.vue index c47e73c..d06f821 100644 --- a/src/components/mycomponent/dialog/categoryAddDialog.vue +++ b/src/components/mycomponent/dialog/categoryAddDialog.vue @@ -200,7 +200,6 @@ }, save() { this.$refs['dataForm'].validate((valid) => { - console.log(this.deptForm) if (valid) { if (this.title === '品类新增') { C_add(this.categoryInfo).then(res => { diff --git a/src/components/mycomponent/dialog/deviceInfoDialog.vue b/src/components/mycomponent/dialog/deviceInfoDialog.vue index 1ca24ff..30149bc 100644 --- a/src/components/mycomponent/dialog/deviceInfoDialog.vue +++ b/src/components/mycomponent/dialog/deviceInfoDialog.vue @@ -4,159 +4,416 @@
- - - + + +
- +
-
- - - -
+ + +
+
+ + + + + +
+
+ + + + + + +
+
+ + +
+ + +
+
+
+ + +
+
+
+ + + +
+
+ + +
+
+ + +
+
+
+
+ +
+
+
+
+ + + +
+
+ + +
+
+ + +
+
+
+
+ + + +
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ + + +
+
+ + + +
+
+ + +
+
+
+
+
+ +
-
- - - - - -
-
- - - - - - -
-
- - -
- - -
-
+
-
-
- - - -
-
- - -
-
- - -
-
+
@@ -166,6 +423,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -196,6 +456,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -205,6 +466,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -223,6 +486,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -246,6 +512,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -256,6 +523,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -268,6 +536,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -284,6 +554,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -312,6 +584,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -335,6 +610,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -358,6 +636,7 @@ width="200px" style="justify-content: space-between;" :disabled="true" + readable />
@@ -392,7 +672,7 @@ }, data() { return { - navSelect: 0, // 0 1 2 为导航栏的选项 + navSelect: '0', // 0 1 2 为导航栏的选项 rowInfo: {} } }, @@ -480,6 +760,7 @@ } .content_content { + padding: 0px 10px; // padding: 20px 0 60px 0; // box-sizing: border-box; diff --git a/src/components/mycomponent/dialog/productBindDialog.vue b/src/components/mycomponent/dialog/productBindDialog.vue index 0ce020b..d387996 100644 --- a/src/components/mycomponent/dialog/productBindDialog.vue +++ b/src/components/mycomponent/dialog/productBindDialog.vue @@ -17,16 +17,16 @@ 添加服务
- - + + @@ -38,7 +38,7 @@
- + 保存 @@ -49,8 +49,8 @@ + diff --git a/src/components/mycomponent/input/inputVue.vue b/src/components/mycomponent/input/inputVue.vue index 8a50163..1c0cba5 100644 --- a/src/components/mycomponent/input/inputVue.vue +++ b/src/components/mycomponent/input/inputVue.vue @@ -7,7 +7,7 @@
- +
@@ -23,6 +23,10 @@ event: 'changeinput' }, props: { + readable: { + type: Boolean, + default: false + }, redStar: false, title: '', width: '', @@ -71,4 +75,16 @@ min-width: 68.45px; margin-right: 10px } + .readinput{ + + } + + diff --git a/src/utils/myUtils/mixins/infoDialog.js b/src/utils/myUtils/mixins/infoDialog.js index 4c492f3..ac6af5b 100644 --- a/src/utils/myUtils/mixins/infoDialog.js +++ b/src/utils/myUtils/mixins/infoDialog.js @@ -2,7 +2,7 @@ props: { isShowInfo: { type: Boolean, - default: true + default: false }, // title: '', dataInfo: { diff --git a/src/utils/myUtils/mixins/listPage.js b/src/utils/myUtils/mixins/listPage.js index 07f3141..9b8c399 100644 --- a/src/utils/myUtils/mixins/listPage.js +++ b/src/utils/myUtils/mixins/listPage.js @@ -1,6 +1,7 @@ const listMixin = { data() { return { + loading: false, tableData: { rows: [] }, // 品牌表格数据 limit: 10, // 当前的行数 offset: 1, // 当前页 @@ -24,7 +25,7 @@ selectData() { this.queryInfo = { ...this.selectInfo } // 加入搜索内容 // 回到初始页 - if (this.offset == 1) { + if (this.offset === 1) { this.refresh() return } diff --git a/src/views/business/historyBusiness.vue b/src/views/business/historyBusiness.vue index bddce18..4398baa 100644 --- a/src/views/business/historyBusiness.vue +++ b/src/views/business/historyBusiness.vue @@ -13,7 +13,7 @@ 预计工期
- +
diff --git a/src/views/business/report.vue b/src/views/business/report.vue index 33c1a3d..d833399 100644 --- a/src/views/business/report.vue +++ b/src/views/business/report.vue @@ -316,12 +316,12 @@
-
+
+
添加项目需求
-
@@ -421,22 +421,27 @@ }, methods: { save() { - this.addInfo.productList = { + if(this.valiateForm()){ + this.addInfo.productList = { productCode: this.addInfo.productList.productCode, productQuantity: this.addInfo.productList.productQuantity, productPrice: this.addInfo.productList.productPrice, productName: '' } add(this.addInfo).then(res => { - console.log(res) - if (res) { + this.setData() this.$message({ message: '保存成功', type: 'success' }) - } - }) - this.setData() + }) + } else { + this.$message({ + message: '请先完整填写报备信息', + type: 'error' + }) + } + }, close() { this.setData() @@ -462,7 +467,6 @@ this.form.countyList = res }) }, - handleAddBtn() { const obj = {} obj.brandName = '' @@ -525,6 +529,12 @@ this.$set(this.showEdit, index, false) // vue添加属性的方法 } }) + row.productCode = this.addInfo.productList.productCode + row.brandName = this.brandName + console.log(this.categoryIds) + row.categoryIds = this.categoryIds + row.productQuantity = this.addInfo.productList.productQuantity + row.productPrice = this.addInfo.productList.productPrice }, setData() { this.addInfo = { @@ -553,6 +563,17 @@ agentPhone: '', productList: [] } + }, + valiateForm() { + let arr = [] + for(var item in this.addInfo) { + if(this.addInfo[item]){ + arr.push(1) + }else{ + arr.push(0) + } + } + return arr.every(item => item === 1) } } } @@ -568,7 +589,7 @@ .report-from { .from-title { - font-size: 22px; + font-size: 16px; font-weight: bold; background-color: #28739e; color: white; diff --git a/src/views/operation/retailerList.vue b/src/views/operation/retailerList.vue index 4f061c8..2964d08 100644 --- a/src/views/operation/retailerList.vue +++ b/src/views/operation/retailerList.vue @@ -68,12 +68,11 @@
- - - - - - + + @@ -103,21 +102,6 @@ address3: '0.5', address4: '每天必做' } - // { - // date: '2016-05-04', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1517 弄' - // }, - // { - // date: '2016-05-01', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1519 弄' - // }, - // { - // date: '2016-05-03', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1516 弄' - // } ], options: [ { @@ -125,7 +109,8 @@ label: '黄金糕' } ], - value: '' + value: '', + input:'' } }, methods: { diff --git a/src/views/operation/watchList.vue b/src/views/operation/watchList.vue index 1b06442..af68692 100644 --- a/src/views/operation/watchList.vue +++ b/src/views/operation/watchList.vue @@ -129,21 +129,6 @@ address4: '100元', address5: '是' } - // { - // date: '2016-05-04', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1517 弄' - // }, - // { - // date: '2016-05-01', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1519 弄' - // }, - // { - // date: '2016-05-03', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1516 弄' - // } ], options: [ { diff --git a/src/views/order/orderShop.vue b/src/views/order/orderShop.vue index 1874202..36c7c50 100644 --- a/src/views/order/orderShop.vue +++ b/src/views/order/orderShop.vue @@ -2,30 +2,52 @@ @@ -23,6 +23,10 @@ event: 'changeinput' }, props: { + readable: { + type: Boolean, + default: false + }, redStar: false, title: '', width: '', @@ -71,4 +75,16 @@ min-width: 68.45px; margin-right: 10px } + .readinput{ + + } + + diff --git a/src/utils/myUtils/mixins/infoDialog.js b/src/utils/myUtils/mixins/infoDialog.js index 4c492f3..ac6af5b 100644 --- a/src/utils/myUtils/mixins/infoDialog.js +++ b/src/utils/myUtils/mixins/infoDialog.js @@ -2,7 +2,7 @@ props: { isShowInfo: { type: Boolean, - default: true + default: false }, // title: '', dataInfo: { diff --git a/src/utils/myUtils/mixins/listPage.js b/src/utils/myUtils/mixins/listPage.js index 07f3141..9b8c399 100644 --- a/src/utils/myUtils/mixins/listPage.js +++ b/src/utils/myUtils/mixins/listPage.js @@ -1,6 +1,7 @@ const listMixin = { data() { return { + loading: false, tableData: { rows: [] }, // 品牌表格数据 limit: 10, // 当前的行数 offset: 1, // 当前页 @@ -24,7 +25,7 @@ selectData() { this.queryInfo = { ...this.selectInfo } // 加入搜索内容 // 回到初始页 - if (this.offset == 1) { + if (this.offset === 1) { this.refresh() return } diff --git a/src/views/business/historyBusiness.vue b/src/views/business/historyBusiness.vue index bddce18..4398baa 100644 --- a/src/views/business/historyBusiness.vue +++ b/src/views/business/historyBusiness.vue @@ -13,7 +13,7 @@ 预计工期
- +
diff --git a/src/views/business/report.vue b/src/views/business/report.vue index 33c1a3d..d833399 100644 --- a/src/views/business/report.vue +++ b/src/views/business/report.vue @@ -316,12 +316,12 @@
-
+
+
添加项目需求
-
@@ -421,22 +421,27 @@ }, methods: { save() { - this.addInfo.productList = { + if(this.valiateForm()){ + this.addInfo.productList = { productCode: this.addInfo.productList.productCode, productQuantity: this.addInfo.productList.productQuantity, productPrice: this.addInfo.productList.productPrice, productName: '' } add(this.addInfo).then(res => { - console.log(res) - if (res) { + this.setData() this.$message({ message: '保存成功', type: 'success' }) - } - }) - this.setData() + }) + } else { + this.$message({ + message: '请先完整填写报备信息', + type: 'error' + }) + } + }, close() { this.setData() @@ -462,7 +467,6 @@ this.form.countyList = res }) }, - handleAddBtn() { const obj = {} obj.brandName = '' @@ -525,6 +529,12 @@ this.$set(this.showEdit, index, false) // vue添加属性的方法 } }) + row.productCode = this.addInfo.productList.productCode + row.brandName = this.brandName + console.log(this.categoryIds) + row.categoryIds = this.categoryIds + row.productQuantity = this.addInfo.productList.productQuantity + row.productPrice = this.addInfo.productList.productPrice }, setData() { this.addInfo = { @@ -553,6 +563,17 @@ agentPhone: '', productList: [] } + }, + valiateForm() { + let arr = [] + for(var item in this.addInfo) { + if(this.addInfo[item]){ + arr.push(1) + }else{ + arr.push(0) + } + } + return arr.every(item => item === 1) } } } @@ -568,7 +589,7 @@ .report-from { .from-title { - font-size: 22px; + font-size: 16px; font-weight: bold; background-color: #28739e; color: white; diff --git a/src/views/operation/retailerList.vue b/src/views/operation/retailerList.vue index 4f061c8..2964d08 100644 --- a/src/views/operation/retailerList.vue +++ b/src/views/operation/retailerList.vue @@ -68,12 +68,11 @@
- - - - - - + + @@ -103,21 +102,6 @@ address3: '0.5', address4: '每天必做' } - // { - // date: '2016-05-04', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1517 弄' - // }, - // { - // date: '2016-05-01', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1519 弄' - // }, - // { - // date: '2016-05-03', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1516 弄' - // } ], options: [ { @@ -125,7 +109,8 @@ label: '黄金糕' } ], - value: '' + value: '', + input:'' } }, methods: { diff --git a/src/views/operation/watchList.vue b/src/views/operation/watchList.vue index 1b06442..af68692 100644 --- a/src/views/operation/watchList.vue +++ b/src/views/operation/watchList.vue @@ -129,21 +129,6 @@ address4: '100元', address5: '是' } - // { - // date: '2016-05-04', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1517 弄' - // }, - // { - // date: '2016-05-01', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1519 弄' - // }, - // { - // date: '2016-05-03', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1516 弄' - // } ], options: [ { diff --git a/src/views/order/orderShop.vue b/src/views/order/orderShop.vue index 1874202..36c7c50 100644 --- a/src/views/order/orderShop.vue +++ b/src/views/order/orderShop.vue @@ -2,30 +2,52 @@ @@ -23,6 +23,10 @@ event: 'changeinput' }, props: { + readable: { + type: Boolean, + default: false + }, redStar: false, title: '', width: '', @@ -71,4 +75,16 @@ min-width: 68.45px; margin-right: 10px } + .readinput{ + + } + + diff --git a/src/utils/myUtils/mixins/infoDialog.js b/src/utils/myUtils/mixins/infoDialog.js index 4c492f3..ac6af5b 100644 --- a/src/utils/myUtils/mixins/infoDialog.js +++ b/src/utils/myUtils/mixins/infoDialog.js @@ -2,7 +2,7 @@ props: { isShowInfo: { type: Boolean, - default: true + default: false }, // title: '', dataInfo: { diff --git a/src/utils/myUtils/mixins/listPage.js b/src/utils/myUtils/mixins/listPage.js index 07f3141..9b8c399 100644 --- a/src/utils/myUtils/mixins/listPage.js +++ b/src/utils/myUtils/mixins/listPage.js @@ -1,6 +1,7 @@ const listMixin = { data() { return { + loading: false, tableData: { rows: [] }, // 品牌表格数据 limit: 10, // 当前的行数 offset: 1, // 当前页 @@ -24,7 +25,7 @@ selectData() { this.queryInfo = { ...this.selectInfo } // 加入搜索内容 // 回到初始页 - if (this.offset == 1) { + if (this.offset === 1) { this.refresh() return } diff --git a/src/views/business/historyBusiness.vue b/src/views/business/historyBusiness.vue index bddce18..4398baa 100644 --- a/src/views/business/historyBusiness.vue +++ b/src/views/business/historyBusiness.vue @@ -13,7 +13,7 @@ 预计工期
- +
diff --git a/src/views/business/report.vue b/src/views/business/report.vue index 33c1a3d..d833399 100644 --- a/src/views/business/report.vue +++ b/src/views/business/report.vue @@ -316,12 +316,12 @@
-
+
+
添加项目需求
-
@@ -421,22 +421,27 @@ }, methods: { save() { - this.addInfo.productList = { + if(this.valiateForm()){ + this.addInfo.productList = { productCode: this.addInfo.productList.productCode, productQuantity: this.addInfo.productList.productQuantity, productPrice: this.addInfo.productList.productPrice, productName: '' } add(this.addInfo).then(res => { - console.log(res) - if (res) { + this.setData() this.$message({ message: '保存成功', type: 'success' }) - } - }) - this.setData() + }) + } else { + this.$message({ + message: '请先完整填写报备信息', + type: 'error' + }) + } + }, close() { this.setData() @@ -462,7 +467,6 @@ this.form.countyList = res }) }, - handleAddBtn() { const obj = {} obj.brandName = '' @@ -525,6 +529,12 @@ this.$set(this.showEdit, index, false) // vue添加属性的方法 } }) + row.productCode = this.addInfo.productList.productCode + row.brandName = this.brandName + console.log(this.categoryIds) + row.categoryIds = this.categoryIds + row.productQuantity = this.addInfo.productList.productQuantity + row.productPrice = this.addInfo.productList.productPrice }, setData() { this.addInfo = { @@ -553,6 +563,17 @@ agentPhone: '', productList: [] } + }, + valiateForm() { + let arr = [] + for(var item in this.addInfo) { + if(this.addInfo[item]){ + arr.push(1) + }else{ + arr.push(0) + } + } + return arr.every(item => item === 1) } } } @@ -568,7 +589,7 @@ .report-from { .from-title { - font-size: 22px; + font-size: 16px; font-weight: bold; background-color: #28739e; color: white; diff --git a/src/views/operation/retailerList.vue b/src/views/operation/retailerList.vue index 4f061c8..2964d08 100644 --- a/src/views/operation/retailerList.vue +++ b/src/views/operation/retailerList.vue @@ -68,12 +68,11 @@
- - - - - - + + @@ -103,21 +102,6 @@ address3: '0.5', address4: '每天必做' } - // { - // date: '2016-05-04', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1517 弄' - // }, - // { - // date: '2016-05-01', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1519 弄' - // }, - // { - // date: '2016-05-03', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1516 弄' - // } ], options: [ { @@ -125,7 +109,8 @@ label: '黄金糕' } ], - value: '' + value: '', + input:'' } }, methods: { diff --git a/src/views/operation/watchList.vue b/src/views/operation/watchList.vue index 1b06442..af68692 100644 --- a/src/views/operation/watchList.vue +++ b/src/views/operation/watchList.vue @@ -129,21 +129,6 @@ address4: '100元', address5: '是' } - // { - // date: '2016-05-04', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1517 弄' - // }, - // { - // date: '2016-05-01', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1519 弄' - // }, - // { - // date: '2016-05-03', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1516 弄' - // } ], options: [ { diff --git a/src/views/order/orderShop.vue b/src/views/order/orderShop.vue index 1874202..36c7c50 100644 --- a/src/views/order/orderShop.vue +++ b/src/views/order/orderShop.vue @@ -2,30 +2,52 @@ @@ -23,6 +23,10 @@ event: 'changeinput' }, props: { + readable: { + type: Boolean, + default: false + }, redStar: false, title: '', width: '', @@ -71,4 +75,16 @@ min-width: 68.45px; margin-right: 10px } + .readinput{ + + } + + diff --git a/src/utils/myUtils/mixins/infoDialog.js b/src/utils/myUtils/mixins/infoDialog.js index 4c492f3..ac6af5b 100644 --- a/src/utils/myUtils/mixins/infoDialog.js +++ b/src/utils/myUtils/mixins/infoDialog.js @@ -2,7 +2,7 @@ props: { isShowInfo: { type: Boolean, - default: true + default: false }, // title: '', dataInfo: { diff --git a/src/utils/myUtils/mixins/listPage.js b/src/utils/myUtils/mixins/listPage.js index 07f3141..9b8c399 100644 --- a/src/utils/myUtils/mixins/listPage.js +++ b/src/utils/myUtils/mixins/listPage.js @@ -1,6 +1,7 @@ const listMixin = { data() { return { + loading: false, tableData: { rows: [] }, // 品牌表格数据 limit: 10, // 当前的行数 offset: 1, // 当前页 @@ -24,7 +25,7 @@ selectData() { this.queryInfo = { ...this.selectInfo } // 加入搜索内容 // 回到初始页 - if (this.offset == 1) { + if (this.offset === 1) { this.refresh() return } diff --git a/src/views/business/historyBusiness.vue b/src/views/business/historyBusiness.vue index bddce18..4398baa 100644 --- a/src/views/business/historyBusiness.vue +++ b/src/views/business/historyBusiness.vue @@ -13,7 +13,7 @@ 预计工期
- +
diff --git a/src/views/business/report.vue b/src/views/business/report.vue index 33c1a3d..d833399 100644 --- a/src/views/business/report.vue +++ b/src/views/business/report.vue @@ -316,12 +316,12 @@
-
+
+
添加项目需求
-
@@ -421,22 +421,27 @@ }, methods: { save() { - this.addInfo.productList = { + if(this.valiateForm()){ + this.addInfo.productList = { productCode: this.addInfo.productList.productCode, productQuantity: this.addInfo.productList.productQuantity, productPrice: this.addInfo.productList.productPrice, productName: '' } add(this.addInfo).then(res => { - console.log(res) - if (res) { + this.setData() this.$message({ message: '保存成功', type: 'success' }) - } - }) - this.setData() + }) + } else { + this.$message({ + message: '请先完整填写报备信息', + type: 'error' + }) + } + }, close() { this.setData() @@ -462,7 +467,6 @@ this.form.countyList = res }) }, - handleAddBtn() { const obj = {} obj.brandName = '' @@ -525,6 +529,12 @@ this.$set(this.showEdit, index, false) // vue添加属性的方法 } }) + row.productCode = this.addInfo.productList.productCode + row.brandName = this.brandName + console.log(this.categoryIds) + row.categoryIds = this.categoryIds + row.productQuantity = this.addInfo.productList.productQuantity + row.productPrice = this.addInfo.productList.productPrice }, setData() { this.addInfo = { @@ -553,6 +563,17 @@ agentPhone: '', productList: [] } + }, + valiateForm() { + let arr = [] + for(var item in this.addInfo) { + if(this.addInfo[item]){ + arr.push(1) + }else{ + arr.push(0) + } + } + return arr.every(item => item === 1) } } } @@ -568,7 +589,7 @@ .report-from { .from-title { - font-size: 22px; + font-size: 16px; font-weight: bold; background-color: #28739e; color: white; diff --git a/src/views/operation/retailerList.vue b/src/views/operation/retailerList.vue index 4f061c8..2964d08 100644 --- a/src/views/operation/retailerList.vue +++ b/src/views/operation/retailerList.vue @@ -68,12 +68,11 @@
- - - - - - + + @@ -103,21 +102,6 @@ address3: '0.5', address4: '每天必做' } - // { - // date: '2016-05-04', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1517 弄' - // }, - // { - // date: '2016-05-01', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1519 弄' - // }, - // { - // date: '2016-05-03', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1516 弄' - // } ], options: [ { @@ -125,7 +109,8 @@ label: '黄金糕' } ], - value: '' + value: '', + input:'' } }, methods: { diff --git a/src/views/operation/watchList.vue b/src/views/operation/watchList.vue index 1b06442..af68692 100644 --- a/src/views/operation/watchList.vue +++ b/src/views/operation/watchList.vue @@ -129,21 +129,6 @@ address4: '100元', address5: '是' } - // { - // date: '2016-05-04', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1517 弄' - // }, - // { - // date: '2016-05-01', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1519 弄' - // }, - // { - // date: '2016-05-03', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1516 弄' - // } ], options: [ { diff --git a/src/views/order/orderShop.vue b/src/views/order/orderShop.vue index 1874202..36c7c50 100644 --- a/src/views/order/orderShop.vue +++ b/src/views/order/orderShop.vue @@ -2,30 +2,52 @@ @@ -23,6 +23,10 @@ event: 'changeinput' }, props: { + readable: { + type: Boolean, + default: false + }, redStar: false, title: '', width: '', @@ -71,4 +75,16 @@ min-width: 68.45px; margin-right: 10px } + .readinput{ + + } + + diff --git a/src/utils/myUtils/mixins/infoDialog.js b/src/utils/myUtils/mixins/infoDialog.js index 4c492f3..ac6af5b 100644 --- a/src/utils/myUtils/mixins/infoDialog.js +++ b/src/utils/myUtils/mixins/infoDialog.js @@ -2,7 +2,7 @@ props: { isShowInfo: { type: Boolean, - default: true + default: false }, // title: '', dataInfo: { diff --git a/src/utils/myUtils/mixins/listPage.js b/src/utils/myUtils/mixins/listPage.js index 07f3141..9b8c399 100644 --- a/src/utils/myUtils/mixins/listPage.js +++ b/src/utils/myUtils/mixins/listPage.js @@ -1,6 +1,7 @@ const listMixin = { data() { return { + loading: false, tableData: { rows: [] }, // 品牌表格数据 limit: 10, // 当前的行数 offset: 1, // 当前页 @@ -24,7 +25,7 @@ selectData() { this.queryInfo = { ...this.selectInfo } // 加入搜索内容 // 回到初始页 - if (this.offset == 1) { + if (this.offset === 1) { this.refresh() return } diff --git a/src/views/business/historyBusiness.vue b/src/views/business/historyBusiness.vue index bddce18..4398baa 100644 --- a/src/views/business/historyBusiness.vue +++ b/src/views/business/historyBusiness.vue @@ -13,7 +13,7 @@ 预计工期
- +
diff --git a/src/views/business/report.vue b/src/views/business/report.vue index 33c1a3d..d833399 100644 --- a/src/views/business/report.vue +++ b/src/views/business/report.vue @@ -316,12 +316,12 @@
-
+
+
添加项目需求
-
@@ -421,22 +421,27 @@ }, methods: { save() { - this.addInfo.productList = { + if(this.valiateForm()){ + this.addInfo.productList = { productCode: this.addInfo.productList.productCode, productQuantity: this.addInfo.productList.productQuantity, productPrice: this.addInfo.productList.productPrice, productName: '' } add(this.addInfo).then(res => { - console.log(res) - if (res) { + this.setData() this.$message({ message: '保存成功', type: 'success' }) - } - }) - this.setData() + }) + } else { + this.$message({ + message: '请先完整填写报备信息', + type: 'error' + }) + } + }, close() { this.setData() @@ -462,7 +467,6 @@ this.form.countyList = res }) }, - handleAddBtn() { const obj = {} obj.brandName = '' @@ -525,6 +529,12 @@ this.$set(this.showEdit, index, false) // vue添加属性的方法 } }) + row.productCode = this.addInfo.productList.productCode + row.brandName = this.brandName + console.log(this.categoryIds) + row.categoryIds = this.categoryIds + row.productQuantity = this.addInfo.productList.productQuantity + row.productPrice = this.addInfo.productList.productPrice }, setData() { this.addInfo = { @@ -553,6 +563,17 @@ agentPhone: '', productList: [] } + }, + valiateForm() { + let arr = [] + for(var item in this.addInfo) { + if(this.addInfo[item]){ + arr.push(1) + }else{ + arr.push(0) + } + } + return arr.every(item => item === 1) } } } @@ -568,7 +589,7 @@ .report-from { .from-title { - font-size: 22px; + font-size: 16px; font-weight: bold; background-color: #28739e; color: white; diff --git a/src/views/operation/retailerList.vue b/src/views/operation/retailerList.vue index 4f061c8..2964d08 100644 --- a/src/views/operation/retailerList.vue +++ b/src/views/operation/retailerList.vue @@ -68,12 +68,11 @@
- - - - - - + + @@ -103,21 +102,6 @@ address3: '0.5', address4: '每天必做' } - // { - // date: '2016-05-04', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1517 弄' - // }, - // { - // date: '2016-05-01', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1519 弄' - // }, - // { - // date: '2016-05-03', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1516 弄' - // } ], options: [ { @@ -125,7 +109,8 @@ label: '黄金糕' } ], - value: '' + value: '', + input:'' } }, methods: { diff --git a/src/views/operation/watchList.vue b/src/views/operation/watchList.vue index 1b06442..af68692 100644 --- a/src/views/operation/watchList.vue +++ b/src/views/operation/watchList.vue @@ -129,21 +129,6 @@ address4: '100元', address5: '是' } - // { - // date: '2016-05-04', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1517 弄' - // }, - // { - // date: '2016-05-01', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1519 弄' - // }, - // { - // date: '2016-05-03', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1516 弄' - // } ], options: [ { diff --git a/src/views/order/orderShop.vue b/src/views/order/orderShop.vue index 1874202..36c7c50 100644 --- a/src/views/order/orderShop.vue +++ b/src/views/order/orderShop.vue @@ -2,30 +2,52 @@ @@ -23,6 +23,10 @@ event: 'changeinput' }, props: { + readable: { + type: Boolean, + default: false + }, redStar: false, title: '', width: '', @@ -71,4 +75,16 @@ min-width: 68.45px; margin-right: 10px } + .readinput{ + + } + + diff --git a/src/utils/myUtils/mixins/infoDialog.js b/src/utils/myUtils/mixins/infoDialog.js index 4c492f3..ac6af5b 100644 --- a/src/utils/myUtils/mixins/infoDialog.js +++ b/src/utils/myUtils/mixins/infoDialog.js @@ -2,7 +2,7 @@ props: { isShowInfo: { type: Boolean, - default: true + default: false }, // title: '', dataInfo: { diff --git a/src/utils/myUtils/mixins/listPage.js b/src/utils/myUtils/mixins/listPage.js index 07f3141..9b8c399 100644 --- a/src/utils/myUtils/mixins/listPage.js +++ b/src/utils/myUtils/mixins/listPage.js @@ -1,6 +1,7 @@ const listMixin = { data() { return { + loading: false, tableData: { rows: [] }, // 品牌表格数据 limit: 10, // 当前的行数 offset: 1, // 当前页 @@ -24,7 +25,7 @@ selectData() { this.queryInfo = { ...this.selectInfo } // 加入搜索内容 // 回到初始页 - if (this.offset == 1) { + if (this.offset === 1) { this.refresh() return } diff --git a/src/views/business/historyBusiness.vue b/src/views/business/historyBusiness.vue index bddce18..4398baa 100644 --- a/src/views/business/historyBusiness.vue +++ b/src/views/business/historyBusiness.vue @@ -13,7 +13,7 @@ 预计工期
- +
diff --git a/src/views/business/report.vue b/src/views/business/report.vue index 33c1a3d..d833399 100644 --- a/src/views/business/report.vue +++ b/src/views/business/report.vue @@ -316,12 +316,12 @@
-
+
+
添加项目需求
-
@@ -421,22 +421,27 @@ }, methods: { save() { - this.addInfo.productList = { + if(this.valiateForm()){ + this.addInfo.productList = { productCode: this.addInfo.productList.productCode, productQuantity: this.addInfo.productList.productQuantity, productPrice: this.addInfo.productList.productPrice, productName: '' } add(this.addInfo).then(res => { - console.log(res) - if (res) { + this.setData() this.$message({ message: '保存成功', type: 'success' }) - } - }) - this.setData() + }) + } else { + this.$message({ + message: '请先完整填写报备信息', + type: 'error' + }) + } + }, close() { this.setData() @@ -462,7 +467,6 @@ this.form.countyList = res }) }, - handleAddBtn() { const obj = {} obj.brandName = '' @@ -525,6 +529,12 @@ this.$set(this.showEdit, index, false) // vue添加属性的方法 } }) + row.productCode = this.addInfo.productList.productCode + row.brandName = this.brandName + console.log(this.categoryIds) + row.categoryIds = this.categoryIds + row.productQuantity = this.addInfo.productList.productQuantity + row.productPrice = this.addInfo.productList.productPrice }, setData() { this.addInfo = { @@ -553,6 +563,17 @@ agentPhone: '', productList: [] } + }, + valiateForm() { + let arr = [] + for(var item in this.addInfo) { + if(this.addInfo[item]){ + arr.push(1) + }else{ + arr.push(0) + } + } + return arr.every(item => item === 1) } } } @@ -568,7 +589,7 @@ .report-from { .from-title { - font-size: 22px; + font-size: 16px; font-weight: bold; background-color: #28739e; color: white; diff --git a/src/views/operation/retailerList.vue b/src/views/operation/retailerList.vue index 4f061c8..2964d08 100644 --- a/src/views/operation/retailerList.vue +++ b/src/views/operation/retailerList.vue @@ -68,12 +68,11 @@
- - - - - - + + @@ -103,21 +102,6 @@ address3: '0.5', address4: '每天必做' } - // { - // date: '2016-05-04', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1517 弄' - // }, - // { - // date: '2016-05-01', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1519 弄' - // }, - // { - // date: '2016-05-03', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1516 弄' - // } ], options: [ { @@ -125,7 +109,8 @@ label: '黄金糕' } ], - value: '' + value: '', + input:'' } }, methods: { diff --git a/src/views/operation/watchList.vue b/src/views/operation/watchList.vue index 1b06442..af68692 100644 --- a/src/views/operation/watchList.vue +++ b/src/views/operation/watchList.vue @@ -129,21 +129,6 @@ address4: '100元', address5: '是' } - // { - // date: '2016-05-04', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1517 弄' - // }, - // { - // date: '2016-05-01', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1519 弄' - // }, - // { - // date: '2016-05-03', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1516 弄' - // } ], options: [ { diff --git a/src/views/order/orderShop.vue b/src/views/order/orderShop.vue index 1874202..36c7c50 100644 --- a/src/views/order/orderShop.vue +++ b/src/views/order/orderShop.vue @@ -2,30 +2,52 @@ @@ -23,6 +23,10 @@ event: 'changeinput' }, props: { + readable: { + type: Boolean, + default: false + }, redStar: false, title: '', width: '', @@ -71,4 +75,16 @@ min-width: 68.45px; margin-right: 10px } + .readinput{ + + } + + diff --git a/src/utils/myUtils/mixins/infoDialog.js b/src/utils/myUtils/mixins/infoDialog.js index 4c492f3..ac6af5b 100644 --- a/src/utils/myUtils/mixins/infoDialog.js +++ b/src/utils/myUtils/mixins/infoDialog.js @@ -2,7 +2,7 @@ props: { isShowInfo: { type: Boolean, - default: true + default: false }, // title: '', dataInfo: { diff --git a/src/utils/myUtils/mixins/listPage.js b/src/utils/myUtils/mixins/listPage.js index 07f3141..9b8c399 100644 --- a/src/utils/myUtils/mixins/listPage.js +++ b/src/utils/myUtils/mixins/listPage.js @@ -1,6 +1,7 @@ const listMixin = { data() { return { + loading: false, tableData: { rows: [] }, // 品牌表格数据 limit: 10, // 当前的行数 offset: 1, // 当前页 @@ -24,7 +25,7 @@ selectData() { this.queryInfo = { ...this.selectInfo } // 加入搜索内容 // 回到初始页 - if (this.offset == 1) { + if (this.offset === 1) { this.refresh() return } diff --git a/src/views/business/historyBusiness.vue b/src/views/business/historyBusiness.vue index bddce18..4398baa 100644 --- a/src/views/business/historyBusiness.vue +++ b/src/views/business/historyBusiness.vue @@ -13,7 +13,7 @@ 预计工期
- +
diff --git a/src/views/business/report.vue b/src/views/business/report.vue index 33c1a3d..d833399 100644 --- a/src/views/business/report.vue +++ b/src/views/business/report.vue @@ -316,12 +316,12 @@
-
+
+
添加项目需求
-
@@ -421,22 +421,27 @@ }, methods: { save() { - this.addInfo.productList = { + if(this.valiateForm()){ + this.addInfo.productList = { productCode: this.addInfo.productList.productCode, productQuantity: this.addInfo.productList.productQuantity, productPrice: this.addInfo.productList.productPrice, productName: '' } add(this.addInfo).then(res => { - console.log(res) - if (res) { + this.setData() this.$message({ message: '保存成功', type: 'success' }) - } - }) - this.setData() + }) + } else { + this.$message({ + message: '请先完整填写报备信息', + type: 'error' + }) + } + }, close() { this.setData() @@ -462,7 +467,6 @@ this.form.countyList = res }) }, - handleAddBtn() { const obj = {} obj.brandName = '' @@ -525,6 +529,12 @@ this.$set(this.showEdit, index, false) // vue添加属性的方法 } }) + row.productCode = this.addInfo.productList.productCode + row.brandName = this.brandName + console.log(this.categoryIds) + row.categoryIds = this.categoryIds + row.productQuantity = this.addInfo.productList.productQuantity + row.productPrice = this.addInfo.productList.productPrice }, setData() { this.addInfo = { @@ -553,6 +563,17 @@ agentPhone: '', productList: [] } + }, + valiateForm() { + let arr = [] + for(var item in this.addInfo) { + if(this.addInfo[item]){ + arr.push(1) + }else{ + arr.push(0) + } + } + return arr.every(item => item === 1) } } } @@ -568,7 +589,7 @@ .report-from { .from-title { - font-size: 22px; + font-size: 16px; font-weight: bold; background-color: #28739e; color: white; diff --git a/src/views/operation/retailerList.vue b/src/views/operation/retailerList.vue index 4f061c8..2964d08 100644 --- a/src/views/operation/retailerList.vue +++ b/src/views/operation/retailerList.vue @@ -68,12 +68,11 @@
- - - - - - + + @@ -103,21 +102,6 @@ address3: '0.5', address4: '每天必做' } - // { - // date: '2016-05-04', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1517 弄' - // }, - // { - // date: '2016-05-01', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1519 弄' - // }, - // { - // date: '2016-05-03', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1516 弄' - // } ], options: [ { @@ -125,7 +109,8 @@ label: '黄金糕' } ], - value: '' + value: '', + input:'' } }, methods: { diff --git a/src/views/operation/watchList.vue b/src/views/operation/watchList.vue index 1b06442..af68692 100644 --- a/src/views/operation/watchList.vue +++ b/src/views/operation/watchList.vue @@ -129,21 +129,6 @@ address4: '100元', address5: '是' } - // { - // date: '2016-05-04', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1517 弄' - // }, - // { - // date: '2016-05-01', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1519 弄' - // }, - // { - // date: '2016-05-03', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1516 弄' - // } ], options: [ { diff --git a/src/views/order/orderShop.vue b/src/views/order/orderShop.vue index 1874202..36c7c50 100644 --- a/src/views/order/orderShop.vue +++ b/src/views/order/orderShop.vue @@ -2,30 +2,52 @@ @@ -23,6 +23,10 @@ event: 'changeinput' }, props: { + readable: { + type: Boolean, + default: false + }, redStar: false, title: '', width: '', @@ -71,4 +75,16 @@ min-width: 68.45px; margin-right: 10px } + .readinput{ + + } + + diff --git a/src/utils/myUtils/mixins/infoDialog.js b/src/utils/myUtils/mixins/infoDialog.js index 4c492f3..ac6af5b 100644 --- a/src/utils/myUtils/mixins/infoDialog.js +++ b/src/utils/myUtils/mixins/infoDialog.js @@ -2,7 +2,7 @@ props: { isShowInfo: { type: Boolean, - default: true + default: false }, // title: '', dataInfo: { diff --git a/src/utils/myUtils/mixins/listPage.js b/src/utils/myUtils/mixins/listPage.js index 07f3141..9b8c399 100644 --- a/src/utils/myUtils/mixins/listPage.js +++ b/src/utils/myUtils/mixins/listPage.js @@ -1,6 +1,7 @@ const listMixin = { data() { return { + loading: false, tableData: { rows: [] }, // 品牌表格数据 limit: 10, // 当前的行数 offset: 1, // 当前页 @@ -24,7 +25,7 @@ selectData() { this.queryInfo = { ...this.selectInfo } // 加入搜索内容 // 回到初始页 - if (this.offset == 1) { + if (this.offset === 1) { this.refresh() return } diff --git a/src/views/business/historyBusiness.vue b/src/views/business/historyBusiness.vue index bddce18..4398baa 100644 --- a/src/views/business/historyBusiness.vue +++ b/src/views/business/historyBusiness.vue @@ -13,7 +13,7 @@ 预计工期
- +
diff --git a/src/views/business/report.vue b/src/views/business/report.vue index 33c1a3d..d833399 100644 --- a/src/views/business/report.vue +++ b/src/views/business/report.vue @@ -316,12 +316,12 @@
-
+
+
添加项目需求
-
@@ -421,22 +421,27 @@ }, methods: { save() { - this.addInfo.productList = { + if(this.valiateForm()){ + this.addInfo.productList = { productCode: this.addInfo.productList.productCode, productQuantity: this.addInfo.productList.productQuantity, productPrice: this.addInfo.productList.productPrice, productName: '' } add(this.addInfo).then(res => { - console.log(res) - if (res) { + this.setData() this.$message({ message: '保存成功', type: 'success' }) - } - }) - this.setData() + }) + } else { + this.$message({ + message: '请先完整填写报备信息', + type: 'error' + }) + } + }, close() { this.setData() @@ -462,7 +467,6 @@ this.form.countyList = res }) }, - handleAddBtn() { const obj = {} obj.brandName = '' @@ -525,6 +529,12 @@ this.$set(this.showEdit, index, false) // vue添加属性的方法 } }) + row.productCode = this.addInfo.productList.productCode + row.brandName = this.brandName + console.log(this.categoryIds) + row.categoryIds = this.categoryIds + row.productQuantity = this.addInfo.productList.productQuantity + row.productPrice = this.addInfo.productList.productPrice }, setData() { this.addInfo = { @@ -553,6 +563,17 @@ agentPhone: '', productList: [] } + }, + valiateForm() { + let arr = [] + for(var item in this.addInfo) { + if(this.addInfo[item]){ + arr.push(1) + }else{ + arr.push(0) + } + } + return arr.every(item => item === 1) } } } @@ -568,7 +589,7 @@ .report-from { .from-title { - font-size: 22px; + font-size: 16px; font-weight: bold; background-color: #28739e; color: white; diff --git a/src/views/operation/retailerList.vue b/src/views/operation/retailerList.vue index 4f061c8..2964d08 100644 --- a/src/views/operation/retailerList.vue +++ b/src/views/operation/retailerList.vue @@ -68,12 +68,11 @@
- - - - - - + + @@ -103,21 +102,6 @@ address3: '0.5', address4: '每天必做' } - // { - // date: '2016-05-04', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1517 弄' - // }, - // { - // date: '2016-05-01', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1519 弄' - // }, - // { - // date: '2016-05-03', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1516 弄' - // } ], options: [ { @@ -125,7 +109,8 @@ label: '黄金糕' } ], - value: '' + value: '', + input:'' } }, methods: { diff --git a/src/views/operation/watchList.vue b/src/views/operation/watchList.vue index 1b06442..af68692 100644 --- a/src/views/operation/watchList.vue +++ b/src/views/operation/watchList.vue @@ -129,21 +129,6 @@ address4: '100元', address5: '是' } - // { - // date: '2016-05-04', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1517 弄' - // }, - // { - // date: '2016-05-01', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1519 弄' - // }, - // { - // date: '2016-05-03', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1516 弄' - // } ], options: [ { diff --git a/src/views/order/orderShop.vue b/src/views/order/orderShop.vue index 1874202..36c7c50 100644 --- a/src/views/order/orderShop.vue +++ b/src/views/order/orderShop.vue @@ -2,30 +2,52 @@ @@ -23,6 +23,10 @@ event: 'changeinput' }, props: { + readable: { + type: Boolean, + default: false + }, redStar: false, title: '', width: '', @@ -71,4 +75,16 @@ min-width: 68.45px; margin-right: 10px } + .readinput{ + + } + + diff --git a/src/utils/myUtils/mixins/infoDialog.js b/src/utils/myUtils/mixins/infoDialog.js index 4c492f3..ac6af5b 100644 --- a/src/utils/myUtils/mixins/infoDialog.js +++ b/src/utils/myUtils/mixins/infoDialog.js @@ -2,7 +2,7 @@ props: { isShowInfo: { type: Boolean, - default: true + default: false }, // title: '', dataInfo: { diff --git a/src/utils/myUtils/mixins/listPage.js b/src/utils/myUtils/mixins/listPage.js index 07f3141..9b8c399 100644 --- a/src/utils/myUtils/mixins/listPage.js +++ b/src/utils/myUtils/mixins/listPage.js @@ -1,6 +1,7 @@ const listMixin = { data() { return { + loading: false, tableData: { rows: [] }, // 品牌表格数据 limit: 10, // 当前的行数 offset: 1, // 当前页 @@ -24,7 +25,7 @@ selectData() { this.queryInfo = { ...this.selectInfo } // 加入搜索内容 // 回到初始页 - if (this.offset == 1) { + if (this.offset === 1) { this.refresh() return } diff --git a/src/views/business/historyBusiness.vue b/src/views/business/historyBusiness.vue index bddce18..4398baa 100644 --- a/src/views/business/historyBusiness.vue +++ b/src/views/business/historyBusiness.vue @@ -13,7 +13,7 @@ 预计工期
- +
diff --git a/src/views/business/report.vue b/src/views/business/report.vue index 33c1a3d..d833399 100644 --- a/src/views/business/report.vue +++ b/src/views/business/report.vue @@ -316,12 +316,12 @@
-
+
+
添加项目需求
-
@@ -421,22 +421,27 @@ }, methods: { save() { - this.addInfo.productList = { + if(this.valiateForm()){ + this.addInfo.productList = { productCode: this.addInfo.productList.productCode, productQuantity: this.addInfo.productList.productQuantity, productPrice: this.addInfo.productList.productPrice, productName: '' } add(this.addInfo).then(res => { - console.log(res) - if (res) { + this.setData() this.$message({ message: '保存成功', type: 'success' }) - } - }) - this.setData() + }) + } else { + this.$message({ + message: '请先完整填写报备信息', + type: 'error' + }) + } + }, close() { this.setData() @@ -462,7 +467,6 @@ this.form.countyList = res }) }, - handleAddBtn() { const obj = {} obj.brandName = '' @@ -525,6 +529,12 @@ this.$set(this.showEdit, index, false) // vue添加属性的方法 } }) + row.productCode = this.addInfo.productList.productCode + row.brandName = this.brandName + console.log(this.categoryIds) + row.categoryIds = this.categoryIds + row.productQuantity = this.addInfo.productList.productQuantity + row.productPrice = this.addInfo.productList.productPrice }, setData() { this.addInfo = { @@ -553,6 +563,17 @@ agentPhone: '', productList: [] } + }, + valiateForm() { + let arr = [] + for(var item in this.addInfo) { + if(this.addInfo[item]){ + arr.push(1) + }else{ + arr.push(0) + } + } + return arr.every(item => item === 1) } } } @@ -568,7 +589,7 @@ .report-from { .from-title { - font-size: 22px; + font-size: 16px; font-weight: bold; background-color: #28739e; color: white; diff --git a/src/views/operation/retailerList.vue b/src/views/operation/retailerList.vue index 4f061c8..2964d08 100644 --- a/src/views/operation/retailerList.vue +++ b/src/views/operation/retailerList.vue @@ -68,12 +68,11 @@
- - - - - - + + @@ -103,21 +102,6 @@ address3: '0.5', address4: '每天必做' } - // { - // date: '2016-05-04', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1517 弄' - // }, - // { - // date: '2016-05-01', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1519 弄' - // }, - // { - // date: '2016-05-03', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1516 弄' - // } ], options: [ { @@ -125,7 +109,8 @@ label: '黄金糕' } ], - value: '' + value: '', + input:'' } }, methods: { diff --git a/src/views/operation/watchList.vue b/src/views/operation/watchList.vue index 1b06442..af68692 100644 --- a/src/views/operation/watchList.vue +++ b/src/views/operation/watchList.vue @@ -129,21 +129,6 @@ address4: '100元', address5: '是' } - // { - // date: '2016-05-04', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1517 弄' - // }, - // { - // date: '2016-05-01', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1519 弄' - // }, - // { - // date: '2016-05-03', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1516 弄' - // } ], options: [ { diff --git a/src/views/order/orderShop.vue b/src/views/order/orderShop.vue index 1874202..36c7c50 100644 --- a/src/views/order/orderShop.vue +++ b/src/views/order/orderShop.vue @@ -2,30 +2,52 @@ @@ -23,6 +23,10 @@ event: 'changeinput' }, props: { + readable: { + type: Boolean, + default: false + }, redStar: false, title: '', width: '', @@ -71,4 +75,16 @@ min-width: 68.45px; margin-right: 10px } + .readinput{ + + } + + diff --git a/src/utils/myUtils/mixins/infoDialog.js b/src/utils/myUtils/mixins/infoDialog.js index 4c492f3..ac6af5b 100644 --- a/src/utils/myUtils/mixins/infoDialog.js +++ b/src/utils/myUtils/mixins/infoDialog.js @@ -2,7 +2,7 @@ props: { isShowInfo: { type: Boolean, - default: true + default: false }, // title: '', dataInfo: { diff --git a/src/utils/myUtils/mixins/listPage.js b/src/utils/myUtils/mixins/listPage.js index 07f3141..9b8c399 100644 --- a/src/utils/myUtils/mixins/listPage.js +++ b/src/utils/myUtils/mixins/listPage.js @@ -1,6 +1,7 @@ const listMixin = { data() { return { + loading: false, tableData: { rows: [] }, // 品牌表格数据 limit: 10, // 当前的行数 offset: 1, // 当前页 @@ -24,7 +25,7 @@ selectData() { this.queryInfo = { ...this.selectInfo } // 加入搜索内容 // 回到初始页 - if (this.offset == 1) { + if (this.offset === 1) { this.refresh() return } diff --git a/src/views/business/historyBusiness.vue b/src/views/business/historyBusiness.vue index bddce18..4398baa 100644 --- a/src/views/business/historyBusiness.vue +++ b/src/views/business/historyBusiness.vue @@ -13,7 +13,7 @@ 预计工期
- +
diff --git a/src/views/business/report.vue b/src/views/business/report.vue index 33c1a3d..d833399 100644 --- a/src/views/business/report.vue +++ b/src/views/business/report.vue @@ -316,12 +316,12 @@
-
+
+
添加项目需求
-
@@ -421,22 +421,27 @@ }, methods: { save() { - this.addInfo.productList = { + if(this.valiateForm()){ + this.addInfo.productList = { productCode: this.addInfo.productList.productCode, productQuantity: this.addInfo.productList.productQuantity, productPrice: this.addInfo.productList.productPrice, productName: '' } add(this.addInfo).then(res => { - console.log(res) - if (res) { + this.setData() this.$message({ message: '保存成功', type: 'success' }) - } - }) - this.setData() + }) + } else { + this.$message({ + message: '请先完整填写报备信息', + type: 'error' + }) + } + }, close() { this.setData() @@ -462,7 +467,6 @@ this.form.countyList = res }) }, - handleAddBtn() { const obj = {} obj.brandName = '' @@ -525,6 +529,12 @@ this.$set(this.showEdit, index, false) // vue添加属性的方法 } }) + row.productCode = this.addInfo.productList.productCode + row.brandName = this.brandName + console.log(this.categoryIds) + row.categoryIds = this.categoryIds + row.productQuantity = this.addInfo.productList.productQuantity + row.productPrice = this.addInfo.productList.productPrice }, setData() { this.addInfo = { @@ -553,6 +563,17 @@ agentPhone: '', productList: [] } + }, + valiateForm() { + let arr = [] + for(var item in this.addInfo) { + if(this.addInfo[item]){ + arr.push(1) + }else{ + arr.push(0) + } + } + return arr.every(item => item === 1) } } } @@ -568,7 +589,7 @@ .report-from { .from-title { - font-size: 22px; + font-size: 16px; font-weight: bold; background-color: #28739e; color: white; diff --git a/src/views/operation/retailerList.vue b/src/views/operation/retailerList.vue index 4f061c8..2964d08 100644 --- a/src/views/operation/retailerList.vue +++ b/src/views/operation/retailerList.vue @@ -68,12 +68,11 @@
- - - - - - + + @@ -103,21 +102,6 @@ address3: '0.5', address4: '每天必做' } - // { - // date: '2016-05-04', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1517 弄' - // }, - // { - // date: '2016-05-01', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1519 弄' - // }, - // { - // date: '2016-05-03', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1516 弄' - // } ], options: [ { @@ -125,7 +109,8 @@ label: '黄金糕' } ], - value: '' + value: '', + input:'' } }, methods: { diff --git a/src/views/operation/watchList.vue b/src/views/operation/watchList.vue index 1b06442..af68692 100644 --- a/src/views/operation/watchList.vue +++ b/src/views/operation/watchList.vue @@ -129,21 +129,6 @@ address4: '100元', address5: '是' } - // { - // date: '2016-05-04', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1517 弄' - // }, - // { - // date: '2016-05-01', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1519 弄' - // }, - // { - // date: '2016-05-03', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1516 弄' - // } ], options: [ { diff --git a/src/views/order/orderShop.vue b/src/views/order/orderShop.vue index 1874202..36c7c50 100644 --- a/src/views/order/orderShop.vue +++ b/src/views/order/orderShop.vue @@ -2,30 +2,52 @@