1 line
11 KiB
JSON
1 line
11 KiB
JSON
{"remainingRequest":"G:\\project\\smart-power-ui\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!G:\\project\\smart-power-ui\\src\\components\\SelectTable\\indexbox.vue?vue&type=style&index=0&lang=scss&","dependencies":[{"path":"G:\\project\\smart-power-ui\\src\\components\\SelectTable\\indexbox.vue","mtime":1617955420673},{"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:CgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCi5zZWxlY3QtdGFibGUgewogIC5lbC10YWJsZS0tc3RyaXBlZCAuZWwtdGFibGVfX2JvZHkgdHIuZWwtdGFibGVfX3Jvdy0tc3RyaXBlZC5jdXJyZW50LXJvdyB0ZCwKICAuZWwtdGFibGVfX2JvZHkgdHIuY3VycmVudC1yb3cgPiB0ZCB7CiAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjZmZlYzhiOwogIH0KfQo="},{"version":3,"sources":["indexbox.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuSA;AACA;AACA;AACA;AACA;AACA","file":"indexbox.vue","sourceRoot":"src/components/SelectTable","sourcesContent":["<template>\n <div>\n <el-row :gutter=\"20\">\n <!--用户数据-->\n <el-col v-if=\"queryOption.disable === false\" :span=\"20\" :xs=\"24\">\n <el-form\n :model=\"params\"\n ref=\"queryForm\"\n :inline=\"queryOption.inline\"\n :label-width=\"queryOption.labelWidth ? queryOption.labelWidth : '100px'\"\n >\n <el-form-item v-for=\"item in queryOption.queryChilds\" :key=\"item.key\" :label=\"item.label\">\n <el-input\n v-if=\"!item.type || item.type === 'input'\"\n v-model=\"params[item.key]\"\n :placeholder=\"item.placeholder || ''\"\n :clearable=\"item.clearable\"\n :size=\"item.size || 'small'\"\n :style=\"item.style || ''\"\n @keyup.enter.native=\"handleQuery\"\n />\n\n <el-select\n v-if=\"item.type === 'select'\"\n v-model=\"params[item.key]\"\n :clearable=\"item.clearable\"\n :placeholder=\"item.placeholder\"\n :size=\"item.size || 'small'\"\n :style=\"item.style || ''\"\n >\n <el-option\n v-for=\"items in item.options\"\n :key=\"items[item.optionKey.key]\"\n :label=\"items[item.optionKey.label]\"\n :value=\"items[item.optionKey.value]\"\n ></el-option>\n </el-select>\n </el-form-item>\n\n <el-form-item>\n <el-button type=\"primary\" icon=\"el-icon-search\" size=\"mini\" @click=\"handleQuery\">搜索</el-button>\n <!-- <el-button icon=\"el-icon-refresh\" size=\"mini\" @click=\"resetQuery\">重置</el-button> -->\n </el-form-item>\n </el-form>\n </el-col>\n\n <el-table\n ref=\"selectTabel\"\n v-loading=\"tableOption.loading\"\n :data=\"dataList\"\n class=\"select-table\"\n :height=\"tableOption.maxHeight\"\n :highlight-pageNum-row=\"true\"\n default-expand-all\n highlight-current-row\n :tree-props=\"tableOption.treeProps\"\n :row-key=\"tableOption.rowKey\"\n @row-click=\"row_clicks\"\n @row-dblclick=\"rowDblclick\"\n @selection-change=\"handleSelectionChange\"\n >\n <el-table-column type=\"index\" label=\"序号\" align=\"center\" :index=\"indexFormatter\" width=\"80px\"></el-table-column>\n\n <el-table-column\n v-if=\"tableOption.selection === true\"\n type=\"selection\"\n width=\"50\"\n align=\"center\"\n />\n\n <el-table-column\n v-for=\"(item, index) in tableOption.childs\"\n :key=\"index\"\n :type=\"item.type\"\n :width=\"item.width\"\n :align=\"item.align\"\n :label=\"item.label\"\n :prop=\"item.prop\"\n >\n <template slot-scope=\"scope\" v-if=\"item.tempType !== '' \">\n <el-switch\n v-if=\"item.tempType === 'switch'\"\n v-model=\"scope.row[item.prop]\"\n :active-value=\"item.option['active-value']\"\n :inactive-value=\"item.option['inactive-value']\"\n :disable=\"item.option.disable\"\n ></el-switch>\n\n <span v-else-if=\"item.tempType === 'span'\">{{scope.row[item.prop]}}</span>\n\n <svg-icon v-else-if=\"item.tempType === 'icon'\" :icon-class=\"scope.row[item.prop]\" />\n\n <span\n v-else-if=\"item.tempType === 'time'\"\n >{{ parseTime(new Date(scope.row[item.prop])) }}</span>\n\n <span\n v-else-if=\"item.tempType === 'text1'\"\n v-html=\"scope.row[item.prop] === '0' ? '正常':'禁用'\"\n ></span>\n\n </template>\n\n </el-table-column>\n </el-table>\n\n <pagination\n v-show=\"queryOption.page.total > 0\"\n :total=\"queryOption.page.total\"\n :page.sync=\"queryOption.page.pageNum\"\n :limit.sync=\"queryOption.page.pageSize\"\n @pagination=\"handleQuery2\"\n />\n </el-row>\n </div>\n</template>\n<script>\nexport default {\n name: \"nl_select_table\",\n props: {\n otherOption: {\n type: Object,\n default: {}\n },\n queryOption: {\n type: Object,\n default: () => {\n return {\n disable: false,\n params: {},\n page: {\n pageSize: 10,\n pageNum: 1,\n total: 100\n },\n inline: true,\n queryChilds: [\n {\n style: \"\",\n placeholder: \"请输入用户名称\",\n clearable: true,\n label: \"用户名称\",\n type: \"input\",\n key: \"userName\",\n size: \"small\",\n value: \"\"\n }\n ]\n };\n }\n },\n tableOption: {\n type: Object,\n default: () => {\n return {\n loading: false,\n treeProps: \"{ children: 'children', hasChildren: 'hasChildren'}\",\n rowKey: \"deptId\",\n selection: true,\n maxHeight: \"45vh\",\n childs: [\n {\n style: \"\",\n label: \"\",\n type: \"selection\",\n prop: \"userName\",\n align: \"center\",\n width: \"50\",\n \"show-overflow-tooltip\": false,\n tempType: \"\"\n },\n {\n style: \"\",\n label: \"用户编号\",\n type: \"\",\n prop: \"userName\",\n align: \"center\",\n width: \"50\",\n \"show-overflow-tooltip\": true,\n tempType: \"\",\n option: {\n \"active-value\": \"0\",\n \"inactive-value\": \"1\",\n disable: false\n }\n }\n ],\n tableList: {\n type: Array\n }\n };\n }\n },\n tableList: {\n type: Array\n },\n option: {\n type: Object,\n default: () => {\n return {};\n }\n }\n },\n data() {\n return {\n loading: false,\n dataList: [],\n single: \"\",\n multiple: \"\",\n params: {},\n multipleSelection: [],\n optionTrue: true\n };\n },\n updated() {\n if (this.optionTrue && this.tableList.length <= 0) {\n this.handleQuery2();\n }\n },\n methods: {\n indexFormatter(val) {\n return val + 1 + ((this.queryOption.page.pageNum - 1) * this.queryOption.page.pageSize);\n },\n // 多选框选中数据\n handleSelectionChange(selection) {\n this.$emit(\"returnEvent\", {\n value: selection,\n type: \"select\",\n otherOption: this.otherOption\n });\n },\n /** 搜索按钮操作 */\n handleQuery() {\n // debugger\n // this.queryOption.page.pageNum = 1;\n // this.queryOption.params = this.params\n this.optionTrue = false\n this.getList(this.queryOption.page, this.queryOption.params);\n },\n handleQuery2() {\n this.getList(this.queryOption.page, this.queryOption.params);\n },\n /** 重置按钮操作 */\n resetQuery() {\n this.dataList = [];\n this.resetForm(\"queryForm\");\n this.queryOption.page.pageNum = 1;\n this.handleQuery();\n },\n getList(page, params) {\n this.tableOption.loading = true;\n this.$emit(\"parentGetList\", {\n page: page,\n param: params,\n otherOption: this.otherOption\n });\n },\n rowDblclick(row) {\n if (this.tableOption.selection) {\n return\n }\n this.$emit(\"returnEvent\", {\n value: row,\n type: \"dblclick\",\n otherOption: this.otherOption\n });\n },\n row_clicks(row) {\n if (this.tableOption.selection) {\n this.$refs.selectTabel.toggleRowSelection(row)\n } else {\n this.$emit(\"returnEvent\", {\n value: row,\n type: \"click\",\n otherOption: this.otherOption\n });\n }\n }\n },\n created() {\n this.params = this.queryOption.params;\n this.handleQuery2();\n },\n watch: {\n tableList(value) {\n this.dataList = value;\n this.tableOption.loading = false;\n },\n multipleSelection(val) {\n console.log(val)\n }\n }\n};\n</script>\n<style lang=\"scss\">\n.select-table {\n .el-table--striped .el-table__body tr.el-table__row--striped.current-row td,\n .el-table__body tr.current-row > td {\n background-color: #ffec8b;\n }\n}\n</style>\n"]}]} |