田源
2023-07-05 e9f139bd71644a2cffdfbff44c12915a5780e56a
主题库定义bug
已修改6个文件
297 ■■■■■ 文件已修改
Source/UBCS-WEB/src/api/MasterData/master.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Tree/attrCrud.vue 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue 148 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Tree/classifyTrees.vue 43 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/template/SetPersonnel.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/api/MasterData/master.js
@@ -19,3 +19,12 @@
    }
  })
}
export const referDataGrid = (params) => {
  return request({
    url: '/api/ubcs-code/referBtmTypeController/referDataGrid',
    method: 'get',
    params:{
      ...params
    }
  })
}
Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue
@@ -199,7 +199,9 @@
        code: "",
        type: "PUBLIC",
        template: "",
        vars:{
        codeClassifyOid:""
        }
      },
      visibleFlow: false,
      transferData: [],
@@ -259,7 +261,7 @@
    codeClassifyOid: {
      handler(newval, oldval) {
        this.codeClassifyOid = newval;
        this.parameter.codeClassifyOid=newval
        this.parameter.vars.codeClassifyOid=newval
      },
      deep: true,
    },
Source/UBCS-WEB/src/components/Tree/attrCrud.vue
@@ -237,7 +237,6 @@
              @select="selectHandle"
              @selection-change="selectionChange"
              v-if="this.crudArrayFlag"
              ref="referAttrCrud"
    >
      <el-table-column
        type="selection"
@@ -248,17 +247,18 @@
                       :label="item.label"
                       :prop="item.prop"
                       :formatter="formAttr"
                       :width="item.width||(item.label.length >=4 ?'150':item.label.length==3 ?'120':'90')"
                       :width="item.width||(item.label.length >=4 ?'160':item.label.length==3 ?'130':'100')"
                       :show-overflow-tooltip="true"
                       :sortable="item.sortable"
                       align="center"
      >
        <template slot-scope="{ row }">
          <el-input v-if="editingRows === row && editShows== item.prop && (item.edit == 'text' || item.edit == 'select' ||item.edit == 'refer')" v-model="row[item.prop]"
          <el-input v-if="editingRows === row && editShows== item.prop && item.prop != 'codeDateFormat' && (item.edit == 'text' || item.edit == 'select' ||item.edit == 'refer' )" v-model="row[item.prop]"
                    @blur="saveRows"></el-input>
          <el-input-number size="small" controls-position="right" v-if="editingRows === row && editShows== item.prop && item.edit == 'number'" v-model="row[item.prop]"
                           @blur="saveRows" :style="{width:(item.width-10)+'px'}"></el-input-number>
          <el-input-number controls-position="right" v-if="editingRows === row && editShows== item.prop && item.edit == 'number'" v-model="row[item.prop]"
                           @blur="saveRows"></el-input-number>
          <el-switch
            v-if="item.edit === 'switch'" v-model="row[item.prop]" active-value="true"
            v-if="item.edit === 'switch'" v-model="row[item.sortableprop]" active-value="true"
            inactive-value="false">
          </el-switch>
          <span v-else>{{ row[item.prop] }}</span>
@@ -267,7 +267,7 @@
      <el-table-column
        fixed="right"
        label="操作"
        width="70">
        width="120">
        <template slot-scope="scope">
          <el-button
            size="small"
@@ -440,6 +440,8 @@
      isShowformulaEdit: false,
      // 级联单选
      selectRow: '',
      //级联单选数组
      selectRowArr:[],
      // 级联data
      CascadeData: [],
      // 级联option
@@ -994,7 +996,7 @@
          label: '排序号',
          sortable: true,
          edit: 'number',
          width: 100,
          width: 90,
          fixed: true
        }, {
            label: "属性英文编号",
@@ -1010,7 +1012,7 @@
            prop: "name",
            fixed: true,
            cell: false,
            width: 125,
            width: 145,
            edit: 'text',
            sortable: true
          },
@@ -1140,7 +1142,7 @@
            label: "时间格式",
            prop: "codeDateFormat",
            sortable: true,
            width: 105,
            width: 135,
            edit: 'select',
            cell: false,
          },
@@ -1255,7 +1257,9 @@
        VTInteger: "整形",
        VTFilePath: "文件",
        VTString: "字符串"
      }
      },
      //时间格式下拉框
      codeDataFlag:false,
    }
  },
  computed:{
@@ -1285,7 +1289,6 @@
    },
    //属性分组按钮
    attrVisibleHandle() {
      if (this.attrSelectList.length > 1) {
        this.$message.warning('只能选择一条模板属性')
      } else if (this.attrSelectList < 1) {
@@ -1382,18 +1385,32 @@
          'conditionMap[classifyTemplateOid]': this.Formlist[0].oid,
          'conditionMap[oid_notequal]': this.attrOid
        }).then(res => {
          console.log(res)
          this.CascadeData = res.data.data;
        })
      }
    },
    // 排序预览按钮
    orderHandle(){
      this.$refs.referAttrCrud.sort("orderNum");
    //级联保存
    CascadeAddHandle() {
      let CascadeString = "";
      CascadeString = this.selectRowArr.id + (this.selectRowArr.name);
      this.$set(this.attrRow, 'parentCode', CascadeString)
      this.CascadeVisible = false;
    },
    //级联属性清除
    casRemove() {
      this.selectRow = ""
    },
    // 级联属性行单选
    CascaderowClick(row) {
      this.selectRow = row.$index;
      this.selectRowArr=row
    },
    //表格单选
    selectHandle(selection, row) {
      this.attrOid = row.oid;
      this.attrRow = row;
      console.log(row)
    },
    //表格选择
    selectionChange(list) {
@@ -1405,26 +1422,16 @@
        this.$message.success('保存成功')
      })
    },
    //级联保存
    CascadeAddHandle() {
      let CascadeString = "";
      CascadeString = this.attrRow.id + (this.attrRow.name);
      this.$set(this.attrRow, 'parentCode', CascadeString)
      this.CascadeVisible = false;
    },
    //级联属性清除
    casRemove() {
      this.selectRow = ""
    },
    // 级联属性行单选
    CascaderowClick(row) {
      this.selectRow = row.$index
    },
    //表格行编辑
    handleCellClicks(row, column) {
        this.editingRows = row;
        this.editShows = column.property;
        this.rowOid = row.oid;
      console.log(row,column)
      if(column.property == 'codeDateFormat' ){
      }
    },
    saveRows() {
      this.editingRows = null;
@@ -1518,35 +1525,13 @@
      this.injectVisible = false
    },
    //属性模板表格单元格点击事件
    handleRowClick(row, column, cell, event) {
      //判断点击不是操作栏才可执行
      if (column.property != "menu") {
        // 当前行变为可编辑状态
        this.rowList = row
        row.$cellEdit = true
        // 每一个单元格加上cell为true才是编辑状态
        //拿到每个columnKey,点击时设置为true,就实现单元格编辑状态了
        this.rowCellList = this.findObject(this.option.column, column.columnKey)
        this.rowCellList.cell = true
        if (this.List.indexOf(column.columnKey) == -1) {
          this.List.push(column.columnKey)
        }
        // if(this.List.length >= 2){
        //   const cellName=this.List[0]
        //
        // }
      }
    },
    //表格操作栏删除
    CrudRowDel(row) {
      this.ProData.splice(row.$index, 1)
    },
    //表格删除
    CrudRemove() {
      this.attrSelectList.forEach((item)=>{
        this.ProData.splice(item.$index, 1)
      })
      this.ProData.splice(this.attrRow.$index, 1)
    },
    //表格重置
    reset() {
Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue
@@ -1,13 +1,14 @@
<template>
  <div>
    <avue-form v-model="loneTreeNewForm" :option="option" @submit="submit" v-if="flag == 'renonly'">
    <avue-form v-model="loneTreeNewForm" :option="option" v-if="flag == 'renonly'">
    </avue-form>
    <avue-form v-model="loneTreeNewForm" :option="options" @submit="submits" v-else-if="flag == 'edit'">
    </avue-form>
    <div>
<!--      为【编码规则】选取值-->
      <el-dialog  :visible.sync="MasterdialogVisible"   title="为【编码规则】选取值" append-to-body>
        <avue-crud :data="masterData" :option="masterOption" @select="masterSelect"></avue-crud>
<!--     存储业务类型-->
      <el-dialog  :visible.sync="BtmdialogVisible"   title="为【存储业务类型】选取值" append-to-body>
        <avue-crud :data="BtmData" :option="btmOption" @select="btmSelect"></avue-crud>
        <div style="padding-top: 10px;display: flex; justify-content: flex-end" >
          <el-button type="primary" size="small" @click="MasterHandlerClick">确定</el-button>
          <el-button  size="small" @click="MasterdialogVisible=false">取消</el-button>
@@ -15,7 +16,7 @@
      </el-dialog>
<!--      关键属性查询规则-->
      <el-dialog  :visible.sync="KeydialogVisible"   title="为【关键属性查询规则】选取值" append-to-body>
        <avue-crud :data="KeyData" :option="masterOption" @select="masterSelect"></avue-crud>
        <avue-crud :data="KeyData" :option="masterOption" @select="KeySelect"></avue-crud>
        <div style="padding-top: 10px;display: flex; justify-content: flex-end" >
          <el-button type="primary" size="small" @click="KeyHandlerClick">确定</el-button>
          <el-button  size="small" @click="KeydialogVisible=false">取消</el-button>
@@ -23,7 +24,7 @@
      </el-dialog>
      <!--      相似项查询规则-->
      <el-dialog  :visible.sync="SimidialogVisible"   title="为【相似项查询规则】选取值" append-to-body>
        <avue-crud :data="simData" :option="masterOption" @select="masterSelect"></avue-crud>
        <avue-crud :data="simData" :option="masterOption" @select="simSelect"></avue-crud>
        <div style="padding-top: 10px;display: flex; justify-content: flex-end" >
          <el-button type="primary" size="small" @click="simHandlerClick">确定</el-button>
          <el-button  size="small" @click="SimidialogVisible=false">取消</el-button>
@@ -34,20 +35,49 @@
</template>
<script>
import {defaultReferDataGrid} from '@/api/MasterData/master'
import {defaultReferDataGrid,referDataGrid} from '@/api/MasterData/master'
import {TreeEditSave} from '@/api/template/templateAttr'
export default {
  name: "classifyTreeform.vue",
  props: ['loneTreeNewForm','flag'],
  props: ['loneTreeNewForm','flag','Editclose'],
  data() {
    return {
      name:"",
      oid:"",
      masterName:"",
      masterOid:"",
      KeyName:"",
      KeyOid:"",
      simName:"",
      simOid:"",
      btmName:"",
      btmOid:"",
      masterInput:'',
      MasterSearchSelects:"",
      masterData:[],
      KeyData:[],
      simData:[],
      BtmData:[],
      btmOption:{
        addBtn:false,
        index:true,
        border:true,
        selection:true,
        menu:false,
        height:380,
        column:[
          {
            label:'业务类型编号',
            prop:'id'
          },
          {
            label:'业务类型名称',
            prop:'name'
          },
          {
            label:'描述',
            prop:'description'
          }
        ]
      },
      masterOption:{
        addBtn:false,
        index:true,
@@ -73,6 +103,7 @@
      MasterdialogVisible:false,
      KeydialogVisible:false,
      SimidialogVisible:false,
      BtmdialogVisible:false,
      form: {
        name: "哈哈",
        sex: "男"
@@ -172,6 +203,7 @@
            label: '存储的业务类型',
            prop: 'btmtypename',
            labelWidth:128,
            focus:this.btmFoucus,
            rules: [{
              required: true,
              message: "存储的业务类型",
@@ -200,20 +232,21 @@
        ]
      },
      FormList: {},
      masterSelectList:[]
      masterSelectList:[],
      KeySelectLIst:[],
      simSelectList:[],
      btmSelectList:[]
    }
  },
  created() {
  },
  methods: {
    submits(form,done){
      console.log(this.loneTreeNewForm)
      TreeEditSave(this.loneTreeNewForm).then(res=>{
        this.$message.success('修改成功');
      }).catch(res=>{
        this.$message.error(res)
      })
        this.Editclose()
      done()
      })
    },
    error(err) {
      this.$message.success('请查看控制台');
@@ -233,17 +266,17 @@
      }else {
        this.MasterdialogVisible=false;
        this.masterSelectList=[]
        this.loneTreeNewForm.codeRuleOidName=this.name;
        this.loneTreeNewForm.codeRuleOid=this.oid;
        console.log(this.masterSelectList)
        this.$set(this.loneTreeNewForm,'coderuleoidName',this.masterName)
        this.$set(this.loneTreeNewForm,'coderuleOid',this.masterOid)
        this.$emit('MasterHandler',this.loneTreeNewForm)
        console.log(this.loneTreeNewForm)
      }
    },
    //编码多选
    masterSelect(row){
      console.log(row)
      this.masterSelectList=row;
      this.name=row[0].name;
      this.oid=row[0].oid;
      this.masterName=row[0].name;
      this.masterOid=row[0].oid;
      console.log('oid',this.oid)
    },
    //编码接口
@@ -253,10 +286,7 @@
        isMuti:'false',
        'conditionMap["lcstatus"]':'Released'
      }).then(res=>{
        console.log('---',res)
        this.masterData=res.data.records;
        console.log('masterData',this.masterData)
      })
    },
    // 关键属性失焦
@@ -266,31 +296,86 @@
    },
    //关键属性确定
    KeyHandlerClick(){
      if(this.masterSelectList.length>1){
      if(this.KeySelectLIst.length>1){
        this.$message.warning('只能选择一条数据')
      }else if(this.masterSelectList.length<=0){
      }else if(this.KeySelectLIst.length<=0){
        this.$message.warning('请选择一条数据')
      }else {
        this.KeydialogVisible=false;
        this.KeySelectLIst=[]
        this.$set(this.loneTreeNewForm,'codeResembleRuleOidName',this.simName)
        this.$set(this.loneTreeNewForm,'codeResembleRuleOid',this.simOid)
        this.$emit('MasterHandler',this.loneTreeNewForm)
      }
    },
    //关键属性接口
    KeydefaultRend(){
      defaultReferDataGrid({
        referType:'codekeyattrrepeat',
        isMuti:'false',
        'conditionMap["lcstatus"]':'Enabled'
      }).then(res=>{
        this.keyData=res.data.records;
        console.log('key',this.keyData)
        this.KeyData=res.data.records;
      })
    },
    // 关键多选
    KeySelect(row){
      this.KeySelectLIst=row;
      this.KeyName=row[0].name;
      this.KeyOid=row[0].oid;
    },
    // 相似项失焦
    simFouce(){
      this.SimidialogVisible=true;
      this.simdefaultRend()
    },
    //相似项确定
    simHandlerClick(){
      if(this.simSelectList.length>1){
        this.$message.warning('只能选择一条数据')
      }else if(this.simSelectList.length<=0){
        this.$message.warning('请选择一条数据')
      }else {
        this.SimidialogVisible=false;
        this.simSelectList=[]
        this.$set(this.loneTreeNewForm,'codeResembleRuleOidName',this.simName)
        this.$set(this.loneTreeNewForm,'codeResembleRuleOid',this.simOid)
        this.$emit('MasterHandler',this.loneTreeNewForm)
      }
    },
  //  相似项多选
    simSelect(row){
      this.simSelectList=row;
      this.simName=row[0].name;
      this.simOid=row[0].oid;
      console.log('oid',this.oid)
    },
    //相似项项接口
    simdefaultRend(){
      defaultReferDataGrid({
        referType:'coderesemblerule',
        isMuti:'false',
        'conditionMap["lcstatus"]':'Enabled'
      }).then(res=>{
        this.simData=res.data.records;
      })
    },
    //业务类型失焦
    btmFoucus(){
      this.BtmdialogVisible=true;
      this.btmdefaultRend()
    },
  //  业务类型多选
    btmSelect(row){
      this.btmSelectList=row;
      this.btmName=row[0].name;
      this.btmOid=row[0].oid;
    },
    //业务类型接口
    btmdefaultRend(){
      referDataGrid({valueField:'id',isMuti:'false'}).then(res=>{
        console.log(res)
      })
    }
  }
}
@@ -299,6 +384,3 @@
<style scoped>
</style>
<!--uiDataController/defaultReferDataGrid?referBo=coderule&isMuti=false&conditionMap%5B%22lcstatus%22%5D=Released-->
<!--uiDataController/defaultReferDataGrid?conditionMap%5B%22lcstatus%22%5D=Released&referBo=coderule&isMuti=false&_=1687831291212-->
Source/UBCS-WEB/src/components/Tree/classifyTrees.vue
@@ -29,9 +29,6 @@
            <el-form-item label="描述:" label-width="150px">
              <el-input v-model="TreeAddform.description" autocomplete="off" style="width: 585px"></el-input>
            </el-form-item>
            <el-form-item v-show="this.TreeFlag==false" label="存储的业务类型:" label-width="150px">
              <el-input v-model="TreeAddform.btmtypename" autocomplete="off" style="width: 585px"></el-input>
            </el-form-item>
            <el-form-item label="编码规则:" label-width="150px">
              <el-input v-model="TreeAddform.coderuleoidName" autocomplete="off" style="width: 585px"></el-input>
            </el-form-item>
@@ -51,7 +48,7 @@
        </el-dialog>
        <!--        修改对话框-->
        <el-dialog :visible.sync="TreeEditFormVisible" append-to-body title="修改分类">
          <classifyTreeform ref="childForm" :loneTreeNewForm="TreeList" :nodeList="nodeList" :flag="'edit'"></classifyTreeform>
          <classifyTreeform ref="childForm" :loneTreeNewForm="TreeList" :nodeList="nodeList" :flag="'edit'" @MasterHandler="MasterHandler" :Editclose=" ()=>{TreeEditFormVisible=false}"></classifyTreeform>
        </el-dialog>
        <avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="CloneTreedata" :defaultExpandAll="false"
                   :option="Treeoption"
@@ -176,10 +173,6 @@
  </el-container>
</template>
<script>
//这里声明一些菜单组件用法:首先布局分为左侧菜单右侧表格,可能会有右侧Tab栏加表单的情况。所以另外引入了一个右侧表单的组件"classifyTreeform"。
//首先父组件调用子组件菜单,通过provide传递参数。有Treeoption左侧树新增表单项 Treedata左侧树节点配置项 crudTreeOption右侧表格配置项 crudTreeData右侧表格显示内容
//其中表格的配置项直接父传子传递过来就行,直接:option=传递的参数名,里面数据显示的内容因为是和左侧联动的,所以重新一个Formlist,通过点击树节点下标来动态渲染右侧表格,下面方法都有具体注释
//然后再说右侧的表单,专门定义了一个组件,通过父传子再把表单数据TreeList传递过去,传递前在10deCLi1ck方法里面便了处理也是一个联动的效果,表单的配置项在哪个子组件或者父组件写都可以。
import {
  getAtrrList,
  TreeSave,
@@ -206,36 +199,6 @@
  inject: [, "crudTreeData"],
  data() {
    return {
      // //表格option配置项
      // crudTreeOption: {
      //   index: true,
      //   border: true,
      //   height:180,
      //   selection:true,
      //   addBtn:this.addFlag,
      //   column: [
      //     {
      //       label: "模板编号",
      //       prop: "id"
      //     },
      //     {
      //       label:"模板名称",
      //       prop:"name"
      //     },
      //     {
      //       label: "模板描述",
      //       prop:"description"
      //     },
      //     {
      //       label:"版本号",
      //       prop:"revisionSeq"
      //     },
      //     {
      //       label:"状态",
      //       prop:"lcStatusText"
      //     }
      //   ]
      // },
      addFlag:false,
      // 表格当前行id
      crudOid:"",
@@ -470,6 +433,10 @@
    }
  },
  methods: {
    MasterHandler(val){
      console.log('父亲',val)
      this.TreeList=val
    },
    //行单选事件
    selectHandle(selection,row){
      this.crudOid=row.oid;
Source/UBCS-WEB/src/components/template/SetPersonnel.vue
@@ -135,7 +135,7 @@
            return this.initFrom.findIndex(i => i.taskId === arr1)
        },
        async apiInit() {
            const response = await personnelInit({ type: this.parameter[this.parameterKeys.type], templateId: this.parameter[this.parameterKeys.code],ids:this.parameter.ids, codeClassifyOid:this.parameter.codeClassifyOid})
            const response = await personnelInit({ type: this.parameter[this.parameterKeys.type], templateId: this.parameter[this.parameterKeys.code]})
            if (response.status === 200) {
                console.log(response)
                this.initFrom = response.data.data.user