Commit 5f47328f by lichengming

修改了报告编制

parent 0d0f0ad4
......@@ -61,9 +61,13 @@
</div>
<!--组件加载-->
<!--选择领样人-->
<UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>
<Operation ref="operation"></Operation>
<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>
<!-- <UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>-->
<!-- <Operation ref="operation"></Operation>-->
<!-- <FileManage ref="FileManage"></FileManage>-->
</div>
</template>
<script>
......@@ -71,10 +75,8 @@ import UserInfo from '../../../components/user-info-single/assignPerson'
import { soilReport } from '../../../api'
import Operation from '../../../components/operation/Operation'
export default {
components: {
UserInfo,
Operation
},
// eslint-disable-next-line vue/no-unused-components
components: { UserInfo, Operation },
data() {
return {
formObj: {
......@@ -89,7 +91,6 @@ export default {
// name: '管理样品'
// },
{ type: 'md-cloud', id: '', name: '附件' },
{ type: 'md-trash', id: '', name: '删除' },
{
type: 'ios-clock',
id: '',
......@@ -429,7 +430,11 @@ export default {
},
_operationRecord(id) {
// 操作日志
this.$refs.operation._open(id)
this.currentComponent = 'Operation'
this.$nextTick(() => {
this.$refs.refModal._open(id)
})
// this.$refs.operation._open(id)
},
_resultChange(msg) {
if (this.$store.state.FoodContract.success) {
......@@ -440,7 +445,11 @@ export default {
},
_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 @@
<div>
<div class="layout-content-padding">
<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-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-tab-pane label="数据审核" name="check"></el-tab-pane>
<el-tab-pane label="历史任务" name="checkHis"></el-tab-pane>
</el-tabs>
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<component ref="refModal" :is="currentComponent"></component>
</keep-alive>
</div>
</div>
</div>
......@@ -20,28 +28,37 @@ import ReportMakeByEntrust from './tabs/ReportMakeByEntrust'
import ReportMakeHis from './ReportMakeHis'
export default {
components: {
ReportMakeByEntrust,
ReportMakeHis
},
// eslint-disable-next-line vue/no-unused-components
components: { ReportMakeByEntrust, ReportMakeHis },
data() {
return {
activeName: 'check'
activeName: 'check',
currentComponent: ''
}
},
mounted() {
this.activeName = 'check'
this.$refs.checkTabs._page()
this._page()
},
methods: {
_changeTabs(tab, event) {
if (tab.name === 'check') {
this.$refs.checkTabs._open()
this._page()
} else if (tab.name === 'applyRecord') {
// this.$refs.applyRecordTabs._page()
} 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 @@
</Row>
</div>
</div>
<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>
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<component ref="refModal" :is="currentComponent" @on-result-change="_componentResult"></component>
</keep-alive>
<!-- <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>
</template>
<script>
......@@ -91,9 +95,13 @@ import OriginalRecordView from '../OriginalRecordView'
import UploadByReport from '../UploadByReport'
export default {
components: {
// eslint-disable-next-line vue/no-unused-components
SampleByMakeModal,
// eslint-disable-next-line vue/no-unused-components
Operation,
// eslint-disable-next-line vue/no-unused-components
OriginalRecordView,
// eslint-disable-next-line vue/no-unused-components
UploadByReport
},
data() {
......@@ -124,12 +132,14 @@ export default {
{
type: 'ios-flask-outline',
id: '',
name: '管理样品和报告'
name: '管理样品和报告',
currentComponent: SampleByMakeModal
},
{
type: 'ios-beaker',
id: '',
name: '查看原始记录'
name: '查看原始记录',
currentComponent: OriginalRecordView
},
{
type: 'ios-cloud-upload',
......@@ -265,15 +275,21 @@ export default {
})
}
},
_componentResult(data, msg) {
switch (this.currentComponent) {
default:
this._page()
}
},
_iconClick(res, data, componentName) {
this.currentComponent = componentName
this.$nextTick(function() {
switch (res) {
case '管理样品和报告':
this.$refs.sampleByMakeModal._open(data.id)
this.$refs.refModal._open(data.id)
break
case '查看原始记录':
this.$refs.originalRecordView._open(data.id)
this.$refs.refModal._open(data.id)
break
case '上传报告':
this._uploadReport(data.id)
......@@ -297,7 +313,11 @@ export default {
})
},
_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) {
const result = await soilSample.getReport(id)
......@@ -314,8 +334,12 @@ export default {
})
},
_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) {
switch (msg) {
......@@ -370,8 +394,12 @@ export default {
})
},
_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')
}
}
}
......
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