فهرست منبع

worktaskassign

epans 11 ماه پیش
والد
کامیت
e9d4741865

+ 111 - 32
src/componentView/CowcodeDetail.vue

@@ -236,21 +236,37 @@
               
  
              <el-row>
+                 
+
                  <el-form-item label="牛号:" prop="calf_code">
-                   <el-select ref="calf_code" v-model="addForm.calf_code" filterable placeholder="请选择" style="width: 100%;"  disabled >
-                     <el-option v-for="item in cowNameList" :key="item.calf_code" :label="item.calf_code" :value="item.calf_code" />
-                   </el-select>
-                 </el-form-item>
+                   <el-input ref="calf_code" v-model="addForm.calf_code"    disabled />
+                 </el-form-item> 
              
                  <el-form-item label="犊牛类型:" prop="calf_category_name">
                    <el-input ref="calf_category_name" v-model="addForm.calf_category_name"    disabled />
                  </el-form-item> 
-           
+
+
                  <el-form-item label="事件类型:" prop="event_kind">
-                   <el-select ref="event_kind" v-model="addForm.event_kind" filterable placeholder="请选择"  style="width: 100%;"  disabled>
-                     <el-option v-for="item in eventNameList" :key="item.id" :label="item.name" :value="item.id"  />
-                   </el-select>
-                 </el-form-item>
+                   <el-input ref="event_kind" v-if="addForm.event_kind == 1" value="称重"    disabled />
+                   <el-input ref="event_kind" v-if="addForm.event_kind == 2" value="饲喂"    disabled />
+                   <el-input ref="event_kind" v-if="addForm.event_kind == 3" value="粪便情况"    disabled />
+                   <el-input ref="event_kind" v-if="addForm.event_kind == 4" value="测量体温"    disabled />
+                   <el-input ref="event_kind" v-if="addForm.event_kind == 5" value="测量心跳"    disabled />
+                   <el-input ref="event_kind" v-if="addForm.event_kind == 6" value="测量呼吸"    disabled />
+                   <el-input ref="event_kind" v-if="addForm.event_kind == 7" value="疾病"    disabled />
+                   <el-input ref="event_kind" v-if="addForm.event_kind == 8" value="病愈"    disabled />
+                   <el-input ref="event_kind" v-if="addForm.event_kind == 9" value="去角"    disabled />
+                   <el-input ref="event_kind" v-if="addForm.event_kind == 10" value="去副乳"    disabled />
+                   <el-input ref="event_kind" v-if="addForm.event_kind == 11" value="称重"    disabled />
+                   <el-input ref="event_kind" v-if="addForm.event_kind == 12" value="转栏"    disabled />
+                   <el-input ref="event_kind" v-if="addForm.event_kind == 13" value="死亡"    disabled />
+                 </el-form-item> 
+
+ 
+  
+
+            
     
              </el-row>
  
@@ -278,11 +294,15 @@
              </el-row>
              <!-- 粪便情况 -->
              <el-row   v-if="addForm.event_kind == 3">
+                
                  <el-form-item label="粪便评分:" prop="fecal_score">
-                   <el-select ref="fecal_score" v-model="addForm.fecal_score" filterable placeholder="请选择"  style="width: 100%;" disabled >
-                     <el-option v-for="item in scoreNameList" :key="item.id" :label="item.name" :value="item.id" />
-                   </el-select>
-                 </el-form-item>
+                   <el-input ref="fecal_score" v-if="addForm.event_kind == 1" value="1分"    disabled />
+                   <el-input ref="fecal_score" v-if="addForm.event_kind == 2" value="2分"    disabled />
+                   <el-input ref="fecal_score" v-if="addForm.event_kind == 3" value="3分"    disabled />
+                   <el-input ref="fecal_score" v-if="addForm.event_kind == 4" value="4分"    disabled />
+                   <el-input ref="fecal_score" v-if="addForm.event_kind == 5" value="5分"    disabled />
+                    
+                 </el-form-item> 
              </el-row>
              <!-- 测量体温 -->
              <el-row   v-if="addForm.event_kind == 4" >
@@ -377,15 +397,16 @@ export default {
       }, 
       
       //接口 - 获取 - 表格
-      url_get_table:'/api/v1/ops/event/list',
+      url_get_table:'/api/v1/ops/calf/event/list',
 
       //获取 - 表格数据 - 参数
       searchData:{
-         operation_user: "",
+         calf_code: "",
+         event_kind: undefined,
          inputDatetime1:"",
-         min_operation_time:"",
-         min_operation_time:"",
-         source:undefined,
+         start_time:"",
+         end_time:"",
+ 
          page: 1,  //页码
          page_size: 10,   //每页数量
          total:0,  //总页数
@@ -438,8 +459,23 @@ export default {
           
  
        },
-     
 
+       class_num:4,
+     //  下拉框 - 栏舍
+     cowshedList: [
+         // {id: "栏舍组1", name: "栏舍组1"}, 
+         // {id: "栏舍组2", name: "栏舍组2"}, 
+         // {id: "栏舍组3", name: "栏舍组3"}
+       ], 
+       //  下拉框 - 疾病 
+       diseaseNameList: [
+         // {id: 1, name: "腹泻"}, 
+         // {id: 2, name: "便秘"}, 
+         // {id: 3, name: "下痢"},
+         // {id: 4, name: "脐炎"},
+         // {id: 5, name: "肺炎"},
+         // {id: 6, name: "软瘫衰弱"}
+       ], 
       
     }
   },
@@ -451,7 +487,7 @@ export default {
 
       //   this.form_clear() 
 
-        
+           this.searchData.calf_code = item.calf_code 
           this.get_table_data()
        
        }
@@ -471,9 +507,52 @@ export default {
     me.cowcodeCard =  Object.assign({}, me.cowcodeData)  
 
     console.log("this.cowcodeCard",me.cowcodeCard )
-    
+
+    this.searchData.calf_code = me.cowcodeData.calf_code 
     this.get_table_data()
 
+
+
+         ajaxDataPost('/api/v1/ops/barn/list?page=1&page_size=1000', {name:"",barn_group_name:"",status:undefined}).then(e => {
+             console.log("栏舍:",e)
+ 
+             //打印请求成功结果
+             if(e.data.list == null || e.data.list == undefined ||e.data.list.length == 0   ){
+               me.cowshedList = []
+             } else {
+               me.cowshedList = e.data.list
+             }
+ 
+         })
+
+
+
+
+        // 班次数量下拉框
+        ajaxDataGet('/api/v1/ops/calf_feed/enum/list').then(e => {
+         console.log(e)
+         if(e.code === 200){
+           var class_num = e.data.class_list.length
+         } else {
+           var class_num = 4
+         }
+         console.log("class_num========",class_num)
+         me.class_num = class_num
+       })
+
+       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 = []
+           }
+         })
+
+
+
  
   },
   beforeDestroy() {
@@ -489,10 +568,10 @@ export default {
       me.tableLoading = true
       console.log("searchData======>", me.searchData)
  
- 
+   
       
-       if( me.searchData.source == ""){
-         me.searchData.source = undefined
+       if( me.searchData.event_kind == ""){
+         me.searchData.event_kind = undefined
        }
  
        var send_url = me.url_get_table + '?page=' + me.searchData.page +  '&page_size=' + me.searchData.page_size
@@ -523,12 +602,12 @@ export default {
        var me = this
        console.log('请求表格列表searchData',me.searchData)
        if (me.searchData.inputDatetime1 !== '' && me.searchData.inputDatetime1 !== null) {
-           me.searchData.min_operation_time = parseTime(me.searchData.inputDatetime1[0], '{y}-{m}-{d}')
-           me.searchData.max_operation_time = parseTime(me.searchData.inputDatetime1[1], '{y}-{m}-{d}')
+           me.searchData.start_time = parseTime(me.searchData.inputDatetime1[0], '{y}-{m}-{d}')
+           me.searchData.end_time = parseTime(me.searchData.inputDatetime1[1], '{y}-{m}-{d}')
          } else {
            me.searchData.inputDatetime1 = ''
-           me.searchData.min_operation_time = ''
-           me.searchData.max_operation_time = ''
+           me.searchData.start_time = ''
+           me.searchData.end_time = ''
          }
        me.get_table_data()
  
@@ -537,11 +616,11 @@ export default {
      //重置 表格
      form_clear(){
        var me = this
-       me.searchData.operation_user = ""
+ 
        me.searchData.inputDatetime1 = ""
-       me.searchData.min_operation_time = ""
-       me.searchData.min_operation_time = ""
-       me.searchData.source = undefined
+       me.searchData.end_time = ""
+       me.searchData.start_time = ""
+       me.searchData.event_kind = undefined
        me.searchData.page = 1
        me.searchData.page_size = 10
  

+ 98 - 35
src/router/index.js

@@ -1,7 +1,51 @@
-// 102 按需加载路由
+// 100普通路由
 import Vue from 'vue'
 import Router from 'vue-router'
+import Login from '@/views/Login.vue'
+import Home from '@/views/Home.vue'
+import Welcome from '@/views/Welcome.vue'
  
+ 
+
+import FeedProcess from '@/views/dataStatistics/FeedProcess.vue'
+import WeightTrend from '@/views/dataStatistics/WeightTrend.vue'
+import FormulaEffect from '@/views/dataStatistics/FormulaEffect.vue'
+import GrowthRate from '@/views/dataStatistics/GrowthRate.vue'
+import FeedCost from '@/views/dataStatistics/FeedCost.vue'
+import DiseaseSituation from '@/views/dataStatistics/DiseaseSituation.vue'
+import SurvivalRate from '@/views/dataStatistics/SurvivalRate.vue'
+
+
+import WeightRecord from '@/views/cowManagement/WeightRecord.vue'
+import CowInfo from '@/views/cowManagement/CowInfo.vue'
+import EventRecord from '@/views/cowManagement/EventRecord.vue'
+
+
+
+
+import CowCowShed from '@/views/cowShedManagement/CowCowShed.vue'
+import CowShedGroup from '@/views/cowShedManagement/CowShedGroup.vue'
+
+import FeedPlan from '@/views/formulaPlan/FeedPlan.vue'
+import FormulaTemplate from '@/views/formulaPlan/FormulaTemplate.vue'
+
+import WorkTaskAssign from '@/views/workManagement/WorkTaskAssign.vue'
+import WorkTaskImplement from '@/views/workManagement/WorkTaskImplement.vue'
+
+
+import CalfType from '@/views/basicSettings/CalfType.vue'
+import WorkOrderType from '@/views/basicSettings/WorkOrderType.vue'
+import FeedCarManagement from '@/views/basicSettings/FeedCarManagement.vue'
+import DiseaseManagement from '@/views/basicSettings/DiseaseManagement.vue'
+import InfoRemind from '@/views/basicSettings/InfoRemind.vue'
+import DiseaseType from '@/views/basicSettings/DiseaseType.vue'
+import FeedTemplate from '@/views/basicSettings/FeedTemplate.vue'
+import DefaultPara from '@/views/basicSettings/DefaultPara.vue'
+import FeedCostSet from '@/views/basicSettings/FeedCostSet.vue'
+
+import User from '@/views/systemManagement/User.vue'
+import Role from '@/views/systemManagement/Role.vue'
+
 
 Vue.use(Router)
 
@@ -11,43 +55,61 @@ const router =  new Router({
     // 当路径为/,重定向路径到/login
     { path: '/', redirect: '/login' },
     // 当路径为/login,转到组件Login
-    { path: '/login', component: () =>import('../views/Login.vue') },
-    {
-      path: '/home',
-      component: () => import('../views/Home.vue'),
+    { path: '/login', component: Login },
+    { 
+      path: '/home', 
+      component: Home,
       // 当路径为/home,转到组件welcome
       redirect: '/welcome',
       //children里面放的是home组件下的子组件
       children:[
-        { path: '/welcome', component: ()=> import('../views/Welcome.vue') },
-        { path: '/FeedProcess', component: ()=> import('../views/dataStatistics/FeedProcess.vue') },
-        { path: '/WeightTrend', component:() =>import('../views/dataStatistics/WeightTrend.vue') },
-        { path: '/FormulaEffect', component: () => import('../views/dataStatistics/FormulaEffect.vue') },
-        { path: '/GrowthRate', component: ()=> import('../views/dataStatistics/GrowthRate.vue') },
-        { path: '/FeedCost', component: () => import('../views/dataStatistics/FeedCost.vue') },
-        { path: '/DiseaseSituation', component: () => import('../views/dataStatistics/DiseaseSituation.vue') },
-        { path: '/SurvivalRate', component: () => import('../views/dataStatistics/SurvivalRate.vue') },
-        { path: '/WeightRecord', component: () => import('../views/cowManagement/WeightRecord.vue') },
-        { path: '/CowInfo', component: () => import('../views/cowManagement/CowInfo.vue') },
-        { path: '/EventRecord', component: () => import('../views/cowManagement/EventRecord.vue') },
-        { path: '/CowCowShed', component: () => import('../views/cowShedManagement/CowCowShed.vue') },
-        { path: '/CowShedGroup', component: () => import('../views/cowShedManagement/CowShedGroup.vue') },
-        { path: '/FeedPlan', component: () => import('../views/formulaPlan/FeedPlan.vue') },
-        { path: '/FormulaTemplate', component: () => import('../views/formulaPlan/FormulaTemplate.vue') },
-        { path: '/WorkTaskAssign', component: () => import('../views/workManagement/WorkTaskAssign.vue') },
-        { path: '/WorkTaskImplement', component: () => import('../views/workManagement/WorkTaskImplement.vue') },
-        { path: '/CalfType', component: () => import('../views/basicSettings/CalfType.vue') },
-        { path: '/WorkOrderType', component: () => import('../views/basicSettings/WorkOrderType.vue') },
-        { path: '/FeedCarManagement', component: () => import('../views/basicSettings/FeedCarManagement.vue') },
-        { path: '/DiseaseManagement', component: () => import('../views/basicSettings/DiseaseManagement.vue') },
-        { path: '/InfoRemind', component: () => import('../views/basicSettings/InfoRemind.vue') },
-        { path: '/DiseaseType', component: () => import('../views/basicSettings/DiseaseType.vue') },
-        { path: '/FeedTemplate', component: () => import('../views/basicSettings/FeedTemplate.vue') },
-        { path: '/DefaultPara', component: () => import('../views/basicSettings/DefaultPara.vue') },
-        { path: '/FeedCostSet', component: () => import('../views/basicSettings/FeedCostSet.vue') },
-        { path: '/User', component: () => import('../views/systemManagement/User.vue') },
-        { path: '/Role', component: () => import('../views/systemManagement/Role.vue') },
-      ]
+        { path: '/welcome', component: Welcome },
+         
+        
+
+        { path: '/FeedProcess', component: FeedProcess },
+        { path: '/WeightTrend', component: WeightTrend },
+        { path: '/FormulaEffect', component: FormulaEffect },
+        { path: '/GrowthRate', component: GrowthRate },
+        { path: '/FeedCost', component: FeedCost },
+        { path: '/DiseaseSituation', component: DiseaseSituation },
+        { path: '/SurvivalRate', component: SurvivalRate },
+
+        { path: '/WeightRecord', component: WeightRecord },
+        { path: '/CowInfo', component: CowInfo },
+        { path: '/EventRecord', component: EventRecord },
+        
+        
+
+        { path: '/CowCowShed', component: CowCowShed },
+        { path: '/CowShedGroup', component: CowShedGroup },
+
+        { path: '/FeedPlan', component: FeedPlan },
+        { path: '/FormulaTemplate', component: FormulaTemplate },
+
+        { path: '/WorkTaskAssign', component: WorkTaskAssign },
+        { path: '/WorkTaskImplement', component: WorkTaskImplement },
+        
+
+        { path: '/CalfType', component: CalfType },
+        { path: '/WorkOrderType', component: WorkOrderType },
+        { path: '/FeedCarManagement', component: FeedCarManagement },
+        { path: '/DiseaseManagement', component: DiseaseManagement },
+        { path: '/InfoRemind', component: InfoRemind },
+        { path: '/DiseaseType', component: DiseaseType },
+        { path: '/FeedTemplate', component: FeedTemplate },
+        { path: '/DefaultPara', component: DefaultPara },
+        { path: '/FeedCostSet', component: FeedCostSet },
+
+  
+        { path: '/User', component: User },
+        { path: '/Role', component: Role },
+        
+
+ 
+ 
+        
+      ] 
     }
   ]
 })
@@ -65,8 +127,9 @@ router.beforeEach((to, form, next) => {
   //从本地存储获取到token信息
   // const tokenStr  = window.sessionStorage.getItem('token')
   //没有token就强制跳转到登录页
-  //if (!tokenStr) return next('/login')
+   //if (!tokenStr) return next('/login')
   next()
 })
 
 export default router
+

+ 11 - 1
src/utils/request.js

@@ -129,7 +129,15 @@ service.interceptors.response.use(
     console.log('error' + error) // for debug
 
     if (error.response.data.code === 10000) {
-      MessageBox.confirm('你已经注销登陆,你可以取消或重新登陆', '确认注销', {
+
+      // Message({
+      //   // message: res.msg + res.code,
+      //   message:'Token失效,已经注销登陆,你可以退出重新登陆',
+      //   type: 'error',
+      //   duration: 5 * 1000
+      // })
+
+      MessageBox.confirm('你已经注销登陆,你可以退出重新登陆' , {
         confirmButtonText: '重新登陆',
         cancelButtonText: '取消',
         type: 'warning'
@@ -141,6 +149,8 @@ service.interceptors.response.use(
         location.reload()
 
       })
+
+      
     }
     let config = error.config
     if (!config) {

+ 3 - 3
src/views/Home.vue

@@ -286,12 +286,12 @@ export default {
 
 .iconfont{margin-right:10px}
 
-.toggle-button1{display:inline-block;height: 52px;width: 40px; background:  url("../assets/toggle1.png") no-repeat;cursor:pointer;position:absolute;top:0;left:64px;z-index:9999;background-size:40px 52px}
+.toggle-button1{display:inline-block;height: 52px;width: 40px; background:  url("../assets/toggle1.png") no-repeat;cursor:pointer;position:absolute;top:0;left:64px;z-index:100;background-size:40px 52px}
 
-.toggle-button2{display:inline-block;height: 52px;width: 40px; background:  url("../assets/toggle2.png") no-repeat;cursor:pointer;position:absolute;top:0;left:200px;z-index:9999;background-size:40px 52px}
+.toggle-button2{display:inline-block;height: 52px;width: 40px; background:  url("../assets/toggle2.png") no-repeat;cursor:pointer;position:absolute;top:0;left:200px;z-index:100;background-size:40px 52px}
 
 .left-logo{display:inline-block;height: 39px;width: 330px; background:  url("../assets/left-logo.png") no-repeat; }
-.center-logo{display:inline-block;height: 39px;width: 330px; background:  url("../assets/center-logo.png") no-repeat; }
+.center-logo{display:inline-block;height: 27px;width: 330px; background:  url("../assets/center-logo.png") no-repeat; }
  
 
 

+ 433 - 3
src/views/basicSettings/WorkOrderType.vue

@@ -1,7 +1,74 @@
 <template>
-   <!-- 100 -->
+  <!-- 102 -->
   <div>
-        1.1版本页面,待开发
+
+
+    <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"   @click="form_add">添加</el-button>
+           <!-- <el-button type="primary"   @click="form_export">导出</el-button> -->
+      </div>
+
+ 
+      <!-- 表格 -->
+      <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="100px" align="center">
+          <template slot-scope="scope">
+            <el-switch v-model="scope.row.mg_state" active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0"   />
+          </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 type="primary" size="mini" icon="el-icon-edit" @click="form_edit(scope.row)">修改</el-button>
+             <!-- 删除按钮 -->
+             <el-button 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>
+        <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>
 
 
@@ -13,17 +80,381 @@ import { parseTime, json2excel } from '@/utils/index.js'
 export default {
   data() {
 
+
+    
+ 
+  
     return {
 
  
+
+      //接口 - 获取 - 表格
+      url_get_table:'/api/v1/ops/base_setting/category_table/list',
+      //接口 - 新增 - 表格
+      url_add_table:'/api/v1/ops/base_setting/category_table/add',  
+      //接口 - 修改 - 表格
+      url_edit_table:'/api/v1/ops/base_setting/category_table/update', 
+      //接口 - 删除 - 表格
+      url_delete_table:'/api/v1/ops/base_setting/category_table/is_show', 
+      
+      //接口 - 下拉框 列表 
+      url_get_select1:'/role/getAll',
+
+      //按钮权限
+      isButtonEdit:false,
+
+      //获取 - 表格数据 - 参数
+      searchData:{
+        name: "",
+        category_type:1, //工单发1,疾病发3
+        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' },
+      ],
+
+
+      
+      pastureList:[
+    
+      ],
+
+    
+
+ 
+
+
+      addFormShow:false,
+      addFormStatus: '',
+      addFormTxt: {  edit: '修改',  create: '新增' },
+      addForm:{
+        name:'',id:'' 
+      },
+
+      addFormRules:{
+        name: [
+          { required: true, message: '类型必填', trigger: 'blur' },
+        ],
+   
+
+      },
+
+     
        
     }
   },
   created(){
+      //获取按钮权限
+      // this.get_auto_buttons 
+     
+
+     //获取下拉框
+     // this.get_select_list1()
 
+      //表格 - 初始化 
+      this.get_table_data()
+
+     
+
+    
   },
   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
+        ajaxDataGet(me.url_get_select1, {"roleName": "",  "page": 1,   "page_size": 1000}).then(e => {
+          console.log("下拉框1:",e)
+
+          //打印请求成功结果
+          if(e.data == null || e.data == undefined ||e.data.length == 0   ){
+            me.roleList = []
+          } else {
+            me.roleList = e.data
+          }
+
+         
+  
+        })
+
+
+        ajaxDataGet('/authdata/pasture', {  "page": 1,   "page_size": 1000}).then(e => {
+          console.log("牧场下拉框1:",e)
+
+          //打印请求成功结果
+          if(e.data == null || e.data == undefined ||e.data.length == 0   ){
+            me.pastureList = []
+          } else {
+            me.pastureList = e.data
+          }
+  
+        })
+
+    
+    },
+
+    
+    //获取 表格
+    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()
+
+    },
+
+    //重置 表格
+    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 = ''
+    },
+
+    //新增
+    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
+      this.$refs['addFormRef'].validate(valid => {
+        //验证成功
+        if (valid) {
+          //发起请求
+          var send_data = {
+              "name": me.addForm.name,
+              "category_type":1  //0 无效 1 工单类型
+          }
+          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 send_data = {
+              "name": me.addForm.name,
+              "id": me.addForm.id,
+          }
+          console.log("弹窗参数:", send_data)
+
+          //关闭弹窗
+          // me.addFormShow = false
+         //加载 - 发送新增保存
+         ajaxDataPut(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')
+}
+
+     
 
   }
 }
@@ -32,4 +463,3 @@ export default {
 <style scoped>
 
 </style>
-

+ 3 - 4
src/views/cowManagement/CowInfo102.vue

@@ -324,10 +324,9 @@
        </div>
      </el-dialog>
   
- 
-
+  
       <!-- 牛只详情 -->
-      <el-dialog  title="牛只详情" :visible.sync="cowcodeFormShow" top="10px"  @close="cowcode_dialog_close" width="95%">
+      <el-dialog  title="牛只详情" :visible.sync="cowcodeFormShow" top="10px"  @close="cowcode_dialog_close" width="95%" :append-to-body="true" :close-on-click-modal="false" >
         <div class=" ">
           <CowcodeDetail :cowcode-data="cowcodeData"  />
        
@@ -590,7 +589,7 @@
  
  
          ajaxDataPost('/api/v1/ops/barn/list?page=1&page_size=1000', {name:"",barn_group_name:"",status:undefined}).then(e => {
-             console.log("穿梭框1:",e)
+             console.log("栏舍:",e)
  
              //打印请求成功结果
              if(e.data.list == null || e.data.list == undefined ||e.data.list.length == 0   ){

+ 0 - 0
src/views/workManagement/WorkTaskAssign10.vue → src/views/dataStatistics/SurvivalRate100.vue


+ 0 - 0
src/views/dataStatistics/SurvivalRate3.vue → src/views/dataStatistics/SurvivalRate102.vue


+ 3 - 0
src/views/systemManagement/Role.vue

@@ -676,6 +676,9 @@ export default {
       var checkedKeys = this.$refs.tree.getCheckedKeys() // 所有被选中的节点的 key 所组成的数组数据
       console.log(checkedKeys)
       this.checkedIdArr = checkedKeys
+
+
+      console.log("选中的ID  checkedIdArr",me.checkedIdArr)
     },
 
     set_dialog_save() {

+ 41 - 0
src/views/workManagement/WorkTaskAssign100.vue

@@ -0,0 +1,41 @@
+<template>
+ 
+  <div>
+        1.1版本页面,待开发
+  </div>
+
+
+</template> 
+
+<script>
+import {  ajaxDataGet, ajaxDataPost, ajaxDataPut, ajaxDataDelete, checkButtons} from '@/api/common'
+import { parseTime, json2excel } from '@/utils/index.js'
+export default {
+  data() {
+
+
+    
+ 
+  
+    return {
+
+  
+       
+    }
+  },
+  created(){
+    
+    
+  },
+  methods:{
+
+    
+     
+
+  }
+}
+</script>
+ 
+<style scoped>
+
+</style>

+ 0 - 0
src/views/workManagement/WorkTaskAssign11.vue → src/views/workManagement/WorkTaskAssign102.vue


+ 1140 - 0
src/views/workManagement/WorkTaskAssign1022.vue

@@ -0,0 +1,1140 @@
+<template>
+ 
+  <div>
+
+
+    <el-card class="box-card">
+      <!-- 搜索区域 -->
+      <div class="search-bx1">
+          <el-input v-model="searchData.number" placeholder="工单编号"  style="width: 180px;" class="g-mr20 g-mb20" clearable />
+          <el-input v-model="searchData.user_name" placeholder="负责人"  style="width: 180px;" class="g-mr20" clearable />
+          <el-input v-model="searchData.user_phone" placeholder="负责人手机号"  style="width: 180px;" class="g-mr20" clearable />
+          <el-input v-model="searchData.operation_user" placeholder="派单人"  style="width: 180px;" class="g-mr20" clearable />
+          <el-select v-model="searchData.status" filterable placeholder="工单分类" class="g-mr20" style="width: 180px;" clearable>
+            <el-option v-for="item in orderTypeList" :key="item.id" :label="item.name" :value="item.id" />
+          </el-select>
+          <el-select v-model="searchData.work_order_category_id" filterable placeholder="类型" class="g-mr20" style="width: 180px;" clearable>
+            <el-option v-for="item in typeList" :key="item.id" :label="item.name" :value="item.id" />
+          </el-select>
+          
+          <el-select v-model="searchData.status" filterable placeholder="状态" class="g-mr20" style="width: 180px;" clearable>
+            <el-option v-for="item in statusList" :key="item.id" :label="item.name" :value="item.id" />
+          </el-select>
+
+          <el-date-picker v-model="searchData.inputDatetime1" class="g-mr20" type="daterange" range-separator="至" start-placeholder="完成时间" end-placeholder="完成时间" style="width: 250px;" />
+
+          <el-date-picker v-model="searchData.inputDatetime2" class="g-mr20" type="daterange" range-separator="至" start-placeholder="派单时间" end-placeholder="派单时间" style="width: 250px;" />
+        
+          
+          <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_add1">添加一次性工单</el-button>
+          <!-- <el-button type="primary"   v-if="isButtonEdit" @click="form_add2">添加周期工单</el-button> -->
+           <!-- <el-button type="primary"   @click="form_export">导出</el-button> -->
+      </div>
+
+ 
+      <!-- 表格 -->
+      <el-table   key="0"  :data="tableList"  v-loading="tableLoading" element-loading-text="给我一点时间"    border fit>
+        <el-table-column label="序号"  width="50px" align="center"  fixed="left">
+          <template slot-scope="scope">
+            <span>{{ scope.row.id }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="工单编号" min-width="200px" align="center"  fixed="left">
+          <template slot-scope="scope">
+            <!-- <span>{{ scope.row.number }}</span> -->
+            <el-button type="primary" size="mini"  @click="form_see1(scope.row)">{{ scope.row.number }}</el-button>
+          </template>
+        </el-table-column>
+        <el-table-column label="类型" min-width="150px" align="center" fixed="left">
+          <template slot-scope="scope">
+            <span>{{ scope.row.work_order_category_name }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="状态" min-width="150px" align="center"  fixed="left">
+          <template slot-scope="scope">
+            <!-- <span v-if = "scope.row.status == 0">未知</span> -->
+            <span v-if = "scope.row.status == 1">已创建未执行</span>
+            <span v-if = "scope.row.status == 2">执行中</span>
+            <span v-if = "scope.row.status == 3">已完成</span>
+            <span v-if = "scope.row.status == 4">已关闭</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="工单分类" min-width="150px" align="center">
+          <template slot-scope="scope">
+            <!-- <span v-if = "scope.row.status == 0">未知</span> -->
+            <span v-if = "scope.row.status == 1">周期性工单</span>
+            <span v-if = "scope.row.status == 2">一次性工单</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="对象" min-width="150px" align="center">
+          <template slot-scope="scope">
+             <!-- <el-button type="primary" size="mini"  @click="form_see(scope.row)">查看</el-button> -->
+             <span>{{ scope.row.barn_names }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="任务" min-width="150px" align="center">
+          <template slot-scope="scope">
+            <span>{{ scope.row.remark }}</span>
+          </template>
+        </el-table-column>
+       
+        <el-table-column label="派单人" min-width="150px" align="center">
+          <template slot-scope="scope">
+            <span>{{ scope.row.operation_name }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="派单人手机号" min-width="150px" align="center">
+          <template slot-scope="scope">
+            <span>{{ scope.row.operation_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.user_name }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="负责人手机号" min-width="150px" align="center">
+          <template slot-scope="scope">
+            <span>{{ scope.row.user_phone }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="完成时间" min-width="150px" align="center">
+          <template slot-scope="scope">
+            <span>{{ scope.row.finished_at_format }}</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 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_edit1(scope.row)">修改</el-button>
+             <el-button type="primary" v-if="isButtonEdit " size="mini" icon="el-icon-edit" @click="form_see1(scope.row)">详情</el-button>
+             <el-button type="primary" v-if="isButtonEdit " size="mini" icon="el-icon-edit" @click="form_result1(scope.row)">执行结果</el-button>
+
+
+
+             <el-button type="danger" v-if="isButtonEdit &&(scope.row.status == 1 || scope.row.status == 2)" size="mini" icon="el-icon-delete" @click="form_delete(scope.row)">关闭工单</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+
+
+      <!-- <span v-if = "scope.row.status == 1">已创建未执行</span>
+            <span v-if = "scope.row.status == 2">执行中</span>
+            <span v-if = "scope.row.status == 3">已完成</span>
+            <span v-if = "scope.row.status == 4">已关闭</span> -->
+
+      <!-- 分页区域 -->
+      <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="addFormTxt1[addFormStatus1]" :visible.sync="addFormShow1" @close="add_dialog_close1" width="50%">
+      <div class="">
+        <el-form  ref="addFormRef1"  :rules="addFormRules1"  :model="addForm1"  label-position="right" label-width="140px"  style="width:90%;margin:0 auto 50px">
+
+
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <el-form-item label="工单类型:" prop="work_order_category_id">
+                <el-select  v-model="addForm1.work_order_category_id"  placeholder="请选择" class="filter-item" style="width: 100%;" :disabled=" addFormStatus1=='see'">
+                  <el-option v-for="item in typeList" :key="item.id" :label="item.name" :value="item.id"  />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="工单任务:" prop="remark">
+                <el-input  v-model="addForm1.remark" type="textarea" maxlength="200"   :rows="3" :disabled=" addFormStatus1=='see'" />
+              </el-form-item>
+            </el-col>
+             
+          </el-row>
+          <el-row :gutter="20">
+        
+            <el-col :span="12" style="text-align:left">
+                <h4>工单对象</h4>
+
+                <el-input
+                  placeholder="输入关键字进行过滤"
+                  v-model="filterText">
+                </el-input>
+                <!-- 树形控件  -->
+                <el-tree  ref="tree" :data="rightlist" :props="{   label:'name',children:'barn_list'  }" show-checkbox   node-key="idTxt"  default-expand-all :default-checked-keys="checkedIdTxtArr"  @check-change="change_check" :filter-node-method="filterNode"> </el-tree>
+            </el-col>
+            <el-col :span="12" style="text-align:left">
+
+                <h4>已选栏舍</h4>
+                <el-tag v-for="item in leftlist" style="margin-right:20px;margin-bottom:20px">{{item}}</el-tag>
+
+            </el-col>
+
+         
+                
+          </el-row>
+
+
+       
+
+          <!-- <el-row :gutter="20">
+              <el-transfer  :titles="['栏舍名称', '栏舍名称']" v-model="transDataChooseRight2" :data="transDataList2" :props="{  key: 'id',   label: 'name'  }" @change="change_transData2"></el-transfer>
+          </el-row>
+            -->
+            
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+          <el-button type="primary" v-if="addFormStatus1==='create' || addFormStatus1==='edit'" @click="addFormStatus1==='create'?add_dialog_save1():edit_dialog_save1()">确认</el-button>
+          <el-button @click="addFormShow = false">关闭</el-button>
+        </div>
+      </div>
+    </el-dialog>
+
+
+    <!-- 弹窗  详情 一次性工单 -->
+    <el-dialog   title="工单信息" :visible.sync="seeFormShow1" @close="see_dialog_close1" width="50%">
+      <div class="">
+        <el-form  ref="seeFormRef1"   :model="seeForm1"  label-position="right" label-width="140px"  style="width:90%;margin:0 auto 50px">
+
+
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <el-form-item label="工单类型:" prop="work_order_category_id">
+                <el-select  v-model="seeForm1.work_order_category_id"  placeholder="请选择" class="filter-item" style="width: 100%;" :disabled=" addFormStatus1=='see'">
+                  <el-option v-for="item in typeList" :key="item.id" :label="item.name" :value="item.id"  />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="工单任务:" prop="remark">
+                <el-input  v-model="seeForm1.remark" type="textarea" maxlength="200"   :rows="3"  disabled />
+              </el-form-item>
+            </el-col>
+             
+          </el-row>
+          <el-row :gutter="20">
+
+            <!-- <div v-for="item in tableArrList">
+                <h3>{{item.date}}</h3>
+                <el-table  :data="item.tableData"   style="width: 100%;margin-bottom: 20px;"    row-key="id"  border  :span-method="ObjectSpanMethod" >
+                    <el-table-column  prop="date"    label="栏舍组"   sortable    min-width="180">  </el-table-column>
+                    
+                    <el-table-column   prop="address"   label="栏舍" min-width="180">   </el-table-column>
+                    <el-table-column  prop="name"  label="数量"     sortable  min-width="180">   </el-table-column>
+                </el-table>
+            </div> -->
+
+            <el-table  :data="tableSeeList"   style="width: 100%;margin-bottom: 20px;"    row-key="id"  border :span-method="ObjectSpanMethod" >
+                <el-table-column  prop="cowshedGroup"    label="栏舍组"   sortable    width="180">  </el-table-column>
+
+ 
+                
+                <el-table-column   prop="cowshed"   label="栏舍">   </el-table-column>
+                <el-table-column  prop="num"  label="数量"     sortable  width="180">   </el-table-column>
+               
+            </el-table>
+        
+             
+         
+                
+          </el-row>
+
+
+    
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+          <el-button type="primary"  @click=" see_dialog_save1() ">确认</el-button>
+          <el-button @click="seeFormShow1 = false">关闭</el-button>
+        </div>
+      </div>
+    </el-dialog>
+
+ 
+    
+  </div>
+
+
+</template> 
+
+<script>
+import {  ajaxDataGet, ajaxDataPost, ajaxDataPut, ajaxDataDelete, checkButtons} from '@/api/common'
+import { parseTime, json2excel } from '@/utils/index.js'
+export default {
+  data() {
+ 
+    return {
+
+
+      tableArrList:[
+        {date:"123123", tableData: [
+        
+         {  id: 1,  cowshedGroup: 'A组',  num: '33',    cowshed: '001舍' },   
+          { id: 31,  cowshedGroup: 'A组',  num: '33',  cowshed: '002舍'  }, 
+          { id: 32, cowshedGroup: 'A组',  num: '33', cowshed: '001舍' }, 
+
+          {  id: 1,  cowshedGroup: 'B组',  num: '33',    cowshed: '003舍' },   
+          { id: 31,  cowshedGroup: 'B组',  num: '33',  cowshed: '002舍'  }, 
+          { id: 32, cowshedGroup: 'B组',  num: '33', cowshed: '002舍' }, 
+
+ 
+         ]
+        } ,
+        {date:"2222", tableData: [
+        
+        {  id: 1,  cowshedGroup: 'A组',  num: '33',    cowshed: '001舍' },   
+          { id: 31,  cowshedGroup: 'A组',  num: '33',  cowshed: '002舍'  }, 
+          { id: 32, cowshedGroup: 'A组',  num: '33', cowshed: '001舍' }, 
+
+          {  id: 1,  cowshedGroup: 'B组',  num: '33',    cowshed: '003舍' },   
+          { id: 31,  cowshedGroup: 'B组',  num: '33',  cowshed: '002舍'  }, 
+          { id: 32, cowshedGroup: 'B组',  num: '33', cowshed: '002舍' }, 
+
+
+
+        ] }
+ 
+
+      ],
+      tableSeeList:[
+        
+         {  id: 1,  cowshedGroup: 'A组(总数:100)', groupnum: '100',   num: '33',    cowshed: '001舍' },   
+          { id: 31,  cowshedGroup: 'A组(总数:100)',  groupnum: '100', num: '33',  cowshed: '002舍'  }, 
+          { id: 32, cowshedGroup: 'A组(总数:100)',   groupnum: '100',num: '33', cowshed: '003舍' }, 
+
+          {  id: 1,  cowshedGroup: 'B组(总数:100)',   groupnum: '200',num: '33',    cowshed: '003舍' },   
+          { id: 31,  cowshedGroup: 'B组(总数:100)',  groupnum: '200', num: '33',  cowshed: '003舍'  }, 
+          { id: 32, cowshedGroup: 'B组(总数:100)',  groupnum: '200', num: '33', cowshed: '006舍' }, 
+
+
+
+        ],
+        
+      //接口 - 获取 - 表格
+      url_get_table:'/api/v1/ops/work_order/list',
+      //接口 - 新增 - 表格
+      url_add_table:'/api/v1/ops/work_order/add',  
+      //接口 - 修改 - 表格
+      url_edit_table:'/api/v1/ops/work_order/update', 
+      //接口 - 删除 - 表格
+      url_delete_table:'/api/v1/ops/work_order/close', 
+      
+      //接口 - 下拉框 列表 
+      url_get_select1:'/role/getAll',
+
+      //按钮权限
+      isButtonEdit:false,
+
+      //获取 - 表格数据 - 参数
+      searchData:{
+        number: "",
+        user_name: "",
+        user_phone: "",
+        operation_user: "",
+        work_order_category_id: undefined,
+        status: undefined,
+        start_finished_time: "",
+        end_finished_time: "",
+        start_created_time: "",
+        end_created_time: "",
+        inputDatetime1:"",
+        inputDatetime2:"",
+        page: 1,  //页码
+        page_size: 10,   //每页数量
+        total:0,  //总页数
+        pastureId: ""
+      },
+      tableLoading: false,
+      //表格内容
+      tableList:[
+          { number:"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' },
+      ],
+
+
+      
+      typeList:[
+        
+      ],
+
+      personList:[
+        
+        ],
+
+      statusList:[
+        // {id: 0, name: '未知'},
+        {id: 1, name: '已创建未执行'},
+        {id: 2, name: '执行中'},
+        {id: 3, name: '已完成'},
+        {id: 4, name: '已关闭'},
+      ],
+
+      orderTypeList:[
+        // {id: 0, name: '未知'},
+        {id: 1, name: '周期工单'},
+        {id: 2, name: '一次性工单'},
+  
+      ],
+    
+   
+ 
+
+
+      addFormShow1:false,
+      addFormStatus1: '',
+      addFormTxt1: {  edit: '修改',  create: '新增' },
+      addForm1:{
+        remark:'',user_phone:'',  work_order_category_id:undefined,user_id:undefined,id:undefined,
+      },
+
+      addFormRules1:{
+        name: [ { required: true, message: '类型名称必填', trigger: 'blur' },  ],
+   
+
+      },
+
+      seeFormShow1:false,
+      seeFormStatus1: '',
+      seeFormTxt1: {  edit: '修改',  create: '新增' },
+      seeForm1:{
+        remark:'',user_phone:'',  work_order_category_id:undefined,user_id:undefined,id:undefined,
+      },
+
+
+
+      //穿梭框右边的值
+      transDataChooseRight1:[],
+      //穿梭框所有列表
+      transDataList1:[
+        // {key:1,label:'组1',disabled:false},
+        // {key:2,label:'组2',disabled:false},
+        // {key:3,label:'组3',disabled:false},
+        // {key:4,label:'组4',disabled:false},
+        // {key:5,label:'组5',disabled:false},
+        // {key:6,label:'组6',disabled:false},
+        // {key:7,label:'组7',disabled:false},
+      ],
+
+      //穿梭框右边的值
+      transDataChooseRight2:[],
+      //穿梭框所有列表
+      transDataList2:[
+        // {key:1,label:'组1',disabled:false},
+        // {key:2,label:'组2',disabled:false},
+        // {key:3,label:'组3',disabled:false},
+        // {key:4,label:'组4',disabled:false},
+        // {key:5,label:'组5',disabled:false},
+        // {key:6,label:'组6',disabled:false},
+        // {key:7,label:'组7',disabled:false},
+      ],
+
+
+      rightlistAll:[],
+       
+       //权限数据
+       rightlist: [
+         
+ 
+        
+     ],
+
+     //栏舍名字数据
+      cowShedlist: [
+       
+       
+       ],
+
+      //名字数据
+      leftlist: [
+       
+       
+      ],
+ 
+       //树形控件的属性绑定对象
+      //  treeProps:{
+      //    label:'name',children:'barn_list'
+      //  },
+ 
+       
+       //树形默认选中的值
+       checkedIdTxtArr:[],
+       
+       filterText:""
+     
+       
+    }
+  },
+
+   
+  created(){
+      //获取按钮权限
+      const isButtonEdit = checkButtons(this.$store.state.buttonsList, "犊牛类型编辑")
+      this.isButtonEdit = isButtonEdit
+      console.log('this.isButtonEdit==========',this.isButtonEdit)
+     
+     var me = this
+     //获取下拉框
+     this.get_select_list1()
+
+      //表格 - 初始化 
+      this.get_table_data()
+
+
+
+      //合并单元格
+      this.getSpanArr(me.tableSeeList)
+
+     
+     //不定项的合并单元格
+      // me.tableArrList.forEach(function(item,index){
+      //   me.getSpanArr1(item.tableData, index)
+      // })
+
+    
+  },
+  watch: {
+      filterText(val) {
+        this.$refs.tree.filter(val);
+      }
+    },
+  methods:{
+
+
+    getSpanArr1(list,index) {
+      var me = this
+        // 先给所有的数据都加一个v.rowspan = 1
+        list.forEach(item => {
+            item.rowspan = 1;
+            item.rowspan1 = 1;
+        
+        });
+        // 双层循环
+        for (let i = 0; i < list.length; i++) {
+            for (let j = i + 1; j < list.length; j++) {
+                //此处可根据相同字段进行合并
+                if (list[i].date== list[j].date) {
+                    list[i].rowspan++;
+                    list[j].rowspan--;
+                }
+            }
+            // 这里跳过已经重复的数据
+            i = i + list[i].rowspan - 1;
+            i = i + list[i].rowspan1 - 1;
+        }
+        me.tableArrList[index].tableData = list;
+    },
+
+    //设置单元格
+    getSpanArr(list) {
+        // 先给所有的数据都加一个v.rowspan = 1
+        list.forEach(item => {
+            item.rowspan = 1;
+            item.rowspan1 = 1;
+        
+        });
+        // 双层循环
+        for (let i = 0; i < list.length; i++) {
+            for (let j = i + 1; j < list.length; j++) {
+                //此处可根据相同字段进行合并 -  第一列
+                if (list[i].cowshedGroup== list[j].cowshedGroup) {
+                    list[i].rowspan++;
+                    list[j].rowspan--;
+                }
+                //此处可根据相同字段进行合并 -  第二列
+                // if (list[i].cowshed== list[j].cowshed) {
+                //     list[i].rowspan1++;
+                //     list[j].rowspan1--;
+                // }
+            }
+            // 这里跳过已经重复的数据
+            i = i + list[i].rowspan - 1;
+            i = i + list[i].rowspan1 - 1;
+        }
+        this.tableData = list;
+    },
+
+    // 合并单元格相同内容
+    ObjectSpanMethod({ row, column, rowIndex, columnIndex }) {
+        // 第一列
+        if (columnIndex === 0) {
+            return {
+                rowspan: row.rowspan,
+                colspan: 1,
+            };
+        }
+        // 第二列
+        // if (columnIndex === 1) {
+        //     return {
+        //         rowspan: row.rowspan1,
+        //         colspan: 1,
+        //     };
+        // }
+      
+},
+
+    filterNode(value, data) {
+        if (!value) return true;
+        return data.name.indexOf(value) !== -1;
+      },
+
+    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/base_setting/category_table/list?page=1&page_size=1000', {category_type:1}).then(e => {
+          console.log("工单下拉框1:",e)
+          if(e.code == 200 ){
+            me.typeList = e.data.list
+          } else {
+            me.typeList = []
+          }
+
+        })
+
+        
+ 
+
+
+        ajaxDataPost('/api/v1/system/user/list?page=1&page_size=1000', {name:""}).then(e => {
+          console.log("人员下拉:",e)
+          if(e.code == 200 ){
+            me.personList = e.data.list
+          } else {
+            me.personList = []
+          }
+
+        })
+
+
+
+ 
+//         rightlist
+
+        ajaxDataPost('/api/v1/ops/barn_group/list?page=1&page_size=1000', {name:""}).then(e => {
+          console.log("多选框1:",e)
+
+          //打印请求成功结果
+          if(e.data.list == null || e.data.list == undefined ||e.data.list.length == 0   ){
+            me.rightlist = []
+          } else {
+            var rightlist = e.data.list
+            //由于后端数据ID重复,这里需要ID前增加虚拟数据。一级组,二级舍
+            rightlist.forEach(function(item){
+              item.idTxt = "组"+item.id
+              console.log(item)
+              if(item.barn_list.length !== 0){
+                item.barn_list.forEach(function(items){
+                  items.idTxt = ""+ items.id
+                }) 
+              }
+                
+            })
+            me.rightlist = rightlist
+          }
+
+          console.log("多选框 me.rightlist :", me.rightlist )
+
+        })
+
+
+         ajaxDataPost('/api/v1/ops/barn/list?page=1&page_size=1000', {name:"",barn_group_name:"",status:undefined}).then(e => {
+          console.log("所有栏舍:",e)
+
+          //打印请求成功结果
+          if(e.data.list == null || e.data.list == undefined ||e.data.list.length == 0   ){
+            me.cowShedlist = []
+          } else {
+        
+            me.cowShedlist = e.data.list
+
+          }
+
+        })
+
+
+
+        // ajaxDataPost('/api/v1/ops/barn_group/list?page=1&page_size=1000', {name:""}).then(e => {
+        //   console.log("穿梭框1:",e)
+
+        //   //打印请求成功结果
+        //   if(e.data.list == null || e.data.list == undefined ||e.data.list.length == 0   ){
+        //     me.transDataList1 = []
+        //   } else {
+        //     var transDataList1 = e.data.list
+        //     transDataList1.forEach(function(item){
+        //       item.name = item.name + "(犊牛数量:"+ item.calf_number + ")"
+        //     })
+        //     me.transDataList1 = transDataList1
+        //   }
+
+        // })
+
+
+        // ajaxDataPost('/api/v1/ops/barn/list?page=1&page_size=1000', {name:"",barn_group_name:"",status:undefined}).then(e => {
+        //   console.log("穿梭框2:",e)
+
+        //   //打印请求成功结果
+        //   if(e.data.list == null || e.data.list == undefined ||e.data.list.length == 0   ){
+        //     me.transDataList2 = []
+        //   } else {
+        
+        //     var transDataList2 = e.data.list
+        //     transDataList2.forEach(function(item){
+        //       if(item.stauts == 4){
+        //         item.name = item.name + "(犊牛数量:0)"
+        //       } else {
+        //         item.name = item.name + "(犊牛数量:1)"
+        //       }
+              
+        //     })
+        //     me.transDataList2 = transDataList2
+
+        //   }
+
+        // })
+    
+    },
+
+    
+    //获取 表格
+    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)
+      if (me.searchData.inputDatetime1 !== '' && me.searchData.inputDatetime1 !== null) {
+          me.searchData.min_operation_time = parseTime(me.searchData.inputDatetime1[0], '{y}-{m}-{d}')
+          me.searchData.max_operation_time = parseTime(me.searchData.inputDatetime1[1], '{y}-{m}-{d}')
+        } else {
+          me.searchData.inputDatetime1 = ''
+          me.searchData.min_operation_time = ''
+          me.searchData.max_operation_time = ''
+        }
+
+        if (me.searchData.inputDatetime2 !== '' && me.searchData.inputDatetime2 !== null) {
+          me.searchData.start_created_time = parseTime(me.searchData.inputDatetime2[0], '{y}-{m}-{d}')
+          me.searchData.end_created_time = parseTime(me.searchData.inputDatetime2[1], '{y}-{m}-{d}')
+        } else {
+          me.searchData.inputDatetime2 = ''
+          me.searchData.start_created_time = ''
+          me.searchData.end_created_time = ''
+        }
+      me.get_table_data()
+
+    },
+
+    //重置 表格
+    form_clear(){
+      var me = this
+      me.searchData.number = ""
+      me.searchData.user_name = ""
+      me.searchData.user_phone = ""
+      me.searchData.operation_user = ""
+      me.searchData.operation_phone = ""
+      me.searchData.work_order_category_id = undefined
+      me.searchData.status = undefined
+      me.searchData.start_finished_time = ""
+      me.searchData.end_finished_time = ""
+      me.searchData.start_created_time = ""
+      me.searchData.end_created_time = ""
+      me.searchData.inputDatetime1 = ""
+      me.searchData.inputDatetime2 = ""
+
+      me.searchData.page = 1
+      me.searchData.page_size = 10
+
+
+ 
+
+      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_form1(){
+      this.addForm1.remark = ''
+      this.addForm1.user_phone = ''
+      this.addForm1.work_order_category_id = undefined
+      this.addForm1.user_id = undefined
+      this.addForm1.id = undefined
+     
+    },
+
+    //新增
+    form_add1() {
+      this.reset_form1()
+      this.addFormStatus1 = 'create'
+      this.addFormShow1 = true
+      this.$nextTick(() => {
+        this.$refs['addFormRef1'].clearValidate()
+      })
+    },
+
+
+    form_see1(row) {
+
+      // router.push('/login')
+
+
+      console.log('行内容row=========', row)
+      //编辑行内容赋值
+      this.seeForm1 = Object.assign({}, row)  
+   
+      this.seeFormShow1 = true
+      this.$nextTick(() => {
+        this.$refs['seeFormRef1'].clearValidate()
+      })
+    },
+
+
+    see_dialog_close1(){
+       //内容重置
+       this.$refs['seeFormRef1'].resetFields()
+       this.seeFormShow1 = false
+    },
+
+
+    //编辑
+    form_edit1(row) {
+      var me = this
+      console.log('行内容row=========', row)
+      //编辑行内容赋值
+      this.addForm1 = Object.assign({}, row)  
+
+
+
+      //这里获取一下实际存的栏舍ID
+      var checklist = [27,28,30]
+      if(checklist.length !== 0){
+
+        var newChecklist = checklist.map((item)=>{
+          return ""+item 
+        })
+      }
+     
+
+      console.log("newChecklist===========",newChecklist)
+     
+      me.checkedIdTxtArr  = newChecklist
+
+      var leftlist = []
+      me.cowShedlist.forEach(function(item){
+
+        newChecklist.forEach(function(items){
+            if(parseFloat(items) == item.id ){
+              console.log(items)
+              if(items.indexOf("组")  == -1 ){
+                  leftlist.push(item.name)
+              }  
+         
+            }
+          
+        })
+
+      })
+
+      me.leftlist = leftlist
+
+    
+
+ 
+
+      this.addFormStatus1 = 'edit'
+      this.addFormShow1 = true
+      this.$nextTick(() => {
+        this.$refs['addFormRef1'].clearValidate()
+      })
+    },
+
+
+    //新增关闭
+    add_dialog_close1(){
+       //内容重置
+       this.$refs['addFormRef1'].resetFields()
+       this.addFormShow1 = false
+    },
+
+    //新增 保存
+    add_dialog_save1() {
+      var me = this
+      this.$refs['addFormRef1'].validate(valid => {
+        //验证成功
+        if (valid) {
+          //发起请求
+          var send_data = {
+              "work_order_category_id": me.addForm.work_order_category_id,
+              "user_id": me.addForm.user_id,
+              "user_phone": me.addForm.user_phone,
+              "remark": me.addForm.remark,
+              "barns": me.transDataChooseRight2,
+           
+          }
+
+        
+          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 send_data = {
+           
+              "id": me.addForm.id,
+              "work_order_category_id": me.addForm.work_order_category_id,
+              "user_id": me.addForm.user_id,
+              "user_phone": me.addForm.user_phone,
+              "remark": me.addForm.remark,
+              "barns": me.transDataChooseRight2,
+          }
+          console.log("弹窗参数:", send_data)
+
+          //关闭弹窗
+          // me.addFormShow = false
+         //加载 - 发送新增保存
+         ajaxDataPut(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: '已取消删除'
+          });          
+        });
+
+
+       
+    },
+    //监听勾选
+    change_check(data, checked, indeterminate) {
+      console.log(data, checked, indeterminate) 
+      var me =  this
+  
+      var checkedKeys = this.$refs.tree.getCheckedKeys() // 所有被选中的节点的 key 所组成的数组数据
+      console.log(checkedKeys)
+      this.checkedIdTxtArr = checkedKeys
+ 
+      console.log("选中的IDTXT  checkedIdTxtArr",me.checkedIdTxtArr)
+ 
+      console.log("    me.cowShedlist",    me.cowShedlist)
+
+      var leftlist = []
+    
+      me.cowShedlist.forEach(function(item){
+
+         me.checkedIdTxtArr.forEach(function(items){
+            if(parseFloat(items)  == item.id ){
+               //不包含 组这个字段
+               if(items.indexOf("组")  == -1 ){
+                   console.log(items)
+                   leftlist.push(item.name)
+               }  
+            }
+          
+         })
+
+      })
+      me.leftlist = leftlist
+
+      console.log("    me.leftlist",    me.leftlist)
+
+    },
+
+    change_person(value){
+      var me = this 
+      console.log("更改人员Id",value)
+      var item  = me.personList.find(obj => obj.id == value)
+      console.log("更改人员当前的内容",item)
+      me.addForm.user_phone = item.phone
+          
+    },
+
+    //监听 - 穿梭框选到右边的值
+    change_transData1(value){
+      console.log("穿梭框选到右边的值",value)
+    },
+
+    //监听 - 穿梭框选到右边的值
+    change_transData2(value){
+      console.log("穿梭框选到右边的值",value)
+    },
+ 
+    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>
+.el-transfer /deep/.el-transfer-panel {  width:300px;  text-align: left;}
+</style>
+