Browse Source

提交代码

Lijy 1 năm trước cách đây
mục cha
commit
9a930840ca

+ 4 - 1
fhKeeper/formulahousekeeper/plugIn/form-design-master/src/generate/GenerateForm.vue

@@ -125,7 +125,10 @@ export default defineComponent({
     }
 
     const updateWidgetForm = (list: any[]) => {
-      state.widgetForm.list = list
+      // console.log(list, '<=====')
+      const listIndex = state.widgetForm.list.findIndex((item: any) => item.type === 'grid')
+      state.widgetForm.list[listIndex].columns = list
+      // console.log(state.widgetForm.list);
       state.model = {...state.model, contactsId: ''}
     }
 

+ 12 - 4
fhKeeper/formulahousekeeper/plugIn/form-design-master/src/generate/GenerateFormItem.vue

@@ -18,6 +18,8 @@
         :element="colItem"
         :config="config"
         :disabled="disabled"
+        :widgetFormData="element.columns"
+        @updateWidgetForm="updateWidgetForm"
       />
     </div>
   </div>
@@ -389,10 +391,11 @@ const emits = defineEmits(['updateWidgetForm'])
 const specializedHandleSelect = (val: any, element: any) => {
   const field = element.model
   if(field == 'customerId') {
+    // console.log(props, '<===== props')
     let list = JSON.parse(JSON.stringify(props.widgetFormData))
     for(var i in list) {
-      if(list[i].model == 'contactsId') {
-        let item = list[i]
+      if(list[i].list[0].model == 'contactsId') {
+        let item = list[i].list[0]
         const token: any = sessionStorage.getItem('token')
         // fetch(item.options.remoteFunc, {
         fetch(`${item.options.remoteFunc}?customerId=${val}`, {
@@ -411,15 +414,20 @@ const specializedHandleSelect = (val: any, element: any) => {
                 children: data[item.options.props.children],
               }))
             }
-            list[i].options = {...list[i].options, disabled: false, defaultValue: ''}
+            list[i].list[0].options = {...list[i].list[0].options, disabled: false, defaultValue: ''}
           })
       }
     }
     setTimeout(() => {
-      emits('updateWidgetForm', list)
+      console.log('开始执行')
+      updateWidgetForm(list)
     }, 100)
   }
 }
+
+const updateWidgetForm = (list: any) => {
+  emits('updateWidgetForm', list)
+}
 </script>
 <style scoped>
 :deep(.el-upload--picture-card) {

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
fhKeeper/formulahousekeeper/plugIn/form-design-master/update/dist/index.css


+ 16 - 9
fhKeeper/formulahousekeeper/plugIn/form-design-master/update/dist/index.es.js

@@ -27558,7 +27558,7 @@ var _export_sfc = (sfc, props) => {
   }
   return target;
 };
-const _withScopeId = (n) => (pushScopeId("data-v-6f7c6df8"), n = n(), popScopeId(), n);
+const _withScopeId = (n) => (pushScopeId("data-v-fd931432"), n = n(), popScopeId(), n);
 const _hoisted_1$6 = { key: 12 };
 const _hoisted_2$5 = {
   key: 1,
@@ -27616,8 +27616,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
       if (field == "customerId") {
         let list = JSON.parse(JSON.stringify(props.widgetFormData));
         for (var i in list) {
-          if (list[i].model == "contactsId") {
-            let item = list[i];
+          if (list[i].list[0].model == "contactsId") {
+            let item = list[i].list[0];
             const token = sessionStorage.getItem("token");
             fetch(`${item.options.remoteFunc}?customerId=${val}`, {
               headers: {
@@ -27633,15 +27633,19 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
                   children: data22[item.options.props.children]
                 }));
               }
-              list[i].options = __spreadProps(__spreadValues({}, list[i].options), { disabled: false, defaultValue: "" });
+              list[i].list[0].options = __spreadProps(__spreadValues({}, list[i].list[0].options), { disabled: false, defaultValue: "" });
             });
           }
         }
         setTimeout(() => {
-          emits("updateWidgetForm", list);
+          console.log("\u5F00\u59CB\u6267\u884C");
+          updateWidgetForm(list);
         }, 100);
       }
     };
+    const updateWidgetForm = (list) => {
+      emits("updateWidgetForm", list);
+    };
     return (_ctx, _cache) => {
       const _component_GenerateFormItem = resolveComponent("GenerateFormItem", true);
       const _component_el_table_column = ElTableColumn;
@@ -27684,8 +27688,10 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
                 "updated-model": __props.updatedModel,
                 element: colItem,
                 config: __props.config,
-                disabled: __props.disabled
-              }, null, 8, ["request", "model", "updated-model", "element", "config", "disabled"]);
+                disabled: __props.disabled,
+                widgetFormData: __props.element.columns,
+                onUpdateWidgetForm: updateWidgetForm
+              }, null, 8, ["request", "model", "updated-model", "element", "config", "disabled", "widgetFormData"]);
             }), 128))
           ], 4);
         }), 128))
@@ -28035,7 +28041,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
     };
   }
 });
-var GenerateFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-6f7c6df8"]]);
+var GenerateFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-fd931432"]]);
 const _sfc_main$7 = defineComponent({
   name: "FormGenerate",
   components: {
@@ -28120,7 +28126,8 @@ const _sfc_main$7 = defineComponent({
       });
     };
     const updateWidgetForm = (list) => {
-      state.widgetForm.list = list;
+      const listIndex2 = state.widgetForm.list.findIndex((item) => item.type === "grid");
+      state.widgetForm.list[listIndex2].columns = list;
       state.model = __spreadProps(__spreadValues({}, state.model), { contactsId: "" });
     };
     watch(() => props.data, (val) => {

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
fhKeeper/formulahousekeeper/plugIn/form-design-master/update/dist/index.es.js.map