{"remainingRequest":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xypm-web\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xypm-web\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xypm-web\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xypm-web\\src\\components\\flow\\doneFormContent.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xypm-web\\src\\components\\flow\\doneFormContent.vue","mtime":1675214577073},{"path":"D:\\jenkins\\workspace\\xypm-web\\babel.config.js","mtime":1675214572901},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.regexp.split\";\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\nimport OnlineForm from \"@/components/flow/OnlineForm.vue\";\nimport form from \"@/api/formContent.js\";\nimport { Message } from \"element-ui\";\nimport { Loading } from \"element-ui\";\nimport FilePreview from \"@/components/common/FilePreview.vue\";\nimport req from \"@/request.js\";\nexport default {\n  name: \"formContent\",\n  props: [\"instId\", \"taskId\", \"defId\", \"proInstId\", \"type\", \"nodeId\", \"pData\", \"formId\", \"didntSkipStart\", \"isFlowPrint\" //是否打印模板进来的\n  ],\n  data: function data() {\n    return {\n      headHigh: \"141\",\n      dataInstId: \"\",\n      html: null,\n      data: null,\n      permission: null,\n      isView: false,\n      formType: \"INNER\",\n      htmlSrc: null,\n      urgentStateConf: {},\n      formHelpFile: \"\",\n      src: \"\",\n      files: [],\n      fileId: \"\",\n      fileTree: \"\",\n      formMap: {},\n      showFormContent: false\n    };\n  },\n  watch: {\n    urgentStateValue: function urgentStateValue(newVal, oldVal) {\n      if (window.urgentStateValue) {\n        window.urgentStateValue.new = newVal;\n      }\n    },\n    nodeId: function nodeId(newVal, oldVal) {\n      if (newVal && newVal != oldVal) {\n        this.getInstFormData();\n      }\n    }\n  },\n  methods: {\n    previewHelpFile: function previewHelpFile() {\n      var obj = {};\n      obj.id = this.formHelpFile[0].id;\n      obj.name = this.formHelpFile[0].name;\n      obj.size = this.formHelpFile[0].size;\n      this.$refs.filePreview.preview(obj);\n    },\n    getInstFormData: function getInstFormData() {\n      var _me = this;\n      _me.showFormContent = false;\n      var loadingInstance = Loading.service({\n        fullscreen: true\n      }); //开始\n      var callBack = function callBack(rep) {\n        var handlerJs = function handlerJs(rep) {\n          var currentUser = _me.$store.state.login.currentUser;\n          var data = _me.data;\n          var _this = _me;\n          if (rep && rep.diyJs) {\n            eval(rep.diyJs);\n          }\n        };\n        _me.showFormContent = true;\n        if (JSON.stringify(rep) == \"{}\") {\n          Message.error(\"此流程还没有设置全局表单,请先设置全局表单!\");\n          loadingInstance.close(); // 结束\n          return;\n        }\n        if (rep.resultMsg == \"formEmpty\" || rep.result == \"formEmpty\") {\n          Message.error(\"此流程还没有设置表单,请先设置表单!\");\n          loadingInstance.close(); // 结束\n          return;\n        }\n        //_me.formId=rep.form.formId;\n        if (rep.form && rep.form.type == \"FRAME\") {\n          _me.htmlSrc = rep.form.formValue;\n          _me.formType = rep.form.type;\n        } else {\n          form.preview(rep.form.formId, handlerJs);\n          if (_me.pData && \"latest\" != rep.doneDataVersion) {\n            _me.data = _me.pData;\n          } else {\n            _me.data = rep.data;\n          }\n          if (rep.permission) {\n            var permissionObj = JSON.parse(rep.permission);\n            var commonRight = \"\";\n            //如果是管理端进入，则将页面字段的权限修改为可编辑\n            if (_me.type == \"manage\") {\n              commonRight = \"w\";\n              //如果是查看实例，也是获取发起流程的表单和权限。只不过所有可见的权限要变成编辑\n            } else {\n              commonRight = \"r\";\n            }\n            if (permissionObj.fields && commonRight) {\n              for (var key in permissionObj.fields) {\n                var bodef = permissionObj.fields[key];\n                if (bodef) {\n                  for (var fname in bodef) {\n                    if (commonRight == \"w\" || commonRight == \"r\" && bodef[fname] != \"n\") {\n                      bodef[fname] = commonRight;\n                    }\n                  }\n                }\n                permissionObj.fields[key] = bodef;\n              }\n            }\n            if (permissionObj.table && commonRight) {\n              for (var key in permissionObj.table) {\n                var table = permissionObj.table[key];\n                if (table) {\n                  if (commonRight == \"w\") {\n                    table[\"hidden\"] = false;\n                    table[\"add\"] = true;\n                    table[\"del\"] = true;\n                  } else if (commonRight == \"r\") {\n                    table[\"add\"] = false;\n                    table[\"del\"] = false;\n                    table[\"required\"] = false;\n                    table[\"edit\"] = false;\n                  }\n                }\n                permissionObj.table[key] = table;\n              }\n            }\n            _me.permission = permissionObj;\n          }\n          _me.html = rep.form.formHtml;\n          if (rep.form.helpFile) {\n            _me.formHelpFile = JSON.parse(rep.form.helpFile);\n          }\n          if (_me.html.split('ref=\"next_step_check_').length > 1) {\n            _me.$root.$emit(\"startFlowBtnChange\", false);\n          }\n        }\n        loadingInstance.close(); // 结束\n      };\n\n      if (this.formMap[this.nodeId]) {\n        callBack(this.formMap[this.nodeId]);\n      }\n      if (this.instId) {\n        var isIncludData = _me.pData ? false : true;\n        var parameter = {\n          instId: this.instId,\n          nodeId: this.nodeId,\n          formId: this.formId,\n          includData: isIncludData\n        };\n        if (this.didntSkipStart) {\n          this.headHigh = 35;\n          parameter.getStartForm = true;\n        }\n        form.getInstFormAndBO(parameter, callBack);\n      }\n    },\n    hiddenContent: function hiddenContent() {\n      this.headHigh = \"10\";\n      this.$refs.formContainer.className = \"form-container-not\";\n    }\n  },\n  computed: {\n    urgentStateValue: function urgentStateValue() {\n      return this.urgentStateConf.value;\n    },\n    heightClient: function heightClient() {\n      // console.log(document.body.clientHeight, 'pxpxpxpxpxpxpxpxp')\n      return document.body.clientHeight - 310 + 'px';\n    }\n  },\n  components: {\n    OnlineForm: OnlineForm,\n    FilePreview: FilePreview\n  },\n  created: function created() {\n    if (this.isFlowPrint) {\n      this.headHigh = \"0\";\n    }\n    var $ = require(\"jquery\");\n    var _me = this;\n    this.$store.dispatch(\"storeProcess/getUrgentStateConf\", {\n      defId: this.defId,\n      instId: this.instId,\n      taskId: this.taskId\n    }).then(function (data) {\n      if (data.conf) {\n        try {\n          data.conf = JSON.parse(data.conf);\n        } catch (error) {\n          data.conf = eval(\"(\" + data.conf + \")\");\n        }\n        window.urgentStateValue = {\n          old: data.value\n        };\n        if (!data.value) {\n          for (var index = 0, c; c = data.conf[index++];) {\n            if (c.default) {\n              data.value = c.state;\n              break;\n            }\n          }\n        }\n        _me.urgentStateConf = data;\n      }\n    });\n    this.getInstFormData();\n  }\n};",null]}