diff --git a/package.json b/package.json index f8c5e2a..9f3a3eb 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "echarts": "^4.2.1", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", @@ -34,7 +35,8 @@ "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", "vue2-leaflet": "^2.7.0", - "vuex": "3.0.1" + "vuex": "3.0.1", + "xlsx": "^0.17.0" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/package.json b/package.json index f8c5e2a..9f3a3eb 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "echarts": "^4.2.1", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", @@ -34,7 +35,8 @@ "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", "vue2-leaflet": "^2.7.0", - "vuex": "3.0.1" + "vuex": "3.0.1", + "xlsx": "^0.17.0" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/sanitation/statistics.js b/src/api/sanitation/statistics.js new file mode 100644 index 0000000..2ca7549 --- /dev/null +++ b/src/api/sanitation/statistics.js @@ -0,0 +1,13 @@ + +/** + * 考核统计接口 + */ +import request from '@/utils/request' +// 公厕保洁次数统计 +export function getToiletJobCount(params) { + return request({ + url: '/sanitation/statistic/toilet/jobCount', + method: 'get', + params + }) +} diff --git a/package.json b/package.json index f8c5e2a..9f3a3eb 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "echarts": "^4.2.1", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", @@ -34,7 +35,8 @@ "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", "vue2-leaflet": "^2.7.0", - "vuex": "3.0.1" + "vuex": "3.0.1", + "xlsx": "^0.17.0" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/sanitation/statistics.js b/src/api/sanitation/statistics.js new file mode 100644 index 0000000..2ca7549 --- /dev/null +++ b/src/api/sanitation/statistics.js @@ -0,0 +1,13 @@ + +/** + * 考核统计接口 + */ +import request from '@/utils/request' +// 公厕保洁次数统计 +export function getToiletJobCount(params) { + return request({ + url: '/sanitation/statistic/toilet/jobCount', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..10fd245 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,97 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 公厕保洁记录查询 +export function getToiletJobRecords(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导出 +export function batchExportToiletJobRecords(params, config) { + return request({ + url: '/sanitation/toilet/exportJobRecord', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/package.json b/package.json index f8c5e2a..9f3a3eb 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "echarts": "^4.2.1", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", @@ -34,7 +35,8 @@ "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", "vue2-leaflet": "^2.7.0", - "vuex": "3.0.1" + "vuex": "3.0.1", + "xlsx": "^0.17.0" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/sanitation/statistics.js b/src/api/sanitation/statistics.js new file mode 100644 index 0000000..2ca7549 --- /dev/null +++ b/src/api/sanitation/statistics.js @@ -0,0 +1,13 @@ + +/** + * 考核统计接口 + */ +import request from '@/utils/request' +// 公厕保洁次数统计 +export function getToiletJobCount(params) { + return request({ + url: '/sanitation/statistic/toilet/jobCount', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..10fd245 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,97 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 公厕保洁记录查询 +export function getToiletJobRecords(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导出 +export function batchExportToiletJobRecords(params, config) { + return request({ + url: '/sanitation/toilet/exportJobRecord', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/system/toilet.js b/src/api/system/toilet.js deleted file mode 100644 index 8f38b8f..0000000 --- a/src/api/system/toilet.js +++ /dev/null @@ -1,91 +0,0 @@ -/** - * 公厕管理接口 - */ -import request from '@/utils/request' -import qs from 'qs' -export function getToiletList(params) { - return request({ - url: '/sanitation/toilet/listPage', - method: 'get', - params - }) -} - -export function getDetail(id) { - return request({ - url: '/sanitation/toiletClean/detail', - method: 'get', - params: { - id: id - } - }) -} - -// 公厕查询 -export function getToiletAll() { - return request({ - url: '/sanitation/toilet/listPage', - method: 'get' - }) -} - -// 添加公厕 -export function addToilet(params) { - return request({ - url: '/sanitation/toilet/add', - method: 'post', - params - }) -} -// 修改公厕机构 -export function updateToilet(params) { - return request({ - url: '/sanitation/toilet/update', - method: 'post', - params - }) -} -// 删除公厕机构 -export function delToilet(ids) { - return request({ - url: '/sanitation/toilet/delete', - method: 'post', - params: { - ids - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) - } - }) -} -// 批量导出 -export function exportRecords(params) { - return request({ - url: 'device/batchExport', - method: 'get', - timeout: 120000, - params, - responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob - }) -} - -// 公厕保洁记录查询 -export function getToiletJobRecords(params) { - return request({ - url: '/sanitation/toilet/jobRecord', - method: 'get', - params - }) -} - -// 批量导出 -export function batchExportToiletJobRecords(params, config) { - return request({ - url: '/sanitation/toilet/exportJobRecord', - method: 'get', - timeout: 120000, - params, - ...config, - responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob - }) -} diff --git a/package.json b/package.json index f8c5e2a..9f3a3eb 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "echarts": "^4.2.1", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", @@ -34,7 +35,8 @@ "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", "vue2-leaflet": "^2.7.0", - "vuex": "3.0.1" + "vuex": "3.0.1", + "xlsx": "^0.17.0" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/sanitation/statistics.js b/src/api/sanitation/statistics.js new file mode 100644 index 0000000..2ca7549 --- /dev/null +++ b/src/api/sanitation/statistics.js @@ -0,0 +1,13 @@ + +/** + * 考核统计接口 + */ +import request from '@/utils/request' +// 公厕保洁次数统计 +export function getToiletJobCount(params) { + return request({ + url: '/sanitation/statistic/toilet/jobCount', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..10fd245 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,97 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 公厕保洁记录查询 +export function getToiletJobRecords(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导出 +export function batchExportToiletJobRecords(params, config) { + return request({ + url: '/sanitation/toilet/exportJobRecord', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/system/toilet.js b/src/api/system/toilet.js deleted file mode 100644 index 8f38b8f..0000000 --- a/src/api/system/toilet.js +++ /dev/null @@ -1,91 +0,0 @@ -/** - * 公厕管理接口 - */ -import request from '@/utils/request' -import qs from 'qs' -export function getToiletList(params) { - return request({ - url: '/sanitation/toilet/listPage', - method: 'get', - params - }) -} - -export function getDetail(id) { - return request({ - url: '/sanitation/toiletClean/detail', - method: 'get', - params: { - id: id - } - }) -} - -// 公厕查询 -export function getToiletAll() { - return request({ - url: '/sanitation/toilet/listPage', - method: 'get' - }) -} - -// 添加公厕 -export function addToilet(params) { - return request({ - url: '/sanitation/toilet/add', - method: 'post', - params - }) -} -// 修改公厕机构 -export function updateToilet(params) { - return request({ - url: '/sanitation/toilet/update', - method: 'post', - params - }) -} -// 删除公厕机构 -export function delToilet(ids) { - return request({ - url: '/sanitation/toilet/delete', - method: 'post', - params: { - ids - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) - } - }) -} -// 批量导出 -export function exportRecords(params) { - return request({ - url: 'device/batchExport', - method: 'get', - timeout: 120000, - params, - responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob - }) -} - -// 公厕保洁记录查询 -export function getToiletJobRecords(params) { - return request({ - url: '/sanitation/toilet/jobRecord', - method: 'get', - params - }) -} - -// 批量导出 -export function batchExportToiletJobRecords(params, config) { - return request({ - url: '/sanitation/toilet/exportJobRecord', - method: 'get', - timeout: 120000, - params, - ...config, - responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob - }) -} diff --git a/src/assets/global_images/toilet.png b/src/assets/global_images/toilet.png new file mode 100644 index 0000000..6d9fc05 --- /dev/null +++ b/src/assets/global_images/toilet.png Binary files differ diff --git a/package.json b/package.json index f8c5e2a..9f3a3eb 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "echarts": "^4.2.1", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", @@ -34,7 +35,8 @@ "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", "vue2-leaflet": "^2.7.0", - "vuex": "3.0.1" + "vuex": "3.0.1", + "xlsx": "^0.17.0" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/sanitation/statistics.js b/src/api/sanitation/statistics.js new file mode 100644 index 0000000..2ca7549 --- /dev/null +++ b/src/api/sanitation/statistics.js @@ -0,0 +1,13 @@ + +/** + * 考核统计接口 + */ +import request from '@/utils/request' +// 公厕保洁次数统计 +export function getToiletJobCount(params) { + return request({ + url: '/sanitation/statistic/toilet/jobCount', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..10fd245 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,97 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 公厕保洁记录查询 +export function getToiletJobRecords(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导出 +export function batchExportToiletJobRecords(params, config) { + return request({ + url: '/sanitation/toilet/exportJobRecord', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/system/toilet.js b/src/api/system/toilet.js deleted file mode 100644 index 8f38b8f..0000000 --- a/src/api/system/toilet.js +++ /dev/null @@ -1,91 +0,0 @@ -/** - * 公厕管理接口 - */ -import request from '@/utils/request' -import qs from 'qs' -export function getToiletList(params) { - return request({ - url: '/sanitation/toilet/listPage', - method: 'get', - params - }) -} - -export function getDetail(id) { - return request({ - url: '/sanitation/toiletClean/detail', - method: 'get', - params: { - id: id - } - }) -} - -// 公厕查询 -export function getToiletAll() { - return request({ - url: '/sanitation/toilet/listPage', - method: 'get' - }) -} - -// 添加公厕 -export function addToilet(params) { - return request({ - url: '/sanitation/toilet/add', - method: 'post', - params - }) -} -// 修改公厕机构 -export function updateToilet(params) { - return request({ - url: '/sanitation/toilet/update', - method: 'post', - params - }) -} -// 删除公厕机构 -export function delToilet(ids) { - return request({ - url: '/sanitation/toilet/delete', - method: 'post', - params: { - ids - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) - } - }) -} -// 批量导出 -export function exportRecords(params) { - return request({ - url: 'device/batchExport', - method: 'get', - timeout: 120000, - params, - responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob - }) -} - -// 公厕保洁记录查询 -export function getToiletJobRecords(params) { - return request({ - url: '/sanitation/toilet/jobRecord', - method: 'get', - params - }) -} - -// 批量导出 -export function batchExportToiletJobRecords(params, config) { - return request({ - url: '/sanitation/toilet/exportJobRecord', - method: 'get', - timeout: 120000, - params, - ...config, - responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob - }) -} diff --git a/src/assets/global_images/toilet.png b/src/assets/global_images/toilet.png new file mode 100644 index 0000000..6d9fc05 --- /dev/null +++ b/src/assets/global_images/toilet.png Binary files differ diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 5077bef..04d322d 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -79,7 +79,7 @@ -