duanxiaoduan 2 gadi atpakaļ
vecāks
revīzija
a731065906

+ 5 - 2
.env.development

@@ -3,9 +3,12 @@ ENV = 'development'
 
 # base api
 # 测试线
-# VUE_APP_BASE_API = 'http://210.16.189.72:8081/'
+VUE_APP_BASE_API = 'http://210.16.189.72:8081/'
 
-VUE_APP_BASE_API = 'http://kpttest.kptyun.com/'
+
+# VUE_APP_BASE_API = 'http://kpttest.kptyun.com/'
+
+# VUE_APP_BASE_API = 'http://tmrwatch.cn/'
 
 
 

BIN
dist.zip


+ 1 - 0
package.json

@@ -30,6 +30,7 @@
     "normalize.css": "7.0.0",
     "nprogress": "0.2.0",
     "path-to-regexp": "2.4.0",
+    "print-js": "^1.6.0",
     "screenfull": "4.2.0",
     "sortable.js": "^0.3.0",
     "umy-ui": "^1.1.6",

+ 9 - 0
src/api/common.js

@@ -113,6 +113,15 @@ export function postJson(url,data) {
     timeout: 600000,
     data
   })
+}
+
+export function postJson2(url,data) {
+  return request({
+    url: url,
+    method: 'post',
+    timeout: 600000,
+    data
+  })
 }
 
 export function getJson(url,data) {

+ 5 - 5
src/utils/request.js

@@ -11,12 +11,12 @@ var aa = process.env.VUE_APP_BASE_API
 if(aa.indexOf('/')==0 && aa.length==1){
   aa= window.location.protocol + "//"+window.location.host+aa
 }
-const service = axios.create({
+  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
+    timeout: 60000 ,// request timeout
+  })
+// request interceptor
 service.interceptors.request.use(
   config => {
     // do something before request is sent
@@ -35,7 +35,7 @@ service.interceptors.request.use(
       } else {
         config.headers['token'] = getToken()
       }
-    }
+    }
     return config
   },
   error => {

+ 108 - 1
src/views/formulationPlan/dailyExecutionPlan/index.vue

@@ -31,6 +31,7 @@
           <el-option v-for="item in iscompletedList" :key="item.value" :label="item.lable" :value="item.value" />
         </el-select>
         <el-button class="export" icon="el-icon-upload2" @click="handleExport">导出</el-button>
+        <!-- <el-button class="export" icon="el-icon-upload2" @click="handlePrint">打印</el-button> -->
         <el-button class="export" style="margin-left: -5px;" @click="handleDeleteRecord">删除记录</el-button>
       </div>
       <div class="operation" style="margin-bottom: 10px;">
@@ -771,6 +772,7 @@
 <script>
 import { GetDataByName, GetDataByNames, ExecDataByConfig, PostDataByName, getDorm, GetReportform, checkButtons,postJson } from '@/api/common'
 import RevisePlan from './revisePlan.vue'
+import printJS from 'print-js'
 import { parseTime, json2excel,handleTableSpan, handleObjectSpanMethod } from '@/utils/index.js'
 import Cookies from 'js-cookie'
 import Sortable from 'sortablejs'
@@ -2379,7 +2381,102 @@ export default {
           })
         })
       }
-    }
+    },
+    handlePrint() {
+      this.downLoad.getdataListParm.parammaps.date = this.table.getdataListParm.parammaps.mydate
+      this.downLoad.getdataListParm.parammaps.lpplantype = this.table.getdataListParm.parammaps.lpplantype
+      this.downLoad.getdataListParm.parammaps.times = this.table.getdataListParm.parammaps.times
+      this.downLoad.getdataListParm.parammaps.enable = this.table.getdataListParm.parammaps.enable
+      this.downLoad.getdataListParm.parammaps.enable2 = this.table.getdataListParm.parammaps.enable2
+      var exportTitle = ''
+      if (this.table.getdataListParm.parammaps.plandimen == '1') {
+        if (this.table.getdataListParm.parammaps.enable3 == '0') {
+          this.downLoad.getdataListParm.name = 'downloadPlanTLJDTMR'
+          exportTitle = this.table.getdataListParm.parammaps.mydate + '投料简打'
+        } else if (this.table.getdataListParm.parammaps.enable3 == '1') {
+          this.downLoad.getdataListParm.name = 'downloadPlanTLLDTMR'
+          exportTitle = this.table.getdataListParm.parammaps.mydate + '累加投料'
+        } else if (this.table.getdataListParm.parammaps.enable3 == '2') {
+          this.downLoad.getdataListParm.name = 'downloadPlanSLJDTMR'
+          exportTitle = this.table.getdataListParm.parammaps.mydate + '撒料简打'
+        } else if (this.table.getdataListParm.parammaps.enable3 == '3') {
+          this.downLoad.getdataListParm.name = 'downloadPlanTSLJDTMR'
+          exportTitle = this.table.getdataListParm.parammaps.mydate + '投撒料简打'
+        } else if (this.table.getdataListParm.parammaps.enable3 == '4') {
+          this.downLoad.getdataListParm.name = 'downloadPlanTSLLDTMR'
+          exportTitle = this.table.getdataListParm.parammaps.mydate + '投撒料累加'
+        } else if (this.table.getdataListParm.parammaps.enable3 == '5') {
+          this.downLoad.getdataListParm.name = 'downloadPlanBZJDTMR'
+          exportTitle = this.table.getdataListParm.parammaps.mydate + '包装简打'
+        } else {
+          this.downLoad.getdataListParm.name = 'downloadPlanSFJDTMR'
+          exportTitle = this.table.getdataListParm.parammaps.mydate + '实发简打'
+        }
+      } else {
+        if (this.table.getdataListParm.parammaps.enable3 == '0') {
+          this.downLoad.getdataListParm.name = 'downloadPlanTLJD'
+          exportTitle = this.table.getdataListParm.parammaps.mydate + '投料简打'
+        } else if (this.table.getdataListParm.parammaps.enable3 == '1') {
+          this.downLoad.getdataListParm.name = 'downloadPlanTLLD'
+          exportTitle = this.table.getdataListParm.parammaps.mydate + '累加投料'
+        } else if (this.table.getdataListParm.parammaps.enable3 == '2') {
+          this.downLoad.getdataListParm.name = 'downloadPlanSLJD'
+          exportTitle = this.table.getdataListParm.parammaps.mydate + '撒料简打'
+        } else if (this.table.getdataListParm.parammaps.enable3 == '3') {
+          this.downLoad.getdataListParm.name = 'downloadPlanTSLJD'
+          exportTitle = this.table.getdataListParm.parammaps.mydate + '投撒料简打'
+        } else if (this.table.getdataListParm.parammaps.enable3 == '4') {
+          this.downLoad.getdataListParm.name = 'downloadPlanTSLLD'
+          exportTitle = this.table.getdataListParm.parammaps.mydate + '投撒料累加'
+        } else if (this.table.getdataListParm.parammaps.enable3 == '5') {
+          this.downLoad.getdataListParm.name = 'downloadPlanBZJD'
+          exportTitle = this.table.getdataListParm.parammaps.mydate + '包装简打'
+        } else {
+          this.downLoad.getdataListParm.name = 'downloadPlanSFJD'
+          exportTitle = this.table.getdataListParm.parammaps.mydate + '实发简打'
+        }
+      }
+      GetReportform(this.downLoad.getdataListParm).then(response => {
+        if (response.data.list !== null) {
+          this.downLoad.labelList = []
+          var filterValArr = []
+          for (let i = 0; i < response.data.list.data1.length; i++) {
+            this.downLoad.labelList.push(response.data.list.data1[i].label)
+            filterValArr.push(response.data.list.data1[i].prop)
+          }
+          this.downLoad.list = response.data.list.data2
+        } else {
+          this.downLoad.list = []
+        }
+        let data = []
+        for(let i=0;i<filterValArr.length;i++){
+          let obj = {}
+          obj.field = filterValArr[i]
+          obj.columnSize = i
+          for(let j=i;j<this.downLoad.labelList.length;j++){
+            obj.displayName = this.downLoad.labelList[i]
+          }
+          if(obj.field !== undefined && obj.displayName !== undefined){
+            data.push(obj)
+          }
+          for(let i=0;i<this.downLoad.list.length;i++){
+            if(this.downLoad.list[i][obj.displayName] == null || this.downLoad.list[i][obj.displayName] == undefined){
+              this.downLoad.list[i][obj.displayName] = ''
+            }
+          }
+        }
+        console.log(this.downLoad.list)
+        printJS({
+          printable:this.downLoad.list,
+          properties:data,
+          type:'json',
+          header:exportTitle,
+          //样式设置
+          gridStyle:'border:1px solid #ccc;',
+          gridHeaderStyle:'border:1px solid #ccc;text-align:center'
+        })
+      })
+    },
   }
 }
 </script>
@@ -2390,6 +2487,16 @@ export default {
 
   .el-table .success-row {
     background: #f0f9eb;
+  }
+  @page{
+    size: auto A4 landscape;
+    margin: 3mm;
+  }
+
+  .agreeCon {
+    background: #fff;
+    box-sizing: border-box;
+    padding: 2rem 3rem 4rem;
   }
 </style>
 <style lang="scss" scoped>

+ 65 - 5
src/views/formulationPlan/dhedFormula/index.vue

@@ -97,7 +97,7 @@
         <el-table-column v-if="table.isRW1" :key="8" label="第一班比例(%)" min-width="80px" 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:95%;padding:10px 0;" @blur="blurR(scope.row)" />
+            <el-input v-if="scope.row.Edit" v-model="scope.row.r1" :disabled="scope.row.isOneWeight" step="0.01" type="number" style="width:95%;padding:10px 0;"  @focus="focusR(scope.row)" @blur="blurR(scope.row,1)" />
           </template>
         </el-table-column>
         <el-table-column v-if="table.isRW1" :key="9" label="第一班重量" min-width="120px" align="center" :render-header="renderHeader">
@@ -115,7 +115,7 @@
         <el-table-column v-if="table.isRW2" :key="11" label="第二班比例(%)" min-width="80px" 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:95%;padding:10px 0;" @blur="blurR(scope.row)" />
+            <el-input v-if="scope.row.Edit" v-model="scope.row.r2" step="0.01" type="number" :disabled="scope.row.isTwoWeight" style="width:95%;padding:10px 0;" @focus="focusR(scope.row)" @blur="blurR(scope.row,2)" />
           </template>
         </el-table-column>
         <el-table-column v-if="table.isRW2" :key="12" label="第二班重量" min-width="120px" align="center" :render-header="renderHeader">
@@ -133,7 +133,7 @@
         <el-table-column v-if="table.isRW3" :key="14" label="第三班比例(%)" min-width="80px" 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:95%;padding:10px 0;" @blur="blurR(scope.row)" />
+            <el-input v-if="scope.row.Edit" v-model="scope.row.r3" step="0.01" type="number" :disabled="scope.row.isThreeWeight" style="width:95%;padding:10px 0;" @focus="focusR(scope.row)" @blur="blurR(scope.row,3)" />
           </template>
         </el-table-column>
         <el-table-column v-if="table.isRW3" :key="15" label="第三班重量" min-width="120px" align="center" :render-header="renderHeader">
@@ -151,7 +151,7 @@
         <el-table-column v-if="table.isRW4" :key="17" label="第四班比例(%)" min-width="80px" 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:95%;padding:10px 0;" @blur="blurR(scope.row)" />
+            <el-input v-if="scope.row.Edit" v-model="scope.row.r4" step="0.01" type="number" :disabled="scope.row.isFourWeight" style="width:95%;padding:10px 0;" @focus="focusR(scope.row)" @blur="blurR(scope.row,4)" />
           </template>
         </el-table-column>
         <el-table-column v-if="table.isRW4" :key="18" label="第四班重量" min-width="120px" align="center" :render-header="renderHeader">
@@ -1036,6 +1036,7 @@ export default {
       focusWRow2: {}, // 2班重量得到焦点暂存
       focusWRow3: {}, // 3班重量得到焦点暂存
       focusWRow4: {}, // 4班重量得到焦点暂存
+      focusList1:{},  //比例失去焦点暂存
 
       requestParam: {},
       download: {
@@ -1853,7 +1854,27 @@ export default {
       row.dailyWeight = formatNum(row.dailyWeight, parseInt(Cookies.get('decimal')))
     },
     // 总比例
-    blurR(row) {
+    focusR(row){
+      this.focusList1 = Object.assign({}, row)
+    },
+    blurR(row,item) {
+      if(item == 1){
+        if(this.focusList1.r1 == row.r1){
+          return false
+        }
+      }else if(item == 2){
+        if(this.focusList1.r2 == row.r2){
+          return false
+        }
+      }else if(item == 3){
+        if(this.focusList1.r3 == row.r3){
+          return false
+        }
+      }else if(item == 4){
+        if(this.focusList1.r4 == row.r4){
+          return false
+        }
+      }
       if (row.r1 == '') { row.r1 = 0 }
       if (row.r2 == '') { row.r2 = 0 }
       if (row.r3 == '') { row.r3 = 0 }
@@ -4092,6 +4113,7 @@ export default {
       setTimeout(() => {
         this.isokDisable = false
       }, 1000)
+      let createdate = parseTime(new Date(), '{y}-{m}-{d} {h}:{i}:{s}')
       // this.requestParam.parammaps = this.table.temp
       this.requestParam.common = {
         'returnmap': '0'
@@ -4138,6 +4160,44 @@ export default {
         pastureid: row.pastureid,
         fpid: row.id
       }}
+      // 临时注释
+      // this.requestParam.data[3] = { 'name': 'insertFeedphistory', 'type': 'e', 'parammaps': {
+      //   createdate:createdate,
+      //   pastureid:row.pastureid,
+      //   barname:row.barname,
+      //   barid:row.barid,
+      //   softccount:row.softccount,
+      //   ccount:row.ccount,
+      //   ratio:row.ratio,
+      //   ccountratio:row.ccountratio,
+      //   ftid:row.ftid,
+      //   ftname:row.ftname,
+      //   ptsfid:row.ptsfid,
+      //   ptsfname:row.ptsfname,
+      //   feedweight:row.feedweight,
+      //   ftweight:row.ftweight,
+      //   supplyweight:row.supplyweight
+      // }}
+      // this.requestParam.data[4] = { 'name': 'insertSpotList2', 'resultmaps': { 'list': this.table.rwList }}
+      // this.requestParam.data[4].children = []
+      // this.requestParam.data[4].children[0] = { 'name': 'insertFpdetailhistory', 'type': 'e', 'parammaps': {
+      //   createdate:createdate,
+      //   pastureid: '@insertSpotList2.pastureid',
+      //   barname: row.barname,
+      //   barid: '@insertSpotList2.barid',
+      //   times: '@insertSpotList2.times',
+      //   tratio: '@insertSpotList2.tratio',
+      //   weight: '@insertSpotList2.weight',
+      //   cowcount: '@insertSpotList2.cowcount',
+      //   ccountradio: row.ccountratio,
+      //   ptid: '@insertSpotList2.ptid',
+      //   ptsid: '@insertSpotList2.ptsid',
+      //   supplement: '@insertSpotList2.supplement',
+      //   feedweight: row.feedweight,
+      //   supplyweight: row.supplyweight,
+      //   ratio: row.ratio
+      // }}
+      // 临时注释
       ExecDataByConfig(this.requestParam).then(response => {
         console.log('编辑保存发送参数', this.requestParam)
         if (response.msg === 'fail') {

+ 19 - 0
src/views/formulationPlan/materialIssuancePlan/index.vue

@@ -1059,6 +1059,9 @@ export default {
           data.parammaps = this.create.temp
           data.parammaps.tmrid = this.create.temp.mytmrid
           data.parammaps.tmrname = this.create.temp.mytmrname
+          //临时注释
+          // data.old = this.create.temp.arrList
+          //临时注释
           postJson(url, data).then(response => {
             console.log('新增保存发送参数', this.requestParam)
             if (response.msg !== 'fail') {
@@ -1482,11 +1485,27 @@ export default {
         this.requestParam.data = []
         this.requestParam.data[0] = { 'name': 'deleteLpplandtl1All', 'type': 'e', 'parammaps': { pastureid:  Cookies.get('pastureid') ,times:this.table.getdataListParm.parammaps.times}},
         this.requestParam.data[1] = { 'name': 'deletefpdetailAll', 'type': 'e', 'parammaps': { pastureid:  Cookies.get('pastureid') ,times:this.table.getdataListParm.parammaps.times}},
+        this.requestParam.data[1] = { 'name': 'deletefpdetailAll', 'type': 'e', 'parammaps': { pastureid:  Cookies.get('pastureid') ,times:this.table.getdataListParm.parammaps.times}},
         ExecDataByConfig(this.requestParam).then(response => {
           console.log('清空已分配栏舍', this.requestParam)
           if (response.msg === 'fail') {
             this.$notify({ title: '清空失败', message: response.data, type: 'warning', duration: 2000 })
           } else {
+            // 临时注释
+            // let url = 'authdata/spillageall/del'
+            // let data  = {}
+            // data.parammaps = {}
+            // data.parammaps.pastureid = Cookies.get('pastureid')
+            // data.parammaps.times = this.table.getdataListParm.parammaps.times
+            // 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 })
+            //   }
+            // })
+            // 临时注释
             this.$notify({ title: '清空成功', message: '清空成功', type: 'success', duration: 2000 })
             this.getList()
           }

+ 13 - 0
src/views/formulationPlan/recipeTemplate/index.vue

@@ -1380,6 +1380,19 @@ export default {
         if (response.msg !== 'fail') {
           this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
           this.getList()
+          // 临时注释
+          // let data = {}
+          // data.name = 'insertFeedtemplethistory'
+          // data.parammaps = this.table.temp
+          // PostDataByName(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 })
+          //   }
+          // })
+          // 临时注释
         } else {
           const isRepeat = new RegExp('Duplicate entry :feedtemplet.tCode')
           if (isRepeat.test(response.data)) {

+ 10 - 10
src/views/statisticalAnalysis/errorAnalysis/pasture/index.vue

@@ -22,7 +22,7 @@
             <el-option v-for="(item,index) in tab.TMRNameList" :key="index" :label="item.tmrloadname" :value="item.tmrloadname" />
           </el-select>
           <!-- 临时注释 -->
-          <div style="display: inline-block;" class="filter-item1">
+         <!-- <div style="display: inline-block;" class="filter-item1">
             <el-input-number :controls="false" :precision="2" v-model="tab.table.getdataListParm.parammaps.hlwc1" placeholder="混料误差值" style="width: 120px;" class="filter-item" clearable />
             <span>-</span>
             <el-input-number :controls="false" :precision="2"  v-model="tab.table.getdataListParm.parammaps.hlwc2" placeholder="混料误差值" style="width: 120px;" class="filter-item" clearable />
@@ -52,7 +52,7 @@
             <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-checkbox v-model="tab.table.getdataListParm.parammaps.error" style="margin-right: 10px;" @change="changeccysChecked">只看超出预设值数据</el-checkbox>
+          <el-checkbox v-model="tab.table.getdataListParm.parammaps.error" style="margin-right: 10px;" @change="changeccysChecked">只看超出预设值数据</el-checkbox> -->
           <!-- 临时注释 -->
           <el-button class="successBorder" @click="handleSearch">查询</el-button>
           <el-button class="export" icon="el-icon-upload2" @click="handleDownload">导出</el-button>
@@ -657,7 +657,7 @@
             <el-option v-for="item in tab2.isuseList" :key="item.id" :label="item.name" :value="item.id" />
           </el-select> -->
           <!-- 临时注释 -->
-          <div style="display: inline-block;" class="filter-item1">
+          <!-- <div style="display: inline-block;" class="filter-item1">
             <el-input-number :controls="false" :precision="2" v-model="tab2.table.getdataListParm.parammaps.hlwc1" placeholder="混料误差值" style="width: 120px;" class="filter-item" clearable />
             <span>-</span>
             <el-input-number :controls="false" :precision="2"  v-model="tab2.table.getdataListParm.parammaps.hlwc2" placeholder="混料误差值" style="width: 120px;" class="filter-item" clearable />
@@ -672,7 +672,7 @@
             <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-checkbox v-model="tab2.table.getdataListParm.parammaps.error" style="margin-right: 10px;">只看超出预设值数据</el-checkbox>
+          <el-checkbox v-model="tab2.table.getdataListParm.parammaps.error" style="margin-right: 10px;">只看超出预设值数据</el-checkbox> -->
           <!-- 临时注释 -->
           <el-button class="successBorder" style="margin-top: 5px;" @click="handleSearch2">查询</el-button>
           <el-button class="successBorder" style="margin-top: 5px;" @click="handleRefresh2">重置</el-button>
@@ -701,7 +701,7 @@
             <u-table-column sortable label="配方名称" min-width="90px" 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="配方名称">
+           <!-- <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>
@@ -710,7 +710,7 @@
               <template slot-scope="{row}">
                 <a @click="clickFeed2(row)" style="text-decoration: underline;color: #0000FF;">{{ row.饲料 }}</a>
               </template>
-            </u-table-column>
+            </u-table-column> -->
             <!-- 临时注释 -->
             <u-table-column sortable label="理论重量" min-width="55px" align="center" prop="理论重量" />
             <u-table-column sortable label="实际重量" min-width="55px" align="center" prop="实际重量" />
@@ -751,7 +751,7 @@
             <el-option v-for="item in tab3.isuseList" :key="item.id" :label="item.name" :value="item.id" />
           </el-select> -->
           <!-- 临时注释 -->
-          <div style="display: inline-block;" class="filter-item1">
+          <!-- <div style="display: inline-block;" class="filter-item1">
             <el-input-number :controls="false" :precision="2" v-model="tab3.table.getdataListParm.parammaps.slwc1" placeholder="撒料误差值" style="width: 120px;" class="filter-item" clearable />
             <span>-</span>
             <el-input-number :controls="false" :precision="2"  v-model="tab3.table.getdataListParm.parammaps.slwc2" placeholder="撒料误差值" style="width: 120px;" class="filter-item" clearable />
@@ -766,7 +766,7 @@
             <span>-</span>
             <el-input-number :controls="false" :precision="2" v-model="tab3.table.getdataListParm.parammaps.slzql2" placeholder="撒料正确率" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
           </div>
-          <el-checkbox v-model="tab3.table.getdataListParm.parammaps.error" style="margin-right: 10px;">只看超出预设值数据</el-checkbox>
+          <el-checkbox v-model="tab3.table.getdataListParm.parammaps.error" style="margin-right: 10px;">只看超出预设值数据</el-checkbox> -->
           <!-- 临时注释 -->
           <el-button class="successBorder" style="margin-top: 5px;" @click="handleSearch3">查询</el-button>
           <el-button class="successBorder" style="margin-top: 5px;" @click="handleRefresh3">重置</el-button>
@@ -795,7 +795,7 @@
             <u-table-column sortable label="配方名称" min-width="90px" align="center" prop="配方名称" />
             <u-table-column sortable label="栏舍" min-width="90px" 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="clickRecipeName3(row)" style="text-decoration: underline;color: #0000FF;">{{ row.配方名称 }}</a>
               </template>
@@ -804,7 +804,7 @@
               <template slot-scope="{row}">
                 <a @click="clickFence3(row)" style="text-decoration: underline;color: #0000FF;">{{ row.栏舍 }}</a>
               </template>
-            </u-table-column>
+            </u-table-column> -->
             <!-- 临时注释 -->
             <u-table-column sortable label="理论重量" min-width="55px" align="center" prop="理论重量" />
             <u-table-column sortable label="实际重量" min-width="55px" align="center" prop="实际重量" />

+ 77 - 77
src/views/statisticalAnalysis/processAnalysis/pasture/index.vue

@@ -17,7 +17,7 @@
         <el-option v-for="item in workingConditionList" :key="item.id" :label="item.name" :value="item.id" />
       </el-select>
       <!-- 临时注释 -->
-      <div style="display: inline-block;" class="filter-item1">
+      <!-- <div style="display: inline-block;" class="filter-item1">
         <el-input-number :controls="false" :precision="2" v-model="hlwc1" placeholder="混料误差值" style="width: 120px;" class="filter-item" clearable />
         <span>-</span>
         <el-input-number :controls="false" :precision="2"  v-model="hlwc2" placeholder="混料误差值" style="width: 120px;" class="filter-item" clearable />
@@ -37,7 +37,7 @@
         <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>
-      <el-checkbox v-model="ccys" style="margin-right: 10px;" @change="changeccysChecked">只看超出预设值数据</el-checkbox>
+      <el-checkbox v-model="ccys"style="margin-right: 10px;" @change="changeccysChecked">只看超出预设值数据</el-checkbox> -->
       <!-- 临时注释 -->
       <el-button class="successBorder" @click="handleSearch">查询</el-button>
       <el-button class="successBorder" @click="handleRefresh">重置</el-button>
@@ -842,81 +842,81 @@ export default {
         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
-      this.table.getdataListParm.parammaps.hlzq2 = this.hlzq2
-      this.table.getdataListParm.parammaps.slwc1 = this.slwc1
-      this.table.getdataListParm.parammaps.slwc2 = this.slwc2
-      this.table.getdataListParm.parammaps.slzq1 = this.slzq1
-      this.table.getdataListParm.parammaps.slzq2 = this.slzq2
-      if(this.ccys == true){
-        if(this.table3.getdataListParm.name !== 'getprocessAnalysisHL'){
-          this.hlwc1 = undefined
-          this.hlwc2 = undefined
-          this.hlzq1 = undefined
-          this.hlzq2 = undefined
-          this.slwc1 = undefined
-          this.slwc2 = undefined
-          this.slzq1 = undefined
-          this.slzq2 = undefined
-          this.table.getdataListParm.parammaps.error = ''
-          this.table3.getdataListParm.parammaps.error = ''
-          this.table4.getdataListParm.parammaps.error = ''
-        }
-        if(this.table3.getdataListParm.name == 'getprocessAnalysisHL'){
-          this.table3.getdataListParm.parammaps.hlwc1  = this.hlwc1
-          this.table3.getdataListParm.parammaps.hlwc2  = this.hlwc2
-          this.table3.getdataListParm.parammaps.hlzq1  = this.hlzq1
-          this.table3.getdataListParm.parammaps.hlzq2  = this.hlzq2
-          this.table3.getdataListParm.parammaps.slwc1  = this.slwc1
-          this.table3.getdataListParm.parammaps.slwc2  = this.slwc2
-          this.table3.getdataListParm.parammaps.slzq1  = this.slzq1
-          this.table3.getdataListParm.parammaps.slzq2  = this.slzq2
-          this.table3.getdataListParm.parammaps.error  = '有误差'
-        }
-        if(this.table4.getdataListParm.name == 'getprocessAnalysisSL'){
-          this.table4.getdataListParm.parammaps.hlwc1  = this.hlwc1
-          this.table4.getdataListParm.parammaps.hlwc2  = this.hlwc2
-          this.table4.getdataListParm.parammaps.hlzq1  = this.hlzq1
-          this.table4.getdataListParm.parammaps.hlzq2  = this.hlzq2
-          this.table4.getdataListParm.parammaps.slwc1  = this.slwc1
-          this.table4.getdataListParm.parammaps.slwc2  = this.slwc2
-          this.table4.getdataListParm.parammaps.slzq1  = this.slzq1
-          this.table4.getdataListParm.parammaps.slzq2  = this.slzq2
-          this.table4.getdataListParm.parammaps.error  = '有误差'
-        }
-        if(this.table.getdataListParm.name == 'getprocessAnalysis'){
-          this.table.getdataListParm.parammaps.hlwc1  = this.hlwc1
-          this.table.getdataListParm.parammaps.hlwc2  = this.hlwc2
-          this.table.getdataListParm.parammaps.hlzq1  = this.hlzq1
-          this.table.getdataListParm.parammaps.hlzq2  = this.hlzq2
-          this.table.getdataListParm.parammaps.slwc1  = this.slwc1
-          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.error = '有误差'
-        }
-      }else{
-        this.table3.getdataListParm.parammaps.hlwc1  = ''
-        this.table3.getdataListParm.parammaps.hlwc2  = ''
-        this.table3.getdataListParm.parammaps.hlzq1  = ''
-        this.table3.getdataListParm.parammaps.hlzq2  = ''
-        this.table3.getdataListParm.parammaps.slwc1  = ''
-        this.table3.getdataListParm.parammaps.slwc2  = ''
-        this.table3.getdataListParm.parammaps.slzq1  = ''
-        this.table3.getdataListParm.parammaps.slzq2  = ''
-        this.table4.getdataListParm.parammaps.hlwc1  = ''
-        this.table4.getdataListParm.parammaps.hlwc2  = ''
-        this.table4.getdataListParm.parammaps.hlzq1  = ''
-        this.table4.getdataListParm.parammaps.hlzq2  = ''
-        this.table4.getdataListParm.parammaps.slwc1  = ''
-        this.table4.getdataListParm.parammaps.slwc2  = ''
-        this.table4.getdataListParm.parammaps.slzq1  = ''
-        this.table4.getdataListParm.parammaps.slzq2  = ''
-        this.table3.getdataListParm.parammaps.error  = ''
-        this.table4.getdataListParm.parammaps.error  = ''
-      }
+      // this.table.getdataListParm.parammaps.hlwc1 = this.hlwc1
+      // this.table.getdataListParm.parammaps.hlwc2 = this.hlwc2
+      // this.table.getdataListParm.parammaps.hlzq1 = this.hlzq1
+      // this.table.getdataListParm.parammaps.hlzq2 = this.hlzq2
+      // this.table.getdataListParm.parammaps.slwc1 = this.slwc1
+      // this.table.getdataListParm.parammaps.slwc2 = this.slwc2
+      // this.table.getdataListParm.parammaps.slzq1 = this.slzq1
+      // this.table.getdataListParm.parammaps.slzq2 = this.slzq2
+      // if(this.ccys == true){
+      //   if(this.table3.getdataListParm.name !== 'getprocessAnalysisHL'){
+      //     this.hlwc1 = undefined
+      //     this.hlwc2 = undefined
+      //     this.hlzq1 = undefined
+      //     this.hlzq2 = undefined
+      //     this.slwc1 = undefined
+      //     this.slwc2 = undefined
+      //     this.slzq1 = undefined
+      //     this.slzq2 = undefined
+      //     this.table.getdataListParm.parammaps.error = ''
+      //     this.table3.getdataListParm.parammaps.error = ''
+      //     this.table4.getdataListParm.parammaps.error = ''
+      //   }
+      //   if(this.table3.getdataListParm.name == 'getprocessAnalysisHL'){
+      //     this.table3.getdataListParm.parammaps.hlwc1  = this.hlwc1
+      //     this.table3.getdataListParm.parammaps.hlwc2  = this.hlwc2
+      //     this.table3.getdataListParm.parammaps.hlzq1  = this.hlzq1
+      //     this.table3.getdataListParm.parammaps.hlzq2  = this.hlzq2
+      //     this.table3.getdataListParm.parammaps.slwc1  = this.slwc1
+      //     this.table3.getdataListParm.parammaps.slwc2  = this.slwc2
+      //     this.table3.getdataListParm.parammaps.slzq1  = this.slzq1
+      //     this.table3.getdataListParm.parammaps.slzq2  = this.slzq2
+      //     this.table3.getdataListParm.parammaps.error  = '有误差'
+      //   }
+      //   if(this.table4.getdataListParm.name == 'getprocessAnalysisSL'){
+      //     this.table4.getdataListParm.parammaps.hlwc1  = this.hlwc1
+      //     this.table4.getdataListParm.parammaps.hlwc2  = this.hlwc2
+      //     this.table4.getdataListParm.parammaps.hlzq1  = this.hlzq1
+      //     this.table4.getdataListParm.parammaps.hlzq2  = this.hlzq2
+      //     this.table4.getdataListParm.parammaps.slwc1  = this.slwc1
+      //     this.table4.getdataListParm.parammaps.slwc2  = this.slwc2
+      //     this.table4.getdataListParm.parammaps.slzq1  = this.slzq1
+      //     this.table4.getdataListParm.parammaps.slzq2  = this.slzq2
+      //     this.table4.getdataListParm.parammaps.error  = '有误差'
+      //   }
+      //   if(this.table.getdataListParm.name == 'getprocessAnalysis'){
+      //     this.table.getdataListParm.parammaps.hlwc1  = this.hlwc1
+      //     this.table.getdataListParm.parammaps.hlwc2  = this.hlwc2
+      //     this.table.getdataListParm.parammaps.hlzq1  = this.hlzq1
+      //     this.table.getdataListParm.parammaps.hlzq2  = this.hlzq2
+      //     this.table.getdataListParm.parammaps.slwc1  = this.slwc1
+      //     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.error = '有误差'
+      //   }
+      // }else{
+      //   this.table3.getdataListParm.parammaps.hlwc1  = ''
+      //   this.table3.getdataListParm.parammaps.hlwc2  = ''
+      //   this.table3.getdataListParm.parammaps.hlzq1  = ''
+      //   this.table3.getdataListParm.parammaps.hlzq2  = ''
+      //   this.table3.getdataListParm.parammaps.slwc1  = ''
+      //   this.table3.getdataListParm.parammaps.slwc2  = ''
+      //   this.table3.getdataListParm.parammaps.slzq1  = ''
+      //   this.table3.getdataListParm.parammaps.slzq2  = ''
+      //   this.table4.getdataListParm.parammaps.hlwc1  = ''
+      //   this.table4.getdataListParm.parammaps.hlwc2  = ''
+      //   this.table4.getdataListParm.parammaps.hlzq1  = ''
+      //   this.table4.getdataListParm.parammaps.hlzq2  = ''
+      //   this.table4.getdataListParm.parammaps.slwc1  = ''
+      //   this.table4.getdataListParm.parammaps.slwc2  = ''
+      //   this.table4.getdataListParm.parammaps.slzq1  = ''
+      //   this.table4.getdataListParm.parammaps.slzq2  = ''
+      //   this.table3.getdataListParm.parammaps.error  = ''
+      //   this.table4.getdataListParm.parammaps.error  = ''
+      // }
       // 临时注释
       this.table.getdataListParm.offset = 1
       this.getList()

+ 273 - 89
src/views/systemManagement/reminderSettings/index.vue

@@ -1,6 +1,9 @@
 <template>
   <div class="app-container">
     <div class="table">
+      <div class="search">
+        <el-button class="success" icon="el-icon-plus" @click="handleCreate">新增</el-button>
+      </div>
       <el-table
         :key="table.tableKey"
         v-loading="table.listLoading"
@@ -29,92 +32,169 @@
       </el-table>
     </div>
     <el-dialog :title="textMap[setUp.dialogStatus]" :visible.sync="setUp.dialogFormVisible" :close-on-click-modal="false" width="70%">
-    <div class="setup">
-      <div style="height: 500px;">
-        <el-row>
-          <el-col :span="6">
-            <div class="content-left">
-              <b>消息名称:</b><span>名称ABC</span>
-            </div>
-            <div class="content-left">
-              <b>触发条件:</b><span>名称ABC</span>
-            </div>
-            <div class="content-left">
-              <b>发送方式:</b>
-              <el-select v-model="mode" placeholder="请选择">
-                <el-option v-for="item in modeList" :key="item.id" :label="item.name" :value="item.id"> </el-option>
-              </el-select>
-            </div>
-            <div class="content-left">
-              <b>发送机制:</b>
-              <el-select v-model="mechanism" placeholder="请选择">
-                <el-option v-for="item in mechanismList" :key="item.id" :label="item.name" :value="item.id"> </el-option>
-              </el-select>
-            </div>
-          </el-col>
-          <el-col :span="18">
-            <b>提醒对象:</b>
-            <el-tabs v-model="activeName" @tab-click="handleClick">
-                <el-tab-pane label="角色" name="first">
-                  <!-- <div class="search">
-                    <el-button class="successBorder" @click="handleGenerateQRcode">生成二维码</el-button>
-                  </div> -->
-                  <el-table
-                    :key="setUp.table1.tableKey"
-                    v-loading="setUp.table1.listLoading"
-                    element-loading-text="给我一点时间"
-                    :data="setUp.table1.list"
-                    border
-                    fit
-                    highlight-current-row
-                    style="width: 100%;"
-                    :row-style="rowStyle"
-                    :cell-style="cellStyle"
-                    class="elTable table-fixed"
-                    @selection-change="handleSelectionChange"
-                    :max-height="450"
-                  >
-                    <el-table-column type="selection" align="center" width="50" />
-                    <el-table-column label="角色名称" min-width="130px" align="center" prop="rolename" />
-                  </el-table>
-                </el-tab-pane>
-                <el-tab-pane label="用户" name="second">
-                  <div class="search">
-                    <!-- <el-button class="successBorder" style="margin-right: 5px;" @click="handleGenerateQRcode">生成二维码</el-button> -->
-                    <el-input v-model="setUp.table2.getdataListParm.parammaps.empCode" placeholder="用户名称" style="width: 180px;" class="filter-item" clearable />
-                    <el-input v-model="setUp.table2.getdataListParm.parammaps.empname" placeholder="员工姓名" style="width: 180px;" class="filter-item" clearable />
-                    <el-button class="successBorder" @click="handleSearch">查询</el-button>
-                  </div>
-                  <el-table
-                    :key="setUp.table2.tableKey"
-                    v-loading="setUp.table2.listLoading"
-                    element-loading-text="给我一点时间"
-                    :data="setUp.table2.list"
-                    border
-                    fit
-                    highlight-current-row
-                    style="width: 100%;"
-                    :row-style="rowStyle"
-                    :cell-style="cellStyle"
-                    class="elTable table-fixed"
-                    @selection-change="handleSelectionChange"
-                    :max-height="450"
-                  >
-                    <el-table-column type="selection" align="center" width="50" />
-                    <el-table-column label="用户名称" min-width="130px" align="center" prop="username" />
-                    <el-table-column label="员工姓名" min-width="130px" align="center" prop="empname" />
-                    <el-table-column label="角色" min-width="130px" align="center" prop="rolename" />
-                  </el-table>
-                </el-tab-pane>
-              </el-tabs>
-          </el-col>
-        </el-row>
+      <div class="setup">
+        <div style="height: 500px;">
+          <el-row :gutter="20">
+            <el-col :span="8">
+              <el-form ref="temp" :rules="temp.rules" :model="temp" label-position="right" label-width="110px" style="width: 100%;margin:0 auto">
+                <el-row>
+                  <el-col :span="24">
+                    <el-form-item label="消息名称:" prop="messageName">
+                      <el-input v-model="temp.messageName" style="width: 100%;" class="filter-item" placeholder="消息名称" />
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col :span="24">
+                    <el-form-item label="触发条件:" prop="triggerCondition">
+                      <el-input ref="triggerCondition" v-model="temp.triggerCondition" style="width: 100%;" class="filter-item" placeholder="触发条件" type="text" />
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col :span="24">
+                    <el-form-item label="发送方式:" prop="sendingMethod">
+                      <el-select v-model="temp.sendingMethod" style="width: 100%;" placeholder="发送方式">
+                        <el-option v-for="item in modeList" :key="item.id" :label="item.name" :value="item.id" />
+                      </el-select>
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+                <div v-if="temp.sendingMethod == '2'">
+                  <el-row>
+                    <el-col :span="24">
+                      <el-form-item label="延时:">
+                        <el-input ref="delayed1" v-model="temp.delayed1" style="width: 33%;margin-right:1%" placeholder="天" type="text" />
+                        <el-input ref="delayed2" v-model="temp.delayed2" style="width: 33%;margin-right:1%" placeholder="小时" type="text" />
+                        <el-input ref="delayed3" v-model="temp.delayed3" style="width: 32%;" placeholder="分钟" type="text" />
+                      </el-form-item>
+                    </el-col>
+                  </el-row>
+                  <el-row>
+                    <el-col :span="24">
+                      <el-form-item label="发送时间">
+                         <el-time-select placeholder="发送时间" style="width: 100%;" v-model="temp.sendTime" :picker-options="{ start: '00:00', step: '00:15', end: '23:59' }" />
+                      </el-form-item>
+                    </el-col>
+                  </el-row>
+                  <el-row :gutter="5">
+                    <el-col :span="18">
+                      <el-form-item label="发送机制">
+                        <el-select v-model="temp.sendingMechanism" style="width: 100%;" placeholder="发送机制">
+                          <el-option v-for="item in mechanismList" :key="item.id" :label="item.name" :value="item.id" />
+                        </el-select>
+                      </el-form-item>
+                    </el-col>
+                    <el-col :span="6" v-if="temp.sendingMechanism == '2'">
+                        <el-input ref="numberCycles" v-model="temp.numberCycles" style="width: 100%;" placeholder="循环次数" type="text" />
+                    </el-col>
+                  </el-row>
+                  <el-row v-if="temp.sendingMechanism !== '1' && temp.sendingMechanism !== ''">
+                    <el-col :span="24">
+                      <el-form-item label="间隔周期:">
+                        <el-input ref="intervalPeriod1" v-model="temp.intervalPeriod1" style="width: 33%;margin-right:1%" placeholder="天" type="text" />
+                        <el-input ref="intervalPeriod2" v-model="temp.intervalPeriod2" style="width: 33%;margin-right:1%" placeholder="小时" type="text" />
+                        <el-input ref="intervalPeriod3" v-model="temp.intervalPeriod3" style="width: 32%;" placeholder="分钟" type="text" />
+                      </el-form-item>
+                    </el-col>
+                  </el-row>
+                </div>
+                <div v-if="temp.sendingMethod == '3'">
+                  <el-row>
+                    <el-col :span="24">
+                      <el-form-item label="发送机制:">
+                        <span>持续循环</span>
+                      </el-form-item>
+                    </el-col>
+                  </el-row>
+                  <el-row :gutter="5">
+                    <el-col :span="18">
+                      <el-form-item label="周期类型">
+                        <el-select v-model="temp.cycleType" style="width: 100%;" placeholder="周期类型">
+                          <el-option v-for="item in cycleTypeList" :key="item.id" :label="item.name" :value="item.id" />
+                        </el-select>
+                      </el-form-item>
+                    </el-col>
+                    <el-col :span="6" v-if="temp.cycleType == '2'">
+                      <el-select v-model="temp.week" style="width: 100%;" placeholder="每周">
+                        <el-option v-for="item in weekList" :key="item.id" :label="item.name" :value="item.id" />
+                      </el-select>
+                    </el-col>
+                    <el-col :span="6" v-if="temp.cycleType == 3">
+                      <el-select v-model="temp.month" style="width: 100%;" placeholder="每月">
+                        <el-option v-for="item in monthList" :key="item.id" :label="item.name" :value="item.id" />
+                      </el-select>
+                    </el-col>
+                  </el-row>
+                  <el-row>
+                    <el-col :span="24">
+                      <el-form-item label="发送时间">
+                         <el-time-select placeholder="发送时间" style="width: 100%;" v-model="temp.sendTime" :picker-options="{ start: '00:00', step: '00:15', end: '23:59' }" />
+                      </el-form-item>
+                    </el-col>
+                  </el-row>
+                </div>
+              </el-form>
+            </el-col>
+            <el-col :span="16">
+              <b>提醒对象:</b>
+              <el-tabs v-model="activeName" @tab-click="handleClick">
+                  <el-tab-pane label="角色" name="first">
+                    <el-table
+                      :key="setUp.table1.tableKey"
+                      v-loading="setUp.table1.listLoading"
+                      element-loading-text="给我一点时间"
+                      :data="setUp.table1.list"
+                      border
+                      fit
+                      highlight-current-row
+                      style="width: 100%;"
+                      :row-style="rowStyle"
+                      :cell-style="cellStyle"
+                      class="elTable table-fixed"
+                      @selection-change="handleSelectionChange"
+                      :max-height="450"
+                    >
+                      <el-table-column type="selection" align="center" width="50" />
+                      <el-table-column label="角色名称" min-width="130px" align="center" prop="rolename" />
+                    </el-table>
+                  </el-tab-pane>
+                  <el-tab-pane label="用户" name="second">
+                    <div class="search">
+                      <el-input v-model="setUp.table2.getdataListParm.parammaps.empCode" placeholder="用户名称" style="width: 180px;" class="filter-item" clearable />
+                      <el-input v-model="setUp.table2.getdataListParm.parammaps.empname" placeholder="员工姓名" style="width: 180px;" class="filter-item" clearable />
+                      <el-button class="successBorder" @click="handleSearch">查询</el-button>
+                    </div>
+                    <el-table
+                      :key="setUp.table2.tableKey"
+                      v-loading="setUp.table2.listLoading"
+                      element-loading-text="给我一点时间"
+                      :data="setUp.table2.list"
+                      border
+                      fit
+                      highlight-current-row
+                      style="width: 100%;"
+                      :row-style="rowStyle"
+                      :cell-style="cellStyle"
+                      class="elTable table-fixed"
+                      @selection-change="handleSelectionChange"
+                      :max-height="450"
+                    >
+                      <el-table-column type="selection" align="center" width="50" />
+                      <el-table-column label="用户名称" min-width="130px" align="center" prop="username" />
+                      <el-table-column label="员工姓名" min-width="130px" align="center" prop="empname" />
+                      <el-table-column label="角色" min-width="130px" align="center" prop="rolename" />
+                    </el-table>
+                  </el-tab-pane>
+                </el-tabs>
+            </el-col>
+          </el-row>
         </div>
         <div slot="footer" class="dialog-footer" style="right:30px;position:absolute;bottom: 40px;">
           <el-button class="cancelClose" @click="setUp.dialogFormVisible = false;getList(); ">取消</el-button>
           <el-button class="save" :disabled="isokDisable" @click="setData()">确认</el-button>
         </div>
-    </div>
+      </div>
     </el-dialog>
 
     <el-dialog :title="textMap[QRcode.dialogStatus]" :visible.sync="QRcode.dialogFormVisible" :close-on-click-modal="false" width="50%">
@@ -136,23 +216,54 @@
 </template>
 
 <script>
-  import { GetDataByName } from '@/api/common'
+  import { GetDataByName,postJson2 } from '@/api/common'
   import Cookies from 'js-cookie'
   export default {
     name: 'ReminderSettings',
     data() {
       return {
+        temp:{
+          rules:{},
+          messageName:'',//消息名称
+          triggerCondition:'',//触发条件,
+          sendingMethod:'1',//发送方式
+          delayed1:'',//延时
+          delayed2:'',//延时
+          delayed3:'',//延时,
+          sendTime:'',//发送时间,
+          sendingMechanism:'1',// 发送机制
+          numberCycles:'',//循环次数
+          intervalPeriod1:'',//间隔周期
+          intervalPeriod2:'',//间隔周期
+          intervalPeriod3:'',//间隔周期
+          cycleType:'1',
+        },
         modeList: [
-          { id: '0', name: '立即' },
-          { id: '1', name: '延时' },
-          { id: '2', name: '指定周期' },
+          { id: '1', name: '立即' },
+          { id: '2', name: '延时' },
+          { id: '3', name: '指定周期' },
         ],
         mode: '0',
         mechanismList: [
-          { id: '0', name: '单次' },
-          { id: '1', name: '指定循环次数' },
-          { id: '2', name: '循环至任务结束' },
+          { id: '1', name: '单次' },
+          { id: '2', name: '指定循环次数' },
+          { id: '3', name: '循环至任务结束' },
         ],
+        cycleTypeList:[
+          { id: '1', name: '每天' },
+          { id: '2', name: '每周' },
+          { id: '3', name: '每月' },
+        ],//周期类型
+        weekList:[
+          { id: 'w1', name: '周一' },
+          { id: 'w2', name: '周二' },
+          { id: 'w3', name: '周三' },
+          { id: 'w4', name: '周四' },
+          { id: 'w5', name: '周五' },
+          { id: 'w6', name: '周六' },
+          { id: 'w7', name: '周日' },
+        ],//周
+        monthList:[],//月
         mechanism: '0',
         activeName:'first',
         table: {
@@ -215,7 +326,8 @@
         myHeight:document.documentElement.clientHeight - 85- 150 - 45,
         textMap: {
           setup: '设置',
-          QRcode:'提示'
+          QRcode:'提示',
+          add:'新增'
         },
         isokDisable:false,
         rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
@@ -223,12 +335,21 @@
       }
     },
     created() {
+      this.monthList = []
+      for(let i=1;i<=31;i++){
+        let obj = {}
+        obj.id = 'd'+i
+        obj.name = i+'日'
+        this.monthList.push(obj)
+      }
       this.getList()
     },
 
     methods: {
       getList() {
         this.table.listLoading = true
+        // let url = 'http://tmrwatch.cn/notice/msgtype'
+        // let data = {}
         GetDataByName(this.table.getdataListParm).then(response => {
           if (response.data.list !== null) {
             console.log('table数据', response.data.list)
@@ -303,7 +424,70 @@
         })
       },
       setData(){
+        let url = 'http://tmrwatch.cn:8089/notice/msgtype'
+        let data = {}
+        data.sys_name = 'tmrWatch'
+        data.type_name = this.temp.messageName
+        data.remind_type_id = parseInt(this.temp.sendingMethod)
+        if(this.temp.sendingMethod == '1'){
+          data.remind_type = '立即'
+        }else if(this.temp.sendingMethod == '1'){
+          data.remind_type = '延时'
+        }else{
+          data.remind_type = '指定周期'
+        }
+        let dateTime = 0
+        let delayed1 = 0
+        let delayed2 = 0
+        let delayed3 = 0
 
+        if(this.temp.delayed1 !== ''){
+          delayed1 = parseInt(this.temp.delayed1)*24*60
+        }else {
+          delayed1 = 0
+        }
+        if(this.temp.delayed2 !== ''){
+          delayed2 = parseInt(this.temp.delayed2)*60
+        }else {
+          delayed2 = 0
+        }
+        if(this.temp.delayed3 !== ''){
+          delayed3 = parseInt(this.temp.delayed3)
+        }else{
+          delayed2 = 0
+        }
+        dateTime = delayed1+ delayed2 + delayed3
+        if(this.temp.cycleType == '1'){
+          data.push_date = ''
+        }else if(this.temp.cycleType == '2'){
+          data.push_date = this.temp.week
+        }else{
+          data.push_date = this.temp.month
+        }
+        data.push_time = this.temp.sendTime
+        data.interval_time = dateTime
+        if(this.temp.sendingMechanism == '1'){
+          data.push_limit = 1
+        }else if(this.temp.sendingMechanism == '2'){
+          data.push_limit = this.temp.numberCycles
+        }else{
+          data.push_limit = 0
+        }
+        data.template_id = 'BtkN1rWKOJtKP0C64lGxIrPzLRFsYFas-4gupX2-pFo'
+        postJson2(url,data).then(response => {
+          if(response.code == 200){
+            console.log('成功')
+            this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+          }else{
+            this.$notify({ title: '成功', message: response.message, type: 'success', duration: 2000 })
+            console.log('失败')
+          }
+        })
+      },
+      handleCreate(){
+        this.setUp.dialogStatus = 'add'
+        this.setUp.dialogFormVisible = true
+        this.activeName = 'first'
       }
     }
   }