From f9d81769fb35d2fea8fb0da9162a39de4208b337 Mon Sep 17 00:00:00 2001 From: wente <329538422@qq.com> Date: 星期一, 01 七月 2024 08:43:09 +0800 Subject: [PATCH] 模型节点有虚框不能保存 表决数量要小于进线 --- web/packages/views/pages/generator.vue | 32 ++++++++++++++++++++++++++++++-- 1 files changed, 30 insertions(+), 2 deletions(-) diff --git a/web/packages/views/pages/generator.vue b/web/packages/views/pages/generator.vue index a04809b..58596ac 100644 --- a/web/packages/views/pages/generator.vue +++ b/web/packages/views/pages/generator.vue @@ -10,6 +10,11 @@ <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="鍚嶇О"> @@ -114,8 +119,9 @@ isExport: false, tableData: [], tableList:[] - } - + }, + progress: 0, + timer: null, } }, @@ -151,6 +157,28 @@ 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`) -- Gitblit v1.9.1