正在显示
12 个修改的文件
包含
829 行增加
和
183 行删除
| @@ -3,13 +3,19 @@ | @@ -3,13 +3,19 @@ | ||
| 3 | </template> | 3 | </template> |
| 4 | 4 | ||
| 5 | <script setup> | 5 | <script setup> |
| 6 | -import useSettingsStore from '@/store/modules/settings' | ||
| 7 | -import { handleThemeStyle } from '@/utils/theme' | 6 | +import useSettingsStore from "@/store/modules/settings"; |
| 7 | +import { handleThemeStyle } from "@/utils/theme"; | ||
| 8 | 8 | ||
| 9 | onMounted(() => { | 9 | onMounted(() => { |
| 10 | nextTick(() => { | 10 | nextTick(() => { |
| 11 | // 初始化主题样式 | 11 | // 初始化主题样式 |
| 12 | - handleThemeStyle(useSettingsStore().theme) | ||
| 13 | - }) | ||
| 14 | -}) | 12 | + handleThemeStyle(useSettingsStore().theme); |
| 13 | + }); | ||
| 14 | +}); | ||
| 15 | </script> | 15 | </script> |
| 16 | + | ||
| 17 | +<style> | ||
| 18 | +input::-webkit-inner-spin-button { | ||
| 19 | + -webkit-appearance: none !important; | ||
| 20 | +} | ||
| 21 | +</style> |
| 1 | -<?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> | ||
| 1 | +<?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> |
| 1 | <template> | 1 | <template> |
| 2 | - <div :class="{ 'show': show }" class="header-search"> | ||
| 3 | - <svg-icon class-name="search-icon" icon-class="search" @click.stop="click" /> | 2 | + <div :class="{ show: show }" class="header-search"> |
| 3 | + <svg-icon | ||
| 4 | + class-name="search-icon" | ||
| 5 | + icon-class="search" | ||
| 6 | + @click.stop="click" | ||
| 7 | + /> | ||
| 4 | <el-select | 8 | <el-select |
| 5 | ref="headerSearchSelectRef" | 9 | ref="headerSearchSelectRef" |
| 6 | v-model="search" | 10 | v-model="search" |
| @@ -8,22 +12,27 @@ | @@ -8,22 +12,27 @@ | ||
| 8 | filterable | 12 | filterable |
| 9 | default-first-option | 13 | default-first-option |
| 10 | remote | 14 | remote |
| 11 | - placeholder="Search" | 15 | + placeholder="输入组件名称 例:用户管理" |
| 12 | class="header-search-select" | 16 | class="header-search-select" |
| 13 | @change="change" | 17 | @change="change" |
| 14 | > | 18 | > |
| 15 | - <el-option v-for="option in options" :key="option.item.path" :value="option.item" :label="option.item.title.join(' > ')" /> | 19 | + <el-option |
| 20 | + v-for="option in options" | ||
| 21 | + :key="option.item.path" | ||
| 22 | + :value="option.item" | ||
| 23 | + :label="option.item.title.join(' > ')" | ||
| 24 | + /> | ||
| 16 | </el-select> | 25 | </el-select> |
| 17 | </div> | 26 | </div> |
| 18 | </template> | 27 | </template> |
| 19 | 28 | ||
| 20 | <script setup> | 29 | <script setup> |
| 21 | -import Fuse from 'fuse.js' | ||
| 22 | -import { getNormalPath } from '@/utils/ruoyi' | ||
| 23 | -import { isHttp } from '@/utils/validate' | ||
| 24 | -import usePermissionStore from '@/store/modules/permission' | 30 | +import Fuse from "fuse.js"; |
| 31 | +import { getNormalPath } from "@/utils/ruoyi"; | ||
| 32 | +import { isHttp } from "@/utils/validate"; | ||
| 33 | +import usePermissionStore from "@/store/modules/permission"; | ||
| 25 | 34 | ||
| 26 | -const search = ref(''); | 35 | +const search = ref(""); |
| 27 | const options = ref([]); | 36 | const options = ref([]); |
| 28 | const searchPool = ref([]); | 37 | const searchPool = ref([]); |
| 29 | const show = ref(false); | 38 | const show = ref(false); |
| @@ -33,15 +42,15 @@ const router = useRouter(); | @@ -33,15 +42,15 @@ const router = useRouter(); | ||
| 33 | const routes = computed(() => usePermissionStore().routes); | 42 | const routes = computed(() => usePermissionStore().routes); |
| 34 | 43 | ||
| 35 | function click() { | 44 | function click() { |
| 36 | - show.value = !show.value | 45 | + show.value = !show.value; |
| 37 | if (show.value) { | 46 | if (show.value) { |
| 38 | - headerSearchSelectRef.value && headerSearchSelectRef.value.focus() | 47 | + headerSearchSelectRef.value && headerSearchSelectRef.value.focus(); |
| 39 | } | 48 | } |
| 40 | -}; | 49 | +} |
| 41 | function close() { | 50 | function close() { |
| 42 | - headerSearchSelectRef.value && headerSearchSelectRef.value.blur() | ||
| 43 | - options.value = [] | ||
| 44 | - show.value = false | 51 | + headerSearchSelectRef.value && headerSearchSelectRef.value.blur(); |
| 52 | + options.value = []; | ||
| 53 | + show.value = false; | ||
| 45 | } | 54 | } |
| 46 | function change(val) { | 55 | function change(val) { |
| 47 | const path = val.path; | 56 | const path = val.path; |
| @@ -50,14 +59,14 @@ function change(val) { | @@ -50,14 +59,14 @@ function change(val) { | ||
| 50 | const pindex = path.indexOf("http"); | 59 | const pindex = path.indexOf("http"); |
| 51 | window.open(path.substr(pindex, path.length), "_blank"); | 60 | window.open(path.substr(pindex, path.length), "_blank"); |
| 52 | } else { | 61 | } else { |
| 53 | - router.push(path) | 62 | + router.push(path); |
| 54 | } | 63 | } |
| 55 | 64 | ||
| 56 | - search.value = '' | ||
| 57 | - options.value = [] | 65 | + search.value = ""; |
| 66 | + options.value = []; | ||
| 58 | nextTick(() => { | 67 | nextTick(() => { |
| 59 | - show.value = false | ||
| 60 | - }) | 68 | + show.value = false; |
| 69 | + }); | ||
| 61 | } | 70 | } |
| 62 | function initFuse(list) { | 71 | function initFuse(list) { |
| 63 | fuse.value = new Fuse(list, { | 72 | fuse.value = new Fuse(list, { |
| @@ -67,79 +76,84 @@ function initFuse(list) { | @@ -67,79 +76,84 @@ function initFuse(list) { | ||
| 67 | distance: 100, | 76 | distance: 100, |
| 68 | maxPatternLength: 32, | 77 | maxPatternLength: 32, |
| 69 | minMatchCharLength: 1, | 78 | minMatchCharLength: 1, |
| 70 | - keys: [{ | ||
| 71 | - name: 'title', | ||
| 72 | - weight: 0.7 | ||
| 73 | - }, { | ||
| 74 | - name: 'path', | ||
| 75 | - weight: 0.3 | ||
| 76 | - }] | ||
| 77 | - }) | 79 | + keys: [ |
| 80 | + { | ||
| 81 | + name: "title", | ||
| 82 | + weight: 0.7, | ||
| 83 | + }, | ||
| 84 | + { | ||
| 85 | + name: "path", | ||
| 86 | + weight: 0.3, | ||
| 87 | + }, | ||
| 88 | + ], | ||
| 89 | + }); | ||
| 78 | } | 90 | } |
| 79 | // Filter out the routes that can be displayed in the sidebar | 91 | // Filter out the routes that can be displayed in the sidebar |
| 80 | // And generate the internationalized title | 92 | // And generate the internationalized title |
| 81 | -function generateRoutes(routes, basePath = '', prefixTitle = []) { | ||
| 82 | - let res = [] | 93 | +function generateRoutes(routes, basePath = "", prefixTitle = []) { |
| 94 | + let res = []; | ||
| 83 | 95 | ||
| 84 | for (const r of routes) { | 96 | for (const r of routes) { |
| 85 | // skip hidden router | 97 | // skip hidden router |
| 86 | - if (r.hidden) { continue } | ||
| 87 | - const p = r.path.length > 0 && r.path[0] === '/' ? r.path : '/' + r.path; | 98 | + if (r.hidden) { |
| 99 | + continue; | ||
| 100 | + } | ||
| 101 | + const p = r.path.length > 0 && r.path[0] === "/" ? r.path : "/" + r.path; | ||
| 88 | const data = { | 102 | const data = { |
| 89 | path: !isHttp(r.path) ? getNormalPath(basePath + p) : r.path, | 103 | path: !isHttp(r.path) ? getNormalPath(basePath + p) : r.path, |
| 90 | - title: [...prefixTitle] | ||
| 91 | - } | 104 | + title: [...prefixTitle], |
| 105 | + }; | ||
| 92 | 106 | ||
| 93 | if (r.meta && r.meta.title) { | 107 | if (r.meta && r.meta.title) { |
| 94 | - data.title = [...data.title, r.meta.title] | 108 | + data.title = [...data.title, r.meta.title]; |
| 95 | 109 | ||
| 96 | - if (r.redirect !== 'noRedirect') { | 110 | + if (r.redirect !== "noRedirect") { |
| 97 | // only push the routes with title | 111 | // only push the routes with title |
| 98 | // special case: need to exclude parent router without redirect | 112 | // special case: need to exclude parent router without redirect |
| 99 | - res.push(data) | 113 | + res.push(data); |
| 100 | } | 114 | } |
| 101 | } | 115 | } |
| 102 | 116 | ||
| 103 | // recursive child routes | 117 | // recursive child routes |
| 104 | if (r.children) { | 118 | if (r.children) { |
| 105 | - const tempRoutes = generateRoutes(r.children, data.path, data.title) | 119 | + const tempRoutes = generateRoutes(r.children, data.path, data.title); |
| 106 | if (tempRoutes.length >= 1) { | 120 | if (tempRoutes.length >= 1) { |
| 107 | - res = [...res, ...tempRoutes] | 121 | + res = [...res, ...tempRoutes]; |
| 108 | } | 122 | } |
| 109 | } | 123 | } |
| 110 | } | 124 | } |
| 111 | - return res | 125 | + return res; |
| 112 | } | 126 | } |
| 113 | function querySearch(query) { | 127 | function querySearch(query) { |
| 114 | - if (query !== '') { | ||
| 115 | - options.value = fuse.value.search(query) | 128 | + if (query !== "") { |
| 129 | + options.value = fuse.value.search(query); | ||
| 116 | } else { | 130 | } else { |
| 117 | - options.value = [] | 131 | + options.value = []; |
| 118 | } | 132 | } |
| 119 | } | 133 | } |
| 120 | 134 | ||
| 121 | onMounted(() => { | 135 | onMounted(() => { |
| 122 | searchPool.value = generateRoutes(routes.value); | 136 | searchPool.value = generateRoutes(routes.value); |
| 123 | -}) | 137 | +}); |
| 124 | 138 | ||
| 125 | watchEffect(() => { | 139 | watchEffect(() => { |
| 126 | - searchPool.value = generateRoutes(routes.value) | ||
| 127 | -}) | 140 | + searchPool.value = generateRoutes(routes.value); |
| 141 | +}); | ||
| 128 | 142 | ||
| 129 | watch(show, (value) => { | 143 | watch(show, (value) => { |
| 130 | if (value) { | 144 | if (value) { |
| 131 | - document.body.addEventListener('click', close) | 145 | + document.body.addEventListener("click", close); |
| 132 | } else { | 146 | } else { |
| 133 | - document.body.removeEventListener('click', close) | 147 | + document.body.removeEventListener("click", close); |
| 134 | } | 148 | } |
| 135 | -}) | 149 | +}); |
| 136 | 150 | ||
| 137 | watch(searchPool, (list) => { | 151 | watch(searchPool, (list) => { |
| 138 | - initFuse(list) | ||
| 139 | -}) | 152 | + initFuse(list); |
| 153 | +}); | ||
| 140 | </script> | 154 | </script> |
| 141 | 155 | ||
| 142 | -<style lang='scss' scoped> | 156 | +<style lang="scss" scoped> |
| 143 | .header-search { | 157 | .header-search { |
| 144 | font-size: 0 !important; | 158 | font-size: 0 !important; |
| 145 | 159 |
src/components/RuoYi/Doc/index.vue
已删除
100644 → 0
src/components/RuoYi/Git/index.vue
已删除
100644 → 0
src/components/SizeSelect/index.vue
已删除
100644 → 0
| 1 | -<template> | ||
| 2 | - <div> | ||
| 3 | - <el-dropdown trigger="click" @command="handleSetSize"> | ||
| 4 | - <div class="size-icon--style"> | ||
| 5 | - <svg-icon class-name="size-icon" icon-class="size" /> | ||
| 6 | - </div> | ||
| 7 | - <template #dropdown> | ||
| 8 | - <el-dropdown-menu> | ||
| 9 | - <el-dropdown-item v-for="item of sizeOptions" :key="item.value" :disabled="size === item.value" :command="item.value"> | ||
| 10 | - {{ item.label }} | ||
| 11 | - </el-dropdown-item> | ||
| 12 | - </el-dropdown-menu> | ||
| 13 | - </template> | ||
| 14 | - </el-dropdown> | ||
| 15 | - </div> | ||
| 16 | -</template> | ||
| 17 | - | ||
| 18 | -<script setup> | ||
| 19 | -import useAppStore from "@/store/modules/app"; | ||
| 20 | - | ||
| 21 | -const appStore = useAppStore(); | ||
| 22 | -const size = computed(() => appStore.size); | ||
| 23 | -const route = useRoute(); | ||
| 24 | -const router = useRouter(); | ||
| 25 | -const { proxy } = getCurrentInstance(); | ||
| 26 | -const sizeOptions = ref([ | ||
| 27 | - { label: "较大", value: "large" }, | ||
| 28 | - { label: "默认", value: "default" }, | ||
| 29 | - { label: "稍小", value: "small" }, | ||
| 30 | -]); | ||
| 31 | - | ||
| 32 | -function handleSetSize(size) { | ||
| 33 | - proxy.$modal.loading("正在设置布局大小,请稍候..."); | ||
| 34 | - appStore.setSize(size); | ||
| 35 | - setTimeout("window.location.reload()", 1000); | ||
| 36 | -} | ||
| 37 | -</script> | ||
| 38 | - | ||
| 39 | -<style lang='scss' scoped> | ||
| 40 | -.size-icon--style { | ||
| 41 | - font-size: 18px; | ||
| 42 | - line-height: 50px; | ||
| 43 | - padding-right: 7px; | ||
| 44 | -} | ||
| 45 | -</style> |
| 1 | <template> | 1 | <template> |
| 2 | <div class="navbar"> | 2 | <div class="navbar"> |
| 3 | - <hamburger id="hamburger-container" :is-active="appStore.sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" /> | ||
| 4 | - <breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!settingsStore.topNav" /> | ||
| 5 | - <top-nav id="topmenu-container" class="topmenu-container" v-if="settingsStore.topNav" /> | 3 | + <hamburger |
| 4 | + id="hamburger-container" | ||
| 5 | + :is-active="appStore.sidebar.opened" | ||
| 6 | + class="hamburger-container" | ||
| 7 | + @toggleClick="toggleSideBar" | ||
| 8 | + /> | ||
| 9 | + <breadcrumb | ||
| 10 | + id="breadcrumb-container" | ||
| 11 | + class="breadcrumb-container" | ||
| 12 | + v-if="!settingsStore.topNav" | ||
| 13 | + /> | ||
| 14 | + <top-nav | ||
| 15 | + id="topmenu-container" | ||
| 16 | + class="topmenu-container" | ||
| 17 | + v-if="settingsStore.topNav" | ||
| 18 | + /> | ||
| 6 | 19 | ||
| 7 | <div class="right-menu"> | 20 | <div class="right-menu"> |
| 8 | <template v-if="appStore.device !== 'mobile'"> | 21 | <template v-if="appStore.device !== 'mobile'"> |
| 9 | <header-search id="header-search" class="right-menu-item" /> | 22 | <header-search id="header-search" class="right-menu-item" /> |
| 10 | 23 | ||
| 11 | - <el-tooltip content="源码地址" effect="dark" placement="bottom"> | ||
| 12 | - <ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" /> | ||
| 13 | - </el-tooltip> | ||
| 14 | - | ||
| 15 | - <el-tooltip content="文档地址" effect="dark" placement="bottom"> | ||
| 16 | - <ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" /> | ||
| 17 | - </el-tooltip> | ||
| 18 | - | ||
| 19 | <screenfull id="screenfull" class="right-menu-item hover-effect" /> | 24 | <screenfull id="screenfull" class="right-menu-item hover-effect" /> |
| 20 | - | ||
| 21 | - <el-tooltip content="布局大小" effect="dark" placement="bottom"> | ||
| 22 | - <size-select id="size-select" class="right-menu-item hover-effect" /> | ||
| 23 | - </el-tooltip> | ||
| 24 | </template> | 25 | </template> |
| 25 | <div class="avatar-container"> | 26 | <div class="avatar-container"> |
| 26 | - <el-dropdown @command="handleCommand" class="right-menu-item hover-effect" trigger="click"> | 27 | + <el-dropdown |
| 28 | + @command="handleCommand" | ||
| 29 | + class="right-menu-item hover-effect" | ||
| 30 | + trigger="click" | ||
| 31 | + > | ||
| 27 | <div class="avatar-wrapper"> | 32 | <div class="avatar-wrapper"> |
| 28 | <img :src="userStore.avatar" class="user-avatar" /> | 33 | <img :src="userStore.avatar" class="user-avatar" /> |
| 29 | <el-icon><caret-bottom /></el-icon> | 34 | <el-icon><caret-bottom /></el-icon> |
| @@ -48,25 +53,22 @@ | @@ -48,25 +53,22 @@ | ||
| 48 | </template> | 53 | </template> |
| 49 | 54 | ||
| 50 | <script setup> | 55 | <script setup> |
| 51 | -import { ElMessageBox } from 'element-plus' | ||
| 52 | -import Breadcrumb from '@/components/Breadcrumb' | ||
| 53 | -import TopNav from '@/components/TopNav' | ||
| 54 | -import Hamburger from '@/components/Hamburger' | ||
| 55 | -import Screenfull from '@/components/Screenfull' | ||
| 56 | -import SizeSelect from '@/components/SizeSelect' | ||
| 57 | -import HeaderSearch from '@/components/HeaderSearch' | ||
| 58 | -import RuoYiGit from '@/components/RuoYi/Git' | ||
| 59 | -import RuoYiDoc from '@/components/RuoYi/Doc' | ||
| 60 | -import useAppStore from '@/store/modules/app' | ||
| 61 | -import useUserStore from '@/store/modules/user' | ||
| 62 | -import useSettingsStore from '@/store/modules/settings' | ||
| 63 | - | ||
| 64 | -const appStore = useAppStore() | ||
| 65 | -const userStore = useUserStore() | ||
| 66 | -const settingsStore = useSettingsStore() | 56 | +import { ElMessageBox } from "element-plus"; |
| 57 | +import Breadcrumb from "@/components/Breadcrumb"; | ||
| 58 | +import TopNav from "@/components/TopNav"; | ||
| 59 | +import Hamburger from "@/components/Hamburger"; | ||
| 60 | +import Screenfull from "@/components/Screenfull"; | ||
| 61 | +import HeaderSearch from "@/components/HeaderSearch"; | ||
| 62 | +import useAppStore from "@/store/modules/app"; | ||
| 63 | +import useUserStore from "@/store/modules/user"; | ||
| 64 | +import useSettingsStore from "@/store/modules/settings"; | ||
| 65 | + | ||
| 66 | +const appStore = useAppStore(); | ||
| 67 | +const userStore = useUserStore(); | ||
| 68 | +const settingsStore = useSettingsStore(); | ||
| 67 | 69 | ||
| 68 | function toggleSideBar() { | 70 | function toggleSideBar() { |
| 69 | - appStore.toggleSideBar() | 71 | + appStore.toggleSideBar(); |
| 70 | } | 72 | } |
| 71 | 73 | ||
| 72 | function handleCommand(command) { | 74 | function handleCommand(command) { |
| @@ -83,24 +85,26 @@ function handleCommand(command) { | @@ -83,24 +85,26 @@ function handleCommand(command) { | ||
| 83 | } | 85 | } |
| 84 | 86 | ||
| 85 | function logout() { | 87 | function logout() { |
| 86 | - ElMessageBox.confirm('确定注销并退出系统吗?', '提示', { | ||
| 87 | - confirmButtonText: '确定', | ||
| 88 | - cancelButtonText: '取消', | ||
| 89 | - type: 'warning' | ||
| 90 | - }).then(() => { | 88 | + ElMessageBox.confirm("确定注销并退出系统吗?", "提示", { |
| 89 | + confirmButtonText: "确定", | ||
| 90 | + cancelButtonText: "取消", | ||
| 91 | + type: "warning", | ||
| 92 | + }) | ||
| 93 | + .then(() => { | ||
| 91 | userStore.logOut().then(() => { | 94 | userStore.logOut().then(() => { |
| 92 | - location.href = '/index'; | 95 | + location.href = "/index"; |
| 96 | + }); | ||
| 93 | }) | 97 | }) |
| 94 | - }).catch(() => { }); | 98 | + .catch(() => {}); |
| 95 | } | 99 | } |
| 96 | 100 | ||
| 97 | -const emits = defineEmits(['setLayout']) | 101 | +const emits = defineEmits(["setLayout"]); |
| 98 | function setLayout() { | 102 | function setLayout() { |
| 99 | - emits('setLayout'); | 103 | + emits("setLayout"); |
| 100 | } | 104 | } |
| 101 | </script> | 105 | </script> |
| 102 | 106 | ||
| 103 | -<style lang='scss' scoped> | 107 | +<style lang="scss" scoped> |
| 104 | .navbar { | 108 | .navbar { |
| 105 | height: 50px; | 109 | height: 50px; |
| 106 | overflow: hidden; | 110 | overflow: hidden; |
| 1 | <template> | 1 | <template> |
| 2 | - <div>承保公司名单</div> | 2 | + <div class="app-container"> |
| 3 | + <el-row :gutter="10" class="mb8"> | ||
| 4 | + <el-col :span="1.5"> | ||
| 5 | + <el-button | ||
| 6 | + type="primary" | ||
| 7 | + plain | ||
| 8 | + icon="Plus" | ||
| 9 | + v-hasPermi="['system:role:add']" | ||
| 10 | + @click="handleAdd" | ||
| 11 | + >新增</el-button | ||
| 12 | + > | ||
| 13 | + </el-col> | ||
| 14 | + <el-col :span="1.5"> | ||
| 15 | + <el-button | ||
| 16 | + type="danger" | ||
| 17 | + plain | ||
| 18 | + icon="Delete" | ||
| 19 | + v-hasPermi="['system:role:remove']" | ||
| 20 | + >删除</el-button | ||
| 21 | + > | ||
| 22 | + </el-col> | ||
| 23 | + <el-col :span="1.5"> | ||
| 24 | + <el-button | ||
| 25 | + type="warning" | ||
| 26 | + plain | ||
| 27 | + icon="Download" | ||
| 28 | + v-hasPermi="['system:role:export']" | ||
| 29 | + >导出</el-button | ||
| 30 | + > | ||
| 31 | + </el-col> | ||
| 32 | + </el-row> | ||
| 33 | + | ||
| 34 | + <!-- 表格数据 --> | ||
| 35 | + <el-table | ||
| 36 | + v-loading="loading" | ||
| 37 | + :data="rulesList" | ||
| 38 | + @selection-change="handleSelectionChange" | ||
| 39 | + > | ||
| 40 | + <el-table-column type="selection" width="55" align="center" /> | ||
| 41 | + <el-table-column | ||
| 42 | + label="序号" | ||
| 43 | + prop="companyId" | ||
| 44 | + width="120" | ||
| 45 | + align="center" | ||
| 46 | + /> | ||
| 47 | + <el-table-column label="承保公司名称" prop="company" align="center" /> | ||
| 48 | + <el-table-column | ||
| 49 | + label="操作" | ||
| 50 | + align="center" | ||
| 51 | + fixed="right" | ||
| 52 | + width="180" | ||
| 53 | + prop="Feedback" | ||
| 54 | + > | ||
| 55 | + <template #default> | ||
| 56 | + <el-button type="danger">删除</el-button> | ||
| 57 | + </template> | ||
| 58 | + </el-table-column> | ||
| 59 | + </el-table> | ||
| 60 | + | ||
| 61 | + <pagination | ||
| 62 | + v-show="total > 0" | ||
| 63 | + :total="total" | ||
| 64 | + v-model:page="queryParams.pageNum" | ||
| 65 | + v-model:limit="queryParams.pageSize" | ||
| 66 | + @pagination="getList" | ||
| 67 | + /> | ||
| 68 | + | ||
| 69 | + <!-- 添加或修改用户配置对话框 --> | ||
| 70 | + <el-dialog :title="title" v-model="open" width="600px" append-to-body> | ||
| 71 | + <el-form :model="form" :rules="rules" ref="rulesRef" label-width="80px"> | ||
| 72 | + <el-form-item label="公司名称" prop="company"> | ||
| 73 | + <el-input | ||
| 74 | + v-model="form.company" | ||
| 75 | + placeholder="请输入保险公司名称" | ||
| 76 | + maxlength="30" | ||
| 77 | + /> | ||
| 78 | + </el-form-item> | ||
| 79 | + </el-form> | ||
| 80 | + <template #footer> | ||
| 81 | + <div class="dialog-footer"> | ||
| 82 | + <el-button type="primary" @click="submitForm">确 定</el-button> | ||
| 83 | + <el-button @click="cancel">取 消</el-button> | ||
| 84 | + </div> | ||
| 85 | + </template> | ||
| 86 | + </el-dialog> | ||
| 87 | + </div> | ||
| 3 | </template> | 88 | </template> |
| 4 | 89 | ||
| 5 | -<script> | ||
| 6 | -export default {}; | 90 | +<script setup> |
| 91 | +const { proxy } = getCurrentInstance(); | ||
| 92 | +const loading = ref(false); | ||
| 93 | +const total = ref(3); | ||
| 94 | +const title = ref("添加分配规则"); | ||
| 95 | +const open = ref(false); | ||
| 96 | +const queryParams = reactive({ | ||
| 97 | + pageNum: 1, | ||
| 98 | + pageSize: 10, | ||
| 99 | +}); | ||
| 100 | + | ||
| 101 | +const form = reactive({}); | ||
| 102 | +const rules = { | ||
| 103 | + company: [ | ||
| 104 | + { required: true, message: "公司名称不能为空", trigger: "blur" }, | ||
| 105 | + { | ||
| 106 | + min: 2, | ||
| 107 | + max: 20, | ||
| 108 | + message: "公司名称长度必须介于 2 和 20 之间", | ||
| 109 | + trigger: "blur", | ||
| 110 | + }, | ||
| 111 | + ], | ||
| 112 | +}; | ||
| 113 | +const rulesList = ref([ | ||
| 114 | + { companyId: 1, company: "平安银行" }, | ||
| 115 | + { companyId: 2, company: "太平洋保险" }, | ||
| 116 | + { companyId: 3, company: "北部湾保险" }, | ||
| 117 | +]); | ||
| 118 | + | ||
| 119 | +/** 新增按钮操作 */ | ||
| 120 | +function handleAdd() { | ||
| 121 | + reset(); | ||
| 122 | + open.value = true; | ||
| 123 | + title.value = "添加规则"; | ||
| 124 | +} | ||
| 125 | + | ||
| 126 | +/** 重置操作表单 */ | ||
| 127 | +function reset() { | ||
| 128 | + form.value = { | ||
| 129 | + companyId: undefined, | ||
| 130 | + company: undefined, | ||
| 131 | + }; | ||
| 132 | + proxy.resetForm("rulesRef"); | ||
| 133 | +} | ||
| 134 | + | ||
| 135 | +/** 多选框选中数据 */ | ||
| 136 | +function handleSelectionChange(selection) { | ||
| 137 | + // ids.value = selection.map(item => item.roleId); | ||
| 138 | + // single.value = selection.length != 1; | ||
| 139 | + // multiple.value = !selection.length; | ||
| 140 | + console.log(selection); | ||
| 141 | +} | ||
| 142 | + | ||
| 143 | +const getList = () => {}; | ||
| 144 | + | ||
| 145 | +/** 提交按钮 */ | ||
| 146 | +function submitForm() { | ||
| 147 | + proxy.$refs["rulesRef"].validate((valid) => { | ||
| 148 | + if (valid) { | ||
| 149 | + if (form.value.userId != undefined) { | ||
| 150 | + proxy.$modal.msgSuccess("修改成功"); | ||
| 151 | + open.value = false; | ||
| 152 | + } else { | ||
| 153 | + proxy.$modal.msgSuccess("新增成功"); | ||
| 154 | + open.value = false; | ||
| 155 | + } | ||
| 156 | + } | ||
| 157 | + }); | ||
| 158 | +} | ||
| 159 | +/** 取消按钮 */ | ||
| 160 | +function cancel() { | ||
| 161 | + open.value = false; | ||
| 162 | + reset(); | ||
| 163 | +} | ||
| 7 | </script> | 164 | </script> |
| 8 | 165 | ||
| 9 | <style></style> | 166 | <style></style> |
| 1 | <template> | 1 | <template> |
| 2 | - <div>配置规则</div> | 2 | + <div class="app-container"> |
| 3 | + <el-row :gutter="10" class="mb8"> | ||
| 4 | + <el-col :span="1.5"> | ||
| 5 | + <el-button | ||
| 6 | + type="primary" | ||
| 7 | + plain | ||
| 8 | + icon="Plus" | ||
| 9 | + v-hasPermi="['system:role:add']" | ||
| 10 | + @click="handleAdd" | ||
| 11 | + >新增</el-button | ||
| 12 | + > | ||
| 13 | + </el-col> | ||
| 14 | + <el-col :span="1.5"> | ||
| 15 | + <el-button | ||
| 16 | + type="warning" | ||
| 17 | + plain | ||
| 18 | + icon="Download" | ||
| 19 | + v-hasPermi="['system:role:export']" | ||
| 20 | + >导出</el-button | ||
| 21 | + > | ||
| 22 | + </el-col> | ||
| 23 | + </el-row> | ||
| 24 | + | ||
| 25 | + <!-- 表格数据 --> | ||
| 26 | + <el-table | ||
| 27 | + v-loading="loading" | ||
| 28 | + :data="rulesList" | ||
| 29 | + @selection-change="handleSelectionChange" | ||
| 30 | + > | ||
| 31 | + <el-table-column type="selection" width="55" align="center" /> | ||
| 32 | + <el-table-column | ||
| 33 | + label="序号" | ||
| 34 | + prop="companyId" | ||
| 35 | + width="120" | ||
| 36 | + align="center" | ||
| 37 | + /> | ||
| 38 | + <el-table-column label="保险公司名称" prop="company" align="center" /> | ||
| 39 | + <el-table-column | ||
| 40 | + label="周分配订单" | ||
| 41 | + width="240" | ||
| 42 | + align="center" | ||
| 43 | + prop="orderNum" | ||
| 44 | + > | ||
| 45 | + <template #default="{ row }"> | ||
| 46 | + <el-input v-model="row.orderNum" type="number" /> | ||
| 47 | + </template> | ||
| 48 | + </el-table-column> | ||
| 49 | + <el-table-column | ||
| 50 | + label="操作" | ||
| 51 | + align="center" | ||
| 52 | + fixed="right" | ||
| 53 | + width="180" | ||
| 54 | + prop="Feedback" | ||
| 55 | + > | ||
| 56 | + <template #default> | ||
| 57 | + <el-button type="primary">保存</el-button> | ||
| 58 | + <el-button type="danger">删除</el-button> | ||
| 59 | + </template> | ||
| 60 | + </el-table-column> | ||
| 61 | + </el-table> | ||
| 62 | + | ||
| 63 | + <pagination | ||
| 64 | + v-show="total > 0" | ||
| 65 | + :total="total" | ||
| 66 | + v-model:page="queryParams.pageNum" | ||
| 67 | + v-model:limit="queryParams.pageSize" | ||
| 68 | + @pagination="getList" | ||
| 69 | + /> | ||
| 70 | + | ||
| 71 | + <!-- 添加或修改用户配置对话框 --> | ||
| 72 | + <el-dialog :title="title" v-model="open" width="600px" append-to-body> | ||
| 73 | + <el-form :model="form" :rules="rules" ref="rulesRef" label-width="80px"> | ||
| 74 | + <el-form-item label="公司名称" prop="company"> | ||
| 75 | + <el-input | ||
| 76 | + v-model="form.company" | ||
| 77 | + placeholder="请输入保险公司名称" | ||
| 78 | + maxlength="30" | ||
| 79 | + /> | ||
| 80 | + </el-form-item> | ||
| 81 | + <el-form-item label="周分配量" prop="orderNum"> | ||
| 82 | + <el-input | ||
| 83 | + v-model="form.orderNum" | ||
| 84 | + type="number" | ||
| 85 | + placeholder="请输入周分配订单量" | ||
| 86 | + maxlength="30" | ||
| 87 | + /> | ||
| 88 | + </el-form-item> | ||
| 89 | + </el-form> | ||
| 90 | + <template #footer> | ||
| 91 | + <div class="dialog-footer"> | ||
| 92 | + <el-button type="primary" @click="submitForm">确 定</el-button> | ||
| 93 | + <el-button @click="cancel">取 消</el-button> | ||
| 94 | + </div> | ||
| 95 | + </template> | ||
| 96 | + </el-dialog> | ||
| 97 | + </div> | ||
| 3 | </template> | 98 | </template> |
| 4 | 99 | ||
| 5 | -<script> | ||
| 6 | -export default {}; | 100 | +<script setup> |
| 101 | +const { proxy } = getCurrentInstance(); | ||
| 102 | +const loading = ref(false); | ||
| 103 | +const total = ref(3); | ||
| 104 | +const title = ref("添加分配规则"); | ||
| 105 | +const open = ref(false); | ||
| 106 | +const queryParams = reactive({ | ||
| 107 | + pageNum: 1, | ||
| 108 | + pageSize: 10, | ||
| 109 | +}); | ||
| 110 | + | ||
| 111 | +const form = reactive({}); | ||
| 112 | +const rules = { | ||
| 113 | + company: [ | ||
| 114 | + { required: true, message: "公司名称不能为空", trigger: "blur" }, | ||
| 115 | + { | ||
| 116 | + min: 2, | ||
| 117 | + max: 20, | ||
| 118 | + message: "公司名称长度必须介于 2 和 20 之间", | ||
| 119 | + trigger: "blur", | ||
| 120 | + }, | ||
| 121 | + ], | ||
| 122 | + orderNum: [{ required: true, message: "订单量不能为空", trigger: "blur" }], | ||
| 123 | +}; | ||
| 124 | +const rulesList = ref([ | ||
| 125 | + { companyId: 1, company: "平安银行", orderNum: 100 }, | ||
| 126 | + { companyId: 2, company: "太平洋保险", orderNum: 200 }, | ||
| 127 | + { companyId: 3, company: "北部湾保险", orderNum: 30 }, | ||
| 128 | +]); | ||
| 129 | + | ||
| 130 | +/** 新增按钮操作 */ | ||
| 131 | +function handleAdd() { | ||
| 132 | + reset(); | ||
| 133 | + open.value = true; | ||
| 134 | + title.value = "添加规则"; | ||
| 135 | +} | ||
| 136 | + | ||
| 137 | +/** 重置操作表单 */ | ||
| 138 | +function reset() { | ||
| 139 | + form.value = { | ||
| 140 | + companyId: undefined, | ||
| 141 | + company: undefined, | ||
| 142 | + orderNum: undefined, | ||
| 143 | + }; | ||
| 144 | + proxy.resetForm("rulesRef"); | ||
| 145 | +} | ||
| 146 | + | ||
| 147 | +/** 多选框选中数据 */ | ||
| 148 | +function handleSelectionChange(selection) { | ||
| 149 | + // ids.value = selection.map(item => item.roleId); | ||
| 150 | + // single.value = selection.length != 1; | ||
| 151 | + // multiple.value = !selection.length; | ||
| 152 | + console.log(selection); | ||
| 153 | +} | ||
| 154 | + | ||
| 155 | +const getList = () => {}; | ||
| 156 | + | ||
| 157 | +/** 提交按钮 */ | ||
| 158 | +function submitForm() { | ||
| 159 | + proxy.$refs["rulesRef"].validate((valid) => { | ||
| 160 | + if (valid) { | ||
| 161 | + if (form.value.userId != undefined) { | ||
| 162 | + proxy.$modal.msgSuccess("修改成功"); | ||
| 163 | + open.value = false; | ||
| 164 | + } else { | ||
| 165 | + proxy.$modal.msgSuccess("新增成功"); | ||
| 166 | + open.value = false; | ||
| 167 | + } | ||
| 168 | + } | ||
| 169 | + }); | ||
| 170 | +} | ||
| 171 | +/** 取消按钮 */ | ||
| 172 | +function cancel() { | ||
| 173 | + open.value = false; | ||
| 174 | + reset(); | ||
| 175 | +} | ||
| 7 | </script> | 176 | </script> |
| 8 | 177 | ||
| 9 | <style></style> | 178 | <style></style> |
| @@ -47,6 +47,7 @@ | @@ -47,6 +47,7 @@ | ||
| 47 | <el-table-column label="操作" align="center" width="360" fixed="right"> | 47 | <el-table-column label="操作" align="center" width="360" fixed="right"> |
| 48 | <template #default="scope"> | 48 | <template #default="scope"> |
| 49 | <el-popconfirm | 49 | <el-popconfirm |
| 50 | + width="2000" | ||
| 50 | title="是否通过该保单?" | 51 | title="是否通过该保单?" |
| 51 | confirm-button-text="确定" | 52 | confirm-button-text="确定" |
| 52 | cancel-button-text="取消" | 53 | cancel-button-text="取消" |
| 1 | <template> | 1 | <template> |
| 2 | - <div>保单报表</div> | 2 | + <div class="app-container"> |
| 3 | + <!-- 筛选条件 --> | ||
| 4 | + <el-form | ||
| 5 | + :model="queryParams" | ||
| 6 | + ref="queryRef" | ||
| 7 | + v-show="showSearch" | ||
| 8 | + :inline="true" | ||
| 9 | + label-width="68px" | ||
| 10 | + > | ||
| 11 | + <el-form-item label="分配机制" prop="assignment"> | ||
| 12 | + <el-select | ||
| 13 | + v-model="queryParams.assignment" | ||
| 14 | + placeholder="系统分配" | ||
| 15 | + clearable | ||
| 16 | + style="width: 220px" | ||
| 17 | + > | ||
| 18 | + <el-option | ||
| 19 | + v-for="dict in options" | ||
| 20 | + :key="dict.value" | ||
| 21 | + :label="dict.label" | ||
| 22 | + :value="dict.value" | ||
| 23 | + /> | ||
| 24 | + </el-select> | ||
| 25 | + </el-form-item> | ||
| 26 | + <el-form-item label="操作人员" prop="editAuth"> | ||
| 27 | + <el-input | ||
| 28 | + v-model="queryParams.editAuth" | ||
| 29 | + placeholder="填写操作人员" | ||
| 30 | + clearable | ||
| 31 | + style="width: 220px" | ||
| 32 | + @keyup.enter="handleQuery" | ||
| 33 | + /> | ||
| 34 | + </el-form-item> | ||
| 35 | + <el-form-item label="承保公司" prop="company"> | ||
| 36 | + <el-input | ||
| 37 | + v-model="queryParams.company" | ||
| 38 | + placeholder="请输入承保公司" | ||
| 39 | + clearable | ||
| 40 | + style="width: 220px" | ||
| 41 | + @keyup.enter="handleQuery" | ||
| 42 | + /> | ||
| 43 | + </el-form-item> | ||
| 44 | + <el-form-item label="承接人" prop="handler"> | ||
| 45 | + <el-input | ||
| 46 | + v-model="queryParams.handler" | ||
| 47 | + placeholder="请输入承接人" | ||
| 48 | + clearable | ||
| 49 | + style="width: 220px" | ||
| 50 | + @keyup.enter="handleQuery" | ||
| 51 | + /> | ||
| 52 | + </el-form-item> | ||
| 53 | + <el-form-item label="保单状态" prop="status"> | ||
| 54 | + <el-select | ||
| 55 | + v-model="queryParams.status" | ||
| 56 | + placeholder="选择进度" | ||
| 57 | + clearable | ||
| 58 | + style="width: 220px" | ||
| 59 | + > | ||
| 60 | + <el-option | ||
| 61 | + v-for="dict in statusOption" | ||
| 62 | + :key="dict.value" | ||
| 63 | + :label="dict.label" | ||
| 64 | + :value="dict.value" | ||
| 65 | + /> | ||
| 66 | + </el-select> | ||
| 67 | + </el-form-item> | ||
| 68 | + <el-form-item label="保单进度" prop="progress"> | ||
| 69 | + <el-select | ||
| 70 | + v-model="queryParams.progress" | ||
| 71 | + placeholder="选择进度" | ||
| 72 | + clearable | ||
| 73 | + style="width: 220px" | ||
| 74 | + > | ||
| 75 | + <el-option | ||
| 76 | + v-for="dict in progressOption" | ||
| 77 | + :key="dict.value" | ||
| 78 | + :label="dict.label" | ||
| 79 | + :value="dict.value" | ||
| 80 | + /> | ||
| 81 | + </el-select> | ||
| 82 | + </el-form-item> | ||
| 83 | + <el-form-item label="车主" prop="name"> | ||
| 84 | + <el-input | ||
| 85 | + v-model="queryParams.name" | ||
| 86 | + placeholder="请输入车主" | ||
| 87 | + clearable | ||
| 88 | + style="width: 200px" | ||
| 89 | + @keyup.enter="handleQuery" | ||
| 90 | + /> | ||
| 91 | + </el-form-item> | ||
| 92 | + <el-form-item label="车牌号" prop="carNum"> | ||
| 93 | + <el-input | ||
| 94 | + v-model="queryParams.carNum" | ||
| 95 | + placeholder="请输入车牌号" | ||
| 96 | + clearable | ||
| 97 | + style="width: 200px" | ||
| 98 | + @keyup.enter="handleQuery" | ||
| 99 | + /> | ||
| 100 | + </el-form-item> | ||
| 101 | + <el-form-item> | ||
| 102 | + <el-button type="primary" icon="Search" @click="handleQuery" | ||
| 103 | + >查询</el-button | ||
| 104 | + > | ||
| 105 | + <el-button icon="Refresh" @click="resetQuery">重置</el-button> | ||
| 106 | + </el-form-item> | ||
| 107 | + </el-form> | ||
| 108 | + | ||
| 109 | + <!-- 表格数据 --> | ||
| 110 | + <el-table | ||
| 111 | + v-loading="loading" | ||
| 112 | + :data="policyList" | ||
| 113 | + @selection-change="handleSelectionChange" | ||
| 114 | + > | ||
| 115 | + <el-table-column type="selection" width="55" align="center" /> | ||
| 116 | + <el-table-column | ||
| 117 | + label="序号" | ||
| 118 | + prop="policyId" | ||
| 119 | + width="120" | ||
| 120 | + align="center" | ||
| 121 | + /> | ||
| 122 | + <el-table-column | ||
| 123 | + label="登记时间" | ||
| 124 | + prop="createTime" | ||
| 125 | + width="150" | ||
| 126 | + align="center" | ||
| 127 | + /> | ||
| 128 | + <el-table-column | ||
| 129 | + label="车牌号" | ||
| 130 | + prop="carNum" | ||
| 131 | + width="150" | ||
| 132 | + align="center" | ||
| 133 | + /> | ||
| 134 | + <el-table-column | ||
| 135 | + label="车架号" | ||
| 136 | + prop="frameNum" | ||
| 137 | + width="240" | ||
| 138 | + align="center" | ||
| 139 | + /> | ||
| 140 | + <el-table-column | ||
| 141 | + label="车主姓名" | ||
| 142 | + prop="name" | ||
| 143 | + width="100" | ||
| 144 | + align="center" | ||
| 145 | + /> | ||
| 146 | + <el-table-column | ||
| 147 | + label="联系电话" | ||
| 148 | + prop="phone" | ||
| 149 | + width="180" | ||
| 150 | + align="center" | ||
| 151 | + /> | ||
| 152 | + <el-table-column | ||
| 153 | + label="操作时间" | ||
| 154 | + prop="authTime" | ||
| 155 | + width="150" | ||
| 156 | + align="center" | ||
| 157 | + /> | ||
| 158 | + <el-table-column | ||
| 159 | + label="操作人员" | ||
| 160 | + prop="editAuth" | ||
| 161 | + width="120" | ||
| 162 | + align="center" | ||
| 163 | + /> | ||
| 164 | + <el-table-column | ||
| 165 | + align="center" | ||
| 166 | + label="分配机制" | ||
| 167 | + width="120" | ||
| 168 | + prop="assignment" | ||
| 169 | + > | ||
| 170 | + <template #default="scope"> | ||
| 171 | + <span>{{ scope.row.progress === 0 ? "系统分配" : "人工分配" }}</span> | ||
| 172 | + </template> | ||
| 173 | + </el-table-column> | ||
| 174 | + <el-table-column | ||
| 175 | + label="承保公司" | ||
| 176 | + prop="company" | ||
| 177 | + width="150" | ||
| 178 | + align="center" | ||
| 179 | + /> | ||
| 180 | + <el-table-column | ||
| 181 | + label="办理人" | ||
| 182 | + prop="handler" | ||
| 183 | + width="100" | ||
| 184 | + align="center" | ||
| 185 | + /> | ||
| 186 | + <el-table-column label="保单进度" width="100" prop="progress"> | ||
| 187 | + <template #default="scope"> | ||
| 188 | + <span | ||
| 189 | + :style="{ color: scope.row.progress === 0 ? '#409EFF' : '#67C23A' }" | ||
| 190 | + >{{ scope.row.progress === 0 ? "待承接" : "已承接" }}</span | ||
| 191 | + > | ||
| 192 | + </template> | ||
| 193 | + </el-table-column> | ||
| 194 | + <el-table-column label="保单状态" width="100" prop="statue"> | ||
| 195 | + <template #default="scope"> | ||
| 196 | + <span | ||
| 197 | + :style="{ color: scope.row.status === 0 ? '#409EFF' : '#67C23A' }" | ||
| 198 | + >{{ scope.row.status === 0 ? "疑难件" : "已办结" }}</span | ||
| 199 | + > | ||
| 200 | + </template> | ||
| 201 | + </el-table-column> | ||
| 202 | + <el-table-column | ||
| 203 | + label="查询回馈" | ||
| 204 | + fixed="right" | ||
| 205 | + width="100" | ||
| 206 | + prop="Feedback" | ||
| 207 | + > | ||
| 208 | + <template #default> | ||
| 209 | + <el-button type="primary">查阅</el-button> | ||
| 210 | + </template> | ||
| 211 | + </el-table-column> | ||
| 212 | + </el-table> | ||
| 213 | + | ||
| 214 | + <pagination | ||
| 215 | + v-show="total > 0" | ||
| 216 | + :total="total" | ||
| 217 | + v-model:page="queryParams.pageNum" | ||
| 218 | + v-model:limit="queryParams.pageSize" | ||
| 219 | + @pagination="getList" | ||
| 220 | + /> | ||
| 221 | + </div> | ||
| 3 | </template> | 222 | </template> |
| 4 | 223 | ||
| 5 | -<script> | ||
| 6 | -export default {}; | 224 | +<script setup> |
| 225 | +const { proxy } = getCurrentInstance(); | ||
| 226 | +const loading = ref(false); | ||
| 227 | +const total = ref(5); | ||
| 228 | +const showSearch = ref(true); | ||
| 229 | +const queryParams = reactive({ | ||
| 230 | + pageNum: 1, | ||
| 231 | + pageSize: 10, | ||
| 232 | + name: "", | ||
| 233 | + carNum: "", | ||
| 234 | + editAuth: "", | ||
| 235 | + assignment: "", | ||
| 236 | + progress: "", | ||
| 237 | + company: "", | ||
| 238 | + handler: "", | ||
| 239 | + status: "", | ||
| 240 | +}); | ||
| 241 | + | ||
| 242 | +const statusOption = ref([ | ||
| 243 | + { | ||
| 244 | + value: 0, | ||
| 245 | + label: "疑难件", | ||
| 246 | + }, | ||
| 247 | + { | ||
| 248 | + value: 1, | ||
| 249 | + label: "已办结", | ||
| 250 | + }, | ||
| 251 | +]); | ||
| 252 | + | ||
| 253 | +const progressOption = ref([ | ||
| 254 | + { | ||
| 255 | + value: 0, | ||
| 256 | + label: "待承接", | ||
| 257 | + }, | ||
| 258 | + { | ||
| 259 | + value: 1, | ||
| 260 | + label: "已承接", | ||
| 261 | + }, | ||
| 262 | +]); | ||
| 263 | + | ||
| 264 | +const options = [ | ||
| 265 | + { | ||
| 266 | + value: 0, | ||
| 267 | + label: "系统分配", | ||
| 268 | + }, | ||
| 269 | + { | ||
| 270 | + value: 1, | ||
| 271 | + label: "人工分配", | ||
| 272 | + }, | ||
| 273 | +]; | ||
| 274 | + | ||
| 275 | +const policyList = ref([ | ||
| 276 | + { | ||
| 277 | + policyId: 1, | ||
| 278 | + createTime: "2024-01-01", | ||
| 279 | + carNum: "桂A 1234", | ||
| 280 | + frameNum: "123456789012345678", | ||
| 281 | + name: "张三", | ||
| 282 | + phone: "12345678901", | ||
| 283 | + company: "中国平安", | ||
| 284 | + editAuth: "管理员", | ||
| 285 | + authTime: "2024-01-01", | ||
| 286 | + assignment: 0, | ||
| 287 | + handler: "张三", | ||
| 288 | + progress: 0, | ||
| 289 | + status: 0, | ||
| 290 | + }, | ||
| 291 | + { | ||
| 292 | + policyId: 2, | ||
| 293 | + createTime: "2024-01-02", | ||
| 294 | + carNum: "粤B 1234", | ||
| 295 | + frameNum: "123456789012345678", | ||
| 296 | + name: "李四", | ||
| 297 | + phone: "12345678902", | ||
| 298 | + company: "中国平安", | ||
| 299 | + editAuth: "管理员", | ||
| 300 | + authTime: "2024-01-01", | ||
| 301 | + assignment: 0, | ||
| 302 | + handler: "张三", | ||
| 303 | + progress: 0, | ||
| 304 | + status: 1, | ||
| 305 | + }, | ||
| 306 | + { | ||
| 307 | + policyId: 3, | ||
| 308 | + createTime: "2024-01-03", | ||
| 309 | + carNum: "粤C 1234", | ||
| 310 | + frameNum: "123456789012345678", | ||
| 311 | + name: "王五", | ||
| 312 | + phone: "12345678903", | ||
| 313 | + company: "中国平安", | ||
| 314 | + editAuth: "管理员", | ||
| 315 | + authTime: "2024-01-01", | ||
| 316 | + assignment: 0, | ||
| 317 | + handler: "张三", | ||
| 318 | + progress: 0, | ||
| 319 | + status: 0, | ||
| 320 | + }, | ||
| 321 | + { | ||
| 322 | + policyId: 4, | ||
| 323 | + createTime: "2024-01-04", | ||
| 324 | + carNum: "粤D 1234", | ||
| 325 | + frameNum: "123456789012345678", | ||
| 326 | + name: "赵六", | ||
| 327 | + phone: "12345678904", | ||
| 328 | + company: "中国平安", | ||
| 329 | + editAuth: "管理员", | ||
| 330 | + authTime: "2024-01-01", | ||
| 331 | + assignment: 1, | ||
| 332 | + handler: "张三", | ||
| 333 | + progress: 1, | ||
| 334 | + status: 0, | ||
| 335 | + }, | ||
| 336 | + { | ||
| 337 | + policyId: 5, | ||
| 338 | + createTime: "2024-01-05", | ||
| 339 | + carNum: "粤E 1234", | ||
| 340 | + frameNum: "123456789012345678", | ||
| 341 | + name: "孙七", | ||
| 342 | + phone: "12345678905", | ||
| 343 | + company: "中国平安", | ||
| 344 | + editAuth: "管理员", | ||
| 345 | + authTime: "2024-01-01", | ||
| 346 | + assignment: 1, | ||
| 347 | + handler: "张三", | ||
| 348 | + progress: 1, | ||
| 349 | + status: 1, | ||
| 350 | + }, | ||
| 351 | +]); | ||
| 352 | + | ||
| 353 | +/** 多选框选中数据 */ | ||
| 354 | +function handleSelectionChange(selection) { | ||
| 355 | + // ids.value = selection.map(item => item.roleId); | ||
| 356 | + // single.value = selection.length != 1; | ||
| 357 | + // multiple.value = !selection.length; | ||
| 358 | + console.log(selection); | ||
| 359 | +} | ||
| 360 | + | ||
| 361 | +const getList = () => {}; | ||
| 362 | + | ||
| 363 | +/** 搜索按钮操作 */ | ||
| 364 | +function handleQuery() { | ||
| 365 | + queryParams.value.pageNum = 1; | ||
| 366 | + getList(); | ||
| 367 | +} | ||
| 368 | +/** 重置按钮操作 */ | ||
| 369 | +function resetQuery() { | ||
| 370 | + proxy.resetForm("queryRef"); | ||
| 371 | + handleQuery(); | ||
| 372 | +} | ||
| 7 | </script> | 373 | </script> |
| 8 | 374 | ||
| 9 | <style></style> | 375 | <style></style> |
| @@ -5,7 +5,7 @@ import createVitePlugins from './vite/plugins' | @@ -5,7 +5,7 @@ import createVitePlugins from './vite/plugins' | ||
| 5 | // https://vitejs.dev/config/ | 5 | // https://vitejs.dev/config/ |
| 6 | export default defineConfig(({ mode, command }) => { | 6 | export default defineConfig(({ mode, command }) => { |
| 7 | const env = loadEnv(mode, process.cwd()) | 7 | const env = loadEnv(mode, process.cwd()) |
| 8 | - const { VITE_APP_ENV } = env | 8 | + const { VITE_APP_ENV, VITE_APP_TAB_URL_PREFIX } = env |
| 9 | return { | 9 | return { |
| 10 | // 部署生产环境和开发环境下的URL。 | 10 | // 部署生产环境和开发环境下的URL。 |
| 11 | // 默认情况下,vite 会假设你的应用是被部署在一个域名的根路径上 | 11 | // 默认情况下,vite 会假设你的应用是被部署在一个域名的根路径上 |
| @@ -31,7 +31,7 @@ export default defineConfig(({ mode, command }) => { | @@ -31,7 +31,7 @@ export default defineConfig(({ mode, command }) => { | ||
| 31 | proxy: { | 31 | proxy: { |
| 32 | // https://cn.vitejs.dev/config/#server-proxy | 32 | // https://cn.vitejs.dev/config/#server-proxy |
| 33 | '/dev-api': { | 33 | '/dev-api': { |
| 34 | - target: 'https://bxhd.crgx.net/', | 34 | + target: VITE_APP_TAB_URL_PREFIX, |
| 35 | changeOrigin: true, | 35 | changeOrigin: true, |
| 36 | rewrite: (p) => p.replace(/^\/dev-api/, '') | 36 | rewrite: (p) => p.replace(/^\/dev-api/, '') |
| 37 | } | 37 | } |
-
请 注册 或 登录 后发表评论