diff --git a/src/components/BtnSmsCode/BtnSmsCode.vue b/src/components/BtnSmsCode/BtnSmsCode.vue index 1e0a8dd4..1a8ebbef 100644 --- a/src/components/BtnSmsCode/BtnSmsCode.vue +++ b/src/components/BtnSmsCode/BtnSmsCode.vue @@ -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 diff --git a/src/components/app-header/components/user_center.vue b/src/components/app-header/components/user_center.vue index 3e83419a..5d46a54a 100644 --- a/src/components/app-header/components/user_center.vue +++ b/src/components/app-header/components/user_center.vue @@ -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, diff --git a/src/components/fileUploader/fileUploader.vue b/src/components/fileUploader/fileUploader.vue index 49f3607c..f7f4157c 100644 --- a/src/components/fileUploader/fileUploader.vue +++ b/src/components/fileUploader/fileUploader.vue @@ -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: '文件类型不允许
或文件为空', offset: 100, diff --git a/src/services/template.js b/src/services/template.js index 6d8fbdc8..ae6a8329 100644 --- a/src/services/template.js +++ b/src/services/template.js @@ -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 }); diff --git a/src/utils/request.js b/src/utils/request.js index 05107450..500e9aea 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -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 diff --git a/src/views/components_web/distWork/distWork.vue b/src/views/components_web/distWork/distWork.vue index 1b6d3e9a..92c8d0a4 100644 --- a/src/views/components_web/distWork/distWork.vue +++ b/src/views/components_web/distWork/distWork.vue @@ -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 diff --git a/src/views/components_web/distWork/distWorkCopy.vue b/src/views/components_web/distWork/distWorkCopy.vue index 12aad9a0..8aa85e19 100644 --- a/src/views/components_web/distWork/distWorkCopy.vue +++ b/src/views/components_web/distWork/distWorkCopy.vue @@ -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 diff --git a/src/views/components_web/head/head.vue b/src/views/components_web/head/head.vue index b385b159..0884074e 100644 --- a/src/views/components_web/head/head.vue +++ b/src/views/components_web/head/head.vue @@ -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, diff --git a/src/views/components_web/newProj/newProj.vue b/src/views/components_web/newProj/newProj.vue index d517c32f..bb42cd1c 100644 --- a/src/views/components_web/newProj/newProj.vue +++ b/src/views/components_web/newProj/newProj.vue @@ -1470,7 +1470,8 @@ console.log(err); }) } else { - thisApp.$notify.error({ + thisApp.$notify({ + type:'error', message: res.Msg, offset: 100, duration: 5000, diff --git a/src/views/components_web/projDetail/components/plain-folder-list.vue b/src/views/components_web/projDetail/components/plain-folder-list.vue index 0ac59cbb..37f887c5 100644 --- a/src/views/components_web/projDetail/components/plain-folder-list.vue +++ b/src/views/components_web/projDetail/components/plain-folder-list.vue @@ -14,7 +14,7 @@
嵌套模板
--> -
编辑
+
{{folder.folderName}} @@ -82,6 +82,14 @@
+
+
+ +

嵌套模板

+
+ + +
@@ -110,6 +118,7 @@ :activeFolderId="activeFolderId" :selectedUser="selectedUser" :isProjManager="isProjManager" + :nestNodeList="nestNodeList" /> @@ -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 -