...
|
...
|
@@ -100,12 +100,7 @@ export default { |
|
|
}
|
|
|
})
|
|
|
}
|
|
|
// 挂载完
|
|
|
Vue.onMounted(() => {
|
|
|
init();
|
|
|
getListData({page: 1, limit: pageSize.value});
|
|
|
onReset();//清空搜索条件(资源id)
|
|
|
})
|
|
|
|
|
|
//获取列表数据
|
|
|
const getListData = ({page, limit}) => {
|
|
|
//定义列表参数
|
...
|
...
|
@@ -193,37 +188,10 @@ export default { |
|
|
}
|
|
|
//添加
|
|
|
let save = () => {
|
|
|
//获取所有的端口侦测信息
|
|
|
let dataList = [];
|
|
|
let getParams = {
|
|
|
keyWords: '',
|
|
|
resTypes: '',
|
|
|
resIds: '',
|
|
|
busIds: '',
|
|
|
page: '',
|
|
|
limit: ''
|
|
|
};
|
|
|
proxy.$http.get("/api-web/bResourceExtendParam/page", getParams, function (res) {
|
|
|
if (res && res.success) {
|
|
|
dataList = res.data;
|
|
|
}
|
|
|
})
|
|
|
dataList = dataList.map(item => item.resId);
|
|
|
proxy.$global.openWin("template/res/reslist", "选择资源", {oldData: dataList}, ["选择"], function (index) {
|
|
|
//获取选中数据
|
|
|
let data = proxy.$global.layui.table.checkStatus('reslist_resListTable').data;
|
|
|
if (data.length === 0) {
|
|
|
//vue层级关系
|
|
|
// proxy.$global.showMsg("请至少选择一条数据!", "warning");
|
|
|
proxy.$global.layer.msg('请选择一项', {icon: 7, timeout: 3000});
|
|
|
return false;
|
|
|
}
|
|
|
//打开端口侦测配置页面
|
|
|
portSenseConfigData.value = data.map(item => item.resId);
|
|
|
stepActive.value = 1;
|
|
|
showPortSense.value = true;
|
|
|
proxy.$global.layer.close(index);
|
|
|
}, null, ['80%', '83%']);
|
|
|
|
|
|
portSenseConfigData.value = [];
|
|
|
loadResTree();
|
|
|
}
|
|
|
//删除
|
|
|
let deleteOther = () => {
|
...
|
...
|
@@ -247,8 +215,57 @@ export default { |
|
|
//打开端口侦测配置页面
|
|
|
portSenseConfigData.value = [row.resId];
|
|
|
showPortSense.value = true;
|
|
|
|
|
|
stepActive.value = 2;
|
|
|
}
|
|
|
|
|
|
let stepActive = Vue.ref(0);
|
|
|
let resIds = Vue.ref([]);
|
|
|
let resTreeArr = Vue.ref([]);
|
|
|
const typeProps = Vue.reactive({
|
|
|
children: 'children',
|
|
|
label: 'label',
|
|
|
value: 'value'
|
|
|
})
|
|
|
|
|
|
const next = () => {
|
|
|
if( portSenseConfigData.value.length == 0){
|
|
|
proxy.$global.showMsg("请至少选择一个资源!");
|
|
|
return;
|
|
|
}
|
|
|
if (stepActive.value++ > 2) stepActive.value = 1
|
|
|
}
|
|
|
|
|
|
const closeDialog = () => {
|
|
|
showPortSense.value = false;
|
|
|
getListData({page: 1, limit: pageSize.value});
|
|
|
}
|
|
|
|
|
|
const loadResTree = () => {
|
|
|
proxy.$http.get('/mj/user/selectResTreeAndSelectRes', {userId: proxy.$global.common.getUserId()}, function (res) {
|
|
|
if (res && res.success && res.data) {
|
|
|
resTreeArr.value = res.data.options;
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
|
|
|
// 挂载完
|
|
|
Vue.onMounted(() => {
|
|
|
init();
|
|
|
getListData({page: 1, limit: pageSize.value});
|
|
|
onReset();//清空搜索条件(资源id)
|
|
|
})
|
|
|
|
|
|
return {
|
|
|
stepActive,
|
|
|
resIds,
|
|
|
resTreeArr,
|
|
|
typeProps,
|
|
|
next,
|
|
|
closeDialog,
|
|
|
|
|
|
|
|
|
|
|
|
count,
|
|
|
portSenseData,
|
|
|
columns,
|
...
|
...
|
|