Browse Source

Merge branch 'feature/upload' of duanxiaoduan/tmr-admin into develop

duanxiaoduan 1 year ago
parent
commit
9b0acb69b3

+ 4 - 2
.env.development

@@ -3,8 +3,10 @@ ENV = 'development'
 
 # base api
 # 测试线
-
-VUE_APP_BASE_API = 'http://192.168.1.70:8082/'
+# 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-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().

+ 3 - 1
.env.production

@@ -4,4 +4,6 @@ ENV = 'production'
 # base api
 # 正式线
 # VUE_APP_BASE_API = ':8081/'
-VUE_APP_BASE_API = 'http://192.168.1.70:8088/'
+# VUE_APP_BASE_API = 'http://192.168.1.70:8088/'
+# VUE_APP_BASE_API = 'http://127.0.0.1:8081/'
+VUE_APP_BASE_API = '/'

+ 1 - 0
src/api/common.js

@@ -9,6 +9,7 @@ export function checkDates(data) {
   })
 }
 
+
 
 export function GetDataByName(data) {
   return request({

+ 1 - 0
src/store/modules/user.js

@@ -185,6 +185,7 @@ const actions = {
         Cookies.remove('ispastureuse')
         Cookies.remove('decimal')
         Cookies.remove('decimalr')
+        Cookies.remove('url')
         removeToken()
         resetRouter()
         resolve()

+ 4 - 1
src/utils/request.js

@@ -2,13 +2,16 @@ import axios from 'axios'
 import { MessageBox, Message } from 'element-ui'
 import store from '@/store'
 import { getToken } from '@/utils/auth'
+import Cookies from 'js-cookie';
 
 //获取当前url
 const DoMainString = document.querySelector("html").getAttribute("domain");
 var URL = process.env.VUE_APP_BASE_API
 if (DoMainString) {
   URL = DoMainString
-}
+}
+Cookies.set('url',URL)
+console.log(process.env.VUE_APP_BASE_API,'===========URL1111')
 console.log(URL,'===========URL')
 
 if(URL.indexOf('/')==0 && URL.length==1){

+ 1 - 1
src/views/basicData/feedTable/index.vue

@@ -1014,7 +1014,7 @@ export default {
     },
     // 设置上传地址
     uploadExcelUrl() {
-      return process.env.VUE_APP_BASE_API + 'authdata/ImportExcel'
+      return Cookies.get('url') + 'authdata/ImportExcel'
     }
   },
 

+ 2 - 2
src/views/basicData/standardParameters/index.vue

@@ -465,7 +465,7 @@ export default {
     },
     // 设置上传地址
     uploadExcelUrl() {
-      return process.env.VUE_APP_BASE_API + 'authdata/ImportExcel'
+      return Cookies.get('url') + 'authdata/ImportExcel'
     },
     headers2() {
       return {
@@ -489,7 +489,7 @@ export default {
     },
     // 设置上传地址
     uploadExcelUrl2() {
-      return process.env.VUE_APP_BASE_API + 'authdata/ImportExcel'
+      return Cookies.get('url') + 'authdata/ImportExcel'
     }
   },
   created() {

+ 1 - 1
src/views/formulationPlan/dhedFormula/index - 20230829备份.vue

@@ -1087,7 +1087,7 @@ export default {
     },
     // 设置上传地址
     uploadExcelUrl() {
-      return process.env.VUE_APP_BASE_API + 'authdata/fpdimportexcel'
+      return Cookies.get('url') + 'authdata/fpdimportexcel'
     }
   },
   created() {

+ 1 - 1
src/views/formulationPlan/dhedFormula/index.vue

@@ -1125,7 +1125,7 @@ export default {
     },
     // 设置上传地址
     uploadExcelUrl() {
-      return process.env.VUE_APP_BASE_API + 'authdata/fpdimportexcel'
+      return Cookies.get('url') + 'authdata/fpdimportexcel'
     }
   },
   created() {

+ 1 - 1
src/views/formulationPlan/dhedFormula/index备.vue

@@ -1086,7 +1086,7 @@ export default {
     },
     // 设置上传地址
     uploadExcelUrl() {
-      return process.env.VUE_APP_BASE_API + 'authdata/fpdimportexcel'
+      return Cookies.get('url') + 'authdata/fpdimportexcel'
     }
   },
   created() {

+ 12 - 6
src/views/formulationPlan/recipeTemplate/index.vue

@@ -727,6 +727,11 @@
                 <span>{{ scope.row.source }}</span>
               </template>
             </el-table-column>
+            <el-table-column label="容重(kg/m³)" min-width="130px" align="center">
+              <template slot-scope="scope">
+                <el-input v-model="scope.row.volume"  style="width:95%;padding:10px 0;" :disabled="detail.disabled" />
+              </template>
+            </el-table-column>
             <el-table-column label="备注" min-width="130px" align="center">
               <template slot-scope="scope">
                 <el-input v-model="scope.row.remark" type="textarea" :autosize="{ minRows: 1.3, maxRows: 4}" maxlength="32" style="width:95%;padding:10px 0;" :disabled="detail.disabled" />
@@ -1110,7 +1115,7 @@ export default {
     },
     // 设置上传地址
     uploadExcelUrl() {
-      return process.env.VUE_APP_BASE_API + 'authdata/ImportExcel'
+      return Cookies.get('url') + 'authdata/ImportExcel'
     }
   },
   mounted() {
@@ -2980,7 +2985,7 @@ export default {
                     this.detail.dialogFormVisible = true
                     this.detail.list = this.selectList2
                     this.detail.disabled = false
-                    this.detail.list2 = [{ tname: '', tcolor: '#ccc', ccid: '', fttype: '预混配方', fttypeid: '2', source: '自定义', remark: '', 'enable': 1 }]
+                    this.detail.list2 = [{ tname: '', tcolor: '#ccc', ccid: '', fttype: '预混配方', fttypeid: '2', source: '自定义', remark: '', 'enable': 1,volume:'' }]
                     setTimeout(() => {
                       this.detail.listLoading = false
                     }, 100)
@@ -2990,7 +2995,7 @@ export default {
                   this.detail.dialogFormVisible = true
                   this.detail.list = this.selectList2
                   this.detail.disabled = false
-                  this.detail.list2 = [{ tname: '', tcolor: '#ccc', ccid: '', fttype: '预混配方', fttypeid: '2', source: '自定义', remark: '', 'enable': 1 }]
+                  this.detail.list2 = [{ tname: '', tcolor: '#ccc', ccid: '', fttype: '预混配方', fttypeid: '2', source: '自定义', remark: '', 'enable': 1,volume:'' }]
                   setTimeout(() => {
                     this.detail.listLoading = false
                   }, 100)
@@ -3001,7 +3006,7 @@ export default {
                 this.detail.dialogFormVisible = true
                 this.detail.list = this.selectList2
                 this.detail.disabled = false
-                this.detail.list2 = [{ tname: '', tcolor: '#ccc', ccid: '', fttype: '预混配方', fttypeid: '2', source: '自定义', remark: '', 'enable': 1 }]
+                this.detail.list2 = [{ tname: '', tcolor: '#ccc', ccid: '', fttype: '预混配方', fttypeid: '2', source: '自定义', remark: '', 'enable': 1,volume:'' }]
                 setTimeout(() => {
                   this.detail.listLoading = false
                 }, 100)
@@ -3012,7 +3017,7 @@ export default {
             this.detail.dialogFormVisible = true
             this.detail.list = this.selectList2
             this.detail.disabled = false
-            this.detail.list2 = [{ tname: '', tcolor: '#ccc', ccid: '', fttype: '预混配方', fttypeid: '2', source: '自定义', remark: '', 'enable': 1 }]
+            this.detail.list2 = [{ tname: '', tcolor: '#ccc', ccid: '', fttype: '预混配方', fttypeid: '2', source: '自定义', remark: '', 'enable': 1,volume:'' }]
             setTimeout(() => {
               this.detail.listLoading = false
             }, 100)
@@ -3120,7 +3125,8 @@ export default {
           fttypeid: this.detail.list2[0].fttypeid,
           source: this.detail.list2[0].source,
           remark: this.detail.list2[0].remark,
-          enable: this.detail.list2[0].enable
+          enable: this.detail.list2[0].enable,
+          volume:this.detail.list2[0].volume
         }}
         this.requestParam.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.detail.list }}
         this.requestParam.data[1].children = []

+ 1 - 1
src/views/inventoryManagement/feedContract/index.vue

@@ -281,7 +281,7 @@ export default {
     },
     // 设置上传地址
     uploadExcelUrl() {
-      return process.env.VUE_APP_BASE_API + 'authdata/ImportExcel'
+      return Cookies.get('url') + 'authdata/ImportExcel'
     }
   },
   created() {

+ 1 - 1
src/views/inventoryManagement/inventoryList/index.vue

@@ -293,7 +293,7 @@ export default {
     },
     // 设置上传地址
     uploadExcelUrl() {
-      return process.env.VUE_APP_BASE_API + 'authdata/ImportExcel'
+      return Cookies.get('url') + 'authdata/ImportExcel'
     }
   },
   created() {

+ 1 - 1
src/views/inventoryManagement/laborConsumption/index.vue

@@ -307,7 +307,7 @@ export default {
     },
     // 设置上传地址
     uploadExcelUrl() {
-      return process.env.VUE_APP_BASE_API + 'authdata/ImportExcel'
+      return Cookies.get('url') + 'authdata/ImportExcel'
     }
   },
   created() {

+ 1 - 1
src/views/inventoryManagement/warehousing/index.vue

@@ -481,7 +481,7 @@ export default {
     },
     // 设置上传地址
     uploadExcelUrl() {
-      return process.env.VUE_APP_BASE_API + 'authdata/ImportExcel'
+      return Cookies.get('url') + 'authdata/ImportExcel'
     }
   },
   created() {

+ 1 - 1
src/views/shedProduction/dungScores/index.vue

@@ -401,7 +401,7 @@ export default {
     },
     // 设置上传地址
     uploadExcelUrl() {
-      return process.env.VUE_APP_BASE_API + 'authdata/ImportExcel'
+      return Cookies.get('url') + 'authdata/ImportExcel'
     }
   },
   created() {

+ 1 - 1
src/views/shedProduction/fecalScreen/index.vue

@@ -372,7 +372,7 @@ export default {
     },
     // 设置上传地址
     uploadExcelUrl() {
-      return process.env.VUE_APP_BASE_API + 'authdata/ImportExcel'
+      return Cookies.get('url') + 'authdata/ImportExcel'
     }
   },
   created() {

+ 1 - 1
src/views/shedProduction/formulaDryMatter/index.vue

@@ -356,7 +356,7 @@ export default {
     },
     // 设置上传地址
     uploadExcelUrl() {
-      return process.env.VUE_APP_BASE_API + 'authdata/ImportExcel'
+      return Cookies.get('url') + 'authdata/ImportExcel'
     }
   },
   created() {

+ 8 - 3
src/views/shedProduction/materialRemainingRecord/index.vue

@@ -294,7 +294,8 @@ export default {
       selectList: [],
       rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
       cellStyle: { padding: 0 + 'px' },
-      myHeight:document.documentElement.clientHeight - 85- 150 - 45
+      myHeight:document.documentElement.clientHeight - 85- 150 - 45,
+      url:'authdata/ImportExcel'
     }
   },
   computed: {
@@ -321,10 +322,14 @@ export default {
     },
     // 设置上传地址
     uploadExcelUrl() {
-      return process.env.VUE_APP_BASE_API + 'authdata/ImportExcel'
-    }
+      // return Cookies.get('url') + 'authdata/ImportExcel'
+      return Cookies.get('url') + 'authdata/ImportExcel'
+    }
+    // let url = 'authdata/ImportExcel';
+
   },
   created() {
+    console.log(document.querySelector("html").getAttribute("domain"),'7777')
     this.getDataSynchronization()
     this.getList()
     this.getDownList()

+ 1 - 1
src/views/shedProduction/pennsylvaniaSieve/index.vue

@@ -403,7 +403,7 @@ export default {
     },
     // 设置上传地址
     uploadExcelUrl() {
-      return process.env.VUE_APP_BASE_API + 'authdata/ImportExcel'
+      return Cookies.get('url') + 'authdata/ImportExcel'
     }
   },
   created() {

+ 1 - 1
src/views/shedProduction/performance/index.vue

@@ -409,7 +409,7 @@ export default {
     },
     // 设置上传地址
     uploadExcelUrl() {
-      return process.env.VUE_APP_BASE_API + 'authdata/ImportExcel'
+      return Cookies.get('url') + 'authdata/ImportExcel'
     }
   },
   created() {

+ 1 - 1
src/views/shedProduction/physicalConditionScore/index.vue

@@ -425,7 +425,7 @@ export default {
     },
     // 设置上传地址
     uploadExcelUrl() {
-      return process.env.VUE_APP_BASE_API + 'authdata/ImportExcel'
+      return Cookies.get('url') + 'authdata/ImportExcel'
     }
   },
   created() {