|
@@ -3,73 +3,7 @@
|
|
|
<div>
|
|
|
|
|
|
|
|
|
- <el-card class="box-card">
|
|
|
- <!-- 搜索区域 -->
|
|
|
- <div class="search-bx1">
|
|
|
- <el-input v-model="searchData.name" placeholder="犊牛类型" style="width: 220px;" class="g-mr20" clearable />
|
|
|
- <el-button type="primary" @click="form_search">搜索</el-button>
|
|
|
- <el-button type="primary" @click="form_clear">重置</el-button>
|
|
|
- <el-button type="primary" v-if="isButtonEdit" @click="form_add">添加</el-button>
|
|
|
- <!-- <el-button type="primary" @click="form_export">导出</el-button> -->
|
|
|
- </div>
|
|
|
-
|
|
|
-
|
|
|
- <!-- 表格 -->
|
|
|
- <el-table key="0" :data="tableList" v-loading="tableLoading" element-loading-text="给我一点时间" border fit>
|
|
|
- <el-table-column label="序号" width="50px" align="center">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span>{{ scope.row.id }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="类型名称" min-width="150px" align="center">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span>{{ scope.row.name }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="犊牛数量" min-width="150px" align="center">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span>{{ scope.row.number }}</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" v-if="isButtonEdit" size="mini" icon="el-icon-edit" @click="form_edit(scope.row)">修改</el-button>
|
|
|
- <!-- 删除按钮 -->
|
|
|
- <el-button type="danger" v-if="isButtonEdit" size="mini" icon="el-icon-delete" @click="form_delete(scope.row)">删除</el-button>
|
|
|
- </template>
|
|
|
- </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>
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -161,17 +95,17 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created(){
|
|
|
- //获取按钮权限
|
|
|
- const isButtonEdit = checkButtons(this.$store.state.buttonsList, "犊牛类型编辑")
|
|
|
- this.isButtonEdit = isButtonEdit
|
|
|
- console.log('this.isButtonEdit==========',this.isButtonEdit)
|
|
|
+ // //获取按钮权限
|
|
|
+ // const isButtonEdit = checkButtons(this.$store.state.buttonsList, "犊牛类型编辑")
|
|
|
+ // this.isButtonEdit = isButtonEdit
|
|
|
+ // console.log('this.isButtonEdit==========',this.isButtonEdit)
|
|
|
|
|
|
|
|
|
- //获取下拉框
|
|
|
- // this.get_select_list1()
|
|
|
+ // //获取下拉框
|
|
|
+ // // this.get_select_list1()
|
|
|
|
|
|
- //表格 - 初始化
|
|
|
- this.get_table_data()
|
|
|
+ // //表格 - 初始化
|
|
|
+ // this.get_table_data()
|
|
|
|
|
|
|
|
|
|