Merge branch 'PR' into develop

pull/109/MERGE
13621160019@163.com 2022-01-04 22:14:00 +08:00
commit cc5269fd18
2 changed files with 3 additions and 3 deletions

View File

@ -84,7 +84,7 @@
</form>
</div>
<div class="col-sm-8">
<table id="variablesTable" class="footable table table-bordered table-hover" data-sort="false" data-page-size="7" >
<table id="variablesTable" class="footable table table-bordered table-hover" data-sort="false" data-page-size="20" >
<thead>
<tr>
<th class="text-center">{{'SETTING.VARIABLE_NAME' | translate}}</th>

View File

@ -86,10 +86,10 @@ class VirtualMeterCollection:
if meta_result["equation"] is not None:
expression = {'equation': meta_result["equation"], 'variables': []}
query_variables = (" SELECT v.id, v.name, v.meter_type, v.meter_id "
query_variables = (" SELECT v.id, v.name, v.meter_type, v.meter_id, SUBSTRING(v.name,2) as name2"
" FROM tbl_virtual_meters vm, tbl_variables v "
" WHERE vm.id = %s AND v.virtual_meter_id = vm.id "
" ORDER BY v.name ")
" ORDER BY name2+0 ")
cursor.execute(query_variables, (meta_result['id'],))
rows_variables = cursor.fetchall()
if rows_variables is not None: