瀏覽代碼

1、公告发布

billisme 4 年之前
父節點
當前提交
c6674dfc7c

+ 50 - 0
src/api/estate/notice.js

@@ -0,0 +1,50 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+  return request({
+    url: '/api/cyzh-estate/notice/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
+export const getDetail = (id) => {
+  return request({
+    url: '/api/cyzh-estate/notice/detail',
+    method: 'get',
+    params: {
+      id
+    }
+  })
+}
+
+export const remove = (ids) => {
+  return request({
+    url: '/api/cyzh-estate/notice/remove',
+    method: 'post',
+    params: {
+      ids,
+    }
+  })
+}
+
+export const add = (row) => {
+  return request({
+    url: '/api/cyzh-estate/notice/submit',
+    method: 'post',
+    data: row
+  })
+}
+
+export const update = (row) => {
+  return request({
+    url: '/api/cyzh-estate/notice/submit',
+    method: 'post',
+    data: row
+  })
+}
+

+ 50 - 0
src/api/estate/noticepushrecord.js

@@ -0,0 +1,50 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+  return request({
+    url: '/api/cyzh-estate/noticepushrecord/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
+export const getDetail = (id) => {
+  return request({
+    url: '/api/cyzh-estate/noticepushrecord/detail',
+    method: 'get',
+    params: {
+      id
+    }
+  })
+}
+
+export const remove = (ids) => {
+  return request({
+    url: '/api/cyzh-estate/noticepushrecord/remove',
+    method: 'post',
+    params: {
+      ids,
+    }
+  })
+}
+
+export const add = (row) => {
+  return request({
+    url: '/api/cyzh-estate/noticepushrecord/submit',
+    method: 'post',
+    data: row
+  })
+}
+
+export const update = (row) => {
+  return request({
+    url: '/api/cyzh-estate/noticepushrecord/submit',
+    method: 'post',
+    data: row
+  })
+}
+

+ 42 - 11
src/components/houseuser/houseuser-check.vue

@@ -43,11 +43,25 @@ export default {
             disabled: true,
             hide: true,
             width: 80,
-            dicUrl: "/api/blade-system/dict-biz/dictionary?code=sex",
-            props: {
-              label: "dictValue",
-              value: "dictKey"
-            },
+            dicData:[
+              {
+                label: "未定义",
+                value: -1
+              },
+              {
+                label: "男",
+                value: 1
+              },
+              {
+                label: "女",
+                value: 2
+              },
+            ],
+            // dicUrl: "/api/blade-system/dict-biz/dictionary?code=sex",
+            // props: {
+            //   label: "dictValue",
+            //   value: "dictKey"
+            // },
           },
           {
             label: "住户类型",
@@ -56,11 +70,26 @@ export default {
             dataType: "string",
             disabled: true,
             hide: true,
-            dicUrl: "/api/blade-system/dict-biz/dictionary?code=household-type",
-            props: {
-              label: "dictValue",
-              value: "dictKey"
-            },
+            dicData:[
+              {
+                label: "业主",
+                value: 0
+              },
+              {
+                label: "家属",
+                value: 1
+              },
+              {
+                label: "租客",
+                value: 2
+              },
+            ],
+
+            // dicUrl: "/api/blade-system/dict-biz/dictionary?code=household-type",
+            // props: {
+            //   label: "dictValue",
+            //   value: "dictKey"
+            // },
           },
           {
             label: "身份证",
@@ -237,6 +266,7 @@ export default {
             label: "护照照片",
             prop: "passportImgUri",
             hide: true,
+            display: false,
             disabled: true,
             type: 'upload',
             listType: 'picture-img',
@@ -251,6 +281,7 @@ export default {
             label: "入境证明",
             prop: "entryImgUri",
             hide: true,
+            display: false,
             disabled: true,
             type: 'upload',
             listType: 'picture-img',
@@ -262,7 +293,7 @@ export default {
             tip: '只能生产jpg/png图片,且不超过500kb',
           },
           {
-            label: "人脸图片uri",
+            label: "人脸图片",
             prop: "imageUri",
             hide: true,
             disabled: true,

+ 3 - 3
src/views/device/videodevice/devicePlayer.vue

@@ -262,20 +262,20 @@ export default {
             console.log(val)
         },
         play: function (streamInfo, hasAudio) {
-
-            this.hasaudio = hasAudio;
+            this.hasAudio = hasAudio;
             this.isLoging = false;
             // this.videoUrl = streamInfo.rtc;
             this.videoUrl = this.getUrlByStreamInfo(streamInfo);
             this.streamId = streamInfo.streamId;
             this.app = streamInfo.app;
+            this.mediaServerId = streamInfo.mediaServerId;
             this.playFromStreamInfo(false, streamInfo)
         },
         getUrlByStreamInfo(streamInfo){
             // let baseZlmApi = `${location.host}` + `/zlm`
             console.log(zlmHttpUrl)
             // return `${baseZlmApi}/${streamInfo.app}/${streamInfo.streamId}.flv`;
-            return `ws://` + zlmHttpUrl + `/${streamInfo.app}/${streamInfo.streamId}.flv`;
+            return streamInfo.ws_flv;
         },
         coverPlay: function () {
             var that = this;

+ 5 - 2
src/views/estate/applyuser.vue

@@ -130,7 +130,7 @@
               label: "性别",
               prop: "sex",
               width: 60,
-              display: false,
+              // display: false,
               type: 'select',
               dataType: 'string',
               dicUrl: "/api/blade-system/dict-biz/dictionary?code=sex",
@@ -418,6 +418,7 @@
               label: "护照照片",
               prop: "passportImgUri",
               hide: true,
+              display: false,
               span: 8,
               type: 'upload',
               listType: 'picture-img',
@@ -437,6 +438,7 @@
               label: "入境证明",
               prop: "entryImgUri",
               hide: true,
+              display: false,
               span: 8,
               type: 'upload',
               listType: 'picture-img',
@@ -464,9 +466,10 @@
               }]
             },
             {
-              label: "人脸图片uri",
+              label: "人脸图片",
               prop: "imageUri",
               hide: true,
+              display: false,
               span: 8,
               type: 'upload',
               listType: 'picture-img',

+ 260 - 0
src/views/estate/notice.vue

@@ -0,0 +1,260 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page.sync="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @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 type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   plain
+                   v-if="permission.notice_delete"
+                   @click="handleDelete">删 除
+        </el-button>
+      </template>
+      <template slot="menu" slot-scope="{row}">
+        <el-button type="text"
+                   size="mini"
+                   icon="el-icon-delete"
+                   plain
+                   @click="showPushRecord(row)">发布
+        </el-button>
+      </template>
+    </avue-crud>
+    <el-dialog title = "住户信息审核" :visible.sync="pushRecordVisible" :modal-append-to-body="false" >
+      <HouseuserCheck v-if="pushRecordVisible" ></HouseuserCheck>
+    </el-dialog>
+    <el-drawer :visible.sync="pushRecordVisible" size="85%" direction="rtl" :modal-append-to-body="false" destroy-on-close append-to-body center >
+      <noticepushrecord ref="noticepushrecord" :notice-id="noticeId" ></noticepushrecord>
+    </el-drawer>
+  </basic-container>
+</template>
+
+<script>
+  import {getList, getDetail, add, update, remove} from "@/api/estate/notice";
+  import {mapGetters} from "vuex";
+  import noticepushrecord from "@/views/estate/noticepushrecord";
+
+  export default {
+    components: {
+      noticepushrecord
+    },
+    data() {
+      return {
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        pushRecordVisible: false,
+        noticeId: null,
+        selectionList: [],
+        option: {
+          menuWidth: 300,
+          height:'auto',
+          calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          viewBtn: true,
+          selection: true,
+          dialogClickModal: false,
+          column: [
+            {
+              label: "公告标题",
+              prop: "title",
+              rules: [{
+                required: true,
+                message: "请输入文章标题",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "公告内容",
+              prop: "notice",
+              component: 'AvueUeditor',
+              options: {
+                action: '/api/blade-resource/oss/endpoint/put-file',
+                props: {
+                  res: "data",
+                  url: "link",
+                }
+              },
+              hide: true,
+              minRows: 6,
+              span: 24,
+            },
+            {
+              label: "园区id",
+              prop: "agencyId",
+              display:false,
+              hide: true,
+              rules: [{
+                required: true,
+                message: "请输入园区id",
+                trigger: "blur"
+              }]
+            },
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.notice_add, false),
+          viewBtn: this.vaildData(this.permission.notice_view, false),
+          delBtn: this.vaildData(this.permission.notice_delete, false),
+          editBtn: this.vaildData(this.permission.notice_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    methods: {
+      showPushRecord(row){
+        this.pushRecordVisible = true;
+        this.noticeId = row.id;
+      },
+      rowSave(row, done, loading) {
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

+ 284 - 0
src/views/estate/noticepushrecord.vue

@@ -0,0 +1,284 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page.sync="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @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 type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   plain
+                   v-if="permission.noticepushrecord_delete"
+                   @click="handleDelete">删 除
+        </el-button>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import {getList, getDetail, add, update, remove} from "@/api/estate/noticepushrecord";
+  import {mapGetters} from "vuex";
+
+  export default {
+    props: {
+      noticeId: {
+        type: String
+      }
+    },
+    data() {
+      return {
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: {
+          height:'auto',
+          calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          addBtn: true,
+          viewBtn: true,
+          editBtn: false,
+          selection: true,
+          dialogClickModal: false,
+          column: [
+            {
+              label: "公告id",
+              prop: "noticeId",
+              hide: true,
+              display: false,
+              rules: [{
+                required: true,
+                message: "请输入公告id",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "下发社区",
+              prop: "agencyId",
+              search: true,
+              searchFilterable: true,
+              filterable: true,
+              cascaderItem: ['residentialId'],
+              type: "select",
+              remote: true,
+              dicUrl: "/api/cyzh-community/agency/list?size=100",
+              dicFormatter:(res)=>{
+                return res.data.records;//返回字典的层级结构
+              },
+              props: {
+                label: "name",
+                value: "id"
+              },
+              rules: [{
+                required: true,
+                message: "请选择下发社区",
+                trigger: "blur"
+              }],
+              hide: true,
+              viewDisplay: false,
+            },
+            {
+              label: "所属小区",
+              prop: "residentialId",
+              type: "select",
+              search: true,
+              dicUrl: "/api/cyzh-community/residential/list?agencyId={{key}}",
+              dicFormatter:(res)=>{
+                return res.data.records;//返回字典的层级结构
+              },
+              // dicFlag: false,
+              filterable: true,
+              props: {
+                label: "name",
+                value: "id"
+              },
+              rules: [{
+                required: true,
+                message: "请选择下发小区",
+                trigger: "blur"
+              }],
+              hide: true,
+              viewDisplay: false,
+            },
+            {
+              label: "下发社区",
+              prop: "agencyName",
+              editDisplay: false,
+              addDisplay: false,
+            },
+            {
+              label: "下发小区",
+              prop: "residentialName",
+              editDisplay: false,
+              addDisplay: false,
+            },
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.noticepushrecord_add, false),
+          viewBtn: this.vaildData(this.permission.noticepushrecord_view, false),
+          delBtn: this.vaildData(this.permission.noticepushrecord_delete, false),
+          editBtn: this.vaildData(this.permission.noticepushrecord_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    methods: {
+      rowSave(row, done, loading) {
+        row.noticeId = this.noticeId;
+        row.agencyName = row.$agencyId;
+        row.residentialName = row.$residentialId;
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        row.noticeId = this.noticeId;
+        row.agencyName = row.$agencyId;
+        row.residentialName = row.$residentialId;
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {"noticeId": this.noticeId}) {
+        this.loading = true;
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>