V1.0版本基本完成

main
RogerWork 1 year ago
parent 0fe40860cf
commit 0a1e684e44
  1. 304
      public/static/download_film_info.html
  2. 304
      public/static/get_cinema_info.html
  3. 304
      public/static/get_overtime_ticket_status.html
  4. 304
      public/static/get_screen_info.html
  5. 304
      public/static/report_film_schedule.html
  6. 304
      public/static/report_ticket.html
  7. 304
      public/static/upload_screen_seat_info.html
  8. 304
      public/static/valid_error.html
  9. 24
      src/apis/mock.js
  10. 11
      src/components/HelloWorld.vue
  11. 39
      src/components/mock/api_block.vue
  12. 2
      src/layout/components/PageAside.vue
  13. 5
      src/router/index.js
  14. 88
      src/views/mock/index.vue

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -35,8 +35,30 @@ export const set_overtime_config = (params) => {
})
}
export const set_error_code_config = (params) => {
return request({
url: 'api/set_error_code_config',
method: 'get',
params: params
})
}
// export const get_valid_error_json = (params) => {
// const req_params = {
// error_code: params['errorCode'],
// }
// console.log(req_params)
// return request(
// {
// url: 'api/get_response_json',
// method: 'get',
// params: params
// }
// )
// }
export const start_mock = (params,data) => {
export const start_mock = (params, data) => {
console.log(params)
return request({
url: 'api/start_mock',

@ -1,20 +1,13 @@
<script setup>
import {ref} from 'vue'
const count = ref(0)
</script>
<template>
<h1>Demo</h1>
<div>
<el-text size="large" style="font-size: xxx-large">{{ count }}</el-text>
<br>
<el-button type="primary" @click="count++">count++</el-button>
<el-text size="large" style="font-size: xxx-large">鼎新工具箱</el-text>
</div>
</template>
<style scoped>
h1 {
color: red;
}
</style>

@ -1,16 +1,8 @@
<script setup>
import {ref, toRef} from "vue";
import JsonEditorVue from 'json-editor-vue3'
// import {TabsPaneContext} from "element-plus";
import {ref} from "vue";
const props = defineProps(
{
json_data: {
type: Object,
default: () => {
return {}
}
},
tabs: {
type: Array,
default: () => {
@ -19,27 +11,30 @@ const props = defineProps(
}
}
)
const json_data = toRef(props.json_data)
const tabs = props.tabs
const activeName = ref(``)
const handleClick = (tab, event) => {
console.log(tab, event)
}
const activeName = ref('download_film_info')
</script>
<template>
<el-tabs v-model="activeName" class="api_tabs" @tab-click="handleClick">
<el-tabs tab-position="left" v-model="activeName">
<el-tab-pane v-for="(tab,index) in tabs" :label="tab.label" :name="tab.name">
<JsonEditorVue class="editor" v-model="json_data" language="zh-CN"/>
<iframe v-if="tab.name==='download_film_info'" ref="iframe" src="public/static/download_film_info.html"></iframe>
<iframe v-if="tab.name==='get_cinema_info'" ref="iframe" src="public/static/get_cinema_info.html"></iframe>
<iframe v-if="tab.name==='get_overtime_ticket_status'" ref="iframe" src="public/static/get_overtime_ticket_status.html"></iframe>
<iframe v-if="tab.name==='get_screen_info'" ref="iframe" src="public/static/get_screen_info.html"></iframe>
<iframe v-if="tab.name==='report_film_schedule'" ref="iframe" src="public/static/report_film_schedule.html"></iframe>
<iframe v-if="tab.name==='report_ticket'" ref="iframe" src="public/static/report_ticket.html"></iframe>
<iframe v-if="tab.name==='upload_screen_seat_info'" ref="iframe" src="public/static/upload_screen_seat_info.html"></iframe>
<iframe v-if="tab.name==='valid_error'" ref="iframe" src="public/static/valid_error.html"></iframe>
</el-tab-pane>
</el-tabs>
<!-- <JsonEditorVue class="editor" v-model="json_data" language="zh-CN"/>-->
</template>
<style scoped>
.editor {
width: 75%;
}
iframe {
border: none;
overflow-scrolling: auto;
height: 750px;
width: 900px;
}
</style>

@ -14,7 +14,7 @@ const route = useRoute()
<template>
<el-row class="tac">
<el-col :span="25">
<h5 class="mb-2">鼎新工具</h5>
<h5 class="mb-2">鼎新工具</h5>
<el-menu
default-active="1"
router

@ -7,6 +7,11 @@ const routes = [
name: 'Home',
component: Layout,
children: [
{
path: '/',
name: 'hello',
component: () => import('@/components/HelloWorld.vue')
},
{
path: 'update',
name: 'Update',

@ -1,10 +1,18 @@
<script setup>
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 {ref, computed} from "vue";
import {InfoFilled} from "@element-plus/icons-vue";
import JsonEditorVue from "json-editor-vue3";
import Api_block from "@/components/mock/api_block.vue";
const mockConfigPost = 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
onMounted(
@ -437,18 +481,35 @@ onMounted(
</el-icon>
</template>
</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-row>
</template>
</el-checkbox-group>
<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 :span="12">
<el-button @click="handleStart" :disabled="startBtn_disable" :loading="startBtn_loading">开始</el-button>
<el-button @click="handleEnd">停止</el-button>
<el-button type="primary" @click="drawer = true">接口文档</el-button>
</el-row>
</el-row>
</el-form>
<br>
<div>
@ -459,7 +520,7 @@ onMounted(
<el-col :span="4">
<label class="api-label">/退</label>&nbsp
<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="refund" label="过场退票" value="refund"></el-option>
</el-select>
@ -467,20 +528,37 @@ onMounted(
<el-col :span="6">
<label class="api-label">场次</label>&nbsp
<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-select>
</el-col>
<el-col :span="6">
<label class="api-label">审核结果</label>&nbsp
<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"
:value="status.key"></el-option>
</el-select>
</el-col>
</el-row>
</div>
<div v-if="tabs_array[index].name==='valid_error'">
<el-row justify="start">
<el-col span="6">
<label class="api-label">场次状态</label>&nbsp
<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"/>
</el-tab-pane>
</el-tabs>

Loading…
Cancel
Save