|
|
export default {
|
|
|
name: 'operationMaintenance',
|
|
|
template: '',
|
|
|
components: {
|
|
|
// 所有汇总
|
|
|
'COLLECT_ALL': Vue.defineAsyncComponent(
|
|
|
() => myImport('components/page/operationMaintenance/project/index')
|
|
|
),
|
|
|
// 人员汇总
|
|
|
'COLLECT_USER': Vue.defineAsyncComponent(
|
|
|
() => myImport('components/page/operationMaintenance/ry/index')
|
|
|
),
|
|
|
// 评价汇总
|
|
|
'COLLECT_EVALUATE': Vue.defineAsyncComponent(
|
|
|
() => myImport('components/page/operationMaintenance/pj/index')
|
|
|
),
|
|
|
// 资料汇总
|
|
|
'COLLECT_MATERIAL': Vue.defineAsyncComponent(
|
|
|
() => myImport('components/page/operationMaintenance/zl/index')
|
|
|
),
|
|
|
//文档
|
|
|
'DOCUMENT': Vue.defineAsyncComponent(
|
|
|
() => myImport('components/page/operationMaintenance/doc/index')
|
|
|
),
|
|
|
// 评分图(项目评价具体年份)
|
|
|
'EVALUATE': Vue.defineAsyncComponent(
|
|
|
() => myImport('components/page/operationMaintenance/pjt/index')
|
|
|
),
|
|
|
// 人员信息
|
|
|
'USER': Vue.defineAsyncComponent(
|
|
|
() => myImport('components/page/operationMaintenance/user/index')
|
|
|
),
|
|
|
},
|
|
|
components: {
|
|
|
// 所有汇总
|
|
|
'COLLECT_ALL': Vue.defineAsyncComponent(
|
|
|
() => myImport('components/page/operationMaintenance/project/index')
|
|
|
),
|
|
|
// 人员汇总
|
|
|
'COLLECT_USER': Vue.defineAsyncComponent(
|
|
|
() => myImport('components/page/operationMaintenance/ry/index')
|
|
|
),
|
|
|
// 评价汇总
|
|
|
'COLLECT_EVALUATE': Vue.defineAsyncComponent(
|
|
|
() => myImport('components/page/operationMaintenance/pj/index')
|
|
|
),
|
|
|
// 资料汇总
|
|
|
'COLLECT_MATERIAL': Vue.defineAsyncComponent(
|
|
|
() => myImport('components/page/operationMaintenance/zl/index')
|
|
|
),
|
|
|
//文档
|
|
|
// 个人保密协议(THREE_PERSONAGE_NDA)
|
|
|
// 月度总结 THREE_MONTHLY_SUMMARY
|
|
|
// 月报 FOUR_MONTHLY
|
|
|
// 考勤记录 FOUR_CHECKING_IN
|
|
|
// 健康检查报告 FOUR_HEALTH
|
|
|
// 文档资料 TWO_DOCUMENT_MATERIAL
|
|
|
// 项目保密协议 TWO_NDA
|
|
|
'DOCUMENT': Vue.defineAsyncComponent(
|
|
|
() => myImport('components/page/operationMaintenance/doc/index')
|
|
|
),
|
|
|
// 评分图(项目评价具体年份)
|
|
|
'EVALUATE': Vue.defineAsyncComponent(
|
|
|
() => myImport('components/page/operationMaintenance/pjt/index')
|
|
|
),
|
|
|
// 人员信息
|
|
|
'USER': Vue.defineAsyncComponent(
|
|
|
() => myImport('components/page/operationMaintenance/user/index')
|
|
|
),
|
|
|
|
|
|
},
|
|
|
setup() {
|
|
|
const { proxy } = Vue.getCurrentInstance()
|
|
|
let dataSource = Vue.ref([]);
|
|
|
const {proxy} = Vue.getCurrentInstance()
|
|
|
let height = Vue.ref(window.innerHeight -20);
|
|
|
let dataSource = Vue.ref([]);
|
|
|
let componentName = Vue.ref('COLLECT_ALL');
|
|
|
// 当前点击节点
|
|
|
let treeNode = Vue.ref({});
|
|
|
let parentNode = Vue.ref({});
|
|
|
let projectId = Vue.ref('');
|
|
|
let docType = Vue.ref('');
|
|
|
|
|
|
|
|
|
// 搜索
|
|
|
let getTree = () => {
|
|
|
var params = {
|
|
|
// page: pageInfo.page,
|
|
|
// limit: pageInfo.limit,
|
|
|
username: '1',
|
|
|
};
|
|
|
proxy.$http.get("/api-web/bOpsProject/getTree", params, function (res) {
|
|
|
if (res && res.data) {
|
|
|
dataSource.value = res.data;
|
|
|
treeNode.value = res.data[0];
|
|
|
} else {
|
|
|
proxy.$global.showMsg('暂无数据!');
|
|
|
}
|
|
|
}, function () {
|
|
|
proxy.$global.showMsg('没有查询到记录!');
|
|
|
});
|
|
|
}
|
|
|
|
|
|
// 搜索
|
|
|
let getTree = () => {
|
|
|
var params = {
|
|
|
// page: pageInfo.page,
|
|
|
// limit: pageInfo.limit,
|
|
|
username: '1',
|
|
|
};
|
|
|
proxy.$http.get("/api-web/bOpsProject/getTree", params, function (res) {
|
|
|
if (res && res.data) {
|
|
|
dataSource.value = res.data;
|
|
|
} else {
|
|
|
proxy.$global.showMsg('暂无数据!');
|
|
|
}
|
|
|
},function (){
|
|
|
proxy.$global.showMsg('没有查询到记录!');
|
|
|
});
|
|
|
}
|
|
|
let getParent = (arr, parentId) => {
|
|
|
// 获取父节点
|
|
|
arr.filter(function (v) {
|
|
|
if (v.id == parentId) {
|
|
|
parentNode.value = v;
|
|
|
}
|
|
|
let child = v.children;
|
|
|
if (child && child.length > 0) {
|
|
|
getParent(child, parentId);
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
|
|
|
let handleNodeClick=(data)=> {
|
|
|
let comName= data.map.nodeType.view.code;
|
|
|
console.log(comName)
|
|
|
componentName.value = comName;
|
|
|
}
|
|
|
Vue.onMounted(() => {
|
|
|
getTree();
|
|
|
let handleNodeClick = (data) => {
|
|
|
let comName = data.map.nodeType.view.code;
|
|
|
if (comName == 'DOCUMENT') {
|
|
|
docType.value = data.map.nodeType.code;
|
|
|
}
|
|
|
getParent(dataSource.value, data.parentId);
|
|
|
projectId.value = data.map.nodeType.projectId;
|
|
|
treeNode.value = data;
|
|
|
componentName.value = comName;
|
|
|
}
|
|
|
Vue.onMounted(() => {
|
|
|
getTree();
|
|
|
})
|
|
|
// 搜索
|
|
|
// 搜索
|
|
|
return {
|
|
|
dataSource,
|
|
|
handleNodeClick,
|
|
|
componentName
|
|
|
height,
|
|
|
projectId,
|
|
|
treeNode,
|
|
|
parentNode,
|
|
|
dataSource,
|
|
|
handleNodeClick,
|
|
|
componentName,
|
|
|
docType
|
|
|
};
|
|
|
},
|
|
|
} |
...
|
...
|
|