注释修改时间和操作列

This commit is contained in:
WUSIJIAN
2025-12-10 17:25:19 +08:00
parent 93859a8cec
commit 395a5b3eca

View File

@@ -21,7 +21,7 @@
</el-form-item>
<el-form-item label="所属城市" prop="city">
<el-cascader
v-model="tableData.param.city"
v-model="tableData.param.cityCode"
:options="cityOptions"
placeholder="请选择城市"
clearable
@@ -76,13 +76,13 @@
</template>
</el-table-column>
<el-table-column prop="createdAt" label="创建时间" show-overflow-tooltip></el-table-column>
<el-table-column prop="updatedAt" label="修改时间" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="200">
<!-- <el-table-column prop="updatedAt" label="修改时间" show-overflow-tooltip></el-table-column> -->
<!-- <el-table-column label="操作" width="200">
<template #default="scope">
<el-button size="small" text type="primary" @click="onOpenEditTenant(scope.row)">修改</el-button>
<!-- <el-button size="small" text type="primary" @click="onRowDel(scope.row)">删除</el-button> -->
<el-button size="small" text type="primary" @click="onRowDel(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table-column> -->
</el-table>
<pagination
v-show="tableData.total > 0"
@@ -121,7 +121,7 @@ const state = reactive({
pageSize: 10,
tenantName: '',
tenantType: '',
city: '',
cityCode: '',
},
},
});
@@ -151,8 +151,8 @@ const tenantList = () => {
state.tableData.loading = true;
const params = { ...state.tableData.param };
// 处理城市数据:如果是数组(级联选择器返回),取最后一个值
if (Array.isArray(params.city) && params.city.length > 0) {
let lastCode = String(params.city[params.city.length - 1]);
if (Array.isArray(params.cityCode) && params.cityCode.length > 0) {
let lastCode = String(params.cityCode[params.cityCode.length - 1]);
// 特殊处理直辖市:如果选中的是省级代码,转换为市级代码 (市辖区)
const municipalityMap: Record<string, string> = {
'11': '110100', '110000': '110100', // 北京
@@ -166,9 +166,9 @@ const tenantList = () => {
// 普通省市如果是4位代码补齐为6位
lastCode = lastCode + '00';
}
params.city = lastCode;
params.cityCode = lastCode;
} else {
params.city = '';
params.cityCode = '';
}
getTenantList(params)