From 0d5b719e7c3ae2c18525d35cac4a8a0dc127f86e Mon Sep 17 00:00:00 2001
From: XiaoRuby <3114200645@qq.com>
Date: 星期三, 23 八月 2023 18:02:02 +0800
Subject: [PATCH] 8-23组织架构开始编写下班
---
src/views/experiment/passRateStatistics/index.vue | 401 ++++++++++++++++++++++--------------
src/views/standardLibrary/index.vue | 12 -
src/api/standardLibrary.js | 5
src/api/laboratory/organizational.js | 11 +
src/views/laboratory/organizational/index.vue | 183 ++++++++++++++++
5 files changed, 438 insertions(+), 174 deletions(-)
diff --git a/src/api/laboratory/organizational.js b/src/api/laboratory/organizational.js
new file mode 100644
index 0000000..a88b77f
--- /dev/null
+++ b/src/api/laboratory/organizational.js
@@ -0,0 +1,11 @@
+import request from '@/utils/request'
+
+const Api = {
+ getOrganizational: "/organizational/list", // 鍥涚骇鏍�
+}
+export function getOrganizationalApi() {
+ return request({
+ url: Api.getOrganizational,
+ method: 'get'
+ })
+}
\ No newline at end of file
diff --git a/src/api/standardLibrary.js b/src/api/standardLibrary.js
index a3fedfb..09b57f9 100644
--- a/src/api/standardLibrary.js
+++ b/src/api/standardLibrary.js
@@ -1,12 +1,9 @@
import request from '@/utils/request'
-export function getMaterialList(params) {
+export function getMaterialList() {
return request({
url: '/material/list',
method: 'get',
- params: {
- specificationName: params
- }
})
}
diff --git a/src/views/experiment/passRateStatistics/index.vue b/src/views/experiment/passRateStatistics/index.vue
index fceb330..36b874b 100644
--- a/src/views/experiment/passRateStatistics/index.vue
+++ b/src/views/experiment/passRateStatistics/index.vue
@@ -1,36 +1,66 @@
<template>
<div class="content-main">
<div class="top-bar">
- <el-form ref="form" :inline="true" :rules="rules" :model="searchData" label-position="top">
+ <el-form
+ ref="form"
+ :inline="true"
+ :rules="rules"
+ :model="searchData"
+ label-position="top"
+ >
<el-form-item label="妫�娴嬫棩鏈�:" class="sermargin" prop="date">
- <el-date-picker v-model="searchData.date" type="daterange" range-separator="鑷�" start-placeholder="寮�濮嬫棩鏈�"
- end-placeholder="缁撴潫鏃ユ湡">
+ <el-date-picker
+ v-model="searchData.date"
+ type="daterange"
+ range-separator="鑷�"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
+ >
</el-date-picker>
</el-form-item>
<el-form-item label="妫�楠岀被鍨�:" class="sermargin" prop="type">
<el-select v-model="searchData.type" placeholder="鍏ㄩ儴">
- <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
+ <el-option
+ v-for="item in options"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
</el-option>
</el-select>
</el-form-item>
<el-form-item label="渚涘簲鍟�:">
<el-select v-model="searchData.supplier" placeholder="鍏ㄩ儴">
- <el-option v-for="item in supplier" :key="item.value" :label="item.label" :value="item.value">
+ <el-option
+ v-for="item in supplier"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
</el-option>
</el-select>
</el-form-item>
- <el-form-item style="margin-left: 40px;" label="鏍峰搧:">
+ <el-form-item style="margin-left: 40px" label="鏍峰搧:">
<el-select v-model="searchData.code" filterable placeholder="璇烽�夋嫨">
- <el-option v-for="item in sampleOptions" :key="item.value" :label="item.label" :value="item.value">
+ <el-option
+ v-for="item in sampleOptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
<span style="float: left">{{ item.label }}</span>
- <span style="float: right; color: #8492a6; font-size: 13px">{{ item.value }}</span>
+ <span style="float: right; color: #8492a6; font-size: 13px">{{
+ item.value
+ }}</span>
</el-option>
</el-select>
</el-form-item>
<div class="rightBtn">
<el-form-item>
<el-button type="primary" plain size="mini">娓呯┖</el-button>
- <el-button type="primary" @click="search" size="mini">鏌ヨ</el-button>
+ <el-button type="primary" @click="search" size="mini"
+ >鏌ヨ</el-button
+ >
</el-form-item>
</div>
</el-form>
@@ -38,31 +68,74 @@
<div class="top-bar-copy"></div>
<div class="chart-content">
<div class="qualified-wrapper">
- <div style="margin-left: 20px;padding:20px 0px;font-size:18px">妫�娴嬫牱鍝佸悎鏍肩巼缁熻</div>
+ <div style="margin-left: 20px; padding: 20px 0px; font-size: 18px">
+ 妫�娴嬫牱鍝佸悎鏍肩巼缁熻
+ </div>
<div :hidden="testSample" class="qualified" ref="qualified"></div>
- <div :hidden="!testSample" style="height: 100%;text-align: center; color: #999696df; margin-top: 100px;">鏆傛棤鏁版嵁
+ <div
+ :hidden="!testSample"
+ style="
+ height: 100%;
+ text-align: center;
+ color: #999696df;
+ margin-top: 100px;
+ "
+ >
+ 鏆傛棤鏁版嵁
</div>
</div>
<div class="unqualified">
<div class="firstBox-wrapper">
- <div style="margin-left: 20px;padding:20px 0px;font-size:18px">渚涘簲鍟嗗悎鏍肩巼缁熻</div>
+ <div style="margin-left: 20px; padding: 20px 0px; font-size: 18px">
+ 渚涘簲鍟嗗悎鏍肩巼缁熻
+ </div>
<div>
- <div :hidden="supplierData" class="firstBox" ref="unqualified_provider"></div>
- <div :hidden="!supplierData" style="height: 100%;text-align: center; color: #999696df; margin-top: 100px;">
- 鏆傛棤鏁版嵁</div>
+ <div
+ :hidden="supplierData"
+ class="firstBox"
+ ref="unqualified_provider"
+ ></div>
+ <div
+ :hidden="!supplierData"
+ style="
+ height: 100%;
+ text-align: center;
+ color: #999696df;
+ margin-top: 100px;
+ "
+ >
+ 鏆傛棤鏁版嵁
+ </div>
</div>
</div>
<div class="secondBox-wrapper">
<div class="secondBox_header">
- <div style="font-size:18px">涓嶅悎鏍奸」鐩粺璁�</div>
+ <div style="font-size: 18px">涓嶅悎鏍奸」鐩粺璁�</div>
<el-radio-group v-model="type">
- <el-radio-button v-for="item in radiooptions" :key="item.value" :label="item.value">{{ item.label
- }}</el-radio-button>
+ <el-radio-button
+ v-for="item in radiooptions"
+ :key="item.value"
+ :label="item.value"
+ >{{ item.label }}</el-radio-button
+ >
</el-radio-group>
</div>
- <div style="width: 100%;height: 100;">
- <div :hidden="projectData" class="secondBox" ref="unqualified_project"></div>
- <div :hidden="!projectData" style="height: 100%;text-align: center; color: #999696df; margin-top: 100px;">鏆傛棤鏁版嵁
+ <div style="width: 100%; height: 100">
+ <div
+ :hidden="projectData"
+ class="secondBox"
+ ref="unqualified_project"
+ ></div>
+ <div
+ :hidden="!projectData"
+ style="
+ height: 100%;
+ text-align: center;
+ color: #999696df;
+ margin-top: 100px;
+ "
+ >
+ 鏆傛棤鏁版嵁
</div>
</div>
</div>
@@ -77,21 +150,27 @@
<script>
// 娣诲姞婊氬姩鐩戝惉浜嬩欢
-window.addEventListener('scroll', function () {
- var topBar = document.querySelector('.top-bar');
+window.addEventListener("scroll", function () {
+ var topBar = document.querySelector(".top-bar");
var scrollTop = window.pageYOffset || document.documentElement.scrollTop;
if (scrollTop > 0) {
- topBar.classList.add('fixed');
+ topBar.classList.add("fixed");
} else {
- topBar.classList.remove('fixed');
+ topBar.classList.remove("fixed");
}
-})
+});
-import * as echarts from 'echarts'
-import { getSupplierList, getTestSampleStatistics, getSupplierNoPassStatistics, getNoPassProjectStatistics, getSampleOptions } from '@/api/experiment/passRateStatistics';
-import { dateFormat } from '../../../utils/dateUtil'
-import MyWorker from 'comlink-loader!../../../worker/test';
+import * as echarts from "echarts";
+import {
+ getSupplierList,
+ getTestSampleStatistics,
+ getSupplierNoPassStatistics,
+ getNoPassProjectStatistics,
+ getSampleOptions,
+} from "@/api/experiment/passRateStatistics";
+import { dateFormat } from "../../../utils/dateUtil";
+import MyWorker from "comlink-loader!../../../worker/test";
export default {
data() {
return {
@@ -102,35 +181,35 @@
type: null,
supplier: null,
sample: null,
- code: null
+ code: null,
},
options: [
{
- label: '鍏ㄩ儴',
- value: 3
+ label: "鍏ㄩ儴",
+ value: 3,
},
{
- label: '鍘熸潗鏂�',
- value: 0
+ label: "鍘熸潗鏂�",
+ value: 0,
},
{
- label: '鎴愬搧',
- value: 1
+ label: "鎴愬搧",
+ value: 1,
},
{
- label: '濮旀墭鍝�',
- value: 2
- }
+ label: "濮旀墭鍝�",
+ value: 2,
+ },
],
radiooptions: [
{
- label: '鐜舰楗煎浘',
- value: 0
+ label: "鐜舰楗煎浘",
+ value: 0,
},
{
- label: '甯曠疮鎵樺浘',
- value: 1
- }
+ label: "甯曠疮鎵樺浘",
+ value: 1,
+ },
],
type: 0,
rules: {
@@ -145,100 +224,100 @@
testSample: false,
m1: null,
m2: null,
- m3: null
- }
+ m3: null,
+ };
},
async mounted() {
- await this.start()
- this.tableStart()
+ await this.start();
+ this.tableStart();
},
methods: {
- testWork(){
+ testWork() {
const inst = new MyWorker();
- inst.test()
+ inst.test();
for (let index = 0; index < 100; index++) {
- console.log("涓荤嚎绋�"+index);
+ console.log("涓荤嚎绋�" + index);
}
},
async search() {
- this.testSampleStatistics = null
- this.supplierNoPassStatistics = null
- this.projectStatistics = null
- this.supplier = []
- this.sampleOptions = []
- await this.start()
- this.tableStart()
+ this.testSampleStatistics = null;
+ this.supplierNoPassStatistics = null;
+ this.projectStatistics = null;
+ this.supplier = [];
+ this.sampleOptions = [];
+ await this.start();
+ this.tableStart();
},
dateHandle() {
- let data = JSON.parse(JSON.stringify(this.searchData))
+ let data = JSON.parse(JSON.stringify(this.searchData));
if (this.searchData.date.length != 0 && this.searchData.date != []) {
- data.beginDate = dateFormat(this.searchData.date[0])
- data.endDate = dateFormat(this.searchData.date[1])
+ data.beginDate = dateFormat(this.searchData.date[0]);
+ data.endDate = dateFormat(this.searchData.date[1]);
}
- if (data.supplier == '鍏ㄩ儴') {
- data.supplier = null
+ if (data.supplier == "鍏ㄩ儴") {
+ data.supplier = null;
}
if (data.type === 3) {
- data.type = null
+ data.type = null;
}
if (this.sampleOptions.length > 0 && this.sampleOptions != []) {
- let labelSam = this.sampleOptions.filter(item => {
- return item.value == data.code
- })[0]
- data.sample = labelSam.label
+ let labelSam = this.sampleOptions.filter((item) => {
+ return item.value == data.code;
+ })[0];
+ data.sample = labelSam.label;
}
- if (data.code == '鍏ㄩ儴') {
- data.code = null
- data.sample = null
+ if (data.code == "鍏ㄩ儴") {
+ data.code = null;
+ data.sample = null;
}
- data.date = null
- return data
+ data.date = null;
+ return data;
},
async getSupplierList() {
- let res = await getSupplierList()
- this.supplier.push({ label: '鍏ㄩ儴', value: '鍏ㄩ儴' })
- res.data.forEach(item => {
- this.supplier.push({ label: item.supplier, value: item.supplier })
- })
+ let res = await getSupplierList();
+ this.supplier.push({ label: "鍏ㄩ儴", value: "鍏ㄩ儴" });
+ res.data.forEach((item) => {
+ this.supplier.push({ label: item.supplier, value: item.supplier });
+ });
},
async getTestSampleStatistics() {
- let param = this.dateHandle()
- let res = await getTestSampleStatistics(param)
- this.testSample = !res.data.noData
- this.testSampleStatistics = res.data
+ let param = this.dateHandle();
+ let res = await getTestSampleStatistics(param);
+ this.testSample = !res.data.noData;
+ this.testSampleStatistics = res.data;
},
async getSupplierNoPassStatistics() {
- let param = this.dateHandle()
- let res = await getSupplierNoPassStatistics(param)
- this.supplierData = !res.data.noData
- this.supplierNoPassStatistics = res.data
+ let param = this.dateHandle();
+ let res = await getSupplierNoPassStatistics(param);
+ this.supplierData = !res.data.noData;
+ this.supplierNoPassStatistics = res.data;
},
async getNoPassProjectStatistics() {
- let param = this.dateHandle()
- let res = await getNoPassProjectStatistics(param)
- this.projectData = !res.data.noData
- this.projectStatistics = res.data
+ let param = this.dateHandle();
+ let res = await getNoPassProjectStatistics(param);
+ this.projectData = !res.data.noData;
+ this.projectStatistics = res.data;
},
async start() {
- await this.getTestSampleStatistics()
- await this.getSupplierNoPassStatistics()
- await this.getNoPassProjectStatistics()
- await this.getSupplierList()
- await this.getSampleOptions()
+ await this.getTestSampleStatistics();
+ await this.getSupplierNoPassStatistics();
+ await this.getNoPassProjectStatistics();
+ await this.getSupplierList();
+ await this.getSampleOptions();
},
async getSampleOptions() {
- let res = await getSampleOptions()
+ let res = await getSampleOptions();
this.sampleOptions.push({
- label: '鍏ㄩ儴',
- value: '鍏ㄩ儴'
- })
- res.data.forEach(item => {
+ label: "鍏ㄩ儴",
+ value: "鍏ㄩ儴",
+ });
+ res.data.forEach((item) => {
let data = {
label: item.name,
- value: item.code
- }
- this.sampleOptions.push(data)
- })
+ value: item.code,
+ };
+ this.sampleOptions.push(data);
+ });
},
tableStart() {
const chartDom_qualified = this.$refs.qualified;
@@ -247,108 +326,116 @@
const myChart1 = echarts.init(chartDom_qualified);
const myChart2 = echarts.init(chartDom_unqualified_provider, null, {
- height: 300
+ height: 300,
});
-
+
const myChart3 = echarts.init(chartDom_unqualified_project, null, {
- height: 268
+ height: 268,
});
- window.addEventListener("resize",function(){
- myChart1.resize()
- myChart2.resize()
- myChart3.resize()
- })
- this.m1 = myChart1
- this.m2 = myChart2
- this.m3 = myChart3
+ window.addEventListener("resize", function () {
+ myChart1.resize();
+ myChart2.resize();
+ myChart3.resize();
+ });
+ this.m1 = myChart1;
+ this.m2 = myChart2;
+ this.m3 = myChart3;
/**
* 妫�娴嬪悎鏍肩巼缁熻
*/
const option_qualified = {
tooltip: {
- trigger: 'axis',
- axisPointer: { // 鍧愭爣杞存寚绀哄櫒锛屽潗鏍囪酱瑙﹀彂鏈夋晥
- type: 'shadow' // 榛樿涓虹洿绾匡紝鍙�変负锛�'line' | 'shadow'
- }
+ trigger: "axis",
+ axisPointer: {
+ // 鍧愭爣杞存寚绀哄櫒锛屽潗鏍囪酱瑙﹀彂鏈夋晥
+ type: "shadow", // 榛樿涓虹洿绾匡紝鍙�変负锛�'line' | 'shadow'
+ },
},
legend: {
- data: ['鍚堟牸', '涓嶅悎鏍�']
+ data: ["鍚堟牸", "涓嶅悎鏍�"],
},
xAxis: [
{
- type: 'category',
- data: this.testSampleStatistics.xAxis
- }
+ type: "category",
+ data: this.testSampleStatistics.xAxis,
+ },
],
yAxis: [
{
- type: 'value',
+ type: "value",
axisLabel: {
- formatter: '{value}'
- }
- }
+ formatter: "{value}",
+ },
+ },
],
- series: this.testSampleStatistics.series
+ series: this.testSampleStatistics.series,
};
/**
* 渚涘簲鍟�
*/
const option_unqualified1 = {
tooltip: {
- trigger: 'axis',
- axisPointer: { // 鍧愭爣杞存寚绀哄櫒锛屽潗鏍囪酱瑙﹀彂鏈夋晥
- type: 'shadow' // 榛樿涓虹洿绾匡紝鍙�変负锛�'line' | 'shadow'
+ trigger: "axis",
+ axisPointer: {
+ // 鍧愭爣杞存寚绀哄櫒锛屽潗鏍囪酱瑙﹀彂鏈夋晥
+ type: "shadow", // 榛樿涓虹洿绾匡紝鍙�変负锛�'line' | 'shadow'
},
formatter: function (params) {
- let tooltip = params[0].name + '<br/>';
+ let tooltip = params[0].name + "<br/>";
params.forEach(function (item) {
- tooltip += item.marker + ' ' + item.seriesName + ': ' + item.value.toFixed(2) + '%<br/>'; // 灏嗘暟鎹繚鐣欎袱浣嶅皬鏁板苟杞负鐧惧垎姣斿舰寮�
+ tooltip +=
+ item.marker +
+ " " +
+ item.seriesName +
+ ": " +
+ item.value.toFixed(2) +
+ "%<br/>"; // 灏嗘暟鎹繚鐣欎袱浣嶅皬鏁板苟杞负鐧惧垎姣斿舰寮�
});
return tooltip;
- }
+ },
},
legend: {
- data: ['鍚堟牸鏁伴噺', '涓嶅悎鏍兼暟閲�']
+ data: ["鍚堟牸鏁伴噺", "涓嶅悎鏍兼暟閲�"],
},
xAxis: {
- data: this.supplierNoPassStatistics.xAxis
+ data: this.supplierNoPassStatistics.xAxis,
},
yAxis: [
{
- type: 'value',
+ type: "value",
axisLabel: {
- formatter: '{value}%'
- }
- }
+ formatter: "{value}%",
+ },
+ },
],
- series: this.supplierNoPassStatistics.series
+ series: this.supplierNoPassStatistics.series,
};
/**
* 涓嶅悎鏍奸」鐩�
*/
const option_unqualified2 = {
legend: {
- orient: 'vertical',
- x: 'left',
- data: this.projectStatistics.legend
+ orient: "vertical",
+ x: "left",
+ data: this.projectStatistics.legend,
},
title: {
- text: '',
- left: 'center',
- top: 'center'
+ text: "",
+ left: "center",
+ top: "center",
},
series: [
{
- type: 'pie',
+ type: "pie",
data: this.projectStatistics.series,
- radius: ['40%', '70%'],
+ radius: ["40%", "70%"],
label: {
show: true,
- formatter: '{b}: {c}%'
+ formatter: "{b}: {c}%",
},
- }
- ]
- }
+ },
+ ],
+ };
myChart1.setOption(option_qualified);
myChart2.setOption(option_unqualified1);
@@ -358,9 +445,9 @@
if (this.type === 1) {
myChart3.setOption(option_unqualified2);
}
- }
- }
-}
+ },
+ },
+};
</script>
<style lang="scss" scoped>
diff --git a/src/views/laboratory/organizational/index.vue b/src/views/laboratory/organizational/index.vue
index 1a29501..b25fa6a 100644
--- a/src/views/laboratory/organizational/index.vue
+++ b/src/views/laboratory/organizational/index.vue
@@ -1,11 +1,190 @@
<template>
- <div>131</div>
+ <div class="main-div">
+ <div class="side_div">
+ <el-input placeholder="杈撳叆鍏抽敭瀛楄繘琛岃繃婊�" v-model="filterText">
+ </el-input>
+ <el-tree
+ class="filter-tree"
+ :data="data"
+ node-key="id"
+ :props="defaultProps"
+ default-expand-all
+ :filter-node-method="filterNode"
+ ref="tree"
+ @node-click="handleNodeClick"
+ >
+ </el-tree>
+ </div>
+ <div class="table_div">
+ <div class="table_top_div">
+ <span class="top_span" v-if="msg !== ''">{{ msg }}</span>
+ <div style="text-align: right; float: right">
+ <el-button
+ type="primary"
+ size="small"
+ icon="el-icon-circle-plus-outline"
+ >鏂板</el-button
+ >
+ <el-button size="small" icon="el-icon-delete-solid">鍒犻櫎</el-button>
+ </div>
+ </div>
+ <div class="table-main-div">
+ <el-table
+ ref="multipleTable"
+ :data="tableData"
+ border
+ height="100%"
+ tooltip-effect="dark"
+ style="width: 100%"
+ @selection-change="handleSelectionChange"
+ >
+ <el-table-column type="selection" width="55"> </el-table-column>
+ <el-table-column label="鏃ユ湡" width="120">
+ <template slot-scope="scope">{{ scope.row.date }}</template>
+ </el-table-column>
+ <el-table-column prop="name" label="濮撳悕" width="120">
+ </el-table-column>
+ <el-table-column prop="address" label="鍦板潃" show-overflow-tooltip>
+ </el-table-column>
+ </el-table>
+ </div>
+ </div>
+ </div>
</template>
<script>
+import { getOrganizationalApi } from "@/api/laboratory/organizational";
export default {
name: "Organizational",
+ data() {
+ return {
+ filterText: "",
+ msg: "",
+ data: [],
+ // tree鏍戦粯璁ゅ�奸厤缃�
+ defaultProps: {
+ children: "children",
+ label: "department",
+ id: "id",
+ },
+ tableData: [
+ {
+ date: "2016-05-02",
+ name: "鐜嬪皬铏�",
+ address: "涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1518 寮�",
+ },
+ {
+ date: "2016-05-04",
+ name: "鐜嬪皬铏�",
+ address: "涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1517 寮�",
+ },
+ {
+ date: "2016-05-01",
+ name: "鐜嬪皬铏�",
+ address: "涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1519 寮�",
+ },
+ {
+ date: "2016-05-03",
+ name: "鐜嬪皬铏�",
+ address: "涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1516 寮�",
+ },
+ ],
+ };
+ },
+ methods: {
+ // 鏍戜笂鏂规悳绱㈡杩囨护鍣�
+ filterNode(value, data) {
+ if (!value) return true;
+ return data.department.indexOf(value) !== -1;
+ },
+ // 鍒濆鍖栬幏鍙栨爲鏁版嵁
+ treeInitialization() {
+ getOrganizationalApi().then((res) => {
+ this.data = res.data;
+ });
+ },
+ // 鑾峰彇鏍戣矾寰�
+ getParentData(node, department) {
+ if (node !== null) {
+ if (node.data.department !== undefined) {
+ this.msg = node.data.department + " > " + department;
+ }
+ this.getParentData(node.parent, this.msg);
+ }
+ },
+ // 鐐瑰嚮鏍戣妭鐐�
+ handleNodeClick(data, node, element) {
+ this.getParentData(node.parent, node.data.department);
+ console.log(`output->this.msg`, this.msg);
+ console.log(`output->data`, data);
+ console.log(`output->node`, node);
+ console.log(`output->element`, element);
+ },
+ // 鏀瑰彉澶氶�夋鐘舵��
+ toggleSelection(rows) {
+ if (rows) {
+ rows.forEach((row) => {
+ this.$refs.multipleTable.toggleRowSelection(row);
+ });
+ } else {
+ this.$refs.multipleTable.clearSelection();
+ }
+ },
+ // 鐐瑰嚮澶氶�夋浠ュ悗鐨勬搷浣�
+ handleSelectionChange(val) {
+ this.multipleSelection = val;
+ },
+ },
+ mounted() {
+ this.treeInitialization();
+ },
+ watch: {
+ filterText(val) {
+ this.$refs.tree.filter(val);
+ },
+ },
};
</script>
-<style></style>
+<style lang="scss">
+.main-div {
+ width: 99.2% !important;
+ height: 94vh !important;
+ margin: 5px 5px 5px 5px;
+}
+.side_div {
+ float: left;
+ width: 300px;
+ height: 95%;
+ margin-bottom: 5px;
+ background-color: #ffffff;
+ padding: 15px;
+}
+.table_div {
+ margin-left: 6px;
+ float: left;
+ width: calc(100% - 306px);
+ height: 95%;
+ background-color: #ffffff;
+}
+.filter-tree {
+ margin-top: 6px;
+}
+.table_top_div {
+ height: 80px;
+ width: 100%;
+ padding-top: 23px;
+ padding-right: 50px;
+}
+.table-main-div {
+ width: 100%;
+ height: 90.3%;
+ padding: 10px;
+}
+.top_span {
+ margin-left: 12px;
+ font-size: 16px;
+ font-weight: 500;
+ color: #999999;
+}
+</style>
diff --git a/src/views/standardLibrary/index.vue b/src/views/standardLibrary/index.vue
index ea759e3..6070828 100644
--- a/src/views/standardLibrary/index.vue
+++ b/src/views/standardLibrary/index.vue
@@ -201,11 +201,10 @@
methods: {
filterNode(value, data) {
if (!value) return true;
- return data.label.indexOf(value) !== -1;
+ return data.name.indexOf(value) !== -1;
},
// 鑾峰彇bom鏍戠殑鏍囧噯鏁版嵁
async getStandardTree() {
- console.log(`output->鎵ц鍔沗, "鎵ц鍔�");
const { data } = await getMaterialList();
this.standardTree = data.map((item) => {
let name = null;
@@ -228,14 +227,11 @@
const treeOptions = JSON.parse(JSON.stringify(this.standardTree));
this.getDefault(treeOptions, 0);
this.formTypeOptions = treeOptions;
- console.log(`output->===========`, "===========");
this.$nextTick().then(() => {
const firstNode = document.querySelector(
".el-tree-node .el-tree-node__children .el-tree-node .el-tree-node__children .el-tree-node .el-tree-node__children .el-tree-node"
);
- console.log(`output->firstNode`, firstNode);
firstNode.click();
- // console.log(firstNode);
});
},
getDefault(arr, index) {
@@ -254,10 +250,8 @@
// 鏄瓙鑺傜偣
if (node.level === 4) {
this.getParentData(node.parent, node.data.name);
- console.log(`output->this.msg`, this.msg);
// 瀛樹笅閫変腑鑺傜偣
this.selectData = data;
- // eslint-disable-next-line prefer-const
this.getTableByClick(data);
}
if (!("children" in data)) {
@@ -289,7 +283,6 @@
}
});
this.tableData = res.data;
- console.log(`output->this.tableData`, this.tableData);
this.selectDataList();
});
},
@@ -361,7 +354,6 @@
this.getTableByClick(this.selectData);
},
changeCascader(data) {
- console.log(`output->----------`, data);
this.addTreeForm.addTypeArr = data;
},
closeAddTreeForm() {
@@ -422,7 +414,6 @@
} else {
this.deleteList.splice(0, this.deleteList.length);
}
- console.log(`output->this.`, this.deleteList);
},
//閫夋嫨鏌愯
selectTr(selection, row) {
@@ -458,7 +449,6 @@
}
});
}
- console.log(`output->this.deleteList`, this.deleteList);
},
//閫掑綊瀛愮骇
toggleSelect(data, flag, type) {
--
Gitblit v1.9.3