lcl 8 hónapja
szülő
commit
9c2a1f9807

+ 1 - 0
src/utils/http/index.ts

@@ -340,6 +340,7 @@ class PureHttp {
   ): any {
     let legal = true;
     const paramskey = [];
+    console.log('dddd', params);
     for (const key in params) {
       if (
         params[key] &&

+ 18 - 18
src/views/app/appBottomNavs/components/add/index.vue

@@ -82,23 +82,23 @@ const submit = async (formEl) => {
           type: "success"
         });
         UpdateForm.value = {
-                title: "", //标题
-      selectIcon: "", //选中图标
-      normalIcon: "", //未选中图标
-      selectTextColor: "", //选中文字颜色
-      normalTextColor: "", //未选中文字颜色
-      pageName: "", //关联页面文件
-      noPageHint: "", //空页面提示信息
-      backgroudColor: "", //背景色
-      style: "", //按钮样式
-      scrollerAnimationImages: "", //滚动图片
-      pagPath: "", //PAG文件
-      showTitle: "", //是否显示标题
-      pagLocalPath: "", //pag文件路径
-      pagDefaultIcon: "", //pag默认图标
-      iconSize: "", //图标尺寸
-      statusBarColor: "", //状态栏底色
-      kind: "", //分类
+          title: "", //标题
+          selectIcon: "", //选中图标
+          normalIcon: "", //未选中图标
+          selectTextColor: "", //选中文字颜色
+          normalTextColor: "", //未选中文字颜色
+          pageName: "", //关联页面文件
+          noPageHint: "", //空页面提示信息
+          backgroudColor: "", //背景色
+          style: "", //按钮样式
+          scrollerAnimationImages: "", //滚动图片
+          pagPath: "", //PAG文件
+          showTitle: "", //是否显示标题
+          pagLocalPath: "", //pag文件路径
+          pagDefaultIcon: "", //pag默认图标
+          iconSize: "", //图标尺寸
+          statusBarColor: "", //状态栏底色
+          kind: "", //分类
 
         };
         // 关闭新增弹窗;
@@ -138,7 +138,7 @@ const closeFn: any = inject("closeAddVisible");
 const closeVisible = () => {
   // 清空表单项;
   UpdateForm.value = {
-        title: "", //标题
+    title: "", //标题
     selectIcon: "", //选中图标
     normalIcon: "", //未选中图标
     selectTextColor: "", //选中文字颜色

+ 22 - 3
src/views/app/fileUpdateInfo/hook.tsx

@@ -198,10 +198,29 @@ export function useFileUpdateInfo() {
   // 更新版本号
   const editUpVersionVisible = ref(false);
   const editUpVersionFormData = ref({});
-  function handleUpVersion(row) {
-    editUpVersionVisible.value = true;
+  async function handleUpVersion(row) {
+    // editUpVersionVisible.value = true;
     // 表格数据赋值
-    editUpVersionFormData.value = row;
+    // editUpVersionFormData.value = row;
+    const { status, msg }: any = await http.Request({
+      method: UrlList.kxsConfigServer.fileUpdateInfoupVersion.method,
+      url: UrlList.kxsConfigServer.fileUpdateInfoupVersion.url,
+      params: { id: row.id }
+    });
+    if (status === 1) {
+      //业务成功回调
+      ElMessage({
+        message: "修改成功",
+        type: "success"
+      });
+      onSearch(ruleFormRef.value);
+    } else {
+      //业务失败回调
+      ElMessageBox.alert(msg, "提示", {
+        confirmButtonText: "关闭",
+        type: "warning"
+      });
+    }
   };
 
   // 分类选项数据

+ 21 - 21
src/views/app/pageUpdateInfo/components/add/index.vue

@@ -78,25 +78,25 @@ const submit = async (formEl) => {
           type: "success"
         });
         UpdateForm.value = {
-          moduleVersion: "", //模板更新版本
-          modulePath: "", //模板路径
-          backgroudColor: "", //背景色
-          textColor: "", //前景色
-          statusBarStyle: "", //苹果状态栏
-          showTitle: "", //是否显示头部
-          title: "", //顶部标题
-          showScrollBar: "", //是否显示滚动条
-          skidFlag: "", //是否侧滑返回
-          leftBtn1: "", //左侧按钮1
-          leftBtn2: "", //左侧按钮2
-          rightBtn1: "", //右侧按钮1
-          rightBtn2: "", //右侧按钮2
-          leftAction1: "", //左侧按钮1点击事件
-          leftAction2: "", //左侧按钮2点击事件
-          rightAction1: "", //右侧按钮1点击事件
-          rightAction2: "", //右侧按钮2点击事件
-          gotoPages: "", //下级页面
-          mustUpdate: "", //是否强制更新
+                moduleVersion: "", //模板更新版本
+      modulePath: "", //模板路径
+      backgroudColor: "", //背景色
+      textColor: "", //前景色
+      statusBarStyle: "", //苹果状态栏
+      showTitle: "", //是否显示头部
+      title: "", //顶部标题
+      showScrollBar: "", //是否显示滚动条
+      skidFlag: "", //是否侧滑返回
+      leftBtn1: "", //左侧按钮1
+      leftBtn2: "", //左侧按钮2
+      rightBtn1: "", //右侧按钮1
+      rightBtn2: "", //右侧按钮2
+      leftAction1: "", //左侧按钮1点击事件
+      leftAction2: "", //左侧按钮2点击事件
+      rightAction1: "", //右侧按钮1点击事件
+      rightAction2: "", //右侧按钮2点击事件
+      gotoPages: "", //下级页面
+      mustUpdate: "", //是否强制更新
 
         };
         // 关闭新增弹窗;
@@ -136,11 +136,11 @@ const rules = reactive({
 
 })
 // 关闭弹窗回调函数
-const closeFn: any = inject("addVisible");
+const closeFn: any = inject("closeAddVisible");
 const closeVisible = () => {
   // 清空表单项;
   UpdateForm.value = {
-    moduleVersion: "", //模板更新版本
+        moduleVersion: "", //模板更新版本
     modulePath: "", //模板路径
     backgroudColor: "", //背景色
     textColor: "", //前景色

+ 14 - 14
src/views/app/pageUpdateInfo/components/upVersion/index.vue

@@ -29,30 +29,30 @@ const props = defineProps<{
   };
 }>();
 // 表单数据
-const UpdateForm: any = ref({
+const UpdateFormUpVersion: any = ref({
   moduleVersion: "", //模板更新版本
 
 });
 
 // 表单实例
-const ruleFormRef = ref()
+const ruleFormRefUpVersion = ref()
 
 // 选项卡参数(默认值为列表某项的id)
 const activeId = ref('1')
 // 提交函数
-const submit = async (formEl) => {
+const submitUpVersion = async (formEl) => {
   // 表单校验拦截
   if (!formEl) return
   await formEl.validate(async (valid, fields) => {
     if (valid) {
       //表单校验成功回调
-      console.log('submit!')
+      console.log(UpdateFormUpVersion.value)
 
       // 需动态生成接口
       const { status, msg }: any = await http.Request({
         method: UrlList.kxsConfigServer.pageUpdateInfoupVersion.method,
         url: UrlList.kxsConfigServer.pageUpdateInfoupVersion.url,
-        params: UpdateForm.value
+        params: UpdateFormUpVersion.value
       });
       if (status === 1) {
         //业务成功回调
@@ -60,7 +60,7 @@ const submit = async (formEl) => {
           message: "修改成功",
           type: "success"
         });
-        UpdateForm.value = {
+        UpdateFormUpVersion.value = {
           moduleVersion: "", //模板更新版本
 
         };
@@ -87,7 +87,7 @@ const submit = async (formEl) => {
 
 
 // 表单校验规则
-const rules = reactive({
+const rulesUpVersion = reactive({
   moduleVersion: [
     { required: true, message: '请输入模板更新版本', trigger: 'blur' },
     { validator: (rule: any, value: any, callback: any) => { verification.verificationInteger(value, callback) }, trigger: 'blur' },
@@ -95,18 +95,18 @@ const rules = reactive({
 
 })
 // 关闭弹窗回调函数
-const closeFn: any = inject('editUpVersionVisible');
+const closeFn: any = inject('closeEditUpVersionVisible');
 const openVisible = async () => {
   //通过ID获取表格数据
   const { status, data }: any = await http.Request({ method: UrlList.kxsConfigServer.pageUpdateInfoquery.method, url: UrlList.kxsConfigServer.pageUpdateInfoquery.url, params: { id: props.formData.id } });
   if (status === 1) {
-    UpdateForm.value = data;
+    UpdateFormUpVersion.value = data;
 
   }
 };
 // 关闭弹窗回调函数
 const closeUpVersionVisible = () => {
-  UpdateForm.value = {
+  UpdateFormUpVersion.value = {
     moduleVersion: "", //模板更新版本
 
   };
@@ -119,10 +119,10 @@ const isFullscreen = ref(false)
 
 <template lang="pug">
 .main
-  el-dialog(v-model='props.editVisible' draggable width="50%" :fullscreen="isFullscreen" title="修改" @close="editUpVersionVisible" @open="openVisible")
-    el-form(:model='UpdateForm' label-position="right" ref="ruleFormRef" :rules="rules" label-width="100px")
+  el-dialog(v-model='props.editVisible' draggable width="50%" :fullscreen="isFullscreen" title="修改" @close="closeUpVersionVisible" @open="openVisible")
+    el-form(:model='UpdateFormUpVersion' label-position="right" ref="ruleFormRefUpVersion" :rulesUpVersion="rulesUpVersion" label-width="100px")
       el-form-item(label='模板更新版本' prop="moduleVersion")
-        el-input-number(v-model='UpdateForm.moduleVersion' :min="1" :max="1000"
+        el-input-number(v-model='UpdateFormUpVersion.moduleVersion' :min="1" :max="1000"
           placeholder="请输入模板更新版本")
 
     .flex.justify-end
@@ -134,7 +134,7 @@ const isFullscreen = ref(false)
       el-button(
         type="primary",
         :icon="useRenderIcon(Upload)",
-        @click="submit(ruleFormRef)"
+        @click="submitUpVersion(ruleFormRefUpVersion)"
       ) 确认提交
 </template>
 

+ 7 - 7
src/views/app/pageUpdateInfo/components/update/index.vue

@@ -49,8 +49,8 @@ const submit = async (formEl) => {
 
       // 需动态生成接口
       const { status, msg }: any = await http.Request({
-        method: UrlList.kxsConfigServer.pageUpdateInfo.method,
-        url: UrlList.kxsConfigServer.pageUpdateInfo.url,
+        method: UrlList.kxsConfigServer.pageUpdateInfoupdate.method,
+        url: UrlList.kxsConfigServer.pageUpdateInfoupdate.url,
         params: UpdateForm.value
       });
       if (status === 1) {
@@ -63,7 +63,7 @@ const submit = async (formEl) => {
 
         };
         // 关闭修改弹窗;
-        closeVisible();
+        closeUpdateVisible();
       } else {
         //业务失败回调
         ElMessageBox.alert(msg, "提示", {
@@ -89,7 +89,7 @@ const rules = reactive({
 
 })
 // 关闭弹窗回调函数
-const closeFn: any = inject('editUpdateVisible');
+const closeFn: any = inject('closeEditUpdateVisible');
 const openVisible = async () => {
   //通过ID获取表格数据
   const { status, data }: any = await http.Request({ method: UrlList.kxsConfigServer.pageUpdateInfoquery.method, url: UrlList.kxsConfigServer.pageUpdateInfoquery.url, params: { id: props.formData.id } });
@@ -99,7 +99,7 @@ const openVisible = async () => {
   }
 };
 // 关闭弹窗回调函数
-const closeVisible = () => {
+const closeUpdateVisible = () => {
   UpdateForm.value = {
 
   };
@@ -112,13 +112,13 @@ const isFullscreen = ref(false)
 
 <template lang="pug">
 .main
-  el-dialog(v-model='props.editVisible' draggable width="50%" :fullscreen="isFullscreen" title="修改" @close="editUpdateVisible" @open="openVisible")
+  el-dialog(v-model='props.editVisible' draggable width="50%" :fullscreen="isFullscreen" title="修改" @close="closeUpdateVisible" @open="openVisible")
 
     .flex.justify-end
       el-button(
         :icon="useRenderIcon(Close)",
         :loading="loading",
-        @click="closeVisible()"
+        @click="closeUpdateVisible()"
       ) 关闭
       el-button(
         type="primary",

+ 29 - 49
src/views/app/pageUpdateInfo/hook.tsx

@@ -11,7 +11,7 @@ export function usePageUpdateInfo() {
 
   });
   let form = reactive({
-    kind: "creater", //分类
+    kind: "", //分类
 
   });
   const dataList = ref([]);
@@ -36,11 +36,6 @@ export function usePageUpdateInfo() {
       width: 70,
       hide: ({ checkList }) => !checkList.includes("序号列")
     },
-    {
-      label: "ID",
-      prop: "id",
-      minWidth: 200
-    },
     {
       label: "模板更新版本",
       prop: "moduleVersion",
@@ -56,6 +51,11 @@ export function usePageUpdateInfo() {
       prop: "title",
       minWidth: 200
     },
+    {
+      label: "ID",
+      prop: "id",
+      minWidth: 200
+    },
 
     {
       label: "操作",
@@ -148,39 +148,6 @@ export function usePageUpdateInfo() {
     })
   }
 
-  function handleSycn() {
-    if (form.kind == "") {
-      ElMessageBox.alert("请筛选分类", "提示", {
-        confirmButtonText: "关闭",
-        type: "warning"
-      });
-      return;
-    }
-    ElMessageBox.confirm(
-      `是否同步页面模板? `,
-      "提示",
-      {
-        confirmButtonText: "同步",
-        cancelButtonText: "取消",
-        type: "warning"
-      }
-    ).then(async () => {
-      const { status, msg }: any = await http.Request({ method: UrlList.kxsConfigServer.pageUpdateInfoupdateTemplate.method, url: UrlList.kxsConfigServer.pageUpdateInfoupdateTemplate.url, params: { kind: form.kind } });
-      if (status === 1) {
-        ElMessage({
-          message: "同步成功",
-          type: "success"
-        });
-        onSearch(ruleFormRef.value);
-      } else {
-        ElMessageBox.alert(msg, "提示", {
-          confirmButtonText: "关闭",
-          type: "warning"
-        });
-      };
-    })
-  }
-
   // 新增
   const addVisible = ref(false);
   function handleAdd() {
@@ -198,17 +165,32 @@ export function usePageUpdateInfo() {
   // 更新版本号码
   const editUpVersionVisible = ref(false);
   const editUpVersionFormData = ref({});
-  function handleUpVersion(row) {
-    editUpVersionVisible.value = true;
+  async function handleUpVersion(row) {
+    // editUpVersionVisible.value = true;
     // 表格数据赋值
-    editUpVersionFormData.value = row;
+    // editUpVersionFormData.value = row;
+    // 需动态生成接口
+    const { status, msg }: any = await http.Request({
+      method: UrlList.kxsConfigServer.pageUpdateInfoupVersion.method,
+      url: UrlList.kxsConfigServer.pageUpdateInfoupVersion.url,
+      params: { id: row.id }
+    });
+    if (status === 1) {
+      //业务成功回调
+      ElMessage({
+        message: "修改成功",
+        type: "success"
+      });
+      onSearch(ruleFormRef.value);
+    } else {
+      //业务失败回调
+      ElMessageBox.alert(msg, "提示", {
+        confirmButtonText: "关闭",
+        type: "warning"
+      });
+    }
   };
 
-  // 分类选项数据
-  const kindOptionList = [
-    { label: '创客版', id: 'creater' }
-  ]
-
   return {
     form,
     loading,
@@ -219,7 +201,6 @@ export function usePageUpdateInfo() {
     handleSizeChange,
     handleCurrentChange,
     handleSelectionChange,
-    kindOptionList,
     ruleFormRef,
 
     handleAdd,
@@ -229,7 +210,6 @@ export function usePageUpdateInfo() {
     editUpdateFormData,
     handleDelete,
     handleUpVersion,
-    handleSycn,
     editUpVersionVisible,
     editUpVersionFormData,
 

+ 1 - 1
src/views/app/pageUpdateInfo/index.vue

@@ -139,7 +139,7 @@ provide('closeEditUpVersionVisible', closeEditUpVersionVisible)
                       @click="handleUpVersion(row)"
                       :icon="useRenderIcon(EditPen)"
                       v-if="hasAuth(['version'])"
-                    ) 更新版本号
+                    ) 更新版本号
 
     Add(:addVisible="addVisible")
     EditUpdate(:editVisible="editUpdateVisible" :formData="editUpdateFormData")