Commit 6261a0b5 by wangweidong

Merge remote-tracking branch 'origin/dev' into dev

parents f1c2d013 5f47328f
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
module.exports = { module.exports = {
apps: [ apps: [
{ {
name: 'pt-metr', name: 'pt-soil',
script: './node_modules/nuxt-start/bin/nuxt-start.js', script: './node_modules/nuxt-start/bin/nuxt-start.js',
instances: 2, instances: 2,
max_memory_restart: '512M', max_memory_restart: '512M',
......
<template> <template>
<div> <div>
<Modal v-model="showModal" width="1010" class="modal-footer-none"> <Modal v-model="showModal" width="1030" class="modal-footer-none">
<p slot="header"> <p slot="header">
{{ modalTitle }} {{ modalTitle }}
</p> </p>
...@@ -114,7 +114,7 @@ export default { ...@@ -114,7 +114,7 @@ export default {
selectData: {}, selectData: {},
getPage: {}, getPage: {},
pageColumns: [ pageColumns: [
{ title: '试样编号', key: 'sampleCode', width: 100, fixed: 'left' }, { title: '试样编号', key: 'sampleCode', width: 120, fixed: 'left' },
{ title: '试样深度', key: 'sampleDepth', width: 100 }, { title: '试样深度', key: 'sampleDepth', width: 100 },
{ title: '现场编号', key: 'siteNo', width: 100 }, { title: '现场编号', key: 'siteNo', width: 100 },
{ title: '试验项目', key: 'experimentNames' }, { title: '试验项目', key: 'experimentNames' },
......
...@@ -61,9 +61,13 @@ ...@@ -61,9 +61,13 @@
</div> </div>
<!--组件加载--> <!--组件加载-->
<!--选择领样人--> <!--选择领样人-->
<UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo> <keep-alive>
<Operation ref="operation"></Operation> <!-- eslint-disable-next-line vue/require-component-is -->
<FileManage ref="FileManage"></FileManage> <component ref="refModal" :is="currentComponent" @on-result-change="_componentResult"></component>
</keep-alive>
<!-- <UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>-->
<!-- <Operation ref="operation"></Operation>-->
<!-- <FileManage ref="FileManage"></FileManage>-->
</div> </div>
</template> </template>
<script> <script>
...@@ -71,10 +75,8 @@ import UserInfo from '../../../components/user-info-single/assignPerson' ...@@ -71,10 +75,8 @@ import UserInfo from '../../../components/user-info-single/assignPerson'
import { soilReport } from '../../../api' import { soilReport } from '../../../api'
import Operation from '../../../components/operation/Operation' import Operation from '../../../components/operation/Operation'
export default { export default {
components: { // eslint-disable-next-line vue/no-unused-components
UserInfo, components: { UserInfo, Operation },
Operation
},
data() { data() {
return { return {
formObj: { formObj: {
...@@ -89,7 +91,6 @@ export default { ...@@ -89,7 +91,6 @@ export default {
// name: '管理样品' // name: '管理样品'
// }, // },
{ type: 'md-cloud', id: '', name: '附件' }, { type: 'md-cloud', id: '', name: '附件' },
{ type: 'md-trash', id: '', name: '删除' },
{ {
type: 'ios-clock', type: 'ios-clock',
id: '', id: '',
...@@ -429,7 +430,11 @@ export default { ...@@ -429,7 +430,11 @@ export default {
}, },
_operationRecord(id) { _operationRecord(id) {
// 操作日志 // 操作日志
this.$refs.operation._open(id) this.currentComponent = 'Operation'
this.$nextTick(() => {
this.$refs.refModal._open(id)
})
// this.$refs.operation._open(id)
}, },
_resultChange(msg) { _resultChange(msg) {
if (this.$store.state.FoodContract.success) { if (this.$store.state.FoodContract.success) {
...@@ -440,7 +445,11 @@ export default { ...@@ -440,7 +445,11 @@ export default {
}, },
_upload(id) { _upload(id) {
// 上传文件 // 上传文件
this.$refs.FileManage._open(id, 'entrustId') this.currentComponent = 'FileManage'
this.$nextTick(() => {
this.$refs.refModal._open(id, 'entrustId')
})
// this.$refs.FileManage._open(id, 'entrustId')
} }
} }
} }
......
...@@ -2,14 +2,22 @@ ...@@ -2,14 +2,22 @@
<div> <div>
<div class="layout-content-padding"> <div class="layout-content-padding">
<div class="layout-content-main"> <div class="layout-content-main">
<!-- <el-tabs v-model="activeName" @tab-click="_changeTabs">-->
<!-- <el-tab-pane label="按委托编制" name="check">-->
<!-- <ReportMakeByEntrust ref="checkTabs"></ReportMakeByEntrust>-->
<!-- </el-tab-pane>-->
<!-- <el-tab-pane label="历史报告" name="checkHis">-->
<!-- <ReportMakeHis ref="checkHisTabs"></ReportMakeHis>-->
<!-- </el-tab-pane>-->
<!-- </el-tabs>-->
<el-tabs v-model="activeName" @tab-click="_changeTabs"> <el-tabs v-model="activeName" @tab-click="_changeTabs">
<el-tab-pane label="按委托编制" name="check"> <el-tab-pane label="数据审核" name="check"></el-tab-pane>
<ReportMakeByEntrust ref="checkTabs"></ReportMakeByEntrust> <el-tab-pane label="历史任务" name="checkHis"></el-tab-pane>
</el-tab-pane>
<el-tab-pane label="历史报告" name="checkHis">
<ReportMakeHis ref="checkHisTabs"></ReportMakeHis>
</el-tab-pane>
</el-tabs> </el-tabs>
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<component ref="refModal" :is="currentComponent"></component>
</keep-alive>
</div> </div>
</div> </div>
</div> </div>
...@@ -20,28 +28,37 @@ import ReportMakeByEntrust from './tabs/ReportMakeByEntrust' ...@@ -20,28 +28,37 @@ import ReportMakeByEntrust from './tabs/ReportMakeByEntrust'
import ReportMakeHis from './ReportMakeHis' import ReportMakeHis from './ReportMakeHis'
export default { export default {
components: { // eslint-disable-next-line vue/no-unused-components
ReportMakeByEntrust, components: { ReportMakeByEntrust, ReportMakeHis },
ReportMakeHis
},
data() { data() {
return { return {
activeName: 'check' activeName: 'check',
currentComponent: ''
} }
}, },
mounted() { mounted() {
this.activeName = 'check' this.activeName = 'check'
this.$refs.checkTabs._page() this._page()
}, },
methods: { methods: {
_changeTabs(tab, event) { _changeTabs(tab, event) {
if (tab.name === 'check') { if (tab.name === 'check') {
this.$refs.checkTabs._open() this._page()
} else if (tab.name === 'applyRecord') { } else if (tab.name === 'applyRecord') {
// this.$refs.applyRecordTabs._page() // this.$refs.applyRecordTabs._page()
} else { } else {
this.$refs.checkHisTabs._page() this.currentComponent = 'ReportMakeHis'
this.$nextTick(() => {
this.$refs.refModal._page()
})
} }
},
_page() {
this.currentComponent = 'ReportMakeByEntrust'
this.$nextTick(() => {
this.$refs.refModal._page()
})
// this.$refs.entrustTabs._page()
} }
} }
} }
......
...@@ -76,11 +76,15 @@ ...@@ -76,11 +76,15 @@
</Row> </Row>
</div> </div>
</div> </div>
<SampleByMakeModal ref="sampleByMakeModal"></SampleByMakeModal> <keep-alive>
<Operation ref="operation"></Operation> <!-- eslint-disable-next-line vue/require-component-is -->
<FileManage ref="FileManage"></FileManage> <component ref="refModal" :is="currentComponent" @on-result-change="_componentResult"></component>
<OriginalRecordView ref="originalRecordView" @on-result-change="_page"></OriginalRecordView> </keep-alive>
<UploadByReport ref="uploadReport" @on-result-change="_page"></UploadByReport> <!-- <SampleByMakeModal ref="sampleByMakeModal"></SampleByMakeModal>-->
<!-- <Operation ref="operation"></Operation>-->
<!-- <FileManage ref="FileManage"></FileManage>-->
<!-- <OriginalRecordView ref="originalRecordView" @on-result-change="_page"></OriginalRecordView>-->
<!-- <UploadByReport ref="uploadReport" @on-result-change="_page"></UploadByReport>-->
</div> </div>
</template> </template>
<script> <script>
...@@ -91,9 +95,13 @@ import OriginalRecordView from '../OriginalRecordView' ...@@ -91,9 +95,13 @@ import OriginalRecordView from '../OriginalRecordView'
import UploadByReport from '../UploadByReport' import UploadByReport from '../UploadByReport'
export default { export default {
components: { components: {
// eslint-disable-next-line vue/no-unused-components
SampleByMakeModal, SampleByMakeModal,
// eslint-disable-next-line vue/no-unused-components
Operation, Operation,
// eslint-disable-next-line vue/no-unused-components
OriginalRecordView, OriginalRecordView,
// eslint-disable-next-line vue/no-unused-components
UploadByReport UploadByReport
}, },
data() { data() {
...@@ -124,12 +132,14 @@ export default { ...@@ -124,12 +132,14 @@ export default {
{ {
type: 'ios-flask-outline', type: 'ios-flask-outline',
id: '', id: '',
name: '管理样品和报告' name: '管理样品和报告',
currentComponent: SampleByMakeModal
}, },
{ {
type: 'ios-beaker', type: 'ios-beaker',
id: '', id: '',
name: '查看原始记录' name: '查看原始记录',
currentComponent: OriginalRecordView
}, },
{ {
type: 'ios-cloud-upload', type: 'ios-cloud-upload',
...@@ -265,15 +275,21 @@ export default { ...@@ -265,15 +275,21 @@ export default {
}) })
} }
}, },
_componentResult(data, msg) {
switch (this.currentComponent) {
default:
this._page()
}
},
_iconClick(res, data, componentName) { _iconClick(res, data, componentName) {
this.currentComponent = componentName this.currentComponent = componentName
this.$nextTick(function() { this.$nextTick(function() {
switch (res) { switch (res) {
case '管理样品和报告': case '管理样品和报告':
this.$refs.sampleByMakeModal._open(data.id) this.$refs.refModal._open(data.id)
break break
case '查看原始记录': case '查看原始记录':
this.$refs.originalRecordView._open(data.id) this.$refs.refModal._open(data.id)
break break
case '上传报告': case '上传报告':
this._uploadReport(data.id) this._uploadReport(data.id)
...@@ -297,7 +313,11 @@ export default { ...@@ -297,7 +313,11 @@ export default {
}) })
}, },
_uploadReport(id) { _uploadReport(id) {
this.$refs.uploadReport._open(id) this.currentComponent = 'UploadByReport'
this.$nextTick(() => {
this.$refs.refModal._open(id)
})
// this.$refs.uploadReport._open(id)
}, },
_viewReport: async function(id) { _viewReport: async function(id) {
const result = await soilSample.getReport(id) const result = await soilSample.getReport(id)
...@@ -314,8 +334,12 @@ export default { ...@@ -314,8 +334,12 @@ export default {
}) })
}, },
_operationRecord(id) { _operationRecord(id) {
this.currentComponent = 'Operation'
this.$nextTick(() => {
this.$refs.refModal._open(id)
})
// 操作日志 // 操作日志
this.$refs.operation._open(id) // this.$refs.operation._open(id)
}, },
_tableResultChange(msg, data) { _tableResultChange(msg, data) {
switch (msg) { switch (msg) {
...@@ -370,8 +394,12 @@ export default { ...@@ -370,8 +394,12 @@ export default {
}) })
}, },
_upload(id) { _upload(id) {
this.currentComponent = 'FileManage'
this.$nextTick(() => {
this.$refs.refModal._open(id, 'entrustId')
})
// 上传文件 // 上传文件
this.$refs.FileManage._open(id, 'entrustId') // this.$refs.FileManage._open(id, 'entrustId')
} }
} }
} }
......
...@@ -2,14 +2,22 @@ ...@@ -2,14 +2,22 @@
<div> <div>
<div class="layout-content-padding"> <div class="layout-content-padding">
<div class="layout-content-main"> <div class="layout-content-main">
<!-- <el-tabs v-model="activeName" @tab-click="_changeTabs">-->
<!-- <el-tab-pane label="数据审核" name="check">-->
<!-- <SampleBackupsManage ref="checkTabs"></SampleBackupsManage>-->
<!-- </el-tab-pane>-->
<!-- <el-tab-pane label="历史任务" name="checkHis">-->
<!-- <SampleBackupsQuery ref="checkHisTabs"></SampleBackupsQuery>-->
<!-- </el-tab-pane>-->
<!-- </el-tabs>-->
<el-tabs v-model="activeName" @tab-click="_changeTabs"> <el-tabs v-model="activeName" @tab-click="_changeTabs">
<el-tab-pane label="数据审核" name="check"> <el-tab-pane label="数据审核" name="check"></el-tab-pane>
<SampleBackupsManage ref="checkTabs"></SampleBackupsManage> <el-tab-pane label="历史任务" name="checkHis"></el-tab-pane>
</el-tab-pane>
<el-tab-pane label="历史任务" name="checkHis">
<SampleBackupsQuery ref="checkHisTabs"></SampleBackupsQuery>
</el-tab-pane>
</el-tabs> </el-tabs>
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<component ref="refModal" :is="currentComponent"></component>
</keep-alive>
</div> </div>
</div> </div>
</div> </div>
...@@ -20,28 +28,37 @@ import SampleBackupsManage from './DataAudit' ...@@ -20,28 +28,37 @@ import SampleBackupsManage from './DataAudit'
import SampleBackupsQuery from './DataAuditHis' import SampleBackupsQuery from './DataAuditHis'
export default { export default {
components: { // eslint-disable-next-line vue/no-unused-components
SampleBackupsManage, components: { SampleBackupsManage, SampleBackupsQuery },
SampleBackupsQuery
},
data() { data() {
return { return {
activeName: 'check' activeName: 'check',
currentComponent: ''
} }
}, },
mounted() { mounted() {
this.activeName = 'check' this.activeName = 'check'
this.$refs.checkTabs._page() this._page()
}, },
methods: { methods: {
_changeTabs(tab, event) { _changeTabs(tab, event) {
if (tab.name === 'check') { if (tab.name === 'check') {
this.$refs.checkTabs._page() this._page()
} else if (tab.name === 'applyRecord') { } else if (tab.name === 'applyRecord') {
// this.$refs.applyRecordTabs._page() // this.$refs.applyRecordTabs._page()
} else { } else {
this.$refs.checkHisTabs._page() this.currentComponent = 'SampleBackupsQuery'
this.$nextTick(() => {
this.$refs.refModal._page()
})
} }
},
_page() {
this.currentComponent = 'SampleBackupsManage'
this.$nextTick(() => {
this.$refs.refModal._page()
})
// this.$refs.entrustTabs._page()
} }
} }
} }
......
...@@ -61,10 +61,14 @@ ...@@ -61,10 +61,14 @@
</div> </div>
<!--组件加载--> <!--组件加载-->
<!--选择领样人--> <!--选择领样人-->
<UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo> <keep-alive>
<Operation ref="operation"></Operation> <!-- eslint-disable-next-line vue/require-component-is -->
<AuditDataModal ref="sampleManageModal" @on-result-change="_page"></AuditDataModal> <component ref="refModal" :is="currentComponent" @on-result-change="_componentResult"></component>
<FileManage ref="FileManage"></FileManage> </keep-alive>
<!-- <UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>-->
<!-- <Operation ref="operation"></Operation>-->
<!-- <AuditDataModal ref="sampleManageModal" @on-result-change="_page"></AuditDataModal>-->
<!-- <FileManage ref="FileManage"></FileManage>-->
</div> </div>
</template> </template>
<script> <script>
...@@ -73,12 +77,8 @@ import { soilTest } from '../../../api' ...@@ -73,12 +77,8 @@ import { soilTest } from '../../../api'
import Operation from '../../../components/operation/Operation' import Operation from '../../../components/operation/Operation'
import AuditDataModal from './AuditDataModal' import AuditDataModal from './AuditDataModal'
export default { export default {
components: {
UserInfo,
Operation,
// eslint-disable-next-line vue/no-unused-components // eslint-disable-next-line vue/no-unused-components
AuditDataModal components: { UserInfo, Operation, AuditDataModal },
},
data() { data() {
return { return {
formObj: { formObj: {
...@@ -139,7 +139,7 @@ export default { ...@@ -139,7 +139,7 @@ export default {
} }
}, },
mounted() { mounted() {
this._page() // this._page()
// 样品接收是否选择人员 // 样品接收是否选择人员
// this.acceptSelectUserValue = localStorage.getItem('acceptSelectUserValue') // this.acceptSelectUserValue = localStorage.getItem('acceptSelectUserValue')
}, },
...@@ -365,7 +365,11 @@ export default { ...@@ -365,7 +365,11 @@ export default {
}) })
}, },
_editModal(id, type, name) { _editModal(id, type, name) {
this.$refs.sampleManageModal._open(id, type, '数据录入') this.currentComponent = 'AuditDataModal'
this.$nextTick(() => {
this.$refs.refModal._open(id, type, '数据录入')
})
// this.$refs.sampleManageModal._open(id, type, '数据录入')
}, },
_editModals(res, data) { _editModals(res, data) {
if (res === '登记协议') { if (res === '登记协议') {
...@@ -430,7 +434,11 @@ export default { ...@@ -430,7 +434,11 @@ export default {
}, },
_operationRecord(id) { _operationRecord(id) {
// 操作日志 // 操作日志
this.$refs.operation._open(id) this.currentComponent = 'Operation'
this.$nextTick(() => {
this.$refs.refModal._open(id)
})
// this.$refs.operation._open(id)
}, },
_resultChange(msg) { _resultChange(msg) {
if (this.$store.state.FoodContract.success) { if (this.$store.state.FoodContract.success) {
...@@ -441,7 +449,11 @@ export default { ...@@ -441,7 +449,11 @@ export default {
}, },
_upload(id) { _upload(id) {
// 上传文件 // 上传文件
this.$refs.FileManage._open(id, 'entrustId') this.currentComponent = 'FileManage'
this.$nextTick(() => {
this.$refs.refModal._open(id, 'entrustId')
})
// this.$refs.FileManage._open(id, 'entrustId')
} }
} }
} }
......
...@@ -61,10 +61,14 @@ ...@@ -61,10 +61,14 @@
</div> </div>
<!--组件加载--> <!--组件加载-->
<!--选择领样人--> <!--选择领样人-->
<UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo> <keep-alive>
<Operation ref="operation"></Operation> <!-- eslint-disable-next-line vue/require-component-is -->
<FileManage ref="FileManage"></FileManage> <component ref="refModal" :is="currentComponent" @on-result-change="_componentResult"></component>
<SoilSampleManageHis ref="sampleManageModal"></SoilSampleManageHis> </keep-alive>
<!-- <UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>-->
<!-- <Operation ref="operation"></Operation>-->
<!-- <FileManage ref="FileManage"></FileManage>-->
<!-- <SoilSampleManageHis ref="sampleManageModal"></SoilSampleManageHis>-->
</div> </div>
</template> </template>
<script> <script>
...@@ -73,11 +77,8 @@ import { soilTest } from '../../../api' ...@@ -73,11 +77,8 @@ import { soilTest } from '../../../api'
import Operation from '../../../components/operation/Operation' import Operation from '../../../components/operation/Operation'
import SoilSampleManageHis from './SoilSampleManageHis' import SoilSampleManageHis from './SoilSampleManageHis'
export default { export default {
components: { // eslint-disable-next-line vue/no-unused-components
UserInfo, components: { UserInfo, Operation, SoilSampleManageHis },
Operation,
SoilSampleManageHis
},
data() { data() {
return { return {
formObj: { formObj: {
...@@ -92,7 +93,6 @@ export default { ...@@ -92,7 +93,6 @@ export default {
name: '管理样品' name: '管理样品'
}, },
{ type: 'md-cloud', id: '', name: '附件' }, { type: 'md-cloud', id: '', name: '附件' },
{ type: 'md-trash', id: '', name: '删除' },
{ {
type: 'ios-clock', type: 'ios-clock',
id: '', id: '',
...@@ -139,7 +139,7 @@ export default { ...@@ -139,7 +139,7 @@ export default {
} }
}, },
mounted() { mounted() {
this._page() // this._page()
// 样品接收是否选择人员 // 样品接收是否选择人员
// this.acceptSelectUserValue = localStorage.getItem('acceptSelectUserValue') // this.acceptSelectUserValue = localStorage.getItem('acceptSelectUserValue')
}, },
...@@ -365,7 +365,11 @@ export default { ...@@ -365,7 +365,11 @@ export default {
}) })
}, },
_editModal(id, type, name) { _editModal(id, type, name) {
this.$refs.sampleManageModal._open(id, type, name) this.currentComponent = 'SoilSampleManageHis'
this.$nextTick(() => {
this.$refs.refModal._open(id, type, name)
})
// this.$refs.sampleManageModal._open(id, type, name)
}, },
_editModals(res, data) { _editModals(res, data) {
if (res === '登记协议') { if (res === '登记协议') {
...@@ -430,7 +434,11 @@ export default { ...@@ -430,7 +434,11 @@ export default {
}, },
_operationRecord(id) { _operationRecord(id) {
// 操作日志 // 操作日志
this.$refs.operation._open(id) this.currentComponent = 'Operation'
this.$nextTick(() => {
this.$refs.refModal._open(id)
})
// this.$refs.operation._open(id)
}, },
_resultChange(msg) { _resultChange(msg) {
if (this.$store.state.FoodContract.success) { if (this.$store.state.FoodContract.success) {
...@@ -440,8 +448,12 @@ export default { ...@@ -440,8 +448,12 @@ export default {
} }
}, },
_upload(id) { _upload(id) {
this.currentComponent = 'FileManage'
this.$nextTick(() => {
this.$refs.refModal._open(id, 'entrustId')
})
// 上传文件 // 上传文件
this.$refs.FileManage._open(id, 'entrustId') // this.$refs.FileManage._open(id, 'entrustId')
} }
} }
} }
......
...@@ -2,14 +2,22 @@ ...@@ -2,14 +2,22 @@
<div> <div>
<div class="layout-content-padding"> <div class="layout-content-padding">
<div class="layout-content-main"> <div class="layout-content-main">
<!-- <el-tabs v-model="activeName" @tab-click="_changeTabs">-->
<!-- <el-tab-pane label="数据复核" name="check">-->
<!-- <SampleBackupsManage ref="checkTabs"></SampleBackupsManage>-->
<!-- </el-tab-pane>-->
<!-- <el-tab-pane label="历史任务" name="checkHis">-->
<!-- <SampleBackupsQuery ref="checkHisTabs"></SampleBackupsQuery>-->
<!-- </el-tab-pane>-->
<!-- </el-tabs>-->
<el-tabs v-model="activeName" @tab-click="_changeTabs"> <el-tabs v-model="activeName" @tab-click="_changeTabs">
<el-tab-pane label="数据复核" name="check"> <el-tab-pane label="数据复核" name="check"></el-tab-pane>
<SampleBackupsManage ref="checkTabs"></SampleBackupsManage> <el-tab-pane label="历史任务" name="checkHis"></el-tab-pane>
</el-tab-pane>
<el-tab-pane label="历史任务" name="checkHis">
<SampleBackupsQuery ref="checkHisTabs"></SampleBackupsQuery>
</el-tab-pane>
</el-tabs> </el-tabs>
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<component ref="refModal" :is="currentComponent"></component>
</keep-alive>
</div> </div>
</div> </div>
</div> </div>
...@@ -20,28 +28,37 @@ import SampleBackupsManage from './DataCheck' ...@@ -20,28 +28,37 @@ import SampleBackupsManage from './DataCheck'
import SampleBackupsQuery from './DataCheckHis' import SampleBackupsQuery from './DataCheckHis'
export default { export default {
components: { // eslint-disable-next-line vue/no-unused-components
SampleBackupsManage, components: { SampleBackupsManage, SampleBackupsQuery },
SampleBackupsQuery
},
data() { data() {
return { return {
activeName: 'check' activeName: 'check',
currentComponent: ''
} }
}, },
mounted() { mounted() {
this.activeName = 'check' this.activeName = 'check'
this.$refs.checkTabs._page() this._page()
}, },
methods: { methods: {
_changeTabs(tab, event) { _changeTabs(tab, event) {
if (tab.name === 'check') { if (tab.name === 'check') {
this.$refs.checkTabs._page() this._page()
} else if (tab.name === 'applyRecord') { } else if (tab.name === 'applyRecord') {
// this.$refs.applyRecordTabs._page() // this.$refs.applyRecordTabs._page()
} else { } else {
this.$refs.checkHisTabs._page() this.currentComponent = 'SampleBackupsQuery'
this.$nextTick(() => {
this.$refs.refModal._page()
})
} }
},
_page() {
this.currentComponent = 'SampleBackupsManage'
this.$nextTick(() => {
this.$refs.refModal._page()
})
// this.$refs.entrustTabs._page()
} }
} }
} }
......
...@@ -61,10 +61,14 @@ ...@@ -61,10 +61,14 @@
</div> </div>
<!--组件加载--> <!--组件加载-->
<!--选择领样人--> <!--选择领样人-->
<UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo> <keep-alive>
<Operation ref="operation"></Operation> <!-- eslint-disable-next-line vue/require-component-is -->
<AuditDataModal ref="sampleManageModal" @on-result-change="_page"></AuditDataModal> <component ref="refModal" :is="currentComponent" @on-result-change="_componentResult"></component>
<FileManage ref="FileManage"></FileManage> </keep-alive>
<!-- <UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>-->
<!-- <Operation ref="operation"></Operation>-->
<!-- <AuditDataModal ref="sampleManageModal" @on-result-change="_page"></AuditDataModal>-->
<!-- <FileManage ref="FileManage"></FileManage>-->
</div> </div>
</template> </template>
<script> <script>
...@@ -73,12 +77,8 @@ import { soilTest } from '../../../api' ...@@ -73,12 +77,8 @@ import { soilTest } from '../../../api'
import Operation from '../../../components/operation/Operation' import Operation from '../../../components/operation/Operation'
import AuditDataModal from './CheckDataModal' import AuditDataModal from './CheckDataModal'
export default { export default {
components: {
UserInfo,
Operation,
// eslint-disable-next-line vue/no-unused-components // eslint-disable-next-line vue/no-unused-components
AuditDataModal components: { UserInfo, Operation, AuditDataModal },
},
data() { data() {
return { return {
formObj: { formObj: {
...@@ -139,7 +139,7 @@ export default { ...@@ -139,7 +139,7 @@ export default {
} }
}, },
mounted() { mounted() {
this._page() // this._page()
// 样品接收是否选择人员 // 样品接收是否选择人员
// this.acceptSelectUserValue = localStorage.getItem('acceptSelectUserValue') // this.acceptSelectUserValue = localStorage.getItem('acceptSelectUserValue')
}, },
...@@ -365,7 +365,11 @@ export default { ...@@ -365,7 +365,11 @@ export default {
}) })
}, },
_editModal(id, type, name) { _editModal(id, type, name) {
this.$refs.sampleManageModal._open(id, type, '数据录入') this.currentComponent = 'AuditDataModal'
this.$nextTick(() => {
this.$refs.refModal._open(id, type, '数据录入')
})
// this.$refs.sampleManageModal._open(id, type, '数据录入')
}, },
_editModals(res, data) { _editModals(res, data) {
if (res === '登记协议') { if (res === '登记协议') {
...@@ -429,8 +433,12 @@ export default { ...@@ -429,8 +433,12 @@ export default {
this._page() this._page()
}, },
_operationRecord(id) { _operationRecord(id) {
this.currentComponent = 'Operation'
this.$nextTick(() => {
this.$refs.refModal._open(id)
})
// 操作日志 // 操作日志
this.$refs.operation._open(id) // this.$refs.operation._open(id)
}, },
_resultChange(msg) { _resultChange(msg) {
if (this.$store.state.FoodContract.success) { if (this.$store.state.FoodContract.success) {
...@@ -440,8 +448,12 @@ export default { ...@@ -440,8 +448,12 @@ export default {
} }
}, },
_upload(id) { _upload(id) {
this.currentComponent = 'FileManage'
this.$nextTick(() => {
this.$refs.refModal._open(id, 'entrustId')
})
// 上传文件 // 上传文件
this.$refs.FileManage._open(id, 'entrustId') // this.$refs.FileManage._open(id, 'entrustId')
} }
} }
} }
......
...@@ -61,10 +61,14 @@ ...@@ -61,10 +61,14 @@
</div> </div>
<!--组件加载--> <!--组件加载-->
<!--选择领样人--> <!--选择领样人-->
<UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo> <keep-alive>
<Operation ref="operation"></Operation> <!-- eslint-disable-next-line vue/require-component-is -->
<FileManage ref="FileManage"></FileManage> <component ref="refModal" :is="currentComponent" @on-result-change="_componentResult"></component>
<SoilSampleManageHis ref="sampleManageModal"></SoilSampleManageHis> </keep-alive>
<!-- <UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>-->
<!-- <Operation ref="operation"></Operation>-->
<!-- <FileManage ref="FileManage"></FileManage>-->
<!-- <SoilSampleManageHis ref="sampleManageModal"></SoilSampleManageHis>-->
</div> </div>
</template> </template>
<script> <script>
...@@ -73,11 +77,8 @@ import { soilTest } from '../../../api' ...@@ -73,11 +77,8 @@ import { soilTest } from '../../../api'
import Operation from '../../../components/operation/Operation' import Operation from '../../../components/operation/Operation'
import SoilSampleManageHis from './SoilSampleManageHis' import SoilSampleManageHis from './SoilSampleManageHis'
export default { export default {
components: { // eslint-disable-next-line vue/no-unused-components
UserInfo, components: { UserInfo, Operation, SoilSampleManageHis },
Operation,
SoilSampleManageHis
},
data() { data() {
return { return {
formObj: { formObj: {
...@@ -138,7 +139,7 @@ export default { ...@@ -138,7 +139,7 @@ export default {
} }
}, },
mounted() { mounted() {
this._page() // this._page()
// 样品接收是否选择人员 // 样品接收是否选择人员
// this.acceptSelectUserValue = localStorage.getItem('acceptSelectUserValue') // this.acceptSelectUserValue = localStorage.getItem('acceptSelectUserValue')
}, },
...@@ -364,7 +365,11 @@ export default { ...@@ -364,7 +365,11 @@ export default {
}) })
}, },
_editModal(id, type, name) { _editModal(id, type, name) {
this.$refs.sampleManageModal._open(id, type, name) this.currentComponent = 'SoilSampleManageHis'
this.$nextTick(() => {
this.$refs.refModal._open(id, type, name)
})
// this.$refs.sampleManageModal._open(id, type, name)
}, },
_editModals(res, data) { _editModals(res, data) {
if (res === '登记协议') { if (res === '登记协议') {
...@@ -429,7 +434,11 @@ export default { ...@@ -429,7 +434,11 @@ export default {
}, },
_operationRecord(id) { _operationRecord(id) {
// 操作日志 // 操作日志
this.$refs.operation._open(id) this.currentComponent = 'Operation'
this.$nextTick(() => {
this.$refs.refModal._open(id)
})
// this.$refs.operation._open(id)
}, },
_resultChange(msg) { _resultChange(msg) {
if (this.$store.state.FoodContract.success) { if (this.$store.state.FoodContract.success) {
...@@ -440,7 +449,11 @@ export default { ...@@ -440,7 +449,11 @@ export default {
}, },
_upload(id) { _upload(id) {
// 上传文件 // 上传文件
this.$refs.FileManage._open(id, 'entrustId') this.currentComponent = 'FileManage'
this.$nextTick(() => {
this.$refs.refModal._open(id, 'entrustId')
})
// this.$refs.FileManage._open(id, 'entrustId')
} }
} }
} }
......
...@@ -61,10 +61,14 @@ ...@@ -61,10 +61,14 @@
</div> </div>
<!--组件加载--> <!--组件加载-->
<!--选择领样人--> <!--选择领样人-->
<UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo> <keep-alive>
<Operation ref="operation"></Operation> <!-- eslint-disable-next-line vue/require-component-is -->
<FileManage ref="FileManage"></FileManage> <component ref="refModal" :is="currentComponent" @on-result-change="_componentResult"></component>
<SoilSampleManageHis ref="sampleManageModal"></SoilSampleManageHis> </keep-alive>
<!-- <UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>-->
<!-- <Operation ref="operation"></Operation>-->
<!-- <FileManage ref="FileManage"></FileManage>-->
<!-- <SoilSampleManageHis ref="sampleManageModal"></SoilSampleManageHis>-->
</div> </div>
</template> </template>
<script> <script>
...@@ -73,11 +77,8 @@ import { soilTest } from '../../../api' ...@@ -73,11 +77,8 @@ import { soilTest } from '../../../api'
import Operation from '../../../components/operation/Operation' import Operation from '../../../components/operation/Operation'
import SoilSampleManageHis from './SoilSampleManageHis' import SoilSampleManageHis from './SoilSampleManageHis'
export default { export default {
components: { // eslint-disable-next-line vue/no-unused-components
UserInfo, components: { UserInfo, Operation, SoilSampleManageHis },
Operation,
SoilSampleManageHis
},
data() { data() {
return { return {
formObj: { formObj: {
...@@ -89,7 +90,7 @@ export default { ...@@ -89,7 +90,7 @@ export default {
{ {
type: 'ios-beaker', type: 'ios-beaker',
id: '', id: '',
name: '审核数据' name: '管理样品'
}, },
{ type: 'md-cloud', id: '', name: '附件' }, { type: 'md-cloud', id: '', name: '附件' },
{ {
...@@ -345,7 +346,7 @@ export default { ...@@ -345,7 +346,7 @@ export default {
console.log(res) console.log(res)
this.$nextTick(() => { this.$nextTick(() => {
switch (res) { switch (res) {
case '审核数据': case '管理样品':
this._editModal(data.id, data.type, data.cname) this._editModal(data.id, data.type, data.cname)
break break
case '项目管理': case '项目管理':
...@@ -364,7 +365,11 @@ export default { ...@@ -364,7 +365,11 @@ export default {
}) })
}, },
_editModal(id, type, name) { _editModal(id, type, name) {
this.$refs.sampleManageModal._open(id, type, '数据录入') this.currentComponent = 'SoilSampleManageHis'
this.$nextTick(() => {
this.$refs.refModal._open(id, type, '数据录入')
})
// this.$refs.sampleManageModal._open(id, type, '数据录入')
}, },
_editModals(res, data) { _editModals(res, data) {
if (res === '登记协议') { if (res === '登记协议') {
...@@ -429,7 +434,11 @@ export default { ...@@ -429,7 +434,11 @@ export default {
}, },
_operationRecord(id) { _operationRecord(id) {
// 操作日志 // 操作日志
this.$refs.operation._open(id) this.currentComponent = 'Operation'
this.$nextTick(() => {
this.$refs.refModal._open(id)
})
// this.$refs.operation._open(id)
}, },
_resultChange(msg) { _resultChange(msg) {
if (this.$store.state.FoodContract.success) { if (this.$store.state.FoodContract.success) {
...@@ -440,7 +449,11 @@ export default { ...@@ -440,7 +449,11 @@ export default {
}, },
_upload(id) { _upload(id) {
// 上传文件 // 上传文件
this.$refs.FileManage._open(id, 'entrustId') this.currentComponent = 'FileManage'
this.$nextTick(() => {
this.$refs.refModal._open(id, 'entrustId')
})
// this.$refs.FileManage._open(id, 'entrustId')
} }
} }
} }
......
...@@ -61,10 +61,14 @@ ...@@ -61,10 +61,14 @@
</div> </div>
<!--组件加载--> <!--组件加载-->
<!--选择领样人--> <!--选择领样人-->
<UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo> <keep-alive>
<Operation ref="operation"></Operation> <!-- eslint-disable-next-line vue/require-component-is -->
<SampleManage ref="sampleManageModal" @on-result-change="_page"></SampleManage> <component ref="refModal" :is="currentComponent" @on-result-change="_componentResult"></component>
<FileManage ref="FileManage"></FileManage> </keep-alive>
<!-- <UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>-->
<!-- <Operation ref="operation"></Operation>-->
<!-- <SampleManage ref="sampleManageModal" @on-result-change="_page"></SampleManage>-->
<!-- <FileManage ref="FileManage"></FileManage>-->
</div> </div>
</template> </template>
<script> <script>
...@@ -73,12 +77,8 @@ import { soilTest } from '../../../api' ...@@ -73,12 +77,8 @@ import { soilTest } from '../../../api'
import Operation from '../../../components/operation/Operation' import Operation from '../../../components/operation/Operation'
import SampleManage from './SampleManage' import SampleManage from './SampleManage'
export default { export default {
components: {
UserInfo,
Operation,
// eslint-disable-next-line vue/no-unused-components // eslint-disable-next-line vue/no-unused-components
SampleManage components: { UserInfo, Operation, SampleManage },
},
data() { data() {
return { return {
formObj: { formObj: {
...@@ -139,7 +139,7 @@ export default { ...@@ -139,7 +139,7 @@ export default {
} }
}, },
mounted() { mounted() {
this._page() // this._page()
// 样品接收是否选择人员 // 样品接收是否选择人员
// this.acceptSelectUserValue = localStorage.getItem('acceptSelectUserValue') // this.acceptSelectUserValue = localStorage.getItem('acceptSelectUserValue')
}, },
...@@ -365,7 +365,11 @@ export default { ...@@ -365,7 +365,11 @@ export default {
}) })
}, },
_editModal(id, type, name) { _editModal(id, type, name) {
this.$refs.sampleManageModal._open(id, type, '数据录入') this.currentComponent = 'SampleManage'
this.$nextTick(() => {
this.$refs.refModal._open(id, type, '数据录入')
})
// this.$refs.sampleManageModal._open(id, type, '数据录入')
}, },
_editModals(res, data) { _editModals(res, data) {
if (res === '登记协议') { if (res === '登记协议') {
...@@ -429,8 +433,12 @@ export default { ...@@ -429,8 +433,12 @@ export default {
this._page() this._page()
}, },
_operationRecord(id) { _operationRecord(id) {
this.currentComponent = 'Operation'
this.$nextTick(() => {
this.$refs.refModal._open(id)
})
// 操作日志 // 操作日志
this.$refs.operation._open(id) // this.$refs.operation._open(id)
}, },
_resultChange(msg) { _resultChange(msg) {
if (this.$store.state.FoodContract.success) { if (this.$store.state.FoodContract.success) {
...@@ -441,7 +449,11 @@ export default { ...@@ -441,7 +449,11 @@ export default {
}, },
_upload(id) { _upload(id) {
// 上传文件 // 上传文件
this.$refs.FileManage._open(id, 'entrustId') this.currentComponent = 'FileManage'
this.$nextTick(() => {
this.$refs.refModal._open(id, 'entrustId')
})
// this.$refs.FileManage._open(id, 'entrustId')
} }
} }
} }
......
...@@ -61,10 +61,14 @@ ...@@ -61,10 +61,14 @@
</div> </div>
<!--组件加载--> <!--组件加载-->
<!--选择领样人--> <!--选择领样人-->
<UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo> <keep-alive>
<Operation ref="operation"></Operation> <!-- eslint-disable-next-line vue/require-component-is -->
<FileManage ref="FileManage"></FileManage> <component ref="refModal" :is="currentComponent" @on-result-change="_componentResult"></component>
<SoilSampleManageHis ref="sampleManageModal"></SoilSampleManageHis> </keep-alive>
<!-- <UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>-->
<!-- <Operation ref="operation"></Operation>-->
<!-- <FileManage ref="FileManage"></FileManage>-->
<!-- <SoilSampleManageHis ref="sampleManageModal"></SoilSampleManageHis>-->
</div> </div>
</template> </template>
<script> <script>
...@@ -73,11 +77,8 @@ import { soilTest } from '../../../api' ...@@ -73,11 +77,8 @@ import { soilTest } from '../../../api'
import Operation from '../../../components/operation/Operation' import Operation from '../../../components/operation/Operation'
import SoilSampleManageHis from './SoilSampleManageHis' import SoilSampleManageHis from './SoilSampleManageHis'
export default { export default {
components: { // eslint-disable-next-line vue/no-unused-components
UserInfo, components: { UserInfo, Operation, SoilSampleManageHis },
Operation,
SoilSampleManageHis
},
data() { data() {
return { return {
formObj: { formObj: {
...@@ -138,7 +139,7 @@ export default { ...@@ -138,7 +139,7 @@ export default {
} }
}, },
mounted() { mounted() {
this._page() // this._page()
// 样品接收是否选择人员 // 样品接收是否选择人员
// this.acceptSelectUserValue = localStorage.getItem('acceptSelectUserValue') // this.acceptSelectUserValue = localStorage.getItem('acceptSelectUserValue')
}, },
...@@ -364,7 +365,11 @@ export default { ...@@ -364,7 +365,11 @@ export default {
}) })
}, },
_editModal(id, type, name) { _editModal(id, type, name) {
this.$refs.sampleManageModal._open(id, type, name) this.currentComponent = 'SoilSampleManageHis'
this.$nextTick(() => {
this.$refs.refModal._open(id, type, name)
})
// this.$refs.sampleManageModal._open(id, type, name)
}, },
_editModals(res, data) { _editModals(res, data) {
if (res === '登记协议') { if (res === '登记协议') {
...@@ -429,7 +434,11 @@ export default { ...@@ -429,7 +434,11 @@ export default {
}, },
_operationRecord(id) { _operationRecord(id) {
// 操作日志 // 操作日志
this.$refs.operation._open(id) this.currentComponent = 'Operation'
this.$nextTick(() => {
this.$refs.refModal._open(id)
})
// this.$refs.operation._open(id)
}, },
_resultChange(msg) { _resultChange(msg) {
if (this.$store.state.FoodContract.success) { if (this.$store.state.FoodContract.success) {
...@@ -440,7 +449,11 @@ export default { ...@@ -440,7 +449,11 @@ export default {
}, },
_upload(id) { _upload(id) {
// 上传文件 // 上传文件
this.$refs.FileManage._open(id, 'entrustId') this.currentComponent = 'FileManage'
this.$nextTick(() => {
this.$refs.refModal._open(id, 'entrustId')
})
// this.$refs.FileManage._open(id, 'entrustId')
} }
} }
} }
......
...@@ -2,14 +2,22 @@ ...@@ -2,14 +2,22 @@
<div> <div>
<div class="layout-content-padding"> <div class="layout-content-padding">
<div class="layout-content-main"> <div class="layout-content-main">
<!-- <el-tabs v-model="activeName" @tab-click="_changeTabs">-->
<!-- <el-tab-pane label="数据录入" name="wait">-->
<!-- <SampleBackupsManage ref="waitTabs"></SampleBackupsManage>-->
<!-- </el-tab-pane>-->
<!-- <el-tab-pane label="录入历史" name="query">-->
<!-- <SampleBackupsQuery ref="queryTabs"></SampleBackupsQuery>-->
<!-- </el-tab-pane>-->
<!-- </el-tabs>-->
<el-tabs v-model="activeName" @tab-click="_changeTabs"> <el-tabs v-model="activeName" @tab-click="_changeTabs">
<el-tab-pane label="数据录入" name="wait"> <el-tab-pane label="数据录入" name="waitTabs"></el-tab-pane>
<SampleBackupsManage ref="waitTabs"></SampleBackupsManage> <el-tab-pane label="录入历史" name="queryTabs"></el-tab-pane>
</el-tab-pane>
<el-tab-pane label="录入历史" name="query">
<SampleBackupsQuery ref="queryTabs"></SampleBackupsQuery>
</el-tab-pane>
</el-tabs> </el-tabs>
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<component ref="refModal" :is="currentComponent"></component>
</keep-alive>
</div> </div>
</div> </div>
</div> </div>
...@@ -20,28 +28,37 @@ import SampleBackupsManage from './TestInput' ...@@ -20,28 +28,37 @@ import SampleBackupsManage from './TestInput'
import SampleBackupsQuery from './TestInputHis' import SampleBackupsQuery from './TestInputHis'
export default { export default {
components: { // eslint-disable-next-line vue/no-unused-components
SampleBackupsManage, components: { SampleBackupsManage, SampleBackupsQuery },
SampleBackupsQuery
},
data() { data() {
return { return {
activeName: 'wait' activeName: 'waitTabs',
currentComponent: ''
} }
}, },
mounted() { mounted() {
this.activeName = 'wait' this.activeName = 'waitTabs'
this.$refs.waitTabs._page() this._page()
}, },
methods: { methods: {
_changeTabs(tab, event) { _changeTabs(tab, event) {
if (tab.name === 'wait') { if (tab.name === 'waitTabs') {
this.$refs.waitTabs._page() this._page()
} else if (tab.name === 'applyRecord') { } else if (tab.name === 'applyRecord') {
// this.$refs.applyRecordTabs._page() // this.$refs.applyRecordTabs._page()
} else { } else {
this.$refs.queryTabs._page() this.currentComponent = 'SampleBackupsQuery'
this.$nextTick(() => {
this.$refs.refModal._page()
})
} }
},
_page() {
this.currentComponent = 'SampleBackupsManage'
this.$nextTick(() => {
this.$refs.refModal._page()
})
// this.$refs.entrustTabs._page()
} }
} }
} }
......
...@@ -59,11 +59,15 @@ ...@@ -59,11 +59,15 @@
</div> </div>
<!--组件加载--> <!--组件加载-->
<!--选择领样人--> <!--选择领样人-->
<UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo> <!-- <UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>-->
<SampleManage ref="sampleManageModal" @on-result-change="_page"></SampleManage> <!-- <SampleManage ref="sampleManageModal" @on-result-change="_page"></SampleManage>-->
<ItemManage ref="itemManageModal" @on-result-change="_page"></ItemManage> <!-- <ItemManage ref="itemManageModal" @on-result-change="_page"></ItemManage>-->
<Operation ref="operation"></Operation> <!-- <Operation ref="operation"></Operation>-->
<FileManage ref="FileManage"></FileManage> <!-- <FileManage ref="FileManage"></FileManage>-->
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<component ref="refModal" :is="currentComponent" @on-result-change="_componentResult"></component>
</keep-alive>
</div> </div>
</template> </template>
<script> <script>
...@@ -73,12 +77,8 @@ import Operation from '../../../components/operation/Operation' ...@@ -73,12 +77,8 @@ import Operation from '../../../components/operation/Operation'
import SampleManage from './entrust-sample-manage/SampleManage' import SampleManage from './entrust-sample-manage/SampleManage'
import ItemManage from './ItemManage' import ItemManage from './ItemManage'
export default { export default {
components: { // eslint-disable-next-line vue/no-unused-components
UserInfo, components: { UserInfo, SampleManage, ItemManage, Operation },
SampleManage,
ItemManage,
Operation
},
data() { data() {
return { return {
formObj: { formObj: {
...@@ -200,7 +200,11 @@ export default { ...@@ -200,7 +200,11 @@ export default {
}) })
}, },
_editModal(id, type) { _editModal(id, type) {
this.$refs.sampleManageModal._open(id, type, '分配历史') this.currentComponent = 'SampleManage'
this.$nextTick(() => {
this.$refs.refModal._open(id, type, '分配历史')
})
// this.$refs.sampleManageModal._open(id, type, '分配历史')
}, },
_tableResultChange(msg, data) { _tableResultChange(msg, data) {
switch (msg) { switch (msg) {
...@@ -233,12 +237,20 @@ export default { ...@@ -233,12 +237,20 @@ export default {
}, },
_operationRecord(id) { _operationRecord(id) {
// 操作日志 // 操作日志
this.$refs.operation._open(id) this.currentComponent = 'Operation'
this.$nextTick(() => {
this.$refs.refModal._open(id)
})
// this.$refs.operation._open(id)
}, },
_resultChange(msg) {}, _resultChange(msg) {},
_upload(id) { _upload(id) {
this.currentComponent = 'FileManage'
this.$nextTick(() => {
this.$refs.refModal._open(id, 'entrustId')
})
// 上传文件 // 上传文件
this.$refs.FileManage._open(id, 'entrustId') // this.$refs.FileManage._open(id, 'entrustId')
} }
} }
} }
......
...@@ -61,11 +61,15 @@ ...@@ -61,11 +61,15 @@
</div> </div>
<!--组件加载--> <!--组件加载-->
<!--选择领样人--> <!--选择领样人-->
<UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo> <keep-alive>
<SampleManage ref="sampleManageModal" @on-result-change="_page"></SampleManage> <!-- eslint-disable-next-line vue/require-component-is -->
<ItemManage ref="itemManageModal" @on-result-change="_page"></ItemManage> <component ref="refModal" :is="currentComponent" @on-result-change="_componentResult"></component>
<Operation ref="operation"></Operation> </keep-alive>
<FileManage ref="FileManage"></FileManage> <!-- <UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>-->
<!-- <SampleManage ref="sampleManageModal" @on-result-change="_page"></SampleManage>-->
<!-- <ItemManage ref="itemManageModal" @on-result-change="_page"></ItemManage>-->
<!-- <Operation ref="operation"></Operation>-->
<!-- <FileManage ref="FileManage"></FileManage>-->
</div> </div>
</template> </template>
<script> <script>
...@@ -76,9 +80,13 @@ import SampleManage from './entrust-sample-manage/SampleManage' ...@@ -76,9 +80,13 @@ import SampleManage from './entrust-sample-manage/SampleManage'
import ItemManage from './ItemManage' import ItemManage from './ItemManage'
export default { export default {
components: { components: {
// eslint-disable-next-line vue/no-unused-components
UserInfo, UserInfo,
// eslint-disable-next-line vue/no-unused-components
SampleManage, SampleManage,
// eslint-disable-next-line vue/no-unused-components
ItemManage, ItemManage,
// eslint-disable-next-line vue/no-unused-components
Operation Operation
}, },
data() { data() {
...@@ -362,7 +370,11 @@ export default { ...@@ -362,7 +370,11 @@ export default {
}) })
}, },
_editModal(id, type) { _editModal(id, type) {
this.$refs.sampleManageModal._open(id, type, '按委托分配') this.currentComponent = 'SampleManage'
this.$nextTick(() => {
this.$refs.refModal._open(id, type, '按委托分配')
})
// this.$refs.sampleManageModal._open(id, type, '按委托分配')
}, },
_editModals(res, data) { _editModals(res, data) {
if (res === '登记协议') { if (res === '登记协议') {
...@@ -426,7 +438,11 @@ export default { ...@@ -426,7 +438,11 @@ export default {
}, },
_operationRecord(id) { _operationRecord(id) {
// 操作日志 // 操作日志
this.$refs.operation._open(id) this.currentComponent = 'Operation'
this.$nextTick(() => {
this.$refs.refModal._open(id)
})
// this.$refs.operation._open(id)
}, },
_resultChange(msg) { _resultChange(msg) {
if (this.$store.state.FoodContract.success) { if (this.$store.state.FoodContract.success) {
...@@ -437,7 +453,11 @@ export default { ...@@ -437,7 +453,11 @@ export default {
}, },
_upload(id) { _upload(id) {
// 上传文件 // 上传文件
this.$refs.FileManage._open(id, 'entrustId') this.currentComponent = 'FileManage'
this.$nextTick(() => {
this.$refs.refModal._open(id, 'entrustId')
})
// this.$refs.FileManage._open(id, 'entrustId')
} }
} }
} }
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
<div class="layout-content-padding"> <div class="layout-content-padding">
<div class="layout-content-main"> <div class="layout-content-main">
<el-tabs v-model="activeName" @tab-click="_changeTabs"> <el-tabs v-model="activeName" @tab-click="_changeTabs">
<el-tab-pane label="试验任务分配" name="entrust"> <el-tab-pane label="试验任务分配" name="entrust"></el-tab-pane>
<ReceiveByEntrust ref="entrustTabs"></ReceiveByEntrust> <el-tab-pane label="分配历史" name="sample"></el-tab-pane>
</el-tab-pane>
<el-tab-pane label="分配历史" name="sample">
<ReceiveBySample ref="sampleTabs"></ReceiveBySample>
</el-tab-pane>
</el-tabs> </el-tabs>
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<component ref="refModal" :is="currentComponent"></component>
</keep-alive>
</div> </div>
</div> </div>
</div> </div>
...@@ -21,13 +21,12 @@ import ReceiveByEntrust from './AllotByEntrust' ...@@ -21,13 +21,12 @@ import ReceiveByEntrust from './AllotByEntrust'
export default { export default {
name: 'MeterSummaryEntrustIndex', name: 'MeterSummaryEntrustIndex',
components: { // eslint-disable-next-line vue/no-unused-components
ReceiveByEntrust, components: { ReceiveByEntrust, ReceiveBySample },
ReceiveBySample
},
data() { data() {
return { return {
activeName: 'entrust' activeName: 'entrust',
currentComponent: ''
} }
}, },
mounted() { mounted() {
...@@ -39,11 +38,19 @@ export default { ...@@ -39,11 +38,19 @@ export default {
if (tab.name === 'entrust') { if (tab.name === 'entrust') {
this._page() this._page()
} else { } else {
this.$refs.sampleTabs._page() this.currentComponent = 'ReceiveBySample'
this.$nextTick(() => {
this.$refs.refModal._page()
})
// this.$refs.sampleTabs._page()
} }
}, },
_page() { _page() {
this.$refs.entrustTabs._page() this.currentComponent = 'ReceiveByEntrust'
this.$nextTick(() => {
this.$refs.refModal._page()
})
// this.$refs.entrustTabs._page()
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment