Commit 308357b5 by 张立顺

Merge branch 'SAAS+V5.5.0' of http://192.168.3.233:8090/saas_plus/dj-car-life-sy…

…stem into SAAS+V5.5.0
2 parents fab3eac8 2c2dcfc4
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
:row-key="tableParams.mutiSelectUniqueKey || ''" :row-key="tableParams.mutiSelectUniqueKey || ''"
v-loading="loading" v-loading="loading"
:border="border" :border="border"
:max-height="maxHeight"
:highlight-current-row="true" :highlight-current-row="true"
@sort-change="sortChange" @sort-change="sortChange"
@selection-change="handleSelect" @selection-change="handleSelect"
...@@ -549,7 +550,9 @@ export default { ...@@ -549,7 +550,9 @@ export default {
type: Boolean, type: Boolean,
default: true default: true
}, },
maxHeight: {
type: Number | String
},
noDataImg: { noDataImg: {
type: String, type: String,
default: "" default: ""
......
...@@ -170,6 +170,7 @@ export default { ...@@ -170,6 +170,7 @@ export default {
methods: { methods: {
handleClick(node, data) { handleClick(node, data) {
this.isClassifyForm.parentId = "" this.isClassifyForm.parentId = ""
this.isClassifyForm.categoryName = "" //赋值清空
this.isClassifyVisible = true this.isClassifyVisible = true
this.isClassifyDialogConfig.title = "新增课程分类" this.isClassifyDialogConfig.title = "新增课程分类"
}, },
...@@ -180,6 +181,7 @@ export default { ...@@ -180,6 +181,7 @@ export default {
}, },
isClassifyDialogVisible() { isClassifyDialogVisible() {
this.isClassifyForm = {} this.isClassifyForm = {}
this.isClassifyForm.categoryName = "" //赋值清空
this.isClassifyVisible = !this.isClassifyVisible this.isClassifyVisible = !this.isClassifyVisible
}, },
async handleClassifyConfirm(data) { async handleClassifyConfirm(data) {
...@@ -202,11 +204,14 @@ export default { ...@@ -202,11 +204,14 @@ export default {
} }
}, },
async handleCommand(payload) { async handleCommand(payload) {
console.log(payload, "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 = "新增课程分类"
...@@ -248,12 +253,13 @@ export default { ...@@ -248,12 +253,13 @@ export default {
} }
</script> </script>
<style scoped> <style scoped lang="scss">
.category-tree { .category-tree {
padding: 16px; padding: 16px;
background: #fff; background: #fff;
width: 200px; width: 200px;
height: 641px; height: 100%;
overflow: scroll;
border: 1px solid #e5e5e5; border: 1px solid #e5e5e5;
.title { .title {
color: #333333; color: #333333;
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
:search-form="searchFormSearch" :search-form="searchFormSearch"
:table-params="tableParams" :table-params="tableParams"
:sortObj="sortObj" :sortObj="sortObj"
:maxHeight="380"
:before-search-fn="beforeSearchFn" :before-search-fn="beforeSearchFn"
> >
<!-- 课程标题 --> <!-- 课程标题 -->
......
<!--
* @Author: 'wangzhihui' '1733904062@qq.com'
* @Date: 2025-11-25 17:50:39
* @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2025-12-08 17:03:39
* @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
-->
<template> <template>
<div class="course-wrap"> <div class="course-wrap">
<div class="left-pane"> <div class="left-pane">
...@@ -60,6 +68,8 @@ export default { ...@@ -60,6 +68,8 @@ export default {
.course-wrap { .course-wrap {
margin: 0 20px; margin: 0 20px;
display: flex; display: flex;
height: calc(100% - 40px);
overflow: auto;
.right-pane { .right-pane {
background: #fff; background: #fff;
width: calc(100% - 200px); width: calc(100% - 200px);
...@@ -68,10 +78,13 @@ export default { ...@@ -68,10 +78,13 @@ export default {
top: 0; top: 0;
bottom: 0; bottom: 0;
right: 0; right: 0;
height: 641px; 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 {
height: 100%;
}
} }
</style> </style>
...@@ -291,6 +291,7 @@ export default { ...@@ -291,6 +291,7 @@ export default {
{ {
label: "考试等级", label: "考试等级",
name: "levelExamLevels", name: "levelExamLevels",
isHide: true,
addHtml: "examinationHtml" addHtml: "examinationHtml"
} }
], ],
...@@ -343,7 +344,27 @@ export default { ...@@ -343,7 +344,27 @@ export default {
this.getTrainingPlanDetail() this.getTrainingPlanDetail()
} }
}, },
watch: {
"addForm.orderPermissionStatus"(val) {
if (val === 0) {
this.addForm.orderPermissionType = 1
this.addForm.staffList = []
}
},
"addForm.orderPermissionType"(val) {
if (val === 2) {
this.addForm.limitTimeParam = 1
}
},
"addForm.levelExamLevels"(val) {
this.planData[this.findAttrIdx("planData", "levelExamLevels")].isHide =
val.length ? false : true
}
},
methods: { methods: {
findAttrIdx(formName, attrName) {
return this[formName].findIndex((item) => item.name == attrName)
},
//切换等级考试获取考试等级 //切换等级考试获取考试等级
getLevelExamDetail(id) { getLevelExamDetail(id) {
getLevelExamDetail({ getLevelExamDetail({
...@@ -487,6 +508,7 @@ export default { ...@@ -487,6 +508,7 @@ export default {
const isOk = await this.$refs.courseLevelRef.validateRequiredNotEmpty() const isOk = await this.$refs.courseLevelRef.validateRequiredNotEmpty()
if (!isOk) return if (!isOk) return
if (status !== 0) {
try { try {
await this.$confirm("确定是否提交培训计划?", "提示", { await this.$confirm("确定是否提交培训计划?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
...@@ -496,6 +518,8 @@ export default { ...@@ -496,6 +518,8 @@ export default {
} catch { } catch {
return return
} }
}
const { courseMap } = await this.$refs.courseLevelRef.buildSubmitPayload() const { courseMap } = await this.$refs.courseLevelRef.buildSubmitPayload()
let params = { let params = {
sceneType: this.addForm.sceneType, sceneType: this.addForm.sceneType,
......
...@@ -197,6 +197,9 @@ export default { ...@@ -197,6 +197,9 @@ export default {
isVisible: { isVisible: {
handler(val) { handler(val) {
if (val) { if (val) {
this.searchForm = this.$options.data.call(this).searchForm
this.page = this.$options.data.call(this).page
this.$refs.seletingTable.refreshTable_noApi()
this.getSelectingList() this.getSelectingList()
this.fetchOnboardingPlans() this.fetchOnboardingPlans()
// this.recoverySelection() // this.recoverySelection()
......
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
</el-tabs> </el-tabs>
</div> </div>
<el-button <el-button
type="info"
plain
size="small" size="small"
icon="el-icon-plus" icon="el-icon-plus"
style="margin-bottom: 8px" style="margin-bottom: 8px"
...@@ -341,6 +339,7 @@ export default { ...@@ -341,6 +339,7 @@ export default {
// 切换等级 // 切换等级
switchLevel(level) { switchLevel(level) {
this.currentLevel = level this.currentLevel = level
this.currentType = "1"
}, },
// 从当前维度移除 // 从当前维度移除
......
...@@ -180,7 +180,9 @@ export default { ...@@ -180,7 +180,9 @@ export default {
isVisible: { isVisible: {
handler(val) { handler(val) {
if (val) { if (val) {
console.log(val, 9999) this.searchForm = this.$options.data.call(this).searchForm
this.page = this.$options.data.call(this).page
this.$refs.seletingTable.refreshTable_noApi()
this.getSelectingList() this.getSelectingList()
this.fetchOnboardingPlans() this.fetchOnboardingPlans()
} }
......
...@@ -85,6 +85,18 @@ ...@@ -85,6 +85,18 @@
:form-data="setData" :form-data="setData"
:form-rules="formRule" :form-rules="formRule"
> >
<template slot="effectiveTimeHtml" slot-scope="scope">
<el-date-picker
type="datetime"
v-model="addForm.effectiveTime"
placeholder="选择日期时间"
:picker-options="pickerOptions"
format="yyyy-MM-dd HH:mm:ss"
default-time="00:00:00"
value-format="yyyy-MM-dd HH:mm:ss"
>
</el-date-picker>
</template>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
</div> </div>
...@@ -263,6 +275,7 @@ export default { ...@@ -263,6 +275,7 @@ export default {
label: "生效时间", label: "生效时间",
name: "effectiveTime", name: "effectiveTime",
isDisabled: false, isDisabled: false,
addHtml: "effectiveTimeHtml",
isHide: true, isHide: true,
dateType: "datetime", dateType: "datetime",
type: "datePicker" type: "datePicker"
...@@ -293,6 +306,13 @@ export default { ...@@ -293,6 +306,13 @@ export default {
postTypeOpt: [], //职务 postTypeOpt: [], //职务
effectiveOpt: deepClone(effectiveOpt) effectiveOpt: deepClone(effectiveOpt)
}, },
pickerOptions: {
// 限制今天当前时间之前的时间(包含小时数)
disabledDate: (time) => {
return time.getTime() < Date.now() - 8.64e7
},
selectableRange: this.getSelectableRange()
},
formRule: { formRule: {
beisenExamId: [ beisenExamId: [
{ required: true, message: "请选择考试名称", trigger: "change" } { required: true, message: "请选择考试名称", trigger: "change" }
...@@ -346,6 +366,11 @@ export default { ...@@ -346,6 +366,11 @@ export default {
} }
}, },
methods: { methods: {
getSelectableRange() {
const currentDate = new Date()
currentDate.setMinutes(currentDate.getMinutes())
return `${currentDate.getHours()}:${currentDate.getMinutes()}:00 - 23:59:59`
},
getStatusItem(baseData, optKey, row, rowKey) { getStatusItem(baseData, optKey, row, rowKey) {
if (!baseData || !baseData[optKey] || !row) return null if (!baseData || !baseData[optKey] || !row) return null
let item = baseData[optKey].find((item) => item.confId == row[rowKey]) let item = baseData[optKey].find((item) => item.confId == row[rowKey])
...@@ -447,6 +472,8 @@ export default { ...@@ -447,6 +472,8 @@ export default {
const ok = await this.$refs.addLevel.onSave() const ok = await this.$refs.addLevel.onSave()
if (ok === false) return if (ok === false) return
//草稿是3
if (status !== 0) {
// 二次确认 // 二次确认
try { try {
await this.$confirm( await this.$confirm(
...@@ -462,6 +489,8 @@ export default { ...@@ -462,6 +489,8 @@ export default {
// 用户取消 // 用户取消
return return
} }
}
//编辑生效跟未生效保存时,保持原有状态 //编辑生效跟未生效保存时,保持原有状态
if (this.addForm.status == 1 || this.addForm.status == 2) { if (this.addForm.status == 1 || this.addForm.status == 2) {
status = this.addForm.status status = this.addForm.status
...@@ -474,10 +503,9 @@ export default { ...@@ -474,10 +503,9 @@ export default {
examTime: this.addForm.examTime, examTime: this.addForm.examTime,
learningCenterPermission: this.addForm.learningCenterPermission, learningCenterPermission: this.addForm.learningCenterPermission,
effectiveType: this.addForm.effectiveType, effectiveType: this.addForm.effectiveType,
effectiveTime: Util.dateFormate( effectiveTime: this.addForm.effectiveTime
this.addForm.effectiveTime, ? Util.dateFormate(this.addForm.effectiveTime, "YYYY-MM-DD HH:mm:ss")
"YYYY-MM-DD HH:mm:ss" : "",
),
levelExamLevels: this.$refs.addLevel.levels levelExamLevels: this.$refs.addLevel.levels
} }
......
<template> <template>
<!-- ... existing code ... --> <!-- ... existing code ... -->
<div class="grade-editor"> <div class="grade-editor">
<el-button plain icon="el-icon-plus" type="info" @click="addLevel" <el-button
plain
icon="el-icon-plus"
@click="addLevel"
:disabled="status == 2"
>添加等级</el-button >添加等级</el-button
> >
<el-form ref="levelForm" :model="formModel" class="grade-form"> <el-form ref="levelForm" :model="formModel" class="grade-form">
...@@ -57,7 +61,6 @@ ...@@ -57,7 +61,6 @@
placeholder="请输入" placeholder="请输入"
:disabled="status == 2" :disabled="status == 2"
maxlength="10" maxlength="10"
@blur="onLevelNameBlur(idx)"
@input="onNameInput(scope.$index, $event)" @input="onNameInput(scope.$index, $event)"
/> />
</el-form-item> </el-form-item>
...@@ -102,6 +105,15 @@ export default { ...@@ -102,6 +105,15 @@ export default {
const name = String(value || "").trim() const name = String(value || "").trim()
if (!name) return cb(new Error("等级名称必填")) if (!name) return cb(new Error("等级名称必填"))
if (name.length > 10) return cb(new Error("最多 10 个字符")) if (name.length > 10) return cb(new Error("最多 10 个字符"))
const names = (this.levels || [])
.map((l) =>
String(l && l.levelName != null ? l.levelName : "").trim()
)
.filter((n) => !!n)
const count = names.filter((n) => n === name).length
if (count > 1) {
return cb(new Error("等级名称不可重复"))
}
cb() cb()
}, },
trigger: ["blur", "change"] trigger: ["blur", "change"]
......
...@@ -152,6 +152,7 @@ ...@@ -152,6 +152,7 @@
</template> </template>
</div> </div>
</div> </div>
<div class="message">{{ item.message }}</div>
</template> </template>
</el-form-item></el-col </el-form-item></el-col
> >
...@@ -354,7 +355,9 @@ export default { ...@@ -354,7 +355,9 @@ export default {
{ {
label: "等级分数段", label: "等级分数段",
formatter: (row) => { formatter: (row) => {
return row.minScore || 0 + "≤分数≤" + row.maxScore || 0 return (
(row.minScore || 0) + "≤分数≤" + (row.maxScore || 0)
)
} }
}, },
{ {
......
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
<auth-button :data="scope.scope" :show-btn-ids="['9190408']" /> <auth-button :data="scope.scope" :show-btn-ids="['9190408']" />
</span> --> </span> -->
<!-- 数据 --> <!-- 数据 -->
<span style="margin-right: 10px"> <span style="margin-right: 10px" v-if="scope.scope.status != 0">
<auth-button :data="scope.scope" :show-btn-ids="['9190406']" /> <auth-button :data="scope.scope" :show-btn-ids="['9190406']" />
</span> </span>
<!-- 删除 --> <!-- 删除 -->
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!