提交优化
This commit is contained in:
parent
767d2b8401
commit
af9d488a4a
|
|
@ -8,7 +8,9 @@
|
|||
"Bash(git rm:*)",
|
||||
"Bash(git commit:*)",
|
||||
"Bash(git push:*)",
|
||||
"Bash(git config:*)"
|
||||
"Bash(git config:*)",
|
||||
"Bash(pnpm run build)",
|
||||
"Bash(mvn compile:*)"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ public class DealerServiceImpl implements DealerService {
|
|||
// 设置密码:如果提供了密码则使用提供的密码,否则使用默认密码
|
||||
String password = dealerDTO.getPassword();
|
||||
if (password == null || password.trim().isEmpty()) {
|
||||
password = "123456"; // 默认密码
|
||||
password = "a123456"; // 默认密码
|
||||
}
|
||||
user.setPassword(passwordEncoder.encode(password));
|
||||
user.setCreatedAt(LocalDateTime.now());
|
||||
|
|
|
|||
|
|
@ -9,13 +9,9 @@ spring:
|
|||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
# 原本直连外部数据库的配置已注释,改为通过环境变量并默认指向 Docker 服务名 crm-mysql
|
||||
# url: jdbc:mysql://192.168.3.80:3306/crm_db?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false&allowPublicKeyRetrieval=true
|
||||
# username: root
|
||||
# password: "Boyun@123"
|
||||
url: ${SPRING_DATASOURCE_URL:jdbc:mysql://crm-mysql:3306/crm_db?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false&allowPublicKeyRetrieval=true}
|
||||
username: ${SPRING_DATASOURCE_USERNAME:root}
|
||||
password: ${SPRING_DATASOURCE_PASSWORD:MySQL123s56}
|
||||
url: jdbc:mysql://192.168.3.80:3306/crm_db?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false&allowPublicKeyRetrieval=true
|
||||
username: root
|
||||
password: "Boyun@123"
|
||||
druid:
|
||||
initial-size: 5
|
||||
min-idle: 5
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
<el-form-item label="客户名称">
|
||||
<el-input v-model="queryForm.name" placeholder="请输入客户名称" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="所属行业">
|
||||
<el-form-item label="所属行业" style="width: 190px;">
|
||||
<el-select v-model="queryForm.industry" placeholder="请选择行业" clearable>
|
||||
<el-option label="制造业" value="manufacturing" />
|
||||
<el-option label="互联网" value="internet" />
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
<el-option label="其他" value="other" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-form-item label="状态" style="width: 160px;">
|
||||
<el-select v-model="queryForm.status" placeholder="请选择状态" clearable>
|
||||
<el-option label="可报备" :value="0" />
|
||||
<el-option label="保护中" :value="1" />
|
||||
|
|
@ -85,18 +85,20 @@
|
|||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
v-model:current-page="queryForm.current"
|
||||
v-model:page-size="queryForm.size"
|
||||
:total="total"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
prev-text="上一页"
|
||||
next-text="下一页"
|
||||
@size-change="fetchData"
|
||||
@current-change="fetchData"
|
||||
style="margin-top: 20px; justify-content: flex-end"
|
||||
/>
|
||||
<el-config-provider :locale="zhCn">
|
||||
<el-pagination
|
||||
v-model:current-page="queryForm.current"
|
||||
v-model:page-size="queryForm.size"
|
||||
:total="total"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
prev-text="上一页"
|
||||
next-text="下一页"
|
||||
@size-change="fetchData"
|
||||
@current-change="fetchData"
|
||||
style="margin-top: 20px; justify-content: flex-end"
|
||||
/>
|
||||
</el-config-provider>
|
||||
</el-card>
|
||||
|
||||
<!-- 新增/编辑对话框 -->
|
||||
|
|
@ -153,6 +155,7 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted, computed } from 'vue'
|
||||
import { ElMessage, ElMessageBox, type FormInstance, type FormRules } from 'element-plus'
|
||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
import { getCustomerPage, createCustomer, updateCustomer, deleteCustomer } from '@/api/customer'
|
||||
import { getConfigValue } from '@/api/system'
|
||||
import { searchSchoolByName } from '@/api/school'
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
<el-form-item label="经销商账号">
|
||||
<el-input v-model="queryForm.code" placeholder="请输入经销商账号" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-form-item label="状态" style="width: 180px;">
|
||||
<el-select v-model="queryForm.status" placeholder="请选择状态" clearable>
|
||||
<el-option label="启用" :value="1" />
|
||||
<el-option label="禁用" :value="0" />
|
||||
|
|
@ -92,11 +92,11 @@
|
|||
<el-input
|
||||
v-model="formData.password"
|
||||
type="password"
|
||||
placeholder="请输入初始密码(不填默认为123456)"
|
||||
placeholder="请输入初始密码(不填默认为a123456)"
|
||||
show-password
|
||||
/>
|
||||
<div style="color: #909399; font-size: 12px; margin-top: 4px">
|
||||
长度6-20位,不填则默认密码为 123456
|
||||
长度6-20位,不填则默认密码为 a123456
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
|
@ -289,7 +289,15 @@ const handleSubmit = async () => {
|
|||
await updateDealer(formData.id, formData)
|
||||
ElMessage.success('更新成功')
|
||||
} else {
|
||||
await createDealer(formData)
|
||||
// 处理密码:如果未填写则使用默认密码 a123456,并进行加密
|
||||
const submitData = { ...formData }
|
||||
if (!submitData.password || submitData.password.trim() === '') {
|
||||
submitData.password = 'a123456'
|
||||
}
|
||||
// 对密码进行 SHA-256 哈希后再传输
|
||||
submitData.password = await hashPassword(submitData.password)
|
||||
|
||||
await createDealer(submitData)
|
||||
ElMessage.success('创建成功')
|
||||
}
|
||||
dialogVisible.value = false
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ const handleLogin = async () => {
|
|||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
background: linear-gradient(135deg, #FFFFFF 0%, #409EFF 100%);
|
||||
}
|
||||
|
||||
.login-box {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
<el-form-item label="客户名称">
|
||||
<el-input v-model="queryForm.customerName" placeholder="请输入客户名称" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-form-item label="状态" style="width: 180px;">
|
||||
<el-select v-model="queryForm.status" placeholder="请选择状态" clearable>
|
||||
<el-option label="待审核" :value="0" />
|
||||
<el-option label="已通过" :value="1" />
|
||||
|
|
@ -82,18 +82,20 @@
|
|||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
v-model:current-page="queryForm.current"
|
||||
v-model:page-size="queryForm.size"
|
||||
:total="total"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
prev-text="上一页"
|
||||
next-text="下一页"
|
||||
@size-change="fetchData"
|
||||
@current-change="fetchData"
|
||||
style="margin-top: 20px; justify-content: flex-end"
|
||||
/>
|
||||
<el-config-provider :locale="zhCn">
|
||||
<el-pagination
|
||||
v-model:current-page="queryForm.current"
|
||||
v-model:page-size="queryForm.size"
|
||||
:total="total"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
prev-text="上一页"
|
||||
next-text="下一页"
|
||||
@size-change="fetchData"
|
||||
@current-change="fetchData"
|
||||
style="margin-top: 20px; justify-content: flex-end"
|
||||
/>
|
||||
</el-config-provider>
|
||||
</el-card>
|
||||
|
||||
<!-- 提交报备对话框 -->
|
||||
|
|
@ -162,6 +164,7 @@
|
|||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { ElMessage, ElMessageBox, type FormInstance, type FormRules } from 'element-plus'
|
||||
import { useUserStore } from '@/stores/user'
|
||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
import { getReportPage, createReport, auditReport, withdrawReport } from '@/api/report'
|
||||
import { searchCustomerByName } from '@/api/customer'
|
||||
import { getConfigValue } from '@/api/system'
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user