bug修改
This commit is contained in:
parent
887b3ab82b
commit
d8cf58f2c5
|
|
@ -105,6 +105,7 @@ export default {
|
||||||
this.$message.success('新增资质成功!'); // 新增成功提示
|
this.$message.success('新增资质成功!'); // 新增成功提示
|
||||||
} else {
|
} else {
|
||||||
await editDataAPI(submitData);
|
await editDataAPI(submitData);
|
||||||
|
console.log('submitData',submitData)
|
||||||
this.$message.success('编辑资质成功!'); // 编辑成功提示
|
this.$message.success('编辑资质成功!'); // 编辑成功提示
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,6 @@
|
||||||
<div class="qualification-card">
|
<div class="qualification-card">
|
||||||
<div class="qualification-header">
|
<div class="qualification-header">
|
||||||
<h3 class="certificate-name">{{ item.certificateName || '未命名证书' }}</h3>
|
<h3 class="certificate-name">{{ item.certificateName || '未命名证书' }}</h3>
|
||||||
<span class="type-tag">{{ item.qualificationType || '未分类' }}</span>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="qualification-info">
|
<div class="qualification-info">
|
||||||
|
|
@ -479,7 +478,7 @@ export default {
|
||||||
|
|
||||||
.qualification-grid {
|
.qualification-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(5, 1fr);
|
grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
|
||||||
gap: 24px;
|
gap: 24px;
|
||||||
margin-bottom: 20px; /* 与分页保持间距 */
|
margin-bottom: 20px; /* 与分页保持间距 */
|
||||||
padding: 20px 6px 20px 0px;
|
padding: 20px 6px 20px 0px;
|
||||||
|
|
|
||||||
|
|
@ -207,15 +207,47 @@ export default {
|
||||||
|
|
||||||
// 加载树形结构数据,并构建ID-名称映射表
|
// 加载树形结构数据,并构建ID-名称映射表
|
||||||
loadTreeData() {
|
loadTreeData() {
|
||||||
// 调用列表接口时,传递analysisId参数(与sendParams保持一致)
|
const allItems = []; // 用于存储所有页的数据
|
||||||
|
const pageSize = 10; // 每页数量,根据后端接口定义调整
|
||||||
|
let currentPage = 1; // 当前页码
|
||||||
|
|
||||||
|
// 定义一个递归函数来获取每一页的数据
|
||||||
|
const fetchPage = () => {
|
||||||
listAnalysisLabelItem({
|
listAnalysisLabelItem({
|
||||||
analysisId: this.tableSendParams.analysisId
|
analysisId: this.tableSendParams.analysisId,
|
||||||
|
pageNum: currentPage,
|
||||||
|
pageSize: pageSize
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.treeData = this.buildTree(res.rows)
|
const { rows, total } = res;
|
||||||
this.buildLabelItemMap(res.rows) // 构建映射表
|
|
||||||
|
// 将当前页的数据追加到总数组
|
||||||
|
if (rows && rows.length > 0) {
|
||||||
|
allItems.push(...rows);
|
||||||
}
|
}
|
||||||
})
|
|
||||||
|
// 计算总页数
|
||||||
|
const totalPages = Math.ceil(total / pageSize);
|
||||||
|
|
||||||
|
// 如果当前页不是最后一页,则继续获取下一页
|
||||||
|
if (currentPage < totalPages) {
|
||||||
|
currentPage++;
|
||||||
|
fetchPage(); // 递归调用,获取下一页
|
||||||
|
} else {
|
||||||
|
// 所有页都获取完毕,构建树形结构
|
||||||
|
console.log('所有数据获取完毕,共', allItems.length, '条');
|
||||||
|
this.treeData = this.buildTree(allItems);
|
||||||
|
this.buildLabelItemMap(allItems); // 构建映射表
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 出错处理
|
||||||
|
this.$modal.msgError('加载标签项数据失败');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// 开始执行首次获取
|
||||||
|
fetchPage();
|
||||||
},
|
},
|
||||||
|
|
||||||
// 构建树形结构
|
// 构建树形结构
|
||||||
|
|
|
||||||
|
|
@ -407,10 +407,10 @@ export default {
|
||||||
analysisLabelItemId: this.type === 'edit' ? this.formData.analysisLabelItemId : ''
|
analysisLabelItemId: this.type === 'edit' ? this.formData.analysisLabelItemId : ''
|
||||||
};
|
};
|
||||||
const uniqueRes = await checkLabelItemNameUnique(uniqueParams);
|
const uniqueRes = await checkLabelItemNameUnique(uniqueParams);
|
||||||
if (uniqueRes.data > 0) {
|
// if (uniqueRes.data > 0) {
|
||||||
this.$message.error('当前标签组下标签名称已存在');
|
// this.$message.error('当前标签组下标签名称已存在');
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (this.type === 'add') {
|
if (this.type === 'add') {
|
||||||
await addAnalysisLabelItem(this.formData);
|
await addAnalysisLabelItem(this.formData);
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -136,6 +136,8 @@ export default {
|
||||||
this.$refs.analysisLabelRef.validate()
|
this.$refs.analysisLabelRef.validate()
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
console.log('ProjectFileData',projectFileData)
|
||||||
|
|
||||||
// 2. 初始化提交数据
|
// 2. 初始化提交数据
|
||||||
const formData = {
|
const formData = {
|
||||||
...basicData,
|
...basicData,
|
||||||
|
|
@ -147,16 +149,20 @@ export default {
|
||||||
delFiles: [] // 统一存储所有需要删除的文件路径
|
delFiles: [] // 统一存储所有需要删除的文件路径
|
||||||
};
|
};
|
||||||
|
|
||||||
// --- 新增逻辑:处理文件和删除列表 ---
|
|
||||||
|
|
||||||
// 3. 处理项目文件 (ProjectFile)
|
// 3. 处理项目文件 (ProjectFile)
|
||||||
projectFileData.forEach(tab => {
|
projectFileData.forEach(tab => {
|
||||||
// 3.1 处理上传的文件,为每个文件添加 compositionType
|
// 3.1 处理上传的文件,为每个文件添加 compositionType
|
||||||
if (tab.fileList && tab.fileList.length > 0) {
|
if (tab.fileList && tab.fileList.length > 0) {
|
||||||
const processedFiles = tab.fileList.map(file => {
|
const processedFiles = tab.fileList.map(file => {
|
||||||
// 提取 fileRes 对象
|
// 提取 fileRes 对象
|
||||||
const fileRes = file.response?.fileRes || {};
|
const fileRes = file.response?.fileRes; // 如果不存在,fileRes 将是 undefined
|
||||||
// 返回一个合并后的新对象,确保 compositionType 被正确添加
|
|
||||||
|
// 如果 fileRes 不存在,则返回 null,后续的 filter 会将其过滤掉
|
||||||
|
if (!fileRes) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果 fileRes 存在,则返回组装后的完整对象
|
||||||
return {
|
return {
|
||||||
...fileRes,
|
...fileRes,
|
||||||
businessType: 'project_file',
|
businessType: 'project_file',
|
||||||
|
|
@ -164,8 +170,10 @@ export default {
|
||||||
compositionFileType: file.compositionFileType,
|
compositionFileType: file.compositionFileType,
|
||||||
compositionType: tab.compositionType, // <-- 核心:添加 Tab 的 compositionType
|
compositionType: tab.compositionType, // <-- 核心:添加 Tab 的 compositionType
|
||||||
};
|
};
|
||||||
}).filter(Boolean); // 过滤掉可能的无效数据
|
}).filter(Boolean); // 过滤掉前面 map 中返回的 null 值
|
||||||
|
|
||||||
|
// console.log('processedFiles', ...processedFiles); // 展开语法在文件多时可能会卡,建议直接打印数组
|
||||||
|
console.log('processedFiles', processedFiles);
|
||||||
formData.files.push(...processedFiles);
|
formData.files.push(...processedFiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -180,7 +188,14 @@ export default {
|
||||||
// 4.1 处理上传的文件,为每个文件添加 compositionType
|
// 4.1 处理上传的文件,为每个文件添加 compositionType
|
||||||
if (tab.fileList && tab.fileList.length > 0) {
|
if (tab.fileList && tab.fileList.length > 0) {
|
||||||
const processedFiles = tab.fileList.map(file => {
|
const processedFiles = tab.fileList.map(file => {
|
||||||
const fileRes = file.response?.fileRes || {};
|
const fileRes = file.response?.fileRes; // 如果不存在,fileRes 将是 undefined
|
||||||
|
|
||||||
|
// 如果 fileRes 不存在,则返回 null,后续的 filter 会将其过滤掉
|
||||||
|
if (!fileRes) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果 fileRes 存在,则返回组装后的完整对象
|
||||||
return {
|
return {
|
||||||
...fileRes,
|
...fileRes,
|
||||||
businessType: 'section_file',
|
businessType: 'section_file',
|
||||||
|
|
@ -188,8 +203,9 @@ export default {
|
||||||
compositionFileType: file.compositionFileType,
|
compositionFileType: file.compositionFileType,
|
||||||
compositionType: tab.compositionType, // <-- 核心:添加 Tab 的 compositionType
|
compositionType: tab.compositionType, // <-- 核心:添加 Tab 的 compositionType
|
||||||
};
|
};
|
||||||
}).filter(Boolean);
|
}).filter(Boolean); // 过滤掉前面 map 中返回的 null 值
|
||||||
console.log('123123123',processedFiles)
|
|
||||||
|
// console.log('123123123', processedFiles);
|
||||||
formData.files.push(...processedFiles);
|
formData.files.push(...processedFiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -214,6 +230,7 @@ export default {
|
||||||
|
|
||||||
// 6. 调用接口保存
|
// 6. 调用接口保存
|
||||||
if (this.type === 'add') {
|
if (this.type === 'add') {
|
||||||
|
console.log('formData',formData)
|
||||||
await addTemplateInfo(formData);
|
await addTemplateInfo(formData);
|
||||||
} else {
|
} else {
|
||||||
console.log('12345678',formData)
|
console.log('12345678',formData)
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 核心修改:添加 @tab-click 事件监听 -->
|
|
||||||
<el-tabs
|
<el-tabs
|
||||||
v-model="activeTabIndex"
|
v-model="activeTabIndex"
|
||||||
type="card"
|
type="card"
|
||||||
|
|
@ -112,7 +111,6 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tabFiles: [],
|
|
||||||
uploadType: 'doc、docx、pdf、xls、xlsx、wps',
|
uploadType: 'doc、docx、pdf、xls、xlsx、wps',
|
||||||
maxFileTips: '50MB',
|
maxFileTips: '50MB',
|
||||||
fileUploadRule: { fileUploadType: 'project_file', suffix: 'template' },
|
fileUploadRule: { fileUploadType: 'project_file', suffix: 'template' },
|
||||||
|
|
@ -178,8 +176,10 @@ export default {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.fileTabs.splice(index, 1)
|
this.fileTabs.splice(index, 1)
|
||||||
|
// 如果删除的是当前激活的tab,需要重新设置激活态
|
||||||
if (this.activeTabIndex === index.toString()) {
|
if (this.activeTabIndex === index.toString()) {
|
||||||
this.activeTabIndex = '0'
|
// 激活最后一个tab,如果删除后还有的话
|
||||||
|
this.activeTabIndex = this.fileTabs.length > 0 ? (this.fileTabs.length - 1).toString() : '0';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -222,17 +222,15 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// === 核心修改:新增的 tab 切换处理方法 ===
|
// 切换Tab时不再执行任何操作
|
||||||
handleTabChange(tab, event) {
|
handleTabChange(tab, event) {
|
||||||
// tab.index 是当前被点击的 tab 的索引
|
// 可以保留日志用于调试
|
||||||
const index = tab.index;
|
const index = tab.index;
|
||||||
console.log(`切换到了第 ${index + 1} 个 tab`);
|
console.log(`切换到了第 ${index + 1} 个 tab`);
|
||||||
this.setFormData(this.tabFiles)
|
|
||||||
},
|
},
|
||||||
|
|
||||||
setFormData(projectFiles) {
|
setFormData(projectFiles) {
|
||||||
this.tabFiles = projectFiles
|
// 直接清空并重建 fileTabs
|
||||||
// 1. 清空旧的 tabs,准备接收新数据
|
|
||||||
this.fileTabs = [];
|
this.fileTabs = [];
|
||||||
|
|
||||||
if (!projectFiles || projectFiles.length === 0) {
|
if (!projectFiles || projectFiles.length === 0) {
|
||||||
|
|
@ -249,7 +247,7 @@ export default {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2. 根据传入的数据,创建新的 tabs
|
// 根据传入的数据,创建新的 tabs
|
||||||
projectFiles.forEach((file) => {
|
projectFiles.forEach((file) => {
|
||||||
const formattedFile = {
|
const formattedFile = {
|
||||||
name: file.fileName || file.name,
|
name: file.fileName || file.name,
|
||||||
|
|
@ -263,9 +261,6 @@ export default {
|
||||||
compositionFileType: file.compositionFileType || '',
|
compositionFileType: file.compositionFileType || '',
|
||||||
compositionType: '1',
|
compositionType: '1',
|
||||||
businessType: 'project_file',
|
businessType: 'project_file',
|
||||||
response: {
|
|
||||||
fileRes: file
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.fileTabs.push({
|
this.fileTabs.push({
|
||||||
|
|
@ -279,7 +274,7 @@ export default {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
this.activeTabIndex = '0';
|
this.activeTabIndex = projectFiles.length > 0 ? '0' : '0';
|
||||||
},
|
},
|
||||||
|
|
||||||
validate() {
|
validate() {
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,6 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tabFiles: [],
|
|
||||||
uploadType: 'doc、docx、pdf、xls、xlsx、wps',
|
uploadType: 'doc、docx、pdf、xls、xlsx、wps',
|
||||||
maxFileTips: '50MB',
|
maxFileTips: '50MB',
|
||||||
fileUploadRule: { fileUploadType: 'section_file', suffix: 'template' },
|
fileUploadRule: { fileUploadType: 'section_file', suffix: 'template' },
|
||||||
|
|
@ -178,8 +177,9 @@ export default {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.fileTabs.splice(index, 1)
|
this.fileTabs.splice(index, 1)
|
||||||
|
// 如果删除的是当前激活的tab,需要重新设置激活态
|
||||||
if (this.activeTabIndex === index.toString()) {
|
if (this.activeTabIndex === index.toString()) {
|
||||||
this.activeTabIndex = '0'
|
this.activeTabIndex = this.fileTabs.length > 0 ? (this.fileTabs.length - 1).toString() : '0';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -223,16 +223,16 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 切换Tab时不再执行任何操作
|
||||||
handleTabChange(tab, event) {
|
handleTabChange(tab, event) {
|
||||||
// tab.index 是当前被点击的 tab 的索引
|
// 可以保留日志用于调试
|
||||||
const index = tab.index;
|
const index = tab.index;
|
||||||
console.log(`切换到了第 ${index + 1} 个 tab`);
|
console.log(`切换到了第 ${index + 1} 个 tab`);
|
||||||
this.setFormData(this.tabFiles)
|
|
||||||
},
|
},
|
||||||
|
|
||||||
setFormData(sectionFiles) {
|
setFormData(sectionFiles) {
|
||||||
this.tabFiles = sectionFiles
|
// 直接清空并重建 fileTabs
|
||||||
this.fileTabs = []
|
this.fileTabs = [];
|
||||||
|
|
||||||
if (!sectionFiles || sectionFiles.length === 0) {
|
if (!sectionFiles || sectionFiles.length === 0) {
|
||||||
this.fileTabs.push({
|
this.fileTabs.push({
|
||||||
|
|
@ -244,8 +244,8 @@ export default {
|
||||||
delFileList: []
|
delFileList: []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.activeTabIndex = '0'
|
this.activeTabIndex = '0';
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
sectionFiles.forEach((file) => {
|
sectionFiles.forEach((file) => {
|
||||||
|
|
@ -261,10 +261,6 @@ export default {
|
||||||
compositionFileType: file.compositionFileType || '',
|
compositionFileType: file.compositionFileType || '',
|
||||||
compositionType: '2',
|
compositionType: '2',
|
||||||
businessType: 'section_file',
|
businessType: 'section_file',
|
||||||
// 核心修改:添加 response 属性,与 ProjectFile 组件保持一致
|
|
||||||
response: {
|
|
||||||
fileRes: file
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.fileTabs.push({
|
this.fileTabs.push({
|
||||||
|
|
@ -278,7 +274,7 @@ export default {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
this.activeTabIndex = '0'
|
this.activeTabIndex = sectionFiles.length > 0 ? '0' : '0';
|
||||||
},
|
},
|
||||||
|
|
||||||
validate() {
|
validate() {
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,8 @@
|
||||||
<template slot="useState" slot-scope="{ data }">
|
<template slot="useState" slot-scope="{ data }">
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="data.useState"
|
v-model="data.useState"
|
||||||
:active-value="'ON'"
|
:active-value="'0'"
|
||||||
:inactive-value="'OFF'"
|
:inactive-value="'1'"
|
||||||
@change="handleStateChange(data)"
|
@change="handleStateChange(data)"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -53,9 +53,9 @@
|
||||||
解析规则
|
解析规则
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<!-- 更多下拉菜单:调整样式,增加菜单项 -->
|
<!-- 更多下拉菜单:调整样式与解析规则按钮保持一致 -->
|
||||||
<el-dropdown trigger="click" class="more-dropdown">
|
<el-dropdown trigger="click" class="more-dropdown">
|
||||||
<span class="el-dropdown-link action-btn" style="color: #666;">
|
<span class="el-dropdown-link action-btn" style="color: #1F72EA;">
|
||||||
更多<i class="el-icon-arrow-down el-icon--right"></i>
|
更多<i class="el-icon-arrow-down el-icon--right"></i>
|
||||||
</span>
|
</span>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
|
|
@ -65,7 +65,7 @@
|
||||||
@click.native="handleUpdate(data)"
|
@click.native="handleUpdate(data)"
|
||||||
class="dropdown-item"
|
class="dropdown-item"
|
||||||
>
|
>
|
||||||
<i class="el-icon-edit" style="margin-right: 6px;"></i>编辑
|
编辑
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<!-- 复制 -->
|
<!-- 复制 -->
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
|
|
@ -73,18 +73,18 @@
|
||||||
@click.native="handleCopy(data)"
|
@click.native="handleCopy(data)"
|
||||||
class="dropdown-item"
|
class="dropdown-item"
|
||||||
>
|
>
|
||||||
<i class="el-icon-copy" style="margin-right: 6px;"></i>复制
|
复制
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<!-- 发布 -->
|
<!-- 发布 -->
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
v-hasPermi="['template:info:publish']"
|
v-hasPermi="['template:info:publish']"
|
||||||
@click.native="handlePublish(data)"
|
@click.native="handlePublish(data)"
|
||||||
class="dropdown-item"
|
class="dropdown-item"
|
||||||
:style="{ color: data.useState === 'ON' ? '#999' : '#1F72EA' }"
|
:style="{ color: data.useState === '0' ? '#999' : '#1F72EA' }"
|
||||||
:disabled="data.useState === 'ON'"
|
:disabled="data.useState === '0'"
|
||||||
>
|
>
|
||||||
<i class="el-icon-upload2" style="margin-right: 6px;"></i>
|
|
||||||
{{ data.useState === 'ON' ? '已发布' : '发布' }}
|
{{ data.useState === '0' ? '已发布' : '发布' }}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<!-- 删除 -->
|
<!-- 删除 -->
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
|
|
@ -93,7 +93,7 @@
|
||||||
class="dropdown-item"
|
class="dropdown-item"
|
||||||
style="color: #DB3E29;"
|
style="color: #DB3E29;"
|
||||||
>
|
>
|
||||||
<i class="el-icon-delete" style="margin-right: 6px;"></i>删除
|
删除
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
|
|
@ -221,7 +221,7 @@ export default {
|
||||||
|
|
||||||
// 发布模板
|
// 发布模板
|
||||||
handlePublish(data) {
|
handlePublish(data) {
|
||||||
if (data.useState === 'ON') {
|
if (data.useState === '0') {
|
||||||
this.$modal.msgInfo('该模板已发布');
|
this.$modal.msgInfo('该模板已发布');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -229,7 +229,7 @@ export default {
|
||||||
.then(() => {
|
.then(() => {
|
||||||
publishTemplateInfo({
|
publishTemplateInfo({
|
||||||
templateId: encryptWithSM4(data.templateId.toString()),
|
templateId: encryptWithSM4(data.templateId.toString()),
|
||||||
useState: 'ON' // 发布状态设为启用
|
useState: '0' // 发布状态设为启用
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.$modal.msgSuccess('发布成功');
|
this.$modal.msgSuccess('发布成功');
|
||||||
|
|
@ -257,6 +257,7 @@ export default {
|
||||||
handleStateChange(row) {
|
handleStateChange(row) {
|
||||||
const originalState = row.useState;
|
const originalState = row.useState;
|
||||||
const params = { ...row, useState: row.useState, templateId: row.templateId };
|
const params = { ...row, useState: row.useState, templateId: row.templateId };
|
||||||
|
console.log('params',params)
|
||||||
updateTemplateInfo(params)
|
updateTemplateInfo(params)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
|
@ -351,17 +352,17 @@ export default {
|
||||||
|
|
||||||
.action-btn {
|
.action-btn {
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
color: #666;
|
color: #1F72EA; /* 改为与解析规则相同的蓝色 */
|
||||||
|
font-size: 14px;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.el-dropdown-link {
|
/* 统一的hover效果 */
|
||||||
cursor: pointer;
|
|
||||||
/* 与解析规则按钮保持一致的hover样式 */
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: #1F72EA;
|
color: #4A8BFF; /* 稍浅的蓝色 */
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -370,17 +371,35 @@ export default {
|
||||||
::v-deep .more-dropdown {
|
::v-deep .more-dropdown {
|
||||||
.el-dropdown-menu {
|
.el-dropdown-menu {
|
||||||
min-width: 140px; /* 固定下拉框宽度 */
|
min-width: 140px; /* 固定下拉框宽度 */
|
||||||
|
border-radius: 4px;
|
||||||
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-item {
|
.dropdown-item {
|
||||||
padding: 6px 16px; /* 调整内边距 */
|
padding: 8px 16px;
|
||||||
transition: background-color 0.2s;
|
font-size: 14px;
|
||||||
|
transition: all 0.2s;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: #f5f7fa; /* hover背景色 */
|
background-color: #f5f7fa;
|
||||||
|
color: #1F72EA;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 确保下拉箭头颜色一致 */
|
||||||
|
.el-dropdown-link {
|
||||||
|
color: #1F72EA;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: #4A8BFF;
|
||||||
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-dropdown-link {
|
.el-dropdown-link {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue