xsh_1997 hace 11 horas
padre
commit
59f3934753

+ 2 - 0
ruoyi-ui/src/lang/bo/dataModel.js

@@ -520,6 +520,7 @@ export default {
520 520
     sectionOperation: "མཉམ་ལས་ཁང་ཚོང་གཉེར་ཁྱབ་ཁོངས་དང་རྣམ་པ།",
521 521
     sectionOperationStatus: "མཉམ་ལས་ཁང་འཁོར་སྐྱོད་གནས་ཚུལ།",
522 522
     btnImport: "ནང་འདྲེན།",
523
+    btnBatchDelete: "ཚང་མ་སྤྱི་བསུབ།",
523 524
     btnChooseFile: "ཡིག་ཆ་འདེམས།",
524 525
     btnDownloadTemplate: "དཔེ་ཡིག་ཕབ་ལེན།",
525 526
     exportTitle: "Excel ཕྱིར་འདྲེན།",
@@ -547,6 +548,7 @@ export default {
547 548
     dialogAdd: "[གསར་སྣོན]མཉམ་ལས་ཁང་འཕེལ་རྒྱས་གཞི་གྲངས།",
548 549
     dialogEdit: "[རྩོམ་སྒྲིག]མཉམ་ལས་ཁང་འཕེལ་རྒྱས་གཞི་གྲངས།",
549 550
     confirmDelete: "ཐོ་གཞུང་འདི་སུབ་རྒྱུ་གཏན་ཁེལ་ལམ?",
551
+    confirmDeleteBatch: "བདམས་པའི་གཞི་གྲངས་སུབ་རྒྱུ་གཏན་ཁེལ་ལམ?",
550 552
     emptyList: "འབྲི་གཞི་གྲངས་མེད།",
551 553
     unitHousehold: "ཁྱིམ།",
552 554
     unitPerson: "མི།",

+ 2 - 0
ruoyi-ui/src/lang/zh/dataModel.js

@@ -520,6 +520,7 @@ export default {
520 520
     sectionOperation: "合作社经营范围及模式",
521 521
     sectionOperationStatus: "合作社运营情况",
522 522
     btnImport: "导入",
523
+    btnBatchDelete: "批量删除",
523 524
     btnChooseFile: "选取文件",
524 525
     btnDownloadTemplate: "下载模板",
525 526
     exportTitle: "Excel 导出",
@@ -547,6 +548,7 @@ export default {
547 548
     dialogAdd: "[新增]合作社发展数据",
548 549
     dialogEdit: "[编辑]合作社发展数据",
549 550
     confirmDelete: "是否确认删除这条数据?",
551
+    confirmDeleteBatch: "是否确认删除选中的数据?",
550 552
     emptyList: "暂无填报数据",
551 553
     unitHousehold: "户",
552 554
     unitPerson: "人",

+ 41 - 4
ruoyi-ui/src/views/dataModel/cooperativeDevelopment/index.vue

@@ -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) {