From 4163a1afd6fc4c787db36d53dc40c4b1f3f9b916 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期三, 11 九月 2024 13:38:19 +0800
Subject: [PATCH] x新增历史记录查看功能
---
src/components/do/b1-inspect-order-plan/circuit-parameters1.vue | 13 ++-
src/components/tool/value-table.vue | 1
src/components/do/b1-inspect-order-plan/circuit-parameters2.vue | 10 ++-
src/main.js | 2
src/components/do/b1-inspect-order-plan/Inspection.vue | 53 ++++++++++++++---
src/components/view/b1-inspect-order-plan.vue | 60 ++++++++++++++++---
src/assets/api/controller.js | 1
7 files changed, 109 insertions(+), 31 deletions(-)
diff --git a/src/assets/api/controller.js b/src/assets/api/controller.js
index 752ca22..2669b3c 100644
--- a/src/assets/api/controller.js
+++ b/src/assets/api/controller.js
@@ -212,6 +212,7 @@
temCycle: "/insOrderPlan/temCycle", // 娓╁害寰幆鏌ョ湅鍒楄〃鏁版嵁(鍖呮嫭閫氳繃鏍峰搧id,寰幆娆℃暟,娓╁害,寰幆娆℃暟杩涜绛涢��)
jumpTeam: "/insOrderPlan/jumpTeam", // 鎻掗槦
chooseVersion: "/insOrderPlan/chooseVersion", // 鐢佃矾妫�楠岀増鏈�
+ getInsProduct2: "/insOrderPlan/getInsProduct2", // 鏌ョ湅鍘嗗彶鐗堟湰鏈�
}
const systemLog = {
diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue
index 2806de1..f6ee9fe 100644
--- a/src/components/do/b1-inspect-order-plan/Inspection.vue
+++ b/src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -181,6 +181,10 @@
display: inline-flex;
align-items: center;
}
+ .history-btn{
+ display: flex;
+ align-items: center;
+ }
</style>
<style>
.inspection .el-form-item__label {
@@ -254,18 +258,18 @@
</el-col>
<el-col :span="12" style="text-align: right;">
<el-button size="small" type="primary" @click="sampleVisible=true;uploadSample()">鏍峰搧鍒囨崲</el-button>
- <el-button size="small" type="primary" @click="taskVisible=true">浠诲姟鍒囨崲</el-button>
+ <el-button size="small" type="primary" @click="taskVisible=true" v-show="!isLook">浠诲姟鍒囨崲</el-button>
<el-button size="small" type="primary" @click="handleSubmit" v-if="state==1"
:loading="submitLoading">鎻愪氦</el-button>
<!-- 澶嶆牳 -->
<el-button size="small" type="primary" @click="upInsReview(1)" :loading="reviewLoading"
- v-if="state>1">缁х画璇曢獙</el-button>
- <el-button size="small" @click="upInsReview(0)" v-if="state>1" type="danger">鍐嶆璇曢獙</el-button>
- <el-button size="small" @click="upInsReview(2)" v-if="state>1">缁撴潫璇曢獙</el-button>
+ v-if="state>1&&!isLook">缁х画璇曢獙</el-button>
+ <el-button size="small" @click="upInsReview(0)" v-if="state>1&&!isLook" type="danger">鍐嶆璇曢獙</el-button>
+ <el-button size="small" @click="upInsReview(2)" v-if="state>1&&!isLook">缁撴潫璇曢獙</el-button>
<el-button size="small" @click="$emit('goback')">杩斿洖</el-button>
</el-col>
</el-row>
- <div class="search">
+ <div class="search" v-show="!isLook">
<el-form :inline="true" :model="searchForm" class="form-inline" label-width="100px" label-position="right">
<el-form-item label="濮旀墭缂栧彿:">
<el-input clearable v-model="insOrder.entrustCode" disabled size="small" placeholder="璇疯緭鍏�"></el-input>
@@ -351,6 +355,11 @@
</el-select>
<el-button type="primary" size="small" v-if="(isGet||tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName=='娓╁害寰幆妫�楠屽師濮嬭褰�'&&temDataAcquisition)&&PROJECT=='妫�娴嬩腑蹇�'&&state==1" @click="getDataAcquisitionDevice" :loading="dataAcquisitionLoading">鏁版嵁閲囬泦</el-button>
<el-button :type="dataAcquisitionEidtAble?'':'primary'" size="small" v-if="(isGet||(tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName=='娓╁害寰幆妫�楠屽師濮嬭褰�'))&&PROJECT=='妫�娴嬩腑蹇�'&&collected&&state==1" @click="dataAcquisitionEidtAble=!dataAcquisitionEidtAble">{{dataAcquisitionEidtAble?'鍏抽棴缂栬緫':'缂栬緫鏁伴噰'}}</el-button>
+ </div>
+ <div class="history-btn" v-if="isLook">
+ <el-button type="primary" icon="el-icon-arrow-left" size="small" @click="goHistory(-1)">涓婁竴鏉¤褰�</el-button>
+ <span style="font-size: 14px;margin: 0 10px;">褰撳墠绗瑊{num}}鏉�</span>
+ <el-button type="primary" size="small" @click="goHistory(1)">涓嬩竴鏉¤褰�<i class="el-icon-arrow-right el-icon--right"></i></el-button>
</div>
</div>
<!-- 甯歌妫�楠屽師濮嬭褰� -->
@@ -800,8 +809,8 @@
<!-- 鐢佃矾璇曢獙 -->
<div v-else-if="tableLists.find(m=>m.templateId==currentTable).templateName.includes('鐢佃矾璇曢獙')" style="width: 100%;overflow-x: auto;overflow-y: visible;">
<!-- <Circuit></Circuit> -->
- <CircuitParameters1 v-if="currentTableState==0" :insProduct="currentSample.insProduct" :orderId="id" :sampleId="currentSample.id" :state="state" :num="currentSample.num1"></CircuitParameters1>
- <CircuitParameters2 v-if="currentTableState==1" :insProduct="currentSample.insProduct" :orderId="id" :sampleId="currentSample.id" :state="state" :num="currentSample.num1"></CircuitParameters2>
+ <CircuitParameters1 v-if="currentTableState==0" :insProduct="currentSample.insProduct" :orderId="id" :sampleId="currentSample.id" :state="state" :num="currentSample.num1" :isLook="isLook" :currentNum="currentNum"></CircuitParameters1>
+ <CircuitParameters2 v-if="currentTableState==1" :insProduct="currentSample.insProduct" :orderId="id" :sampleId="currentSample.id" :state="state" :num="currentSample.num1" :isLook="isLook" :currentNum="currentNum"></CircuitParameters2>
</div>
<el-upload :action="action"
:data="{
@@ -939,7 +948,7 @@
import CircuitParameters1 from './circuit-parameters1.vue'
import CircuitParameters2 from './circuit-parameters2.vue'
export default {
- props: ['sonLaboratory', 'orderId', 'state','inspectorList','version','orderStateId'],
+ props: ['sonLaboratory', 'orderId', 'state','inspectorList','version','orderStateId','isLook','num1'],
components: {
ValueTable,
Circuit,
@@ -948,6 +957,7 @@
},
data() {
return {
+ currentNum:0,
versionLoading:false,
versionDialogVisible:false,
currentTableState:0,
@@ -1128,6 +1138,7 @@
changeType:null,
getDataTypeId:'',
getDataType:null,
+ num:0
}
},
// 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭�
@@ -1144,6 +1155,8 @@
created() {
this.componentData.entity.sonLaboratory = this.sonLaboratory;
this.id = this.orderId;
+ this.currentTableState = this.version
+ this.num = this.num1
this.getUserInfo()
},
mounted() {
@@ -1154,7 +1167,6 @@
this.scrollInit()
this.getPower()
this.startWorker()
- this.currentTableState = this.version
},
watch: {
// 鐩戝惉浠诲姟id锛岃幏鍙栦换鍔′俊鎭�
@@ -2171,7 +2183,12 @@
// 鏍规嵁绫诲瀷銆佷换鍔d銆佸疄楠屽鏉ヨ幏鍙栨牱鍝佺殑妫�楠岄」淇℃伅
async getCurrentProduct(id,type){
this.tableLoading = true;
- let res = await this.$axios.post(this.$api.insOrderPlan.getInsProduct+'?id='+id+'&type='+type+'&laboratory='+this.sonLaboratory)
+ let res = null;
+ if(!this.isLook){
+ res = await this.$axios.post(this.$api.insOrderPlan.getInsProduct+'?id='+id+'&type='+type+'&laboratory='+this.sonLaboratory)
+ }else{
+ res = await this.$axios.post(this.$api.insOrderPlan.getInsProduct2+'?id='+id+'&type='+type+'&laboratory='+this.sonLaboratory+'&num='+this.num)
+ }
this.tableLoading = false;
return res.data
},
@@ -2215,7 +2232,7 @@
}
// 澶勭悊椤甸潰鍒楄〃鏁版嵁
this.getTableLists();
- this.currentKey = row.index
+ this.currentKey = row.index?row.index:0
this.currentTab = null;
// 鍚戝绾跨▼鍘讳繚瀛橀〉闈㈠垪琛ㄦ暟鎹�,鍚庣浼犲弬,褰撳墠妯℃澘淇℃伅
this.worker.postMessage(JSON.stringify({
@@ -3632,6 +3649,20 @@
}
this.versionDialogVisible = false
})
+ },
+ async goHistory(num){
+ if(this.num==1&&num==-1){
+ this.$message.error('褰撳墠鏄涓�鏉¤褰�')
+ return
+ }else if(this.num1==this.num&&num==1){
+ this.$message.error('褰撳墠鏄渶鍚庝竴鏉¤褰�')
+ return
+ }
+ this.num = this.num + num
+ this.tableLoading = true
+ await this.handleChangeSample(this.currentSample)
+ this.currentNum++
+ this.tableLoading = false
}
}
}
diff --git a/src/components/do/b1-inspect-order-plan/circuit-parameters1.vue b/src/components/do/b1-inspect-order-plan/circuit-parameters1.vue
index 9eb8c06..3885a33 100644
--- a/src/components/do/b1-inspect-order-plan/circuit-parameters1.vue
+++ b/src/components/do/b1-inspect-order-plan/circuit-parameters1.vue
@@ -34,7 +34,7 @@
</el-row>
</el-col>
<el-col :span="7">
- <div style="display: flex;align-items: center;justify-content: flex-end;" class="btns">
+ <div style="display: flex;align-items: center;justify-content: flex-end;" class="btns" v-if="!isLook">
<el-button type="primary" size="small" @click="addList(allBandList,'棰戞')" :disabled="state>1">娣诲姞棰戞</el-button>
<el-button size="small" @click="deleteList(allBandList.length-1,allBandList,'鍒犻櫎棰戞')" :disabled="state>1">鍒犻櫎棰戞</el-button>
<el-button type="primary" size="small" @click="addList(angleList)" :disabled="state>1">娣诲姞瑙掑害</el-button>
@@ -70,9 +70,9 @@
:value="item.value">
</el-option>
</el-select>
- <el-button type="primary" size="small" @click="addList(h.projectList,'浜掕皟')" style="margin-left: 16px;" :disabled="state>1">娣诲姞浜掕皟</el-button>
- <el-button size="small" @click="deleteList(0,h.projectList,'浜掕皟')" :disabled="state>1">鍒犻櫎浜掕皟</el-button>
- <el-button type="primary" size="small" @click="save(h,y)" :disabled="state>1" :loading="loading[y]">淇� 瀛�</el-button>
+ <el-button type="primary" size="small" @click="addList(h.projectList,'浜掕皟')" style="margin-left: 16px;" :disabled="state>1" v-show="!isLook">娣诲姞浜掕皟</el-button>
+ <el-button size="small" @click="deleteList(0,h.projectList,'浜掕皟')" :disabled="state>1" v-show="!isLook">鍒犻櫎浜掕皟</el-button>
+ <el-button type="primary" size="small" @click="save(h,y)" :disabled="state>1" :loading="loading[y]" v-show="!isLook">淇� 瀛�</el-button>
</div>
<el-divider></el-divider>
<div class="circuit-parameters-item-content">
@@ -261,7 +261,7 @@
<script>
export default {
- props:['insProduct','orderId','sampleId','state','num'],
+ props:['insProduct','orderId','sampleId','state','num','isLook','currentNum'],
data() {
return {
value: "",
@@ -378,6 +378,9 @@
})
})
console.log(this.allBandList)
+ },
+ currentNum(val) {
+ this.initData()
}
},
mounted() {
diff --git a/src/components/do/b1-inspect-order-plan/circuit-parameters2.vue b/src/components/do/b1-inspect-order-plan/circuit-parameters2.vue
index dab0058..6a84f33 100644
--- a/src/components/do/b1-inspect-order-plan/circuit-parameters2.vue
+++ b/src/components/do/b1-inspect-order-plan/circuit-parameters2.vue
@@ -33,7 +33,7 @@
</el-col>
</el-row>
</el-col>
- <el-col :span="7">
+ <el-col :span="7" v-if="!isLook">
<div style="display: flex;align-items: center;justify-content: flex-end;" class="btns">
<el-button type="primary" size="small" @click="addList(allBandList,'棰戞')" :disabled="state>1">娣诲姞棰戞</el-button>
<el-button size="small" @click="deleteList(allBandList.length-1,allBandList,'鍒犻櫎棰戞')" :disabled="state>1">鍒犻櫎棰戞</el-button>
@@ -72,7 +72,7 @@
</el-select>
<el-button type="primary" size="small" @click="addList(h.projectList,'浜掕皟')" style="margin-left: 16px;" v-if="intermodulationNum>0&&!(state>1)">娣诲姞浜掕皟</el-button>
<el-button size="small" @click="deleteList(0,h.projectList,'浜掕皟')" v-if="intermodulationNum>0&&!(state>1)">鍒犻櫎浜掕皟</el-button>
- <el-button type="primary" size="small" @click="save(h,y)" :disabled="state>1" :loading="loading[y]" style="margin-left: 16px;">淇� 瀛�</el-button>
+ <el-button type="primary" size="small" @click="save(h,y)" :disabled="state>1" :loading="loading[y]" style="margin-left: 16px;" v-show="!isLook">淇� 瀛�</el-button>
</div>
<el-divider></el-divider>
<div class="circuit-parameters-item-content">
@@ -180,7 +180,7 @@
<script>
export default {
- props:['insProduct','orderId','sampleId','state','num'],
+ props:['insProduct','orderId','sampleId','state','num','isLook','currentNum'],
data() {
return {
value: "",
@@ -269,11 +269,15 @@
}
})
})
+ },
+ currentNum(val) {
+ this.initData()
}
},
mounted() {
this.getTypeDicts()
this.initData()
+ console.log(2222,this.currentNum)
},
methods: {
// 瀛楀吀鑾峰彇鏁版嵁
diff --git a/src/components/tool/value-table.vue b/src/components/tool/value-table.vue
index 4d7ee4a..caeea26 100644
--- a/src/components/tool/value-table.vue
+++ b/src/components/tool/value-table.vue
@@ -1165,6 +1165,7 @@
},
getWidth() {
let count = 0
+ console.log(this.data.do)
this.data.do.forEach(a => {
count += a.font.length
})
diff --git a/src/components/view/b1-inspect-order-plan.vue b/src/components/view/b1-inspect-order-plan.vue
index ba7325f..bb8207d 100644
--- a/src/components/view/b1-inspect-order-plan.vue
+++ b/src/components/view/b1-inspect-order-plan.vue
@@ -236,14 +236,15 @@
<el-table-column
fixed="right"
align="center" label="鎿嶄綔"
- width="250px"
+ width="320px"
>
<template slot-scope="scope">
<el-button @click="handleDataLook(scope.row)" type="text" size="small">鏁版嵁鏌ョ湅</el-button>
- <el-button @click="handleInspection(scope.row)" type="text" size="small" :disabled="scope.row.userName == null || scope.row.insState == 3 || scope.row.insState == 5||scope.row.insState == 6||(scope.row.userName&&!scope.row.userName.includes(userName))">妫�楠�</el-button>
- <el-button @click="handleConnect(scope.row)" type="text" size="small" :disabled="scope.row.userName == null || scope.row.insState == 5 || scope.row.insState == 3||scope.row.insState == 6||(scope.row.userName&&!scope.row.userName.includes(userName))">浜ゆ帴</el-button>
- <el-button @click="handleReview(scope.row)" type="text" size="small" :disabled="scope.row.userName == null || scope.row.insState != 3 ||(scope.row.checkName&&!scope.row.checkName.includes(userName))">澶嶆牳</el-button>
- <el-button @click="claimFun(scope.row)" type="text" size="small" :disabled="scope.row.userName != null || scope.row.checkName!=null">璁ら</el-button>
+ <el-button @click="handleInspection(scope.row)" type="text" size="small" :disabled="scope.row.userName == null || scope.row.insState == 3 || scope.row.insState == 5||scope.row.insState == 6||(scope.row.userName&&!scope.row.userName.includes(userName))" v-if="inspection">妫�楠�</el-button>
+ <el-button @click="handleConnect(scope.row)" type="text" size="small" :disabled="scope.row.userName == null || scope.row.insState == 5 || scope.row.insState == 3||scope.row.insState == 6||(scope.row.userName&&!scope.row.userName.includes(userName))" v-if="connect">浜ゆ帴</el-button>
+ <el-button @click="handleReview(scope.row)" type="text" size="small" :disabled="scope.row.userName == null || scope.row.insState != 3 ||(scope.row.checkName&&!scope.row.checkName.includes(userName))" v-if="review">澶嶆牳</el-button>
+ <el-button @click="claimFun(scope.row)" type="text" size="small" :disabled="scope.row.userName != null || scope.row.checkName!=null" v-if="claim">璁ら</el-button>
+ <el-button @click="lookHistory(scope.row)" type="text" size="small" :disabled="!scope.row.num1 || scope.row.num1<1" v-if="getInsProduct2">鏌ョ湅璁板綍</el-button>
</template>
</el-table-column>
</el-table>
@@ -298,7 +299,7 @@
<div style="width: 100%;height: 100%;" v-if="activeFace >0">
<Add :active="activeFace" :currentId="currentId" :examine="examine"/>
</div>
- <Inspection v-if="state>0" @goback="goback" :orderId="orderId" :inspectorList="inspectorList" :sonLaboratory="componentData.entity.sonLaboratory" :state="state" :orderStateId="orderStateId" :version="version"/>
+ <Inspection v-if="state>0" @goback="goback" :orderId="orderId" :inspectorList="inspectorList" :sonLaboratory="componentData.entity.sonLaboratory" :state="state" :orderStateId="orderStateId" :version="version" :isLook="isLook" :num1="num1"/>
<el-dialog title="鏁版嵁鏌ョ湅" :visible.sync="dataDialogVisible" width="80%">
<div style="height: 70vh;overflow-y: auto;" v-if="dataDialogVisible">
<ValueTable ref="ValueTableDataLook" :rowKey="'insProductId'" :url="$api.insOrder.selectSampleAndProductByOrderId"
@@ -452,6 +453,14 @@
disabFun: (row, index) => {
return row.userName != null || row.checkName!=null
}
+ }, {
+ id: '',
+ font: '鏌ョ湅璁板綍',
+ type: 'text',
+ method: 'claimFun',
+ disabFun: (row, index) => {
+ return !row.num1 || row.num1<2
+ }
}
],
linkEvent: {
@@ -525,7 +534,14 @@
label: '鏈嚭缁撴灉',
type: 'info'
}],
- typeList:[]
+ typeList:[],
+ getInsProduct2:false,
+ claim:false,
+ review:false,
+ connect:false,
+ inspection:false,
+ isLook:false,//鏄惁鏄煡鐪嬪巻鍙查〉闈�
+ num1:null,
}
},
created() {
@@ -595,6 +611,7 @@
let review = false
let claim = false
let jumpTeam = false
+ let getInsProduct2 = false
for (var i = 0; i < power.length; i++) {
if (power[i].menuMethod == 'doInsOrder') {
inspection = true
@@ -611,19 +628,30 @@
if (power[i].menuMethod == 'jumpTeam') {
jumpTeam = true
}
+ if (power[i].menuMethod == 'getInsProduct2') {
+ getInsProduct2 = true
+ }
+ }
+ if (!getInsProduct2) {
+ this.componentData.do.splice(5, 1)
}
if (!claim) {
- this.componentData.do.splice(3, 1)
+ this.componentData.do.splice(4, 1)
}
if (!review) {
- this.componentData.do.splice(2, 1)
+ this.componentData.do.splice(3, 1)
}
if (!connect) {
- this.componentData.do.splice(1, 1)
+ this.componentData.do.splice(2, 1)
}
if (!inspection) {
- this.componentData.do.splice(0, 1)
+ this.componentData.do.splice(1, 1)
}
+ this.getInsProduct2 = getInsProduct2
+ this.claim = claim
+ this.review = review
+ this.connect = connect
+ this.inspection = inspection
this.jumpTeam = jumpTeam
},
changeCheckBox(val) {
@@ -796,6 +824,7 @@
this.version = row.version
this.orderStateId = row.orderStateId
this.state = 1;
+ this.isLook = false
},
handleConnect(row){
this.orderId = row.id
@@ -847,6 +876,7 @@
this.orderId = row.id
this.version = row.version
this.orderStateId = row.orderStateId
+ this.isLook = false
},
getAuthorizedPerson() {
this.$axios.get(this.$api.user.getUserMenu).then(res => {
@@ -860,6 +890,14 @@
this.personList = data
})
},
+ lookHistory(row){
+ this.isLook = true
+ this.state = 2;
+ this.orderId = row.id
+ this.version = row.version
+ this.orderStateId = row.orderStateId
+ this.num1 = row.num1
+ }
}
}
</script>
diff --git a/src/main.js b/src/main.js
index c230f88..f4acdb6 100644
--- a/src/main.js
+++ b/src/main.js
@@ -20,7 +20,7 @@
//鏈湴
// Vue.prototype.LOCATIONVUE = "http://127.0.0.1:80";
// const javaApi = 'http://127.0.0.1:8001';
-const javaApi = 'http://192.168.159.249:8001';
+const javaApi = 'http://172.20.10.5:8001';
// //閫氫俊娴嬭瘯搴�
// Vue.prototype.LOCATIONVUE = "http://10.1.13.77:8080";
--
Gitblit v1.9.3