| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <template>
- <el-card shadow="never">
- <yun-table :columns="columns" search="name,phone" toolbar="refresh,add,edit,del,more" ref="yuntable"
- :auth="auth" :extend="extend">
- </yun-table>
- </el-card>
- </template>
- <script>
- import table from "@components/Table.js";
- export default {
- components: {
- 'YunTable': table
- },
- auth: {
- add: Yunqi.auth.check('app\\admin\\controller\\goods\\PackSpecs', 'add'),
- edit: Yunqi.auth.check('app\\admin\\controller\\goods\\PackSpecs', 'edit'),
- del: Yunqi.auth.check('app\\admin\\controller\\goods\\PackSpecs', 'del'),
- multi: Yunqi.auth.check('app\\admin\\controller\\goods\\PackSpecs', 'multi'),
- recyclebin: Yunqi.auth.check('app\\admin\\controller\\goods\\PackSpecs', 'recyclebin'),
- },
- data: {
- extend: {
- index_url: 'goods/pack_specs/index',
- add_url: 'goods/pack_specs/add',
- edit_url: 'goods/pack_specs/edit',
- del_url: 'goods/pack_specs/del',
- multi_url: 'goods/pack_specs/multi'
- },
- columns: [
- {
- checkbox: true, selectable: function (row, index) {
- //可以根据业务需求返回false让某些行不可选中
- return true;
- }
- },
- { field: "id", title: "ID", operate: false },
- { field: "title", title: "规格名称" },
- { field: "labor_cost_money", title: "工价", operate: false },
- // { field: "keep_warm_type", title: "保温款式", operate: { form: "radio", filter: "=" }, searchList: { 1: "单层保温", 2: "双层保温" } },
- // { field: "surcharge_money", title: "加收金额", operate: false },
- { field: "one_surcharge_money", title: "单层保温金额", operate: false },
- { field: "two_surcharge_money", title: "双层保温金额", operate: false },
- { field: "createtime", title: "创建时间", operate: "daterange", formatter: Yunqi.formatter.datetime },
- { field: "updatetime", title: "修改时间", operate: "daterange", formatter: Yunqi.formatter.datetime },
- {
- field: 'operate',
- title: __('操作'),
- width: 130,
- action: {
- edit: function (row) {
- //可以根据业务需求返回false让按钮不显示
- return true
- },
- del: true,
- }
- }
- ]
- },
- //页面加载完成时执行
- onLoad: function (query) {
- console.log(query);
- },
- //页面初始显示或在框架内显示时执行
- onShow: function () {
- },
- //页面在框架内隐藏时执行
- onHide: function () {
- },
- //页面在框架内关闭时执行
- onUnload: function () {
- },
- methods: {
- onTableRender: function (list) {
- //表格渲染完成后执行
- /**
- * table常用方法
- * this.$refs.yuntable.reset();//重新渲染整个组件,当columns修改时,需要重新渲染表格才能生效,可以执行该方法。
- * this.$refs.yuntable.reload();//保持当前的page,重新获取数据
- * this.$refs.yuntable.submit();//返回第一页,重新获取数据
- * this.$refs.yuntable.expandAllTree();//树形表格展开所有节点
- * this.$refs.yuntable.expandTree(topid);//树形表格展开指定节点
- */
- }
- }
- }
- </script>
- <style>
- </style>
|