From b10c3a8e4ee088b50776bf8820fff0ac420b4391 Mon Sep 17 00:00:00 2001 From: wuyibo <771227828@qq.com> Date: Fri, 12 May 2023 15:44:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=88=97=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=92=8C=E9=9A=90=E8=97=8F=E7=9A=84=E6=95=B0=E6=8D=AE=E5=AD=98?= =?UTF-8?q?=E5=82=A8=E5=88=B0=E6=B5=8F=E8=A7=88=E5=99=A8=E6=9C=AC=E5=9C=B0?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/vm/vue/index.vue.vm | 25 ++++-- .../src/components/RightToolbar/index.vue | 11 +++ ruoyi-ui/src/views/system/customer/index.vue | 78 ++++++++++++++----- 3 files changed, 88 insertions(+), 26 deletions(-) diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm index 8daa05ec..a0414188 100644 --- a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm +++ b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm @@ -110,7 +110,7 @@ v-hasPermi="['${moduleName}:${businessName}:export']" >导出 - + @@ -124,21 +124,21 @@ #set($comment=$column.columnComment) #end #if($column.pk) - + #elseif($column.list && $column.htmlType == "datetime") - + #elseif($column.list && $column.htmlType == "imageUpload") - + #elseif($column.list && "" != $column.dictType) - + #elseif($column.list && "" != $javaField) - + #end #end @@ -416,11 +416,22 @@ export default { ]#if($foreach.count != $columns.size()),#end #end #end - } + }, + // 列表的列的显示隐藏设置 + columns:[ + #foreach ($column in $columns) + { key: $foreach.index, label: `$column.columnComment`, visible: true }, + #end + ], }; }, created() { this.getList(); + //列表分页列的动态显示配置 + var columns = JSON.parse(localStorage.getItem(this.$options.name)); + if(columns){ + this.columns = columns; + } }, methods: { /** 查询${functionName}列表 */ diff --git a/ruoyi-ui/src/components/RightToolbar/index.vue b/ruoyi-ui/src/components/RightToolbar/index.vue index 527e07c1..b51cae06 100644 --- a/ruoyi-ui/src/components/RightToolbar/index.vue +++ b/ruoyi-ui/src/components/RightToolbar/index.vue @@ -35,6 +35,10 @@ export default { }; }, props: { + pageName: { + type: String, + default: "", + }, showSearch: { type: Boolean, default: true, @@ -83,9 +87,16 @@ export default { const key = this.columns[item].key; this.columns[item].visible = !data.includes(key); } + localStorage.setItem(this.pageName, JSON.stringify(this.columns)); }, // 打开显隐列dialog showColumn() { + var columns = JSON.parse(localStorage.getItem(this.pageName)); + for (let item in columns) { + if (columns[item].visible === false) { + this.value.push(parseInt(item)); + } + } this.open = true; }, }, diff --git a/ruoyi-ui/src/views/system/customer/index.vue b/ruoyi-ui/src/views/system/customer/index.vue index 7132a3da..e275dc3c 100644 --- a/ruoyi-ui/src/views/system/customer/index.vue +++ b/ruoyi-ui/src/views/system/customer/index.vue @@ -138,42 +138,42 @@ v-hasPermi="['system:customer:export']" >导出 - + - - + + - - + + - + - - + + - - + + - + - - + + - - - - + + + + - + @@ -557,12 +557,52 @@ export default { { required: true, message: "级别不能为空", trigger: "blur" } ], }, - +// 列表的列的显示隐藏设置 + columns:[ + { key: 0, label: `客户ID`, visible: true }, + { key: 1, label: `客户名`, visible: true }, + { key: 2, label: `客户昵称`, visible: true }, + { key: 3, label: `客户级别`, visible: true }, + { key: 4, label: `用户邮箱`, visible: true }, + { key: 5, label: `手机号码`, visible: true }, + { key: 6, label: `客户性别`, visible: true }, + { key: 7, label: `头像地址`, visible: true }, + { key: 8, label: `线索渠道`, visible: true }, + { key: 9, label: `信息来源`, visible: true }, + { key: 10, label: `客户居住`, visible: true }, + { key: 11, label: `到店状态`, visible: true }, + { key: 12, label: `删除标志`, visible: true }, + { key: 13, label: `最后登录IP`, visible: true }, + { key: 14, label: `最后登录时间`, visible: true }, + { key: 15, label: `创建者`, visible: true }, + { key: 16, label: `创建时间`, visible: true }, + { key: 17, label: `更新者`, visible: true }, + { key: 18, label: `更新时间`, visible: true }, + { key: 19, label: `备注`, visible: true }, + { key: 20, label: `微信号`, visible: true }, + { key: 21, label: `购车类型`, visible: true }, + { key: 22, label: `置换/保有车型`, visible: true }, + { key: 23, label: `是否评估`, visible: true }, + { key: 24, label: `意向车型`, visible: true }, + { key: 25, label: `对比车型`, visible: true }, + { key: 26, label: `是否试驾`, visible: true }, + { key: 27, label: `是否报价`, visible: true }, + { key: 28, label: `是否金融`, visible: true }, + { key: 29, label: `未订车原因`, visible: true }, + { key: 30, label: `预计到店`, visible: true }, + { key: 31, label: `最后到店`, visible: true }, + { key: 32, label: `4S店`, visible: true }, + { key: 33, label: `下单日期`, visible: true }, + ], }; }, created() { this.getList(); this.dafaultValue = new Date; + var columns1 = JSON.parse(localStorage.getItem(this.$options.name)); + if(columns1){ + this.columns = columns1; + } }, methods: { /** 查询客户信息列表 */