优化体验

main
roger_mac 11 months ago
parent 4740477210
commit b43fe84326
  1. 10
      src/views/mock/index.vue

@ -306,6 +306,7 @@ const json_data = computed(
//
const running = ref(false)
const disableAll= ref(false)
const startBtn_disable = ref(false)
const startBtn_loading = ref(false)
@ -328,17 +329,20 @@ const handleStart = () => {
mock_config[item]= checkedMockConfig.value.indexOf(item) >= 0
})
console.log(mock_config)
const data = JSON.stringify({mock_config: mock_config})
const data = JSON.stringify({mock_config: mock_config, json_data: allJsonData.value})
console.log(data)
start_mock(params, data).then(res => {
}).catch(err => {
})
//
disableAll.value = true
}
const handleEnd = () => {
running.value = false
startBtn_disable.value = false
startBtn_loading.value = false
disableAll.value = false
const params = {ip: selectIp.value}
end_mock(params).then(res => {
}).catch(err => {
@ -362,7 +366,7 @@ onMounted(
>
<el-row justify="start">
<el-col :span="4">
<el-select v-model="selectIp" class="m-2" placeholder="选择要模拟的影院IP" @change="handleIpChange">
<el-select v-model="selectIp" class="m-2" placeholder="选择要模拟的影院IP" @change="handleIpChange" :disabled="disableAll">
<el-option
v-for="item in cinema_items.value"
:key="item.value"
@ -395,6 +399,7 @@ onMounted(
v-model="checkAll"
:indeterminate="isIndeterminate"
@change="handleCheckAllChange"
:disabled="disableAll"
>
全选
</el-checkbox>
@ -403,6 +408,7 @@ onMounted(
<el-checkbox-group
v-model="checkedMockConfig"
@change="handleCheckedMockChange"
:disabled="disableAll"
>
<template v-for="api_items in mockConfig">
<el-divider content-position="left">

Loading…
Cancel
Save