zengh
2021-06-05 c10197e85b3768384af52244eb3c0a831f36c039
公安版本前端初版
2 files modified
304 ■■■■ changed files
src/views/clientManagement/clientManagement.vue 75 ●●●●● patch | view | raw | blame | history
src/views/realTimePolice/real.vue 229 ●●●●● patch | view | raw | blame | history
src/views/clientManagement/clientManagement.vue
@@ -329,27 +329,6 @@
                message: "请输入设备名称",
                trigger: "blur"
              }],
            },
            {
              label: "到期时间",
              prop: "releaseTimeRange",
              type: "datetime",
              format: "yyyy-MM-dd",
              valueFormat: "yyyy-MM-dd",
              searchRange: true,
              searchSpan: 6,
              hide: true,
              addDisplay: false,
              editDisplay: false,
              viewDisplay: false,
              search: true,
              rules: [
                {
                  required: true,
                  message: "请输入时间",
                  trigger: "blur"
                }
              ]
            }
            ,
            {
@@ -426,21 +405,14 @@
              label: "通道号",
              prop: "channelNumber",
              hide: true,
              addDisplay: true,
              editDisplay: true,
              viewDisplay: true,
              addDisplay: false,
              editDisplay: false,
              viewDisplay: false,
              rules: [{
                required: true,
                message: "请输入通道号",
                trigger: "blur"
              }],
            }, {
              label: "缴费状态",
              prop: "type",
              slot: true,
              sortable:true,
              addDisplay: false,
              editDisplay: false,
            }, {
              label: "设备厂商",
              prop: "manufacturers",
@@ -460,27 +432,6 @@
                message: "请选择设备厂商",
                trigger: "blur"
              }],
            }, {
              label: "布撤防状态",
              prop: "devicestate",
              type: "select",
              slot: true,
              width: 100,
              rules: [{
                required: true,
                message: "请选择布撤防状态",
                trigger: "blur"
              }],
              dicData: [
                {
                  label: "撤防",
                  value: "0"
                },
                {
                  label: "布防",
                  value: "1"
                }
              ]
            },
            {
              label: "设备状态",
@@ -489,19 +440,6 @@
              sortable:true,
              addDisplay: false,
              editDisplay: false,
            },
            {
              label: "故障状态",
              prop: "state",
              addDisplay: false,
              editDisplay: false,
              hide:true
            },
            {
              label: "故障原因",
              prop: "reason",
              addDisplay: false,
              editDisplay: false
            },
            {
              label: "省份",
@@ -691,13 +629,6 @@
              format: "yyyy-MM-dd",
              valueFormat: "yyyy-MM-dd HH:mm:ss",
              width: 130,
              hide: true,
              addDisplay: true,
              editDisplay: true,
              viewDisplay: true,
            }, {
              label: "缴费信息",
              prop: "pay",
              hide: true,
              addDisplay: true,
              editDisplay: true,
src/views/realTimePolice/real.vue
@@ -22,7 +22,8 @@
      @size-change="sizeChange"
      @refresh-change="refreshChange"
      @on-load="onLoad"
    >
      @row-click="rowClick">
      <template slot="menuLeft">
        <el-button
          type="danger"
@@ -97,45 +98,25 @@
        </el-tag>
      </template>
      <template slot-scope="{ type, size, row }" slot="menu">
        <el-button
          icon="el-icon-s-order"
          :size="size"
          :type="type"
          @click.stop="handleHistory(row)"
          >历史
        </el-button>
        <el-button
          icon="el-icon-video-camera-solid"
          :size="size"
          :type="type"
          @click.stop="handleStart(row)"
          >视频
        </el-button>
        <el-button
          v-if="row.jtype == 0 || row.jtype == ''"
          icon="el-icon-edit"
          :size="size"
          :type="type"
          @click.stop="handleManage(row)"
          >核实
        </el-button>
        <el-button
          v-if="row.jtype != 0 && row.jtype != ''"
          icon="el-icon-s-order"
          :size="size"
          :type="type"
          @click.stop="PoliceTracking(row)"
          >追踪
        </el-button>
        <el-button
          icon="el-icon-location-outline"
          :size="size"
          :type="type"
          @click.stop="handleMap(row)"
          >定位
        </el-button>
      </template>
<!--      <template slot-scope="{ type, size, row }" slot="menu">-->
<!--        <el-button-->
<!--          v-if="row.jtype == 0 || row.jtype == ''"-->
<!--          icon="el-icon-edit"-->
<!--          :size="size"-->
<!--          :type="type"-->
<!--          @click.stop="handleManage(row)"-->
<!--        >核实-->
<!--        </el-button>-->
<!--        <el-button-->
<!--          v-if="row.jtype != 0 && row.jtype != ''"-->
<!--          icon="el-icon-s-order"-->
<!--          :size="size"-->
<!--          :type="type"-->
<!--          @click.stop="PoliceTracking(row)"-->
<!--        >追踪-->
<!--        </el-button>-->
<!--      </template>-->
    </avue-crud>
    <real-popup ref="realPopupView"> </real-popup>
    <el-drawer title="电子地图" append-to-body="true" :visible.sync="showMap">
@@ -154,6 +135,7 @@
<script>
import { getList, remove, update, add, getclient } from "@/api/real/real";
import { mapGetters } from "vuex";
  import AvueMap from "avue-plugin-map";
export default {
  data() {
@@ -240,16 +222,6 @@
            ],
          },
          {
            label: "主要负责人",
            prop: "oneContacts",
            width: 90,
          },
          {
            label: "负责人电话",
            prop: "onePhone",
            width: 110,
          },
          {
            label: "报警人",
            prop: "galarmPeople",
            width: 90,
@@ -260,39 +232,42 @@
            width: 130,
          },
          {
            label: "事发地址",
              label: "地址",
            prop: "place",
              span:10,
          },
          {
            label: "设备编号",
            search: true,
            searchSpan: 3,
            width: 130,
            prop: "deviceNumber",
              label: null,
              prop: "map",
              labelWidth: "0",
              searchSpan:0,
              maxlength:0,
              hide: true,
              span: 2,
              // display:false,
              component: "AvueMap"
          },
          {
            label: "警情状态",
            searchSpan: 3,
            width: 96,
            search: true,
            slot: true,
            searchPlaceholder: "请选择",
            prop: "jtype",
            type: "select",
            dicData: [
              {
                label: "未处理",
                value: "0",
              label: "经度",
              hide: true,
              prop: "jd",
              searchSpan:2,
              width:"100",
              labelWidth: "120",
              formatter: (row,value,label,column)=>{
                return value = value.substring(0,11);
              },
              span:7,
              },
              {
                label: "处理中",
                value: "1",
              label: "纬度",
              labelWidth: "45",
              hide: true,
              prop: "wd",
              formatter: (row,value,label,column) => {
                return value = value.substring(0,10);
              },
              {
                label: "已处理",
                value: "2",
              },
            ],
              span:5,
          },
          {
            label: "省份",
@@ -360,24 +335,43 @@
            viewDisplay: true,
          },
          {
            label: "接警人",
              label: "设备编号",
              search: true,
              searchSpan: 3,
              width: 130,
              prop: "deviceNumber",
            },
            {
              label: "警情状态",
              searchSpan: 3,
              width: 96,
              search: true,
              slot: true,
              searchPlaceholder: "请选择",
              prop: "jtype",
              type: "select",
              dicData: [
                {
                  label: "未处理",
                  value: "0",
                },
                {
                  label: "处理中",
                  value: "1",
                },
                {
                  label: "已处理",
                  value: "2",
                },
              ],
            },
            {
              label: "派发人",
            prop: "alarmPeople",
            width: 90,
          },
          {
            label: "接警时间",
            type: "datetime",
            format: "yyyy-MM-dd HH:mm:ss",
            valueFormat: "yyyy-MM-dd HH:mm:ss",
            width: 130,
            prop: "jjTime",
            hide: true,
            addDisplay: true,
            editDisplay: true,
            viewDisplay: true,
          },
          {
              label: "保安",
              label: "处警员",
              prop: "securityArr",
              type: "tree",
              multiple: true,
@@ -393,7 +387,7 @@
              viewDisplay: true,
              rules: [{
                required: true,
                message: "请选择保安",
                message: "请选择处警员",
                trigger: "blur"
              }],
            }
@@ -404,14 +398,61 @@
      peopleList: [],
    };
  },
    watch: {
      "form.map": {
        // form是表单或者表格绑定的数据集,v-model='form'
        handler(val) {
          if (val) {
            var that = this;
            //重新加载一次页面详情数据,解决新的省市区无法写入问题
            //判断是新增还是修改
            if(that.isEdit){
              getclient(this.form.id).then(res => {
                // that.province = res.data.data.province;
                // that.city = res.data.data.city;
                // that.district = res.data.data.district;
              });
            }
            //经纬度替换
            this.form.wd = val.latitude;
            this.form.jd = val.longitude;
            //地址截取,从县/区开始截取,并且取从县区第一个出现的位置开始
            var address = val.formattedAddress.toString();
            if(address.search("县") != -1){
              this.form.place = address.substring(address.indexOf("县")+1,address.length);
            }
            if(address.search("区") != -1){
              this.form.place = address.substring(address.indexOf("区")+1,address.length);
            }
            //写入新的省市区
            that.form.province = val.addressComponent.province;
            if(val.addressComponent.city==""){
              that.form.city = val.addressComponent.province;
            }else{
              that.form.city = val.addressComponent.city;
            }
            that.form.district = val.addressComponent.district;
          }
        },
        immediate: true,
      },
      //随意一个
      // 'form.deviceName'() {
      //   if (this.initFlag) {
      //     this.initData();
      //   }
      // }
    },
  computed: {
    ...mapGetters(["permission", "flowRoutes"]),
    permissionList() {
      return {
        addBtn: this.vaildData(this.permission.real_add, false),
        viewBtn: this.vaildData(null, false),
        delBtn: this.vaildData(null, false),
        editBtn: this.vaildData(null, false),
          delBtn: this.vaildData(this.permission.real_delete, false),
          editBtn: this.vaildData(this.permission.real_edit, false),
      };
    },
    ids() {
@@ -1020,6 +1061,10 @@
      );
      //window.open(`http://localhost:8108/ureport/excel?_u=blade-alarm.statis.ureport.xml&beginTime=${beginTime}&endTime=${endTime}&waringType=${waringType}&timeDesc=${timeDesc}`);
    },
      rowClick(val) {//行点击事件
        //警情追踪
        this.$router.push({path: "/policeTracking/track", query: val});
      }
  },
};
</script>