<!-- 搜索框组件 --> | <!-- 搜索框组件 --> | ||||
<search-operation v-show="SSearch" :searchCondition="searchCondition" @RefreshLeft="RefreshLeft"> | <search-operation v-show="SSearch" :searchCondition="searchCondition" @RefreshLeft="RefreshLeft"> | ||||
<!-- 具名插槽 --> | <!-- 具名插槽 --> | ||||
<slot name="search" :scope="searchCondition" /> | |||||
<slot name="search" :searchCondition="searchCondition" /> | |||||
</search-operation> | </search-operation> | ||||
<!-- CRUD组件 --> | <!-- CRUD组件 --> |
export const Data = { | export const Data = { | ||||
config: { | |||||
search: { | |||||
fileOne: '', | |||||
fileTwo: '', | |||||
fileThree: '' | |||||
}, | }, | ||||
table: { | table: { | ||||
style: '', | style: '', | ||||
label: '序号', | label: '序号', | ||||
width: '80' | width: '80' | ||||
}], | }], | ||||
field: [ | |||||
field: [ //表格 | |||||
{ | { | ||||
prop: 'name', | prop: 'name', | ||||
label: '客户名称', | label: '客户名称', | ||||
type: 'input', | type: 'input', | ||||
placeholder: '请输入客户名称' | placeholder: '请输入客户名称' | ||||
} | } | ||||
}, { | |||||
prop: 'name', | |||||
label: '证件类型', | |||||
width: '180', | |||||
form: { | |||||
required: true, | |||||
type: 'input', | |||||
placeholder: '请输入证件类型' | |||||
} | |||||
}, { | |||||
prop: 'name', | |||||
label: '证件号码', | |||||
width: '180', | |||||
form: { | |||||
required: true, | |||||
type: 'input', | |||||
placeholder: '请输入证件号码' | |||||
} | |||||
}, { | }, { | ||||
prop: 'name', | prop: 'name', | ||||
label: '车牌号码', | label: '车牌号码', | ||||
type: 'input', | type: 'input', | ||||
placeholder: '请输入卡片类型' | placeholder: '请输入卡片类型' | ||||
} | } | ||||
} | |||||
}, | |||||
{ | |||||
prop: 'name', | |||||
label: 'OBU编号', | |||||
width: '180', | |||||
form: { | |||||
required: true, | |||||
type: 'input', | |||||
placeholder: 'OBU编号' | |||||
} | |||||
}, { | |||||
prop: 'name', | |||||
label: 'OBU状态', | |||||
width: '120', | |||||
form: { | |||||
required: true, | |||||
type: 'input', | |||||
placeholder: 'OBU状态' | |||||
} | |||||
}, | |||||
], | ], | ||||
border: true, | border: true, | ||||
operateTitle: '操作', | operateTitle: '操作', |
export const cfg = { | export const cfg = { | ||||
search: { //搜索字段配置 | |||||
}, | |||||
table: { //table 样式配置 | table: { //table 样式配置 | ||||
style: '', //默认表格样式 | style: '', //默认表格样式 | ||||
extend: [{ //表头拓展 | extend: [{ //表头拓展 |
<template> | <template> | ||||
<!-- 标签选项卡模块 :model-value="props.editableTabsValue"(只读) --> | <!-- 标签选项卡模块 :model-value="props.editableTabsValue"(只读) --> | ||||
<el-tabs v-model="editableTabsValue.index" type="card" @tab-click="tabClick" @tab-remove="removeTab" | <el-tabs v-model="editableTabsValue.index" type="card" @tab-click="tabClick" @tab-remove="removeTab" | ||||
@contextmenu.prevent.native="openMenu($event)"> | |||||
@contextmenu.stop.prevent.native="openMenu($event)"> | |||||
<el-tab-pane v-for="item in editableTabs" :key="item.name" :closable="item.start" :label="item.title" | <el-tab-pane v-for="item in editableTabs" :key="item.name" :closable="item.start" :label="item.title" | ||||
:name="item.name"> | :name="item.name"> | ||||
<slot></slot> | <slot></slot> |
<div class="as-layout-horizontal" style="width: 100%; height: 100%;opacity: 0.9;"> | <div class="as-layout-horizontal" style="width: 100%; height: 100%;opacity: 0.9;"> | ||||
<!-- 此处先划出布局形式(按左右布局划分,左边菜单,右边内容) --> | <!-- 此处先划出布局形式(按左右布局划分,左边菜单,右边内容) --> | ||||
<!-- 菜单部分 --> | <!-- 菜单部分 --> | ||||
<div class="bg-theme" style="height: 100%;width: 280px;"> | |||||
<div class="bg-theme" style="height: 100%;"> | |||||
<!-- 菜单头部部分 --> | <!-- 菜单头部部分 --> | ||||
<div class="as-gravity-center-start" style="height: 10%;"> | <div class="as-gravity-center-start" style="height: 10%;"> | ||||
<img rel="icon" src="/logo2.png" style="width: 60px;height: 60px;" /> | <img rel="icon" src="/logo2.png" style="width: 60px;height: 60px;" /> | ||||
</div> | </div> | ||||
<!-- 菜单主体部分 --> | <!-- 菜单主体部分 --> | ||||
<el-menu :default-active="menuIndex.menuIndex" style="height: 100%;width: 280px;" mode="vertical" | |||||
:router="false" @select="select" :collapse="!menuStart.menuIsExpansion" class="el-menu-vertical-demo"> | |||||
<el-menu :default-active="menuIndex.menuIndex" width="280" style="height: 100%" mode="vertical" :router="false" | |||||
@select="select" :collapse="!menuStart.menuIsExpansion" class="el-menu-vertical-demo"> | |||||
<SidebarItem :list="list" /> | <SidebarItem :list="list" /> | ||||
</el-menu> | </el-menu> | ||||
<div style=" background-color: #ffffff; padding: 10px 0px 10px 0px"> | <div style=" background-color: #ffffff; padding: 10px 0px 10px 0px"> | ||||
<!-- 选项卡 --> | <!-- 选项卡 --> | ||||
<TabContainer> | <TabContainer> | ||||
<!-- 主体内容页面 --> | |||||
<router-view name="key"></router-view> | |||||
<!-- 路由缓存 https://blog.csdn.net/kDevelop/article/details/122036896 --> | |||||
<!-- <router-view name="key" v-slot="{ Component }"> | |||||
<keep-alive style="height:100vh"> | |||||
<component :is="Component" /> | |||||
</keep-alive> | |||||
</router-view> --> | |||||
</TabContainer> | </TabContainer> | ||||
<!-- 主体内容页面 --> | |||||
<router-view name="key"></router-view> | |||||
<!-- 路由缓存 https://blog.csdn.net/kDevelop/article/details/122036896 --> | |||||
<!-- <router-view name="key" v-slot="{ Component }"> | |||||
<keep-alive style="height:100vh"> | |||||
<component :is="Component" /> | |||||
</keep-alive> | |||||
</router-view> --> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> |
<CRUD :homeData="Data" text="123"> | <CRUD :homeData="Data" text="123"> | ||||
<template #search="{ searchCondition }"> | <template #search="{ searchCondition }"> | ||||
<!-- 搜索 监听回车 @keyup.enter.native="search"--> | <!-- 搜索 监听回车 @keyup.enter.native="search"--> | ||||
<!-- <el-input v-model="searchCondition.name" clearable placeholder="输入名称搜索" style="width: 200px;" /> --> | |||||
<el-input v-model="searchCondition.fileOne" clearable placeholder="卡号" style="width: 200px;" /> | |||||
<el-input v-model="searchCondition.fileTwo" clearable placeholder="车牌号码" style="width: 200px;margin: 0 10px 0 10px;" /> | |||||
<!-- 日期搜索 --> | <!-- 日期搜索 --> | ||||
<!-- <el-date-picker v-model="searchCondition.date" type="date" placeholder="输入日期搜索" | <!-- <el-date-picker v-model="searchCondition.date" type="date" placeholder="输入日期搜索" | ||||
style="width: 200px;margin: 0 10px 0 10px;" value-format="YYYY-MM-DD" /> --> | style="width: 200px;margin: 0 10px 0 10px;" value-format="YYYY-MM-DD" /> --> | ||||
<el-select v-model="searchCondition.fileThree" placeholder="--请输入车牌颜色--" style="margin-right: 10px;"> | |||||
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" /> | |||||
</el-select> | |||||
</template> | </template> | ||||
</CRUD> | </CRUD> | ||||
</template> | </template> | ||||
import { | import { | ||||
tableData | tableData | ||||
} from "@/data/tableData" //表单数据 | } from "@/data/tableData" //表单数据 | ||||
const options = [{ | |||||
value: 'Option1', | |||||
label: '蓝色', | |||||
}, | |||||
{ | |||||
value: 'Option2', | |||||
label: '黄色', | |||||
}, | |||||
{ | |||||
value: 'Option3', | |||||
label: '黑色', | |||||
}, | |||||
{ | |||||
value: 'Option4', | |||||
label: '白色', | |||||
}, | |||||
{ | |||||
value: 'Option5', | |||||
label: '渐变绿色', | |||||
}, | |||||
{ | |||||
value: 'Option6', | |||||
label: '黄绿双拼色', | |||||
}, | |||||
{ | |||||
value: 'Option7', | |||||
label: '蓝白渐变色', | |||||
}, | |||||
{ | |||||
value: 'Option8', | |||||
label: '未确定', | |||||
}, | |||||
{ | |||||
value: 'Option9', | |||||
label: '绿色', | |||||
}, | |||||
{ | |||||
value: 'Option10', | |||||
label: '红色', | |||||
}, | |||||
] | |||||
</script> | </script> | ||||
<style lang="scss" scoped> | <style lang="scss" scoped> | ||||