From ee78414b6bd7c4e4e32632d7147014dc029d3664 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BE=89?= <814457906@qq.com> Date: Wed, 26 Feb 2025 17:28:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/request.js | 68 ++-- .../system/ManuallyCreatingTasks/index.vue | 363 +++++------------- 2 files changed, 132 insertions(+), 299 deletions(-) diff --git a/src/utils/request.js b/src/utils/request.js index 869f885..aa91fd0 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -61,28 +61,28 @@ service.interceptors.request.use(config => { } return config }, error => { - console.log(error) - Promise.reject(error) + console.log(error) + Promise.reject(error) }) // 响应拦截器 service.interceptors.response.use(res => { - // 未设置状态码则默认成功状态 - const code = res.data.code || 200; - // 获取错误信息 - const msg = errorCode[code] || res.data.msg || errorCode['default'] - // 二进制数据则直接返回 - if(res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer'){ - return res.data - } - if (code === 401) { - if (!isRelogin.show) { - isRelogin.show = true; - MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { - confirmButtonText: '重新登录', - cancelButtonText: '取消', - type: 'warning' - } + // 未设置状态码则默认成功状态 + const code = res.data.code || 200; + // 获取错误信息 + const msg = errorCode[code] || res.data.msg || errorCode['default'] + // 二进制数据则直接返回 + if (res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer') { + return res.data + } + if (code === 401) { + if (!isRelogin.show) { + isRelogin.show = true; + MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { + confirmButtonText: '重新登录', + cancelButtonText: '取消', + type: 'warning' + } ).then(() => { isRelogin.show = false; store.dispatch('LogOut').then(() => { @@ -92,22 +92,28 @@ service.interceptors.response.use(res => { isRelogin.show = false; }); } - return Promise.reject('无效的会话,或者会话已过期,请重新登录。') - } else if (code === 500) { + return Promise.reject('无效的会话,或者会话已过期,请重新登录。') + } else if (code === 500) { + Message({ + message: msg, + type: 'error' + }) + return Promise.reject(new Error(msg)) + } else if (code !== 200) { + Notification.error({ + title: msg + }) + return Promise.reject('error') + } else { + if (res.config.url == '/manage/signroute/add' && window.location.pathname != "/patient/ManuallyCreatingTasks") { Message({ - message: msg, - type: 'error' + message: "创建任务已完成,正在拨打电话!", + type: 'success' }) - return Promise.reject(new Error(msg)) - } else if (code !== 200) { - Notification.error({ - title: msg - }) - return Promise.reject('error') - } else { - return res.data } - }, + return res.data + } +}, error => { console.log('err' + error) let { message } = error; diff --git a/src/views/system/ManuallyCreatingTasks/index.vue b/src/views/system/ManuallyCreatingTasks/index.vue index c2ba664..bec243c 100644 --- a/src/views/system/ManuallyCreatingTasks/index.vue +++ b/src/views/system/ManuallyCreatingTasks/index.vue @@ -5,23 +5,13 @@ 保存 - + - + @@ -120,67 +110,32 @@ - +
- - - + + + - +
- +
- + 指定时间: - +
@@ -192,11 +147,7 @@ style="margin-right: 5px" @change="handleCheckAllChange3($event, item)" > --> - + 立即执行
@@ -220,24 +171,17 @@
-
+
- + 电话外呼 问卷量表 宣教文案 @@ -248,39 +192,21 @@ - + - - + + - + - + @@ -289,26 +215,16 @@ 人工随访 -
+
重拨次数: - - + + @@ -316,44 +232,27 @@
时间间隔(分): - +
短信提醒: - - + +
短信模板: - - + +
@@ -375,13 +274,11 @@ -->
-
+
- +
@@ -540,16 +396,9 @@
重拨次数: - - + + @@ -557,44 +406,27 @@
时间间隔(分): - +
短信提醒: - - + +
短信模板: - - + +
@@ -859,12 +691,6 @@ export default { confirmButtonText: '确定', cancelButtonText: '取消', }).then(() => { - const loading = this.$loading({ - lock: true, - text: '保存中,请稍等!', - spinner: 'el-icon-loading', - background: 'rgba(0, 0, 0, 0.7)' - }); this.updata.routeNodeList = this.list; var newObj = JSON.parse(JSON.stringify(this.updata)); const invalidTimes = []; @@ -891,13 +717,10 @@ export default { invalidTimes.push(e); } }) - console.log(invalidTimes, 'invalidTimes') - if(invalidTimes.length>0){ - loading.close(); + if (invalidTimes.length > 0) { this.$message.error("时间点在8:00到20:00之间,请修改时间点"); - }else{ + } else { signrouteadd(newObj).then((res) => { - loading.close(); var message = '' if (this.$route.query.path == "/patient/signRecord") { message = '保存成功,即将返回签约患者列表' @@ -925,19 +748,15 @@ export default { }); }); }, 3000); + }).catch(() => { }); - } - // var nulllength= newObj.routeNodeList.filter(item => item.routeNodeName=="" || item.routeNodeName==null || item.routeNodeName==undefined); // console.log(nulllength,'nulllength') // if(nulllength.length>0){ // this.$message.error('节点名称不能为空!'); // return // } - console.log(newObj, 'this.newObj') - console.log(this.updata, 'this.updata') - }) }, Typechange(e) { @@ -1243,6 +1062,7 @@ export default { display: inline-block !important; float: inline-start !important; } + ::v-deep .el-input.is-disabled .el-input__inner { background: #fff; } @@ -1346,6 +1166,7 @@ export default { } } } + .PushMethod { height: 100px; padding: 20px; @@ -1398,6 +1219,7 @@ export default { width: 73%; // height: calc(100vh - 320px); height: 100%; + .flextow { display: flex; width: 100%; @@ -1436,6 +1258,7 @@ export default { justify-content: space-between; align-items: center; margin-bottom: 10px; + .toptop { display: flex; align-items: center; @@ -1453,9 +1276,11 @@ export default { padding-left: 12px; } } + ::v-deep .el-timeline-item__node--normal { left: 0px; } + ::v-deep .el-timeline-item__timestamp { margin: 0 !important; padding: 0 !important; @@ -1486,9 +1311,11 @@ export default { ::v-deep .el-form-item__content { display: inline-block !important; } + ::v-deep .el-icon-circle-plus-outline { cursor: pointer; } + ::v-deep .el-icon-delete { cursor: pointer; }