| | |
| | | <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}" |
| | |
| | | <!-- 弹窗, 新增 / 修改 --> |
| | | <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> |
| | |
| | | <script> |
| | | import AddOrUpdate from './Task-AddOrUpdate' |
| | | import TaskBinoParam from "./TaskBinoParam"; |
| | | import TaskRepairParam from "./TaskRepairParam"; |
| | | |
| | | export default { |
| | | name: 'Task', |
| | |
| | | } |
| | | }, |
| | | components: { |
| | | TaskRepairParam, |
| | | TaskBinoParam, |
| | | AddOrUpdate |
| | | }, |
| | |
| | | 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) |
| | |
| | | let res = await this.$http.get('/basicInfo/XhProductModel/getTaskProductList') |
| | | this.productList = res.data |
| | | console.log(this.productList, ' async getTaskProductList()') |
| | | this.onProductSelected(this.productList[0]) |
| | | }, |
| | | onProductSelected(data) { |
| | | console.log(data, ' onProductSelected(data)') |
| | | this.dataForm.productId = data.id |
| | | this.$refs.tableObj.query() |
| | | this.selectTask(data) |
| | | }, |
| | | tableRowClassName( |
| | | { |