临时代码

main
RogerWork 11 months ago
parent 96e9e94869
commit 840f81ec39
  1. 2
      src/layout/components/PageHeader.vue
  2. 13
      src/layout/index.vue
  3. 159
      src/views/mock/index.vue
  4. 14
      src/views/update/index.vue

@ -5,7 +5,7 @@ const goBack = () => {
</script> </script>
<template> <template>
<el-page-header @back="goBack"> <el-page-header @back="goBack" style="width: 100%">
<template #content> <template #content>
<span class="text-large font-600 mr-3">影院列表</span> <span class="text-large font-600 mr-3">影院列表</span>
</template> </template>

@ -12,9 +12,9 @@ import PageAside from "@/layout/components/PageAside.vue";
<PageAside/> <PageAside/>
</el-aside> </el-aside>
<el-container> <el-container>
<el-header> <!-- <el-header>-->
<PageHeader/> <!-- <PageHeader/>-->
</el-header> <!-- </el-header>-->
<el-main> <el-main>
<router-view/> <router-view/>
</el-main> </el-main>
@ -24,11 +24,16 @@ import PageAside from "@/layout/components/PageAside.vue";
</template> </template>
<style> <style>
#app {
width: 100%;
}
html, html,
body, body,
el-container { .el-container {
padding: 0; padding: 0;
margin: 0; margin: 0;
height: 100%; height: 100%;
} }
</style> </style>

@ -1,12 +1,169 @@
<script setup> <script setup>
import {cinema_list} from '@/apis/update.js';
import {onMounted} from "vue";
import {ref} from "vue";
import {InfoFilled} from "@element-plus/icons-vue";
let cinema_items = ref([]);
const select_ip = ref('')
let mock_config = ref(
{
//
download_film_info: false,
get_cinema_info: false,
get_screen_info: false,
//
report_ticket: false,
report_film_schedule: false,
upload_screen_seat_info: false,
//
get_overtime_ticket_status: false,
//
valid_error: false,
data_download_check_all: false,
data_download_indeterminate: false,
}
)
async function get_cinema_items() {
cinema_items = []
await cinema_list().then(res => {
if (Array.isArray(res)) {
const ip_list = res.map((item, index) => {
return {value: item.ip, label: item.ip}
})
cinema_items.value = [...ip_list]
console.log(cinema_items)
} else {
console.log('else')
}
}).catch(err => {
console.log('err')
console.log(err)
})
}
const handle_download_all_Change = (val) => {
if (mock_config.value.download_film_info && mock_config.value.get_cinema_info && mock_config.value.get_screen_info) {
mock_config.value.data_download_check_all = true
mock_config.value.data_download_indeterminate = false
} else if (mock_config.value.download_film_info || mock_config.value.get_cinema_info || mock_config.value.get_screen_info){
mock_config.value.data_download_check_all = false
mock_config.value.data_download_indeterminate = true
}
else{
mock_config.value.data_download_check_all = false
mock_config.value.data_download_indeterminate = false
}
// if (mock_config.value.data_download_check_all === true && mock_config.value.data_download_indeterminate === false) {
// mock_config.value.download_film_info = true
// mock_config.value.get_cinema_info = true
// mock_config.value.get_screen_info = true
// }
// else {
// mock_config.value.download_film_info = false
// mock_config.value.get_cinema_info = false
// mock_config.value.get_screen_info = false
// }
}
onMounted(
async () => {
await get_cinema_items();
}
)
</script> </script>
<template> <template>
<el-form
ref="mockConfig"
>
<el-row justify="start">
<el-col :span="5">
<el-select v-model="select_ip" class="m-2" placeholder="选择要模拟的影院IP">
<el-option
v-for="item in cinema_items.value"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
</el-row>
<div class="api_desc">
<p>接口设置
<el-popover
placement="top-start"
title="接口设置说明:"
:width="400"
trigger="hover"
content="勾选需要测试的接口,点击‘开始’,启动对应单机的接口模拟,未勾选的接口会直接穿透到专资"
>
<template #reference>
<el-icon>
<InfoFilled/>
</el-icon>
</template>
</el-popover>
</p>
</div>
<el-divider content-position="left">
<el-checkbox
v-model="mock_config.data_download_check_all"
:indeterminate="mock_config.data_download_indeterminate"
@change="handle_download_all_Change"
>
<span class="api_class">数据下载</span>
</el-checkbox>
</el-divider>
<!-- <el-checkbox-group>-->
<el-row :gutter="0">
<el-col :span="8">
<el-checkbox
v-model="mock_config.download_film_info"
key="download_film_info"
label="download_film_info"
@change="handle_download_all_Change"
>
影片信息下载接口
</el-checkbox>
</el-col>
<el-col :span="8">
<el-checkbox
v-model="mock_config.get_cinema_info"
key="get_cinema_info"
label="get_cinema_info"
@change="handle_download_all_Change">
影院信息下载接口
</el-checkbox>
</el-col>
<el-col :span="8">
<el-checkbox
v-model="mock_config.get_screen_info"
key="get_screen_info"
label="get_screen_info"
@change="handle_download_all_Change">
影厅信息下载接口
</el-checkbox>
</el-col>
</el-row>
<!-- </el-checkbox-group>-->
<el-divider content-position="left">接口</el-divider>
</el-form>
</template> </template>
<style scoped> <style scoped>
span.api_class {
font-size: 18px;
}
div.api_desc {
text-align: left;
}
</style> </style>

@ -122,32 +122,24 @@ onMounted(
status-icon status-icon
:rules="ipRule" :rules="ipRule"
class="cinema-search" class="cinema-search"
:inline="true"
style="width: 100%"
> >
<el-row> <el-row>
<el-col :span="8"> <el-col :span="5">
<el-form-item label="影院IP" prop="ip" label-width="60"> <el-form-item label="影院IP" prop="ip" label-width="60">
<el-input v-model="cinemaSearch.ip" placeholder="请输入完整的影院IP" style="width: 180px;"></el-input> <el-input v-model="cinemaSearch.ip" placeholder="请输入完整的影院IP" style="width: 180px;"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="5">
<el-form-item label="系统版本" prop="version"> <el-form-item label="系统版本" prop="version">
<el-input v-model="cinemaSearch.version" placeholder="支持模糊查询" style="width: 160px;"></el-input> <el-input v-model="cinemaSearch.version" placeholder="支持模糊查询" style="width: 160px;"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item>
<el-button type="primary" @click="submitSearch(cinemaSearchRef)">搜索</el-button> <el-button type="primary" @click="submitSearch(cinemaSearchRef)">搜索</el-button>
</el-form-item>
<el-form-item>
<el-button @click="resetSearch(cinemaSearchRef)">重置</el-button> <el-button @click="resetSearch(cinemaSearchRef)">重置</el-button>
</el-form-item>
<el-form-item>
<el-button v-bind:disabled="refresh_disable" @click="refresh(cinemaSearchRef)" v-bind:loading="refresh_loading">刷新</el-button> <el-button v-bind:disabled="refresh_disable" @click="refresh(cinemaSearchRef)" v-bind:loading="refresh_loading">刷新</el-button>
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<el-table :data="tableData" style="width: 100%"> <el-table :data="tableData" style="width: 100%">

Loading…
Cancel
Save