瀏覽代碼

[FE]修改考勤报表页面和和设备管理页面初始化查询数据问题

luoxu5 4 年之前
父節點
當前提交
e5e3be8442

+ 9 - 11
security-protection-platform/src/modules/access/component/instrumentRecord/index.vue

@ -43,17 +43,10 @@
43 43
44 44
    <t-table :data="data" line @selection-change="handleSelectionChange">
45 45
      <t-table-column type="selection" width="34px"></t-table-column>
46
      <t-table-column label="姓名" prop="employeeName" width="60px">
47
      </t-table-column>
48
      <t-table-column label="员工编号" prop="employeeCode" width="80px">
49
      </t-table-column>
50
      <t-table-column label="公司" prop="companyname" width="94px">
51
      </t-table-column>
52
      <t-table-column label="部门" prop="organizationName" width="94px">
53
      </t-table-column>
54
      <t-table-column label="职务" prop="employeePositionZh" width="80px">
55
      </t-table-column>
56
      <t-table-column prop="simi" label="相似度" width="75px">
46
      <t-table-column label="仪表读数" width="75px" align="center">
47
        <template v-slot="{row}">
48
          <span>{{ getInstrumentNumber(row) }}</span>
49
        </template>
57 50
      </t-table-column>
58 51
      <t-table-column label="进出时间" prop="taskExecuteTime" width="160px">
59 52
      </t-table-column>
@ -198,6 +191,11 @@ export default {
198 191
    this.getcompanyTypesList()
199 192
  },
200 193
  methods: {
194
    // 获取仪表读数
195
    getInstrumentNumber (data) {
196
      const res = JSON.parse(data.idenResult)[0]['val'] || ''
197
      return res
198
    },
201 199
    // 表格中的选择数据
202 200
    handleSelectionChange (val) {
203 201
      this.selectdata = val

+ 23 - 17
security-protection-platform/src/modules/attendance/abnormal/index.vue

@ -97,20 +97,26 @@ export default {
97 97
      tableData: [],
98 98
      modalData: {},
99 99
      loadDetail: false,
100
      loadTable: false
100
      loadTable: false,
101
      isFirstCreatedDaily: true
101 102
    }
102 103
  },
103 104
  methods: {
104
    getDailyOrgId(id) {
105
    getDailyOrgId (id) {
105 106
      this.form.orgId = id
106 107
    },
107
    getDailyDepId(id) {
108
    getDailyDepId (id) {
108 109
      this.form.depId = id
110
      // 第一次创建获取表格数据
111
      if (this.isFirstCreatedDaily) {
112
        this.isFirstCreatedDaily = false
113
        this.getTableData()
114
      }
109 115
    },
110
    getDailyStaffId(id) {
116
    getDailyStaffId (id) {
111 117
      this.form.userid = id
112 118
    },
113
    handleInited() {
119
    handleInited () {
114 120
      this.getTableData()
115 121
    },
116 122
    // 搜索
@ -124,9 +130,9 @@ export default {
124 130
      this.getTableData()
125 131
    },
126 132
    // 获得考勤表格数据
127
    getTableData() {
133
    getTableData () {
128 134
      this.loadTable = true
129
      atdapi.getMonthAttendance({params: this.form}).then(res => {
135
      atdapi.getMonthAttendance({ params: this.form }).then(res => {
130 136
        let data = res.data.data || []
131 137
        this.tableData = []
132 138
        data.forEach(element => {
@ -138,7 +144,7 @@ export default {
138 144
      })
139 145
    },
140 146
    // 弹窗打开
141
    handleClick(data) {
147
    handleClick (data) {
142 148
      const { userid, beginDay, endDay } = data
143 149
      if (beginDay == null) {
144 150
        this.$Message.danger('未识别到有效的起止日期')
@ -162,33 +168,33 @@ export default {
162 168
}
163 169
</script>
164 170
<style lang="scss" scoped>
165
.page-main{
171
.page-main {
166 172
  margin: 20px 20px 16px 20px;
167
  .abnormalState{
168
    color: #EDA30F;
173
  .abnormalState {
174
    color: #eda30f;
169 175
    font-size: 14px;
170 176
  }
171
  .keep-row{
177
  .keep-row {
172 178
    margin-left: 24px;
173 179
    display: flex;
174 180
    align-items: center;
175 181
  }
176
  .search-btn{
182
  .search-btn {
177 183
    margin-left: auto;
178 184
    margin-right: 15px;
179 185
  }
180
  .icon-txt{
186
  .icon-txt {
181 187
    margin-right: 8px;
182 188
  }
183
  .export-excel{
189
  .export-excel {
184 190
    margin-top: 24px;
185 191
    display: flex;
186 192
    align-items: center;
187 193
  }
188
  .table-detail{
194
  .table-detail {
189 195
    margin-top: 20px;
190 196
  }
191
  .pager{
197
  .pager {
192 198
    margin-right: auto;
193 199
    margin: 21px 21px 0 0;
194 200
    float: right;

+ 21 - 9
security-protection-platform/src/modules/attendance/report/index.vue

@ -148,26 +148,38 @@ export default {
148 148
        orgId: '',
149 149
        current: 1,
150 150
        pageSize: 10
151
      }
151
      },
152
      isFirstCreatedMonth: true,
153
      isFirstCreatedDaily: true
152 154
    }
153 155
  },
154 156
  methods: {
155
    getDailyOrgId(id) {
157
    getDailyOrgId (id) {
156 158
      this.dailyForm.orgId = id
157 159
    },
158
    getDailyDepId(id) {
160
    getDailyDepId (id) {
159 161
      this.dailyForm.depId = id
162
      // 第一次创建获取日报表格数据
163
      if (this.isFirstCreatedDaily) {
164
        this.isFirstCreatedDaily = false
165
        this.getDailyTable()
166
      }
160 167
    },
161
    getDailyStaffId(id) {
168
    getDailyStaffId (id) {
162 169
      this.dailyForm.userid = id
163 170
    },
164
    getMonthOrgId(id) {
171
    getMonthOrgId (id) {
165 172
      this.monthlyForm.orgId = id
166 173
    },
167
    getMonthDepId(id) {
174
    getMonthDepId (id) {
168 175
      this.monthlyForm.depId = id
176
      // 第一次创建获取月报表格数据
177
      if (this.isFirstCreatedMonth) {
178
        this.isFirstCreatedMonth = false
179
        this.getMonthTable()
180
      }
169 181
    },
170
    getMonthStaffId(id) {
182
    getMonthStaffId (id) {
171 183
      this.monthlyForm.userid = id
172 184
    },
173 185
    handleDailyInited () {
@ -261,7 +273,7 @@ export default {
261 273
    //   }
262 274
    // },
263 275
    // 重置日报数据
264
    resetDailyData() {
276
    resetDailyData () {
265 277
      this.$nextTick(() => {
266 278
        this.dailyForm = {
267 279
          workDay: '',
@ -274,7 +286,7 @@ export default {
274 286
      })
275 287
    },
276 288
    // 重置月报数据
277
    resetMonthData() {
289
    resetMonthData () {
278 290
      this.monthlyForm = {
279 291
        month: '',
280 292
        userid: null,

+ 1 - 0
security-protection-platform/src/modules/usermana/index.vue

@ -218,6 +218,7 @@ export default {
218 218
        if (this.departmentTypeId === '' && this.firstCreated) {
219 219
          this.$nextTick(() => {
220 220
            this.departmentTypeId = '10087'
221
            this.getUserList()
221 222
            this.firstCreated = false
222 223
          })
223 224
        }