|
|
@ -1,10 +1,18 @@ |
|
|
|
<script setup> |
|
|
|
<script setup> |
|
|
|
import {cinema_list} from '@/apis/update.js'; |
|
|
|
import {cinema_list} from '@/apis/update.js'; |
|
|
|
import {end_mock, get_overtime_show_info, get_response_json, set_overtime_config, start_mock} from "@/apis/mock.js"; |
|
|
|
import { |
|
|
|
|
|
|
|
end_mock, |
|
|
|
|
|
|
|
get_overtime_show_info, |
|
|
|
|
|
|
|
get_response_json, |
|
|
|
|
|
|
|
set_error_code_config, |
|
|
|
|
|
|
|
set_overtime_config, |
|
|
|
|
|
|
|
start_mock |
|
|
|
|
|
|
|
} from "@/apis/mock.js"; |
|
|
|
import {onMounted, onBeforeUnmount} from "vue"; |
|
|
|
import {onMounted, onBeforeUnmount} from "vue"; |
|
|
|
import {ref, computed} from "vue"; |
|
|
|
import {ref, computed} from "vue"; |
|
|
|
import {InfoFilled} from "@element-plus/icons-vue"; |
|
|
|
import {InfoFilled} from "@element-plus/icons-vue"; |
|
|
|
import JsonEditorVue from "json-editor-vue3"; |
|
|
|
import JsonEditorVue from "json-editor-vue3"; |
|
|
|
|
|
|
|
import Api_block from "@/components/mock/api_block.vue"; |
|
|
|
|
|
|
|
|
|
|
|
const mockConfigPost = ref() |
|
|
|
const mockConfigPost = ref() |
|
|
|
let cinema_items = ref([]); |
|
|
|
let cinema_items = ref([]); |
|
|
@ -349,6 +357,42 @@ const handleEnd = () => { |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 抽屉相关 |
|
|
|
|
|
|
|
const drawer = ref(false) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ValidError相关 |
|
|
|
|
|
|
|
const selectErrorCode = ref('0') |
|
|
|
|
|
|
|
const errorCode = [ |
|
|
|
|
|
|
|
{label: '验证通过', code: '0'}, |
|
|
|
|
|
|
|
{label: '数据报送方错误', code: '100'}, |
|
|
|
|
|
|
|
{label: '影院编码错误', code: '200'}, |
|
|
|
|
|
|
|
{label: '影厅编码错误', code: '201'}, |
|
|
|
|
|
|
|
{label: '网售商编码错误', code: '202'}, |
|
|
|
|
|
|
|
{label: '座位编码错误', code: '203'}, |
|
|
|
|
|
|
|
{label: '影片编码错误', code: '204'}, |
|
|
|
|
|
|
|
{label: '场次编码错误', code: '205'}, |
|
|
|
|
|
|
|
{label: '票价错误', code: '300'}, |
|
|
|
|
|
|
|
{label: '退票类型,查无此票', code: '400'}, |
|
|
|
|
|
|
|
{label: '超时退票', code: '500'}, |
|
|
|
|
|
|
|
{label: '超时售票', code: '600'}, |
|
|
|
|
|
|
|
{label: '超期退票', code: '700'}, |
|
|
|
|
|
|
|
{label: '影院停业上报受限', code: '800'}, |
|
|
|
|
|
|
|
{label: '影院营业上报受限', code: '801'}, |
|
|
|
|
|
|
|
{label: '影院注销上报错误', code: '802'}, |
|
|
|
|
|
|
|
{label: '影院停业上报错误', code: '803'} |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
const handleErrorCodeChange = () => { |
|
|
|
|
|
|
|
const params = { |
|
|
|
|
|
|
|
ip: selectIp.value, |
|
|
|
|
|
|
|
api: 'valid_error', |
|
|
|
|
|
|
|
error_code: selectErrorCode.value |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
set_error_code_config(params).then( |
|
|
|
|
|
|
|
(res) => { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
).catch((err) => { |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Vue生命周期钩子函数 |
|
|
|
// Vue生命周期钩子函数 |
|
|
|
onMounted( |
|
|
|
onMounted( |
|
|
@ -437,18 +481,35 @@ onMounted( |
|
|
|
</el-icon> |
|
|
|
</el-icon> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-popover> |
|
|
|
</el-popover> |
|
|
|
|
|
|
|
<el-popover |
|
|
|
|
|
|
|
v-if="api.key === 'valid_error'" |
|
|
|
|
|
|
|
placement="top-start" |
|
|
|
|
|
|
|
title="数据清洗查询说明:" |
|
|
|
|
|
|
|
:width="400" |
|
|
|
|
|
|
|
trigger="hover" |
|
|
|
|
|
|
|
content="此接口勾选后需要在下方接口返回值定义区域中指定验证数据的返回状态,由于此接口为实时数据请求,选择状态后不会更新JSON编辑器中的返回值数据, 需要通过单机日志查看所选状态的返回值。" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<template #reference> |
|
|
|
|
|
|
|
<el-icon> |
|
|
|
|
|
|
|
<InfoFilled/> |
|
|
|
|
|
|
|
</el-icon> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-popover> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-row> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-checkbox-group> |
|
|
|
</el-checkbox-group> |
|
|
|
<br> |
|
|
|
<br> |
|
|
|
|
|
|
|
<el-drawer v-model="drawer" :with-header="false" size="1000px" style="height: 100%"> |
|
|
|
|
|
|
|
<api_block :tabs="tabs_dict"/> |
|
|
|
|
|
|
|
</el-drawer> |
|
|
|
<el-row justify="start"> |
|
|
|
<el-row justify="start"> |
|
|
|
<el-row :span="12"> |
|
|
|
<el-row :span="12"> |
|
|
|
<el-button @click="handleStart" :disabled="startBtn_disable" :loading="startBtn_loading">开始</el-button> |
|
|
|
<el-button @click="handleStart" :disabled="startBtn_disable" :loading="startBtn_loading">开始</el-button> |
|
|
|
<el-button @click="handleEnd">停止</el-button> |
|
|
|
<el-button @click="handleEnd">停止</el-button> |
|
|
|
|
|
|
|
<el-button type="primary" @click="drawer = true">接口文档</el-button> |
|
|
|
</el-row> |
|
|
|
</el-row> |
|
|
|
</el-row> |
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
<br> |
|
|
|
<br> |
|
|
|
<div> |
|
|
|
<div> |
|
|
@ -459,7 +520,7 @@ onMounted( |
|
|
|
<el-col :span="4"> |
|
|
|
<el-col :span="4"> |
|
|
|
<label class="api-label">售/退</label>  |
|
|
|
<label class="api-label">售/退</label>  |
|
|
|
<el-select style="width: 50%" v-model="selectedOvertimeShowType" placeholder="请选择" |
|
|
|
<el-select style="width: 50%" v-model="selectedOvertimeShowType" placeholder="请选择" |
|
|
|
@change="handleOvertimeShowTypeChange"> |
|
|
|
@change="handleOvertimeShowTypeChange" :disabled="disableAll"> |
|
|
|
<el-option key="sell" label="过场售票" value="sell"></el-option> |
|
|
|
<el-option key="sell" label="过场售票" value="sell"></el-option> |
|
|
|
<el-option key="refund" label="过场退票" value="refund"></el-option> |
|
|
|
<el-option key="refund" label="过场退票" value="refund"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
@ -467,20 +528,37 @@ onMounted( |
|
|
|
<el-col :span="6"> |
|
|
|
<el-col :span="6"> |
|
|
|
<label class="api-label">场次</label>  |
|
|
|
<label class="api-label">场次</label>  |
|
|
|
<el-select style="width: 75%" v-model="selectedShowInfo" placeholder="请选择" |
|
|
|
<el-select style="width: 75%" v-model="selectedShowInfo" placeholder="请选择" |
|
|
|
@change="handleOvertimeConfigSave"> |
|
|
|
@change="handleOvertimeConfigSave" :disabled="disableAll"> |
|
|
|
<el-option v-for="show in showInfo" :key="show.id" :label="show.show" :value="show.id"></el-option> |
|
|
|
<el-option v-for="show in showInfo" :key="show.id" :label="show.show" :value="show.id"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-col :span="6"> |
|
|
|
<label class="api-label">审核结果</label>  |
|
|
|
<label class="api-label">审核结果</label>  |
|
|
|
<el-select style="width: 50%" v-model="selectedStatus" placeholder="请选择" |
|
|
|
<el-select style="width: 50%" v-model="selectedStatus" placeholder="请选择" |
|
|
|
@change="handleOvertimeConfigSave"> |
|
|
|
@change="handleOvertimeConfigSave" :disabled="disableAll"> |
|
|
|
<el-option v-for="status in auditStatusInfo" :key="status.key" :label="status.status" |
|
|
|
<el-option v-for="status in auditStatusInfo" :key="status.key" :label="status.status" |
|
|
|
:value="status.key"></el-option> |
|
|
|
:value="status.key"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-row> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div v-if="tabs_array[index].name==='valid_error'"> |
|
|
|
|
|
|
|
<el-row justify="start"> |
|
|
|
|
|
|
|
<el-col span="6"> |
|
|
|
|
|
|
|
<label class="api-label">场次状态</label>  |
|
|
|
|
|
|
|
<el-select v-model="selectErrorCode" class="m-2" placeholder="请选择返回状态" |
|
|
|
|
|
|
|
@change="handleErrorCodeChange" |
|
|
|
|
|
|
|
:disabled="disableAll"> |
|
|
|
|
|
|
|
<el-option |
|
|
|
|
|
|
|
v-for="item in errorCode" |
|
|
|
|
|
|
|
:key="item.code" |
|
|
|
|
|
|
|
:label="item.code + '-' + item.label" |
|
|
|
|
|
|
|
:value="item.code" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</el-select> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
</div> |
|
|
|
<JsonEditorVue class="editor" v-model="json_data" language="zh-CN" @change="handleRunningChange"/> |
|
|
|
<JsonEditorVue class="editor" v-model="json_data" language="zh-CN" @change="handleRunningChange"/> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tabs> |
|
|
|
</el-tabs> |
|
|
|