From 6a3ac9820a45b566c68b21b11c73badd59c8e6e1 Mon Sep 17 00:00:00 2001
From: XiaoRuby <3114200645@qq.com>
Date: 星期一, 28 八月 2023 14:11:48 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/main.js | 2
index.html | 2
src/components/view/technicalaa.vue | 240 ++++++++++
src/view/index.vue | 1104 +++++++++++++++++++++++------------------------
src/assets/api/controller.js | 7
src/components/view/sale.vue | 8
6 files changed, 778 insertions(+), 585 deletions(-)
diff --git a/index.html b/index.html
index ec27d48..af19376 100644
--- a/index.html
+++ b/index.html
@@ -6,7 +6,7 @@
<meta http-equiv="Expires" CONTENT="0">
<meta http-equiv="Cache-Control" CONTENT="no-cache">
<meta http-equiv="Pragma" CONTENT="no-cache">
- <title>涓ぉ鐢电紗闄勪欢MOM</title>
+ <title>涓ぉ娴锋磱MOM</title>
<link rel="icon" type="image/x-icon" href="./static/img/logo.png">
</head>
<body>
diff --git a/src/assets/api/controller.js b/src/assets/api/controller.js
index 6b25983..bb906e5 100644
--- a/src/assets/api/controller.js
+++ b/src/assets/api/controller.js
@@ -8,11 +8,6 @@
selectAllOrder: "/orders/selectAllOrder", //鏌ヨ鎵�鏈夎鍗曞垪琛�
selectOrderById: "/orders/selectOrderById", //鏍规嵁璁㈠崟id鏌ヨ璁㈠崟璇︽儏
}
-//鎶�鏈鐞�-璁㈠崟Bom
-const purchaseorder= {
- selectAllOrder:"/orders/selectAllOrder",
- compile:"/orders/compile" //缂栧埗
-}
// 鍘熸潗鏂欐楠�
const raw = {
selectRawInspectsList: "rawInspect/selectRawInspectsList", //鏌ヨ鍘熸潗鏂欐楠屽崟鍒楄〃
@@ -73,7 +68,7 @@
...finishedIns,
...unqualifiedaa,
...dispose,
- ...purchaseorder,
+ // ...gettable,
selectSaleList: "sale/selectSaleList", //鏌ヨ閿�鍞崟鍒楄〃
selectSaleDatilById: "sale/selectSaleDatilById", //鏍规嵁閿�鍞崟id鏌ョ湅璇︽儏,
addSale: "sale/addSale", //鏂板閿�鍞崟
diff --git a/src/components/view/sale.vue b/src/components/view/sale.vue
index 0df137d..bdec015 100644
--- a/src/components/view/sale.vue
+++ b/src/components/view/sale.vue
@@ -50,7 +50,7 @@
.select-model .body {
padding: 0 20px;
color: #333;
- max-height: 70vh;
+ max-height: 72vh;
overflow-y: auto;
}
@@ -282,7 +282,7 @@
</el-dialog>
</div>
<div class="select-model">
- <el-dialog :title="`閿�鍞�${upDia==true?'淇敼':'鏂板'}`" :visible.sync="addDia" width="800px">
+ <el-dialog :title="`閿�鍞�${upDia==true?'淇敼':'鏂板'}`" :visible.sync="addDia" width="850px">
<div class="body">
<div class="head">鍩烘湰淇℃伅</div>
<div class="content">
@@ -351,7 +351,7 @@
</el-input>
</template>
</el-table-column>
- <el-table-column prop="specifications" label="瑙勬牸鍨嬪彿" width="200">
+ <el-table-column prop="specifications" label="瑙勬牸鍨嬪彿" width="180">
<template slot-scope="scope">
<el-input v-model="scope.row.specifications" size="small" clearable placeholder="璇疯緭鍏ヨ鏍煎瀷鍙�"></el-input>
</template>
@@ -364,7 +364,7 @@
<el-table-column prop="number" label="鏁伴噺">
<template slot-scope="scope">
<el-input v-model.number="scope.row.number" size="small"
- @change="scope.row.number = isNaN(scope.row.number)?0:scope.row.number" clearable
+ @change="(val)=>scope.row.number = isNaN(val)?null:val" clearable
placeholder="璇疯緭鍏�"></el-input>
</template>
</el-table-column>
diff --git a/src/components/view/technicalaa.vue b/src/components/view/technicalaa.vue
new file mode 100644
index 0000000..4427f08
--- /dev/null
+++ b/src/components/view/technicalaa.vue
@@ -0,0 +1,240 @@
+<template>
+ <div>
+ <div class="article-main" style="overflow: hidden;">
+ <el-row>
+ <el-col :span="12" style="line-height: 32px;">璁㈠崟BOM</el-col>
+ <el-col :span="12" style="text-align: right;">
+ <el-button icon="el-icon-download" size="mini" @click="()=>{}">瀵煎嚭</el-button>
+ </el-col>
+ </el-row>
+ <div>
+
+ <div style="margin-top: 10px;">
+ <el-card shadow="hover" class="margin-30">
+ <el-form ref="form" :model="searchform" label-width="80px">
+ <el-row :gutter="30">
+ <el-col :span="4" >
+ <el-form-item label="璁㈠崟鍙�:">
+ <el-input v-model="searchform.orderCode" placeholder="璇疯緭鍏�"></el-input>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="4" >
+ <el-form-item label="浜у搧鍚嶇О:">
+ <el-input v-model="searchform.name" placeholder="璇疯緭鍏�"></el-input>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="4" >
+ <el-form-item label="涓嬪崟鏃ユ湡">
+ <el-col>
+ <el-date-picker type="date" placeholder="閫夋嫨鏃ユ湡" v-model="searchform.time" weight="80%"></el-date-picker>
+ </el-col>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="4" >
+ <el-form-item label="鐘舵��:">
+ <el-input v-model="searchform.type" placeholder="璇疯緭鍏�"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="4">
+ <el-button size="default" @click="">閲嶇疆</el-button>
+ <el-button type="primary" size="default" style="background:0, 78, 162 ;" @click="query">鏌ヨ</el-button>
+
+ </el-col>
+ </el-row>
+ </el-form>
+ </el-card>
+ </div>
+
+ <div style="margin-top: 30px;">
+ <el-card shadow="hover" class="margin-30">
+ <el-table
+ ref="multipleTable"
+ :data="tableData"
+ tooltip-effect="dark"
+ border
+ style="width: 100%"
+ @selection-change="handleSelectionChange">
+
+ <el-table-column
+ type="selection"
+ width="55">
+ </el-table-column>
+
+ <el-table-column
+ prop="order_number"
+ label="璁㈠崟鍙�"
+ width="120">
+ <!-- <template slot-scope="scope">{{ scope.row.date }}</template> -->
+ </el-table-column>
+
+ <el-table-column
+ prop="saleman"
+ label="浜嬩笟閮�"
+ >
+ </el-table-column>
+ <el-table-column
+ prop=""
+ label="鐪佷唤"
+ show-overflow-tooltip>
+ </el-table-column>
+ <el-table-column
+ prop=""
+ label="涓氬姟鍛�"
+ >
+ </el-table-column>
+ <el-table-column
+ prop="proname"
+ label="瀹㈡埛鍚嶇О"
+ >
+ </el-table-column>
+ <el-table-column
+ prop="name"
+ label="浜у搧鍚嶇О"
+ >
+ </el-table-column>
+ <el-table-column
+ prop="name"
+ label="瑙勬牸鍨嬪彿"
+ >
+ </el-table-column>
+ <el-table-column
+ prop="unit"
+ label="鍗曚綅"
+ >
+ </el-table-column>
+ <el-table-column
+ prop="number"
+ label="鏁伴噺"
+ >
+ </el-table-column>
+ <el-table-column
+ prop="涓嬪崟鏃ユ湡"
+ label="涓嬪崟鏃ユ湡"
+ >
+ </el-table-column>
+ <el-table-column
+ prop="浜よ揣鏃ユ湡"
+ label="浜よ揣鏈�"
+ >
+ </el-table-column>
+ <el-table-column
+ prop="type"
+ label="鐘舵��"
+ width="120">
+ <template slot-scope="scope">
+ <span style="color:#34BD66;" v-if="scope.row.type==1">宸茬紪杈�</span>
+ <span style="color:#E84738;" v-else-if="scope.row.type==0">鏈紪杈�</span>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop=""
+ label="鎿嶄綔"
+ width="180">
+ <template slot-scope="scope">
+ <div style="display: flex;">
+ <el-button type="text" siae="small" size="mini">鏌ヨ鏂囦欢</el-button>
+
+ <el-button type="text" siae="small" size="mini" @click="compileApi">缂栧埗</el-button>
+
+ <el-button type="text" siae="small" size="mini" style=" color:87, 138, 193 ;" @click="">鍒犻櫎</el-button>
+ </div>
+ </template>
+ </el-table-column>
+
+ </el-table>
+ </el-card>
+ <el-col style="height: 50px;display: flex;align-items: center;justify-content: right;">
+ <el-pagination
+ @size-change="handleSizeChange"
+ @current-change="handleCurrentChange"
+ :current-page="0"
+ :page-sizes="[1,5,10, 20, 30, 50]"
+ :page-size="0"
+ layout="total, sizes, prev, pager, next, jumper"
+ :total="countSize">
+ </el-pagination>
+ </el-col>
+ </div>
+ </div>
+ </div>
+ </div>
+</template>
+
+
+
+<script>
+export default {
+ data() {
+ return {
+ searchform:{
+ name:'',
+ type:'',
+ orderCode:'',
+ time:'',
+ },
+ tableData:[],
+
+ pageSize:1,
+ countSize:0,
+ currentPage:1,
+ multipleSelection:''
+ }
+ },
+ props:['godata'],
+ created(){
+ this.getDetailInfo()
+ },
+ methods:{
+ handleSelectionChange(val) {
+ // console.log(val);
+ this.multipleSelection = val;
+ },
+ handleSizeChange(val) {
+ this.pageSize = 1
+ this.countSize= val
+ this.getDetailInfo()
+ },
+ handleCurrentChange(val) {
+ this.pageSize = val
+ this.getDetailInfo()
+ },
+ getDetailInfo() {
+
+ this.axios.get(this.$api.url.selectAllOrder,{
+ params:{countSize:this.currentPage,
+ pageSize:this.pageSize,total:this.countSize,
+ productName:this.searchform.name,
+ },
+ }).then(res=>{
+ this.tableData = res.data.row
+ })
+ },
+ compileApi() {
+ this.axios.post(this.$api.url.compile,{id})
+ .then(res=>{
+ console.log(res);
+ })
+
+
+ },
+ // query() {
+ // this.tableData(this.)
+ // }
+
+}}
+
+
+</script>
+<style scoped>
+.card-2{
+ display: flex;
+ margin-top: 30px;
+}
+
+.ssss{
+ background-color: #fff;
+}
+</style>
\ No newline at end of file
diff --git a/src/main.js b/src/main.js
index 72f68aa..112ae06 100644
--- a/src/main.js
+++ b/src/main.js
@@ -23,7 +23,7 @@
Vue.use(qs);
Vue.use(api);
-const javaApi = 'http://localhost:8001/'
+const javaApi = 'http://192.168.110.107:8001/'
axios.defaults.baseURL = javaApi
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8'
diff --git a/src/view/index.vue b/src/view/index.vue
index fcdc5f9..afd301c 100644
--- a/src/view/index.vue
+++ b/src/view/index.vue
@@ -1,611 +1,569 @@
<style scoped>
-.all {
- width: 100vw;
- height: 100vh;
- background-size: 100% 100%;
- display: flex;
- flex-wrap: wrap;
- overflow: hidden;
-}
+ .all {
+ width: 100vw;
+ height: 100vh;
+ background-size: 100% 100%;
+ display: flex;
+ flex-wrap: wrap;
+ }
-.title {
- width: 100%;
- height: 58px;
- display: flex;
- align-items: center;
- padding: 0 30px;
-}
+ .title {
+ width: 100%;
+ height: 58px;
+ display: flex;
+ align-items: center;
+ padding: 0 30px;
+ }
-.logo {
- width: 130px;
-}
+ .logo {
+ width: 130px;
+ }
-.logo img {
- width: 100%;
- height: 100%;
-}
+ .logo img {
+ width: 100%;
+ height: 100%;
+ }
-.title .label {
- font-size: 18px;
- text-align: center;
- width: calc(100% - 130px - 200px);
-}
+ .title .label {
+ font-size: 18px;
+ text-align: center;
+ width: calc(100% - 130px - 200px);
+ }
-.user {
- width: 200px;
- height: 100%;
- display: flex;
- align-items: center;
- justify-content: right;
- color: #000;
-}
+ .user {
+ width: 200px;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: right;
+ color: #000;
+ }
-.user * {
- margin: 0 5px;
-}
+ .user * {
+ margin: 0 5px;
+ }
-.user img {
- margin-left: 20px;
- cursor: pointer;
- width: 14px;
-}
+ .user img {
+ margin-left: 20px;
+ cursor: pointer;
+ width: 14px;
+ }
-.user span {
- font-size: 14px;
-}
+ .user span {
+ font-size: 14px;
+ }
-.left {
- width: 92px;
- height: calc(100vh - 58px - 40px);
- background-color: #004ea2;
- display: flex;
- align-items: center;
- flex-direction: column;
- padding: 20px 0;
- overflow-y: auto;
-}
+ .left {
+ height: calc(100vh - 58px - 40px);
+ background-color: #004ea2;
+ display: flex;
+ align-items: center;
+ flex-direction: column;
+ padding: 20px 0;
+ transition: .3s;
+ }
-.left::-webkit-scrollbar {
- width: 0;
-}
+ .left .box {
+ color: #fff;
+ width: 68px;
+ height: 68px;
+ margin: 8px 0;
+ cursor: pointer;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ flex-direction: column;
+ border-radius: 8px;
+ }
-.left .box {
- color: #fff;
- width: 68px;
- height: 68px;
- margin: 8px 0;
- cursor: pointer;
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: column;
- border-radius: 8px;
-}
+ .left .box:active {
+ opacity: 0.8;
+ }
-.left .box:active {
- opacity: 0.8;
-}
+ .left .active_box {
+ background-color: #fff;
+ color: #004ea2;
+ }
-.left .active_box {
- background-color: #fff;
- color: #004ea2;
-}
+ .left .box i {
+ font-size: 32px;
+ margin-bottom: 8px;
+ }
-.left .box i {
- font-size: 32px;
- margin-bottom: 8px;
-}
+ .left .box div {
+ font-size: 14px;
+ }
-.left .box div {
- font-size: 14px;
-}
+ .small_menu {
+ color: #666;
+ }
-.small_menu {
- color: #666;
-}
+ .small_menu .active_p {
+ color: #004ea2;
+ }
-.small_menu .active_p {
- color: #004ea2;
-}
+ .small_menu p {
+ padding: 12px 15px;
+ cursor: pointer;
+ }
-.small_menu p {
- padding: 12px 15px;
- cursor: pointer;
-}
+ .small_menu p:hover {
+ background-color: rgba(0, 0, 0, 0.05);
+ }
-.small_menu p:hover {
- background-color: rgba(0, 0, 0, 0.05);
-}
+ .small_menu i {
+ font-size: 16px;
+ }
-.small_menu i {
- font-size: 16px;
-}
+ .small_menu span {
+ font-size: 14px;
+ }
-.small_menu span {
- font-size: 14px;
-}
+ .right {
+ height: calc(100vh - 58px);
+ transition: .3s;
+ }
-.right {
- width: calc(100% - 92px);
- height: calc(100vh - 58px);
-}
+ .tag {
+ width: 100%;
+ height: 36px;
+ background: rgb(255, 255, 255);
+ opacity: 0.8;
+ box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.1);
+ display: flex;
+ align-items: center;
+ color: #999;
+ font-size: 14px;
+ }
-.tag {
- width: 100%;
- height: 36px;
- background: rgb(255, 255, 255);
- opacity: 0.8;
- box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.1);
- display: flex;
- align-items: center;
- color: #999;
- font-size: 14px;
-}
+ .tag > .el-icon-s-unfold,.el-icon-s-fold {
+ font-size: 18px;
+ cursor: pointer;
+ margin: 0 8px;
+ }
-.tag .el-icon-s-unfold {
- font-size: 18px;
- cursor: pointer;
- margin: 0 8px;
-}
+ .tabs {
+ min-width: calc(100% - 34px);
+ height: 100%;
+ align-items: center;
+ display: flex;
+ overflow-x: auto;
+ }
-.tabs {
- min-width: calc(100% - 34px);
- height: 100%;
- align-items: center;
- display: flex;
- overflow-x: auto;
-}
+ .tab {
+ cursor: pointer;
+ font-size: 14px;
+ margin: 0 8px;
+ line-height: 32px;
+ transition: 0.3s;
+ border-top: 2px solid transparent;
+ border-bottom: 2px solid transparent;
+ user-select: none;
+ flex-shrink: 0;
+ }
-.tab {
- cursor: pointer;
- font-size: 14px;
- margin: 0 8px;
- line-height: 32px;
- transition: 0.3s;
- border-top: 2px solid transparent;
- border-bottom: 2px solid transparent;
- user-select: none;
- flex-shrink: 0;
-}
+ .tab i {
+ font-size: 12px;
+ display: none;
+ }
-.tab i {
- font-size: 12px;
- display: none;
-}
+ .active_tab {
+ border-bottom: 2px solid #004ea2;
+ color: #004ea2;
+ }
-.active_tab {
- border-bottom: 2px solid #004ea2;
- color: #004ea2;
-}
+ .active_tab i {
+ display: inline;
+ color: #004ea2;
+ }
-.active_tab i {
- display: inline;
- color: #004ea2;
-}
+ .component_view {
+ height: calc(100vh - 94px - 22px);
+ width: calc(100% - 48px);
+ padding: 11px 24px;
+ background: rgb(245, 247, 251);
+ }
-.component_view {
- height: calc(100vh - 94px - 22px);
- width: calc(100% - 48px);
- padding: 11px 24px;
- background: rgb(245, 247, 251);
-}
-
-.com_index {
- width: 100%;
- height: 100%;
-}
+ .com_index {
+ width: 100%;
+ height: 100%;
+ }
</style>
<style></style>
<template>
- <div class="all">
- <div class="title">
- <div class="logo">
- <img src="../../static/img/logo 1.png" />
- </div>
- <div class="label">鐢电紗闄勪欢鏂颁竴浠om绯荤粺</div>
- <div class="user">
- <el-avatar :size="24">{{ userName.substring(0, 1) }}</el-avatar>
- <span>{{ userName }}</span>
- <img src="../../static/img/閫�鍑�.png" @click="out" />
- </div>
- </div>
- <div class="left">
- <div
- :class="`box ${activeBox == 0 ? 'active_box' : ''}`"
- @click="addTab(menu[0].c[0])"
- >
- <i class="font icon-shouye"></i>
- <div>棣栭〉</div>
- </div>
- <div
- :class="`box ${activeBox == 3 ? 'active_box' : ''}`"
- @click="addTab(menu[1].c[0])"
- >
- <i class="font icon-jine"></i>
- <div>閿�鍞鐞�</div>
- </div>
- <el-popover
- placement="right-start"
- width="90"
- trigger="click"
- v-for="(a, ai) in menu"
- :key="ai"
- v-if="a.k != '0' && a.k != '3'"
- >
- <div
- :class="`box ${activeBox == a.k ? 'active_box' : ''}`"
- @click="activeBox = a.k"
- slot="reference"
- >
- <i :class="a.i"></i>
- <div>{{ a.v }}</div>
- </div>
- <div class="small_menu">
- <p
- v-for="(b, bi) in a.c"
- :key="bi"
- :class="activeP == b.k ? 'active_p' : ''"
- @click="addTab(b)"
- >
- <i :class="b.i"></i>
- <span>{{ b.v }}</span>
- </p>
- </div>
- </el-popover>
- </div>
- <div class="right">
- <div class="tag">
- <i class="el-icon-s-unfold"></i>
- <div class="tabs">
- <div
- :class="`tab ${tabActive == a.k ? 'active_tab' : ''}`"
- v-for="(a, ai) in tabs"
- :key="ai"
- @click="upTabActive(a.k)"
- >
- {{ a.v }}
- <i class="el-icon-close" @click="removeTab(ai)"></i>
- </div>
- </div>
- </div>
- <div class="component_view">
- <component
- class="com_index"
- v-for="(com, index) in tabs"
- :is="com.u"
- :key="upIndex + '|' + index"
- v-show="com.k == tabActive"
- >
- </component>
- </div>
- </div>
- </div>
+ <div class="all">
+ <div class="title">
+ <div class="logo">
+ <img src="../../static/img/logo 1.png" />
+ </div>
+ <div class="label">涓ぉ娴锋磱鏂颁竴浠om绯荤粺</div>
+ <div class="user">
+ <el-avatar :size="24">{{ userName.substring(0, 1) }}</el-avatar>
+ <span>{{ userName }}</span>
+ <img src="../../static/img/閫�鍑�.png" @click="out" />
+ </div>
+ </div>
+ <div class="left" :style="`width: ${leftOpen?'92':'0'}px;`">
+ <div :class="`box ${activeBox == 0 ? 'active_box' : ''}`" @click="addTab(menu[0].c[0])">
+ <i class="font icon-shouye"></i>
+ <div>棣栭〉</div>
+ </div>
+ <div :class="`box ${activeBox == 3 ? 'active_box' : ''}`" @click="addTab(menu[1].c[0])">
+ <i class="font icon-jine"></i>
+ <div>閿�鍞鐞�</div>
+ </div>
+ <el-popover placement="right-start" width="90" trigger="click" v-for="(a, ai) in menu" :key="ai"
+ v-if="a.k != '0' && a.k != '3'">
+ <div :class="`box ${activeBox == a.k ? 'active_box' : ''}`" @click="activeBox = a.k" slot="reference">
+ <i :class="a.i"></i>
+ <div>{{ a.v }}</div>
+ </div>
+ <div class="small_menu">
+ <p v-for="(b, bi) in a.c" :key="bi" :class="activeP == b.k ? 'active_p' : ''" @click="addTab(b)">
+ <i :class="b.i"></i>
+ <span>{{ b.v }}</span>
+ </p>
+ </div>
+ </el-popover>
+ </div>
+ <div class="right" :style="`width: calc(100% - ${leftOpen?'92':'0'}px);`">
+ <div class="tag">
+ <i :class="`${leftOpen?'el-icon-s-unfold':'el-icon-s-fold'}`" @click="leftOpen = !leftOpen"></i>
+ <div class="tabs">
+ <div :class="`tab ${tabActive == a.k ? 'active_tab' : ''}`" v-for="(a, ai) in tabs" :key="ai"
+ @click="upTabActive(a.k)">
+ {{ a.v }}
+ <i class="el-icon-close" @click="removeTab(ai)" v-if="tabActive!=0"></i>
+ </div>
+ </div>
+ </div>
+ <div class="component_view">
+ <component class="com_index" v-for="(com, index) in tabs" :is="com.u" :key="upIndex + '|' + index"
+ v-show="com.k == tabActive">
+ </component>
+ </div>
+ </div>
+ </div>
</template>
<script>
-const requireComponent = require.context("../components/view", false, /\.vue/);
-var comObj = {};
-requireComponent.keys().forEach(fileName => {
- var names = fileName
- .split("/")
- .pop()
- .replace(".vue", "");
- const componentConfig = requireComponent(fileName);
- comObj[names] = componentConfig.default || componentConfig;
-});
-export default {
- components: comObj,
- data() {
- return {
- userName: "value",
- menu: [
- {
- k: 0,
- v: "棣栭〉",
- i: "font icon-shouye",
- c: [
- {
- k: 0,
- v: "棣栭〉",
- i: "font icon-shouye",
- u: "index-index"
- }
- ]
- },
- {
- k: 3,
- v: "閿�鍞鐞�",
- i: "font icon-jine",
- c: [
- {
- k: 11,
- v: "閿�鍞鐞�",
- i: "font icon-jine",
- u: "sale"
- }
- ]
- },
- {
- k: 4,
- v: "鐢熶骇绠$悊",
- i: "font icon-shouye",
- c: [
- {
- k: 12,
- v: "鐢熶骇璁㈠崟",
- i: "font icon-shouye",
- u: ""
- },
- {
- k: 13,
- v: "鐢熶骇璁″垝",
- i: "font icon-shouye",
- u: ""
- },
- {
- k: 14,
- v: "鐢熶骇鎶ュ伐",
- i: "font icon-shouye",
- u: ""
- }
- ]
- },
- {
- k: 5,
- v: "WMS绠$悊",
- i: "font icon-shouye",
- c: [
- {
- k: 15,
- v: "鍘熸潗鏂欏簱瀛�",
- i: "font icon-shouye",
- u: ""
- },
- {
- k: 16,
- v: "鍥炲崟绠$悊",
- i: "font icon-shouye",
- u: ""
- },
- {
- k: 17,
- v: "鍗婃垚鍝佸簱瀛�",
- i: "font icon-shouye",
- u: ""
- },
- {
- k: 18,
- v: "鎴愬搧搴撳瓨",
- i: "font icon-shouye",
- u: ""
- },
- {
- k: 19,
- v: "鎴愬搧鍙戣揣",
- i: "font icon-shouye",
- u: ""
- },
- {
- k: 20,
- v: "鎴愬搧鍏ュ簱",
- i: "font icon-shouye",
- u: ""
- }
- ]
- },
- {
- k: 1,
- v: "鎶�鏈鐞�",
- i: "font icon-shouye",
- c: [
- {
- k: 1,
- v: "鏍囧噯BOM",
- i: "font icon-shouye",
- u: "standard"
- },
- {
- k: 2,
- v: "璁㈠崟Bom",
- i: "font icon-shouye",
- u: "technicalaa"
- }
- ]
- },
- {
- k: 2,
- v: "QMS绠$悊",
- i: "font icon-shouye",
- c: [
- {
- k: 3,
- v: "鍘熸潗鏂欐楠�",
- i: "font icon-shouye",
- u: "rawInsBox"
- },
- {
- k: 4,
- v: "鍘熸潗鏂欎笉鍚堟牸鍝�",
- i: "font icon-shouye",
- u: "rawUnqualifiedBox"
- },
- {
- k: 5,
- v: "杩囩▼妫�楠�",
- i: "font icon-shouye",
- u: "processInspection"
- },
- {
- k: 6,
- v: "鎴愬搧妫�楠�",
- i: "font icon-shouye",
- u: "finishedProductInspection"
- },
- {
- k: 7,
- v: "涓嶅悎鏍煎搧绠$悊",
- i: "font icon-shouye",
- u: "unqualifiedManagement"
- },
- {
- k: 9,
- v: "璐ㄩ噺缁熻",
- i: "font icon-shouye",
- u: ""
- },
- {
- k: 10,
- v: "璁¢噺绠$悊",
- i: "font icon-shouye",
- u: "measurementManagement"
- },
- {
- k: 10.1,
- v: "宸℃",
- i: "font icon-shouye",
- u: ""
- },
- {
- k: 10.2,
- v: "涓嶅悎鏍煎搧澶勭疆",
- i: "font icon-shouye",
- u: "Processingproducts"
- }
- ]
- },
- {
- k: 6,
- v: "鏍哥畻绠$悊",
- i: "font icon-shouye",
- c: [
- {
- k: 21,
- v: "浜ч噺宸ヨ祫",
- i: "font icon-shouye",
- u: ""
- },
- {
- k: 22,
- v: "鍛樺伐鍑哄嫟",
- i: "font icon-shouye",
- u: ""
- }
- ]
- },
- {
- k: 7,
- v: "鍩虹鏁版嵁",
- i: "font icon-shouye",
- c: [
- {
- k: 23,
- v: "宸ュ簭缁存姢",
- i: "font icon-shouye",
- u: ""
- },
- {
- k: 24,
- v: "鑷缁存姢",
- i: "font icon-shouye",
- u: "self-inspection"
- },
- {
- k: 25,
- v: "鎶�鏈寚鏍囩淮鎶�",
- i: "font icon-shouye",
- u: ""
- },
- {
- k: 26,
- v: "宸ヨ壓璺嚎缁存姢",
- i: "font icon-shouye",
- u: "technology"
- },
- {
- k: 27,
- v: "璁惧缁存姢",
- i: "font icon-shouye",
- u: "laboratoryManagement"
- },
- {
- k: 28,
- v: "鐗╂枡娓呭崟缁存姢",
- i: "font icon-shouye",
- u: "mbom"
- }
- ]
- }
- ],
- activeBox: 0,
- activeP: 0,
- tabActive: 0,
- tabs: [
- {
- k: 0,
- v: "棣栭〉",
- i: "font icon-shouye",
- u: "index-index"
- }
- ],
- upIndex: 0
- };
- },
- created() {},
- mounted() {
- this.userName = JSON.parse(localStorage.getItem("user")).name;
- },
- methods: {
- addTab(ob) {
- if (ob.k == 0) this.activeBox = 0;
- if (ob.k == 11) this.activeBox = 3;
- this.activeP = ob.k; //0
- this.tabActive = ob.k; //0
- let num = -1;
- this.tabs.forEach((a, ai) => {
- if (ob.k == a.k) {
- num = a.k;
- }
- });
- // 濡傛灉娌℃湁閬嶅巻鍒皌abs閲屾病鏈夎ob瀵瑰簲鐨則able锛屽線tabs閲岄潰鍔犲叆璇b
- if (num == -1) {
- this.tabs.push(ob);
- }
- },
- removeTab(index) {
- if (this.tabs.length > 1) {
- this.tabs.splice(index, 1);
- this.activeP = this.tabs[this.tabs.length - 1].k;
- this.tabActive = this.tabs[this.tabs.length - 1].k;
- } else {
- this.$message.warning("涓嶈兘鍏抽棴鏈�鍚庣殑鏍囩");
- }
- },
- upTabActive(num) {
- this.tabActive = num;
- this.activeP = num;
- if (num == 0) {
- this.activeBox = 0;
- } else if (num > 0 && num <= 2) {
- this.activeBox = 1;
- } else if (num > 2 && num < 11) {
- this.activeBox = 2;
- } else if (num == 11) {
- this.activeBox = 3;
- } else if (num > 11 && num <= 14) {
- this.activeBox = 4;
- } else if (num > 14 && num <= 20) {
- this.activeBox = 5;
- } else if (num > 20 && num <= 22) {
- this.activeBox = 6;
- } else if (num > 22 && num <= 28) {
- this.activeBox = 7;
- }
- },
- out() {
- sessionStorage.clear();
- localStorage.removeItem("autoenter");
- this.$router.push("/enter");
- }
- }
-};
+ const requireComponent = require.context("../components/view", false, /\.vue/);
+ var comObj = {};
+ requireComponent.keys().forEach(fileName => {
+ var names = fileName
+ .split("/")
+ .pop()
+ .replace(".vue", "");
+ const componentConfig = requireComponent(fileName);
+ comObj[names] = componentConfig.default || componentConfig;
+ });
+ export default {
+ components: comObj,
+ data() {
+ return {
+ userName: "value",
+ leftOpen: true,
+ menu: [{
+ k: 0,
+ v: "棣栭〉",
+ i: "font icon-shouye",
+ c: [{
+ k: 0,
+ v: "棣栭〉",
+ i: "font icon-shouye",
+ u: "index-index"
+ }]
+ },
+ {
+ k: 3,
+ v: "閿�鍞鐞�",
+ i: "font icon-jine",
+ c: [{
+ k: 11,
+ v: "閿�鍞鐞�",
+ i: "font icon-jine",
+ u: "sale"
+ }]
+ },
+ {
+ k: 1,
+ v: "鎶�鏈鐞�",
+ i: "font icon-shouye",
+ c: [{
+ k: 1,
+ v: "鏍囧噯BOM",
+ i: "font icon-shouye",
+ u: "standard"
+ },
+ {
+ k: 2,
+ v: "璁㈠崟BOM",
+ i: "font icon-shouye",
+ u: "technical"
+ }
+ ]
+ },
+ {
+ k: 4,
+ v: "鐢熶骇绠$悊",
+ i: "font icon-shouye",
+ c: [{
+ k: 12,
+ v: "鐢熶骇璁㈠崟",
+ i: "font icon-shouye",
+ u: ""
+ },
+ {
+ k: 13,
+ v: "鐢熶骇璁″垝",
+ i: "font icon-shouye",
+ u: ""
+ },
+ {
+ k: 14,
+ v: "鐢熶骇鎶ュ伐",
+ i: "font icon-shouye",
+ u: ""
+ }
+ ]
+ },
+ {
+ k: 5,
+ v: "WMS绠$悊",
+ i: "font icon-shouye",
+ c: [{
+ k: 15,
+ v: "鍘熸潗鏂欏簱瀛�",
+ i: "font icon-shouye",
+ u: ""
+ },
+ {
+ k: 16,
+ v: "鍥炲崟绠$悊",
+ i: "font icon-shouye",
+ u: ""
+ },
+ {
+ k: 17,
+ v: "鍗婃垚鍝佸簱瀛�",
+ i: "font icon-shouye",
+ u: ""
+ },
+ {
+ k: 18,
+ v: "鎴愬搧搴撳瓨",
+ i: "font icon-shouye",
+ u: ""
+ },
+ {
+ k: 19,
+ v: "鎴愬搧鍙戣揣",
+ i: "font icon-shouye",
+ u: ""
+ },
+ {
+ k: 20,
+ v: "鎴愬搧鍏ュ簱",
+ i: "font icon-shouye",
+ u: ""
+ }
+ ]
+ },
+ {
+ k: 2,
+ v: "QMS绠$悊",
+ i: "font icon-shouye",
+ c: [{
+ k: 3,
+ v: "鍘熸潗鏂欐楠�",
+ i: "font icon-shouye",
+ u: "rawInsBox"
+ },
+ {
+ k: 4,
+ v: "鍘熸潗鏂欎笉鍚堟牸鍝�",
+ i: "font icon-shouye",
+ u: "rawUnqualifiedBox"
+ },
+ {
+ k: 5,
+ v: "杩囩▼妫�楠�",
+ i: "font icon-shouye",
+ u: "processInspection"
+ },
+ {
+ k: 6,
+ v: "鎴愬搧妫�楠�",
+ i: "font icon-shouye",
+ u: "finishedProductInspection"
+ },
+ {
+ k: 7,
+ v: "涓嶅悎鏍煎搧绠$悊",
+ i: "font icon-shouye",
+ u: "unqualifiedManagement"
+ },
+ {
+ k: 9,
+ v: "璐ㄩ噺缁熻",
+ i: "font icon-shouye",
+ u: ""
+ },
+ {
+ k: 10,
+ v: "璁¢噺绠$悊",
+ i: "font icon-shouye",
+ u: "measurementManagement"
+ },
+ {
+ k: 10.1,
+ v: "涓嶅悎鏍煎搧澶勭疆",
+ i: "font icon-shouye",
+ u: "Processingproducts"
+ }
+ ]
+ },
+ {
+ k: 6,
+ v: "鏍哥畻绠$悊",
+ i: "font icon-shouye",
+ c: [{
+ k: 21,
+ v: "浜ч噺宸ヨ祫",
+ i: "font icon-shouye",
+ u: ""
+ },
+ {
+ k: 22,
+ v: "鍛樺伐鍑哄嫟",
+ i: "font icon-shouye",
+ u: ""
+ }
+ ]
+ },
+ {
+ k: 7,
+ v: "鍩虹鏁版嵁",
+ i: "font icon-shouye",
+ c: [{
+ k: 23,
+ v: "璁板綍鍐呭缁存姢",
+ i: "font icon-shouye",
+ u: "record-content"
+ },
+ {
+ k: 24,
+ v: "鑷椤圭洰缁存姢",
+ i: "font icon-shouye",
+ u: "self-inspection"
+ },
+ {
+ k: 25,
+ v: "鎶�鏈寚鏍囩淮鎶�",
+ i: "font icon-shouye",
+ u: ""
+ },
+ {
+ k: 26,
+ v: "宸ヨ壓璺嚎缁存姢",
+ i: "font icon-shouye",
+ u: "technology"
+ },
+ {
+ k: 27,
+ v: "璁惧缁存姢",
+ i: "font icon-shouye",
+ u: "laboratoryManagement"
+ },
+ {
+ k: 28,
+ v: "鐗╂枡娓呭崟缁存姢",
+ i: "font icon-shouye",
+ u: "mbom"
+ },
+ {
+ k: 29,
+ v: "宸℃椤圭洰缁存姢",
+ i: "font icon-shouye",
+ u: ""
+ },
+ {
+ k: 30,
+ v: "璁惧鎸囨爣缁存姢",
+ i: "font icon-shouye",
+ u: ""
+ }
+ ]
+ }
+ ],
+ activeBox: 0,
+ activeP: 0,
+ tabActive: 0,
+ tabs: [{
+ k: 0,
+ v: "棣栭〉",
+ i: "font icon-shouye",
+ u: "index-index"
+ }],
+ upIndex: 0
+ };
+ },
+ created() {},
+ mounted() {
+ this.userName = JSON.parse(localStorage.getItem("user")).name;
+ },
+ methods: {
+ addTab(ob) {
+ if (ob.k == 0) this.activeBox = 0;
+ if (ob.k == 11) this.activeBox = 3;
+ this.activeP = ob.k; //0
+ this.tabActive = ob.k; //0
+ let num = -1;
+ this.tabs.forEach((a, ai) => {
+ if (ob.k == a.k) {
+ num = a.k;
+ }
+ });
+ // 濡傛灉娌℃湁閬嶅巻鍒皌abs閲屾病鏈夎ob瀵瑰簲鐨則able锛屽線tabs閲岄潰鍔犲叆璇b
+ if (num == -1) {
+ this.tabs.push(ob);
+ }
+ },
+ removeTab(index) {
+ if (this.tabs.length > 1) {
+ this.tabs.splice(index, 1);
+ this.activeP = this.tabs[this.tabs.length - 1].k;
+ this.tabActive = this.tabs[this.tabs.length - 1].k;
+ } else {
+ this.$message.warning("涓嶈兘鍏抽棴鏈�鍚庣殑鏍囩");
+ }
+ },
+ upTabActive(num) {
+ this.tabActive = num;
+ this.activeP = num;
+ if (num == 0) {
+ this.activeBox = 0;
+ } else if (num > 0 && num <= 2) {
+ this.activeBox = 1;
+ } else if (num > 2 && num < 11) {
+ this.activeBox = 2;
+ } else if (num == 11) {
+ this.activeBox = 3;
+ } else if (num > 11 && num <= 14) {
+ this.activeBox = 4;
+ } else if (num > 14 && num <= 20) {
+ this.activeBox = 5
+ } else if (num > 20 && num <= 22) {
+ this.activeBox = 6
+ } else if (num > 22 && num <= 30) {
+ this.activeBox = 7
+ }
+ },
+ out() {
+ sessionStorage.clear();
+ localStorage.removeItem("autoenter");
+ this.$router.push("/enter");
+ }
+ }
+ };
</script>
--
Gitblit v1.9.3