diff --git a/.env.production b/.env.production index e9b8c0e..805bbcf 100644 --- a/.env.production +++ b/.env.production @@ -6,6 +6,6 @@ VUE_APP_BASE_API = 'http://8.138.171.103/aerocraftAdminApi' # VUE_APP_BASE_API = 'https://webapi.aishangfeixing.com/aerocraftAdminApi/' # 运行基本路径 VUE_APP_BASE_PATH = 'http://8.138.171.103/aerocraftAdmin' -# VUE_APP_BASE_PATH = 'https://webapi.aishangfeixing.com/aerocraftAdmin' +# VUE_APP_BASE_PATH = 'https://admin.aishangfeixing.com' # 如果接口是 http 形式, wss 需要改为 ws VUE_APP_WS_API = 'wss://eladmin.vip' diff --git a/src/components/Breadcrumb/index.vue b/src/components/Breadcrumb/index.vue index 204ea59..dd2d97b 100644 --- a/src/components/Breadcrumb/index.vue +++ b/src/components/Breadcrumb/index.vue @@ -36,9 +36,9 @@ export default { let matched = this.$route.matched.filter(item => item.meta && item.meta.title) const first = matched[0] - if (!this.isDashboard(first)) { - matched = [{ path: '/dashboard', meta: { title: '首页' }}].concat(matched) - } + // if (!this.isDashboard(first)) { + // matched = [{ path: '/dashboard', meta: { title: '首页' }}].concat(matched) + // } this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false) }, diff --git a/src/router/routers.js b/src/router/routers.js index cbebe79..f7e583f 100644 --- a/src/router/routers.js +++ b/src/router/routers.js @@ -35,14 +35,14 @@ export const constantRouterMap = [ { path: '/', component: Layout, - redirect: '/dashboard', + // redirect: '/dashboard', children: [ - { - path: 'dashboard', - component: (resolve) => require(['@/views/home'], resolve), - name: 'Dashboard', - meta: { title: '首页', icon: 'index', affix: true, noCache: true } - } + // { + // path: 'dashboard', + // component: (resolve) => require(['@/views/home'], resolve), + // name: 'Dashboard', + // meta: { title: '首页', icon: 'index', affix: true, noCache: true } + // } ] }, { diff --git a/src/views/aircraft/aircraftDetail/components/InsuranceRecord.vue b/src/views/aircraft/aircraftDetail/components/InsuranceRecord.vue index 8c9dedc..da847cd 100644 --- a/src/views/aircraft/aircraftDetail/components/InsuranceRecord.vue +++ b/src/views/aircraft/aircraftDetail/components/InsuranceRecord.vue @@ -139,6 +139,7 @@ import { mapGetters } from 'vuex' import { upload } from '@/utils/upload' import { addInsurance, getInsuranceDetail, deleteInsurance, editInsurance } from '@/api/aircraft' +import { get as getDictDetail } from '@/api/system/dictDetail' export default { name: "InsuranceRecord", @@ -182,11 +183,7 @@ export default { edit: ['admin', 'aircraftDetail:edit'], delete: ['admin', 'aircraftDetail:delete'] }, - insuranceTypes: [ - { value: 0, label: "三方险" }, - { value: 1, label: "设备险" }, - { value: 2, label: "运营险" }, - ], + insuranceTypes: [], rules: { name: [{ required: true, message: "请输入保险名称", trigger: "blur" }], insuranceType: [ @@ -201,7 +198,23 @@ export default { }, }; }, + created() { + this.getInsuranceTypes() + }, methods: { + async getInsuranceTypes() { + try { + const res = await getDictDetail('insurance_type') + this.insuranceTypes = res.content.map(item => ({ + value: item.dictSort, + label: item.value + })) + console.log(this.insuranceTypes) + } catch (error) { + console.error('获取保险类型失败:', error) + this.$message.error('获取保险类型失败') + } + }, getInsuranceTypeName(type) { const found = this.insuranceTypes.find(t => t.value === type) return found ? found.label : '未知类型' diff --git a/src/views/aircraft/aircraftDetail/index.vue b/src/views/aircraft/aircraftDetail/index.vue index d64a2cf..b701f5e 100644 --- a/src/views/aircraft/aircraftDetail/index.vue +++ b/src/views/aircraft/aircraftDetail/index.vue @@ -32,6 +32,7 @@