田源
2023-07-10 444ca5654850dcd39b84f75985d6149f65b91177
整合代码
已修改4个文件
185 ■■■■ 文件已修改
Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Tree/attrCrud.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Tree/classifyTrees.vue 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue
@@ -23,59 +23,70 @@
        <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> -->
        <el-button plain size="small" type="primary" v-for="(item, index) in masterVrBtnList" :key="index"
          @click="handelBtnClick(item)">{{
            item.name }}</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%">
        <el-table v-loading="isLoading" :data="tableData" max-height="700" style="" @cell-click="handleCellClick"
          @selection-change="handleSelectionChange" @sort-change="sortChange" v-if="tableData.length != 0">
          <el-table-column fixed type="selection" width="55"> </el-table-column>
        <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" @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" :label="item.label" :prop="item.prop"
            :sortable="item.sortable" :formatter="item.formatter"
            :width="item.label.length >= 4 ? '150' : item.label.length == 3 ? '120' : '90'" :show-overflow-tooltip="true"
            align="center">
          <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" type="add" :visible.sync="addvisible" @submit="AddSumbit">
                          :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" type="edit" :title="'修改编码信息'"
        :visible.sync="editvisible" @submit="EditSumbit"></FormTemplateDialog>
                          :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" :type="edit" :title="'已发布数据更改'"
        :visible.sync="DataVisible"></FormTemplateDialog>
      <set-personnel :visible.sync="visibleFlow" :parameter="this.parameter"></set-personnel>
                          :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 :visible.sync="similarVisible" :templateOid="templateOid" :codeClassifyOid="codeClassifyOid"
        :rowOid="rowOid" :codeRuleOid="this.codeRuleOid"></ResembleQueryDialog>
                            @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">
                     :total="page.total" layout="total, sizes, prev, pager, next, jumper"
                     @size-change="handleSizeChange"
                     @current-change="handleCurrentChange">
      </el-pagination>
    </div>
    <BatchImport v-if="batchImportData.visible" :visible.sync="batchImportData.visible" v-bind="batchImportData">
    <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 { listCodeAttributeByClassId } from "@/api/integration/integration.js";
import {MasterTable, TableData, FindData} 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 {validatenull} from "@/util/validate";
export default {
  components: {
    integrationTransfer,
@@ -126,6 +137,8 @@
  },
  data() {
    return {
      //首页右侧搜索
      WupinFindValue: "",
      //相似项查询
      similarVisible: false,
      //发布
@@ -184,8 +197,10 @@
    };
  },
  computed: {},
  created() { },
  mounted() { },
  created() {
  },
  mounted() {
  },
  activated() {
    // this.doLayout();
  },
@@ -218,7 +233,9 @@
              record.formatter = eval("(" + record.templet + ")");
              //function(row,column){return row[column.property]=='true' || row[column.property]=='1'?'是':'否'}
            } else if (record.fieldType == "truefalse") {
              record.formatter = function (row, column) { return row[column.property] == 'true' || row[column.property] == '1' ? '是' : '否' }
              record.formatter = function (row, column) {
                return row[column.property] == 'true' || row[column.property] == '1' ? '是' : '否'
              }
            }
          }
        })
@@ -261,7 +278,7 @@
      this[visible] = true
    },
    handelBtnClick(event) {
      const { uniqueFlag } = event
      const {uniqueFlag} = event
      this.$nextTick(() => {
        if (uniqueFlag === 'CODEADD') return this.addvisible = true
        if (uniqueFlag === 'CODEEDIT') return this.editHandler()
Source/UBCS-WEB/src/components/Tree/attrCrud.vue
@@ -1587,8 +1587,6 @@
      }else if(column.property == 'verifyRule'){
        this.RulesForm.expressionTextt=this.CurrentCell.verifyRule;
        this.rulesVisible=true;
        console.log(this.CurrentCell.verifyRule)
        console.log(this.RulesForm.expressionText)
      }
    },
    saveRows() {
Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue
@@ -78,7 +78,7 @@
        </div>
      </el-dialog>
<!--      存储的业务类型-->
      <el-dialog  :visible.sync="BtmdialogVisible"   title="为【相似项查询规则】选取值" append-to-body>
      <el-dialog  :visible.sync="BtmdialogVisible"   title="为【业务类型】选取值" append-to-body>
        <template>
          <el-select v-model="SelectValue" placeholder="请选择" style="width: 135px !important;">
            <el-option
@@ -110,7 +110,7 @@
import {TreeEditSave} from '@/api/template/templateAttr'
export default {
  name: "classifyTreeform.vue",
  props: ['loneTreeNewForm','flag','Editclose'],
  props: ['loneTreeNewForm','flag','Editclose','TreeFlag'],
  data() {
    return {
      SelectFInd:"",
@@ -288,6 +288,7 @@
            labelWidth:128,
            focus:this.btmFoucus,
            readonly: true,
            hide:this.TreeFlag,
            rules: [{
              required: true,
              message: "存储的业务类型",
@@ -327,6 +328,14 @@
  },
  created() {
  },
  watch:{
    // TreeFlag:{
    //   handler(newval){
    //     const falg=newval;
    //     this.findObject(this.)
    //   }
    // }
  },
  methods: {
    submits(form,done){
      TreeEditSave(this.loneTreeNewForm).then(res=>{
Source/UBCS-WEB/src/components/Tree/classifyTrees.vue
@@ -32,6 +32,9 @@
            <el-form-item label="编码规则:" label-width="150px">
              <el-input v-model="TreeAddform.codeRuleOidName" autocomplete="off" style="width: 585px" @focus="CodeFoucus"></el-input>
            </el-form-item>
            <el-form-item label="业务类型:" label-width="150px" v-if="TreeFlag==false">
              <el-input v-model="TreeAddform.btmTypeName" autocomplete="off" style="width: 585px" @focus="btmFoucus"></el-input>
            </el-form-item>
            <el-form-item label="关键属性查询规则:" label-width="150px">
                <el-input v-model="TreeAddform.codeKeyAttrRepeatOidName" autocomplete="off" @focus="Keyfouce"
                        style="width: 585px"></el-input>
@@ -48,7 +51,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}"></classifyTreeform>
          <classifyTreeform ref="childForm" :loneTreeNewForm="TreeList" :nodeList="nodeList" :flag="'edit'" @MasterHandler="MasterHandler" :Editclose=" ()=>{TreeEditFormVisible=false}" :TreeFlag="TreeFlag"></classifyTreeform>
        </el-dialog>
        <avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="CloneTreedata" :defaultExpandAll="false"
                   :option="Treeoption"
@@ -266,6 +269,30 @@
            </div>
          </div>
        </el-dialog>
<!--        业务类型-->
        <el-dialog  :visible.sync="BtmdialogVisible"   title="为【业务类型规则】选取值" append-to-body>
          <template>
            <el-select v-model="SelectValue" placeholder="请选择" style="width: 135px !important;">
              <el-option
                v-for="item in SelectOption"
                :key="item.value"
                :label="item.label"
                :value="item.value"
                style="width: 130px">
              </el-option>
            </el-select>
            <el-input style="width: 260px;margin-left: 15px" placeholder="输入值后进行模糊查询" v-model="SelectFInd"></el-input>
            <el-button size="small"  type="primary" plain @click="BtmSelectFindeHandler" style="margin-left: 20px">查询</el-button>
          </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.TreeAddform.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>
            </div>
          </div>
        </el-dialog>
      </basic-container>
    </el-main>
  </el-container>
@@ -300,6 +327,8 @@
  inject: [, "crudTreeData"],
  data() {
    return {
      //树节点显示隐藏
      TreeFlag:false,
      //编码规则
      MasterdialogVisible:false,
      masterData:[],
@@ -318,6 +347,12 @@
      simData:[],
      SimidialogVisible:false,
      simSelectList:[],
      //业务类型
      btmName:"",
      btmOid:"",
      BtmData:[],
      BtmdialogVisible:false,
      btmSelectList:[],
      masterOption:{
        addBtn:false,
        index:true,
@@ -780,6 +815,56 @@
        this.simData=res.data.records;
      })
    },
    //业务类型失焦
    btmFoucus(){
      this.BtmdialogVisible=true;
      this.btmdefaultRend()
    },
    //业务类型确定
    btmHandlerClick(){
      if(this.btmSelectList.length>1){
        this.$message.warning('只能选择一条数据')
      }else if(this.btmSelectList.length<=0){
        this.$message.warning('请选择一条数据')
      }else {
        this.BtmdialogVisible=false;
        this.btmSelectList=[]
        this.$set(this.loneTreeNewForm,'btmtypename',this.btmName ||this.btmOid)
        this.$set(this.loneTreeNewForm,'btmtypeid',this.btmOid)
        this.$emit('MasterHandler',this.loneTreeNewForm)
      }
    },
    //业务类型查询
    BtmSelectFindeHandler(){
      if(this.SelectValue == 'id'){
        const masterParameter={
          'conditionMap[id]':this.SelectFInd
        }
        this.btmdefaultRend(masterParameter);
        this.SelectValue=""
        this.SelectFInd=""
      }else if(this.SelectValue == 'name'){
        const masterParameter={
          'conditionMap[name]':this.SelectFInd
        }
        this.btmdefaultRend(masterParameter)
        this.SelectValue=""
        this.SelectFInd=""
      }
    },
    //业务类型多选
    btmSelect(row){
      this.btmSelectList=row;
      this.btmName=row[0].name;
      this.btmOid=row[0].oid;
    },
    //业务类型接口
    btmdefaultRend(masterParameter){
      referDataGrid({valueField:'id',isMuti:'false',...masterParameter}).then(res=>{
        // console.log(res)
        this.BtmData=res.data.data.records
      })
    },
    //子传父
    MasterHandler(val){
      this.TreeList=val
@@ -991,6 +1076,10 @@
    //树点击事件
    async nodeClick(data) {
      //定义一个模板属性id,数据是模板管理表格里面的oid
      console.log('树',data)
      if(data.parentId == ""){
        this.TreeFlag=true;
      }
      this.nodeClickList = data
      this.ProData=[]
      try {