ludc
2024-02-29 4508f5eb86b063a0f3ec01e6ad68c6ce8ccd1392
Merge remote-tracking branch 'origin/master'
已修改6个文件
284 ■■■■■ 文件已修改
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/file/main.vue 203 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/const/code/mdmrule.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/code/code.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/docking/info.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/docking/infoForm.vue 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
@@ -439,6 +439,8 @@
            fileDocClassifyName: '',
            hasDownload: true,
            hasUpload: true,
            hasEdit:true,
            hasDel:true,
            height: 'auto'
          }
        } else {
Source/UBCS-WEB/src/components/file/main.vue
@@ -1,81 +1,82 @@
<template>
  <basic-container>
    <avue-crud :option="option"
      :table-loading="loading"
      :data="data"
      :page.sync="page"
      :before-open="beforeOpen"
      :permission="permissionList"
      v-model="form"
      ref="crud"
      @row-del="rowDel"
      @search-change="searchChange"
      @search-reset="searchReset"
      @selection-change="selectionChange"
      @row-click="selectedRowClick"
      @current-change="currentChange"
      @size-change="sizeChange"
      @refresh-change="refreshChange"
      @on-load="onLoad">
    <avue-crud ref="crud"
               v-model="form"
               :before-open="beforeOpen"
               :data="data"
               :option="option"
               :page.sync="page"
               :permission="permissionList"
               :table-loading="loading"
               @row-del="rowDel"
               @search-change="searchChange"
               @search-reset="searchReset"
               @selection-change="selectionChange"
               @row-click="selectedRowClick"
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
               @on-load="onLoad">
      <template slot="menuLeft">
        <el-button v-if="hasUpload" type="primary"
                   size="small"
        <el-button v-if="hasUpload" icon="el-icon-upload2"
                   plain
                   icon="el-icon-upload2"
                   size="small"
                   type="primary"
                   @click="handleUpload">上 传
        </el-button>
        <el-button v-if="hasEdit" type="primary"
                   size="small"
        <el-button v-if="hasEdit" icon="el-icon-edit"
                   plain
                   icon="el-icon-edit"
                   size="small"
                   type="primary"
                   @click="handleEdit">修 改
        </el-button>
        <el-button  v-if="hasDownload" type="primary"
                    size="small"
                    icon="el-icon-download"
                    plain
                    @click="handleDownload">下 载
        </el-button>
        <el-button  v-if="hasDel" type="danger"
                   size="small"
                   icon="el-icon-delete"
        <el-button v-if="hasDownload" icon="el-icon-download"
                   plain
                   size="small"
                   type="primary"
                   @click="handleDownload">下 载
        </el-button>
        <el-button v-if="hasDel" icon="el-icon-delete"
                   plain
                   size="small"
                   type="danger"
                   @click="handleDelete">删 除
        </el-button>
      </template>
      <template slot-scope="scope" slot="menu">
        <el-button v-if="hasDownload" type="text"
                   icon="el-icon-download"
      <template slot="menu" slot-scope="scope">
        <el-button v-if="hasDownload" icon="el-icon-download"
                   size="small"
                   type="text"
                   @click="handleDownload(scope.row)">下载
        </el-button>
      </template>
    </avue-crud>
    <el-dialog title="附件管理"
    <el-dialog :visible.sync="attachBox"
               append-to-body
               :visible.sync="attachBox"
               title="附件管理"
               width="555px">
      <avue-form ref="form" :option="attachOption" v-model="attachForm" :upload-before="uploadBefore"  :upload-after="uploadAfter" :upload-error="uploadError">
      <avue-form ref="form" v-model="attachForm" :option="attachOption" :upload-after="uploadAfter"
                 :upload-before="uploadBefore" :upload-error="uploadError">
      </avue-form>
    </el-dialog>
  </basic-container>
</template>
<script>
import {getList, getFile,upload,update, remove,download} from "@/api/resource/file";
import {getList, getFile, upload, update, remove, download} from "@/api/resource/file";
import {mapGetters} from "vuex";
import {validatenull} from "@/util/validate";
import func from "@/util/func";
export default {
  props: ["options","visible","ownbizOid"],
  props: ["options", "visible", "ownbizOid"],
  data() {
    return {
      form: {},
      query: {},
      params:{},
      params: {},
      loading: false,
      hasPage:this.options.hasPage||false,
      hasPage: this.options.hasPage || false,
      page: {
        pageSize: 10,
        currentPage: 1,
@@ -83,12 +84,13 @@
      },
      attachBox: false,
      selectionList: [],
      hasUpload:validatenull(this.options.hasUpload) ? true :this.options.hasUpload,
      hasEdit:validatenull(this.options.hasEdit) ? true :this.options.hasEdit,
      hasDel:validatenull(this.options.hasDel) ? true :this.options.hasDel,
      hasDownload:validatenull(this.options.hasDownload) ? true :this.options.hasDownload,
      //默认为null全部是true
      hasUpload: validatenull(this.options.hasUpload) ? true : this.options.hasUpload,
      hasEdit: validatenull(this.options.hasEdit) ? true : this.options.hasEdit,
      hasDel: validatenull(this.options.hasDel) ? true : this.options.hasDel,
      hasDownload: validatenull(this.options.hasDownload) ? true : this.options.hasDownload,
      option: {
        height:(this.options.tableHeight?this.options.tableHeight:'300'),
        height: (this.options.tableHeight ? this.options.tableHeight : '300'),
        calcHeight: 30,
        tip: false,
        searchShow: false,
@@ -96,6 +98,7 @@
        border: true,
        index: true,
        viewBtn: true,
        refreshBtn: false,
        selection: true,
        dialogClickModal: false,
        column: [
@@ -115,21 +118,21 @@
          {
            label: "文件大小",
            prop: "fileSize",
            formatter:function(d){
              if(!d.fileSize || d.fileSize == null || d.fileSize*1 == 0 || isNaN(d.fileSize*1) ){
            formatter: function (d) {
              if (!d.fileSize || d.fileSize == null || d.fileSize * 1 == 0 || isNaN(d.fileSize * 1)) {
                return "未知大小";
              }else{
              } else {
                //原始大小是B
                var filesize = d.fileSize*1;
                if(filesize>1024*1024*1024*1024){
                  return parseInt(filesize/(1024*1024*1024*1024)) + "TB";
                }else if(filesize> 1024*1024*1024){
                  return parseInt(filesize/(1024*1024*1024)) + "GB";
                }else if(filesize> 1024*1024){
                  return parseInt(filesize/(1024*1024)) + "MB";
                }else if(filesize> 1024){
                  return parseInt(filesize/1024) + "KB";
                }else {
                var filesize = d.fileSize * 1;
                if (filesize > 1024 * 1024 * 1024 * 1024) {
                  return parseInt(filesize / (1024 * 1024 * 1024 * 1024)) + "TB";
                } else if (filesize > 1024 * 1024 * 1024) {
                  return parseInt(filesize / (1024 * 1024 * 1024)) + "GB";
                } else if (filesize > 1024 * 1024) {
                  return parseInt(filesize / (1024 * 1024)) + "MB";
                } else if (filesize > 1024) {
                  return parseInt(filesize / 1024) + "KB";
                } else {
                  return filesize + "B";
                }
              }
@@ -190,7 +193,7 @@
          prop: 'attachFile',
          type: 'upload',
          dragFile: true,
          showFileList:false,
          showFileList: false,
          accept: this.options.uploadAccept || 'file',
          loadText: '文件上传中,请稍等',
          span: 24,
@@ -198,10 +201,10 @@
            res: 'data'
          },
          data: {
            ownbizOid:this.options.ownbizOid || "share",
            ownBtmName:this.options.ownbizBtm || "share",
            fileDocClassify:this.options.fileDocClassify || "ADMIN_SHARE",
            fileDocClassifyName:this.options.fileDocClassifyName || "管理员共享文件"
            ownbizOid: this.options.ownbizOid || "share",
            ownBtmName: this.options.ownbizBtm || "share",
            fileDocClassify: this.options.fileDocClassify || "ADMIN_SHARE",
            fileDocClassifyName: this.options.fileDocClassifyName || "管理员共享文件"
          },
          action: "/api/ubcs-resource/fileController/uploadFile"
        }
@@ -210,7 +213,7 @@
    };
  },
  computed: {
    ...mapGetters([ "permission"]),
    ...mapGetters(["permission"]),
    permissionList() {
      return {
        addBtn: false,
@@ -234,21 +237,21 @@
  mounted() {
  },
  watch:{
    ownbizOid(val){
  watch: {
    ownbizOid(val) {
      this.setParams()
      this.refreshChange()
    }
    },
  },
  methods: {
    setFormItem(){
    setFormItem() {
      /*this.options.formItems=[{
        field: 'fileDocClassify11',
        title: '文件类型',
        type:  'combox',
        data: [{key: 'text', value: '文本框'},{key: 'number', value: '数字框'}]
      }]*/
      if(this.options && this.options.formItems){
      if (this.options && this.options.formItems) {
        this.options.formItems.forEach(item => {
          // 设置表单校验的规则,文本
          let message = "请选择";
@@ -257,7 +260,7 @@
            message = "请输入";
            trigger = "blur";
          }
          this.attachOption.column.push( {
          this.attachOption.column.push({
            ...item,
            label: item.title,
            prop: item.field,
@@ -267,12 +270,12 @@
            type: this.columnType[item.type],
            dicData: this.getDataList(item.type, item.data),
            change: () => {
              if(item.type !== "text"  && item.type !== "number" && item.type !== "textarea"){
              if (item.type !== "text" && item.type !== "number" && item.type !== "textarea") {
                this.changeFun(item.field);
              }
            },
            blur: () => {
              if(item.type == "text"  || item.type == "number" || item.type == "textarea"){
              if (item.type == "text" || item.type == "number" || item.type == "textarea") {
                this.changeFun(item.field);
              }
            },
@@ -297,8 +300,8 @@
        })
      }
    },
    changeFun( prop) {
      this.attachOption.column[1].data[prop]=this.attachForm[prop]
    changeFun(prop) {
      this.attachOption.column[1].data[prop] = this.attachForm[prop]
    },
    getDataList(type, dicData) {
      if (type === "truefalse") {
@@ -346,25 +349,25 @@
    },
    handleUpload() {
      this.attachOption.column[1].data.fileOid='';
      this.attachOption.column[1].data.fileOid = '';
      delete this.attachOption.column[1].data.oid;
      delete this.attachOption.column[1].data.updateFileFlag;
      this.attachBox = true;
    },
    handleEdit() {
      if(this.selectionList.length==0){
      if (this.selectionList.length == 0) {
        this.$message.warning('请选择需要修改的文件')
        return false;
      }else if(this.selectionList.length>1){
      } else if (this.selectionList.length > 1) {
        this.$message.warning('请选择一条数据')
        return false;
      }
      this.attachOption.column[1].data.fileOid=this.oids;
      this.attachOption.column[1].data.oid=this.oids;
      this.attachOption.column[1].data.updateFileFlag=true
      this.attachOption.column[1].data.fileOid = this.oids;
      this.attachOption.column[1].data.oid = this.oids;
      this.attachOption.column[1].data.updateFileFlag = true
      this.attachBox = true;
    },
    uploadBefore(file, done, loading,column) {
    uploadBefore(file, done, loading, column) {
      done();
    },
    uploadAfter(res, done, loading, column) {
@@ -378,23 +381,23 @@
    },
    handleDownload(row) {
      //window.open(`${row.link}`);
      let data=new FormData();
      if(row && row.oid){
        data.append('fileOids',row.oid)
      let data = new FormData();
      if (row && row.oid) {
        data.append('fileOids', row.oid)
        this.downloadFile(data);
      }else{
      } else {
        if (this.selectionList.length === 0) {
          this.$message.warning("请选择至少一条数据");
          return;
        }
        data.append('fileOids',this.oids)
        data.append('fileOids', this.oids)
        this.downloadFile(data);
      }
    },
    downloadFile(data){
      download(data).then(res=>{
    downloadFile(data) {
      download(data).then(res => {
        // console.log(res);
        if(res){
        if (res) {
          func.downloadFileByBlobHandler(res);
        }
      });
@@ -458,9 +461,9 @@
    },
    selectionChange(list) {
      this.selectionList = list;
      this.$refs.crud.setCurrentRow(this.selectionList[list.length-1]);
      this.$refs.crud.setCurrentRow(this.selectionList[list.length - 1]);
    },
    selectedRowClick(row){
    selectedRowClick(row) {
      this.selectionList = row;
      this.$refs.crud.toggleSelection();
      this.$refs.crud.setCurrentRow(row);
@@ -479,33 +482,33 @@
    refreshChange() {
      this.onLoad(this.page);
    },
    onLoad(page, params={}) {
    onLoad(page, params = {}) {
      this.loading = true;
      var query={}
      var query = {}
      if (this.query) {
        for (var key in this.query) {
          query['conditionMap["' + key + '"]'] = this.query[key];
        }
      }
      getList(page.currentPage, page.pageSize, Object.assign(params,this.params, query,this.query)).then(res => {
      getList(page.currentPage, page.pageSize, Object.assign(params, this.params, query, this.query)).then(res => {
        const data = res.data.data;
        this.page.total = data.total;
        if(this.options.fileDocClassifyCombox){
        if (this.options.fileDocClassifyCombox) {
          this.data = data.records.map(item => {
            if(validatenull(item.fileDocClassifyName)&& !validatenull(item.fileDocClassify)){
            if (validatenull(item.fileDocClassifyName) && !validatenull(item.fileDocClassify)) {
              item.fileDocClassifyName = this.options.fileDocClassifyCombox[item.fileDocClassify] || '';
            }
            return {
              ...item
            }
          })
        }else{
        } else {
          this.data = data.records;
        }
        this.loading = false;
        this.selectionClear();
      }).catch(error=>{
      }).catch(error => {
        this.$message.error(error);
        this.loading = false;
      });
Source/UBCS-WEB/src/const/code/mdmrule.js
@@ -2,6 +2,7 @@
  tip: false,
  searchShow: true,
  searchMenuSpan: 6,
  height:340,
  border: true,
  index: true,
  viewBtn: false,
Source/UBCS-WEB/src/views/code/code.vue
@@ -2,7 +2,7 @@
  <basic-container class="code-total" style=" height: 100%">
    <!-- 编码规则信息展示区域 -->
    <basic-container class="code-rule-container">
      <div style="height: 40vh;overflow: auto;">
      <div style="height: 55vh;overflow: auto;">
        <p
          style="
          margin-top: -5px;
@@ -220,7 +220,7 @@
    <!-- 基础码段展示区域 -->
    <basic-container class="code-basicsec-container">
      <div style="height: 38.5vh;overflow: auto">
      <div style="height: 23.5vh;overflow: auto">
        <p
          style="margin-top: -5px;
          margin-bottom: 4px;
@@ -1306,7 +1306,6 @@
      </refer-config-dialog>
    </el-dialog>
    <!--自定义流水参照组件-->
  </basic-container>
</template>
@@ -1408,7 +1407,7 @@
        showField: 'customCodeSerialClassText',
        field: 'customCodeSerialClass',
        fieldMap: {
          serialType: "serialType"
          serialType: "serialType",
        },
        placeholder: '请选择自定义流水',
        options: {
@@ -1765,7 +1764,7 @@
        this.form[data.field] = data.value || "";
        this.form[data.showField] = data.text || "";
        this.form.serialType = data.rawData[0].serialType || "";
        this.form.customCodeSerialType = data.rawData[0].serialType || "";
      }
    },
    /** 转移规则所有者对话框 */
@@ -2141,7 +2140,7 @@
        );
      }
    },
    /**
    /**
     * 可用字符集码值正则校验
     * @return true:满足限制,false:不满足限制
     */
@@ -2837,7 +2836,6 @@
    },
    /** 打开新增或编辑基础码段对话框*/
    openBasicDialog(condition, row) {
      //console.log(row);
      if (condition == "add") {
        this.basicSecDialogTitle = "添加码段信息";
        this.showbtn = true;
Source/UBCS-WEB/src/views/docking/info.vue
@@ -93,6 +93,14 @@
      }, {
        label: 'Json', value: 'json'
      }],
      //内容类型
      contentTypeList: [{
        label:'application/json',value:'application/json'
      },{
        label:'application/x-www-form-urlencoded',value:'application/x-www-form-urlencoded'
      },{
        label:'multipart/form-data',value:'multipart/form-data'
      }],
      //推送类型
      pushTypeList: [{value: '1', label: '数据推送'},
        {value: '2', label: '分类推送'},
@@ -250,6 +258,14 @@
          sortable: true,
          width: 150
        }, {
          label: '内容类型',
          prop: 'contentType',
          sortable: true,
          width: 150,
          formatter: (d) => {
            return this.contentTypeList[d.contentType]
          }
        },{
          label: '系统描述',
          prop: 'description',
          width: 150
Source/UBCS-WEB/src/views/docking/infoForm.vue
@@ -22,12 +22,19 @@
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="返回值类型" prop="returnType">
          <el-select v-model="formData.returnType" placeholder="请选择">
            <el-option v-for="item in returnTypeList" :key="item.value" :label="item.label" :value="item.value">
          <el-form-item label="返回值类型" prop="returnType">
            <el-select v-model="formData.returnType" placeholder="请选择">
              <el-option v-for="item in returnTypeList" :key="item.value" :label="item.label" :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
        <el-form-item label="内容类型" prop="contentType">
          <el-select v-model="formData.contentType" placeholder="请选择">
            <el-option v-for="item in contentTypeList" :key="item.value" :label="item.label" :value="item.value">
            </el-option>
          </el-select>
        </el-form-item>
        <el-divider></el-divider>
        <div v-if="formData.dataFlowType=='push'">
          <el-form-item  label="分类选择" prop="classifyName">
            <vciWebRefer
@@ -105,25 +112,13 @@
              @setReferValue="setReferValue"
            ></vciWebRefer>
          </el-form-item>
        </div>
        <el-form-item label="接口方式" prop="interfaceType">
          <el-select v-model="formData.interfaceType" clearable placeholder="请选择">
            <el-option v-for="item in interfaceTypeList" :key="item.value" :label="item.label" :value="item.value">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item v-if="formData.pushType=='1'" label="是否推送集团码" prop="isGroupCodeFlag">
          <el-switch v-model="formData.isGroupCodeFlag" ></el-switch>
        </el-form-item>
        <el-form-item v-if="formData.pushType=='3'" label="是否申请集团码" prop="isGroupCodeFlag">
          <el-switch v-model="formData.isGroupCodeFlag" ></el-switch>
        </el-form-item>
        <el-form-item  v-if="formData.pushType=='4'" label="是否维护集团码" prop="isGroupCodeFlag">
          <el-switch v-model="formData.isGroupCodeFlag" ></el-switch>
        </el-form-item>
        <el-form-item  v-if="formData.pushType=='7'" label="是否查询集团码" prop="isGroupCodeFlag">
          <el-switch v-model="formData.isGroupCodeFlag" ></el-switch>
        </el-form-item>
        </div>
        <el-form-item label="系统描述"  style="width: 850px;" prop="description">
          <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 5}" v-model="formData.description" style="width: 740px;"></el-input>
        </el-form-item>
@@ -153,6 +148,18 @@
        </el-form-item>
        <el-form-item v-if="formData.interfaceType=='classPath'" label="类路径" prop="classPath">
          <el-input v-model="formData.classPath" ></el-input>
        </el-form-item>
        <el-form-item v-if="formData.pushType=='1'" label="是否推送集团码" prop="isGroupCodeFlag">
          <el-switch v-model="formData.isGroupCodeFlag" ></el-switch>
        </el-form-item>
        <el-form-item v-if="formData.pushType=='3'" label="是否申请集团码" prop="isGroupCodeFlag">
          <el-switch v-model="formData.isGroupCodeFlag" ></el-switch>
        </el-form-item>
        <el-form-item  v-if="formData.pushType=='4'" label="是否维护集团码" prop="isGroupCodeFlag">
          <el-switch v-model="formData.isGroupCodeFlag" ></el-switch>
        </el-form-item>
        <el-form-item  v-if="formData.pushType=='7'" label="是否查询集团码" prop="isGroupCodeFlag">
          <el-switch v-model="formData.isGroupCodeFlag" ></el-switch>
        </el-form-item>
        <el-tabs v-model="activeName" @tab-click="tabClick">
          <el-tab-pane label="参数对象" name="paramTab">
@@ -255,6 +262,14 @@
      }, {
        label: 'Json', value: 'json'
      }],
      //内容类型
      contentTypeList: [{
        label:'application/json',value:'application/json'
      },{
        label:'application/x-www-form-urlencoded',value:'application/x-www-form-urlencoded'
      },{
        label:'multipart/form-data',value:'multipart/form-data'
      }],
      dataFlowTypeList: [{
        label: '推送', value: 'push'
      }, {
@@ -316,6 +331,9 @@
        ],
        cxfaxis: [
          {required: true, message: '请输入cxfaxis', trigger: 'blur'}
        ],
        contentType: [
          {required: true, message: 'contentType', trigger: 'blur'}
        ]
      },
      // 表格配置