1 line
15 KiB
JSON
1 line
15 KiB
JSON
{"remainingRequest":"G:\\project\\smart-power-ui\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!G:\\project\\smart-power-ui\\src\\views\\iot\\device\\profile\\info.vue?vue&type=script&lang=js&","dependencies":[{"path":"G:\\project\\smart-power-ui\\src\\views\\iot\\device\\profile\\info.vue","mtime":1618560412973},{"path":"G:\\project\\smart-power-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1591751767036},{"path":"G:\\project\\smart-power-ui\\node_modules\\babel-loader\\lib\\index.js","mtime":1610504270305},{"path":"G:\\project\\smart-power-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1591751767036},{"path":"G:\\project\\smart-power-ui\\node_modules\\vue-loader\\lib\\index.js","mtime":1610504274351}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:Ly8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KCmltcG9ydCB7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WQoKSB7fSwKICAgIHN1Ym1pdCgpIHsKICAgICAgaWYgKHRoaXMudGVtcC5kZXZpY2VOYW1lICYmIHRoaXMudGVtcC5kZXZpY2VJZCkgewogICAgICAgIHVwZGF0ZURldmljZSh0aGlzLnRlbXApLnRoZW4ocmVzcG9uc2UgPT4gewogICAgICAgICAgdGhpcy51cGRhdGVTdGF0ZSA9IGZhbHNlOwogICAgICAgICAgaWYgKHJlc3BvbnNlLmNvZGUgPT09IDIwMCkgewogICAgICAgICAgICB0aGlzLm1zZ1N1Y2Nlc3MoIuS/ruaUueaIkOWKnyIpOwogICAgICAgICAgfQogICAgICAgICAgdGhpcy4kZW1pdCgidXBkYXRlSW5mbyIsIHsKICAgICAgICAgICAgZGV2aWNlSWQ6IHRoaXMuaW5mb0RhdGEuZGV2aWNlSWQsCiAgICAgICAgICAgIGRldmljZU5hbWU6IHRoaXMuaW5mb0RhdGEuZGV2aWNlTmFtZQogICAgICAgICAgfSk7CiAgICAgICAgfSk7CiAgICAgIH0gZWxzZSB7CiAgICAgICAgdGhpcy5tc2dFcnJvcigi6K6+5aSH5ZCN56ew5LiN6IO95Li656m677yBIik7CiAgICAgIH0KICAgIH0KICB9Cn07Cg=="},{"version":3,"sources":["info.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"info.vue","sourceRoot":"src/views/iot/device/profile","sourcesContent":["<template>\n <div class=\"product-details-info\">\n <div class=\"group-list-info\">\n <div class=\"top\">\n <div class=\"top-label\">\n <svg-icon icon-class=\"A_product1\" style=\"margin-right: 2px; height: 20px; width: 20px;\" />设备信息\n <span\n v-if=\"updateState === false\"\n style=\"margin: 0px 15px 0 10px; font-weight: 200; font-size: 14px;\"\n >设备名称:{{infoData.deviceName}}</span>\n <span\n v-if=\"updateState === true\"\n style=\"margin: 0px 5px 0 10px; font-weight: 200; font-size: 14px;\"\n >设备名称:</span>\n <el-input v-if=\"updateState === true\" v-model=\"temp.deviceName\" />\n <el-button\n v-if=\"updateState === false\"\n type=\"text\"\n @click.stop=\"handleUpdate(infoData)\"\n >编辑</el-button>\n <el-button v-if=\"updateState === true\" type=\"text\" @click.stop=\"submit\">确定</el-button>\n </div>\n <!-- <div class=\"top-button\">\n <el-button type=\"primary\" @click=\"download\" size=\"small\">下载本地模拟器</el-button>\n </div> -->\n </div>\n </div>\n <div class=\"group-list-table\">\n <div class=\"table-row\">\n <div class=\"table-row-col\">\n <div class=\"title\">设备ID</div>\n <div class=\"content\">\n <span class=\"name\">{{infoData.deviceKey}}</span>\n <el-button type=\"text\" size=\"small\" @click.stop=\"copyTexts(infoData.deviceKey)\">复制</el-button>\n </div>\n </div>\n <div class=\"table-row-col\">\n <div class=\"title\">型号</div>\n <div class=\"content\">\n <span class=\"group-id\">{{infoData.modelName}}</span>\n </div>\n </div>\n <div class=\"table-row-col\">\n <div class=\"title\">设备密码</div>\n <div class=\"content\">\n <span v-show=\"!showDevicePassword\" class=\"centent\">********</span>\n <span\n v-show=\"showDevicePassword\"\n class=\"centent secret\"\n :title=\"infoData.devicePassword\"\n >{{infoData.devicePassword}}</span>\n <el-button\n v-show=\"!showDevicePassword\"\n type=\"text\"\n size=\"small\"\n @click.stop=\"showDevicePassword = true\"\n >显示</el-button>\n <el-button\n v-show=\"showDevicePassword\"\n type=\"text\"\n size=\"small\"\n @click.stop=\"copyTexts(infoData.devicePassword)\"\n >复制</el-button>\n <el-button\n v-show=\"showDevicePassword\"\n type=\"text\"\n size=\"small\"\n @click.stop=\"showDevicePassword = false\"\n >隐藏</el-button>\n </div>\n </div>\n </div>\n <div class=\"table-row\">\n <div class=\"table-row-col\">\n <div class=\"title\">产品PK</div>\n <div class=\"content\">\n <span class=\"name\">{{infoData.prodKey}}</span>\n <el-button type=\"text\" size=\"small\" @click.stop=\"copyTexts(infoData.prodKey)\">复制</el-button>\n </div>\n </div>\n\n <div class=\"table-row-col\">\n <div class=\"title\">设备KEY</div>\n <div class=\"content\">{{infoData.deviceKey }}</div>\n </div>\n <div class=\"table-row-col\">\n <div class=\"title\">devSecret</div>\n <div class=\"content\">\n <span v-show=\"!showProdSecret\" class=\"centent\">********</span>\n <span\n v-show=\"showProdSecret\"\n class=\"centent secret\"\n :title=\"infoData.deviceSecret\"\n >{{infoData.deviceSecret}}</span>\n <el-button\n v-show=\"!showProdSecret\"\n type=\"text\"\n size=\"small\"\n @click.stop=\"showProdSecret = true\"\n >显示</el-button>\n <el-button\n v-show=\"showProdSecret\"\n type=\"text\"\n size=\"small\"\n @click.stop=\"copyTexts(infoData.deviceSecret)\"\n >复制</el-button>\n <el-button\n v-show=\"showProdSecret\"\n type=\"text\"\n size=\"small\"\n @click.stop=\"showProdSecret = false\"\n >隐藏</el-button>\n </div>\n </div>\n </div>\n\n <div class=\"table-row\">\n <div class=\"table-row-col\">\n <div class=\"title\">设备类型</div>\n <div class=\"content\">{{infoData.deviceTypeName}}</div>\n </div>\n <div class=\"table-row-col\">\n <div class=\"title\">当前状态</div>\n <div class=\"content\" v-if=\"infoData.deviceState === 'ONLINE'\">在线</div>\n <div class=\"content\" v-else-if=\"infoData.deviceState === 'OFFLINE'\">离线</div>\n <div class=\"content\" v-else-if=\"infoData.deviceState === 'OUTLINE'\">脱线</div>\n <div class=\"content\" v-else-if=\"infoData.deviceState === 'UNACTIVE'\">未激活</div>\n </div>\n\n <div class=\"table-row-col\">\n <div class=\"title\">创建时间</div>\n <div class=\"content\">{{infoData.createTime || '--'}}</div>\n </div>\n </div>\n\n <div class=\"table-row\">\n <div class=\"table-row-col\" style=\"flex: 3 1 0%;\">\n <div class=\"title\">设备图片</div>\n <div class=\"content\">--</div>\n </div>\n </div>\n </div>\n </div>\n</template>\n<script>\nimport { updateDevice } from \"@/api/iot/device\";\nexport default {\n name: \"DeviceInfo\",\n props: [\"infoData\"],\n data() {\n const validatorNull = (rule, value, callback) => {\n callback();\n };\n return {\n updateState: false,\n prodtreeOptions: [],\n modelList: [],\n showProdSecret: false,\n showDevicePassword: false,\n temp: {\n deviceName: \"\",\n deviceId: undefined\n },\n rules: {}\n };\n },\n methods: {\n copyTexts(val) {\n this.copeFu(val, this);\n },\n // 设备修改只能修改名称\n handleUpdate(row) {\n this.newTemp();\n this.temp = Object.assign({}, row);\n this.updateState = true;\n },\n newTemp() {\n this.temp = {\n deviceName: \"\",\n deviceId: undefined\n };\n },\n // 下载本地模拟器 -- 暂未开放\n download() {},\n submit() {\n if (this.temp.deviceName && this.temp.deviceId) {\n updateDevice(this.temp).then(response => {\n this.updateState = false;\n if (response.code === 200) {\n this.msgSuccess(\"修改成功\");\n }\n this.$emit(\"updateInfo\", {\n deviceId: this.infoData.deviceId,\n deviceName: this.infoData.deviceName\n });\n });\n } else {\n this.msgError(\"设备名称不能为空!\");\n }\n }\n }\n};\n</script>\n\n<style lang=\"scss\">\n.product-details-info {\n .group-list-info {\n .top {\n text-align: left;\n width: 100%;\n float: left;\n height: 40px;\n .top-label {\n float: left;\n width: calc(100% - 200px);\n font-size: 16px;\n font-weight: 700;\n color: #373d41;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n .el-input--medium {\n width: 150px;\n }\n .el-button--text {\n padding: 8px 12px;\n color: #333;\n }\n .el-button--text:hover {\n background-color: #d1dbe6;\n border-radius: 0;\n color: #1890ff;\n }\n }\n .top-button {\n float: left;\n text-align: right;\n width: 200px;\n }\n }\n display: flex;\n justify-content: space-between;\n margin-bottom: 6px;\n flex: 1;\n .title {\n line-height: 30px;\n font-size: 16px;\n font-weight: 700;\n color: #373d41;\n display: flex;\n align-items: center;\n flex: 1;\n }\n }\n .group-list-table {\n border-top: 1px solid #d4d4d4;\n border-left: 1px solid #d4d4d4;\n .table-row {\n display: flex;\n width: 100%;\n .table-row-col {\n display: flex;\n flex: 1 1 0%;\n overflow: hidden;\n font-size: 14px;\n .title {\n width: 180px;\n height: 48px;\n color: rgb(116, 119, 122);\n display: flex;\n align-items: center;\n background: rgb(250, 250, 252);\n border-bottom: 1px solid #d4d4d4;\n border-right: 1px solid #d4d4d4;\n padding: 0px 12px;\n margin-bottom: 0px;\n font-size: 15px;\n font-weight: 100;\n }\n .content {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n flex: 1 1 0%;\n overflow: hidden;\n color: #666;\n border-bottom: 1px solid #d4d4d4;\n border-right: 1px solid #d4d4d4;\n padding: 0px 12px;\n .name {\n display: inline-block;\n max-width: 100%;\n white-space: nowrap;\n text-overflow: ellipsis;\n cursor: pointer;\n overflow: hidden;\n }\n .group-id {\n margin-right: 8px;\n }\n .notice-item {\n display: inline-block;\n width: 6px;\n height: 6px;\n border-radius: 6px;\n background: #d3d5d5;\n margin-right: 3px;\n }\n .n {\n background: #0fc18a;\n }\n .secret {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n }\n }\n }\n }\n .eldaialog-wrap {\n .el-dialog__header {\n border-bottom: 1px solid #747373;\n }\n .el-radio {\n width: 90px;\n }\n .el-dialog__body {\n padding: 0px;\n }\n .cus-itme.el-form-item--mini .el-form-item__content {\n margin-left: 0px !important;\n }\n .select {\n // width: 92%;\n display: inline-block;\n width: calc(92% - 50px);\n display: inline-block;\n float: left;\n margin-right: 4px;\n .el-input {\n width: 100%;\n }\n }\n .el-textarea {\n width: 92%;\n width: calc(92% - 50px);\n width: 100%;\n }\n .el-input {\n width: 92%;\n width: calc(92% - 50px);\n width: 100%;\n }\n .info {\n width: 100%;\n float: left;\n margin-bottom: 15px;\n /* margin-top: 13px; */\n margin-left: -10px;\n font-size: 16px;\n font-weight: 600;\n }\n .span {\n width: calc(100% - 91px);\n display: block;\n content: \"\";\n height: 1px;\n /* width: 100%; */\n border-top: 1px dashed #ecedee;\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n margin-left: 80px;\n margin-top: -10px;\n }\n .form-buttons-div {\n height: 45px;\n display: flex;\n justify-content: flex-end;\n align-items: center;\n padding-right: 10px;\n border-top: 1px solid #747373;\n }\n }\n\n .group-dialog {\n .el-dialog__header {\n border-bottom: 1px solid #ccc;\n }\n .el-dialog__body {\n padding: 28px;\n .el-form-item {\n margin-bottom: 0;\n .el-form-item__label {\n line-height: 30px;\n }\n }\n }\n }\n}\n</style>\n"]}]} |