olp-table 7.2.57 → 7.2.58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -278,7 +278,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
278
278
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
279
279
 
280
280
  "use strict";
281
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var element_plus_dist_index_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! element-plus/dist/index.css */ \"./node_modules/element-plus/dist/index.css\");\n/* harmony import */ var element_plus_dist_index_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(element_plus_dist_index_css__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _smallwei_avue_lib_index_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @smallwei/avue/lib/index.css */ \"./node_modules/@smallwei/avue/lib/index.css\");\n/* harmony import */ var _smallwei_avue_lib_index_css__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_smallwei_avue_lib_index_css__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var vxe_table_lib_style_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vxe-table/lib/style.css */ \"./node_modules/vxe-table/lib/style.css\");\n/* harmony import */ var vxe_table_lib_style_css__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(vxe_table_lib_style_css__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _components_auto_height_index_vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/components/auto-height/index.vue */ \"./src/components/auto-height/index.vue\");\n/* harmony import */ var _components_tree_index_vue__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/components/tree/index.vue */ \"./src/components/tree/index.vue\");\n/* harmony import */ var _utils_http_httpUtil__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/utils/http/httpUtil */ \"./src/utils/http/httpUtil.js\");\n/* harmony import */ var _components_table_model_model_index_vue__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/components/table/model/model-index.vue */ \"./src/components/table/model/model-index.vue\");\n/* harmony import */ var _store_dict__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/store/dict */ \"./src/store/dict.js\");\n/* harmony import */ var _store_dictType__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/store/dictType */ \"./src/store/dictType.js\");\n/* harmony import */ var _components_ol_dialog_upload_file_vue__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/components/ol-dialog-upload-file.vue */ \"./src/components/ol-dialog-upload-file.vue\");\n/* harmony import */ var _utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/utils/http/httpUtils */ \"./src/utils/http/httpUtils.js\");\n/* harmony import */ var _components_ol_table_select_vue__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @/components/ol-table-select.vue */ \"./src/components/ol-table-select.vue\");\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst dict = (0,_store_dict__WEBPACK_IMPORTED_MODULE_7__.storeDict)();\nconst dictType = (0,_store_dictType__WEBPACK_IMPORTED_MODULE_8__.storeDictType)();\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'olTable',\n components: {\n OlTableSelect: _components_ol_table_select_vue__WEBPACK_IMPORTED_MODULE_11__[\"default\"],\n OlDialogUploadFile: _components_ol_dialog_upload_file_vue__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n ModelIndex: _components_table_model_model_index_vue__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n OlTree: _components_tree_index_vue__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n AutoHeight: _components_auto_height_index_vue__WEBPACK_IMPORTED_MODULE_3__[\"default\"]\n },\n provide() {\n return {\n http: _utils_http_httpUtil__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n tableAll: this.table\n };\n },\n data() {\n return {\n uuid: '2011748778528022528',\n treeUuid: '1815551679408418816',\n table: {},\n http: _utils_http_httpUtil__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n formConfig: undefined\n };\n },\n methods: {\n nodeClick(e) {\n console.log(e);\n this.uuid = undefined;\n this.$nextTick(() => {\n this.uuid = e.uuid;\n });\n },\n initOk({\n theme,\n table,\n customerForm\n }) {\n if (theme == 't1') {\n this.formConfig = table.formConfig; //给原有的自定义搜索\n //customerForm();//执行自定义表单,这个方法会隐藏table的表单,隐藏搜索按钮\n }\n console.log(this.formConfig);\n },\n //主子表更新或者保存\n testSave() {\n let params = {\n dbName: 'online',\n //数据库名称\n tableName: 'sys_dict_type',\n //主表名称\n mianColumnAndValueMap: {\n id: '1231564546',\n name: '韦邦杠',\n sex: ''\n },\n //保存主表的数据{表字段:value}\n //mainGenIdMap:{id: 'uuid'} //主表要自动生成的唯一字段 如果没有 可以忽略\n mainTableKey: ['code'],\n //主表的唯一字段\n subTables: [{\n subTableName: 'sys_dict_data',\n //子表名称\n subColumnAndValueList: [{\n dict_code: 'test_code_2',\n dict_value: '1',\n dict_label: 'label'\n }],\n //子表子主表的数据\n subGenIdMap: {\n id: 'uuid'\n },\n //子表要自动生成的唯一字段 如果没有 可以忽略\n subTableKey: ['id'],\n //子表的唯一字段\n subForeignKey: {\n 'code': 'dict_type'\n },\n //表的关联key,这里框架自动复制 {主表字段,子表的字段}\n subDeleteMapWhere: {}\n }]\n };\n (0,_utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_10__.postAes)(this.http, \"/online/crudAes/saveMainAndSubs\", params);\n },\n //主子表删除\n testDelete() {\n let params = {\n dbName: 'online',\n //数据库名称\n tableName: 'sys_dict_type',\n //主表名称\n subTableName: 'sys_dict_data',\n //子表名称\n whereMap: {\n id: 'test_code'\n },\n //主表删除条件\n subForeignKey: {\n 'id': 'parent_id'\n } ////表的关联key,{主表字段,子表的字段}\n };\n (0,_utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_10__.postAes)(this.http, \"/online/crudAes/deleteMainAndSubs\", params);\n },\n //单表更新\n updateOne() {\n let params = {\n dbName: 'online',\n //数据库名称\n tableName: 'sys_dict_type',\n //主表名称\n columnAndValueMap: {\n code: 'test_code',\n sex: 'xxx'\n },\n //更新字段\n whereMap: {\n code: 'test_code'\n } //更新条件\n };\n (0,_utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_10__.postAes)(this.http, \"/online/crudAes/modify\", params);\n },\n //单表批量更新\n updateBatch() {\n let params = {\n dbName: 'online',\n //数据库名称\n tableName: 'sys_dict_type',\n //主表名称\n list: [{\n columnAndValueMap: {\n code: 'test_code'\n },\n //更新字段\n whereMap: {\n code: 'test_code'\n }\n } //更新条件}\n ]\n };\n (0,_utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_10__.postAes)(this.http, \"/online/crudAes/batchModify\", params);\n }\n },\n created() {\n dict.refresh();\n dictType.refresh();\n window.$onlineHttps = _utils_http_httpUtil__WEBPACK_IMPORTED_MODULE_5__[\"default\"];\n //this.testDelete();\n //this.nodeClick({uuid:'1787452516924563456'})\n //window.olpTableAxiosBaseURL = \"http://localhost:48090/\"\n }\n});\n\n//# sourceURL=webpack://olp-table/./src/App.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/vue-loader/dist/index.js??ruleSet%5B0%5D.use%5B0%5D");
281
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var element_plus_dist_index_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! element-plus/dist/index.css */ \"./node_modules/element-plus/dist/index.css\");\n/* harmony import */ var element_plus_dist_index_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(element_plus_dist_index_css__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _smallwei_avue_lib_index_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @smallwei/avue/lib/index.css */ \"./node_modules/@smallwei/avue/lib/index.css\");\n/* harmony import */ var _smallwei_avue_lib_index_css__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_smallwei_avue_lib_index_css__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var vxe_table_lib_style_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vxe-table/lib/style.css */ \"./node_modules/vxe-table/lib/style.css\");\n/* harmony import */ var vxe_table_lib_style_css__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(vxe_table_lib_style_css__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _components_auto_height_index_vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/components/auto-height/index.vue */ \"./src/components/auto-height/index.vue\");\n/* harmony import */ var _components_tree_index_vue__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/components/tree/index.vue */ \"./src/components/tree/index.vue\");\n/* harmony import */ var _utils_http_httpUtil__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/utils/http/httpUtil */ \"./src/utils/http/httpUtil.js\");\n/* harmony import */ var _components_table_model_model_index_vue__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/components/table/model/model-index.vue */ \"./src/components/table/model/model-index.vue\");\n/* harmony import */ var _store_dict__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/store/dict */ \"./src/store/dict.js\");\n/* harmony import */ var _store_dictType__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/store/dictType */ \"./src/store/dictType.js\");\n/* harmony import */ var _components_ol_dialog_upload_file_vue__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/components/ol-dialog-upload-file.vue */ \"./src/components/ol-dialog-upload-file.vue\");\n/* harmony import */ var _utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/utils/http/httpUtils */ \"./src/utils/http/httpUtils.js\");\n/* harmony import */ var _components_ol_table_select_vue__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @/components/ol-table-select.vue */ \"./src/components/ol-table-select.vue\");\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst dict = (0,_store_dict__WEBPACK_IMPORTED_MODULE_7__.storeDict)();\nconst dictType = (0,_store_dictType__WEBPACK_IMPORTED_MODULE_8__.storeDictType)();\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'olTable',\n components: {\n OlTableSelect: _components_ol_table_select_vue__WEBPACK_IMPORTED_MODULE_11__[\"default\"],\n OlDialogUploadFile: _components_ol_dialog_upload_file_vue__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n ModelIndex: _components_table_model_model_index_vue__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n OlTree: _components_tree_index_vue__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n AutoHeight: _components_auto_height_index_vue__WEBPACK_IMPORTED_MODULE_3__[\"default\"]\n },\n provide() {\n return {\n http: _utils_http_httpUtil__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n tableAll: this.table\n };\n },\n data() {\n return {\n uuid: '1787452516924563456',\n treeUuid: '1815551679408418816',\n table: {},\n http: _utils_http_httpUtil__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n formConfig: undefined\n };\n },\n methods: {\n nodeClick(e) {\n console.log(e);\n this.uuid = undefined;\n this.$nextTick(() => {\n this.uuid = e.uuid;\n });\n },\n initOk({\n theme,\n table,\n customerForm\n }) {\n if (theme == 't1') {\n this.formConfig = table.formConfig; //给原有的自定义搜索\n //customerForm();//执行自定义表单,这个方法会隐藏table的表单,隐藏搜索按钮\n }\n console.log(this.formConfig);\n },\n //主子表更新或者保存\n testSave() {\n let params = {\n dbName: 'online',\n //数据库名称\n tableName: 'sys_dict_type',\n //主表名称\n mianColumnAndValueMap: {\n id: '1231564546',\n name: '韦邦杠',\n sex: ''\n },\n //保存主表的数据{表字段:value}\n //mainGenIdMap:{id: 'uuid'} //主表要自动生成的唯一字段 如果没有 可以忽略\n mainTableKey: ['code'],\n //主表的唯一字段\n subTables: [{\n subTableName: 'sys_dict_data',\n //子表名称\n subColumnAndValueList: [{\n dict_code: 'test_code_2',\n dict_value: '1',\n dict_label: 'label'\n }],\n //子表子主表的数据\n subGenIdMap: {\n id: 'uuid'\n },\n //子表要自动生成的唯一字段 如果没有 可以忽略\n subTableKey: ['id'],\n //子表的唯一字段\n subForeignKey: {\n 'code': 'dict_type'\n },\n //表的关联key,这里框架自动复制 {主表字段,子表的字段}\n subDeleteMapWhere: {}\n }]\n };\n (0,_utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_10__.postAes)(this.http, \"/online/crudAes/saveMainAndSubs\", params);\n },\n //主子表删除\n testDelete() {\n let params = {\n dbName: 'online',\n //数据库名称\n tableName: 'sys_dict_type',\n //主表名称\n subTableName: 'sys_dict_data',\n //子表名称\n whereMap: {\n id: 'test_code'\n },\n //主表删除条件\n subForeignKey: {\n 'id': 'parent_id'\n } ////表的关联key,{主表字段,子表的字段}\n };\n (0,_utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_10__.postAes)(this.http, \"/online/crudAes/deleteMainAndSubs\", params);\n },\n //单表更新\n updateOne() {\n let params = {\n dbName: 'online',\n //数据库名称\n tableName: 'sys_dict_type',\n //主表名称\n columnAndValueMap: {\n code: 'test_code',\n sex: 'xxx'\n },\n //更新字段\n whereMap: {\n code: 'test_code'\n } //更新条件\n };\n (0,_utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_10__.postAes)(this.http, \"/online/crudAes/modify\", params);\n },\n //单表批量更新\n updateBatch() {\n let params = {\n dbName: 'online',\n //数据库名称\n tableName: 'sys_dict_type',\n //主表名称\n list: [{\n columnAndValueMap: {\n code: 'test_code'\n },\n //更新字段\n whereMap: {\n code: 'test_code'\n }\n } //更新条件}\n ]\n };\n (0,_utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_10__.postAes)(this.http, \"/online/crudAes/batchModify\", params);\n }\n },\n created() {\n dict.refresh();\n dictType.refresh();\n window.$onlineHttps = _utils_http_httpUtil__WEBPACK_IMPORTED_MODULE_5__[\"default\"];\n //this.testDelete();\n //this.nodeClick({uuid:'1787452516924563456'})\n //window.olpTableAxiosBaseURL = \"http://localhost:48090/\"\n }\n});\n\n//# sourceURL=webpack://olp-table/./src/App.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/vue-loader/dist/index.js??ruleSet%5B0%5D.use%5B0%5D");
282
282
 
283
283
  /***/ }),
284
284
 
@@ -1774,7 +1774,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
1774
1774
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1775
1775
 
1776
1776
  "use strict";
1777
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ render: function() { return /* binding */ render; }\n/* harmony export */ });\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.iterator.constructor.js */ \"./node_modules/core-js/modules/es.iterator.constructor.js\");\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_iterator_filter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.iterator.filter.js */ \"./node_modules/core-js/modules/es.iterator.filter.js\");\n/* harmony import */ var core_js_modules_es_iterator_filter_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_filter_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vue */ \"vue\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_2__);\n\n\n\nconst _hoisted_1 = [\"onClick\"];\nconst _hoisted_2 = {\n class: \"video-preview\"\n};\nconst _hoisted_3 = [\"src\", \"height\"];\nconst _hoisted_4 = {\n key: 1\n};\nconst _hoisted_5 = {\n key: 0,\n class: \"title\"\n};\nconst _hoisted_6 = {\n key: 1,\n style: {\n \"margin\": \"0px 15px -30px 0px\"\n }\n};\nconst _hoisted_7 = {\n key: 0,\n class: \"vxe-icon-fullscreen\",\n title: \"全屏\"\n};\nconst _hoisted_8 = {\n key: 1,\n class: \"vxe-icon-minimize\",\n title: \"取消全屏\"\n};\nconst _hoisted_9 = {\n class: \"video-dialog-container\"\n};\nconst _hoisted_10 = [\"src\"];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_olSelectDom = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"olSelectDom\");\n const _component_el_image = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"el-image\");\n const _component_vxe_checkbox = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"vxe-checkbox\");\n const _component_Icon = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"Icon\");\n const _component_el_link = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"el-link\");\n const _component_ol_table_tool_btn = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"ol-table-tool-btn\");\n const _component_el_button = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"el-button\");\n const _component_olTableOperate = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"olTableOperate\");\n const _component_ol_table_column_dict_color = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"ol-table-column-dict-color\");\n const _component_olPager = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"olPager\");\n const _component_vxe_grid = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"vxe-grid\");\n const _component_ol_table_column_config = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"ol-table-column-config\");\n const _component_olForm = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"olForm\");\n const _component_OlMainFormSubTable = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"OlMainFormSubTable\");\n const _component_el_dialog = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"el-dialog\");\n const _component_ol_dialog_table = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"ol-dialog-table\");\n return (0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_2__.Fragment, null, [_ctx.table.formConfig.show ? (0,vue__WEBPACK_IMPORTED_MODULE_2__.renderSlot)(_ctx.$slots, $options.getSlotName('search'), {\n key: 0\n }, undefined, true) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_vxe_grid, (0,vue__WEBPACK_IMPORTED_MODULE_2__.mergeProps)(_ctx.table, {\n class: \"ol-table\",\n \"footer-method\": _ctx.footerMethod,\n onCheckboxChange: _ctx.selectRowChange,\n onRadioChange: _ctx.selectRowChange\n }, (0,vue__WEBPACK_IMPORTED_MODULE_2__.toHandlers)(_ctx.events), {\n onCheckboxAll: _ctx.selectRowChange\n }), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createSlots)({\n img_default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(({\n row,\n column\n }) => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_el_image, {\n style: {\n \"height\": \"60px\",\n \"width\": \"60px\"\n },\n src: row[$options.getFiledName(column)],\n \"preview-src-list\": [row[$options.getFiledName(column)]],\n \"list-type\": \"picture-card\",\n class: \"w-full h-auto rounded-md\"\n }, null, 8 /* PROPS */, [\"src\", \"preview-src-list\"])]),\n checkbox_default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(({\n column,\n row\n }) => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_vxe_checkbox, {\n modelValue: row[column.field],\n \"onUpdate:modelValue\": $event => row[column.field] = $event,\n checkedValue: 1,\n uncheckedValue: 0\n }, null, 8 /* PROPS */, [\"modelValue\", \"onUpdate:modelValue\"]), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\" <el-checkbox v-model=\\\"row[column.field]\\\"\"), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\" true-value=\\\"1\\\"\"), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\" false-value=\\\"0\\\">{{ row[column.field] }}\"), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\" </el-checkbox>\")]),\n video_default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(({\n row,\n column\n }) => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementVNode)(\"div\", {\n onClick: $event => $options.openVideoDialog(row[$options.getFiledName(column)]),\n style: {\n \"cursor\": \"pointer\"\n },\n class: \"video-thumbnail-container\"\n }, [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementVNode)(\"div\", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementVNode)(\"video\", {\n ref: \"videoPreview\",\n src: row[$options.getFiledName(column)],\n preload: \"metadata\",\n width: \"100%\",\n height: (this.table.rowConfig?.height ?? 180) - 20,\n muted: \"\",\n class: \"video-preview-element\"\n }, null, 8 /* PROPS */, _hoisted_3), _cache[6] || (_cache[6] = (0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementVNode)(\"div\", {\n class: \"video-overlay\"\n }, [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementVNode)(\"i\", {\n class: \"el-icon-video-play\"\n })], -1 /* CACHED */))])], 8 /* PROPS */, _hoisted_1)]),\n icon_default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(({\n row,\n column\n }) => [row[$options.getFiledName(column)]?.includes(':') ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_Icon, {\n key: 0,\n icon: row[$options.getFiledName(column)]\n }, null, 8 /* PROPS */, [\"icon\"])) : ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementBlock)(\"i\", {\n key: 1,\n class: (0,vue__WEBPACK_IMPORTED_MODULE_2__.normalizeClass)(row[$options.getFiledName(column)])\n }, null, 2 /* CLASS */)), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_2__.toDisplayString)(row[column[$options.getFiledName(column)]]), 1 /* TEXT */)]),\n selectTable_default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(({\n row,\n column\n }) => [$options.isOpenSelectTable(column) ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_el_link, {\n key: 0,\n type: \"primary\",\n onClick: $event => $options.openSelectTable(column, row)\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_2__.toDisplayString)($options.getSelectTableValue(column, row, true)), 1 /* TEXT */)]),\n _: 2 /* DYNAMIC */\n }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"onClick\"])) : ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementBlock)(\"span\", _hoisted_4, (0,vue__WEBPACK_IMPORTED_MODULE_2__.toDisplayString)($options.getSelectTableValue(column, row, false)), 1 /* TEXT */))]),\n header_left: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => [_ctx.table['table-title'] ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementBlock)(\"span\", _hoisted_5, (0,vue__WEBPACK_IMPORTED_MODULE_2__.toDisplayString)(_ctx.table['table-title']), 1 /* TEXT */)) : ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementBlock)(\"span\", _hoisted_6)), (0,vue__WEBPACK_IMPORTED_MODULE_2__.renderSlot)(_ctx.$slots, $options.getSlotName('headerLeftLeft'), {}, undefined, true), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_ol_table_tool_btn, {\n size: _ctx.elSize,\n loading: _ctx.loading,\n value: _ctx.toolBtn.filter(o => o.alignMode == 'left'),\n currentPermi: $data.uuid + ':' + $props.theme + ':',\n onToolbarBtnClick: _cache[0] || (_cache[0] = $event => _ctx.toolbarBtnClick($event))\n }, null, 8 /* PROPS */, [\"size\", \"loading\", \"value\", \"currentPermi\"]), (0,vue__WEBPACK_IMPORTED_MODULE_2__.renderSlot)(_ctx.$slots, $options.getSlotName('headerLeftRight'), {}, undefined, true)]),\n header_right: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.renderSlot)(_ctx.$slots, $options.getSlotName('headerRightLeft'), {}, undefined, true), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_ol_table_tool_btn, {\n size: _ctx.elSize,\n loading: _ctx.loading,\n value: _ctx.toolBtn.filter(o => o.alignMode == 'right' && ['olp_fullscreen', 'olp_refresh', 'olp_setting', 'olp_search'].indexOf(o.code) == -1),\n currentPermi: $data.uuid + ':' + $props.theme + ':',\n onToolbarBtnClick: _cache[2] || (_cache[2] = $event => _ctx.toolbarBtnClick($event))\n }, {\n right: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => [$options.showToolName('olp_fullscreen') ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_el_button, {\n key: 0,\n size: _ctx.elSize,\n onClick: _ctx.zoomEvent,\n circle: \"\"\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => [!_ctx.isMaximized ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementBlock)(\"i\", _hoisted_7)) : ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementBlock)(\"i\", _hoisted_8))]),\n _: 1 /* STABLE */\n }, 8 /* PROPS */, [\"size\", \"onClick\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true), $options.showToolName('olp_refresh') ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_el_button, {\n key: 1,\n size: _ctx.elSize,\n onClick: _ctx.query,\n title: \"刷新\",\n circle: \"\"\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => _cache[7] || (_cache[7] = [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementVNode)(\"i\", {\n class: \"vxe-icon-refresh\"\n }, null, -1 /* CACHED */)])),\n _: 1 /* STABLE */,\n __: [7]\n }, 8 /* PROPS */, [\"size\", \"onClick\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true), $options.showToolName('olp_setting') ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_el_button, {\n key: 2,\n size: _ctx.elSize,\n title: \"设置\",\n onClick: _cache[1] || (_cache[1] = $event => _ctx.$refs.olTableColumnConfig.open(_ctx.tableConfig, _ctx.tableConfig.uuid, _ctx.table.columns)),\n circle: \"\"\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => _cache[8] || (_cache[8] = [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementVNode)(\"i\", {\n class: \"vxe-icon-setting-fill\"\n }, null, -1 /* CACHED */)])),\n _: 1 /* STABLE */,\n __: [8]\n }, 8 /* PROPS */, [\"size\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true), $options.showToolName('olp_search') ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_el_button, {\n key: 3,\n size: _ctx.elSize,\n title: \"搜索\",\n onClick: _ctx.toggleFormDisplay,\n circle: \"\"\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => _cache[9] || (_cache[9] = [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementVNode)(\"i\", {\n class: \"vxe-icon-search\"\n }, null, -1 /* CACHED */)])),\n _: 1 /* STABLE */,\n __: [9]\n }, 8 /* PROPS */, [\"size\", \"onClick\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true)]),\n _: 1 /* STABLE */\n }, 8 /* PROPS */, [\"size\", \"loading\", \"value\", \"currentPermi\"]), (0,vue__WEBPACK_IMPORTED_MODULE_2__.renderSlot)(_ctx.$slots, $options.getSlotName('headerRightRight'), {}, undefined, true)]),\n operate: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(({\n row\n }) => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.renderSlot)(_ctx.$slots, $options.getSlotName('operateLeft'), {}, undefined, true), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_olTableOperate, {\n size: _ctx.elSize,\n row: row,\n value: _ctx.operationBtn,\n onHandleOperationClick: _cache[3] || (_cache[3] = $event => _ctx.handleOperationClick($event))\n }, null, 8 /* PROPS */, [\"size\", \"row\", \"value\"]), (0,vue__WEBPACK_IMPORTED_MODULE_2__.renderSlot)(_ctx.$slots, $options.getSlotName('operateRight'), {}, undefined, true)]),\n _: 2 /* DYNAMIC */\n }, [(0,vue__WEBPACK_IMPORTED_MODULE_2__.renderList)(_ctx.table.formConfig.items.filter(item => item.slotsName != undefined), item => {\n return {\n name: item.slotsName,\n fn: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_olSelectDom, {\n item: item,\n modelValue: _ctx.table.formConfig.data[item.key],\n \"onUpdate:modelValue\": $event => _ctx.table.formConfig.data[item.key] = $event,\n size: _ctx.elSize\n }, null, 8 /* PROPS */, [\"item\", \"modelValue\", \"onUpdate:modelValue\", \"size\"])])\n };\n }), _ctx.pagination.enabled && _ctx.table.columns.length != 0 ? {\n name: \"pager\",\n fn: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_olPager, (0,vue__WEBPACK_IMPORTED_MODULE_2__.mergeProps)(_ctx.pagination, {\n onPageChange: _ctx.handlePageChange,\n onClearSelected: _ctx.clearSelected\n }), {\n left: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_ol_table_column_dict_color, {\n columns: _ctx.table.columns\n }, null, 8 /* PROPS */, [\"columns\"]), (0,vue__WEBPACK_IMPORTED_MODULE_2__.renderSlot)(_ctx.$slots, $options.getSlotName('pageLeft'), {}, undefined, true)]),\n right: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.renderSlot)(_ctx.$slots, $options.getSlotName('pageRight'), {}, undefined, true)]),\n _: 3 /* FORWARDED */\n }, 16 /* FULL_PROPS */, [\"onPageChange\", \"onClearSelected\"])]),\n key: \"0\"\n } : undefined]), 1040 /* FULL_PROPS, DYNAMIC_SLOTS */, [\"footer-method\", \"onCheckboxChange\", \"onRadioChange\", \"onCheckboxAll\"]), _ctx.customUrl != undefined ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)((0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveDynamicComponent)(_ctx.customUrl), {\n key: 1,\n ref: \"components\",\n onEmits: _ctx.emits\n }, null, 40 /* PROPS, NEED_HYDRATION */, [\"onEmits\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_ol_table_column_config, {\n ref: \"olTableColumnConfig\",\n onUpdate: _ctx.updateColumn,\n onOk: _cache[4] || (_cache[4] = $event => _ctx.init(true))\n }, null, 8 /* PROPS */, [\"onUpdate\"]), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_olForm, {\n ref: \"form\",\n onQuery: _ctx.query\n }, null, 8 /* PROPS */, [\"onQuery\"]), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_OlMainFormSubTable, {\n ref: \"subForm\",\n onQuery: _ctx.query\n }, null, 8 /* PROPS */, [\"onQuery\"]), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\" 视频播放弹框 \"), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_el_dialog, {\n modelValue: $data.videoDialogVisible,\n \"onUpdate:modelValue\": _cache[5] || (_cache[5] = $event => $data.videoDialogVisible = $event),\n width: \"800px\",\n \"destroy-on-close\": true,\n center: \"\"\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementVNode)(\"div\", _hoisted_9, [$data.videoDialogVisible ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementBlock)(\"video\", {\n key: 0,\n ref: \"dialogVideoPlayer\",\n src: $data.currentVideoSrc,\n class: \"dialog-video-player\",\n controls: \"\",\n autoplay: \"\",\n controlsList: \"nodownload\",\n width: \"100%\"\n }, null, 8 /* PROPS */, _hoisted_10)) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true)])]),\n _: 1 /* STABLE */\n }, 8 /* PROPS */, [\"modelValue\"]), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\" 表格选取弹框 \"), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_ol_dialog_table, {\n ref: \"selectTableDialogRef\",\n onEmits: $options.getSelectRowChangeButClick\n }, null, 8 /* PROPS */, [\"onEmits\"])], 64 /* STABLE_FRAGMENT */);\n}\n\n//# sourceURL=webpack://olp-table/./src/components/table/ol-table/index.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/vue-loader/dist/templateLoader.js??ruleSet%5B1%5D.rules%5B3%5D!./node_modules/vue-loader/dist/index.js??ruleSet%5B0%5D.use%5B0%5D");
1777
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ render: function() { return /* binding */ render; }\n/* harmony export */ });\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.iterator.constructor.js */ \"./node_modules/core-js/modules/es.iterator.constructor.js\");\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_iterator_filter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.iterator.filter.js */ \"./node_modules/core-js/modules/es.iterator.filter.js\");\n/* harmony import */ var core_js_modules_es_iterator_filter_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_filter_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vue */ \"vue\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_2__);\n\n\n\nconst _hoisted_1 = [\"onClick\"];\nconst _hoisted_2 = {\n class: \"video-preview\"\n};\nconst _hoisted_3 = [\"src\", \"height\"];\nconst _hoisted_4 = {\n key: 1\n};\nconst _hoisted_5 = {\n key: 0,\n class: \"title\"\n};\nconst _hoisted_6 = {\n key: 1,\n style: {\n \"margin\": \"0px 15px -30px 0px\"\n }\n};\nconst _hoisted_7 = {\n key: 0,\n class: \"vxe-icon-fullscreen\",\n title: \"全屏\"\n};\nconst _hoisted_8 = {\n key: 1,\n class: \"vxe-icon-minimize\",\n title: \"取消全屏\"\n};\nconst _hoisted_9 = {\n class: \"video-dialog-container\"\n};\nconst _hoisted_10 = [\"src\"];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_olSelectDom = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"olSelectDom\");\n const _component_el_image = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"el-image\");\n const _component_vxe_checkbox = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"vxe-checkbox\");\n const _component_Icon = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"Icon\");\n const _component_el_link = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"el-link\");\n const _component_ol_table_tool_btn = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"ol-table-tool-btn\");\n const _component_el_button = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"el-button\");\n const _component_olTableOperate = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"olTableOperate\");\n const _component_ol_table_column_dict_color = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"ol-table-column-dict-color\");\n const _component_olPager = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"olPager\");\n const _component_vxe_grid = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"vxe-grid\");\n const _component_ol_table_column_config = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"ol-table-column-config\");\n const _component_olForm = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"olForm\");\n const _component_OlMainFormSubTable = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"OlMainFormSubTable\");\n const _component_el_dialog = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"el-dialog\");\n const _component_ol_dialog_table = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"ol-dialog-table\");\n return (0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_2__.Fragment, null, [_ctx.table.formConfig.show ? (0,vue__WEBPACK_IMPORTED_MODULE_2__.renderSlot)(_ctx.$slots, $options.getSlotName('search'), {\n key: 0\n }, undefined, true) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_vxe_grid, (0,vue__WEBPACK_IMPORTED_MODULE_2__.mergeProps)(_ctx.table, {\n class: \"ol-table\",\n \"footer-method\": _ctx.footerMethod,\n onCheckboxChange: _ctx.selectRowChange,\n onRadioChange: _ctx.selectRowChange\n }, (0,vue__WEBPACK_IMPORTED_MODULE_2__.toHandlers)(_ctx.events), {\n onCheckboxAll: _ctx.selectRowChange\n }), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createSlots)({\n img_default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(({\n row,\n column\n }) => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_el_image, {\n style: {\n \"height\": \"60px\",\n \"width\": \"60px\"\n },\n src: row[$options.getFiledName(column)],\n \"preview-src-list\": [row[$options.getFiledName(column)]],\n \"list-type\": \"picture-card\",\n class: \"w-full h-auto rounded-md\"\n }, null, 8 /* PROPS */, [\"src\", \"preview-src-list\"])]),\n checkbox_default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(({\n column,\n row\n }) => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_vxe_checkbox, {\n modelValue: row[column.field],\n \"onUpdate:modelValue\": $event => row[column.field] = $event,\n checkedValue: 1,\n uncheckedValue: 0\n }, null, 8 /* PROPS */, [\"modelValue\", \"onUpdate:modelValue\"]), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\" <el-checkbox v-model=\\\"row[column.field]\\\"\"), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\" true-value=\\\"1\\\"\"), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\" false-value=\\\"0\\\">{{ row[column.field] }}\"), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\" </el-checkbox>\")]),\n video_default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(({\n row,\n column\n }) => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementVNode)(\"div\", {\n onClick: $event => $options.openVideoDialog(row[$options.getFiledName(column)]),\n style: {\n \"cursor\": \"pointer\"\n },\n class: \"video-thumbnail-container\"\n }, [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementVNode)(\"div\", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementVNode)(\"video\", {\n ref: \"videoPreview\",\n src: row[$options.getFiledName(column)],\n preload: \"metadata\",\n width: \"100%\",\n height: (this.table.rowConfig?.height ?? 180) - 20,\n muted: \"\",\n class: \"video-preview-element\"\n }, null, 8 /* PROPS */, _hoisted_3), _cache[6] || (_cache[6] = (0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementVNode)(\"div\", {\n class: \"video-overlay\"\n }, [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementVNode)(\"i\", {\n class: \"el-icon-video-play\"\n })], -1 /* CACHED */))])], 8 /* PROPS */, _hoisted_1)]),\n icon_default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(({\n row,\n column\n }) => [row[$options.getFiledName(column)]?.includes(':') ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_Icon, {\n key: 0,\n icon: row[$options.getFiledName(column)]\n }, null, 8 /* PROPS */, [\"icon\"])) : ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementBlock)(\"i\", {\n key: 1,\n class: (0,vue__WEBPACK_IMPORTED_MODULE_2__.normalizeClass)(row[$options.getFiledName(column)])\n }, null, 2 /* CLASS */)), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_2__.toDisplayString)(row[column[$options.getFiledName(column)]]), 1 /* TEXT */)]),\n selectTable_default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(({\n row,\n column\n }) => [$options.isOpenSelectTable(column) ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_el_link, {\n key: 0,\n type: \"primary\",\n onClick: $event => $options.openSelectTable(column, row)\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_2__.toDisplayString)($options.getSelectTableValue(column, row, true)), 1 /* TEXT */)]),\n _: 2 /* DYNAMIC */\n }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"onClick\"])) : ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementBlock)(\"span\", _hoisted_4, (0,vue__WEBPACK_IMPORTED_MODULE_2__.toDisplayString)($options.getSelectTableValue(column, row, false)), 1 /* TEXT */))]),\n header_left: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => [_ctx.table['table-title'] ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementBlock)(\"span\", _hoisted_5, (0,vue__WEBPACK_IMPORTED_MODULE_2__.toDisplayString)(_ctx.table['table-title']), 1 /* TEXT */)) : ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementBlock)(\"span\", _hoisted_6)), (0,vue__WEBPACK_IMPORTED_MODULE_2__.renderSlot)(_ctx.$slots, $options.getSlotName('headerLeftLeft'), {}, undefined, true), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_ol_table_tool_btn, {\n size: _ctx.elSize,\n loading: _ctx.loading,\n value: _ctx.toolBtn.filter(o => o.alignMode == 'left'),\n currentPermi: $data.uuid + ':' + $props.theme + ':',\n onToolbarBtnClick: _cache[0] || (_cache[0] = $event => _ctx.toolbarBtnClick($event))\n }, null, 8 /* PROPS */, [\"size\", \"loading\", \"value\", \"currentPermi\"]), (0,vue__WEBPACK_IMPORTED_MODULE_2__.renderSlot)(_ctx.$slots, $options.getSlotName('headerLeftRight'), {}, undefined, true)]),\n header_right: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.renderSlot)(_ctx.$slots, $options.getSlotName('headerRightLeft'), {}, undefined, true), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_ol_table_tool_btn, {\n size: _ctx.elSize,\n loading: _ctx.loading,\n value: _ctx.toolBtn.filter(o => o.alignMode == 'right' && ['olp_fullscreen', 'olp_refresh', 'olp_setting', 'olp_search'].indexOf(o.code) == -1),\n currentPermi: $data.uuid + ':' + $props.theme + ':',\n onToolbarBtnClick: _cache[2] || (_cache[2] = $event => _ctx.toolbarBtnClick($event))\n }, {\n right: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => [$options.showToolName('olp_fullscreen') ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_el_button, {\n key: 0,\n size: _ctx.elSize,\n onClick: _ctx.zoomEvent,\n circle: \"\"\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => [!_ctx.isMaximized ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementBlock)(\"i\", _hoisted_7)) : ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementBlock)(\"i\", _hoisted_8))]),\n _: 1 /* STABLE */\n }, 8 /* PROPS */, [\"size\", \"onClick\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true), $options.showToolName('olp_refresh') ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_el_button, {\n key: 1,\n size: _ctx.elSize,\n onClick: _ctx.query,\n title: \"刷新\",\n circle: \"\"\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => _cache[7] || (_cache[7] = [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementVNode)(\"i\", {\n class: \"vxe-icon-refresh\"\n }, null, -1 /* CACHED */)])),\n _: 1 /* STABLE */,\n __: [7]\n }, 8 /* PROPS */, [\"size\", \"onClick\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true), $options.showToolName('olp_setting') ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_el_button, {\n key: 2,\n size: _ctx.elSize,\n title: \"设置\",\n onClick: _cache[1] || (_cache[1] = $event => _ctx.$refs.olTableColumnConfig.open(_ctx.tableConfig, _ctx.tableConfig.uuid, _ctx.table.columns)),\n circle: \"\"\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => _cache[8] || (_cache[8] = [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementVNode)(\"i\", {\n class: \"vxe-icon-setting-fill\"\n }, null, -1 /* CACHED */)])),\n _: 1 /* STABLE */,\n __: [8]\n }, 8 /* PROPS */, [\"size\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true), $options.showToolName('olp_search') ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_el_button, {\n key: 3,\n size: _ctx.elSize,\n title: \"搜索\",\n onClick: _ctx.toggleFormDisplay,\n circle: \"\"\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => _cache[9] || (_cache[9] = [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementVNode)(\"i\", {\n class: \"vxe-icon-search\"\n }, null, -1 /* CACHED */)])),\n _: 1 /* STABLE */,\n __: [9]\n }, 8 /* PROPS */, [\"size\", \"onClick\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true)]),\n _: 1 /* STABLE */\n }, 8 /* PROPS */, [\"size\", \"loading\", \"value\", \"currentPermi\"]), (0,vue__WEBPACK_IMPORTED_MODULE_2__.renderSlot)(_ctx.$slots, $options.getSlotName('headerRightRight'), {}, undefined, true)]),\n operate: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(({\n row\n }) => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.renderSlot)(_ctx.$slots, $options.getSlotName('operateLeft'), {}, undefined, true), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_olTableOperate, {\n size: _ctx.elSize,\n row: row,\n value: _ctx.operationBtn,\n onHandleOperationClick: _cache[3] || (_cache[3] = $event => _ctx.handleOperationClick($event))\n }, null, 8 /* PROPS */, [\"size\", \"row\", \"value\"]), (0,vue__WEBPACK_IMPORTED_MODULE_2__.renderSlot)(_ctx.$slots, $options.getSlotName('operateRight'), {}, undefined, true)]),\n _: 2 /* DYNAMIC */\n }, [(0,vue__WEBPACK_IMPORTED_MODULE_2__.renderList)(_ctx.table.formConfig.items.filter(item => item.slotsName != undefined), item => {\n return {\n name: item.slotsName,\n fn: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_olSelectDom, {\n item: item,\n modelValue: _ctx.table.formConfig.data[item.key],\n \"onUpdate:modelValue\": $event => _ctx.table.formConfig.data[item.key] = $event,\n size: _ctx.elSize\n }, null, 8 /* PROPS */, [\"item\", \"modelValue\", \"onUpdate:modelValue\", \"size\"])])\n };\n }), _ctx.pagination.enabled && _ctx.table.columns.length != 0 ? {\n name: \"pager\",\n fn: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_olPager, (0,vue__WEBPACK_IMPORTED_MODULE_2__.mergeProps)(_ctx.pagination, {\n onPageChange: _ctx.handlePageChange,\n onClearSelected: _ctx.clearSelected\n }), {\n left: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_ol_table_column_dict_color, {\n columns: _ctx.table.columns\n }, null, 8 /* PROPS */, [\"columns\"]), (0,vue__WEBPACK_IMPORTED_MODULE_2__.renderSlot)(_ctx.$slots, $options.getSlotName('pageLeft'), {}, undefined, true)]),\n right: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.renderSlot)(_ctx.$slots, $options.getSlotName('pageRight'), {}, undefined, true)]),\n _: 3 /* FORWARDED */\n }, 16 /* FULL_PROPS */, [\"onPageChange\", \"onClearSelected\"])]),\n key: \"0\"\n } : undefined]), 1040 /* FULL_PROPS, DYNAMIC_SLOTS */, [\"footer-method\", \"onCheckboxChange\", \"onRadioChange\", \"onCheckboxAll\"]), _ctx.customUrl != undefined ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)((0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveDynamicComponent)(_ctx.customUrl), {\n key: 1,\n ref: \"components\",\n onEmits: _ctx.emits\n }, null, 40 /* PROPS, NEED_HYDRATION */, [\"onEmits\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_ol_table_column_config, {\n ref: \"olTableColumnConfig\",\n onUpdate: _ctx.updateColumn,\n onOk: _cache[4] || (_cache[4] = $event => _ctx.init(true))\n }, null, 8 /* PROPS */, [\"onUpdate\"]), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_olForm, {\n ref: \"form\",\n onQuery: _ctx.query,\n onEmits: _ctx.emits\n }, null, 8 /* PROPS */, [\"onQuery\", \"onEmits\"]), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_OlMainFormSubTable, {\n ref: \"subForm\",\n onQuery: _ctx.query,\n onEmits: _ctx.emits\n }, null, 8 /* PROPS */, [\"onQuery\", \"onEmits\"]), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\" 视频播放弹框 \"), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_el_dialog, {\n modelValue: $data.videoDialogVisible,\n \"onUpdate:modelValue\": _cache[5] || (_cache[5] = $event => $data.videoDialogVisible = $event),\n width: \"800px\",\n \"destroy-on-close\": true,\n center: \"\"\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementVNode)(\"div\", _hoisted_9, [$data.videoDialogVisible ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementBlock)(\"video\", {\n key: 0,\n ref: \"dialogVideoPlayer\",\n src: $data.currentVideoSrc,\n class: \"dialog-video-player\",\n controls: \"\",\n autoplay: \"\",\n controlsList: \"nodownload\",\n width: \"100%\"\n }, null, 8 /* PROPS */, _hoisted_10)) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true)])]),\n _: 1 /* STABLE */\n }, 8 /* PROPS */, [\"modelValue\"]), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\" 表格选取弹框 \"), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_ol_dialog_table, {\n ref: \"selectTableDialogRef\",\n onEmits: $options.getSelectRowChangeButClick\n }, null, 8 /* PROPS */, [\"onEmits\"])], 64 /* STABLE_FRAGMENT */);\n}\n\n//# sourceURL=webpack://olp-table/./src/components/table/ol-table/index.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/vue-loader/dist/templateLoader.js??ruleSet%5B1%5D.rules%5B3%5D!./node_modules/vue-loader/dist/index.js??ruleSet%5B0%5D.use%5B0%5D");
1778
1778
 
1779
1779
  /***/ }),
1780
1780
 
@@ -12688,7 +12688,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
12688
12688
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
12689
12689
 
12690
12690
  "use strict";
12691
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ OForm: function() { return /* binding */ OForm; }\n/* harmony export */ });\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.iterator.constructor.js */ \"./node_modules/core-js/modules/es.iterator.constructor.js\");\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.iterator.for-each.js */ \"./node_modules/core-js/modules/es.iterator.for-each.js\");\n/* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _utils_columnProp__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/utils/columnProp */ \"./src/utils/columnProp.js\");\n/* harmony import */ var _utils_message__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/utils/message */ \"./src/utils/message.js\");\n/* harmony import */ var _utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/utils/http/httpUtils */ \"./src/utils/http/httpUtils.js\");\n/* harmony import */ var _utils_tree__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/utils/tree */ \"./src/utils/tree.js\");\n/* harmony import */ var _utils_formUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/utils/formUtils */ \"./src/utils/formUtils.js\");\n/* harmony import */ var _api_dist__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/api/dist */ \"./src/api/dist.js\");\n/* harmony import */ var _store_dict__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/store/dict */ \"./src/store/dict.js\");\n/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/utils/object */ \"./src/utils/object.js\");\n/* harmony import */ var _components_FileUpload_index_vue__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @/components/FileUpload/index.vue */ \"./src/components/FileUpload/index.vue\");\n/* harmony import */ var _components_Icon__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @/components/Icon */ \"./src/components/Icon/index.js\");\n/* harmony import */ var _components_ol_table_select_vue__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @/components/ol-table-select.vue */ \"./src/components/ol-table-select.vue\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst dict = (0,_store_dict__WEBPACK_IMPORTED_MODULE_9__.storeDict)();\nfunction replaceDollarBraces(str) {\n return str.toString().replace(/\\$\\{?([^{}]+)\\}?/g, function (match, innerContent) {\n return innerContent ? `'${innerContent}'` : match;\n });\n}\nconst OForm = {\n name: 'OForm',\n components: {\n FileUpload: _components_FileUpload_index_vue__WEBPACK_IMPORTED_MODULE_11__[\"default\"],\n IconSelect: _components_Icon__WEBPACK_IMPORTED_MODULE_12__.IconSelect,\n OlTableSelect: _components_ol_table_select_vue__WEBPACK_IMPORTED_MODULE_13__[\"default\"]\n },\n inject: ['http'],\n props: {\n isDialog: {\n type: Boolean,\n default: true\n }\n },\n data() {\n return {\n formData: {},\n optionData: {},\n initOkTabs: [],\n form: {\n column: []\n },\n initOk: false,\n dynamicSlotsTable: [],\n dynamicSlotsField: {},\n dynamicSlotsOtherResult: {},\n show: true,\n state: {\n deleteId: '',\n uuid: '',\n foreignKey: '',\n exBtnDisabled: undefined,\n isDialog: true,\n loading: false,\n fullscreen: false,\n dialogVisible: false,\n title: \"\",\n width: '60%',\n comCommit: true,\n maxHeight: '400px',\n type: '0',\n edit: false,\n saveUrl: '',\n requestType: 'post',\n updateKey: '',\n theme: 't1',\n tableConfigId: '',\n dbName: '',\n tableName: '',\n otherProp: {}\n }\n };\n },\n methods: {\n hideColumn(prop) {\n (0,_utils_object__WEBPACK_IMPORTED_MODULE_10__.setArrayObjectKeyValue)(this.form.column, 'display', false, prop);\n },\n showColumn(prop) {\n (0,_utils_object__WEBPACK_IMPORTED_MODULE_10__.setArrayObjectKeyValue)(this.form.column, 'display', true, prop);\n },\n setOtherProp(params) {\n if (this.state.otherProp) {\n if (this.state.otherProp.createBy && this.state.otherProp.createBy.trim()) {\n params.createBy = this.state.otherProp.createBy.trim();\n }\n if (this.state.otherProp.updateBy && this.state.otherProp.updateBy.trim()) {\n params.updateBy = this.state.otherProp.updateBy.trim();\n }\n }\n },\n /**\r\n * 根据列配置获取数据库表更新数据\r\n * @param column\r\n * @param formData\r\n * @returns {{}}\r\n */\n getTableUpdateValue(column, formData) {\n let columnAndValueMap = {};\n for (let {\n prop,\n tableField,\n tableSaveToOtherProp\n } of column) {\n if (tableField && tableField == '1' || tableSaveToOtherProp == '1') {\n continue;\n }\n let value = formData[prop];\n if (value != undefined) {\n if (value instanceof String) {\n value = value.trim();\n }\n if (value instanceof Array) {\n columnAndValueMap[prop] = value.join(',');\n } else {\n columnAndValueMap[prop] = value;\n }\n }\n }\n return columnAndValueMap;\n },\n async doSave() {\n let dom;\n let keys;\n if (this.state.type != '0') {\n await this.$refs.formRef.getNativeForm().validate((valid, msg) => {\n if (!valid) {\n keys = Object.keys(msg);\n dom = this.$refs.formRef.getWidgetRef(keys[0]);\n dom.$el.scrollIntoView({\n block: \"center\",\n behavior: \"smooth\"\n });\n (0,_utils_message__WEBPACK_IMPORTED_MODULE_4__.useMessage)().error(\"您还有\" + keys.length + \"项信息未填写,请填写后再操作!\");\n } else {\n this.save();\n }\n });\n } else {\n await this.$refs.formRef.validate((valid, done, msg) => {\n if (!valid) {\n keys = Object.keys(msg);\n dom = this.$refs.formRef.getPropRef(keys[0]);\n dom.$el.scrollIntoView({\n block: \"center\",\n behavior: \"smooth\"\n });\n (0,_utils_message__WEBPACK_IMPORTED_MODULE_4__.useMessage)().error(\"您还有\" + keys.length + \"项信息未填写,请填写后再操作!\");\n } else {\n this.save();\n }\n done();\n });\n }\n },\n saveOk(status) {\n this.state.loading = false;\n this.initOkTabs = [];\n if (status) {\n this.state.dialogVisible = false;\n this.$emit('query');\n }\n if (this.state.otherProp && this.state.otherProp.afterSave) {\n try {\n eval(this.state.otherProp.afterSave);\n } catch (e) {\n console.log(e);\n }\n }\n },\n async save() {\n let params = this.getParams();\n if (this.state.otherProp && this.state.otherProp.beforeSave) {\n try {\n let next = eval(\"(params)=>{\" + this.state.otherProp.beforeSave + \"}\");\n if (next(params) === false) {\n return;\n }\n } catch (e) {\n console.log(e);\n return;\n }\n }\n this.state.loading = true;\n try {\n let url = this.state.saveUrl ? this.state.saveUrl : this.state.edit ? '/online/crudAes/modify' : '/online/crudAes/save';\n if (this.state.requestType.toLowerCase() == \"put\") {\n await (0,_utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_5__.put)(this.http, url, params).then(status => {\n this.saveOk(status);\n });\n } else if (!this.state.saveUrl || this.state.saveUrl.indexOf(\"/online/crudAes/\") != -1) {\n await (0,_utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_5__.postAes)(this.http, url, params).then(status => {\n this.saveOk(status);\n });\n } else {\n await (0,_utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_5__.post)(this.http, url, params).then(status => {\n this.saveOk(status);\n });\n }\n } catch (e) {\n console.error(e);\n } finally {\n this.state.loading = false;\n }\n },\n setDepRoleDefault(column) {\n //人员岗位\n if (column.selectDom === '25' || column.selectDom === '26' || column.selectDom === '27' || column.selectDom === '24') {\n let dic = {\n \"24\": 'olp_cloud,system_dept,name,id',\n \"25\": 'olp_cloud,system_role,name,id',\n \"26\": 'olp_cloud,system_post,name,id',\n \"27\": 'olp_cloud,system_users,nickname,id'\n };\n column.dictTable = dic[column.selectDom];\n column.type = 'select';\n }\n },\n initFormColumn(data) {\n for (let column of this.form.column) {\n if (data.disabled || column.disabled == 1) {\n column.disabled = true;\n }\n if (column.value) {\n column.value = (0,_utils_columnProp__WEBPACK_IMPORTED_MODULE_3__.getDefaultValue)(column);\n }\n this.setDepRoleDefault(column);\n if (column.selectDom === '20') {\n let slotObj = {\n slotName: column.prop,\n type: column.selectDom\n };\n this.dynamicSlotsField[column.prop] = column; //收集继续动态改变值的字段信息,以便动态改变值时更新表单数据\n this.dynamicSlotsTable.push(slotObj); //收集需要的动态插槽字段信息\n } else if (column.selectDom === '21') {\n let slotObj = {\n slotName: column.prop,\n type: column.selectDom\n };\n this.dynamicSlotsField[column.prop] = column; //收集继续动态改变值的字段信息,以便动态改变值时更新表单数据\n this.dynamicSlotsTable.push(slotObj); //收集需要的动态插槽字段信息\n } else if (column.selectDom === '22') {\n //表格选取\n let slotObj = {\n slotName: column.prop,\n type: column.selectDom,\n config: JSON.parse(column.attrs).olTableSelect\n };\n this.dynamicSlotsField[column.prop] = column; //收集继续动态改变值的字段信息,以便动态改变值时更新表单数据\n this.dynamicSlotsTable.push(slotObj); //收集需要的动态插槽字段信息\n const otherResult = slotObj.config.otherResult; //返回额外参数字段配置\n if (otherResult !== null && otherResult !== undefined && otherResult !== '') {\n let otherResultArray = [];\n otherResult.split(\",\").forEach(m => {\n let k = m.split(\":\");\n // otherResultArray.push({targetField: k[[k.length - 1]], sourceField: k[0]})\n otherResultArray.push({\n targetField: k[0],\n sourceField: k[[k.length - 1]]\n });\n });\n this.dynamicSlotsOtherResult[column.prop] = otherResultArray;\n }\n } else {\n this.initDict(column);\n }\n (0,_utils_object__WEBPACK_IMPORTED_MODULE_10__.parseJson)(column);\n for (let event of ['change']) {\n if (column[event] && !(column[event] instanceof Function)) {\n try {\n column[event] = eval(\"(params)=>{this.$nextTick(()=>{\" + \"let formData = this.formData;\" + \"let {value} = params;\" + replaceDollarBraces(column[event]) + \"})\" + \"}\");\n } catch (e) {\n console.error(e);\n }\n }\n }\n }\n },\n doInit(data) {\n this.beforeInit();\n if (data.disabled) {\n this.show = false;\n }\n this.initOkTabs = [];\n if (data.saveUrl) {\n this.state.saveUrl = data.saveUrl.trim();\n if (data.requestType) {\n this.state.requestType = data.requestType;\n }\n }\n this.state.edit = data['code'] == 'edit' == true;\n this.state.title = data.title ? data.title : this.state.edit ? '编辑' : '新增';\n if (data.form.title) {\n this.state.title = data.form.title;\n }\n this.formData = data.formData;\n this.form = data.form;\n this.state.dialogVisible = true;\n if (this.state.type == 0) {\n //赋值弹窗宽度和高度\n if (data.form.diaLogWidth) {\n this.state.width = data.form.diaLogWidth;\n }\n if (data.form.diaLogHeight) {\n this.state.maxHeight = data.form.diaLogHeight + 'px';\n }\n this.initFormColumn(data);\n } else {\n let {\n width,\n height\n } = this.form.formConfig;\n //赋值弹窗宽度和高度\n this.state.width = width;\n this.state.maxHeight = height + 'px';\n for (let widgetListElement of this.form.widgetList) {\n this.setDict(widgetListElement);\n }\n }\n for (let key of Object.keys(this.state)) {\n if (data[key]) {\n this.state[key] = data[key];\n }\n }\n setTimeout(() => {\n this.afterInit();\n }, 350);\n },\n setDict(column) {\n if (column && column.dict) {\n column.dictCode = column.dict;\n this.initDict(column);\n }\n if (column.cols instanceof Array) {\n for (let col of column.cols) {\n this.setDict(col);\n }\n }\n },\n init(data) {\n try {\n this.doInit(data);\n } catch (e) {\n console.error(e);\n }\n },\n /**\r\n * 初始化后回调\r\n */\n afterInit() {\n if (this.state.otherProp) {\n try {\n this.state.otherProp = JSON.parse(this.state.otherProp);\n if (this.state.otherProp.afterInit) {\n eval(this.state.otherProp.afterInit);\n }\n } catch (e) {\n console.log(e);\n }\n }\n },\n /**\r\n * 初始化前回调\r\n */\n beforeInit() {\n if (this.state.otherProp && this.state.otherProp.beforeInit) {\n try {\n eval(this.state.otherProp.beforeInit);\n } catch (e) {\n console.log(e);\n }\n }\n },\n initDict(column) {\n if (column.dictCode) {\n column.dicData = dict.val(column.dictCode);\n if (column.dict && column.options) {\n column.options.optionItems = column.dicData;\n }\n if (column.selectDom == 1 || !column.type) {\n column.type = \"select\";\n }\n //”number”、”string”、”boolean”、”object”、”function” 和 “undefined”\n let dataType = typeof this.formData[column.prop];\n if ([\"number\", \"boolean\"].indexOf(dataType) != -1) {\n this.formData[column.prop] = String(this.formData[column.prop]);\n column.value = this.formData[column.prop];\n }\n if (this.state.edit) {\n return;\n }\n if (this.formData[column.prop] != undefined) {\n this.formData[column.prop] = String(this.formData[column.prop]);\n column.value = this.formData[column.prop];\n } else if (column.value != undefined) {\n this.formData[column.prop] = String(column.value);\n } else {\n // 数据字典与值类型不一致\n if (this.formData[column.prop] == undefined) {\n setTimeout(() => {\n if (column.dicData) {\n for (let dicDatum of column.dicData) {\n if (dicDatum.isDefault == 1) {\n this.formData[column.prop] = dicDatum.value;\n column.value = this.formData[column.prop];\n }\n }\n }\n }, 100);\n }\n }\n } else if (column.dictTable || column.dictUrl) {\n if (column.selectDom == 1 || !column.type) {\n column.type = \"select\";\n }\n column.filterable = true;\n column.dicData = [];\n setTimeout(() => {\n this.setDictTable(column, undefined);\n }, 10);\n if (column.type == 'tree') {\n column.filterable = column.filterable == undefined ? true : column.clearable;\n column.clearable = column.clearable == undefined ? true : column.clearable;\n } else {\n column.filterMethod = e => {\n this.$nextTick(() => {\n this.setDictTable(column, e);\n });\n };\n }\n }\n },\n setDictUrl(column, like) {\n let dictUrl = column.dictUrl.split(\",\");\n let url;\n let label = 'label';\n let value = 'value';\n let parentId = 'parentId';\n // get,url,label,value,parent_id\n let doGet = true;\n if (dictUrl.length > 1) {\n if (dictUrl[0].toString().toLowerCase() == 'post') {\n doGet = false;\n }\n url = dictUrl[1];\n label = dictUrl[2];\n value = dictUrl[3];\n parentId = dictUrl[4];\n } else {\n url = dictUrl[0];\n }\n if (doGet) {\n (0,_utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_5__.get)(this.http, url + \"?label=\" + like).then(data => {\n column.dicData.length = 0;\n if (column.type == 'tree') {\n for (let da of data) {\n da['label'] = da[label];\n da['value'] = da[value];\n }\n column.dicData = (0,_utils_tree__WEBPACK_IMPORTED_MODULE_6__.handleTree)(data, value, parentId);\n } else {\n data.forEach(d => {\n column.dicData.push(d);\n });\n }\n });\n } else {\n let params = {};\n if (like) {\n params['label'] = like;\n }\n (0,_utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_5__.post)(this.http, column.dictUrl, params, false).then(({\n data\n }) => {\n column.dicData.length = 0;\n if (column.type == 'tree') {\n for (let da of data) {\n da['label'] = da[label];\n da['value'] = da[value];\n }\n column.dicData = (0,_utils_tree__WEBPACK_IMPORTED_MODULE_6__.handleTree)(data, value, parentId);\n } else {\n data.forEach(da => {\n da['label'] = da[label];\n da['value'] = da[value];\n column.dicData.push(da);\n });\n }\n });\n }\n },\n setDictTable(column, like) {\n if (column.dictTable && column.dictTable.toString().trim() != '') {\n this.doSetDictTable(column, like);\n } else if (column.dictUrl) {\n this.setDictUrl(column, like);\n }\n },\n doSetDictTable(column, like) {\n let value = this.formData[column.prop];\n /*String tableName;\r\n String dbName;\r\n String label;\r\n String value;\r\n Map<String, Object> where;*/\n // olp-vue-pro,system_users,nickname,id,parentId\n let params = {};\n // let dictTable = column.dictTable;\n try {\n // 使用Function构造函数比eval更安全\n params = new Function('return ' + column.dictTable)();\n } catch (e) {\n // 2. 业务调用侧(清晰的使用逻辑)\n params = (0,_utils_formUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(column.dictTable);\n }\n if (like || value) {\n if (!params.where) {\n params.where = {};\n }\n }\n if (!params[\"parentValue\"]) {\n if (like) {\n params.where['_like_' + params[\"label\"]] = like;\n }\n if (value instanceof Array) {\n let val = '';\n for (let valueElement of value) {\n if (val.length > 0) {\n val += \",\";\n }\n val = val + \"'\" + valueElement + \"'\";\n }\n if (val) {\n params.where['_in_' + params[\"label\"]] = val;\n }\n //params.defaultValue = value;\n } else {\n params.defaultValue = value;\n }\n }\n (0,_api_dist__WEBPACK_IMPORTED_MODULE_8__.initDictTable)(this.http, params).then(data => {\n column.dicData.length = 0;\n if (params[\"parentValue\"]) {\n column.dicData = (0,_utils_tree__WEBPACK_IMPORTED_MODULE_6__.handleTree)(data, 'dictValue', 'parentValue');\n } else {\n data.forEach(d => {\n d.value = d.value + '';\n d.dictValue = d.dictValue + '';\n column.dicData.push(d);\n });\n }\n });\n },\n /**\r\n * 表格选择器回调函数\r\n * @param data\r\n */\n olTableSelectChange(slotName, data) {\n // console.info('插槽名称', slotName, '表格回传的数据', data)\n // console.info('表格', this.form.column)\n this.formData[slotName] = data.value; //修改表单数据,以便后续提交\n if (typeof this.dynamicSlotsField[slotName].change === 'function') {\n this.dynamicSlotsField[slotName].change(data.value); //字段数据更新回调\n }\n //给其他字段赋值\n this.dynamicSlotsOtherResult[slotName]?.forEach(item => {\n this.formData[item.targetField] = data.data[item.sourceField];\n });\n }\n },\n mounted() {\n this.$nextTick(() => {\n (0,_store_dict__WEBPACK_IMPORTED_MODULE_9__.storeDict)().init(this.http);\n });\n }\n};\n\n//# sourceURL=webpack://olp-table/./src/mixins/VTMixin/OForm.js?");
12691
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ OForm: function() { return /* binding */ OForm; }\n/* harmony export */ });\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.iterator.constructor.js */ \"./node_modules/core-js/modules/es.iterator.constructor.js\");\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.iterator.for-each.js */ \"./node_modules/core-js/modules/es.iterator.for-each.js\");\n/* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _utils_columnProp__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/utils/columnProp */ \"./src/utils/columnProp.js\");\n/* harmony import */ var _utils_message__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/utils/message */ \"./src/utils/message.js\");\n/* harmony import */ var _utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/utils/http/httpUtils */ \"./src/utils/http/httpUtils.js\");\n/* harmony import */ var _utils_tree__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/utils/tree */ \"./src/utils/tree.js\");\n/* harmony import */ var _utils_formUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/utils/formUtils */ \"./src/utils/formUtils.js\");\n/* harmony import */ var _api_dist__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/api/dist */ \"./src/api/dist.js\");\n/* harmony import */ var _store_dict__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/store/dict */ \"./src/store/dict.js\");\n/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/utils/object */ \"./src/utils/object.js\");\n/* harmony import */ var _components_FileUpload_index_vue__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @/components/FileUpload/index.vue */ \"./src/components/FileUpload/index.vue\");\n/* harmony import */ var _components_Icon__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @/components/Icon */ \"./src/components/Icon/index.js\");\n/* harmony import */ var _components_ol_table_select_vue__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @/components/ol-table-select.vue */ \"./src/components/ol-table-select.vue\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst dict = (0,_store_dict__WEBPACK_IMPORTED_MODULE_9__.storeDict)();\nfunction replaceDollarBraces(str) {\n return str.toString().replace(/\\$\\{?([^{}]+)\\}?/g, function (match, innerContent) {\n return innerContent ? `'${innerContent}'` : match;\n });\n}\nconst OForm = {\n name: 'OForm',\n components: {\n FileUpload: _components_FileUpload_index_vue__WEBPACK_IMPORTED_MODULE_11__[\"default\"],\n IconSelect: _components_Icon__WEBPACK_IMPORTED_MODULE_12__.IconSelect,\n OlTableSelect: _components_ol_table_select_vue__WEBPACK_IMPORTED_MODULE_13__[\"default\"]\n },\n inject: ['http'],\n props: {\n isDialog: {\n type: Boolean,\n default: true\n }\n },\n data() {\n return {\n js: undefined,\n formData: {},\n optionData: {},\n initOkTabs: [],\n form: {\n column: []\n },\n initOk: false,\n dynamicSlotsTable: [],\n dynamicSlotsField: {},\n dynamicSlotsOtherResult: {},\n show: true,\n state: {\n deleteId: '',\n uuid: '',\n foreignKey: '',\n exBtnDisabled: undefined,\n isDialog: true,\n loading: false,\n fullscreen: false,\n dialogVisible: false,\n title: \"\",\n width: '60%',\n comCommit: true,\n maxHeight: '400px',\n type: '0',\n edit: false,\n saveUrl: '',\n requestType: 'post',\n updateKey: '',\n theme: 't1',\n tableConfigId: '',\n dbName: '',\n tableName: '',\n otherProp: {}\n }\n };\n },\n methods: {\n hideColumn(prop) {\n (0,_utils_object__WEBPACK_IMPORTED_MODULE_10__.setArrayObjectKeyValue)(this.form.column, 'display', false, prop);\n },\n showColumn(prop) {\n (0,_utils_object__WEBPACK_IMPORTED_MODULE_10__.setArrayObjectKeyValue)(this.form.column, 'display', true, prop);\n },\n setOtherProp(params) {\n if (this.state.otherProp) {\n if (this.state.otherProp.createBy && this.state.otherProp.createBy.trim()) {\n params.createBy = this.state.otherProp.createBy.trim();\n }\n if (this.state.otherProp.updateBy && this.state.otherProp.updateBy.trim()) {\n params.updateBy = this.state.otherProp.updateBy.trim();\n }\n }\n },\n /**\r\n * 根据列配置获取数据库表更新数据\r\n * @param column\r\n * @param formData\r\n * @returns {{}}\r\n */\n getTableUpdateValue(column, formData) {\n let columnAndValueMap = {};\n for (let {\n prop,\n tableField,\n tableSaveToOtherProp\n } of column) {\n if (tableField && tableField == '1' || tableSaveToOtherProp == '1') {\n continue;\n }\n let value = formData[prop];\n if (value != undefined) {\n if (value instanceof String) {\n value = value.trim();\n }\n if (value instanceof Array) {\n columnAndValueMap[prop] = value.join(',');\n } else {\n columnAndValueMap[prop] = value;\n }\n }\n }\n return columnAndValueMap;\n },\n async doSave() {\n let dom;\n let keys;\n if (this.state.type != '0') {\n await this.$refs.formRef.getNativeForm().validate((valid, msg) => {\n if (!valid) {\n keys = Object.keys(msg);\n dom = this.$refs.formRef.getWidgetRef(keys[0]);\n dom.$el.scrollIntoView({\n block: \"center\",\n behavior: \"smooth\"\n });\n (0,_utils_message__WEBPACK_IMPORTED_MODULE_4__.useMessage)().error(\"您还有\" + keys.length + \"项信息未填写,请填写后再操作!\");\n } else {\n this.save();\n }\n });\n } else {\n await this.$refs.formRef.validate((valid, done, msg) => {\n if (!valid) {\n keys = Object.keys(msg);\n dom = this.$refs.formRef.getPropRef(keys[0]);\n dom.$el.scrollIntoView({\n block: \"center\",\n behavior: \"smooth\"\n });\n (0,_utils_message__WEBPACK_IMPORTED_MODULE_4__.useMessage)().error(\"您还有\" + keys.length + \"项信息未填写,请填写后再操作!\");\n } else {\n this.save();\n }\n done();\n });\n }\n },\n saveOk(status) {\n this.state.loading = false;\n this.initOkTabs = [];\n if (status) {\n this.state.dialogVisible = false;\n this.$emit('query');\n }\n if (this.state.otherProp && this.state.otherProp.afterSave) {\n try {\n eval(this.state.otherProp.afterSave);\n } catch (e) {\n console.log(e);\n }\n }\n },\n async save() {\n if (this.js) {\n let param = {\n js: this.js,\n v: this.formData\n };\n this.state.dialogVisible = false;\n this.$emit('emits', param);\n return;\n }\n let params = this.getParams();\n if (this.state.otherProp && this.state.otherProp.beforeSave) {\n try {\n let next = eval(\"(params)=>{\" + this.state.otherProp.beforeSave + \"}\");\n if (next(params) === false) {\n return;\n }\n } catch (e) {\n console.log(e);\n return;\n }\n }\n this.state.loading = true;\n try {\n let url = this.state.saveUrl ? this.state.saveUrl : this.state.edit ? '/online/crudAes/modify' : '/online/crudAes/save';\n if (this.state.requestType.toLowerCase() == \"put\") {\n await (0,_utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_5__.put)(this.http, url, params).then(status => {\n this.saveOk(status);\n });\n } else if (!this.state.saveUrl || this.state.saveUrl.indexOf(\"/online/crudAes/\") != -1) {\n await (0,_utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_5__.postAes)(this.http, url, params).then(status => {\n this.saveOk(status);\n });\n } else {\n await (0,_utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_5__.post)(this.http, url, params).then(status => {\n this.saveOk(status);\n });\n }\n } catch (e) {\n console.error(e);\n } finally {\n this.state.loading = false;\n }\n },\n setDepRoleDefault(column) {\n //人员岗位\n if (column.selectDom === '25' || column.selectDom === '26' || column.selectDom === '27' || column.selectDom === '24') {\n let dic = {\n \"24\": 'olp_cloud,system_dept,name,id',\n \"25\": 'olp_cloud,system_role,name,id',\n \"26\": 'olp_cloud,system_post,name,id',\n \"27\": 'olp_cloud,system_users,nickname,id'\n };\n column.dictTable = dic[column.selectDom];\n column.type = 'select';\n }\n },\n initFormColumn(data) {\n for (let column of this.form.column) {\n if (data.disabled || column.disabled == 1) {\n column.disabled = true;\n }\n if (column.value) {\n column.value = (0,_utils_columnProp__WEBPACK_IMPORTED_MODULE_3__.getDefaultValue)(column);\n }\n this.setDepRoleDefault(column);\n if (column.selectDom === '20') {\n let slotObj = {\n slotName: column.prop,\n type: column.selectDom\n };\n this.dynamicSlotsField[column.prop] = column; //收集继续动态改变值的字段信息,以便动态改变值时更新表单数据\n this.dynamicSlotsTable.push(slotObj); //收集需要的动态插槽字段信息\n } else if (column.selectDom === '21') {\n let slotObj = {\n slotName: column.prop,\n type: column.selectDom\n };\n this.dynamicSlotsField[column.prop] = column; //收集继续动态改变值的字段信息,以便动态改变值时更新表单数据\n this.dynamicSlotsTable.push(slotObj); //收集需要的动态插槽字段信息\n } else if (column.selectDom === '22') {\n //表格选取\n let slotObj = {\n slotName: column.prop,\n type: column.selectDom,\n config: JSON.parse(column.attrs).olTableSelect\n };\n this.dynamicSlotsField[column.prop] = column; //收集继续动态改变值的字段信息,以便动态改变值时更新表单数据\n this.dynamicSlotsTable.push(slotObj); //收集需要的动态插槽字段信息\n const otherResult = slotObj.config.otherResult; //返回额外参数字段配置\n if (otherResult !== null && otherResult !== undefined && otherResult !== '') {\n let otherResultArray = [];\n otherResult.split(\",\").forEach(m => {\n let k = m.split(\":\");\n // otherResultArray.push({targetField: k[[k.length - 1]], sourceField: k[0]})\n otherResultArray.push({\n targetField: k[0],\n sourceField: k[[k.length - 1]]\n });\n });\n this.dynamicSlotsOtherResult[column.prop] = otherResultArray;\n }\n } else {\n this.initDict(column);\n }\n (0,_utils_object__WEBPACK_IMPORTED_MODULE_10__.parseJson)(column);\n for (let event of ['change']) {\n if (column[event] && !(column[event] instanceof Function)) {\n try {\n column[event] = eval(\"(params)=>{this.$nextTick(()=>{\" + \"let formData = this.formData;\" + \"let {value} = params;\" + replaceDollarBraces(column[event]) + \"})\" + \"}\");\n } catch (e) {\n console.error(e);\n }\n }\n }\n }\n },\n doInit(data) {\n this.beforeInit();\n if (data.disabled) {\n this.show = false;\n }\n this.initOkTabs = [];\n if (data.saveUrl) {\n this.state.saveUrl = data.saveUrl.trim();\n if (data.requestType) {\n this.state.requestType = data.requestType;\n }\n }\n this.state.edit = data['code'] == 'edit' == true;\n this.state.title = data.title ? data.title : this.state.edit ? '编辑' : '新增';\n if (data.form.title) {\n this.state.title = data.form.title;\n }\n this.formData = data.formData;\n this.form = data.form;\n this.state.dialogVisible = true;\n if (this.state.type == 0) {\n //赋值弹窗宽度和高度\n if (data.form.diaLogWidth) {\n this.state.width = data.form.diaLogWidth;\n }\n if (data.form.diaLogHeight) {\n this.state.maxHeight = data.form.diaLogHeight + 'px';\n }\n this.initFormColumn(data);\n } else {\n let {\n width,\n height\n } = this.form.formConfig;\n //赋值弹窗宽度和高度\n this.state.width = width;\n this.state.maxHeight = height + 'px';\n for (let widgetListElement of this.form.widgetList) {\n this.setDict(widgetListElement);\n }\n }\n for (let key of Object.keys(this.state)) {\n if (data[key]) {\n this.state[key] = data[key];\n }\n }\n setTimeout(() => {\n this.afterInit();\n }, 350);\n },\n setDict(column) {\n if (column && column.dict) {\n column.dictCode = column.dict;\n this.initDict(column);\n }\n if (column.cols instanceof Array) {\n for (let col of column.cols) {\n this.setDict(col);\n }\n }\n },\n init(data, js) {\n try {\n this.js = js;\n this.doInit(data);\n } catch (e) {\n console.error(e);\n }\n },\n /**\r\n * 初始化后回调\r\n */\n afterInit() {\n if (this.state.otherProp) {\n try {\n this.state.otherProp = JSON.parse(this.state.otherProp);\n if (this.state.otherProp.afterInit) {\n eval(this.state.otherProp.afterInit);\n }\n } catch (e) {\n console.log(e);\n }\n }\n },\n /**\r\n * 初始化前回调\r\n */\n beforeInit() {\n if (this.state.otherProp && this.state.otherProp.beforeInit) {\n try {\n eval(this.state.otherProp.beforeInit);\n } catch (e) {\n console.log(e);\n }\n }\n },\n initDict(column) {\n if (column.dictCode) {\n column.dicData = dict.val(column.dictCode);\n if (column.dict && column.options) {\n column.options.optionItems = column.dicData;\n }\n if (column.selectDom == 1 || !column.type) {\n column.type = \"select\";\n }\n //”number”、”string”、”boolean”、”object”、”function” 和 “undefined”\n let dataType = typeof this.formData[column.prop];\n if ([\"number\", \"boolean\"].indexOf(dataType) != -1) {\n this.formData[column.prop] = String(this.formData[column.prop]);\n column.value = this.formData[column.prop];\n }\n if (this.state.edit) {\n return;\n }\n if (this.formData[column.prop] != undefined) {\n this.formData[column.prop] = String(this.formData[column.prop]);\n column.value = this.formData[column.prop];\n } else if (column.value != undefined) {\n this.formData[column.prop] = String(column.value);\n } else {\n // 数据字典与值类型不一致\n if (this.formData[column.prop] == undefined) {\n setTimeout(() => {\n if (column.dicData) {\n for (let dicDatum of column.dicData) {\n if (dicDatum.isDefault == 1) {\n this.formData[column.prop] = dicDatum.value;\n column.value = this.formData[column.prop];\n }\n }\n }\n }, 100);\n }\n }\n } else if (column.dictTable || column.dictUrl) {\n if (column.selectDom == 1 || !column.type) {\n column.type = \"select\";\n }\n column.filterable = true;\n column.dicData = [];\n setTimeout(() => {\n this.setDictTable(column, undefined);\n }, 10);\n if (column.type == 'tree') {\n column.filterable = column.filterable == undefined ? true : column.clearable;\n column.clearable = column.clearable == undefined ? true : column.clearable;\n } else {\n column.filterMethod = e => {\n this.$nextTick(() => {\n this.setDictTable(column, e);\n });\n };\n }\n }\n },\n setDictUrl(column, like) {\n let dictUrl = column.dictUrl.split(\",\");\n let url;\n let label = 'label';\n let value = 'value';\n let parentId = 'parentId';\n // get,url,label,value,parent_id\n let doGet = true;\n if (dictUrl.length > 1) {\n if (dictUrl[0].toString().toLowerCase() == 'post') {\n doGet = false;\n }\n url = dictUrl[1];\n label = dictUrl[2];\n value = dictUrl[3];\n parentId = dictUrl[4];\n } else {\n url = dictUrl[0];\n }\n if (doGet) {\n (0,_utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_5__.get)(this.http, url + \"?label=\" + like).then(data => {\n column.dicData.length = 0;\n if (column.type == 'tree') {\n for (let da of data) {\n da['label'] = da[label];\n da['value'] = da[value];\n }\n column.dicData = (0,_utils_tree__WEBPACK_IMPORTED_MODULE_6__.handleTree)(data, value, parentId);\n } else {\n data.forEach(d => {\n column.dicData.push(d);\n });\n }\n });\n } else {\n let params = {};\n if (like) {\n params['label'] = like;\n }\n (0,_utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_5__.post)(this.http, column.dictUrl, params, false).then(({\n data\n }) => {\n column.dicData.length = 0;\n if (column.type == 'tree') {\n for (let da of data) {\n da['label'] = da[label];\n da['value'] = da[value];\n }\n column.dicData = (0,_utils_tree__WEBPACK_IMPORTED_MODULE_6__.handleTree)(data, value, parentId);\n } else {\n data.forEach(da => {\n da['label'] = da[label];\n da['value'] = da[value];\n column.dicData.push(da);\n });\n }\n });\n }\n },\n setDictTable(column, like) {\n if (column.dictTable && column.dictTable.toString().trim() != '') {\n this.doSetDictTable(column, like);\n } else if (column.dictUrl) {\n this.setDictUrl(column, like);\n }\n },\n doSetDictTable(column, like) {\n let value = this.formData[column.prop];\n /*String tableName;\r\n String dbName;\r\n String label;\r\n String value;\r\n Map<String, Object> where;*/\n // olp-vue-pro,system_users,nickname,id,parentId\n let params = {};\n // let dictTable = column.dictTable;\n try {\n // 使用Function构造函数比eval更安全\n params = new Function('return ' + column.dictTable)();\n } catch (e) {\n // 2. 业务调用侧(清晰的使用逻辑)\n params = (0,_utils_formUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(column.dictTable);\n }\n if (like || value) {\n if (!params.where) {\n params.where = {};\n }\n }\n if (!params[\"parentValue\"]) {\n if (like) {\n params.where['_like_' + params[\"label\"]] = like;\n }\n if (value instanceof Array) {\n let val = '';\n for (let valueElement of value) {\n if (val.length > 0) {\n val += \",\";\n }\n val = val + \"'\" + valueElement + \"'\";\n }\n if (val) {\n params.where['_in_' + params[\"label\"]] = val;\n }\n //params.defaultValue = value;\n } else {\n params.defaultValue = value;\n }\n }\n (0,_api_dist__WEBPACK_IMPORTED_MODULE_8__.initDictTable)(this.http, params).then(data => {\n column.dicData.length = 0;\n if (params[\"parentValue\"]) {\n column.dicData = (0,_utils_tree__WEBPACK_IMPORTED_MODULE_6__.handleTree)(data, 'dictValue', 'parentValue');\n } else {\n data.forEach(d => {\n d.value = d.value + '';\n d.dictValue = d.dictValue + '';\n column.dicData.push(d);\n });\n }\n });\n },\n /**\r\n * 表格选择器回调函数\r\n * @param data\r\n */\n olTableSelectChange(slotName, data) {\n // console.info('插槽名称', slotName, '表格回传的数据', data)\n // console.info('表格', this.form.column)\n this.formData[slotName] = data.value; //修改表单数据,以便后续提交\n if (typeof this.dynamicSlotsField[slotName].change === 'function') {\n this.dynamicSlotsField[slotName].change(data.value); //字段数据更新回调\n }\n //给其他字段赋值\n this.dynamicSlotsOtherResult[slotName]?.forEach(item => {\n this.formData[item.targetField] = data.data[item.sourceField];\n });\n }\n },\n mounted() {\n this.$nextTick(() => {\n (0,_store_dict__WEBPACK_IMPORTED_MODULE_9__.storeDict)().init(this.http);\n });\n }\n};\n\n//# sourceURL=webpack://olp-table/./src/mixins/VTMixin/OForm.js?");
12692
12692
 
12693
12693
  /***/ }),
12694
12694
 
@@ -12721,7 +12721,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
12721
12721
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
12722
12722
 
12723
12723
  "use strict";
12724
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ OTMixinBodyMethods: function() { return /* binding */ OTMixinBodyMethods; }\n/* harmony export */ });\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.iterator.constructor.js */ \"./node_modules/core-js/modules/es.iterator.constructor.js\");\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_es_iterator_filter_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.iterator.filter.js */ \"./node_modules/core-js/modules/es.iterator.filter.js\");\n/* harmony import */ var core_js_modules_es_iterator_filter_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_filter_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_es_iterator_some_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.iterator.some.js */ \"./node_modules/core-js/modules/es.iterator.some.js\");\n/* harmony import */ var core_js_modules_es_iterator_some_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_some_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _store_dict__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/store/dict */ \"./src/store/dict.js\");\n/* harmony import */ var _store_dictType__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/store/dictType */ \"./src/store/dictType.js\");\n/* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/utils/util */ \"./src/utils/util.js\");\n/* harmony import */ var _utils_message__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/utils/message */ \"./src/utils/message.js\");\n/* harmony import */ var _utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/utils/http/httpUtils */ \"./src/utils/http/httpUtils.js\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! vue */ \"vue\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _utils_TableSortUtil__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/utils/TableSortUtil */ \"./src/utils/TableSortUtil.js\");\n/* harmony import */ var _mixins_VTMixin_DefaultMethods__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @/mixins/VTMixin/DefaultMethods */ \"./src/mixins/VTMixin/DefaultMethods.js\");\n/* harmony import */ var _directives_permission_hasPermi__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @/directives/permission/hasPermi */ \"./src/directives/permission/hasPermi.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst message = (0,_utils_message__WEBPACK_IMPORTED_MODULE_7__.useMessage)(); // 消息弹窗\nconst dict = (0,_store_dict__WEBPACK_IMPORTED_MODULE_4__.storeDict)();\nconst dictType = (0,_store_dictType__WEBPACK_IMPORTED_MODULE_5__.storeDictType)();\nconst OTMixinBodyMethods = {\n mixins: [_mixins_VTMixin_DefaultMethods__WEBPACK_IMPORTED_MODULE_11__.DefaultMethods],\n emits: ['handleOperationClick', 'toolbarBtnClick', 'initComponents', 'selectRowChange'],\n methods: {\n /**\r\n * 自定义表单方法\r\n * @returns {*}\r\n */\n customerForm(show) {\n this.toggleFormDisplay();\n this.table.formConfig.show = show == true;\n return this.table.formConfig;\n },\n /**\r\n * 搜索隐藏/显示\r\n */\n toggleFormDisplay() {\n // 获取组件的根 DOM 元素\n const rootEl = this.$refs[this.table.ref].$el;\n\n // 查询第一个子标签是否为 vxe-grid--form-wrapper\n const formWrapperEl = rootEl.querySelector('.vxe-grid--form-wrapper');\n if (formWrapperEl) {\n // 查询 formWrapperEl 下的第一个 form 标签\n const formEl = formWrapperEl.querySelector('form');\n if (formEl) {\n // 获取 form 标签的当前 display 样式\n const currentDisplay = window.getComputedStyle(formEl).display;\n\n // 根据当前 display 样式设置新的样式\n if (currentDisplay === 'none') {\n // 如果当前是 none,则移除 display 样式(设置为空字符串)\n formEl.style.display = '';\n } else {\n // 否则设置为 none\n formEl.style.display = 'none';\n }\n }\n }\n },\n /**\r\n * 选中回调\r\n */\n selectRowChange() {\n let rows = this.getSelectRows();\n if (!rows) {\n return;\n }\n this.pagination.selectionRowsLength = rows.length;\n this.setToolBtn('batchDelete', 'disabled', rows.length == 0);\n rows = this.selectBox == 1 ? rows[0] : rows;\n if (this.events['selectRowChange']) {\n this.events['selectRowChange'](rows);\n }\n this.$emit(\"selectRowChange\", rows);\n },\n /**\r\n * 切换表格最大化/还原\r\n */\n zoomEvent() {\n if (this.$table) {\n this.$table.zoom();\n this.isMaximized = this.$table.isMaximized();\n }\n },\n initToolBtn(toolBut) {\n let obj = undefined;\n for (let i = 0; i < toolBut.length; i++) {\n let toolButElement = toolBut[i];\n toolButElement.disabled = toolButElement.defaultDisabled == 1;\n toolButElement.show = toolButElement.defaultShow == 1;\n if (toolButElement.code == 'sortable') {\n toolButElement.values = false;\n obj = JSON.parse(JSON.stringify(toolButElement));\n obj.id = obj.id + \"_sortable\";\n obj.name = \"调整完成\";\n obj.code = \"sortableOk\";\n obj.icon = \"vxe-icon-check\";\n obj.show = false;\n obj.disabled = true;\n obj.index = i + 1;\n }\n }\n if (obj) {\n toolBut.splice(obj.index, 0, obj);\n }\n this.toolBtn = toolBut;\n },\n initOperationBtn(operationBtn) {\n this.operationBtn = operationBtn;\n let permissEx = 0;\n for (let i = 0; i < this.operationBtn.length; i++) {\n let operationBtnElement = this.operationBtn[i];\n let flag = (0,_directives_permission_hasPermi__WEBPACK_IMPORTED_MODULE_12__.doPermission)({\n parentNode: false\n }, [this.uuid + ':' + this.theme + ':' + operationBtnElement.code]);\n if (!flag) {\n operationBtnElement.permission = false;\n permissEx++;\n }\n }\n let length = this.operationBtn.length - permissEx;\n let width = 35;\n if (length != 0) {\n if (this.table.operationWidth) {\n width = this.table.operationWidth;\n } else {\n for (let o of this.operationBtn.filter(o => o.permission !== false)) {\n width += o.name.length * (35 - length) + (o.icon !== undefined ? 5 : 0);\n }\n }\n const hasOperateColumn = this.table.columns.some(col => ['操作'].includes(col.title));\n if (!hasOperateColumn) {\n this.table.columns.push({\n title: '操作',\n width: width,\n fixed: \"right\",\n slots: {\n default: 'operate'\n }\n });\n }\n }\n },\n initTree({\n tree,\n treeId,\n treeParentId\n }) {\n if (tree == 1) {\n this.table.treeConfig = {\n show: true,\n transform: false,\n indent: 15,\n reserve: tree,\n rowField: treeId,\n parentField: treeParentId,\n treeId: treeId,\n treeParentId: treeParentId,\n iconClose: \"vxe-icon-arrow-right\",\n iconOpen: \"vxe-icon-arrow-down\"\n };\n this.table.rowConfig.keyField = treeId;\n }\n },\n initFormMainList(formMainList) {\n this.formMainList = formMainList;\n },\n async doSetComponents(customUrl, method, props, multipleProps) {\n this.customUrl = (0,vue__WEBPACK_IMPORTED_MODULE_9__.markRaw)(customUrl);\n await this.$nextTick(async () => {\n if (multipleProps == '1' || multipleProps == true) {\n doCallback(this.$refs.components[method], props);\n } else if (multipleProps == '2') {\n doCallback2(this.$refs.components[method], props);\n } else {\n this.$refs.components[method](props);\n }\n });\n },\n setComponent(url, method, props, multipleProps) {\n if (url.indexOf(\"@\") == 0) {\n this.$emit('initComponents', {\n url: url,\n method: method,\n props: props,\n multipleProps: multipleProps,\n doSetComponents: this.doSetComponents\n });\n } else {\n this.doSetComponents(__webpack_require__(\"./src sync recursive ^\\\\.\\\\/.*$\")(`./${url}`).default, method, props, multipleProps);\n }\n },\n async toolbarBtnClick(code) {\n if (code == \"batchDelete\") {\n this.batchRemove();\n this.$emit('toolbarBtnClick', code);\n return;\n } else if (code == 'download') {\n this.setComponent(\"components/ol-dialog-excel\", \"open\", {\n column: JSON.parse(JSON.stringify(this.table.columnSource)),\n selectData: this.pagination.selectionRowsLength >= 1 ? '2' : '1'\n });\n return;\n } else if (code == 'upload') {\n let toolBtn = this.getToolBtn(code);\n let {\n json,\n beforeFunction\n } = toolBtn;\n if (json) {\n json = json.replace(/([{,]\\s*)([a-zA-Z0-9_]+)(\\s*:)/g, '$1\"$2\"$3').replace(/:(\\s*)'([^']+)'(\\s*[,}])/g, ':$1\"$2\"$3'); // 修正字符串值\n json = JSON.parse(json);\n }\n let defaultValue = {};\n if (beforeFunction) {\n // 第一次分割:按逗号分割成键值对\n //\"department_id=#{department_id},sex=1\"\n let pairs = beforeFunction.split(',');\n for (const pair of pairs) {\n // 第二次分割:按等号分割键和值\n let [key, value] = pair.split('=');\n if (value != undefined) {\n let value2 = value.toString().trim();\n if (value2.trim().startsWith('#{') && value2.endsWith('}')) {\n // 处理 #{department_id} 格式的值\n let key2 = value.slice(2, -1).trim(); // 去掉 #{ 和 }\n this.setParamsValue(defaultValue, key2);\n } else {\n defaultValue[key] = value;\n }\n } else {\n this.setParamsValue(defaultValue, key);\n }\n }\n }\n this.setComponent(\"components/ol-dialog-import\", \"open\", {\n column: JSON.parse(JSON.stringify(this.table.columnSource)),\n tableConfigId: this.tableConfig.id,\n json: json,\n defaultValue: defaultValue,\n saveParams: {\n dbName: this.tableConfig.dbName,\n tableName: this.tableConfig.mainTable,\n tableConfigId: this.tableConfig.id\n }\n });\n return;\n } else if (code == 'sortable') {\n this.sortableClick();\n return;\n } else if (code == 'sortableOk') {\n this.loading['sortableOk'] = true;\n this.sortableOkClick();\n return;\n }\n let customFunction = this.getToolBtn(code).customFunction;\n if (customFunction != undefined && customFunction.toString().trim().length > 0) {\n eval(customFunction);\n } else if (code == 'add') {\n this.showForm(code);\n }\n this.$emit('toolbarBtnClick', code);\n },\n setParamsValue(params, key) {\n key = key.trim();\n let v = this.table.formConfig.data[key];\n if (v == undefined) {\n v = this.parameter[key];\n }\n if (v != undefined) {\n params[key] = v;\n }\n },\n getBtnJson(code) {\n for (const toolBtn of this.operationBtn) {\n if (toolBtn.code == code) {\n return this.getSubParam(toolBtn.json);\n }\n }\n for (const toolBtn of this.toolBtn) {\n if (toolBtn.code == code) {\n return this.getSubParam(toolBtn.json);\n }\n }\n },\n getDeleteId(param) {\n for (let key of Object.keys(param)) {\n if (key != '$parentId') {\n return key;\n }\n }\n },\n sortableClick() {\n for (let toolBtn of this.toolBtn) {\n if (toolBtn.code == 'sortable') {\n toolBtn.values = !toolBtn.values;\n this.loading['sortableOk'] = false;\n this.setToolBtn('sortableOk', 'show', toolBtn.values);\n toolBtn.start = 999999;\n toolBtn.end = -1;\n if (toolBtn.values) {\n if (toolBtn.beforeFunction == undefined || toolBtn.beforeFunction == '' || toolBtn.beforeFunction.split(\",\") < 2) {\n message.error(\"排序字段未配置,请在做工具栏按钮配置中配置参数1(sort,id)\");\n return;\n }\n toolBtn.updateData = {};\n toolBtn.$elm = (0,_utils_TableSortUtil__WEBPACK_IMPORTED_MODULE_10__.updateSortRowCall)(this.$table, (oldIndex, newIndex) => {\n let start = Math.min(oldIndex, newIndex);\n let end = Math.max(oldIndex, newIndex);\n toolBtn.start = Math.min(start, toolBtn.start);\n toolBtn.end = Math.max(end, toolBtn.end);\n this.setToolBtn('sortableOk', 'disabled', false);\n this.table.data = (0,_utils_TableSortUtil__WEBPACK_IMPORTED_MODULE_10__.getNewArrDataToolBtn)(oldIndex, newIndex, this.table.data, toolBtn);\n });\n } else if (toolBtn.$elm) {\n this.setToolBtn('sortableOk', 'disabled', true);\n toolBtn.$elm.destroy();\n toolBtn.$elm = undefined;\n this.query();\n }\n return;\n }\n }\n },\n sortableOkClick() {\n for (let toolBtn of this.toolBtn) {\n if (toolBtn.code == 'sortable') {\n let url;\n this.loading['sortableOk'] = true;\n this.table.loading = true;\n let params = {\n list: [],\n dbName: this.tableConfig.dbName,\n tableName: this.tableConfig.mainTable\n };\n //sort,id 排序字段,更新主键\n let kw = toolBtn.beforeFunction.split(\",\");\n if (toolBtn.alterFunction) {\n url = toolBtn.alterFunction;\n } else {\n url = '/online/crud/batchModify';\n params.tableConfigId = this.tableConfig.id;\n }\n //这里肯定只有一个值\n for (let key of Object.keys(toolBtn.updateData)) {\n if (toolBtn.alterFunction) {\n let kv = {};\n kv[kw[1]] = key;\n kv[kw[0]] = toolBtn.updateData[key];\n params.list.push(kv);\n } else {\n let columnAndValueMap = {};\n let whereMap = {};\n whereMap[kw[1]] = key;\n columnAndValueMap[kw[0]] = toolBtn.updateData[key];\n params.list.push({\n columnAndValueMap,\n whereMap\n });\n }\n }\n (0,_utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_8__.post)(this.http, url, params).then(status => {\n if (status) {\n this.query();\n this.setToolBtn('sortableOk', 'disabled', true);\n }\n }).finally(() => {\n this.loading['sortableOk'] = false;\n this.table.loading = false;\n });\n }\n }\n },\n showRender(descCode, url, title) {\n (0,_utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_8__.get)(this.http, '/online/formDesigner/getOne', {\n descCode: descCode\n }, undefined, true).then(d => {\n let data = {\n type: 1,\n saveUrl: url,\n title: title,\n form: JSON.parse(d.formJson),\n tableConfigId: this.tableConfig.id\n };\n this.$refs[\"form\"].init(data, false);\n });\n },\n showForm(code, formData) {\n if (!formData) {\n formData = {};\n }\n let disabled = false;\n let btnJson = this.getBtnJson(code);\n //详情\n if (code == 'details') {\n disabled = true;\n code = 'edit';\n let btnJson2 = this.getBtnJson(code);\n if (btnJson2) {\n btnJson = {\n ...btnJson,\n ...btnJson2\n };\n } else if (btnJson2 !== undefined) {\n btnJson = btnJson2;\n }\n if (!btnJson || !btnJson.title) {\n btnJson.title = '详情';\n }\n }\n let form = this.formMainList[code];\n if (!form) {\n return;\n }\n let formJsonStr = form.formJson[form.formMain.designer == 0 ? 'optionJson' : 'customJson'];\n let data = {\n type: form.formMain.designer,\n saveUrl: form.formMain.saveUrl,\n requestType: form.formMain.requestType,\n updateKey: form.formMain.updateKey,\n otherProp: form.formMain.otherProp,\n formData,\n theme: this.theme,\n form: JSON.parse(formJsonStr),\n tableConfigId: this.tableConfig.id,\n dbName: this.tableConfig.dbName,\n tableName: this.tableConfig.mainTable,\n code,\n disabled\n };\n if (btnJson && btnJson.type == 1) {\n data.uuid = btnJson.subUuid;\n data.title = btnJson.title;\n data.deleteId = btnJson.deleteId;\n data.foreignKey = btnJson.subForeignKey;\n data.exBtnDisabled = btnJson.exBtnDisabled;\n this.$refs[\"subForm\"].init(data);\n } else {\n this.$nextTick(() => {\n data.title = btnJson.title;\n this.$refs[\"form\"].init(data);\n });\n }\n },\n async handleOperationClick(o) {\n let {\n obj,\n row\n } = o;\n if (obj.customFunction) {\n eval(obj.customFunction);\n } else if (obj.code == \"delete\") {\n this.remove(o);\n } else if (obj.code == 'edit' || obj.code == 'details' || obj.isForm == 1) {\n this.showForm(obj.code, row);\n }\n this.$emit(\"handleOperationClick\", o);\n },\n getSubParam(json) {\n let obj = {\n deleteId: this.getDeleteId(this.deleteParameter)\n }; // 初始化为空对象\n if (json) {\n return {\n ...obj,\n ...JSON.parse(json)\n };\n }\n return {\n ...obj\n };\n }\n },\n created() {\n dict.init(this.http);\n dictType.init(this.http);\n }\n};\nfunction rowCamelCase(o) {\n let obj = {};\n for (let key of Object.keys(o)) {\n if (key == 'XROWKEY') {\n continue;\n }\n let k = key;\n if (re(key)) {\n k = key.substring(3);\n }\n obj[(0,_utils_util__WEBPACK_IMPORTED_MODULE_6__.toCamelCase)(k)] = o[key];\n }\n return obj;\n}\nfunction re(k) {\n let reg = /^t\\d_/;\n return reg.test(k);\n}\nfunction doCallback(fn, args) {\n for (let arg of args) {\n fn.apply(this, arg);\n }\n}\nfunction doCallback2(fn, args) {\n fn.apply(this, args);\n}\n\n//# sourceURL=webpack://olp-table/./src/mixins/VTMixin/OTMixinBodyMethods.js?");
12724
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ OTMixinBodyMethods: function() { return /* binding */ OTMixinBodyMethods; }\n/* harmony export */ });\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.iterator.constructor.js */ \"./node_modules/core-js/modules/es.iterator.constructor.js\");\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_es_iterator_filter_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.iterator.filter.js */ \"./node_modules/core-js/modules/es.iterator.filter.js\");\n/* harmony import */ var core_js_modules_es_iterator_filter_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_filter_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_es_iterator_some_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.iterator.some.js */ \"./node_modules/core-js/modules/es.iterator.some.js\");\n/* harmony import */ var core_js_modules_es_iterator_some_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_some_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _store_dict__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/store/dict */ \"./src/store/dict.js\");\n/* harmony import */ var _store_dictType__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/store/dictType */ \"./src/store/dictType.js\");\n/* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/utils/util */ \"./src/utils/util.js\");\n/* harmony import */ var _utils_message__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/utils/message */ \"./src/utils/message.js\");\n/* harmony import */ var _utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/utils/http/httpUtils */ \"./src/utils/http/httpUtils.js\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! vue */ \"vue\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _utils_TableSortUtil__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/utils/TableSortUtil */ \"./src/utils/TableSortUtil.js\");\n/* harmony import */ var _mixins_VTMixin_DefaultMethods__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @/mixins/VTMixin/DefaultMethods */ \"./src/mixins/VTMixin/DefaultMethods.js\");\n/* harmony import */ var _directives_permission_hasPermi__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @/directives/permission/hasPermi */ \"./src/directives/permission/hasPermi.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst message = (0,_utils_message__WEBPACK_IMPORTED_MODULE_7__.useMessage)(); // 消息弹窗\nconst dict = (0,_store_dict__WEBPACK_IMPORTED_MODULE_4__.storeDict)();\nconst dictType = (0,_store_dictType__WEBPACK_IMPORTED_MODULE_5__.storeDictType)();\nconst OTMixinBodyMethods = {\n mixins: [_mixins_VTMixin_DefaultMethods__WEBPACK_IMPORTED_MODULE_11__.DefaultMethods],\n emits: ['handleOperationClick', 'toolbarBtnClick', 'initComponents', 'selectRowChange'],\n methods: {\n /**\r\n * 自定义表单方法\r\n * @returns {*}\r\n */\n customerForm(show) {\n this.toggleFormDisplay();\n this.table.formConfig.show = show == true;\n return this.table.formConfig;\n },\n /**\r\n * 搜索隐藏/显示\r\n */\n toggleFormDisplay() {\n // 获取组件的根 DOM 元素\n const rootEl = this.$refs[this.table.ref].$el;\n\n // 查询第一个子标签是否为 vxe-grid--form-wrapper\n const formWrapperEl = rootEl.querySelector('.vxe-grid--form-wrapper');\n if (formWrapperEl) {\n // 查询 formWrapperEl 下的第一个 form 标签\n const formEl = formWrapperEl.querySelector('form');\n if (formEl) {\n // 获取 form 标签的当前 display 样式\n const currentDisplay = window.getComputedStyle(formEl).display;\n\n // 根据当前 display 样式设置新的样式\n if (currentDisplay === 'none') {\n // 如果当前是 none,则移除 display 样式(设置为空字符串)\n formEl.style.display = '';\n } else {\n // 否则设置为 none\n formEl.style.display = 'none';\n }\n }\n }\n },\n /**\r\n * 选中回调\r\n */\n selectRowChange() {\n let rows = this.getSelectRows();\n if (!rows) {\n return;\n }\n this.pagination.selectionRowsLength = rows.length;\n this.setToolBtn('batchDelete', 'disabled', rows.length == 0);\n rows = this.selectBox == 1 ? rows[0] : rows;\n if (this.events['selectRowChange']) {\n this.events['selectRowChange'](rows);\n }\n this.$emit(\"selectRowChange\", rows);\n },\n /**\r\n * 切换表格最大化/还原\r\n */\n zoomEvent() {\n if (this.$table) {\n this.$table.zoom();\n this.isMaximized = this.$table.isMaximized();\n }\n },\n initToolBtn(toolBut) {\n let obj = undefined;\n for (let i = 0; i < toolBut.length; i++) {\n let toolButElement = toolBut[i];\n toolButElement.disabled = toolButElement.defaultDisabled == 1;\n toolButElement.show = toolButElement.defaultShow == 1;\n if (toolButElement.code == 'sortable') {\n toolButElement.values = false;\n obj = JSON.parse(JSON.stringify(toolButElement));\n obj.id = obj.id + \"_sortable\";\n obj.name = \"调整完成\";\n obj.code = \"sortableOk\";\n obj.icon = \"vxe-icon-check\";\n obj.show = false;\n obj.disabled = true;\n obj.index = i + 1;\n }\n }\n if (obj) {\n toolBut.splice(obj.index, 0, obj);\n }\n this.toolBtn = toolBut;\n },\n initOperationBtn(operationBtn) {\n this.operationBtn = operationBtn;\n let permissEx = 0;\n for (let i = 0; i < this.operationBtn.length; i++) {\n let operationBtnElement = this.operationBtn[i];\n let flag = (0,_directives_permission_hasPermi__WEBPACK_IMPORTED_MODULE_12__.doPermission)({\n parentNode: false\n }, [this.uuid + ':' + this.theme + ':' + operationBtnElement.code]);\n if (!flag) {\n operationBtnElement.permission = false;\n permissEx++;\n }\n }\n let length = this.operationBtn.length - permissEx;\n let width = 35;\n if (length != 0) {\n if (this.table.operationWidth) {\n width = this.table.operationWidth;\n } else {\n for (let o of this.operationBtn.filter(o => o.permission !== false)) {\n width += o.name.length * (35 - length) + (o.icon !== undefined ? 5 : 0);\n }\n }\n const hasOperateColumn = this.table.columns.some(col => ['操作'].includes(col.title));\n if (!hasOperateColumn) {\n this.table.columns.push({\n title: '操作',\n width: width,\n fixed: \"right\",\n slots: {\n default: 'operate'\n }\n });\n }\n }\n },\n initTree({\n tree,\n treeId,\n treeParentId\n }) {\n if (tree == 1) {\n this.table.treeConfig = {\n show: true,\n transform: false,\n indent: 15,\n reserve: tree,\n rowField: treeId,\n parentField: treeParentId,\n treeId: treeId,\n treeParentId: treeParentId,\n iconClose: \"vxe-icon-arrow-right\",\n iconOpen: \"vxe-icon-arrow-down\"\n };\n this.table.rowConfig.keyField = treeId;\n }\n },\n initFormMainList(formMainList) {\n this.formMainList = formMainList;\n },\n async doSetComponents(customUrl, method, props, multipleProps) {\n this.customUrl = (0,vue__WEBPACK_IMPORTED_MODULE_9__.markRaw)(customUrl);\n await this.$nextTick(async () => {\n if (multipleProps == '1' || multipleProps == true) {\n doCallback(this.$refs.components[method], props);\n } else if (multipleProps == '2') {\n doCallback2(this.$refs.components[method], props);\n } else {\n this.$refs.components[method](props);\n }\n });\n },\n setComponent(url, method, props, multipleProps) {\n if (url.indexOf(\"@\") == 0) {\n this.$emit('initComponents', {\n url: url,\n method: method,\n props: props,\n multipleProps: multipleProps,\n doSetComponents: this.doSetComponents\n });\n } else {\n this.doSetComponents(__webpack_require__(\"./src sync recursive ^\\\\.\\\\/.*$\")(`./${url}`).default, method, props, multipleProps);\n }\n },\n async toolbarBtnClick(code) {\n if (code == \"batchDelete\") {\n this.batchRemove();\n this.$emit('toolbarBtnClick', code);\n return;\n } else if (code == 'download') {\n this.setComponent(\"components/ol-dialog-excel\", \"open\", {\n column: JSON.parse(JSON.stringify(this.table.columnSource)),\n selectData: this.pagination.selectionRowsLength >= 1 ? '2' : '1'\n });\n return;\n } else if (code == 'upload') {\n let toolBtn = this.getToolBtn(code);\n let {\n json,\n beforeFunction\n } = toolBtn;\n if (json) {\n json = json.replace(/([{,]\\s*)([a-zA-Z0-9_]+)(\\s*:)/g, '$1\"$2\"$3').replace(/:(\\s*)'([^']+)'(\\s*[,}])/g, ':$1\"$2\"$3'); // 修正字符串值\n json = JSON.parse(json);\n }\n let defaultValue = {};\n if (beforeFunction) {\n // 第一次分割:按逗号分割成键值对\n //\"department_id=#{department_id},sex=1\"\n let pairs = beforeFunction.split(',');\n for (const pair of pairs) {\n // 第二次分割:按等号分割键和值\n let [key, value] = pair.split('=');\n if (value != undefined) {\n let value2 = value.toString().trim();\n if (value2.trim().startsWith('#{') && value2.endsWith('}')) {\n // 处理 #{department_id} 格式的值\n let key2 = value.slice(2, -1).trim(); // 去掉 #{ 和 }\n this.setParamsValue(defaultValue, key2);\n } else {\n defaultValue[key] = value;\n }\n } else {\n this.setParamsValue(defaultValue, key);\n }\n }\n }\n this.setComponent(\"components/ol-dialog-import\", \"open\", {\n column: JSON.parse(JSON.stringify(this.table.columnSource)),\n tableConfigId: this.tableConfig.id,\n json: json,\n defaultValue: defaultValue,\n saveParams: {\n dbName: this.tableConfig.dbName,\n tableName: this.tableConfig.mainTable,\n tableConfigId: this.tableConfig.id\n }\n });\n return;\n } else if (code == 'sortable') {\n this.sortableClick();\n return;\n } else if (code == 'sortableOk') {\n this.loading['sortableOk'] = true;\n this.sortableOkClick();\n return;\n }\n let customFunction = this.getToolBtn(code).customFunction;\n if (customFunction != undefined && customFunction.toString().trim().length > 0) {\n eval(customFunction);\n } else if (code == 'add') {\n this.showForm(code);\n }\n this.$emit('toolbarBtnClick', code);\n },\n setParamsValue(params, key) {\n key = key.trim();\n let v = this.table.formConfig.data[key];\n if (v == undefined) {\n v = this.parameter[key];\n }\n if (v != undefined) {\n params[key] = v;\n }\n },\n getBtnJson(code) {\n for (const toolBtn of this.operationBtn) {\n if (toolBtn.code == code) {\n return this.getSubParam(toolBtn.json);\n }\n }\n for (const toolBtn of this.toolBtn) {\n if (toolBtn.code == code) {\n return this.getSubParam(toolBtn.json);\n }\n }\n },\n getDeleteId(param) {\n for (let key of Object.keys(param)) {\n if (key != '$parentId') {\n return key;\n }\n }\n },\n sortableClick() {\n for (let toolBtn of this.toolBtn) {\n if (toolBtn.code == 'sortable') {\n toolBtn.values = !toolBtn.values;\n this.loading['sortableOk'] = false;\n this.setToolBtn('sortableOk', 'show', toolBtn.values);\n toolBtn.start = 999999;\n toolBtn.end = -1;\n if (toolBtn.values) {\n if (toolBtn.beforeFunction == undefined || toolBtn.beforeFunction == '' || toolBtn.beforeFunction.split(\",\") < 2) {\n message.error(\"排序字段未配置,请在做工具栏按钮配置中配置参数1(sort,id)\");\n return;\n }\n toolBtn.updateData = {};\n toolBtn.$elm = (0,_utils_TableSortUtil__WEBPACK_IMPORTED_MODULE_10__.updateSortRowCall)(this.$table, (oldIndex, newIndex) => {\n let start = Math.min(oldIndex, newIndex);\n let end = Math.max(oldIndex, newIndex);\n toolBtn.start = Math.min(start, toolBtn.start);\n toolBtn.end = Math.max(end, toolBtn.end);\n this.setToolBtn('sortableOk', 'disabled', false);\n this.table.data = (0,_utils_TableSortUtil__WEBPACK_IMPORTED_MODULE_10__.getNewArrDataToolBtn)(oldIndex, newIndex, this.table.data, toolBtn);\n });\n } else if (toolBtn.$elm) {\n this.setToolBtn('sortableOk', 'disabled', true);\n toolBtn.$elm.destroy();\n toolBtn.$elm = undefined;\n this.query();\n }\n return;\n }\n }\n },\n sortableOkClick() {\n for (let toolBtn of this.toolBtn) {\n if (toolBtn.code == 'sortable') {\n let url;\n this.loading['sortableOk'] = true;\n this.table.loading = true;\n let params = {\n list: [],\n dbName: this.tableConfig.dbName,\n tableName: this.tableConfig.mainTable\n };\n //sort,id 排序字段,更新主键\n let kw = toolBtn.beforeFunction.split(\",\");\n if (toolBtn.alterFunction) {\n url = toolBtn.alterFunction;\n } else {\n url = '/online/crud/batchModify';\n params.tableConfigId = this.tableConfig.id;\n }\n //这里肯定只有一个值\n for (let key of Object.keys(toolBtn.updateData)) {\n if (toolBtn.alterFunction) {\n let kv = {};\n kv[kw[1]] = key;\n kv[kw[0]] = toolBtn.updateData[key];\n params.list.push(kv);\n } else {\n let columnAndValueMap = {};\n let whereMap = {};\n whereMap[kw[1]] = key;\n columnAndValueMap[kw[0]] = toolBtn.updateData[key];\n params.list.push({\n columnAndValueMap,\n whereMap\n });\n }\n }\n (0,_utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_8__.post)(this.http, url, params).then(status => {\n if (status) {\n this.query();\n this.setToolBtn('sortableOk', 'disabled', true);\n }\n }).finally(() => {\n this.loading['sortableOk'] = false;\n this.table.loading = false;\n });\n }\n }\n },\n showRender(descCode, url, title) {\n (0,_utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_8__.get)(this.http, '/online/formDesigner/getOne', {\n descCode: descCode\n }, undefined, true).then(d => {\n let data = {\n type: 1,\n saveUrl: url,\n title: title,\n form: JSON.parse(d.formJson),\n tableConfigId: this.tableConfig.id\n };\n this.$refs[\"form\"].init(data, false);\n });\n },\n showForm(code, formData, js) {\n if (!formData) {\n formData = {};\n }\n let disabled = false;\n let btnJson = this.getBtnJson(code);\n //详情\n if (code == 'details') {\n disabled = true;\n code = 'edit';\n let btnJson2 = this.getBtnJson(code);\n if (btnJson2) {\n btnJson = {\n ...btnJson,\n ...btnJson2\n };\n } else if (btnJson2 !== undefined) {\n btnJson = btnJson2;\n }\n if (!btnJson || !btnJson.title) {\n btnJson.title = '详情';\n }\n }\n let form = this.formMainList[code];\n if (!form) {\n return;\n }\n let formJsonStr = form.formJson[form.formMain.designer == 0 ? 'optionJson' : 'customJson'];\n let data = {\n type: form.formMain.designer,\n saveUrl: form.formMain.saveUrl,\n requestType: form.formMain.requestType,\n updateKey: form.formMain.updateKey,\n otherProp: form.formMain.otherProp,\n formData,\n theme: this.theme,\n form: JSON.parse(formJsonStr),\n tableConfigId: this.tableConfig.id,\n dbName: this.tableConfig.dbName,\n tableName: this.tableConfig.mainTable,\n code,\n disabled\n };\n if (btnJson && btnJson.type == 1) {\n data.uuid = btnJson.subUuid;\n data.title = btnJson.title;\n data.deleteId = btnJson.deleteId;\n data.foreignKey = btnJson.subForeignKey;\n data.exBtnDisabled = btnJson.exBtnDisabled;\n this.$refs[\"subForm\"].init(data, js);\n } else {\n this.$nextTick(() => {\n data.title = btnJson.title;\n this.$refs[\"form\"].init(data, js);\n });\n }\n },\n async handleOperationClick(o) {\n let {\n obj,\n row\n } = o;\n if (obj.customFunction) {\n eval(obj.customFunction);\n } else if (obj.code == \"delete\") {\n this.remove(o);\n } else if (obj.code == 'edit' || obj.code == 'details' || obj.isForm == 1) {\n this.showForm(obj.code, row);\n }\n this.$emit(\"handleOperationClick\", o);\n },\n getSubParam(json) {\n let obj = {\n deleteId: this.getDeleteId(this.deleteParameter)\n }; // 初始化为空对象\n if (json) {\n return {\n ...obj,\n ...JSON.parse(json)\n };\n }\n return {\n ...obj\n };\n }\n },\n created() {\n dict.init(this.http);\n dictType.init(this.http);\n }\n};\nfunction rowCamelCase(o) {\n let obj = {};\n for (let key of Object.keys(o)) {\n if (key == 'XROWKEY') {\n continue;\n }\n let k = key;\n if (re(key)) {\n k = key.substring(3);\n }\n obj[(0,_utils_util__WEBPACK_IMPORTED_MODULE_6__.toCamelCase)(k)] = o[key];\n }\n return obj;\n}\nfunction re(k) {\n let reg = /^t\\d_/;\n return reg.test(k);\n}\nfunction doCallback(fn, args) {\n for (let arg of args) {\n fn.apply(this, arg);\n }\n}\nfunction doCallback2(fn, args) {\n fn.apply(this, args);\n}\n\n//# sourceURL=webpack://olp-table/./src/mixins/VTMixin/OTMixinBodyMethods.js?");
12725
12725
 
12726
12726
  /***/ }),
12727
12727