{"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/CommonTool/menuDetail.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/CommonTool/menuDetail.vue","mtime":1701674859500},{"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\nimport {\n getMenuDetail,\n getAllMenu,\n putMenuDetail,\n newMenu,\n getLogoUrl,\n} from \"@/service/CommontoolsAPI.js\";\nimport { getAllmodules } from \"@/service/CommonApi.js\";\nimport { getModuleFormList } from \"@/service/FormApi.js\";\nimport { getModuleViewList } from \"@/service/ViewApi.js\";\nimport { getReportsList } from \"@/service/ReportApi.js\";\nimport { getChartsList } from \"@/service/ModulesApi.js\";\nimport { getMultiLanguageList, deleteMultiLanguageList } from \"@/service/MultiLanguageAPI.js\";\nimport icon_select from \"@/components/Common/icon_select.vue\";\nimport font_select from \"@/components/Common/font_select.vue\";\nimport MultiLanguages from \"@/components/Common/languages_select\";\nimport ScriptEditorSelect from \"@/components/Common/scriptEditor\";\nimport ColorPicker from \"@/components/Common/ColorPicker\";\nimport { nameCheck } from \"@/utils/utils.js\";\nimport {delMsg} from '@/utils/elementui'\n\nexport default {\n name: \"menuDetail\",\n props: [\"type\", \"visible\"],\n components: {\n icon_select,\n font_select,\n MultiLanguages,\n ScriptEditorSelect,\n ColorPicker\n },\n data () {\n return {\n appId: sessionStorage.getItem(\"appId\"),\n menuId: \"\",\n menuOption: [],\n detail: {\n name: \"\",\n permissionType: \"public\",\n orderno: 0,\n opentarget: \"detail\",\n status: 1\n },\n menuRules: {\n name: [\n { required: true, message: this.$t('placeholder.name'), trigger: \"blur\" },\n { validator: nameCheck, trigger: \"blur\" },\n ],\n },\n options: [],\n opentargetOptions: [\n {\n value: \"detail\",\n label: this.$t('label.work_area_open'),\n },\n {\n value: \"target\",\n label: this.$t('label.new_win_open'),\n },\n ],\n linkTypeOptions: [\n {\n value: \"\",\n label:this.$t('btns.choose'),\n },\n {\n value: \"00\",\n label: this.$t('label.form_start'),\n },\n {\n value: \"01\",\n label: this.$t('view.view'),\n },\n {\n value: \"02\",\n label: this.$t('widget.chart'),\n },\n {\n value: \"07\",\n label: this.$t('label.url_script'),\n },\n {\n value: \"09\",\n label: this.$t('menu.custom_report'),\n }\n ],\n queryString: [],\n moduleOption: [],\n actionFormOption: [],\n actionViewOption: [],\n actionReportOption: [], // 作用报表\n customizeReportOption: [], // 自定义报表\n actionContent: \"\",\n actionContentOther: \"\", // 自定义链接\n actionScript: \"\", // 脚本链接\n showTypeOption: [\n { value: this.$t('label.all'), id: 0 },\n { value: this.$t('label.just_menu'), id: 1 },\n { value: this.$t('label.just_flow'), id: 2 },\n ],\n icon: { \n icontype: \"img\",\n imgUrl: \"/uploads/lib/icon_menu_default.png\",\n fontUrl: \"\",\n iconFontColor: \"rgba(0, 0, 0, 1)\"\n },\n iconSelectCheck: false,\n fontSelectCheck: false,\n show: true,\n isResetForm: \"\", // 是否重置表单\n\n languagesVisible: false, // 多语言弹窗\n languageData: {}, // 多语言数据\n languageParams:{\n label:'',\n text:'',\n type:'',\n currpage: 1,\n pagelines: 10,\n },\n\n scriptEditorVisible: false, // 脚本编辑器弹窗\n\n fontStyle: '', // 字体图标的样式\n\n hasRequestData: false, // 是否有数据\n\n loading: false, // 标识是否需要加载\n btnLoading: false, // 按钮的加载\n };\n },\n\n created () {\n this.getAllMenu();\n this.getModules();\n },\n computed: {\n detailVisible: {\n get () {\n // this.resetData(); 影响点击新建后再点击编辑数据被重置\n return this.visible;\n },\n set (val) {\n this.$emit(\"update:visible\", true);\n this.$emit(\"change\", val);\n this.$forceUpdate();\n },\n },\n /**\n * textarea 传给 脚本编辑器的值\n */\n showScritptEditorCode () {\n return this.actionScript\n },\n },\n watch: {\n menuId () {\n if(this.menuId){\n this.getData();\n }\n this.getModules();\n },\n \"$store.state.menuTreeMenuId\" () {\n if(this.$store.state.isShowMunuDetail){\n this.detailVisible = true;\n }\n this.detail = {\n name: \"\",\n permissionType: \"public\",\n orderno: 0,\n opentarget: \"detail\",\n superior: \"\",\n linkType: \"\",\n };\n this.menuId = this.$store.state.menuTreeMenuId;\n \n if(this.menuId!=\"\"){\n this.$nextTick(() => {\n this.resetMenuForm();\n })\n }\n //id变化的时候刷新菜单列表\n if (this.$store.state.menuSuperiorId != \"\" && this.type == \"newMobile\") {\n this.show = true;\n }\n this.getAllMenu();\n this.getFormList();\n },\n \"$store.state.menuSuperiorId\"(){\n this.detail.superior= this.$store.state.menuSuperiorId;\n this.getAllMenu();\n this.changeShow();\n //新建的时候 loading结束\n if(this.menuId==\"\")this.loading = false;\n\n }\n },\n methods: {\n getLogoUrl(url){\n return getLogoUrl(url)\n }, \n resetData () {\n if (this.type == \"newPc\" || this.type == \"newMobile\") {\n this.detail = {\n name: \"\",\n permissionType: \"public\",\n orderno: 0,\n opentarget: \"detail\",\n superior: this.$store.state.menuSuperiorId,\n linkType: \"\",\n status: 1\n };\n if (this.type == \"newMobile\" && this.detail.superior == \"\") {\n this.show = false;\n }\n this.icon = {\n imgUrl: \"/uploads/lib/icon_menu_default.png\",\n icontype: \"img\",\n fontUrl: \"\",\n iconFontColor: \"rgba(0, 0, 0, 1)\"\n };\n // this.$store.dispatch(\"resetMenuTreeMenuId\");\n }\n },\n changeShow () {\n if (this.type == \"newMobile\") {\n // this.show = false;\n }\n },\n onSelectFontOk (font) {\n this.icon.fontUrl = font\n this.icon.icontype = 'font'\n this.fontSelectCheck = false; \n },\n selectFont () {\n this.fontSelectCheck = true;\n },\n getUrl (url) {\n return getLogoUrl(url);\n },\n onSelectIconOk (item) {\n if (item) {\n if (item.path) {\n this.icon.icontype = \"img\";\n this.icon.imgUrl = item.path;\n } else {\n this.$message({\n showClose: true,\n type: \"error\",\n message: this.$t('msg.select_fail'),\n });\n }\n }\n },\n selectImg () {\n this.iconSelectCheck = true;\n },\n onSaveAndNewBtnClick (formName) {\n this.onSaveBtnClick(formName);\n this.isResetForm = true\n },\n onSaveBtnClick (formName) {\n this.$refs[formName].validate(async (valid) => {\n if (valid) {\n this.isResetForm = false;\n // 模块\n if (this.detail.linkType == \"00\" || this.detail.linkType == \"01\" || this.detail.linkType == \"02\" || this.detail.linkType == \"09\") {\n if (this.detail.moduleid == \"\" || !this.detail.moduleid) {\n this.$message({\n showClose: true,\n message: this.$t('msg.select_module'),\n type: \"error\",\n });\n return false;\n } else {\n // 手机端的一级不需判断表单视图报表等\n if((this.type.indexOf(\"obile\") != -1) && (this.$store.state.mobileSave == \"\" || this.$store.state.mobileSave == null)){\n console.log('手机端一级不需要判断')\n }else{\n if (this.actionContent == \"\" || !this.actionContent){\n if (this.detail.linkType == \"00\") {\n this.$message({\n showClose: true,\n message: this.$t('msg.select_form'),\n type: \"error\",\n });\n return false;\n } else if (this.detail.linkType == \"01\") {\n this.$message({\n showClose: true,\n message: this.$t('msg.select_view'),\n type: \"error\",\n });\n return false;\n } else if (this.detail.linkType == \"02\" || this.detail.linkType == \"09\") {\n this.$message({\n showClose: true,\n message: this.$t('msg.select_report'),\n type: \"error\",\n });\n return false;\n }\n }\n }\n \n }\n }else if(this.detail.linkType == \"05\" || this.detail.linkType == \"06\"){\n if(this.actionContentOther == '' || this.actionContentOther == undefined){\n return this.$message.error(this.$t('msg.select_link'))\n }\n }\n\n // 图片或字体图标\n if(this.icon.icontype == 'img'){\n this.detail.ico = `{\"icon\":\"${this.icon.imgUrl}\",\"icontype\":\"${this.icon.icontype}\"}`\n }else if(this.icon.icontype == 'font'){\n this.detail.ico = `{\"icon\":\"${this.icon.fontUrl}\",\"icontype\":\"${this.icon.icontype}\",\"iconFontColor\":\"${this.icon.iconFontColor}\"}`\n }\n\n // actionContentOther 的 值\n if(this.detail.linkType == '07'){\n this.actionContent = this.actionScript\n }else if(this.detail.linkType == '05' || this.detail.linkType == '06'){\n this.actionContent = this.actionContentOther\n }\n\n // 如果链接类型不是视图,显示总数设置为false\n if(this.detail.linkType != '01'){\n this.detail.showtotalrow = \"false\"\n }\n\n // this.detail.ico = JSON.stringify(this.icon);\n this.detail.queryString = JSON.stringify(this.queryString);\n if(this.detail.superior==this.appId)this.detail.superior='';\n let detail = {\n name: \"\",\n description: \"\",\n multiLanguageLabel: \"\",\n opentarget: \"\",\n ico: \"ico\",\n superior: \"\",\n linkName: \"\",\n linkType: \"\",\n moduleid: \"\",\n directory: \"\",\n actionContent: this.actionContent || \"\",\n queryString: \"\",\n permissionType: \"public\",\n isUsual: \"\",\n isMobile: \"\",\n orderno: 0,\n showtotalrow: \"\",\n status: 1\n };\n if (this.menuId != \"\") {\n this.detail.actionContent=this.actionContent;\n // 编辑\n this.btnLoading = true\n let response = await putMenuDetail({\n applicationId: this.appId,\n menuId: this.menuId,\n data: this.detail,\n });\n this.btnLoading = false\n if (response.data.errcode == 0) {\n this.$message.success(this.$t('msg.ss'))\n // 刷新左边的tree\n this.$emit(\"refreshMenu\");\n //刷新上级数据\n this.getAllMenu();\n if(this.isResetForm){\n this.resetMenu()\n this.resetMenuForm()\n }else{\n this.$store.dispatch('saveMenuTreeMenuId', this.detail.id)\n this.$store.dispatch('setMenuSuperiorId', '')\n }\n }\n } else {\n // 新建\n detail = { ...detail, ...this.detail };\n let isMobile;\n if (this.type == \"newPc\") isMobile = false;\n else if (this.type == \"newMobile\") isMobile = true;\n this.btnLoading = true\n let response = await newMenu(this.appId, isMobile, detail);\n this.btnLoading = false\n if (response.data.errcode == 0) {\n this.$message.success(this.$t('msg.created_ss'))\n this.getAllMenu();\n \n if(this.isResetForm){\n this.resetMenu()\n this.resetMenuForm()\n }else{\n this.$store.dispatch('saveMenuTreeMenuId', response.data.data.id)\n this.$store.dispatch('setMenuSuperiorId', \"\")\n }\n // 刷新左边的tree\n this.$emit(\"refreshMenu\");\n }\n }\n } else {\n this.isResetForm = false;\n return false;\n }\n });\n },\n // 需要传给 menuTree 重置内容\n resetMenuForm () {\n this.$refs[\"menuForm\"].resetFields();\n },\n // 重置内容\n resetMenu(){\n this.detail = {\n name: \"\",\n description: \"\",\n multiLanguageLabel: \"\",\n opentarget: \"\",\n ico: \"ico\",\n superior: \"\",\n linkName: \"\",\n linkType: \"\",\n moduleid: \"\",\n directory: \"\",\n actionContent: this.actionContent || \"\",\n queryString: \"\",\n permissionType: \"public\",\n isUsual: \"\",\n isMobile: \"\",\n orderno: 0,\n showtotalrow: \"\",\n status: 1\n };\n this.queryString=[]\n if (this.type == \"newMobile\" && this.detail.superior == \"\") {\n this.show = false;\n }\n this.icon = {\n imgUrl: \"/uploads/lib/icon_menu_default.png\",\n fontUrl: \"\",\n icontype: \"img\",\n iconFontColor: \"rgba(0, 0, 0, 1)\"\n };\n // 重置表单id\n this.$store.dispatch(\"resetMenuTreeMenuId\");\n // 重置验证规则\n this.isResetForm = false;\n if (this.type.indexOf(\"pc\") != -1) {\n // this.type = \"newPc\";\n this.$emit(\"changePcType\");\n } else if (this.type.indexOf(\"obile\") != -1) {\n // this.type = \"newMobile\";\n this.$emit(\"changeMobileType\");\n }\n },\n //获取所有树形菜单\n getAllMenu () {\n let type;\n if (this.type == \"newPc\"|| this.type=='pc'){\n type = \"pc\";\n if(this.type.toLowerCase().indexOf('pc') != -1 && this.linkTypeOptions.length < 8){\n this.linkTypeOptions.push({\n value: \"05\",\n label: this.$t('label.url_in'),\n },\n {\n value: \"06\",\n label: this.$t('label.url_out'),\n })\n }\n }else if (this.type == \"newMobile\"|| this.type=='mobile') type = \"mobile\";\n getAllMenu(\n {\n applicationId: this.appId,\n currentMenuId: \"\",\n type: \"\",\n showType: type,\n },\n {\n onSucess: (response) => {\n if (response.data.errcode == 0) {\n // this.loading = false\n this.menuOption = response.data.data;\n this.menuOption[0].id=this.appId;\n }\n },\n }\n );\n },\n changeModule () {\n this.actionContent = \"\";\n if (this.detail.linkType == \"00\") this.getFormList();\n else if (this.detail.linkType == \"01\") this.getViewList();\n else if (this.detail.linkType == \"02\") this.getReportList();\n else if(this.detail.linkType == \"09\") this.getCustomizeReportList()\n this.$forceUpdate()\n },\n getFormList () {\n if(this.detail.moduleid){\n getModuleFormList(\n {\n moduleId: this.detail.moduleid,\n name:'',\n description:'',\n pageNo: 1,\n linesPerPage: 1000000,\n type:1,\n },\n {\n onSucess: (response) => {\n if (response.data.errcode == 0) {\n this.actionFormOption = response.data.data;\n // 确认表单id是否有值\n if(this.hasRequestData){\n this.checkActionFormId()\n }\n }\n },\n }\n );\n }else{\n this.actionFormOption = []\n }\n },\n getViewList () {\n if(this.detail.moduleid){\n getModuleViewList(\n {\n moduleId: this.detail.moduleid,\n searchword: \"\",\n pageNo: \"\",\n linesPerPage: 1000000,\n },\n {\n onSucess: (response) => {\n if (response.data.errcode == 0) {\n this.actionViewOption = response.data.data.datas;\n // 确认视图id是否有值\n if(this.hasRequestData){\n this.checkActionViewId()\n }\n }\n },\n }\n );\n }else{\n this.actionViewOption = []\n }\n },\n async getReportList(){\n if(this.detail.moduleid){\n let response = await getChartsList(\n {\n moduleId: this.detail.moduleid,\n searchword: \"\",\n pageNo: 1,\n linesPerPage: 1000000\n });\n if (response.data.errcode == 0) {\n this.actionReportOption = response.data.data.data;\n // 确认是否统计图id是否存在\n if(this.hasRequestData){\n this.checkActionReportId()\n }\n }\n }else{\n this.actionReportOption = []\n }\n },\n async getCustomizeReportList () {\n if(this.detail.moduleid){\n let response = await getReportsList(\n {\n moduleId: this.detail.moduleid,\n searchword: \"\",\n pageNo: \"\",\n linesPerPage: 1000000,\n });\n if (response.data.errcode == 0) {\n // 需要过滤报表的打印模板\n this.customizeReportOption = response.data.data.datas.filter(item => item.isPrint== 0);\n // 确认是否自定义报表id是否存在\n if(this.hasRequestData){\n this.checkcustomizeReportId()\n }\n }\n }else{\n this.customizeReportOption = []\n }\n },\n addParam () {\n this.queryString.push({ paramKey: \"\", paramValue: \"\" });\n },\n delParam (index) {\n this.queryString.splice(index, 1);\n },\n async getModules () {\n let currentModuleId = \"\"\n let response = await getAllmodules(this.appId, currentModuleId);\n if (response.data.errcode == 0) {\n this.moduleOption = response.data.data;\n // 确认模块di是否存在\n if(this.detail.moduleid){\n this.checkModuleId()\n }\n }\n },\n getData () {\n this.loading = true\n getMenuDetail(this.menuId, {\n onSucess: (resp) => {\n if (resp.data.errcode == 0) {\n this.hasRequestData = true // 有数据请求回来\n this.detail = resp.data.data;\n this.detail.linkType = resp.data.data.linkType ? resp.data.data.linkType : \"\";\n if (this.detail.linkType == \"00\") this.getFormList();\n else if (this.detail.linkType == \"01\") this.getViewList();\n else if (this.detail.linkType == \"02\")this.getReportList();\n else if(this.detail.linkType == \"09\") this.getCustomizeReportList()\n else this.loading = false\n \n if (this.detail.linkType == \"00\" ||this.detail.linkType == \"01\" ||this.detail.linkType == \"02\" ||this.detail.linkType == \"09\")this.actionContent = this.detail.actionContent;\n else if(this.detail.linkType == \"07\") this.actionScript = this.detail.actionContent;\n else this.actionContentOther = this.detail.actionContent;\n if ((this.detail.superior == \"\" || !this.detail.superior) &&this.type.indexOf(\"obile\") != -1)this.show = false;\n else if(this.detail.superior &&this.type.indexOf(\"obile\") != -1)this.show=true;\n if(!this.detail.linkType)this.detail.linkType=\"\";\n this.queryString = JSON.parse(this.detail.queryString);\n this.icon = JSON.parse(this.detail.ico);\n // 设置字体图标及颜色\n if(this.icon.icontype == 'img'){\n this.icon.imgUrl = this.icon.icon\n this.icon.fontUrl = \"\"\n }else{\n this.icon.fontUrl = this.icon.icon\n this.icon.imgUrl = \"\"\n this.fontStyle = 'color:' + this.icon.iconFontColor\n }\n }else{\n this.loading = false\n this.$message.error(resp.data.errmsg)\n }\n },\n });\n },\n\n /**\n * 链接类型改变清空模块的值\n */\n resetModuleId(){\n this.detail.moduleid = '';\n this.actionContent = '';\n // 清空已有的数组【防止新建时不需选择就出现内容】\n this.actionFormOption = []\n this.actionViewOption = []\n this.actionReportOption = []\n this.customizeReportOption = []\n this.$forceUpdate();\n \n },\n\n /**\n * 显示多语言弹框\n */\n showMultiLanguage() {\n this.languagesVisible = true;\n this.getMultiLanguagetions()\n },\n\n /**\n * 多语言列表\n */\n async getMultiLanguagetions() {\n let appId = sessionStorage.getItem(\"appId\");\n \n const response = await getMultiLanguageList(this.languageParams, appId);\n if (response.data.errcode == 0) {\n let list = response.data.data;\n if(list.data == null){\n list.data = []\n }\n list.data.map((item) => {\n if (item.type == 1) {\n item.language = \"English\";\n } else if (item.type == 2) {\n item.language = \"简体中文\";\n } else if (item.type == 3) {\n item.language = \"繁體中文\";\n }\n });\n this.languageData = list;\n }\n },\n\n /**\n * 删除多语言\n */\n async delMultiLanguage(arr){\n try{\n await delMsg(this.$t('msg.delConfirm'), this.$t('msg.tip'))\n const response = await deleteMultiLanguageList(arr)\n if (response.data.errcode == 0) {\n this.$message.success(this.$t('msg.remove_ss'));\n this.getMultiLanguagetions();\n }\n }catch(e){\n console.log(e)\n }\n },\n\n /**\n * 多语言参数改变时重新请求\n */\n changeLanguageParams(params){\n this.languageParams = params\n this.getMultiLanguagetions()\n },\n\n /**\n * 清空多语言的值\n */\n resetMultiLanguage(){\n this.detail.multiLanguageLabel = ''\n },\n\n /**\n * 选择多语言的值\n */\n handelMultiLanguage(row) {\n this.detail.multiLanguageLabel = row.label;\n },\n\n /**\n * 确认模块id是否存在\n */\n checkModuleId(){\n let flag = false\n this.moduleOption.some(item => {\n if(item.id === this.detail.moduleid){\n flag = true\n return\n }\n })\n if(!flag) this.detail.moduleid = ''\n },\n\n /**\n * 确认表单id是否存在\n */\n checkActionFormId(){\n let flag = false\n this.actionFormOption.some(item => {\n if(item.id === this.actionContent){\n flag = true\n return\n }\n })\n if(!flag) this.actionContent = ''\n this.loading=false;\n },\n\n /**\n * 确认视图id是否存在\n */\n checkActionViewId(){\n let flag = false\n this.actionViewOption.some(item => {\n if(item.id === this.actionContent){\n flag = true\n return\n }\n })\n if(!flag) this.actionContent = ''\n this.loading=false;\n\n },\n /**\n * 确认图表id是否存在\n */\n checkActionReportId(){\n let flag = false\n this.actionReportOption.some(item => {\n if(item.id === this.actionContent){\n flag = true\n return\n }\n })\n if(!flag) this.actionContent = ''\n this.loading=false;\n\n },\n /**\n * 确认自定义报表id是否存在\n */\n checkcustomizeReportId(){\n let flag = false\n this.customizeReportOption.some(item => {\n if(item.id === this.actionContent){\n flag = true\n return\n }\n })\n if(!flag) this.actionContent = ''\n this.loading=false;\n\n },\n\n /**\n * 显示脚本编辑器弹框\n */\n showScriptEditor () {\n this.scriptEditorVisible = true;\n },\n /**\n * 将脚本编辑器的值写入到textarea中\n */\n handleScriptEditor (val) {\n this.actionScript = val\n },\n\n /**\n * 读取和设置颜色\n */\n setColor(val) {\n this.icon.iconFontColor = val\n // 设置颜色\n this.fontStyle = 'color:' + val\n },\n },\n};\n",null]}