| | |
| | | <div style="margin: 10px 0"> |
| | | <zt-select v-model="dataForm.productId" placeholder="请选择产品节点" :datas="productList" @change="onProductSelected"/> |
| | | </div> |
| | | <zt-table-wraper ref="tableObj" query-url="/taskReliability/Task/page" defaultNotQuery="true" :paging='false' |
| | | <zt-table-wraper @dataLoaded="dataLoaded" ref="tableObj" query-url="/taskReliability/Task/page" defaultNotQuery="true" :paging='false' |
| | | delete-url="/taskReliability/Task/" |
| | | v-slot="{ table }"> |
| | | <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()"> |
| | |
| | | @row-click="selectTask" |
| | | @selection-change="table.selectionChangeHandle"> |
| | | <el-table-column type="selection" width="40" align="center"/> |
| | | <el-table-column prop="taskName" label="任务名称" align="center" width="140"/> |
| | | <el-table-column prop="taskName" label="任务名称" align="center" /> |
| | | <!--<el-table-column prop="taskSort" label="任务顺序" align="center"/>--> |
| | | <el-table-column prop="taskDuration" label="任务总时长" align="right" width="120"/> |
| | | <el-table-column prop="taskStaus" label="状态" align="center" > |
| | | <el-table-column prop="taskDuration" label="任务总时长" align="right" /> |
| | | <!-- <el-table-column prop="taskStaus" label="状态" align="center" > |
| | | |
| | | </el-table-column> |
| | | </el-table-column>--> |
| | | <zt-table-column-handle :table="table" |
| | | delete-perm="taskReliability::delete" width="100"/> |
| | | </el-table> |
| | |
| | | }, |
| | | openDialog() { |
| | | if (this.dataForm.id) { |
| | | this.$refs.taskBinoParam.$refs.dialog.init(null, {taskId: this.dataForm.id}) |
| | | this.$refs.taskBinoParam.$refs.dialog.init(null, {taskId: this.dataForm.id,shipId :this.dataForm.productId}) |
| | | } else { |
| | | this.$alert("请选择具体任务") |
| | | } |
| | |
| | | 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() |
| | | }, |
| | | dataLoaded(dataList) { |
| | | this.selectTask(dataList[0]) |
| | | }, |
| | | tableRowClassName( |
| | | { |
| | | row, |
| | | rowIndex |
| | | }) { |
| | | if (row.id == this.currentId) { |
| | | if (row.id === this.currentId) { |
| | | return 'select-row'; |
| | | } else { |
| | | return 'not-select-row'; |