|
@@ -195,11 +195,11 @@
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
name: 'samplessource',
|
|
name: 'samplessource',
|
|
|
- data() {
|
|
|
|
|
|
|
+ data () {
|
|
|
return {
|
|
return {
|
|
|
filehost: '',
|
|
filehost: '',
|
|
|
importfileparam: {}, // 导入文件参数
|
|
importfileparam: {}, // 导入文件参数
|
|
|
- importfilepath: '', //导入文件路径
|
|
|
|
|
|
|
+ importfilepath: '', // 导入文件路径
|
|
|
importVisible: false, // 导入对话框
|
|
importVisible: false, // 导入对话框
|
|
|
importmsg: '未选择文件', // 导入文件
|
|
importmsg: '未选择文件', // 导入文件
|
|
|
dialogVisible: false,
|
|
dialogVisible: false,
|
|
@@ -218,7 +218,7 @@
|
|
|
Tive: '',
|
|
Tive: '',
|
|
|
remark: '',
|
|
remark: '',
|
|
|
starttime: null,
|
|
starttime: null,
|
|
|
- endtime: null,
|
|
|
|
|
|
|
+ endtime: null
|
|
|
},
|
|
},
|
|
|
SurveyDate: [], // 采样日期
|
|
SurveyDate: [], // 采样日期
|
|
|
CreateOn: [new Date(new Date().getTime() - 3 * 30 * 24 * 60 * 60 * 1000), new Date()],
|
|
CreateOn: [new Date(new Date().getTime() - 3 * 30 * 24 * 60 * 60 * 1000), new Date()],
|
|
@@ -226,7 +226,7 @@
|
|
|
currentPage: 1,
|
|
currentPage: 1,
|
|
|
size: 10,
|
|
size: 10,
|
|
|
donorsList: [],
|
|
donorsList: [],
|
|
|
- //列表排序
|
|
|
|
|
|
|
+ // 列表排序
|
|
|
Column: {
|
|
Column: {
|
|
|
Order: '',
|
|
Order: '',
|
|
|
Prop: ''
|
|
Prop: ''
|
|
@@ -234,10 +234,10 @@
|
|
|
acceptUsers: [],
|
|
acceptUsers: [],
|
|
|
userlist: [],
|
|
userlist: [],
|
|
|
genuslist: [],
|
|
genuslist: [],
|
|
|
- projectlist: [],
|
|
|
|
|
|
|
+ projectlist: []
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- created() {
|
|
|
|
|
|
|
+ created () {
|
|
|
if (this.$route.query.size && this.$route.query.currentPage) {
|
|
if (this.$route.query.size && this.$route.query.currentPage) {
|
|
|
this.size = parseInt(this.$route.query.size)
|
|
this.size = parseInt(this.$route.query.size)
|
|
|
this.currentPage = parseInt(this.$route.query.currentPage)
|
|
this.currentPage = parseInt(this.$route.query.currentPage)
|
|
@@ -251,7 +251,7 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- initdata() {
|
|
|
|
|
|
|
+ initdata () {
|
|
|
let _this = this
|
|
let _this = this
|
|
|
let SurveyDate = []
|
|
let SurveyDate = []
|
|
|
if (!_this.SurveyDate) {
|
|
if (!_this.SurveyDate) {
|
|
@@ -265,7 +265,8 @@
|
|
|
SurveyDate.push(_this.formatDateTime(_this.SurveyDate[1]))
|
|
SurveyDate.push(_this.formatDateTime(_this.SurveyDate[1]))
|
|
|
}
|
|
}
|
|
|
let CreateOn = []
|
|
let CreateOn = []
|
|
|
- if (_this.CreateOn.length == 2) {
|
|
|
|
|
|
|
+ console.log(_this.CreateOn, 'CreateOn')
|
|
|
|
|
+ if (_this.CreateOn != null && _this.CreateOn.length == 2) {
|
|
|
_this.CreateOn[1].setHours(23)
|
|
_this.CreateOn[1].setHours(23)
|
|
|
_this.CreateOn[1].setMinutes(59)
|
|
_this.CreateOn[1].setMinutes(59)
|
|
|
_this.CreateOn[1].setSeconds(59)
|
|
_this.CreateOn[1].setSeconds(59)
|
|
@@ -281,8 +282,8 @@
|
|
|
Object.assign(params, _this.searchform)
|
|
Object.assign(params, _this.searchform)
|
|
|
_this.$axios.get('/samplessource/animallist?SurveyDate=' + SurveyDate.join(',') + '&CreateOn=' +
|
|
_this.$axios.get('/samplessource/animallist?SurveyDate=' + SurveyDate.join(',') + '&CreateOn=' +
|
|
|
CreateOn.join(','), {
|
|
CreateOn.join(','), {
|
|
|
- params
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ params
|
|
|
|
|
+ })
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
_this.donorsList = res.data.items
|
|
_this.donorsList = res.data.items
|
|
|
_this.currentItemCount = res.data.currentItemCount
|
|
_this.currentItemCount = res.data.currentItemCount
|
|
@@ -291,11 +292,11 @@
|
|
|
console.error(err)
|
|
console.error(err)
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- getaddress(val) {
|
|
|
|
|
|
|
+ getaddress (val) {
|
|
|
let address = val.ProvinceName + val.CityName + val.StreetName + val.Address
|
|
let address = val.ProvinceName + val.CityName + val.StreetName + val.Address
|
|
|
return address
|
|
return address
|
|
|
},
|
|
},
|
|
|
- getAnimalGenus() {
|
|
|
|
|
|
|
+ getAnimalGenus () {
|
|
|
// 获取种属
|
|
// 获取种属
|
|
|
let _this = this
|
|
let _this = this
|
|
|
_this.$axios.get('/items/worditem?code=AnimalGenus', {})
|
|
_this.$axios.get('/items/worditem?code=AnimalGenus', {})
|
|
@@ -303,22 +304,22 @@
|
|
|
_this.genuslist = res.data
|
|
_this.genuslist = res.data
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- //获取项目属性
|
|
|
|
|
- getProjectlist() {
|
|
|
|
|
|
|
+ // 获取项目属性
|
|
|
|
|
+ getProjectlist () {
|
|
|
let _this = this
|
|
let _this = this
|
|
|
_this.$axios.get('/items/worditem?code=ProjectName', {})
|
|
_this.$axios.get('/items/worditem?code=ProjectName', {})
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
_this.projectlist = res.data
|
|
_this.projectlist = res.data
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- delSamplesSource(val) {
|
|
|
|
|
|
|
+ delSamplesSource (val) {
|
|
|
let _this = this
|
|
let _this = this
|
|
|
_this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
|
_this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
}).then(() => {
|
|
|
- _this.$axios.delete("samplessource/delbioinfo/" + val.Id + '?GenusId=' + val.GenusId, null)
|
|
|
|
|
|
|
+ _this.$axios.delete('samplessource/delbioinfo/' + val.Id + '?GenusId=' + val.GenusId, null)
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
// response
|
|
// response
|
|
|
if (res.data.code === 0) {
|
|
if (res.data.code === 0) {
|
|
@@ -338,8 +339,8 @@
|
|
|
.catch(() => {})
|
|
.catch(() => {})
|
|
|
}).catch(() => {})
|
|
}).catch(() => {})
|
|
|
},
|
|
},
|
|
|
- //导入蜜蜂样本来源
|
|
|
|
|
- importData() {
|
|
|
|
|
|
|
+ // 导入蜜蜂样本来源
|
|
|
|
|
+ importData () {
|
|
|
let _this = this
|
|
let _this = this
|
|
|
if (_this.importfilepath === '') {
|
|
if (_this.importfilepath === '') {
|
|
|
_this.$message({
|
|
_this.$message({
|
|
@@ -371,10 +372,10 @@
|
|
|
console.error(err)
|
|
console.error(err)
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- handleexportfileSuccess(res, file) {
|
|
|
|
|
|
|
+ handleexportfileSuccess (res, file) {
|
|
|
this.importfilepath = res
|
|
this.importfilepath = res
|
|
|
},
|
|
},
|
|
|
- beforeexportfileUpload(file) {
|
|
|
|
|
|
|
+ beforeexportfileUpload (file) {
|
|
|
let i = file.name.lastIndexOf('.')
|
|
let i = file.name.lastIndexOf('.')
|
|
|
let typename = ''
|
|
let typename = ''
|
|
|
if (i > -1) {
|
|
if (i > -1) {
|
|
@@ -394,8 +395,8 @@
|
|
|
return true
|
|
return true
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- //列表排序功能
|
|
|
|
|
- orderby(column) {
|
|
|
|
|
|
|
+ // 列表排序功能
|
|
|
|
|
+ orderby (column) {
|
|
|
if (column.order == 'ascending') {
|
|
if (column.order == 'ascending') {
|
|
|
this.Column.Order = 'asc'
|
|
this.Column.Order = 'asc'
|
|
|
} else if (column.order == 'descending') {
|
|
} else if (column.order == 'descending') {
|
|
@@ -404,18 +405,18 @@
|
|
|
this.Column.Prop = column.prop
|
|
this.Column.Prop = column.prop
|
|
|
this.initdata()
|
|
this.initdata()
|
|
|
},
|
|
},
|
|
|
- seachdata() {
|
|
|
|
|
|
|
+ seachdata () {
|
|
|
this.currentPage = 1
|
|
this.currentPage = 1
|
|
|
this.initdata()
|
|
this.initdata()
|
|
|
},
|
|
},
|
|
|
- searchCommand(command) {
|
|
|
|
|
|
|
+ searchCommand (command) {
|
|
|
if (command == 'search') {
|
|
if (command == 'search') {
|
|
|
this.dialogVisible = true
|
|
this.dialogVisible = true
|
|
|
} else if (command == 'clear') {
|
|
} else if (command == 'clear') {
|
|
|
this.clearSearch()
|
|
this.clearSearch()
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- clearSearch() {
|
|
|
|
|
|
|
+ clearSearch () {
|
|
|
this.searchform.GenusId = ''
|
|
this.searchform.GenusId = ''
|
|
|
this.searchform.Genus = ''
|
|
this.searchform.Genus = ''
|
|
|
this.searchform.Address = ''
|
|
this.searchform.Address = ''
|
|
@@ -429,27 +430,27 @@
|
|
|
this.CreateOn = []
|
|
this.CreateOn = []
|
|
|
this.initdata()
|
|
this.initdata()
|
|
|
},
|
|
},
|
|
|
- handleSizeChange(value) {
|
|
|
|
|
|
|
+ handleSizeChange (value) {
|
|
|
this.size = value
|
|
this.size = value
|
|
|
this.currentPage = 1
|
|
this.currentPage = 1
|
|
|
this.initdata()
|
|
this.initdata()
|
|
|
},
|
|
},
|
|
|
- handleCurrentChange(value) {
|
|
|
|
|
|
|
+ handleCurrentChange (value) {
|
|
|
this.currentPage = value
|
|
this.currentPage = value
|
|
|
this.initdata()
|
|
this.initdata()
|
|
|
},
|
|
},
|
|
|
- formatDateTime(date) {
|
|
|
|
|
- var y = date.getFullYear();
|
|
|
|
|
- var m = date.getMonth() + 1;
|
|
|
|
|
- m = m < 10 ? ('0' + m) : m;
|
|
|
|
|
- var d = date.getDate();
|
|
|
|
|
- d = d < 10 ? ('0' + d) : d;
|
|
|
|
|
- var h = date.getHours();
|
|
|
|
|
- var minute = date.getMinutes();
|
|
|
|
|
- minute = minute < 10 ? ('0' + minute) : minute;
|
|
|
|
|
- return y + '-' + m + '-' + d + ' ' + h + ':' + minute;
|
|
|
|
|
|
|
+ formatDateTime (date) {
|
|
|
|
|
+ var y = date.getFullYear()
|
|
|
|
|
+ var m = date.getMonth() + 1
|
|
|
|
|
+ m = m < 10 ? ('0' + m) : m
|
|
|
|
|
+ var d = date.getDate()
|
|
|
|
|
+ d = d < 10 ? ('0' + d) : d
|
|
|
|
|
+ var h = date.getHours()
|
|
|
|
|
+ var minute = date.getMinutes()
|
|
|
|
|
+ minute = minute < 10 ? ('0' + minute) : minute
|
|
|
|
|
+ return y + '-' + m + '-' + d + ' ' + h + ':' + minute
|
|
|
},
|
|
},
|
|
|
- jstimehandle(val) {
|
|
|
|
|
|
|
+ jstimehandle (val) {
|
|
|
if (val === '') {
|
|
if (val === '') {
|
|
|
return '----'
|
|
return '----'
|
|
|
} else if (val === '0001-01-01T08:00:00+08:00') {
|
|
} else if (val === '0001-01-01T08:00:00+08:00') {
|
|
@@ -463,7 +464,6 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
<style lang="scss">
|