This commit is contained in:
2026-07-21 13:20:06 +08:00
parent 76df2b9cd2
commit e50d1b8fda
21 changed files with 714 additions and 129 deletions

View File

@@ -109,6 +109,8 @@ import { getToken } from '@/utils/auth';
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
const DEFAULT_COUNTRY_CODE = '+86';
export default {
data() {
const validateIataCode = (rule, value, callback) => {
@@ -165,6 +167,8 @@ export default {
dialogWidth: 980,
tip: false,
searchShow: true,
labelWidth: 120,
searchLabelWidth: 120,
searchMenuSpan: 6,
border: true,
index: true,
@@ -266,11 +270,35 @@ export default {
addDisplay: false,
editDisplay: false,
},
{
label: '行政区划',
prop: 'regionName',
search: true,
minWidth: 160,
overHidden: false,
maxlength: 128,
showWordLimit: true,
rules: [{ max: 128, message: '行政区划不能超过128字', trigger: 'blur' }],
},
{
label: '详细地址',
prop: 'detailAddress',
type: 'textarea',
minRows: 3,
span: 24,
minWidth: 220,
overHidden: false,
maxlength: 255,
showWordLimit: true,
rules: [{ max: 255, message: '详细地址不能超过255字', trigger: 'blur' }],
},
{
label: '经度',
prop: 'longitude',
type: 'number',
precision: 6,
minWidth: 130,
overHidden: false,
rules: [{ validator: validateLongitude, trigger: 'blur' }],
},
{
@@ -278,6 +306,8 @@ export default {
prop: 'latitude',
type: 'number',
precision: 6,
minWidth: 130,
overHidden: false,
rules: [{ validator: validateLatitude, trigger: 'blur' }],
},
{
@@ -285,6 +315,8 @@ export default {
prop: 'dataSource',
type: 'select',
search: true,
minWidth: 120,
overHidden: false,
dicData: [
{ label: '全部', value: '' },
{ label: '初始导入', value: '初始导入' },
@@ -299,6 +331,8 @@ export default {
search: true,
slot: true,
dataType: 'number',
minWidth: 110,
overHidden: false,
dicData: [
{ label: '全部', value: '' },
{ label: '启用', value: 1 },
@@ -406,7 +440,7 @@ export default {
return this.option.column.find(item => item.prop === prop);
},
loadProvinceOptions() {
getLazyTree('00').then(res => {
getLazyTree(DEFAULT_COUNTRY_CODE).then(res => {
this.provinceOptions = res.data.data;
this.findColumn('provinceCode').dicData = this.provinceOptions;
});
@@ -448,6 +482,8 @@ export default {
},
normalizeRow(row) {
row.code = row.iataCode ? `JC-${row.iataCode}` : row.code;
row.regionName = String(row.regionName || '').trim();
row.detailAddress = String(row.detailAddress || '').trim();
if (!row.dataSource) row.dataSource = '手动录入';
if (!row.status) row.status = 1;
return row;