Showing
4 changed files
with
54 additions
and
18 deletions
@@ -38,10 +38,10 @@ | @@ -38,10 +38,10 @@ | ||
38 | <span class="icon-bg"> | 38 | <span class="icon-bg"> |
39 | <i class="el-icon-delete" title="删除" @click="handleDelete(scope.row)"></i> | 39 | <i class="el-icon-delete" title="删除" @click="handleDelete(scope.row)"></i> |
40 | </span> | 40 | </span> |
41 | - <span class="icon-bg"> | 41 | + <span class="icon-bg"> |
42 | <i class="el-icon-edit-outline" title="修改" @click="handleUpdate(scope.row)"></i> | 42 | <i class="el-icon-edit-outline" title="修改" @click="handleUpdate(scope.row)"></i> |
43 | </span> | 43 | </span> |
44 | - <span class="icon-bg"> | 44 | + <span class="icon-bg"> |
45 | <i class="el-icon-view" title="预览" @click="preview(scope.row)"></i> | 45 | <i class="el-icon-view" title="预览" @click="preview(scope.row)"></i> |
46 | </span> | 46 | </span> |
47 | </div> | 47 | </div> |
@@ -68,10 +68,10 @@ | @@ -68,10 +68,10 @@ | ||
68 | 68 | ||
69 | 69 | ||
70 | <el-form-item label="类型" prop="type"> | 70 | <el-form-item label="类型" prop="type"> |
71 | - <el-radio v-model="ajConfigFrom.type" label="0" size="large">菜单</el-radio> | ||
72 | - <el-radio v-model="ajConfigFrom.type" label="1" size="large">按钮</el-radio> | ||
73 | - <el-radio v-model="ajConfigFrom.type" label="2" size="large">详情页</el-radio> | ||
74 | -<!-- <div style="height: 15px; color: darkgrey">说明:参数中间用'&'拼接</div>--> | 71 | + <el-radio v-model="ajConfigFrom.type" label="0" size="large">菜单</el-radio> |
72 | + <el-radio v-model="ajConfigFrom.type" label="1" size="large">按钮</el-radio> | ||
73 | + <el-radio v-model="ajConfigFrom.type" label="2" size="large">详情页</el-radio> | ||
74 | + <!-- <div style="height: 15px; color: darkgrey">说明:参数中间用'&'拼接</div>--> | ||
75 | </el-form-item> | 75 | </el-form-item> |
76 | 76 | ||
77 | 77 | ||
@@ -126,7 +126,7 @@ | @@ -126,7 +126,7 @@ | ||
126 | <el-collapse-item name="1"> | 126 | <el-collapse-item name="1"> |
127 | <template #title> | 127 | <template #title> |
128 | 示例:&resId=#resId&access_token=#access_token | 128 | 示例:&resId=#resId&access_token=#access_token |
129 | - </el-icon> | 129 | + </el-icon> |
130 | </template> | 130 | </template> |
131 | <div style="font-size: 12px;text-align: left">可配置字段:</div> | 131 | <div style="font-size: 12px;text-align: left">可配置字段:</div> |
132 | <el-descriptions :column="2" size="mini" border > | 132 | <el-descriptions :column="2" size="mini" border > |
@@ -10,7 +10,7 @@ export default { | @@ -10,7 +10,7 @@ export default { | ||
10 | id: [ | 10 | id: [ |
11 | { | 11 | { |
12 | required: true, | 12 | required: true, |
13 | - message: '请填写文档编号!', | 13 | + message: '请填写配置编号!', |
14 | trigger: 'blur', | 14 | trigger: 'blur', |
15 | } | 15 | } |
16 | ], | 16 | ], |
@@ -36,7 +36,6 @@ export default { | @@ -36,7 +36,6 @@ export default { | ||
36 | setup(props, {attrs, slots, emit}){ | 36 | setup(props, {attrs, slots, emit}){ |
37 | const {proxy} = Vue.getCurrentInstance(); | 37 | const {proxy} = Vue.getCurrentInstance(); |
38 | let height = Vue.ref(window.innerHeight - 10); | 38 | let height = Vue.ref(window.innerHeight - 10); |
39 | - | ||
40 | let configs = Vue.ref([{ | 39 | let configs = Vue.ref([{ |
41 | name:'resId', | 40 | name:'resId', |
42 | desc:'资源ID(资源列表可用)' | 41 | desc:'资源ID(资源列表可用)' |
@@ -191,7 +190,7 @@ export default { | @@ -191,7 +190,7 @@ export default { | ||
191 | msg = "删除失败"; | 190 | msg = "删除失败"; |
192 | } | 191 | } |
193 | if (row.type==0){ | 192 | if (row.type==0){ |
194 | - history.go(0); | 193 | + history.go(0); |
195 | } | 194 | } |
196 | proxy.$global.showMsg(msg); | 195 | proxy.$global.showMsg(msg); |
197 | getDataList(); | 196 | getDataList(); |
@@ -339,7 +338,8 @@ export default { | @@ -339,7 +338,8 @@ export default { | ||
339 | menuList, | 338 | menuList, |
340 | menuOptions, | 339 | menuOptions, |
341 | getResType, | 340 | getResType, |
342 | - configs } | 341 | + configs |
342 | + } | ||
343 | } | 343 | } |
344 | 344 | ||
345 | } | 345 | } |
1 | -<div class="container" :style="{'height':height+'px','max-height':height+'px'}"> | 1 | +<div class="container" :style="{'height':height+'px','max-height':height+'px','background':'#fff'}"> |
2 | <iframe :src="getSrc" width="100%" height="100%" ></iframe> | 2 | <iframe :src="getSrc" width="100%" height="100%" ></iframe> |
3 | </div> | 3 | </div> |
@@ -12,8 +12,8 @@ export default { | @@ -12,8 +12,8 @@ export default { | ||
12 | let param={ | 12 | let param={ |
13 | id:ajConfig | 13 | id:ajConfig |
14 | } | 14 | } |
15 | - let params = ''; | ||
16 | - let designPage = ''; | 15 | + let params=''; |
16 | + let designPage=''; | ||
17 | proxy.$http.get(`/api-web/ajConfig/findOneById`, param, function (res) { | 17 | proxy.$http.get(`/api-web/ajConfig/findOneById`, param, function (res) { |
18 | if (res && res.success == true && res.object) { | 18 | if (res && res.success == true && res.object) { |
19 | // 参数替换 | 19 | // 参数替换 |
@@ -26,7 +26,7 @@ export default { | @@ -26,7 +26,7 @@ export default { | ||
26 | } | 26 | } |
27 | 27 | ||
28 | const replaceParams = (params) => { | 28 | const replaceParams = (params) => { |
29 | - return params.replace(/#lgn/g,localStorage.getItem('lgn')).replace(/#user_id/g,sessionStorage.getItem('user_id')).replace(/#access_token/g,localStorage.getItem("access_token")) | 29 | + return params.replace(/#lgn/g,localStorage.getItem('lgn')).replace(/#user_id/g,sessionStorage.getItem('access_token')).replace(/#access_token/g,localStorage.getItem("access_token")) |
30 | } | 30 | } |
31 | 31 | ||
32 | const getParamValue = (code) => { | 32 | const getParamValue = (code) => { |
@@ -35,16 +35,52 @@ export default { | @@ -35,16 +35,52 @@ export default { | ||
35 | // 获取sessionStorage | 35 | // 获取sessionStorage |
36 | // 获取localStorage | 36 | // 获取localStorage |
37 | } | 37 | } |
38 | - | ||
39 | - | 38 | + // 获取资源详情 //start lsq 监听跨域iframe子页面向父页面发送数据(子页面点击名称进入详情页) 2022-03-15 |
39 | + let getResDetail=(resId)=>{ | ||
40 | + let editFlag = false; | ||
41 | + let provider = ''; | ||
42 | + let name = ''; | ||
43 | + let ip = ''; | ||
44 | + let resTypeName = ''; | ||
45 | + let adminName = ''; | ||
46 | + let manageIp = ''; | ||
47 | + let collProtocol = ''; | ||
48 | + let resType=''; | ||
49 | + let lyaui=window.parent.layui; | ||
50 | + proxy.$http.get(`/api-web/v32/res/detail/${resId}`, {}, function (res) { | ||
51 | + if (res && res.map) { | ||
52 | + let data = res.map; | ||
53 | + provider = data.provider; | ||
54 | + ip = data.ip; | ||
55 | + resTypeName = data.resTypeName; | ||
56 | + adminName = data.adminName; | ||
57 | + manageIp = data.manageIp; | ||
58 | + collProtocol = data.collProtocol; | ||
59 | + name = data.resName; | ||
60 | + if(resType == ''){ | ||
61 | + resType = data.resType; | ||
62 | + } | ||
63 | + lyaui.commonCols.detailPage(resId, resType, editFlag, provider, name, ip, resTypeName, adminName, manageIp, collProtocol); | ||
64 | + } | ||
65 | + }); | ||
66 | + } | ||
67 | + //end lsq 2022-03-15 | ||
40 | // 挂载完 | 68 | // 挂载完 |
41 | Vue.onMounted(() => { | 69 | Vue.onMounted(() => { |
42 | getUrl(); | 70 | getUrl(); |
71 | + //start lsq 监听跨域iframe子页面向父页面发送数据(子页面点击名称进入详情页) 2022-03-15 | ||
72 | + window.addEventListener('message',function(e){ | ||
73 | + if(e.data.type=='detail'){ | ||
74 | + getResDetail(e.data.data.resId); | ||
75 | + }else{ | ||
76 | + } | ||
77 | + }) | ||
78 | + //end lsq 2022-03-15 | ||
43 | }) | 79 | }) |
44 | 80 | ||
45 | return { | 81 | return { |
46 | height, | 82 | height, |
47 | - getSrc | 83 | + getSrc, |
48 | } | 84 | } |
49 | } | 85 | } |
50 | } | 86 | } |
-
Please register or login to post a comment