{"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\\views\\IntelligentControl\\ModelManagement.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\cssc-fvue\\src\\views\\IntelligentControl\\ModelManagement.vue","mtime":1667804639665},{"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":["//\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//\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//\nimport ModelHistory from \"./modules/ModelHistory.vue\";\nexport default {\n components: {\n ModelHistory: ModelHistory\n },\n name: 'model-management',\n filters: {\n taskRateUnit: function taskRateUnit(data) {\n var text = '';\n\n switch (data) {\n case 's':\n text = '秒';\n\n case 'm':\n text = '分钟';\n break;\n\n case 'h':\n text = '小时';\n break;\n\n case 'd':\n text = '天';\n break;\n\n case 'w':\n text = '周';\n break;\n\n case 'M':\n text = '月';\n break;\n\n case 'Y':\n text = '年';\n break;\n\n default:\n break;\n }\n\n return text;\n }\n },\n data: function data() {\n return {\n bodyStyle: {\n padding: '10px',\n height: 'calc(100% - 20px)'\n },\n bodyStyle2: {\n padding: '10px',\n height: 'calc(100% - 20px)',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center'\n },\n bodyStyle3: {\n padding: '0',\n height: '100%'\n },\n currentType: 'crew',\n crew: [],\n model: [],\n currentNodeKey1: '',\n currentNodeKey2: '',\n crewProps: {\n children: 'children',\n label: 'treeLabel'\n },\n modelProps: {\n children: 'children',\n label: 'treeLabel'\n },\n modelList: [],\n modelTitle: '模型名称',\n tableData: [],\n //模型数据列表\n searchDate: '',\n filterText: '',\n currentPage: 1,\n //当前页\n pageSize: 50,\n //每页多少条\n total: 0,\n //总条数\n data: [],\n dateTime: [],\n fanCode: '',\n //机组编号\n modelId: '',\n //模型ID\n modelResult: [] //执行结果\n\n };\n },\n watch: {\n filterText: function filterText(val) {\n if (this.currentType == 'crew') {\n this.$refs.tree1.filter(val);\n } else {\n this.$refs.tree2.filter(val);\n }\n }\n },\n created: function created() {\n this.initCrewList();\n this.initModelList();\n },\n mounted: function mounted() {\n var _this = this;\n\n this.$nextTick(function () {\n _this.$refs.tree1.setCurrentKey(_this.currentNodeKey1);\n });\n },\n methods: {\n renderHeader: function renderHeader(h, _ref) {\n var column = _ref.column;\n\n // console.log(column)\n if (column.label.length && column.label.length < 4) {\n column.minWidth = 50;\n } else {\n column.minWidth = column.label.length * 16;\n }\n\n return h('div', {\n class: 'table-header'\n }, [column.label]);\n },\n filterNode: function filterNode(value, data) {\n console.log(data, value, '123');\n if (!value) return true;\n return data.treeLabel.indexOf(value) !== -1;\n },\n //切换机组和模型按钮\n changeType: function changeType(val) {\n var _this2 = this;\n\n this.currentType = val;\n this.$nextTick(function () {\n if (_this2.currentType == 'model') {\n _this2.$refs.tree2.setCurrentKey(_this2.currentNodeKey2);\n } else {\n _this2.$refs.tree1.setCurrentKey(_this2.currentNodeKey1);\n }\n });\n },\n handleNodeClick: function handleNodeClick(data) {\n // console.log(data, 'data')\n if (this.currentType == 'model') {\n this.currentNodeKey2 = data.id;\n this.modelTitle = data.modelName;\n this.currentPage = 1;\n this.pageSize = 50;\n this.total = 0;\n this.modelResult = [];\n this.loadData();\n } else {\n this.loadCrewModel(data);\n }\n },\n loadCrewModel: function loadCrewModel(node) {\n var _this3 = this;\n\n var query = {\n url: '${cssc}/biz/model/modelInfo/v1/modelFan/queryModelByFan',\n method: 'POST',\n headers: {\n 'Content-type': 'application/x-www-form-urlencoded'\n },\n data: this.qs.stringify({\n fanCode: node.fanCode,\n fanName: node.fanName,\n fanId: node.id,\n modelCategory: 1\n })\n };\n this.$http.request(query).then(function (res) {\n _this3.modelList = res.data;\n });\n },\n initCrewList: function initCrewList() {\n var _this4 = this;\n\n var query = {\n sorter: [{\n direction: 'ASC',\n property: 'fanCode'\n }]\n };\n this.$http.post('${cssc}/biz/base/fanInfo/v1/list', query).then(function (resp) {\n if (resp.data) {\n _this4.crew = resp.data;\n\n if (_this4.crew.length) {\n _this4.crew = _this4.crew.map(function (item) {\n item.treeLabel = item.fanName;\n return item;\n });\n _this4.currentNodeKey1 = _this4.crew[0].id;\n\n _this4.$nextTick(function () {\n _this4.$refs.tree1.setCurrentKey(_this4.currentNodeKey1);\n });\n\n _this4.loadCrewModel(_this4.crew[0]);\n }\n }\n }, function (error) {\n reject(error);\n });\n },\n initModelList: function initModelList() {\n var _this5 = this;\n\n var query = {\n sorter: [{\n direction: 'ASC',\n property: 'modelName'\n }]\n };\n this.$http.post('${cssc}/biz/model/modelInfo/v1/list', query).then(function (resp) {\n if (resp.data) {\n _this5.model = resp.data;\n _this5.modelTitle = resp.data[0].modelName;\n\n if (_this5.model.length) {\n _this5.model = _this5.model.map(function (item) {\n item.treeLabel = item.modelName;\n return item;\n });\n _this5.currentNodeKey2 = _this5.model[0].id;\n }\n }\n }, function (error) {\n reject(error);\n });\n },\n handleHistory: function handleHistory(item) {\n this.$refs.modelHistory.open(item);\n },\n loadData: function loadData() {\n var _this6 = this;\n\n var param = {\n pageBean: {\n page: this.currentPage,\n pageSize: this.pageSize,\n total: this.total\n },\n querys: [],\n sorter: [{\n direction: 'DESC',\n property: 'scheduler_time_'\n }, {\n direction: 'ASC',\n property: 'fan_code_'\n }]\n };\n var dateQuerys = [{\n group: 'main',\n operation: 'BETWEEN',\n parentGroup: '',\n property: 'scheduler_time_',\n relation: 'AND',\n value: this.dateTime\n }];\n\n if (this.dateTime && this.dateTime.length) {\n if (param.querys && param.querys.length) {\n var _param$querys;\n\n (_param$querys = param.querys).push.apply(_param$querys, dateQuerys);\n } else {\n param.querys = dateQuerys;\n }\n }\n\n this.$http.post('${cssc}/biz/model/modelInfo/v1/modelResult/sliceQueryModelResult?modelId=' + this.currentNodeKey2, param).then(function (res) {\n var resp = res.data;\n var rows = resp.rows;\n _this6.data = rows;\n _this6.currentPage = resp.page;\n _this6.pageSize = resp.pageSize;\n _this6.total = resp.total;\n var param2 = {\n pageBean: {\n page: 1,\n pageSize: 50,\n total: 0\n },\n querys: [{\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'modelId',\n relation: 'AND',\n value: _this6.currentNodeKey2\n }, {\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'paramType',\n relation: 'AND',\n value: 'result'\n }],\n sorter: [{\n direction: 'ASC',\n property: 'sn'\n }]\n };\n\n _this6.$http.post('${cssc}/biz/model/modelInfo/v1/modelParams/queryParamByModel', param2).then(function (res) {\n _this6.modelResult = res.data;\n });\n }, function (error) {\n reject(error);\n });\n },\n handleSizeChange: function handleSizeChange(val) {\n this.pageSize = val;\n this.loadData();\n },\n handleCurrentChange: function handleCurrentChange(val) {\n this.currentPage = val;\n this.loadData();\n }\n }\n};",null]}