@@ -8705,6 +8705,15 @@ h5.dulilabel{ | |||||
background-color: #fff; | background-color: #fff; | ||||
box-shadow: 0 1px 2px rgba(0,0,0,0.2); | box-shadow: 0 1px 2px rgba(0,0,0,0.2); | ||||
} | } | ||||
/* 滑动的时候 顶部导航栏的底部阴影 */ | |||||
.header-bottom-shadow::after { | |||||
/* box-shadow: 0 18px 18px 0 #f1f1f1; */ | |||||
content:''; | |||||
display: block; | |||||
width: 100%; | |||||
height: 30px; | |||||
background: linear-gradient(rgba(#000, .06),rgba(#000, 0)); | |||||
} | |||||
.tinylabel{ | .tinylabel{ | ||||
font-size: 12px; | font-size: 12px; | ||||
display: block; | display: block; | ||||
@@ -121,7 +121,6 @@ function mapApiPathToFullPath(path) { | |||||
case 'template/uploadingXmind': | case 'template/uploadingXmind': | ||||
case 'template/addTemplateNodeModelFile': | case 'template/addTemplateNodeModelFile': | ||||
case 'template/createNestedRelevance': | case 'template/createNestedRelevance': | ||||
case 'template/deleteNestedRelevance': | |||||
case 'template/connectNestTemplateFolder': | case 'template/connectNestTemplateFolder': | ||||
case "folder/createSubfolder": | case "folder/createSubfolder": | ||||
case "project/createProject": | case "project/createProject": | ||||
@@ -1496,6 +1496,15 @@ import NestTemp from '../project/nestTemp.vue'; | |||||
font-family: PingFangSC-Regular; | font-family: PingFangSC-Regular; | ||||
} | } | ||||
/* 滑动的时候 顶部导航栏的底部阴影 */ | |||||
.header-bottom-shadow::after { | |||||
/* box-shadow: 0 18px 18px 0 #f1f1f1; */ | |||||
content:''; | |||||
display: block; | |||||
width: 100%; | |||||
height: 30px; | |||||
background: linear-gradient(rgba(#000, .06),rgba(#000, 0)); | |||||
} | |||||
/* 编辑模板自定义字段 调整标题位置 */ | /* 编辑模板自定义字段 调整标题位置 */ | ||||
.adjust-title-position { | .adjust-title-position { | ||||
position: relative; | position: relative; | ||||
@@ -1571,17 +1580,6 @@ import NestTemp from '../project/nestTemp.vue'; | |||||
color: #32323c !important; | color: #32323c !important; | ||||
z-index: 99; | z-index: 99; | ||||
} | } | ||||
/* 滑动的时候 顶部导航栏的底部阴影 */ | |||||
.header-bottom-shadow::after { | |||||
/* box-shadow: 0 18px 18px 0 #f1f1f1; */ | |||||
content:''; | |||||
display: block; | |||||
width: 100%; | |||||
height: 30px; | |||||
background: linear-gradient(rgba(#000, .06),rgba(#000, 0)); | |||||
} | |||||
/* 模板概况按钮 */ | /* 模板概况按钮 */ | ||||
.template-detail-btn { | .template-detail-btn { | ||||
height: 40px; | height: 40px; | ||||
@@ -176,7 +176,6 @@ export default { | |||||
this.checkedIndex=0; | this.checkedIndex=0; | ||||
} | } | ||||
}, | }, | ||||
}, | }, | ||||
watch:{ | watch:{ | ||||
isTemNestInProp:{ | isTemNestInProp:{ | ||||
@@ -44,6 +44,8 @@ | |||||
backBtnTitle="修改项目名称" | backBtnTitle="修改项目名称" | ||||
:onBackBtnClick="enterProjNameInput" | :onBackBtnClick="enterProjNameInput" | ||||
title="选择项目名称" | title="选择项目名称" | ||||
ref="projdesc" | |||||
:class="{'header-bottom-shadow': isProjDescScroll}" | |||||
> | > | ||||
<div class="slot_btn" slot="right" @click="enterTemplateImprove()">选定模板</div> | <div class="slot_btn" slot="right" @click="enterTemplateImprove()">选定模板</div> | ||||
</AppHeader> | </AppHeader> | ||||
@@ -122,6 +124,9 @@ export default { | |||||
srcIndex: 2, // 封面切换Index | srcIndex: 2, // 封面切换Index | ||||
coverSrc: 'static/img/faceImg/face01.png', | coverSrc: 'static/img/faceImg/face01.png', | ||||
templateList:[], | templateList:[], | ||||
isProjDescScroll: false,//项目概况页面是否滚动 | |||||
projDescEl: null, | |||||
plastScrollTime: null, | |||||
createDate: new Date().toLocaleDateString(), | createDate: new Date().toLocaleDateString(), | ||||
checkNewProjData: { | checkNewProjData: { | ||||
"Proj": { | "Proj": { | ||||
@@ -365,19 +370,34 @@ export default { | |||||
if(!res.Data) return; | if(!res.Data) return; | ||||
this.nodeClick(res.Data); | this.nodeClick(res.Data); | ||||
}, | }, | ||||
/** | |||||
* 监听滚动条事件 | |||||
*/ | |||||
// 项目概况页面滚动 | |||||
watchProjDescScroll() { | |||||
this.isProjDescScroll = this.projDescEl.scrollTop > 0; | |||||
}, | |||||
}, | }, | ||||
// watch:{ | |||||
// isTemNestInProp:{ | |||||
// handler(value){ | |||||
// this.isTemNest = value; | |||||
// if(value){ | |||||
// this.getNestTemplate(this.nestNodeFolder.nodeId); | |||||
// } | |||||
// }, | |||||
// immediate: true | |||||
// } | |||||
// } | |||||
watch:{ | |||||
isProjDescScroll(val) { | |||||
if(val) { | |||||
setTimeout(()=> { | |||||
this.projDescEl = this.$refs.projdesc; | |||||
if(this.projDescEl) { | |||||
this.projDescEl.addEventListener('scroll', this.watchProjDescScroll); | |||||
} | |||||
}, 50) | |||||
} | |||||
}, | |||||
}, | |||||
mounted(){ | |||||
if(this.projDescEl) { | |||||
this.projDescEl.addEventListener('scroll', this.watchProjDescScroll); | |||||
} | |||||
}, | |||||
beforeDestroy(){ | |||||
this.projDescEl && this.projDescEl.removeEventListener('scroll', this.watchProjDescScroll); | |||||
} | |||||
} | } | ||||
</script> | </script> | ||||
@@ -1204,7 +1204,6 @@ export default { | |||||
thisApp.$notify({ | thisApp.$notify({ | ||||
message: `企业“${this.currentCompany.companyName}”已完成修改。`, | message: `企业“${this.currentCompany.companyName}”已完成修改。`, | ||||
type: ["success"], | type: ["success"], | ||||
// offset: 100, | |||||
duration: 2500, | duration: 2500, | ||||
}); | }); | ||||
thisApp.listCompany(); | thisApp.listCompany(); | ||||
@@ -147,10 +147,12 @@ export async function updateCompany(data) { | |||||
Remark: data.remark, | Remark: data.remark, | ||||
Telphone: data.telphone, | Telphone: data.telphone, | ||||
Id: data.companyID, | Id: data.companyID, | ||||
IpfsApi: data.ipfsApi, | |||||
IpfsBootstrap: data.ipfsBootstrap | |||||
} | } | ||||
const resData = await fetchApi('company/updateCompanyById', { company: fixedData, user: userData }); | const resData = await fetchApi('company/updateCompanyById', { company: fixedData, user: userData }); | ||||
return (resData); | |||||
return wrapErrorHint(resData); | |||||
} | } | ||||
async function recursionFetchNode(parentNodeId, topNodeId) { | async function recursionFetchNode(parentNodeId, topNodeId) { | ||||
@@ -3283,6 +3283,7 @@ export default { | |||||
}); | }); | ||||
}, | }, | ||||
goscanMind: function () { | goscanMind: function () { | ||||
sessionStorage.templateID = this.templateID; | |||||
this.$router.push({ | this.$router.push({ | ||||
name: "system_template_mind", | name: "system_template_mind", | ||||
params: { | params: { | ||||
@@ -59,6 +59,8 @@ | |||||
import AppHeader from '@/components/app-header'; | import AppHeader from '@/components/app-header'; | ||||
import TemplateTree from './components/template-tree'; | import TemplateTree from './components/template-tree'; | ||||
import {notify} from '@/utils/tool'; | import {notify} from '@/utils/tool'; | ||||
import * as tempalteService from '@/services/template.js' | |||||
import { cloneDeep } from 'lodash'; | |||||
const jsMind = window.jsMind; | const jsMind = window.jsMind; | ||||
const $ = window.jQuery; | const $ = window.jQuery; | ||||
const popupViewType = { | const popupViewType = { | ||||
@@ -73,11 +75,13 @@ | |||||
}, | }, | ||||
data() { | data() { | ||||
return { | return { | ||||
nestNodeList:[],//嵌套模板节点信息 | |||||
templateList: [], | templateList: [], | ||||
cloneTemplateMindTree:[],//克隆思维导图节点数据 | |||||
listTemplateMindTree: [], //思维导图数据 | listTemplateMindTree: [], //思维导图数据 | ||||
mindZoom: 60, | mindZoom: 60, | ||||
tempName: this.$route.params.name, | tempName: this.$route.params.name, | ||||
tempId: this.$route.params.id, | |||||
tempId: sessionStorage.templateID, | |||||
jm: null, | jm: null, | ||||
selectedNode: null, | selectedNode: null, | ||||
popupViewType, | popupViewType, | ||||
@@ -87,11 +91,79 @@ | |||||
}; | }; | ||||
}, | }, | ||||
created: function () { | created: function () { | ||||
this.getNestNode(this.tempId) | |||||
this.getTemplateMindTree(); | this.getTemplateMindTree(); | ||||
}, | }, | ||||
mounted(){ | |||||
}, | |||||
watch: {}, | watch: {}, | ||||
methods: { | methods: { | ||||
/** | |||||
* 查找嵌套节点信息 | |||||
*/ | |||||
async getNestNode(id){ | |||||
const res = await tempalteService.queryNestTemplateByTemplateId(id); | |||||
this.nestNodeList = res.Data || []; | |||||
}, | |||||
/** | |||||
* 思维导图数据增加嵌套节点 | |||||
*/ | |||||
addNestNode(addNodeList){ | |||||
let childrenList = this.findAllNestNode(addNodeList); | |||||
if(!addNodeList.children){ | |||||
if(childrenList.length !== 0){ | |||||
addNodeList.children = []; | |||||
addNodeList.children = addNodeList.children.concat(childrenList); | |||||
} | |||||
}else{ | |||||
if(childrenList.length !== 0){ | |||||
addNodeList.children = addNodeList.children.concat(childrenList); | |||||
} | |||||
} | |||||
}, | |||||
/** | |||||
* get | |||||
*/ | |||||
getAddNestNode(addNodeList){ | |||||
this.addNestNode(addNodeList); | |||||
if(!addNodeList.children){ | |||||
return; | |||||
} | |||||
addNodeList.children.forEach(node =>{ | |||||
this.getAddNestNode(node); | |||||
}) | |||||
}, | |||||
/** | |||||
* 查找所有嵌套节点 | |||||
*/ | |||||
findAllNestNode(node){ | |||||
let nodeList; | |||||
nodeList = this.nestNodeList.filter(temp => temp.ParentNodeId == node.id); | |||||
let len = nodeList.length; | |||||
if(len > 0){ | |||||
let nestNodeListData=[]; | |||||
nodeList.forEach(item =>{ | |||||
let nestNodeData = { | |||||
id:'', | |||||
isNest: true, | |||||
label:'', | |||||
topic:'', | |||||
templateId:'' | |||||
} | |||||
nestNodeData.id = item.Id; | |||||
nestNodeData.label = item.TemplateName; | |||||
nestNodeData.topic = item.TemplateName; | |||||
nestNodeData.templateId = item.TemplateId | |||||
nestNodeListData.push(nestNodeData); | |||||
//debugger; | |||||
}) | |||||
return nestNodeListData; | |||||
} | |||||
return []; | |||||
}, | |||||
onBackBtnClick() { | onBackBtnClick() { | ||||
this.$router.push({ | this.$router.push({ | ||||
name: "system_template", | name: "system_template", | ||||
@@ -182,6 +254,7 @@ | |||||
const templateId = this.tempId; | const templateId = this.tempId; | ||||
const res = await services.queryTemplateNodeByTemplateId(templateId); | const res = await services.queryTemplateNodeByTemplateId(templateId); | ||||
this.listTemplateMindTree = res.Data ? [res.Data] : []; | this.listTemplateMindTree = res.Data ? [res.Data] : []; | ||||
this.getAddNestNode(this.listTemplateMindTree[0]); | |||||
this.scanMind(); | this.scanMind(); | ||||
}, | }, | ||||
/** | /** | ||||
@@ -243,7 +316,9 @@ | |||||
if(res.Code !== 0) return; | if(res.Code !== 0) return; | ||||
notify.success('嵌套成功'); | notify.success('嵌套成功'); | ||||
this.selectedNode = null; | this.selectedNode = null; | ||||
this.getNestNode(this.tempId) | |||||
this.getTemplateMindTree(); | this.getTemplateMindTree(); | ||||
}, | }, | ||||
/** | /** | ||||
* 移除嵌套模板 | * 移除嵌套模板 | ||||
@@ -251,15 +326,16 @@ | |||||
async removeNestTemplate(node){ | async removeNestTemplate(node){ | ||||
const selectedNode = this.selectedNode; | const selectedNode = this.selectedNode; | ||||
const parentNode = selectedNode.parent; | const parentNode = selectedNode.parent; | ||||
const mainTemplateId = this.tempId; | |||||
const mainTemplateId = selectedNode.data.templateId; | |||||
const res = await services.deleteNestedRelevance({ | const res = await services.deleteNestedRelevance({ | ||||
id: selectedNode.id, | |||||
parentId: parentNode.id, | |||||
parentTemplateId: mainTemplateId, | |||||
//id: selectedNode.id, | |||||
parentNodeId: parentNode.id, | |||||
templateId : mainTemplateId, | |||||
}); | }); | ||||
if(res.Code !== 0) return; | if(res.Code !== 0) return; | ||||
notify.success('移除成功'); | notify.success('移除成功'); | ||||
this.selectedNode = null; | this.selectedNode = null; | ||||
this.getNestNode(this.tempId); | |||||
this.getTemplateMindTree(); | this.getTemplateMindTree(); | ||||
}, | }, | ||||
/** | /** | ||||