| | |
| | | <template> |
| | | <view> |
| | | <view class="form-container"> |
| | | <view class="page-container"> |
| | | <view class="form-card"> |
| | | <form :modelValue="formData"> |
| | | <view class="form-group"> |
| | | <label class="form-label">项目名称:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.projName"/> |
| | | <view class="form-grid"> |
| | | <view class="form-item"> |
| | | <label class="form-label">项目名称:</label> |
| | | <input class="form-input readonly" disabled="true" type="text" v-model="formData.projName"/> |
| | | </view> |
| | | <view class="form-item"> |
| | | <label class="form-label">质量要求:</label> |
| | | <input class="form-input readonly" disabled="true" type="text" v-model="formData.itemMod"/> |
| | | </view> |
| | | <view class="form-item"> |
| | | <label class="form-label">检验方法:</label> |
| | | <input class="form-input readonly" disabled="true" type="text" v-model="formData.inspectionMethod"/> |
| | | </view> |
| | | <view class="form-item"> |
| | | <label class="form-label">使用仪表:</label> |
| | | <input class="form-input readonly" disabled="true" type="text" v-model="formData.usingInstruments"/> |
| | | </view> |
| | | <view class="form-item"> |
| | | <label class="form-label">检验数:</label> |
| | | <input class="form-input readonly" disabled="true" type="text" v-model="formData.levelNum"/> |
| | | </view> |
| | | <view class="form-item"> |
| | | <label class="form-label">下限:</label> |
| | | <input class="form-input readonly" disabled="true" type="text" v-model="formData.minValue"/> |
| | | </view> |
| | | <view class="form-item"> |
| | | <label class="form-label">标准值:</label> |
| | | <input class="form-input readonly" disabled="true" type="text" v-model="formData.standardValue"/> |
| | | </view> |
| | | <view class="form-item"> |
| | | <label class="form-label">上限:</label> |
| | | <input class="form-input readonly" disabled="true" type="text" v-model="formData.maxValue"/> |
| | | </view> |
| | | <view class="form-item"> |
| | | <label class="form-label">更新人:</label> |
| | | <input class="form-input readonly" disabled="true" type="text" v-model="formData.updater"/> |
| | | </view> |
| | | <view class="form-item"> |
| | | <label class="form-label">更新时间:</label> |
| | | <input class="form-input readonly" disabled="true" type="text" v-model="formData.updateTime"/> |
| | | </view> |
| | | <view class="form-item"> |
| | | <label class="form-label">预览结果:</label> |
| | | <input class="form-input readonly" disabled="true" type="text" v-model="formData.result"/> |
| | | </view> |
| | | <view class="form-item"> |
| | | <label class="form-label">不合格描述:</label> |
| | | <input class="form-input readonly" disabled="true" type="text" v-model="formData.remarks"/> |
| | | </view> |
| | | <view class="form-item edit-item"> |
| | | <input class="form-input info-text" style="color: #e64340" disabled="true" type="text" |
| | | value="没有最大值和最小值时填写0(未通过检验)或1(通过检验)"/> |
| | | </view> |
| | | <view class="form-item edit-item"> |
| | | <label class="form-label">检测结果:</label> |
| | | <input class="form-input editable" type="number" v-model="formData.fcheckResu"/> |
| | | </view> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">质量要求:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.itemMod"/> |
| | | <view class="form-actions"> |
| | | <button type="primary" v-if="tableData.length < formData.levelNum" @click="submit" class="btn-primary">保存</button> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">检验方法:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.inspectionMethod"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">使用仪表:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.usingInstruments"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">检验数:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.levelNum"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">下限:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.minValue"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">标准值:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.standardValue"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">上限:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.maxValue"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">更新人:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.updater"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">更新时间:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.updateTime"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">预览结果:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.result"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">不合格描述:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.remarks"/> |
| | | </view> |
| | | <view class="form-group edit"> |
| | | <input class="form-input" style="color: red" disabled="true" type="text" |
| | | value="没有最大值和最小值时填写0(未通过检验)或1(通过检验)"/> |
| | | </view> |
| | | <view class="form-group edit"> |
| | | <label class="form-label">检测结果:</label> |
| | | <input class="form-input" type="number" v-model="formData.fcheckResu"/> |
| | | </view> |
| | | <button type="primary" v-if="tableData.length < formData.levelNum" @click="submit">保存</button> |
| | | </form> |
| | | </view> |
| | | <view> |
| | | <img v-if="isShowImg" :src="base64Image" style="width:100%" @click="previewImage"/> |
| | | |
| | | <view v-if="isShowImg" class="image-preview"> |
| | | <img :src="base64Image" style="width:100%" @click="previewImage" class="preview-image"/> |
| | | </view> |
| | | <view class="list-container"> |
| | | <uni-table ref="table" border emptyText="暂无更多数据"> |
| | | <uni-tr> |
| | | <uni-th align="center" style="color: #FFFFFF;background-color: lightskyblue;">编号</uni-th> |
| | | <uni-th align="center" style="color: #FFFFFF;background-color: lightskyblue;">判定标识</uni-th> |
| | | <uni-th align="center" style="color: #FFFFFF;background-color: lightskyblue;">检验结果</uni-th> |
| | | <uni-th width="150" align="center" style="color: #FFFFFF;background-color: lightskyblue;">修改</uni-th> |
| | | |
| | | <view class="table-container"> |
| | | <uni-table ref="table" border emptyText="暂无更多数据" class="data-table"> |
| | | <uni-tr class="table-header"> |
| | | <uni-th align="center">编号</uni-th> |
| | | <uni-th align="center">判定标识</uni-th> |
| | | <uni-th align="center">检验结果</uni-th> |
| | | <uni-th width="150" align="center">修改</uni-th> |
| | | </uni-tr> |
| | | <uni-tr v-for="(item, index) in tableData" :key="index"> |
| | | <uni-td align="center"> |
| | | <uni-tr v-for="(item, index) in tableData" :key="index" class="table-row" :class="index % 2 === 0 ? 'table-row-even' : 'table-row-odd'"> |
| | | <uni-td align="center" class="table-cell"> |
| | | {{ index + 1 }} |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.fstand"/> |
| | | <uni-td align="center" class="table-cell"> |
| | | <input class="form-input readonly" disabled="true" type="text" v-model="item.fstand"/> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.fcheckResu"/> |
| | | <uni-td align="center" class="table-cell"> |
| | | <input class="form-input readonly" disabled="true" type="text" v-model="item.fcheckResu"/> |
| | | </uni-td> |
| | | <uni-td> |
| | | <view class="uni-group edit"> |
| | | <button type="warn" v-if="isNumber" @click="toDetail(item)">修改</button> |
| | | <button type="warn" v-if="!isNumber" @click="numberEdit(item)">{{ editResult(item.fcheckResu) }}</button> |
| | | <uni-td class="table-cell"> |
| | | <view class="action-group"> |
| | | <button type="warn" v-if="isNumber" @click="toDetail(item)" class="btn-warning">修改</button> |
| | | <button type="warn" v-if="!isNumber" @click="numberEdit(item)" class="btn-warning">{{ editResult(item.fcheckResu) }}</button> |
| | | </view> |
| | | </uni-td> |
| | | </uni-tr> |
| | |
| | | </view> |
| | | |
| | | <view class="plus-button"> |
| | | <button type="warn" @click="saveRemarks">添加不合格描述</button> |
| | | <button type="warn" @click="saveRemarks" class="btn-float"> |
| | | <text class="btn-icon">+</text> |
| | | <text class="btn-text">添加不合格描述</text> |
| | | </button> |
| | | </view> |
| | | |
| | | <view v-if="remarksPopup" class="overlay"> |
| | | <view class="popup"> |
| | | <h3>修改不合格描述</h3> |
| | | <form> |
| | | <view v-if="remarksPopup" class="modal-overlay" :class="{ 'show-modal': remarksPopup }"> |
| | | <view class="modal" :class="{ 'show-modal-content': remarksPopup }"> |
| | | <div class="modal-header"> |
| | | <h3>修改不合格描述</h3> |
| | | <span @click="remarksPopup = !remarksPopup" class="close-modal">×</span> |
| | | </div> |
| | | <form class="modal-form"> |
| | | <view class="form-group"> |
| | | <label class="form-label">不合格描述:</label> |
| | | <input class="form-input" type="text" v-model="remarks"/> |
| | | </view> |
| | | <button type="warn" @click="editRemarks">修改</button> |
| | | <button @click="remarksPopup = !remarksPopup">取消</button> |
| | | <view class="modal-actions"> |
| | | <button type="warn" @click="editRemarks" class="btn-warning">修改</button> |
| | | <button @click="remarksPopup = !remarksPopup" class="btn-secondary">取消</button> |
| | | </view> |
| | | </form> |
| | | </view> |
| | | </view> |
| | | |
| | | <view v-if="showPopup" class="overlay"> |
| | | <view class="popup"> |
| | | <h3>修改检验结果</h3> |
| | | <form :modelValue="editData"> |
| | | <view v-if="showPopup" class="modal-overlay" :class="{ 'show-modal': showPopup }"> |
| | | <view class="modal" :class="{ 'show-modal-content': showPopup }"> |
| | | <div class="modal-header"> |
| | | <h3>修改检验结果</h3> |
| | | <span @click="showPopup = !showPopup" class="close-modal">×</span> |
| | | </div> |
| | | <form :modelValue="editData" class="modal-form"> |
| | | <view class="form-group"> |
| | | <label class="form-label">检验结果:</label> |
| | | <input class="form-input" type="text" v-model="editData.fcheckResu"/> |
| | | </view> |
| | | <button type="warn" @click="eidt">修改</button> |
| | | <button @click="showPopup = !showPopup">取消</button> |
| | | <view class="modal-actions"> |
| | | <button type="warn" @click="eidt" class="btn-warning">修改</button> |
| | | <button @click="showPopup = !showPopup" class="btn-secondary">取消</button> |
| | | </view> |
| | | </form> |
| | | </view> |
| | | </view> |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | previewImage() { |
| | | uni.previewImage({ |
| | | urls: [this.base64Image], |
| | |
| | | } |
| | | }, |
| | | submit() { |
| | | |
| | | let count = this.formData.levelNum; |
| | | let fstand = "√"; |
| | | |
| | | //有最大值和最小值就根据是否符合标准值更新判定结果,没有最大值和最小值就根据是否通过检验判定结果 |
| | | if (this.formData.maxValue && this.formData.minValue) { |
| | | |
| | | if (!this.formData.fcheckResu) { |
| | | this.$showMessage("请输入检验值"); |
| | | return; |
| | |
| | | } |
| | | count = 1; |
| | | } else { |
| | | |
| | | if (!this.formData.fcheckResu) { |
| | | this.formData.fcheckResu = 1 |
| | | } |
| | |
| | | this.editData = item; |
| | | }, |
| | | eidt() { |
| | | |
| | | if (!this.editData.fcheckResu) { |
| | | this.$showMessage("请输入检验结果"); |
| | | } |
| | |
| | | let fstand = "√"; |
| | | |
| | | if (this.formData.maxValue && this.formData.minValue) { |
| | | |
| | | if (!this.editData.fcheckResu) { |
| | | this.$showMessage("请输入检验值"); |
| | | return; |
| | |
| | | fstand = "×"; |
| | | } |
| | | } else { |
| | | |
| | | if (!this.editData.fcheckResu) { |
| | | this.editData.fcheckResu = 1 |
| | | } |
| | |
| | | }).then(res => { |
| | | this.showPopup = !this.showPopup; |
| | | this.$showMessage("修改成功"); |
| | | this.refreshResult();//刷新页面 |
| | | this.refreshResult(); |
| | | }) |
| | | }, |
| | | numberEdit(item) { |
| | | |
| | | let fstand = "√"; |
| | | let fcheckResu = 1; |
| | | |
| | |
| | | } |
| | | }).then(res => { |
| | | this.$showMessage("修改成功"); |
| | | this.refreshResult(); //刷新页面 |
| | | this.refreshResult(); |
| | | }) |
| | | }, |
| | | saveRemarks() { |
| | |
| | | }, |
| | | editRemarks() { |
| | | if (this.remarks) { |
| | | //saveRemarksGid |
| | | this.$post({ |
| | | url: "/SJ/saveRemarksPid", |
| | | data: { |
| | |
| | | } |
| | | }, |
| | | onLoad(options) { |
| | | //options中包含了url附带的参数 |
| | | let params = options; |
| | | |
| | | this.id = params["id"]; |
| | | this.billNo = params["billNo"]; |
| | | this.gid = params["gid"]; |
| | | |
| | | this.refreshResult(); |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | /* 基础配色方案 */ |
| | | :root { |
| | | --primary-color: #165DFF; /* 主色调 - 蓝色 */ |
| | | --primary-light: #E8F3FF; /* 主色浅色 */ |
| | | --success-color: #00B42A; /* 成功色 - 绿色 */ |
| | | --warning-color: #FF7D00; /* 警告色 - 橙色 */ |
| | | --danger-color: #F53F3F; /* 危险色 - 红色 */ |
| | | --text-color: #1D2129; /* 主文本色 */ |
| | | --text-secondary: #4E5969; /* 次要文本色 */ |
| | | --bg-color: #F2F3F5; /* 背景色 */ |
| | | --card-bg: #FFFFFF; /* 卡片背景色 */ |
| | | --border-color: #E5E6EB; /* 边框色 */ |
| | | } |
| | | |
| | | .form-group { |
| | | /* 页面整体样式 */ |
| | | .page-container { |
| | | padding: 16px; |
| | | background-color: var(--bg-color); |
| | | min-height: 100vh; |
| | | } |
| | | |
| | | /* 表单卡片样式 */ |
| | | .form-card { |
| | | background-color: var(--card-bg); |
| | | border-radius: 12px; |
| | | box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); |
| | | padding: 24px; |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | /* 表单网格布局 */ |
| | | .form-grid { |
| | | display: grid; |
| | | grid-template-columns: repeat(2, 1fr); |
| | | gap: 16px; |
| | | } |
| | | |
| | | /* 表单项目样式 */ |
| | | .form-item { |
| | | display: flex; |
| | | align-items: center; |
| | | border: 1px solid #c9c9c9; |
| | | background-color: #d4d4d4; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .form-label { |
| | | margin-bottom: 0; |
| | | padding: 5px; |
| | | font-size: 14px; |
| | | color: var(--text-color); |
| | | margin-bottom: 8px; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .form-input { |
| | | flex: 1; |
| | | margin-bottom: 0; |
| | | padding: 5px; |
| | | padding: 12px 16px; |
| | | border: 1px solid var(--border-color); |
| | | border-radius: 8px; |
| | | font-size: 14px; |
| | | color: var(--text-color); |
| | | background-color: var(--card-bg); |
| | | transition: border-color 0.3s, box-shadow 0.3s; |
| | | } |
| | | |
| | | /* 默认样式 */ |
| | | .list-container { |
| | | height: calc(100vh - 750px); |
| | | /* 设置列表容器的高度为剩余空间,并减去表单容器的高度 */ |
| | | overflow-y: auto; |
| | | /* 允许列表容器垂直滚动 */ |
| | | padding: 10px; |
| | | /* 可选:添加一些内边距,使列表内容更美观 */ |
| | | .form-input:focus { |
| | | border-color: var(--primary-color); |
| | | outline: none; |
| | | box-shadow: 0 0 0 2px rgba(22, 93, 255, 0.2); |
| | | } |
| | | |
| | | /* 在小屏幕设备上,重置高度为适应屏幕 */ |
| | | @media (max-width: 768px) { |
| | | .list-container { |
| | | height: calc(100vh - 485px); |
| | | /* 适当调整高度 */ |
| | | } |
| | | /* 只读输入框样式 */ |
| | | .form-input.readonly { |
| | | background-color: #F7F8FA; |
| | | color: var(--text-secondary); |
| | | cursor: not-allowed; |
| | | border-color: #E5E6EB; |
| | | } |
| | | |
| | | .form-container { |
| | | /* 设置表单容器的高度,使其可以滚动 */ |
| | | overflow-y: auto; |
| | | /* 允许表单容器垂直滚动 */ |
| | | padding: 10px; |
| | | /* 可选:添加一些内边距,使表单内容更美观 */ |
| | | /* 编辑项样式 */ |
| | | .edit-item { |
| | | grid-column: span 2; |
| | | } |
| | | |
| | | .overlay { |
| | | .info-text { |
| | | background-color: #FFF3F3; |
| | | color: var(--danger-color); |
| | | border-color: #FFE0E0; |
| | | } |
| | | |
| | | /* 表单操作按钮 */ |
| | | .form-actions { |
| | | margin-top: 24px; |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | } |
| | | |
| | | .btn-primary { |
| | | background-color: var(--primary-color); |
| | | border-color: var(--primary-color); |
| | | color: white; |
| | | padding: 10px 24px; |
| | | border-radius: 8px; |
| | | font-size: 14px; |
| | | font-weight: 500; |
| | | transition: background-color 0.3s; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .btn-primary:hover { |
| | | background-color: #0D47A1; |
| | | } |
| | | |
| | | .btn-primary:active { |
| | | transform: translateY(1px); |
| | | } |
| | | |
| | | /* 表格容器样式 */ |
| | | .table-container { |
| | | background-color: var(--card-bg); |
| | | border-radius: 12px; |
| | | box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); |
| | | padding: 16px; |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | .data-table { |
| | | width: 100%; |
| | | } |
| | | |
| | | .table-header { |
| | | background-color: var(--primary-color); |
| | | color: white; |
| | | } |
| | | |
| | | .table-row { |
| | | transition: background-color 0.2s; |
| | | } |
| | | |
| | | .table-row:hover { |
| | | background-color: #F7F8FA; |
| | | } |
| | | |
| | | .table-row-even { |
| | | background-color: #F9FAFC; |
| | | } |
| | | |
| | | .table-row-odd { |
| | | background-color: #F2F3F5; |
| | | } |
| | | |
| | | .table-cell { |
| | | padding: 14px 16px; |
| | | border-color: var(--border-color); |
| | | font-size: 14px; |
| | | color: var(--text-color); |
| | | } |
| | | |
| | | /* 操作按钮组 */ |
| | | .action-group { |
| | | display: flex; |
| | | gap: 8px; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .btn-warning { |
| | | background-color: var(--warning-color); |
| | | border-color: var(--warning-color); |
| | | color: white; |
| | | padding: 8px 16px; |
| | | border-radius: 8px; |
| | | font-size: 12px; |
| | | transition: background-color 0.3s; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .btn-warning:hover { |
| | | background-color: #D66600; |
| | | } |
| | | |
| | | .btn-secondary { |
| | | background-color: #FFFFFF; |
| | | border: 1px solid var(--border-color); |
| | | color: var(--text-color); |
| | | padding: 8px 16px; |
| | | border-radius: 8px; |
| | | font-size: 12px; |
| | | transition: background-color 0.3s, border-color 0.3s; |
| | | } |
| | | |
| | | .btn-secondary:hover { |
| | | background-color: #F7F8FA; |
| | | border-color: #C9CDD4; |
| | | } |
| | | |
| | | /* 图片预览样式 */ |
| | | .image-preview { |
| | | background-color: var(--card-bg); |
| | | border-radius: 12px; |
| | | box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); |
| | | padding: 16px; |
| | | margin-bottom: 20px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .preview-image { |
| | | border-radius: 8px; |
| | | transition: transform 0.3s; |
| | | } |
| | | |
| | | .preview-image:hover { |
| | | transform: scale(1.02); |
| | | } |
| | | |
| | | /* 悬浮按钮样式 */ |
| | | .plus-button { |
| | | margin: 20px 0; |
| | | text-align: center; |
| | | } |
| | | |
| | | .btn-float { |
| | | background-color: var(--warning-color); |
| | | border-color: var(--warning-color); |
| | | color: white; |
| | | padding: 12px 24px; |
| | | border-radius: 32px; |
| | | font-size: 14px; |
| | | font-weight: 500; |
| | | box-shadow: 0 4px 12px rgba(255, 125, 0, 0.2); |
| | | transition: all 0.3s; |
| | | display: inline-flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .btn-float:hover { |
| | | background-color: #D66600; |
| | | transform: translateY(-2px); |
| | | box-shadow: 0 6px 16px rgba(255, 125, 0, 0.3); |
| | | } |
| | | |
| | | .btn-float:active { |
| | | transform: translateY(1px); |
| | | } |
| | | |
| | | .btn-icon { |
| | | margin-right: 8px; |
| | | font-size: 18px; |
| | | } |
| | | |
| | | /* 模态框样式 */ |
| | | .modal-overlay { |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | z-index: 1000; |
| | | opacity: 0; |
| | | visibility: hidden; |
| | | transition: opacity 0.3s, visibility 0.3s; |
| | | } |
| | | |
| | | .popup { |
| | | background-color: #fff; |
| | | padding: 20px; |
| | | border: 1px solid #ccc; |
| | | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); |
| | | width: 68vw; /* 设置宽度为视口宽度的80% */ |
| | | height: 25vh; /* 设置高度为视口高度的80% */ |
| | | .show-modal { |
| | | opacity: 1; |
| | | visibility: visible; |
| | | } |
| | | |
| | | .edit { |
| | | background-color: white; |
| | | .modal { |
| | | background-color: var(--card-bg); |
| | | border-radius: 12px; |
| | | box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); |
| | | width: 90%; |
| | | max-width: 500px; |
| | | max-height: 80vh; |
| | | overflow-y: auto; |
| | | transform: translateY(20px); |
| | | transition: transform 0.3s; |
| | | opacity: 0; |
| | | } |
| | | |
| | | .show-modal-content { |
| | | transform: translateY(0); |
| | | opacity: 1; |
| | | } |
| | | |
| | | .modal-header { |
| | | padding: 16px 24px; |
| | | border-bottom: 1px solid var(--border-color); |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | |
| | | .modal-header h3 { |
| | | font-size: 18px; |
| | | color: var(--text-color); |
| | | margin: 0; |
| | | font-weight: 600; |
| | | } |
| | | |
| | | .close-modal { |
| | | font-size: 24px; |
| | | color: var(--text-secondary); |
| | | cursor: pointer; |
| | | transition: color 0.3s; |
| | | } |
| | | |
| | | .close-modal:hover { |
| | | color: var(--text-color); |
| | | } |
| | | |
| | | .modal-form { |
| | | padding: 24px; |
| | | } |
| | | |
| | | .modal-actions { |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | gap: 12px; |
| | | margin-top: 24px; |
| | | } |
| | | |
| | | /* 响应式设计 */ |
| | | @media (max-width: 768px) { |
| | | .form-grid { |
| | | grid-template-columns: 1fr; |
| | | } |
| | | |
| | | .edit-item { |
| | | grid-column: span 1; |
| | | } |
| | | |
| | | .table-container { |
| | | overflow-x: auto; |
| | | } |
| | | |
| | | .btn-float { |
| | | padding: 10px 20px; |
| | | font-size: 12px; |
| | | } |
| | | } |
| | | </style> |