Prechádzať zdrojové kódy

添加旗县管理员

dylan 2 rokov pred
rodič
commit
26d026ae55

+ 67 - 0
src/api/baseinfo/qiserviceperson.js

@@ -0,0 +1,67 @@
+import request from '@/router/axios';
+
+
+export const getOrgTree = () => {
+    return request({
+        url: '/api/galaxy-business/serviceperson/org/dict',
+        method: 'get',
+
+    })
+}
+
+export const getPage = (current, size, params) => {
+    return request({
+        url: '/api/galaxy-business/qi/serviceperson/page',
+        method: 'get',
+        params: {
+            ...params,
+            current,
+            size,
+        }
+    })
+}
+
+export const remove = (ids) => {
+    return request({
+        url: '/api/galaxy-business/serviceperson/remove',
+        method: 'post',
+        params: {
+            ids,
+        }
+    })
+}
+
+export const add = (row) => {
+    return request({
+        url: '/api/galaxy-business/qi/serviceperson/save',
+        method: 'post',
+        data: row
+    })
+}
+
+export const update = (row) => {
+    return request({
+        url: '/api/galaxy-business/serviceperson/update',
+        method: 'post',
+        data: row
+    })
+}
+
+export const getDetail = (id) => {
+    return request({
+        url: '/api/galaxy-business/serviceperson/detail',
+        method: 'get',
+        params: {
+            id
+        }
+    })
+}
+
+export const getList = () => {
+    return request({
+        url: '/api/galaxy-business/serviceperson/list',
+        method: 'get',
+    })
+}
+
+

+ 2 - 2
src/config/website.js

@@ -51,8 +51,8 @@ export default {
     reportUrl: 'https://nmwx.dahengsi.com:20001/ureport',
     //文件存储服务器地址,末尾必须/
     //ossServer: 'http://172.31.1.154:20002/oss/galaxy/',
-    ossServer: 'https://nmwx.dahengsi.com:20001/oss/galaxy/',
-    //ossServer: 'http://111.204.228.227:20002/oss/galaxy/',
+    //ossServer: 'https://nmwx.dahengsi.com:20001/oss/galaxy/',
+    ossServer: 'https://wx.dahengsi.com:44301/oss/galaxy/',
     //文件预览服务器地址
     kkfileviewServer: 'http://localhost:8012',
     nm_post_code_sysadmin_id: '1562989286284906498',

+ 353 - 0
src/views/baseinfo/qiadminperson.vue

@@ -0,0 +1,353 @@
+<!--
+ * @Title: 
+ * @Description: 盟市管理员用户管理
+ * @Author: swp
+ * @Date: 2022-08-24 10:49:21
+ * @LastEditors: 
+ * @LastEditTime: 2022-08-24 10:49:21
+-->
+<template>
+    <div>
+        <el-row>
+            <el-col :span="24">
+                <basic-container>
+                    <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page"
+                        :before-open="beforeOpen" ref="crud" v-model="form" :permission="permissionList"
+                        @row-del="rowDel" @row-update="rowUpdate" @row-save="rowSave" @search-change="searchChange"
+                        @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
+                        @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad"
+                        @before-open="beforeOpen" @select-change="selectChange">
+                        <template slot="state" slot-scope="{ row }">
+                            <el-button type="text" @click="openConfig(row)"> 正常 </el-button>
+                        </template>
+                        <template slot-scope="{ row, index }" slot="menu">
+                        </template>
+                        <template slot="state" slot-scope="{ row }">
+                            <el-button type="text" @click="openConfig(row)"> 正常 </el-button>
+                        </template>
+                    </avue-crud>
+                </basic-container>
+            </el-col>
+        </el-row>
+    </div>
+</template>
+
+<script>
+
+import { getPage, getDetail, add, update, remove } from "@/api/baseinfo/qiserviceperson.js";
+import { getStore } from '@/util/store.js';
+import { mapGetters } from "vuex";
+export default {
+    components: {
+
+    },
+    data() {
+        return {
+            id: "",
+            post_code: '0',
+            editForm: {},
+            editDialog: false,
+            form: {},
+            selectionList: [],
+            query: {},
+            loading: true,
+            page: {
+                pageSize: 10,
+                currentPage: 1,
+                total: 0,
+            },
+            option: {
+                labelWidth: 120,
+                viewLabelWidth: 100,
+                searchlabelWidth: 140,
+                height: "auto",
+                calcHeight: 80,
+                align: "center",
+                headerAlign: "center",
+                tip: false,
+                simplePage: true,
+                searchShow: true,
+                searchMenuSpan: 6,
+                border: true,
+                index: true,
+                selection: false,
+                viewBtn: false,
+                viewTitle: "运维人员信息",
+                menuWidth: 220,
+                dialogType: "drawer",
+                dialogClickModal: false,
+                addBtnText: "新增用户",
+                columnBtn: false,
+                column: [
+                    {
+                        label: "登录帐号",
+                        prop: "account",
+                        span: 24,
+                        tip: "密码默认为帐号+@8282",
+                        tipPlacement: 'right-end',
+                        editDisabled: true,
+                        rules: [
+                            {
+                                required: true,
+                                message: "请录入登录帐号",
+                                trigger: "click",
+                            },
+                        ],
+                    },
+                    {
+                        label: "用户名称",
+                        prop: "realName",
+                        search: true,
+                        span: 24,
+                        rules: [
+                            {
+                                required: true,
+                                message: "请录入用户名称",
+                                trigger: "click",
+                            },
+                        ],
+                    },
+                    {
+                        label: "所属机构",
+                        prop: "deptName",
+                        span: 12,
+                        addDisplay: false,
+                        editDisabled: true,
+                        rules: [
+                            {
+                                required: true,
+                                message: "请录入机构名称",
+                                trigger: "click",
+                            },
+                        ],
+                    }
+                    ,
+                    {
+                        label: "盟市",
+                        prop: "cityAdcd",
+                        span: 24,
+                        hide: true,
+                        viewDisplay: false,
+                        editDisplay: false,
+                        type: "select",
+                        addDisabled: false,
+                        cascader: ['districtAdcd'],
+                        props: {
+                            label: "adnm",
+                            value: "adcd"
+                        },
+                        dicUrl: "/api/galaxy-business/baseinfo/region/whole/yj/list",
+                        rules: [
+                            {
+                                required: true,
+                                message: "请选择盟市",
+                                trigger: "click",
+                            },
+                        ],
+                    },
+                    {
+                        label: "旗县",
+                        prop: "districtAdcd",
+                        span: 24,
+                        hide: true,
+                        viewDisplay: false,
+                        editDisplay: false,
+                        type: "select",
+                        addDisabled: false,
+
+                        props: {
+                            label: "adnm",
+                            value: "adcd"
+                        },
+                        dicUrl: "/api/galaxy-business/baseinfo/region/whole/yj/list?parentCode={{cityAdcd}}",
+                        rules: [
+                            {
+                                required: true,
+                                message: "请选择旗县",
+                                trigger: "click",
+                            },
+                        ],
+                    },
+                    {
+                        label: "联系电话",
+                        prop: "phone",
+                        search: true,
+                        span: 24,
+                        editDisplay: true,
+                        addDisplay: true,
+                    },
+                    {
+                        label: "邮箱",
+                        prop: "email",
+                        span: 24,
+                        editDisplay: true,
+                        addDisplay: true,
+                    },
+                ],
+            },
+            data: [],
+        };
+    },
+    computed: {
+        ...mapGetters(["userInfo", "permission"]),
+        permissionList() {
+            if (this.post_code == '0') {
+                return {
+                    addBtn: true,
+                    viewBtn: false,
+                    delBtn: true,
+                    editBtn: true,
+                };
+            } else {
+                return {
+                    addBtn: false,
+                    viewBtn: false,
+                    delBtn: false,
+                    editBtn: false,
+                };
+            }
+        },
+        ids() {
+            let ids = [];
+            this.selectionList.forEach((ele) => {
+                ids.push(ele.id);
+            });
+            return ids.join(",");
+        },
+    },
+    mounted() { },
+    created() {
+        let u = getStore({ name: 'userInfo' });
+        console.log(JSON.stringify(u));
+        if (u.post_id == this.website.nm_post_code_sysadmin_id) {
+            this.post_code = this.website.nm_post_code_sysadmin_code;
+        } else if (u.post_id == this.website.nm_post_code_office_personnel_id) {
+            this.post_code = this.website.nm_post_code_office_personnel_code;
+        }
+    },
+    methods: {
+        rowSave(row, done, loading) {
+            add(row).then(
+                () => {
+                    this.onLoad(this.page);
+                    this.$message({
+                        type: "success",
+                        message: "操作成功!",
+                    });
+                    done();
+                },
+                (error) => {
+                    window.console.log(error);
+                    loading();
+                }
+            );
+        },
+        rowUpdate(row, index, done, loading) {
+            update(row).then(
+                () => {
+                    this.onLoad(this.page);
+                    this.$message({
+                        type: "success",
+                        message: "操作成功!",
+                    });
+                    done();
+                },
+                (error) => {
+                    window.console.log(error);
+                    loading();
+                }
+            );
+        },
+        rowDel(row) {
+            this.$confirm("确定将选择数据删除?", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning",
+            })
+                .then(() => {
+                    return remove(row.id);
+                })
+                .then(() => {
+                    this.onLoad(this.page);
+                    this.$message({
+                        type: "success",
+                        message: "操作成功!",
+                    });
+                });
+        },
+        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;
+        },
+        selectChange(item) {
+            console.log(item);
+        },
+        selectionClear() {
+            this.selectionList = [];
+            this.$refs.crud.toggleSelection();
+        },
+        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();
+        },
+        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;
+            getPage(
+                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>

+ 4 - 4
src/views/business/manage/index.vue

@@ -40,8 +40,8 @@
                                 <div class="lineText">
                                     <div>
                                         <span class="rtuCount">当前行政区测站总数量: </span> <span class="rtuCount"> {{
-                                            countInfo.rtuCount
-                                        }}</span>
+                countInfo.rtuCount
+            }}</span>
                                     </div>
                                 </div>
                                 <div class="lineText">
@@ -49,7 +49,7 @@
                                 </div>
                                 <div class="lineText">
                                     <span class="warnRtuCount">当前行政区异常测站总数量: {{
-                                        countInfo.warningRtuCount }}</span>
+                    countInfo.warningRtuCount }}</span>
                                 </div>
 
                             </div>
@@ -1158,7 +1158,7 @@ export default {
 };
 </script>
 
-<style  lang="scss" scoped>
+<style lang="scss" scoped>
 .cell-click-line {
     text-decoration-line: underline;
 }

+ 217 - 7
src/views/business/yjxt/yjdangerareacheck.vue

@@ -9,7 +9,23 @@
 <template>
     <div>
         <el-row>
-            <el-col :span="24">
+            <el-col :span="6">
+                <div class="box">
+                    <el-scrollbar>
+                        <basic-container>
+                            <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick">
+                                <span class="el-tree-node__label" slot-scope="{ node, data }">
+                                    <span>
+                                        <i class="el-icon-office-building"></i>
+                                        {{ (node || {}).label }}
+                                    </span>
+                                </span>
+                            </avue-tree>
+                        </basic-container>
+                    </el-scrollbar>
+                </div>
+            </el-col>
+            <el-col :span="18">
                 <basic-container>
                     <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page"
                         :before-open="beforeOpen" ref="crud" v-model="form" :permission="permissionList"
@@ -20,6 +36,14 @@
                             <el-button type="text" size="small" @click="toCheckInfo(row)">查看图片
                             </el-button>
                         </template>
+                        <!-- <template slot="isFlood" slot-scope="row">
+                            <div v-if="row.row.isFlood == 1" style="color: red;">
+                                是
+                            </div>
+                            <div v-else>
+                                否
+                            </div>
+                        </template> -->
                     </avue-crud>
                 </basic-container>
             </el-col>
@@ -36,6 +60,7 @@
 
 
 import { getPage, getDetail } from "@/api/business/yj/yjdangerareacheck.js";
+import { getTree } from "@/api/baseinfo/region.js";
 import { mapGetters } from "vuex";
 import yjdangerareacheckdetail from './yjdangerareacheckdetail.vue'
 
@@ -58,6 +83,37 @@ export default {
                 currentPage: 1,
                 total: 0,
             },
+            treeCode: '',
+            treeParentCode: '',
+            treeData: [],
+            treeOption: {
+                nodeKey: "id",
+                defaultExpandedKeys: [],
+                lazy: false,
+                // treeLoad: function (node, resolve) {
+                //     const parentCode = (node.level === 0) ? "00" : node.data.value;
+                //     getLazyTree(parentCode).then(res => {
+                //         resolve(res.data.data.map(item => {
+                //             return {
+                //                 ...item,
+                //                 leaf: !item.hasChildren
+                //             }
+                //         }))
+
+                // this.treeOption.defaultExpandedKeys.push(this.treeData[0].id);
+                // this.treeCode = this.treeData[0].id;
+                //  });
+                // },
+                addBtn: false,
+                menu: true,
+                size: "small",
+                props: {
+                    labelText: "标题",
+                    label: "title",
+                    value: "value",
+                    children: "children",
+                },
+            },
             option: {
                 labelWidth: 140,
                 viewLabelWidth: 140,
@@ -73,10 +129,11 @@ export default {
                 border: true,
                 index: true,
                 selection: false,
-                viewBtn: false,
+                viewBtn: true,
                 viewTitle: "现场巡检",
-                editBtn: true,
-                delBtn: true,
+                editBtn: false,
+                delBtn: false,
+                addBtn: false,
                 menuWidth: 220,
                 dialogType: "drawer",
                 dialogClickModal: false,
@@ -96,27 +153,66 @@ export default {
                                 htmltext = '<b style="color:blue">应急发起巡查</b>';
                             }
                             return htmltext;
-                        }
+                        },
+                        viewDisplay: false
+                    },
+                    {
+                        label: "危险区",
+                        prop: "dangerAreaName",
+                        span: 24,
+                    },
+                    {
+                        label: "行政区",
+                        prop: "fullAadName",
+                        span: 24,
                     },
                     {
                         label: "经度",
                         prop: "longitude",
                         span: 24,
+                        hide: true,
                     },
                     {
                         label: "纬度",
                         prop: "latitude",
                         span: 24,
+                        hide: true,
                     },
                     {
                         label: "定位地址",
                         prop: "address",
                         span: 24,
+                        hide: true,
                     },
                     {
                         label: "是否有山洪",
                         prop: "isFlood",
                         span: 24,
+                        type: 'radio',
+                        hide: true,
+                        dicData: [{
+                            label: '否',
+                            value: 0
+                        }, {
+                            label: '是',
+                            value: 1
+                        }],
+                        // html: true,
+                        // formatter: (val) => {
+                        //     let htmltext = '';
+                        //     if (val.isFlood === 0) {
+                        //         htmltext = '<b style="color:blue">否</b>';
+                        //     } else {
+                        //         htmltext = '<b style="color:red">是</b>';
+                        //     }
+                        //     return htmltext;
+                        // },
+                    },
+                    {
+                        label: "是否有山洪",
+                        prop: "isFlood2",
+                        span: 24,
+                        viewDisplay: false,
                         html: true,
                         formatter: (val) => {
                             let htmltext = '';
@@ -126,12 +222,27 @@ export default {
                                 htmltext = '<b style="color:red">是</b>';
                             }
                             return htmltext;
-                        }
+                        },
                     },
                     {
                         label: "是否成灾",
                         prop: "isDamage",
+                        type: 'radio',
                         span: 24,
+                        hide: true,
+                        dicData: [{
+                            label: '否',
+                            value: 0
+                        }, {
+                            label: '是',
+                            value: 1
+                        }],
+                    },
+                    {
+                        label: "是否成灾",
+                        prop: "isDamage2",
+                        span: 24,
+                        viewDisplay: false,
                         html: true,
                         formatter: (val) => {
                             let htmltext = '';
@@ -143,10 +254,83 @@ export default {
                             return htmltext;
                         }
                     },
+                    {
+                        label: "是否预警",
+                        prop: "isWarn",
+                        span: 24,
+                        type: 'radio',
+                        hide: true,
+                        dicData: [{
+                            label: '否',
+                            value: 0
+                        }, {
+                            label: '是',
+                            value: 1
+                        }],
+                    },
+                    {
+                        label: "是否预警",
+                        prop: "isWarn2",
+                        span: 24,
+                        viewDisplay: false,
+                        html: true,
+                        formatter: (val) => {
+                            let htmltext = '';
+                            if (val.isWarn === 0) {
+                                htmltext = '<b style="color:blue">否</b>';
+                            } else {
+                                htmltext = '<b style="color:red">是</b>';
+                            }
+                            return htmltext;
+                        }
+                    },
+                    {
+                        label: "预警信息",
+                        prop: "warnInfo",
+                        span: 24,
+                        hide: true,
+                    },
+                    {
+                        label: "是否转移",
+                        prop: "isTransfer",
+                        span: 24,
+                        type: 'radio',
+                        hide: true,
+                        dicData: [{
+                            label: '否',
+                            value: 0
+                        }, {
+                            label: '是',
+                            value: 1
+                        }],
+                    },
+                    {
+                        label: "是否转移",
+                        prop: "isTransfer2",
+                        span: 24,
+                        viewDisplay: false,
+                        html: true,
+                        formatter: (val) => {
+                            let htmltext = '';
+                            if (val.isTransfer === 0) {
+                                htmltext = '<b style="color:blue">否</b>';
+                            } else {
+                                htmltext = '<b style="color:red">是</b>';
+                            }
+                            return htmltext;
+                        }
+                    },
+                    {
+                        label: "人员转移信息",
+                        prop: "transferInfo",
+                        span: 24,
+                        hide: true,
+                    },
                     {
                         label: "巡查说明",
                         prop: "remark",
                         span: 24,
+                        hide: true,
                     },
                     {
                         label: "巡查时间",
@@ -178,8 +362,23 @@ export default {
     },
     mounted() { },
     created() {
+        this.initTree();
     },
     methods: {
+        initTree() {
+            this.treeData = [];
+            getTree().then(res => {
+                this.treeData = res.data.data.map(item => {
+                    return {
+                        ...item,
+                        leaf: !item.hasChildren
+                    }
+                })
+                this.treeCode = this.treeData[0].id;
+                this.treeOption.defaultExpandedKeys.push(this.treeData[0].id);
+
+            });
+        },
         toCheckInfo(row) {
             this.id = row.id;
             this.yjdangerareacheckdetailDialog = true;
@@ -187,12 +386,23 @@ export default {
                 this.$refs["yjdangerareacheckdetailView"].initData();
             });
         },
+        nodeClick(data) {
+            this.treeCode = data.id;
+            this.treeParentCode = data.parentId;
+            this.query = {};
+            this.query['adcd'] = this.treeCode;
+            this.page.currentPage = 1;
+            var params = {};
+            this.onLoad(this.page, params);
+        },
         searchReset() {
             this.query = {};
+            this.query['adcd'] = this.treeCode;
+            this.page.currentPage = 1;
             this.onLoad(this.page);
         },
         searchChange(params, done) {
-            this.query = params;
+            // this.query = params;
             this.page.currentPage = 1;
             this.onLoad(this.page, params);
             done();

+ 39 - 22
src/views/business/yjxt/yjdangerarearesident.vue

@@ -51,7 +51,8 @@
 <script>
 
 import { getPage, getDetail } from "@/api/business/yj/residentregister.js";
-import { getLazyTree } from "@/api/baseinfo/wholeregion.js";
+// import { getLazyTree } from "@/api/baseinfo/wholeregion.js";
+import { getTree } from "@/api/baseinfo/region.js";
 import yjresidentfamilymembers from './yjresidentfamilymembers.vue'
 import { mapGetters } from "vuex";
 export default {
@@ -79,21 +80,21 @@ export default {
             treeOption: {
                 nodeKey: "id",
                 defaultExpandedKeys: [],
-                lazy: true,
-                treeLoad: function (node, resolve) {
-                    const parentCode = (node.level === 0) ? "00" : node.data.value;
-                    getLazyTree(parentCode).then(res => {
-                        resolve(res.data.data.map(item => {
-                            return {
-                                ...item,
-                                leaf: !item.hasChildren
-                            }
-                        }))
+                lazy: false,
+                // treeLoad: function (node, resolve) {
+                //     const parentCode = (node.level === 0) ? "00" : node.data.value;
+                //     getLazyTree(parentCode).then(res => {
+                //         resolve(res.data.data.map(item => {
+                //             return {
+                //                 ...item,
+                //                 leaf: !item.hasChildren
+                //             }
+                //         }))
 
-                        // this.treeOption.defaultExpandedKeys.push(this.treeData[0].id);
-                        // this.treeCode = this.treeData[0].id;
-                    });
-                },
+                // this.treeOption.defaultExpandedKeys.push(this.treeData[0].id);
+                // this.treeCode = this.treeData[0].id;
+                //  });
+                // },
                 addBtn: false,
                 menu: true,
                 size: "small",
@@ -135,7 +136,7 @@ export default {
                         span: 24,
                     },
                     {
-                        label: "身份证号",
+                        label: "手机号",
                         prop: "personId",
                         search: true,
                         span: 24,
@@ -146,7 +147,7 @@ export default {
                     },
                     {
                         label: "行政区",
-                        prop: "adName",
+                        prop: "fullAadName",
                         span: 24,
                     },
                 ],
@@ -174,8 +175,23 @@ export default {
     },
     mounted() { },
     created() {
+        this.initTree();
     },
     methods: {
+        initTree() {
+            this.treeData = [];
+            getTree().then(res => {
+                this.treeData = res.data.data.map(item => {
+                    return {
+                        ...item,
+                        leaf: !item.hasChildren
+                    }
+                })
+                this.treeCode = this.treeData[0].id;
+                this.treeOption.defaultExpandedKeys.push(this.treeData[0].id);
+
+            });
+        },
         // rowSave(row, done, loading) {
         //     add(row).then(
         //         () => {
@@ -236,19 +252,20 @@ export default {
         nodeClick(data) {
             this.treeCode = data.id;
             this.treeParentCode = data.parentId;
-            // this.query = {};
-            // this.query['dangerAreaCode'] = this.treeCode;
+            this.query = {};
+            this.query['dangerAreaCode'] = this.treeCode;
             this.page.currentPage = 1;
             var params = {};
-            // params['dangerAreaCode'] = this.treeCode;
             this.onLoad(this.page, params);
         },
         searchReset() {
             this.query = {};
+            this.query['dangerAreaCode'] = this.treeCode;
+            this.page.currentPage = 1;
             this.onLoad(this.page);
         },
         searchChange(params, done) {
-            this.query = params;
+            // this.query = params;
             this.page.currentPage = 1;
             this.onLoad(this.page, params);
             done();
@@ -304,7 +321,7 @@ export default {
         },
         onLoad(page, params = {}) {
             this.loading = true;
-            params['dangerAreaCode'] = this.treeCode;
+            //  params['dangerAreaCode'] = this.treeCode;
             params['isHouseholder'] = 1;
             getPage(
                 page.currentPage,

+ 11 - 10
src/views/business/yjxt/yjresidentfamilymembers.vue

@@ -81,7 +81,7 @@ export default {
                         span: 24,
                     },
                     {
-                        label: "身份证号",
+                        label: "手机号",
                         prop: "personId",
                         span: 24,
                     },
@@ -99,16 +99,17 @@ export default {
                             }
                             return htmltext;
                         }
-                    }, {
-                        label: "危险区名称",
-                        prop: "dangerAreaName",
-                        span: 24,
-                    },
-                    {
-                        label: "行政区",
-                        prop: "adName",
-                        span: 24,
                     },
+                    //  {
+                    //     label: "危险区名称",
+                    //     prop: "dangerAreaName",
+                    //     span: 24,
+                    // },
+                    // {
+                    //     label: "行政区",
+                    //     prop: "adName",
+                    //     span: 24,
+                    // },
                 ],
             },
             data: [],

+ 78 - 12
src/views/business/yjxt/yjserviceperson.vue

@@ -9,22 +9,30 @@
 <template>
     <div>
         <el-row>
-            <el-col :span="24">
+            <el-col :span="6">
+                <div class="box">
+                    <el-scrollbar>
+                        <basic-container>
+                            <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick">
+                                <span class="el-tree-node__label" slot-scope="{ node, data }">
+                                    <span>
+                                        <i class="el-icon-office-building"></i>
+                                        {{ (node || {}).label }}
+                                    </span>
+                                </span>
+                            </avue-tree>
+                        </basic-container>
+                    </el-scrollbar>
+                </div>
+            </el-col>
+            <el-col :span="18">
                 <basic-container>
                     <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page"
-                        :before-open="beforeOpen" ref="crud" v-model="form" :permission="permissionList" @row-del="rowDel"
-                        @row-update="rowUpdate" @row-save="rowSave" @search-change="searchChange"
+                        :before-open="beforeOpen" ref="crud" v-model="form" :permission="permissionList"
+                        @row-del="rowDel" @row-update="rowUpdate" @row-save="rowSave" @search-change="searchChange"
                         @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
                         @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad"
                         @before-open="beforeOpen" @select-change="selectChange">
-                        <template slot="state" slot-scope="{ row }">
-                            <el-button type="text" @click="openConfig(row)"> 正常 </el-button>
-                        </template>
-                        <template slot-scope="{ row, index }" slot="menu">
-                        </template>
-                        <template slot="state" slot-scope="{ row }">
-                            <el-button type="text" @click="openConfig(row)"> 正常 </el-button>
-                        </template>
                     </avue-crud>
                 </basic-container>
             </el-col>
@@ -35,6 +43,7 @@
 <script>
 
 import { getPage, getDetail, add, update, remove } from "@/api/business/yj/yjserviceperson.js";
+import { getTree } from "@/api/baseinfo/region.js";
 import { mapGetters } from "vuex";
 export default {
     components: {
@@ -54,6 +63,37 @@ export default {
                 currentPage: 1,
                 total: 0,
             },
+            treeCode: '',
+            treeParentCode: '',
+            treeData: [],
+            treeOption: {
+                nodeKey: "id",
+                defaultExpandedKeys: [],
+                lazy: false,
+                // treeLoad: function (node, resolve) {
+                //     const parentCode = (node.level === 0) ? "00" : node.data.value;
+                //     getLazyTree(parentCode).then(res => {
+                //         resolve(res.data.data.map(item => {
+                //             return {
+                //                 ...item,
+                //                 leaf: !item.hasChildren
+                //             }
+                //         }))
+
+                // this.treeOption.defaultExpandedKeys.push(this.treeData[0].id);
+                // this.treeCode = this.treeData[0].id;
+                //  });
+                // },
+                addBtn: false,
+                menu: true,
+                size: "small",
+                props: {
+                    labelText: "标题",
+                    label: "title",
+                    value: "value",
+                    children: "children",
+                },
+            },
             option: {
                 labelWidth: 140,
                 viewLabelWidth: 140,
@@ -144,8 +184,32 @@ export default {
     },
     mounted() { },
     created() {
+        this.initTree();
     },
     methods: {
+        initTree() {
+            this.treeData = [];
+            getTree().then(res => {
+                this.treeData = res.data.data.map(item => {
+                    return {
+                        ...item,
+                        leaf: !item.hasChildren
+                    }
+                })
+                this.treeCode = this.treeData[0].id;
+                this.treeOption.defaultExpandedKeys.push(this.treeData[0].id);
+
+            });
+        },
+        nodeClick(data) {
+            this.treeCode = data.id;
+            this.treeParentCode = data.parentId;
+            this.query = {};
+            this.query['adCode'] = this.treeCode;
+            this.page.currentPage = 1;
+            var params = {};
+            this.onLoad(this.page, params);
+        },
         rowSave(row, done, loading) {
             add(row).then(
                 () => {
@@ -197,10 +261,12 @@ export default {
         },
         searchReset() {
             this.query = {};
+            this.query['adCode'] = this.treeCode;
+            this.page.currentPage = 1;
             this.onLoad(this.page);
         },
         searchChange(params, done) {
-            this.query = params;
+            // this.query = params;
             this.page.currentPage = 1;
             this.onLoad(this.page, params);
             done();

+ 14 - 2
src/views/business/yjxt/yjtransferresidentlist.vue

@@ -81,11 +81,23 @@ export default {
                         span: 24,
                     },
                     {
-                        label: "身份证号",
+                        label: "手机号",
                         prop: "personId",
                         span: 24,
                     },
-
+                    {
+                        label: "是否转移",
+                        prop: "warnId",
+                        span: 24,
+                        html: true,
+                        formatter: (val) => {
+                            if (val.warnId) {
+                                return '<b style="color:grey">已转移</b>'
+                            } else {
+                                return '<b style="color:red">未转移</b>'
+                            }
+                        }
+                    },
                 ],
             },
             data: [],

+ 43 - 21
src/views/business/yjxt/yjwarn.vue

@@ -70,7 +70,8 @@
 <script>
 
 import { getPage, getDetail } from "@/api/business/yj/yjwarn.js";
-import { getLazyTree } from "@/api/baseinfo/wholeregion.js";
+// import { getLazyTree } from "@/api/baseinfo/wholeregion.js";
+import { getTree } from "@/api/baseinfo/region.js";
 import { mapGetters } from "vuex";
 import yjdangerareachecklist from "./yjdangerareachecklist.vue";
 import yjtransferresidentlist from './yjtransferresidentlist.vue';
@@ -102,21 +103,21 @@ export default {
             treeOption: {
                 nodeKey: "id",
                 defaultExpandedKeys: [],
-                lazy: true,
-                treeLoad: function (node, resolve) {
-                    const parentCode = (node.level === 0) ? "00" : node.data.value;
-                    getLazyTree(parentCode).then(res => {
-                        resolve(res.data.data.map(item => {
-                            return {
-                                ...item,
-                                leaf: !item.hasChildren
-                            }
-                        }))
+                lazy: false,
+                // treeLoad: function (node, resolve) {
+                //     const parentCode = (node.level === 0) ? "00" : node.data.value;
+                //     getLazyTree(parentCode).then(res => {
+                //         resolve(res.data.data.map(item => {
+                //             return {
+                //                 ...item,
+                //                 leaf: !item.hasChildren
+                //             }
+                //         }))
 
-                        // this.treeOption.defaultExpandedKeys.push(this.treeData[0].id);
-                        // this.treeCode = this.treeData[0].id;
-                    });
-                },
+                // this.treeOption.defaultExpandedKeys.push(this.treeData[0].id);
+                // this.treeCode = this.treeData[0].id;
+                //     });
+                // },
                 addBtn: false,
                 menu: true,
                 size: "small",
@@ -160,13 +161,13 @@ export default {
                     {
                         label: "测站编码",
                         prop: "stcd",
-                        search: true,
                         span: 24,
                         hide: true,
                     },
                     {
                         label: "预警名称",
                         prop: "warnName",
+                        search: true,
                         span: 24,
                         overHidden: true,
                     },
@@ -175,6 +176,11 @@ export default {
                         prop: "warnTime",
                         span: 24,
                     },
+                    {
+                        label: "行政区",
+                        prop: "fullAadName",
+                        span: 24,
+                    },
                     {
                         label: "预警等级",
                         prop: "warnLevelCode",
@@ -413,8 +419,23 @@ export default {
     },
     mounted() { },
     created() {
+        this.initTree();
     },
     methods: {
+        initTree() {
+            this.treeData = [];
+            getTree().then(res => {
+                this.treeData = res.data.data.map(item => {
+                    return {
+                        ...item,
+                        leaf: !item.hasChildren
+                    }
+                })
+                this.treeCode = this.treeData[0].id;
+                this.treeOption.defaultExpandedKeys.push(this.treeData[0].id);
+
+            });
+        },
         // rowSave(row, done, loading) {
         //     add(row).then(
         //         () => {
@@ -481,19 +502,20 @@ export default {
         nodeClick(data) {
             this.treeCode = data.id;
             this.treeParentCode = data.parentId;
-            // this.query = {};
-            // this.query['dangerAreaCode'] = this.treeCode;
+            this.query = {};
+            this.query['warnAdcd'] = this.treeCode;
             this.page.currentPage = 1;
             var params = {};
-            // params['dangerAreaCode'] = this.treeCode;
             this.onLoad(this.page, params);
         },
         searchReset() {
             this.query = {};
+            this.query['warnAdcd'] = this.treeCode;
+            this.page.currentPage = 1;
             this.onLoad(this.page);
         },
         searchChange(params, done) {
-            this.query = params;
+            // this.query = params;
             this.page.currentPage = 1;
             this.onLoad(this.page, params);
             done();
@@ -549,7 +571,7 @@ export default {
         },
         onLoad(page, params = {}) {
             this.loading = true;
-            params['warnAdcd'] = this.treeCode;
+            // params['warnAdcd'] = this.treeCode;
             getPage(
                 page.currentPage,
                 page.pageSize,

+ 91 - 58
src/views/wel/index.vue

@@ -60,13 +60,13 @@
                                         <div style="display: flex; flex-direction: row;align-items: center;">
                                             <label style="color: rgb(64,158,255);">{{ item.rtuName }}</label>
                                             <label style="margin-left: 5px;color: rgb(64,158,255);">【{{ item.rtuCode
-                                            }}】</label>
+                                                }}】</label>
                                         </div>
                                         <div
                                             style="display: flex; flex-direction: row;align-items: center;margin-top: 4px;">
                                             <label style="font-size: 0.8rem;">维修状态:<span
                                                     style="font-size: 0.8rem;color:gray">{{
-                                                        item.orderStatusName }}</span></label>
+            item.orderStatusName }}</span></label>
                                         </div>
                                         <div
                                             style="display: flex; flex-direction: row;align-items: center;margin-top: 4px;">
@@ -81,8 +81,9 @@
                                         </div>
                                     </div>
                                     <div style="display: flex;flex-direction: row;justify-content: flex-end;">
-                                        <el-button style="font-size: 0.7rem;margin-right: 20px;" size="mini" type="primary"
-                                            round @click="openCheckOrderReportDetail(item)">查看详情</el-button>
+                                        <el-button style="font-size: 0.7rem;margin-right: 20px;" size="mini"
+                                            type="primary" round
+                                            @click="openCheckOrderReportDetail(item)">查看详情</el-button>
                                     </div>
                                 </el-col>
                                 <!-- <el-col :span="5" style="display: flex;flex-direction: column;justify-content: center;">
@@ -111,15 +112,15 @@
                                                 <div style="display: flex; flex-direction: row;align-items: center;">
                                                     <label style="color: rgb(64,158,255);">{{ item.rtuName }}</label>
                                                     <label style="margin-left: 5px;color: rgb(64,158,255);">【{{
-                                                        item.rtuCode
-                                                    }}】</label>
+            item.rtuCode
+        }}】</label>
                                                 </div>
                                                 <div
                                                     style="display: flex; flex-direction: row;align-items: center;margin-top: 4px;">
                                                     <label style="font-size: 0.8rem;">填报人:<span
                                                             style="color:gray;font-size: 0.8rem;">{{
-                                                                item.servicePersonName
-                                                            }}</span></label>
+                item.servicePersonName
+            }}</span></label>
                                                 </div>
                                                 <div
                                                     style="display: flex; flex-direction: row;align-items: center;margin-top: 4px;margin-bottom: 5px;">
@@ -164,8 +165,8 @@
                                     </div>
                                     <div style="margin-top: 4px;margin-bottom: 2px;">
                                         <label style="font-size: 0.8rem;">{{
-                                            item.content
-                                        }}</label>
+            item.content
+        }}</label>
                                     </div>
                                 </div>
                             </div>
@@ -192,8 +193,8 @@
                 </el-row>
             </el-col>
         </el-row>
-        <el-drawer title="今日维修任务动态信息" :visible.sync="moreTodayOrderProcessDig" v-if="moreTodayOrderProcessDig" size="50%"
-            :close-on-click-modal="false" append-to-body>
+        <el-drawer title="今日维修任务动态信息" :visible.sync="moreTodayOrderProcessDig" v-if="moreTodayOrderProcessDig"
+            size="50%" :close-on-click-modal="false" append-to-body>
             <todaycheckorderprocesslist ref="todaycheckorderprocesslist">
             </todaycheckorderprocesslist>
         </el-drawer>
@@ -253,8 +254,8 @@
             :close-on-click-modal="false" append-to-body>
             <outlitervaluewarnlist ref="outlitervaluewarnlist" :deptId="deptId"></outlitervaluewarnlist>
         </el-drawer>
-        <el-drawer title="处理中任务信息" :visible.sync="processingcheckorderlistDig" v-if="processingcheckorderlistDig" size="50%"
-            :close-on-click-modal="false" append-to-body>
+        <el-drawer title="处理中任务信息" :visible.sync="processingcheckorderlistDig" v-if="processingcheckorderlistDig"
+            size="50%" :close-on-click-modal="false" append-to-body>
             <processingcheckorderlist ref="processingcheckorderlist"></processingcheckorderlist>
         </el-drawer>
         <el-drawer title="已处理任务信息" :visible.sync="reportcheckorderlistDig" v-if="reportcheckorderlistDig" size="50%"
@@ -265,13 +266,14 @@
             :close-on-click-modal="false" append-to-body>
             <uncomfirecheckorderlist ref="uncomfirecheckorderlist"></uncomfirecheckorderlist>
         </el-drawer>
-        <el-drawer title="确认超时维修任务信息" :visible.sync="comfireDelayCheckOrderDig" v-if="comfireDelayCheckOrderDig" size="50%"
-            :close-on-click-modal="false" append-to-body>
+        <el-drawer title="确认超时维修任务信息" :visible.sync="comfireDelayCheckOrderDig" v-if="comfireDelayCheckOrderDig"
+            size="50%" :close-on-click-modal="false" append-to-body>
             <comfiredelaycheckorderlist ref="comfiredelaycheckorderlist"></comfiredelaycheckorderlist>
         </el-drawer>
-        <el-drawer title="维修任务详情" :visible.sync="checkorderprocessdetailDig" v-if="checkorderprocessdetailDig" size="50%"
-            :close-on-click-modal="false" append-to-body>
-            <checkorderprocessdetail ref="checkorderprocessdetail" :orderId="checkOrderReportId"></checkorderprocessdetail>
+        <el-drawer title="维修任务详情" :visible.sync="checkorderprocessdetailDig" v-if="checkorderprocessdetailDig"
+            size="50%" :close-on-click-modal="false" append-to-body>
+            <checkorderprocessdetail ref="checkorderprocessdetail" :orderId="checkOrderReportId">
+            </checkorderprocessdetail>
         </el-drawer>
         <el-drawer title="设备巡检详情" :visible.sync="inspectionreportdetailDig" v-if="inspectionreportdetailDig" size="50%"
             :close-on-click-modal="false" append-to-body>
@@ -282,7 +284,8 @@
             <div slot="title" class="header-title">
                 <span class="name">{{ dialogTitle }}</span>
             </div>
-            <inspectionreportlistVue ref="inspectionreportlist" :rainSeasonKind="rainSeasonKind"></inspectionreportlistVue>
+            <inspectionreportlistVue ref="inspectionreportlist" :rainSeasonKind="rainSeasonKind">
+            </inspectionreportlistVue>
         </el-drawer>
     </div>
 </template>
@@ -1249,7 +1252,7 @@ export default {
             this.rtuWarnCountMap.setOption(this.rtuWarnCountOption);
             this.rtuWarnCountMap.getZr().off('click');
             this.rtuWarnCountMap.getZr().on('click', function (p) {
-               // console.log(p)
+                // console.log(p)
                 let pointInPixel = [p.offsetX, p.offsetY];
                 if (that.rtuWarnCountMap.containPixel('grid', pointInPixel)) {
                     let yIndex = that.rtuWarnCountMap.convertFromPixel({ seriesIndex: 0 }, [p.offsetX, p.offsetY])[1];
@@ -1560,45 +1563,75 @@ export default {
         },
         getWarnKindCountInfo() {
             getWarnKindCountData().then((res) => {
-                //  console.log("warn kind count " + JSON.stringify(res.data))
                 if (res.data.code === 200) {
                     let data = res.data.data;
                     this.rtuWarnCountOption.series[0].data[8].value = data.warnRtus;
-
-                    let num = new Number(data.offlineRtus / data.warnRtus * 100);
-                    this.rtuWarnCountOption.series[0].data[7].value = data.offlineRtus;
-                    this.rtuWarnCountOption.series[0].data[7].percent = num.toFixed(1);
-
-                    num = new Number(data.clockWarn / data.warnRtus * 100);
-                    this.rtuWarnCountOption.series[0].data[6].value = data.clockWarn;
-                    this.rtuWarnCountOption.series[0].data[6].percent = num.toFixed(1);
-
-                    num = new Number(data.rainUpMissOut / data.warnRtus * 100);
-                    this.rtuWarnCountOption.series[0].data[5].value = data.rainUpMissOut;
-                    this.rtuWarnCountOption.series[0].data[5].percent = num.toFixed(1);
-
-                    num = new Number(data.riverUpMissOut / data.warnRtus * 100);
-                    this.rtuWarnCountOption.series[0].data[4].value = data.riverUpMissOut;
-                    this.rtuWarnCountOption.series[0].data[4].percent = num.toFixed(1);
-
-
-                    num = new Number(data.minUpDelay / data.warnRtus * 100);
-                    this.rtuWarnCountOption.series[0].data[3].value = data.minUpDelay;
-                    this.rtuWarnCountOption.series[0].data[3].percent = num.toFixed(1);
-
-
-                    num = new Number(data.rainHourUpDelay / data.warnRtus * 100);
-                    this.rtuWarnCountOption.series[0].data[2].value = data.rainHourUpDelay;
-                    this.rtuWarnCountOption.series[0].data[2].percent = num.toFixed(1);
-
-                    num = new Number(data.riverHourUpDelay / data.warnRtus * 100);
-                    this.rtuWarnCountOption.series[0].data[1].value = data.riverHourUpDelay;
-                    this.rtuWarnCountOption.series[0].data[1].percent = num.toFixed(1);
-
-                    num = new Number(data.outlierValue / data.warnRtus * 100);
-                    this.rtuWarnCountOption.series[0].data[0].value = data.outlierValue;
-                    this.rtuWarnCountOption.series[0].data[0].percent = num.toFixed(1);
-
+                    if (data.warnRtus > 0 && data.offlineRtus > 0) {
+                        let num = new Number(data.offlineRtus / data.warnRtus * 100);
+                        this.rtuWarnCountOption.series[0].data[7].value = data.offlineRtus;
+                        this.rtuWarnCountOption.series[0].data[7].percent = num.toFixed(1);
+                    } else {
+                        this.rtuWarnCountOption.series[0].data[7].value = 0;
+                        this.rtuWarnCountOption.series[0].data[7].percent = 0;
+                    }
+                    if (data.warnRtus > 0 && data.clockWarn > 0) {
+                        let num = new Number(data.clockWarn / data.warnRtus * 100);
+                        this.rtuWarnCountOption.series[0].data[6].value = data.clockWarn;
+                        this.rtuWarnCountOption.series[0].data[6].percent = num.toFixed(1);
+                    } else {
+                        this.rtuWarnCountOption.series[0].data[6].value = 0;
+                        this.rtuWarnCountOption.series[0].data[6].percent = 0;
+                    }
+                    if (data.warnRtus > 0 && data.rainUpMissOut > 0) {
+
+                        let num = new Number(data.rainUpMissOut / data.warnRtus * 100);
+                        this.rtuWarnCountOption.series[0].data[5].value = data.rainUpMissOut;
+                        this.rtuWarnCountOption.series[0].data[5].percent = num.toFixed(1);
+                    } else {
+                        this.rtuWarnCountOption.series[0].data[5].value = 0;
+                        this.rtuWarnCountOption.series[0].data[5].percent = 0;
+                    }
+                    if (data.warnRtus > 0 && data.riverUpMissOut > 0) {
+
+                        let num = new Number(data.riverUpMissOut / data.warnRtus * 100);
+                        this.rtuWarnCountOption.series[0].data[4].value = data.riverUpMissOut;
+                        this.rtuWarnCountOption.series[0].data[4].percent = num.toFixed(1);
+                    } else {
+                        this.rtuWarnCountOption.series[0].data[4].value = 0;
+                        this.rtuWarnCountOption.series[0].data[4].percent = 0;
+                    }
+                    if (data.warnRtus > 0 && data.minUpDelay > 0) {
+                        let num = new Number(data.minUpDelay / data.warnRtus * 100);
+                        this.rtuWarnCountOption.series[0].data[3].value = data.minUpDelay;
+                        this.rtuWarnCountOption.series[0].data[3].percent = num.toFixed(1);
+                    } else {
+                        this.rtuWarnCountOption.series[0].data[3].value = 0;
+                        this.rtuWarnCountOption.series[0].data[3].percent = 0;
+                    }
+                    if (data.warnRtus > 0 && data.rainHourUpDelay > 0) {
+                        let num = new Number(data.rainHourUpDelay / data.warnRtus * 100);
+                        this.rtuWarnCountOption.series[0].data[2].value = data.rainHourUpDelay;
+                        this.rtuWarnCountOption.series[0].data[2].percent = num.toFixed(1);
+                    } else {
+                        this.rtuWarnCountOption.series[0].data[2].value = 0;
+                        this.rtuWarnCountOption.series[0].data[2].percent = 0;
+                    }
+                    if (data.warnRtus > 0 && data.riverHourUpDelay > 0) {
+                        let num = new Number(data.riverHourUpDelay / data.warnRtus * 100);
+                        this.rtuWarnCountOption.series[0].data[1].value = data.riverHourUpDelay;
+                        this.rtuWarnCountOption.series[0].data[1].percent = num.toFixed(1);
+                    } else {
+                        this.rtuWarnCountOption.series[0].data[1].value = 0;
+                        this.rtuWarnCountOption.series[0].data[1].percent = 0;
+                    }
+                    if (data.warnRtus > 0 && data.riverHourUpDelay > 0) {
+                        let num = new Number(data.outlierValue / data.warnRtus * 100);
+                        this.rtuWarnCountOption.series[0].data[0].value = data.outlierValue;
+                        this.rtuWarnCountOption.series[0].data[0].percent = num.toFixed(1);
+                    } else {
+                        this.rtuWarnCountOption.series[0].data[0].value = 0;
+                        this.rtuWarnCountOption.series[0].data[0].percent = 0;
+                    }
                     this.rtuWarnCountMap.setOption(this.rtuWarnCountOption);
                 }
             });
@@ -1738,7 +1771,7 @@ export default {
     },
 };
 </script>
-  
+
 <style>
 .box-card {
     width: 100%;

+ 2 - 2
src/views/yj/residentregister.vue

@@ -38,7 +38,7 @@ export default {
                         }],
                     },
                     {
-                        label: '身份证号',
+                        label: '手机号',
                         prop: 'personId',
                         span: 24,
                         rules: [{
@@ -86,7 +86,7 @@ export default {
                                 label: '姓名',
                                 prop: "personName"
                             }, {
-                                label: '身份证号',
+                                label: '手机号',
                                 prop: "personId"
                             },]
                         }