| | |
| | | <zt-form-item label="总体任务" prop="task"> |
| | | <zt-select v-model="dataForm.task" :datas="taskList" @change="onTaskSelected"/> |
| | | </zt-form-item> |
| | | <!-- <zt-form-item label="任务时长" prop="simulatTime"> |
| | | <el-input type="number" :min="1" v-model="dataForm.simulatTime"> |
| | | <template slot="append">小时</template> |
| | | </el-input> |
| | | </zt-form-item>--> |
| | | <zt-form-item label="数据类型" prop="dataType"> |
| | | <zt-dict v-model="dataForm.dataType" dict="dataType"></zt-dict> |
| | | </zt-form-item> |
| | |
| | | </zt-form-item> |
| | | <zt-form-item> |
| | | <zt-button @click="analyze()">仿真分析</zt-button> |
| | | <zt-button>分析结果</zt-button> |
| | | <zt-button @click="getresult()">分析结果</zt-button> |
| | | </zt-form-item> |
| | | </el-form> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="17"> |
| | | <div style="height: calc(100vh - 165px);background: white"> |
| | | <el-col :span="18"> |
| | | <div class="fa-card-a"> |
| | | <SimulatCurve ref="SimulatCurve"></SimulatCurve> |
| | | <SimulatData></SimulatData> |
| | | <SimulatData ref="SimulatData"></SimulatData> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | isRepair: '', |
| | | samplPeriod: '', |
| | | simulatFrequency: '', |
| | | simulatTime:'' |
| | | } |
| | | } |
| | | }, |
| | |
| | | console.log(res.data) |
| | | this.taskList = res.data |
| | | }, |
| | | getresult(){ |
| | | this.$refs.SimulatData.init(); |
| | | }, |
| | | async analyze() { |
| | | let res = await this.$http.post('/taskReliability/SimulatAssess/analyze', this.dataForm) |
| | | /* let res = await this.$http.post('/taskReliability/SimulatAssess/analyze', this.dataForm) |
| | | if (res.success) { |
| | | console.log(res.data, 'analyze') |
| | | let stopPolling = false |
| | | if (!stopPolling) { |
| | | let timer = setInterval(async () => { |
| | | let res2 = await this.$http.get(`/taskReliability/SimulatAssess/${res.data}`) |
| | | console.log(res2.data, 'setInterval') |
| | | if (res2.data) { |
| | | if (res2.data.code === '0' || res2.data.errorMsg === '0') { |
| | | stopPolling = true |
| | | // 中止轮询 |
| | | clearInterval(timer) |
| | | alert('已获取') |
| | | this.$refs.SimulatCurve.initEcharts(res2.data.curveData); |
| | | alert('已获取')*/ |
| | | this.$refs.SimulatCurve.initEcharts(); |
| | | // 清除定时器 |
| | | } else { |
| | | /* } else { |
| | | stopPolling = true |
| | | // 中止轮询 |
| | | clearInterval(timer) |
| | |
| | | }, 400) |
| | | } |
| | | |
| | | } |
| | | }*/ |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style> |
| | | .mod-taskReliability-simulatAssess { |
| | | height: calc(100vh - 165px); |
| | | height: calc(100vh - 175px); |
| | | } |
| | | |
| | | .mod-taskReliability-simulatAssess .el-form-item__label { |
| | | line-height: calc((100vh - 165px) / 7); |
| | | line-height: calc((100vh - 175px) / 7); |
| | | } |
| | | |
| | | .mod-taskReliability-simulatAssess .el-form-item__content { |
| | | line-height: calc((100vh - 165px) / 7); |
| | | line-height: calc((100vh - 175px) / 7); |
| | | } |
| | | |
| | | .mod-taskReliability-simulatAssess .el-form-item__content > .el-input-group--append { |
| | |
| | | div.el-col.el-col-17 { |
| | | background: white; |
| | | } |
| | | div.el-select-dropdown.el-popper{ |
| | | /*top: calc((100vh - 155px) / 4) !important;*/ |
| | | } |
| | | </style> |