瀏覽代碼

Merge remote-tracking branch 'origin/law0713' into test

zhouna 4 年之前
父節點
當前提交
3e1bfdb16c
共有 2 個文件被更改,包括 5 次插入55 次删除
  1. 3 2
      src/components/knowledgeExtra/AddDevKnow.vue
  2. 2 53
      src/components/knowledgeExtra/DevInfo.vue

+ 3 - 2
src/components/knowledgeExtra/AddDevKnow.vue

@@ -394,7 +394,7 @@ export default {
                   data.details.map(it => {
                     return {
                       title: it.title,
-                      position: this.mapStringToNum(it.contentType),
+                      position: (it.contentType||'').split(","),
                       content: it.content.replace(
                         /{imageUrlPrefix}/g,
                         config.imgHost
@@ -1043,7 +1043,8 @@ export default {
       this.$message({
         showClose: true,
         message: msg,
-        type: type || 'warning'
+        type: type || 'warning',
+        duration:1000
       });
     },
     handleChange(file, fileList) {

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

@@ -19,7 +19,7 @@
     </el-form-item>
     <el-form-item label="内容类型:" prop="position" label-width="160px">
       <el-checkbox-group v-model="data.position">
-        <el-checkbox v-for="it in positions" :key="it.key" :label="it.key">
+        <el-checkbox v-for="it in positions" :key="it.val" :label="it.val">
           {{
           it.name
           }}
@@ -313,7 +313,7 @@ export default {
     filterHiddenPosition() {
       const pos = this.data.position;
       const pArr = this.positions.map(it => {
-        return it.key;
+        return it.val;
       });
       const pStr = pArr.join(',');
       const arr = pos.filter(it => {
@@ -332,58 +332,7 @@ export default {
           return arr.includes(it.val);
         });
       }
-
-      // let obj = {};
-      // let arr = formData.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
-      //   i
-      // ].basConceptList.concat(data2);
-      // arr = arr.reduce(function(item, next) {
-      //   obj[next.conceptId]
-      //     ? ''
-      //     : (obj[next.conceptId] = true && item.push(next));
-      //   return item;
-      // }, []);
-      // let positions = config.contentTypes;
-      // if (this.showType == 1) {
-      //   // 诊断
-      //   this.positions = positions.filter((item) => item.key !== 2);
-      // } else if (
-      //   this.showType == 3 ||
-      //   this.showType == 4 ||
-      //   this.showType == 5 ||
-      //   this.showType == 6
-      // ) {
-      //   // 检验/检查
-      //   this.positions = positions.filter((item) => {
-      //     return item.key <= 2;
-      //   });
-      // } else if (
-      //   this.showType == 2 ||
-      //   this.showType == 7 ||
-      //   this.showType == 8 ||
-      //   this.showType == 9 ||
-      //   this.showType == 10
-      // ) {
-      //   // 药品/手术
-      //   this.positions = positions.filter((item) => item.key === 1);
-      // } else {
-      //   this.positions = positions;
-      // }
     }
-
-    /*emitVal(){
-        let data = this.form;
-        let pst=this.form.position;
-        const content =  this.form.content.replace(config.imgHost,'{imageUrlPrefix}');
-        const text = this.$refs.quillEditor;console.log(text)
-        pst = typeof pst=='string'?pst:pst.join(',');
-        data =   Object.assign({},data,{
-                                        position:this.form.position?pst:'',
-                                        orderNo:this.index,
-                                        text:'',
-                                        content:content});
-        this.$emit("change",this.index,data);
-      }*/
   }
 };
 </script>