From b08ad2f7dc76b26d2c94dc5f786316f754754b07 Mon Sep 17 00:00:00 2001 From: RogerWork Date: Tue, 30 Jan 2024 21:38:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=8D=87=E7=BA=A7=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/update.js | 12 +- src/components/update/CinemaUpdate.vue | 293 +++++++++++++------------ src/store/index.js | 23 +- src/views/update/index.vue | 38 +--- 4 files changed, 192 insertions(+), 174 deletions(-) diff --git a/src/apis/update.js b/src/apis/update.js index 45ca1b9..d283ea9 100644 --- a/src/apis/update.js +++ b/src/apis/update.js @@ -55,8 +55,18 @@ export const get_update_option = () => { } export const get_git_ver = () => { - return request( { + return request({ url: `/update/get_git_version/`, method: 'get', }) +} + + +export const handle_update = (params) => { + return request({ + url: '/update/update_cine/', + method: 'get', + params: params, + timeout: 3*60*1000, + }) } \ No newline at end of file diff --git a/src/components/update/CinemaUpdate.vue b/src/components/update/CinemaUpdate.vue index a28e2e6..e652425 100644 --- a/src/components/update/CinemaUpdate.vue +++ b/src/components/update/CinemaUpdate.vue @@ -1,12 +1,13 @@ @@ -179,62 +243,13 @@ const progress = [ .el-divider--horizontal { line-height: 1; } + .update { padding-left: 0; } + .ip { margin-right: 100px; } - -.processBox { - background-color: #fff; - height: 210px; - - .title { - font-size: 16px; - font-weight: 600; - padding-left: 32px; - padding-top: 16px; - } - .timelineProcessBox { - .timeline { - display: flex; - width: 95%; - margin: 40px auto; - .lineitem { - transform: translateX(50%); - width: 25%; - } - } - } -} - -:deep(.el-timeline-item__tail) { - border-left: none; - border-top: 2px solid #e4e7ed; - width: 100%; - position: absolute; - top: 6px; -} -:deep(.el-timeline-item__wrapper) { - padding-left: 0; - position: absolute; - top: 20px; - transform: translateX(-50%); - text-align: center; -} -:deep(.el-timeline-item__timestamp) { - font-size: 14px; -} -.active { - :deep(.el-timeline-item__node) { - background-color: $login_word; - } - - :deep(.el-timeline-item__tail) { - border-color: $login_word; - } -} - \ No newline at end of file diff --git a/src/store/index.js b/src/store/index.js index 0f452f1..1fa7981 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -4,13 +4,32 @@ export default createStore({ modules: {}, state: { update_dialog_show: false, + update_config: {}, + update_status: {}, }, getters: { - dialog_change: (state) => { + dialog_change: state => { state.update_dialog_show = !state.update_dialog_show return state.update_dialog_show } }, - mutations: {}, + mutations: { + add_update_cine: (state, payload) => { + state.update_config[payload.ip] = payload.config + }, + add_update_status: (state, payload) => { + state.update_status[payload.ip] = payload.status + }, + change_update_status: (state, ip) => { + if (state.update_status[ip] !== undefined) { + state.update_status[ip] = !state.update_status[ip] + } + }, + clear_update_status: (state, ip) => { + if (state.update_status[ip]) { + delete state.update_status[ip] + } + } + }, actions: {}, }) \ No newline at end of file diff --git a/src/views/update/index.vue b/src/views/update/index.vue index ce9065e..9d97106 100644 --- a/src/views/update/index.vue +++ b/src/views/update/index.vue @@ -1,6 +1,6 @@ @@ -237,8 +213,6 @@ const changeDialogStatus = (val) => { - -