jinlin
2024-12-02 18f682f736914e427070b9bb769df538ad9f6d1c
web/src/views/modules/taskReliability/SimulatAssess.vue
@@ -8,6 +8,9 @@
        <zt-form-item label="总体任务" prop="taskModelId">
          <zt-select v-model="dataForm.taskModelId" :datas="taskList" @change="onTaskSelected"/>
        </zt-form-item>
        <zt-form-item label="仿真名称" prop="name">
          <el-input v-model="dataForm.name" placeholder="请输入名称" clearable></el-input>
        </zt-form-item>
        <zt-form-item label="时间分片" prop="samplPeriod">
          <el-input type="number" :min="1" v-model="dataForm.samplPeriod"
                    style="width: 150px;vertical-align: baseline;">
@@ -26,15 +29,6 @@
        <zt-form-item style="margin-left: 10px">
          <zt-button @click="analyze()">仿真分析</zt-button>
          <zt-button @click="displayProcess()">算法库进程</zt-button>
          <el-dropdown style="margin-left: 10px" @command="download">
            <el-button type="primary">
              下载xml<i class="el-icon-arrow-down el-icon--right"></i>
            </el-button>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item command="1">输入xml</el-dropdown-item>
              <el-dropdown-item command="2">输出xml</el-dropdown-item>
            </el-dropdown-menu>
          </el-dropdown>
        </zt-form-item>
      </el-form>
      <el-progress v-if="isShow" :percentage="percentage"></el-progress>
@@ -94,6 +88,7 @@
        dataForm: {
          id: '',
          pid: '',
          name:'',
          productId: '',
          showProductId: '',
          taskModelId: '',
@@ -109,13 +104,6 @@
    },
    mounted() {
      this.getProductList()
    },
    watch: {
      // percentage() {
      //   if (this.percentage === 100) {
      //     this.$refs.SimulatCurve.initEcharts(this.dataForm);
      //   }
      // }
    },
    components: {
      ProductModelTree,
@@ -195,21 +183,6 @@
            this.timers = window.setInterval(this.getStroke, 1000)
          }
        }
      },
      async download(selsect) {
        if(this.dataForm.id){
          let param = qs.stringify({
            'token': Cookies.get('token'),
            type: 'fz',
            xml:selsect,
            id: this.dataForm.id
          })
          let apiURL = `/taskReliability/SimulatAssess/downloadXml`
          window.location.href = `${window.SITE_CONFIG['apiURL']}${apiURL}?${param}`
        }else{
          this.$alert('还未进行仿真操作')
        }
      },
      displayProcess() {
        this.$refs.process.$refs.dialog.init()