smart-power-ui/node_modules/.cache/vue-loader/2996bdb0bd88d7060811f2e66fb...

1 line
14 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\\project\\profile\\space.vue?vue&type=style&index=0&lang=scss&","dependencies":[{"path":"G:\\project\\smart-power-ui\\src\\views\\iot\\project\\profile\\space.vue","mtime":1617244633484},{"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:CgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCi5pb3QtZGV0YWlsLXNwYWNlIHsKICAuZWxkaWFsb2ctd3JhcCB7CiAgICAuZWwtZGlhbG9nX19oZWFkZXIgewogICAgICBib3JkZXItYm90dG9tOiAxcHggc29saWQgIzc0NzM3MzsKICAgIH0KICAgIC5lbC1kaWFsb2dfX2JvZHkgewogICAgICBwYWRkaW5nOiAwcHg7CiAgICAgIGhlaWdodDogY2FsYygxMDB2aCAtIDIwMHB4KTsKICAgICAgb3ZlcmZsb3c6IGF1dG87CiAgICB9CiAgICAuZWwtZm9ybSB7CiAgICAgIHBhZGRpbmc6IDIwcHg7CiAgICAgIHBhZGRpbmctcmlnaHQ6IDQwcHg7CiAgICB9CiAgICAuZWwtZGlhbG9nX19mb290ZXIgewogICAgICBoZWlnaHQ6IDYwcHg7CiAgICAgIGJvcmRlci10b3A6IDFweCBzb2xpZCAjNzQ3MzczOwogICAgICB0ZXh0LWFsaWduOiByaWdodDsKICAgICAgd2lkdGg6IDEwMCU7CiAgICAgIHBhZGRpbmc6IDBweDsKICAgICAgcGFkZGluZy10b3A6IDE1cHg7CiAgICAgIC5lbC1idXR0b24gKyAuZWwtYnV0dG9uIHsKICAgICAgICBtYXJnaW4tcmlnaHQ6IDEwcHg7CiAgICAgIH0KICAgICAgLmVsLWJ1dHRvbiB7CiAgICAgICAgcGFkZGluZy10b3A6IDhweDsKICAgICAgfQogICAgfQogIH0KfQo="},{"version":3,"sources":["space.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoVA;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":"space.vue","sourceRoot":"src/views/iot/project/profile","sourcesContent":["<template>\n <div class=\"app-container iot-detail-space\">\n <el-form\n :model=\"queryParams\"\n ref=\"queryForm\"\n :inline=\"true\"\n v-show=\"showSearch\"\n label-width=\"68px\"\n >\n <el-form-item label=\"上级空间\" prop=\"parentId\">\n <treeselect\n style=\"width: 200px;\"\n v-model=\"queryParams.parentId\"\n :options=\"querySpaceOptions\"\n :normalizer=\"normalizer\"\n placeholder=\"请选择上级空间\"\n />\n </el-form-item>\n <el-form-item label=\"空间名称\" prop=\"spaceName\">\n <el-input\n v-model=\"queryParams.spaceName\"\n placeholder=\"空间名称\"\n clearable\n @keyup.enter.native=\"handleQuery\"\n />\n </el-form-item>\n <el-form-item label=\"空间类型\" prop=\"spaceType\">\n <el-select v-model=\"queryParams.spaceType\" placeholder=\"空间类型\" clearable>\n <el-option\n v-for=\"dict in spaceTypeOptions\"\n :key=\"dict.dictValue\"\n :label=\"dict.dictLabel\"\n :value=\"dict.dictValue\"\n ></el-option>\n </el-select>\n </el-form-item>\n <el-form-item>\n <el-button type=\"primary\" icon=\"el-icon-search\" @click=\"handleQuery\">搜索</el-button>\n <el-button icon=\"el-icon-refresh\" @click=\"resetQuery\">重置</el-button>\n </el-form-item>\n </el-form>\n\n <el-row :gutter=\"10\" class=\"mb8\">\n <el-col :span=\"1.5\">\n <el-button type=\"primary\" plain icon=\"el-icon-plus\" size=\"mini\" @click=\"handleAdd\">新增</el-button>\n </el-col>\n <right-toolbar :showSearch.sync=\"showSearch\" @queryTable=\"getList\"></right-toolbar>\n </el-row>\n\n <el-table\n v-loading=\"loading\"\n :data=\"spaceList\"\n row-key=\"spaceId\"\n default-expand-all\n :tree-props=\"{ children: 'children', hasChildren: 'hasChildren' }\"\n >\n <el-table-column type=\"index\" label=\"序号\" align=\"center\" :index=\"indexFormatter\" width=\"80px\"></el-table-column>\n <el-table-column label=\"空间名称\" align=\"left\" prop=\"spaceName\" />\n <!-- <el-table-column label=\"空间ID\" align=\"left\" prop=\"spaceId\" />\n <el-table-column label=\"空间编码\" align=\"left\" prop=\"spaceCode\" />-->\n <el-table-column label=\"空间类型\" align=\"center\" prop=\"spaceType\" :formatter=\"statusFormat\" />\n <el-table-column label=\"操作\" align=\"center\" width=\"200\" class-name=\"small-padding fixed-width\">\n <template slot-scope=\"scope\">\n <el-button\n size=\"mini\"\n type=\"text\"\n icon=\"el-icon-search\"\n @click=\"handleDetails(scope.row)\"\n >空间设备</el-button>\n <el-button size=\"mini\" type=\"text\" icon=\"el-icon-edit\" @click=\"handleUpdate(scope.row)\">修改</el-button>\n <el-button\n size=\"mini\"\n type=\"text\"\n icon=\"el-icon-delete\"\n @click=\"handleDelete(scope.row)\"\n >删除</el-button>\n </template>\n </el-table-column>\n </el-table>\n\n <!-- 添加或修改项目空间对话框 -->\n <el-dialog class=\"eldialog-wrap\" :close-on-click-modal=\"false\" :title=\"title\" :visible.sync=\"open\" width=\"500px\">\n <el-form ref=\"form\" :model=\"form\" :rules=\"rules\" label-width=\"100px\">\n <el-form-item label=\"上级空间:\" prop=\"parentId\">\n <treeselect v-model=\"form.parentId\" :options=\"spaceOptions\" placeholder=\"请选择上级空间\" />\n </el-form-item>\n <el-form-item label=\"空间名称:\" prop=\"spaceName\">\n <el-input v-model=\"form.spaceName\" placeholder=\"请输入空间名称\" />\n </el-form-item>\n <el-form-item label=\"类型:\" prop=\"spaceType\">\n <el-select v-model=\"form.spaceType\" style=\"width: 100%;\" placeholder=\"请选择空间类型\">\n <el-option\n v-for=\"dict in spaceTypeOptions\"\n :key=\"dict.dictValue\"\n :label=\"dict.dictLabel\"\n :value=\"dict.dictValue\"\n ></el-option>\n </el-select>\n </el-form-item>\n </el-form>\n <div slot=\"footer\" class=\"dialog-footer\">\n <el-button size=\"mini\" type=\"primary\" @click=\"submitForm\">确 定</el-button>\n <el-button size=\"mini\" @click=\"cancel\">取 消</el-button>\n </div>\n </el-dialog>\n\n <el-dialog\n class=\"eldialog-wrap\"\n :title=\"spaceDeviceTitle\"\n :visible.sync=\"selectTableShow\"\n width=\"75%\"\n top=\"10vh\"\n :close-on-click-modal=\"false\"\n >\n <space-device-wrap\n v-if=\"selectTableShow\"\n :sourceId=\"sourceId\"\n :projectId=\"infoData.projectId\"\n ></space-device-wrap>\n\n <div slot=\"footer\" class=\"dialog-footer\">\n <el-button size=\"mini\" type=\"primary\" @click=\"() =>{selectTableShow = false}\">确 定</el-button>\n <el-button size=\"mini\" @click=\"() =>{selectTableShow = false}\">取 消</el-button>\n </div>\n </el-dialog>\n </div>\n</template>\n\n<script>\nimport {\n listSpace,\n getSpace,\n delSpace,\n addSpace,\n updateSpace,\n exportSpace,\n listSpaceDevice,\n listSpaceTree\n} from \"@/api/iot/space\";\nimport SpaceDeviceWrap from \"./spaceDevice\";\nimport Treeselect from \"@riophae/vue-treeselect\";\nimport \"@riophae/vue-treeselect/dist/vue-treeselect.css\";\n\nexport default {\n name: \"Space\",\n components: {\n Treeselect,\n SpaceDeviceWrap\n },\n props: [\"infoData\"],\n data() {\n return {\n selectTableShow: false,\n // 遮罩层\n loading: true,\n // 显示搜索条件\n showSearch: true,\n // 项目空间表格数据\n spaceList: [],\n // 项目空间树选项\n spaceOptions: [],\n // 弹出层标题\n title: \"\",\n // 是否显示弹出层\n open: false,\n // 查询参数\n queryParams: {\n parentId: null,\n projectId: null,\n spaceName: null,\n spaceCode: null,\n spaceType: null\n },\n // 表单参数\n form: {},\n // 表单校验\n rules: {},\n spaceTypeOptions: [],\n querySpaceOptions: [],\n sourceId: \"\",\n spaceDeviceTitle: \"\"\n };\n },\n created() {\n this.getDicts(\"space_type\").then(response => {\n this.spaceTypeOptions = response.data;\n });\n this.getQueryTreeselect();\n this.getList();\n },\n methods: {\n indexFormatter(val) {\n return val + 1;\n },\n // 打开厂商选择窗口 ——表格\n handleDetails(row) {\n this.sourceId = row.spaceId;\n this.spaceDeviceTitle = `[ ${row.spaceName} ] 空间--设备管理`;\n this.selectTableShow = true;\n },\n // 菜单状态字典翻译\n statusFormat(row, column) {\n return this.selectDictLabel(this.spaceTypeOptions, row.spaceType);\n },\n /** 查询项目空间列表 */\n getList() {\n this.loading = true;\n this.queryParams.projectId = this.infoData.projectId;\n listSpace(this.queryParams).then(response => {\n this.spaceList = this.handleTree(response.data, \"spaceId\", \"parentId\");\n this.loading = false;\n });\n },\n /** 转换项目空间数据结构 */\n normalizer(node) {\n if (node.children && !node.children.length) {\n delete node.children;\n }\n return {\n id: node.spaceId,\n label: node.spaceName,\n children: node.children\n };\n },\n /** 查询部门下拉树结构 */\n getTreeselect(param) {\n listSpaceTree(param).then(response => {\n this.spaceOptions = [];\n const data = { id: 0, label: \"顶级节点\", children: [] };\n // data.children = this.handleTree(response.data, \"spaceId\", \"parentId\");\n data.children = response.data;\n this.spaceOptions.push(data);\n });\n },\n /** 查询部门下拉树结构 */\n getQueryTreeselect() {\n let param = {\n projectId: this.infoData.projectId\n };\n listSpace(param).then(response => {\n this.querySpaceOptions = [];\n const data = { spaceId: 0, spaceName: \"顶级节点\", children: [] };\n data.children = this.handleTree(response.data, \"spaceId\", \"parentId\");\n this.querySpaceOptions.push(data);\n });\n },\n // 取消按钮\n cancel() {\n this.open = false;\n this.reset();\n },\n // 表单重置\n reset() {\n this.form = {\n parentId: null,\n projectId: this.infoData.projectId,\n spaceName: null,\n spaceType: null\n };\n this.resetForm(\"form\");\n },\n /** 搜索按钮操作 */\n handleQuery() {\n this.getList();\n },\n /** 重置按钮操作 */\n resetQuery() {\n this.resetForm(\"queryForm\");\n this.handleQuery();\n },\n /** 新增按钮操作 */\n handleAdd() {\n this.reset();\n let param = {\n projectId: this.infoData.projectId\n };\n this.getTreeselect(param);\n this.open = true;\n this.title = \"添加项目空间\";\n },\n /** 修改按钮操作 */\n handleUpdate(row) {\n this.reset();\n let param = {\n projectId: this.infoData.projectId,\n spaceId: row.spaceId\n };\n this.getTreeselect(param);\n if (row != null) {\n this.form.parentId = row.spaceId;\n }\n getSpace(row.spaceId).then(response => {\n this.form = response.data;\n this.open = true;\n this.title = \"修改项目空间\";\n });\n },\n /** 提交按钮 */\n submitForm() {\n this.$refs[\"form\"].validate(valid => {\n if (valid) {\n if (this.form.spaceId != null) {\n updateSpace(this.form).then(response => {\n this.msgSuccess(\"修改成功\");\n this.open = false;\n this.getList();\n });\n } else {\n addSpace(this.form).then(response => {\n this.msgSuccess(\"新增成功\");\n this.open = false;\n this.getList();\n });\n }\n }\n });\n },\n /** 删除按钮操作 */\n handleDelete(row) {\n this.$confirm(\n '是否确认删除项目空间编号为\"' + row.spaceId + '\"的数据项?',\n \"警告\",\n {\n confirmButtonText: \"确定\",\n cancelButtonText: \"取消\",\n type: \"warning\"\n }\n )\n .then(function() {\n return delSpace(row.spaceId);\n })\n .then(() => {\n this.getList();\n this.msgSuccess(\"删除成功\");\n });\n }\n }\n};\n</script>\n<style lang=\"scss\">\n.iot-detail-space {\n .eldialog-wrap {\n .el-dialog__header {\n border-bottom: 1px solid #747373;\n }\n .el-dialog__body {\n padding: 0px;\n height: calc(100vh - 200px);\n overflow: auto;\n }\n .el-form {\n padding: 20px;\n padding-right: 40px;\n }\n .el-dialog__footer {\n height: 60px;\n border-top: 1px solid #747373;\n text-align: right;\n width: 100%;\n padding: 0px;\n padding-top: 15px;\n .el-button + .el-button {\n margin-right: 10px;\n }\n .el-button {\n padding-top: 8px;\n }\n }\n }\n}\n</style>\n"]}]}