田源
2024-02-01 cc38b5ae62eebcd80aebe41457629b12e26b9e84
整合代码
已修改4个文件
140 ■■■■■ 文件已修改
Source/UBCS-WEB/src/components/Theme/DataAuthDialog.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue 105 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/MasterData/items.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/wel/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Theme/DataAuthDialog.vue
@@ -128,10 +128,8 @@
        this.loadAuthPage();
      }
    },
    classifyAuthData(newval){
      this.addIndex = newval.length <= 0 ? 0 :newval.length-1;
      console.log(this.addIndex)
    classifyAuthData(newval) {
      this.addIndex = newval.length <= 0 ? 0 : newval.length - 1;
    }
  },
  computed: {},
@@ -144,7 +142,7 @@
      if (code === "data_view") {
        row.checkTheStatus = check;
      } else if (!row.checkTheStatus) {
        this.$message.warning('请先勾选查看按钮!');
        this.$message.warning('请确认是否配置查看按钮,如已配置请先勾选查看按钮!');
        // 在条件不满足时将多选框状态设置为false
        row[id] = false;
      }
@@ -173,13 +171,15 @@
        //和表格列进行对比
        this.classifyAuthHeader.forEach((item) => {
          // if (item.code !== 'data_view') {
          //   this.$set(this.classifyAuthData[index].authButton, "allDisabled", true);
          // }
          const isMatched = filteredItems.some((x) => x.id === item.prop);
          this.$nextTick(() => {
            if (this.classifyAuthData[index]) {
              if (isMatched) {
                Object.keys(this.classifyAuthData[index]).forEach((key) => {
                  this.$set(this.classifyAuthData[index].authButton, item.code, true);
                  //添加 “查看全部禁用条件”
                  if (item.code === "data_view") {
                    this.$set(this.classifyAuthData[index].authButton, "allDisabled", true);
@@ -190,14 +190,14 @@
                Object.keys(this.classifyAuthData[index]).forEach((key) => {
                  this.$set(this.classifyAuthData[index].authButton, item.code, false);
                });
                if(item.code === "data_view"){
                if (item.code === "data_view") {
                  this.classifyAuthData[index].authButton.allDisabled = false;
                }
              }
            }
          });
        });
        // console.log(this.classifyAuthData)
        //强制刷新表格
        this.itemKey = uuidv4();
      });
@@ -251,7 +251,7 @@
        classifyItem: this.classifyData.label,
        authButton: {},
        uuid: uuidv4(),//生成唯一的id,
        index: this.addIndex,
        index: this.classifyAuthData.length -1,
      }
      //将按钮设置进去
      this.classifyAuthButton.forEach(data => {
@@ -259,7 +259,7 @@
      })
      //console.log(item)
      this.classifyAuthData.push(item)
      this.roleHandlerMethods(this.roleList[0].id, 'add', this.addIndex)
      this.roleHandlerMethods(this.roleList[0].id, 'add', this.classifyAuthData.length -1)
    },
    // 删除行
    subClassifyAuth() {
Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
@@ -1,6 +1,7 @@
<template>
  <div>
    <div v-if="this.crudArrayFlag" class="app" style="display: flex;flex-wrap: wrap; display: inline-block;height: 80px">
    <div v-if="this.crudArrayFlag" class="app"
         style="display: flex;flex-wrap: wrap; display: inline-block;height: 80px">
      <el-button-group>
        <!--新增-->
        <span v-if="permissionList.busineStatus">
@@ -320,12 +321,12 @@
      ></refer-config-dialog>
      <!--近义词查询规则      -->
      <el-dialog :visible.sync="synonymVisible" append-to-body title="近义词查询规则">
          <avue-crud :data="synonymData" :option="synonymOption" v-loading="sysonymLoading" @selection-change="sysChange">
            <template slot="lcStatus" slot-scope="{row}">
              <el-tag v-if="row.lcStatus === 'Released'" type="success">启用</el-tag>
              <el-tag v-else type="danger">停用</el-tag>
            </template>
          </avue-crud>
        <avue-crud v-loading="sysonymLoading" :data="synonymData" :option="synonymOption" @selection-change="sysChange">
          <template slot="lcStatus" slot-scope="{row}">
            <el-tag v-if="row.lcStatus === 'Released'" type="success">启用</el-tag>
            <el-tag v-else type="danger">停用</el-tag>
          </template>
        </avue-crud>
        <div slot="footer" class="dialog-footer">
          <el-button type="primary" @click="sysnonymSubmit">确定</el-button>
          <el-button @click="sysnonymCancel">取消</el-button>
@@ -414,7 +415,14 @@
</template>
<script>
import {AttrByBtm, gridCodeClassifyTemplateAttr, batchAddSave, copyto, listByFlag,codeSynonym} from '@/api/template/templateAttr'
import {
  AttrByBtm,
  gridCodeClassifyTemplateAttr,
  batchAddSave,
  copyto,
  listByFlag,
  codeSynonym
} from '@/api/template/templateAttr'
import {getList} from "@/api/refer/table";
import func from "@/util/func";
import {getCurrentInstance} from "vue";
@@ -532,48 +540,48 @@
  },
  data() {
    return {
      sysSelectData:[],
      sysonymLoading:false,
      synonymOption:{
        addBtn:false,
        editBtn:false,
        delBtn:false,
        refreshBtn:false,
        columnBtn:false,
        menu:false,
        selection:true,
        column:[
      sysSelectData: [],
      sysonymLoading: false,
      synonymOption: {
        addBtn: false,
        editBtn: false,
        delBtn: false,
        refreshBtn: false,
        columnBtn: false,
        menu: false,
        selection: true,
        column: [
          {
            label:'编码',
            prop:'id',
            align:'center'
            label: '编码',
            prop: 'id',
            align: 'center'
          },
          {
            label:'名称',
            prop:'name',
            align:'center'
            label: '名称',
            prop: 'name',
            align: 'center'
          },
          {
            label:'源值',
            prop:'sourceValue',
            align:'center'
            label: '源值',
            prop: 'sourceValue',
            align: 'center'
          },
          {
            label:'同义词',
            prop:'synonymValue',
            align:'center'
            label: '同义词',
            prop: 'synonymValue',
            align: 'center'
          },
          {
            label:'启停状态',
            prop:'lcStatus',
            align:'center',
            label: '启停状态',
            prop: 'lcStatus',
            align: 'center',
            slot: true
          },
        ]
      },
      synonymData:[],
      synonymData: [],
      //近义词查询规则
      synonymVisible:false,
      synonymVisible: false,
      //表格高度
      dynamicHeight: '',
      // 保存单元格状态
@@ -1345,8 +1353,8 @@
            edit: "switch"
          },
          {
            label:'近义词查询规则',
            prop:'sysonymRuleOids',
            label: '近义词查询规则',
            prop: 'sysonymRuleOidsText',
            cell: false,
            edit: 'refer'
          },
@@ -1674,22 +1682,27 @@
  },
  methods: {
    //近义词查询规则取消
    sysnonymCancel(){
    sysnonymCancel() {
      this.synonymVisible = false;
    },
    //近义词查询规则确定
    sysnonymSubmit(){
      if(this.sysSelectData.length <= 0){
    sysnonymSubmit() {
      if (this.sysSelectData.length <= 0) {
        this.$message.warning('请至少选择一条数据!')
      }else {
      } else {
        const newArray = this.sysSelectData.map(obj => obj.oid);
        const newString = newArray.join(',');
        const newArrayName = this.sysSelectData.map(obj => obj.name);
        const newStringName = newArrayName.join(',')
        this.$set(this.CurrentCell, 'sysonymRuleOids', newString)
        //text
        this.$set(this.CurrentCell, 'sysonymRuleOidsText', newStringName)
        this.AddCellFlag = true;
        this.synonymVisible = false;
      }
    },
    sysChange(row){
    sysChange(row) {
      console.log(row)
      this.sysSelectData = row;
    },
    //新增搜索
@@ -2022,12 +2035,12 @@
              this.attrModel = this.CurrentCell.attributeGroup
            }
          },
          sysonymRuleOids: () =>{
          sysonymRuleOidsText: () => {
            this.sysonymLoading = true
            codeSynonym('1','-1','Released').then(res=>{
            codeSynonym('1', '-1', 'Released').then(res => {
              this.synonymData = res.data.data.records;
              this.sysonymLoading = false;
            }).catch(()=>{
            }).catch(() => {
              this.$message.error('请检查控制台错误信息!')
            })
            this.synonymVisible = true;
Source/UBCS-WEB/src/views/MasterData/items.vue
@@ -10,14 +10,14 @@
          @Treedata="TreedataList"
          @codeClassifyOid="codeClassifyOidList"
          @coderuleoid="coderuleoidList"
          @loading="loadingHandler"
          @nodeClickList="nodeClickLists"
          @nodeClickTemplateOids="nodeClickTem"
          @tableDataArray="tableDataArrays"
          @tableHeadBttoms="tableHeadBttoms"
          @tableHeadDataFateher="tableHeadDatas"
          @tableHeadFindData="tableHeadFindDatas"
          @nodeClickList="nodeClickLists"
          @total="totals"
          @loading="loadingHandler"
        >
        </master-tree>
      </basic-container>
@@ -25,11 +25,13 @@
    <el-main>
      <!--        表格组件-->
      <VciMasterCrud
        ref="vciMasterCrud"
        :TreeValue="TreeValue"
        :Treedata="Treedata"
        :codeClassifyOid="this.codeClassifyOid"
        :coderuleoid="this.coderuleoid"
        :isLoading="isLoading"
        :nodeClickList="this.nodeClickList"
        :page="this.page"
        :tableDataArray="tableDataArray"
        :tableHeadBtnData="masterVrBtnList"
@@ -37,10 +39,8 @@
        :tableHeadFindData="tableHeadFindData"
        :templateOid="templateOid"
        :total="this.total"
        :nodeClickList="this.nodeClickList"
        @currentPage="currentPages"
        @pageSize="pageSizes"
        ref="vciMasterCrud"
      >
      </VciMasterCrud>
    </el-main>
@@ -72,14 +72,14 @@
      isLoading: false,
      tableHeadFindData: {},
      TreeValue: '',
      nodeClickList:[]
      nodeClickList: []
    }
  },
  created() {
  },
  methods: {
    nodeClickLists(val){
      this.nodeClickList=val;
    nodeClickLists(val) {
      this.nodeClickList = val;
      // 点击树节点时重置当前页和页数
      this.page.pageSize = 100;
      this.page.currentPage = 1;
Source/UBCS-WEB/src/views/wel/index.vue
@@ -39,6 +39,7 @@
      <!--            </el-collapse>-->
      <!--          </basic-container>-->
      <!--        </el-row>-->
      <!--      -->
      <!--      </el-col>-->
    </el-row>