Browse Source

限制输入长度

shaun-sheep 4 years ago
parent
commit
563d333965
3 changed files with 14 additions and 6 deletions
  1. 2 2
      public/systemConf.js
  2. 11 3
      src/views/legendLibrary/addForm.vue
  3. 1 1
      src/views/legendLibrary/index.vue

+ 2 - 2
public/systemConf.js

@@ -25,8 +25,8 @@ var __systemConf = {
     conf: {
     conf: {
         // 阿里云
         // 阿里云
         editerUrl: 'http://60.205.177.43:80/wandaEditer/', // 编辑器地址
         editerUrl: 'http://60.205.177.43:80/wandaEditer/', // 编辑器地址
-        wandaBmGuideUrl: 'http://60.205.177.43:80/wandaBmGuide/', //管理书地址
-        // wandaBmGuideUrl: 'http://192.168.200.26:8090/wandaBmGuide/', //管理书地址
+        // wandaBmGuideUrl: 'http://60.205.177.43:80/wandaBmGuide/', //管理书地址
+        wandaBmGuideUrl: 'http://192.168.200.26:8090/wandaBmGuide/', //管理书地址
     },
     },
 }
 }
 window.__systemConf = __systemConf
 window.__systemConf = __systemConf

+ 11 - 3
src/views/legendLibrary/addForm.vue

@@ -10,8 +10,8 @@
                     </el-col>
                     </el-col>
                     <el-col :span='12'>
                     <el-col :span='12'>
                         <div class='start'>图例名称</div>
                         <div class='start'>图例名称</div>
-                        <!-- <el-input v-model='ruleForm.Name' style='width:200px;height:32px;'></el-input> -->
-                        <Input v-model='ruleForm.Name' placeholder maxlength='20' style='width:200px' />
+                        <el-input v-model='ruleForm.Name' class='reset-input-name' oninput='if(value.length>20)value=value.slice(0,20)'></el-input>
+                        <!-- <Input v-model='ruleForm.Name' placeholder style='width:200px;' @input='if(value.length>11)value=value.slice(0,11)' /> -->
                     </el-col>
                     </el-col>
                     <el-col :span='12' style='margin-top:20px'>
                     <el-col :span='12' style='margin-top:20px'>
                         <div class>单位</div>
                         <div class>单位</div>
@@ -41,7 +41,7 @@
             </div>
             </div>
             <div v-show='ruleForm.Type=="Zone" || ruleForm.Type=="Image" || ruleForm.Type =="Line"'>
             <div v-show='ruleForm.Type=="Zone" || ruleForm.Type=="Image" || ruleForm.Type =="Line"'>
                 <div style='color:#646C73'>展示预览</div>
                 <div style='color:#646C73'>展示预览</div>
-                <div class='input-right' ref='graph' style="width:200px;height:114px;">
+                <div class='input-right' ref='graph' style='width:200px;height:114px;'>
                     <canvas id='canvas' :width='canvasWidth' :height='canvasHeight'></canvas>
                     <canvas id='canvas' :width='canvasWidth' :height='canvasHeight'></canvas>
                 </div>
                 </div>
             </div>
             </div>
@@ -522,6 +522,14 @@ export default {
     .ant-input-number {
     .ant-input-number {
         border-radius: 4px 0 0 4px;
         border-radius: 4px 0 0 4px;
     }
     }
+    .reset-input-name {
+        /deep/ .el-input__inner {
+            width: 200px;
+            height: 32px;
+            line-height: 32px;
+            // border: 1px solid #c3c7cb;
+        }
+    }
     // .add-form-type {
     // .add-form-type {
     //     /deep/ .p-select .p-select-header {
     //     /deep/ .p-select .p-select-header {
     //         height: 40px;
     //         height: 40px;

+ 1 - 1
src/views/legendLibrary/index.vue

@@ -129,7 +129,7 @@
                     </el-table-column>
                     </el-table-column>
                     <el-table-column prop='system' label='专业' show-overflow-tooltip width='120'>
                     <el-table-column prop='system' label='专业' show-overflow-tooltip width='120'>
                         <template slot-scope='{row}'>
                         <template slot-scope='{row}'>
-                            <span v-for='(item,index) in row.InfoSystems ' :key='index'>{{item.Name}}</span>
+                            <span v-for='(item,index) in row.InfoSystem ' :key='index'>{{item.Name}}</span>
                         </template>
                         </template>
                     </el-table-column>
                     </el-table-column>
                 </el-table-column>
                 </el-table-column>