| | |
| | | <template> |
| | | <div class="processPage"> |
| | | <div class="roleContainer"> |
| | | <div class="addRoute">+新建工艺路线</div> |
| | | <div class="addRoute" @click="addRoute">+新建工艺路线</div> |
| | | <el-input v-model="keyword" size="small" prefix-icon="el-icon-search" placeholder="请输入名称" clearable @keyup.enter="searchBtn"></el-input> |
| | | <ul class="left-ul"> |
| | | <li v-for="(item,index) in leftData" :class="{active: item.active}" @click="changeTabaleLi(index)"> |
| | |
| | | </div> |
| | | <div class="process-main-tabs"> |
| | | <div class="process-main-header"> |
| | | <div class="main-header-label">工艺路线<span>{{leftData[0].name}}</span></div> |
| | | <div class="main-header-label">工艺路线<span>{{productName}}</span></div> |
| | | <div style="padding: 20px;border-bottom: 1px solid #dee;"> |
| | | <div class="main-info"> |
| | | <div class="info-top-title">工艺路线版本</div> |
| | |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div class="btn-box vistion-button"> |
| | | <div class="btn-box vistion-button" v-for="item in detail.dtos"> |
| | | <span class="vistion-button-round"></span> |
| | | <span class="vistion-button-name">V001</span> |
| | | <el-tooltip trigger="click" class="detail-item" effect="dark" :content="vHtml" placement="bottom" raw-content> |
| | | <span class="vistion-button-name" @click="showDetail(item)">{{item.name}}</span> |
| | | </el-tooltip> |
| | | <el-icon class="vistion-button-icon"><DocumentCopy /></el-icon> |
| | | <el-icon class="vistion-button-icon"><Delete /></el-icon> |
| | | </div> |
| | | <div class="btn-box most-vision">更多版本...</div> |
| | | <el-button>+ 添加新版本</el-button> |
| | | <div class="btn-box most-vision" @click="changeV">{{changVTitle}}</div> |
| | | <el-button @click="addVision">+ 添加新版本</el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- <el-dialog title="" v-model="visible" :width="360" class="visible-model"> |
| | | <el-form :model="routeForm" :rules="routeRules" ref="dialogForm" label-width="120px" |
| | | label-position="center"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="工艺路线版本" prop="test"> |
| | | <el-select v-model="routeForm.test" style="width: 100%" placeholder="请选择"> |
| | | <el-option v-for="item in testList" :key="item.id" :label="item.title" :value="item.id"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <template #footer> |
| | | <el-button @click="visible = false">取消</el-button> |
| | | <el-button type="primary" :loading="isSaveing" @click="routeSubmit">确定</el-button> |
| | | </template> |
| | | </el-dialog> --> |
| | | </div> |
| | | <save-dialog v-if="dialog.save" ref="saveDialog" @success="addRouteSuccess" @closed="dialog.save=false"></save-dialog> |
| | | </template> |
| | |
| | | components: {...ElementPlusIconsVue,saveDialog}, |
| | | data() { |
| | | return { |
| | | id: "", |
| | | changVTitle: "更多版本...", |
| | | isMore: true, |
| | | productName: "", |
| | | vHtml: '', |
| | | detail: {dtos: [{name: ""}]}, |
| | | testList: [], |
| | | routeForm: { |
| | | test: "" |
| | |
| | | this.getLeftTree(); |
| | | }, |
| | | methods: { |
| | | addVision() { |
| | | this.$router.push({path: `/console/product-process/process-route/add-craft-version`,query: {id:this.id}}) |
| | | }, |
| | | addRoute() { |
| | | this.$router.push({path: `/console/product-process/process-route/add-craft`,query: {id:this.id}}) |
| | | }, |
| | | changeV() { |
| | | this.isMore = !this.isMore; |
| | | if(this.isMore) { |
| | | this.changVTitle = "更多版本..."; |
| | | }else { |
| | | this.changVTitle = "收起"; |
| | | } |
| | | }, |
| | | showDetail(item) { |
| | | this.$HTTP.get(`/api/blade-cps/production-craft-version/detail/${item.id}`).then(res=> { |
| | | if(res.code == 200) { |
| | | this.vHtml = `<ul class='detailUl'> |
| | | <li><span class='detailStyle'>名称</span><span>${res.data.name}</span></li> |
| | | <li><span class='detailStyle'>关联产线</span><span>${res.data.groupName}</span></li> |
| | | <li><span class='detailStyle'>描述</span><span>${res.data.description}</span></li> |
| | | <li><span class='detailStyle'>创建人</span><span>${res.data.createUser}</span></li> |
| | | <li><span class='detailStyle'>创建时间</span><span>${res.data.createTime}</span></li> |
| | | <li><span class='detailStyle'>修改人</span><span>${res.data.updateUser}</span></li> |
| | | <li><span class='detailStyle'>修改时间</span><span>${res.data.updateTime}</span></li> |
| | | </ul>` |
| | | } |
| | | }) |
| | | }, |
| | | table_edit(row){ |
| | | this.dialog.save = true |
| | | this.$HTTP.get(`/api/blade-cps/craft-routing/not-band-craft?craftId=${row.id}`).then(res=> { |
| | |
| | | this.leftData[index].active = true; |
| | | this.info = this.leftData[index]; |
| | | }, |
| | | getDetail(id) { |
| | | this.$HTTP.get(`/api/blade-cps/craft-routing/detail?id=${id}`).then(res=> { |
| | | if(res.code == 200) { |
| | | this.detail = res.data; |
| | | } |
| | | }) |
| | | }, |
| | | getLeftTree() { |
| | | var params = [{ |
| | | key: "name_like",value: "" |
| | |
| | | this.$HTTP.post("/api/blade-cps/craft-routing/list",{params}).then(res=> { |
| | | if(res.code == 200) { |
| | | this.leftData = res.data; |
| | | if(res.data) { |
| | | this.productName = res.data[0].name; |
| | | this.id = res.data[0].id; |
| | | } |
| | | this.getDetail(res.data[0].id); |
| | | } |
| | | }) |
| | | } |
| | |
| | | border-bottom: 1px solid #86bffa; |
| | | font-size: 14px; |
| | | font-weight: 700; |
| | | cursor: pointer; |
| | | } |
| | | .vistion-button { |
| | | border: 1px solid #86bffa; |
| | |
| | | } |
| | | .vistion-button-name { |
| | | vertical-align: middle; |
| | | cursor: pointer; |
| | | } |
| | | .vistion-button-round { |
| | | width: 10px; |
| | |
| | | margin-left: 20px; |
| | | } |
| | | </style> |
| | | <style> |
| | | .detailUl { |
| | | padding:20px 6px 8px; |
| | | } |
| | | .detailUl li{ |
| | | list-style: none; |
| | | margin-bottom: 8px; |
| | | } |
| | | .detailStyle { |
| | | display: inline-block; |
| | | width: 60px; |
| | | text-align: right; |
| | | margin-right:20px; |
| | | } |
| | | </style> |