Administrator
2022-04-11 79d9fc857559982b00b68b2d709807bdc4cd286f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
<template>
  <div class="businessDetail">
  <basic-container>
    <avue-crud
      :option="tableOption"
      :table-loading="loading"
      :data="tableData"
      :page.sync="page"
      :permission="permissionList"
      ref="crud"
      @row-update="rowUpdates"
      @row-save="rowSave"
      @search-change="searchChange"
      @search-reset="searchReset"
      @current-change="currentChange"
      @size-change="sizeChange"
      @refresh-change="refreshChange"
      @on-load="onLoad"
    >
    </avue-crud>
  </basic-container>
   </div>
</template>
<script>
import { mapGetters } from "vuex";
import {
  dispatcherUnit
} from "../../api/statisticalQueryManagement/statisticalQueryManagement";
export default {
  name: "业务情况统计明细",
  props: ["fwdeptId"],
  data() {
    return {
      page: {
        pageSize: 10,
        currentPage: 1,
        total: 0
      },
      query: {},
      value1: "",
      value2: "",
      tableData: [
      ],
      tablePage: {
        pageSize: 10,
        currentPage: 1,
        total: 0
      },
      tableOption: {
        excelBtn: true,
        delBtn: false,
        editBtn: false,
        addBtn: false,
        selection: true,
        menu: false,
        align: "center",
        height: "auto",
        calcHeight: 30,
        tip: false,
        searchShowBtn: false,
        searchShow: true,
        searchMenuSpan: 6,
        index: true,
        indexLabel:'序号',
        viewBtn: true,
        dialogClickModal: false,
        column: [
          {
            label: "服务单位名称",
            prop: "name",
            props: {
              label: "name",
              value: "name"
            },
            searchLabelWidth: 110,
            search: true,
            searchSpan: 8,
            rules: [
              {
                required: true,
                message: "请选择服务单位",
                trigger: "blur"
              }
            ]
            // display: false
          },
          {
            label: "保安公司名称",
            width: 300,
            prop: "deptName",
            display: false
          },
          {
            label: "服务开始时间",
            prop: "startTime",
            display: false
          },
          {
            label: "服务到期时间",
            prop: "endTime",
            display: false
          },
          {
            label: "保安员人数",
            prop: "num",
            display: false
          },
          {
            label: "联系人",
            prop: "linkman",
            display: false
          },
          {
            label: "联系电话",
            prop: "phone",
            display: false
          }
        ]
      },
      typeValue: "0",
      typeOptions: [
        {
          value: "0",
          label: "全部"
        },
        {
          value: "1",
          label: "社保缴纳人数"
        },
        {
          value: "2",
          label: "社保缴纳总额"
        },
        {
          value: "3",
          label: "公司派遣人数"
        },
        {
          value: "4",
          label: "社保缴纳人数占比"
        }
      ],
      subofficeValue: "0",
      subofficeOptions: [
        {
          value: "0",
          label: "南昌市公安局"
        },
        {
          value: "2",
          label: "东湖分局"
        },
        {
          value: "3",
          label: "西湖分局"
        },
        {
          value: "4",
          label: "青云谱分局"
        },
        {
          value: "5",
          label: "青山湖分局"
        }
      ],
      servicesList: [],
      companyName: "",
      loading: true,
      deptid: ""
    };
  },
  computed: {
    ...mapGetters(["permission"]),
    permissionList() {
      return {
        addBtn: this.vaildData(this.permission.post_add, false),
        viewBtn: this.vaildData(this.permission.post_view, false),
        delBtn: this.vaildData(this.permission.post_delete, false),
        editBtn: this.vaildData(this.permission.post_edit, false)
      };
    }
  },
  methods: {
    searchChange(params, done) {
      this.query = params;
      this.page.currentPage = 1;
      this.onLoad(this.page, params);
      done();
    },
 
    searchReset() {
      this.query = {};
      this.onLoad(this.page);
    },
    currentChange(currentPage) {
      this.page.currentPage = currentPage;
      this.onLoad(this.page, this.query);
    },
    sizeChange(pageSize) {
      this.page.pageSize = pageSize;
      this.onLoad(this.page, this.query);
    },
    refreshChange() {
      this.onLoad(this.page, this.query);
    },
    onLoad(page, params = {}) {
      this.loading = true;
      let param = {};
      param["deptName"] = params['deptName'] || "";
      param["deptId"] = this.fwdeptId;
      param["current"] = page.currentPage;
      param["size"] = page.pageSize;
      param["name"] = params["name"] || "";
 
      dispatcherUnit(param).then(res => {
        const data = res.data.data;
        this.page.total = data.total;
        this.tableData = data.records;
        this.loading = false;
      });
    },
    getLocationParams() {
      let url = window.location.href;
      let urlArr = url.split("?")[1].split("&");
      var object = new Object();
      for (var i = 0; i < urlArr.length; i++) {
        let mm = urlArr[i].split("=");
        object[decodeURIComponent(mm[0])] = decodeURIComponent(mm[1]);
      }
      this.deptid = object["departmentid"] || "";
      // let jurisdiction = object["jurisdiction"] || "";
      this.query = { deptid: this.deptid };
      this.onLoad(this.page, this.query);
    }
  },
  mounted() {
  }
};
</script>
<style lang="scss" scoped>
</style>