Przeglądaj źródła

嵌套

dev-remain
revive 4 lat temu
rodzic
commit
c2e1086435
9 zmienionych plików z 136 dodań i 33 usunięć
  1. +9
    -0
      public/static/css/main.css
  2. +0
    -1
      src/utils/request.js
  3. +9
    -11
      src/views/components_web/projDetail/projDetail.vue
  4. +0
    -1
      src/views/components_web/project/nestTemp.vue
  5. +32
    -12
      src/views/components_web/project/newProj.vue
  6. +0
    -1
      src/views/manage_system/customer/index.vue
  7. +3
    -1
      src/views/manage_system/customer/services.js
  8. +1
    -0
      src/views/manage_system/template/index.vue
  9. +82
    -6
      src/views/manage_system/template/mind.vue

+ 9
- 0
public/static/css/main.css Wyświetl plik

@@ -8705,6 +8705,15 @@ h5.dulilabel{
background-color: #fff;
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{
font-size: 12px;
display: block;


+ 0
- 1
src/utils/request.js Wyświetl plik

@@ -121,7 +121,6 @@ function mapApiPathToFullPath(path) {
case 'template/uploadingXmind':
case 'template/addTemplateNodeModelFile':
case 'template/createNestedRelevance':
case 'template/deleteNestedRelevance':
case 'template/connectNestTemplateFolder':
case "folder/createSubfolder":
case "project/createProject":


+ 9
- 11
src/views/components_web/projDetail/projDetail.vue Wyświetl plik

@@ -1496,6 +1496,15 @@ import NestTemp from '../project/nestTemp.vue';
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 {
position: relative;
@@ -1571,17 +1580,6 @@ import NestTemp from '../project/nestTemp.vue';
color: #32323c !important;
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 {
height: 40px;


+ 0
- 1
src/views/components_web/project/nestTemp.vue Wyświetl plik

@@ -176,7 +176,6 @@ export default {
this.checkedIndex=0;
}
},

},
watch:{
isTemNestInProp:{


+ 32
- 12
src/views/components_web/project/newProj.vue Wyświetl plik

@@ -44,6 +44,8 @@
backBtnTitle="修改项目名称"
:onBackBtnClick="enterProjNameInput"
title="选择项目名称"
ref="projdesc"
:class="{'header-bottom-shadow': isProjDescScroll}"
>
<div class="slot_btn" slot="right" @click="enterTemplateImprove()">选定模板</div>
</AppHeader>
@@ -122,6 +124,9 @@ export default {
srcIndex: 2, // 封面切换Index
coverSrc: 'static/img/faceImg/face01.png',
templateList:[],
isProjDescScroll: false,//项目概况页面是否滚动
projDescEl: null,
plastScrollTime: null,
createDate: new Date().toLocaleDateString(),
checkNewProjData: {
"Proj": {
@@ -365,19 +370,34 @@ export default {
if(!res.Data) return;
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>



+ 0
- 1
src/views/manage_system/customer/index.vue Wyświetl plik

@@ -1204,7 +1204,6 @@ export default {
thisApp.$notify({
message: `企业“${this.currentCompany.companyName}”已完成修改。`,
type: ["success"],
// offset: 100,
duration: 2500,
});
thisApp.listCompany();


+ 3
- 1
src/views/manage_system/customer/services.js Wyświetl plik

@@ -147,10 +147,12 @@ export async function updateCompany(data) {
Remark: data.remark,
Telphone: data.telphone,
Id: data.companyID,
IpfsApi: data.ipfsApi,
IpfsBootstrap: data.ipfsBootstrap
}

const resData = await fetchApi('company/updateCompanyById', { company: fixedData, user: userData });
return (resData);
return wrapErrorHint(resData);
}

async function recursionFetchNode(parentNodeId, topNodeId) {


+ 1
- 0
src/views/manage_system/template/index.vue Wyświetl plik

@@ -3283,6 +3283,7 @@ export default {
});
},
goscanMind: function () {
sessionStorage.templateID = this.templateID;
this.$router.push({
name: "system_template_mind",
params: {


+ 82
- 6
src/views/manage_system/template/mind.vue Wyświetl plik

@@ -59,6 +59,8 @@
import AppHeader from '@/components/app-header';
import TemplateTree from './components/template-tree';
import {notify} from '@/utils/tool';
import * as tempalteService from '@/services/template.js'
import { cloneDeep } from 'lodash';
const jsMind = window.jsMind;
const $ = window.jQuery;
const popupViewType = {
@@ -73,11 +75,13 @@
},
data() {
return {
nestNodeList:[],//嵌套模板节点信息
templateList: [],
cloneTemplateMindTree:[],//克隆思维导图节点数据
listTemplateMindTree: [], //思维导图数据
mindZoom: 60,
tempName: this.$route.params.name,
tempId: this.$route.params.id,
tempId: sessionStorage.templateID,
jm: null,
selectedNode: null,
popupViewType,
@@ -87,11 +91,79 @@
};
},
created: function () {
this.getNestNode(this.tempId)
this.getTemplateMindTree();

},
mounted(){
},

watch: {},
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() {
this.$router.push({
name: "system_template",
@@ -182,6 +254,7 @@
const templateId = this.tempId;
const res = await services.queryTemplateNodeByTemplateId(templateId);
this.listTemplateMindTree = res.Data ? [res.Data] : [];
this.getAddNestNode(this.listTemplateMindTree[0]);
this.scanMind();
},
/**
@@ -243,7 +316,9 @@
if(res.Code !== 0) return;
notify.success('嵌套成功');
this.selectedNode = null;
this.getNestNode(this.tempId)
this.getTemplateMindTree();

},
/**
* 移除嵌套模板
@@ -251,15 +326,16 @@
async removeNestTemplate(node){
const selectedNode = this.selectedNode;
const parentNode = selectedNode.parent;
const mainTemplateId = this.tempId;
const mainTemplateId = selectedNode.data.templateId;
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;
notify.success('移除成功');
this.selectedNode = null;
this.getNestNode(this.tempId);
this.getTemplateMindTree();
},
/**


Ładowanie…
Anuluj
Zapisz