|
@@ -0,0 +1,631 @@
|
|
|
+<template>
|
|
|
+ <div class="data-entry-container">
|
|
|
+ <h1>全球营收数据录入工具</h1>
|
|
|
+
|
|
|
+ <div class="form-section">
|
|
|
+ <h2>基础财务指标</h2>
|
|
|
+ <div class="form-grid">
|
|
|
+ <div class="form-group">
|
|
|
+ <label>年度总营收(万元)</label>
|
|
|
+ <input type="number" v-model="formData.rev">
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label>年度总成本(万元)</label>
|
|
|
+ <input type="number" v-model="formData.cogs">
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label>年度总利润(万元)</label>
|
|
|
+ <input type="number" v-model="formData.gp">
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label>年度毛利率(%)</label>
|
|
|
+ <input type="number" v-model="formData.gpm">
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label>总资产(万元)</label>
|
|
|
+ <input type="number" v-model="formData.assets">
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label>业务覆盖国家数量</label>
|
|
|
+ <input type="number" v-model="formData.country">
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label>年度订单总量</label>
|
|
|
+ <input type="number" v-model="formData.order">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 营收构成明细 -->
|
|
|
+ <div class="form-section">
|
|
|
+ <h2>营收构成明细</h2>
|
|
|
+ <button @click="addRevenueItem" class="add-btn">添加收入类型</button>
|
|
|
+ <table class="data-table">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th>收入类型</th>
|
|
|
+ <th>金额(万元)</th>
|
|
|
+ <th>操作</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <tr v-for="(item, index) in formData.revList" :key="index">
|
|
|
+ <td>
|
|
|
+ <input v-model="item.type" placeholder="请输入收入类型">
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input type="number" v-model="item.value" placeholder="请输入金额">
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <button @click="removeRevenueItem(index)" class="remove-btn">删除</button>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ <!-- 成本构成明细 -->
|
|
|
+ <div class="form-section">
|
|
|
+ <h2>成本构成明细</h2>
|
|
|
+ <button @click="addCostItem" class="add-btn">添加成本类型</button>
|
|
|
+ <table class="data-table">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th>成本类型</th>
|
|
|
+ <th>金额(万元)</th>
|
|
|
+ <th>操作</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <tr v-for="(item, index) in formData.cogsList" :key="index">
|
|
|
+ <td>
|
|
|
+ <input v-model="item.type" placeholder="请输入成本类型">
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input type="number" v-model="item.value" placeholder="请输入金额">
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <button @click="removeCostItem(index)" class="remove-btn">删除</button>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 各国业务数据 -->
|
|
|
+ <div class="form-section">
|
|
|
+ <h2>各国业务数据</h2>
|
|
|
+ <button @click="addCountryItem" class="add-btn">添加国家数据</button>
|
|
|
+ <table class="data-table">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th>国家名称</th>
|
|
|
+ <th>订单数量</th>
|
|
|
+ <th>收入(万元)</th>
|
|
|
+ <th>利润(万元)</th>
|
|
|
+ <th>操作</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <tr v-for="(item, index) in formData.orderList" :key="index">
|
|
|
+ <td>
|
|
|
+ <el-select
|
|
|
+ v-model="item.country"
|
|
|
+ filterable
|
|
|
+ allow-create
|
|
|
+ default-first-option
|
|
|
+ placeholder="请选择国家"
|
|
|
+ clearable
|
|
|
+ style="width: 100%">
|
|
|
+ <el-option
|
|
|
+ v-for="country in countryOptions"
|
|
|
+ :key="country.value"
|
|
|
+ :label="country.label"
|
|
|
+ :value="country.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input type="number" v-model="item.num" placeholder="请输入订单数量">
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input type="number" v-model="item.rev" placeholder="请输入收入">
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input type="number" v-model="item.gp" placeholder="请输入利润">
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <button @click="removeCountryItem(index)" class="remove-btn">删除</button>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 产品线利润数据 -->
|
|
|
+ <div class="form-section">
|
|
|
+ <h2>产品线利润数据</h2>
|
|
|
+ <button @click="addProductItem" class="add-btn">添加产品数据</button>
|
|
|
+ <table class="data-table">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th>产品类型</th>
|
|
|
+ <th>利润金额(万元)</th>
|
|
|
+ <th>毛利率(%)</th>
|
|
|
+ <th>操作</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <tr v-for="(item, index) in formData.gpList" :key="index">
|
|
|
+ <td>
|
|
|
+ <input v-model="item.type" placeholder="请输入产品类型">
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input type="number" v-model="item.value" placeholder="请输入利润金额">
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input type="number" v-model="item.gmp" placeholder="请输入毛利率">
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <button @click="removeProductItem(index)" class="remove-btn">删除</button>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 月度经营数据 -->
|
|
|
+ <div class="form-section">
|
|
|
+ <h2>月度经营数据</h2>
|
|
|
+ <button @click="regenerateTradeList" class="add-btn">重新生成过去12个月</button>
|
|
|
+ <table class="data-table">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th>月份</th>
|
|
|
+ <th>收入(万元)</th>
|
|
|
+ <th>成本(万元)</th>
|
|
|
+ <th>利润(万元)</th>
|
|
|
+ <th>利润率(%)</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <tr v-for="(item, index) in formData.tradeList" :key="index">
|
|
|
+ <td>
|
|
|
+ <input v-model="item.month" placeholder="请输入月份">
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input type="number" v-model="item.revenue" placeholder="请输入收入">
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input type="number" v-model="item.cost" placeholder="请输入成本">
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input type="number" v-model="item.profit" placeholder="请输入利润">
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input type="number" v-model="item.profitRate" placeholder="请输入利润率">
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 月度预测数据 -->
|
|
|
+ <div class="form-section">
|
|
|
+ <h2>月度预测数据</h2>
|
|
|
+ <button @click="regenerateForecastList" class="add-btn">重新生成未来12个月</button>
|
|
|
+ <table class="data-table">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th>月份</th>
|
|
|
+ <th>预测收入(万元)</th>
|
|
|
+ <th>预测利润率(%)</th>
|
|
|
+ <th>预测资产(万元)</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <tr v-for="(item, index) in formData.forecastList" :key="index">
|
|
|
+ <td>
|
|
|
+ <input v-model="item.month" placeholder="请输入月份">
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input type="number" v-model="item.revenue" placeholder="请输入预测收入">
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input type="number" v-model="item.profitRate" placeholder="请输入预测利润率">
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input type="number" v-model="item.assets" placeholder="请输入预测资产">
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ <div class="actions">
|
|
|
+ <button @click="submitForm" class="primary">保存</button>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import {onMounted, reactive, ref} from 'vue';
|
|
|
+import {getRev, saveRev} from "@/api/house/input";
|
|
|
+import {ElOption, ElSelect} from 'element-plus';
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: "RevInput",
|
|
|
+ components: {
|
|
|
+ ElSelect,
|
|
|
+ ElOption
|
|
|
+ },
|
|
|
+ setup() {
|
|
|
+ // 常见国家列表
|
|
|
+ const countryOptions = [
|
|
|
+ {label: '中国', value: '中国'},
|
|
|
+ {label: '美国', value: '美国'},
|
|
|
+ {label: '英国', value: '英国'},
|
|
|
+ {label: '德国', value: '德国'},
|
|
|
+ {label: '法国', value: '法国'},
|
|
|
+ {label: '日本', value: '日本'},
|
|
|
+ {label: '韩国', value: '韩国'},
|
|
|
+ {label: '澳大利亚', value: '澳大利亚'},
|
|
|
+ {label: '巴西', value: '巴西'},
|
|
|
+ {label: '印度', value: '印度'},
|
|
|
+ {label: '俄罗斯', value: '俄罗斯'},
|
|
|
+ {label: '加拿大', value: '加拿大'},
|
|
|
+ {label: '意大利', value: '意大利'},
|
|
|
+ {label: '西班牙', value: '西班牙'},
|
|
|
+ {label: '荷兰', value: '荷兰'},
|
|
|
+ {label: '瑞典', value: '瑞典'},
|
|
|
+ {label: '瑞士', value: '瑞士'},
|
|
|
+ {label: '新加坡', value: '新加坡'},
|
|
|
+ {label: '马来西亚', value: '马来西亚'},
|
|
|
+ {label: '泰国', value: '泰国'},
|
|
|
+ {label: '越南', value: '越南'},
|
|
|
+ {label: '墨西哥', value: '墨西哥'},
|
|
|
+ {label: '阿根廷', value: '阿根廷'},
|
|
|
+ {label: '南非', value: '南非'},
|
|
|
+ {label: '埃及', value: '埃及'},
|
|
|
+ {label: '土耳其', value: '土耳其'},
|
|
|
+ {label: '沙特阿拉伯', value: '沙特阿拉伯'},
|
|
|
+ {label: '阿联酋', value: '阿联酋'}
|
|
|
+ ];
|
|
|
+
|
|
|
+ // 添加生成过去12个月月份的方法
|
|
|
+ const generatePastMonths = () => {
|
|
|
+ const months = [];
|
|
|
+ const now = new Date();
|
|
|
+ for (let i = 11; i >= 0; i--) {
|
|
|
+ const date = new Date(now.getFullYear(), now.getMonth() - i, 1);
|
|
|
+ const month = (date.getMonth() + 1).toString().padStart(2, '0');
|
|
|
+ const year = date.getFullYear();
|
|
|
+ months.push(`${year}-${month}`);
|
|
|
+ }
|
|
|
+ return months;
|
|
|
+ };
|
|
|
+
|
|
|
+ // 添加生成未来12个月月份的方法
|
|
|
+ const generateFutureMonths = () => {
|
|
|
+ const months = [];
|
|
|
+ const now = new Date();
|
|
|
+ for (let i = 0; i < 12; i++) {
|
|
|
+ const date = new Date(now.getFullYear(), now.getMonth() + i + 1, 1);
|
|
|
+ const month = (date.getMonth() + 1).toString().padStart(2, '0');
|
|
|
+ const year = date.getFullYear();
|
|
|
+ months.push(`${year}-${month}`);
|
|
|
+ }
|
|
|
+ return months;
|
|
|
+ };
|
|
|
+
|
|
|
+ // 添加重新生成过去12个月数据的方法
|
|
|
+ const regenerateTradeList = () => {
|
|
|
+ formData.tradeList = formData.tradeList.map((item, index) => ({
|
|
|
+ ...item,
|
|
|
+ month: generatePastMonths()[index] || item.month
|
|
|
+ }));
|
|
|
+ };
|
|
|
+
|
|
|
+ // 添加重新生成未来12个月数据的方法
|
|
|
+ const regenerateForecastList = () => {
|
|
|
+ const newMonths = generateFutureMonths();
|
|
|
+ formData.forecastList = formData.forecastList.map((item, index) => ({
|
|
|
+ ...item,
|
|
|
+ month: newMonths[index] || item.month
|
|
|
+ }));
|
|
|
+ };
|
|
|
+
|
|
|
+ const formData = reactive({});
|
|
|
+
|
|
|
+ const jsonOutput = ref('');
|
|
|
+
|
|
|
+ // 页面加载时获取数据
|
|
|
+ const fetchData = async () => {
|
|
|
+ try {
|
|
|
+ const response = await getRev();
|
|
|
+ if (response && response.data) {
|
|
|
+ // 用获取到的数据填充表单
|
|
|
+ Object.assign(formData, response.data);
|
|
|
+ } else {
|
|
|
+ console.warn('接口返回数据为空或格式不正确');
|
|
|
+ // 如果没有获取到数据,则使用自动生成的月份数据
|
|
|
+ formData.tradeList = generatePastMonths().map(month => ({
|
|
|
+ month,
|
|
|
+ revenue: 0,
|
|
|
+ cost: 0,
|
|
|
+ profit: 0,
|
|
|
+ profitRate: 0
|
|
|
+ }));
|
|
|
+ formData.forecastList = generateFutureMonths().map(month => ({
|
|
|
+ month,
|
|
|
+ revenue: 0,
|
|
|
+ profitRate: 0,
|
|
|
+ assets: 0
|
|
|
+ }));
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.error('获取数据失败:', error);
|
|
|
+ // 保留默认数据,确保页面不为空白
|
|
|
+ formData.tradeList = generatePastMonths().map(month => ({
|
|
|
+ month,
|
|
|
+ revenue: 0,
|
|
|
+ cost: 0,
|
|
|
+ profit: 0,
|
|
|
+ profitRate: 0
|
|
|
+ }));
|
|
|
+ formData.forecastList = generateFutureMonths().map(month => ({
|
|
|
+ month,
|
|
|
+ revenue: 0,
|
|
|
+ profitRate: 0,
|
|
|
+ assets: 0
|
|
|
+ }));
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
+ // 组件挂载时调用获取数据的方法
|
|
|
+ onMounted(() => {
|
|
|
+ fetchData();
|
|
|
+ });
|
|
|
+
|
|
|
+ const addRevenueItem = () => {
|
|
|
+ formData.revList.push({type: "", value: 0});
|
|
|
+ };
|
|
|
+
|
|
|
+ const removeRevenueItem = (index) => {
|
|
|
+ formData.revList.splice(index, 1);
|
|
|
+ };
|
|
|
+
|
|
|
+ const addCostItem = () => {
|
|
|
+ formData.cogsList.push({type: "", value: 0});
|
|
|
+ };
|
|
|
+
|
|
|
+ const removeCostItem = (index) => {
|
|
|
+ formData.cogsList.splice(index, 1);
|
|
|
+ };
|
|
|
+
|
|
|
+ const addCountryItem = () => {
|
|
|
+ formData.orderList.push({country: "", num: 0, rev: 0, gp: 0});
|
|
|
+ };
|
|
|
+
|
|
|
+ const removeCountryItem = (index) => {
|
|
|
+ formData.orderList.splice(index, 1);
|
|
|
+ };
|
|
|
+
|
|
|
+ const addProductItem = () => {
|
|
|
+ formData.gpList.push({type: "", value: 0, gmp: 0});
|
|
|
+ };
|
|
|
+
|
|
|
+ const removeProductItem = (index) => {
|
|
|
+ formData.gpList.splice(index, 1);
|
|
|
+ };
|
|
|
+
|
|
|
+ const submitForm = async () => {
|
|
|
+ try {
|
|
|
+ // 调用 saveRev 提交表单数据
|
|
|
+ await saveRev(formData);
|
|
|
+ console.log('表单提交成功');
|
|
|
+ } catch (error) {
|
|
|
+ console.error('提交失败:', error);
|
|
|
+ }
|
|
|
+ };
|
|
|
+ return {
|
|
|
+ formData,
|
|
|
+ countryOptions,
|
|
|
+ jsonOutput,
|
|
|
+ addRevenueItem,
|
|
|
+ removeRevenueItem,
|
|
|
+ addCostItem,
|
|
|
+ removeCostItem,
|
|
|
+ addCountryItem,
|
|
|
+ removeCountryItem,
|
|
|
+ addProductItem,
|
|
|
+ removeProductItem,
|
|
|
+ regenerateTradeList,
|
|
|
+ regenerateForecastList,
|
|
|
+ submitForm
|
|
|
+ };
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+.data-entry-container {
|
|
|
+ max-width: 1200px;
|
|
|
+ margin: 0 auto;
|
|
|
+ padding: 20px;
|
|
|
+ background-color: #ffffff;
|
|
|
+ border-radius: 8px;
|
|
|
+ box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
|
|
|
+}
|
|
|
+
|
|
|
+h1 {
|
|
|
+ text-align: center;
|
|
|
+ margin-bottom: 24px;
|
|
|
+ color: #333;
|
|
|
+ font-size: 24px;
|
|
|
+}
|
|
|
+
|
|
|
+.form-section {
|
|
|
+ margin-bottom: 24px;
|
|
|
+ background: #f8f9fa;
|
|
|
+ padding: 20px;
|
|
|
+ border-radius: 6px;
|
|
|
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
|
|
|
+}
|
|
|
+
|
|
|
+.form-section h2 {
|
|
|
+ margin-bottom: 16px;
|
|
|
+ color: #333;
|
|
|
+ font-size: 18px;
|
|
|
+ border-bottom: 1px solid #e0e0e0;
|
|
|
+ padding-bottom: 8px;
|
|
|
+}
|
|
|
+
|
|
|
+.form-grid {
|
|
|
+ display: grid;
|
|
|
+ grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
|
|
|
+ gap: 16px;
|
|
|
+}
|
|
|
+
|
|
|
+.form-group {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+}
|
|
|
+
|
|
|
+.form-group label {
|
|
|
+ margin-bottom: 6px;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #555;
|
|
|
+}
|
|
|
+
|
|
|
+.form-group input {
|
|
|
+ padding: 10px;
|
|
|
+ border: 1px solid #dcdfe6;
|
|
|
+ border-radius: 4px;
|
|
|
+ transition: border-color 0.3s;
|
|
|
+}
|
|
|
+
|
|
|
+.form-group input:focus {
|
|
|
+ outline: none;
|
|
|
+ border-color: #409eff;
|
|
|
+}
|
|
|
+
|
|
|
+.add-btn {
|
|
|
+ background-color: #409eff;
|
|
|
+ color: white;
|
|
|
+ border: none;
|
|
|
+ padding: 8px 16px;
|
|
|
+ border-radius: 4px;
|
|
|
+ cursor: pointer;
|
|
|
+ margin-bottom: 12px;
|
|
|
+ transition: background-color 0.3s;
|
|
|
+}
|
|
|
+
|
|
|
+.add-btn:hover {
|
|
|
+ background-color: #337ecc;
|
|
|
+}
|
|
|
+
|
|
|
+.data-table {
|
|
|
+ width: 100%;
|
|
|
+ border-collapse: collapse;
|
|
|
+ margin-bottom: 12px;
|
|
|
+ background-color: white;
|
|
|
+ border-radius: 4px;
|
|
|
+ overflow: hidden;
|
|
|
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
|
|
|
+}
|
|
|
+
|
|
|
+.data-table th,
|
|
|
+.data-table td {
|
|
|
+ padding: 12px;
|
|
|
+ border: 1px solid #ebeef5;
|
|
|
+ text-align: left;
|
|
|
+}
|
|
|
+
|
|
|
+.data-table th {
|
|
|
+ background-color: #f5f7fa;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #606266;
|
|
|
+}
|
|
|
+
|
|
|
+.data-table td input {
|
|
|
+ width: 100%;
|
|
|
+ padding: 6px 10px;
|
|
|
+ border: 1px solid #dcdfe6;
|
|
|
+ border-radius: 4px;
|
|
|
+ box-sizing: border-box;
|
|
|
+}
|
|
|
+
|
|
|
+.remove-btn {
|
|
|
+ background-color: #f56c6c;
|
|
|
+ color: white;
|
|
|
+ border: none;
|
|
|
+ padding: 6px 12px;
|
|
|
+ border-radius: 4px;
|
|
|
+ cursor: pointer;
|
|
|
+ transition: background-color 0.3s;
|
|
|
+}
|
|
|
+
|
|
|
+.remove-btn:hover {
|
|
|
+ background-color: #e45656;
|
|
|
+}
|
|
|
+
|
|
|
+.actions {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ gap: 16px;
|
|
|
+ margin-top: 24px;
|
|
|
+}
|
|
|
+
|
|
|
+.actions button {
|
|
|
+ padding: 10px 24px;
|
|
|
+ border: none;
|
|
|
+ border-radius: 4px;
|
|
|
+ cursor: pointer;
|
|
|
+ font-size: 14px;
|
|
|
+ transition: all 0.3s;
|
|
|
+}
|
|
|
+
|
|
|
+.actions button:not(.primary) {
|
|
|
+ background-color: #f4f4f5;
|
|
|
+ color: #606266;
|
|
|
+}
|
|
|
+
|
|
|
+.actions button:not(.primary):hover {
|
|
|
+ background-color: #e9e9eb;
|
|
|
+}
|
|
|
+
|
|
|
+.actions button.primary {
|
|
|
+ background-color: #67c23a;
|
|
|
+ color: white;
|
|
|
+}
|
|
|
+
|
|
|
+.actions button.primary:hover {
|
|
|
+ background-color: #5daf34;
|
|
|
+}
|
|
|
+
|
|
|
+.json-output {
|
|
|
+ margin-top: 24px;
|
|
|
+ background-color: #f5f7fa;
|
|
|
+ padding: 16px;
|
|
|
+ border-radius: 4px;
|
|
|
+}
|
|
|
+
|
|
|
+.json-output h3 {
|
|
|
+ margin-top: 0;
|
|
|
+ color: #333;
|
|
|
+}
|
|
|
+
|
|
|
+.json-output pre {
|
|
|
+ white-space: pre-wrap;
|
|
|
+ word-wrap: break-word;
|
|
|
+ background-color: #fff;
|
|
|
+ padding: 12px;
|
|
|
+ border-radius: 4px;
|
|
|
+ max-height: 300px;
|
|
|
+ overflow-y: auto;
|
|
|
+}
|
|
|
+</style>
|