Authored by 鲁尚清

Merge branch 'master-500-dev' of http://192.168.1.136:82/monitor_v3/hg-monitor-w…

…eb into master-500-dev-lushangqing
... ... @@ -475,7 +475,13 @@ layui.define(['form', 'admin', 'layer', 'laytpl', 'common', 'view', 'sessions',
//回显业务图资源图
biz_view = xmSelect.get('#select-restype-options-biz')[0];
resource_view = xmSelect.get('#select-restype-options-view')[0];
var optionsMap= $.parseJSON(resType.options);
var optionsMap = {};
try{
optionsMap= $.parseJSON(resType.options);
} catch (e){
console.error(" ==> 格式转换错误");
console.error(resType,e);
}
resource_view.setValue([optionsMap.viewCallBack]);
biz_view.setValue([optionsMap.bizCallBack]);
//回显采集类型
... ... @@ -1326,4 +1332,4 @@ layui.define(['form', 'admin', 'layer', 'laytpl', 'common', 'view', 'sessions',
return {getResTypeChecks: getResTypeChecks}
});
});
\ No newline at end of file
});
... ...
... ... @@ -3,7 +3,7 @@
<el-col :span="layout.left">
<div style="border-radius: 3px;background-color: white"
:style="{'height':height+'px','max-height':height + 'px','overflow':'auto'}">
<div style="text-align: left;padding-left: 10px;padding-top: 3px;font-weight: bold">
<div v-if="showTitle" style="text-align: left;padding-left: 10px;padding-top: 3px;font-weight: bold">
<slot name="title">
<el-link type="info" :underline="false"><i class="iconfont icon-ziliaoku"></i> 文档管理</el-link>
</slot>
... ... @@ -72,7 +72,7 @@
{{selectText}}
</el-button>
</div>
<div style="text-align: right;width: 150px">
<div v-if="isCut" style="text-align: right;width: 150px">
<el-button-group>
<el-button :size="$global.elementSize" :type="activeBtn == 'view' ? 'primary' : ''"
@click="activeModel('view')">
... ...
... ... @@ -57,7 +57,22 @@ export default {
isEditName:{
type:Boolean,
default:false
}
},
// 是否展示标题,默认不展示
showTitle:{
type:Boolean,
default:false
},
// 是否有切换展示类型,默认展示
isCut:{
type:Boolean,
default:true
},
// 默认展示视图,默认视图
defaultView:{
type:String,
default:'view'
},
},
data() {
return {
... ... @@ -179,7 +194,7 @@ export default {
let columns = Vue.ref([{
prop: 'fileName',
label: '文档名称',
label: '名称',
sortable: true,
align: 'left',
click: function (row) {
... ... @@ -192,7 +207,7 @@ export default {
},
{
prop: 'fname',
label: '文档分类',
label: '类型',
sortable: true,
width: '120px'
},
... ... @@ -207,22 +222,22 @@ export default {
sortable: true,
width: '180px'
}
/*,{
prop: 'handle',
label: '操作',
sortable: false,
width: '180px',
render: function (row) {
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>`
}
}*/
// ,{
// prop: 'handle',
// label: '操作',
// sortable: false,
// width: '180px',
// render: function (row) {
// 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>`
// }
// }
]);
// 表格数据
let dataList = Vue.ref([]);
// 总数
let total = Vue.ref(0);
// 当前展示视图
let activeBtn = Vue.ref('view');
let activeBtn = Vue.ref(props.defaultView);
// // 当前展示视图
// let viewEdit = Vue.ref(false);
//是否全选
... ...
... ... @@ -26,7 +26,11 @@ export default {
}
const replaceParams = (params) => {
return params.replace(/#lgn/g,localStorage.getItem('lgn')).replace(/#user_id/g,sessionStorage.getItem('access_token')).replace(/#access_token/g,localStorage.getItem("access_token"))
let userId = sessionStorage.getItem('user_id');
if(!userId){
userId = localStorage.getItem('user_id');
}
return params.replace(/#lgn/g,localStorage.getItem('lgn')).replace(/#user_id/g,userId).replace(/#access_token/g,localStorage.getItem("access_token"))
}
const getParamValue = (code) => {
... ...
... ... @@ -4,5 +4,9 @@
:viewTypeName="docTypeName"
:types="[docType,'user']"
:checkAuth="false"
:showTitle = "false"
:isCut = "false"
:defaultView="'list'"
:isEditName="true"
:canAddFolder="true"></cm-document>
... ...