fujunling
2023-07-13 4d46d3d70d2f38eebd2b861a97a9bf5ba9604ada
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">增加
@@ -27,7 +29,7 @@
      </div>
      <el-row style="height: 700px; width: 100%">
        <div>
          <el-button v-for="(item, index) in masterVrBtnList" :key="index" plain size="small" type="primary"
              <el-button v-for="(item, index) in masterVrBtnList" :key="index" plain size="small" type="primary" v-if="!['PREVIEW', 'DELETEFILE', 'revisefile', 'DOWNLOADFILE', 'UPLOADFILE'].includes(item.uniqueFlag)"
                     @click="handelBtnClick(item)">{{
              item.name
            }}
@@ -76,6 +78,15 @@
    </div>
    <BatchImport v-if="batchImportData.visible" v-bind="batchImportData" :visible.sync="batchImportData.visible">
    </BatchImport>
      </div>
      <div class="bottom">
        <el-collapse v-model="visibleNames">
          <el-collapse-item title="附件列表" name="1">
            <fileInHtml :options="fileOptions"></fileInHtml>
          </el-collapse-item>
        </el-collapse>
      </div>
    </div>
  </basic-container>
</template>
<script>
@@ -86,13 +97,15 @@
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: {
@@ -148,9 +161,11 @@
        type: "PUBLIC",
        template: "",
        vars: {
          codeClassifyOid: ""
          codeClassifyOid: "",
          templateOid:""
        }
      },
      visibleNames:[],
      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,8 @@
    templateOid: {
      handler(newval, oldval) {
        this.parameter.code = newval;
        this.fileOptions.ownbizOid="1";
        this.parameter.vars.templateOid = newval
      },
      deep: true,
    },
@@ -335,6 +359,10 @@
      this.editShow = column.property;
      this.rowOid = row.oid;
    },
    handleRowClick(row,column){
      this.fileOptions.ownbizOid= row.oid;
      this.fileOptions.ownbizBtm=row.btmname;
    },
    //删除
    enumDeleteRow(row) {
      this.tableData.splice(row, 1);
@@ -353,8 +381,7 @@
    CrudHeaderRend() {
      if (this.codeClassifyOid != "") {
        MasterTable({
          codeClassifyOid: this.codeClassifyOid,
          functionId: 5,
          codeClassifyOid: this.codeClassifyOid
        }).then((res) => {
          this.options = res.data.tableDefineVO.seniorQueryColumns;
          this.List = res.data.tableDefineVO.cols[0];
@@ -422,19 +449,18 @@
      });
    },
    //多选
    handleSelectionChange(row) {
      console.log(row)
      if (this.row) {
        this.rowOid = row[0].oid;
      } else {
        this.rowOid = "";
      }
      this.selectRow = row;
    handleSelectionChange(list) {
      this.selectRow = list;
      this.parameter.ids = [];
      row.forEach((item) => {
      list.forEach((item) => {
        this.parameter.ids.push(item.oid);
      });
      console.log('  this.parameter.ids', this.parameter.ids)
    },
    //选择
    handleSelection(list,row) {
      this.fileOptions.ownbizOid= row.oid;
      this.fileOptions.ownbizBtm=row.btmname;
    },
    //编辑
    editHandler() {
@@ -505,9 +531,9 @@
      })
    },
    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
    }
  },
};
@@ -518,6 +544,7 @@
  .el-table--scrollable-x .el-table__body-wrapper {
    overflow: auto !important;
  }
  .el-table__fixed-right-patch {
    background-color: #f5f7fa !important;
  }
@@ -526,4 +553,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>