diff --git a/public/conditions.json b/public/conditions.json index 82eb19d..b7629ed 100644 --- a/public/conditions.json +++ b/public/conditions.json @@ -2,29 +2,29 @@ "code": "200", "msg": "操作成功", "data": [ - { - "columnId": "1090", - "showType": "1", - "showName": "预计采购总费用", - "columnName": "planProcurementTotalMoney", - "columnType": "Double", - "fixedDownBoxValue": "" - }, - { - "columnId": "1092", - "showType": "3", - "showName": "采购类型", - "columnName": "procurementType", - "columnType": "String", - "fixedDownBoxValue": "{\"1\":{\"key\":\"1\",\"value\":\"新开园区集中采购\",\"column\":\"\",\"type\":\"1\"}}" - }, - { - "columnId": "1093", - "showType": "1", - "showName": "园区面积", - "columnName": "parkArea", - "columnType": "Double", - "fixedDownBoxValue": "" - } + // { + // "columnId": "1090", + // "showType": "1", + // "showName": "预计采购总费用", + // "columnName": "planProcurementTotalMoney", + // "columnType": "Double", + // "fixedDownBoxValue": "" + // }, + // { + // "columnId": "1092", + // "showType": "3", + // "showName": "采购类型", + // "columnName": "procurementType", + // "columnType": "String", + // "fixedDownBoxValue": "{\"1\":{\"key\":\"1\",\"value\":\"新开园区集中采购\",\"column\":\"\",\"type\":\"1\"}}" + // }, + // { + // "columnId": "1093", + // "showType": "1", + // "showName": "园区面积", + // "columnName": "parkArea", + // "columnType": "Double", + // "fixedDownBoxValue": "" + // } ] -} \ No newline at end of file +} diff --git a/public/conditions.json b/public/conditions.json index 82eb19d..b7629ed 100644 --- a/public/conditions.json +++ b/public/conditions.json @@ -2,29 +2,29 @@ "code": "200", "msg": "操作成功", "data": [ - { - "columnId": "1090", - "showType": "1", - "showName": "预计采购总费用", - "columnName": "planProcurementTotalMoney", - "columnType": "Double", - "fixedDownBoxValue": "" - }, - { - "columnId": "1092", - "showType": "3", - "showName": "采购类型", - "columnName": "procurementType", - "columnType": "String", - "fixedDownBoxValue": "{\"1\":{\"key\":\"1\",\"value\":\"新开园区集中采购\",\"column\":\"\",\"type\":\"1\"}}" - }, - { - "columnId": "1093", - "showType": "1", - "showName": "园区面积", - "columnName": "parkArea", - "columnType": "Double", - "fixedDownBoxValue": "" - } + // { + // "columnId": "1090", + // "showType": "1", + // "showName": "预计采购总费用", + // "columnName": "planProcurementTotalMoney", + // "columnType": "Double", + // "fixedDownBoxValue": "" + // }, + // { + // "columnId": "1092", + // "showType": "3", + // "showName": "采购类型", + // "columnName": "procurementType", + // "columnType": "String", + // "fixedDownBoxValue": "{\"1\":{\"key\":\"1\",\"value\":\"新开园区集中采购\",\"column\":\"\",\"type\":\"1\"}}" + // }, + // { + // "columnId": "1093", + // "showType": "1", + // "showName": "园区面积", + // "columnName": "parkArea", + // "columnType": "Double", + // "fixedDownBoxValue": "" + // } ] -} \ No newline at end of file +} diff --git a/src/assets/images/check_box.png b/src/assets/images/check_box.png new file mode 100644 index 0000000..fb89fe2 --- /dev/null +++ b/src/assets/images/check_box.png Binary files differ diff --git a/public/conditions.json b/public/conditions.json index 82eb19d..b7629ed 100644 --- a/public/conditions.json +++ b/public/conditions.json @@ -2,29 +2,29 @@ "code": "200", "msg": "操作成功", "data": [ - { - "columnId": "1090", - "showType": "1", - "showName": "预计采购总费用", - "columnName": "planProcurementTotalMoney", - "columnType": "Double", - "fixedDownBoxValue": "" - }, - { - "columnId": "1092", - "showType": "3", - "showName": "采购类型", - "columnName": "procurementType", - "columnType": "String", - "fixedDownBoxValue": "{\"1\":{\"key\":\"1\",\"value\":\"新开园区集中采购\",\"column\":\"\",\"type\":\"1\"}}" - }, - { - "columnId": "1093", - "showType": "1", - "showName": "园区面积", - "columnName": "parkArea", - "columnType": "Double", - "fixedDownBoxValue": "" - } + // { + // "columnId": "1090", + // "showType": "1", + // "showName": "预计采购总费用", + // "columnName": "planProcurementTotalMoney", + // "columnType": "Double", + // "fixedDownBoxValue": "" + // }, + // { + // "columnId": "1092", + // "showType": "3", + // "showName": "采购类型", + // "columnName": "procurementType", + // "columnType": "String", + // "fixedDownBoxValue": "{\"1\":{\"key\":\"1\",\"value\":\"新开园区集中采购\",\"column\":\"\",\"type\":\"1\"}}" + // }, + // { + // "columnId": "1093", + // "showType": "1", + // "showName": "园区面积", + // "columnName": "parkArea", + // "columnType": "Double", + // "fixedDownBoxValue": "" + // } ] -} \ No newline at end of file +} diff --git a/src/assets/images/check_box.png b/src/assets/images/check_box.png new file mode 100644 index 0000000..fb89fe2 --- /dev/null +++ b/src/assets/images/check_box.png Binary files differ diff --git a/src/components/dialog/selectRoleDialog.vue b/src/components/dialog/selectRoleDialog.vue index d76462c..38881f4 100644 --- a/src/components/dialog/selectRoleDialog.vue +++ b/src/components/dialog/selectRoleDialog.vue @@ -14,6 +14,11 @@ type: Array, default: () => [], }, + // 是否允许多选 + isMulti: { + type: Boolean, + default: true, + }, }) const emits = defineEmits(['update:visible', 'change']) @@ -101,6 +106,16 @@ function search() { fetchRoleData() } +// 多选框单选功能 +const selectClick = (selection: any, row: any) => { + if (!props.isMulti) { + console.log('selectClick') + if (selection.length > 1) { + const del_row = selection.shift() + table.value?.toggleRowSelection(del_row, false) // 用于多选表格,切换某一行的选中状态,如果使用了第二个参数,则是设置这一行选中与否(selected 为 true 则选中) + } + } +} onMounted(() => { search() }) @@ -115,7 +130,18 @@ - + [], }, + // 是否允许多选 + isMulti: { + type: Boolean, + default: true, + }, }) const emits = defineEmits(['update:visible', 'change']) @@ -101,6 +106,16 @@ function search() { fetchRoleData() } +// 多选框单选功能 +const selectClick = (selection: any, row: any) => { + if (!props.isMulti) { + console.log('selectClick') + if (selection.length > 1) { + const del_row = selection.shift() + table.value?.toggleRowSelection(del_row, false) // 用于多选表格,切换某一行的选中状态,如果使用了第二个参数,则是设置这一行选中与否(selected 为 true 则选中) + } + } +} onMounted(() => { search() }) @@ -115,7 +130,18 @@ - + {{ item.name }} - + diff --git a/public/conditions.json b/public/conditions.json index 82eb19d..b7629ed 100644 --- a/public/conditions.json +++ b/public/conditions.json @@ -2,29 +2,29 @@ "code": "200", "msg": "操作成功", "data": [ - { - "columnId": "1090", - "showType": "1", - "showName": "预计采购总费用", - "columnName": "planProcurementTotalMoney", - "columnType": "Double", - "fixedDownBoxValue": "" - }, - { - "columnId": "1092", - "showType": "3", - "showName": "采购类型", - "columnName": "procurementType", - "columnType": "String", - "fixedDownBoxValue": "{\"1\":{\"key\":\"1\",\"value\":\"新开园区集中采购\",\"column\":\"\",\"type\":\"1\"}}" - }, - { - "columnId": "1093", - "showType": "1", - "showName": "园区面积", - "columnName": "parkArea", - "columnType": "Double", - "fixedDownBoxValue": "" - } + // { + // "columnId": "1090", + // "showType": "1", + // "showName": "预计采购总费用", + // "columnName": "planProcurementTotalMoney", + // "columnType": "Double", + // "fixedDownBoxValue": "" + // }, + // { + // "columnId": "1092", + // "showType": "3", + // "showName": "采购类型", + // "columnName": "procurementType", + // "columnType": "String", + // "fixedDownBoxValue": "{\"1\":{\"key\":\"1\",\"value\":\"新开园区集中采购\",\"column\":\"\",\"type\":\"1\"}}" + // }, + // { + // "columnId": "1093", + // "showType": "1", + // "showName": "园区面积", + // "columnName": "parkArea", + // "columnType": "Double", + // "fixedDownBoxValue": "" + // } ] -} \ No newline at end of file +} diff --git a/src/assets/images/check_box.png b/src/assets/images/check_box.png new file mode 100644 index 0000000..fb89fe2 --- /dev/null +++ b/src/assets/images/check_box.png Binary files differ diff --git a/src/components/dialog/selectRoleDialog.vue b/src/components/dialog/selectRoleDialog.vue index d76462c..38881f4 100644 --- a/src/components/dialog/selectRoleDialog.vue +++ b/src/components/dialog/selectRoleDialog.vue @@ -14,6 +14,11 @@ type: Array, default: () => [], }, + // 是否允许多选 + isMulti: { + type: Boolean, + default: true, + }, }) const emits = defineEmits(['update:visible', 'change']) @@ -101,6 +106,16 @@ function search() { fetchRoleData() } +// 多选框单选功能 +const selectClick = (selection: any, row: any) => { + if (!props.isMulti) { + console.log('selectClick') + if (selection.length > 1) { + const del_row = selection.shift() + table.value?.toggleRowSelection(del_row, false) // 用于多选表格,切换某一行的选中状态,如果使用了第二个参数,则是设置这一行选中与否(selected 为 true 则选中) + } + } +} onMounted(() => { search() }) @@ -115,7 +130,18 @@ - + {{ item.name }} - + diff --git a/src/components/drawer/conditionDrawer.vue b/src/components/drawer/conditionDrawer.vue index bc3d84e..57c3a92 100644 --- a/src/components/drawer/conditionDrawer.vue +++ b/src/components/drawer/conditionDrawer.vue @@ -1,12 +1,12 @@