| | |
| | | # å¼åç¯å¢é
ç½® |
| | | NODE_ENV = 'development' |
| | | |
| | | # VUE_APP_API_URL = 'https://atwl.ahzyssl.com/zhyq_interface' |
| | | VUE_APP_SCREEN_URL_PREFIX = 'http://192.168.0.7/screen/#/' |
| | | |
| | | #VUE_APP_API_URL = 'http://192.168.1.82:10010' |
| | | |
| | | #VUE_APP_API_URL = 'http://localhost:10010' |
| | | VUE_APP_API_URL = 'http://192.168.0.7/system_gateway' |
| | | |
| | | VUE_APP_API_URL = 'http://localhost:10010' |
| | | |
| | | #keyï¼045542fc5f436b75e6c911c5c84ff8cd |
| | | #å¯é¥ï¼8bd38497f9aee2b75e7a888a4dfd1e6c |
| | | VUE_APP_AMAP_KEY='045542fc5f436b75e6c911c5c84ff8cd' |
| | |
| | | |
| | | VUE_APP_SCREEN_URL_PREFIX = 'http://192.168.0.7/screen/#/' |
| | | |
| | | |
| | |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| | | <meta name="viewport" content="width=device-width,initial-scale=1.0"> |
| | | <link rel="icon" href="<%= BASE_URL %>favicon.ico"> |
| | | <title> |
| | | title: process.env.VUE_APP_TITLE,</title> |
| | | <title>æºæ
§ååºå®æ¶ä¸ä½åç³»ç»</title> |
| | | </head> |
| | | <body> |
| | | <noscript> |
| | | <strong>We're sorry but èæ¹çèæºæ
§å®æ¶å®å
¨é²èç³»ç» doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> |
| | | </noscript> |
| | | <noscript> |
| | | <strong>We're sorry but æºæ
§ååºå®æ¶ä¸ä½åç³»ç» doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> |
| | | </noscript> |
| | | <div id="app"></div> |
| | | <!-- built files will be auto injected --> |
| | | </body> |
| | | </html> |
| | |
| | | } |
| | | // pcå·¥ä½å° |
| | | export function getWorkbenchData (data) { |
| | | return request.get('/visitsAdmin/cloudService/business/staging/pCWorkPlatformData', { |
| | | params: {...data } |
| | | }) |
| | | return request.get('/visitsAdmin/cloudService/business/staging/pCWorkPlatformData', data) |
| | | } |
| | |
| | | <div class="common-header"> |
| | | <div class="header"> |
| | | <div class="logo"> |
| | | <div class="title"> <img src="@/assets/system.png" alt="" />{{sysConfig.subtitle || title }}</div> |
| | | <div class="title">{{ title }}</div> |
| | | <div class="list"> |
| | | <div :class="index==currentIndex?'item active':'item'" v-for="(item,index) in topMenuList.list" :key="item.id" @click="getHeaderNav(item,index)" :index="index">{{item.label}} |
| | | <div v-if="index==currentIndex" class="linellae"></div> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="user"> |
| | | <div class="user-search"> |
| | | <div class="user-search-left"> |
| | | <span>å
¨é¨</span> |
| | | <img src="@/assets/icons/xl.png" alt=""> |
| | | </div> |
| | | <div class="user-search-right"> |
| | | <input type="text" placeholder="请è¾å
¥" /> |
| | | <img src="@/assets/icons/sousuo.png" alt=""> |
| | | </div> |
| | | </div> |
| | | <div class="user-images"> |
| | | <!-- <img src="@/assets/icons/ic_1.jpg" alt="">--> |
| | | <!-- <img src="@/assets/icons/ic_2.png" alt="">--> |
| | | <img src="@/assets/icons/ic_3.jpg" alt=""> |
| | | <img src="@/assets/icons/ic_4.jpg" alt=""> |
| | | <img src="@/assets/icons/ic_5.jpg" alt=""> |
| | | <!-- <img src="@/assets/icons/ic_6.jpg" alt="">--> |
| | | <img src="@/assets/icons/ic_7.jpg" alt=""> |
| | | <!-- <img src="@/assets/icons/ic_8.jpg" alt="">--> |
| | | </div> |
| | | <el-dropdown v-if="isLogined" trigger="click"> |
| | | <span class="el-dropdown-link" style="cursor: pointer; color: rgba(255,255,255,.56);"> |
| | | {{ userInfo | displayName }} |
| | | <i class="el-icon-arrow-down el-icon--right"></i> |
| | | </span> |
| | | <el-dropdown-menu slot="dropdown"> |
| | | <el-dropdown-item @click.native="changePwd">ä¿®æ¹å¯ç </el-dropdown-item> |
| | | <el-dropdown-item @click.native="logout">éåºç»å½</el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | | <!-- <el-dropdown v-if="isLogined" trigger="click">--> |
| | | <!-- <span class="el-dropdown-link">--> |
| | | <!-- <!– <img v-if="userInfo != null" :src="userInfo.avatar == null ? `${require('@/assets/avatar/man.png')}` : userInfo.avatar" alt="">{{userInfo | displayName}}<i class="el-icon-arrow-down el-icon--right"></i> –>--> |
| | | <!-- <img v-if="userInfo != null" style="width: 30px !important" src="@/assets/avatar/man.png" alt="" />{{--> |
| | | <!-- userInfo | displayName--> |
| | | <!-- }}<i class="el-icon-arrow-down el-icon--right"></i>--> |
| | | <!-- </span>--> |
| | | <!-- <el-dropdown-menu slot="dropdown">--> |
| | | <!-- <el-dropdown-item @click.native="changePwd">ä¿®æ¹å¯ç </el-dropdown-item>--> |
| | | <!-- <el-dropdown-item @click.native="logout">éåºç»å½</el-dropdown-item>--> |
| | | <!-- </el-dropdown-menu>--> |
| | | <!-- </el-dropdown>--> |
| | | <el-dropdown v-if="isLogined" trigger="click"> |
| | | <span class="el-dropdown-link"> |
| | | <!-- <img v-if="userInfo != null" :src="userInfo.avatar == null ? `${require('@/assets/avatar/man.png')}` : userInfo.avatar" alt="">{{userInfo | displayName}}<i class="el-icon-arrow-down el-icon--right"></i> --> |
| | | <img v-if="userInfo != null" style="width: 30px !important" src="@/assets/avatar/man.png" alt="" />{{ |
| | | userInfo | displayName |
| | | }}<i class="el-icon-arrow-down el-icon--right"></i> |
| | | </span> |
| | | <el-dropdown-menu slot="dropdown"> |
| | | <el-dropdown-item @click.native="changePwd">ä¿®æ¹å¯ç </el-dropdown-item> |
| | | <el-dropdown-item @click.native="logout">éåºç»å½</el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | | </div> |
| | | </div> |
| | | <!-- ä¿®æ¹å¯ç --> |
| | |
| | | show-password></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æ°å¯ç " prop="newPwd" required> |
| | | <el-input v-model="changePwdData.form.newPwd" type="password" placeholder="请è¾å
¥æ°å¯ç ï¼è³å°å
æ¬æ°åã大å忝ãå°å忝ãç¹æ®å符ä¸çä¸ç§å符ï¼ä¸è³å°8使°" |
| | | <el-input v-model="changePwdData.form.newPwd" type="password" placeholder="请è¾å
¥æ°å¯ç ï¼å¯ç éå
å«åæ¯ãæ°ååç¹æ®å符ä¸çè³å°ä¸¤ç§" |
| | | maxlength="20" show-password></el-input> |
| | | </el-form-item> |
| | | <!-- <div style="font-size: 12px;color:#999999">å¯ç éå
å«åæ¯ãæ°ååç¹æ®å符ä¸çè³å°ä¸¤ç§</div> --> |
| | |
| | | <script> |
| | | import { mapState, mapMutations } from 'vuex' |
| | | import GlobalAlertWindow from './GlobalAlertWindow' |
| | | import { getSystemConfig, logout, updatePwd } from '@/api/system/common' |
| | | import { logout, updatePwd } from '@/api/system/common' |
| | | import { getAppHeaderNav } from '@/api' |
| | | export default { |
| | | name: 'CommonHeader', |
| | |
| | | return { |
| | | title: process.env.VUE_APP_TITLE, |
| | | headerNavData: {}, |
| | | currentIndex: 0, |
| | | visible: { |
| | | // ä¿®æ¹å¯ç |
| | | changePwd: false |
| | |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapState(['menuData', 'userInfo', 'topMenuList', 'currentIndex', 'sysConfig']) |
| | | ...mapState(['menuData', 'userInfo', 'topMenuList']) |
| | | // title () { |
| | | // return this.$route.meta.title |
| | | // } |
| | | }, |
| | | created () { |
| | | this.getSystemConfig() |
| | | |
| | | }, |
| | | mounted () { |
| | | // needChangePwd 0 : é»è®¤å¯ç éè¦ä¿®æ¹ï¼1 ä¸éè¦ |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | ...mapMutations(['setUserInfo', 'switchCollapseMenu', 'clearUserInfo', 'setTopMenuCurrent', 'setCurrentIndex', 'setSysconfig']), |
| | | ...mapMutations(['setUserInfo', 'switchCollapseMenu', 'clearUserInfo', 'setTopMenuCurrent']), |
| | | // ä¿®æ¹å¯ç |
| | | changePwd () { |
| | | this.visible.changePwd = true |
| | |
| | | this.$refs.changePwdDataForm.resetFields() |
| | | }) |
| | | }, |
| | | getSystemConfig () { |
| | | if (!this.sysConfig.subTitle) { |
| | | getSystemConfig() |
| | | .then((res) => { |
| | | if (res && res.subtitle) { |
| | | this.setSysconfig(res) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | validatePassword (rule, value, callback) { |
| | | if (!value) { |
| | | callback(new Error('请è¾å
¥å¯ç ')) |
| | | } else { |
| | | // const lengthValid = /^.{6,20}$/.test(value) |
| | | // const hasLetter = /[a-zA-Z]/.test(value) |
| | | // const hasNumber = /[0-9]/.test(value) |
| | | // const hasSpecial = /[!@#$%^&*(),.?":{}|<>]/.test(value) |
| | | // |
| | | // const typesCount = [hasLetter, hasNumber, hasSpecial].filter(Boolean).length |
| | | // |
| | | // if (!lengthValid) { |
| | | // callback(new Error('å¯ç é¿åº¦é为6å°20个å符')) |
| | | // } else if (typesCount < 2) { |
| | | // callback(new Error('å¯ç éå
å«åæ¯ãæ°ååç¹æ®å符ä¸çè³å°ä¸¤ç§')) |
| | | // } else { |
| | | // callback() // éªè¯éè¿ |
| | | // } |
| | | let typeCount = 0 |
| | | if (/[a-z]/.test(value)) typeCount++ // å°å忝 |
| | | if (/[A-Z]/.test(value)) typeCount++ // 大å忝 |
| | | if (/\d/.test(value)) typeCount++ // æ°å |
| | | if (/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(value)) typeCount++ // ç¹æ®å符 |
| | | if (typeCount >= 3) { |
| | | callback() |
| | | const lengthValid = /^.{6,20}$/.test(value) |
| | | const hasLetter = /[a-zA-Z]/.test(value) |
| | | const hasNumber = /[0-9]/.test(value) |
| | | const hasSpecial = /[!@#$%^&*(),.?":{}|<>]/.test(value) |
| | | |
| | | const typesCount = [hasLetter, hasNumber, hasSpecial].filter(Boolean).length |
| | | |
| | | if (!lengthValid) { |
| | | callback(new Error('å¯ç é¿åº¦é为6å°20个å符')) |
| | | } else if (typesCount < 2) { |
| | | callback(new Error('å¯ç éå
å«åæ¯ãæ°ååç¹æ®å符ä¸çè³å°ä¸¤ç§')) |
| | | } else { |
| | | callback(new Error('è³å°å
æ¬æ°åã大å忝ãå°å忝ãç¹æ®å符ä¸çä¸ç§å符ï¼ä¸è³å°8使°')) |
| | | callback() // éªè¯éè¿ |
| | | } |
| | | } |
| | | }, |
| | | getHeaderNav (item, index) { |
| | | this.setCurrentIndex(index) |
| | | if (item.linkType === 0) { |
| | | getHeaderNav (item,index) { |
| | | this.currentIndex = index |
| | | if(item.linkType === 0){ |
| | | this.setTopMenuCurrent(item) |
| | | } else { |
| | | }else{ |
| | | if (item.url && item.url === 'goHKAF' && item.params != null) { |
| | | this.getHKAFHeaderNav(item.params, item.label) |
| | | this.getHKAFHeaderNav(item.params) |
| | | } else if (item.url && item.url.indexOf('http') === 0) { |
| | | window.open(item.url, '_blank') |
| | | } |
| | | } |
| | | }, |
| | | getHKAFHeaderNav (type, label) { |
| | | getHKAFHeaderNav (type) { |
| | | getAppHeaderNav(type).then(res => { |
| | | if (label === 'å®é²ä¸å¿') { |
| | | const openWindow = window.open(res, '_blank') |
| | | // setTimeout(() => { |
| | | // openWindow.close() |
| | | // }, 7 * 1000) |
| | | } else { |
| | | window.open(res, '_blank') |
| | | } |
| | | window.open(res, '_blank') |
| | | }) |
| | | }, |
| | | handleTest () { |
| | |
| | | newPwd: this.changePwdData.form.newPwd |
| | | }) |
| | | .then(() => { |
| | | console.log('ä¿®æ¹æå') |
| | | this.$tip.apiSuccess('ä¿®æ¹æå') |
| | | // this.$store.commit('setUserInfo', { needChangePwd: 1 }) |
| | | this.$store.commit('setUserInfo', { needChangePwd: 1 }) |
| | | this.visible.changePwd = false |
| | | }) |
| | | .catch(e => { |
| | |
| | | @import "@/assets/style/variables.scss"; |
| | | |
| | | .common-header { |
| | | background-color: #1E7FFF; |
| | | background-color: #2080f7; |
| | | } |
| | | |
| | | .list { |
| | |
| | | display: flex; |
| | | align-items: center; |
| | | .item { |
| | | margin-right: 24px; |
| | | margin-right: 40px; |
| | | font-size: 16px; |
| | | font-weight: 400; |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | justify-content: flex-start; |
| | | height: 49px; |
| | | height: 40px; |
| | | cursor: pointer; |
| | | |
| | | .linellae { |
| | |
| | | box-sizing: border-box; |
| | | min-width: 360px; |
| | | height: 56px; |
| | | padding: 10px 12px; |
| | | padding: 10px 30px; |
| | | // flex-shrink: 0; |
| | | line-height: 36px; |
| | | font-size: 22px; |
| | |
| | | align-items: center; |
| | | |
| | | .title { |
| | | display: flex; |
| | | color: rgb(255, 255, 255); |
| | | font-size: 18px; |
| | | font-weight: 700; |
| | | font-family: "Microsoft Yahei", "sans-serif", "segoe UI", "PingFang SC", arial, Helvetica; |
| | | //font-size: 18px; |
| | | //width: 320px; |
| | | img{ |
| | | width:auto ; |
| | | height: 32px; |
| | | margin-right: 5px; |
| | | } |
| | | width: 320px; |
| | | } |
| | | |
| | | // display: inline; |
| | |
| | | } |
| | | |
| | | .user { |
| | | /*width: 152px;*/ |
| | | width: 152px; |
| | | box-sizing: border-box; |
| | | height: 56px; |
| | | padding-right: 25px; |
| | | /*background: url("../../assets/images/top_ic_bolang@2x.png") no-repeat;*/ |
| | | background: url("../../assets/images/top_ic_bolang@2x.png") no-repeat; |
| | | flex-shrink: 0; |
| | | text-align: right; |
| | | display: flex; |
| | | align-items: center; |
| | | .user-search { |
| | | width: 346px; |
| | | height: 32px; |
| | | border-radius: 30px; |
| | | border: 1px solid rgba(255,255,255,.56); |
| | | margin-right: 15px; |
| | | display: flex; |
| | | align-items: center; |
| | | .user-search-left { |
| | | flex-shrink: 0; |
| | | width: 106px; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | span { |
| | | font-size: 14px; |
| | | font-weight: 400; |
| | | color: rgba(255,255,255,.56); |
| | | margin-right: 10px; |
| | | } |
| | | img { |
| | | top: 0; |
| | | margin: 0; |
| | | width: 20px; |
| | | height: 16px; |
| | | } |
| | | } |
| | | .user-search-right { |
| | | flex: 1; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | padding-right: 10px; |
| | | box-sizing: border-box; |
| | | input { |
| | | flex: 1; |
| | | height: 100%; |
| | | font-size: 14px; |
| | | font-weight: 400; |
| | | color: rgba(255,255,255,.56); |
| | | border: none; |
| | | outline: none; |
| | | background-color: rgba(0,0,0,0); |
| | | &::placeholder { |
| | | color: rgba(255,255,255,.56); |
| | | } |
| | | } |
| | | img { |
| | | top: 0; |
| | | margin: 0; |
| | | width: 20px; |
| | | height: 20px; |
| | | } |
| | | } |
| | | } |
| | | .user-images { |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | img { |
| | | top: 0 !important; |
| | | width: 18px; |
| | | height: 18px; |
| | | margin-right: 12px; |
| | | } |
| | | } |
| | | cursor: pointer; |
| | | |
| | | .el-dropdown { |
| | | top: 2px; |
| | | color: #fff; |
| | |
| | | router, |
| | | store, |
| | | computed: { |
| | | ...mapState(['userInfo', 'homePage','topMenuCurrent','menuData']) |
| | | ...mapState(['userInfo', 'homePage', 'topMenuCurrent', 'menuData']) |
| | | }, |
| | | watch: { |
| | | async userInfo () { |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | ...mapMutations(['switchCollapseMenu', 'setCurrentIndex', 'setHomePage', 'setTopMenuCurrent', 'setTopMenuCurrent','cleartagsview']), |
| | | ...mapMutations(['switchCollapseMenu', 'setCurrentIndex', 'setHomePage', 'setTopMenuCurrent', 'setTopMenuCurrent', 'cleartagsview']), |
| | | // åå§åæ¬å°é
ç½® |
| | | initLocalConfig () { |
| | | // èåç¶æé
ç½® |
| | |
| | | this.setHomePage(storeMenus[0]) |
| | | } |
| | | await fetchMenuTree() |
| | | .then(allmenus => { |
| | | // æ·»å èå |
| | | var topList = allmenus.filter(item => { |
| | | return item.type === 1 |
| | | }) |
| | | storeTopMenus.push.apply(storeTopMenus, topList) |
| | | var topCurrent = null |
| | | var tlist =[] |
| | | topList.forEach(item => { |
| | | if (item.linkType === 0 ) { |
| | | if (topCurrent == null) { |
| | | topCurrent = item |
| | | } |
| | | tlist.push(...item.children) |
| | | .then(allmenus => { |
| | | // æ·»å èå |
| | | var topList = allmenus.filter(item => { |
| | | return item.type === 1 |
| | | }) |
| | | storeTopMenus.push.apply(storeTopMenus, topList) |
| | | var topCurrent = null |
| | | var tlist = [] |
| | | topList.forEach(item => { |
| | | if (item.linkType === 0) { |
| | | if (topCurrent == null) { |
| | | topCurrent = item |
| | | } |
| | | }) |
| | | if (this.$route.query && this.$route.query.menuparams) { |
| | | let menu = topList.filter(item => item.params === this.$route.query.menuparams) |
| | | this.setTopMenuCurrent(menu[0]) |
| | | this.setCurrentIndex(topList.findIndex(obj => obj.params === this.$route.query.menuparams)) |
| | | } else { |
| | | this.setTopMenuCurrent(topCurrent) |
| | | this.setCurrentIndex(0) |
| | | } |
| | | // console.log(topList) |
| | | // var menus = [] |
| | | // topList.forEach(item => { |
| | | // console.log(topCurrent.id, item.id) |
| | | // if (item.id == this.topMenuCurrent.id) { |
| | | // menus = item.children |
| | | // } |
| | | // }) |
| | | console.log('menus', this.menuData.list) |
| | | storeMenus.push.apply(storeMenus, this.menuData.list) |
| | | // æ·»å è·¯ç± |
| | | this.__addRouters(tlist) |
| | | // 404 |
| | | router.addRoute({ |
| | | path: '*', |
| | | redirect: '/not-found' |
| | | }) |
| | | // é¦é¡µ |
| | | router.addRoute({ |
| | | name: 'index', |
| | | path: '/', |
| | | redirect: this.homePage.url |
| | | }) |
| | | // è·¯ç±å è½½å®æåï¼å¦æè®¿é®çæ¯/ï¼è·³è½¬è³å¨æè¯å«çé¦é¡µ |
| | | if (this.$route.query && this.$route.query.menuparams) { |
| | | this.$router.push(topList.filter(item => item.params === this.$route.query.menuparams)[0].homeUrl) |
| | | } else if (this.$route.path === '/') { |
| | | this.$router.push(this.homePage.url) |
| | | tlist.push(...item.children) |
| | | } |
| | | }) |
| | | .catch(e => { |
| | | throw e |
| | | if (this.$route.query && this.$route.query.menuparams) { |
| | | const menu = topList.filter(item => item.params === this.$route.query.menuparams) |
| | | this.setTopMenuCurrent(menu[0]) |
| | | this.setCurrentIndex(topList.findIndex(obj => obj.params === this.$route.query.menuparams)) |
| | | } else { |
| | | this.setTopMenuCurrent(topCurrent) |
| | | this.setCurrentIndex(0) |
| | | } |
| | | // console.log(topList) |
| | | // var menus = [] |
| | | // topList.forEach(item => { |
| | | // console.log(topCurrent.id, item.id) |
| | | // if (item.id == this.topMenuCurrent.id) { |
| | | // menus = item.children |
| | | // } |
| | | // }) |
| | | console.log('menus', this.menuData.list) |
| | | storeMenus.push.apply(storeMenus, this.menuData.list) |
| | | // æ·»å è·¯ç± |
| | | this.__addRouters(tlist) |
| | | // 404 |
| | | router.addRoute({ |
| | | path: '*', |
| | | redirect: '/not-found' |
| | | }) |
| | | .finally(() => { |
| | | this.loading = false |
| | | // é¦é¡µ |
| | | router.addRoute({ |
| | | name: 'index', |
| | | path: '/', |
| | | redirect: this.homePage.url |
| | | }) |
| | | // è·¯ç±å è½½å®æåï¼å¦æè®¿é®çæ¯/ï¼è·³è½¬è³å¨æè¯å«çé¦é¡µ |
| | | if (this.$route.query && this.$route.query.menuparams) { |
| | | this.$router.push(topList.filter(item => item.params === this.$route.query.menuparams)[0].homeUrl) |
| | | } else if (this.$route.path === '/') { |
| | | this.$router.push(this.homePage.url) |
| | | } |
| | | }) |
| | | .catch(e => { |
| | | throw e |
| | | }) |
| | | .finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | async chagneRoutes () { |
| | | // éç½®èå |
| | |
| | | console.log('menus', this.menuData.list) |
| | | // æ·»å è·¯ç± |
| | | // this.__addRouters(this.menuData.list) |
| | | if(this.topMenuCurrent.homeUrl){ |
| | | await this.$router.push({path: this.topMenuCurrent.homeUrl, query: {}}) |
| | | if (this.topMenuCurrent.homeUrl) { |
| | | await this.$router.push({ path: this.topMenuCurrent.homeUrl, query: {} }) |
| | | } |
| | | }, |
| | | // æ°å»ºè·¯ç± |
| | |
| | | return |
| | | } |
| | | await this.initRoutes() |
| | | .catch(() => {}) |
| | | .catch(() => {}) |
| | | }, |
| | | mounted () { |
| | | this.initLocalConfig() |
| | |
| | | import Vue from 'vue' |
| | | import Vuex from 'vuex' |
| | | import router from '../router' |
| | | Vue.use(Vuex) |
| | | |
| | | const state = { |
| | | // ç»å½ç¨æ·ä¿¡æ¯ |
| | | userInfo: null, |
| | | tableHeightNew: 300, |
| | | sysConfig: { title: '', subtitle: '' }, |
| | | primaryColor: '#2080f7', |
| | | // é¦é¡µ |
| | | homePage: null, |
| | |
| | | // tagsæ°ç» |
| | | tags: [], |
| | | // tagsviewæ ç¾æ¾ç¤ºéè |
| | | isCollapse: false, |
| | | // é¡¶é¨èåç´¢å¼ |
| | | currentIndex: 0 |
| | | isCollapse: false |
| | | } |
| | | |
| | | const mutations = { |
| | | // 设置顶é¨èåç´¢å¼ |
| | | setCurrentIndex (state, index) { |
| | | console.log('设置顶é¨èåç´¢å¼', index) |
| | | state.currentIndex = index |
| | | }, |
| | | setSysconfig (state, config) { |
| | | state.sysConfig = { title: config.title || '', subtitle: config.subtitle || '' } |
| | | document.title = state.sysConfig.title+ state.sysConfig.subtitle |
| | | }, |
| | | // 忢èåç¶æ |
| | | switchCollapseMenu (state, value) { |
| | | if (value != null) { |
| | |
| | | }, |
| | | // 设置é¦é¡µè·¯ç±ä¿¡æ¯ |
| | | setTopMenuCurrent (state, current) { |
| | | console.log('setTopMenuCurrent', current) |
| | | if (current.id !== state.topMenuCurrent.id) { |
| | | console.log("setTopMenuCurrent",current) |
| | | if(current.id !== state.topMenuCurrent.id){ |
| | | state.topMenuList.list.forEach(item => { |
| | | console.log(item.id, item.id) |
| | | if (current.id == item.id) { |
| | |
| | | }, |
| | | // éç½®èå |
| | | resetMenus: (state) => { |
| | | state.topMenuId = null |
| | | state.topMenuId=null; |
| | | state.menuData.list = [] |
| | | }, |
| | | // tags |
| | |
| | | // findindexæ¾è§æ ï¼å¾ªç¯å¤æä¸ä¸ï¼å¦æçäºé£ä¹å°±ä»£è¡¨æç¸åçï¼å°±ä¸å¿
æ·»å ï¼å¦ææ¾ä¸å°é£å°±æ¯-1.就添å |
| | | // state.tags = [{ ...val, keepAlive: false }] |
| | | const result = state.tags.findIndex(item => item.index === val.index) |
| | | if (result === -1) { |
| | | if (result === -1) { |
| | | state.tags.push({ ...val, keepAlive: false }) |
| | | } else { |
| | | state.tags[result] = { ...val, keepAlive: false } |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import * as echarts from 'echarts' |
| | | import { getInParkUserData, getRataList, getReportList, reportExportExcel } from '@/api/business' |
| | | export default { |
| | | data() { |
| | | return { |
| | | info: null, |
| | | isGroupBy: 0, |
| | | radio: 'month', |
| | | value: '', |
| | | dateType: 'month', |
| | | date: '', |
| | | date1: '', |
| | | import * as echarts from 'echarts' |
| | | import { getInParkUserData, getRataList, getReportList, reportExportExcel } from '@/api/business' |
| | | export default { |
| | | data () { |
| | | return { |
| | | info: null, |
| | | isGroupBy: 0, |
| | | radio: 'month', |
| | | value: '', |
| | | dateType: 'month', |
| | | date: '', |
| | | date1: '', |
| | | |
| | | listZB: [], |
| | | column: [], |
| | | list: [] |
| | | } |
| | | }, |
| | | mounted() { |
| | | var now = new Date(); |
| | | var year = now.getFullYear(); |
| | | var month = now.getMonth() + 1 > 9 ? now.getMonth() + 1 : `0${now.getMonth() + 1}`; |
| | | this.value = `${year}-${month}` |
| | | this.date1 = `${year}-${month}` |
| | | listZB: [], |
| | | column: [], |
| | | list: [] |
| | | } |
| | | }, |
| | | mounted () { |
| | | var now = new Date() |
| | | var year = now.getFullYear() |
| | | var month = now.getMonth() + 1 > 9 ? now.getMonth() + 1 : `0${now.getMonth() + 1}` |
| | | this.value = `${year}-${month}` |
| | | this.date1 = `${year}-${month}` |
| | | |
| | | this.getData() |
| | | this.getRataLists() |
| | | this.getReportLists() |
| | | }, |
| | | methods: { |
| | | // å¯¼åº |
| | | daochu () { |
| | | reportExportExcel({ dateStr: this.date1, isGroupBy: this.isGroupBy, type: 1 }).then(res => { |
| | | this.download(res) |
| | | }) |
| | | }, |
| | | methods: { |
| | | // å¯¼åº |
| | | daochu() { |
| | | reportExportExcel({ dateStr: this.date1, isGroupBy: this.isGroupBy, type: 1 }).then(res => { |
| | | this.download(res) |
| | | changeBB () { |
| | | if (this.radio === 'month') { |
| | | const now = new Date() |
| | | const year = now.getFullYear() |
| | | const month = now.getMonth() + 1 > 9 ? now.getMonth() + 1 : `0${now.getMonth() + 1}` |
| | | this.date1 = `${year}-${month}` |
| | | } else { |
| | | const now = new Date() |
| | | const year = now.getFullYear() |
| | | this.date1 = `${year}` |
| | | } |
| | | this.getReportLists() |
| | | }, |
| | | // å
¥å车è¾ç»è®¡è¡¨ |
| | | getReportLists () { |
| | | getReportList({ dateStr: this.date1, isGroupBy: this.isGroupBy, type: 1 }) |
| | | .then(res => { |
| | | if (!res || res.length === 0) { |
| | | this.column = [] |
| | | this.list = [] |
| | | return |
| | | } |
| | | this.column = res[0] |
| | | this.list = res.slice(1).map(row => { |
| | | const obj = {} |
| | | this.column.forEach((header, index) => { |
| | | obj[header] = row[index] |
| | | }) |
| | | return obj |
| | | }) |
| | | // if (res.length === 0) { |
| | | // this.column = [] |
| | | // this.list = [] |
| | | // return |
| | | // } |
| | | // |
| | | // this.column = res[0] |
| | | // this.list = res.slice(1, res.length); |
| | | }) |
| | | }, |
| | | changeBB() { |
| | | if (this.radio === 'month') { |
| | | let now = new Date(); |
| | | let year = now.getFullYear(); |
| | | let month = now.getMonth() + 1 > 9 ? now.getMonth() + 1 : `0${now.getMonth() + 1}`; |
| | | this.date1 = `${year}-${month}` |
| | | } else { |
| | | let now = new Date(); |
| | | let year = now.getFullYear(); |
| | | this.date1 = `${year}` |
| | | } |
| | | this.getReportLists() |
| | | }, |
| | | // å
¥å车è¾ç»è®¡è¡¨ |
| | | getReportLists() { |
| | | getReportList({ dateStr: this.date1, isGroupBy: this.isGroupBy, type: 1 }) |
| | | .then(res => { |
| | | if (res.length === 0) { |
| | | this.column = [] |
| | | this.list = [] |
| | | return |
| | | } |
| | | |
| | | this.column = res[0] |
| | | |
| | | this.list = res.slice(1).map(row => { |
| | | const obj = {}; |
| | | this.column.forEach((header, index) => { |
| | | obj[header] = row[index]; |
| | | }); |
| | | return obj; |
| | | }); |
| | | |
| | | // if (res.length === 0) { |
| | | // this.column = [] |
| | | // this.list = [] |
| | | // return |
| | | // } |
| | | // |
| | | // this.column = res[0] |
| | | // this.list = res.slice(1, res.length); |
| | | }) |
| | | }, |
| | | changeDateType() { |
| | | if (this.dateType === 'month') { |
| | | let now = new Date(); |
| | | let year = now.getFullYear(); |
| | | let month = now.getMonth() + 1 > 9 ? now.getMonth() + 1 : `0${now.getMonth() + 1}`; |
| | | this.value = `${year}-${month}` |
| | | } else { |
| | | let now = new Date(); |
| | | let year = now.getFullYear(); |
| | | this.value = `${year}` |
| | | } |
| | | this.getRataLists() |
| | | }, |
| | | // 车è¾åç±»ç»è®¡ |
| | | getRataLists() { |
| | | getRataList({ dateStr: this.value, isGroupBy: this.isGroupBy, type: 1 }) |
| | | .then(res => { |
| | | this.listZB = res |
| | | // this.$nextTick(() => { |
| | | // this.initDept() |
| | | // }) |
| | | setTimeout(() => { |
| | | this.initDept() |
| | | }, 1000) |
| | | }) |
| | | }, |
| | | // åºç¡æ°æ® |
| | | getData() { |
| | | getInParkUserData({ isGroupBy: this.isGroupBy, type: 1 }).then(res => { |
| | | this.info = res |
| | | }, |
| | | changeDateType () { |
| | | if (this.dateType === 'month') { |
| | | const now = new Date() |
| | | const year = now.getFullYear() |
| | | const month = now.getMonth() + 1 > 9 ? now.getMonth() + 1 : `0${now.getMonth() + 1}` |
| | | this.value = `${year}-${month}` |
| | | } else { |
| | | const now = new Date() |
| | | const year = now.getFullYear() |
| | | this.value = `${year}` |
| | | } |
| | | this.getRataLists() |
| | | }, |
| | | // 车è¾åç±»ç»è®¡ |
| | | getRataLists () { |
| | | getRataList({ dateStr: this.value, isGroupBy: this.isGroupBy, type: 1 }) |
| | | .then(res => { |
| | | this.listZB = res |
| | | // this.$nextTick(() => { |
| | | // this.initType() |
| | | // this.initDept() |
| | | // }) |
| | | setTimeout(() => { |
| | | this.initType() |
| | | this.initDept() |
| | | }, 1000) |
| | | }) |
| | | }, |
| | | // å
¨å¹´å
¥å车è¾è¶å¿ |
| | | initType() { |
| | | if (!this.info.cumulativeDataList) return |
| | | }, |
| | | // åºç¡æ°æ® |
| | | getData () { |
| | | getInParkUserData({ isGroupBy: this.isGroupBy, type: 1 }).then(res => { |
| | | this.info = res |
| | | // this.$nextTick(() => { |
| | | // this.initType() |
| | | // }) |
| | | setTimeout(() => { |
| | | this.initType() |
| | | }, 1000) |
| | | }) |
| | | }, |
| | | // å
¨å¹´å
¥å车è¾è¶å¿ |
| | | initType () { |
| | | if (!this.info.cumulativeDataList) return |
| | | |
| | | const myChart = echarts.init(document.querySelector('.echart1')) |
| | | const myChart = echarts.init(document.querySelector('.echart1')) |
| | | |
| | | let names = this.info.cumulativeDataList.map(item => item.name) |
| | | let datas = this.info.cumulativeDataList.map(item => item.total) |
| | | const names = this.info.cumulativeDataList.map(item => item.name) |
| | | const datas = this.info.cumulativeDataList.map(item => item.total) |
| | | |
| | | let option = { |
| | | grid: { |
| | | left: '0%', |
| | | right: '5%', |
| | | bottom: '10%', |
| | | top: '10%', |
| | | containLabel: true |
| | | const option = { |
| | | grid: { |
| | | left: '0%', |
| | | right: '5%', |
| | | bottom: '10%', |
| | | top: '10%', |
| | | containLabel: true |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { |
| | | type: 'line' |
| | | } |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | data: names |
| | | }, |
| | | yAxis: { |
| | | type: 'value', |
| | | axisLine: { |
| | | show: true |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { |
| | | type: 'line' |
| | | axisLabel: { |
| | | formatter: function (value) { |
| | | // åèäºå
¥å°æè¿çæ´æ° |
| | | return Math.round(value) |
| | | } |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | data: names |
| | | }, |
| | | yAxis: { |
| | | type: 'value', |
| | | axisLine: { |
| | | show: true |
| | | }, |
| | | axisLabel: { |
| | | formatter: function (value) { |
| | | // åèäºå
¥å°æè¿çæ´æ° |
| | | return Math.round(value); |
| | | } |
| | | }, |
| | | graphic: { |
| | | elements: [ |
| | | { |
| | | type: 'text', |
| | | left: 'left', |
| | | top: 'top', |
| | | style: { |
| | | text: 'äººåæ°', |
| | | textAlign: 'center', |
| | | fill: '#333' |
| | | } |
| | | } |
| | | }, |
| | | graphic: { |
| | | elements: [ |
| | | { |
| | | type: 'text', |
| | | left: 'left', |
| | | top: 'top', |
| | | style: { |
| | | text: 'äººåæ°', |
| | | textAlign: 'center', |
| | | fill: '#333' |
| | | } |
| | | } |
| | | ] |
| | | }, |
| | | series: [ |
| | | { |
| | | data: datas, |
| | | type: 'line', |
| | | areaStyle: { |
| | | normal: { |
| | | color: { |
| | | x: 0, |
| | | y: 0, |
| | | x2: 0, |
| | | y2: 1, |
| | | colorStops: [{ |
| | | offset: 0, |
| | | color: '#207FF7' // 0% å¤çé¢è² |
| | | }, { |
| | | offset: 1, |
| | | color: 'rgba(255,255,255,.2)' // 100% å¤çé¢è² |
| | | }], |
| | | globalCoord: false // 缺ç为 false |
| | | } |
| | | } |
| | | }, |
| | | lineStyle: { // çº¿æ¡æ ·å¼ |
| | | ] |
| | | }, |
| | | series: [ |
| | | { |
| | | data: datas, |
| | | type: 'line', |
| | | areaStyle: { |
| | | normal: { |
| | | color: { |
| | | type: 'linear', |
| | | x: 0, |
| | | y: 0, |
| | | x2: 0, |
| | | y2: 1, |
| | | colorStops: [{ |
| | | offset: 0, color: '#207FF7' // 0% å¤çé¢è² |
| | | offset: 0, |
| | | color: '#207FF7' // 0% å¤çé¢è² |
| | | }, { |
| | | offset: 1, color: '#207FF7' // 100% å¤çé¢è² |
| | | }] |
| | | }, |
| | | width: 2 // 线æ¡ç²ç» |
| | | offset: 1, |
| | | color: 'rgba(255,255,255,.2)' // 100% å¤çé¢è² |
| | | }], |
| | | globalCoord: false // 缺ç为 false |
| | | } |
| | | } |
| | | }, |
| | | lineStyle: { // çº¿æ¡æ ·å¼ |
| | | color: { |
| | | type: 'linear', |
| | | x: 0, |
| | | y: 0, |
| | | x2: 0, |
| | | y2: 1, |
| | | colorStops: [{ |
| | | offset: 0, color: '#207FF7' // 0% å¤çé¢è² |
| | | }, { |
| | | offset: 1, color: '#207FF7' // 100% å¤çé¢è² |
| | | }] |
| | | }, |
| | | symbol: 'circle', |
| | | symbolSize: 10, |
| | | itemStyle: { |
| | | borderWidth: 1, |
| | | borderColor: '#fff', |
| | | color: '#207FF7' |
| | | }, |
| | | smooth: false |
| | | } |
| | | ] |
| | | } |
| | | myChart.setOption(option) |
| | | window.addEventListener('resize', function () { // æ§è¡ |
| | | myChart.resize() |
| | | }) |
| | | }, |
| | | // 车è¾åç±»ç»è®¡ |
| | | initDept() { |
| | | if (!this.listZB) return |
| | | |
| | | const dom = document.getElementById('echart2') |
| | | console.log(dom) |
| | | const myChart = echarts.init(dom) |
| | | |
| | | let data = this.listZB.map(item => { |
| | | return { |
| | | value: item.total, |
| | | name: item.name |
| | | width: 2 // 线æ¡ç²ç» |
| | | }, |
| | | symbol: 'circle', |
| | | symbolSize: 10, |
| | | itemStyle: { |
| | | borderWidth: 1, |
| | | borderColor: '#fff', |
| | | color: '#207FF7' |
| | | }, |
| | | smooth: false |
| | | } |
| | | }) |
| | | ] |
| | | } |
| | | myChart.setOption(option) |
| | | window.addEventListener('resize', function () { // æ§è¡ |
| | | myChart.resize() |
| | | }) |
| | | }, |
| | | // 车è¾åç±»ç»è®¡ |
| | | initDept () { |
| | | if (!this.listZB) return |
| | | |
| | | let option = { |
| | | tooltip: { |
| | | trigger: 'item', |
| | | }, |
| | | legend: { |
| | | show: false, |
| | | orient: 'vertical', |
| | | left: 'left' |
| | | }, |
| | | series : [ |
| | | { |
| | | name: 'è®¿é®æ¥æº', |
| | | type: 'pie', |
| | | radius: ['34%', '50%'], |
| | | labelLine: { |
| | | normal: { |
| | | length: 30, |
| | | length2: 70, |
| | | const dom = document.getElementById('echart2') |
| | | console.log(dom) |
| | | const myChart = echarts.init(dom) |
| | | |
| | | const data = this.listZB.map(item => { |
| | | return { |
| | | value: item.total, |
| | | name: item.name |
| | | } |
| | | }) |
| | | |
| | | const option = { |
| | | tooltip: { |
| | | trigger: 'item' |
| | | }, |
| | | legend: { |
| | | show: false, |
| | | orient: 'vertical', |
| | | left: 'left' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: 'è®¿é®æ¥æº', |
| | | type: 'pie', |
| | | radius: ['34%', '50%'], |
| | | labelLine: { |
| | | normal: { |
| | | length: 30, |
| | | length2: 70 |
| | | } |
| | | }, |
| | | label: { |
| | | formatter: '{a|{b}} {d}%', |
| | | rich: { |
| | | a: { |
| | | color: '#333333', |
| | | fontSize: 14, |
| | | fontWeight: 500 |
| | | } |
| | | }, |
| | | label: { |
| | | formatter: "{a|{b}} {d}%", |
| | | rich: { |
| | | a: { |
| | | color: '#333333', |
| | | fontSize: 14, |
| | | fontWeight: 500 |
| | | } |
| | | }, |
| | | padding: [0,-50,20,-100] |
| | | }, |
| | | data: data |
| | | } |
| | | ] |
| | | } |
| | | myChart.setOption(option) |
| | | window.addEventListener('resize', function () { // æ§è¡ |
| | | myChart.resize() |
| | | }) |
| | | }, |
| | | initDept3() { |
| | | const myChart = echarts.init(document.querySelector('#echart3')) |
| | | |
| | | let option = { |
| | | grid: { |
| | | left: '5%', |
| | | right: '10%', |
| | | bottom: '0%', |
| | | top: '20%', |
| | | containLabel: true |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | data: [150, 230, 224, 218, 135, 147, 260], |
| | | type: 'line' |
| | | } |
| | | ] |
| | | } |
| | | myChart.setOption(option) |
| | | window.addEventListener('resize', function () { // æ§è¡ |
| | | myChart.resize() |
| | | }) |
| | | padding: [0, -50, 20, -100] |
| | | }, |
| | | data: data |
| | | } |
| | | ] |
| | | } |
| | | myChart.setOption(option) |
| | | window.addEventListener('resize', function () { // æ§è¡ |
| | | myChart.resize() |
| | | }) |
| | | }, |
| | | initDept3 () { |
| | | const myChart = echarts.init(document.querySelector('#echart3')) |
| | | |
| | | const option = { |
| | | grid: { |
| | | left: '5%', |
| | | right: '10%', |
| | | bottom: '0%', |
| | | top: '20%', |
| | | containLabel: true |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | data: [150, 230, 224, 218, 135, 147, 260], |
| | | type: 'line' |
| | | } |
| | | ] |
| | | } |
| | | myChart.setOption(option) |
| | | window.addEventListener('resize', function () { // æ§è¡ |
| | | myChart.resize() |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | |
| | | |
| | | .main_table { |
| | | display: flex; |
| | | align-items: start; |
| | | align-items: flex-start; |
| | | justify-content: space-between; |
| | | margin-top: 10px; |
| | | .main_table_list { |
| | |
| | | padding: 20px; |
| | | box-sizing: border-box; |
| | | /*border-right: 12px solid #f7f7f7;*/ |
| | | |
| | | |
| | | .echart1 { |
| | | width: 100%; |
| | |
| | | return |
| | | } |
| | | |
| | | if (!res || res.length === 0) { |
| | | this.column = [] |
| | | this.list = [] |
| | | return |
| | | } |
| | | |
| | | this.column = res[0] |
| | | |
| | | this.list = res.slice(1).map(row => { |
| | |
| | | |
| | | .main_table { |
| | | display: flex; |
| | | align-items: start; |
| | | align-items: flex-start; |
| | | justify-content: space-between; |
| | | margin-top: 10px; |
| | | .main_table_list { |
| | |
| | | nowDate: '', |
| | | nowWeek: '', |
| | | headerData: {}, |
| | | timeInfo:'ä¸å', |
| | | staticData: {}, |
| | | manningRatio: [], |
| | | taskList: [], |
| | |
| | | this.$router.push(item.path) |
| | | }, |
| | | updateDate () { |
| | | this.timeInfo = new Date().getHours()<12?'ä¸å':'ä¸å' |
| | | this.nowDate = dayjs().format('YYYYå¹´MæDæ¥') |
| | | this.nowWeek = weeks[new Date().getDay()] |
| | | }, |
| | |
| | | <div class="login_wrap"> |
| | | <div class="login_img"> |
| | | <div class="h3" style="font-size: 30px; margin-bottom: 0;">{{sysConfig.title || ''}}</div> |
| | | <div class="h3">{{sysConfig.subtitle || title}}</div> |
| | | <div class="h3">æºæ
§ç©æµååºå®æ¶ä¸ä½åç³»ç»</div> |
| | | </div> |
| | | <div class="form_wrap"> |
| | | <div class="tabs"> |
| | |
| | | ...mapState(['sysConfig']) |
| | | }, |
| | | mounted () { |
| | | alert(1) |
| | | this.username = localStorage.getItem('username') || '' |
| | | this.password = localStorage.getItem('password') || '' |
| | | this.phone = localStorage.getItem('phone') || '' |
| | |
| | | lintOnSave: false, |
| | | devServer: { |
| | | host: '0.0.0.0', |
| | | port: 10012, |
| | | port: 10085, |
| | | proxy: { |
| | | [process.env.VUE_APP_API_PREFIX]: { |
| | | target: process.env.VUE_APP_API_URL, |
| | |
| | | #æ¥çæ¯å¦å建æå |
| | | crontab -l |
| | | |
| | | vim /etc/systemd/system/zhyqVisits.service |
| | | |
| | | sudo systemctl start zhyqVisits.service |
| | | sudo systemctl enable zhyqVisits.service |
| | | #JAVA spring bootä¸ä½¿ç¨googleçortools(ç®æ³å
) |
| | | |
| | | Linuxç³»ç»å®è£
对åºççæ¬æå¡ï¼ |
| | |
| | | (nameserve 8.8.8.8) |
| | | |
| | | |
| | | tail -f /usr/local/jars/logs/visitsAdmin/info.2025-10-31.0.log |
| | | tail -f /usr/local/jars/logs/visitsAdmin/info.2025-10-31.0.log |
| | |
| | | package com.doumee.core.utils; |
| | | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.annotation.JsonInclude; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | |
| | | public static final String HEADER_USER_TOKEN = "dm_user_token"; |
| | | public static final String REDIS_USER_KEY = "user_token_list_"; |
| | | public static final String REDIS_TOKEN_KEY = "token_"; |
| | | public static final String WMS_IN_REPERTOTY_CODE_LIST = "WMS_IN_REPERTOTY_CODE_LIST"; |
| | | public static final String REDIS_HK_TOKEN_KEY = "hk_token_"; |
| | | public static boolean IS_AUTOCALL_WORKING = false; |
| | | public static final String HK_TOKEN_VALIDITY = "HK_TOKEN_VALIDITY"; |
| | | public static final String[] ALL_SPELL_LIST_FIRST = new String[]{"A", "B", "C", "D", "E", "F", "G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"}; |
| | | public static final int ZERO = 0 ; |
| | |
| | | |
| | | public static final String COFFEE_BEAN_TASK ="COFFEE_BEAN_TASK"; |
| | | |
| | | public static final String IN_REPERTOTY_CODE ="IN_REPERTOTY_CODE"; |
| | | |
| | | public static final String HOME_IMAGE ="HOME_IMAGE"; |
| | | public static final String DD_TALK ="DD_TALK"; |
| | |
| | | } |
| | | } |
| | | |
| | | public static String getWmsAreasNameByCode(String listStr,String code) { |
| | | try { |
| | | JSONArray list = JSONObject.parseArray(listStr ); |
| | | if(list!=null && list.size()>0){ |
| | | for (int i = 0; i < list.size(); i++) { |
| | | if(StringUtils.equals(list.getJSONObject(i).getString("code"),code)){ |
| | | return list.getJSONObject(i).getString("name"); |
| | | } |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | |
| | | } |
| | | return null; |
| | | } |
| | | public static List<JSONObject> getWmsAreasList(){ |
| | | List<JSONObject> list = new ArrayList<>(); |
| | | JSONObject t = new JSONObject(); |
| | | t.put("code","01"); |
| | | t.put("name","èå è´çå"); |
| | | list.add(t); |
| | | t = new JSONObject(); |
| | | t.put("code","02"); |
| | | t.put("name","èæ¹å·çå"); |
| | | list.add(t); |
| | | t = new JSONObject(); |
| | | t.put("code","03"); |
| | | t.put("name","åè¥å·çå"); |
| | | list.add(t); |
| | | t = new JSONObject(); |
| | | t.put("code","04"); |
| | | t.put("name","éé³å·çå"); |
| | | list.add(t); |
| | | t = new JSONObject(); |
| | | t.put("code","04206"); |
| | | t.put("name","åè¥å·çåéå±±åº"); |
| | | list.add(t); |
| | | t = new JSONObject(); |
| | | t.put("code","05"); |
| | | t.put("name","æ»å·å·çå"); |
| | | list.add(t); |
| | | t = new JSONObject(); |
| | | t.put("code","06"); |
| | | t.put("name","èåé¦èç产é¨"); |
| | | list.add(t); |
| | | t = new JSONObject(); |
| | | t.put("code","07"); |
| | | t.put("name","éåºä¸ç工䏿é责任å
¬å¸"); |
| | | list.add(t); |
| | | t = new JSONObject(); |
| | | t.put("code","08"); |
| | | t.put("name","é西ä¸ç工䏿é责任å
¬å¸"); |
| | | list.add(t); |
| | | t = new JSONObject(); |
| | | t.put("code","09"); |
| | | t.put("name","ç¹æ®çºªå¿µç"); |
| | | list.add(t); |
| | | return list; |
| | | } |
| | | public static void main(String[] args) { |
| | | System.out.println(JSONObject.toJSONString(getWmsAreasList())); |
| | | // getChinesePingyin("DDaaæ±èç对对对"); |
| | | // System.out.println(DateUtil.getShortTime(new Date())); |
| | | // System.out.println( "2025-01-14 10:50:56".substring(0,10)); |
| | | // System.out.println(Constants.checkCarNo("çAA10991")); |
| | | // System.out.println(Constants.getVehiclePlateNo("æ¹B140D17").getDescription()); |
| | | // System.out.println(Constants.getVehiclePlateNo("宿AP0637").getDescription()); |
| | | |
| | | // 0789150665 C97B092F 0789150561 |
| | | |
| | | |
| | |
| | | LEAVED(10, "已离å ","车è¾ä»{data}ç¦»åº " ), |
| | | OVER_NUMBER(11, "å·²è¿å·","è¶
æ¶æªå°æå®æå°èªå¨è¿å·" ), |
| | | CHANGE_GROUP(12, "æ´æ¢æå°ç»","ä»ã{data}ãæ´æ¢å°ã{data1}ã" ), |
| | | BACK_TO_WAIT_SIGNIN(13, "éæ°ç¾å°","éæ°ç¾å°" ), |
| | | ; |
| | | |
| | | // æååé |
| | |
| | | <version>1.0.0-SNAPSHOT</version> |
| | | <relativePath>../../pom.xml</relativePath> |
| | | </parent> |
| | | |
| | | <artifactId>device_service</artifactId> |
| | | |
| | | <properties> |
| | | <maven.compiler.source>8</maven.compiler.source> |
| | | <maven.compiler.target>8</maven.compiler.target> |
| | | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| | | <fastjson.version>1.2.70</fastjson.version> |
| | | </properties> |
| | | |
| | | <dependencies> |
| | |
| | | <groupId>org.projectlombok</groupId> |
| | | <artifactId>lombok</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.alibaba</groupId> |
| | | <artifactId>fastjson</artifactId> |
| | | <version>${fastjson.version}</version> |
| | | </dependency> |
| | | </dependencies> |
| | | </project> |
| | |
| | | password: nacos |
| | | discovery: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | # namespace: dmvisit |
| | | namespace: wuhu_visit_dev |
| | | namespace: dm_visits_test |
| | | username: nacos |
| | | password: nacos |
| | | knife4j: |
| | |
| | | String[] iccmSignoff= new String[]{"/api/iccm/v1/signoff","iccm访客ç¾ç¦»"};// iccm访客ç¾ç¦» |
| | | String[] authResultPage= new String[]{"/api/acps/auth/open/v1/auth/result/businessNo/page","æä¸å¡ç¼å·æ¥è¯¢ä¸åè®°å½"};// 1.4.7.3æä¸å¡ç¼å·æ¥è¯¢ä¸åè®°å½ |
| | | String[] wxAuthUrl= new String[]{"dps/web/wxAuth/loginV2?oaId=atwl&redirectUrl=","å¾
åèå¤è·³è½¬å°å"};// å¾
åèå¤è·³è½¬å°å |
| | | String[] sensorStatusStatistic= new String[]{"/api/v1/sensorStatusStatistic","æ¶é²ç»´ä¿å®å¶-设å¤ç»´ä¿æ
åµ"};//æ¶é²ç»´ä¿å®å¶-设å¤ç»´ä¿æ
åµ |
| | | } |
| | | /** |
| | | * éå½A.55æ¶é²è®¾å¤ç±»å |
| | |
| | | @ExcelColumn(name="æåºç ") |
| | | private Integer sortnum; |
| | | |
| | | @ApiModelProperty(value = "ç±»å 0é¨ç¦ 1è½¦åº 2LED 3广æç¹ 4广æè®¾å¤ 5æè·¯å¨ç©ºå¼", example = "1") |
| | | @ExcelColumn(name="ç±»å 0é¨ç¦ 1è½¦åº 2LED 3广æç¹ 4广æè®¾å¤ 5æè·¯å¨ç©ºå¼") |
| | | @ApiModelProperty(value = "ç±»å 0é¨ç¦ 1è½¦åº 2LED 3广æç¹ 4广æè®¾å¤ 5æè·¯å¨ç©ºå¼ 6海康çµè¡¨", example = "1") |
| | | @ExcelColumn(name="ç±»å 0é¨ç¦ 1è½¦åº 2LED 3广æç¹ 4广æè®¾å¤ 5æè·¯å¨ç©ºå¼ 6海康çµè¡¨") |
| | | private Integer type; |
| | | @ApiModelProperty(value = "æ¯å¦ååºåºå
¥å£ 0䏿¯ 1æ¯", example = "1") |
| | | @ExcelColumn(name="æ¯å¦ååºåºå
¥å£ 0䏿¯ 1æ¯") |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.doumee.service.business.third.model.LoginUserModel; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.service.business.third.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Override |
| | | public YearDeviceDataVO yearFightingAdminDeviceData(){ |
| | | YearDeviceDataVO data = new YearDeviceDataVO(); |
| | | FireStatisticRequest param = new FireStatisticRequest(); |
| | | param.setIndexCode("api_fire_statistic"); |
| | | BaseResponse<FireStatisticResponse> response = HKService.fireStatistic(param); |
| | | if(response != null && StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE) && response.getData()!=null ) { |
| | | data.setProtectNum(Constants.formatIntegerNum(response.getData().getMaintenanceNum())); |
| | | data.setPlanProtectTotal(Constants.formatIntegerNum(response.getData().getDeviceTotalNum())); |
| | | // FireStatisticRequest param = new FireStatisticRequest(); |
| | | // param.setIndexCode("api_fire_statistic"); |
| | | // BaseResponse<FireStatisticResponse> response = HKService.fireStatistic(param); |
| | | // if(response != null && StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE) && response.getData()!=null ) { |
| | | // data.setProtectNum(Constants.formatIntegerNum(response.getData().getMaintenanceNum())); |
| | | // data.setPlanProtectTotal(Constants.formatIntegerNum(response.getData().getDeviceTotalNum())); |
| | | // } |
| | | // param = new FireStatisticRequest(); |
| | | // param.setIndexCode("api_fire_statistic_month"); |
| | | // BaseResponse<FireStatisticResponse> response1 = HKService.fireStatisticMonth(param); |
| | | // if(response1 != null && StringUtils.equals(response1.getCode(), HKConstants.RESPONSE_SUCCEE) |
| | | // && response1.getData()!=null ) { |
| | | // data.setMonthAddNum(Constants.formatIntegerNum(response1.getData().getMaintenanceNumMonth())); |
| | | // data.setMonthTotalNum(Constants.formatIntegerNum(response1.getData().getDeviceTotalNum())); |
| | | // } |
| | | |
| | | data.setProtectNum(Constants.ZERO); |
| | | data.setPlanProtectTotal(Constants.ZERO); |
| | | data.setMonthAddNum(Constants.ZERO); |
| | | data.setMonthTotalNum(Constants.ZERO); |
| | | BaseResponse<SensorStatusStatisticResponse> response = HKService.sensorStatusStatistic(); |
| | | if(response != null && StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE) |
| | | && response.getData()!=null ) { |
| | | data.setProtectNum(Constants.formatIntegerNum(response.getData().getSensorMainNum())); |
| | | data.setPlanProtectTotal(Constants.formatIntegerNum(response.getData().getSensorNum())); |
| | | data.setMonthAddNum(Constants.formatIntegerNum(response.getData().getSensorMainMonthNum())); |
| | | data.setMonthTotalNum(Constants.formatIntegerNum(response.getData().getSensorNum())); |
| | | } |
| | | param = new FireStatisticRequest(); |
| | | param.setIndexCode("api_fire_statistic_month"); |
| | | BaseResponse<FireStatisticResponse> response1 = HKService.fireStatisticMonth(param); |
| | | if(response1 != null && StringUtils.equals(response1.getCode(), HKConstants.RESPONSE_SUCCEE) |
| | | && response1.getData()!=null ) { |
| | | data.setMonthAddNum(Constants.formatIntegerNum(response1.getData().getMaintenanceNumMonth())); |
| | | data.setMonthTotalNum(Constants.formatIntegerNum(response1.getData().getDeviceTotalNum())); |
| | | } |
| | | |
| | | return data; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * ãæ¶é²ç®¡æ§ãçæ¿-åç±»åæ±æ»çåç¶æè®¾å¤æ°é |
| | |
| | | .selectAs(Platform::getName,PlatformWarnEvent::getPlatformName) |
| | | .leftJoin(Platform.class,Platform::getId,PlatformJob::getPlatformId) |
| | | .eq(PlatformWarnEvent::getIsdeleted,Constants.ZERO) |
| | | .apply("to_days(t.create_date) = to_days(now())") |
| | | //.apply(" to_days(t.create_date) = to_days(now()) ") |
| | | .apply(" ( t.create_date > now() - INTERVAL 10 MINUTE ) ") |
| | | .orderByDesc(PlatformWarnEvent::getCreateDate) |
| | | .last(" limit "+limit) |
| | | ); |