{"remainingRequest":"C:\\Users\\100zone\\Desktop\\baizong\\community\\SmartCommunity\\videoSurveillance\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\100zone\\Desktop\\baizong\\community\\SmartCommunity\\videoSurveillance\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!C:\\Users\\100zone\\Desktop\\baizong\\community\\SmartCommunity\\videoSurveillance\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!C:\\Users\\100zone\\Desktop\\baizong\\community\\SmartCommunity\\videoSurveillance\\node_modules\\style-vw-loader\\index.js??ref--0-2!C:\\Users\\100zone\\Desktop\\baizong\\community\\SmartCommunity\\videoSurveillance\\src\\components\\common\\table.vue?vue&type=script&lang=js&","dependencies":[{"path":"C:\\Users\\100zone\\Desktop\\baizong\\community\\SmartCommunity\\videoSurveillance\\src\\components\\common\\table.vue","mtime":1663828782926},{"path":"C:\\Users\\100zone\\Desktop\\baizong\\community\\SmartCommunity\\videoSurveillance\\babel.config.js","mtime":1663828782900},{"path":"C:\\Users\\100zone\\Desktop\\baizong\\community\\SmartCommunity\\videoSurveillance\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\100zone\\Desktop\\baizong\\community\\SmartCommunity\\videoSurveillance\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"C:\\Users\\100zone\\Desktop\\baizong\\community\\SmartCommunity\\videoSurveillance\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\100zone\\Desktop\\baizong\\community\\SmartCommunity\\videoSurveillance\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000},{"path":"C:\\Users\\100zone\\Desktop\\baizong\\community\\SmartCommunity\\videoSurveillance\\node_modules\\style-vw-loader\\index.js","mtime":1540864632000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.number.constructor\";\nimport \"core-js/modules/es6.array.find-index\";\nimport \"core-js/modules/es6.regexp.replace\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nexport default {\n name: 'zz-table',\n props: {\n /*\r\n table例设置\r\n [{\r\n label: 例名. 必须. String\r\n prop: 数据字段. 必须. String\r\n fixed: 当前例是否固定. 值有left,right。 String\r\n width: 例宽. Number\r\n slot: 插槽方式, String\r\n format: 数据过滤方法, Function\r\n click: 当前内容的点击事件, Function\r\n }]\r\n */\n cols: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n\n /*\r\n table数据\r\n */\n data: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n\n /*\r\n table表格设置\r\n */\n settings: {\n type: Object,\n default: function _default() {\n return {\n // 是否显示表头\n showHeader: true,\n // 是否显示序号\n showIndex: false,\n // 是否显示序列号大写\n showNUmber: false,\n // 序列号宽度\n showNumberWidth: '70',\n // 是否显示多选框\n showCheckbox: false,\n hideAllCheckbox: false,\n // 是否显示单选框\n showRadio: false,\n // 需要统计列的prop集合,从0开始\n summaryCol: [],\n // 是否显示边框\n tableBorder: false\n };\n }\n },\n\n /*\r\n 分页设置\r\n */\n pageset: {\n type: Object,\n default: function _default() {\n return {\n total: 0,\n pageSize: 10,\n pageNum: 1,\n pageSizes: [15, 30, 60, 120]\n };\n }\n },\n loading: {\n type: Boolean,\n default: function _default() {\n return false;\n }\n },\n height: 0,\n updateFlag: false,\n //触发表格重绘\n // 统计数据.传入统计数据则显示该统计数据,否则显示现有列表数据\n summaryData: {},\n // 判断多选框是否可以勾选\n selectable: {\n type: Function,\n default: function _default() {\n return function (row, index) {\n return true;\n };\n }\n },\n expands: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n treeProps: {\n type: Object,\n default: function _default() {\n return {};\n }\n },\n load: {\n type: Function,\n default: function _default() {\n return function () {};\n }\n },\n emptyText: {\n type: String,\n default: function _default() {\n return '暂无相关结果';\n }\n }\n },\n data: function data() {\n return {\n isIE: false,\n radioSelect: '',\n boxHeight: null,\n currentPage: 1,\n isSelectAll: false,\n isScroll: false,\n hideornot: true\n };\n },\n methods: {\n checkHide: function checkHide() {\n if (this.settings.showCheckbox && this.hideornot) {\n return true;\n } else {\n return false;\n }\n },\n hideordisplay: function hideordisplay() {\n this.hideornot = !this.hideornot;\n },\n setRadioIndex: function setRadioIndex(index) {\n this.radioSelect = index;\n },\n sortChange: function sortChange(column, prop, order) {\n //点击排序按钮后拿到column.order,可以发送column.order给后台,后台再根据什么排序来返回排序过后的数据\n // console.log(column + '---' + column.prop + '---' + column.order)\n var data = JSON.parse(JSON.stringify(column));\n data.prop = data.prop && data.prop.replace(/([A-Z])/g, '_$1').toLowerCase() || null;\n\n if (this.settings.defaultSort && this.settings.defaultSort.propExtend) {\n data.prop = \"\".concat(data.prop).concat(this.settings.defaultSort.propExtend);\n }\n\n data.order = data.order == 'ascending' ? 'ASC' : column.order == 'descending' ? 'DESC' : null;\n this.$emit('sort-change', data);\n },\n toggleRow: function toggleRow(row, expandedRows) {\n // this.expands = [];\n var index = _.findIndex(expandedRows, function (v) {\n return v.id == row.id;\n });\n\n if (index != -1) {\n this.expands.push(row.id);\n this.$emit('toggle-change', row);\n } else {\n this.expands = _.filter(this.expands, function (v) {\n return v != row.id;\n });\n }\n },\n // 多选派发事件selection-change\n selectionChange: function selectionChange(val) {\n this.isSelectAll = val.length == this.data.length;\n this.$emit('selection-change', val);\n },\n\n /*\r\n 页数改变时,派发pageChange事件,并传递当前分页参数;\r\n 其中pageSize为每页显示多少条数据,page为当前显示多少页\r\n */\n sizeChange: function sizeChange(pageSize) {\n this.$emit('page-change', {\n pageSize: pageSize\n });\n },\n currentChange: function currentChange(page) {\n this.currentPage = page;\n this.$emit('page-change', {\n page: page\n });\n },\n // 合计\n getSummaries: function getSummaries(params) {\n var _this = this;\n\n var data = params.data;\n\n if ('{}' != JSON.stringify(this.summaryData)) {\n data = [this.summaryData];\n }\n\n var sums = [];\n sums[0] = '合计';\n var cols = JSON.parse(JSON.stringify(this.settings.summaryCol));\n var i = cols.length;\n\n var _loop = function _loop() {\n // 计算当前列的prop字段\n var index = cols[i];\n\n if (_this.settings.showIndex) {\n index -= 1;\n }\n\n if (_this.settings.showCheckbox) {\n index -= 1;\n }\n\n if (_this.settings.showRadio) {\n index -= 1;\n }\n\n var prop = _this.cols[index].prop;\n var values = data.map(function (item) {\n return Number(item[prop]);\n });\n\n if (!values.every(function (value) {\n return isNaN(value);\n })) {\n sums[cols[i]] = values.reduce(function (prev, curr) {\n var value = Number(curr);\n\n if (!isNaN(value)) {\n var sumVa = Number(prev) + curr;\n return sumVa.toFixed(2);\n } else {\n return Number(prev.toFixed(2));\n }\n }, 0);\n sums[cols[i]];\n }\n };\n\n while (i--) {\n _loop();\n }\n\n return sums;\n },\n checkAllChange: function checkAllChange(val) {\n if (val) {\n this.$refs.table.toggleAllSelection();\n } else {\n this.$refs.table.clearSelection();\n }\n },\n //自定义表头斑马线\n setRowClassName: function setRowClassName(_ref) {\n var row = _ref.row,\n rowIndex = _ref.rowIndex;\n var index = rowIndex;\n\n if (index % 2 == 0) {\n return 'warning-row';\n }\n }\n },\n watch: {\n radioSelect: function radioSelect(n) {\n this.$emit('radio-change', this.data[n]);\n },\n pageset: {\n deep: true,\n handler: function handler(n) {\n this.currentPage = n.pageNum;\n }\n }\n },\n components: {\n slotItem: {\n props: ['slots', 'row', 'index'],\n render: function render(h) {\n var vnode = this.slots({\n row: this.row,\n index: this.index\n });\n return h('div', vnode);\n }\n }\n },\n created: function created() {\n var userAgent = window.navigator.userAgent;\n var isIE = userAgent.indexOf('compatible') > -1 && userAgent.indexOf('MSIE') > -1; //判断是否IE<11浏览器\n\n var isEdge = userAgent.indexOf('Edge') > -1 && !isIE; //判断是否IE的Edge浏览器\n\n var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf('rv:11.0') > -1;\n this.isIE = isIE11 || isEdge || isIE;\n }\n};",{"version":3,"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0KA;AACAA,kBADA;AAEAC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AAEAC;AACAC,iBADA;AAEAC,aAFA,sBAEA;AACA;AACA;AAJA,KAdA;;AAoBA;AACA;AACA;AACAC;AACAF,iBADA;AAEAC,aAFA,sBAEA;AACA;AACA;AAJA,KAvBA;;AA6BA;AACA;AACA;AACAE;AACAH,kBADA;AAEAC,aAFA,sBAEA;AACA;AACA;AACAG,0BAFA;AAGA;AACAC,0BAJA;AAKA;AACAC,2BANA;AAOA;AACAC,+BARA;AASA;AACAC,6BAVA;AAWAC,gCAXA;AAYA;AACAC,0BAbA;AAcA;AACAC,wBAfA;AAgBA;AACAC;AAjBA;AAmBA;AAtBA,KAhCA;;AAwDA;AACA;AACA;AACAC;AACAb,kBADA;AAEAC,aAFA,sBAEA;AACA;AACAa,kBADA;AAEAC,sBAFA;AAGAC,oBAHA;A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AkC,iBAjDA,yBAiDAC,IAjDA,EAiDA;AACA;AACA;AACAA;AADA;AAGA,KAtDA;AAuDA;AACAC,gBAxDA,wBAwDAC,MAxDA,EAwDA;AAAA;;AACA;;AACA;AACAlD;AACA;;AACA;AACAmD;AACA;AACA;;AARA;AAUA;AACA;;AACA;AACAf;AACA;;AACA;AACAA;AACA;;AACA;AACAA;AACA;;AACA;AACA;AAAA;AAAA;;AACA;AAAA;AAAA;AACAe;AACA;;AACA;AACA;AACA;AACA,aAHA,MAGA;AACA;AACA;AACA,WARA,EAQA,CARA;AASAA;AACA;AAlCA;;AASA;AAAA;AA0BA;;AAEA;AACA,KA9FA;AA+FAC,kBA/FA,0BA+FAP,GA/FA,EA+FA;AACA;AACA;AACA,OAFA,MAEA;AACA;AACA;AACA,KArGA;AAsGA;AACAQ,mBAvGA,iCAuGA;AAAA;AAAA;AACA;;AACA;AACA;AACA;AACA;AA5GA,GA/HA;AA6OAC;AACA5B,eADA,uBACA6B,CADA,EACA;AACA;AACA,KAHA;AAIA5C;AACA6C,gBADA;AAEAC,aAFA,mBAEAF,CAFA,EAEA;AACA;AACA;AAJA;AAJA,GA7OA;AAwPAG;AACAC;AACA/D,sCADA;AAEAgE,YAFA,kBAEAC,CAFA,EAEA;AACA;AACAnB,uBADA;AAEAN;AAFA;AAIA;AACA;AARA;AADA,GAxPA;AAoQA0B,SApQA,qBAoQA;AACA;AACA,sFAFA,CAEA;;AACA,yDAHA,CAGA;;AACA;AACA;AACA;AA1QA","names":["name","props","cols","type","default","data","settings","showHeader","showIndex","showNUmber","showNumberWidth","showCheckbox","hideAllCheckbox","showRadio","summaryCol","tableBorder","pageset","total","pageSize","pageNum","pageSizes","loading","height","updateFlag","summaryData","selectable","expands","treeProps","load","emptyText","isIE","radioSelect","boxHeight","currentPage","isSelectAll","isScroll","hideornot","methods","checkHide","hideordisplay","setRadioIndex","index","sortChange","column","prop","order","toggleRow","row","expandedRows","selectionChange","val","sizeChange","currentChange","page","getSummaries","params","sums","checkAllChange","setRowClassName","watch","n","deep","handler","components","slotItem","render","h","created"],"sourceRoot":"src/components/common","sources":["table.vue"],"sourcesContent":["\r\n\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {{ item.label }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n\r\n\r\n\r\n"]}]}