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
import Api from '~/service/Api';
import Utils from "~/utils"
import commonFunctions from '~/mixin/commonFunctions.js';
import moment from 'moment'
export default {
mixins: [commonFunctions],
methods: {
//重置
handleReset() {
this.model.operatorId = '';
this.model.inidatfro = '';
this.model.inidattil = '';
},
//查询列表
async handleSearch() {
let inidatfro = this.model.inidatfro;
if (!inidatfro) {
this.$notify.error({
title: '错误',
message: '查询开始日期必输!'
});
return;
}
let inidattil = this.model.inidattil;
if (!inidattil) {
this.$notify.error({
title: '错误',
message: '查询结束日期必输!'
});
return;
}
let params = {
ownref: this.model.ownref,
cla: this.model.cla,
status: this.model.status,
usr: this.model.usr,
startDate: inidatfro,
endDate: inidattil,
pageNo: this.pagination.pageIndex,
pageSize: this.pagination.pageSize,
};
//查询接口
const loading = this.loading();
const res = await Api.post('/public/taskdist/config/changelog/loglist', params);
if (res.respCode === SUCCESS) {
this.stmData.data = res.data.records;
this.pagination.total = Number(res.data.total);
}
loading.close();
},
async queryUsrByBch(){
let params ={
branch:JSON.parse(window.sessionStorage.currentOrg).departmentNumber
}
let rtnmsg = await Api.post('/public/taskdist/user/getUsrByBch',params);
if(rtnmsg.respCode === SUCCESS){
this.usrs = rtnmsg.data
}
},
currentChange(num) {
this.currentPage = num;
this.getTableData();
},
beforeClose(done) {
this.dialogTableVisible = false;
this.currentPage = 1;
done();
},
// pageSize改变
handleSizeChange(val) {
this.pagination.pageIndex = 1;
this.pagination.pageSize = val;
this.handleSearch();
},
// 页码改变
handleCurrentChange(val) {
this.pagination.pageIndex = val;
this.handleSearch();
},
//初始化码表
async getdbCode(codeType, uil, codeNam) {
let params = {
codeType: codeType,
uil: uil ? uil : 'EN'
}
let rtnmsg = await Api.post("/manager/dic/listDicInfo", params)
if (rtnmsg.respCode === SUCCESS) {
let curList = rtnmsg.data.map(item => ({
value: item.codeValue,
label: item.codeName
}));
this.model.dbCodes[codeNam] = curList
}
}, //表格码表格式化
getCodelabel(value,codenam) {
const codeobj = this.model.dbCodes[codenam].find(obj => obj.value === value)
return codeobj ? codeobj.label : value;
},
},
};