Commit 11f50aca by wangzhihui

修复bug

1 parent 8fd52677
<!-- 弹窗 --> <!-- 弹窗 -->
<template> <template>
<div> <div>
<el-dialog :title="title" <el-dialog
:title="title"
:visible.sync="isVisible" :visible.sync="isVisible"
:show-close="showClose" :show-close="showClose"
:before-close="handleClose" :before-close="handleClose"
:close-on-click-modal="false" :close-on-click-modal="false"
:width="width" :width="width"
:append-to-body="appendToBody" :append-to-body="appendToBody"
:fullscreen="fullscreen"> :fullscreen="fullscreen"
>
<span slot="title"> <span slot="title">
{{ title }} {{ title }}
<span class="dialog-sub-title"> <span class="dialog-sub-title">
...@@ -18,13 +20,14 @@ ...@@ -18,13 +20,14 @@
<slot /> <slot />
<div slot="footer"> <div slot="footer">
<slot name="btn-start" /> <slot name="btn-start" />
<el-button v-if="!noCancel" <el-button v-if="!noCancel" @click="handleClose"> 取消 </el-button>
@click="handleClose"> 取消 </el-button>
<slot name="btn-middle" /> <slot name="btn-middle" />
<el-button type="primary" <el-button
type="primary"
v-if="isShowFooter" v-if="isShowFooter"
@click="handleConfirm" @click="handleConfirm"
:loading="$store.state.d2admin.loading.value"> :loading="$store.state.d2admin.loading.value"
>
{{ btnOkLabel }} {{ btnOkLabel }}
</el-button> </el-button>
<slot name="btn-end" /> <slot name="btn-end" />
...@@ -73,7 +76,7 @@ export default { ...@@ -73,7 +76,7 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
fullscreen:Boolean fullscreen: Boolean
}, },
methods: { methods: {
......
...@@ -116,12 +116,13 @@ export default { ...@@ -116,12 +116,13 @@ export default {
}, },
isClassifyRules: { isClassifyRules: {
categoryName: [ categoryName: [
{ required: true, message: "请输入分类名称", trigger: "blur" } { required: true, message: "请输入分类名称", trigger: "blur" },
{ max: 10, message: "分类名称不能超过10个字符", trigger: "blur" }
] ]
}, },
isClassifyForm: { isClassifyForm: {
id: "", id: "",
categoryName: [], categoryName: "",
parentId: "" parentId: ""
}, },
isClassifyFormData: [ isClassifyFormData: [
...@@ -180,9 +181,8 @@ export default { ...@@ -180,9 +181,8 @@ export default {
this.$emit("handleInteraction", params) this.$emit("handleInteraction", params)
}, },
isClassifyDialogVisible() { isClassifyDialogVisible() {
this.isClassifyForm = {}
this.isClassifyForm.categoryName = "" //赋值清空
this.isClassifyVisible = !this.isClassifyVisible this.isClassifyVisible = !this.isClassifyVisible
this.clearClassifyFormData()
}, },
async handleClassifyConfirm(data) { async handleClassifyConfirm(data) {
try { try {
...@@ -195,6 +195,7 @@ export default { ...@@ -195,6 +195,7 @@ export default {
this.$message.success( this.$message.success(
this.isClassifyForm.id ? "修改成功" : "添加成功" this.isClassifyForm.id ? "修改成功" : "添加成功"
) )
this.clearClassifyFormData()
this.isClassifyVisible = false this.isClassifyVisible = false
} }
} catch (e) { } catch (e) {
...@@ -203,15 +204,18 @@ export default { ...@@ -203,15 +204,18 @@ export default {
this.$emit("refresh") this.$emit("refresh")
} }
}, },
clearClassifyFormData() {
this.isClassifyForm.parentId = ""
this.isClassifyForm.id = ""
this.isClassifyForm.categoryName = "" //赋值清空
},
async handleCommand(payload) { async handleCommand(payload) {
const { type, node } = const { type, node } =
typeof payload === "object" && payload !== null typeof payload === "object" && payload !== null
? payload ? payload
: { type: payload, node: null } : { type: payload, node: null }
console.log(type)
this.isClassifyForm.id = ""
this.isClassifyForm.categoryName = "" //赋值清空
if (type === "add") { if (type === "add") {
this.isClassifyVisible = true this.isClassifyVisible = true
this.isClassifyDialogConfig.title = "新增课程分类" this.isClassifyDialogConfig.title = "新增课程分类"
...@@ -260,7 +264,25 @@ export default { ...@@ -260,7 +264,25 @@ export default {
width: 200px; width: 200px;
height: 100%; height: 100%;
overflow: scroll; overflow: scroll;
border: 1px solid #e5e5e5; // border: 1px solid #e5e5e5;
// 修改滚动条样式为透明
// &::-webkit-scrollbar {
// width: 1px;
// height: 1px;
// }
// &::-webkit-scrollbar-thumb {
// background-color: transparent;
// border-radius: 1px;
// }
// &::-webkit-scrollbar-track {
// background-color: transparent;
// }
// &::-webkit-scrollbar-corner {
// background-color: transparent;
// }
.title { .title {
color: #333333; color: #333333;
font-size: 14px; font-size: 14px;
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
:search-form="searchFormSearch" :search-form="searchFormSearch"
:table-params="tableParams" :table-params="tableParams"
:sortObj="sortObj" :sortObj="sortObj"
:maxHeight="380" :maxHeight="370"
:before-search-fn="beforeSearchFn" :before-search-fn="beforeSearchFn"
> >
<!-- 课程标题 --> <!-- 课程标题 -->
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 'wangzhihui' '1733904062@qq.com' * @Author: 'wangzhihui' '1733904062@qq.com'
* @Date: 2025-11-25 17:50:39 * @Date: 2025-11-25 17:50:39
* @LastEditors: 'wangzhihui' '1733904062@qq.com' * @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2025-12-08 17:03:39 * @LastEditTime: 2025-12-11 11:24:15
* @FilePath: \dj-car-life-system\src\views\serviceCentre\courseManagement\list\index.vue * @FilePath: \dj-car-life-system\src\views\serviceCentre\courseManagement\list\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
...@@ -68,23 +68,22 @@ export default { ...@@ -68,23 +68,22 @@ export default {
.course-wrap { .course-wrap {
margin: 0 20px; margin: 0 20px;
display: flex; display: flex;
height: calc(100% - 40px); height: calc(100% - 213px);
overflow: auto; overflow: auto;
.right-pane { .right-pane {
background: #fff; background: #fff;
width: calc(100% - 200px);
position: absolute; position: absolute;
left: 235px; height: 73%;
left: 252px;
top: 0; top: 0;
bottom: 0; bottom: 0;
right: 0; right: 0;
height: 90%;
::v-deep .d2-container-full .d2-container-full__header { ::v-deep .d2-container-full .d2-container-full__header {
border-bottom: 1px solid #fff !important; border-bottom: 1px solid #fff !important;
} }
} }
.left-pane { .left-pane {
height: 100%; height: 90%;
} }
} }
</style> </style>
...@@ -754,7 +754,7 @@ export default { ...@@ -754,7 +754,7 @@ export default {
} }
.orderPermission-wrap { .orderPermission-wrap {
width: 1010px; width: 1010px;
min-height: 352px; // min-height: 352px;
border-radius: 2px; border-radius: 2px;
opacity: 1; opacity: 1;
background: #f5f6fa; background: #f5f6fa;
......
...@@ -249,6 +249,8 @@ export default { ...@@ -249,6 +249,8 @@ export default {
getSelectingList() { getSelectingList() {
this.isFetchingPage = true this.isFetchingPage = true
let params = this.getParams() let params = this.getParams()
// 排除未分类课程
params.excludeNullCategoryId = 1
queryCoursePage(params) queryCoursePage(params)
.then((res) => { .then((res) => {
this.selectingData = res.list this.selectingData = res.list
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
:tableData="visibleCourses" :tableData="visibleCourses"
:table-params="tableParams" :table-params="tableParams"
:hasPage="false" :hasPage="false"
:maxHeight="350"
> >
<!-- 课程标题 --> <!-- 课程标题 -->
<div slot="titleHtml" slot-scope="scope"> <div slot="titleHtml" slot-scope="scope">
......
...@@ -82,9 +82,9 @@ ...@@ -82,9 +82,9 @@
<auth-button :data="scope.scope" :show-btn-ids="['9190704']" /> <auth-button :data="scope.scope" :show-btn-ids="['9190704']" />
</span> </span>
<!-- 生效 --> <!-- 生效 -->
<span style="margin-right: 10px" v-if="scope.scope.status == 2"> <!-- <span style="margin-right: 10px" v-if="scope.scope.status == 2">
<auth-button :data="scope.scope" :show-btn-ids="['9190708']" /> <auth-button :data="scope.scope" :show-btn-ids="['9190708']" />
</span> </span> -->
<!-- 失效 --> <!-- 失效 -->
<span style="margin-right: 10px" v-if="scope.scope.status == 1"> <span style="margin-right: 10px" v-if="scope.scope.status == 1">
<auth-button :data="scope.scope" :show-btn-ids="['9190707']" /> <auth-button :data="scope.scope" :show-btn-ids="['9190707']" />
......
...@@ -126,7 +126,7 @@ export default { ...@@ -126,7 +126,7 @@ export default {
itemStyle: { color: "#2A58AD" }, itemStyle: { color: "#2A58AD" },
data: this.yData.map((item, index) => ({ data: this.yData.map((item, index) => ({
value: typeof item === "number" ? item : item?.num || 0, value: typeof item === "number" ? item : item?.num || 0,
ratio: typeof item === "number" ? 0 : item?.proportion || 0, ratio: typeof item === "number" ? 0 : item?.proportion * 100 || 0,
name: this.xData[index] name: this.xData[index]
})) }))
} }
......
<template> <template>
<div class="right-view"> <div class="right-view">
<div class="title">得分TOP10</div> <div class="title">得分TOP10</div>
<el-table :data="rows" border style="width: 100%" size="mini"> <el-table :data="scoreList" border style="width: 100%" size="mini">
<el-table-column label="排名" prop="rank" width="68" align="center"> <el-table-column label="排名" prop="rank" width="68" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.rank }} <!-- {{ scope.row.rank }} -->
<!-- <span v-if="scope.row.rank <= 3"> <span v-if="scope.row.num <= 3">
<img :src="medal(scope.row.rank)" class="medal" /> <img :src="medal(scope.row.num)" class="medal" />
</span> --> </span>
<!-- <span v-else>{{ scope.row.rank }}</span> --> <span v-else>{{ scope.row.num }}</span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -58,20 +58,20 @@ export default { ...@@ -58,20 +58,20 @@ export default {
}, },
computed: { computed: {
// 渲染数据:排序、截取前10并生成 rank // 渲染数据:排序、截取前10并生成 rank
rows() { // rows() {
const normalized = (this.scoreList || []).map((item) => ({ // const normalized = (this.scoreList || []).map((item) => ({
name: item && item.name != null ? String(item.name) : "", // name: item && item.name != null ? String(item.name) : "",
score: Number(item && item.score != null ? item.score : 0) // score: Number(item && item.score != null ? item.score : 0)
})) // }))
return normalized // return normalized
.sort((a, b) => b.score - a.score) // .sort((a, b) => b.score - a.score)
.slice(0, 10) // .slice(0, 10)
.map((item, idx) => ({ // .map((item, idx) => ({
rank: idx + 1, // rank: idx + 1,
name: item.name, // name: item.name,
score: item.score // score: item.score
})) // }))
} // }
}, },
methods: { methods: {
medal(rank) { medal(rank) {
......
...@@ -8,7 +8,10 @@ ...@@ -8,7 +8,10 @@
</ul> </ul>
</div> </div>
<div class="page-login--layer"> <div class="page-login--layer">
<div class="page-login--content" flex="dir:top main:justify cross:stretch box:justify"> <div
class="page-login--content"
flex="dir:top main:justify cross:stretch box:justify"
>
<div class="page-login--content-header"> <div class="page-login--content-header">
<p class="page-login--content-header-motto" /> <p class="page-login--content-header-motto" />
</div> </div>
...@@ -17,7 +20,13 @@ ...@@ -17,7 +20,13 @@
<div class="page-login--form-box" @click="handleReturnLogin"> <div class="page-login--form-box" @click="handleReturnLogin">
<div class="page-login--form" v-show="!isMutiAccount"> <div class="page-login--form" v-show="!isMutiAccount">
<div class="form-left"> <div class="form-left">
<el-form ref="loginForm" label-position="top" :rules="rules" :model="formLogin" size="default"> <el-form
ref="loginForm"
label-position="top"
:rules="rules"
:model="formLogin"
size="default"
>
<div class="title-wrap"> <div class="title-wrap">
<span class="form-title">{{ systemName }}</span> <span class="form-title">{{ systemName }}</span>
<!-- <span class="form-title"> <!-- <span class="form-title">
...@@ -28,8 +37,14 @@ ...@@ -28,8 +37,14 @@
<div class="form-login-title">账户密码登录</div> <div class="form-login-title">账户密码登录</div>
<div class="input-wrap"> <div class="input-wrap">
<el-form-item prop="userName"> <el-form-item prop="userName">
<el-input type="text" @keyup.native.13="submit" v-model="formLogin.userName" placeholder="账户" <el-input
clearable v-focus> type="text"
@keyup.native.13="submit"
v-model="formLogin.userName"
placeholder="账户"
clearable
v-focus
>
<i slot="prefix" class="icon el-icon-user"></i> <i slot="prefix" class="icon el-icon-user"></i>
<!-- <img slot="prefix" class="icon" src="./image/account.png" alt="账户" /> --> <!-- <img slot="prefix" class="icon" src="./image/account.png" alt="账户" /> -->
<!-- <d2-el-icon <!-- <d2-el-icon
...@@ -39,8 +54,13 @@ ...@@ -39,8 +54,13 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item prop="password"> <el-form-item prop="password">
<el-input type="password" v-model="formLogin.password" @keyup.native.13="submit" clearable <el-input
placeholder="密码"> type="password"
v-model="formLogin.password"
@keyup.native.13="submit"
clearable
placeholder="密码"
>
<i slot="prefix" class="icon el-icon-key"></i> <i slot="prefix" class="icon el-icon-key"></i>
<!-- <img slot="prefix" class="icon" src="./image/password.png" alt="密码" /> --> <!-- <img slot="prefix" class="icon" src="./image/password.png" alt="密码" /> -->
<!-- <d2-el-icon <!-- <d2-el-icon
...@@ -51,11 +71,22 @@ ...@@ -51,11 +71,22 @@
</el-form-item> </el-form-item>
<el-form-item class="form-action"> <el-form-item class="form-action">
<!-- $store.state.d2admin.loading.value --> <!-- $store.state.d2admin.loading.value -->
<el-button @click="submit" type="primary" :loading="$store.state.d2admin.loading.value" <el-button
class="button-login" style="height: 48px;" :style="{ width: hasReg ? '' : '100%' }"> @click="submit"
type="primary"
:loading="$store.state.d2admin.loading.value"
class="button-login"
style="height: 48px"
:style="{ width: hasReg ? '' : '100%' }"
>
登录 登录
</el-button> </el-button>
<el-button v-if="hasReg" @click.prevent="registerDialogVisible = true" plain class="button-reg"> <el-button
v-if="hasReg"
@click.prevent="registerDialogVisible = true"
plain
class="button-reg"
>
注册 注册
</el-button> </el-button>
</el-form-item> </el-form-item>
...@@ -66,14 +97,17 @@ ...@@ -66,14 +97,17 @@
<div class="page-login--muti-form" v-show="isMutiAccount"> <div class="page-login--muti-form" v-show="isMutiAccount">
<div class="muti-title">请选择登录商户号</div> <div class="muti-title">请选择登录商户号</div>
<div class="muti-form-box"> <div class="muti-form-box">
<div class="muti-merchant-item" v-for="(item, index) in accountInfo.accountList" :key="index" <div
@click.stop.prevent="handleSelectAccount(index)"> class="muti-merchant-item"
v-for="(item, index) in accountInfo.accountList"
:key="index"
@click.stop.prevent="handleSelectAccount(index)"
>
<!-- <i class="muti-dot" /> --> <!-- <i class="muti-dot" /> -->
<div class="muti-merchant-info"> <div class="muti-merchant-info">
<div class="muti-merchant-box"> <div class="muti-merchant-box">
<div class="muti-merchant-name"> <div class="muti-merchant-name">
{{ item.merchantName }} {{ item.merchantName }}
</div> </div>
<div class="muti-merchant-level"> <div class="muti-merchant-level">
{{ {{
...@@ -89,7 +123,10 @@ ...@@ -89,7 +123,10 @@
</div> </div>
</div> </div>
<i class="muti-arrow el-icon-arrow-right" style="color: #333333;" /> <i
class="muti-arrow el-icon-arrow-right"
style="color: #333333"
/>
</div> </div>
</div> </div>
</div> </div>
...@@ -238,7 +275,7 @@ export default { ...@@ -238,7 +275,7 @@ export default {
accountInfo: this.accountInfo accountInfo: this.accountInfo
}) })
.then(async (res) => { .then(async (res) => {
console.log(res, 'merchantAccountLevel') console.log(res, "merchantAccountLevel")
const _current = const _current =
userInfo.detail.accountType !== 7 userInfo.detail.accountType !== 7
? await this.current() ? await this.current()
...@@ -251,10 +288,11 @@ export default { ...@@ -251,10 +288,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
// 接收 getAuth 的 reject 并做对应处理 // 接收 getAuth 的 reject 并做对应处理
console.error('getAuth failed:', err) console.error("getAuth failed:", err)
const msg = typeof err === 'string' const msg =
typeof err === "string"
? err ? err
: (err && err.message) || '获取权限失败,请联系管理员' : (err && err.message) || "获取权限失败,请联系管理员"
this.$message && this.$message.error(msg) this.$message && this.$message.error(msg)
this.isMutiAccount = false this.isMutiAccount = false
// 可选:重置登录按钮 loading / 回到登录页 / 清理态 // 可选:重置登录按钮 loading / 回到登录页 / 清理态
...@@ -442,7 +480,7 @@ export default { ...@@ -442,7 +480,7 @@ export default {
.muti-form-box { .muti-form-box {
width: 100%; width: 100%;
height: 350px; height: 420px;
overflow-y: scroll; overflow-y: scroll;
.muti-merchant-item { .muti-merchant-item {
...@@ -505,7 +543,7 @@ export default { ...@@ -505,7 +543,7 @@ export default {
background-color: rgba(42, 88, 173, 0.1); background-color: rgba(42, 88, 173, 0.1);
border-radius: 4px; border-radius: 4px;
font-size: 14px; font-size: 14px;
color: #2A58AD; color: #2a58ad;
font-weight: 400; font-weight: 400;
padding: 0 12px; padding: 0 12px;
// width: 28px; // width: 28px;
...@@ -649,8 +687,8 @@ export default { ...@@ -649,8 +687,8 @@ export default {
} }
.button-login { .button-login {
background-color: #2A58AD !important; background-color: #2a58ad !important;
color: #FFF; color: #fff;
// background-image: linear-gradient( // background-image: linear-gradient(
// 148deg, // 148deg,
// #0bcdfe 0%, // #0bcdfe 0%,
...@@ -673,7 +711,6 @@ export default { ...@@ -673,7 +711,6 @@ export default {
} }
} }
@keyframes login-form-animate { @keyframes login-form-animate {
0% { 0% {
transform: scale(1); transform: scale(1);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!