lihang
2023-07-12 c101c2e06299dd4e89ea6a9fb6dbf9577be26088
Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue
@@ -1,5 +1,7 @@
<template>
  <basic-container>
    <div class="main">
    <div class="top">
    <div class="testbox">
      <div>
        <!-- <el-button plain size="small" type="primary" @click="addvisible = true">增加
@@ -36,7 +38,7 @@
                    size="small" style="width: 180px; margin-left: 5px; margin-top: 10px"></el-input>
        </div>
        <el-table v-if="tableData.length != 0" v-loading="isLoading" :data="tableData" max-height="700" style=""
                  @cell-click="handleCellClick" @selection-change="handleSelectionChange" @sort-change="sortChange">
                    @cell-click="handleCellClick" @row-click="handleRowClick" @selection-change="handleSelectionChange" @sort-change="sortChange">
          <el-table-column fixed type="selection" width="55"></el-table-column>
          <el-table-column fixed label="序号" type="index" width="55">
          </el-table-column>
@@ -76,23 +78,34 @@
    </div>
    <BatchImport v-if="batchImportData.visible" v-bind="batchImportData" :visible.sync="batchImportData.visible">
    </BatchImport>
    </div>
    <div class="bottom">
      <el-collapse v-model="visibleNames" accordion>
        <el-collapse-item title="附件列表" name="1">
          <fileInHtml :options="fileOptions"></fileInHtml>
        </el-collapse-item>
      </el-collapse>
    </div>
    </div>
  </basic-container>
</template>
<script>
import {MasterTable, TableData, FindData,addSaveCode,editSaveCode} from "@/api/GetItem";
import {MasterTable, TableData, FindData} from "@/api/GetItem";
import {listCodeAttributeByClassId} from "@/api/integration/integration.js";
import integrationTransfer from "@/views/integration/integrationTransfer";
import SetPersonnel from "@/components/template/SetPersonnel";
import ResembleQueryDialog from "@/components/FormTemplate/ResembleQueryDialog.vue";
import BatchImport from '@/components/BatchImport'
import {validatenull} from "@/util/validate";
import fileInHtml from "@/components/file/inHtml.vue";
export default {
  components: {
    integrationTransfer,
    SetPersonnel,
    ResembleQueryDialog,
    BatchImport
    BatchImport,
    fileInHtml
  },
  name: "Crud.vue",
  props: {
@@ -151,6 +164,8 @@
          codeClassifyOid: ""
        }
      },
      visibleNames:[],
      visibleFile:false,
      visibleFlow: false,
      transferData: [],
      transferProps: {
@@ -193,7 +208,15 @@
        codeClassifyOid: ''
      },
      // 主数据按钮
      masterVrBtnList: []
      masterVrBtnList: [],
      fileOptions:{
        ownbizOid:"1",
        ownbizBtm:"1",
        fileDocClassify:'!=processAuditSuggest',
        fileDocClassifyName:'',
        hasDownload:true,
        hasUpload:true
      }
    };
  },
  computed: {},
@@ -213,8 +236,7 @@
    codeClassifyOid: {
      handler(newval, oldval) {
        this.codeClassifyOid = newval;
        this.parameter.vars.codeClassifyOid = newval;
        console.log('子',newval)
        this.parameter.vars.codeClassifyOid = newval
      },
      deep: true,
    },
@@ -251,6 +273,7 @@
    templateOid: {
      handler(newval, oldval) {
        this.parameter.code = newval;
        this.fileOptions.ownbizOid="1";
      },
      deep: true,
    },
@@ -333,6 +356,10 @@
      this.editingRow = row;
      this.editShow = column.property;
      this.rowOid = row.oid;
    },
    handleRowClick(row,column){
      this.fileOptions.ownbizOid= row.oid;
      this.fileOptions.ownbizBtm=row.btmname;
    },
    //删除
    enumDeleteRow(row) {
@@ -422,7 +449,6 @@
    },
    //多选
    handleSelectionChange(row) {
      console.log(row)
      if (this.row) {
        this.rowOid = row[0].oid;
      } else {
@@ -434,6 +460,10 @@
        this.parameter.ids.push(item.oid);
      });
      console.log('  this.parameter.ids', this.parameter.ids)
      this.fileOptions.ownbizOid= row.oid;
      this.fileOptions.ownbizBtm=row.btmname;
    },
    //编辑
    editHandler() {
@@ -487,26 +517,16 @@
      }
    },
    //增加保存
    AddSumbit(val) {
    AddSumbit() {
      this.addvisible = false;
      console.log(val)
      addSaveCode(val).then(res=>{
        console.log(res)
        this.onLoad()
      })
    },
    EditSumbit(val) {
      this.editvisible = false;
      console.log(val)
      editSaveCode(val).then(res=>{
        console.log(res)
        this.onLoad()
      })
    },
    openBatchImport(type) {
      this.batchImportData.visible = true;
      this.batchImportData.type = type;
      this.batchImportData.codeClassifyOid = this.codeClassifyOid;
      this.batchImportData.visible = true
      this.batchImportData.type = type
      this.batchImportData.codeClassifyOid = this.codeClassifyOid
    }
  },
};
@@ -517,6 +537,7 @@
  .el-table--scrollable-x .el-table__body-wrapper {
    overflow: auto !important;
  }
  .el-table__fixed-right-patch {
    background-color: #f5f7fa !important;
  }
@@ -525,4 +546,21 @@
/deep/ .el-button {
  margin: 0 10px 10px 0;
}
.main {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 150px);
  min-height: 400px;
}
.top {
  overflow-y: scroll;
  min-height: 55%;
}
.bottom {
  margin-top: 20px;
  max-height: 43%;
  overflow-y: scroll;
}
</style>