田源
2023-07-17 d7f731c2672c6af00065fcbd1c1164b8789442b8
7-17主数据导出-配置新按钮
已修改7个文件
已添加1个文件
233 ■■■■ 文件已修改
Source/UBCS-WEB/.gitignore 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue 111 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Master/MasterTransfer.vue 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Master/MasterTree.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Tree/attrCrud.vue 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/template/SetPersonnel.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/main.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/vue.config.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/.gitignore
@@ -5,6 +5,7 @@
/tests/e2e/videos/
/tests/e2e/screenshots/
# local env files
.env.local
.env.*.local
Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue
@@ -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"></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()
      });
@@ -361,6 +370,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;
      setTimeout(() => {
Source/UBCS-WEB/src/components/Master/MasterTransfer.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,77 @@
<template>
<el-dialog :visible.sync="dialogPush" append-to-body  :close-on-click-modal="false"  @close="recoverPage" title="导出">
  <div style="margin-bottom: 10px">
    <el-radio-group v-model="radio">
      <el-radio :label="0">选择</el-radio>
      <el-radio :label="1">全部</el-radio>
      <el-radio :label="2">页码</el-radio>
    </el-radio-group>
  </div>
  <div style="text-align: center">
  <el-transfer
    style="text-align: left; display: inline-block"
    filterable
    :filter-method="filterMethod"
    filter-placeholder="请输入城市拼音"
    v-model="value"
    :data="data">
  </el-transfer>
  </div>
</el-dialog>
</template>
<script>
export default {
name: "MasterTransfer",
  props:['visible','tableHeadData'],
  data(){
    const generateData = () => {
      const data = [];
      const cities = ['上海', '北京', '广州', '深圳', '南京', '西安', '成都'];
      cities.forEach((city, index) => {
        data.push({
          label: city,
          key: index,
        });
      });
      return data;
    };
    return {
      data: generateData(),
      value: [],
      filterMethod(query, item) {
        return item.label.indexOf(query) > -1;
      },
      dialogPush:this.visible,
      radio:0,
      tableHeadFindData:[]
    };
  },
  watch:{
    //监听初始化
    visible (){
      this.dialogPush = this.visible;
    },
    tableHeadData(){
      this.tableHeadFindData=this.tableHeadData;
    }
  },
  computed:{
  },
  mounted() {
    console.log(this.tableHeadData)
  },
  methods:{
    //关闭页面
    recoverPage(){
      this.$emit('update:visible', false);
    }
  }
}
</script>
<style scoped lang="scss">
</style>
Source/UBCS-WEB/src/components/Master/MasterTree.vue
@@ -121,9 +121,7 @@
          codeClassifyOid: this.nodeClickList.oid,
          functionId: 5,
        }).then(res => {
          console.log('1-', res.data)
          console.log('123-', res.data.buttons)
          const flagsToDeleteBtn = ["CODEIMPORTHISTORY", "CODEBATCHADD", "CODESTARTPROCESS", "CODEEXPORT", "CODEQUERY"];
          const flagsToDeleteBtn = ["CODEIMPORTHISTORY", "CODEEXPORT", "CODEQUERY","batchApplyCode"];
          //不同节点显示不同按钮
          if (!res.data.leaf) {
            this.masterVrBtnList = res.data.buttons.filter(obj => flagsToDeleteBtn.includes(obj.uniqueFlag));
Source/UBCS-WEB/src/components/Tree/attrCrud.vue
@@ -242,7 +242,7 @@
    </div>
    <el-table :data="ProData"
              style="width: 100%"
              height="280"
              height="750"
              @cell-click="handleCellClicks"
              @select="selectHandle"
              @selection-change="selectionChange"
@@ -1637,15 +1637,26 @@
    },
    //枚举注入保存
    enumAddHandle() {
      if (this.enumRow.length < 1) {
        this.$message.warning('请至少选择一条数据')
      } else {
        if(this.CurrentCell){
          this.$set(this.CurrentCell, 'enumString', JSON.stringify(this.enumRow));
      let hasError = false; // æ·»åŠ ä¸€ä¸ªå˜é‡
      this.tableData.forEach((item, index) => {
        if (item.key === '') {
          this.$message.warning(`第${index + 1}行的选项值不能为空`);
          hasError = true;
          return;
        } else if (item.value === '') {
          this.$message.warning(`第${index + 1}行的选项中文标签不能为空`);
          hasError = true;
          return;
        }
      });
        // ä¿å­˜æ‰§è¡Œé€»è¾‘
      if (!hasError) {
        if (this.CurrentCell) {
          this.$set(this.CurrentCell, 'enumString', JSON.stringify(this.tableData));
          this.enumVisible = false;
        }else {
          this.$set(this.attrSelectList[0], 'enumString', JSON.stringify(this.enumRow));
          this.tableData=[]
        } else {
          this.$set(this.attrSelectList[0], 'enumString', JSON.stringify(this.tableData));
          this.tableData=[];
          this.enumVisible = false;
        }
      }
Source/UBCS-WEB/src/components/template/SetPersonnel.vue
@@ -118,10 +118,8 @@
    },
    mounted() {
      console.log('---',this.parameter)
    },
  created() {
    console.log('parameter',this.parameter)
    created() {
  },
  methods: {
        setSaveParam() {
Source/UBCS-WEB/src/main.js
@@ -51,7 +51,7 @@
import FlowPath from "@/components/template/FlowPath";
import Stage from "@/components/template/Stage";
import businesswork from "@/components/work/BusinessWork"
import MasterTransfer from "@/components/Master/MasterTransfer";
// å°†å·¥å…·å‡½æ•°æ·»åŠ åˆ°å…¨å±€
import utilFunc from './util/func'
import flowPath from "@/views/flow/flowPath";
@@ -104,6 +104,7 @@
Vue.component('Stage',Stage)
Vue.component('Divider', Divider)
Vue.component('businesswork', businesswork)
Vue.component('MasterTransfer', MasterTransfer)
// åŠ è½½ç›¸å…³url地址
Object.keys(urls).forEach(key => {
Source/UBCS-WEB/vue.config.js
@@ -26,9 +26,9 @@
    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://192.168.1.46:37000',
        // target: 'http://dev.vci-tech.com:37000',
        // target: 'http://192.168.1.51:37000/',
        // target: 'http://192.168.1.104:37000',