index.vue.vm 22 KB

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