田源
2023-07-18 0f82f4588e9d8ec8df06d7bc909b53506d4b2fef
Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue
@@ -38,7 +38,7 @@
              <el-input v-model="WupinFindValue" placeholder="请输入关键字按回车查询"
                        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" :height="tableHeight" style="min-height: 300px" ref="dataTable"
            <el-table v-if="tableData.length != 0" v-loading="isLoading" :data="tableData" :height="tableHeight" ref="dataTable"
                      @cell-click="handleCellClick" @row-click="handleRowClick" @select="handleSelection" @select-all="handleSelectionAll" @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">
@@ -67,15 +67,20 @@
                              :type="edit"
                              :visible.sync="DataVisible"></FormTemplateDialog>
<!--          发布-->
          <set-personnel :parameter="this.parameter" :visible.sync="visibleFlow"></set-personnel>
          <set-personnel :parameter="this.parameter" :visible.sync="visibleFlow" :title="title"></set-personnel>
<!--          停用-->
            <set-personnel :parameter="this.parameter" :visible.sync="visibleDeactivate" :title="title"></set-personnel>
<!--          启用-->
            <set-personnel :parameter="this.parameter" :visible.sync="visibleEnable" :title="title"></set-personnel>
<!--          回收-->
            <set-personnel :parameter="this.parameter" :visible.sync="visibleRecovery" :title="title"></set-personnel>
<!--          高级查询-->
          <advanced-query :options="this.options" :visible.sync="findvisible" @echoContion="echoContion"></advanced-query>
          <integration-transfer :data="transferData" :props="transferProps" :visible.sync="dialogPush"
                                @save="handelTransferSave"></integration-transfer>
<!--          导出-->
          <MasterTransfer :visible.sync="dialogPush" :tableHeadData="tableHeadFindData" :codeClassifyOid="codeClassifyOid"></MasterTransfer>
<!--          相似项-->
          <ResembleQueryDialog :codeClassifyOid="codeClassifyOid" :codeRuleOid="this.codeRuleOid" :rowOid="rowOid"
                               :templateOid="templateOid" :visible.sync="similarVisible"></ResembleQueryDialog>
        <div class="block" style="display: flex; justify-content: flex-end">
          <el-pagination :current-page="page.currentPage" :page-size="page.pageSizes" :page-sizes="page.pageSizes"
                         :total="page.total" layout="total, sizes, prev, pager, next, jumper"
@@ -166,7 +171,8 @@
      parameter: {
        ids: [],
        code: "",
        type: "PUBLIC",
        type: '',
        // this.visibleDeactivate ?'ENABLE':this.visibleEnable ? 'DISABLE' :this.visibleRecovery ? 'ROLLBACK' :'PUBLIC'
        template: "",
        vars: {
          codeClassifyOid: "",
@@ -174,7 +180,15 @@
        }
      },
      visibleNames:[],
      //发布
      visibleFlow: false,
      //停用
      visibleDeactivate:false,
      //启用
      visibleEnable:false,
      //回收
      visibleRecovery:false,
      title:'',
      transferData: [],
      transferProps: {
        key: "oid",
@@ -308,16 +322,6 @@
        this.$refs.dataTable.doLayout()
      }
    },
    // 发布
    setHandler() {
      if (this.selectRow.length <= 0) {
        this.$message.warning("请选择一条数据");
      } else {
        this.userName = localStorage.getItem("username");
        this.parameter.template = this.userName + "-发布" + "[物品]";
        this.visibleFlow = true;
      }
    },
    openVis(visible) {
      console.log(visible)
      this[visible] = true
@@ -334,9 +338,14 @@
        //  if(uniqueFlag === 'CODEEDIT') return this.openBatchImport('batchApplyCode')
        if (uniqueFlag === 'CODESTARTPROCESS') return this.setHandler()
        if (uniqueFlag === 'CODEUPREVISION') return this.DataChange()
        if (uniqueFlag === 'CODERECYCLE') return this.huishouHandler()
        if (uniqueFlag === 'CODEEXPORT') return this.openD()
        if (uniqueFlag === 'CODEQUERY') return this.findHandler()
        //停用
        if (uniqueFlag === 'CODEDISABLE') return this.Deactivate()
        //启用
        if (uniqueFlag === 'CODEENABLE') return this.Enable()
        //回收
        if (uniqueFlag === 'CODERECYCLE') return this.Recovery()
        //  相似项查询
        //  if(uniqueFlag === 'CODEEDIT') return this.similarHandler()
      });
@@ -360,6 +369,74 @@
    },
    rend() {
      this.tableData = this.tableHeadData;
    },
    // 发布
    setHandler() {
      // let EditFlag1=false
      // let EditFlag2=false
      // if(EditFlag1){
      //   this.$message.warning('只有状态是【编辑中】的数据才可以发起流程')
      // }else if(EditFlag2){
      //   this.$message.warning('您选择的数据全部为【编辑中】才可以发起流程')
      // }
      this.selectRow.forEach(item=>{
        if(this.selectRow.length === 1 && item.lcstatus !== "Editing"){
          this.$message.warning('只有状态是【编辑中】的数据才可以发起流程')
        }else if(item.lcstatus !== 'Editing'){
          this.$message.warning('您选择的数据全部为【编辑中】才可以发起流程')
        }else {
          this.userName = localStorage.getItem("username");
          this.parameter.template = this.userName + "-发布" + "[物品]";
          this.parameter.type='PUBLIC'
          this.title='流程审批'
          this.visibleFlow = true;
        }
      })
      // if (this.selectRow.length <= 0) {
      //   this.$message.warning("请选择一条数据");
      // } else {
      //   this.userName = localStorage.getItem("username");
      //   this.parameter.template = this.userName + "-发布" + "[物品]";
      //   this.parameter.type='PUBLIC'
      //   this.title='流程审批'
      //   this.visibleFlow = true;
      // }
    },
    //停用
    Deactivate(){
      if (this.selectRow.length <= 0) {
        this.$message.warning("请选择一条数据");
      }  else {
        this.userName = localStorage.getItem("username");
        this.parameter.template = this.userName + "-发布" + "[物品]";
        this.parameter.type='DISABLE'
        this.title='停用(冻结)编码数据'
        this.visibleDeactivate=true;
      }
    },
    //启用
    Enable(){
      if (this.selectRow.length <= 0) {
        this.$message.warning("请选择一条数据");
      } else {
        this.userName = localStorage.getItem("username");
        this.parameter.template = this.userName + "-发布" + "[物品]";
        this.parameter.type='ENABLE'
        this.title='启用(解冻)编码数据'
        this.visibleEnable=true;
      }
    },
    //回收
    Recovery(){
      if (this.selectRow.length <= 0) {
        this.$message.warning("请选择一条数据");
      } else {
        this.userName = localStorage.getItem("username");
        this.parameter.template = this.userName + "-发布" + "[物品]";
        this.parameter.type='ROLLBACK'
        this.title='回收编码数据'
        this.visibleRecovery=true;
      }
    },
    handleSizeChange(val) {
      this.isLoading = true;
@@ -483,7 +560,6 @@
    },
    //选择
    handleSelection(list, row) {
      debugger;
      this.fileOptions.ownbizOid = row.oid;
      this.fileOptions.ownbizBtm = row.btmname;