南昌市物联网技防平台-前端
Administrator
2021-03-02 bb9305b6ec6b859b1257c163179f603346c71953
security 安保人员管理修改
3 files modified
60 ■■■■■ changed files
src/api/security/security.js 2 ●●● patch | view | raw | blame | history
src/views/security/security.vue 54 ●●●●● patch | view | raw | blame | history
vue.config.js 4 ●●●● patch | view | raw | blame | history
src/api/security/security.js
@@ -2,7 +2,7 @@
export const getList = (current, size, params) => {
  return request({
    url: '/api/blade-jfpts/security/security/list',
    url: '/api/blade-jfpts/security/security/page',
    method: 'get',
    params: {
      ...params,
src/views/security/security.vue
@@ -27,7 +27,50 @@
                   @click="handleDelete">删 除
        </el-button>
      </template>
      <template slot="menuLeft">
        <el-button
          type="danger"
          size="small"
          icon="el-icon-delete"
          plain
          v-if="permission.real_delete"
          @click="handleDelete"
        >删 除
        </el-button>
      </template>
      <template slot-scope="{ row }" slot="jtype">
        <el-tag>{{
          row.jtype == "0" ? "否" : row.jtype == "1" ? "是" : "无"
          }}
        </el-tag>
      </template>
      <template slot-scope="{ type, size, row }" slot="menu">
        <el-button
          icon="el-icon-location-outline"
          :size="size"
          :type="type"
          @click.stop="handleMap(row)"
        >定位
        </el-button>
      </template>
    </avue-crud>
    <el-drawer
      title="电子地图"
      append-to-body="true"
      :visible.sync="showMap"
    >
      <iframe
        id="mapDiv"
        ref="mapDiv"
        src="/map/index.html?openid=ClientManagement"
        frameborder="0"
        width="100%"
        height="100%"
      ></iframe>
    </el-drawer>
  </basic-container>
</template>
@@ -41,6 +84,7 @@
        form: {},
        query: {},
        loading: true,
        showMap: false,
        page: {
          pageSize: 10,
          currentPage: 1,
@@ -198,6 +242,15 @@
            });
          });
      },
      handleMap(row) {
        debugger
        this.showMap = true;
        this.$nextTick(() => {
          this.$refs.mapDiv.onload = () => {
            window.frames[0].init(null,{x: row.jd, y: row.wd});
          };
        })
      },
      handleDelete() {
        if (this.selectionList.length === 0) {
          this.$message.warning("请选择至少一条数据");
@@ -267,4 +320,3 @@
    }
  };
</script>
vue.config.js
@@ -34,8 +34,8 @@
    proxy: {
      '/api': {
        //本地服务接口地址
        //target: 'http://localhost:82/',
        target: 'http://36.134.81.48:18001/api/',
        target: 'http://localhost:82/',
        //target: 'http://36.134.81.48:18001/api/',
        //远程演示服务地址,可用于直接启动项目
        //target: 'https://saber.bladex.vip/api',
        ws: true,