From e4e1be720ccd1d864cf820ef116fe05167aca4fa Mon Sep 17 00:00:00 2001
From: lin <sbla5888@163.com>
Date: Sat, 23 Mar 2024 14:09:13 +0800
Subject: [PATCH] 维修基金筛选

---
 src/views/article/rotation.vue |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/src/views/article/rotation.vue b/src/views/article/rotation.vue
index 29b02be..195193e 100644
--- a/src/views/article/rotation.vue
+++ b/src/views/article/rotation.vue
@@ -102,6 +102,7 @@
               prop: "publicFlag",
               span: 12,
               searchSpan: 4,
+              type: "select",
               // search: true,
               // cascader: ["communityCode"],
               type: "select",
@@ -270,6 +271,13 @@
     },
     methods: {
       rowSave(row, done, loading) {
+        if (row.rotationRange) {
+          row.rotationRange = JSON.stringify(row.rotationRange)
+        }
+        if (row.publicFlag == 2) {
+          row.rotationRange = []
+          row.rotationRange = JSON.stringify(row.rotationRange)
+        }
         if (row.url.length > 0) {
           var urls = []
           var split = row.url.split(",")
@@ -295,6 +303,13 @@
         )
       },
       rowUpdate(row, index, done, loading) {
+        if (row.rotationRange) {
+          row.rotationRange = JSON.stringify(row.rotationRange)
+        }
+        if (row.publicFlag == 2) {
+          row.rotationRange = []
+          row.rotationRange = JSON.stringify(row.rotationRange)
+        }
         if (row.url.length > 0) {
           var urls = []
           var split = row.url.split(",")
@@ -379,6 +394,9 @@
         if (["edit", "view"].includes(type)) {
           getRotation(this.form.id).then((res) => {
             this.form = res.data.data
+            if (this.form.rotationRange) {
+              this.form.rotationRange = JSON.parse(this.form.rotationRange)
+            }
             if (this.form.url.length > 0) {
               var urls = []
               var names = this.form.url.split(",")
@@ -432,6 +450,9 @@
           this.page.total = data.total
           this.data = data.records
           this.data.forEach(item => {
+            if (item.rotationRange) {
+              item.rotationRange = JSON.parse(item.rotationRange)
+            }
             if (item.url.length > 0) {
               var urls = []
               var names = item.url.split(",")

--
Gitblit v1.9.3