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
<template>
<el-dialog
:visible.sync="dialogManger.dialogVisible"
:title="modelTitle"
width="1200"
append-to-body
destroy-on-close
:close-on-click-modal="false"
:before-close="handleClose"
>
<el-form
v-show="showSearch"
ref="queryForm"
:model="queryParams"
size="small"
:inline="true"
>
<el-form-item prop="status">
<el-input
v-model="queryParams.deptName"
placeholder="标准章节"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item prop="status">
<el-input
v-model="queryParams.deptName"
placeholder="标准要求"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>查询</el-button
>
<el-button
type="default"
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<el-table
v-loading="loading"
border
tooltip-effect="dark"
@selection-change="handleSelectionChange"
>
>
<el-table-column type="selection" align="center" width="55">
</el-table-column>
<el-table-column label="标准章节" align="left"></el-table-column>
<el-table-column label="标准要求" align="left"></el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:background="false"
:page.sync="queryParams.page"
:limit.sync="queryParams.size"
@pagination="loadData"
>
</pagination>
<div slot="footer">
<el-button @click="handleClose()"> 取消 </el-button>
<el-button type="primary" @click="handleConfirm()"> 选择 </el-button>
</div>
</el-dialog>
</template>
<script>
import page from '@/mixins/page'
export default {
mixins: [page],
props: {
dialogManger: {
type: Object,
default() {
return {
dialogVisible: false,
dialogEditId: null
}
}
}
},
data() {
return {
model: {},
listUrl: '/system/role/list',
total: 0,
showSearch: true,
multipleSelection: [],
tableData: [],
rules: {
status: [
{ required: true, message: '菜单名称不能为空', trigger: 'blur' }
],
orderNum: [
{ required: true, message: '菜单顺序不能为空', trigger: 'blur' }
],
path: [{ required: true, message: '路由地址不能为空', trigger: 'blur' }]
}
}
},
computed: {
modelTitle() {
return '选择标准'
}
},
methods: {
handleSelectionChange(val) {
this.multipleSelection = val
},
add() {
this.model.scene.push({
text: ''
})
},
remove(key) {
this.model.scene.splice(key, 1)
},
handleClose() {
this.dialogManger.dialogVisible = false
},
handleConfirm() {
this.$refs['form'].validate(valid => {
if (valid) {
console.log(valid)
}
})
}
}
}
</script>
<style scoped>
.icon {
font-size: 20px;
}
</style>