替换组件
This commit is contained in:
37
src/views/qualityManagement/components/InputArea.vue
Normal file
37
src/views/qualityManagement/components/InputArea.vue
Normal file
@@ -0,0 +1,37 @@
|
||||
<template>
|
||||
<div class="tableInner">
|
||||
<el-input v-model="list[itemProp]" @blur="changeInput" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'InputArea',
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
itemProp: {
|
||||
type: String
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: this.injectData
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeInput() {
|
||||
console.log(this.list)
|
||||
this.$emit('emitData', this.list)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="css">
|
||||
.tableInner .el-input__inner {
|
||||
border: none;
|
||||
padding: 0;
|
||||
height: 33px;
|
||||
}
|
||||
</style>
|
||||
@@ -92,7 +92,7 @@
|
||||
</el-drawer>
|
||||
</template>
|
||||
<script>
|
||||
import inputArea from '@/components/BaseTable/subcomponents/InputArea'
|
||||
import inputArea from './InputArea'
|
||||
import { tableHeight } from '@/utils/index'
|
||||
import { getProcessDetectList, detectInput } from '@/api/qualityManagement'
|
||||
import moment from 'moment'
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
</el-drawer>
|
||||
</template>
|
||||
<script>
|
||||
import inputArea from '@/components/BaseTable/subcomponents/InputArea'
|
||||
import inputArea from './InputArea'
|
||||
import { tableHeight } from '@/utils/index'
|
||||
import {
|
||||
getProcessDetectList,
|
||||
|
||||
@@ -89,6 +89,9 @@ export default {
|
||||
name: 'search',
|
||||
color: 'primary'
|
||||
},
|
||||
{
|
||||
type: 'separate'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '导出',
|
||||
|
||||
@@ -3,11 +3,7 @@
|
||||
<el-row class="box-top">
|
||||
<el-col>
|
||||
<div class="search-box">
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick"
|
||||
/>
|
||||
<search-bar :formConfigs="formConfig" @headBtnClick="buttonClick" />
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -110,11 +106,15 @@ export default {
|
||||
name: 'search',
|
||||
color: 'primary'
|
||||
},
|
||||
{
|
||||
type: 'separate'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '导出',
|
||||
name: 'export',
|
||||
color: 'success'
|
||||
color: 'primary',
|
||||
plain: true
|
||||
}
|
||||
],
|
||||
tablePropsL,
|
||||
|
||||
@@ -3,18 +3,7 @@
|
||||
<el-row :gutter="8" class="top-box">
|
||||
<el-col :span="12">
|
||||
<div class="top-left">
|
||||
<div style="margin-bottom: 10px">
|
||||
<span class="title">检验时间</span>
|
||||
<el-date-picker
|
||||
v-model="searchTime"
|
||||
type="datetime"
|
||||
size="small"
|
||||
placeholder="检验时间"
|
||||
style="margin: 0 24px 0 8px"
|
||||
>
|
||||
</el-date-picker>
|
||||
<el-button type="primary" size="small">查询</el-button>
|
||||
</div>
|
||||
<search-bar :formConfigs="formConfig" @headBtnClick="buttonClick" />
|
||||
<base-table
|
||||
:selectWidth="50"
|
||||
:page="listQuery.current"
|
||||
@@ -124,6 +113,24 @@ export default {
|
||||
components: { defectScatterPlotTotal, defectScatterPlotChart },
|
||||
data() {
|
||||
return {
|
||||
formConfig: [
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: '检验时间',
|
||||
dateType: 'datetime',
|
||||
format: 'yyyy-MM-dd HH:mm:ss',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
placeholder: '抽检时间',
|
||||
param: 'testTime',
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '查询',
|
||||
name: 'search',
|
||||
color: 'primary'
|
||||
}
|
||||
],
|
||||
searchTime: '',
|
||||
listQuery: {
|
||||
current: 1,
|
||||
@@ -178,6 +185,9 @@ export default {
|
||||
arr.push(obj)
|
||||
}
|
||||
this.tableData = arr
|
||||
},
|
||||
buttonClick(val) {
|
||||
console.log(val)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,6 +107,9 @@ export default {
|
||||
name: 'search',
|
||||
color: 'primary'
|
||||
},
|
||||
{
|
||||
type: 'separate'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '导出',
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
<template>
|
||||
<div class="particleLine-chart">
|
||||
<div style="margin-bottom: 30px">
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick"
|
||||
/>
|
||||
<search-bar :formConfigs="formConfig" @headBtnClick="buttonClick" />
|
||||
</div>
|
||||
<div
|
||||
id="particleLineChart"
|
||||
|
||||
@@ -2,11 +2,7 @@
|
||||
<el-row :gutter="8" class="thicknessDistributionMap">
|
||||
<el-col :span="10">
|
||||
<div class="left-box">
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick"
|
||||
/>
|
||||
<search-bar :formConfigs="formConfig" @headBtnClick="buttonClick" />
|
||||
<base-table
|
||||
:page="listQuery.current"
|
||||
:limit="listQuery.size"
|
||||
|
||||
@@ -150,6 +150,9 @@ export default {
|
||||
btnName: '重置',
|
||||
name: 'reset'
|
||||
},
|
||||
{
|
||||
type: 'separate'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '录入',
|
||||
|
||||
Reference in New Issue
Block a user