Browse Source

add 分页查询

master
周俊杰 1 year ago
parent
commit
dbf7fa1650
  1. 2
      acs/nladmin-system/src/main/java/org/nl/acs/device/service/impl/DeviceServiceImpl.java
  2. 5
      acs/nladmin-system/src/main/java/org/nl/acs/device/wql/Qdevice_query_002.wql
  3. 7
      acs/nladmin-ui/src/views/acs/device/protocol/index.vue

2
acs/nladmin-system/src/main/java/org/nl/acs/device/service/impl/DeviceServiceImpl.java

@ -110,7 +110,7 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
if (whereJson.get("opc_id") != null) { if (whereJson.get("opc_id") != null) {
param.put("opc_id", whereJson.get("opc_id")); param.put("opc_id", whereJson.get("opc_id"));
} }
JSONObject json = WQL.getWO("Qdevice_query_002").addParamMap(param).pageQuery(WqlUtil.getHttpContext(page), "update_time desc"); JSONObject json = WQL.getWO("Qdevice_query_002").addParamMap(param).pageQuery(WqlUtil.getHttpContext(page), "d.device_code,e.extra_name");
return json; return json;
} }

5
acs/nladmin-system/src/main/java/org/nl/acs/device/wql/Qdevice_query_002.wql

@ -78,7 +78,7 @@
ENDPAGEQUERY ENDPAGEQUERY
ENDIF ENDIF
IF 输入.flag = "2" IF 输入.flag = "2"
QUERY PAGEQUERY
SELECT SELECT
d.device_id,d.device_code,d.driver_code,d.device_type, d.device_id,d.device_code,d.driver_code,d.device_type,
e.extra_code,e.extra_name, e.extra_code,e.extra_name,
@ -100,9 +100,8 @@
OPTION 输入.opc_id <> "" OPTION 输入.opc_id <> ""
d.opc_server_id = 输入.opc_id d.opc_server_id = 输入.opc_id
ENDOPTION ENDOPTION
ORDER BY d.device_code,e.extra_name
ENDSELECT ENDSELECT
ENDQUERY ENDPAGEQUERY
ENDIF ENDIF
IF 输入.flag = "3" IF 输入.flag = "3"

7
acs/nladmin-ui/src/views/acs/device/protocol/index.vue

@ -113,6 +113,8 @@
<el-table-column prop="opc_code" label="OpcServer" /> <el-table-column prop="opc_code" label="OpcServer" />
<el-table-column prop="plc_code" label="OpcPlc" /> <el-table-column prop="plc_code" label="OpcPlc" />
</el-table> </el-table>
<!--分页组件-->
<pagination />
</div> </div>
</div> </div>
</template> </template>
@ -125,14 +127,15 @@ import { get } from '@/api/system/dictDetail'
import { selectOpcList } from '@/api/acs/device/opc' import { selectOpcList } from '@/api/acs/device/opc'
import { download } from '@/api/data' import { download } from '@/api/data'
import { downloadFile } from '@/utils' import { downloadFile } from '@/utils'
import pagination from '@crud/Pagination'
export default { export default {
name: 'Protocol', name: 'Protocol',
components: { crudOperation, rrOperation }, components: { crudOperation, rrOperation, pagination },
mixins: [presenter(), header(), crud()], mixins: [presenter(), header(), crud()],
cruds() { cruds() {
return CRUD({ return CRUD({
title: '设备协议', url: 'api/device/protocol', idField: 'id', sort: 'id,desc', title: '设备协议', url: '/api/device/protocol', idField: 'id', sort: 'id,desc',
optShow: { optShow: {
download: false download: false
} }

Loading…
Cancel
Save