From 2ba045658a9e6a1a28cf0bdf1a751395ad283c62 Mon Sep 17 00:00:00 2001
From: zjh <2207896513@qq.com>
Date: 星期五, 12 九月 2025 18:00:30 +0800
Subject: [PATCH] iqc提交检验时,会判断是否要提交异常处置单
---
pages/QC/XJ/detail.vue | 960 ++++++++++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 803 insertions(+), 157 deletions(-)
diff --git a/pages/QC/XJ/detail.vue b/pages/QC/XJ/detail.vue
index 4ad5f47..82571cc 100644
--- a/pages/QC/XJ/detail.vue
+++ b/pages/QC/XJ/detail.vue
@@ -1,128 +1,218 @@
<template>
- <view>
- <view class="form-container">
- <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>
- <view class="form-group">
- <label class="form-label">璐ㄩ噺瑕佹眰:</label>
- <input class="form-input" disabled="true" type="text" v-model="formData.itemMod"/>
- </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 class="container">
+ <!-- 澶撮儴 -->
+ <view class="header">
+ <view class="title">宸℃椤圭洰鏄庣粏</view>
+ <view class="order-number">褰撳墠妫�楠屽崟鍙�: {{ billNo }}</view>
</view>
- <view>
- <img v-if="isShowImg" :src="base64Image" style="width:100%" @click="previewImage"/>
+
+ <!-- 鏍囩鏍� -->
+ <view class="tabs-container">
+ <scroll-view class="tabs" scroll-x="true" show-scrollbar="false">
+ <view v-for="(tab, index) in tabs" :key="index" :class="{active: currentTab === index}" class="tab"
+ @tap="switchTab(index, tab.id)">
+ {{ tab.projName || tab.fcheckItem || '椤圭洰' + (index + 1) }}
+ </view>
+ </scroll-view>
</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>
- </uni-tr>
- <uni-tr v-for="(item, index) in tableData" :key="index">
- <uni-td align="center">
- {{ index + 1 }}
- </uni-td>
- <uni-td align="center">
- <input class="form-input" 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>
- <uni-td>
- <view class="uni-group">
- <button type="warn" v-if="isNumber" @click="toDetail(item)">淇敼</button>
- <button type="warn" v-if="!isNumber" @click="numberEdit(item)">{{ editResult(item.fcheckResu) }}</button>
+
+ <view class="tab-content">
+ <!-- 鍩烘湰淇℃伅 -->
+ <view class="section">
+ <view class="section-header">鍩烘湰淇℃伅</view>
+ <view class="section-body">
+ <view class="info-grid">
+ <view class="info-item">
+ <view class="info-label">椤圭洰鍚嶇О</view>
+ <view class="info-value">{{ formData.projName }}</view>
</view>
- </uni-td>
- </uni-tr>
- </uni-table>
- </view>
-
- <view class="plus-button">
- <button type="warn" @click="saveRemarks">娣诲姞涓嶅悎鏍兼弿杩�</button>
- </view>
-
- <view v-if="remarksPopup" class="overlay">
- <view class="popup">
- <h3>淇敼涓嶅悎鏍兼弿杩�</h3>
- <form>
- <view class="form-group">
- <label class="form-label">涓嶅悎鏍兼弿杩�:</label>
- <input class="form-input" type="text" v-model="remarks"/>
+ <view class="info-item">
+ <view class="info-label">璐ㄩ噺瑕佹眰</view>
+ <view class="info-value">{{ formData.itemMod }}</view>
+ </view>
+ <view class="info-item">
+ <view class="info-label">妫�楠屾柟娉�</view>
+ <view class="info-value">{{ formData.inspectionMethod }}</view>
+ </view>
+ <view class="info-item">
+ <view class="info-label">浣跨敤浠〃</view>
+ <view class="info-value">{{ formData.usingInstruments }}</view>
+ </view>
+ <view class="info-item">
+ <view class="info-label">妫�楠屾暟</view>
+ <view class="info-value">{{ formData.levelNum }}</view>
+ </view>
+ <view v-if="formData.minValue" class="info-item">
+ <view class="info-label">涓嬮檺</view>
+ <view class="info-value">{{ formData.minValue }}</view>
+ </view>
+ <view v-if="formData.standardValue" class="info-item">
+ <view class="info-label">鏍囧噯鍊�</view>
+ <view class="info-value">{{ formData.standardValue }}</view>
+ </view>
+ <view v-if="formData.maxValue" class="info-item">
+ <view class="info-label">涓婇檺</view>
+ <view class="info-value">{{ formData.maxValue }}</view>
+ </view>
+ <view class="info-item">
+ <view class="info-label">鏇存柊浜�</view>
+ <view class="info-value">{{ formData.updater }}</view>
+ </view>
+ <view class="info-item">
+ <view class="info-label">鏇存柊鏃堕棿</view>
+ <view class="info-value">{{ formData.updateTime }}</view>
+ </view>
</view>
- <button type="warn" @click="editRemarks">淇敼</button>
- <button @click="remarksPopup = !remarksPopup">鍙栨秷</button>
- </form>
+ </view>
</view>
- </view>
- <view v-if="showPopup" class="overlay">
- <view class="popup">
- <h3>淇敼妫�楠岀粨鏋�</h3>
- <form :modelValue="editData">
- <view class="form-group">
- <label class="form-label">妫�楠岀粨鏋�:</label>
- <input class="form-input" type="text" v-model="editData.fcheckResu"/>
+ <!-- 妫�楠岀粨鏋� -->
+ <view class="section">
+ <view class="section-header">妫�楠岀粨鏋�</view>
+ <view class="section-body">
+ <view class="info-grid">
+ <view v-if="formData.result" class="info-item">
+ <view class="info-label">棰勮缁撴灉</view>
+ <view class="info-value">{{ formData.result }}</view>
+ </view>
+ <view v-if="formData.remarks" class="info-item">
+ <view class="info-label">澶囨敞</view>
+ <view class="info-value danger">{{ formData.remarks }}</view>
+ </view>
</view>
- <button type="warn" @click="eidt">淇敼</button>
- <button @click="showPopup = !showPopup">鍙栨秷</button>
- </form>
+ </view>
+ </view>
+
+ <!-- 缁撴灉褰曞叆 -->
+ <view class="section">
+ <view class="section-header">妫�楠岀粨鏋滃綍鍏�</view>
+ <view class="section-body">
+ <view v-if="!formData.maxValue && !formData.minValue" class="info-item edit">
+ <view class="info-label" style="color: #F56C6C">鎻愮ず</view>
+ <view class="info-value" style="color: #F56C6C">娌℃湁鏈�澶у�煎拰鏈�灏忓�兼椂濉啓0锛堟湭閫氳繃妫�楠岋級鎴�1锛堥�氳繃妫�楠岋級</view>
+ </view>
+
+ <view class="input-group input1">
+ <view class="input-wrapper">
+ <input v-if="tableData.length < formData.levelNum" v-model="formData.fcheckResu" class="result-input"
+ placeholder="璇疯緭鍏ユ楠岀粨鏋�..." type="number"/>
+ <button v-if="tableData.length < formData.levelNum" class="btn primary-btn" @click="submit">淇濆瓨缁撴灉
+ </button>
+ <button v-if="isShowImg" class="btn upload-btn" @click="previewImage">
+ <uni-icons color="#fff" size="16" type="image"></uni-icons>
+ 鏌ョ湅鍥剧墖
+ </button>
+ <button class="btn upload-btn" @click="saveRemarks">
+ <uni-icons color="#fff" size="16" type="compose"></uni-icons>
+ 澶囨敞
+ </button>
+ </view>
+ </view>
+
+ <!-- 鍝嶅簲寮忚璁$殑绗簩涓緭鍏ョ粍 -->
+ <view class="input-group input2">
+ <view class="input-wrapper">
+ <button v-if="isShowImg" class="btn upload-btn" @click="previewImage">
+ <uni-icons color="#fff" size="16" type="image"></uni-icons>
+ 鏌ョ湅鍥剧墖
+ </button>
+ <button class="btn upload-btn" @click="saveRemarks">
+ <uni-icons color="#fff" size="16" type="compose"></uni-icons>
+ 澶囨敞
+ </button>
+ </view>
+ <view class="input-wrapper" style="margin-top: 15px;">
+ <input v-if="tableData.length < formData.levelNum" v-model="formData.fcheckResu" class="result-input"
+ placeholder="璇疯緭鍏ユ楠岀粨鏋�..." type="number"/>
+ <button v-if="tableData.length < formData.levelNum" class="btn primary-btn" @click="submit">淇濆瓨缁撴灉
+ </button>
+ </view>
+ </view>
+ </view>
+ </view>
+
+ <!-- 缁撴灉琛ㄦ牸 -->
+ <view v-if="tableData.length > 0" class="simple-table-container">
+ <view class="simple-table-header">
+ <view class="simple-title">妫�楠岃褰� ({{ tableData.length }}/{{ formData.levelNum }})</view>
+ <view :class="{'completed': !(tableData.length < formData.levelNum)}" class="simple-status">
+ {{ tableData.length < formData.levelNum ? '杩涜涓�' : '宸插畬鎴�' }}
+ </view>
+ </view>
+
+ <view class="simple-table">
+ <view class="simple-header-row">
+ <view class="simple-header-cell">缂栧彿</view>
+ <view class="simple-header-cell">妫�楠岀粨鏋�</view>
+ <view class="simple-header-cell">鎿嶄綔</view>
+ </view>
+
+ <view v-for="(item, index) in tableData" :key="index" class="simple-data-row">
+ <view class="simple-data-cell simple-index">
+ {{ index + 1 }}
+ </view>
+ <view class="simple-data-cell simple-result">
+ <!-- 鏁板瓧缁撴灉鏍峰紡 -->
+ <view v-if="isNumber && !isNaN(parseFloat(item.fcheckResu))" class="simple-number-result">
+ <view class="result-value">{{ item.fcheckResu }}</view>
+ <view v-if="formData.unitName" class="result-unit">{{ formData.unitName }}</view>
+ <view :class="{'pass': isInRange(item.fcheckResu), 'fail': !isInRange(item.fcheckResu)}"
+ class="result-status">
+ {{ isInRange(item.fcheckResu) ? '鍚堟牸' : '涓嶅悎鏍�' }}
+ </view>
+ </view>
+
+ <!-- NG/OK鐘舵�佹牱寮� -->
+ <view v-else class="simple-status-result">
+ <view :class="{'pass': item.fcheckResu === '1', 'fail': item.fcheckResu !== '1'}" class="simple-status">
+ {{ item.fcheckResu === '1' ? '鍚堟牸' : '涓嶅悎鏍�' }}
+ </view>
+ </view>
+ </view>
+ <view class="simple-data-cell simple-action">
+ <button v-if="!isNumber" class="simple-btn" @click="numberEdit(item)">
+ {{ editResult(item.fcheckResu) }}
+ </button>
+ <button v-if="isNumber" class="simple-btn" @click="toDetail(item)">
+ 淇敼
+ </button>
+ </view>
+ </view>
+ </view>
+ </view>
+
+ <!-- 寮瑰嚭灞� - 澶囨敞 -->
+ <view v-if="remarksPopup" class="overlay">
+ <view class="popup">
+ <h3>淇敼澶囨敞</h3>
+ <form>
+ <view class="form-group">
+ <label class="form-label">澶囨敞:</label>
+ <input v-model="remarks" class="form-input" placeholder="璇疯緭鍏ュ娉�" type="text"/>
+ </view>
+ <view class="popup-buttons">
+ <button class="btn primary-btn" type="warn" @click="editRemarks">淇敼</button>
+ <button class="btn cancel-btn" @click="remarksPopup = !remarksPopup">鍙栨秷</button>
+ </view>
+ </form>
+ </view>
+ </view>
+
+ <!-- 寮瑰嚭灞� - 淇敼妫�楠岀粨鏋� -->
+ <view v-if="showPopup" class="overlay">
+ <view class="popup">
+ <h3>淇敼妫�楠岀粨鏋�</h3>
+ <form :modelValue="editData">
+ <view class="form-group">
+ <label class="form-label">妫�楠岀粨鏋�:</label>
+ <input v-model="editData.fcheckResu" class="form-input" placeholder="璇疯緭鍏ユ楠岀粨鏋�" type="text"/>
+ </view>
+ <view class="popup-buttons">
+ <button class="btn primary-btn" type="warn" @click="eidt">淇敼</button>
+ <button class="btn cancel-btn" @click="showPopup = !showPopup">鍙栨秷</button>
+ </view>
+ </form>
+ </view>
</view>
</view>
</view>
@@ -142,12 +232,47 @@
editData: {},
tableData: [],
isShowImg: false,
- base64Image:"",
+ base64Image: "",
remarks: "",
remarksPopup: false,
+ currentTab: 0,
+ tabs: []
}
},
methods: {
+ // 鍒囨崲鏍囩椤�
+ switchTab(index, id) {
+ this.currentTab = index;
+ this.id = id;
+ this.refreshResult();
+ },
+
+ // 鍔犺浇鏍囩椤�
+ loadTabItems() {
+ this.$post({
+ url: "/XJ/getJYItem",
+ data: {
+ pid: this.gid,
+ }
+ }).then(res => {
+ if (res.data && res.data.tbBillList) {
+ this.tabs = res.data.tbBillList;
+ // 鎸夋娴嬬粨鏋滄帓搴忥紝鏈畬鎴愮殑鎺掑湪鍓嶉潰
+ this.tabs.sort((a, b) => {
+ if (a.result === '鏈畬鎴�' && b.result !== '鏈畬鎴�') {
+ return -1;
+ } else if (a.result !== '鏈畬鎴�' && b.result === '鏈畬鎴�') {
+ return 1;
+ } else {
+ return 0;
+ }
+ });
+ } else {
+ // 娌℃湁椤圭洰鏃惰嚦灏戞坊鍔犲綋鍓嶉」鐩埌鏍囩
+ this.tabs = [{id: this.id, projName: this.formData.projName || '褰撳墠椤圭洰'}];
+ }
+ });
+ },
previewImage() {
uni.previewImage({
@@ -347,6 +472,22 @@
}
})
}
+ },
+ // 鍒ゆ柇鏁板瓧鏄惁鍦ㄨ寖鍥村唴
+ isInRange(value) {
+ if (!this.formData.maxValue || !this.formData.minValue) return true;
+ const numValue = parseFloat(value);
+ return numValue >= parseFloat(this.formData.minValue) &&
+ numValue <= parseFloat(this.formData.maxValue);
+ },
+ // 鑾峰彇鏁板瓧缁撴灉鐨勬牱寮忕被
+ getNumberResultClass(value) {
+ if (!this.formData.maxValue || !this.formData.minValue) return 'number-normal';
+ return this.isInRange(value) ? 'number-pass' : 'number-fail';
+ },
+ // 鑾峰彇鐘舵�佺粨鏋滅殑鏍峰紡绫�
+ getStatusClass(status) {
+ return status === '鈭�' ? 'status-pass' : 'status-fail';
}
},
onLoad(options) {
@@ -356,55 +497,479 @@
this.id = params["id"];
this.billNo = params["billNo"];
this.gid = params["gid"];
+ this.currentTab = parseInt(params["index"] || 0);
this.refreshResult();
+ this.loadTabItems();
}
}
</script>
-<style>
-.form-group {
+<style lang="scss">
+$primary-color: #409EFF;
+$success-color: #67C23A;
+$danger-color: #F56C6C;
+$border-color: #DCDFE6;
+$bg-color: #f5f7fa;
+
+.container {
+ padding: 20px;
+ background-color: #fff;
+}
+
+.header {
+ padding: 20px;
+ border-bottom: 1px solid $border-color;
+ background: linear-gradient(90deg, #f0f7ff, #e1f0ff);
+ margin-bottom: 0; /* 璋冩暣锛屽洜涓轰笅闈㈡湁tab鏍� */
+}
+
+.header .title {
+ font-size: 24px;
+ color: #333;
+ margin-bottom: 10px;
+}
+
+.header .order-number {
+ color: #666;
+ font-size: 14px;
+}
+
+/* 鏍囩鏍忔牱寮� */
+.tabs-container {
+ width: 100%;
+ position: relative;
+ background-color: $bg-color;
+ border-bottom: 1px solid $border-color;
+}
+
+.tabs {
display: flex;
- align-items: center;
- border: 1px solid #c9c9c9;
- background-color: #d4d4d4;
+ white-space: nowrap;
+ overflow-x: auto;
+ scrollbar-width: none; /* Firefox */
+ -ms-overflow-style: none; /* IE and Edge */
}
-.form-label {
- margin-bottom: 0;
- padding: 5px;
+.tabs::-webkit-scrollbar {
+ display: none; /* Chrome, Safari and Opera */
}
-.form-input {
- flex: 1;
- margin-bottom: 0;
- padding: 5px;
+.tab {
+ display: inline-block;
+ padding: 12px 20px;
+ text-align: center;
+ color: #666;
+ transition: all 0.3s;
+ border-right: 1px solid $border-color;
+ min-width: 100px;
}
-/* 榛樿鏍峰紡 */
-.list-container {
- height: calc(100vh - 750px);
- /* 璁剧疆鍒楄〃瀹瑰櫒鐨勯珮搴︿负鍓╀綑绌洪棿锛屽苟鍑忓幓琛ㄥ崟瀹瑰櫒鐨勯珮搴� */
- overflow-y: auto;
- /* 鍏佽鍒楄〃瀹瑰櫒鍨傜洿婊氬姩 */
- padding: 10px;
- /* 鍙�夛細娣诲姞涓�浜涘唴杈硅窛锛屼娇鍒楄〃鍐呭鏇寸編瑙� */
+.tab.active {
+ background-color: #fff;
+ color: $primary-color;
+ font-weight: bold;
+ position: relative;
}
-/* 鍦ㄥ皬灞忓箷璁惧涓婏紝閲嶇疆楂樺害涓洪�傚簲灞忓箷 */
-@media (max-width: 768px) {
- .list-container {
- height: calc(100vh - 485px);
- /* 閫傚綋璋冩暣楂樺害 */
+.tab.active::after {
+ content: '';
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ height: 2px;
+ background-color: $primary-color;
+}
+
+.tab-content {
+ padding-top: 20px;
+}
+
+.section {
+ margin: 20px 0;
+ border: 1px solid $border-color;
+ border-radius: 4px;
+
+ &-header {
+ padding: 12px 16px;
+ background-color: $bg-color;
+ border-bottom: 1px solid $border-color;
+ font-weight: bold;
+ }
+
+ &-body {
+ padding: 16px;
}
}
-.form-container {
- /* 璁剧疆琛ㄥ崟瀹瑰櫒鐨勯珮搴︼紝浣垮叾鍙互婊氬姩 */
- overflow-y: auto;
- /* 鍏佽琛ㄥ崟瀹瑰櫒鍨傜洿婊氬姩 */
- padding: 10px;
- /* 鍙�夛細娣诲姞涓�浜涘唴杈硅窛锛屼娇琛ㄥ崟鍐呭鏇寸編瑙� */
+.info-grid {
+ display: grid;
+ grid-template-columns: repeat(3, 1fr);
+ gap: 16px;
+
+ .info-item {
+ margin-bottom: 12px;
+
+ .info-label {
+ color: #909399;
+ font-size: 14px;
+ margin-bottom: 4px;
+ }
+
+ .info-value {
+ color: #333;
+ font-weight: 500;
+ }
+ }
+}
+
+.input-group {
+ margin: 16px 0;
+
+ .input-wrapper {
+ display: flex;
+ gap: 12px;
+
+ .result-input {
+ flex: 1;
+ height: 45px;
+ padding: 0 12px;
+ border: 1px solid $border-color;
+ border-radius: 4px;
+ font-size: 14px;
+ }
+
+ .upload-btn {
+ background-color: #909399;
+ color: #fff;
+ padding: 0 10px;
+ margin: 0;
+ }
+ }
+}
+
+/* 绠�娲佽〃鏍兼牱寮� - 閫傚悎骞撮暱鐢ㄦ埛 */
+.simple-table-container {
+ margin: 20px 0;
+ border: 2px solid #ddd;
+ border-radius: 8px;
+ background: #fff;
+}
+
+.simple-table-header {
+ padding: 15px 20px;
+ background: #f5f7fa;
+ border-bottom: 2px solid #ddd;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+
+.simple-title {
+ font-size: 18px;
+ font-weight: bold;
+ color: #333;
+}
+
+.simple-status {
+ padding: 8px 16px;
+ border-radius: 6px;
+ font-size: 14px;
+ font-weight: bold;
+ background: #ffc107;
+ color: #333;
+}
+
+.simple-status.completed {
+ background: #28a745;
+ color: #fff;
+}
+
+.simple-table {
+ width: 100%;
+}
+
+.simple-header-row {
+ display: flex;
+ background: #e9ecef;
+ border-bottom: 2px solid #ddd;
+}
+
+.simple-header-cell {
+ flex: 1;
+ padding: 15px 20px;
+ font-size: 16px;
+ font-weight: bold;
+ color: #333;
+ text-align: center;
+ border-right: 1px solid #ddd;
+}
+
+.simple-header-cell:first-child {
+ flex: 0 0 80px;
+}
+
+.simple-header-cell:last-child {
+ border-right: none;
+ flex: 0 0 120px;
+}
+
+.simple-data-row {
+ display: flex;
+ border-bottom: 1px solid #ddd;
+}
+
+.simple-data-row:nth-child(even) {
+ background: #f8f9fa;
+}
+
+.simple-data-cell {
+ flex: 1;
+ padding: 15px 20px;
+ text-align: center;
+ border-right: 1px solid #ddd;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.simple-index {
+ flex: 0 0 80px;
+ font-size: 18px;
+ font-weight: bold;
+ color: #333;
+}
+
+.simple-result {
+ text-align: left;
+ justify-content: flex-start;
+}
+
+.simple-action {
+ border-right: none;
+ flex: 0 0 120px;
+}
+
+.simple-number-result {
+ display: flex;
+ align-items: center;
+ gap: 12px;
+ width: 100%;
+}
+
+.result-value {
+ font-size: 20px;
+ font-weight: bold;
+ color: #333;
+}
+
+.result-unit {
+ font-size: 14px;
+ color: #666;
+}
+
+.result-status {
+ padding: 6px 12px;
+ border-radius: 4px;
+ font-size: 14px;
+ font-weight: bold;
+ margin-left: auto;
+}
+
+.result-status.pass {
+ background: #d4edda;
+ color: #155724;
+ border: 1px solid #c3e6cb;
+}
+
+.result-status.fail {
+ background: #f8d7da;
+ color: #721c24;
+ border: 1px solid #f5c6cb;
+}
+
+.simple-status-result {
+ width: 100%;
+}
+
+.simple-status {
+ padding: 10px 20px;
+ border-radius: 6px;
+ font-size: 16px;
+ font-weight: bold;
+ text-align: center;
+ display: inline-block;
+}
+
+.simple-status.pass {
+ background: #28a745;
+ color: #fff;
+}
+
+.simple-status.fail {
+ background: #dc3545;
+ color: #fff;
+}
+
+.simple-btn {
+ padding: 10px 16px;
+ background: #007bff;
+ color: #fff;
+ border: none;
+ border-radius: 6px;
+ font-size: 14px;
+ font-weight: bold;
+ cursor: pointer;
+ min-width: 80px;
+}
+
+.simple-btn:active {
+ background: #0056b3;
+}
+
+// 鏂扮殑缁撴灉鏄剧ず鏍峰紡
+.result-display {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ width: 100%;
+}
+
+// 鏁板瓧缁撴灉鏍峰紡
+.number-result {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ padding: 8px 12px;
+ border-radius: 8px;
+ min-width: 60px;
+ position: relative;
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
+
+ &.number-pass {
+ background: linear-gradient(135deg, #e8f5e8, #f0f9f0);
+ border: 2px solid #67C23A;
+ }
+
+ &.number-fail {
+ background: linear-gradient(135deg, #fdeaea, #fef0f0);
+ border: 2px solid #F56C6C;
+ }
+
+ &.number-normal {
+ background: linear-gradient(135deg, #f5f7fa, #fafbfc);
+ border: 2px solid #909399;
+ }
+
+ .number-value {
+ font-size: 16px;
+ font-weight: bold;
+ color: #333;
+ margin-bottom: 2px;
+ }
+
+ .number-unit {
+ font-size: 10px;
+ color: #666;
+ margin-bottom: 4px;
+ }
+
+ .number-status {
+ position: absolute;
+ top: -4px;
+ right: -4px;
+ background: white;
+ border-radius: 50%;
+ width: 20px;
+ height: 20px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
+ }
+}
+
+// 鐘舵�佺粨鏋滄牱寮�
+.status-result {
+ display: flex;
+ align-items: center;
+ padding: 8px 16px;
+ border-radius: 20px;
+ font-weight: bold;
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
+ transition: all 0.3s ease;
+
+ &.status-pass {
+ background: linear-gradient(135deg, #67C23A, #85ce61);
+ color: white;
+ }
+
+ &.status-fail {
+ background: linear-gradient(135deg, #F56C6C, #f78989);
+ color: white;
+ }
+
+ .status-icon {
+ margin-right: 6px;
+ display: flex;
+ align-items: center;
+ }
+
+ .status-text {
+ font-size: 14px;
+ letter-spacing: 0.5px;
+ }
+
+ &:hover {
+ transform: translateY(-1px);
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
+ }
+}
+
+// 淇濈暀鍘熸湁鏍峰紡浣滀负澶囩敤
+.result-badge {
+ display: inline-block;
+ padding: 4px 8px;
+ border-radius: 4px;
+ font-size: 12px;
+ font-weight: bold;
+
+ &.OK {
+ background-color: rgba($success-color, 0.1);
+ color: $success-color;
+ }
+
+ &.NG {
+ background-color: rgba($danger-color, 0.1);
+ color: $danger-color;
+ }
+}
+
+.btn {
+ padding: 8px 20px;
+ border-radius: 4px;
+ font-size: 14px;
+ line-height: 1;
+
+ &.primary-btn {
+ background-color: $primary-color;
+ color: #fff;
+ }
+
+ &.danger-btn {
+ background-color: $danger-color;
+ color: #fff;
+ }
+
+ &.cancel-btn {
+ background-color: #909399;
+ color: #fff;
+ }
+}
+
+.danger {
+ color: $danger-color;
}
.overlay {
@@ -417,20 +982,101 @@
display: flex;
justify-content: center;
align-items: center;
+ z-index: 1000;
}
.popup {
background-color: #fff;
padding: 20px;
- border: 1px solid #ccc;
- box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
- width: 68vw;
- /* 璁剧疆瀹藉害涓鸿鍙e搴︾殑80% */
- height: 25vh;
- /* 璁剧疆楂樺害涓鸿鍙i珮搴︾殑80% */
+ border-radius: 8px;
+ box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
+ width: 80%;
+ max-width: 500px;
+
+ h3 {
+ margin-top: 0;
+ color: #2c3e50;
+ border-bottom: 1px solid #eee;
+ padding-bottom: 10px;
+ }
+
+ .form-group {
+ margin-bottom: 15px;
+ display: flex;
+ flex-direction: column;
+ }
+
+ .form-label {
+ margin-bottom: 5px;
+ font-weight: bold;
+ }
+
+ .form-input {
+ padding: 8px;
+ border: 1px solid #ddd;
+ border-radius: 4px;
+ }
+
+ .popup-buttons {
+ display: flex;
+ justify-content: flex-end;
+ gap: 10px;
+ margin-top: 20px;
+ }
}
-.edit {
- background-color: white;
+.input1 {
+ display: block;
+}
+
+.input2 {
+ display: none;
+}
+
+/* 鍝嶅簲寮忚璁� */
+@media (max-width: 500px) {
+ .input1 {
+ display: none;
+ }
+
+ .input2 {
+ display: block;
+ }
+
+ .info-grid {
+ grid-template-columns: repeat(2, 1fr);
+ }
+}
+
+@media (max-width: 768px) {
+ .info-grid {
+ grid-template-columns: repeat(2, 1fr);
+ }
+
+ .simple-table-header {
+ padding: 12px 16px;
+ }
+
+ .simple-title {
+ font-size: 16px;
+ }
+
+ .simple-header-cell,
+ .simple-data-cell {
+ padding: 12px 16px;
+ font-size: 14px;
+ }
+
+ .simple-index {
+ flex: 0 0 60px;
+ }
+
+ .simple-action {
+ flex: 0 0 100px;
+ }
+
+ .result-value {
+ font-size: 18px;
+ }
}
</style>
\ No newline at end of file
--
Gitblit v1.9.3