| | |
| | | <template #search> |
| | | <el-row :gutter="24"> |
| | | <el-col :span="6" class="search-data-flex"> |
| | | <span class="search-data-title">程序状态:</span> |
| | | <el-checkbox-group v-model="searchTreeData.programStatus"> |
| | | <span class="search-data-title w68">程序状态:</span> |
| | | <el-checkbox-group v-model="searchTreeData.programStatus" class="marginR12"> |
| | | <el-checkbox value="1" label="试切" /> |
| | | <el-checkbox value="2" label="固化" /> |
| | | <el-checkbox value="3" label="偏离" /> |
| | | </el-checkbox-group> |
| | | </el-col> |
| | | <el-col :span="6" class="search-data-flex"> |
| | | <el-col :span="4" class="search-data-flex"> |
| | | <span class="search-data-title">零组件号:</span> |
| | | <el-select v-model="searchTreeData.drawingNo" filterable remote reserve-keyword placeholder="零组件号" :remote-method="remoteMethod" :loading="searchLoading"> |
| | | <el-option v-for="item in drawingNoList" :key="item.value" :label="item.label" :value="item.value"/></el-select> |
| | |
| | | <span class="search-data-title">时间范围:</span> |
| | | <el-date-picker v-model="searchTreeData.createTime" type="daterange" start-placeholder="开始时间" end-placeholder="结束时间" :size="size" format="YYYY-MM-DD" value-format="YYYY-MM-DD" @change="createTimeChange"/><!--:disabled-date="disabledDate" 不需要禁用日期--> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-button type="primary" @click="searchTree"><el-icon class="el-icon--right" style="margin-right: 6px;"><Search /></el-icon>搜索</el-button> |
| | | <el-col :span="6" class="search-data-flex"> |
| | | <el-button type="primary" @click="searchTree" :loading="treeSearchLoad"><el-icon class="el-icon--right" style="margin-right: 6px;"><Search /></el-icon>搜索</el-button> |
| | | <el-button :icon="Delete" @click="setClearTree"><el-icon class="el-icon--right" style="margin-right: 6px;"><Delete /></el-icon>清空</el-button> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | data() { |
| | | let rejectText = '驳回';//+this.row.categoryName; |
| | | return { |
| | | treeSearchLoad: false, |
| | | drawingNoList: [], |
| | | searchLoading: false, |
| | | searchTreeData: { |
| | |
| | | return null; // 未找到 |
| | | }, |
| | | highlightTargetRow() { // 高亮目标行 |
| | | const targetName = this.search.name; |
| | | const targetName = this.searchTreeData.drawingNo; |
| | | this.targetRow = this.findTargetRow(this.treeData, targetName); |
| | | if (this.targetRow && this.$refs.crud) { |
| | | this.$refs.crud.setCurrentRow(this.targetRow); // 高亮目标行 |
| | |
| | | searchTree() { |
| | | if(this.searchTreeData.programStatus.length == 0) return; |
| | | if(this.searchTreeData.drawingNo == "") return; |
| | | |
| | | this.treeSearchLoad = true; |
| | | this.searchTreeData.status = this.searchTreeData.programStatus.join(); |
| | | axios({ |
| | | url: '/blade-mdm/program/node/search-list2', |
| | | method: 'get', |
| | | params: this.searchTreeData |
| | | }).then(res => { |
| | | this.treeSearchLoad = false; |
| | | if(res.data.data.length == 0) return; |
| | | this.option.defaultExpandAll = true; |
| | | this.option.defaultExpandAll = true; |
| | | this.treeData = this.removeHasChildren(res.data.data); |
| | | this.$nextTick(() => { |
| | | this.highlightTargetRow(); // 设置当前行高亮 |
| | |
| | | font-size: 12px; |
| | | margin-right: 8px; |
| | | display: inline-block; |
| | | width: 68px; |
| | | width: 95px; |
| | | } |
| | | .search-data-flex { |
| | | display: flex!important; |
| | | align-items: center; |
| | | } |
| | | .w68 { |
| | | width: 68px; |
| | | } |
| | | .marginR12 label { |
| | | margin-right: 12px; |
| | | } |
| | | </style> |