@@ -4,6 +4,8 @@ import { | |||
mergeOptions | |||
} from '@/utils/utils'; | |||
const debugging = true; //是否开启调试 | |||
const service = axios.create({ | |||
// `method` 是创建请求时使用的方法 | |||
method: "get", // 默认是 get | |||
@@ -73,7 +75,9 @@ export function get(url: string, data = {}, options = {}) { | |||
params: data | |||
} | |||
//合并用户配置参数信息 | |||
options = Object.assign(defaultOptions, options) | |||
if (debugging) { | |||
options = Object.assign(defaultOptions, options); | |||
} | |||
return common(options) | |||
} | |||
@@ -91,7 +95,9 @@ export function post(url: string, data = {}, options = {}) { | |||
data: data, | |||
} | |||
//合并用户配置参数信息 | |||
options = Object.assign(defaultOptions, options); | |||
if (debugging) { | |||
options = Object.assign(defaultOptions, options); | |||
} | |||
return common(options) | |||
} | |||
@@ -21,7 +21,7 @@ | |||
<el-table-column v-for="(item, index) in tableFrom.field" :key="index" :prop="item.prop" :label="item.label" | |||
:width="item.width" :show-overflow-tooltip="!item.overflow" /> | |||
<el-table-column :fixed="tableFrom.operateFixed ? 'right' : 'false'" :label="tableFrom.operateTitle" | |||
<el-table-column :v-if="tableFrom.operateShow" :fixed="tableFrom.operateFixed ? 'right' : 'false'" :label="tableFrom.operateTitle" | |||
:width="tableFrom.operateWidth ? tableFrom.operateWidth : ''"> | |||
<!-- 默认插槽值 --> | |||
<template #default="scope"> | |||
@@ -32,13 +32,14 @@ | |||
<slot name="operation" :scope="scope" :tableFrom="dialogFormVisible" /> | |||
</template> | |||
</el-table-column> | |||
</el-table> | |||
<!-- 分页组件 --> | |||
<el-pagination v-if="false" :page-size="20" :pager-count="11" layout="prev, pager, next" :total="1000" /> | |||
<!-- 对话框 --> | |||
<el-dialog v-model="dialogFormVisible" :title="tableFrom.titleDialog ? tableFrom.titleDialog : `${title}`"> | |||
<!-- 是否自定义Dialog --> | |||
<div v-if="tableFrom.customDialog"> | |||
<div v-if="tableFrom.dialogCustom"> | |||
<slot name="dialog" :form="form" /> | |||
</div> | |||
<div v-else> | |||
@@ -70,7 +71,7 @@ | |||
</div> | |||
<template #footer> | |||
<span v-if="!tableFrom.footerDialog"> | |||
<span v-if="!tableFrom.dialogFooter"> | |||
<el-button @click="cancel">取消</el-button> | |||
<el-button type="primary" @click="affirm(ruleFormRef)">提交</el-button> | |||
</span> |
@@ -10,13 +10,6 @@ order?:number; 菜单排序。 | |||
frameUrl?:string; 嵌套外链。 | |||
*/ | |||
export const list = [ | |||
// { | |||
// title: '售后服务', | |||
// path: 'home', //对应name名称 | |||
// icon: 'one', | |||
// auth: true, | |||
// order: 1, | |||
// children: [ | |||
{ | |||
title: '基础信息查询服务', | |||
path: 'home', | |||
@@ -24,27 +17,27 @@ export const list = [ | |||
children: [{ | |||
title: '用户信息查询及变更服务', | |||
path: 'userQueryChange', | |||
icon:'User', | |||
icon: 'User', | |||
children: [] | |||
}, { | |||
title: '车辆信息查询及变更服务', | |||
path: 'vehicleEnquirChange', | |||
icon:'Van', | |||
icon: 'Van', | |||
children: [] | |||
}, { | |||
title: '签约信息查询服务', | |||
path: 'signingQuery', | |||
icon:'Tickets', | |||
icon: 'Tickets', | |||
children: [] | |||
}, { | |||
title: '卡片信息查询服务', | |||
path: 'cardQueries', | |||
icon:'Postcard', | |||
icon: 'Postcard', | |||
children: [] | |||
}, { | |||
title: 'OBU信息查询服务', | |||
path: 'OBUQuery', | |||
icon:'Link', | |||
icon: 'Link', | |||
children: [] | |||
}] | |||
}, | |||
@@ -72,11 +65,6 @@ export const list = [ | |||
icon: 'Postcard', | |||
path: 'cardRenewal', | |||
children: [] | |||
}, { | |||
icon: 'Postcard', | |||
title: '标签重新激活服务', | |||
path: 'TABActivate', | |||
children: [] | |||
}, { | |||
icon: 'Postcard', | |||
title: '主动挂起(解除)服务', | |||
@@ -109,36 +97,34 @@ export const list = [ | |||
children: [{ | |||
title: '储值卡充值服务(修复)[圈存]', | |||
path: 'cardrechargefix', | |||
icon:'Notebook', | |||
icon: 'Notebook', | |||
children: [] | |||
}, { | |||
title: '对公账户打款充值服务', | |||
icon:'Plus', | |||
icon: 'Plus', | |||
path: 'advancepaymentaccount', | |||
children: [] | |||
}] | |||
}, { | |||
title: '注销退费服务', | |||
icon:'Scissor', | |||
icon: 'Scissor', | |||
path: 'cardrefundcostManage', | |||
children: [] | |||
}, { | |||
title: '补卡额及补交服务', | |||
path: 'home', | |||
icon:'Connection', | |||
icon: 'Connection', | |||
children: [{ | |||
title: '储值卡-补卡额服务', | |||
icon:'Tickets', | |||
icon: 'Tickets', | |||
path: 'supplyCardBalance', | |||
children: [] | |||
}, { | |||
title: '储值卡-补交服务', | |||
icon:'Box', | |||
icon: 'Box', | |||
path: 'addsupplyCardBalance', | |||
children: [] | |||
}] | |||
}] | |||
} | |||
// ] | |||
// } | |||
]; |
@@ -3,10 +3,9 @@ export const cfg = { | |||
}, | |||
table: { //table 样式配置 | |||
style: '', //默认表格样式 | |||
border: false, //是否添加边框(默认false) | |||
customDialog: false, //自定义Dialog (默认false) | |||
footerDialog: false, //隐藏弹窗页脚显示 (默认false) | |||
dialogCustom: false, //自定义Dialog (默认false) | |||
dialogFooter: false, //隐藏弹窗页脚显示 (默认false) | |||
extend: [{ //表头拓展 | |||
type: '', //类型:selection,index,expand | |||
width: '', //表头宽度 | |||
@@ -16,10 +15,10 @@ export const cfg = { | |||
prop: '', //字段名称 | |||
label: '', //字段标识 | |||
width: '', //字段表头宽度 | |||
overflow: true, //文本超出是否显示省略号(默认false) | |||
overflow: false, //文本超出是否显示省略号(默认false) | |||
form: { //表单内容 | |||
required: true, //表单是否不能为空 | |||
type: '', //表单类型 | |||
required: false, //表单是否不能为空(默认false) | |||
type: '', //表单类型(input,select[含选择框],date) | |||
placeholder: '', //表单提示 | |||
itemType: '', //表单type | |||
listData: [{ //列表数据 | |||
@@ -29,7 +28,7 @@ export const cfg = { | |||
} | |||
} | |||
], | |||
isOperate: true, //是否为表格添加操作处(默认true) | |||
operateShow: true, //是否为表格添加操作栏(默认true) | |||
operateTitle: '', //操作栏标题 | |||
operateFixed: false, //操作栏是否固定(默认false) | |||
operateWidth: '', //操作栏宽度 |
@@ -16,6 +16,8 @@ | |||
<!-- 子项也负责跳转 --> | |||
<router-link style="text-decoration: none" v-else :to="{ name: `${item.path}` }"> | |||
<el-menu-item class="el-menu-item" :index="item.title + ',' + item.path"> | |||
<item-ioc v-if="item.icon" :icon="item.icon" /> | |||
<template #title> | |||
<span style="font-size: 14px">{{ item.title }}</span> |
@@ -19,10 +19,10 @@ export default createStore<any>({ | |||
//判断是否存在tab | |||
contains(state) { | |||
let tabIndex = -1; | |||
return function (value) { | |||
return function (value: any) { | |||
if (value && JSON.stringify(value) !== "{}") { | |||
const tabData = value.split(','); | |||
state.tabArray.forEach((tab, tagI) => { | |||
state.tabArray.forEach((tab: any, tagI: any) => { | |||
if (tab.title === tabData[0] && tab.path === tabData[1]) { | |||
tabIndex = tagI; | |||
} | |||
@@ -73,7 +73,7 @@ export default createStore<any>({ | |||
}, | |||
//关闭其他 | |||
closeTheOther: function (context, value) { | |||
const arr = context.state.tabArray.filter((item, index) => { | |||
const arr = context.state.tabArray.filter((item: any, index: number) => { | |||
if (value === -1) { //关闭全部 | |||
return item.start !== true; | |||
} else { | |||
@@ -110,7 +110,7 @@ export default createStore<any>({ | |||
}, | |||
//排序后重新赋值 | |||
sort(state, data) { | |||
data.arr.forEach((item, index) => { | |||
data.arr.forEach((item: any, index: number) => { | |||
item.name = index + ''; | |||
}); | |||
state.tabArray.splice(0, state.tabArray.length, ...data.arr); |
@@ -1,11 +0,0 @@ | |||
<template> | |||
<div> | |||
Hello, world | |||
</div> | |||
</template> | |||
<script setup lang="ts"> | |||
</script> | |||
<style lang="scss" scoped> | |||
</style> |