Authored by 王涛

Merge branch 'master-500-dev-xwx' into 'master-500-dev'

AJ配置信息



See merge request !415
@@ -1381,13 +1381,13 @@ layui.define(['xmSelect', 'md5'], function (exports) { @@ -1381,13 +1381,13 @@ layui.define(['xmSelect', 'md5'], function (exports) {
1381 } 1381 }
1382 }); 1382 });
1383 }, 1383 },
1384 - viewAjView: function (reportCode) { 1384 + viewAjView: function (reportCode,height,width,title) {
1385 layer.load(2); 1385 layer.load(2);
1386 layer.open({ 1386 layer.open({
1387 type: 2, 1387 type: 2,
1388 content: obj.ajScreenStatement + "/#/bigscreen/viewer?reportCode=" + reportCode+"?access_token=" + localStorage.getItem('access_token'), 1388 content: obj.ajScreenStatement + "/#/bigscreen/viewer?reportCode=" + reportCode+"?access_token=" + localStorage.getItem('access_token'),
1389 - area: ['80%', '80%'],  
1390 - title: '' 1389 + area: [height, width],
  1390 + title: title
1391 }); 1391 });
1392 layer.closeAll('loading'); 1392 layer.closeAll('loading');
1393 }, 1393 },
@@ -221,9 +221,9 @@ global.viewResTopo = (resId) => { @@ -221,9 +221,9 @@ global.viewResTopo = (resId) => {
221 /** 221 /**
222 * aj报表预览 222 * aj报表预览
223 */ 223 */
224 -global.viewAjView = (reportCode) => { 224 +global.viewAjView = (reportCode,height,width,title) => {
225 let lyaui = global.layui; 225 let lyaui = global.layui;
226 - lyaui.common.viewAjView(reportCode) 226 + lyaui.common.viewAjView(reportCode,height,width,title)
227 } 227 }
228 /** 228 /**
229 * 打开资产列表 229 * 打开资产列表
  1 +<title>设计器预览</title>
  2 +<script type="text/html" template>
  3 + {{#
  4 + var viewURL = window.location.origin + '/vue3/index.html#/ajConfig/view';
  5 + layui.use(['sessions','common','admin'], function () {
  6 + var $ = layui.$;
  7 + var common = layui.common;
  8 + var admin = layui.admin;
  9 + var arr = [];
  10 + window.location.hash.split('/').forEach(function (v, i) {
  11 + if (v.indexOf('=') != -1) {
  12 + arr.push(v);
  13 + }
  14 + });
  15 +
  16 + if (arr.length > 0) {
  17 + viewURL += "?" + arr.join("&");
  18 + }
  19 + $('#actionListIframe').attr('src',viewURL);
  20 + });
  21 + }}
  22 + <iframe id="actionListIframe" src="{{viewURL}}" frameborder="0" class="layadmin-iframe" style="height: 99.5%!important;"></iframe>
  23 +</script>
@@ -174,7 +174,12 @@ const routes = [{ @@ -174,7 +174,12 @@ const routes = [{
174 path: '/vue3/ajConfig', 174 path: '/vue3/ajConfig',
175 name: 'ajConfig', 175 name: 'ajConfig',
176 component: () => myImport('views/ajConfig/index') 176 component: () => myImport('views/ajConfig/index')
177 - } 177 + },
  178 + {
  179 + path: '/ajConfig/view',
  180 + name: 'ajConfigView',
  181 + component: () => myImport('views/ajConfig/view/index')
  182 + },
178 ]; 183 ];
179 184
180 // hash模式: createWebHashHistory 185 // hash模式: createWebHashHistory
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 </div> 14 </div>
15 15
16 <div class="search-table"> 16 <div class="search-table">
17 - <cm-table-page v-if="tableDataList.length" :columns="columns" :dataList="tableDataList" @loaddata="loadTableDataList" 17 + <cm-table-page :columns="columns" :dataList="tableDataList" @loaddata="loadTableDataList"
18 :showIndex="true" :total="count" :showSelection="true" 18 :showIndex="true" :total="count" :showSelection="true"
19 :showBorder="true" :loading="false" :pageSize="pageSize" 19 :showBorder="true" :loading="false" :pageSize="pageSize"
20 :showPage="true" :showTools="true" :height="(height - 130)" > 20 :showPage="true" :showTools="true" :height="(height - 130)" >
@@ -103,7 +103,7 @@ @@ -103,7 +103,7 @@
103 :disabled="item.disabled"> 103 :disabled="item.disabled">
104 </el-option> 104 </el-option>
105 </el-select> 105 </el-select>
106 - <el-tag @click="preview(ajConfigFrom.designPage)">预览</el-tag> 106 + <el-tag @click="preview(ajConfigFrom.designPage)" :size="large">预览</el-tag>
107 </el-form-item> 107 </el-form-item>
108 108
109 <el-form-item label="传递参数" prop="param"> 109 <el-form-item label="传递参数" prop="param">
@@ -127,6 +127,8 @@ export default { @@ -127,6 +127,8 @@ export default {
127 msg = res.msg; 127 msg = res.msg;
128 cacheVisible.value=false; 128 cacheVisible.value=false;
129 proxy.$global.showMsg(msg); 129 proxy.$global.showMsg(msg);
  130 + clearForm();
  131 + getDataList();
130 } 132 }
131 }) 133 })
132 }else{ 134 }else{
@@ -135,11 +137,16 @@ export default { @@ -135,11 +137,16 @@ export default {
135 msg = res.msg; 137 msg = res.msg;
136 cacheVisible.value=false; 138 cacheVisible.value=false;
137 proxy.$global.showMsg(msg); 139 proxy.$global.showMsg(msg);
  140 + debugger
  141 + if (params.type==0){
  142 + window.history.go(0);
  143 + }
  144 + clearForm();
  145 + getDataList();
  146 +
138 } 147 }
139 }) 148 })
140 } 149 }
141 - clearForm();  
142 - getDataList();  
143 } 150 }
144 //清理表单 151 //清理表单
145 let clearForm=()=>{ 152 let clearForm=()=>{
@@ -174,6 +181,9 @@ export default { @@ -174,6 +181,9 @@ export default {
174 if (!msg) { 181 if (!msg) {
175 msg = "删除失败"; 182 msg = "删除失败";
176 } 183 }
  184 + if (row.type==0){
  185 + history.go(0);
  186 + }
177 proxy.$global.showMsg(msg); 187 proxy.$global.showMsg(msg);
178 getDataList(); 188 getDataList();
179 } 189 }
@@ -189,7 +199,7 @@ export default { @@ -189,7 +199,7 @@ export default {
189 199
190 //预览 200 //预览
191 let preview=(row)=>{ 201 let preview=(row)=>{
192 - proxy.$global.viewAjView(row); 202 + proxy.$global.viewAjView(row,'80%','80%','');
193 } 203 }
194 204
195 //aj报表管理信息 205 //aj报表管理信息
  1 +<div class="container" :style="{'height':height+'px','max-height':height+'px'}">
  2 + <iframe :src="src" width="100%" height="100%" ></iframe>
  3 +</div>
  1 +export default {
  2 + name: 'ajConfigViewIndex',
  3 + template: '',
  4 + components: {},
  5 +
  6 + data() {
  7 + return {
  8 + }
  9 + },
  10 + setup() {
  11 + const {proxy} = Vue.getCurrentInstance();
  12 + let src = Vue.ref('');
  13 + let height = Vue.ref(window.innerHeight - 10);
  14 + var reportCode = proxy.$global.getQueryVariable('reportCode');
  15 +
  16 + let url=()=>{
  17 + src.value=sessionStorage.getItem("ajWeb")+'/#/bigscreen/viewer?reportCode='+reportCode+'&access_token=' + localStorage.getItem("access_token");
  18 + }
  19 + // 挂载完
  20 + Vue.onMounted(() => {
  21 + url();
  22 + })
  23 +
  24 + return {
  25 + url,
  26 + src,
  27 + height
  28 + }
  29 + }
  30 +}