|
|
@@ -19,8 +19,12 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="创建日期">
|
|
|
<el-date-picker size="mini" style="width: 110px" v-model="CreateOnStart" type="date"
|
|
|
+ format="yyyy-MM-dd"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
placeholder="开始日期"></el-date-picker>
|
|
|
<el-date-picker size="mini" style="width: 110px" v-model="CreateOnEnd" type="date"
|
|
|
+ format="yyyy-MM-dd"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
placeholder="结束日期"></el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
@@ -194,8 +198,12 @@
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="采样日期">
|
|
|
<el-date-picker size="mini" style="width: 120px" v-model="SurveyDateStart" type="date"
|
|
|
+ format="yyyy-MM-dd"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
placeholder="开始日期"></el-date-picker>
|
|
|
<el-date-picker size="mini" style="width: 120px" v-model="SurveyDateEnd" type="date"
|
|
|
+ format="yyyy-MM-dd"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
placeholder="结束日期"></el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -479,33 +487,33 @@ export default {
|
|
|
_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]))
|
|
|
+ // _this.SurveyDate[1].setHours(23)
|
|
|
+ // _this.SurveyDate[1].setMinutes(59)
|
|
|
+ // _this.SurveyDate[1].setSeconds(59)
|
|
|
+ SurveyDate.push(_this.SurveyDate[0])
|
|
|
+ SurveyDate.push(_this.SurveyDate[1])
|
|
|
}
|
|
|
console.log('createon', _this.CreateOn)
|
|
|
let CreateOn = []
|
|
|
- if (_this.CreateOn != null) {
|
|
|
+ if (_this.CreateOn.length > 0) {
|
|
|
if (_this.CreateOn.length == 2) {
|
|
|
- _this.CreateOn[1].setHours(23)
|
|
|
- _this.CreateOn[1].setMinutes(59)
|
|
|
- _this.CreateOn[1].setSeconds(59)
|
|
|
- CreateOn.push(_this.formatDateTime(_this.CreateOn[0]))
|
|
|
- CreateOn.push(_this.formatDateTime(_this.CreateOn[1]))
|
|
|
+ CreateOn.push(_this.CreateOn[0])
|
|
|
+ CreateOn.push(_this.CreateOn[1])
|
|
|
}
|
|
|
- }
|
|
|
- if (store.get('samplestoredseach').CreateOn && store.get('samplestoredseach').CreateOn.length != 0) {
|
|
|
+ } else if (store.get('samplestoredseach').CreateOn && store.get('samplestoredseach').CreateOn.length != 0) {
|
|
|
console.log('createOnOnOn', store.get('samplestoredseach').CreateOn)
|
|
|
- let CreateOnTemp = store.get('samplestoredseach').CreateOn
|
|
|
+ let CreateOnTemp = store.get('samplestoredseach').CreateOn.split(',')
|
|
|
CreateOn.push(CreateOnTemp[0])
|
|
|
CreateOn.push(CreateOnTemp[1])
|
|
|
+ _this.CreateOnStart = CreateOnTemp[0]
|
|
|
+ _this.CreateOnEnd = CreateOnTemp[1]
|
|
|
}
|
|
|
if (store.get('samplestoredseach').SurveyDate && store.get('samplestoredseach').SurveyDate.length != 0) {
|
|
|
let SurveyDateTemp = store.get('samplestoredseach').SurveyDate
|
|
|
- CreateOn.push(SurveyDateTemp[0])
|
|
|
- CreateOn.push(SurveyDateTemp[1])
|
|
|
+ SurveyDate.push(SurveyDateTemp[0])
|
|
|
+ SurveyDate.push(SurveyDateTemp[1])
|
|
|
+ _this.SurveyDateStart = SurveyDateTemp[0]
|
|
|
+ _this.SurveyDateEnd = SurveyDateTemp[1]
|
|
|
}
|
|
|
console.log('size---', this.size)
|
|
|
console.log('currentPage---', this.currentPage)
|
|
|
@@ -517,15 +525,16 @@ export default {
|
|
|
}
|
|
|
// _this.searchform.CreateOn = _this.CreateOn
|
|
|
Object.assign(params, _this.searchform)
|
|
|
- let params1 = {
|
|
|
- CreateOn: _this.CreateOn
|
|
|
- }
|
|
|
- params = Object.assign(params, params1)
|
|
|
+ console.log('createOnOnOnONOn', _this.CreateOn)
|
|
|
+ console.log('createOnOnOnONOn', _this.SurveyDate)
|
|
|
+ CreateOn = _this.CreateOn[0] != null && _this.CreateOn[1] != null ? _this.CreateOn.join(',') : ''
|
|
|
+ SurveyDate = _this.SurveyDate[0] != null && _this.SurveyDate[1] != null ? _this.SurveyDate.join(',') : ''
|
|
|
+ params = Object.assign(params)
|
|
|
console.log('params', params)
|
|
|
store.set('samplestoredseach', params)
|
|
|
_this.getAllSearchTab()
|
|
|
- _this.$axios.get('/samplessource/animallist?SurveyDate=' + SurveyDate.join(',') + '&CreateOn=' +
|
|
|
- CreateOn.join(','), {
|
|
|
+ _this.$axios.get('/samplessource/animallist?SurveyDate=' + SurveyDate + '&CreateOn=' +
|
|
|
+ CreateOn, {
|
|
|
params
|
|
|
})
|
|
|
.then(res => {
|
|
|
@@ -631,7 +640,6 @@ export default {
|
|
|
// getSearchTemplate({ Type: 'sample' })
|
|
|
service.postRequest('dashoo.biobank.bee-0.1-jlw', 'SampleRelated', 'GetSearchTemplate', {type: 'SampleSource'})
|
|
|
.then(res => {
|
|
|
- console.log('res.data', res.data)
|
|
|
if (res.data && res.data.length > 0) {
|
|
|
_this.searchTemplates = res.data.map(function (e) {
|
|
|
e.Fields = JSON.parse(e.template)
|
|
|
@@ -736,7 +744,6 @@ export default {
|
|
|
this.CreateOn.push(this.CreateOnStart)
|
|
|
this.CreateOn.push(this.CreateOnEnd)
|
|
|
}
|
|
|
- console.log("CreateOn", this.CreateOn)
|
|
|
this.initdata()
|
|
|
},
|
|
|
searchCommand (command) {
|
|
|
@@ -980,8 +987,7 @@ export default {
|
|
|
params.currentPage = 0
|
|
|
params.size = 0
|
|
|
}
|
|
|
- const name = dateInfo + '样本来源关联样本.xlsx'
|
|
|
- service.downloadExcel('dashoo.biobank.bee-0.1-jlw', 'SampleRelated', 'ExportExcel', name, params)
|
|
|
+ service.downloadExcel('dashoo.biobank.bee-0.1-jlw', 'SampleRelated', 'ExportExcel', params)
|
|
|
},
|
|
|
jstimehandle (val) {
|
|
|
if (val === '') {
|
|
|
@@ -1027,6 +1033,9 @@ export default {
|
|
|
this.checkAll = true
|
|
|
}
|
|
|
}
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.tableData.doLayout()
|
|
|
+ })
|
|
|
},
|
|
|
handleCheckAllChange (val) {
|
|
|
for (var i = 0; i < this.showcolumn.length; i++) {
|