245 lines
		
	
	
		
			6.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
			
		
		
	
	
			245 lines
		
	
	
		
			6.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
<template>
 | 
						|
  <BaseContainer>
 | 
						|
    <!-- 搜索框 -->
 | 
						|
    <template slot="search-container">
 | 
						|
      <el-form :inline="true" size="mini">
 | 
						|
        <el-form-item label="靶病灶">
 | 
						|
          <el-input
 | 
						|
            v-model="searchData.TargetLesion"
 | 
						|
            style="width:100px;"
 | 
						|
            clearable
 | 
						|
          />
 | 
						|
        </el-form-item>
 | 
						|
 | 
						|
        <el-form-item label="非靶病灶">
 | 
						|
          <el-input
 | 
						|
            v-model="searchData.NonTargetLesions"
 | 
						|
            style="width:100px;"
 | 
						|
            clearable
 | 
						|
          />
 | 
						|
        </el-form-item>
 | 
						|
        <el-form-item label="新病灶">
 | 
						|
          <el-input
 | 
						|
            v-model="searchData.NewLesion"
 | 
						|
            style="width:100px;"
 | 
						|
            clearable
 | 
						|
          />
 | 
						|
        </el-form-item>
 | 
						|
        <el-form-item label="整体疗效">
 | 
						|
          <el-input
 | 
						|
            v-model="searchData.OverallEfficacy"
 | 
						|
            style="width:100px;"
 | 
						|
            clearable
 | 
						|
          />
 | 
						|
        </el-form-item>
 | 
						|
        <el-form-item>
 | 
						|
          <el-button type="primary" icon="el-icon-search" size="mini" @click="handleSearch">
 | 
						|
            {{ $t('common:button:search') }}
 | 
						|
          </el-button>
 | 
						|
          <el-button type="primary" icon="el-icon-refresh-left" size="mini" @click="handleReset">
 | 
						|
            {{ $t('common:button:reset') }}
 | 
						|
          </el-button>
 | 
						|
        </el-form-item>
 | 
						|
      </el-form>
 | 
						|
      <span style="margin-left:auto">
 | 
						|
        <el-button
 | 
						|
          v-if="!isCompleteConfig"
 | 
						|
          type="primary"
 | 
						|
          size="mini"
 | 
						|
          @click="handleAdd"
 | 
						|
        >
 | 
						|
          {{ $t('common:button:new') }}
 | 
						|
        </el-button>
 | 
						|
      </span>
 | 
						|
 | 
						|
    </template>
 | 
						|
 | 
						|
    <template slot="main-container">
 | 
						|
      <!-- 受试者列表 -->
 | 
						|
      <el-table
 | 
						|
        ref="organList"
 | 
						|
        v-loading="loading"
 | 
						|
        v-adaptive="{bottomOffset:80}"
 | 
						|
        :data="list"
 | 
						|
        stripe
 | 
						|
        height="100"
 | 
						|
      >
 | 
						|
        <el-table-column type="index" width="90" />
 | 
						|
        <!-- 类型 -->
 | 
						|
        <el-table-column
 | 
						|
          prop="TargetLesion"
 | 
						|
          label="靶病灶"
 | 
						|
          show-overflow-tooltip
 | 
						|
        />
 | 
						|
        <!-- 部位 -->
 | 
						|
        <el-table-column
 | 
						|
          prop="NonTargetLesions"
 | 
						|
          label="非靶病灶"
 | 
						|
          show-overflow-tooltip
 | 
						|
        />
 | 
						|
        <el-table-column
 | 
						|
          prop="NewLesion"
 | 
						|
          label="新病灶"
 | 
						|
          show-overflow-tooltip
 | 
						|
        />
 | 
						|
        <el-table-column
 | 
						|
          prop="OverallEfficacy"
 | 
						|
          label="整体疗效"
 | 
						|
          show-overflow-tooltip
 | 
						|
        />
 | 
						|
 | 
						|
        <el-table-column
 | 
						|
          v-if="!isCompleteConfig"
 | 
						|
          :label="$t('common:action:action')"
 | 
						|
          width="200"
 | 
						|
          fixed="right"
 | 
						|
        >
 | 
						|
          <template slot-scope="scope">
 | 
						|
            <el-button
 | 
						|
              circle
 | 
						|
              title="编辑"
 | 
						|
              icon="el-icon-edit-outline"
 | 
						|
              @click="handleEdit(scope.row)"
 | 
						|
            />
 | 
						|
            <el-button
 | 
						|
              circle
 | 
						|
              title="删除"
 | 
						|
              icon="el-icon-delete"
 | 
						|
              @click="handleDelete(scope.row)"
 | 
						|
            />
 | 
						|
          </template>
 | 
						|
        </el-table-column>
 | 
						|
      </el-table>
 | 
						|
    </template>
 | 
						|
 | 
						|
    <!-- 新增/编辑 -->
 | 
						|
    <el-dialog
 | 
						|
      v-if="editDialog.visible"
 | 
						|
      :visible.sync="editDialog.visible"
 | 
						|
      :close-on-click-modal="false"
 | 
						|
      :title="editDialog.title"
 | 
						|
      width="500px"
 | 
						|
      custom-class="base-dialog-wrapper"
 | 
						|
      append-to-body
 | 
						|
    >
 | 
						|
      <EfficacyAssessmentForm
 | 
						|
        :data="rowData"
 | 
						|
        :criterion-id="criterionId"
 | 
						|
        @close="editDialog.visible = false"
 | 
						|
        @getList="getList"
 | 
						|
      />
 | 
						|
    </el-dialog>
 | 
						|
 | 
						|
  </BaseContainer>
 | 
						|
</template>
 | 
						|
<script>
 | 
						|
import { getTumorAssessmentList, deleteTumorAssessment } from '@/api/dictionary'
 | 
						|
import BaseContainer from '@/components/BaseContainer'
 | 
						|
import EfficacyAssessmentForm from './EfficacyAssessmentForm'
 | 
						|
const searchDataDefault = () => {
 | 
						|
  return {
 | 
						|
    CriterionId: '',
 | 
						|
    TargetLesion: '',
 | 
						|
    NonTargetLesions: '',
 | 
						|
    NewLesion: '',
 | 
						|
    OverallEfficacy: ''
 | 
						|
  }
 | 
						|
}
 | 
						|
export default {
 | 
						|
  name: 'EfficacyAssessmentList',
 | 
						|
  components: { BaseContainer, EfficacyAssessmentForm },
 | 
						|
  props: {
 | 
						|
    criterionId: {
 | 
						|
      type: String,
 | 
						|
      required: true
 | 
						|
    },
 | 
						|
    isCompleteConfig: {
 | 
						|
      type: Boolean,
 | 
						|
      required: true
 | 
						|
    }
 | 
						|
  },
 | 
						|
  data() {
 | 
						|
    return {
 | 
						|
      searchData: searchDataDefault(),
 | 
						|
      loading: false,
 | 
						|
      list: [],
 | 
						|
      rowData: {},
 | 
						|
      editDialog: { title: '', visible: false },
 | 
						|
      criterions: []
 | 
						|
    }
 | 
						|
  },
 | 
						|
  watch: {
 | 
						|
    list() {
 | 
						|
      this.$nextTick(() => {
 | 
						|
        this.$refs.organList.doLayout()
 | 
						|
      })
 | 
						|
    }
 | 
						|
  },
 | 
						|
  mounted() {
 | 
						|
    this.getList()
 | 
						|
  },
 | 
						|
  methods: {
 | 
						|
    // 获取受试者列表
 | 
						|
    getList() {
 | 
						|
      this.loading = true
 | 
						|
      this.searchData.CriterionId = this.criterionId
 | 
						|
      getTumorAssessmentList(this.searchData).then(res => {
 | 
						|
        this.loading = false
 | 
						|
        this.list = res.Result
 | 
						|
      }).catch(() => { this.loading = false })
 | 
						|
    },
 | 
						|
    // 新增
 | 
						|
    handleAdd() {
 | 
						|
      this.rowData = { CriterionId: this.criterionId }
 | 
						|
      this.editDialog.title = '新增'
 | 
						|
      this.editDialog.visible = true
 | 
						|
    },
 | 
						|
    // 编辑
 | 
						|
    handleEdit(row) {
 | 
						|
      this.rowData = { ...row }
 | 
						|
      this.editDialog.title = '编辑'
 | 
						|
      this.editDialog.visible = true
 | 
						|
    },
 | 
						|
    // 删除
 | 
						|
    handleDelete(row) {
 | 
						|
      this.$confirm('是否确认删除', {
 | 
						|
        type: 'warning',
 | 
						|
        distinguishCancelAndClose: true
 | 
						|
      })
 | 
						|
        .then(() => {
 | 
						|
          this.loading = true
 | 
						|
          deleteTumorAssessment(row.Id)
 | 
						|
            .then(res => {
 | 
						|
              this.loading = false
 | 
						|
              if (res.IsSuccess) {
 | 
						|
                this.getList()
 | 
						|
                this.$message.success('删除成功!')
 | 
						|
              }
 | 
						|
            }).catch(() => { this.loading = false })
 | 
						|
        })
 | 
						|
    },
 | 
						|
    // 查询
 | 
						|
    handleSearch() {
 | 
						|
      // this.searchData.PageIndex = 1
 | 
						|
      this.getList()
 | 
						|
    },
 | 
						|
    // 重置
 | 
						|
    handleReset() {
 | 
						|
      this.searchData = searchDataDefault()
 | 
						|
      this.getList()
 | 
						|
    },
 | 
						|
    // 排序
 | 
						|
    handleSortByColumn(column) {
 | 
						|
      if (column.order === 'ascending') {
 | 
						|
        this.searchData.Asc = true
 | 
						|
      } else {
 | 
						|
        this.searchData.Asc = false
 | 
						|
      }
 | 
						|
      this.searchData.SortField = column.prop
 | 
						|
      this.searchData.PageIndex = 1
 | 
						|
      this.getList()
 | 
						|
    }
 | 
						|
  }
 | 
						|
}
 | 
						|
</script>
 |