{"remainingRequest":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\cssc-fvue\\src\\components\\querySql\\DynamicView.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\cssc-fvue\\src\\components\\querySql\\DynamicView.vue","mtime":1667804639477},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es7.symbol.async-iterator\";\nimport \"core-js/modules/es6.symbol\";\nimport \"core-js/modules/es6.string.iterator\";\nimport \"core-js/modules/es6.array.from\";\nimport \"core-js/modules/es6.regexp.to-string\";\nimport _toConsumableArray from \"D:/jenkins/workspace/cssc-fvue/node_modules/@babel/runtime/helpers/esm/toConsumableArray\";\nimport \"core-js/modules/es6.number.constructor\";\nimport \"core-js/modules/es6.regexp.replace\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/es6.regexp.split\";\nimport \"core-js/modules/es7.array.includes\";\nimport \"core-js/modules/es6.string.includes\";\nimport \"core-js/modules/es6.regexp.search\";\nimport \"core-js/modules/web.dom.iterable\";\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n//\n//\n//\n//\nimport { mapState, mapActions } from \"vuex\";\nimport { Message } from \"element-ui\";\nimport { Loading } from \"element-ui\";\nimport HtCheckbox from \"@/components/control/HtCheckbox.vue\";\nimport HtDialog from \"@/components/control/HtDialog.vue\";\nimport HtDialogBtn from \"@/components/control/htDialogBtn.vue\";\nimport utils from \"@/utils.js\";\nimport req from \"@/request.js\";\nimport { Base64 } from \"js-base64\";\nimport Vue from \"vue\";\nexport default {\n name: \"dynamic-view\",\n props: {\n single: String,\n sqlAlias: String,\n alias: String,\n html: String,\n queryView: Object\n },\n created: function created() {\n this.init();\n },\n watch: {\n html: function html(newVal) {\n if (newVal) {\n this.init();\n }\n }\n },\n methods: {\n init: function init() {\n Vue.component(\"ht-runtime-template\", {\n props: {\n single: String,\n sqlAlias: String,\n alias: String,\n html: String,\n queryView: Object\n },\n template: this.html,\n data: function data() {\n return {\n bpmRunTime: window.context.bpmRunTime,\n fileList: [],\n tableData: {\n selectRows: [],\n querys: \"\"\n },\n dialogExportVisible: false,\n exportData: {\n getType: \"all\",\n expField: []\n },\n exportSellection: [],\n searchForm: {},\n displayFields: [],\n alarmSettingMap: {},\n summaryTypeMap: {},\n queryForm: {\n queryData: \"\"\n },\n uploadParams: {\n id: []\n },\n formType: false,\n labelPosition: \"left\",\n incons: \"el-icon-arrow-down\",\n formatterMap: {},\n options: {\n fullscreen: true,\n lock: true\n },\n uploadError: \"/runtime/photoErrorCsv/v1/uploadErrorList\",\n upoadPdfToAzure: window.context.bpmRunTime + \"/runtime/blob/v1/upoadPdfToAzure\",\n uploadUnprepare: \"/runtime/blob/v1/upoadToAzure\",\n summarySetting: [],\n activeNames: ['1']\n };\n },\n computed: mapState({\n rows: function rows(state) {\n return state.form.querySqlViewRows;\n },\n pagination: function pagination(state) {\n return state.form.querySqlViewPagination;\n },\n total: function total(state) {\n return state.form.querySqlViewTotal;\n },\n uploadHeaders: function uploadHeaders(state) {\n return {\n Authorization: \"Bearer \".concat(state.login.currentUser.token)\n };\n },\n uploadErrorHttp: function uploadErrorHttp() {\n return this.bpmRunTime + this.uploadError;\n },\n uploadUnprepareHttp: function uploadUnprepareHttp() {\n return this.bpmRunTime + this.uploadUnprepare;\n }\n }),\n components: {\n HtCheckbox: HtCheckbox,\n HtDialog: HtDialog,\n HtDialogBtn: HtDialogBtn\n },\n watch: {\n formKey: function formKey(newVal) {\n if (newVal) {\n this.init();\n }\n },\n \"tableData.selectRows\": function tableDataSelectRows(newVal) {\n if (newVal.length > 0) {\n var me_ = this;\n me_.uploadParams.id = [];\n newVal.forEach(function (item) {\n me_.uploadParams.id.push(item.INSTID);\n });\n }\n },\n $route: \"init\",\n queryView: {\n handler: function handler(newVal, oldVal) {\n if (newVal.shows) {\n var displayField = utils.parseToJson(newVal.shows);\n\n for (var i = 0; i < displayField.length; i++) {\n if (displayField[i].hidden == 0) {\n this.displayFields.push(displayField[i]);\n\n if (displayField[i].summaryType) {\n this.summaryTypeMap[displayField[i].fieldName] = displayField[i].summaryType;\n }\n }\n\n if (displayField[i].formater) {\n this.formatterMap[displayField[i].fieldName] = displayField[i].formater;\n }\n\n if (displayField[i].alarmSetting) {\n this.alarmSettingMap[displayField[i].fieldName] = displayField[i].alarmSetting;\n }\n }\n }\n\n if (newVal.summarySetting) {\n this.summarySetting = JSON.parse(newVal.summarySetting);\n }\n },\n immediate: true\n }\n },\n methods: {\n //打印\n printList: function printList() {\n document.body.innerHTML = document.getElementById(\"printData\").innerHTML;\n window.print();\n location.reload();\n },\n //生成二维码\n //路由跳转\n routerPush: function routerPush(url) {\n this.$router.push(url);\n },\n //查看与处理流程按钮\n dispose: function dispose(row) {\n var url;\n\n if (row.TASKID) {\n //审批任务\n url = \"/task/\" + row.TASKID;\n } else {\n //查看流程实例\n url = \"/inst/\" + row.INSTID;\n }\n\n this.$router.push(url);\n },\n handleSizeChange: function handleSizeChange(size) {\n //每页下拉显示数据\n this.$store.dispatch(\"form/setQuerySqlViewPaginationSize\", size);\n this.search();\n },\n handleCurrentChange: function handleCurrentChange(currentPage) {\n //点击第几页\n this.$store.dispatch(\"form/setQuerySqlViewPaginationPageNum\", currentPage);\n this.search();\n },\n //回车查询\n searchEnterFun: function searchEnterFun(e) {\n var keyCode = window.event ? e.keyCode : e.which;\n\n if (keyCode == 13) {\n this.search('find');\n }\n },\n search: function search(str) {\n var loading = this.$loading(this.options);\n var params = {};\n\n if (str == \"find\") {\n this.$store.dispatch(\"form/setQuerySqlViewPaginationPageNum\", 1);\n } //判断为合并查询还是分开查询\n\n\n if (this.formType) {\n params = this.getQueryFilter();\n } else {\n //判断是否配置了合并查询\n if ($(\".search-query\").length > 0) {\n params = this.getConditionQuery();\n } else {\n params = this.getQueryFilter();\n }\n }\n\n if ($.isEmptyObject(this.searchForm)) {\n this.$store.dispatch(\"form/getQuerySqlViewByPagination\", params).then(function () {\n loading.close();\n });\n } else {\n this.$store.dispatch(\"form/getQuerySqlViewByPagination\", params).then(function () {\n loading.close();\n });\n }\n },\n getQueryFilter: function getQueryFilter() {\n var operationMap = this.getSearchItems(); //查询条件类型\n\n var fieldQueryMap = this.getFieldQuery(); //查询条件字段\n\n var specialMap = this.getSpecialMap(); //获取特殊查询情况(自定义对话框)\n\n var querys = []; //查询条件\n\n var queryFilter = {};\n var pageBean = {\n pageBean: this.pagination\n };\n var params = {\n sqlAlias: this.sqlAlias,\n alias: this.alias\n };\n params.pagination = pageBean;\n\n if ($.isEmptyObject(this.searchForm)) {\n return params;\n } else {\n for (var key in this.searchForm) {\n if (typeof this.searchForm[key] != \"undefined\" && this.searchForm[key] != \"\") {\n if (this.searchForm[key] instanceof Array) {\n if (operationMap[key] === \"BETWEEN\") {\n var valueArray = [];\n\n for (var i = 0; i < this.searchForm[key].length; i++) {\n valueArray.push(this.searchForm[key][i]);\n }\n\n querys.push({\n property: key,\n value: valueArray.join(\",\"),\n group: \"main\",\n operation: operationMap[key],\n relation: \"AND\"\n });\n } else {\n for (var _i = 0; _i < this.searchForm[key].length; _i++) {\n querys.push({\n property: key,\n value: this.searchForm[key][_i],\n group: \"main\",\n operation: operationMap[key],\n relation: \"AND\"\n });\n }\n }\n } else if (this.searchForm[key].includes(\",\") && !specialMap[key]) {\n var arr = this.searchForm[key].split(\",\");\n\n for (var _i2 = 0; _i2 < arr.length; _i2++) {\n if (arr[_i2] == \"\" || arr[_i2] == null || typeof arr[_i2] == \"undefined\") {\n arr.splice(_i2, 1);\n _i2 = _i2 - 1;\n }\n }\n\n arr.forEach(function (v) {\n querys.push({\n property: key,\n value: v,\n group: \"main\",\n operation: operationMap[key],\n relation: \"AND\"\n });\n });\n } else {\n querys.push({\n property: key,\n value: this.searchForm[key],\n group: \"main\",\n operation: operationMap[key],\n relation: \"AND\"\n });\n }\n }\n }\n\n queryFilter = {\n pageBean: this.pagination,\n querys: querys\n };\n params.pagination = queryFilter;\n return params;\n }\n },\n //获取查询条件类型\n getSearchItems: function getSearchItems() {\n var searchItems = $(\".search-item\");\n var operationMap = {}; //查询条件类型\n\n var operationType = {\n LK: \"LIKE\",\n EQ: \"EQUAL\",\n between: \"BETWEEN\",\n LFK: \"LEFT_LIKE\",\n RHK: \"RIGHT_LIKE\",\n NE: \"NOT_EQUAL\",\n LT: \"LESS\",\n LE: \"LESS_EQUAL\",\n GT: \"GREAT\",\n GE: \"GREAT_EQUAL\"\n };\n\n if (searchItems) {\n for (var i = 0; i < searchItems.length; i++) {\n var operation = \"=\";\n\n if (typeof $(searchItems[i]).attr(\"ht-query\") != \"undefined\") {\n //查询条件类型\n operation = $(searchItems[i]).attr(\"operation\");\n operationMap[$(searchItems[i]).attr(\"ht-query\")] = typeof operationType[operation] != \"undefined\" ? operationType[operation] : operation;\n } else if (typeof $(searchItems[i]).children().attr(\"ht-query\") != \"undefined\") {\n //查询条件类型\n operation = $(searchItems[i]).children().attr(\"operation\");\n operationMap[$(searchItems[i]).children().attr(\"ht-query\")] = typeof operationType[operation] != \"undefined\" ? operationType[operation] : operation;\n }\n }\n }\n\n return operationMap;\n },\n //获取查询条件字段\n getFieldQuery: function getFieldQuery() {\n var searchItems = $(\".search-item\");\n var fieldQueryMap = {}; //查询条件字段\n\n if (searchItems) {\n for (var i = 0; i < searchItems.length; i++) {\n if (typeof $(searchItems[i]).attr(\"ht-query\") != \"undefined\") {\n //查询条件字段\n fieldQueryMap[$(searchItems[i]).attr(\"ht-query\")] = $(searchItems[i]).attr(\"field-query\");\n } else if (typeof $(searchItems[i]).children().attr(\"ht-query\") != \"undefined\") {\n //查询条件字段\n fieldQueryMap[$(searchItems[i]).children().attr(\"ht-query\")] = $(searchItems[i]).children().attr(\"field-query\");\n }\n }\n }\n\n return fieldQueryMap;\n },\n //获取特殊查询情况(自定义对话框)\n getSpecialMap: function getSpecialMap() {\n var searchItems = $(\".search-item\");\n var fieldQueryMap = {}; //查询条件字段\n\n if (searchItems) {\n for (var i = 0; i < searchItems.length; i++) {\n if (typeof $(searchItems[i]).attr(\"ht-query\") != \"undefined\") {\n //查询条件字段\n fieldQueryMap[$(searchItems[i]).attr(\"ht-query\")] = typeof $(searchItems[i]).attr(\"special-query\") != \"undefined\" ? true : false;\n } else if (typeof $(searchItems[i]).children().attr(\"ht-query\") != \"undefined\") {\n //查询条件字段\n fieldQueryMap[$(searchItems[i]).children().attr(\"ht-query\")] = typeof $(searchItems[i]).children().attr(\"special-query\") != \"undefined\" ? true : false;\n }\n }\n }\n\n return fieldQueryMap;\n },\n getConditionQuery: function getConditionQuery() {\n var searchAll = $(\".search-query\");\n var values = \"\";\n var querys = []; //查询条件\n\n var queryFilter = {};\n var pageBean = {\n pageBean: this.pagination\n };\n var params = {\n sqlAlias: this.sqlAlias,\n alias: this.alias\n };\n params.pagination = pageBean;\n\n if (this.queryForm.queryData == \"\") {\n return params;\n } else {\n if (typeof $($(searchAll[0]).children()[0]).attr(\"ht-quick-search\") != \"undefined\") {\n values = $($(searchAll[0]).children()[0]).attr(\"ht-quick-search\");\n var arr = values.split(\",\");\n\n var _iterator = _createForOfIteratorHelper(arr),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var value = _step.value;\n querys.push({\n property: value,\n value: this.queryForm.queryData,\n group: \"main\",\n operation: \"LIKE\",\n relation: \"OR\"\n });\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n }\n }\n\n queryFilter = {\n pageBean: this.pagination,\n querys: querys\n };\n params.pagination = queryFilter;\n return params;\n },\n //打开高级检索\n advanced: function advanced() {\n this.formType = !this.formType;\n\n if (this.formType) {\n this.incons = \"el-icon-arrow-up\";\n this.queryForm.queryData = \"\";\n } else {\n this.incons = \"el-icon-arrow-down\";\n this.searchForm = {};\n }\n },\n reset: function reset() {\n this.queryForm.queryData = \"\";\n this.searchForm = {};\n this.search('find');\n },\n handleSelectionChange: function handleSelectionChange(val) {\n this.tableData.selectRows = val;\n },\n selectable: function selectable(row, index) {\n if (row.BATCH_COVER_FLAG != \"YES\" && row.NODEID == \"UserTask171\") {\n return true;\n }\n\n return false;\n },\n //点击导出按钮\n exports: function exports() {\n this.dialogExportVisible = true;\n },\n punchOrder: function punchOrder() {\n this.$store.dispatch(\"storeProcess/downLoadToFile\", \"Batchkeijyo\").then(function (res) {});\n },\n handleRemove: function handleRemove(file, fileList) {\n console.log(file, fileList);\n },\n beforeAvatarUpload: function beforeAvatarUpload(file) {\n var fileName = new Array();\n fileName = file.name.split(\".\");\n var extension = fileName[fileName.length - 1] === \"pdf\";\n\n if (!extension) {\n this.$message({\n message: \"上传模板只能是PDF格式!\",\n type: \"warning\"\n });\n return false;\n }\n\n if (this.tableData.selectRows.length == 0) {\n this.$message({\n type: \"warning\",\n message: \"请选择要上传送付状的案件\"\n });\n return false;\n }\n\n return true;\n },\n onSuccessUpload: function onSuccessUpload(response, file, fileLis) {\n this.$message.success(\"送付状成功\");\n window.location.reload();\n },\n handlePreview: function handlePreview(file) {},\n //确定导出\n submitExport: function submitExport() {\n var _this = this;\n\n if (!this.exportData || this.exportData.expField.length < 1) {\n this.$message({\n type: \"info\",\n message: \"请选择要导出的字段!\"\n });\n return;\n }\n\n var expField = \"\";\n\n for (var i = 0; i < this.exportData.expField.length; i++) {\n if (i > 0) {\n expField += \",\";\n }\n\n expField += this.exportData.expField[i].fieldName;\n }\n\n expField = Base64.encode(expField).replace(/\\+/g, \"%2B\");\n var params = {\n sqlAlias: this.sqlAlias,\n alias: this.alias\n };\n var data = {\n sqlAlias: this.sqlAlias,\n alias: this.alias,\n getType: this.exportData.getType,\n expField: expField\n };\n data.query = this.getQueryFilter().pagination;\n var loadingInstance = Loading.service({\n fullscreen: true\n }); //开始\n\n this.$store.dispatch(\"form/querySqlViewExport\", data).then(function () {\n loadingInstance.close(); // 结束\n\n _this.dialogExportVisible = false;\n });\n },\n //取消导出\n exportCancel: function exportCancel() {\n this.dialogExportVisible = false;\n this.exportData.expField = [];\n },\n handleExportSelectionChange: function handleExportSelectionChange(val) {\n this.exportData.expField = [];\n\n if (val) {\n this.exportData.expField = val;\n }\n },\n //全选\n handleExportSelectAll: function handleExportSelectAll() {\n this.exportData.expField = this.displayFields;\n },\n //排序\n sort: function sort(index, type) {\n if (\"up\" == type) {\n if (index === 0) {\n this.$message({\n message: \"已经是列表中第一位\",\n type: \"warning\"\n });\n } else {\n var temp = this.displayFields[index - 1];\n Vue.set(this.displayFields, index - 1, this.displayFields[index]);\n Vue.set(this.displayFields, index, temp);\n }\n } else {\n if (index === this.displayFields.length - 1) {\n this.$message({\n message: \"已经是列表中最后一位\",\n type: \"warning\"\n });\n } else {\n this.isTransition = true;\n var i = this.displayFields[index + 1];\n Vue.set(this.displayFields, index + 1, this.displayFields[index]);\n Vue.set(this.displayFields, index, i);\n }\n }\n },\n getSubEntsByFormKey: function getSubEntsByFormKey(refId) {\n var _this2 = this;\n\n var _me = this;\n\n _me.tabs = [];\n\n if (!_me.ents || _me.ents.length < 1) {\n this.$store.dispatch(\"form/getSubEntsByFormKey\", this.templateInfo.alias).then(function (ents) {\n _me.ents = ents;\n\n _this2.getSubData(_me, refId);\n });\n } else {\n this.getSubData(_me, refId);\n }\n },\n getSummaries: function getSummaries(param) {\n var _summaryTypeMap = this.summaryTypeMap;\n var columns = param.columns,\n data = param.data;\n var sums = [];\n columns.forEach(function (column, index) {\n if (index === 0) {\n sums[index] = \"合计\";\n return;\n }\n\n if (_summaryTypeMap[column.property] && _summaryTypeMap[column.property] == \"sum\") {\n var values = data.map(function (item) {\n return Number(item[column.property]);\n });\n\n if (!values.every(function (value) {\n return isNaN(value);\n })) {\n sums[index] = values.reduce(function (prev, curr) {\n var value = Number(curr);\n\n if (!isNaN(value)) {\n return prev + curr;\n } else {\n return prev;\n }\n }, 0);\n } else {\n sums[index] = \"N/A\";\n }\n }\n });\n return sums;\n },\n columnFormatter: function columnFormatter(row, column, cellValue) {\n var formatter = this.formatterMap[column.property];\n\n if (formatter) {\n try {\n var script = \"var formatterFunction = function(row,column,cellValue){ \" + formatter + \"};\";\n var result = eval(script + \"formatterFunction(row,column,cellValue);\");\n return result;\n } catch (e) {\n return cellValue;\n }\n } else {\n return cellValue;\n }\n },\n dateFormatter: function dateFormatter(row, column, cellValue) {\n if (cellValue) {\n return cellValue.replace(\".0\", \"\");\n } else {\n return cellValue;\n }\n },\n getAlarmColor: function getAlarmColor(field, cellValue) {\n var alarmSetting = this.alarmSettingMap[field];\n var type = \"\";\n this.displayFields.forEach(function (item) {\n if (item.fieldName === field) {\n type = item.dataType;\n }\n });\n\n if (alarmSetting) {\n try {\n var alarmSettingJson = utils.parseToJson(alarmSetting);\n var alarmScript = \"\";\n\n for (var i = 0; i < alarmSettingJson.length; i++) {\n var alarm = alarmSettingJson[i];\n var condition = alarm.condition;\n var conditionStr = \"\";\n\n for (var m = 0; m < condition.length; m++) {\n if (m > 0) {\n conditionStr += \" && \";\n }\n\n if (type === 'number' || type === 'bigint' || type === 'int') {\n if (condition[m].op == 'indexOf' && condition[m].val) {\n conditionStr = conditionStr + \"'\" + cellValue + \"'.indexOf('\" + condition[m].val + \"')!=-1\";\n } else if (condition[m].op == 'notIndexOf') {\n conditionStr = conditionStr + \"'\" + cellValue + \"'.indexOf('\" + condition[m].val + \"')==-1\";\n } else {\n conditionStr = conditionStr + cellValue + condition[m].op + condition[m].val;\n }\n } else {\n if (condition[m].op == 'indexOf' && condition[m].val) {\n conditionStr = conditionStr + \"'\" + cellValue + \"'.indexOf('\" + condition[m].val + \"')!=-1\";\n } else if (condition[m].op == 'notIndexOf') {\n conditionStr = conditionStr + \"'\" + cellValue + \"'.indexOf('\" + condition[m].val + \"')==-1\";\n } else {\n conditionStr = conditionStr + \"'\" + cellValue + \"'\" + condition[m].op + \"'\" + condition[m].val + \"'\";\n }\n } //conditionStr = conditionStr+cellValue+condition[m].op+condition[m].val;\n\n }\n\n if (i > 0) {\n alarmScript += \" else \";\n }\n\n var colorStr = \"color:\" + alarm.color + \"\";\n alarmScript = alarmScript + \"if(\" + conditionStr + \"){return '\" + colorStr + \"';}\";\n }\n\n if (alarmScript) {\n alarmScript += 'else{ return \"\";}';\n var script = \"var alarmFunction = function(){ \" + alarmScript + \"};\";\n var result = eval(script + \"alarmFunction();\");\n return result;\n } else {\n return \"\";\n }\n } catch (e) {\n return \"\";\n }\n }\n },\n summary: function summary(method, field, decimal) {\n var list = this.rows.filter(function (item) {\n return item[field] !== undefined && item[field] !== \"\";\n }).map(function (item) {\n return new Number(item[field]);\n });\n\n if (method === \"count\") {\n return list.length;\n } else if (method === \"sum\") {\n return list.reduce(function (a, b) {\n return a + b;\n }).toFixed(decimal);\n } else if (method === \"min\") {\n return Math.min.apply(Math, _toConsumableArray(list)).toFixed(decimal);\n } else if (method === \"max\") {\n return Math.max.apply(Math, _toConsumableArray(list)).toFixed(decimal);\n } else if (method === \"avg\") {\n return (list.reduce(function (a, b) {\n return a + b;\n }) / list.length).toFixed(decimal);\n }\n },\n showSearchPane: function showSearchPane() {\n return true;\n }\n }\n });\n }\n }\n};",null]}