田源
2023-09-26 3d4666d68b16b181acd369409e455e5036b61212
集成系统信息-分类授权-取消勾选
已修改4个文件
47 ■■■■■ 文件已修改
Source/UBCS-WEB/src/api/system/user.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/page/login/userlogin.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/docking/infoForm.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/integration/systemInfo.vue 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/api/system/user.js
@@ -162,7 +162,6 @@
//单点登录接口
export const ssoLogin =(empCode) => {
  const params = new URLSearchParams();
  console.log(empCode);
  params.append('empCode', empCode);
  return request({
    url: '/api/ubcs-code/passwordFree/ssoLogin',
Source/UBCS-WEB/src/page/login/userlogin.vue
@@ -299,6 +299,7 @@
  },
  props: [],
  methods: {
    //单点登录跳转
    ChandleLogin() {
      this.$router.push({ path: '/sso' });
    },
Source/UBCS-WEB/src/views/docking/infoForm.vue
@@ -548,7 +548,7 @@
      })
      this.$nextTick(function (){
        if(pass){
          that.formData.sysIntParamDTOs=this.formData.sysIntParamVOs.map(item=>{
          that.formData.sysIntParamDTOS=this.formData.sysIntParamVOs.map(item=>{
            return {
              ...item,
              ordernNo:item.$index
Source/UBCS-WEB/src/views/integration/systemInfo.vue
@@ -59,7 +59,7 @@
    return {
      checkAll: {},
      ParentList: [],
      ParentRemoveList:[],
      ParentRemoveList: [],
      //避免缓存
      reload: Math.random(),
      TreeLoading: false,
@@ -147,7 +147,7 @@
    //分类授权多选回调
    checkChange(row, checked) {
      if (checked) {
        if (!row.parentId && row.children) {
        if (!row.parentId) {
          const parentRecord = {
            oid: row.oid,
            classifyId: row.attributes.classifyId,
@@ -179,26 +179,41 @@
              }
            }
          }
          console.log(this.ParentList);
        }
      } else {
        if (!row.parentId && row.children) {
          this.ParentRemoveList = this.ParentList.filter(record => record.oid !== row.oid);
        // 取消勾选的节点是父节点
        if (!row.parentId) {
          // 找到父节点在ParentList中的索引
          const parentIndex = this.ParentList.findIndex(item => item.oid === row.oid);
          if (parentIndex !== -1) {
            const parentOid = this.ParentList[parentIndex].classifyOid;
          if (row.children && row.children.length > 0) {
            for (let child of row.children) {
              this.ParentRemoveList = this.ParentList.filter(record => record.oid !== child.oid);
              if (child.children && child.children.length > 0) {
                for (let subChild of child.children) {
                  this.ParentRemoveList = this.ParentList.filter(record => record.oid !== subChild.oid);
                }
            // 查找所有需要删除的子节点的索引
            const childIndexes = this.ParentList.reduce((indexes, item, index) => {
              if (item.classParentOid === parentOid && item.classifyOid !== parentOid) {
                indexes.push(index);
              }
              return indexes;
            }, []);
            // 从后往前删除子节点的数据,保证索引的正确性
            for (let i = childIndexes.length - 1; i >= 0; i--) {
              this.ParentList.splice(childIndexes[i], 1);
            }
            // 删除父节点的数据
            this.ParentList.splice(parentIndex, 1);
          }
        } else {
          // 取消勾选的节点是子节点
          const childIndex = this.ParentList.findIndex(item => item.oid === row.oid);
          if (childIndex !== -1) {
            // 删除子节点的数据
            this.ParentList.splice(childIndex, 1);
          }
        }
        console.log(this.ParentRemoveList)
      }
      console.log(this.ParentList);
    },
    //分类授权
    classifyHandler(row) {