上饶市警务平台后台管理前端
zengh
2023-01-15 d8ce211d778d9bbd9d06a9846465512b87dd4062
接处警
6 files added
1058 ■■■■■ changed files
src/api/alarm/alarm.js 50 ●●●●● patch | view | raw | blame | history
src/api/outAlarm/outAlarm.js 50 ●●●●● patch | view | raw | blame | history
src/const/alarm/alarm.js 407 ●●●●● patch | view | raw | blame | history
src/const/outAlarm/outAlarm.js 175 ●●●●● patch | view | raw | blame | history
src/views/alarm/alarm.vue 188 ●●●●● patch | view | raw | blame | history
src/views/outAlarm/outAlarm.vue 188 ●●●●● patch | view | raw | blame | history
src/api/alarm/alarm.js
New file
@@ -0,0 +1,50 @@
import request from '@/router/axios';
export const getList = (current, size, params) => {
  return request({
    url: '/api/alarm/alarm/page',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}
export const getDetail = (id) => {
  return request({
    url: '/api/alarm/alarm/detail',
    method: 'get',
    params: {
      id
    }
  })
}
export const remove = (ids) => {
  return request({
    url: '/api/alarm/alarm/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}
export const add = (row) => {
  return request({
    url: '/api/alarm/alarm/submit',
    method: 'post',
    data: row
  })
}
export const update = (row) => {
  return request({
    url: '/api/alarm/alarm/submit',
    method: 'post',
    data: row
  })
}
src/api/outAlarm/outAlarm.js
New file
@@ -0,0 +1,50 @@
import request from '@/router/axios';
export const getList = (current, size, params) => {
  return request({
    url: '/api/outAlarm/outAlarm/page',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}
export const getDetail = (id) => {
  return request({
    url: '/api/outAlarm/outAlarm/detail',
    method: 'get',
    params: {
      id
    }
  })
}
export const remove = (ids) => {
  return request({
    url: '/api/outAlarm/outAlarm/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}
export const add = (row) => {
  return request({
    url: '/api/outAlarm/outAlarm/submit',
    method: 'post',
    data: row
  })
}
export const update = (row) => {
  return request({
    url: '/api/outAlarm/outAlarm/submit',
    method: 'post',
    data: row
  })
}
src/const/alarm/alarm.js
New file
@@ -0,0 +1,407 @@
export default {
  height:'auto',
  calcHeight: 30,
  tip: false,
  searchShow: true,
  searchMenuSpan: 6,
  labelWidth:160,
  border: true,
  index: true,
  viewBtn: true,
  selection: true,
  dialogClickModal: false,
  column: [
    {
      label: "市级行政区划",
      prop: "PARENTXZQH",
      type: "input",
    },
    {
      label: "行政区划编号",
      prop: "XZQHBH",
      type: "input",
    },
    {
      label: "接警单位编号",
      prop: "JJDWBH",
      type: "input",
    },
    {
      label: "接警单位名称",
      prop: "JJDWMC",
      type: "input",
    },
    {
      label: "接警单编号",
      prop: "JJDBH",
      type: "input",
    },
    {
      label: "关联接警单编号",
      prop: "GLJJDBH",
      type: "input",
      hide: true,
    },
    {
      label: "来话类型编号",
      prop: "LHLXBH",
      type: "input",
      hide: true,
    },
    {
      label: "报警方式编号",
      prop: "BJFSBH",
      type: "input",
      hide: true,
    },
    {
      label: "是否自动生成警单",
      prop: "N_AUTO",
      type: "input",
    },
    {
      label: "特服号码",
      prop: "TFHM",
      type: "input",
      hide: true,
    },
    {
      label: "警单类型",
      prop: "JDLX",
      type: "input",
      hide: true,
    },
    {
      label: "接警员编号",
      prop: "JJYBH",
      type: "input",
    },
    {
      label: "接警员姓名",
      prop: "JJYXM",
      type: "input",
    },
    {
      label: "报警时间或呼入时间",
      prop: "BJSJ",
      type: "input",
    },
    {
      label: "接警时间或接听时间",
      prop: "JJSJ",
      type: "input",
    },
    {
      label: "报警时段代码",
      prop: "BJSD",
      type: "input",
      hide: true,
    },
    {
      label: "报警电话",
      prop: "BJDH",
      type: "input",
    },
    {
      label: "报警电话用户姓名",
      prop: "BJDHYHXM",
      type: "input",
      hide: true,
    },
    {
      label: "报警电话用户地址",
      prop: "BJDHYHDZ",
      type: "input",
      hide: true,
    },
    {
      label: "报警人姓名",
      prop: "BJRXM",
      type: "input",
    },
    {
      label: "报警人性别",
      prop: "BJRXB",
      type: "input",
    },
    {
      label: "联系电话",
      prop: "LXDH",
      type: "input",
    },
    {
      label: "事发地址",
      prop: "SFDZ",
      type: "input",
    },
    {
      label: "报警内容",
      prop: "BJNR",
      type: "input",
    },
    {
      label: "补充接警内容",
      prop: "BCJJNR",
      type: "input",
      hide: true,
    },
    {
      label: "管辖单位编号",
      prop: "GXDWBH",
      type: "input",
      hide: true,
    },
    {
      label: "管辖单位名称",
      prop: "GXDWMC",
      type: "input",
      hide: true,
    },
    {
      label: "有无效案件标识",
      prop: "YWXAJBS",
      type: "input",
      hide: true,
    },
    {
      label: "报警类别",
      prop: "BJLB",
      type: "input",
      hide: true,
    },
    {
      label: "报警类型",
      prop: "BJLX",
      type: "input",
      hide: true,
    },
    {
      label: "报警细类",
      prop: "BJXL",
      type: "input",
      hide: true,
    },
    {
      label: "事发场所",
      prop: "SFCS",
      type: "input",
      hide: true,
    },
    {
      label: "自动定位X坐标",
      prop: "ZDDWXZB",
      type: "input",
      hide: true,
    },
    {
      label: "自动定位Y坐标",
      prop: "ZDDWYZB",
      type: "input",
      hide: true,
    },
    {
      label: "有无危险物质",
      prop: "YWWXWZ",
      type: "input",
      hide: true,
    },
    {
      label: "有无爆炸/泄漏",
      prop: "YWBZXL",
      type: "input",
      hide: true,
    },
    {
      label: "有无被困人员",
      prop: "YWBKRY",
      type: "input",
      hide: true,
    },
    {
      label: "有无受伤人员",
      prop: "YWSSRY",
      type: "input",
      hide: true,
    },
    {
      label: "是否涉外",
      prop: "SFSW",
      type: "input",
      hide: true,
    },
    {
      label: "是否涉枪涉爆",
      prop: "SFSQSB",
      type: "input",
      hide: true,
    },
    {
      label: "122_伤害程度代码",
      prop: "SGCD",
      type: "input",
      hide: true,
    },
    {
      label: "122_涉警车牌号",
      prop: "BJCPH",
      type: "input",
      hide: true,
    },
    {
      label: "122_是否需要施救",
      prop: "SFXYSJ",
      type: "input",
      hide: true,
    },
    {
      label: "122_有无逃逸",
      prop: "YWTY",
      type: "input",
      hide: true,
    },
    {
      label: "122_逃逸方向",
      prop: "TYFX",
      type: "input",
      hide: true,
    },
    {
      label: "122_车辆类型代码",
      prop: "CLLX",
      type: "input",
      hide: true,
    },
    {
      label: "119_灾害事故类型",
      prop: "ZHSGLX",
      type: "input",
      hide: true,
    },
    {
      label: "119_起火物类别代码",
      prop: "QHWLB",
      type: "input",
      hide: true,
    },
    {
      label: "119_燃烧物性质代码",
      prop: "RSWXZ",
      type: "input",
      hide: true,
    },
    {
      label: "119_建筑类别代码",
      prop: "JZLB",
      type: "input",
      hide: true,
    },
    {
      label: "119_建筑结构代码",
      prop: "JZJG",
      type: "input",
      hide: true,
    },
    {
      label: "119_起火场所代码",
      prop: "QHCS",
      type: "input",
      hide: true,
    },
    {
      label: "sthy入库时间戳",
      prop: "RKSJC",
      type: "input",
      hide: true,
    },
    {
      label: "sthy更新时间戳",
      prop: "GXSJC",
      type: "input",
      hide: true,
    },
    {
      label: "接口时间",
      prop: "D_UPLOADTIME",
      type: "input",
      hide: true,
    },
    {
      label: "数据汇聚时间",
      prop: "D_GATHERTIME",
      type: "input",
      hide: true,
    },
    {
      label: "记录第一次入库时间戳",
      prop: "D_FIRSTTIME",
      type: "input",
      hide: true,
    },
    {
      label: "本机入库时间(更新时间)",
      prop: "D_LOCALTIME",
      type: "input",
      hide: true,
    },
    {
      label: "备注",
      prop: "MEMO",
      type: "input",
      hide: true,
    },
    {
      label: "",
      prop: "N_SOURCE",
      type: "input",
      hide: true,
    },
    {
      label: "",
      prop: "LDGBH",
      type: "input",
      hide: true,
    },
    {
      label: "",
      prop: "SDDWXZB",
      type: "input",
      hide: true,
    },
    {
      label: "",
      prop: "SDDWYZB",
      type: "input",
      hide: true,
    },
    {
      label: "",
      prop: "X",
      type: "input",
      hide: true,
    },
    {
      label: "",
      prop: "Y",
      type: "input",
      hide: true,
    },
    {
      label: "CTI挂机时间",
      prop: "GJSJ",
      type: "input",
      hide: true,
    },
    {
      label: "一案一码",
      prop: "AJBM",
      type: "input",
      hide: true,
    },
    {
      label: "系统时间",
      prop: "XTSJ",
      type: "input",
      hide: true,
    },
  ]
}
src/const/outAlarm/outAlarm.js
New file
@@ -0,0 +1,175 @@
export default {
  height:'auto',
  calcHeight: 30,
  tip: false,
  searchShow: true,
  searchMenuSpan: 6,
  border: true,
  labelWidth:160,
  index: true,
  viewBtn: true,
  selection: true,
  dialogClickModal: false,
  column: [
    {
      label: "市级行政区划",
      prop: "PARENTXZQH",
      type: "input",
    },
    {
      label: "行政区划编号",
      prop: "XZQHBH",
      type: "input",
    },
    {
      label: "处警单编号",
      prop: "CJDBH",
      type: "input",
    },
    {
      label: "接警单编号",
      prop: "JJDBH",
      type: "input",
    },
    {
      label: "通知单编号",
      prop: "TZDBH",
      type: "input",
    },
    {
      label: "处警单位编号",
      prop: "CJDWBH",
      type: "input",
    },
    {
      label: "处警单位名称",
      prop: "CJDWMC",
      type: "input",
    },
    {
      label: "处警单位地域代码",
      prop: "CJDWDY",
      type: "input",
    },
    {
      label: "处警员编号",
      prop: "CJYBH",
      type: "input",
    },
    {
      label: "处警员姓名",
      prop: "CJYXM",
      type: "input",
    },
    {
      label: "创建时间==入库时间戳",
      prop: "CJSJ",
      type: "input",
      hide: true,
    },
    {
      label: "到达现场时间",
      prop: "DDXCSJ",
      type: "input",
    },
    {
      label: "首次反馈时间",
      prop: "SCFKSJ",
      type: "input",
    },
    {
      label: "处理完毕时间",
      prop: "CLWBSJ",
      type: "input",
      hide: true,
    },
    {
      label: "更新时间戳",
      prop: "GXSJC",
      type: "input",
      hide: true,
    },
    {
      label: "反馈内容",
      prop: "FKNR",
      type: "input",
    },
    {
      label: "出动人员",
      prop: "CDRY",
      type: "input",
    },
    {
      label: "出动车辆",
      prop: "CDCL",
      type: "input",
      hide: true,
    },
    {
      label: "处警类别",
      prop: "CJLB",
      type: "input",
      hide: true,
    },
    {
      label: "处警类型",
      prop: "CJLX",
      type: "input",
      hide: true,
    },
    {
      label: "处警细类",
      prop: "CJXL",
      type: "input",
      hide: true,
    },
    {
      label: "接警单中的接警时间",
      prop: "JJSJ",
      type: "input",
      hide: true,
    },
    {
      label: "接口时间",
      prop: "D_UPLOADTIME",
      type: "input",
      hide: true,
    },
    {
      label: "数据汇聚时间",
      prop: "D_GATHERTIME",
      type: "input",
      hide: true,
    },
    {
      label: "记录第一次入库时间戳",
      prop: "D_FIRSTTIME",
      type: "input",
      hide: true,
    },
    {
      label: "本机入库时间(更新时间)",
      prop: "D_LOCALTIME",
      type: "input",
      hide: true,
    },
    {
      label: "备注",
      prop: "MEMO",
      type: "input",
      hide: true,
    },
    {
      label: "处置类型",
      prop: "CZLX",
      type: "input",
      hide: true,
    },
    {
      label: "系统时间",
      prop: "XTSJ",
      type: "input",
      hide: true,
    },
  ]
}
src/views/alarm/alarm.vue
New file
@@ -0,0 +1,188 @@
<template>
  <basic-container>
    <avue-crud :option="option"
               :table-loading="loading"
               :data="data"
               :page.sync="page"
               :permission="permissionList"
               :before-open="beforeOpen"
               v-model="form"
               ref="crud"
               @row-update="rowUpdate"
               @row-save="rowSave"
               @row-del="rowDel"
               @search-change="searchChange"
               @search-reset="searchReset"
               @selection-change="selectionChange"
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
               @on-load="onLoad">
      <template slot="menuLeft">
        <el-button type="danger"
                   size="small"
                   icon="el-icon-delete"
                   plain
                   v-if="permission.alarm_delete"
                   @click="handleDelete">删 除
        </el-button>
      </template>
    </avue-crud>
  </basic-container>
</template>
<script>
  import {getList, getDetail, add, update, remove} from "@/api/alarm/alarm";
  import option from "@/const/alarm/alarm";
  import {mapGetters} from "vuex";
  export default {
    data() {
      return {
        form: {},
        query: {},
        loading: true,
        page: {
          pageSize: 10,
          currentPage: 1,
          total: 0
        },
        selectionList: [],
        option: option,
        data: []
      };
    },
    computed: {
      ...mapGetters(["permission"]),
      permissionList() {
        return {
          addBtn: this.vaildData(this.permission.alarm_add, false),
          viewBtn: this.vaildData(this.permission.alarm_view, false),
          delBtn: this.vaildData(this.permission.alarm_delete, false),
          editBtn: this.vaildData(this.permission.alarm_edit, false)
        };
      },
      ids() {
        let ids = [];
        this.selectionList.forEach(ele => {
          ids.push(ele.id);
        });
        return ids.join(",");
      }
    },
    methods: {
      rowSave(row, done, loading) {
        add(row).then(() => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          done();
        }, error => {
          loading();
          window.console.log(error);
        });
      },
      rowUpdate(row, index, done, loading) {
        update(row).then(() => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          done();
        }, error => {
          loading();
          console.log(error);
        });
      },
      rowDel(row) {
        this.$confirm("确定将选择数据删除?", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        })
          .then(() => {
            return remove(row.id);
          })
          .then(() => {
            this.onLoad(this.page);
            this.$message({
              type: "success",
              message: "操作成功!"
            });
          });
      },
      handleDelete() {
        if (this.selectionList.length === 0) {
          this.$message.warning("请选择至少一条数据");
          return;
        }
        this.$confirm("确定将选择数据删除?", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        })
          .then(() => {
            return remove(this.ids);
          })
          .then(() => {
            this.onLoad(this.page);
            this.$message({
              type: "success",
              message: "操作成功!"
            });
            this.$refs.crud.toggleSelection();
          });
      },
      beforeOpen(done, type) {
        if (["edit", "view"].includes(type)) {
          getDetail(this.form.id).then(res => {
            this.form = res.data.data;
          });
        }
        done();
      },
      searchReset() {
        this.query = {};
        this.onLoad(this.page);
      },
      searchChange(params, done) {
        this.query = params;
        this.page.currentPage = 1;
        this.onLoad(this.page, params);
        done();
      },
      selectionChange(list) {
        this.selectionList = list;
      },
      selectionClear() {
        this.selectionList = [];
        this.$refs.crud.toggleSelection();
      },
      currentChange(currentPage){
        this.page.currentPage = currentPage;
      },
      sizeChange(pageSize){
        this.page.pageSize = pageSize;
      },
      refreshChange() {
        this.onLoad(this.page, this.query);
      },
      onLoad(page, params = {}) {
        this.loading = true;
        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
          const data = res.data.data;
          this.page.total = data.total;
          this.data = data.records;
          this.loading = false;
          this.selectionClear();
        });
      }
    }
  };
</script>
<style>
</style>
src/views/outAlarm/outAlarm.vue
New file
@@ -0,0 +1,188 @@
<template>
  <basic-container>
    <avue-crud :option="option"
               :table-loading="loading"
               :data="data"
               :page.sync="page"
               :permission="permissionList"
               :before-open="beforeOpen"
               v-model="form"
               ref="crud"
               @row-update="rowUpdate"
               @row-save="rowSave"
               @row-del="rowDel"
               @search-change="searchChange"
               @search-reset="searchReset"
               @selection-change="selectionChange"
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
               @on-load="onLoad">
      <template slot="menuLeft">
        <el-button type="danger"
                   size="small"
                   icon="el-icon-delete"
                   plain
                   v-if="permission.outAlarm_delete"
                   @click="handleDelete">删 除
        </el-button>
      </template>
    </avue-crud>
  </basic-container>
</template>
<script>
  import {getList, getDetail, add, update, remove} from "@/api/outAlarm/outAlarm";
  import option from "@/const/outAlarm/outAlarm";
  import {mapGetters} from "vuex";
  export default {
    data() {
      return {
        form: {},
        query: {},
        loading: true,
        page: {
          pageSize: 10,
          currentPage: 1,
          total: 0
        },
        selectionList: [],
        option: option,
        data: []
      };
    },
    computed: {
      ...mapGetters(["permission"]),
      permissionList() {
        return {
          addBtn: this.vaildData(this.permission.outAlarm_add, false),
          viewBtn: this.vaildData(this.permission.outAlarm_view, false),
          delBtn: this.vaildData(this.permission.outAlarm_delete, false),
          editBtn: this.vaildData(this.permission.outAlarm_edit, false)
        };
      },
      ids() {
        let ids = [];
        this.selectionList.forEach(ele => {
          ids.push(ele.id);
        });
        return ids.join(",");
      }
    },
    methods: {
      rowSave(row, done, loading) {
        add(row).then(() => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          done();
        }, error => {
          loading();
          window.console.log(error);
        });
      },
      rowUpdate(row, index, done, loading) {
        update(row).then(() => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          done();
        }, error => {
          loading();
          console.log(error);
        });
      },
      rowDel(row) {
        this.$confirm("确定将选择数据删除?", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        })
          .then(() => {
            return remove(row.id);
          })
          .then(() => {
            this.onLoad(this.page);
            this.$message({
              type: "success",
              message: "操作成功!"
            });
          });
      },
      handleDelete() {
        if (this.selectionList.length === 0) {
          this.$message.warning("请选择至少一条数据");
          return;
        }
        this.$confirm("确定将选择数据删除?", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        })
          .then(() => {
            return remove(this.ids);
          })
          .then(() => {
            this.onLoad(this.page);
            this.$message({
              type: "success",
              message: "操作成功!"
            });
            this.$refs.crud.toggleSelection();
          });
      },
      beforeOpen(done, type) {
        if (["edit", "view"].includes(type)) {
          getDetail(this.form.id).then(res => {
            this.form = res.data.data;
          });
        }
        done();
      },
      searchReset() {
        this.query = {};
        this.onLoad(this.page);
      },
      searchChange(params, done) {
        this.query = params;
        this.page.currentPage = 1;
        this.onLoad(this.page, params);
        done();
      },
      selectionChange(list) {
        this.selectionList = list;
      },
      selectionClear() {
        this.selectionList = [];
        this.$refs.crud.toggleSelection();
      },
      currentChange(currentPage){
        this.page.currentPage = currentPage;
      },
      sizeChange(pageSize){
        this.page.pageSize = pageSize;
      },
      refreshChange() {
        this.onLoad(this.page, this.query);
      },
      onLoad(page, params = {}) {
        this.loading = true;
        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
          const data = res.data.data;
          this.page.total = data.total;
          this.data = data.records;
          this.loading = false;
          this.selectionClear();
        });
      }
    }
  };
</script>
<style>
</style>