index.vue.vm 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602
  1. <template>
  2. <div class="app-container">
  3. <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
  4. #foreach($column in $columns)
  5. #if($column.query)
  6. #set($dictType=$column.dictType)
  7. #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
  8. #set($parentheseIndex=$column.columnComment.indexOf("("))
  9. #if($parentheseIndex != -1)
  10. #set($comment=$column.columnComment.substring(0, $parentheseIndex))
  11. #else
  12. #set($comment=$column.columnComment)
  13. #end
  14. #if($column.htmlType == "input")
  15. <el-form-item label="${comment}" prop="${column.javaField}">
  16. <el-input
  17. v-model="queryParams.${column.javaField}"
  18. placeholder="请输入${comment}"
  19. clearable
  20. @keyup.enter.native="handleQuery"
  21. />
  22. </el-form-item>
  23. #elseif(($column.htmlType == "select" || $column.htmlType == "radio") && "" != $dictType)
  24. <el-form-item label="${comment}" prop="${column.javaField}">
  25. <el-select v-model="queryParams.${column.javaField}" placeholder="请选择${comment}" clearable>
  26. <el-option
  27. v-for="dict in dict.type.${dictType}"
  28. :key="dict.value"
  29. :label="dict.label"
  30. :value="dict.value"
  31. />
  32. </el-select>
  33. </el-form-item>
  34. #elseif(($column.htmlType == "select" || $column.htmlType == "radio") && $dictType)
  35. <el-form-item label="${comment}" prop="${column.javaField}">
  36. <el-select v-model="queryParams.${column.javaField}" placeholder="请选择${comment}" clearable>
  37. <el-option label="请选择字典生成" value="" />
  38. </el-select>
  39. </el-form-item>
  40. #elseif($column.htmlType == "datetime" && $column.queryType != "BETWEEN")
  41. <el-form-item label="${comment}" prop="${column.javaField}">
  42. <el-date-picker clearable
  43. v-model="queryParams.${column.javaField}"
  44. type="date"
  45. value-format="yyyy-MM-dd"
  46. placeholder="请选择${comment}">
  47. </el-date-picker>
  48. </el-form-item>
  49. #elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
  50. <el-form-item label="${comment}">
  51. <el-date-picker
  52. v-model="daterange${AttrName}"
  53. style="width: 240px"
  54. value-format="yyyy-MM-dd"
  55. type="daterange"
  56. range-separator="-"
  57. start-placeholder="开始日期"
  58. end-placeholder="结束日期"
  59. ></el-date-picker>
  60. </el-form-item>
  61. #end
  62. #end
  63. #end
  64. <el-form-item>
  65. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  66. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  67. </el-form-item>
  68. </el-form>
  69. <el-row :gutter="10" class="mb8">
  70. <el-col :span="1.5">
  71. <el-button
  72. type="primary"
  73. plain
  74. icon="el-icon-plus"
  75. size="mini"
  76. @click="handleAdd"
  77. v-hasPermi="['${moduleName}:${businessName}:add']"
  78. >新增</el-button>
  79. </el-col>
  80. <el-col :span="1.5">
  81. <el-button
  82. type="success"
  83. plain
  84. icon="el-icon-edit"
  85. size="mini"
  86. :disabled="single"
  87. @click="handleUpdate"
  88. v-hasPermi="['${moduleName}:${businessName}:edit']"
  89. >修改</el-button>
  90. </el-col>
  91. <el-col :span="1.5">
  92. <el-button
  93. type="danger"
  94. plain
  95. icon="el-icon-delete"
  96. size="mini"
  97. :disabled="multiple"
  98. @click="handleDelete"
  99. v-hasPermi="['${moduleName}:${businessName}:remove']"
  100. >删除</el-button>
  101. </el-col>
  102. <el-col :span="1.5">
  103. <el-button
  104. type="warning"
  105. plain
  106. icon="el-icon-download"
  107. size="mini"
  108. @click="handleExport"
  109. v-hasPermi="['${moduleName}:${businessName}:export']"
  110. >导出</el-button>
  111. </el-col>
  112. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  113. </el-row>
  114. <el-table v-loading="loading" :data="${businessName}List" @selection-change="handleSelectionChange">
  115. <el-table-column type="selection" width="55" align="center" />
  116. #foreach($column in $columns)
  117. #set($javaField=$column.javaField)
  118. #set($parentheseIndex=$column.columnComment.indexOf("("))
  119. #if($parentheseIndex != -1)
  120. #set($comment=$column.columnComment.substring(0, $parentheseIndex))
  121. #else
  122. #set($comment=$column.columnComment)
  123. #end
  124. #if($column.pk)
  125. <el-table-column label="${comment}" align="center" prop="${javaField}" />
  126. #elseif($column.list && $column.htmlType == "datetime")
  127. <el-table-column label="${comment}" align="center" prop="${javaField}" width="180">
  128. <template slot-scope="scope">
  129. <span>{{ parseTime(scope.row.${javaField}, '{y}-{m}-{d}') }}</span>
  130. </template>
  131. </el-table-column>
  132. #elseif($column.list && $column.htmlType == "imageUpload")
  133. <el-table-column label="${comment}" align="center" prop="${javaField}" width="100">
  134. <template slot-scope="scope">
  135. <image-preview :src="scope.row.${javaField}" :width="50" :height="50"/>
  136. </template>
  137. </el-table-column>
  138. #elseif($column.list && "" != $column.dictType)
  139. <el-table-column label="${comment}" align="center" prop="${javaField}">
  140. <template slot-scope="scope">
  141. #if($column.htmlType == "checkbox")
  142. <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField} ? scope.row.${javaField}.split(',') : []"/>
  143. #else
  144. <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField}"/>
  145. #end
  146. </template>
  147. </el-table-column>
  148. #elseif($column.list && "" != $javaField)
  149. <el-table-column label="${comment}" align="center" prop="${javaField}" />
  150. #end
  151. #end
  152. <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
  153. <template slot-scope="scope">
  154. <el-button
  155. size="mini"
  156. type="text"
  157. icon="el-icon-edit"
  158. @click="handleUpdate(scope.row)"
  159. v-hasPermi="['${moduleName}:${businessName}:edit']"
  160. >修改</el-button>
  161. <el-button
  162. size="mini"
  163. type="text"
  164. icon="el-icon-delete"
  165. @click="handleDelete(scope.row)"
  166. v-hasPermi="['${moduleName}:${businessName}:remove']"
  167. >删除</el-button>
  168. </template>
  169. </el-table-column>
  170. </el-table>
  171. <pagination
  172. v-show="total>0"
  173. :total="total"
  174. :page.sync="queryParams.pageNum"
  175. :limit.sync="queryParams.pageSize"
  176. @pagination="getList"
  177. />
  178. <!-- 添加或修改${functionName}对话框 -->
  179. <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
  180. <el-form ref="form" :model="form" :rules="rules" label-width="80px">
  181. #foreach($column in $columns)
  182. #set($field=$column.javaField)
  183. #if($column.insert && !$column.pk)
  184. #if(($column.usableColumn) || (!$column.superColumn))
  185. #set($parentheseIndex=$column.columnComment.indexOf("("))
  186. #if($parentheseIndex != -1)
  187. #set($comment=$column.columnComment.substring(0, $parentheseIndex))
  188. #else
  189. #set($comment=$column.columnComment)
  190. #end
  191. #set($dictType=$column.dictType)
  192. #if($column.htmlType == "input")
  193. <el-form-item label="${comment}" prop="${field}">
  194. <el-input v-model="form.${field}" placeholder="请输入${comment}" />
  195. </el-form-item>
  196. #elseif($column.htmlType == "imageUpload")
  197. <el-form-item label="${comment}" prop="${field}">
  198. <image-upload v-model="form.${field}"/>
  199. </el-form-item>
  200. #elseif($column.htmlType == "fileUpload")
  201. <el-form-item label="${comment}" prop="${field}">
  202. <file-upload v-model="form.${field}"/>
  203. </el-form-item>
  204. #elseif($column.htmlType == "editor")
  205. <el-form-item label="${comment}">
  206. <editor v-model="form.${field}" :min-height="192"/>
  207. </el-form-item>
  208. #elseif($column.htmlType == "select" && "" != $dictType)
  209. <el-form-item label="${comment}" prop="${field}">
  210. <el-select v-model="form.${field}" placeholder="请选择${comment}">
  211. <el-option
  212. v-for="dict in dict.type.${dictType}"
  213. :key="dict.value"
  214. :label="dict.label"
  215. #if($column.javaType == "Integer" || $column.javaType == "Long")
  216. :value="parseInt(dict.value)"
  217. #else
  218. :value="dict.value"
  219. #end
  220. ></el-option>
  221. </el-select>
  222. </el-form-item>
  223. #elseif($column.htmlType == "select" && $dictType)
  224. <el-form-item label="${comment}" prop="${field}">
  225. <el-select v-model="form.${field}" placeholder="请选择${comment}">
  226. <el-option label="请选择字典生成" value="" />
  227. </el-select>
  228. </el-form-item>
  229. #elseif($column.htmlType == "checkbox" && "" != $dictType)
  230. <el-form-item label="${comment}" prop="${field}">
  231. <el-checkbox-group v-model="form.${field}">
  232. <el-checkbox
  233. v-for="dict in dict.type.${dictType}"
  234. :key="dict.value"
  235. :label="dict.value">
  236. {{dict.label}}
  237. </el-checkbox>
  238. </el-checkbox-group>
  239. </el-form-item>
  240. #elseif($column.htmlType == "checkbox" && $dictType)
  241. <el-form-item label="${comment}" prop="${field}">
  242. <el-checkbox-group v-model="form.${field}">
  243. <el-checkbox>请选择字典生成</el-checkbox>
  244. </el-checkbox-group>
  245. </el-form-item>
  246. #elseif($column.htmlType == "radio" && "" != $dictType)
  247. <el-form-item label="${comment}" prop="${field}">
  248. <el-radio-group v-model="form.${field}">
  249. <el-radio
  250. v-for="dict in dict.type.${dictType}"
  251. :key="dict.value"
  252. #if($column.javaType == "Integer" || $column.javaType == "Long")
  253. :label="parseInt(dict.value)"
  254. #else
  255. :label="dict.value"
  256. #end
  257. >{{dict.label}}</el-radio>
  258. </el-radio-group>
  259. </el-form-item>
  260. #elseif($column.htmlType == "radio" && $dictType)
  261. <el-form-item label="${comment}" prop="${field}">
  262. <el-radio-group v-model="form.${field}">
  263. <el-radio label="1">请选择字典生成</el-radio>
  264. </el-radio-group>
  265. </el-form-item>
  266. #elseif($column.htmlType == "datetime")
  267. <el-form-item label="${comment}" prop="${field}">
  268. <el-date-picker clearable
  269. v-model="form.${field}"
  270. type="date"
  271. value-format="yyyy-MM-dd"
  272. placeholder="请选择${comment}">
  273. </el-date-picker>
  274. </el-form-item>
  275. #elseif($column.htmlType == "textarea")
  276. <el-form-item label="${comment}" prop="${field}">
  277. <el-input v-model="form.${field}" type="textarea" placeholder="请输入内容" />
  278. </el-form-item>
  279. #end
  280. #end
  281. #end
  282. #end
  283. #if($table.sub)
  284. <el-divider content-position="center">${subTable.functionName}信息</el-divider>
  285. <el-row :gutter="10" class="mb8">
  286. <el-col :span="1.5">
  287. <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd${subClassName}">添加</el-button>
  288. </el-col>
  289. <el-col :span="1.5">
  290. <el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDelete${subClassName}">删除</el-button>
  291. </el-col>
  292. </el-row>
  293. <el-table :data="${subclassName}List" :row-class-name="row${subClassName}Index" @selection-change="handle${subClassName}SelectionChange" ref="${subclassName}">
  294. <el-table-column type="selection" width="50" align="center" />
  295. <el-table-column label="序号" align="center" prop="index" width="50"/>
  296. #foreach($column in $subTable.columns)
  297. #set($javaField=$column.javaField)
  298. #set($parentheseIndex=$column.columnComment.indexOf("("))
  299. #if($parentheseIndex != -1)
  300. #set($comment=$column.columnComment.substring(0, $parentheseIndex))
  301. #else
  302. #set($comment=$column.columnComment)
  303. #end
  304. #if($column.pk || $javaField == ${subTableFkclassName})
  305. #elseif($column.list && $column.htmlType == "input")
  306. <el-table-column label="$comment" prop="${javaField}" width="150">
  307. <template slot-scope="scope">
  308. <el-input v-model="scope.row.$javaField" placeholder="请输入$comment" />
  309. </template>
  310. </el-table-column>
  311. #elseif($column.list && $column.htmlType == "datetime")
  312. <el-table-column label="$comment" prop="${javaField}" width="240">
  313. <template slot-scope="scope">
  314. <el-date-picker clearable v-model="scope.row.$javaField" type="date" value-format="yyyy-MM-dd" placeholder="请选择$comment" />
  315. </template>
  316. </el-table-column>
  317. #elseif($column.list && ($column.htmlType == "select" || $column.htmlType == "radio") && "" != $column.dictType)
  318. <el-table-column label="$comment" prop="${javaField}" width="150">
  319. <template slot-scope="scope">
  320. <el-select v-model="scope.row.$javaField" placeholder="请选择$comment">
  321. <el-option
  322. v-for="dict in dict.type.$column.dictType"
  323. :key="dict.value"
  324. :label="dict.label"
  325. :value="dict.value"
  326. ></el-option>
  327. </el-select>
  328. </template>
  329. </el-table-column>
  330. #elseif($column.list && ($column.htmlType == "select" || $column.htmlType == "radio") && "" == $column.dictType)
  331. <el-table-column label="$comment" prop="${javaField}" width="150">
  332. <template slot-scope="scope">
  333. <el-select v-model="scope.row.$javaField" placeholder="请选择$comment">
  334. <el-option label="请选择字典生成" value="" />
  335. </el-select>
  336. </template>
  337. </el-table-column>
  338. #end
  339. #end
  340. </el-table>
  341. #end
  342. </el-form>
  343. <div slot="footer" class="dialog-footer">
  344. <el-button type="primary" @click="submitForm">确 定</el-button>
  345. <el-button @click="cancel">取 消</el-button>
  346. </div>
  347. </el-dialog>
  348. </div>
  349. </template>
  350. <script>
  351. import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}";
  352. export default {
  353. name: "${BusinessName}",
  354. #if(${dicts} != '')
  355. dicts: [${dicts}],
  356. #end
  357. data() {
  358. return {
  359. // 遮罩层
  360. loading: true,
  361. // 选中数组
  362. ids: [],
  363. #if($table.sub)
  364. // 子表选中数据
  365. checked${subClassName}: [],
  366. #end
  367. // 非单个禁用
  368. single: true,
  369. // 非多个禁用
  370. multiple: true,
  371. // 显示搜索条件
  372. showSearch: true,
  373. // 总条数
  374. total: 0,
  375. // ${functionName}表格数据
  376. ${businessName}List: [],
  377. #if($table.sub)
  378. // ${subTable.functionName}表格数据
  379. ${subclassName}List: [],
  380. #end
  381. // 弹出层标题
  382. title: "",
  383. // 是否显示弹出层
  384. open: false,
  385. #foreach ($column in $columns)
  386. #if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
  387. #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
  388. // $comment时间范围
  389. daterange${AttrName}: [],
  390. #end
  391. #end
  392. // 查询参数
  393. queryParams: {
  394. pageNum: 1,
  395. pageSize: 10,
  396. #foreach ($column in $columns)
  397. #if($column.query)
  398. $column.javaField: null#if($foreach.count != $columns.size()),#end
  399. #end
  400. #end
  401. },
  402. // 表单参数
  403. form: {},
  404. // 表单校验
  405. rules: {
  406. #foreach ($column in $columns)
  407. #if($column.required)
  408. #set($parentheseIndex=$column.columnComment.indexOf("("))
  409. #if($parentheseIndex != -1)
  410. #set($comment=$column.columnComment.substring(0, $parentheseIndex))
  411. #else
  412. #set($comment=$column.columnComment)
  413. #end
  414. $column.javaField: [
  415. { required: true, message: "$comment不能为空", trigger: #if($column.htmlType == "select" || $column.htmlType == "radio")"change"#else"blur"#end }
  416. ]#if($foreach.count != $columns.size()),#end
  417. #end
  418. #end
  419. }
  420. };
  421. },
  422. created() {
  423. this.getList();
  424. },
  425. methods: {
  426. /** 查询${functionName}列表 */
  427. getList() {
  428. this.loading = true;
  429. #foreach ($column in $columns)
  430. #if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
  431. this.queryParams.params = {};
  432. #break
  433. #end
  434. #end
  435. #foreach ($column in $columns)
  436. #if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
  437. #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
  438. if (null != this.daterange${AttrName} && '' != this.daterange${AttrName}) {
  439. this.queryParams.params["begin${AttrName}"] = this.daterange${AttrName}[0];
  440. this.queryParams.params["end${AttrName}"] = this.daterange${AttrName}[1];
  441. }
  442. #end
  443. #end
  444. list${BusinessName}(this.queryParams).then(response => {
  445. this.${businessName}List = response.rows;
  446. this.total = response.total;
  447. this.loading = false;
  448. });
  449. },
  450. // 取消按钮
  451. cancel() {
  452. this.open = false;
  453. this.reset();
  454. },
  455. // 表单重置
  456. reset() {
  457. this.form = {
  458. #foreach ($column in $columns)
  459. #if($column.htmlType == "checkbox")
  460. $column.javaField: []#if($foreach.count != $columns.size()),#end
  461. #else
  462. $column.javaField: null#if($foreach.count != $columns.size()),#end
  463. #end
  464. #end
  465. };
  466. #if($table.sub)
  467. this.${subclassName}List = [];
  468. #end
  469. this.resetForm("form");
  470. },
  471. /** 搜索按钮操作 */
  472. handleQuery() {
  473. this.queryParams.pageNum = 1;
  474. this.getList();
  475. },
  476. /** 重置按钮操作 */
  477. resetQuery() {
  478. #foreach ($column in $columns)
  479. #if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
  480. #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
  481. this.daterange${AttrName} = [];
  482. #end
  483. #end
  484. this.resetForm("queryForm");
  485. this.handleQuery();
  486. },
  487. // 多选框选中数据
  488. handleSelectionChange(selection) {
  489. this.ids = selection.map(item => item.${pkColumn.javaField})
  490. this.single = selection.length!==1
  491. this.multiple = !selection.length
  492. },
  493. /** 新增按钮操作 */
  494. handleAdd() {
  495. this.reset();
  496. this.open = true;
  497. this.title = "添加${functionName}";
  498. },
  499. /** 修改按钮操作 */
  500. handleUpdate(row) {
  501. this.reset();
  502. const ${pkColumn.javaField} = row.${pkColumn.javaField} || this.ids
  503. get${BusinessName}(${pkColumn.javaField}).then(response => {
  504. this.form = response.data;
  505. #foreach ($column in $columns)
  506. #if($column.htmlType == "checkbox")
  507. this.form.$column.javaField = this.form.${column.javaField}.split(",");
  508. #end
  509. #end
  510. #if($table.sub)
  511. this.${subclassName}List = response.data.${subclassName}List;
  512. #end
  513. this.open = true;
  514. this.title = "修改${functionName}";
  515. });
  516. },
  517. /** 提交按钮 */
  518. submitForm() {
  519. this.#[[$]]#refs["form"].validate(valid => {
  520. if (valid) {
  521. #foreach ($column in $columns)
  522. #if($column.htmlType == "checkbox")
  523. this.form.$column.javaField = this.form.${column.javaField}.join(",");
  524. #end
  525. #end
  526. #if($table.sub)
  527. this.form.${subclassName}List = this.${subclassName}List;
  528. #end
  529. if (this.form.${pkColumn.javaField} != null) {
  530. update${BusinessName}(this.form).then(response => {
  531. this.#[[$modal]]#.msgSuccess("修改成功");
  532. this.open = false;
  533. this.getList();
  534. });
  535. } else {
  536. add${BusinessName}(this.form).then(response => {
  537. this.#[[$modal]]#.msgSuccess("新增成功");
  538. this.open = false;
  539. this.getList();
  540. });
  541. }
  542. }
  543. });
  544. },
  545. /** 删除按钮操作 */
  546. handleDelete(row) {
  547. const ${pkColumn.javaField}s = row.${pkColumn.javaField} || this.ids;
  548. this.#[[$modal]]#.confirm('是否确认删除${functionName}编号为"' + ${pkColumn.javaField}s + '"的数据项?').then(function() {
  549. return del${BusinessName}(${pkColumn.javaField}s);
  550. }).then(() => {
  551. this.getList();
  552. this.#[[$modal]]#.msgSuccess("删除成功");
  553. }).catch(() => {});
  554. },
  555. #if($table.sub)
  556. /** ${subTable.functionName}序号 */
  557. row${subClassName}Index({ row, rowIndex }) {
  558. row.index = rowIndex + 1;
  559. },
  560. /** ${subTable.functionName}添加按钮操作 */
  561. handleAdd${subClassName}() {
  562. let obj = {};
  563. #foreach($column in $subTable.columns)
  564. #if($column.pk || $column.javaField == ${subTableFkclassName})
  565. #elseif($column.list && "" != $javaField)
  566. obj.$column.javaField = "";
  567. #end
  568. #end
  569. this.${subclassName}List.push(obj);
  570. },
  571. /** ${subTable.functionName}删除按钮操作 */
  572. handleDelete${subClassName}() {
  573. if (this.checked${subClassName}.length == 0) {
  574. this.#[[$modal]]#.msgError("请先选择要删除的${subTable.functionName}数据");
  575. } else {
  576. const ${subclassName}List = this.${subclassName}List;
  577. const checked${subClassName} = this.checked${subClassName};
  578. this.${subclassName}List = ${subclassName}List.filter(function(item) {
  579. return checked${subClassName}.indexOf(item.index) == -1
  580. });
  581. }
  582. },
  583. /** 复选框选中数据 */
  584. handle${subClassName}SelectionChange(selection) {
  585. this.checked${subClassName} = selection.map(item => item.index)
  586. },
  587. #end
  588. /** 导出按钮操作 */
  589. handleExport() {
  590. this.download('${moduleName}/${businessName}/export', {
  591. ...this.queryParams
  592. }, `${businessName}_#[[${new Date().getTime()}]]#.xlsx`)
  593. }
  594. }
  595. };
  596. </script>