smart-power-ui/node_modules/.cache/vue-loader/89090b7a872c9aa91cb4b181b4f...

1 line
16 KiB
JSON
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"remainingRequest":"G:\\project\\smart-power-ui\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!G:\\project\\smart-power-ui\\src\\views\\iot\\autocontrol\\job\\profile\\deviceParam.vue?vue&type=style&index=0&lang=scss&","dependencies":[{"path":"G:\\project\\smart-power-ui\\src\\views\\iot\\autocontrol\\job\\profile\\deviceParam.vue","mtime":1618542637036},{"path":"G:\\project\\smart-power-ui\\node_modules\\css-loader\\dist\\cjs.js","mtime":1592876569350},{"path":"G:\\project\\smart-power-ui\\node_modules\\vue-loader\\lib\\loaders\\stylePostLoader.js","mtime":1610504274351},{"path":"G:\\project\\smart-power-ui\\node_modules\\postcss-loader\\src\\index.js","mtime":1591751774425},{"path":"G:\\project\\smart-power-ui\\node_modules\\sass-loader\\dist\\cjs.js","mtime":1612140853844},{"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:CgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgo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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"deviceParam.vue","sourceRoot":"src/views/iot/autocontrol/job/profile","sourcesContent":["<template>\n <div class=\"autocontrol-job-params\">\n <el-row :gutter=\"15\">\n <el-col :span=\"11\">\n <span>设备:</span>\n <el-input\n style=\"width: 80%;\"\n :disabled=\"disabled\"\n v-model=\"form.deviceName\"\n placeholder=\"请输入内容\"\n @focus=\"deviceFocus\"\n ></el-input>\n </el-col>\n <el-col :span=\"11\">\n <span>分组:</span>\n <el-select v-model=\"form.cmdKey\" :disabled=\"disabled\" style=\"width: 85%;\" @change=\"cmdChange\" placeholder=\"请选择\">\n <el-option\n v-for=\"item in cmdListOption\"\n :key=\"item.cmdKey\"\n :label=\"item.cmdName\"\n :value=\"item.cmdKey\"\n ></el-option>\n </el-select>\n </el-col>\n <el-col :span=\"2\">\n <el-button\n @click=\"delThisInfo()\"\n v-show=\"disabled === false\"\n :disabled=\"deleteButtonD\"\n type=\"text\"\n icon=\"el-icon-delete-solid\"\n style=\"\n font-size: 20px;\n margin-top: 0px;\n padding-bottom: 1px;\n color: #f36464;\n \"\n ></el-button>\n </el-col>\n <el-col :span=\"24\" v-show=\"comdlistOption && comdlistOption.length > 0\">\n <div class=\"param-wrap\">\n <el-form\n :model=\"property\"\n v-if=\"comdlistOption && comdlistOption.length > 0\"\n ref=\"loginForm\"\n label-width=\"120px\"\n width=\"100%\"\n >\n <el-col\n :span=\"comdlistOption.length === 1 ? 24:12\"\n v-for=\"paramsItem in comdlistOption\"\n :key=\"paramsItem.funId\"\n >\n <el-form-item :label=\"paramsItem.funName + ''\" :prop=\"paramsItem.funKey\">\n <el-select\n :disabled=\"disabled\"\n style=\"width: 100%;\"\n v-model=\"property[paramsItem.funKey]\"\n v-if=\"paramsItem.funValidType === 'ENUM'\"\n clearable\n >\n <el-option\n v-for=\"(keys, valus) in strtoJson(paramsItem.funObj)\"\n :key=\"valus\"\n :label=\"keys\"\n :value=\"valus\"\n ></el-option>\n </el-select>\n <el-input-number\n style=\"width: 100%;\"\n :disabled=\"disabled\"\n v-model=\"property[paramsItem.funKey]\"\n v-else-if=\"paramsItem.funValidType === 'RANGE' && (paramsItem.funDataType === 'FLOAT' || paramsItem.funDataType === 'INT32')\"\n :max=\"paramsItem.funValMax || 0\"\n :min=\"paramsItem.funValMin || 0\"\n clearable\n ></el-input-number>\n\n <el-input-number\n style=\"width: 100%;\"\n clearable\n :disabled=\"disabled\"\n v-model=\"property[paramsItem.funKey]\"\n v-else-if=\"paramsItem.funValidType === 'NOT' && (paramsItem.funDataType === 'FLOAT' || paramsItem.funDataType === 'INT32')\"\n ></el-input-number>\n <el-input\n clearable\n style=\"width: 100%;\"\n :disabled=\"disabled\"\n v-else-if=\"paramsItem.funDataType === 'TEXT'\"\n v-model=\"property[paramsItem.funKey]\"\n />\n </el-form-item>\n </el-col>\n </el-form>\n </div>\n </el-col>\n </el-row>\n\n <el-dialog\n title=\"选择\"\n :visible.sync=\"selectTableShow\"\n width=\"75%\"\n top=\"10vh\"\n class=\"select-table-dialog\"\n :close-on-click-modal=\"false\"\n append-to-body\n >\n <select-table-wrap\n v-if=\"selectTableShow\"\n :tableOption=\"tableSelectOption.tableOpt\"\n :queryOption=\"tableSelectOption.queryOpt\"\n :tableList=\"tableSelectOption.tableList\"\n @parentGetList=\"childGetList($event)\"\n :otherOption=\"tableSelectOption.otherOption\"\n @returnEvent=\"returnEvent($event)\"\n />\n\n <div slot=\"footer\" class=\"dialog-footer\">\n <el-button size=\"mini\" type=\"primary\" @click=\"resuleClick\">确 定</el-button>\n <el-button size=\"mini\" @click=\"() =>{selectTableShow = false}\">取 消</el-button>\n </div>\n </el-dialog>\n </div>\n</template>\n<script>\nimport { listDevice } from \"@/api/iot/device\";\nimport SelectTableWrap from \"@/components/SelectTable/index\";\n\nimport axios from \"axios\";\nimport { getToken } from \"@/utils/auth\";\nimport { basePlatformUrl } from '@/config/env'\nimport { getDeviceFunList, getDeviceCmdList } from \"@/api/iot/device\";\n\n\nexport default {\n name: \"DeviceParamWrap\",\n components: {\n SelectTableWrap\n },\n props: [\"paramsDevcie\", \"tempIndex\", \"deleteButtonD\", \"disabled\"],\n data() {\n return {\n tableSelectOption: {},\n selectResult: {},\n selectTableShow: false,\n cmdListOption: [],\n comdlistOption: [],\n cmdId: \"\",\n property: {},\n farstInput: true,\n form: {\n deviceName: \"\",\n deviceId: \"\",\n prodId: \"\",\n guid: \"\",\n cmdKey: \"\",\n property: \"\"\n }\n };\n },\n watch: {\n property: {\n handler(val, oldVal) {\n if (this.property) {\n this.form.property = JSON.stringify(this.property);\n } else {\n this.form.property = \"\";\n }\n this.reultEventFu();\n },\n deep: true\n },\n form: {\n handler(val, oldVal) {\n this.reultEventFu();\n },\n deep: true\n }\n },\n created() {\n this.form = this.paramsDevcie;\n if (this.form.prodId) {\n this.farstInput = false;\n this.getCmdList();\n }\n },\n methods: {\n reultEventFu() {\n this.form.guid = this.tempIndex;\n this.$emit(\"resultEvent\", { result: this.form, index: this.tempIndex });\n },\n delThisInfo() {\n if (this.deleteButtonD === true) {\n this.msgError(\"至少需要一条设备数据!\");\n } else {\n this.form.guid = this.tempIndex;\n this.$emit(\"delInfo\", this.tempIndex);\n }\n },\n strtoJson(str) {\n return str ? JSON.parse(str.replace(/\\\\\\\"/g, '\"')) : {};\n },\n cmdChange(val) {\n for (var i = 0; i < this.cmdListOption.length; i++) {\n if (val === this.cmdListOption[i][\"cmdKey\"]) {\n this.cmdId = this.cmdListOption[i][\"cmdId\"];\n this.getcomdlistOption();\n break;\n }\n }\n },\n getcomdlistOption() {\n this.comdlistOption = [];\n const params = {\n deviceId: this.form.deviceId,\n cmdId: this.cmdId,\n cmdType: \"2\"\n }\n getDeviceFunList(params).then(res => {\n var result = {};\n this.comdlistOption = res.data;\n if (this.farstInput) {\n this.property = {};\n this.comdlistOption.forEach(v => {\n if (!result[v.funKey]) {\n result[v.funKey] = \"\";\n }\n });\n this.property = result;\n } else {\n this.property = JSON.parse(this.form.property);\n this.farstInput = true;\n }\n });\n },\n // 根据产品id获取分组信息 基础平台\n getCmdList() {\n const params = {\n deviceId: this.form.deviceId,\n cmdId: this.cmdId,\n cmdType: \"2\"\n }\n getDeviceCmdList(params).then(res => {\n this.cmdListOption = res.data;\n if (this.form.cmdKey) {\n this.cmdChange(this.form.cmdKey);\n }\n });\n },\n deviceFocus() {\n this.openTableSelectDialog();\n },\n // 打开设备选择窗口 ——表格\n openTableSelectDialog() {\n this.selectResult = {};\n this.tableSelectOption = {\n otherOption: {\n tableType: \"device\"\n },\n queryOpt: {\n disable: false,\n labelWidth: \"68px\",\n property: {\n deviceName: \"\",\n modelId: \"\",\n parentId: 0,\n deviceType: \"GATEWAY_CONTROLLER\"\n },\n page: {\n pageSize: 10,\n pageNum: 1,\n total: 0\n },\n inline: true,\n queryChilds: [\n // {\n // style: \"\",\n // placeholder: \"设备名称\",\n // clearable: true,\n // label: \"设备名称\",\n // type: \"input\",\n // key: \"deviceName\",\n // size: \"small\",\n // value: \"\"\n // }\n ]\n },\n tableOpt: {\n loading: false,\n rowKey: \"deviceId\",\n selection: false,\n maxHeight: \"45vh\",\n childs: [\n {\n style: \"\",\n label: \"所属型号\",\n type: \"\",\n prop: \"modelName\",\n align: \"left\",\n width: \"\",\n \"show-overflow-tooltip\": false,\n tempType: \"span\"\n },\n {\n style: \"\",\n label: \"设备名称\",\n type: \"\",\n prop: \"deviceName\",\n align: \"left\",\n width: \"\",\n \"show-overflow-tooltip\": false,\n tempType: \"span\"\n },\n {\n style: \"\",\n label: \"设备Key\",\n type: \"\",\n prop: \"deviceKey\",\n align: \"left\",\n width: \"\",\n \"show-overflow-tooltip\": false,\n tempType: \"span\"\n },\n {\n style: \"\",\n label: \"创建时间\",\n type: \"time\",\n prop: \"createTime\",\n align: \"center\",\n width: \"160\",\n \"show-overflow-tooltip\": false,\n tempType: \"span\"\n }\n ],\n tableList: {\n type: Array\n }\n },\n tableList: []\n };\n this.selectTableShow = true;\n },\n // 点击或者双击数据回调\n returnEvent(data) {\n if (data.type === \"dblclick\") {\n this.form.deviceName = data.value.deviceName;\n this.form.deviceId = data.value.deviceId;\n this.form.prodId = data.value.prodKey;\n this.form.deviceKey = data.value.deviceKey\n this.selectTableShow = false;\n this.form.cmdKey = \"\";\n this.property = {};\n this.comdlistOption = [];\n this.getCmdList();\n } else if (data.type === \"click\") {\n this.selectResult = {};\n this.selectResult.deviceId = data.value.deviceId;\n this.selectResult.deviceName = data.value.deviceName;\n this.selectResult.prodId = data.value.prodKey;\n this.selectResult.deviceKey = data.value.deviceKey\n }\n },\n // 点击确定按钮\n resuleClick() {\n this.form.deviceName = this.selectResult.deviceName;\n this.form.deviceId = this.selectResult.deviceId;\n this.form.prodId = this.selectResult.prodKey;\n this.form.deviceKey = this.selectResult.deviceKey\n this.selectTableShow = false;\n this.form.cmdKey = \"\";\n this.property = {};\n this.comdlistOption = [];\n this.getCmdList();\n },\n // 查询回调\n childGetList(data) {\n this.deviceChildList(data);\n },\n deviceChildList(data) {\n listDevice(Object.assign(data.page, data.param, { selected: 1 })).then(\n response => {\n this.tableSelectOption.tableList = response.rows;\n this.tableSelectOption.queryOpt.page.total = Number(response.total);\n }\n );\n }\n }\n};\n</script>\n<style lang=\"scss\">\n.autocontrol-job-params {\n padding: 10px 5px;\n background-color: #e4e3e3;\n margin-top: 5px;\n .param-wrap {\n height: 100%;\n width: 100%;\n max-height: 200px;\n overflow: auto;\n /* border: 1px solid red; */\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n padding: 10px;\n margin-top: 10px;\n background: #99e4f59e;\n box-shadow: 0px 0px 4px #6a6c6d9e;\n }\n}\n</style>\n"]}]}