index.js
1.46 KB
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
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-10-10 09:44:10
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-10-17 17:34:25
* @FilePath: \scrm-micro-provider\src\mixins\index.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
const STORE_STATUS = [
{
label: '未开通',
value: 0
},
{
label: '已开通',
value: 1
}
]
const ACTIVITY_STATUS = [
{
label: '未开通',
value: 0
},
{
label: '待开展业务',
value: 1
},
{
label: '已开通',
value: 2
}
]
export default {
data() {
return {
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' }
}
},
computed: {},
props: {
activeItem: String
},
created() {
const idx = this.searchFormData.findIndex(item => item.name == 'status')
this.searchFormData[idx].optionList = [
{
label: '全部',
value: ''
}
].concat(this.activeItem == 0 ? STORE_STATUS : ACTIVITY_STATUS)
},
methods: {
handleSearch() {
this.$refs.table.refreshTable()
},
handleReset() {
this.tableSearchForm = {}
this.$refs.table.refreshTable()
},
taskStatus(status) {
const statusItem = this.activeItem == 0 ? STORE_STATUS : ACTIVITY_STATUS
return statusItem.find(item => item.value == status).label
}
}
}