Pārlūkot izejas kodu

新增插件vue-quill-editor 提交就业指导计划

yangzj 2 gadi atpakaļ
vecāks
revīzija
74a14d65ff

+ 2 - 1
package.json

@@ -15,12 +15,13 @@
     "element-china-area-data": "^5.0.2",
     "element-ui": "^2.15.9",
     "js-cookie": "^3.0.1",
-    "quill": "^1.3.7",
+    "quill-image-extend-module": "^1.1.2",
     "register-service-worker": "^1.7.2",
     "swiper": "5.x",
     "vue": "^2.6.14",
     "vue-awesome-swiper": "4.1.1",
     "vue-pdf": "4.3.0",
+    "vue-quill-editor": "^3.0.6",
     "vue-router": "^3.5.1",
     "vuex": "^3.6.2"
   },

+ 17 - 1
src/api/CooperativeColleges/index.js

@@ -3,7 +3,7 @@
  * @Author: 空白格
  * @Date: 2022-08-11 17:29:58
  * @LastEditors: 空白格
- * @LastEditTime: 2022-08-16 10:59:17
+ * @LastEditTime: 2022-08-29 10:31:43
  * @FilePath: \veterans_client_web\src\api\CooperativeColleges\index.js
  * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
  */
@@ -39,3 +39,19 @@ export function getSchoolDetails(params) {
     params
   })
 }
+
+/**
+ * 获取专业详情
+ * @param {*} params
+ * @returns
+ */
+export function getSchoolProfessionalDetails(params) {
+  return request({
+    url: '/app/school/getProfessonDetail/' + params.id,
+    method: 'get',
+    headers: {
+      noLoginFlag: true
+    },
+    params
+  })
+}

+ 9 - 0
src/api/File/index.vue

@@ -0,0 +1,9 @@
+<!--
+ * @Description: 文件api
+ * @Author: 空白格
+ * @Date: 2022-08-29 11:21:23
+ * @LastEditors: 空白格
+ * @LastEditTime: 2022-08-29 11:21:23
+ * @FilePath: \veterans_client_web\src\api\File\index.vue
+ * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
+-->

+ 23 - 10
src/api/WorkGuide/index.js

@@ -3,11 +3,11 @@
  * @Author: 空白格
  * @Date: 2022-08-12 13:03:10
  * @LastEditors: 空白格
- * @LastEditTime: 2022-08-25 14:18:13
+ * @LastEditTime: 2022-08-29 13:45:51
  * @FilePath: \veterans_client_web\src\api\WorkGuide\index.js
  * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
  */
-import request from "@/utils/request";
+import request from '@/utils/request'
 /**
  * 获取创业指导列表
  * @param {*} params
@@ -15,10 +15,10 @@ import request from "@/utils/request";
  */
 export function getWorkGuideData(params) {
   return request({
-    url: "/app/guidance",
-    method: "get",
-    params,
-  });
+    url: '/app/guidance',
+    method: 'get',
+    params
+  })
 }
 
 /**
@@ -28,8 +28,21 @@ export function getWorkGuideData(params) {
  */
 export function getWorkGuideDetails(params) {
   return request({
-    url: "/app/guidance/getDetail/" + params.id,
-    method: "get",
-    params,
-  });
+    url: '/app/guidance/getDetail/' + params.id,
+    method: 'get',
+    params
+  })
+}
+
+/**
+ * 添加创业指导
+ * @param {*} data
+ * @returns
+ */
+export function addWorkGuide(data) {
+  return request({
+    url: '/app/guidance',
+    method: 'post',
+    data
+  })
 }

+ 119 - 0
src/components/Quill/index.vue

@@ -0,0 +1,119 @@
+<!--
+ * @Description: 富文本编辑器封装
+ * @Author: 空白格
+ * @Date: 2022-08-29 11:20:00
+ * @LastEditors: 空白格
+ * @LastEditTime: 2022-08-29 11:58:45
+ * @FilePath: \veterans_client_web\src\components\Quill\index.vue
+ * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
+-->
+
+<template>
+  <quill-editor
+    class="editor"
+    v-model="myContent"
+    ref="myQuillEditor"
+    :options="editorOption"
+    @blur="onEditorBlur($event)"
+    @focus="onEditorFocus($event)"
+    @change="onEditorChange($event)"
+  >
+  </quill-editor>
+</template>
+
+<script>
+import { quillEditor, Quill } from "vue-quill-editor";
+import { ImageExtend, QuillWatch } from "quill-image-extend-module";
+
+Quill.register("modules/ImageExtend", ImageExtend);
+
+// 工具栏配置
+const toolbarOptions = [
+  ["bold", "italic", "underline", "strike"], // 加粗 斜体 下划线 删除线 -----['bold', 'italic', 'underline', 'strike']
+  ["blockquote", "code-block"], // 引用  代码块-----['blockquote', 'code-block']
+  [{ header: 1 }, { header: 2 }], // 1、2 级标题-----[{ header: 1 }, { header: 2 }]
+  [{ list: "ordered" }, { list: "bullet" }], // 有序、无序列表-----[{ list: 'ordered' }, { list: 'bullet' }]
+  [{ script: "sub" }, { script: "super" }], // 上标/下标-----[{ script: 'sub' }, { script: 'super' }]
+  [{ indent: "-1" }, { indent: "+1" }], // 缩进-----[{ indent: '-1' }, { indent: '+1' }]
+  [{ direction: "rtl" }], // 文本方向-----[{'direction': 'rtl'}]
+  [{ size: ["small", false, "large", "huge"] }], // 字体大小-----[{ size: ['small', false, 'large', 'huge'] }]
+  [{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题-----[{ header: [1, 2, 3, 4, 5, 6, false] }]
+  [{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色-----[{ color: [] }, { background: [] }]
+  [{ font: [] }], // 字体种类-----[{ font: [] }]
+  [{ align: [] }], // 对齐方式-----[{ align: [] }]
+  ["clean"], // 清除文本格式-----['clean']
+  ["link", "image"], // 链接、图片、视频-----['link', 'image', 'video']
+];
+
+export default {
+  name: "Quill",
+  components: { quillEditor },
+  props: {
+    content: {
+      type: String,
+      default: "",
+    },
+    placeholder: {
+      type: String,
+      default: "请输入内容",
+    },
+  },
+  data() {
+    return {
+      // 富文本
+      myContent: this.content,
+      editorOption: {
+        placeholder: this.placeholder,
+        theme: "snow", // or 'bubble'
+        modules: {
+          ImageExtend: {
+            loading: true,
+            name: "file",
+            size: 2, // 可选参数 图片大小,单位为M,1M = 1024kb
+            action: process.env.VUE_APP_BASE_API + "/file/upload/single/minio",
+            header: {
+              Authorization: `Bearer ${this.$store.state.user.token}`,
+            },
+            response: (res) => {
+              // // 图片下载路径
+              let url = ``;
+              if (res.code === 200) {
+                url = res.data.url ?? "";
+              }
+              return url;
+            },
+          },
+          toolbar: {
+            container: toolbarOptions,
+            handlers: {
+              image: function () {
+                QuillWatch.emit(this.quill.id);
+              },
+            },
+          },
+        },
+      },
+    };
+  },
+  watch: {
+    // 监听content值变化, 确保输入框中的数据刷新
+    content() {
+      this.myContent = this.content;
+    },
+  },
+  methods: {
+    // 失去焦点事件
+    onEditorBlur() {
+      this.$emit("onEditorBlur", this.myContent);
+    },
+    // 获得焦点事件
+    onEditorFocus() {
+      this.$emit("onEditorFocus", this.myContent);
+    },
+    // 内容改变事件
+    onEditorChange() {
+      this.$emit("onEditorChange", this.myContent);
+    },
+  },
+};
+</script>

+ 3 - 0
src/main.js

@@ -8,6 +8,9 @@ import ElementUI from 'element-ui'
 import 'element-ui/lib/theme-chalk/index.css'
 import VueAwesomeSwiper from 'vue-awesome-swiper'
 import 'swiper/css/swiper.css'
+// 富文本编辑器样式
+import 'quill/dist/quill.core.css'
+import 'quill/dist/quill.snow.css'
 Vue.use(VueAwesomeSwiper)
 Vue.use(ElementUI)
 

+ 66 - 19
src/router/index.js

@@ -90,6 +90,17 @@ const routes = [
           title: '院校详情'
         }
       },
+      {
+        path: 'cooperativecolleges/professionalintroduction',
+        name: 'ProfessionalIntroductionIndex',
+        component: () =>
+          import(
+            '@/views/CooperativeColleges/CollegesDetails/ProfessionalIntroduction/ProfessionalIntroductionIndex.vue'
+          ),
+        meta: {
+          title: '专业详情'
+        }
+      },
       {
         path: 'skilltraining',
         name: 'SkillTrainingIndex',
@@ -101,7 +112,8 @@ const routes = [
       {
         path: 'skilltraining/skillpackage',
         name: 'SkillPackageIndex',
-        component: () => import('@/views/SkillTraining/SkillPackage/SkillPackageIndex.vue'),
+        component: () =>
+          import('@/views/SkillTraining/SkillPackage/SkillPackageIndex.vue'),
         meta: {
           title: '技能包'
         }
@@ -109,7 +121,10 @@ const routes = [
       {
         path: 'skilltraining/selectedcourses',
         name: 'SelectedCoursesIndex',
-        component: () => import('@/views/SkillTraining/SkillPackage/SelectedCourses/SelectedCoursesIndex.vue'),
+        component: () =>
+          import(
+            '@/views/SkillTraining/SkillPackage/SelectedCourses/SelectedCoursesIndex.vue'
+          ),
         meta: {
           title: '精选课程'
         }
@@ -117,7 +132,8 @@ const routes = [
       {
         path: 'skilltraining/coursevideo',
         name: 'CourseVideoIndex',
-        component: () => import('@/views/SkillTraining/CourseVideo/CourseVideoIndex.vue'),
+        component: () =>
+          import('@/views/SkillTraining/CourseVideo/CourseVideoIndex.vue'),
         meta: {
           title: '课程详情'
         }
@@ -130,10 +146,21 @@ const routes = [
           title: '创业指引'
         }
       },
+      {
+        path: 'workguide/add',
+        name: 'AddWorkGuideIndex',
+        component: () => import('@/views/WorkGuide/AddWorkGuide/AddWorkGuideIndex.vue'),
+        meta: {
+          title: '提交创业计划'
+        }
+      },
       {
         path: 'workguide/details',
         name: 'WorkGuideDetailsIndex',
-        component: () => import('@/views/WorkGuide/WorkGuideDetails/WorkGuideDetailsIndex.vue'),
+        component: () =>
+          import(
+            '@/views/WorkGuide/WorkGuideDetails/WorkGuideDetailsIndex.vue'
+          ),
         meta: {
           title: '创业计划详情'
         }
@@ -151,7 +178,9 @@ const routes = [
         path: 'educationpromote/details',
         name: 'EducationPromoteDetailsIndex',
         component: () =>
-          import('@/views/EducationPromote/EducationPromoteDetails/EducationPromoteDetailsIndex.vue'),
+          import(
+            '@/views/EducationPromote/EducationPromoteDetails/EducationPromoteDetailsIndex.vue'
+          ),
         meta: {
           title: '学历提升详情'
         }
@@ -160,7 +189,9 @@ const routes = [
         path: 'educationpromote/recruitstudents',
         name: 'RecruitStudentsIndex',
         component: () =>
-          import('@/views/EducationPromote/RecruitStudents/RecruitStudentsIndex.vue'),
+          import(
+            '@/views/EducationPromote/RecruitStudents/RecruitStudentsIndex.vue'
+          ),
         meta: {
           title: '招生简章'
         }
@@ -169,7 +200,9 @@ const routes = [
         path: 'educationpromote/professionalintroduction',
         name: 'ProfessionalIntroductionIndex',
         component: () =>
-          import('@/views/EducationPromote/ProfessionalIntroduction/ProfessionalIntroductionIndex.vue'),
+          import(
+            '@/views/EducationPromote/ProfessionalIntroduction/ProfessionalIntroductionIndex.vue'
+          ),
         meta: {
           title: '专业详情'
         }
@@ -187,7 +220,9 @@ const routes = [
         path: 'adaptivetraining/onlinecoursedetails',
         name: 'OnlineCourseDetailsIndex',
         component: () =>
-          import('@/views/AdaptiveTraining/OnlineCourseDetails/OnlineCourseDetailsIndex.vue'),
+          import(
+            '@/views/AdaptiveTraining/OnlineCourseDetails/OnlineCourseDetailsIndex.vue'
+          ),
         meta: {
           title: '线上课程详情'
         }
@@ -196,7 +231,9 @@ const routes = [
         path: 'adaptivetraining/offlinecoursedetails',
         name: 'OfflineCourseDetailsIndex',
         component: () =>
-          import('@/views/AdaptiveTraining/OfflineCourseDetails/OfflineCourseDetailsIndex.vue'),
+          import(
+            '@/views/AdaptiveTraining/OfflineCourseDetails/OfflineCourseDetailsIndex.vue'
+          ),
         meta: {
           title: '线下课程详情'
         }
@@ -231,8 +268,7 @@ const routes = [
       {
         path: 'personalcenter/resumeEdit',
         name: 'ResumeEdit',
-        component: () =>
-          import('@/views/PersonalCenter/Resume/ResumeEdit.vue'),
+        component: () => import('@/views/PersonalCenter/Resume/ResumeEdit.vue'),
         meta: {
           title: '编辑简历'
         }
@@ -277,7 +313,9 @@ const routes = [
         path: 'personalcenter/skillsTrainingdetails',
         name: 'SkillsTrainingDetailsIndex',
         component: () =>
-          import('@/views/PersonalCenter/SkillTraining/SkillsTrainingDetails/SkillsTrainingDetailsIndex.vue'),
+          import(
+            '@/views/PersonalCenter/SkillTraining/SkillsTrainingDetails/SkillsTrainingDetailsIndex.vue'
+          ),
         meta: {
           title: '我的技能培训详情'
         }
@@ -286,7 +324,9 @@ const routes = [
         path: 'personalcenter/coursevideo',
         name: 'CourseVideoIndex',
         component: () =>
-          import('@/views/PersonalCenter/SkillTraining/SkillsTrainingDetails/CourseVideo/CourseVideoIndex.vue'),
+          import(
+            '@/views/PersonalCenter/SkillTraining/SkillsTrainingDetails/CourseVideo/CourseVideoIndex.vue'
+          ),
         meta: {
           title: '课程视频'
         }
@@ -295,7 +335,9 @@ const routes = [
         path: 'personalcenter/achievementcertificate',
         name: 'AchievementCertificateIndex',
         component: () =>
-          import('@/views/PersonalCenter/SkillTraining/SkillsTrainingDetails/AchievementCertificate/AchievementCertificateIndex.vue'),
+          import(
+            '@/views/PersonalCenter/SkillTraining/SkillsTrainingDetails/AchievementCertificate/AchievementCertificateIndex.vue'
+          ),
         meta: {
           title: '成绩与证书'
         }
@@ -304,7 +346,9 @@ const routes = [
         path: 'personalcenter/progresspoints',
         name: 'ProgressPointsIndex',
         component: () =>
-          import('@/views/PersonalCenter/ProgressPoints/ProgressPointsIndex.vue'),
+          import(
+            '@/views/PersonalCenter/ProgressPoints/ProgressPointsIndex.vue'
+          ),
         meta: {
           title: '进步积分'
         }
@@ -313,7 +357,9 @@ const routes = [
         path: 'personalcenter/progresspoints/integralrule',
         name: 'IntegralRuleIndex',
         component: () =>
-          import('@/views/PersonalCenter/ProgressPoints/IntegralRule/IntegralRuleIndex.vue'),
+          import(
+            '@/views/PersonalCenter/ProgressPoints/IntegralRule/IntegralRuleIndex.vue'
+          ),
         meta: {
           title: '积分规则'
         }
@@ -322,7 +368,9 @@ const routes = [
         path: 'applyeducationauth',
         name: 'ApplyEducationAuthIndex',
         component: () =>
-          import('@/views/PersonalCenter/ApplyEducationAuth/ApplyEducationAuthIndex.vue'),
+          import(
+            '@/views/PersonalCenter/ApplyEducationAuth/ApplyEducationAuthIndex.vue'
+          ),
         meta: {
           title: '退役军人认证'
         }
@@ -330,8 +378,7 @@ const routes = [
       {
         path: 'newscenter',
         name: 'NewsCenterIndex',
-        component: () =>
-          import('@/views/NewsCenter/NewsCenterIndex.vue'),
+        component: () => import('@/views/NewsCenter/NewsCenterIndex.vue'),
         meta: {
           title: '新闻中心'
         }

+ 2 - 2
src/views/AdaptiveTraining/AdaptiveTrainingIndex.vue

@@ -3,7 +3,7 @@
  * @Author: 空白格
  * @Date: 2022-08-12 15:23:44
  * @LastEditors: 空白格
- * @LastEditTime: 2022-08-25 16:11:24
+ * @LastEditTime: 2022-08-29 14:03:52
  * @FilePath: \veterans_client_web\src\views\AdaptiveTraining\AdaptiveTrainingIndex.vue
  * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
 -->
@@ -48,7 +48,7 @@
             </div>
           </div>
           <div class="atcs-right">
-            <el-button class="atcs-right-btn">开始学习</el-button>
+            <!-- <el-button class="atcs-right-btn">开始学习</el-button> -->
           </div>
         </div>
         <div

+ 2 - 2
src/views/AdaptiveTraining/OfflineCourseDetails/OfflineCourseDetailsIndex.vue

@@ -3,7 +3,7 @@
  * @Author: 空白格
  * @Date: 2022-08-24 10:44:26
  * @LastEditors: 空白格
- * @LastEditTime: 2022-08-25 16:15:08
+ * @LastEditTime: 2022-08-29 14:04:39
  * @FilePath: \veterans_client_web\src\views\AdaptiveTraining\OfflineCourseDetails\OfflineCourseDetailsIndex.vue
  * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
 -->
@@ -19,7 +19,7 @@
           <span>({{ detainsInfo.adaptAddress }})</span>
         </div>
         <div class="details-box-content-des">
-          <div class="dbcd-content" v-html="detainsInfo.adaptPlan"></div>
+          <div class="dbcd-content ql-editor" v-html="detainsInfo.adaptPlan"></div>
         </div>
       </div>
     </div>

+ 31 - 4
src/views/CooperativeColleges/CollegesDetails/CollegesDetailsIndex.vue

@@ -3,7 +3,7 @@
  * @Author: 空白格
  * @Date: 2022-08-16 10:40:45
  * @LastEditors: 空白格
- * @LastEditTime: 2022-08-22 10:08:53
+ * @LastEditTime: 2022-08-29 13:59:56
  * @FilePath: \veterans_client_web\src\views\CooperativeColleges\CollegesDetails\CollegesDetailsIndex.vue
  * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
 -->
@@ -58,7 +58,7 @@
         <div class="edmi-introduce">
           <h4>学校信息</h4>
           <template v-if="details.detatil">
-            <div v-html="details.detatil"></div>
+            <div class="ql-editor" v-html="details.detatil"></div>
           </template>
           <template v-else>
             <div class="edmi-introduce-content">暂无学校信息</div>
@@ -127,7 +127,14 @@
                 v-for="(item, index) in details.twinList"
                 :key="index"
               >
-                <div class="edmi-position-list-item">
+                <div
+                  class="edmi-position-list-item"
+                  @click="
+                    jumpPage('/cooperativecolleges/professionalintroduction', {
+                      id: item.id,
+                    })
+                  "
+                >
                   <div class="epli-left">
                     {{ item.professionName }}(专业代码:{{
                       item.professionCode
@@ -163,7 +170,14 @@
                 v-for="(item, index) in details.enrollList"
                 :key="index"
               >
-                <div class="edmi-position-list-item">
+                <div
+                  class="edmi-position-list-item"
+                  @click="
+                    jumpPage('/cooperativecolleges/professionalintroduction', {
+                      id: item.id,
+                    })
+                  "
+                >
                   <div class="epli-left">
                     {{ item.professionName }}(专业代码:{{
                       item.professionCode
@@ -250,6 +264,19 @@ export default {
         window.open(link);
       }
     },
+    /**
+     * 跳转
+     * @date 2022-08-29
+     * @param {any} path
+     * @param {any} query
+     * @returns {any}
+     */
+    jumpPage(path, query) {
+      this.$router.push({
+        path,
+        query,
+      });
+    },
   },
   filters: {
     filtersDict(val, list) {

+ 171 - 0
src/views/CooperativeColleges/CollegesDetails/ProfessionalIntroduction/ProfessionalIntroductionIndex.vue

@@ -0,0 +1,171 @@
+<!--
+ * @Description: 专业详情
+ * @Author: 空白格
+ * @Date: 2022-08-29 10:19:36
+ * @LastEditors: 空白格
+ * @LastEditTime: 2022-08-29 14:05:00
+ * @FilePath: \veterans_client_web\src\views\CooperativeColleges\CollegesDetails\ProfessionalIntroduction\ProfessionalIntroductionIndex.vue
+ * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
+-->
+<template>
+  <div class="app-main details">
+    <BannerBreadcrumb title="专业详情" :isRouter="true" />
+    <div class="app-main-box details-box">
+      <div class="app-main-box-content details-box-content">
+        <div class="details-box-content-title">
+          {{ detainsInfo.professionName || "-" }}
+        </div>
+        <div class="details-box-content-subtitle">
+          <span>(专业代码:{{ detainsInfo.professionCode }})</span>
+        </div>
+        <div class="details-box-content-des">
+          <div class="dbcd-content ql-editor" v-html="detainsInfo.professionDetail"></div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import BannerBreadcrumb from "@/components/BannerBreadcrumb";
+import { getSchoolProfessionalDetails } from "@/api/CooperativeColleges";
+export default {
+  name: "WorkGuideDetailsIndex",
+  components: {
+    BannerBreadcrumb,
+  },
+  data() {
+    return {
+      detainsInfo: {},
+      id: undefined,
+    };
+  },
+  created() {
+    const { id } = this.$route.query;
+    if (id) {
+      this.id = id;
+      this.getDetails();
+    }
+  },
+  methods: {
+    /**
+     * 获取详情
+     * @date 2022-08-25
+     * @returns {any}
+     */
+    getDetails() {
+      getSchoolProfessionalDetails({ id: this.id }).then((res) => {
+        if (res.code === 200) {
+          this.detainsInfo = res?.data;
+        }
+      });
+    },
+    /**
+     * 预览pdf
+     * @date 2022-08-25
+     * @param {any} pdfUrl
+     * @returns {any}
+     */
+    previewPdf(pdfUrl) {
+      if (pdfUrl) {
+        window.open("http://www.gjtool.cn/pdfh5/pdf.html?file=" + pdfUrl);
+      }
+    },
+    /**
+     * 下载附件
+     * @date 2022-08-29
+     * @returns {any}
+     */
+    downloadFile() {
+      if (this.detainsInfo.regulation_file) {
+        window.open(this.detainsInfo.regulation_file);
+      }
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.details {
+  &-box {
+    margin: 0 auto;
+    &-content {
+      &-title {
+        padding: 10px 0;
+        text-align: center;
+        font-size: 24px;
+        color: #1a1a1a;
+        border-bottom: 1px solid #d5d5d5;
+      }
+      &-subtitle {
+        text-align: center;
+        margin: 20px 0 40px;
+        font-size: 14px;
+        color: #999999;
+        span {
+          cursor: pointer;
+        }
+        .no-reply {
+          color: #ef6622;
+        }
+        .has-reply {
+          color: #3ca7fe;
+        }
+      }
+      &-des {
+        .dbcd-label {
+          font-size: 20px;
+          color: #1a1a1a;
+          margin-bottom: 20px;
+          font-family: SourceHanSansCN;
+        }
+        .dbcd-content {
+          color: #666666;
+          font-size: 14px;
+        }
+        // :deep(.dbcd-content) {
+        //   p {
+        //     img {
+        //       display: block;
+        //       margin: 0 auto;
+        //     }
+        //   }
+        // }
+      }
+      &-pdf {
+        text-align: center;
+        margin: 20px auto 30px;
+        div {
+          display: inline-block;
+          padding: 0 100px;
+          max-width: 700px;
+          cursor: pointer;
+          height: 50px;
+          line-height: 50px;
+          text-align: center;
+          font-size: 14px;
+          color: #008fff;
+          border: dashed 1px #0091ff;
+          border-radius: 5px;
+          white-space: nowrap;
+          overflow: hidden;
+          text-overflow: ellipsis;
+          word-break: break-all;
+        }
+      }
+      &-reply {
+        .dbcr-label {
+          font-size: 20px;
+          color: #1a1a1a;
+          margin-bottom: 20px;
+          font-family: SourceHanSansCN;
+        }
+        .dbcr-content {
+          color: #666666;
+          font-size: 14px;
+        }
+      }
+    }
+  }
+}
+</style>

+ 7 - 11
src/views/CooperativeEnterprise/EnterprisePosition/EnterprisePositionIndex.vue

@@ -1,11 +1,11 @@
 <!--
- * @Description: 
+ * @Description:
  * @Author: gcz
  * @Date: 2022-08-23 15:06:48
- * @LastEditors: gcz
- * @LastEditTime: 2022-08-25 18:00:22
+ * @LastEditors: 空白格
+ * @LastEditTime: 2022-08-29 11:09:14
  * @FilePath: \veterans_client_web\src\views\CooperativeEnterprise\EnterprisePosition\EnterprisePositionIndex.vue
- * @Copyright: Copyright (c) 2016~2022 by gcz, All Rights Reserved. 
+ * @Copyright: Copyright (c) 2016~2022 by gcz, All Rights Reserved.
 -->
 <template>
   <div class="app-main">
@@ -197,7 +197,7 @@ export default {
         case 9:
           this.$message.warning('您还未进行认证,该功能需要认证后才能使用!')
           break;
-      }   
+      }
     },
     applyJob(){
       this.$confirm("您确认申请该职位吗?", "提示", {
@@ -211,17 +211,13 @@ export default {
           }
         })
       })
-      
+
     }
   },
 };
 </script>
 
 <style lang='scss' scoped>
-// "vue-quill-editor": "^3.0.6"
-// import "quill/dist/quill.core.css";
-// import "quill/dist/quill.snow.css";
-// import "quill/dist/quill.bubble.css";
 .app-main-box-content{
   min-height: calc( 100vh - 73px - 180px - 100px - 40px - 23px );
   position: relative;
@@ -357,4 +353,4 @@ export default {
     }
   }
 }
-</style>
+</style>

+ 2 - 2
src/views/EducationPromote/RecruitStudents/RecruitStudentsIndex.vue

@@ -3,7 +3,7 @@
  * @Author: 空白格
  * @Date: 2022-08-26 17:56:21
  * @LastEditors: 空白格
- * @LastEditTime: 2022-08-29 09:55:11
+ * @LastEditTime: 2022-08-29 14:05:10
  * @FilePath: \veterans_client_web\src\views\EducationPromote\RecruitStudents\RecruitStudentsIndex.vue
  * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
 -->
@@ -22,7 +22,7 @@
           </p>
         </div>
         <div class="details-box-content-des">
-          <div class="dbcd-content" v-html="detainsInfo.regulation"></div>
+          <div class="dbcd-content ql-editor" v-html="detainsInfo.regulation"></div>
         </div>
       </div>
     </div>

+ 2 - 2
src/views/NewsCenter/NewsDetails/NewsDetailsIndex.vue

@@ -24,7 +24,7 @@
           <span>发布时间:{{newsData.updateTime}}</span>
           <span>文章来源:{{newsData.artAuthor}}</span>
         </div>
-        <div class="art-content" v-html="newsData.artContent"></div>
+        <div class="art-content ql-editor" v-html="newsData.artContent"></div>
       </section>
     </div>
   </div>
@@ -40,7 +40,7 @@ export default{
   },
   data() {
     return {
-      newsData:{},   
+      newsData:{},
     }
   },
   created(){

+ 2 - 2
src/views/NewsCenter/NoticeDetails/NoticeDetailsIndex.vue

@@ -24,7 +24,7 @@
           <span>发布时间:{{newsData.createTime}}</span>
           <span>文章来源:{{newsData.createBy}}</span>
         </div>
-        <div class="art-content">{{newsData.content}}</div>
+        <div class="art-content ql-editor">{{newsData.content}}</div>
       </section>
     </div>
   </div>
@@ -39,7 +39,7 @@ export default{
   },
   data() {
     return {
-      newsData:{},   
+      newsData:{},
     }
   },
   created(){

+ 2 - 2
src/views/SkillTraining/SkillPackage/SkillPackageIndex.vue

@@ -3,7 +3,7 @@
  * @Author: 空白格
  * @Date: 2022-08-26 10:41:50
  * @LastEditors: 空白格
- * @LastEditTime: 2022-08-29 09:29:08
+ * @LastEditTime: 2022-08-29 14:02:15
  * @FilePath: \veterans_client_web\src\views\SkillTraining\SkillPackage\SkillPackageIndex.vue
  * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
 -->
@@ -74,7 +74,7 @@
       <div class="_center">
         <div class="skill-center">
           <h2>技能详解</h2>
-          <div v-html="skillDetail.description"></div>
+          <div class="ql-editor" v-html="skillDetail.description"></div>
         </div>
       </div>
     </div>

+ 218 - 0
src/views/WorkGuide/AddWorkGuide/AddWorkGuideIndex.vue

@@ -0,0 +1,218 @@
+<!--
+ * @Description: 提交创业计划
+ * @Author: 空白格
+ * @Date: 2022-08-29 10:55:10
+ * @LastEditors: 空白格
+ * @LastEditTime: 2022-08-29 13:48:43
+ * @FilePath: \veterans_client_web\src\views\WorkGuide\AddWorkGuide\AddWorkGuideIndex.vue
+ * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
+-->
+<template>
+  <div class="app-main work-guide">
+    <BannerBreadcrumb title="创业指引" :isRouter="true" />
+    <div class="app-main-box">
+      <div class="app-main-box-content">
+        <div class="work-guide-title">提交创业计划</div>
+        <div class="work-guide-form">
+          <el-form :model="form" :rules="rules" ref="form" label-position="top">
+            <el-form-item prop="title" label="名称:">
+              <el-input v-model="form.title" placeholder="请输入名称" />
+            </el-form-item>
+            <el-form-item prop="description" label="描述:">
+              <Quill
+                class="quill"
+                :content="form.description"
+                placeholder="请输入描述"
+                @onEditorChange="onEditorChange"
+              />
+            </el-form-item>
+            <el-form-item prop="planBookUrl" label="创业计划书:">
+              <el-upload
+                :action="upload.action"
+                :headers="upload.headers"
+                :on-success="uploadSuccess"
+                :on-error="uploadError"
+                :on-preview="filePreview"
+                :limit="1"
+                :multiple="false"
+                accept=".pdf"
+                class="pdf-box"
+              >
+                <el-button class="pdf-btn">*请上传文件.(仅支持pdf)</el-button>
+              </el-upload>
+              <view-pdf ref="viewPdf" />
+            </el-form-item>
+            <el-form-item align="center">
+              <el-button class="sub-btn" :loading="loading" @click="submitForm"
+                >提交</el-button
+              >
+            </el-form-item>
+          </el-form>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import BannerBreadcrumb from "@/components/BannerBreadcrumb";
+import ViewPdf from "@/components/ViewPdf";
+import Quill from "@/components/Quill";
+import { addWorkGuide } from "@/api/WorkGuide";
+export default {
+  name: "AddWorkGuideIndex",
+  components: {
+    BannerBreadcrumb,
+    Quill,
+    ViewPdf,
+  },
+  data() {
+    return {
+      form: {
+        title: "",
+        description: "",
+        planBookUrl: "",
+        planBookName: "",
+      },
+      rules: {
+        title: [{ required: true, message: "请输入名称", trigger: "blur" }],
+        description: [
+          {
+            required: true,
+            message: "请输入描述",
+            trigger: ["blur", "change"],
+          },
+        ],
+        planBookUrl: [
+          {
+            required: true,
+            message: "请上传创业计划书",
+            trigger: ["blur", "change"],
+          },
+        ],
+      },
+      upload: {
+        action: process.env.VUE_APP_BASE_API + "/file/upload/single/minio",
+        headers: {
+          Authorization: `Bearer ${this.$store.state.user.token}`,
+        },
+      },
+      loading: false,
+    };
+  },
+  methods: {
+    /**
+     * 富文本编辑器修改触发
+     * @date 2022-08-29
+     * @param {any} content
+     * @returns {any}
+     */
+    onEditorChange(content) {
+      this.form.description = content;
+    },
+    /**
+     * 上传成功
+     * @date 2022-08-29
+     * @param {any} res
+     * @returns {any}
+     */
+    uploadSuccess(res) {
+      if (res.code === 200) {
+        this.form.planBookUrl = res.data.url;
+        this.form.planBookName = res.data.fileName;
+      }
+    },
+    /**
+     * 上传失败
+     * @date 2022-08-29
+     * @param {any} err
+     * @returns {any}
+     */
+    uploadError(err) {
+      this.$message.error(err.msg || "上传失败!");
+    },
+    /**
+     * 预览pdf
+     * @date 2022-08-29
+     * @param {any} file
+     * @returns {any}
+     */
+    filePreview(file) {
+      const { url } = file.response.data;
+      if (url) {
+        this.$refs["viewPdf"].openDialog(url);
+      }
+    },
+    /**
+     * 提交表单
+     * @date 2022-08-29
+     * @returns {any}
+     */
+    submitForm() {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          this.loading = true;
+          addWorkGuide(this.form)
+            .then((res) => {
+              if (res.code === 200) {
+                this.$message.success("提交成功!");
+                setTimeout(() => {
+                  this.loading = false;
+                  this.$router.push("/workguide");
+                }, 300);
+              } else {
+                this.$message.error("提交失败!");
+                this.loading = false;
+              }
+            })
+            .catch(() => {
+              this.loading = false;
+            });
+        }
+      });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.work-guide {
+  &-title {
+    text-align: center;
+    border-bottom: 1px solid #d7d7d7;
+    padding-bottom: 20px;
+    font-size: 20px;
+    color: #222222;
+  }
+  &-form {
+    width: 80%;
+    margin: 0 auto;
+    padding: 20px 0;
+    .quill {
+      :deep(.ql-editor) {
+        min-height: 20vh;
+      }
+    }
+    .pdf-box {
+      width: 100%;
+      :deep(.el-upload) {
+        width: 100%;
+      }
+    }
+    .pdf-btn {
+      width: 100%;
+      text-align: center;
+      border: dashed 1px #0091ff;
+      color: #008fff;
+      cursor: pointer;
+      font-size: 14px;
+    }
+    .sub-btn {
+      background: #709078;
+      border-bottom: 1px solid #709078;
+      color: #fff;
+      padding: 12px 100px;
+    }
+  }
+}
+</style>

+ 2 - 2
src/views/WorkGuide/WorkGuideDetails/WorkGuideDetailsIndex.vue

@@ -3,7 +3,7 @@
  * @Author: 空白格
  * @Date: 2022-08-25 13:30:07
  * @LastEditors: 空白格
- * @LastEditTime: 2022-08-25 17:01:01
+ * @LastEditTime: 2022-08-29 13:55:28
  * @FilePath: \veterans_client_web\src\views\WorkGuide\WorkGuideDetails\WorkGuideDetailsIndex.vue
  * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
 -->
@@ -24,7 +24,7 @@
         </div>
         <div class="details-box-content-des">
           <div class="dbcd-label">描述</div>
-          <div class="dbcd-content" v-html="detainsInfo.description"></div>
+          <div class="dbcd-content ql-editor" v-html="detainsInfo.description"></div>
         </div>
         <div class="details-box-content-pdf" v-if="detainsInfo.planBookName">
           <div class="btn" @click="previewPdf(detainsInfo.planBookUrl)">{{ detainsInfo.planBookName }}</div>

+ 19 - 2
src/views/WorkGuide/WorkGuideIndex.vue

@@ -3,7 +3,7 @@
  * @Author: 空白格
  * @Date: 2022-08-12 11:41:14
  * @LastEditors: 空白格
- * @LastEditTime: 2022-08-29 10:05:25
+ * @LastEditTime: 2022-08-29 13:50:14
  * @FilePath: \veterans_client_web\src\views\WorkGuide\WorkGuideIndex.vue
  * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
 -->
@@ -12,6 +12,15 @@
     <BannerBreadcrumb title="创业指引" />
     <div class="app-main-box">
       <div class="app-main-box-content">
+        <div class="work-guide-add">
+          <el-button
+            class="work-guide-add-btn"
+            type="primary"
+            icon="el-icon-plus"
+            @click="jumpPage('/workguide/add')"
+            >提交创业计划</el-button
+          >
+        </div>
         <div
           class="work-guide-list"
           v-if="guideList.length"
@@ -132,6 +141,14 @@ export default {
 <style lang="scss" scoped>
 .work-guide {
   padding-bottom: 30px;
+  &-add {
+    margin-bottom: 20px;
+    &-btn {
+      background: #709078;
+      border-radius: 0;
+      border: solid 1px #709078;
+    }
+  }
   &-list {
     &-item {
       box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
@@ -140,7 +157,7 @@ export default {
       margin-bottom: 20px;
       cursor: pointer;
       .wgli-title {
-        font-size: 26px;
+        font-size: 20px;
         color: #000;
         margin-bottom: 5px;
       }

+ 15 - 2
yarn.lock

@@ -4898,7 +4898,7 @@ nth-check@^2.0.1:
   dependencies:
     boolbase "^1.0.0"
 
-object-assign@^4.0.1:
+object-assign@^4.0.1, object-assign@^4.1.1:
   version "4.1.1"
   resolved "https://registry.npmmirror.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
   integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==
@@ -5535,7 +5535,12 @@ quill-delta@^3.6.2:
     extend "^3.0.2"
     fast-diff "1.1.2"
 
-quill@^1.3.7:
+quill-image-extend-module@^1.1.2:
+  version "1.1.2"
+  resolved "https://registry.npmmirror.com/quill-image-extend-module/-/quill-image-extend-module-1.1.2.tgz#b7c303c45282ae87133d643324d5ca39c6d52921"
+  integrity sha512-yHJWZWlTjNZzV34zuT4H55ttDwMxmVJ7JUgKnt/Wd3ejUNcaPOV57/sKG8VEMU5mL7bKZPIKmBdb3weM0M5UeA==
+
+quill@^1.3.4:
   version "1.3.7"
   resolved "https://registry.npmmirror.com/quill/-/quill-1.3.7.tgz#da5b2f3a2c470e932340cdbf3668c9f21f9286e8"
   integrity sha512-hG/DVzh/TiknWtE6QmWAF/pxoZKYxfe3J/d/+ShUWkDvvkZQVTPeVmUJVu1uE6DDooC4fWTiCLh84ul89oNz5g==
@@ -6684,6 +6689,14 @@ vue-pdf@4.3.0:
     vue-resize-sensor "^2.0.0"
     worker-loader "^2.0.0"
 
+vue-quill-editor@^3.0.6:
+  version "3.0.6"
+  resolved "https://registry.npmmirror.com/vue-quill-editor/-/vue-quill-editor-3.0.6.tgz#1f85646211d68a31a80a72cb7f45bb2f119bc8fb"
+  integrity sha512-g20oSZNWg8Hbu41Kinjd55e235qVWPLfg4NvsLW6d+DhgBTFbEuMpcWlUdrD6qT3+Noim6DRu18VLM9lVShXOQ==
+  dependencies:
+    object-assign "^4.1.1"
+    quill "^1.3.4"
+
 vue-resize-sensor@^2.0.0:
   version "2.0.0"
   resolved "https://registry.npmmirror.com/vue-resize-sensor/-/vue-resize-sensor-2.0.0.tgz#3a587fd6802e1688709cf2c5aadae7a0075952bf"