田源
2023-07-12 99a6eb4e06c930f00bbf05348e53f38b65969ecd
整合7-12代码
已修改5个文件
277 ■■■■ 文件已修改
Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue 176 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Tree/attrCrud.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Tree/classifyTrees.vue 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/vue.config.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue
@@ -1,103 +1,91 @@
<template>
  <basic-container>
    <div class="main">
    <div class="top">
      <div class="testbox">
        <div>
          <!-- <el-button plain size="small" type="primary" @click="addvisible = true">增加
          </el-button>
          <el-button plain size="small" type="primary" @click="editHandler">编辑
          </el-button>
          <el-button plain size="small" type="primary" @click="openBatchImport('batchImportApply')">批量导入申请</el-button>
          <el-button plain size="small" type="primary" @click="openBatchImport('historyImport')">历史数据导入</el-button>
          <el-button plain size="small" type="primary" @click="openBatchImport('batchApplyCode')">批量申请编码</el-button>
          <el-button plain size="small" type="primary">批量发布</el-button>
          <el-button plain size="small" type="primary">查看流程历史</el-button>
          <el-button plain size="small" type="primary">删除</el-button>
          <el-button plain size="small" type="primary" @click="setHandler">发布</el-button>
          <el-button plain size="small" type="primary" @click="DataChange">数据更改</el-button>
          <el-button plain size="small" type="primary" @click="huishouHandler">回收</el-button>
          <el-button plain size="small" type="primary" @click="openD">导出
          </el-button>
          <el-button plain size="small" type="primary" @click="findHandler">查询
          </el-button>
          <el-button plain size="small" type="primary" @click="similarHandler">相似项查询</el-button>
          <el-button plain size="small" type="primary">刷新</el-button>
          <el-input placeholder="请输入关键字按回车查询" size="small"
            style="width: 180px; margin-left: 5px; margin-top: 10px"></el-input> -->
    <div class="testbox">
      <div>
        <!-- <el-button plain size="small" type="primary" @click="addvisible = true">增加
        </el-button>
        <el-button plain size="small" type="primary" @click="editHandler">编辑
        </el-button>
        <el-button plain size="small" type="primary" @click="openBatchImport('batchImportApply')">批量导入申请</el-button>
        <el-button plain size="small" type="primary" @click="openBatchImport('historyImport')">历史数据导入</el-button>
        <el-button plain size="small" type="primary" @click="openBatchImport('batchApplyCode')">批量申请编码</el-button>
        <el-button plain size="small" type="primary">批量发布</el-button>
        <el-button plain size="small" type="primary">查看流程历史</el-button>
        <el-button plain size="small" type="primary">删除</el-button>
        <el-button plain size="small" type="primary" @click="setHandler">发布</el-button>
        <el-button plain size="small" type="primary" @click="DataChange">数据更改</el-button>
        <el-button plain size="small" type="primary" @click="huishouHandler">回收</el-button>
        <el-button plain size="small" type="primary" @click="openD">导出
        </el-button>
        <el-button plain size="small" type="primary" @click="findHandler">查询
        </el-button>
        <el-button plain size="small" type="primary" @click="similarHandler">相似项查询</el-button>
        <el-button plain size="small" type="primary">刷新</el-button>
        <el-input placeholder="请输入关键字按回车查询" size="small"
          style="width: 180px; margin-left: 5px; margin-top: 10px"></el-input> -->
      </div>
      <el-row style="height: 700px; width: 100%">
        <div>
          <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
            }}
          </el-button>
          <el-input v-model="WupinFindValue" placeholder="请输入关键字按回车查询"
                    size="small" style="width: 180px; margin-left: 5px; margin-top: 10px"></el-input>
        </div>
        <el-row style="height: 700px; width: 100%">
          <div>
            <el-button v-for="(item, index) in masterVrBtnList" :key="index" plain size="small" type="primary"
                       @click="handelBtnClick(item)">{{
                item.name
              }}
            </el-button>
            <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" max-height="700" style=""
                    @cell-click="handleCellClick" @row-click="handleRowClick" @selection-change="handleSelectionChange" @select="handleSelection" @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>
            <el-table-column v-for="item in this.tableHeadFindData" :key="item.id" :formatter="item.formatter" :label="item.label"
                             :prop="item.prop" :show-overflow-tooltip="true"
                             :sortable="item.sortable"
                             :width="item.label.length >= 4 ? '150' : item.label.length == 3 ? '120' : '90'"
                             align="center">
            </el-table-column>
          </el-table>
        </el-row>
        <FormTemplateDialog :codeClassifyOid="this.codeClassifyOid" :codeRuleOid="this.codeRuleOid"
                            :disabledProp="disabledProp" :templateOid="templateOid" :visible.sync="addvisible" type="add"
                            @submit="AddSumbit">
        </FormTemplateDialog>
        <FormTemplateDialog :codeClassifyOid="this.codeClassifyOid" :codeRuleOid="this.codeRuleOid"
                            :disabledProp="disabledProp" :rowOid="rowOid" :templateOid="templateOid" :title="'修改编码信息'"
                            :visible.sync="editvisible"
                            type="edit" @submit="EditSumbit"></FormTemplateDialog>
        <FormTemplateDialog :codeClassifyOid="this.codeClassifyOid" :codeRuleOid="this.codeRuleOid"
                            :disabledProp="disabledProp" :rowOid="rowOid" :templateOid="templateOid" :title="'已发布数据更改'"
                            :type="edit"
                            :visible.sync="DataVisible"></FormTemplateDialog>
        <set-personnel :parameter="this.parameter" :visible.sync="visibleFlow"></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>
        <ResembleQueryDialog :codeClassifyOid="codeClassifyOid" :codeRuleOid="this.codeRuleOid" :rowOid="rowOid"
                             :templateOid="templateOid" :visible.sync="similarVisible"></ResembleQueryDialog>
      </div>
      <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"
                       @size-change="handleSizeChange"
                       @current-change="handleCurrentChange">
        </el-pagination>
      </div>
      <BatchImport v-if="batchImportData.visible" v-bind="batchImportData" :visible.sync="batchImportData.visible">
      </BatchImport>
        <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">
          <el-table-column fixed type="selection" width="55"></el-table-column>
          <el-table-column fixed label="序号" type="index" width="55">
          </el-table-column>
          <el-table-column v-for="item in this.tableHeadFindData" :key="item.id" :formatter="item.formatter" :label="item.label"
                           :prop="item.prop" :show-overflow-tooltip="true"
                           :sortable="item.sortable"
                           :width="item.label.length >= 4 ? '150' : item.label.length == 3 ? '120' : '90'"
                           align="center">
          </el-table-column>
        </el-table>
      </el-row>
      <FormTemplateDialog :codeClassifyOid="this.codeClassifyOid" :codeRuleOid="this.codeRuleOid"
                          :disabledProp="disabledProp" :templateOid="templateOid" :visible.sync="addvisible" type="add"
                          @submit="AddSumbit">
      </FormTemplateDialog>
      <FormTemplateDialog :codeClassifyOid="this.codeClassifyOid" :codeRuleOid="this.codeRuleOid"
                          :disabledProp="disabledProp" :rowOid="rowOid" :templateOid="templateOid" :title="'修改编码信息'"
                          :visible.sync="editvisible"
                          type="edit" @submit="EditSumbit"></FormTemplateDialog>
      <FormTemplateDialog :codeClassifyOid="this.codeClassifyOid" :codeRuleOid="this.codeRuleOid"
                          :disabledProp="disabledProp" :rowOid="rowOid" :templateOid="templateOid" :title="'已发布数据更改'"
                          :type="edit"
                          :visible.sync="DataVisible"></FormTemplateDialog>
      <set-personnel :parameter="this.parameter" :visible.sync="visibleFlow"></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>
      <ResembleQueryDialog :codeClassifyOid="codeClassifyOid" :codeRuleOid="this.codeRuleOid" :rowOid="rowOid"
                           :templateOid="templateOid" :visible.sync="similarVisible"></ResembleQueryDialog>
    </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 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"
                     @size-change="handleSizeChange"
                     @current-change="handleCurrentChange">
      </el-pagination>
    </div>
    </div>
    <BatchImport v-if="batchImportData.visible" v-bind="batchImportData" :visible.sync="batchImportData.visible">
    </BatchImport>
  </basic-container>
</template>
<script>
import {MasterTable, TableData, FindData} from "@/api/GetItem";
import {MasterTable, TableData, FindData,addSaveCode,editSaveCode} 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: {
@@ -105,7 +93,7 @@
    SetPersonnel,
    ResembleQueryDialog,
    BatchImport,
    fileInHtml
    // fileInHtml
  },
  name: "Crud.vue",
  props: {
@@ -166,7 +154,6 @@
        }
      },
      visibleNames:[],
      visibleFile:false,
      visibleFlow: false,
      transferData: [],
      transferProps: {
@@ -220,8 +207,7 @@
      }
    };
  },
  computed: {
  },
  computed: {},
  created() {
  },
  mounted() {
@@ -515,11 +501,21 @@
      }
    },
    //增加保存
    AddSumbit() {
    AddSumbit(val) {
      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
Source/UBCS-WEB/src/components/Tree/attrCrud.vue
@@ -1,7 +1,7 @@
<template>
  <div>
    <div style="display: flex;flex-wrap: wrap;" v-if="this.crudArrayFlag">
      <el-button-group>
      <!--新增-->
      <el-button v-if="attrEditVisible == false && attrFlagChiledren==false" size="small" type="primary" icon="el-icon-plus" @click="busineHandle">添加 {{ msg }}</el-button>
      <!--        全屏编辑-->
@@ -10,8 +10,8 @@
      <el-button icon="el-icon-info" size="small" @click="ruleAddHandler">验证规则</el-button>
      <!--        属性分组-->
      <el-button icon="el-icon-menu" size="small" @click="attrVisibleHandle">属性分组</el-button>
      </el-button-group>
      <el-button-group>
      <!--        分类注入-->
      <el-button icon="el-icon-magic-stick" size="small" @click="injectBtn">分类注入</el-button>
        <!--    组合规则-->
@@ -22,8 +22,8 @@
      <el-button size="small" @click="CascadeHandle">级联属性</el-button>
      <!--    预览排序-->
        <el-button size="small" @click="orderHandle" icon="el-icon-arrow-down">预览排序</el-button>
      </el-button-group>
      <el-button-group>
      <!--    保存-->
      <el-button size="small" @click="addsHandler" icon="el-icon-check">保存</el-button>
      <!--    删除-->
@@ -32,7 +32,7 @@
      <el-button size="small" @click="reset" icon="el-icon-refresh-right">重置</el-button>
      <!--    同步到其他模板-->
      <el-button size="small"@click="syncHandle" icon="el-icon-share">同步到其他模板</el-button>
      </el-button-group>
      <!--    编码申请预览-->
      <el-button size="small" @click="applicationHandle" style="">编码申请预览</el-button>
      <!--        验证规则-->
Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue
@@ -94,7 +94,7 @@
        </template>
        <avue-crud :data="BtmData" :option="masterOption" @select="btmSelect"></avue-crud>
        <div style="height: 30px">
          <div style="display: inline-block;float: left;border: 1px solid #eee;padding: 5px;margin-top: 5px;font-size: 14px " >已设置的值为:[{{this.loneTreeNewForm.btmtypename}}]</div>
          <div style="display: inline-block;float: left;border: 1px solid #eee;padding: 5px;margin-top: 5px;font-size: 14px " >已设置的值为:[{{this.loneTreeNewForm.btmTypeName}}]</div>
          <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden" >
            <el-button type="primary" size="small" @click="btmHandlerClick">确定</el-button>
            <el-button  size="small" @click="BtmdialogVisible=false">取消</el-button>
@@ -226,7 +226,7 @@
          },
          {
            label: '存储的业务类型',
            prop: 'btmtypename',
            prop: 'btmTypeName',
            labelWidth:128,
            disabled: true,
            rules: [{
@@ -294,7 +294,7 @@
            },
            {
              label: '存储的业务类型',
              prop: 'btmtypename',
              prop: 'btmTypeName',
              labelWidth:128,
              focus:this.btmFoucus,
                // readonly: true,
@@ -355,6 +355,8 @@
      TreeEditSave(this.loneTreeNewForm).then(res=>{
        this.$message.success('修改成功');
        this.Editclose()
        this.$emit('referTreeForm');
        this.$emit('flushed');
        done()
      })
    },
@@ -540,8 +542,8 @@
      }else {
        this.BtmdialogVisible=false;
        this.btmSelectList=[]
        this.$set(this.loneTreeNewForm,'btmtypename',this.btmName ||this.btmOid)
        this.$set(this.loneTreeNewForm,'btmtypeid',this.btmOid)
        this.$set(this.loneTreeNewForm,'btmTypeName',this.btmName ||this.btmOid)
        this.$set(this.loneTreeNewForm,'btmTypeid',this.btmOid)
        this.$emit('MasterHandler',this.loneTreeNewForm)
      }
    },
Source/UBCS-WEB/src/components/Tree/classifyTrees.vue
@@ -6,13 +6,19 @@
      <basic-container style="height: 85vh; max-height: 155vh; overflow-y: scroll;">
        <div>
        <div>
          <div style="display: flex;justify-content: space-around">
            <el-button plain size="small" type="primary" @click="TreeAdd">添加</el-button>
            <el-button plain size="small" type="primary" @click="TreeEdit">修改</el-button>
            <el-button plain size="small" type="primary" @click="TreeDel">删除</el-button>
<!--            <el-button plain size="small" type="primary" @click="ExportExcel">导出</el-button>-->
<!--            <el-button plain size="small" type="primary" @click="ImportExcel">导入</el-button>-->
            <el-button plain size="small" type="primary" @click="flushed">刷新</el-button>
          <div style="display: flex; flex-direction: column;">
            <div style="display: flex;">
              <el-button plain size="small" type="primary" @click="TreeAdd">添加</el-button>
              <el-button plain size="small" type="primary" @click="TreeEdit">修改</el-button>
              <el-button plain size="small" type="primary" @click="TreeDel">删除</el-button>
              <el-button plain size="small" type="primary" @click="flushed">刷新</el-button>
            </div>
            <div style="display: flex; margin-top: 10px">
              <el-button plain size="small" type="primary" @click="Enable">启用</el-button>
              <el-button plain size="small" type="primary" @click="Deactivate">停用</el-button>
              <el-button plain size="small" type="primary" @click="ImportExcel">导入</el-button>
              <el-button plain size="small" type="primary" @click="ExportExcel">导出</el-button>
            </div>
          </div>
          <div style="display: flex;justify-content: space-around;margin-top: 5px;margin-bottom: 5px">
          </div>
@@ -52,7 +58,7 @@
        </el-dialog>
        <!--        修改对话框-->
        <el-dialog :visible.sync="TreeEditFormVisible" append-to-body title="修改分类">
          <classifyTreeform ref="childForm" :loneTreeNewForm="TreeList" :nodeList="nodeList" :flag="'edit'" @MasterHandler="MasterHandler" :Editclose=" ()=>{TreeEditFormVisible=false}" :TreeFlag="TreeFlagCode" ::nodeClickList="nodeClickList"></classifyTreeform>
          <classifyTreeform ref="childForm" :loneTreeNewForm="TreeList" :nodeList="nodeList" :flag="'edit'" @MasterHandler="MasterHandler" :Editclose=" ()=>{TreeEditFormVisible=false}" :TreeFlag="TreeFlagCode" ::nodeClickList="nodeClickList" @referTreeForm="referTreeForm" @flushed="flushed"></classifyTreeform>
        </el-dialog>
        <avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="CloneTreedata" :defaultExpandAll="false"
                   :option="Treeoption"
@@ -73,7 +79,7 @@
        </span>
        <span v-else-if="type.prop==='tab2'">
            <basic-container>
               <avue-crud v-model="crudForm" v-loading="FormLoing" :data="this.Formlist" :option="this.crudTreeOption"
               <avue-crud ref="textCrud" v-model="crudForm" v-loading="FormLoing" :data="this.Formlist" :option="this.crudTreeOption"
                          @row-save="CrudRowSave"
                          @row-del="CrudRowDel"
                          @row-update="CrudRowUpdata"
@@ -83,8 +89,6 @@
            <template slot="menuLeft">
              <el-button plain size="small" type="primary" @click="FindeHanler">查询</el-button>
              <el-button plain size="small" type="primary" @click="TemRefresh">刷新</el-button>
            <el-button plain size="small" type="primary" @click="Enable">启用</el-button>
            <el-button plain size="small" type="primary" @click="Deactivate">停用</el-button>
              <el-button plain size="small" type="primary" @click="CloneBtn">从其它模板克隆</el-button>
              <!--              查询对话框-->
           <el-dialog :visible.sync="FindFormVisible" append-to-body title="高级查询">
@@ -145,6 +149,7 @@
                            <avue-crud v-model="ClonecrudForm" v-loading="FormLoing" :data="this.CloneFormlist"
                                       :option="this.ClonecrudTreeOption"
                                       @selection-change="selectionChange"
                            ></avue-crud>
                         </div>
                       </el-main>
@@ -165,7 +170,16 @@
                    </el-dialog>
                </el-dialog>
            </template>
                  <template #menu="{ size, row }">
                  <template #menu="{ size, row ,index}">
                    <el-button type="text"
                               v-if="row.lcStatus != 'Released'"
                               icon="el-icon-edit-outline "
                                :size="size"
                                @click="$refs.textCrud.rowEdit(row)">编辑</el-button>
                    <el-button type="text"
                               icon="el-icon-delete"
                               :size="size"
                               @click="$refs.textCrud.rowDel(row,index)">删除</el-button>
                <el-button
                  v-show="row.lcStatus === 'Released'"
                  @click="upAndStopAndStart(row, 'upVersion')"
@@ -326,7 +340,7 @@
  //使用inject接收参数
  //Treeoption左侧树新增表单项 Treedata左侧树节点 配置项 crudTreeOption右侧表格配置项 crudTreeData右侧表格显示内容
  //Treeform右侧表单配置项
  inject: [, "crudTreeData"],
  inject: ["crudTreeData"],
  data() {
    return {
      //树节点显示隐藏
@@ -621,7 +635,9 @@
          funAPi: startRelease,
          load: 'startReleaseLoad'
        }
      }
      },
      //模板管理编辑
      showEditBtn:false,
    }
  },
  //tab栏默认是表格
@@ -634,9 +650,7 @@
        this.$refs.tree.setCurrentKey(null)
        this.nodeClickList = {}
        this.TreeList=[]
        this.TreeFlagCode=false
        console.log('后TreeList',this.TreeList)
        console.log('后nodeClickList',this.nodeClickList)
        this.TreeFlagCode=false;
      }
    }, true)
  },
@@ -648,6 +662,8 @@
        height:180,
        selection:true,
        addBtn:this.Formlist.length<=0  && this.nodeClickList != "",
        editBtn:false,
        delBtn:false,
        column: [
          {
            label: "模板编号",
@@ -686,6 +702,10 @@
    }
  },
  methods: {
    //模板管理已发布编辑
    // checkShowEditBtn() {
    //   this.showEditBtn = this.Formlist.some(item => item.lcStatus === 'Released');
    // },
    //编码规则失焦
    CodeFoucus(){
      this.MasterdialogVisible=true;
@@ -1129,16 +1149,17 @@
              this.codeClassifyOid = item.codeclassifyoid
              return item.codeclassifyoid == this.nodeClickList.oid
            }
            console.log('Formlist',this.Formlist)
          })
        }).catch(res => {
          this.$message.error(res)
        })
        //  基本信息表单数据
        await getObjectByOid(this.nodeClickList.oid).then(res => {
          this.TreeList = res.data.data;
        }).catch(res => {
          this.$message.error(res)
        })
          await getObjectByOid(this.nodeClickList.oid).then(res => {
            this.TreeList = res.data.data;
          }).catch(res => {
            this.$message.error(res)
          })
      } catch (error) {
        this.$message.error(error)
      }
@@ -1146,6 +1167,14 @@
    treeClick(e) {
      console.log(e);
    },
    //基本信息表单刷新
    referTreeForm(){
       getObjectByOid(this.nodeClickList.oid).then(res => {
        this.TreeList = res.data.data;
      }).catch(res => {
        this.$message.error(res)
      })
    },
    //克隆模板树的点击切换数据
    async ClonenodeClick(data){
      this.ClonenodeClickList=data;
Source/UBCS-WEB/vue.config.js
@@ -26,10 +26,10 @@
    proxy: {
      '/api': {
        //本地服务接口地址
        target: 'http://localhost:37000',
        // target: 'http://localhost:37000',
        // target: 'http://192.168.1.51:37000',
        // target: 'http://192.168.1.46:37000',
        // target: 'http://dev.vci-tech.com:37000',
        target: 'http://dev.vci-tech.com:37000',
        // target: 'http://192.168.1.51:37000/',
        // target: 'http://192.168.1.104:37000',
        // target: 'http://192.168.1.63:37000',