1 line
21 KiB
JSON
1 line
21 KiB
JSON
{"remainingRequest":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\equipmentManage\\access.vue?vue&type=style&index=0&id=26515e82&lang=scss&scoped=true&","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\equipmentManage\\access.vue","mtime":1614735254000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\css-loader\\index.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\loaders\\stylePostLoader.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\postcss-loader\\src\\index.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\sass-loader\\lib\\loader.js","mtime":1533139052000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.el-table {\n\t.el-button--text {\n\t\tpadding: 8px 0;\n\n\t\t&.hide-text {\n\t\t\tmax-width: 120px;\n\t\t\ttext-overflow: ellipsis;\n\t\t\toverflow: hidden;\n\t\t\twhite-space: nowrap;\n\t\t\tword-break: break-all;\n\t\t}\n\t}\n\n\t.el-dropdown {\n\t\tmargin-left: 10px;\n\t}\n}\n\n.el-dropdown-menu__item {\n\t&.danger {\n\t\tcolor: #F56C6C !important;\n\t}\n}\n",{"version":3,"sources":["access.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsaA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA","file":"access.vue","sourceRoot":"src/views/modules/equipmentManage","sourcesContent":["<template>\n\t<el-card shadow=\"never\" class=\"aui-card--fill\">\n\t\t<el-form ref=\"ruleForm\" :model=\"dataForm\" label-width=\"70px\" inline>\n\t\t\t<el-form-item label=\"设备IP\" prop=\"aeClientip\">\n\t\t\t\t<el-input v-model=\"dataForm.aeClientip\" placeholder=\"请输入\" clearable></el-input>\n\t\t\t</el-form-item>\n\t\t\t<el-form-item label=\"设备名称\" prop=\"devicename\">\n\t\t\t\t<el-input v-model=\"dataForm.devicename\" placeholder=\"请输入\" clearable></el-input>\n\t\t\t</el-form-item>\n\t\t\t<el-form-item label=\"设备状态\" prop=\"state\">\n\t\t\t\t<el-select v-model=\"dataForm.state\" placeholder=\"请选择\" clearable>\n\t\t\t\t\t<el-option v-for=\"item in equipStatusList\" :key=\"item.dictValue\" :label=\"item.dictLabel\" :value=\"item.dictValue\">\n\t\t\t\t\t</el-option>\n\t\t\t\t</el-select>\n\t\t\t</el-form-item>\n\t\t\t<el-form-item label=\"安装位置\" prop=\"dfFloorid\">\n\t\t\t\t<el-cascader v-model=\"dfFloorid\" ref=\"floor\" :props=\"{ checkStrictly: true, value: 'df_floorid', label: 'df_floorname'}\"\n\t\t\t\t clearable placeholder=\"请选择\" :options=\"addressList\"></el-cascader>\n\t\t\t</el-form-item>\n<!--\t\t\t<el-form-item label=\"姓名\" prop=\"username\">\n\t\t\t\t<el-input v-model=\"dataForm.username\" placeholder=\"请输入\" clearable></el-input>\n\t\t\t</el-form-item>-->\n\t\t\t<el-form-item label=\"学号/工号\" prop=\"userno\">\n\t\t\t\t<el-input v-model=\"dataForm.userno\" placeholder=\"请输入\" clearable></el-input>\n\t\t\t</el-form-item>\n\t\t\t<el-form-item>\n\t\t\t\t<el-button @click=\"search\">查询</el-button>\n\t\t\t\t<el-button type=\"warning\" @click=\"resetFormHandle()\">重置</el-button>\n\t\t\t\t<el-button v-if=\"$hasPermission('system:scaidooreight:save')\" type=\"primary\" @click=\"addAccess\">新建</el-button>\n\t\t\t\t<el-button v-if=\"$hasPermission('system:scaidooreight:transfacelisttodoor')\" type=\"success\" @click=\"sendFaceToEquip\">下发指定</el-button>\n\t\t\t\t<el-button v-if=\"$hasPermission('system:scaidooreight:allFaceto')\" type=\"success\" @click=\"sendFaceAll\">下发所有</el-button>\n\t\t\t\t<el-button v-if=\"$hasPermission('system:scaidooreight:disconnectAll')\" type=\"danger\" @click=\"closeAllDevice\">断开所有设备</el-button>\n\t\t\t\t<el-button v-if=\"$hasPermission('system:scaidooreight:batchUpatePsw')\" type=\"danger\" @click=\"updatePassWordHandle\">批量修改密码</el-button>\n\t\t\t\t<el-button v-if=\"$hasPermission('system:scaidooreightpersonlist:delete')\" type=\"danger\" @click=\"delAllPerson\" :loading=\"loading\">一键删除图像</el-button>\n\t\t\t</el-form-item>\n\t\t</el-form>\n\t\t<el-table :data=\"dataList\" @selection-change=\"handleSelectionChange\">\n\t\t\t<el-table-column type=\"selection\" label=\"全选\" width=\"60\" align=\"center\"></el-table-column>\n\t\t\t<el-table-column type=\"index\" label=\"序号\" width=\"60\" align=\"center\"></el-table-column>\n\t\t\t<el-table-column prop=\"aeClientip\" label=\"设备IP\" align=\"center\"></el-table-column>\n\t\t\t<!-- <el-table-column prop=\"aeSerialnumber\" label=\"设备序列号\" align=\"center\"></el-table-column> -->\n\t\t\t<el-table-column prop=\"aeDevicename\" label=\"设备名称\" align=\"center\" show-overflow-tooltip width=\"160\">\n\t\t\t\t<!-- <template slot-scope=\"scope\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<el-button class=\"hide-text\" type=\"text\" @click=\"gotoAccessRecord(scope.row.aeId)\">{{scope.row.aeDevicename}}</el-button>\n\t\t\t\t\t</div>\n\t\t\t\t</template> -->\n\t\t\t</el-table-column>\n\t\t\t<el-table-column label=\"设备状态\" align=\"center\" width=\"80\">\n\t\t\t\t<template slot-scope=\"scope\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<span v-if=\"scope.row.aeState==0\" style=\"color:#67C23A;\">{{$getDictLabel('equipment_status', scope.row.aeState)}}</span>\n\t\t\t\t\t\t<span v-else style=\"color:#f56c6c;\">{{$getDictLabel('equipment_status', scope.row.aeState)}}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</template>\n\t\t\t</el-table-column>\n\t\t\t<el-table-column label=\"设备签到类型\" align=\"center\">\n\t\t\t\t<template slot-scope=\"scope\">\n\t\t\t\t\t<span v-if=\"scope.row.aeSigntype==1\" style=\"color:#67C23A;\" class=\"el-icon-d-arrow-right\"> {{ $getDictLabel(\"accessEquipType\", scope.row.aeSigntype) }}</span>\n\t\t\t\t\t<span v-else style=\"color:#f56c6c;\" class=\"el-icon-d-arrow-left\"> {{ $getDictLabel(\"accessEquipType\", scope.row.aeSigntype) }}</span>\n\t\t\t\t</template>\n\t\t\t</el-table-column>\n\t\t\t<el-table-column prop=\"\n\t\t\t\t\t aeDevicetype\" label=\"设备类型\" :formatter=\"formatterDevinceType\" align=\"center\" width=\"80\"></el-table-column>\n\t\t\t<el-table-column prop=\"floorName\" label=\"安装位置\" align=\"center\" width=\"120\"></el-table-column>\n\t\t\t<el-table-column prop=\"aeSetupdate\" label=\"安装时间\" align=\"center\" width=\"120\"></el-table-column>\n\t\t\t<el-table-column prop=\"aeExpirydate\" label=\"有效期\" align=\"center\" width=\"120\"></el-table-column>\n\t\t\t<el-table-column prop=\"aeFacedowntime\" label=\"最后下发时间\" align=\"center\" width=\"180\"></el-table-column>\n\t\t\t<!-- <el-table-column prop=\"aeTransstate\" label=\"下发状态\" align=\"center\">\n <template slot-scope=\"scope\">\n <div>\n <span v-if=\"scope.row.aeTransstate\" style=\"color:#ebb563;\">正在传输</span>\n <span v-else style=\"color:#85ce61;\">已完成</span>\n </div>\n </template>\n </el-table-column> -->\n\t\t\t<el-table-column prop=\"aeFacetotal\" label=\"已下发人数\" width=\"100\" align=\"center\">\n\t\t\t\t<template slot-scope=\"scope\">\n\t\t\t\t\t<el-link type=\"primary\" :underline=\"false\" @click=\"showPersonList(scope.row)\">{{scope.row.aeFacetotal}}</el-link>\n\t\t\t\t</template>\n\t\t\t</el-table-column>\n\t\t\t<el-table-column label=\"操作\" align=\"center\" width=\"330\">\n\t\t\t\t<template slot-scope=\"scope\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<el-button type=\"text\" @click=\"viewHandle(scope.row)\">详情</el-button>\n\t\t\t\t\t\t<el-button v-if=\"$hasPermission('system:scaidooreight:update')\" type=\"text\" @click=\"editHandle(scope.row)\">修改</el-button>\n\t\t\t\t\t\t<el-button v-if=\"$hasPermission('system:scaidooreight:openRemoteDoor')\" type=\"text\" @click=\"optionsHanlder({path:'openRemoteDoor/',id:scope.row.aeId})\">远程开门</el-button>\n\t\t\t\t\t\t<el-button v-if=\"$hasPermission('system:scaidooreight:allFaceto')&&scope.row.aeTransstate==0\" type=\"text\" @click=\"sendHandle(scope.row)\">下发所有</el-button>\n\t\t\t\t\t\t<el-button v-if=\"$hasPermission('system:scaidooreight:delete')\" type=\"text\" @click=\"deleteHandle(scope.row.aeId)\"\n\t\t\t\t\t\t style=\"color:#f56c6c\">删除</el-button>\n\t\t\t\t\t\t<el-dropdown @command=\"optionsHanlder\">\n\t\t\t\t\t\t\t<el-button type=\"text\">\n\t\t\t\t\t\t\t\t更多<i class=\"el-icon-arrow-down el-icon--right\"></i>\n\t\t\t\t\t\t\t</el-button>\n\t\t\t\t\t\t\t<el-dropdown-menu slot=\"dropdown\">\n\t\t\t\t\t\t\t\t<el-dropdown-item v-if=\"$hasPermission('system:scaidooreight:setting')\" :command=\"{path:'config',id:scope.row.aeId}\">配置信息</el-dropdown-item>\n\t\t\t\t\t\t\t\t<el-dropdown-item v-if=\"$hasPermission('system:scaidooreight:reboot')\" :command=\"{path:'rebootDevice/',id:scope.row.aeId}\">重启设备端</el-dropdown-item>\n\t\t\t\t\t\t\t\t<el-dropdown-item v-if=\"$hasPermission('system:scaidooreight:openRemoteDoor')\" :command=\"{path:'openRemoteDoor/',id:scope.row.aeId}\">远程开门</el-dropdown-item>\n\t\t\t\t\t\t\t\t<el-dropdown-item v-if=\"$hasPermission('system:scaidooreight:disconnect')\" :command=\"{path:'disconnectToDevice/',id:scope.row.aeId}\">断开设备</el-dropdown-item>\n\t\t\t\t\t\t\t\t<el-dropdown-item v-if=\"$hasPermission('system:scaidooreight:clean')\" class=\"danger\" :command=\"{path:'cleanDeviceData/',id:scope.row.aeId}\">重置设备</el-dropdown-item>\n\t\t\t\t\t\t\t</el-dropdown-menu>\n\t\t\t\t\t\t</el-dropdown>\n\t\t\t\t\t</div>\n\t\t\t\t</template>\n\t\t\t</el-table-column>\n\t\t</el-table>\n\t\t<el-pagination :current-page=\"page\" :page-sizes=\"[10, 20, 50, 100,300]\" :page-size=\"limit\" :total=\"total\" layout=\"total, sizes, prev, pager, next, jumper\"\n\t\t @size-change=\"pageSizeChangeHandle\" @current-change=\"pageCurrentChangeHandle\">\n\t\t</el-pagination>\n\t\t<!-- 新增修改 -->\n\t\t<add-or-update ref=\"addOrUpdate\"></add-or-update>\n\t\t<!-- 查看 -->\n\t\t<view-access ref=\"viewAccess\"></view-access>\n\t\t<!-- 已下发人数列表 -->\n\t\t<person-list ref=\"personList\"></person-list>\n\t\t<!-- 下发操作 -->\n\t\t<send-face ref=\"sendFace\" :aeids=\"aeIds\" accessType=\"eight\"></send-face>\n\t\t<!-- 配置信息 -->\n\t\t<access-config ref=\"accessConfig\"></access-config>\n\t\t<!-- 批量修改密码 -->\n\t\t<access-update-password ref=\"accessUpdatePassword\" v-if=\"accessUpdatePasswordVisible\"></access-update-password>\n\t</el-card>\n</template>\n\n<script>\n\timport mixinViewModule from '@/mixins/view-module'\n\timport {\n\t\ttreeDataTranslate,\n\t\tgetDictLabel,\n\t\tgetDictDataList\n\t} from '@/utils'\n\timport addOrUpdate from './access-add-or-update'\n\timport viewAccess from './access-view'\n\timport personList from './access-person-list'\n\timport sendFace from './access-send-face'\n\timport accessConfig from './access-config'\n\timport AccessUpdatePassword from './access-update-password'\n\texport default {\n\t\tmixins: [mixinViewModule],\n\t\tcomponents: {\n\t\t\taddOrUpdate,\n\t\t\tviewAccess,\n\t\t\tpersonList,\n\t\t\tsendFace,\n\t\t\taccessConfig,\n\t\t\tAccessUpdatePassword\n\t\t},\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tloading : false,\n\t\t\t\tmixinViewModuleOptions: {\n\t\t\t\t\tgetDataListURL: '/system/scaidooreight/page',\n\t\t\t\t\tdeleteURL: '/system/scaidooreight',\n\t\t\t\t\tgetDataListIsPage: true\n\t\t\t\t},\n\t\t\t\taddressList: [], // 安装位置\n\t\t\t\tdfFloorid: [], // 选中id数组\n\t\t\t\tequipStatusList: getDictDataList('equipment_status'),\n\t\t\t\tlimit: 10,\n\t\t\t\tdataForm: {\n\t\t\t\t\taeClientip: \"\",\n\t\t\t\t\tstate: '',\n\t\t\t\t\tdevicename: '',\n\t\t\t\t\tfloorid: '', // 安装位置的id\n\t\t\t\t\tusername:'',\n\t\t\t\t\tuserno:''\n\t\t\t\t},\n\t\t\t\tcheckList: [],\n\t\t\t\tdataList: [],\n\t\t\t\taccessUpdatePasswordVisible: false\n\t\t\t}\n\t\t},\n\t\tcreated() {\n\t\t\tthis.getAddressList()\n\t\t},\n\t\twatch: {\n\t\t\t'dfFloorid': {\n\t\t\t\thandler(val) {\n\t\t\t\t\tif (val.length === 0) {\n\t\t\t\t\t\tthis.dataForm.floorid = \"\"\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.dataForm.floorid = val[val.length - 1]\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tcomputed: {\n\t\t\taeIds() {\n\t\t\t\treturn this.checkList.map(item => {\n\t\t\t\t\treturn item.aeId\n\t\t\t\t})\n\t\t\t},\n\t\t\t// 根据 数据 aeTransstate 判断是否有设备正在下发 1 有 0 否 如有下发 每1 分钟刷新一次数据\n\t\t\t// isNeedRefresh(){\n\t\t\t// return this.dataList.some(item=>item.aeTransstate)\n\t\t\t// }\n\t\t},\n\t\t// watch:{\n\t\t// // 监听是否需要刷新数据 执行定时任务\n\t\t// isNeedRefresh(state){\n\t\t// // 需要刷新 且 定时器未启动 则启动定时器\n\t\t// if(state&&!this.timer){\n\t\t// this.timer=setInterval(() => {\n\t\t// this.query();\n\t\t// }, 1000*30);\n\t\t// this.$once(\"hook:beforeDestroy\",()=>{\n\t\t// clearInterval(this.timer);\n\t\t// this.timer=null;\n\t\t// })\n\t\t// this.$once(\"hook:deactivated\",()=>{\n\t\t// clearInterval(this.timer);\n\t\t// this.timer=null;\n\t\t// })\n\t\t// }\n\t\t// // 不需要刷新 定时器仍在运行 则清除定时器\n\t\t// else if(!state&&this.timer){\n\t\t// clearInterval(this.timer);\n\t\t// this.timer=null;\n\t\t// }\n\t\t// }\n\t\t// },\n\t\tmethods: {\n\n\t\t\t//一键删除图像\n\t\t\tdelAllPerson(){\n\t\t\t\tlet userNo = this.dataForm.userno;\n\t\t\t\tif (userNo == ''){\n\t\t\t\t\treturn this.$message.warning(\"请输入学号或工号!\")\n\t\t\t\t}\n\n\t\t\t\tthis.loading = true\n\t\t\t\tthis.$http({\n\t\t\t\t\turl:`/system/scaidooreightpersonlist/` + userNo,\n\t\t\t\t\tmethod:\"delete\",\n\t\t\t\t}).then(({data:res})=>{\n\t\t\t\t\tthis.loading = false;\n\t\t\t\t\tif(res.code!=0){\n\t\t\t\t\t\treturn this.$message.error(res.msg)\n\t\t\t\t\t}\n\t\t\t\t\tthis.$message.success(res.msg)\n\t\t\t\t\tthis.query();//刷线当前\n\t\t\t\t})\n\t\t\t},\n\t\t\t// 安装位置列表\n\t\t\tgetAddressList() {\n\t\t\t\t// -1是获取所有楼栋\n\t\t\t\tthis.$http.get(`/system/scdormitoryfloor/tree/-1`).then(({\n\t\t\t\t\tdata: res\n\t\t\t\t}) => {\n\t\t\t\t\tif (res.code !== 0) {\n\t\t\t\t\t\treturn this.$message.error(res.msg)\n\t\t\t\t\t}\n\t\t\t\t\tthis.addressList = treeDataTranslate(res.data, 'df_floorid', 'df_parentid')\n\t\t\t\t}).catch(() => {})\n\t\t\t},\n\t\t\t// 重置\n\t\t\tresetFormHandle() {\n\t\t\t\tthis.dfFloorid = []\n\t\t\t\tthis.dataForm = {\n\t\t\t\t\taeClientip: \"\",\n\t\t\t\t\tstate: '',\n\t\t\t\t\tdevicename: '',\n\t\t\t\t\tdfFloorid: '',\n\t\t\t\t}\n\t\t\t\tthis.page = 1;\n\t\t\t\tthis.query();\n\t\t\t},\n\n\t\t\taddAccess() {\n\t\t\t\tthis.$refs['addOrUpdate'].init()\n\t\t\t},\n\t\t\tsearch() {\n\t\t\t\tthis.page = 1;\n\t\t\t\tthis.query();\n\t\t\t},\n\t\t\tviewHandle(row) {\n\t\t\t\tthis.$refs['viewAccess'].init(row)\n\t\t\t},\n\t\t\teditHandle(row) {\n\t\t\t\tthis.$refs['addOrUpdate'].init(row)\n\t\t\t},\n\t\t\tshowPersonList(row) {\n\t\t\t\tthis.$refs['personList'].init(row.aeId, row.aeDevicename)\n\t\t\t},\n\t\t\tformatterDevinceType(row) {\n\t\t\t\treturn getDictLabel('accessDevinceType', row.aeDevicetype)\n\t\t\t},\n\t\t\t// formatterState(row) {\n\t\t\t// \treturn getDictLabel('equipment_status', row.aeState)\n\n\t\t\t// },\n\t\t\thandleSelectionChange(data) {\n\t\t\t\tthis.checkList = data\n\t\t\t},\n\t\t\toptionsHanlder(options) {\n\t\t\t\t// 配置设备信息\n\t\t\t\tif (options.path == 'config') {\n\t\t\t\t\tthis.$refs['accessConfig'].init(options.id)\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t\tthis.$confirm('此操作存在一定风险,是否继续?', '提示', {\n\t\t\t\t\tconfirmButtonText: '确定',\n\t\t\t\t\tcancelButtonText: '取消',\n\t\t\t\t\ttype: 'warning'\n\t\t\t\t}).then(() => {\n\t\t\t\t\t// 重启设备端 远程开门 断开设备 重置设备\n\t\t\t\t\tthis.$http({\n\t\t\t\t\t\turl: \"/system/scaidooreight/\" + options.path + options.id,\n\t\t\t\t\t\tmethod: \"get\",\n\t\t\t\t\t}).then(({\n\t\t\t\t\t\tdata: res\n\t\t\t\t\t}) => {\n\t\t\t\t\t\tif (res.code != 0) {\n\t\t\t\t\t\t\treturn this.$message.error(res.msg)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.$message.success(res.msg)\n\t\t\t\t\t\tthis.query();\n\t\t\t\t\t})\n\t\t\t\t})\n\n\t\t\t},\n\t\t\tsendFaceToEquip() {\n\t\t\t\tif (this.checkList.length == 0) {\n\t\t\t\t\treturn this.$message.warning(\"请选择需要下发的设备!\")\n\t\t\t\t}\n\t\t\t\tthis.$refs['sendFace'].init();\n\n\t\t\t},\n\t\t\tsendFaceAll() {\n\t\t\t\tthis.$confirm('确认下发到所有设备?', '提示', {\n\t\t\t\t\tconfirmButtonText: '确定',\n\t\t\t\t\tcancelButtonText: '取消',\n\t\t\t\t\ttype: 'warning'\n\t\t\t\t}).then(() => {\n\t\t\t\t\tthis.$http({\n\t\t\t\t\t\turl: \"/system/scaidooreight/allFacetoAllDc\",\n\t\t\t\t\t\tmethod: \"get\",\n\t\t\t\t\t\ttimeout: 0,\n\t\t\t\t\t}).then(({\n\t\t\t\t\t\tdata: res\n\t\t\t\t\t}) => {\n\t\t\t\t\t\tif (res.code != 0) {\n\t\t\t\t\t\t\treturn this.$message.error(res.msg)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.$message.warning(\"正在下发中...\")\n\t\t\t\t\t\tthis.dataList.foreach(item => {\n\t\t\t\t\t\t\titem.aeTransstate = 1\n\t\t\t\t\t\t})\n\t\t\t\t\t\t// this.$message.success('设备已全部下发完成')\n\t\t\t\t\t\t// this.query();\n\t\t\t\t\t})\n\t\t\t\t}).catch(() => {})\n\t\t\t},\n\t\t\tsendHandle(row) {\n\t\t\t\tthis.$confirm('确认下发到设备?', '提示', {\n\t\t\t\t\tconfirmButtonText: '确认',\n\t\t\t\t\tcancelButtonText: '取消',\n\t\t\t\t\ttype: 'warning'\n\t\t\t\t}).then(() => {\n\t\t\t\t\tthis.$http({\n\t\t\t\t\t\turl: `/system/scaidooreight/allFacetoDc/${row.aeId}`,\n\t\t\t\t\t\tmethod: \"get\",\n\t\t\t\t\t\ttimeout: 0,\n\t\t\t\t\t}).then(({\n\t\t\t\t\t\tdata: res\n\t\t\t\t\t}) => {\n\t\t\t\t\t\tif (res.code != 0) {\n\t\t\t\t\t\t\treturn this.$message.error(res.msg)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.$message.warning(\"正在下发中...\")\n\t\t\t\t\t\trow.aeTransstate = 1;\n\t\t\t\t\t\t// this.$message.success(row.aeDevicename+' 下发完成')\n\t\t\t\t\t\t// this.query();\n\t\t\t\t\t})\n\t\t\t\t}).catch(() => {});\n\n\t\t\t},\n\t\t\t// 断开所有设备\n\t\t\tcloseAllDevice() {\n\t\t\t\tthis.$confirm('确认断开所有设备?', '提示', {\n\t\t\t\t\tconfirmButtonText: '确定',\n\t\t\t\t\tcancelButtonText: '取消',\n\t\t\t\t\ttype: 'warning'\n\t\t\t\t}).then(() => {\n\t\t\t\t\tthis.$http({\n\t\t\t\t\t\turl: \"/system/scaidooreight/disconnectAllDevice\",\n\t\t\t\t\t\tmethod: \"get\",\n\t\t\t\t\t}).then(({\n\t\t\t\t\t\tdata: res\n\t\t\t\t\t}) => {\n\t\t\t\t\t\tif (res.code != 0) {\n\t\t\t\t\t\t\treturn this.$message.error(res.msg)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.$message.success(res.msg)\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t},\n\t\t\t// 批量修改密码\n\t\t\tupdatePassWordHandle() {\n\t\t\t\tif (this.checkList.length === 0) {\n\t\t\t\t\treturn this.$message.warning(`请勾选需要变更密码的设备`)\n\t\t\t\t}\n\t\t\t\tlet idArr = this.checkList.map(item => {\n\t\t\t\t\treturn item.aeId\n\t\t\t\t})\n\t\t\t\tlet ids = JSON.stringify(idArr)\n\t\t\t\tthis.accessUpdatePasswordVisible = true\n\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\tthis.$refs['accessUpdatePassword'].init(ids)\n\t\t\t\t})\n\t\t\t},\n\t\t\t// 跳转到出入记录页面\n\t\t\tgotoAccessRecord(id) {\n\t\t\t\twindow.sessionStorage.setItem('access_record_aeid', id);\n\t\t\t\tthis.$router.push({\n\t\t\t\t\tname: 'statistics-accessRecord',\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t}\n</script>\n<style lang=\"scss\" scoped>\n\t.el-table {\n\t\t.el-button--text {\n\t\t\tpadding: 8px 0;\n\n\t\t\t&.hide-text {\n\t\t\t\tmax-width: 120px;\n\t\t\t\ttext-overflow: ellipsis;\n\t\t\t\toverflow: hidden;\n\t\t\t\twhite-space: nowrap;\n\t\t\t\tword-break: break-all;\n\t\t\t}\n\t\t}\n\n\t\t.el-dropdown {\n\t\t\tmargin-left: 10px;\n\t\t}\n\t}\n\n\t.el-dropdown-menu__item {\n\t\t&.danger {\n\t\t\tcolor: #F56C6C !important;\n\t\t}\n\t}\n</style>\n"]}]} |