Browse Source

修改了配方模板牲畜类别下拉的接口

duanxiaoduan 1 year ago
parent
commit
e789c28618
2 changed files with 10 additions and 3 deletions
  1. 2 1
      .env.development
  2. 8 2
      src/views/formulationPlan/recipeTemplate/index.vue

+ 2 - 1
.env.development

@@ -6,7 +6,8 @@ ENV = 'development'
 # VUE_APP_BASE_API = 'http://192.168.1.70:8082/'
 # VUE_APP_BASE_API = 'http://kpttest.kptyun.com/'
 # 白少后台本地
-VUE_APP_BASE_API = 'http://192.168.1.77:8081/'
+# VUE_APP_BASE_API = 'http://192.168.1.77:8081/'
+VUE_APP_BASE_API = 'http://192.168.1.93/'
 # vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
 # to control whether the babel-plugin-dynamic-import-node plugin is enabled.
 # It only does one thing by converting all import() to require().

+ 8 - 2
src/views/formulationPlan/recipeTemplate/index.vue

@@ -841,7 +841,8 @@ export default {
       isRoleEdit: [],
       myheight: document.documentElement.clientHeight - 265,
       requestParams: [
-        { name: 'getDictByName', offset: 0, pagecount: 0, params: ['牲畜父类'] },
+        {"name":"getCowclassList","page":1,"offset":1,"pagecount":50,"returntype":"Map","parammaps":{"pastureid":"1654779860","classname":"","parentname":"","enable":1}},
+        // { name: 'getDictByName', offset: 0, pagecount: 0, params: ['牲畜父类'] },
         { name: 'getDictByName2', offset: 0, pagecount: 0, params: ['配方类型'] },
         { name: 'getFeedAndPre', offset: 0, pagecount: 0, parammaps: { pastureid: Cookies.get('pastureid') }},
         { name: 'getDistCattle', offset: 0, pagecount: 0, parammaps: {}}
@@ -1219,7 +1220,12 @@ export default {
     },
     getDownList() {
       GetDataByNames(this.requestParams).then(response => {
-        this.livestockTypeList = response.data.getDictByName.list
+        // this.livestockTypeList = response.data.getDictByName.list
+        this.livestockTypeList = response.data.getCowclassList.list
+        for(var i=0;i<this.livestockTypeList.length;i++){
+        	this.livestockTypeList[i].label = this.livestockTypeList[i].classname;
+        	this.livestockTypeList[i].value = this.livestockTypeList[i].id;
+        }
         this.formulaTypeList = response.data.getDictByName2.list
         this.feedNameList = response.data.getFeedAndPre.list
         this.distCattle = response.data.getDistCattle.list