|
|
@@ -50,6 +50,10 @@
|
|
50
|
50
|
<el-form-item>
|
|
51
|
51
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ dmCommon("search") }}</el-button>
|
|
52
|
52
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ dmCommon("reset") }}</el-button>
|
|
|
53
|
+ </el-form-item>
|
|
|
54
|
+ </el-form>
|
|
|
55
|
+ <el-row :gutter="10" class="mb8">
|
|
|
56
|
+ <el-col :span="1.5">
|
|
53
|
57
|
<el-button
|
|
54
|
58
|
v-hasPermi="['dataModel:cooperativeDevelopment:add']"
|
|
55
|
59
|
type="primary"
|
|
|
@@ -58,6 +62,8 @@
|
|
58
|
62
|
size="mini"
|
|
59
|
63
|
@click="handleAdd"
|
|
60
|
64
|
>{{ dmCommon("add") }}</el-button>
|
|
|
65
|
+ </el-col>
|
|
|
66
|
+ <el-col :span="1.5">
|
|
61
|
67
|
<el-button
|
|
62
|
68
|
v-hasPermi="['dataModel:cooperativeDevelopment:import']"
|
|
63
|
69
|
type="info"
|
|
|
@@ -66,6 +72,8 @@
|
|
66
|
72
|
size="mini"
|
|
67
|
73
|
@click="handleImportOpen"
|
|
68
|
74
|
>{{ dmT("btnImport") }}</el-button>
|
|
|
75
|
+ </el-col>
|
|
|
76
|
+ <el-col :span="1.5">
|
|
69
|
77
|
<el-button
|
|
70
|
78
|
v-hasPermi="['dataModel:cooperativeDevelopment:export']"
|
|
71
|
79
|
type="warning"
|
|
|
@@ -74,17 +82,29 @@
|
|
74
|
82
|
size="mini"
|
|
75
|
83
|
@click="handleExportOpen"
|
|
76
|
84
|
>{{ dmCommon("export") }}</el-button>
|
|
77
|
|
- </el-form-item>
|
|
78
|
|
- </el-form>
|
|
|
85
|
+ </el-col>
|
|
|
86
|
+ <el-col :span="1.5">
|
|
|
87
|
+ <el-button
|
|
|
88
|
+ v-hasPermi="['dataModel:cooperativeDevelopment:remove']"
|
|
|
89
|
+ type="danger"
|
|
|
90
|
+ plain
|
|
|
91
|
+ icon="el-icon-delete"
|
|
|
92
|
+ size="mini"
|
|
|
93
|
+ :disabled="!ids.length"
|
|
|
94
|
+ @click="handleDeleteBatch"
|
|
|
95
|
+ >{{ dmT("btnBatchDelete") }}</el-button>
|
|
|
96
|
+ </el-col>
|
|
|
97
|
+ </el-row>
|
|
79
|
98
|
</el-card>
|
|
80
|
99
|
|
|
81
|
100
|
<br />
|
|
82
|
101
|
|
|
83
|
102
|
<el-card shadow="never">
|
|
84
|
|
- <el-table v-loading="loading" :data="tableList" border>
|
|
|
103
|
+ <el-table v-loading="loading" :data="tableList" border @selection-change="handleSelectionChange">
|
|
85
|
104
|
<template slot="empty">
|
|
86
|
105
|
<span>{{ dmT("emptyList") }}</span>
|
|
87
|
106
|
</template>
|
|
|
107
|
+ <el-table-column type="selection" width="50" align="center" fixed="left" />
|
|
88
|
108
|
<el-table-column :label="dmT('colStatYear')" prop="statYear" align="center" width="90" />
|
|
89
|
109
|
<el-table-column :label="dmT('colStatMonth')" align="center" width="80">
|
|
90
|
110
|
<template slot-scope="scope">{{ formatStatMonth(scope.row.statMonth) }}</template>
|
|
|
@@ -826,6 +846,7 @@ export default {
|
|
826
|
846
|
dialogEdit: false,
|
|
827
|
847
|
formKey: 0,
|
|
828
|
848
|
total: 0,
|
|
|
849
|
+ ids: [],
|
|
829
|
850
|
tableList: [],
|
|
830
|
851
|
yearOptions: buildDataModelYearOptions(),
|
|
831
|
852
|
monthOptions: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
|
|
@@ -1147,10 +1168,13 @@ export default {
|
|
1147
|
1168
|
this.viewOpen = true
|
|
1148
|
1169
|
})
|
|
1149
|
1170
|
},
|
|
|
1171
|
+ handleSelectionChange(selection) {
|
|
|
1172
|
+ this.ids = selection.map((item) => item.id)
|
|
|
1173
|
+ },
|
|
1150
|
1174
|
handleDelete(row) {
|
|
1151
|
1175
|
this.$modal
|
|
1152
|
1176
|
.confirm(this.dmT("confirmDelete"))
|
|
1153
|
|
- .then(() => delCooperativeDevelopment(row.id))
|
|
|
1177
|
+ .then(() => delCooperativeDevelopment(String(row.id)))
|
|
1154
|
1178
|
.then(() => {
|
|
1155
|
1179
|
this.$modal.msgSuccess(this.dmCommon("msgDelOk"))
|
|
1156
|
1180
|
this.viewOpen = false
|
|
|
@@ -1158,6 +1182,19 @@ export default {
|
|
1158
|
1182
|
})
|
|
1159
|
1183
|
.catch(() => {})
|
|
1160
|
1184
|
},
|
|
|
1185
|
+ handleDeleteBatch() {
|
|
|
1186
|
+ if (!this.ids.length) {
|
|
|
1187
|
+ return
|
|
|
1188
|
+ }
|
|
|
1189
|
+ this.$modal
|
|
|
1190
|
+ .confirm(this.dmT("confirmDeleteBatch"))
|
|
|
1191
|
+ .then(() => delCooperativeDevelopment(this.ids.join(",")))
|
|
|
1192
|
+ .then(() => {
|
|
|
1193
|
+ this.$modal.msgSuccess(this.dmCommon("msgDelOk"))
|
|
|
1194
|
+ this.getList()
|
|
|
1195
|
+ })
|
|
|
1196
|
+ .catch(() => {})
|
|
|
1197
|
+ },
|
|
1161
|
1198
|
submitForm() {
|
|
1162
|
1199
|
this.$refs.form.validate((valid) => {
|
|
1163
|
1200
|
if (!valid) {
|