Bläddra i källkod

Merge branch 'release/v1.0.2' into feature/internationalization

# Conflicts:
#	.env.development
#	src/views/login/index.vue
duanxiaoduan 11 månader sedan
förälder
incheckning
7869adee79
59 ändrade filer med 3964 tillägg och 1697 borttagningar
  1. 127 0
      .drone.yml
  2. 5 5
      .env.development
  3. 2 9
      .env.production
  4. 18 0
      Dockerfile
  5. 1 1
      README.md
  6. 26 0
      default.conf.template
  7. BIN
      dist.zip
  8. 1 0
      package.json
  9. 3 2
      src/api/common.js
  10. BIN
      src/assets/images/index/row-r7.png
  11. BIN
      src/assets/images/loginImages/btn1.png
  12. BIN
      src/assets/images/loginImages/btn2.png
  13. BIN
      src/assets/images/loginImages/center_bg1.png
  14. BIN
      src/assets/images/loginImages/center_bg2.png
  15. BIN
      src/assets/images/loginImages/login_bg1.png
  16. BIN
      src/assets/images/loginImages/login_bg2.png
  17. BIN
      src/assets/images/loginImages/logo1.png
  18. BIN
      src/assets/images/loginImages/logo2.png
  19. 1 0
      src/icons/svg/clear.svg
  20. 1 0
      src/icons/svg/配方统计.svg
  21. 1 1
      src/main.js
  22. 3 1
      src/store/modules/user.js
  23. 54 40
      src/utils/request.js
  24. 12 0
      src/views/basicData/defaultParameter/function/index.vue
  25. 8 8
      src/views/basicData/equipmentTMR/index.vue
  26. 46 6
      src/views/basicData/feedTable/index.vue
  27. 80 3
      src/views/basicData/groupColumn/index.vue
  28. 151 2
      src/views/basicData/sapLog/index.vue
  29. 2 2
      src/views/basicData/standardParameters/index.vue
  30. 83 48
      src/views/dashboard/pasture/index.vue
  31. 259 15
      src/views/formulationPlan/dailyExecutionPlan/index.vue
  32. 77 5
      src/views/formulationPlan/dailyExecutionPlan/typePage/materialIssuancePlan.vue
  33. 1 1
      src/views/formulationPlan/dhedFormula/index - 20230829备份.vue
  34. 409 200
      src/views/formulationPlan/dhedFormula/index.vue
  35. 1 1
      src/views/formulationPlan/dhedFormula/index备.vue
  36. 119 6
      src/views/formulationPlan/materialIssuancePlan/index.vue
  37. 184 1019
      src/views/formulationPlan/pushMaterialPlan/index.vue
  38. 104 29
      src/views/formulationPlan/recipeTemplate/index.vue
  39. 2 2
      src/views/inventoryManagement/feedContract/index.vue
  40. 1 1
      src/views/inventoryManagement/inventoryList/index.vue
  41. 2 2
      src/views/inventoryManagement/laborConsumption/index.vue
  42. 2 2
      src/views/inventoryManagement/warehousing/index.vue
  43. 12 7
      src/views/login/index.vue
  44. 446 0
      src/views/login/index.vue.BASE.vue
  45. 447 0
      src/views/login/index.vue.LOCAL.vue
  46. 451 0
      src/views/login/index.vue.REMOTE.vue
  47. 2 2
      src/views/shedProduction/dungScores/index.vue
  48. 2 2
      src/views/shedProduction/fecalScreen/index.vue
  49. 23 10
      src/views/shedProduction/formulaDryMatter/index.vue
  50. 39 13
      src/views/shedProduction/materialRemainingRecord/index.vue
  51. 2 2
      src/views/shedProduction/pennsylvaniaSieve/index.vue
  52. 3 3
      src/views/shedProduction/performance/index.vue
  53. 2 2
      src/views/shedProduction/physicalConditionScore/index.vue
  54. 244 110
      src/views/statisticalAnalysis/errorAnalysis/pasture/index.vue
  55. 275 64
      src/views/statisticalAnalysis/feedingEfficiency/pasture/index.vue
  56. 12 2
      src/views/statisticalAnalysis/formulaStatistics/index.vue
  57. 136 19
      src/views/statisticalAnalysis/inventoryManagement/pasture/index.vue
  58. 8 4
      src/views/statisticalAnalysis/processAnalysis/group/index.vue
  59. 74 46
      src/views/statisticalAnalysis/processAnalysis/pasture/index.vue

+ 127 - 0
.drone.yml

@@ -0,0 +1,127 @@
+kind: pipeline
+type: docker
+name: test
+
+steps:
+  - name: build
+    image: plugins/docker
+    volumes:
+      - name: hosts
+        path: /etc/hosts
+      - name: docker-ca
+        path: /etc/docker
+      - name: docker-sock
+        path: /var/run/docker.sock
+    settings:
+      dockerfile: /drone/src/Dockerfile
+      username:
+        from_secret: aliyun_name
+      password:
+        from_secret: aliyun_password
+      repo: registry.cn-hangzhou.aliyuncs.com/kpt-event/tmr-admin
+      registry: registry.cn-hangzhou.aliyuncs.com
+      tags: [test]
+  - name: ssh commands
+    image: appleboy/drone-ssh
+    settings:
+      host: 192.168.1.70
+      username: tmrwatch
+      password:
+        from_secret: ssh_password
+      port: 22
+      script:
+        - cd /data/docker-compose/calf-feed-admin/
+        - echo "123456" | ./restart.sh
+trigger:
+  branch:
+    include:
+      - feature/*
+  event:
+    include:
+      - push
+volumes:
+  - name: host
+    host:
+      path: /etc/host
+  - name: docker-ca
+    host:
+      path: /ect/docker
+  - name: docker-sock
+    host:
+      path: /var/run/docker.sock
+---
+kind: pipeline
+type: docker
+name: product
+steps:
+  - name: build
+    image: plugins/docker:20.14.2
+    volumes:
+      - name: hosts
+        path: /etc/hosts
+      - name: docker-ca
+        path: /etc/docker
+      - name: docker-sock
+        path: /var/run/docker.sock
+    settings:
+      username:
+        from_secret: aliyun_name
+      password:
+        from_secret: aliyun_password
+      repo: registry.cn-hangzhou.aliyuncs.com/kpt-event/tmr-admin
+      registry: registry.cn-hangzhou.aliyuncs.com
+      tag:
+        - latest
+        - ${DRONE_BRANCH##release/}
+trigger:
+  branch:
+    include:
+      - release/*
+  event:
+    include:
+      - push
+volumes:
+  - name: docker-ca
+    host:
+      path: /etc/docker
+  - name: docker-sock
+    host:
+      path: /var/run/docker.sock
+---
+kind: pipeline
+type: docker
+name: hotfix
+
+steps:
+  - name: build
+    image: plugins/docker:20.14.2
+    volumes:
+      - name: hosts
+        path: /etc/hosts
+      - name: docker-ca
+        path: /etc/docker
+      - name: docker-sock
+        path: /var/run/docker.sock
+    settings:
+      username:
+        from_secret: aliyun_name
+      password:
+        from_secret: aliyun_password
+      repo: registry.cn-hangzhou.aliyuncs.com/kpt-event/tmr-admin
+      registry: registry.cn-hangzhou.aliyuncs.com
+      tag:
+        - latest
+trigger:
+  branch:
+    include:
+      - hotfix/*
+  event:
+    include:
+      - push
+volumes:
+  - name: docker-ca
+    host:
+      path: /etc/docker
+  - name: docker-sock
+    host:
+      path: /var/run/docker.sock

+ 5 - 5
.env.development

@@ -1,16 +1,12 @@
 # just a flag
 ENV = 'development'
 
-# base api
-# 测试线
-# VUE_APP_BASE_API = 'http://210.16.189.72:8081/'
-# VUE_APP_BASE_API = 'http://kpttest.kptyun.com/'
+# base api
 # 南通测试线
 # VUE_APP_BASE_API = 'http://kpttestnt.kptyun.com/'
 # VUE_APP_BASE_API = 'http://tmrwatch.cn/'
 # 测试线
 VUE_APP_BASE_API = 'http://tmrwatch.cn:8081/'
-
 # VUE_APP_BASE_API = 'http://127.0.0.1:8081/'
 
 # VUE_APP_BASE_API = 'http://lhpc81.kptyun.com/'
@@ -20,6 +16,10 @@ VUE_APP_BASE_API = 'http://tmrwatch.cn:8081/'
 # 白少杰
 # VUE_APP_BASE_API = 'http://192.168.1.77:8081/'
 
+=======
+# 白少后台本地
+VUE_APP_BASE_API = 'http://192.168.1.56: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().

+ 2 - 9
.env.production

@@ -4,13 +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://127.0.0.1:8081/'
 VUE_APP_BASE_API = '/'
-# 测试线
-# VUE_APP_BASE_API = 'http://210.16.189.72:8081/'
-# 洋洋本地
-# VUE_APP_BASE_API = 'http://192.168.1.104:8081/'
-#本地
-# VUE_APP_BASE_API = 'http://192.168.1.55:8084/'
-
-
- 

+ 18 - 0
Dockerfile

@@ -0,0 +1,18 @@
+FROM node:14.0.0 as builder
+WORKDIR /app/tmr-admin
+#拷贝源码
+COPY . .
+#安装依赖
+RUN npm config set sass_binary_site=https://npm.taobao.org/mirrors/node-sass
+RUN npm install
+
+# 开始构建
+RUN npm run build:prod
+
+# 第二阶段构建
+FROM nginx:alpine
+COPY --from=builder /app/tmr-admin/dist/ /usr/share/nginx/html/
+COPY --from=builder /app/tmr-admin/default.conf.template /etc/nginx/conf.d/default.conf
+EXPOSE 80
+
+CMD ["/bin/sh", "-c", "sed -i \"s@<html@<html domain=\"$DOMAIN\"@\" /usr/share/nginx/html/index.html; nginx -g \"daemon off;\""]

+ 1 - 1
README.md

@@ -7,7 +7,7 @@ English | [简体中文](./README-zh.md)
 **Live demo:** http://panjiachen.github.io/vue-admin-template
 
 
-**The current version is `v4.0+` build on `vue-cli`. If you want to use the old version , you can switch branch to [tag/3.11.0](https://github.com/PanJiaChen/vue-admin-template/tree/tag/3.11.0), it does not rely on `vue-cli`**
+**The current version  is `v4.0+` build on `vue-cli`. If you want to use the old version , you can switch branch to [tag/3.11.0](https://github.com/PanJiaChen/vue-admin-template/tree/tag/3.11.0), it does not rely on `vue-cli`**
 
 ## Build Setup
 

+ 26 - 0
default.conf.template

@@ -0,0 +1,26 @@
+server {
+   listen       80;
+   listen  [::]:80;
+   server_name  localhost;
+
+   gzip on;
+   gzip_static on;
+   gzip_comp_level 6;
+   gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
+
+   location / {
+        root /usr/share/nginx/html;
+        #index index.html;
+        try_files $uri $uri/ /index.html;
+        client_max_body_size 300m;   #最大接受300m文件以内的
+        client_body_timeout 20s;
+   }
+   #error_page  404              /404.html;
+
+   # redirect server error pages to the static page /50x.html
+   #
+   error_page   500 502 503 504  /50x.html;
+   location = /50x.html {
+      root   /usr/share/nginx/html;
+   }
+}

BIN
dist.zip


+ 1 - 0
package.json

@@ -26,6 +26,7 @@
     "fuse.js": "3.4.4",
     "js-cookie": "^2.2.0",
     "js-table2excel": "^1.0.3",
+    "md5": "^2.3.0",
     "moment": "^2.24.0",
     "normalize.css": "7.0.0",
     "nprogress": "0.2.0",

+ 3 - 2
src/api/common.js

@@ -9,6 +9,7 @@ export function checkDates(data) {
   })
 }
 
+
 
 export function GetDataByName(data) {
   return request({
@@ -116,7 +117,7 @@ export function GetAccount(data) {
 
 export function postJson(url,data) {
   return request({
-    url: process.env.VUE_APP_BASE_API + url,
+    url: url,
     method: 'post',
     timeout: 600000,
     data
@@ -134,7 +135,7 @@ export function postJson2(url,data) {
 
 export function getJson(url,data) {
   return request({
-    url: process.env.VUE_APP_BASE_API + url + data,
+    url: url + data,
     method: 'get'
   })
 }

BIN
src/assets/images/index/row-r7.png


BIN
src/assets/images/loginImages/btn1.png


BIN
src/assets/images/loginImages/btn2.png


BIN
src/assets/images/loginImages/center_bg1.png


BIN
src/assets/images/loginImages/center_bg2.png


BIN
src/assets/images/loginImages/login_bg1.png


BIN
src/assets/images/loginImages/login_bg2.png


BIN
src/assets/images/loginImages/logo1.png


BIN
src/assets/images/loginImages/logo2.png


+ 1 - 0
src/icons/svg/clear.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1706089269266" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2548" xmlns:xlink="http://www.w3.org/1999/xlink" width="42" height="42"><path d="M901.3 504.8l-76.3-150c-13.4-26.3-40-42.6-69.5-42.6H639c-1.1 0-2-0.9-2-2V120.6c0-31.1-25.3-56.3-56.3-56.3h-90c-31.1 0-56.3 25.3-56.3 56.3v189.6c0 1.1-0.9 2-2 2H315.8c-29.5 0-56.1 16.3-69.5 42.6l-76.3 150c-9.2 18.1-8.4 39.3 2.2 56.6 10.3 16.8 27.9 27 47.4 27.6-4.8 101-38.3 205.9-90.2 279.5-12.5 17.8-14.1 40.8-4.1 60.1 10 19.3 29.7 31.3 51.5 31.3h601.5c35 0 66-23.6 75.2-57.4 15.5-56.5 28.4-107.9 29.4-164.9C884 685 874 636 852.9 589c19-1.1 36.1-11.2 46.2-27.6 10.6-17.3 11.4-38.5 2.2-56.6z m-681.4 25.4l76.3-150c3.8-7.4 11.3-12 19.6-12h116.4c32 0 58-26 58-58V120.6c0-0.1 0.2-0.3 0.3-0.3h90c0.1 0 0.3 0.2 0.3 0.3v189.6c0 32 26 58 58 58h116.4c8.3 0 15.8 4.6 19.6 12l76.3 150c0.2 0.3 0.5 1-0.1 2s-1.3 1-1.7 1H221.7c-0.4 0-1.1 0-1.7-1-0.6-1-0.3-1.7-0.1-2zM827 736.6c-0.9 50.5-12.9 98.3-27.4 151.1-2.6 9.5-11.3 16.2-21.2 16.2H651.8c11.3-22.3 18.5-44 23.1-61.2 7.1-26.7 10.7-53.5 10.6-78-0.1-17.1-15.5-30.1-32.4-27.4-13.6 2.2-23.6 14-23.6 27.8 0.1 42.7-14.1 98.2-42.7 138.8H406.2c15.2-21.7 26.1-43.8 33.6-61.9 10-24.3 17.4-49.7 21.2-72.5 2.8-17-10.4-32.5-27.6-32.5-13.6 0-25.3 9.8-27.6 23.3-2.8 16.6-8.3 37.7-17.7 60.4-10.1 24.6-27.8 58.1-55.6 83.3H176.9c-0.5 0-1.2 0-1.8-1.1-0.6-1.1-0.2-1.6 0.1-2 29.7-42.1 54.8-94.5 72.5-151.4 16.2-52.1 25.7-106.9 28-160.3h514.6C816 635.6 828 684 827 736.6z" fill="" p-id="2549"></path></svg>

+ 1 - 0
src/icons/svg/配方统计.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1706865897438" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1129" xmlns:xlink="http://www.w3.org/1999/xlink" width="42" height="42"><path d="M256 64v64a64 64 0 0 0 56.512 63.552L320 192h384a64 64 0 0 0 63.552-56.512L768 128V64h128a64 64 0 0 1 64 64v832a64 64 0 0 1-64 64H128a64 64 0 0 1-64-64V128a64 64 0 0 1 64-64h128z m416 576h-320a32 32 0 1 0 0 64h320a32 32 0 1 0 0-64z m0-224h-320a32 32 0 0 0 0 64h320a32 32 0 1 0 0-64zM640 0a64 64 0 0 1 0 128H384a64 64 0 1 1 0-128h256z" p-id="1130"></path></svg>

+ 1 - 1
src/main.js

@@ -46,7 +46,7 @@ var pageCount = 50
 if (process.env.NODE_ENV !== 'development') {
   Sentry.init({
     release: 'vislib@' + process.env.npm_package_version,
-    dsn: 'https://9d8ee0ea1a2749949dd1e641b0f7c071@o286322.ingest.sentry.io/5217806',
+    // dsn: 'https://9d8ee0ea1a2749949dd1e641b0f7c071@o286322.ingest.sentry.io/5217806',
     integrations: [new VueIntegration({
       Vue,
       attachProps: true

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

@@ -92,11 +92,12 @@ const mutations = {
 }
 
 const actions = {
-  // user login
+  // user login  
   login({ commit }, userInfo) {
     const { username, password } = userInfo
     return new Promise((resolve, reject) => {
       login({ username: username.trim(), password: password }).then(response => {
+      // login({ username: username.trim(), password: password }).then(response => {
         const { data, msg } = response
         if (msg !== 'ok') {
           Message({
@@ -184,6 +185,7 @@ const actions = {
         Cookies.remove('ispastureuse')
         Cookies.remove('decimal')
         Cookies.remove('decimalr')
+        Cookies.remove('url')
         removeToken()
         resetRouter()
         resolve()

+ 54 - 40
src/utils/request.js

@@ -2,27 +2,38 @@ import axios from 'axios'
 import { MessageBox, Message } from 'element-ui'
 import store from '@/store'
 import { getToken } from '@/utils/auth'
-
-//获取当前url
-
-var aa = process.env.VUE_APP_BASE_API
-//获取当前url
-
-if(aa.indexOf('/')==0 && aa.length==1){
-  aa= window.location.protocol + "//"+window.location.host+aa
-}
-  const service = axios.create({
-    baseURL: aa, // url = base url + request url
-    withCredentials: true, // send cookies when cross-domain requests
-    timeout: 60000 ,// request timeout
-  })
-// request interceptor
+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
+}
+
+var reg =  /(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d)\.(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d)\.(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d)\.(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d)/;
+var browserUrl = window.location.hostname
+console.log("========url===",reg.test(browserUrl))
+if (reg.test(browserUrl)){
+  URL = window.location.protocol +"//"+ browserUrl + ":80/"
+}
+
+Cookies.set('url',URL)
+console.log(process.env.VUE_APP_BASE_API,'===========URL1111')
+console.log(URL,'===========URL')
+
+const service = axios.create({
+  baseURL: URL, // url = base url + request url
+  withCredentials: true, // send cookies when cross-domain requests
+  timeout: 60000 ,// request timeout
+})
+// request interceptor
 service.interceptors.request.use(
   config => {
     // do something before request is sent
     // config.headers['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8'  //此处是增加的代码,设置请求头的类型
     if (process.env.VUE_APP_BASE_API !== '/dev-api') {
-      config.headers['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8'
+      config.headers['Content-Type'] = 'application/json'
       config.withCredentials = false
     }
 
@@ -35,7 +46,7 @@ service.interceptors.request.use(
       } else {
         config.headers['token'] = getToken()
       }
-    }
+    }
     return config
   },
   error => {
@@ -97,30 +108,33 @@ service.interceptors.response.use(
     }
   },
   error => {
-    console.log('err' + error) // for debug
-    let config = error.config
-    if (!config) {
-      Message({ message: error.message, type: 'error', duration: 5 * 1000 })
-      return Promise.reject(error)
-    }
-    console.log('config==>', config) // for debug
-    console.log('config.__retryCount==>', config.__retryCount) // for debug
-    // 设置请求超时次数
+    console.log('err' + error) // for debug
+    let config = error.config
+    if (!config) {
+      Message({ message: error.message, type: 'error', duration: 5 * 1000 })
+      return Promise.reject(error)
+    }
+    console.log('config==>', config) // for debug
+    console.log('config.__retryCount==>', config.__retryCount) // for debug
+    // 设置请求超时次数
     config.__retryCount = config.__retryCount || 0
-    if (config.__retryCount >= 3) {
-      // Message({ message:error.message, type: 'error', duration: 5 * 1000 })
-      Message({ message:'请求超时', type: 'error', duration: 5 * 1000 })
-      // Message.error((error && error.data && error.data.msg) || '请求超时')
-      return Promise.reject(error)
-    }
-    config.__retryCount += 1
-    let backoff = new Promise((resolve) => {
-      setTimeout(() => {
-        resolve()
-      }, config.retryDelay || 1000)
-    })
-    return backoff.then(() => {
-      return service(config)
+    // 君盛牧场不需要多次请求
+    // if (config.__retryCount >= 0) {
+    // 其他牧场失败后需要多次尝试
+    if (config.__retryCount >= 3) {
+      // Message({ message:error.message, type: 'error', duration: 5 * 1000 })
+      Message({ message:'请求超时', type: 'error', duration: 5 * 1000 })
+      // Message.error((error && error.data && error.data.msg) || '请求超时')
+      return Promise.reject(error)
+    }
+    config.__retryCount += 1
+    let backoff = new Promise((resolve) => {
+      setTimeout(() => {
+        resolve()
+      }, config.retryDelay || 1000)
+    })
+    return backoff.then(() => {
+      return service(config)
     })
     // Message({
     //   message: error.message,

+ 12 - 0
src/views/basicData/defaultParameter/function/index.vue

@@ -149,6 +149,16 @@
             <el-input ref="remainOptRate" v-model="createTemp.remainOptRate" :disabled="isRoleEdit==false" class="filter-item" placeholder="剩料分配占比原混料" type="text" />
           </el-form-item>
         </el-col> -->
+        <el-col :span="12">
+          <el-form-item label="允许撒料时间误差(分钟):" prop="sprinkleFeedTimeAllow">
+            <el-input ref="sprinkleFeedTimeAllow" v-model="createTemp.sprinkleFeedTimeAllow" :disabled="isRoleEdit==false" class="filter-item" placeholder="允许撒料时间误差" type="text" />
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="集团端域名或IP:" prop="domain">
+            <el-input ref="domain" v-model="createTemp.domain" :disabled="isRoleEdit==false" class="filter-item" placeholder="集团端域名或IP" type="text" />
+          </el-form-item>
+          </el-col>
         <el-col :span="12">
           <el-form-item label="tmr容量上限(%):" prop="tmrUpper">
             <el-input ref="tmrUpper" v-model="createTemp.tmrUpper" :disabled="isRoleEdit==false" class="filter-item" placeholder="tmr容量上限(%)" type="number" />
@@ -328,6 +338,8 @@ export default {
         isDataSync: this.createTemp.isDataSync,
         anyCar:this.createTemp.anyCar,
         accuracy:this.createTemp.accuracy,
+        sprinkleFeedTimeAllow:this.createTemp.sprinkleFeedTimeAllow,
+        domain:this.createTemp.domain,
         tmrUpper:this.createTemp.tmrUpper,
         tmrUnder:this.createTemp.tmrUnder
       }}

+ 8 - 8
src/views/basicData/equipmentTMR/index.vue

@@ -348,9 +348,9 @@ export default {
         return false
       }
       if (row.autosecond !== '0') {
-        const autozone = /^(?:[0-9]|1[0-9])$/
+        const autozone = /^(0|[1-9]|[1-3]\d|40)$/
         if (!autozone.test(parseFloat(this.table.temp.autozone))) {
-          this.$message({ type: 'error', message: '跳转重量域请输入0-20之间整数', duration: 2000 })
+          this.$message({ type: 'error', message: '跳转重量域请输入0-40之间整数', duration: 2000 })
           return false
         }
       }
@@ -493,12 +493,12 @@ export default {
         return false
       }
       console.log(row.autozone, '=0000')
-      if (row.autosecond !== '0') {
-        const autozone = /^(?:[0-9]|1[0-9])$/
-        if (!autozone.test(parseFloat(this.table.temp.autozone))) {
-          this.$message({ type: 'error', message: '跳转重量域请输入0-20之间整数', duration: 2000 })
-          return false
-        }
+      if (row.autosecond !== '0') {
+        const autozone = /^(0|[1-9]|[1-3]\d|40)$/
+        if (!autozone.test(parseFloat(this.table.temp.autozone))) {
+          this.$message({ type: 'error', message: '跳转重量域请输入0-40之间整数', duration: 2000 })
+          return false
+        }
       }
       const pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]")
       if (pattern.test(this.table.temp.eqcode)) {

+ 46 - 6
src/views/basicData/feedTable/index.vue

@@ -45,7 +45,8 @@
        <div v-else style="display: inline-block;">
         <el-button v-if="isRoleEdit" icon="el-icon-folder-checked" class="success" @click="saveChangeOrder">保存</el-button>
         <el-button v-if="isRoleEdit" icon="el-icon-close" class="sortCancel" @click="cancelChangeOrder">取消</el-button>
-      </div>
+      </div>
+      <el-button v-if="isRoleEdit && ispalyUd" class="success" icon="el-icon-plus" @click="handleGetUd">获取UD饲料</el-button>
       <el-upload style="float: right;" :headers="headers" :data="uploadData" :action="uploadExcelUrl" :show-file-list="false" :before-upload="beforeImport" :on-success="handleImportSuccess">
         <el-button v-if="isRoleEdit" class="import" icon="el-icon-download" style="float: right;">导入</el-button>
       </el-upload>
@@ -86,6 +87,7 @@
         <u-table-column label="物料类型" min-width="90px" align="center" prop="sapMaterialtypeName" />
         <!-- <u-table-column label="SAP货位" min-width="90px" align="center" prop="goods" /> -->
         <u-table-column label="唯一编码" min-width="80px" align="center" prop="feedcode" />
+        <u-table-column label="UD名称" min-width="80px" align="center" prop="udname" />
         <!-- <u-table-column label="SAP编码" min-width="90px" align="center" prop="sapCode" /> -->
         <u-table-column label="饲料来源" min-width="80px" align="center" prop="source" />
         <u-table-column label="计划类型" min-width="80px" align="center" prop="printgroup" />
@@ -984,7 +986,8 @@ export default {
       rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
       cellStyle: { padding: 0 + 'px' },
       dropState: false,
-      isOrder: true,
+      isOrder: true,
+      ispalyUd: true,
       myHeight:document.documentElement.clientHeight - 85- 150
     }
   },
@@ -1014,7 +1017,7 @@ export default {
     },
     // 设置上传地址
     uploadExcelUrl() {
-      return process.env.VUE_APP_BASE_API + 'authdata/ImportExcel'
+      return Cookies.get('url') + 'authdata/ImportExcel'
     }
   },
 
@@ -1032,7 +1035,8 @@ export default {
       }
     })
   },
-  created() {
+  created() {
+    this.getIspalyUd()
     this.getList()
     this.getDownList()
     this.getButtons()
@@ -1912,11 +1916,11 @@ export default {
         this.dialogFull = false
         this.sapCode.dialogStatus = 'sapCode'
         this.sapCode.dialogFormVisible = true
+        this.sapCode.table.getdataListParm.parammaps.MAKTX = this.selectList[0].sapCode
         this.getsapCodeList()
       }
     },
-    getsapCodeList(){
-      this.sapCode.table.getdataListParm.parammaps.MAKTX = this.selectList[0].sapCode
+    getsapCodeList(){
       GetDataByName(this.sapCode.table.getdataListParm).then(response => {
         if (response.data.list !== null) {
           this.sapCode.table.list = response.data.list
@@ -1988,6 +1992,42 @@ export default {
           })
         }
       })
+    },
+    getIspalyUd(){
+      let url = 'authdata/GetDataByName'
+      let data = {
+        "name":"getSysoptEnable","page":1,"offset":1,"pagecount":1,"returntype":"Map",
+        "parammaps":{"pastureid":Cookies.get('pastureid'),"inforname":"gmUdSync"}
+      }
+      postJson(url,data).then(response => {
+        if (response.msg !== 'fail') {
+          if(response.data.list[0].inforvalue == 0){
+            this.ispalyUd = false
+          }else{
+            this.ispalyUd = true
+          }
+        } else {
+          this.$notify({ title: '请求失败', message: response.data, type: 'warning', duration: 2000 })
+        }
+      })
+    },
+    handleGetUd(){
+      MessageBox.confirm('是否获取UD饲料?', {
+        confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
+      }).then(() => {
+        let url = 'authdata/gm/udfeed'
+        let data = {
+          pastureId:Cookies.get('pastureid')
+        }
+        postJson(url,data).then(response => {
+          if (response.msg !== 'fail') {
+            this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+            this.getList()
+          } else {
+            this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+          }
+        })
+      })
     }
   }
 }

+ 80 - 3
src/views/basicData/groupColumn/index.vue

@@ -38,7 +38,8 @@
         <el-button v-if="isRoleEdit" icon="el-icon-folder-checked" class="success" @click="saveChangeOrder">保存</el-button>
         <el-button v-if="isRoleEdit" icon="el-icon-close" class="sortCancel" @click="cancelChangeOrder">取消</el-button>
       </div>
-      <el-button v-if="isRoleEdit" class="success" icon="el-icon-plus" @click="handleGetSapCode">获取SAP编码</el-button>
+      <el-button v-if="isRoleEdit && sapUpload.isSap" class="success" icon="el-icon-plus" @click="handleGetSapCode">获取SAP编码</el-button>
+      <el-button v-if="isRoleEdit && ispalyUd" class="success" icon="el-icon-plus" @click="handleGetUd">获取UD栏舍</el-button>
     </div>
     <div class="table">
       <u-table
@@ -111,6 +112,16 @@
           <template slot-scope="scope">
             <el-switch v-model="scope.row.enable" :disabled="scope.row.NoEdit==true" active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" @change="handleEnableChange(scope.$index, scope.row)" />
           </template>
+        </el-table-column>
+        <el-table-column label="ud编码" min-width="110px" align="center">
+          <template slot-scope="scope">
+            <span>{{scope.row.udcode}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="ud名称" min-width="110px" align="center">
+          <template slot-scope="scope">
+            <span>{{scope.row.udname}}</span>
+          </template>
         </el-table-column>
         <el-table-column label="操作" align="center" width="80" class-name="small-padding fixed-width" fixed="right">
           <template slot-scope="{row}">
@@ -230,6 +241,20 @@ export default {
       textMap: {
         sapCode2: '获取SAP编码',
       },
+      sapUpload:{
+        getdataListParm: {
+          name: 'getSysoptEnable',
+          page: 1,
+          offset: 1,
+          pagecount: 1,
+          returntype: 'Map',
+          parammaps: {
+            pastureid: Cookies.get('pastureid'),
+            inforname: 'xdmyBarSync'
+          }
+        },
+        isSap: false
+      },
       requestParam: {},
       isokDisable: false,
       selectList: [],
@@ -238,15 +263,18 @@ export default {
       rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
       cellStyle: { padding: 0 + 'px' },
       dropState: false,
-      isOrder: true,
+      isOrder: true,
+      ispalyUd: true,
       myHeight:document.documentElement.clientHeight - 85- 150
     }
   },
 
-  created() {
+  created() {
+    this.getIspalyUd()
     this.getList()
     this.getDownList()
     this.getButtons()
+    this.getIsSap()
   },
   mounted() {
     document.addEventListener('click', (e) => {
@@ -262,6 +290,19 @@ export default {
     })
   },
   methods: {
+    getIsSap() {
+      GetDataByName(this.sapUpload.getdataListParm).then(response => {
+        // console.log()
+        if(response.data.list !== null){
+          if(response.data.list[0].inforvalue == 1){
+            this.sapUpload.isSap = true
+          }else{
+            this.sapUpload.isSap = false
+          }
+          console.log(this.sapUpload.isSap)
+        }
+      })
+    },
     getButtons() {
       const Edit = 'GroupColumn'
       const isRoleEdit = checkButtons(JSON.parse(sessionStorage.getItem('buttons')), Edit)
@@ -702,6 +743,42 @@ export default {
           })
         }
       })
+    },
+    getIspalyUd(){
+      let url = 'authdata/GetDataByName'
+      let data = {
+        "name":"getSysoptEnable","page":1,"offset":1,"pagecount":1,"returntype":"Map",
+        "parammaps":{"pastureid":Cookies.get('pastureid'),"inforname":"gmUdSync"}
+      }
+      postJson(url,data).then(response => {
+        if (response.msg !== 'fail') {
+          if(response.data.list[0].inforvalue == 0){
+            this.ispalyUd = false
+          }else{
+            this.ispalyUd = true
+          }
+        } else {
+          this.$notify({ title: '请求失败', message: response.data, type: 'warning', duration: 2000 })
+        }
+      })
+    },
+    handleGetUd(){
+      MessageBox.confirm('是否获取UD栏舍?', {
+        confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
+      }).then(() => {
+        let url = 'authdata/gm/udbar'
+        let data = {
+          pastureId:Cookies.get('pastureid')
+        }
+        postJson(url,data).then(response => {
+          if (response.msg !== 'fail') {
+            this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+            this.getList()
+          } else {
+            this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+          }
+        })
+      })
     }
   }
 }

+ 151 - 2
src/views/basicData/sapLog/index.vue

@@ -26,7 +26,12 @@
         class="elTable table-fixed"
       >
         <el-table-column label="牧场" min-width="90px" align="center" prop="pastureName" />
-        <el-table-column label="数据类型" min-width="90px" align="center"  prop="msgtypeName" />
+        <el-table-column label="数据类型" min-width="90px" align="center"  prop="msgtypeName">
+          <template slot-scope="scope">
+            <span >{{scope.row.msgtypeName}}</span>
+            <!-- <span @click="clickType(scope.row)">{{scope.row.msgtypeName}}</span> -->
+          </template>
+        </el-table-column>
         <el-table-column label="请求参数" min-width="120px" align="center">
           <template slot-scope="scope">
               <el-tooltip placement="top" :open-delay="1000">
@@ -52,7 +57,131 @@
         <el-table-column label="请求地址" min-width="90px" align="center" prop="url" />
         <el-table-column label="创建时间" min-width="90px" align="center" prop="createTime" />
       </el-table>
-    </div>
+    </div>
+
+    <!-- 数据类型 -->
+    <el-dialog :title="textMap[type.dialogStatus]"  :visible.sync="type.dialogFormVisible" :close-on-click-modal="false" width="50%">
+      <div class="app-type">
+        <div class="table" v-if="type.temp.msgtypeName == '搅拌'">
+          <el-table
+            :key="type.table.tableKey"
+            v-loading="type.table.listLoading"
+            element-loading-text="给我一点时间"
+            :data="type.table.list"
+            border
+            fit
+            highlight-current-row
+            style="width: 100%;"
+            :row-style="rowStyle"
+            :cell-style="cellStyle"
+            class="elTable table-fixed"
+          >
+            <el-table-column label="序号" min-width="90px" align="center" prop="pastureName" />
+            <el-table-column label="日期" min-width="90px" align="center" prop="status" />
+            <el-table-column label="班次" min-width="90px" align="center" prop="msgtext" />
+            <el-table-column label="车次" min-width="90px" align="center" prop="url" />
+            <el-table-column label="配方" min-width="90px" align="center" prop="createTime" />
+            <el-table-column label="原料" min-width="90px" align="center" prop="createTime" />
+            <el-table-column label="原料顺序" min-width="90px" align="center" prop="createTime" />
+            <el-table-column label="理论重量" min-width="90px" align="center" prop="createTime" />
+            <el-table-column label="实际重量" min-width="90px" align="center" prop="createTime" />
+            <el-table-column label="开始时间" min-width="90px" align="center" prop="createTime" />
+            <el-table-column label="结束时间" min-width="90px" align="center" prop="createTime" />
+            <el-table-column label="驾驶员" min-width="90px" align="center" prop="createTime" />
+            <el-table-column label="自拌料-饲料顺序" min-width="90px" align="center" prop="createTime" />
+            <el-table-column label="自拌料-饲料名称" min-width="90px" align="center" prop="createTime" />
+            <el-table-column label="自拌料-饲料重量" min-width="90px" align="center" prop="createTime" />
+            <el-table-column label="实际重量修改记录" min-width="90px" align="center" prop="createTime" />
+            <el-table-column label="修改时间" min-width="90px" align="center" prop="createTime" />
+          </el-table>
+        </div>
+        <div class="table" v-else-if="type.temp.msgtypeName == '配方'">
+          <el-table
+            :key="type.table.tableKey"
+            v-loading="type.table.listLoading"
+            element-loading-text="给我一点时间"
+            :data="type.table.list"
+            border
+            fit
+            highlight-current-row
+            style="width: 100%;"
+            :row-style="rowStyle"
+            :cell-style="cellStyle"
+            class="elTable table-fixed"
+          >
+            <el-table-column label="序号" min-width="90px" align="center" prop="pastureName" />
+            <el-table-column label="配方名称" min-width="90px" align="center" prop="status" />
+            <el-table-column label="原料编码" min-width="90px" align="center" prop="msgtext" />
+            <el-table-column label="原料名称" min-width="90px" align="center" prop="url" />
+            <el-table-column label="原料类型" min-width="90px" align="center" prop="createTime" />
+            <el-table-column label="重量" min-width="90px" align="center" prop="createTime" />
+            <el-table-column label="顺序" min-width="90px" align="center" prop="createTime" />
+            <el-table-column label="允许误差" min-width="90px" align="center" prop="createTime" />
+          </el-table>
+        </div>
+        <div class="table" v-else-if="type.temp.msgtypeName == '发料'">
+          <el-table
+            :key="type.table.tableKey"
+            v-loading="type.table.listLoading"
+            element-loading-text="给我一点时间"
+            :data="type.table.list"
+            border
+            fit
+            highlight-current-row
+            style="width: 100%;"
+            :row-style="rowStyle"
+            :cell-style="cellStyle"
+            class="elTable table-fixed"
+          >
+            <el-table-column label="序号" min-width="90px" align="center" prop="pastureName" />
+            <el-table-column label="日期" min-width="90px" align="center" prop="status" />
+            <el-table-column label="班次" min-width="90px" align="center" prop="msgtext" />
+            <el-table-column label="车次" min-width="90px" align="center" prop="url" />
+            <el-table-column label="栏舍" min-width="90px" align="center" prop="createTime" />
+            <el-table-column label="存栏" min-width="90px" align="center" prop="createTime" />
+            <el-table-column label="发料顺序" min-width="90px" align="center" prop="createTime" />
+            <el-table-column label="理论重量" min-width="90px" align="center" prop="createTime" />
+            <el-table-column label="实际重量" min-width="90px" align="center" prop="createTime" />
+            <el-table-column label="开始时间" min-width="90px" align="center" prop="createTime" />
+            <el-table-column label="结束时间" min-width="90px" align="center" prop="createTime" />
+            <el-table-column label="驾驶员" min-width="90px" align="center" prop="createTime" />
+            <el-table-column label="配方名称" min-width="90px" align="center" prop="createTime" />
+            <el-table-column label="饲料顺序" min-width="90px" align="center" prop="createTime" />
+            <el-table-column label="饲料名称" min-width="90px" align="center" prop="createTime" />
+            <el-table-column label="饲料重量" min-width="90px" align="center" prop="createTime" />
+            <el-table-column label="自拌料-饲料顺序" min-width="90px" align="center" prop="createTime" />
+            <el-table-column label="自拌料-饲料名称" min-width="90px" align="center" prop="createTime" />
+            <el-table-column label="自拌料-饲料重量" min-width="90px" align="center" prop="createTime" />
+            <el-table-column label="实际重量修改记录" min-width="90px" align="center" prop="createTime" />
+            <el-table-column label="修改时间" min-width="90px" align="center" prop="createTime" />
+          </el-table>
+        </div>
+        <div class="table" v-else>
+          <el-table
+            :key="type.table.tableKey"
+            v-loading="type.table.listLoading"
+            element-loading-text="给我一点时间"
+            :data="type.table.list"
+            border
+            fit
+            highlight-current-row
+            style="width: 100%;"
+            :row-style="rowStyle"
+            :cell-style="cellStyle"
+            class="elTable table-fixed"
+          >
+            <el-table-column label="序号" min-width="90px" align="center" prop="pastureName" />
+            <el-table-column label="日期" min-width="90px" align="center" prop="status" />
+            <el-table-column label="栏舍" min-width="90px" align="center" prop="msgtext" />
+            <el-table-column label="重量" min-width="90px" align="center" prop="url" />
+          </el-table>
+        </div>
+        <span v-if="type.table.listLoading == false" style="margin-right: 30px;margin-top: 10px;font-size: 14px;">共{{ type.table.total }}条</span>
+        <div slot="footer" class="dialog-footer">
+          <el-button class="cancelClose1" @click="type.dialogFormVisible = false;getList()">关闭</el-button>
+        </div>
+      </div>
+    </el-dialog>
   </div>
 
 </template>
@@ -90,6 +219,20 @@ export default {
         { name: 'getPastureList', offset: 0, pagecount: 0, parammaps: { pastureid: Cookies.get('pastureid') }},
       ],
       dataTypeList:[],pastureList:[],
+      textMap: {
+        type: '搅拌数据类型详情',
+      },
+      type:{
+        dialogFormVisible: false,
+        dialogStatus: '',
+        table:{
+          tableKey: 0,
+          list: [],
+          total: 0,
+          listLoading: false,
+        },
+        temp:{}
+      },
       rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
       cellStyle: { padding: 0 + 'px' },
     }
@@ -137,6 +280,12 @@ export default {
     },
     handleRefresh(){
 
+    },
+    clickType(row){
+      this.type.temp = Object.assign({},row)
+      this.type.temp.msgtypeName = '搅拌'
+      this.type.dialogStatus = 'type'
+      this.type.dialogFormVisible = true
     }
   }
 }

+ 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() {

+ 83 - 48
src/views/dashboard/pasture/index.vue

@@ -88,10 +88,14 @@
           <div class="title">
             <div class="img-title" />
             <span class="content">今日计划统计</span>
-          </div>
+          </div>
+          <b style="margin-left: 20px;">统计类型:</b>
+          <el-select v-model="row2.value" size="mini" placeholder="请选择" style="width: 100px;" @change="changeType">
+            <el-option v-for="item in row2.typeList" :key="item.id" :label="item.name" :value="item.id" />
+          </el-select>
           <div class="todayPlan">
             <div>
-              <div id="row2chartLine1" style="height: 185px;" />
+              <div id="row2chartLine1" style="height: 185px;" v-loading="row1.listLoading" />
               <div class="bottom">
                 <div class="bottom-l">
                   <div class="bottom-l-t">
@@ -112,7 +116,7 @@
               </div>
             </div>
             <div>
-              <div id="row2chartLine2" style="height: 185px;" />
+              <div id="row2chartLine2" style="height: 185px;" v-loading="row1.listLoading"  />
               <div class="bottom">
                 <div class="bottom-l">
                   <div class="bottom-l-t">
@@ -446,7 +450,9 @@ export default {
         listLoading: true,
         list: ''
       },
-      row2: {
+      row2: {
+        value:0,
+        typeList:[{id:0,name:'全部'},{id:1,name:'固定式'},{id:2,name:'抛料车'}],
         chart1: {
           chartLine: null,
           chartLine_data: {}
@@ -633,7 +639,7 @@ export default {
       cellStyle: { padding: 0 + 'px' },
       timer: null,
       clickKey: 0,
-      isClick: false
+      isClick: false,
     }
   },
   watch: {
@@ -700,7 +706,8 @@ export default {
       that.row4.chart2.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
     },
     getList() {
-      this.row1.listLoading = true
+      this.row1.listLoading = true
+      this.row1.getdataListParm.parammaps.lpplantype = this.row2.value
       GetDataByName(this.row1.getdataListParm).then(response => {
         if (response.data !== null && response.data.list !== null) {
           console.log('row1数据', response.data.list)
@@ -718,7 +725,6 @@ export default {
           this.row2.chart1.chartLine_data.data2 = parseFloat(response.data.list[0].planTimes)
           this.row2.chart2.chartLine_data.data1 = parseFloat(response.data.list[0].doneWeight)
           this.row2.chart2.chartLine_data.data2 = parseFloat(response.data.list[0].planWeight)
-
           this.roadChartLine1(this.row2.chart1.chartLine_data)
           this.roadChartLine2(this.row2.chart2.chartLine_data)
         } else {
@@ -739,6 +745,9 @@ export default {
           this.row1.listLoading = false
         }, 100)
       })
+    },
+    changeType(){
+      this.getList()
     },
     // 今日计划统计-完成车次
     roadChartLine1(chartLine_data) {
@@ -878,17 +887,39 @@ export default {
         color: ['#ff0000', '#5199e5', '#fdb06a', '#fb8b73'], // 关键加上这句话,legend的颜色和折线的自定义颜色就一致了
         grid: {
           bottom: '10%'
-        },
-        legend: [{
-          itemWidth: 15, itemHeight: 7, right: '25%', textStyle: { fontSize: 12 },
-          data: [{ name: '设计重量' }, { name: '实际重量' }]
-        }, {
-          itemWidth: 15, itemHeight: 15, right: '0', textStyle: { fontSize: 12 },
-          data: [{ name: '开始重量', icon: 'image://https://kptyun.cn:8081/file/pic/3.png' }, { name: '结束重量', icon: 'image://https://kptyun.cn:8081/file/pic/4.png' }]
+        },
+        legend: [{
+          itemWidth: 15, itemHeight: 7, right: '25%', textStyle: { fontSize: 12 },
+          data: [{ name: '设计重量' }, { name: '实际重量'  }]
+        }, {
+          itemWidth: 5, itemHeight: 5, right: '0', textStyle: { fontSize: 12 },
+          data: [
+            { name: '开始重量' },
+            { name: '结束重量' }
+          ]
         }],
-        tooltip: {
-          trigger: 'axis'
-        },
+        tooltip: {
+          trigger: 'axis',
+          formatter: function(params) {
+            // console.log(params, 'params')
+            var tip = params[0].name
+            for (let i = 0; i < params.length; i++) {
+              if (params[i].seriesName == '设计重量') {
+                tip += '<br>' + params[i].seriesName + ':' + params[i].value[1]
+              }
+              if (params[i].seriesName == '实际重量') {
+                tip += '<br>' + params[i].seriesName + ':' + params[i].value[1]
+              }
+              if (params[i].seriesName == '开始重量') {
+                tip += '<br>' + params[i].seriesName + ':' + params[i].value[1]
+              }
+              if (params[i].seriesName == '结束重量') {
+                tip += '<br>' + params[i].seriesName + ':' + params[i].value[1] + '<br>' + params[i].value[2] + params[i].value[3]
+              }
+            }
+            return tip
+          }
+        },
         calculable: true,
         yAxis: [
           { type: 'value', name: '重量(kg)', splitLine: { show: false }, axisLabel: { show: true, textStyle: { color: '#666' }}}
@@ -910,8 +941,8 @@ export default {
         series: [
           { symbol: 'none', name: '实际重量', type: 'line', data: chartLine_data.data3, itemStyle: { normal: { lineStyle: { color: '#ff0000' ,width:2}}}},
           { symbol: 'none', name: '设计重量', type: 'line',  data: chartLine_data.data2, itemStyle: { normal: { lineStyle: {  width:2}}}},
-          { name: '开始重量', symbol: 'image://https://kptyun.cn:8081/file/pic/3.png', symbolSize: 6, type: 'scatter', data: chartLine_data.data4 },
-          { name: '结束重量', symbol: 'image://https://kptyun.cn:8081/file/pic/4.png', symbolSize: 6, type: 'scatter', data: chartLine_data.data5 }
+          { name: '开始重量', symbolSize: 6, type: 'scatter', data: chartLine_data.data4 },
+          { name: '结束重量', symbolSize: 6, type: 'scatter', data: chartLine_data.data5 }
         ]
       }
       this.row2.chart3.chartLine.setOption(option)
@@ -1083,31 +1114,33 @@ export default {
       this.row3.chart1.listLoading = true
       GetReportform(this.row3.chart1.getdataListParm).then(response => {
         if (response.data !== null && response.data.list !== null) {
-          console.log('计划统计数据', response.data.list)
-          for (let i = 0; i < response.data.data.length; i++) {
-            if (response.data.data[i].实际量 !== '' && response.data.data[i].实际量 !== undefined) {
-              response.data.data[i].实际量 = parseFloat(response.data.data[i].实际量)
-            }
-            if (response.data.data[i].理论量 !== '' && response.data.data[i].理论量 !== undefined) {
-              response.data.data[i].理论量 = parseFloat(response.data.data[i].理论量)
-            }
-            if (response.data.data[i].field1 !== '' && response.data.data[i].field1 !== undefined) {
-              response.data.data[i].field1 = parseFloat(response.data.data[i].field1)
-            }
-            if (response.data.data[i].计划取消重量 !== '' && response.data.data[i].计划取消重量 !== undefined) {
-              response.data.data[i].计划取消重量 = parseFloat(response.data.data[i].计划取消重量)
-            }
-            if (response.data.data[i].field3 !== '' && response.data.data[i].field3 !== undefined) {
-              response.data.data[i].field3 = parseFloat(response.data.data[i].field3)
-            }
-            if (response.data.data[i].正确数 !== '' && response.data.data[i].正确数 !== undefined) {
-              response.data.data[i].正确数 = parseFloat(response.data.data[i].正确数)
-            }
-            if (response.data.data[i].计划数 !== '' && response.data.data[i].计划数 !== undefined) {
-              response.data.data[i].计划数 = parseFloat(response.data.data[i].计划数)
-            }
-            if (response.data.data[i].field2 !== '' && response.data.data[i].field2 !== undefined) {
-              response.data.data[i].field2 = parseFloat(response.data.data[i].field2)
+          console.log('计划统计数据', response.data.list)
+          if(response.data.data){
+            for (let i = 0; i < response.data.data.length; i++) {
+              if (response.data.data[i].实际量 !== '' && response.data.data[i].实际量 !== undefined) {
+                response.data.data[i].实际量 = parseFloat(response.data.data[i].实际量)
+              }
+              if (response.data.data[i].理论量 !== '' && response.data.data[i].理论量 !== undefined) {
+                response.data.data[i].理论量 = parseFloat(response.data.data[i].理论量)
+              }
+              if (response.data.data[i].field1 !== '' && response.data.data[i].field1 !== undefined) {
+                response.data.data[i].field1 = parseFloat(response.data.data[i].field1)
+              }
+              if (response.data.data[i].计划取消重量 !== '' && response.data.data[i].计划取消重量 !== undefined) {
+                response.data.data[i].计划取消重量 = parseFloat(response.data.data[i].计划取消重量)
+              }
+              if (response.data.data[i].field3 !== '' && response.data.data[i].field3 !== undefined) {
+                response.data.data[i].field3 = parseFloat(response.data.data[i].field3)
+              }
+              if (response.data.data[i].正确数 !== '' && response.data.data[i].正确数 !== undefined) {
+                response.data.data[i].正确数 = parseFloat(response.data.data[i].正确数)
+              }
+              if (response.data.data[i].计划数 !== '' && response.data.data[i].计划数 !== undefined) {
+                response.data.data[i].计划数 = parseFloat(response.data.data[i].计划数)
+              }
+              if (response.data.data[i].field2 !== '' && response.data.data[i].field2 !== undefined) {
+                response.data.data[i].field2 = parseFloat(response.data.data[i].field2)
+              }
             }
           }
           this.row3.chart1.table.list = response.data.data
@@ -1309,10 +1342,12 @@ export default {
       this.row4.chart2.listLoading = true
       GetReportform(this.row4.chart2.getdataListParm).then(response => {
         if (response.data !== null && response.data.list !== null) {
-          console.log('混料实际重量统计数据', response.data.list)
-          for (let i = 0; i < response.data.data.length; i++) {
-            if (response.data.data[i].field1 !== '' && response.data.data[i].field1 !== undefined) {
-              response.data.data[i].field1 = parseFloat(response.data.data[i].field1)
+          console.log('混料实际重量统计数据', response.data.data)
+          if(response.data.data){
+            for (let i = 0; i < response.data.data.length; i++) {
+              if (response.data.data[i].field1 !== '' && response.data.data[i].field1 !== undefined) {
+                response.data.data[i].field1 = parseFloat(response.data.data[i].field1)
+              }
             }
           }
           this.row4.chart2.table.list = response.data.data

+ 259 - 15
src/views/formulationPlan/dailyExecutionPlan/index.vue

@@ -51,6 +51,10 @@
         <el-button v-if="dataSynchronization3.isDataSynchronization&&isRoleEdit" class="success" @click="handleDataUpload">数据上传</el-button>
         <el-button v-if="isRoleEdit" class="danger" icon="el-icon-delete" @click="handleDelete">删除</el-button>
         <el-button v-if="isRoleEdit && sapUpload.isSap" class="success" icon="el-icon-upload2" @click="handleSAPUpload">SAP上传</el-button>
+        <el-button v-if="isRoleEdit && ispalyUd" class="success" icon="el-icon-plus" @click="handleGetUd1">搅拌数据上传</el-button>
+        <el-button v-if="isRoleEdit && ispalyUd" class="success" icon="el-icon-plus" @click="handleGetUd2">剩料上传</el-button>
+        <el-button v-if="isRoleEdit && ispalyUd" class="success" icon="el-icon-plus" @click="handleGetUd3">撒料上传</el-button>
+        <el-button v-if="isRoleEdit" class="success" icon="el-icon-circle-check" @click="handleQuickcompletion">快速完成</el-button>
       </div>
       <!-- 日执行计划 -->
       <div class="table">
@@ -70,7 +74,7 @@
           :cell-style="cellStyle"
           class="elTable table-fixed"
           :row-class-name="tableRowClassName"
-          :height="370"
+          :height="myheight"
           @row-click="tableRowClick"
           @selection-change="handleSelect"
         >
@@ -97,8 +101,8 @@
           </el-table-column>
           <el-table-column label="已执行" min-width="70px" align="center">
             <template slot-scope="scope">
-              <span v-if="scope.row.havebutton == 0">否</span>
-              <span v-else>是</span>
+              <div v-if="scope.row.havebutton == 0" style="background: #009A69;color:#fff;line-height:30px;">否</div>
+              <div v-else style="background: #FC2323;color:#000 ;line-height:30px;">是</div>
             </template>
           </el-table-column>
           <el-table-column label="班次" min-width="80px" align="center">
@@ -124,7 +128,7 @@
           </el-table-column>
           <el-table-column label="配方名称" min-width="100px" align="center">
             <template slot-scope="scope">
-              <span>{{ scope.row.ftname }}</span>
+              <b style="font-size: 26px;line-height: 30px;">{{ scope.row.ftname }}</b>
             </template>
           </el-table-column>
           <el-table-column label="牛头数" min-width="80px" align="center">
@@ -145,13 +149,16 @@
           <el-table-column align="center" width="100" label="操作" class-name="small-padding fixed-width" fixed="right">
             <template slot-scope="{row}">
               <el-button class="miniDanger" icon="el-icon-delete" @click="handleRowDelete(row)" />
+              <el-button class="miniDanger" icon="el-icon-sort" @click="handleRowSort(row)" />
             </template>
           </el-table-column>
         </el-table>
         <span v-if="table.listLoading == false" style="margin-right: 30px;margin-top: 10px;font-size: 14px;">共{{ table.total }}条</span>
       </div>
     </div>
-
+<!-- maxHeight="enlargeHeight -->
+  <div v-if="isDetail" style="position: relative;">
+    <el-button class="hide" @click="handleCloseTable2" style="position: absolute;right: 0;top: -20px;">隐藏</el-button>
     <!-- 预混料 -->
     <div v-if="table3.getdataListParm.parammaps.lpplantype == 4" class="content">
       <el-row :gutter="20">
@@ -204,6 +211,10 @@
                     <el-button v-if="row.isUpdateSave" :disabled="isokDisable" icon="el-icon-folder-checked" class="miniSuccess" @click="updateData2(row,'0')" />
                     <span v-if="row.isUpdateSave" class="centerSpan">|</span>
                     <el-button v-if="row.isUpdateSave" class="minCancel" icon="el-icon-close" @click="updateCancel2(row)" />
+                    <span v-if="row.isUpdate && isRoleEdit" class="centerSpan">|</span>
+                    <el-button v-if="row.isUpdate && isRoleEdit" class="miniSuccess" @click="handleRowEmpty(row,0)">
+                      <svg-icon icon-class="clear" />
+                    </el-button>
                   </template>
                 </el-table-column>
               </el-table>
@@ -212,7 +223,6 @@
         </el-col>
       </el-row>
     </div>
-
     <!-- 撒料 -->
     <div v-if="table3.getdataListParm.parammaps.lpplantype == 0" class="content">
       <el-row :gutter="20">
@@ -264,6 +274,10 @@
                     <el-button v-if="row.isUpdateSave" :disabled="isokDisable" icon="el-icon-folder-checked" class="miniSuccess" @click="updateData2(row,'0')" />
                     <span v-if="row.isUpdateSave" class="centerSpan">|</span>
                     <el-button v-if="row.isUpdateSave" class="minCancel" icon="el-icon-close" @click="updateCancel2(row)" />
+                    <span v-if="row.isUpdate && isRoleEdit" class="centerSpan">|</span>
+                    <el-button v-if="row.isUpdate && isRoleEdit" class="miniSuccess" @click="handleRowEmpty(row,0)">
+                      <svg-icon icon-class="clear" />
+                    </el-button>
                   </template>
                 </el-table-column>
               </el-table>
@@ -312,6 +326,10 @@
                     <el-button v-if="row.isUpdateSave" :disabled="isokDisable" icon="el-icon-folder-checked" class="miniSuccess" @click="updateData3(row,'1')" />
                     <span v-if="row.isUpdateSave" class="centerSpan">|</span>
                     <el-button v-if="row.isUpdateSave" class="minCancel" icon="el-icon-close" @click="updateCancel3(row)" />
+                    <span v-if="row.isUpdate && isRoleEdit" class="centerSpan">|</span>
+                    <e<el-button v-if="row.isUpdate && isRoleEdit" class="miniSuccess" @click="handleRowEmpty(row,1)">
+                      <svg-icon icon-class="clear" />
+                    </el-button>
                   </template>
                 </el-table-column>
               </el-table>
@@ -456,6 +474,10 @@
                     <el-button v-if="row.isUpdateSave" :disabled="isokDisable" icon="el-icon-folder-checked" class="miniSuccess" @click="updateData2(row,'0')" />
                     <span v-if="row.isUpdateSave" class="centerSpan">|</span>
                     <el-button v-if="row.isUpdateSave" class="minCancel" icon="el-icon-close" @click="updateCancel2(row)" />
+                    <span v-if="row.isUpdate && isRoleEdit" class="centerSpan">|</span>
+                    <el-button v-if="row.isUpdate && isRoleEdit" class="miniSuccess" @click="handleRowEmpty(row,0)">
+                      <svg-icon icon-class="clear" />
+                    </el-button>
                   </template>
                 </el-table-column>
               </el-table>
@@ -504,6 +526,10 @@
                     <el-button v-if="row.isUpdateSave" :disabled="isokDisable" icon="el-icon-folder-checked" class="miniSuccess" @click="updateData3(row,'1')" />
                     <span v-if="row.isUpdateSave" class="centerSpan">|</span>
                     <el-button v-if="row.isUpdateSave" class="minCancel" icon="el-icon-close" @click="updateCancel3(row)" />
+                    <span v-if="row.isUpdate && isRoleEdit" class="centerSpan">|</span>
+                    <el-button v-if="row.isUpdate && isRoleEdit" class="miniSuccess" @click="handleRowEmpty(row,1)">
+                      <svg-icon icon-class="clear" />
+                    </el-button>
                   </template>
                 </el-table-column>
               </el-table>
@@ -563,6 +589,10 @@
                     <el-button v-if="row.isUpdateSave" :disabled="isokDisable" icon="el-icon-folder-checked" class="miniSuccess" @click="updateData3(row,'0')" />
                     <span v-if="row.isUpdateSave" class="centerSpan">|</span>
                     <el-button v-if="row.isUpdateSave" class="minCancel" icon="el-icon-close" @click="updateCancel3(row)" />
+                    <span v-if="row.isUpdate && isRoleEdit" class="centerSpan">|</span>
+                    <el-button v-if="row.isUpdate && isRoleEdit" class="miniSuccess" @click="handleRowEmpty(row,0)">
+                      <svg-icon icon-class="clear" />
+                    </el-button>
                   </template>
                 </el-table-column>
               </el-table>
@@ -611,6 +641,10 @@
                     <el-button v-if="row.isUpdateSave" :disabled="isokDisable" icon="el-icon-folder-checked" class="miniSuccess" @click="updateData2(row,'1')" />
                     <span v-if="row.isUpdateSave" class="centerSpan">|</span>
                     <el-button v-if="row.isUpdateSave" class="minCancel" icon="el-icon-close" @click="updateCancel2(row)" />
+                    <span v-if="row.isUpdate && isRoleEdit" class="centerSpan">|</span>
+                    <el-button v-if="row.isUpdate && isRoleEdit" class="miniSuccess" @click="handleRowEmpty(row,1)">
+                      <svg-icon icon-class="clear" />
+                    </el-button>
                   </template>
                 </el-table-column>
               </el-table>
@@ -619,7 +653,7 @@
         </el-col>
       </el-row>
     </div>
-
+  </div>
     <!-- 新生成 -->
     <el-dialog :title="textMap[newGeneration.dialogStatus]" :destroy-on-close="true" :visible.sync="newGeneration.dialogFormVisible" :close-on-click-modal="false" width="30%">
       <div class="newGeneration" v-loading="newGenerationLoading" >
@@ -852,7 +886,10 @@
         </el-form>
         <div slot="footer" class="dialog-footer" style="bottom:20px">
           <el-button class="cancelClose" @click="sapUpload.dialogFormVisible = false;getList()">取消</el-button>
-          <el-button class="save" :disabled="isokDisable" @click="sapUploadData()">确认</el-button>
+          <el-button class="save" v-if="sapUpload.dialogStatus == 'sapUpload'" :disabled="isokDisable" @click="sapUploadData()">确认</el-button>
+          <el-button class="save" v-else-if="sapUpload.dialogStatus == 'udload1'" :disabled="isokDisable" @click="udData1()">确认</el-button>
+          <el-button class="save" v-else-if="sapUpload.dialogStatus == 'udload2'" :disabled="isokDisable" @click="udData2()">确认</el-button>
+          <el-button class="save" v-else-if="sapUpload.dialogStatus == 'udload3'" :disabled="isokDisable" @click="udData3()">确认</el-button>
         </div>
       </div>
     </el-dialog>
@@ -873,7 +910,11 @@ export default {
     RevisePlan
   },
   data() {
-    return {
+    return {
+      myheight: document.documentElement.clientHeight - 280,
+      // myheight: 500,
+      enlargeHeight: document.documentElement.clientHeight - 85 - 165 + 50,
+      isDetail:false,
       newGenerationLoading:false,
       dialogFull: false,
       isRoleEdit: [],
@@ -1082,7 +1123,10 @@ export default {
         revisePlan: '修改计划',
         copy: '复制计划',
         deleteRecord:'删除记录',
-        sapUpload:'SAP上传'
+        sapUpload:'SAP上传',
+        udload1:'搅拌数据上传',
+        udload2:'剩料上传',
+        udload3:'撒料上传',
       },
       isokDisable: false,
       requestParam: {},
@@ -1155,12 +1199,14 @@ export default {
             inforname: 'xdmysapupload'
           }
         },
-        isSap: false
-      }
+        isSap: false,
+      },
+      ispalyUd: false
     }
   },
 
-  created() {
+  created() {
+    this.getIspalyUd()
     this.parentDate = this.table.getdataListParm.parammaps.mydate
     console.log(this.parentDate, 'this.parentDate')
     this.getDataSynchronization()
@@ -1543,6 +1589,14 @@ export default {
     tableRowClick(row, column, event) {
       console.log(row, column, event)
       console.log('点击计划类型', row.lpplantype)
+      if (this.isOrder == false) {
+        this.$message({ type: 'error', message: '请保存或取消当前更改顺序操作', duration: 2000 })
+      } else {
+        if (column.label !== '操作') {
+          this.isDetail = true // 点击行显示详情
+          this.myheight = document.documentElement.clientHeight - 85 - 265 - 230
+        }
+      }
       this.table2.getdataListParm.parammaps.havebutton = row.havebutton
       this.table3.getdataListParm.parammaps.havebutton = row.havebutton
       // 撒料计划0/撒料计划-混料1/撒料计划-撒料2/剩料计划3/预混计划4/预称重计划5
@@ -1624,7 +1678,10 @@ export default {
       }
       this.$forceUpdate()
     },
-
+    handleCloseTable2() {
+      this.isDetail = false
+      this.myheight = document.documentElement.clientHeight - 280
+    },
     // 计划内容操作详情
     getList2() {
       this.table2.listLoading = true
@@ -2450,6 +2507,35 @@ export default {
       }).catch(() => {
         this.$message({ type: 'info', message: '已取消删除' })
       })
+    },
+    handleRowSort(row){
+      this.$prompt('由于混料车和撒料车是一体的,插入顺序不能隔开', '排序', {
+        inputPlaceholder:'请输入您要插入的位置',
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        inputPattern: /^\d+$/ ,
+        inputErrorMessage: '请检查插入位置序号是否正确'
+      }).then(({ value }) => {
+        const url = 'authdata/plan/sort/edit'
+        const data = {
+          planId:row.id,
+          mydate:row.mydate,
+          sort:value
+        }
+        postJson(url, data).then(response => {
+          if (response.msg === 'fail') {
+            this.$notify({ title: '失败', message: response.data, type: 'error', duration: 2000 })
+          } else {
+            this.$notify({ title: '成功', message: '成功', type: 'success', duration: 2000 })
+            this.getList()
+          }
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '取消排序'
+        });
+      });
     },
     handleSpan() {
       this.mergekeys.forEach(key => {
@@ -2742,7 +2828,7 @@ export default {
       }
     },
     handleDataUpload(){
-      let a = process.env.VUE_APP_BASE_API
+      let a = Cookies.get('url')
       let b = a.search(8081)
       let c = a.substring(0,a.search(8081)) + '8082'
       let d = a.substring(0,a.lastIndexOf('/'))
@@ -2921,6 +3007,161 @@ export default {
           })
         }
       })
+    },
+    getIspalyUd(){
+      let url = 'authdata/GetDataByName'
+      let data = {
+        "name":"getSysoptEnable","page":1,"offset":1,"pagecount":1,"returntype":"Map",
+        "parammaps":{"pastureid":Cookies.get('pastureid'),"inforname":"gmUdSync"}
+      }
+      postJson(url,data).then(response => {
+        if (response.msg !== 'fail') {
+          if(response.data.list[0].inforvalue == 0){
+            this.ispalyUd = false
+          }else{
+            this.ispalyUd = true
+          }
+        } else {
+          this.$notify({ title: '请求失败', message: response.data, type: 'warning', duration: 2000 })
+        }
+      })
+    },
+    handleGetUd1(){
+     this.sapUpload.dialogStatus = 'udload1'
+     this.sapUpload.dialogFormVisible = true
+    },
+    udData1(){
+      this.$refs['sapUpload'].validate(valid => {
+        if (valid) {
+          let url = 'authdata/gm/udutir/push'
+          let data = {
+            pastureId:Cookies.get('pastureid'),
+            date:parseTime(this.sapUpload.temp.date, '{y}-{m}-{d}')
+          }
+          postJson(url,data).then(response => {
+            if (response.msg !== 'fail') {
+              this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+              this.sapUpload.dialogFormVisible = false
+              this.getList()
+            } else {
+              this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+            }
+          })
+        }
+      })
+    },
+    handleGetUd2(){
+     this.sapUpload.dialogStatus = 'udload2'
+     this.sapUpload.dialogFormVisible = true
+    },
+    udData2(){
+      this.$refs['sapUpload'].validate(valid => {
+        if (valid) {
+          let url = 'authdata/gm/udbarfeedremain/push'
+          let data = {
+            pastureId:Cookies.get('pastureid'),
+            date:parseTime(this.sapUpload.temp.date, '{y}-{m}-{d}')
+          }
+          postJson(url,data).then(response => {
+            if (response.msg !== 'fail') {
+              this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+              this.sapUpload.dialogFormVisible = false
+              this.getList()
+            } else {
+              this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+            }
+          })
+        }
+      })
+    },
+    handleGetUd3(){
+     this.sapUpload.dialogStatus = 'udload3'
+     this.sapUpload.dialogFormVisible = true
+    },
+    udData3(){
+      this.$refs['sapUpload'].validate(valid => {
+        if (valid) {
+          let url = 'authdata/gm/udmaterialIssue/push'
+          let data = {
+            pastureId:Cookies.get('pastureid'),
+            date:parseTime(this.sapUpload.temp.date, '{y}-{m}-{d}')
+          }
+          postJson(url,data).then(response => {
+            if (response.msg !== 'fail') {
+              this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+              this.sapUpload.dialogFormVisible = false
+              this.getList()
+            } else {
+              this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+            }
+          })
+        }
+      })
+    },
+    handleRowEmpty(row,plan){
+      console.log(row,'row')
+      MessageBox.confirm('您确定清空该操作序号以下的所有数据,如果您清空的是搅拌车数据,将会同步清空撒料车数据?', {
+        confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
+      }).then(() => {
+        console.log(this.selectList)
+        this.requestParam.common = { 'returnmap': '0' }
+        this.requestParam.data = []
+        this.requestParam.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.selectList }}
+        this.requestParam.data[0].children = []
+        this.requestParam.data[0].children[0] = { 'name': 'delDownloadedplan', 'type': 'e', 'parammaps': {
+          id: '@insertSpotList.id',
+          pastureid: '@insertSpotList.pastureid'
+        }}
+        const url = 'authdata/PostDataByName'
+        const data = {
+          name:'clearDeleteDownloadedplan',
+          parammaps:{
+            pid:row.pid,
+            lpplantype:this.table3.getdataListParm.parammaps.lpplantype,
+            plan:plan,
+            sort:row.sort
+          }
+        }
+        postJson(url,data).then(response => {
+          console.log('清空保存发送参数', this.requestParam)
+          if (response.msg === 'fail') {
+            this.$notify({ title: '清除失败', message: response.data, type: 'warning', duration: 2000 })
+          } else {
+            this.$notify({ title: '', message: '清除成功', type: 'success', duration: 2000 })
+            // this.getList()
+            this.getList2()
+            this.getList3()
+          }
+        })
+      })
+    },
+    handleQuickcompletion(){
+      if (this.selectList.length == 0) {
+        this.$message({ type: 'error', message: '请先选择计划', duration: 2000 })
+      } else {
+        MessageBox.confirm('您是否确定勾选的状态改为已执行的计划?', {
+          confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
+        }).then(() => {
+          console.log(this.selectList)
+          let arr = []
+          for(let i=0;i<this.selectList.length;i++){
+            arr.push(this.selectList[i].id)
+          }
+          const url = '/authdata/plan/artificial/edit'
+          const data = {
+            planId:arr.join()
+          }
+          postJson(url,data).then(response => {
+            console.log('快速完成保存发送参数', this.requestParam)
+            if (response.msg === 'fail') {
+              this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+            } else {
+              this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
+              this.getList()
+            }
+          })
+        })
+      }
     }
   }
 }
@@ -2968,5 +3209,8 @@ export default {
     position: relative;
     .content-table{margin-top: 20px;}
     .contentOperation{right: -50px;z-index: 1;}
+  }
+  /deep/.el-input.is-disabled .el-input__inner{
+    color:#000
   }
  </style>

+ 77 - 5
src/views/formulationPlan/dailyExecutionPlan/typePage/materialIssuancePlan.vue

@@ -86,6 +86,22 @@
           <template slot-scope="scope">
             <span>{{ scope.row.ftname }}</span>
           </template>
+        </el-table-column>
+        <el-table-column label="物料详情" width="90px" align="center">
+          <template slot-scope="scope">
+            <el-popover
+              placement="bottom"
+              width="400"
+              trigger="click">
+              <b style="text-align: center;width:100%;display:inline-block;">物料详情</b>
+              <el-table :data="materialdetailsList" border height="200">
+                <el-table-column min-width="150" property="fname" label="物料" />
+                <el-table-column min-width="100" property="fweight" label="重量" />
+                <el-table-column min-width="100" property="scale" label="占比" />
+              </el-table>
+              <span slot="reference" style="color: blue;" @click="getmaterialdetailsList(scope.row)">详情</span>
+            </el-popover>
+          </template>
         </el-table-column>
         <el-table-column v-show="isInforvalue" label="是否提前小料拆分" width="70px" align="center">
           <template slot-scope="scope">
@@ -294,10 +310,29 @@
                             >{{ item.barname }}</span>
                             <button style="background: red;float: right;width: 18px;color: #fff;font-size: 18px;border: none;text-align: center;" :disabled="isokDisable" @click="clickBar(item)">√</button>
                           </div>
+                        </el-tooltip>
+                        <el-tooltip placement="bottom" style="height: 18px;line-height: 18px;" :style="{ background: 'rgba('+item.background2+ ',0.1)' }">
+                          <div slot="content">{{ item.weight }}</div>
+                          <div class="barWeight">
+                            <span style="float: left;width: 70px;overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">{{ item.weight }}</span>
+                            <el-popover
+                              placement="right"
+                              width="400"
+                              trigger="click">
+                              <b style="text-align: center;width:100%;display:inline-block;">物料详情</b>
+                              <el-table :data="materialdetailsList" height="200" border>
+                                <el-table-column min-width="150" property="fname" label="物料" />
+                                <el-table-column min-width="100" property="fweight" label="重量" />
+                                <el-table-column min-width="100" property="scale" label="占比" />
+                              </el-table>
+                              <!-- <span  style="color: blue;">详情</span> -->
+                              <button slot="reference" style="background: #ccc;float: right;color: #fff;width: 18px;height:18px;font-size: 16px;border: none;text-align: center;" :disabled="isokDisable">?</button>
+                            </el-popover>
+                          </div>
                         </el-tooltip>
-                        <div class="barWeight" :style="{ background: 'rgba('+item.background2+ ',0.1)' }">
+                        <!-- <div class="barWeight" :style="{ background: 'rgba('+item.background2+ ',0.1)' }">
                           {{ item.weight }}
-                        </div>
+                        </div> -->
                       </div>
                     </div>
                   </li>
@@ -388,6 +423,19 @@
                   </div>
                   <div class="arr-t" :style="{'background':element.background}">
                     <i class="el-icon-close" style="position: absolute;right: 0;" @click="handleFLDelete(element)" />
+                    <el-popover
+                      placement="bottom"
+                      width="400"
+                      height="200"
+                      trigger="click">
+                      <b style="text-align: center;width:100%;display:inline-block;">物料详情</b>
+                      <el-table :data="materialdetailsList" height="200" border>
+                       <el-table-column min-width="150" property="fname" label="物料" />
+                       <el-table-column min-width="100" property="fweight" label="重量" />
+                       <el-table-column min-width="100" property="scale" label="占比" />
+                      </el-table>
+                      <i slot="reference" class="el-icon-question" style="position: absolute;right: 0;top: 20px;"/>
+                    </el-popover>
                   </div>
                 </div>
               </draggable>
@@ -469,7 +517,8 @@ export default {
       cellStyle: {
         padding: 0 + 'px'
       },
-      height: document.body.clientHeight - 220, // table高度
+      height: document.body.clientHeight - 220, // table高度
+      materialdetailsList: [],
       table: {
         getdataListParm: {
           page: 1,
@@ -790,7 +839,12 @@ export default {
     changeTemplateFormulation(item) {
       this.create.temp.ftname = this.templateFormulationList.find(obj => obj.id === item).tname
       this.create.temp.ftvolume = this.templateFormulationList.find(obj => obj.id === item).volume
-      this.getCreateList1()
+      this.getCreateList1()
+      var obj = {
+        'pastureid':this.create.temp.pastureid,
+        'ftid':this.create.temp.ftid
+      }
+      this.getmaterialdetailsList(obj)
     },
     changeTimes(item) {
       this.getCreateList1()
@@ -1337,7 +1391,8 @@ export default {
       this.create.temp.mytmrid = row.tmrid
       console.log('this.create.temp', this.create.temp)
       this.create.checkBarList = []
-      this.getCreateList1()
+      this.getCreateList1()
+      this.getmaterialdetailsList(row)
     },
     updateData() {
       this.$refs['temp'].validate(valid => {
@@ -1865,6 +1920,23 @@ export default {
           }
         })
       })
+    },
+    getmaterialdetailsList(item){
+      let url = 'authdata/GetDataByName'
+      let data  = {
+        name:"getFTdetailList",page:1,offset:1,pagecount:"",returntype:"Map",
+        parammaps:{
+          pastureid:item.pastureid,ftid:item.ftid,
+          // fttypeid:item.fttypeid,
+        }
+      }
+      postJson(url, data).then(response => {
+        if (response.msg !== 'fail') {
+          this.materialdetailsList = response.data.list
+        } else {
+          this.materialdetailsList = []
+        }
+      })
     }
   }
 }

+ 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() {

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 409 - 200
src/views/formulationPlan/dhedFormula/index.vue


+ 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() {

+ 119 - 6
src/views/formulationPlan/materialIssuancePlan/index.vue

@@ -4,7 +4,8 @@
       <el-button v-if="isRoleEdit" class="success" icon="el-icon-plus" style="float:left;" @click="handleCreate">新增车次
       </el-button>
       <el-button v-if="isRoleEdit" class="danger" icon="el-icon-delete" style="float:left;" @click="handleReduceTrains">减少车次</el-button>
-      <el-button v-if="isRoleEdit" class="success" style="float: left;" @click="handleCheck">校验</el-button>
+      <el-button v-if="isRoleEdit && ischeck" class="danger" style="float: left;" @click="handleCheck">校验</el-button>
+      <el-button v-else-if="isRoleEdit && !ischeck" class="success" style="float: left;" @click="handleCheck">校验</el-button>
       <el-button v-if="isRoleEdit" class="success" icon="el-icon-download" style="float:left;" @click="handleAutomaticGeneration">自动生成</el-button>
       <el-button v-if="isOrder && isRoleEdit" icon="el-icon-sort" style="float: left;" class="success" @click="handleChangeOrder">更改顺序</el-button>
       <div v-else style="float: left;margin-left: 10px;">
@@ -88,6 +89,22 @@
             <span>{{ scope.row.ftname }}</span>
           </template>
         </el-table-column>
+        <el-table-column label="物料详情" width="90px" align="center">
+          <template slot-scope="scope">
+            <el-popover
+              placement="bottom"
+              width="400"
+              trigger="click">
+              <b style="text-align: center;width:100%;display:inline-block;">物料详情</b>
+              <el-table :data="materialdetailsList" border height="200">
+                <el-table-column min-width="150" property="fname" label="物料" />
+                <el-table-column min-width="100" property="fweight" label="重量" />
+                <el-table-column min-width="100" property="scale" label="占比" />
+              </el-table>
+              <span slot="reference" style="color: blue;" @click="getmaterialdetailsList(scope.row)">详情</span>
+            </el-popover>
+          </template>
+        </el-table-column>
         <el-table-column v-show="isInforvalue" label="是否提前小料拆分" width="70px" align="center">
           <template slot-scope="scope">
             <el-switch v-model="scope.row.issplit" disabled active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" />
@@ -262,7 +279,27 @@
                             <button style="background: red;float: right;color: #fff;width: 18px;font-size: 18px;border: none;text-align: center;" :disabled="isokDisable" @click="clickBar(item)">√</button>
                           </div>
                         </el-tooltip>
-                        <div class="barWeight" :style="{ background: 'rgba('+item.background2+ ',0.1)' }"> {{ item.weight }} </div>
+                        <el-tooltip placement="bottom" style="height: 18px;line-height: 18px;" :style="{ background: 'rgba('+item.background2+ ',0.1)' }">
+                          <div slot="content">{{ item.weight }}</div>
+                          <div class="barWeight">
+                            <span style="float: left;width: 70px;overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">{{ item.weight }}</span>
+                            <el-popover
+                              placement="right"
+                              width="400"
+                              trigger="click">
+                              <b style="text-align: center;width:100%;display:inline-block;">物料详情</b>
+                              <el-table :data="materialdetailsList" height="200" border>
+                                <el-table-column min-width="150" property="fname" label="物料" />
+                                <el-table-column min-width="100" property="fweight" label="重量" />
+                                <el-table-column min-width="100" property="scale" label="占比" />
+                              </el-table>
+                              <!-- <span  style="color: blue;">详情</span> -->
+                              <button slot="reference" style="background: #ccc;float: right;color: #fff;width: 18px;height:18px;font-size: 16px;border: none;text-align: center;" :disabled="isokDisable">?</button>
+                            </el-popover>
+                          </div>
+                        </el-tooltip>
+                        <!-- <div class="barWeight" :style="{ background: 'rgba('+item.background2+ ',0.1)' }"> {{ item.weight }} </div> -->
+
                       </div>
                     </div>
                   </li>
@@ -280,7 +317,7 @@
           </el-row>
           <!-- 撒料 -->
           <div class="spreadingMaterial">
-            <div>撒料:<el-button type="danger" @click="handleEmpty">清空</el-button></div>
+            <div>撒料:<el-button type="danger" @click="handleEmpty">清空1</el-button></div>
             <div class="spreadingMaterialList">
               <!-- force-fallback="true" -->
               <draggable
@@ -353,6 +390,20 @@
                   </div>
                   <div class="arr-t" :style="{'background':element.background}">
                     <i class="el-icon-close" style="position: absolute;right: 0;" @click="handleFLDelete(element)" />
+                    <el-popover
+                      placement="bottom"
+                      width="400"
+                      height="200"
+                      trigger="click">
+                      <b style="text-align: center;width:100%;display:inline-block;">物料详情</b>
+                      <el-table :data="materialdetailsList" height="200" border>
+                       <el-table-column min-width="150" property="fname" label="物料" />
+                       <el-table-column min-width="100" property="fweight" label="重量" />
+                       <el-table-column min-width="100" property="scale" label="占比" />
+                      </el-table>
+                      <i slot="reference" class="el-icon-question" style="position: absolute;right: 0;top: 20px;"/>
+                    </el-popover>
+                    <!-- <span style="position: absolute;right: 5px;width: 5px;height: 5px;border-radius: 50%;">?</span> -->
                   </div>
                 </div>
               </draggable>
@@ -374,7 +425,7 @@
           <b v-if="item.arrList !== null && item.arrList !== undefined && item.arrList.length>0">{{item.ftname}}:</b>
           <span v-if="item.arrList !== null && item.arrList !== undefined && item.arrList.length>0">
             <span v-for="(item2,index2) in item.arrList" :key="index2">
-              {{item2.barname}}
+              {{item2.barname}}({{item2.weight}}kg)
             </span>
           </span>
         </div>
@@ -449,6 +500,7 @@ export default {
       rowStyle: { maxHeight: 25 + 'px', height: 25 + 'px' },
       cellStyle: { padding: 0 + 'px' },
       height: document.body.clientHeight - 220, // table高度
+      materialdetailsList: [],
       table: {
         getdataListParm: {
           page: 1,
@@ -562,15 +614,47 @@ export default {
           listLoading: false,
         }
       },
-      allEmptySelect:[]
+      allEmptySelect:[],
+      ischeck:false
     }
   },
   created() {
     this.getButtons()
     this.getIsDisplay()
     this.getList()
+    this.getIsCheck()
   },
   methods: {
+    getIsCheck(){
+      const url = 'authdata/GetDataByName'
+      const data = {
+        name:'getSpillageCount',
+        page: 1,
+        offset: 1,
+        pagecount: 0,
+        returntype: 'Map',
+        parammaps: {
+          pastureid: Cookies.get('pastureid'),
+          times: this.table.getdataListParm.parammaps.times,
+          // refresh: 2
+        }
+      }
+      postJson(url, data).then(response => {
+        if (response.data.list !== null) {
+          if(response.data.list[0].count){
+            if(parseFloat(response.data.list[0].count) > 0){
+              this.ischeck = true
+            }else{
+              this.ischeck = false
+            }
+          }else{
+            this.ischeck = false
+          }
+        } else {
+          this.ischeck = false
+        }
+      })
+    },
     getButtons() {
       const Edit = 'MaterialIssuancePlan'
       const isRoleEdit = checkButtons(JSON.parse(sessionStorage.getItem('buttons')), Edit)
@@ -743,6 +827,7 @@ export default {
           }
         }
         this.table.listLoading = false
+        this.getIsCheck()
       })
     },
     changeFrequency(val) {
@@ -788,7 +873,15 @@ export default {
     changeTemplateFormulation(item) {
       this.create.temp.ftname = this.templateFormulationList.find(obj => obj.id === item).tname
       this.create.temp.ftvolume = this.templateFormulationList.find(obj => obj.id === item).volume
+      if(this.create.temp.display == ''){
+        this.create.temp.display = this.create.temp.ftname
+      }
       this.getCreateList1()
+      var obj = {
+        'pastureid':this.create.temp.pastureid,
+        'ftid':this.create.temp.ftid
+      }
+      this.getmaterialdetailsList(obj)
     },
     changeTimes(item) {
       this.getCreateList1()
@@ -1243,13 +1336,16 @@ export default {
       this.create.temp.mytmrid = row.tmrid
       this.create.checkBarList = []
       this.create.temp.mytmrid = row.tmrid
+      if(this.create.temp.display == ''){
+        this.create.temp.display = this.create.temp.ftname
+      }
       if(this.create.temp.volume == undefined || this.create.temp.volume == ''){
         console.log(111)
         this.$set(this.create.temp,'volume',0)
       }
       console.log(this.create.temp,'this.create.temp')
       this.getCreateList1()
-
+      this.getmaterialdetailsList(row)
     },
     updateData() {
       this.$refs['temp'].validate(valid => {
@@ -1786,6 +1882,23 @@ export default {
         //   }
         // })
       }
+    },
+    getmaterialdetailsList(item){
+      let url = 'authdata/GetDataByName'
+      let data  = {
+        name:"getFTdetailList",page:1,offset:1,pagecount:"",returntype:"Map",
+        parammaps:{
+          pastureid:item.pastureid,ftid:item.ftid,
+          // fttypeid:item.fttypeid,
+        }
+      }
+      postJson(url, data).then(response => {
+        if (response.msg !== 'fail') {
+          this.materialdetailsList = response.data.list
+        } else {
+          this.materialdetailsList = []
+        }
+      })
     }
   }
 }

+ 184 - 1019
src/views/formulationPlan/pushMaterialPlan/index.vue

@@ -1,20 +1,17 @@
  <template>
   <div class="app-container">
+    <div class="search">
+      <el-time-picker v-model="table.parammaps.date" style="width: 250px;" value-format="HH:mm:ss" />
+      <el-input v-model="table.parammaps.eqCode" placeholder="车辆编码" style="width: 180px;" class="filter-item" clearable />
+      <!-- <el-select v-model="table.getdataListParm.parammaps.enable" filterable placeholder="是否启用" class="filter-item" style="width: 120px;" clearable>
+        <el-option v-for="item in enableList" :key="item.id" :label="item.name" :value="item.id" />
+      </el-select> -->
+      <el-button class="successBorder" @click="handleRefresh">重置</el-button>
+      <el-button class="successBorder" @click="form_search">查询</el-button>
+    </div>
     <div class="operation">
-
-
-      <el-button v-if="isRoleEdit" class="success" icon="el-icon-plus" style="float: left;" @click="handleCreate1">设置推料时间</el-button>
-      <el-button v-if="isRoleEdit" class="success" icon="el-icon-plus" style="float: left;" @click="handleCreate2">设置允许误差时间</el-button>
-
-
-     <el-button v-if="isRoleEdit" class="success" icon="el-icon-open" style="float: left;" @click="handleTakeEffect">启用</el-button>
-      <el-button v-if="isRoleEdit" class="danger" icon="el-icon-turn-off" style="float: left;" @click="handleDisable">禁用</el-button>
-      <el-button v-if="isRoleEdit" class="success" style="float: left;" @click="handleCheck">校验</el-button>
-
-      <el-button class="import" style="float: right;" @click="handleHistoryRecords">历史记录</el-button>
-
+      <el-button v-if="isRoleEdit" class="success" icon="el-icon-plus" style="float: left;" @click="handleCreate">新增</el-button>
     </div>
-
     <div class="table">
       <el-table
         :key="table.tableKey"
@@ -29,86 +26,31 @@
         :row-style="rowStyle"
         :cell-style="cellStyle"
         class="elTable table-fixed"
-        @header-click="headerClick"
-        @cell-click="cellClick"
         @selection-change="handleSelect"
-        @cell-dblclick="celldblclick"
         :max-height="myHeight"
       >
         <el-table-column type="selection" width="50" />
         <el-table-column :key="1" label="序号" align="center" type="index" width="50px" class-name="small-padding fixed-width" fixed="left" />
-        <el-table-column label="栏舍名称" min-width="100px" align="center" class-name="small-padding fixed-width" fixed="left">
-          <template slot-scope="scope">
-
-            <span  >{{ scope.row.bname }}</span>
-
-          </template>
-        </el-table-column>
-        <el-table-column :key="2" label="推料车名称" min-width="70px" align="center">
-          <template slot-scope="scope">
-            <span v-if="scope.row.NoEdit">{{ scope.row.tmrname }}</span>
-            <el-select v-if="scope.row.Edit" v-model="scope.row.tmrid" filterable placeholder="推料车名称" class="filter-item" style="width:95%;padding:10px 0;" @change="changeTmrCode(scope.$index, scope.row, $event)">
-                  <el-option v-for="item in tmrCodeList" :key="item.id" :label="item.name" :value="item.id" />
-            </el-select>
-          </template>
-        </el-table-column>
-        <el-table-column :key="3" label="推料车编号" min-width="90px" align="center">
-          <template slot-scope="scope">
-            <span  >{{ scope.row.tmrcode }}</span>
-
-          </template>
-        </el-table-column>
-        <el-table-column :key="4" label="推料时间(每天)" min-width="85px" align="center">
-          <template slot-scope="scope">
-            <span v-if="scope.row.NoEdit">{{ scope.row.times }}</span>
-
-            <el-tag v-if="scope.row.Edit" v-for="tag  in  scope.row.timesArr" :key="tag" closable @close="tag_close(scope.$index, scope.row, tag)" type="success">{{tag}}</el-tag>
-
-
-                   <el-time-picker v-if="scope.row.Edit"
-                     v-model="scope.row.times"
-                    :picker-options="{ selectableRange: '00:00:00 - 23:59:59' }"
-                     value-format="HH:mm"
-                     @change="change_time(scope.$index, scope.row, $event)" format="HH:mm"
-                    placeholder="任意时间点">
-                  </el-time-picker>
-
-
-          </template>
-        </el-table-column>
-        <el-table-column :key="5" label="允许误差时间(分钟)" min-width="85px" align="center">
+        <el-table-column label="推料车" min-width="100px" align="center" class-name="small-padding fixed-width" fixed="left" prop="tname" />
+        <el-table-column label="时间" min-width="100px" align="center" prop="date" />
+        <el-table-column label="备注" min-width="100px" align="center" prop="remark" />
+        <el-table-column label="栏舍" min-width="100px" align="center" prop="bname" />
+        <el-table-column label="状态" min-width="90px" align="center">
           <template slot-scope="scope">
-            <span v-if="scope.row.NoEdit">{{ scope.row.allowableerror }}</span>
-            <el-input v-if="scope.row.Edit" v-model="scope.row.allowableerror" type="number" style="width:95%;padding:10px 0;"   />
+            <el-switch v-model="scope.row.enable" :disabled="scope.row.NoEdit==true" active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" @change="handleEnableChange(scope.$index, scope.row)" />
           </template>
         </el-table-column>
 
-
-        <el-table-column label="是否启用" min-width="90px" align="center">
-              <template slot-scope="scope">
-                <el-switch v-model="scope.row.enable" :disabled="scope.row.NoEdit==true" active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0"  />
-              </template>
-        </el-table-column>
-
         <el-table-column label="操作" align="center" width="80" class-name="small-padding fixed-width" fixed="right">
           <template slot-scope="{row}">
-            <el-button v-if="row.isUpdate && isRoleEdit" class="miniSuccess" icon="el-icon-edit-outline" @click="handleUpdate(row)" />
-            <el-button v-if="row.isUpdateSave && isRoleEdit" :disabled="isokDisable" icon="el-icon-folder-checked" class="miniSuccess" @click="updateData(row)" />
-            <span v-if="row.isUpdateSave && isRoleEdit" class="centerSpan">|</span>
-            <el-button v-if="row.isUpdateSave && isRoleEdit" class="minCancel" icon="el-icon-close" @click="updateCancel(row)" />
-
-            <!-- <el-button v-if="isRoleEdit" class="miniDanger" icon="el-icon-delete" @click="handleRowDelete(row)" /> -->
-
+            <el-button v-if="isRoleEdit" class="miniSuccess" icon="el-icon-edit-outline" @click="handleUpdate(row)" />
+            <el-button v-if="isRoleEdit" class="miniDanger" icon="el-icon-delete" @click="handleRowDelete(row)" />
           </template>
         </el-table-column>
       </el-table>
       <span v-if="table.listLoading == false" style="margin-right: 30px;margin-top: 10px;font-size: 14px;">共{{ table.total }}条</span>
-      <!-- <pagination v-show="table.total>=0" :total="table.total" :page.sync="table.getdataListParm.offset" :limit.sync="table.getdataListParm.pagecount" @pagination="getList" /> -->
     </div>
-
-
-
-     <el-dialog :fullscreen="dialogFull" :visible.sync="create1.dialogFormVisible" :close-on-click-modal="false" width="50%">
+     <el-dialog :fullscreen="dialogFull" :visible.sync="create.dialogFormVisible" :close-on-click-modal="false" width="50%">
       <template slot="title">
         <div class="avue-crud__dialog__header">
           <span class="el-dialog__title">
@@ -122,351 +64,106 @@
         </div>
       </template>
       <div class="app-add">
-        <el-form ref="temp" :rules="create1.rules" :model="create1.temp" label-position="right" label-width="155px" style="width: 100%;margin:0 auto 50px">
-
+        <el-form ref="temp" :rules="create.rules" :model="create.temp" label-position="right" label-width="155px" style="width: 100%;margin:0 auto 50px">
           <el-row>
-              <el-col :span="6">
-                <el-form-item label="设置时间:" prop="useinbarid">
-                   <el-time-picker
-                    v-model="timevalue1"
-                    :picker-options="{ selectableRange: '00:00:00 - 23:59:59' }"
-                     value-format="HH:mm"
-                     @change="change_time1" format="HH:mm"
-                    placeholder="任意时间点">
-                  </el-time-picker>
-                </el-form-item>
-              </el-col>
-
+            <el-col :span="12">
+              <el-form-item label="推料车:" prop="tmrId">
+                <el-select v-model="create.temp.tmrId" filterable placeholder="推料车" class="filter-item" style="width: 100%;">
+                  <el-option v-for="item in tmrList" :key="item.id" :label="item.tname" :value="item.id" />
+                </el-select>
+              </el-form-item>
+            </el-col>
           </el-row>
-           <el-row>
-               <el-tag v-for="tag in timetags1" :key="tag.name" closable @close="tag_close1(tag)" type="success">{{tag}}</el-tag>
-
-            </el-row>
-
-
-        </el-form>
-        <div slot="footer" class="dialog-footer">
-          <el-button class="cancelClose" @click="create1.dialogFormVisible = false;getList()">关闭</el-button>
-          <el-button class="save"  @click="create_sure1">确认</el-button>
-        </div>
-      </div>
-    </el-dialog>
-
-
-    <el-dialog :fullscreen="dialogFull" :visible.sync="create2.dialogFormVisible" :close-on-click-modal="false" width="50%">
-      <template slot="title">
-        <div class="avue-crud__dialog__header">
-          <span class="el-dialog__title">
-            <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
-            允许误差时间
-          </span>
-          <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
-            <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
-            <svg-icon v-else icon-class="fullscreen" />
-          </div>
-        </div>
-      </template>
-      <div class="app-add">
-        <el-form ref="temp" :rules="create2.rules" :model="create2.temp" label-position="right" label-width="155px" style="width: 100%;margin:0 auto 50px">
-
           <el-row>
-              <el-col :span="12">
-              <el-form-item label="允许误差时间(分钟):" prop="allowableerror">
-                <el-input ref="time" v-model="create2.temp.allowableerror" class="filter-item" placeholder="请输入" type="text" />
+            <el-col :span="12">
+              <el-form-item label="时间:" prop="date">
+                <el-time-picker v-model="create.temp.date" style="width: 100%;" value-format="HH:mm:ss" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="12">
+              <el-form-item label="备注" prop="remark">
+                <el-input ref="remark" v-model="create.temp.remark" class="filter-item" placeholder="备注" type="text" style="width: 100%;" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="12">
+              <el-form-item label="栏舍:" prop="barId">
+                <el-select v-model="create.temp.barId" multiple  filterable placeholder="栏舍" class="filter-item" style="width: 100%;">
+                  <el-option v-for="item in barList" :key="item.id" :label="item.bname" :value="item.id" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="12">
+              <el-form-item label="状态:" prop="enable">
+                <el-switch v-model="create.temp.enable" active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0"  />
               </el-form-item>
             </el-col>
-
           </el-row>
-
-
-
         </el-form>
         <div slot="footer" class="dialog-footer">
-          <el-button class="cancelClose" @click="create2.dialogFormVisible = false;getList()">关闭</el-button>
-          <el-button class="save"  @click="create_sure2">确认</el-button>
-        </div>
-      </div>
-    </el-dialog>
-
-
-   <!-- 校验 -->
-    <el-dialog title="提示" :destroy-on-close="true" :visible.sync="check.dialogFormVisible" :close-on-click-modal="false" width="30%">
-      <div class="check">
-        <p v-if="check.temp.isDistribution1 == '0'">未启用分配如下:</p>
-        <p v-else>当前栏舍已分配完</p>
-        {{ check.temp.banme1 }}
-
-
-        <p v-if="check.temp.isDistribution2 == '0'">未启用栏舍如下:</p>
-        <p v-else>当前栏舍已全部启用</p>
-        {{ check.temp.banme2 }}
-      </div>
-      <div slot="footer" class="dialog-footer" style="bottom: 10px;">
-        <el-button class="save" @click="check.dialogFormVisible=false;">确认</el-button>
-      </div>
-    </el-dialog>
-
-
-        <!-- 历史记录 -->
-    <el-dialog :fullscreen="dialogFull" :destroy-on-close="true" :visible.sync="history.dialogFormVisible" :close-on-click-modal="false" width="90%">
-      <template slot="title">
-        <div class="avue-crud__dialog__header">
-          <span class="el-dialog__title">
-            <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
-             历史记录
-          </span>
-          <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
-            <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
-            <svg-icon v-else icon-class="fullscreen" />
-          </div>
-        </div>
-      </template>
-      <div class="app-history">
-        <div class="search">
-          <el-date-picker v-model="history.getdataListParm.parammaps.changeTime" type="date" placeholder="请选择历史记录时间" :clearable="false" style="width: 180px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" @change="changeDate" />
-          <!-- <el-button class="successBorder" @click="handleApplication">应用</el-button> -->
-        </div>
-        <div class="table">
-          <el-table
-            :key="history.tableKey"
-            v-loading="history.listLoading"
-            element-loading-text="给我一点时间"
-            :data="history.list"
-            border
-            fit
-            highlight-current-row
-            style="width: 100%;"
-            :row-style="rowStyle"
-            :cell-style="cellStyle"
-            class="elTable table-fixed"
-          >
-
-            <el-table-column label="栏舍名称" min-width="130px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.barname }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="推料车名称" prop="weight" min-width="130px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.tmrname }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="推料车编号" prop="weight" min-width="130px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.tmrcode }}</span>
-              </template>
-            </el-table-column>
-
-
-            <el-table-column label="推料时间(每天)" min-width="130px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.tisms }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="误差时间(分钟)" min-width="180px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.allowableerror }}</span>
-              </template>
-            </el-table-column>
-
-          </el-table>
-          <pagination v-show="history.total>0" :total="history.total" :page.sync="history.getdataListParm.offset" :limit.sync="history.getdataListParm.pagecount" @pagination="getHistoryList" />
+          <el-button class="cancelClose" @click="create.dialogFormVisible = false;getList()">关闭</el-button>
+          <el-button class="save" @click="create.dialogStatus = 'create' ? createData():updateData()" :disabled="isokDisable" >确认</el-button>
         </div>
       </div>
-      <div slot="footer" class="dialog-footer">
-        <el-button class="cancelClose cancelClose1" @click="history.dialogFormVisible = false; ">关闭</el-button>
-      </div>
     </el-dialog>
 
-
-
   </div>
 </template>
 
 <script>
-import { GetDataByName, postJson, GetDataByNames, compareSort, ExecDataByConfig, failproccess, PostDataByName, formatNum, checkButtons, checkDates } from '@/api/common'
-import Pagination from '@/components/Pagination'
-import Pagination2 from '@/components/Pagination2'
-import { parseTime, json2excel, handleTableSpan, handleObjectSpanMethod } from '@/utils/index.js'
+import { GetDataByName, postJson,getJson, formatNum, checkButtons } from '@/api/common'
+import { parseTime} from '@/utils/index.js'
 import { MessageBox } from 'element-ui'
 import Cookies from 'js-cookie'
 import axios from 'axios'
 import { getToken } from '@/utils/auth'
 
 export default {
-  inject: ['reload'],
   name: 'PushMaterialPlan',
-  components: { Pagination, Pagination2 },
   data() {
     return {
-
-
-      history: {
-        dialogFormVisible: false,
-        dialogStatus: '',
-        temp: {},
-        rules: {},
-        tableKey: 0,
-        list: [],
-        total: 0,
-        listLoading: true,
-
-        getdataDateParm: {
-          name: 'getPushingHistoryDate',
-          page: 1,
-          offset: 1,
-          pagecount: 10,
-          returntype: 'Map',
-          parammaps: {
-            pastureid: Cookies.get('pastureid')
-          }
-        },
-        getdataListParm: {
-          name: 'getPushingHistory',
-          page: 1,
-          offset: 1,
-          pagecount: 10,
-          returntype: 'Map',
-          parammaps: {
-            pastureid: Cookies.get('pastureid'),
-            changeTime: ''
-          }
-        }
-      },
-
-      tmrCodeList:[
-        // {Code: "001", id: 46, name: "一号推料车"},
-        //  {Code: "002", id: 47, name: "二号推料车"}
-      ],
       table: {
-        getdataListParm: {
-          name: 'getPushingList',
-          page: 1,
-          offset: 1,
-
-          pagecount: '',
-          returntype: 'Map',
-          parammaps: {
-            pastureid: Cookies.get('pastureid'),
-
-          }
+        parammaps: {
+          pastureid: Cookies.get('pastureid'),
+          date:'',
+          eqCode:''
         },
         tableKey: 0,
         list: [],
         total: 0,
         listLoading: true,
-        temp: {},
-
-
-      },
-
-
-      create1: {
-        dialogFormVisible: false,
-        dialogStatus: '',
-        temp: { pastureid: Cookies.get('pastureid'), fname: ''},
-        rules: {
-          // fname: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }],
-          // fclassid: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }],
-          // feedcode: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }]
-        }
       },
-
-      create2: {
+      create: {
         dialogFormVisible: false,
         dialogStatus: '',
-        temp: { pastureid: Cookies.get('pastureid'), allowableerror: ''},
+        temp: { pastureId: Cookies.get('pastureid'), tmrId: '',date: '',remark: '',barId: '',enable: ''},
         rules: {
-          // fname: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }],
-          // fclassid: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }],
-          // feedcode: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }]
+          tmrId: [{ required: true, message: '必填', trigger: 'blur' }],
+          date: [{ required: true, message: '必填', trigger: 'blur' }],
+          remark: [{ required: true, message: '必填', trigger: 'blur' }],
+          barId: [{ required: true, message: '必填', trigger: 'blur' }],
+          enable: [{ required: true, message: '必填', trigger: 'blur' }]
         }
       },
-
-      check: {
-        dialogFormVisible: false,
-        dialogStatus: '',
-        getCheckParm: {
-          name: 'checkRemainplan',
-          page: 1,
-          offset: 1,
-          pagecount: 10,
-          returntype: 'Map',
-          parammaps: {
-            pastureid: Cookies.get('pastureid')
-          }
-        },
-        temp: {
-          bnames: '',
-          isDistribution1: '',
-          isDistribution2: ''
-        }
-      },
-
-
-
-
-
-      timevalue1: new Date(2022, 9, 10, 18, 40),
-      timetags1: [],
-
-
-
-
       dialogFull: false,
+      tmrList:[],
+      barList:[],
       isRoleEdit: [],
-      headerList: [],
-      pickerMinDate: '',
-
-
-      rules: {
-        cowclassid: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }]
-      },
-
       selectList: [],
-
-
-
-
-      requestParam: {},
-      download: {
-        getdataListParm: {
-          name: 'getFPList',
-          page: 1,
-          offset: 1,
-          pagecount: 0,
-          returntype: 'Map',
-          parammaps: {
-            pastureid: Cookies.get('pastureid'),
-            enable: ''
-          }
-        },
-        list: []
-      },
-      spanObj: {},
-      mergekeys: ['barname', 'sumweight'],
-      isShowDialog: false,
       isokDisable: false,
       rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
       cellStyle: { padding: 0 + 'px' },
       myHeight: document.documentElement.clientHeight - 85- 150,
-      oldRowList:{},
-
-
-
-
-
-
     }
-  },
-  computed: {
-
-
   },
   created() {
     this.getButtons()
-
-    this.getTMRlist()
+    this.getTMR_barList()
     this.getList()
 
   },
@@ -477,695 +174,163 @@ export default {
       const isRoleEdit = checkButtons(JSON.parse(sessionStorage.getItem('buttons')), Edit)
       this.isRoleEdit = isRoleEdit
     },
-
-    getTMRlist() {
-
-      var send_data = {"name":"getPushingTmrList","page":1,"offset":1,"pagecount":"","returntype":"Map","parammaps":{"dictname":"推料车"}}
-      GetDataByName(send_data).then(response => {
+    getTMR_barList() {
+      let url = '/authdata/GetDataByName'
+      let data = {
+        name: 'getTMRList', page: 1, offset: 1,
+        parammaps: {
+          pastureid: Cookies.get('pastureid'),eqtype:'1'
+        }
+      }
+      postJson(url,data).then(response => {
         if (response.data.list !== null) {
-          this.tmrCodeList = response.data.list
+          this.tmrList = response.data.list
         } else {
-          this.tmrCodeList = []
+          this.tmrList = []
+        }
+      })
+      let url2 = '/authdata/GetDataByName'
+      let data2 = {
+        name: 'getBarList', page: 1, offset: 1,
+        parammaps: {
+          pastureid: Cookies.get('pastureid')
+        }
+      }
+      postJson(url2,data2).then(response => {
+        if (response.data.list !== null) {
+          this.barList = response.data.list
+        } else {
+          this.barList = []
         }
-        console.log("tmrCodeList",this.tmrCodeList)
       })
     },
-
-
     getList() {
       this.table.listLoading = true
-      GetDataByName(this.table.getdataListParm).then(response => {
+      let url = '/authdata/tmrequipment'
+      let data = '?pastureId='+ Cookies.get('pastureid') +'&offset=1' + '&page=50'+'&date='+this.table.parammaps.date +'&eqCode='+this.table.parammaps.eqCode
+      getJson(url,data).then(response => {
         console.log('table数据', response.data.list)
         if (response.data.list !== null) {
-          for (let i = 0; i < response.data.list.length; i++) {
-            this.$set(response.data.list[i], 'Edit', false) // 编辑
-            this.$set(response.data.list[i], 'NoEdit', true) // 不可编辑/输入
-            this.$set(response.data.list[i], 'isUpdate', true) // 编辑操作
-            this.$set(response.data.list[i], 'isUpdateSave', false) // 编辑保存
-
-          }
-
-          response.data.list.forEach(function(item){
-            if(item.times !== ""){
-              item.timesArr = item.times.split(',')
-            }else{
-              item.timesArr = []
-            }
-          })
-
-          // console.log(response.data.list, sumr)
-
-          this.table.list = response.data.list
-          console.log(this.table.list, 'this.table.list')
-          this.table.pageNum = response.data.pageNum
-          this.table.pageSize = response.data.pageSize
+          this.table.list = response.data.data
         } else {
           this.table.list = []
         }
-        this.table.total = response.data.total
+        this.table.total = response.data.count
         setTimeout(() => {
           this.table.listLoading = false
         }, 100)
       })
     },
-
-
-    // 推料车
-    changeTmrCode(index,row,item) {
-      console.log("推料车:====",index,row,item)
-      var Code   = this.tmrCodeList.find(obj => obj.id === row.tmrid).Code
-      var itemName   = this.tmrCodeList.find(obj => obj.id === row.tmrid).name
-      console.log( "推料车编号:====",Code , itemName)
-      this.table.list[index].tmrcode = Code
-      this.table.list[index].tmrname = itemName
-
-    },
-
-
-
-
      // 新增
-    handleCreate1() {
-      console.log('点击了新增')
-
-      if (this.selectList.length == 0) {
-        this.$message({ type: 'error', message: '请选择推料信息', duration: 2000 })
-      } else {
-        this.resetTemp1()
-        this.dialogFull = false
-        this.create1.dialogStatus = 'create'
-        this.create1.dialogFormVisible = true
-      }
-
-
-    },
-     resetTemp1() {
-      this.timetags1 = []
-    },
-
-
-    create_sure1(){
-        console.log('timetags1-----',this.timetags1)
-        console.log('selectList-----',this.selectList)
-
-            var timeArrRea = this.timetags1
-
-            var selectArr = this.selectList
-           var idsArr = []
-      selectArr.forEach(function(item){
-              idsArr.push(item.id)
-      })
-
-            var timeIdArr = []
-
-
-            selectArr.forEach(function(item){
-              timeArrRea.forEach(function(items){
-                timeIdArr.push({"time":items,"tmrname":item.tmrname,"tmrid":item.tmrid,"id":item.id})
-              })
-            })
-
-
-            console.log("timeIdArr",timeIdArr)
-
-
-
-            var send_data = {
-              "common":{"returnmap":"0"},
-              "data":[
-										 {
-                       "name":"checkPushing",
-                       "resultmaps":{
-                         "list":timeIdArr
-                        },
-										 "children":[
-                       {
-                         "name":"checkPushing","type":"e","parammaps": {"tmrname":"@checkPushing.tmrname","tmrid":"@checkPushing.tmrid","id":"@checkPushing.id","time":"@checkPushing.time","type":0}
-                         }
-                         ]
-                         }
-              ]}
-
-
-
-
-            var send_data2 = {
-              "common":{"returnmap":"0"},
-              "data":[
-                {"name":"insertPushingHistory","type":"e","parammaps":{"ids":idsArr.join(","),"pastureid":Cookies.get('pastureid')}},
-                {
-                  "name":"delPushingDetailByIds",
-                  "type":"e",
-                  "parammaps":{"ids":idsArr.join(",")}
-                },
-								{
-                  "name":"insertPushingDetail",
-                  "resultmaps":{
-                    "list":timeIdArr
-                  },
-										 "children":[{"name":"insertPushingDetailByPushingId","type":"e","parammaps":
-										 {"pastureid":Cookies.get('pastureid'),"id":"@insertPushingDetail.id","time":"@insertPushingDetail.time","type":0}}]}
-										 ]}
-
-
-
-      checkDates(send_data).then(response => {
-        console.log(response)
-          if (response.data === true) {
-               ExecDataByConfig(send_data2).then(response => {
-                  console.log('设置推料', send_data2)
-                  console.log('设置推料', response)
-                  if (response.msg === 'fail') {
-                    this.$notify({ title: '设置失败', message: response.data, type: 'warning', duration: 2000 })
-                  } else {
-
-                    this.$notify({ title: '设置成功', message: '设置成功', type: 'success', duration: 2000 })
-                    this.create1.dialogFormVisible = false
-                    this.getList()
-
-                  }
-                })
-          } else {
-             this.$notify({ title: '设置失败', message: response.data, type: 'warning', duration: 2000 })
-
-          }
-        })
-
-
-
-    },
-
-    handleCreate2() {
-
-
-      if (this.selectList.length == 0) {
-        this.$message({ type: 'error', message: '请选择推料信息', duration: 2000 })
-      } else {
-        console.log('点击了新增')
-        this.resetTemp2()
-        this.dialogFull = false
-        this.create2.dialogStatus = 'create'
-        this.create2.dialogFormVisible = true
-      }
-    },
-     resetTemp2() {
-      this.create2.temp = { pastureid: Cookies.get('pastureid'),  'allowableerror': '' }
-    },
-
-
-    create_sure2(){
-      console.log(this.selectList)
-      var allowableerror = this.create2.temp.allowableerror
-
-      var selectArr = this.selectList
-      var idsArr = []
-      selectArr.forEach(function(item){
-              idsArr.push(item.id)
-      })
-
-      var send_data = {"name":"updateAllowableerrorByIds","parammaps":{"allowableerror":allowableerror,"ids":idsArr.join(",")}}
-
-      PostDataByName(send_data).then(response => {
-        if (response.msg === 'fail') {
-                this.$notify({ title: '设置失败', message: response.data, type: 'warning', duration: 2000 })
-              } else {
-
-                this.$notify({ title: '设置成功', message: '设置成功', type: 'success', duration: 2000 })
-                this.create2.dialogFormVisible = false
-                this.getList()
-
-              }
-      })
-    },
-
-
-
-
-
-
-
-
-    change_time1(tag){
-      console.log("tag", tag)
-        console.log("timetags1", this.timetags1)
-
-     this.timetags1.push(tag)
-
-    },
-
-
-
-
-    tag_close1(tag){
-        console.log("tag", tag)
-        console.log("timetags1", this.timetags1)
-
-
-        this.timetags1.splice(this.timetags1.indexOf(tag), 1);
-    },
-
-
-
-    change_time(index,row,item){
-        console.log("item", index,row,item)
-
-        this.table.list[index].timesArr.push(item)
-
-
-    },
-    tag_close(index,row,tag){
-        console.log("tag", index,row,tag)
-        this.table.list[index].timesArr.splice(this.table.list[index].timesArr.indexOf(tag), 1);
-
-    },
-
-
-
-    // 校验
-    handleCheck() {
-      console.log('点击了校验')
-      this.check.dialogStatus = 'check'
-      this.check.dialogFormVisible = true
-      this.getCheckList()
-    },
-    getCheckList() {
-      var check_data = {"name":"checkPushingBar","offset":0,"pagecount":0,"parammaps":{"pastureid":Cookies.get('pastureid')}}
-
-      GetDataByName(check_data).then(response => {
-        console.log(response)
-        if (response.data.list[0].banme1 !== undefined) {
-          this.check.temp.isDistribution1 = 0
-          this.check.temp.banme1 = response.data.list[0].banme1
-        } else {
-          this.check.temp.isDistribution1 = 1
-        }
-
-        if (response.data.list[0].banme2 !== undefined) {
-          this.check.temp.isDistribution2 = 0
-          this.check.temp.banme2 = response.data.list[0].banme2
-        } else {
-          this.check.temp.isDistribution2 = 1
-        }
-      })
-    },
-
-    handleTakeEffect() {
-
-      console.log(this.selectList)
-      if (this.selectList.length == 0) {
-        this.$message({ type: 'error', message: '请选择推料信息', duration: 2000 })
-      } else {
-        MessageBox.confirm('当前选中' + this.selectList.length + '条信息,是否生效?', {
-          confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
-        }).then(() => {
-
-
-          var selectArr = this.selectList
-          var idsArr = []
-
-          selectArr.forEach(function(item){
-            idsArr.push(item.id)
-          })
-
-          var send_data =  {
-            "name":"updateEnableByIds",
-            "parammaps":{"enable":"1","ids":idsArr.join(",")}
-          }
-          GetDataByName(send_data).then(response => {
-
-
-             if (response.msg == 'fail') {
-              this.$notify({ title: '生效失败', message: response.data, type: 'warning', duration: 2000 })
-            } else {
-              this.$notify({ title: '', message: '生效成功', type: 'success', duration: 2000 })
-              this.getList()
-            }
-
-          })
-
-        })
-      }
-    },
-    handleDisable() {
-      if (this.selectList.length == 0) {
-        this.$message({ type: 'error', message: '请选择推料信息', duration: 2000 })
-      } else {
-        MessageBox.confirm('当前选中' + this.selectList.length + '条信息,是否禁用?', {
-          confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
-        }).then(() => {
-          var selectArr = this.selectList
-          var idsArr = []
-
-          selectArr.forEach(function(item){
-            idsArr.push(item.id)
-          })
-
-          var send_data =  {
-            "name":"updateEnableByIds",
-            "parammaps":{"enable":"0","ids":idsArr.join(",")}
-          }
-          GetDataByName(send_data).then(response => {
-
-
-             if (response.msg == 'fail') {
-              this.$notify({ title: '禁用失败', message: response.data, type: 'warning', duration: 2000 })
-            } else {
-              this.$notify({ title: '', message: '禁用成功', type: 'success', duration: 2000 })
+    handleCreate() {
+      this.resetTemp()
+      this.dialogFull = false
+      this.create.dialogStatus = 'create'
+      this.create.dialogFormVisible = true
+    },
+    resetTemp() {
+      this.create.temp.tmrId = ''
+      this.create.temp.pastureId = Cookies.get('pastureid')
+      this.create.temp.date = ''
+      this.create.temp.remark = ''
+      this.create.temp.barId = ''
+      this.create.temp.enable = 1
+    },
+    createData(){
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['temp'].validate(valid => {
+        if (valid) {
+          let url = '/authdata/tmrequipment/edit'
+          let data = this.create.temp
+          data.barId = this.create.temp.barId.join()
+          // data.date = parseTime(this.create.temp.date,'{h}:{i}:{s}')
+          postJson(url,data).then(response => {
+            if(response.msg == 'fail'){
+              this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+            }else{
+              this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+              this.create.dialogFormVisible = false
               this.getList()
             }
-
-          })
-        })
-      }
-    },
-
-
-
-
-
-
-    renderHeader(h, { column, $index }) { // h即为cerateElement的简写,具体可看vue官方文档
-      return h(
-        'div',
-        [
-          h('span', column.label),
-          h('i', {
-            class: 'el-icon-unlock',
-            ref: 'el-icon-unlock',
-            style: 'margin-left:5px;'
           })
-        ]
-      )
-    },
-
-    headerClick(column, event) {
-      console.log(column, event)
-      this.headerList.push(event)
-      for (let i = 0; i < this.table.list.length; i++) {
-          if (this.table.list[i].Edit == true) {
-            if (event.target.outerHTML == '<i class="el-icon-unlock" style="margin-left: 5px;"></i>') {
-              event.target.className = 'el-icon-lock'
-              this.$set(this.table.list[i], 'isTwoWeight', true) // 锁住不可编辑
-            } else if (event.target.outerHTML == '<i class="el-icon-lock" style="margin-left: 5px;"></i>') {
-              event.target.className = 'el-icon-unlock'
-              this.$set(this.table.list[i], 'isTwoWeight', false) // 解锁可编辑
-            }
-          }
         }
-    },
-
-
-
-
-
-
-    celldblclick(row, column, cell, event) {
-      console.log(row, '=====')
-      this.handleUpdate(row)
+      })
     },
     // 编辑
     handleUpdate(row) {
-      console.log(row)
-      this.oldRowList = {...row}
-      for (let i = 0; i < this.table.list.length; i++) {
-        if (this.table.list[i].Edit == true) {
-          this.$message({ type: 'error', message: '当前内容未保存,请点击取消或保存继续进行操作', duration: 2000 })
-          return false
-        }
-      }
-      // 编辑true,不可编辑false
-      row.Edit = true
-      row.NoEdit = false
-      // 编辑false,编辑保存true
-      row.isUpdate = false
-      row.isUpdateSave = true
-
+      this.create.temp = Object.assign({},row)
+      this.create.temp.barId = row.barId.split(',')
+      this.dialogFull = false
+      this.create.dialogStatus = 'create'
+      this.create.dialogFormVisible = true
     },
     updateData(row) {
-
-
-      console.log('点击了编辑保存', row)
-
-       row.pastureid =  Cookies.get('pastureid')
-
-
-      if (row.tmrid === '' || row.tmrid == null ) {
-        this.$message({ type: 'error', message: '推料车名称不能为空', duration: 2000 })
-        return false
-      }
-
-     const positiveInteger = /^[0-9]\d*$/
-      if (!positiveInteger.test(parseFloat(row.allowableerror))) {
-        this.$message({
-          type: 'error',
-          message: '允许误差数请输入0-60正整数',
-          duration: 2000
-        })
-        return false
-      } else if(parseFloat(row.allowableerror) > 60){
-        this.$message({
-          type: 'error',
-          message: '允许误差数请输入0-60正整数',
-          duration: 2000
-        })
-        return false
-      }
-
-
-
-
-
-
       this.isokDisable = true
       setTimeout(() => {
         this.isokDisable = false
       }, 1000)
-
-
-      var timeArrRea = row.timesArr
-      var timesTempArr = []
-      timeArrRea.forEach(function(item){
-        timesTempArr.push({"time":item})
+      this.$refs['temp'].validate(valid => {
+        if (valid) {
+          let url = '/authdata/tmrequipment/edit'
+          let data = this.create.temp
+          data.barId = this.create.temp.barId.join()
+          // data.date = parseTime(this.create.temp.date,'{h}:{i}:{s}')
+          postJson(url,data).then(response => {
+            if(response.msg == 'fail'){
+              this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+            }else{
+              this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+              this.create.dialogFormVisible = false
+              this.getList()
+            }
+          })
+        }
       })
-
-      var send_data = {
-        "common":{"returnmap":"0"},
-        "data":[
-          {
-            "name":"checkPushing","resultmaps":{"list":timesTempArr},
-						"children":[
-              {
-                "name":"checkPushing","type":"v",
-                "parammaps": {
-                  "tmrname":row.tmrname,
-                  "tmrid":row.tmrid,
-                  "id":row.id,
-                  "time":"@checkPushing.time",
-                  "type":0
-                }
-              }
-            ]
-          }
-        ]
-      }
-
-
-
-      if(row.id == 0){
-         var send_data2 =  {
-           "common":{"returnmap":"0"},
-           "data":[
-              {"name":"insertPushing","type":"e",
-               "parammaps": row
-              },
-							{"name":"insertPushingDetail",
-              "resultmaps":{
-                "list":timesTempArr
-              },
-							"children":[
-                {
-                  "name":"insertPushingDetail","type":"e","parammaps":
-										 {
-                       "pastureid":Cookies.get('pastureid'),
-                       "barid":row.barid,"time":"@insertPushingDetail.time","type":0}}]}
-										 ]}
-      }else {
-
-        var send_data2 = {
-          "common":{"returnmap":"0"},
-          "data":[
-            {"name":"insertPushingHistory","type":"e","parammaps":{"ids":row.id,"pastureid":Cookies.get('pastureid')}},
-            {"name":"updatePushing","type":"e",
-            "parammaps":row
-            },
-						{"name": "delPushingDetail","type": "e",
-            "parammaps": {"id": row.id }
-            },
-						{"name":"insertPushingDetail",
-            "resultmaps":{"list":timesTempArr},
-						"children":[
-              {"name":"insertPushingDetail","type":"e",
-              "parammaps":
-										 {"pastureid":Cookies.get('pastureid'),
-                       "barid":row.barid,"time":"@insertPushingDetail.time","type":0}}]}
-					]}
-
-      }
-
-
-      checkDates(send_data).then(response => {
-        console.log(response)
-          if (response.data === true) {
-              ExecDataByConfig(send_data2).then(response => {
-                console.log('编辑保存发送参数', send_data2)
-                console.log('编辑保存', response)
-                if (response.msg === 'fail') {
-                  this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
-                } else {
-
-                  this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
-
-                  this.getList()
-
-                }
-              })
-          } else {
-             this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
-
-          }
-        })
-
-
-
     },
-    updateCancel(row) {
-      console.log('点击了编辑取消')
-      // 编辑false,不可编辑true
-      row.Edit = false
-      row.NoEdit = true
-      // 编辑true,编辑保存false
-      row.isUpdate = true
-      row.isUpdateSave = false
-      // this.reload()
-      for (let i = 0; i < this.headerList.length; i++) {
-        if (this.headerList[i].target.className == 'el-icon-lock') {
-          this.headerList[i].target.className = 'el-icon-unlock'
-          this.$set(this.headerList[i].target, 'className', 'el-icon-unlock')
+    handleRowDelete(row){
+      let url = '/authdata/tmrequipment/del'
+      let data = {}
+      data.id = row.id
+      postJson(url,data).then(response => {
+        if(response.msg == 'fail'){
+          this.$notify({ title: '删除失败', message: response.data, type: 'warning', duration: 2000 })
+        }else{
+          this.$notify({ title: '成功', message: '删除成功', type: 'success', duration: 2000 })
+          this.getList()
         }
-      }
-      console.log(this.table.getdataListParm.offset)
-      this.table.getdataListParm.offset = this.table.getdataListParm.offset
-      this.getList()
-      // this.$router.push('/formulationPlan/dhedFormula')
-    },
-    cellClick(row, column, event) {
-      console.log(column)
+      })
     },
     handleSelect(val) {
       console.log('勾选数据', val)
       this.selectList = val
     },
-
-    tableRowClassName({ row }) {
-      // console.log(row)
-      if (row.isColor == '0') {
-        return 'red-row'
-      } else {
-        return ''
-      }
-    },
-
-
-
-
-
-
-    // 历史记录
-    handleHistoryRecords() {
-      console.log('点击了历史记录')
-      this.dialogFull = false
-      this.history.dialogStatus = 'history'
-      this.history.dialogFormVisible = true
-      this.getDateList()
-    },
-    // 历史时间
-    getDateList() {
-      GetDataByName(this.history.getdataDateParm).then(response => {
-        console.log('table数据', response)
-        if (response.data.list !== null) {
-          this.history.getdataListParm.parammaps.changeTime = response.data.list[0].changeTime
-          this.getHistoryList()
-        } else {
-          this.history.getdataListParm.parammaps.changeTime = ''
+    handleEnableChange(index,row) {
+      console.log('点击了是否启用')
+      let url = '/authdata/tmrequipment/edit'
+      let data = row
+      // data.barId = row.barId.join()
+      // data.date = parseTime(this.create.temp.date,'{h}:{i}:{s}')
+      postJson(url,data).then(response => {
+        if(response.msg == 'fail'){
+          this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+        }else{
+          this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+          this.create.dialogFormVisible = false
+          this.getList()
         }
       })
     },
-    changeDate() {
-      this.getHistoryList()
-    },
 
-    getHistoryList() {
-      this.history.listLoading = true
-      GetDataByName(this.history.getdataListParm).then(response => {
-        console.log('table数据', response.data.list)
-        if (response.data.list !== null) {
-          console.log('table数据', response.data.list)
-          this.history.list = response.data.list
-          this.history.pageNum = response.data.pageNum
-          this.history.pageSize = response.data.pageSize
-        } else {
-          this.history.list = []
-        }
-        this.history.total = response.data.total
-        setTimeout(() => {
-          this.history.listLoading = false
-        }, 100)
-      })
-    },
-
-
-    // 应用
-    handleApplication() {
-      console.log('点击了应用')
-      MessageBox.confirm('是否确认将' + this.history.getdataListParm.parammaps.date + '的数据应用到当前?', {
-        confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
-      }).then(() => {
-        this.requestParam.name = 'applyFPdate'
-        this.requestParam.parammaps = {}
-        this.requestParam.parammaps.pastureid = Cookies.get('pastureid')
-        this.requestParam.parammaps.date = this.history.getdataListParm.parammaps.date
-        PostDataByName(this.requestParam).then(response => {
-          if (response.msg === 'fail') {
-            this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
-          } else {
-            this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
-
-            this.getList()
-          }
-        })
-      }).catch(() => {
-        this.$message({ type: 'info', message: '已取消应用' })
-      })
-    },
-
-
-    formatJson(filterVal, jsonData) {
-      return jsonData.map(v =>
-        filterVal.map(j => {
-          if (j === 'timestamp') {
-            return parseTime(v[j])
-          } else {
-            return v[j]
-          }
-        })
-      )
-    },
-
-    blurBw(row) {
-      console.log(row)
+    form_search() {
+      console.log('点击了查询')
+      this.getList()
     },
-    focusBw(row) {
-      console.log(row)
+    handleRefresh(){
+      this.table.parammaps.date = ''
+      this.table.parammaps.eqCode = ''
     }
   }
 }

+ 104 - 29
src/views/formulationPlan/recipeTemplate/index.vue

@@ -41,7 +41,7 @@
         </div>
         <div class="operation">
           <el-button v-if="isRoleEdit" class="success" icon="el-icon-plus" @click="handleCreate">新增</el-button>
-
+          <el-button v-if="isRoleEdit && ispalyUd" class="success" icon="el-icon-plus" @click="handleGetUd">配方上传</el-button>
           <el-upload style="float: right;margin-right: 15px;" :headers="headers" :data="uploadData" :action="uploadExcelUrl" :show-file-list="false" :before-upload="beforeImport" :on-success="handleImportSuccess">
             <el-button v-if="isRoleEdit" class="export" icon="el-icon-download" style="float: right;">导入</el-button>
           </el-upload>
@@ -145,6 +145,12 @@
                 <el-switch v-model="scope.row.enable" :disabled="scope.row.NoEdit==true" active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" @change="handleEnableChange(scope.$index, scope.row)" />
               </template>
             </el-table-column>
+            <el-table-column label="跳转重量域(kg)" min-width="85px" align="center">
+              <template slot-scope="scope">
+                <span v-if="scope.row.NoEdit">{{ scope.row.autozone }}</span>
+                <el-input v-if="scope.row.Edit" v-model="scope.row.autozone" type="textarea" :disabled="scope.row.fttype !=='预混配方'" :autosize="{ minRows: 1.3, maxRows: 4}" style="width:95%;padding:10px 0;" />
+              </template>
+            </el-table-column>
             <el-table-column label="操作" align="center" width="150" class-name="small-padding fixed-width" fixed="right">
               <template slot-scope="{row}">
                 <el-button v-if="row.NoEdit && isRoleEdit && ispastureuse==0" icon="el-icon-tickets" class="miniSuccess" @click="handleRowRecipeRecord(row)" />
@@ -152,7 +158,7 @@
                 <el-button v-if="row.isCreate && isRoleEdit" :disabled="isokDisable" icon="el-icon-folder-checked" class="miniSuccess" @click="createData(row)" />
                 <span v-if="row.isCreate && isRoleEdit" class="centerSpan">|</span>
                 <el-button v-if="row.isCreate && isRoleEdit" class="minCancel" icon="el-icon-close" @click="createCancel(row)" />
-                <el-button v-if="row.isUpdate && isRoleEdit" class="miniSuccess" icon="el-icon-edit-outline" @click="handleUpdate(row)" />
+                <el-button v-if="row.isUpdate && isRoleEdit" :disabled="row.is_modify !== 1"  class="miniSuccess" icon="el-icon-edit-outline" @click="handleUpdate(row)" />
                 <span v-if="row.isUpdate && isRoleEdit" class="centerSpan">|</span>
                 <el-button v-if="row.isUpdate && isRoleEdit" class="miniDanger" icon="el-icon-delete" @click="handleRowDelete(row)" />
                 <el-button v-if="row.isUpdateSave && isRoleEdit" :disabled="isokDisable" icon="el-icon-folder-checked" class="miniSuccess" @click="updateData(row)" />
@@ -171,6 +177,9 @@
         <div class="recipeTemplate">
           <p>配方详情表</p>
         </div>
+          <div style="line-height: 25px;border-bottom: 1px solid #000;margin-bottom: 10px;font-size:16px; font-weight: 600;">
+            <span :style="{color: table2.getdataListParm.parammaps.tcolor}">配方名称:{{table2.getdataListParm.parammaps.tname }}</span><span style="margin: 0 60px;">牲畜类别:{{table2.getdataListParm.parammaps.ccname}}</span><span>配方类型:{{table2.getdataListParm.parammaps.fttype}}</span>
+          </div>
         <div class="operation">
           <el-button v-if="isRoleEdit" style="float: left;" icon="el-icon-plus" class="success" @click="handleCreate2">新增</el-button>
           <el-button v-if="isRoleEdit" style="float: left;" icon="el-icon-delete" class="danger" @click="form_delete2">删除</el-button>
@@ -727,6 +736,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" />
@@ -836,7 +850,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":Cookies.get('pastureid'),"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: {}}
@@ -867,7 +882,7 @@ export default {
             fttypeid: '',
             fttype: '',
             remark: '',
-            enable: '',
+            enable: '1',
             source: ''
           }
         },
@@ -1077,6 +1092,7 @@ export default {
         tableKey: 0, total: 0, listLoading: true, list: []
       },
       isEnlarge: true,
+      ispalyUd: true,
       // enlargeHeight: document.documentElement.clientHeight - 85 - 165 + 50,
       enlargeHeight: document.documentElement.clientHeight - 85 - 165 + 50,
       getTcodeParm: {
@@ -1110,7 +1126,7 @@ export default {
     },
     // 设置上传地址
     uploadExcelUrl() {
-      return process.env.VUE_APP_BASE_API + 'authdata/ImportExcel'
+      return Cookies.get('url') + 'authdata/ImportExcel'
     }
   },
   mounted() {
@@ -1136,6 +1152,7 @@ export default {
     })
   },
   created() {
+    this.getIspalyUd()
     this.getList()
     this.getButtons()
     this.getDownList()
@@ -1214,7 +1231,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
@@ -1300,7 +1322,7 @@ export default {
       this.table.getdataListParm.parammaps.fttype = ''
       this.table.getdataListParm.parammaps.tname = ''
       this.table.getdataListParm.parammaps.remark = ''
-      this.table.getdataListParm.parammaps.enable = ''
+      this.table.getdataListParm.parammaps.enable = '1'
       this.table.getdataListParm.parammaps.source = ''
       this.table.getdataListParm.parammaps.all = ''
       this.getList()
@@ -1316,7 +1338,7 @@ export default {
           return false
         }
       }
-      this.table.list.unshift({ 'myId': (new Date()).valueOf(), 'Edit': true, 'NoEdit': false, 'isCreate': true, 'isUpdate': false, 'isUpdateSave': false, 'enable': 1, 'tname': '', tcode: '', 'tcolor': '#ccc', 'ccid': '', 'ccname': '', 'fttype': '', 'fttypeid': '','volume':'', 'source': '自定义', 'remark': '','cattle':'' })
+      this.table.list.unshift({ 'myId': (new Date()).valueOf(), 'Edit': true, 'NoEdit': false, 'isCreate': true, 'isUpdate': false, 'isUpdateSave': false, 'enable': 1,'autozone':0, 'tname': '', tcode: '', 'tcolor': '#ccc', 'ccid': '', 'ccname': '', 'fttype': '', 'fttypeid': '','volume':'', 'source': '自定义', 'remark': '','cattle':'' })
       console.log('点击了新增this.table.list====>', this.table.list)
       this.table.temp = this.table.list[0]
       this.getTcodeList()
@@ -1352,9 +1374,12 @@ export default {
       this.table.temp.source = row.source
       this.table.temp.remark = row.remark
       this.table.temp.enable = row.enable
-      if(this.table.temp.volume == ''){
+      if(this.table.temp.volume == '' || this.table.temp.volume == null){
         this.table.temp.volume = 0
       }
+      if( isNaN(this.table.temp.autozone) || this.table.temp.autozone == '' || this.table.temp.autozone == undefined){
+        this.table.temp.autozone = 0
+      }
       this.table.temp.volume = parseFloat(row.volume)
       this.table.temp.pastureid = Cookies.get('pastureid')
       if (this.table.temp.tname == '' && this.table.temp.ccid == '' && this.table.temp.fttypeid == '') {
@@ -1478,9 +1503,13 @@ export default {
       this.table.temp.pastureid = row.pastureid
       this.table.temp.id = row.id
       this.table.temp.cattle = row.cattle
-      if(this.table.temp.volume == ''){
+      this.table.temp.autozone = row.autozone
+      if(this.table.temp.volume == '' || this.table.temp.volume == null || this.table.temp.volume == undefined){
         this.table.temp.volume = 0
       }
+      if( isNaN(this.table.temp.autozone) || this.table.temp.autozone == '' || this.table.temp.autozone == undefined){
+        this.table.temp.autozone = 0
+      }
       this.table.temp.volume = parseFloat(row.volume)
       if (this.table.temp.tname == '' && this.table.temp.ccid == '' && this.table.temp.fttypeid == '') {
         this.$message({ type: 'error', message: '配方名称/牲畜类别/配方类型不能为空', duration: 2000 })
@@ -1528,6 +1557,13 @@ export default {
     saveUpdateData() {
       this.requestParam = {}
       this.requestParam.name = 'updateFT'
+      if(this.table.temp.volume == '' || this.table.temp.volume == null || this.table.temp.volume == undefined  ||  isNaN(this.table.temp.volume)){
+        this.table.temp.volume = 0
+      }
+      console.log( this.table.temp.volume,'----')
+      if( isNaN(this.table.temp.autozone) || this.table.temp.autozone == '' || this.table.temp.autozone == undefined){
+        this.table.temp.autozone = 0
+      }
       this.requestParam.parammaps = this.table.temp
       PostDataByName(this.requestParam).then(response => {
         console.log('新增保存发送参数', this.requestParam)
@@ -1581,18 +1617,12 @@ export default {
       MessageBox.confirm('是否确认删除此信息?', {
         confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
       }).then(() => {
-        this.requestParam.common = { 'returnmap': '0' }
-        this.requestParam.data = []
-        this.requestParam.data[0] = { 'name': 'checkdeleteFT', 'type': 'v', 'parammaps': {
-          pastureid: row.pastureid,
-          id: row.id
-        }}
-        this.requestParam.data[1] = { 'name': 'deleteFT', 'type': 'e', 'parammaps': {
-          pastureid: row.pastureid,
-          id: row.id
-        }}
-        ExecDataByConfig(this.requestParam).then(response => {
-          console.log('新增保存发送参数', this.requestParam)
+        const url = 'authdata/feedtemplet/del'
+        const data = {
+          ftId:row.id,
+          userId:Cookies.get('employeid')
+        }
+        postJson(url, data).then(response => {
           if (response.msg === 'fail') {
             this.$notify({ title: '删除失败', message: response.data, type: 'warning', duration: 2000 })
           } else {
@@ -1820,7 +1850,7 @@ export default {
       if (item == 1) {
         console.log('点击了导出模板')
         const requestParam = this.requestParam
-        const url = process.env.VUE_APP_BASE_API + 'file/导入导出模板/配方计划/配方模板导入模板.xlsx' // 请求下载文件的地址
+        const url = Cookies.get('url') + 'file/导入导出模板/配方计划/配方模板导入模板.xlsx' // 请求下载文件的地址
         console.log(url)
         axios({
           method: 'GET',
@@ -1966,6 +1996,10 @@ export default {
       } else {
         if (column.label !== '操作') {
           this.isDetail = true // 点击行显示详情
+          this.table2.getdataListParm.parammaps.tcolor = row.tcolor
+          this.table2.getdataListParm.parammaps.tname = row.tname
+          this.table2.getdataListParm.parammaps.ccname = row.ccname
+          this.table2.getdataListParm.parammaps.fttype = row.fttype
           this.table2.getdataListParm.parammaps.ftid = row.id
           this.table2.getdataListParm.parammaps.fttypeid = row.fttypeid
           this.table2.getdataListParm.parammaps.dryweight = row.dryweight
@@ -1974,7 +2008,7 @@ export default {
           } else {
             this.requestParams[2].parammaps.type = ''
           }
-          this.myheight = document.documentElement.clientHeight - 85 - 265 - 185
+          this.myheight = document.documentElement.clientHeight - 85 - 265 - 230
           this.getList2()
           this.getDownList()
         }
@@ -2496,6 +2530,10 @@ export default {
           setTimeout(() => {
             this.isokDisable = false
           }, 1000)
+          console.log(row.autosecond,'======')
+          if(row.autosecond == null || row.autosecond == undefined || isNaN(row.autosecond)){
+            row.autosecond = '0'
+          }
           this.table2.temp.pastureid = row.pastureid
           this.table2.temp.ftid = this.table2.getdataListParm.parammaps.ftid
           this.table2.temp.fid = row.fid
@@ -2980,7 +3018,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 +3028,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 +3039,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 +3050,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 +3158,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 = []
@@ -3316,6 +3355,42 @@ export default {
           })
         })
       }
+    },
+    getIspalyUd(){
+      let url = 'authdata/GetDataByName'
+      let data = {
+        "name":"getSysoptEnable","page":1,"offset":1,"pagecount":1,"returntype":"Map",
+        "parammaps":{"pastureid":Cookies.get('pastureid'),"inforname":"gmUdSync"}
+      }
+      postJson(url,data).then(response => {
+        if (response.msg !== 'fail') {
+          if(response.data.list[0].inforvalue == 0){
+            this.ispalyUd = false
+          }else{
+            this.ispalyUd = true
+          }
+        } else {
+          this.$notify({ title: '请求失败', message: response.data, type: 'warning', duration: 2000 })
+        }
+      })
+    },
+    handleGetUd(){
+      MessageBox.confirm('是否上传配方?', {
+        confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
+      }).then(() => {
+        let url = 'authdata/gm/udfeedtemplet/push'
+        let data = {
+          pastureId:Cookies.get('pastureid')
+        }
+        postJson(url,data).then(response => {
+          if (response.msg !== 'fail') {
+            this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+            this.getList()
+          } else {
+            this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+          }
+        })
+      })
     }
   }
 }

+ 2 - 2
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() {
@@ -595,7 +595,7 @@ export default {
       if (item == 1) {
         console.log('点击了导出模板')
         const requestParam = this.requestParam
-        const url = process.env.VUE_APP_BASE_API + 'file/导入导出模板/库存管理/饲料合同导入模板.xlsx' // 请求下载文件的地址
+        const url = Cookies.get('url') + 'file/导入导出模板/库存管理/饲料合同导入模板.xlsx' // 请求下载文件的地址
         console.log(url)
         axios({
           method: 'GET',

+ 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() {

+ 2 - 2
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() {
@@ -553,7 +553,7 @@ export default {
       if (item == 1) {
         console.log('点击了导出模板')
         const requestParam = this.requestParam
-        const url = process.env.VUE_APP_BASE_API + 'file/导入导出模板/库存管理/人工用量导入模板.xlsx' // 请求下载文件的地址
+        const url = Cookies.get('url') + 'file/导入导出模板/库存管理/人工用量导入模板.xlsx' // 请求下载文件的地址
         console.log(url)
         axios({
           method: 'GET',

+ 2 - 2
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() {
@@ -1169,7 +1169,7 @@ export default {
       if (item == 1) {
         console.log('点击了导出模板')
         const requestParam = this.requestParam
-        const url = process.env.VUE_APP_BASE_API + 'file/导入导出模板/库存管理/入库导入模板.xlsx' // 请求下载文件的地址
+        const url = Cookies.get('url') + 'file/导入导出模板/库存管理/入库导入模板.xlsx' // 请求下载文件的地址
         console.log(url)
         axios({
           method: 'GET',

+ 12 - 7
src/views/login/index.vue

@@ -49,7 +49,8 @@
 import { validUsername } from '@/utils/validate'
 import Cookies from 'js-cookie'
 import { getToken } from '@/utils/auth'
-import axios from 'axios';
+import axios from 'axios';
+const md5 = require("md5")
 export default {
   name: 'Login',
   data() {
@@ -120,13 +121,17 @@ export default {
       })
     },
     handleLogin() {
+      var obj = {
+        username: this.loginForm.username,
+        password: md5(this.loginForm.password)
+      }
       var rememberStatus = this.rememberPassword
       var accountInfo = this.loginForm.username + '&' + this.loginForm.password
       this.$refs.loginForm.validate(valid => {
         if (valid) {
-          this.loading = true
-          this.$store
-            .dispatch('user/login', this.loginForm).then(() => {
+          this.loading = true
+          this.$store.dispatch('user/login', obj).then(() => {
+          // this.$store.dispatch('user/login', this.loginForm).then(() => {
               if (rememberStatus) {
                 console.log('勾选了记住密码,现在开始写入cookie')
                 Cookies.set('accountInfo', accountInfo, 1440 * 3)
@@ -407,18 +412,18 @@ $bg: #ccc;
 $light_gray: #ccc;
 $cursor: #000;
 .login-container{
-  position: relative;height: 100%;width: 100%;background:  url("../../assets/images/nlogin-bg1.jpg") no-repeat;
+  position: relative;height: 100%;width: 100%;background:  url("../../assets/images/nlogin-bg1.jpg") no-repeat;background-size: cover;
     .new-login{
       width: 50%;height: 42%;position: absolute;left: 0;right: 0;bottom: 0;top: 0;margin: auto;
       .new-login-l{
-        background: red;float:left;height:100%;width:50%;background:  url("../../assets/images/nlogin-bg2.png") no-repeat;position: relative;
+        float:left;height:100%;width:50%;background:  url("../../assets/images/nlogin-bg2.png") no-repeat;position: relative;background-size: cover;
         img{position: absolute;left: 0;right: 0;bottom: 0;top: 0;margin: auto;width: 50%;height:23%;}
       }
       .new-login-r{
         background: #fff;float:left;height:100%;width:50%;position: relative;
         .title{margin-top: 10%;font-size: 20px;font-weight: 600;color: #019969;text-align: center;}
         .login-form{
-          position: relative;width: 520px;max-width: 100%;overflow: hidden;height: 48%;
+          position: relative;width: 520px;overflow: hidden;height: 48%;width: 100%;
           .svg-container{padding: 6px 5px 6px 15px; color: $dark_gray; vertical-align: middle; width: 30px; display: inline-block;}
           .el-input {
             display: inline-block; width: 80%;

+ 446 - 0
src/views/login/index.vue.BASE.vue

@@ -0,0 +1,446 @@
+<template>
+  <div class="login-container">
+    <div class="new-login">
+      <div class="new-login-l">
+        <img src="@/assets/images/logo.png" alt="">
+      </div>
+      <div class="new-login-r">
+        <div class="title">用户登录</div>
+        <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" auto-complete="on" label-position="left">
+          <el-form-item prop="username">
+            <span class="svg-container">
+              <svg-icon icon-class="user" />
+            </span>
+            <el-input ref="username" v-model="loginForm.username" placeholder="用户名" name="username" type="text" tabindex="1" auto-complete="on" />
+          </el-form-item>
+
+          <el-form-item prop="password" class="password">
+            <span class="svg-container">
+              <svg-icon icon-class="password" />
+            </span>
+            <el-input :key="passwordType" ref="password" v-model="loginForm.password" :type="passwordType" placeholder="密码" name="password" tabindex="2" auto-complete="on" @keyup.enter.native="handleLogin" />
+            <span class="show-pwd" @click="showPwd">
+              <svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" />
+            </span>
+          </el-form-item>
+          <el-form-item prop="password" class="rememberPassword">
+            <input id="remember-password-checkbox" v-model="rememberPassword" type="checkbox" value="remember-me" @click="doRememberPassword($event)">
+            <span for="remember-password-checkbox">
+              记住密码
+            </span>
+            </input>
+          </el-form-item>
+        </el-form>
+        <el-button type="text" :loading="loading" class="btn" @click.native.prevent="handleLogin">登录</el-button>
+      </div>
+    </div>
+    <div style="position: absolute;bottom: 0;left: 0;right:0;color: #000;background: #fee; opacity: .7; font-size: 14px;">
+      <p style="text-align:center;line-height:16px;">
+        版权所有
+        <a href="http://www.dairyinfo.com.cn" target="_blank">上海科湃腾信息科技有限公司</a>
+        <a style="margin-left: 20px;" href="https://beian.miit.gov.cn/" target="_blank">沪ICP备11008303号-3 </a>
+      </p>
+
+    </div>
+  </div>
+</template>
+
+<script>
+import { validUsername } from '@/utils/validate'
+import Cookies from 'js-cookie'
+import { getToken } from '@/utils/auth'
+export default {
+  name: 'Login',
+  data() {
+    const validateUsername = (rule, value, callback) => {
+      if (!validUsername(value)) {
+        callback(new Error('请输入正确的用户名'))
+      } else {
+        callback()
+      }
+    }
+    const validatePassword = (rule, value, callback) => {
+      if (value.length < 6) {
+        callback(new Error('密码不能少于6个字符'))
+      } else {
+        callback()
+      }
+    }
+    return {
+      loginForm: {
+        username: '',
+        password: ''
+      },
+      loginRules: {
+        username: [
+          { required: true, trigger: 'blur', validator: validateUsername }
+        ],
+        password: [
+          { required: true, trigger: 'blur', validator: validatePassword }
+        ]
+      },
+      loading: false,
+      passwordType: 'password',
+      redirect: undefined,
+      rememberPassword: ''
+    }
+  },
+  watch: {
+    $route: {
+      handler: function(route) {
+        this.redirect = route.query && route.query.redirect
+      },
+      immediate: true
+    }
+  },
+  created() {
+    var that = this
+    document.onkeydown = function(e) {
+      e = window.event || e
+      // eslint-disable-next-line eqeqeq
+      if (that.$route.path == '/login' && (e.code == 'Enter' || e.code == 'Num Enter')) { // 验证在登录界面和按得键是回车键enter
+        that.handleLogin('ruleForm2') // 登录函数 (handleSubmit2('ruleForm2')-登录按钮的点击事件)
+      }
+    }
+  },
+  mounted: function() {
+    // 读取cookie中的账号信息,如果有accountInfo的话,则说明该用户之前勾选了记住密码的功能,则需要自动填上账号密码
+    this.loadAccountInfo()
+  },
+  methods: {
+    showPwd() {
+      if (this.passwordType === 'password') {
+        this.passwordType = ''
+      } else {
+        this.passwordType = 'password'
+      }
+      this.$nextTick(() => {
+        this.$refs.password.focus()
+      })
+    },
+    handleLogin() {
+      var rememberStatus = this.rememberPassword
+      var accountInfo = this.loginForm.username + '&' + this.loginForm.password
+      this.$refs.loginForm.validate(valid => {
+        if (valid) {
+          this.loading = true
+          this.$store
+            .dispatch('user/login', this.loginForm).then(() => {
+              if (rememberStatus) {
+                console.log('勾选了记住密码,现在开始写入cookie')
+                Cookies.set('accountInfo', accountInfo, 1440 * 3)
+              } else {
+                console.log('没有勾选记住密码,现在开始删除账号cookie')
+                Cookies.remove('accountInfo')
+              }
+
+              // 若为本地环境 则手写cookie
+              if (window.location.href.indexOf('localhost') != -1) {
+                Cookies.set('token', getToken(), 1440)
+              }
+              this.$router.push({ path: this.redirect || '/' })
+              this.loading = false
+            })
+            .catch(() => {
+              this.loading = false
+            })
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    doRememberPassword() {
+      const rememberStatus = this.rememberPassword
+      this.rememberPassword = !rememberStatus
+    },
+    loadAccountInfo: function() {
+      const _this = this
+      // zhaopeng&A15hOsu8YeGnCsjb
+      const accountInfo = Cookies.get('accountInfo')
+      // 如果cookie里没有账号信息
+      if (Boolean(accountInfo) == false) {
+        console.log('cookie中没有检测到账号信息!')
+        return false
+      } else {
+        // 如果cookie里有账号信息
+        console.log('cookie中检测到账号信息!现在开始预填写!')
+        let userName = ''
+        let passWord = ''
+        const index = accountInfo.indexOf('&')
+
+        userName = accountInfo.substring(0, index)
+        passWord = accountInfo.substring(index + 1)
+        // this.loginForm.username + '&' + this.loginForm.password
+        _this.loginForm.username = userName
+        _this.loginForm.password = passWord
+        _this.rememberPassword = true
+      }
+    }
+  }
+}
+</script>
+
+<style lang="scss">
+/* 修复input 背景不协调 和光标变色 */
+/* Detail see https://github.com/PanJiaChen/vue-element-admin/pull/927 */
+
+// $bg: #283443;
+// $light_gray: #fff;
+// $cursor: #fff;
+// 更改
+// $bg: #ccc;
+// $light_gray: #ccc;
+// $cursor: #000;
+// @supports (-webkit-mask: none) and (not (cater-color: $cursor)) {
+//   .login-container .el-input input {
+//     color: $cursor;
+//   }
+// }
+// .login-container {
+//   min-height: 232px;
+//   .el-input {
+//     display: inline-block;
+//     height: 38px;
+//     width: 80%;
+
+//     input {
+//       background: #fff;
+//       border: 0px;
+//       -webkit-appearance: none;
+//       border-radius: 0px;
+//       padding: 5px 5px 5px 15px;
+//       color: #000;
+//       height: 16.7%;
+//       caret-color: $cursor;
+
+//       &:-webkit-autofill {
+//         box-shadow: 0 0 0px 1000px $bg inset !important;
+//         -webkit-text-fill-color: $cursor !important;
+//       }
+//     }
+//   }
+//   .el-form-item {
+//       border: 1px solid rgba(255, 255, 255, 0.1);
+//       background: #fff;
+//       border-radius: 5px;
+//       color: #999;
+//       width: 73%;
+//       margin: 10px auto;
+//       .el-form-item__content {
+//         line-height: 16%;
+//         border-bottom: 1px solid #e7e7e7;
+//       }
+
+//     }
+//     .rememberPassword{
+//       .el-form-item__content {
+//         line-height:16%;
+//         border: none;
+//         span{padding-left: 5px;}
+//       }
+
+//     }
+//     .password{
+//       margin-top: 20px;margin-bottom: 15px;
+//     }
+//     .btn{
+//       position: relative;
+//       width: 520px;
+//       max-width: 100%;
+//       overflow: hidden;
+//     }
+//     .btn  span{width:72%;background:#01996a;border: #01996a;border-radius: 5px;line-height: 40px; text-align: center;color:#fff; margin: 0 auto;display: block;}
+
+//   }
+
+</style>
+
+/* <style>
+
+.login-container .el-input input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
+    -webkit-box-shadow: 0 0 0px 1000px #fff inset !important;
+    box-shadow: 0 0 0px 1000px #fff inset !important;
+    -webkit-text-fill-color: #000 !important;
+}
+
+</style> */
+// <style lang="scss" scoped>
+// $bg: #2d3a4b;
+// $dark_gray: #999;
+// $light_gray: #000;
+
+// .login-container {
+//   min-height: 100%;
+//   width: 100%;
+//   height: 100%;
+//   position: relative;
+//   background: url("../../assets/images/nlogin-bg.png") no-repeat;
+//   background-size:100%;
+//   overflow: hidden;
+//   .login {
+//     border-radius: 5%;
+//     padding: 30px;
+//     background: rgba(0,0,0,0.4);
+//     width: 380px;
+//     height: 340px;
+//     position: relative;
+//     top: 50%;
+//     left: 50%;
+//     margin-left: -190px;
+//     margin-top: -270px;
+//     box-shadow:0px 0px 10px #fff;
+//     .login-form {
+//       margin-top: 60px;
+//       position: relative;
+//       width: 520px;
+//       max-width: 100%;
+//       overflow: hidden;
+//     }
+
+//     .tips {
+//       font-size: 14px;
+//       color: #fff;
+//       margin-bottom: 10px;
+
+//       span {
+//         &:first-of-type {
+//           margin-right: 16px;
+//         }
+//       }
+//     }
+
+//     .svg-container {
+//       padding: 6px 5px 6px 15px;
+//       color: $dark_gray;
+//       vertical-align: middle;
+//       width: 30px;
+//       display: inline-block;
+//     }
+
+//       .title {
+//         font-size: 26px;
+//         color: $light_gray;
+//         margin: 0px auto 0 auto;
+//         text-align: center;
+//         font-weight: bold;
+//       }
+//       b {
+//         text-align: center;
+//         font: 14px/2 "";
+//       }
+
+//     .show-pwd {
+//       position: absolute;
+//       right: 10px;
+//       top: 7px;
+//       font-size: 16px;
+//       color: $dark_gray;
+//       cursor: pointer;
+//       user-select: none;
+//     }
+
+//     .kpt{text-align: center;color: #fff;display: inline-block;width: 100%;font:12px/18px '';}
+//   }
+// }
+// </style>
+// <style lang="scss" scoped>
+//   .login-container {
+//     width: 100vw;
+//     height: 100vh;
+//     display: flex;
+//     justify-content: center;
+//     align-items: center;
+//     .new-login{
+//       width: 57%;
+//       height: 43%;
+//       display: flex;
+//       .new-login-l{
+//         flex: 1 1;
+//         width: 50%;
+//         background:  url("../../assets/images/nlogin-bg2.png") no-repeat;
+//         position: relative;
+//         .new-login-l-t{
+//           width: 34%;
+//           height: 13%;
+//           position: absolute;
+//           top: 36%;
+//           left: 32%;
+//           right: 0;
+//           bottom: 0;
+//         }
+//         .new-login-l-b{
+//           position: absolute;
+//           // 138,263
+//           width: 40%;
+//           // height: 5%;
+//           top: 56%;
+//           left: 30%;
+//           // right: 0;
+//           // bottom: 0;
+//         }
+//       }
+//       .new-login-r{
+//         flex: 1 1;
+//         width: 50%;
+//         background:  url("../../assets/images/nlogin-bg3.png") no-repeat;
+//         position: relative;
+//         .title{
+//           text-align: center;
+//           font-size: 26px;
+//           font-weight: 700;
+//           color: #01996a;
+//           padding-top: 10%;
+//           padding-bottom: 3%;
+//         }
+//         .btn {position: absolute;bottom: 10%;}
+//       }
+//     }
+//   }
+// </style>
+<style lang="scss" scoped>
+$bg: #2d3a4b;
+$dark_gray: #999;
+$light_gray: #000;
+$bg: #ccc;
+$light_gray: #ccc;
+$cursor: #000;
+.login-container{
+  position: relative;height: 100%;width: 100%;background:  url("../../assets/images/nlogin-bg1.jpg") no-repeat;
+    .new-login{
+      width: 50%;height: 42%;position: absolute;left: 0;right: 0;bottom: 0;top: 0;margin: auto;
+      .new-login-l{
+        background: red;float:left;height:100%;width:50%;background:  url("../../assets/images/nlogin-bg2.png") no-repeat;position: relative;
+        img{position: absolute;left: 0;right: 0;bottom: 0;top: 0;margin: auto;width: 50%;height:23%;}
+      }
+      .new-login-r{
+        background: #fff;float:left;height:100%;width:50%;position: relative;
+        .title{margin-top: 10%;font-size: 20px;font-weight: 600;color: #019969;text-align: center;}
+        .login-form{
+          position: relative;width: 520px;max-width: 100%;overflow: hidden;height: 48%;
+          .svg-container{padding: 6px 5px 6px 15px; color: $dark_gray; vertical-align: middle; width: 30px; display: inline-block;}
+          .el-input {
+            display: inline-block; width: 80%;
+          }
+        }
+        .el-form-item {
+          border: none; background: #fff; border-radius: 5px; color: #999;width: 73%; margin: 10px auto;height: 30%;
+          /deep/.el-form-item__content {
+            line-height: 16%; border-bottom: 1px solid #e7e7e7;
+          }
+          .el-form-item__content .el-input{
+            /deep/.el-input__inner{border: none !important;}
+          }
+        }
+        .rememberPassword{
+          /deep/.el-form-item__content { line-height:16%; border: none;padding-bottom: 10px; span{padding-left: 5px;} }
+        }
+        .password{margin-top: 10px;margin-bottom: 20px;}
+        .btn{
+          position: absolute; overflow: hidden; width: 75%;left: 0;right: 0;bottom: 10%;margin: 0 auto;
+          /deep/span{background:#01996a;border: #01996a;border-radius: 5px;line-height: 40px; text-align: center;color:#fff; display: block;}
+        }
+      }
+    }
+}
+</style>

+ 447 - 0
src/views/login/index.vue.LOCAL.vue

@@ -0,0 +1,447 @@
+<template>
+  <div class="login-container">
+    <div class="new-login">
+      <div class="new-login-l">
+        <img src="@/assets/images/logo.png" alt="">
+      </div>
+      <div class="new-login-r">
+        <div class="title">{{$t('common.dashboard')}}</div>
+        <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" auto-complete="on" label-position="left">
+          <el-form-item prop="username">
+            <span class="svg-container">
+              <svg-icon icon-class="user" />
+            </span>
+            <el-input ref="username" v-model="loginForm.username" :placeholder="$t('user_name')" name="username" type="text" tabindex="1" auto-complete="on" />
+          </el-form-item>
+
+          <el-form-item prop="password" class="password">
+            <span class="svg-container">
+              <svg-icon icon-class="password" />
+            </span>
+            <el-input :key="passwordType" ref="password" v-model="loginForm.password" :type="passwordType" :placeholder="$t('password')" name="password" tabindex="2" auto-complete="on" @keyup.enter.native="handleLogin" />
+            <span class="show-pwd" @click="showPwd">
+              <svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" />
+            </span>
+          </el-form-item>
+          <el-form-item prop="password" class="rememberPassword">
+            <input id="remember-password-checkbox" v-model="rememberPassword" type="checkbox" value="remember-me" @click="doRememberPassword($event)">
+            <span for="remember-password-checkbox">
+              {{$t('remember_password')}}
+            </span>
+            </input>
+          </el-form-item>
+        </el-form>
+        <el-button type="text" :loading="loading" class="btn" @click.native.prevent="handleLogin">登录</el-button>
+      </div>
+    </div>
+    <div style="position: absolute;bottom: 0;left: 0;right:0;color: #000;background: #fee; opacity: .7; font-size: 14px;">
+      <p style="text-align:center;line-height:16px;">
+        版权所有
+        <a href="http://www.dairyinfo.com.cn" target="_blank">上海科湃腾信息科技有限公司</a>
+        <a style="margin-left: 20px;" href="https://beian.miit.gov.cn/" target="_blank">沪ICP备11008303号-3 </a>
+      </p>
+
+    </div>
+  </div>
+</template>
+
+<script>
+import { validUsername } from '@/utils/validate'
+import Cookies from 'js-cookie'
+import { getToken } from '@/utils/auth'
+import axios from 'axios';
+export default {
+  name: 'Login',
+  data() {
+    const validateUsername = (rule, value, callback) => {
+      if (!validUsername(value)) {
+        callback(new Error('请输入正确的用户名'))
+      } else {
+        callback()
+      }
+    }
+    const validatePassword = (rule, value, callback) => {
+      if (value.length < 6) {
+        callback(new Error('密码不能少于6个字符'))
+      } else {
+        callback()
+      }
+    }
+    return {
+      loginForm: {
+        username: '',
+        password: ''
+      },
+      loginRules: {
+        username: [
+          { required: true, trigger: 'blur', validator: validateUsername }
+        ],
+        password: [
+          { required: true, trigger: 'blur', validator: validatePassword }
+        ]
+      },
+      loading: false,
+      passwordType: 'password',
+      redirect: undefined,
+      rememberPassword: ''
+    }
+  },
+  watch: {
+    $route: {
+      handler: function(route) {
+        this.redirect = route.query && route.query.redirect
+      },
+      immediate: true
+    }
+  },
+  created() {
+    var that = this
+    document.onkeydown = function(e) {
+      e = window.event || e
+      // eslint-disable-next-line eqeqeq
+      if (that.$route.path == '/login' && (e.code == 'Enter' || e.code == 'Num Enter')) { // 验证在登录界面和按得键是回车键enter
+        that.handleLogin('ruleForm2') // 登录函数 (handleSubmit2('ruleForm2')-登录按钮的点击事件)
+      }
+    }
+  },
+  mounted: function() {
+    // 读取cookie中的账号信息,如果有accountInfo的话,则说明该用户之前勾选了记住密码的功能,则需要自动填上账号密码
+    this.loadAccountInfo()
+  },
+  methods: {
+    showPwd() {
+      if (this.passwordType === 'password') {
+        this.passwordType = ''
+      } else {
+        this.passwordType = 'password'
+      }
+      this.$nextTick(() => {
+        this.$refs.password.focus()
+      })
+    },
+    handleLogin() {
+      var rememberStatus = this.rememberPassword
+      var accountInfo = this.loginForm.username + '&' + this.loginForm.password
+      this.$refs.loginForm.validate(valid => {
+        if (valid) {
+          this.loading = true
+          this.$store
+            .dispatch('user/login', this.loginForm).then(() => {
+              if (rememberStatus) {
+                console.log('勾选了记住密码,现在开始写入cookie')
+                Cookies.set('accountInfo', accountInfo, 1440 * 3)
+              } else {
+                console.log('没有勾选记住密码,现在开始删除账号cookie')
+                Cookies.remove('accountInfo')
+              }
+
+              // 若为本地环境 则手写cookie
+              if (window.location.href.indexOf('localhost') != -1) {
+                Cookies.set('token', getToken(), 1440)
+              }
+              this.$router.push({ path: this.redirect || '/' })
+              this.loading = false
+            })
+            .catch(() => {
+              this.loading = false
+            })
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    doRememberPassword() {
+      const rememberStatus = this.rememberPassword
+      this.rememberPassword = !rememberStatus
+    },
+    loadAccountInfo: function() {
+      const _this = this
+      // zhaopeng&A15hOsu8YeGnCsjb
+      const accountInfo = Cookies.get('accountInfo')
+      // 如果cookie里没有账号信息
+      if (Boolean(accountInfo) == false) {
+        console.log('cookie中没有检测到账号信息!')
+        return false
+      } else {
+        // 如果cookie里有账号信息
+        console.log('cookie中检测到账号信息!现在开始预填写!')
+        let userName = ''
+        let passWord = ''
+        const index = accountInfo.indexOf('&')
+
+        userName = accountInfo.substring(0, index)
+        passWord = accountInfo.substring(index + 1)
+        // this.loginForm.username + '&' + this.loginForm.password
+        _this.loginForm.username = userName
+        _this.loginForm.password = passWord
+        _this.rememberPassword = true
+      }
+    }
+  }
+}
+</script>
+
+<style lang="scss">
+/* 修复input 背景不协调 和光标变色 */
+/* Detail see https://github.com/PanJiaChen/vue-element-admin/pull/927 */
+
+// $bg: #283443;
+// $light_gray: #fff;
+// $cursor: #fff;
+// 更改
+// $bg: #ccc;
+// $light_gray: #ccc;
+// $cursor: #000;
+// @supports (-webkit-mask: none) and (not (cater-color: $cursor)) {
+//   .login-container .el-input input {
+//     color: $cursor;
+//   }
+// }
+// .login-container {
+//   min-height: 232px;
+//   .el-input {
+//     display: inline-block;
+//     height: 38px;
+//     width: 80%;
+
+//     input {
+//       background: #fff;
+//       border: 0px;
+//       -webkit-appearance: none;
+//       border-radius: 0px;
+//       padding: 5px 5px 5px 15px;
+//       color: #000;
+//       height: 16.7%;
+//       caret-color: $cursor;
+
+//       &:-webkit-autofill {
+//         box-shadow: 0 0 0px 1000px $bg inset !important;
+//         -webkit-text-fill-color: $cursor !important;
+//       }
+//     }
+//   }
+//   .el-form-item {
+//       border: 1px solid rgba(255, 255, 255, 0.1);
+//       background: #fff;
+//       border-radius: 5px;
+//       color: #999;
+//       width: 73%;
+//       margin: 10px auto;
+//       .el-form-item__content {
+//         line-height: 16%;
+//         border-bottom: 1px solid #e7e7e7;
+//       }
+
+//     }
+//     .rememberPassword{
+//       .el-form-item__content {
+//         line-height:16%;
+//         border: none;
+//         span{padding-left: 5px;}
+//       }
+
+//     }
+//     .password{
+//       margin-top: 20px;margin-bottom: 15px;
+//     }
+//     .btn{
+//       position: relative;
+//       width: 520px;
+//       max-width: 100%;
+//       overflow: hidden;
+//     }
+//     .btn  span{width:72%;background:#01996a;border: #01996a;border-radius: 5px;line-height: 40px; text-align: center;color:#fff; margin: 0 auto;display: block;}
+
+//   }
+
+</style>
+
+/* <style>
+
+.login-container .el-input input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
+    -webkit-box-shadow: 0 0 0px 1000px #fff inset !important;
+    box-shadow: 0 0 0px 1000px #fff inset !important;
+    -webkit-text-fill-color: #000 !important;
+}
+
+</style> */
+// <style lang="scss" scoped>
+// $bg: #2d3a4b;
+// $dark_gray: #999;
+// $light_gray: #000;
+
+// .login-container {
+//   min-height: 100%;
+//   width: 100%;
+//   height: 100%;
+//   position: relative;
+//   background: url("../../assets/images/nlogin-bg.png") no-repeat;
+//   background-size:100%;
+//   overflow: hidden;
+//   .login {
+//     border-radius: 5%;
+//     padding: 30px;
+//     background: rgba(0,0,0,0.4);
+//     width: 380px;
+//     height: 340px;
+//     position: relative;
+//     top: 50%;
+//     left: 50%;
+//     margin-left: -190px;
+//     margin-top: -270px;
+//     box-shadow:0px 0px 10px #fff;
+//     .login-form {
+//       margin-top: 60px;
+//       position: relative;
+//       width: 520px;
+//       max-width: 100%;
+//       overflow: hidden;
+//     }
+
+//     .tips {
+//       font-size: 14px;
+//       color: #fff;
+//       margin-bottom: 10px;
+
+//       span {
+//         &:first-of-type {
+//           margin-right: 16px;
+//         }
+//       }
+//     }
+
+//     .svg-container {
+//       padding: 6px 5px 6px 15px;
+//       color: $dark_gray;
+//       vertical-align: middle;
+//       width: 30px;
+//       display: inline-block;
+//     }
+
+//       .title {
+//         font-size: 26px;
+//         color: $light_gray;
+//         margin: 0px auto 0 auto;
+//         text-align: center;
+//         font-weight: bold;
+//       }
+//       b {
+//         text-align: center;
+//         font: 14px/2 "";
+//       }
+
+//     .show-pwd {
+//       position: absolute;
+//       right: 10px;
+//       top: 7px;
+//       font-size: 16px;
+//       color: $dark_gray;
+//       cursor: pointer;
+//       user-select: none;
+//     }
+
+//     .kpt{text-align: center;color: #fff;display: inline-block;width: 100%;font:12px/18px '';}
+//   }
+// }
+// </style>
+// <style lang="scss" scoped>
+//   .login-container {
+//     width: 100vw;
+//     height: 100vh;
+//     display: flex;
+//     justify-content: center;
+//     align-items: center;
+//     .new-login{
+//       width: 57%;
+//       height: 43%;
+//       display: flex;
+//       .new-login-l{
+//         flex: 1 1;
+//         width: 50%;
+//         background:  url("../../assets/images/nlogin-bg2.png") no-repeat;
+//         position: relative;
+//         .new-login-l-t{
+//           width: 34%;
+//           height: 13%;
+//           position: absolute;
+//           top: 36%;
+//           left: 32%;
+//           right: 0;
+//           bottom: 0;
+//         }
+//         .new-login-l-b{
+//           position: absolute;
+//           // 138,263
+//           width: 40%;
+//           // height: 5%;
+//           top: 56%;
+//           left: 30%;
+//           // right: 0;
+//           // bottom: 0;
+//         }
+//       }
+//       .new-login-r{
+//         flex: 1 1;
+//         width: 50%;
+//         background:  url("../../assets/images/nlogin-bg3.png") no-repeat;
+//         position: relative;
+//         .title{
+//           text-align: center;
+//           font-size: 26px;
+//           font-weight: 700;
+//           color: #01996a;
+//           padding-top: 10%;
+//           padding-bottom: 3%;
+//         }
+//         .btn {position: absolute;bottom: 10%;}
+//       }
+//     }
+//   }
+// </style>
+<style lang="scss" scoped>
+$bg: #2d3a4b;
+$dark_gray: #999;
+$light_gray: #000;
+$bg: #ccc;
+$light_gray: #ccc;
+$cursor: #000;
+.login-container{
+  position: relative;height: 100%;width: 100%;background:  url("../../assets/images/nlogin-bg1.jpg") no-repeat;
+    .new-login{
+      width: 50%;height: 42%;position: absolute;left: 0;right: 0;bottom: 0;top: 0;margin: auto;
+      .new-login-l{
+        background: red;float:left;height:100%;width:50%;background:  url("../../assets/images/nlogin-bg2.png") no-repeat;position: relative;
+        img{position: absolute;left: 0;right: 0;bottom: 0;top: 0;margin: auto;width: 50%;height:23%;}
+      }
+      .new-login-r{
+        background: #fff;float:left;height:100%;width:50%;position: relative;
+        .title{margin-top: 10%;font-size: 20px;font-weight: 600;color: #019969;text-align: center;}
+        .login-form{
+          position: relative;width: 520px;max-width: 100%;overflow: hidden;height: 48%;
+          .svg-container{padding: 6px 5px 6px 15px; color: $dark_gray; vertical-align: middle; width: 30px; display: inline-block;}
+          .el-input {
+            display: inline-block; width: 80%;
+          }
+        }
+        .el-form-item {
+          border: none; background: #fff; border-radius: 5px; color: #999;width: 73%; margin: 10px auto;height: 30%;
+          /deep/.el-form-item__content {
+            line-height: 16%; border-bottom: 1px solid #e7e7e7;
+          }
+          .el-form-item__content .el-input{
+            /deep/.el-input__inner{border: none !important;}
+          }
+        }
+        .rememberPassword{
+          /deep/.el-form-item__content { line-height:16%; border: none;padding-bottom: 10px; span{padding-left: 5px;} }
+        }
+        .password{margin-top: 10px;margin-bottom: 20px;}
+        .btn{
+          position: absolute; overflow: hidden; width: 75%;left: 0;right: 0;bottom: 10%;margin: 0 auto;
+          /deep/span{background:#01996a;border: #01996a;border-radius: 5px;line-height: 40px; text-align: center;color:#fff; display: block;}
+        }
+      }
+    }
+}
+</style>

+ 451 - 0
src/views/login/index.vue.REMOTE.vue

@@ -0,0 +1,451 @@
+<template>
+  <div class="login-container">
+    <div class="new-login">
+      <div class="new-login-l">
+        <img src="@/assets/images/logo.png" alt="">
+      </div>
+      <div class="new-login-r">
+        <div class="title">用户登录</div>
+        <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" auto-complete="on" label-position="left">
+          <el-form-item prop="username">
+            <span class="svg-container">
+              <svg-icon icon-class="user" />
+            </span>
+            <el-input ref="username" v-model="loginForm.username" placeholder="用户名" name="username" type="text" tabindex="1" auto-complete="on" />
+          </el-form-item>
+
+          <el-form-item prop="password" class="password">
+            <span class="svg-container">
+              <svg-icon icon-class="password" />
+            </span>
+            <el-input :key="passwordType" ref="password" v-model="loginForm.password" :type="passwordType" placeholder="密码" name="password" tabindex="2" auto-complete="on" @keyup.enter.native="handleLogin" />
+            <span class="show-pwd" @click="showPwd">
+              <svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" />
+            </span>
+          </el-form-item>
+          <el-form-item prop="password" class="rememberPassword">
+            <input id="remember-password-checkbox" v-model="rememberPassword" type="checkbox" value="remember-me" @click="doRememberPassword($event)">
+            <span for="remember-password-checkbox">
+              记住密码
+            </span>
+            </input>
+          </el-form-item>
+        </el-form>
+        <el-button type="text" :loading="loading" class="btn" @click.native.prevent="handleLogin">登录</el-button>
+      </div>
+    </div>
+    <div style="position: absolute;bottom: 0;left: 0;right:0;color: #000;background: #fee; opacity: .7; font-size: 14px;">
+      <p style="text-align:center;line-height:16px;">
+        版权所有
+        <a href="http://www.dairyinfo.com.cn" target="_blank">上海科湃腾信息科技有限公司</a>
+        <a style="margin-left: 20px;" href="https://beian.miit.gov.cn/" target="_blank">沪ICP备11008303号-3 </a>
+      </p>
+
+    </div>
+  </div>
+</template>
+
+<script>
+import { validUsername } from '@/utils/validate'
+import Cookies from 'js-cookie'
+import { getToken } from '@/utils/auth'
+const md5 = require("md5")
+export default {
+  name: 'Login',
+  data() {
+    const validateUsername = (rule, value, callback) => {
+      if (!validUsername(value)) {
+        callback(new Error('请输入正确的用户名'))
+      } else {
+        callback()
+      }
+    }
+    const validatePassword = (rule, value, callback) => {
+      if (value.length < 6) {
+        callback(new Error('密码不能少于6个字符'))
+      } else {
+        callback()
+      }
+    }
+    return {
+      loginForm: {
+        username: '',
+        password: ''
+      },
+      loginRules: {
+        username: [
+          { required: true, trigger: 'blur', validator: validateUsername }
+        ],
+        password: [
+          { required: true, trigger: 'blur', validator: validatePassword }
+        ]
+      },
+      loading: false,
+      passwordType: 'password',
+      redirect: undefined,
+      rememberPassword: ''
+    }
+  },
+  watch: {
+    $route: {
+      handler: function(route) {
+        this.redirect = route.query && route.query.redirect
+      },
+      immediate: true
+    }
+  },
+  created() {
+    var that = this
+    document.onkeydown = function(e) {
+      e = window.event || e
+      // eslint-disable-next-line eqeqeq
+      if (that.$route.path == '/login' && (e.code == 'Enter' || e.code == 'Num Enter')) { // 验证在登录界面和按得键是回车键enter
+        that.handleLogin('ruleForm2') // 登录函数 (handleSubmit2('ruleForm2')-登录按钮的点击事件)
+      }
+    }
+  },
+  mounted: function() {
+    // 读取cookie中的账号信息,如果有accountInfo的话,则说明该用户之前勾选了记住密码的功能,则需要自动填上账号密码
+    this.loadAccountInfo()
+  },
+  methods: {
+    showPwd() {
+      if (this.passwordType === 'password') {
+        this.passwordType = ''
+      } else {
+        this.passwordType = 'password'
+      }
+      this.$nextTick(() => {
+        this.$refs.password.focus()
+      })
+    },
+    handleLogin() {
+      var obj = {
+        username: this.loginForm.username,
+        password: md5(this.loginForm.password)
+      }
+      var rememberStatus = this.rememberPassword
+      var accountInfo = this.loginForm.username + '&' + this.loginForm.password
+      this.$refs.loginForm.validate(valid => {
+        if (valid) {
+          this.loading = true
+          this.$store.dispatch('user/login', obj).then(() => {
+          // this.$store.dispatch('user/login', this.loginForm).then(() => {
+              if (rememberStatus) {
+                console.log('勾选了记住密码,现在开始写入cookie')
+                Cookies.set('accountInfo', accountInfo, 1440 * 3)
+              } else {
+                console.log('没有勾选记住密码,现在开始删除账号cookie')
+                Cookies.remove('accountInfo')
+              }
+
+              // 若为本地环境 则手写cookie
+              if (window.location.href.indexOf('localhost') != -1) {
+                Cookies.set('token', getToken(), 1440)
+              }
+              this.$router.push({ path: this.redirect || '/' })
+              this.loading = false
+            })
+            .catch(() => {
+              this.loading = false
+            })
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    doRememberPassword() {
+      const rememberStatus = this.rememberPassword
+      this.rememberPassword = !rememberStatus
+    },
+    loadAccountInfo: function() {
+      const _this = this
+      // zhaopeng&A15hOsu8YeGnCsjb
+      const accountInfo = Cookies.get('accountInfo')
+      // 如果cookie里没有账号信息
+      if (Boolean(accountInfo) == false) {
+        console.log('cookie中没有检测到账号信息!')
+        return false
+      } else {
+        // 如果cookie里有账号信息
+        console.log('cookie中检测到账号信息!现在开始预填写!')
+        let userName = ''
+        let passWord = ''
+        const index = accountInfo.indexOf('&')
+
+        userName = accountInfo.substring(0, index)
+        passWord = accountInfo.substring(index + 1)
+        // this.loginForm.username + '&' + this.loginForm.password
+        _this.loginForm.username = userName
+        _this.loginForm.password = passWord
+        _this.rememberPassword = true
+      }
+    }
+  }
+}
+</script>
+
+<style lang="scss">
+/* 修复input 背景不协调 和光标变色 */
+/* Detail see https://github.com/PanJiaChen/vue-element-admin/pull/927 */
+
+// $bg: #283443;
+// $light_gray: #fff;
+// $cursor: #fff;
+// 更改
+// $bg: #ccc;
+// $light_gray: #ccc;
+// $cursor: #000;
+// @supports (-webkit-mask: none) and (not (cater-color: $cursor)) {
+//   .login-container .el-input input {
+//     color: $cursor;
+//   }
+// }
+// .login-container {
+//   min-height: 232px;
+//   .el-input {
+//     display: inline-block;
+//     height: 38px;
+//     width: 80%;
+
+//     input {
+//       background: #fff;
+//       border: 0px;
+//       -webkit-appearance: none;
+//       border-radius: 0px;
+//       padding: 5px 5px 5px 15px;
+//       color: #000;
+//       height: 16.7%;
+//       caret-color: $cursor;
+
+//       &:-webkit-autofill {
+//         box-shadow: 0 0 0px 1000px $bg inset !important;
+//         -webkit-text-fill-color: $cursor !important;
+//       }
+//     }
+//   }
+//   .el-form-item {
+//       border: 1px solid rgba(255, 255, 255, 0.1);
+//       background: #fff;
+//       border-radius: 5px;
+//       color: #999;
+//       width: 73%;
+//       margin: 10px auto;
+//       .el-form-item__content {
+//         line-height: 16%;
+//         border-bottom: 1px solid #e7e7e7;
+//       }
+
+//     }
+//     .rememberPassword{
+//       .el-form-item__content {
+//         line-height:16%;
+//         border: none;
+//         span{padding-left: 5px;}
+//       }
+
+//     }
+//     .password{
+//       margin-top: 20px;margin-bottom: 15px;
+//     }
+//     .btn{
+//       position: relative;
+//       width: 520px;
+//       max-width: 100%;
+//       overflow: hidden;
+//     }
+//     .btn  span{width:72%;background:#01996a;border: #01996a;border-radius: 5px;line-height: 40px; text-align: center;color:#fff; margin: 0 auto;display: block;}
+
+//   }
+
+</style>
+
+/* <style>
+
+.login-container .el-input input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
+    -webkit-box-shadow: 0 0 0px 1000px #fff inset !important;
+    box-shadow: 0 0 0px 1000px #fff inset !important;
+    -webkit-text-fill-color: #000 !important;
+}
+
+</style> */
+// <style lang="scss" scoped>
+// $bg: #2d3a4b;
+// $dark_gray: #999;
+// $light_gray: #000;
+
+// .login-container {
+//   min-height: 100%;
+//   width: 100%;
+//   height: 100%;
+//   position: relative;
+//   background: url("../../assets/images/nlogin-bg.png") no-repeat;
+//   background-size:100%;
+//   overflow: hidden;
+//   .login {
+//     border-radius: 5%;
+//     padding: 30px;
+//     background: rgba(0,0,0,0.4);
+//     width: 380px;
+//     height: 340px;
+//     position: relative;
+//     top: 50%;
+//     left: 50%;
+//     margin-left: -190px;
+//     margin-top: -270px;
+//     box-shadow:0px 0px 10px #fff;
+//     .login-form {
+//       margin-top: 60px;
+//       position: relative;
+//       width: 520px;
+//       max-width: 100%;
+//       overflow: hidden;
+//     }
+
+//     .tips {
+//       font-size: 14px;
+//       color: #fff;
+//       margin-bottom: 10px;
+
+//       span {
+//         &:first-of-type {
+//           margin-right: 16px;
+//         }
+//       }
+//     }
+
+//     .svg-container {
+//       padding: 6px 5px 6px 15px;
+//       color: $dark_gray;
+//       vertical-align: middle;
+//       width: 30px;
+//       display: inline-block;
+//     }
+
+//       .title {
+//         font-size: 26px;
+//         color: $light_gray;
+//         margin: 0px auto 0 auto;
+//         text-align: center;
+//         font-weight: bold;
+//       }
+//       b {
+//         text-align: center;
+//         font: 14px/2 "";
+//       }
+
+//     .show-pwd {
+//       position: absolute;
+//       right: 10px;
+//       top: 7px;
+//       font-size: 16px;
+//       color: $dark_gray;
+//       cursor: pointer;
+//       user-select: none;
+//     }
+
+//     .kpt{text-align: center;color: #fff;display: inline-block;width: 100%;font:12px/18px '';}
+//   }
+// }
+// </style>
+// <style lang="scss" scoped>
+//   .login-container {
+//     width: 100vw;
+//     height: 100vh;
+//     display: flex;
+//     justify-content: center;
+//     align-items: center;
+//     .new-login{
+//       width: 57%;
+//       height: 43%;
+//       display: flex;
+//       .new-login-l{
+//         flex: 1 1;
+//         width: 50%;
+//         background:  url("../../assets/images/nlogin-bg2.png") no-repeat;
+//         position: relative;
+//         .new-login-l-t{
+//           width: 34%;
+//           height: 13%;
+//           position: absolute;
+//           top: 36%;
+//           left: 32%;
+//           right: 0;
+//           bottom: 0;
+//         }
+//         .new-login-l-b{
+//           position: absolute;
+//           // 138,263
+//           width: 40%;
+//           // height: 5%;
+//           top: 56%;
+//           left: 30%;
+//           // right: 0;
+//           // bottom: 0;
+//         }
+//       }
+//       .new-login-r{
+//         flex: 1 1;
+//         width: 50%;
+//         background:  url("../../assets/images/nlogin-bg3.png") no-repeat;
+//         position: relative;
+//         .title{
+//           text-align: center;
+//           font-size: 26px;
+//           font-weight: 700;
+//           color: #01996a;
+//           padding-top: 10%;
+//           padding-bottom: 3%;
+//         }
+//         .btn {position: absolute;bottom: 10%;}
+//       }
+//     }
+//   }
+// </style>
+<style lang="scss" scoped>
+$bg: #2d3a4b;
+$dark_gray: #999;
+$light_gray: #000;
+$bg: #ccc;
+$light_gray: #ccc;
+$cursor: #000;
+.login-container{
+  position: relative;height: 100%;width: 100%;background:  url("../../assets/images/nlogin-bg1.jpg") no-repeat;background-size: cover;
+    .new-login{
+      width: 50%;height: 42%;position: absolute;left: 0;right: 0;bottom: 0;top: 0;margin: auto;
+      .new-login-l{
+        float:left;height:100%;width:50%;background:  url("../../assets/images/nlogin-bg2.png") no-repeat;position: relative;background-size: cover;
+        img{position: absolute;left: 0;right: 0;bottom: 0;top: 0;margin: auto;width: 50%;height:23%;}
+      }
+      .new-login-r{
+        background: #fff;float:left;height:100%;width:50%;position: relative;
+        .title{margin-top: 10%;font-size: 20px;font-weight: 600;color: #019969;text-align: center;}
+        .login-form{
+          position: relative;width: 520px;overflow: hidden;height: 48%;width: 100%;
+          .svg-container{padding: 6px 5px 6px 15px; color: $dark_gray; vertical-align: middle; width: 30px; display: inline-block;}
+          .el-input {
+            display: inline-block; width: 80%;
+          }
+        }
+        .el-form-item {
+          border: none; background: #fff; border-radius: 5px; color: #999;width: 73%; margin: 10px auto;height: 30%;
+          /deep/.el-form-item__content {
+            line-height: 16%; border-bottom: 1px solid #e7e7e7;
+          }
+          .el-form-item__content .el-input{
+            /deep/.el-input__inner{border: none !important;}
+          }
+        }
+        .rememberPassword{
+          /deep/.el-form-item__content { line-height:16%; border: none;padding-bottom: 10px; span{padding-left: 5px;} }
+        }
+        .password{margin-top: 10px;margin-bottom: 20px;}
+        .btn{
+          position: absolute; overflow: hidden; width: 75%;left: 0;right: 0;bottom: 10%;margin: 0 auto;
+          /deep/span{background:#01996a;border: #01996a;border-radius: 5px;line-height: 40px; text-align: center;color:#fff; display: block;}
+        }
+      }
+    }
+}
+</style>

+ 2 - 2
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() {
@@ -816,7 +816,7 @@ export default {
       if (item == 1) {
         console.log('点击了导出模板')
         const requestParam = this.requestParam
-        const url = process.env.VUE_APP_BASE_API + 'file/导入导出模板/栏舍生产/粪便评分导入模板.xlsx' // 请求下载文件的地址
+        const url = Cookies.get('url') + 'file/导入导出模板/栏舍生产/粪便评分导入模板.xlsx' // 请求下载文件的地址
         console.log(url)
         axios({
           method: 'GET',

+ 2 - 2
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() {
@@ -773,7 +773,7 @@ export default {
       if (item == 1) {
         console.log('点击了导出模板')
         const requestParam = this.requestParam
-        const url = process.env.VUE_APP_BASE_API + 'file/导入导出模板/栏舍生产/粪便筛导入模板.xlsx' // 请求下载文件的地址
+        const url = Cookies.get('url') + 'file/导入导出模板/栏舍生产/粪便筛导入模板.xlsx' // 请求下载文件的地址
         console.log(url)
         axios({
           method: 'GET',

+ 23 - 10
src/views/shedProduction/formulaDryMatter/index.vue

@@ -92,7 +92,13 @@
           <template slot-scope="scope">
             <span>{{ scope.row.operatetime }}</span>
           </template>
-        </el-table-column>
+        </el-table-column>
+        <el-table-column label="是否剩料" min-width="100px" align="center">
+          <template slot-scope="scope">
+            <el-switch v-model="scope.row.excess" disabled active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" />
+          </template>
+        </el-table-column>
+
         <el-table-column label="操作" align="center" width="80" class-name="small-padding fixed-width" fixed="right">
           <template slot-scope="{row}">
             <el-button v-if="isRoleEdit" class="miniSuccess" icon="el-icon-edit-outline" @click="handleUpdate(row)" />
@@ -179,6 +185,13 @@
               </el-form-item>
             </el-col>
           </el-row>
+          <el-row>
+            <el-col :span="12">
+              <el-form-item label="是否剩料:" prop="excess">
+                <el-switch v-model="create.temp.excess"  active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" />
+              </el-form-item>
+            </el-col>
+          </el-row>
         </el-form>
         <div slot="footer" class="dialog-footer">
           <el-button class="cancelClose" @click="create.dialogFormVisible = false;getList()">关闭</el-button>
@@ -262,7 +275,7 @@ export default {
       create: {
         dialogFormVisible: false,
         dialogStatus: '',
-        temp: { pastureid: Cookies.get('pastureid'), operatetime: parseTime(new Date(), '{y}-{m}-{d}'), emp: Cookies.get('employename'), barid: '', barname: '', freshweight: '', dryweight: '', thoweight: '', actweight: '', times: '' },
+        temp: { pastureid: Cookies.get('pastureid'), operatetime: parseTime(new Date(), '{y}-{m}-{d}'), emp: Cookies.get('employename'), barid: '', barname: '', freshweight: '', dryweight: '', thoweight: '', actweight: '', times: '',excess:1 },
         rules: {
           barid: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }],
           times: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }],
@@ -342,7 +355,7 @@ export default {
     uploadData() {
       return {
         name: 'checkdryfresh,checkbarname,checktimes,insertFtdryUpload',
-        importParams: '栏舍名称,班次,鲜样重量(g),烘干重量(g),操作人,操作日期',
+        importParams: '栏舍名称,班次,鲜样重量(g),烘干重量(g),操作人,操作日期,是否剩料(是/否)',
         sheetname: 'Sheet1',
         // 登录牧场
         pastureid: Cookies.get('pastureid'),
@@ -356,7 +369,7 @@ export default {
     },
     // 设置上传地址
     uploadExcelUrl() {
-      return process.env.VUE_APP_BASE_API + 'authdata/ImportExcel'
+      return Cookies.get('url') + 'authdata/ImportExcel'
     }
   },
   created() {
@@ -448,7 +461,7 @@ export default {
 
     // 新增
     resetTemp() {
-      this.create.temp = { pastureid: Cookies.get('pastureid'), operatetime: parseTime(new Date(), '{y}-{m}-{d}'), emp: Cookies.get('employename'), barid: '', barname: '', freshweight: '', dryweight: '', thoweight: '', actweight: '', times: '' }
+      this.create.temp = { pastureid: Cookies.get('pastureid'), operatetime: parseTime(new Date(), '{y}-{m}-{d}'), emp: Cookies.get('employename'), barid: '', barname: '', freshweight: '', dryweight: '', thoweight: '', actweight: '', times: '',excess:1 }
     },
     blurEmp(item) {
       this.create.temp.emp = item.target.value
@@ -780,7 +793,7 @@ export default {
       if (item == 1) {
         console.log('点击了导出模板')
         const requestParam = this.requestParam
-        const url = process.env.VUE_APP_BASE_API + 'file/导入导出模板/栏舍生产/配方干物质导入模板.xlsx' // 请求下载文件的地址
+        const url = Cookies.get('url') + 'file/导入导出模板/栏舍生产/配方干物质导入模板.xlsx' // 请求下载文件的地址
         console.log(url)
         axios({
           method: 'GET',
@@ -827,8 +840,8 @@ export default {
           }
           var excelDatas = [
             {
-              tHeader: ['栏舍名称', '班次', '鲜样重量(g)', '烘干重量(g)', '理论干物质', '实际干物质', '操作人', '操作日期'],
-              filterVal: ['barname', 'timesstr', 'freshweight', 'dryweight', 'thoweight', 'actweight', 'emp', 'operatetime'],
+              tHeader: ['栏舍名称', '班次', '鲜样重量(g)', '烘干重量(g)', '理论干物质', '实际干物质', '操作人', '操作日期','是否剩料'],
+              filterVal: ['barname', 'timesstr', 'freshweight', 'dryweight', 'thoweight', 'actweight', 'emp', 'operatetime','excess_str'],
               tableDatas: this.download.list,
               sheetName: 'Sheet1'
             }
@@ -853,8 +866,8 @@ export default {
           this.$notify({ title: '失败', message: '导入失败:' + res.data.err_count + '条!', type: 'danger', duration: 2000 })
            import('@/vendor/Export2Excel').then(excel => {
              const list1 = res.data.result
-             const tHeader = ['栏舍名称', '班次', '鲜样重量(g)', '烘干重量(g)', '操作人', '操作日期', '错误信息']
-             const filterVal = ['栏舍名称', '班次', '鲜样重量(g)', '烘干重量(g)', '操作人', '操作日期', 'error_msg']
+             const tHeader = ['栏舍名称', '班次', '鲜样重量(g)', '烘干重量(g)', '操作人', '操作日期','是否剩料(是/否)', '错误信息']
+             const filterVal = ['栏舍名称', '班次', '鲜样重量(g)', '烘干重量(g)', '操作人', '操作日期','是否剩料(是/否)', 'error_msg']
              const data1 = this.formatJson(filterVal, list1)
              excel.export_json_to_excel({ header: tHeader, data: data1, filename: '配方干物质导入报错信息', autoWidth: true, bookType: 'xlsx' })
            })

+ 39 - 13
src/views/shedProduction/materialRemainingRecord/index.vue

@@ -61,6 +61,7 @@
         </el-table-column>
         <el-table-column label="栏舍名称" min-width="150px" align="center" prop="barname" />
         <el-table-column label="剩料量(kg)" min-width="150px" align="center" prop="remain" />
+        <el-table-column label="干物质" min-width="150px" align="center" prop="dry" />
         <el-table-column label="班次" min-width="90px" align="center" prop="timesstr" />
         <el-table-column label="收集时间" min-width="100px" align="center" prop="operatetime" />
         <el-table-column label="操作人" min-width="90px" align="center" prop="emp" />
@@ -142,6 +143,13 @@
                 <el-input ref="remain" v-model="create.temp.remain" class="filter-item" placeholder="剩料量" type="number" />
               </el-form-item>
             </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="20">
+              <el-form-item label="干物质:" prop="dry">
+                <el-input ref="dry" v-model="create.temp.dry" class="filter-item" placeholder="干物质" type="number"  />
+              </el-form-item>
+            </el-col>
           </el-row>
           <el-row>
             <el-col :span="20">
@@ -233,7 +241,7 @@ export default {
       create: {
         dialogFormVisible: false,
         dialogStatus: '',
-        temp: { pastureid: Cookies.get('pastureid'), operatetime: parseTime(new Date(), '{y}-{m}-{d} {h}:{i}'), emp: Cookies.get('employename'), barid: '', barname: '', remain: '', times: '' },
+        temp: { pastureid: Cookies.get('pastureid'), operatetime: parseTime(new Date(), '{y}-{m}-{d} {h}:{i}'), emp: Cookies.get('employename'), barid: '', barname: '', remain: '',dry:0, times: '' },
         rules: {
           barid: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }],
           remain: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }],
@@ -294,7 +302,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: {
@@ -307,7 +316,7 @@ export default {
     uploadData() {
       return {
         name: 'checkbarname,checktimes,insertBarfeedremainUpload',
-        importParams: '栏舍名称,剩料量(kg),班次(第一班/第二班/第三班),收集时间,操作人',
+        importParams: '栏舍名称,剩料量(kg),干物质,班次(第一班/第二班/第三班),收集时间,操作人',
         sheetname: 'Sheet1',
         // 登录牧场
         pastureid: Cookies.get('pastureid'),
@@ -321,10 +330,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()
@@ -433,7 +446,7 @@ export default {
 
     // 新增
     resetTemp() {
-      this.create.temp = { pastureid: Cookies.get('pastureid'), operatetime: parseTime(new Date(), '{y}-{m}-{d} {h}:{i}'), emp: Cookies.get('employename'), barid: '', barname: '', remain: '', times: '' }
+      this.create.temp = { pastureid: Cookies.get('pastureid'), operatetime: parseTime(new Date(), '{y}-{m}-{d} {h}:{i}'), emp: Cookies.get('employename'), barid: '', barname: '', remain: '',dry:0, times: '' }
     },
     blurEmp(item) {
       this.create.temp.emp = item.target.value
@@ -483,7 +496,11 @@ export default {
             this.$message({ type: 'error', message: '剩料量请输入自然数并保留两位小数', duration: 2000 })
             return false
           }
-
+          if(this.create.temp.dry){
+            this.create.temp.dry = parseFloat(this.create.temp.dry)
+          }else{
+            this.create.temp.dry = 0
+          }
           this.requestParam.name = 'insertBarfeedremain'
           this.requestParam.parammaps = this.create.temp
           if (this.create.temp.emp == '') { this.create.temp.emp = Cookies.get('employename') }
@@ -523,7 +540,11 @@ export default {
             this.$message({ type: 'error', message: '剩料量请输入自然数并保留两位小数', duration: 2000 })
             return false
           }
-
+          if(this.create.temp.dry){
+            this.create.temp.dry = parseFloat(this.create.temp.dry)
+          }else{
+            this.create.temp.dry = 0
+          }
           this.requestParam.name = 'insertBarfeedremain'
           this.requestParam.parammaps = this.create.temp
           if (this.create.temp.emp == '') { this.create.temp.emp = Cookies.get('employename') }
@@ -577,7 +598,12 @@ export default {
             return false
           }
 
-          this.requestParam.name = 'updateBarfeedremain'
+          this.requestParam.name = 'updateBarfeedremain'
+          if(this.create.temp.dry){
+            this.create.temp.dry = parseFloat(this.create.temp.dry)
+          }else{
+            this.create.temp.dry = 0
+          }
           this.requestParam.parammaps = this.create.temp
           if (this.create.temp.emp == '') { this.create.temp.emp = Cookies.get('employename') }
           PostDataByName(this.requestParam).then(response => {
@@ -689,7 +715,7 @@ export default {
         console.log('点击了导出模板')
         console.log('点击了导出模板')
         const requestParam = this.requestParam
-        const url = process.env.VUE_APP_BASE_API + 'authdata/barfeedremain/excel' // 请求下载文件的地址
+        const url = Cookies.get('url') + 'authdata/barfeedremain/excel' // 请求下载文件的地址
         console.log(url)
         axios({
           method: 'POST',
@@ -742,8 +768,8 @@ export default {
            if(item== 2){
               var excelDatas1 = [
                 {
-                  tHeader: ['栏舍名称', '剩料量(kg)', '班次(第一班/第二班/第三班)', '收集时间', '操作人'],
-                  filterVal: ['barname', 'remain', 'timesstr', 'operatetime', 'emp'],
+                  tHeader: ['栏舍名称', '剩料量(kg)','干物质', '班次(第一班/第二班/第三班)', '收集时间', '操作人'],
+                  filterVal: ['barname', 'remain','dry', 'timesstr', 'operatetime', 'emp'],
                   tableDatas: this.download.list,
                   sheetName: 'Sheet1'
                 }
@@ -801,7 +827,7 @@ export default {
       )
     },
     handleDataUpload(){
-      let a = process.env.VUE_APP_BASE_API
+      let a = Cookies.get('url')
       let b = a.search(8081)
       let c = a.substring(0,a.search(8081)) + '8082'
       let d = a.substring(0,a.lastIndexOf('/'))

+ 2 - 2
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() {
@@ -819,7 +819,7 @@ export default {
       if (item == 1) {
         console.log('点击了导出模板')
         const requestParam = this.requestParam
-        const url = process.env.VUE_APP_BASE_API + 'file/导入导出模板/栏舍生产/宾州筛导入模板.xlsx' // 请求下载文件的地址
+        const url = Cookies.get('url') + 'file/导入导出模板/栏舍生产/宾州筛导入模板.xlsx' // 请求下载文件的地址
         console.log(url)
         axios({
           method: 'GET',

+ 3 - 3
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() {
@@ -1075,9 +1075,9 @@ export default {
     handleExport(item) {
       if (item == 1) {
         console.log('点击了导出模板')
-        // https://kptyun.cn:8081/file/导入导出模板/栏舍生产/栏舍生产性能导入模板.xlsx
+        // 导入导出模板/栏舍生产/栏舍生产性能导入模板.xlsx
         const requestParam = this.requestParam
-        const url = process.env.VUE_APP_BASE_API + 'file/导入导出模板/栏舍生产/栏舍生产性能导入模板.xlsx' // 请求下载文件的地址
+        const url = Cookies.get('url') + 'file/导入导出模板/栏舍生产/栏舍生产性能导入模板.xlsx' // 请求下载文件的地址
         console.log(url)
         axios({
           method: 'GET',

+ 2 - 2
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() {
@@ -844,7 +844,7 @@ export default {
       if (item == 1) {
         console.log('点击了导出模板')
         const requestParam = this.requestParam
-        const url = process.env.VUE_APP_BASE_API + 'file/导入导出模板/栏舍生产/体况评分导入模板.xlsx' // 请求下载文件的地址
+        const url = Cookies.get('url') + 'file/导入导出模板/栏舍生产/体况评分导入模板.xlsx' // 请求下载文件的地址
         console.log(url)
         axios({
           method: 'GET',

+ 244 - 110
src/views/statisticalAnalysis/errorAnalysis/pasture/index.vue

@@ -2,6 +2,7 @@
   <div class="app-container1">
     <el-tabs v-model="activeName" @tab-click="handleTabClick">
       <el-tab-pane label="汇总统计" name="first">
+      <div ref="scrollContainer" @scroll="handleScroll" :style="{ height: myHeight1+'px', overflowY: 'auto', overflowX: 'hidden' }">
         <div class="search">
           <el-date-picker v-model="tab.table.getdataListParm.parammaps.inputDatetime" :clearable="false" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" style="width: 250px;" :picker-options="pickerOptions" />
           <el-button class="el-icon-arrow-left elIconArrowLeft" :disabled="Beforedisabled" @click="handleBefore" />
@@ -54,6 +55,12 @@
             <span>-</span>
             <el-input-number :controls="false" :precision="2" v-model="tab.table.getdataListParm.parammaps.slzql2" placeholder="撒料正确率" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
           </div>
+          <el-input v-if="tab.isTrainNumber" v-model="tab.table.getdataListParm.parammaps.templetname" class="filter-item" style="width: 140px;" placeholder="配方名称" />
+          <div style="display: inline-block;" class="filter-item1">
+            <el-input-number :controls="false" :precision="0" v-model="tab.table.getdataListParm.parammaps.startdate" placeholder="混料开始时间" :min="0" :max="100" style="width: 120px;"  class="filter-item" clearable />
+            <span>-</span>
+            <el-input-number :controls="false" :precision="0" v-model="tab.table.getdataListParm.parammaps.enddate" placeholder="混料结束时间" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
+          </div>
           <el-checkbox v-model="tab.table.getdataListParm.parammaps.error" style="margin-right: 10px;" @change="changeccysChecked">只看超出预设值数据</el-checkbox>
           <el-button class="successBorder" @click="form_search">查询</el-button>
           <el-button class="successBorder" @click="handleRefresh1">重置</el-button>
@@ -62,7 +69,8 @@
         </div>
         <div id="table" class="table">
           <h4>混料</h4>
-          <el-table
+          <u-table
+            ref="plTable1"
             :key="tab.table.tableKey"
             v-loading="tab.table.listLoading"
             element-loading-text="给我一点时间"
@@ -76,51 +84,59 @@
             class="elTable table-fixed"
             :max-height="myHeight2"
           >
-            <el-table-column v-if="tab.checked" :key="0" sortable label="日期" min-width="70px" align="center" prop="计划时间" />
-            <el-table-column v-if="tab.isDriver" :key="1" sortable label="驾驶员" min-width="70px" align="center" prop="驾驶员" />
-            <el-table-column v-if="tab.isFormulaName" :key="2" sortable label="配方名称" min-width="70px" align="center" prop="配方名称" />
-            <el-table-column v-if="tab.isHouseName" :key="3" sortable label="栏舍名称" min-width="70px" align="center" prop="栏舍名称" />
-            <el-table-column v-if="tab.isLivestockType" :key="4" sortable label="牲畜类别" min-width="70px" align="center" prop="牲畜类别" />
-            <el-table-column v-if="tab.isTrainNumber" :key="5" sortable label="TMR名称" min-width="70px" align="center" prop="TMR名称" />
-            <el-table-column v-if="tab.isTrainNumber" :key="6" sortable label="车次" min-width="70px" align="center" prop="车次" />
-            <el-table-column v-if="tab.isTrainNumber" :key="7" sortable label="班次" min-width="70px" align="center" prop="班次" />
-            <el-table-column v-if="tab.isTrainNumber" :key="8" sortable label="驾驶员" min-width="70px" align="center" prop="驾驶员" />
-            <el-table-column v-if="tab.isTMRName" :key="9" sortable label="TMR名称" min-width="70px" align="center" prop="TMR名称" />
-            <el-table-column v-if="tab.isTMRName" :key="10" sortable label="班次" min-width="70px" align="center" prop="班次" />
-            <el-table-column v-if="tab.isTMRName" :key="11" sortable label="车次" min-width="70px" align="center" prop="车次" />
-            <el-table-column v-if="tab.isTMRName" :key="12" sortable label="驾驶员" min-width="70px" align="center" prop="驾驶员" />
-            <el-table-column v-if="tab.isFeed" :key="13" sortable label="饲料" min-width="70px" align="center" prop="fname" />
-            <el-table-column :key="14" sortable label="理论重量" min-width="60px" align="center" prop="理论重量" />
-            <el-table-column :key="15" sortable label="实际重量" min-width="60px" align="center" prop="实际重量" />
-            <el-table-column :key="16" sortable label="计划混料操作数" min-width="60px" align="center" prop="计划混料操作数" />
-            <el-table-column :key="17" sortable label="已混料操作数" min-width="50px" align="center" prop="已混料操作数" />
-            <el-table-column :key="18" sortable label="混料操作率" min-width="60px" align="center" prop="混料操作率" />
-            <el-table-column :key="19" sortable label="混料误差值" min-width="60px" align="center" prop="混料误差值" />
-            <el-table-column :key="20" sortable label="混料准确率" min-width="60px" align="center" prop="混料准确率" />
-            <el-table-column v-if="tab.isTrainNumber" :key="21" sortable label="混料时间" min-width="70px" align="center" prop="混料时间" />
-            <el-table-column v-if="tab.isTrainNumber" :key="22" sortable label="等待时间" min-width="70px" align="center" prop="等待时间" />
-            <el-table-column :key="23" sortable label="混料自动跳转次数" min-width="65px" align="center" prop="混料自动跳转次数" />
-            <el-table-column :key="24" sortable label="混料手动跳转次数" min-width="65px" align="center" prop="混料手动跳转次数" />
-            <el-table-column :key="25" sortable label="取消次数" min-width="70px" align="center" prop="取消次数" />
-            <el-table-column :key="26" sortable label="混料正确数" min-width="70px" align="center" prop="混料正确数" />
-            <el-table-column :key="27" sortable label="混料正确率" min-width="70px" align="center" prop="混料正确率" />
-            <el-table-column :key="28" sortable label="去除取消正确率" min-width="60px" align="center" prop="去除取消正确率" />
-            <el-table-column :key="29" sortable label="标准差" min-width="60px" align="center" prop="方差" />
-            <el-table-column v-if="activeName=='first' && tab.table.list !== null" :key="30" align="center" width="70" label="操作" class-name="small-padding fixed-width" fixed="right">
+            <u-table-column v-if="tab.checked && !tab.isTrainNumber" :key="0" sortable label="日期" min-width="70px" align="center" prop="计划时间" />
+            <u-table-column v-if="tab.isTrainNumber" :key="117" sortable label="日期" min-width="70px" align="center" prop="计划时间1" />
+            <u-table-column v-if="tab.isTrainNumber" :key="113" sortable label="配方名称" min-width="70px" align="center" prop="templetname" />
+            <u-table-column v-if="tab.isTrainNumber" :key="114" sortable label="车辆名称" min-width="70px" align="center" prop="TMR名称" />
+            <u-table-column v-if="tab.isTrainNumber" :key="115" sortable label="开始加料时间" min-width="70px" align="center" prop="startTime" />
+            <u-table-column v-if="tab.isTrainNumber" :key="116" sortable label="结束加料时间" min-width="70px" align="center" prop="endTime" />
+            <u-table-column v-if="tab.isDriver" :key="1" sortable label="驾驶员" min-width="70px" align="center" prop="驾驶员" />
+            <u-table-column v-if="tab.isFormulaName" :key="2" sortable label="配方名称" min-width="70px" align="center" prop="配方名称" />
+            <u-table-column v-if="tab.isHouseName" :key="3" sortable label="栏舍名称" min-width="70px" align="center" prop="栏舍名称" />
+            <u-table-column v-if="tab.isLivestockType" :key="4" sortable label="牲畜类别" min-width="70px" align="center" prop="牲畜类别" />
+            <u-table-column v-if="tab.isTrainNumber" :key="5" sortable label="TMR名称" min-width="70px" align="center" prop="TMR名称" />
+            <u-table-column v-if="tab.isTrainNumber" :key="6" sortable label="车次" min-width="70px" align="center" prop="车次" />
+            <u-table-column v-if="tab.isTrainNumber" :key="7" sortable label="班次" min-width="70px" align="center" prop="班次" />
+            <u-table-column v-if="tab.isTrainNumber" :key="8" sortable label="驾驶员" min-width="70px" align="center" prop="驾驶员" />
+            <u-table-column v-if="tab.isTMRName" :key="9" sortable label="TMR名称" min-width="70px" align="center" prop="TMR名称" />
+            <u-table-column v-if="tab.isTMRName" :key="10" sortable label="班次" min-width="70px" align="center" prop="班次" />
+            <u-table-column v-if="tab.isTMRName" :key="11" sortable label="车次" min-width="70px" align="center" prop="车次" />
+            <u-table-column v-if="tab.isTMRName" :key="12" sortable label="驾驶员" min-width="70px" align="center" prop="驾驶员" />
+            <u-table-column v-if="tab.isFeed" :key="13" sortable label="饲料" min-width="70px" align="center" prop="fname" />
+            <u-table-column :key="14" sortable label="理论重量" min-width="60px" align="center" prop="理论重量" />
+            <u-table-column :key="15" sortable label="实际重量" min-width="60px" align="center" prop="实际重量" />
+            <u-table-column :key="16" sortable label="计划混料操作数" min-width="60px" align="center" prop="计划混料操作数" />
+            <u-table-column :key="17" sortable label="已混料操作数" min-width="50px" align="center" prop="已混料操作数" />
+            <u-table-column :key="18" sortable label="混料操作率" min-width="60px" align="center" prop="混料操作率" />
+            <u-table-column :key="19" sortable label="混料误差值" min-width="60px" align="center" prop="混料误差值" />
+            <u-table-column :key="20" sortable label="混料准确率" min-width="60px" align="center" prop="混料准确率" />
+            <u-table-column v-if="tab.isTrainNumber" :key="21" sortable label="混料时间" min-width="70px" align="center" prop="混料时间" />
+            <u-table-column v-if="tab.isTrainNumber" :key="22" sortable label="发料开始时间" min-width="70px" align="center" prop="startMaterialTime" />
+            <u-table-column v-if="tab.isTrainNumber" :key="23" sortable label="等待时间" min-width="70px" align="center" prop="等待时间" />
+            <u-table-column :key="24" sortable label="混料自动跳转次数" min-width="65px" align="center" prop="混料自动跳转次数" />
+            <u-table-column :key="25" sortable label="混料手动跳转次数" min-width="65px" align="center" prop="混料手动跳转次数" />
+            <u-table-column :key="26" sortable label="取消次数" min-width="70px" align="center" prop="取消次数" />
+            <u-table-column :key="27" sortable label="混料正确数" min-width="70px" align="center" prop="混料正确数" />
+            <u-table-column :key="28" sortable label="混料正确率" min-width="70px" align="center" prop="混料正确率" />
+            <u-table-column :key="29" sortable label="去除取消正确率" min-width="60px" align="center" prop="去除取消正确率" />
+            <u-table-column :key="30" sortable label="标准差" min-width="60px" align="center" prop="方差" />
+            <u-table-column :key="31" v-if="tab.isTrainNumber" sortable label="区域" min-width="60px" align="center" prop="barname" />
+            <u-table-column v-if="activeName=='first' && tab.table.list !== null" :key="33" align="center" width="70" label="操作" class-name="small-padding fixed-width" fixed="right">
               <template slot-scope="{row}">
                 <el-button class="miniSuccess" icon="el-icon-search" @click="handleSee('1',row)" />
               </template>
-            </el-table-column>
-            <el-table-column v-else :key="30" align="center" width="70" label="操作" class-name="small-padding fixed-width">
+            </u-table-column>
+            <u-table-column v-else :key="33" align="center" width="70" label="操作" class-name="small-padding fixed-width">
               <template slot-scope="{row}">
                   <el-button class="miniSuccess" icon="el-icon-search" @click="handleSee('1',row)" />
               </template>
-            </el-table-column>
-          </el-table>
+            </u-table-column>
+          </u-table>
           <span v-if="tab.table.listLoading == false" style="margin-right: 30px;margin-top: 10px;font-size: 14px;">共{{ tab.table.total }}条</span>
           <div v-if="tab.radio !== '6'">
             <h4>撒料</h4>
-            <el-table
+            <u-table
+              ref="plTable22"
               :key="tab.table2.tableKey"
               v-loading="tab.table2.listLoading"
               element-loading-text="给我一点时间"
@@ -134,47 +150,54 @@
               class="elTable table-fixed"
               :max-height="myHeight2"
             >
-              <el-table-column v-if="tab.checked" :key="0" sortable label="日期" min-width="70px" align="center" prop="计划时间" />
-              <el-table-column v-if="tab.isDriver" :key="1" sortable label="驾驶员" min-width="70px" align="center" prop="驾驶员" />
-              <el-table-column v-if="tab.isFormulaName" :key="2" sortable label="配方名称" min-width="70px" align="center" prop="配方名称" />
-              <el-table-column v-if="tab.isHouseName" :key="3" sortable label="栏舍名称" min-width="70px" align="center" prop="栏舍名称" />
-              <el-table-column v-if="tab.isLivestockType" :key="4" sortable label="牲畜类别" min-width="70px" align="center" prop="牲畜类别" />
-              <el-table-column v-if="tab.isTrainNumber" :key="5" sortable label="车次" min-width="70px" align="center" prop="车次" />
-              <el-table-column v-if="tab.isTrainNumber" :key="6" sortable label="班次" min-width="70px" align="center" prop="班次" />
-              <el-table-column v-if="tab.isTrainNumber" :key="7" sortable label="TMR名称" min-width="70px" align="center" prop="TMR名称" />
-              <el-table-column v-if="tab.isTrainNumber" :key="8" sortable label="驾驶员" min-width="70px" align="center" prop="驾驶员" />
-              <el-table-column v-if="tab.isTMRName" :key="9" sortable label="TMR名称" min-width="70px" align="center" prop="TMR名称" />
-              <el-table-column v-if="tab.isTMRName" :key="10" sortable label="班次" min-width="70px" align="center" prop="班次" />
-              <el-table-column v-if="tab.isTMRName" :key="11" sortable label="车次" min-width="70px" align="center" prop="车次" />
-              <el-table-column v-if="tab.isTMRName" :key="12" sortable label="驾驶员" min-width="70px" align="center" prop="驾驶员" />
-              <el-table-column v-if="tab.isFeed" :key="13" sortable label="饲料" min-width="70px" align="center" prop="饲料" />
-              <el-table-column :key="14" sortable label="理论重量" min-width="60px" align="center" prop="理论重量" />
-              <el-table-column :key="15" sortable label="实际重量" min-width="60px" align="center" prop="实际重量" />
-              <el-table-column :key="16" sortable label="计划撒料操作数" min-width="60px" align="center" prop="计划撒料操作数" />
-              <el-table-column :key="17" sortable label="已撒料操作数" min-width="50px" align="center" prop="已撒料操作数" />
-              <el-table-column :key="18" sortable label="撒料操作率" min-width="60px" align="center" prop="撒料操作率" />
-              <el-table-column :key="19" sortable label="撒料误差值" min-width="60px" align="center" prop="撒料误差值" />
-              <el-table-column :key="20" sortable label="撒料准确率" min-width="60px" align="center" prop="撒料准确率" />
-              <el-table-column v-if="tab.isTrainNumber" :key="21" sortable label="撒料时间" min-width="70px" align="center" prop="撒料时间" />
-              <el-table-column v-if="tab.isTrainNumber" :key="22" sortable label="等待时间" min-width="70px" align="center" prop="等待时间" />
-              <el-table-column :key="23" sortable label="撒料自动跳转次数" width="65px" align="center" prop="撒料自动跳转次数" />
-              <el-table-column :key="24" sortable label="撒料手动跳转次数" width="65px" align="center" prop="撒料手动跳转次数" />
-              <el-table-column :key="25" sortable label="取消次数" min-width="70px" align="center" prop="取消次数" />
-              <el-table-column :key="26" sortable label="撒料正确数" min-width="70px" align="center" prop="撒料正确数" />
-              <el-table-column :key="27" sortable label="撒料正确率" min-width="70px" align="center" prop="撒料正确率" />
-              <el-table-column :key="28" sortable label="去除取消正确率" min-width="65px" align="center" prop="去除取消正确率" />
-              <el-table-column :key="29" sortable label="标准差" min-width="60px" align="center" prop="方差" />
-              <el-table-column v-if="activeName=='first' && tab.table2.list !== null" :key="30" align="center" width="70" label="操作" class-name="small-padding fixed-width" fixed="right">
+              <u-table-column v-if="tab.checked && !tab.isTrainNumber" :key="0" sortable label="日期" min-width="70px" align="center" prop="计划时间" />
+              <u-table-column v-if="tab.isTrainNumber" :key="117" sortable label="日期" min-width="70px" align="center" prop="计划时间1" />
+              <u-table-column v-if="tab.isTrainNumber" :key="113" sortable label="配方名称" min-width="70px" align="center" prop="templetname" />
+              <u-table-column v-if="tab.isTrainNumber" :key="114" sortable label="车辆名称" min-width="70px" align="center" prop="TMR名称" />
+              <u-table-column v-if="tab.isTrainNumber" :key="115" sortable label="开始加料时间" min-width="70px" align="center" prop="startTime" />
+              <u-table-column v-if="tab.isTrainNumber" :key="116" sortable label="结束加料时间" min-width="70px" align="center" prop="endTime" />
+              <u-table-column v-if="tab.isDriver" :key="1" sortable label="驾驶员" min-width="70px" align="center" prop="驾驶员" />
+              <u-table-column v-if="tab.isFormulaName" :key="2" sortable label="配方名称" min-width="70px" align="center" prop="配方名称" />
+              <u-table-column v-if="tab.isHouseName" :key="3" sortable label="栏舍名称" min-width="70px" align="center" prop="栏舍名称" />
+              <u-table-column v-if="tab.isLivestockType" :key="4" sortable label="牲畜类别" min-width="70px" align="center" prop="牲畜类别" />
+              <u-table-column v-if="tab.isTrainNumber" :key="5" sortable label="车次" min-width="70px" align="center" prop="车次" />
+              <u-table-column v-if="tab.isTrainNumber" :key="6" sortable label="班次" min-width="70px" align="center" prop="班次" />
+              <u-table-column v-if="tab.isTrainNumber" :key="7" sortable label="TMR名称" min-width="70px" align="center" prop="TMR名称" />
+              <u-table-column v-if="tab.isTrainNumber" :key="8" sortable label="驾驶员" min-width="70px" align="center" prop="驾驶员" />
+              <u-table-column v-if="tab.isTMRName" :key="9" sortable label="TMR名称" min-width="70px" align="center" prop="TMR名称" />
+              <u-table-column v-if="tab.isTMRName" :key="10" sortable label="班次" min-width="70px" align="center" prop="班次" />
+              <u-table-column v-if="tab.isTMRName" :key="11" sortable label="车次" min-width="70px" align="center" prop="车次" />
+              <u-table-column v-if="tab.isTMRName" :key="12" sortable label="驾驶员" min-width="70px" align="center" prop="驾驶员" />
+              <u-table-column v-if="tab.isFeed" :key="13" sortable label="饲料" min-width="70px" align="center" prop="饲料" />
+              <u-table-column :key="14" sortable label="理论重量" min-width="60px" align="center" prop="理论重量" />
+              <u-table-column :key="15" sortable label="实际重量" min-width="60px" align="center" prop="实际重量" />
+              <u-table-column :key="16" sortable label="计划撒料操作数" min-width="60px" align="center" prop="计划撒料操作数" />
+              <u-table-column :key="17" sortable label="已撒料操作数" min-width="50px" align="center" prop="已撒料操作数" />
+              <u-table-column :key="18" sortable label="撒料操作率" min-width="60px" align="center" prop="撒料操作率" />
+              <u-table-column :key="19" sortable label="撒料误差值" min-width="60px" align="center" prop="撒料误差值" />
+              <u-table-column :key="20" sortable label="撒料准确率" min-width="60px" align="center" prop="撒料准确率" />
+              <u-table-column v-if="tab.isTrainNumber" :key="21" sortable label="撒料时间" min-width="70px" align="center" prop="撒料时间" />
+              <u-table-column v-if="tab.isTrainNumber" :key="22" sortable label="发料开始时间" min-width="70px" align="center" prop="startMaterialTime" />
+              <u-table-column v-if="tab.isTrainNumber" :key="23" sortable label="等待时间" min-width="70px" align="center" prop="等待时间" />
+              <u-table-column :key="24" sortable label="撒料自动跳转次数" width="65px" align="center" prop="撒料自动跳转次数" />
+              <u-table-column :key="25" sortable label="撒料手动跳转次数" width="65px" align="center" prop="撒料手动跳转次数" />
+              <u-table-column :key="26" sortable label="取消次数" min-width="70px" align="center" prop="取消次数" />
+              <u-table-column :key="27" sortable label="撒料正确数" min-width="70px" align="center" prop="撒料正确数" />
+              <u-table-column :key="28" sortable label="撒料正确率" min-width="70px" align="center" prop="撒料正确率" />
+              <u-table-column :key="29" sortable label="去除取消正确率" min-width="65px" align="center" prop="去除取消正确率" />
+              <u-table-column :key="30" sortable label="标准差" min-width="60px" align="center" prop="方差" />
+              <u-table-column :key="31" v-if="tab.isTrainNumber" sortable label="区域" min-width="60px" align="center" prop="barname" />
+              <u-table-column v-if="activeName=='first' && tab.table2.list !== null" :key="32" align="center" width="70" label="操作" class-name="small-padding fixed-width" fixed="right">
                 <template slot-scope="{row}">
                   <el-button class="miniSuccess" icon="el-icon-search" @click="handleSee('2',row)" />
                 </template>
-              </el-table-column>
-              <el-table-column v-else :key="30" align="center" width="70" label="操作" class-name="small-padding fixed-width">
+              </u-table-column>
+              <u-table-column v-else :key="30" align="center" width="70" label="操作" class-name="small-padding fixed-width">
                 <template slot-scope="{row}">
                     <el-button class="miniSuccess" icon="el-icon-search" @click="handleSee('2',row)" />
                   </template>
-                </el-table-column>
-            </el-table>
+                </u-table-column>
+            </u-table>
             <span v-if="tab.table2.listLoading == false" style="margin-right: 30px;margin-top: 10px;font-size: 14px;">共{{ tab.table2.total }}条</span>
           </div>
         </div>
@@ -580,8 +603,16 @@
                 <h4>栏舍撒料时间统计</h4>
                 <div v-if="tab.chart7.isChart" class="button">
                   <div class="chartButton">
+                    <!-- 君盛-->
+                    <!-- <el-select v-model="tab.chart7.getdataListParm.parammaps.statisticsList" multiple  placeholder="请选择" collapse-tags @change="changeStatisticChart7">
+                      <el-option v-for="item in tab.chart7.statisticsList" :key="item.name" :label="item.name" :value="item.name" />
+                    </el-select> -->
+                    <!-- 其他牧场  -->
                     <my-select ref="tenantselect" :model="tab.chart7.getdataListParm.parammaps.statisticsList" :option="tab.chart7.statisticsList"  :value="'name'" :label="'name'" style="width: 150px;margin-right: 5px;float: left;" placeholder="请选择统计参数" @searchSelect="changeStatisticChart7" />
-                    <el-radio-group v-model="tab.chart7.getdataListParm.parammaps.specificDate" class="specificDate" size="mini" style="display: inline-block;" @change="changeChartSpecificDate('chart7')">
+                    <el-select v-model="tab.chart7.getdataListParm.parammaps.ftId" multiple collapse-tags placeholder="请选择"  @change="changeformula()">
+                      <el-option v-for="item in tab.chart7.formulaList" :key="item.id" :label="item.tname" :value="item.id" />
+                    </el-select>
+                    <el-radio-group v-model="tab.chart7.getdataListParm.parammaps.specificDate" class="specificDate" size="mini" style="display: inline-block;margin-left: 10px;" @change="changeChartSpecificDate('chart7')">
                       <el-radio-button label="1" border>日</el-radio-button>
                       <el-radio-button label="3" border>月</el-radio-button>
                     </el-radio-group>
@@ -635,6 +666,7 @@
             </el-col>
           </el-row>
         </div>
+      </div>
       </el-tab-pane>
       <el-tab-pane label="混料统计" name="second">
         <div class="search" ref="myHeightSecond">
@@ -668,6 +700,9 @@
             <span>-</span>
             <el-input-number :controls="false" :precision="2" v-model="tab2.table.getdataListParm.parammaps.hlzql2" placeholder="混料正确率" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
           </div>
+          <el-select v-model="tab2.table.getdataListParm.parammaps.premix" filterable placeholder="是否预混计划" class="filter-item" style="width: 120px;" clearable>
+            <el-option v-for="item in tab2.premixList" :key="item.id" :label="item.name" :value="item.id" />
+          </el-select>
           <el-checkbox v-model="tab2.table.getdataListParm.parammaps.error" style="margin-right: 10px;">只看超出预设值数据</el-checkbox>
 
           <el-button class="successBorder" style="margin-top: 5px;" @click="form_search2">查询</el-button>
@@ -692,13 +727,15 @@
           >
             <u-table-column sortable label="日期" min-width="70px" align="center" prop="日期" />
             <u-table-column sortable label="TMR名称" min-width="70px" align="center" prop="TMR名称" />
+            <u-table-column sortable label="操作编号" min-width="70px" align="center" prop="sort" />
             <u-table-column sortable label="车次" min-width="50px" align="center" prop="车次" />
             <u-table-column sortable label="班次" min-width="50px" align="center" prop="班次" />
-           <u-table-column sortable label="配方名称" min-width="70px" align="center" prop="配方名称">
+            <u-table-column sortable label="配方名称" min-width="70px" align="center" prop="配方名称">
               <template slot-scope="{row}">
                 <a @click="clickRecipeName2(row)" style="text-decoration: underline;color: #0000FF;">{{ row.配方名称 }}</a>
               </template>
             </u-table-column>
+            <u-table-column sortable label="驾驶员" min-width="50px" align="center" prop="驾驶员" />
             <u-table-column sortable label="饲料" min-width="70px" align="center" prop="饲料">
               <template slot-scope="{row}">
                 <a @click="clickFeed2(row)" style="text-decoration: underline;color: #0000FF;">{{ row.饲料 }}</a>
@@ -716,6 +753,8 @@
             <u-table-column sortable label="开始重量" min-width="55px" align="center" prop="开始重量" />
             <u-table-column sortable label="结束重量" min-width="55px" align="center" prop="结束重量" />
             <u-table-column sortable label="车次描述" min-width="55px" align="center" prop="remark" />
+            <u-table-column sortable label="是否达标" min-width="70px" align="center" prop="standard" />
+            <u-table-column sortable label="区域" min-width="70px" align="center" prop="barname" />
           </u-table>
           <span v-if="tab2.table.listLoading == false" style="margin-right: 30px;margin-top: 10px;font-size: 14px;">共{{ tab2.table.total }}条</span>
         </div>
@@ -776,6 +815,7 @@
           >
             <u-table-column sortable label="日期" min-width="70px" align="center" prop="日期" />
             <u-table-column sortable label="TMR名称" min-width="70px" align="center" prop="TMR名称" />
+            <u-table-column sortable label="操作编号" min-width="70px" align="center" prop="sort" />
             <u-table-column sortable label="车次" min-width="45px" align="center" prop="车次" />
             <u-table-column sortable label="班次" min-width="45px" align="center" prop="班次" />
             <u-table-column sortable label="配方名称" min-width="70px" align="center" prop="配方名称">
@@ -783,6 +823,7 @@
                 <a @click="clickRecipeName3(row)" style="text-decoration: underline;color: #0000FF;">{{ row.配方名称 }}</a>
               </template>
             </u-table-column>
+            <u-table-column sortable label="驾驶员" min-width="50px" align="center" prop="驾驶员" />
             <u-table-column sortable label="栏舍" min-width="70px" align="center" prop="栏舍">
               <template slot-scope="{row}">
                 <a @click="clickFence3(row)" style="text-decoration: underline;color: #0000FF;">{{ row.栏舍 }}</a>
@@ -797,6 +838,7 @@
             <u-table-column sortable label="跳转方式" min-width="55px" align="center" prop="跳转方式" />
             <u-table-column sortable label="开始重量" min-width="55px" align="center" prop="开始重量" />
             <u-table-column sortable label="结束重量" min-width="55px" align="center" prop="结束重量" />
+            <u-table-column sortable label="是否达标" min-width="70px" align="center" prop="standard" />
           </u-table>
           <span v-if="tab3.table.listLoading == false" style="margin-right: 30px;margin-top: 10px;font-size: 14px;">共{{ tab3.table.total }}条</span>
         </div>
@@ -1378,6 +1420,7 @@ export default {
               startTime: parseTime(new Date(), '{y}-{m}-{d}'),
               stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
               inputDatetime: [new Date(), new Date()],
+              inputDate:null,
               fname: '',
               sort: '',
               times: ''
@@ -1673,6 +1716,7 @@ export default {
           listLoading: true,
           statisticsList: [],
           chart7Data3: [],
+          formulaList:[],
           isChart: true,
           isTable: false,
           table: {
@@ -1687,6 +1731,7 @@ export default {
 
       tab2: {
         TMRNameList:[],
+        premixList:[{id:0,name:'预混'},{id:1,name:'非预混'}],
         table: {
           getdataListParm: {
             name: 'getStatisticsHL',
@@ -1705,7 +1750,8 @@ export default {
               times: '',
               buttontype: '',
               templetname: '',
-              isuse: ''
+              isuse: '',
+              premix:''
             }
           },
           tableKey: 1,
@@ -1776,6 +1822,7 @@ export default {
       },
       isokDisable:false,
       // search
+      myHeight1: document.documentElement.clientHeight - 85 - 80,
       myHeight2: document.documentElement.clientHeight - 85 - 150,
       myHeightSecond: '',
       myHeightThird:'',
@@ -1846,16 +1893,33 @@ export default {
     this.getIsDisplay()
     this.getTabList()
     this.getTabList2()
-    this.getChart1()
-    this.getChart2()
-    this.getChart3()
-    this.getChart4()
-    this.getChart5()
-    this.getChart6()
-    this.getChart7()
+    this.getformulaList()
+    // 暂时注释
+    // this.getChart1()
+    // this.getChart2()
+    // this.getChart3()
+    // this.getChart4()
+    // this.getChart5()
+    // this.getChart6()
   },
   mounted() {},
   methods: {
+    // tab.chart7.formulaList
+    getformulaList() {
+      let url = 'authdata/GetDataByName'
+      let data = {
+        "name":"getFeedTempletName",
+        "page":1,"offset":1,"pagecount":"","returntype":"Map",
+        "parammaps":{"pastureid":Cookies.get('pastureid')},
+      }
+      postJson(url, data).then(response => {
+        if (response.data.list !== null) {
+          this.tab.chart7.formulaList = response.data.list
+        } else {
+          this.tab.chart7.formulaList = []
+        }
+      })
+    },
     getAllYear() {
       var myDate = new Date()
       var thisYear = myDate.getFullYear() // 获取当年年份
@@ -2601,14 +2665,14 @@ export default {
         } else if (this.tab.radio == '4') {
           var excelDatas4 = [
             {
-              tHeader: ['日期', 'TMR名称', '车次', '班次', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料时间','等待时间','混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率',  '标准差'],
-              filterVal: ['计划时间','TMR名称',  '车次', '班次', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料时间','等待时间','混料自动跳转次数', '混料手动跳转次数', '取消次数', '混料正确数','混料正确率','去除取消正确率', '方差'],
+              tHeader: ['日期','配方名称','车辆名称','开始加料时间','结束加料时间', 'TMR名称', '车次', '班次', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料时间','发料开始时间','等待时间','混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率',  '标准差','区域'],
+              filterVal: ['计划时间1','templetname','TMR名称','startTime','endTime','TMR名称',  '车次', '班次', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料时间','startMaterialTime','等待时间','混料自动跳转次数', '混料手动跳转次数', '取消次数', '混料正确数','混料正确率','去除取消正确率', '方差','barname'],
               tableDatas: this.tab.table.list,
               sheetName: '混料'
             },
             {
-              tHeader: ['日期', 'TMR名称', '车次','班次', '驾驶员','理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料时间','等待时间','撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率',  '标准差'],
-              filterVal: ['计划时间', 'TMR名称', '车次','班次', '驾驶员', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率','撒料时间','等待时间', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率',  '方差'],
+              tHeader: ['日期','配方名称','车辆名称','开始加料时间','结束加料时间', 'TMR名称', '车次','班次', '驾驶员','理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料时间','发料开始时间','等待时间','撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率',  '标准差','区域'],
+              filterVal: ['计划时间1','templetname','TMR名称','startTime','endTime', 'TMR名称', '车次','班次', '驾驶员', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率','撒料时间','startMaterialTime','等待时间', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率',  '方差','barname'],
               tableDatas: this.tab.table2.list,
               sheetName: '撒料'
             }
@@ -2725,14 +2789,14 @@ export default {
         } else if (this.tab.radio == '4') {
           var excelDatas4 = [
             {
-              tHeader: ['TMR名称', '车次', '班次', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料时间','等待时间','混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率',  '标准差'],
-              filterVal: ['TMR名称',  '车次', '班次', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料时间','等待时间','混料自动跳转次数', '混料手动跳转次数', '取消次数', '混料正确数','混料正确率','去除取消正确率', '方差'],
+              tHeader: ['日期','配方名称','车辆名称','开始加料时间','结束加料时间','TMR名称', '车次', '班次', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料时间','发料开始时间','等待时间','混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率',  '标准差','区域'],
+              filterVal: ['计划时间1','templetname','TMR名称','startTime','endTime','TMR名称',  '车次', '班次', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料时间','startMaterialTime','等待时间','混料自动跳转次数', '混料手动跳转次数', '取消次数', '混料正确数','混料正确率','去除取消正确率', '方差','barname'],
               tableDatas: this.tab.table.list,
               sheetName: '混料'
             },
             {
-              tHeader: ['TMR名称', '车次','班次', '驾驶员','理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料时间','等待时间','撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率',  '标准差'],
-              filterVal: ['TMR名称', '车次','班次', '驾驶员', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率','撒料时间','等待时间', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率',  '方差'],
+              tHeader: ['日期','配方名称','车辆名称','开始加料时间','结束加料时间','TMR名称', '车次','班次', '驾驶员','理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料时间','发料开始时间','等待时间','撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率',  '标准差','区域'],
+              filterVal: ['计划时间1','templetname','TMR名称','startTime','endTime','TMR名称', '车次','班次', '驾驶员', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率','撒料时间','startMaterialTime','等待时间', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率',  '方差','barname'],
               tableDatas: this.tab.table2.list,
               sheetName: '撒料'
             }
@@ -2810,7 +2874,6 @@ export default {
         this.getChart4()
         this.getChart5()
         this.getChart6()
-        this.getChart7()
         this.$nextTick(() => {
           this.$refs.plTable3.doLayout()
           this.$refs.plTable3.doLayout()
@@ -2999,11 +3062,13 @@ export default {
       }
       data.parammaps = this.tab.table.getdataListParm.parammaps
       postJson(url, data).then(response => {
-        if (response.data !== null) {
+        if (response.data !== null && response.data.list !== null) {
           console.log('汇总统计/混料table数据', response.data.list)
+          this.$refs.plTable1.reloadData(response.data.list)
           this.tab.table.list = response.data.list
           this.tab.table.total = response.data.total
         } else {
+          this.$refs.plTable2.reloadData([])
           this.tab.table.list = []
           this.tab.table.total = 0
         }
@@ -3032,6 +3097,9 @@ export default {
       this.tab.table2.getdataListParm.parammaps.slzq2 = this.tab.table.getdataListParm.parammaps.slzq2
       this.tab.table2.getdataListParm.parammaps.slzql1 = this.tab.table.getdataListParm.parammaps.slzql1
       this.tab.table2.getdataListParm.parammaps.slzql2 = this.tab.table.getdataListParm.parammaps.slzql2
+      this.tab.table2.getdataListParm.parammaps.templetname = this.tab.table.getdataListParm.parammaps.templetname
+      this.tab.table2.getdataListParm.parammaps.startdate = this.tab.table.getdataListParm.parammaps.startdate
+      this.tab.table2.getdataListParm.parammaps.enddate = this.tab.table.getdataListParm.parammaps.enddate
       this.tab.table2.getdataListParm.parammaps.error = this.tab.table.getdataListParm.parammaps.error
       let url = 'authdata/summary'
       let data = {}
@@ -3042,11 +3110,13 @@ export default {
       }
       data.parammaps = this.tab.table2.getdataListParm.parammaps
       postJson(url, data).then(response => {
-        if (response.data !== null) {
+        if (response.data !== null && response.data.list !== null) {
           console.log('汇总统计/撒料table数据', response.data.list)
+          this.$refs.plTable22.reloadData(response.data.list)
           this.tab.table2.list = response.data.list
           this.tab.table2.total = response.data.total
         } else {
+          this.$refs.plTable22.reloadData([])
           this.tab.table2.list = []
           this.tab.table2.total = 0
         }
@@ -3177,6 +3247,9 @@ export default {
       this.tab.table.getdataListParm.parammaps.slzq2 = undefined
       this.tab.table.getdataListParm.parammaps.slzql1 = undefined
       this.tab.table.getdataListParm.parammaps.slzql2 = undefined
+      this.tab.table.getdataListParm.parammaps.templetname = ''
+      this.tab.table.getdataListParm.parammaps.startdate = undefined
+      this.tab.table.getdataListParm.parammaps.enddate = undefined
       this.tab.table.getdataListParm.parammaps.error = false
       this.form_search()
     },
@@ -3433,7 +3506,7 @@ export default {
       if (this.tab.chart1.chartLine != null) {
         this.tab.chart1.chartLine.dispose()
       }
-      this.tab.chart1.chartLine = echarts.init(document.getElementById('chartLine1'))
+      this.tab.chart1.chartLine = echarts.init(document.getElementById('chartLine1'),null,{renderer: "svg"})
       var option = {
         title: {
           text: ''
@@ -3458,6 +3531,16 @@ export default {
         },
         xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data2, name: '日期' },
         yAxis: {
+          min:0,  //取0为最小刻度
+          max: 100, //取100为最大刻度
+          min:'min', //取最小值为最小刻度
+          max: 'max', //取最大值为最大刻度
+          min: function(value) {//取最小值向下取整为最小刻度
+            return Math.floor(value.min)
+          },
+          max: function(value) {//取最大值向上取整为最大刻度
+            return  Math.ceil(value.max)
+          },
           type: 'value', name: '百分比', axisLabel: { formatter: '{value} %' }
         },
         series: (function() {
@@ -3544,7 +3627,7 @@ export default {
       if (this.tab.chart2.chartLine != null) {
         this.tab.chart2.chartLine.dispose()
       }
-      this.tab.chart2.chartLine = echarts.init(document.getElementById('chartLine2'))
+      this.tab.chart2.chartLine = echarts.init(document.getElementById('chartLine2'),null,{renderer: "svg"})
       var option = {
         title: {
           text: ''
@@ -3569,6 +3652,16 @@ export default {
         },
         xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data1, name: '日期' },
         yAxis: {
+          min:0,  //取0为最小刻度
+          max: 100, //取100为最大刻度
+          min:'min', //取最小值为最小刻度
+          max: 'max', //取最大值为最大刻度
+          min: function(value) {//取最小值向下取整为最小刻度
+            return Math.floor(value.min)
+          },
+          max: function(value) {//取最大值向上取整为最大刻度
+            return  Math.ceil(value.max)
+          },
           type: 'value', name: '百分比', axisLabel: { formatter: '{value} %' }
         },
         series: [
@@ -3677,7 +3770,7 @@ export default {
       if (this.tab.chart3.chartLine != null) {
         this.tab.chart3.chartLine.dispose()
       }
-      this.tab.chart3.chartLine = echarts.init(document.getElementById('chartLine3'))
+      this.tab.chart3.chartLine = echarts.init(document.getElementById('chartLine3'),null,{renderer: "svg"})
       var option = {
         title: {
           text: ''
@@ -3702,6 +3795,16 @@ export default {
         },
         xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data2, name: '日期' },
         yAxis: {
+          min:0,  //取0为最小刻度
+          max: 100, //取100为最大刻度
+          min:'min', //取最小值为最小刻度
+          max: 'max', //取最大值为最大刻度
+          min: function(value) {//取最小值向下取整为最小刻度
+            return Math.floor(value.min)
+          },
+          max: function(value) {//取最大值向上取整为最大刻度
+            return  Math.ceil(value.max)
+          },
           type: 'value', name: '百分比', axisLabel: { formatter: '{value} %' }
         },
         series: (function() {
@@ -3817,7 +3920,7 @@ export default {
       if (this.tab.chart4.chartLine != null) {
         this.tab.chart4.chartLine.dispose()
       }
-      this.tab.chart4.chartLine = echarts.init(document.getElementById('chartLine4'))
+      this.tab.chart4.chartLine = echarts.init(document.getElementById('chartLine4'),null,{renderer: "svg"})
       var option = {
         title: {
           text: ''
@@ -3842,6 +3945,16 @@ export default {
         },
         xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data2, name: '日期' },
         yAxis: {
+          min:0,  //取0为最小刻度
+          max: 100, //取100为最大刻度
+          min:'min', //取最小值为最小刻度
+          max: 'max', //取最大值为最大刻度
+          min: function(value) {//取最小值向下取整为最小刻度
+            return Math.floor(value.min)
+          },
+          max: function(value) {//取最大值向上取整为最大刻度
+            return  Math.ceil(value.max)
+          },
           type: 'value', name: '百分比', axisLabel: { formatter: '{value} %' }
         },
         series: (function() {
@@ -3926,7 +4039,7 @@ export default {
       if (this.tab.chart5.chartLine != null) {
         this.tab.chart5.chartLine.dispose()
       }
-      this.tab.chart5.chartLine = echarts.init(document.getElementById('chartLine5'))
+      this.tab.chart5.chartLine = echarts.init(document.getElementById('chartLine5'),null,{renderer: "svg"})
       var option = {
         tooltip: {
           trigger: 'axis',
@@ -4050,7 +4163,7 @@ export default {
       if (this.tab.chart6.chartLine != null) {
         this.tab.chart6.chartLine.dispose()
       }
-      this.tab.chart6.chartLine = echarts.init(document.getElementById('chartLine6'))
+      this.tab.chart6.chartLine = echarts.init(document.getElementById('chartLine6'),null,{renderer: "svg"})
       var option = {
         color: ['#3398DB'],
         tooltip: {
@@ -4101,7 +4214,9 @@ export default {
         this.tab.chart6.chartLine.resize()
       }
     },
-
+    changeformula(){
+      this.getChart7()
+    },
     // 栏舍撒料时间统计
     changeStatisticChart7(arr) {
       console.log(arr,'arr')
@@ -4127,6 +4242,19 @@ export default {
       // console.log(JSON.parse(this.tab.chart7.statisticsList),'我要看的下拉数据')
       // console.log(JSON.stringify(this.tab.chart7.statisticsList),'我要看的下拉数据')
       this.roadChartLine7(this.tab.chart7.chartLine_data)
+    },
+     handleScroll() {
+      // 获取滚动容器的DOM元素
+      const scrollContainer = this.$refs.scrollContainer;
+      // 计算滚动条距离底部的距离
+      const distanceToBottom = scrollContainer.scrollHeight - (scrollContainer.scrollTop + scrollContainer.clientHeight);
+
+      // 如果滚动条已经滚到最下方
+      if (distanceToBottom === 0) {
+        console.log('滚动条已经滚到最下方');
+        this.getChart7()
+        // 在这里可以执行相应的操作
+      }
     },
     getChart7() {
       this.tab.chart7.listLoading = true
@@ -4138,11 +4266,13 @@ export default {
         data.parammaps.startTime = parseTime(this.tab.chart7.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
         data.parammaps.stopTime = parseTime(this.tab.chart7.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
         data.parammaps.status = this.tab.chart7.getdataListParm.parammaps.status
+        data.parammaps.ftId = this.tab.chart7.getdataListParm.parammaps.ftId.join(",")
       } else {
         data.parammaps.pastureid = this.tab.chart7.getdataListParm.parammaps.pastureid
         data.parammaps.startTime = this.tab.chart7.getdataListParm.parammaps.startTime
         data.parammaps.stopTime = this.tab.chart7.getdataListParm.parammaps.stopTime
         data.parammaps.status = this.tab.chart7.getdataListParm.parammaps.status
+        data.parammaps.ftId = this.tab.chart7.getdataListParm.parammaps.ftId.join(",")
       }
       postJson(url, data).then(response => {
         if (response.data !== null && response.data.list !== null && response.data.data !== null) {
@@ -4163,13 +4293,16 @@ export default {
           this.tab.chart7.statisticsList = []
           this.tab.chart7.getdataListParm.parammaps.statisticsList = []
           for (let i = 0; i < response.data.list.data1.length; i++) {
+            // 君盛
             // if (i < 10) {
-              this.tab.chart7.getdataListParm.parammaps.statisticsList.push(response.data.list.data1[i])
-              var obj = {}
-              obj.id = i
-              obj.name = response.data.list.data1[i]
-              this.tab.chart7.statisticsList.push(obj)
+            //   this.tab.chart7.getdataListParm.parammaps.statisticsList.push(response.data.list.data1[i])
             // }
+            // 其他牧场
+            this.tab.chart7.getdataListParm.parammaps.statisticsList.push(response.data.list.data1[i])
+            var obj = {}
+            obj.id = i
+            obj.name = response.data.list.data1[i]
+            this.tab.chart7.statisticsList.push(obj)
           }
 
           console.log("------->",this.tab.chart7)
@@ -4204,8 +4337,9 @@ export default {
       if (this.tab.chart7.chartLine != null) {
         this.tab.chart7.chartLine.dispose()
       }
-      this.tab.chart7.chartLine = echarts.init(document.getElementById('chartLine7'))
+      this.tab.chart7.chartLine = echarts.init(document.getElementById('chartLine7'),null,{renderer: "svg"})
       var option = {
+        useWorker: true,
         title: {
           text: ''
         },
@@ -4533,8 +4667,8 @@ export default {
         }
         var excelDatasTab2 = [
           {
-            tHeader: ['日期', 'TMR名称', '车次', '班次', '配方名称', '饲料', '理论重量', '实际重量', '误差值', '准确率', '计划时间', '开始时间', '结束时间', ' 跳转方式', '开始重量', '结束重量', '搅拌时间'],
-            filterVal: ['日期', 'TMR名称', '车次', '班次', '配方名称', '饲料', '理论重量', '实际重量', '误差值', '准确率', '计划时间', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间'],
+            tHeader: ['日期', 'TMR名称', '操作编号','车次', '班次', '配方名称','驾驶员',  '饲料', '理论重量', '实际重量', '误差值', '准确率', '计划时间', '开始时间', '结束时间', ' 跳转方式', '开始重量', '结束重量', '搅拌时间','是否达标','区域'],
+            filterVal: ['日期', 'TMR名称','sort', '车次', '班次', '配方名称','驾驶员',  '饲料', '理论重量', '实际重量', '误差值', '准确率', '计划时间', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间','standard','barname'],
             tableDatas: exportList,
             sheetName: '混料统计'
           }
@@ -4634,8 +4768,8 @@ export default {
         }
         var excelDatasTab3 = [
           {
-            tHeader: ['日期', 'TMR名称', '车次', '班次', '配方名称', '栏舍', '理论重量', '实际重量', '误差值', '准确率', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间'],
-            filterVal: ['日期', 'TMR名称', '车次', '班次', '配方名称', '栏舍', '理论重量', '实际重量', '误差值', '准确率', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间'],
+            tHeader: ['日期', 'TMR名称','操作编号', '车次', '班次', '配方名称','驾驶员', '栏舍', '理论重量', '实际重量', '误差值', '准确率', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间','是否达标',],
+            filterVal: ['日期', 'TMR名称','sort', '车次', '班次', '配方名称','驾驶员', '栏舍', '理论重量', '实际重量', '误差值', '准确率', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间','standard'],
             tableDatas: exportList,
             sheetName: '撒料统计'
           }

+ 275 - 64
src/views/statisticalAnalysis/feedingEfficiency/pasture/index.vue

@@ -48,12 +48,13 @@
             <el-table-column sortable label="撒料量(kg)" min-width="60px" align="center" prop="撒料量" />
             <el-table-column sortable label="平均混料时间" min-width="70px" align="center" prop="混料时间" />
             <el-table-column sortable label="转投剩料量(kg)" min-width="70px" align="center" prop="转投剩料量" />
-            <el-table-column sortable label="日剩料量(kg)" min-width="70px" align="center" prop="今日剩料量" />
+            <el-table-column sortable label="日剩料量(kg)" min-width="70px" align="center" prop="今日剩料量" />
             <el-table-column sortable label="剩料率(%)" min-width="60px" align="center" prop="剩料率" />
             <el-table-column sortable label="TMR干物质(%)" min-width="65px" align="center" prop="TMR干物质" />
             <el-table-column sortable label="配方干物质采食量(kg/头)" min-width="80px" align="center" prop="配方干物质采食量" />
             <el-table-column sortable label="实际干物质采食量(kg/头)" min-width="80px" align="center" prop="实际干物质采食量" />
             <el-table-column sortable label="采食率(%)" min-width="60px" align="center" prop="采食率" />
+            <el-table-column sortable label="配方理论成本" min-width="60px" align="center" prop="feedtempletPrice" />
             <el-table-column sortable label="配方成本(元/头)" min-width="65px" align="center" prop="配方成本" />
             <el-table-column sortable label="实际成本(元/头)" min-width="65px" align="center" prop="实际成本" />
             <el-table-column sortable label="产奶量(kg/头)" min-width="65px" align="center" prop="产奶量" />
@@ -92,26 +93,31 @@
           <el-row :gutter="10" class="dashboard-editor-container">
             <el-col :span="12">
               <div class="grid-content">
-                <h4 style="text-align:center;">泌乳牛干物质采食量</h4>
+                <h4 style="text-align:center;">干物质采食量</h4>
                 <div v-if="tab.chart1.isChart" class="button">
                   <div class="chartButton">
-                    <el-radio-group v-model="tab.chart1.getdataListParm.parammaps.specificDate" class="specificDate" size="mini" style="display: inline-block;" @change="changeChartSpecificDate('chart1')">
+                    <my-select ref="tenantselect" :model="tab.chart1.getdataListParm.parammaps.statisticsList" :option="tab.chart1.statisticsList" :value="'name'" :label="'name'" style="width: 150px;margin-right: 5px;margin-top: 5px;float: left;" placeholder="请选择统计参数" @searchSelect="changeStatisticChart1" />
+                    <el-select v-model="tab.chart1.getdataListParm.parammaps.bigcowclass" filterable placeholder="牲畜类别" class="filter-item" clearable style="width: 150px;margin-right: 5px;margin-top: 5px;" @change="changeLivestockType">
+                      <el-option v-for="item in tab.chart1.livestockTypeList" :key="item.value" :label="item.label" :value="item.label" />
+                    </el-select>
+                    <el-radio-group v-model="tab.chart1.getdataListParm.parammaps.specificDate" class="specificDate" size="mini" style="display: inline-block;margin-right: 10px;" @change="changeChartSpecificDate('chart1')">
                       <el-radio-button label="1" border>日</el-radio-button>
                       <!-- <el-radio-button label="2" border>周</el-radio-button> -->
                       <el-radio-button label="3" border>月</el-radio-button>
                     </el-radio-group>
-                    <div v-show="tab.chart1.getdataListParm.parammaps.specificDate == '1'" class="day" style="display: inline-block;margin-left:10px;">
+                    <!-- <br/> -->
+                    <div v-show="tab.chart1.getdataListParm.parammaps.specificDate == '1'" class="day" style="display: inline-block;margin-top: 5px;">
                       <el-date-picker v-model="tab.chart1.getdataListParm.parammaps.inputDatetime" style="width:220px;" :clearable="false" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptionsDate" />
                     </div>
-                    <div v-show="tab.chart1.getdataListParm.parammaps.specificDate == '2'" class="week" style="display: inline-block; clear: both;margin-left:10px;">
-                      <el-select v-model="tab.chart1.getdataListParm.parammaps.selectYear" class="filter-item" style="width:80px;margin-right:10px;" placeholder="年份" @change="changeChartYear('chart1')">
+                    <div v-show="tab.chart1.getdataListParm.parammaps.specificDate == '2'" class="week" style="display: inline-block; clear: both;">
+                      <el-select v-model="tab.chart1.getdataListParm.parammaps.selectYear" class="filter-item" style="width:80px;margin-right:10px;margin-top: 5px;" placeholder="年份" @change="changeChartYear('chart1')">
                         <el-option v-for="item in tab.yearList" :key="item" :label="item" :value="item" />
                       </el-select>
                       <el-select v-model="tab.chart1.getdataListParm.parammaps.selectWeek" class="filter-item" style="width:160px;" multiple :multiple-limit="2" placeholder="请选择周">
                         <el-option v-for="(item,index) in tab.chart1.getdataListParm.parammaps.weekList" :key="index" :label="item.name" :value="item.id" />
                       </el-select>
                     </div>
-                    <div v-show="tab.chart1.getdataListParm.parammaps.specificDate == '3'" class="month" style="display: inline-block;margin-left:10px;">
+                    <div v-show="tab.chart1.getdataListParm.parammaps.specificDate == '3'" class="month" style="display: inline-block;">
                       <el-date-picker v-model="tab.chart1.getdataListParm.parammaps.chartMonth" style="width:220px;" :clearable="false" value-format="yyyy-MM-dd" type="monthrange" class="inputDatetime filter-item" range-separator="至" :picker-options="pickerOptionsMonth" />
                     </div>
                     <el-button class="successBorder" style="margin-left:10px;" @click="handleChartDate('chart1')">确认</el-button>
@@ -142,8 +148,8 @@
                     class="elTable table-fixed"
                   >
                     <el-table-column label="日期" sortable min-width="110px" align="center" prop="日期" />
-                    <el-table-column label="泌乳牛采食量(kg)" sortable min-width="110px" align="center" prop="field1" />
-                    <el-table-column label="泌乳牛产奶量(kg)" sortable min-width="110px" align="center" prop="field2" />
+                    <el-table-column label="采食量(kg)" sortable min-width="110px" align="center" prop="field1" />
+                    <el-table-column label="产奶量(kg)" sortable min-width="110px" align="center" prop="field2" />
                   </el-table>
                 </div>
               </div>
@@ -216,6 +222,7 @@
                 <h4 style="text-align:center;">混料时间统计</h4>
                 <div v-if="tab.chart3.isChart" class="button">
                   <div class="chartButton">
+                    <my-select ref="tenantselect" :model="tab.chart3.getdataListParm.parammaps.statisticsList" :option="tab.chart3.statisticsList" :value="'name'" :label="'name'" style="width: 150px;margin-right: 5px;float: left;" placeholder="请选择统计参数" @searchSelect="changeStatisticChart3" />
                     <el-radio-group v-model="tab.chart3.getdataListParm.parammaps.specificDate" class="specificDate" size="mini" style="display: inline-block;" @change="changeChartSpecificDate('chart3')">
                       <el-radio-button label="1" border>日</el-radio-button>
                       <!-- <el-radio-button label="2" border>周</el-radio-button> -->
@@ -263,7 +270,8 @@
                     class="elTable table-fixed"
                   >
                     <el-table-column sortable label="日期" min-width="110px" align="center" prop="日期" />
-                    <el-table-column sortable label="混料时间(分钟)" min-width="110px" align="center" prop="field1" />
+                    <el-table-column sortable label="配方名称" min-width="110px" align="center" prop="名称" />
+                    <el-table-column sortable label="时间(分钟)" min-width="110px" align="center" prop="准确率" />
                   </el-table>
                 </div>
               </div>
@@ -540,7 +548,7 @@
 import echarts from 'echarts'
 
 require('echarts/theme/macarons')
-import { GetDataByName, postJson, GetReportform, whichWeek } from '@/api/common'
+import { GetDataByName, postJson, GetReportform, whichWeek,GetDataByNames } from '@/api/common'
 import Cookies from 'js-cookie'
 import { parseTime } from '@/utils/index.js'
 import Pagination from '@/components/Pagination'
@@ -677,6 +685,7 @@ export default {
         chart1: {
           chartLine: null,
           chartLine_data: {},
+          livestockTypeList: [], // 牲畜类别
           getdataListParm: {
             name: 'getFeedEffMR',
             page: 1,
@@ -694,13 +703,16 @@ export default {
               chartMonth: '',
               yearList: [],
               weekList: [],
-              status: 0
+              status: 0,
+              ccname:''
             }
           },
           tableKey: 1,
           list: [],
           total: 0,
           listLoading: true,
+          statisticsList:[],
+          chart1Data3:[],
           isChart: true,
           isTable: false,
           table: {
@@ -777,6 +789,8 @@ export default {
           list: [],
           total: 0,
           listLoading: true,
+          statisticsList: [],
+          chart3Data3: [],
           isChart: true,
           isTable: false,
           table: {
@@ -955,6 +969,9 @@ export default {
       tab2Download2List3:[],
       tab2Download2List4:[],
       frequencyList:[],
+      requestParams: [
+        {"name":"getCowclassList","page":1,"offset":1,"pagecount":50,"returntype":"Map","parammaps":{"pastureid":Cookies.get('pastureid'),"classname":"","parentname":"","enable":1}},
+      ],
       rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
       cellStyle: { padding: 0 + 'px' },
       myHeight: document.documentElement.clientHeight - 85 - 210
@@ -962,6 +979,7 @@ export default {
   },
   created() {
     this.getAllYear()
+    this.getDownList()
     this.getTabList()
     this.getTimeFn()
     this.getChart1()
@@ -972,6 +990,15 @@ export default {
     this.getIsDisplay()
   },
   methods: {
+    getDownList() {
+      GetDataByNames(this.requestParams).then(response => {
+        this.tab.chart1.livestockTypeList = response.data.getCowclassList.list
+        for(var i=0;i<this.tab.chart1.livestockTypeList.length;i++){
+        	this.tab.chart1.livestockTypeList[i].label = this.tab.chart1.livestockTypeList[i].classname;
+        	this.tab.chart1.livestockTypeList[i].value = this.tab.chart1.livestockTypeList[i].id;
+        }
+      })
+    },
     getIsDisplay() {
       GetDataByName(this.tab.maxTime.getMaxTimesParm).then(response => {
         console.log(response.data.list[0].inforvalue)
@@ -1413,13 +1440,19 @@ export default {
       const end = new Date()
       const start = new Date()
       const start2 = new Date()
+      const end2 = new Date()
       start2.setTime(start2.getTime() - 3600 * 1000 * 24 * 1)
+      end2.setTime(end2.getTime() - 3600 * 1000 * 24 * 1)
       start.setTime(start.getTime() - 3600 * 1000 * 24 * 10)
       end.setTime(end.getTime() - 3600 * 1000 * 24 * 1)
 
       that.tab.table.getdataListParm.parammaps.date = parseTime(start2, '{y}-{m}-{d}')
       that.tab.table.getdataListParm.parammaps.startTime = parseTime(start2, '{y}-{m}-{d}')
-      that.tab.table.getdataListParm.parammaps.stopTime = parseTime(start2, '{y}-{m}-{d}')
+      that.tab.table.getdataListParm.parammaps.stopTime = parseTime(end2, '{y}-{m}-{d}')
+      that.tab.table.getdataListParm.parammaps.inputDatetime = [start2, end2]
+      // that.tab.table.getdataListParm.parammaps.inputDatetime = [startTime,stopTime]
+      // that.tab.table.getdataListParm.parammaps.inputDatetime[0] = parseTime(start2, '{y}-{m}-{d}')
+      // that.tab.table.getdataListParm.parammaps.inputDatetime[1] = parseTime(start2, '{y}-{m}-{d}')
 
       // start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
       that.tab.chartDate[0] = parseTime(start, '{y}-{m}-{d}')
@@ -1476,8 +1509,8 @@ export default {
         if (this.tab.radio == '1') {
           var excelDatas = [
             {
-              tHeader: ['配方模板', '实际牛头数', '应混料量(kg)', '实际混料量(kg)', '撒料量(kg)', '平均混料时间(min)', '转投剩料量(kg)', '今日剩料量(kg)', '剩料率(%)', 'TMR干物质(%)', '配方干物质采食量(kg/头)', '实际干物质采食量(kg/头)', '采食率(%)', '配方成本(元/头 )', '实际成本(元/ 头)', '产奶量(kg /头)', '饲料转化率', '公斤奶饲料成本'],
-              filterVal: ['配方模板', '实际牛头数', '应混料量', '实际混料量', '撒料量', '混料时间', '转投剩料量', '今日剩料量', '剩料率', 'TMR干物质', '配方干物质采食量', '实际干物质采食量', '采食率', '配方成本', '实际成本', '产奶量', '饲料转化率', '公斤奶饲料成本'],
+              tHeader: ['配方模板', '实际牛头数', '应混料量(kg)', '实际混料量(kg)', '撒料量(kg)', '平均混料时间(min)', '转投剩料量(kg)', '今日剩料量(kg)', '剩料率(%)', 'TMR干物质(%)', '配方干物质采食量(kg/头)', '实际干物质采食量(kg/头)', '采食率(%)','配方理论成本', '配方成本(元/头 )', '实际成本(元/ 头)', '产奶量(kg /头)', '饲料转化率', '公斤奶饲料成本'],
+              filterVal: ['配方模板', '实际牛头数', '应混料量', '实际混料量', '撒料量', '混料时间', '转投剩料量', '今日剩料量', '剩料率', 'TMR干物质', '配方干物质采食量', '实际干物质采食量', '采食率','feedtempletPrice', '配方成本', '实际成本', '产奶量', '饲料转化率', '公斤奶饲料成本'],
               tableDatas: this.tab.table.list,
               sheetName: '配方'
             }
@@ -1486,8 +1519,8 @@ export default {
         } else if (this.tab.radio == '2') {
           var excelDatas2 = [
             {
-              tHeader: ['栏舍', '配方模板', '实际牛头数', '应混料量(kg)', '实际混料量(kg)', '撒料量(kg)', '平均混料时间(min)', '转投剩料量(kg)', '今日剩料量(kg)', '剩料率(%)', 'TMR干物质(%)', '配方干物质采食量(kg/头)', ' 实际干物质采食量( kg/头)', '采食率 (%)', '配方成本( 元/头)', '实际成本 (元/头)', '产奶量(kg/头)', '饲料转化率', '公斤奶饲料成本'],
-              filterVal: ['栏舍', '配方模板', '实际牛头数', '应混料量', '实际混料量', '撒料量', '混料时间', '转投剩料量', '今日剩料量', '剩料率', 'TMR干物质', '配方干物质采食量', '实际干物质采食量', '采食率', '配方成本', '实际成本', '产奶量', '饲料转化率', '公斤奶饲料成本'],
+              tHeader: ['栏舍', '配方模板', '实际牛头数', '应混料量(kg)', '实际混料量(kg)', '撒料量(kg)', '平均混料时间(min)', '转投剩料量(kg)', '今日剩料量(kg)', '剩料率(%)', 'TMR干物质(%)', '配方干物质采食量(kg/头)', ' 实际干物质采食量( kg/头)', '采食率 (%)','配方理论成本', '配方成本( 元/头)', '实际成本 (元/头)', '产奶量(kg/头)', '饲料转化率', '公斤奶饲料成本'],
+              filterVal: ['栏舍', '配方模板', '实际牛头数', '应混料量', '实际混料量', '撒料量', '混料时间', '转投剩料量', '今日剩料量', '剩料率', 'TMR干物质', '配方干物质采食量', '实际干物质采食量', '采食率','feedtempletPrice', '配方成本', '实际成本', '产奶量', '饲料转化率', '公斤奶饲料成本'],
               tableDatas: this.tab.table.list,
               sheetName: '栏舍'
             }
@@ -1496,8 +1529,8 @@ export default {
         } else if (this.tab.radio == '3') {
           var excelDatas3 = [
             {
-              tHeader: ['牲畜类别', '实际牛头数', '应混料量(kg)', '实际混料量(kg)', '撒料量(kg)', '平均混料时间(min)', '转投剩料量(kg)', '今日剩料量(kg)', '剩料率(%)', 'TMR干物质(%)', '配方 物质采食量(kg/ 头)', '实际干物质采 食量(kg/头)', ' 采食率(%)', '配方 成本(元/头)', '实际成本(元/头)', '产奶量(kg/头)', '饲料转化率', '公斤奶饲料成本'],
-              filterVal: ['牲畜类别', '实际牛头数', '应混料量', '实际混料量', '撒料量', '混料时间', '转投剩料量', '今日剩料量', '剩料率', 'TMR干物质', '配方干物质采食量', '实际干物质采食量', ' 采食率', '配方成本', '实际成本', '产奶量', '饲料转化率', '公斤奶饲料成本'],
+              tHeader: ['牲畜类别', '实际牛头数', '应混料量(kg)', '实际混料量(kg)', '撒料量(kg)', '平均混料时间(min)', '转投剩料量(kg)', '今日剩料量(kg)', '剩料率(%)', 'TMR干物质(%)', '配方 物质采食量(kg/ 头)', '实际干物质采 食量(kg/头)', ' 采食率(%)','配方理论成本', '配方 成本(元/头)', '实际成本(元/头)', '产奶量(kg/头)', '饲料转化率', '公斤奶饲料成本'],
+              filterVal: ['牲畜类别', '实际牛头数', '应混料量', '实际混料量', '撒料量', '混料时间', '转投剩料量', '今日剩料量', '剩料率', 'TMR干物质', '配方干物质采食量', '实际干物质采食量', ' 采食率','feedtempletPrice', '配方成本', '实际成本', '产奶量', '饲料转化率', '公斤奶饲料成本'],
               tableDatas: this.tab.table.list,
               sheetName: '牲畜类别'
             }
@@ -1506,8 +1539,8 @@ export default {
         }else if (this.tab.radio == '4') {
           var excelDatas3 = [
             {
-              tHeader: ['班次', '实际牛头数', '应混料量(kg)', '实际混料量(kg)', '撒料量(kg)', '平均混料时间(min)', '转投剩料量(kg)', '今日剩料量(kg)', '剩料率(%)', 'TMR干物质(%)', '配方 物质采食量(kg/ 头)', '实际干物质采 食量(kg/头)', ' 采食率(%)', '配方 成本(元/头)', '实际成本(元/头)', '产奶量(kg/头)', '饲料转化率', '公斤奶饲料成本'],
-              filterVal: ['班次', '实际牛头数', '应混料量', '实际混料量', '撒料量', '混料时间', '转投剩料量', '今日剩料量', '剩料率', 'TMR干物质', '配方干物质采食量', '实际干物质采食量', ' 采食率', '配方成本', '实际成本', '产奶量', '饲料转化率', '公斤奶饲料成本'],
+              tHeader: ['班次', '实际牛头数', '应混料量(kg)', '实际混料量(kg)', '撒料量(kg)', '平均混料时间(min)', '转投剩料量(kg)', '今日剩料量(kg)', '剩料率(%)', 'TMR干物质(%)', '配方 物质采食量(kg/ 头)', '实际干物质采 食量(kg/头)', ' 采食率(%)','配方理论成本', '配方 成本(元/头)', '实际成本(元/头)', '产奶量(kg/头)', '饲料转化率', '公斤奶饲料成本'],
+              filterVal: ['班次', '实际牛头数', '应混料量', '实际混料量', '撒料量', '混料时间', '转投剩料量', '今日剩料量', '剩料率', 'TMR干物质', '配方干物质采食量', '实际干物质采食量', ' 采食率', 'feedtempletPrice','配方成本', '实际成本', '产奶量', '饲料转化率', '公斤奶饲料成本'],
               tableDatas: this.tab.table.list,
               sheetName: '班次'
             }
@@ -1803,21 +1836,38 @@ export default {
       this.getTabList()
     },
     handleNext() {
-      if (this.tab.table.getdataListParm.parammaps.date !== '' && this.tab.table.getdataListParm.parammaps.date !== null) {
-        this.tab.table.getdataListParm.parammaps.date = new Date(this.tab.table.getdataListParm.parammaps.date)
-        var stop = new Date(this.tab.table.getdataListParm.parammaps.date.setDate(this.tab.table.getdataListParm.parammaps.date.getDate() + 1))
-        if (stop > Date.now() - 8.64e7) {
+      // if (this.tab.table.getdataListParm.parammaps.date !== '' && this.tab.table.getdataListParm.parammaps.date !== null) {
+      //   this.tab.table.getdataListParm.parammaps.date = new Date(this.tab.table.getdataListParm.parammaps.date)
+      //   var stop = new Date(this.tab.table.getdataListParm.parammaps.date.setDate(this.tab.table.getdataListParm.parammaps.date.getDate() + 1))
+      //   if (stop > Date.now() - 8.64e7) {
+      //     this.Nextdisabled1 = true
+      //     this.Beforedisabled1 = false
+      //   } else {
+      //     this.Nextdisabled1 = false
+      //     this.Beforedisabled1 = false
+      //   }
+      //   this.tab.table.getdataListParm.parammaps.date = parseTime(stop, '{y}-{m}-{d}')
+      //   this.tab.table.getdataListParm.parammaps.startTime = parseTime(stop, '{y}-{m}-{d}')
+      //   this.tab.table.getdataListParm.parammaps.stopTime = parseTime(stop, '{y}-{m}-{d}')
+      //   this.getTabList()
+      // }
+      if (this.tab.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab.table.getdataListParm.parammaps.inputDatetime !== null) {
+        var start1 = new Date(this.tab.table.getdataListParm.parammaps.inputDatetime[0].setDate(this.tab.table.getdataListParm.parammaps.inputDatetime[0].getDate() + 1))
+        var stop1 = new Date(this.tab.table.getdataListParm.parammaps.inputDatetime[1].setDate(this.tab.table.getdataListParm.parammaps.inputDatetime[1].getDate() + 1))
+        if (stop1 > Date.now() - 8.64e7) {
           this.Nextdisabled1 = true
           this.Beforedisabled1 = false
         } else {
           this.Nextdisabled1 = false
           this.Beforedisabled1 = false
         }
-        this.tab.table.getdataListParm.parammaps.date = parseTime(stop, '{y}-{m}-{d}')
-        this.tab.table.getdataListParm.parammaps.startTime = parseTime(stop, '{y}-{m}-{d}')
-        this.tab.table.getdataListParm.parammaps.stopTime = parseTime(stop, '{y}-{m}-{d}')
-        this.getTabList()
+        this.tab.table.getdataListParm.parammaps.inputDatetime.length = 0
+        this.tab.table.getdataListParm.parammaps.inputDatetime.push(start1, stop1)
+        this.$forceUpdate()
       }
+      this.tab.table.getdataListParm.parammaps.startTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
+      this.tab.table.getdataListParm.parammaps.stopTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
+      this.getTabList()
     },
     handleBefore2() {
       if (this.tab2.date !== '' && this.tab2.date !== null) {
@@ -1868,6 +1918,36 @@ export default {
     handleQuickJumpTop() {
       window.scrollTo(0, 0)
     },
+
+    // 泌乳牛干物质采食量
+    changeStatisticChart1(arr) {
+      console.log(arr,'arr===')
+      var arr1 = []
+      for (let i = 0; i < arr.length; i++) {
+        if (arr[i] !== 'all') {
+          arr1.push(arr[i])
+        }
+      }
+      this.tab.chart1.getdataListParm.parammaps.statisticsList = arr1
+      console.log(this.tab.chart1.getdataListParm.parammaps.statisticsList,'=====0000')
+      var arrData3 = []
+      for (let i = 0; i < this.tab.chart1.getdataListParm.parammaps.statisticsList.length; i++) {
+        const myId = this.tab.chart1.statisticsList.find(obj => obj.name == this.tab.chart1.getdataListParm.parammaps.statisticsList[i]).id
+        for (let j = 0; j < this.tab.chart1.chart1Data3.length; j++) {
+          if (j == myId) {
+            arrData3.push(this.tab.chart1.chart1Data3[j])
+          }
+        }
+      }
+      console.log(arrData3,'arrData3')
+      this.tab.chart1.chartLine_data.data3 = arrData3
+
+      this.tab.chart1.chartLine_data.data3 = this.tab.chart1.getdataListParm.parammaps.statisticsList
+      this.roadChartLine1(this.tab.chart1.chartLine_data)
+    },
+    changeLivestockType(){
+      this.getChart1()
+    },
     // 泌乳牛干物质采食量
     getChart1() {
       this.tab.chart1.listLoading = true
@@ -1885,19 +1965,65 @@ export default {
         data.parammaps.stopTime = this.tab.chart1.getdataListParm.parammaps.stopTime
         data.parammaps.status = this.tab.chart1.getdataListParm.parammaps.status
       }
+      data.parammaps.bigcowclass = this.tab.chart1.getdataListParm.parammaps.bigcowclass
       postJson(url, data).then(response => {
-        if (response.data !== null && response.data.list !== null && response.data.data !== null) {
-          console.log('泌乳牛干物质采食量图表数据', response.data.list)
-          for (let i = 0; i < response.data.data.length; i++) {
-            if (response.data.data[i].field1 !== '' && response.data.data[i].field1 !== undefined) {
-              response.data.data[i].field1 = parseFloat(response.data.data[i].field1)
-            }
-            if (response.data.data[i].field2 !== '' && response.data.data[i].field2 !== undefined) {
-              response.data.data[i].field2 = parseFloat(response.data.data[i].field2)
-            }
-          }
+        if (response.data !== null  && response.data.data !== null) {
+          // console.log('泌乳牛干物质采食量图表数据', response.data.list)
+          // for (let i = 0; i < response.data.data.length; i++) {
+          //   if (response.data.data[i].field1 !== '' && response.data.data[i].field1 !== undefined) {
+          //     response.data.data[i].field1 = parseFloat(response.data.data[i].field1)
+          //   }
+          //   if (response.data.data[i].field2 !== '' && response.data.data[i].field2 !== undefined) {
+          //     response.data.data[i].field2 = parseFloat(response.data.data[i].field2)
+          //   }
+          // }
           this.tab.chart1.table.list = response.data.data
-          this.tab.chart1.chartLine_data = response.data.list
+          // this.tab.chart1.chartLine_data = response.data.list
+          // this.tab.chart1.chartLine_data = {
+          //   chartType:'line_bar',
+          //   date: ['2019-01', '2019-02', '2019-03', '2019-04', '2019-05', '2019-06', '2019-07', '2019-08', '2019-09', '2019-10', '2019-11', '2019-12'],
+          //   legendArr1: ['采食量-数据1', '采食量-数据2', '采食量-数据3', '采食量-数据4' ],
+          //   dataArr1:[
+          //     [1, 10, 7, 0, 1, 7, 7, 6, 4, 4, 1, 6],
+          //     [1, 10, 7, 0, 1, 7, 7, 6, 4, 4, 1, 6],
+          //     [1, 10, 7, 0, 1, 7, 7, 6, 4, 4, 1, 6],
+          //     [2, 10, 3, 2, 10, 4, 4, 9, 3, 9, 3, 8],
+          //   ],
+          //   legendArr2: ['产奶量-数据1',  '产奶量-数据2'],
+          //   dataArr2:[
+          //     [1, 10, 7, 0, 1, 7, 7, 6, 4, 4, 1, 5],
+          //     [1, 10, 7, 0, 1, 7, 7, 6, 4, 4, 1, 6],
+          //   ],
+          // }
+          this.tab.chart1.chartLine_data = {}
+          this.tab.chart1.chartLine_data.date = response.data.date
+          this.tab.chart1.chartLine_data.dataArr1 = response.data.dataArr1
+          this.tab.chart1.chartLine_data.dataArr2 = response.data.dataArr2
+          this.tab.chart1.chartLine_data.legendArr1 = []
+          this.tab.chart1.chartLine_data.legendArr2 = []
+          response.data.ftname.forEach((item)=>{
+            var str1 = '采食量-' + item
+            this.tab.chart1.chartLine_data.legendArr1.push(str1)
+          })
+          response.data.ftname.forEach((item)=>{
+            var str2 = '产奶量-' + item
+            this.tab.chart1.chartLine_data.legendArr2.push(str2)
+          })
+          // this.tab.chart1.chartLine_data.legendArr1 = this.tab.chart1.chartLine_data.ftname
+          // this.tab.chart1.chartLine_data.legendArr2 = this.tab.chart1.chartLine_data.ftname
+          var data3 = this.tab.chart1.chartLine_data.legendArr1.concat(this.tab.chart1.chartLine_data.legendArr2)
+
+          this.tab.chart1.chartLine_data.data3 = Array.from(new Set(data3))
+          this.tab.chart1.getdataListParm.parammaps.statisticsList = []
+          this.tab.chart1.statisticsList = []
+          console.log(data3,'data3')
+          for (let i = 0; i < data3.length; i++) {
+            this.tab.chart1.getdataListParm.parammaps.statisticsList.push(data3[i])
+            var obj = {}
+            obj.id = i
+            obj.name = data3[i]
+            this.tab.chart1.statisticsList.push(obj)
+          }
           // this.tab.chart1.total = response.data.total
         } else {
           this.tab.chart1.list = []
@@ -1914,19 +2040,50 @@ export default {
         this.tab.chart1.chartLine.dispose()
       }
       this.tab.chart1.chartLine = echarts.init(document.getElementById('chartLine1'))
+      console.log(chartLine_data,'chartLine_data')
       var option = {
-        tooltip: { trigger: 'axis', axisPointer: { type: 'cross', crossStyle: { color: '#999' }}},
-        legend: { data: ['泌乳牛干物质采食量', '泌乳牛产奶量'], right: 10, show: true, type: 'scroll' },
+        tooltip: {
+          trigger: "axis",
+          axisPointer: { type: 'cross', crossStyle: { color: '#999' }},
+        },
+        legend: {
+          data:chartLine_data.data3,
+          right: 10, show: true, type: 'scroll' ,
+       },
         grid: { top: '15%', left: '8%', right: '8%', containLabel: true },
-        xAxis: [{ type: 'category', data: chartLine_data.data1 }],
+        xAxis: [{ type: 'category', data: chartLine_data.date }],
         yAxis: [
-          { splitLine: { show: false }, type: 'value', name: '泌乳牛干物质\n采食量', axisLabel: { formatter: '{value} ' }},
-          { splitLine: { show: false }, type: 'value', name: '泌乳牛产奶量', axisLabel: { formatter: '{value} ' }}
+          { splitLine: { show: false }, type: 'value', name: '干物质\n采食量', axisLabel: { formatter: '{value} ' }},
+          { splitLine: { show: false }, type: 'value', name: '产奶量', axisLabel: { formatter: '{value} ' }}
         ],
-        series: [
-          { name: '泌乳牛干物质采食量', type: 'bar', itemStyle: { normal: { color: '#61a5e8' }}, data: chartLine_data.data2 },
-          { name: '泌乳牛产奶量', type: 'line', itemStyle: { normal: { color: '#ff2d2d' }}, yAxisIndex: 1, data: chartLine_data.data3 }
-        ]
+        // series: [
+        //   { name: '泌乳牛干物质采食量', type: 'bar', itemStyle: { normal: { color: '#61a5e8' }}, data: chartLine_data.data2 },
+        //   { name: '泌乳牛产奶量', type: 'line', itemStyle: { normal: { color: '#ff2d2d' }}, yAxisIndex: 1, data: chartLine_data.data3 }
+        // ]
+        series: function (e) {
+           var serie = [];
+           for (var i = 0; i < chartLine_data.date.length; i++) {
+               var item = {
+                 name: chartLine_data.legendArr1[i],
+                 data: chartLine_data.dataArr1[i],
+                 type: 'line',
+                 emphasis: { label: { show: true, position: 'inside' } },
+               }
+             serie.push(item);
+           }
+
+           for (var i = 0; i < chartLine_data.date.length; i++) {
+               var item = {
+                 name: chartLine_data.legendArr2[i],
+                 data: chartLine_data.dataArr2[i],
+                 type: 'bar',
+                 yAxisIndex: 1,
+                 emphasis: { label: { show: true, position: 'inside' } },
+               }
+             serie.push(item);
+           }
+           return serie;
+         }()
       }
       this.tab.chart1.chartLine.setOption(option)
       window.onresize = function() {
@@ -2066,6 +2223,11 @@ export default {
                 type: 'line',
                 data: chartLine_data.data3[i].data
               }
+              var item2 = {
+                name: chartLine_data.data1[i],
+                type: '',
+                data: chartLine_data.data3[i].data
+              }
               serie.push(item)
             }
           }
@@ -2080,6 +2242,27 @@ export default {
       }
     },
 
+    changeStatisticChart3(arr) {
+      var arr1 = []
+      for (let i = 0; i < arr.length; i++) {
+        if (arr[i] !== 'all') {
+          arr1.push(arr[i])
+        }
+      }
+      this.tab.chart3.getdataListParm.parammaps.statisticsList = arr1
+      var arrData3 = []
+      for (let i = 0; i < this.tab.chart3.getdataListParm.parammaps.statisticsList.length; i++) {
+        const myId = this.tab.chart3.statisticsList.find(obj => obj.name == this.tab.chart3.getdataListParm.parammaps.statisticsList[i]).id
+        for (let j = 0; j < this.tab.chart3.chart3Data3.length; j++) {
+          if (j == myId) {
+            arrData3.push(this.tab.chart3.chart3Data3[j])
+          }
+        }
+      }
+      this.tab.chart3.chartLine_data.data3 = arrData3
+      this.tab.chart3.chartLine_data.data1 = this.tab.chart3.getdataListParm.parammaps.statisticsList
+      this.roadChartLine3(this.tab.chart3.chartLine_data)
+    },
     // 混料时间统计
     getChart3() {
       this.tab.chart3.listLoading = true
@@ -2103,7 +2286,32 @@ export default {
           this.tab.chart3.table.list = response.data.data
           this.tab.chart3.chartLine_data = response.data.list
           this.tab.chart3.total = response.data.total
+          this.tab.chart3.statisticsList = []
+          this.tab.chart3.getdataListParm.parammaps.statisticsList = []
+          for (let i = 0; i < response.data.list.data1.length; i++) {
+            // if (i < 10) {
+              this.tab.chart3.getdataListParm.parammaps.statisticsList.push(response.data.list.data1[i])
+            // }
+            var obj = {}
+            obj.id = i
+            obj.name = response.data.list.data1[i]
+            this.tab.chart3.statisticsList.push(obj)
+          }
+          this.tab.chart3.chart3Data3 = response.data.list.data3
           this.tab.chart3.total = response.data.total
+          console.log('牛栏剩料率图数据', this.tab.chart3.chartLine_data)
+          console.log('牛栏剩料率表数据', this.tab.chart3.table.list)
+          var arrData3 = []
+          for (let i = 0; i < this.tab.chart3.getdataListParm.parammaps.statisticsList.length; i++) {
+            const myId = this.tab.chart3.statisticsList.find(obj => obj.name == this.tab.chart3.getdataListParm.parammaps.statisticsList[i]).id
+            for (let j = 0; j < this.tab.chart3.chart3Data3.length; j++) {
+              if (j == myId) {
+                arrData3.push(this.tab.chart3.chart3Data3[j])
+              }
+            }
+          }
+          this.tab.chart3.chartLine_data.data3 = arrData3
+          this.tab.chart3.chartLine_data.data1 = this.tab.chart3.getdataListParm.parammaps.statisticsList
         } else {
           this.tab.chart3.list = []
           this.tab.chart3.chartLine_data = {}
@@ -2126,10 +2334,7 @@ export default {
         tooltip: {
           trigger: 'axis'
         },
-        legend: {
-          data: ['混料时间'],
-          right: 10, show: true, type: 'scroll'
-        },
+        legend: { data: chartLine_data.data1, right: 10, show: true, type: 'scroll' },
         grid: {
           top: '15%',
           left: '5%',
@@ -2141,21 +2346,27 @@ export default {
           right: '2%',
           feature: {}
         },
-        xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data1, name: '日期' },
+        xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data2, name: '日期' },
         yAxis: {
           type: 'value', name: '分钟',
           axisLabel: {
             formatter: '{value}min'
           }
         },
-        series: [
-          {
-            name: '混料时间',
-            type: 'line',
-            stack: '总量',
-            data: chartLine_data.data2
+        series: (function() {
+          var serie = []
+          if (chartLine_data.data3 !== undefined) {
+            for (var i = 0; i < chartLine_data.data3.length; i++) {
+              var item = {
+                name: chartLine_data.data1[i],
+                type: 'line',
+                data: chartLine_data.data3[i].data
+              }
+              serie.push(item)
+            }
           }
-        ]
+          return serie
+        }())
       }
       this.tab.chart3.chartLine.setOption(option)
       window.onresize = function() {
@@ -2448,8 +2659,8 @@ export default {
         console.log('混料时间统计导出')
         var excelDatasTabChart3 = [
           {
-            tHeader: ['日期', '混料时间(分钟)'],
-            filterVal: ['日期', 'field1'],
+            tHeader: ['日期', '配方名称','时间(分钟)'],
+            filterVal: ['日期', '名称','准确率'],
             tableDatas: this.tab.chart3.table.list,
             sheetName: '混料时间统计'
           }
@@ -2622,7 +2833,7 @@ export default {
 </script>
 <style lang="scss" scoped>
   .button{
-    height: 95px;
+    height: 130px;
     .exportTable2{float: right;margin-right: 5px;margin-top: 5px;}
   }
   .app-container1{padding-left: 10px;background-color: #F4F4F4;}

+ 12 - 2
src/views/statisticalAnalysis/formulaStatistics/index.vue

@@ -91,11 +91,21 @@
     },
 
     created() {
-      // this.getChart1()
+      this.getTimeFn()
       this.getChart1()
     },
 
-    methods: {
+    methods: {
+      getTimeFn() {
+        const that = this
+        const start = new Date()
+        const end = new Date()
+        start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
+        end.setTime(end.getTime() - 3600 * 1000 * 24 * 1)
+        that.startTime = parseTime(start, '{y}-{m}-{d}')
+        that.endTime = parseTime(end, '{y}-{m}-{d}')
+        that.inputDatetime = [start, end]
+      },
       handleBefore() {
         if (this.inputDatetime !== '' && this.inputDatetime !== null) {
           var start = new Date(this.inputDatetime[0].setDate(this.inputDatetime[0].getDate() - 1))

+ 136 - 19
src/views/statisticalAnalysis/inventoryManagement/pasture/index.vue

@@ -57,6 +57,9 @@
             <el-option v-for="item in statisticalTypeList2" :key="item.id" :label="item.name" :value="item.id" />
           </el-select>
           <el-checkbox v-model="tab2.table.getdataListParm.checked" :true-label="1" :false-label="0" style="margin-right:10px;" @change="changeChecked">误差</el-checkbox>
+          <el-select v-model="tab2.table.getdataListParm.parammaps.ftType" placeholder="是否拆分小料" class="filter-item" style="width: 130px;">
+            <el-option v-for="item in isSplitsmallmaterialsList" :key="item.id" :label="item.name" :value="item.id" />
+          </el-select>
           <el-input v-if="tab2.isRadio1" v-model="tab2.table.getdataListParm.parammaps.fname" class="filter-item filter-item1" style="width: 200px;" placeholder="牲畜类别" />
           <el-input v-if="tab2.isRadio2" v-model="tab2.table.getdataListParm.parammaps.fname" class="filter-item filter-item1" style="width: 200px;" placeholder="栏舍名称" />
           <el-input v-if="tab2.isRadio3" v-model="tab2.table.getdataListParm.parammaps.fname" class="filter-item filter-item1" style="width: 200px;" placeholder="日期" />
@@ -65,27 +68,52 @@
           <el-input v-if="tab2.isRadio6" v-model="tab2.table.getdataListParm.parammaps.fname" class="filter-item filter-item1" style="width: 200px;" placeholder="车次" />
           <el-select v-model="tab2.table.getdataListParm.parammaps.typea" clearable placeholder="列表显示" class="filter-item" style="width: 120px;">
             <el-option v-for="item in displayList" :key="item.id" :label="item.name" :value="item.id" />
+          </el-select>
+          <el-select v-model="tab2.table.getdataListParm.parammaps.times" clearable filterable placeholder="班次" class="filter-item" style="width: 120px;">
+            <el-option v-for="item in frequencyList" :key="item.id" :label="item.name" :value="item.id" />
           </el-select>
           <el-button class="successBorder" @click="form_search('second')">查询</el-button>
           <el-button class="export" style="float: right;margin-right: 5px;margin-top:10px;" icon="el-icon-upload2" @click="handleExport('tab2')">导出</el-button>
         </div>
-        <div v-if="tab2.table.tableConfig.length > 8">
-          <u-table v-if="isDispayTable2" ref="plTable2" v-loading="tab2.table.listLoading" :row-style="rowStyle" :cell-style="cellStyle" :max-height="myHeight2" use-virtual :row-height="rowHeight" border class="elTable table-fixed plTable2">
+        <div v-if="tab2.table.tableConfig.length > 8">
+          <u-table v-if="isDispayTable2" ref="plTable2" v-loading="tab2.table.listLoading" :row-style="rowStyle" :cell-style="cellStyle" :max-height="myHeight2" use-virtual :row-height="rowHeight" border class="elTable table-fixed plTable2">
+            <!-- 第一个表头 -->
+            <u-table-column v-for="(header1, index1) in tab2.table.tableConfig" :key="'header1-' + index1" :label="header1.label" align="center" :fixed="index1==0" :show-overflow-tooltip="header1.showOverflow" >
+              <!-- 第二个表头 -->
+              <u-table-column v-for="(header2, index2) in header1.children" :key="'header2-' + index2" :label="header2.label" align="center" :fixed="index2==0" :show-overflow-tooltip="header2.showOverflow">
+                <!-- 第三个表头 -->
+                <u-table-column v-for="(header3, index3) in header2.children" :key="'header3-' + index3" :label="header3.label" :prop="header3.prop" align="center">
+                </u-table-column>
+              </u-table-column>
+            </u-table-column>
+          </u-table>
+          <!-- <u-table v-if="isDispayTable2" ref="plTable2" v-loading="tab2.table.listLoading" :row-style="rowStyle" :cell-style="cellStyle" :max-height="myHeight2" use-virtual :row-height="rowHeight" border class="elTable table-fixed plTable2">
             <u-table-column v-for="(item,index) in tab2.table.tableConfig" :key="index" :label="item.label" :show-overflow-tooltip="item.showOverflow"  :prop="item.prop" align="center" :fixed="index==0">
               <u-table-column v-for="(item1,key1) in item.children" v-if="item.children || item.children.length>0" :key="key1" :label="item1.label" :prop="item1.prop" align="center">
                 <u-table-column v-for="(item2,key2) in item1.children" v-if="item1.children || item1.children.length>0" :key="key2" :label="item2.label" :prop="item2.prop" />
               </u-table-column>
             </u-table-column>
-          </u-table>
+          </u-table> -->
         </div>
-        <div v-else>
-          <u-table v-if="isDispayTable2" ref="plTable2" v-loading="tab2.table.listLoading" :row-style="rowStyle" :cell-style="cellStyle" :max-height="myHeight2" use-virtual :row-height="rowHeight" border class="elTable table-fixed plTable2">
+        <div v-else>
+          <u-table v-if="isDispayTable2" ref="plTable2" v-loading="tab2.table.listLoading" :row-style="rowStyle" :cell-style="cellStyle" :max-height="myHeight2" use-virtual :row-height="rowHeight" border class="elTable table-fixed plTable2">
+            <!-- 第一个表头 -->
+            <u-table-column v-for="(header1, index1) in tab2.table.tableConfig" :key="'header1-' + index1" :label="header1.label" align="center" :fixed="index1==0" :show-overflow-tooltip="header1.showOverflow">
+              <!-- 第二个表头 -->
+              <u-table-column v-for="(header2, index2) in header1.children" :key="'header2-' + index2" :label="header2.label" align="center" :fixed="index2==0" :show-overflow-tooltip="header2.showOverflow">
+                <!-- 第三个表头 -->
+                <u-table-column v-for="(header3, index3) in header2.children" :key="'header3-' + index3" :label="header3.label" :prop="header3.prop" align="center">
+                </u-table-column>
+              </u-table-column>
+            </u-table-column>
+          </u-table>
+          <!-- <u-table v-if="isDispayTable2" ref="plTable2" v-loading="tab2.table.listLoading" :row-style="rowStyle" :cell-style="cellStyle" :max-height="myHeight2" use-virtual :row-height="rowHeight" border class="elTable table-fixed plTable2">
             <u-table-column v-for="(item,index) in tab2.table.tableConfig" :key="index" :label="item.label" :show-overflow-tooltip="item.showOverflow"  :prop="item.prop" align="center">
               <u-table-column v-for="(item1,key1) in item.children" v-if="item.children || item.children.length>0" :key="key1" :label="item1.label" :prop="item1.prop" align="center">
                 <u-table-column v-for="(item2,key2) in item1.children" v-if="item1.children || item1.children.length>0" :key="key2" :label="item2.label" :prop="item2.prop" />
               </u-table-column>
             </u-table-column>
-          </u-table>
+          </u-table> -->
         </div>
 
         <span v-if="tab2.table.listLoading == false && tab2.table.list.length>0" style="margin-right: 30px;margin-top: 10px;font-size: 14px;">共{{ tab2.table.total }}条</span>
@@ -137,7 +165,7 @@
 </template>
 
 <script>
-import { GetDataByName, GetReportform } from '@/api/common'
+import { GetDataByName, GetReportform,postJson } from '@/api/common'
 import Cookies from 'js-cookie'
 import { parseTime } from '@/utils/index.js'
 import Pagination from '@/components/Pagination'
@@ -176,7 +204,8 @@ export default {
         }
       },
       fileComment: [{ 'label': '商务文件评分', 'children': [{ 'label': '1' }, { 'label': '2' }, { 'label': '管理员' }] }],
-      displayList:[{id:'1',name:'理论'},{id:'2',name:'实际'}],//列表显示
+      displayList:[{id:'1',name:'理论'},{id:'2',name:'实际'}],//列表显示
+      isSplitsmallmaterialsList:[{id:'0',name:'拆分'},{id:'1',name:'不拆分'}],
       activeName: 'first',
       tab: {
         chartDate: [],
@@ -219,7 +248,9 @@ export default {
               stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
               inputDatetime: [new Date(), new Date()],
               fname: '',
-              typea:''
+              typea:'',
+              times:'',
+              ftType:'1'
             }
           },
           tableKey: 1,
@@ -275,12 +306,54 @@ export default {
       isDispayTable3:false,
       statisticalTypeList2: [{ id: '1', name: '牲畜类别' }, { id: '2', name: '栏舍名称' }, { id: '3', name: '日期' }, { id: '4', name: 'TMR设备编号' }, { id: '5', name: 'TMR班次' }, { id: '6', name: '车次' }],
       statisticalTypeList3: [{ id: '1', name: '牲畜类别' }, { id: '2', name: '栏舍名称' }, { id: '3', name: '日期' }, { id: '4', name: 'TMR设备编号' }],
+      frequencyList: [], // 班次
     }
   },
   created() {
-    this.getTimeFn()
+    this.getTimeFn()
+    this.getIsDisplay()
   },
-  methods: {
+  methods: {
+    getIsDisplay() {
+      const url = 'authdata/GetDataByName'
+      const data = {
+        name: 'getSysoptEnable',
+        page: 1,
+        offset: 1,
+        pagecount: 1,
+        returntype: 'Map',
+        parammaps: {
+          pastureid: Cookies.get('pastureid'),
+          inforname: 'times'
+        }
+      }
+      postJson(url, data).then(response => {
+        console.log(response.data.list[0].inforvalue)
+        if (response.data.list[0].inforvalue == 1) {
+          this.frequencyList = [{ id: 1, name: '第一班' }]
+        } else if (response.data.list[0].inforvalue == 2) {
+          this.frequencyList = [
+            { id: 1, name: '第一班' }, { id: 2, name: '第二班' }
+          ]
+        } else if (response.data.list[0].inforvalue == 3) {
+          this.frequencyList = [
+            { id: 1, name: '第一班' }, { id: 2, name: '第二班' }, { id: 3, name: '第三班' }
+          ]
+        } else if (response.data.list[0].inforvalue == 4) {
+          this.frequencyList = [
+            { id: 1, name: '第一班' }, { id: 2, name: '第二班' }, { id: 3, name: '第三班' }, { id: 4, name: '第四班' }
+          ]
+        }else if (response.data.list[0].inforvalue == 5) {
+          this.frequencyList = [
+            { id: 1, name: '第一班' }, { id: 2, name: '第二班' }, { id: 3, name: '第三班' }, { id: 4, name: '第四班' }, { id: 5, name: '第五班' }
+          ]
+        }else if (response.data.list[0].inforvalue == 6) {
+          this.frequencyList = [
+            { id: 1, name: '第一班' }, { id: 2, name: '第二班' }, { id: 3, name: '第三班' }, { id: 4, name: '第四班' }, { id: 5, name: '第五班' }, { id: 6, name: '第六班' },
+          ]
+        }
+      })
+    },
     getTimeFn() {
       const that = this
       const start = new Date()
@@ -315,6 +388,7 @@ export default {
         end2.setTime(end2.getTime() - 3600 * 1000 * 24 * 1)
         this.tab2.table.getdataListParm.parammaps.inputDatetime = [start2, end2]
         this.tab2.radio = '1'
+        this.tab2.table.getdataListParm.parammaps.ftType = '1'
         this.tab2.table.getdataListParm.parammaps.startTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
         this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
         this.getTab2List()
@@ -389,8 +463,11 @@ export default {
           let myList = []
           GetReportform(this.tab2.table.getdataListParm).then(response => {
             if (response.data !== null && response.data.data !== null && response.data.data1 !== null) {
-              this.tab2.table.data = response.data.data
-              for (let i = 0; i < response.data.list.data2.length; i++) {
+              this.tab2.table.data = response.data.data
+              response.data.feedcode.push('')
+              response.data.feedcode.unshift('饲料编码')
+              for (let i = 0; i < response.data.list.data2.length; i++) {
+                console.log(response.data.list.data2[i],'===label')
                 for (let j = 0; j < response.data.list.data1.length; j++) {
                   for (let a = 0; a < response.data.list.data2[i].children.length; a++) {
                     if (response.data.list.data1[j][response.data.list.data2[i].children[a].prop] == undefined || response.data.list.data1[j][response.data.list.data2[i].children[a].prop] == null || response.data.list.data1[j][response.data.list.data2[i].children[a].prop] == '') {
@@ -409,12 +486,29 @@ export default {
                 } else {
                   this.$set(response.data.list.data2[i].children[0], 'width', '80px')
                 }
+              }
+              let list = response.data.list.data2
+              let code = response.data.feedcode
+              const headers = []
+              for(let i=0;i<list.length;i++){
+                for(let j=0;j<code.length;j++){
+                  if(i== j){
+                    let obj = {
+                      label:code[j],
+                      children:[
+                        list[i]
+                      ]
+                    }
+                    headers.push(obj)
+                  }
+                }
               }
               myList = response.data.list.data1
               this.tab2.table.list = response.data.list.data1
-              this.tab2.table.tableConfig = response.data.list.data2
+              this.tab2.table.tableConfig = headers
               this.tab2.table.total = response.data.list.data1.length
               console.log('库存统计-用料分析this.tab2.table.data', response.data.data)
+              console.log('库存统计-用料分析this.tab2.table.feedcode', response.data.feedcode)
               console.log('库存统计-用料分析this.tab2.table.list', response.data.list.data1)
               console.log('库存统计-用料分析this.tab2.table.tableConfig',response.data.list.data2)
             } else {
@@ -752,24 +846,36 @@ export default {
         var exportData = []
         var exportTitle1 = [] // 一级标题
         var exportTitle2 = [] // 二级标题
+        var exportTitle3 = [] // 一级标题
         var filterValArr = []
         for (let i = 0; i < this.tab2.table.tableConfig.length; i++) {
           exportTitle1.push(this.tab2.table.tableConfig[i].label)
           for (let j = 0; j < this.tab2.table.tableConfig[i].children.length; j++) {
-            exportTitle2.push(this.tab2.table.tableConfig[i].children[j].label)
-            filterValArr.push(this.tab2.table.tableConfig[i].children[j].prop)
+            exportTitle2.push(this.tab2.table.tableConfig[i].children[j].label)
+            for(let a = 0;a<this.tab2.table.tableConfig[i].children[j].children.length;a++){
+              exportTitle3.push(this.tab2.table.tableConfig[i].children[j].children[a].label)
+              filterValArr.push(this.tab2.table.tableConfig[i].children[j].children[a].prop)
+            }
+            // filterValArr.push(this.tab2.table.tableConfig[i].children[j].prop)
           }
         }
         console.log('一级标题exportTitle1', exportTitle1)
         console.log('二级标题exportTitle2', exportTitle2)
+        console.log('三级标题exportTitle3', exportTitle3)
         console.log('对应字段filterValArr', filterValArr)
         var headerArr = []// 处理一级标题
+        var headerArr2 = []// 处理一级标题
         if (this.tab2.table.getdataListParm.checked == 1) {
           for (let i = 0; i < exportTitle1.length; i++) {
             if (i > 0) {
               headerArr.push(exportTitle1[i], '', '', '')
             } else {
               headerArr.push(exportTitle1[i])
+            }
+            if (i > 0) {
+              headerArr2.push(exportTitle2[i], '', '', '')
+            } else {
+              headerArr2.push(exportTitle2[i])
             }
           }
         } else {
@@ -779,10 +885,16 @@ export default {
                 headerArr.push(exportTitle1[i], '')
               } else {
                 headerArr.push(exportTitle1[i])
+              }
+              if (i > 0) {
+                headerArr2.push(exportTitle2[i], '')
+              } else {
+                headerArr2.push(exportTitle2[i])
               }
             }
           }else{
             headerArr = exportTitle1
+            headerArr2 = exportTitle2
           }
         }
         console.log('headerArr', headerArr)
@@ -793,8 +905,10 @@ export default {
             const multiHeader = [
               headerArr
             ]
-            const multiHeader2 = []
-            const tHeader = exportTitle2
+            const multiHeader2 = [
+              headerArr2
+            ]
+            const tHeader = exportTitle3
             const filterVal = filterValArr
             const data = this.tab2.table.list.map(v => filterVal.map(j => v[j]))
             // const data = []
@@ -903,11 +1017,14 @@ export default {
   }
   // .el-radio{margin-right: 20px;}
 </style>
-<style lang="css">
+<style lang="scss">
   .el-tooltip__popper{
   max-width: 60% !important;
   }
   .plTableBox .el-table td.is-hidden>*, .plTableBox .el-table th.is-hidden>*{
     visibility:inherit;
+  }
+  .plTableBox .el-table th>.cell{
+    white-space: pre-wrap;
   }
 </style>

+ 8 - 4
src/views/statisticalAnalysis/processAnalysis/group/index.vue

@@ -1151,6 +1151,7 @@ export default {
         this.chartLine.dispose()
       }
       this.chartLine = echarts.init(document.getElementById('chartLine'))
+
       var option = {
         title: { text: '', subtext: '' },
         color: ['#38c193', '#5199e5', '#fdb06a', '#fb8b73'], // 关键加上这句话,legend的颜色和折线的自定义颜色就一致了
@@ -1159,7 +1160,10 @@ export default {
           data: [{ name: '设计重量' }, { name: '实际重量' }]
         }, {
           itemWidth: 15, itemHeight: 15, right: '0', textStyle: { fontSize: 12 },
-          data: [{ name: '开始重量', icon: 'image://https://kptyun.cn:8081/file/pic/3.png' }, { name: '结束重量', icon: 'image://https://kptyun.cn:8081/file/pic/4.png' }]
+          data: [
+            { name: '开始重量' }, 
+            { name: '结束重量' },
+          ]
         }],
         tooltip: {
           trigger: 'axis',
@@ -1187,8 +1191,8 @@ export default {
         series: [
           { symbol: 'none', name: '实际重量', type: 'line', data: chartLine_data.data3, smooth: true, barWidth: '37', itemStyle: { normal: { lineStyle: { color: '#38c193' }}}},
           { symbol: 'none', name: '设计重量', type: 'line', step: 'middle', data: chartLine_data.data2 },
-          { name: '开始重量', symbol: 'image://https://kptyun.cn:8081/file/pic/3.png', symbolSize: 10, type: 'scatter', data: chartLine_data.data4 },
-          { name: '结束重量', symbol: 'image://https://kptyun.cn:8081/file/pic/4.png', symbolSize: 10, type: 'scatter', data: chartLine_data.data5 }
+          { name: '开始重量', symbolSize: 10, type: 'scatter', data: chartLine_data.data4 },
+          { name: '结束重量', symbolSize: 10, type: 'scatter', data: chartLine_data.data5 }
         ]
       }
       this.chartLine.setOption(option)
@@ -1203,7 +1207,7 @@ export default {
 </script>
 <style lang="scss" scoped>
   .search{padding-top:10px;clear: both;}
-  
+
   .detail{
     height:84px;padding:0 10px;font:16px/32px '';color:#333;background: #F9F9F9;display: flex; align-items: center;text-align: center;
     div{

+ 74 - 46
src/views/statisticalAnalysis/processAnalysis/pasture/index.vue

@@ -39,6 +39,11 @@
         <el-input-number :controls="false" :precision="2" v-model="slzq1" placeholder="撒料准确率" :min="0" :max="100" style="width: 120px;"  class="filter-item" clearable />
         <span>-</span>
         <el-input-number :controls="false" :precision="2" v-model="slzq2" placeholder="撒料准确率" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
+      </div>
+      <div style="display: inline-block;" class="filter-item1">
+        <el-input-number :controls="false" :precision="2" v-model="minproesstime" placeholder="过程时间" :min="0" :max="100" style="width: 120px;"  class="filter-item" clearable />
+        <span>-</span>
+        <el-input-number :controls="false" :precision="2" v-model="maxproesstime" placeholder="过程时间" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
       </div>
       <el-checkbox v-model="ccys"style="margin-right: 10px;" @change="changeccysChecked">只看超出预设值数据</el-checkbox>
       <!-- 临时注释 -->
@@ -68,6 +73,7 @@
             <el-table-column sortable label="计划类型" min-width="80px" align="center" prop="lpplantype" />
             <el-table-column sortable label="描述" min-width="90px" align="center" prop="remark" />
             <el-table-column sortable label="TMR名称" min-width="80px" align="center" prop="tmrtname" />
+            <el-table-column sortable label="过程时间" min-width="80px" align="center" prop="proesstime" />
           </el-table>
         </div>
         <span v-if="table.listLoading == false" style="margin-right: 30px;margin-top: 10px;font-size: 14px;">共{{ table.total }}条</span>
@@ -101,7 +107,7 @@
           </div>
         </div>
         <div class="Mixture">
-          <h4>混料详情1</h4>
+          <h4>混料详情</h4>
           <el-table
             :key="table3.tableKey"
             v-loading="table3.listLoading"
@@ -118,7 +124,12 @@
             <el-table-column label="操作编号" min-width="60px" align="center" prop="sort" />
             <el-table-column label="饲料名称" min-width="60px" align="center" prop="fname" />
             <el-table-column label="计划重量" min-width="60px" align="center" prop="lweight" />
-            <el-table-column label="实际重量" min-width="60px" align="center" prop="actualweightminus" />
+            <el-table-column label="实际重量" min-width="60px" align="center" prop="actualweightminus">
+              <template slot-scope="{row}">
+                <a v-if="row.actualweightminus == 0" style="color: red;">{{ row.actualweightminus }}</a>
+                <a v-else>{{ row.actualweightminus }}</a>
+              </template>
+            </el-table-column>
             <el-table-column label="误差值" min-width="60px" align="center" prop="diff" />
             <el-table-column label="准确率" min-width="60px" align="center" prop="diffRate" />
             <el-table-column label="完成时间" min-width="60px" align="center" prop="intime" />
@@ -183,7 +194,12 @@
             <el-table-column label="操作编号" min-width="70px" align="center" prop="sort" />
             <el-table-column label="饲料名称" min-width="70px" align="center" prop="fname" />
             <el-table-column label="计划重量" min-width="50px" align="center" prop="lweight" />
-            <el-table-column label="实际重量" min-width="70px" align="center" prop="actualweightminus" />
+            <el-table-column label="实际重量" min-width="60px" align="center" prop="actualweightminus">
+              <template slot-scope="{row}">
+                <a v-if="row.actualweightminus == 0" style="color: red;">{{ row.actualweightminus }}</a>
+                <a v-else>{{ row.actualweightminus }}</a>
+              </template>
+            </el-table-column>
             <el-table-column label="误差值" min-width="70px" align="center" prop="diff" />
             <el-table-column label="准确率" min-width="70px" align="center" prop="diffRate" />
             <el-table-column label="完成时间" min-width="70px" align="center" prop="intime" />
@@ -213,7 +229,12 @@
             <el-table-column label="操作编号" min-width="70px" align="center" prop="sort" />
             <el-table-column label="栏舍名称" min-width="70px" align="center" prop="fname" />
             <el-table-column label="计划重量" min-width="70px" align="center" prop="lweight" />
-            <el-table-column label="实际重量" min-width="70px" align="center" prop="actualweightminus" />
+            <el-table-column label="实际重量" min-width="60px" align="center" prop="actualweightminus">
+              <template slot-scope="{row}">
+                <a v-if="row.actualweightminus == 0" style="color: red;">{{ row.actualweightminus }}</a>
+                <a v-else>{{ row.actualweightminus }}</a>
+              </template>
+            </el-table-column>
             <el-table-column label="误差值" min-width="70px" align="center" prop="diff" />
             <el-table-column label="准确率" min-width="70px" align="center" prop="diffRate" />
             <el-table-column label="完成时间" min-width="70px" align="center" prop="intime" />
@@ -357,7 +378,12 @@
             <el-table-column label="操作编号" min-width="60px" align="center" prop="sort" />
             <el-table-column label="饲料名称" min-width="60px" align="center" prop="fname" />
             <el-table-column label="计划重量" min-width="60px" align="center" prop="lweight" />
-            <el-table-column label="实际重量" min-width="60px" align="center" prop="actualweightminus" />
+            <el-table-column label="实际重量" min-width="60px" align="center" prop="actualweightminus">
+              <template slot-scope="{row}">
+                <a v-if="row.actualweightminus == 0" style="color: red;">{{ row.actualweightminus }}</a>
+                <a v-else>{{ row.actualweightminus }}</a>
+              </template>
+            </el-table-column>
             <el-table-column label="误差值" min-width="60px" align="center" prop="diff" />
             <el-table-column label="准确率" min-width="60px" align="center" prop="diffRate" />
             <el-table-column label="完成时间" min-width="60px" align="center" prop="intime" />
@@ -387,7 +413,12 @@
             <el-table-column label="操作编号" min-width="60px" align="center" prop="sort" />
             <el-table-column label="撒料车辆" min-width="60px" align="center" prop="fname" />
             <el-table-column label="计划重量" min-width="60px" align="center" prop="lweight" />
-            <el-table-column label="实际重量" min-width="60px" align="center" prop="actualweightminus" />
+            <el-table-column label="实际重量" min-width="60px" align="center" prop="actualweightminus">
+              <template slot-scope="{row}">
+                <a v-if="row.actualweightminus == 0" style="color: red;">{{ row.actualweightminus }}</a>
+                <a v-else>{{ row.actualweightminus }}</a>
+              </template>
+            </el-table-column>
             <el-table-column label="误差值" min-width="60px" align="center" prop="diff" />
             <el-table-column label="准确率" min-width="60px" align="center" prop="diffRate" />
             <el-table-column label="完成时间" min-width="60px" align="center" prop="intime" />
@@ -456,7 +487,12 @@
             <el-table-column label="操作编号" min-width="60px" align="center" prop="sort" />
             <el-table-column label="撒料车辆" min-width="60px" align="center" prop="fname" />
             <el-table-column label="计划重量" min-width="60px" align="center" prop="lweight" />
-            <el-table-column label="实际重量" min-width="60px" align="center" prop="actualweightminus" />
+            <el-table-column label="实际重量" min-width="60px" align="center" prop="actualweightminus">
+              <template slot-scope="{row}">
+                <a v-if="row.actualweightminus == 0" style="color: red;">{{ row.actualweightminus }}</a>
+                <a v-else>{{ row.actualweightminus }}</a>
+              </template>
+            </el-table-column>
             <el-table-column label="误差值" min-width="60px" align="center" prop="diff" />
             <el-table-column label="准确率" min-width="60px" align="center" prop="diffRate" />
             <el-table-column label="完成时间" min-width="60px" align="center" prop="intime" />
@@ -486,7 +522,12 @@
             <el-table-column label="操作编号" min-width="70px" align="center" prop="sort" />
             <el-table-column label="撒料车辆" min-width="70px" align="center" prop="fname" />
             <el-table-column label="计划重量" min-width="70px" align="center" prop="lweight" />
-            <el-table-column label="实际重量" min-width="70px" align="center" prop="actualweightminus" />
+            <el-table-column label="实际重量" min-width="60px" align="center" prop="actualweightminus">
+              <template slot-scope="{row}">
+                <a v-if="row.actualweightminus == 0" style="color: red;">{{ row.actualweightminus }}</a>
+                <a v-else>{{ row.actualweightminus }}</a>
+              </template>
+            </el-table-column>
             <el-table-column label="误差值" min-width="70px" align="center" prop="diff" />
             <el-table-column label="准确率" min-width="70px" align="center" prop="diffRate" />
             <el-table-column label="完成时间" min-width="70px" align="center" prop="intime" />
@@ -525,7 +566,9 @@ export default {
       slwc1:undefined ,
       slwc2:undefined ,
       slzq1:undefined ,
-      slzq2:undefined ,
+      slzq2:undefined ,
+      minproesstime:undefined ,
+      maxproesstime:undefined ,
       ccys:false,
       myheight:970,
       title: '',
@@ -728,7 +771,9 @@ export default {
             this.isSpreadingPlan = false
             this.isResidualMaterialPlan = false
             this.isSpreadingPlanSH = false
-            this.isSpreadingPlanSS = false
+            this.isSpreadingPlanSS = false
+            this.table2.getdataListParm.name = 'getprocessAnalysisStr'
+            this.table3.getdataListParm.name = 'getprocessAnalysisHL'
             this.table2.getdataListParm.parammaps.id = response.data.list[0].id
             this.table2.getdataListParm.parammaps.pastureid = response.data.list[0].pastureid
             this.table3.getdataListParm.parammaps.pid = response.data.list[0].id
@@ -763,7 +808,10 @@ export default {
             this.isResidualMaterialPlan = false
             this.isPremixedPlan = false
             this.isSpreadingPlanSH = true
-            this.isSpreadingPlanSS = false
+            this.isSpreadingPlanSS = false
+            this.table2.getdataListParm.name = 'getprocessAnalysisStr'
+            this.table3.getdataListParm.name = 'getprocessAnalysisHL'
+            this.table4.getdataListParm.name = 'getprocessAnalysisSL'
             this.table2.getdataListParm.parammaps.id = response.data.list[0].id
             this.table2.getdataListParm.parammaps.pastureid = response.data.list[0].pastureid
             this.table3.getdataListParm.parammaps.pid = response.data.list[0].id
@@ -784,7 +832,10 @@ export default {
             this.isResidualMaterialPlan = false
             this.isPremixedPlan = false
             this.isSpreadingPlanSH = false
-            this.isSpreadingPlanSS = true
+            this.isSpreadingPlanSS = true
+            this.table2.getdataListParm.name = 'getprocessAnalysisStr'
+            this.table3.getdataListParm.name = 'getprocessAnalysisHL'
+            this.table4.getdataListParm.name = 'getprocessAnalysisSL'
             this.table2.getdataListParm.parammaps.id = response.data.list[0].id
             this.table2.getdataListParm.parammaps.pastureid = response.data.list[0].pastureid
             this.table3.getdataListParm.parammaps.pid = response.data.list[0].id
@@ -805,7 +856,10 @@ export default {
             this.isResidualMaterialPlan = false
             this.isPremixedPlan = false
             this.isSpreadingPlanSH = true
-            this.isSpreadingPlanSS = false
+            this.isSpreadingPlanSS = false
+            this.table2.getdataListParm.name = 'getprocessAnalysisStr'
+            this.table3.getdataListParm.name = 'getprocessAnalysisHL'
+            this.table4.getdataListParm.name = 'getprocessAnalysisSL'
             this.table2.getdataListParm.parammaps.id = response.data.list[0].id
             this.table2.getdataListParm.parammaps.pastureid = response.data.list[0].pastureid
             this.table3.getdataListParm.parammaps.pid = response.data.list[0].id
@@ -826,7 +880,10 @@ export default {
             this.isResidualMaterialPlan = false
             this.isPremixedPlan = false
             this.isSpreadingPlanSH = false
-            this.isSpreadingPlanSS = false
+            this.isSpreadingPlanSS = false
+            this.table2.getdataListParm.name = 'getprocessAnalysisStr'
+            this.table3.getdataListParm.name = 'getprocessAnalysisHL'
+            this.table4.getdataListParm.name = 'getprocessAnalysisSL'
             this.table2.getdataListParm.parammaps.id = response.data.list[0].id
             this.table2.getdataListParm.parammaps.pastureid = response.data.list[0].pastureid
             this.table3.getdataListParm.parammaps.pid = response.data.list[0].id
@@ -868,7 +925,7 @@ export default {
         this.table.getdataListParm.parammaps.startTime = ''
         this.table.getdataListParm.parammaps.stopTime = ''
       }
-    
+
       this.table.getdataListParm.parammaps.hlwc1 = this.hlwc1
       this.table.getdataListParm.parammaps.hlwc2 = this.hlwc2
       this.table.getdataListParm.parammaps.hlzq1 = this.hlzq1
@@ -877,6 +934,8 @@ export default {
       this.table.getdataListParm.parammaps.slwc2 = this.slwc2
       this.table.getdataListParm.parammaps.slzq1 = this.slzq1
       this.table.getdataListParm.parammaps.slzq2 = this.slzq2
+      this.table.getdataListParm.parammaps.minproesstime = this.minproesstime
+      this.table.getdataListParm.parammaps.maxproesstime = this.maxproesstime
       // if(this.ccys == true){
       //   if(this.table3.getdataListParm.name !== 'getprocessAnalysisHL'){
       //     this.hlwc1 = undefined
@@ -1225,33 +1284,6 @@ export default {
       this.chart1.listLoading = true
       GetReportform(this.chart1.getdataListParm).then(response => {
         if (response.data.list !== null) {
-          // response.data.list = {
-          //   // 'data1': ['09:34:32', '09:34:46', '09:34:46', '09:34:50'],
-          //   'data2': [
-          //     ['09:34:32', '1724.11'],
-          //     ['09:34:46', '1724.12'],
-          //     ['09:34:46', '-50.13'],
-          //     ['09:34:50', '-51.14']
-          //   ],
-          //   'data3': [
-          //     ['09:34:32', '0'],
-          //     ['09:34:46', '1725.15'],
-          //     ['09:34:46', '1726.16'],
-          //     ['09:34:50', '1.17']
-          //   ],
-          //   'data4': [
-          //     ['09:34:32', '0.18'],
-          //     ['09:34:46', '1725.19'],
-          //     ['09:34:46', '1335.20'],
-          //     ['09:34:50', '1.21']
-          //   ],
-          //   'data5': [
-          //     ['09:34:32', '0.22', '栏舍', '303东1'],
-          //     ['09:34:46', '1726.23',  '饲料', '国产燕麦2'],
-          //     ['09:34:46', '1335.24', '栏舍', '303东3'],
-          //     ['09:34:50', '1.25', '饲料', '国产燕麦4']
-          //   ]
-          // }
           this.chart1.list = response.data.data
           console.log('实时监控', response.data.list)
           this.chart1.chartLine_data = response.data.list
@@ -1280,8 +1312,6 @@ export default {
         }, {
           itemWidth: 5, itemHeight: 5, right: '0', textStyle: { fontSize: 12 },
           data: [
-            // { name: '开始重量', icon: 'image://https://kptyun.cn:8081/file/pic/3.png' },            // { name: '结束重量', icon: 'image://https://kptyun.cn:8081/file/pic/4.png' },
-            // { name: '结束重量', icon: 'image://https://kptyun.cn:8081/file/pic/4.png' },            // { name: '结束重量', icon: 'image://https://kptyun.cn:8081/file/pic/4.png' },
             { name: '开始重量' },
             { name: '结束重量' }
           ]
@@ -1328,8 +1358,6 @@ export default {
         series: [
           { symbol: 'none', name: '实际重量', type: 'line', data: chartLine_data.data3, itemStyle: { normal: { lineStyle: { color: '#ff0000' ,width:2}}}},
           { symbol: 'none', name: '设计重量', type: 'line', step: 'middle', data: chartLine_data.data2 , itemStyle: { normal: { lineStyle: {  width:2}}}},
-          // { name: '开始重量', symbol: 'image://https://kptyun.cn:8081/file/pic/3.png', symbolSize: 10, type: 'scatter', data: chartLine_data.data4 },
-          // { name: '结束重量', symbol: 'image://https://kptyun.cn:8081/file/pic/4.png', symbolSize: 10, type: 'scatter', data: chartLine_data.data5 }
           { name: '开始重量', symbolSize: 6, type: 'scatter', data: chartLine_data.data4 },
           { name: '结束重量', symbolSize: 6, type: 'scatter', data: chartLine_data.data5 }
         ]

Vissa filer visades inte eftersom för många filer har ändrats