Explorar o código

AssignAndMessage

epans hai 10 meses
pai
achega
e731ffd043

+ 26 - 11
src/views/cowManagement/EventRecord.vue

@@ -1,5 +1,5 @@
 <template>
-  <!-- 100 -->
+  <!-- 102 -->
    <div>
  
  
@@ -92,7 +92,7 @@
          <el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width" fixed="right">
            <template slot-scope="scope">
               <!-- 修改按钮 -->
-              <el-button type="primary" v-if="isButtonEdit" size="mini" icon="el-icon-edit" @click="form_edit(scope.row)">编辑</el-button>
+              <el-button type="primary" v-if="isButtonEdit" size="mini" icon="el-icon-edit" @click="form_edit(scope.row)">修改</el-button>
               <!-- 删除按钮 -->
               <el-button type="danger" v-if="isButtonEdit" size="mini" icon="el-icon-delete" @click="form_delete(scope.row)">删除</el-button>
            </template>
@@ -303,7 +303,7 @@
        addFormStatus: '',
        addFormTxt: {  edit: '修改',  create: '新增' },
        addForm:{
-         calf_code:'',id:'' ,event_kind:undefined
+         calf_code:'',id:'' ,event_kind:undefined,medication:'',remark:''
        },
  
        addFormRules:{
@@ -354,12 +354,12 @@
  
        //  下拉框 - 疾病 
        diseaseNameList: [
-         {id: 1, name: "腹泻"}, 
-         {id: 2, name: "便秘"}, 
-         {id: 3, name: "下痢"},
-         {id: 4, name: "脐炎"},
-         {id: 5, name: "肺炎"},
-         {id: 6, name: "软瘫衰弱"}
+         // {id: 1, name: "腹泻"}, 
+         // {id: 2, name: "便秘"}, 
+         // {id: 3, name: "下痢"},
+         // {id: 4, name: "脐炎"},
+         // {id: 5, name: "肺炎"},
+         // {id: 6, name: "软瘫衰弱"}
        ], 
  
        //  下拉框 - 栏舍
@@ -417,6 +417,21 @@
          })
  
  
+         ajaxDataPost('/api/v1/ops/base_setting/category_table/list?page=1&page_size=10000', {category_type:3}).then(e => {
+           console.log("疾病下拉框:",e)
+ 
+           if(e.code == 200 ){
+             me.diseaseNameList = e.data.list
+            
+           } else {
+             me.diseaseNameList = []
+           }
+         })
+ 
+ 
+         
+ 
+ 
  
    
  
@@ -818,7 +833,7 @@
            //关闭弹窗
            // me.addFormShow = false
           //加载 - 发送新增保存
-          ajaxDataPut(me.url_edit_table, send_data).then(e => {
+           ajaxDataPut(me.url_edit_table, send_data).then(e => {
                  console.log("编辑结果:",e)
                  //打印请求成功结果
                  if(e.code == 200  ){
@@ -829,7 +844,7 @@
                  } else {
                    me.$message({ type: 'error', message: '编辑失败!' + e.msg, duration: 2000 })
                  }
-             })
+           })
           
          }
        })

+ 639 - 0
src/views/dataStatistics/FeedProcess102.vue

@@ -0,0 +1,639 @@
+<template>
+
+    <div>
+      <!-- 102 -->
+      部分接口未对,暂无接口
+      <el-card class="box-card">
+        <!-- 搜索区域 -->
+        <div class="search-bx1">
+  
+          <el-row :gutter="20">
+              <el-col :span="24">
+                <el-date-picker v-model="searchData.date"  type="date"  placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd"  :clearable="false" style="width: 180px;"  class="g-mr20  g-mb20" />
+   
+  
+                <el-select v-model="searchData.feed_plan_id" filterable placeholder="饲喂计划" class="g-mr20" style="width: 180px;"   @change="change_plan">
+                  <el-option v-for="item in feedPlanList" :key="item.id" :label="item.name" :value="item.id" />
+                </el-select>
+  
+                <span>班次:</span>
+                <el-input v-model="searchData.class_number_name" placeholder=""  style="width: 180px;" disabled />
+  
+                <span>饲喂车:</span>
+                <el-input v-model="searchData.feed_vehicle_name" placeholder=""  style="width: 180px;" disabled />
+  
+  
+           
+  
+                <!-- <el-select v-model="searchData.class_number" filterable placeholder="班次" class="g-mr20  g-mb20" style="width: 180px;" clearable>
+                  <el-option v-for="item in classList" :key="item.value" :label="item.label" :value="item.value" />
+                </el-select>
+                <el-select v-model="searchData.feed_vehicle_id" filterable placeholder="饲喂车" class="g-mr20" style="width: 180px;" clearable  @change="change_car">
+                  <el-option v-for="item in feedCarList" :key="item.id" :label="item.name" :value="item.id" />
+                </el-select> -->
+                <span>饲喂车编号:</span>
+                <el-input v-model="searchData.feed_vehicle_number" placeholder=""  style="width: 180px;" disabled />
+              </el-col>
+          </el-row>
+          <el-row :gutter="20">
+              <el-col :span="24">
+   
+                  <el-input v-model="searchData.barn_name" placeholder="栏舍名称"  style="width: 220px;" class="g-mr20  g-mb20" clearable />
+                  <el-input v-model="searchData.barn_group_name" placeholder="栏舍组名称"  style="width: 220px;" class="g-mr20 " clearable />
+  
+                  <el-input-number v-model="searchData.min_accurate_ratio" style="width:120px;" :controls="false" placeholder="准确率" />
+                  <span style="margin:0px 8px;">至</span>
+                  <el-input-number v-model="searchData.max_accurate_ratio" style="width:120px;" class="g-mr20" :controls="false" placeholder="准确率" />
+  
+                  <el-input-number v-model="searchData.min_temp" style="width:120px;" :controls="false" placeholder="温差" />
+                  <span style="margin:0px 8px;">至</span>
+                  <el-input-number v-model="searchData.max_temp" style="width:120px;" class="g-mr20" :controls="false" placeholder="温差" />
+  
+                  <el-button type="primary"   @click="form_search">搜索</el-button>
+                  <el-button type="primary"   @click="form_clear">重置</el-button>
+              </el-col>
+          </el-row>
+  
+   
+        </div>
+        <el-row :gutter="20">
+          <el-col :span="6">
+            <el-card class="box-card">
+              <div slot="header" class="clearfix">
+                <span>计划信息</span>
+                <span style="float: right">
+                  犊牛类型:荷斯坦
+                </span>
+              </div>
+              <div class="bx-row">
+                <span class="bx-tit">工作状态:</span><span class="bx-cont">进行中</span>
+              </div>
+              <div class="bx-row">
+                <span class="bx-tit">饲喂犊牛数:</span><span class="bx-cont">300</span>
+              </div>
+              <div class="bx-row">
+                <span class="bx-tit">栏舍组数量:</span><span class="bx-cont">7</span>
+              </div>
+              <div class="bx-row">
+                <span class="bx-tit">栏舍数量:</span><span class="bx-cont">3</span>
+              </div>
+              <div class="bx-row">
+                <span class="bx-tit">班次数量:</span><span class="bx-cont">3</span>
+              </div>
+              <div class="bx-row">
+                <span class="bx-tit">准确率:</span><span class="bx-cont">99.6%</span>
+              </div>
+              <div class="bx-row">
+                <span class="bx-tit">开始时间:</span><span class="bx-cont">7:00</span>
+              </div>
+              <div class="bx-row">
+                <span class="bx-tit">过程时间:</span><span class="bx-cont">00:30:16</span>
+              </div>
+            </el-card>
+          
+          </el-col>
+          <el-col :span="18">
+            <!-- 表格 -->
+            <el-table   key="0"  :data="tableList"  v-loading="tableLoading" element-loading-text="给我一点时间"    border fit>
+                      <el-table-column label="序号"  width="50px" align="center">
+                        <template slot-scope="scope">
+                          <span>{{ scope.row.id }}</span>
+                        </template>
+                      </el-table-column>
+                      <el-table-column label="栏舍名称" min-width="120px" align="center" show-overflow-tooltip>
+                        <template slot-scope="scope">
+                          <span>{{ scope.row.barn_name  }}</span>
+                        </template>
+                      </el-table-column>
+                      <el-table-column label="栏舍组名称" min-width="120px" align="center" show-overflow-tooltip>
+                        <template slot-scope="scope">
+                          <span>{{ scope.row.barn_group_name  }}</span>
+                        </template>
+                      </el-table-column>
+                      <el-table-column label="开始日龄" min-width="120px" align="center" show-overflow-tooltip>
+                        <template slot-scope="scope">
+                          <span>{{ scope.row.start_age  }}</span>
+                        </template>
+                      </el-table-column>
+                      <el-table-column label="结束日龄" min-width="120px" align="center" show-overflow-tooltip>
+                        <template slot-scope="scope">
+                          <span>{{ scope.row.end_age  }}</span>
+                        </template>
+                      </el-table-column>
+                      <el-table-column label="计划量(kg)" min-width="120px" align="center" show-overflow-tooltip>
+                        <template slot-scope="scope">
+                          <span>{{ scope.row.plan_feed_number  }}</span>
+                        </template>
+                      </el-table-column>
+                      <el-table-column label="实际量(kg)" min-width="120px" align="center" show-overflow-tooltip>
+                        <template slot-scope="scope">
+                          <span>{{ scope.row.reality_feed_number  }}</span>
+                        </template>
+                      </el-table-column>
+                      <el-table-column label="误差量(kg)" min-width="120px" align="center" show-overflow-tooltip>
+                        <template slot-scope="scope">
+                          <span>{{ scope.row.error_number  }}</span>
+                        </template>
+                      </el-table-column>
+                      <el-table-column label="准确率" min-width="120px" align="center" show-overflow-tooltip>
+                        <template slot-scope="scope">
+                          <span>{{ scope.row.accurate_ratio  }}</span>
+                        </template>
+                      </el-table-column>
+                      <el-table-column label="计划温度°C" min-width="120px" align="center" show-overflow-tooltip>
+                        <template slot-scope="scope">
+                          <span>{{ scope.row.plan_temp  }}</span>
+                        </template>
+                      </el-table-column>
+                      <el-table-column label="温差°C" min-width="120px" align="center" show-overflow-tooltip>
+                        <template slot-scope="scope">
+                          <span>{{ scope.row.reality_temp - scope.row.plan_temp  }}</span>
+                        </template>
+                      </el-table-column>
+                      <el-table-column label="过程时间" min-width="120px" align="center" show-overflow-tooltip>
+                        <template slot-scope="scope">
+                          <span>{{ scope.row.process_time  }}</span>
+                        </template>
+                      </el-table-column>
+                      <el-table-column label="上报时间" min-width="120px" align="center" show-overflow-tooltip>
+                        <template slot-scope="scope">
+                          <span>{{ scope.row.created_at_format  }}</span>
+                        </template>
+                      </el-table-column>
+  
+              </el-table>
+              
+               <!-- 图表 -->
+              <div id="chartLine"  style="width: 100%;height:400px;"></div>
+        
+        
+            </el-col>
+  
+          
+        </el-row>
+    
+        
+  
+       
+  
+     
+      </el-card>
+  
+  
+     
+   
+      
+    </div>
+  
+  
+  </template> 
+  
+  <script>
+  import {  ajaxDataGet, ajaxDataPost, ajaxDataPut, ajaxDataDelete, checkButtons} from '@/api/common'
+  import { parseTime, json2excel } from '@/utils/index.js'
+  import * as echarts from 'echarts';
+  export default {
+    data() {
+  
+  
+      
+   
+    
+      return {
+  
+   
+  
+        //接口 - 获取 - 表格
+        url_get_table:'/api/v1/ops/statistics/feed_process',
+       
+        
+        //接口 - 下拉框 列表 
+        url_get_select1:'/role/getAll',
+  
+        //按钮权限
+        isButtonEdit:false,
+  
+        //获取 - 表格数据 - 参数
+        searchData:{
+          date: parseTime(new Date(), '{y}-{m}-{d}'),
+          feed_plan_id: undefined,
+          class_number: undefined,
+          feed_vehicle_id: undefined,
+          barn_name: "",
+          barn_group_name: "",
+          min_accurate_ratio: undefined,
+          max_accurate_ratio: undefined,
+          min_temp: undefined,
+          max_temp: undefined,
+   
+          page: 1,  //页码
+          page_size: 10,   //每页数量
+          total:0  //总页数
+        },
+        tableLoading: false,
+        //表格内容
+        tableList:[
+          //  { username:"admin", id:100, date:'2023-12-01',email:'测试信息1123',roleList:[2,3] },
+          // { username:"epans", id:200, date:'2023-12-01',email:'测试信息1123',roleList:[] },
+          // { username:"derek", id:300, date:'2023-12-01',email:'测试信息1123' },
+          // { username:"admin", id:100, date:'2023-12-01',email:'测试信息1123' },
+          // { username:"epans", id:200, date:'2023-12-01',email:'测试信息1123' },
+          // { username:"derek", id:300, date:'2023-12-01',email:'测试信息1123' },
+          // { username:"admin", id:100, date:'2023-12-01',email:'测试信息1123' },
+          // { username:"epans", id:200, date:'2023-12-01',email:'测试信息1123' },
+          // { username:"derek", id:300, date:'2023-12-01',email:'测试信息1123' },
+          // { username:"admin", id:100, date:'2023-12-01',email:'测试信息1123' },
+          // { username:"epans", id:200, date:'2023-12-01',email:'测试信息1123' },
+          // { username:"derek", id:300, date:'2023-12-01',email:'测试信息1123' },
+        ],
+  
+  
+        
+        feedPlanList:[
+      
+        ],
+        classList:[
+      
+        ],
+        feedCarList:[
+      
+      ],
+  
+  
+          //图表请求参数
+          chart1: {
+          getdataListParm: {
+            name: 'getChart1ByHomepage',
+            page: 1,
+            offset: 1,
+            pagecount: '',
+            returntype: 'Map',
+            parammaps: {
+              inputDatetime: '',
+              beginDate: '',
+              endDate: '',
+          
+            }
+          }
+        },
+        //图表实例
+        chartLine: null,
+        //图表数据
+        //这个图表格式让后端参考TMR的getprocessAnalysisTB接口。{"name":"getprocessAnalysisTB","page":1,"offset":1,"pagecount":"","returntype":"Map","parammaps":{"pastureid":"1653271339","id":"","pid":"237423"}}: 
+        chartLine_data: {
+          "data1":[null,null,null,null,null,null,null,null,null,null,null],
+          "data2":["2427.72","2576.25","3245.84","3384.97","3508.69","3929.18","8266.22","8475.09","8753.22","10295.48","100.35"],"data3":[null,null,null,null,null,null,null,null,null,null,null],
+          "data4":[["2022-04-01 05:08:05","114.00"],["2022-04-01 05:11:09","2422.00"],["2022-04-01 05:13:36","2571.00"],["2022-04-01 05:17:24","3250.00"],["2022-04-01 05:19:55","3393.00"],["2022-04-01 05:20:05","3505.00"],["2022-04-01 05:21:15","3928.00"],["2022-04-01 05:28:53","8263.00"],["2022-04-01 05:30:16","8464.00"],["2022-04-01 05:31:01","8753.00"],["2022-04-01 05:33:14","10300.00"]],"data5":[["2022-04-01 05:11:09","2422.00"],["2022-04-01 05:13:36","2570.00"],["2022-04-01 05:17:24","3250.00"],["2022-04-01 05:19:55","3392.00"],["2022-04-01 05:20:05","3506.00"],["2022-04-01 05:21:15","3928.00"],["2022-04-01 05:28:53","8262.00"],["2022-04-01 05:30:16","8462.00"],["2022-04-01 05:31:01","8752.00"],["2022-04-01 05:33:14","10300.00"],["2022-04-01 05:39:25","48.00"]],
+          "data5":[["2022-04-01 05:11:09","2422.00"],["2022-04-01 05:13:36","2570.00"],["2022-04-01 05:17:24","3250.00"],["2022-04-01 05:19:55","3392.00"],["2022-04-01 05:20:05","3506.00"],["2022-04-01 05:21:15","3928.00"],["2022-04-01 05:28:53","8262.00"],["2022-04-01 05:30:16","8462.00"],["2022-04-01 05:31:01","8752.00"],["2022-04-01 05:33:14","10300.00"],["2022-04-01 05:39:25","48.00"]]
+        },
+    
+  
+   
+  
+  
+      
+       
+         
+      }
+    },
+  
+    mounted() {
+      var me =  this 
+      //加载 - 图表假数据,如果是图表需要放mounted里测试假数据
+      me.roadchartLine(me.chartLine_data)
+  
+    },
+  
+  
+    created(){
+        //获取按钮权限
+        // this.get_auto_buttons 
+       
+  
+       //获取下拉框
+        this.get_select_list1()
+  
+   
+  
+      
+    },
+    methods:{
+  
+      get_auto_buttons() {
+        // 编辑
+        const isButtonEdit = checkButtons(this.$store.state.buttonsList, "用户管理编辑")
+        this.isButtonEdit = isButtonEdit
+        console.log('this.isButtonEdit==========',this.isButtonEdit)
+      },
+      
+      //获取 下拉框
+      get_select_list1(){
+          var me = this
+          ajaxDataPost('/api/v1/ops/formula_plan/list?page=1&page_size=1000', { }).then(e => {
+            console.log("饲喂下拉框:",e)
+  
+            //打印请求成功结果
+            if(e.code === 200){
+              me.feedPlanList = e.data.list
+            } else {
+              me.feedPlanList = []
+            }
+  
+             
+            var plan_item = e.data.list[0]
+            console.log("plan_item", plan_item)
+  
+            var feed_plan_id = plan_item.id
+            me.searchData.feed_plan_id = feed_plan_id
+  
+            var class_number = plan_item.class_number
+            me.searchData.class_number = class_number
+  
+            if(class_number == 1){  me.searchData.class_number_name = '第一班' }
+            if(class_number == 2){  me.searchData.class_number_name = '第二班' }
+            if(class_number == 3){  me.searchData.class_number_name = '第三班' }
+            if(class_number == 4){  me.searchData.class_number_name = '第四班' }
+  
+            var feed_vehicle_id = plan_item.feed_vehicle_id
+            me.searchData.feed_vehicle_id = feed_vehicle_id
+  
+            var feed_vehicle_name = plan_item.feed_vehicle_name
+            me.searchData.feed_vehicle_name = feed_vehicle_name
+  
+            var feed_vehicle_number = plan_item.feed_vehicle_number
+            me.searchData.feed_vehicle_number = feed_vehicle_number
+  
+            
+  
+  
+            //表格 - 初始化 
+            me.get_table_data()
+   
+          })
+  
+  
+          // 班次下拉框
+          ajaxDataGet('/api/v1/ops/calf_feed/enum/list').then(e => {
+            console.log("班次下拉框:",e)
+            if(e.code === 200){
+              me.classList = e.data.class_list
+            } else {
+              me.classList = []
+            }
+          })
+  
+          ajaxDataPost('/api/v1/ops/base_setting/feed_vehicle/list?page=1&page_size=1000', { }).then(e => {
+            console.log("饲喂车下拉框:",e)
+            //打印请求成功结果
+            if(e.code === 200){
+              me.feedCarList = e.data.list
+            } else {
+              me.feedCarList = []
+            }
+   
+          })
+  
+       
+  
+       
+  
+      
+      },
+     
+   
+  
+      change_plan(item){
+        var me = this
+        console.log(item)
+        var plan_item = me.feedPlanList.find(obj => obj.id == item) 
+        console.log("plan_item", plan_item)
+  
+        var class_number = plan_item.class_number
+        me.searchData.class_number = class_number
+  
+        if(class_number == 1){  me.searchData.class_number_name = '第一班' }
+        if(class_number == 2){  me.searchData.class_number_name = '第二班' }
+        if(class_number == 3){  me.searchData.class_number_name = '第三班' }
+        if(class_number == 4){  me.searchData.class_number_name = '第四班' }
+  
+        var feed_vehicle_id = plan_item.feed_vehicle_id
+        me.searchData.feed_vehicle_id = feed_vehicle_id
+  
+        var feed_vehicle_name = plan_item.feed_vehicle_name
+        me.searchData.feed_vehicle_name = feed_vehicle_name
+  
+        var feed_vehicle_number = plan_item.feed_vehicle_number
+            me.searchData.feed_vehicle_number = feed_vehicle_number
+  
+        
+       
+      },
+      change_car(item){
+        var me = this
+        console.log(item)
+        var carNum = me.feedCarList.find(obj => obj.id == item).number
+        console.log(carNum)
+        me.searchData.carNum = carNum
+      },
+      //获取 表格
+      get_table_data() {
+   
+       var me = this
+  
+       me.tableLoading = true
+       console.log("searchData======>", me.searchData)
+  
+   
+       
+        if( me.searchData.class_number == ""){
+          me.searchData.class_number = undefined
+        }
+        if( me.searchData.feed_vehicle_id == ""){
+          me.searchData.feed_vehicle_id = undefined
+        }
+  
+  
+        var send_url = me.url_get_table + '?page=1&page_size=1000'
+  
+        ajaxDataPost(send_url,  me.searchData).then(e => {
+          console.log("表格请求结果:",e)
+            //打印请求成功结果
+            if(e.code == 200 ){
+              me.tableList = e.data.list
+              me.searchData.total = e.data.total;	// 总数
+              me.searchData.page = e.data.page;	//页码
+              me.searchData.page_size = e.data.page_size;	//每页数量
+             
+            } else {
+              me.$message({ type: 'error', message: '请求表格列表失败!' + e.msg, duration: 2000 })
+            }
+  
+            setTimeout(() => {
+              me.tableLoading = false
+            }, 100)
+    
+          })
+  
+         
+      },
+      //搜索 查询表格
+      form_search(){
+        var me = this
+        console.log('请求表格列表searchData',me.searchData)
+        me.get_table_data()
+  
+      },
+  
+      //重置 表格
+      form_clear(){
+        var me = this
+        // me.searchData.date = ""
+        me.searchData.barn_name = ""
+        me.searchData.barn_group_name = ""
+        // me.searchData.feed_plan_id = undefined
+        // me.searchData.class_number = undefined
+        // me.searchData.feed_vehicle_id = undefined
+        me.searchData.min_accurate_ratio = undefined
+        me.searchData.max_accurate_ratio = undefined
+        me.searchData.min_temp = undefined
+        me.searchData.max_temp = undefined
+  
+     
+        me.get_table_data()
+      },
+   
+  
+      
+     
+       //图表数据加载 
+       roadchartLine(chartLine_data) {
+        console.log(chartLine_data.data5, 'chartLine_data')
+        if (this.chartLine != null) {
+          this.chartLine.dispose()
+        }
+        this.chartLine = echarts.init(document.getElementById('chartLine'))
+        var option = {
+          title: { text: '', subtext: '' },
+          color: ['#ff0000', '#5199e5', '#fdb06a', '#fb8b73'], // 关键加上这句话,legend的颜色和折线的自定义颜色就一致了
+          legend: [{
+            itemWidth: 15, itemHeight: 7, right: '25%', textStyle: { fontSize: 12 },
+            data: [{ name: '设计重量' }, { name: '实际重量'  }]
+          }, {
+            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: '结束重量' }
+            ]
+          }],
+          tooltip: {
+            trigger: 'axis',
+            formatter: function(params) {
+              // console.log(params, 'params')
+              var tip = params[0].name
+              for (let i = 0; i < params.length; i++) {
+                if (params[i].seriesName == '设计重量') {
+                  tip += '<br>' + params[i].seriesName + ':' + params[i].value[1]
+                }
+                if (params[i].seriesName == '实际重量') {
+                  tip += '<br>' + params[i].seriesName + ':' + params[i].value[1]
+                }
+                if (params[i].seriesName == '开始重量') {
+                  tip += '<br>' + params[i].seriesName + ':' + params[i].value[1]
+                }
+                if (params[i].seriesName == '结束重量') {
+                  tip += '<br>' + params[i].seriesName + ':' + params[i].value[1] + '<br>' + params[i].value[2] + params[i].value[3]
+                }
+              }
+              return tip
+            }
+          },
+          calculable: true,
+          xAxis: [
+            { type: 'category' }
+            // { type: 'category', splitLine: { show: false }, name: '时间', data: chartLine_data.data1, axisLabel: { show: true, textStyle: { color: '#666' }}}
+          ],
+          yAxis: [{ type: 'value' }],
+          toolbox: {
+            show: false,
+            feature: {
+              dataZoom: { realtime: false, yAxisIndex: 'none', },
+              restore: {},
+            }
+          },
+          dataZoom:  [
+            {type: 'inside'},        //用于添加滚轮缩放
+            {type:'slider' },  //用于添加滑动条缩放,
+          ],
+          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 }
+          ]
+        }
+        this.chartLine.setOption(option)
+        window.onresize = function() {
+          this.chartLine.resize()
+        }
+      },
+  
+  
+      
+      
+  
+  
+  
+    
+   
+      form_export() {
+      //获取请求表格数据的参数
+      //this.download.getdataListParm.parammaps = this.tableObj.getdataListParm.parammaps
+      //请求表格
+      // GetDataByName(this.download.getdataListParm).then(response => {
+      //     if (response.data.list !== null) {
+      //       this.download.list = response.data.list
+      //     } else {
+      //       this.download.list = []
+      //     }
+      //     var excelDatas = [
+      //       {
+      //         tHeader: ['表头1', '表头2', '表头3', '表头4',],
+      //         filterVal: ['title1', 'title2', 'title3', 'title4'],
+      //         tableDatas: this.download.list,
+      //         sheetName: 'Sheet1'
+      //       }
+      //     ]
+      //     json2excel(excelDatas, '表格大标题', true, 'xlsx')
+      // })
+  
+      var excelDatas = [
+          {
+              tHeader: ['表头1', '表头2', '表头3', '表头4',],
+              filterVal: ['title1', 'title2', 'title3', 'title4'],
+              tableDatas: [ 
+                  {title1: "内容1",title2: "内容2",title3: "内容3",title4: "内容4"},
+                  {title1: "内容11",title2: "内容22",title3: "内容32",title4: "内容44"},
+                  {title1: "内容111",title2: "内容222",title3: "内容333",title4: "内容444"},
+              ],
+              sheetName: 'Sheet1'
+          }
+      ]
+      json2excel(excelDatas, '表格大标题', true, 'xlsx')
+  }
+  
+       
+  
+    }
+  }
+  </script>
+  <!-- 加了scoped,则是仅在此组件里生效 -->
+  <style scoped>
+  .bx-row{margin-bottom: 20px}
+  .bx-tit{display:inline-block;width:45%;text-align:right;font-size:16px;}
+  .bx-cont{display:inline-block;width:54%;font-size:16px;font-weight:bold;color:#4b7902}
+  </style>
+  

+ 668 - 4
src/views/systemManagement/MenuManagement.vue

@@ -1,7 +1,176 @@
 <template>
  
   <div>
-        1.0.2版本页面,待开发
+
+
+    <el-card class="box-card">
+      <!-- 搜索区域 -->
+      <div class="search-bx1">
+          <el-input v-model="searchData.name" placeholder="菜单名称"  style="width: 220px;" class="g-mr20" clearable />
+          <el-button type="primary"   @click="form_search">搜索</el-button>
+          <el-button type="primary"   @click="form_clear">重置</el-button>
+          <el-button type="primary"   v-if="isButtonEdit"  @click="form_add">添加</el-button>
+           <!-- <el-button type="primary"   @click="form_export">导出</el-button> -->
+      </div>
+
+      <!-- 表格 -->
+      <el-table   element-loading-text="给我一点时间" :data="tableList" border fit highlight-current-row style="width: 100%;"    row-key="id" :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
+        <el-table-column label="菜单名称" header-align="center" min-width="120px">
+          <template slot-scope="scope">
+            <el-tag size="small">
+              <span>{{ scope.row.name }}</span>
+            </el-tag>
+          </template>
+        </el-table-column>
+        <el-table-column label="标题" min-width="140px" header-align="center" align="center">
+          <template slot-scope="scope">
+            <span>{{ scope.row.title }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="路径" min-width="100px" header-align="center" align="center">
+          <template slot-scope="scope">
+            <span>{{ scope.row.path }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="组件" min-width="150px" header-align="center" align="center">
+          <template slot-scope="scope">
+            <span>{{ scope.row.component }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="图标" min-width="100px" header-align="center" align="center">
+          <template slot-scope="scope">
+            <span>{{ scope.row.icon }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="重定向" width="100px" header-align="center" align="center">
+          <template slot-scope="scope">
+            <span>{{ scope.row.redirect }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="顺序" width="100px" header-align="center" align="center">
+          <template slot-scope="scope">
+            <span>{{ scope.row.sort }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="启用" min-width="80px" header-align="center" align="center">
+          <template slot-scope="scope">
+            <el-switch v-model="scope.row.is_show" active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="2" @change="change_enable(scope.row)" />
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" header-align="center" align="center" width="260" class-name="small-padding fixed-width" fixed="right">
+          <template slot-scope="{row}">
+            <el-button type="primary" size="mini" @click="form_edit(row)">
+              编辑
+            </el-button>
+            <el-button v-if="row.status!='已删'" size="mini" type="danger" @click="form_delete(row)">
+              删除
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+   
+      <!-- <el-table   key="0"  :data="tableList"  v-loading="tableLoading" element-loading-text="给我一点时间"    border fit>
+        <el-table-column label="序号"  width="50px" align="center">
+          <template slot-scope="scope">
+            <span>{{ scope.row.id }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="用户名称" min-width="150px" align="center">
+          <template slot-scope="scope">
+            <span>{{ scope.row.name }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="员工姓名" min-width="150px" align="center">
+          <template slot-scope="scope">
+            <span>{{ scope.row.employee_name }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="手机号" min-width="150px" align="center">
+          <template slot-scope="scope">
+            <span>{{ scope.row.phone }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="更新时间" min-width="150px" align="center">
+          <template slot-scope="scope">
+            <span>{{ scope.row.created_at_format }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="更新用户" min-width="150px" align="center">
+          <template slot-scope="scope">
+            <span>{{ scope.row.create_user }}</span>
+          </template>
+        </el-table-column>
+         
+  
+        <el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width" fixed="right">
+          <template slot-scope="scope">
+ 
+             <el-button  v-if="isButtonEdit"  type="primary" size="mini" icon="el-icon-edit" @click="form_edit(scope.row)">修改</el-button>
+ 
+             <el-button  v-if="isButtonEdit"  type="danger" size="mini" icon="el-icon-delete" @click="form_delete(scope.row)">删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table> -->
+
+      <!-- 分页区域 -->
+      <el-pagination  @size-change="change_size_page"  @current-change="change_current_page"  :current-page="searchData.page" :page-sizes="[1,5,10,20,30,50]"  :page-size="searchData.page_size" layout="total, prev, pager, next" :total="searchData.total"/>
+    </el-card>
+
+
+    <!-- 弹窗 新增or修改 -->
+    <el-dialog  :title="addFormTxt[addFormStatus]" :visible.sync="addFormShow" @close="add_dialog_close" width="50%">
+      <div class="">
+        <el-form  ref="addFormRef"  :rules="addFormRules"  :model="addForm"  label-position="right" label-width="100px"  style="width:50%;margin:0 auto 50px">
+            <el-form-item label="菜单名称:" prop="name">
+                <el-input   v-model="addForm.name"  ></el-input>  
+            </el-form-item>
+            <el-form-item label="标题名称:" prop="title">
+                <el-input   v-model="addForm.title"  ></el-input>  
+            </el-form-item>
+            <el-form-item label="菜单类型:" prop="menu_type">
+                <el-select ref="menu_type" v-model="addForm.menu_type" filterable placeholder="请选择"  style="width: 100%;">
+                     <el-option v-for="item in typeList" :key="item.id" :label="item.name" :value="item.id" />
+                </el-select>
+            </el-form-item>
+            <el-form-item label="等级:" prop="level">
+                <el-select ref="level" v-model="addForm.level" filterable placeholder="请选择"  style="width: 100%;">
+                     <el-option v-for="item in levelList" :key="item.id" :label="item.name" :value="item.id" />
+                </el-select>
+            </el-form-item>
+            <el-form-item label="路径:" prop="path">
+                <el-input   v-model="addForm.path"  ></el-input>  
+            </el-form-item>
+
+            <el-form-item label="组件:" prop="component">
+                <el-input   v-model="addForm.component"  ></el-input>  
+            </el-form-item>
+
+            <el-form-item label="图标:" prop="icon">
+                <el-input   v-model="addForm.icon"  ></el-input>  
+            </el-form-item>
+             
+            <el-form-item label="排序" prop="sort">
+                <el-input   v-model="addForm.sort"  ></el-input>  
+            </el-form-item>
+
+            <el-form-item label="上级菜单:" prop="parent_id">
+               
+                <el-tree  ref="tree" :data="rightlist" :props="{ label:'name',children:'children'  }"         @node-click="change_check"> </el-tree>
+            
+            
+              </el-form-item>
+           
+            
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+          <el-button type="primary" @click="addFormStatus==='create'?add_dialog_save():edit_dialog_save()">确认</el-button>
+          <el-button @click="addFormShow = false">关闭</el-button>
+        </div>
+      </div>
+    </el-dialog>
+
+ 
+    
   </div>
 
 
@@ -19,23 +188,518 @@ export default {
   
     return {
 
-  
+ 
+
+      //接口 - 获取 - 表格
+      url_get_table:'/api/v1/system/menu/list',
+      //接口 - 新增 - 表格
+      url_add_table:'/api/v1/system/menu/add',  
+      //接口 - 修改 - 表格
+      url_edit_table:'/api/v1/system/menu/edit', 
+      //接口 - 删除 - 表格
+      url_delete_table:'/api/v1/system/menu', 
+      
+      //接口 - 下拉框 列表 
+      url_get_select1:'/role/getAll',
+
+      //按钮权限
+      isButtonEdit:false,
+
+      //获取 - 表格数据 - 参数
+      searchData:{
+        name: "",
+        page: 1,  //页码
+        page_size: 10,   //每页数量
+        total:0,  //总页数
+        pastureId: ""
+      },
+      tableLoading: false,
+      //表格内容
+      // tableList:[
+      //   //  { username:"admin", id:100, date:'2023-12-01',email:'测试信息1123',roleList:[2,3] },
+      //   // { username:"epans", id:200, date:'2023-12-01',email:'测试信息1123',roleList:[] },
+      //   // { username:"derek", id:300, date:'2023-12-01',email:'测试信息1123' },
+      //   // { username:"admin", id:100, date:'2023-12-01',email:'测试信息1123' },
+      //   // { username:"epans", id:200, date:'2023-12-01',email:'测试信息1123' },
+      //   // { username:"derek", id:300, date:'2023-12-01',email:'测试信息1123' },
+      //   // { username:"admin", id:100, date:'2023-12-01',email:'测试信息1123' },
+      //   // { username:"epans", id:200, date:'2023-12-01',email:'测试信息1123' },
+      //   // { username:"derek", id:300, date:'2023-12-01',email:'测试信息1123' },
+      //   // { username:"admin", id:100, date:'2023-12-01',email:'测试信息1123' },
+      //   // { username:"epans", id:200, date:'2023-12-01',email:'测试信息1123' },
+      //   // { username:"derek", id:300, date:'2023-12-01',email:'测试信息1123' },
+      // ],
+
+
+      tableList:[
+        {
+          "component":"Layout","enable":1,"icon":"基础数据","id":"391","menutype":"menu","method":"post","name":"业务管理","parentid":"-1","path":"businessManagement","redirect":"noredirect","sort":"0","title":"业务管理","children":[
+            {
+              "component":"businessManagement/visitRecord/index","enable":1,"icon":"拜访记录","id":"393","menutype":"menu","method":"post","name":"拜访记录","parentid":"391","path":"visitRecord","redirect":"","sort":"0","title":"拜访记录",
+                "children":[
+                  {"component":"Layout","enable":1,"icon":"","id":"435","menutype":"button","method":"post","name":"拜访-新增、编辑、删除","parentid":"393","path":"business:visit:add","redirect":"","sort":"0","title":"拜访-新增、编辑、删除"}
+                ]
+            },
+            {
+              "component":"console/leadcustomers/index","enable":1,"icon":"线索客户","id":"476","menutype":"menu","method":"post","name":"线索客户","parentid":"391","path":"Leadcustomers","redirect":"","sort":"0","title":"线索客户"},
+            {
+              "component":"businessManagement/telephoneFollow/index","enable":1,"icon":"电话回访","id":"394","menutype":"menu","method":"post","name":"电话回访","parentid":"391","path":"TelephoneFollow","redirect":"","sort":"1","title":"电话回访",
+              "children":[
+                {"component":"Layout","enable":1,"icon":"","id":"436","menutype":"button","method":"post","name":"电话-新增、编辑、删除","parentid":"394","path":"business:telephone:add","redirect":"","sort":"0","title":"电话-新增、编辑、删除"}
+              ]
+            },
+            {
+              "component":"businessManagement/expressReception/index","enable":1,"icon":"快递接收","id":"409","menutype":"menu","method":"post","name":"快递接收","parentid":"391","path":"expressReception","redirect":"","sort":"2","title":"快递接收"
+            }
+          ]
+        }
+      ],
+
+
+      
+      roleList:[
+    
+      ],
+
+      typeList: [
+         {id: 1, name: "菜单"}, 
+         {id: 2, name: "按钮"}, 
+      ],  
+
+      levelList: [
+         {id: 1, name: "一级菜单"}, 
+         {id: 2, name: "二级菜单"}, 
+         {id: 3, name: "按钮"}, 
+      ],  
+      
+
+
+      checkedIdArr: [
+
+],
+      rightlist: [
+
+      ],
+      addFormShow:false,
+      addFormStatus: '',
+      addFormTxt: {  edit: '修改',  create: '新增' },
+      addForm:{
+        name:'',title:'' ,menu_type:1, level:1,path:'',component:'',icon:'',sort:0,parent_id:0,redirect:'',
+      },
+
+ 
+
+      addFormRules:{
+        name: [
+          { required: true, message: '类型必填', trigger: 'blur' },
+        ],
+   
+
+      },
+
+     
        
     }
   },
   created(){
-    
+      //获取按钮权限
+      const isButtonEdit = checkButtons(this.$store.state.buttonsList, "用户管理编辑")
+      this.isButtonEdit = isButtonEdit
+      console.log('this.isButtonEdit==========',this.isButtonEdit)
+     
+
+     //获取下拉框
+       this.get_select_list1()
+
+      //表格 - 初始化 
+       this.get_table_data()
+
+     
+
     
   },
   methods:{
 
     
+    
+    //获取 下拉框
+    get_select_list1(){
+        var me = this
+        ajaxDataPost('/api/v1/system/role/list?page=1&page_size=1000', { }).then(e => {
+          console.log("下拉框1:",e)
+
+        
+
+          if(e.code == 200 ){
+              me.roleList = e.data.list
+             
+            
+            } else {
+              me.roleList = []
+            }
+
+         
+  
+        })
+
+        ajaxDataPost('/api/v1/system/menu/list', {"name":""}).then(e => {
+        console.log("树形下拉框1:",e)
+
+ 
+          if(e.data.list == null || e.data.list  == undefined ||e.data.list.length == 0   ){
+            me.rightlist = []
+      
+
+          } else {
+         
+            me.rightlist = e.data.list 
+         
+          }
+      
+
+         
+         
+  
+        })
+
+
+        
+
+    
+    },
+
+    
+    //获取 表格
+    get_table_data() {
+ 
+     var me = this
+
+     me.tableLoading = true
+     console.log("searchData======>", me.searchData)
+
+      var send_url = me.url_get_table + '?page=' + me.searchData.page +  '&page_size=' + me.searchData.page_size
+
+      ajaxDataPost(send_url,  me.searchData).then(e => {
+        console.log("表格请求结果:",e)
+          //打印请求成功结果
+          if(e.code == 200 ){
+            me.tableList = e.data.list
+            me.searchData.total = e.data.total;	// 总数
+            me.searchData.page = e.data.page;	//页码
+            me.searchData.page_size = e.data.page_size;	//每页数量
+           
+          } else {
+            me.$message({ type: 'error', message: '请求表格列表失败!' + e.msg, duration: 2000 })
+          }
+
+          setTimeout(() => {
+            me.tableLoading = false
+          }, 100)
+  
+        })
+
+       
+    },
+    //搜索 查询表格
+    form_search(){
+      var me = this
+      console.log('请求表格列表searchData',me.searchData)
+      me.get_table_data()
+
+    },
+
+    change_rolesId(item){
+      this.$set(this.addForm, 'rolesId', item)
+      
+      this.$forceUpdate()
+  },
+  change_check(data) {
+      var me =  this
+ 
+      // me.$nextTick(() => {
+      //   const arr = []
+      //   me.rightlist.forEach(item => {
+      //     if (!me.$refs.tree.getNode(item.menuId).childNodes || !me.$refs.tree.getNode(item.menuId).childNodes.length) {
+      //       arr.push(item.menuId)
+      //     }
+      //   })
+      //   console.log (arr)
+      //   me.$refs.tree.setCheckedKeys(arr)
+      // })
+ 
+      me.addForm.parent_id = data.id
+   
+      console.log(data)
+      // this.checkedIdArr = checkedKeys
+
+
+      // console.log("选中的ID  checkedIdArr",me.checkedIdArr)
+    },
+
+    //设置 默认
+    change_enable(row){
+      var me = this
+      console.log(row)
+      var send_data = {
+        menu_id:row.id,
+        is_show:row.is_show,
+      }
+      //加载 - 保存
+      ajaxDataPost('/api/v1/system/menu/is_show' , send_data ).then(e => {
+                console.log("更改结果:",e)
+                //打印请求成功结果
+                if(e.code == 200  ){
+                  me.$message({ type: 'success',  message: '设置成功!'  });
+                  me.get_table_data()
+                } else {
+                  me.$message({ type: 'error', message: '设置失败!' + e.msg, duration: 2000 })
+                }
+      })
+    },
+
+
+    //重置 表格
+    form_clear(){
+      var me = this
+      me.searchData.name = ""
+      me.get_table_data()
+    },
+
+    //监听 page_size 改变的事件
+    change_size_page(item){
+      console.log(item)
+     // this.searchData.page_size = item
+      //  this.getUserList()
+    },
+
+    //监听 page 改变的事件
+    change_current_page(item){
+      console.log(item)
+       this.searchData.page = item
+       this.get_table_data()
+    },
+
+    //清空弹窗表单信息
+    reset_form(){
+      this.addForm.name = ''
+   
+      this.addForm.employee_name = ''
+      this.addForm.phone = ''
+      this.addForm.rolesId = undefined
+
+ 
+    },
+
+    //新增
+    form_add() {
+      this.reset_form()
+      this.addFormStatus = 'create'
+      this.addFormShow = true
+      this.$nextTick(() => {
+        this.$refs['addFormRef'].clearValidate()
+      })
+    },
+
+    //编辑
+    form_edit(row) {
+      console.log('行内容row=========', row)
+      //编辑行内容赋值
+      this.addForm = Object.assign({}, row)  
+
+
+ 
+      this.addFormStatus = 'edit'
+      this.addFormShow = true
+      this.$nextTick(() => {
+        this.$refs['addFormRef'].clearValidate()
+      })
+    },
+
+
+    //新增关闭
+    add_dialog_close(){
+       //内容重置
+       this.$refs['addFormRef'].resetFields()
+    },
+
+    //新增 保存
+    add_dialog_save() {
+      var me = this
+      console.log(me.addForm.rolesId)
+      this.$refs['addFormRef'].validate(valid => {
+
+        var roleArr = [{id:"",name:""}]
+        if(me.addForm.rolesId){
+          roleArr[0].id = me.addForm.rolesId
+        } 
+        //验证成功
+        if (valid) {
+          //发起请求
+          var send_data = {
+              "name": me.addForm.name,
+              "title": me.addForm.title,
+              "menu_type": me.addForm.menu_type,
+              "level": me.addForm.level,
+              "path": me.addForm.path,
+              "component": me.addForm.component,
+              "icon": me.addForm.icon,
+              "sort": me.addForm.sort,
+              "redirect": "",
+              "parent_id": me.addForm.parent_id
+          }
+          console.log("弹窗参数:", send_data)
+
+          //关闭弹窗
+          // me.addFormShow = false
+         //加载 - 发送新增保存
+           ajaxDataPost(me.url_add_table, send_data).then(e => {
+                console.log("新增结果:",e)
+                //打印请求成功结果
+                if(e.code == 200  ){
+                  me.$message({ type: 'success', message: '新增成功!'  , duration: 2000 })
+                  //关闭弹窗
+                  me.addFormShow = false
+                  me.get_table_data()
+                } else {
+                  me.$message({ type: 'error', message: '新增失败!' + e.msg, duration: 2000 })
+                }
+            })
+         
+        }
+      })
+    },
+    //编辑 保存
+    edit_dialog_save(){
+      var me = this
+      this.$refs['addFormRef'].validate(valid => {
+        //验证成功
+        if (valid) {
+          //发起请求
+
+          var roleArr = [{id:"",name:""}]
+          if(me.addForm.rolesId){
+            roleArr[0].id = me.addForm.rolesId
+          } 
+          var send_data = {
+           
+              "id": me.addForm.id,
+              "name": me.addForm.name,
+              "title": me.addForm.title,
+              "menu_type": me.addForm.menu_type,
+              "level": me.addForm.level,
+              "path": me.addForm.path,
+              "component": me.addForm.component,
+              "icon": me.addForm.icon,
+              "sort": me.addForm.sort,
+              "redirect": "",
+              "parent_id": me.addForm.parent_id
+          }
+          console.log("弹窗参数:", send_data)
+
+          //关闭弹窗
+          // me.addFormShow = false
+         //加载 - 发送新增保存
+         ajaxDataPost(me.url_edit_table, send_data).then(e => {
+                console.log("编辑结果:",e)
+                //打印请求成功结果
+                if(e.code == 200  ){
+                  me.$message({ type: 'success', message: '编辑成功!'  , duration: 2000 })
+                  //关闭弹窗
+                  me.addFormShow = false
+                  me.get_table_data()
+                } else {
+                  me.$message({ type: 'error', message: '编辑失败!' + e.msg, duration: 2000 })
+                }
+            })
+         
+        }
+      })
+    },
+
+
+    
+    
+
+
+
+    form_delete(row) {
+      var me = this
+
+       me.$confirm('是否删除此条内容?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+            console.log("删除的ID参数:", row.id)
+            //加载 - 发送新增保存
+            ajaxDataDelete(me.url_delete_table + '/' +row.id, {}).then(e => {
+                console.log("编辑结果:",e)
+                //打印请求成功结果
+                if(e.code == 200  ){
+                  me.$message({ type: 'success',  message: '删除成功!'  });
+                  me.get_table_data()
+                } else {
+                  me.$message({ type: 'error', message: '删除失败!' + e.msg, duration: 2000 })
+                }
+            })
+
+        
+ 
+          
+        }).catch(() => {
+          me.$message({
+            type: 'info',
+            message: '已取消删除'
+          });          
+        });
+
+
+       
+    },
+
+ 
+    form_export() {
+    //获取请求表格数据的参数
+    //this.download.getdataListParm.parammaps = this.tableObj.getdataListParm.parammaps
+    //请求表格
+    // GetDataByName(this.download.getdataListParm).then(response => {
+    //     if (response.data.list !== null) {
+    //       this.download.list = response.data.list
+    //     } else {
+    //       this.download.list = []
+    //     }
+    //     var excelDatas = [
+    //       {
+    //         tHeader: ['表头1', '表头2', '表头3', '表头4',],
+    //         filterVal: ['title1', 'title2', 'title3', 'title4'],
+    //         tableDatas: this.download.list,
+    //         sheetName: 'Sheet1'
+    //       }
+    //     ]
+    //     json2excel(excelDatas, '表格大标题', true, 'xlsx')
+    // })
+
+    var excelDatas = [
+        {
+            tHeader: ['表头1', '表头2', '表头3', '表头4',],
+            filterVal: ['title1', 'title2', 'title3', 'title4'],
+            tableDatas: [ 
+                {title1: "内容1",title2: "内容2",title3: "内容3",title4: "内容4"},
+                {title1: "内容11",title2: "内容22",title3: "内容32",title4: "内容44"},
+                {title1: "内容111",title2: "内容222",title3: "内容333",title4: "内容444"},
+            ],
+            sheetName: 'Sheet1'
+        }
+    ]
+    json2excel(excelDatas, '表格大标题', true, 'xlsx')
+}
+
      
 
   }
 }
 </script>
- 
+<!-- 加了scoped,则是仅在此组件里生效 -->
 <style scoped>
 
 </style>

+ 7 - 2
src/views/workManagement/WorkTaskAssign.vue

@@ -1313,7 +1313,7 @@
          remark:'',user_phone:'',  work_order_category_id:undefined,user_id:undefined,id:undefined,
        },
        resultSearchData2:{
-          work_order_id:undefined,    start_created_time: "",  end_created_time: "", inputDatetime1:"", 
+          work_order_id:undefined,   status:undefined, start_created_time: "",  end_created_time: "", inputDatetime1:"", 
           user_name:'',status:undefined,  sub_work_order_number:"",id:undefined,  
           page: 1,  //页码
           page_size: 10,   //每页数量
@@ -2233,7 +2233,7 @@
 
  
       
-   
+
 
        me.resultSearchData2.work_order_id = row.id 
        me.resultSearchData2.user_name = ""
@@ -2279,6 +2279,11 @@
  
 
 
+        if(me.resultSearchData2.status == ""){
+          me.resultSearchData2.status = undefined
+        }  
+        
+
        ajaxDataPost('/api/v1/ops/work_order/exec_result'+ '?page=' + me.resultSearchData2.page +  '&page_size=' + me.resultSearchData2.page_size,  me.resultSearchData2).then(e => {
           console.log("执行结果:",e)
           if(e.code == 200 ){

+ 4 - 4
src/views/workManagement/WorkTaskImplement.vue

@@ -148,8 +148,8 @@
           </el-row>
           <el-row :gutter="20">
             <el-col :span="24">
-                <el-form-item label="派单员工:" prop="operation_name">
-                <el-input  v-model="seeForm1.operation_name" type="textarea" maxlength="200"   :rows="1"  disabled />
+                <el-form-item label="派单员工:" prop="accept_order_user_list">
+                <el-input  v-model="seeForm1.accept_order_user_list" type="textarea" maxlength="200"   :rows="1"  disabled />
               </el-form-item>
             </el-col>
             </el-row>
@@ -213,8 +213,8 @@
           </el-row>
           <el-row :gutter="20">
             <el-col :span="24">
-                <el-form-item label="派单员工:" prop="operation_name">
-                <el-input  v-model="seeForm2.operation_name" type="textarea" maxlength="200"   :rows="1"  disabled />
+                <el-form-item label="派单员工:" prop="accept_order_user_list">
+                <el-input  v-model="seeForm2.accept_order_user_list" type="textarea" maxlength="200"   :rows="1"  disabled />
               </el-form-item>
             </el-col>
             </el-row>