Administrator
2021-08-06 a00045d805dc308a4ac158d0fe4f34467f4e135c
Merge branch 'master' of http://192.168.0.105:10010/r/zhba_enterprises
9 files modified
1 files added
566 ■■■■■ changed files
src/router/views/index.js 40 ●●●●● patch | view | raw | blame | history
src/views/dispatch/data.js 24 ●●●● patch | view | raw | blame | history
src/views/dispatch/dispatch.vue 17 ●●●●● patch | view | raw | blame | history
src/views/dispatch/dispatchChildoperable.vue 68 ●●●●● patch | view | raw | blame | history
src/views/resource/attachCopy.vue 361 ●●●●● patch | view | raw | blame | history
src/views/securityAnalysis/index.vue 2 ●●● patch | view | raw | blame | history
src/views/securityGuard/securityGuard.vue 24 ●●●●● patch | view | raw | blame | history
src/views/securityUnit/data.js 1 ●●●● patch | view | raw | blame | history
src/views/securityUnit/index.vue 27 ●●●●● patch | view | raw | blame | history
vue.config.js 2 ●●● patch | view | raw | blame | history
src/router/views/index.js
@@ -143,19 +143,6 @@
                import ( /* webpackChunkName: "views" */ '@/views/securityUnit/index')
        }]
    }, {
        path: '/traincompany',
        component: Layout,
        redirect: '/traincompany/index',
        children: [{
            path: 'index',
            name: '培训公司查询',
            meta: {
                i18n: 'dict'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/traincompany/index')
        }]
    }, {
        path: '/securityGuard',
        component: Layout,
        redirect: '/securityGuard/securityGuard',
@@ -275,6 +262,19 @@
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/workreport/workreply')
        }]
    }, {
        path: '/resource',
        component: Layout,
        redirect: '/resource/attachCopy',
        children: [{
            path: 'attachCopy',
            name: '保安单位附件上传',
            meta: {
                i18n: 'dict'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/resource/attachCopy')
        }]
    },
    // {
@@ -759,4 +759,18 @@
            noCache: true
        }]
    },
    {
        path: '/traincompany',
        component: Layout,
        redirect: '/traincompany/index',
        children: [{
            path: 'index',
            name: '培训公司查询',
            meta: {
                i18n: 'dict'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/traincompany/index')
        }]
    },
]
src/views/dispatch/data.js
@@ -20,26 +20,26 @@
    {
        label: "保安公司",
        prop: "tenantName",
        type: "tree",
        dicUrl: "/api/blade-system/dept/security_lazy-tree?parentId=0",
        props: {
            label: "title",
            value: "id"
        },
        // type: "tree",
        // dicUrl: "/api/blade-system/dept/security_lazy-tree?parentId=0",
        // props: {
        //     label: "title",
        //     value: "id"
        // },
        // hide: !website.tenantMode,
        // addDisplay: website.tenantMode,
        // editDisplay: website.tenantMode,
        // viewDisplay: website.tenantMode,
        rules: [{
            required: true,
            message: "请输入所属保安单位",
            trigger: "click"
        }],
        // rules: [{
        //     required: true,
        //     message: "请输入所属保安单位",
        //     trigger: "click"
        // }],
        labelWidth: 110,
        width: 200,
        editDisplay: false,
        addDisplay: false,
        hide: true,
        // hide: true,
        // span: 11,
    },
    {
src/views/dispatch/dispatch.vue
@@ -74,12 +74,13 @@
  update1,
  remove1,
} from "@/api/dispatch/dispatch";
import { getDeptTree, getDeptLazyTree } from "@/api/system/dept";
import { mapGetters } from "vuex";
export default {
  data() {
    return {
      typeTABS: {}, //标签页
      deptId: "",
      optionTABS: {
        column: [
          {
@@ -174,6 +175,7 @@
    };
  },
  computed: {
    ...mapGetters(["userInfo"]),
    ids() {
      let ids = [];
      this.selectionList.forEach((ele) => {
@@ -220,10 +222,9 @@
      // var form = this.data[0];
      // delete form.id;
      // for (var k = 0; k < 13; k++) {
      form["deptId"] = form.tenantName;
      form["tenantName"] = form.$tenantName;
      // delete form.tenantName;
      // console.log(form);
      form["deptId"] = this.userInfo.dept_id;
      // form["tenantName"] = form.this.userInfo.user_name;
      adddata(form).then(
        (res) => {
          this.onLoad(this.page);
@@ -324,6 +325,7 @@
      });
    },
    onLoad(page, params = {}) {
      var that = this;
      this.loading = true;
      getdata(
        page.currentPage,
@@ -334,8 +336,11 @@
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        for (var k in this.data) {
          this.data[k]["deptId"] = that.userInfo.dept_id;
          this.data[k]["tenantName"] = that.userInfo.user_name;
        }
        window.localStorage.setItem("paqiandataS", JSON.stringify(this.data));
        console.log(this.data);
        this.loading = false;
      });
    },
src/views/dispatch/dispatchChildoperable.vue
@@ -232,6 +232,7 @@
            search: true,
            overHidden: true,
            type: "tree",
            searchSpan: 5,
            cascaderItem: ["name"],
            // cascaderItem: ["city", "area"],
            props: {
@@ -253,6 +254,8 @@
            prop: "name",
            labelWidth: 120,
            type: "tree",
            search: true,
            searchSpan: 5,
            cell: true,
            props: {
              label: "realName",
@@ -340,7 +343,7 @@
            valueFormat: "yyyy-MM-dd hh:mm:ss",
            labelWidth: 120,
            searchSpan: 4,
            search: true,
            // search: true,
            overHidden: true,
            rules: [
              {
@@ -369,6 +372,28 @@
            // search: true,
            // searchSpan: 5,
            // overHidden: true
          },
          {
            label: "派遣时间",
            prop: "releaseTimeRange",
            type: "datetime",
            format: "yyyy-MM-dd",
            valueFormat: "yyyy-MM-dd",
            searchValue: [this.getStartTime(), this.getEndTime()],
            searchRange: true,
            searchSpan: 5,
            hide: true,
            addDisplay: false,
            editDisplay: false,
            viewDisplay: false,
            search: true,
            rules: [
              {
                required: true,
                message: "请输入时间",
                trigger: "blur",
              },
            ],
          },
          {
            label: "派遣地址",
@@ -684,6 +709,26 @@
      this.onLoad1(this.page1, this.query1);
    },
    getStartTime() {
      if (
        this.$route.query.startTime != undefined &&
        this.$route.query.startTime != null &&
        this.$route.query.startTime != ""
      ) {
        return this.$route.query.startTime;
      }
      return "";
    },
    getEndTime() {
      if (
        this.$route.query.endTime != undefined &&
        this.$route.query.endTime != null &&
        this.$route.query.endTime != ""
      ) {
        return this.$route.query.endTime;
      }
      return "";
    },
    //
    onLoad1(page, params = {}) {
      this.loading1 = true;
@@ -693,10 +738,29 @@
      // params["dispatcherUnitId"] = this.id;
      // console.log(params, "get");
      // console.log(page);
      var values;
      const { releaseTimeRange } = this.query1;
      if (releaseTimeRange) {
        values = {
          ...params,
          beginTime: releaseTimeRange[0],
          overTime: releaseTimeRange[1],
          ...this.query,
        };
        values.releaseTimeRange = null;
      } else {
        values = {
          ...params,
          ...this.query,
        };
      }
      console.log(values);
      getdata1(
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.query)
        // Object.assign(params, this.query)
        values
      ).then((res) => {
        // console.log(res);
        const data = res.data.data;
src/views/resource/attachCopy.vue
New file
@@ -0,0 +1,361 @@
<template>
  <basic-container class="hasButTwo">
    <avue-crud
      :option="option"
      :table-loading="loading"
      :data="data"
      :page.sync="page"
      :permission="permissionList"
      :before-open="beforeOpen"
      v-model="form"
      ref="crud"
      @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="primary"
          size="small"
          plain
          v-if="permission.attach_upload"
          icon="el-icon-upload2"
          @click="handleUpload"
          >上 传
        </el-button>
        <el-button
          type="danger"
          size="small"
          icon="el-icon-delete"
          plain
          v-if="permission.attach_delete"
          @click="handleDelete"
          >删 除
        </el-button>
      </template>
      <template slot-scope="scope" slot="menu">
        <el-button
          type="text"
          icon="el-icon-download"
          size="small"
          v-if="permission.attach_download"
          @click="handleDownload(scope.row)"
          >下载
        </el-button>
      </template>
      <template slot-scope="{ row }" slot="attachSize">
        <el-tag>{{ `${row.attachSize} KB` }}</el-tag>
      </template>
    </avue-crud>
    <el-dialog
      title="附件管理"
      append-to-body
      :visible.sync="attachBox"
      width="555px"
    >
      <avue-form
        ref="form"
        :option="attachOption"
        v-model="attachForm"
        :upload-after="uploadAfter"
      >
      </avue-form>
    </el-dialog>
  </basic-container>
</template>
<script>
import { getList, getDetail, remove } from "@/api/resource/attach";
import { mapGetters } from "vuex";
export default {
  data() {
    var type = 4;
    var deptid = this.$route.query.deptId;
    return {
      form: {},
      query: {},
      putParam: "",
      loading: true,
      page: {
        pageSize: 10,
        currentPage: 1,
        total: 0,
      },
      attachBox: false,
      selectionList: [],
      option: {
        height: "auto",
        calcHeight: 30,
        tip: false,
        searchShow: true,
        searchMenuSpan: 6,
        border: false,
        index: true,
        stripe: true,
        viewBtn: true,
        selection: true,
        dialogClickModal: false,
        column: [
          {
            label: "附件地址",
            prop: "link",
            rules: [
              {
                required: true,
                message: "请输入附件地址",
                trigger: "blur",
              },
            ],
          },
          {
            label: "附件域名",
            prop: "domain",
            search: true,
            rules: [
              {
                required: true,
                message: "请输入附件域名",
                trigger: "blur",
              },
            ],
          },
          {
            label: "附件名称",
            prop: "name",
            search: true,
            rules: [
              {
                required: true,
                message: "请输入附件名称",
                trigger: "blur",
              },
            ],
          },
          {
            label: "附件原名",
            prop: "originalName",
            search: true,
            rules: [
              {
                required: true,
                message: "请输入附件原名",
                trigger: "blur",
              },
            ],
          },
          {
            label: "附件拓展名",
            prop: "extension",
            rules: [
              {
                required: true,
                message: "请输入附件拓展名",
                trigger: "blur",
              },
            ],
          },
          {
            label: "所属公司",
            prop: "enterprisename",
            rules: [
              {
                required: true,
                message: "请输入所属公司",
                trigger: "blur",
              },
            ],
          },
          {
            label: "附件大小",
            prop: "attachSize",
            slot: true,
            rules: [
              {
                required: true,
                message: "请输入附件大小",
                trigger: "blur",
              },
            ],
          },
        ],
      },
      data: [],
      attachForm: {},
      attachOption: {
        submitBtn: false,
        emptyBtn: false,
        column: [
          {
            label: "附件上传",
            prop: "attachFile",
            type: "upload",
            drag: true,
            loadText: "模板上传中,请稍等",
            span: 24,
            propsHttp: {
              res: "data",
            },
            action:
              "/api/blade-resource/oss/endpoint/put-file-attach?type=" +
              type +
              "&deptid=" +
              deptid,
          },
        ],
      },
    };
  },
  computed: {
    ...mapGetters(["permission"]),
    permissionList() {
      return {
        addBtn: false,
        editBtn: false,
        viewBtn: false,
        delBtn: this.vaildData(this.permission.attach_delete, false),
      };
    },
    ids() {
      let ids = [];
      this.selectionList.forEach((ele) => {
        ids.push(ele.id);
      });
      return ids.join(",");
    },
  },
  mounted() {
    var flag = false,
      i = 0,
      ind = null;
    this.$store.state.tags.tagList.forEach((item, index) => {
      if (item.label == "保安单位附件上传") {
        if (flag == false) {
          ind = index;
          flag = true;
        }
        i++;
      }
    });
    if (i > 1) {
      this.$store.state.tags.tagList.splice(ind, 1);
    }
  },
  methods: {
    handleUpload() {
      this.attachBox = true;
    },
    uploadAfter(res, done, loading, column) {
      window.console.log(column);
      this.attachBox = false;
      this.refreshChange();
      done();
    },
    handleDownload(row) {
      window.open(`${row.link}`);
    },
    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 = {}) {
      params.type = 4;
      params.deptid = this.$route.query.deptId;
      console.log(params.deptid);
      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;
        for (var k in this.data) {
          this.data[k]["enterprisename"] = this.$route.query.enterprisename;
        }
        console.log(this.data);
        this.loading = false;
        this.selectionClear();
      });
    },
  },
};
</script>
<style>
</style>
src/views/securityAnalysis/index.vue
@@ -143,7 +143,7 @@
      var that = this;
      getinformationselectHold(this.deptid).then((res) => {
        var a = res.data.data[0];
        // console.log(a);
        console.log(res);
        var d = [
          {
            value: a.wcz,
src/views/securityGuard/securityGuard.vue
@@ -408,22 +408,22 @@
                ],
              },
              {
                label: '个人照片',
                type: 'upload',
                listType: 'picture-img',
                label: "个人照片",
                type: "upload",
                listType: "picture-img",
                propsHttp: {
                  res: 'data',
                  url: 'link',
                  res: "data",
                  url: "link",
                },
                canvasOption: {
                  text: ' ',
                  ratio: 0.1
                  text: " ",
                  ratio: 0.1,
                },
                action: '/api/blade-resource/oss/endpoint/put-file',
                tip: '只能上传jpg/png个人头像,且不超过500kb',
                action: "/api/blade-resource/oss/endpoint/put-file",
                tip: "只能上传jpg/png个人头像,且不超过500kb",
                span: 12,
                row: true,
                prop: 'myPicture'
                prop: "myPicture",
              },
              {
                label: "编号",
@@ -1194,6 +1194,10 @@
        roleId: this.roleId,
        ...this.query,
      };
      if (this.userInfo.role_id == "1414840172333842433") {
        console.log("是公安add jurisdiction");
        values["jurisdiction"] = this.userInfo.jurisdiction;
      }
      this.loading = true;
      getList(page.currentPage, page.pageSize, values, this.treeDeptId).then(
        (res) => {
src/views/securityUnit/data.js
@@ -60,6 +60,7 @@
        searchSpan: 6,
        labelWidth: 160,
        // width: 130,
        overHidden: true
    },
    {
        label: "企业类型",
src/views/securityUnit/index.vue
@@ -16,6 +16,15 @@
      @refresh-change="refreshChange"
      @row-click="rowClick"
    >
      <template slot-scope="{ type, size, row }" slot="menu">
        <el-button
          :size="size"
          :type="type"
          @click="handleUploadPage(row)"
          icon="el-icon-circle-check"
          >单位装备清单附件上传
        </el-button>
      </template>
      <template slot="menuLeft">
        <el-button
          type="primary"
@@ -103,6 +112,7 @@
  adddata2,
  getDeptLazyTree,
} from "@/api/securityUnit/securityUnit";
import { mapGetters } from "vuex";
export default {
  data() {
    var w = 160,
@@ -219,7 +229,7 @@
        searchSize: "mini",
        searchMenuSpan: 6,
        height: 693,
        menuWidth: 160,
        menuWidth: 290,
        align: "center",
        selection: true,
        column: column,
@@ -227,6 +237,7 @@
    };
  },
  computed: {
    ...mapGetters(["userInfo"]),
    ids() {
      let ids = [];
      this.selectionList.forEach((ele) => {
@@ -382,7 +393,21 @@
        // params: { row: row.identificationnumber },
      });
    },
    //跳转到附近列表页面
    handleUploadPage(row) {
      this.$router.push({
        path: `/resource/attachCopy`,
        query: {
          deptId: row.departmentid,
          enterprisename: row.enterprisename,
        },
      });
    },
    onLoad(page, params = {}) {
      if (this.userInfo.role_id == "1414840172333842433") {
        console.log("是公安add jurisdiction");
        params["jurisdiction"] = this.userInfo.jurisdiction;
      }
      this.loading = true;
      getdata(
        page.currentPage,
vue.config.js
@@ -29,7 +29,7 @@
        //本地服务接口地址
        // target: 'http://localhost',
        // target: 'http://192.168.0.114:81',//钟W
        target: 'http://localhost:82',//原W
        target: 'http://localhost:81',//原W
        // target: 'http://192.168.0.104:80',//唐N
        //远程演示服务地址,可用于直接启动项目
        // target: 'https://saber.bladex.vip/api',