Переглянути джерело

修改关于文章、视频的样式

huangtao 3 роки тому
батько
коміт
17a5d14d96

Різницю між файлами не показано, бо вона завелика
+ 129 - 129
package-lock.json


+ 108 - 103
src/views/articleManagement/articleCreate.vue

@@ -132,15 +132,15 @@
     <div class="common-card a-card-margin-top">
       <div class="information-title">文章内容</div>
       <TinymceEditor v-model="content"></TinymceEditor>
-      <div>
-        <div>上传附件</div>
+      <div class="upload-oss-file-div">
+        <div class="information-title">上传附件</div>
         <div>
           <a-upload
             :customRequest="uploadOssFile"
             :default-file-list="defaultFileList"
             :remove="removeOssFile"
           >
-            <a-button> <a-icon type="upload" />Upload </a-button>
+            <a-button> <a-icon type="upload" />点击上传</a-button>
           </a-upload>
         </div>
       </div>
@@ -172,39 +172,39 @@
 </template>
 
 <script>
-const OSS = require("ali-oss");
+const OSS = require('ali-oss');
 import {
   formatePathParams,
   formateStringDate,
-  formateDateToString
-} from "@/filters";
-import TinymceEditor from "@/components/tinymce/TinymceEditor"; // 富文本编辑组件
+  formateDateToString,
+} from '@/filters';
+import TinymceEditor from '@/components/tinymce/TinymceEditor'; // 富文本编辑组件
 export default {
-  name: "articleCreate",
+  name: 'articleCreate',
   props: {},
   components: {
-    TinymceEditor
+    TinymceEditor,
   },
   data() {
     return {
-      content: "",
+      content: '',
       //   展示预览
       previewVisible: false,
-      form: this.$form.createForm(this, { name: "articleCreate" }),
+      form: this.$form.createForm(this, { name: 'articleCreate' }),
       articleParentClassArr: [],
       articleChildClassArr: [],
       engineerTypeArray: [],
       articleParentClass: {},
       articleChildClass: {},
-      engineerType: "",
-      learnDate: "",
-      optionType: "",
-      description: "",
+      engineerType: '',
+      learnDate: '',
+      optionType: '',
+      description: '',
       bodyStyle: {
-        img: "{max-width:100%;}",
-        color: "red"
+        img: '{max-width:100%;}',
+        color: 'red',
       },
-      defaultFileList: []
+      defaultFileList: [],
     };
   },
   created() {
@@ -220,20 +220,20 @@ export default {
       await this.getArticleParentClass();
       await this.getEngineersWork();
       let type = this.$route.query.type;
-      this.optionType = type ? type : "create";
+      this.optionType = type ? type : 'create';
       // 判断是新增文章还是编辑文章
-      if ("edit" === type) {
-        console.log("---edit---");
+      if ('edit' === type) {
+        console.log('---edit---');
         await this.getArticleContent();
-      } else if ("create" === type) {
-        console.log("---create---");
+      } else if ('create' === type) {
+        console.log('---create---');
       }
     },
     // 查询文章分类父级
     getArticleParentClass() {
       this.$_http
         .get(this.$_API.INTERFACE_GET_CATEGORIES)
-        .then(res => {
+        .then((res) => {
           this.articleParentClassArr = res.data;
           this.loading = false;
         })
@@ -254,12 +254,12 @@ export default {
             pathParamsData
           )
         )
-        .then(res => {
+        .then((res) => {
           if (res && res.data.length !== 0) {
             this.articleChildClassArr = res.data;
             this.articleChildClass = this.articleChildClassArr[0];
             this.form.setFieldsValue({
-              articleChildClass: this.articleChildClass.name
+              articleChildClass: this.articleChildClass.name,
             });
           }
           this.loading = false;
@@ -272,8 +272,8 @@ export default {
     async getEngineersWork() {
       await this.$_http
         .get(this.$_API.INTERFACE_GET_ENGINEERINGWORK_LIST)
-        .then(res => {
-          this.engineerTypeArray = [{ name: "不限", id: "" }, ...res.data];
+        .then((res) => {
+          this.engineerTypeArray = [{ name: '不限', id: '' }, ...res.data];
           this.engineerType = this.engineerTypeArray[0];
         });
     },
@@ -284,7 +284,7 @@ export default {
       // 子类选项清空
       this.articleChildClassArr = [];
       this.form.setFieldsValue({
-        articleChildClass: ""
+        articleChildClass: '',
       });
       // 获取子类的值
       this.getArticleChildClass();
@@ -302,7 +302,7 @@ export default {
       this.learnDate = dateString;
     },
     handleSubmitBtnFun() {
-      document.getElementById("articleCreateSubmit").click();
+      document.getElementById('articleCreateSubmit').click();
     },
     // 查询文章内容
     getArticleContent() {
@@ -311,8 +311,8 @@ export default {
         .get(
           formatePathParams(this.$_API.INTERFACE_GET_MATERIALS, pathParamsData)
         )
-        .then(res => {
-          console.log("----" + JSON.stringify(res));
+        .then((res) => {
+          console.log('----' + JSON.stringify(res));
           this.initEditArticleForm(res.data);
           this.loading = false;
         })
@@ -321,13 +321,13 @@ export default {
         });
     },
     initEditArticleForm(item) {
-      console.log("--------" + JSON.stringify(item));
+      console.log('--------' + JSON.stringify(item));
       //   文章标题
       this.form.setFieldsValue({
-        name: item.name
+        name: item.name,
       });
       //   文章描述
-      this.description = item.description ? item.description : "";
+      this.description = item.description ? item.description : '';
       // 文章分类-父类:
       this.articleParentClass = item.rootMaterialCategory;
       this.getArticleChildClass(); // 获取子类列表的值
@@ -346,16 +346,16 @@ export default {
       let learnDate = item.tags.length > 0 ? item.tags[0] : null;
       // 必学日期
       this.learnDate = learnDate ? formateStringDate(learnDate) : null;
-      console.log("编辑初始化时间为YYYY-MM-DD", this.learnDate, learnDate);
+      console.log('编辑初始化时间为YYYY-MM-DD', this.learnDate, learnDate);
       // 文章内容
       this.content = item.contents;
       // 附件内容
-      item.links.forEach(element => {
+      item.links.forEach((element) => {
         let upFile = {
           uid: this.getUid(),
           name: this.getUrlName(element),
-          status: "done",
-          url: element
+          status: 'done',
+          url: element,
         };
         this.defaultFileList.push(upFile);
       });
@@ -363,7 +363,7 @@ export default {
     },
     // 截取路径名字
     getUrlName(url) {
-      let strArr = url.split("/");
+      let strArr = url.split('/');
       console.log(strArr);
       let fileName = strArr[strArr.length - 1];
       console.log(fileName);
@@ -374,62 +374,62 @@ export default {
     // 提交表单
     handleSubmit(e) {
       e.preventDefault();
-      if ("create" === this.optionType) {
-        console.log("创建文章");
+      if ('create' === this.optionType) {
+        console.log('创建文章');
         this.createArtical();
-      } else if ("edit" === this.optionType) {
-        console.log("更新文章");
+      } else if ('edit' === this.optionType) {
+        console.log('更新文章');
         this.updateArtical();
       }
     },
     createArtical() {
       this.form.setFieldsValue({
-        articleParentClass: this.articleParentClass.name
+        articleParentClass: this.articleParentClass.name,
       });
       this.form.setFieldsValue({
-        articleChildClass: this.articleChildClass.name
+        articleChildClass: this.articleChildClass.name,
       });
       this.form.setFieldsValue({
-        engineerType: this.engineerType.name
+        engineerType: this.engineerType.name,
       });
       this.form.validateFields((err, values) => {
         if (!err) {
           // 新建文章
           let that = this;
           that.$confirm({
-            title: "新建文章",
+            title: '新建文章',
             content: `确认新建文章吗?`,
-            okText: "确认",
-            cancelText: "取消",
+            okText: '确认',
+            cancelText: '取消',
             onOk() {
               that.loading = true;
               let params = {
                 categoryid: that.articleChildClass.id,
-                engineertypeid: that.engineerType.id
+                engineertypeid: that.engineerType.id,
               };
               let tag = formateDateToString(that.learnDate);
               let links = [];
-              that.defaultFileList.forEach(element => {
+              that.defaultFileList.forEach((element) => {
                 links.push(element.url);
               });
               let bodyParams = {
                 name: values.name,
                 description: values.description,
-                type: "ARTICLE",
+                type: 'ARTICLE',
                 contents: that.content,
                 tags: tag ? [tag] : [],
                 engineerTypes: [that.engineerType.id],
-                links: links
+                links: links,
               };
               that.$_http
                 .post(that.$_API.INTERFACE_POST_ADMIN_MATERIALS, bodyParams, {
-                  params
+                  params,
                 })
                 .then(() => {
-                  that.$message.success("新建文章成功");
+                  that.$message.success('新建文章成功');
                 });
             },
-            onCancel() {}
+            onCancel() {},
           });
         }
       });
@@ -441,19 +441,19 @@ export default {
           // 更新文章
           let that = this;
           that.$confirm({
-            title: "更新文章",
+            title: '更新文章',
             content: `确认更新文章吗?`,
-            okText: "确认",
-            cancelText: "取消",
+            okText: '确认',
+            cancelText: '取消',
             onOk() {
               that.loading = true;
               let params = {
                 categoryid: that.articleChildClass.id,
-                engineertypeid: that.engineerType.id
+                engineertypeid: that.engineerType.id,
               };
               let tag = formateDateToString(that.learnDate);
               let links = [];
-              that.defaultFileList.forEach(element => {
+              that.defaultFileList.forEach((element) => {
                 links.push(element.url);
               });
               console.log(links);
@@ -461,14 +461,14 @@ export default {
                 id: that.$route.query.id,
                 name: values.name,
                 description: values.description,
-                type: "ARTICLE",
+                type: 'ARTICLE',
                 contents: that.content,
                 tags: tag ? [tag] : [],
                 engineerTypes: [that.engineerType.id],
-                links: links
+                links: links,
               };
               console.log(
-                "保存修改日期格式为YYYYMMDD",
+                '保存修改日期格式为YYYYMMDD',
                 bodyParams.tags,
                 that.learnDate
               );
@@ -480,14 +480,14 @@ export default {
                   ),
                   bodyParams,
                   {
-                    params
+                    params,
                   }
                 )
                 .then(() => {
-                  that.$message.success("更新文章成功");
+                  that.$message.success('更新文章成功');
                 });
             },
-            onCancel() {}
+            onCancel() {},
           });
         }
       });
@@ -495,40 +495,42 @@ export default {
     uploadOssFile(fileData) {
       let file = fileData.file;
       let that = this;
-      let bucket = "jtxt-file-public";
+      let bucket = 'jtxt-file-public';
       // let filetype =
       //   ".pdf, .txt, .zip, .rar, .7z, .doc, .docx, .xls, .xlsx, .ppt, .pptx";
-      let ossPath = "file/";
-      that.$_http.get(that.$_API.INTERFACE_GET_ASSUME_OSS_WRITER).then(res => {
-        console.log("--oss-writer--" + JSON.stringify(res));
-        const client = new OSS({
-          // yourRegion填写Bucket所在地域。以华东1(杭州)为例,Region填写为oss-cn-hangzhou。
-          region: "oss-cn-beijing",
-          // 从STS服务获取的临时访问密钥(AccessKey ID和AccessKey Secret)。
-          accessKeyId: res.data.accessKeyId,
-          accessKeySecret: res.data.accessKeySecret,
-          // 从STS服务获取的安全令牌(SecurityToken)。
-          stsToken: res.data.securityToken,
-          // 填写Bucket名称。
-          bucket: bucket
-        });
-        try {
-          client.put(ossPath + file.name, file).then(res => {
-            console.log(res);
-            let upFile = {
-              uid: this.getUid(),
-              name: file.name,
-              status: "done",
-              url: res.url
-            };
-            this.defaultFileList.push(upFile);
-            fileData.onSuccess();
+      let ossPath = 'file/';
+      that.$_http
+        .get(that.$_API.INTERFACE_GET_ASSUME_OSS_WRITER)
+        .then((res) => {
+          console.log('--oss-writer--' + JSON.stringify(res));
+          const client = new OSS({
+            // yourRegion填写Bucket所在地域。以华东1(杭州)为例,Region填写为oss-cn-hangzhou。
+            region: 'oss-cn-beijing',
+            // 从STS服务获取的临时访问密钥(AccessKey ID和AccessKey Secret)。
+            accessKeyId: res.data.accessKeyId,
+            accessKeySecret: res.data.accessKeySecret,
+            // 从STS服务获取的安全令牌(SecurityToken)。
+            stsToken: res.data.securityToken,
+            // 填写Bucket名称。
+            bucket: bucket,
           });
-        } catch (e) {
-          fileData.onError();
-          console.error(e);
-        }
-      });
+          try {
+            client.put(ossPath + file.name, file).then((res) => {
+              console.log(res);
+              let upFile = {
+                uid: this.getUid(),
+                name: file.name,
+                status: 'done',
+                url: res.url,
+              };
+              this.defaultFileList.push(upFile);
+              fileData.onSuccess();
+            });
+          } catch (e) {
+            fileData.onError();
+            console.error(e);
+          }
+        });
     },
     removeOssFile(file) {
       for (let i = 0; i < this.defaultFileList.length; i++) {
@@ -540,7 +542,7 @@ export default {
       }
     },
     getUid() {
-      let uid = "";
+      let uid = '';
       for (let i = 0; i < 5; i++) {
         uid += Math.floor(Math.random() * 10);
       }
@@ -553,8 +555,8 @@ export default {
     // 关闭预览
     closepreview() {
       this.previewVisible = false;
-    }
-  }
+    },
+  },
 };
 </script>
 
@@ -570,7 +572,7 @@ export default {
 </style>
 
 <style lang="less" scoped>
-@import "~@/styles/common/variable.less";
+@import '~@/styles/common/variable.less';
 .app-container {
   .information-title {
     font-size: 18px;
@@ -585,5 +587,8 @@ export default {
     display: flex;
     justify-content: center;
   }
+  .upload-oss-file-div {
+    margin: @paddingMarginVal 0;
+  }
 }
 </style>

+ 43 - 43
src/views/articleManagement/articleList.vue

@@ -74,7 +74,7 @@
           :key="index"
         >
           <div class="article-list-item-title">{{ item.name }}</div>
-          <div class="article-list-item-contgents">
+          <!-- <div class="article-list-item-contgents">
             <p
               v-if="item.type == 'ARTICLE'"
               class="p-content"
@@ -85,7 +85,7 @@
             <div v-if="item.type == 'VIDEO'">
               <img :src="getContentObj(item.contents).faceUrl" />
             </div>
-          </div>
+          </div> -->
           <div class="article-list-item-createtime">
             {{ item.createdTime | formatDateTime }}
           </div>
@@ -153,28 +153,28 @@
 </template>
 
 <script>
-import { mapGetters } from "vuex";
-import { formatePathParams, formateEngineeringWork } from "@/filters";
+import { mapGetters } from 'vuex';
+import { formatePathParams, formateEngineeringWork } from '@/filters';
 export default {
-  name: "articleCreate",
+  name: 'articleCreate',
   props: {},
   components: {},
   data() {
     return {
       loading: false, // 是否展示加载动画
       articleTypeList: [], // 文章类型列表
-      articleArticleType: "", // 所选文章类型
+      articleArticleType: '', // 所选文章类型
       articleTypeChildrenList: [], // 所属子类
-      checkedArticleTypeChildren: "", // 所选试题类型
+      checkedArticleTypeChildren: '', // 所选试题类型
       engineeringWorkList: [], // 工种数据列表
-      engineeringWorkChooseValue: "", // 所选工种
+      engineeringWorkChooseValue: '', // 所选工种
       articleList: [], // 文章列表数据
       pagination: {
         pageSize: 7,
         current: 1,
-        total: 0
+        total: 0,
       }, // 分页参数
-      searchInputVal: "" // 搜索name
+      searchInputVal: '', // 搜索name
     };
   },
   created() {},
@@ -185,17 +185,17 @@ export default {
   watch: {},
   computed: {
     ...mapGetters([
-      "GET_ENGINEERING_WORK_LIST",
-      "GET_EXAM_QUESTION_TYPE_CONDITION_PARENT"
-    ])
+      'GET_ENGINEERING_WORK_LIST',
+      'GET_EXAM_QUESTION_TYPE_CONDITION_PARENT',
+    ]),
   },
   methods: {
     //初始化数据
     initDataFun() {
       // 工种类别
       this.engineeringWorkList = [
-        { name: "全部", id: "" },
-        ...this.GET_ENGINEERING_WORK_LIST
+        { name: '全部', id: '' },
+        ...this.GET_ENGINEERING_WORK_LIST,
       ];
       this.engineeringWorkChooseValue = this.engineeringWorkList[0].id;
       this.getArticleTypeFun(); // 查询:文章分类-父类
@@ -203,16 +203,16 @@ export default {
     },
     // 查询:文章分类-父类
     getArticleTypeFun() {
-      this.$_http.get(this.$_API.INTERFACE_GET_CATEGORIES).then(res => {
-        this.articleTypeList = [{ name: "全部", id: "" }, ...res.data];
+      this.$_http.get(this.$_API.INTERFACE_GET_CATEGORIES).then((res) => {
+        this.articleTypeList = [{ name: '全部', id: '' }, ...res.data];
         this.articleArticleType = this.articleTypeList[0].id;
-        this.articleTypeChildrenList = [{ name: "全部", id: "" }];
+        this.articleTypeChildrenList = [{ name: '全部', id: '' }];
       });
     },
     // 查询:文章分类-子类
     getArticleTypeChildrenFun() {
       if (!this.articleArticleType) {
-        this.articleTypeChildrenList = [{ name: "全部", id: "" }];
+        this.articleTypeChildrenList = [{ name: '全部', id: '' }];
         this.checkedArticleTypeChildren = this.articleTypeChildrenList[0].id;
         this.initPagination(); // 初始化分页参数
         this.getArticleListFun(); // 查询:文章列表数据
@@ -226,7 +226,7 @@ export default {
             params
           )
         )
-        .then(res => {
+        .then((res) => {
           this.articleTypeChildrenList = res.data;
           this.checkedArticleTypeChildren = this.articleTypeChildrenList[0].id;
           this.loading = false;
@@ -250,14 +250,14 @@ export default {
         engineertypeid: this.engineeringWorkChooseValue, // 工种ID
         page: this.pagination.current - 1,
         size: this.pagination.pageSize,
-        materialtitle: this.searchInputVal
+        materialtitle: this.searchInputVal,
       };
       this.$_http
         .get(this.$_API.INTERFACE_GET_ARTICLE_LIST, { params })
-        .then(res => {
+        .then((res) => {
           let resData = res.data.content;
-          resData.forEach(item => {
-            this.GET_ENGINEERING_WORK_LIST.forEach(it => {
+          resData.forEach((item) => {
+            this.GET_ENGINEERING_WORK_LIST.forEach((it) => {
               if (item.id === it.id) {
                 item.engineeringWorkTxt = it.name;
               }
@@ -268,12 +268,12 @@ export default {
                 this.engineeringWorkList,
                 item.engineerTypes[0]
               );
-              item.engineerTypeTxt = findItem ? findItem.name : "";
+              item.engineerTypeTxt = findItem ? findItem.name : '';
             } else {
-              item.engineerTypeTxt = "不限";
+              item.engineerTypeTxt = '不限';
             }
             if (item.contents && item.contents.length > 200) {
-              item.contentsShow = item.contents.slice(0, 199) + "...";
+              item.contentsShow = item.contents.slice(0, 199) + '...';
             } else {
               item.contentsShow = item.contents;
             }
@@ -318,14 +318,14 @@ export default {
     handleDeleteArticleItem(item) {
       let that = this;
       this.$confirm({
-        title: "删除文章",
+        title: '删除文章',
         content: `确认删除文章 ${item.name} 吗?`,
-        okText: "确认",
-        cancelText: "取消",
+        okText: '确认',
+        cancelText: '取消',
         onOk() {
           that.loading = true;
           let params = {
-            materialId: item.id
+            materialId: item.id,
           };
           that.$_http
             .delete(
@@ -335,7 +335,7 @@ export default {
               )
             )
             .then(() => {
-              that.$message.success("删除文章成功");
+              that.$message.success('删除文章成功');
               that.loading = false;
               that.initPagination(); // 初始化分页参数
               that.getArticleListFun(); // 查询:文章列表数据
@@ -344,7 +344,7 @@ export default {
               that.loading = false;
             });
         },
-        onCancel() {}
+        onCancel() {},
       });
     },
     // 操作:编辑文章
@@ -352,15 +352,15 @@ export default {
       if (!item || !item.id) {
         return;
       }
-      if (item.type === "ARTICLE") {
+      if (item.type === 'ARTICLE') {
         this.$router.push({
-          path: "/articleManagement/create",
-          query: { id: item.id, type: "edit" }
+          path: '/articleManagement/create',
+          query: { id: item.id, type: 'edit' },
         });
-      } else if (item.type === "VIDEO") {
+      } else if (item.type === 'VIDEO') {
         this.$router.push({
-          path: "/articleManagement/videoCreate",
-          query: { id: item.id, type: "edit" }
+          path: '/articleManagement/videoCreate',
+          query: { id: item.id, type: 'edit' },
         });
       }
     },
@@ -376,10 +376,10 @@ export default {
       this.getArticleListFun(); // 查询:文章列表数据
     },
     getContentObj(content) {
-      console.log("---" + content);
+      console.log('---' + content);
       return JSON.parse(content);
-    }
-  }
+    },
+  },
 };
 </script>
 
@@ -392,7 +392,7 @@ export default {
 </style>
 
 <style lang="less" scoped>
-@import "~@/styles/common/variable.less";
+@import '~@/styles/common/variable.less';
 .app-container {
   .article-list-item {
     width: 100%;

+ 90 - 90
src/views/articleManagement/videoCreate.vue

@@ -151,7 +151,7 @@
           :remove="removeOssVideoFile"
           class="upload-list-inline"
         >
-          <a-button> <a-icon type="upload" />Upload </a-button>
+          <a-button> <a-icon type="upload" />点击上传</a-button>
         </a-upload>
       </div>
       <div style="margin-bottom: 10px">上传封面</div>
@@ -198,39 +198,39 @@
 </template>
 
 <script>
-const OSS = require("ali-oss");
+const OSS = require('ali-oss');
 import {
   formatePathParams,
   formateStringDate,
-  formateDateToString
-} from "@/filters";
+  formateDateToString,
+} from '@/filters';
 export default {
-  name: "videoCreate",
+  name: 'videoCreate',
   props: {},
   components: {},
   data() {
     return {
       previewVisible: false,
-      videoUrl: "",
-      faceUrl: "",
-      content: "",
-      form: this.$form.createForm(this, { name: "articleCreate" }),
+      videoUrl: '',
+      faceUrl: '',
+      content: '',
+      form: this.$form.createForm(this, { name: 'articleCreate' }),
       articleParentClassArr: [],
       articleChildClassArr: [],
       engineerTypeArray: [],
       articleParentClass: {},
       articleChildClass: {},
-      engineerType: "",
-      learnDate: "",
-      optionType: "",
-      description: "",
+      engineerType: '',
+      learnDate: '',
+      optionType: '',
+      description: '',
       bodyStyle: {
-        img: "{max-width:100%;width: auto;height: auto;}",
-        video: "{max-width:100%;width: auto;height: auto;}",
-        color: "red"
+        img: '{max-width:100%;width: auto;height: auto;}',
+        video: '{max-width:100%;width: auto;height: auto;}',
+        color: 'red',
       },
       defaultVideoFileList: [],
-      defaultImageFileList: []
+      defaultImageFileList: [],
     };
   },
   created() {
@@ -246,19 +246,19 @@ export default {
       await this.getArticleParentClass();
       await this.getEngineersWork();
       let type = this.$route.query.type;
-      this.optionType = type ? type : "create";
+      this.optionType = type ? type : 'create';
       // 判断是新增文章还是编辑文章
-      if ("edit" === type) {
+      if ('edit' === type) {
         await this.getArticleContent();
-      } else if ("create" === type) {
-        console.log("---create---");
+      } else if ('create' === type) {
+        console.log('---create---');
       }
     },
     // 查询文章分类父级
     getArticleParentClass() {
       this.$_http
         .get(this.$_API.INTERFACE_GET_CATEGORIES)
-        .then(res => {
+        .then((res) => {
           this.articleParentClassArr = res.data;
           this.loading = false;
         })
@@ -279,12 +279,12 @@ export default {
             pathParamsData
           )
         )
-        .then(res => {
+        .then((res) => {
           if (res && res.data.length !== 0) {
             this.articleChildClassArr = res.data;
             this.articleChildClass = this.articleChildClassArr[0];
             this.form.setFieldsValue({
-              articleChildClass: this.articleChildClass.name
+              articleChildClass: this.articleChildClass.name,
             });
           }
           this.loading = false;
@@ -297,8 +297,8 @@ export default {
     async getEngineersWork() {
       await this.$_http
         .get(this.$_API.INTERFACE_GET_ENGINEERINGWORK_LIST)
-        .then(res => {
-          this.engineerTypeArray = [{ name: "不限", id: "" }, ...res.data];
+        .then((res) => {
+          this.engineerTypeArray = [{ name: '不限', id: '' }, ...res.data];
           this.engineerType = this.engineerTypeArray[0];
         });
     },
@@ -309,7 +309,7 @@ export default {
       // 子类选项清空
       this.articleChildClassArr = [];
       this.form.setFieldsValue({
-        articleChildClass: ""
+        articleChildClass: '',
       });
       // 获取子类的值
       this.getArticleChildClass();
@@ -327,7 +327,7 @@ export default {
       this.learnDate = dateString;
     },
     handleSubmitBtnFun() {
-      document.getElementById("articleCreateSubmit").click();
+      document.getElementById('articleCreateSubmit').click();
     },
     // 查询文章内容
     getArticleContent() {
@@ -336,7 +336,7 @@ export default {
         .get(
           formatePathParams(this.$_API.INTERFACE_GET_MATERIALS, pathParamsData)
         )
-        .then(res => {
+        .then((res) => {
           this.initEditArticleForm(res.data);
           this.loading = false;
         })
@@ -347,10 +347,10 @@ export default {
     initEditArticleForm(item) {
       //   文章标题
       this.form.setFieldsValue({
-        name: item.name
+        name: item.name,
       });
       //   文章描述
-      this.description = item.description ? item.description : "";
+      this.description = item.description ? item.description : '';
       // 文章分类-父类:
       this.articleParentClass = item.rootMaterialCategory;
       this.getArticleChildClass(); // 获取子类列表的值
@@ -369,7 +369,7 @@ export default {
       let learnDate = item.tags.length > 0 ? item.tags[0] : null;
       // 必学日期
       this.learnDate = learnDate ? formateStringDate(learnDate) : null;
-      console.log("编辑初始化时间为YYYY-MM-DD", this.learnDate, learnDate);
+      console.log('编辑初始化时间为YYYY-MM-DD', this.learnDate, learnDate);
       // 文章内容
       this.content = item.contents;
       // 附件内容
@@ -379,8 +379,8 @@ export default {
         let videoFile = {
           uid: this.getUid(),
           name: this.getUrlName(contentObj.videoUrl),
-          status: "done",
-          url: contentObj.videoUrl
+          status: 'done',
+          url: contentObj.videoUrl,
         };
         this.videoUrl = contentObj.videoUrl;
         this.defaultVideoFileList.push(videoFile);
@@ -389,8 +389,8 @@ export default {
         let faceFile = {
           uid: this.getUid(),
           name: this.getUrlName(contentObj.faceUrl),
-          status: "done",
-          url: contentObj.faceUrl
+          status: 'done',
+          url: contentObj.faceUrl,
         };
         this.faceUrl = contentObj.faceUrl;
         this.defaultImageFileList.push(faceFile);
@@ -399,63 +399,63 @@ export default {
     // 提交表单
     handleSubmit(e) {
       e.preventDefault();
-      if ("create" === this.optionType) {
-        console.log("创建文章");
+      if ('create' === this.optionType) {
+        console.log('创建文章');
         this.createArtical();
-      } else if ("edit" === this.optionType) {
-        console.log("更新文章");
+      } else if ('edit' === this.optionType) {
+        console.log('更新文章');
         this.updateArtical();
       }
     },
     createArtical() {
       this.form.setFieldsValue({
-        articleParentClass: this.articleParentClass.name
+        articleParentClass: this.articleParentClass.name,
       });
       this.form.setFieldsValue({
-        articleChildClass: this.articleChildClass.name
+        articleChildClass: this.articleChildClass.name,
       });
       this.form.setFieldsValue({
-        engineerType: this.engineerType.name
+        engineerType: this.engineerType.name,
       });
       this.form.validateFields((err, values) => {
         if (!err) {
           // 新建文章
           let that = this;
           that.$confirm({
-            title: "新建文章",
+            title: '新建文章',
             content: `确认新建文章吗?`,
-            okText: "确认",
-            cancelText: "取消",
+            okText: '确认',
+            cancelText: '取消',
             onOk() {
               that.loading = true;
               let params = {
                 categoryid: that.articleChildClass.id,
-                engineertypeid: that.engineerType.id
+                engineertypeid: that.engineerType.id,
               };
               let tag = formateDateToString(that.learnDate);
               let links = [];
               let contentObj = {
                 faceUrl: that.faceUrl,
-                videoUrl: that.videoUrl
+                videoUrl: that.videoUrl,
               };
               let bodyParams = {
                 name: values.name,
                 description: values.description,
-                type: "VIDEO",
+                type: 'VIDEO',
                 contents: JSON.stringify(contentObj),
                 tags: tag ? [tag] : [],
                 engineerTypes: [that.engineerType.id],
-                links: links
+                links: links,
               };
               that.$_http
                 .post(that.$_API.INTERFACE_POST_ADMIN_MATERIALS, bodyParams, {
-                  params
+                  params,
                 })
                 .then(() => {
-                  that.$message.success("新建文章成功");
+                  that.$message.success('新建文章成功');
                 });
             },
-            onCancel() {}
+            onCancel() {},
           });
         }
       });
@@ -467,34 +467,34 @@ export default {
           // 更新文章
           let that = this;
           that.$confirm({
-            title: "更新文章",
+            title: '更新文章',
             content: `确认更新文章吗?`,
-            okText: "确认",
-            cancelText: "取消",
+            okText: '确认',
+            cancelText: '取消',
             onOk() {
               that.loading = true;
               let params = {
                 categoryid: that.articleChildClass.id,
-                engineertypeid: that.engineerType.id
+                engineertypeid: that.engineerType.id,
               };
               let tag = formateDateToString(that.learnDate);
               let links = [];
               let contentObj = {
                 faceUrl: that.faceUrl,
-                videoUrl: that.videoUrl
+                videoUrl: that.videoUrl,
               };
               let bodyParams = {
                 id: that.$route.query.id,
                 name: values.name,
                 description: values.description,
-                type: "VIDEO",
+                type: 'VIDEO',
                 contents: JSON.stringify(contentObj),
                 tags: tag ? [tag] : [],
                 engineerTypes: [that.engineerType.id],
-                links: links
+                links: links,
               };
               console.log(
-                "保存修改日期格式为YYYYMMDD",
+                '保存修改日期格式为YYYYMMDD',
                 bodyParams.tags,
                 that.learnDate
               );
@@ -506,61 +506,61 @@ export default {
                   ),
                   bodyParams,
                   {
-                    params
+                    params,
                   }
                 )
                 .then(() => {
-                  that.$message.success("更新文章成功");
+                  that.$message.success('更新文章成功');
                 });
             },
-            onCancel() {}
+            onCancel() {},
           });
         }
       });
     },
     async uploadOssVideoFile(fileData) {
-      console.log("-------fileData--------");
+      console.log('-------fileData--------');
       console.log(fileData);
       let that = this;
       let file = fileData.file;
 
-      var index = file.name.indexOf("."); //(考虑严谨用lastIndexOf(".")得到)得到"."在第几位
+      var index = file.name.indexOf('.'); //(考虑严谨用lastIndexOf(".")得到)得到"."在第几位
       var subfix = file.name.substring(index); //截断"."之前的,得到后缀
-      if (subfix != ".mp4") {
+      if (subfix != '.mp4') {
         fileData.onError();
-        this.$message.error("只能上传mp4格式的文件");
+        this.$message.error('只能上传mp4格式的文件');
         return;
       }
 
-      let bucket = "jtxt-file-public";
-      let ossPath = "file/";
+      let bucket = 'jtxt-file-public';
+      let ossPath = 'file/';
       let res = await that.$_http.get(
         that.$_API.INTERFACE_GET_ASSUME_OSS_WRITER
       );
-      console.log("--oss-writer--" + JSON.stringify(res));
+      console.log('--oss-writer--' + JSON.stringify(res));
       const client = new OSS({
         // yourRegion填写Bucket所在地域。以华东1(杭州)为例,Region填写为oss-cn-hangzhou。
-        region: "oss-cn-beijing",
+        region: 'oss-cn-beijing',
         // 从STS服务获取的临时访问密钥(AccessKey ID和AccessKey Secret)。
         accessKeyId: res.data.accessKeyId,
         accessKeySecret: res.data.accessKeySecret,
         // 从STS服务获取的安全令牌(SecurityToken)。
         stsToken: res.data.securityToken,
         // 填写Bucket名称。
-        bucket: bucket
+        bucket: bucket,
       });
       try {
-        client.put(ossPath + file.name, file).then(res => {
+        client.put(ossPath + file.name, file).then((res) => {
           console.log(res);
           let upFile = {
             uid: this.getUid(),
             name: file.name,
-            status: "done",
-            url: res.url
+            status: 'done',
+            url: res.url,
           };
           that.videoUrl = res.url;
           that.defaultVideoFileList.push(upFile);
-        //   this.findvideocover(file);
+          //   this.findvideocover(file);
           fileData.onSuccess();
         });
       } catch (e) {
@@ -571,31 +571,31 @@ export default {
     async uploadOssImageFile(fileData) {
       let that = this;
       let file = fileData.file;
-      let bucket = "jtxt-file-public";
-      let ossPath = "file/";
+      let bucket = 'jtxt-file-public';
+      let ossPath = 'file/';
       let res = await that.$_http.get(
         that.$_API.INTERFACE_GET_ASSUME_OSS_WRITER
       );
-      console.log("--oss-writer--" + JSON.stringify(res));
+      console.log('--oss-writer--' + JSON.stringify(res));
       const client = new OSS({
         // yourRegion填写Bucket所在地域。以华东1(杭州)为例,Region填写为oss-cn-hangzhou。
-        region: "oss-cn-beijing",
+        region: 'oss-cn-beijing',
         // 从STS服务获取的临时访问密钥(AccessKey ID和AccessKey Secret)。
         accessKeyId: res.data.accessKeyId,
         accessKeySecret: res.data.accessKeySecret,
         // 从STS服务获取的安全令牌(SecurityToken)。
         stsToken: res.data.securityToken,
         // 填写Bucket名称。
-        bucket: bucket
+        bucket: bucket,
       });
       try {
-        client.put(ossPath + file.name, file).then(res => {
+        client.put(ossPath + file.name, file).then((res) => {
           console.log(res);
           let upFile = {
             uid: this.getUid(),
             name: file.name,
-            status: "done",
-            url: res.url
+            status: 'done',
+            url: res.url,
           };
           that.faceUrl = res.url;
           that.defaultImageFileList.push(upFile);
@@ -608,7 +608,7 @@ export default {
     },
     // 截取路径名字
     getUrlName(url) {
-      let strArr = url.split("/");
+      let strArr = url.split('/');
       console.log(strArr);
       let fileName = strArr[strArr.length - 1];
       console.log(fileName);
@@ -617,7 +617,7 @@ export default {
       return fileName;
     },
     getUid() {
-      let uid = "";
+      let uid = '';
       for (let i = 0; i < 5; i++) {
         uid += Math.floor(Math.random() * 10);
       }
@@ -688,8 +688,8 @@ export default {
     // 关闭预览
     closepreview() {
       this.previewVisible = false;
-    }
-  }
+    },
+  },
 };
 </script>
 
@@ -718,7 +718,7 @@ export default {
 </style>
 
 <style lang="less" scoped>
-@import "~@/styles/common/variable.less";
+@import '~@/styles/common/variable.less';
 .app-container {
   .information-title {
     font-size: 18px;

Деякі файли не було показано, через те що забагато файлів було змінено