后端问题

 接口请求卡顿,问题追溯

Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@42a5ff0f] was not registered for synchronization because synchronization is not active
JDBC Connection [com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl@1689bca1] will not be managed by Spring

微服务项目全栈开发中问题记录-LMLPHP

org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceAutoConfiguration' of type [com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceAutoConfiguration$$EnhancerBySpringCGLIB$$11b836aa] is not eligible for getting processed by all BeanPostProcessors

 线程池配置错误微服务项目全栈开发中问题记录-LMLPHP

事务配置

微服务项目全栈开发中问题记录-LMLPHP微服务项目全栈开发中问题记录-LMLPHP

前端问题

数据回显编辑问题

未修改前源代码 (无法编辑)

<template>
  <div v-if="m_is_show_detail">
    <el-dialog class="menu_detail" v-model="m_is_show_detail" align-center draggable destroy-on-close center :show-close="false">
      <template #header="{ titleId, titleClass }">
        <div :id="titleId" :class="titleClass" v-if="menu">
          <h4>- {{ menu.name }} -</h4>
        </div>
        <el-form class="form_detail" ref="ruleFormRef" :model="menu" label-width="100px">
         
          <!--(0:运营 1:PC 2:小程序 3:app 4:h5)-->
          <el-form-item label="渠道" prop="channels" required>
            <el-checkbox-group v-model="menu.channels" :disabled="isDisable" @change="handleCheckedCitiesChange">
              <el-checkbox v-for="chl in serverChannels" :key="chl.code" :label="chl.name" :disabled="chl.status===0"></el-checkbox>
              <!-- <el-checkbox label="0">运营</el-checkbox> 
               <el-checkbox label="1">PC</el-checkbox>
              <el-checkbox label="2">小程序</el-checkbox>
              <el-checkbox label="3">APP</el-checkbox>
              <el-checkbox label="4">H5</el-checkbox> -->
            </el-checkbox-group>
          </el-form-item>
        
        </el-form>
      </template>
    </el-dialog>
  </div>
</template>

<script lang="ts" setup>
import { ref, defineExpose, reactive, defineProps } from "vue";
import { get, post } from "@/utils/commonReq";
import type { FormInstance, FormRules } from "element-plus";
import DEFAULT_CONFIG from "@/utils/reqUrls";

const isDisable: any = ref();
const defaultTime: any = new Date();
const m_is_show_detail: any = ref(false);

interface RuleForm {

  name: string;
  channels: string[];
  channel: string;

}
/**
 * 菜单详情
 */
let menu = reactive<RuleForm>({
 
  name: "",
 
  channels: [],
  channel: "",
});


// 请求数据
const getDetail = (url: string, enable: number, dicts: any) => {
  //详情(不允许)或编辑
  isDisable.value = enable === 1 ? true : false;
  get(url, {})
    .then((res: any) => {
      console.log(1);
      console.log(res);
      if (res.code === 200) {
        menu = res.data;
        if (res.data.channel) {
          menu.channels = res.data.channel.split(",");
        }
        console.log(menu);
      }
      m_is_show_detail.value = true;
    })
    .catch((e) => {
      console.log(e);
      ElMessage.error("获取菜单详情数据失败,请重试!");
    });
};


</script>

修改后的代码

去掉Interface

<template>
  <div v-if="m_is_show_detail">
    <el-dialog class="menu_detail" v-model="m_is_show_detail" align-center draggable destroy-on-close center
      :show-close="false">
      <template #header="{ titleId, titleClass }">
        <div :id="titleId" :class="titleClass" v-if="menu">
          <h4>- {{ menu.name }} -</h4>
        </div>
        <el-form class="form_detail" ref="ruleFormRef" :model="menu" label-width="100px" :rules="rules">
          <!--(0:运营 1:PC 2:小程序 3:app 4:h5)-->
          <el-form-item label="渠道" prop="channels" required>
            <el-checkbox-group v-model="menu.channels" :disabled="isDisable">
              <el-checkbox v-for="chl in serverChannels" :key="chl.id" :label="chl.code" :disabled="chl.status === 0">{{
                chl.name }}</el-checkbox>
            </el-checkbox-group>
          </el-form-item>

        </el-form>
      </template>
    </el-dialog>
  </div>
</template>

<script lang="ts" setup>
import { ref, defineExpose, reactive } from "vue";
import { get, post } from "@/utils/commonReq";
import type { FormInstance, FormRules } from "element-plus";
import DEFAULT_CONFIG from "@/utils/reqUrls";

const isDisable: any = ref();
const defaultTime: any = new Date();
const m_is_show_detail: any = ref(false);

/**
 * 菜单详情
 */
const menu = reactive({
  name:'',
  channels: [],
  channel: "
});

// 请求数据
const getDetail = (url: string, enable: number, dicts: any) => {
  //详情(不允许)或编辑
  isDisable.value = enable === 1 ? true : false;
  get(url, {})
    .then((res: any) => {
      if (res.code === 200) {
        Object.assign(menu, res.data)
        if (res.data.channel) {
          menu.channels = res.data.channel.split(",");
        }
        console.log(menu);
      }
      m_is_show_detail.value = true;
    })
    .catch((e) => {
      console.log(e);
      ElMessage.error("获取菜单详情数据失败,请重试!");
    });
};

</script>

 

09-23 21:09