田源
2023-08-09 db07ec48c8e748b28194fd7c64d635541b26e459
主题库业务类型全查询
已修改5个文件
286 ■■■■ 文件已修改
Source/UBCS-WEB/src/components/Master/MasterTransfer.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Master/MasterTree.vue 101 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue 104 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTreeform.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue 73 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Master/MasterTransfer.vue
@@ -1,5 +1,6 @@
<template>
  <el-dialog :close-on-click-modal="false" :visible.sync="dialogPush" append-to-body style="width: 1550px; margin: auto" title="导出"
  <el-dialog :close-on-click-modal="false" :visible.sync="dialogPush" append-to-body style="width: 1550px; margin: auto"
             title="导出"
             @close="escHandler">
    <div style="margin-bottom: 20px;">
      <div>
Source/UBCS-WEB/src/components/Master/MasterTree.vue
@@ -8,37 +8,37 @@
<script>
import {getTreeList} from "@/api/MasterData/master";
import {TableData,MasterTable} from "@/api/GetItem";
import {TableData, MasterTable} from "@/api/GetItem";
export default {
  name: "MasterTree",
  props:{
    pageSize:{
      type:String,
      default:"10"
  props: {
    pageSize: {
      type: String,
      default: "10"
    },
    currentPage:{
      type:String,
      default:"1"
    currentPage: {
      type: String,
      default: "1"
    },
    templateOid:{
      type:String,
      default:''
    templateOid: {
      type: String,
      default: ''
    },
  },
  data(){
    return{
      idData:'',
      masterVrBtnList:[],
      tableHeadFindData:[],
      tableHeadDataFateher:[],
      templateOids:"",
      tableDataArray:[],
      codeClassifyOid:"",
      coderuleoid:"",
      CloneTreeAvueform:{},
      loading:false,
      Treedata:[],
  data() {
    return {
      idData: '',
      masterVrBtnList: [],
      tableHeadFindData: [],
      tableHeadDataFateher: [],
      templateOids: "",
      tableDataArray: [],
      codeClassifyOid: "",
      coderuleoid: "",
      CloneTreeAvueform: {},
      loading: false,
      Treedata: [],
      nodeClickList: "",
      Treeoption: {
        addBtn: false,
@@ -51,15 +51,15 @@
        //   console.log(node)
        //   console.log(resolve)
        // }
        treeLoad:function (node, resolve){
          if(node.data != false){
        treeLoad: function (node, resolve) {
          if (node.data != false) {
            const parentId = (node.level === 0) ? 0 : node.data.oid;
            const parentBtmName = node.data.attributes.btmname
            getTreeList({parentOid:parentId,parentBtmName:parentBtmName}).then(res=>{
              resolve(res.data.map(item=>{
            getTreeList({parentOid: parentId, parentBtmName: parentBtmName}).then(res => {
              resolve(res.data.map(item => {
                return {
                  ...item,
                  label:item.text
                  label: item.text
                }
              }))
            })
@@ -71,24 +71,23 @@
  created() {
    this.getTreeLists()
  },
  computed:{
   },
  methods:{
  computed: {},
  methods: {
    //获取数据
    getTreeLists(){
    getTreeLists() {
      const index = this.$route.query.id.indexOf('@');
      const result = this.$route.query.id.substring(0, index);
      this.idData=result
      this.idData = result
      // console.log(this.$route)
      getTreeList({'conditionMap[id]':this.idData }).then(res=>{
        this.Treedata=res.data;
      getTreeList({'conditionMap[id]': this.idData}).then(res => {
        this.Treedata = res.data;
        const [firstProperty] = res.data;
        this.ModifyProperties(this.Treedata, 'text', 'label');
        this.codeClassifyOid=firstProperty.oid;
        this.coderuleoid=firstProperty.attributes.coderuleoid;
        this.$emit("coderuleoid", this.coderuleoid )
        this.$emit('Treedata',this.Treedata)
      }).catch(res=>{
        this.codeClassifyOid = firstProperty.oid;
        this.coderuleoid = firstProperty.attributes.coderuleoid;
        this.$emit("coderuleoid", this.coderuleoid)
        this.$emit('Treedata', this.Treedata)
      }).catch(res => {
        this.$message.error(res)
      })
    },
@@ -106,16 +105,16 @@
      }
    },
    //表格刷新
    TableRend(){
    TableRend() {
      TableData({
        templateOid: this.templateOids,
        codeClassifyOid: this.nodeClickList.oid,
        page: this.currentPage,
        limit: this.pageSize,
      }).then(res => {
        this.tableDataArray=res.data.data;
        this.$emit('tableDataArray',this.tableDataArray)
        this.$emit('total',res.data.total)
        this.tableDataArray = res.data.data;
        this.$emit('tableDataArray', this.tableDataArray)
        this.$emit('total', res.data.total)
      })
    },
    //表格头部
@@ -125,9 +124,9 @@
      return new Promise((resolve, reject) => {
        MasterTable({
          codeClassifyOid: this.nodeClickList.oid,
          functionId:result,
          functionId: result,
        }).then(res => {
          const flagsToDeleteBtn = ["CODEIMPORTHISTORY", "CODEEXPORT", "CODEQUERY","batchApplyCode"];
          const flagsToDeleteBtn = ["CODEIMPORTHISTORY", "CODEEXPORT", "CODEQUERY", "batchApplyCode"];
          //不同节点显示不同按钮
          if (!res.data.leaf) {
            this.masterVrBtnList = res.data.buttons.filter(obj => flagsToDeleteBtn.includes(obj.uniqueFlag));
@@ -160,12 +159,12 @@
    async nodeClick(data) {
      try {
        this.nodeClickList = data;
        this.tableHeadDataFateher=[]
        this.tableHeadFindData=[]
        this.tableHeadDataFateher = []
        this.tableHeadFindData = []
        await this.TableHeadRend(); // 先执行 TableHeadRend()
        this.TableRend(); // TableHeadRend() 方法完成后再执行 TableRend()
        this.$emit('nodeClick',this.templateOids)
        this.$emit("codeClassifyOid", this.nodeClickList.oid )
        this.$emit('nodeClick', this.templateOids)
        this.$emit("codeClassifyOid", this.nodeClickList.oid)
      } catch (error) {
        // 处理错误
        this.$message.error(error)
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
@@ -439,66 +439,66 @@
    // 发布
    setHandler() {
      var options = {
        processUse:'PUBLIC',
        processUseText:'申请',
        allowStatus:'Editing',
        allowStatusText:'已编辑',
        startStatus:'Auditing',
        resetStatus:'Editing',
        batchTitle:'批量提交编码数据到流程审批',
        title:'提交编码数据到流程审批'
        processUse: 'PUBLIC',
        processUseText: '申请',
        allowStatus: 'Editing',
        allowStatusText: '已编辑',
        startStatus: 'Auditing',
        resetStatus: 'Editing',
        batchTitle: '批量提交编码数据到流程审批',
        title: '提交编码数据到流程审批'
      }
      this.checkStatusAndSubmitProcess(options,'Released');
      this.checkStatusAndSubmitProcess(options, 'Released');
    },
    //停用
    Deactivate() {
      var options = {
        processUse:'DISABLE',
        processUseText:'停用',
        allowStatus:'Released',
        allowStatusText:'已发布',
        resetStatus:'Released',
        batchTitle:'批量停用(冻结)的编码数据',
        title:'停用(冻结)编码数据',
        confirmMsg:'是否要停用这些数据'
        processUse: 'DISABLE',
        processUseText: '停用',
        allowStatus: 'Released',
        allowStatusText: '已发布',
        resetStatus: 'Released',
        batchTitle: '批量停用(冻结)的编码数据',
        title: '停用(冻结)编码数据',
        confirmMsg: '是否要停用这些数据'
      }
      this.checkStatusAndSubmitProcess(options,'Disabled');
      this.checkStatusAndSubmitProcess(options, 'Disabled');
    },
    //启用
    Enable() {
      var options = {
        processUse:'ENABLE',
        processUseText:'启用',
        allowStatus:'Disabled',
        allowStatusText:'已停用',
        resetStatus:'Disabled',
        batchTitle:'批量启用(解冻)的编码数据',
        title:'启用(解冻)编码数据',
        confirmMsg:'是否要启用(解冻)这些数据'
        processUse: 'ENABLE',
        processUseText: '启用',
        allowStatus: 'Disabled',
        allowStatusText: '已停用',
        resetStatus: 'Disabled',
        batchTitle: '批量启用(解冻)的编码数据',
        title: '启用(解冻)编码数据',
        confirmMsg: '是否要启用(解冻)这些数据'
      }
      this.checkStatusAndSubmitProcess(options,'Released');
      this.checkStatusAndSubmitProcess(options, 'Released');
    },
    //回收
    Recovery() {
      var options = {
        processUse:'ROLLBACK',
        processUseText:'回收',
        allowStatus:'Released,Disabled',
        allowStatusText:'已发布,已停用',
        batchTitle:'批量回收的编码数据',
        title:'回收编码数据',
        confirmMsg:'是否要回收这些数据',
        processUse: 'ROLLBACK',
        processUseText: '回收',
        allowStatus: 'Released,Disabled',
        allowStatusText: '已发布,已停用',
        batchTitle: '批量回收的编码数据',
        title: '回收编码数据',
        confirmMsg: '是否要回收这些数据',
      }
      this.checkStatusAndSubmitProcess(options,'TakeBack');
      this.checkStatusAndSubmitProcess(options, 'TakeBack');
    },
    checkStatusAndSubmitProcess(options,targetLcstatus){
    checkStatusAndSubmitProcess(options, targetLcstatus) {
      // 编辑中-只能发布,不能回收
      // 审核中-什么都不能做
      // 已发布-停用、回收
      // 停用-只能启用、回收
      if (this.selectRow.length <= 0) {
        this.$message.warning("请选择数据");
      } else if (this.selectRow.length >1000) {
      } else if (this.selectRow.length > 1000) {
        this.$message.warning("每次提交到流程的数量请不要超过1000条");
      } else {
        //审批的数据的状态必须相同
@@ -512,27 +512,27 @@
          this.$message.warning("选择的数据中状态无需再执行当前操作");
          return false;
        }
        if(options.processUseText=='申请' && !validatenull(this.selectRow[0].copyfromversion)){
          options.processUseText='修改'
          options.processUse='EDIT'
        if (options.processUseText == '申请' && !validatenull(this.selectRow[0].copyfromversion)) {
          options.processUseText = '修改'
          options.processUse = 'EDIT'
        }
        let checkStatus = this.selectRow.every(item =>  options.allowStatus.indexOf(item.lcstatus)!=-1);
        if(!checkStatus){
          this.$message.warning('只有状态是【'+options.allowStatusText+'】的数据才可以发起流程');
          return  false;
        let checkStatus = this.selectRow.every(item => options.allowStatus.indexOf(item.lcstatus) != -1);
        if (!checkStatus) {
          this.$message.warning('只有状态是【' + options.allowStatusText + '】的数据才可以发起流程');
          return false;
        }
        processTS({templateId: this.templateOid, buttonTypeKey: options.processUse}).then(res => {
          if (res.data.data.records && res.data.data.records.length != 0) {
            this.parameter.ids=this.oids;
            this.parameter.processName = this.result + '-'+options.processUseText+'[' + this.Treedata[0].name + '-' + this.selectRow[0].name + ']';
            this.parameter.ids = this.oids;
            this.parameter.processName = this.result + '-' + options.processUseText + '[' + this.Treedata[0].name + '-' + this.selectRow[0].name + ']';
            this.parameter.type = options.processUse;
            this.parameter.code = this.templateOid
            this.parameter.btmtype=this.selectRow[0].btmname || this.selectRow[0].btmtype;
            this.parameter.vars= {
            this.parameter.btmtype = this.selectRow[0].btmname || this.selectRow[0].btmtype;
            this.parameter.vars = {
              codeClassifyOid: this.codeClassifyOid,
              templateOid: this.templateOid
            };
            this.title = this.selectRow.length>1?options.batchTitle:options.title;
            this.title = this.selectRow.length > 1 ? options.batchTitle : options.title;
            this.visibleDeactivate = true;
          } else {
            this.$confirm('当前分类没有添加流程模板,是否不用流程审批直接执行?', '提示', {
@@ -540,7 +540,11 @@
              cancelButtonText: '取消',
              type: 'warning'
            }).then(() => {
              changeStatus({oid: this.oids.join(','), btmname: this.selectRow[0].btmname, lcStatus: targetLcstatus}).then(res => {
              changeStatus({
                oid: this.oids.join(','),
                btmname: this.selectRow[0].btmname,
                lcStatus: targetLcstatus
              }).then(res => {
                if (res.data.code == 200) {
                  this.$message.success(options.processUseText + '成功')
                  this.onLoad()
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTreeform.vue
@@ -496,6 +496,7 @@
        referType:'coderule',
        isMuti:'false',
        'conditionMap["lcstatus"]':'Released',
        'limit':'-1',
        ...masterParameter
      }).then(res=>{
        this.masterData=res.data.records;
@@ -532,6 +533,7 @@
        referType:'codekeyattrrepeat',
        isMuti:'false',
        'conditionMap["lcstatus"]':'Enabled',
        'limit':'-1',
        ...masterParameter
      }).then(res=>{
        this.KeyData=res.data.records;
@@ -582,6 +584,7 @@
        referType:'coderesemblerule',
        isMuti:'false',
        'conditionMap["lcstatus"]':'Enabled',
        'limit':'-1',
        ...masterParameter
      }).then(res=>{
        this.simData=res.data.records;
@@ -621,7 +624,7 @@
    },
    //业务类型接口
    btmdefaultRend(masterParameter){
      referDataGrid({valueField:'id',isMuti:'false',...masterParameter}).then(res=>{
      referDataGrid({valueField:'id',isMuti:'false','limit':'-1',...masterParameter}).then(res=>{
        this.BtmData=res.data.data.records
      })
    }
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
@@ -63,7 +63,8 @@
          </el-dialog>
          <!--        修改对话框-->
          <el-dialog :visible.sync="TreeEditFormVisible" append-to-body title="修改分类">
            <classifyTreeform ref="childForm" :Editclose=" ()=>{TreeEditFormVisible=false}" :TreeFlag="editTreeFLagCode" :flag="'edit'"
            <classifyTreeform ref="childForm" :Editclose=" ()=>{TreeEditFormVisible=false}" :TreeFlag="editTreeFLagCode"
                              :flag="'edit'"
                              :loneTreeNewForm="TreeList" :nodeClickList="nodeClickList"
                              :nodeList="nodeList" @MasterHandler="MasterHandler" @flushed="flushed"
                              @referTreeForm="referTreeForm"></classifyTreeform>
@@ -233,7 +234,8 @@
                       :rowIndex="this.selectRow"></templatePro>
        </span>
        <!--     编码规则-->
        <el-dialog :visible.sync="MasterdialogVisible" append-to-body title="为【编码规则】选取值" :before-close="masterEscHandler">
        <el-dialog :before-close="masterEscHandler" :visible.sync="MasterdialogVisible" append-to-body
                   title="为【编码规则】选取值">
          <template>
            <el-select v-model="SelectValue" placeholder="请选择" style="width: 135px">
              <el-option
@@ -266,7 +268,7 @@
          </div>
        </el-dialog>
        <!--      关键属性查询规则-->
        <el-dialog :visible.sync="KeydialogVisible" append-to-body title="为【关键属性查询规则】选取值" :before-close="KeyEscHandler">
        <el-dialog :before-close="KeyEscHandler" :visible.sync="KeydialogVisible" append-to-body title="为【关键属性查询规则】选取值">
          <template>
            <el-select v-model="SelectValue" placeholder="请选择" style="width: 135px">
              <el-option
@@ -290,7 +292,9 @@
          <div style="height: 30px">
            <div
              style="display: inline-block;float: left;border: 1px solid #eeeeee;padding: 5px;margin-top: 5px;font-size: 14px ">
              已设置的值为:[{{ this.TreeAddform.codeKeyAttrRepeatOidName == '' ? '未设置值' : this.TreeAddform.codekeyattrrepeatoidName }}]
              已设置的值为:[{{
                this.TreeAddform.codeKeyAttrRepeatOidName == '' ? '未设置值' : this.TreeAddform.codekeyattrrepeatoidName
              }}]
            </div>
            <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden">
              <el-button size="small" type="primary" @click="KeyHandlerClick">确定</el-button>
@@ -299,7 +303,7 @@
          </div>
        </el-dialog>
        <!--      相似项查询规则-->
        <el-dialog :visible.sync="SimidialogVisible" append-to-body title="为【相似项查询规则】选取值" :before-close="simEscHandler">
        <el-dialog :before-close="simEscHandler" :visible.sync="SimidialogVisible" append-to-body title="为【相似项查询规则】选取值">
          <template>
            <el-select v-model="SelectValue" placeholder="请选择" style="width: 135px">
              <el-option
@@ -323,7 +327,9 @@
          <div style="height: 30px">
            <div
              style="display: inline-block;float: left;border: 1px solid #eee;padding: 5px;margin-top: 5px;font-size: 14px ">
              已设置的值为:[{{ this.TreeAddform.codeResembleRuleOidName == '' ? '未设置值' : this.TreeAddform.codeResembleRuleOidName }}]
              已设置的值为:[{{
                this.TreeAddform.codeResembleRuleOidName == '' ? '未设置值' : this.TreeAddform.codeResembleRuleOidName
              }}]
            </div>
            <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden">
              <el-button size="small" type="primary" @click="simHandlerClick">确定</el-button>
@@ -332,7 +338,7 @@
          </div>
        </el-dialog>
        <!--        业务类型-->
        <el-dialog :visible.sync="BtmdialogVisible" append-to-body title="为【业务类型规则】选取值" :before-close="BtmEscHandler">
        <el-dialog :before-close="BtmEscHandler" :visible.sync="BtmdialogVisible" append-to-body title="为【业务类型规则】选取值">
          <template>
            <el-select v-model="SelectValue" placeholder="请选择" style="width: 135px !important;">
              <el-option
@@ -466,7 +472,7 @@
          }
        ]
      },
      Option:{
      Option: {
        addBtn: false,
        index: true,
        border: true,
@@ -503,7 +509,7 @@
          label: '英文名称'
        }
      ],
      masterSelectOption:[
      masterSelectOption: [
        {
          value: 'id',
          label: '业务类型编号'
@@ -831,32 +837,32 @@
  },
  methods: {
    //存储的业务类型关闭
    BtmEscHandler(){
      this.SelectFInd='';
      this.SelectValue='id';
      this.masterRow=null;
      this.BtmdialogVisible=false;
    BtmEscHandler() {
      this.SelectFInd = '';
      this.SelectValue = 'id';
      this.masterRow = null;
      this.BtmdialogVisible = false;
    },
    //相似项关闭
    simEscHandler(){
      this.SelectFInd='';
      this.SelectValue='id';
      this.masterRow=null;
      this.SimidialogVisible=false;
    simEscHandler() {
      this.SelectFInd = '';
      this.SelectValue = 'id';
      this.masterRow = null;
      this.SimidialogVisible = false;
    },
    //关键属性关闭
    KeyEscHandler(){
      this.SelectFInd='';
      this.SelectValue='id';
      this.masterRow=null;
      this.KeydialogVisible=false;
    KeyEscHandler() {
      this.SelectFInd = '';
      this.SelectValue = 'id';
      this.masterRow = null;
      this.KeydialogVisible = false;
    },
    //编码规则关闭
    masterEscHandler(){
      this.SelectFInd='';
      this.SelectValue='id';
      this.masterRow=null;
      this.MasterdialogVisible=false;
    masterEscHandler() {
      this.SelectFInd = '';
      this.SelectValue = 'id';
      this.masterRow = null;
      this.MasterdialogVisible = false;
    },
    // 关闭弹窗
    /** 导入 */
@@ -912,6 +918,7 @@
        referType: 'coderule',
        isMuti: 'false',
        'conditionMap["lcstatus"]': 'Released',
        'limit':'-1',
        ...masterParameter
      }).then(res => {
        this.masterData = res.data.records;
@@ -946,6 +953,7 @@
        referType: 'codekeyattrrepeat',
        isMuti: 'false',
        'conditionMap["lcstatus"]': 'Enabled',
        'limit':'-1',
        ...masterParameter
      }).then(res => {
        this.KeyData = res.data.records;
@@ -996,6 +1004,7 @@
        referType: 'coderesemblerule',
        isMuti: 'false',
        'conditionMap["lcstatus"]': 'Enabled',
        'limit':'-1',
        ...masterParameter
      }).then(res => {
        this.simData = res.data.records;
@@ -1025,7 +1034,7 @@
    BtmSelectFindeHandler() {
      const masterParameter = {};
      masterParameter[`conditionMap['${this.SelectValue}']`] = `*${this.SelectFInd}*`;
        this.btmdefaultRend(masterParameter);
      this.btmdefaultRend(masterParameter);
    },
    //业务类型多选
    btmSelect(row) {
@@ -1036,7 +1045,7 @@
    },
    //业务类型接口
    btmdefaultRend(masterParameter) {
      referDataGrid({valueField: 'id', isMuti: 'false', ...masterParameter}).then(res => {
      referDataGrid({valueField: 'id', isMuti: 'false','limit':'-1', ...masterParameter}).then(res => {
        this.BtmData = res.data.data.records
      })
    },
@@ -1119,7 +1128,6 @@
        this.$message.warning('请输入内容!');
      } else {
        const data = this.TreeAddform;
        // data.btmtypename= this.TreeList.btmtypename
        this.$set(data, "parentCodeClassifyOid", this.nodeClickList.oid);
        TreeSave(data)
          .then(() => {
@@ -1286,7 +1294,6 @@
          });
        }
      }
    },
    //树点击事件
    async nodeClick(data) {