{"remainingRequest":"/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/node_modules/vue-loader/lib/index.js??vue-loader-options!/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/src/components/Modules/Page.vue?vue&type=script&lang=js&","dependencies":[{"path":"/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/src/components/Modules/Page.vue","mtime":1701674859501},{"path":"/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/node_modules/babel-loader/lib/index.js","mtime":1701674874357},{"path":"/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/node_modules/cache-loader/dist/cjs.js","mtime":1701674874584},{"path":"/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/node_modules/vue-loader/lib/index.js","mtime":1701674874903}],"contextDependencies":[],"result":["//\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 { generateView, createForms, updateForm, getModuleForm } from \"@/service/FormApi.js\"\nimport { getModuleViewData } from \"@/service/ViewApi.js\"\n\nimport FormMapping from \"@/components/modulesDetail/FormMapping\"\nimport FormSummary from \"@/components/modulesDetail/FormSummary\"\nimport FormCleanData from \"@/components/modulesDetail/FormCleanData\"\nimport FormOperation from \"@/components/modulesDetail/FormOperation\"\nimport FormFormat from \"@/components/modulesDetail/FormFormat\"\nimport FormBasic from \"@/components/modulesDetail/FormBasic\"\n\nimport CreateMenu from \"@/components/CommonTool/createMenu\"\nimport viewDetail from \"@/components/Modules/View.vue\"\n\nexport default {\n name: \"page\",\n components: {\n viewDetail,\n FormMapping,\n FormSummary,\n CreateMenu,\n FormCleanData,\n FormOperation,\n FormFormat,\n FormBasic,\n },\n props: {\n detailData: Object,\n showLinkBack: {\n // 是否显示有调整链接的按钮\n type: Boolean,\n default: true,\n },\n },\n data() {\n return {\n activeName: \"basic\",\n tabList: [], // 选项卡的列表数组\n\n saveDisabled: false, //保存的状态\n // formDetailRef: null,\n showBtnAction: false, // tab栏 操作显示隐藏\n showSummary: false, // tab栏 操作摘要隐藏\n showMenuBtn: false, // 创建菜单\n\n params: {},\n edit: false, // 是否为编辑状态\n editFormType: false, // 编辑表单类型\n }\n },\n mounted() {\n this.$store.dispatch(\"rightHelpPageParams\", {\n title: \"表单信息\",\n url: \"application/application_module_form_info_help.html\",\n })\n // 监测选项卡\n let that = this\n window[\"openTabForm\"] = (type, formId, moduleId) => {\n console.log(\"点击了选项卡啊\", type, formId, moduleId)\n // 判断列表中有没有当前的数据\n let flag = false\n for (let i = 0; i < that.tabList; i++) {\n if (that.tabList[i].formId == formId) {\n flag = true\n break\n }\n }\n if (!flag) {\n // 将数据添加到选项卡列表中\n that.tabList.push({\n formId: formId,\n tabVisible: false,\n tabFormVisible: false,\n tabViewVisible: false,\n tabDetailData: {},\n })\n }\n // 打开选项卡\n that.openTabFormMethod(type, formId, moduleId)\n }\n },\n created() {\n this.params = this.detailData || this.$route.query.params\n console.log(this.params.id, \"id\", this.detailData)\n if (this.params.id) {\n this.edit = true\n // this.formDetailRef = this.params.id\n }\n },\n methods: {\n openTabFormMethod(type, formId, moduleId) {\n console.log(\"tab\", type, formId, moduleId)\n // 找到对应的选项卡\n let index = null\n for (let i = 0; i < this.tabList.length; i++) {\n if (this.tabList[i].formId == formId) {\n index = i\n break\n }\n }\n if (index !== null) {\n // 重置选项卡中的弹窗\n this.tabList[index].tabVisible = false\n this.tabList[index].tabFormVisible = false\n this.tabList[index].tabViewVisible = false\n // 获取选项卡中的数组\n if (type == \"form\" && formId && moduleId) {\n //获取detailData\n getModuleForm(formId, {\n onSucess: (response) => {\n if (response.data.errcode == 0) {\n this.tabList[index].tabVisible = true\n this.tabList[index].tabFormVisible = true\n this.tabList[index].tabViewVisible = false\n Object.assign(this.tabList[index].tabDetailData, this.params, response.data.data, { moduleId: moduleId })\n this.params.id = this.tabDetailData.id\n debugger\n console.log(\"111\", this.tabList[index])\n }\n },\n })\n } else if (type == \"view\" && formId && moduleId) {\n //获取detailData\n getModuleViewData(formId, {\n onSucess: (response) => {\n if (response.data.errcode == 0) {\n this.tabList[index].tabVisible = true\n this.tabList[index].tabFormVisible = false\n this.tabList[index].tabViewVisible = true\n Object.assign(this.tabList[index].tabDetailData, this.params, response.data.data, { moduleId: moduleId, viewId: formId })\n this.params.id = this.tabDetailData.id\n }\n },\n })\n } else {\n this.$message.error(this.$t(\"msg.select_tab_view\"))\n }\n }\n },\n\n updateFormType(val) {\n this.$emit(\"updateDetailData\", this.params, val)\n },\n /**\n * 显示菜单\n */\n showMenuDialog() {\n this.$refs[\"createMenu\"].showCreateDialog()\n },\n\n /**\n * 显示清除数据弹窗\n */\n showClearField() {\n this.$refs[\"cleanData\"].onClearField()\n },\n\n //vue中的全屏按钮点击事件\n openAllScren() {\n this.$refs[\"formFormat\"].openAllScren()\n },\n\n /**\n * 切换页签\n */\n handleClick(tab) {\n let id = this.params.id\n //操作列\n if (id != \"\" && tab.name == \"btnAction\") {\n this.$store.dispatch(\"rightHelpPageParams\", {\n title: this.$t(\"msg.form_info\"),\n url: \"application/application_module_form_info_activity_help.html\",\n })\n } else if (id != \"\" && tab.name == \"summary\") {\n this.$store.dispatch(\"rightHelpPageParams\", {\n title: this.$t(\"form.summary\"),\n url: \"application/application_module_form_reminder_help.html\",\n })\n } else if (id != \"\" && tab.name == \"mapping\") {\n this.$store.dispatch(\"rightHelpPageParams\", {\n title: this.$t(\"msg.form_info\"),\n url: \"application/application_module_form_info_activity_help.html\",\n })\n } else if (id != \"\" && tab.name == \"basic\") {\n this.$store.dispatch(\"rightHelpPageParams\", {\n title: this.$t(\"msg.form_message\"),\n url: \"application/application_module_form_info_help.html\",\n })\n } else if (id != \"\" && tab.name == \"content\") {\n this.$store.dispatch(\"rightHelpPageParams\", {\n title: this.$t(\"msg.form_info_senior\"),\n url: \"application/application_module_form_info_advance_help.html\",\n })\n }\n },\n\n /**\n * 退出\n */\n goback() {\n this.$store.dispatch(\"rightHelpPageParams\", {\n title: this.$t(\"form.title\"),\n url: \"application/application_module_form_help.html\",\n })\n this.$router.push({ path: \"/home/softwaresdetails/pagelist\", query: { edit: true, moduleId: this.params.moduleId } })\n },\n changeformVisible(item) {\n // 找到对应的选项然后重置\n let index = \"\"\n for (let i = 0; i < this.tabList; i++) {\n if (this.tabList[i].formId == item.formId) {\n index = i\n break\n }\n }\n if (index !== \"\") {\n this.tabList[index].tabVisible = false\n this.tabList[index].tabDetailData = {}\n }\n // this.$refs.formFormat.contentWindow.location.reload(true); // 选项卡退出会重置页面\n },\n\n /**\n * 一键生成视图\n */\n handleGenerateView() {\n if (this.params.id == \"\") {\n this.$message({\n type: \"info\",\n message: this.$t(\"msg.save_first\"),\n })\n return false\n } else {\n generateView(this.params.id, {\n onSucess: (response) => {\n if (response.data.errcode == 0) {\n this.$message({\n message: this.$t(\"msg.generate_view\"),\n type: \"success\",\n })\n }\n },\n })\n }\n },\n\n /**\n *保存表单\n */\n saveBtn() {\n this.saveDisabled = true\n // 先判断有无数据源\n if (!this.$store.state.dataSourceId) {\n this.$message.error(this.$t(\"msg.set_datasource_first\"))\n return false\n }\n\n // 接收表单基本的数据\n let basicData = this.$refs[\"formBasic\"].save()\n if (basicData == false) {\n this.saveDisabled = false\n return false\n }\n\n // 接收表单格式的诗句\n let formatData = this.$refs[\"formFormat\"].save()\n if (!formatData) {\n if (formatData === \"\") {\n this.saveDisabled = false\n this.$message.error(this.$t(\"msg.content_notnull\"))\n return false\n } else if (formatData == false) {\n this.saveDisabled = false\n return false\n }\n }\n\n basicData.templatecontext = formatData\n\n let mapFlag = this.$refs[\"mapping\"].verifyMapping()\n if (mapFlag) {\n basicData.mappingStr = mapFlag\n } else {\n basicData.mappingStr = \"\"\n }\n\n if (this.params.id) {\n basicData.id = this.params.id\n updateForm(basicData, {\n onSucess: (response) => {\n if (response.data.errcode == 0) {\n this.$message({\n message: this.$t(\"msg.ss\"),\n type: \"success\",\n })\n }\n\n this.saveDisabled = false\n },\n })\n } else {\n createForms(basicData, {\n onSucess: (response) => {\n if (response.data.errcode == 0) {\n let params = {\n ...basicData,\n id: response.data.data.id,\n }\n this.params = params;\n this.$message({\n message: this.$t(\"msg.ss\"),\n type: \"success\",\n })\n }\n\n this.saveDisabled = false\n },\n })\n }\n },\n\n /**\n * 重置所有字段id\n */\n resetAllFieldId() {\n this.$refs[\"formFormat\"].resetId()\n },\n },\n\n watch: {\n \"params.type\": {\n handler() {\n // 操作\n if (this.params.id && this.params.type != 2 && this.params.type != 256) {\n this.showBtnAction = true\n } else {\n this.showBtnAction = false\n }\n // 摘要\n if (this.params.id && this.params.type != 2 && this.params.type != 256 && this.params.type != 1048576) {\n this.showSummary = true\n } else {\n this.showSummary = false\n }\n // 菜单\n if (this.params.type == \"2\" || this.params.type == \"256\" || this.params.type == \"1048576\") {\n this.showMenuBtn = true\n } else {\n this.showMenuBtn = false\n }\n },\n deep: true,\n immediate: true,\n },\n \"$store.state.rightHelpPageParams\": {\n handler() {\n if (this.$store.state.rightHelpFrame) {\n this.$store.state.rightHelpFrame.contentWindow.showHelpContentHtml(this.$store.state.rightHelpPageParams.title, this.$store.state.rightHelpPageParams.url)\n }\n },\n deep: true,\n },\n },\n}\n",null]}