Przeglądaj źródła

Merge branch 'test' into ChronicMag_zxc

zhangxc 6 lat temu
rodzic
commit
fe30a147d2

+ 5 - 5
src/components/icss/AddDisclInfo.vue

@@ -9,7 +9,7 @@
                     <el-input v-model="form.title" placeholder="请输入标题" maxlength="30"></el-input>
                 </el-form-item>
                 <el-form-item label="内容:" prop="description" class="discDesc">
-                    <el-input type="textarea" :rows="3" placeholder="请输入内容述" v-model="form.description" maxlength="120"></el-input>
+                    <el-input type="textarea" :rows="3" placeholder="请输入内容述" v-model="form.description" maxlength="1024"></el-input>
                 </el-form-item>
                 <el-form-item label="归属:" prop="disclaimerCode">
                     <el-select v-model="form.disclaimerCode" clearable placeholder="请选择">
@@ -41,7 +41,7 @@
            this.$message({
              showClose: true,
              type: 'warning',
-             message: '已超过最大字数限制'
+             message: '标题已超过最大字数限制'
            })
         }
         callback();
@@ -50,12 +50,12 @@
         if (!value) {
           return callback(new Error('请输入内容'));
         }
-        if (value.length >= 120) {
-           this.form.name = value.substr(0, 120);
+        if (value.length >= 1024) {
+           this.form.name = value.substr(0, 1024);
            this.$message({
              showClose: true,
              type: 'warning',
-             message: '已超过最大字数限制'
+             message: '内容已超过最大字数限制'
            })
         }
         callback();

+ 2 - 2
src/components/icss/AddMedicalRelation.vue

@@ -8,14 +8,14 @@
           <span>起始术语搜索:</span>
           <el-input size="small" v-model="firstInput" placeholder="输入术语" @input="search(1)"></el-input>
           <ul v-if="showFlag==1">
-            <li v-for="it in searchDatas" :key="it.id" @click.stop="chooseFirst(it)" :title="it.name.length>10?it.name:''">{{it.name}}</li>
+            <li v-for="it in searchDatas" :key="it.id" @click.stop="chooseFirst(it)" :title="(it.name+'('+it.type+')').length>10?it.name+'('+it.type+')':''">{{it.name+'('+it.type+')'}}</li>
           </ul>
         </div>
         <div class="search">
           <span>终点术语搜索:</span>
           <el-input size="small" v-model="endInput" placeholder="输入术语" @input="search(2)"></el-input>
           <ul v-if="showFlag==2">
-            <li v-for="it in searchDatas" :key="it.id" @click.stop="chooseEnd(it)" :title="it.name.length>10?it.name:''">{{it.name}}</li>
+            <li v-for="it in searchDatas" :key="it.id" @click.stop="chooseEnd(it)" :title="(it.name+'('+it.type+')').length>10?it.name+'('+it.type+')':''">{{it.name+'('+it.type+')'}}</li>
           </ul>
         </div>
         <table class="deptbox">

+ 5 - 3
src/components/icss/VersionDesc.vue

@@ -30,7 +30,7 @@
             <template slot-scope="scope">
                 <el-button type="text" size="small" @click="toEditDesc(scope.row,scope.$index)">修改</el-button>
                 <span style="margin:0 3px;">|</span>
-                <el-button type="text" size="small" class="delete" @click="showDelDialog(scope.row.id)">删除</el-button>
+                <el-button type="text" size="small" class="delete" @click="showDelDialog(scope.row,scope.row.id)">删除</el-button>
             </template>
         </el-table-column>
         <el-table-column
@@ -298,7 +298,7 @@
           resolve();
         }).catch(() => {});
       },
-      showDelDialog(id){
+      showDelDialog(item,id){
         this.showConfirmDialog('是否删除该版本说明?',()=>{
           if(!this.isCopy){
             api.delVersionInfo({id}).then((res)=>{
@@ -320,7 +320,9 @@
           }else{
             let newList = JSON.parse(JSON.stringify(this.list));
             for(let i in newList){
-              if(newList[i].id==id){
+              if(id && newList[i].id==id){
+                this.list.splice(i,1);
+              }else if(newList[i].title == item.title && newList[i].description == item.description){//新增的没有id
                 this.list.splice(i,1);
               }
             }