@@ -8926,6 +8926,8 @@ h5.dulilabel{ | |||
.proj-detail .right-part .part-wrap::-webkit-scrollbar, | |||
.proj-detail .proj-desc-wrap::-webkit-scrollbar, | |||
.proj-detail .summary-wrap::-webkit-scrollbar, | |||
.template_nest .template_select_content::-webkit-scrollbar, | |||
.template_improve .template_improve_content::-webkit-scrollbar, | |||
.new-proj .template_select_content::-webkit-scrollbar { | |||
width: 8px; | |||
height: 8px; | |||
@@ -8938,6 +8940,8 @@ h5.dulilabel{ | |||
.right-part .part-wrap::-webkit-scrollbar-thumb, | |||
.proj-detail .proj-desc-wrap::-webkit-scrollbar-thumb, | |||
.proj-detail .summary-wrap::-webkit-scrollbar-thumb, | |||
.template_nest .template_select_content::-webkit-scrollbar-thumb, | |||
.template_improve .template_improve_content::-webkit-scrollbar-thumb, | |||
.new-proj .template_select_content::-webkit-scrollbar-thumb { | |||
-webkit-border-radius: 4px; | |||
border-radius: 4px; | |||
@@ -17,7 +17,6 @@ const notify =(options) =>{ | |||
}) | |||
instance.vm = instance.$mount() | |||
notifyWrap.appendChild(instance.vm.$el); | |||
//return instance.vm; | |||
} | |||
@@ -78,23 +78,26 @@ export default { | |||
timer:'', | |||
} | |||
}, | |||
// watch: { | |||
// // 监听是否关闭 | |||
// show(newVal) { | |||
// // 关闭 | |||
// if (!newVal) { | |||
// //this.$el.addEventListener('transitionend', this.destroyElement); | |||
// // this.destroyElement(); | |||
// } | |||
// } | |||
// }, | |||
watch: { | |||
//监听是否关闭 | |||
show(newVal) { | |||
// 关闭 | |||
if (!newVal) { | |||
//this.$el.addEventListener('transitionend', this.destroyElement); | |||
setTimeout(()=>{ | |||
this.destroyElement(); | |||
},1000) | |||
//this.destroyElement(); | |||
} | |||
} | |||
}, | |||
methods:{ | |||
// destroyElement() { | |||
// // 移除transitionend事件 | |||
// //this.$el.removeEventListener('transitionend', this.destroyElement); | |||
// this.$destroy(true); | |||
// this.$el.parentNode.removeChild(this.$el); | |||
// }, | |||
destroyElement() { | |||
// 移除transitionend事件 | |||
//this.$el.removeEventListener('transitionend', this.destroyElement); | |||
this.$destroy(true); | |||
this.$el.parentNode.removeChild(this.$el); | |||
}, | |||
handleClose () { | |||
//this.closed = true; | |||
this.show=false; | |||
@@ -111,6 +114,7 @@ export default { | |||
}, | |||
beforeDestroy() { | |||
clearTimeout(this.timer); | |||
//this.destroyElement(); | |||
} | |||
} | |||
</script> | |||
@@ -76,6 +76,14 @@ export async function queryNestTemplateByNodeId(templateId){ | |||
const res = await fetchApi('template/queryNestTemplateByNodeId', {id:templateId}); | |||
return wrapErrorHint(res); | |||
} | |||
/** | |||
* 增加嵌套模板 | |||
* | |||
*/ | |||
export async function connectNestTemplateFolder(params){ | |||
const res = await fetchApi('template/connectNestTemplateFolder', params); | |||
return wrapErrorHint(res); | |||
} | |||
/* jsmind节点树接口 */ | |||
export async function queryTemplateNodeByTemplateId(templateId) { | |||
@@ -122,6 +122,7 @@ function mapApiPathToFullPath(path) { | |||
case 'template/addTemplateNodeModelFile': | |||
case 'template/createNestedRelevance': | |||
case 'template/deleteNestedRelevance': | |||
case 'template/connectNestTemplateFolder': | |||
case "folder/createSubfolder": | |||
case "project/createProject": | |||
case "project/editProject": | |||
@@ -129,7 +130,7 @@ function mapApiPathToFullPath(path) { | |||
case "file/addArchMilesStone": | |||
case "file/addFile": | |||
case "file/updateFile": | |||
case "file/fileCoordinationChange": | |||
case "file/fileCoordinationChange": | |||
case "operation/record": | |||
// case 'template/deleteTemplateNodeModelFile': | |||
method = 'POST'; | |||
@@ -202,7 +202,9 @@ | |||
</style> | |||
<style lang="scss"> | |||
.personnel-list .el-collapse-item__wrap { | |||
border-bottom: none !important; | |||
} | |||
.dept-select-all-btn .el-checkbox__label { | |||
padding: 0 0 0 6px !important; | |||
margin: 0 8px 0 0; | |||
@@ -59,12 +59,12 @@ | |||
@click.native.stop="aloneAddUserOnlyStaff(folder),enterEditFolderClick(folder.id)"/> | |||
</div> | |||
<!-- 嵌套模板入口 --> | |||
<div class="add_nest" v-if="isNest(folder.nodeId)"> | |||
<!-- <div class="add_nest" v-if="isNest(folder.nodeId)"> | |||
<div class="add_nest_box" @click.stop="enterNestTemp(folder)"> | |||
<i class="el-icon-plus"></i> | |||
<p>嵌套模板</p> | |||
</div> | |||
</div> | |||
</div> --> | |||
</div> | |||
</div> | |||
<div v-if="isEnterEdit && activeFolderId == folder.id" | |||
@@ -152,7 +152,7 @@ | |||
{{`${isEnterEditPropValue ? "完成编辑" : "修改"}`}} | |||
</div> | |||
</app-header> | |||
<div class="summary-wrap" ref="templatedesc"> | |||
<div class="summary-wrap" ref="templatedesc" v-if="Object.keys(nowProject).length > 0"> | |||
<div class="item"> | |||
<div class="item-title">模板负责</div> | |||
<div class="item-value">{{nowProject.TempCreateUserName}}</div> | |||
@@ -174,10 +174,8 @@ | |||
</div> | |||
</div> | |||
</div> | |||
<new-proj v-if="isStartEditNestTemp" | |||
:isShowHeader="false" | |||
:isTemNest="isTemNest" | |||
:isProjName="false" | |||
<nest-temp v-if="isStartEditNestTemp" | |||
:isTemNestInProp="isTemNest" | |||
:nestNodeFolder="nestNodeFolder" | |||
@enterDistWork="enterDistWork" | |||
/> | |||
@@ -203,7 +201,6 @@ | |||
import PeopleItem from './components/people-item'; | |||
import PersonnelList from './components/personnel-list'; | |||
import TempSelectedUserList from './components/temp-selected-user-list'; | |||
import NewProj from '../project/newProj.vue'; | |||
import FileUploader from "@/components/file-uploader"; | |||
import { getUserInfo,fetchDeptList,getUserListByNode } from '@/services/user.js'; | |||
import { cloneDeep } from 'lodash'; | |||
@@ -213,6 +210,7 @@ | |||
import * as prjService from '@/services/project'; | |||
import * as tempalteService from '@/services/template.js' | |||
import dayjs from 'dayjs'; | |||
import NestTemp from '../project/nestTemp.vue'; | |||
export default { | |||
data() { | |||
@@ -302,7 +300,7 @@ | |||
PersonnelList, | |||
TempSelectedUserList, | |||
FileUploader, | |||
NewProj, | |||
NestTemp, | |||
}, | |||
watch: { | |||
isShowDistWorkPage(val) { | |||
@@ -409,12 +407,13 @@ | |||
/** | |||
* 退出嵌套模板,进入分配界面 | |||
*/ | |||
enterDistWork(){ | |||
async enterDistWork(){ | |||
this.isShowDistWorkPage = true; | |||
this.isShowStartProjDesc = true; | |||
this.isShowTemplateSummary = false; | |||
this.isStartEditNestTemp = false; | |||
this.isTemNest = false; | |||
await this.fetchProjectDetail(); | |||
}, | |||
/** | |||
* 打开右侧的人员列表 | |||
@@ -0,0 +1,307 @@ | |||
<template> | |||
<div> | |||
<!-- 选择嵌套模板 --> | |||
<div class="template_nest" v-if="isTemNest"> | |||
<AppHeader class="set_position header-wrap" | |||
theme="white" | |||
showBackBtn | |||
backBtnTitle="取消" | |||
:onBackBtnClick="enterDistWork" | |||
:title="`为“${title}”添加新模板`" | |||
> | |||
<div type="primary" class="slot_btn" slot="right" @click="enterNestTempImprove()">选定模板</div> | |||
</AppHeader> | |||
<div class="template_select_content"> | |||
<div class="template_connect"> | |||
<div class="template_info_title"> | |||
<span>已建立交换关系的模板</span> | |||
</div> | |||
<div class="template_info" v-for="(item,index) in NestTemplateList" :key="item.Id" @click="isChecked(index,item)"> | |||
<div class="check_box" :class="{checked:checkedIndex == index}"><i class="el-icon-check"></i></div> | |||
<span class="template_info_name">{{item.TemplateName}}</span> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<!-- 完善嵌套模板信息 --> | |||
<div class="template_improve" v-if="isNestTemImprove" > | |||
<AppHeader class="set_position header-wrap" | |||
theme="white" | |||
showBackBtn | |||
backBtnTitle="选择模板" | |||
:onBackBtnClick="enterSelectNestTemp" | |||
title="完善模板信息" | |||
> | |||
<div type="primary" class="slot_btn" slot="right" @click="addNestTemplate()">创建</div> | |||
</AppHeader> | |||
<div class="template_improve_content" > | |||
<div class="template_improve_info"> | |||
<div class="template_title">模板名称:</div> | |||
<div class="template_title_info">{{selectTemplate.TemplateName}}</div> | |||
</div> | |||
<div class="template_improve_info"> | |||
<div class="template_title">创建时间:</div> | |||
<div class="template_title_info">{{createDate}}</div> | |||
</div> | |||
<div class="template_improve_info template_improve_infoInput" v-for="prop in checkNewProjData.CustomProps" :key="prop.Id"> | |||
<div class="template_title">{{(prop.PropertyName ? prop.PropertyName : '自定义字段') +':'}}</div> | |||
<div class="template_title_info"> | |||
<input type="text" class="input_projname" placeholder="点击输入" v-model="prop.PropValue"> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</template> | |||
<script> | |||
import AppHeader from "@/components/app-header"; | |||
import * as templateService from '@/services/template'; | |||
export default { | |||
components:{ | |||
AppHeader, | |||
}, | |||
props:{ | |||
nestNodeFolder:Object, | |||
isTemNestInProp:{ | |||
type:Boolean, | |||
default:false | |||
}, | |||
}, | |||
data(){ | |||
return{ | |||
createDate: new Date().toLocaleDateString(), | |||
title:this.nestNodeFolder.folderName, | |||
NestTemplateList:[], | |||
isTemNest: false, | |||
isNestTemImprove:false, | |||
selectTemplate:{},//选择的嵌套模板 | |||
checkedIndex:0, | |||
checkNewProjData: { | |||
"Proj": { | |||
"ProjName":"", | |||
"CompanyId":"", | |||
"Notice":"", | |||
"ShowImgUrl":"", | |||
"TemplateId":"", | |||
"CreateUserId":"", | |||
"ModifyUserId":"" | |||
}, | |||
"Node": {}, | |||
"CustomProps": [] | |||
}, | |||
} | |||
}, | |||
methods:{ | |||
/** | |||
* 进入嵌套模板信息字段填写 | |||
*/ | |||
enterNestTempImprove(){ | |||
this.isTemNest = false; | |||
this.isNestTemImprove = true; | |||
this.getTempProps(this.selectTemplate.TempalteId); | |||
}, | |||
/** | |||
* 进入嵌套模板选择 | |||
*/ | |||
enterSelectNestTemp(){ | |||
this.isTemNest = true; | |||
this.isNestTemImprove = false; | |||
}, | |||
getTempProps(id){ | |||
templateService.queryTemplateById(id).then(res => { | |||
res.Data.propertys.forEach((item, index) => { | |||
this.checkNewProjData.CustomProps[index] = {}; | |||
this.checkNewProjData.CustomProps[index]['TempPropId'] = item.Id; | |||
this.checkNewProjData.CustomProps[index]['PropertyName'] = item.PropertyName; | |||
this.checkNewProjData.CustomProps[index]['PropValue'] = ""; | |||
let temp = this.checkNewProjData.CustomProps; | |||
this.checkNewProjData.CustomProps = [...temp]; | |||
}) | |||
this.checkNewProjData = {...this.checkNewProjData}; | |||
}) | |||
}, | |||
/** | |||
* 返回到人员分配 | |||
*/ | |||
enterDistWork(){ | |||
this.$emit('enterDistWork'); | |||
}, | |||
/** | |||
* 增加嵌套模板 | |||
*/ | |||
addNestTemplate(){ | |||
this.$confirm("重要提示:一旦确定模板并创建后,您将无法删除模板。", "", { | |||
confirmButtonText: "确定", | |||
cancelButtonText: "取消", | |||
showClose: false, | |||
type: "error", | |||
}).then(async() => { | |||
const res = await templateService.queryTemplateNodeByTemplateId(this.selectTemplate.TempalteId); | |||
const node = res.Data; | |||
let params ={ | |||
ProjId: this.nestNodeFolder.projId, | |||
NodeId:this.nestNodeFolder.nodeId, | |||
FolderId:this.nestNodeFolder.id, | |||
TemplateId:this.nestNodeFolder.templateId, | |||
NestJsmindData:node, | |||
} | |||
const Res = await templateService.connectNestTemplateFolder(params); | |||
if(Res.Code === 0) { | |||
this.$notify({ | |||
message: `“${this.selectTemplate.TemplateName}”模板嵌套成功。`, | |||
type: ["success"], | |||
}); | |||
this.$emit('enterDistWork'); | |||
} | |||
}).catch(err =>console.log(err)); | |||
}, | |||
isChecked(index,item){ | |||
this.checkedIndex = index; | |||
this.selectTemplate = item; | |||
//console.log(id); | |||
}, | |||
/** | |||
* 获取嵌套模板列表 | |||
*/ | |||
async getNestTemplate(nestNodeId){ | |||
const res= await templateService.queryNestTemplateByNodeId(nestNodeId); | |||
this.NestTemplateList = res.Data; | |||
if(this.NestTemplateList && this.NestTemplateList.length && JSON.stringify(this.selectTemplate) ==='{}') { | |||
this.selectTemplate = this.NestTemplateList[0]; | |||
this.checkedIndex=0; | |||
} | |||
}, | |||
}, | |||
watch:{ | |||
isTemNestInProp:{ | |||
handler(value){ | |||
this.isTemNest = value; | |||
if(value){ | |||
this.getNestTemplate(this.nestNodeFolder.nodeId); | |||
} | |||
}, | |||
immediate: true | |||
}, | |||
} | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
.slot_btn{ | |||
position: relative; | |||
left: 24px; | |||
cursor: pointer; | |||
padding: 0 16px; | |||
height: 32px; | |||
line-height: 32px; | |||
margin: 9px 0; | |||
border-radius: 8px; | |||
background-color: #7850ff; | |||
color: #f5f5f7; | |||
font-size: 14px; | |||
text-align: center; | |||
font-family: PingFangSC-Regular; | |||
} | |||
.input_projname{ | |||
width: 424px; | |||
height: 44px; | |||
border-radius: 4px; | |||
background-color: rgba(233, 233, 235, 1); | |||
border: 0.5px solid rgba(174, 174, 174, 1); | |||
font-size: 16px; | |||
padding-left:16px; | |||
} | |||
.set_position{ | |||
position: relative; | |||
border-top-right-radius: 8px; | |||
border-top-left-radius: 8px; | |||
box-shadow: none; | |||
} | |||
.template_nest,.template_improve{ | |||
height:calc(100vh - 50px); | |||
} | |||
.template_info_title{ | |||
width: 100%; | |||
line-height: 44px; | |||
padding: 0px 24px; | |||
position: relative; | |||
box-sizing: border-box; | |||
border-bottom: 1px solid #DEDEDF; | |||
} | |||
.template_select_content{ | |||
height:calc(100% - 50px); | |||
overflow-y:scroll; | |||
.template_info{ | |||
width: 100%; | |||
line-height: 44px; | |||
padding: 0px 24px; | |||
position: relative; | |||
box-sizing: border-box; | |||
border-bottom: 1px solid #DEDEDF; | |||
transition: all 0.3s; | |||
cursor:pointer; | |||
.template_info_name{ | |||
/* display: inline-block; */ | |||
margin-left: 38px; | |||
font-size: 14px; | |||
} | |||
.check_box{ | |||
&.checked{ | |||
background-color: #7850FF; | |||
text-align: center; | |||
line-height: 28px; | |||
color: white; | |||
.el-icon-check{ | |||
display: inline-block; | |||
} | |||
} | |||
display:inline-block; | |||
width: 28px; | |||
height: 28px; | |||
border-radius: 50%; | |||
position: absolute; | |||
top: 50%; | |||
transform: translateY(-50%); | |||
background-color: rgba(203, 203, 206, 1); | |||
box-shadow: undefined, inset 0px 1px 3px 0px rgba(0, 0, 0, 0.15); | |||
.el-icon-check{ | |||
display: none; | |||
} | |||
} | |||
} | |||
} | |||
.template_info:hover{ | |||
background-color: rgba(50, 50, 60, 0.15); | |||
} | |||
.template_improve_content{ | |||
height:calc(100% - 50px); | |||
overflow-y:scroll; | |||
padding: 0 8px; | |||
box-sizing: border-box; | |||
.template_improve_info{ | |||
line-height: 48px; | |||
width: 100%; | |||
color: rgba(0, 0, 0, 0.56); | |||
.template_title{ | |||
width: 142px; | |||
display: inline-block; | |||
text-align: right; | |||
} | |||
.template_title_info{ | |||
display: inline-block; | |||
margin-left: 8px; | |||
color: rgba(50, 50, 60, 100); | |||
} | |||
} | |||
.template_improve_infoInput{ | |||
line-height: 64px; | |||
} | |||
} | |||
</style> |
@@ -1,26 +1,22 @@ | |||
<template> | |||
<div class="new-proj"> | |||
<AppHeader | |||
theme="white" | |||
theme="basis" | |||
showBackBtn | |||
backBtnTitle="完成项目编辑" | |||
> | |||
</AppHeader> | |||
<div class="proj_manage"> | |||
<div class="proj_manage_content"> | |||
<!-- 模板 | |||
<div class="template_preview"> | |||
模板预览区域 | |||
</div> --> | |||
<!-- 新建项目 --> | |||
<div class="projModule"> | |||
<div class="projModule adjust-top-radius"> | |||
<!-- 项目名和封面 --> | |||
<div class="projName_input" v-if="isProjName"> | |||
<div class="newProj_header"> | |||
<div class="newProj_header "> | |||
<div class="newProj_title"> | |||
输入项目名称 | |||
</div> | |||
<el-button type="primary" class="nextbtn" @click="enterTemplateSelect()">下一步</el-button> | |||
<div type="primary" class="nextbtn" @click="enterTemplateSelect()">下一步</div> | |||
</div> | |||
<div class="newProj_content"> | |||
<div class="upload_img"> | |||
@@ -42,14 +38,14 @@ | |||
</div> | |||
<!-- 选择模板 --> | |||
<div class="template_select" v-if="isTemSelect" > | |||
<AppHeader class="set_position" | |||
theme="white" | |||
<AppHeader class="set_position header-wrap" | |||
theme="basis" | |||
showBackBtn | |||
backBtnTitle="修改项目名称" | |||
:onBackBtnClick="enterProjNameInput" | |||
title="选择项目名称" | |||
> | |||
<el-button type="primary" class="slot_btn" slot="right" @click="enterTemplateImprove()">选定模板</el-button> | |||
<div class="slot_btn" slot="right" @click="enterTemplateImprove()">选定模板</div> | |||
</AppHeader> | |||
<div class="template_select_content"> | |||
<div class="template_info" v-for="(item,index) in templateList" :key="item.Id" @click="isChecked(index,item)"> | |||
@@ -61,14 +57,14 @@ | |||
</div> | |||
<!-- 完善模板信息 --> | |||
<div class="template_improve" v-if="isTemImprove" > | |||
<AppHeader class="set_position" | |||
theme="white" | |||
<AppHeader class="set_position header-wrap" | |||
theme="basis" | |||
showBackBtn | |||
backBtnTitle="选择模板" | |||
:onBackBtnClick="enterTemplateSelect" | |||
title="完善模板信息" | |||
> | |||
<el-button type="primary" class="slot_btn" slot="right" @click="createProject()">创建</el-button> | |||
<div type="primary" class="slot_btn" slot="right" @click="createProject()">创建</div> | |||
</AppHeader> | |||
<div class="template_improve_content" > | |||
<div class="template_improve_info"> | |||
@@ -87,35 +83,10 @@ | |||
</div> | |||
</div> | |||
</div> | |||
<!-- 添加嵌套模板 --> | |||
<div class="template_nest" v-if="isTemNest"> | |||
<AppHeader class="set_position" | |||
theme="white" | |||
showBackBtn | |||
backBtnTitle="取消" | |||
:onBackBtnClick="enterTemplateSelect" | |||
:title="title" | |||
> | |||
<el-button type="primary" class="slot_btn" slot="right" @click="selectNestTemplate()">选定模板</el-button> | |||
</AppHeader> | |||
<div class="template_select_content"> | |||
<div class="template_connect"> | |||
<div class="template_info"> | |||
<span>已建立交换关系的模板</span> | |||
</div> | |||
<div class="template_info" v-for="(item,index) in NestTemplateList" :key="item.Id" @click="isChecked(index,item)"> | |||
<div class="check_box" :class="{checked:checkedIndex == index}"><i class="el-icon-check"></i></div> | |||
<span class="template_info_name">{{item.TempName}}</span> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</template> | |||
@@ -132,26 +103,13 @@ export default { | |||
FileUploader | |||
}, | |||
props:{ | |||
nestNodeFolder:Object, | |||
isProjName:{ | |||
type:Boolean, | |||
default:true | |||
}, | |||
isTemSelect:{ | |||
type:Boolean, | |||
default:false | |||
}, | |||
isTemImprove:{ | |||
type:Boolean, | |||
default:false | |||
}, | |||
isTemNest:{ | |||
type:Boolean, | |||
default:false | |||
}, | |||
}, | |||
data(){ | |||
return{ | |||
isProjName:true, | |||
isTemSelect:false, | |||
isTemImprove:false, | |||
templateId:sessionStorage.templateID, | |||
listTempNodeTree:[], | |||
NestTemplateList:[],//嵌套模板列表 | |||
@@ -160,9 +118,7 @@ export default { | |||
nestNodeId:'',//传入的nestNodeId | |||
title:'', | |||
checkedIndex:NaN, | |||
checkedIndexList:[], | |||
selectTemplate:{}, | |||
selectTemplateList:[],//选中的嵌套模板列表 | |||
srcIndex: 2, // 封面切换Index | |||
coverSrc: 'static/img/faceImg/face01.png', | |||
templateList:[], | |||
@@ -247,8 +203,11 @@ export default { | |||
// 完善模板信息 | |||
enterTemplateImprove(){ | |||
this.isTemSelect = false; | |||
this.isTemImprove = true; | |||
templateService.queryTemplateById(this.selectTemplate.Id).then(res => { | |||
this.isTemImprove = true; | |||
this.getTempProps(this.selectTemplate.Id); | |||
}, | |||
getTempProps(id){ | |||
templateService.queryTemplateById(id).then(res => { | |||
res.Data.propertys.forEach((item, index) => { | |||
this.checkNewProjData.CustomProps[index] = {}; | |||
this.checkNewProjData.CustomProps[index]['TempPropId'] = item.Id; | |||
@@ -258,21 +217,11 @@ export default { | |||
this.checkNewProjData.CustomProps = [...temp]; | |||
}) | |||
this.checkNewProjData = {...this.checkNewProjData}; | |||
}) | |||
}) | |||
}, | |||
isChecked(index,item){ | |||
this.checkedIndex = index; | |||
this.selectTemplate = item; | |||
//console.log(id); | |||
}, | |||
isNodeChecked(index,item){ | |||
if(this.checkedIndexList.includes(index)){ | |||
this.checkedIndexList = this.checkedIndexList.filter(ele=>{ return ele != index}); | |||
// this.selectTemplateList = this.selectTemplateList.filter(ele =>{return ele != item}); | |||
} | |||
this.checkedIndexList = this.checkedIndexList.push(index); | |||
this.selectTemselectTemplateList = this.selectTemselectTemplateList.push(item); | |||
//console.log(id); | |||
}, | |||
/** | |||
* 设置随机封面 | |||
@@ -306,7 +255,6 @@ export default { | |||
const templateListRes = await templateService.queryTemplateList(); | |||
const templateList = templateListRes.Data || []; | |||
this.templateList = templateList; | |||
//debugger; | |||
if(this.templateList && this.templateList.length && JSON.stringify(this.selectTemplate) ==='{}') { | |||
this.selectTemplate = templateList[0]; | |||
@@ -340,42 +288,13 @@ export default { | |||
this.newProjData.listFolder.push(folder); | |||
}); | |||
}, | |||
/** | |||
* 获取嵌套模板列表 | |||
*/ | |||
async getNestTemplate(nestNodeId){ | |||
this.NestTemplateList = await templateService.queryNestTemplateByNodeId(nestNodeId); | |||
}, | |||
/** | |||
* 获取嵌套模板 | |||
*/ | |||
// async getNestTemplate(nodeId){ | |||
// this.NestTemplateList = await templateService.queryTemplateNodeByTemplateId(templateId); | |||
// /** | |||
// * 获取嵌套模板列表 | |||
// */ | |||
// async getNestTemplate(nestNodeId){ | |||
// const res= await templateService.queryNestTemplateByNodeId(nestNodeId); | |||
// this.NestTemplateList = res.Data; | |||
// }, | |||
/** | |||
* 选定嵌套模板 | |||
*/ | |||
// async getNestTemplate(templateId){ | |||
// this.NestTemplateList = await templateService.queryNestTemplateByNodeId(templateId); | |||
// }, | |||
async selectNestTemplate(){ | |||
//在tempNodeList 插入 选中的template | |||
// 根据nodeId查询 找到相应的id在它的children里加入 template | |||
this.insertNestNode(this.nestNodeId,this.tempNodeList); | |||
this.isTemImprove = true; | |||
this.isTemNest = false; | |||
}, | |||
insertNestNode(nodeId,nodeList){ | |||
if(this.selectTemplate.parentId == nodeId){ | |||
nodeList.children = [], | |||
nodeList.children.push(this.selectTemplate); | |||
return; | |||
} | |||
if(nodeList.children == undefined) return; | |||
nodeList.children.forEach(item=>{ | |||
this.insertNestNode(nodeId,item); | |||
}) | |||
}, | |||
/** | |||
* 新建项目 | |||
@@ -446,32 +365,36 @@ export default { | |||
if(!res.Data) return; | |||
this.nodeClick(res.Data); | |||
}, | |||
/** | |||
* 节点点击事件 | |||
*/ | |||
// async nodeClick(node) { | |||
// this.title = node.topic + "-"; | |||
// this.currentNode = node; | |||
// const res = await templateService.queryAllTemplateNodeModelFile(node.id); | |||
// if (res.Code !== 0) return; | |||
// this.listNodeFile = res.Data || []; | |||
// }, | |||
}, | |||
watch:{ | |||
isTemNest:{ | |||
handler(value){ | |||
if(value){ | |||
this.getNestTemplate(this.nestNodeFolder.nodeId); | |||
} | |||
}, | |||
immediate: true | |||
} | |||
} | |||
// watch:{ | |||
// isTemNestInProp:{ | |||
// handler(value){ | |||
// this.isTemNest = value; | |||
// if(value){ | |||
// this.getNestTemplate(this.nestNodeFolder.nodeId); | |||
// } | |||
// }, | |||
// immediate: true | |||
// } | |||
// } | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
.header{ | |||
box-shadow: none; | |||
} | |||
.header-wrap .app-header-back-btn { | |||
left: 24px !important; | |||
} | |||
.header-wrap .app-header-content { | |||
padding: 0 48px !important; | |||
} | |||
.adjust-top-radius { | |||
border-top-left-radius: 8px; | |||
border-top-right-radius: 8px; | |||
} | |||
.proj_manage{ | |||
width: 100%; | |||
height: 100%; | |||
@@ -490,6 +413,7 @@ export default { | |||
position: absolute; | |||
} | |||
.projModule{ | |||
background-color: white; | |||
width: 50%; | |||
min-width: 660px; | |||
height: 100%; | |||
@@ -499,7 +423,7 @@ export default { | |||
0px 1px 3px 0px rgba(0, 0, 0, 0.1); | |||
.newProj_header{ | |||
width: 100%; | |||
padding:16px 24px 0px 24px; | |||
padding:9px 24px 0px 24px; | |||
box-sizing: border-box; | |||
height: 64px; | |||
.newProj_title{ | |||
@@ -511,11 +435,28 @@ export default { | |||
} | |||
} | |||
.slot_btn,.nextbtn{ | |||
.nextbtn{ | |||
padding:6px 16px; | |||
font-size: 14px; | |||
border-radius: 8px; | |||
background-color:#7850FF; | |||
color: white; | |||
cursor: pointer; | |||
} | |||
.slot_btn{ | |||
position: relative; | |||
left: 24px; | |||
cursor: pointer; | |||
padding: 0 16px; | |||
height: 32px; | |||
line-height: 32px; | |||
margin: 9px 0; | |||
border-radius: 8px; | |||
background-color: #7850ff; | |||
color: #f5f5f7; | |||
font-size: 14px; | |||
text-align: center; | |||
font-family: PingFangSC-Regular; | |||
} | |||
.nextbtn{ | |||
float: right; | |||
@@ -524,9 +465,6 @@ export default { | |||
box-sizing: border-box; | |||
padding-top: 123px; | |||
text-align: center; | |||
/* height: 100%; */ | |||
/* text-align: center; */ | |||
} | |||
.input_projname{ | |||
width: 424px; | |||
@@ -2301,145 +2301,8 @@ export default { | |||
this.eidtModelpane = false; | |||
this.currentTemplateData = this.editTemplateData; | |||
} | |||
// thisApp.loading = true; | |||
// var param = { | |||
// companyID: sessionStorage.companyId, | |||
// tempName: this.newTemplateData.tempName, | |||
// createUserID: sessionStorage.userId, | |||
// modifyUserID: sessionStorage.userId, | |||
// Type: 0, | |||
// Disable: 0, | |||
// fullCode: "", | |||
// customCode: this.newTemplateData.customCode, | |||
// introduce: this.newTemplateData.introduce, | |||
// firstIndustryID: this.listTemplateTree[ | |||
// this.newTemplateData.firstIndustryID | |||
// ].id, | |||
// detailIndustryID: "", | |||
// listProperty: this.listProperty, | |||
// xMindFilePath: "", | |||
// }; | |||
// var url = process.env.API_HOST + "Templates"; | |||
// if ( | |||
// this.importUrl != undefined && | |||
// this.importUrl != null && | |||
// this.importUrl != "" | |||
// ) { | |||
// param.xMindFilePath = thisApp.importUrl.replace("\\", "\\\\"); | |||
// url = process.env.API_HOST + "Templates/xmindtemplate"; | |||
// } | |||
// if (this.selectDetailIndustryIndex === "") { | |||
// param.detailIndustryID = this.listSonIndustry[ | |||
// this.newTemplateData.detailIndustryID | |||
// ].id; | |||
// param.fullCode = this.listSonIndustry[ | |||
// this.newTemplateData.detailIndustryID | |||
// ].data.fullCode; | |||
// } else { | |||
// param.detailIndustryID = this.listDetailIndustry[ | |||
// this.selectDetailIndustryIndex | |||
// ].id; | |||
// param.fullCode = this.listDetailIndustry[ | |||
// this.selectDetailIndustryIndex | |||
// ].data.fullCode; | |||
// } | |||
// this.$axios({ | |||
// method: "post", | |||
// url: encodeURI(url), | |||
// data: param, | |||
// }) | |||
// .then(function (response) { | |||
// if (response.data.state == 1) { | |||
// thisApp.$notify({ | |||
// title: " ", | |||
// message: "新增模板成功", | |||
// type: "success", | |||
// offset: 100, | |||
// duration: 2500, | |||
// }); | |||
// thisApp.loading = false; | |||
// thisApp.isShowModelpanel = false; | |||
// thisApp.isShowLookIndustryInfo = true; | |||
// thisApp.getTemplateData(); | |||
// } else { | |||
// thisApp.$notify({ | |||
// | |||
// message: response.data.message, | |||
// type: "warning", | |||
// offset: 100, | |||
// duration: 2500, | |||
// }); | |||
// thisApp.loading = false; | |||
// } | |||
// }) | |||
// .catch(function (error) { | |||
// thisApp.loading = false; | |||
// console.log(error); | |||
// }); | |||
// thisApp.$notify({ | |||
// | |||
// message: "请检查表单必填项是否已填写", | |||
// type: "warning", | |||
// offset: 100, | |||
// duration: 2500, | |||
// }); | |||
}); | |||
}, | |||
/** | |||
* 编辑模板 | |||
*/ | |||
// async modifyTemplateOld() { | |||
// const currentTemplate = this.currentTemplateData; | |||
// debugger; | |||
// // if (this.selectDetailIndustryIndex === "") { | |||
// // const dataIndex = this.currentTemp.detailIndustryID; | |||
// // this.currentTemp.detailIndustryID = this.listSonIndustry[dataIndex].id; | |||
// // this.currentTemp.fullCode = | |||
// // this.listSonIndustry[dataIndex].data.fullCode + | |||
// // this.currentTemp.customCode; | |||
// // } else { | |||
// // const dataIndex = this.selectDetailIndustryIndex; | |||
// // this.currentTemp.detailIndustryID = this.listDetailIndustry[ | |||
// // dataIndex | |||
// // ].id; | |||
// // this.currentTemp.fullCode = | |||
// // this.listDetailIndustry[dataIndex].data.fullCode + | |||
// // this.currentTemp.customCode; | |||
// // } | |||
// // this.currentTemp.listProperty = this.listTempProp; | |||
// // var thisApp = this; | |||
// // this.$axios({ | |||
// // method: "put", | |||
// // url: encodeURI(process.env.API_HOST + "Templates/"), | |||
// // data: thisApp.currentTemp, | |||
// // }) | |||
// // .then(function (response) { | |||
// // if (response.data.state == 1) { | |||
// // thisApp.$notify({ | |||
// // title: " ", | |||
// // message: response.data.message, | |||
// // type: "success", | |||
// // offset: 100, | |||
// // duration: 2500, | |||
// // }); | |||
// // } else { | |||
// // thisApp.$notify({ | |||
// // | |||
// // message: response.data.message, | |||
// // type: "success", | |||
// // offset: 100, | |||
// // duration: 5000, | |||
// // }); | |||
// // } | |||
// // }) | |||
// // .catch(function (error) { | |||
// // console.log(error); | |||
// // }); | |||
// }, | |||
/** | |||
* 重命名文件夹 | |||
*/ | |||
@@ -31,7 +31,14 @@ module.exports = { | |||
devServer: { | |||
proxy: { | |||
// '/api/pms': { | |||
// target: 'http://www.lockingos.org:8089', | |||
// target: 'http://47.104.16.113:8092', | |||
// //target:'http://10.240.5.17:8089', | |||
// changeOrigin: true, | |||
// secure: false, | |||
// }, | |||
// '/api/cms':{ | |||
// target: 'http://47.104.16.113:8082', | |||
// //target:'http://10.240.5.17:8089', | |||
// changeOrigin: true, | |||