李林
2023-08-22 ea4e6ecc901cb22337712d51ee5a4fb208bf64ad
src/views/experiment/planAssignments/plan.vue
@@ -18,6 +18,15 @@
      padding: 15px;
      background-color: white;
      height: calc(100vh - 15vh);
      overflow-y: auto;
   }
   .order_num{
      border-radius: 1rem;
      width: 35px;
      height: 25px;
      text-align: center;
      margin-right: 8px;
   }
</style>
<style>
@@ -28,6 +37,7 @@
   .plan .cell {
      color: #333;
      display: flex;
   }
</style>
@@ -51,6 +61,14 @@
            <el-table-column type="index" width="50" label="序号">
            </el-table-column>
            <el-table-column prop="date" label="申请单号">
               <template slot-scope="scope">
                  <div style="display: flex;">
                     <div v-if="scope.row.code=='01'" style="color: #3caaff;background-color: #eff5ff;" class="order_num">01</div>
                     <div v-else-if="scope.row.code=='02'" style="color: #57c981;background-color: #f1fbf4;" class="order_num">02</div>
                     <div v-else-if="scope.row.code=='03'" style="color: #dfa8fb;background-color: #faf2ff;" class="order_num">03</div>
                     <div>{{scope.row.date}}</div>
                  </div>
               </template>
            </el-table-column>
            <el-table-column prop="name" label="检验结果">
            </el-table-column>
@@ -60,9 +78,9 @@
               <template slot-scope="scope">
                  <el-button size="mini" type="primary" v-if="isIfReport(scope.row)">上报</el-button>
                  <el-button size="mini" type="warning" @click="openUpDia(scope.row)"
                     v-else-if="scope.row.insId==undefined&&scope.row.address==null">分配</el-button>
                     v-else-if="scope.row.code=='03'&&scope.row.insId==undefined&&scope.row.address==null">分配</el-button>
                  <el-button size="mini" type="success" @click="openUpInsDia(scope.row)"
                     v-else-if="scope.row.insId==undefined&&scope.row.name==null">检验</el-button>
                     v-else-if="scope.row.code=='03'&&scope.row.insId==undefined&&scope.row.name==null">检验</el-button>
               </template>
            </el-table-column>
         </el-table>
@@ -159,8 +177,15 @@
                  id: 34,
                  date: '2016-05-01',
                  name: null,
                  res: '[{"number": 1,"res": "不合格"},{"number": 2}]',
                  address: '上海市普陀区金沙江路 1519 弄'
                  res: '[{"number": 1,"res": "不合格"},{"number": 3,"res": "不合格"}]',
                  address: '上海市普陀区金沙江路 1519 弄',
                  children: [{
                     id: 35,
                     date: 'hhh',
                     name: null,
                     res: '[{"number": 1},{"number": 2}]',
                     address: '上海市普陀区金沙江路 1519 弄'
                  }]
               }]
            }, {
               id: 2,
@@ -200,11 +225,16 @@
      methods: {
         selectDataList() {
            this.tableData.forEach(a => {
               a.code = '[1]'
               a.code = '01'
               if (a.children != undefined) {
                  a.children.forEach(b => {
                     b.code = '[2]'
                     b.res = JSON.parse(b.res)
                     b.code = '02'
                     if (b.children != undefined) {
                        b.children.forEach(c => {
                           c.code = '03'
                           c.res = JSON.parse(c.res)
                        })
                     }
                  })
               }
            })
@@ -252,4 +282,4 @@
         }
      }
   }
</script>
</script>