👍 新增渔场
This commit is contained in:
@@ -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>
|
||||||
@@ -154,7 +154,7 @@
|
|||||||
@click="doSubmit"
|
@click="doSubmit"
|
||||||
>保存</el-button>
|
>保存</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="78px">
|
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="178px">
|
||||||
<el-form-item label="作者名称" prop="author">
|
<el-form-item label="作者名称" prop="author">
|
||||||
<el-input v-model="form.author" style="width: 40%" />
|
<el-input v-model="form.author" style="width: 40%" />
|
||||||
<span style="color: #C0C0C0;margin-left: 10px;">类上面的作者名称</span>
|
<span style="color: #C0C0C0;margin-left: 10px;">类上面的作者名称</span>
|
||||||
@@ -241,9 +241,10 @@ export default {
|
|||||||
this.form = data
|
this.form = data
|
||||||
this.form.cover = this.form.cover.toString()
|
this.form.cover = this.form.cover.toString()
|
||||||
})
|
})
|
||||||
getDicts().then(data => {
|
// 这个不能搜索全部字典
|
||||||
this.dicts = data
|
// getDicts().then(data => {
|
||||||
})
|
// this.dicts = data
|
||||||
|
// })
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
+8
-14
@@ -17,7 +17,7 @@
|
|||||||
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="code" v-if="captchaEnable">
|
<el-form-item prop="code" v-if="captchaEnable" v-show="isprod">
|
||||||
<el-input v-model="loginForm.code" auto-complete="off" placeholder="验证码" style="width: 63%" @keyup.enter.native="handleLogin">
|
<el-input v-model="loginForm.code" auto-complete="off" placeholder="验证码" style="width: 63%" @keyup.enter.native="handleLogin">
|
||||||
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
||||||
</el-input>
|
</el-input>
|
||||||
@@ -60,25 +60,18 @@ import { getTenantEnable } from "@/utils/ruoyi";
|
|||||||
export default {
|
export default {
|
||||||
name: "Login",
|
name: "Login",
|
||||||
data() {
|
data() {
|
||||||
|
|
||||||
// username: "admin",
|
|
||||||
// password: "admin123",
|
|
||||||
// rememberMe: false,
|
|
||||||
// code: "",
|
|
||||||
// uuid: "",
|
|
||||||
// tenantName: "芋道源码",
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
isprod: process.env.NODE_ENV === 'production',
|
||||||
codeUrl: "",
|
codeUrl: "",
|
||||||
captchaEnable: true,
|
captchaEnable: true,
|
||||||
tenantEnable: true,
|
tenantEnable: true,
|
||||||
loginForm: {
|
loginForm: {
|
||||||
username: "",
|
username: "admin",
|
||||||
password: "",
|
password: "admin",
|
||||||
rememberMe: false,
|
rememberMe: false,
|
||||||
code: "",
|
code: "",
|
||||||
uuid: "",
|
uuid: "",
|
||||||
tenantName: "",
|
tenantName: "回乡信息",
|
||||||
},
|
},
|
||||||
loginRules: {
|
loginRules: {
|
||||||
username: [
|
username: [
|
||||||
@@ -87,7 +80,7 @@ export default {
|
|||||||
password: [
|
password: [
|
||||||
{ required: true, trigger: "blur", message: "密码不能为空" }
|
{ required: true, trigger: "blur", message: "密码不能为空" }
|
||||||
],
|
],
|
||||||
code: [{ required: true, trigger: "change", message: "验证码不能为空" }],
|
code: [{ required: this.isprod, trigger: "change", message: "验证码不能为空" }],
|
||||||
tenantName: [
|
tenantName: [
|
||||||
{ required: true, trigger: "blur", message: "租户不能为空" },
|
{ required: true, trigger: "blur", message: "租户不能为空" },
|
||||||
{
|
{
|
||||||
@@ -209,7 +202,8 @@ export default {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-image: url("");
|
// background-image: url("");
|
||||||
|
background-color: dodgerblue;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
}
|
}
|
||||||
.title {
|
.title {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<doc-alert title="功能权限" url="https://doc.iocoder.cn/resource-permission" />
|
<!-- <doc-alert title="功能权限" url="https://doc.iocoder.cn/resource-permission" /> -->
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
|
||||||
<el-form-item label="菜单名称" prop="name">
|
<el-form-item label="菜单名称" prop="name">
|
||||||
<el-input v-model="queryParams.name" placeholder="请输入菜单名称" clearable @keyup.enter.native="handleQuery"/>
|
<el-input v-model="queryParams.name" placeholder="请输入菜单名称" clearable @keyup.enter.native="handleQuery"/>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<doc-alert title="功能权限" url="https://doc.iocoder.cn/resource-permission" />
|
<!-- <doc-alert title="功能权限" url="https://doc.iocoder.cn/resource-permission" /> -->
|
||||||
<doc-alert title="数据权限" url="https://doc.iocoder.cn/data-permission" />
|
<doc-alert title="数据权限" url="https://doc.iocoder.cn/data-permission" />
|
||||||
<el-form :model="queryParams" ref="queryForm" v-show="showSearch" :inline="true">
|
<el-form :model="queryParams" ref="queryForm" v-show="showSearch" :inline="true">
|
||||||
<el-form-item label="角色名称" prop="name">
|
<el-form-item label="角色名称" prop="name">
|
||||||
|
|||||||
+1
-1
@@ -10,7 +10,7 @@ const CompressionPlugin = require('compression-webpack-plugin')
|
|||||||
|
|
||||||
const name = process.env.VUE_APP_TITLE || '眼界甄选' // 网页标题
|
const name = process.env.VUE_APP_TITLE || '眼界甄选' // 网页标题
|
||||||
|
|
||||||
const port = process.env.port || process.env.npm_config_port || 80 // 端口
|
const port = process.env.port || process.env.npm_config_port || 8080 // 端口
|
||||||
|
|
||||||
// vue.config.js 配置说明
|
// vue.config.js 配置说明
|
||||||
//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
|
//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
|
||||||
|
|||||||
Reference in New Issue
Block a user