diff --git a/.env.production b/.env.production index 0fed46a..79aad69 100644 --- a/.env.production +++ b/.env.production @@ -2,10 +2,6 @@ ENV = 'production' # base api -#VUE_APP_BASE_API=http://192.168.60.78:9001/ -#VUE_APP_UPLOAD_API=http://192.168.60.78:9001/api/admin/upload-file -#VUE_APP_OA_URL=http://192.168.60.18:2021 - -VUE_APP_BASE_API=http://diaoling-test.ali251.langye.net/ -VUE_APP_UPLOAD_API=http://diaoling-test.ali251.langye.net/api/admin/upload-file -VUE_APP_OA_URL=http://suzhouhedaooa.langye.net +VUE_APP_BASE_API=http://192.168.60.78:9001/ +VUE_APP_UPLOAD_API=http://192.168.60.78:9001/api/admin/upload-file +VUE_APP_OA_URL=http://192.168.60.18:2021 diff --git a/package.json b/package.json index 79a4fde..70201fe 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "vue-awesome": "^4.5.0", "vue-count-to": "^1.0.13", "vue-esign": "^1.1.4", + "vue-matomo": "^4.2.0", "vue-router": "3.0.6", "vuedraggable": "^2.24.3", "vuex": "3.1.0", diff --git a/src/App.vue b/src/App.vue index ec9032c..a46996d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -6,6 +6,15 @@ diff --git a/src/main.js b/src/main.js index 15796e4..d9b239a 100644 --- a/src/main.js +++ b/src/main.js @@ -100,6 +100,26 @@ audio.src = noticeAudio; Vue.prototype.$audioPlay = () => { audio.play() } + +import VueMatomo from 'vue-matomo' + +Vue.use(VueMatomo, { + host: 'http://192.168.60.99:9000/', // 这里配置你自己的piwik服务器地址和网站ID + siteId: 8,//siteId值 + // 根据router自动注册 + router: router, + // // 是否需要在发送追踪信息之前请求许可 + // // 默认false + requireConsent: false, + enableLinkTracking: true, + // // 是否追踪初始页面 + // // 默认true + trackInitialView: false, + // // 最终的追踪js文件名 + // // 默认 'piwik' + trackerFileName: 'matomo', + debug: false +}); new Vue({ el: '#app', router, diff --git a/src/permission.js b/src/permission.js index d4e8278..9f14bc0 100644 --- a/src/permission.js +++ b/src/permission.js @@ -3,8 +3,9 @@ import store from './store' import { Message } from 'element-ui' import NProgress from 'nprogress' // progress bar import 'nprogress/nprogress.css' // progress bar style -import { getToken } from '@/utils/auth' // get token from cookie +import { getToken, setToken } from '@/utils/auth' // get token from cookie import getPageTitle from '@/utils/get-page-title' +import { deepCopy } from "@/utils" NProgress.configure({ showSpinner: false }) // NProgress Configuration @@ -13,23 +14,24 @@ const whiteList = ['/login'] // no redirect whitelist router.beforeEach(async(to, from, next) => { // start progress bar NProgress.start() - // set page title document.title = getPageTitle(to.meta.title) // determine whether the user has logged in const hasToken = getToken() - + if (to.query.tourl) { + await store.dispatch('app/toggleDevice',"mobile") + await store.dispatch('app/closeSideBar',false) + } if (hasToken) { if (to.path === '/login') { // if is logged in, redirect to the home page next({ path: '/' }) - NProgress.done() } else { // determine whether the user has obtained his permission roles through getInfo const hasRoles = store.getters.roles && store.getters.roles.length > 0 if (hasRoles) { - next() + to.query.tourl ? next(to.query.tourl) : next() } else { try { // get user info @@ -45,7 +47,11 @@ router.beforeEach(async(to, from, next) => { // hack method to ensure that addRoutes is complete // set the replace: true, so the navigation will not leave a history record - next({ ...to, replace: true }) + let resetTo = deepCopy(to) + resetTo.path = to.query.tourl || to.path + resetTo.replace = true + console.log(resetTo) + next(resetTo) } catch (error) { console.log(error) // remove token and go to login page to re-login @@ -58,31 +64,33 @@ router.beforeEach(async(to, from, next) => { } } else { /* has no token*/ - if (to.query.token && to.query.tp) { - try { - await store.dispatch('user/loginskip', { - token: to.query.token, - tp: to.query.tp - }) - next(to.query.tourl ? to.query.tourl : '/') - } catch (e) { - next('/login') - } - - return - } if (whiteList.indexOf(to.path) !== -1) { // in the free login whitelist, go directly next() } else { - // other pages that do not have permission to access are redirected to the login page. - next(`/login?redirect=${to.path}`) - NProgress.done() + if (to.query.token && to.query.tp) { + try { + await store.dispatch('user/loginskip', { + token: to.query.token, + tp: to.query.tp + }) + next(to.query.tourl || '/') + } catch (e) { + next('/login') + } + } else { + // other pages that do not have permission to access are redirected to the login page. + next(`/login?redirect=${to.path}`) + NProgress.done() + } } } + NProgress.done() }) router.afterEach(() => { // finish progress bar + store.dispatch('app/toggleDevice',"mobile") + store.dispatch('app/closeSideBar',false) NProgress.done() }) diff --git a/src/store/modules/app.js b/src/store/modules/app.js index 7ea7e33..fe3b1ca 100644 --- a/src/store/modules/app.js +++ b/src/store/modules/app.js @@ -5,7 +5,7 @@ const state = { opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true, withoutAnimation: false }, - device: 'desktop' + device: 'mobile' } const mutations = { diff --git a/src/utils/createTable.js b/src/utils/createTable.js index 066c860..23a1f61 100644 --- a/src/utils/createTable.js +++ b/src/utils/createTable.js @@ -1,7 +1,7 @@ import { show } from "@/api/system/customForm"; import { getparameter } from "@/api/system/dictionary"; import { index as baseFormIndex } from "@/api/system/baseForm"; -import { listCommondepartment } from "@/api/common"; +import { listCommondepartment, listCommonuser } from "@/api/common"; export async function resolveFormInfo(customFormId,filterType = 'table') { const res = await show({ id: customFormId }, false); @@ -18,7 +18,15 @@ export async function resolveFormInfo(customFormId,filterType = 'table') { return res.data; }, ], - ["admins", []], + ["admins", + async () => { + const res = await listCommonuser({ + page: 1, + page_size: 999 + }); + return res.data; + } + ], ]); let { fields, relation } = res; let fieldRes = fields.filter(i => { diff --git a/src/views/bigScreen1/component/callback.vue b/src/views/bigScreen1/component/callback.vue index 9e8f92b..b93db0c 100644 --- a/src/views/bigScreen1/component/callback.vue +++ b/src/views/bigScreen1/component/callback.vue @@ -136,7 +136,7 @@ export default { }, submit() { - this.smsForm.content = this.form.content + this.smsForm.content = `${ this.$refs['elEdit_feedback_department_id']?.selectedLabel ? this.$refs['elEdit_feedback_department_id'].selectedLabel + '-' : '' }${ this.$refs['elEdit_feedback_admin_id']?.selectedLabel ? this.$refs['elEdit_feedback_admin_id'].selectedLabel + '-' : '' }${ this.form.content }` if (this.type === "add") { this.form.transfer_id = this.transfer_id; if (this.form.hasOwnProperty("id")) { diff --git a/src/views/bigScreen1/component/doing.vue b/src/views/bigScreen1/component/doing.vue index 48a166a..791b8ae 100644 --- a/src/views/bigScreen1/component/doing.vue +++ b/src/views/bigScreen1/component/doing.vue @@ -66,9 +66,11 @@
{{ s.label }}
- - - +
+ + + +
@@ -506,25 +508,31 @@ $list-height: calc(#{$container-height} - 5.33rem); } } &__btn { - font-size: 1.3rem; - height: 2.4rem; - width: 5rem; - background: #a4ddf0; - color: #333; - border-color: #a4ddf0; - } - &__callback { - font-size: 2.2rem; - margin-left: 6px; - animation: flash 5s infinite linear; - cursor: pointer; - - @keyframes flash { - 0%,4%,100% { - opacity: 1; - } - 2% { - opacity: 0; + display: flex; + align-items: center; + flex-basis: 12%; + + &-show, &-feedback { + font-size: 1.3rem; + height: 2.4rem; + width: 5rem; + background: #a4ddf0; + color: #333; + border-color: #a4ddf0; + } + &-callback { + font-size: 2.2rem; + margin-left: 6px; + animation: flash 5s infinite linear; + cursor: pointer; + + @keyframes flash { + 0%,4%,100% { + opacity: 1; + } + 2% { + opacity: 0; + } } } } diff --git a/src/views/bigScreen1/component/title.vue b/src/views/bigScreen1/component/title.vue index 471d5a6..3099b3b 100644 --- a/src/views/bigScreen1/component/title.vue +++ b/src/views/bigScreen1/component/title.vue @@ -11,7 +11,7 @@ - + diff --git a/src/views/bigScreen1/component/toDo.vue b/src/views/bigScreen1/component/toDo.vue index 3add933..67781ba 100644 --- a/src/views/bigScreen1/component/toDo.vue +++ b/src/views/bigScreen1/component/toDo.vue @@ -66,9 +66,11 @@
{{ s.label }}
- - - +
+ + + +
@@ -525,25 +527,31 @@ $list-height: calc(#{$container-height} - 5.33rem); } } &__btn { - font-size: 1.3rem; - height: 2.4rem; - width: 5rem; - background: #a4ddf0; - color: #333; - border-color: #a4ddf0; - } - &__callback { - font-size: 2.2rem; - margin-left: 6px; - animation: flash 5s infinite linear; - cursor: pointer; + display: flex; + align-items: center; + flex-basis: 12%; - @keyframes flash { - 0%,4%,100% { - opacity: 1; - } - 2% { - opacity: 0; + &-show, &-feedback { + font-size: 1.3rem; + height: 2.4rem; + width: 5rem; + background: #a4ddf0; + color: #333; + border-color: #a4ddf0; + } + &-callback { + font-size: 2.2rem; + margin-left: 6px; + animation: flash 5s infinite linear; + cursor: pointer; + + @keyframes flash { + 0%,4%,100% { + opacity: 1; + } + 2% { + opacity: 0; + } } } } diff --git a/src/views/bigScreen1/component/tomorrow.vue b/src/views/bigScreen1/component/tomorrow.vue index c2c21fa..9548307 100644 --- a/src/views/bigScreen1/component/tomorrow.vue +++ b/src/views/bigScreen1/component/tomorrow.vue @@ -27,6 +27,15 @@ 执行时间:{{ timeFormat(item.start_time) }}至{{ timeFormat(item.end_time,'HH:mm') }}
预计时长 {{ $moment(item.end_time).diff($moment(item.start_time),'hours', true).toFixed(2) }}小时
+
+
+
+
+
+
+
{{ s.label }}
+
+
@@ -62,15 +71,7 @@ export default { { value: 4, label: "开机" - }, - { - value: 5, - label: "通知关机" - }, - { - value: 6, - label: "关机" - }, + } ], statusType: [ { @@ -97,6 +98,7 @@ export default { this.drawer = false; }, stepClick (item,s,isDetail=false) { + if (s.value !== 2) return if (isDetail) { this.$emit('step-click', { data: item, @@ -155,6 +157,20 @@ export default { } }, + operateTitle () { + return function (item, s) { + switch (s.auth) { + case 'receive': + return item.receive_time + case 'noticeOpen': + return item.notice_open_time + case 'open': + return item.open_time + default: + return '' + } + } + } }, } diff --git a/src/views/bigScreen1/index.vue b/src/views/bigScreen1/index.vue index 06caaa5..2f12ce2 100644 --- a/src/views/bigScreen1/index.vue +++ b/src/views/bigScreen1/index.vue @@ -1,7 +1,7 @@