| | |
| | | @use 'bpmn-js-token-simulation/assets/css/bpmn-js-token-simulation.css'; |
| | | @use 'bpmn-js-token-simulation/assets/css/font-awesome.min.css'; |
| | | @use 'bpmn-js-token-simulation/assets/css/normalize.css'; |
| | | @import 'bpmn-js-token-simulation/assets/css/bpmn-js-token-simulation.css'; |
| | | @import 'bpmn-js-token-simulation/assets/css/font-awesome.min.css'; |
| | | @import 'bpmn-js-token-simulation/assets/css/normalize.css'; |
| | | |
| | | // 边框被 token-simulation 样式覆盖了 |
| | | .djs-palette { |
| | |
| | | MODEL_METHOD_SETTING_VALUE_TYPE = 'model_method_setting_value_type', |
| | | PRED_GRANULARITY = 'pred_granularity', |
| | | ITEM_RUN_STATUS = 'item_run_status', |
| | | |
| | | RESULT_TYPE = 'result_type', |
| | | // ========== DATA - 数据平台模块 ========== |
| | | DATA_FIELD_TYPE = 'data_field_type', |
| | | TAG_DATA_TYPE = 'tag_data_type', |
| | |
| | | title="预测数据" |
| | | :close-on-click-modal="false" |
| | | width="50%" |
| | | @close="dialogClose" |
| | | v-model="visible" |
| | | > |
| | | <el-form |
| | |
| | | > |
| | | <el-form-item label="开始时间"> |
| | | <el-date-picker |
| | | size="mini" |
| | | v-model="dataForm.startTime" |
| | | format="YYYY-MM-DD HH:mm:00" |
| | | value-format="YYYY-MM-DD HH:mm:00" |
| | |
| | | </el-form-item> |
| | | <el-form-item label="结束时间"> |
| | | <el-date-picker |
| | | size="mini" |
| | | v-model="dataForm.endTime" |
| | | format="YYYY-MM-DD HH:mm:00" |
| | | value-format="YYYY-MM-DD HH:mm:00" |
| | |
| | | dataForm.value.id = row.id; |
| | | dataForm.value.itemName = row.itemname; |
| | | if (row.id) { |
| | | myChart = echarts.init(chartDomPre.value); |
| | | myChart.clear() |
| | | nextTick(() => { |
| | | myChart = echarts.init(chartDomPre.value); |
| | | }); |
| | | getDataList(); |
| | | } |
| | | } |
| | | |
| | | const dialogClose = () => { |
| | | if (myChart) { |
| | | myChart.dispose(); // 组件卸载时销毁实例 |
| | | } |
| | | } |
| | | |
| | |
| | | chartParams.endTime = dataForm.value.endTime; |
| | | const data = await McsApi.getPreDataItemChart(chartParams) |
| | | let legendData = [] |
| | | if (data.legend && data.legend.length > 0) { |
| | | data.legend.forEach(item => { |
| | | legendData.push(item + ":" + '真实值') |
| | | legendData.push(item + ":" + '预测值') |
| | | }) |
| | | } |
| | | // if (data.legend && data.legend.length > 0) { |
| | | // data.legend.forEach(item => { |
| | | // legendData.push(item + ":" + '真实值') |
| | | // legendData.push(item + ":" + '预测值') |
| | | // }) |
| | | // } |
| | | |
| | | let seriesData = [] |
| | | if (data.predictTime) { |
| | |
| | | Object.keys(data.viewMap).forEach(key => { |
| | | let viewData = data.viewMap[key] |
| | | if(viewData.realData) { |
| | | legendData.push(key + ":" + '真实值') |
| | | seriesData.push({ |
| | | name: key + ":" + '真实值', |
| | | type: "line", |
| | |
| | | }, |
| | | }) |
| | | } |
| | | legendData.push(key + ":" + '预测值') |
| | | seriesData.push({ |
| | | name: key + ":" + '预测值', |
| | | type: "line", |
| | |
| | | <el-table-column prop="valuetype" label="类型" align="center" min-width="150"/> |
| | | <el-table-column prop="" label="值" align="center" min-width="200"> |
| | | <template #default="scope"> |
| | | <el-input size="mini" v-model="scope.row.value" maxlength="1000" |
| | | <el-input v-model="scope.row.value" maxlength="1000" |
| | | :disabled="scope.row.key === 'pyFile'" |
| | | style="width:100%;height:100%"/> |
| | | </template> |
| | |
| | | <template #default="scope"> |
| | | <el-button |
| | | @click="addRow(scope.$index, dataForm.mmModelParamList)" |
| | | type="text" |
| | | size="mini"> |
| | | type="text"> |
| | | 添加 |
| | | </el-button> |
| | | <el-button |
| | | @click="deleteRow(scope.$index, scope.row, dataForm.mmModelParamList)" |
| | | type="text" |
| | | size="mini"> |
| | | type="text"> |
| | | 删除 |
| | | </el-button> |
| | | </template> |
| | |
| | | <el-table-column label="运行时间" min-width="150" align="center" prop="lastTime"/> |
| | | <el-table-column label="运行状态" align="center" prop="runStatus"> |
| | | <template #default="scope"> |
| | | <dict-tag :type="DICT_TYPE.ITEM_RUN_STATUS" :value="scope.row.runStatus" /> |
| | | <dict-tag :type="DICT_TYPE.ITEM_RUN_STATUS" :value="scope.row.runStatus || 200" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="运行耗时(ms)" align="center" prop="duration"/> |
| | |
| | | <el-button |
| | | link |
| | | type="primary" |
| | | size="mini" |
| | | @click="openForm('update', scope.row.id, scope.row.itemtypename)" |
| | | v-hasPermi="['model:pre-item:update']" |
| | | > |
| | | 编辑 |
| | | </el-button> |
| | | <el-button link size="mini" type="primary" @click="chartHandle(scope.row)">数据</el-button> |
| | | <el-button link type="primary" @click="chartHandle(scope.row)">数据</el-button> |
| | | <el-button |
| | | link |
| | | type="danger" |
| | | size="mini" |
| | | @click="handleDelete(scope.row.id)" |
| | | v-hasPermi="['model:pre-item:delete']" |
| | | > |
| | |
| | | :data="formData.modelOut" |
| | | border |
| | | style="width: 100%; margin-top: 5px;"> |
| | | <el-table-column prop="resultKey`" label="输出key" align="center" min-width="100"> |
| | | <el-table-column prop="resultKey" label="输出key" align="center" min-width="100"> |
| | | <template #default="scope"> |
| | | <el-input size="mini" v-model="scope.row.resultKey" style="width:100%;height:100%"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="resultType`" label="数据类型" align="center" min-width="100"> |
| | | <el-table-column prop="resultType" label="数据类型" align="center" min-width="150"> |
| | | <template #default="scope"> |
| | | <el-input size="mini" v-model="scope.row.resultType" style="width:100%;height:100%"/> |
| | | <el-select v-model="scope.row.resultType" placeholder="请选择"> |
| | | <el-option |
| | | v-for="dict in getStrDictOptions(DICT_TYPE.RESULT_TYPE)" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="resultPort" label="角标1" align="center" min-width="100"> |
| | |
| | | <el-table-column label="调整类型" align="center" prop="scheduleType" min-width="100"/> |
| | | <el-table-column label=" 调整策略" align="center" prop="scheduleStrategy" min-width="100"/> |
| | | <el-table-column label="调度时间" align="center" prop="scheduleTime" min-width="160" /> |
| | | <el-table-column label="运行状态" align="center" prop="runStatus"> |
| | | <template #default="scope"> |
| | | <el-tag v-if="scope.row.runStatus + '' === '100'" size="small" type="success">{{scope.row.runStatus}}</el-tag> |
| | | <el-tag v-else size="small" type="danger">{{scope.row.runStatus}}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="备注" header-align="center" align="left" prop="remark" min-width="160" /> |
| | | <el-table-column label="状态" align="center" prop="status" min-width="100"> |
| | | <el-table-column label="是否启用" align="center" prop="status" min-width="100"> |
| | | <template #default="scope"> |
| | | <dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" /> |
| | | </template> |