Browse Source

1.日执行驾驶员禁止时修改颜色为黑色;2.新增快速完成

duanxiaoduan 1 year ago
parent
commit
466ef0aad3
3 changed files with 37 additions and 5 deletions
  1. 2 2
      .env.development
  2. 3 3
      src/utils/request.js
  3. 32 0
      src/views/formulationPlan/dailyExecutionPlan/index.vue

+ 2 - 2
.env.development

@@ -4,9 +4,9 @@ ENV = 'development'
 # base api
 # 测试线
 # VUE_APP_BASE_API = 'http://192.168.1.70:8082/'
-VUE_APP_BASE_API = 'http://kpttest.kptyun.com/'
+# VUE_APP_BASE_API = 'http://kpttest.kptyun.com/'
 # 白少后台本地
-# VUE_APP_BASE_API = 'http://192.168.1.77:8081/'
+VUE_APP_BASE_API = 'http://192.168.1.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.

+ 3 - 3
src/utils/request.js

@@ -14,9 +14,9 @@ if (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/"
-// }
+if (reg.test(browserUrl)){
+  URL = window.location.protocol +"//"+ browserUrl + ":80/"
+}
 
 Cookies.set('url',URL)
 console.log(process.env.VUE_APP_BASE_API,'===========URL1111')

+ 32 - 0
src/views/formulationPlan/dailyExecutionPlan/index.vue

@@ -54,6 +54,7 @@
         <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">
@@ -3133,6 +3134,34 @@ export default {
           }
         })
       })
+    },
+    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()
+            }
+          })
+        })
+      }
     }
   }
 }
@@ -3180,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>