销冠的素材

This commit is contained in:
zhonghua1
2025-12-24 18:10:11 +08:00
parent 5a13f60517
commit 014d5ef562
3 changed files with 973 additions and 35 deletions

View File

@@ -103,14 +103,157 @@
<!-- 素材内容 -->
<scroll-view
class="tab-content"
class="tab-content material-content"
scroll-y
v-if="activeTab === 'material'">
<view class="champion-card">
<text class="champion-title">素材</text>
<text class="champion-desc">这里是素材相关的内容展示区域</text>
v-if="activeTab === 'material'"
@scrolltolower="onMaterialReachBottom">
<view class="service-status-toolbar">
<text class="toolbar-total">{{ materialTotal }}</text>
<input
class="toolbar-input"
v-model="materialQuery.title"
placeholder="知识标题"
placeholder-style="color: #b0b0b0"
confirm-type="search"
@confirm="onMaterialSearch"
/>
<input
class="toolbar-input"
v-model="materialQuery.category"
placeholder="知识分类"
placeholder-style="color: #b0b0b0"
confirm-type="search"
@confirm="onMaterialSearch"
/>
<input
class="toolbar-input"
v-model="materialQuery.industry"
placeholder="应用行业"
placeholder-style="color: #b0b0b0"
confirm-type="search"
@confirm="onMaterialSearch"
/>
<view class="toolbar-actions">
<view class="toolbar-btn toolbar-btn--refresh" @click="onMaterialRefresh">
<uni-icons type="refresh" size="18" color="#2A68FF"></uni-icons>
<text>刷新</text>
</view>
<view class="toolbar-btn toolbar-btn--add" @click="showAddMaterial">
<uni-icons type="plus" size="18" color="#2A68FF"></uni-icons>
</view>
</view>
</view>
<view
class="service-card material-card-item"
v-for="(item, index) in materialList"
:key="item.id || index"
@click="viewMaterialDetail(item)">
<view class="card-header">
<view class="staff-info">
<view class="staff-avatar">
<text class="avatar-text">{{ (item.title || '知').charAt(0) }}</text>
</view>
<text class="staff-name">{{ item.title || '未命名知识' }}</text>
</view>
</view>
<view class="customer-info">
<text class="customer-name" v-if="item.category">知识分类{{ item.category }}</text>
<text class="customer-name" v-if="item.industry">应用行业{{ item.industry }}</text>
<text class="customer-name" v-if="item.creator">创建人{{ item.creator }}</text>
</view>
<view class="customer-tags" v-if="item.status">
<view
class="tag-item"
:class="item.status === '启用' || item.status === '已启用' ? 'tag-blue' : 'tag-orange'">
<text>状态{{ item.status }}</text>
</view>
</view>
<view class="service-duration" v-if="item.createTime || item.updateTime">
<text>{{ item.updateTime ? `更新时间:${formatDateTime(item.updateTime)}` : `创建时间:${formatDateTime(item.createTime)}` }}</text>
</view>
</view>
<view class="service-status-empty" v-if="!materialLoading && !materialList.length">
<text>暂无素材</text>
</view>
<view class="service-status-loading-more" v-if="materialLoading && materialList.length">
<text>正在加载更多...</text>
</view>
</scroll-view>
<!-- 添加素材弹出框 -->
<view class="material-popup-mask" v-if="showMaterialPopup" @click="closeMaterialPopup">
</view>
<view class="material-popup" v-if="showMaterialPopup" @click.stop>
<view class="popup-header">
<text class="popup-title">添加素材</text>
<view class="popup-close" @click="closeMaterialPopup">
<uni-icons type="close" size="20" color="#999"></uni-icons>
</view>
</view>
<scroll-view class="popup-content" scroll-y>
<view class="form-card">
<view class="form-item">
<text class="form-item__label">知识标题</text>
<input
class="form-item__input"
v-model="materialForm.title"
placeholder="请输入知识标题"
placeholder-style="color: #9ca3af"
maxlength="512"
/>
</view>
<view class="form-item">
<text class="form-item__label">知识分类</text>
<input
class="form-item__input"
v-model="materialForm.category"
placeholder="请输入知识分类"
placeholder-style="color: #9ca3af"
maxlength="100"
/>
</view>
<view class="form-item">
<text class="form-item__label">应用行业</text>
<input
class="form-item__input"
v-model="materialForm.industry"
placeholder="请输入应用行业"
placeholder-style="color: #9ca3af"
maxlength="100"
/>
</view>
<view class="form-item">
<text class="form-item__label">文件上传</text>
<view class="file-upload-area">
<view class="file-list" v-if="materialForm.files && materialForm.files.length > 0">
<view class="file-item" v-for="(file, index) in materialForm.files" :key="index">
<text class="file-name">{{ file.name || '文件' + (index + 1) }}</text>
<view class="file-delete" @click="removeFile(index)">
<uni-icons type="close" size="16" color="#999"></uni-icons>
</view>
</view>
</view>
<view class="file-upload-btn" @click="chooseFile">
<uni-icons type="plus" size="24" color="#2A68FF"></uni-icons>
</view>
</view>
</view>
</view>
</scroll-view>
<view class="popup-actions">
<view class="popup-btn popup-btn--cancel" @click="closeMaterialPopup">
<uni-icons class="popup-btn__icon" type="close" size="20" color="#2A68FF"></uni-icons>
<text class="popup-btn__text">取消</text>
</view>
<view class="popup-btn popup-btn--submit" @click="submitMaterial">
<uni-icons class="popup-btn__icon" type="checkmarkempty" size="20" color="#2A68FF"></uni-icons>
<text class="popup-btn__text">提交</text>
</view>
</view>
</view>
</view>
</view>
</template>
@@ -119,6 +262,8 @@
// #ifdef APP
import statusBar from "@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar";
// #endif
import { getApiUrl } from "@/common/config.js";
export default {
// #ifdef APP
components: {
@@ -127,7 +272,30 @@
// #endif
data() {
return {
activeTab: 'survey'
activeTab: 'survey',
// 素材相关数据
materialList: [],
materialLoading: false,
materialTotal: 0,
materialPage: {
current: 1,
size: 10
},
materialQuery: {
title: '',
category: '',
industry: '',
creator: '',
status: ''
},
// 添加素材弹出框
showMaterialPopup: false,
materialForm: {
title: '',
category: '',
industry: '',
files: []
}
}
},
onLoad() {
@@ -138,6 +306,281 @@
},
switchTab(tab) {
this.activeTab = tab;
if (tab === 'material') {
// 当进入素材页面时,请求接口填充数据
this.fetchMaterialList();
}
},
// 素材相关方法
onMaterialSearch() {
if (this.activeTab !== 'material') {
this.activeTab = 'material';
}
this.materialPage.current = 1;
this.fetchMaterialList({ force: true });
},
onMaterialRefresh() {
this.materialPage.current = 1;
this.fetchMaterialList({ force: true });
},
onMaterialReachBottom() {
// 已在加载中或全部加载完成则不再触发
if (this.materialLoading) return;
if (this.materialList.length >= this.materialTotal) return;
this.materialPage.current += 1;
this.fetchMaterialList();
},
async fetchMaterialList({ force = false } = {}) {
if (this.materialLoading && !force) {
return;
}
this.materialLoading = true;
try {
const queryParams = {
current: this.materialPage.current,
size: this.materialPage.size
};
const trimmedTitle = this.materialQuery?.title?.trim();
const trimmedCategory = this.materialQuery?.category?.trim();
const trimmedIndustry = this.materialQuery?.industry?.trim();
const trimmedCreator = this.materialQuery?.creator?.trim();
const trimmedStatus = this.materialQuery?.status?.trim();
if (trimmedTitle) {
queryParams.title = trimmedTitle;
}
if (trimmedCategory) {
queryParams.category = trimmedCategory;
}
if (trimmedIndustry) {
queryParams.industry = trimmedIndustry;
}
if (trimmedCreator) {
queryParams.creator = trimmedCreator;
}
if (trimmedStatus) {
queryParams.status = trimmedStatus;
}
const queryString = Object.keys(queryParams)
.map(key => `${key}=${encodeURIComponent(queryParams[key])}`)
.join('&');
const url = `${getApiUrl('/api/knowledgeBase/list')}?${queryString}`;
const res = await uni.request({
url,
method: 'POST',
timeout: 10000
});
if (res.statusCode === 200 && res.data && res.data.success) {
const records = Array.isArray(res.data.data) ? res.data.data : [];
// 第一页或强制刷新时重置列表,否则追加
if (this.materialPage.current === 1 || force) {
this.materialList = records;
} else {
this.materialList = this.materialList.concat(records);
}
this.materialTotal = Number(res.data.total) || 0;
} else {
this.materialList = [];
this.materialTotal = 0;
uni.showToast({
title: res.data?.message || '获取素材列表失败',
icon: 'none'
});
}
} catch (error) {
console.error('获取素材列表失败:', error);
uni.showToast({
title: '获取素材列表失败,请稍后重试',
icon: 'none'
});
} finally {
this.materialLoading = false;
}
},
formatDateTime(value) {
if (!value) {
return '';
}
const date = new Date(value);
if (Number.isNaN(date.getTime())) {
return '';
}
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
const hours = String(date.getHours()).padStart(2, '0');
const minutes = String(date.getMinutes()).padStart(2, '0');
const seconds = String(date.getSeconds()).padStart(2, '0');
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
},
viewMaterialDetail(item) {
// 查看素材详情
console.log('查看素材详情', item);
},
// 添加素材相关方法
showAddMaterial() {
this.showMaterialPopup = true;
this.materialForm = {
title: '',
category: '',
industry: '',
files: []
};
},
closeMaterialPopup() {
this.showMaterialPopup = false;
},
chooseFile() {
// #ifdef H5
// H5平台使用chooseFile
uni.chooseFile({
count: 1,
success: (res) => {
const tempFiles = res.tempFiles || [];
if (tempFiles.length > 0) {
const file = tempFiles[0];
this.materialForm.files.push({
name: file.name || '文件',
path: file.path || file.url,
size: file.size
});
}
},
fail: (err) => {
console.error('选择文件失败:', err);
uni.showToast({
title: '选择文件失败',
icon: 'none'
});
}
});
// #endif
// #ifndef H5
// 非H5平台使用chooseImage可以选择图片文件
uni.chooseImage({
count: 1,
success: (res) => {
const tempFiles = res.tempFiles || [];
if (tempFiles.length > 0) {
const file = tempFiles[0];
this.materialForm.files.push({
name: file.name || '图片',
path: file.path,
size: file.size
});
}
},
fail: (err) => {
console.error('选择文件失败:', err);
uni.showToast({
title: '选择文件失败',
icon: 'none'
});
}
});
// #endif
},
removeFile(index) {
this.materialForm.files.splice(index, 1);
},
async submitMaterial() {
// 表单验证
if (!this.materialForm.title || !this.materialForm.title.trim()) {
uni.showToast({
title: "请输入知识标题",
icon: "none"
});
return;
}
try {
uni.showLoading({
title: "提交中..."
});
// 先上传文件(如果有)
let fileUrls = [];
if (this.materialForm.files && this.materialForm.files.length > 0) {
for (let file of this.materialForm.files) {
try {
// 上传文件到后端
const uploadRes = await uni.uploadFile({
url: getApiUrl('/api/knowledgeBase/upload'),
filePath: file.path,
name: 'file',
formData: {
'name': file.name || 'file'
}
});
if (uploadRes.statusCode === 200) {
let result;
try {
result = typeof uploadRes.data === 'string' ? JSON.parse(uploadRes.data) : uploadRes.data;
} catch (e) {
result = uploadRes.data;
}
if (result && (result.success || result.code === 200)) {
const url = result.data?.url || result.data || result.url;
if (url) {
fileUrls.push(url);
}
}
}
} catch (uploadError) {
console.error('文件上传失败:', uploadError);
// 继续处理其他文件,不中断整个流程
}
}
}
// 构建提交数据
const payload = {
title: this.materialForm.title.trim(),
category: this.materialForm.category?.trim() || '',
industry: this.materialForm.industry?.trim() || '',
fileUrls: fileUrls.length > 0 ? fileUrls : undefined
};
// 提交到后端
const res = await uni.request({
url: getApiUrl('/api/knowledgeBase/add'),
method: 'POST',
data: payload,
header: {
"Content-Type": "application/json"
},
timeout: 15000
});
uni.hideLoading();
if (res.statusCode === 200 && res.data && (res.data.success || res.data.code === 200)) {
uni.showToast({
title: res.data?.message || "提交成功",
icon: "success"
});
// 关闭弹出框并刷新列表
this.closeMaterialPopup();
this.materialPage.current = 1;
this.fetchMaterialList({ force: true });
} else {
uni.showToast({
title: res.data?.message || "提交失败",
icon: "none"
});
}
} catch (error) {
uni.hideLoading();
console.error("提交素材失败:", error);
uni.showToast({
title: "提交失败,请重试",
icon: "none"
});
}
}
}
}
@@ -245,5 +688,408 @@
font-size: 28rpx;
color: #999;
}
/* 素材内容样式 - 参考标签管理 */
.material-content {
height: calc(100vh - 300rpx);
background-color: #F5F5F5;
padding: 24rpx 16rpx;
box-sizing: border-box;
}
.service-status-toolbar {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 16rpx;
padding: 16rpx 24rpx;
margin-bottom: 24rpx;
background-color: #F8F8FA;
border-radius: 16rpx;
border: 1px solid #EFEFF2;
}
.toolbar-total {
font-size: 26rpx;
color: #666;
margin-right: 16rpx;
width: 100%;
}
.toolbar-input {
flex: 1;
min-width: 150rpx;
background-color: #F5F6FA;
border-radius: 12rpx;
padding: 16rpx 24rpx;
font-size: 28rpx;
border: 1px solid transparent;
}
.toolbar-actions {
display: flex;
align-items: center;
margin-left: auto;
}
.toolbar-btn {
padding: 0 16rpx;
height: 72rpx;
color: #2A68FF;
display: flex;
align-items: center;
justify-content: center;
gap: 8rpx;
font-size: 28rpx;
font-weight: 400;
}
.service-card {
width: 100%;
box-sizing: border-box;
background-color: #FFFFFF;
border-radius: 16rpx;
padding: 32rpx;
margin-bottom: 24rpx;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
overflow: visible;
}
.material-card-item {
padding-left: 32rpx;
padding-right: 32rpx;
padding-top: 32rpx;
padding-bottom: 32rpx;
}
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20rpx;
width: 100%;
box-sizing: border-box;
padding: 0;
margin: 0;
}
.staff-info {
display: flex;
align-items: center;
flex: 1;
min-width: 0;
margin: 0;
padding: 0;
}
.staff-avatar {
width: 64rpx;
height: 64rpx;
background-color: #2196F3;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin-right: 16rpx;
margin-left: 0;
margin-top: 0;
margin-bottom: 0;
flex-shrink: 0;
}
.avatar-text {
font-size: 32rpx;
color: #FFFFFF;
font-weight: 500;
}
.staff-name {
font-size: 32rpx;
font-weight: 500;
color: #333;
}
.customer-tags {
display: flex;
flex-wrap: wrap;
margin-bottom: 20rpx;
gap: 12rpx;
box-sizing: border-box;
margin-left: 0;
margin-right: 0;
padding: 0;
width: 100%;
max-width: 100%;
}
.customer-info {
margin-bottom: 16rpx;
display: flex;
flex-direction: column;
gap: 8rpx;
box-sizing: border-box;
margin-left: 0;
margin-right: 0;
padding: 0;
width: 100%;
max-width: 100%;
}
.customer-name {
font-size: 28rpx;
color: #555;
}
.tag-item {
padding: 8rpx 16rpx;
border-radius: 8rpx;
box-sizing: border-box;
word-wrap: break-word;
word-break: break-all;
display: inline-block;
max-width: 100%;
}
.tag-blue {
background-color: #E3F2FD;
}
.tag-blue text {
font-size: 24rpx;
color: #1976D2;
}
.tag-orange {
background-color: #FFF3E0;
}
.tag-orange text {
font-size: 24rpx;
color: #F57C00;
}
.service-duration {
padding-top: 16rpx;
border-top: 1px solid #F0F0F0;
}
.service-duration text {
font-size: 26rpx;
color: #999;
}
.service-status-empty {
padding: 48rpx 0;
text-align: center;
color: #999;
font-size: 28rpx;
}
.service-status-loading-more {
padding: 24rpx 0;
text-align: center;
color: #999;
font-size: 26rpx;
}
/* 添加素材弹出框样式 */
.material-popup-mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
z-index: 999;
}
.material-popup {
position: fixed;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 90vw;
max-width: 620rpx;
box-sizing: border-box;
max-height: 80vh;
background-color: #FFFFFF;
border-radius: 16rpx;
z-index: 1000;
display: flex;
flex-direction: column;
box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.2);
}
.popup-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 32rpx;
border-bottom: 1px solid #E0E0E0;
}
.popup-title {
font-size: 36rpx;
font-weight: 500;
color: #333;
}
.popup-close {
width: 48rpx;
height: 48rpx;
display: flex;
align-items: center;
justify-content: center;
}
.popup-content {
flex: 1;
max-height: calc(80vh - 200rpx);
padding: 20rpx 20rpx 28rpx;
box-sizing: border-box;
}
.form-card {
width: 100%;
box-sizing: border-box;
}
.form-item {
display: flex;
align-items: center;
margin-bottom: 20rpx;
gap: 16rpx;
}
.form-item__label {
font-size: 32rpx;
color: #333;
font-weight: 500;
width: 160rpx;
flex-shrink: 0;
text-align: left;
}
.form-item__input {
flex: 1;
min-width: 0;
height: 88rpx;
background-color: #f9fafb;
border-radius: 12rpx;
padding: 0 24rpx;
font-size: 32rpx;
color: #333;
box-sizing: border-box;
}
.file-upload-area {
width: 100%;
display: flex;
flex-direction: column;
gap: 12rpx;
}
.file-list {
margin-bottom: 0;
}
.file-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16rpx 24rpx;
background-color: #f9fafb;
border-radius: 12rpx;
margin-bottom: 12rpx;
}
.file-upload-btn {
width: 100%;
height: 88rpx;
border: 1px dashed #d1d5db;
border-radius: 12rpx;
display: flex;
align-items: center;
justify-content: center;
gap: 0;
box-sizing: border-box;
}
.file-name {
font-size: 28rpx;
color: #333;
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.file-delete {
width: 40rpx;
height: 40rpx;
display: flex;
align-items: center;
justify-content: center;
margin-left: 16rpx;
}
.file-upload-btn {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
height: 88rpx;
padding: 0;
background-color: #f9fafb;
border: 2rpx dashed #d1d5db;
border-radius: 12rpx;
}
.file-upload-text {
display: none;
}
.popup-actions {
display: flex;
gap: 24rpx;
padding: 24rpx;
border-top: 1px solid #E0E0E0;
}
.popup-btn {
flex: 1;
height: 88rpx;
border-radius: 12rpx;
display: flex;
align-items: center;
justify-content: center;
}
.popup-btn--cancel {
background-color: #f3f4f6;
}
.popup-btn--submit {
/* 对齐取消按钮的风格:浅色背景与边框 */
background-color: #f3f4f6;
border: 1px solid #d1d5db;
}
.popup-btn__text {
font-size: 32rpx;
font-weight: 500;
}
.popup-btn__icon {
margin-right: 8rpx;
}
.popup-btn--cancel .popup-btn__text {
color: #2A68FF;
}
.popup-btn--submit .popup-btn__text {
color: #2A68FF;
}
</style>

View File

@@ -1639,19 +1639,23 @@
queryParams.customerName = params.customerName;
}
// 构建查询参数
const queryString = Object.keys(queryParams)
// 构建请求体(过滤空值),后端改为 POST
const requestData = Object.keys(queryParams)
.filter(key => queryParams[key] !== null && queryParams[key] !== undefined && queryParams[key] !== '')
.map(key => `${key}=${encodeURIComponent(queryParams[key])}`)
.join('&');
.reduce((acc, key) => {
acc[key] = queryParams[key];
return acc;
}, {});
// 统一使用 getApiUrl根据 env.js 配置自动切换环境
const baseUrl = getApiUrl('/api/audioManagement/list');
const url = queryString ? `${baseUrl}?${queryString}` : baseUrl;
const url = getApiUrl('/api/audioManagement/list');
const res = await uni.request({
url: url,
method: 'GET',
method: 'POST',
data: requestData,
header: {
'Content-Type': 'application/json'
},
timeout: 10000
});

View File

@@ -255,7 +255,7 @@
<!-- 标签管理 -->
<scroll-view
class="service-status-list"
class="service-status-list tag-list"
scroll-y
v-if="activeTab === 'tag' && tagViewMode === 'list'"
@scrolltolower="onTagListReachBottom">
@@ -405,8 +405,8 @@
</view>
<view class="form-item">
<text class="form-item__label">详情</text>
<textarea
class="form-item__textarea form-item__textarea--detail"
<input
class="form-item__input"
v-model="tagForm.detail"
placeholder="请输入详情"
placeholder-style="color: #9ca3af"
@@ -415,8 +415,8 @@
</view>
<view class="form-item">
<text class="form-item__label">备注</text>
<textarea
class="form-item__textarea form-item__textarea--remark"
<input
class="form-item__input"
v-model="tagForm.remark"
placeholder="请输入备注"
placeholder-style="color: #9ca3af"
@@ -581,13 +581,15 @@ import { getApiUrl } from "@/common/config.js";
if (trimmedCustomerName) {
queryParams.customerName = trimmedCustomerName;
}
const queryString = Object.keys(queryParams)
.map(key => `${key}=${encodeURIComponent(queryParams[key])}`)
.join('&');
const url = `${getApiUrl('/api/audioManagement/list')}?${queryString}`;
// 后端改为 POST 接口,参数放请求体
const url = getApiUrl('/api/audioManagement/list');
const res = await uni.request({
url,
method: 'GET',
method: 'POST',
data: queryParams,
header: {
'Content-Type': 'application/json'
},
timeout: 10000
});
@@ -910,13 +912,15 @@ import { getApiUrl } from "@/common/config.js";
if (trimmedTagName) {
queryParams.tagName = trimmedTagName;
}
const queryString = Object.keys(queryParams)
.map(key => `${key}=${encodeURIComponent(queryParams[key])}`)
.join('&');
const url = `${getApiUrl('/api/industryTags/list')}?${queryString}`;
// 后端接口不支持 GET改为 POST 传参
const url = getApiUrl('/api/industryTags/list');
const res = await uni.request({
url,
method: 'GET',
method: 'POST',
data: queryParams,
header: {
'Content-Type': 'application/json'
},
timeout: 10000
});
if (res.statusCode === 200 && res.data && res.data.success) {
@@ -1224,6 +1228,11 @@ import { getApiUrl } from "@/common/config.js";
box-sizing: border-box;
}
/* 标签管理列表区:仅缩小高度到当前的 70%,宽度保持不变 */
.tag-list {
height: calc((100vh - 300rpx) * 0.7);
}
.service-status-toolbar {
display: flex;
flex-wrap: nowrap;
@@ -1540,6 +1549,11 @@ import { getApiUrl } from "@/common/config.js";
margin-bottom: 32rpx;
}
/* 对于包含 textarea 的表单项label 顶部对齐 */
.form-item--textarea {
align-items: flex-start;
}
.gender-radio-group {
flex: 1;
display: flex;
@@ -1566,7 +1580,8 @@ import { getApiUrl } from "@/common/config.js";
font-size: 28rpx;
color: #333;
font-weight: 500;
width: 160rpx;
/* 原 160rpx,缩小 20% 以减小与输入框的间距 */
width: 128rpx;
flex-shrink: 0;
}
@@ -1630,7 +1645,7 @@ import { getApiUrl } from "@/common/config.js";
.tag-select-wrapper {
position: relative;
width: 75%;
flex: 1;
}
.tag-select {
@@ -1711,7 +1726,8 @@ import { getApiUrl } from "@/common/config.js";
}
.form-btn--save {
background-color: #007AFF;
/* 调浅主按钮色,使页面更柔和 */
background-color: #4C8DFF;
}
.form-btn--start {
@@ -1821,10 +1837,79 @@ import { getApiUrl } from "@/common/config.js";
padding: 24rpx 32rpx;
box-sizing: border-box;
}
/* 标签弹窗整体高度控制在 70% 视窗,内部通过尺寸缩减而非拉伸变形 */
.tag-management {
max-height: 70vh;
}
.tag-management .tag-form {
max-height: 70vh;
}
/* 弹窗内部元素高度约 80%(缩减 padding/字号/高度),保持比例一致 */
.tag-management .form-card {
padding: 24rpx 20rpx;
margin-bottom: 24rpx;
}
.tag-management .form-item {
margin-bottom: 24rpx;
}
.tag-management .form-item__label {
font-size: 26rpx;
}
.tag-management .form-item__input,
.tag-management .form-item__text,
.tag-management .form-item__picker,
.tag-management .tag-select {
height: 70rpx; /* 约为原 88rpx 的 80% */
padding: 0 20rpx;
font-size: 26rpx;
}
.tag-management .form-item__picker-icon {
font-size: 22rpx;
}
.tag-management .tag-select-dropdown__item {
padding: 16rpx 28rpx;
}
.tag-management .tag-select-dropdown__item text {
font-size: 26rpx;
}
.tag-management .form-item__textarea {
padding: 16rpx;
font-size: 26rpx;
line-height: 1.5;
}
/* 详情与备注区域缩到约 50% 高度 */
.tag-management .form-item__textarea--detail {
min-height: 60rpx;
}
.tag-management .form-item__textarea--remark {
min-height: 50rpx;
}
.tag-management .form-actions {
padding-bottom: 24rpx;
gap: 16rpx;
}
.tag-management .form-btn {
height: 72rpx; /* 约为原 88rpx 的 80% */
font-size: 28rpx;
}
.form-item__textarea {
flex: 1;
min-height: 200rpx;
min-height: 100rpx;
background-color: #f9fafb;
border-radius: 12rpx;
padding: 24rpx;
@@ -1836,12 +1921,15 @@ import { getApiUrl } from "@/common/config.js";
.form-item__textarea--detail {
min-height: 100rpx;
height: 100rpx;
}
.form-item__textarea--remark {
min-height: 88rpx;
height: 88rpx;
}
/* 确保包含 textarea 的表单项 label 在顶部对齐 */
.form-item--textarea .form-item__label {
padding-top: 24rpx;
}
/* 开关样式 */