zhouwx
2024-07-08 1ee4a5341215f94128b66cee4893c7c937df509a
bug修改
已修改2个文件
38 ■■■■■ 文件已修改
src/router/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Admin/components/msgEditMod.vue 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js
@@ -8,7 +8,7 @@
  {
    path: '/',
    name: 'login',
    component: () => import('@/views/Login'),
    component: () => import('@/views/Login1'),
    meta: { title: '登录' },
  },
    {
src/views/Admin/components/msgEditMod.vue
@@ -415,20 +415,28 @@
    // 获取接收单位
    async getAreaUsers(){
      let t = this
      let res = await getAreaWithUserIfo()
      if(res.data.code == 100){
        if(res.data.data){
          // const treeD = []
          t.userTitTree(res.data.data)
          // treeD.push(t.findNodeById(res.data.data,t.userInfo.districtId))
          t.areaUsers = t.findNodeById(res.data.data,t.userInfo.districtId).children
          t.unittype = t.findNodeById(res.data.data,t.userInfo.districtId)?.type
        }else{
          console.log('暂无数据')
        }
      }else{
        this.$message.warning(res.data.msg);
      }
      // let res = await getAreaWithUserIfo()
      // if(res.data.code == 100){
      //   if(res.data.data){
      //     // const treeD = []
      //     const data = JSON.parse(localStorage.getItem('areaUsers'))
      //     console.log('data',data);
      //     console.log('res',res.data)
      //     t.userTitTree(res.data.data)
      //     // treeD.push(t.findNodeById(res.data.data,t.userInfo.districtId))
      //     t.areaUsers = t.findNodeById(res.data.data,t.userInfo.districtId).children
      //     t.unittype = t.findNodeById(res.data.data,t.userInfo.districtId)?.type
      //   }else{
      //     console.log('暂无数据')
      //   }
      // }else{
      //   this.$message.warning(res.data.msg);
      // }
      const data = JSON.parse(localStorage.getItem('areaUsers'))
      t.areaUsers = data;
      t.userTitTree(data)
      // t.areaUsers = t.findNodeById(data,t.userInfo.districtId).children
      t.unittype = t.findNodeById(data,t.userInfo.districtId)?.type
    },
    // 获取领导