Explorar o código

Signed-off-by: 段小段 <1729609802@qq.com>

段小段 %!s(int64=2) %!d(string=hai) anos
pai
achega
9329e06c23

+ 4 - 4
.env.development

@@ -8,12 +8,12 @@ ENV = 'development'
 VUE_APP_BASE_API = 'http://kpttest.kptyun.com/'
 
 
-  
+
 # VUE_APP_BASE_API = 'http://lhpc81.kptyun.com/'
- 
 
-# 沙巍
-# VUE_APP_BASE_API = 'http://192.168.1.56:8081/'
+
+# 陈文强
+# VUE_APP_BASE_API = 'http://192.168.1.87:8081/'
 # 白少杰
 # VUE_APP_BASE_API = 'http://192.168.1.90:8081/'
 

BIN=BIN
dist.zip


+ 9 - 0
src/api/common.js

@@ -120,6 +120,15 @@ export function getJson(url,data) {
     url: process.env.VUE_APP_BASE_API + url + data,
     method: 'get'
   })
+}
+
+export function getData(url,data) {
+  return request({
+    url: url,
+    method: 'post',
+    timeout: 600000,
+    data
+  })
 }
 
 export function PostDataByNames(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.ccys" style="margin-right: 10px;">只看超出预设值数据</el-checkbox> -->
+          <el-checkbox v-model="tab.table.getdataListParm.parammaps.ccys" style="margin-right: 10px;">只看超出预设值数据</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.ccys" style="margin-right: 10px;">只看超出预设值数据</el-checkbox> -->
+          <el-checkbox v-model="tab2.table.getdataListParm.parammaps.ccys" 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.ccys" style="margin-right: 10px;">只看超出预设值数据</el-checkbox> -->
+          <el-checkbox v-model="tab3.table.getdataListParm.parammaps.ccys" 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="实际重量" />

+ 40 - 0
src/views/systemManagement/messagesReceiving/index.vue

@@ -0,0 +1,40 @@
+<template>
+  <div class="app-container">
+      <div class="content">
+      <div class="title">微信接收系统待办、预警等消息,必须先扫码关注公众号</div>
+        <div style="font-weight: 600;">关注微信:</div>
+          <img :src="imgUrl" alt="">
+      </div>
+  </div>
+</template>
+
+<script>
+  import { getData } from '@/api/common'
+  import Cookies from 'js-cookie'
+  export default {
+    name: 'MessagesReceiving',
+    data() {
+      return {
+        imgUrl:'http://tmrwatch.cn/wx/code?scene_id:tmrwatch.'+Cookies.get('employeid')
+      }
+    },
+    created() {
+    },
+
+    methods: {
+
+    }
+  }
+</script>
+
+<style scoped>
+  .app-container{display:flex;justify-content: center; align-items:center;}
+  .content{
+    margin-top: 100px;
+    width: 500px;
+  }
+  .content img{
+    max-width:300px;
+
+  }
+</style>

+ 328 - 0
src/views/systemManagement/reminderSettings/index.vue

@@ -0,0 +1,328 @@
+<template>
+  <div class="app-container">
+    <div class="table">
+      <el-table
+        :key="table.tableKey"
+        v-loading="table.listLoading"
+        element-loading-text="给我一点时间"
+        :data="table.list"
+        border
+        fit
+        highlight-current-row
+        style="width: 100%;"
+        :row-style="rowStyle"
+        :cell-style="cellStyle"
+        class="elTable table-fixed"
+        :max-height="myHeight"
+      >
+        <el-table-column label="消息名称" min-width="130px" align="center" prop="rolename" />
+        <el-table-column label="触发条件" min-width="130px" align="center" prop="rolename" />
+        <el-table-column label="提醒类型" min-width="130px" align="center" prop="rolename" />
+        <el-table-column label="推送方式" min-width="130px" align="center" prop="rolename" />
+        <el-table-column label="详细配置" min-width="130px" align="center" prop="rolename" />
+        <el-table-column label="提醒对象" min-width="130px" align="center" prop="rolename" />
+        <el-table-column label="操作" align="center" width="150" class-name="small-padding fixed-width" fixed="right">
+          <template slot-scope="{row}">
+            <a class="correcting" size="mini" style="width: 80px;" @click="handleSetUp(row)">设置</a>
+          </template>
+        </el-table-column>
+      </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>
+        <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>
+    </el-dialog>
+
+    <el-dialog :title="textMap[QRcode.dialogStatus]" :visible.sync="QRcode.dialogFormVisible" :close-on-click-modal="false" width="50%">
+      <div class="QRcode">
+        <div class="content">
+          <div class="title">
+            <p>微信接收系统待办、预警等消息,必须先扫码关注公众号;</p>
+            <p>请将下方二维码分享给需要接收信息的用户扫码</p>
+          </div>
+          <div style="font-weight: 600;">关注微信:</div>
+          <img src="https://img2.baidu.com/it/u=1151188475,1753963046&fm=253&fmt=auto&app=138&f=JPEG?w=504&h=300" alt="">
+        </div>
+        <div slot="footer" class="dialog-footer" style="right:30px;position:absolute;bottom: 40px;">
+          <el-button class="save" :disabled="isokDisable" @click="QRcode.dialogFormVisible = false;">确认</el-button>
+        </div>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import { GetDataByName } from '@/api/common'
+  import Cookies from 'js-cookie'
+  export default {
+    name: 'ReminderSettings',
+    data() {
+      return {
+        modeList: [
+          { id: '0', name: '立即' },
+          { id: '1', name: '延时' },
+          { id: '2', name: '指定周期' },
+        ],
+        mode: '0',
+        mechanismList: [
+          { id: '0', name: '单次' },
+          { id: '1', name: '指定循环次数' },
+          { id: '2', name: '循环至任务结束' },
+        ],
+        mechanism: '0',
+        activeName:'first',
+        table: {
+          getdataListParm: {
+            name: 'getRoleList',
+            page: 1,
+            offset: 1,
+            pagecount: parseInt(Cookies.get('pageCount')),
+            returntype: 'Map',
+            parammaps: {
+              pastureid: Cookies.get('pastureid')
+            }
+          },
+          tableKey: 0,
+          list: [],
+          total: 0,
+          listLoading: false
+        },
+        setUp:{
+          dialogStatus: '',
+          dialogFormVisible:false,
+          table1: {
+            getdataListParm: {
+              name: 'getRoleList',
+              page: 1,
+              offset: 1,
+              pagecount: parseInt(Cookies.get('pageCount')),
+              returntype: 'Map',
+              parammaps: {
+                pastureid: Cookies.get('pastureid')
+              }
+            },
+            tableKey: 0,
+            list: [],
+            total: 0,
+            listLoading: false
+          },
+          table2: {
+            getdataListParm: {
+              name: 'getuserallL',
+              page: 1,
+              offset: 1,
+              pagecount: parseInt(Cookies.get('pageCount')),
+              returntype: 'Map',
+              parammaps: {
+                pastureid: Cookies.get('pastureid')
+              }
+            },
+            tableKey: 0,
+            list: [],
+            total: 0,
+            listLoading: false
+          },
+          selectList:[]
+        },
+        QRcode:{
+          dialogStatus: '',
+          dialogFormVisible:false,
+        },
+        myHeight:document.documentElement.clientHeight - 85- 150 - 45,
+        textMap: {
+          setup: '设置',
+          QRcode:'提示'
+        },
+        isokDisable:false,
+        rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
+        cellStyle: { padding: 0 + 'px' }
+      }
+    },
+    created() {
+      this.getList()
+    },
+
+    methods: {
+      getList() {
+        this.table.listLoading = true
+        GetDataByName(this.table.getdataListParm).then(response => {
+          if (response.data.list !== null) {
+            console.log('table数据', response.data.list)
+            this.table.list = response.data.list
+            this.table.pageNum = response.data.pageNum
+            this.table.pageSize = response.data.pageSize
+          } else {
+            this.table.list = []
+          }
+          this.table.total = response.data.total
+          setTimeout(() => {
+            this.table.listLoading = false
+          }, 100)
+        })
+      },
+      handleSetUp(){
+        this.setUp.dialogStatus = 'setup'
+        this.setUp.dialogFormVisible = true
+        this.activeName = 'first'
+        this.getList1()
+      },
+      handleClick(item){
+        if(item == 'first'){
+          this.getList1()
+        }else{
+          this.getList2()
+        }
+      },
+      handleSelectionChange(val) {
+        console.log('勾选数据', val)
+        this.selectList = val
+      },
+      handleGenerateQRcode(){
+        this.QRcode.dialogStatus = 'QRcode'
+        this.QRcode.dialogFormVisible = true
+      },
+      handleSearch(){
+        this.getList2()
+      },
+      getList1() {
+        this.setUp.table1.listLoading = true
+        GetDataByName(this.setUp.table1.getdataListParm).then(response => {
+          if (response.data.list !== null) {
+            console.log('table数据', response.data.list)
+            this.setUp.table1.list = response.data.list
+            this.setUp.table1.pageNum = response.data.pageNum
+            this.setUp.table1.pageSize = response.data.pageSize
+          } else {
+            this.setUp.table1.list = []
+          }
+          this.setUp.table1.total = response.data.total
+          setTimeout(() => {
+            this.setUp.table1.listLoading = false
+          }, 100)
+        })
+      },
+      getList2() {
+        this.setUp.table2.listLoading = true
+        GetDataByName(this.setUp.table2.getdataListParm).then(response => {
+          if (response.data.list !== null) {
+            console.log('table数据', response.data.list)
+            this.setUp.table2.list = response.data.list
+            this.setUp.table2.pageNum = response.data.pageNum
+            this.setUp.table2.pageSize = response.data.pageSize
+          } else {
+            this.setUp.table2.list = []
+          }
+          this.setUp.table2.total = response.data.total
+          setTimeout(() => {
+            this.setUp.table2.listLoading = false
+          }, 100)
+        })
+      },
+      setData(){
+
+      }
+    }
+  }
+</script>
+
+<style scoped>
+  .app-container{
+    padding: 20px 20px;
+  }
+  .content-left{padding: 5px 5px;}
+  .content-left b{padding-right: 10px;}
+
+  .QRcode{display:flex;justify-content: center; align-items:center;}
+  .content{
+    /* margin-top: 100px; */
+    width: 500px;
+  }
+  .content img{
+    max-width:300px;
+
+  }
+</style>

+ 13 - 2
src/views/systemManagement/user/index.vue

@@ -7,7 +7,9 @@
         <el-option v-for="item in enableList" :key="item.id" :label="item.name" :value="item.id" />
       </el-select>
       <el-date-picker v-model="table.getdataListParm.parammaps.inputDatetime" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" style="width: 250px;" />
-
+      <el-select v-model="table.getdataListParm.parammaps.enable" placeholder="公众号关注状态" class="filter-item" style="width: 120px;" clearable>
+        <el-option v-for="item in attentionStatusList" :key="item.id" :label="item.name" :value="item.id" />
+      </el-select>
       <el-button class="successBorder" @click="handleSearch">查询</el-button>
       <el-button class="successBorder" @click="handleRefresh">重置</el-button>
     </div>
@@ -61,6 +63,14 @@
               <el-option v-for="item in roleList" :key="item.id" :label="item.rolename" :value="item.id" />
             </el-select>
           </template>
+        </el-table-column>
+        <el-table-column label="公众号关注状态" min-width="150px" align="center">
+          <template slot-scope="scope">
+            <span v-if="scope.row.NoEdit">{{ scope.row.rolename }}</span>
+            <el-select v-if="scope.row.Edit" v-model="scope.row.roleid" placeholder="角色" class="filter-item" style="width:90%;padding:10px 0;" filterable @change="changeRolename">
+              <el-option v-for="item in attentionStatusList" :key="item.id" :label="item.name" :value="item.id" />
+            </el-select>
+          </template>
         </el-table-column>
         <el-table-column label="创建时间" min-width="110px" align="center">
           <template slot-scope="scope">
@@ -118,7 +128,8 @@ export default {
       requestParams: [
         { name: 'getRoleAll', offset: 0, pagecount: 0, parammaps: { 'pastureid': Cookies.get('pastureid') }}
       ],
-      enableList: [{ id: 1, name: '是' }, { id: 0, name: '否' }], // 是否启用
+      enableList: [{ id: 1, name: '是' }, { id: 0, name: '否' }], // 是否启用
+      attentionStatusList: [{ id: 1, name: '已关注公众号' }, { id: 0, name: '未关注公众号' }],
       roleList: [], // 角色
 
       table: {