|
|
@@ -21,6 +21,10 @@
|
|
|
<el-form-item label="来源内码">
|
|
|
<el-input size="mini" style="width: 165px;" v-model="searchform.InnerNo" placeholder="请输入来源内码"></el-input>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="采样日期">
|
|
|
+ <el-date-picker size="mini" style="width: 220px" v-model="SurveyDate" type="daterange" range-separator="至"
|
|
|
+ start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-dropdown split-button type="primary" size="mini" @click="seachdata" @command="searchCommand">
|
|
|
查询
|
|
|
@@ -50,16 +54,24 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="Name" sortable min-width="80" label="样本源名称" align="center" show-overflow-tooltip>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="Genus" sortable min-width="80" label="种属" align="center" show-overflow-tooltip>
|
|
|
+ <el-table-column prop="Genus" sortable min-width="80" label="蜂种" align="center" show-overflow-tooltip>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="InnerNo" sortable align="center" label="来源内码" min-width="120" show-overflow-tooltip>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="InnerNo" sortable align="center" label="来源内码" min-width="90" show-overflow-tooltip>
|
|
|
+ <el-table-column prop="AddressLine" sortable align="center" label="取样地区" min-width="150" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <p>{{getaddress(scope.row)}}</p>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="Amount" sortable label="数量" align="center" show-overflow-tooltip min-width="60">
|
|
|
<template slot-scope="scope">
|
|
|
<p>{{scope.row.Amount}} {{scope.row.Unit}}</p>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="SourceType" sortable label="来源" align="center" show-overflow-tooltip min-width="60">
|
|
|
+ <el-table-column prop="SurveyDate" sortable align="center" label="采样日期" min-width="80" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <p>{{jstimehandle(scope.row.SurveyDate)}}</p>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
|
|
|
@@ -78,9 +90,9 @@
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="来源内码">
|
|
|
- <el-input size="mini" v-model="searchform.InnerNo" style="width:100%" placeholder="请输入来源编码"></el-input>
|
|
|
+ <el-input size="mini" v-model="searchform.InnerNo" style="width:100%" placeholder="请输入来源内码"></el-input>
|
|
|
</el-form-item>
|
|
|
- </el-col>
|
|
|
+ </el-col>
|
|
|
<!-- <el-col :span="12">
|
|
|
<el-form-item label="阴阳性">
|
|
|
<el-select size="mini" v-model="searchform.Tive" style="width:100%" placeholder="请选择阴性阳性">
|
|
|
@@ -90,18 +102,39 @@
|
|
|
</el-form-item>
|
|
|
</el-col> -->
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="蜂种名称">
|
|
|
- <el-select ref="reftube" v-model="searchform.Genus" placeholder="请选择蜂种名称" style="width:100%" size="mini" filterable>
|
|
|
- <el-option v-for="item in genuslist" :label="item.Value" :value="item.Value" :key="item.Key">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
+ <el-form-item label="蜂种">
|
|
|
+ <el-select ref="reftube" v-model="searchform.Genus" placeholder="请选择蜂种" style="width:100%" size="mini"
|
|
|
+ filterable>
|
|
|
+ <el-option v-for="item in genuslist" :label="item.Value" :value="item.Value" :key="item.Key">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="取样地区">
|
|
|
+ <el-input size="mini" v-model="searchform.Address" style="width:100%" placeholder="请输入取样地区"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="采样日期">
|
|
|
+ <el-date-picker size="mini" style="width: 240px" v-model="SurveyDate" type="daterange" range-separator="至"
|
|
|
+ start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
+ <el-form-item label="样本来源">
|
|
|
+ <el-select ref="refplace" v-model="searchform.SourceType" size="mini" style="width: 240px"
|
|
|
+ placeholder="请选择样本来源">
|
|
|
+ <el-option label="收捕" value="收捕"></el-option>
|
|
|
+ <el-option label="购买" value="购买"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <!-- <el-col :span="12">
|
|
|
<el-form-item label="数量">
|
|
|
- <el-input size="mini" v-model="searchform.Amount" style="width:100%" placeholder="请输入样本来源"></el-input>
|
|
|
+ <el-input size="mini" v-model="searchform.Amount" style="width:100%" placeholder="请输入数量(群)"></el-input>
|
|
|
</el-form-item>
|
|
|
- </el-col>
|
|
|
+ </el-col> -->
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
@@ -130,6 +163,7 @@
|
|
|
searchform: {
|
|
|
GenusId: '',
|
|
|
Genus: '',
|
|
|
+ Address: '',
|
|
|
InnerNo: '',
|
|
|
Name: '',
|
|
|
Weight: '',
|
|
|
@@ -139,6 +173,7 @@
|
|
|
starttime: null,
|
|
|
endtime: null,
|
|
|
},
|
|
|
+ SurveyDate: [new Date(new Date().getTime() - 3 * 30 * 24 * 60 * 60 * 1000), new Date()], // 采样日期
|
|
|
currentItemCount: 0,
|
|
|
currentPage: 1,
|
|
|
size: 10,
|
|
|
@@ -170,7 +205,18 @@
|
|
|
methods: {
|
|
|
initdata() {
|
|
|
let _this = this
|
|
|
- // paginate
|
|
|
+ let SurveyDate = []
|
|
|
+ if (!_this.SurveyDate) {
|
|
|
+ _this.SurveyDate = []
|
|
|
+ }
|
|
|
+ // 解析时间
|
|
|
+ if (_this.SurveyDate.length == 2) {
|
|
|
+ _this.SurveyDate[1].setHours(23)
|
|
|
+ _this.SurveyDate[1].setMinutes(59)
|
|
|
+ _this.SurveyDate[1].setSeconds(59)
|
|
|
+ SurveyDate.push(_this.formatDateTime(_this.SurveyDate[0]))
|
|
|
+ SurveyDate.push(_this.formatDateTime(_this.SurveyDate[1]))
|
|
|
+ }
|
|
|
const params = {
|
|
|
_currentPage: this.currentPage,
|
|
|
_size: this.size,
|
|
|
@@ -178,7 +224,7 @@
|
|
|
Prop: this.Column.Prop
|
|
|
}
|
|
|
Object.assign(params, _this.searchform)
|
|
|
- _this.$axios.get('/samplessource/animallist', {
|
|
|
+ _this.$axios.get('/samplessource/animallist?SurveyDate=' + SurveyDate.join(','), {
|
|
|
params
|
|
|
})
|
|
|
.then(res => {
|
|
|
@@ -186,10 +232,13 @@
|
|
|
_this.currentItemCount = res.data.currentItemCount
|
|
|
})
|
|
|
.catch(err => {
|
|
|
- // handle error
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
+ getaddress(val) {
|
|
|
+ let address = val.ProvinceName + val.CityName + val.StreetName + val.Address
|
|
|
+ return address
|
|
|
+ },
|
|
|
getAnimalGenus() {
|
|
|
// 获取种属
|
|
|
let _this = this
|
|
|
@@ -247,11 +296,13 @@
|
|
|
}
|
|
|
},
|
|
|
clearSearch() {
|
|
|
+ this.searchform.GenusId = ''
|
|
|
this.searchform.Genus = ''
|
|
|
- this.searchform.Weight = ''
|
|
|
+ this.searchform.Address = ''
|
|
|
+ this.searchform.InnerNo = ''
|
|
|
this.searchform.SourceType = ''
|
|
|
this.searchform.Name = ''
|
|
|
- this.searchform.InnerNo = ''
|
|
|
+ this.SurveyDate = []
|
|
|
this.initdata()
|
|
|
},
|
|
|
handleSizeChange(value) {
|
|
|
@@ -273,6 +324,18 @@
|
|
|
var minute = date.getMinutes();
|
|
|
minute = minute < 10 ? ('0' + minute) : minute;
|
|
|
return y + '-' + m + '-' + d + ' ' + h + ':' + minute;
|
|
|
+ },
|
|
|
+ jstimehandle(val) {
|
|
|
+ if (val === '') {
|
|
|
+ return '----'
|
|
|
+ } else if (val === '0001-01-01T08:00:00+08:00') {
|
|
|
+ return '----'
|
|
|
+ } else if (val === '5000-01-01T23:59:59+08:00') {
|
|
|
+ return '永久'
|
|
|
+ } else {
|
|
|
+ val = val.replace('T', ' ')
|
|
|
+ return val.substring(0, 10)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|