1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// 开发环境直接引用源码以支持热更新
|
||||
import AdminFramework from '../../src/index.js'
|
||||
import AdminFramework from '../../dist/admin-framework.js'
|
||||
|
||||
// 引入组件映射表
|
||||
import componentMap from './router/component-map.js'
|
||||
|
||||
@@ -21,6 +21,51 @@
|
||||
@changePage="query"></tables>
|
||||
</div>
|
||||
<editModal ref="editModal" :columns="editColumns" :rules="gridOption.rules"> </editModal>
|
||||
|
||||
<FloatPanel ref="floatPanel" title="城市详情" position="right">
|
||||
<div v-if="currentRow" class="detail-content">
|
||||
<div class="detail-item">
|
||||
<label>ID:</label>
|
||||
<span>{{ currentRow.id }}</span>
|
||||
</div>
|
||||
<div class="detail-item">
|
||||
<label>城市名称(中文):</label>
|
||||
<span>{{ currentRow.cn_city }}</span>
|
||||
</div>
|
||||
<div class="detail-item">
|
||||
<label>城市代码:</label>
|
||||
<span>{{ currentRow.city_code }}</span>
|
||||
</div>
|
||||
<div class="detail-item">
|
||||
<label>省份(中文):</label>
|
||||
<span>{{ currentRow.cn_state || '-' }}</span>
|
||||
</div>
|
||||
<div class="detail-item">
|
||||
<label>国家(中文):</label>
|
||||
<span>{{ currentRow.cn_country || '-' }}</span>
|
||||
</div>
|
||||
<div class="detail-item">
|
||||
<label>城市名称(英文):</label>
|
||||
<span>{{ currentRow.city || '-' }}</span>
|
||||
</div>
|
||||
<div class="detail-item">
|
||||
<label>省份(英文):</label>
|
||||
<span>{{ currentRow.state || '-' }}</span>
|
||||
</div>
|
||||
<div class="detail-item">
|
||||
<label>国家(英文):</label>
|
||||
<span>{{ currentRow.country || '-' }}</span>
|
||||
</div>
|
||||
<div class="detail-item">
|
||||
<label>省份代码:</label>
|
||||
<span>{{ currentRow.state_code || '-' }}</span>
|
||||
</div>
|
||||
<div class="detail-item">
|
||||
<label>国家代码:</label>
|
||||
<span>{{ currentRow.country_code || '-' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</FloatPanel>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -36,6 +81,7 @@ export default {
|
||||
rules["cn_country"] = [{ required: false, message: '请填写国家' }];
|
||||
|
||||
return {
|
||||
currentRow: null,
|
||||
seachTypes: [
|
||||
{ key: 'cn_city', value: '城市名称' },
|
||||
{ key: 'city_code', value: '城市代码' },
|
||||
@@ -69,10 +115,17 @@ export default {
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
width: 200,
|
||||
width: 250,
|
||||
type: 'template',
|
||||
render: (h, params) => {
|
||||
let btns = [
|
||||
{
|
||||
title: '详情',
|
||||
type: 'info',
|
||||
click: () => {
|
||||
this.showDetail(params.row)
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
@@ -138,7 +191,43 @@ export default {
|
||||
wch_citiesServer.exportCsv(this.gridOption.param).then(res => {
|
||||
tools.downloadFile(res, '城市管理.csv');
|
||||
});
|
||||
},
|
||||
showDetail(row) {
|
||||
this.currentRow = row
|
||||
this.$refs.floatPanel.show()
|
||||
},
|
||||
hideDetail() {
|
||||
this.$refs.floatPanel.hide()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.detail-content {
|
||||
padding: 10px 0;
|
||||
|
||||
.detail-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 12px 0;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
label {
|
||||
min-width: 120px;
|
||||
font-weight: 500;
|
||||
color: #515a6e;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
span {
|
||||
flex: 1;
|
||||
color: #17233d;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user