wyq il y a 4 ans
Parent
commit
09669871e4

+ 173 - 199
src/components/knowledgeExtra/AddDevKnow.vue

@@ -9,13 +9,7 @@
       ></crumbs>
 
       <div class="info-container">
-        <el-form
-          :rules="rules1"
-          :model="form"
-          label-width="160px"
-          ref="groups1"
-          size="mini"
-        >
+        <el-form :rules="rules1" :model="form" label-width="160px" ref="groups1" size="mini">
           <div class="container_top">
             <div v-if="!isEdit" style="margin-right: 40px">
               <el-form-item label="选择标准术语:" prop="selectedTerm">
@@ -51,9 +45,11 @@
               </el-form-item>
             </div>
 
-            <el-form-item label="已选择标准术语:" label-width="160px">{{
+            <el-form-item label="已选择标准术语:" label-width="160px">
+              {{
               form.selectedTermName
-            }}</el-form-item>
+              }}
+            </el-form-item>
           </div>
         </el-form>
         <div class="tabs_box">
@@ -72,14 +68,14 @@
               <img
                 @click.stop="handleStaticTab"
                 src="@/images/tab_add.png"
-                alt=""
+                alt
                 v-if="AssesComSHow && !AssesTabSHow"
               />
               <img
                 v-if="AssesTabSHow && AssesComSHow"
                 @click.stop="closeStaticTab"
                 src="@/images/tab_close.png"
-                alt=""
+                alt
               />
             </div>
             <div
@@ -97,31 +93,21 @@
                 v-if="!staticTabShow"
                 @click.stop="handleAssesTab"
                 src="@/images/tab_add.png"
-                alt=""
+                alt
               />
               <img
                 v-if="staticTabShow"
                 @click.stop="closeAssesTab"
                 src="@/images/tab_close.png"
-                alt=""
+                alt
               />
             </div>
           </div>
         </div>
 
         <p class="line"></p>
-        <div
-          class="tab_box_left"
-          v-show="tabActive == 'one'"
-          v-if="staticTabShow"
-        >
-          <el-form
-            :rules="rules"
-            :model="form"
-            label-width="160px"
-            ref="groups"
-            size="mini"
-          >
+        <div class="tab_box_left" v-show="tabActive == 'one'" v-if="staticTabShow">
+          <el-form :rules="rules" :model="form" label-width="160px" ref="groups" size="mini">
             <div
               v-if="
                 form.selectedTerm &&
@@ -159,11 +145,7 @@
             </div>
 
             <div v-if="upload">
-              <el-form-item
-                label="标题名称搜索:"
-                prop="fileTitle"
-                label-width="160px"
-              >
+              <el-form-item label="标题名称搜索:" prop="fileTitle" label-width="160px">
                 <el-input v-model="form.fileTitle"></el-input>
               </el-form-item>
             </div>
@@ -193,37 +175,29 @@
                   :show-file-list="showFileList"
                   :file-list="form.fileList"
                 >
-                  <el-button size="small" type="primary" v-if="showUpLoad"
-                    >点击上传</el-button
-                  >
+                  <el-button size="small" type="primary" v-if="showUpLoad">点击上传</el-button>
                   <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div> -->
                 </el-upload>
-                <span class="tipInfo" v-show="isShowTip">{{
+                <span class="tipInfo" v-show="isShowTip">
+                  {{
                   form.fileList[0] && form.fileList[0].name
-                }}</span>
+                  }}
+                </span>
                 <!-- <el-button size="small" type="primary" >点击上传</el-button> -->
               </el-form-item>
             </div>
             <el-form-item label-width="160px">
-              <div class="uploadInfo" v-if="isSuccessUpload === 1">
-                文件上传中,请稍等...
-              </div>
+              <div class="uploadInfo" v-if="isSuccessUpload === 1">文件上传中,请稍等...</div>
             </el-form-item>
           </el-form>
         </div>
         <div v-if="AssesComSHow && AssesTabSHow" v-show="tabActive == 'two'">
-          <AddAssess
-            @scrollTo="scrollTo"
-            :childScaleData="scaleData"
-            ref="assessRef"
-          />
+          <AddAssess @scrollTo="scrollTo" :childScaleData="scaleData" ref="assessRef" />
         </div>
       </div>
 
       <div class="btn">
-        <el-button type="primary" :disabled="saveDisable" @click="submitForm"
-          >确 定</el-button
-        >
+        <el-button type="primary" :disabled="saveDisable" @click="submitForm">确 定</el-button>
       </div>
     </div>
   </el-scrollbar>
@@ -232,14 +206,14 @@
 /**
  *
  */
-import api from "@api/knowledgeTree.js";
-import DevInfo from "./DevInfo";
-import config from "@api/config";
-import $ from "jquery";
-import AddAssess from "./AddAssess";
+import api from '@api/knowledgeTree.js';
+import DevInfo from './DevInfo';
+import config from '@api/config';
+import $ from 'jquery';
+import AddAssess from './AddAssess';
 
 export default {
-  name: "AddDevKnow",
+  name: 'AddDevKnow',
   components: {
     DevInfo,
     AddAssess
@@ -255,55 +229,55 @@ export default {
       isFixedTop: true,
       isEdit: false,
       isCopy: false,
-      title: "添加",
+      title: '添加',
       termTypes: [],
       terms: [], //术语列表
       form: {
-        conceptId: "", //术语id
+        conceptId: '', //术语id
         isTip: 0, //是否要覆盖,0不覆盖,1覆盖
-        selectedTerm: "", //术语标签
-        termType: "",
-        typeId: "",
-        selectedTermName: "",
-        selectedTermType: "",
+        selectedTerm: '', //术语标签
+        termType: '',
+        typeId: '',
+        selectedTermName: '',
+        selectedTermType: '',
         // titleChange: '',
         fileList: [],
-        name: "",
+        name: '',
         prags: [
           {
             //单个段落相关
-            title: "",
-            content: "",
+            title: '',
+            content: '',
             isReason: 0,
             orderNo: 0,
             position: [],
-            text: ""
+            text: ''
           }
         ],
-        fileTitle: "",
-        titleChange: ""
+        fileTitle: '',
+        titleChange: ''
       },
       rules1: {
         selectedTerm: [
-          { required: true, message: "请选择标准术语", trigger: "change" }
+          { required: true, message: '请选择标准术语', trigger: 'change' }
         ]
       },
       rules: {
         fileTitle: [
-          { required: true, message: "请输入标题名称", trigger: "change" },
+          { required: true, message: '请输入标题名称', trigger: 'change' },
           {
             validator: (rule, value, callback) => {
               if (value.trim().length > 30) {
-                callback(new Error("标题名称不能超过30字"));
+                callback(new Error('标题名称不能超过30字'));
               } else {
                 callback();
               }
             },
-            trigger: "change"
+            trigger: 'change'
           }
         ],
         fileList: [
-          { required: true, message: "请上传文件", trigger: "change" }
+          { required: true, message: '请上传文件', trigger: 'change' }
         ],
         titleChange: [
           // {
@@ -318,7 +292,7 @@ export default {
           //   },
           //   trigger: 'change'
           // },
-          { max: 30, message: "标题最多30字", trigger: "change" }
+          { max: 30, message: '标题最多30字', trigger: 'change' }
         ]
       },
       saveDisable: false, //保存按钮禁止点击
@@ -334,14 +308,14 @@ export default {
       editCount: -1, // 页面会否被编辑 >0被编辑   =0 未编辑
       startCount: -1,
       isSaveSuccess: false, // 是否保存成功
-      tabActive: "one"
+      tabActive: 'one'
     };
   },
   watch: {
     showType: {
       handler(newVal, oldVal) {
         if (newVal !== oldVal) {
-          this.form.prags = this.form.prags.map((item) => {
+          this.form.prags = this.form.prags.map(item => {
             return { ...item, position: [] };
           });
         }
@@ -355,27 +329,27 @@ export default {
       immediate: true
     }
   },
-  created: function () {
+  created: function() {
     const { isEdit, data, isCopy } = this.$route.params;
     if (isEdit || isCopy) {
       const loading = this.$loading({
         lock: true,
-        text: "Loading",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)"
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
       });
       this.showType = data.type; // 编辑页确认显示类型
       this.isEdit = isEdit;
       this.isCopy = isCopy;
-      this.title = isEdit ? "修改" : isCopy ? "复制" : "添加";
+      this.title = isEdit ? '修改' : isCopy ? '复制' : '添加';
       (isEdit || isCopy) && this.changeWord(data);
 
       api
         .getBaseRecordById({ id: data.id })
-        .then((res) => {
-          if (res.data.code == "0") {
+        .then(res => {
+          if (res.data.code == '0') {
             const data = res.data.data;
-            console.log("dwadfesvgeosboau13131213h", data.scale);
+            console.log('dwadfesvgeosboau13131213h', data.scale);
             if (data.type === 8) {
               this.AssesComSHow = true;
               if (data.scale) {
@@ -389,7 +363,7 @@ export default {
               // console.log('data',data)
               this.form.fileList =
                 data &&
-                data.map((it) => {
+                data.map(it => {
                   return JSON.parse(it.content);
                 });
               this.showFileList = true;
@@ -406,18 +380,18 @@ export default {
                     data.type == 5 ||
                     data.type == 6
                   ? data.noticeName
-                  : "";
+                  : '';
               this.form.selectedTermName =
-                data.name + (data.typeName ? "(" + data.typeName + ")" : "");
+                data.name + (data.typeName ? '(' + data.typeName + ')' : '');
               this.form.selectedTerm =
-                data.name + (data.typeName ? "(" + data.typeName + ")" : "");
+                data.name + (data.typeName ? '(' + data.typeName + ')' : '');
               if (isCopy) {
                 this.handleClear();
               }
               if (data.details.length) {
                 this.form.prags =
                   data &&
-                  data.details.map((it) => {
+                  data.details.map(it => {
                     return {
                       title: it.title,
                       position: this.mapStringToNum(it.contentType),
@@ -432,7 +406,7 @@ export default {
                   });
               } else {
                 this.staticTabShow = false;
-                this.tabActiveChange("two");
+                this.tabActiveChange('two');
               }
             }
           }
@@ -440,9 +414,9 @@ export default {
             loading.close();
           }, 200);
         })
-        .catch((error) => {
+        .catch(error => {
           loading.close();
-          if (error.code === "900010001") {
+          if (error.code === '900010001') {
             return false;
           }
           console.log(error);
@@ -482,12 +456,12 @@ export default {
     // }
 
     if (this.startCount !== this.editCount && !this.isSaveSuccess) {
-      this.$alert("还有未保存的内容,确定要退出当前页面吗?", "提示", {
-        confirmButtonText: "确定",
+      this.$alert('还有未保存的内容,确定要退出当前页面吗?', '提示', {
+        confirmButtonText: '确定',
         // cancelButtonText: '取消',
         // cancelButtonClass: 'leaveBtn',
         // customClass: 'leaveBox',
-        type: "warning"
+        type: 'warning'
       })
         .then(() => {
           next();
@@ -499,7 +473,7 @@ export default {
   },
   methods: {
     scrollTo(dom) {
-      var div = this.$refs["elscrollbar"].$refs["wrap"];
+      var div = this.$refs['elscrollbar'].$refs['wrap'];
       if (dom >= 0) {
         div.scrollTop += dom - 120;
       } else {
@@ -509,64 +483,64 @@ export default {
     handleStaticTab() {
       this.AssesTabSHow = true;
       this.AssesComSHow = true;
-      this.tabActiveChange("two");
+      this.tabActiveChange('two');
     },
     handleAssesTab() {
       this.staticTabShow = true;
       this.form.prags = [
         {
           //单个段落相关
-          title: "",
-          content: "",
+          title: '',
+          content: '',
           isReason: 0,
           orderNo: 0,
           position: [],
-          text: ""
+          text: ''
         }
       ];
-      this.tabActiveChange("one");
+      this.tabActiveChange('one');
     },
     closeStaticTab() {
-      this.$alert("确定要删除该标签?删除后该标签内容将会被清空!", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
+      this.$alert('确定要删除该标签?删除后该标签内容将会被清空!', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
         // cancelButtonClass: 'leaveBtn',
         // customClass: 'leaveBox',
-        type: "warning"
+        type: 'warning'
       })
         .then(() => {
           this.staticTabShow = false;
-          this.tabActiveChange("two");
+          this.tabActiveChange('two');
         })
         .catch(() => {});
     },
     closeAssesTab() {
-      this.$alert("确定要删除该标签?删除后该标签内容将会被清空!", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
+      this.$alert('确定要删除该标签?删除后该标签内容将会被清空!', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
         // cancelButtonClass: 'leaveBtn',
         // customClass: 'leaveBox',
-        type: "warning"
+        type: 'warning'
       })
         .then(() => {
           this.AssesTabSHow = false;
           // this.AssesComSHow = false;
-          this.tabActiveChange("one");
+          this.tabActiveChange('one');
         })
         .catch(() => {});
     },
     tabActiveChange(type) {
       this.tabActive = type;
-      if (type == "two") {
+      if (type == 'two') {
         setTimeout(() => {
           this.$refs.assessRef.resizeTable();
         }, 200);
       }
     },
     handleClear() {
-      this.form.selectedTermName = "";
-      this.form.selectedTerm = "";
-      this.form.titleChange = "";
+      this.form.selectedTermName = '';
+      this.form.selectedTerm = '';
+      this.form.titleChange = '';
     },
 
     handleMouseenter() {
@@ -578,12 +552,12 @@ export default {
       this.isShowTip = false;
     },
     changeWord(newVal) {
-      if (newVal.typeName == "量表") {
+      if (newVal.typeName == '量表') {
         this.AssesComSHow = true;
       } else {
         this.staticTabShow = true;
         this.AssesComSHow = false;
-        this.tabActive = "one";
+        this.tabActive = 'one';
       }
       this.toAssesTermId = newVal.id;
       this.showType = newVal.type || -1;
@@ -591,20 +565,20 @@ export default {
       const typeName = newVal.typeName;
       const type = newVal.type;
       this.form.selectedTermName =
-        name + (typeName ? "(" + typeName + ")" : "");
+        name + (typeName ? '(' + typeName + ')' : '');
       // this.form.selectedTerm = name + (typeName ? '(' + typeName + ')' : '');
       this.form.name = name;
       this.form.fileList = [];
       this.showFileList = false;
-      this.form.typeId = type || "";
+      this.form.typeId = type || '';
       this.showUpLoad = true;
       this.titleChange =
         type == 1
-          ? "临床路径标题:"
+          ? '临床路径标题:'
           : type == 3 || type == 4 || type == 5 || type == 6
-          ? "注意事项标题:"
-          : "";
-      this.form.fileTitle = "";
+          ? '注意事项标题:'
+          : '';
+      this.form.fileTitle = '';
       if (newVal.typeId === 82 || newVal.typeId === 83) {
         this.upload = true;
         this.form.fileTitle = newVal.title;
@@ -619,12 +593,12 @@ export default {
     },
     reOrder(isUp, i) {
       // isUp: 1 上升    0 下降
-      let div = this.$refs["elscrollbar"].$refs["wrap"];
+      let div = this.$refs['elscrollbar'].$refs['wrap'];
       let temp = {},
         it = {};
       if (isUp === 1) {
         if (i === 0) {
-          this.warning("已经是第一个,不能再升啦!");
+          this.warning('已经是第一个,不能再升啦!');
           return;
         }
         temp = Object.assign(this.form.prags[i - 1]);
@@ -635,7 +609,7 @@ export default {
         });
       } else {
         if (i === this.form.prags.length - 1) {
-          this.warning("已经是最后一个,不能再降啦!");
+          this.warning('已经是最后一个,不能再降啦!');
           return;
         }
         temp = Object.assign(this.form.prags[i + 1]);
@@ -645,25 +619,25 @@ export default {
     },
     addParagraph(i) {
       this.form.prags.splice(i + 1, 0, {
-        title: "",
-        content: "",
+        title: '',
+        content: '',
         isReason: 0,
         position: [],
-        text: ""
+        text: ''
       });
       //添加段落光标自动落到新增的段落中
       setTimeout(() => {
         this.$refs.subForm[i + 1].$el
-          .getElementsByClassName("el-input__inner")[0]
+          .getElementsByClassName('el-input__inner')[0]
           .focus();
       });
     },
     delParagraph(i) {
       if (this.form.prags.length == 1) {
-        this.warning("只剩一个段落,不能再删啦!");
+        this.warning('只剩一个段落,不能再删啦!');
         return;
       }
-      this.showConfirmDialog("确定要删除该段落?", () => {
+      this.showConfirmDialog('确定要删除该段落?', () => {
         this.form.prags.splice(i, 1);
       });
     },
@@ -679,33 +653,33 @@ export default {
       this.showDrop = true;
       api
         .staticKnowledgeBaseInfo({ inputStr: query.trim(), types: [0] })
-        .then((res) => {
+        .then(res => {
           this.showDrop = false;
-          if (res.data.code === "0") {
+          if (res.data.code === '0') {
             this.terms = res.data.data;
           } else {
-            this.warning("数据获取失败");
+            this.warning('数据获取失败');
           }
         });
     },
     mapStringToNum(str) {
-      return str.split(",").map((it) => {
+      return str.split(',').map(it => {
         return +it;
       });
     },
 
     // 额外的表单检验
     formVal() {
-      let positiontemp = this.form.prags.map((item) => {
+      let positiontemp = this.form.prags.map(item => {
         return [...item.position];
       });
-      let positionArr = positiontemp.reduce(function (a, b) {
+      let positionArr = positiontemp.reduce(function(a, b) {
         return a.concat(b);
       }); // 所有被选中的值集合
       // console.log(positionArr, "positionArr");
       // console.log(this.showType, "当前页的显示类型");
-      let isVisFlag = positionArr.some((item) => item === 2);
-      let isDiagFlag = positionArr.some((item) => item === 3);
+      let isVisFlag = positionArr.some(item => item === 2);
+      let isDiagFlag = positionArr.some(item => item === 3);
       // console.log(isVisFlag, "isVisFlag是否显示");
       if (
         (this.showType == 3 ||
@@ -719,18 +693,18 @@ export default {
         this.$refs.groups && this.$refs.groups.clearValidate();
         this.rules.titleChange.push({
           required: true,
-          message: "请输入注意事项标题",
-          trigger: "change"
+          message: '请输入注意事项标题',
+          trigger: 'change'
         });
-        this.$refs.groups && this.$refs.groups.validateField("titleChange");
-        this.$refs.groups && this.$refs.groups.validateField("selectedTerm");
+        this.$refs.groups && this.$refs.groups.validateField('titleChange');
+        this.$refs.groups && this.$refs.groups.validateField('selectedTerm');
         this.rules.titleChange = this.rules.titleChange.slice(0, 1);
 
-        if (this.form.titleChange.trim() !== "") {
+        if (this.form.titleChange.trim() !== '') {
           // console.log('内容不为空');
           return true;
         } else {
-          var div = this.$refs["elscrollbar"].$refs["wrap"];
+          var div = this.$refs['elscrollbar'].$refs['wrap'];
           this.$nextTick(() => {
             div.scrollTop = 0;
           });
@@ -742,18 +716,18 @@ export default {
         this.$refs.groups && this.$refs.groups.clearValidate();
         this.rules.titleChange.push({
           required: true,
-          message: "请输入临床路径标题",
-          trigger: "change"
+          message: '请输入临床路径标题',
+          trigger: 'change'
         });
-        this.$refs.groups && this.$refs.groups.validateField("titleChange");
-        this.$refs.groups && this.$refs.groups.validateField("selectedTerm");
+        this.$refs.groups && this.$refs.groups.validateField('titleChange');
+        this.$refs.groups && this.$refs.groups.validateField('selectedTerm');
         this.rules.titleChange = this.rules.titleChange.slice(0, 1);
 
-        if (this.form.titleChange.trim() !== "") {
+        if (this.form.titleChange.trim() !== '') {
           // console.log('内容不为空');
           return true;
         } else {
-          var div = this.$refs["elscrollbar"].$refs["wrap"];
+          var div = this.$refs['elscrollbar'].$refs['wrap'];
           this.$nextTick(() => {
             div.scrollTop = 0;
           });
@@ -775,7 +749,7 @@ export default {
           if (valid) {
             resolve(true);
           } else {
-            reject("top", object);
+            reject('top', object);
             return false;
           }
         });
@@ -783,7 +757,7 @@ export default {
       all.push(fvalidate1);
       if (this.staticTabShow) {
         if (this.isSuccessUpload === 1) {
-          this.warning("文件上传中,请稍等");
+          this.warning('文件上传中,请稍等');
           return;
         }
         let flagVal = this.formVal(); // 额外的表单校验
@@ -797,7 +771,7 @@ export default {
               if (valid) {
                 resolve(true);
               } else {
-                reject("f", object);
+                reject('f', object);
                 return false;
               }
             });
@@ -815,7 +789,7 @@ export default {
                 // viewHeight += it.$el.getBoundingClientRect().top;
                 it.$refs.form.validate((valid, object) => {
                   if (!valid) {
-                    reject("f", object);
+                    reject('f', object);
                     goOn = false;
                     viewHeightArr.push(it.$el);
                   } else {
@@ -834,20 +808,20 @@ export default {
         all.push(...this.$refs.assessRef.assessCommit());
       }
       // 批量处理Promise返回
-      let transferedPromises = (promises) => {
+      let transferedPromises = promises => {
         // 返回一个处理之后的promise数组
-        return promises.map((promise) => {
-          return promise.then((res) => res).catch((err) => err);
+        return promises.map(promise => {
+          return promise.then(res => res).catch(err => err);
         });
       };
       let promiseArr = transferedPromises(all);
-      await Promise.all(promiseArr).then((resArr) => {
-        let cErrIndex = resArr.findIndex((item) => item.type == "c");
-        let fErrIndex = resArr.findIndex((item) => item == "f");
-        let topErrIndex = resArr.findIndex((item) => item == "top");
+      await Promise.all(promiseArr).then(resArr => {
+        let cErrIndex = resArr.findIndex(item => item.type == 'c');
+        let fErrIndex = resArr.findIndex(item => item == 'f');
+        let topErrIndex = resArr.findIndex(item => item == 'top');
         if (topErrIndex != -1) {
           outIsVia = false;
-          var div = this.$refs["elscrollbar"].$refs["wrap"];
+          var div = this.$refs['elscrollbar'].$refs['wrap'];
           this.$nextTick(() => {
             div.scrollTop = 0;
           });
@@ -855,20 +829,20 @@ export default {
           if (this.staticTabShow) {
             goOn = false;
           }
-          this.tabActive = "one";
+          this.tabActive = 'one';
           this.$message({
             showClose: true,
             message: `"静态信息"和"评估内容"标签内有未填写项目,请填写完整或者删除该标签!`,
-            type: "warning"
+            type: 'warning'
           });
         } else if (cErrIndex != -1 && fErrIndex == -1) {
-          this.tabActive = "two";
+          this.tabActive = 'two';
           this.$message({
             showClose: true,
             message: `"评估内容"标签内有未填写项目,请填写完整或者删除该标签!`,
-            type: "warning"
+            type: 'warning'
           });
-          let cErrArr = resArr.filter((item) => item.type == "c");
+          let cErrArr = resArr.filter(item => item.type == 'c');
           if (cErrArr) {
             cErrArr = Object.keys(cErrArr[0].object);
           }
@@ -876,7 +850,7 @@ export default {
           this.$nextTick(() => {
             setTimeout(() => {
               let domTop = this.$refs.assessRef.getDom(cErrArr[0]);
-              var div = this.$refs["elscrollbar"].$refs["wrap"];
+              var div = this.$refs['elscrollbar'].$refs['wrap'];
               if (domTop >= 0) {
                 div.scrollTop += domTop - 120;
               } else {
@@ -885,11 +859,11 @@ export default {
             }, 100);
           });
         } else if (cErrIndex == -1 && fErrIndex != -1) {
-          this.tabActive = "one";
+          this.tabActive = 'one';
           this.$message({
             showClose: true,
             message: `"静态信息"标签内有未填写项目,请填写完整或者删除该标签!`,
-            type: "warning"
+            type: 'warning'
           });
         } else {
           assessRule = true;
@@ -897,7 +871,7 @@ export default {
       });
       if (this.staticTabShow && !goOn) {
         setTimeout(() => {
-          var div = this.$refs["elscrollbar"].$refs["wrap"];
+          var div = this.$refs['elscrollbar'].$refs['wrap'];
           if (outIsVia) {
             // 外层校验通过,跳转至下层校验具体位置
             let sTop = viewHeightArr[0].getBoundingClientRect().top;
@@ -928,14 +902,14 @@ export default {
 
       if (this.form.typeId === 82 || this.form.typeId === 83) {
         if (this.form.fileList.length === 0) {
-          this.warning("文件未上传,不存储数据");
+          this.warning('文件未上传,不存储数据');
           return;
         }
         param.push(
           Object.assign(
             {},
             {
-              position: this.form.typeId === 82 ? "8" : "9",
+              position: this.form.typeId === 82 ? '8' : '9',
               conceptId: this.form.conceptId,
               title: this.form.fileTitle,
               orderNo: 0,
@@ -957,16 +931,16 @@ export default {
           obj.conceptId = data[i].conceptId;
           obj.orderNo = i;
           obj.title = data[i].title;
-          obj.contentType = data[i].position.join(",");
+          obj.contentType = data[i].position.join(',');
           tempArr.push(obj);
         }
-        paramsAll.clinicalPathwayName = types == 1 ? this.form.titleChange : "";
+        paramsAll.clinicalPathwayName = types == 1 ? this.form.titleChange : '';
         paramsAll.id = this.conceptId;
         paramsAll.name = this.form.name;
         paramsAll.noticeName =
           types == 3 || types == 4 || types == 5 || types == 6
             ? this.form.titleChange
-            : "";
+            : '';
         paramsAll.type = this.form.typeId;
         if (this.staticTabShow) {
           paramsAll.details = tempArr;
@@ -975,29 +949,29 @@ export default {
         }
         param = paramsAll;
         if (!param.details) param.details = [];
-        param.details.forEach((item) => {
-          let regExp = new RegExp(config.imgHost, "g");
-          item.content = item.content.replace(regExp, "{imageUrlPrefix}");
+        param.details.forEach(item => {
+          let regExp = new RegExp(config.imgHost, 'g');
+          item.content = item.content.replace(regExp, '{imageUrlPrefix}');
         });
         // 评估内容的数据
         param.scale = {};
         console.log(
-          "this.AssesComSHow",
+          'this.AssesComSHow',
           this.AssesComSHow,
-          "AssesTabSHow",
+          'AssesTabSHow',
           this.AssesTabSHow
         );
         if (this.AssesComSHow && this.AssesTabSHow) {
           const assessParam = this.$refs.assessRef.formtParams();
           param.scale = assessParam;
           param.scale.conceptId = this.toAssesTermId;
-          const userInfo = localStorage.getItem("userLoginDTO");
+          const userInfo = localStorage.getItem('userLoginDTO');
           param.scale.modifier = userInfo.linkman;
         }
       }
       // return;
       // this.showSaveDialog(param,'是否'+(this.isEdit?'修改':'保存')+'该静态知识?');
-      console.log("param-------");
+      console.log('param-------');
       console.dir(param);
       // return;
       if (!this.isEdit) {
@@ -1024,14 +998,14 @@ export default {
       param.source = 1; //0:医院端  1:云平台
       api
         .saveBaseOrUpdateRecord(param)
-        .then((res) => {
-          if (res.data.code === "0") {
+        .then(res => {
+          if (res.data.code === '0') {
             this.isSuccessUpload = 0; // 修改文件上传状态为0
-            this.warning(res.data.msg || "保存成功", "success");
+            this.warning(res.data.msg || '保存成功', 'success');
             this.isSaveSuccess = true; // 保存成功,可正常退出
             //返回带搜索条件的首页
             this.$router.push({
-              name: "StaticInfo",
+              name: 'StaticInfo',
               params: Object.assign({}, this.$route.params, {
                 currentPage: 1
               })
@@ -1041,8 +1015,8 @@ export default {
           }
           this.saveDisable = false;
         })
-        .catch((err) => {
-          if (err.code === "900010001") {
+        .catch(err => {
+          if (err.code === '900010001') {
             return false;
           }
           this.saveDisable = false;
@@ -1052,13 +1026,13 @@ export default {
 
     // 弹出窗
     showConfirmDialog(msg, resolve) {
-      this.$alert(msg, "提示", {
-        confirmButtonText: "确定",
+      this.$alert(msg, '提示', {
+        confirmButtonText: '确定',
         // cancelButtonText: '取消',
         // cancelButtonClass: 'cancel',
         // confirmButtonClass: 'confirmBtn',
         dangerouslyUseHTMLString: true,
-        type: "warning"
+        type: 'warning'
       })
         .then(() => {
           resolve();
@@ -1069,7 +1043,7 @@ export default {
       this.$message({
         showClose: true,
         message: msg,
-        type: type || "warning"
+        type: type || 'warning'
       });
     },
     handleChange(file, fileList) {
@@ -1083,7 +1057,7 @@ export default {
       // console.log(fileList,this.form.fileList,'aa')
     },
     handleSuccess(response, file, fileList) {
-      if (response.code == "0") {
+      if (response.code == '0') {
         this.showFileList = true;
         this.form.fileList = [];
         this.form.fileList.push({
@@ -1098,7 +1072,7 @@ export default {
         this.isSuccessUpload = 2; // 上传成功状态
         this.$refs.upload && this.$refs.upload.clearValidate(); // 清除校验
       } else {
-        this.warning(response.msg || "上传失败");
+        this.warning(response.msg || '上传失败');
         // this.form.fileList = []
         this.showUpLoad = true;
         this.showFileList = false;
@@ -1118,7 +1092,7 @@ export default {
 
       this.showUpLoad = false;
       if (file.size / 1024 / 1024 >= 500) {
-        this.warning("文件上传失败,超出大小限制500MB");
+        this.warning('文件上传失败,超出大小限制500MB');
         this.form.fileList = [];
         this.showConfirm = false;
         return false;
@@ -1129,8 +1103,8 @@ export default {
     handlePreview(file) {},
     beforeRemove(file, fileList) {
       if (this.showConfirm) {
-        return this.$alert(`确定移除 ${file.name}?`, "", {
-          cancelButtonClass: "cacelBtn"
+        return this.$alert(`确定移除 ${file.name}?`, '', {
+          cancelButtonClass: 'cacelBtn'
         });
       }
     }
@@ -1138,7 +1112,7 @@ export default {
 };
 </script>
 <style lang="less" scoped>
-@import "../../less/common.less";
+@import '../../less/common.less';
 .cell .el-button.delete:focus {
   color: red !important;
 }
@@ -1219,7 +1193,7 @@ export default {
   font-size: 14px;
 }
 .tipInfo:before {
-  content: "";
+  content: '';
   display: block;
   position: absolute;
   // bottom: 9px;

+ 2 - 1
src/components/knowledgeExtra/DevInfo.vue

@@ -331,7 +331,8 @@ export default {
         this.showType == 2 ||
         this.showType == 7 ||
         this.showType == 8 ||
-        this.showType == 9
+        this.showType == 9 ||
+        this.showType == 10
       ) {
         // 药品/手术
         this.positions = positions.filter((item) => item.key === 1);