<template>
|
<view class="page-container">
|
<!-- 检验项目表单卡片 -->
|
<view class="form-card">
|
<view class="form-title">
|
<view class="title-icon">📋</view>
|
<span>检验项目详情</span>
|
</view>
|
<view class="form-container">
|
<!-- 基本信息模块 -->
|
<view class="form-section">
|
<view class="section-title">基本信息</view>
|
<view class="form-grid">
|
<view class="form-group">
|
<label class="form-label">项目名称:</label>
|
<input v-model="formData.fcheckItem" class="form-input" disabled="true" type="text"/>
|
</view>
|
<view class="form-group">
|
<label class="form-label">规格要求:</label>
|
<input v-model="formData.fspecRequ" class="form-input" disabled="true" type="text"/>
|
</view>
|
<view class="form-group">
|
<label class="form-label">检验方法:</label>
|
<input v-model="formData.inspectionMethod" class="form-input" disabled="true" type="text"/>
|
</view>
|
<view class="form-group">
|
<label class="form-label">检验工具:</label>
|
<input v-model="formData.fcheckTool" class="form-input" disabled="true" type="text"/>
|
</view>
|
</view>
|
</view>
|
|
<!-- 三个模块并列容器 -->
|
<view class="three-modules-container">
|
<!-- 检验参数模块 -->
|
<view class="module-item">
|
<view class="module-header">
|
<text class="module-title">检验参数</text>
|
</view>
|
<view class="module-content">
|
<view class="form-grid">
|
<view class="form-group">
|
<label class="form-label">检验数:</label>
|
<input v-model="formData.checkQyt" class="form-input" disabled="true" type="text"/>
|
</view>
|
<view class="form-group">
|
<label class="form-label">检验标准编码:</label>
|
<input v-model="formData.sampleSizeNo" class="form-input" disabled="true"
|
type="text"/>
|
</view>
|
<view class="form-group">
|
<label class="form-label">检验水平:</label>
|
<input v-model="formData.fcheckLevel" class="form-input" disabled="true"
|
type="text"/>
|
</view>
|
<view class="form-group">
|
<label class="form-label">接收水平:</label>
|
<input v-model="formData.facLevel" class="form-input" disabled="true" type="text"/>
|
</view>
|
</view>
|
</view>
|
</view>
|
|
<!-- 数值标准模块 -->
|
<view class="module-item">
|
<view class="module-header">
|
<text class="module-title">数值标准</text>
|
</view>
|
<view class="module-content">
|
<view class="form-grid">
|
<view class="form-group">
|
<label class="form-label">下限:</label>
|
<input v-model="formData.fdownAllow" class="form-input" disabled="true"
|
type="text"/>
|
</view>
|
<view class="form-group">
|
<label class="form-label">标准值:</label>
|
<input v-model="formData.fstand" class="form-input" disabled="true" type="text"/>
|
</view>
|
<view class="form-group">
|
<label class="form-label">上限:</label>
|
<input v-model="formData.fupAllow" class="form-input" disabled="true" type="text"/>
|
</view>
|
</view>
|
</view>
|
</view>
|
|
<!-- 判定标准模块 -->
|
<view class="module-item">
|
<view class="module-header">
|
<text class="module-title">判定标准</text>
|
</view>
|
<view class="module-content">
|
<view class="form-grid">
|
<view class="form-group">
|
<label class="form-label">AC数:</label>
|
<input v-model="formData.facQty" class="form-input" disabled="true" type="text"/>
|
</view>
|
<view class="form-group">
|
<label class="form-label">RE数:</label>
|
<input v-model="formData.freQty" class="form-input" disabled="true" type="text"/>
|
</view>
|
<view class="form-group">
|
<label class="form-label">不合格数:</label>
|
<input v-model="formData.fngQty" class="form-input" disabled="true" type="text"/>
|
</view>
|
<view class="form-group">
|
<label class="form-label">预览结果:</label>
|
<input v-model="formData.fcheckResu" class="form-input" disabled="true" type="text"/>
|
</view>
|
</view>
|
</view>
|
</view>
|
</view>
|
|
<!-- 备注信息模块 -->
|
<!-- <view class="form-section">
|
<view class="section-title">备注信息</view>
|
<view class="form-grid">
|
<view class="form-group">
|
<label class="form-label">不合格描述:</label>
|
<input class="form-input" disabled="true" type="text" v-model="formData.remarks" />
|
</view>
|
</view>
|
</view> -->
|
|
<!-- 检测结果区域 - 只在有上下限时显示 -->
|
<view v-if="Number(formData.fupAllow) && Number(formData.fdownAllow)" class="form-section">
|
<view class="section-title">检测结果</view>
|
<view class="form-grid">
|
<view class="form-group">
|
<label class="form-label">检测结果:</label>
|
<input v-model="fcheckResuK" class="form-input" type="number"
|
placeholder="请输入检测值"/>
|
</view>
|
</view>
|
</view>
|
|
<!-- 有上下限时显示保存按钮,无上下限时自动保存 -->
|
<button v-if="tableData.length < formData.checkQyt && Number(formData.fupAllow) && Number(formData.fdownAllow)"
|
:class="['action-btn', 'btn-primary', { 'btn-loading': isLoading }]" :disabled="isLoading" @click="submit">
|
{{ isLoading ? '保存中...' : '保存' }}
|
</button>
|
</view>
|
</view>
|
|
<!-- 检验结果表格卡片 -->
|
<view class="table-card">
|
<view class="table-title">
|
<view class="title-icon">📊</view>
|
<span>检验结果列表</span>
|
</view>
|
<view class="list-container">
|
<uni-table ref="table" border emptyText="暂无更多数据">
|
<uni-tr>
|
<uni-th align="center" class="th" width="80">编号</uni-th>
|
<uni-th align="center" class="th" width="120">判定结果</uni-th>
|
<uni-th v-if="Number(formData.fupAllow) && Number(formData.fdownAllow)" align="center" class="th" width="100">检验结果</uni-th>
|
<uni-th align="center" class="th" width="120">操作</uni-th>
|
</uni-tr>
|
<uni-tr v-for="(item, index) in tableData" :key="index" :class="{ 'hover-effect': isHoveringRow === index }"
|
class="table-row" @mouseenter="isHoveringRow = index"
|
@mouseleave="isHoveringRow = -1">
|
<uni-td align="center">
|
{{ index + 1 }}
|
</uni-td>
|
<uni-td align="center">
|
<span v-if="item.fstand === '√'" class="result-badge pass">合格</span>
|
<span v-else-if="item.fstand === '×'" class="result-badge fail">不合格</span>
|
<span v-else class="result-badge pending">{{ item.fstand || '未判定' }}</span>
|
</uni-td>
|
<uni-td v-if="Number(formData.fupAllow) && Number(formData.fdownAllow)" align="center">
|
<view class="result-display">
|
<!-- 有上下限时显示实际数值 -->
|
<span v-if="item.fcheckResu" class="result-number">
|
{{ item.fcheckResu }}
|
</span>
|
<!-- 其他情况 -->
|
<span v-else class="result-badge pending">
|
未检验
|
</span>
|
</view>
|
</uni-td>
|
<uni-td align="center">
|
<view class="action-group">
|
<button v-if="isNumber"
|
:class="['action-btn', 'btn-sm', 'btn-warn', { 'btn-disabled': isLoading }]" :disabled="isLoading" @click="toDetail(item)">
|
{{ isLoading ? '处理中...' : '修改' }}
|
</button>
|
<button v-if="!isNumber"
|
:class="['action-btn', 'btn-sm', 'btn-warn', { 'btn-disabled': isLoading }]" :disabled="isLoading" @click="numberEdit(item)">
|
{{ isLoading ? '处理中...' : (item.fcheckResu === '1' || item.fcheckResu === 'OK' ? '改为不合格' : '改为合格') }}
|
</button>
|
</view>
|
</uni-td>
|
</uni-tr>
|
</uni-table>
|
</view>
|
</view>
|
|
<!-- 操作按钮 -->
|
<view class="action-buttons">
|
<view class="button-group">
|
<button :class="['action-btn', 'btn-warn', { 'btn-disabled': isLoading }]" :disabled="isLoading"
|
@click="saveRemarks">
|
{{ isLoading ? '处理中...' : '添加不合格描述' }}
|
</button>
|
</view>
|
</view>
|
|
<!-- 修改检验结果弹出层 -->
|
<view v-if="showPopup" class="overlay active">
|
<view :class="{ 'popup-scale': isPopupAnimated }" class="popup" @animationend="isPopupAnimated = false">
|
<view class="popup-header">
|
<h3 class="popup-title">修改检验结果</h3>
|
<view class="close-btn" @click="showPopup = !showPopup">×</view>
|
</view>
|
<form :modelValue="editData">
|
<view class="form-group">
|
<label class="form-label">检验结果:</label>
|
<input v-model="editData.fcheckResu" class="form-input" type="text"/>
|
</view>
|
<view class="button-group">
|
<button :class="['action-btn', 'btn-warn', { 'btn-loading': isEditLoading }]" :disabled="isEditLoading"
|
@click="eidt">
|
{{ isEditLoading ? '修改中...' : '修改' }}
|
</button>
|
<button @click="showPopup = !showPopup">
|
取消
|
</button>
|
</view>
|
</form>
|
</view>
|
</view>
|
|
<!-- 修改不合格描述弹出层 -->
|
<view v-if="remarksPopup" class="overlay active">
|
<view :class="{ 'popup-scale': isPopupAnimated }" class="popup" @animationend="isPopupAnimated = false">
|
<view class="popup-header">
|
<h3 class="popup-title">修改不合格描述</h3>
|
<view class="close-btn" @click="remarksPopup = !remarksPopup">×</view>
|
</view>
|
<form>
|
<view class="form-group">
|
<label class="form-label">不合格描述:</label>
|
<input v-model="remarks" class="form-input" type="text"/>
|
</view>
|
<view class="button-group">
|
<button :class="['action-btn', 'btn-warn', { 'btn-loading': isRemarksLoading }]"
|
:disabled="isRemarksLoading" @click="editRemarks">
|
{{ isRemarksLoading ? '保存中...' : '修改' }}
|
</button>
|
<button @click="remarksPopup = !remarksPopup">
|
取消
|
</button>
|
</view>
|
</form>
|
</view>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
formData: {},
|
releaseNo: "",
|
isNumber: false,
|
checkItem: "",
|
id: 0,
|
gid: 0,
|
billNo: "",
|
showPopup: false,
|
editData: {},
|
tableData: [],
|
remarks: "",
|
remarksPopup: false,
|
fcheckResuK: "",
|
isLoading: false,
|
isEditLoading: false,
|
isRemarksLoading: false,
|
isHoveringRow: -1,
|
isPopupAnimated: false,
|
// 添加刷新计数器
|
refreshCounter: 0,
|
// 添加自动保存执行标记
|
autoSaveExecuted: false
|
};
|
},
|
methods: {
|
submit() {
|
this.isLoading = true;
|
let count = this.formData.checkQyt;
|
let fstand = "√";
|
|
// 检查是否有上下限
|
const hasLimits = Number(this.formData.fupAllow) && Number(this.formData.fdownAllow);
|
|
if (hasLimits) {
|
// 有上下限时,所有输入都按数值处理
|
if (!this.fcheckResuK) {
|
this.$showMessage("请输入检验值");
|
this.isLoading = false;
|
return;
|
}
|
|
// 检查输入是否为有效数值
|
const inputValue = Number(this.fcheckResuK);
|
if (isNaN(inputValue)) {
|
this.$showMessage("请输入有效的数值");
|
this.isLoading = false;
|
return;
|
}
|
|
// 根据上下限判断合格/不合格
|
if (inputValue >= Number(this.formData.fdownAllow) && inputValue <= Number(this.formData.fupAllow)) {
|
fstand = "√";
|
} else {
|
fstand = "×";
|
}
|
count = 1;
|
} else {
|
// 无上下限时,默认设置为合格,不需要用户输入
|
this.formData.isPass = 1;
|
fstand = "√";
|
this.fcheckResuK = "1"; // 自动设置为合格
|
// 确保不会超过检验数
|
count = Math.min(1, this.formData.checkQyt - this.tableData.length);
|
if (count <= 0) {
|
this.$showMessage("检验已完成,无需继续保存");
|
this.isLoading = false;
|
return;
|
}
|
}
|
this.formData.updater = this.$loginInfo.account;
|
this.$post({
|
url: "/MesOqcItemsDetect02/SetQSItemDetail",
|
data: {
|
mainId: this.formData.id,
|
releaseNo: this.formData.releaseNo,
|
fstand: fstand,
|
fcheckResu: this.fcheckResuK,
|
LastupdateBy: this.$loginInfo.account,
|
count: count
|
}
|
}).then((res) => {
|
this.$showMessage("保存成功");
|
// 添加小延迟确保服务器处理完成
|
setTimeout(() => {
|
// 先刷新数据,确保显示最新结果
|
this.refreshResult().then(() => {
|
// 数据刷新完成后再清空输入框
|
this.fcheckResuK = "";
|
// 发送刷新事件通知列表页面
|
uni.$emit('refresh-inspection-list');
|
// 通知父页面刷新检验进度
|
uni.$emit('refresh-inspection-progress', {
|
mainId: this.formData.id,
|
releaseNo: this.formData.releaseNo
|
});
|
});
|
}, 500);
|
this.isLoading = false;
|
}).catch(() => {
|
this.$showMessage("保存失败,请重试");
|
this.isLoading = false;
|
});
|
},
|
refreshResult() {
|
this.isLoading = true;
|
return this.$post({
|
url: "/MesOqcItemsDetect02/getXjDetail02ById",
|
data: {
|
id: this.id
|
}
|
}).then((res) => {
|
this.formData = res.data.tbBillList.itemXj01;
|
this.tableData = res.data.tbBillList.itemXj02s;
|
|
// 调试信息:打印表格数据
|
console.log('刷新后的表格数据:', this.tableData);
|
|
if (this.formData.fupAllow && this.formData.fdownAllow && this.formData.fstand) {
|
this.isNumber = true;
|
} else {
|
this.isNumber = false;
|
}
|
this.isLoading = false;
|
|
// 移除自动保存调用,避免重复执行
|
// this.checkAutoSave();
|
|
return res;
|
}).catch(() => {
|
this.$showMessage("获取数据失败");
|
this.isLoading = false;
|
throw new Error("获取数据失败");
|
});
|
},
|
toDetail(item) {
|
this.showPopup = true;
|
this.editData = {
|
...item
|
};
|
},
|
eidt() {
|
this.isEditLoading = true;
|
if (!this.editData.fcheckResu) {
|
this.$showMessage("请输入检验结果");
|
this.isEditLoading = false;
|
return;
|
}
|
if (this.formData.fcheckResu == this.editData.fcheckResu) {
|
this.$showMessage("修改成功");
|
this.showPopup = false;
|
this.isEditLoading = false;
|
return;
|
}
|
|
let fstand = "√";
|
|
// 检查是否有上下限
|
const hasLimits = this.formData.fupAllow && this.formData.fdownAllow;
|
|
if (hasLimits) {
|
// 有上下限时,所有输入都按数值处理
|
if (!this.editData.fcheckResu) {
|
this.$showMessage("请输入检验值");
|
this.isEditLoading = false;
|
return;
|
}
|
|
// 检查输入是否为有效数值
|
const inputValue = Number(this.editData.fcheckResu);
|
if (isNaN(inputValue)) {
|
this.$showMessage("请输入有效的数值");
|
this.isEditLoading = false;
|
return;
|
}
|
|
// 根据上下限判断合格/不合格
|
if (inputValue >= Number(this.formData.fdownAllow) && inputValue <= Number(this.formData.fupAllow)) {
|
this.editData.isPass = 1;
|
fstand = "√";
|
} else {
|
this.editData.isPass = 0;
|
fstand = "×";
|
}
|
} else {
|
// 无上下限时,只能输入0或1
|
if (!this.editData.fcheckResu) {
|
this.$showMessage("请输入检验结果");
|
this.isEditLoading = false;
|
return;
|
}
|
|
if (this.editData.fcheckResu == 0 || this.editData.fcheckResu == 1) {
|
if (this.editData.fcheckResu == 1) {
|
this.editData.isPass = 1;
|
fstand = "√";
|
} else {
|
this.editData.isPass = 0;
|
fstand = "×";
|
}
|
} else {
|
this.$showMessage("无标准值时,检验结果只能为0或1!");
|
this.isEditLoading = false;
|
return;
|
}
|
}
|
this.editData.updater = this.$loginInfo.account;
|
this.$post({
|
url: "/MesOqcItemsDetect02/UpdateQSItemDetail",
|
data: {
|
id: this.editData.id,
|
mainId: this.formData.id,
|
releaseNo: this.formData.releaseNo,
|
fstand: fstand,
|
fcheckResu: this.editData.fcheckResu,
|
lastupdateBy: this.$loginInfo.account
|
}
|
}).then((res) => {
|
this.showPopup = false;
|
this.$showMessage("修改成功");
|
// 添加小延迟确保服务器处理完成
|
setTimeout(() => {
|
this.refreshResult().then(() => {
|
// 数据刷新完成
|
// 发送刷新事件通知列表页面
|
uni.$emit('refresh-inspection-list');
|
// 通知父页面刷新检验进度
|
uni.$emit('refresh-inspection-progress', {
|
mainId: this.formData.id,
|
releaseNo: this.formData.releaseNo
|
});
|
});
|
}, 500);
|
this.isEditLoading = false;
|
}).catch(() => {
|
this.$showMessage("修改失败,请重试");
|
this.isEditLoading = false;
|
});
|
},
|
numberEdit(item) {
|
this.isLoading = true;
|
let fstand = "√";
|
let fcheckResu = "1";
|
|
// 根据当前状态切换合格/不合格
|
if (item.fcheckResu === "1" || item.fcheckResu === "OK") {
|
// 当前是合格,改为不合格
|
fstand = "×";
|
fcheckResu = "0";
|
} else {
|
// 当前是不合格,改为合格
|
fstand = "√";
|
fcheckResu = "1";
|
}
|
this.$post({
|
url: "/MesOqcItemsDetect02/UpdateQSItemDetail",
|
data: {
|
id: item.id,
|
mainId: this.formData.id,
|
releaseNo: this.formData.releaseNo,
|
fstand: fstand,
|
fcheckResu: fcheckResu,
|
lastupdateBy: this.$loginInfo.account
|
}
|
}).then((res) => {
|
this.$showMessage("修改成功");
|
// 添加小延迟确保服务器处理完成
|
setTimeout(() => {
|
this.refreshResult().then(() => {
|
// 数据刷新完成
|
// 发送刷新事件通知列表页面
|
uni.$emit('refresh-inspection-list');
|
// 通知父页面刷新检验进度
|
uni.$emit('refresh-inspection-progress', {
|
mainId: this.formData.id,
|
releaseNo: this.formData.releaseNo
|
});
|
});
|
}, 500);
|
this.isLoading = false;
|
}).catch(() => {
|
this.$showMessage("修改失败,请重试");
|
this.isLoading = false;
|
});
|
},
|
saveRemarks() {
|
this.remarksPopup = true;
|
this.remarks = this.formData.remarks || "";
|
},
|
editRemarks() {
|
this.isRemarksLoading = true;
|
if (this.remarks) {
|
this.$post({
|
url: "/MesOqcItemsDetect02/saveRemarksPid",
|
data: {
|
pid: this.formData.id,
|
remarks: this.remarks
|
}
|
}).then((res) => {
|
if (res.data.tbBillList > 0) {
|
this.formData.remarks = this.remarks;
|
this.remarksPopup = false;
|
this.$showMessage("保存成功");
|
} else {
|
this.$showMessage("保存失败");
|
}
|
this.isRemarksLoading = false;
|
}).catch(() => {
|
this.$showMessage("保存失败,请重试");
|
this.isRemarksLoading = false;
|
});
|
} else {
|
this.$showMessage("请输入不合格描述");
|
this.isRemarksLoading = false;
|
}
|
},
|
checkAutoSave() {
|
// 检查是否需要自动保存(无上下限时)
|
if (!Number(this.formData.fupAllow) || !Number(this.formData.fdownAllow)) {
|
// 无上下限时,自动保存
|
// 确保不会超过检验数,并且只在页面首次加载时执行
|
if (this.tableData.length < this.formData.checkQyt && this.tableData.length < 10 && !this.autoSaveExecuted) {
|
console.log('自动保存:无上下限值,自动设置为合格,当前检验数:' + this.tableData.length + '/' + this.formData.checkQyt);
|
this.autoSaveExecuted = true; // 标记已执行自动保存
|
this.autoSave();
|
} else if (this.tableData.length >= this.formData.checkQyt) {
|
console.log('检验完成,已达到检验数:' + this.formData.checkQyt);
|
}
|
}
|
},
|
autoSave() {
|
this.isLoading = true;
|
// 计算需要保存的记录数
|
let count = this.formData.checkQyt - this.tableData.length;
|
let fstand = "√";
|
|
// 无上下限时,自动设置为合格
|
this.fcheckResuK = "1";
|
|
this.formData.updater = this.$loginInfo.account;
|
this.$post({
|
url: "/MesOqcItemsDetect02/SetQSItemDetail",
|
data: {
|
mainId: this.formData.id,
|
releaseNo: this.formData.releaseNo,
|
fstand: fstand,
|
fcheckResu: this.fcheckResuK,
|
LastupdateBy: this.$loginInfo.account,
|
count: count
|
}
|
}).then((res) => {
|
this.$showMessage("自动保存成功");
|
// 添加小延迟确保服务器处理完成
|
setTimeout(() => {
|
// 先刷新数据,确保显示最新结果
|
this.refreshResult().then(() => {
|
// 数据刷新完成后再清空输入框
|
this.fcheckResuK = "";
|
// 发送刷新事件通知列表页面
|
uni.$emit('refresh-inspection-list');
|
// 通知父页面刷新检验进度
|
uni.$emit('refresh-inspection-progress', {
|
mainId: this.formData.id,
|
releaseNo: this.formData.releaseNo
|
});
|
// 不再递归调用,避免重复保存
|
// this.checkAutoSave();
|
});
|
}, 500);
|
this.isLoading = false;
|
}).catch(() => {
|
this.$showMessage("自动保存失败,请重试");
|
this.isLoading = false;
|
});
|
}
|
},
|
onLoad(options) {
|
let params = options;
|
this.id = params["mainId"];
|
this.releaseNo = params["releaseNo"];
|
this.refreshResult().then(() => {
|
// 检查是否需要自动保存(无上下限时)
|
this.checkAutoSave();
|
});
|
},
|
onShow() {
|
// 当页面显示时刷新数据,确保从详情页返回时数据是最新的
|
if (this.id) {
|
this.refreshResult();
|
}
|
},
|
// 监听页面通信事件
|
onUnload() {
|
// 页面卸载时移除事件监听
|
uni.$off('refresh-inspection-list');
|
},
|
mounted() {
|
// 监听来自详情页的刷新事件
|
uni.$on('refresh-inspection-list', () => {
|
if (this.id) {
|
this.refreshResult();
|
}
|
});
|
}
|
};
|
</script>
|
|
<style>
|
/* 页面容器 */
|
.page-container {
|
padding: 20px;
|
background-color: #f5f5f5;
|
min-height: 100vh;
|
}
|
|
/* 表单卡片 */
|
.form-card {
|
background-color: #fff;
|
border-radius: 12px;
|
padding: 20px;
|
margin-bottom: 20px;
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
}
|
|
/* 表单标题 */
|
.form-title {
|
display: flex;
|
align-items: center;
|
font-size: 18px;
|
color: #333;
|
margin-bottom: 15px;
|
}
|
|
.title-icon {
|
font-size: 22px;
|
margin-right: 10px;
|
}
|
|
/* 表单容器 */
|
.form-container {
|
padding-top: 10px;
|
}
|
|
/* 表单模块标题 */
|
.form-section {
|
margin-bottom: 20px;
|
}
|
|
.section-title {
|
font-size: 16px;
|
font-weight: 600;
|
color: #333;
|
margin-bottom: 10px;
|
}
|
|
/* 表格布局 */
|
.form-grid {
|
display: grid;
|
grid-template-columns: 1fr 1fr;
|
gap: 15px;
|
}
|
|
/* 表单项 */
|
.form-group {
|
display: flex;
|
align-items: center;
|
}
|
|
.form-label {
|
width: 130px;
|
color: #333;
|
font-size: 14px;
|
font-weight: 500;
|
}
|
|
.form-input {
|
flex: 1;
|
height: 40px;
|
padding: 0 10px;
|
border: 1px solid #e0e0e0;
|
border-radius: 8px;
|
background-color: #f8f8f8;
|
color: #666;
|
font-size: 14px;
|
}
|
|
.form-input:disabled {
|
background-color: #e9e9e9;
|
}
|
|
.form-input:focus {
|
border-color: #007AFF;
|
outline: none;
|
}
|
|
/* 检验结果区域 */
|
.tip-group {
|
margin-top: 15px;
|
}
|
|
.tip-box {
|
display: flex;
|
align-items: center;
|
background-color: #fff5d1;
|
padding: 10px;
|
border-radius: 8px;
|
border: 1px solid #f0e0a7;
|
}
|
|
.tip-icon {
|
font-size: 20px;
|
color: #f39c12;
|
margin-right: 10px;
|
}
|
|
.tip-text {
|
font-size: 14px;
|
color: #333;
|
}
|
|
.highlight {
|
color: #007AFF;
|
font-weight: 600;
|
}
|
|
/* 按钮样式 */
|
.action-btn {
|
width: 100%;
|
padding: 12px;
|
border-radius: 8px;
|
border: none;
|
color: #fff;
|
font-size: 16px;
|
font-weight: 500;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
cursor: pointer;
|
transition: background-color 0.3s ease;
|
}
|
|
.btn-primary {
|
background-color: #007AFF;
|
}
|
|
.btn-primary:hover {
|
background-color: #0056CC;
|
}
|
|
.btn-warn {
|
background-color: #f1b344;
|
}
|
|
.btn-warn:hover {
|
background-color: #e6a135;
|
}
|
|
.btn-disabled {
|
background-color: #c0c0c0;
|
cursor: not-allowed;
|
}
|
|
/* 弹出层样式 */
|
.overlay {
|
position: fixed;
|
top: 0;
|
left: 0;
|
width: 100%;
|
height: 100%;
|
background-color: rgba(0, 0, 0, 0.5);
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
z-index: 1000;
|
opacity: 0;
|
transition: opacity 0.3s ease;
|
}
|
|
.overlay.active {
|
opacity: 1;
|
}
|
|
.popup {
|
background-color: #fff;
|
border-radius: 12px;
|
width: 90%;
|
max-width: 500px;
|
padding: 20px;
|
transform: scale(0.8);
|
transition: transform 0.3s ease;
|
}
|
|
.popup-scale {
|
transform: scale(1);
|
}
|
|
.popup-header {
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
}
|
|
.popup-title {
|
font-size: 16px;
|
font-weight: 600;
|
color: #333;
|
}
|
|
.close-btn {
|
font-size: 20px;
|
color: #333;
|
cursor: pointer;
|
}
|
|
/* 操作按钮组 */
|
.button-group {
|
display: flex;
|
justify-content: space-between;
|
margin-top: 20px;
|
}
|
|
.button-group button {
|
width: 48%;
|
padding: 10px;
|
border-radius: 8px;
|
border: none;
|
font-size: 14px;
|
font-weight: 500;
|
cursor: pointer;
|
}
|
|
/* 检验结果表格卡片 */
|
.table-card {
|
background-color: #fff;
|
border-radius: 12px;
|
padding: 20px;
|
margin-bottom: 20px;
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
}
|
|
/* 表格标题 */
|
.table-title {
|
display: flex;
|
align-items: center;
|
font-size: 16px;
|
color: #333;
|
font-weight: 600;
|
margin-bottom: 15px;
|
}
|
|
.title-icon {
|
font-size: 22px;
|
margin-right: 10px;
|
}
|
|
/* 表格样式 */
|
.uni-table {
|
width: 100%;
|
border-collapse: collapse;
|
}
|
|
.uni-th,
|
.uni-td {
|
padding: 12px;
|
text-align: center;
|
}
|
|
.uni-th {
|
background-color: #f5f5f5;
|
font-size: 14px;
|
color: #666;
|
font-weight: 500;
|
}
|
|
.table-row {
|
background-color: #fff;
|
border-bottom: 1px solid #e0e0e0;
|
}
|
|
.table-row:hover {
|
background-color: #f9f9f9;
|
}
|
|
.result-badge {
|
padding: 5px 12px;
|
font-size: 12px;
|
border-radius: 10px;
|
color: #fff;
|
display: inline-block;
|
}
|
|
.pass {
|
background-color: #28a745;
|
}
|
|
.fail {
|
background-color: #dc3545;
|
}
|
|
.pending {
|
background-color: #f1b344;
|
}
|
|
.action-group {
|
display: flex;
|
gap: 10px;
|
}
|
|
.action-btn.btn-sm {
|
width: auto;
|
padding: 6px 12px;
|
font-size: 12px;
|
}
|
|
/* 提示信息 */
|
.hover-effect:hover {
|
background-color: #f9f9f9;
|
}
|
|
.btn-sm {
|
font-size: 14px;
|
}
|
|
.btn-loading {
|
background-color: #c0c0c0;
|
cursor: not-allowed;
|
}
|
|
/* 三个模块并列容器样式 */
|
.three-modules-container {
|
display: flex;
|
flex-direction: column;
|
gap: 15px;
|
margin-bottom: 20px;
|
}
|
|
/* 模块项样式 */
|
.module-item {
|
background-color: #f8f9fa;
|
border-radius: 8px;
|
padding: 15px;
|
border: 1px solid #e0e0e0;
|
}
|
|
.module-header {
|
border-bottom: 1px solid #d0d0d0;
|
padding-bottom: 8px;
|
margin-bottom: 12px;
|
}
|
|
.module-title {
|
font-size: 15px;
|
font-weight: 600;
|
color: #333;
|
}
|
|
/* 检验结果显示样式 */
|
.result-display {
|
display: flex;
|
flex-direction: column;
|
align-items: center;
|
gap: 5px;
|
}
|
|
.result-badge {
|
padding: 5px 12px;
|
font-size: 12px;
|
border-radius: 10px;
|
color: #fff;
|
display: inline-block;
|
}
|
|
.result-number {
|
font-size: 16px;
|
font-weight: 600;
|
color: #333;
|
background-color: #f8f9fa;
|
padding: 8px 12px;
|
border-radius: 8px;
|
border: 2px solid #e0e0e0;
|
display: inline-block;
|
min-width: 40px;
|
text-align: center;
|
}
|
|
/* 手机屏幕优化 */
|
@media (max-width: 768px) {
|
.page-container {
|
padding: 10px;
|
}
|
|
.form-card, .table-card {
|
padding: 15px;
|
border-radius: 8px;
|
}
|
|
.form-grid {
|
grid-template-columns: 1fr;
|
gap: 12px;
|
}
|
|
.form-group {
|
flex-direction: column;
|
align-items: flex-start;
|
}
|
|
.form-label {
|
width: auto;
|
margin-bottom: 5px;
|
font-size: 13px;
|
}
|
|
.form-input {
|
width: 100%;
|
height: 36px;
|
font-size: 13px;
|
}
|
|
.three-modules-container {
|
gap: 12px;
|
}
|
|
.module-item {
|
padding: 12px;
|
}
|
|
.module-title {
|
font-size: 14px;
|
}
|
|
.tip-box {
|
padding: 8px;
|
}
|
|
.tip-text {
|
font-size: 13px;
|
}
|
|
.result-number {
|
font-size: 14px;
|
padding: 6px 10px;
|
min-width: 35px;
|
}
|
|
.result-badge {
|
font-size: 11px;
|
padding: 4px 10px;
|
}
|
}
|
|
/* 超小屏幕优化 */
|
@media (max-width: 480px) {
|
.page-container {
|
padding: 8px;
|
}
|
|
.form-card, .table-card {
|
padding: 12px;
|
}
|
|
.form-input {
|
height: 34px;
|
font-size: 12px;
|
}
|
|
.form-label {
|
font-size: 12px;
|
}
|
|
.action-btn {
|
padding: 10px;
|
font-size: 14px;
|
}
|
|
.result-number {
|
font-size: 12px;
|
padding: 4px 8px;
|
min-width: 30px;
|
}
|
|
.result-badge {
|
font-size: 10px;
|
padding: 3px 8px;
|
}
|
}
|
</style>
|