Browse Source

汉化排序

maxiaoxiao 11 months ago
parent
commit
260630c43d
1 changed files with 16 additions and 4 deletions
  1. 16 4
      src/views/system/zyml/index.vue

+ 16 - 4
src/views/system/zyml/index.vue

@@ -435,7 +435,7 @@
               </template>
             </el-table-column>
             <el-table-column label="是否显示">
-              <template slot-scope="{row}">
+              <template slot-scope="{ row }">
                 <el-switch
                   v-model="row.status"
                   active-text="是"
@@ -444,6 +444,17 @@
                 </el-switch>
               </template>
             </el-table-column>
+            <el-table-column label="显示顺序">
+              <template slot-scope="{ row }">
+                <el-input-number
+                  size="mini"
+                  v-model="row.order"
+                  :min="0"
+                  :precision="0"
+                  :step="1"
+                ></el-input-number>
+              </template>
+            </el-table-column>
           </el-table>
         </el-tab-pane>
       </el-tabs>
@@ -877,11 +888,12 @@ export default {
           console.log(res);
           if (res.fieldNames.length > 0) {
             //处理数据
-            res.fieldNames.forEach((item) => {
+            res.fieldNames.forEach((item, iindex) => {
               this.tempTableData.push({
                 fieldname: item,
                 fieldaliasname: item,
-                status:true,
+                status: true,
+                order: iindex,
               });
             });
 
@@ -894,7 +906,7 @@ export default {
           }
         });
       } else {
-        console.log(JSON.parse(row.legend),'已有配置');
+        console.log(JSON.parse(row.legend), "已有配置");
         //如果lenged中存在字段修正数据,则直接使用
         this.tabelList.push({
           bsm: row.bsm,