From a5822ca276f2d33d9151e23c3d916467857eeeee Mon Sep 17 00:00:00 2001
From: wenhua <1084668738@qq.com>
Date: Sat, 11 May 2024 00:14:03 +0800
Subject: [PATCH 1/6] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E6=9D=83=E9=99=90?=
=?UTF-8?q?=E6=8C=89=E9=92=AEbug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/directives/permission.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/directives/permission.js b/src/directives/permission.js
index 65ea03a..e68fcc8 100644
--- a/src/directives/permission.js
+++ b/src/directives/permission.js
@@ -8,7 +8,7 @@ export const hasPerm = (el, binding, vnode) => {
if (value && value instanceof Array && value.length > 0) {
const permissiosFlag = value
const hasPermission = permisstions.some(permission => {
- return allPermission === permission || permissiosFlag.includes(permission)
+ return permissiosFlag[0] === allPermission || permissiosFlag[0] === permission
})
if (!hasPermission) {
el.parentNode && el.parentNode.removeChild(el)
From 3ba7845893295f84813f97c41ca0d4017bb26b01 Mon Sep 17 00:00:00 2001
From: wenhua <1084668738@qq.com>
Date: Sat, 11 May 2024 00:14:25 +0800
Subject: [PATCH 2/6] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E9=9C=80?=
=?UTF-8?q?=E6=B1=82=E4=B8=8A=E6=8A=A5=E9=83=A8=E5=88=86=E9=A1=B5=E9=9D=A2?=
=?UTF-8?q?=E5=86=85=E5=AE=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/projectdemand/demandsummary/add.vue | 168 ++++++++++++++++++
.../projectdemand/demandsummary/index.vue | 53 +++++-
2 files changed, 214 insertions(+), 7 deletions(-)
create mode 100644 src/views/projectdemand/demandsummary/add.vue
diff --git a/src/views/projectdemand/demandsummary/add.vue b/src/views/projectdemand/demandsummary/add.vue
new file mode 100644
index 0000000..b806bde
--- /dev/null
+++ b/src/views/projectdemand/demandsummary/add.vue
@@ -0,0 +1,168 @@
+
+
+
+ 存为草稿
+ 发布
+
+
+
+
\ No newline at end of file
diff --git a/src/views/projectdemand/demandsummary/index.vue b/src/views/projectdemand/demandsummary/index.vue
index f43b74c..be505a6 100644
--- a/src/views/projectdemand/demandsummary/index.vue
+++ b/src/views/projectdemand/demandsummary/index.vue
@@ -1,21 +1,28 @@
-
-
+
+
\ No newline at end of file
From bdc9c244a4d96dfdbc2f14947348da209cceccf4 Mon Sep 17 00:00:00 2001
From: lilinyuan <1084668738@qq.com>
Date: Mon, 13 May 2024 22:22:55 +0800
Subject: [PATCH 4/6] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E7=BB=84?=
=?UTF-8?q?=E4=BB=B6=E5=88=97=E5=B1=95=E7=A4=BA=E9=85=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/fvcomponents/fvTable/index.vue | 143 +++++++++++++++++++++++++----
1 file changed, 124 insertions(+), 19 deletions(-)
diff --git a/src/fvcomponents/fvTable/index.vue b/src/fvcomponents/fvTable/index.vue
index 1b42ff2..c90af06 100644
--- a/src/fvcomponents/fvTable/index.vue
+++ b/src/fvcomponents/fvTable/index.vue
@@ -2,15 +2,48 @@
-
- {{ btn.name }}
-
+
+
+ {{ btn.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -30,7 +63,7 @@
ref="tableInstance"
>
-
+
@@ -80,10 +113,17 @@ const props = defineProps({
pagination: {
type: Boolean,
default: true
+ },
+ // 是否显示列配置
+ isSettingCol: {
+ type: Boolean,
+ default: true
}
})
const tableInstance = ref()
+const buttonRef = ref()
+const popoverRef = ref()
const localData = reactive({
list: [], // 表格数据
@@ -92,7 +132,12 @@ const localData = reactive({
pageNum: 1
},
total: 0,
- loading: false
+ loading: false,
+ // 列展示设置
+ columns: [],
+ allColShow: true, // 默认全部列都展示
+ indeterminate: false,
+ checkGroup: []
})
const emits = defineEmits(['headBtnClick', 'selectionChange', 'rowClick', 'rowDblclick', 'getBaseQuery', 'cellClick'])
@@ -101,6 +146,52 @@ const handleClickBtns = (key) => {
emits('headBtnClick', key)
}
+const filterColumns = () => {
+ localData.columns = props.tableConfig.columns.map(item=>{
+ if(item.prop) {
+ return {
+ ...item
+ }
+ }
+ })
+}
+
+const changeIsShowAll = (val) => {
+ if(val) {
+ filterColumns()
+ localData.indeterminate = false
+ localData.checkGroup = props.tableConfig.columns.map(item=>item.prop)
+ } else {
+ localData.columns.length = 0
+ localData.checkGroup.length = 0
+ localData.indeterminate = false
+ }
+}
+
+const changeColShow = (val) => {
+ if(val.length == props.tableConfig.columns.length) {
+ localData.indeterminate = false
+ localData.allColShow = true
+ } else if(val.length !== props.tableConfig.columns.length && val.length != 0) {
+ localData.allColShow = false
+ localData.indeterminate = true
+ } else {
+ localData.indeterminate = false
+ localData.allColShow = false
+ }
+ const template = []
+ props.tableConfig.columns.forEach(item=>{
+ val.forEach(v=>{
+ if(item.prop == v) {
+ template.push(item)
+ }
+ })
+ })
+ localData.columns = template
+}
+
+filterColumns()
+
const getList = async () => {
const { api, params } = props.tableConfig
const queryParmas = {...localData.query, ...params}
@@ -154,13 +245,11 @@ const handleCurrentChange = (val) => {
getList()
}
-// watchEffect(()=>{
-// if(!props.tableConfig.api) {
-// localData.list = props.data
-// }else {
-// getList()
-// }
-// })
+watchEffect(()=>{
+ if(localData.allColShow) {
+ localData.checkGroup = props.tableConfig.columns.map(item=>item.prop)
+ }
+})
//刷新
const refresh = ({resetPage=false}={}) => {
resetPage ? localData.query.pageNum = 1 : null
@@ -184,5 +273,21 @@ onMounted(() => {
\ No newline at end of file
From f46f95c4ad7c3815d601acd2a72945b6ba14af4a Mon Sep 17 00:00:00 2001
From: lilinyuan <1084668738@qq.com>
Date: Mon, 13 May 2024 22:29:07 +0800
Subject: [PATCH 5/6] =?UTF-8?q?fix:=20=E5=88=A0=E9=99=A4=E8=AF=A5=E5=88=86?=
=?UTF-8?q?=E6=94=AF=E8=A1=A8=E6=A0=BC=E7=BB=84=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/fvcomponents/fvTable/index.vue | 293 -----------------------------
1 file changed, 293 deletions(-)
delete mode 100644 src/fvcomponents/fvTable/index.vue
diff --git a/src/fvcomponents/fvTable/index.vue b/src/fvcomponents/fvTable/index.vue
deleted file mode 100644
index c90af06..0000000
--- a/src/fvcomponents/fvTable/index.vue
+++ /dev/null
@@ -1,293 +0,0 @@
-
-
-
-
-
-
- {{ btn.name }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
From 31a88c232f035a52ba6c2c8b75b57c453c416c8b Mon Sep 17 00:00:00 2001
From: lilinyuan <1084668738@qq.com>
Date: Mon, 13 May 2024 22:30:50 +0800
Subject: [PATCH 6/6] =?UTF-8?q?feat:=20=E9=87=8D=E6=96=B0=E4=B8=8A?=
=?UTF-8?q?=E4=BC=A0=E8=A1=A8=E6=A0=BC=E7=BB=84=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/fvcomponents/fvTable/index.vue | 293 +++++++++++++++++++++++++++++
1 file changed, 293 insertions(+)
create mode 100644 src/fvcomponents/fvTable/index.vue
diff --git a/src/fvcomponents/fvTable/index.vue b/src/fvcomponents/fvTable/index.vue
new file mode 100644
index 0000000..9c4b81c
--- /dev/null
+++ b/src/fvcomponents/fvTable/index.vue
@@ -0,0 +1,293 @@
+
+
+
+
+
+
+ {{ btn.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+