Merge branch 'feature-particulate-renpy' of http://git.hivekion.com:3000/xiaoguangbin/AnalysisSystemForRadionuclide_vue into feature-particulate-renpy
This commit is contained in:
commit
0d2d8c1018
|
@ -19,7 +19,6 @@
|
||||||
</a-table>
|
</a-table>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {cloneDeep} from 'lodash'
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
list: {
|
list: {
|
||||||
|
@ -47,34 +46,47 @@ export default {
|
||||||
selectedRowKeys: {
|
selectedRowKeys: {
|
||||||
type: Array
|
type: Array
|
||||||
},
|
},
|
||||||
|
selectionRows: {
|
||||||
|
type: Array
|
||||||
|
},
|
||||||
canSelect: {
|
canSelect: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true
|
||||||
|
},
|
||||||
|
multiple: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
innerSelectedRowKeys: cloneDeep(this.selectedRowKeys) || []
|
innerSelectedRowKeys: [],
|
||||||
|
innerSelectedRows: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 实现单击选中/反选功能
|
// 实现单击选中/反选功能
|
||||||
customRow(record) {
|
customRow(record) {
|
||||||
let _this = this
|
const key = record[this.rowKey]
|
||||||
return {
|
return {
|
||||||
class: _this.innerSelectedRowKeys.includes(record[_this.rowKey]) ? 'ant-table-row-selected' : '',
|
class: this.innerSelectedRowKeys.includes(key) ? 'ant-table-row-selected' : '',
|
||||||
on: {
|
on: {
|
||||||
click: () => {
|
click: () => {
|
||||||
if(!_this.canSelect) {
|
if(!this.canSelect) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (_this.innerSelectedRowKeys.includes(record[_this.rowKey])) {
|
if (this.innerSelectedRowKeys.includes(key)) {
|
||||||
_this.innerSelectedRowKeys = []
|
const findIndex = this.innerSelectedRowKeys.findIndex(k => k == key)
|
||||||
|
this.innerSelectedRowKeys.splice(findIndex, 1)
|
||||||
} else {
|
} else {
|
||||||
_this.innerSelectedRowKeys = [record[_this.rowKey]]
|
if(this.multiple) {
|
||||||
|
this.innerSelectedRowKeys.push(key)
|
||||||
}
|
}
|
||||||
_this.$emit('update:selectedRowKeys', _this.innerSelectedRowKeys)
|
else {
|
||||||
_this.$emit("detail",record)
|
this.innerSelectedRowKeys = [key]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.$emit("detail",record)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -84,8 +96,15 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
selectedRowKeys () {
|
selectedRowKeys (val) {
|
||||||
this.innerSelectedRowKeys = cloneDeep(this.selectedRowKeys)
|
this.innerSelectedRowKeys = val
|
||||||
|
},
|
||||||
|
innerSelectedRowKeys () {
|
||||||
|
this.$emit('update:selectedRowKeys', this.innerSelectedRowKeys)
|
||||||
|
this.innerSelectedRows = this.innerSelectedRowKeys.map((key) => {
|
||||||
|
return this.list.find(item => item[this.rowKey] === key)
|
||||||
|
})
|
||||||
|
this.$emit('update:selectionRows', this.innerSelectedRows)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
|
@ -73,6 +73,7 @@ export default {
|
||||||
getAction(url, params).then((res) => {
|
getAction(url, params).then((res) => {
|
||||||
if (res.code && res.code==500) {
|
if (res.code && res.code==500) {
|
||||||
_this.fileSrc = ""
|
_this.fileSrc = ""
|
||||||
|
this.$message.warning("This operation fails. Contact your system administrator")
|
||||||
} else {
|
} else {
|
||||||
const blob = new Blob([res], { type: 'text/plain' })
|
const blob = new Blob([res], { type: 'text/plain' })
|
||||||
_this.fileSrc = window.URL.createObjectURL(blob)
|
_this.fileSrc = window.URL.createObjectURL(blob)
|
||||||
|
|
|
@ -146,6 +146,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
searchQueryData() {
|
searchQueryData() {
|
||||||
|
this.loading = true
|
||||||
let days = compareDate(this.queryParam.startTime, this.queryParam.endTime)
|
let days = compareDate(this.queryParam.startTime, this.queryParam.endTime)
|
||||||
if (days <= 10) {
|
if (days <= 10) {
|
||||||
this.isImmediate = false
|
this.isImmediate = false
|
||||||
|
@ -155,6 +156,7 @@ export default {
|
||||||
pageSize: 10
|
pageSize: 10
|
||||||
}
|
}
|
||||||
getAction(this.url.list, params).then((res) => {
|
getAction(this.url.list, params).then((res) => {
|
||||||
|
this.loading = false
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.ipagination.current = res.result.current
|
this.ipagination.current = res.result.current
|
||||||
this.ipagination.pageSize = res.result.size
|
this.ipagination.pageSize = res.result.size
|
||||||
|
|
|
@ -135,6 +135,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
searchQueryData() {
|
searchQueryData() {
|
||||||
|
this.loading = true
|
||||||
let days = compareDate(this.queryParam.startTime, this.queryParam.endTime)
|
let days = compareDate(this.queryParam.startTime, this.queryParam.endTime)
|
||||||
if (days <= 10) {
|
if (days <= 10) {
|
||||||
this.isImmediate = false
|
this.isImmediate = false
|
||||||
|
@ -149,6 +150,7 @@ export default {
|
||||||
pageSize: 10
|
pageSize: 10
|
||||||
}
|
}
|
||||||
getAction(this.url.list, params).then((res) => {
|
getAction(this.url.list, params).then((res) => {
|
||||||
|
this.loading = false
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.ipagination.current = res.result.current
|
this.ipagination.current = res.result.current
|
||||||
this.ipagination.pageSize = res.result.size
|
this.ipagination.pageSize = res.result.size
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
:list="dataSource"
|
:list="dataSource"
|
||||||
:pagination="ipagination"
|
:pagination="ipagination"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
:canSelect="false"
|
|
||||||
@change="handleTableChange"
|
@change="handleTableChange"
|
||||||
@detail="handleDetail"
|
@detail="handleDetail"
|
||||||
>
|
>
|
||||||
|
@ -137,10 +136,12 @@ export default {
|
||||||
this.isFileDetail = flag
|
this.isFileDetail = flag
|
||||||
},
|
},
|
||||||
handleDetail(record) {
|
handleDetail(record) {
|
||||||
|
console.log(record);
|
||||||
this.currSampleId = record.sohId
|
this.currSampleId = record.sohId
|
||||||
this.isFileDetail = true
|
this.isFileDetail = true
|
||||||
},
|
},
|
||||||
searchQueryData() {
|
searchQueryData() {
|
||||||
|
this.loading = true
|
||||||
let days = compareDate(this.queryParam.startTime, this.queryParam.endTime)
|
let days = compareDate(this.queryParam.startTime, this.queryParam.endTime)
|
||||||
if (days <= 10) {
|
if (days <= 10) {
|
||||||
this.isImmediate = false
|
this.isImmediate = false
|
||||||
|
@ -155,6 +156,7 @@ export default {
|
||||||
pageSize: 10
|
pageSize: 10
|
||||||
}
|
}
|
||||||
getAction(this.url.list, params).then((res) => {
|
getAction(this.url.list, params).then((res) => {
|
||||||
|
this.loading = false
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.ipagination.current = res.result.current
|
this.ipagination.current = res.result.current
|
||||||
this.ipagination.pageSize = res.result.size
|
this.ipagination.pageSize = res.result.size
|
||||||
|
|
|
@ -73,7 +73,7 @@ const columns = [
|
||||||
]
|
]
|
||||||
import { compareDate } from "../../commom"
|
import { compareDate } from "../../commom"
|
||||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||||
import { getAction } from '../../../../api/manage'
|
import { getAction, getFileAction } from '../../../../api/manage'
|
||||||
import dateFormat from '../../../../components/jeecg/JEasyCron/format-date'
|
import dateFormat from '../../../../components/jeecg/JEasyCron/format-date'
|
||||||
import FileDetail from "../../fileDetail.vue"
|
import FileDetail from "../../fileDetail.vue"
|
||||||
export default {
|
export default {
|
||||||
|
@ -141,6 +141,7 @@ export default {
|
||||||
this.isFileDetail = true
|
this.isFileDetail = true
|
||||||
},
|
},
|
||||||
searchQueryData() {
|
searchQueryData() {
|
||||||
|
this.loading = true
|
||||||
let days = compareDate(this.queryParam.startTime, this.queryParam.endTime)
|
let days = compareDate(this.queryParam.startTime, this.queryParam.endTime)
|
||||||
if (days <= 10) {
|
if (days <= 10) {
|
||||||
this.isImmediate = false
|
this.isImmediate = false
|
||||||
|
@ -155,6 +156,7 @@ export default {
|
||||||
pageSize: 10
|
pageSize: 10
|
||||||
}
|
}
|
||||||
getAction(this.url.list, params).then((res) => {
|
getAction(this.url.list, params).then((res) => {
|
||||||
|
this.loading = false
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.ipagination.current = res.result.current
|
this.ipagination.current = res.result.current
|
||||||
this.ipagination.pageSize = res.result.size
|
this.ipagination.pageSize = res.result.size
|
||||||
|
|
|
@ -73,7 +73,7 @@ const columns = [
|
||||||
]
|
]
|
||||||
import { compareDate } from "../../commom"
|
import { compareDate } from "../../commom"
|
||||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||||
import { getAction } from '../../../../api/manage'
|
import { getAction, getFileAction } from '../../../../api/manage'
|
||||||
import dateFormat from '../../../../components/jeecg/JEasyCron/format-date'
|
import dateFormat from '../../../../components/jeecg/JEasyCron/format-date'
|
||||||
import FileDetail from "../../fileDetail.vue"
|
import FileDetail from "../../fileDetail.vue"
|
||||||
export default {
|
export default {
|
||||||
|
@ -141,6 +141,7 @@ export default {
|
||||||
this.isFileDetail = true
|
this.isFileDetail = true
|
||||||
},
|
},
|
||||||
searchQueryData() {
|
searchQueryData() {
|
||||||
|
this.loading = true
|
||||||
let days = compareDate(this.queryParam.startTime, this.queryParam.endTime)
|
let days = compareDate(this.queryParam.startTime, this.queryParam.endTime)
|
||||||
if (days <= 10) {
|
if (days <= 10) {
|
||||||
this.isImmediate = false
|
this.isImmediate = false
|
||||||
|
@ -155,6 +156,7 @@ export default {
|
||||||
pageSize: 10
|
pageSize: 10
|
||||||
}
|
}
|
||||||
getAction(this.url.list, params).then((res) => {
|
getAction(this.url.list, params).then((res) => {
|
||||||
|
this.loading = false
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.ipagination.current = res.result.current
|
this.ipagination.current = res.result.current
|
||||||
this.ipagination.pageSize = res.result.size
|
this.ipagination.pageSize = res.result.size
|
||||||
|
|
Loading…
Reference in New Issue
Block a user