zrj
2024-06-06 218132b51aa456002d7d9822fd363eaa508033a6
修改名称及首页展示修改
7 files modified
258 ■■■■■ changed files
src/api/user.js 2 ●●● patch | view | raw | blame | history
src/config/website.js 2 ●●● patch | view | raw | blame | history
src/lang/zh.js 4 ●●●● patch | view | raw | blame | history
src/page/index/top/top-notice.vue 110 ●●●● patch | view | raw | blame | history
src/page/login/index.vue 10 ●●●● patch | view | raw | blame | history
src/page/login/userlogin.vue 8 ●●●● patch | view | raw | blame | history
src/views/wel/index.vue 122 ●●●●● patch | view | raw | blame | history
src/api/user.js
@@ -124,7 +124,7 @@
});
export const logout = () => request({
  url: '/api/blade-auth/oauth/logout',
  url: '/api/oauth/logout',
  method: 'get',
  authorization: false
});
src/config/website.js
@@ -5,7 +5,7 @@
  title: "sword",
  logo: "J",
  key: "sword", //配置主键,目前用于存储
  indexTitle: "基层智治综合协同平台",
  indexTitle: "统一认证平台",
  clientId: "sword", // 客户端id
  clientSecret: "sword_secret", // 客户端密钥
  tenantMode: true, // 是否开启租户模式
src/lang/zh.js
@@ -1,5 +1,5 @@
export default {
  title: "基层智治综合协同平台",
  title: "统一认证平台",
  logoutTip: "退出系统, 是否继续?",
  submitText: "确定",
  cancelText: "取消",
@@ -78,7 +78,7 @@
  },
  login: {
    title: "登录 ",
    info: "基层智治综合协同平台",
    info: "统一认证平台",
    tenantId: "请输入租户ID",
    username: "请输入账号",
    password: "请输入密码",
src/page/index/top/top-notice.vue
@@ -105,31 +105,31 @@
          params.isRead = this.activeName
          params.userId = this.userInfo.user_id
          getMyMessage(page.current,page.size,params).then(res=>{
            const data = res.data.data
            const record = data.records
            record.forEach((item) => {
              item["tag"] = "查看"
              item["s"] = "查看"
            })
          // getMyMessage(page.current,page.size,params).then(res=>{
          //   const data = res.data.data
          //   const record = data.records
          //   record.forEach((item) => {
          //     item["tag"] = "查看"
          //     item["s"] = "查看"
          //   })
            this.data = record
          //   this.data = record
            if (params.isRead == 2){
              this.number = data.total
          //   if (params.isRead == 2){
          //     this.number = data.total
              if (data.total == 0){
                this.number = ""
              }
          //     if (data.total == 0){
          //       this.number = ""
          //     }
            }
          //   }
            if (data.total < 6) {
              this.finish = true
            } else {
              this.finish = false
            }
          })
          //   if (data.total < 6) {
          //     this.finish = true
          //   } else {
          //     this.finish = false
          //   }
          // })
        },
@@ -160,41 +160,41 @@
            this.$router.push({ path: '/task/index' })
        },
        createEventSource () {
            this.baseUrl = `${window.location.protocol}//${window.location.host}`
            var that = this
            if (window.EventSource) {
                this.source = new EventSource(
                    this.baseUrl +
                    "/api/sse/sse/connect?type=web&userId=1"
                )
                this.source.addEventListener(
                    "open",
                    function () {
                        console.log("建立连接。。。")
                    },
                    false
                )
                this.source.addEventListener("message", function (e) {
                    console.log("收到消息", e.data)
                    // const data = JSON.parse(e.data)
                    // that.number = data.count
                    // 获取消息列表
                    that.getNoticeNumber()
                })
                this.source.addEventListener(
                    "error",
                    function (e) {
                        if (e.readyState === EventSource.CLOSED) {
                            console.log("连接关闭")
                        } else {
                            console.log(e)
                        }
                    },
                    false
                )
            } else {
                console.log("你的浏览器不支持SSE")
            }
            // this.baseUrl = `${window.location.protocol}//${window.location.host}`
            // var that = this
            // if (window.EventSource) {
            //     this.source = new EventSource(
            //         this.baseUrl +
            //         "/api/sse/sse/connect?type=web&userId=1"
            //     )
            //     this.source.addEventListener(
            //         "open",
            //         function () {
            //             console.log("建立连接。。。")
            //         },
            //         false
            //     )
            //     this.source.addEventListener("message", function (e) {
            //         console.log("收到消息", e.data)
            //         // const data = JSON.parse(e.data)
            //         // that.number = data.count
            //         // 获取消息列表
            //         that.getNoticeNumber()
            //     })
            //     this.source.addEventListener(
            //         "error",
            //         function (e) {
            //             if (e.readyState === EventSource.CLOSED) {
            //                 console.log("连接关闭")
            //             } else {
            //                 console.log(e)
            //             }
            //         },
            //         false
            //     )
            // } else {
            //     console.log("你的浏览器不支持SSE")
            // }
        },
        pageChange (page, done) {
          let params = {}
src/page/login/index.vue
@@ -8,7 +8,7 @@
                </div>
                <!-- <img class="img" src="/img/logo.png" alt=""> -->
                <!-- <p class="title">{{ $t('login.info') }}</p> -->
                <p class="title">基层智治综合协同平台</p>
                <p class="title">统一认证平台</p>
            </div>
            <div class="login-border">
                <!-- <img class="img" src="/img/logo.png" alt=""> -->
@@ -21,12 +21,12 @@
                    <userLogin v-if="activeName === 'user'"></userLogin>
                    <!-- <codeLogin v-else-if="activeName==='code'"></codeLogin> -->
                    <thirdLogin v-else-if="activeName==='third'"></thirdLogin>
                    <div class="login-menu">
                    <!-- <div class="login-menu">
                        <a href="#" @click.stop="activeName='user'">{{ $t('login.userLogin') }}</a>
                        <a href="#" @click.stop="activeName='code'">{{ $t('login.phoneLogin') }}</a>
                        <a href="#" @click.stop="activeName='third'">{{ $t('login.thirdLogin') }}</a>
                        <a :href="website.ssoUrl + website.redirectUri">{{ $t('login.ssoLogin') }}</a>
                    </div>
                    </div> -->
                </div>
            </div>
@@ -73,10 +73,10 @@
        }
    },
    created () {
        document.title = "基层智治综合协同平台"
        document.title = "统一认证平台"
        setStore({
            name: "webTitle",
            content: '基层智治综合协同平台',
            content: '统一认证平台',
        })
        setStore({
src/page/login/userlogin.vue
@@ -229,12 +229,6 @@
  },
  props: [],
  methods: {
    async getAuthorize(params) {
      const response = await axios.get(
        "http://localhost:8100/oauth/authorize?client_id=sword&response_type=code&redirect_uri=https://www.baidu.com"
      );
      this.headers = response.headers;
    },
    // refreshCode () {
    //     if (this.website.captchaMode) {
    //         getCaptcha().then(res => {
@@ -305,7 +299,7 @@
                }
                this.$router.$avueRouter.formatRoutes(res.menuData, true);
                this.$router.push({ path: "/404" });
                this.$router.push({ path: res.fistMenu.path })
                loading.close();
              })
src/views/wel/index.vue
@@ -32,90 +32,52 @@
    created () {
        if (this.webType == 'secend') {
            // 住建局
            // if (this.globalUserInfo.role_name == 'zjj') {
            //     this.homeMenuData = [
            //         {
            //             imageUrl: 'img/yijianbaoj.png',
            //             url: '/propertySupervision/residentSupervision',
            //             title: '居民监管',
            //             newOpen: false,
            //         },
            //         {
            //             imageUrl: 'img/yijianbaoj.png',
            //             url: '/propertySupervision/houseHoldSupervision',
            //             title: '住房监管',
            //             newOpen: false,
            //         },
            //         {
            //             imageUrl: 'img/yijianbaoj.png',
            //             url: '/propertySupervision/ownersCommittee',
            //             title: '业主大会',
            //             newOpen: false,
            //         },
            //         {
            //             imageUrl: 'img/yijianbaoj.png',
            //             url: '/propertySupervision/propertyCapitalManage',
            //             title: '维修基金管理',
            //             newOpen: false,
            //         },
            //     ]
            // } else {
            //     // 物业
            //     this.homeMenuData = [
            //         {
            //             imageUrl: 'img/yijianbaoj.png',
            //             url: '/userHouse/houseHoldList',
            //             title: '住户管理',
            //             newOpen: false,
            //         },
            //     ]
            // }
        } else {
            this.homeMenuData = [
                {
                    imageUrl: 'img/yijianbaoj.png',
                    url: '/userHouse/houseHoldList',
                    title: '住户管理',
                    newOpen: false,
                },
                {
                    imageUrl: 'img/fangyi.png',
                    url: '/userHouse/houseList',
                    title: '房屋管理',
                    newOpen: false,
                },
                {
                    imageUrl: 'img/anjian.png',
                    url: '/cGovernance/taskECall',
                    title: 'E呼即办',
                    newOpen: false,
                },
                {
                    imageUrl: 'img/tiwen.png',
                    url: '/cGovernance/reportForRepairs',
                    title: '报事报修',
                    newOpen: false,
                },
                {
                    imageUrl: 'img/tongji.png',
                    url: '/cGovernance/gridWorkLog',
                    title: '走访日志',
                    newOpen: false,
                }
                // {
                //     imageUrl: 'img/yijianbaoj.png',
                //     url: '/userHouse/houseHoldList',
                //     title: '住户管理',
                //     newOpen: false,
                // },
                // {
                //     imageUrl: 'img/fangyi.png',
                //     url: '/userHouse/houseList',
                //     title: '房屋管理',
                //     newOpen: false,
                // },
                // {
                //     imageUrl: 'img/anjian.png',
                //     url: '/cGovernance/taskECall',
                //     title: 'E呼即办',
                //     newOpen: false,
                // },
                // {
                //     imageUrl: 'img/tiwen.png',
                //     url: '/cGovernance/reportForRepairs',
                //     title: '报事报修',
                //     newOpen: false,
                // },
                // {
                //     imageUrl: 'img/tongji.png',
                //     url: '/cGovernance/gridWorkLog',
                //     title: '走访日志',
                //     newOpen: false,
                // }
            ]
            if (this.globalUserInfo.role_name == 'administrator' ||
                this.globalUserInfo.role_name.indexOf('jdgly') != -1 ||
                this.globalUserInfo.role_name.indexOf('sqgly') != -1 ||
                this.globalUserInfo.role_name.split(',').find(item => item == 'admin')) {
                this.homeMenuData.push({
                    imageUrl: 'img/jsc.png',
                    url: `http://srgdjczzxtpt.com:2181/uniform-auth/login?app=app_smart_aoi&Blade-Auth=bearer ${getToken()}`,
                    title: '驾驶舱',
                    newOpen: true,
                })
            }
            // if (this.globalUserInfo.role_name == 'administrator' ||
            //     this.globalUserInfo.role_name.indexOf('jdgly') != -1 ||
            //     this.globalUserInfo.role_name.indexOf('sqgly') != -1 ||
            //     this.globalUserInfo.role_name.split(',').find(item => item == 'admin')) {
            //     this.homeMenuData.push({
            //         imageUrl: 'img/jsc.png',
            //         url: `http://srgdjczzxtpt.com:2181/uniform-auth/login?app=app_smart_aoi&Blade-Auth=bearer ${getToken()}`,
            //         title: '驾驶舱',
            //         newOpen: true,
            //     })
            // }
        }
    },