@zscreate/form-component 1.0.13 → 1.0.15
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.
|
@@ -2411,7 +2411,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */
|
|
|
2411
2411
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2412
2412
|
|
|
2413
2413
|
"use strict";
|
|
2414
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_web_dom_exception_stack_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/web.dom-exception.stack.js */ \"./node_modules/_core-js@3.27.1@core-js/modules/web.dom-exception.stack.js\");\n/* harmony import */ var core_js_modules_web_dom_exception_stack_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_exception_stack_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _form_modules_widgetList__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/form/modules/widgetList */ \"./src/form/modules/widgetList.vue\");\n/* harmony import */ var _form_modules_widgetForm__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/form/modules/widgetForm */ \"./src/form/modules/widgetForm.vue\");\n/* harmony import */ var _form_modules_widgetConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/form/modules/widgetConfig */ \"./src/form/modules/widgetConfig.vue\");\n/* harmony import */ var _components_CusDialog_CusDialog__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/components/CusDialog/CusDialog */ \"./src/components/CusDialog/CusDialog.vue\");\n/* harmony import */ var _form_modules_layout_layoutForPaper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/form/modules/layout/layoutForPaper */ \"./src/form/modules/layout/layoutForPaper.vue\");\n/* harmony import */ var _form_modules_formConfig__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/form/modules/formConfig */ \"./src/form/modules/formConfig.vue\");\n/* harmony import */ var _form_modules_pageFooterAndHeader__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/form/modules/pageFooterAndHeader */ \"./src/form/modules/pageFooterAndHeader.vue\");\n/* harmony import */ var _util_util__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../util/util */ \"./src/form/util/util.js\");\n/* harmony import */ var vue_codemirror__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! vue-codemirror */ \"./node_modules/_vue-codemirror@4.0.6@vue-codemirror/dist/vue-codemirror.js\");\n/* harmony import */ var vue_codemirror__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(vue_codemirror__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var clipboard__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! clipboard */ \"./node_modules/_clipboard@2.0.4@clipboard/dist/clipboard.js\");\n/* harmony import */ var clipboard__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(clipboard__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _api_onLineForm__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @/api/onLineForm */ \"./src/api/onLineForm.js\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! vue */ \"vue\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _util_Bus__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../util/Bus */ \"./src/form/util/Bus.js\");\n\n //控件库\n //设计form\n\n //JSON预览\n\n\n\n\n/* 加载代码 */\n\n\n\n__webpack_require__(/*! codemirror/mode/javascript/javascript.js */ \"./node_modules/_codemirror@5.46.0@codemirror/mode/javascript/javascript.js\");\n\n //导入bus\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"Container\",\n data() {\n return {\n clearable: true,\n //可以清空\n jsonVisible: false,\n previewVisible: false,\n //预览\n configTab: \"widget\",\n widgetFormSelect: null,\n formOnlineRelId: \"\",\n isView: false,\n //是否是预览模式\n canCopy: false,\n isPreviewDesktop: true,\n previewMobileUrl: vue__WEBPACK_IMPORTED_MODULE_12___default().prototype.getPreviewMobileUrl(),\n widgetForm: {\n list: [],\n config: {\n // canAgainSearch: \"\",\n labelPosition: \"right\",\n labelWidth: 100,\n formLayout: \"horizontal\",\n layout: \"vertical\",\n fontSize: 14,\n formPageWidth: '1123',\n size: \"small\",\n header: \"\",\n footer: \"\",\n headerHeight: 0,\n footerHeight: 0,\n multiplePages: true,\n paddingNum: 20,\n //边距\n align: \"align-between\",\n border: true,\n componentsNoBorder: false,\n borderColor: \"#333333\",\n mode: \"web\",\n //web --网页模式 paper --z\n formName: \"表单设计\",\n pageHeader: \"\",\n pageFooter: \"\",\n color: \"#000\",\n bgc: \"transparent\"\n }\n },\n refreshWidgetConfig: false,\n widgetModels: {},\n options: {\n height: \"850\",\n mode: {\n name: \"javascript\",\n json: true\n },\n lineNumbers: true\n },\n jsonTemplate: \"\",\n jsonCopyValue: \"\"\n };\n },\n components: {\n widgetList: _form_modules_widgetList__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n widgetForm: _form_modules_widgetForm__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n widgetConfig: _form_modules_widgetConfig__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n layoutForPaper: _form_modules_layout_layoutForPaper__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n formConfig: _form_modules_formConfig__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n CusDialog: _components_CusDialog_CusDialog__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n codemirror: vue_codemirror__WEBPACK_IMPORTED_MODULE_9__.codemirror,\n pageFooterAndHeader: _form_modules_pageFooterAndHeader__WEBPACK_IMPORTED_MODULE_7__[\"default\"]\n },\n watch: {\n widgetFormSelect() {\n // 切换选择时可能组件配置的状态无法更新,所以需要通过v-if重新加载一次挂载组件\n this.refreshWidgetConfig = true;\n this.$nextTick(() => {\n this.refreshWidgetConfig = false;\n });\n }\n },\n created() {\n this.BusOrgin();\n this.getDataByParams();\n },\n methods: {\n previewMobileOnload() {\n this.$nextTick(() => {\n this.$refs.previewIframe.contentWindow.postMessage({\n type: 'formConfig',\n data: this.widgetForm\n });\n });\n },\n btoa(str) {\n return window.btoa(encodeURIComponent(str));\n },\n async getDataByParams() {\n let record = this.$route.query;\n if (record) {\n this.formOnlineRelId = record.id;\n (0,_api_onLineForm__WEBPACK_IMPORTED_MODULE_11__.getFormTableColumnsData)({\n tableId: record.onlineTableName,\n id: record.id\n }).then(res => {\n if (!res.result) return;\n this.toolsData = res.result;\n /* 重组数据 */\n this.toolsData.map((item, index) => {\n item.options.showLabel = true;\n item.options.inline = true;\n });\n // console.log(this.toolsData);\n });\n\n this.formOnlineRelId = record.id;\n let isData = await (0,_api_onLineForm__WEBPACK_IMPORTED_MODULE_11__.getFormDesigerData)({\n formOnlineRelId: this.formOnlineRelId\n });\n if (isData) {\n // if (!isData.result.config.align) {\n // isData.result.config = this.widgetForm.config;\n // }\n this.setJSON(isData.result, record);\n }\n }\n },\n setJSON(json, record) {\n if (json && json.list.length > 0) {\n this.widgetForm = json;\n this.widgetForm.config.formName = record.formName;\n if (json.list && json.list.length > 0) {\n this.widgetFormSelect = json.list[0];\n }\n }\n },\n getJSON() {\n this.getWidgetFormList();\n return this.widgetForm;\n },\n changeHeaderOrFooter(type) {\n //编辑页眉页脚\n this.$refs.pageFooterAndHeader.visible = true;\n var content = type === \"header\" ? this.widgetForm.config.pageHeader : this.widgetForm.config.pageFooter;\n this.$refs.pageFooterAndHeader.init(type, content);\n },\n changeContent(content, type) {\n //修改页眉页脚内容\n let tempEle = document.createElement(\"div\");\n tempEle.innerHTML = content;\n document.getElementsByTagName(\"body\")[0].appendChild(tempEle);\n let tempHeight = tempEle.offsetHeight;\n if (type === \"header\") {\n this.widgetForm.config.pageHeader = content;\n this.widgetForm.config.headerHeight = tempHeight;\n } else {\n this.widgetForm.config.pageFooter = content;\n this.widgetForm.config.footerHeight = tempHeight;\n }\n tempEle.remove();\n },\n BusOrgin() {\n //自组件需要获取最外层 datalist\n _util_Bus__WEBPACK_IMPORTED_MODULE_13__[\"default\"].$on(\"getWidgetFormList\", () => {\n console.log(\"getdatalist\");\n this.getWidgetFormList();\n });\n },\n //清空设计\n handleClear() {\n this.$refs.widgetForm.widgetList = [[]];\n },\n //获取list\n getWidgetFormList() {\n this.widgetForm.list = [].concat(...this.$refs.widgetForm.widgetList);\n // console.log('this.widgetForm.list', this.widgetForm.list)\n // console.log('this.$refs.widgetForm.widgetList', this.$refs.widgetForm.widgetList)\n },\n\n handleGetData() {\n this.canCopy = false;\n this.$refs.layoutForPaper.getFormData().then(res => {\n this.jsonVisible = true;\n this.jsonTemplate = JSON.stringify(res, null, 2);\n });\n },\n //预览设计\n handlePreview() {\n this.isView = true;\n this.getWidgetFormList();\n // this.previewVisible = true;\n },\n\n //关闭预览\n handleColse() {\n this.isView = false;\n // 子表单 fix[4044] 关闭预览时,需要重新调用一下 vue-grid-layout 里面的onWindowResize, 重新渲染宽度\n const getChildren = childs => {\n for (let i = 0; i < childs.length; i++) {\n let child = childs[i];\n if (child.onWindowResize) child.onWindowResize();\n getChildren(child.$children);\n }\n };\n this.$nextTick(() => {\n getChildren(this.$children);\n });\n },\n onClosePreview() {\n // this.$refs.layoutForPaper.reset();\n // this.previewVisible = false;\n this.isView = false;\n },\n handleDataChange() {},\n //重置表单\n handleReset() {},\n //获取数据\n handleTest() {},\n //保存\n handleSave() {\n let params = {\n formDesigerData: this.getJSON(),\n formOnlineRelId: this.formOnlineRelId,\n id: \"\"\n };\n (0,_api_onLineForm__WEBPACK_IMPORTED_MODULE_11__.addOrEditData)(params).then(res => {\n if (res.code == 200) {\n this.$message.success(\"保存成功!\");\n } else {\n if (res.code == -1) {\n this.$message.error(res.message);\n } else {\n this.$message.error(\"保存失败!\");\n }\n }\n });\n },\n //生成json\n handleExportJson() {},\n //生成json\n handleGenerateJson() {\n this.jsonVisible = true;\n this.canCopy = true;\n this.widgetForm.list = [].concat(...this.$refs.widgetForm.widgetList);\n this.jsonTemplate = JSON.stringify(this.widgetForm, null, 2);\n this.$nextTick(() => {\n if (!this.jsonClipboard) {\n this.jsonClipboard = new (clipboard__WEBPACK_IMPORTED_MODULE_10___default())(\".json-btn\");\n this.jsonClipboard.on(\"success\", e => {\n this.$message.success(\"复制成功\");\n });\n }\n this.jsonCopyValue = JSON.stringify(this.widgetForm);\n });\n },\n //切换字段属性配置和表单字段配置\n handleConfigSelect(type) {\n // console.log(type)\n this.configTab = type;\n }\n }\n});\n\n//# sourceURL=webpack://form-component/./src/form/modules/Container.vue?./node_modules/_babel-loader@8.3.0@babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/_vue-loader@15.10.1@vue-loader/lib/index.js??vue-loader-options");
|
|
2414
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_web_dom_exception_stack_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/web.dom-exception.stack.js */ \"./node_modules/_core-js@3.27.1@core-js/modules/web.dom-exception.stack.js\");\n/* harmony import */ var core_js_modules_web_dom_exception_stack_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_exception_stack_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _form_modules_widgetList__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/form/modules/widgetList */ \"./src/form/modules/widgetList.vue\");\n/* harmony import */ var _form_modules_widgetForm__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/form/modules/widgetForm */ \"./src/form/modules/widgetForm.vue\");\n/* harmony import */ var _form_modules_widgetConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/form/modules/widgetConfig */ \"./src/form/modules/widgetConfig.vue\");\n/* harmony import */ var _components_CusDialog_CusDialog__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/components/CusDialog/CusDialog */ \"./src/components/CusDialog/CusDialog.vue\");\n/* harmony import */ var _form_modules_layout_layoutForPaper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/form/modules/layout/layoutForPaper */ \"./src/form/modules/layout/layoutForPaper.vue\");\n/* harmony import */ var _form_modules_formConfig__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/form/modules/formConfig */ \"./src/form/modules/formConfig.vue\");\n/* harmony import */ var _form_modules_pageFooterAndHeader__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/form/modules/pageFooterAndHeader */ \"./src/form/modules/pageFooterAndHeader.vue\");\n/* harmony import */ var _util_util__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../util/util */ \"./src/form/util/util.js\");\n/* harmony import */ var vue_codemirror__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! vue-codemirror */ \"./node_modules/_vue-codemirror@4.0.6@vue-codemirror/dist/vue-codemirror.js\");\n/* harmony import */ var vue_codemirror__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(vue_codemirror__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var clipboard__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! clipboard */ \"./node_modules/_clipboard@2.0.4@clipboard/dist/clipboard.js\");\n/* harmony import */ var clipboard__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(clipboard__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _api_onLineForm__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @/api/onLineForm */ \"./src/api/onLineForm.js\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! vue */ \"vue\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _util_Bus__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../util/Bus */ \"./src/form/util/Bus.js\");\n\n //控件库\n //设计form\n\n //JSON预览\n\n\n\n\n/* 加载代码 */\n\n\n\n__webpack_require__(/*! codemirror/mode/javascript/javascript.js */ \"./node_modules/_codemirror@5.46.0@codemirror/mode/javascript/javascript.js\");\n\n //导入bus\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"Container\",\n data() {\n return {\n clearable: true,\n //可以清空\n jsonVisible: false,\n previewVisible: false,\n //预览\n configTab: \"widget\",\n widgetFormSelect: null,\n formOnlineRelId: \"\",\n isView: false,\n //是否是预览模式\n canCopy: false,\n isPreviewDesktop: true,\n previewMobileUrl: vue__WEBPACK_IMPORTED_MODULE_12___default().prototype.getPreviewMobileUrl(),\n widgetForm: {\n list: [],\n config: {\n // canAgainSearch: \"\",\n labelPosition: \"right\",\n labelWidth: 100,\n formLayout: \"horizontal\",\n layout: \"vertical\",\n fontSize: 14,\n formPageWidth: '1123',\n size: \"small\",\n header: \"\",\n footer: \"\",\n headerHeight: 0,\n footerHeight: 0,\n multiplePages: true,\n paddingNum: 20,\n //边距\n align: \"align-between\",\n border: true,\n componentsNoBorder: false,\n borderColor: \"#333333\",\n mode: \"web\",\n //web --网页模式 paper --z\n formName: \"表单设计\",\n pageHeader: \"\",\n pageFooter: \"\",\n color: \"#000\",\n bgc: \"transparent\"\n }\n },\n refreshWidgetConfig: false,\n widgetModels: {},\n options: {\n height: \"850\",\n mode: {\n name: \"javascript\",\n json: true\n },\n lineNumbers: true\n },\n jsonTemplate: \"\",\n jsonCopyValue: \"\"\n };\n },\n components: {\n widgetList: _form_modules_widgetList__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n widgetForm: _form_modules_widgetForm__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n widgetConfig: _form_modules_widgetConfig__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n layoutForPaper: _form_modules_layout_layoutForPaper__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n formConfig: _form_modules_formConfig__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n CusDialog: _components_CusDialog_CusDialog__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n codemirror: vue_codemirror__WEBPACK_IMPORTED_MODULE_9__.codemirror,\n pageFooterAndHeader: _form_modules_pageFooterAndHeader__WEBPACK_IMPORTED_MODULE_7__[\"default\"]\n },\n watch: {\n widgetFormSelect() {\n // 切换选择时可能组件配置的状态无法更新,所以需要通过v-if重新加载一次挂载组件\n this.refreshWidgetConfig = true;\n this.$nextTick(() => {\n this.refreshWidgetConfig = false;\n });\n }\n },\n created() {\n this.BusOrgin();\n this.getDataByParams();\n },\n methods: {\n previewMobileOnload() {\n this.$nextTick(() => {\n this.$refs.previewIframe.contentWindow.postMessage({\n type: 'formConfig',\n data: {\n ...this.widgetForm,\n token: vue__WEBPACK_IMPORTED_MODULE_12___default().prototype.getToken()\n }\n });\n });\n },\n btoa(str) {\n return window.btoa(encodeURIComponent(str));\n },\n async getDataByParams() {\n let record = this.$route.query;\n if (record) {\n this.formOnlineRelId = record.id;\n (0,_api_onLineForm__WEBPACK_IMPORTED_MODULE_11__.getFormTableColumnsData)({\n tableId: record.onlineTableName,\n id: record.id\n }).then(res => {\n if (!res.result) return;\n this.toolsData = res.result;\n /* 重组数据 */\n this.toolsData.map((item, index) => {\n item.options.showLabel = true;\n item.options.inline = true;\n });\n // console.log(this.toolsData);\n });\n\n this.formOnlineRelId = record.id;\n let isData = await (0,_api_onLineForm__WEBPACK_IMPORTED_MODULE_11__.getFormDesigerData)({\n formOnlineRelId: this.formOnlineRelId\n });\n if (isData) {\n // if (!isData.result.config.align) {\n // isData.result.config = this.widgetForm.config;\n // }\n this.setJSON(isData.result, record);\n }\n }\n },\n setJSON(json, record) {\n if (json && json.list.length > 0) {\n this.widgetForm = json;\n this.widgetForm.config.formName = record.formName;\n if (json.list && json.list.length > 0) {\n this.widgetFormSelect = json.list[0];\n }\n }\n },\n getJSON() {\n this.getWidgetFormList();\n return this.widgetForm;\n },\n changeHeaderOrFooter(type) {\n //编辑页眉页脚\n this.$refs.pageFooterAndHeader.visible = true;\n var content = type === \"header\" ? this.widgetForm.config.pageHeader : this.widgetForm.config.pageFooter;\n this.$refs.pageFooterAndHeader.init(type, content);\n },\n changeContent(content, type) {\n //修改页眉页脚内容\n let tempEle = document.createElement(\"div\");\n tempEle.innerHTML = content;\n document.getElementsByTagName(\"body\")[0].appendChild(tempEle);\n let tempHeight = tempEle.offsetHeight;\n if (type === \"header\") {\n this.widgetForm.config.pageHeader = content;\n this.widgetForm.config.headerHeight = tempHeight;\n } else {\n this.widgetForm.config.pageFooter = content;\n this.widgetForm.config.footerHeight = tempHeight;\n }\n tempEle.remove();\n },\n BusOrgin() {\n //自组件需要获取最外层 datalist\n _util_Bus__WEBPACK_IMPORTED_MODULE_13__[\"default\"].$on(\"getWidgetFormList\", () => {\n console.log(\"getdatalist\");\n this.getWidgetFormList();\n });\n },\n //清空设计\n handleClear() {\n this.$refs.widgetForm.widgetList = [[]];\n },\n //获取list\n getWidgetFormList() {\n this.widgetForm.list = [].concat(...this.$refs.widgetForm.widgetList);\n // console.log('this.widgetForm.list', this.widgetForm.list)\n // console.log('this.$refs.widgetForm.widgetList', this.$refs.widgetForm.widgetList)\n },\n\n handleGetData() {\n this.canCopy = false;\n this.$refs.layoutForPaper.getFormData().then(res => {\n this.jsonVisible = true;\n this.jsonTemplate = JSON.stringify(res, null, 2);\n });\n },\n //预览设计\n handlePreview() {\n this.isView = true;\n this.getWidgetFormList();\n // this.previewVisible = true;\n },\n\n //关闭预览\n handleColse() {\n this.isView = false;\n // 子表单 fix[4044] 关闭预览时,需要重新调用一下 vue-grid-layout 里面的onWindowResize, 重新渲染宽度\n const getChildren = childs => {\n for (let i = 0; i < childs.length; i++) {\n let child = childs[i];\n if (child.onWindowResize) child.onWindowResize();\n getChildren(child.$children);\n }\n };\n this.$nextTick(() => {\n getChildren(this.$children);\n });\n },\n onClosePreview() {\n // this.$refs.layoutForPaper.reset();\n // this.previewVisible = false;\n this.isView = false;\n },\n handleDataChange() {},\n //重置表单\n handleReset() {},\n //获取数据\n handleTest() {},\n //保存\n handleSave() {\n let params = {\n formDesigerData: this.getJSON(),\n formOnlineRelId: this.formOnlineRelId,\n id: \"\"\n };\n (0,_api_onLineForm__WEBPACK_IMPORTED_MODULE_11__.addOrEditData)(params).then(res => {\n if (res.code == 200) {\n this.$message.success(\"保存成功!\");\n } else {\n if (res.code == -1) {\n this.$message.error(res.message);\n } else {\n this.$message.error(\"保存失败!\");\n }\n }\n });\n },\n //生成json\n handleExportJson() {},\n //生成json\n handleGenerateJson() {\n this.jsonVisible = true;\n this.canCopy = true;\n this.widgetForm.list = [].concat(...this.$refs.widgetForm.widgetList);\n this.jsonTemplate = JSON.stringify(this.widgetForm, null, 2);\n this.$nextTick(() => {\n if (!this.jsonClipboard) {\n this.jsonClipboard = new (clipboard__WEBPACK_IMPORTED_MODULE_10___default())(\".json-btn\");\n this.jsonClipboard.on(\"success\", e => {\n this.$message.success(\"复制成功\");\n });\n }\n this.jsonCopyValue = JSON.stringify(this.widgetForm);\n });\n },\n //切换字段属性配置和表单字段配置\n handleConfigSelect(type) {\n // console.log(type)\n this.configTab = type;\n }\n }\n});\n\n//# sourceURL=webpack://form-component/./src/form/modules/Container.vue?./node_modules/_babel-loader@8.3.0@babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/_vue-loader@15.10.1@vue-loader/lib/index.js??vue-loader-options");
|
|
2415
2415
|
|
|
2416
2416
|
/***/ }),
|
|
2417
2417
|
|
|
@@ -2565,7 +2565,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _mix
|
|
|
2565
2565
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2566
2566
|
|
|
2567
2567
|
"use strict";
|
|
2568
|
-
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@3.27.1@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_array_unshift_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.array.unshift.js */ \"./node_modules/_core-js@3.27.1@core-js/modules/es.array.unshift.js\");\n/* harmony import */ var core_js_modules_es_array_unshift_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_unshift_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _api_manage__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/api/manage */ \"./src/api/manage.js\");\n/* harmony import */ var _mixins_JeecgListMixin__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/mixins/JeecgListMixin */ \"./src/mixins/JeecgListMixin.js\");\n/* harmony import */ var _api_api__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/api/api */ \"./src/api/api.js\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'selectUserModal',\n props: ['modalWidth', 'multi', 'users', 'role', 'defaultDepartId'],\n mixins: [{\n ..._mixins_JeecgListMixin__WEBPACK_IMPORTED_MODULE_3__.JeecgListMixin,\n created: undefined\n }],\n // 取消minxin created\n data() {\n return {\n queryParam: {\n depId: undefined,\n roleId: undefined\n },\n showuser: false,\n userlist: [],\n visible: false,\n confirmLoading: false,\n treeData: [],\n autoExpandParent: true,\n expandedKeys: [],\n dataList: [],\n checkedKeys: [],\n departTreeData: [],\n checkedRows: [],\n searchValue: \"\",\n selectionRowsData: [],\n selectedRowKeys: [],\n rowSelection: {\n selectedRowKeys: this.selectedRowKeys,\n onChange: this.onSelectChange,\n type: this.multi ? \"checkbox\" : \"radio\",\n onSelect: this.onSelectOption\n },\n columns: [{\n title: \"用户名\",\n dataIndex: \"username\"\n }, {\n title: \"真实姓名\",\n dataIndex: \"realname\"\n }, {\n title: \"单位\",\n dataIndex: \"departName\"\n }, {\n title: \"职务\",\n dataIndex: \"zw\"\n }, {\n title: \"电话\",\n dataIndex: \"phone\"\n }],\n url: {\n syncUser: '/process/extActProcess/doSyncUser',\n list: '/workflow/queryCandidatePersonal',\n delete: '/sys/user/delete',\n deleteBatch: '/sys/user/deleteBatch',\n exportXlsUrl: '/sys/user/exportXls',\n importExcelUrl: 'sys/user/importExcel'\n }\n };\n },\n created() {\n this.queryParam.depId = this.defaultDepartId;\n this.loadData();\n this.loadDepartTree();\n this.setDefaultUser();\n },\n mounted() {\n // this.getTreedata()\n if (this.defaultDepartId) {\n this.treechange(this.defaultDepartId);\n }\n },\n computed: {},\n watch: {\n users(v) {\n if (v.length === 0) {\n this.setDefaultUser();\n }\n },\n role(val) {\n this.role = val;\n }\n },\n methods: {\n loadData(arg) {\n if (!this.url.list) {\n this.$message.error(\"请设置url.list属性!\");\n return;\n }\n //加载数据 若传入参数1则加载第一页的内容\n if (arg === 1) {\n this.ipagination.current = 1;\n }\n if (this.role) {\n this.queryParam.roleId = this.role;\n }\n let params = this.getQueryParams(); //查询条件\n this.loading = true;\n (0,_api_manage__WEBPACK_IMPORTED_MODULE_2__.getAction)(this.url.list, params).then(res => {\n if (res.success) {\n this.dataSource = res.result.records;\n this.ipagination.total = res.result.total;\n }\n if (res.code === 510) {\n this.$message.warning(res.message);\n } else if (res.code === 500) {\n if (res.message.length < 100) {\n this.$message.error(res.message);\n }\n }\n this.loading = false;\n });\n },\n setZindex() {\n return () => document.getElementById(\"speca\");\n },\n //获取部门\n getTreedata() {\n this.treeData = [];\n (0,_api_manage__WEBPACK_IMPORTED_MODULE_2__.getAction)(\"sysdepart/sysDepart/queryTreeList\").then(res => {\n if (res.success) {\n for (let i = 0; i < res.result.length; i++) {\n let temp = res.result[i];\n this.treeData.push(temp);\n }\n let ob = {\n value: \"\",\n title: \"请选择\"\n };\n this.treeData.unshift(ob);\n }\n });\n },\n treechange(e) {\n this.queryParam.roleId = undefined;\n let params = {\n depId: e\n };\n (0,_api_manage__WEBPACK_IMPORTED_MODULE_2__.getAction)(\"/sys/role/listWorkFlowDepRole\", params).then(res => {\n if (res.success) {\n this.userlist = res.result;\n this.showuser = true;\n }\n });\n },\n setDefaultUser() {\n var selectedRowKeys = [];\n if (Array.isArray(this.users) && this.users.length > 0) {\n selectedRowKeys = this.users.map(item => {\n return item.id;\n });\n this.selectionRowsData = this.users.map(item => {\n return {\n id: item.id,\n realname: item.realname || item.username\n };\n });\n } else {\n this.selectionRowsData = [];\n // this.selectedRowKeys = []\n this.rowSelection = {\n selectedRowKeys: [],\n onChange: this.onSelectChange,\n type: this.multi ? \"checkbox\" : \"radio\",\n onSelect: this.onSelectOption\n };\n return false;\n }\n // console.log(selectedRowKeys)\n this.rowSelection = {\n onChange: this.onSelectChange,\n type: this.multi ? \"checkbox\" : \"radio\",\n onSelect: this.onSelectOption,\n selectedRowKeys: selectedRowKeys,\n getCheckboxProps: record => {\n return {\n props: {\n defaultChecked: selectedRowKeys.includes(record.id)\n }\n };\n }\n };\n },\n loadDepartTree() {\n const that = this;\n (0,_api_api__WEBPACK_IMPORTED_MODULE_4__.queryDepartTreeList)().then(res => {\n if (res.success) {\n that.departTreeData = [];\n for (let i = 0; i < res.result.length; i++) {\n let temp = res.result[i];\n that.departTreeData.push(temp);\n }\n that.loading = false;\n }\n });\n },\n show(select, item) {\n console.log(select);\n //this.loadDepartTree();\n this.checkedRows = [];\n this.rowSelection.selectedRowKeys = select;\n this.selectionRowsData = item;\n this.getTreedata();\n this.visible = true;\n },\n onCheck(checkedKeys, info) {\n if (!this.multi) {\n let arr = checkedKeys.checked.filter(item => {\n return this.checkedKeys.indexOf(item) < 0;\n });\n this.checkedKeys = [...arr];\n this.checkedRows = [info.node.dataRef];\n } else {\n this.checkedKeys = checkedKeys.checked;\n this.checkedRows.push(info.node.dataRef);\n }\n //this.$emit(\"input\",this.checkedKeys.join(\",\"))\n //console.log(this.checkedKeys.join(\",\"))\n },\n\n handleSubmit() {\n this.selectedRowKeys = this.rowSelection.selectedRowKeys;\n if (!this.selectedRowKeys || this.selectedRowKeys.length == 0) {\n this.$emit(\"ok\", \"\");\n } else {\n if (!this.multi) {\n this.$emit(\"ok\", this.selectionRows, this.selectedRowKeys.join(\",\"));\n } else {\n this.$emit(\"ok\", this.selectionRowsData, this.selectedRowKeys.join(\",\"));\n }\n }\n this.handleClear();\n },\n //onSelectChange\n onSelectChange(selectedRowKeys, selectionRows) {\n this.rowSelection.selectedRowKeys = Array.from(new Set(selectedRowKeys));\n // this.selectedRowKeys = [...selectedRowKeys];\n this.selectionRows = [...selectionRows];\n },\n //选中或者取消某一项时\n onSelectOption(record, selected, selectedRows, nativeEvent) {\n if (selected) {\n // console.log(this.selectionRowsData.length);\n // console.log(record);\n this.selectionRowsData.push(record);\n // console.log(this.selectionRowsData);\n } else {\n this.selectionRowsData = this.selectionRowsData.filter(item => {\n return item.id != record.id;\n });\n }\n },\n handleCancel() {\n this.handleClear();\n },\n handleClear() {\n this.visible = false;\n this.checkedKeys = [];\n },\n getParentKey(currKey, treeData) {\n let parentKey;\n for (let i = 0; i < treeData.length; i++) {\n const node = treeData[i];\n if (node.children) {\n if (node.children.some(item => item.key === currKey)) {\n parentKey = node.key;\n } else if (this.getParentKey(currKey, node.children)) {\n parentKey = this.getParentKey(currKey, node.children);\n }\n }\n }\n return parentKey;\n },\n onSearch(value) {\n const expandedKeys = this.dataList.map(item => {\n if (item.title.indexOf(value) > -1) {\n return this.getParentKey(item.key, this.treeData);\n }\n return null;\n }).filter((item, i, self) => item && self.indexOf(item) === i);\n Object.assign(this, {\n expandedKeys,\n searchValue: value,\n autoExpandParent: true\n });\n },\n initDictConfig() {\n this.loadDepartTree();\n }\n }\n});\n\n//# sourceURL=webpack://form-component/./src/form/modules/common/Modals/selectUserModal.vue?./node_modules/_babel-loader@8.3.0@babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/_vue-loader@15.10.1@vue-loader/lib/index.js??vue-loader-options");
|
|
2568
|
+
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@3.27.1@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 _api_manage__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/api/manage */ \"./src/api/manage.js\");\n/* harmony import */ var _mixins_JeecgListMixin__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/mixins/JeecgListMixin */ \"./src/mixins/JeecgListMixin.js\");\n/* harmony import */ var _api_api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/api/api */ \"./src/api/api.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'selectUserModal',\n props: ['modalWidth', 'multi', 'users', 'role', 'defaultDepartId'],\n mixins: [{\n ..._mixins_JeecgListMixin__WEBPACK_IMPORTED_MODULE_2__.JeecgListMixin,\n created: undefined\n }],\n // 取消minxin created\n data() {\n return {\n queryParam: {\n depId: undefined,\n roleId: undefined\n },\n showuser: false,\n userlist: [],\n visible: false,\n confirmLoading: false,\n treeData: [],\n autoExpandParent: true,\n expandedKeys: [],\n dataList: [],\n checkedKeys: [],\n departTreeData: [],\n checkedRows: [],\n searchValue: \"\",\n selectionRowsData: [],\n selectedRowKeys: [],\n rowSelection: {\n selectedRowKeys: this.selectedRowKeys,\n onChange: this.onSelectChange,\n type: this.multi ? \"checkbox\" : \"radio\",\n onSelect: this.onSelectOption\n },\n columns: [{\n title: \"用户名\",\n dataIndex: \"username\"\n }, {\n title: \"真实姓名\",\n dataIndex: \"realname\"\n }, {\n title: \"单位\",\n dataIndex: \"departName\"\n }, {\n title: \"职务\",\n dataIndex: \"zw\"\n }, {\n title: \"电话\",\n dataIndex: \"phone\"\n }],\n url: {\n syncUser: '/process/extActProcess/doSyncUser',\n list: '/workflow/queryCandidatePersonal',\n delete: '/sys/user/delete',\n deleteBatch: '/sys/user/deleteBatch',\n exportXlsUrl: '/sys/user/exportXls',\n importExcelUrl: 'sys/user/importExcel'\n }\n };\n },\n created() {\n this.queryParam.depId = this.defaultDepartId || undefined;\n this.loadData();\n this.loadDepartTree();\n this.setDefaultUser();\n },\n mounted() {\n // this.getTreedata()\n if (this.defaultDepartId) {\n this.treechange(this.defaultDepartId);\n }\n },\n computed: {},\n watch: {\n users(v) {\n if (v.length === 0) {\n this.setDefaultUser();\n }\n },\n role(val) {\n this.role = val;\n }\n },\n methods: {\n loadData(arg) {\n if (!this.url.list) {\n this.$message.error(\"请设置url.list属性!\");\n return;\n }\n //加载数据 若传入参数1则加载第一页的内容\n if (arg === 1) {\n this.ipagination.current = 1;\n }\n if (this.role) {\n this.queryParam.roleId = this.role;\n }\n let params = this.getQueryParams(); //查询条件\n this.loading = true;\n (0,_api_manage__WEBPACK_IMPORTED_MODULE_1__.getAction)(this.url.list, params).then(res => {\n if (res.success) {\n this.dataSource = res.result.records;\n this.ipagination.total = res.result.total;\n }\n if (res.code === 510) {\n this.$message.warning(res.message);\n } else if (res.code === 500) {\n if (res.message.length < 100) {\n this.$message.error(res.message);\n }\n }\n this.loading = false;\n });\n },\n setZindex() {\n return () => document.getElementById(\"speca\");\n },\n //获取部门\n getTreedata() {\n this.treeData = [];\n (0,_api_manage__WEBPACK_IMPORTED_MODULE_1__.getAction)(\"sysdepart/sysDepart/queryTreeList\").then(res => {\n if (res.success) {\n for (let i = 0; i < res.result.length; i++) {\n let temp = res.result[i];\n this.treeData.push(temp);\n }\n // let ob = { value: \"\", title: \"请选择\" };\n // this.treeData.unshift(ob);\n }\n });\n },\n\n treechange(e) {\n this.queryParam.roleId = undefined;\n let params = {\n depId: e\n };\n (0,_api_manage__WEBPACK_IMPORTED_MODULE_1__.getAction)(\"/sys/role/listWorkFlowDepRole\", params).then(res => {\n if (res.success) {\n this.userlist = res.result;\n this.showuser = true;\n }\n });\n },\n setDefaultUser() {\n var selectedRowKeys = [];\n if (Array.isArray(this.users) && this.users.length > 0) {\n selectedRowKeys = this.users.map(item => {\n return item.id;\n });\n this.selectionRowsData = this.users.map(item => {\n return {\n id: item.id,\n realname: item.realname || item.username\n };\n });\n } else {\n this.selectionRowsData = [];\n // this.selectedRowKeys = []\n this.rowSelection = {\n selectedRowKeys: [],\n onChange: this.onSelectChange,\n type: this.multi ? \"checkbox\" : \"radio\",\n onSelect: this.onSelectOption\n };\n return false;\n }\n // console.log(selectedRowKeys)\n this.rowSelection = {\n onChange: this.onSelectChange,\n type: this.multi ? \"checkbox\" : \"radio\",\n onSelect: this.onSelectOption,\n selectedRowKeys: selectedRowKeys,\n getCheckboxProps: record => {\n return {\n props: {\n defaultChecked: selectedRowKeys.includes(record.id)\n }\n };\n }\n };\n },\n loadDepartTree() {\n const that = this;\n (0,_api_api__WEBPACK_IMPORTED_MODULE_3__.queryDepartTreeList)().then(res => {\n if (res.success) {\n that.departTreeData = [];\n for (let i = 0; i < res.result.length; i++) {\n let temp = res.result[i];\n that.departTreeData.push(temp);\n }\n that.loading = false;\n }\n });\n },\n show(select, item) {\n console.log(select);\n //this.loadDepartTree();\n this.checkedRows = [];\n this.rowSelection.selectedRowKeys = select;\n this.selectionRowsData = this.selectionRows = item;\n this.getTreedata();\n this.loadData();\n this.setDefaultUser();\n this.visible = true;\n },\n onCheck(checkedKeys, info) {\n if (!this.multi) {\n let arr = checkedKeys.checked.filter(item => {\n return this.checkedKeys.indexOf(item) < 0;\n });\n this.checkedKeys = [...arr];\n this.checkedRows = [info.node.dataRef];\n } else {\n this.checkedKeys = checkedKeys.checked;\n this.checkedRows.push(info.node.dataRef);\n }\n //this.$emit(\"input\",this.checkedKeys.join(\",\"))\n //console.log(this.checkedKeys.join(\",\"))\n },\n\n handleSubmit() {\n this.selectedRowKeys = this.rowSelection.selectedRowKeys;\n if (!this.selectedRowKeys || this.selectedRowKeys.length == 0) {\n this.$emit(\"ok\", \"\");\n } else {\n if (!this.multi) {\n this.$emit(\"ok\", this.selectionRows, this.selectedRowKeys.join(\",\"));\n } else {\n this.$emit(\"ok\", this.selectionRowsData, this.selectedRowKeys.join(\",\"));\n }\n }\n this.handleClear();\n },\n //onSelectChange\n onSelectChange(selectedRowKeys, selectionRows) {\n this.rowSelection.selectedRowKeys = Array.from(new Set(selectedRowKeys));\n this.selectionRowsData = this.selectionRows = [...selectionRows];\n },\n // //选中或者取消某一项时\n // onSelectOption(record, selected, selectedRows, nativeEvent) {\n // if (selected) {\n // this.selectionRowsData.push(record);\n // } else {\n // this.selectionRowsData = this.selectionRowsData.filter((item) => {\n // return item.id != record.id;\n // });\n // }\n // },\n handleCancel() {\n this.handleClear();\n },\n handleClear() {\n this.visible = false;\n this.checkedKeys = [];\n },\n getParentKey(currKey, treeData) {\n let parentKey;\n for (let i = 0; i < treeData.length; i++) {\n const node = treeData[i];\n if (node.children) {\n if (node.children.some(item => item.key === currKey)) {\n parentKey = node.key;\n } else if (this.getParentKey(currKey, node.children)) {\n parentKey = this.getParentKey(currKey, node.children);\n }\n }\n }\n return parentKey;\n },\n onSearch(value) {\n const expandedKeys = this.dataList.map(item => {\n if (item.title.indexOf(value) > -1) {\n return this.getParentKey(item.key, this.treeData);\n }\n return null;\n }).filter((item, i, self) => item && self.indexOf(item) === i);\n Object.assign(this, {\n expandedKeys,\n searchValue: value,\n autoExpandParent: true\n });\n },\n initDictConfig() {\n this.loadDepartTree();\n }\n }\n});\n\n//# sourceURL=webpack://form-component/./src/form/modules/common/Modals/selectUserModal.vue?./node_modules/_babel-loader@8.3.0@babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/_vue-loader@15.10.1@vue-loader/lib/index.js??vue-loader-options");
|
|
2569
2569
|
|
|
2570
2570
|
/***/ }),
|
|
2571
2571
|
|
|
@@ -3577,7 +3577,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
|
3577
3577
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
3578
3578
|
|
|
3579
3579
|
"use strict";
|
|
3580
|
-
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@3.27.1@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 _mixins_widgetMixins__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../mixins/widgetMixins */ \"./src/form/mixins/widgetMixins.js\");\n/* harmony import */ var _common_Modals_selectUserModal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/Modals/selectUserModal */ \"./src/form/modules/common/Modals/selectUserModal.vue\");\n/* harmony import */ var _util_util_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../util/util.js */ \"./src/form/util/util.js\");\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\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"UserSelector\",\n mixins: [_mixins_widgetMixins__WEBPACK_IMPORTED_MODULE_1__[\"default\"]],\n props: {\n widget: {\n type: Object,\n default: () => {\n return {};\n }\n }\n },\n data() {\n return {\n dataModel: \"\",\n userNames: \"\",\n users: [],\n defaultDepartId: \"\",\n isClickByUser: false //是否是用户点击改变值\n };\n },\n\n components: {\n selectUserModal: _common_Modals_selectUserModal__WEBPACK_IMPORTED_MODULE_2__[\"default\"]\n },\n created() {\n // console.log(this.widget,'2222222222222222',this.dataModel)\n // 组件与当前申请人部门关联\n if (this.widget.options.departRelation) {\n this.defaultDepartId = this.getUserInfo.departId;\n }\n this.getuserNames(this.dataModel); //回显 姓名\n },\n\n computed: {\n getUserInfo() {\n return vue__WEBPACK_IMPORTED_MODULE_4___default().prototype.getUserInfo();\n }\n },\n methods: {\n openModal() {\n if (this.widget.options.disabled) return false;\n this.isClickByUser = true;\n let select = [];\n if (this.dataModel.length > 0) {\n this.dataModel.forEach(item => {\n select.push(item.id);\n });\n }\n this.$refs.selectUserModal.show(select, (0,_util_util_js__WEBPACK_IMPORTED_MODULE_3__.cloneObj)(this.dataModel));\n },\n initComp(userNames) {\n this.userNames = userNames;\n },\n handleOK(rows, idstr) {\n if (!rows) {\n this.userNames = \"\";\n this.users = [];\n return false;\n } else {\n this.getuserNames(rows);\n }\n this.users = rows.map(item => {\n return {\n id: item[\"id\"],\n departId: item[\"departId\"],\n username: item[\"username\"],\n departName: item[\"departName\"],\n realname: item[\"realname\"],\n zw: item[\"zw\"],\n phone: item[\"phone\"]\n };\n });\n },\n getuserNames(rows) {\n if (!rows) {\n this.userNames = \"\";\n this.users = [];\n } else {\n let temp = \"\";\n if (this.widget.options.showfield) {\n for (let item of rows) {\n temp += `,${item.realname || item.username || \"\"} (${item.departName ? item.departName : \"\"}${item.zw ? \",\" + item.zw : \"\"}${item.phone ? \",\" + item.phone : \"\"})`;\n }\n } else {\n for (let item of rows) {\n temp += `,${item.realname || item.username}`;\n }\n }\n this.userNames = temp.substring(1);\n }\n },\n handleEmpty() {\n this.handleOK(\"\");\n }\n },\n watch: {\n users(val) {\n this.dataModel = val;\n },\n dataModel(val) {\n this.pulishMsg(val, this.isClickByUser);\n if (Array.isArray(val) && val.length == 0) {\n this.userNames = \"\";\n } else {\n this.getuserNames(val); //删除子表单 值不更新\n }\n\n this.$emit(\"updateModels\", val);\n }\n }\n});\n\n//# sourceURL=webpack://form-component/./src/form/modules/components/UserSelector/component.vue?./node_modules/_babel-loader@8.3.0@babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/_vue-loader@15.10.1@vue-loader/lib/index.js??vue-loader-options");
|
|
3580
|
+
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@3.27.1@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 _mixins_widgetMixins__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../mixins/widgetMixins */ \"./src/form/mixins/widgetMixins.js\");\n/* harmony import */ var _common_Modals_selectUserModal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/Modals/selectUserModal */ \"./src/form/modules/common/Modals/selectUserModal.vue\");\n/* harmony import */ var _util_util_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../util/util.js */ \"./src/form/util/util.js\");\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\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"UserSelector\",\n mixins: [_mixins_widgetMixins__WEBPACK_IMPORTED_MODULE_1__[\"default\"]],\n props: {\n widget: {\n type: Object,\n default: () => {\n return {};\n }\n }\n },\n data() {\n return {\n dataModel: \"\",\n userNames: \"\",\n users: [],\n defaultDepartId: \"\",\n isClickByUser: false //是否是用户点击改变值\n };\n },\n\n components: {\n selectUserModal: _common_Modals_selectUserModal__WEBPACK_IMPORTED_MODULE_2__[\"default\"]\n },\n created() {\n // console.log(this.widget,'2222222222222222',this.dataModel)\n // 组件与当前申请人部门关联\n if (this.widget.options.departRelation) {\n this.defaultDepartId = this.getUserInfo.departId;\n }\n this.getuserNames(this.dataModel); //回显 姓名\n },\n\n computed: {\n getUserInfo() {\n return vue__WEBPACK_IMPORTED_MODULE_4___default().prototype.getUserInfo();\n }\n },\n methods: {\n openModal() {\n let options = this.widget.options;\n if (this.widget.options.disabled && !this.isdisabled) return false;\n let mutexList = [];\n this.isClickByUser = true;\n let select = [];\n if (this.dataModel.length > 0) {\n this.dataModel.forEach(item => {\n select.push(item.id);\n });\n }\n this.$refs.selectUserModal.show(select, (0,_util_util_js__WEBPACK_IMPORTED_MODULE_3__.cloneObj)(this.dataModel));\n },\n initComp(userNames) {\n this.userNames = userNames;\n },\n handleOK(rows, idstr) {\n if (!rows) {\n this.userNames = \"\";\n this.users = [];\n return false;\n } else {\n this.getuserNames(rows);\n }\n this.users = rows.map(item => {\n return {\n id: item[\"id\"],\n departId: item[\"departId\"],\n username: item[\"username\"],\n departName: item[\"departName\"],\n realname: item[\"realname\"],\n zw: item[\"zw\"],\n phone: item[\"phone\"]\n };\n });\n },\n getuserNames(rows) {\n if (!rows) {\n this.userNames = \"\";\n this.users = [];\n } else {\n let temp = \"\";\n if (this.widget.options.showfield) {\n for (let item of rows) {\n temp += `,${item.realname || item.username || \"\"} (${item.departName ? item.departName : \"\"}${item.zw ? \",\" + item.zw : \"\"}${item.phone ? \",\" + item.phone : \"\"})`;\n }\n } else {\n for (let item of rows) {\n temp += `,${item.realname || item.username}`;\n }\n }\n this.userNames = temp.substring(1);\n }\n },\n handleEmpty() {\n this.handleOK(\"\");\n }\n },\n watch: {\n users(val) {\n this.dataModel = val;\n },\n dataModel(val) {\n this.pulishMsg(val, this.isClickByUser);\n if (Array.isArray(val) && val.length == 0) {\n this.userNames = \"\";\n } else {\n this.getuserNames(val); //删除子表单 值不更新\n }\n\n this.$emit(\"updateModels\", val);\n }\n }\n});\n\n//# sourceURL=webpack://form-component/./src/form/modules/components/UserSelector/component.vue?./node_modules/_babel-loader@8.3.0@babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/_vue-loader@15.10.1@vue-loader/lib/index.js??vue-loader-options");
|
|
3581
3581
|
|
|
3582
3582
|
/***/ }),
|
|
3583
3583
|
|
|
@@ -12325,7 +12325,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_vue__;
|
|
|
12325
12325
|
/***/ (function(module) {
|
|
12326
12326
|
|
|
12327
12327
|
"use strict";
|
|
12328
|
-
eval("module.exports = JSON.parse('{\"name\":\"@zscreate/form-component\",\"version\":\"1.0.
|
|
12328
|
+
eval("module.exports = JSON.parse('{\"name\":\"@zscreate/form-component\",\"version\":\"1.0.15\",\"private\":false,\"description\":\"\",\"main\":\"dist/form-component.umd.js\",\"unpkg\":\"dist/form-component.umd.js\",\"scripts\":{\"build\":\"vue-cli-service build --target lib --name form-component src/main.js --formats umd --report\",\"build:watch\":\"vue-cli-service build --target lib --name form-component src/main.js --formats umd --watch\"},\"exports\":{\".\":{\"import\":{\"default\":\"./dist/form-component.umd.js\"},\"require\":\"./dist/form-component.common.js\"}},\"publishConfig\":{\"access\":\"public\",\"registry\":\"https://registry.npmjs.org/\"},\"files\":[\"/dist/*\"],\"exclude\":[\"node_modules\"],\"keywords\":[],\"author\":\"\",\"license\":\"ISC\",\"dependencies\":{\"core-js\":\"^3.8.3\",\"vue\":\"^2.6.14\",\"pubsub-js\":\"^1.9.3\",\"vue-draggable-resizable\":\"2.2.0\",\"vue-draggable-resizable-gorkys\":\"2.0.0\",\"vue-grid-layout\":\"^2.3.12\",\"vue-signature-pad\":\"^2.0.2\",\"vuedraggable\":\"^2.24.3\",\"moment\":\"^2.29.1\"},\"devDependencies\":{\"clipboard\":\"2.0.4\",\"codemirror\":\"^5.46.0\",\"vue-codemirror\":\"^4.0.6\",\"@vue/cli-plugin-babel\":\"~5.0.0\",\"@vue/cli-service\":\"~5.0.0\",\"vue-template-compiler\":\"^2.6.14\",\"less\":\"^3.0.4\",\"less-loader\":\"^5.0.0\",\"node-sass\":\"^4.11.0\",\"sass-loader\":\"^7.0.1\"}}');\n\n//# sourceURL=webpack://form-component/./package.json?");
|
|
12329
12329
|
|
|
12330
12330
|
/***/ })
|
|
12331
12331
|
|