订单发货 项目编号弹框复选框 点击列表行选中

pull/4/head
qiuhongwu 8 months ago
parent 6190801297
commit c032b2bc60

@ -54,6 +54,8 @@
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
class="hl-table" class="hl-table"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
@row-click="clickRow" ref="multipleTable"
selection
> >
<el-table-column fixed type="selection" width="40"/> <el-table-column fixed type="selection" width="40"/>
<el-table-column fixed label="序号" type="index" width="60" /> <el-table-column fixed label="序号" type="index" width="60" />
@ -155,6 +157,7 @@ import { getIntDictOptions, getStrDictOptions, DICT_TYPE } from '@/utils/dict'
import { dateFormatter, dateFormatter2, formatDate } from '@/utils/formatTime' import { dateFormatter, dateFormatter2, formatDate } from '@/utils/formatTime'
import * as ProjectOrderApi from '@/api/heli/projectorder' import * as ProjectOrderApi from '@/api/heli/projectorder'
import {ref} from "vue"; import {ref} from "vue";
import { ElTable } from 'element-plus'
import {ProjectOrderVO} from "@/api/heli/projectorder"; import {ProjectOrderVO} from "@/api/heli/projectorder";
const message = useMessage() // const message = useMessage() //
@ -230,11 +233,20 @@ const resetQuery = () => {
handleQuery() handleQuery()
} }
const multipleSelection = ref<ProjectOrderVO[]>([]) const multipleTable = ref<InstanceType<typeof ElTable>>()
const handleSelectionChange = (val: ProjectOrderVO[]) => { 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()
}
}
/** 提交表单 */ /** 提交表单 */
const emit = defineEmits(['success']) // success const emit = defineEmits(['success']) // success
const submitForm = () => { const submitForm = () => {

Loading…
Cancel
Save