style: 统一内容区卡片、表单和对话框排版
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user