From 1f1f6b2f9c8b3614cc8c182b8c4a204cda0e0a9b Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期三, 29 五月 2024 15:15:39 +0800
Subject: [PATCH] 完成人员管理、角色管理优化,完成检验任务光纤配置
---
src/components/view/role-manage.vue | 4
src/main.js | 2
src/components/do/b1-inspect-order-plan/Inspection.vue | 148 ++++++++++++++++++++++++++++++++++++
src/components/do/b1-ins-order/fiberoptic-config.vue | 1
src/components/view/b3-classes.vue | 32 +++++++
src/components/view/person-manage.vue | 12 +-
6 files changed, 187 insertions(+), 12 deletions(-)
diff --git a/src/components/do/b1-ins-order/fiberoptic-config.vue b/src/components/do/b1-ins-order/fiberoptic-config.vue
index 0b51c0e..6b301fa 100644
--- a/src/components/do/b1-ins-order/fiberoptic-config.vue
+++ b/src/components/do/b1-ins-order/fiberoptic-config.vue
@@ -635,6 +635,7 @@
a.bushing = this.bushing
})
this.$message.success('宸蹭繚瀛�')
+ console.log(11111111,this.bushing)
}
}
}
diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue
index b776a4f..391167a 100644
--- a/src/components/do/b1-inspect-order-plan/Inspection.vue
+++ b/src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -175,6 +175,9 @@
<el-row class="title">
<el-col :span="12" style="padding-left: 20px;">妫�楠屽崟璇︽儏</el-col>
<el-col :span="12" style="text-align: right;">
+ <el-button size="small" type="primary" @click="fiberOpticVisible=true" v-if="fiberOptic.length>0">鍏夌氦鍒囨崲</el-button>
+ <el-button size="small" type="primary" @click="fiberOpticTapeVisible=true" v-if="fiberOpticTape.length>0">鍏夌氦甯﹀垏鎹�</el-button>
+ <el-button size="small" type="primary" @click="bushingVisible=true" v-if="bushing.length>0">濂楃鍒囨崲</el-button>
<el-button size="small" type="primary" @click="sampleVisible=true">鏍峰搧鍒囨崲</el-button>
<el-button size="small" type="primary" @click="taskVisible=true">浠诲姟鍒囨崲</el-button>
<el-button size="small" type="primary" @click="addVerifyDia = true" v-show="state==1"
@@ -290,6 +293,43 @@
</table>
</div>
</div>
+ <el-drawer title="鍏夌氦鍒囨崲" :visible.sync="fiberOpticVisible" :size="500">
+ <el-table class="el-table" ref="fiberOpticTable" :data="fiberOptic" height="100%" tooltip-effect="dark" border
+ highlight-current-row @row-click="handleChangeOptic" :row-class-name="tableRowClassName"
+ :current-row-key="currentKey" :row-key="record=>record.index" v-if="fiberOpticVisible">
+ <el-table-column type="index" align="center" label="搴忓彿" width="70px" :key="Math.random()">
+ </el-table-column>
+ <el-table-column prop="bushColor" label="绠″鑹叉爣" min-width="100px" show-overflow-tooltip></el-table-column>
+ <el-table-column prop="color" label="鍏夌氦鑹叉爣" min-width="100px" show-overflow-tooltip></el-table-column>
+ <el-table-column prop="model" label="鍏夌氦瑙勬牸" min-width="130px" show-overflow-tooltip
+ ></el-table-column>
+ <el-table-column prop="standard" label="鍙傝�冩爣鍑�" width="100px" show-overflow-tooltip></el-table-column>
+ </el-table>
+ </el-drawer>
+ <el-drawer title="鍏夌氦甯﹀垏鎹�" :visible.sync="fiberOpticTapeVisible" :size="500">
+ <el-table class="el-table" ref="fiberOpticTapeTable" :data="fiberOpticTape" height="100%" tooltip-effect="dark" border
+ highlight-current-row @row-click="handleChangeTape" :row-class-name="tableRowClassName"
+ :current-row-key="currentKey" :row-key="record=>record.index" v-if="fiberOpticTapeVisible">
+ <el-table-column type="index" align="center" label="搴忓彿" width="70px" :key="Math.random()">
+ </el-table-column>
+ <el-table-column prop="code" label="鍏夌氦甯︾紪鍙�" min-width="110px" show-overflow-tooltip></el-table-column>
+ <el-table-column prop="model" label="鍏夌氦甯﹁鏍�" min-width="110px" show-overflow-tooltip></el-table-column>
+ <el-table-column prop="standard" label="鍙傝�冩爣鍑�" width="90px" show-overflow-tooltip></el-table-column>
+ <el-table-column prop="num" label="鍏夌氦妫�娴嬮噺" min-width="110px" show-overflow-tooltip
+ ></el-table-column>
+ </el-table>
+ </el-drawer>
+ <el-drawer title="濂楃鍒囨崲" :visible.sync="bushingVisible" :size="500">
+ <el-table class="el-table" ref="bushingTable" :data="bushing" height="100%" tooltip-effect="dark" border
+ highlight-current-row @row-click="handleChangeBushing" :row-class-name="tableRowClassName"
+ :current-row-key="currentKey" :row-key="record=>record.index" v-if="bushingVisible">
+ <el-table-column type="index" align="center" label="搴忓彿" width="70px" :key="Math.random()">
+ </el-table-column>
+ <el-table-column prop="color" label="绠¤壊鏍�" min-width="110px" show-overflow-tooltip></el-table-column>
+ <el-table-column prop="num2" label="鏍囬噺" min-width="110px" show-overflow-tooltip></el-table-column>
+ <el-table-column prop="num3" label="娴嬭瘯閲�" min-width="90px" show-overflow-tooltip></el-table-column>
+ </el-table>
+ </el-drawer>
<el-drawer title="鏍峰搧鍒囨崲" :visible.sync="sampleVisible" :size="500">
<el-table class="el-table" ref="productTable" :data="sampleProduct" height="100%" tooltip-effect="dark" border
highlight-current-row @row-click="handleChangeSample" :row-class-name="tableRowClassName"
@@ -423,7 +463,16 @@
addVerifyDia: false,
verifyUser: null,
personList: [],
- enumList: []
+ enumList: [],
+ fiberOpticVisible:false,
+ fiberOpticTapeVisible:false,
+ bushingVisible:false,
+ fiberOpticTape:[],//鍏夌氦甯﹀垪琛�
+ fiberOptic:[],//鍏夌氦鍒楄〃
+ bushing:[],//濂楃鍒楄〃
+ currentFiberOpticTape:null,//褰撳墠鍏夌氦甯�
+ currentFiberOptic:null,//褰撳墠鍏夌氦
+ currentBushing:null,//褰撳墠濂楃
}
},
created() {
@@ -469,6 +518,14 @@
this.getTableLists();
this.componentData.currentId = val;
this.currentKey = 1;
+
+ // 娓呯┖鍏夌氦閰嶇疆鐩稿叧鏁版嵁
+ this.fiberOpticTape = []
+ this.currentFiberOpticTape = null;
+ this.fiberOptic = []
+ this.currentFiberOptic = null;
+ this.bushing = []
+ this.currentBushing = null;
})
},
currentTable(val1, val0) {
@@ -484,9 +541,71 @@
}
},
methods: {
+ handleChangeBushing(row, column, event){
+ this.currentBushing = row;
+ this.fiberOpticTape = []
+ this.currentFiberOpticTape = null;
+ this.fiberOptic = []
+ this.currentFiberOptic = null;
+ if(row.fiber&&row.fiber.length>0){
+ // 鐩存帴閰嶇疆鍏夌氦
+ this.fiberOptic = row.fiber;
+ }else if(row.fibers&&row.fibers.length>0){
+ // 閰嶇疆鍏夌氦甯﹀悗锛屽啀閰嶇疆鍏夌氦
+ this.fiberOpticTape = row.fibers;
+ }
+ this.bushingVisible = false;
+ },
+ handleChangeOptic(row, column, event){
+ this.currentFiberOptic = row;
+ this.currentFiberOptic.productList.forEach(a => {
+ this.param[a.id] = {
+ insValue: [],
+ comValue: [],
+ resValue: null,
+ equipValue: [],
+ equipName: [],
+ insResult: null
+ }
+ })
+ this.getTableLists0(row)
+ this.fiberOpticVisible = false;
+ this.currentKey = row.index
+ },
+ handleChangeTape(row, column, event){
+ this.currentFiberOpticTape = row;
+ this.param = {}
+ this.fiberOptic = []
+ this.currentFiberOptic = null;
+ this.currentFiberOpticTape.productList.forEach(a => {
+ this.param[a.id] = {
+ insValue: [],
+ comValue: [],
+ resValue: null,
+ equipValue: [],
+ equipName: [],
+ insResult: null
+ }
+ })
+ this.getTableLists0(row)
+ if(row.fiber&&row.fiber.length>0){
+ // 閰嶇疆鍏夌氦
+ this.fiberOptic = row.fiber;
+ }
+ this.fiberOpticTapeVisible = false;
+ this.currentKey = row.index
+ },
handleChangeSample(row, column, event) {
this.currentSample = row;
this.param = {}
+ // 娓呯┖鍏夌氦閰嶇疆鐩稿叧鏁版嵁
+ this.fiberOpticTape = []
+ this.currentFiberOpticTape = null;
+ this.fiberOptic = []
+ this.currentFiberOptic = null;
+ this.bushing = []
+ this.currentBushing = null;
+
this.currentSample.insProduct.forEach(a => {
this.param[a.id] = {
insValue: [],
@@ -497,6 +616,10 @@
insResult: null
}
})
+ let bushing = this.currentSample.insProduct.bushing
+ if(bushing&&bushing.length>0){
+ this.bushing = bushing
+ }
// this.handleTableData()
this.getTableLists();
this.sampleVisible = false;
@@ -590,6 +713,29 @@
this.handleTableData()
}
},
+ // 鍏夌氦閰嶇疆鐩稿叧妯℃澘table鍒楄〃
+ getTableLists0(obj){
+ const mySet1 = new Set();
+ this.tableLists = obj.productList.filter(m => {
+ let num0 = mySet1.size;
+ if (m.templateId != null&&m.template != null) {
+ mySet1.add(JSON.stringify({
+ template: m.template,
+ templateId: m.templateId
+ }))
+ }
+ let num1 = mySet1.size;
+ if (num1 > num0) {
+ return m
+ }
+ });
+ if (this.tableLists && this.tableLists.length > 0) {
+ this.tableList = null;
+ this.tableList = [this.tableLists[0]]
+ this.currentTable = this.tableLists[0].templateId;
+ this.handleTableData()
+ }
+ },
handleTableData() {
this.excelMethodList = []
this.widthList = this.tableList[0].style.columnlen;
diff --git a/src/components/view/b3-classes.vue b/src/components/view/b3-classes.vue
index 4c533b5..0171ca0 100644
--- a/src/components/view/b3-classes.vue
+++ b/src/components/view/b3-classes.vue
@@ -68,7 +68,7 @@
</div>
</div>
</div>
- <div class="scroll-right">
+ <div class="scroll-right" id="nav" style="cursor: move;">
<div class="content">
<div class="content-title content-title-right" style="border-bottom: 0;">
<div class="content-title-item" v-for="(item,index) in weeks" :key="'b'+index">
@@ -324,6 +324,7 @@
}
this.monthList.reverse()
// this.getPower()
+ this.scrollInit()
},
methods: {
refresh(){
@@ -634,6 +635,33 @@
return obj.label
}
return '鏃�'
+ },
+ scrollInit() {
+ // 鑾峰彇瑕佺粦瀹氫簨浠剁殑鍏冪礌
+ const nav = document.getElementById("nav")
+ var flag; // 榧犳爣鎸変笅
+ var downX; // 榧犳爣鐐瑰嚮鐨剎涓嬫爣
+ var scrollLeft; // 褰撳墠鍏冪礌婊氬姩鏉$殑鍋忕Щ閲�
+ nav.addEventListener("mousedown", function(event) {
+ flag = true;
+ downX = event.clientX; // 鑾峰彇鍒扮偣鍑荤殑x涓嬫爣
+ scrollLeft = this.scrollLeft; // 鑾峰彇褰撳墠鍏冪礌婊氬姩鏉$殑鍋忕Щ閲�
+ });
+ nav.addEventListener("mousemove", function(event) {
+ if (flag) { // 鍒ゆ柇鏄惁鏄紶鏍囨寜涓嬫粴鍔ㄥ厓绱犲尯鍩�
+ var moveX = event.clientX; // 鑾峰彇绉诲姩鐨剎杞�
+ var scrollX = moveX - downX; // 褰撳墠绉诲姩鐨剎杞翠笅鏍囧噺鍘诲垰鐐瑰嚮涓嬪幓鐨剎杞翠笅鏍囧緱鍒伴紶鏍囨粦鍔ㄨ窛绂�
+ this.scrollLeft = scrollLeft - scrollX // 榧犳爣鎸変笅鐨勬粴鍔ㄦ潯鍋忕Щ閲忓噺鍘诲綋鍓嶉紶鏍囩殑婊戝姩璺濈
+ }
+ });
+ // 榧犳爣鎶捣鍋滄鎷栧姩
+ nav.addEventListener("mouseup", function() {
+ flag = false;
+ });
+ // 榧犳爣绂诲紑鍏冪礌鍋滄鎷栧姩
+ nav.addEventListener("mouseleave", function(event) {
+ flag = false;
+ });
}
}
}
@@ -698,6 +726,8 @@
min-height: calc(100% - 10px); /* 瑙嗗彛楂樺害 */
margin-left: 220px;
overflow-x: scroll;
+ /* overflow-x: hidden; */
+ cursor: move;
}
.content {
diff --git a/src/components/view/person-manage.vue b/src/components/view/person-manage.vue
index 5938846..1467cdb 100644
--- a/src/components/view/person-manage.vue
+++ b/src/components/view/person-manage.vue
@@ -252,9 +252,6 @@
</template>
<script>
- import {
- compileToFunctions
- } from 'vue-template-compiler'
import ValueTable from '../tool/value-table.vue'
export default {
components: {
@@ -438,6 +435,7 @@
})
},
opeaAdd() {
+ console.log(this.addOb.fatherId,this.selectTree)
if (!this.addOb.fatherId || this.selectTree == '' || this.selectTree == '鍏ㄩ儴') {
this.$message.error('璇烽�夋嫨涓�涓粍缁�')
return
@@ -538,7 +536,7 @@
},
getNodeParent(val) {
if (val.parent != null) {
- this.selectTree += ' - ' + val.label
+ this.selectTree += ' - ' + val.data.name
this.getNodeParent(val.parent)
}
},
@@ -600,7 +598,7 @@
})
},
nodeClick2(ob, node, el) {
- this.getNodeParent(node)
+ this.getNodeParent0(node)
if (ob.id !== 'SC21') {
this.personLoad = true
this.$axios.post(this.$api.companies.selectSimpleList, {
@@ -613,10 +611,10 @@
})
}
},
- getNodeParent(val){
+ getNodeParent0(val){
this.currentCompaniesList[val.level-1] = val.data.id
if(val.parent!=null){
- this.getNodeParent(val.parent)
+ this.getNodeParent0(val.parent)
}
},
handleSelectionChange(val) {
diff --git a/src/components/view/role-manage.vue b/src/components/view/role-manage.vue
index 2b4d91b..b932850 100644
--- a/src/components/view/role-manage.vue
+++ b/src/components/view/role-manage.vue
@@ -76,8 +76,8 @@
<template slot="title">
<i class="el-icon-circle-plus-outline" style="margin-right: 10px;"></i>{{category}}
</template>
- <div style="padding: 3px 30px;" v-for="(a, ai) in menu" :key="ai" v-if="a.type==category"><el-checkbox
- v-model="a.isClick" :disabled="type=='鏌ョ湅'">{{a.remark}}</el-checkbox></div>
+ <div style="padding: 3px 30px;display: flex;align-items: center;justify-content: space-between;" v-for="(a, ai) in menu" :key="ai" v-if="a.type==category" ><el-checkbox
+ v-model="a.isClick" :disabled="type=='鏌ョ湅'">{{a.remark}}</el-checkbox> <el-checkbox v-model="a.look" v-if="a.remark.includes('鏌ヨ')||a.remark.includes('鑾峰彇')" :disabled="type=='鏌ョ湅'">鍙湅鎴�</el-checkbox></div>
</el-collapse-item>
<!-- <el-collapse-item title="鏌ヨ">
<el-row style="padding: 3px 30px;" v-for="(a, ai) in menu" :key="ai" v-if="a.type=='鏌ヨ'">
diff --git a/src/main.js b/src/main.js
index 3e9e227..72b15e5 100644
--- a/src/main.js
+++ b/src/main.js
@@ -14,7 +14,7 @@
//鏈湴
Vue.prototype.LOCATIONVUE = "http://127.0.0.1:80";
const javaApi = 'http://192.168.11.200:8001';//鏉�
-// const javaApi = 'http://10.20.102.168:8001';//寮�
+// const javaApi = 'http://192.168.11.249:8001';//寮�
// const javaApi = 'http://172.20.10.3:8001';//濮�
// const javaApi = 'http://192.168.11.2:8001';//鏌�
// const javaApi = 'http://127.0.0.1:8001';//鏅�
--
Gitblit v1.9.3