Переглянути джерело

Merge branch 'develop' into beefcattleAdmin

# Conflicts:
#	src/views/dashboard/pasture/index.vue
#	src/views/login/index.vue
duanxiaoduan 1 рік тому
батько
коміт
ae86a096ee

+ 53 - 0
.drone.yml

@@ -0,0 +1,53 @@
+kind: pipeline
+type: docker
+name: tmp-admin
+
+clone:
+  depth: 1
+  disable: true
+
+steps:
+  - name: clone
+    image: alpine/git
+    commands:
+      - git config --global credential.helper store
+      - git clone -b develop http://192.168.1.8:3000/duanxiaoduan/tmr-admin.git
+      - cp -R tmr-admin/* ./
+      - ls -l
+  - 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: [1.0.0,latest]
+
+trigger:
+  branch:
+    include:
+      - develop
+  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

+ 2 - 15
.env.development

@@ -3,23 +3,10 @@ ENV = 'development'
 
 # base api
 # 测试线
-# VUE_APP_BASE_API = 'http://210.16.189.72:8081/'
+# VUE_APP_BASE_API = 'http://192.168.1.70:8082/'
 # VUE_APP_BASE_API = 'http://kpttest.kptyun.com/'
-# 南通测试线
-# 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/'
-
-
-
-# 白少杰
+# 白少后台本地
 VUE_APP_BASE_API = 'http://192.168.1.77:8081/'
-
 # vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
 # to control whether the babel-plugin-dynamic-import-node plugin is enabled.
 # It only does one thing by converting all import() to require().

+ 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/templates/default.conf.template
+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
 

+ 54 - 0
default.conf.template

@@ -0,0 +1,54 @@
+server {
+    listen       80;
+    listen  [::]:80;
+    server_name  localhost;
+
+    #access_log  /var/log/nginx/host.access.log  main;
+
+   location / {
+        root /usr/share/nginx/html;
+        #index index.html;
+        try_files $uri $uri/ /index.html;
+   }
+    #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;
+    }
+
+    # location /prod-api/ {
+    #    proxy_pass  ${BACKEND_HOST};
+    #    proxy_set_header Host $host;
+    #    proxy_set_header X-Real-IP $remote_addr;
+    #    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+    #    proxy_http_version 1.1;
+    #    proxy_set_header Connection "";
+    #}
+
+    # proxy the PHP scripts to Apache listening on 127.0.0.1:80
+    #
+    #location ~ \.php$ {
+    #    proxy_pass   http://127.0.0.1;
+    #}
+
+    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
+    #
+    #location ~ \.php$ {
+    #    root           html;
+    #    fastcgi_pass   127.0.0.1:9000;
+    #    fastcgi_index  index.php;
+    #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
+    #    include        fastcgi_params;
+    #}
+
+    # deny access to .htaccess files, if Apache's document root
+    # concurs with nginx's one
+    #
+    #location ~ /\.ht {
+    #    deny  all;
+    #}
+}
+


+ 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",

+ 2 - 2
src/api/common.js

@@ -116,7 +116,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 +134,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 - 1
src/main.js

@@ -45,7 +45,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

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

+ 44 - 40
src/utils/request.js

@@ -2,21 +2,25 @@ 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
+
+//获取当前url
+const DoMainString = document.querySelector("html").getAttribute("domain");
+var URL = process.env.VUE_APP_BASE_API
+if (DoMainString) {
+  URL = DoMainString
+}
+console.log(URL,'===========URL')
+
+if(URL.indexOf('/')==0 && URL.length==1){
+  URL= window.location.protocol + "//"+window.location.host+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
@@ -35,7 +39,7 @@ service.interceptors.request.use(
       } else {
         config.headers['token'] = getToken()
       }
-    }
+    }
     return config
   },
   error => {
@@ -97,30 +101,30 @@ 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
-    // 设置请求超时次数
-    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)
+    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)
     })
     // 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
       }}

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

@@ -1912,11 +1912,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

+ 62 - 35
src/views/dashboard/pasture/index.vue

@@ -378,6 +378,7 @@
             <div class="title">
               <div class="img-title" />
               <span class="content">库存预警</span>
+              <a style="float: right;color: #009C69;font-size: 12px;margin-right: 10px;" @click="handleMore">查看更多 &nbsp;>></a>
               <a style="float: right;color: #c88d42;font-size: 12px;margin-right: 10px;" @click="handleMore">查看更多 &nbsp;>></a>
             </div>
             <div id="table" style="height: 330px;background: #fff;">
@@ -633,7 +634,7 @@ export default {
       cellStyle: { padding: 0 + 'px' },
       timer: null,
       clickKey: 0,
-      isClick: false
+      isClick: false,
     }
   },
   watch: {
@@ -881,13 +882,35 @@ export default {
         },
         legend: [{
           itemWidth: 15, itemHeight: 7, right: '25%', textStyle: { fontSize: 12 },
-          data: [{ name: '设计重量' }, { name: '实际重量' }]
+          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' }]
+          itemWidth: 5, itemHeight: 5, right: '0', textStyle: { fontSize: 12 },
+          data: [
+            { name: '开始重量' },
+            { name: '结束重量' }
+          ]
         }],
         tooltip: {
-          trigger: 'axis'
+          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: [
@@ -910,8 +933,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)
@@ -1084,30 +1107,32 @@ export default {
       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)
+          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 +1334,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

+ 4 - 40
src/views/formulationPlan/dhedFormula/index.vue

@@ -98,7 +98,6 @@
         <el-table-column v-if="table.isRW1" :key="8" label="第一班比例(%)" min-width="85px" align="center">
           <template slot-scope="scope">
             <span v-if="scope.row.NoEdit">{{ scope.row.r1 }}</span>
-            <!-- <el-input v-if="scope.row.Edit" v-model="scope.row.r1" :disabled="scope.row.isOneWeight" step="0.01" type="number" style="width:100%;padding:10px 0;"  @focus="focusR(scope.row)" @blur="blurR(scope.row,1)" /> -->
             <el-input v-if="scope.row.Edit" v-model="scope.row.r1" :disabled="scope.row.isOneWeight" step="0.01" type="number" style="width:100%;padding:10px 0;" @blur="blurR(scope.row,1)" />
           </template>
         </el-table-column>
@@ -117,7 +116,6 @@
         <el-table-column v-if="table.isRW2" :key="11" label="第二班比例(%)" min-width="85px" align="center">
           <template slot-scope="scope">
             <span v-if="scope.row.NoEdit">{{ scope.row.r2 }}</span>
-            <!-- <el-input v-if="scope.row.Edit" v-model="scope.row.r2" step="0.01" type="number" :disabled="scope.row.isTwoWeight" style="width:100%;padding:10px 0;" @focus="focusR(scope.row)" @blur="blurR(scope.row,2)" /> -->
             <el-input v-if="scope.row.Edit" v-model="scope.row.r2" step="0.01" type="number" :disabled="scope.row.isTwoWeight" style="width:100%;padding:10px 0;" @blur="blurR(scope.row,2)" />
           </template>
         </el-table-column>
@@ -136,7 +134,6 @@
         <el-table-column v-if="table.isRW3" :key="14" label="第三班比例(%)" min-width="85px" align="center">
           <template slot-scope="scope">
             <span v-if="scope.row.NoEdit">{{ scope.row.r3 }}</span>
-            <!-- <el-input v-if="scope.row.Edit" v-model="scope.row.r3" step="0.01" type="number" :disabled="scope.row.isThreeWeight" style="width:100%;padding:10px 0;" @focus="focusR(scope.row)" @blur="blurR(scope.row,3)" /> -->
             <el-input v-if="scope.row.Edit" v-model="scope.row.r3" step="0.01" type="number" :disabled="scope.row.isThreeWeight" style="width:100%;padding:10px 0;" @blur="blurR(scope.row,3)" />
           </template>
         </el-table-column>
@@ -155,7 +152,6 @@
         <el-table-column v-if="table.isRW4" :key="17" label="第四班比例(%)" min-width="85px" align="center">
           <template slot-scope="scope">
             <span v-if="scope.row.NoEdit">{{ scope.row.r4 }}</span>
-            <!-- <el-input v-if="scope.row.Edit" v-model="scope.row.r4" step="0.01" type="number" :disabled="scope.row.isFourWeight" style="width:100%;padding:10px 0;" @focus="focusR(scope.row)" @blur="blurR(scope.row,4)" /> -->
             <el-input v-if="scope.row.Edit" v-model="scope.row.r4" step="0.01" type="number" :disabled="scope.row.isFourWeight" style="width:100%;padding:10px 0;" @blur="blurR(scope.row,4)" />
           </template>
         </el-table-column>
@@ -1077,13 +1073,6 @@ export default {
         Nutritional: '营养评估',
         history: '历史记录'
       },
-      focusWRow: {}, // 一班重量得到焦点暂存
-      focusWRow2: {}, // 2班重量得到焦点暂存
-      focusWRow3: {}, // 3班重量得到焦点暂存
-      focusWRow4: {}, // 4班重量得到焦点暂存
-      focusWRow5: {}, // 5班重量得到焦点暂存
-      focusWRow6: {}, // 6班重量得到焦点暂存
-      focusList1:{},  //比例失去焦点暂存
 
       requestParam: {},
       download: {
@@ -1774,10 +1763,7 @@ export default {
       var todayfeed = parseFloat(sumw) + parseFloat(sumbw)
       this.$set(row, 'todayfeed', todayfeed)
     },
-    // 总比例
-    focusR(row){
-      this.focusList1 = Object.assign({}, row)
-    },
+
     blurR(row,item) {
       if (row.ftid !== '-1' && row.ftid !== '') {
         row.Sfweight = this.recipeTemplateList.find(obj => obj.id == row.ftid).Sfweight
@@ -1863,31 +1849,6 @@ export default {
       var todayfeed = parseFloat(sumw) + parseFloat(sumbw)
       this.$set(row, 'todayfeed', todayfeed)
     },
-    // 一班重量得到焦点
-    focusW(row) {
-      console.log(row, '====')
-      this.focusWRow = Object.assign({}, row)
-    },
-    // 1班重量得到焦点
-    focusW2(row) {
-      this.focusWRow2 = Object.assign({}, row)
-    },
-    // 3班重量得到焦点
-    focusW3(row) {
-      this.focusWRow3 = Object.assign({}, row)
-    },
-    // 4班重量得到焦点
-    focusW4(row) {
-      this.focusWRow4 = Object.assign({}, row)
-    },
-    // 5班重量得到焦点
-    focusW5(row) {
-      this.focusWRow5 = Object.assign({}, row)
-    },
-    // 6班重量得到焦点
-    focusW6(row) {
-      this.focusWRow6 = Object.assign({}, row)
-    },
     celldblclick(row, column, cell, event) {
       console.log(row, '=====')
       this.handleUpdate(row)
@@ -1991,6 +1952,9 @@ export default {
       // }
       this.table.rwList = arr
       console.log('点击了编辑保存', row)
+      if(row.feedweight == ''){
+        row.feedweight = row.todayweight
+      }
       this.table.temp.pastureid = row.pastureid
       this.table.temp.id = row.id
       this.table.temp.barname = row.barname

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

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

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

@@ -1,4 +1,8 @@
 <template>
+  <div class="login-container">
+    <div class="new-login">
+      <div class="new-login-l">
+        <img src="@/assets/images/logo.png" alt="">
   <div class="login">
     <div class="container">
       <div class="header">
@@ -48,6 +52,7 @@
 import { validUsername } from '@/utils/validate'
 import Cookies from 'js-cookie'
 import { getToken } from '@/utils/auth'
+const md5 = require("md5")
 export default {
   name: 'Login',
   data() {
@@ -120,13 +125,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.$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)
@@ -135,7 +144,7 @@ export default {
                 Cookies.remove('accountInfo')
               }
 
-              // 若为本地环境 则手写cookie
+              // 若为本地环境 则手写cookie  
               if (window.location.href.indexOf('localhost') != -1) {
                 Cookies.set('token', getToken(), 1440)
               }

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

@@ -1075,7 +1075,7 @@ 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' // 请求下载文件的地址
         console.log(url)

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

+ 1 - 32
src/views/statisticalAnalysis/processAnalysis/pasture/index.vue

@@ -868,7 +868,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
@@ -1225,33 +1225,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 +1253,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 +1299,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 }
         ]