作者 xiaoqiu

完成报表,配置中心等模块

... ... @@ -3,13 +3,19 @@
</template>
<script setup>
import useSettingsStore from '@/store/modules/settings'
import { handleThemeStyle } from '@/utils/theme'
import useSettingsStore from "@/store/modules/settings";
import { handleThemeStyle } from "@/utils/theme";
onMounted(() => {
nextTick(() => {
// 初始化主题样式
handleThemeStyle(useSettingsStore().theme)
})
})
handleThemeStyle(useSettingsStore().theme);
});
});
</script>
<style>
input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
}
</style>
... ...
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1726716988128" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2443" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><path d="M955.541327 521.603729c-2.495844 3.162016-6.212492 4.703115-10.095939 4.618181l0 0L840.02643 526.22191l0 418.273339c0 8.209986-6.658653 14.951527-14.925944 14.951527L615.762737 959.446775c-8.237615 0-14.923898-6.741541-14.923898-14.951527l0-298.692846L421.407214 645.802402l0 298.692846c0 8.209986-6.686283 14.951527-14.924921 14.951527l-209.337749 0c-4.106528 0-7.850805-1.719154-10.5421-4.439102-2.716878-2.689249-4.381797-6.436596-4.381797-10.512425L182.220646 526.222933 77.494467 526.222933l0-0.026606c-3.799536-0.028653-7.628748-1.582031-10.568706-4.591575-5.715165-5.963829-5.825682-15.300474 0-21.139459l433.738565-432.767448c5.852288-5.838985 15.313777-5.838985 21.165042 0l433.711959 432.767448C961.394638 506.304278 960.646602 515.098571 955.541327 521.603729zM511.234055 99.336426 113.837186 495.90237l83.307358-0.056282 0 0.596588c2.081405 0 4.050246 0.416486 5.826705 1.151219 5.380544 2.288113 9.153474 7.586792 9.153474 13.772678l0 418.176125 179.37739 0L391.502114 630.878504c0-8.267291 6.713912-14.94027 14.980179-14.94027l209.281467 0c8.267291 0 14.983249 6.67298 14.983249 14.94027l0 298.664194 179.403996 0L810.151006 511.366573c0-6.185886 3.744277-11.485589 9.126868-13.772678 1.77339-0.734734 3.773953-1.151219 5.822612-1.151219l0-1.067308 82.948177-0.082888L511.234055 99.336426z" fill="#ffffff" p-id="2444"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1726814452333" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2840" id="mx_n_1726814452334" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><path d="M955.541327 521.603729c-2.495844 3.162016-6.212492 4.703115-10.095939 4.618181l0 0L840.02643 526.22191l0 418.273339c0 8.209986-6.658653 14.951527-14.925944 14.951527L615.762737 959.446775c-8.237615 0-14.923898-6.741541-14.923898-14.951527l0-298.692846L421.407214 645.802402l0 298.692846c0 8.209986-6.686283 14.951527-14.924921 14.951527l-209.337749 0c-4.106528 0-7.850805-1.719154-10.5421-4.439102-2.716878-2.689249-4.381797-6.436596-4.381797-10.512425L182.220646 526.222933 77.494467 526.222933l0-0.026606c-3.799536-0.028653-7.628748-1.582031-10.568706-4.591575-5.715165-5.963829-5.825682-15.300474 0-21.139459l433.738565-432.767448c5.852288-5.838985 15.313777-5.838985 21.165042 0l433.711959 432.767448C961.394638 506.304278 960.646602 515.098571 955.541327 521.603729zM511.234055 99.336426 113.837186 495.90237l83.307358-0.056282 0 0.596588c2.081405 0 4.050246 0.416486 5.826705 1.151219 5.380544 2.288113 9.153474 7.586792 9.153474 13.772678l0 418.176125 179.37739 0L391.502114 630.878504c0-8.267291 6.713912-14.94027 14.980179-14.94027l209.281467 0c8.267291 0 14.983249 6.67298 14.983249 14.94027l0 298.664194 179.403996 0L810.151006 511.366573c0-6.185886 3.744277-11.485589 9.126868-13.772678 1.77339-0.734734 3.773953-1.151219 5.822612-1.151219l0-1.067308 82.948177-0.082888L511.234055 99.336426z" fill="#c1cbd8" p-id="2841"></path></svg>
\ No newline at end of file
... ...
<template>
<div :class="{ 'show': show }" class="header-search">
<svg-icon class-name="search-icon" icon-class="search" @click.stop="click" />
<div :class="{ show: show }" class="header-search">
<svg-icon
class-name="search-icon"
icon-class="search"
@click.stop="click"
/>
<el-select
ref="headerSearchSelectRef"
v-model="search"
... ... @@ -8,22 +12,27 @@
filterable
default-first-option
remote
placeholder="Search"
placeholder="输入组件名称 例:用户管理"
class="header-search-select"
@change="change"
>
<el-option v-for="option in options" :key="option.item.path" :value="option.item" :label="option.item.title.join(' > ')" />
<el-option
v-for="option in options"
:key="option.item.path"
:value="option.item"
:label="option.item.title.join(' > ')"
/>
</el-select>
</div>
</template>
<script setup>
import Fuse from 'fuse.js'
import { getNormalPath } from '@/utils/ruoyi'
import { isHttp } from '@/utils/validate'
import usePermissionStore from '@/store/modules/permission'
import Fuse from "fuse.js";
import { getNormalPath } from "@/utils/ruoyi";
import { isHttp } from "@/utils/validate";
import usePermissionStore from "@/store/modules/permission";
const search = ref('');
const search = ref("");
const options = ref([]);
const searchPool = ref([]);
const show = ref(false);
... ... @@ -33,15 +42,15 @@ const router = useRouter();
const routes = computed(() => usePermissionStore().routes);
function click() {
show.value = !show.value
show.value = !show.value;
if (show.value) {
headerSearchSelectRef.value && headerSearchSelectRef.value.focus()
headerSearchSelectRef.value && headerSearchSelectRef.value.focus();
}
};
}
function close() {
headerSearchSelectRef.value && headerSearchSelectRef.value.blur()
options.value = []
show.value = false
headerSearchSelectRef.value && headerSearchSelectRef.value.blur();
options.value = [];
show.value = false;
}
function change(val) {
const path = val.path;
... ... @@ -50,14 +59,14 @@ function change(val) {
const pindex = path.indexOf("http");
window.open(path.substr(pindex, path.length), "_blank");
} else {
router.push(path)
router.push(path);
}
search.value = ''
options.value = []
search.value = "";
options.value = [];
nextTick(() => {
show.value = false
})
show.value = false;
});
}
function initFuse(list) {
fuse.value = new Fuse(list, {
... ... @@ -67,79 +76,84 @@ function initFuse(list) {
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [{
name: 'title',
weight: 0.7
}, {
name: 'path',
weight: 0.3
}]
})
keys: [
{
name: "title",
weight: 0.7,
},
{
name: "path",
weight: 0.3,
},
],
});
}
// Filter out the routes that can be displayed in the sidebar
// And generate the internationalized title
function generateRoutes(routes, basePath = '', prefixTitle = []) {
let res = []
function generateRoutes(routes, basePath = "", prefixTitle = []) {
let res = [];
for (const r of routes) {
// skip hidden router
if (r.hidden) { continue }
const p = r.path.length > 0 && r.path[0] === '/' ? r.path : '/' + r.path;
if (r.hidden) {
continue;
}
const p = r.path.length > 0 && r.path[0] === "/" ? r.path : "/" + r.path;
const data = {
path: !isHttp(r.path) ? getNormalPath(basePath + p) : r.path,
title: [...prefixTitle]
}
title: [...prefixTitle],
};
if (r.meta && r.meta.title) {
data.title = [...data.title, r.meta.title]
data.title = [...data.title, r.meta.title];
if (r.redirect !== 'noRedirect') {
if (r.redirect !== "noRedirect") {
// only push the routes with title
// special case: need to exclude parent router without redirect
res.push(data)
res.push(data);
}
}
// recursive child routes
if (r.children) {
const tempRoutes = generateRoutes(r.children, data.path, data.title)
const tempRoutes = generateRoutes(r.children, data.path, data.title);
if (tempRoutes.length >= 1) {
res = [...res, ...tempRoutes]
res = [...res, ...tempRoutes];
}
}
}
return res
return res;
}
function querySearch(query) {
if (query !== '') {
options.value = fuse.value.search(query)
if (query !== "") {
options.value = fuse.value.search(query);
} else {
options.value = []
options.value = [];
}
}
onMounted(() => {
searchPool.value = generateRoutes(routes.value);
})
});
watchEffect(() => {
searchPool.value = generateRoutes(routes.value)
})
searchPool.value = generateRoutes(routes.value);
});
watch(show, (value) => {
if (value) {
document.body.addEventListener('click', close)
document.body.addEventListener("click", close);
} else {
document.body.removeEventListener('click', close)
document.body.removeEventListener("click", close);
}
})
});
watch(searchPool, (list) => {
initFuse(list)
})
initFuse(list);
});
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.header-search {
font-size: 0 !important;
... ... @@ -177,4 +191,4 @@ watch(searchPool, (list) => {
}
}
}
</style>
\ No newline at end of file
</style>
... ...
<template>
<div>
<svg-icon icon-class="question" @click="goto" />
</div>
</template>
<script setup>
const url = ref('http://doc.ruoyi.vip/ruoyi-vue');
function goto() {
window.open(url.value)
}
</script>
\ No newline at end of file
<template>
<div>
<svg-icon icon-class="github" @click="goto" />
</div>
</template>
<script setup>
const url = ref('https://gitee.com/y_project/RuoYi-Vue');
function goto() {
window.open(url.value)
}
</script>
<template>
<div>
<el-dropdown trigger="click" @command="handleSetSize">
<div class="size-icon--style">
<svg-icon class-name="size-icon" icon-class="size" />
</div>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item v-for="item of sizeOptions" :key="item.value" :disabled="size === item.value" :command="item.value">
{{ item.label }}
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</div>
</template>
<script setup>
import useAppStore from "@/store/modules/app";
const appStore = useAppStore();
const size = computed(() => appStore.size);
const route = useRoute();
const router = useRouter();
const { proxy } = getCurrentInstance();
const sizeOptions = ref([
{ label: "较大", value: "large" },
{ label: "默认", value: "default" },
{ label: "稍小", value: "small" },
]);
function handleSetSize(size) {
proxy.$modal.loading("正在设置布局大小,请稍候...");
appStore.setSize(size);
setTimeout("window.location.reload()", 1000);
}
</script>
<style lang='scss' scoped>
.size-icon--style {
font-size: 18px;
line-height: 50px;
padding-right: 7px;
}
</style>
\ No newline at end of file
<template>
<div class="navbar">
<hamburger id="hamburger-container" :is-active="appStore.sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!settingsStore.topNav" />
<top-nav id="topmenu-container" class="topmenu-container" v-if="settingsStore.topNav" />
<hamburger
id="hamburger-container"
:is-active="appStore.sidebar.opened"
class="hamburger-container"
@toggleClick="toggleSideBar"
/>
<breadcrumb
id="breadcrumb-container"
class="breadcrumb-container"
v-if="!settingsStore.topNav"
/>
<top-nav
id="topmenu-container"
class="topmenu-container"
v-if="settingsStore.topNav"
/>
<div class="right-menu">
<template v-if="appStore.device !== 'mobile'">
<header-search id="header-search" class="right-menu-item" />
<el-tooltip content="源码地址" effect="dark" placement="bottom">
<ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />
</el-tooltip>
<el-tooltip content="文档地址" effect="dark" placement="bottom">
<ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" />
</el-tooltip>
<screenfull id="screenfull" class="right-menu-item hover-effect" />
<el-tooltip content="布局大小" effect="dark" placement="bottom">
<size-select id="size-select" class="right-menu-item hover-effect" />
</el-tooltip>
</template>
<div class="avatar-container">
<el-dropdown @command="handleCommand" class="right-menu-item hover-effect" trigger="click">
<el-dropdown
@command="handleCommand"
class="right-menu-item hover-effect"
trigger="click"
>
<div class="avatar-wrapper">
<img :src="userStore.avatar" class="user-avatar" />
<el-icon><caret-bottom /></el-icon>
... ... @@ -48,25 +53,22 @@
</template>
<script setup>
import { ElMessageBox } from 'element-plus'
import Breadcrumb from '@/components/Breadcrumb'
import TopNav from '@/components/TopNav'
import Hamburger from '@/components/Hamburger'
import Screenfull from '@/components/Screenfull'
import SizeSelect from '@/components/SizeSelect'
import HeaderSearch from '@/components/HeaderSearch'
import RuoYiGit from '@/components/RuoYi/Git'
import RuoYiDoc from '@/components/RuoYi/Doc'
import useAppStore from '@/store/modules/app'
import useUserStore from '@/store/modules/user'
import useSettingsStore from '@/store/modules/settings'
const appStore = useAppStore()
const userStore = useUserStore()
const settingsStore = useSettingsStore()
import { ElMessageBox } from "element-plus";
import Breadcrumb from "@/components/Breadcrumb";
import TopNav from "@/components/TopNav";
import Hamburger from "@/components/Hamburger";
import Screenfull from "@/components/Screenfull";
import HeaderSearch from "@/components/HeaderSearch";
import useAppStore from "@/store/modules/app";
import useUserStore from "@/store/modules/user";
import useSettingsStore from "@/store/modules/settings";
const appStore = useAppStore();
const userStore = useUserStore();
const settingsStore = useSettingsStore();
function toggleSideBar() {
appStore.toggleSideBar()
appStore.toggleSideBar();
}
function handleCommand(command) {
... ... @@ -83,24 +85,26 @@ function handleCommand(command) {
}
function logout() {
ElMessageBox.confirm('确定注销并退出系统吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
userStore.logOut().then(() => {
location.href = '/index';
ElMessageBox.confirm("确定注销并退出系统吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
userStore.logOut().then(() => {
location.href = "/index";
});
})
}).catch(() => { });
.catch(() => {});
}
const emits = defineEmits(['setLayout'])
const emits = defineEmits(["setLayout"]);
function setLayout() {
emits('setLayout');
emits("setLayout");
}
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.navbar {
height: 50px;
overflow: hidden;
... ...
<template>
<div>承保公司名单</div>
<div class="app-container">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="Plus"
v-hasPermi="['system:role:add']"
@click="handleAdd"
>新增</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="Delete"
v-hasPermi="['system:role:remove']"
>删除</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
v-hasPermi="['system:role:export']"
>导出</el-button
>
</el-col>
</el-row>
<!-- 表格数据 -->
<el-table
v-loading="loading"
:data="rulesList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column
label="序号"
prop="companyId"
width="120"
align="center"
/>
<el-table-column label="承保公司名称" prop="company" align="center" />
<el-table-column
label="操作"
align="center"
fixed="right"
width="180"
prop="Feedback"
>
<template #default>
<el-button type="danger">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改用户配置对话框 -->
<el-dialog :title="title" v-model="open" width="600px" append-to-body>
<el-form :model="form" :rules="rules" ref="rulesRef" label-width="80px">
<el-form-item label="公司名称" prop="company">
<el-input
v-model="form.company"
placeholder="请输入保险公司名称"
maxlength="30"
/>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script>
export default {};
<script setup>
const { proxy } = getCurrentInstance();
const loading = ref(false);
const total = ref(3);
const title = ref("添加分配规则");
const open = ref(false);
const queryParams = reactive({
pageNum: 1,
pageSize: 10,
});
const form = reactive({});
const rules = {
company: [
{ required: true, message: "公司名称不能为空", trigger: "blur" },
{
min: 2,
max: 20,
message: "公司名称长度必须介于 2 和 20 之间",
trigger: "blur",
},
],
};
const rulesList = ref([
{ companyId: 1, company: "平安银行" },
{ companyId: 2, company: "太平洋保险" },
{ companyId: 3, company: "北部湾保险" },
]);
/** 新增按钮操作 */
function handleAdd() {
reset();
open.value = true;
title.value = "添加规则";
}
/** 重置操作表单 */
function reset() {
form.value = {
companyId: undefined,
company: undefined,
};
proxy.resetForm("rulesRef");
}
/** 多选框选中数据 */
function handleSelectionChange(selection) {
// ids.value = selection.map(item => item.roleId);
// single.value = selection.length != 1;
// multiple.value = !selection.length;
console.log(selection);
}
const getList = () => {};
/** 提交按钮 */
function submitForm() {
proxy.$refs["rulesRef"].validate((valid) => {
if (valid) {
if (form.value.userId != undefined) {
proxy.$modal.msgSuccess("修改成功");
open.value = false;
} else {
proxy.$modal.msgSuccess("新增成功");
open.value = false;
}
}
});
}
/** 取消按钮 */
function cancel() {
open.value = false;
reset();
}
</script>
<style></style>
... ...
<template>
<div>配置规则</div>
<div class="app-container">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="Plus"
v-hasPermi="['system:role:add']"
@click="handleAdd"
>新增</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
v-hasPermi="['system:role:export']"
>导出</el-button
>
</el-col>
</el-row>
<!-- 表格数据 -->
<el-table
v-loading="loading"
:data="rulesList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column
label="序号"
prop="companyId"
width="120"
align="center"
/>
<el-table-column label="保险公司名称" prop="company" align="center" />
<el-table-column
label="周分配订单"
width="240"
align="center"
prop="orderNum"
>
<template #default="{ row }">
<el-input v-model="row.orderNum" type="number" />
</template>
</el-table-column>
<el-table-column
label="操作"
align="center"
fixed="right"
width="180"
prop="Feedback"
>
<template #default>
<el-button type="primary">保存</el-button>
<el-button type="danger">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改用户配置对话框 -->
<el-dialog :title="title" v-model="open" width="600px" append-to-body>
<el-form :model="form" :rules="rules" ref="rulesRef" label-width="80px">
<el-form-item label="公司名称" prop="company">
<el-input
v-model="form.company"
placeholder="请输入保险公司名称"
maxlength="30"
/>
</el-form-item>
<el-form-item label="周分配量" prop="orderNum">
<el-input
v-model="form.orderNum"
type="number"
placeholder="请输入周分配订单量"
maxlength="30"
/>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script>
export default {};
<script setup>
const { proxy } = getCurrentInstance();
const loading = ref(false);
const total = ref(3);
const title = ref("添加分配规则");
const open = ref(false);
const queryParams = reactive({
pageNum: 1,
pageSize: 10,
});
const form = reactive({});
const rules = {
company: [
{ required: true, message: "公司名称不能为空", trigger: "blur" },
{
min: 2,
max: 20,
message: "公司名称长度必须介于 2 和 20 之间",
trigger: "blur",
},
],
orderNum: [{ required: true, message: "订单量不能为空", trigger: "blur" }],
};
const rulesList = ref([
{ companyId: 1, company: "平安银行", orderNum: 100 },
{ companyId: 2, company: "太平洋保险", orderNum: 200 },
{ companyId: 3, company: "北部湾保险", orderNum: 30 },
]);
/** 新增按钮操作 */
function handleAdd() {
reset();
open.value = true;
title.value = "添加规则";
}
/** 重置操作表单 */
function reset() {
form.value = {
companyId: undefined,
company: undefined,
orderNum: undefined,
};
proxy.resetForm("rulesRef");
}
/** 多选框选中数据 */
function handleSelectionChange(selection) {
// ids.value = selection.map(item => item.roleId);
// single.value = selection.length != 1;
// multiple.value = !selection.length;
console.log(selection);
}
const getList = () => {};
/** 提交按钮 */
function submitForm() {
proxy.$refs["rulesRef"].validate((valid) => {
if (valid) {
if (form.value.userId != undefined) {
proxy.$modal.msgSuccess("修改成功");
open.value = false;
} else {
proxy.$modal.msgSuccess("新增成功");
open.value = false;
}
}
});
}
/** 取消按钮 */
function cancel() {
open.value = false;
reset();
}
</script>
<style></style>
... ...
... ... @@ -47,6 +47,7 @@
<el-table-column label="操作" align="center" width="360" fixed="right">
<template #default="scope">
<el-popconfirm
width="2000"
title="是否通过该保单?"
confirm-button-text="确定"
cancel-button-text="取消"
... ...
<template>
<div>保单报表</div>
<div class="app-container">
<!-- 筛选条件 -->
<el-form
:model="queryParams"
ref="queryRef"
v-show="showSearch"
:inline="true"
label-width="68px"
>
<el-form-item label="分配机制" prop="assignment">
<el-select
v-model="queryParams.assignment"
placeholder="系统分配"
clearable
style="width: 220px"
>
<el-option
v-for="dict in options"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="操作人员" prop="editAuth">
<el-input
v-model="queryParams.editAuth"
placeholder="填写操作人员"
clearable
style="width: 220px"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="承保公司" prop="company">
<el-input
v-model="queryParams.company"
placeholder="请输入承保公司"
clearable
style="width: 220px"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="承接人" prop="handler">
<el-input
v-model="queryParams.handler"
placeholder="请输入承接人"
clearable
style="width: 220px"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="保单状态" prop="status">
<el-select
v-model="queryParams.status"
placeholder="选择进度"
clearable
style="width: 220px"
>
<el-option
v-for="dict in statusOption"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="保单进度" prop="progress">
<el-select
v-model="queryParams.progress"
placeholder="选择进度"
clearable
style="width: 220px"
>
<el-option
v-for="dict in progressOption"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="车主" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入车主"
clearable
style="width: 200px"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="车牌号" prop="carNum">
<el-input
v-model="queryParams.carNum"
placeholder="请输入车牌号"
clearable
style="width: 200px"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery"
>查询</el-button
>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<!-- 表格数据 -->
<el-table
v-loading="loading"
:data="policyList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column
label="序号"
prop="policyId"
width="120"
align="center"
/>
<el-table-column
label="登记时间"
prop="createTime"
width="150"
align="center"
/>
<el-table-column
label="车牌号"
prop="carNum"
width="150"
align="center"
/>
<el-table-column
label="车架号"
prop="frameNum"
width="240"
align="center"
/>
<el-table-column
label="车主姓名"
prop="name"
width="100"
align="center"
/>
<el-table-column
label="联系电话"
prop="phone"
width="180"
align="center"
/>
<el-table-column
label="操作时间"
prop="authTime"
width="150"
align="center"
/>
<el-table-column
label="操作人员"
prop="editAuth"
width="120"
align="center"
/>
<el-table-column
align="center"
label="分配机制"
width="120"
prop="assignment"
>
<template #default="scope">
<span>{{ scope.row.progress === 0 ? "系统分配" : "人工分配" }}</span>
</template>
</el-table-column>
<el-table-column
label="承保公司"
prop="company"
width="150"
align="center"
/>
<el-table-column
label="办理人"
prop="handler"
width="100"
align="center"
/>
<el-table-column label="保单进度" width="100" prop="progress">
<template #default="scope">
<span
:style="{ color: scope.row.progress === 0 ? '#409EFF' : '#67C23A' }"
>{{ scope.row.progress === 0 ? "待承接" : "已承接" }}</span
>
</template>
</el-table-column>
<el-table-column label="保单状态" width="100" prop="statue">
<template #default="scope">
<span
:style="{ color: scope.row.status === 0 ? '#409EFF' : '#67C23A' }"
>{{ scope.row.status === 0 ? "疑难件" : "已办结" }}</span
>
</template>
</el-table-column>
<el-table-column
label="查询回馈"
fixed="right"
width="100"
prop="Feedback"
>
<template #default>
<el-button type="primary">查阅</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
export default {};
<script setup>
const { proxy } = getCurrentInstance();
const loading = ref(false);
const total = ref(5);
const showSearch = ref(true);
const queryParams = reactive({
pageNum: 1,
pageSize: 10,
name: "",
carNum: "",
editAuth: "",
assignment: "",
progress: "",
company: "",
handler: "",
status: "",
});
const statusOption = ref([
{
value: 0,
label: "疑难件",
},
{
value: 1,
label: "已办结",
},
]);
const progressOption = ref([
{
value: 0,
label: "待承接",
},
{
value: 1,
label: "已承接",
},
]);
const options = [
{
value: 0,
label: "系统分配",
},
{
value: 1,
label: "人工分配",
},
];
const policyList = ref([
{
policyId: 1,
createTime: "2024-01-01",
carNum: "桂A 1234",
frameNum: "123456789012345678",
name: "张三",
phone: "12345678901",
company: "中国平安",
editAuth: "管理员",
authTime: "2024-01-01",
assignment: 0,
handler: "张三",
progress: 0,
status: 0,
},
{
policyId: 2,
createTime: "2024-01-02",
carNum: "粤B 1234",
frameNum: "123456789012345678",
name: "李四",
phone: "12345678902",
company: "中国平安",
editAuth: "管理员",
authTime: "2024-01-01",
assignment: 0,
handler: "张三",
progress: 0,
status: 1,
},
{
policyId: 3,
createTime: "2024-01-03",
carNum: "粤C 1234",
frameNum: "123456789012345678",
name: "王五",
phone: "12345678903",
company: "中国平安",
editAuth: "管理员",
authTime: "2024-01-01",
assignment: 0,
handler: "张三",
progress: 0,
status: 0,
},
{
policyId: 4,
createTime: "2024-01-04",
carNum: "粤D 1234",
frameNum: "123456789012345678",
name: "赵六",
phone: "12345678904",
company: "中国平安",
editAuth: "管理员",
authTime: "2024-01-01",
assignment: 1,
handler: "张三",
progress: 1,
status: 0,
},
{
policyId: 5,
createTime: "2024-01-05",
carNum: "粤E 1234",
frameNum: "123456789012345678",
name: "孙七",
phone: "12345678905",
company: "中国平安",
editAuth: "管理员",
authTime: "2024-01-01",
assignment: 1,
handler: "张三",
progress: 1,
status: 1,
},
]);
/** 多选框选中数据 */
function handleSelectionChange(selection) {
// ids.value = selection.map(item => item.roleId);
// single.value = selection.length != 1;
// multiple.value = !selection.length;
console.log(selection);
}
const getList = () => {};
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.pageNum = 1;
getList();
}
/** 重置按钮操作 */
function resetQuery() {
proxy.resetForm("queryRef");
handleQuery();
}
</script>
<style></style>
... ...
... ... @@ -5,7 +5,7 @@ import createVitePlugins from './vite/plugins'
// https://vitejs.dev/config/
export default defineConfig(({ mode, command }) => {
const env = loadEnv(mode, process.cwd())
const { VITE_APP_ENV } = env
const { VITE_APP_ENV, VITE_APP_TAB_URL_PREFIX } = env
return {
// 部署生产环境和开发环境下的URL。
// 默认情况下,vite 会假设你的应用是被部署在一个域名的根路径上
... ... @@ -31,7 +31,7 @@ export default defineConfig(({ mode, command }) => {
proxy: {
// https://cn.vitejs.dev/config/#server-proxy
'/dev-api': {
target: 'https://bxhd.crgx.net/',
target: VITE_APP_TAB_URL_PREFIX,
changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api/, '')
}
... ...