jinlin
2024-08-02 826cd5b51d5106cfea07e397eda184fb15ec7a30
web/src/views/modules/taskReliability/Task.vue
@@ -11,6 +11,7 @@
          <zt-button v-if="dataForm.productId" type="add" @click="add()"/>
          <zt-button v-if="dataForm.productId" type="delete" @click="table.deleteHandle()"/>
          <el-button v-if="dataForm.productId" type="primary" @click="openDialog()">二项分布参数</el-button>
          <el-button v-if="dataForm.productId" type="primary" @click="openDialog2()">不可修设备类型</el-button>
        </el-form-item>
      </el-form>
      <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:30}"
@@ -31,6 +32,7 @@
      <!-- 弹窗, 新增 / 修改 -->
      <add-or-update @refreshDataList="table.query" ref="AddOrUpdate"/>
      <task-bino-param ref="taskBinoParam"></task-bino-param>
      <task-repair-param ref="taskRepairParam"></task-repair-param>
    </zt-table-wraper>
  </div>
</template>
@@ -38,6 +40,7 @@
<script>
  import AddOrUpdate from './Task-AddOrUpdate'
  import TaskBinoParam from "./TaskBinoParam";
  import TaskRepairParam from "./TaskRepairParam";
  export default {
    name: 'Task',
@@ -53,6 +56,7 @@
      }
    },
    components: {
      TaskRepairParam,
      TaskBinoParam,
      AddOrUpdate
    },
@@ -73,6 +77,13 @@
          this.$alert("请选择具体任务")
        }
      },
      openDialog2() {
        if (this.dataForm.id) {
          this.$refs.taskRepairParam.$refs.dialog.init(null, {taskId: this.dataForm.id})
        } else {
          this.$alert("请选择具体任务")
        }
      },
      selectTask(row) {
        this.dataForm.id = row.id
        this.$emit('onTaskSelected', row)