Browse Source

feat:[试验管理][饲养间管理]详情

lkf
HanLong 3 months ago
parent
commit
4b56571172
8 changed files with 224 additions and 15 deletions
  1. +20
    -0
      src/api/business/study/studyRoom.js
  2. +1
    -1
      src/lang/en/business/study/studyRoom.js
  3. +1
    -1
      src/lang/zh/business/study/studyRoom.js
  4. +12
    -2
      src/views/business/comps/common/JcgjList.vue
  5. +1
    -1
      src/views/business/study/comp/syff/Xz.vue
  6. +153
    -0
      src/views/business/study/comp/syj/Detail.vue
  7. +1
    -0
      src/views/business/study/comp/syj/Xz.vue
  8. +35
    -10
      src/views/business/study/comp/syjList.vue

+ 20
- 0
src/api/business/study/studyRoom.js View File

@ -27,6 +27,26 @@ export function studyRoom_list(query) {
})
}
// 饲养间详情
export function studyRoom_info(query) {
return request({
url: '/system/business/studyRoom/info',
method: 'get',
params: query
})
}
// 饲养间稽查轨迹列表
export function studyRoom_jcgjList(query) {
return request({
url: '/system/business/studyRoom/jcgjList',
method: 'get',
params: query
})
}
// 笼具更换记录列表
export function studyRoom_historyList(query) {
return request({

+ 1
- 1
src/lang/en/business/study/studyRoom.js View File

@ -1,7 +1,7 @@
export default {
qysyj: 'Start Usage',
xzqy: 'Start Usage',
xq: 'Detail',
syqy: 'Area',
syjh: 'Room ID',
dwzs: 'Species',

+ 1
- 1
src/lang/zh/business/study/studyRoom.js View File

@ -1,7 +1,7 @@
export default {
qysyj: '启用饲养间',
xzqy: '新增启用',
xq: '详情',
syqy: '试验区域',
syjh: '饲养间号',
dwzs: '动物种属',

+ 12
- 2
src/views/business/comps/common/JcgjList.vue View File

@ -8,8 +8,9 @@
<div class="jcgjList-jcgjlx">
<el-radio-group v-model="queryParams.jcgjlx" @change="handleQuery">
<el-radio-button :label="-1">{{ $t('page.business.study.study.qb') }}</el-radio-button>
<el-radio-button :label="1">{{ $t('page.business.study.study.lc') }}</el-radio-button>
<el-radio-button :label="1" v-if="showLc">{{ $t('page.business.study.study.lc') }}</el-radio-button>
<el-radio-button :label="3" v-if="showBj">{{ $t('page.business.study.study.bj') }}</el-radio-button>
<el-radio-button :label="3" v-if="showLj">{{ $t('page.business.study.studyRoom.ghlj') }}</el-radio-button>
<el-radio-button :label="5" v-if="showRy">{{ $t('page.business.study.study.ry') }}</el-radio-button>
<el-radio-button :label="7" v-if="showXg">{{ $t('page.business.study.study.xg') }}</el-radio-button>
</el-radio-group>
@ -62,10 +63,19 @@ export default {
type:Boolean,
default:false
},
showLc:{
type:Boolean,
default:true
},
showBj:{
type:Boolean,
default:true
},
//
showLj: {
type:Boolean,
default:false
},
},
data() {
return {
@ -103,7 +113,7 @@ export default {
item.jcnrList = []
item.jcnrListEn = []
}
// 135绿7
// 135绿7
if (item.jcmcys == 1) {
item.color = '#409EFF'
}

+ 1
- 1
src/views/business/study/comp/syff/Xz.vue View File

@ -135,7 +135,7 @@ export default {
},
show(study) {
this.reset()
this.form.studyId = study.studyId
this.form.studyId = study.id
this.form.studySubjectId = study.studySubjectId
this.open = true
},

+ 153
- 0
src/views/business/study/comp/syj/Detail.vue View File

@ -0,0 +1,153 @@
<template>
<!-- 详情 -->
<div v-show="open">
<div class="detail-container">
<div class="detail-top">
<div class="left-top">
<img src="@/assets/images/back.png" @click="cancel()" />
<div class="left-title"></div>
</div>
<div class="right-top">
</div>
</div>
<!-- <div class="detail-title"><img src="@/assets/images/detail-title.png" >{{ $t('page.business.study.study.mjyxq') }}<img src="@/assets/images/detail-title.png" /></div> -->
<div class="detail-content">
<div class="content-left">
<div class="content-title">
<div class="line"></div>
<div class="subtitle"> {{ $t('page.business.study.study.jbxx') }}</div>
</div>
<div class="pal">
<div class="left">
<div class="left-title">{{ $t('page.business.study.studyRoom.syjh') }}</div>
<el-input type="text" :value="form.syjh" maxlength="50" disabled />
</div>
<div class="right">
<div class="right-title">{{ $t('page.business.study.studyRoom.syqy') }}</div>
<el-input type="text" :value="form.syqy" maxlength="50" disabled />
</div>
</div>
<div class="pal">
<div class="left">
<div class="left-title">{{ $t('page.business.study.studyRoom.dwzs') }}</div>
<el-input type="text" :value="form.dwzs" maxlength="50" disabled />
</div>
<div class="right">
<div class="right-title">{{ $t('page.business.study.studyRoom.longju') }}</div>
<el-input type="text" :value="form.lj" maxlength="50" disabled />
</div>
</div>
<div class="pal">
<div class="left">
<div class="left-title">{{ $t('page.business.study.studyRoom.kssyyl') }}</div>
<el-input type="text" :value="form.kssyyl" maxlength="50" disabled />
</div>
<div class="right">
<div class="right-title">{{ $t('page.business.study.studyRoom.qyr') }}</div>
<el-input type="text" :value="form.qyrMc" maxlength="50" disabled />
</div>
</div>
<div class="pal">
<div class="left">
<div class="left-title">{{ $t('page.business.study.studyRoom.kssj') }}</div>
<el-input type="text" :value="form.createTime" maxlength="50" disabled />
</div>
<div class="right">
<div class="right-title">{{ $t('page.business.study.studyRoom.jssyyl') }}</div>
<el-input type="text" :value="form.jssyyl" maxlength="50" disabled />
</div>
</div>
<div class="pal">
<div class="left">
<div class="left-title">{{ $t('page.business.study.studyRoom.jsr') }}</div>
<el-input type="text" :value="form.jsrMc" maxlength="50" disabled />
</div>
<div class="right">
<div class="right-title">{{ $t('page.business.study.studyRoom.jssj') }}</div>
<el-input type="text" :value="form.jssj" maxlength="50" disabled />
</div>
</div>
<div class="pal">
<div class="left">
<div class="left-title">{{ $t('page.business.study.studyRoom.zt') }}</div>
<el-select v-model="form.zt" disabled style="width: 100%;">
<el-option key="1" :label="$t('page.business.study.studyRoom.syz')" :value="1" />
<el-option key="3" :label="$t('page.business.study.studyRoom.yjs')" :value="3" />
</el-select>
</div>
</div>
</div>
<div class="content-right">
<div class="content-title">
<div class="line"></div>
<div class="subtitle"> {{ $t('page.business.study.study.jcgj') }}</div>
</div>
<jcgjList ref="jcgjList" :showBj="false" :showLc="false" :showLj="true" @handleQuery="jcgjListHandleQuery" />
<pagination v-show="jcgjTotal > 0" :total="jcgjTotal" small layout="prev, pager, next"
:page.sync="queryJcgjParams.pageNum" :limit.sync="queryJcgjParams.pageSize" @pagination="getJjcgjList" />
</div>
</div>
</div>
</div>
</template>
<script>
import { studyRoom_info, studyRoom_jcgjList } from "@/api/business/study/studyRoom"
import JcgjList from "@/views/business/comps/common/JcgjList";
export default {
name: "StudyDetail",
components: { JcgjList },
data() {
return {
form: {},
open: false,
jcgjTotal: 0,
jcgjList: [],
queryJcgjParams: {
pageNum: 1,
studyId: null,
pageSize: 10,
}
}
},
created() {
},
methods: {
jcgjListHandleQuery(val) {
console.log(val)
this.queryJcgjParams.pageNum = 1
studyRoom_jcgjList(_.merge({}, this.queryJcgjParams, val)).then(response => {
this.jcgjList = response.rows
this.jcgjTotal = response.total
this.$refs.jcgjList.init(this.jcgjList)
})
},
getJjcgjList() {
studyRoom_jcgjList(this.queryJcgjParams).then(response => {
this.jcgjList = response.rows
this.jcgjTotal = response.total
this.$refs.jcgjList.init(this.jcgjList)
}).finally(() => {
})
},
cancel() {
this.$emit('close')
},
show(row) {
this.$modal.loading()
this.queryJcgjParams.studyRoomId = row.id
studyRoom_info({ id: row.id }).then(response => {
this.form = response.data
this.open = true
}).finally(() => {
this.$modal.closeLoading()
})
this.getJjcgjList()
}
}
}
</script>

+ 1
- 0
src/views/business/study/comp/syj/Xz.vue View File

@ -141,6 +141,7 @@ export default {
syjh: null,
dwzs: null,
lj: null,
studyId: null,
qmrmm: null,
kssyyl:'',
qmyy: '启用饲养间',

+ 35
- 10
src/views/business/study/comp/syjList.vue View File

@ -1,7 +1,7 @@
<!-- 饲养间列表 -->
<template>
<div>
<div class="tbbd-list">
<div class="tbbd-list" v-show="!showDetail">
<div class="tbbd-search">
<el-form :model="searchForm" ref="searchForm" class="search-area" :inline="true" label-width="88px">
<el-row>
@ -46,6 +46,8 @@
<el-col>
<el-button type="primary" icon="el-icon-plus" @click="add()" v-hasPermi="['business:studyRoom:add']">{{
$t('page.business.study.studyRoom.xzqy') }}</el-button>
<el-button type="primary" @click="handleExport()" v-hasPermi="['business:studyRoom:export']">{{
$t('form.export') }}</el-button>
</el-col>
</el-row>
@ -68,15 +70,19 @@
</el-table-column>
<el-table-column :label="$t('form.operate')" align="left" fixed="right" width="200">
<template slot-scope="scope">
<!-- 笼具记录 -->
<el-button type="text" @click="detail(scope.row)" v-hasPermi="['business:studyRoom:ljjl']">{{
$t('page.business.study.studyRoom.xq') }}</el-button>
<!-- 笼具记录 -->
<el-button type="text" @click="ljHistory(scope.row)" v-hasPermi="['business:studyRoom:ljjl']">{{
$t('page.business.study.studyRoom.ljjl') }}</el-button>
<!-- 更换笼具 -->
<el-button type="text" v-if="scope.row.zt === 1" @click="edit(scope.row)" v-hasPermi="['business:studyRoom:update']">{{
$t('page.business.study.studyRoom.ghlj') }}</el-button>
<el-button type="text" v-if="scope.row.zt === 1" @click="edit(scope.row)"
v-hasPermi="['business:studyRoom:update']">{{
$t('page.business.study.studyRoom.ghlj') }}</el-button>
<!-- 结束 -->
<el-button type="text" v-if="scope.row.zt === 1" @click="end(scope.row)" v-hasPermi="['business:studyRoom:js']">{{
$t('page.business.study.studyRoom.js') }}</el-button>
<el-button type="text" v-if="scope.row.zt === 1" @click="end(scope.row)"
v-hasPermi="['business:studyRoom:js']">{{
$t('page.business.study.studyRoom.js') }}</el-button>
</template>
</el-table-column>
</el-table>
@ -93,6 +99,8 @@
<Js key="Js" ref="Js" @callback="search" />
<!-- 笼具更换记录 -->
<Jl key="Jl" ref="Jl" @callback="search" />
<!-- 详情 -->
<Detail key="Detail" ref="Detail" @callback="search" @close="xqClose" v-show="showDetail"/>
</div>
</template>
@ -103,6 +111,7 @@ import Xz from "./syj/Xz";
import Bj from "./syj/Bj";
import Js from "./syj/Js";
import Jl from "./syj/Jl";
import Detail from "./syj/Detail";
import { mapGetters } from 'vuex'
import moment from "moment";
export default {
@ -134,11 +143,11 @@ export default {
deep: true
}
},
components: { Xz, Bj, Js, Jl },
components: { Xz, Bj, Js, Jl, Detail },
data() {
return {
showDetail: false,
daterange: [],
showFh: false,
daterange: [],
searchForm: {
pageNum: 1,
@ -184,7 +193,7 @@ export default {
})
},
add() {
this.$refs.Xz.show(this.study.studyId);
this.$refs.Xz.show(this.study.id);
},
edit(row) {
this.$refs.Bj.show(row)
@ -192,12 +201,28 @@ export default {
end(row) {
this.$refs.Js.show(row)
},
detail(row) {
ljHistory(row) {
this.$refs.Jl.show(row)
// this.showDetail = true
// this.$emit('showDetail', this.showDetail)
// this.$refs.Xq.show(row)
},
detail(row) {
this.showDetail = true
this.$emit('showDetail', this.showDetail)
this.$refs.Detail.show(row)
// this.showDetail = true
// this.$emit('showDetail', this.showDetail)
// this.$refs.Xq.show(row)
},
handleExport() {
},
xqClose() {
this.showDetail = false
this.$emit('showDetail', this.showDetail)
this.search()
},
}
}
</script>

Loading…
Cancel
Save