zsw007 3 lat temu
rodzic
commit
0143e33430

+ 4 - 1
src/api/cdss.js

@@ -748,5 +748,8 @@ export default {
     //数据导入校验
     return axios.post(urls.importExcelDataVerify, param);
   },
-
+  getResetFildF(param) {
+    //数据导入校验
+    return axios.post(urls.getResetFildF, param);
+  }
 };

+ 1 - 0
src/api/config.js

@@ -491,6 +491,7 @@ export default {
     'deleteHosRecordCDSS': '/api/cdssman/hospitalInfo/deleteRecord',   //医院信息——删除映射关系
     'getHospitalInfoCDSS': '/api/cdssman/hospitalInfo/getHospitalInfo',   //医院信息——获取医院信息
     'getUserRoleCDSS': '/api/cdssman/userRole/getUserRole',   //医院管理员列表
+    'getResetFildF': '/api/cdssman/sys/plan/addDefaultPlans', // 医院管理-方案重置
     'cancelUserRoleCDSS': '/api/cdssman/userRole/cancelUserRole',   //删除医院管理员
     'addUserRoleCDSS': '/api/cdssman/userRole/addUserRole',   //添加医院管理员
 

+ 31 - 0
src/components/cdssManage/hospital/Hospital.vue

@@ -40,6 +40,9 @@
           <template slot-scope="scope">
             <el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
             <span style="margin:0 3px;">|</span>
+            <el-button @click="resetFildF(scope.row)" v-if="scope.row.id !== -1"  :style="scope.row.id !== -1? 'color: #48c5d7;' : 'color: #bfbfbf;'" type="text" size="small">方案重置</el-button>
+            <el-button type="text" size="small" v-else disabled>方案重置</el-button>
+            <span style="margin:0 3px;">|</span>
             <el-button
               @click="startOrEndHos(scope.row,'start')"
               type="text"
@@ -326,6 +329,34 @@ export default {
             this.warning(error);
           });
       });
+    },
+    // 方案重置
+    resetFildF(row){
+      this.$confirm(`此操作将重置${row.name}数据, 是否继续?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          api.getResetFildF({
+            id: row.id
+          })
+          .then(res => {
+            if(res.data.code === '0'){
+              this.getDataList()
+              this.$message({
+                  showClose: true,
+                  message: '重置成功',
+                  type: 'success',
+                  duration: 1000
+                });
+            }
+          })
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消重置'
+          });          
+        });
     }
   }
 };