From 35c30d6281f600e34c992c470b7229de5ab2fb74 Mon Sep 17 00:00:00 2001
From: revive <1664535558@qq.com>
Date: Thu, 24 Dec 2020 16:20:46 +0800
Subject: [PATCH 1/2] commit
---
src/components/BtnSmsCode/BtnSmsCode.vue | 12 +-
.../app-header/components/user_center.vue | 43 +++---
src/components/fileUploader/fileUploader.vue | 19 ++-
src/services/system.js | 1 -
src/services/template.js | 18 +++
src/utils/request.js | 2 +-
.../components_web/distWork/distWork.vue | 3 +-
.../components_web/distWork/distWorkCopy.vue | 4 +-
src/views/components_web/head/head.vue | 40 ++---
src/views/components_web/newProj/newProj.vue | 3 +-
.../components/plain-folder-list.vue | 52 ++++++-
.../components_web/projDetail/projDetail.vue | 13 ++
src/views/components_web/project/newProj.vue | 146 ++++++++++++++++--
.../share_setting/fileshare.vue | 31 ++--
src/views/login/index.vue | 8 +-
src/views/main_web/cloud.vue | 4 +-
src/views/main_web/index/index.vue | 2 +-
src/views/main_web/proj-item.vue | 2 +-
src/views/manage_company/project.vue | 4 +-
src/views/manage_company/setting.vue | 12 +-
src/views/manage_company/user/index.vue | 29 ++--
src/views/manage_system/customer/index.vue | 12 +-
src/views/manage_system/template/mind.vue | 8 +-
vue.config.js | 14 +-
24 files changed, 345 insertions(+), 137 deletions(-)
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 1c344bfd..2a6e0cf5 100644
--- a/src/components/app-header/components/user_center.vue
+++ b/src/components/app-header/components/user_center.vue
@@ -1296,7 +1296,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,
@@ -1331,7 +1332,8 @@ export default {
duration: 2500,
});
} else {
- this.$notify.error({
+ this.$notify({
+ type:'error',
message: response.data.message,
offset: 100,
duration: 5000,
@@ -1378,7 +1380,8 @@ export default {
this.showeditpassword = false;
this.logout();
} else {
- this.$notify.error({
+ this.$notify({
+ type:'error',
message: response.data.message,
offset: 100,
duration: 5000,
@@ -1395,8 +1398,8 @@ export default {
*/
editUserName: function () {
if (this.editusername.newUserName == "") {
- this.$notify.error({
-
+ this.$notify({
+ type:'warning',
message: "请输入新的用户名",
offset: 100,
duration: 5000,
@@ -1404,8 +1407,8 @@ export default {
return;
}
if (this.editusername.sureUserName == "") {
- this.$notify.error({
-
+ this.$notify({
+ type:'warning',
message: "请输入确认用户名",
offset: 100,
duration: 5000,
@@ -1413,8 +1416,8 @@ export default {
return;
}
if (this.editusername.newUserName != this.editusername.sureUserName) {
- this.$notify.error({
-
+ this.$notify({
+ type:'warning',
message: "确认用户名和新的用户名不一致",
offset: 100,
duration: 5000,
@@ -1422,8 +1425,8 @@ export default {
return;
}
if (this.editusername.password == "") {
- this.$notify.error({
-
+ this.$notify({
+ type:'warning',
message: "请输入密码",
offset: 100,
duration: 5000,
@@ -1451,8 +1454,8 @@ export default {
this.isEditUserName = "";
this.logout();
} else {
- this.$notify.error({
-
+ this.$notify({
+ type:'error',
message: response.data.message,
offset: 100,
duration: 5000,
@@ -1480,7 +1483,7 @@ export default {
.then((response) => {
if (response.data.state == 1) {
thisApp.$notify({
-
+ type:'success',
message: response.data.message,
offset: 100,
duration: 2500,
@@ -1488,8 +1491,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,
@@ -1511,8 +1514,8 @@ export default {
thisApp.newEmail
)
) {
- this.$notify.error({
-
+ this.$notify({
+ type:'warning',
message: "请检查邮箱是否填写正确!",
offset: 100,
duration: 2000,
@@ -1546,8 +1549,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/system.js b/src/services/system.js
index 9671fc9e..b5cfae24 100644
--- a/src/services/system.js
+++ b/src/services/system.js
@@ -47,7 +47,6 @@ const system = {
init: safeCall(() => {
console.log('客户端 electron API 检测:', global.electron);
}),
-
// initialSocket: () => {
// socket = io('ws://10.240.5.17:8000');
// // socket = io('ws://127.0.0.1:3000');
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..cda97d17 100644
--- a/src/views/components_web/distWork/distWork.vue
+++ b/src/views/components_web/distWork/distWork.vue
@@ -1265,7 +1265,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..6efc0b35 100644
--- a/src/views/components_web/distWork/distWorkCopy.vue
+++ b/src/views/components_web/distWork/distWorkCopy.vue
@@ -1489,8 +1489,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 cff687c6..615aa6b5 100644
--- a/src/views/components_web/head/head.vue
+++ b/src/views/components_web/head/head.vue
@@ -2241,8 +2241,8 @@ export default {
duration: 2500,
});
} else {
- this.$notify.error({
-
+ this.$notify({
+ type:'error',
message: response.data.message,
offset: 100,
duration: 5000,
@@ -2289,8 +2289,8 @@ export default {
this.showeditpassword = false;
this.logOutNoTip();
} else {
- this.$notify.error({
-
+ this.$notify({
+ type:'error',
message: response.data.message,
offset: 100,
duration: 5000,
@@ -2307,8 +2307,8 @@ export default {
editUserName: function () {
if (this.editusername.newUserName == "") {
- this.$notify.error({
-
+ this.$notify({
+ type:'warning',
message: "请输入新的用户名",
offset: 100,
duration: 5000,
@@ -2316,8 +2316,8 @@ export default {
return;
}
if (this.editusername.sureUserName == "") {
- this.$notify.error({
-
+ this.$notify({
+ type:'warning',
message: "请输入确认用户名",
offset: 100,
duration: 5000,
@@ -2325,8 +2325,8 @@ export default {
return;
}
if (this.editusername.newUserName != this.editusername.sureUserName) {
- this.$notify.error({
-
+ this.$notify({
+ type:'warning',
message: "确认用户名和新的用户名不一致",
offset: 100,
duration: 5000,
@@ -2334,8 +2334,8 @@ export default {
return;
}
if (this.editusername.password == "") {
- this.$notify.error({
-
+ this.$notify({
+ type:'warning',
message: "请输入密码",
offset: 100,
duration: 5000,
@@ -2363,8 +2363,8 @@ export default {
this.isEditUserName = "";
this.logOutNoTip();
} else {
- this.$notify.error({
-
+ this.$notify({
+ type:'error',
message: response.data.message,
offset: 100,
duration: 5000,
@@ -2400,8 +2400,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,
@@ -2423,8 +2423,8 @@ export default {
thisApp.newEmail
)
) {
- this.$notify.error({
-
+ this.$notify({
+ type:'warning',
message: "请检查邮箱是否填写正确!",
offset: 100,
duration: 2000,
@@ -2458,8 +2458,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 d1ed7ba3..37212ca4 100644
--- a/src/views/components_web/projDetail/components/plain-folder-list.vue
+++ b/src/views/components_web/projDetail/components/plain-folder-list.vue
@@ -76,6 +76,14 @@
嵌套模板
+