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 | 67 ++++++++++++++++++++++++++++++++-
1 files changed, 65 insertions(+), 2 deletions(-)
diff --git a/src/views/article/rotation.vue b/src/views/article/rotation.vue
index 972a1c9..195193e 100644
--- a/src/views/article/rotation.vue
+++ b/src/views/article/rotation.vue
@@ -33,7 +33,9 @@
export default {
data() {
return {
- form: {},
+ form: {
+ publicFlag: 1
+ },
query: {},
loading: true,
page: {
@@ -93,6 +95,26 @@
value: 2
}
]
+ }, {
+ width: 110,
+ labelWidth: 100,
+ label: "是否公开",
+ prop: "publicFlag",
+ span: 12,
+ searchSpan: 4,
+ type: "select",
+ // search: true,
+ // cascader: ["communityCode"],
+ type: "select",
+ dicData: [{
+ label: "不公开",
+ value: 1
+ },
+ {
+ label: "公开",
+ value: 2
+ }
+ ]
},
// {
// width: 156,
@@ -125,6 +147,7 @@
tags: true,
type: "tree",
multiple: true,
+ editDisplay: false,
cascader: ['articleId'],
dicUrl: "/api/blade-district/district/getDistrictTree?filterFlag=1",
rules: [{
@@ -145,6 +168,7 @@
prop: "articleId",
search: false,
viewDisabled: false,
+ editDisplay: false,
type: 'select',
dicUrl: `/api/blade-article/article/getArticleByDistrictId?type=4&eventType=1&districtId={{rotationRange}}`,
formslot: true,
@@ -207,7 +231,26 @@
data: [],
}
},
- watch: {},
+ watch: {
+ 'form.publicFlag': {
+ handler(newData) {
+ const column = this.findObject(this.option.column, "rotationRange")
+ if (newData == 1) {
+ column.editDisplay = true
+ } else {
+ column.editDisplay = false
+ }
+
+ const column2 = this.findObject(this.option.column, "articleId")
+ if (newData == 1) {
+ column2.editDisplay = true
+ } else {
+ column2.editDisplay = false
+ }
+
+ },
+ },
+ },
computed: {
...mapGetters(["permission", "userInfo"]),
permissionList() {
@@ -228,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(",")
@@ -253,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(",")
@@ -337,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(",")
@@ -390,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