|
@@ -0,0 +1,201 @@
|
|
|
+<template>
|
|
|
+ <div class="production">
|
|
|
+ <div class="my-title">生产监控详情</div>
|
|
|
+ <div v-for="(item, index) in dataList">
|
|
|
+ <el-table
|
|
|
+ :data="item.nodeList"
|
|
|
+ border
|
|
|
+ style="width: 100%;">
|
|
|
+ <el-table-column
|
|
|
+ label="序号"
|
|
|
+ type="index"
|
|
|
+ width="50"
|
|
|
+ align="center">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="nodeName"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ min-width="120"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="工序名称"/>
|
|
|
+ <el-table-column
|
|
|
+ prop="require"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ min-width="120"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="工序要求"/>
|
|
|
+ <el-table-column
|
|
|
+ prop="explain"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ min-width="120"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="工序说明"/>
|
|
|
+ <el-table-column
|
|
|
+ prop="workTypeName"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ min-width="120"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="工种"/>
|
|
|
+ <el-table-column
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ label="参考附件">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button :disabled="!scope.row.attachList || scope.row.attachList.length === 0" type="text" size="small" @click="attachDetails(scope.row.attachList)">查看</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="operatorName"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ min-width="80"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="操作人"/>
|
|
|
+ <el-table-column
|
|
|
+ prop="state"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ min-width="80"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="完成状态">
|
|
|
+ <template slot-scope="scope">{{stateFormat(scope.row)}}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="planCompletionTime"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ min-width="160"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="要求完成时间"/>
|
|
|
+ <el-table-column
|
|
|
+ prop="completionTime"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ min-width="160"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="实际完成时间"/>
|
|
|
+ <el-table-column
|
|
|
+ prop="preTaskTime"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ min-width="100"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="工艺预估工时"/>
|
|
|
+ <el-table-column
|
|
|
+ prop="actualTime"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ min-width="100"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="实际完成工时"/>
|
|
|
+ <el-table-column
|
|
|
+ prop="operationRecords"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ min-width="140"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="完成记录"/>
|
|
|
+ <el-table-column
|
|
|
+ prop="notes"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ min-width="160"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="备注"/>
|
|
|
+ <el-table-column
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ label="总检记录">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button :disabled="!scope.row.prodProductionRequireList || scope.row.prodProductionRequireList.length === 0" type="text" size="small" @click="inspectDetails(scope.row.prodProductionRequireList)">查看</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="onChose">返回</el-button>
|
|
|
+ </span>
|
|
|
+ <attach-detail-dialog v-if="attachVisible" ref="attachDetail" @onChose="onChose"/>
|
|
|
+ <inspect-type-dialog v-if="inspectVisible" ref="inspectDetail" @onChose="onChose"/>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { getMonitoringDetail } from '@/api/production'
|
|
|
+import AttachDetail from '@/views/modules/common/attach-detail'
|
|
|
+import AttachDetailDialog from '@/views/modules/common/attach-detail-dialog'
|
|
|
+import InspectTypeDialog from '@/views/modules/production/inspect-type-dialog'
|
|
|
+export default {
|
|
|
+ name: 'prod-management-details',
|
|
|
+ components: {InspectTypeDialog, AttachDetailDialog, AttachDetail},
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ attachVisible: false,
|
|
|
+ inspectVisible: false,
|
|
|
+ dataList: [],
|
|
|
+ optionsState: [
|
|
|
+ {
|
|
|
+ code: '0', value: '已完成'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: '1', value: '未完成'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ onChose () {
|
|
|
+ this.attachVisible = false
|
|
|
+ this.inspectVisible = false
|
|
|
+ this.$emit('onChose')
|
|
|
+ },
|
|
|
+ // 初始化表单
|
|
|
+ async init (id) {
|
|
|
+ await getMonitoringDetail(id).then(async ({ data }) => {
|
|
|
+ if (data && data.code === '200') {
|
|
|
+ this.dataList = data.data
|
|
|
+ } else {
|
|
|
+ this.$message.error(data.msg)
|
|
|
+ this.handleClose()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleClose () {
|
|
|
+ this.$emit('close')
|
|
|
+ },
|
|
|
+ // 转换属性“状态”
|
|
|
+ stateFormat (row) {
|
|
|
+ if (this.optionsState) {
|
|
|
+ for (let i = 0; i < this.optionsState.length; i++) {
|
|
|
+ if (this.optionsState[i].code === row.state) {
|
|
|
+ return this.optionsState[i].value
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ attachDetails (attachList) {
|
|
|
+ this.attachVisible = true
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.attachDetail.init(attachList)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ inspectDetails (inspectList) {
|
|
|
+ this.inspectVisible = true
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.inspectDetail.init(inspectList)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped lang="scss">
|
|
|
+/deep/ .my-row .super-flow__node {
|
|
|
+ width: 180px;
|
|
|
+ height: 80px;
|
|
|
+}
|
|
|
+</style>
|