XiaoRuby
2023-09-11 e0ff382cd71d451190021e3ed12af99b9a965ee9
src/components/view/standard-table/technology.vue
@@ -1,43 +1,34 @@
<template>
  <div class="standard">
    <div>
          <el-table :data="tableData" style="width: 100%;margin-bottom: 20px;" row-key="name" border
          <el-table :data="tableData" height="800" row-key="id" border
          :header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'left'}"
            @selection-change="handleSelectionChange" default-expand-all
            :tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
            <el-table-column type="selection" width="55">
            </el-table-column>
            <el-table-column type="index" width="50" label="序号">
            <el-table-column type="index" width="60" label="序号">
            </el-table-column>
            <el-table-column prop="father" label="工序" sortable width="200px">
              <template slot-scope="scope">
                    <el-tag v-if="scope.row.children" :type="scope.row.children ? 'primary' : 'success'">
                      <div class="firstDiv" :style="{ color: scope.row.children ? '#16a7ff' : '#58c173' }">
                        01
                      </div>
                    </el-tag>
                    <el-tag v-if="scope.row.children" type="primary">01</el-tag>
                    <span style="color: black">
                      {{ scope.row.father }}
                    </span>
            </template>
            </el-table-column>
            <el-table-column prop="name" sortable label="工艺名称">
            <el-table-column sortable label="工艺名称">
              <template slot-scope="scope">
                        <el-tag v-if="!scope.row.children">
                            <div class="firstDiv" :style="`color: ${scope.row.children? '#16a7ff' : '#58c173'}`">
                              02
                            </div>
                        </el-tag>
                        <span style="color: black">
                          {{ scope.row.name  }}
                        </span>
                        </template>
                <el-tag type="success" v-if="!scope.row.children">02</el-tag>
                <span style="color: black">{{ scope.row.name  }}</span>
              </template>
            </el-table-column>
            <el-table-column prop="dg" label="设备组">
            </el-table-column>
            <el-table-column prop="pq" label="生产定额">
            </el-table-column>
            <el-table-column prop="" label="操作">
              <el-butten style="color: rgb(137, 137, 229);">编辑</el-butten>
            <el-table-column label="操作">
              <el-button style="color: rgb(137, 137, 229);">编辑</el-button>
            </el-table-column>
          </el-table>
        </div>
@@ -53,7 +44,7 @@
    },
    props:['tableData','tableType'],
    created() {
      console.log(this.tableData,this.tableType)
      console.log(this.tableData)
    },
    mounted() {