| | |
| | | <el-button @click="getTableInfo()">查询</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-form> |
| | | <el-button type="primary" @click="callPythonCalc()">启动python计算</el-button> |
| | | <!-- <el-button type="primary" @click="getPythonCalcResult()">获取python计算进度</el-button>--> |
| | | <el-tag>仿真进度:{{progress}}%</el-tag> |
| | | </el-form> |
| | | <el-table :data="dataForm.tableData" height="320" stripe style="width: 100%"> |
| | | <el-table-column prop="columnName" label="CODE"></el-table-column> |
| | | <el-table-column prop="remarks" label="名称"> |
| | |
| | | isExport: false, |
| | | tableData: [], |
| | | tableList:[] |
| | | } |
| | | |
| | | }, |
| | | progress: 0, |
| | | timer: null, |
| | | } |
| | | }, |
| | | |
| | |
| | | this.getInfo() |
| | | }, |
| | | methods: { |
| | | async callPythonCalc() { |
| | | // 启动python计算 |
| | | let res = await this.$http.get('/taskReliability/ModelLine/callPythonCalc') |
| | | if (res.success) { |
| | | this.$alert('启动python计算成功!') |
| | | // 定时获取python计算进度 |
| | | this.timer = setInterval(this.getPythonCalcResult, 5000) |
| | | } |
| | | }, |
| | | |
| | | async getPythonCalcResult() { |
| | | // setTimeout(() => { |
| | | let res = await this.$http.get('/taskReliability/ModelLine/getPythonCalcResult') |
| | | if (res.success) { |
| | | this.progress = res.data |
| | | if (this.progress==='100') { |
| | | clearInterval(this.timer) |
| | | } |
| | | } |
| | | // }, 5000) |
| | | }, |
| | | |
| | | // 获取信息 |
| | | async getInfo() { |
| | | let res = await this.$http.get(`/sys/generator/properties`) |