| | |
| | | > |
| | | <template #search> |
| | | <el-row :gutter="24"> |
| | | <el-col :span="6"> |
| | | <el-input v-model="search.name" placeholder="请输入节点名称" clearable/> |
| | | <el-col :span="8" 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="2" label="固化" /> |
| | | <el-checkbox value="3" label="偏离" /> |
| | | </el-checkbox-group> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-select v-model="search.nodeType" placeholder="请输入节点类型" clearable> |
| | | <el-option v-for="item in nodeTypeList" :key="item.dictValue" :label="item.dictValue" :value="item.dictKey"/>formApprove. |
| | | </el-select> |
| | | <el-col :span="8" 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="6"> |
| | | <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" @change="createTimeChange"/> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <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> |
| | |
| | | data() { |
| | | let rejectText = '驳回';//+this.row.categoryName; |
| | | return { |
| | | drawingNoList: [], |
| | | searchLoading: false, |
| | | searchTreeData: { |
| | | programStatus: [], |
| | | drawingNo: "", |
| | | createTime: [], |
| | | createTimeBegin: "", |
| | | createTimeEnd: "" |
| | | }, |
| | | drawingNo: '', |
| | | processNo: '', |
| | | processEdition: '', |
| | |
| | | modalTitle: "", |
| | | id: "", |
| | | parentId:1, |
| | | search: { |
| | | name: "", |
| | | nodeType: "" |
| | | }, |
| | | loading: true, |
| | | mypage: { |
| | | size: 10, |
| | |
| | | |
| | | }, |
| | | methods: { |
| | | createTimeChange(value) { |
| | | this.searchTreeData.createTimeBegin = value[0]; |
| | | this.searchTreeData.createTimeEnd = value[1]; |
| | | }, |
| | | remoteMethod(query) { |
| | | if (query) { |
| | | this.searchLoading = true; |
| | | axios({ |
| | | url: '/blade-mdm/program/node/drawing-no-pick', |
| | | method: 'get', |
| | | params: {drawingNo: query} |
| | | }).then(resp => { |
| | | this.searchLoading = false; |
| | | var drawingNoList = []; |
| | | resp.data.data.forEach(item=> { |
| | | drawingNoList.push({label: item,value: item}) |
| | | }) |
| | | this.drawingNoList = drawingNoList; |
| | | }); |
| | | }else { |
| | | this.drawingNoList = []; |
| | | } |
| | | }, |
| | | locked(row, isLock) { |
| | | row.isLocked == isLock |
| | | this.$confirm(`是否${isLock ? '解锁' : '锁定'}`, { |
| | |
| | | url: '/blade-mdm/flow/replace/start', |
| | | method: 'post', |
| | | data: obj |
| | | }).then( |
| | | resp => { |
| | | }).then(resp => { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '操作成功!', |
| | |
| | | url: '/blade-mdm/flow/replace/pre', |
| | | method: 'post', |
| | | params: {nodeId: row.id} |
| | | }).then( |
| | | resp => { |
| | | }).then(resp => { |
| | | this.row = row; |
| | | this.replaceDataId = resp.data.data.processInstanceId; |
| | | this.processNo = resp.data.data.processNo; |
| | |
| | | } |
| | | }, |
| | | searchTree() { |
| | | if(this.searchTreeData.programStatus.length == 0) return; |
| | | if(this.searchTreeData.drawingNo == "") return; |
| | | axios({ |
| | | url: '/blade-mdm/program/node/search-list', |
| | | method: 'get', |
| | | params: this.search, |
| | | params: this.searchTreeData, |
| | | }).then(res => { |
| | | if(res.data.data.length == 0) return; |
| | | this.option.defaultExpandAll = true; |
| | | this.treeData = this.removeHasChildren(res.data.data); |
| | | this.$nextTick(() => { |
| | |
| | | }, |
| | | setClearTree() { |
| | | this.option.defaultExpandAll = false; |
| | | this.searchTreeData = { |
| | | programStatus: [], |
| | | drawingNo: "", |
| | | createTime: [], |
| | | createTimeBegin: "", |
| | | createTimeEnd: "" |
| | | }; |
| | | this.treeData = []; |
| | | this.$nextTick(()=> { |
| | | this.onLoad(); |
| | |
| | | .code-box .el-drawer__header { |
| | | margin-bottom: 0; |
| | | } |
| | | .search-data-title { |
| | | font-size: 12px; |
| | | margin-right: 8px; |
| | | display: inline-block; |
| | | width: 68px; |
| | | } |
| | | .search-data-flex { |
| | | display: flex!important; |
| | | align-items: center; |
| | | } |
| | | </style> |