From c37e4efb8a78a0f1bf85cf29a9286cc312469dbe Mon Sep 17 00:00:00 2001
From: 王震 <10952869+daywangzhen@user.noreply.gitee.com>
Date: 星期六, 09 九月 2023 17:09:51 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/components/view/technology.vue | 2
src/components/view/Processingproducts.vue | 20
src/view/index.vue | 1122 ++++++++++++++++++----------------
src/assets/api/controller.js | 5
src/view/enter.vue | 349 ++++++----
src/components/view/raw-ins.vue | 4
src/components/view/standard.vue | 49
src/components/view/record-content.vue | 22
src/main.js | 1
src/components/view/Technicalindex.vue | 2
src/components/view/rawInsDetail.vue | 293 +++++++--
src/components/view/rawUnqualified/raw.vue | 2
src/components/view/unqualifiedManagement.vue | 2
13 files changed, 1,078 insertions(+), 795 deletions(-)
diff --git a/src/assets/api/controller.js b/src/assets/api/controller.js
index 2024af8..74439e1 100644
--- a/src/assets/api/controller.js
+++ b/src/assets/api/controller.js
@@ -21,9 +21,8 @@
selectRawInspectsListById: "/rawInspect/selectRawInspectsListById/", //鏍规嵁妫�楠屽崟id鑾峰彇妫�楠屽崟璇︽儏
updaterawInsProduct: '/rawInsProduct/updaterawInsProduct', //淇敼椤圭洰鐨勬楠屽��
updateRawInspectsById: "/rawInspect/updateRawInspectsById/", //涓婃姤,
- selectDevice: "/rawInsProduct/selectDevice", //鏌ヨ璁惧淇℃伅
- selectSpBySt: "/rawInspect/selectSpBySt", //鏍规嵁鏉愭枡id鏌ヨ鎵�鏈夊瀷鍙�,
- addRawInspects: "/rawInspect/addRawInspects"
+ rawSelectDevice: "/rawInsProduct/selectDevice", //鏌ヨ璁惧淇℃伅
+ addRawInspects: "/rawInspect/addRawInspects", // 娣诲姞
}
//涓嶅悎鏍煎師鏉愭枡
const unqualifiedaa ={
diff --git a/src/components/view/Processingproducts.vue b/src/components/view/Processingproducts.vue
index df007fc..d4ed2a1 100644
--- a/src/components/view/Processingproducts.vue
+++ b/src/components/view/Processingproducts.vue
@@ -74,12 +74,12 @@
>
<el-table-column type="selection" min-width="50"> </el-table-column>
<el-table-column type="index" label="搴忓彿" width="60">
- <template scope="scope">
+ <template slot-scope="scope">
{{ (search.pageSize - 1) * search.countSize + scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column prop="dateArrival" label="浜у搧澶х被">
- <template scope="scope">
+ <template slot-scope="scope">
<span v-if="scope.row.type == 0">鍘熸潗鏂�</span>
<span v-if="scope.row.type == 1">鎴愬搧</span>
<span v-if="scope.row.type == 2">鍗婃垚鍝�</span>
@@ -97,7 +97,7 @@
<el-table-column prop="number" label="涓嶅悎鏍煎搧鏁伴噺">
</el-table-column>
<el-table-column label="鐜板儚鎻忚堪" min-width="150">
- <template scope="scope">
+ <template slot-scope="scope">
<el-input
size="small"
v-model="scope.row.description"
@@ -106,7 +106,7 @@
</template>
</el-table-column>
<el-table-column label="澶勭疆鎰忚">
- <template scope="scope">
+ <template slot-scope="scope">
<el-button type="text" @click="showDisposalOpinions(scope)"
>鏌ョ湅澶勭疆鎰忚</el-button
>
@@ -125,7 +125,7 @@
</template>
</el-table-column>
<el-table-column label="鎿嶄綔" width="130">
- <template scope="scope">
+ <template slot-scope="scope">
<div style="display: flex;">
<el-button type="text" siae="small" size="mini">闄勪欢</el-button>
<el-button
@@ -312,9 +312,13 @@
// 鐐瑰嚮纭畾鎸夐挳
updateEditDevided() {
this.$axios
- .post(this.$api.url.addOpinion, this.updateEditList, {
- headers: { "Content-Type": "application/json" }
- })
+ .post(
+ this.$api.url.addOpinion,
+ { opinion: this.updateEditList },
+ {
+ headers: { "Content-Type": "application/json" }
+ }
+ )
.then(res => {
console.log(`output->res`, res);
this.dialogVisible = false;
diff --git a/src/components/view/Technicalindex.vue b/src/components/view/Technicalindex.vue
index 7d7ded9..c48d631 100644
--- a/src/components/view/Technicalindex.vue
+++ b/src/components/view/Technicalindex.vue
@@ -193,7 +193,7 @@
>
<div class="custom-tree-node" slot-scope="{ node, data }">
<span><i :class="`node_i ${data.code != '[2]'?'el-icon-folder-opened':'el-icon-tickets'}`"></i>
- {{data.father}} {{ data.name }}</span>
+ {{data.code}} {{ data.name }}</span>
<!-- <el-button type="text" size="mini" @click.stop="remove(node, data)">
<i class="el-icon-delete"></i>
</el-button> -->
diff --git a/src/components/view/raw-ins.vue b/src/components/view/raw-ins.vue
index e2229b3..d359349 100644
--- a/src/components/view/raw-ins.vue
+++ b/src/components/view/raw-ins.vue
@@ -244,8 +244,8 @@
this.selectRawInspectsList();
},
selectRawInspectsList() {
- this.axios
- .post(this.$api.url.selectRawInspectsList, this.search)
+ this.$axios
+ .get(this.$api.url.selectRawInspectsList, { params: this.search })
.then(res => {
this.tableData = res.data.row;
this.total = res.data.total;
diff --git a/src/components/view/rawInsDetail.vue b/src/components/view/rawInsDetail.vue
index cd05798..93ad190 100644
--- a/src/components/view/rawInsDetail.vue
+++ b/src/components/view/rawInsDetail.vue
@@ -51,19 +51,25 @@
<el-input
v-if="detailId !== null"
:disabled="detailId !== null"
- v-model="detailInfo.name"
+ v-model="detailInfo.rname"
></el-input>
<el-input
v-else
v-model="detailInfo.name"
- placeholder="璇疯緭鍏�"
+ placeholder="璇疯緭鍏ュ師鏉愭枡鍚嶇О"
></el-input> </el-form-item
></el-col>
<el-col :span="7">
<el-form-item label="鍘熸潗鏂欑紪鐮�:">
<el-input
+ v-if="detailId !== null"
:disabled="detailId !== null"
+ v-model="detailInfo.rcode"
+ ></el-input>
+ <el-input
+ v-else
v-model="detailInfo.code"
+ placeholder="璇疯緭鍏ュ師鏉愭枡缂栫爜"
></el-input>
</el-form-item>
</el-col>
@@ -78,7 +84,7 @@
></el-input>
<el-input
v-else
- v-model="detailInfo.specificationsArr"
+ v-model="detailInfo.specifications"
placeholder="璇疯緭鍏ヨ鏍煎瀷鍙�"
></el-input>
</el-form-item>
@@ -86,6 +92,12 @@
<el-col :span="7">
<el-form-item label="鍗曚綅:">
<el-input
+ v-if="detailId !== null"
+ :disabled="detailId !== null"
+ v-model="detailInfo.runit"
+ ></el-input>
+ <el-input
+ v-else
placeholder="璇疯緭鍏ユ楠屽崟浣�"
:disabled="detailId !== null"
v-model="detailInfo.unit"
@@ -95,7 +107,7 @@
<el-col :span="7">
<el-form-item label="鏁伴噺:">
<el-input
- placeholder="璇疯緭鍏ユ楠屾暟閲�"
+ :placeholder="detailId !== null ? '' : '璇疯緭鍏ユ楠屾暟閲�'"
:disabled="detailId !== null"
v-model="detailInfo.number"
></el-input>
@@ -106,9 +118,9 @@
<el-col :span="7">
<el-form-item label="渚涘簲鍟嗗悕绉�:">
<el-input
- placeholder="璇疯緭鍏ユ楠屾暟閲�"
+ :placeholder="detailId !== null ? '' : '璇疯緭鍏ユ楠屾暟閲�'"
:disabled="detailId !== null"
- v-model="detailInfo.number"
+ v-model="detailInfo.supplier"
></el-input>
</el-form-item>
</el-col>
@@ -116,7 +128,7 @@
<el-form-item v-show="detailId !== null" label="鎶ユ鏃ユ湡:">
<el-input
:disabled="detailId !== null"
- v-model="detailInfo.createTime"
+ v-model="detailInfo.creatTime"
></el-input>
</el-form-item>
</el-col>
@@ -135,7 +147,14 @@
<el-row>
<el-col :span="12" style="line-height: 32px;">妫�楠岄」鐩�</el-col>
<el-col :span="12" style="line-height: 32px; padding-top: 6px;">
- <el-button v-if="detailId == null" style="float: right;"
+ <el-button
+ style="float: right;"
+ @click="clickDeleteInspectionColumn()"
+ >鍒犻櫎妫�楠屽�煎垪</el-button
+ >
+ <el-button
+ style="float: right;margin-right: 30px;"
+ @click="clickAddInspectionColumn()"
>娣诲姞妫�楠屽�煎垪</el-button
>
<el-button
@@ -149,53 +168,81 @@
</div>
<div class="raw-project-table">
<el-table :data="projectTable" style="width: 100%" height="320">
- <el-table-column type="index" label="搴忓彿" width="100">
+ <el-table-column type="index" label="搴忓彿" width="60">
</el-table-column>
- <el-table-column prop="name" label="椤圭洰" width="212">
- <template scope="scope">
+ <el-table-column prop="rpName" label="椤圭洰" width="212">
+ <template slot-scope="scope">
<el-input
+ v-if="detailId == null"
v-model="scope.row.name"
placeholder="璇疯緭鍏ラ」鐩悕绉�"
></el-input>
+ <el-input v-else v-model="scope.row.rpName" disabled></el-input>
</template>
</el-table-column>
<el-table-column prop="unit" label="鍗曚綅" width="148">
- <template scope="scope">
+ <template slot-scope="scope">
<el-input
+ v-if="detailId == null"
v-model="scope.row.unit"
placeholder="璇疯緭鍏ュ崟浣�"
></el-input>
+ <el-input v-else v-model="scope.row.rpUnit" disabled></el-input>
</template>
</el-table-column>
- <el-table-column prop="required" label="鏍囧噯" width="254">
- <template scope="scope">
+ <el-table-column prop="required" label="鏍囧噯" min-width="150">
+ <template slot-scope="scope">
<el-input
v-model="scope.row.required"
placeholder="璇疯緭鍏ユ爣鍑嗗��"
></el-input>
</template>
</el-table-column>
- <el-table-column prop="internal" label="鍐呮帶鍊�" width="254">
- <template scope="scope">
+ <el-table-column prop="internal" label="鍐呮帶鍊�" min-width="150">
+ <template slot-scope="scope">
<el-input
v-model="scope.row.internal"
placeholder="璇疯緭鍏ュ唴鎺у��"
></el-input>
</template>
</el-table-column>
- <el-table-column prop="testValue" label="妫�鏌ュ��" width="254">
+ <el-table-column
+ prop="testValue"
+ label="妫�娴嬪��"
+ min-width="150"
+ v-for="(item, index) in empiricalValueAdd"
+ :key="index"
+ >
<template slot-scope="scope">
- <el-input
- v-model="scope.row.testValue"
- @blur="changeState(scope.row)"
- placeholder="璇疯緭鍏ユ娴嬪��"
- ></el-input>
+ <el-tooltip
+ :disabled="scope.row.deviceId != null"
+ class="item"
+ effect="dark"
+ content="璇峰厛閫夋嫨璁惧锛�"
+ placement="top-start"
+ >
+ <el-input
+ :disabled="scope.row.deviceId == null"
+ v-model="scope.row.testValueList[index]"
+ @blur="changeState(scope.row, index)"
+ placeholder="璇疯緭鍏ユ娴嬪��"
+ ></el-input>
+ </el-tooltip>
</template>
</el-table-column>
- <el-table-column prop="deviceName" label="璇曢獙璁惧">
- <el-button type="text">閫夋嫨</el-button>
+ <el-table-column prop="deviceName" label="璇曢獙璁惧" min-width="100">
+ <template slot-scope="scope">
+ <el-button type="text" @click="clickTableSelect(scope)">{{
+ scope.row.deviceId == null ? "璇烽�夋嫨" : scope.row.deviceName
+ }}</el-button>
+ </template>
</el-table-column>
- <el-table-column prop="testState" label="缁撹">
+ <el-table-column
+ v-if="detailId !== null"
+ prop="testState"
+ label="缁撹"
+ min-width="100"
+ >
<template slot-scope="scope">
<span
v-show="scope.row.testState != null"
@@ -207,8 +254,8 @@
<span v-show="scope.row.testState == null">鏆傛湭缁撹</span>
</template>
</el-table-column>
- <el-table-column v-if="detailId == null" label="鎿嶄綔" fixed="right">
- <template scope="scope">
+ <el-table-column v-if="detailId == null" label="鎿嶄綔" width="100">
+ <template slot-scope="scope">
<el-button type="text" @click="clickDeleteline(scope)"
>鍒犻櫎</el-button
>
@@ -256,6 +303,47 @@
</el-table-column>
</el-table>
</div>
+ <el-dialog
+ title="璇烽�夋嫨璁惧"
+ :visible.sync="centerDialogVisible"
+ width="20%"
+ >
+ <div class="div_device_dialog">
+ <el-input
+ placeholder="杈撳叆鍏抽敭瀛楄繘琛岃繃婊�"
+ v-model="filterText"
+ style="margin-bottom: 6px;"
+ >
+ </el-input>
+ <el-tree
+ class="filter-tree"
+ :data="materialOptions"
+ :props="defaultProps"
+ default-expand-all
+ highlight-current
+ @node-click="nodeClick"
+ :filter-node-method="filterNode"
+ ref="tree"
+ >
+ <div class="custom-tree-node" slot-scope="{ data }">
+ <span
+ ><i
+ :class="
+ `node_i ${
+ data.children ? 'el-icon-folder-opened' : 'el-icon-tickets'
+ }`
+ "
+ ></i>
+ {{ data.name }}</span
+ >
+ </div>
+ </el-tree>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="centerDialogVisible = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="clickNodeSure()">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
</div>
</template>
@@ -299,33 +387,69 @@
},
data() {
return {
+ // 娣诲姞鍒�
+ empiricalValueAdd: 1,
+ // 缂栬緫鏃跺瓨鍌ㄦ渶闀跨殑鍒楁暟瀛楋紝鍋氬垹闄ゅ垽鏂�
+ empiricalValueAddMaxNumber: 0,
+ // 璁惧閫夋嫨鏍戞樉绀�
+ centerDialogVisible: false,
// 璇︽儏椤靛氨鏄鎯呬俊鎭�
detailInfo: {},
+ // 琛ㄦ牸
projectTable: [],
// 鏂板缓妫�楠屽崟鍙傛暟瀵硅薄
rawInsParams: {},
// 椤圭洰鍚嶇Оoptions
- materialOptions: [],
- specificationOptions: []
+ specificationOptions: [],
+ filterText: "",
+ materialOptions: [], // 鏍戞暟鎹�
+ defaultProps: {
+ // 璁惧鏍戞暟鎹缃�
+ children: "children",
+ label: "name"
+ },
+ nodeData: "", // node鐐瑰嚮淇濆瓨褰撳墠鐐瑰嚮鏁版嵁
+ clickSelectSaveIndex: "" // 鐐瑰嚮閫夋嫨瀛樺偍鍒楄〃绱㈠紩
};
},
+ watch: {
+ filterText(val) {
+ this.$refs.tree.filter(val);
+ }
+ },
methods: {
+ // 璁惧鏍戣繃婊ゆ悳绱�
+ filterNode(value, data) {
+ if (!value) return true;
+ return data.name.indexOf(value) !== -1;
+ },
+
// 鑾峰彇鎶ユ鍗曡鎯呬俊鎭�
async getDetailInfo() {
- const { data } = await this.$axios.get(
- this.$api.url.selectRawInspectsListById + `${this.detailId}`,
- { params: { id: this.detailId } }
- );
- this.detailInfo = data;
- this.projectTable = data.rawInsProducts;
+ await this.$axios
+ .get(this.$api.url.selectRawInspectsListById + `${this.detailId}`, {
+ params: { id: this.detailId }
+ })
+ .then(res => {
+ this.detailInfo = res.data;
+ this.projectTable = res.data.children;
+ this.projectTable.forEach(i => {
+ i.testValueList = i.testValue.split(",");
+ // 鍙栨渶闀跨殑鍒楄〃鏁�
+ if (i.testValueList.length > this.empiricalValueAdd) {
+ this.empiricalValueAdd = i.testValueList.length;
+ this.empiricalValueAddMaxNumber = i.testValueList.length - 1;
+ }
+ });
+ });
},
// 鏂板妫�楠屽崟
async addNewRawInspect() {
- this.detailInfo.specifications = this.detailInfo.specificationsArr.join(
- "-"
- );
- // const time = this.detailInfo.formTime
- // this.detailInfo.formTime = `${time.getFullYear()}-${time.getMonth() + 1 < 10 ? '0' + (time.getMonth() + 1) : time.getMonth() + 1}-${time.getDate() < 10 ? '0' + time.getDate() : time.getDate()}`
+ this.projectTable.forEach(i => {
+ // 灏嗗垪琛ㄨ浆鎹负瀛楃涓�
+ i.testValue = i.testValueList.join(",");
+ });
+ this.detailInfo.rawInsProducts = this.projectTable;
const res = await this.$axios.post(
this.$api.url.addRawInspects,
{ ...this.detailInfo },
@@ -333,18 +457,20 @@
);
this.detailId = res.data;
this.getDetailInfo();
-
- this.$message.success("鎻愪氦鎴愬姛");
+ this.$message.success(res.message);
},
+
// 淇敼椤圭洰鐨勬娴嬪�兼敼鍙樼粨璁�
- async changeState(row) {
- const res = await this.$axios.post(
- this.$api.url.updaterawInsProduct,
- { ...row },
- { headers: { "Content-Type": "application/json" } }
- );
- this.$message.success("鎻愪氦鎴愬姛");
- this.getDetailInfo(); //閲嶆柊鍒锋柊淇℃伅鏁版嵁
+ async changeState(row, index) {
+ if (this.detailId !== null) {
+ const res = await this.$axios.post(this.$api.url.updaterawInsProduct, {
+ DevId: row.deviceId,
+ rpId: this.detailId,
+ testValue: row.testValueList[index]
+ });
+ this.$message.success("鎻愪氦鎴愬姛");
+ this.getDetailInfo(); //閲嶆柊鍒锋柊淇℃伅鏁版嵁
+ }
},
async submitSave() {
const res = await this.$axios.post(
@@ -353,30 +479,22 @@
this.$message.success("鎻愪氦鎴愬姛");
this.getDetailInfo();
},
- async getOptions() {
- const { data } = await this.$axios.get(this.$api.url.selectDevice);
- this.materialOptions = data;
- },
- checkRawName(data) {
- this.materialOptions.forEach(item => {
- if (item.name === data) {
- this.detailInfo.code = item.code;
- this.$axios
- .get(this.$api.url.selectSpBySt, { params: { id: item.id } })
- .then(res => {
- this.specificationOptions = res.data;
- });
- }
+ // 鑾峰彇璁惧鏍戝唴瀹�
+ getOptions() {
+ this.$axios.get(this.$api.url.rawSelectDevice).then(res => {
+ this.materialOptions = res.data;
});
},
// 娣诲姞琛�
clickAddLine() {
let obj = {
- deviceId: 0,
+ deviceId: null,
+ deviceName: "",
internal: "",
name: "",
required: "",
- testValue: "",
+ textValue: "",
+ testValueList: [],
unit: ""
};
this.projectTable.push(obj);
@@ -384,12 +502,52 @@
// 鍒犻櫎琛�
clickDeleteline(scope) {
this.projectTable.splice(scope.$index, 1);
+ },
+ // 鐐瑰嚮璁惧鏍戜繚瀛樼偣鍑昏褰�
+ nodeClick(data) {
+ if (data.id != undefined) this.nodeData = data;
+ },
+ // 鐐瑰嚮琛ㄦ牸閫夋嫨瑙﹀彂
+ clickTableSelect(scope) {
+ this.centerDialogVisible = true;
+ this.clickSelectSaveIndex = scope.$index;
+ },
+ // 鐐瑰嚮鏍戦噷闈㈢殑纭畾
+ clickNodeSure() {
+ this.projectTable[this.clickSelectSaveIndex].deviceId = this.nodeData.id;
+ this.projectTable[
+ this.clickSelectSaveIndex
+ ].deviceName = this.nodeData.name;
+ this.centerDialogVisible = false;
+ },
+ // 鍒犻櫎妫�楠屽�煎垪
+ clickDeleteInspectionColumn() {
+ if (this.empiricalValueAdd - 1 === 0) {
+ } else {
+ if (this.empiricalValueAddMaxNumber != this.empiricalValueAdd - 1) {
+ this.empiricalValueAdd = this.empiricalValueAdd - 1;
+ this.projectTable.forEach(i => {
+ i.testValueList.splice(this.empiricalValueAdd, 1);
+ });
+ }
+ }
+ },
+ // 娣诲姞妫�楠屽�煎垪
+ clickAddInspectionColumn() {
+ this.empiricalValueAdd = this.empiricalValueAdd + 1;
}
}
};
</script>
<style scoped>
+.node_i {
+ color: orange;
+}
+.div_device_dialog {
+ min-height: 400px;
+ overflow: auto;
+}
.rawInsBox {
height: 100%;
width: 100%;
@@ -397,6 +555,9 @@
display: flex;
flex-direction: column;
}
+.el-table__fixed-body-wrapper {
+ top: 48px;
+}
.rawInsBox .title .el-button {
height: 32px;
border: 1px solid rgba(190, 190, 190, 0.44);
diff --git a/src/components/view/rawUnqualified/raw.vue b/src/components/view/rawUnqualified/raw.vue
index ac0b8c4..a92a38f 100644
--- a/src/components/view/rawUnqualified/raw.vue
+++ b/src/components/view/rawUnqualified/raw.vue
@@ -71,7 +71,7 @@
>
<el-table-column type="selection" width="50"> </el-table-column>
<el-table-column type="index" label="搴忓彿" width="60">
- <template scope="scope">
+ <template slot-scope="scope">
{{ (search.pageSize - 1) * search.countSize + scope.$index + 1 }}
</template>
</el-table-column>
diff --git a/src/components/view/record-content.vue b/src/components/view/record-content.vue
index 129a6ca..62ecc41 100644
--- a/src/components/view/record-content.vue
+++ b/src/components/view/record-content.vue
@@ -39,7 +39,6 @@
height: calc(100% - 120px);
background-color: #fff;
display: flex;
-
}
.thing .left {
@@ -47,7 +46,6 @@
height: calc(100% - 20px);
border-right: 3px solid rgb(245, 247, 251);
padding: 16px;
- /* height:calc(50vh - 250px) */
}
.thing .left .custom-tree-node span {
@@ -120,7 +118,7 @@
<el-button icon="el-icon-delete" @click="dels">鍒犻櫎</el-button>
</el-col>
</el-row>
- </div>
+ </div>
<div class="choose">
<span>绫诲瀷锛�</span>
<el-select v-model="search.type" size="small" @change="TYpe" placeholder="璇烽�夋嫨" style="width: 224px;margin-right: 30px;">
@@ -142,10 +140,10 @@
<div class="thing">
<div class="left">
<el-input v-model="search.technology" suffix-icon="el-icon-search" placeholder="璇疯緭鍏ユ悳绱㈠唴瀹�" size="small" clearable @input="query"></el-input>
- <el-tree :data="list" ref="tree"
+ <el-tree :data="list" ref="tree"
style="height: 500px;overflow-y: auto;"
:props="{children: 'children',label: 'name'}" node-key="name" default-expand-all
- @node-click="handleNodeClick" highlight-current
+ @node-click="handleNodeClick" highlight-current
:key="upIndex">
<div class="custom-tree-node" slot-scope="{ node, data }">
<span><i :class="`node_i ${data.code != '[2]'?'el-icon-folder-opened':'el-icon-tickets'}`"></i>
@@ -197,8 +195,10 @@
<el-col :span="4" style="font-size: 14px;text-align: right;">宸ュ簭:</el-col>
<el-col :span="16" :offset="1">
<template>
- <el-select v-model="edit.techFather"
- placeholder="璇烽�夋嫨"
+ <el-select v-model="edit.techFather"
+ placeholder="璇烽�夋嫨"
+ <el-select v-model="edit.techFather"
+ placeholder="璇烽�夋嫨"
disabled
@change="workevent"
style="width: 310px;">
@@ -267,7 +267,7 @@
</el-form-item>
<el-form-item label="宸ュ簭">
<template>
- <el-select v-model="form.work"
+ <el-select v-model="form.work"
@change="workevent"
placeholder="璇烽�夋嫨" style="width: 480px;">
<el-option
@@ -428,7 +428,7 @@
TYpe(val) {
this.typeselect = val
console.log(this.typeselect);
- this.selectAllleft()
+ this.selectAllleft()
},
edittype(val) {
// this.typeselect = ''
@@ -453,7 +453,7 @@
"Content-Type": "application/json"
}
}).then(res =>{
-
+
})
},
addRecord() {
@@ -643,7 +643,7 @@
submitUpData() {
this.writeRecordById()
this.$message.success('淇敼鎴愬姛')
-
+
this.upDia = false
// this.tableData.forEach(a => {
// if (a.id == this.upData.id) {
diff --git a/src/components/view/standard.vue b/src/components/view/standard.vue
index 09e4e74..0923393 100644
--- a/src/components/view/standard.vue
+++ b/src/components/view/standard.vue
@@ -19,7 +19,7 @@
<el-tree :data="list" ref="tree" default-expand-all :props="{ children: 'children', label: 'name' }"
node-key="id" :filter-node-method="filterNode" @node-click="handleNodeClick" highlight-current>
<div class="custom-tree-node" slot-scope="{ node, data }">
- <span><i :class="`node_i ${data.code != '[4]' ? 'el-icon-folder-opened' : 'el-icon-tickets'}`"></i>
+ <span><i :class="`node_i ${data.code != '[5]' ? 'el-icon-folder-opened' : 'el-icon-tickets'}`"></i>
{{ data.name }}</span>
<el-button type="text" size="mini" @click.stop="remove(node, data)">
<i class="el-icon-delete"></i>
@@ -77,7 +77,7 @@
<div class="bom-add-model">
<el-dialog title="BOM鏂板" :visible.sync="bomAddModelVisible" width="30%">
<el-form>
-
+
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="bomAddModelVisible = false">鍙� 娑�</el-button>
@@ -125,17 +125,42 @@
// },
mounted() {
this.selectMaterialTree()
- this.selectAll()
+ // this.selectAll()
this.selectVersion()
},
methods: {
+ selectDataList() {
+ this.list.forEach(a => {
+ a.code = '[1]'
+ if (a.children != undefined) {
+ a.children.forEach(b => {
+ b.code = '[2]'
+ if (b.children != undefined) {
+ b.children.forEach(c => {
+ c.code = '[3]'
+ if (c.children != undefined) {
+ c.children.forEach(d => {
+ d.code = '[4]'
+ if (d.children != undefined) {
+ d.children.forEach(e => {
+ e.code = '[5]'
+ })
+ }
+ })
+ }
+ })
+ }
+ })
+ }
+ })
+ },
handleSelectionChange() {
},
TYPE(val) {//绫诲瀷.鏁版嵁
console.log(val);
this.typeselect = val
-
+
// console.log(this.typeselect);
this.selectVersion()
},
@@ -192,22 +217,8 @@
if (idx == 1) {
arr[idx].name = '鍗婃垚鍝�'
}
- el.children.forEach((newEl, newIdx, newArr) => {
- if (newIdx == 0) {
- newArr[newIdx].name = '姗¤兌杩炴帴鍣�'
- }
- if (newIdx == 1) {
- newArr[newIdx].name = '閲戝睘杩炴帴鍣�'
- }
- if (newIdx == 2) {
- newArr[newIdx].name = '婀挎彃鎷旂數杩炴帴鍣�'
- }
- if (newIdx == 3) {
- newArr[newIdx].name = '鍒嗘敮缁勪欢'
- }
- })
})
- console.log(this.list);
+ this.selectDataList()
})
},
filterNode(value, data) {
diff --git a/src/components/view/technology.vue b/src/components/view/technology.vue
index fcd7756..c4e5282 100644
--- a/src/components/view/technology.vue
+++ b/src/components/view/technology.vue
@@ -187,7 +187,7 @@
: 'el-icon-tickets'
}`"
></i>
- {{ data.name }}{{ data.father }}</span
+ {{data.code}}{{ data.name }}</span
>
<!-- <el-button type="text" size="mini" @click.stop="remove(node, data)">
<i class="el-icon-delete"></i>
diff --git a/src/components/view/unqualifiedManagement.vue b/src/components/view/unqualifiedManagement.vue
index e1f6686..17e01c2 100644
--- a/src/components/view/unqualifiedManagement.vue
+++ b/src/components/view/unqualifiedManagement.vue
@@ -56,7 +56,7 @@
>
<el-table-column type="selection" width="50"> </el-table-column>
<el-table-column type="index" label="搴忓彿" width="60">
- <template scope="scope">
+ <template slot-scope="scope">
{{ (search.pageSize - 1) * search.countSize + scope.$index + 1 }}
</template>
</el-table-column>
diff --git a/src/main.js b/src/main.js
index 811776f..1cef795 100644
--- a/src/main.js
+++ b/src/main.js
@@ -60,6 +60,7 @@
// console.log(config.data)
}
+
return config
}, function(error) {
return Promise.reject(error)
diff --git a/src/view/enter.vue b/src/view/enter.vue
index 523fdb0..56d4eb0 100644
--- a/src/view/enter.vue
+++ b/src/view/enter.vue
@@ -1,122 +1,149 @@
<style scoped>
- .enter {
- width: 100vw;
- height: 100vh;
- display: flex;
- background-image: url("../../static/img/鐧诲綍.png");
- background-size: 100% 100%;
- }
+.enter {
+ width: 100vw;
+ height: 100vh;
+ display: flex;
+ background-image: url("../../static/img/鐧诲綍.png");
+ background-size: 100% 100%;
+}
- .left {
- width: calc(100% - 500px);
- height: 100%;
- overflow: hidden;
- }
+.left {
+ width: calc(100% - 500px);
+ height: 100%;
+ overflow: hidden;
+}
- .left img {
- width: 100%;
- min-height: 100%;
- }
+.left img {
+ width: 100%;
+ min-height: 100%;
+}
- .right {
- width: 600px;
- overflow-y: auto;
- display: flex;
- align-items: center;
- justify-content: center;
- }
+.right {
+ width: 600px;
+ overflow-y: auto;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
- .title_big {
- color: #004EA2;
- font-size: 40px;
- margin-bottom: 8px;
- }
+.title_big {
+ color: #004ea2;
+ font-size: 40px;
+ margin-bottom: 8px;
+}
- .title_small {
- color: #004EA2;
- font-size: 24px;
- }
+.title_small {
+ color: #004ea2;
+ font-size: 24px;
+}
- .elform {
- margin-top: 50px;
- }
+.elform {
+ margin-top: 50px;
+}
- .sao {
- font-size: 14px;
- color: #004EA2;
- width: 100%;
- text-align: right;
- }
+.sao {
+ font-size: 14px;
+ color: #004ea2;
+ width: 100%;
+ text-align: right;
+}
</style>
<style>
- .enter .el-form-item__label {
- font-size: 20px;
- color: #333;
- line-height: 48px;
- }
+.enter .el-form-item__label {
+ font-size: 20px;
+ color: #333;
+ line-height: 48px;
+}
- .enter .el-form-item {
- margin-bottom: 30px;
- }
+.enter .el-form-item {
+ margin-bottom: 30px;
+}
- .enter .el-input__inner {
- height: 48px;
- }
+.enter .el-input__inner {
+ height: 48px;
+}
- .enter .el-button {
- background-color: #1763EB;
- color: #fff;
- border: 0;
- border-radius: 16px;
- width: 100%;
- height: 48px;
- }
+.enter .el-button {
+ background-color: #1763eb;
+ color: #fff;
+ border: 0;
+ border-radius: 16px;
+ width: 100%;
+ height: 48px;
+}
- .enter input::-webkit-input-placeholder,
- .enter textarea::-webkit-input-placeholder {
- font-size: 14px;
- }
+.enter input::-webkit-input-placeholder,
+.enter textarea::-webkit-input-placeholder {
+ font-size: 14px;
+}
- .enter input::-moz-placeholder,
- .enter textarea::-moz-placeholder {
- font-size: 10px;
- }
+.enter input::-moz-placeholder,
+.enter textarea::-moz-placeholder {
+ font-size: 10px;
+}
- .enter input:-ms-input-placeholder,
- .enter textarea:-ms-input-placeholder {
- font-size: 10px;
- }
+.enter input:-ms-input-placeholder,
+.enter textarea:-ms-input-placeholder {
+ font-size: 10px;
+}
- .enter input:-moz-placeholder,
- .enter textarea:-moz-placeholder {
- font-size: 10px;
- }
+.enter input:-moz-placeholder,
+.enter textarea:-moz-placeholder {
+ font-size: 10px;
+}
</style>
<template>
<div class="enter">
<div class="left">
- <img src="../../static/img/鐧诲綍鑳屾櫙.png">
+ <img src="../../static/img/鐧诲綍鑳屾櫙.png" />
</div>
<div class="right">
<div style="width: calc(100% - 100px * 2);">
<div class="title_big">娆㈣繋鎮ㄧ櫥褰曪紒</div>
<div class="title_small">鐢电紗闄勪欢鏂颁竴浠om绯荤粺</div>
- <el-form :model="ruleForm" :rules="rules" ref="ruleForm" class="elform" :hide-required-asterisk="true">
+ <el-form
+ :model="ruleForm"
+ :rules="rules"
+ ref="ruleForm"
+ class="elform"
+ :hide-required-asterisk="true"
+ >
<el-form-item label="鐢ㄦ埛鍚�" prop="account">
- <el-input v-model="ruleForm.account" placeholder="璇疯緭鍏ヨ处鍙�" clearable></el-input>
+ <el-input
+ v-model="ruleForm.account"
+ placeholder="璇疯緭鍏ヨ处鍙�"
+ clearable
+ ></el-input>
</el-form-item>
<el-form-item label="瀵嗙爜" prop="pwd">
- <el-input v-model="ruleForm.pwd" placeholder="璇疯緭鍏ュ瘑鐮�" clearable show-password></el-input>
+ <el-input
+ v-model="ruleForm.pwd"
+ placeholder="璇疯緭鍏ュ瘑鐮�"
+ clearable
+ show-password
+ ></el-input>
</el-form-item>
<el-form-item style="margin-bottom: 8px;">
- <el-col :span="12"><el-checkbox v-model="ruleForm.remumberme">璁颁綇瀵嗙爜</el-checkbox></el-col>
- <el-col :span="12" style="text-align: right;"><el-checkbox
- v-model="ruleForm.autoenter">鑷姩鐧诲綍</el-checkbox></el-col>
+ <el-col :span="12"
+ ><el-checkbox v-model="ruleForm.remumberme"
+ >璁颁綇瀵嗙爜</el-checkbox
+ ></el-col
+ >
+ <el-col :span="12" style="text-align: right;"
+ ><el-checkbox v-model="ruleForm.autoenter"
+ >鑷姩鐧诲綍</el-checkbox
+ ></el-col
+ >
</el-form-item>
<el-form-item style="margin-bottom: 15px;">
- <el-button type="primary" @click="submitForm('ruleForm')" :loading="btnload">绔嬪嵆鐧诲綍</el-button>
+ <el-button
+ type="primary"
+ @click="submitForm('ruleForm')"
+ :loading="btnload"
+ >绔嬪嵆鐧诲綍</el-button
+ >
</el-form-item>
</el-form>
<div class="sao">寰俊鎵爜鐧诲綍</div>
@@ -126,80 +153,100 @@
</template>
<script>
- export default {
- data() {
- return {
- ruleForm: {
- account: null,
- pwd: null,
- remumberme: false,
- autoenter: false
- },
- rules: {
- account: [{
+export default {
+ data() {
+ return {
+ ruleForm: {
+ account: null,
+ pwd: null,
+ remumberme: false,
+ autoenter: false
+ },
+ rules: {
+ account: [
+ {
required: true,
- message: '璇疯緭鍏ヨ处鍙�',
- trigger: ['blur', 'change']
- }],
- pwd: [{
+ message: "璇疯緭鍏ヨ处鍙�",
+ trigger: ["blur", "change"]
+ }
+ ],
+ pwd: [
+ {
required: true,
- message: '璇疯緭鍏ュ瘑鐮�',
- trigger: ['blur', 'change']
- }]
- },
- btnload: false
+ message: "璇疯緭鍏ュ瘑鐮�",
+ trigger: ["blur", "change"]
+ }
+ ]
+ },
+ btnload: false
+ };
+ },
+ mounted() {
+ this.ruleForm.remumberme =
+ JSON.parse(localStorage.getItem("rememberme")) == null
+ ? false
+ : JSON.parse(localStorage.getItem("rememberme"));
+ this.ruleForm.autoenter =
+ JSON.parse(localStorage.getItem("autoenter")) == null
+ ? false
+ : JSON.parse(localStorage.getItem("autoenter"));
+ var user = JSON.parse(localStorage.getItem("user"));
+ if (user != null && user != undefined) {
+ if (this.ruleForm.remumberme == true) {
+ this.ruleForm.account = user.account;
+ this.ruleForm.pwd = user.password;
}
- },
- mounted() {
- this.ruleForm.remumberme = JSON.parse(localStorage.getItem('rememberme'))==null?false:JSON.parse(localStorage.getItem('rememberme'))
- this.ruleForm.autoenter = JSON.parse(localStorage.getItem('autoenter'))==null?false:JSON.parse(localStorage.getItem('autoenter'))
- var user = JSON.parse(localStorage.getItem('user'))
- if (user != null && user != undefined) {
- if (this.ruleForm.remumberme==true) {
- this.ruleForm.account = user.account
- this.ruleForm.pwd = user.password
- }
- if (this.ruleForm.autoenter==true) {
- this.submitForm('ruleForm')
- }
+ if (this.ruleForm.autoenter == true) {
+ this.submitForm("ruleForm");
}
- },
- methods: {
- submitForm(formName) {
- this.btnload = true
- this.$refs[formName].validate((valid) => {
- if (valid) {
- this.axios.post(this.$api.url.enter, {
+ }
+ },
+ methods: {
+ submitForm(formName) {
+ this.btnload = true;
+ this.$refs[formName].validate(valid => {
+ if (valid) {
+ this.axios
+ .post(this.$api.url.enter, {
account: this.ruleForm.account,
password: this.ruleForm.pwd
- }).then(res => {
- this.btnload = false
- if (res.data == null) {
- this.$message.error("璐﹀彿鎴栧瘑鐮侀敊璇�")
- return
- }
- localStorage.setItem('rememberme', this.ruleForm.remumberme)
- localStorage.setItem('autoenter', this.ruleForm.autoenter)
- if (this.ruleForm.remumberme==true||this.ruleForm.autoenter==true) localStorage.setItem('user', JSON.stringify({
- account: this.ruleForm.account,
- password: this.ruleForm.pwd,
- name: res.data.name
- }))
- sessionStorage.setItem('token', res.data.token)
- sessionStorage.setItem('reToken', res.data.reToken)
- this.$message.success("鐧诲綍鎴愬姛")
- this.$router.push('/')
- }).catch(e => {
- this.btnload = false
- this.$message.error('鐧诲綍澶辫触, 璇疯仈绯荤鐞嗗憳')
})
- } else {
- this.btnload = false
- this.$message.error('璐﹀彿鎴栧瘑鐮佹湭杈撳叆锛�')
- return false;
- }
- })
- },
+ .then(res => {
+ this.btnload = false;
+ if (res.data == null) {
+ this.$message.error("璐﹀彿鎴栧瘑鐮侀敊璇�");
+ return;
+ }
+ localStorage.setItem("rememberme", this.ruleForm.remumberme);
+ localStorage.setItem("autoenter", this.ruleForm.autoenter);
+ if (
+ this.ruleForm.remumberme == true ||
+ this.ruleForm.autoenter == true
+ )
+ localStorage.setItem(
+ "user",
+ JSON.stringify({
+ account: this.ruleForm.account,
+ password: this.ruleForm.pwd,
+ name: res.data.name
+ })
+ );
+ sessionStorage.setItem("token", res.data.token);
+ sessionStorage.setItem("reToken", res.data.reToken);
+ this.$message.success("鐧诲綍鎴愬姛");
+ this.$router.push("/");
+ })
+ .catch(e => {
+ this.btnload = false;
+ this.$message.error("鐧诲綍澶辫触, 璇疯仈绯荤鐞嗗憳");
+ });
+ } else {
+ this.btnload = false;
+ this.$message.error("璐﹀彿鎴栧瘑鐮佹湭杈撳叆锛�");
+ return false;
+ }
+ });
}
}
+};
</script>
diff --git a/src/view/index.vue b/src/view/index.vue
index 942bfac..09cfbd5 100644
--- a/src/view/index.vue
+++ b/src/view/index.vue
@@ -1,569 +1,629 @@
<style scoped>
- .all {
- width: 100vw;
- height: 100vh;
- background-size: 100% 100%;
- display: flex;
- flex-wrap: wrap;
- }
+.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 {
- height: calc(100vh - 58px - 40px);
- background-color: #004ea2;
- display: flex;
- align-items: center;
- flex-direction: column;
- padding: 20px 0;
- transition: .3s;
- }
+.left {
+ height: calc(100vh - 58px - 40px);
+ background-color: #004ea2;
+ display: flex;
+ align-items: center;
+ flex-direction: column;
+ padding: 20px 0;
+ transition: 0.3s;
+ overflow-y: auto;
+}
- .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::-webkit-scrollbar {
+ width: 0;
+}
- .left .box:active {
- opacity: 0.8;
- }
+.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 .active_box {
- background-color: #fff;
- color: #004ea2;
- }
+.left .box:active {
+ opacity: 0.8;
+}
- .left .box i {
- font-size: 32px;
- margin-bottom: 8px;
- }
+.left .active_box {
+ background-color: #fff;
+ color: #004ea2;
+}
- .left .box div {
- font-size: 14px;
- }
+.left .box i {
+ font-size: 32px;
+ margin-bottom: 8px;
+}
- .small_menu {
- color: #666;
- }
+.left .box div {
+ font-size: 14px;
+}
- .small_menu .active_p {
- color: #004ea2;
- }
+.small_menu {
+ color: #666;
+}
- .small_menu p {
- padding: 12px 15px;
- cursor: pointer;
- }
+.small_menu .active_p {
+ color: #004ea2;
+}
- .small_menu p:hover {
- background-color: rgba(0, 0, 0, 0.05);
- }
+.small_menu p {
+ padding: 12px 15px;
+ cursor: pointer;
+}
- .small_menu i {
- font-size: 16px;
- }
+.small_menu p:hover {
+ background-color: rgba(0, 0, 0, 0.05);
+}
- .small_menu span {
- font-size: 14px;
- }
+.small_menu i {
+ font-size: 16px;
+}
- .right {
- height: calc(100vh - 58px);
- transition: .3s;
- }
+.small_menu span {
+ 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;
- }
+.right {
+ height: calc(100vh - 58px);
+ transition: 0.3s;
+}
- .tag > .el-icon-s-unfold,.el-icon-s-fold {
- font-size: 18px;
- cursor: pointer;
- margin: 0 8px;
- }
+.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;
+}
- .tabs {
- min-width: calc(100% - 34px);
- height: 100%;
- align-items: center;
- display: flex;
- overflow-x: auto;
- }
+.tag > .el-icon-s-unfold,
+.el-icon-s-fold {
+ font-size: 18px;
+ cursor: pointer;
+ margin: 0 8px;
+}
- .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;
- }
+.tabs {
+ min-width: calc(100% - 34px);
+ height: 100%;
+ align-items: center;
+ display: flex;
+ overflow-x: auto;
+}
- .tab i {
- font-size: 12px;
- display: none;
- }
+.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;
+}
- .active_tab {
- border-bottom: 2px solid #004ea2;
- color: #004ea2;
- }
+.tab i {
+ font-size: 12px;
+ display: none;
+}
- .active_tab i {
- display: inline;
- color: #004ea2;
- }
+.active_tab {
+ border-bottom: 2px solid #004ea2;
+ color: #004ea2;
+}
- .component_view {
- height: calc(100vh - 94px - 22px);
- width: calc(100% - 48px);
- padding: 11px 24px;
- background: rgb(245, 247, 251);
- }
+.active_tab i {
+ display: inline;
+ color: #004ea2;
+}
- .com_index {
- width: 100%;
- height: 100%;
- }
+.component_view {
+ height: calc(100vh - 94px - 22px);
+ width: calc(100% - 48px);
+ padding: 11px 24px;
+ background: rgb(245, 247, 251);
+ overflow-y: auto;
+}
+
+.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" :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>
+ <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",
- 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-ic_form_set24px",
- 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-shengchanguanli",
- 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-a-Inventorydumprequest",
- 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-xunhuan",
- 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-caiwuhesuanxitong",
- c: [{
- k: 21,
- v: "浜ч噺宸ヨ祫",
- i: "font icon-shouye",
- u: ""
- },
- {
- k: 22,
- v: "鍛樺伐鍑哄嫟",
- i: "font icon-shouye",
- u: ""
- }
- ]
- },
- {
- k: 7,
- v: "鍩虹鏁版嵁",
- i: "font icon-a-ziyuan20",
- 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: "Technicalindex"
- },
- {
- 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: "routinginspection"
- // },
- {
- k: 30,
- v: "鐢熶骇宸ヨ壓缁存姢",
- i: "font icon-shouye",
- u: "equipmentmaintain"
- }
- ]
- }
- ],
- 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");
- }
- }
- };
+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-ic_form_set24px",
+ 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-shengchanguanli",
+ 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-a-Inventorydumprequest",
+ 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-xunhuan",
+ 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-caiwuhesuanxitong",
+ c: [
+ {
+ k: 21,
+ v: "浜ч噺宸ヨ祫",
+ i: "font icon-shouye",
+ u: ""
+ },
+ {
+ k: 22,
+ v: "鍛樺伐鍑哄嫟",
+ i: "font icon-shouye",
+ u: ""
+ }
+ ]
+ },
+ {
+ k: 7,
+ v: "鍩虹鏁版嵁",
+ i: "font icon-a-ziyuan20",
+ 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: "Technicalindex"
+ },
+ {
+ 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: "routinginspection"
+ // },
+ {
+ k: 30,
+ v: "鐢熶骇宸ヨ壓缁存姢",
+ i: "font icon-shouye",
+ u: "equipmentmaintain"
+ }
+ ]
+ }
+ ],
+ 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