瀏覽代碼

质控类型不要默认标准功能

luolei 4 年之前
父節點
當前提交
5a976350f1
共有 2 個文件被更改,包括 66 次插入64 次删除
  1. 64 62
      src/components/qualityControl/AddQcType.vue
  2. 2 2
      src/components/qualityControl/QCTypeMang.vue

+ 64 - 62
src/components/qualityControl/AddQcType.vue

@@ -22,7 +22,7 @@
                         <el-input type="text" placeholder="请输入质控类型" v-model="form.name"></el-input>
                     </el-form-item>
                     
-                    <el-form-item label="默认标准类型:" class="formItem widthLarge">
+                    <!-- <el-form-item label="默认标准类型:" class="formItem widthLarge">
                       <el-switch
                         v-model="form.defaultModule"
                         :active-value="1"
@@ -32,7 +32,7 @@
                         @change="handleTemChange($event,form.defaultModule)"
                       ></el-switch>
                       <span class="showInfo">{{form.defaultModule==1?'是':'否'}}</span>
-                    </el-form-item>
+                    </el-form-item> -->
 
                     <el-form-item label="质控条目:" prop="qcItem">
                         <el-collapse>
@@ -91,7 +91,7 @@
           hospitalId:"",
           name:'',
           qcTypeCasesEntryVOList:[],
-          defaultModule: 0
+          // defaultModule: 0
         },
         rules:{
           hospitalId:{ required: true, message: '请选择所属医院', trigger: ['blur', 'change']},
@@ -125,7 +125,7 @@
           hospitalId:infoCopy.hospitalId,
           name:infoCopy.name,
           qcTypeCasesEntryVOList:[],
-          defaultModule:+infoCopy.defaultModule
+          // defaultModule:+infoCopy.defaultModule
         };
         //this.getQcTypeItem({hospitalId:info.hospitalId});
       }else{
@@ -196,35 +196,36 @@
               param.name=param.name.trim();
               this.saveDisable = true;  //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
               api.addQcType(param).then((res)=>{
-                if (res.data.code === '-1') {
-                  // 默认标准类型存在,是否替换
-                  this.$alert('默认标准类型已存在,是否替换?', '提示', {
-                    confirmButtonText: '确定',
-                    type: 'warning'
-                  })
-                    .then(() => {
-                      param = { ...param, defineType: 1 };
-                      api.addQcType(param).then(res => {
-                        if (res.data.code == 0) {
-                          this.$message({
-                            message: '修改成功',
-                            type: 'success'
-                          });
-                          //返回带搜索条件的首页
-                          this.$router.push({
-                            name: 'QCTypeMang',
-                            params: Object.assign({}, this.$route.params, {currentPage: 1})
-                          });
-                        } else {
-                          this.$message({
-                            message: res.data.msg,
-                            type: 'warning'
-                          });
-                        }
-                      });
-                    })
-                    .catch(() => {});
-                } else if(res.data.code==0){
+                // if (res.data.code === '-1') {
+                //   // 默认标准类型存在,是否替换
+                //   this.$alert('默认标准类型已存在,是否替换?', '提示', {
+                //     confirmButtonText: '确定',
+                //     type: 'warning'
+                //   })
+                //     .then(() => {
+                //       param = { ...param, defineType: 1 };
+                //       api.addQcType(param).then(res => {
+                //         if (res.data.code == 0) {
+                //           this.$message({
+                //             message: '修改成功',
+                //             type: 'success'
+                //           });
+                //           //返回带搜索条件的首页
+                //           this.$router.push({
+                //             name: 'QCTypeMang',
+                //             params: Object.assign({}, this.$route.params, {currentPage: 1})
+                //           });
+                //         } else {
+                //           this.$message({
+                //             message: res.data.msg,
+                //             type: 'warning'
+                //           });
+                //         }
+                //       });
+                //     })
+                //     .catch(() => {});
+                // } else 
+                if(res.data.code==0){
                   this.$message({
                     message:"修改成功",
                     type:'success'
@@ -247,35 +248,36 @@
               params.name=params.name.trim();
               this.saveDisable = true;  //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
               api.addQcType(params).then((res)=>{
-                if (res.data.code === '-1') {
-                  // 默认标准类型存在,是否替换
-                  this.$alert('默认标准类型已存在,是否替换?', '提示', {
-                    confirmButtonText: '确定',
-                    type: 'warning'
-                  })
-                    .then(() => {
-                      params = { ...params, defineType: 1 };
-                      api.addQcType(params).then(res => {
-                        if (res.data.code == 0) {
-                          this.$message({
-                            message: '修改成功',
-                            type: 'success'
-                          });
-                          //返回带搜索条件的首页
-                          this.$router.push({
-                            name: 'QCTypeMang',
-                            params: Object.assign({}, this.$route.params, {currentPage: 1})
-                          });
-                        } else {
-                          this.$message({
-                            message: res.data.msg,
-                            type: 'warning'
-                          });
-                        }
-                      });
-                    })
-                    .catch(() => {});
-                } else if(res.data.code==0){
+                // if (res.data.code === '-1') {
+                //   // 默认标准类型存在,是否替换
+                //   this.$alert('默认标准类型已存在,是否替换?', '提示', {
+                //     confirmButtonText: '确定',
+                //     type: 'warning'
+                //   })
+                //     .then(() => {
+                //       params = { ...params, defineType: 1 };
+                //       api.addQcType(params).then(res => {
+                //         if (res.data.code == 0) {
+                //           this.$message({
+                //             message: '修改成功',
+                //             type: 'success'
+                //           });
+                //           //返回带搜索条件的首页
+                //           this.$router.push({
+                //             name: 'QCTypeMang',
+                //             params: Object.assign({}, this.$route.params, {currentPage: 1})
+                //           });
+                //         } else {
+                //           this.$message({
+                //             message: res.data.msg,
+                //             type: 'warning'
+                //           });
+                //         }
+                //       });
+                //     })
+                //     .catch(() => {});
+                // } else 
+                if(res.data.code==0){
                   this.$message({
                     message:"添加成功",
                     type:'success'

+ 2 - 2
src/components/qualityControl/QCTypeMang.vue

@@ -41,7 +41,7 @@
                         prop="name"
                         label="质控类型">
                 </el-table-column>
-                <el-table-column :resizable="false" prop="operate" label="默认标准模版">
+                <!-- <el-table-column :resizable="false" prop="operate" label="默认标准模版">
                   <template slot-scope="scope">
                     <el-switch
                       v-model="scope.row.defaultModule"
@@ -52,7 +52,7 @@
                       @change="handleTemChange(scope.row)"
                     ></el-switch>
                   </template>
-                </el-table-column>
+                </el-table-column> -->
                 <el-table-column
                         label="操作" width="150">
                     <template slot-scope="scope">