olp-table 7.2.102 → 7.2.103

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.
package/olp-table.umd.js CHANGED
@@ -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: '2034875354140880896',\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(this.http);\n dictType.refresh(this.http);\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-82.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: '2000861603750055936',\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(this.http);\n dictType.refresh(this.http);\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-82.use%5B0%5D!./node_modules/vue-loader/dist/index.js??ruleSet%5B0%5D.use%5B0%5D");
282
282
 
283
283
  /***/ }),
284
284
 
@@ -366,7 +366,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
366
366
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
367
367
 
368
368
  "use strict";
369
- eval("__webpack_require__.r(__webpack_exports__);\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_find_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.iterator.find.js */ \"./node_modules/core-js/modules/es.iterator.find.js\");\n/* harmony import */ var core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_4__ = __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_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.iterator.map.js */ \"./node_modules/core-js/modules/es.iterator.map.js\");\n/* harmony import */ var core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _utils_message__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/utils/message */ \"./src/utils/message.js\");\n/* harmony import */ var _utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/utils/http/httpUtils */ \"./src/utils/http/httpUtils.js\");\n/* harmony import */ var _utils_ExcelUtil__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/utils/ExcelUtil */ \"./src/utils/ExcelUtil.js\");\n/* harmony import */ var _store_dict__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/store/dict */ \"./src/store/dict.js\");\n/* harmony import */ var _utils_AESCRUDUtils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/utils/AESCRUDUtils */ \"./src/utils/AESCRUDUtils.js\");\n\n\n\n\n\n\n\n\n\n\n\nconst dict = (0,_store_dict__WEBPACK_IMPORTED_MODULE_9__.storeDict)();\nconst message = (0,_utils_message__WEBPACK_IMPORTED_MODULE_6__.useMessage)(); // 消息弹窗\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'olDialogImport',\n inject: ['http'],\n props: {\n title: {\n default: '导入数据'\n },\n name: {\n default: '导入数据'\n },\n width: {\n default: 800\n },\n draggable: {\n default: true\n },\n center: {\n default: false\n },\n selectData: {\n default: '1'\n }\n },\n data() {\n return {\n form: {\n selectData: ''\n },\n saveParams: {},\n show: '',\n formData: {},\n gridOptions: {\n border: true,\n keepSource: true,\n showOverflow: true,\n loading: false,\n height: 330,\n align: 'left',\n scrollX: {\n enabled: true,\n gt: 15\n },\n scrollY: {\n enabled: true,\n gt: 0\n },\n columnConfig: {\n resizable: true\n },\n rowConfig: {\n isCurrent: true,\n useKey: true,\n keyField: 'id'\n },\n expandConfig: {\n labelField: 'seq'\n },\n editConfig: {\n trigger: 'click',\n mode: 'row',\n showStatus: true\n },\n checkboxConfig: {\n labelField: 'title',\n reserve: true,\n highlight: true,\n range: true,\n checkAll: false\n },\n columns: [],\n data: [],\n toolbarConfig: {},\n initColumns: [{\n type: 'checkbox',\n width: 50,\n fixed: 'left'\n }, {\n type: 'seq',\n title: '序号',\n width: 50,\n fixed: 'left'\n }]\n },\n genIdMap: undefined,\n defaultValue: undefined,\n url: '/online/crud/batchSave'\n };\n },\n methods: {\n customUpload(param) {\n const formData = new FormData();\n // 添加文件\n formData.append('file', param.file);\n // 使用 axios 或其他 HTTP 客户端发送请求\n this.http.upload('/online/crud/upload', formData).then(response => {\n this.onChange(response);\n }).catch(error => {\n console.error('上传失败:', error);\n });\n },\n submit() {\n if (!this.gridOptions.data || this.gridOptions.data.length == 0) return message.error('导入数据为空!');\n let params = this.getParams();\n this.gridOptions.loading = true;\n (0,_utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_7__.request)(this.http, {\n url: '/online/crudAes/batchSave',\n method: 'post',\n data: (0,_utils_AESCRUDUtils__WEBPACK_IMPORTED_MODULE_10__.encryptWithCompress)(params),\n timeout: 1000 * 90 * 90\n }, false, false).then(({\n msg,\n code\n }) => {\n if (code == 200) {\n this.show = false;\n this.$emit('emits', {\n m: 'query'\n });\n message.success(msg);\n } else {\n message.error(msg);\n }\n }).finally(() => {\n this.gridOptions.loading = false;\n });\n },\n open({\n column,\n saveParams,\n json,\n defaultValue\n }) {\n if (json) {\n if (json.genIdMap) {\n this.genIdMap = json.genIdMap;\n }\n if (json.url) {\n this.url = json.url;\n }\n }\n this.defaultValue = defaultValue;\n this.saveParams = saveParams;\n this.show = true;\n let columns = column.filter(o => o.visible == 1 && o.importToOtherProp != 1);\n columns.push(...this.gridOptions.initColumns);\n this.gridOptions.columns = columns;\n this.$refs.xGrid.loadColumn(this.gridOptions.columns);\n },\n handleChange(value) {\n // 1. 获取选中的选项对象\n const selectedItem = this.gridOptions.columns.find(o => o.field && o.field === value);\n if (selectedItem) {\n let que = [];\n for (let j = 0; j < this.gridOptions.data.length; j++) {\n let data = this.gridOptions.data[j];\n if (!data || !data[value]) {\n return message.warning(selectedItem.title + '数据为空!');\n }\n if (j == 0) {\n que.push(data[value]);\n continue;\n }\n let index = que.indexOf(data[value]);\n if (index != -1) {\n if (this.$refs.xGrid) {\n // 获取重复行的索引\n this.$refs.xGrid.scrollToRow(data); // 滚动到对应行\n this.$refs.xGrid.setCurrentRow(data); // 高亮\n // this.$refs.xGrid.toggleCheckboxRow(data); // 选中\n }\n return message.warning('第' + (j + 1) + '行-第' + (index + 1) + '行数据不唯-:' + data[value]);\n }\n que.push(data[value]);\n }\n message.success(selectedItem.title + '无重复数据!');\n }\n },\n selectRowChange() {\n this.formData.disabled = this.$refs.xGrid.getCheckboxRecords(true).length == 0;\n this.formData.selected_but = this.formData.disabled ? 'unselected_but' : 'selected_but';\n },\n batchRemove() {\n let records = this.$refs.xGrid.getCheckboxRecords(true);\n if (!records || records.length == 0) return message.error('未选中数据!');\n this.$refs.xGrid.removeCheckboxRow();\n const selectedIds = records.map(row => row.id);\n\n // 过滤掉已删除的行,更新数据源\n this.gridOptions.data = this.gridOptions.data.filter(item => !selectedIds.includes(item.id));\n this.formData.uniCode = '';\n this.selectRowChange();\n },\n getParams() {\n return {\n ...this.saveParams,\n genIdMap: this.genIdMap,\n columnAndValueListMap: this.getDataByDict(this.gridOptions.data)\n };\n },\n onChange({\n data\n }) {\n data = this.getDataByTitle(data);\n this.setDefaultValue(data);\n this.gridOptions.data = data;\n },\n setDefaultValue(data) {\n if (this.defaultValue) {\n for (let key of Object.keys(this.defaultValue)) {\n for (let datum of data) {\n datum[key] = this.defaultValue[key];\n }\n }\n }\n },\n getDataByTitle(data) {\n if (data && data.length >= 1) {\n let rows = [];\n data.map(row => {\n let obj = {};\n for (let key in row) {\n this.gridOptions.columns.forEach(item => {\n if (item.title == key) {\n obj[item.field] = row[key];\n }\n });\n }\n rows.push(obj);\n });\n return rows;\n }\n },\n getDataByDict(data) {\n if (data && data.length >= 1) {\n let rows = [];\n data.map(row => {\n let obj = {};\n for (let key in row) {\n this.gridOptions.columns.forEach(item => {\n if (item.field == key && item.tableSaveToOtherProp != 1) {\n obj[item.field] = this.getRowValue(item.dictCode, row[key]);\n }\n });\n }\n rows.push(obj);\n });\n this.setDefaultValue(rows);\n return rows;\n }\n },\n download() {\n (0,_utils_ExcelUtil__WEBPACK_IMPORTED_MODULE_8__.exportExcel)({\n data: [],\n name: '模板下载',\n columns: this.gridOptions.columns.filter(o => o.field),\n option: {\n align: 'center'\n }\n });\n },\n init(id) {\n this.gridOptions.loading = true;\n (0,_utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_7__.get)(this.http, this.gridOptions.url, {\n id: id\n }, true).then(res => {\n for (const data of res) {\n data.width = 100;\n }\n res.push(...this.gridOptions.initColumns);\n this.gridOptions.columns = res;\n this.gridOptions.loading = false;\n });\n },\n getRowValue(dictCode, val) {\n if (dictCode) {\n return this.getDictValueByCode(dictCode, val);\n }\n return val;\n },\n getDictValueByCode(dictCode, val) {\n for (const option of dict.val(dictCode)) {\n if (option.label == val) {\n return option;\n }\n }\n return val;\n },\n close() {\n this.$emit('emits', {});\n this.show = false;\n }\n },\n created() {\n this.formData = {\n action: this.http.axios().defaults.baseURL + '/online/crud/upload',\n uniCode: '',\n headers: this.http.axios().defaults.headers,\n disabled: true,\n selected_but: 'unselected_but'\n };\n }\n});\n\n//# sourceURL=webpack://olp-table/./src/components/ol-dialog-import.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use%5B0%5D!./node_modules/vue-loader/dist/index.js??ruleSet%5B0%5D.use%5B0%5D");
369
+ eval("__webpack_require__.r(__webpack_exports__);\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_find_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.iterator.find.js */ \"./node_modules/core-js/modules/es.iterator.find.js\");\n/* harmony import */ var core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_4__ = __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_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.iterator.map.js */ \"./node_modules/core-js/modules/es.iterator.map.js\");\n/* harmony import */ var core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _utils_message__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/utils/message */ \"./src/utils/message.js\");\n/* harmony import */ var _utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/utils/http/httpUtils */ \"./src/utils/http/httpUtils.js\");\n/* harmony import */ var _utils_ExcelUtil__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/utils/ExcelUtil */ \"./src/utils/ExcelUtil.js\");\n/* harmony import */ var _store_dict__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/store/dict */ \"./src/store/dict.js\");\n/* harmony import */ var _utils_AESCRUDUtils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/utils/AESCRUDUtils */ \"./src/utils/AESCRUDUtils.js\");\n\n\n\n\n\n\n\n\n\n\n\nconst dict = (0,_store_dict__WEBPACK_IMPORTED_MODULE_9__.storeDict)();\nconst message = (0,_utils_message__WEBPACK_IMPORTED_MODULE_6__.useMessage)(); // 消息弹窗\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'olDialogImport',\n inject: ['http'],\n props: {\n title: {\n default: '导入数据'\n },\n name: {\n default: '导入数据'\n },\n width: {\n default: 800\n },\n draggable: {\n default: true\n },\n center: {\n default: false\n },\n selectData: {\n default: '1'\n }\n },\n data() {\n return {\n form: {\n selectData: ''\n },\n saveParams: {},\n show: '',\n formData: {},\n gridOptions: {\n border: true,\n keepSource: true,\n showOverflow: true,\n loading: false,\n height: 330,\n align: 'left',\n scrollX: {\n enabled: true,\n gt: 15\n },\n scrollY: {\n enabled: true,\n gt: 0\n },\n columnConfig: {\n resizable: true\n },\n rowConfig: {\n isCurrent: true,\n useKey: true,\n keyField: 'id'\n },\n expandConfig: {\n labelField: 'seq'\n },\n editConfig: {\n trigger: 'click',\n mode: 'row',\n showStatus: true\n },\n checkboxConfig: {\n labelField: 'title',\n reserve: true,\n highlight: true,\n range: true,\n checkAll: false\n },\n columns: [],\n data: [],\n toolbarConfig: {},\n initColumns: [{\n type: 'checkbox',\n width: 50,\n fixed: 'left'\n }, {\n type: 'seq',\n title: '序号',\n width: 50,\n fixed: 'left'\n }]\n },\n genIdMap: undefined,\n defaultValue: undefined,\n url: '/online/crudAes/batchSave'\n };\n },\n methods: {\n customUpload(param) {\n const formData = new FormData();\n // 添加文件\n formData.append('file', param.file);\n // 使用 axios 或其他 HTTP 客户端发送请求\n this.http.upload('/online/crud/upload', formData).then(response => {\n this.onChange(response);\n }).catch(error => {\n console.error('上传失败:', error);\n });\n },\n submit() {\n if (!this.gridOptions.data || this.gridOptions.data.length == 0) return message.error('导入数据为空!');\n this.gridOptions.loading = true;\n (0,_utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_7__.request)(this.http, {\n url: this.url,\n method: 'post',\n data: this.url === '/online/crudAes/batchSave' ? (0,_utils_AESCRUDUtils__WEBPACK_IMPORTED_MODULE_10__.encryptWithCompress)(this.getParams()) : this.gridOptions.data,\n timeout: 1000 * 90 * 90\n }, false, false).then(({\n msg,\n code,\n data\n }) => {\n if (data instanceof Array) {\n // 过滤表格数据:只保留 id 在返回成功数组里的项\n this.gridOptions.data = this.gridOptions.data.filter(item => {\n return data.includes(item.id);\n });\n message.warning(msg);\n } else if (code == 200) {\n this.show = false;\n this.$emit('emits', {\n m: 'query'\n });\n message.success(msg);\n } else {\n message.error(msg);\n }\n }).finally(() => {\n this.gridOptions.loading = false;\n });\n },\n open({\n column,\n saveParams,\n json,\n defaultValue\n }) {\n if (json) {\n if (json.genIdMap) {\n this.genIdMap = json.genIdMap;\n }\n if (json.url) {\n this.url = json.url;\n }\n }\n this.defaultValue = defaultValue;\n this.saveParams = saveParams;\n this.show = true;\n let columns = column.filter(o => o.visible == 1 && o.importToOtherProp != 1);\n columns.push(...this.gridOptions.initColumns);\n this.gridOptions.columns = columns;\n this.$refs.xGrid.loadColumn(this.gridOptions.columns);\n },\n handleChange(value) {\n // 1. 获取选中的选项对象\n const selectedItem = this.gridOptions.columns.find(o => o.field && o.field === value);\n if (selectedItem) {\n let que = [];\n for (let j = 0; j < this.gridOptions.data.length; j++) {\n let data = this.gridOptions.data[j];\n if (!data || !data[value]) {\n return message.warning(selectedItem.title + '数据为空!');\n }\n if (j == 0) {\n que.push(data[value]);\n continue;\n }\n let index = que.indexOf(data[value]);\n if (index != -1) {\n if (this.$refs.xGrid) {\n // 获取重复行的索引\n this.$refs.xGrid.scrollToRow(data); // 滚动到对应行\n this.$refs.xGrid.setCurrentRow(data); // 高亮\n // this.$refs.xGrid.toggleCheckboxRow(data); // 选中\n }\n return message.warning('第' + (j + 1) + '行-第' + (index + 1) + '行数据不唯-:' + data[value]);\n }\n que.push(data[value]);\n }\n message.success(selectedItem.title + '无重复数据!');\n }\n },\n selectRowChange() {\n this.formData.disabled = this.$refs.xGrid.getCheckboxRecords(true).length == 0;\n this.formData.selected_but = this.formData.disabled ? 'unselected_but' : 'selected_but';\n },\n batchRemove() {\n let records = this.$refs.xGrid.getCheckboxRecords(true);\n if (!records || records.length == 0) return message.error('未选中数据!');\n this.$refs.xGrid.removeCheckboxRow();\n const selectedIds = records.map(row => row.id);\n\n // 过滤掉已删除的行,更新数据源\n this.gridOptions.data = this.gridOptions.data.filter(item => !selectedIds.includes(item.id));\n this.formData.uniCode = '';\n this.selectRowChange();\n },\n getParams() {\n return {\n ...this.saveParams,\n genIdMap: this.genIdMap,\n columnAndValueListMap: this.getDataByDict(this.gridOptions.data)\n };\n },\n onChange({\n data\n }) {\n data = this.getDataByTitle(data);\n this.setDefaultValue(data);\n this.gridOptions.data = data;\n },\n setDefaultValue(data) {\n if (this.defaultValue) {\n for (let key of Object.keys(this.defaultValue)) {\n for (let datum of data) {\n datum[key] = this.defaultValue[key];\n }\n }\n }\n },\n getDataByTitle(data) {\n if (data && data.length >= 1) {\n let rows = [];\n data.map(row => {\n let obj = {};\n for (let key in row) {\n this.gridOptions.columns.forEach(item => {\n if (item.title == key) {\n obj[item.field] = row[key];\n }\n });\n }\n rows.push(obj);\n });\n return rows;\n }\n },\n getDataByDict(data) {\n if (data && data.length >= 1) {\n let rows = [];\n data.map(row => {\n let obj = {};\n for (let key in row) {\n this.gridOptions.columns.forEach(item => {\n if (item.field == key && item.tableSaveToOtherProp != 1) {\n obj[item.field] = this.getRowValue(item.dictCode, row[key]);\n }\n });\n }\n rows.push(obj);\n });\n this.setDefaultValue(rows);\n return rows;\n }\n },\n download() {\n (0,_utils_ExcelUtil__WEBPACK_IMPORTED_MODULE_8__.exportExcel)({\n data: [],\n name: '模板下载',\n columns: this.gridOptions.columns.filter(o => o.field),\n option: {\n align: 'center'\n }\n });\n },\n getRowValue(dictCode, val) {\n if (dictCode) {\n return this.getDictValueByCode(dictCode, val);\n }\n return val;\n },\n getDictValueByCode(dictCode, val) {\n for (const option of dict.val(dictCode)) {\n if (option.label == val) {\n return option;\n }\n }\n return val;\n },\n close() {\n this.$emit('emits', {});\n this.show = false;\n }\n },\n created() {\n this.formData = {\n action: this.http.axios().defaults.baseURL + '/online/crud/upload',\n uniCode: '',\n headers: this.http.axios().defaults.headers,\n disabled: true,\n selected_but: 'unselected_but'\n };\n }\n});\n\n//# sourceURL=webpack://olp-table/./src/components/ol-dialog-import.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use%5B0%5D!./node_modules/vue-loader/dist/index.js??ruleSet%5B0%5D.use%5B0%5D");
370
370
 
371
371
  /***/ }),
372
372
 
@@ -410,7 +410,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
410
410
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
411
411
 
412
412
  "use strict";
413
- eval("__webpack_require__.r(__webpack_exports__);\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 _utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/utils/http/httpUtils */ \"./src/utils/http/httpUtils.js\");\n/* harmony import */ var _utils_message__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/utils/message */ \"./src/utils/message.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'olDialogUploadFile',\n inject: ['http'],\n data() {\n return {\n title: '上传文件',\n show: false,\n fileList: [],\n okIndex: 0,\n multiple: true,\n loading: true,\n url: '',\n autoClose: false,\n query: false,\n js: '',\n okFileInfos: []\n };\n },\n methods: {\n getFile(uid) {\n for (let i = 0; i < this.fileList.length; i++) {\n if (this.fileList[i].uid == uid) {\n return i;\n }\n }\n },\n onchange(file, fileList) {\n this.fileList = fileList;\n if (this.multiple == false) {\n this.uploadFile();\n } else {\n this.loading = false;\n }\n },\n async uploadFile(index) {\n if (this.fileList.length == 0) {\n (0,_utils_message__WEBPACK_IMPORTED_MODULE_2__.useMessage)().error(\"请选择文件!\");\n return;\n }\n let length = this.fileList.length;\n let i = 0;\n let thIndex = index == undefined || typeof index !== 'number' ? 0 : index;\n console.info(\"thIndex\", thIndex);\n this.loading = true;\n while (i < length) {\n let file = this.fileList[thIndex];\n console.info(file.name + \"上传中...\", file);\n file.percentCompleted = 0;\n const formData = new FormData();\n formData.append('files', file.raw);\n //调用文件上传接口\n await (0,_utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_1__.upload)(this.http, this.url, formData, progressEvent => {\n const percentCompleted = Math.round(progressEvent.loaded * 100 / progressEvent.total);\n file.percentCompleted = percentCompleted + \"%\";\n }).then(({\n code,\n msg,\n data\n }) => {\n if (code === 200 || code === 0) {\n this.okFileInfos.push({\n name: file.name,\n path: data?.path,\n configId: data?.configId,\n suffix: this.getFileExtension(file.name)\n });\n this.okIndex++;\n this.fileList.splice(thIndex, 1);\n } else {\n file.percentCompleted = \"上传失败\";\n file.message = msg;\n thIndex++;\n }\n }).catch(error => {\n thIndex++;\n // 上传失败处理逻辑\n console.error('上传失败', error);\n });\n // if (index != undefined) {\n // break\n // }\n i++;\n }\n this.loading = false;\n if (this.okIndex === 0) {\n (0,_utils_message__WEBPACK_IMPORTED_MODULE_2__.useMessage)().error(\"上传失败!\");\n } else {\n // console.info('上传成功文件:', this.okFileInfos);\n (0,_utils_message__WEBPACK_IMPORTED_MODULE_2__.useMessage)().success(\"上传成功!\");\n if (this.autoClose || this.multiple == false) {\n this.close();\n }\n }\n },\n getFileExtension(filename) {\n // 检查字符串是否有效\n if (typeof filename !== 'string') {\n return '';\n }\n // 使用 lastIndexOf 和 substring 方法提取后缀\n const lastDotIndex = filename.lastIndexOf('.');\n // 如果找不到点,返回空字符串,表示没有后缀\n if (lastDotIndex === -1) {\n return '';\n }\n // 提取并返回后缀名(不包括点)\n return filename.substring(lastDotIndex + 1);\n },\n close() {\n let args = {\n js: this.js,\n v: this.okFileInfos\n };\n if (this.okIndex !== 0 && this.query) {\n args.m = 'query';\n }\n // console.info(\"关闭上传文件窗口!!!!!!!!\", args);\n this.$emit(\"emits\", args);\n this.show = false;\n },\n init(obj) {\n this.okFileInfos = [];\n this.fileList = [];\n this.okIndex = 0;\n let {\n url,\n title,\n autoClose,\n multiple,\n query,\n js\n } = obj;\n if (!url) {\n url = obj;\n }\n if (!url) {\n (0,_utils_message__WEBPACK_IMPORTED_MODULE_2__.useMessage)().error(\"请填写上传文件url!\");\n return;\n }\n this.query = query != false;\n this.js = js;\n this.show = true;\n this.url = url;\n this.title = title ? title : this.title;\n this.autoClose = autoClose != undefined ? autoClose : this.autoClose;\n this.multiple = multiple != undefined ? multiple : this.multiple;\n this.$nextTick(() => {\n this.$refs.selectFiles.$el.click();\n setTimeout(() => {\n this.loading = false;\n }, 300);\n });\n }\n }\n});\n\n//# sourceURL=webpack://olp-table/./src/components/ol-dialog-upload-file.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use%5B0%5D!./node_modules/vue-loader/dist/index.js??ruleSet%5B0%5D.use%5B0%5D");
413
+ eval("__webpack_require__.r(__webpack_exports__);\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 _utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/utils/http/httpUtils */ \"./src/utils/http/httpUtils.js\");\n/* harmony import */ var _utils_message__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/utils/message */ \"./src/utils/message.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'olDialogUploadFile',\n inject: ['http'],\n data() {\n return {\n title: '上传文件',\n show: false,\n fileList: [],\n okIndex: 0,\n multiple: true,\n loading: true,\n url: '',\n autoClose: false,\n query: false,\n js: '',\n okFileInfos: []\n };\n },\n methods: {\n getFile(uid) {\n for (let i = 0; i < this.fileList.length; i++) {\n if (this.fileList[i].uid == uid) {\n return i;\n }\n }\n },\n onchange(file, fileList) {\n this.fileList = fileList;\n if (this.multiple == false) {\n this.uploadFile();\n } else {\n this.loading = false;\n }\n },\n async uploadFile(index) {\n if (this.fileList.length == 0) {\n (0,_utils_message__WEBPACK_IMPORTED_MODULE_2__.useMessage)().error(\"请选择文件!\");\n return;\n }\n let length = this.fileList.length;\n let i = 0;\n let thIndex = index == undefined || typeof index !== 'number' ? 0 : index;\n this.loading = true;\n while (i < length) {\n let file = this.fileList[thIndex];\n console.info(file.name + \"上传中...\", file);\n file.percentCompleted = 0;\n const formData = new FormData();\n formData.append('files', file.raw);\n //调用文件上传接口\n await (0,_utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_1__.upload)(this.http, this.url, formData, progressEvent => {\n const percentCompleted = Math.round(progressEvent.loaded * 100 / progressEvent.total);\n file.percentCompleted = percentCompleted + \"%\";\n }).then(({\n code,\n msg,\n data\n }) => {\n if (code === 200 || code === 0) {\n this.okFileInfos.push({\n name: file.name,\n path: data?.path,\n configId: data?.configId,\n suffix: this.getFileExtension(file.name)\n });\n this.okIndex++;\n this.fileList.splice(thIndex, 1);\n } else {\n file.percentCompleted = \"上传失败\";\n file.message = msg;\n thIndex++;\n }\n }).catch(error => {\n thIndex++;\n // 上传失败处理逻辑\n console.error('上传失败', error);\n });\n // if (index != undefined) {\n // break\n // }\n i++;\n }\n this.loading = false;\n if (this.okIndex === 0) {\n (0,_utils_message__WEBPACK_IMPORTED_MODULE_2__.useMessage)().error(\"上传失败!\");\n } else {\n // console.info('上传成功文件:', this.okFileInfos);\n (0,_utils_message__WEBPACK_IMPORTED_MODULE_2__.useMessage)().success(\"上传成功!\");\n if (this.autoClose || this.multiple == false) {\n this.close();\n }\n }\n },\n getFileExtension(filename) {\n // 检查字符串是否有效\n if (typeof filename !== 'string') {\n return '';\n }\n // 使用 lastIndexOf 和 substring 方法提取后缀\n const lastDotIndex = filename.lastIndexOf('.');\n // 如果找不到点,返回空字符串,表示没有后缀\n if (lastDotIndex === -1) {\n return '';\n }\n // 提取并返回后缀名(不包括点)\n return filename.substring(lastDotIndex + 1);\n },\n close() {\n let args = {\n js: this.js,\n v: this.okFileInfos\n };\n if (this.okIndex !== 0 && this.query) {\n args.m = 'query';\n }\n // console.info(\"关闭上传文件窗口!!!!!!!!\", args);\n this.$emit(\"emits\", args);\n this.show = false;\n },\n init(obj) {\n this.okFileInfos = [];\n this.fileList = [];\n this.okIndex = 0;\n let {\n url,\n title,\n autoClose,\n multiple,\n query,\n js\n } = obj;\n if (!url) {\n url = obj;\n }\n if (!url) {\n (0,_utils_message__WEBPACK_IMPORTED_MODULE_2__.useMessage)().error(\"请填写上传文件url!\");\n return;\n }\n this.query = query != false;\n this.js = js;\n this.show = true;\n this.url = url;\n this.title = title ? title : this.title;\n this.autoClose = autoClose != undefined ? autoClose : this.autoClose;\n this.multiple = multiple != undefined ? multiple : this.multiple;\n this.$nextTick(() => {\n this.$refs.selectFiles.$el.click();\n setTimeout(() => {\n this.loading = false;\n }, 300);\n });\n }\n }\n});\n\n//# sourceURL=webpack://olp-table/./src/components/ol-dialog-upload-file.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use%5B0%5D!./node_modules/vue-loader/dist/index.js??ruleSet%5B0%5D.use%5B0%5D");
414
414
 
415
415
  /***/ }),
416
416
 
@@ -938,7 +938,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
938
938
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
939
939
 
940
940
  "use strict";
941
- eval("__webpack_require__.r(__webpack_exports__);\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_for_each_js__WEBPACK_IMPORTED_MODULE_3__ = __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_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! vue */ \"vue\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _element_plus_icons_vue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @element-plus/icons-vue */ \"@element-plus/icons-vue\");\n/* harmony import */ var _element_plus_icons_vue__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_element_plus_icons_vue__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var vxe_table__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! vxe-table */ \"vxe-table\");\n/* harmony import */ var vxe_table__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(vxe_table__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var xe_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! xe-utils */ \"./node_modules/xe-utils/index.js\");\n/* harmony import */ var xe_utils__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(xe_utils__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var sortablejs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! sortablejs */ \"./node_modules/sortablejs/modular/sortable.esm.js\");\n/* harmony import */ var _store_dict__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/store/dict */ \"./src/store/dict.js\");\n/* harmony import */ var _store_dictType__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/store/dictType */ \"./src/store/dictType.js\");\n/* harmony import */ var _views_table_add_or_edit_config_column_config_header_config_vue__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @/views/table/add-or-edit/config/column-config/header-config.vue */ \"./src/views/table/add-or-edit/config/column-config/header-config.vue\");\n/* harmony import */ var _utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @/utils/http/httpUtils */ \"./src/utils/http/httpUtils.js\");\n/* harmony import */ var _components_ol_dialog_tagForm_vue__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @/components/ol-dialog-tagForm.vue */ \"./src/components/ol-dialog-tagForm.vue\");\n/* harmony import */ var _components_ol_table_select_config_vue__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @/components/ol-table-select-config.vue */ \"./src/components/ol-table-select-config.vue\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n __name: 'index',\n props: {\n addVisible: {},\n editVisible: {},\n isTable: {\n default: true,\n type: Boolean\n }\n },\n emits: ['checkBoxChange'],\n setup(__props, {\n expose: __expose,\n emit: __emit\n }) {\n const props = __props;\n const show = (0,vue__WEBPACK_IMPORTED_MODULE_4__.ref)(false);\n const vexGridRef = (0,vue__WEBPACK_IMPORTED_MODULE_4__.ref)();\n const headerConfig = (0,vue__WEBPACK_IMPORTED_MODULE_4__.ref)();\n const dict = (0,_store_dict__WEBPACK_IMPORTED_MODULE_9__.storeDict)();\n const dictType = (0,_store_dictType__WEBPACK_IMPORTED_MODULE_10__.storeDictType)();\n function setShow(value) {\n (0,vue__WEBPACK_IMPORTED_MODULE_4__.nextTick)(() => {\n show.value = value;\n updateSort();\n setCardColumnVisible();\n });\n }\n function setGroupByMin() {\n gridOptions.data.forEach(item => {\n if (item.groupToOtherProp != 1 && !item.groupTotalToOtherProp) {\n item.groupTotalToOtherProp = 'sum';\n }\n });\n }\n const http = (0,vue__WEBPACK_IMPORTED_MODULE_4__.inject)('http');\n dict.init(http);\n dictType.init(http);\n function headerConfigShow() {\n if (gridOptions.data) {\n let d = gridOptions.groupColumns ? gridOptions.groupColumns : gridOptions.data;\n headerConfig.value.setColumn(d);\n }\n }\n (0,vue__WEBPACK_IMPORTED_MODULE_4__.watch)(props, () => {\n for (let column of gridOptions.columns) {\n if (column.prop == 'addDisplay' || column.field == 'addDisplay') {\n if (!column.visible && props.addVisible) {\n checkBoxAllChange(column.field);\n }\n column.visible = props.addVisible;\n }\n if (column.prop == 'editDisplay' || column.field == 'editDisplay') {\n if (!column.visible && props.editVisible) {\n checkBoxAllChange(column.field);\n }\n column.visible = props.editVisible;\n }\n }\n if (show.value) {\n vexGridRef.value.loadColumn(gridOptions.columns);\n }\n }, {\n deep: true\n });\n const checkBoxAllChange = field => {\n emits('checkBoxAll', {\n checkBoxName: field == 'editDisplay' ? 'edit' : 'add',\n isAll: true,\n list: gridOptions.data.filter(row => row[field] == '1')\n });\n };\n const setCardColumnVisible = () => {\n let field = ['tableSaveToOtherProp', 'totalToOtherProp', 'groupTotalToOtherProp', 'groupToOtherProp', 'mergeFlag', 'columnAuth', 'width', 'resizable', 'spanSEARCHToOtherProp', 'totalToOtherProp'];\n for (let column of gridOptions.columns) {\n if (field.includes(column.field)) {\n column.visible = props.isTable;\n }\n // 标签配置只有card配置才显示\n if ('tagJsonToOtherProp' === column.field) {\n column.visible = !props.isTable;\n }\n }\n };\n //表头全选框更新\n const headerClick = column => {\n if (column.field != 'columnAuth' && column.field == 'visible') {\n let columnField = vexGridRef.value.getColumnByField('columnAuth');\n columnField.params.all = column.params.all;\n headerClick(columnField);\n }\n gridOptions.data.forEach(item => {\n item[column.field] = column.params.all ? '1' : '0';\n });\n if (column.params.all == '0') {\n //全不选的时候\n if (column.field == 'addDisplay') {\n emits(\"checkBoxAll\", {\n checkBoxName: \"add\",\n isAll: false,\n list: gridOptions.data\n });\n } else if (column.field == 'editDisplay') {\n emits(\"checkBoxAll\", {\n checkBoxName: \"edit\",\n isAll: false,\n list: gridOptions.data\n });\n }\n } else if (column.params.all == '1') {\n //全选\n if (column.field == 'addDisplay') {\n emits(\"checkBoxAll\", {\n checkBoxName: \"add\",\n isAll: true,\n list: gridOptions.data\n });\n } else if (column.field == 'editDisplay') {\n emits(\"checkBoxAll\", {\n checkBoxName: \"edit\",\n isAll: true,\n list: gridOptions.data\n });\n }\n }\n };\n //表格多选框更新\n const checkBoxClick = (column, row) => {\n emits(\"checkBoxChange\", {\n row: row,\n column: column\n });\n if (column.field != 'columnAuth' && column.field == 'visible') {\n let columnField = vexGridRef.value.getColumnByField('columnAuth');\n row.columnAuth = row.visible;\n checkBoxClick(columnField, row);\n }\n let f = true;\n gridOptions.data.forEach(item => {\n if (item[column.field] != '1') {\n f = false;\n }\n });\n column.params.all = f;\n };\n\n //拿到数据\n const setData = (data, data2) => {\n console.log(data2);\n gridOptions.groupColumns = data2;\n if (!data) {\n return;\n }\n gridOptions.data = data;\n //查看多选框是否多选\n gridOptions.columns.forEach(item => {\n if (item.slots && item.slots.default == \"checkedBox_default\") {\n //默认全选状态\n let flag = gridOptions.data.length > 0;\n gridOptions.data.forEach(row => {\n if (row[item.field] != \"1\") {\n //有某个参数没选择则不是全选的状态\n flag = false;\n }\n });\n item.params.all = flag;\n }\n });\n };\n\n //新增新字段\n const onAdd = () => {\n let newBtn = {\n visible: 0,\n form: {},\n sort: gridOptions.data.length + 1\n };\n gridOptions.data.push(newBtn);\n vexGridRef.value.loadData(gridOptions.data);\n setTimeout(() => {\n vexGridRef.value.scrollToRow(gridOptions.data[newBtn.sort - 1], null);\n }, 500);\n };\n\n //删除数据\n const removeRowEvent = row => {\n vxe_table__WEBPACK_IMPORTED_MODULE_6___default().modal.confirm('您确定要删除该数据?').then(() => {\n gridOptions.data = gridOptions.data.filter(item => item._X_ROW_KEY != row._X_ROW_KEY);\n handleCheckBoxClick(row);\n }).catch(() => {});\n };\n const handleCheckBoxClick = row => {\n for (let column of gridOptions.columns) {\n if (column.field == 'addDisplay' || column.field == 'editDisplay') {\n row.addDisplay = undefined;\n row.editDisplay = undefined;\n checkBoxClick(column, row);\n }\n }\n };\n\n //表更新\n const updateData = data => {\n let list = gridOptions.data;\n // 字段映射hash表\n let map = {};\n for (let item of list) {\n if (item.visible == 1) {\n item.visible = \"1\";\n }\n map[item.asName] = item;\n }\n gridOptions.data = [];\n if (!data) {\n return;\n }\n data.forEach((item, index) => {\n if (map[item.prop]) {\n // 存在字段不覆盖\n gridOptions.data.push(map[item.prop]);\n return;\n }\n if (!item.column_comment || !item.column_comment.toString().trim()) {\n item.column_comment = item.prop;\n }\n let data = {\n field: item.prop,\n title: item.column_comment,\n tableField: item.column_name,\n asName: item.prop,\n sort: index,\n visible: \"1\",\n form: {},\n label: item.column_comment\n };\n //映射表更新返回的字段\n gridOptions.data.push(data);\n });\n // title格式化\n updateTitleAndWidth();\n // 列权限更新\n updateColumnAuth();\n };\n const visible = item => {\n return item.visible && '1' == item.visible;\n };\n const setAddDisplay = value => {\n let data = [];\n gridOptions.data.forEach(item => {\n if (visible(item)) {\n item.addDisplay = value;\n data.push(item);\n }\n });\n doEmits('add', data);\n };\n const doEmits = (name, data) => {\n emits('checkBoxAll', {\n checkBoxName: name,\n isAll: true,\n list: data\n });\n };\n const setEditDisplay = value => {\n let data = [];\n gridOptions.data.forEach(item => {\n if (visible(item)) {\n item.editDisplay = value;\n data.push(item);\n }\n });\n doEmits('edit', data);\n };\n const updateColumnAuth = () => {\n gridOptions.data.forEach(item => {\n if (item.visible == '0') {\n item.columnAuth = item.visible;\n }\n });\n };\n const updateTitleAndWidth = () => {\n gridOptions.data.forEach(item => {\n let index = -1;\n if (item.title) {\n item.title = item.title.trim();\n }\n if (item.title && (index = item.title.indexOf(' ')) != -1) {\n item.title = item.title.substring(0, index);\n }\n if (item.title && (index = item.title.indexOf('(')) >= 1) {\n item.title = item.title.substring(0, index);\n }\n if (item.title && (index = item.title.lastIndexOf('(')) >= 1) {\n item.title = item.title.substring(0, index);\n }\n });\n };\n\n //表格配置项\n const gridOptions = (0,vue__WEBPACK_IMPORTED_MODULE_4__.reactive)({\n scrollX: {\n enabled: true,\n gt: 1\n },\n scrollY: {\n enabled: true,\n gt: 1\n },\n border: true,\n showHeaderOverflow: true,\n showOverflow: true,\n height: 620,\n align: \"center\",\n size: 'mini',\n rowConfig: {\n isHover: true,\n isCurrent: true\n },\n editConfig: {\n trigger: 'click',\n mode: 'cell'\n },\n toolbarConfig: {\n custom: true,\n zoom: true,\n slots: {\n buttons: 'toolbar_buttons'\n },\n perfect: true\n },\n columns: [\n /* {\r\n type: \"expand\",\r\n title: \"其他属性\",\r\n width: 80,\r\n fixed: \"left\",\r\n slots: {\r\n content: 'content',\r\n },\r\n },*/\n {\n type: \"seq\",\n width: 60,\n title: \"序号\",\n slots: {\n default: 'seq'\n }\n }, {\n title: '字段',\n field: 'field',\n fixed: 'left',\n width: 200,\n editRender: {\n props: {\n clearable: true\n },\n name: '$input'\n },\n filters: [{\n data: ''\n }],\n filterMethod({\n option,\n row,\n column\n }) {\n if (option.data) {\n return xe_utils__WEBPACK_IMPORTED_MODULE_7___default().toValueString(row[column.field]).toLowerCase().indexOf(option.data) > -1;\n }\n return true;\n },\n slots: {\n filter: 'label_filter'\n }\n }, {\n title: '字段描述',\n field: 'label',\n fixed: 'left',\n width: 200,\n filters: [{\n data: ''\n }],\n filterMethod({\n option,\n row,\n column\n }) {\n if (option.data) {\n return xe_utils__WEBPACK_IMPORTED_MODULE_7___default().toValueString(row[column.field]).toLowerCase().indexOf(option.data) > -1;\n }\n return true;\n },\n slots: {\n filter: 'label_filter'\n }\n }, {\n title: '标题',\n field: 'title',\n width: 200,\n editRender: {\n props: {\n clearable: true\n },\n name: '$input'\n },\n filters: [{\n data: ''\n }],\n filterMethod({\n option,\n row,\n column\n }) {\n if (option.data) {\n return xe_utils__WEBPACK_IMPORTED_MODULE_7___default().toValueString(row[column.field]).toLowerCase().indexOf(option.data) > -1;\n }\n return true;\n },\n slots: {\n filter: 'label_filter'\n }\n }, {\n title: '显示',\n field: 'visible',\n align: 'center',\n width: 80,\n params: {\n all: null\n },\n slots: {\n header: 'checkedBox_header',\n default: 'checkedBox_default'\n }\n }, {\n title: '新增',\n field: 'addDisplay',\n align: 'center',\n visible: props.addVisible,\n params: {\n all: 1\n },\n width: 80,\n slots: {\n header: 'checkedBox_header',\n default: 'checkedBox_default'\n }\n }, {\n title: '编辑',\n field: 'editDisplay',\n align: 'center',\n width: 80,\n visible: props.editVisible,\n params: {\n all: 0\n },\n slots: {\n header: 'checkedBox_header',\n default: 'checkedBox_default'\n }\n }, {\n title: '不保存',\n field: 'tableSaveToOtherProp',\n width: 95,\n params: {\n all: 0\n },\n slots: {\n header: 'checkedBox_header',\n default: 'checkedBox_default'\n }\n }, {\n title: '必填',\n field: 'required',\n width: 60,\n params: {\n all: null\n },\n slots: {\n header: 'checkedBox_header',\n default: 'checkedBox_default'\n }\n }, {\n title: '不导入',\n field: 'importToOtherProp',\n width: 95,\n params: {\n all: 0\n },\n slots: {\n header: 'checkedBox_header',\n default: 'checkedBox_default'\n }\n }, {\n title: '列宽',\n width: 80,\n field: 'width',\n editRender: {\n props: {\n clearable: true\n },\n name: '$input'\n }\n }, {\n title: '排序',\n field: 'sortable',\n align: 'center',\n width: 100,\n params: {\n all: 0,\n dictCode: 'order_by_type'\n },\n editRender: {\n props: {\n clearable: true,\n filterable: true\n },\n name: '$select',\n options: dict.val('order_by_type')\n }\n }, {\n title: '数据字典',\n field: 'dictCode',\n params: {\n dictCode: 'dictCode'\n },\n width: 200,\n editRender: {\n props: {\n clearable: true,\n filterable: true\n },\n name: '$select',\n options: dictType.val()\n }\n // editRender: {props: {clearable: true, filterable: true}, name: 'input', options: dictType.val()}\n }, {\n title: '数据字典表',\n field: 'dictTableToOtherProp',\n width: 200,\n editRender: {\n name: '$input'\n }\n // editRender: {props: {clearable: true, filterable: true}, name: 'input', options: dictType.val()}\n }, {\n title: '搜索类型',\n field: 'selectType',\n params: {\n dictCode: 'select_type'\n },\n width: 120,\n editRender: {\n props: {\n clearable: true,\n filterable: true\n },\n name: '$select',\n options: dict.val('select_type')\n }\n }, {\n title: '固定',\n field: 'fixed',\n params: {\n dictCode: 'table_fixed'\n },\n editRender: {\n props: {\n clearable: true,\n filterable: true\n },\n name: '$select',\n options: dict.val('table_fixed')\n },\n width: 80\n }, {\n title: '控件类型',\n field: 'selectDom',\n /*params: {\r\n dictCode: 'select_dom'\r\n },*/\n width: 180,\n editRender: {\n props: {\n clearable: true,\n filterable: true\n },\n name: '$select',\n options: dict.val('select_dom')\n }\n /*slots: {\r\n default: 'select_default'\r\n },*/\n }, {\n title: '表尾',\n field: 'totalToOtherProp',\n width: 100,\n editRender: {\n props: {\n clearable: true,\n filterable: true\n },\n name: '$select',\n options: dict.val('online_calculation_type')\n }\n }, {\n title: '插槽',\n field: 'customSlotsToOtherProp',\n align: 'center',\n width: 80,\n params: {\n all: null\n },\n slots: {\n header: 'checkedBox_header',\n default: 'checkedBox_default'\n }\n }, {\n title: '分组合计',\n field: 'groupTotalToOtherProp',\n width: 100,\n editRender: {\n props: {\n clearable: true,\n filterable: true\n },\n name: '$select',\n options: dict.val('online_calculation_type')\n }\n }, {\n title: '分组',\n field: 'groupToOtherProp',\n width: 100,\n params: {\n all: null\n },\n slots: {\n default: 'checkedBox_default'\n }\n }, {\n title: '行合并',\n field: 'mergeFlag',\n width: 100,\n params: {\n all: null\n },\n slots: {\n header: 'checkedBox_header',\n default: 'checkedBox_default'\n }\n }, {\n title: '可列配置',\n field: 'columnAuth',\n align: 'center',\n width: 80,\n params: {\n all: null\n },\n slots: {\n header: 'checkedBox_header',\n default: 'checkedBox_default'\n }\n }, {\n title: '对齐',\n field: 'align',\n params: {\n dictCode: 'align'\n },\n editRender: {\n props: {\n clearable: true\n },\n name: '$select',\n options: dict.val('align')\n },\n width: 80\n }, {\n title: '列宽拖动',\n field: 'resizable',\n width: 80,\n params: {\n all: null\n },\n slots: {\n header: 'checkedBox_header',\n default: 'checkedBox_default'\n }\n }, {\n title: 'formatter',\n field: 'formatter',\n width: 168,\n slots: {\n default: 'dialog_default'\n }\n }, {\n title: '搜索顺序',\n field: 'searchSort',\n width: 100,\n editRender: {\n name: '$input',\n props: {\n type: 'number'\n }\n }\n }, {\n title: '搜索默认值',\n field: 'valueSEARCHToOtherProp',\n width: 100,\n editRender: {\n name: '$input'\n }\n }, {\n title: '不可清空',\n field: 'clearableSEARCHToOtherProp',\n width: 100,\n params: {},\n slots: {\n default: 'checkedBox_default'\n }\n }, {\n title: '时间',\n field: 'toDateSEARCHToOtherProp',\n width: 80,\n params: {},\n slots: {\n default: 'checkedBox_default'\n }\n }, {\n title: '搜索span',\n field: 'spanSEARCHToOtherProp',\n width: 110,\n editRender: {\n name: '$input',\n props: {\n clearable: true,\n min: 2,\n max: 24,\n type: 'number'\n }\n }\n }, {\n title: '搜索label',\n field: 'titleSEARCHToOtherProp',\n width: 120,\n editRender: {\n name: '$input',\n props: {\n clearable: true\n }\n }\n }, {\n title: '搜索字段',\n field: 'fieldNameSEARCHToOtherProp',\n width: 100,\n editRender: {\n name: '$input',\n props: {\n clearable: true\n }\n }\n }, {\n title: '搜索表别名',\n field: 'tableNameSEARCHToOtherProp',\n width: 100,\n editRender: {\n name: '$input',\n props: {\n clearable: true\n }\n }\n }, {\n title: '操作',\n width: 100,\n fixed: 'right',\n align: 'center',\n slots: {\n default: 'operate'\n }\n }, {\n title: '表尾自定义',\n field: 'totalToOtherProp',\n width: 100,\n params: {\n all: null\n },\n slots: {\n default: 'totalToOtherProp_default'\n }\n }, {\n title: '标签配置',\n field: 'tagJsonToOtherProp',\n width: 168,\n slots: {\n default: 'tag_form_default'\n }\n }, {\n title: '表格选取配置',\n field: 'tableSelectConfToOtherProp',\n width: 100,\n slots: {\n default: 'tableSelectConf_default'\n }\n }],\n data: [],\n groupColumns: []\n });\n //表格拖动更新\n const updateSort = () => {\n (0,vue__WEBPACK_IMPORTED_MODULE_4__.nextTick)(() => {\n if (!vexGridRef.value) {\n return;\n }\n //el绑定元素需要找到vxe的DOM下的tbody元素\n sortablejs__WEBPACK_IMPORTED_MODULE_8__[\"default\"].create(vexGridRef.value.$el.querySelector('.body--wrapper>.vxe-table--body tbody'), {\n animation: 200,\n //拖拽动画过渡时间\n sort: true,\n handle: '.col--seq',\n //必须设置该属性,属性值为你要拖动的该单元格的样式名\n // 元素被选中\n onStart: function (/**Event*/evt) {\n //关闭所有展开行\n vexGridRef.value.clearRowExpand();\n evt.oldIndex; // element index within parent\n },\n // 结束拖拽\n onEnd: function (/**Event*/{\n oldIndex,\n newIndex,\n item\n }) {\n //evt.to; // 目标列表\n //evt.from; // 来自以前的列表\n //evt.oldIndex; // 元素在旧父元素中的旧索引\n //evt.newIndex; // 元素在新父元素中的新索引\n //evt.clone // 克隆元素\n //evt.pullMode; // 当项在另一个可排序中时:\"clone\"(克隆),\"true\"(移动)\n let rowNode = vexGridRef.value.getRowNode(item);\n newIndex = rowNode.index - oldIndex + newIndex;\n const list = JSON.parse(JSON.stringify(gridOptions.data)); //保存旧数据\n const targetRow = list.splice(rowNode.index, 1)[0]; //保存移动的元素并删除原列表中移动的元素\n list.splice(newIndex, 0, targetRow); //插入到目标新索引中\n const newsArr = JSON.parse(JSON.stringify(list)); //重新赋值数组\n //将新数据重新排序\n for (let i = 0; i < newsArr.length; i++) {\n newsArr[i].sort = i + 1;\n }\n gridOptions.data = newsArr;\n }\n });\n });\n };\n (0,vue__WEBPACK_IMPORTED_MODULE_4__.onMounted)(() => {\n updateSort();\n });\n const enterFilterEvent = ({\n $panel\n }) => {\n $panel.confirmFilter();\n };\n\n // 子组件调用父组件\n const emits = __emit; //声明 emits\n function getColumns() {\n return gridOptions.data;\n }\n function getGroupColumnData() {\n return gridOptions.groupColumns;\n }\n function setGroupColumnData(value) {\n gridOptions.groupColumns = value.groupColumns;\n }\n\n // 对外暴露\n __expose({\n setData,\n updateData,\n gridOptions,\n vexGridRef,\n getColumns,\n setAddDisplay,\n setEditDisplay,\n setShow,\n getGroupColumnData\n });\n const __returned__ = {\n props,\n show,\n vexGridRef,\n headerConfig,\n dict,\n dictType,\n setShow,\n setGroupByMin,\n http,\n headerConfigShow,\n checkBoxAllChange,\n setCardColumnVisible,\n headerClick,\n checkBoxClick,\n setData,\n onAdd,\n removeRowEvent,\n handleCheckBoxClick,\n updateData,\n visible,\n setAddDisplay,\n doEmits,\n setEditDisplay,\n updateColumnAuth,\n updateTitleAndWidth,\n gridOptions,\n updateSort,\n enterFilterEvent,\n emits,\n getColumns,\n getGroupColumnData,\n setGroupColumnData,\n ref: vue__WEBPACK_IMPORTED_MODULE_4__.ref,\n reactive: vue__WEBPACK_IMPORTED_MODULE_4__.reactive,\n onMounted: vue__WEBPACK_IMPORTED_MODULE_4__.onMounted,\n nextTick: vue__WEBPACK_IMPORTED_MODULE_4__.nextTick,\n watch: vue__WEBPACK_IMPORTED_MODULE_4__.watch,\n inject: vue__WEBPACK_IMPORTED_MODULE_4__.inject,\n get Delete() {\n return _element_plus_icons_vue__WEBPACK_IMPORTED_MODULE_5__.Delete;\n },\n get VXETable() {\n return (vxe_table__WEBPACK_IMPORTED_MODULE_6___default());\n },\n get XEUtils() {\n return (xe_utils__WEBPACK_IMPORTED_MODULE_7___default());\n },\n get Sortable() {\n return sortablejs__WEBPACK_IMPORTED_MODULE_8__[\"default\"];\n },\n get storeDict() {\n return _store_dict__WEBPACK_IMPORTED_MODULE_9__.storeDict;\n },\n get storeDictType() {\n return _store_dictType__WEBPACK_IMPORTED_MODULE_10__.storeDictType;\n },\n HeaderConfig: _views_table_add_or_edit_config_column_config_header_config_vue__WEBPACK_IMPORTED_MODULE_11__[\"default\"],\n get get() {\n return _utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_12__.get;\n },\n OlDialogTagForm: _components_ol_dialog_tagForm_vue__WEBPACK_IMPORTED_MODULE_13__[\"default\"],\n OlTableSelectConfig: _components_ol_table_select_config_vue__WEBPACK_IMPORTED_MODULE_14__[\"default\"]\n };\n Object.defineProperty(__returned__, '__isScriptSetup', {\n enumerable: false,\n value: true\n });\n return __returned__;\n }\n});\n\n//# sourceURL=webpack://olp-table/./src/views/table/add-or-edit/config/column-config/index.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use%5B0%5D!./node_modules/vue-loader/dist/index.js??ruleSet%5B0%5D.use%5B0%5D");
941
+ eval("__webpack_require__.r(__webpack_exports__);\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_for_each_js__WEBPACK_IMPORTED_MODULE_3__ = __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_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.iterator.map.js */ \"./node_modules/core-js/modules/es.iterator.map.js\");\n/* harmony import */ var core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! vue */ \"vue\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _element_plus_icons_vue__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @element-plus/icons-vue */ \"@element-plus/icons-vue\");\n/* harmony import */ var _element_plus_icons_vue__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_element_plus_icons_vue__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var vxe_table__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! vxe-table */ \"vxe-table\");\n/* harmony import */ var vxe_table__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(vxe_table__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var xe_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! xe-utils */ \"./node_modules/xe-utils/index.js\");\n/* harmony import */ var xe_utils__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(xe_utils__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var sortablejs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! sortablejs */ \"./node_modules/sortablejs/modular/sortable.esm.js\");\n/* harmony import */ var _store_dict__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/store/dict */ \"./src/store/dict.js\");\n/* harmony import */ var _store_dictType__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @/store/dictType */ \"./src/store/dictType.js\");\n/* harmony import */ var _views_table_add_or_edit_config_column_config_header_config_vue__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @/views/table/add-or-edit/config/column-config/header-config.vue */ \"./src/views/table/add-or-edit/config/column-config/header-config.vue\");\n/* harmony import */ var _utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @/utils/http/httpUtils */ \"./src/utils/http/httpUtils.js\");\n/* harmony import */ var _components_ol_dialog_tagForm_vue__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @/components/ol-dialog-tagForm.vue */ \"./src/components/ol-dialog-tagForm.vue\");\n/* harmony import */ var _components_ol_table_select_config_vue__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @/components/ol-table-select-config.vue */ \"./src/components/ol-table-select-config.vue\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n __name: 'index',\n props: {\n addVisible: {},\n editVisible: {},\n isTable: {\n default: true,\n type: Boolean\n }\n },\n emits: ['checkBoxChange'],\n setup(__props, {\n expose: __expose,\n emit: __emit\n }) {\n const props = __props;\n const show = (0,vue__WEBPACK_IMPORTED_MODULE_5__.ref)(false);\n const vexGridRef = (0,vue__WEBPACK_IMPORTED_MODULE_5__.ref)();\n const headerConfig = (0,vue__WEBPACK_IMPORTED_MODULE_5__.ref)();\n const dict = (0,_store_dict__WEBPACK_IMPORTED_MODULE_10__.storeDict)();\n const dictType = (0,_store_dictType__WEBPACK_IMPORTED_MODULE_11__.storeDictType)();\n function setShow(value) {\n (0,vue__WEBPACK_IMPORTED_MODULE_5__.nextTick)(() => {\n show.value = value;\n updateSort();\n setCardColumnVisible();\n });\n }\n function setGroupByMin() {\n gridOptions.data.forEach(item => {\n if (item.groupToOtherProp != 1 && !item.groupTotalToOtherProp) {\n item.groupTotalToOtherProp = 'sum';\n }\n });\n }\n const http = (0,vue__WEBPACK_IMPORTED_MODULE_5__.inject)('http');\n dict.init(http);\n dictType.init(http);\n function headerConfigShow() {\n if (gridOptions.data) {\n let d = gridOptions.groupColumns ? gridOptions.groupColumns : gridOptions.data;\n headerConfig.value.setColumn(d);\n }\n }\n (0,vue__WEBPACK_IMPORTED_MODULE_5__.watch)(props, () => {\n for (let column of gridOptions.columns) {\n if (column.prop == 'addDisplay' || column.field == 'addDisplay') {\n if (!column.visible && props.addVisible) {\n checkBoxAllChange(column.field);\n }\n column.visible = props.addVisible;\n }\n if (column.prop == 'editDisplay' || column.field == 'editDisplay') {\n if (!column.visible && props.editVisible) {\n checkBoxAllChange(column.field);\n }\n column.visible = props.editVisible;\n }\n }\n if (show.value) {\n vexGridRef.value.loadColumn(gridOptions.columns);\n }\n }, {\n deep: true\n });\n const checkBoxAllChange = field => {\n emits('checkBoxAll', {\n checkBoxName: field == 'editDisplay' ? 'edit' : 'add',\n isAll: true,\n list: gridOptions.data.filter(row => row[field] == '1')\n });\n };\n const setCardColumnVisible = () => {\n let field = ['tableSaveToOtherProp', 'totalToOtherProp', 'groupTotalToOtherProp', 'groupToOtherProp', 'mergeFlag', 'columnAuth', 'width', 'resizable', 'spanSEARCHToOtherProp', 'totalToOtherProp'];\n for (let column of gridOptions.columns) {\n if (field.includes(column.field)) {\n column.visible = props.isTable;\n }\n // 标签配置只有card配置才显示\n if ('tagJsonToOtherProp' === column.field) {\n column.visible = !props.isTable;\n }\n }\n };\n //表头全选框更新\n const headerClick = column => {\n if (column.field != 'columnAuth' && column.field == 'visible') {\n let columnField = vexGridRef.value.getColumnByField('columnAuth');\n columnField.params.all = column.params.all;\n headerClick(columnField);\n }\n gridOptions.data.forEach(item => {\n item[column.field] = column.params.all ? '1' : '0';\n });\n if (column.params.all == '0') {\n //全不选的时候\n if (column.field == 'addDisplay') {\n emits(\"checkBoxAll\", {\n checkBoxName: \"add\",\n isAll: false,\n list: gridOptions.data\n });\n } else if (column.field == 'editDisplay') {\n emits(\"checkBoxAll\", {\n checkBoxName: \"edit\",\n isAll: false,\n list: gridOptions.data\n });\n }\n } else if (column.params.all == '1') {\n //全选\n if (column.field == 'addDisplay') {\n emits(\"checkBoxAll\", {\n checkBoxName: \"add\",\n isAll: true,\n list: gridOptions.data\n });\n } else if (column.field == 'editDisplay') {\n emits(\"checkBoxAll\", {\n checkBoxName: \"edit\",\n isAll: true,\n list: gridOptions.data\n });\n }\n }\n };\n //表格多选框更新\n const checkBoxClick = (column, row) => {\n emits(\"checkBoxChange\", {\n row: row,\n column: column\n });\n if (column.field != 'columnAuth' && column.field == 'visible') {\n let columnField = vexGridRef.value.getColumnByField('columnAuth');\n row.columnAuth = row.visible;\n checkBoxClick(columnField, row);\n }\n let f = true;\n gridOptions.data.forEach(item => {\n if (item[column.field] != '1') {\n f = false;\n }\n });\n column.params.all = f;\n };\n\n //拿到数据\n const setData = (data, data2) => {\n console.log(data2);\n gridOptions.groupColumns = data2;\n if (!data) {\n return;\n }\n gridOptions.data = data;\n //查看多选框是否多选\n gridOptions.columns.forEach(item => {\n if (item.slots && item.slots.default == \"checkedBox_default\") {\n //默认全选状态\n let flag = gridOptions.data.length > 0;\n gridOptions.data.forEach(row => {\n if (row[item.field] != \"1\") {\n //有某个参数没选择则不是全选的状态\n flag = false;\n }\n });\n item.params.all = flag;\n }\n });\n };\n\n // 移除指定 field 的分组列(第一段代码封装)\n const handleRemoveGroupColumn = row => {\n if (hasGroupColChange()) {\n gridOptions.groupColumns = gridOptions.groupColumns.map(group => {\n if (group.children) {\n return {\n ...group,\n children: group.children.filter(child => child.field !== row.field)\n };\n }\n return group;\n }).filter(group => {\n if (group.children) {\n return group.children.length > 0;\n }\n return group.field !== row.field;\n });\n }\n };\n const hasGroupColChange = () => {\n return props.isTable && gridOptions.groupColumns?.length > 0;\n };\n\n // 添加新按钮到分组列(第二段代码封装)\n const handleAddGroupColumn = newBtn => {\n if (hasGroupColChange()) {\n gridOptions.groupColumns.push(newBtn);\n }\n };\n\n //新增新字段\n const onAdd = () => {\n let newBtn = {\n visible: 0,\n form: {},\n sort: gridOptions.data.length + 1\n };\n gridOptions.data.push(newBtn);\n // 新增分组列\n handleAddGroupColumn(newBtn);\n vexGridRef.value.loadData(gridOptions.data);\n setTimeout(() => {\n vexGridRef.value.scrollToRow(gridOptions.data[newBtn.sort - 1], null);\n }, 500);\n };\n\n //删除数据\n const removeRowEvent = row => {\n vxe_table__WEBPACK_IMPORTED_MODULE_7___default().modal.confirm('您确定要删除该数据?').then(() => {\n gridOptions.data = gridOptions.data.filter(item => item._X_ROW_KEY != row._X_ROW_KEY);\n // 删除分组列\n handleRemoveGroupColumn(row);\n handleCheckBoxClick(row);\n }).catch(() => {});\n };\n const handleCheckBoxClick = row => {\n for (let column of gridOptions.columns) {\n if (column.field == 'addDisplay' || column.field == 'editDisplay') {\n row.addDisplay = undefined;\n row.editDisplay = undefined;\n checkBoxClick(column, row);\n }\n }\n };\n\n //表更新\n const updateData = data => {\n let list = gridOptions.data;\n // 字段映射hash表\n let map = {};\n for (let item of list) {\n if (item.visible == 1) {\n item.visible = \"1\";\n }\n map[item.asName] = item;\n }\n gridOptions.data = [];\n if (!data) {\n return;\n }\n data.forEach((item, index) => {\n if (map[item.prop]) {\n // 存在字段不覆盖\n gridOptions.data.push(map[item.prop]);\n return;\n }\n if (!item.column_comment || !item.column_comment.toString().trim()) {\n item.column_comment = item.prop;\n }\n let data = {\n field: item.prop,\n title: item.column_comment,\n tableField: item.column_name,\n asName: item.prop,\n sort: index,\n visible: \"1\",\n form: {},\n label: item.column_comment\n };\n //映射表更新返回的字段\n gridOptions.data.push(data);\n });\n // title格式化\n updateTitleAndWidth();\n // 列权限更新\n updateColumnAuth();\n };\n const visible = item => {\n return item.visible && '1' == item.visible;\n };\n const setAddDisplay = value => {\n let data = [];\n gridOptions.data.forEach(item => {\n if (visible(item)) {\n item.addDisplay = value;\n data.push(item);\n }\n });\n doEmits('add', data);\n };\n const doEmits = (name, data) => {\n emits('checkBoxAll', {\n checkBoxName: name,\n isAll: true,\n list: data\n });\n };\n const setEditDisplay = value => {\n let data = [];\n gridOptions.data.forEach(item => {\n if (visible(item)) {\n item.editDisplay = value;\n data.push(item);\n }\n });\n doEmits('edit', data);\n };\n const updateColumnAuth = () => {\n gridOptions.data.forEach(item => {\n if (item.visible == '0') {\n item.columnAuth = item.visible;\n }\n });\n };\n const updateTitleAndWidth = () => {\n gridOptions.data.forEach(item => {\n let index = -1;\n if (item.title) {\n item.title = item.title.trim();\n }\n if (item.title && (index = item.title.indexOf(' ')) != -1) {\n item.title = item.title.substring(0, index);\n }\n if (item.title && (index = item.title.indexOf('(')) >= 1) {\n item.title = item.title.substring(0, index);\n }\n if (item.title && (index = item.title.lastIndexOf('(')) >= 1) {\n item.title = item.title.substring(0, index);\n }\n });\n };\n\n //表格配置项\n const gridOptions = (0,vue__WEBPACK_IMPORTED_MODULE_5__.reactive)({\n scrollX: {\n enabled: true,\n gt: 1\n },\n scrollY: {\n enabled: true,\n gt: 1\n },\n border: true,\n showHeaderOverflow: true,\n showOverflow: true,\n height: 620,\n align: \"center\",\n size: 'mini',\n rowConfig: {\n isHover: true,\n isCurrent: true\n },\n editConfig: {\n trigger: 'click',\n mode: 'cell'\n },\n toolbarConfig: {\n custom: true,\n zoom: true,\n slots: {\n buttons: 'toolbar_buttons'\n },\n perfect: true\n },\n columns: [\n /* {\r\n type: \"expand\",\r\n title: \"其他属性\",\r\n width: 80,\r\n fixed: \"left\",\r\n slots: {\r\n content: 'content',\r\n },\r\n },*/\n {\n type: \"seq\",\n width: 60,\n title: \"序号\",\n slots: {\n default: 'seq'\n }\n }, {\n title: '字段',\n field: 'field',\n fixed: 'left',\n width: 200,\n editRender: {\n props: {\n clearable: true\n },\n name: '$input'\n },\n filters: [{\n data: ''\n }],\n filterMethod({\n option,\n row,\n column\n }) {\n if (option.data) {\n return xe_utils__WEBPACK_IMPORTED_MODULE_8___default().toValueString(row[column.field]).toLowerCase().indexOf(option.data) > -1;\n }\n return true;\n },\n slots: {\n filter: 'label_filter'\n }\n }, {\n title: '字段描述',\n field: 'label',\n fixed: 'left',\n width: 200,\n filters: [{\n data: ''\n }],\n filterMethod({\n option,\n row,\n column\n }) {\n if (option.data) {\n return xe_utils__WEBPACK_IMPORTED_MODULE_8___default().toValueString(row[column.field]).toLowerCase().indexOf(option.data) > -1;\n }\n return true;\n },\n slots: {\n filter: 'label_filter'\n }\n }, {\n title: '标题',\n field: 'title',\n width: 200,\n editRender: {\n props: {\n clearable: true\n },\n name: '$input'\n },\n filters: [{\n data: ''\n }],\n filterMethod({\n option,\n row,\n column\n }) {\n if (option.data) {\n return xe_utils__WEBPACK_IMPORTED_MODULE_8___default().toValueString(row[column.field]).toLowerCase().indexOf(option.data) > -1;\n }\n return true;\n },\n slots: {\n filter: 'label_filter'\n }\n }, {\n title: '显示',\n field: 'visible',\n align: 'center',\n width: 80,\n params: {\n all: null\n },\n slots: {\n header: 'checkedBox_header',\n default: 'checkedBox_default'\n }\n }, {\n title: '新增',\n field: 'addDisplay',\n align: 'center',\n visible: props.addVisible,\n params: {\n all: 1\n },\n width: 80,\n slots: {\n header: 'checkedBox_header',\n default: 'checkedBox_default'\n }\n }, {\n title: '编辑',\n field: 'editDisplay',\n align: 'center',\n width: 80,\n visible: props.editVisible,\n params: {\n all: 0\n },\n slots: {\n header: 'checkedBox_header',\n default: 'checkedBox_default'\n }\n }, {\n title: '不保存',\n field: 'tableSaveToOtherProp',\n width: 95,\n params: {\n all: 0\n },\n slots: {\n header: 'checkedBox_header',\n default: 'checkedBox_default'\n }\n }, {\n title: '必填',\n field: 'required',\n width: 60,\n params: {\n all: null\n },\n slots: {\n header: 'checkedBox_header',\n default: 'checkedBox_default'\n }\n }, {\n title: '不导入',\n field: 'importToOtherProp',\n width: 95,\n params: {\n all: 0\n },\n slots: {\n header: 'checkedBox_header',\n default: 'checkedBox_default'\n }\n }, {\n title: '列宽',\n width: 80,\n field: 'width',\n editRender: {\n props: {\n clearable: true\n },\n name: '$input'\n }\n }, {\n title: '排序',\n field: 'sortable',\n align: 'center',\n width: 100,\n params: {\n all: 0,\n dictCode: 'order_by_type'\n },\n editRender: {\n props: {\n clearable: true,\n filterable: true\n },\n name: '$select',\n options: dict.val('order_by_type')\n }\n }, {\n title: '数据字典',\n field: 'dictCode',\n params: {\n dictCode: 'dictCode'\n },\n width: 200,\n editRender: {\n props: {\n clearable: true,\n filterable: true\n },\n name: '$select',\n options: dictType.val()\n }\n // editRender: {props: {clearable: true, filterable: true}, name: 'input', options: dictType.val()}\n }, {\n title: '数据字典表',\n field: 'dictTableToOtherProp',\n width: 200,\n editRender: {\n name: '$input'\n }\n // editRender: {props: {clearable: true, filterable: true}, name: 'input', options: dictType.val()}\n }, {\n title: '搜索类型',\n field: 'selectType',\n params: {\n dictCode: 'select_type'\n },\n width: 120,\n editRender: {\n props: {\n clearable: true,\n filterable: true\n },\n name: '$select',\n options: dict.val('select_type')\n }\n }, {\n title: '固定',\n field: 'fixed',\n params: {\n dictCode: 'table_fixed'\n },\n editRender: {\n props: {\n clearable: true,\n filterable: true\n },\n name: '$select',\n options: dict.val('table_fixed')\n },\n width: 80\n }, {\n title: '控件类型',\n field: 'selectDom',\n /*params: {\r\n dictCode: 'select_dom'\r\n },*/\n width: 180,\n editRender: {\n props: {\n clearable: true,\n filterable: true\n },\n name: '$select',\n options: dict.val('select_dom')\n }\n /*slots: {\r\n default: 'select_default'\r\n },*/\n }, {\n title: '表尾',\n field: 'totalToOtherProp',\n width: 100,\n editRender: {\n props: {\n clearable: true,\n filterable: true\n },\n name: '$select',\n options: dict.val('online_calculation_type')\n }\n }, {\n title: '插槽',\n field: 'customSlotsToOtherProp',\n align: 'center',\n width: 80,\n params: {\n all: null\n },\n slots: {\n header: 'checkedBox_header',\n default: 'checkedBox_default'\n }\n }, {\n title: '分组合计',\n field: 'groupTotalToOtherProp',\n width: 100,\n editRender: {\n props: {\n clearable: true,\n filterable: true\n },\n name: '$select',\n options: dict.val('online_calculation_type')\n }\n }, {\n title: '分组',\n field: 'groupToOtherProp',\n width: 100,\n params: {\n all: null\n },\n slots: {\n default: 'checkedBox_default'\n }\n }, {\n title: '行合并',\n field: 'mergeFlag',\n width: 100,\n params: {\n all: null\n },\n slots: {\n header: 'checkedBox_header',\n default: 'checkedBox_default'\n }\n }, {\n title: '可列配置',\n field: 'columnAuth',\n align: 'center',\n width: 80,\n params: {\n all: null\n },\n slots: {\n header: 'checkedBox_header',\n default: 'checkedBox_default'\n }\n }, {\n title: '对齐',\n field: 'align',\n params: {\n dictCode: 'align'\n },\n editRender: {\n props: {\n clearable: true\n },\n name: '$select',\n options: dict.val('align')\n },\n width: 80\n }, {\n title: '列宽拖动',\n field: 'resizable',\n width: 80,\n params: {\n all: null\n },\n slots: {\n header: 'checkedBox_header',\n default: 'checkedBox_default'\n }\n }, {\n title: 'formatter',\n field: 'formatter',\n width: 168,\n slots: {\n default: 'dialog_default'\n }\n }, {\n title: '搜索顺序',\n field: 'searchSort',\n width: 100,\n editRender: {\n name: '$input',\n props: {\n type: 'number'\n }\n }\n }, {\n title: '搜索默认值',\n field: 'valueSEARCHToOtherProp',\n width: 100,\n editRender: {\n name: '$input'\n }\n }, {\n title: '不可清空',\n field: 'clearableSEARCHToOtherProp',\n width: 100,\n params: {},\n slots: {\n default: 'checkedBox_default'\n }\n }, {\n title: '时间',\n field: 'toDateSEARCHToOtherProp',\n width: 80,\n params: {},\n slots: {\n default: 'checkedBox_default'\n }\n }, {\n title: '搜索span',\n field: 'spanSEARCHToOtherProp',\n width: 110,\n editRender: {\n name: '$input',\n props: {\n clearable: true,\n min: 2,\n max: 24,\n type: 'number'\n }\n }\n }, {\n title: '搜索label',\n field: 'titleSEARCHToOtherProp',\n width: 120,\n editRender: {\n name: '$input',\n props: {\n clearable: true\n }\n }\n }, {\n title: '搜索字段',\n field: 'fieldNameSEARCHToOtherProp',\n width: 100,\n editRender: {\n name: '$input',\n props: {\n clearable: true\n }\n }\n }, {\n title: '搜索表别名',\n field: 'tableNameSEARCHToOtherProp',\n width: 100,\n editRender: {\n name: '$input',\n props: {\n clearable: true\n }\n }\n }, {\n title: '操作',\n width: 100,\n fixed: 'right',\n align: 'center',\n slots: {\n default: 'operate'\n }\n }, {\n title: '表尾自定义',\n field: 'totalToOtherProp',\n width: 100,\n params: {\n all: null\n },\n slots: {\n default: 'totalToOtherProp_default'\n }\n }, {\n title: '标签配置',\n field: 'tagJsonToOtherProp',\n width: 168,\n slots: {\n default: 'tag_form_default'\n }\n }, {\n title: '表格选取配置',\n field: 'tableSelectConfToOtherProp',\n width: 100,\n slots: {\n default: 'tableSelectConf_default'\n }\n }],\n data: [],\n groupColumns: []\n });\n //表格拖动更新\n const updateSort = () => {\n (0,vue__WEBPACK_IMPORTED_MODULE_5__.nextTick)(() => {\n if (!vexGridRef.value) {\n return;\n }\n //el绑定元素需要找到vxe的DOM下的tbody元素\n sortablejs__WEBPACK_IMPORTED_MODULE_9__[\"default\"].create(vexGridRef.value.$el.querySelector('.body--wrapper>.vxe-table--body tbody'), {\n animation: 200,\n //拖拽动画过渡时间\n sort: true,\n handle: '.col--seq',\n //必须设置该属性,属性值为你要拖动的该单元格的样式名\n // 元素被选中\n onStart: function (/**Event*/evt) {\n //关闭所有展开行\n vexGridRef.value.clearRowExpand();\n evt.oldIndex; // element index within parent\n },\n // 结束拖拽\n onEnd: function (/**Event*/{\n oldIndex,\n newIndex,\n item\n }) {\n //evt.to; // 目标列表\n //evt.from; // 来自以前的列表\n //evt.oldIndex; // 元素在旧父元素中的旧索引\n //evt.newIndex; // 元素在新父元素中的新索引\n //evt.clone // 克隆元素\n //evt.pullMode; // 当项在另一个可排序中时:\"clone\"(克隆),\"true\"(移动)\n let rowNode = vexGridRef.value.getRowNode(item);\n newIndex = rowNode.index - oldIndex + newIndex;\n const list = JSON.parse(JSON.stringify(gridOptions.data)); //保存旧数据\n const targetRow = list.splice(rowNode.index, 1)[0]; //保存移动的元素并删除原列表中移动的元素\n list.splice(newIndex, 0, targetRow); //插入到目标新索引中\n const newsArr = JSON.parse(JSON.stringify(list)); //重新赋值数组\n //将新数据重新排序\n for (let i = 0; i < newsArr.length; i++) {\n newsArr[i].sort = i + 1;\n }\n gridOptions.data = newsArr;\n }\n });\n });\n };\n (0,vue__WEBPACK_IMPORTED_MODULE_5__.onMounted)(() => {\n updateSort();\n });\n const enterFilterEvent = ({\n $panel\n }) => {\n $panel.confirmFilter();\n };\n\n // 子组件调用父组件\n const emits = __emit; //声明 emits\n function getColumns() {\n return gridOptions.data;\n }\n function getGroupColumnData() {\n return gridOptions.groupColumns;\n }\n function setGroupColumnData(value) {\n gridOptions.groupColumns = value.groupColumns;\n }\n\n // 对外暴露\n __expose({\n setData,\n updateData,\n gridOptions,\n vexGridRef,\n getColumns,\n setAddDisplay,\n setEditDisplay,\n setShow,\n getGroupColumnData\n });\n const __returned__ = {\n props,\n show,\n vexGridRef,\n headerConfig,\n dict,\n dictType,\n setShow,\n setGroupByMin,\n http,\n headerConfigShow,\n checkBoxAllChange,\n setCardColumnVisible,\n headerClick,\n checkBoxClick,\n setData,\n handleRemoveGroupColumn,\n hasGroupColChange,\n handleAddGroupColumn,\n onAdd,\n removeRowEvent,\n handleCheckBoxClick,\n updateData,\n visible,\n setAddDisplay,\n doEmits,\n setEditDisplay,\n updateColumnAuth,\n updateTitleAndWidth,\n gridOptions,\n updateSort,\n enterFilterEvent,\n emits,\n getColumns,\n getGroupColumnData,\n setGroupColumnData,\n ref: vue__WEBPACK_IMPORTED_MODULE_5__.ref,\n reactive: vue__WEBPACK_IMPORTED_MODULE_5__.reactive,\n onMounted: vue__WEBPACK_IMPORTED_MODULE_5__.onMounted,\n nextTick: vue__WEBPACK_IMPORTED_MODULE_5__.nextTick,\n watch: vue__WEBPACK_IMPORTED_MODULE_5__.watch,\n inject: vue__WEBPACK_IMPORTED_MODULE_5__.inject,\n get Delete() {\n return _element_plus_icons_vue__WEBPACK_IMPORTED_MODULE_6__.Delete;\n },\n get VXETable() {\n return (vxe_table__WEBPACK_IMPORTED_MODULE_7___default());\n },\n get XEUtils() {\n return (xe_utils__WEBPACK_IMPORTED_MODULE_8___default());\n },\n get Sortable() {\n return sortablejs__WEBPACK_IMPORTED_MODULE_9__[\"default\"];\n },\n get storeDict() {\n return _store_dict__WEBPACK_IMPORTED_MODULE_10__.storeDict;\n },\n get storeDictType() {\n return _store_dictType__WEBPACK_IMPORTED_MODULE_11__.storeDictType;\n },\n HeaderConfig: _views_table_add_or_edit_config_column_config_header_config_vue__WEBPACK_IMPORTED_MODULE_12__[\"default\"],\n get get() {\n return _utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_13__.get;\n },\n OlDialogTagForm: _components_ol_dialog_tagForm_vue__WEBPACK_IMPORTED_MODULE_14__[\"default\"],\n OlTableSelectConfig: _components_ol_table_select_config_vue__WEBPACK_IMPORTED_MODULE_15__[\"default\"]\n };\n Object.defineProperty(__returned__, '__isScriptSetup', {\n enumerable: false,\n value: true\n });\n return __returned__;\n }\n});\n\n//# sourceURL=webpack://olp-table/./src/views/table/add-or-edit/config/column-config/index.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use%5B0%5D!./node_modules/vue-loader/dist/index.js??ruleSet%5B0%5D.use%5B0%5D");
942
942
 
943
943
  /***/ }),
944
944
 
@@ -1675,7 +1675,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
1675
1675
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1676
1676
 
1677
1677
  "use strict";
1678
- 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_find_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.iterator.find.js */ \"./node_modules/core-js/modules/es.iterator.find.js\");\n/* harmony import */ var core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_find_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 = {\n class: \"el-date-table-cell__text\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_ol_table_select = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"ol-table-select\");\n const _component_IconSelect = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"IconSelect\");\n const _component_olUploadFile = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"olUploadFile\");\n const _component_el_cascader = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"el-cascader\");\n const _component_el_date_picker = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"el-date-picker\");\n const _component_avue_form = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"avue-form\");\n const _component_VFormRender = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"VFormRender\");\n const _component_el_scrollbar = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"el-scrollbar\");\n const _component_el_button = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"el-button\");\n const _component_el_dialog = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"el-dialog\");\n const _component_FileUpload = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"FileUpload\");\n const _directive_loading = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveDirective)(\"loading\");\n return (0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementBlock)(\"div\", null, [_ctx.isDialog === true && _ctx.state.isDialog === true ? (0,vue__WEBPACK_IMPORTED_MODULE_2__.withDirectives)(((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_el_dialog, {\n key: 0,\n modelValue: _ctx.state.dialogVisible,\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = $event => _ctx.state.dialogVisible = $event),\n title: _ctx.state.title,\n \"align-center\": \"\",\n \"destroy-on-close\": \"\",\n width: _ctx.state.width,\n \"close-on-click-modal\": false\n }, {\n footer: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_el_button, {\n onClick: _ctx.close\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => _cache[4] || (_cache[4] = [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createTextVNode)(\"返 回\")])),\n _: 1 /* STABLE */,\n __: [4]\n }, 8 /* PROPS */, [\"onClick\"]), _ctx.show ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_el_button, {\n key: 0,\n type: \"primary\",\n loading: _ctx.state.loading,\n onClick: _ctx.doSave\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => _cache[5] || (_cache[5] = [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createTextVNode)(\"保 存\")])),\n _: 1 /* STABLE */,\n __: [5]\n }, 8 /* PROPS */, [\"loading\", \"onClick\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true)]),\n default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_el_scrollbar, {\n \"max-height\": _ctx.state.maxHeight,\n style: {\n \"padding-right\": \"10px\"\n }\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => [_ctx.state.type == '0' ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_avue_form, {\n key: _ctx.state.key,\n ref: \"formRef\",\n option: _ctx.form,\n modelValue: _ctx.formData,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = $event => _ctx.formData = $event)\n }, (0,vue__WEBPACK_IMPORTED_MODULE_2__.createSlots)({\n _: 2 /* DYNAMIC */\n }, [(0,vue__WEBPACK_IMPORTED_MODULE_2__.renderList)(_ctx.dynamicSlotsTable, slotRow => {\n return {\n name: slotRow.slotName,\n fn: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(({\n disabled,\n size\n }) => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\" 根据配置动态渲染插槽内容 \"), slotRow.type == '22' ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_ol_table_select, {\n key: 0,\n onOlTableSelectChange: _ctx.olTableSelectChange,\n slotName: slotRow.slotName,\n http: _ctx.http,\n defaultValue: _ctx.formData[slotRow.slotName],\n uuid: slotRow.config.uuid,\n disabled: disabled,\n size: size,\n config: slotRow.config\n }, null, 8 /* PROPS */, [\"onOlTableSelectChange\", \"slotName\", \"http\", \"defaultValue\", \"uuid\", \"disabled\", \"size\", \"config\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true), slotRow.type == '21' ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_IconSelect, {\n key: 1,\n modelValue: _ctx.formData[slotRow.slotName],\n \"onUpdate:modelValue\": $event => _ctx.formData[slotRow.slotName] = $event,\n clearable: \"\"\n }, null, 8 /* PROPS */, [\"modelValue\", \"onUpdate:modelValue\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\" <FileUpload v-if=\\\"slotRow.type === '20'\\\" v-model=\\\"formData[slotRow.slotName]\\\" :limit=\\\"1\\\" @emits=\\\"(eventData) => handleEmits(eventData, slotRow.slotName)\\\" />\"), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\" {url:\\\"/infra/file/uploadFile\\\",autoClose:true,multiple:true,query:false,js:js})\"), slotRow.type === '20' ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_olUploadFile, {\n key: 2,\n slotName: slotRow.slotName,\n column: this.form.column.find(item => item.prop === slotRow.slotName),\n url: \"/infra/file/uploadFile\",\n testMode: true,\n multiple: true,\n fileListData: _ctx.formData[slotRow.slotName],\n onUploadChange: _ctx.uploadChange\n }, null, 8 /* PROPS */, [\"slotName\", \"column\", \"fileListData\", \"onUploadChange\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true), slotRow.type === 'tree' ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_el_cascader, {\n key: 3,\n style: {\n \"width\": \"100%\"\n },\n modelValue: _ctx.formData[slotRow.slotName],\n \"onUpdate:modelValue\": $event => _ctx.formData[slotRow.slotName] = $event,\n options: _ctx.getCascaderOptions(slotRow.slotName),\n props: _ctx.elCascaderProps,\n clearable: \"\",\n filterable: \"\"\n }, null, 8 /* PROPS */, [\"modelValue\", \"onUpdate:modelValue\", \"options\", \"props\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true), slotRow.type === 'month' ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_el_date_picker, {\n key: 4,\n style: {\n \"width\": \"100%\"\n },\n modelValue: _ctx.formData[slotRow.slotName],\n \"onUpdate:modelValue\": $event => _ctx.formData[slotRow.slotName] = $event,\n type: \"month\",\n \"value-format\": \"YYYY-MM\",\n format: \"YYYY-MM\",\n onChange: val => _ctx.onDateChange(val, slotRow.slotName),\n placeholder: \"选择月份\"\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(cell => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementVNode)(\"div\", {\n class: (0,vue__WEBPACK_IMPORTED_MODULE_2__.normalizeClass)([\"el-date-table-cell\", {\n current: cell.isCurrent,\n selected: cell.isSelected\n }])\n }, [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementVNode)(\"span\", _hoisted_1, (0,vue__WEBPACK_IMPORTED_MODULE_2__.toDisplayString)(_ctx.getChineseMonth(cell.text)), 1 /* TEXT */)], 2 /* CLASS */)]),\n _: 2 /* DYNAMIC */\n }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"modelValue\", \"onUpdate:modelValue\", \"onChange\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true)])\n };\n })]), 1032 /* PROPS, DYNAMIC_SLOTS */, [\"option\", \"modelValue\"])) : ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_VFormRender, {\n key: 1,\n \"form-json\": _ctx.form,\n \"form-data\": _ctx.formData,\n \"option-data\": _ctx.optionData,\n ref: \"formRef\"\n }, null, 8 /* PROPS */, [\"form-json\", \"form-data\", \"option-data\"]))]),\n _: 1 /* STABLE */\n }, 8 /* PROPS */, [\"max-height\"])]),\n _: 1 /* STABLE */\n }, 8 /* PROPS */, [\"modelValue\", \"title\", \"width\"])), [[_directive_loading, _ctx.state.loading]]) : ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_el_scrollbar, {\n key: 1,\n modelValue: _ctx.state.dialogVisible,\n \"onUpdate:modelValue\": _cache[3] || (_cache[3] = $event => _ctx.state.dialogVisible = $event),\n \"max-height\": _ctx.state.maxHeight\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => [_ctx.state.type == '0' ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_avue_form, {\n key: _ctx.state.key,\n ref: \"formRef\",\n option: _ctx.form,\n modelValue: _ctx.formData,\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = $event => _ctx.formData = $event)\n }, (0,vue__WEBPACK_IMPORTED_MODULE_2__.createSlots)({\n _: 2 /* DYNAMIC */\n }, [(0,vue__WEBPACK_IMPORTED_MODULE_2__.renderList)(_ctx.dynamicSlotsTable, slotRow => {\n return {\n name: slotRow.slotName,\n fn: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(({\n disabled,\n size\n }) => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\" 根据配置动态渲染插槽内容 \"), slotRow.type == '22' ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_ol_table_select, {\n key: 0,\n onOlTableSelectChange: _ctx.olTableSelectChange,\n slotName: slotRow.slotName,\n http: _ctx.http,\n defaultValue: _ctx.formData[slotRow.slotName],\n uuid: slotRow.config.uuid,\n disabled: disabled,\n size: size,\n config: slotRow.config\n }, null, 8 /* PROPS */, [\"onOlTableSelectChange\", \"slotName\", \"http\", \"defaultValue\", \"uuid\", \"disabled\", \"size\", \"config\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true), slotRow.type == '21' ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_IconSelect, {\n key: 1,\n modelValue: _ctx.formData[slotRow.slotName],\n \"onUpdate:modelValue\": $event => _ctx.formData[slotRow.slotName] = $event,\n clearable: \"\"\n }, null, 8 /* PROPS */, [\"modelValue\", \"onUpdate:modelValue\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true), slotRow.type === '20' ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_FileUpload, {\n key: 2,\n modelValue: _ctx.formData[slotRow.slotName],\n \"onUpdate:modelValue\": $event => _ctx.formData[slotRow.slotName] = $event,\n limit: 1,\n onEmits: _ctx.emits\n }, null, 8 /* PROPS */, [\"modelValue\", \"onUpdate:modelValue\", \"onEmits\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true)])\n };\n })]), 1032 /* PROPS, DYNAMIC_SLOTS */, [\"option\", \"modelValue\"])) : ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_VFormRender, {\n key: 1,\n \"form-json\": _ctx.form,\n \"form-data\": _ctx.formData,\n \"option-data\": _ctx.optionData,\n ref: \"formRef\"\n }, null, 8 /* PROPS */, [\"form-json\", \"form-data\", \"option-data\"]))]),\n _: 1 /* STABLE */\n }, 8 /* PROPS */, [\"modelValue\", \"max-height\"]))]);\n}\n\n//# sourceURL=webpack://olp-table/./src/components/table/ol-form/index.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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");
1678
+ 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_find_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.iterator.find.js */ \"./node_modules/core-js/modules/es.iterator.find.js\");\n/* harmony import */ var core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_find_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 = {\n class: \"el-date-table-cell__text\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_ol_table_select = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"ol-table-select\");\n const _component_IconSelect = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"IconSelect\");\n const _component_olUploadFile = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"olUploadFile\");\n const _component_el_cascader = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"el-cascader\");\n const _component_el_date_picker = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"el-date-picker\");\n const _component_avue_form = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"avue-form\");\n const _component_VFormRender = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"VFormRender\");\n const _component_el_scrollbar = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"el-scrollbar\");\n const _component_el_button = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"el-button\");\n const _component_el_dialog = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"el-dialog\");\n const _component_FileUpload = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"FileUpload\");\n const _directive_loading = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveDirective)(\"loading\");\n return (0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementBlock)(\"div\", null, [_ctx.isDialog === true && _ctx.state.isDialog === true ? (0,vue__WEBPACK_IMPORTED_MODULE_2__.withDirectives)(((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_el_dialog, {\n key: 0,\n modelValue: _ctx.state.dialogVisible,\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = $event => _ctx.state.dialogVisible = $event),\n title: _ctx.state.title,\n \"align-center\": \"\",\n \"destroy-on-close\": \"\",\n width: _ctx.state.width,\n \"close-on-click-modal\": false\n }, {\n footer: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_el_button, {\n onClick: _ctx.close\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => _cache[4] || (_cache[4] = [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createTextVNode)(\"返 回\")])),\n _: 1 /* STABLE */,\n __: [4]\n }, 8 /* PROPS */, [\"onClick\"]), _ctx.show ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_el_button, {\n key: 0,\n type: \"primary\",\n loading: _ctx.state.loading,\n onClick: _ctx.doSave\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => _cache[5] || (_cache[5] = [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createTextVNode)(\"保 存\")])),\n _: 1 /* STABLE */,\n __: [5]\n }, 8 /* PROPS */, [\"loading\", \"onClick\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true)]),\n default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_el_scrollbar, {\n \"max-height\": _ctx.state.maxHeight,\n style: {\n \"padding-right\": \"10px\"\n }\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => [_ctx.state.type == '0' ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_avue_form, {\n key: _ctx.state.key,\n ref: \"formRef\",\n option: _ctx.form,\n modelValue: _ctx.formData,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = $event => _ctx.formData = $event)\n }, (0,vue__WEBPACK_IMPORTED_MODULE_2__.createSlots)({\n _: 2 /* DYNAMIC */\n }, [(0,vue__WEBPACK_IMPORTED_MODULE_2__.renderList)(_ctx.dynamicSlotsTable, slotRow => {\n return {\n name: slotRow.slotName,\n fn: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(({\n disabled,\n size\n }) => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\" 根据配置动态渲染插槽内容 \"), slotRow.type == '22' ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_ol_table_select, {\n key: 0,\n onOlTableSelectChange: _ctx.olTableSelectChange,\n slotName: slotRow.slotName,\n http: _ctx.http,\n defaultValue: _ctx.formData[slotRow.slotName],\n uuid: slotRow.config.uuid,\n disabled: disabled,\n size: size,\n config: slotRow.config\n }, null, 8 /* PROPS */, [\"onOlTableSelectChange\", \"slotName\", \"http\", \"defaultValue\", \"uuid\", \"disabled\", \"size\", \"config\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true), slotRow.type == '21' ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_IconSelect, {\n key: 1,\n modelValue: _ctx.formData[slotRow.slotName],\n \"onUpdate:modelValue\": $event => _ctx.formData[slotRow.slotName] = $event,\n clearable: \"\"\n }, null, 8 /* PROPS */, [\"modelValue\", \"onUpdate:modelValue\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\" <FileUpload v-if=\\\"slotRow.type === '20'\\\" v-model=\\\"formData[slotRow.slotName]\\\" :limit=\\\"1\\\" @emits=\\\"(eventData) => handleEmits(eventData, slotRow.slotName)\\\" />\"), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\" {url:\\\"/infra/file/uploadFile\\\",autoClose:true,multiple:true,query:false,js:js})\"), slotRow.type === '20' ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_olUploadFile, {\n key: 2,\n slotName: slotRow.slotName,\n column: this.form.column.find(item => item.prop === slotRow.slotName),\n url: \"/infra/file/uploadFile\",\n testMode: true,\n multiple: true,\n fileListData: _ctx.formData[slotRow.slotName],\n onUploadChange: _ctx.uploadChange\n }, null, 8 /* PROPS */, [\"slotName\", \"column\", \"fileListData\", \"onUploadChange\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true), slotRow.type === 'tree' ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_el_cascader, {\n key: 3,\n style: {\n \"width\": \"100%\"\n },\n modelValue: _ctx.formData[slotRow.slotName],\n \"onUpdate:modelValue\": $event => _ctx.formData[slotRow.slotName] = $event,\n options: _ctx.getCascaderOptions(slotRow.slotName),\n props: _ctx.elCascaderProps,\n clearable: \"\",\n filterable: \"\"\n }, null, 8 /* PROPS */, [\"modelValue\", \"onUpdate:modelValue\", \"options\", \"props\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true), slotRow.type === 'month' ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_el_date_picker, {\n key: 4,\n style: {\n \"width\": \"100%\"\n },\n modelValue: _ctx.formData[slotRow.slotName],\n \"onUpdate:modelValue\": $event => _ctx.formData[slotRow.slotName] = $event,\n type: \"month\",\n \"value-format\": \"YYYY-MM\",\n format: \"YYYY-MM\",\n onChange: val => _ctx.onDateChange(val, slotRow.slotName),\n placeholder: slotRow?.placeholder\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(cell => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementVNode)(\"div\", {\n class: (0,vue__WEBPACK_IMPORTED_MODULE_2__.normalizeClass)([\"el-date-table-cell\", {\n current: cell.isCurrent,\n selected: cell.isSelected\n }])\n }, [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementVNode)(\"span\", _hoisted_1, (0,vue__WEBPACK_IMPORTED_MODULE_2__.toDisplayString)(_ctx.getChineseMonth(cell.text)), 1 /* TEXT */)], 2 /* CLASS */)]),\n _: 2 /* DYNAMIC */\n }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"modelValue\", \"onUpdate:modelValue\", \"onChange\", \"placeholder\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true)])\n };\n })]), 1032 /* PROPS, DYNAMIC_SLOTS */, [\"option\", \"modelValue\"])) : ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_VFormRender, {\n key: 1,\n \"form-json\": _ctx.form,\n \"form-data\": _ctx.formData,\n \"option-data\": _ctx.optionData,\n ref: \"formRef\"\n }, null, 8 /* PROPS */, [\"form-json\", \"form-data\", \"option-data\"]))]),\n _: 1 /* STABLE */\n }, 8 /* PROPS */, [\"max-height\"])]),\n _: 1 /* STABLE */\n }, 8 /* PROPS */, [\"modelValue\", \"title\", \"width\"])), [[_directive_loading, _ctx.state.loading]]) : ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_el_scrollbar, {\n key: 1,\n modelValue: _ctx.state.dialogVisible,\n \"onUpdate:modelValue\": _cache[3] || (_cache[3] = $event => _ctx.state.dialogVisible = $event),\n \"max-height\": _ctx.state.maxHeight\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => [_ctx.state.type == '0' ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_avue_form, {\n key: _ctx.state.key,\n ref: \"formRef\",\n option: _ctx.form,\n modelValue: _ctx.formData,\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = $event => _ctx.formData = $event)\n }, (0,vue__WEBPACK_IMPORTED_MODULE_2__.createSlots)({\n _: 2 /* DYNAMIC */\n }, [(0,vue__WEBPACK_IMPORTED_MODULE_2__.renderList)(_ctx.dynamicSlotsTable, slotRow => {\n return {\n name: slotRow.slotName,\n fn: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(({\n disabled,\n size\n }) => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\" 根据配置动态渲染插槽内容 \"), slotRow.type == '22' ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_ol_table_select, {\n key: 0,\n onOlTableSelectChange: _ctx.olTableSelectChange,\n slotName: slotRow.slotName,\n http: _ctx.http,\n defaultValue: _ctx.formData[slotRow.slotName],\n uuid: slotRow.config.uuid,\n disabled: disabled,\n size: size,\n config: slotRow.config\n }, null, 8 /* PROPS */, [\"onOlTableSelectChange\", \"slotName\", \"http\", \"defaultValue\", \"uuid\", \"disabled\", \"size\", \"config\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true), slotRow.type == '21' ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_IconSelect, {\n key: 1,\n modelValue: _ctx.formData[slotRow.slotName],\n \"onUpdate:modelValue\": $event => _ctx.formData[slotRow.slotName] = $event,\n clearable: \"\"\n }, null, 8 /* PROPS */, [\"modelValue\", \"onUpdate:modelValue\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true), slotRow.type === '20' ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_FileUpload, {\n key: 2,\n modelValue: _ctx.formData[slotRow.slotName],\n \"onUpdate:modelValue\": $event => _ctx.formData[slotRow.slotName] = $event,\n limit: 1,\n onEmits: _ctx.emits\n }, null, 8 /* PROPS */, [\"modelValue\", \"onUpdate:modelValue\", \"onEmits\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true)])\n };\n })]), 1032 /* PROPS, DYNAMIC_SLOTS */, [\"option\", \"modelValue\"])) : ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_VFormRender, {\n key: 1,\n \"form-json\": _ctx.form,\n \"form-data\": _ctx.formData,\n \"option-data\": _ctx.optionData,\n ref: \"formRef\"\n }, null, 8 /* PROPS */, [\"form-json\", \"form-data\", \"option-data\"]))]),\n _: 1 /* STABLE */\n }, 8 /* PROPS */, [\"modelValue\", \"max-height\"]))]);\n}\n\n//# sourceURL=webpack://olp-table/./src/components/table/ol-form/index.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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");
1679
1679
 
1680
1680
  /***/ }),
1681
1681
 
@@ -1686,7 +1686,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
1686
1686
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1687
1687
 
1688
1688
  "use strict";
1689
- 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_find_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.iterator.find.js */ \"./node_modules/core-js/modules/es.iterator.find.js\");\n/* harmony import */ var core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_find_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 = {\n style: {\n \"padding-right\": \"10px\",\n \"height\": \"86vh\"\n }\n};\nconst _hoisted_2 = {\n class: \"el-date-table-cell__text\"\n};\nconst _hoisted_3 = {\n class: \"footer-container\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_ol_table_select = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"ol-table-select\");\n const _component_IconSelect = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"IconSelect\");\n const _component_olUploadFile = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"olUploadFile\");\n const _component_el_cascader = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"el-cascader\");\n const _component_el_date_picker = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"el-date-picker\");\n const _component_avue_form = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"avue-form\");\n const _component_model_index = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"model-index\");\n const _component_el_button = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"el-button\");\n const _component_el_row = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"el-row\");\n const _component_el_dialog = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"el-dialog\");\n const _directive_loading = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveDirective)(\"loading\");\n return _ctx.isDialog === true && _ctx.state.isDialog === true ? (0,vue__WEBPACK_IMPORTED_MODULE_2__.withDirectives)(((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_el_dialog, {\n key: 0,\n modelValue: _ctx.state.dialogVisible,\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = $event => _ctx.state.dialogVisible = $event),\n title: _ctx.state.title,\n \"align-center\": \"\",\n \"destroy-on-close\": \"\",\n fullscreen: \"\",\n \"close-on-click-modal\": false\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementVNode)(\"div\", _hoisted_1, [((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_avue_form, {\n key: _ctx.state.key,\n ref: \"formRef\",\n option: _ctx.form,\n modelValue: _ctx.formData,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = $event => _ctx.formData = $event)\n }, (0,vue__WEBPACK_IMPORTED_MODULE_2__.createSlots)({\n _: 2 /* DYNAMIC */\n }, [(0,vue__WEBPACK_IMPORTED_MODULE_2__.renderList)(_ctx.dynamicSlotsTable, slotRow => {\n return {\n name: slotRow.slotName,\n fn: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(({\n disabled,\n size\n }) => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\" 根据配置动态渲染插槽内容 \"), slotRow.type == '22' ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_ol_table_select, {\n key: 0,\n onOlTableSelectChange: $options.olTableSelectChange,\n slotName: slotRow.slotName,\n http: _ctx.http,\n defaultValue: _ctx.formData[slotRow.slotName],\n uuid: slotRow.config.uuid,\n disabled: disabled,\n size: size,\n config: slotRow.config\n }, null, 8 /* PROPS */, [\"onOlTableSelectChange\", \"slotName\", \"http\", \"defaultValue\", \"uuid\", \"disabled\", \"size\", \"config\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true), slotRow.type == '21' ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_IconSelect, {\n key: 1,\n modelValue: _ctx.formData[slotRow.slotName],\n \"onUpdate:modelValue\": $event => _ctx.formData[slotRow.slotName] = $event,\n clearable: \"\"\n }, null, 8 /* PROPS */, [\"modelValue\", \"onUpdate:modelValue\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\" <FileUpload v-if=\\\"slotRow.type === '20'\\\" v-model=\\\"formData[slotRow.slotName]\\\" :limit=\\\"1\\\" @emits=\\\"(eventData) => handleEmits(eventData, slotRow.slotName)\\\" />\"), slotRow.type === '20' ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_olUploadFile, {\n key: 2,\n slotName: slotRow.slotName,\n column: this.form.column.find(item => item.prop === slotRow.slotName),\n url: \"/infra/file/uploadFile\",\n testMode: false,\n multiple: true,\n fileListData: _ctx.formData[slotRow.slotName],\n onUploadChange: _ctx.uploadChange\n }, null, 8 /* PROPS */, [\"slotName\", \"column\", \"fileListData\", \"onUploadChange\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true), slotRow.type === 'tree' ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_el_cascader, {\n key: 3,\n style: {\n \"width\": \"100%\"\n },\n modelValue: _ctx.formData[slotRow.slotName],\n \"onUpdate:modelValue\": $event => _ctx.formData[slotRow.slotName] = $event,\n options: _ctx.getCascaderOptions(slotRow.slotName),\n props: _ctx.elCascaderProps,\n clearable: \"\",\n filterable: \"\"\n }, null, 8 /* PROPS */, [\"modelValue\", \"onUpdate:modelValue\", \"options\", \"props\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true), slotRow.type === 'month' ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_el_date_picker, {\n key: 4,\n style: {\n \"width\": \"100%\"\n },\n modelValue: _ctx.formData[slotRow.slotName],\n \"onUpdate:modelValue\": $event => _ctx.formData[slotRow.slotName] = $event,\n type: slotRow.type,\n \"value-format\": slotRow.valueFormat,\n format: slotRow.format,\n onChange: val => _ctx.onDateChange(val, slotRow.slotName),\n placeholder: \"选择月份\"\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(cell => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementVNode)(\"div\", {\n class: (0,vue__WEBPACK_IMPORTED_MODULE_2__.normalizeClass)([\"el-date-table-cell\", {\n current: cell.isCurrent,\n selected: cell.isSelected\n }])\n }, [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementVNode)(\"span\", _hoisted_2, (0,vue__WEBPACK_IMPORTED_MODULE_2__.toDisplayString)(_ctx.getChineseMonth(cell.text)), 1 /* TEXT */)], 2 /* CLASS */)]),\n _: 2 /* DYNAMIC */\n }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"modelValue\", \"onUpdate:modelValue\", \"type\", \"value-format\", \"format\", \"onChange\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true)])\n };\n })]), 1032 /* PROPS, DYNAMIC_SLOTS */, [\"option\", \"modelValue\"])), _ctx.state.uuid ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_model_index, {\n key: 0,\n ref: \"subTable\",\n uuid: _ctx.state.uuid,\n http: $options.https,\n onInitOk: $options.ok\n }, null, 8 /* PROPS */, [\"uuid\", \"http\", \"onInitOk\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true)]), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementVNode)(\"div\", _hoisted_3, [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_el_row, {\n style: {\n \"height\": \"50px\",\n \"padding\": \"10px 20px 0 0\",\n \"border-top\": \"1px solid #e8eaec\",\n \"background\": \"white\",\n \"justify-content\": \"right\"\n }\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_el_button, {\n onClick: _ctx.close\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => _cache[2] || (_cache[2] = [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createTextVNode)(\"返 回\")])),\n _: 1 /* STABLE */,\n __: [2]\n }, 8 /* PROPS */, [\"onClick\"]), _ctx.show ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_el_button, {\n key: 0,\n type: \"primary\",\n loading: _ctx.state.loading,\n onClick: _ctx.doSave\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => _cache[3] || (_cache[3] = [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createTextVNode)(\"保 存\")])),\n _: 1 /* STABLE */,\n __: [3]\n }, 8 /* PROPS */, [\"loading\", \"onClick\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true)]),\n _: 1 /* STABLE */\n })])]),\n _: 1 /* STABLE */\n }, 8 /* PROPS */, [\"modelValue\", \"title\"])), [[_directive_loading, _ctx.state.loading]]) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true);\n}\n\n//# sourceURL=webpack://olp-table/./src/components/table/ol-main-form-sub-table/index.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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");
1689
+ 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_find_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.iterator.find.js */ \"./node_modules/core-js/modules/es.iterator.find.js\");\n/* harmony import */ var core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_find_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 = {\n style: {\n \"padding-right\": \"10px\",\n \"height\": \"86vh\"\n }\n};\nconst _hoisted_2 = {\n class: \"el-date-table-cell__text\"\n};\nconst _hoisted_3 = {\n class: \"footer-container\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_ol_table_select = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"ol-table-select\");\n const _component_IconSelect = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"IconSelect\");\n const _component_olUploadFile = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"olUploadFile\");\n const _component_el_cascader = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"el-cascader\");\n const _component_el_date_picker = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"el-date-picker\");\n const _component_avue_form = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"avue-form\");\n const _component_model_index = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"model-index\");\n const _component_el_button = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"el-button\");\n const _component_el_row = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"el-row\");\n const _component_el_dialog = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveComponent)(\"el-dialog\");\n const _directive_loading = (0,vue__WEBPACK_IMPORTED_MODULE_2__.resolveDirective)(\"loading\");\n return _ctx.isDialog === true && _ctx.state.isDialog === true ? (0,vue__WEBPACK_IMPORTED_MODULE_2__.withDirectives)(((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_el_dialog, {\n key: 0,\n modelValue: _ctx.state.dialogVisible,\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = $event => _ctx.state.dialogVisible = $event),\n title: _ctx.state.title,\n \"align-center\": \"\",\n \"destroy-on-close\": \"\",\n fullscreen: \"\",\n \"close-on-click-modal\": false\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementVNode)(\"div\", _hoisted_1, [((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_avue_form, {\n key: _ctx.state.key,\n ref: \"formRef\",\n option: _ctx.form,\n modelValue: _ctx.formData,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = $event => _ctx.formData = $event)\n }, (0,vue__WEBPACK_IMPORTED_MODULE_2__.createSlots)({\n _: 2 /* DYNAMIC */\n }, [(0,vue__WEBPACK_IMPORTED_MODULE_2__.renderList)(_ctx.dynamicSlotsTable, slotRow => {\n return {\n name: slotRow.slotName,\n fn: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(({\n disabled,\n size\n }) => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\" 根据配置动态渲染插槽内容 \"), slotRow.type == '22' ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_ol_table_select, {\n key: 0,\n onOlTableSelectChange: $options.olTableSelectChange,\n slotName: slotRow.slotName,\n http: _ctx.http,\n defaultValue: _ctx.formData[slotRow.slotName],\n uuid: slotRow.config.uuid,\n disabled: disabled,\n size: size,\n config: slotRow.config\n }, null, 8 /* PROPS */, [\"onOlTableSelectChange\", \"slotName\", \"http\", \"defaultValue\", \"uuid\", \"disabled\", \"size\", \"config\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true), slotRow.type == '21' ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_IconSelect, {\n key: 1,\n modelValue: _ctx.formData[slotRow.slotName],\n \"onUpdate:modelValue\": $event => _ctx.formData[slotRow.slotName] = $event,\n clearable: \"\"\n }, null, 8 /* PROPS */, [\"modelValue\", \"onUpdate:modelValue\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\" <FileUpload v-if=\\\"slotRow.type === '20'\\\" v-model=\\\"formData[slotRow.slotName]\\\" :limit=\\\"1\\\" @emits=\\\"(eventData) => handleEmits(eventData, slotRow.slotName)\\\" />\"), slotRow.type === '20' ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_olUploadFile, {\n key: 2,\n slotName: slotRow.slotName,\n column: this.form.column.find(item => item.prop === slotRow.slotName),\n url: \"/infra/file/uploadFile\",\n testMode: false,\n multiple: true,\n fileListData: _ctx.formData[slotRow.slotName],\n onUploadChange: _ctx.uploadChange\n }, null, 8 /* PROPS */, [\"slotName\", \"column\", \"fileListData\", \"onUploadChange\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true), slotRow.type === 'tree' ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_el_cascader, {\n key: 3,\n style: {\n \"width\": \"100%\"\n },\n modelValue: _ctx.formData[slotRow.slotName],\n \"onUpdate:modelValue\": $event => _ctx.formData[slotRow.slotName] = $event,\n options: _ctx.getCascaderOptions(slotRow.slotName),\n props: _ctx.elCascaderProps,\n clearable: \"\",\n filterable: \"\"\n }, null, 8 /* PROPS */, [\"modelValue\", \"onUpdate:modelValue\", \"options\", \"props\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true), slotRow.type === 'month' ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_el_date_picker, {\n key: 4,\n style: {\n \"width\": \"100%\"\n },\n modelValue: _ctx.formData[slotRow.slotName],\n \"onUpdate:modelValue\": $event => _ctx.formData[slotRow.slotName] = $event,\n type: \"month\",\n \"value-format\": \"YYYY-MM\",\n format: \"YYYY-MM\",\n onChange: val => _ctx.onDateChange(val, slotRow.slotName),\n placeholder: slotRow?.placeholder\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(cell => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementVNode)(\"div\", {\n class: (0,vue__WEBPACK_IMPORTED_MODULE_2__.normalizeClass)([\"el-date-table-cell\", {\n current: cell.isCurrent,\n selected: cell.isSelected\n }])\n }, [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementVNode)(\"span\", _hoisted_2, (0,vue__WEBPACK_IMPORTED_MODULE_2__.toDisplayString)(_ctx.getChineseMonth(cell.text)), 1 /* TEXT */)], 2 /* CLASS */)]),\n _: 2 /* DYNAMIC */\n }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"modelValue\", \"onUpdate:modelValue\", \"onChange\", \"placeholder\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true)])\n };\n })]), 1032 /* PROPS, DYNAMIC_SLOTS */, [\"option\", \"modelValue\"])), _ctx.state.uuid ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_model_index, {\n key: 0,\n ref: \"subTable\",\n uuid: _ctx.state.uuid,\n http: $options.https,\n onInitOk: $options.ok\n }, null, 8 /* PROPS */, [\"uuid\", \"http\", \"onInitOk\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true)]), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createElementVNode)(\"div\", _hoisted_3, [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_el_row, {\n style: {\n \"height\": \"50px\",\n \"padding\": \"10px 20px 0 0\",\n \"border-top\": \"1px solid #e8eaec\",\n \"background\": \"white\",\n \"justify-content\": \"right\"\n }\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createVNode)(_component_el_button, {\n onClick: _ctx.close\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => _cache[2] || (_cache[2] = [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createTextVNode)(\"返 回\")])),\n _: 1 /* STABLE */,\n __: [2]\n }, 8 /* PROPS */, [\"onClick\"]), _ctx.show ? ((0,vue__WEBPACK_IMPORTED_MODULE_2__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_2__.createBlock)(_component_el_button, {\n key: 0,\n type: \"primary\",\n loading: _ctx.state.loading,\n onClick: _ctx.doSave\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_2__.withCtx)(() => _cache[3] || (_cache[3] = [(0,vue__WEBPACK_IMPORTED_MODULE_2__.createTextVNode)(\"保 存\")])),\n _: 1 /* STABLE */,\n __: [3]\n }, 8 /* PROPS */, [\"loading\", \"onClick\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true)]),\n _: 1 /* STABLE */\n })])]),\n _: 1 /* STABLE */\n }, 8 /* PROPS */, [\"modelValue\", \"title\"])), [[_directive_loading, _ctx.state.loading]]) : (0,vue__WEBPACK_IMPORTED_MODULE_2__.createCommentVNode)(\"v-if\", true);\n}\n\n//# sourceURL=webpack://olp-table/./src/components/table/ol-main-form-sub-table/index.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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");
1690
1690
 
1691
1691
  /***/ }),
1692
1692
 
@@ -12775,7 +12775,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
12775
12775
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
12776
12776
 
12777
12777
  "use strict";
12778
- 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_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_find_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.iterator.find.js */ \"./node_modules/core-js/modules/es.iterator.find.js\");\n/* harmony import */ var core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_4__ = __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_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.iterator.map.js */ \"./node_modules/core-js/modules/es.iterator.map.js\");\n/* harmony import */ var core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _utils_columnProp__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/utils/columnProp */ \"./src/utils/columnProp.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 _utils_tree__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/utils/tree */ \"./src/utils/tree.js\");\n/* harmony import */ var _utils_formUtils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/utils/formUtils */ \"./src/utils/formUtils.js\");\n/* harmony import */ var _api_dist__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @/api/dist */ \"./src/api/dist.js\");\n/* harmony import */ var _store_dict__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @/store/dict */ \"./src/store/dict.js\");\n/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @/utils/object */ \"./src/utils/object.js\");\n/* harmony import */ var _components_FileUpload_index_vue__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @/components/FileUpload/index.vue */ \"./src/components/FileUpload/index.vue\");\n/* harmony import */ var _components_Icon__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @/components/Icon */ \"./src/components/Icon/index.js\");\n/* harmony import */ var _components_ol_table_select_vue__WEBPACK_IMPORTED_MODULE_16__ = __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\n\n\n\nconst dict = (0,_store_dict__WEBPACK_IMPORTED_MODULE_12__.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_14__[\"default\"],\n IconSelect: _components_Icon__WEBPACK_IMPORTED_MODULE_15__.IconSelect,\n OlTableSelect: _components_ol_table_select_vue__WEBPACK_IMPORTED_MODULE_16__[\"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 elCascaderProps: {\n expandTrigger: 'hover',\n emitPath: false,\n checkStrictly: true\n }\n };\n },\n methods: {\n getCascaderOptions(slotName) {\n // console.info('getCascaderOptions',this.form.column)\n return this.form.column.find(item => item.prop === slotName).dicData;\n },\n getCascaderColumn(slotName) {\n // console.info('getCascaderOptions',this.form.column)\n return this.form.column.find(item => item.prop === slotName);\n },\n hideColumn(prop) {\n (0,_utils_object__WEBPACK_IMPORTED_MODULE_13__.setArrayObjectKeyValue)(this.form.column, 'display', false, prop);\n },\n showColumn(prop) {\n (0,_utils_object__WEBPACK_IMPORTED_MODULE_13__.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 /**\r\n * 封装主表单校验逻辑\r\n * @returns {Promise<*>}\r\n */\n async validateMainForm() {\n return new Promise(resolve => {\n const validator = this.state.type !== '0' ? this.$refs.formRef.getNativeForm().validate : (valid, done, msg) => this.$refs.formRef.validate(valid, done, msg);\n validator((valid, ...args) => {\n const [msg, done] = this.state.type === '0' ? [args[1], args[0]] : [args[0]];\n if (!valid) {\n const keys = Object.keys(msg);\n const domRef = this.state.type !== '0' ? this.$refs.formRef.getWidgetRef(keys[0])?.$el : this.$refs.formRef.getPropRef(keys[0])?.$el;\n domRef?.scrollIntoView({\n block: \"center\",\n behavior: \"smooth\"\n });\n (0,_utils_message__WEBPACK_IMPORTED_MODULE_7__.useMessage)().error(`主表单还有${keys.length}项未填写`);\n resolve(false);\n } else {\n resolve(true);\n }\n if (this.state.type === '0') done?.();\n });\n });\n },\n /**\r\n * 封装子表校验逻辑\r\n * @returns {Promise<FlatArray<Awaited<*>[], 1>[]>}\r\n */\n async validateSubTables() {\n // 1. 获取所有子表引用\n const subTablesRefs = this.$refs.subTable?.getTableRefs()?.getTabRefAll() || [];\n\n // 2. 并行执行全量校验(包含新增/修改/删除的数据)\n const validationPromises = subTablesRefs.map(subTable =>\n // 传入 true 校验所有数据(包括未修改的)\n subTable.$table.validate(true));\n\n // 3. 等待所有子表校验结果\n const results = await Promise.all(validationPromises);\n return results.flat().filter(Boolean);\n },\n /**\r\n * 错误定位工具函数\r\n * @param error\r\n */\n focusFirstError(error) {\n const targetEl = error.getElement?.();\n if (targetEl) {\n targetEl.scrollIntoView({\n block: \"center\",\n behavior: \"smooth\"\n });\n } else {\n console.warn(\"无法定位错误元素:\", error.field);\n }\n },\n async doMainSubSave() {\n try {\n // ====================== 1. 主表单校验 ======================\n const mainFormValid = await this.validateMainForm();\n if (!mainFormValid) return;\n\n // ====================== 2. 子表并行校验 ======================\n const subTableErrors = await this.validateSubTables();\n if (subTableErrors.length > 0) {\n this.focusFirstError(subTableErrors[0]);\n (0,_utils_message__WEBPACK_IMPORTED_MODULE_7__.useMessage)().error(`子表存在${subTableErrors.length}处错误,请修正后提交`);\n return;\n }\n\n // ====================== 3. 全部通过后保存 ======================\n this.save();\n } catch (error) {\n console.error(\"保存过程中发生异常:\", error);\n (0,_utils_message__WEBPACK_IMPORTED_MODULE_7__.useMessage)().error(\"系统异常,请稍后重试\");\n }\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_7__.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_7__.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.close();\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 close() {\n this.state.dialogVisible = false;\n this.$emit('emits', {});\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_8__.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_8__.postAes)(this.http, url, params).then(status => {\n this.saveOk(status);\n });\n } else {\n await (0,_utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_8__.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 getChineseMonth(monthIndex) {\n const monthNames = ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'];\n return monthNames[monthIndex] || `${monthIndex + 1}月`;\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 async initFormColumn(data) {\n for (let column of this.form.column) {\n if (data.disabled || column.disabled == 1) {\n column.disabled = true;\n }\n column.value = await (0,_utils_columnProp__WEBPACK_IMPORTED_MODULE_6__.getDefaultValue)(this.http, column);\n if (column.value != undefined) {\n this.formData[column.prop] = column.value;\n }\n console.log(column.value);\n this.setDepRoleDefault(column);\n if (column.selectDom === '11') {\n let slotObj = {\n slotName: column.prop,\n type: column.type,\n format: column.format,\n valueFormat: column.valueFormat\n };\n this.dynamicSlotsField[column.prop] = column; //收集继续动态改变值的字段信息,以便动态改变值时更新表单数据\n this.dynamicSlotsTable.push(slotObj); //收集需要的动态插槽字段信息\n } else 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_13__.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 async doInit(data) {\n this.beforeInit();\n this.show = !data.disabled;\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 } else {\n this.state.saveUrl = undefined;\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 for (let key of Object.keys(this.state)) {\n if (data[key]) {\n this.state[key] = data[key];\n }\n }\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 await 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 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 let slotObj = {\n slotName: column.prop,\n type: 'tree'\n };\n if (column.attrs) {\n const attrs = JSON.parse(column.attrs);\n this.elCascaderProps = {\n ...this.elCascaderProps,\n ...attrs\n };\n }\n this.dynamicSlotsField[column.prop] = column; //收集继续动态改变值的字段信息,以便动态改变值时更新表单数据\n this.dynamicSlotsTable.push(slotObj); //收集需要的动态插槽字段信息\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_8__.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_9__.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_8__.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_9__.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_10__[\"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_11__.initDictTable)(this.http, params).then(data => {\n column.dicData.length = 0;\n if (params[\"parentValue\"]) {\n column.dicData = (0,_utils_tree__WEBPACK_IMPORTED_MODULE_9__.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 onDateChange(val, field) {\n if (typeof this.dynamicSlotsField[field].change === 'function') {\n this.dynamicSlotsField[field].change(val); //字段数据更新回调\n }\n },\n uploadChange(slotName, data) {\n console.info('回调', slotName, data);\n this.formData[slotName] = data; //修改表单数据,以便后续提交\n if (typeof this.dynamicSlotsField[slotName].change === 'function') {\n this.dynamicSlotsField[slotName].change(data); //字段数据更新回调\n }\n },\n handleEmits({\n m,\n v,\n d,\n js\n }, key) {\n if (typeof js === 'string') {\n eval(js);\n } else if (m && this[m]) {\n this[m](v);\n }\n if (d != false) {\n this.customUrl = undefined;\n }\n this.formData[key] = v;\n console.log('emits:', this.formData);\n }\n },\n mounted() {\n this.$nextTick(() => {\n (0,_store_dict__WEBPACK_IMPORTED_MODULE_12__.storeDict)().init(this.http);\n });\n }\n};\n\n//# sourceURL=webpack://olp-table/./src/mixins/VTMixin/OForm.js?");
12778
+ 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_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_find_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.iterator.find.js */ \"./node_modules/core-js/modules/es.iterator.find.js\");\n/* harmony import */ var core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_4__ = __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_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.iterator.map.js */ \"./node_modules/core-js/modules/es.iterator.map.js\");\n/* harmony import */ var core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _utils_columnProp__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/utils/columnProp */ \"./src/utils/columnProp.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 _utils_tree__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/utils/tree */ \"./src/utils/tree.js\");\n/* harmony import */ var _utils_formUtils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/utils/formUtils */ \"./src/utils/formUtils.js\");\n/* harmony import */ var _api_dist__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @/api/dist */ \"./src/api/dist.js\");\n/* harmony import */ var _store_dict__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @/store/dict */ \"./src/store/dict.js\");\n/* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @/utils/object */ \"./src/utils/object.js\");\n/* harmony import */ var _components_FileUpload_index_vue__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @/components/FileUpload/index.vue */ \"./src/components/FileUpload/index.vue\");\n/* harmony import */ var _components_Icon__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @/components/Icon */ \"./src/components/Icon/index.js\");\n/* harmony import */ var _components_ol_table_select_vue__WEBPACK_IMPORTED_MODULE_16__ = __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\n\n\n\nconst dict = (0,_store_dict__WEBPACK_IMPORTED_MODULE_12__.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_14__[\"default\"],\n IconSelect: _components_Icon__WEBPACK_IMPORTED_MODULE_15__.IconSelect,\n OlTableSelect: _components_ol_table_select_vue__WEBPACK_IMPORTED_MODULE_16__[\"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 elCascaderProps: {\n expandTrigger: 'hover',\n emitPath: false,\n checkStrictly: true\n }\n };\n },\n methods: {\n getCascaderOptions(slotName) {\n // console.info('getCascaderOptions',this.form.column)\n return this.form.column.find(item => item.prop === slotName).dicData;\n },\n getCascaderColumn(slotName) {\n // console.info('getCascaderOptions',this.form.column)\n return this.form.column.find(item => item.prop === slotName);\n },\n hideColumn(prop) {\n (0,_utils_object__WEBPACK_IMPORTED_MODULE_13__.setArrayObjectKeyValue)(this.form.column, 'display', false, prop);\n },\n showColumn(prop) {\n (0,_utils_object__WEBPACK_IMPORTED_MODULE_13__.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 /**\r\n * 封装主表单校验逻辑\r\n * @returns {Promise<*>}\r\n */\n async validateMainForm() {\n return new Promise(resolve => {\n const validator = this.state.type !== '0' ? this.$refs.formRef.getNativeForm().validate : (valid, done, msg) => this.$refs.formRef.validate(valid, done, msg);\n validator((valid, ...args) => {\n const [msg, done] = this.state.type === '0' ? [args[1], args[0]] : [args[0]];\n if (!valid) {\n const keys = Object.keys(msg);\n const domRef = this.state.type !== '0' ? this.$refs.formRef.getWidgetRef(keys[0])?.$el : this.$refs.formRef.getPropRef(keys[0])?.$el;\n domRef?.scrollIntoView({\n block: \"center\",\n behavior: \"smooth\"\n });\n (0,_utils_message__WEBPACK_IMPORTED_MODULE_7__.useMessage)().error(`主表单还有${keys.length}项未填写`);\n resolve(false);\n } else {\n resolve(true);\n }\n if (this.state.type === '0') done?.();\n });\n });\n },\n /**\r\n * 封装子表校验逻辑\r\n * @returns {Promise<FlatArray<Awaited<*>[], 1>[]>}\r\n */\n async validateSubTables() {\n // 1. 获取所有子表引用\n const subTablesRefs = this.$refs.subTable?.getTableRefs()?.getTabRefAll() || [];\n\n // 2. 并行执行全量校验(包含新增/修改/删除的数据)\n const validationPromises = subTablesRefs.map(subTable =>\n // 传入 true 校验所有数据(包括未修改的)\n subTable.$table.validate(true));\n\n // 3. 等待所有子表校验结果\n const results = await Promise.all(validationPromises);\n return results.flat().filter(Boolean);\n },\n /**\r\n * 错误定位工具函数\r\n * @param error\r\n */\n focusFirstError(error) {\n const targetEl = error.getElement?.();\n if (targetEl) {\n targetEl.scrollIntoView({\n block: \"center\",\n behavior: \"smooth\"\n });\n } else {\n console.warn(\"无法定位错误元素:\", error.field);\n }\n },\n async doMainSubSave() {\n try {\n // ====================== 1. 主表单校验 ======================\n const mainFormValid = await this.validateMainForm();\n if (!mainFormValid) return;\n\n // ====================== 2. 子表并行校验 ======================\n const subTableErrors = await this.validateSubTables();\n if (subTableErrors.length > 0) {\n this.focusFirstError(subTableErrors[0]);\n (0,_utils_message__WEBPACK_IMPORTED_MODULE_7__.useMessage)().error(`子表存在${subTableErrors.length}处错误,请修正后提交`);\n return;\n }\n\n // ====================== 3. 全部通过后保存 ======================\n this.save();\n } catch (error) {\n console.error(\"保存过程中发生异常:\", error);\n (0,_utils_message__WEBPACK_IMPORTED_MODULE_7__.useMessage)().error(\"系统异常,请稍后重试\");\n }\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_7__.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_7__.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.close();\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 close() {\n this.state.dialogVisible = false;\n this.$emit('emits', {});\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_8__.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_8__.postAes)(this.http, url, params).then(status => {\n this.saveOk(status);\n });\n } else {\n await (0,_utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_8__.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 getChineseMonth(monthIndex) {\n const monthNames = ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'];\n return monthNames[monthIndex] || `${monthIndex + 1}月`;\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 async initFormColumn(data) {\n for (let column of this.form.column) {\n if (data.disabled || column.disabled == 1) {\n column.disabled = true;\n }\n column.value = await (0,_utils_columnProp__WEBPACK_IMPORTED_MODULE_6__.getDefaultValue)(this.http, column);\n if (column.value != undefined) {\n this.formData[column.prop] = column.value;\n }\n console.log(column.value);\n this.setDepRoleDefault(column);\n if (column.selectDom === '11') {\n let slotObj = {\n slotName: column.prop,\n type: column.type,\n format: column.format,\n valueFormat: column.valueFormat,\n placeholder: '请选择 ' + column?.showName || 0\n };\n this.dynamicSlotsField[column.prop] = column; //收集继续动态改变值的字段信息,以便动态改变值时更新表单数据\n this.dynamicSlotsTable.push(slotObj); //收集需要的动态插槽字段信息\n } else 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_13__.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 async doInit(data) {\n this.beforeInit();\n this.show = !data.disabled;\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 } else {\n this.state.saveUrl = undefined;\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 for (let key of Object.keys(this.state)) {\n if (data[key]) {\n this.state[key] = data[key];\n }\n }\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 await 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 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 let slotObj = {\n slotName: column.prop,\n type: 'tree'\n };\n if (column.attrs) {\n const attrs = JSON.parse(column.attrs);\n this.elCascaderProps = {\n ...this.elCascaderProps,\n ...attrs\n };\n }\n this.dynamicSlotsField[column.prop] = column; //收集继续动态改变值的字段信息,以便动态改变值时更新表单数据\n this.dynamicSlotsTable.push(slotObj); //收集需要的动态插槽字段信息\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_8__.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_9__.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_8__.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_9__.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_10__[\"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_11__.initDictTable)(this.http, params).then(data => {\n column.dicData.length = 0;\n if (params[\"parentValue\"]) {\n column.dicData = (0,_utils_tree__WEBPACK_IMPORTED_MODULE_9__.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 onDateChange(val, field) {\n if (typeof this.dynamicSlotsField[field].change === 'function') {\n this.dynamicSlotsField[field].change(val); //字段数据更新回调\n }\n },\n uploadChange(slotName, data) {\n console.info('回调', slotName, data);\n this.formData[slotName] = data; //修改表单数据,以便后续提交\n if (typeof this.dynamicSlotsField[slotName].change === 'function') {\n this.dynamicSlotsField[slotName].change(data); //字段数据更新回调\n }\n },\n handleEmits({\n m,\n v,\n d,\n js\n }, key) {\n if (typeof js === 'string') {\n eval(js);\n } else if (m && this[m]) {\n this[m](v);\n }\n if (d != false) {\n this.customUrl = undefined;\n }\n this.formData[key] = v;\n console.log('emits:', this.formData);\n }\n },\n mounted() {\n this.$nextTick(() => {\n (0,_store_dict__WEBPACK_IMPORTED_MODULE_12__.storeDict)().init(this.http);\n });\n }\n};\n\n//# sourceURL=webpack://olp-table/./src/mixins/VTMixin/OForm.js?");
12779
12779
 
12780
12780
  /***/ }),
12781
12781