index.vue
6.03 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
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
<!--
* @Description :业务接入
* @Autor : miaofang
* @LastEditTime : 2023-05-18 13:18:53
-->
<template>
<div class="from-clues">
<div class="from-clues-header">
<el-form ref="ruleForm" :model="form" label-width="100px">
<!-- 判断进入监管还是上报系统 -->
<el-form-item v-if="BASE_API.THEME=='jg'">
<Breadcrumb />
</el-form-item>
<el-row class="mb-5">
<el-col :span="4">
<el-form-item label="业务号:" prop="ywh">
<el-input v-model="form.ywh" class="width100" clearable placeholder="业务号"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="业务名称" prop="ywmc">
<el-input v-model.trim="form.rolesName" class="width100" clearable placeholder="业务名称"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="开始日期" prop="startTime">
<el-date-picker type="date" class="width100" placeholder="开始日期" :picker-options="pickerOptionsStart"
clearable v-model="form.startTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="结束日期" prop="endTime">
<el-date-picker type="date" class="width100" placeholder="结束日期" :picker-options="pickerOptionsEnd" clearable
v-model="form.endTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</el-col>
<!-- 操作按钮 -->
<el-col :span="4" class="btnColRight">
<btn nativeType="cz" @click="resetForm">重置</btn>
<btn nativeType="cx" @click="handleSearch">查询</btn>
</el-col>
</el-row>
</el-form>
</div>
<div class="from-clues-content">
<lb-table :pagination="false" @size-change="handleSizeChange" :calcHeight="BASE_API.calcHeight"
@p-current-change="handleCurrentChange" :column="tableData.columns" :data="listdata"
row-key="dictid">
</lb-table>
</div>
</div>
</template>
<script>
import {
getUuid,
judgeSort,
realMove,
findParents,
removeTreeListItem,
} from "@/utils/operation";
import { getRolesById, getAuthorityListAction } from "@/api/authorityManage";
import { getUserRoles } from "@/api/personnelManage";
import data from "./data";
import { getMenuInfo } from "@/api/user";
import { api, getAction, deleteAction } from "@/api/manageApi";
import tableMixin from "@/mixins/tableMixin.js";
import EditDialog from "./edit-dialog.vue";
import Roleslistdiglog from "./roleslistdiglog.vue";
import { mapGetters } from "vuex";
import { updateOrder } from "@/api/orders"
export default {
name: "menus",
mixins: [tableMixin],
components: {
EditDialog,
Roleslistdiglog,
},
data () {
return {
// 开始结束日期限制
pickerOptionsStart: {
disabledDate: (time) => {
if (this.form.endTime) {
return time.getTime() >= new Date(this.form.endTime).getTime()
}
}
},
// 结束日期限制
pickerOptionsEnd: {
disabledDate: (time) => {
if (this.form.startTime) {
return time.getTime() < new Date(this.form.startTime).getTime()
}
}
},
listdata: [],
setlistdata: [],
// 表单
form: {
ywh: '',
ywmc: '',
startTime: '',
endTime: '',
currentPage: 1
},
// 表格数据
tableData: {
columns: [
{
label: "序号",
type: "index",
width: "50",
index: this.indexMethod,
},
]
.concat(data.columns())
.concat({
prop: "state",
label: "状态",
width: '120',
render: (h, scope) => {
return (
<div>
<span class='adopt' v-show={scope.row.state == 3}>上报失败</span>
<span class='adopt' v-show={scope.row.state == 2}>上报成功</span>
<span class='warehousing' v-show={scope.row.state == 1}>接入上报异常</span>
</div>
)
}
})
.concat([]),
},
data: [],
}
},
created () {
this.getTableData();
},
mounted () { },
methods: {
//查询
/**
* @description: 查询
* @author: renchao
*/
searchQuery () {
if (this.form.rolesName) {
this.listdata = this.childrenFn(this.setlistdata, this.form.rolesName);
} else {
this.getTableData()
}
},
/**
* @description: childrenFn
* @param {*} arr
* @param {*} key
* @author: renchao
*/
childrenFn (arr, key) {
let searchTree = [];
arr.forEach((item, index) => {
if (item.name.indexOf(key) != -1) {
searchTree.push(item);
}
});
if (searchTree != undefined && searchTree.length != 0) {
return judgeSort(searchTree);
}
},
// 获取角色列表
/**
* @description: 获取角色列表
* @author: renchao
*/
getTableData () {
getRolesById([1, 2])
.then((res) => {
this.listdata = res.content;
this.listdata = judgeSort(this.listdata);
this.setlistdata = res.content;
})
.catch((e) => console.error(e));
},
},
};
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
// @import "~@/styles/public.scss";
/deep/.el-button.is-disabled.el-button--text {
width: 64px;
height: 28px;
background: rgba(255, 255, 255, 0.1);
border-radius: 16px;
}
</style>