diff --git a/src/api/base/bracelet.js b/src/api/base/bracelet.js index 0573b62..b35f829 100644 --- a/src/api/base/bracelet.js +++ b/src/api/base/bracelet.js @@ -72,6 +72,15 @@ export function addBox(data) { }) } +// 手环管理页面新增设备属性 +export function addAttribute(data) { + return request({ + url: '/bracelet/bracelet/addAttribute', + method: 'post', + data: data + }) +} + // 手环绑定选择页面绑定手环 export function addShBind(data) { return request({ @@ -164,12 +173,3 @@ export function exportSh(query) { params: query }) } - -// 查询班组成员列表 -export function getWorkPersonList(query) { - return request({ - url: '/bracelet/team/getWorkPersonList', - method: 'get', - params: query - }) -} \ No newline at end of file diff --git a/src/api/comprehensive/constructionRecord.js b/src/api/comprehensive/constructionRecord.js new file mode 100644 index 0000000..2051b01 --- /dev/null +++ b/src/api/comprehensive/constructionRecord.js @@ -0,0 +1,21 @@ +import request from '@/utils/request' + +// 查询列表 +export function DeviceLyRecord(query) { + return request({ + url: '/bracelet/deviceLyRecord/list', + method: 'get', + params: query + }) +} + +// 导出 +export function exportDeviceLyRecord(query) { + return request({ + url: '/bracelet/export/exportDeviceLyRecord', + method: 'get', + responseType: 'blob', + params: query + }) +} + diff --git a/src/api/comprehensive/warnHistory.js b/src/api/comprehensive/warnHistory.js new file mode 100644 index 0000000..2051b01 --- /dev/null +++ b/src/api/comprehensive/warnHistory.js @@ -0,0 +1,21 @@ +import request from '@/utils/request' + +// 查询列表 +export function DeviceLyRecord(query) { + return request({ + url: '/bracelet/deviceLyRecord/list', + method: 'get', + params: query + }) +} + +// 导出 +export function exportDeviceLyRecord(query) { + return request({ + url: '/bracelet/export/exportDeviceLyRecord', + method: 'get', + responseType: 'blob', + params: query + }) +} + diff --git a/src/views/base/bracelet/index.vue b/src/views/base/bracelet/index.vue index d547d82..92a4731 100644 --- a/src/views/base/bracelet/index.vue +++ b/src/views/base/bracelet/index.vue @@ -124,6 +124,12 @@ @click="handleUpdate(scope.row)" v-hasPermi="['basic:bracelet:edit']" >编辑 + 新增设备属性 - - + + @@ -346,11 +393,6 @@ - @@ -509,46 +551,6 @@ - - - - - - - - - - - - - - - {{ scope.row.shboxBindNum }}/{{ scope.row.shboxCapacity }} - - - - - - - - - - - - - @@ -609,7 +611,7 @@ + + \ No newline at end of file diff --git a/src/views/comprehensive/warnHistory/index.vue b/src/views/comprehensive/warnHistory/index.vue new file mode 100644 index 0000000..14ea7af --- /dev/null +++ b/src/views/comprehensive/warnHistory/index.vue @@ -0,0 +1,260 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 查询 + 重置 + + + + + + + 导出数据 + + + + + + + + + + + + + + + + + {{ scope.row.teamLeader }}\{{ scope.row.leaderPhone }} + + + + + + + + + 在用 + {{ scope.row.ghTime }} + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/construction/sideband/index.vue b/src/views/construction/sideband/index.vue index 174f059..7ce3398 100644 --- a/src/views/construction/sideband/index.vue +++ b/src/views/construction/sideband/index.vue @@ -68,8 +68,7 @@ - - + @@ -140,12 +139,13 @@ >绑定设备 - + - + + @@ -169,8 +169,8 @@ - + - + + @@ -290,7 +291,7 @@ import uploadFile from '../../components/uploadFile.vue' export default { name: "Post", - dicts: ['sys_normal_disable','sys_user_sex'], + dicts: ['sys_normal_disable','sys_device_type','sys_user_sex'], components: { uploadFile }, @@ -303,7 +304,8 @@ // 遮罩层3 loadingThree:true, // 选中数组 - ids: [], + + idLists:[], // 非单个禁用 single: true, // 非多个禁用 @@ -445,7 +447,8 @@ this.queryKeyword.sidebandId = this.sidebandId; listDevice(this.queryKeyword).then(response => { this.bindList = response.rows; - this.totalTwo = response.total; + this.total = response.total; + console.log(this.total) this.loadingTwo = false; }); }, @@ -494,7 +497,18 @@ }, // 多选框选中数据 handleSelectionChange(selection) { - this.ids = selection.map(item => item.deviceId) + // forEach.(selection, function(item){ + // this.idLists.push({id: item.deviceId, type: item.deviceTypeName}) + // }) + console.log(selection) + selection.map(item => { + this.idLists.push({id: item.deviceId, type: item.deviceTypeName}) + }) + // forEach(selection, function(item){ + // this.idLists.push({id: item.deviceId, type: item.deviceTypeName}) + // }) + // this.idLists.push({id: selection.map(item => item.deviceId), type: selection.map(item => item.deviceTypeName)}) + this.single = selection.length!=1 this.multiple = !selection.length }, @@ -555,6 +569,7 @@ const param = { sidebandId:row.sidebandId, deviceId:row.deviceId, + deviceTypeName:row.deviceTypeName, } this.$modal.confirm('确定当前设备与该边带设备解除绑定吗?').then(function() { return delDevice(param); @@ -568,13 +583,18 @@ /** 绑定操作 */ handleBindDevice(row) { console.log(row) - const deviceIds = row.devideId || this.ids; + console.log(this.idLists) + const deviceIds = this.idLists; console.log(deviceIds) const param = { sidebandId:this.queryKeywordTemp.sidebandId, deviceIds:deviceIds, } console.log(param) + if(deviceIds.length==0){ + this.$modal.msgWarning("请选择设备"); + return; + } this.$modal.confirm('确定与该边带绑定吗?').then(function() { return bindDevice(param); }).then(() => { @@ -616,6 +636,10 @@ sidebandId:row.sidebandId, bindNum:row.bindNum, } + if(row.bindNum>0){ + this.$modal.msgWarning("该边带已绑定设备,无法删除"); + return; + } this.$modal.confirm('是否确认删除边带名称为"' + row.sidebandId + '"的数据项?').then(function() { return delSideband(param); }).then(() => {