{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\form\\customDialog\\CustomDialogShow.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\form\\customDialog\\CustomDialogShow.vue","mtime":1675071992928},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"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//\nimport { Message } from \"element-ui\";\nimport req from \"@/request.js\";\nimport CustomDialogShowDetail from \"@/views/form/customDialog/CustomDialogShowDetail.vue\";\nexport default {\n name: \"custom-dialog-show\",\n components: {\n CustomDialogShowDetail: CustomDialogShowDetail\n },\n props: {\n title: {\n type: String,\n required: true,\n default: \"自定义对话框列表预览\"\n },\n //自定义对话框的别名\n alias: {\n type: String,\n required: true\n },\n //自定义对话框的配置\n customDialog: {\n type: Object,\n required: true\n }\n },\n data: function data() {\n return {\n customDialogPostParam: [],\n //为REST接口且请求类型是POST,条件字段是固定值的参数\n customDialogGetUrl: \"\",\n //为REST接口且请求类型是GET,条件字段是固定值的请求地址\n selectionRadio: [],\n //ht-table列表单选选择的数据\n textRadio: \"\",\n //ht-table列表数据的单选按钮\n selectable: true,\n //表示ht-table列表第一列是否显示复选框\n isShowSearch: false,\n //是否显示高级搜索\n nopagination: false,\n //是否隐藏分页组件,false:显示,true:隐藏\n dialogVisible: false,\n //是否显示对话框\n tableData: [],\n //ht-table列表数据\n pageResult: {\n page: 1,\n pageSize: 20,\n total: 0\n }\n };\n },\n methods: {\n //显示对话框\n showDialog: function showDialog() {\n this.customDialogPostParam = []; //清空为REST接口且请求类型是POST,条件字段是固定值的参数\n\n this.customDialogGetUrl = \"\"; //清空为REST接口且请求类型是GET,条件字段是固定值的请求地址\n\n this.selectionRadio = []; //清空ht-table列表单选选择的数据\n\n this.textRadio = \"\"; //清空ht-table列表数据单选按钮的选中状态\n\n this.isShowSearch = false; //不显示高级搜索\n\n this.dialogVisible = true; // setTimeout(() => {\n // this.$refs.customDialogShowDetail.initData();\n // });\n },\n //点击列表某一条数据时触发\n orgRowClick: function orgRowClick(row) {\n this.selectionRadio = [row];\n },\n //确定对话框\n handleSave: function handleSave() {\n var elTable = this.$refs.customDialogShowDetail.$refs.htTable;\n\n if (elTable && elTable.$refs.htTable) {\n elTable = elTable.$refs.htTable;\n } //多选\n\n\n if (elTable && elTable.selection && elTable.selection.length == 0 && this.customDialog.selectNum === -1) {\n Message.error(\"请至少选择一条数据\");\n return;\n } //单选\n\n\n if (this.selectionRadio == 0 && this.customDialog.selectNum === 1) {\n Message.error(\"请至少选择一条数据\");\n return;\n } //拿到配置的返回字段\n\n\n var returnStr = this.customDialog.resultfield; //返回字段的字段名有多少个\n\n var field = new Array([returnStr.length]); //返回字段的返回名称有多少个\n\n var comment = new Array([returnStr.length]);\n var str = [];\n\n for (var i = 0; i < returnStr.length; i++) {\n //得到返回字段的字段名\n field[i] = this.customDialog.dsType == \"dataSource\" ? returnStr[i].field : returnStr[i].field; //得到返回字段的返回名称\n\n comment[i] = this.customDialog.dsType == \"dataSource\" ? returnStr[i].comment : returnStr[i].comment;\n }\n\n var s = []; //获取选择的数据集合\n\n if (this.customDialog.selectNum === 1) {\n s = this.selectionRadio;\n } else {\n s = elTable.selection;\n }\n\n this.$emit(\"return-all-data\", s); //是否单选 1:单选;-1:多选\n\n if (this.customDialog.selectNum === 1) {\n var _temp = \"\";\n\n for (var _i = 0; _i < comment.length; _i++) {\n _temp += '\"' + comment[_i] + '\":\"' + s[0][field[_i]] + '\",';\n } //去除字符串最后一个字符逗号\n\n\n if (_temp != \"\") {\n _temp = \"{\" + _temp.substring(0, _temp.length - 1) + \"}\";\n }\n\n str.push(JSON.parse(_temp));\n } else {\n for (var _i2 = 0; _i2 < s.length; _i2++) {\n var temp = \"\";\n\n for (var j = 0; j < comment.length; j++) {\n temp += '\"' + comment[j] + '\":\"' + s[_i2][field[j]] + '\",';\n } //去除字符串最后一个字符逗号\n\n\n if (temp != \"\") {\n temp = \"{\" + temp.substring(0, temp.length - 1) + \"}\";\n }\n\n str.push(JSON.parse(temp));\n }\n } //发布确认事件,并返回选中的数据\n\n\n this.$emit(\"handle-save\", str);\n this.dialogVisible = false;\n },\n //关闭对话框\n handleClose: function handleClose() {\n this.dialogVisible = false;\n }\n }\n};",null]}