WXL
3 天以前 4c9fdc87987140e8b2c3f0dfc2f6608cdb6be774
src/views/business/allocation/index.vue
@@ -129,12 +129,38 @@
        </el-table-column>
        <el-table-column label="年龄" align="center" prop="age" width="80" />
        <el-table-column
          label="血型"
          align="center"
          prop="bloodtype"
          width="80"
        >
          <template slot-scope="scope">
            <dict-tag
              :options="dict.type.sys_BloodType"
              :value="scope.row.bloodtype"
            />
          </template>
        </el-table-column>
        <el-table-column
          label="疾病诊断"
          align="center"
          prop="diagnosisname"
          min-width="180"
          width="200"
          show-overflow-tooltip
        />
        <el-table-column
          label="捐献类型"
          align="center"
          prop="donationcategory"
          width="180"
        >
          <template slot-scope="scope">
            <dict-tag
              :options="dict.type.sys_DonationCategory"
              :value="scope.row.donationcategory"
            />
          </template>
        </el-table-column>
        <el-table-column
          label="分配状态"
          align="center"
@@ -178,7 +204,7 @@
        <el-table-column
          label="操作"
          align="center"
          width="210"
          min-width="180"
          fixed="right"
          class-name="small-padding fixed-width"
        >
@@ -187,24 +213,15 @@
              size="mini"
              type="text"
              icon="el-icon-view"
              @click="handleView(scope.row)"
              >详情</el-button
              @click.stop="handleView(scope.row)"
              >查看</el-button
            >
            <el-button
              size="mini"
              type="text"
              icon="el-icon-edit"
              @click="handleUpdate(scope.row)"
              >修改</el-button
            >
            <el-button
              size="mini"
              type="text"
              icon="el-icon-delete"
              style="color: #F56C6C"
              @click="handleDelete(scope.row)"
              :disabled="scope.row.allocationStatus === '2'"
              >删除</el-button
              @click.stop="handleUpdate(scope.row)"
              >编辑</el-button
            >
          </template>
        </el-table-column>
@@ -229,7 +246,7 @@
export default {
  name: "OrganAllocationList",
  components: { Pagination },
  dicts: ["sys_user_sex", "organ_allocation_status"],
  dicts: ["sys_user_sex", "organ_allocation_status", "sys_BloodType", "sys_DonationCategory"],
  data() {
    return {
      // 遮罩层
@@ -322,7 +339,7 @@
    handleView(row) {
      this.$router.push({
        path: "/case/allocationInfo",
        query: { id: row.id, infoid: row.infoid }
        query: { id: row.id, infoid: row.infoid, mode: "view" }
      });
    },
    // 新增按钮操作
@@ -331,9 +348,19 @@
    },
    // 修改按钮操作
    handleUpdate(row) {
      const selectedRow =
        row || (this.selectedRows.length === 1 ? this.selectedRows[0] : null);
      if (!selectedRow) {
        this.$message.warning("请选择一条记录");
        return;
      }
      this.$router.push({
        path: "/case/allocationInfo",
        query: { id: row.id, infoid: row.infoid }
        query: {
          id: selectedRow.id,
          infoid: selectedRow.infoid,
          mode: "edit"
        }
      });
    },
    // 删除按钮操作