Эх сурвалжийг харах

Merge branch 'master' of http://62.234.61.92:3000/wjm/mec-cloud_IntelligentManufacturing_CRM

ZYZ 1 жил өмнө
parent
commit
d187ac96e6

+ 14 - 15
zkqy-ui/src/router/index.js

@@ -224,22 +224,21 @@ export const constantRoutes = [
       //   name: 'IndexOld',
       //   meta: { title: '首页1', icon: 'dashboard', affix: true }
       // },
+
+      // {
+      //   path: '/H5',
+      //   component: () => import('../views/asEditor/layout/home/home.vue'),
+      // },
+    ]
+  },
+  {
+    path: '/pageDesign',
+    component: Layout,
+    children: [
       {
-        path: '/asEditor',
-        component: Layout,
-        redirect: '/pageDesign',
-        component: () => import('../views/asEditor/layout'),
-        children: [
-          {
-            path: '/pageDesign',
-            name: 'pageDesign',
-            component: () => import('../views/asEditor/layout/home/pageDesign.vue'),
-          },
-        ]
-      },
-      {
-        path: '/H5',
-        component: () => import('../views/asEditor/layout/home/home.vue'),
+        path: '/pageDesign',
+        name: 'pageDesign',
+        component: () => import('../views/asEditor/layout/home/pageDesign.vue'),
       },
     ]
   },

+ 59 - 51
zkqy-ui/src/views/system/excuteBtnMange/index.vue

@@ -1279,9 +1279,12 @@ export default {
     },
     // 自定义字段校验
     checkBtnFormKey(rule, value, callback) {
-      let { btnType } = this.btnGroupFormData;
+      let { btnType, btnFormType } = this.btnGroupFormData;
       console.log(btnType);
-      if (btnType == "INSERT" || btnType == "UPDATE") {
+      if (
+        (btnType == "INSERT" || btnType == "UPDATE") &&
+        btnFormType != "noNeed"
+      ) {
         if (!value) {
           callback(new Error("请绑定表单"));
         }
@@ -1603,61 +1606,66 @@ export default {
     // },
     /** 提交按钮 */
     submitForm() {
-      this.$refs["btnGroupFormRef"].validate(async (valid) => {
-        console.log(this.btnGroupFormData);
-        console.log(valid);
-        if (valid) {
-          let validateRes = this.myValidate(this.btnGroupFormData);
-          if (!validateRes.flag) {
-            this.$message.error(validateRes.msg);
-            return;
-          }
-          // 获取公共参数
-          // let commonData=this.getCommonData(this.commonFieldData)
-          if (
-            this.btnGroupFormData.btnType != "OUTLINK" &&
-            this.btnGroupFormData.btnType != "INNERLINK"
-          ) {
-            let temp = {
-              commonFieldData: this.commonFieldData,
-              conditionData: this.conditionData,
-            };
-            this.btnGroupFormData.btnParams = JSON.stringify(temp);
-          } else {
-            let tempObj = {};
-            tempObj.url = this.btnGroupFormData.btnParams;
-            tempObj.commonFieldData = JSON.stringify(this.commonFieldData);
-            this.btnGroupFormData.btnParams = JSON.stringify(tempObj);
-          }
-          this.btnGroupFormData.btnShowCondition = this.getHidenConditions();
-          console.log(this.btnGroupFormData.btnShowCondition);
-          this.btnGroupFormData.btnGroupType = this.queryParams.btnGroupType; //添加按钮组类型
-          if (this.btnGroupFormData.btnGroupType == "top") {
-            this.btnGroupFormData.btnIcon += `@${this.btnGroupFormData.btnStyle}`;
-          }
-          if (this.editType) {
-            // 新增按钮组
-            this.btnGroupFormData.btnKey = uuidv4();
-            let res = await addBtn(this.btnGroupFormData);
-            if (res.code == 200) {
-              this.$message.success("添加成功");
+      this.$refs["btnGroupFormRef"].validate(
+        async (valid) => {
+          console.log(this.btnGroupFormData);
+          console.log(valid);
+          if (valid) {
+            let validateRes = this.myValidate(this.btnGroupFormData);
+            if (!validateRes.flag) {
+              this.$message.error(validateRes.msg);
+              return;
+            }
+            // 获取公共参数
+            // let commonData=this.getCommonData(this.commonFieldData)
+            if (
+              this.btnGroupFormData.btnType != "OUTLINK" &&
+              this.btnGroupFormData.btnType != "INNERLINK"
+            ) {
+              let temp = {
+                commonFieldData: this.commonFieldData,
+                conditionData: this.conditionData,
+              };
+              this.btnGroupFormData.btnParams = JSON.stringify(temp);
             } else {
-              this.$message.error("网络异常,请稍后添加");
+              let tempObj = {};
+              tempObj.url = this.btnGroupFormData.btnParams;
+              tempObj.commonFieldData = JSON.stringify(this.commonFieldData);
+              this.btnGroupFormData.btnParams = JSON.stringify(tempObj);
             }
-          } else {
-            // 修改按钮组
-            let res = await updateBtn(this.btnGroupFormData);
-            if (res.code == 200) {
-              this.$message.success("修改成功");
+            this.btnGroupFormData.btnShowCondition = this.getHidenConditions();
+            console.log(this.btnGroupFormData.btnShowCondition);
+            this.btnGroupFormData.btnGroupType = this.queryParams.btnGroupType; //添加按钮组类型
+            if (this.btnGroupFormData.btnGroupType == "top") {
+              this.btnGroupFormData.btnIcon += `@${this.btnGroupFormData.btnStyle}`;
+            }
+            if (this.editType) {
+              // 新增按钮组
+              this.btnGroupFormData.btnKey = uuidv4();
+              let res = await addBtn(this.btnGroupFormData);
+              if (res.code == 200) {
+                this.$message.success("添加成功");
+              } else {
+                this.$message.error("网络异常,请稍后添加");
+              }
             } else {
-              this.$message.error("网络异常,请稍后修改");
+              // 修改按钮组
+              let res = await updateBtn(this.btnGroupFormData);
+              if (res.code == 200) {
+                this.$message.success("修改成功");
+              } else {
+                this.$message.error("网络异常,请稍后修改");
+              }
             }
-          }
 
-          this.getList();
-          this.open = false;
+            this.getList();
+            this.open = false;
+          }
+        },
+        (err) => {
+          console.log(err);
         }
-      });
+      );
     },
     // 格式化按钮隐藏条件
     getHidenConditions() {