dedsudiyu 2 years ago
parent
commit
745735278f

+ 19 - 19
src/views/medicUniversity-3_1/chemicalManagement/chemicalLibrary/ChemicalInfo/listPage.vue

@@ -229,7 +229,7 @@
 </template>
 
 <script>
-  import { getHxpChemicalJoinCabinet,delHxpChemicalJoinCabinet,filterDept,getSubList,getCabinetBySubId,hxpChemicalJoinCabinet,getRestStockByManyCabinet } from "@/api/medicUniversity-3_1/index";
+  import { getNoAdminSubjectListNopage,getHxpChemicalJoinCabinet,delHxpChemicalJoinCabinet,getCabinetBySubId,hxpChemicalJoinCabinet,getRestStockByManyCabinet } from "@/api/medicUniversity-3_1/index";
   import { getLogoInfo } from "@/api/system/publicConfig";
   export default {
     name: "listPage",
@@ -524,22 +524,23 @@
       //化学品存放
       handleAdd(){
         //查询当前院系
-        filterDept().then(response => {
-          let text = "";
-          let idText = "";
-          for(let i=0;i<response.data.length;i++){
-            if(i==0){
-              text = text + response.data[i].deptName;
-              idText = idText + response.data[i].deptId;
-            }else{
-              text = text +'-'+ response.data[i].deptName;
-              idText = idText +','+ response.data[i].deptId;
-            }
-          }
-          this.$set(this,'dialogDeptName',text);
-          this.$set(this,'dialogDeptId',idText);
-          this.getSubList();
-        });
+        // filterDept().then(response => {
+        //   let text = "";
+        //   let idText = "";
+        //   for(let i=0;i<response.data.length;i++){
+        //     if(i==0){
+        //       text = text + response.data[i].deptName;
+        //       idText = idText + response.data[i].deptId;
+        //     }else{
+        //       text = text +'-'+ response.data[i].deptName;
+        //       idText = idText +','+ response.data[i].deptId;
+        //     }
+        //   }
+        //   this.$set(this,'dialogDeptName',text);
+        //   this.$set(this,'dialogDeptId',idText);
+        //   this.getSubList();
+        // });
+        this.getSubList();
       },
       backPage(){
         this.$parent.pageToggle(1);
@@ -597,8 +598,7 @@
       },
       //根据所属院系或多个院系获取实验室列表
       getSubList(){
-        let ids = this.dialogDeptId+'';
-        getSubList(ids).then(response => {
+        getNoAdminSubjectListNopage().then(response => {
           this.$set(this,'dialogData',{
             subId:"",
             chemicalId:"",

+ 22 - 22
src/views/studentViews/chemicalManagement/studentChemicalInfo/addPage.vue

@@ -223,7 +223,7 @@
 </template>
 
 <script>
-  import { filterDept,getSubList,getCabinetBySubId,hxpChemicalJoinCabinet,getRestStockByManyCabinet,classifyList } from "@/api/medicUniversity-3_1/index";
+  import { getNoAdminSubjectListNopage,getCabinetBySubId,hxpChemicalJoinCabinet,getRestStockByManyCabinet,classifyList } from "@/api/medicUniversity-3_1/index";
   import { getHxpQueryByUser } from "@/api/studentApi/chemicalManagement/index";
   import { getLogoInfo } from "@/api/system/publicConfig";
   export default {
@@ -529,26 +529,27 @@
       //化学品存放
       handleAdd(){
         //查询当前院系
-        filterDept().then(response => {
-          if(!this.selectioned.id){
-            this.msgError('请勾选化学品')
-            return
-          }
-          let text = "";
-          let idText = "";
-          for(let i=0;i<response.data.length;i++){
-            if(i==0){
-              text = text + response.data[i].deptName;
-              idText = idText + response.data[i].deptId;
-            }else{
-              text = text +'-'+ response.data[i].deptName;
-              idText = idText +','+ response.data[i].deptId;
-            }
-          }
-          this.$set(this,'dialogDeptName',text);
-          this.$set(this,'dialogDeptId',idText);
+        // filterDept().then(response => {
+        //   if(!this.selectioned.id){
+        //     this.msgError('请勾选化学品')
+        //     return
+        //   }
+        //   let text = "";
+        //   let idText = "";
+        //   for(let i=0;i<response.data.length;i++){
+        //     if(i==0){
+        //       text = text + response.data[i].deptName;
+        //       idText = idText + response.data[i].deptId;
+        //     }else{
+        //       text = text +'-'+ response.data[i].deptName;
+        //       idText = idText +','+ response.data[i].deptId;
+        //     }
+        //   }
+        //   this.$set(this,'dialogDeptName',text);
+        //   this.$set(this,'dialogDeptId',idText);
+        //   this.getSubList();
+        // });
           this.getSubList();
-        });
       },
       backPage(){
         this.$parent.pageToggle(0);
@@ -589,8 +590,7 @@
       },
       //根据所属院系或多个院系获取实验室列表
       getSubList(){
-        let ids = this.dialogDeptId+'';
-        getSubList(ids).then(response => {
+        getNoAdminSubjectListNopage().then(response => {
           this.$set(this,'dialogData',{
             subId:"",
             chemicalId:"",