소스 검색

诱捕器管理更新 1/26

zhangyun 4 년 전
부모
커밋
e4c7e34250

+ 3 - 3
minggao/config/index.js

@@ -12,8 +12,8 @@ module.exports = {
     assetsPublicPath: '/',
     proxyTable: {
       '/api': {
-        // target: 'http://192.168.1.17:12345', //翟毅飞
-        target: 'http://192.168.1.77:12345', //曹世祥
+        target: 'http://192.168.1.17:12345', //翟毅飞
+        // target: 'http://192.168.1.77:12345', //曹世祥
         changeOrigin: true,
         pathRewrite: { 
           '^/api': '/api' //重写接口
@@ -22,7 +22,7 @@ module.exports = {
     },
 
     // Various Dev Server settings
-    host: '192.168.1.29', // can be overwritten by process.env.HOST
+    host: '192.168.1.4', // can be overwritten by process.env.HOST
     port: 8888, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
     autoOpenBrowser: false,
     errorOverlay: true,

+ 3 - 3
minggao/package-lock.json

@@ -10928,9 +10928,9 @@
       "dev": true
     },
     "v-viewer": {
-      "version": "1.6.4",
-      "resolved": "https://registry.npmmirror.com/v-viewer/download/v-viewer-1.6.4.tgz",
-      "integrity": "sha1-OeNrU0uqs0B2+4FnBManNN4Nxy8=",
+      "version": "1.5.1",
+      "resolved": "https://registry.nlark.com/v-viewer/download/v-viewer-1.5.1.tgz?cache=0&sync_timestamp=1632202257840&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fv-viewer%2Fdownload%2Fv-viewer-1.5.1.tgz",
+      "integrity": "sha1-lIBNg4FMylZuaRM5/h5keTSG8gA=",
       "dev": true,
       "requires": {
         "throttle-debounce": "^2.0.1",

+ 9 - 9
minggao/package.json

@@ -30,9 +30,12 @@
     "chalk": "^2.0.1",
     "copy-webpack-plugin": "^4.0.1",
     "css-loader": "^0.28.0",
+    "echarts": "^4.7.0",
+    "echarts-extension-amap": "^1.9.2",
     "extract-text-webpack-plugin": "^3.0.0",
     "file-loader": "^1.1.4",
     "friendly-errors-webpack-plugin": "^1.6.1",
+    "highcharts": "^8.0.4",
     "html-webpack-plugin": "^2.30.1",
     "less-loader": "^5.0.0",
     "mockjs": "^1.1.0",
@@ -46,23 +49,20 @@
     "rimraf": "^2.6.0",
     "semver": "^5.3.0",
     "shelljs": "^0.7.6",
+    "swiper": "^3.4.2",
     "uglifyjs-webpack-plugin": "^1.1.1",
     "url-loader": "^0.5.8",
+    "v-viewer": "^1.5.1",
+    "vue-highcharts": "^0.1.0",
+    "vue-lazyload": "^1.3.3",
     "vue-loader": "^13.3.0",
+    "vue-picture-bd-marker": "^1.3.8",
     "vue-style-loader": "^3.0.1",
     "vue-template-compiler": "^2.5.2",
     "webpack": "^3.6.0",
     "webpack-bundle-analyzer": "^2.9.0",
     "webpack-dev-server": "^2.9.1",
-    "webpack-merge": "^4.1.0",
-    "highcharts": "^8.0.4",
-    "echarts": "^4.7.0",
-    "echarts-extension-amap": "^1.9.2",
-    "vue-picture-bd-marker": "^1.3.8",
-    "v-viewer": "^1.5.1",
-    "swiper": "^3.4.2",
-    "vue-lazyload": "^1.3.3",
-    "vue-highcharts": "^0.1.0"
+    "webpack-merge": "^4.1.0"
   },
   "engines": {
     "node": ">= 6.0.0",

+ 8 - 2
minggao/src/main.js

@@ -1,5 +1,3 @@
-// The Vue build version to load with the `import` command
-// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
 import Vue from 'vue'
 import App from './App'
 import ElementUI from 'element-ui';
@@ -8,6 +6,14 @@ import store from '@/store/store.js'
 import less from 'less'
 Vue.use(less)
 
+import Viewer from 'v-viewer'
+import 'viewerjs/dist/viewer.css'
+Vue.use(Viewer, {
+  defaultOptions: {
+    "zIndex": 9999,
+  }
+})
+
 Vue.prototype.$store = store
 
 import 'element-ui/lib/theme-chalk/index.css'

+ 37 - 0
minggao/src/page/commandCenter/realTime.vue

@@ -0,0 +1,37 @@
+<!--  -->
+<template>
+  <div class="">
+      实时通信
+  </div>
+</template>
+
+<script>
+
+export default {
+  //import引入的组件需要注入到对象中才能使用
+  components: {},
+  data() {
+    //这里存放数据
+    return {};
+  },
+  //监听属性 类似于data概念
+  computed: {},
+  //监控data中的数据变化
+  watch: {},
+  //方法集合
+  methods: {},
+  //生命周期 - 创建完成(可以访问当前this实例)
+  created() {},
+  //生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {},
+  beforeCreate() {}, //生命周期 - 创建之前
+  beforeMount() {}, //生命周期 - 挂载之前
+  beforeUpdate() {}, //生命周期 - 更新之前
+  updated() {}, //生命周期 - 更新之后
+  beforeDestroy() {}, //生命周期 - 销毁之前
+  destroyed() {}, //生命周期 - 销毁完成
+  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
+};
+</script>
+<style lang='less' scoped>
+</style>

+ 60 - 22
minggao/src/page/systemmanger/customsManger.vue

@@ -1,22 +1,25 @@
 <!--  -->
 <template>
   <div class="customsManger_box">
-    <el-card>
+    <el-card :style="'height:' + fullHeight + 'px'">
       <!-- 筛选 -->
       <el-row>
         <el-col>
           <!-- 组织搜索 -->
           <div class="search_box">
             <el-input
-              size="small"
+              size="mini"
               placeholder="请输入组织名称"
-              v-model="input"
+              v-model.trim="input"
+              @change="searchData"
               clearable
             >
             </el-input>
             <div class="btn_box">
-              <el-button type="primary" size="small">搜索</el-button>
-              <el-button type="primary" size="small" @click="addrUser"
+              <el-button type="primary" size="mini" @change="searchData"
+                >搜索</el-button
+              >
+              <el-button type="primary" size="mini" @click="addrUser"
                 >添加用户</el-button
               >
             </div>
@@ -38,6 +41,7 @@
 
       <!-- 分页 -->
       <el-pagination
+        style="position: absolute; bottom: 0; left: 50%"
         :page-size="10"
         @current-change="newPage"
         :current-page="page"
@@ -78,7 +82,7 @@
           <el-input
             style="width: 80%"
             size="mini"
-            v-model="form.name"
+            v-model.trim="form.name"
           ></el-input>
         </el-form-item>
 
@@ -106,6 +110,7 @@ export default {
   data() {
     //这里存放数据
     return {
+      fullHeight: document.documentElement.clientHeight - 116, //
       input: "", // 组织搜索
       treeDataSource: [],
       tableSum: 0, // 表格列表总数
@@ -138,18 +143,42 @@ export default {
         this.form.name = ""; // 清除组织名称值
       }
     },
+
+    fullHeight(val) {
+      //监控浏览器高度变化
+      if (!this.timer) {
+        this.fullHeight = val;
+        this.timer = true;
+        let that = this;
+        setTimeout(function () {
+          //防止过度调用监测事件,导致卡顿
+          that.timer = false;
+        }, 400);
+      }
+    },
   },
   //方法集合
   methods: {
+    //动态获取浏览器高度
+    get_boderHeight() {
+      const that = this;
+      window.onresize = () => {
+        return (() => {
+          window.fullHeight = document.documentElement.clientHeight;
+          that.fullHeight = window.fullHeight;
+        })();
+      };
+    },
+
     // 树形表格
     orderByFunc(val) {
-      alert("排序");
-      alert(val);
+      console.log("排序");
+      console.log(val);
     },
     // 编辑
     actionFunc(m) {
       console.log(m);
-      this.userData = m
+      this.userData = m;
       this.tltData = "编辑隶属海关"; //改变弹框标题
       if (m.level == 1) {
         this.$set(this.higherList, 0, {
@@ -188,16 +217,16 @@ export default {
             .then((res) => {
               if (res.data.data == true) {
                 this.$message({
-                  message: '删除成功了',
-                  type: 'success',
-                  duration: 1500
+                  message: "删除成功了",
+                  type: "success",
+                  duration: 1500,
                 });
-                this.tabListData()
+                this.tabListData();
               } else {
                 this.$message({
-                  message: '删除失败',
-                  type: 'error',
-                  duration: 1500
+                  message: "删除失败",
+                  type: "error",
+                  duration: 1500,
                 });
               }
               // console.log(res);
@@ -227,7 +256,7 @@ export default {
     },
     // 添加下级组织
     addOrganization(m) {
-      console.log(m)
+      console.log(m);
       this.tltData = "添加隶属海关"; //改变弹框标题
       this.$set(this.higherList, 0, {
         value: m.id,
@@ -263,7 +292,7 @@ export default {
 
     // 添加用户 || 编辑用户 -- 确定
     onSubmit() {
-      var that = this
+      var that = this;
       if (this.form.name == "") {
         this.$message({
           message: "请填写组织名称!",
@@ -293,7 +322,7 @@ export default {
             parent_org_id: that.higherList[0].value, // 上级组织id,没有上级组织表示创建的组织是顶级组织
           });
         }
- 
+
         this.$axios({
           method: "POST",
           url,
@@ -307,8 +336,8 @@ export default {
                 type: "success",
                 duration: 1500,
               });
-              this.addrUserVisible = false
-              this.tabListData()
+              this.addrUserVisible = false;
+              this.tabListData();
             } else {
               this.$message({
                 message: "失败!",
@@ -339,12 +368,20 @@ export default {
           if (res.data.data.total_item !== 0) {
             this.treeDataSource = res.data.data.page_list;
             this.tableSum = res.data.data.total_item;
+          } else {
+            this.treeDataSource = [];
+            this.tableSum = 0;
           }
         })
         .catch((err) => {
           // console.log(err);
         });
     },
+
+    // 搜索
+    searchData() {
+      this.tabListData();
+    },
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {},
@@ -385,7 +422,8 @@ export default {
 .search_box {
   display: flex;
   /deep/.el-input {
-    width: 300px;
+    // width: 300px;
+    width: 15%;
   }
   .btn_box {
     margin: 0 0 0 15px;

+ 249 - 0
minggao/src/page/systemmanger/dayRecord.vue

@@ -0,0 +1,249 @@
+<!--  -->
+<template>
+  <div class="dayRecord_box">
+    <el-card :style="'height:' + fullHeight + 'px'">
+      <!-- 筛选 -->
+      <el-row>
+        <el-col>
+          <!-- 搜索 -->
+          <div class="search_box">
+            <el-input
+              size="mini"
+              placeholder="请输入操作人员"
+              v-model.trim="input"
+              @change="searchData"
+              clearable
+            >
+            </el-input>
+            <el-input
+              size="mini"
+              placeholder="请输入操作角色"
+              v-model.trim="input1"
+              @change="searchData"
+              clearable
+            >
+            </el-input>
+            <el-date-picker
+              size="mini"
+              v-model="value1"
+              @change="searchData"
+              type="datetimerange"
+              range-separator="至"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+              align="right"
+            >
+            </el-date-picker>
+            <div class="btn_box">
+              <el-button type="primary" size="mini" @click="searchData"
+                >搜索</el-button
+              >
+              <el-button type="primary" size="mini" @click="reset">重置</el-button>
+            </div>
+          </div>
+        </el-col>
+      </el-row>
+
+      <!-- 表格 -->
+      <el-table :data="tableData" stripe style="width: 100%">
+        <el-table-column prop="id" label="序号" width="180"> </el-table-column>
+        <el-table-column prop="create_time" label="操作时间" width="200">
+        </el-table-column>
+        <el-table-column prop="user_name" label="操作人员" width="280">
+        </el-table-column>
+        <el-table-column prop="role_name" label="操作账号"></el-table-column>
+        <el-table-column prop="ip" label="IP"></el-table-column>
+        <el-table-column label="操作">
+          <template slot-scope="scope">
+            <a class="reset" href="javascript:;" @click="detailsFunc(scope.row)"
+              >详情</a
+            >
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <!-- 分页 -->
+      <el-pagination
+        style="margin: 60px 0 0 0"
+        :page-size="10"
+        @current-change="newPage"
+        :current-page="page"
+        v-if="tableData.length > 0"
+        background
+        layout="prev, pager, next, jumper"
+        :total="tableSum"
+      >
+      </el-pagination>
+    </el-card>
+
+    <!-- 详情弹框 -->
+    <el-dialog title="动作详情" :visible.sync="dialogVisible" width="30%">
+      <div>
+        <span>{{ objData.action }}:</span>
+        <span>{{ objData.op_details }}</span>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  //import引入的组件需要注入到对象中才能使用
+  components: {},
+  data() {
+    //这里存放数据
+    return {
+      fullHeight: document.documentElement.clientHeight - 116, //
+      input: "",
+      input1: "",
+      value1: "",
+      startTime: "",
+      endTime: "",
+
+      // 表格
+      tableData: [],
+
+      // 分页
+      page: 1,
+      tableSum: 0,
+
+      // 弹框
+      dialogVisible: false,
+      objData: {},
+    };
+  },
+  //监听属性 类似于data概念
+  computed: {},
+  //监控data中的数据变化
+  watch: {
+    fullHeight(val) {
+      //监控浏览器高度变化
+      if (!this.timer) {
+        this.fullHeight = val;
+        this.timer = true;
+        let that = this;
+        setTimeout(function () {
+          //防止过度调用监测事件,导致卡顿
+          that.timer = false;
+        }, 400);
+      }
+    },
+  },
+  //方法集合
+  methods: {
+    //动态获取浏览器高度
+    get_boderHeight() {
+      const that = this;
+      window.onresize = () => {
+        return (() => {
+          window.fullHeight = document.documentElement.clientHeight;
+          that.fullHeight = window.fullHeight;
+        })();
+      };
+    },
+
+    // 下一页
+    newPage(page) {
+      this.page = page;
+    },
+
+    // 详情
+    detailsFunc(data) {
+      this.objData = data;
+      this.dialogVisible = true;
+    },
+
+    // 表格列表
+    tableList() {
+      this.$axios({
+        method: "POST",
+        url: "/api/api_gateway?method=log.szmg_log.operation_log_list",
+        data: this.qs.stringify({
+          page: this.page,
+          page_item: "10",
+          user_name: this.input, // 用户名
+          role_name: this.input1, // 角色名称
+          start_time: this.startTime, // 开始时间
+          end_time: this.endTime, // 结束时间
+        }),
+      })
+        .then((res) => {
+          console.log(res);
+          if (res.data.data.page_item !== 0) {
+            this.tableData = res.data.data.page_list;
+            this.tableSum = res.data.data.page_item;
+          }
+        })
+        .catch((err) => {
+          // console.log(err)
+        });
+    },
+
+    // 搜索
+    searchData() {
+      // this.startTime = this.formatTime(this.value1[0], "yyyy-MM-dd hh:mm:ss")
+      if (this.value1) {
+        this.startTime = this.formatTime(this.value1[0], "yyyy-MM-dd");
+        this.endTime = this.formatTime(this.value1[1], "yyyy-MM-dd");
+      } else {
+        this.startTime = "";
+        this.endTime = "";
+      }
+      // console.log(this.startTime)
+      // console.log(this.endTime)
+      this.tableList();
+    },
+
+    // 重置
+    reset() {
+      this.value1 = ''
+      this.input = ''
+      this.input1 = ''
+      this.startTime = ''
+      this.endTime = ''
+      this.tableList()
+    },
+  },
+  //生命周期 - 创建完成(可以访问当前this实例)
+  created() {},
+  //生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {
+    this.tableList();
+  },
+  beforeCreate() {}, //生命周期 - 创建之前
+  beforeMount() {}, //生命周期 - 挂载之前
+  beforeUpdate() {}, //生命周期 - 更新之前
+  updated() {}, //生命周期 - 更新之后
+  beforeDestroy() {}, //生命周期 - 销毁之前
+  destroyed() {}, //生命周期 - 销毁完成
+  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
+};
+</script>
+<style lang='less' scoped>
+.dayRecord_box {
+  // 搜索
+  .search_box {
+    display: flex;
+    /deep/.el-input {
+      // width: 200px;
+      width: 15%;
+      margin: 0 15px 0 0;
+    }
+    .btn_box {
+      margin: 0 0 0 15px;
+    }
+
+    /deep/.el-range-editor--mini.el-input__inner {
+      // width: 330px;
+      width: 20%;
+    }
+  }
+
+  a {
+    text-decoration: none;
+  }
+  .reset {
+    color: #1890ff;
+  }
+}
+</style>

+ 421 - 0
minggao/src/page/systemmanger/harmfulBiology.vue

@@ -0,0 +1,421 @@
+<!--  -->
+<template>
+  <div class="harmfulBiology_box">
+    <el-card :style="'height:' + fullHeight + 'px'">
+      <!-- 筛选 -->
+      <el-row>
+        <el-col>
+          <!-- 组织搜索 -->
+          <div class="search_box">
+            <el-input
+              size="mini"
+              placeholder="请输入有害生物名称"
+              v-model.trim="input"
+              @change="searchData"
+              clearable
+            >
+            </el-input>
+            <div class="btn_box">
+              <el-button type="primary" size="mini" @click="searchData"
+                >搜索</el-button
+              >
+              <el-button type="primary" size="mini" @click="addrHarmfulBiology"
+                >添加有害生物</el-button
+              >
+            </div>
+          </div>
+        </el-col>
+      </el-row>
+
+      <!-- 列表 -->
+      <el-table :data="tableData" stripe style="width: 100%">
+        <el-table-column prop="ind" label="序号" width="120"> </el-table-column>
+        <el-table-column prop="pest_name" label="有害生物名称" width="280">
+        </el-table-column>
+        <el-table-column prop="quarantine" label="检疫性有害生物(是/否)" width="180">
+        </el-table-column>
+        <el-table-column prop="alien_specie" label="是否外来物种" width="180">
+        </el-table-column>
+        <el-table-column prop="messages" label="备注" width="280">
+          <template slot-scope="scope">
+            <span>{{ scope.row.messages || '无' }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="create_time" label="添加时间" width="180">
+        </el-table-column>
+        <el-table-column prop="modify_time" label="最后修改时间" width="180">
+        </el-table-column>
+        <el-table-column label="操作">
+          <template slot-scope="scope">
+            <a class="reset" href="javascript:;" @click="actionFunc(scope.row)"
+              >编辑</a
+            >
+            <i class="line"></i>
+            <a class="delete" href="javascript:;" @click="deleteFunc(scope.row)"
+              >删除</a
+            >
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <!-- 分页 -->
+      <el-pagination
+        v-if="tableData.length !== 0"
+        @current-change="changeList"
+        background
+        layout="prev, pager, next, jumper"
+        :current-page="page"
+        :total="pageSum"
+      >
+      </el-pagination>
+    </el-card>
+
+    <!-- 添加、编辑弹出框 -->
+    <el-dialog
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+      :title="tltData"
+      :visible.sync="addrInsectVisible"
+      width="30%"
+    >
+      <el-form ref="form" :rules="rules" :model="form" label-width="150px">
+        <el-form-item label="有害生物名称: " prop="name">
+          <el-input
+            style="width: 80%"
+            size="mini"
+            v-model.trim="form.name"
+          ></el-input>
+        </el-form-item>
+
+        <el-form-item label="检疫性有害生物: " prop="judge">
+          <el-select v-model="form.judge" placeholder="请选择检疫性有害生物">
+            <el-option label="是" value="是"></el-option>
+            <el-option label="否" value="否"></el-option>
+          </el-select>
+        </el-form-item>
+
+        <el-form-item label="是否外来入侵物种: " prop="judge2">
+          <el-select v-model="form.judge2" placeholder="请选择否外来入侵物种">
+            <el-option label="是" value="是"></el-option>
+            <el-option label="否" value="否"></el-option>
+          </el-select>
+        </el-form-item>
+
+        <el-form-item label="备注: " prop="remark">
+          <el-input
+            style="width: 80%"
+            size="mini"
+            type="textarea"
+            resize="none"
+            v-model.trim="form.remark"
+          ></el-input>
+        </el-form-item>
+
+        <el-form-item>
+          <el-button size="small" type="primary" @click="submitForm"
+            >确定</el-button
+          >
+          <el-button size="small" @click="cancel"
+            >取消</el-button
+          >
+        </el-form-item>
+      </el-form>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  //import引入的组件需要注入到对象中才能使用
+  components: {},
+  data() {
+    //这里存放数据
+    return {
+      fullHeight: document.documentElement.clientHeight - 116, //
+      input: "", // 搜索
+      page: 1, //当前页码
+      pageSum: 0, // 总数量
+
+      // 列表
+      tableData: [
+        {
+          ind: "1",
+          name: "冥蛾引诱剂",
+          judge: "是",
+          judge2: "是",
+          remark: "这是一个有害虫类",
+          addDate: "2016-05-02 10:00:00",
+          endDate: "2021-01-06 10:00:00",
+        },
+      ],
+
+      // 编辑、 添加
+      tltData: "添加有害生物",
+      addrInsectVisible: false,
+      form: {
+        name: "", //有害生物名称
+        judge: "", // 检疫性有害生物
+        judge2: "", //是否外来入侵物种
+        remark: "", // 备注
+      },
+      rules: {
+        name: [
+          { required: true, message: "请输入有害生物名称", trigger: "blur" },
+          //   { min: 3, max: 5, message: "长度在 1 到 15 个字符", trigger: "blur" },
+        ],
+        judge: [
+          { required: true, message: "请选检疫性有害生物", trigger: "blur" },
+          //   { min: 3, max: 5, message: "长度在 1 到 15 个字符", trigger: "blur" },
+        ],
+        judge2: [
+          {
+            required: true,
+            message: "请选择是否外来入侵物种",
+            trigger: "blur",
+          },
+          //   { min: 3, max: 5, message: "长度在 1 到 30 个字符", trigger: "blur" },
+        ],
+        // remark: [
+        //   { required: true, message: "请输入备注", trigger: "blur" },
+        //   //   { min: 3, max: 5, message: "长度在 1 到 30 个字符", trigger: "blur" },
+        // ],
+      },
+      insectObj: {},
+    };
+  },
+  //监听属性 类似于data概念
+  computed: {},
+  //监控data中的数据变化
+  watch: {
+    fullHeight(val) {
+      //监控浏览器高度变化
+      if (!this.timer) {
+        this.fullHeight = val;
+        this.timer = true;
+        let that = this;
+        setTimeout(function () {
+          //防止过度调用监测事件,导致卡顿
+          that.timer = false;
+        }, 400);
+      }
+    },
+
+    addrInsectVisible(val) {
+      if (val == false) {
+        this.$refs["form"].resetFields();
+      }
+    }
+  },
+  //方法集合
+  methods: {
+    //动态获取浏览器高度
+    get_boderHeight() {
+      const that = this;
+      window.onresize = () => {
+        return (() => {
+          window.fullHeight = document.documentElement.clientHeight;
+          that.fullHeight = window.fullHeight;
+        })();
+      };
+    },
+
+    // 搜索
+    searchData() {
+      this.harmfulBiologyList()
+    },
+
+    // 添加有害生物
+    addrHarmfulBiology() {
+      this.tltData = "添加有害生物";
+      this.addrInsectVisible = true;
+    },
+
+    // 获取有害生物列表
+    harmfulBiologyList() {
+      this.$axios({
+        method: "POST",
+        url: "/api/api_gateway?method=sysmenage.maintain.pest_list",
+        data: this.qs.stringify({
+          page: this.page,
+          page_item: "10",
+          pest_name: this.input,
+        }),
+      })
+        .then((res) => {
+          if (res.data.data.total_item !== 0) {
+            var data = res.data.data
+            this.pageSum = data.total_item
+            var list = []
+            data.page_list.forEach((item, index) => {
+              item.ind = index + 1
+              list.push(item)
+            });
+            this.tableData = list                     
+          } else {
+            this.tableData = []
+          }
+        })
+        .catch((err) => {
+          console.log(err);
+        });
+    },
+
+    // 分页
+    changeList(page) {
+      this.page = page;
+      this.harmfulBiologyList();
+    },
+
+    // 编辑
+    actionFunc(data) {
+      this.tltData = "编辑有害生物";
+      this.insectObj = data
+      this.form = {
+        name: data.pest_name, //有害生物名称
+        judge: data.quarantine, // 检疫性有害生物
+        judge2: data.alien_specie, //是否外来入侵物种
+        remark: data.messages, // 备注
+      }
+      this.addrInsectVisible = true;
+    },
+
+    // 删除
+    deleteFunc(data) {
+      this.$confirm("此操作将永久删除, 是否继续?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          this.$axios({
+            method: 'POST',
+            url: '/api/api_gateway?method=sysmenage.maintain.pest_delete',
+            data: this.qs.stringify({
+              pest_id: data.pest_id 
+            })
+          }).then((res) => {
+            console.log(res.data.data)
+            if (res.data.data == true) {
+              this.$message({
+                type: "success",
+                message: "成功",
+                duration: 1500,
+              });
+            } else {
+              this.$message({
+                type: "error",
+                message: "失败",
+                duration: 1500,
+              });
+            }
+            this.harmfulBiologyList()
+          })
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消删除",
+          });
+        });
+    },
+
+    // 添加 - 编辑 确定
+    submitForm() {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+
+          if (this.tltData == '添加有害生物') {
+            var url = '/api/api_gateway?method=sysmenage.maintain.pest_add'
+            var postData = this.qs.stringify({
+              pest_name: this.form.name,
+              alien_specie: this.form.judge2,
+              quarantine: this.form.judge,
+              messages: this.form.remark,
+            })
+          } else if (this.tltData == '编辑有害生物') {
+            var url = '/api/api_gateway?method=sysmenage.maintain.pest_modify'
+            var postData = this.qs.stringify({
+              pest_id: this.insectObj.pest_id,
+              pest_name: this.form.name,
+              alien_specie: this.form.judge2,
+              quarantine: this.form.judge,
+              messages: this.form.remark,
+            })
+          }
+          this.$axios({
+            method: 'POST',
+            url,
+            data: postData
+          }).then((res) => {
+            console.log(res)
+            if (res.data.message == '') {
+              this.$message({
+                type: "success",
+                message: "成功",
+                duration: 1500,
+              });
+            }
+            this.$refs["form"].resetFields();
+            this.addrInsectVisible = false
+            this.harmfulBiologyList()
+          })
+        } else {
+          //   console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+    cancel() {
+      this.$refs["form"].resetFields();
+      this.addrInsectVisible = false
+    },
+  },
+  //生命周期 - 创建完成(可以访问当前this实例)
+  created() {},
+  //生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {
+    this.harmfulBiologyList()
+  },
+  beforeCreate() {}, //生命周期 - 创建之前
+  beforeMount() {}, //生命周期 - 挂载之前
+  beforeUpdate() {}, //生命周期 - 更新之前
+  updated() {}, //生命周期 - 更新之后
+  beforeDestroy() {}, //生命周期 - 销毁之前
+  destroyed() {}, //生命周期 - 销毁完成
+  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
+};
+</script>
+<style lang='less' scoped>
+.harmfulBiology_box {
+  .search_box {
+    display: flex;
+    /deep/.el-input {
+      width: 300px;
+    }
+    .btn_box {
+      margin: 0 0 0 15px;
+    }
+  }
+  a {
+    text-decoration: none;
+  }
+  .reset {
+    color: #1890ff;
+  }
+  .delete {
+    color: #f56c6c;
+  }
+  .line {
+    display: inline-block;
+    width: 1px;
+    background: rgba(0, 0, 0, 0.09);
+    margin: 0 11px;
+    height: 14px;
+  }
+
+  // 弹框
+  /deep/.el-select {
+    width: 80%;
+  }
+}
+</style>

+ 279 - 9
minggao/src/page/systemmanger/motif.vue

@@ -1,29 +1,274 @@
 <!--  -->
 <template>
-  <div class="">主题管理</div>
+  <div class="motif_box">
+    <el-card :style="'height:' + fullHeight + 'px'">
+      <ul class="motif_ul">
+        <li class="motif_list">
+          <div class="list_left">系统LOGO:</div>
+          <div class="list_right">
+            <!-- <img  v-viewer id="viewerDom" src="../../assets/images/newImg/12.jpg" alt="" class="" /> -->
+            <img  v-viewer id="viewerDom" :src="objData.logo_url" alt="" class="" />
+          </div>
+        </li>
+        <li class="motif_list">
+          <div class="list_left">系统名称:</div>
+          <div class="list_right">{{ objData.sys_name }}</div>
+        </li>
+        <li class="motif_list">
+          <div class="list_left">版权信息:</div>
+          <div class="list_right">
+            {{ objData.copyright_info }}
+          </div>
+        </li>
+        <li>
+          <el-button
+            size="mini"
+            type="primary"
+            @click="btnEdit"
+            style="margin: 10px 0 0 100px"
+            >编辑</el-button
+          >
+        </li>
+      </ul>
+    </el-card>
+
+    <!-- 编辑弹框 -->
+    <el-dialog
+      title="编辑"
+      :visible.sync="redactVisible"
+      width="50%"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+    >
+      <el-form ref="form" :rules="rules" :model="form" label-width="100px">
+        <el-form-item label="系统LOGO:" prop="img">
+          <el-upload
+            class="avatar-uploader"
+            ref="upload"
+            :http-request="ImgUploadSectionFile"
+            :with-credentials="true"
+            :auto-upload="true"
+            accept=".png, .jpg, .gif, .svg"
+            action
+            :on-change="handleChange"
+            list-type="list"
+            :file-list="fileList"
+            multiple
+            :show-file-list="false"
+          >
+            <img v-if="form.img" :src="form.img" class="avatar" />
+            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+          </el-upload>
+        </el-form-item>
+        <el-form-item label="系统名称: " prop="name">
+          <el-input
+            style="width: 80%"
+            size="mini"
+            v-model.trim="form.name"
+          ></el-input>
+        </el-form-item>
+
+        <el-form-item label="版权信息: " prop="role_describe">
+          <el-input
+            style="width: 80%"
+            size="mini"
+            type="textarea"
+            resize="none"
+            v-model.trim="form.role_describe"
+          ></el-input>
+        </el-form-item>
+
+        <el-form-item>
+          <el-button size="small" type="primary" @click="confirm"
+            >确定</el-button
+          >
+          <el-button size="small" @click="redactVisible = false"
+            >取消</el-button
+          >
+        </el-form-item>
+      </el-form>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
-//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
-//例如:import 《组件名称》 from '《组件路径》';
-
 export default {
   //import引入的组件需要注入到对象中才能使用
   components: {},
   data() {
     //这里存放数据
-    return {};
+    return {
+      fullHeight: document.documentElement.clientHeight - 116, //
+      redactVisible: false,
+      form: {
+        img: "",
+        name: "",
+        role_describe: "",
+      },
+      rules: {
+        img: [{ required: true, message: "请上传系统LOGO", trigger: "blur" }],
+        name: [{ required: true, message: "请输入系统名称", trigger: "blur" }],
+        role_describe: [
+          { required: true, message: "请输入版本信息", trigger: "blur" },
+        ],
+      },
+
+      // 上传图片
+      fileList: [],
+      userDetail: {},
+      objData: {},
+    };
   },
   //监听属性 类似于data概念
   computed: {},
   //监控data中的数据变化
-  watch: {},
+  watch: {
+    fullHeight(val) {
+      //监控浏览器高度变化
+      if (!this.timer) {
+        this.fullHeight = val;
+        this.timer = true;
+        let that = this;
+        setTimeout(function () {
+          //防止过度调用监测事件,导致卡顿
+          that.timer = false;
+        }, 400);
+      }
+    },
+
+    redactVisible(val) {
+      if (val == false) {
+        this.form.img = ''
+        this.form.name = ''
+        this.form.role_describe = ''
+      }
+    } 
+  },
   //方法集合
-  methods: {},
+  methods: {
+    //动态获取浏览器高度
+    get_boderHeight() {
+      const that = this;
+      window.onresize = () => {
+        return (() => {
+          window.fullHeight = document.documentElement.clientHeight;
+          that.fullHeight = window.fullHeight;
+        })();
+      };
+    },
+
+    // 上传图片
+    ImgUploadSectionFile(param) {
+      let that = this;
+      let formData = new FormData();
+      formData.append("img_file", param.file); //首页图片
+      that
+        .$axios({
+          method: "post",
+          url: "api/api_gateway?method=monitor_manage.cbd_manage.add_img",
+          data: formData,
+        })
+        .then((res) => {
+          if (res.data.data.src !== "0") {
+            that.imageSrc = res.data.data.src;
+            that.form.img = res.data.data.src;
+          } else {
+            that.$message.error({
+              message: "上传图片失败,请重试",
+              duration: 1500,
+            });
+          }
+        })
+        .catch((err) => {
+          console.log(err);
+        });
+      //   that.clearUploadBox();
+    },
+    handleChange(file, fileList) {
+      if (!/\.(gif|jpg|jpeg|png|bmp|GIF|JPG|PNG)$/.test(file.raw.name)) {
+        alert("图片类型必须是.gif,jpeg,jpg,png,bmp中的一种");
+        return false;
+      }
+      let reader = new FileReader();
+      reader.onload = (e) => {
+        let data;
+        if (typeof e.target.result === "object") {
+          // 把Array Buffer转化为blob 如果是base64不需要
+          data = window.URL.createObjectURL(new Blob([e.target.result]));
+        } else {
+          data = e.target.result;
+        }
+      };
+      reader.readAsArrayBuffer(file.raw);
+      this.fileList = fileList;
+    },
+
+    // 按钮编辑
+    btnEdit() {
+      this.form.img = this.objData.logo_url
+      this.form.name = this.objData.sys_name
+      this.form.role_describe = this.objData.copyright_info
+      this.redactVisible = true;
+    },
+
+    // 编辑确定
+    confirm() {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          this.$axios({
+            method: 'POST',
+            url: '/api/api_gateway?method=sysmenage.usermanager.theme_modify',
+            data: this.qs.stringify({
+                logo_url: this.form.img, // logo链接地址
+                sys_name: this.form.name, // 系统名称
+                copyright_info: this.form.role_describe, // 版权信息
+            })
+          }).then((res) => {
+              console.log(res)
+              if (res.data.data == true) {
+                this.$message({
+                  message: "成功!",
+                  type: "success",
+                  duration: 1500,
+                });
+                this.motifAxios()
+              } else {
+                this.$message({
+                  message: "失败!",
+                  type: "success",
+                  duration: 1500,
+                });
+              }
+              this.redactVisible = false
+          }).catch((err) => {
+              console.log(err)
+          })
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+
+    // 主题数据
+    motifAxios() {
+      this.$axios({
+        method: 'POST',
+        url: '/api/api_gateway?method=sysmenage.usermanager.user_info',
+      }).then((res) => {
+        console.log(res)
+        this.objData = res.data.data.theme_info
+      }).catch((err) => {
+        console.log(err)
+      })
+    },
+  },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {},
   //生命周期 - 挂载完成(可以访问DOM元素)
-  mounted() {},
+  mounted() {
+    this.motifAxios()
+  },
   beforeCreate() {}, //生命周期 - 创建之前
   beforeMount() {}, //生命周期 - 挂载之前
   beforeUpdate() {}, //生命周期 - 更新之前
@@ -34,5 +279,30 @@ export default {
 };
 </script>
 <style lang='less' scoped>
-//@import url(); 引入公共css类
+// .motif_box {
+
+// }
+
+.motif_ul {
+  .motif_list {
+    display: flex;
+    .list_left {
+      width: 80px;
+      text-align: right;
+      font-size: 14px;
+      color: #333333;
+      font-weight: 400;
+    }
+    .list_right {
+      width: 300px;
+      margin: 0 0 30px 20px;
+      font-size: 14px;
+      img {
+        width: 150px;
+        height: 150px;
+        border-radius: 5px;
+      }
+    }
+  }
+}
 </style>

+ 46 - 9
minggao/src/page/systemmanger/role.vue

@@ -1,25 +1,25 @@
 <!--  -->
 <template>
   <div class="role_box">
-    <el-card>
+    <el-card :style="'height:' + fullHeight + 'px'">
       <!-- 筛选 -->
       <el-row>
         <el-col>
           <!-- 组织搜索 -->
           <div class="search_box">
             <el-input
-              size="small"
+              size="mini"
               placeholder="请输入角色名称"
-              v-model="input"
+              v-model.trim="input"
               @change="searchData"
               clearable
             >
             </el-input>
             <div class="btn_box">
-              <el-button type="primary" size="small" @click="searchData"
+              <el-button type="primary" size="mini" @click="searchData"
                 >搜索</el-button
               >
-              <el-button type="primary" size="small" @click="addrRole"
+              <el-button type="primary" size="mini" @click="addrRole"
                 >添加角色</el-button
               >
             </div>
@@ -76,7 +76,7 @@
           <el-input
             style="width: 80%"
             size="mini"
-            v-model="form.name"
+            v-model.trim="form.name"
           ></el-input>
         </el-form-item>
 
@@ -86,7 +86,7 @@
             size="mini"
             type="textarea"
             resize="none"
-            v-model="form.describe"
+            v-model.trim="form.describe"
           ></el-input>
         </el-form-item>
 
@@ -133,6 +133,7 @@ export default {
   data() {
     //这里存放数据
     return {
+      fullHeight: document.documentElement.clientHeight - 116, //
       input: "",
       tableData: [],
       page: 1,
@@ -180,9 +181,39 @@ export default {
         this.form.describe = "";
       }
     },
+
+    fullHeight(val) {
+      //监控浏览器高度变化
+      if (!this.timer) {
+        this.fullHeight = val;
+        this.timer = true;
+        let that = this;
+        setTimeout(function () {
+          //防止过度调用监测事件,导致卡顿
+          that.timer = false;
+        }, 400);
+      }
+    },
+
+    setRightDialogVisible(val) {
+      if (val == false) {
+        this.defKeys = []
+      }
+    },
   },
   //方法集合
   methods: {
+    //动态获取浏览器高度
+    get_boderHeight() {
+      const that = this;
+      window.onresize = () => {
+        return (() => {
+          window.fullHeight = document.documentElement.clientHeight;
+          that.fullHeight = window.fullHeight;
+        })();
+      };
+    },
+
     tabListData() {
       this.$axios({
         method: "POST",
@@ -333,9 +364,11 @@ export default {
         .then((res) => {
           if (res.data.message == "") {
             var data = res.data.data.children;
+            this.rightsList = []
             this.rightsList = data;
             this.limitsList(); //获取当前角色的权限
           } else {
+            this.rightsList = []
             this.$message.error("获取权限列表失败!");
           }
         })
@@ -363,9 +396,12 @@ export default {
                 this.getLeafkeys(list[i], this.defKeys);
               }
             }
+            this.tableData = list;
+          } else {
+            this.tableData = []
           }
         //   this.tabListData = list;
-          this.tableData = list;
+          // this.tableData = list;
         })
         .catch((err) => {
           console.log(err);
@@ -469,7 +505,8 @@ export default {
   .search_box {
     display: flex;
     /deep/.el-input {
-      width: 300px;
+      // width: 300px;
+      width: 15%;
     }
     .btn_box {
       margin: 0 0 0 15px;

+ 783 - 0
minggao/src/page/systemmanger/userManger.vue

@@ -0,0 +1,783 @@
+<!--  -->
+<template>
+  <div class="userManger_box">
+    <el-card :style="'height:' + fullHeight + 'px'">
+      <div class="card_box">
+        <!-- 组织 -->
+        <div
+          class="userManger_left"
+          :style="'height:' + (fullHeight - 100) + 'px'"
+        >
+          <el-tree
+            :data="data"
+            :props="defaultProps"
+            @node-click="handleNodeClick"
+          ></el-tree>
+        </div>
+
+        <!-- 搜索和表格 -->
+        <div
+          class="userManger_right"
+          :style="'height:' + (fullHeight - 100) + 'px'"
+        >
+          <!-- 搜索 -->
+          <el-row>
+            <el-col>
+              <!-- 组织搜索 -->
+              <div class="search_box">
+                <el-input
+                  size="mini"
+                  placeholder="请输入用户姓名"
+                  v-model.trim="nameVal"
+                  @change="searchData"
+                  clearable
+                >
+                </el-input>
+                <el-input
+                  size="mini"
+                  placeholder="请输入手机号"
+                  v-model.trim="phoneVal"
+                  @change="searchData"
+                  clearable
+                >
+                </el-input>
+                <div class="btn_box">
+                  <el-button type="primary" size="mini" @click="searchData"
+                    >搜索</el-button
+                  >
+                  <el-button type="primary" size="mini" @click="addrRole"
+                    >添加用户</el-button
+                  >
+                </div>
+              </div>
+            </el-col>
+          </el-row>
+
+          <!-- 表格 -->
+          <el-table :data="tableData" stripe style="width: 100%">
+            <el-table-column prop="ind" label="序号" width="90">
+            </el-table-column>
+            <el-table-column prop="real_name" label="姓名" width="190">
+            </el-table-column>
+            <el-table-column prop="username" label="账号名称" width="200">
+            </el-table-column>
+            <el-table-column prop="mobile" label="手机号" width="120">
+              <template slot-scope="scope">
+                <span>{{ scope.row.mobile || "无" }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column prop="org_list" label="所属组织" width="280">
+              <template slot-scope="scope">
+                <span
+                  v-for="(item, index) in scope.row.org_list"
+                  :key="index"
+                  >{{ item.org_name }}</span
+                >
+              </template>
+            </el-table-column>
+            <el-table-column prop="state" label="状态" width="120">
+              <template slot-scope="scope">
+                <span v-if="scope.row.state == '正常'">
+                  <span
+                    style="
+                      width: 6px;
+                      height: 6px;
+                      background: #30a031;
+                      border-radius: 50%;
+                      display: inline-block;
+                      margin: 0 0 2px 0;
+                    "
+                  ></span>
+                  <span>正常</span>
+                </span>
+                <span v-if="scope.row.state == '已停用'">
+                  <span
+                    style="
+                      width: 6px;
+                      height: 6px;
+                      background: #f93f3d;
+                      border-radius: 50%;
+                      display: inline-block;
+                      margin: 0 0 2px 0;
+                    "
+                  ></span>
+                  <span>停用</span>
+                </span>
+              </template>
+            </el-table-column>
+            <el-table-column label="操作" width="280">
+              <template slot-scope="scope">
+                <a
+                  class="reset"
+                  href="javascript:;"
+                  @click="actionFunc(scope.row)"
+                  >编辑</a
+                >
+                <i class="line"></i>
+                <a
+                  class="delete"
+                  :style="
+                    scope.row.state == '已停用'
+                      ? 'color: #1890ff'
+                      : 'color: #f56c6c;'
+                  "
+                  href="javascript:;"
+                  @click="outUse(scope.row)"
+                  >{{ scope.row.state == "已停用" ? "启用" : "停用" }}</a
+                >
+                <i class="line"></i>
+                <a
+                  class="reset"
+                  href="javascript:;"
+                  @click="resetPwd(scope.row)"
+                  >重置密码</a
+                >
+                <i class="line"></i>
+                <a
+                  class="delete"
+                  href="javascript:;"
+                  @click="deleteFunc(scope.row)"
+                  >删除</a
+                >
+              </template>
+            </el-table-column>
+          </el-table>
+
+          <!-- 分页 -->
+          <el-pagination
+            v-if="tableData.length !== 0"
+            @current-change="changeList"
+            background
+            layout="prev, pager, next, jumper"
+            :current-page="page"
+            :total="pageSum"
+          >
+          </el-pagination>
+        </div>
+      </div>
+    </el-card>
+
+    <!-- 添加 - 编辑 用户 -->
+    <el-dialog :title="tltData" :visible.sync="userVisible" width="30%">
+      <el-form ref="form" :rules="rules" :model="form" label-width="150px">
+        <el-form-item label="账号: " prop="user">
+          <el-input
+            style="width: 80%"
+            size="mini"
+            v-model.trim="form.user"
+          ></el-input>
+        </el-form-item>
+
+        <el-form-item
+          v-if="tltData == '添加用户'"
+          label="密码: "
+          prop="password"
+        >
+          <el-input
+            style="width: 80%"
+            size="mini"
+            v-model.trim="form.password"
+          ></el-input>
+        </el-form-item>
+
+        <el-form-item label="姓名: " prop="name">
+          <el-input
+            style="width: 80%"
+            size="mini"
+            v-model.trim="form.name"
+          ></el-input>
+        </el-form-item>
+
+        <el-form-item label="隶属海关: " prop="judge">
+          <el-cascader
+            :v-model="form.judge"
+            :key="refreshItem"
+            :options="tissueList"
+            @change="judgeData"
+            :props="{
+              multiple: true,
+              label: 'org_name',
+              value: 'id',
+              emitPath: false,
+              children: 'childrens',
+            }"
+            clearable
+          ></el-cascader>
+        </el-form-item>
+
+        <el-form-item label="角色: " prop="role">
+          <el-cascader
+            :v-model="form.role"
+            :key="refreshItem"
+            :options="roleData"
+            @change="roleChange"
+            :props="{
+              value: 'id',
+              label: 'role_name',
+              multiple: true,
+              emitPath: false,
+            }"
+            clearable
+          ></el-cascader>
+        </el-form-item>
+
+        <el-form-item label="手机号码: " prop="phone">
+          <el-input
+            style="width: 80%"
+            size="mini"
+            v-model.trim="form.phone"
+          ></el-input>
+        </el-form-item>
+
+        <el-form-item label="邮箱: " prop="mailbox">
+          <el-input
+            style="width: 80%"
+            size="mini"
+            v-model.trim="form.mailbox"
+          ></el-input>
+        </el-form-item>
+
+        <el-form-item
+          v-if="tltData == '添加用户'"
+          label="账号状态: "
+          prop="state"
+        >
+          <el-select size="mini" v-model="form.state" placeholder="请选择">
+            <el-option label="正常" value="1"></el-option>
+            <el-option label="停用" value="4"></el-option>
+          </el-select>
+        </el-form-item>
+
+        <el-form-item>
+          <el-button size="small" type="primary" @click="submitForm"
+            >确定</el-button
+          >
+          <el-button size="small" @click="resetForm">取消</el-button>
+        </el-form-item>
+      </el-form>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  //import引入的组件需要注入到对象中才能使用
+  components: {},
+  data() {
+    //input验证 - 密码框 - 禁止输入汉字
+    const checkPath = (rule, value, callback) => {
+      this.form.password = value.replace(/[\u4E00-\u9FA5]/g, "");
+      // 一定要执行回调函数
+      // 否则不起效果
+      callback();
+    };
+    // input验证 - 验证手机号
+    var checkphone = (rule, value, callback) => {
+      // let phoneReg = /(^1[3|4|5|6|7|8|9]\d{9}$)|(^09\d{8}$)/;
+      if (value == "") {
+        callback(new Error("请输入手机号"));
+      } else if (!this.isCellPhone(value)) {
+        //引入methods中封装的检查手机格式的方法
+        callback(new Error("请输入正确的手机号!"));
+      } else {
+        callback();
+      }
+    };
+    return {
+      fullHeight: document.documentElement.clientHeight - 116, //
+
+      // 树形图
+      data: [],
+      defaultProps: {
+        children: "childrens",
+        label: "org_name",
+      },
+
+      // 搜索
+      nameVal: "",
+      phoneVal: "",
+
+      // 表格
+      tableData: [],
+
+      // 分页
+      page: 1, //当前页码
+      pageSum: 0, // 总数量
+
+      // 弹框
+      tltData: "添加用户",
+      userVisible: false,
+      form: {
+        user: "", //账号
+        password: "", // 密码
+        name: "", // 姓名
+        judge: [
+          [3, 4, 7],
+        ], // 隶属海关
+        role: [], //角色
+        phone: "", // 手机号码
+        mailbox: "", //邮箱
+        state: "", // 账号状态
+      },
+      rules: {
+        user: [
+          { required: true, message: "请输入账号", trigger: "blur" },
+          //   { min: 3, max: 5, message: "长度在 1 到 15 个字符", trigger: "blur" },
+        ],
+        password: [
+          { required: true, message: "请输入密码", trigger: "blur" },
+          { validator: checkPath, trigger: "change" },
+          //   { min: 3, max: 5, message: "长度在 1 到 15 个字符", trigger: "blur" },
+        ],
+        name: [
+          { required: true, message: "请输入姓名", trigger: "blur" },
+          //   { min: 3, max: 5, message: "长度在 1 到 15 个字符", trigger: "blur" },
+        ],
+        judge: [
+          { required: true, message: "请选检疫性有害生物", trigger: "blur" },
+          //   { min: 3, max: 5, message: "长度在 1 到 15 个字符", trigger: "blur" },
+        ],
+        role: [
+          {
+            required: true,
+            message: "请选择角色",
+            trigger: "blur",
+          },
+          //   { min: 3, max: 5, message: "长度在 1 到 30 个字符", trigger: "blur" },
+        ],
+        phone: [{ required: true, validator: checkphone, trigger: "blur" }],
+      },
+      roleData: [], // 角色下拉框
+      refreshItem: 0, //清除角色、组织值
+      tissueList: [], // 组织下拉框
+      editorObj: {}, //点击编辑选中当前的行数据
+      org_id: "", //组织id
+    };
+  },
+  //监听属性 类似于data概念
+  computed: {},
+  //监控data中的数据变化
+  watch: {
+    fullHeight(val) {
+      //监控浏览器高度变化
+      if (!this.timer) {
+        this.fullHeight = val;
+        this.timer = true;
+        let that = this;
+        setTimeout(function () {
+          //防止过度调用监测事件,导致卡顿
+          that.timer = false;
+        }, 400);
+      }
+    },
+
+    userVisible(val) {
+      if (val == false) {
+        this.$refs["form"].resetFields();
+        this.refreshItem++;
+      }
+    },
+  },
+  //方法集合
+  methods: {
+    //动态获取浏览器高度
+    get_boderHeight() {
+      const that = this;
+      window.onresize = () => {
+        return (() => {
+          window.fullHeight = document.documentElement.clientHeight;
+          that.fullHeight = window.fullHeight;
+        })();
+      };
+    },
+
+    // 验证手机号是否正确
+    isCellPhone(val) {
+      if (!/^1(3|4|5|6|7|8)\d{9}$/.test(val)) {
+        return false;
+      } else {
+        return true;
+      }
+    },
+
+    // 树形图
+    handleNodeClick(data) {
+      console.log(data);
+      this.org_id = data.id;
+      this.userListData();
+    },
+
+    // 编辑
+    actionFunc(data) {
+      this.tltData = "编辑用户";
+      console.log(data);
+      this.editorObj = data;
+      this.form = {
+        user: data.username,
+        password: "",
+        name: data.real_name,
+        judge: data.org_list,
+        role: data.role_list,
+        phone: data.mobile,
+        mailbox: data.email,
+        state: data.state,
+      };
+      console.log(this.form);
+      this.userVisible = true;
+    },
+
+    // 停用
+    outUse(data) {
+      console.log(data);
+      if (data.state == "已停用") {
+        var msg = "启用";
+      } else if (data.state == "正常") {
+        var msg = "停用";
+      }
+      this.$confirm("此操作将" + msg + "该账号, 是否继续?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          this.$axios({
+            method: "POST",
+            url: "/api/api_gateway?method=sysmenage.usermanager.user_disable",
+            data: this.qs.stringify({
+              user_id: data.user_id,
+              state: msg == "启用" ? 1 : 4,
+            }),
+          }).then((res) => {
+            if (res.data.data == true) {
+              this.$message({
+                type: "success",
+                message: "成功",
+                duration: 1500,
+              });
+              this.userListData();
+            }
+          });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消",
+          });
+        });
+    },
+
+    // 重置密码
+    resetPwd(data) {
+      this.$prompt("请输入新密码", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        inputPlaceholder: "默认密码为@12345678",
+        inputErrorMessage: "新密码格式不正确",
+        inputValidator: (val) => {
+          if (escape(val).indexOf("%u") != -1) {
+            return "不能输入汉字!";
+          } else if (val.split(" ").join("").length == 0) {
+            return "不能输入空格!";
+          }
+        },
+      })
+        .then(({ value }) => {
+          this.$axios({
+            method: "POST",
+            url: "/api/api_gateway?method=sysmenage.usermanager.password_modify",
+            data: this.qs.stringify({
+              user_id: data.user_id,
+              password: value == null ? "@12345678" : value,
+            }),
+          }).then((res) => {
+            console.log(res);
+            if (res.data.data == true) {
+              this.$message({
+                message: "成功!",
+                type: "success",
+                duration: 1500,
+              });
+            }
+            this.userListData();
+          });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "取消输入",
+          });
+        });
+    },
+
+    // 删除
+    deleteFunc(data) {
+      this.$confirm("此操作将永久删除该账号, 是否继续?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          this.$axios({
+            method: "POST",
+            url: "/api/api_gateway?method=sysmenage.usermanager.user_delete",
+            data: this.qs.stringify({
+              user_id: data.user_id,
+            }),
+          }).then((res) => {
+            if (res.data.data == true) {
+              this.$message({
+                message: "成功!",
+                type: "success",
+                duration: 1500,
+              });
+            } else {
+              this.$message({
+                message: "失败!",
+                type: "error",
+                duration: 1500,
+              });
+            }
+            this.userListData();
+          });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消删除",
+          });
+        });
+    },
+
+    // 分页
+    changeList(page) {
+      this.page = page;
+    },
+
+    // 搜索
+    searchData() {
+      this.userListData();
+    },
+
+    // 添加用户
+    addrRole() {
+      this.tltData = "添加用户";
+      this.userVisible = true;
+    },
+
+    // 添加 - 编辑 确定
+    submitForm() {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          if (this.tltData == "添加用户") {
+            var postData = this.qs.stringify({
+              username: this.form.user, // 登录账号 必
+              real_name: this.form.name, // 用户名 必
+              password: this.form.password, // 密码 必
+              org_id_list: JSON.stringify(this.form.judge), //组织id数组 必
+              role_id_list: JSON.stringify(this.form.role), // 角色id数组 必
+              state: this.form.state, //用户状态
+              mobile: this.form.phone, // 手机号
+              email: this.form.mailbox, //邮箱地址
+            });
+            var url = "/api/api_gateway?method=sysmenage.usermanager.user_add";
+          } else if (this.tltData == "编辑用户") {
+            var postData = this.qs.stringify({
+              user_id: this.editorObj.user_id, // 用户id 必
+              real_name: this.form.name, // 用户名 必
+              org_id_list: JSON.stringify(this.form.judge), //组织id数组 必
+              role_id_list: JSON.stringify(this.form.role), //角色id数组 必
+              mobile: this.form.phone, //手机号
+              email: this.form.mailbox, //邮箱地址
+            });
+            var url =
+              "/api/api_gateway?method=sysmenage.usermanager.user_modify";
+          }
+          this.$axios({
+            method: "POST",
+            url,
+            data: postData,
+          }).then((res) => {
+            console.log(res);
+            if (res.data.data == true) {
+              this.$message({
+                message: "成功!",
+                type: "success",
+                duration: 1500,
+              });
+            }
+            this.$refs["form"].resetFields();
+            this.userVisible = false;
+            this.userListData();
+          });
+        } else {
+          return false;
+        }
+      });
+    },
+    // 取消
+    resetForm() {
+      this.$refs["form"].resetFields();
+      this.refreshItem++;
+      this.userVisible = false;
+    },
+
+    // 获取用户列表
+    userListData() {
+      this.$axios({
+        method: "POST",
+        url: "/api/api_gateway?method=sysmenage.usermanager.user_list",
+        data: this.qs.stringify({
+          page: this.page,
+          page_item: "10",
+          real_name: this.nameVal, // 用户名称
+          mobile: this.phoneVal, //电话
+          org_id: this.org_id,
+        }),
+      })
+        .then((res) => {
+          if (res.data.data.page_item !== 0) {
+            var data = res.data.data.page_list;
+            var list = [];
+            data.forEach((item, index) => {
+              item.ind = index + 1;
+              list.push(item);
+            });
+            this.tableData = list;
+            this.pageSum = res.data.data.page_item;
+          }
+        })
+        .catch((err) => {
+          console.log(err);
+        });
+    },
+
+    // 获取左侧组织列表
+    organizationData() {
+      this.$axios({
+        method: "POST",
+        url: "/api/api_gateway?method=sysmenage.usermanager.org_list",
+        data: this.qs.stringify({
+          page: this.page,
+          page_item: "100000000",
+          org_name: "",
+        }),
+      })
+        .then((res) => {
+          if (res.data.data.page_list.length !== 0) {
+            var obj = {
+              org_name: "全部",
+              id: "",
+            };
+            var list = res.data.data.page_list;
+            this.tissueList = list; // 弹框组织列表
+            var data = res.data.data.page_list;
+            this.data = [obj, ...data]; // 左侧组织列表
+          }
+        })
+        .catch((err) => {
+          console.log(err);
+        });
+    },
+
+    // 获取角色列表
+    roleAxios() {
+      this.$axios({
+        method: "POST",
+        url: "/api/api_gateway?method=sysmenage.usermanager.role_list",
+        data: this.qs.stringify({
+          page: this.page,
+          page_item: "10000000",
+          role_name: "",
+        }),
+      })
+        .then((res) => {
+          if (res.data.data.total_item !== 0) {
+            this.roleData = res.data.data.page_list;
+          }
+        })
+        .catch((err) => {});
+    },
+    judgeData(item) {
+      console.log(item);
+      this.form.judge = item;
+    },
+    roleChange(item) {
+      this.form.role = item;
+    },
+  },
+  //生命周期 - 创建完成(可以访问当前this实例)
+  created() {},
+  //生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {
+    this.userListData(); //表格数据
+    this.organizationData(); //左侧组织数据
+    this.roleAxios(); // 角色列表
+  },
+  beforeCreate() {}, //生命周期 - 创建之前
+  beforeMount() {}, //生命周期 - 挂载之前
+  beforeUpdate() {}, //生命周期 - 更新之前
+  updated() {}, //生命周期 - 更新之后
+  beforeDestroy() {}, //生命周期 - 销毁之前
+  destroyed() {}, //生命周期 - 销毁完成
+  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
+};
+</script>
+<style lang='less' scoped>
+.userManger_box {
+  .card_box {
+    display: flex;
+    width: 100%;
+    // 树形图
+    .userManger_left {
+      width: 19%;
+      margin: 0 15px 0 0;
+      padding: 5px;
+      border: 1px solid #eeeeee;
+      border-radius: 5px;
+      overflow: hidden;
+      overflow-y: auto;
+    }
+
+    // 搜索和表格
+    .userManger_right {
+      width: 80%;
+      //   border: 1px solid red;
+
+      // 搜索
+      .search_box {
+        display: flex;
+        /deep/.el-input {
+          width: 20%;
+          margin: 0 15px 0 0;
+        }
+        .btn_box {
+        }
+      }
+      a {
+        text-decoration: none;
+      }
+      .reset {
+        color: #1890ff;
+      }
+      .delete {
+        color: #f56c6c;
+      }
+      .line {
+        display: inline-block;
+        width: 1px;
+        background: rgba(0, 0, 0, 0.09);
+        margin: 0 11px;
+        height: 14px;
+      }
+    }
+  }
+
+  /deep/.el-select {
+    width: 80%;
+  }
+
+  /deep/.el-cascader {
+    width: 80%;
+  }
+}
+</style>

+ 46 - 0
minggao/src/router/index.js

@@ -8,9 +8,21 @@ import Login from '@/page/login/login'
 // *****************首页**********************
 import Index from '@/page/home/index'
 //---------------------------------------系统管理----------------------------------------------------
+<<<<<<< HEAD
 const customsManger = () => import('@/Page/systemmanger/customsManger')
 const role = () => import('@/Page/systemmanger/role')
 const motif = () => import('@/Page/systemmanger/motif')
+=======
+const customsManger = () => import('@/Page/systemmanger/customsManger') //隶属海关
+const role = () => import('@/Page/systemmanger/role') // 角色管理
+const motif = () => import('@/Page/systemmanger/motif') // 主题定制
+const harmfulBiology = () => import('@/Page/systemmanger/harmfulBiology') // 有害生物维护
+const userManger = () => import('@/Page/systemmanger/userManger') // 用户管理
+const dayRecord = () => import('@/Page/systemmanger/dayRecord') // 用户管理
+
+//---------------------------------------指挥中心----------------------------------------------------
+const realTime = () => import('@/Page/commandCenter/realTime') //实时通信
+>>>>>>> 6b029a9bf25447ffb3ff9e74308c406e23d98ec7
 
 // *****************测报系统**********************
 import cbd from '@/page/forecasting/cbd/Cbd'//首页
@@ -69,8 +81,42 @@ export default new Router({
             title: '主题管理'
           }
         },
+<<<<<<< HEAD
         //------------------测报管理--------------------------
         //------------------测报灯--------------------------
+=======
+        {
+          path: 'harmfulBiology',
+          component: harmfulBiology,
+          meta: {
+            title: '有害生物维护'
+          }
+        },
+        {
+          path: 'userManger',
+          component: userManger,
+          meta: {
+            title: '用户管理'
+          }
+        },
+        {
+          path: 'dayRecord',
+          component: dayRecord,
+          meta: {
+            title: '日志管理'
+          }
+        },
+        //------------------系统管理--------------------------
+        //------------------指挥中心--------------------------
+        {
+          path: 'realTime',
+          component: realTime,
+          meta: {
+            title: '实时通信'
+          }
+        },
+        //------------------指挥中心--------------------------
+>>>>>>> 6b029a9bf25447ffb3ff9e74308c406e23d98ec7
         {
           path: 'cbd',
           component: cbd

+ 2 - 9
minggao/src/util/http.js

@@ -37,15 +37,8 @@ axios.interceptors.request.use(req => {
   //     req.data = req.data ? req.data + '&token=' + session : 'token=' + session;
   //   }
   // }
-  if(req.url.split('=')[1]){
-    url = req.url.split('=')[1]
-  }else{
-    url = req.url
-  }
-  console.log(req)
-  if (url != 'sysmenage.usermanager.user_login' && url != '/api/trap_export') {
-    console.log(url != 'sysmenage.usermanager.user_login')
-    console.log(url != '/api/trap_export')
+  url = req.url.split('=')[1]
+  if (url != 'sysmenage.usermanager.user_login' && url !== 'monitor_manage.cbd_manage.add_img' && url != '/api/trap_export') {
     req.data = req.data ? req.data + '&token=' + session : 'token=' + session;
   }
   return req