@@ -37,8 +37,8 @@ | |||
methods: { | |||
getPhoneCode: function () { | |||
if (!/^1[3456789]\d{9}$/.test(this.phoneNum) || !/^1[3456789]\d{9}$/.test(this.checkPhoneNum)) { | |||
this.$notify.error({ | |||
this.$notify({ | |||
type:'warning', | |||
message: "请检查手机号是否填写正确。", | |||
offset: 100, | |||
duration: 2500 | |||
@@ -75,8 +75,8 @@ | |||
}); | |||
this.countDownTimer(); | |||
} else { | |||
thisApp.$notify.error({ | |||
thisApp.$notify({ | |||
type:'warning', | |||
message: response.data.message, | |||
offset: 100, | |||
duration: 2500 | |||
@@ -109,8 +109,8 @@ | |||
// }); | |||
// this.countDownTimer(); | |||
} else { | |||
thisApp.$notify.error({ | |||
thisApp.$notify({ | |||
type:'warning', | |||
message: response.data.message, | |||
offset: 100, | |||
duration: 2500 | |||
@@ -1330,7 +1330,8 @@ export default { | |||
const fileName = wrapOssProtocol(ossFile.ossUrl); | |||
const res = await updateUserAvator(userInfo, fileName); | |||
if (res.Code !== 0) { | |||
this.$notify.error({ | |||
this.$notify({ | |||
type:'error', | |||
message: res.Msg, | |||
offset: 100, | |||
duration: 5000, | |||
@@ -1365,7 +1366,8 @@ export default { | |||
duration: 2500, | |||
}); | |||
} else { | |||
this.$notify.error({ | |||
this.$notify({ | |||
type:'error', | |||
message: response.data.message, | |||
offset: 100, | |||
duration: 5000, | |||
@@ -1412,7 +1414,8 @@ export default { | |||
this.showeditpassword = false; | |||
this.logout(); | |||
} else { | |||
this.$notify.error({ | |||
this.$notify({ | |||
type:'error', | |||
message: response.data.message, | |||
offset: 100, | |||
duration: 5000, | |||
@@ -1429,8 +1432,8 @@ export default { | |||
*/ | |||
editUserName: function () { | |||
if (this.editusername.newUserName == "") { | |||
this.$notify.error({ | |||
this.$notify({ | |||
type:'warning', | |||
message: "请输入新的用户名", | |||
offset: 100, | |||
duration: 5000, | |||
@@ -1438,8 +1441,8 @@ export default { | |||
return; | |||
} | |||
if (this.editusername.sureUserName == "") { | |||
this.$notify.error({ | |||
this.$notify({ | |||
type:'warning', | |||
message: "请输入确认用户名", | |||
offset: 100, | |||
duration: 5000, | |||
@@ -1447,8 +1450,8 @@ export default { | |||
return; | |||
} | |||
if (this.editusername.newUserName != this.editusername.sureUserName) { | |||
this.$notify.error({ | |||
this.$notify({ | |||
type:'warning', | |||
message: "确认用户名和新的用户名不一致", | |||
offset: 100, | |||
duration: 5000, | |||
@@ -1456,8 +1459,8 @@ export default { | |||
return; | |||
} | |||
if (this.editusername.password == "") { | |||
this.$notify.error({ | |||
this.$notify({ | |||
type:'warning', | |||
message: "请输入密码", | |||
offset: 100, | |||
duration: 5000, | |||
@@ -1485,8 +1488,8 @@ export default { | |||
this.isEditUserName = ""; | |||
this.logout(); | |||
} else { | |||
this.$notify.error({ | |||
this.$notify({ | |||
type:'error', | |||
message: response.data.message, | |||
offset: 100, | |||
duration: 5000, | |||
@@ -1514,7 +1517,7 @@ export default { | |||
.then((response) => { | |||
if (response.data.state == 1) { | |||
thisApp.$notify({ | |||
type:'success', | |||
message: response.data.message, | |||
offset: 100, | |||
duration: 2500, | |||
@@ -1522,8 +1525,8 @@ export default { | |||
thisApp.user.phone = thisApp.edituserphoneNumber.number; | |||
thisApp.backUserManagerPain(); | |||
} else { | |||
thisApp.$notify.error({ | |||
thisApp.$notify({ | |||
type:'error', | |||
message: response.data.message, | |||
offset: 100, | |||
duration: 2500, | |||
@@ -1545,8 +1548,8 @@ export default { | |||
thisApp.newEmail | |||
) | |||
) { | |||
this.$notify.error({ | |||
this.$notify({ | |||
type:'warning', | |||
message: "请检查邮箱是否填写正确!", | |||
offset: 100, | |||
duration: 2000, | |||
@@ -1580,8 +1583,8 @@ export default { | |||
}) | |||
.catch((error) => {}); | |||
} else { | |||
thisApp.$notify.error({ | |||
thisApp.$notify({ | |||
type:'error', | |||
message: response.data.message, | |||
offset: 100, | |||
duration: 2000, | |||
@@ -296,7 +296,8 @@ | |||
function(file, response) { | |||
if (response.chunked == "true") { | |||
if (response.hasError == "true") { | |||
_this.$notify.error({ | |||
_this.$notify({ | |||
type:"error", | |||
message: "文件未成功上传", | |||
offset: 100, | |||
duration: 5000 | |||
@@ -335,7 +336,8 @@ | |||
_this.fileList=[]; | |||
} | |||
else { | |||
_this.$notify.error({ | |||
_this.$notify({ | |||
type:"error", | |||
message: "文件未成功上传", | |||
offset: 100, | |||
duration: 5000 | |||
@@ -343,7 +345,8 @@ | |||
} | |||
}, | |||
error:function(){ | |||
_this.$notify.error({ | |||
_this.$notify({ | |||
type:"error", | |||
message: "文件未成功上传", | |||
offset: 100, | |||
duration: 5000 | |||
@@ -386,21 +389,25 @@ | |||
function(type) { | |||
var errorMessage = ''; | |||
if (type === 'F_EXCEED_SIZE') { | |||
_this.$notify.error({ | |||
_this.$notify({ | |||
message: '文件大小不能超过1M', | |||
offset: 100, | |||
duration: 5000, | |||
type:'error' | |||
}); | |||
errorMessage = '文件大小不能超过${this.fileSingleSizeLimit / (1024 * 1000)}M'; | |||
} else if (type === 'Q_EXCEED_NUM_LIMIT') { | |||
_this.$notify.error({ | |||
_this.$notify({ | |||
type:'error', | |||
message: '文件上传已达到最大上限数', | |||
offset: 100, | |||
duration: 5000, | |||
}); | |||
errorMessage = '文件上传已达到最大上限数'; | |||
} else if (type === 'Q_TYPE_DENIED') { | |||
_this.$notify.error({ | |||
_this.$notify({ | |||
type:'error', | |||
dangerouslyUseHTMLString:true, | |||
message: '文件类型不允许<br/>或文件为空', | |||
offset: 100, | |||
@@ -59,6 +59,24 @@ export async function updateTemplate(params) { | |||
return wrapErrorHint(res); | |||
} | |||
/** | |||
* 查找模板要嵌套的节点 | |||
* @param {*} templateId | |||
*/ | |||
export async function queryNestTemplateByTemplateId(templateId){ | |||
const res = await fetchApi('template/queryNestTemplateByTemplateId', templateId); | |||
return wrapErrorHint(res); | |||
} | |||
/** | |||
* 查找模板要嵌套的节点的模板 | |||
* @param {*} templateId | |||
*/ | |||
export async function queryNestTemplateByNodeId(templateId){ | |||
const res = await fetchApi('template/queryNestTemplateByNodeId', templateId); | |||
return wrapErrorHint(res); | |||
} | |||
/* jsmind节点树接口 */ | |||
export async function queryTemplateNodeByTemplateId(templateId) { | |||
const res = await fetchApi('template/queryTemplateNodeByTemplateId', { templateId }); | |||
@@ -85,7 +85,7 @@ export function wrapErrorHint(response) { | |||
if(response.Code === 404){ | |||
type = "warning"; | |||
} | |||
this.$notify({ | |||
Vue.prototype.$notify({ | |||
message:response.Msg, | |||
title:title + '错误', | |||
type: type | |||
@@ -453,7 +453,8 @@ export default { | |||
//不是创建者 不是项目不负责人 且也不是顶级节点的负责人 | |||
if(!tempManagerMap.includes(sessionStorage.userId) && this.currUser.id !== sessionStorage.userId && this.InitData.manageUser && this.InitData.manageUser.length > 0 && this.InitData.manageUser[0].id == sessionStorage.userId && !this.allChildrenLists.includes(this.InitData) ) | |||
{ | |||
this.$notify.info({ | |||
this.$notify({ | |||
type:"warning", | |||
title: "温馨提示", | |||
message: "没有权限更换工作负责人。", | |||
offset: 100, | |||
@@ -837,8 +838,8 @@ export default { | |||
handleCheckedOne(topIndex, user, e) { | |||
if(this.isAllowedDelete(user)) | |||
{ | |||
this.$notify.info({ | |||
this.$notify({ | |||
type:"warning", | |||
message: "不能移除自己哦", | |||
offset: 100, | |||
duration: 5000 | |||
@@ -850,8 +851,8 @@ export default { | |||
{ | |||
if(user.id == this.currUser.id) | |||
{ | |||
this.$notify.info({ | |||
this.$notify({ | |||
type:"warning", | |||
message: "项目负责人已存在哦", | |||
offset: 100, | |||
duration: 5000 | |||
@@ -948,7 +949,8 @@ export default { | |||
removeSelectUser: function (item) { | |||
if(item.id == this.currUser.id && !this.isShowManager) | |||
{ | |||
this.$notify.info({ | |||
this.$notify({ | |||
type:"warning", | |||
message: "没有权限删除项目创建者。", | |||
offset: 100, | |||
duration: 5000 | |||
@@ -957,7 +959,7 @@ export default { | |||
} | |||
if(item.id == sessionStorage.userId && !this.isShowManager) | |||
{ | |||
this.$notify.info({ | |||
this.$notify({ | |||
message: "不能移除自己。", | |||
offset: 100, | |||
duration: 5000 | |||
@@ -968,7 +970,8 @@ export default { | |||
// 自己指派自己是可以移除的 | |||
if(this.isAllowedDelete(item)) | |||
{ | |||
this.$notify.info({ | |||
this.$notify({ | |||
type:"warning", | |||
title: "温馨提示", | |||
message: "没有权限移除自己。", | |||
offset: 100, | |||
@@ -1265,7 +1268,8 @@ export default { | |||
}); | |||
thisApp.offDialog(); | |||
} else { | |||
thisApp.$notify.error({ | |||
thisApp.$notify({ | |||
type:'error', | |||
message: '服务器异常,工作指派失败。', | |||
offset: 100, | |||
duration: 5000 | |||
@@ -1009,7 +1009,8 @@ export default { | |||
{ | |||
if(user.id == sessionStorage.userId) | |||
{ | |||
this.$notify.info({ | |||
this.$notify({ | |||
type:"warning", | |||
title: "温馨提示", | |||
message: "不能移除自己哦", | |||
offset: 100, | |||
@@ -1020,7 +1021,8 @@ export default { | |||
} | |||
if(user.id == this.currUser.accountId) | |||
{ | |||
this.$notify.info({ | |||
this.$notify({ | |||
stype:"warning", | |||
title: "温馨提示", | |||
message: "项目负责人已存在哦", | |||
offset: 100, | |||
@@ -1118,7 +1120,8 @@ export default { | |||
removeSelectUser: function (item) { | |||
if(item.id == sessionStorage.userId && !this.isShowManager) | |||
{ | |||
this.$notify.info({ | |||
this.$notify({ | |||
type:"warning", | |||
title: "温馨提示", | |||
message: "不能移除自己哦", | |||
offset: 100, | |||
@@ -1489,8 +1492,8 @@ export default { | |||
}); | |||
thisApp.offDialog(); | |||
} else { | |||
thisApp.$notify.error({ | |||
title: "温馨提示", | |||
thisApp.$notify({ | |||
type:'error', | |||
message: '服务器异常,工作指派失败', | |||
offset: 100, | |||
duration: 5000 | |||
@@ -2244,8 +2244,8 @@ export default { | |||
duration: 2500, | |||
}); | |||
} else { | |||
this.$notify.error({ | |||
this.$notify({ | |||
type:'error', | |||
message: response.data.message, | |||
offset: 100, | |||
duration: 5000, | |||
@@ -2292,8 +2292,8 @@ export default { | |||
this.showeditpassword = false; | |||
this.logOutNoTip(); | |||
} else { | |||
this.$notify.error({ | |||
this.$notify({ | |||
type:'error', | |||
message: response.data.message, | |||
offset: 100, | |||
duration: 5000, | |||
@@ -2310,8 +2310,8 @@ export default { | |||
editUserName: function () { | |||
if (this.editusername.newUserName == "") { | |||
this.$notify.error({ | |||
this.$notify({ | |||
type:'warning', | |||
message: "请输入新的用户名", | |||
offset: 100, | |||
duration: 5000, | |||
@@ -2319,8 +2319,8 @@ export default { | |||
return; | |||
} | |||
if (this.editusername.sureUserName == "") { | |||
this.$notify.error({ | |||
this.$notify({ | |||
type:'warning', | |||
message: "请输入确认用户名", | |||
offset: 100, | |||
duration: 5000, | |||
@@ -2328,8 +2328,8 @@ export default { | |||
return; | |||
} | |||
if (this.editusername.newUserName != this.editusername.sureUserName) { | |||
this.$notify.error({ | |||
this.$notify({ | |||
type:'warning', | |||
message: "确认用户名和新的用户名不一致", | |||
offset: 100, | |||
duration: 5000, | |||
@@ -2337,8 +2337,8 @@ export default { | |||
return; | |||
} | |||
if (this.editusername.password == "") { | |||
this.$notify.error({ | |||
this.$notify({ | |||
type:'warning', | |||
message: "请输入密码", | |||
offset: 100, | |||
duration: 5000, | |||
@@ -2366,8 +2366,8 @@ export default { | |||
this.isEditUserName = ""; | |||
this.logOutNoTip(); | |||
} else { | |||
this.$notify.error({ | |||
this.$notify({ | |||
type:'error', | |||
message: response.data.message, | |||
offset: 100, | |||
duration: 5000, | |||
@@ -2403,8 +2403,8 @@ export default { | |||
thisApp.user.phone = thisApp.edituserphoneNumber.number; | |||
thisApp.backUserManagerPain(); | |||
} else { | |||
thisApp.$notify.error({ | |||
thisApp.$notify({ | |||
type:'error', | |||
message: response.data.message, | |||
offset: 100, | |||
duration: 2500, | |||
@@ -2426,8 +2426,8 @@ export default { | |||
thisApp.newEmail | |||
) | |||
) { | |||
this.$notify.error({ | |||
this.$notify({ | |||
type:'warning', | |||
message: "请检查邮箱是否填写正确!", | |||
offset: 100, | |||
duration: 2000, | |||
@@ -2461,8 +2461,8 @@ export default { | |||
}) | |||
.catch((error) => {}); | |||
} else { | |||
thisApp.$notify.error({ | |||
thisApp.$notify({ | |||
type:'error', | |||
message: response.data.message, | |||
offset: 100, | |||
duration: 2000, | |||
@@ -1470,7 +1470,8 @@ | |||
console.log(err); | |||
}) | |||
} else { | |||
thisApp.$notify.error({ | |||
thisApp.$notify({ | |||
type:'error', | |||
message: res.Msg, | |||
offset: 100, | |||
duration: 5000, | |||
@@ -14,7 +14,7 @@ | |||
<div class="add-icon"/> | |||
<div class="nest-text">嵌套模板</div> | |||
</div> --> | |||
<div class="edit-btn" v-if="isEnterEdit && folder.id === activeFolderId">编辑</div> | |||
<!-- <div class="edit-btn" v-if="isEnterEdit && folder.id === activeFolderId">编辑</div> --> | |||
<div class="folder-name" | |||
:class="{'opacity-5': !isAllowedAssignedStaffFolder }"> | |||
<span>{{folder.folderName}}</span> | |||
@@ -82,6 +82,14 @@ | |||
<people-item v-if="!isEnterEdit" | |||
@click.native.stop="aloneAddUserOnlyStaff(folder),enterEditFolderClick(folder.id)"/> | |||
</div> | |||
<div class="add_nest" v-if="isNest(folder.id)"> | |||
<div class="add_nest_box"> | |||
<i class="el-icon-plus"></i> | |||
<p>嵌套模板</p> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -110,6 +118,7 @@ | |||
:activeFolderId="activeFolderId" | |||
:selectedUser="selectedUser" | |||
:isProjManager="isProjManager" | |||
:nestNodeList="nestNodeList" | |||
/> | |||
</template> | |||
</div> | |||
@@ -137,6 +146,7 @@ export default { | |||
type: Boolean, | |||
default: false, | |||
}, | |||
nestNodeList:Array, | |||
isProjManager: { | |||
type: Boolean, | |||
default: false | |||
@@ -151,13 +161,29 @@ export default { | |||
return [] | |||
} | |||
}, | |||
}, | |||
mounted:{ | |||
}, | |||
data(){ | |||
return{ | |||
showAll:false, | |||
exsitNest:false, | |||
} | |||
}, | |||
methods: { | |||
//判断是否存在可嵌套节点 | |||
isNest(id){ | |||
let len = this.nestNodeList.length; | |||
for(let i=0;i<len;i++){ | |||
if(this.nestNodeList[i].ParentNodeId == id){ | |||
return true; | |||
} | |||
} | |||
return false; | |||
}, | |||
// 设置第一个选择的人员为节点负责人 | |||
setFirstPeopleToManager(user) { | |||
this.$bus.$emit('setFirstPeopleToManager', user) | |||
@@ -217,7 +243,32 @@ export default { | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
<style lang="scss" scoped> | |||
.add_nest{ | |||
width: 64px; | |||
height: 80px; | |||
box-sizing: border-box; | |||
.add_nest_box{ | |||
cursor: pointer; | |||
width: 64px; | |||
height: 64px; | |||
box-sizing: border-box; | |||
border: 1px solid #7850FF; | |||
border-radius: 8px; | |||
.el-icon-plus{ | |||
font-size: 24px; | |||
color: #7850FF; | |||
} | |||
p{ | |||
color: #7850FF; | |||
font-size: 14px; | |||
text-align: center; | |||
margin-top: 10px; | |||
} | |||
} | |||
} | |||
.opacity-5 { | |||
opacity: 0.5; | |||
} | |||
@@ -114,6 +114,7 @@ | |||
</div> | |||
<plain-folder-list | |||
class="plain-folder-list" | |||
:nestNodeList="nestNodeList" | |||
:isEnterEdit="isEnterEdit" | |||
:id="userId" | |||
:folderList="listNewFolder" | |||
@@ -163,12 +164,14 @@ | |||
:handleCheckedOne="handleCheckedOne"/> | |||
</div> | |||
</div> | |||
</div> | |||
</template> | |||
<script> | |||
import AppHeader from "@/components/app-header"; | |||
import newProj from '../project/newProj'; | |||
import PlainFolderList from './components/plain-folder-list'; | |||
import PeopleItem from './components/people-item'; | |||
import PersonnelList from './components/personnel-list'; | |||
@@ -180,13 +183,14 @@ | |||
import { firstCharToLowerCase, firstCharToUpperCase } from '@/utils/tool'; | |||
import { AssignedWork } from '@/services/project.js'; | |||
import * as prjService from '@/services/project'; | |||
import { queryTemplateNodeByTemplateId } from '@/services/template.js'; | |||
import * as tempalteService from '@/services/template.js' | |||
import dayjs from 'dayjs'; | |||
export default { | |||
data() { | |||
return { | |||
// 原先distwork的data数据 | |||
nestNodeList:[], | |||
nowProject:{}, | |||
listProjProp: [], | |||
cnName: "", | |||
@@ -251,6 +255,7 @@ | |||
FileUploader, | |||
}, | |||
mounted() { | |||
//this.getNestNode(sessionStorage.templateID); | |||
// 从新建项目过来的 一开始直接显示工作指派界面 | |||
this.isShowDistWorkPage = this.$route.query.isShowDistworkPage ? this.$route.query.isShowDistworkPage : this.isShowDistworkPage; | |||
@@ -289,6 +294,13 @@ | |||
this.$bus.$off('setFirstPeopleToManager', this.setFirstPeopleToManager); | |||
}, | |||
methods: { | |||
/** | |||
* 查找嵌套节点信息 | |||
*/ | |||
async getNestNode(id){ | |||
const res = await tempalteService.queryNestTemplateByTemplateId(id); | |||
this.nestNodeList = res.Data || []; | |||
}, | |||
/** | |||
* 加载项目信息 | |||
*/ | |||
@@ -71,23 +71,50 @@ | |||
<el-button type="primary" class="slot_btn" slot="right" @click="createProject()">创建</el-button> | |||
</AppHeader> | |||
<div class="template_improve_content" > | |||
<div class="template_improve_info"> | |||
<div class="template_title">模板名称:</div> | |||
<div class="template_title_info">{{selectTemplate.TempName}}</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 v-for="selectTemplate in selectTemplateList" :key="selectTemplate.Id"> | |||
<div class="template_improve_info"> | |||
<div class="template_title">模板名称:</div> | |||
<div class="template_title_info">{{selectTemplate.TempName}}</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> | |||
<!-- 添加嵌套模板 --> | |||
<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="isNodeChecked(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> | |||
@@ -110,11 +137,21 @@ export default { | |||
}, | |||
data(){ | |||
return{ | |||
templateId:sessionStorage.templateID, | |||
listTempNodeTree:[], | |||
NestTemplateList:[],//嵌套模板列表 | |||
otherTemplateList:[], | |||
tempNodeList:[], | |||
nestNodeId:'',//传入的nestNodeId | |||
title:'', | |||
isProjName:true, | |||
isTemSelect:false, | |||
isTemImprove:false, | |||
isTemNest:false, | |||
checkedIndex:NaN, | |||
checkedIndexList:[], | |||
selectTemplate:{}, | |||
selectTemplateList:[],//选中的嵌套模板列表 | |||
srcIndex: 2, // 封面切换Index | |||
coverSrc: 'static/img/faceImg/face01.png', | |||
templateList:[], | |||
@@ -189,6 +226,7 @@ export default { | |||
this.isProjName = false; | |||
this.isTemSelect = true; | |||
this.isTemImprove = false; | |||
this.isTemNest = false, | |||
this.getSelectTemplateData(); | |||
}, | |||
enterProjNameInput(){ | |||
@@ -214,6 +252,16 @@ export default { | |||
isChecked(index,item){ | |||
this.checkedIndex = index; | |||
this.selectTemplate = item; | |||
this.selectTemplateList[0] = 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); | |||
}, | |||
/** | |||
@@ -282,6 +330,43 @@ 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(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); | |||
}) | |||
}, | |||
/** | |||
* 新建项目 | |||
*/ | |||
@@ -323,10 +408,6 @@ export default { | |||
console.log(err); | |||
}) | |||
// let timer = setTimeout(() => { | |||
// this.$emit('createProjSuccess'); | |||
// clearTimeout(timer); | |||
// },3000) | |||
} else { | |||
thisApp.$notify.error({ | |||
message: `项目创建失败, 请稍后重试。`, | |||
@@ -338,7 +419,37 @@ export default { | |||
}, | |||
/** | |||
* 加在模板节点树数据 | |||
*/ | |||
async loadTempNodeTree() { | |||
const templateId = this.templateId; | |||
const res = await templateService.queryTemplateNodeByTemplateId(templateId); | |||
this.listTempNodeTree = res.Data ? [res.Data] : []; | |||
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(); | |||
} | |||
}, | |||
immediate: true | |||
} | |||
} | |||
} | |||
</script> | |||
@@ -420,9 +420,9 @@ | |||
}) | |||
.then(response => { | |||
if (response.data.state == 1) { | |||
thisApp.$notify.success({ | |||
thisApp.$notify({ | |||
message: response.data.message, | |||
type: "error", | |||
type: "success", | |||
offset: 100, | |||
duration: 2500 | |||
}); | |||
@@ -436,8 +436,7 @@ | |||
thisApp.radioFolder = ''; | |||
thisApp.isShowRequest = true; | |||
} else { | |||
thisApp.$notify.error({ | |||
thisApp.$notify({ | |||
message: response.data.message, | |||
type: "error", | |||
offset: 100, | |||
@@ -466,9 +465,9 @@ | |||
}) | |||
.then(response => { | |||
if (response.data.state == 1) { | |||
thisApp.$notify.success({ | |||
thisApp.$notify({ | |||
message: response.data.message, | |||
type: "error", | |||
type: "success", | |||
offset: 100, | |||
duration: 2500 | |||
}); | |||
@@ -476,7 +475,7 @@ | |||
thisApp.isShowRequestDetail = false; | |||
thisApp.isShowRequest = true; | |||
} else { | |||
thisApp.$notify.error({ | |||
thisApp.$notify({ | |||
message: response.data.message, | |||
type: "error", | |||
@@ -539,9 +538,9 @@ | |||
}) | |||
.then(response => { | |||
if (response.data.state == 1) { | |||
thisApp.$notify.success({ | |||
thisApp.$notify({ | |||
message: response.data.message, | |||
type: "error", | |||
type: "success", | |||
offset: 100, | |||
duration: 2500 | |||
}); | |||
@@ -550,7 +549,7 @@ | |||
thisApp.isShowAuditDetail = false; | |||
thisApp.isShowRequest = true; | |||
} else { | |||
thisApp.$notify.error({ | |||
thisApp.$notify({ | |||
message: response.data.message, | |||
type: "error", | |||
@@ -586,9 +585,9 @@ | |||
}) | |||
.then(response => { | |||
if (response.data.state == 1) { | |||
thisApp.$notify.success({ | |||
thisApp.$notify({ | |||
message: response.data.message, | |||
type: "error", | |||
type: "success", | |||
offset: 100, | |||
duration: 2500 | |||
}); | |||
@@ -597,7 +596,7 @@ | |||
thisApp.isShowAuditDetail = false; | |||
thisApp.isShowRequest = true; | |||
} else { | |||
thisApp.$notify.error({ | |||
thisApp.$notify({ | |||
message: response.data.message, | |||
type: "error", | |||
@@ -631,9 +630,9 @@ | |||
}) | |||
.then(response => { | |||
if (response.data.state == 1) { | |||
thisApp.$notify.success({ | |||
thisApp.$notify({ | |||
message: response.data.message, | |||
type: "error", | |||
type: "success", | |||
offset: 100, | |||
duration: 2500 | |||
}); | |||
@@ -642,7 +641,7 @@ | |||
thisApp.isShowAuditDetail = false; | |||
thisApp.isShowRequest = true; | |||
} else { | |||
thisApp.$notify.error({ | |||
thisApp.$notify({ | |||
message: response.data.message, | |||
type: "error", | |||
@@ -391,8 +391,8 @@ export default { | |||
}); | |||
thisApp.loginShow = 4; | |||
} else { | |||
thisApp.$notify.error({ | |||
thisApp.$notify({ | |||
type:'error', | |||
message: response.data.message, | |||
offset: 100, | |||
duration: 2500, | |||
@@ -452,8 +452,8 @@ export default { | |||
thisApp.phoneCode = ""; | |||
thisApp.loginPage(); | |||
} else { | |||
thisApp.$notify.error({ | |||
thisApp.$notify({ | |||
type:'error', | |||
message: response.data.message, | |||
offset: 100, | |||
duration: 2500, | |||
@@ -723,8 +723,8 @@ | |||
duration: 2500 | |||
}); | |||
} else { | |||
thisApp.$notify.error({ | |||
thisApp.$notify({ | |||
type:'error', | |||
message: "创建文件夹失败!", | |||
offset: 100, | |||
duration: 5000 | |||
@@ -212,8 +212,8 @@ | |||
}); | |||
}) | |||
.catch(() => { | |||
thisApp.$notify.info({ | |||
thisApp.$notify({ | |||
type:"warning", | |||
message: "操作已取消", | |||
offset: 100, | |||
duration: 1300 | |||
@@ -3419,7 +3419,7 @@ export default { | |||
notify.success(res.Msg); | |||
this.listFiles(); | |||
} else { | |||
notify.info(res.Msg); | |||
notify.warning(res.Msg); | |||
return; | |||
} | |||
} catch(err) { | |||
@@ -4890,8 +4890,8 @@ export default { | |||
}); | |||
}) | |||
.catch(() => { | |||
thisApp.$notify.info({ | |||
thisApp.$notify({ | |||
type:"warning", | |||
message: "操作已取消", | |||
offset: 100, | |||
duration: 2500, | |||
@@ -6939,8 +6939,8 @@ export default { | |||
}); | |||
}) | |||
.catch(() => { | |||
thisApp.$notify.info({ | |||
thisApp.$notify({ | |||
type:"warning", | |||
message: "操作已取消", | |||
offset: 100, | |||
duration: 2500, | |||
@@ -118,8 +118,8 @@ | |||
this.currentMsg = this.listAllMsg[this.msgIndex]; | |||
this.setMsg(); | |||
} else { | |||
this.$notify.info({ | |||
this.$notify({ | |||
type:"warning", | |||
message: "已经是最新消息啦", | |||
offset: 100, | |||
duration: 2500 | |||
@@ -137,8 +137,8 @@ | |||
this.msgIndex = this.msgIndex + 1; | |||
this.setMsg(); | |||
} else { | |||
this.$notify.info({ | |||
this.$notify({ | |||
type:"warning", | |||
message: "已经是最后一条消息啦", | |||
offset: 100, | |||
duration: 2500 | |||
@@ -914,8 +914,8 @@ | |||
} | |||
thisApp.lockPwd = ""; | |||
} else { | |||
thisApp.$notify.error({ | |||
thisApp.$notify({ | |||
type:'error', | |||
message: response.data.message, | |||
offset: 100, | |||
duration: 2500 | |||
@@ -1010,8 +1010,8 @@ | |||
this.currentCompany.logoUrl == undefined || | |||
this.currentCompany.logoUrl == "" | |||
) { | |||
thisApp.$notify.error({ | |||
thisApp.$notify({ | |||
type:'warning', | |||
message: "请上传Logo图片", | |||
offset: 100, | |||
duration: 5000 | |||
@@ -1033,8 +1033,8 @@ | |||
duration: 2500 | |||
}); | |||
} else { | |||
thisApp.$notify.error({ | |||
thisApp.$notify({ | |||
type:'error', | |||
message: response.data.message, | |||
offset: 100, | |||
duration: 5000 | |||
@@ -1089,8 +1089,8 @@ | |||
this.Openclockpwd = true; | |||
this.currTreeNode = "removeUserManager"; | |||
} else { | |||
this.$notify.info({ | |||
this.$notify({ | |||
type:"warning", | |||
message: "请选择人员后再进行移除操作", | |||
offset: 100, | |||
duration: 2500 | |||
@@ -1215,8 +1215,8 @@ | |||
break; | |||
} | |||
} else { | |||
thisApp.$notify.error({ | |||
thisApp.$notify({ | |||
type:'error', | |||
message: response.data.message, | |||
offset: 100, | |||
duration: 2500 | |||
@@ -1862,7 +1862,8 @@ export default { | |||
const ifSucc = res.Code === 0; | |||
if (!ifSucc) { | |||
this.addDeptDisable = false; | |||
this.$notify.error({ | |||
this.$notify({ | |||
type:'error', | |||
message: res.Msg, | |||
offset: 100, | |||
duration: 5000, | |||
@@ -1902,7 +1903,8 @@ export default { | |||
const res = await this.$fetchApi("dept/updateDept", param); | |||
const ifSucc = res.Code === 0; | |||
if (!ifSucc) { | |||
thisApp.$notify.error({ | |||
thisApp.$notify({ | |||
type:'error', | |||
message: res.Msg, | |||
offset: 100, | |||
duration: 5000, | |||
@@ -2073,8 +2075,8 @@ export default { | |||
}); | |||
const ifSucc = res.Code === 0; | |||
if (!ifSucc) { | |||
this.$notify.error({ | |||
this.$notify({ | |||
type:'error', | |||
message: res.Msg, | |||
offset: 100, | |||
duration: 5000, | |||
@@ -2127,8 +2129,8 @@ export default { | |||
}); | |||
const ifSucc = res.Code === 0; | |||
if (!ifSucc) { | |||
thisApp.$notify.error({ | |||
thisApp.$notify({ | |||
type:'error', | |||
message: res.Msg, | |||
offset: 100, | |||
duration: 5000, | |||
@@ -2161,8 +2163,8 @@ export default { | |||
const res = await services.addUser(this.newUser); | |||
const ifSucc = res.Code === 0; | |||
if (!ifSucc) { | |||
thisApp.$notify.error({ | |||
thisApp.$notify({ | |||
type:'error', | |||
message: res.Msg, | |||
offset: 100, | |||
duration: 5000, | |||
@@ -2389,8 +2391,8 @@ export default { | |||
const res = await services.updateUser(this.currentUser); | |||
const ifSucc = res.Code === 0; | |||
if (!ifSucc) { | |||
thisApp.$notify.error({ | |||
thisApp.$notify({ | |||
type:'error', | |||
message: res.Msg, | |||
offset: 100, | |||
duration: 5000, | |||
@@ -2445,8 +2447,8 @@ export default { | |||
duration: 2500, | |||
}); | |||
} else { | |||
thisApp.$notify.error({ | |||
thisApp.$notify({ | |||
type:'error', | |||
message: response.data.message, | |||
offset: 100, | |||
duration: 5000, | |||
@@ -2485,7 +2487,8 @@ export default { | |||
id: this.currentUser.id, | |||
}); | |||
if (res.Code !== 0) { | |||
thisApp.$notify.error({ | |||
thisApp.$notify({ | |||
type:'error', | |||
message: res.Msg, | |||
offset: 100, | |||
duration: 5000, | |||
@@ -1357,8 +1357,8 @@ export default { | |||
); | |||
const flag = res.Code === 0; | |||
if (!flag) { | |||
thisApp.$notify.error({ | |||
thisApp.$notify({ | |||
type:'error', | |||
message: res.Msg, | |||
offset: 100, | |||
duration: 5000, | |||
@@ -1409,8 +1409,8 @@ export default { | |||
}); | |||
thisApp.listCompany(); | |||
} else { | |||
thisApp.$notify.error({ | |||
thisApp.$notify({ | |||
type:'error', | |||
message: resData.Data, | |||
offset: 100, | |||
duration: 5000, | |||
@@ -1504,8 +1504,8 @@ export default { | |||
const res = await services.createCompany(this.currentCompany); | |||
const isSuccess = res.Code === 0; | |||
if (!isSuccess) { | |||
thisApp.$notify.error({ | |||
thisApp.$notify({ | |||
type:'error', | |||
message: res.Msg, | |||
offset: 100, | |||
duration: 5000, | |||
@@ -232,11 +232,13 @@ | |||
const subTemplate = this.selectedSubTemplateNode; | |||
const selectedNode = this.selectedNode; | |||
const mainTemplateId = this.tempId; | |||
const name = this.selectedSubTemplateNode.label; | |||
// todo | |||
const res = await services.createNestedRelevance({ | |||
id: subTemplate.id, | |||
parentId: selectedNode.id, | |||
parentTemplateId: mainTemplateId, | |||
Id: subTemplate.id, | |||
ParentId: selectedNode.id, | |||
ParentTemplateId: mainTemplateId, | |||
Name: name | |||
}); | |||
if(res.Code !== 0) return; | |||
notify.success('嵌套成功'); | |||