diff --git a/src/api/system/trainingItem.js b/src/api/system/trainingItem.js
index 00cabae..51593eb 100644
--- a/src/api/system/trainingItem.js
+++ b/src/api/system/trainingItem.js
@@ -15,6 +15,15 @@ export function listTrainingCategory(query) {
params: query
})
}
+// 父级项目组
+export function selectTrainingParent(query) {
+ return request({
+ url: '/system/trainingItem/selectTrainingParent',
+ method: 'get',
+ params: query
+ })
+}
+
// 查询学习培训项目信息详细
export function getTrainingItem(id) {
return request({
diff --git a/src/components/Editor/index.vue b/src/components/Editor/index.vue
index a7e251d..8244881 100644
--- a/src/components/Editor/index.vue
+++ b/src/components/Editor/index.vue
@@ -59,7 +59,7 @@ export default {
},
url: {
type: String,
- default: "",
+ default: "/common/richTextPictureUrl",
},
filetypes: {
type: String,
diff --git a/src/views/system/trainingItem/index.vue b/src/views/system/trainingItem/index.vue
index 4cb3aca..8c3b655 100644
--- a/src/views/system/trainingItem/index.vue
+++ b/src/views/system/trainingItem/index.vue
@@ -130,7 +130,7 @@
}}
{{
scope.row.trainingItemType == "LEARNING_ITEM_GROUP"
- ? "培训项目组"
+ ? "学习培训项目组"
: ""
}}
@@ -200,6 +200,96 @@
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -323,6 +413,7 @@
@@ -372,7 +463,49 @@
placeholder="请输入培训项目价格"
/>
+
+ {{ form.trainingItemTitle }}
+ {{ form.trainingItemTitle }}
+
+
+
+
+
+
-->
-
-
-
-
-
+
{
+ console.log(response);
+ this.trainingParentlist = response.rows;
+ this.total3 = response.total;
+ this.loading = false;
+ });
+ },
imgUrl(imgUrl) {
this.form.trainingCategoryPictureUrl = imgUrl;
},
@@ -930,7 +1105,7 @@ export default {
id: null,
trainingCategoryName: "请选择培训分类",
trainingCategoryId: null,
- trainingItemTitle: null,
+ trainingItemTitle: "",
trainingItemCode: null,
trainingItemPrice: null,
trainingItemCoverUrl: null,
@@ -971,6 +1146,17 @@ export default {
},
/** 新增按钮操作 */
handleAdd() {
+ this.form = {
+ trainingItemDirectoryList: [
+ {
+ itemDirectoryName: null,
+ itemDirectoryTitle: null,
+ itemDirectoryUrl: null,
+ itemDirectoryIntroduce: null,
+ itemDirectorySort: null,
+ },
+ ],
+ };
this.reset();
this.open = true;
this.isEditFlag = false;
@@ -999,24 +1185,17 @@ export default {
},
/** 提交按钮 */
submitForm() {
- if (this.form.trainingItemStartTime) {
- this.form.trainingItemStartTimeStr = this.form.trainingItemStartTime;
- } else {
- this.form.trainingItemStartTimeStr = "00:00:00";
- }
- this.form.trainingItemDirectoryList.forEach((e) => {
- if (
- e.itemDirectoryIntroduce == null &&
- e.itemDirectoryName == null &&
- e.itemDirectoryTitle == null &&
- e.itemDirectoryUrl == null &&
- e.itemDirectorySort == null
- ) {
- this.form.trainingItemDirectoryList = [];
- }
- });
this.$refs["form"].validate((valid) => {
if (valid) {
+ if (this.form.trainingItemStartTime) {
+ this.form.trainingItemStartTimeStr =
+ this.form.trainingItemStartTime;
+ } else {
+ this.form.trainingItemStartTimeStr = "00:00:00";
+ }
+ if (this.form.trainingItemType == "GRAPHIC_LEARNING"||this.form.trainingItemType == "LEARNING_ITEM_GROUP") {
+ this.form.trainingItemDirectoryList = [];
+ }
if (this.form.trainingItemId != null) {
updateTrainingItem(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");