From 3f43fee1a16ea38b9f6653521829b545bf67dfed Mon Sep 17 00:00:00 2001
From: value <z1292839451@163.com>
Date: 星期五, 01 九月 2023 17:10:59 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/utils/GlobalClickMixin.js | 26 +++
src/views/experiment/inspectionApplication/index.vue | 26 ++-
src/main.js | 3
src/utils/EventBus.js | 3
package.json | 1
src/views/inspectionManagement/reportForInspection/index.vue | 1
src/components/experiment/template_testReport/index.vue | 152 ++++++++++++---------
src/views/experiment/checkTheReport/index.vue | 6
src/App.vue | 176 ++++++++++++------------
src/views/inspectionManagement/commissionInspection/index.vue | 1
10 files changed, 228 insertions(+), 167 deletions(-)
diff --git a/package.json b/package.json
index 4767215..112973e 100644
--- a/package.json
+++ b/package.json
@@ -22,6 +22,7 @@
"element-ui": "2.13.2",
"html2pdf.js": "^0.10.1",
"js-cookie": "2.2.0",
+ "moment": "^2.29.4",
"normalize.css": "7.0.0",
"nprogress": "0.2.0",
"path-to-regexp": "2.4.0",
diff --git a/src/App.vue b/src/App.vue
index f9aafd2..6b43b77 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,12 +1,14 @@
<template>
- <div id="app">
- <router-view />
- </div>
+ <div id="app">
+ <router-view />
+ </div>
</template>
<script>
+import GlobalClickMixin from "@/utils/GlobalClickMixin";
export default {
- name: 'App',
+ mixins: [GlobalClickMixin], // 浣跨敤娣峰叆
+ name: 'App',
mounted() {
document.title = "瑁呭鐢电紗 lims 绯荤粺"
}
@@ -14,86 +16,88 @@
</script>
<style>
- #app{
- overflow: hidden !important;
- }
-
- .breadcrumb-container{
- height: 40px;
- }
- .app-main{
- margin-top: 41px !important;
- }
-
- .el-menu-item{
- width: 100%;
- }
-
- /* 鍏ㄥ眬妯℃�佹鏍峰紡 */
- .el-dialog{
- border-radius: 10px;
- overflow: hidden;
- }
-
- .el-dialog__header,.el-message-box__header {
- box-sizing: border-box;
- height: 46px;
- border-bottom: 1px solid rgb(238, 238, 238);
- padding: 0px;
- padding-left: 18px;
- display: flex;
- align-items: center;
- background-color: #069cff;
- }
-
- .el-dialog__header *{
- font-size: 16px !important;
- color: #fff;
- }
-
- .el-message-box{
- border: 0;
- border-radius: 15px;
- }
-
- .el-message-box__header * {
- font-size: 16px !important;
- color: #fff !important;
- }
-
- .el-dialog__headerbtn .el-dialog__close{
- color: #fff;
- top: -20px;
- }
-
- .el-dialog__headerbtn{
- top: initial;
- }
-
- .el-dialog__footer .el-button * {
- font-size: 14px !important;
- }
-
- .el-dialog__footer .el-button {
- height: 36px;
- border: 1px solid rgba(190, 190, 190, 0.44);
- box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41);
- padding: 0 14px;
- }
-
- .ins_state_success{
- background-color: #67c23a;
- color: #fff;
- display: initial;
- padding: 6px 10px;
- border-radius: 4px;
- }
-
- .ins_state_error{
- background-color: #f56c6c;
- color: #fff;
- display: initial;
- padding: 6px 10px;
- border-radius: 4px;
- }
+#app {
+ overflow: hidden !important;
+}
+
+.breadcrumb-container {
+ height: 40px;
+}
+
+.app-main {
+ margin-top: 41px !important;
+}
+
+.el-menu-item {
+ width: 100%;
+}
+
+/* 鍏ㄥ眬妯℃�佹鏍峰紡 */
+.el-dialog {
+ border-radius: 10px;
+ overflow: hidden;
+}
+
+.el-dialog__header,
+.el-message-box__header {
+ box-sizing: border-box;
+ height: 46px;
+ border-bottom: 1px solid rgb(238, 238, 238);
+ padding: 0px;
+ padding-left: 18px;
+ display: flex;
+ align-items: center;
+ background-color: #069cff;
+}
+
+.el-dialog__header * {
+ font-size: 16px !important;
+ color: #fff;
+}
+
+.el-message-box {
+ border: 0;
+ border-radius: 15px;
+}
+
+.el-message-box__header * {
+ font-size: 16px !important;
+ color: #fff !important;
+}
+
+.el-dialog__headerbtn .el-dialog__close {
+ color: #fff;
+ top: -20px;
+}
+
+.el-dialog__headerbtn {
+ top: initial;
+}
+
+.el-dialog__footer .el-button * {
+ font-size: 14px !important;
+}
+
+.el-dialog__footer .el-button {
+ height: 36px;
+ border: 1px solid rgba(190, 190, 190, 0.44);
+ box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41);
+ padding: 0 14px;
+}
+
+.ins_state_success {
+ background-color: #67c23a;
+ color: #fff;
+ display: initial;
+ padding: 6px 10px;
+ border-radius: 4px;
+}
+
+.ins_state_error {
+ background-color: #f56c6c;
+ color: #fff;
+ display: initial;
+ padding: 6px 10px;
+ border-radius: 4px;
+}
</style>
diff --git a/src/components/experiment/template_testReport/index.vue b/src/components/experiment/template_testReport/index.vue
index 3fa121c..f9bf7f2 100644
--- a/src/components/experiment/template_testReport/index.vue
+++ b/src/components/experiment/template_testReport/index.vue
@@ -174,57 +174,73 @@
<span>妫�楠岀被鍨�</span><br>
<span>Type of test</span>
</td>
- <td colspan="2"></td>
+ <td colspan="2">
+ {{reportData.type === 0 ? "鍘熸潗鏂欐楠�" : (reportData.type === 1 ? "濮旀墭妫�楠�" : "鎴愬搧妫�楠�")}}
+ </td>
</tr>
<tr>
<td>
<span>鏍峰搧鐘舵��</span><br>
<span>Sample discription</span>
</td>
- <td colspan="2"></td>
+ <td colspan="2">/</td>
<td>
<span>鐢熶骇鍗曚綅</span><br>
<span>Producer</span>
</td>
- <td colspan="2"></td>
+ <td colspan="2">
+ {{reportData.supplier}}
+ </td>
</tr>
<tr>
<td>
- <span>鏀舵牱鏃堕棿</span><br>
+ <span>閫佹牱鏃堕棿</span><br>
<span>Received date</span>
</td>
- <td colspan="2"></td>
+ <td colspan="2">
+
+ </td>
<td>
<span>妫�楠屾棩鏈�</span><br>
<span>Test date</span>
</td>
- <td colspan="2"></td>
+ <td colspan="2">
+ {{reportData.createTime}}
+ </td>
</tr>
<tr>
<td>
<span>濮旀墭浜�</span><br>
<span>Consignor</span>
</td>
- <td colspan="2"></td>
+ <td colspan="2">
+ {{enterprise.linkName}}
+ </td>
<td>
<span>鐢佃瘽</span><br>
<span>Tel</span>
</td>
- <td colspan="2"></td>
+ <td colspan="2">
+ {{enterprise.linkPhone}}
+ </td>
</tr>
<tr>
<td>
<span>濮旀墭鍗曚綅</span><br>
<span>Client</span>
</td>
- <td colspan="5"></td>
+ <td colspan="5">
+ {{enterprise.name}}
+ </td>
</tr>
<tr>
<td>
<span>濮旀墭鍗曚綅鍦板潃</span><br>
<span>Address</span>
</td>
- <td colspan="5"></td>
+ <td colspan="5">
+ {{enterprise.address}}
+ </td>
</tr>
<tr>
<td>
@@ -246,12 +262,12 @@
<span>Conclusion </span>
</td>
<td colspan="5">
- <div style="height: 120px;"></div>
+ <div style="padding-left: 20px;width:100%;text-align:left; font-size:18px;height: 120px;line-height: 120px;">{{reportData.inspectionStatus === 1 ? "鍚堟牸" : "涓嶅悎鏍�"}}</div>
<div style="height: 60px;margin-left: 250px;">
<span>锛堟娴嬫姤鍛婁笓鐢ㄧ珷锛�</span><br>
<span>( SPECIFIC STAMP FOR TEST RTORT) </span><br>
- <span>绛惧彂鏃ユ湡锛� 骞� 鏈� 鏃�</span><br>
- <span>Date of issue: August 23, 2023</span>
+ <span>绛惧彂鏃ユ湡锛� {{formattedDate('yyyy骞碝M鏈圖D鏃�','zh-cn') }}</span><br>
+ <span>Date of issue: {{formattedDate('LL','en-ca') }}</span>
</div>
</td>
</tr>
@@ -267,7 +283,7 @@
<span>缂栧埗</span><br>
<span>Preparer</span>
</td>
- <td colspan="2"></td>
+ <td colspan="2">{{reportData.preparerName}}</td>
<td>
<span>妫�楠�</span><br>
<span>Tester</span>
@@ -308,8 +324,8 @@
<div class="table">
<div class="table-header">
<div>
- <span>鎶ュ憡缂栧彿锛�</span><br>
- <span>Reference No锛�</span>
+ <span>鎶ュ憡缂栧彿锛歿{reportData.rcode}}</span><br>
+ <span>Reference No锛歿{reportData.rcode}}</span>
</div>
<div>
<span>绗�2椤靛叡2椤�</span><br>
@@ -323,12 +339,12 @@
<span>鏍峰搧缂栧彿</span><br>
<span>Sample No</span>
</td>
- <td colspan="3"></td>
+ <td colspan="3">{{reportData.imCode}}</td>
<td colspan="4">
<span>瑙勬牸鍨嬪彿</span><br>
<span>Type</span>
</td>
- <td colspan="3"></td>
+ <td colspan="3">{{reportData.specifications}}</td>
</tr>
<tr>
<td>
@@ -356,53 +372,35 @@
<span>Conclusion</span>
</td>
</tr>
- <tr>
- <td>
- <span></span><br>
- <span></span>
- </td>
- <td colspan="3">
- <span>鏍峰搧鏍囪瘑</span><br>
- <span>Sample labeling</span>
- </td>
- <td>
- <span></span><br>
- <span>I</span>
- </td>
- <td colspan="3">
- <span></span><br>
- <span></span>
- </td>
- <td colspan="3">
- <span></span><br>
- <span></span>
- </td>
- <td>
- <span></span><br>
- <span></span>
- </td>
- </tr>
<tr v-for="(item, index) in resultTable" :key="index">
<td>
- <span>{{ item.id }}</span><br>
+ <span>{{ index + 1 }}</span><br>
</td>
<td colspan="3">
- <span>{{ item.testitem }}</span><br>
- <span>{{ item.testitem_engName }}</span>
+ <span>{{ item.ipName }}</span>
</td>
<td>
<span>{{ item.unit }}</span>
</td>
<td colspan="3">
- <span>{{ item.requirement }}</span><br>
- <span>{{ item.requirement_eng }}</span>
+ <span>{{ item.required }}</span><br>
</td>
<td colspan="3">
- <span>{{ item.testresult }}</span><br>
- <span>{{ item.testresult_engName }}</span>
+ <span>{{ item.testValue }}</span><br>
</td>
<td>
- <span>{{ item.conclusion }}</span>
+ <span>{{ isIfState(item.testState) }}</span>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <span>澶囨敞:</span><br/>
+ <span>remarks:</span>
+ </td>
+ <td colspan="13">
+ 鈥溾垰鈥濊〃绀洪」鐩悎鏍硷紝鈥溍椻�濊〃绀洪」鐩笉鍚堟牸,鈥滐紞鈥濊〃绀轰笉瑕佸垽瀹氾紝鈥滐紡鈥濊〃绀烘病鏈夋爣鍑嗚姹傘��
+ 鈥溾垰鈥� indicates test Item is qualified锛屸�溍椻�� indicates test Item is unqualified,
+ 鈥滐紞鈥� indicates test Item judgment is not required,鈥滐紡鈥� indicates test Item is no test requirement .
</td>
</tr>
</table>
@@ -412,8 +410,8 @@
<div class="pageFour">
<div class="page-header" style="display: flex;justify-content: space-between;font-size: 12px;">
<div>
- <span>鎶ュ憡缂栧彿锛�</span><br>
- <span>Reference No锛�</span>
+ <span>鎶ュ憡缂栧彿锛歿{reportData.rcode}}</span><br>
+ <span>Reference No锛歿{reportData.rcode}}</span>
</div>
<div>
<span>闄勯〉</span><br>
@@ -474,6 +472,7 @@
</td>
</tr>
</table>
+ <p style="width:100%;text-align: center;font-size: 15px;">------浠ヤ笅绌虹櫧锛團ollowing Blank锛�------</p>
</div>
</div>
</div>
@@ -482,6 +481,7 @@
</template>
<script>
+ import moment from 'moment';
import {
get,
post,
@@ -489,19 +489,9 @@
} from "@/api/util/requestUtil.js"
export default {
name: 'TestReport',
- props: ["reportData"],
data() {
return {
- resultTable: [{
- id: '1',
- testitem: '鍘熷鎷変几',
- testitem_engName: 'Primitive strength',
- unit: 'MPa',
- requirement: '鏈�灏�10.0',
- requirement_eng: 'Minimun 10.0',
- testresult: '',
- testitem_engName: ''
- }],
+ resultTable: [],
table: [{
id: 1,
equipment_name: '鎷栨媺鏈�',
@@ -516,7 +506,8 @@
}
},
mounted() {
- this.getEnterprise()
+ this.initResultData();
+ this.getEnterprise();
if (Object.keys(this.reportData).length > 0) {
this.reData.productNames = ''
this.reportData.products.forEach(a=>{
@@ -526,12 +517,39 @@
}
},
methods: {
+ initResultData(){
+ this.resultTable = this.reportData.products;
+ if (this.resultTable.length < 15) {
+ let size = this.resultTable.length;
+ let num = 15 - size;
+ for (let i = 0; i < num; i++) {
+ this.resultTable.push({
+ code: null,
+ ipName: "",
+ required: "",
+ testState: null,
+ testValue: "",
+ unit: ""
+ })
+ }
+ }
+ },
+ isIfState(val) {
+ if (val === 1) return "鈭�"
+ else if (val === null || val === undefined) return null
+ else return "X"
+ },
+ formattedDate(fmt,local) {
+ moment.locale(local);
+ return moment().format(fmt);
+ },
getEnterprise() {
get("/report/getEnterprise").then(res => {
this.enterprise = res.data
})
}
- }
+ },
+ props: ["reportData"],
}
</script>
diff --git a/src/main.js b/src/main.js
index d578a57..08ded1c 100644
--- a/src/main.js
+++ b/src/main.js
@@ -9,7 +9,6 @@
import locale from 'element-ui/lib/locale/lang/zh-CN' // lang i18n
import VueClipboard from 'vue-clipboard2'
Vue.use(VueClipboard)
-
import '@/styles/index.scss' // global css
import App from './App'
@@ -61,4 +60,4 @@
router,
store,
render: h => h(App)
-})
+});
diff --git a/src/utils/EventBus.js b/src/utils/EventBus.js
new file mode 100644
index 0000000..b3e3ca6
--- /dev/null
+++ b/src/utils/EventBus.js
@@ -0,0 +1,3 @@
+// EventBus.js
+import Vue from 'vue';
+export const EventBus = new Vue();
\ No newline at end of file
diff --git a/src/utils/GlobalClickMixin.js b/src/utils/GlobalClickMixin.js
new file mode 100644
index 0000000..1d5f8aa
--- /dev/null
+++ b/src/utils/GlobalClickMixin.js
@@ -0,0 +1,26 @@
+import { EventBus } from './EventBus.js';
+
+export default {
+ mounted() {
+ this.$el.addEventListener('click', this.$_handleGlobalClick);
+ },
+ beforeDestroy() {
+ this.$el.removeEventListener('click', this.$_handleGlobalClick);
+ },
+ methods: {
+ $_handleGlobalClick(event) {
+ if (event.target.tagName === 'SPAN'||event.target.tagName==='BUTTON') {
+ if(sessionStorage.getItem('user')===undefined&&sessionStorage.getItem('user')===null){
+ return;
+ }
+ let user=JSON.parse(sessionStorage.getItem('user'));
+ if(user.account === 'admin'&&user.sessionLayerId === 'f5c8bcb7d5a0fd27e2323280f7e98cad'){
+ return;
+ }
+ // console.log(this.$router.currentRoute);
+ // console.log(user.role.roleMenuList);
+ // console.log(event.target.innerText);
+ }
+ }
+ }
+};
\ No newline at end of file
diff --git a/src/views/experiment/checkTheReport/index.vue b/src/views/experiment/checkTheReport/index.vue
index 1d97b93..9552c34 100644
--- a/src/views/experiment/checkTheReport/index.vue
+++ b/src/views/experiment/checkTheReport/index.vue
@@ -177,18 +177,20 @@
TestReport
},
methods: {
- async queryReportByRCode(code) {
+ async queryReportByRCode(code,name) {
const resp = await getReportData({
code: code
});
this.reportData = resp.data;
+ this.reportData.preparerName = name;
this.dialogVisible = true;
console.log(this.reportData);
},
//鏌ョ湅鎶ュ憡鎸夐挳
previewFun(row) {
this.reportType = row.type;
- this.queryReportByRCode(row.reportCode);
+ this.queryReportByRCode(row.reportCode,row.name);
+
},
handleSelectionChange(selection) {
this.selectedRows = selection;
diff --git a/src/views/experiment/inspectionApplication/index.vue b/src/views/experiment/inspectionApplication/index.vue
index bcce505..be7fb86 100644
--- a/src/views/experiment/inspectionApplication/index.vue
+++ b/src/views/experiment/inspectionApplication/index.vue
@@ -609,8 +609,12 @@
},
reset() {
this.countSize = 1;
- this.pageSize = 8;
- this.searchData = {};
+ this.pageSize = 10;
+ this.searchData = {
+ applicationnumber: '',
+ type: '',
+ state: '',
+ };
this.selectInspectsList();
},
//琚�変腑鐨勪俊鎭� 鍗曢��
@@ -770,12 +774,18 @@
this.addInspection()
},
delInspect(row){
- delInspect({
- id: row.id
- }).then(res=>{
- this.$message.success('宸蹭綔搴�')
- this.selectInspectsList()
- })
+ this.$confirm('鎮ㄧ‘璁ゅ垹闄よ繖鏉℃暟鎹悧?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ delInspect({
+ id: row.id
+ }).then(()=>{
+ this.$message.success('宸蹭綔搴�')
+ this.selectInspectsList()
+ })
+ }).catch(() => {});
}
}
}
diff --git a/src/views/inspectionManagement/commissionInspection/index.vue b/src/views/inspectionManagement/commissionInspection/index.vue
index 2fa91e2..783bb85 100644
--- a/src/views/inspectionManagement/commissionInspection/index.vue
+++ b/src/views/inspectionManagement/commissionInspection/index.vue
@@ -71,7 +71,6 @@
<el-table-column prop="inspectionTime" label="閫佹牱鏃堕棿" min-width="8%" />
<el-table-column prop="completionDeadline" label="瀹屾垚鏈熼檺" min-width="8%" />
<el-table-column prop="contacts" label="濮旀墭缂栧埗浜�" min-width="8%" />
- <el-table-column prop="insTime" label="妫�楠屾棩鏈�" min-width="8%" />
<el-table-column prop="inspection_status" label="鐘舵��" min-width="8%">
<template slot-scope="scope">
<div v-if="scope.row.inspection_status === 0">
diff --git a/src/views/inspectionManagement/reportForInspection/index.vue b/src/views/inspectionManagement/reportForInspection/index.vue
index 2b88e61..f89e215 100644
--- a/src/views/inspectionManagement/reportForInspection/index.vue
+++ b/src/views/inspectionManagement/reportForInspection/index.vue
@@ -84,7 +84,6 @@
<el-table-column prop="quantity" label="鏁伴噺" min-width="5%" />
<el-table-column prop="inspectionDate" label="鎶ユ鏃ユ湡" min-width="8%" />
<el-table-column prop="surveyor" label="妫�楠屼汉" min-width="8%" />
- <el-table-column prop="insTime" label="妫�楠屾棩鏈�" min-width="8%" />
<el-table-column prop="type" label="鐘舵��" min-width="8%">
<template slot-scope="scope">
<span :style="{ color: scope.row.type === 1 ? 'green' : 'red' }">
--
Gitblit v1.9.3