Merge branch 'master-500-dev' of http://192.168.1.136:82/monitor_v3/hg-monitor-w…
…eb into master-500-dev-lushangqing
Showing
5 changed files
with
46 additions
and
17 deletions
@@ -475,7 +475,13 @@ layui.define(['form', 'admin', 'layer', 'laytpl', 'common', 'view', 'sessions', | @@ -475,7 +475,13 @@ layui.define(['form', 'admin', 'layer', 'laytpl', 'common', 'view', 'sessions', | ||
475 | //回显业务图资源图 | 475 | //回显业务图资源图 |
476 | biz_view = xmSelect.get('#select-restype-options-biz')[0]; | 476 | biz_view = xmSelect.get('#select-restype-options-biz')[0]; |
477 | resource_view = xmSelect.get('#select-restype-options-view')[0]; | 477 | resource_view = xmSelect.get('#select-restype-options-view')[0]; |
478 | - var optionsMap= $.parseJSON(resType.options); | 478 | + var optionsMap = {}; |
479 | + try{ | ||
480 | + optionsMap= $.parseJSON(resType.options); | ||
481 | + } catch (e){ | ||
482 | + console.error(" ==> 格式转换错误"); | ||
483 | + console.error(resType,e); | ||
484 | + } | ||
479 | resource_view.setValue([optionsMap.viewCallBack]); | 485 | resource_view.setValue([optionsMap.viewCallBack]); |
480 | biz_view.setValue([optionsMap.bizCallBack]); | 486 | biz_view.setValue([optionsMap.bizCallBack]); |
481 | //回显采集类型 | 487 | //回显采集类型 |
@@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
3 | <el-col :span="layout.left"> | 3 | <el-col :span="layout.left"> |
4 | <div style="border-radius: 3px;background-color: white" | 4 | <div style="border-radius: 3px;background-color: white" |
5 | :style="{'height':height+'px','max-height':height + 'px','overflow':'auto'}"> | 5 | :style="{'height':height+'px','max-height':height + 'px','overflow':'auto'}"> |
6 | - <div style="text-align: left;padding-left: 10px;padding-top: 3px;font-weight: bold"> | 6 | + <div v-if="showTitle" style="text-align: left;padding-left: 10px;padding-top: 3px;font-weight: bold"> |
7 | <slot name="title"> | 7 | <slot name="title"> |
8 | <el-link type="info" :underline="false"><i class="iconfont icon-ziliaoku"></i> 文档管理</el-link> | 8 | <el-link type="info" :underline="false"><i class="iconfont icon-ziliaoku"></i> 文档管理</el-link> |
9 | </slot> | 9 | </slot> |
@@ -72,7 +72,7 @@ | @@ -72,7 +72,7 @@ | ||
72 | {{selectText}} | 72 | {{selectText}} |
73 | </el-button> | 73 | </el-button> |
74 | </div> | 74 | </div> |
75 | - <div style="text-align: right;width: 150px"> | 75 | + <div v-if="isCut" style="text-align: right;width: 150px"> |
76 | <el-button-group> | 76 | <el-button-group> |
77 | <el-button :size="$global.elementSize" :type="activeBtn == 'view' ? 'primary' : ''" | 77 | <el-button :size="$global.elementSize" :type="activeBtn == 'view' ? 'primary' : ''" |
78 | @click="activeModel('view')"> | 78 | @click="activeModel('view')"> |
@@ -57,7 +57,22 @@ export default { | @@ -57,7 +57,22 @@ export default { | ||
57 | isEditName:{ | 57 | isEditName:{ |
58 | type:Boolean, | 58 | type:Boolean, |
59 | default:false | 59 | default:false |
60 | - } | 60 | + }, |
61 | + // 是否展示标题,默认不展示 | ||
62 | + showTitle:{ | ||
63 | + type:Boolean, | ||
64 | + default:false | ||
65 | + }, | ||
66 | + // 是否有切换展示类型,默认展示 | ||
67 | + isCut:{ | ||
68 | + type:Boolean, | ||
69 | + default:true | ||
70 | + }, | ||
71 | + // 默认展示视图,默认视图 | ||
72 | + defaultView:{ | ||
73 | + type:String, | ||
74 | + default:'view' | ||
75 | + }, | ||
61 | }, | 76 | }, |
62 | data() { | 77 | data() { |
63 | return { | 78 | return { |
@@ -179,7 +194,7 @@ export default { | @@ -179,7 +194,7 @@ export default { | ||
179 | 194 | ||
180 | let columns = Vue.ref([{ | 195 | let columns = Vue.ref([{ |
181 | prop: 'fileName', | 196 | prop: 'fileName', |
182 | - label: '文档名称', | 197 | + label: '名称', |
183 | sortable: true, | 198 | sortable: true, |
184 | align: 'left', | 199 | align: 'left', |
185 | click: function (row) { | 200 | click: function (row) { |
@@ -192,7 +207,7 @@ export default { | @@ -192,7 +207,7 @@ export default { | ||
192 | }, | 207 | }, |
193 | { | 208 | { |
194 | prop: 'fname', | 209 | prop: 'fname', |
195 | - label: '文档分类', | 210 | + label: '类型', |
196 | sortable: true, | 211 | sortable: true, |
197 | width: '120px' | 212 | width: '120px' |
198 | }, | 213 | }, |
@@ -207,22 +222,22 @@ export default { | @@ -207,22 +222,22 @@ export default { | ||
207 | sortable: true, | 222 | sortable: true, |
208 | width: '180px' | 223 | width: '180px' |
209 | } | 224 | } |
210 | - /*,{ | ||
211 | - prop: 'handle', | ||
212 | - label: '操作', | ||
213 | - sortable: false, | ||
214 | - width: '180px', | ||
215 | - render: function (row) { | ||
216 | - return `<i class="el-icon-plus " @click='handleView(row)'></i><i class="iconfont el-icon-download " @click='handleDownload(row)'></i><i class="iconfont el-icon-delete" @click='handleDelete(row)'></i>` | ||
217 | - } | ||
218 | - }*/ | 225 | + // ,{ |
226 | + // prop: 'handle', | ||
227 | + // label: '操作', | ||
228 | + // sortable: false, | ||
229 | + // width: '180px', | ||
230 | + // render: function (row) { | ||
231 | + // return `<i class="el-icon-plus " @click='handleView(row)'></i><i class="iconfont el-icon-download " @click='handleDownload(row)'></i><i class="iconfont el-icon-delete" @click='handleDelete(row)'></i>` | ||
232 | + // } | ||
233 | + // } | ||
219 | ]); | 234 | ]); |
220 | // 表格数据 | 235 | // 表格数据 |
221 | let dataList = Vue.ref([]); | 236 | let dataList = Vue.ref([]); |
222 | // 总数 | 237 | // 总数 |
223 | let total = Vue.ref(0); | 238 | let total = Vue.ref(0); |
224 | // 当前展示视图 | 239 | // 当前展示视图 |
225 | - let activeBtn = Vue.ref('view'); | 240 | + let activeBtn = Vue.ref(props.defaultView); |
226 | // // 当前展示视图 | 241 | // // 当前展示视图 |
227 | // let viewEdit = Vue.ref(false); | 242 | // let viewEdit = Vue.ref(false); |
228 | //是否全选 | 243 | //是否全选 |
@@ -26,7 +26,11 @@ export default { | @@ -26,7 +26,11 @@ 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('access_token')).replace(/#access_token/g,localStorage.getItem("access_token")) | 29 | + let userId = sessionStorage.getItem('user_id'); |
30 | + if(!userId){ | ||
31 | + userId = localStorage.getItem('user_id'); | ||
32 | + } | ||
33 | + return params.replace(/#lgn/g,localStorage.getItem('lgn')).replace(/#user_id/g,userId).replace(/#access_token/g,localStorage.getItem("access_token")) | ||
30 | } | 34 | } |
31 | 35 | ||
32 | const getParamValue = (code) => { | 36 | const getParamValue = (code) => { |
@@ -4,5 +4,9 @@ | @@ -4,5 +4,9 @@ | ||
4 | :viewTypeName="docTypeName" | 4 | :viewTypeName="docTypeName" |
5 | :types="[docType,'user']" | 5 | :types="[docType,'user']" |
6 | :checkAuth="false" | 6 | :checkAuth="false" |
7 | + :showTitle = "false" | ||
8 | + :isCut = "false" | ||
9 | + :defaultView="'list'" | ||
10 | + :isEditName="true" | ||
7 | :canAddFolder="true"></cm-document> | 11 | :canAddFolder="true"></cm-document> |
8 | 12 |
-
Please register or login to post a comment