11b3c9718e1992ace54d97d412bcaa9850a2a9ea.svn-base 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547
  1. <#include "/common/utils.ftl">
  2. <template>
  3. <a-spin :spinning="confirmLoading">
  4. <j-form-container :disabled="formDisabled">
  5. <!-- 主表单区域 -->
  6. <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
  7. <a-row>
  8. <#assign form_popup = false>
  9. <#assign form_cat_tree = false>
  10. <#assign form_cat_back = "">
  11. <#assign bpm_flag=false>
  12. <#assign form_span = 24>
  13. <#if tableVo.fieldRowNum==2>
  14. <#assign form_span = 12>
  15. <#elseif tableVo.fieldRowNum==3>
  16. <#assign form_span = 8>
  17. <#elseif tableVo.fieldRowNum==4>
  18. <#assign form_span = 6>
  19. </#if>
  20. <#list columns as po>
  21. <#if po.fieldDbName=='bpm_status'>
  22. <#assign bpm_flag=true>
  23. </#if>
  24. <#if po.isShow =='Y' && po.fieldName != 'id'>
  25. <#assign form_field_dictCode="">
  26. <#if po.dictTable?default("")?trim?length gt 1 && po.dictText?default("")?trim?length gt 1 && po.dictField?default("")?trim?length gt 1>
  27. <#assign form_field_dictCode="${po.dictTable},${po.dictText},${po.dictField}">
  28. <#elseif po.dictField?default("")?trim?length gt 1>
  29. <#assign form_field_dictCode="${po.dictField}">
  30. </#if>
  31. <#if po.classType =='textarea'>
  32. <a-col :span="24">
  33. <a-form-model-item label="${po.filedComment}" :labelCol="labelCol2" :wrapperCol="wrapperCol2" prop="${autoStringSuffixForModel(po)}">
  34. <#else>
  35. <a-col :span="${form_span}" >
  36. <a-form-model-item label="${po.filedComment}" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="${autoStringSuffixForModel(po)}">
  37. </#if>
  38. <#if po.classType =='date'>
  39. <j-date placeholder="请选择${po.filedComment}" v-model="model.${po.fieldName}" style="width: 100%" <#if po.readonly=='Y'>disabled</#if>/>
  40. <#elseif po.classType =='datetime'>
  41. <j-date placeholder="请选择${po.filedComment}" v-model="model.${po.fieldName}" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" <#if po.readonly=='Y'>disabled</#if>/>
  42. <#elseif po.classType =='time'>
  43. <j-time placeholder="请选择${po.filedComment}" v-model="model.${po.fieldName}" style="width: 100%" <#if po.readonly=='Y'>disabled</#if>/>
  44. <#elseif po.classType =='popup'>
  45. <#assign form_popup=true>
  46. <j-popup
  47. v-model="model.${po.fieldName}"
  48. field="${po.fieldName}"
  49. org-fields="${po.dictField}"
  50. dest-fields="${Format.underlineToHump(po.dictText)}"
  51. code="${po.dictTable}"
  52. :multi="${po.extendParams.popupMulti?c}"
  53. @input="popupCallback"
  54. <#if po.readonly=='Y'>disabled</#if>/>
  55. <#elseif po.classType =='sel_depart'>
  56. <j-select-depart v-model="model.${po.fieldName}" multi <#if po.readonly=='Y'>disabled</#if>/>
  57. <#elseif po.classType =='switch'>
  58. <j-switch v-model="model.${po.fieldName}" <#if po.dictField != 'is_open'>:options="${po.dictField}"</#if> <#if po.readonly=='Y'>disabled</#if>></j-switch>
  59. <#elseif po.classType =='pca'>
  60. <j-area-linkage type="cascader" v-model="model.${po.fieldName}" placeholder="请输入省市区" <#if po.readonly=='Y'>disabled</#if>/>
  61. <#elseif po.classType =='markdown'>
  62. <j-markdown-editor v-model="model.${autoStringSuffixForModel(po)}" id="${po.fieldName}"></j-markdown-editor>
  63. <#elseif po.classType =='password'>
  64. <a-input-password v-model="model.${po.fieldName}" placeholder="请输入${po.filedComment}" <#if po.readonly=='Y'>disabled</#if>/>
  65. <#elseif po.classType =='sel_user'>
  66. <j-select-user-by-dep v-model="model.${po.fieldName}" <#if po.readonly=='Y'>disabled</#if>/>
  67. <#elseif po.classType =='textarea'>
  68. <a-textarea v-model="model.${autoStringSuffixForModel(po)}" rows="4" placeholder="请输入${po.filedComment}" <#if po.readonly=='Y'>disabled</#if>/>
  69. <#elseif po.classType=='list' || po.classType=='radio'>
  70. <j-dict-select-tag type="${po.classType}" v-model="model.${po.fieldName}" dictCode="${form_field_dictCode}" placeholder="请选择${po.filedComment}" <#if po.readonly=='Y'>disabled</#if>/>
  71. <#elseif po.classType=='list_multi' || po.classType=='checkbox'>
  72. <j-multi-select-tag type="${po.classType}" v-model="model.${po.fieldName}" dictCode="${form_field_dictCode}" placeholder="请选择${po.filedComment}" <#if po.readonly=='Y'>disabled</#if>/>
  73. <#elseif po.classType=='sel_search'>
  74. <j-search-select-tag v-model="model.${po.fieldName}" dict="${form_field_dictCode}" <#if po.readonly=='Y'>disabled</#if> />
  75. <#elseif po.classType=='cat_tree'>
  76. <#assign form_cat_tree = true>
  77. <j-category-select v-model="model.${po.fieldName}" pcode="${po.dictField?default("")}" placeholder="请选择${po.filedComment}" <#if po.dictText?default("")?trim?length gt 1>back="${dashedToCamel(po.dictText)}" @change="handleCategoryChange"</#if> <#if po.readonly=='Y'>disabled</#if>/>
  78. <#if po.dictText?default("")?trim?length gt 1>
  79. <#assign form_cat_back = "${po.dictText}">
  80. </#if>
  81. <#elseif po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal'>
  82. <a-input-number v-model="model.${po.fieldName}" placeholder="请输入${po.filedComment}" style="width: 100%" <#if po.readonly=='Y'>disabled</#if>/>
  83. <#elseif po.classType=='file'>
  84. <j-upload v-model="model.${po.fieldName}" <#if po.readonly=='Y'>disabled</#if> <#if po.uploadnum??>:number=${po.uploadnum}</#if>></j-upload>
  85. <#elseif po.classType=='image'>
  86. <j-image-upload isMultiple <#if po.uploadnum??>:number=${po.uploadnum}</#if> v-model="model.${po.fieldName}" <#if po.readonly=='Y'>disabled</#if>></j-image-upload>
  87. <#elseif po.classType=='umeditor'>
  88. <j-editor v-model="model.${autoStringSuffixForModel(po)}" <#if po.readonly=='Y'>disabled</#if>/>
  89. <#elseif po.fieldDbType=='Blob'>
  90. <a-input v-model="model.${autoStringSuffixForModel(po)}" placeholder="请输入${po.filedComment}" <#if po.readonly=='Y'>disabled</#if>></a-input>
  91. <#elseif po.classType == 'sel_tree'>
  92. <j-tree-select
  93. ref="treeSelect"
  94. placeholder="请选择${po.filedComment}"
  95. v-model="model.${po.fieldName}"
  96. <#if po.dictText??>
  97. <#if po.dictText?split(',')[2]?? && po.dictText?split(',')[0]??>
  98. dict="${po.dictTable},${po.dictText?split(',')[2]},${po.dictText?split(',')[0]}"
  99. <#elseif po.dictText?split(',')[1]??>
  100. pidField="${po.dictText?split(',')[1]}"
  101. <#elseif po.dictText?split(',')[3]??>
  102. hasChildField="${po.dictText?split(',')[3]}"
  103. </#if>
  104. </#if>
  105. pidValue="${po.dictField}"
  106. <#if po.readonly=='Y'>disabled</#if>>
  107. </j-tree-select>
  108. <#else>
  109. <a-input v-model="model.${po.fieldName}" placeholder="请输入${po.filedComment}" <#if po.readonly=='Y'>disabled</#if>></a-input>
  110. </#if>
  111. </a-form-model-item>
  112. </a-col>
  113. </#if>
  114. </#list>
  115. </a-row>
  116. </a-form-model>
  117. </j-form-container>
  118. <!-- 子表单区域 -->
  119. <a-tabs v-model="activeKey" @change="handleChangeTabs">
  120. <#list subTables as sub><#rt/>
  121. <#if sub.foreignRelationType =='1'>
  122. <a-tab-pane tab="${sub.ftlDescription}" :key="refKeys[${sub_index}]" :forceRender="true">
  123. <${Format.humpToShortbar(sub.entityName)}-form ref="${sub.entityName?uncap_first}Form" @validateError="validateError" :disabled="formDisabled"></${Format.humpToShortbar(sub.entityName)}-form>
  124. </a-tab-pane>
  125. <#else>
  126. <a-tab-pane tab="${sub.ftlDescription}" :key="refKeys[${sub_index}]" :forceRender="true">
  127. <j-editable-table
  128. :ref="refKeys[${sub_index}]"
  129. :loading="${sub.entityName?uncap_first}Table.loading"
  130. :columns="${sub.entityName?uncap_first}Table.columns"
  131. :dataSource="${sub.entityName?uncap_first}Table.dataSource"
  132. :maxHeight="300"
  133. :disabled="formDisabled"
  134. :rowNumber="true"
  135. :rowSelection="true"
  136. :actionButton="true"/>
  137. </a-tab-pane>
  138. </#if>
  139. </#list>
  140. </a-tabs>
  141. <#if bpm_flag>
  142. <a-row v-if="showFlowSubmitButton" style="text-align: center;width: 100%;margin-top: 16px;"><a-button @click="handleOk">提 交</a-button></a-row>
  143. </#if>
  144. </a-spin>
  145. </template>
  146. <script>
  147. import { getAction } from '@/api/manage'
  148. import { FormTypes,getRefPromise,VALIDATE_NO_PASSED } from '@/utils/JEditableTableUtil'
  149. import { JEditableTableModelMixin } from '@/mixins/JEditableTableModelMixin'
  150. import { validateDuplicateValue } from '@/utils/util'
  151. <#list subTables as sub>
  152. <#if sub.foreignRelationType =='1'>
  153. import ${sub.entityName}Form from './${sub.entityName}Form.vue'
  154. </#if>
  155. </#list>
  156. export default {
  157. name: '${entityName}Form',
  158. mixins: [JEditableTableModelMixin],
  159. components: {
  160. <#list subTables as sub>
  161. <#if sub.foreignRelationType =='1'>
  162. ${sub.entityName}Form,
  163. </#if>
  164. </#list>
  165. },
  166. data() {
  167. return {
  168. labelCol: {
  169. xs: { span: 24 },
  170. sm: { span: 6 },
  171. },
  172. wrapperCol: {
  173. xs: { span: 24 },
  174. sm: { span: 16 },
  175. },
  176. labelCol2: {
  177. xs: { span: 24 },
  178. sm: { span: 3 },
  179. },
  180. wrapperCol2: {
  181. xs: { span: 24 },
  182. sm: { span: 20 },
  183. },
  184. model:{
  185. <#include "/common/init/initValue.ftl">
  186. },
  187. // 新增时子表默认添加几行空数据
  188. addDefaultRowNum: 1,
  189. <#include "/common/validatorRulesTemplate/main.ftl">
  190. refKeys: [<#list subTables as sub>'${sub.entityName?uncap_first}', </#list>],
  191. <#assign hasOne2Many = false>
  192. tableKeys:[<#list subTables as sub><#if sub.foreignRelationType =='0'>'${sub.entityName?uncap_first}', <#assign hasOne2Many = true></#if></#list>],
  193. activeKey: '${subTables[0].entityName?uncap_first}',
  194. <#list subTables as sub><#rt/>
  195. // ${sub.ftlDescription}
  196. ${sub.entityName?uncap_first}Table: {
  197. loading: false,
  198. dataSource: [],
  199. columns: [
  200. <#if sub.foreignRelationType =='0'>
  201. <#assign popupBackFields = "">
  202. <#-- 循环子表的列 开始 -->
  203. <#list sub.colums as col><#rt/>
  204. <#if col.isShow =='Y'>
  205. <#if col.filedComment !='外键' >
  206. {
  207. title: '${col.filedComment}',
  208. key: '${autoStringSuffixForModel(col)}',
  209. <#if col.classType =='date'>
  210. type: FormTypes.date,
  211. <#if col.readonly=='Y'>
  212. disabled:true,
  213. </#if>
  214. <#elseif col.classType =='datetime'>
  215. type: FormTypes.datetime,
  216. <#if col.readonly=='Y'>
  217. disabled:true,
  218. </#if>
  219. <#elseif "int,decimal,double,"?contains(col.classType)>
  220. type: FormTypes.inputNumber,
  221. <#if col.readonly=='Y'>
  222. disabled:true,
  223. </#if>
  224. <#elseif col.classType =='list' || col.classType =='radio'>
  225. type: FormTypes.select,
  226. <#if col.dictTable?default("")?trim?length gt 1>
  227. dictCode:"${col.dictTable},${col.dictText},${col.dictField}",
  228. <#else>
  229. dictCode:"${col.dictField}",
  230. </#if>
  231. <#if col.readonly=='Y'>
  232. disabled:true,
  233. </#if>
  234. <#elseif col.classType =='list_multi' || col.classType =='checkbox'>
  235. type: FormTypes.list_multi,
  236. <#if col.dictTable?default("")?trim?length gt 1>
  237. dictCode:"${col.dictTable},${col.dictText},${col.dictField}",
  238. <#else>
  239. dictCode:"${col.dictField}",
  240. </#if>
  241. <#if col.readonly=='Y'>
  242. disabled:true,
  243. </#if>
  244. <#elseif col.classType =='switch'>
  245. type: FormTypes.checkbox,
  246. <#if col.dictField == 'is_open'>
  247. customValue: ['Y', 'N'],
  248. <#else>
  249. customValue: ${col.dictField},
  250. </#if>
  251. <#if col.readonly=='Y'>
  252. disabled:true,
  253. </#if>
  254. <#elseif col.classType =='sel_search'>
  255. type: FormTypes.sel_search,
  256. <#if col.dictTable?default("")?trim?length gt 1>
  257. dictCode:"${col.dictTable},${col.dictText},${col.dictField}",
  258. <#else>
  259. dictCode:"${col.dictField}",
  260. </#if>
  261. <#if col.readonly=='Y'>
  262. disabled:true,
  263. </#if>
  264. <#elseif col.classType =='image'>
  265. type: FormTypes.image,
  266. token:true,
  267. responseName:"message",
  268. <#if col.readonly=='Y'>
  269. disabled:true,
  270. </#if>
  271. <#if col.uploadnum??>
  272. number: ${col.uploadnum},
  273. </#if>
  274. <#elseif col.classType =='file'>
  275. type: FormTypes.file,
  276. token:true,
  277. responseName:"message",
  278. <#if col.readonly=='Y'>
  279. disabled:true,
  280. </#if>
  281. <#if col.uploadnum??>
  282. number: ${col.uploadnum},
  283. </#if>
  284. <#elseif col.classType =='popup'>
  285. <#if popupBackFields?length gt 0>
  286. <#assign popupBackFields = "${popupBackFields}"+","+"${col.dictText}">
  287. <#else>
  288. <#assign popupBackFields = "${col.dictText}">
  289. </#if>
  290. type: FormTypes.popup,
  291. popupCode:"${col.dictTable}",
  292. destFields:"${Format.underlineToHump(col.dictText)}",
  293. orgFields:"${col.dictField}",
  294. <#if col.readonly=='Y'>
  295. disabled:true,
  296. </#if>
  297. <#elseif col.fieldDbType=='int' || col.fieldDbType=='double' || col.fieldDbType=='BigDecimal'>
  298. type: FormTypes.inputNumber,
  299. <#if col.readonly=='Y'>
  300. disabled:true,
  301. </#if>
  302. <#else>
  303. type: FormTypes.input,
  304. <#if col.readonly=='Y'>
  305. disabled:true,
  306. </#if>
  307. </#if>
  308. <#if col.classType =='list_multi' || col.classType =='checkbox'>
  309. width:"250px",
  310. <#else>
  311. width:"200px",
  312. </#if>
  313. <#if col.classType =='file'>
  314. placeholder: '请选择文件',
  315. <#else>
  316. placeholder: '请输入${'$'}{title}',
  317. </#if>
  318. <#if col.defaultVal??>
  319. <#if col.fieldDbType=="BigDecimal" || col.fieldDbType=="double" || col.fieldDbType=="int">
  320. defaultValue:${col.defaultVal},
  321. <#else>
  322. defaultValue:"${col.defaultVal}",
  323. </#if>
  324. <#else>
  325. defaultValue:'',
  326. </#if>
  327. <#-- 子表的校验 -->
  328. <#assign subFieldValidType = col.fieldValidType!''>
  329. <#-- 非空校验 -->
  330. <#if col.nullable == 'N' || subFieldValidType == '*'>
  331. validateRules: [{ required: true, message: '${'$'}{title}不能为空' }],
  332. <#-- 其他情况下,只要有值就被认为是正则校验 -->
  333. <#elseif subFieldValidType?length gt 0>
  334. <#assign subMessage = '格式不正确'>
  335. <#if subFieldValidType == 'only' >
  336. <#assign subMessage = '不能重复'>
  337. </#if>
  338. validateRules: [{ pattern: "${subFieldValidType}", message: "${'$'}{title}${subMessage}" }],
  339. </#if>
  340. },
  341. </#if>
  342. </#if>
  343. </#list>
  344. <#-- 循环子表的列 结束 -->
  345. <#-- 处理popup的隐藏列 -->
  346. <#if popupBackFields?length gt 0>
  347. <#list popupBackFields?split(",") as item>
  348. <#if item?length gt 0>
  349. <#assign tempItemFlag = true>
  350. <#list sub.colums as col>
  351. <#if col.isShow =='Y' && col.fieldName == item>
  352. <#assign tempItemFlag = false>
  353. </#if>
  354. </#list>
  355. <#if tempItemFlag>
  356. {
  357. title: '${item}',
  358. key: '${item}',
  359. type:"hidden"
  360. },
  361. </#if>
  362. </#if>
  363. </#list>
  364. </#if>
  365. </#if>
  366. ]
  367. },
  368. </#list>
  369. url: {
  370. add: "/${entityPackage}/${entityName?uncap_first}/add",
  371. edit: "/${entityPackage}/${entityName?uncap_first}/edit",
  372. queryById: "/${entityPackage}/${entityName?uncap_first}/queryById",
  373. <#list subTables as sub><#rt/>
  374. ${sub.entityName?uncap_first}: {
  375. list: '/${entityPackage}/${entityName?uncap_first}/query${sub.entityName}ByMainId'
  376. },
  377. </#list>
  378. }
  379. }
  380. },
  381. props: {
  382. <#if bpm_flag>
  383. //流程表单data
  384. formData: {
  385. type: Object,
  386. default: ()=>{},
  387. required: false
  388. },
  389. //表单模式:false流程表单 true普通表单
  390. formBpm: {
  391. type: Boolean,
  392. default: false,
  393. required: false
  394. },
  395. </#if>
  396. //表单禁用
  397. disabled: {
  398. type: Boolean,
  399. default: false,
  400. required: false
  401. }
  402. },
  403. computed: {
  404. formDisabled(){
  405. <#if bpm_flag>
  406. if(this.formBpm===true){
  407. if(this.formData.disabled===false){
  408. return false
  409. }
  410. return true
  411. }
  412. </#if>
  413. return this.disabled
  414. },
  415. <#if bpm_flag>
  416. showFlowSubmitButton(){
  417. if(this.formBpm===true){
  418. if(this.formData.disabled===false){
  419. return true
  420. }
  421. }
  422. return false
  423. }
  424. </#if>
  425. },
  426. created () {
  427. <#if bpm_flag>
  428. //如果是流程中表单,则需要加载流程表单data
  429. this.showFlowData();
  430. </#if>
  431. },
  432. methods: {
  433. addBefore(){
  434. <#list subTables as sub><#rt/>
  435. <#if sub.foreignRelationType =='1'>
  436. this.$refs.${sub.entityName?uncap_first}Form.clearFormData()
  437. <#else>
  438. this.${sub.entityName?uncap_first}Table.dataSource=[]
  439. </#if>
  440. </#list>
  441. },
  442. getAllTable() {
  443. <#if hasOne2Many==true>
  444. let values = this.tableKeys.map(key => getRefPromise(this, key))
  445. return Promise.all(values)
  446. <#else>
  447. return new Promise(resolve => {
  448. resolve([]);
  449. })
  450. </#if>
  451. },
  452. /** 调用完edit()方法之后会自动调用此方法 */
  453. editAfter() {
  454. this.$nextTick(() => {
  455. <#list subTables as sub><#rt/>
  456. <#if sub.foreignRelationType =='1'>
  457. this.$refs.${sub.entityName?uncap_first}Form.initFormData(this.url.${sub.entityName?uncap_first}.list,this.model.id)
  458. </#if>
  459. </#list>
  460. })
  461. // 加载子表数据
  462. if (this.model.id) {
  463. let params = { id: this.model.id }
  464. <#list subTables as sub><#rt/>
  465. <#if sub.foreignRelationType =='0'>
  466. this.requestSubTableData(this.url.${sub.entityName?uncap_first}.list, params, this.${sub.entityName?uncap_first}Table)
  467. </#if>
  468. </#list>
  469. }
  470. },
  471. //校验所有一对一子表表单
  472. validateSubForm(allValues){
  473. return new Promise((resolve,reject)=>{
  474. Promise.all([
  475. <#list subTables as sub><#rt/>
  476. <#if sub.foreignRelationType =='1'>
  477. this.$refs.${sub.entityName?uncap_first}Form.validate(${sub_index}),
  478. </#if>
  479. </#list>
  480. ]).then(() => {
  481. resolve(allValues)
  482. }).catch(e => {
  483. if (e.error === VALIDATE_NO_PASSED) {
  484. // 如果有未通过表单验证的子表,就自动跳转到它所在的tab
  485. this.activeKey = e.index == null ? this.activeKey : this.refKeys[e.index]
  486. } else {
  487. console.error(e)
  488. }
  489. })
  490. })
  491. },
  492. /** 整理成formData */
  493. classifyIntoFormData(allValues) {
  494. let main = Object.assign(this.model, allValues.formValue)
  495. return {
  496. ...main, // 展开
  497. <#assign subManyIndex = 0>
  498. <#list subTables as sub><#rt/>
  499. <#if sub.foreignRelationType =='0'>
  500. ${sub.entityName?uncap_first}List: allValues.tablesValue[${subManyIndex}].values,
  501. <#assign subManyIndex = subManyIndex+1>
  502. <#else>
  503. ${sub.entityName?uncap_first}List: this.$refs.${sub.entityName?uncap_first}Form.getFormData(),
  504. </#if>
  505. </#list>
  506. }
  507. },
  508. <#if bpm_flag>
  509. //渲染流程表单数据
  510. showFlowData(){
  511. if(this.formBpm === true){
  512. let params = {id:this.formData.dataId};
  513. getAction(this.url.queryById,params).then((res)=>{
  514. if(res.success){
  515. this.edit (res.result);
  516. }
  517. })
  518. }
  519. },
  520. </#if>
  521. validateError(msg){
  522. this.$message.error(msg)
  523. },
  524. <#if form_popup>
  525. popupCallback(value,row){
  526. this.model = Object.assign(this.model, row);
  527. },
  528. </#if>
  529. <#if form_cat_tree>
  530. handleCategoryChange(value,backObj){
  531. this.model = Object.assign(this.model, backObj);
  532. }
  533. </#if>
  534. }
  535. }
  536. </script>
  537. <style scoped>
  538. </style>