|
|
@ -20,7 +20,7 @@
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
</ContentWrap>
|
|
|
|
</ContentWrap>
|
|
|
|
<el-card class="hl-table">
|
|
|
|
<el-card class="hl-table">
|
|
|
|
<el-table ref="matSubFormRef" :data="list" v-loading="formLoading" class="hl-table" @selection-change="handleSelectionChange" :row-key="getRowKeys" min-width="1800">
|
|
|
|
<el-table ref="multipleTable" :data="list" v-loading="formLoading" class="hl-table" @selection-change="handleSelectionChange" :row-key="getRowKeys" min-width="1800" @row-click="clickRow">
|
|
|
|
<el-table-column type="selection" width="55" :reserve-selection="true" :selectable="row=>chkboxEnable" />
|
|
|
|
<el-table-column type="selection" width="55" :reserve-selection="true" :selectable="row=>chkboxEnable" />
|
|
|
|
<!-- <el-table-column prop="no" label="序号" min-width="120" align="center" /> -->
|
|
|
|
<!-- <el-table-column prop="no" label="序号" min-width="120" align="center" /> -->
|
|
|
|
<el-table-column label="序号" type="index" min-width="120" align="center" />
|
|
|
|
<el-table-column label="序号" type="index" min-width="120" align="center" />
|
|
|
@ -48,6 +48,7 @@
|
|
|
|
import { ref } from 'vue'
|
|
|
|
import { ref } from 'vue'
|
|
|
|
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
|
|
|
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
|
|
|
import * as StorageLogApi from '@/api/heli/storagelog'
|
|
|
|
import * as StorageLogApi from '@/api/heli/storagelog'
|
|
|
|
|
|
|
|
import { ElTable } from 'element-plus'
|
|
|
|
|
|
|
|
|
|
|
|
//:selectable="row=>row.disabled || chkboxEnable"
|
|
|
|
//:selectable="row=>row.disabled || chkboxEnable"
|
|
|
|
const chkboxEnable = ref(true)
|
|
|
|
const chkboxEnable = ref(true)
|
|
|
@ -61,12 +62,22 @@ const dialogTitle = ref('') // 弹窗的标题
|
|
|
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
|
|
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
|
|
|
const list = ref([]) // 列表的数据
|
|
|
|
const list = ref([]) // 列表的数据
|
|
|
|
const total = ref(0) // 列表的总页数
|
|
|
|
const total = ref(0) // 列表的总页数
|
|
|
|
const multipleSelection = ref([])
|
|
|
|
|
|
|
|
const matSubFormRef = ref()
|
|
|
|
const matSubFormRef = ref()
|
|
|
|
|
|
|
|
|
|
|
|
const handleSelectionChange = async (val) => {
|
|
|
|
const multipleTable = ref<InstanceType<typeof ElTable>>()
|
|
|
|
|
|
|
|
const multipleSelection = ref([])
|
|
|
|
|
|
|
|
const handleSelectionChange = (val: []) => {
|
|
|
|
|
|
|
|
|
|
|
|
multipleSelection.value = val
|
|
|
|
multipleSelection.value = val
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const clickRow = (row: any) => {
|
|
|
|
|
|
|
|
if(row){
|
|
|
|
|
|
|
|
multipleTable.value!.toggleRowSelection(row, undefined)
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
multipleTable.value!.clearSelection()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
//指定key值,数据更新之后保留之前选中的数据
|
|
|
|
//指定key值,数据更新之后保留之前选中的数据
|
|
|
|
const getRowKeys = (row) => {
|
|
|
|
const getRowKeys = (row) => {
|
|
|
|
return row.matId
|
|
|
|
return row.matId
|
|
|
|