{"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/ViewOperation.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/ViewOperation.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\nimport { getLogoPrefixUrl } from '@/service/CommontoolsAPI.js'\nimport ViewOperationDialog from \"@/components/modulesDetail/ViewOperationDialog\";\nimport {\n getViewActivitys,\n delActivitysView,\n updateActivityOrder,\n} from '@/service/ViewApi.js'\nimport {delMsg} from '@/utils/elementui'\nexport default {\n name: 'ViewOperation',\n data() {\n return {\n tableHeight:\n document.documentElement.clientHeight - 60 - 32 - 41 - 50 - 32 - 48, //60 头部, 32 面包屑, 41 第一层页签, 48操作列操作栏, 50 第二层页签, 20 下方按钮\n activiteTableData: [], //操作列表\n dialogOperationVisible: false, //操作弹出层\n dialogOperationTiTle: '', // 操作弹出层标题\n \n currentActFormRow: \"\", //当前操作行的id\n actForm: {\n //操作表单\n name: '', //名称\n label: '', //标签\n multiLanguageLabel: '', //多语言标签\n type: '', //动作\n icontype: '', // 图标类型\n iconUrl: '', // 图片地址\n fontUrl: '', // 字体图标地址\n colorType: 'default', //颜色类型\n impmappingconfigid: '', // 导入映射\n showInToolbar: true, // 在工具栏中显示\n contextMenu: true, // 右键菜单操作\n onActionForm: '', // 作用表单\n onActionView: '', // 作用视图\n fileNameScript: '', // 文件执行脚本\n dispatcherUrl: '', // 地址脚本\n dispatcherParams: [\n // 参数\n {\n paramKey: '',\n paramValue: '',\n },\n ],\n\n jumpActOpenType: '0', //打开方式\n beforeActionScript: '', //动作执行前脚本\n afterActionScript: '', //动作执行后脚本\n readonlyScript: '', //只读条件\n hiddenScript: '', //隐藏条件\n expSub: false, // 是否导出子表数据\n orderno: 0, // 排序\n },\n\n }\n },\n props:{\n viewId: String,\n moduleId: String\n },\n components:{\n ViewOperationDialog\n },\n methods: {\n /**\n * 点击操作获取详情\n */\n actDataClick(row) {\n // console.log(row);\n let actForm = {\n ...this.actForm,\n name: row.name, //名称\n label: row.label ? row.label : '', //标签\n multiLanguageLabel: row.multiLanguageLabel\n ? row.multiLanguageLabel\n : '', //多语言标签\n type: row.type + '', //动作\n icon: row.icon ? row.icon : '', // 图标类型和图标合并【需要解析】\n icontype: row.icon ? JSON.parse(row.icon).type : '', // 图标类型\n iconUrl:\n row.icon && JSON.parse(row.icon).type === 'img'\n ? this.getUrl(JSON.parse(row.icon).icon)\n : '', // 图片地址\n fontUrl:\n row.icon && JSON.parse(row.icon).type === 'font'\n ? JSON.parse(row.icon).icon\n : '', // 字体图标地址\n colorType: row.colorType ? row.colorType : 'default', //颜色类型\n impmappingconfigid: row.impmappingconfigid\n ? row.impmappingconfigid\n : '', // 导入映射\n showInToolbar: row.showInToolbar, // 在工具栏中显示\n contextMenu: row.contextMenu, // 右键菜单操作\n onActionForm: row.onActionForm ? row.onActionForm : '', // 作用表单\n onActionView: row.onActionView ? row.onActionView : '', // 作用视图\n fileNameScript: row.fileNameScript ? row.fileNameScript : '', // 文件执行脚本\n dispatcherUrl: row.dispatcherUrl ? row.dispatcherUrl : '', // 地址脚本\n dispatcherParams: row.dispatcherParams\n ? eval(row.dispatcherParams)\n : [{ paramKey: '', paramValue: '' }], // 参数【需要解析】\n jumpActOpenType: row.jumpActOpenType + '', //打开方式\n beforeActionScript: row.beforeActionScript\n ? row.beforeActionScript\n : '', //动作执行前脚本\n afterActionScript: row.afterActionScript ? row.afterActionScript : '', //动作执行后脚本\n readonlyScript: row.readonlyScript ? row.readonlyScript : '', //只读条件\n hiddenScript: row.hiddenScript ? row.hiddenScript : '', //隐藏条件\n expSub: row.expSub, // 是否导出子表数据\n orderno: row.orderno, // 排序\n }\n // console.log(actForm);\n this.currentActFormRow = row\n this.actForm = actForm\n this.dialogOperationVisible = true\n this.dialogOperationTiTle = this.$t('form.edit')\n if (row.type == 27) {\n this.$nextTick(() => this.$refs.viewOperate.getImportMap())\n }\n },\n /**\n * 操作新建\n */\n createAct() {\n let actForm = {\n ...this.actForm,\n name: '', //名称\n label: '', //标签\n multiLanguageLabel: '', //多语言标签\n type: '', //动作\n icon: '', // 图标类型和图标合并的值\n icontype: '', // 图标类型【img:图片,font图标】\n iconUrl: '', // 图片地址\n fontUrl: '', // 字体图标地址\n colorType: 'default', //颜色类型\n impmappingconfigid: '', // 导入映射\n showInToolbar: true, // 在工具栏中显示\n contextMenu: true, // 右键菜单操作\n onActionForm: '', // 作用表单\n onActionView: '', // 作用视图\n fileNameScript: '', // 文件执行脚本\n dispatcherUrl: '', // 地址脚本\n dispatcherParams: [{ paramKey: '', paramValue: '' }], // 参数\n jumpActOpenType: '0', //打开方式\n beforeActionScript: '', //动作执行前脚本\n afterActionScript: '', //动作执行后脚本\n readonlyScript: '', //只读条件\n hiddenScript: '', //隐藏条件\n expSub: false, // 是否导出子表数据\n orderno: this.activiteTableData.length, // 排序\n }\n this.actForm = actForm\n this.dialogOperationVisible = true\n this.dialogOperationTiTle = this.$t('view.new')\n },\n /**\n *关闭弹窗重置actform\n */\n resetActFormData(val) {\n this.actForm = val;\n this.currentActFormRow = \"\";\n },\n /**\n * 上传图标的文件夹地址\n */\n getUrl(url) {\n return getLogoPrefixUrl(url)\n },\n /**\n * 删除操作的数据\n */\n async deleteActList(val) {\n if (val) {\n try{\n await delMsg(this.$t('msg.delConfirm'), this.$t('msg.tip'))\n const response = await delActivitysView([val])\n if (response.data.errcode == 0) {\n this.$message.success(this.$t('msg.del_ss'))\n this.getViewActivitys()\n }\n }catch(e){\n console.log(e)\n }\n }\n },\n /**\n * 上移\n */\n actMoveUp(index) {\n var that = this\n // 保存下一条数据\n let upDate = that.activiteTableData[index - 1]\n // 删除下一条数据\n that.activiteTableData.splice(index - 1, 1)\n // 增添被删除的那一条数据\n that.activiteTableData.splice(index, 0, upDate)\n\n this.changeActivityOrder(\n that.activiteTableData[index - 1].id,\n that.activiteTableData[index].id\n )\n },\n /**\n * 下移\n */\n actMoveDown(index) {\n var that = this\n // 保存下一条数据\n let downDate = that.activiteTableData[index + 1]\n // 删除下一条数据\n that.activiteTableData.splice(index + 1, 1)\n // 增添被删除的那一条数据\n that.activiteTableData.splice(index, 0, downDate)\n this.changeActivityOrder(\n this.activiteTableData[index].id,\n this.activiteTableData[index + 1].id\n )\n },\n /**\n * 操作排序\n */\n changeActivityOrder(oId, nId) {\n updateActivityOrder(oId, nId, {\n onSucess: (response) => {\n if (response.data.errcode == 0) {\n this.$message.success(response.data.data)\n }\n },\n })\n },\n\n /**\n * 视图操作列表\n */\n getViewActivitys() {\n getViewActivitys(this.viewId, {\n onSucess: (response) => {\n if (response.data.errcode == 0) {\n let data = response.data.data ? response.data.data : [];\n for (let i = 0; i < data.length; i++) {\n if (data[i].type == \"2\") {\n data[i].actName = this.$t('view.create');\n } else if (data[i].type == \"3\") {\n data[i].actName = this.$t('view.del');\n } else if (data[i].type == \"34\") {\n data[i].actName = this.$t('form.save');\n } else if (data[i].type == \"18\") {\n data[i].actName = this.$t('view.clean_all');\n } else if (data[i].type == \"1\") {\n data[i].actName = this.$t('view.loding_view');\n } else if (data[i].type == \"20\") {\n data[i].actName = this.$t('view.most_submit');\n } else if (data[i].type == \"29\") {\n data[i].actName = this.$t('view.most_signature');\n } else if (data[i].type == \"16\") {\n data[i].actName = this.$t('view.out_excel');\n } else if (data[i].type == \"27\") {\n data[i].actName = this.$t('view.in_excel');\n } else if (data[i].type == \"26\") {\n data[i].actName = this.$t('view.file_download');\n } else if (data[i].type == \"36\") {\n data[i].actName =this.$t('view.print');\n } else if (data[i].type == \"43\") {\n data[i].actName = this.$t('view.jump');\n }\n }\n this.activiteTableData = data;\n }\n },\n });\n },\n },\n mounted(){\n if (this.viewId) {\n this.getViewActivitys();\n }\n },\n computed: {\n /**\n * 计算视图操作高度\n */\n operateTableHeight() {\n if ((this.activiteTableData.length + 1) * 53 > this.tableHeight) {\n return this.tableHeight\n } else {\n return (this.activiteTableData.length + 1) * 53\n }\n },\n },\n}\n",null]}