scale-table.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753
  1. <style lang="less" scoped>
  2. .scaleTable {
  3. min-height: 100px;
  4. margin-top: -10px;
  5. .table_box {
  6. padding: 0 35px;
  7. }
  8. .btn_box {
  9. width: 100%;
  10. height: 100%;
  11. display: flex;
  12. align-items: center;
  13. justify-content: space-around;
  14. .btn_div {
  15. flex: 1;
  16. display: flex;
  17. align-items: center;
  18. justify-content: center;
  19. }
  20. img {
  21. width: 16px;
  22. height: 16px;
  23. cursor: pointer;
  24. }
  25. }
  26. .table_select_btn {
  27. display: flex;
  28. flex-direction: column;
  29. justify-content: center;
  30. align-items: center;
  31. /deep/ .el-button--text {
  32. padding: 3px 0;
  33. margin: 0;
  34. }
  35. }
  36. /deep/.el-input--mini .el-input__inner {
  37. width: 100%;
  38. }
  39. /deep/.el-table th {
  40. padding: 0;
  41. }
  42. }
  43. /deep/.el-table th,
  44. .el-table tr {
  45. height: 50px;
  46. background: #e3eaf4;
  47. }
  48. /deep/.el-table th {
  49. padding: 0;
  50. }
  51. .custom_table_header {
  52. vertical-align: middle;
  53. &::before {
  54. content: "*";
  55. color: red;
  56. font-size: 12px;
  57. margin-right: 4px;
  58. }
  59. }
  60. /deep/.el-form-item--mini.el-form-item,
  61. .el-form-item--small.el-form-item {
  62. padding: 18px 0;
  63. position: static;
  64. }
  65. /deep/ .el-textarea__inner {
  66. overflow-y: hidden;
  67. }
  68. .showScroll {
  69. /deep/ .el-textarea__inner {
  70. overflow-y: auto;
  71. }
  72. }
  73. .cell_center_box {
  74. /deep/ .el-input__inner {
  75. // width: 40px;
  76. text-align: center;
  77. }
  78. }
  79. /deep/.el-select--mini {
  80. width: 100%;
  81. }
  82. /deep/ .el-input--mini {
  83. font-size: 14px;
  84. }
  85. /deep/ .el-form-item.is-success .el-input__inner,
  86. .el-form-item.is-success .el-textarea__inner {
  87. border-color: #c9c9c9 !important;
  88. }
  89. /deep/ .el-form-item.is-success .el-textarea__inner {
  90. border-color: #c9c9c9 !important;
  91. }
  92. /deep/ .el-form-item.is-success .el-textarea__inner {
  93. border-color: #c9c9c9 !important;
  94. }
  95. </style>
  96. <template>
  97. <div class="scaleTable" :id="`scaleTableRef[${tableIndex}]`">
  98. <div class="table_box">
  99. <el-table
  100. v-if="tableShow"
  101. :data="tableData"
  102. header-row-class-name="header_row_class_name"
  103. border
  104. style="width: 100%; margin: 20px 0"
  105. :span-method="objectSpanMethod"
  106. :ref="`scaleTableRef[${tableIndex}]`"
  107. >
  108. <el-table-column prop="issueId" label="组" width="90px">
  109. <template slot-scope="scope">
  110. <div class="btn_box">
  111. <div class="btn_div">
  112. <img
  113. @click="
  114. $emit('CHANGE_TABLE_ROW', {
  115. type: 4,
  116. tableIndex,
  117. rowIndex: scope.$index,
  118. groupId: scope.row.groupId
  119. })
  120. "
  121. src="@/images/icon-copy.png"
  122. alt=""
  123. title="复制"
  124. />
  125. </div>
  126. <div class="btn_div">
  127. <img
  128. @click="
  129. $emit('CHANGE_TABLE_ROW', {
  130. type: 1,
  131. tableIndex,
  132. rowIndex: scope.$index,
  133. groupId: scope.row.groupId
  134. })
  135. "
  136. src="@/images/add-new-rule-sub.png"
  137. alt=""
  138. title="添加"
  139. />
  140. </div>
  141. <div
  142. class="btn_div"
  143. v-if="imposeRestrictionsRemoveOnGroup(scope.row.groupId)"
  144. >
  145. <img
  146. @click="
  147. $emit('CHANGE_TABLE_ROW', {
  148. type: -1,
  149. tableIndex,
  150. groupId: scope.row.groupId
  151. })
  152. "
  153. src="@/images/add-new-rule-del.png"
  154. alt=""
  155. title="删除"
  156. />
  157. </div>
  158. </div>
  159. </template>
  160. </el-table-column>
  161. <el-table-column prop="groupId" label="问题" width="90px">
  162. <template slot-scope="scope">
  163. <div class="btn_box">
  164. <div class="btn_div">
  165. <img
  166. @click="
  167. $emit('CHANGE_TABLE_ROW', {
  168. type: 5,
  169. tableIndex,
  170. rowIndex: scope.$index,
  171. groupId: scope.row.groupId,
  172. issueId: scope.row.issueId
  173. })
  174. "
  175. src="@/images/icon-copy.png"
  176. alt=""
  177. title="复制"
  178. />
  179. </div>
  180. <div class="btn_div">
  181. <img
  182. @click="
  183. $emit('CHANGE_TABLE_ROW', {
  184. type: 2,
  185. tableIndex,
  186. rowIndex: scope.$index,
  187. groupId: scope.row.groupId,
  188. issueId: scope.row.issueId
  189. })
  190. "
  191. src="@/images/add-new-rule-sub.png"
  192. alt=""
  193. title="添加"
  194. />
  195. </div>
  196. <div
  197. class="btn_div"
  198. v-if="
  199. imposeRestrictionsRemoveOnIssue({
  200. groupId: scope.row.groupId,
  201. issueId: scope.row.issueId
  202. })
  203. "
  204. >
  205. <img
  206. @click="
  207. $emit('CHANGE_TABLE_ROW', {
  208. type: -2,
  209. tableIndex,
  210. issueId: scope.row.issueId
  211. })
  212. "
  213. src="@/images/add-new-rule-del.png"
  214. alt=""
  215. title="删除"
  216. />
  217. </div>
  218. </div>
  219. </template>
  220. </el-table-column>
  221. <el-table-column prop="two_selectType" label="选择" width="70px">
  222. <template slot-scope="scope">
  223. <div class="table_select_btn">
  224. <el-button
  225. @click="handleSelectTypeBtn(scope.$index, 21)"
  226. :style="scope.row.two_selectType != 21 ? { color: '#999' } : ''"
  227. type="text"
  228. >单选</el-button
  229. >
  230. <el-button
  231. :style="scope.row.two_selectType != 22 ? { color: '#999' } : ''"
  232. @click="handleSelectTypeBtn(scope.$index, 22)"
  233. type="text"
  234. >多选</el-button
  235. >
  236. </div>
  237. </template>
  238. </el-table-column>
  239. <el-table-column prop="two_content" label="问题内容">
  240. <template slot="header">
  241. <div class="custom_table_header">问题内容</div>
  242. </template>
  243. <template slot-scope="scope">
  244. <el-form-item
  245. :prop="`klScaleParent[${tableIndex}].klScaleSaveGroup[${scope.$index}].two_content`"
  246. :rules="rules.issueContent"
  247. >
  248. <el-input
  249. :ref="`klScaleParent[${tableIndex}].klScaleSaveGroup[${scope.$index}].two_content`"
  250. :id="`klScaleParent[${tableIndex}].klScaleSaveGroup[${scope.$index}].two_content`"
  251. type="textarea"
  252. rows="1"
  253. :autosize="true"
  254. resize="none"
  255. v-model="scope.row.two_content"
  256. clearable
  257. maxlength="300"
  258. placeholder="请输入"
  259. @input="
  260. changeDataFun($event, tableIndex, scope.$index, 'two_content')
  261. "
  262. ></el-input>
  263. </el-form-item>
  264. </template>
  265. </el-table-column>
  266. <el-table-column
  267. prop="two_factor"
  268. label="系数"
  269. width="60px"
  270. v-if="tableResultType === 1"
  271. >
  272. <template slot="header">
  273. <div class="custom_table_header">系数</div>
  274. </template>
  275. <template slot-scope="scope">
  276. <div class="cell_center_box">
  277. <el-form-item
  278. :prop="`klScaleParent[${tableIndex}].klScaleSaveGroup[${scope.$index}].two_factor`"
  279. :rules="rules.issueFactor"
  280. :show-message="false"
  281. >
  282. <el-input
  283. :id="`klScaleParent[${tableIndex}].klScaleSaveGroup[${scope.$index}].two_factor`"
  284. type="text"
  285. maxlength="7"
  286. v-model="scope.row.two_factor"
  287. placeholder="请输入"
  288. title=""
  289. @input="
  290. changeDataFun(
  291. $event,
  292. tableIndex,
  293. scope.$index,
  294. 'two_factor'
  295. );
  296. scope.row.two_factor = numInputChange(scope.row.two_factor);
  297. "
  298. ></el-input>
  299. </el-form-item>
  300. </div>
  301. </template>
  302. </el-table-column>
  303. <el-table-column
  304. prop="two_constant"
  305. label="常数"
  306. width="60px"
  307. v-if="tableResultType === 1"
  308. >
  309. <template slot="header">
  310. <div class="custom_table_header">常数</div>
  311. </template>
  312. <template slot-scope="scope">
  313. <div class="cell_center_box">
  314. <el-form-item
  315. :prop="`klScaleParent[${tableIndex}].klScaleSaveGroup[${scope.$index}].two_constant`"
  316. :rules="rules.issueConstant"
  317. :show-message="false"
  318. >
  319. <el-input
  320. type="text"
  321. maxlength="7"
  322. :id="`klScaleParent[${tableIndex}].klScaleSaveGroup[${scope.$index}].two_constant`"
  323. v-model="scope.row.two_constant"
  324. placeholder="请输入"
  325. style="text-align: center"
  326. @input="
  327. changeDataFun(
  328. $event,
  329. tableIndex,
  330. scope.$index,
  331. 'two_constant'
  332. );
  333. scope.row.two_constant = numInputChange(
  334. scope.row.two_constant
  335. );
  336. "
  337. ></el-input>
  338. </el-form-item>
  339. </div>
  340. </template>
  341. </el-table-column>
  342. <el-table-column prop="issueId" label="选项个数" width="80px">
  343. <template slot-scope="scope">
  344. <div>
  345. {{ optionLength(scope.row.issueId) }}
  346. </div>
  347. </template>
  348. </el-table-column>
  349. <el-table-column prop="orderNo" label="选项" width="70px">
  350. <template slot-scope="scope">
  351. <div class="btn_box">
  352. <div class="btn_div">
  353. <img
  354. @click="
  355. $emit('CHANGE_TABLE_ROW', {
  356. type: 3,
  357. tableIndex,
  358. rowIndex: scope.$index,
  359. groupId: scope.row.groupId,
  360. issueId: scope.row.issueId
  361. })
  362. "
  363. src="@/images/add-new-rule-sub.png"
  364. alt=""
  365. title="添加"
  366. />
  367. </div>
  368. <div
  369. class="btn_div"
  370. v-if="imposeRestrictionsRemoveOnOption(scope.row.issueId)"
  371. >
  372. <img
  373. @click="
  374. $emit('CHANGE_TABLE_ROW', {
  375. type: -3,
  376. tableIndex,
  377. rowIndex: scope.$index
  378. })
  379. "
  380. src="@/images/add-new-rule-del.png"
  381. alt=""
  382. title="删除"
  383. />
  384. </div>
  385. </div>
  386. </template>
  387. </el-table-column>
  388. <el-table-column
  389. prop="content"
  390. label="选项内容"
  391. :width="tableResultType === 1 ? '200px' : ''"
  392. >
  393. <template slot="header">
  394. <div class="custom_table_header">选项内容</div>
  395. </template>
  396. <template slot-scope="scope">
  397. <el-form-item
  398. :prop="`klScaleParent[${tableIndex}].klScaleSaveGroup[${scope.$index}].content`"
  399. :rules="rules.content"
  400. >
  401. <el-input
  402. :id="`klScaleParent[${tableIndex}].klScaleSaveGroup[${scope.$index}].content`"
  403. type="textarea"
  404. rows="1"
  405. :autosize="true"
  406. resize="none"
  407. v-model="scope.row.content"
  408. clearable
  409. maxlength="300"
  410. placeholder="请输入"
  411. ></el-input>
  412. </el-form-item>
  413. </template>
  414. </el-table-column>
  415. <el-table-column
  416. prop="content"
  417. label="编码"
  418. :width="tableResultType === 2 ? '200px' : '100px'"
  419. v-if="tableResultType === 1"
  420. >
  421. <template slot-scope="scope">
  422. <el-form-item
  423. ><el-select
  424. clearable
  425. remote
  426. filterable
  427. :remote-method="searchRuleCode"
  428. @focus="ruleCodeFocus(scope.$index)"
  429. v-model.trim="scope.row.ruleCode"
  430. >
  431. <el-option
  432. v-for="item in scope.row.ruleCodeList"
  433. :key="item.code"
  434. :value="item.code"
  435. >
  436. <span>{{ item.name }}</span>
  437. <span>({{ item.code }})</span>
  438. </el-option>
  439. </el-select>
  440. </el-form-item>
  441. </template>
  442. </el-table-column>
  443. <el-table-column
  444. prop="content"
  445. label="分值"
  446. width="90px"
  447. v-if="tableResultType === 1"
  448. >
  449. <template slot="header">
  450. <div class="custom_table_header">分值</div>
  451. </template>
  452. <template slot-scope="scope">
  453. <el-form-item
  454. :prop="`klScaleParent[${tableIndex}].klScaleSaveGroup[${scope.$index}].score`"
  455. :rules="rules.score"
  456. >
  457. <el-input
  458. :id="`klScaleParent[${tableIndex}].klScaleSaveGroup[${scope.$index}].score`"
  459. type="text"
  460. maxlength="7"
  461. @input="scope.row.score = numInputChange(scope.row.score)"
  462. v-model="scope.row.score"
  463. clearable
  464. placeholder="请输入"
  465. ></el-input>
  466. </el-form-item>
  467. </template>
  468. </el-table-column>
  469. <el-table-column
  470. prop="result"
  471. label="结果"
  472. width="200px"
  473. v-if="tableResultType === 2"
  474. >
  475. <template slot="header">
  476. <div class="custom_table_header">结果</div>
  477. </template>
  478. <template slot-scope="scope">
  479. <el-form-item
  480. :prop="`klScaleParent[${tableIndex}].klScaleSaveGroup[${scope.$index}].result`"
  481. :rules="rules.result"
  482. >
  483. <el-input
  484. :id="`klScaleParent[${tableIndex}].klScaleSaveGroup[${scope.$index}].result`"
  485. type="textarea"
  486. rows="1"
  487. :autosize="true"
  488. resize="none"
  489. v-model="scope.row.result"
  490. clearable
  491. maxlength="10"
  492. placeholder="请输入"
  493. ></el-input>
  494. </el-form-item>
  495. </template>
  496. </el-table-column>
  497. <el-table-column
  498. prop="pushInfo"
  499. label="建议"
  500. v-if="tableResultType === 2"
  501. >
  502. <template slot-scope="scope">
  503. <el-form-item
  504. :prop="`klScaleParent[${tableIndex}].klScaleSaveGroup[${scope.$index}].pushInfo`"
  505. :rules="rules.pushInfo"
  506. class="showScroll"
  507. >
  508. <el-input
  509. :id="`klScaleParent[${tableIndex}].klScaleSaveGroup[${scope.$index}].pushInfo`"
  510. type="textarea"
  511. rows="2"
  512. resize="none"
  513. v-model="scope.row.pushInfo"
  514. clearable
  515. maxlength="500"
  516. placeholder="请输入"
  517. ></el-input>
  518. </el-form-item>
  519. </template>
  520. </el-table-column>
  521. </el-table>
  522. </div>
  523. </div>
  524. </template>
  525. <script>
  526. import rules from "./rules";
  527. import api from "@api/knowledgeTree.js";
  528. import { numInputChange } from "./util";
  529. export default {
  530. name: "scaleTable",
  531. data() {
  532. return {
  533. tableShow: true,
  534. rules: rules,
  535. ruleCodeIndex: null
  536. };
  537. },
  538. methods: {
  539. numInputChange,
  540. changeDataFun(val, tableIndex, rowIndex, name) {
  541. this.$emit("CHANGE_ISSUE_CONTENT", {
  542. value: val,
  543. tableIndex,
  544. rowIndex,
  545. name
  546. });
  547. },
  548. resizeTable() {
  549. setTimeout(() => {
  550. this.tableData.forEach((item, index) => {
  551. this.$refs[
  552. `klScaleParent[${this.tableIndex}].klScaleSaveGroup[${index}].content`
  553. ] &&
  554. this.$refs[
  555. `klScaleParent[${this.tableIndex}].klScaleSaveGroup[${index}].content`
  556. ].resizeTextarea();
  557. this.$refs[
  558. `klScaleParent[${this.tableIndex}].klScaleSaveGroup[${index}].two_content`
  559. ] &&
  560. this.$refs[
  561. `klScaleParent[${this.tableIndex}].klScaleSaveGroup[${index}].two_content`
  562. ].resizeTextarea();
  563. this.$refs[
  564. `klScaleParent[${this.tableIndex}].klScaleSaveGroup[${index}].result`
  565. ] &&
  566. this.$refs[
  567. `klScaleParent[${this.tableIndex}].klScaleSaveGroup[${index}].result`
  568. ].resizeTextarea();
  569. this.$refs[
  570. `klScaleParent[${this.tableIndex}].klScaleSaveGroup[${index}].pushInfo`
  571. ] &&
  572. this.$refs[
  573. `klScaleParent[${this.tableIndex}].klScaleSaveGroup[${index}].pushInfo`
  574. ].resizeTextarea();
  575. });
  576. }, 100);
  577. },
  578. ruleCodeFocus(index) {
  579. this.ruleCodeIndex = index;
  580. },
  581. searchRuleCode(val) {
  582. api
  583. .searchRuleCode({ name: val === "" ? null : val, type: 1 })
  584. .then((res) => {
  585. if (res.data.code == "0") {
  586. this.$emit(
  587. "CHANGE_FORM_DATA",
  588. this.tableIndex,
  589. this.ruleCodeIndex,
  590. "ruleCodeList",
  591. res.data.data
  592. );
  593. }
  594. });
  595. },
  596. addGroup() {},
  597. // 单选、多选
  598. handleSelectTypeBtn(index, type) {
  599. this.$emit(
  600. "CHANGE_FORM_DATA",
  601. this.tableIndex,
  602. index,
  603. "two_selectType",
  604. type
  605. );
  606. this.changeDataFun(type, this.tableIndex, index, "two_selectType");
  607. },
  608. // 计算表格选项内容的值
  609. optionLength(val) {
  610. if (val || val === 0) {
  611. const accordWithThis = this.tableData.filter(
  612. (item) => item.issueId === val
  613. );
  614. return accordWithThis.length ? accordWithThis.length : 0;
  615. }
  616. },
  617. // 表格合并单元格逻辑
  618. getSpanArr(data) {
  619. this.spanArr = [];
  620. this.spanArr1 = [];
  621. for (var i = 0; i < data.length; i++) {
  622. if (i === 0) {
  623. // 如果是第一条记录(即索引是0的时候),向数组中加入1
  624. /** *
  625. * 例子:
  626. * name:1
  627. * name:1
  628. * name:2
  629. * name:2
  630. * 最终结果:spanArr = [2,0,2,0]
  631. */
  632. this.spanArr.push(1);
  633. this.pos = 0;
  634. this.spanArr1.push(1);
  635. this.pos1 = 0;
  636. } else {
  637. if (data[i].groupId === data[i - 1].groupId) {
  638. // 如果remark相等就累加,并且push 0
  639. this.spanArr[this.pos] += 1;
  640. this.spanArr.push(0);
  641. } else {
  642. // 不相等push 1,并且pos 要换成当前下标
  643. this.spanArr.push(1);
  644. this.pos = i;
  645. }
  646. if (data[i].issueId === data[i - 1].issueId) {
  647. // 如果remark相等就累加,并且push 0
  648. this.spanArr1[this.pos1] += 1;
  649. this.spanArr1.push(0);
  650. } else {
  651. // 不相等push 1,并且pos 要换成当前下标
  652. this.spanArr1.push(1);
  653. this.pos1 = i;
  654. }
  655. }
  656. }
  657. },
  658. objectSpanMethod({ row, column, rowIndex, columnIndex }) {
  659. if (columnIndex == 0) {
  660. const _row = this.spanArr[rowIndex];
  661. const _col = _row > 0 ? 1 : 0;
  662. return {
  663. rowspan: _row,
  664. colspan: _col
  665. };
  666. } else if (
  667. column.label == "问题" ||
  668. column.label == "选择" ||
  669. column.label == "问题内容" ||
  670. column.label == "系数" ||
  671. column.label == "常数" ||
  672. column.label == "选项个数"
  673. ) {
  674. const _row = this.spanArr1[rowIndex];
  675. const _col = _row > 0 ? 1 : 0;
  676. return {
  677. rowspan: _row,
  678. colspan: _col
  679. };
  680. }
  681. },
  682. // 删除组限制:剩余一组时隐藏删除按钮
  683. imposeRestrictionsRemoveOnGroup(groupId) {
  684. // 查找有没有其他组存在 如果为0的话则不存在
  685. const otherGroupLength = this.tableData.filter(
  686. (item) => item.groupId !== groupId
  687. ).length;
  688. return otherGroupLength;
  689. },
  690. // 删除问题限制:该组剩余一个问题时隐藏删除按钮
  691. imposeRestrictionsRemoveOnIssue(val) {
  692. const { groupId, issueId } = val;
  693. // 获取该组所有的issus
  694. const thisGroups = this.tableData.filter(
  695. (item) => item.groupId === groupId
  696. );
  697. // 查找该组有没有其他问题 otherIssueLength为0表示只有当前一个问题存在 所以隐藏删除按钮
  698. const otherIssueLength = thisGroups.filter(
  699. (item) => item.issueId !== issueId
  700. ).length;
  701. if (otherIssueLength) {
  702. return true;
  703. }
  704. return false;
  705. },
  706. // 删除选项限制:该问题剩余一个选项时隐藏删除按钮
  707. imposeRestrictionsRemoveOnOption(issueId) {
  708. // 查找同组的问题,如果只有一个问题则隐藏删除按钮
  709. const thisOptionByissueIdLenth = this.tableData.filter(
  710. (item) => item.issueId === issueId
  711. ).length;
  712. if (thisOptionByissueIdLenth > 1) {
  713. return true;
  714. }
  715. return false;
  716. }
  717. },
  718. created() {
  719. this.getSpanArr(this.tableData);
  720. },
  721. watch: {
  722. tableData: {
  723. handler() {
  724. this.getSpanArr(this.tableData);
  725. },
  726. deep: true
  727. },
  728. tableResultType() {
  729. this.tableShow = false;
  730. setTimeout(() => {
  731. this.tableShow = true;
  732. });
  733. }
  734. },
  735. props: {
  736. tableData: {
  737. default: []
  738. },
  739. tableIndex: {
  740. required: true
  741. },
  742. tableResultType: {
  743. required: true,
  744. default: 2
  745. }
  746. }
  747. };
  748. </script>