Authored by xwx

AJ配置信息

... ... @@ -1381,13 +1381,13 @@ layui.define(['xmSelect', 'md5'], function (exports) {
}
});
},
viewAjView: function (reportCode) {
viewAjView: function (reportCode,height,width,title) {
layer.load(2);
layer.open({
type: 2,
content: obj.ajScreenStatement + "/#/bigscreen/viewer?reportCode=" + reportCode+"?access_token=" + localStorage.getItem('access_token'),
area: ['80%', '80%'],
title: ''
area: [height, width],
title: title
});
layer.closeAll('loading');
},
... ...
... ... @@ -221,9 +221,9 @@ global.viewResTopo = (resId) => {
/**
* aj报表预览
*/
global.viewAjView = (reportCode) => {
global.viewAjView = (reportCode,height,width,title) => {
let lyaui = global.layui;
lyaui.common.viewAjView(reportCode)
lyaui.common.viewAjView(reportCode,height,width,title)
}
/**
* 打开资产列表
... ...
<title>设计器预览</title>
<script type="text/html" template>
{{#
var viewURL = window.location.origin + '/vue3/index.html#/ajConfig/view';
layui.use(['sessions','common','admin'], function () {
var $ = layui.$;
var common = layui.common;
var admin = layui.admin;
var arr = [];
window.location.hash.split('/').forEach(function (v, i) {
if (v.indexOf('=') != -1) {
arr.push(v);
}
});
if (arr.length > 0) {
viewURL += "?" + arr.join("&");
}
$('#actionListIframe').attr('src',viewURL);
});
}}
<iframe id="actionListIframe" src="{{viewURL}}" frameborder="0" class="layadmin-iframe" style="height: 99.5%!important;"></iframe>
</script>
... ...
... ... @@ -174,7 +174,12 @@ const routes = [{
path: '/vue3/ajConfig',
name: 'ajConfig',
component: () => myImport('views/ajConfig/index')
}
},
{
path: '/ajConfig/view',
name: 'ajConfigView',
component: () => myImport('views/ajConfig/view/index')
},
];
// hash模式: createWebHashHistory
... ...
... ... @@ -14,7 +14,7 @@
</div>
<div class="search-table">
<cm-table-page v-if="tableDataList.length" :columns="columns" :dataList="tableDataList" @loaddata="loadTableDataList"
<cm-table-page :columns="columns" :dataList="tableDataList" @loaddata="loadTableDataList"
:showIndex="true" :total="count" :showSelection="true"
:showBorder="true" :loading="false" :pageSize="pageSize"
:showPage="true" :showTools="true" :height="(height - 130)" >
... ... @@ -103,7 +103,7 @@
:disabled="item.disabled">
</el-option>
</el-select>
<el-tag @click="preview(ajConfigFrom.designPage)">预览</el-tag>
<el-tag @click="preview(ajConfigFrom.designPage)" :size="large">预览</el-tag>
</el-form-item>
<el-form-item label="传递参数" prop="param">
... ...
... ... @@ -127,6 +127,8 @@ export default {
msg = res.msg;
cacheVisible.value=false;
proxy.$global.showMsg(msg);
clearForm();
getDataList();
}
})
}else{
... ... @@ -135,11 +137,16 @@ export default {
msg = res.msg;
cacheVisible.value=false;
proxy.$global.showMsg(msg);
debugger
if (params.type==0){
window.history.go(0);
}
clearForm();
getDataList();
}
})
}
clearForm();
getDataList();
}
//清理表单
let clearForm=()=>{
... ... @@ -174,6 +181,9 @@ export default {
if (!msg) {
msg = "删除失败";
}
if (row.type==0){
history.go(0);
}
proxy.$global.showMsg(msg);
getDataList();
}
... ... @@ -189,7 +199,7 @@ export default {
//预览
let preview=(row)=>{
proxy.$global.viewAjView(row);
proxy.$global.viewAjView(row,'80%','80%','');
}
//aj报表管理信息
... ...
<div class="container" :style="{'height':height+'px','max-height':height+'px'}">
<iframe :src="src" width="100%" height="100%" ></iframe>
</div>
... ...
export default {
name: 'ajConfigViewIndex',
template: '',
components: {},
data() {
return {
}
},
setup() {
const {proxy} = Vue.getCurrentInstance();
let src = Vue.ref('');
let height = Vue.ref(window.innerHeight - 10);
var reportCode = proxy.$global.getQueryVariable('reportCode');
let url=()=>{
src.value=sessionStorage.getItem("ajWeb")+'/#/bigscreen/viewer?reportCode='+reportCode+'&access_token=' + localStorage.getItem("access_token");
}
// 挂载完
Vue.onMounted(() => {
url();
})
return {
url,
src,
height
}
}
}
... ...