Browse Source

测试提示样式

Morphone0429 4 years ago
parent
commit
05b1777078

+ 6 - 21
src/components/testManager/staticKnowledgeMap/StaticKnowledgeMapTest.vue

@@ -134,7 +134,7 @@ export default {
       Object.assign(vm, to.params);
       if (Object.keys(to.params).length === 0) return;
       vm.getDataList(to.params.hospitalId);
-      vm._getRunningStatus()
+      vm._getRunningStatus();
     });
   },
   methods: {
@@ -209,31 +209,16 @@ export default {
       };
       api.staticKnowledgeTest(formData, header).then((res) => {
         if (res.data.code === '00000001') {
-          this.$alert(`数据存在异常,测试失败,请修改后再试`, '提示', {
-            confirmButtonText: '确定',
-            type: 'warning',
-          })
-            .then(() => {})
-            .catch(() => {});
+          this.$message.error('数据存在异常');
           this.getDataList(this.hospitalId); // 重新获取列表
         } else if (res.data === '' && res.status === 200) {
-          this.$alert(`测试成功`, '提示', {
-            confirmButtonText: '确定',
+          this.$message({
+            message: '测试成功',
             type: 'success',
-          })
-            .then(() => {})
-            .catch(() => {});
+          });
           this.getDataList(this.hospitalId); // 重新获取列表
-          // setTimeout(() => {
-          //   this.uploadInfo = '导入';
-          // }, 300);
         } else {
-          this.$alert(`${res.data.msg}`, '提示', {
-            confirmButtonText: '确定',
-            type: 'warning',
-          })
-            .then(() => {})
-            .catch(() => {});
+          this.$message.error('数据存在异常');
         }
         this.runningStatusArr = [0, 0, 0, 0, 0];
       });