style: 统一内容区卡片、表单和对话框排版
This commit is contained in:
+65
-24
@@ -10,6 +10,7 @@ const palette = computed(() => isDark.value
|
||||
|
||||
watch(palette, (value) => {
|
||||
const root = document.documentElement;
|
||||
const dark = isDark.value;
|
||||
root.style.setProperty("--bg", value.bg);
|
||||
root.style.setProperty("--panel", value.panel);
|
||||
root.style.setProperty("--ink", value.ink);
|
||||
@@ -18,32 +19,72 @@ watch(palette, (value) => {
|
||||
root.style.setProperty("--accent", value.accent);
|
||||
root.style.setProperty("--sidebar", value.sidebar);
|
||||
root.style.setProperty("--danger", value.danger);
|
||||
root.style.setProperty("--accent-soft", isDark.value ? "rgba(121, 192, 255, 0.16)" : "rgba(9, 105, 218, 0.12)");
|
||||
root.dataset.theme = isDark.value ? "dark" : "light";
|
||||
root.style.setProperty("--ok", dark ? "#3FB950" : "#1A7F37");
|
||||
root.style.setProperty("--panel-2", dark ? "#1C2129" : "#F3F5F7");
|
||||
root.style.setProperty("--hover", dark ? "rgba(230, 237, 243, 0.04)" : "rgba(13, 17, 23, 0.03)");
|
||||
root.style.setProperty("--shadow", dark ? "none" : "0 1px 2px rgba(13, 17, 23, 0.04)");
|
||||
root.style.setProperty("--accent-soft", dark ? "rgba(121, 192, 255, 0.16)" : "rgba(9, 105, 218, 0.12)");
|
||||
root.dataset.theme = dark ? "dark" : "light";
|
||||
}, { immediate: true });
|
||||
|
||||
const overrides = computed<GlobalThemeOverrides>(() => ({
|
||||
common: {
|
||||
primaryColor: "#1F6FEB",
|
||||
primaryColorHover: "#388BFD",
|
||||
primaryColorPressed: "#1158C7",
|
||||
primaryColorSuppl: "#1F6FEB",
|
||||
bodyColor: palette.value.bg,
|
||||
cardColor: palette.value.panel,
|
||||
textColor2: palette.value.ink,
|
||||
textColor3: isDark.value ? "#C9D1D9" : "#57606A",
|
||||
placeholderColor: isDark.value ? "#C9D1D9" : "#57606A",
|
||||
borderColor: isDark.value ? "#6E7681" : "#D0D7DE",
|
||||
fontFamily: '"Segoe UI", "Microsoft YaHei", sans-serif',
|
||||
borderRadius: "3px",
|
||||
},
|
||||
Input: {
|
||||
placeholderColor: isDark.value ? "#C9D1D9" : "#57606A",
|
||||
border: isDark.value ? "1px solid #6E7681" : "1px solid #D0D7DE",
|
||||
borderHover: isDark.value ? "1px solid #C9D1D9" : "1px solid #57606A",
|
||||
borderFocus: "1px solid #1F6FEB",
|
||||
},
|
||||
}));
|
||||
const overrides = computed<GlobalThemeOverrides>(() => {
|
||||
const line = isDark.value ? "#6E7681" : "#D0D7DE";
|
||||
const lineHover = isDark.value ? "#C9D1D9" : "#57606A";
|
||||
return {
|
||||
common: {
|
||||
primaryColor: "#1F6FEB",
|
||||
primaryColorHover: "#388BFD",
|
||||
primaryColorPressed: "#1158C7",
|
||||
primaryColorSuppl: "#1F6FEB",
|
||||
bodyColor: palette.value.bg,
|
||||
cardColor: palette.value.panel,
|
||||
modalColor: palette.value.panel,
|
||||
popoverColor: palette.value.panel,
|
||||
textColor2: palette.value.ink,
|
||||
textColor3: isDark.value ? "#C9D1D9" : "#57606A",
|
||||
placeholderColor: isDark.value ? "#C9D1D9" : "#57606A",
|
||||
borderColor: line,
|
||||
fontFamily: '"Segoe UI", "Microsoft YaHei", sans-serif',
|
||||
borderRadius: "4px",
|
||||
heightMedium: "34px",
|
||||
heightSmall: "28px",
|
||||
},
|
||||
Button: {
|
||||
heightMedium: "34px",
|
||||
heightSmall: "28px",
|
||||
paddingMedium: "0 14px",
|
||||
paddingSmall: "0 10px",
|
||||
fontWeightStrong: "600",
|
||||
borderRadiusMedium: "4px",
|
||||
},
|
||||
Input: {
|
||||
heightMedium: "34px",
|
||||
placeholderColor: isDark.value ? "#C9D1D9" : "#57606A",
|
||||
border: `1px solid ${line}`,
|
||||
borderHover: `1px solid ${lineHover}`,
|
||||
borderFocus: "1px solid #1F6FEB",
|
||||
},
|
||||
InternalSelection: {
|
||||
heightMedium: "34px",
|
||||
border: `1px solid ${line}`,
|
||||
borderHover: `1px solid ${lineHover}`,
|
||||
borderActive: "1px solid #1F6FEB",
|
||||
borderFocus: "1px solid #1F6FEB",
|
||||
},
|
||||
Dialog: {
|
||||
borderRadius: "8px",
|
||||
titleFontSize: "16px",
|
||||
titleFontWeight: "650",
|
||||
padding: "20px 24px 16px",
|
||||
},
|
||||
Card: {
|
||||
borderRadius: "8px",
|
||||
paddingMedium: "20px 24px",
|
||||
titleFontSizeMedium: "16px",
|
||||
titleFontWeight: "650",
|
||||
},
|
||||
};
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@@ -59,36 +59,40 @@ onMounted(load);
|
||||
<n-button type="primary" @click="show = true">添加账号</n-button>
|
||||
</header>
|
||||
<div class="admin-scroll">
|
||||
<table v-if="accounts.length" class="admin-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>账号</th>
|
||||
<th>姓名</th>
|
||||
<th>地市</th>
|
||||
<th>凭证</th>
|
||||
<th>登录</th>
|
||||
<th>角色</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="account in accounts" :key="account.id">
|
||||
<td>{{ account.loginId }}</td>
|
||||
<td>{{ account.userName }}</td>
|
||||
<td>{{ account.cityName }}</td>
|
||||
<td>{{ account.credentialValid ? "有效" : "失效" }}</td>
|
||||
<td>{{ account.sessionOpen ? "未退出" : "已退出" }}</td>
|
||||
<td>
|
||||
<n-select :value="account.role" size="small" style="width: 120px" :options="[{ label: '用户', value: 'user' }, { label: '管理员', value: 'admin' }]" @update:value="(value) => setRole(account.id, value)" />
|
||||
</td>
|
||||
<td><n-button size="small" quaternary @click="confirmRemove(account)">删除</n-button></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p v-else class="admin-status">没有账号</p>
|
||||
<div v-if="accounts.length" class="surface table-card">
|
||||
<table class="admin-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>账号</th>
|
||||
<th>姓名</th>
|
||||
<th>地市</th>
|
||||
<th>凭证</th>
|
||||
<th>登录</th>
|
||||
<th class="col-pick">角色</th>
|
||||
<th class="col-actions">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="account in accounts" :key="account.id">
|
||||
<td>{{ account.loginId }}</td>
|
||||
<td>{{ account.userName }}</td>
|
||||
<td>{{ account.cityName }}</td>
|
||||
<td :class="account.credentialValid ? 'status-ok' : 'status-bad'">{{ account.credentialValid ? "有效" : "失效" }}</td>
|
||||
<td :class="account.sessionOpen ? 'status-run' : 'status-wait'">{{ account.sessionOpen ? "未退出" : "已退出" }}</td>
|
||||
<td class="col-pick">
|
||||
<n-select :value="account.role" size="small" :options="[{ label: '用户', value: 'user' }, { label: '管理员', value: 'admin' }]" @update:value="(value) => setRole(account.id, value)" />
|
||||
</td>
|
||||
<td class="col-actions"><n-button size="small" quaternary @click="confirmRemove(account)">删除</n-button></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div v-else class="surface empty-card">
|
||||
<p class="admin-status">没有账号</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<n-modal v-model:show="show" preset="card" title="添加账号" :style="{ width: 'min(440px, calc(100vw - 32px))' }">
|
||||
<n-modal v-model:show="show" class="app-dialog" preset="card" title="添加账号">
|
||||
<LoginView purpose="pool" @done="show = false; load()" />
|
||||
</n-modal>
|
||||
</Shell>
|
||||
|
||||
@@ -68,27 +68,29 @@ onMounted(load);
|
||||
<n-button type="primary" attr-type="submit" :loading="saving" :disabled="!loaded">保存</n-button>
|
||||
</header>
|
||||
<div class="admin-scroll">
|
||||
<p v-if="!loaded" class="admin-status">正在获取</p>
|
||||
<div v-else class="settings-fields">
|
||||
<div class="form-row">
|
||||
<label for="login-mode">登录方式<n-tooltip><template #trigger><n-icon class="hint-mark" :size="16"><HelpCircleOutline /></n-icon></template>自有账号登录不显示验证码。大数据平台登录会显示图形验证码,失败后换一张。管理员始终只校验本系统密码。</n-tooltip></label>
|
||||
<n-radio-group id="login-mode" :value="mode" @update:value="askMode">
|
||||
<n-radio value="local">自有账号</n-radio>
|
||||
<n-radio value="nqi">大数据平台账号</n-radio>
|
||||
</n-radio-group>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="refresh-seconds">凭证刷新间隔<n-tooltip><template #trigger><n-icon class="hint-mark" :size="16"><HelpCircleOutline /></n-icon></template>账号池里的平台凭证按这个间隔刷新。</n-tooltip></label>
|
||||
<div class="setting-control">
|
||||
<n-input-number id="refresh-seconds" v-model:value="seconds" button-placement="both" :min="60" :max="86400" :precision="0" />
|
||||
<span class="setting-unit">秒</span>
|
||||
<div class="surface settings-card">
|
||||
<p v-if="!loaded" class="admin-status">正在获取</p>
|
||||
<div v-else class="settings-fields">
|
||||
<div class="form-row">
|
||||
<label for="login-mode">登录方式<n-tooltip><template #trigger><n-icon class="hint-mark" :size="16"><HelpCircleOutline /></n-icon></template>自有账号登录不显示验证码。大数据平台登录会显示图形验证码,失败后换一张。管理员始终只校验本系统密码。</n-tooltip></label>
|
||||
<n-radio-group id="login-mode" :value="mode" @update:value="askMode">
|
||||
<n-radio value="local">自有账号</n-radio>
|
||||
<n-radio value="nqi">大数据平台账号</n-radio>
|
||||
</n-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="worker-concurrency">同时运行的任务数<n-tooltip><template #trigger><n-icon class="hint-mark" :size="16"><HelpCircleOutline /></n-icon></template>采集和导出共用。调大后马上多领任务。调小后不打断正在运行的任务。</n-tooltip></label>
|
||||
<div class="setting-control">
|
||||
<n-input-number id="worker-concurrency" v-model:value="concurrency" button-placement="both" :min="1" :max="32" :precision="0" />
|
||||
<span class="setting-unit">个</span>
|
||||
<div class="form-row">
|
||||
<label for="refresh-seconds">凭证刷新间隔<n-tooltip><template #trigger><n-icon class="hint-mark" :size="16"><HelpCircleOutline /></n-icon></template>账号池里的平台凭证按这个间隔刷新。</n-tooltip></label>
|
||||
<div class="setting-control">
|
||||
<n-input-number id="refresh-seconds" v-model:value="seconds" button-placement="both" :min="60" :max="86400" :precision="0" />
|
||||
<span class="setting-unit">秒</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="worker-concurrency">同时运行的任务数<n-tooltip><template #trigger><n-icon class="hint-mark" :size="16"><HelpCircleOutline /></n-icon></template>采集和导出共用。调大后马上多领任务。调小后不打断正在运行的任务。</n-tooltip></label>
|
||||
<div class="setting-control">
|
||||
<n-input-number id="worker-concurrency" v-model:value="concurrency" button-placement="both" :min="1" :max="32" :precision="0" />
|
||||
<span class="setting-unit">个</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -104,33 +104,42 @@ onMounted(load);
|
||||
<n-button type="primary" @click="reset()">添加采集</n-button>
|
||||
</header>
|
||||
<div class="admin-scroll">
|
||||
<table v-if="sources.length" class="admin-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>名称</th>
|
||||
<th>来源</th>
|
||||
<th>周期(天)</th>
|
||||
<th>状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="source in sources" :key="source.id">
|
||||
<td>{{ source.name }}</td>
|
||||
<td>{{ source.kind === "nqi" ? "NQI" : "FTP/SFTP" }}</td>
|
||||
<td>{{ source.periodDays }}</td>
|
||||
<td>{{ source.lastError || (source.enabled ? "启用" : "停用") }}</td>
|
||||
<td>
|
||||
<n-button size="small" quaternary @click="reset(source)">编辑</n-button>
|
||||
<n-button size="small" quaternary @click="confirmRemove(source)">删除</n-button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p v-else class="admin-status">没有采集</p>
|
||||
<div v-if="sources.length" class="surface table-card">
|
||||
<table class="admin-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>名称</th>
|
||||
<th>来源</th>
|
||||
<th>周期(天)</th>
|
||||
<th>状态</th>
|
||||
<th class="col-actions">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="source in sources" :key="source.id">
|
||||
<td>{{ source.name }}</td>
|
||||
<td>{{ source.kind === "nqi" ? "NQI" : "FTP/SFTP" }}</td>
|
||||
<td>{{ source.periodDays }}</td>
|
||||
<td>
|
||||
<span v-if="source.lastError" class="status-bad">{{ source.lastError }}</span>
|
||||
<span v-else :class="source.enabled ? 'status-ok' : 'status-wait'">{{ source.enabled ? "启用" : "停用" }}</span>
|
||||
</td>
|
||||
<td class="col-actions">
|
||||
<div class="row-actions">
|
||||
<n-button size="small" quaternary @click="reset(source)">编辑</n-button>
|
||||
<n-button size="small" quaternary @click="confirmRemove(source)">删除</n-button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div v-else class="surface empty-card">
|
||||
<p class="admin-status">没有采集</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<n-modal v-model:show="show" preset="dialog" title="采集" positive-text="保存" negative-text="取消" @positive-click="save">
|
||||
<n-modal v-model:show="show" class="app-dialog app-dialog-wide" preset="dialog" :show-icon="false" title="采集" positive-text="保存" negative-text="取消" @positive-click="save">
|
||||
<div class="form-row"><label>来源</label><n-select v-model:value="kind" :options="[{ label: 'FTP/SFTP', value: 'ftp' }, { label: 'NQI', value: 'nqi' }]" /></div>
|
||||
<div class="form-row"><label>名称</label><n-input v-model:value="name" /></div>
|
||||
<p class="form-section">连接</p>
|
||||
|
||||
@@ -65,26 +65,30 @@ onMounted(load);
|
||||
<n-button type="primary" @click="show = true">添加用户</n-button>
|
||||
</header>
|
||||
<div class="admin-scroll">
|
||||
<table v-if="users.length" class="admin-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>账号</th>
|
||||
<th>角色</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="user in users" :key="user.id">
|
||||
<td>{{ user.username }}</td>
|
||||
<td>{{ user.role === "admin" ? "管理员" : "用户" }}</td>
|
||||
<td><n-button size="small" quaternary @click="confirmRemove(user)">删除</n-button></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p v-else class="admin-status">没有用户</p>
|
||||
<div v-if="users.length" class="surface table-card compact">
|
||||
<table class="admin-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>账号</th>
|
||||
<th class="col-role">角色</th>
|
||||
<th class="col-actions">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="user in users" :key="user.id">
|
||||
<td>{{ user.username }}</td>
|
||||
<td class="col-role">{{ user.role === "admin" ? "管理员" : "用户" }}</td>
|
||||
<td class="col-actions"><n-button size="small" quaternary @click="confirmRemove(user)">删除</n-button></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div v-else class="surface empty-card compact">
|
||||
<p class="admin-status">没有用户</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<n-modal v-model:show="show" preset="dialog" title="添加用户" positive-text="保存" negative-text="取消" @positive-click="create">
|
||||
<n-modal v-model:show="show" class="app-dialog" preset="dialog" :show-icon="false" title="添加用户" positive-text="保存" negative-text="取消" @positive-click="create">
|
||||
<div class="form-row"><label>账号</label><n-input v-model:value="username" /></div>
|
||||
<div class="form-row"><label>密码</label><n-input v-model:value="password" type="password" /></div>
|
||||
<div class="form-row"><label>角色</label><n-select v-model:value="role" :options="[{ label: '用户', value: 'user' }, { label: '管理员', value: 'admin' }]" /></div>
|
||||
|
||||
@@ -263,7 +263,7 @@ async function finishNqi() {
|
||||
<n-button class="lv-go" type="primary" attr-type="submit" :loading="busy">{{ purpose === "pool" ? "添加" : "登录" }}</n-button>
|
||||
</form>
|
||||
</section>
|
||||
<n-modal v-model:show="smsRequired" :mask-closable="false" preset="card" title="短信认证" style="width: 420px">
|
||||
<n-modal v-model:show="smsRequired" class="app-dialog" :mask-closable="false" preset="card" title="短信认证">
|
||||
<n-input v-model:value="smsCode" placeholder="输入短信验证码" @keyup.enter="finishNqi" />
|
||||
<div class="sms-actions">
|
||||
<n-button @click="backFromSms">返回</n-button>
|
||||
|
||||
@@ -70,22 +70,15 @@ async function submit() {
|
||||
<div class="brand-mark" aria-hidden="true">D</div>
|
||||
<h1>安装 DecomEval</h1>
|
||||
</div>
|
||||
<div class="form-grid">
|
||||
<label>数据库主机</label>
|
||||
<n-input v-model:value="host" />
|
||||
<label>端口</label>
|
||||
<n-input v-model:value="port" :allow-input="allowPort" placeholder="5432" :input-props="{ inputmode: 'numeric', autocomplete: 'off' }" />
|
||||
<label>数据库名</label>
|
||||
<n-input v-model:value="database" />
|
||||
<label>数据库用户</label>
|
||||
<n-input v-model:value="username" />
|
||||
<label>数据库密码</label>
|
||||
<n-input v-model:value="password" type="password" />
|
||||
<label>管理员账号</label>
|
||||
<n-input v-model:value="adminUsername" />
|
||||
<label>管理员密码</label>
|
||||
<n-input v-model:value="adminPassword" type="password" />
|
||||
</div>
|
||||
<p class="form-section">数据库</p>
|
||||
<div class="form-row"><label>主机</label><n-input v-model:value="host" /></div>
|
||||
<div class="form-row"><label>端口</label><n-input v-model:value="port" :allow-input="allowPort" placeholder="5432" :input-props="{ inputmode: 'numeric', autocomplete: 'off' }" /></div>
|
||||
<div class="form-row"><label>数据库名</label><n-input v-model:value="database" /></div>
|
||||
<div class="form-row"><label>用户</label><n-input v-model:value="username" /></div>
|
||||
<div class="form-row"><label>密码</label><n-input v-model:value="password" type="password" show-password-on="click" /></div>
|
||||
<p class="form-section">管理员</p>
|
||||
<div class="form-row"><label>账号</label><n-input v-model:value="adminUsername" /></div>
|
||||
<div class="form-row"><label>密码</label><n-input v-model:value="adminPassword" type="password" show-password-on="click" /></div>
|
||||
<n-button class="gate-submit" type="primary" :loading="busy" @click="submit">完成安装</n-button>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@@ -34,6 +34,13 @@ function statusLabel(status: string) {
|
||||
return "失败";
|
||||
}
|
||||
|
||||
function statusClass(status: string) {
|
||||
if (status === "done") return "status-ok";
|
||||
if (status === "running") return "status-run";
|
||||
if (status === "failed") return "status-bad";
|
||||
return "status-wait";
|
||||
}
|
||||
|
||||
function rangeLabel(row: Task) {
|
||||
if (row.start && row.end) return `${row.start} 至 ${row.end}`;
|
||||
return "全部时间";
|
||||
@@ -138,37 +145,41 @@ onUnmounted(stopPoll);
|
||||
<n-button type="primary" @click="show = true">提交任务</n-button>
|
||||
</header>
|
||||
<div class="admin-scroll">
|
||||
<table v-if="tasks.length" class="admin-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>小区</th>
|
||||
<th>时间</th>
|
||||
<th>提交时间</th>
|
||||
<th>格式</th>
|
||||
<th>状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="row in tasks" :key="row.id">
|
||||
<td>{{ row.cellKey || "全部" }}</td>
|
||||
<td>{{ rangeLabel(row) }}</td>
|
||||
<td>{{ submittedLabel(row.createdAt) }}</td>
|
||||
<td>{{ row.format }}</td>
|
||||
<td>
|
||||
<div :class="row.status === 'failed' ? 'late' : ''">{{ statusLabel(row.status) }}</div>
|
||||
<div v-if="row.error" class="late">{{ row.error }}</div>
|
||||
</td>
|
||||
<td>
|
||||
<n-button v-if="row.status === 'done'" type="primary" size="small" @click="download(row)">下载结果</n-button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p v-else class="admin-status">还没有任务</p>
|
||||
<div v-if="tasks.length" class="surface table-card">
|
||||
<table class="admin-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>小区</th>
|
||||
<th>时间</th>
|
||||
<th>提交时间</th>
|
||||
<th class="col-format">格式</th>
|
||||
<th>状态</th>
|
||||
<th class="col-actions">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="row in tasks" :key="row.id">
|
||||
<td>{{ row.cellKey || "全部" }}</td>
|
||||
<td>{{ rangeLabel(row) }}</td>
|
||||
<td>{{ submittedLabel(row.createdAt) }}</td>
|
||||
<td class="col-format">{{ row.format }}</td>
|
||||
<td>
|
||||
<div :class="statusClass(row.status)">{{ statusLabel(row.status) }}</div>
|
||||
<div v-if="row.error" class="status-bad">{{ row.error }}</div>
|
||||
</td>
|
||||
<td class="col-actions">
|
||||
<n-button v-if="row.status === 'done'" type="primary" size="small" @click="download(row)">下载结果</n-button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div v-else class="surface empty-card">
|
||||
<p class="admin-status">还没有任务</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<n-modal v-model:show="show" preset="dialog" title="提交任务" positive-text="提交" negative-text="取消" @positive-click="submit">
|
||||
<n-modal v-model:show="show" class="app-dialog" preset="dialog" :show-icon="false" title="提交任务" positive-text="提交" negative-text="取消" @positive-click="submit">
|
||||
<div class="form-row"><label>格式</label><n-select v-model:value="format" :options="formats" /></div>
|
||||
<div class="form-row"><label>小区</label><n-input v-model:value="cellKey" placeholder="留空则导出全部" /></div>
|
||||
<div class="form-row">
|
||||
|
||||
+163
-77
@@ -11,6 +11,7 @@ button, input, select { font: inherit; }
|
||||
::selection { background: var(--accent-soft); }
|
||||
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
||||
|
||||
/* shell — keep sider geometry and selected-edge indicator */
|
||||
.shell { height: 100%; background: var(--bg); color: var(--ink); }
|
||||
.shell .n-layout,
|
||||
.shell .n-layout-scroll-container,
|
||||
@@ -78,6 +79,8 @@ button, input, select { font: inherit; }
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* page chrome */
|
||||
.page {
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
@@ -94,7 +97,7 @@ button, input, select { font: inherit; }
|
||||
gap: 16px;
|
||||
flex: none;
|
||||
margin: 0;
|
||||
padding: 0 16px 0 20px;
|
||||
padding: 0 24px;
|
||||
border-bottom: 1px solid var(--line);
|
||||
background: var(--bg);
|
||||
}
|
||||
@@ -111,16 +114,40 @@ button, input, select { font: inherit; }
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow: auto;
|
||||
padding: 20px 24px 24px;
|
||||
padding: 20px 24px 28px;
|
||||
}
|
||||
.admin-status { margin: 0; color: var(--muted); }
|
||||
|
||||
/* surfaces */
|
||||
.surface {
|
||||
background: var(--panel);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 8px;
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
.table-card { overflow: auto; }
|
||||
.table-card.compact,
|
||||
.empty-card.compact { width: min(720px, 100%); }
|
||||
.empty-card {
|
||||
min-height: 220px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
padding: 32px 24px;
|
||||
}
|
||||
.settings-card {
|
||||
width: min(520px, 100%);
|
||||
padding: 20px 22px 10px;
|
||||
}
|
||||
.settings-card .form-row:last-child { margin-bottom: 10px; }
|
||||
|
||||
/* tables */
|
||||
.admin-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.admin-table th,
|
||||
.admin-table td {
|
||||
padding: 10px 16px 10px 0;
|
||||
padding: 11px 16px;
|
||||
border-bottom: 1px solid var(--line);
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
@@ -129,30 +156,62 @@ button, input, select { font: inherit; }
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
background: var(--bg);
|
||||
background: var(--panel-2);
|
||||
color: var(--muted);
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
font-weight: 550;
|
||||
letter-spacing: 0.01em;
|
||||
}
|
||||
.admin-table tbody tr:last-child td { border-bottom: 0; }
|
||||
.admin-table tbody tr:hover td { background: var(--hover); }
|
||||
.admin-table .col-actions {
|
||||
width: 1%;
|
||||
white-space: nowrap;
|
||||
text-align: right;
|
||||
}
|
||||
.admin-table .col-format,
|
||||
.admin-table .col-role { width: 88px; }
|
||||
.admin-table .col-pick { width: 128px; }
|
||||
.row-actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
/* forms: label left, control right */
|
||||
.form-row {
|
||||
display: grid;
|
||||
grid-template-columns: max-content minmax(160px, 280px);
|
||||
gap: 8px 12px;
|
||||
grid-template-columns: 7em minmax(0, 1fr);
|
||||
gap: 8px 14px;
|
||||
align-items: center;
|
||||
justify-content: start;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.form-row > * { min-width: 0; }
|
||||
.form-row > label {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
color: var(--ink);
|
||||
line-height: 1.3;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.form-row .n-input,
|
||||
.form-row .n-select,
|
||||
.form-row .n-input-number,
|
||||
.form-row .n-date-picker { width: 100%; }
|
||||
.field-error { margin: 4px 0 0; color: var(--danger); font-size: 12px; }
|
||||
.form-row .n-date-picker,
|
||||
.form-row .n-radio-group { width: 100%; }
|
||||
.form-row > div { width: 100%; }
|
||||
.form-row:last-child { margin-bottom: 0; }
|
||||
.field-error { margin: 6px 0 0; color: var(--danger); font-size: 12px; line-height: 1.3; }
|
||||
.form-section {
|
||||
margin: 14px 0 8px;
|
||||
margin: 18px 0 10px;
|
||||
color: var(--muted);
|
||||
font-size: 12px;
|
||||
font-weight: 650;
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
.gate-brand + .form-section,
|
||||
.form-section:first-child { margin-top: 0; }
|
||||
.hint-mark {
|
||||
display: inline-grid;
|
||||
place-items: center;
|
||||
@@ -163,26 +222,40 @@ button, input, select { font: inherit; }
|
||||
vertical-align: -2px;
|
||||
cursor: help;
|
||||
}
|
||||
.late { color: var(--danger); }
|
||||
.filters, .form-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 7em minmax(0, 1fr);
|
||||
gap: 8px 14px;
|
||||
align-items: center;
|
||||
}
|
||||
.late, .status-bad { color: var(--danger); }
|
||||
.status-ok { color: var(--ok); }
|
||||
.status-run { color: var(--accent); }
|
||||
.status-wait { color: var(--muted); }
|
||||
|
||||
.settings-form {
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.settings-fields { max-width: 640px; }
|
||||
.settings-form .form-row label { min-width: 8em; }
|
||||
.setting-control {
|
||||
.settings-fields .form-row { grid-template-columns: 11em minmax(0, 1fr); }
|
||||
.settings-fields .n-radio-group {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 2px 18px;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
.setting-control {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
min-width: 0;
|
||||
}
|
||||
.setting-control .n-input-number { flex: 1; width: 100%; min-width: 0; }
|
||||
.setting-unit { flex: none; color: var(--muted); }
|
||||
.setting-control .n-input-number { width: 100%; min-width: 0; }
|
||||
.setting-unit { flex: none; color: var(--muted); line-height: 34px; }
|
||||
.panel { background: var(--panel); border: 1px solid var(--line); }
|
||||
.filters, .form-grid { display: grid; grid-template-columns: 112px minmax(0, 280px); gap: 8px 12px; align-items: center; }
|
||||
.gate-card.wide .form-grid { grid-template-columns: 112px minmax(0, 1fr); }
|
||||
.hint {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
@@ -194,6 +267,8 @@ button, input, select { font: inherit; }
|
||||
text-align: center;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/* gate / login / install */
|
||||
.app-root { height: 100%; }
|
||||
.gate {
|
||||
position: relative;
|
||||
@@ -208,77 +283,74 @@ button, input, select { font: inherit; }
|
||||
}
|
||||
.gate .theme-switch { position: absolute; top: 16px; right: 16px; }
|
||||
.sider-foot .theme-switch { position: static; align-self: flex-start; }
|
||||
.gate-card {
|
||||
width: min(440px, 100%);
|
||||
background: var(--panel);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 4px;
|
||||
padding: 28px 28px 22px;
|
||||
}
|
||||
.gate-card.wide { width: min(560px, 100%); }
|
||||
.gate-submit.n-button {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
margin-top: 24px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.12em;
|
||||
}
|
||||
.gate-card,
|
||||
.lv-side {
|
||||
width: max-content;
|
||||
max-width: calc(100% - 32px);
|
||||
box-sizing: border-box;
|
||||
width: min(400px, 100%);
|
||||
background: var(--panel);
|
||||
color: var(--ink);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 4px;
|
||||
padding: 28px 24px 20px;
|
||||
border-radius: 8px;
|
||||
padding: 32px;
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
.gate-card.wide { width: min(480px, 100%); }
|
||||
.gate-brand,
|
||||
.lv-side .lv-brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
margin-bottom: 18px;
|
||||
justify-content: flex-start;
|
||||
gap: 12px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
.gate-brand h1,
|
||||
.lv-side h1 { margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -0.02em; }
|
||||
.brand-mark,
|
||||
.lv-side .lv-mark {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
border: 1px solid var(--accent);
|
||||
color: var(--accent);
|
||||
border-radius: 4px;
|
||||
border-radius: 6px;
|
||||
font-weight: 650;
|
||||
font-size: 13px;
|
||||
font-size: 14px;
|
||||
flex: none;
|
||||
}
|
||||
.lv-side h1 { margin: 0; font-size: 18px; }
|
||||
.lv-side form,
|
||||
.lv-embed form {
|
||||
display: grid;
|
||||
grid-template-columns: max-content minmax(0, 1fr);
|
||||
column-gap: 8px;
|
||||
row-gap: 10px;
|
||||
grid-template-columns: 4em minmax(0, 1fr);
|
||||
column-gap: 12px;
|
||||
row-gap: 14px;
|
||||
align-items: center;
|
||||
}
|
||||
.lv-side form { grid-template-columns: max-content 220px; }
|
||||
.lv-side label,
|
||||
.lv-embed label { margin: 0; justify-self: end; }
|
||||
.lv-embed label {
|
||||
margin: 0;
|
||||
color: var(--ink);
|
||||
line-height: 1.3;
|
||||
}
|
||||
.lv-side .n-alert,
|
||||
.lv-embed .n-alert { grid-column: 1 / -1; }
|
||||
.lv-side .n-button,
|
||||
.lv-embed .n-button { grid-column: 2; width: 100%; }
|
||||
.lv-side .lv-go,
|
||||
.lv-embed .lv-go {
|
||||
.lv-embed .lv-go,
|
||||
.gate-submit.n-button {
|
||||
height: 36px;
|
||||
margin-top: 4px;
|
||||
margin-top: 8px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.08em;
|
||||
}
|
||||
.gate-submit.n-button {
|
||||
width: 100%;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.lv-captcha { display: flex; gap: 8px; align-items: center; min-width: 0; }
|
||||
.lv-captcha .n-input { flex: 1; min-width: 0; }
|
||||
.lv-captcha-box {
|
||||
width: 112px;
|
||||
height: 36px;
|
||||
width: 108px;
|
||||
height: 34px;
|
||||
flex: none;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
@@ -289,6 +361,7 @@ button, input, select { font: inherit; }
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
}
|
||||
.lv-captcha-box:hover { border-color: var(--accent); }
|
||||
.lv-captcha-box img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@@ -309,26 +382,39 @@ button, input, select { font: inherit; }
|
||||
.sms-actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
margin-top: 12px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
.gate-brand {
|
||||
display: flex;
|
||||
gap: 14px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 22px;
|
||||
.captcha { height: 34px; cursor: pointer; }
|
||||
|
||||
/* dialogs: class is on the dialog/card itself; actions stay outside the scrolling body */
|
||||
.n-dialog.app-dialog,
|
||||
.n-card.app-dialog,
|
||||
.app-dialog .n-dialog,
|
||||
.app-dialog .n-card {
|
||||
width: min(440px, calc(100vw - 32px));
|
||||
}
|
||||
.gate-brand h1 { margin: 0; font-size: 20px; }
|
||||
.brand-mark {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid var(--accent);
|
||||
color: var(--accent);
|
||||
display: grid;
|
||||
place-items: center;
|
||||
font-weight: 650;
|
||||
.n-dialog.app-dialog-wide,
|
||||
.n-card.app-dialog-wide,
|
||||
.app-dialog-wide .n-dialog,
|
||||
.app-dialog-wide .n-card {
|
||||
width: min(480px, calc(100vw - 32px));
|
||||
}
|
||||
.n-dialog.app-dialog .n-dialog__content,
|
||||
.n-dialog.app-dialog-wide .n-dialog__content,
|
||||
.n-card.app-dialog .n-card__content,
|
||||
.n-card.app-dialog-wide .n-card__content,
|
||||
.app-dialog .n-dialog__content,
|
||||
.app-dialog-wide .n-dialog__content,
|
||||
.app-dialog .n-card__content,
|
||||
.app-dialog-wide .n-card__content {
|
||||
max-height: min(64vh, 560px);
|
||||
overflow: auto;
|
||||
}
|
||||
.n-dialog.app-dialog .n-dialog__action,
|
||||
.n-dialog.app-dialog-wide .n-dialog__action {
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
background: var(--panel);
|
||||
}
|
||||
.captcha { height: 40px; cursor: pointer; }
|
||||
.row-actions { display: flex; gap: 8px; }
|
||||
|
||||
Reference in New Issue
Block a user