| | |
| | | </el-form-item> |
| | | <zt-form-item style="margin-left: 20px"> |
| | | <zt-button @click="analyze()">仿真分析</zt-button> |
| | | <zt-button @click="displayProcess()">查看算法库进程</zt-button> |
| | | </zt-form-item> |
| | | </el-form> |
| | | <el-progress v-if="isShow" :percentage="percentage"></el-progress> |
| | |
| | | <el-button type="primary" @click="dialogVisible = false">关 闭</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <Process ref="process"></Process> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import SimulatCurve from "./SimulatCurve"; |
| | | import ProductModelTree from "../basicInfo/ProductModelTree"; |
| | | import Process from "./Process"; |
| | | |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | timers: '', |
| | | timers: null, |
| | | isSelect: false, |
| | | isShow: false, |
| | | percentage: 0, |
| | |
| | | this.getProductList() |
| | | }, |
| | | watch: { |
| | | percentage() { |
| | | if (this.percentage === 100) { |
| | | this.$refs.SimulatCurve.initEcharts(this.dataForm); |
| | | } |
| | | } |
| | | // percentage() { |
| | | // if (this.percentage === 100) { |
| | | // this.$refs.SimulatCurve.initEcharts(this.dataForm); |
| | | // } |
| | | // } |
| | | }, |
| | | components: { |
| | | ProductModelTree, |
| | | SimulatCurve, |
| | | Process, |
| | | }, |
| | | |
| | | methods: { |
| | |
| | | console.log(res.data) |
| | | this.taskList = res.data |
| | | }, |
| | | getStroke() { |
| | | if (this.percentage < 100) { |
| | | let param = { |
| | | taskList: [this.dataForm.id] |
| | | } |
| | | this.$http.get(`/taskReliability/SimulatAssess/getCalcProgress`, {params: param}).then( |
| | | res => { |
| | | if (res.data) { |
| | | this.percentage = parseFloat(res.data) |
| | | } |
| | | async getStroke() { |
| | | let param = { |
| | | taskList: [this.dataForm.id] |
| | | } |
| | | let res = await this.$http.get(`/taskReliability/SimulatAssess/getCalcProgress`, {params: param}) |
| | | if (res.success) { |
| | | if (res.data) { |
| | | this.percentage = parseFloat(res.data) |
| | | if (this.percentage >= 100) { |
| | | clearInterval(this.timers) |
| | | this.percentage = 0 |
| | | this.$refs.SimulatCurve.initEcharts(this.dataForm); |
| | | } |
| | | ) |
| | | } |
| | | } else { |
| | | clearInterval(this.timers) |
| | | this.percentage = 0 |
| | |
| | | this.isShow = true |
| | | let result = await this.$http.get(`/basicInfo/TyProductModel/getUuid`) |
| | | this.dataForm.id = result.data |
| | | this.percentage = 0 |
| | | let res = await this.$http.post('/taskReliability/SimulatAssess/analyze', this.dataForm) |
| | | if (res.success) { |
| | | console.log(res.data) |
| | | console.log(res.data, 'res.data') |
| | | if (res.data && res.data.length > 0) { |
| | | this.modelCheckResult = res.data |
| | | this.dialogVisible = true |
| | |
| | | this.timers = window.setInterval(this.getStroke, 1000) |
| | | } |
| | | } |
| | | }, |
| | | displayProcess() { |
| | | this.$refs.process.$refs.dialog.init() |
| | | } |
| | | } |
| | | } |