shuishen
2023-12-23 e22dc9f88909b6821ad40a297fa8e23af46e36a5
父级禁止选中,所属社区,小区
7 files modified
288 ■■■■ changed files
src/views/cGovernance/taskECall.vue 1 ●●●● patch | view | raw | blame | history
src/views/grid/gridman.vue 2 ●●● patch | view | raw | blame | history
src/views/grid/index.vue 1 ●●●● patch | view | raw | blame | history
src/views/place/index.vue 2 ●●● patch | view | raw | blame | history
src/views/property/propertyCapitalApply.vue 145 ●●●● patch | view | raw | blame | history
src/views/property/propertyCompanyDistrict.vue 135 ●●●● patch | view | raw | blame | history
src/views/userHouse/houseList.vue 2 ●●● patch | view | raw | blame | history
src/views/cGovernance/taskECall.vue
@@ -94,6 +94,7 @@
                    // search: true,
                },
                {
                    parent: false,
                    label: "所属社区",
                    prop: "communityCode",
                    search: true,
src/views/grid/gridman.vue
@@ -47,6 +47,7 @@
                dialogClickModal: false,
                column: [
                    {
                        parent: false,
                        label: "所属社区",
                        prop: "communityCode",
                        search: true,
@@ -58,7 +59,6 @@
                            label: "name",
                            value: "id",
                        },
                        parent: false,
                        cascader: ["gridId"],
                        rules: [
                            {
src/views/grid/index.vue
@@ -46,6 +46,7 @@
                dialogClickModal: false,
                column: [
                    {
                        parent: false,
                        label: "所属社区",
                        prop: "communityCode",
                        search: true,
src/views/place/index.vue
@@ -185,6 +185,7 @@
                    },
                    {
                        hide: true,
                        parent: false,
                        label: "所属社区",
                        prop: "neiCode",
                        search: false,
@@ -195,7 +196,6 @@
                            label: "name",
                            value: "id",
                        },
                        parent: false,
                        cascader: ["gridId"],
                        rules: [
                            {
src/views/property/propertyCapitalApply.vue
@@ -2,9 +2,10 @@
<template>
  <basic-container>
    <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
      v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
      @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
      @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
            v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave"
            :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset"
            @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
            @refresh-change="refreshChange" @on-load="onLoad">
      <template slot-scope="scope" slot="menu">
        <el-button type="text" size="small" v-if="scope.row.applyStatus === 4" @click="handleWork(scope.row)">调整申请
@@ -33,12 +34,12 @@
    update,
    add,
    getPropertyCapitalApply
  } from "@/api/property/propertyCapitalApply";
} from "@/api/property/propertyCapitalApply"
  import {
    mapGetters
  } from "vuex";
  import website from '@/config/website';
  import func from "@/util/func";
} from "vuex"
import website from '@/config/website'
import func from "@/util/func"
  export default {
    data() {
      return {
@@ -70,7 +71,9 @@
          delBtn: false,
          selection: true,
          dialogClickModal: false,
          column: [{
                column: [
                    {
                        parent: false,
              label: "小区",
              prop: "districtId",
              searchSpan: 5,
@@ -282,7 +285,7 @@
          ],
        },
        data: [],
      };
        }
    },
    watch: {},
    computed: {
@@ -293,14 +296,14 @@
          viewBtn: this.vaildData(this.permission.propertyCapitalApply_view, true),
          delBtn: this.vaildData(this.permission.propertyCapitalApply_delete, true),
          editBtn: this.vaildData(this.permission.propertyCapitalApply_edit, true),
        };
            }
      },
      ids() {
        let ids = [];
            let ids = []
        this.selectionList.forEach((ele) => {
          ids.push(ele.id);
        });
        return ids.join(",");
                ids.push(ele.id)
            })
            return ids.join(",")
      },
    },
    methods: {
@@ -318,9 +321,9 @@
        row.constructionSchemeUrls = func.join(row.constructionSchemeUrls)
        if (row.constructionSchemeUrls.length > 0) {
          var urls = []
          var split = row.constructionSchemeUrls.split(",");
                var split = row.constructionSchemeUrls.split(",")
          split.forEach(url => {
            var names = url.split("jczz/");
                    var names = url.split("jczz/")
            urls.push(names[1])
          })
          row.constructionSchemeUrls = urls.join(",")
@@ -328,43 +331,43 @@
        row.propertyFlag = 1
        add(row).then(
          () => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!",
            });
            done();
                    })
                    done()
          },
          (error) => {
            window.console.log(error);
            loading();
                    window.console.log(error)
                    loading()
          }
        );
            )
      },
      rowUpdate(row, index, done, loading) {
        if (row.constructionSchemeUrls.length > 0) {
          var urls = []
          var split = row.constructionSchemeUrls.split(",");
                var split = row.constructionSchemeUrls.split(",")
          split.forEach(url => {
            var names = url.split("jczz/");
                    var names = url.split("jczz/")
            urls.push(names[1])
          })
          row.constructionSchemeUrls = urls.join(",")
        }
        update(row).then(
          () => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!",
            });
            done();
                    })
                    done()
          },
          (error) => {
            window.console.log(error);
            loading();
                    window.console.log(error)
                    loading()
          }
        );
            )
      },
      rowDel(row) {
        this.$confirm("确定将选择数据删除?", {
@@ -373,37 +376,37 @@
            type: "warning",
          })
          .then(() => {
            return remove(row.id);
                    return remove(row.id)
          })
          .then(() => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!",
            });
          });
                    })
                })
      },
      searchReset() {
        this.query = {};
        this.onLoad(this.page);
            this.query = {}
            this.onLoad(this.page)
      },
      searchChange(params, done) {
        this.query = params;
        this.page.currentPage = 1;
        this.onLoad(this.page, params);
        done();
            this.query = params
            this.page.currentPage = 1
            this.onLoad(this.page, params)
            done()
      },
      selectionChange(list) {
        this.selectionList = list;
            this.selectionList = list
      },
      selectionClear() {
        this.selectionList = [];
        this.$refs.crud.toggleSelection();
            this.selectionList = []
            this.$refs.crud.toggleSelection()
      },
      handleDelete() {
        if (this.selectionList.length === 0) {
          this.$message.warning("请选择至少一条数据");
          return;
                this.$message.warning("请选择至少一条数据")
                return
        }
        this.$confirm("确定将选择数据删除?", {
            confirmButtonText: "确定",
@@ -411,81 +414,81 @@
            type: "warning",
          })
          .then(() => {
            return remove(this.ids);
                    return remove(this.ids)
          })
          .then(() => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!",
            });
            this.$refs.crud.toggleSelection();
          });
                    })
                    this.$refs.crud.toggleSelection()
                })
      },
      beforeOpen(done, type) {
        if (["edit", "view"].includes(type)) {
          getPropertyCapitalApply(this.form.id).then((res) => {
            this.form = res.data.data;
            this.form.propertyFlag = 1;
                    this.form = res.data.data
                    this.form.propertyFlag = 1
            if (this.form.constructionSchemeUrls.length > 0) {
              var urls = []
              var names = this.form.constructionSchemeUrls.split(",");
                        var names = this.form.constructionSchemeUrls.split(",")
              names.forEach(name => {
                urls.push(website.minioUrl + name)
              })
              this.form.constructionSchemeUrls = urls.join(",")
            }
          });
                })
        }
        // con
        done();
            done()
      },
      currentChange(currentPage) {
        this.page.currentPage = currentPage;
            this.page.currentPage = currentPage
      },
      sizeChange(pageSize) {
        this.page.pageSize = pageSize;
            this.page.pageSize = pageSize
      },
      refreshChange() {
        this.onLoad(this.page, this.query);
            this.onLoad(this.page, this.query)
      },
      onLoad(page, params = {}) {
        const {
          dateTime
        } = this.query;
            } = this.query
        let values = {
          ...params,
        };
            }
        if (dateTime) {
          values = {
            ...params,
            startTime: dateTime[0],
            endTime: dateTime[1],
            ...this.query,
          };
          values.dateTime = null;
        }
        this.loading = true;
                values.dateTime = null
            }
            this.loading = true
        getList(page.currentPage, page.pageSize, values).then((res) => {
          const data = res.data.data;
          this.page.total = data.total;
          this.data = data.records;
                const data = res.data.data
                this.page.total = data.total
                this.data = data.records
          this.data.forEach(item => {
            if (item.constructionSchemeUrls.length > 0) {
              var urls = []
              var names = item.constructionSchemeUrls.split(",");
                        var names = item.constructionSchemeUrls.split(",")
              names.forEach(name => {
                urls.push(website.minioUrl + name)
              })
              item.constructionSchemeUrls = urls.join(",")
            }
          })
          this.loading = false;
          this.selectionClear();
        });
                this.loading = false
                this.selectionClear()
            })
      }
    }
  };
}
</script>
<style>
src/views/property/propertyCompanyDistrict.vue
@@ -2,9 +2,10 @@
<template>
  <basic-container>
    <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
      v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
      @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
      @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
            v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave"
            :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset"
            @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
            @refresh-change="refreshChange" @on-load="onLoad">
      <template slot="menuLeft">
        <el-button size="small" icon="el-icon-delete" plain v-if="permission.propertyCompanyDistrict_delete"
          @click="handleDelete">删 除
@@ -21,12 +22,12 @@
    update,
    add,
    getPropertyCompanyDistrict
  } from "@/api/property/propertyCompanyDistrict";
} from "@/api/property/propertyCompanyDistrict"
  import {
    mapGetters
  } from "vuex";
  import website from '@/config/website';
  import func from "@/util/func";
} from "vuex"
import website from '@/config/website'
import func from "@/util/func"
  export default {
    data() {
      return {
@@ -54,7 +55,9 @@
          viewBtn: true,
          selection: true,
          dialogClickModal: false,
          column: [{
                column: [
                    {
                        parent: false,
              label: "小区",
              prop: "districtId",
              searchSpan: 5,
@@ -181,7 +184,7 @@
          ],
        },
        data: [],
      };
        }
    },
    watch: {},
    computed: {
@@ -192,50 +195,50 @@
          viewBtn: this.vaildData(this.permission.propertyCompanyDistrict_view, true),
          delBtn: this.vaildData(this.permission.propertyCompanyDistrict_delete, true),
          editBtn: this.vaildData(this.permission.propertyCompanyDistrict_edit, true),
        };
            }
      },
      ids() {
        let ids = [];
            let ids = []
        this.selectionList.forEach((ele) => {
          ids.push(ele.id);
        });
        return ids.join(",");
                ids.push(ele.id)
            })
            return ids.join(",")
      },
    },
    methods: {
      rowSave(row, done, loading) {
        row.userId = func.join(row.userId);
            row.userId = func.join(row.userId)
        add(row).then(
          () => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!",
            });
            done();
                    })
                    done()
          },
          (error) => {
            window.console.log(error);
            loading();
                    window.console.log(error)
                    loading()
          }
        );
            )
      },
      rowUpdate(row, index, done, loading) {
        row.userId = func.join(row.userId);
            row.userId = func.join(row.userId)
        update(row).then(
          () => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!",
            });
            done();
                    })
                    done()
          },
          (error) => {
            window.console.log(error);
            loading();
                    window.console.log(error)
                    loading()
          }
        );
            )
      },
      rowDel(row) {
        this.$confirm("确定将选择数据删除?", {
@@ -244,37 +247,37 @@
            type: "warning",
          })
          .then(() => {
            return remove(row.id);
                    return remove(row.id)
          })
          .then(() => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!",
            });
          });
                    })
                })
      },
      searchReset() {
        this.query = {};
        this.onLoad(this.page);
            this.query = {}
            this.onLoad(this.page)
      },
      searchChange(params, done) {
        this.query = params;
        this.page.currentPage = 1;
        this.onLoad(this.page, params);
        done();
            this.query = params
            this.page.currentPage = 1
            this.onLoad(this.page, params)
            done()
      },
      selectionChange(list) {
        this.selectionList = list;
            this.selectionList = list
      },
      selectionClear() {
        this.selectionList = [];
        this.$refs.crud.toggleSelection();
            this.selectionList = []
            this.$refs.crud.toggleSelection()
      },
      handleDelete() {
        if (this.selectionList.length === 0) {
          this.$message.warning("请选择至少一条数据");
          return;
                this.$message.warning("请选择至少一条数据")
                return
        }
        this.$confirm("确定将选择数据删除?", {
            confirmButtonText: "确定",
@@ -282,62 +285,62 @@
            type: "warning",
          })
          .then(() => {
            return remove(this.ids);
                    return remove(this.ids)
          })
          .then(() => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!",
            });
            this.$refs.crud.toggleSelection();
          });
                    })
                    this.$refs.crud.toggleSelection()
                })
      },
      beforeOpen(done, type) {
        if (["edit", "view"].includes(type)) {
          getPropertyCompanyDistrict(this.form.id).then((res) => {
            this.form = res.data.data;
          });
                    this.form = res.data.data
                })
        }
        // con
        done();
            done()
      },
      currentChange(currentPage) {
        this.page.currentPage = currentPage;
            this.page.currentPage = currentPage
      },
      sizeChange(pageSize) {
        this.page.pageSize = pageSize;
            this.page.pageSize = pageSize
      },
      refreshChange() {
        this.onLoad(this.page, this.query);
            this.onLoad(this.page, this.query)
      },
      onLoad(page, params = {}) {
        const {
          dateTime
        } = this.query;
            } = this.query
        let values = {
          ...params,
        };
            }
        if (dateTime) {
          values = {
            ...params,
            startTime: dateTime[0],
            endTime: dateTime[1],
            ...this.query,
          };
          values.dateTime = null;
        }
        this.loading = true;
                values.dateTime = null
            }
            this.loading = true
        getList(page.currentPage, page.pageSize, values).then((res) => {
          const data = res.data.data;
          this.page.total = data.total;
          this.data = data.records;
          this.loading = false;
          this.selectionClear();
        });
                const data = res.data.data
                this.page.total = data.total
                this.data = data.records
                this.loading = false
                this.selectionClear()
            })
      }
    }
  };
}
</script>
<style>
src/views/userHouse/houseList.vue
@@ -272,6 +272,7 @@
                    {
                        hide: true,
                        parent: false,
                        label: "所属社区",
                        prop: "neiCode",
                        search: false,
@@ -282,7 +283,6 @@
                            label: "name",
                            value: "id",
                        },
                        parent: false,
                        cascader: ["gridId"],
                        rules: [
                            {