diff --git a/src/utils/dict.js b/src/utils/dict.js index 34078ce..7c8ac1b 100644 --- a/src/utils/dict.js +++ b/src/utils/dict.js @@ -244,6 +244,12 @@ export const DICT_TYPE = { INS_EQU_TYPE: 'ins_equ_type', INS_NOTICE_SERVER: 'jiance', + + // 救援设备字典 + RESCUE_EQU_TYPE: 'rescue_equ_type', + // 维修设备字典 + REPAIR_EQU_TYPE: 'repair_equ_type', + // ----------驾校相关------------ //人员类型 DRIVE_TYPE: 'drive_type', diff --git a/src/views/base/device/api/device.js b/src/views/base/device/api/device.js new file mode 100644 index 0000000..173477b --- /dev/null +++ b/src/views/base/device/api/device.js @@ -0,0 +1,64 @@ +import request from '@/utils/request' + +// 查询equInfo列表 +export function listEquInfo(query) { + return request({ + url: '/system/equInfo/list', + method: 'get', + params: query + }) +} + +// 查询equInfo详细 +export function getEquInfo(id) { + return request({ + url: '/system/equInfo/' + id, + method: 'get' + }) +} + +// 新增equInfo +export function addEquInfo(data) { + return request({ + url: '/system/equInfo/add', + method: 'post', + data: data + }) +} + +// 修改equInfo +export function updateEquInfo(data) { + return request({ + url: '/system/equInfo/edit', + method: 'post', + data: data + }) +} +// 修改equInfo +export function importTemplate() { + return request({ + url: '/system/equInfo/importTemplate', + method: 'post', + responseType: 'blob' + }) +} + +// 删除equInfo +export function delEquInfo(id) { + return request({ + url: '/system/equInfo/' + id, + method: 'delete' + }) +} +// 删除equInfo +export function addFolder(id, servicePackageId, defaultKey) { + return request({ + url: '/system/equInfo/addDeviceFolder', + method: 'post', + params: { + id, + servicePackageId, + defaultKey + } + }) +} diff --git a/src/views/base/device/device.vue b/src/views/base/device/device.vue new file mode 100644 index 0000000..6361708 --- /dev/null +++ b/src/views/base/device/device.vue @@ -0,0 +1,589 @@ + + + diff --git a/src/views/base/file/api/file.js b/src/views/base/file/api/file.js index 9ede89b..632b846 100644 --- a/src/views/base/file/api/file.js +++ b/src/views/base/file/api/file.js @@ -49,6 +49,22 @@ export function listStaff(query) { }) } +export function jyListStaff(query) { + return request({ + url: '/system/rescueInfo/driverList', + method: 'get', + params: query + }) +} + +export function wxListStaff(query) { + return request({ + url: '/repair/worker/page', + method: 'get', + params: query + }) +} + // 查询inspectionFile详细 export function getInspectionFile(id) { return request({ diff --git a/src/views/base/file/file.vue b/src/views/base/file/file.vue index 7acd4a9..f83c63d 100644 --- a/src/views/base/file/file.vue +++ b/src/views/base/file/file.vue @@ -83,7 +83,7 @@ @@ -202,10 +202,9 @@ v-model="form.filePath" /> - + { // this.$refs.filePreview.show() this.selectFile = row @@ -529,7 +528,7 @@ export default { }) } }, - getRowClassName({row}) { + getRowClassName({ row }) { console.log('返回的class', row.id === this.selectFile.id ? 'highlight-row' : '') // 如果当前行是选中的文件,添加高亮样式 return row.id === this.selectFile.id ? 'highlight-row' : '' @@ -620,13 +619,30 @@ export default { }, getStaffList() { const data = { - pageNum: 1, + pageNo: 1, pageSize: 100000 } - listStaff(data).then(res => { - this.staffList = res.data.records - this.getUserIdsByFileId(this.fileId) - }) + console.log('123', 123) + if(this.queryParams.servicePackageId == 'weixiu'){ + console.log('234', 234) + wxListStaff(data).then(res => { + this.staffList = res.data.records + console.log('staffList1',this.staffList) + this.getUserIdsByFileId(this.fileId) + }) + }else if(this.queryParams.servicePackageId == 'jiuyuan'){ + console.log('345', 345) + jyListStaff(data).then(res => { + this.staffList = res.data.records.map(item => { + return { + ...item, + userName: item.nickName + } + }); + console.log('staffList2', this.staffList) + this.getUserIdsByFileId(this.fileId) + }) + } }, /**根据文件id获取有权限的用户id*/ getUserIdsByFileId(fileId) { @@ -742,7 +758,7 @@ export default { function traverse(nodes, parentDisabled = false) { return nodes.map(node => { - let newNode = {...node} + let newNode = { ...node } // 递归处理子节点,同时传递父级的禁用状态 if (newNode.children && newNode.children.length > 0) { @@ -837,7 +853,7 @@ export default { }, //新建删除 Deleteanniu(id) { - this.$modal.confirm('是否确认删除inspectionFile编号为"' + id + '"的数据项?').then(function () { + this.$modal.confirm('是否确认删除inspectionFile编号为"' + id + '"的数据项?').then(function() { return delInspectionFile(id) }).then(() => { this.getList() @@ -852,7 +868,7 @@ export default { /** 删除按钮操作 */ handleDelete(row) { const ids = row.id || this.ids - this.$modal.confirm('是否确认删除inspectionFile编号为"' + ids + '"的数据项?').then(function () { + this.$modal.confirm('是否确认删除inspectionFile编号为"' + ids + '"的数据项?').then(function() { return delInspectionFile(ids) }).then(() => { this.getList() @@ -931,14 +947,14 @@ export default { return reject() } this.$message.success('上传成功:' + data.Location) - this.fileList.push({name: file.name, url: data.Location}) + this.fileList.push({ name: file.name, url: data.Location }) resolve() } ) }) }, // 直接使用 cos-js-sdk 进行上传 - async uploadToCOS({file}) { + async uploadToCOS({ file }) { const fileName = `files/${file.name}` // 你的存储路径 cos.putObject( { @@ -996,7 +1012,7 @@ export default { this.fileList.push({ name: file.name, url: `https://${data.Location}`, // 腾讯云返回的 URL - servicePackageId: this.queryParams.servicePackageId, + servicePackageId: this.queryParams.servicePackageId }) // return this.fileList @@ -1126,7 +1142,7 @@ export default { /* 时间样式 */ .step-time { font-size: 14px; -//color: #666; + //color: #666; } /* 文件名称高亮 */ diff --git a/src/views/base/workReport/index.vue b/src/views/base/workReport/index.vue index f11580f..37ecf0a 100644 --- a/src/views/base/workReport/index.vue +++ b/src/views/base/workReport/index.vue @@ -249,6 +249,18 @@ export default { }, /** 搜索按钮操作 */ handleQuery() { + const reportTime = this.queryParams.reportTime; + this.queryParams = { + pageNo: 1, + pageSize: 10, + reportTopic: null, + reportTime: reportTime, + createTime: [], + userId: null, + userName: null, + servicePackageId: this.$route.query.servicePackageId, + dictType: this.$route.query.dictType, + } this.queryParams.pageNo = 1; this.getList(); }, diff --git a/src/views/rescue/staff/api/staff.js b/src/views/rescue/staff/api/staff.js index b8cbec2..bc4fba2 100644 --- a/src/views/rescue/staff/api/staff.js +++ b/src/views/rescue/staff/api/staff.js @@ -81,7 +81,7 @@ export function delUser(userId) { // 导出用户 export function exportUser(query) { return request({ - url: '/base/dl-drive-school-coach/export', + url: '/system/rescueInfo/drviceExport', method: 'get', params: query, responseType: 'blob' diff --git a/src/views/rescue/staff/index.vue b/src/views/rescue/staff/index.vue index 8c1e07a..2d51a82 100644 --- a/src/views/rescue/staff/index.vue +++ b/src/views/rescue/staff/index.vue @@ -26,10 +26,10 @@ 新增 - + 导出 @@ -73,7 +73,6 @@ - @@ -152,7 +151,7 @@ stripe style="width: 100%"> @@ -161,45 +160,17 @@ label="失败原因"> - - + prop="phonenumber" + label="手机号码"> - - - - - - - - - - - -