|
|
|
|
@ -1,7 +1,7 @@ |
|
|
|
|
<script setup> |
|
|
|
|
import {onBeforeMount, ref, computed} from "vue"; |
|
|
|
|
import {useStore} from "vuex"; |
|
|
|
|
import {get_git_ver, get_update_alter, get_update_option, handle_update} from "@/apis/update.js" |
|
|
|
|
import {get_git_ver, get_update_alter, get_update_option, handle_update, get_client} from "@/apis/update.js" |
|
|
|
|
import Tips from "@/components/update/Tips.vue" |
|
|
|
|
import config from "@/request/prd.js" |
|
|
|
|
import ProcessIcon from "@/components/update/ProcessIcon.vue"; |
|
|
|
|
@ -158,6 +158,19 @@ onBeforeMount(async () => { |
|
|
|
|
}) |
|
|
|
|
// endregion |
|
|
|
|
|
|
|
|
|
// region 获取客户端版本 |
|
|
|
|
const client_ver = ref([]) |
|
|
|
|
const selectedClientVersion = ref('') |
|
|
|
|
|
|
|
|
|
onBeforeMount(async () => { |
|
|
|
|
await get_client().then(res => { |
|
|
|
|
if (Array.isArray(res)) { |
|
|
|
|
client_ver.value = [...res] |
|
|
|
|
} |
|
|
|
|
}).catch() |
|
|
|
|
}) |
|
|
|
|
// endregion |
|
|
|
|
|
|
|
|
|
// region 获取升级警告 |
|
|
|
|
const updateAlter = ref([]) |
|
|
|
|
onBeforeMount( |
|
|
|
|
@ -355,7 +368,7 @@ const handleUpdate = async () => { |
|
|
|
|
let data = {} |
|
|
|
|
data = { |
|
|
|
|
"ip": props.ip, |
|
|
|
|
"config": {'version': selectedVersion.value, 'selected': checkedCmd.value} |
|
|
|
|
"config": {'version': selectedVersion.value, 'client': selectedClientVersion.value, 'selected': checkedCmd.value} |
|
|
|
|
} |
|
|
|
|
store.commit("updateModule/add_update_cine", data) |
|
|
|
|
|
|
|
|
|
@ -367,6 +380,7 @@ const handleUpdate = async () => { |
|
|
|
|
let params = { |
|
|
|
|
ip: props.ip, |
|
|
|
|
version: selectedVersion.value, |
|
|
|
|
client_ver: selectedClientVersion.value, |
|
|
|
|
cmd: JSON.stringify(cmd_array) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -458,6 +472,11 @@ const handleUpdate = async () => { |
|
|
|
|
:checked="cmd.is_checked" :disabled="cmd.is_force">{{ cmd.desc }} |
|
|
|
|
<tips v-if="cmd.comment !==''" title="设置说明" :width="400" :content="cmd.comment"></tips> |
|
|
|
|
</el-checkbox> |
|
|
|
|
<el-select v-model="selectedClientVersion" filterable clearable placeholder="默认版本" :disabled="disableAll" |
|
|
|
|
style="width: 180px; margin-bottom: 15px;"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="client in client_ver" :key="client.id" :label="client.client_ver" :value="client.client_ver"/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-checkbox-group> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
|