后台模板参考我上面传的附件
Vue 传参参考:
- <template>
- <div>
- <input type="text" id="userName" value="1">
- <div id="reportview" style="height: 800px" />
- </div>
- </template>
- <script>
- import '@grapecity/activereports/styles/ar-js-viewer.css';
- import {Viewer} from '@grapecity/activereports/viewer';
- export default {
- name: 'app',
- mounted(){
- var getValue=document.getElementById("userName").value;
- this.viewer = new Viewer('#reportview');
- this.viewer.open('../TestReport.rdlx-json',{ ReportParams: [{ Name: 'ReportParameter1', Value: [getValue] }] });
-
- }
- }
- </script>
- <style>
- #app {
- font-family: 'Avenir', Helvetica, Arial, sans-serif;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- text-align: center;
- color: #2c3e50;
- margin-top: 60px;
- }
- </style>
复制代码
|