13 changed files with 636 additions and 21 deletions
			
			
		@ -0,0 +1,27 @@
					 | 
				
			||||
import request from '@/utils/request' | 
				
			||||
 | 
				
			||||
export function add(data) { | 
				
			||||
  return request({ | 
				
			||||
    url: '/bxg/api/fish', | 
				
			||||
    method: 'post', | 
				
			||||
    data | 
				
			||||
  }) | 
				
			||||
} | 
				
			||||
 | 
				
			||||
export function del(ids) { | 
				
			||||
  return request({ | 
				
			||||
    url: '/bxg/api/fish/', | 
				
			||||
    method: 'delete', | 
				
			||||
    data: ids | 
				
			||||
  }) | 
				
			||||
} | 
				
			||||
 | 
				
			||||
export function edit(data) { | 
				
			||||
  return request({ | 
				
			||||
    url: '/bxg/api/fish', | 
				
			||||
    method: 'put', | 
				
			||||
    data | 
				
			||||
  }) | 
				
			||||
} | 
				
			||||
 | 
				
			||||
export default { add, edit, del } | 
				
			||||
@ -0,0 +1,27 @@
					 | 
				
			||||
import request from '@/utils/request' | 
				
			||||
 | 
				
			||||
export function add(data) { | 
				
			||||
  return request({ | 
				
			||||
    url: '/bxg/api/fishImage', | 
				
			||||
    method: 'post', | 
				
			||||
    data | 
				
			||||
  }) | 
				
			||||
} | 
				
			||||
 | 
				
			||||
export function del(ids) { | 
				
			||||
  return request({ | 
				
			||||
    url: '/bxg/api/fishImage/', | 
				
			||||
    method: 'delete', | 
				
			||||
    data: ids | 
				
			||||
  }) | 
				
			||||
} | 
				
			||||
 | 
				
			||||
export function edit(data) { | 
				
			||||
  return request({ | 
				
			||||
    url: '/bxg/api/fishImage', | 
				
			||||
    method: 'put', | 
				
			||||
    data | 
				
			||||
  }) | 
				
			||||
} | 
				
			||||
 | 
				
			||||
export default { add, edit, del } | 
				
			||||
@ -0,0 +1,27 @@
					 | 
				
			||||
import request from '@/utils/request' | 
				
			||||
 | 
				
			||||
export function add(data) { | 
				
			||||
  return request({ | 
				
			||||
    url: '/bxg/api/fishPlace', | 
				
			||||
    method: 'post', | 
				
			||||
    data | 
				
			||||
  }) | 
				
			||||
} | 
				
			||||
 | 
				
			||||
export function del(ids) { | 
				
			||||
  return request({ | 
				
			||||
    url: '/bxg/api/fishPlace/', | 
				
			||||
    method: 'delete', | 
				
			||||
    data: ids | 
				
			||||
  }) | 
				
			||||
} | 
				
			||||
 | 
				
			||||
export function edit(data) { | 
				
			||||
  return request({ | 
				
			||||
    url: '/bxg/api/fishPlace', | 
				
			||||
    method: 'put', | 
				
			||||
    data | 
				
			||||
  }) | 
				
			||||
} | 
				
			||||
 | 
				
			||||
export default { add, edit, del } | 
				
			||||
@ -0,0 +1,27 @@
					 | 
				
			||||
import request from '@/utils/request' | 
				
			||||
 | 
				
			||||
export function add(data) { | 
				
			||||
  return request({ | 
				
			||||
    url: '/bxg/api/fishPush', | 
				
			||||
    method: 'post', | 
				
			||||
    data | 
				
			||||
  }) | 
				
			||||
} | 
				
			||||
 | 
				
			||||
export function del(ids) { | 
				
			||||
  return request({ | 
				
			||||
    url: '/bxg/api/fishPush/', | 
				
			||||
    method: 'delete', | 
				
			||||
    data: ids | 
				
			||||
  }) | 
				
			||||
} | 
				
			||||
 | 
				
			||||
export function edit(data) { | 
				
			||||
  return request({ | 
				
			||||
    url: '/bxg/api/fishPush', | 
				
			||||
    method: 'put', | 
				
			||||
    data | 
				
			||||
  }) | 
				
			||||
} | 
				
			||||
 | 
				
			||||
export default { add, edit, del } | 
				
			||||
@ -0,0 +1,115 @@
					 | 
				
			||||
<template> | 
				
			||||
  <div class="app-container"> | 
				
			||||
    <!--工具栏--> | 
				
			||||
    <div class="head-container"> | 
				
			||||
      <!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'--> | 
				
			||||
      <crudOperation :permission="permission" /> | 
				
			||||
      <!--表单组件--> | 
				
			||||
      <el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px"> | 
				
			||||
        <el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px"> | 
				
			||||
          <el-form-item label="id"> | 
				
			||||
            <el-input v-model="form.id" style="width: 370px;" /> | 
				
			||||
          </el-form-item> | 
				
			||||
          <el-form-item label="basin"> | 
				
			||||
            <el-input v-model="form.basin" style="width: 370px;" /> | 
				
			||||
          </el-form-item> | 
				
			||||
          <el-form-item label="city"> | 
				
			||||
            <el-input v-model="form.city" style="width: 370px;" /> | 
				
			||||
          </el-form-item> | 
				
			||||
          <el-form-item label="extend"> | 
				
			||||
            <el-input v-model="form.extend" style="width: 370px;" /> | 
				
			||||
          </el-form-item> | 
				
			||||
          <el-form-item label="filelist"> | 
				
			||||
            <el-input v-model="form.filelist" style="width: 370px;" /> | 
				
			||||
          </el-form-item> | 
				
			||||
          <el-form-item label="text"> | 
				
			||||
            <el-input v-model="form.text" style="width: 370px;" /> | 
				
			||||
          </el-form-item> | 
				
			||||
        </el-form> | 
				
			||||
        <div slot="footer" class="dialog-footer"> | 
				
			||||
          <el-button type="text" @click="crud.cancelCU">取消</el-button> | 
				
			||||
          <el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button> | 
				
			||||
        </div> | 
				
			||||
      </el-dialog> | 
				
			||||
      <!--表格渲染--> | 
				
			||||
      <el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler"> | 
				
			||||
        <el-table-column type="selection" width="55" /> | 
				
			||||
        <el-table-column v-if="columns.visible('id')" prop="id" label="id" /> | 
				
			||||
        <el-table-column v-if="columns.visible('basin')" prop="basin" label="basin" /> | 
				
			||||
        <el-table-column v-if="columns.visible('city')" prop="city" label="city" /> | 
				
			||||
        <el-table-column v-if="columns.visible('extend')" prop="extend" label="extend" /> | 
				
			||||
        <el-table-column v-if="columns.visible('filelist')" prop="filelist" label="filelist" /> | 
				
			||||
        <el-table-column v-if="columns.visible('text')" prop="text" label="text" /> | 
				
			||||
        <el-table-column v-permission="['admin','fish:edit','fish:del']" label="操作" width="150px" align="center"> | 
				
			||||
          <template slot-scope="scope"> | 
				
			||||
            <udOperation | 
				
			||||
              :data="scope.row" | 
				
			||||
              :permission="permission" | 
				
			||||
            /> | 
				
			||||
          </template> | 
				
			||||
        </el-table-column> | 
				
			||||
      </el-table> | 
				
			||||
      <!--分页组件--> | 
				
			||||
      <pagination /> | 
				
			||||
    </div> | 
				
			||||
  </div> | 
				
			||||
</template> | 
				
			||||
 | 
				
			||||
<script> | 
				
			||||
import crudFish from '@/api/bxg/fish' | 
				
			||||
import CRUD, { presenter, header, form, crud } from '@crud/crud' | 
				
			||||
import rrOperation from '@crud/RR.operation' | 
				
			||||
import crudOperation from '@crud/CRUD.operation' | 
				
			||||
import udOperation from '@crud/UD.operation' | 
				
			||||
import pagination from '@crud/Pagination' | 
				
			||||
import MaterialList from "@/components/material"; | 
				
			||||
 | 
				
			||||
// crud交由presenter持有 | 
				
			||||
const defaultCrud = CRUD({ title: 'Fish', url: '/bxg/api/fish', sort: 'id,desc', crudMethod: { ...crudFish }}) | 
				
			||||
const defaultForm = { id: null, basin: null, city: null, extend: null, filelist: null, text: null } | 
				
			||||
export default { | 
				
			||||
  name: 'Fish', | 
				
			||||
  components: { pagination, crudOperation, rrOperation, udOperation ,MaterialList}, | 
				
			||||
  mixins: [presenter(defaultCrud), header(), form(defaultForm), crud()], | 
				
			||||
  data() { | 
				
			||||
    return { | 
				
			||||
       | 
				
			||||
      permission: { | 
				
			||||
        add: ['admin', 'fish:add'], | 
				
			||||
        edit: ['admin', 'fish:edit'], | 
				
			||||
        del: ['admin', 'fish:del'] | 
				
			||||
      }, | 
				
			||||
      rules: { | 
				
			||||
      }    } | 
				
			||||
  }, | 
				
			||||
  watch: { | 
				
			||||
  }, | 
				
			||||
  methods: { | 
				
			||||
    // 获取数据前设置好接口地址 | 
				
			||||
    [CRUD.HOOK.beforeRefresh]() { | 
				
			||||
      return true | 
				
			||||
    }, // 新增与编辑前做的操作 | 
				
			||||
    [CRUD.HOOK.afterToCU](crud, form) { | 
				
			||||
    }, | 
				
			||||
  } | 
				
			||||
} | 
				
			||||
 | 
				
			||||
 | 
				
			||||
 | 
				
			||||
</script> | 
				
			||||
 | 
				
			||||
<style scoped> | 
				
			||||
  .table-img { | 
				
			||||
    display: inline-block; | 
				
			||||
    text-align: center; | 
				
			||||
    background: #ccc; | 
				
			||||
    color: #fff; | 
				
			||||
    white-space: nowrap; | 
				
			||||
    position: relative; | 
				
			||||
    overflow: hidden; | 
				
			||||
    vertical-align: middle; | 
				
			||||
    width: 32px; | 
				
			||||
    height: 32px; | 
				
			||||
    line-height: 32px; | 
				
			||||
  } | 
				
			||||
</style> | 
				
			||||
@ -0,0 +1,119 @@
					 | 
				
			||||
<template> | 
				
			||||
  <div class="app-container"> | 
				
			||||
    <!--工具栏--> | 
				
			||||
    <div class="head-container"> | 
				
			||||
      <!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'--> | 
				
			||||
      <crudOperation :permission="permission" /> | 
				
			||||
      <!--表单组件--> | 
				
			||||
      <el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px"> | 
				
			||||
        <el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px"> | 
				
			||||
          <el-form-item label="id"> | 
				
			||||
            <el-input v-model="form.id" style="width: 370px;" /> | 
				
			||||
          </el-form-item> | 
				
			||||
          <el-form-item label="type"> | 
				
			||||
            <el-input v-model="form.type" style="width: 370px;" /> | 
				
			||||
          </el-form-item> | 
				
			||||
          <el-form-item label="url"> | 
				
			||||
            <el-input v-model="form.url" style="width: 370px;" /> | 
				
			||||
          </el-form-item> | 
				
			||||
          <el-form-item label="pid"> | 
				
			||||
            <el-input v-model="form.pid" style="width: 370px;" /> | 
				
			||||
          </el-form-item> | 
				
			||||
          <el-form-item label="sort"> | 
				
			||||
            <el-input v-model="form.sort" style="width: 370px;" /> | 
				
			||||
          </el-form-item> | 
				
			||||
          <el-form-item label="createTime"> | 
				
			||||
            <el-input v-model="form.createTime" style="width: 370px;" /> | 
				
			||||
          </el-form-item> | 
				
			||||
        </el-form> | 
				
			||||
        <div slot="footer" class="dialog-footer"> | 
				
			||||
          <el-button type="text" @click="crud.cancelCU">取消</el-button> | 
				
			||||
          <el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button> | 
				
			||||
        </div> | 
				
			||||
      </el-dialog> | 
				
			||||
      <!--表格渲染--> | 
				
			||||
      <el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler"> | 
				
			||||
        <el-table-column type="selection" width="55" /> | 
				
			||||
        <el-table-column v-if="columns.visible('id')" prop="id" label="id" /> | 
				
			||||
        <el-table-column v-if="columns.visible('type')" prop="type" label="type" /> | 
				
			||||
        <el-table-column v-if="columns.visible('url')" prop="url" label="url" /> | 
				
			||||
        <el-table-column v-if="columns.visible('pid')" prop="pid" label="pid" /> | 
				
			||||
        <el-table-column v-if="columns.visible('sort')" prop="sort" label="sort" /> | 
				
			||||
        <el-table-column v-if="columns.visible('createTime')" prop="createTime" label="createTime"> | 
				
			||||
          <template slot-scope="scope"> | 
				
			||||
            <span>{{ parseTime(scope.row.createTime) }}</span> | 
				
			||||
          </template> | 
				
			||||
        </el-table-column> | 
				
			||||
        <el-table-column v-permission="['admin','fishImage:edit','fishImage:del']" label="操作" width="150px" align="center"> | 
				
			||||
          <template slot-scope="scope"> | 
				
			||||
            <udOperation | 
				
			||||
              :data="scope.row" | 
				
			||||
              :permission="permission" | 
				
			||||
            /> | 
				
			||||
          </template> | 
				
			||||
        </el-table-column> | 
				
			||||
      </el-table> | 
				
			||||
      <!--分页组件--> | 
				
			||||
      <pagination /> | 
				
			||||
    </div> | 
				
			||||
  </div> | 
				
			||||
</template> | 
				
			||||
 | 
				
			||||
<script> | 
				
			||||
import crudFishImage from '@/api/bxg/fishImage' | 
				
			||||
import CRUD, { presenter, header, form, crud } from '@crud/crud' | 
				
			||||
import rrOperation from '@crud/RR.operation' | 
				
			||||
import crudOperation from '@crud/CRUD.operation' | 
				
			||||
import udOperation from '@crud/UD.operation' | 
				
			||||
import pagination from '@crud/Pagination' | 
				
			||||
import MaterialList from "@/components/material"; | 
				
			||||
 | 
				
			||||
// crud交由presenter持有 | 
				
			||||
const defaultCrud = CRUD({ title: 'FishImage', url: '/bxg/api/fishImage', sort: 'id,desc', crudMethod: { ...crudFishImage }}) | 
				
			||||
const defaultForm = { id: null, type: null, url: null, pid: null, sort: null, createTime: null } | 
				
			||||
export default { | 
				
			||||
  name: 'FishImage', | 
				
			||||
  components: { pagination, crudOperation, rrOperation, udOperation ,MaterialList}, | 
				
			||||
  mixins: [presenter(defaultCrud), header(), form(defaultForm), crud()], | 
				
			||||
  data() { | 
				
			||||
    return { | 
				
			||||
       | 
				
			||||
      permission: { | 
				
			||||
        add: ['admin', 'fishImage:add'], | 
				
			||||
        edit: ['admin', 'fishImage:edit'], | 
				
			||||
        del: ['admin', 'fishImage:del'] | 
				
			||||
      }, | 
				
			||||
      rules: { | 
				
			||||
      }    } | 
				
			||||
  }, | 
				
			||||
  watch: { | 
				
			||||
  }, | 
				
			||||
  methods: { | 
				
			||||
    // 获取数据前设置好接口地址 | 
				
			||||
    [CRUD.HOOK.beforeRefresh]() { | 
				
			||||
      return true | 
				
			||||
    }, // 新增与编辑前做的操作 | 
				
			||||
    [CRUD.HOOK.afterToCU](crud, form) { | 
				
			||||
    }, | 
				
			||||
  } | 
				
			||||
} | 
				
			||||
 | 
				
			||||
 | 
				
			||||
 | 
				
			||||
</script> | 
				
			||||
 | 
				
			||||
<style scoped> | 
				
			||||
  .table-img { | 
				
			||||
    display: inline-block; | 
				
			||||
    text-align: center; | 
				
			||||
    background: #ccc; | 
				
			||||
    color: #fff; | 
				
			||||
    white-space: nowrap; | 
				
			||||
    position: relative; | 
				
			||||
    overflow: hidden; | 
				
			||||
    vertical-align: middle; | 
				
			||||
    width: 32px; | 
				
			||||
    height: 32px; | 
				
			||||
    line-height: 32px; | 
				
			||||
  } | 
				
			||||
</style> | 
				
			||||
@ -0,0 +1,147 @@
					 | 
				
			||||
<template> | 
				
			||||
  <div class="app-container"> | 
				
			||||
    <!--工具栏--> | 
				
			||||
    <div class="head-container"> | 
				
			||||
      <!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'--> | 
				
			||||
      <crudOperation :permission="permission" /> | 
				
			||||
      <!--表单组件--> | 
				
			||||
      <el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px"> | 
				
			||||
        <el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px"> | 
				
			||||
          <el-form-item label="id"> | 
				
			||||
            <el-input v-model="form.id" style="width: 370px;" /> | 
				
			||||
          </el-form-item> | 
				
			||||
          <el-form-item label="placeName"> | 
				
			||||
            <el-input v-model="form.placeName" style="width: 370px;" /> | 
				
			||||
          </el-form-item> | 
				
			||||
          <el-form-item label="mode"> | 
				
			||||
            <el-input v-model="form.mode" style="width: 370px;" /> | 
				
			||||
          </el-form-item> | 
				
			||||
          <el-form-item label="mapType"> | 
				
			||||
            <el-input v-model="form.mapType" style="width: 370px;" /> | 
				
			||||
          </el-form-item> | 
				
			||||
          <el-form-item label="province"> | 
				
			||||
            <el-input v-model="form.province" style="width: 370px;" /> | 
				
			||||
          </el-form-item> | 
				
			||||
          <el-form-item label="realName"> | 
				
			||||
            <el-input v-model="form.realName" style="width: 370px;" /> | 
				
			||||
          </el-form-item> | 
				
			||||
          <el-form-item label="riverName"> | 
				
			||||
            <el-input v-model="form.riverName" style="width: 370px;" /> | 
				
			||||
          </el-form-item> | 
				
			||||
          <el-form-item label="suitMonth"> | 
				
			||||
            <el-input v-model="form.suitMonth" style="width: 370px;" /> | 
				
			||||
          </el-form-item> | 
				
			||||
          <el-form-item label="latitude"> | 
				
			||||
            <el-input v-model="form.latitude" style="width: 370px;" /> | 
				
			||||
          </el-form-item> | 
				
			||||
          <el-form-item label="longitude"> | 
				
			||||
            <el-input v-model="form.longitude" style="width: 370px;" /> | 
				
			||||
          </el-form-item> | 
				
			||||
          <el-form-item label="extend"> | 
				
			||||
            <el-input v-model="form.extend" style="width: 370px;" /> | 
				
			||||
          </el-form-item> | 
				
			||||
          <el-form-item label="status"> | 
				
			||||
            <el-input v-model="form.status" style="width: 370px;" /> | 
				
			||||
          </el-form-item> | 
				
			||||
          <el-form-item label="createTime"> | 
				
			||||
            <el-input v-model="form.createTime" style="width: 370px;" /> | 
				
			||||
          </el-form-item> | 
				
			||||
        </el-form> | 
				
			||||
        <div slot="footer" class="dialog-footer"> | 
				
			||||
          <el-button type="text" @click="crud.cancelCU">取消</el-button> | 
				
			||||
          <el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button> | 
				
			||||
        </div> | 
				
			||||
      </el-dialog> | 
				
			||||
      <!--表格渲染--> | 
				
			||||
      <el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler"> | 
				
			||||
        <el-table-column type="selection" width="55" /> | 
				
			||||
        <el-table-column v-if="columns.visible('id')" prop="id" label="id" /> | 
				
			||||
        <el-table-column v-if="columns.visible('placeName')" prop="placeName" label="名称" /> | 
				
			||||
        <el-table-column v-if="columns.visible('mode')" prop="mode" label="模式" /> | 
				
			||||
        <el-table-column v-if="columns.visible('mapType')" prop="mapType" label="mapType" /> | 
				
			||||
        <el-table-column v-if="columns.visible('province')" prop="province" label="省份" /> | 
				
			||||
        <el-table-column v-if="columns.visible('realName')" prop="realName" label="真实姓名" /> | 
				
			||||
        <el-table-column v-if="columns.visible('riverName')" prop="riverName" label="流域" /> | 
				
			||||
        <el-table-column v-if="columns.visible('suitMonth')" prop="suitMonth" label="适宜月份" /> | 
				
			||||
        <el-table-column v-if="columns.visible('latitude')" prop="latitude" label="经纬度" /> | 
				
			||||
        <el-table-column v-if="columns.visible('longitude')" prop="longitude" label="经纬度" /> | 
				
			||||
        <el-table-column v-if="columns.visible('extend')" prop="extend" label="扩展信息" /> | 
				
			||||
        <el-table-column v-if="columns.visible('status')" prop="status" label="状态" /> | 
				
			||||
        <el-table-column v-if="columns.visible('createTime')" prop="createTime" label="时间"> | 
				
			||||
          <template slot-scope="scope"> | 
				
			||||
            <span>{{ parseTime(scope.row.createTime) }}</span> | 
				
			||||
          </template> | 
				
			||||
        </el-table-column> | 
				
			||||
        <el-table-column v-permission="['admin','fishPlace:edit','fishPlace:del']" label="操作" width="150px" align="center"> | 
				
			||||
          <template slot-scope="scope"> | 
				
			||||
            <udOperation | 
				
			||||
              :data="scope.row" | 
				
			||||
              :permission="permission" | 
				
			||||
            /> | 
				
			||||
          </template> | 
				
			||||
        </el-table-column> | 
				
			||||
      </el-table> | 
				
			||||
      <!--分页组件--> | 
				
			||||
      <pagination /> | 
				
			||||
    </div> | 
				
			||||
  </div> | 
				
			||||
</template> | 
				
			||||
 | 
				
			||||
<script> | 
				
			||||
import crudFishPlace from '@/api/bxg/fishPlace' | 
				
			||||
import CRUD, { presenter, header, form, crud } from '@crud/crud' | 
				
			||||
import rrOperation from '@crud/RR.operation' | 
				
			||||
import crudOperation from '@crud/CRUD.operation' | 
				
			||||
import udOperation from '@crud/UD.operation' | 
				
			||||
import pagination from '@crud/Pagination' | 
				
			||||
import MaterialList from "@/components/material"; | 
				
			||||
 | 
				
			||||
// crud交由presenter持有 | 
				
			||||
const defaultCrud = CRUD({ title: 'FishPlace', url: '/bxg/api/fishPlace', sort: 'id,desc', crudMethod: { ...crudFishPlace }}) | 
				
			||||
const defaultForm = { id: null, placeName: null, mode: null, mapType: null, province: null, realName: null, riverName: null, suitMonth: null, latitude: null, longitude: null, extend: null, status: null, createTime: null } | 
				
			||||
export default { | 
				
			||||
  name: 'FishPlace', | 
				
			||||
  components: { pagination, crudOperation, rrOperation, udOperation ,MaterialList}, | 
				
			||||
  mixins: [presenter(defaultCrud), header(), form(defaultForm), crud()], | 
				
			||||
  data() { | 
				
			||||
    return { | 
				
			||||
       | 
				
			||||
      permission: { | 
				
			||||
        add: ['admin', 'fishPlace:add'], | 
				
			||||
        edit: ['admin', 'fishPlace:edit'], | 
				
			||||
        del: ['admin', 'fishPlace:del'] | 
				
			||||
      }, | 
				
			||||
      rules: { | 
				
			||||
      }    } | 
				
			||||
  }, | 
				
			||||
  watch: { | 
				
			||||
  }, | 
				
			||||
  methods: { | 
				
			||||
    // 获取数据前设置好接口地址 | 
				
			||||
    [CRUD.HOOK.beforeRefresh]() { | 
				
			||||
      return true | 
				
			||||
    }, // 新增与编辑前做的操作 | 
				
			||||
    [CRUD.HOOK.afterToCU](crud, form) { | 
				
			||||
    }, | 
				
			||||
  } | 
				
			||||
} | 
				
			||||
 | 
				
			||||
 | 
				
			||||
 | 
				
			||||
</script> | 
				
			||||
 | 
				
			||||
<style scoped> | 
				
			||||
  .table-img { | 
				
			||||
    display: inline-block; | 
				
			||||
    text-align: center; | 
				
			||||
    background: #ccc; | 
				
			||||
    color: #fff; | 
				
			||||
    white-space: nowrap; | 
				
			||||
    position: relative; | 
				
			||||
    overflow: hidden; | 
				
			||||
    vertical-align: middle; | 
				
			||||
    width: 32px; | 
				
			||||
    height: 32px; | 
				
			||||
    line-height: 32px; | 
				
			||||
  } | 
				
			||||
</style> | 
				
			||||
@ -0,0 +1,131 @@
					 | 
				
			||||
<template> | 
				
			||||
  <div class="app-container"> | 
				
			||||
    <!--工具栏--> | 
				
			||||
    <div class="head-container"> | 
				
			||||
      <!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'--> | 
				
			||||
      <crudOperation :permission="permission" /> | 
				
			||||
      <!--表单组件--> | 
				
			||||
      <el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px"> | 
				
			||||
        <el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px"> | 
				
			||||
          <el-form-item label="id"> | 
				
			||||
            <el-input v-model="form.id" style="width: 370px;" /> | 
				
			||||
          </el-form-item> | 
				
			||||
          <el-form-item label="pid"> | 
				
			||||
            <el-input v-model="form.pid" style="width: 370px;" /> | 
				
			||||
          </el-form-item> | 
				
			||||
          <el-form-item label="type"> | 
				
			||||
            <el-input v-model="form.type" style="width: 370px;" /> | 
				
			||||
          </el-form-item> | 
				
			||||
          <el-form-item label="url"> | 
				
			||||
            <el-input v-model="form.url" style="width: 370px;" /> | 
				
			||||
          </el-form-item> | 
				
			||||
          <el-form-item label="putfishName"> | 
				
			||||
            <el-input v-model="form.putfishName" style="width: 370px;" /> | 
				
			||||
          </el-form-item> | 
				
			||||
          <el-form-item label="putfishNum"> | 
				
			||||
            <el-input v-model="form.putfishNum" style="width: 370px;" /> | 
				
			||||
          </el-form-item> | 
				
			||||
          <el-form-item label="putfishTime"> | 
				
			||||
            <el-input v-model="form.putfishTime" style="width: 370px;" /> | 
				
			||||
          </el-form-item> | 
				
			||||
          <el-form-item label="createTime"> | 
				
			||||
            <el-input v-model="form.createTime" style="width: 370px;" /> | 
				
			||||
          </el-form-item> | 
				
			||||
        </el-form> | 
				
			||||
        <div slot="footer" class="dialog-footer"> | 
				
			||||
          <el-button type="text" @click="crud.cancelCU">取消</el-button> | 
				
			||||
          <el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button> | 
				
			||||
        </div> | 
				
			||||
      </el-dialog> | 
				
			||||
      <!--表格渲染--> | 
				
			||||
      <el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler"> | 
				
			||||
        <el-table-column type="selection" width="55" /> | 
				
			||||
        <el-table-column v-if="columns.visible('id')" prop="id" label="id" /> | 
				
			||||
        <el-table-column v-if="columns.visible('pid')" prop="pid" label="pid" /> | 
				
			||||
        <el-table-column v-if="columns.visible('type')" prop="type" label="type" /> | 
				
			||||
        <el-table-column v-if="columns.visible('url')" prop="url" label="url" /> | 
				
			||||
        <el-table-column v-if="columns.visible('putfishName')" prop="putfishName" label="putfishName" /> | 
				
			||||
        <el-table-column v-if="columns.visible('putfishNum')" prop="putfishNum" label="putfishNum" /> | 
				
			||||
        <el-table-column v-if="columns.visible('putfishTime')" prop="putfishTime" label="putfishTime"> | 
				
			||||
          <template slot-scope="scope"> | 
				
			||||
            <span>{{ parseTime(scope.row.putfishTime) }}</span> | 
				
			||||
          </template> | 
				
			||||
        </el-table-column> | 
				
			||||
        <el-table-column v-if="columns.visible('createTime')" prop="createTime" label="createTime"> | 
				
			||||
          <template slot-scope="scope"> | 
				
			||||
            <span>{{ parseTime(scope.row.createTime) }}</span> | 
				
			||||
          </template> | 
				
			||||
        </el-table-column> | 
				
			||||
        <el-table-column v-permission="['admin','fishPush:edit','fishPush:del']" label="操作" width="150px" align="center"> | 
				
			||||
          <template slot-scope="scope"> | 
				
			||||
            <udOperation | 
				
			||||
              :data="scope.row" | 
				
			||||
              :permission="permission" | 
				
			||||
            /> | 
				
			||||
          </template> | 
				
			||||
        </el-table-column> | 
				
			||||
      </el-table> | 
				
			||||
      <!--分页组件--> | 
				
			||||
      <pagination /> | 
				
			||||
    </div> | 
				
			||||
  </div> | 
				
			||||
</template> | 
				
			||||
 | 
				
			||||
<script> | 
				
			||||
import crudFishPush from '@/api/bxg/fishPush' | 
				
			||||
import CRUD, { presenter, header, form, crud } from '@crud/crud' | 
				
			||||
import rrOperation from '@crud/RR.operation' | 
				
			||||
import crudOperation from '@crud/CRUD.operation' | 
				
			||||
import udOperation from '@crud/UD.operation' | 
				
			||||
import pagination from '@crud/Pagination' | 
				
			||||
import MaterialList from "@/components/material"; | 
				
			||||
 | 
				
			||||
// crud交由presenter持有 | 
				
			||||
const defaultCrud = CRUD({ title: 'FishPush', url: '/bxg/api/fishPush', sort: 'id,desc', crudMethod: { ...crudFishPush }}) | 
				
			||||
const defaultForm = { id: null, pid: null, type: null, url: null, putfishName: null, putfishNum: null, putfishTime: null, createTime: null } | 
				
			||||
export default { | 
				
			||||
  name: 'FishPush', | 
				
			||||
  components: { pagination, crudOperation, rrOperation, udOperation ,MaterialList}, | 
				
			||||
  mixins: [presenter(defaultCrud), header(), form(defaultForm), crud()], | 
				
			||||
  data() { | 
				
			||||
    return { | 
				
			||||
       | 
				
			||||
      permission: { | 
				
			||||
        add: ['admin', 'fishPush:add'], | 
				
			||||
        edit: ['admin', 'fishPush:edit'], | 
				
			||||
        del: ['admin', 'fishPush:del'] | 
				
			||||
      }, | 
				
			||||
      rules: { | 
				
			||||
      }    } | 
				
			||||
  }, | 
				
			||||
  watch: { | 
				
			||||
  }, | 
				
			||||
  methods: { | 
				
			||||
    // 获取数据前设置好接口地址 | 
				
			||||
    [CRUD.HOOK.beforeRefresh]() { | 
				
			||||
      return true | 
				
			||||
    }, // 新增与编辑前做的操作 | 
				
			||||
    [CRUD.HOOK.afterToCU](crud, form) { | 
				
			||||
    }, | 
				
			||||
  } | 
				
			||||
} | 
				
			||||
 | 
				
			||||
 | 
				
			||||
 | 
				
			||||
</script> | 
				
			||||
 | 
				
			||||
<style scoped> | 
				
			||||
  .table-img { | 
				
			||||
    display: inline-block; | 
				
			||||
    text-align: center; | 
				
			||||
    background: #ccc; | 
				
			||||
    color: #fff; | 
				
			||||
    white-space: nowrap; | 
				
			||||
    position: relative; | 
				
			||||
    overflow: hidden; | 
				
			||||
    vertical-align: middle; | 
				
			||||
    width: 32px; | 
				
			||||
    height: 32px; | 
				
			||||
    line-height: 32px; | 
				
			||||
  } | 
				
			||||
</style> | 
				
			||||
					Loading…
					
					
				
		Reference in new issue