保安服务企业管理-验收版本
+
liuyg
2021-11-30 a2b4882ab5fed78926ee2bd77fa6577fb7a965bf
+
1 files modified
82 ■■■■ changed files
src/views/desk/notice.vue 82 ●●●● patch | view | raw | blame | history
src/views/desk/notice.vue
@@ -1,6 +1,7 @@
<template>
    <basic-container class="desk1">
        <avue-crud :option="option"
    <avue-crud
      :option="option"
                   :table-loading="loading"
                   :data="data"
                   :page.sync="page"
@@ -18,27 +19,30 @@
                   @current-change="currentChange"
                   @size-change="sizeChange"
                   @refresh-change="refreshChange"
                   @on-load="onLoad">
      @on-load="onLoad"
    >
            <template slot="menuLeft">
                <el-button type="danger"
        <el-button
          type="danger"
                           size="small"
                           icon="el-icon-delete"
                           v-if="permission.notice_delete"
                           plain
                           @click="handleDelete">删 除
          @click="handleDelete"
          >删 除
                </el-button>
                <!-- v-if="permission.notice_delete" -->
            </template>
            <template slot-scope="{ row }"
                      slot="category">
      <template slot-scope="{ row }" slot="category">
                <el-tag>{{ row.categoryName }}</el-tag>
            </template>
            <template slot-scope="{ type, size, row }"
                      slot="menu">
                <el-button :size="size"
      <template slot-scope="{ type, size, row }" slot="menu">
        <el-button
          :size="size"
                           :type="type"
                           v-if="permission.notice_upload"
                           @click="handleUploadPage(row)">附件上传
          @click="handleUploadPage(row)"
          >附件上传
                </el-button>
                <!-- <el-button
          v-if="!deptCategory"
@@ -53,10 +57,17 @@
</template>
<script>
import { getListPage, remove, update, add, getNotice, getPeopleList } from "@/api/desk/notice";
import {
  getListPage,
  remove,
  update,
  add,
  getNotice,
  getPeopleList,
} from "@/api/desk/notice";
import { getDept } from "@/api/system/dept";
import { mapGetters } from "vuex";
import { mapState } from 'vuex';
import { mapState } from "vuex";
export default {
    data () {
@@ -121,8 +132,8 @@
                        },
                        dataType: "number",
                        slot: true,
                        addDisplay: false,
                        editDisplay: false,
            // addDisplay: false,
            // editDisplay: false,
                        defaultValue: "1",
                        prop: "category",
                        search: true,
@@ -150,11 +161,13 @@
                        },
                        multiple: true,
                        // dataType: "number",
                        rules: [{
            rules: [
              {
                            required: true,
                            message: "请选择接收人",
                            trigger: "blur"
                        }]
                trigger: "blur",
              },
            ],
                    },
                    {
                        label: "接收人",
@@ -255,24 +268,21 @@
            return ids.join(",");
        },
        ...mapState({
            userInfo: state => state.user.userInfo
        })
      userInfo: (state) => state.user.userInfo,
    }),
    },
    mounted () {
        this.getDeptInfo(this.userInfo.dept_id);
    // this.getDeptInfo(this.userInfo.dept_id);
        getPeopleList({ deptId: this.userInfo.dept_id }).then(res => {
    getPeopleList({ deptId: this.userInfo.dept_id }).then((res) => {
            const columnReceivedIds = this.findObject(
                this.option.column,
                "receivedIds"
            );
            console.log(columnReceivedIds, res.data.data, 6456)
            columnReceivedIds.dicData = res.data.data
        })
      console.log(columnReceivedIds, res.data.data, 6456);
      columnReceivedIds.dicData = res.data.data;
    });
    },
    methods: {
        //获取当前用户部门信息
@@ -283,7 +293,6 @@
                deptCategory == 1
                    ? (that.deptCategory = true)
                    : (that.deptCategory = false);
            });
        },
        //跳转到附件列表页面
@@ -297,15 +306,15 @@
            });
        },
        rowSave (row, done, loading) {
            if (this.deptCategory) {
                row.category = 1;
            } else {
                row.category = 2;
            }
            row['type'] = 1;
      //   if (this.deptCategory) {
      //     row.category = 1;
      //   } else {
      //     row.category = 2;
      //   }
      row["type"] = 1;
            row.deptId = this.deptId;
            row.receivedIds = row.receivedIds.toString()
      row.receivedIds = row.receivedIds.toString();
            add(row).then(
                () => {
@@ -330,7 +339,7 @@
            // }
            row.deptId = this.deptId;
            row.receivedIds = row.receivedIds.toString()
      row.receivedIds = row.receivedIds.toString();
            update(row).then(
                () => {
@@ -436,7 +445,6 @@
                const { releaseTimeRange } = this.query;
                params["jurisdiction"] = this.jurisdiction;
                params["type"] = 1;
                
                let values = {
                    ...params,