{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-fvue\\src\\components\\eipControl\\EipInput.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\src\\components\\eipControl\\EipInput.vue","mtime":1667327529247},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\babel.config.js","mtime":1667327525434},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.regexp.replace\";\nimport \"regenerator-runtime/runtime\";\nimport _asyncToGenerator from \"D:/jenkins/workspace/xq-web-fvue/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nimport \"core-js/modules/es6.function.name\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport utils from \"@/utils.js\";\nimport FormMath from \"@/math.js\";\nimport sub_pio_mixin from \"@/sub-permission-mixin.js\";\nimport { Message } from \"element-ui\";\nexport default {\n  name: \"eip-input\",\n  props: [\"readonly\", \"validate\", \"value\", \"name\", \"modelExpression\", \"permission\", \"mathExp\", \"atter\", \"type\", \"dateCalcExp\", \"configAttributes\", \"placeholder\", \"precision\", \"stepStrictly\", \"min\", \"max\", \"filterthousandBit\", \"filtercurrency\", \"step\", \"bindPreAndSufFixjson\", \"company\"],\n  mixins: [sub_pio_mixin],\n  //混入方式引入表单组件中公共属性，处理子表、孙表行内联动（切面修改permission）\n  data: function data() {\n    return {\n      style_width: \"width:100%\",\n      width: \"100%\",\n      unwatchAry: [],\n      isEdit: true,\n      showViewe: \"\",\n      thousandBit: \"0\",\n      format: \"\",\n      isShow: true,\n      identityMap: {},\n      newValidate: null,\n      bindPreAndSufFix: null,\n      numberPrefix: false\n    };\n  },\n  computed: {\n    inputVal: {\n      get: function get() {\n        return this.value;\n      },\n      set: function set(val) {\n        this.$emit(\"input\", val);\n      }\n    },\n    inputName: function inputName() {\n      var labeldesc = \"\";\n\n      if (this.$slots && this.$slots.labeldesc && this.$slots.labeldesc[0].children && this.$slots.labeldesc[0].children[0].text) {\n        labeldesc = this.$slots.labeldesc[0].children[0].text;\n        return this.name ? this.name : utils.getName() + \"-\" + labeldesc;\n      } else {\n        return this.name ? this.name : utils.getName();\n      }\n    },\n    inputValidate: function inputValidate() {\n      if (this.newValidate) {\n        return this.newValidate;\n      }\n\n      return this.validate;\n    }\n  },\n  mounted: function () {\n    var _mounted = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n      var _me, pInst;\n\n      return regeneratorRuntime.wrap(function _callee$(_context) {\n        while (1) {\n          switch (_context.prev = _context.next) {\n            case 0:\n              _me = this;\n              this.permission_sub = _.cloneDeep(this.permission);\n              pInst = utils.getOnlineFormInstance(_me);\n              this.checkIdentity(); // //检查流水号\n              // if (this.configAttributes) {\n              //   this.isEdit = !this.configAttributes.isInputEdit;\n              //   //判断是否绑定流水号\n              //   if (this.configAttributes.bindIdentityAlias) {\n              //     this.isEdit = false;\n              //     if (this.value) return;\n              //     var alias = this.configAttributes.bindIdentityAlias;\n              //     const res = await this.$store.dispatch(\"menu/getNextIdByAlias\", alias);\n              //     if (res.state) {\n              //       this.$emit(\"input\", res.value);\n              //       if (res.value) {\n              //         var match = /(\\{(.*)\\}).*$/.exec(res.value);\n              //         //判断流水号中是否表达式如{kjbt.csfjsc}\n              //         if (match) {\n              //           this.$emit(\"input\", res.value.replace(match[1], \"\"));\n              //           let paramDom = document.querySelector(\n              //             '[model-name=\"data.' + match[2] + '\"]'\n              //           );\n              //           let _me = this;\n              //           if (paramDom && paramDom.__vue__) {\n              //             paramDom.__vue__.$watch(\n              //               \"value\",\n              //               function(newVal, oldVal) {\n              //                 if (\n              //                   _me.modelExpression == paramDom.__vue__.modelExpression\n              //                 ) {\n              //                   Message.error(\"流水号生成规则字段不能绑定流水号显示字段\");\n              //                   return;\n              //                 }\n              //                 if (newVal != oldVal) {\n              //                   _me.$emit(\"input\", res.value.replace(match[1], newVal));\n              //                 }\n              //               },\n              //               { immediate: true }\n              //             );\n              //           }\n              //         }\n              //       }\n              //     } else {\n              //       //Message.error(res.message);\n              //     }\n              //   }\n              // }\n              // _me.$watch(\"inputVal\", function(newVal, oldVal) {\n              //   pInst.$watch(\n              //     \"identityMap\",\n              //     function(newVal, oldVal) {\n              //       if (newVal && newVal !== oldVal) {\n              //         for (const key in newVal) {\n              //           if (_me.atter == key) {\n              //             let item = newVal[key];\n              //             utils.setValueByPath(\n              //               pInst,\n              //               item.key,\n              //               item.value.replace(item.expression, _me.value)\n              //             );\n              //           }\n              //         }\n              //       }\n              //     },\n              //     { immediate: true }\n              //   );\n              // });\n\n              if (this.filtercurrency && !isNaN(this.inputVal) && this.inputVal) {\n                this.format = FormMath.convertCurrency(this.inputVal);\n              }\n\n              if (this.filterthousandBit && !isNaN(this.inputVal) && this.inputVal) {\n                this.format = this.format + \"   \" + utils.thousandBit(this.inputVal);\n              }\n\n              if (this.bindPreAndSufFixjson) {\n                this.bindPreAndSufFix = JSON.parse(this.bindPreAndSufFixjson);\n              }\n\n              this.numberPrefix = false;\n\n              if (this.type == \"number\" && this.bindPreAndSufFix && this.bindPreAndSufFix.preFix || this.bindPreAndSufFix.preFix) {\n                this.numberPrefix = true;\n              }\n\n            case 9:\n            case \"end\":\n              return _context.stop();\n          }\n        }\n      }, _callee, this);\n    }));\n\n    function mounted() {\n      return _mounted.apply(this, arguments);\n    }\n\n    return mounted;\n  }(),\n  methods: {\n    readonlyFormat: function readonlyFormat(val) {\n      //暂无表达式 如有表达式使用  eval(val) 并且控件配置项要把表达式构建传递到eipInput\n      if (this.bindPreAndSufFix) {\n        if (!this.bindPreAndSufFix.preFix) {\n          this.bindPreAndSufFix.preFix = \"\";\n        }\n\n        if (!this.bindPreAndSufFix.sufSix) {\n          this.bindPreAndSufFix.sufSix = \"\";\n        }\n\n        if (this.value) {\n          return this.bindPreAndSufFix.preFix + this.value + this.bindPreAndSufFix.sufSix;\n        }\n      } else if (this.company) {\n        return this.value + this.company;\n      }\n    },\n    numberBlur: function numberBlur() {\n      if (this.filtercurrency && !isNaN(this.inputVal) && this.inputVal) {\n        this.isShow = false;\n        this.showViewe = FormMath.convertCurrency(this.inputVal);\n      }\n\n      if (this.filterthousandBit && !isNaN(this.inputVal) && this.inputVal) {\n        this.thousandBit = utils.thousandBit(this.inputVal);\n      }\n    },\n    numberFocus: function numberFocus() {\n      if (this.filtercurrency && !isNaN(this.inputVal) && this.inputVal) {\n        this.isShow = true;\n        this.showViewe = \"\";\n      }\n\n      if (this.filterthousandBit && !isNaN(this.inputVal) && this.inputVal) {\n        this.thousandBit = \"0\";\n      }\n    },\n    convertCurrency: _.debounce(function () {\n      if (this.filtercurrency && !isNaN(this.inputVal) && this.inputVal) {\n        this.isShow = false;\n        this.showViewe = FormMath.convertCurrency(this.inputVal);\n      }\n    }, 1000),\n    convertThousanBit: _.debounce(function () {\n      if (this.filterthousandBit && !isNaN(this.inputVal) && this.inputVal) {\n        this.thousandBit = utils.thousandBit(this.inputVal);\n      }\n    }, 1000),\n    numberChange: function numberChange() {\n      if (this.filtercurrency && !isNaN(this.inputVal) && this.inputVal) {\n        this.convertCurrency();\n      }\n\n      if (this.filterthousandBit && !isNaN(this.inputVal) && this.inputVal) {\n        this.convertThousanBit();\n      }\n    },\n    //数据报表\n    checkIdentity: function () {\n      var _checkIdentity = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {\n        var alias, res, match, paramDom, _me;\n\n        return regeneratorRuntime.wrap(function _callee2$(_context2) {\n          while (1) {\n            switch (_context2.prev = _context2.next) {\n              case 0:\n                if (!this.configAttributes) {\n                  _context2.next = 11;\n                  break;\n                }\n\n                this.isEdit = !this.configAttributes.isInputEdit; //判断是否绑定流水号\n\n                if (!this.configAttributes.bindIdentityAlias) {\n                  _context2.next = 11;\n                  break;\n                }\n\n                this.isEdit = false;\n\n                if (!this.value) {\n                  _context2.next = 6;\n                  break;\n                }\n\n                return _context2.abrupt(\"return\");\n\n              case 6:\n                alias = this.configAttributes.bindIdentityAlias;\n                _context2.next = 9;\n                return this.$store.dispatch(\"menu/getNextIdByAlias\", alias);\n\n              case 9:\n                res = _context2.sent;\n\n                if (res.state) {\n                  this.$emit(\"input\", res.value);\n\n                  if (res.value) {\n                    match = /(\\{(.*)\\}).*$/.exec(res.value); //判断流水号中是否表达式如{kjbt.csfjsc}\n\n                    if (match) {\n                      this.$emit(\"input\", res.value.replace(match[1], \"\"));\n                      paramDom = document.querySelector('[model-name=\"data.' + match[2] + '\"]');\n                      _me = this;\n\n                      if (paramDom && paramDom.__vue__) {\n                        paramDom.__vue__.$watch(\"value\", function (newVal, oldVal) {\n                          if (_me.modelExpression == paramDom.__vue__.modelExpression) {\n                            Message.error(\"流水号生成规则字段不能绑定流水号显示字段\");\n                            return;\n                          }\n\n                          if (newVal != oldVal) {\n                            _me.$emit(\"input\", res.value.replace(match[1], newVal));\n                          }\n                        }, {\n                          immediate: true\n                        });\n                      }\n                    }\n                  }\n                } else {//Message.error(res.message);\n                }\n\n              case 11:\n              case \"end\":\n                return _context2.stop();\n            }\n          }\n        }, _callee2, this);\n      }));\n\n      function checkIdentity() {\n        return _checkIdentity.apply(this, arguments);\n      }\n\n      return checkIdentity;\n    }()\n  },\n  beforeDestroy: function beforeDestroy() {},\n  destroyed: function destroyed() {},\n  created: function created() {\n    if (this.bindPreAndSufFixjson != \"{}\" && (JSON.parse(this.bindPreAndSufFixjson).preFix != \"\" || JSON.parse(this.bindPreAndSufFixjson).sufSix != \"\")) {\n      if (this.type == \"number\") {\n        this.style_width = \"width:57%\";\n      } else {\n        this.style_width = \"width:87%\";\n      }\n    }\n\n    if (this.type == \"number\" && this.permission_sub == \"r\") {\n      this.style_width = \"\";\n    }\n\n    this.$validator = this.$root.$validator;\n  },\n  watch: {\n    value: function value(newValue, oldValue) {\n      this.checkIdentity();\n    }\n  }\n};",null]}