1
lzhe
2024-09-30 1988d77f4df3c01a9137303e0c959b3442c14377
src/views/console/workstation/index.vue
@@ -48,7 +48,11 @@
                              <el-table-column type="selection" width="50"></el-table-column>
                              <el-table-column label="工位编号" prop="code" width="120"></el-table-column>
                              <el-table-column label="工位名称" prop="name" width="120"></el-table-column>
                              <el-table-column label="工位类型" prop="type" width="120"></el-table-column>
                              <el-table-column label="工位类型" prop="type" width="120">
                                 <template #default="scope">
                                    <span>{{ scope.row.type == '0' ? '机器' : '人工' }}</span>
                                 </template>
                              </el-table-column>
                              <el-table-column label="工位日历" prop="calendarName" width="120"></el-table-column>
                              <el-table-column label="操作" fixed="right" align="right" width="160">
                                 <template #default="scope">
@@ -71,8 +75,10 @@
                                 </template>
                              </el-table-column>
                           </scTable>
                           <div style="margin-left: 14px;flex: 1 1 auto;"
                              v-if="Object.keys(previewData).length > 0">
                           <div :style="{
                              'max-width': showTable ? '50%' : '100%', 'margin-left': '14px',
                              flex: '1 1 auto'
                           }" v-if="Object.keys(previewData).length > 0">
                              <div class="header">
                                 <el-icon @click="showTable = !showTable"
                                    style="font-size: 20px;cursor: pointer;margin-top: 10px;">
@@ -122,12 +128,12 @@
                                                <el-col :span="8">
                                                   {{ basic.machineBrand }}
                                                </el-col>
                                                <el-col :span="4">
                                                <!-- <el-col :span="4">
                                                   驱动名称
                                                </el-col>
                                                <el-col :span="8">
                                                   {{ basic.typeName }}
                                                </el-col>
                                                </el-col> -->
                                             </el-row>
                                          </el-main>
                                       </el-container>
@@ -135,13 +141,14 @@
                                          <el-header>
                                             <h2>采集信息</h2>
                                             <el-button v-show="list.length > 0"
                                                @click="() => { editFlag = !editFlag; }"
                                                @click="() => { editFlag = !editFlag; showTable = !editFlag }"
                                                style="margin-left: auto;" text type="primary"
                                                size="small">配置工位采集</el-button>
                                                size="small">{{ editFlag ? '取消' : '配置工位采集'
                                                }}</el-button>
                                             <el-button v-show="editFlag" @click="saveInfo" text
                                                type="primary" size="small">保存</el-button>
                                             <el-button text type="primary" size="small"
                                                @click="editDMP">修改DMP配置</el-button>
                                             <!-- <el-button text type="primary" size="small"
                                                @click="editDMP">修改DMP配置</el-button> -->
                                          </el-header>
                                          <el-main>
                                             <el-table :data="list" height="200px"
@@ -566,15 +573,18 @@
               let data = this.formatData(res.data)
               this.group = data
               this.showGrouploading = false
               console.log('>>>>>>>>>>>>>>>>>>>>>')
               // this.$nextTick(() => {
               if (!flag) {
                  debugger
                  let parent = res.data.filter(item => item.parentId == 0)[0]
                  this.treeCheckedNode = parent
                  this.treeCheckKey = parent.id
               } else {
                  let parent = res.data.filter(item => item.id == this.treeCheckedNode.id)[0]
                  this.treeCheckedNode = parent
                  this.treeCheckKey = parent.id
                  debugger
                  let parent = res.data.filter(item => item.parentId == 0)[0]
                  parent && (this.treeCheckedNode = parent)
                  parent && (this.treeCheckKey = parent.id)
               }
               // })
@@ -716,6 +726,7 @@
      saveInfo() {
         this.$HTTP.post('/api/blade-cps/workstation-wcs/save', this.workbenchVOList).then(res => {
            this.editFlag = false
            this.showTable = true
         })
      },
   }