fix(web/route): 修复站点管理无法编辑的问题
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
|
|
||||||
|
|
||||||
local URL_REFILL_MACHINE = "http://gitea.fse-media.group/Henry_Du/FSE-Ticket.sys/raw/branch/main/refillmachine.lua"
|
local URL_REFILL_MACHINE = "http://gitea.fse-media.group/Henry_Du/FSE-Ticket.sys/raw/branch/main/refillmachine.lua"
|
||||||
local URL_UPDATE_REFILL = "http://gitea.fse-media.group/Henry_Du/FSE-Ticket.sys/raw/branch/main/update_refill.lua"
|
local URL_UPDATE_REFILL = "http://gitea.fse-media.group/Henry_Du/FSE-Ticket.sys/raw/branch/main/update_refill.lua"
|
||||||
|
|
||||||
|
|||||||
+100
-2
@@ -8,7 +8,7 @@
|
|||||||
<title>线路规划|FSE铁路运输票务系统</title>
|
<title>线路规划|FSE铁路运输票务系统</title>
|
||||||
<link rel="icon" type="image/png" href="/FSE-ticket.png">
|
<link rel="icon" type="image/png" href="/FSE-ticket.png">
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
||||||
<link rel="stylesheet" href="/style.css?v=18">
|
<link rel="stylesheet" href="/style.css?v=19">
|
||||||
<script src="https://unpkg.com/vue@3/dist/vue.global.prod.js"></script>
|
<script src="https://unpkg.com/vue@3/dist/vue.global.prod.js"></script>
|
||||||
<script src="/socket.io/socket.io.js"></script>
|
<script src="/socket.io/socket.io.js"></script>
|
||||||
</head>
|
</head>
|
||||||
@@ -296,7 +296,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 票价设置弹窗 -->
|
|
||||||
<div v-if="showFareModal" class="modal show">
|
<div v-if="showFareModal" class="modal show">
|
||||||
<div class="modal-card">
|
<div class="modal-card">
|
||||||
<h4 class="modal-title">设置票价</h4>
|
<h4 class="modal-title">设置票价</h4>
|
||||||
@@ -478,6 +477,105 @@
|
|||||||
<div class="faremap-canvas" :style="{ transform: `scale(${fareMapScale})` }"
|
<div class="faremap-canvas" :style="{ transform: `scale(${fareMapScale})` }"
|
||||||
v-html="fareMapSvg">
|
v-html="fareMapSvg">
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 提取出来的弹窗,避免被 currentView = 'management' 屏蔽 -->
|
||||||
|
<div v-if="showFareModal" class="modal show">
|
||||||
|
<div class="modal-card">
|
||||||
|
<h4 class="modal-title">设置票价</h4>
|
||||||
|
<div class="mb-4 text-center">
|
||||||
|
<div class="flex between"
|
||||||
|
style="justify-content: center; gap: 20px; font-size: 1.1em; font-weight: bold;">
|
||||||
|
<span>{{ getStationName(fareSelection[0]) }}</span>
|
||||||
|
<i class="fas fa-arrow-right text-muted"></i>
|
||||||
|
<span>{{ getStationName(fareSelection[1]) }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mb-4">
|
||||||
|
<label>常规票价</label>
|
||||||
|
<input v-model.number="currentFare.cost_regular" type="number" class="w-100">
|
||||||
|
</div>
|
||||||
|
<div class="mb-4">
|
||||||
|
<label>特急票价</label>
|
||||||
|
<input v-model.number="currentFare.cost_express" type="number" class="w-100">
|
||||||
|
</div>
|
||||||
|
<div class="modal-actions">
|
||||||
|
<button class="danger" @click="deleteCurrentFare"
|
||||||
|
v-if="currentFare.exists">删除</button>
|
||||||
|
<button @click="saveCurrentFare">保存</button>
|
||||||
|
<button class="danger" @click="closeFareModal">取消</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="showStationModal" class="modal show">
|
||||||
|
<div class="modal-card">
|
||||||
|
<h4 class="modal-title">站点编辑</h4>
|
||||||
|
<div class="mb-4">
|
||||||
|
<label>站点编号</label>
|
||||||
|
<input v-model="stationForm.code" class="w-100">
|
||||||
|
</div>
|
||||||
|
<div class="mb-4">
|
||||||
|
<label>中文名</label>
|
||||||
|
<input v-model="stationForm.name" class="w-100">
|
||||||
|
</div>
|
||||||
|
<div class="mb-4">
|
||||||
|
<label>英文名</label>
|
||||||
|
<input v-model="stationForm.en_name" class="w-100">
|
||||||
|
</div>
|
||||||
|
<div class="mb-4">
|
||||||
|
<label class="switch-label">
|
||||||
|
<input type="checkbox" v-model="stationForm.transfer_enabled">
|
||||||
|
<span class="slider"></span>
|
||||||
|
<span class="label-text">可换乘</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="mb-4">
|
||||||
|
<label>可换乘到的站点</label>
|
||||||
|
<select v-model="stationForm.transfer_to" multiple class="w-100"
|
||||||
|
:disabled="!stationForm.transfer_enabled" style="height: 180px;">
|
||||||
|
<option v-for="t in transferTargets" :key="t.code" :value="t.code">
|
||||||
|
{{ t.name }} ({{ t.en_name }}) - {{ t.code }}
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="modal-actions">
|
||||||
|
<button class="danger" @click="deleteStation(stationFormOriginalCode)">删除</button>
|
||||||
|
<button @click="saveStationSettings">保存</button>
|
||||||
|
<button class="danger" @click="closeStationModal">取消</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="showLineModal" class="modal show">
|
||||||
|
<div class="modal-card">
|
||||||
|
<h4 class="modal-title">线路编辑</h4>
|
||||||
|
<div class="mb-4">
|
||||||
|
<label>线路编号</label>
|
||||||
|
<input v-model="lineForm.id" class="w-100">
|
||||||
|
</div>
|
||||||
|
<div class="mb-4">
|
||||||
|
<label>中文名</label>
|
||||||
|
<input v-model="lineForm.name" class="w-100">
|
||||||
|
</div>
|
||||||
|
<div class="mb-4">
|
||||||
|
<label>英文名</label>
|
||||||
|
<input v-model="lineForm.en_name" class="w-100">
|
||||||
|
</div>
|
||||||
|
<div class="mb-4">
|
||||||
|
<label>颜色</label>
|
||||||
|
<div class="flex" style="gap:8px;">
|
||||||
|
<input type="text" v-model="lineForm.color" class="w-100" placeholder="#3366cc">
|
||||||
|
<input type="color" v-model="lineForm.color" title="选择颜色"
|
||||||
|
style="width: 48px; padding: 0; border: none; height: 32px;">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-actions">
|
||||||
|
<button @click="saveLineSettings">保存</button>
|
||||||
|
<button class="danger" @click="closeLineModal">取消</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<footer class="site-footer">
|
<footer class="site-footer">
|
||||||
|
|||||||
Reference in New Issue
Block a user