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

@@ -0,0 +1,57 @@
<template>
<div v-if="isEmptyTotal" class="empty-pagination avue-crud__pagination">
<el-pagination
background
:current-page="page.currentPage"
:page-size="page.pageSize"
:page-sizes="pageSizes"
layout="total, sizes, prev, pager, next, jumper"
:total="0"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</div>
</template>
<script>
export default {
name: 'EmptyPagination',
props: {
page: {
type: Object,
required: true,
},
},
emits: ['size-change', 'current-change', 'load'],
computed: {
isEmptyTotal() {
return Number(this.page.total || 0) === 0;
},
pageSizes() {
return this.page.pageSizes || [10, 20, 50, 100];
},
},
methods: {
handleSizeChange(pageSize) {
this.page.currentPage = 1;
this.page.pageSize = pageSize;
this.$emit('size-change', pageSize);
this.$emit('load');
},
handleCurrentChange(currentPage) {
this.page.currentPage = currentPage;
this.$emit('current-change', currentPage);
this.$emit('load');
},
},
};
</script>
<style lang="scss" scoped>
.empty-pagination {
display: flex;
justify-content: flex-end;
padding: 20px 0 0;
background: #fff;
}
</style>

View File

@@ -27,6 +27,7 @@ import codeEditor from './components/code-editor/main.vue';
import cronEditor from './components/cron-editor/main.vue'; import cronEditor from './components/cron-editor/main.vue';
import basicBlock from './components/basic-block/main.vue'; import basicBlock from './components/basic-block/main.vue';
import basicContainer from './components/basic-container/main.vue'; import basicContainer from './components/basic-container/main.vue';
import emptyPagination from './components/empty-pagination/main.vue';
import thirdRegister from './components/third-register/main.vue'; import thirdRegister from './components/third-register/main.vue';
import flowDesign from './components/flow-design/main.vue'; import flowDesign from './components/flow-design/main.vue';
import flowDesignStep from './components/flow-design-step/main.vue'; import flowDesignStep from './components/flow-design-step/main.vue';
@@ -45,6 +46,7 @@ for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
} }
app.component('basicContainer', basicContainer); app.component('basicContainer', basicContainer);
app.component('basicBlock', basicBlock); app.component('basicBlock', basicBlock);
app.component('emptyPagination', emptyPagination);
app.component('highlight', highlight); app.component('highlight', highlight);
app.component('codeEditor', codeEditor); app.component('codeEditor', codeEditor);
app.component('cronEditor', cronEditor); app.component('cronEditor', cronEditor);

View File

@@ -36,6 +36,10 @@ export const option = {
dialogWidth: 1050, dialogWidth: 1050,
labelPosition: 'top', labelPosition: 'top',
tip: false, tip: false,
searchBtnText: '查询',
emptyBtnText: '重置',
saveBtnText: '提交',
updateBtnText: '提交',
searchShow: true, searchShow: true,
searchMenuSpan: 6, searchMenuSpan: 6,
border: true, border: true,
@@ -90,6 +94,7 @@ export const option = {
dicData: accidentNatureDic, dicData: accidentNatureDic,
search: true, search: true,
minWidth: 120, minWidth: 120,
rules: [{ required: true, message: '请选择事故性质', trigger: 'change' }],
}, },
{ {
label: '事故责任', label: '事故责任',
@@ -98,12 +103,14 @@ export const option = {
dicData: accidentResponsibilityDic, dicData: accidentResponsibilityDic,
search: true, search: true,
minWidth: 120, minWidth: 120,
rules: [{ required: true, message: '请选择事故责任', trigger: 'change' }],
}, },
{ {
label: '直接经济损失', label: '直接经济损失',
prop: 'directEconomicLoss', prop: 'directEconomicLoss',
type: 'number', type: 'number',
precision: 2, precision: 2,
append: '元',
minWidth: 140, minWidth: 140,
rules: [{ validator: validateNonNegative, trigger: 'blur' }], rules: [{ validator: validateNonNegative, trigger: 'blur' }],
}, },
@@ -112,6 +119,7 @@ export const option = {
prop: 'insuranceClaimAmount', prop: 'insuranceClaimAmount',
type: 'number', type: 'number',
precision: 2, precision: 2,
append: '元',
minWidth: 140, minWidth: 140,
rules: [{ validator: validateNonNegative, trigger: 'blur' }], rules: [{ validator: validateNonNegative, trigger: 'blur' }],
}, },
@@ -122,7 +130,8 @@ export const option = {
minRows: 3, minRows: 3,
span: 24, span: 24,
search: true, search: true,
hide: true, minWidth: 220,
overHidden: true,
rules: [{ max: 500, message: '最多 500 个字符', trigger: 'blur' }], rules: [{ max: 500, message: '最多 500 个字符', trigger: 'blur' }],
}, },
{ {
@@ -131,7 +140,8 @@ export const option = {
type: 'textarea', type: 'textarea',
minRows: 3, minRows: 3,
span: 24, span: 24,
hide: true, minWidth: 180,
overHidden: true,
rules: [{ max: 200, message: '最多 200 个字符', trigger: 'blur' }], rules: [{ max: 200, message: '最多 200 个字符', trigger: 'blur' }],
}, },
{ {

View File

@@ -35,6 +35,10 @@ export const option = {
dialogWidth: 1050, dialogWidth: 1050,
labelPosition: 'top', labelPosition: 'top',
tip: false, tip: false,
searchBtnText: '查询',
emptyBtnText: '重置',
saveBtnText: '提交',
updateBtnText: '提交',
searchShow: true, searchShow: true,
searchMenuSpan: 6, searchMenuSpan: 6,
border: true, border: true,
@@ -105,7 +109,6 @@ export const option = {
label: '客车类型及等级', label: '客车类型及等级',
prop: 'passengerTypeLevel', prop: 'passengerTypeLevel',
minWidth: 150, minWidth: 150,
hide: true,
rules: [{ max: 50, message: '最多 50 个字符', trigger: 'blur' }], rules: [{ max: 50, message: '最多 50 个字符', trigger: 'blur' }],
}, },
{ {
@@ -119,6 +122,7 @@ export const option = {
prop: 'fee', prop: 'fee',
type: 'number', type: 'number',
precision: 2, precision: 2,
append: '元',
minWidth: 100, minWidth: 100,
rules: [ rules: [
{ required: true, message: '请输入费用', trigger: 'blur' }, { required: true, message: '请输入费用', trigger: 'blur' },
@@ -129,7 +133,6 @@ export const option = {
label: '评定(复核)单位', label: '评定(复核)单位',
prop: 'assessmentUnit', prop: 'assessmentUnit',
minWidth: 160, minWidth: 160,
hide: true,
rules: [{ max: 50, message: '最多 50 个字符', trigger: 'blur' }], rules: [{ max: 50, message: '最多 50 个字符', trigger: 'blur' }],
}, },
{ {
@@ -138,7 +141,8 @@ export const option = {
type: 'textarea', type: 'textarea',
minRows: 3, minRows: 3,
span: 24, span: 24,
hide: true, minWidth: 180,
overHidden: true,
rules: [{ max: 200, message: '最多 200 个字符', trigger: 'blur' }], rules: [{ max: 200, message: '最多 200 个字符', trigger: 'blur' }],
}, },
{ {

View File

@@ -30,11 +30,16 @@ export const ocrTemplateDic = [
]; ];
export const option = { export const option = {
title: '保险记录(OCR)',
height: 'auto', height: 'auto',
calcHeight: 32, calcHeight: 32,
dialogWidth: 1100, dialogWidth: 1100,
labelPosition: 'top', labelPosition: 'top',
tip: false, tip: false,
searchBtnText: '查询',
emptyBtnText: '重置',
saveBtnText: '提交',
updateBtnText: '提交',
searchShow: true, searchShow: true,
searchMenuSpan: 6, searchMenuSpan: 6,
border: true, border: true,
@@ -123,6 +128,7 @@ export const option = {
prop: 'insuredAmount', prop: 'insuredAmount',
type: 'number', type: 'number',
precision: 2, precision: 2,
append: '元',
minWidth: 120, minWidth: 120,
rules: [{ validator: validateNonNegative, trigger: 'blur' }], rules: [{ validator: validateNonNegative, trigger: 'blur' }],
}, },
@@ -131,6 +137,7 @@ export const option = {
prop: 'premium', prop: 'premium',
type: 'number', type: 'number',
precision: 2, precision: 2,
append: '元',
minWidth: 120, minWidth: 120,
rules: [ rules: [
{ required: true, message: '请输入保费', trigger: 'blur' }, { required: true, message: '请输入保费', trigger: 'blur' },

View File

@@ -13,11 +13,16 @@ const validateNonNegative = (rule, value, callback) => {
}; };
export const option = { export const option = {
title: '里程记录(无船)',
height: 'auto', height: 'auto',
calcHeight: 32, calcHeight: 32,
dialogWidth: 980, dialogWidth: 980,
labelPosition: 'top', labelPosition: 'top',
tip: false, tip: false,
searchBtnText: '查询',
emptyBtnText: '重置',
saveBtnText: '提交',
updateBtnText: '提交',
searchShow: true, searchShow: true,
searchMenuSpan: 6, searchMenuSpan: 6,
border: true, border: true,
@@ -57,7 +62,7 @@ export const option = {
rules: [{ validator: validateNonNegative, trigger: 'blur' }], rules: [{ validator: validateNonNegative, trigger: 'blur' }],
}, },
{ {
label: '本月行驶里程km', label: '本月行驶里程(km)',
prop: 'monthlyMileage', prop: 'monthlyMileage',
type: 'number', type: 'number',
precision: 2, precision: 2,
@@ -65,7 +70,7 @@ export const option = {
rules: [{ validator: validateNonNegative, trigger: 'blur' }], rules: [{ validator: validateNonNegative, trigger: 'blur' }],
}, },
{ {
label: '累计行驶里程km', label: '累计行驶里程(km)',
prop: 'totalMileage', prop: 'totalMileage',
type: 'number', type: 'number',
precision: 2, precision: 2,

View File

@@ -21,11 +21,16 @@ const validatePositiveInteger = (rule, value, callback) => {
}; };
export const option = { export const option = {
title: '换胎记录(无船)',
height: 'auto', height: 'auto',
calcHeight: 32, calcHeight: 32,
dialogWidth: 980, dialogWidth: 980,
labelPosition: 'top', labelPosition: 'top',
tip: false, tip: false,
searchBtnText: '查询',
emptyBtnText: '重置',
saveBtnText: '提交',
updateBtnText: '提交',
searchShow: true, searchShow: true,
searchMenuSpan: 6, searchMenuSpan: 6,
border: true, border: true,
@@ -81,6 +86,7 @@ export const option = {
prop: 'replacementCost', prop: 'replacementCost',
type: 'number', type: 'number',
precision: 2, precision: 2,
append: '元',
minWidth: 120, minWidth: 120,
rules: [ rules: [
{ required: true, message: '请输入换胎费用', trigger: 'blur' }, { required: true, message: '请输入换胎费用', trigger: 'blur' },

View File

@@ -44,6 +44,10 @@ export const option = {
dialogWidth: 1100, dialogWidth: 1100,
labelPosition: 'top', labelPosition: 'top',
tip: false, tip: false,
searchBtnText: '查询',
emptyBtnText: '重置',
saveBtnText: '提交',
updateBtnText: '提交',
searchShow: true, searchShow: true,
searchMenuSpan: 6, searchMenuSpan: 6,
border: true, border: true,
@@ -129,6 +133,7 @@ export const option = {
prop: 'fineAmount', prop: 'fineAmount',
type: 'number', type: 'number',
precision: 2, precision: 2,
append: '元',
minWidth: 100, minWidth: 100,
rules: [{ validator: validateNonNegative, trigger: 'blur' }], rules: [{ validator: validateNonNegative, trigger: 'blur' }],
}, },
@@ -137,14 +142,13 @@ export const option = {
prop: 'deductPoints', prop: 'deductPoints',
type: 'number', type: 'number',
precision: 0, precision: 0,
hide: true, minWidth: 110,
rules: [{ validator: validateDeductPoints, trigger: 'blur' }], rules: [{ validator: validateDeductPoints, trigger: 'blur' }],
}, },
{ {
label: '被罚单位', label: '被罚单位',
prop: 'penaltyUnit', prop: 'penaltyUnit',
minWidth: 150, minWidth: 150,
hide: true,
rules: [{ max: 50, message: '最多 50 个字符', trigger: 'blur' }], rules: [{ max: 50, message: '最多 50 个字符', trigger: 'blur' }],
}, },
{ {
@@ -152,8 +156,9 @@ export const option = {
prop: 'processStatus', prop: 'processStatus',
type: 'radio', type: 'radio',
dicData: processStatusDic, dicData: processStatusDic,
value: '处理', value: '处理',
search: true, search: true,
clearable: true,
minWidth: 120, minWidth: 120,
rules: [{ required: true, message: '请选择状态', trigger: 'change' }], rules: [{ required: true, message: '请选择状态', trigger: 'change' }],
}, },
@@ -163,7 +168,8 @@ export const option = {
type: 'textarea', type: 'textarea',
minRows: 3, minRows: 3,
span: 24, span: 24,
hide: true, minWidth: 220,
overHidden: true,
rules: [ rules: [
{ required: true, message: '请输入过程描述', trigger: 'blur' }, { required: true, message: '请输入过程描述', trigger: 'blur' },
{ max: 500, message: '最多 500 个字符', trigger: 'blur' }, { max: 500, message: '最多 500 个字符', trigger: 'blur' },
@@ -175,7 +181,8 @@ export const option = {
type: 'textarea', type: 'textarea',
minRows: 3, minRows: 3,
span: 24, span: 24,
hide: true, minWidth: 220,
overHidden: true,
rules: [{ max: 500, message: '最多 500 个字符', trigger: 'blur' }], rules: [{ max: 500, message: '最多 500 个字符', trigger: 'blur' }],
}, },
{ {

View File

@@ -109,6 +109,8 @@ import { getToken } from '@/utils/auth';
import NProgress from 'nprogress'; import NProgress from 'nprogress';
import 'nprogress/nprogress.css'; import 'nprogress/nprogress.css';
const DEFAULT_COUNTRY_CODE = '+86';
export default { export default {
data() { data() {
const validateIataCode = (rule, value, callback) => { const validateIataCode = (rule, value, callback) => {
@@ -165,6 +167,8 @@ export default {
dialogWidth: 980, dialogWidth: 980,
tip: false, tip: false,
searchShow: true, searchShow: true,
labelWidth: 120,
searchLabelWidth: 120,
searchMenuSpan: 6, searchMenuSpan: 6,
border: true, border: true,
index: true, index: true,
@@ -266,11 +270,35 @@ export default {
addDisplay: false, addDisplay: false,
editDisplay: 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: '经度', label: '经度',
prop: 'longitude', prop: 'longitude',
type: 'number', type: 'number',
precision: 6, precision: 6,
minWidth: 130,
overHidden: false,
rules: [{ validator: validateLongitude, trigger: 'blur' }], rules: [{ validator: validateLongitude, trigger: 'blur' }],
}, },
{ {
@@ -278,6 +306,8 @@ export default {
prop: 'latitude', prop: 'latitude',
type: 'number', type: 'number',
precision: 6, precision: 6,
minWidth: 130,
overHidden: false,
rules: [{ validator: validateLatitude, trigger: 'blur' }], rules: [{ validator: validateLatitude, trigger: 'blur' }],
}, },
{ {
@@ -285,6 +315,8 @@ export default {
prop: 'dataSource', prop: 'dataSource',
type: 'select', type: 'select',
search: true, search: true,
minWidth: 120,
overHidden: false,
dicData: [ dicData: [
{ label: '全部', value: '' }, { label: '全部', value: '' },
{ label: '初始导入', value: '初始导入' }, { label: '初始导入', value: '初始导入' },
@@ -299,6 +331,8 @@ export default {
search: true, search: true,
slot: true, slot: true,
dataType: 'number', dataType: 'number',
minWidth: 110,
overHidden: false,
dicData: [ dicData: [
{ label: '全部', value: '' }, { label: '全部', value: '' },
{ label: '启用', value: 1 }, { label: '启用', value: 1 },
@@ -406,7 +440,7 @@ export default {
return this.option.column.find(item => item.prop === prop); return this.option.column.find(item => item.prop === prop);
}, },
loadProvinceOptions() { loadProvinceOptions() {
getLazyTree('00').then(res => { getLazyTree(DEFAULT_COUNTRY_CODE).then(res => {
this.provinceOptions = res.data.data; this.provinceOptions = res.data.data;
this.findColumn('provinceCode').dicData = this.provinceOptions; this.findColumn('provinceCode').dicData = this.provinceOptions;
}); });
@@ -448,6 +482,8 @@ export default {
}, },
normalizeRow(row) { normalizeRow(row) {
row.code = row.iataCode ? `JC-${row.iataCode}` : row.code; 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.dataSource) row.dataSource = '手动录入';
if (!row.status) row.status = 1; if (!row.status) row.status = 1;
return row; return row;

View File

@@ -189,8 +189,7 @@ export default {
prop: 'name', prop: 'name',
minWidth: 150, minWidth: 150,
search: true, search: true,
disabled: true, rules: [{ required: true, message: '请输入币种名称', trigger: 'blur' }],
rules: [{ required: true, message: '请选择币种编码带出币种名称', trigger: 'blur' }],
}, },
{ {
label: '汇率', label: '汇率',

View File

@@ -56,6 +56,12 @@
</el-button> </el-button>
</template> </template>
</avue-crud> </avue-crud>
<empty-pagination
:page="page"
@size-change="sizeChange"
@current-change="currentChange"
@load="onLoad(page, query)"
/>
</basic-container> </basic-container>
</template> </template>
@@ -72,6 +78,7 @@ export default {
data: [], data: [],
page: { page: {
pageSize: 10, pageSize: 10,
pageSizes: [10, 20, 50, 100],
currentPage: 1, currentPage: 1,
total: 0, total: 0,
}, },
@@ -81,6 +88,10 @@ export default {
calcHeight: 32, calcHeight: 32,
dialogWidth: 680, dialogWidth: 680,
tip: false, tip: false,
searchBtnText: '查询',
emptyBtnText: '重置',
saveBtnText: '提交',
updateBtnText: '提交',
searchShow: true, searchShow: true,
searchMenuSpan: 6, searchMenuSpan: 6,
border: true, border: true,
@@ -119,6 +130,7 @@ export default {
{ label: '启用', value: 1 }, { label: '启用', value: 1 },
{ label: '停用', value: 2 }, { label: '停用', value: 2 },
], ],
clearable: true,
value: 1, value: 1,
}, },
{ {
@@ -196,7 +208,7 @@ export default {
); );
}, },
rowDel(row) { rowDel(row) {
this.$confirm('确定将选择数据删除?', { this.$confirm('确定删除该条数据删除后不可恢复?', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
@@ -212,7 +224,7 @@ export default {
this.$message.warning('请选择至少一条数据'); this.$message.warning('请选择至少一条数据');
return; return;
} }
this.$confirm('确定将选择数据删除?', { this.$confirm('确定删除所选数据删除后不可恢复?', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',

View File

@@ -65,6 +65,24 @@
{{ row.status === 1 ? '启用' : '停用' }} {{ row.status === 1 ? '启用' : '停用' }}
</el-tag> </el-tag>
</template> </template>
<template #country-form>
<el-select
v-model="form.countryCode"
clearable
filterable
:disabled="isParentRegionLocked"
placeholder="请选择国家"
style="width: 100%"
@change="handleCountryChange"
>
<el-option
v-for="item in countryOptions"
:key="item.id"
:label="item.title"
:value="item.id"
/>
</el-select>
</template>
<template #menu="{ row, index }"> <template #menu="{ row, index }">
<el-button <el-button
type="primary" type="primary"
@@ -87,11 +105,12 @@
</template> </template>
<template #regionCode-form> <template #regionCode-form>
<el-cascader <el-cascader
:key="regionCascaderKey"
v-model="form.regionCode" v-model="form.regionCode"
:props="regionProps" :props="regionProps"
clearable clearable
filterable filterable
:disabled="isParentRegionLocked" :disabled="isRegionDisabled"
style="width: 100%" style="width: 100%"
@change="handleRegionChange" @change="handleRegionChange"
/> />
@@ -133,6 +152,8 @@ import { getToken } from '@/utils/auth';
import NProgress from 'nprogress'; import NProgress from 'nprogress';
import 'nprogress/nprogress.css'; import 'nprogress/nprogress.css';
const DEFAULT_COUNTRY_CODE = '+86';
export default { export default {
data() { data() {
const validateCode = (rule, value, callback) => { const validateCode = (rule, value, callback) => {
@@ -183,6 +204,8 @@ export default {
excelBox: false, excelBox: false,
excelForm: {}, excelForm: {},
portOptions: [], portOptions: [],
countryOptions: [],
regionCascaderKey: 0,
regionNodeMap: {}, regionNodeMap: {},
regionNameMap: {}, regionNameMap: {},
regionProps: { regionProps: {
@@ -206,6 +229,7 @@ export default {
dialogWidth: 980, dialogWidth: 980,
tip: false, tip: false,
searchShow: true, searchShow: true,
searchLabelWidth: 120,
searchMenuSpan: 6, searchMenuSpan: 6,
border: true, border: true,
index: true, index: true,
@@ -279,6 +303,15 @@ export default {
slot: true, slot: true,
disabled: true, disabled: true,
}, },
{
label: '国家',
prop: 'country',
search: true,
formslot: true,
span: 12,
minWidth: 100,
rules: [{ required: true, message: '请选择国家', trigger: 'change' }],
},
{ {
label: '城市', label: '城市',
prop: 'regionCode', prop: 'regionCode',
@@ -287,14 +320,6 @@ export default {
span: 12, span: 12,
rules: [{ required: true, message: '请选择所属城市', trigger: 'change' }], rules: [{ required: true, message: '请选择所属城市', trigger: 'change' }],
}, },
{
label: '国家',
prop: 'country',
search: true,
addDisplay: false,
editDisplay: false,
minWidth: 100,
},
{ {
label: '城市', label: '城市',
prop: 'city', prop: 'city',
@@ -309,6 +334,7 @@ export default {
type: 'number', type: 'number',
precision: 6, precision: 6,
minWidth: 130, minWidth: 130,
overHidden: false,
rules: [{ validator: validateLongitude, trigger: 'blur' }], rules: [{ validator: validateLongitude, trigger: 'blur' }],
}, },
{ {
@@ -317,6 +343,7 @@ export default {
type: 'number', type: 'number',
precision: 6, precision: 6,
minWidth: 130, minWidth: 130,
overHidden: false,
rules: [{ validator: validateLatitude, trigger: 'blur' }], rules: [{ validator: validateLatitude, trigger: 'blur' }],
}, },
{ {
@@ -324,6 +351,8 @@ export default {
prop: 'dataSource', prop: 'dataSource',
type: 'select', type: 'select',
search: true, search: true,
minWidth: 120,
overHidden: false,
dicData: [ dicData: [
{ label: '全部', value: '' }, { label: '全部', value: '' },
{ label: '初始化导入', value: '初始化导入' }, { label: '初始化导入', value: '初始化导入' },
@@ -338,6 +367,8 @@ export default {
search: true, search: true,
slot: true, slot: true,
dataType: 'number', dataType: 'number',
minWidth: 110,
overHidden: false,
dicData: [ dicData: [
{ label: '全部', value: '' }, { label: '全部', value: '' },
{ label: '启用', value: 1 }, { label: '启用', value: 1 },
@@ -423,11 +454,16 @@ export default {
}, },
isAdmin() { isAdmin() {
const authority = this.userInfo && this.userInfo.authority; const authority = this.userInfo && this.userInfo.authority;
return Array.isArray(authority) ? authority.includes('admin') : String(authority || '').includes('admin'); return Array.isArray(authority)
? authority.includes('admin')
: String(authority || '').includes('admin');
}, },
isParentRegionLocked() { isParentRegionLocked() {
return this.form.category === '码头' && !!this.form.parentId; return this.form.category === '码头' && !!this.form.parentId;
}, },
isRegionDisabled() {
return this.isParentRegionLocked || !this.form.countryCode;
},
ids() { ids() {
let ids = []; let ids = [];
this.selectionList.forEach(ele => { this.selectionList.forEach(ele => {
@@ -437,6 +473,7 @@ export default {
}, },
}, },
created() { created() {
this.loadCountryOptions();
this.loadPortOptions(); this.loadPortOptions();
}, },
methods: { methods: {
@@ -454,7 +491,11 @@ export default {
} }
}, },
loadRegionNode(node, resolve) { loadRegionNode(node, resolve) {
const parentCode = node.level === 0 ? '00' : node.value; const parentCode = node.level === 0 ? this.form.countryCode : node.value;
if (!parentCode) {
resolve([]);
return;
}
getLazyTree(parentCode).then(res => { getLazyTree(parentCode).then(res => {
const regionList = res.data.data || []; const regionList = res.data.data || [];
const nodes = regionList.map(region => { const nodes = regionList.map(region => {
@@ -469,6 +510,15 @@ export default {
resolve(nodes); resolve(nodes);
}); });
}, },
loadCountryOptions() {
return getLazyTree('0').then(res => {
this.countryOptions = res.data.data || [];
this.countryOptions.forEach(country => {
this.regionNodeMap[country.id] = country;
this.regionNameMap[country.title] = country.id;
});
});
},
loadPortOptions() { loadPortOptions() {
getPortSelect().then(res => { getPortSelect().then(res => {
this.portOptions = res.data.data; this.portOptions = res.data.data;
@@ -485,6 +535,19 @@ export default {
} }
this.handleCodeChange(this.form.code); this.handleCodeChange(this.form.code);
}, },
handleCountryChange(value) {
const country = this.countryOptions.find(item => item.id === value);
this.form.country = country ? country.title : '';
this.form.regionCode = [];
this.form.city = '';
this.regionCascaderKey += 1;
},
syncCountryName(countryCode) {
const country = this.countryOptions.find(item => item.id === countryCode);
if (country) {
this.form.country = country.title;
}
},
handleParentChange(value) { handleParentChange(value) {
const parent = this.portOptions.find(item => item.id === value); const parent = this.portOptions.find(item => item.id === value);
if (!parent) return; if (!parent) return;
@@ -499,43 +562,68 @@ export default {
} }
this.form.country = parent.country; this.form.country = parent.country;
this.form.city = parent.city; this.form.city = parent.city;
this.resolveRegionCode(parent.country, parent.city).then(regionCode => { this.resolveCountryCode(parent.country)
this.form.regionCode = regionCode; .then(countryCode => {
}); this.form.countryCode = countryCode;
this.syncCountryName(countryCode);
this.regionCascaderKey += 1;
return this.resolveRegionCode(parent.country, parent.city);
})
.then(regionCode => {
this.form.regionCode = regionCode;
});
}, },
handleRegionChange(value) { handleRegionChange(value) {
const regionCode = Array.isArray(value) ? value : []; const regionCode = Array.isArray(value) ? value : [];
const provinceCode = regionCode[0]; const provinceCode = regionCode[0];
const cityCode = regionCode[1]; const cityCode = regionCode[1];
const province = this.regionNodeMap[provinceCode];
const city = this.regionNodeMap[cityCode]; const city = this.regionNodeMap[cityCode];
this.form.country = province ? province.title : '';
this.form.city = city ? city.title : ''; this.form.city = city ? city.title : '';
}, },
resolveCountryCode(country) {
if (!country) {
return Promise.resolve('');
}
const countryOption = this.countryOptions.find(
item => item.title === country || item.id === country
);
if (countryOption) {
return Promise.resolve(countryOption.id);
}
return this.loadCountryOptions().then(() => {
const option = this.countryOptions.find(
item => item.title === country || item.id === country
);
return option ? option.id : DEFAULT_COUNTRY_CODE;
});
},
resolveRegionCode(country, city) { resolveRegionCode(country, city) {
if (!country || !city) { if (!country || !city) {
return Promise.resolve([]); return Promise.resolve([]);
} }
const provinceCode = this.regionNameMap[country]; const countryCode = this.form.countryCode || this.regionNameMap[country];
if (provinceCode) { if (!countryCode) {
const cityCode = this.regionNameMap[city]; return Promise.resolve([]);
if (cityCode) {
return Promise.resolve([provinceCode, cityCode]);
}
return this.loadRegionList(provinceCode).then(cityList => {
const cityNode = cityList.find(item => item.title === city);
return cityNode ? [provinceCode, cityNode.id] : [provinceCode];
});
} }
return this.loadRegionList('00').then(provinceList => { return this.loadRegionList(countryCode).then(provinceList => {
const province = provinceList.find(item => item.title === country); const province = provinceList.find(item => item.title === country || item.title === city);
if (!province) { if (province) {
return []; return this.loadRegionList(province.id).then(cityList => {
const cityNode = cityList.find(item => item.title === city);
return cityNode ? [province.id, cityNode.id] : [province.id];
});
} }
return this.loadRegionList(province.id).then(cityList => { return provinceList.reduce((promise, item) => {
const cityNode = cityList.find(item => item.title === city); return promise.then(result => {
return cityNode ? [province.id, cityNode.id] : [province.id]; if (result.length > 0) {
}); return result;
}
return this.loadRegionList(item.id).then(cityList => {
const cityNode = cityList.find(child => child.title === city);
return cityNode ? [item.id, cityNode.id] : [];
});
});
}, Promise.resolve([]));
}); });
}, },
loadRegionList(parentCode) { loadRegionList(parentCode) {
@@ -682,18 +770,32 @@ export default {
if (['edit', 'view'].includes(type)) { if (['edit', 'view'].includes(type)) {
getDetail(this.form.id).then(res => { getDetail(this.form.id).then(res => {
this.form = res.data.data; this.form = res.data.data;
this.resolveRegionCode(this.form.country, this.form.city).then(regionCode => { this.resolveCountryCode(this.form.country)
this.form.regionCode = regionCode; .then(countryCode => {
this.handleCategoryChange(this.form.category); this.form.countryCode = countryCode;
done(); this.syncCountryName(countryCode);
}); this.regionCascaderKey += 1;
return this.resolveRegionCode(this.form.country, this.form.city);
})
.then(regionCode => {
this.form.regionCode = regionCode;
this.handleCategoryChange(this.form.category);
done();
});
}); });
return; return;
} else { } else {
this.resolveRegionCode(this.form.country, this.form.city).then(regionCode => { this.resolveCountryCode(this.form.country)
this.form.regionCode = regionCode; .then(countryCode => {
done(); this.form.countryCode = countryCode;
}); this.syncCountryName(countryCode);
this.regionCascaderKey += 1;
return this.resolveRegionCode(this.form.country, this.form.city);
})
.then(regionCode => {
this.form.regionCode = regionCode;
done();
});
return; return;
} }
}, },

View File

@@ -109,6 +109,8 @@ import { getToken } from '@/utils/auth';
import NProgress from 'nprogress'; import NProgress from 'nprogress';
import 'nprogress/nprogress.css'; import 'nprogress/nprogress.css';
const DEFAULT_COUNTRY_CODE = '+86';
export default { export default {
data() { data() {
const validateTmisCode = (rule, value, callback) => { const validateTmisCode = (rule, value, callback) => {
@@ -152,6 +154,7 @@ export default {
excelForm: {}, excelForm: {},
provinceOptions: [], provinceOptions: [],
cityOptions: [], cityOptions: [],
regionInitializing: false,
page: { page: {
pageSize: 10, pageSize: 10,
pageSizes: [10, 20, 50, 100], pageSizes: [10, 20, 50, 100],
@@ -180,6 +183,8 @@ export default {
{ {
label: '编码', label: '编码',
prop: 'code', prop: 'code',
minWidth: 120,
overHidden: false,
search: true, search: true,
addDisabled: true, addDisabled: true,
editDisabled: true, editDisabled: true,
@@ -216,11 +221,11 @@ export default {
search: true, search: true,
rules: [{ required: true, message: '请输入车站名称', trigger: 'blur' }], rules: [{ required: true, message: '请输入车站名称', trigger: 'blur' }],
}, },
{ // {
label: '所属铁路线路', // label: '所属铁路线路',
prop: 'railwayLine', // prop: 'railwayLine',
minWidth: 130, // minWidth: 130,
}, // },
{ {
label: '所属省份', label: '所属省份',
prop: 'provinceCode', prop: 'provinceCode',
@@ -265,11 +270,35 @@ export default {
addDisplay: false, addDisplay: false,
editDisplay: 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: '经度', label: '经度',
prop: 'longitude', prop: 'longitude',
type: 'number', type: 'number',
precision: 6, precision: 6,
minWidth: 130,
overHidden: false,
rules: [{ validator: validateLongitude, trigger: 'blur' }], rules: [{ validator: validateLongitude, trigger: 'blur' }],
}, },
{ {
@@ -277,6 +306,8 @@ export default {
prop: 'latitude', prop: 'latitude',
type: 'number', type: 'number',
precision: 6, precision: 6,
minWidth: 130,
overHidden: false,
rules: [{ validator: validateLatitude, trigger: 'blur' }], rules: [{ validator: validateLatitude, trigger: 'blur' }],
}, },
{ {
@@ -284,6 +315,8 @@ export default {
prop: 'dataSource', prop: 'dataSource',
type: 'select', type: 'select',
search: true, search: true,
minWidth: 120,
overHidden: false,
dicData: [ dicData: [
{ label: '全部', value: '' }, { label: '全部', value: '' },
{ label: '初始化导入', value: '初始化导入' }, { label: '初始化导入', value: '初始化导入' },
@@ -298,6 +331,8 @@ export default {
search: true, search: true,
slot: true, slot: true,
dataType: 'number', dataType: 'number',
minWidth: 110,
overHidden: false,
dicData: [ dicData: [
{ label: '全部', value: '' }, { label: '全部', value: '' },
{ label: '启用', value: 1 }, { label: '启用', value: 1 },
@@ -405,8 +440,8 @@ export default {
return this.option.column.find(item => item.prop === prop); return this.option.column.find(item => item.prop === prop);
}, },
loadProvinceOptions() { loadProvinceOptions() {
getLazyTree('00').then(res => { getLazyTree(DEFAULT_COUNTRY_CODE).then(res => {
this.provinceOptions = res.data.data; this.provinceOptions = (res.data.data || []).map(this.normalizeRegionOption);
this.findColumn('provinceCode').dicData = this.provinceOptions; this.findColumn('provinceCode').dicData = this.provinceOptions;
}); });
}, },
@@ -417,10 +452,40 @@ export default {
return Promise.resolve(); return Promise.resolve();
} }
return getLazyTree(provinceCode).then(res => { return getLazyTree(provinceCode).then(res => {
this.cityOptions = res.data.data; this.cityOptions = (res.data.data || []).map(this.normalizeRegionOption);
this.findColumn('cityCode').dicData = this.cityOptions; this.findColumn('cityCode').dicData = this.cityOptions;
}); });
}, },
normalizeRegionOption(region) {
return {
...region,
id: region.id === undefined || region.id === null ? region.id : String(region.id),
};
},
normalizeRegionForm(row) {
return {
...row,
provinceCode:
row.provinceCode === undefined || row.provinceCode === null
? row.provinceCode
: String(row.provinceCode),
cityCode:
row.cityCode === undefined || row.cityCode === null ? row.cityCode : String(row.cityCode),
};
},
ensureCityOption(row) {
if (!row.cityCode || !row.cityName) return;
const exists = this.cityOptions.some(item => item.id === row.cityCode);
if (exists) return;
this.cityOptions = [
...this.cityOptions,
{
id: row.cityCode,
title: row.cityName,
},
];
this.findColumn('cityCode').dicData = this.cityOptions;
},
handleTmisChange(value) { handleTmisChange(value) {
this.form.tmisCode = String(value || '') this.form.tmisCode = String(value || '')
.replace(/\D/g, '') .replace(/\D/g, '')
@@ -436,6 +501,10 @@ export default {
handleProvinceChange(value) { handleProvinceChange(value) {
const province = this.provinceOptions.find(item => item.id === value); const province = this.provinceOptions.find(item => item.id === value);
this.form.provinceName = province ? province.title : ''; this.form.provinceName = province ? province.title : '';
if (this.regionInitializing) {
this.loadCityOptions(value).then(() => this.ensureCityOption(this.form));
return;
}
this.form.cityCode = undefined; this.form.cityCode = undefined;
this.form.cityName = ''; this.form.cityName = '';
this.loadCityOptions(value); this.loadCityOptions(value);
@@ -446,6 +515,8 @@ export default {
}, },
normalizeRow(row) { normalizeRow(row) {
row.code = row.tmisCode ? `TL${row.tmisCode}` : row.code; row.code = row.tmisCode ? `TL${row.tmisCode}` : row.code;
row.regionName = String(row.regionName || '').trim();
row.detailAddress = String(row.detailAddress || '').trim();
if (!row.dataSource) row.dataSource = '手动'; if (!row.dataSource) row.dataSource = '手动';
if (!row.status) row.status = 1; if (!row.status) row.status = 1;
return row; return row;
@@ -546,9 +617,19 @@ export default {
}, },
beforeOpen(done, type) { beforeOpen(done, type) {
if (['edit', 'view'].includes(type)) { if (['edit', 'view'].includes(type)) {
this.regionInitializing = true;
getDetail(this.form.id).then(res => { getDetail(this.form.id).then(res => {
this.form = res.data.data; const detail = this.normalizeRegionForm(res.data.data || {});
this.loadCityOptions(this.form.provinceCode).then(() => done()); this.loadCityOptions(detail.provinceCode).then(() => {
this.ensureCityOption(detail);
this.form = detail;
done();
this.$nextTick(() => {
window.setTimeout(() => {
this.regionInitializing = false;
}, 0);
});
});
}); });
return; return;
} }

View File

@@ -12,6 +12,13 @@
<el-col :span="15"> <el-col :span="15">
<basic-container> <basic-container>
<el-button-group> <el-button-group>
<el-button
v-if="permission.region_add"
type="primary"
icon="el-icon-plus"
@click="addCountry"
>新增国家
</el-button>
<el-button <el-button
v-if="permission.region_add" v-if="permission.region_add"
type="primary" type="primary"
@@ -48,19 +55,29 @@
@click="handleSync" @click="handleSync"
>同步 >同步
</el-button> </el-button>
<el-button <!-- <el-button-->
v-if="permission.region_debug" <!-- v-if="permission.region_debug"-->
type="primary" <!-- type="primary"-->
icon="el-icon-video-play" <!-- icon="el-icon-video-play"-->
@click="handleDebug" <!-- @click="handleDebug"-->
>调试 <!-- >调试-->
</el-button> <!-- </el-button>-->
</el-button-group> </el-button-group>
</basic-container> </basic-container>
<basic-container> <basic-container>
<avue-form ref="form" :option="regionOption" v-model="regionForm" @submit="handleSubmit"> <avue-form ref="form" :option="regionOption" v-model="regionForm" @submit="handleSubmit">
<template #code="{}"> <template #code="{}">
<el-input placeholder="请输入 区划子编号" v-model="regionForm.subCode"> <el-input
v-if="isCountryRegion"
placeholder="请输入国家编码,如 +86"
v-model="regionForm.code"
/>
<el-input
v-else-if="isProvinceRegion"
placeholder="请输入省级区划编号"
v-model="regionForm.subCode"
/>
<el-input v-else placeholder="请输入 区划子编号" v-model="regionForm.subCode">
<template #prepend>{{ regionForm.parentCode }}</template> <template #prepend>{{ regionForm.parentCode }}</template>
</el-input> </el-input>
</template> </template>
@@ -92,10 +109,12 @@ import { getToken } from '@/utils/auth';
import NProgress from 'nprogress'; import NProgress from 'nprogress';
import 'nprogress/nprogress.css'; import 'nprogress/nprogress.css';
const ROOT_PARENT_CODE = '0';
export default { export default {
data() { data() {
return { return {
topCode: '00', topCode: ROOT_PARENT_CODE,
treeCode: '', treeCode: '',
treeParentCode: '', treeParentCode: '',
treeData: [], treeData: [],
@@ -104,7 +123,7 @@ export default {
nodeKey: 'id', nodeKey: 'id',
lazy: true, lazy: true,
treeLoad: function (node, resolve) { treeLoad: function (node, resolve) {
const parentCode = node.level === 0 ? '00' : node.data.id; const parentCode = node.level === 0 ? ROOT_PARENT_CODE : node.data.id;
getLazyTree(parentCode).then(res => { getLazyTree(parentCode).then(res => {
resolve( resolve(
res.data.data.map(item => { res.data.data.map(item => {
@@ -323,7 +342,11 @@ export default {
}, },
watch: { watch: {
'regionForm.subCode'() { 'regionForm.subCode'() {
this.regionForm.code = this.regionForm.parentCode + this.regionForm.subCode; if (this.isCountryRegion) {
return;
}
const parentCode = this.isProvinceRegion ? '' : this.regionForm.parentCode;
this.regionForm.code = parentCode + this.regionForm.subCode;
}, },
'excelForm.isCovered'() { 'excelForm.isCovered'() {
if (this.excelForm.isCovered !== '') { if (this.excelForm.isCovered !== '') {
@@ -334,6 +357,12 @@ export default {
}, },
computed: { computed: {
...mapGetters(['permission']), ...mapGetters(['permission']),
isCountryRegion() {
return Number(this.regionForm.regionLevel) === 0 || this.regionForm.parentCode === this.topCode;
},
isProvinceRegion() {
return Number(this.regionForm.regionLevel) === 1;
},
permissionList() { permissionList() {
return { return {
addBtn: this.validData(this.permission.region_add, false), addBtn: this.validData(this.permission.region_add, false),
@@ -369,9 +398,27 @@ export default {
this.treeParentCode = data.parentId; this.treeParentCode = data.parentId;
getDetail(this.treeCode).then(res => { getDetail(this.treeCode).then(res => {
this.regionForm = res.data.data; this.regionForm = res.data.data;
this.regionForm.subCode = this.regionForm.code.replace(this.regionForm.parentCode, ''); this.regionForm.subCode =
this.regionForm.parentCode === this.topCode
? this.regionForm.code
: this.regionForm.code.replace(this.regionForm.parentCode, '');
}); });
}, },
addCountry() {
const column = this.findColumn(this.regionOption.column, 'parentCode');
column.disabled = true;
this.treeCode = '';
this.treeParentCode = this.topCode;
this.regionForm = {
parentCode: this.topCode,
parentName: '根节点',
code: '',
subCode: '',
name: '',
regionLevel: 0,
sort: 1,
};
},
addChildren() { addChildren() {
if (validatenull(this.regionForm.code) || validatenull(this.regionForm.name)) { if (validatenull(this.regionForm.code) || validatenull(this.regionForm.name)) {
this.$message.warning('请先选择一项区划'); this.$message.warning('请先选择一项区划');
@@ -386,8 +433,14 @@ export default {
this.regionForm.regionLevel === 5 ? 5 : this.regionForm.regionLevel + 1; this.regionForm.regionLevel === 5 ? 5 : this.regionForm.regionLevel + 1;
}, },
handleSubmit(form, done) { handleSubmit(form, done) {
const parentCode = form.parentCode === this.topCode ? '' : form.parentCode; if (Number(form.regionLevel) === 0) {
form.code = parentCode + form.subCode; form.parentCode = this.topCode;
form.ancestors = this.topCode;
form.subCode = form.code;
} else {
const parentCode = Number(form.regionLevel) === 1 ? '' : form.parentCode;
form.code = parentCode + form.subCode;
}
submit(form).then( submit(form).then(
() => { () => {
this.$message({ this.$message({

View File

@@ -73,6 +73,12 @@
<span>{{ formatAttachments(row.attachments) }}</span> <span>{{ formatAttachments(row.attachments) }}</span>
</template> </template>
</avue-crud> </avue-crud>
<empty-pagination
:page="page"
@size-change="sizeChange"
@current-change="currentChange"
@load="onLoad(page, query)"
/>
<el-dialog title="事故记录数据导入" append-to-body v-model="excelBox" width="555px"> <el-dialog title="事故记录数据导入" append-to-body v-model="excelBox" width="555px">
<avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter"> <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
<template #excelTemplate> <template #excelTemplate>
@@ -235,6 +241,14 @@ export default {
this.$message.warning('保险理赔金额不能小于 0'); this.$message.warning('保险理赔金额不能小于 0');
return false; return false;
} }
if (!row.accidentNature) {
this.$message.warning('请选择事故性质');
return false;
}
if (!row.accidentResponsibility) {
this.$message.warning('请选择事故责任');
return false;
}
if ( if (
row.directEconomicLoss !== undefined && row.directEconomicLoss !== undefined &&
row.directEconomicLoss !== null && row.directEconomicLoss !== null &&
@@ -286,7 +300,7 @@ export default {
); );
}, },
rowDel(row) { rowDel(row) {
this.$confirm('确定将选择数据删除?', { this.$confirm('确定删除该条数据删除后不可恢复?', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
@@ -302,7 +316,7 @@ export default {
this.$message.warning('请选择至少一条数据'); this.$message.warning('请选择至少一条数据');
return; return;
} }
this.$confirm('确定将选择数据删除?', { this.$confirm('确定删除所选数据删除后不可恢复?', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',

View File

@@ -73,6 +73,12 @@
<span>{{ formatAttachments(row.attachments) }}</span> <span>{{ formatAttachments(row.attachments) }}</span>
</template> </template>
</avue-crud> </avue-crud>
<empty-pagination
:page="page"
@size-change="sizeChange"
@current-change="currentChange"
@load="onLoad(page, query)"
/>
<el-dialog title="年检记录数据导入" append-to-body v-model="excelBox" width="555px"> <el-dialog title="年检记录数据导入" append-to-body v-model="excelBox" width="555px">
<avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter"> <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
<template #excelTemplate> <template #excelTemplate>
@@ -297,7 +303,7 @@ export default {
); );
}, },
rowDel(row) { rowDel(row) {
this.$confirm('确定将选择数据删除?', { this.$confirm('确定删除该条数据删除后不可恢复?', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
@@ -313,7 +319,7 @@ export default {
this.$message.warning('请选择至少一条数据'); this.$message.warning('请选择至少一条数据');
return; return;
} }
this.$confirm('确定将选择数据删除?', { this.$confirm('确定删除所选数据删除后不可恢复?', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',

View File

@@ -131,6 +131,12 @@
</el-button> </el-button>
</template> </template>
</avue-crud> </avue-crud>
<empty-pagination
:page="page"
@size-change="sizeChange"
@current-change="currentChange"
@load="onLoad(page, query)"
/>
<el-dialog <el-dialog
:title="dialogTitle" :title="dialogTitle"
@@ -150,6 +156,13 @@
class="archive-form" class="archive-form"
> >
<div class="section-title">基本信息</div> <div class="section-title">基本信息</div>
<el-alert
type="warning"
:closable="false"
show-icon
title="临时客商可暂存基础信息,但不能参与结算;正式客商需资质完整、评分完成并审批通过后生效。"
class="archive-rule-alert"
/>
<el-row :gutter="18"> <el-row :gutter="18">
<el-col :span="6"> <el-col :span="6">
<el-form-item label="客商编号" prop="customerCode"> <el-form-item label="客商编号" prop="customerCode">
@@ -196,10 +209,9 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="客商性质" prop="customerNature"> <el-form-item label="客商性质" prop="customerNature">
<el-select v-model="archiveForm.customerNature" filterable allow-create default-first-option> <el-select v-model="archiveForm.customerNature" filterable>
<el-option label="企业" value="企业" /> <el-option label="有限公司" value="有限公司" />
<el-option label="个" value="个" /> <el-option label="个体工商户" value="个体工商户" />
<el-option label="事业单位" value="事业单位" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -215,7 +227,7 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="客商类型" prop="customerType"> <el-form-item label="客商类型" prop="customerType">
<el-select v-model="archiveForm.customerType" filterable allow-create default-first-option> <el-select v-model="archiveForm.customerType" multiple filterable>
<el-option <el-option
v-for="item in customerTypeOptions" v-for="item in customerTypeOptions"
:key="item.value" :key="item.value"
@@ -242,14 +254,15 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="所属组织" prop="deptName"> <el-form-item label="所属组织" prop="deptName">
<el-select v-model="archiveForm.deptId" filterable clearable @change="onDeptChange"> <el-tree-select
<el-option v-model="archiveForm.deptId"
v-for="item in deptOptions" :data="deptTree"
:key="item.value" :props="{ label: 'title', value: 'id', children: 'children' }"
:label="item.label" check-strictly
:value="item.value" filterable
/> clearable
</el-select> @change="onDeptChange"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@@ -330,20 +343,66 @@
<div class="section-head"> <div class="section-head">
<div class="section-title">资质附件</div> <div class="section-title">资质附件</div>
<el-button type="primary" icon="el-icon-plus" v-if="!readonly" @click="addAttachment"> <div v-if="!readonly" class="section-actions">
添加附件 <el-button type="primary" icon="el-icon-upload" @click="addAttachment">OCR上传识别</el-button>
</el-button> <el-button type="primary" icon="el-icon-plus" @click="addAttachment">添加附件</el-button>
<el-button icon="el-icon-download" @click="downloadAttachments">批量下载</el-button>
</div>
</div> </div>
<el-alert
type="info"
:closable="false"
title="支持 JPG、PNG、PDF单文件大小不超过 10MB正式客商需上传公司营业执照、道路运输证等核心材料。"
class="archive-rule-alert"
/>
<el-alert
v-if="missingQualificationText"
type="error"
:closable="false"
:title="missingQualificationText"
class="archive-rule-alert"
/>
<el-table :data="qualificationFiles" border> <el-table :data="qualificationFiles" border>
<el-table-column label="序号" type="index" width="70" align="center" /> <el-table-column label="序号" type="index" width="70" align="center" />
<el-table-column label="附件名称" min-width="180"> <el-table-column label="附件类型" min-width="160">
<template #default="{ row }">
<el-select v-model="row.type" :disabled="readonly" filterable>
<el-option label="法人身份证" value="法人身份证" />
<el-option label="公司营业执照" value="公司营业执照" />
<el-option label="道路运输证" value="道路运输证" />
<el-option label="开户许可证" value="开户许可证" />
<el-option label="其他" value="其他" />
</el-select>
</template>
</el-table-column>
<el-table-column label="文件名称" min-width="180">
<template #default="{ row }"> <template #default="{ row }">
<el-input v-model="row.name" :disabled="readonly" maxlength="100" /> <el-input v-model="row.name" :disabled="readonly" maxlength="100" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="附件地址" min-width="320"> <el-table-column label="附件描述" min-width="220">
<template #default="{ row }"> <template #default="{ row }">
<el-input v-model="row.url" :disabled="readonly" maxlength="500" /> <el-input v-model="row.description" :disabled="readonly" maxlength="200" />
</template>
</el-table-column>
<el-table-column label="文件大小" min-width="120">
<template #default="{ row }">
<el-input v-model="row.size" :disabled="readonly" maxlength="30" />
</template>
</el-table-column>
<el-table-column label="上传人" min-width="120">
<template #default="{ row }">
<el-input v-model="row.uploadUserName" :disabled="readonly" maxlength="30" />
</template>
</el-table-column>
<el-table-column label="上传时间" min-width="170">
<template #default="{ row }">
<el-date-picker
v-model="row.uploadTime"
type="datetime"
value-format="YYYY-MM-DD HH:mm:ss"
:disabled="readonly"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="90" align="center" v-if="!readonly"> <el-table-column label="操作" width="90" align="center" v-if="!readonly">
@@ -358,7 +417,7 @@
<div class="section-head"> <div class="section-head">
<span></span> <span></span>
<el-button type="primary" icon="el-icon-plus" v-if="!readonly" @click="addScore"> <el-button type="primary" icon="el-icon-plus" v-if="!readonly" @click="addScore">
读取评分量化表 添加评分记录
</el-button> </el-button>
</div> </div>
<el-table :data="archiveForm.scores" border> <el-table :data="archiveForm.scores" border>
@@ -376,6 +435,11 @@
<el-table-column label="自评得分" prop="selfScore" width="110" align="center" /> <el-table-column label="自评得分" prop="selfScore" width="110" align="center" />
<el-table-column label="复评得分" prop="reviewScore" width="110" align="center" /> <el-table-column label="复评得分" prop="reviewScore" width="110" align="center" />
<el-table-column label="最终得分" prop="finalScore" width="110" align="center" /> <el-table-column label="最终得分" prop="finalScore" width="110" align="center" />
<el-table-column label="额度" min-width="150">
<template #default="{ row }">
<el-input-number v-model="row.applyCreditLimit" :min="0" :precision="2" :disabled="readonly" />
</template>
</el-table-column>
<el-table-column label="信用等级" min-width="130"> <el-table-column label="信用等级" min-width="130">
<template #default="{ row }"> <template #default="{ row }">
<el-input v-model="row.creditLevel" :disabled="readonly" maxlength="30" /> <el-input v-model="row.creditLevel" :disabled="readonly" maxlength="30" />
@@ -431,6 +495,8 @@
<template #footer> <template #footer>
<el-button @click="archiveBox = false">{{ readonly ? '关闭' : '取消' }}</el-button> <el-button @click="archiveBox = false">{{ readonly ? '关闭' : '取消' }}</el-button>
<el-button type="primary" v-if="!readonly" @click="saveArchive">保存</el-button> <el-button type="primary" v-if="!readonly" @click="saveArchive">保存</el-button>
<el-button type="success" v-if="!readonly" @click="saveAndSubmitArchive">提交</el-button>
<el-button v-if="!readonly" @click="archiveBox = false">返回</el-button>
</template> </template>
</el-dialog> </el-dialog>
@@ -566,6 +632,13 @@ export default {
callback(); callback();
} }
}; };
const validateBusinessEndDate = (rule, value, callback) => {
if (this.archiveForm.businessTermType === '固定期限' && !value) {
callback(new Error('请选择营业期限截止日'));
} else {
callback();
}
};
return { return {
form: {}, form: {},
query: {}, query: {},
@@ -585,11 +658,11 @@ export default {
archiveForm: this.emptyArchive(), archiveForm: this.emptyArchive(),
currentScore: { details: [] }, currentScore: { details: [] },
qualificationFiles: [], qualificationFiles: [],
deptTree: [],
deptOptions: [], deptOptions: [],
customerTypeOptions: [ customerTypeOptions: [
{ label: '客户', value: '客户' }, { label: '客户', value: '客户' },
{ label: '供应商', value: '供应商' }, { label: '承运商', value: '承运商' },
{ label: '客户/供应商', value: '客户/供应商' },
], ],
accessTypeMap: { accessTypeMap: {
temporary: '临时客商', temporary: '临时客商',
@@ -648,7 +721,9 @@ export default {
trigger: 'blur', trigger: 'blur',
}, },
], ],
customerType: [{ required: true, message: '请选择客商类型', trigger: 'change' }], customerType: [
{ type: 'array', required: true, message: '请选择客商类型', trigger: 'change' },
],
legalPerson: [{ required: true, message: '请输入法人/负责人', trigger: 'blur' }], legalPerson: [{ required: true, message: '请输入法人/负责人', trigger: 'blur' }],
contactPhone: [ contactPhone: [
{ required: true, message: '请输入联系电话', trigger: 'blur' }, { required: true, message: '请输入联系电话', trigger: 'blur' },
@@ -659,6 +734,7 @@ export default {
registeredCapital: [{ validator: validateNonNegative, trigger: 'blur' }], registeredCapital: [{ validator: validateNonNegative, trigger: 'blur' }],
maxCreditLimit: [{ validator: validateNonNegative, trigger: 'blur' }], maxCreditLimit: [{ validator: validateNonNegative, trigger: 'blur' }],
applyCreditLimit: [{ validator: validateNonNegative, trigger: 'blur' }], applyCreditLimit: [{ validator: validateNonNegative, trigger: 'blur' }],
businessEndDate: [{ validator: validateBusinessEndDate, trigger: 'change' }],
registeredAddress: [{ max: 200, message: '地址最多200个字符', trigger: 'blur' }], registeredAddress: [{ max: 200, message: '地址最多200个字符', trigger: 'blur' }],
businessScope: [{ max: 500, message: '经营范围最多500个字符', trigger: 'blur' }], businessScope: [{ max: 500, message: '经营范围最多500个字符', trigger: 'blur' }],
remark: [{ max: 500, message: '备注最多500个字符', trigger: 'blur' }], remark: [{ max: 500, message: '备注最多500个字符', trigger: 'blur' }],
@@ -667,6 +743,8 @@ export default {
height: 'auto', height: 'auto',
calcHeight: 32, calcHeight: 32,
tip: false, tip: false,
searchBtnText: '查询',
emptyBtnText: '重置',
searchShow: true, searchShow: true,
searchMenuSpan: 6, searchMenuSpan: 6,
border: true, border: true,
@@ -691,9 +769,8 @@ export default {
search: true, search: true,
minWidth: 120, minWidth: 120,
dicData: [ dicData: [
{ label: '企业', value: '企业' }, { label: '有限公司', value: '有限公司' },
{ label: '个', value: '个' }, { label: '个体工商户', value: '个体工商户' },
{ label: '事业单位', value: '事业单位' },
], ],
}, },
{ label: '统一信用代码', prop: 'unifiedCreditCode', search: true, minWidth: 190 }, { label: '统一信用代码', prop: 'unifiedCreditCode', search: true, minWidth: 190 },
@@ -746,6 +823,7 @@ export default {
{ label: '启用', value: 1 }, { label: '启用', value: 1 },
{ label: '停用', value: 2 }, { label: '停用', value: 2 },
], ],
clearable: true,
}, },
{ {
label: '创建开始时间', label: '创建开始时间',
@@ -797,6 +875,14 @@ export default {
if (this.readonly) return '查看客商档案'; if (this.readonly) return '查看客商档案';
return this.archiveForm.id ? '编辑客商档案' : '新增客商档案'; return this.archiveForm.id ? '编辑客商档案' : '新增客商档案';
}, },
missingQualificationText() {
if (this.archiveForm.accessType !== 'formal') return '';
const types = this.qualificationFiles.map(item => item.type || item.name).filter(Boolean);
const missing = ['公司营业执照', '道路运输证'].filter(
item => !types.some(type => String(type).includes(item))
);
return missing.length ? `缺失核心资质材料:${missing.join('、')}` : '';
},
}, },
methods: { methods: {
hasPermission(code) { hasPermission(code) {
@@ -807,6 +893,7 @@ export default {
accessType: 'temporary', accessType: 'temporary',
approvalStatus: 'draft', approvalStatus: 'draft',
status: 1, status: 1,
customerType: [],
contacts: [], contacts: [],
receiptAccounts: [], receiptAccounts: [],
invoices: [], invoices: [],
@@ -845,7 +932,8 @@ export default {
}, },
initDeptTree() { initDeptTree() {
getDeptTree(this.userInfo.tenantId).then(res => { getDeptTree(this.userInfo.tenantId).then(res => {
this.deptOptions = this.flattenDept(res.data.data || []); this.deptTree = res.data.data || [];
this.deptOptions = this.flattenDept(this.deptTree);
}); });
}, },
initCustomerTypes() { initCustomerTypes() {
@@ -856,6 +944,11 @@ export default {
label: item.name, label: item.name,
value: item.name, value: item.name,
})); }));
['客户', '承运商'].forEach(type => {
if (!this.customerTypeOptions.some(item => item.value === type)) {
this.customerTypeOptions.push({ label: type, value: type });
}
});
} }
}); });
}, },
@@ -894,19 +987,47 @@ export default {
stringifyAttachments(list) { stringifyAttachments(list) {
const files = (list || []) const files = (list || [])
.map(item => ({ .map(item => ({
type: String(item.type || '').trim(),
name: String(item.name || '').trim(), name: String(item.name || '').trim(),
description: String(item.description || '').trim(),
size: String(item.size || '').trim(),
uploadUserName: String(item.uploadUserName || '').trim(),
uploadTime: String(item.uploadTime || '').trim(),
url: String(item.url || '').trim(), url: String(item.url || '').trim(),
})) }))
.filter(item => item.name || item.url); .filter(item => item.type || item.name || item.url);
return files.length ? JSON.stringify(files) : ''; return files.length ? JSON.stringify(files) : '';
}, },
addAttachment() { addAttachment() {
this.qualificationFiles.push({ name: '', url: '' }); this.qualificationFiles.push({
type: '',
name: '',
description: '',
size: '',
uploadUserName: this.userInfo.realName || this.userInfo.userName || '',
uploadTime: this.$dayjs().format('YYYY-MM-DD HH:mm:ss'),
url: '',
});
},
downloadAttachments() {
const files = this.qualificationFiles.filter(item => item.url);
if (!files.length) {
this.$message.warning('暂无可下载附件');
return;
}
files.forEach(item => window.open(item.url, '_blank'));
}, },
normalizeDetail(detail) { normalizeDetail(detail) {
const customerType = detail.customerType
? String(detail.customerType)
.split(',')
.map(item => item.trim())
.filter(Boolean)
: [];
return { return {
...this.emptyArchive(), ...this.emptyArchive(),
...detail, ...detail,
customerType,
contacts: detail.contacts || [], contacts: detail.contacts || [],
receiptAccounts: detail.receiptAccounts || [], receiptAccounts: detail.receiptAccounts || [],
invoices: detail.invoices || [], invoices: detail.invoices || [],
@@ -964,6 +1085,9 @@ export default {
}, },
normalizeArchive() { normalizeArchive() {
const archive = JSON.parse(JSON.stringify(this.archiveForm)); const archive = JSON.parse(JSON.stringify(this.archiveForm));
archive.customerType = Array.isArray(archive.customerType)
? archive.customerType.join(',')
: archive.customerType;
archive.qualificationAttachments = this.stringifyAttachments(this.qualificationFiles); archive.qualificationAttachments = this.stringifyAttachments(this.qualificationFiles);
archive.contacts = (archive.contacts || []).filter(item => item.contactName || item.contactPhone); archive.contacts = (archive.contacts || []).filter(item => item.contactName || item.contactPhone);
archive.receiptAccounts = (archive.receiptAccounts || []).filter( archive.receiptAccounts = (archive.receiptAccounts || []).filter(
@@ -986,6 +1110,31 @@ export default {
}); });
}); });
}, },
saveAndSubmitArchive() {
this.$refs.archiveForm.validate(valid => {
if (!valid) {
this.$message.warning('请先完整填写必填项');
return;
}
const archive = this.normalizeArchive();
if (!this.validateFormalForApproval(archive)) return;
submit(archive).then(res => {
const data = res.data.data;
const id = (data && typeof data === 'object' ? data.id : data) || this.archiveForm.id;
if (!id) {
this.archiveBox = false;
this.onLoad(this.page);
this.$message({ type: 'success', message: '保存成功,请在列表提交审批' });
return;
}
submitApproval(id).then(() => {
this.archiveBox = false;
this.onLoad(this.page);
this.$message({ type: 'success', message: '提交成功!' });
});
});
});
},
addScore() { addScore() {
getScoreTemplate().then(res => { getScoreTemplate().then(res => {
const score = this.normalizeScore(res.data.data); const score = this.normalizeScore(res.data.data);
@@ -1228,6 +1377,17 @@ export default {
margin: 18px 0 12px; margin: 18px 0 12px;
} }
.section-actions {
display: flex;
flex-wrap: wrap;
gap: 8px;
justify-content: flex-end;
}
.archive-rule-alert {
margin-bottom: 12px;
}
.archive-tabs { .archive-tabs {
margin-top: 18px; margin-top: 18px;
} }

View File

@@ -91,6 +91,12 @@
</div> </div>
</template> </template>
</avue-crud> </avue-crud>
<empty-pagination
:page="page"
@size-change="sizeChange"
@current-change="currentChange"
@load="onLoad(page, query)"
/>
<el-dialog title="保险记录数据导入" append-to-body v-model="excelBox" width="555px"> <el-dialog title="保险记录数据导入" append-to-body v-model="excelBox" width="555px">
<avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter"> <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
<template #excelTemplate> <template #excelTemplate>
@@ -265,7 +271,7 @@ export default {
); );
}, },
rowDel(row) { rowDel(row) {
this.$confirm('确定将选择数据删除?', { this.$confirm('确定删除该条数据删除后不可恢复?', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
@@ -281,7 +287,7 @@ export default {
this.$message.warning('请选择至少一条数据'); this.$message.warning('请选择至少一条数据');
return; return;
} }
this.$confirm('确定将选择数据删除?', { this.$confirm('确定删除所选数据删除后不可恢复?', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',

View File

@@ -74,6 +74,12 @@
<span>{{ formatAttachments(row.attachments) }}</span> <span>{{ formatAttachments(row.attachments) }}</span>
</template> </template>
</avue-crud> </avue-crud>
<empty-pagination
:page="page"
@size-change="sizeChange"
@current-change="currentChange"
@load="onLoad(page, query)"
/>
<el-dialog title="里程记录数据导入" append-to-body v-model="excelBox" width="555px"> <el-dialog title="里程记录数据导入" append-to-body v-model="excelBox" width="555px">
<avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter"> <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
<template #excelTemplate> <template #excelTemplate>
@@ -296,7 +302,7 @@ export default {
); );
}, },
rowDel(row) { rowDel(row) {
this.$confirm('确定将选择数据删除?', { this.$confirm('确定删除该条数据删除后不可恢复?', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
@@ -312,7 +318,7 @@ export default {
this.$message.warning('请选择至少一条数据'); this.$message.warning('请选择至少一条数据');
return; return;
} }
this.$confirm('确定将选择数据删除?', { this.$confirm('确定删除所选数据删除后不可恢复?', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',

View File

@@ -73,6 +73,12 @@
<span>{{ formatAttachments(row.attachments) }}</span> <span>{{ formatAttachments(row.attachments) }}</span>
</template> </template>
</avue-crud> </avue-crud>
<empty-pagination
:page="page"
@size-change="sizeChange"
@current-change="currentChange"
@load="onLoad(page, query)"
/>
<el-dialog title="换胎记录数据导入" append-to-body v-model="excelBox" width="555px"> <el-dialog title="换胎记录数据导入" append-to-body v-model="excelBox" width="555px">
<avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter"> <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
<template #excelTemplate> <template #excelTemplate>
@@ -254,7 +260,7 @@ export default {
); );
}, },
rowDel(row) { rowDel(row) {
this.$confirm('确定将选择数据删除?', { this.$confirm('确定删除该条数据删除后不可恢复?', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
@@ -270,7 +276,7 @@ export default {
this.$message.warning('请选择至少一条数据'); this.$message.warning('请选择至少一条数据');
return; return;
} }
this.$confirm('确定将选择数据删除?', { this.$confirm('确定删除所选数据删除后不可恢复?', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',

View File

@@ -90,6 +90,12 @@
<span>{{ formatAttachments(row.attachments) }}</span> <span>{{ formatAttachments(row.attachments) }}</span>
</template> </template>
</avue-crud> </avue-crud>
<empty-pagination
:page="page"
@size-change="sizeChange"
@current-change="currentChange"
@load="onLoad(page, query)"
/>
<el-dialog title="违章记录数据导入" append-to-body v-model="excelBox" width="555px"> <el-dialog title="违章记录数据导入" append-to-body v-model="excelBox" width="555px">
<avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter"> <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
<template #excelTemplate> <template #excelTemplate>
@@ -170,7 +176,7 @@ export default {
}, },
'form.processStatus': { 'form.processStatus': {
handler(value) { handler(value) {
this.updateProcessResultDisplay(value || '处理'); this.updateProcessResultDisplay(value || '处理');
}, },
immediate: true, immediate: true,
}, },
@@ -269,7 +275,7 @@ export default {
normalizeRow(row) { normalizeRow(row) {
const values = { ...row }; const values = { ...row };
values.vehicleType = values.vehicleType || '车辆'; values.vehicleType = values.vehicleType || '车辆';
values.processStatus = values.processStatus || '处理'; values.processStatus = values.processStatus || '处理';
if (values.vehicleNo) { if (values.vehicleNo) {
values.vehicleNo = values.vehicleNo.trim().toUpperCase(); values.vehicleNo = values.vehicleNo.trim().toUpperCase();
} }
@@ -343,7 +349,7 @@ export default {
); );
}, },
rowDel(row) { rowDel(row) {
this.$confirm('确定将选择数据删除?', { this.$confirm('确定删除该条数据删除后不可恢复?', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
@@ -359,7 +365,7 @@ export default {
this.$message.warning('请选择至少一条数据'); this.$message.warning('请选择至少一条数据');
return; return;
} }
this.$confirm('确定将选择数据删除?', { this.$confirm('确定删除所选数据删除后不可恢复?', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
@@ -375,10 +381,10 @@ export default {
if (type === 'add') { if (type === 'add') {
this.form = { this.form = {
vehicleType: '车辆', vehicleType: '车辆',
processStatus: '处理', processStatus: '处理',
}; };
this.updateVehicleTypeDisplays('车辆'); this.updateVehicleTypeDisplays('车辆');
this.updateProcessResultDisplay('处理'); this.updateProcessResultDisplay('处理');
} }
if (['edit', 'view'].includes(type)) { if (['edit', 'view'].includes(type)) {
getDetail(this.form.id).then(res => { getDetail(this.form.id).then(res => {