| | |
| | | > |
| | | <template #search> |
| | | <el-row :gutter="24"> |
| | | <el-col :span="8" class="search-data-flex"> |
| | | <el-col :span="6" class="search-data-flex"> |
| | | <span class="search-data-title">程序状态:</span> |
| | | <el-checkbox-group v-model="searchTreeData.programStatus"> |
| | | <el-checkbox value="1" label="试切" /> |
| | |
| | | <el-checkbox value="3" label="偏离" /> |
| | | </el-checkbox-group> |
| | | </el-col> |
| | | <el-col :span="8" class="search-data-flex"> |
| | | <el-col :span="6" 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> |
| | | </el-col> |
| | | <el-col :span="8" class="search-data-flex"> |
| | | <span class="search-data-title">时间范围:</span> |
| | | <el-date-picker v-model="searchTreeData.createTime" type="daterange" range-separator="To" start-placeholder="开始时间" end-placeholder="结束时间" :size="size" format="YYYY-MM-DD" value-format="YYYY-MM-DD" :disabled-date="disabledDate" @change="createTimeChange"/> |
| | | <el-date-picker v-model="searchTreeData.createTime" type="daterange" start-placeholder="开始时间" end-placeholder="结束时间" :size="size" format="YYYY-MM-DD" value-format="YYYY-MM-DD" :disabled-date="disabledDate" @change="createTimeChange"/> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <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-button :icon="Delete" @click="setClearTree"><el-icon class="el-icon--right" style="margin-right: 6px;"><Delete /></el-icon>清空</el-button> |
| | | </el-col> |
| | |
| | | searchTree() { |
| | | if(this.searchTreeData.programStatus.length == 0) return; |
| | | if(this.searchTreeData.drawingNo == "") return; |
| | | this.searchTreeData.createTimeBegin = this.searchTreeData.createTime[0]; |
| | | this.searchTreeData.createTimeEnd = this.searchTreeData.createTime[1]; |
| | | this.searchTreeData.status = this.searchTreeData.programStatus.join(); |
| | | axios({ |
| | | url: '/blade-mdm/program/node/search-list2', |
| | | method: 'get', |
| | | params: this.searchTreeData, |
| | | params: this.searchTreeData |
| | | }).then(res => { |
| | | if(res.data.data.length == 0) return; |
| | | this.option.defaultExpandAll = true; |
| | |
| | | }, |
| | | getPre() { |
| | | alert(1) |
| | | } |
| | | }, |
| | | subtractMonths(date, months) { |
| | | const newDate = new Date(date); |
| | | const currentMonth = newDate.getMonth(); |
| | | newDate.setMonth(currentMonth - months); |
| | | return newDate; |
| | | }, |
| | | getBeginDate() { |
| | | var beginDate = this.subtractMonths(new Date(),3); |
| | | return `${beginDate.getFullYear()}-${(beginDate.getMonth() + 1).toString().padStart(2, '0')}-${beginDate.getDate().toString().padStart(2, '0')}`; |
| | | }, |
| | | getToday() { |
| | | let today = new Date(); |
| | | return `${today.getFullYear()}-${(today.getMonth() + 1).toString().padStart(2, '0')}-${today.getDate().toString().padStart(2, '0')}`; |
| | | |
| | | }, |
| | | }, |
| | | mounted() { |
| | | let b = this.getBeginDate() |
| | | this.defaultTimeRange = [b,this.getToday()]; |
| | | this.searchTreeData.createTime =[b,this.getToday()] |
| | | |
| | | this.tabsOption = this.tabsOption1; |
| | | //获取nodetype |
| | | axios({url: '/blade-system/dict-biz/dictionary?code=nc_node_type',method: 'get'}).then(res => { |