|  | @@ -1,47 +1,91 @@
 | 
	
		
			
				|  |  |  <template>
 | 
	
		
			
				|  |  | - 
 | 
	
		
			
				|  |  |    <div>
 | 
	
		
			
				|  |  | -   待开发页面
 | 
	
		
			
				|  |  | +    <el-card class="box-card">
 | 
	
		
			
				|  |  | +      <!-- 搜索区域 -->
 | 
	
		
			
				|  |  | +      <div class="search-bx1">
 | 
	
		
			
				|  |  | +        <el-select v-model="searchData.class_id" filterable placeholder="操作方式" class="g-mr20  g-mb20" style="width: 180px;" clearable>
 | 
	
		
			
				|  |  | +          <!--<el-option v-for="item in enumList.class_list" :key="item.value" :label="item.label" :value="item.value" /> -->
 | 
	
		
			
				|  |  | +        </el-select>
 | 
	
		
			
				|  |  | +        <el-input v-model="searchData.feed_vehicle_name" placeholder="操作人"  style="width: 180px;" 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.calf_code }}</span>
 | 
	
		
			
				|  |  | +          </template>
 | 
	
		
			
				|  |  | +        </el-table-column>
 | 
	
		
			
				|  |  | +        <el-table-column label="犊牛类型" min-width="150px" align="center">
 | 
	
		
			
				|  |  | +          <template slot-scope="scope">
 | 
	
		
			
				|  |  | +            <span>{{ scope.row.calf_category_name }}</span>
 | 
	
		
			
				|  |  | +          </template>
 | 
	
		
			
				|  |  | +        </el-table-column>
 | 
	
		
			
				|  |  | +        <el-table-column label="事件类型" min-width="150px" align="center">
 | 
	
		
			
				|  |  | +          <template slot-scope="scope">
 | 
	
		
			
				|  |  | +            <span>{{ scope.row.event_kind }}</span>
 | 
	
		
			
				|  |  | +          </template>
 | 
	
		
			
				|  |  | +        </el-table-column>
 | 
	
		
			
				|  |  | +        <el-table-column label="事件描述" min-width="150px" align="center">
 | 
	
		
			
				|  |  | +          <template slot-scope="scope">
 | 
	
		
			
				|  |  | +            <span>{{ scope.row.description }}</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.source }}</span>
 | 
	
		
			
				|  |  | +          </template>
 | 
	
		
			
				|  |  | +        </el-table-column>
 | 
	
		
			
				|  |  | +        <el-table-column label="操作人" min-width="150px" align="center">
 | 
	
		
			
				|  |  | +          <template slot-scope="scope">
 | 
	
		
			
				|  |  | +            <span>{{ scope.row.operation_user }}</span>
 | 
	
		
			
				|  |  | +          </template>
 | 
	
		
			
				|  |  | +        </el-table-column>
 | 
	
		
			
				|  |  | +        <el-table-column label="操作日期" min-width="150px" align="center">
 | 
	
		
			
				|  |  | +          <template slot-scope="scope">
 | 
	
		
			
				|  |  | +            <span>{{ scope.row.operation_time }}</span>
 | 
	
		
			
				|  |  | +          </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>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -   
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | - 
 | 
	
		
			
				|  |  | - 
 | 
	
		
			
				|  |  | -    
 | 
	
		
			
				|  |  |    </div>
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -</template> 
 | 
	
		
			
				|  |  | +</template>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  |  import {  ajaxDataGet, ajaxDataPost, ajaxDataPut, ajaxDataDelete, checkButtons} from '@/api/common'
 | 
	
		
			
				|  |  |  import { parseTime, json2excel } from '@/utils/index.js'
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    data() {
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    
 | 
	
		
			
				|  |  | - 
 | 
	
		
			
				|  |  | -  
 | 
	
		
			
				|  |  |      return {
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | - 
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |        //接口 - 获取 - 表格
 | 
	
		
			
				|  |  | -      url_get_table:'/api/v1/ops/barn/list',
 | 
	
		
			
				|  |  | +      url_get_table:'/api/v1/ops/event/list',
 | 
	
		
			
				|  |  |        //接口 - 新增 - 表格
 | 
	
		
			
				|  |  | -      url_add_table:'/api/v1/ops/barn/add',  
 | 
	
		
			
				|  |  | +      url_add_table:'/api/v1/ops/barn/add',
 | 
	
		
			
				|  |  |        //接口 - 修改 - 表格
 | 
	
		
			
				|  |  | -      url_edit_table:'/api/v1/ops/barn/update', 
 | 
	
		
			
				|  |  | +      url_edit_table:'/api/v1/ops/barn/update',
 | 
	
		
			
				|  |  |        //接口 - 删除 - 表格
 | 
	
		
			
				|  |  | -      url_delete_table:'/api/v1/ops/barn/delete', 
 | 
	
		
			
				|  |  | -      
 | 
	
		
			
				|  |  | -      //接口 - 下拉框 列表 
 | 
	
		
			
				|  |  | +      url_delete_table:'/api/v1/ops/barn/delete',
 | 
	
		
			
				|  |  | +      //接口 - 下拉框 列表
 | 
	
		
			
				|  |  |        url_get_select1:'/api/v1/ops/calf_feed/enum/list',
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |        //接口 - 下拉框 列表 栏舍组
 | 
	
		
			
				|  |  |        url_get_select2:'/api/v1/ops/barn_group/list?page=1&page_size=1000',
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |        //按钮权限
 | 
	
		
			
				|  |  |        isButtonEdit:false,
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -55,21 +99,7 @@ export default {
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        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:[],
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |        //栏舍状态
 | 
	
		
			
				|  |  |        statusList:[
 | 
	
	
		
			
				|  | @@ -78,97 +108,59 @@ export default {
 | 
	
		
			
				|  |  |          {id: 3, value: '损坏'},
 | 
	
		
			
				|  |  |        ],
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |        //栏舍组下拉
 | 
	
		
			
				|  |  | -      barnGroupList:[
 | 
	
		
			
				|  |  | -         
 | 
	
		
			
				|  |  | -      ],
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +      barnGroupList:[],
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |        addFormShow:false,
 | 
	
		
			
				|  |  |        addFormStatus: '',
 | 
	
		
			
				|  |  |        addFormTxt: {  edit: '修改',  create: '新增' },
 | 
	
		
			
				|  |  |        addForm:{
 | 
	
		
			
				|  |  | -        name:'',id:'' 
 | 
	
		
			
				|  |  | +        name:'',id:''
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |        addFormRules:{
 | 
	
		
			
				|  |  |          // name: [
 | 
	
		
			
				|  |  |          //   { required: true, message: '类型必填', trigger: 'blur' },
 | 
	
		
			
				|  |  |          // ],
 | 
	
		
			
				|  |  | -   
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -     
 | 
	
		
			
				|  |  | -       
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    created(){
 | 
	
		
			
				|  |  | -      //获取按钮权限
 | 
	
		
			
				|  |  | -      // this.get_auto_buttons 
 | 
	
		
			
				|  |  | -     
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -     //获取下拉框
 | 
	
		
			
				|  |  | -       //this.get_select_list1()
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -      //表格 - 初始化 
 | 
	
		
			
				|  |  | -        //this.get_table_data()
 | 
	
		
			
				|  |  | +    //获取按钮权限
 | 
	
		
			
				|  |  | +    // 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
 | 
	
		
			
				|  |  | -        ajaxDataPost(me.url_get_select2, { name: ""}).then(e => {
 | 
	
		
			
				|  |  | -          console.log("栏舍组下拉框:",e)
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -          if(e.data.list == null || e.data.list == undefined ||e.data.list.length == 0   ){
 | 
	
		
			
				|  |  | -            me.barnGroupList = []
 | 
	
		
			
				|  |  | -          } else {
 | 
	
		
			
				|  |  | -            me.barnGroupList = e.data.list
 | 
	
		
			
				|  |  | -          }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -         
 | 
	
		
			
				|  |  | -  
 | 
	
		
			
				|  |  | -        })
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        // 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
 | 
	
		
			
				|  |  | -        //   }
 | 
	
		
			
				|  |  | -  
 | 
	
		
			
				|  |  | -        // })
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    
 | 
	
		
			
				|  |  | +      var me = this
 | 
	
		
			
				|  |  | +      ajaxDataPost(me.url_get_select2, { name: ""}).then(e => {
 | 
	
		
			
				|  |  | +        console.log("栏舍组下拉框:",e)
 | 
	
		
			
				|  |  | +        if(e.data.list == null || e.data.list == undefined ||e.data.list.length == 0   ){
 | 
	
		
			
				|  |  | +          me.barnGroupList = []
 | 
	
		
			
				|  |  | +        } else {
 | 
	
		
			
				|  |  | +          me.barnGroupList = e.data.list
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    
 | 
	
		
			
				|  |  |      //获取 表格
 | 
	
		
			
				|  |  |      get_table_data() {
 | 
	
		
			
				|  |  | - 
 | 
	
		
			
				|  |  | -     var me = this
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -     me.tableLoading = true
 | 
	
		
			
				|  |  | -     console.log("searchData======>", me.searchData)
 | 
	
		
			
				|  |  | +      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
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -180,7 +172,7 @@ export default {
 | 
	
		
			
				|  |  |              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 })
 | 
	
		
			
				|  |  |            }
 | 
	
	
		
			
				|  | @@ -188,11 +180,9 @@ export default {
 | 
	
		
			
				|  |  |            setTimeout(() => {
 | 
	
		
			
				|  |  |              me.tableLoading = false
 | 
	
		
			
				|  |  |            }, 100)
 | 
	
		
			
				|  |  | -  
 | 
	
		
			
				|  |  |          })
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -       
 | 
	
		
			
				|  |  | -    },
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  |      //搜索 查询表格
 | 
	
		
			
				|  |  |      form_search(){
 | 
	
		
			
				|  |  |        var me = this
 | 
	
	
		
			
				|  | @@ -200,37 +190,31 @@ export default {
 | 
	
		
			
				|  |  |        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 = ''
 | 
	
		
			
				|  |  |        this.addForm.id = undefined
 | 
	
		
			
				|  |  |        this.addForm.barn_group_id = undefined
 | 
	
		
			
				|  |  |        this.addForm.number = ''
 | 
	
		
			
				|  |  | -       
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |      //新增
 | 
	
		
			
				|  |  |      form_add() {
 | 
	
		
			
				|  |  |        this.reset_form()
 | 
	
	
		
			
				|  | @@ -240,27 +224,23 @@ export default {
 | 
	
		
			
				|  |  |          this.$refs['addFormRef'].clearValidate()
 | 
	
		
			
				|  |  |        })
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |      //编辑
 | 
	
		
			
				|  |  |      form_edit(row) {
 | 
	
		
			
				|  |  |        this.reset_form()
 | 
	
		
			
				|  |  |        console.log('行内容row=========', row)
 | 
	
		
			
				|  |  |        //编辑行内容赋值
 | 
	
		
			
				|  |  | -      this.addForm = Object.assign({}, 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
 | 
	
	
		
			
				|  | @@ -269,29 +249,24 @@ export default {
 | 
	
		
			
				|  |  |          if (valid) {
 | 
	
		
			
				|  |  |            //发起请求
 | 
	
		
			
				|  |  |            var send_data = {
 | 
	
		
			
				|  |  | -              "name": me.addForm.name,
 | 
	
		
			
				|  |  | -              "barn_group_id": me.addForm.barn_group_id,
 | 
	
		
			
				|  |  | -              "number": me.addForm.number,
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +            "name": me.addForm.name,
 | 
	
		
			
				|  |  | +            "barn_group_id": me.addForm.barn_group_id,
 | 
	
		
			
				|  |  | +            "number": me.addForm.number,
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  | -          console.log("弹窗参数:", send_data)
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -          //关闭弹窗
 | 
	
		
			
				|  |  | -          // me.addFormShow = false
 | 
	
		
			
				|  |  | -         //加载 - 发送新增保存
 | 
	
		
			
				|  |  | +           console.log("弹窗参数:", send_data)
 | 
	
		
			
				|  |  |             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 })
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -            })
 | 
	
		
			
				|  |  | -         
 | 
	
		
			
				|  |  | +              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 })
 | 
	
		
			
				|  |  | +              }
 | 
	
		
			
				|  |  | +          })
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |        })
 | 
	
		
			
				|  |  |      },
 | 
	
	
		
			
				|  | @@ -303,7 +278,7 @@ export default {
 | 
	
		
			
				|  |  |          if (valid) {
 | 
	
		
			
				|  |  |            //发起请求
 | 
	
		
			
				|  |  |            var send_data = {
 | 
	
		
			
				|  |  | -    
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |                "id": me.addForm.id,
 | 
	
		
			
				|  |  |                "name": me.addForm.name,
 | 
	
		
			
				|  |  |                "barn_group_id": me.addForm.barn_group_id,
 | 
	
	
		
			
				|  | @@ -319,103 +294,64 @@ export default {
 | 
	
		
			
				|  |  |            //关闭弹窗
 | 
	
		
			
				|  |  |            // 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 })
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -            })
 | 
	
		
			
				|  |  | -         
 | 
	
		
			
				|  |  | +          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(() => {
 | 
	
		
			
				|  |  | +       }).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 = [
 | 
	
		
			
				|  |  | +      const 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')
 | 
	
		
			
				|  |  | -}
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -     
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +          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>
 |