Crunchy
2025-04-29 e5454b769d44a34af423bf87ac8a740bf8c20341
src/views/CNAS/resourceDemand/facilitiesEnvironment/component/three-wastes-treatment.vue
@@ -1,28 +1,27 @@
<template>
  <div class="capacity-scope">
    <div class="search">
      <div>
        <el-form :model="searchForm" ref="searchForm" size="small" :inline="true">
          <el-form-item label="备注" prop="remark">
              <el-input size="small" placeholder="请输入" clearable v-model="searchForm.remark">
              </el-input>
          </el-form-item>
          <el-form-item>
              <el-button type="primary" icon="el-icon-search" size="mini" @click="searchList">查 询</el-button>
              <el-button icon="el-icon-refresh" size="mini" @click="resetSearchForm">重 置</el-button>
          </el-form-item>
        </el-form>
  <div>
    <div style="display: flex;justify-content: space-between">
      <div style="display: flex;">
        <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
          <span style="width: 48px;font-size: 14px;font-weight: 700;color: #606266;">备注</span>
          <el-input size="small" placeholder="请输入" clearable v-model="searchForm.remark"
                    @keyup.enter.native="searchList"></el-input>
        </div>
        <div style="line-height: 30px;">
          <el-button type="primary" size="mini" @click="searchList">查询</el-button>
          <el-button size="mini" @click="resetSearchForm">重置</el-button>
        </div>
      </div>
      <div>
        <el-button size="medium" type="primary" @click="openFormDia('add')">新 增</el-button>
      <div style="line-height: 30px;">
        <el-button size="small" type="primary" @click="openFormDia('add')">新 增</el-button>
      </div>
    </div>
    <div class="table">
      <lims-table :tableData="tableData" :column="tableColumn" :height="'calc(100vh - 250px)'" @pagination="pagination"
                  :page="page" :tableLoading="tableLoading"></lims-table>
        :page="page" :tableLoading="tableLoading"></lims-table>
    </div>
    <three-wastes-dialog v-if="threeWastesDia" ref="threeWastesDia" @closeThreeWastesDia="closeThreeWastesDia"></three-wastes-dialog>
    <three-wastes-dialog v-if="threeWastesDia" ref="threeWastesDia"
      @closeThreeWastesDia="closeThreeWastesDia"></three-wastes-dialog>
  </div>
</template>
@@ -121,11 +120,11 @@
  // 方法集合
  methods: {
    // 查询列表
    searchList () {
    searchList() {
      this.tableLoading = true
      pageInternalWastes({...this.page,...this.searchForm}).then(res => {
      pageInternalWastes({ ...this.page, ...this.searchForm }).then(res => {
        this.tableLoading = false
        if (res.code === 200){
        if (res.code === 200) {
          this.tableData = res.data.records
          this.page.total = res.data.total
        }
@@ -135,16 +134,16 @@
      })
    },
    // 删除
    delPlan (row) {
    delPlan(row) {
      this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.tableLoading = true
        removeStandardSubstance({wastesId:row.wastesId}).then(res => {
        removeStandardSubstance({ wastesId: row.wastesId }).then(res => {
          this.tableLoading = false
          if (res.code === 200){
          if (res.code === 200) {
            this.$message.success('删除成功')
            this.searchList()
          }
@@ -160,27 +159,26 @@
      });
    },
    // 新增,编辑,批准弹框
    openFormDia (type, row) {
    openFormDia(type, row) {
      this.threeWastesDia = true
      this.$nextTick(() => {
        this.$refs.threeWastesDia.openDia(type, row)
      })
    },
    // 导出
    handleDown (row) {
      exportInternalWastes({wastesId:row.wastesId}).then(res =>{
    handleDown(row) {
      exportInternalWastes({ wastesId: row.wastesId }).then(res => {
        this.outLoading = false
        const blob = new Blob([res],{ type: 'application/msword' });
        const blob = new Blob([res], { type: 'application/msword' });
        this.$download.saveAs(blob, '三废处理导出.docx')
        this.$message.success('导出成功')
      })
    },
    closeThreeWastesDia () {
    closeThreeWastesDia() {
      this.threeWastesDia = false
      this.searchList()
    },
    // 重置查询条件
    resetSearchForm () {
    resetSearchForm() {
      this.searchForm.remark = '';
      this.searchList()
    },