{"remainingRequest":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/node_modules/vue-loader/lib/index.js??vue-loader-options!/data/jenkins/workspace/mer.ws.baibaodun.com.cn/src/components/base/ZBParser.vue?vue&type=script&lang=js","dependencies":[{"path":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/src/components/base/ZBParser.vue","mtime":1701742078546},{"path":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/node_modules/babel-loader/lib/index.js","mtime":456789000000},{"path":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/node_modules/vue-loader/lib/index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n// +----------------------------------------------------------------------\n// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]\n// +----------------------------------------------------------------------\n// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.\n// +----------------------------------------------------------------------\n// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权\n// +----------------------------------------------------------------------\n// | Author: CRMEB Team <admin@crmeb.com>\n// +----------------------------------------------------------------------\n\n/**\n * 注意：和Parser唯一的区别就是这里仅仅传入表单配置id即可自动加载已配置的表单\n *      数据后渲染表单，\n *      其他业务和Parser保持一致\n */\nimport * as systemFormConfigApi from '@/api/systemFormConfig.js';\nimport parser from '@/components/FormGenerator/components/parser/Parser';\nimport { Debounce } from '@/utils/validate';\nexport default {\n  name: 'ZBParser',\n  components: { parser },\n  props: {\n    formName: {\n      type: String,\n      required: '',\n    },\n    isCreate: {\n      type: Number,\n      default: 0, // 0=create 1=edit\n    },\n    editData: {\n      type: Object,\n    },\n    keyNum: {\n      type: Number,\n      default: 0,\n    },\n  },\n  data() {\n    return {\n      loading: false,\n      formConf: { fields: [] },\n    };\n  },\n  watch: {\n    keyNum: {\n      deep: true,\n      handler(val) {\n        this.formConf = { fields: [] };\n        this.handlerGetFormConfig(this.formName);\n      },\n    },\n  },\n  mounted() {\n    this.handlerGetFormConfig(this.formName);\n  },\n  methods: {\n    handlerGetFormConfig(formName) {\n      // 获取表单配置后生成table列\n      this.loading = true;\n      const _pram = { name: encodeURIComponent(formName) };\n      systemFormConfigApi\n        .formTempNameInfoApi(_pram)\n        .then((data) => {\n          this.formConf = JSON.parse(data.content);\n          this.loading = false;\n        })\n        .catch(() => {\n          this.loading = false;\n        });\n    },\n    handlerSubmit: Debounce(function (formValue) {\n      this.$emit('submit', formValue);\n    }),\n    resetForm(formValue) {\n      this.$emit('resetForm', formValue);\n    },\n  },\n};\n",null]}