diff --git a/.env.development b/.env.development index badbb00..bbae003 100644 --- a/.env.development +++ b/.env.development @@ -2,6 +2,10 @@ ENV='development' # base api -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 + +#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 diff --git a/.env.production b/.env.production index 9d574b8..f9398d4 100644 --- a/.env.production +++ b/.env.production @@ -2,10 +2,10 @@ ENV = 'production' # base api -#VUE_APP_BASE_API=http://192.168.60.99:9005/ -#VUE_APP_UPLOAD_API=http://192.168.60.99:9005/api/admin/upload-file -#VUE_APP_OA_URL=http://192.168.60.18:2021 +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://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 diff --git a/src/api/system/user.js b/src/api/system/user.js index fea7326..2f78b61 100644 --- a/src/api/system/user.js +++ b/src/api/system/user.js @@ -8,10 +8,11 @@ export function save(data) { }) } -export function listuser() { +export function listuser(params) { return request({ url: '/api/admin/admin', - method: 'get' + method: 'get', + params }) } diff --git a/src/api/user.js b/src/api/user.js index 0a06fe7..f783b7b 100644 --- a/src/api/user.js +++ b/src/api/user.js @@ -26,6 +26,15 @@ export function logout(isLoading=false) { }) } +export function ossLogin(data) { + return request({ + url: '/api/admin/auth/oss-login', + method: 'post', + data, + isLoading: false, + }) +} + export function getAuthMenu(token,isLoading=false) { return request({ url: '/api/admin/auth/permissions', diff --git a/src/permission.js b/src/permission.js index c5e41fa..49474b1 100644 --- a/src/permission.js +++ b/src/permission.js @@ -58,7 +58,19 @@ 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('/') + } catch (e) { + next('/login') + } + return + } if (whiteList.indexOf(to.path) !== -1) { // in the free login whitelist, go directly next() diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 5decf12..a8dddce 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,7 +1,8 @@ import { login, logout, - getInfo + getInfo, + ossLogin } from '@/api/user' import { getToken, @@ -42,6 +43,36 @@ const mutations = { } const actions = { + loginskip({ + commit + }, userInfo) { + const { + token, + tp, + loginId + } = userInfo + + return new Promise((resolve, reject) => { + ossLogin({ + token: token, + tp: tp, + loginId: loginId + }).then(response => { + + //console.log(response) + + const { + data + } = response; + console.log(response.access_token) + commit('SET_TOKEN', response.access_token) + setToken(response.access_token) + resolve() + }).catch(error => { + reject(error) + }) + }) + }, // user login login({ commit diff --git a/src/utils/createTable.js b/src/utils/createTable.js index ed6eb09..44dcf7e 100644 --- a/src/utils/createTable.js +++ b/src/utils/createTable.js @@ -1,8 +1,7 @@ import { show } from "@/api/system/customForm"; -import { listdept } from "@/api/system/department"; import { getparameter } from "@/api/system/dictionary"; import { index as baseFormIndex } from "@/api/system/baseForm"; - +import { listCommondepartment } from "@/api/common"; export async function resolveFormInfo(customFormId,filterType = 'table') { const res = await show({ id: customFormId }, false); @@ -12,7 +11,7 @@ export async function resolveFormInfo(customFormId,filterType = 'table') { [ "departments", async () => { - const res = await listdept(); + const res = await listCommondepartment(); return res; }, ], diff --git a/src/views/bigScreen1/component/doing.vue b/src/views/bigScreen1/component/doing.vue index 4d699c9..a6d09a4 100644 --- a/src/views/bigScreen1/component/doing.vue +++ b/src/views/bigScreen1/component/doing.vue @@ -35,6 +35,11 @@
{{ item.equipment_id_equipments_id_relation ? item.equipment_id_equipments_id_relation.name : '' }}
+
+ + {{ item.content }} + +
执行时间:{{ timeFormat(item.start_time) }}至{{ timeFormat(item.end_time,'HH:mm') }}
@@ -311,16 +316,22 @@ $list-height: calc(#{$container-height} - 5.33rem); font-size: 1.34rem; flex: 1; } + &__content { + flex-basis: 14%; + word-break: keep-all; + text-overflow: ellipsis; + overflow: hidden; + } &__time { flex-basis: 19%; text-align: center; } &__last { - flex-basis: 7%; + flex-basis: 6%; text-align: center; } &__operate { - flex-basis: 31%; + flex-basis: 30%; display: flex; align-items: center; justify-content: center; @@ -335,6 +346,8 @@ $list-height: calc(#{$container-height} - 5.33rem); position: relative; + $done-color: #ec6a5e; + $doing-color: #7ccac8; &__cir { width: 2.2rem; height: 2.2rem; @@ -346,7 +359,7 @@ $list-height: calc(#{$container-height} - 5.33rem); &-doing { cursor: pointer; transform: scale(.9, .9); - background: #6fc0af; + background: $doing-color; position: relative; @@ -355,7 +368,8 @@ $list-height: calc(#{$container-height} - 5.33rem); width: 132%; height: 132%; border-radius: 100%; - background: #6fc0af65; + opacity: 0.4; + background: $doing-color; transform: translate(-50%,-50%); animation: scale infinite ease-out 4s; @@ -373,7 +387,7 @@ $list-height: calc(#{$container-height} - 5.33rem); } } &-done { - background: #7ccac8; + background: $done-color; } } &__line { @@ -385,7 +399,7 @@ $list-height: calc(#{$container-height} - 5.33rem); left: 50%; &-done { - background: #7ccac8; + background: $done-color; } } diff --git a/src/views/bigScreen1/component/done.vue b/src/views/bigScreen1/component/done.vue index cf619ab..3074e1c 100644 --- a/src/views/bigScreen1/component/done.vue +++ b/src/views/bigScreen1/component/done.vue @@ -1,10 +1,10 @@ - - - - - - + + + + + + + + + + + + @@ -138,8 +148,11 @@ }, tableHeight: 0, //查询条件字段 + total: 0, searchFields: { - KeyWord: "" + keyword: "", + page: 1, + page_size: 20 }, tableData: [] } @@ -164,8 +177,9 @@ }, load() { var that = this; - listuser().then(response => { + listuser(this.searchFields).then(response => { var data = response.data; + that.total = response.total; var _rolelist = []; for (var m of data) { _rolelist = that.roleList;