{"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/modulesDetail/ViewBasic.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/modulesDetail/ViewBasic.vue","mtime":1701674859503},{"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//\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//\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//\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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport { nameCheck } from '@/utils/utils.js'\nimport { getStyleLibsList } from '@/service/LibraryAPI.js'\nimport ScriptEditorSelect from '@/components/Common/scriptEditor'\nimport NodeLinkSelect from '@/components/Common/nodeLink_select'\nimport { getFormList } from '@/service/CommontoolsAPI.js'\nimport config from '@/assets/json/config.json'\nimport { getModuleViewData } from '@/service/ViewApi.js'\nexport default {\n name: 'ViewBasic',\n components: {\n ScriptEditorSelect,\n NodeLinkSelect,\n },\n data() {\n return {\n loading: false,\n ajaxNum: 0, // 请求的次数\n formData: {\n name: '', //名称\n description: '', //描述\n intValue: '1', //视图类型\n styleId: '', //样式库\n mapType: 'baidumap', // 地图插件类型\n openType: '1', //打开类型\n permissionType: 'public', //权限\n displayType: 'relatedForm', //数据呈现类型\n refresh: false, // 刷新\n newPage: false, //新窗口打开\n showTotalRow: false, //是否显示总计数\n pagination: true, //分页\n pageLines: '5', //分页条数\n readonly: false, //只读\n autoCompose: false, // 是否自动排版\n collapsibleShowMode: 'normal', // 显示模式\n showWaterMark: false, //水印\n showActivityColumnType: 0, // 操作列显示模式\n waterMarkScript: '', //水印脚本\n confirmActivityScript: '', // 确认脚本\n removeActivityScript: '', // 移除脚本\n templateForm: '', //模板表单\n innerType: 'FORM', // 节点点击打开类型\n linkName: '', // 节点链接\n nodeLinkId: '', // 节点链接id\n width: '', // 弹窗宽\n height: '', // 弹窗高\n },\n options: config.options,\n mapTypeOptions: config.mapTypeOptions,\n openTypeOptions: config.openTypeOptions,\n\n styleOptions: [], //样式库\n templateFormList: [], // 模板表单\n formDataRules: {\n name: [\n { required: true, message: this.$t('placeholder.name'), trigger: 'blur' },\n // { validator: nameCheck, trigger: 'blur' },//555视图名称字段不要限制\n ],\n mapType: [\n { required: true, message: this.$t('placeholder.map'), trigger: 'change' },\n ],\n templateForm: [\n { required: true, message: this.$t('placeholder.form_model'), trigger: 'blur' },\n ],\n },\n\n scriptEditorVisible: false, // 脚本编辑器弹窗\n currentScriptEditor: '', // 当前点击的是哪一个脚本编辑器\n nodeLinkVisiable: false, // 节点链接弹窗\n }\n },\n methods: {\n changeInnerType(val){\n this.formData.innerType=val\n this.$forceUpdate()\n },\n /**\n * 切换数据呈现方式\n */\n changeDisplayType() {\n if (this.formData.displayType == 'templateForm') {\n this.getTemplateFormList()\n }\n },\n\n /**\n * 切换视图类型\n */\n setDefaultValue() {\n // 默认选中第一条数据\n if (this.formData.intValue == 18) {\n this.formData.mapType = 'baidumap'\n }\n if (this.formData.intValue == 17) {\n this.formData.innerType = this.formData.innerType?this.formData.innerType:'FORM'\n }\n // 重置打开类型\n this.formData.openType = '1'\n // 实时修改传给视图列的intValue的值\n this.$store.commit('setCurrentDataSources', this.formData) // 当前的数据【传给列的批量创建】\n },\n\n /**\n * 切换打开类型\n */\n changeOpenType(){\n this.$store.commit('setCurrentDataSources', this.formData) // 当前的数据【传给视图数据组件】\n },\n\n /**\n * 显示脚本编辑器弹框\n */\n showScriptEditor(val) {\n this.scriptEditorVisible = true\n this.currentScriptEditor = val\n },\n\n /**\n * 将脚本编辑器的值写入到textarea中\n */\n handleScriptEditor(val) {\n if (this.currentScriptEditor === 'formDataWaterMarkScript') {\n this.formData.waterMarkScript = val\n } else if (this.currentScriptEditor === 'formDataConfirmActivityScript') {\n this.formData.confirmActivityScript = val\n } else if (this.currentScriptEditor === 'formDataRemoveActivityScript') {\n this.formData.removeActivityScript = val\n }\n },\n\n /**\n * 将节点链接的值写入input中\n */\n selectNodeLinkValue(val) {\n this.formData.linkName = val.name\n this.formData.nodeLinkId = val.id\n },\n\n /**\n * 打开节点链接弹窗\n */\n openNodeLink() {\n this.nodeLinkVisiable = true\n },\n /**\n * 清空基本节点【提供给子组件的方法】\n */\n clearLinkName() {\n this.formData.linkName = ''\n this.formData.nodeLinkId = ''\n this.$forceUpdate()\n },\n\n /**\n * 获取视图的数据\n */\n getViewData() {\n this.ajaxNum++\n getModuleViewData(this.viewId, {\n onSucess: (response) => {\n if (response.data.errcode == 0) {\n this.ajaxNum--\n\n let data = response.data.data\n data.openType = data.openType + ''\n data.intValue = data.intValue + ''\n data.autoCompose = data.autoCompose ? data.autoCompose : false\n data.collapsibleShowMode = data.collapsibleShowMode\n ? data.collapsibleShowMode\n : 'normal'\n\n data.mapType ? data.mapType : 'baidumap'\n\n this.formData = data\n this.formData.linkName=data.linkVoJson?JSON.parse(data.linkVoJson).name:\"\"\n setTimeout(()=>{\n this.$store.commit('setCurrentDataSources', data) // 当前的数据【传给列的批量创建】\n })\n this.initData = {\n // 初始化的数据来源表单用于视图列做对比\n relatedForm: data.relatedForm,\n viewtype: data.intValue,\n }\n\n // 根据数据呈现方式判断是否请求模板表单\n if (data.displayType == 'templateForm') {\n this.getTemplateFormList()\n }\n this.$emit(\"viewModuleData\",data)\n }\n },\n })\n },\n\n /**\n * 模板表单\n */\n getTemplateFormList() {\n this.ajaxNum++\n getFormList(\n {\n moduleId: this.moduleId,\n name: '',\n description: '',\n pageNo: 1,\n linesPerPage: 1000000,\n type: 1048576,\n },\n {\n onSucess: (response) => {\n this.ajaxNum--\n if (response.data.errcode == 0) {\n if (response.data.data) {\n this.templateFormList = response.data.data\n } else {\n this.formData.templateForm = ''\n }\n // 视图数据的模板表单\n if (\n this.formData.templateForm != '' &&\n this.formData.templateForm\n ) {\n let have = false\n for (let i = 0; i < this.templateFormList.length; i++) {\n if (\n this.templateFormList[i].id == this.formData.templateForm\n ) {\n have = true\n break\n }\n }\n if (!have) {\n this.formData.templateForm = ''\n }\n }\n }\n },\n }\n )\n },\n\n /**\n * 获取样式库数据\n */\n async getStyleData() {\n let appId = sessionStorage.getItem('appId')\n let params = {\n appId: sessionStorage.getItem('appId'),\n searchword: '',\n currpage: 1,\n pagelines: 1000000,\n }\n const response = await getStyleLibsList(params, appId)\n if (response.data.errcode == 0) {\n this.styleOptions = response.data.data.datas\n }\n },\n\n save() {\n let flag = false\n this.$refs['formData'].validate((valid) => {\n if (!valid) {\n flag = true\n }\n })\n if (flag) {\n return false\n } else {\n if(this.formData.linkVoJson){this.formData.linkVoJson=\"\"}\n return {\n ...this.formData,\n openType: parseInt(this.formData.openType), //打开类型\n intValue: parseInt(this.formData.intValue), //视图类型\n width: parseInt(this.formData.width), // 弹窗宽\n height: parseInt(this.formData.height), // 弹窗高\n }\n }\n },\n },\n props: {\n isEdit: Boolean,\n viewId: String,\n moduleId: String,\n },\n mounted() {\n if (this.isEdit) {\n this.getViewData()\n }\n // 获取样式库数据\n this.getStyleData()\n },\n computed: {\n /**\n * textarea 传给 脚本编辑器的值\n */\n showScritptEditorCode() {\n let code\n if (this.currentScriptEditor === 'formDataWaterMarkScript') {\n code = this.formData.waterMarkScript\n } else if (this.currentScriptEditor === 'formDataConfirmActivityScript') {\n code = this.formData.confirmActivityScript\n } else if (this.currentScriptEditor === 'formDataRemoveActivityScript') {\n code = this.formData.removeActivityScript\n }\n return code\n },\n // 显示日历视图\n showcalendar() {\n return this.formData.intValue == 16\n },\n // 显示甘特视图\n showgantt() {\n return this.formData.intValue == 19\n },\n // 数据类型呈现方式\n showformDataIntValue() {\n let flag\n if (\n this.formData.intValue != 17 &&\n this.formData.intValue != 19 &&\n this.formData.intValue != 18\n ) {\n flag = true\n } else {\n flag = false\n }\n return flag\n },\n // 显示水印脚本\n showFormDataWaterMark() {\n let flag\n if (\n this.formData.intValue != 18 &&\n this.formData.intValue != 20 &&\n this.formData.intValue != 19\n ) {\n flag = true\n } else {\n flag = false\n }\n return flag\n },\n // 显示只读\n showReadOnly() {\n let flag = true\n if (\n this.formData.intValue == 20 ||\n this.formData.intValue == 16 ||\n this.formData.intValue == 17\n ) {\n flag = false\n }\n return flag\n },\n // 显示确认脚本\n showConfirmScript() {\n let flag = false\n if (\n (this.formData.intValue == 1 &&\n this.formData.openType == 288 &&\n this.formData.showActivityColumnType == 0) ||\n this.formData.showActivityColumnType == 1\n ) {\n flag = true\n }\n return flag\n },\n // 显示移除脚本\n showRemoveScript() {\n let flag = false\n if (\n (this.formData.intValue == 1 &&\n this.formData.openType == 288 &&\n this.formData.showActivityColumnType == 0) ||\n this.formData.showActivityColumnType == 2\n ) {\n flag = true\n }\n return flag\n },\n\n // 显示分页\n showPagination() {\n let flag = false\n if (\n this.formData.intValue != 16 &&\n this.formData.intValue != 17 &&\n this.formData.intValue != 20 &&\n this.formData.intValue != 18 &&\n this.formData.intValue != 19\n ) {\n flag = true\n }\n return flag\n },\n\n // 显示是否自动排版\n /* showCompose() {\n let flag = false\n if (this.formData.intValue == 1) {\n flag = true\n }\n return flag\n },*/\n // 是否显示模式\n showCollapsibleShowMode() {\n let flag = false\n if (this.formData.intValue == 20) {\n flag = true\n }\n return flag\n },\n\n // 操作列显示模式及确认删除脚本\n showActivityColumn() {\n let flag = false\n if (this.formData.intValue == 1 && this.formData.openType == 288) {\n flag = true\n }\n return flag\n },\n },\n}\n",null]}