1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- <template>
- <view class="content">
- <web-view :src="src"></web-view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- id: null,
- title: null,
- option: {},
- show: false,
- page: 1,
- limit: 10,
- recordList: [],
- src: null
- }
- },
- onLoad(options) {
- this.id = options.id
- this.title = options.title
- //const randomId=this.GetQueryString('randomId')
- //const printArea=this.GetQueryString('printArea')
- //const printAreaValue=this.GetQueryString('printAreaValue')
-
-
-
- this.src = `/static/webview/report-wv.html?id=${this.id}`
- // this.getReportTable()
- },
- onReady() {
- setTimeout(() => {
- uni.setNavigationBarTitle({
- title: this.title
- });
- }, 500)
- },
- methods: {
- //返回按钮
- handelBack() {
- uni.switchTab({
- url: '/pages/reportForm/index'
- });
- },
- //报表详情
- getReportTable() {
- uni.$http.get('/reportTable/getReportTableById', {
- id: this.id
- }).then(res => {
- console.log(res, 'res');
- if (res.data.code === 200) {
- // this.title=res.data.data.reportTableName
- }
- })
- },
- GetQueryString(name) {
- var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
- console.log('777777')
- var r = window.location.search.substr(1).match(reg); //获取url中"?"符后的字符串并正则匹配
-
- console.log('8888888')
- var context = "";
- if (r != null)
- context = decodeURIComponent(r[2]);
- reg = null;
- r = null;
- return context == null || context == "" || context == "undefined" ? "" : context;
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- ::v-deep .luckysheet_info_detail_back {
- display: none !important;
- }
- ::v-deep .u-button {
- width: 160rpx;
- height: 60rpx
- }
- .btn {
- position: absolute;
- left: 50%;
- bottom: 2%;
- margin-left: -80rpx;
- }
- .uni-td {
- width: 600rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- </style>
|