|
@@ -13,121 +13,115 @@
|
|
|
<el-button @click="queryData()">查询</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
- <el-radio-group @change="queryData" v-model="dataForm.state">
|
|
|
+ <!-- <el-radio-group @change="queryData" v-model="dataForm.state">
|
|
|
<el-radio-button
|
|
|
v-for="item in optionsState"
|
|
|
:key="item.code"
|
|
|
:label="item.code"
|
|
|
>{{ item.value }}</el-radio-button
|
|
|
>
|
|
|
- </el-radio-group>
|
|
|
+ </el-radio-group> -->
|
|
|
+ <el-tabs v-model="dataForm.state" @tab-click="queryData">
|
|
|
+ <el-tab-pane label="未开始" name="1"></el-tab-pane>
|
|
|
+ <el-tab-pane label="待操作" name="2"></el-tab-pane>
|
|
|
+ <el-tab-pane label="已完成" name="3"></el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
<el-table
|
|
|
:data="dataList"
|
|
|
border
|
|
|
v-loading="dataListLoading"
|
|
|
- style="width: 100%; margin-top: 20px"
|
|
|
+ style="width: 100%;"
|
|
|
>
|
|
|
<el-table-column label="序号" type="index" width="50" align="center">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="taskName"
|
|
|
+ prop="ranks"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
min-width="140"
|
|
|
:show-tooltip-when-overflow="true"
|
|
|
- label="任务名称"
|
|
|
+ label="级别"
|
|
|
>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>
|
|
|
+ {{
|
|
|
+ rankTypeOption.findIndex((t) => t.value == scope.row.ranks) > -1
|
|
|
+ ? rankTypeOption.find((t) => t.value == scope.row.ranks).label
|
|
|
+ : ''
|
|
|
+ }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- v-if="Number(dataForm.state) !== 2"
|
|
|
- prop="completeNum"
|
|
|
+ prop="taskType"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
min-width="160"
|
|
|
- label="任务进度"
|
|
|
+ label="工单类型"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-progress
|
|
|
- :percentage="
|
|
|
- getPercentage(scope.row.completeNum, scope.row.totalNum)
|
|
|
- "
|
|
|
- ></el-progress>
|
|
|
+ <span>
|
|
|
+ {{
|
|
|
+ taskTypeOption.findIndex((t) => t.value == scope.row.taskType) > -1
|
|
|
+ ? taskTypeOption.find((t) => t.value == scope.row.taskType).label
|
|
|
+ : ''
|
|
|
+ }}
|
|
|
+ </span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="planCompletionTime"
|
|
|
+ prop="taskName"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
- min-width="160"
|
|
|
- label="规定完成时间"
|
|
|
+ min-width="140"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="工单名称"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="historicalOperationRecords"
|
|
|
+ prop="content"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
- width="160"
|
|
|
+ min-width="140"
|
|
|
:show-tooltip-when-overflow="true"
|
|
|
- label="操作历史记录"
|
|
|
+ label="工单内容"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="nodeName"
|
|
|
+ prop="planCompletionTime"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
min-width="160"
|
|
|
- :show-tooltip-when-overflow="true"
|
|
|
- label="工序内容"
|
|
|
+ label="规定完成时间"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="require"
|
|
|
+ <el-table-column
|
|
|
+ prop="attachListVo"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
- width="160"
|
|
|
- :show-tooltip-when-overflow="true"
|
|
|
- label="工序要求"
|
|
|
+ min-width="200"
|
|
|
+ label="工单附件"
|
|
|
>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button :disabled="!scope.row.attachListVo || scope.row.attachListVo.length === 0" type="text" size="small" @click="changeDetails(scope.row.attachListVo)">查看</el-button>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="explain"
|
|
|
+ prop="remark"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
- width="160"
|
|
|
+ min-width="160"
|
|
|
:show-tooltip-when-overflow="true"
|
|
|
- label="工序说明"
|
|
|
+ label="备注"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
+ prop="receiverName"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
- min-width="200"
|
|
|
- label="工序附件"
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- <div
|
|
|
- v-for="(item, index) in scope.row.attachList"
|
|
|
- style="display: inline"
|
|
|
- >
|
|
|
- <span v-if="index > 0">,</span>
|
|
|
- <a
|
|
|
- :key="item.fileName + index"
|
|
|
- type="primary"
|
|
|
- href="#"
|
|
|
- @click="previewFile(item.fileName, item.url)"
|
|
|
- >{{ item.fileName }}</a
|
|
|
- >
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- v-if="Number(dataForm.state) === 3"
|
|
|
- prop="operationRecords"
|
|
|
- header-align="center"
|
|
|
- align="center"
|
|
|
- min-width="160"
|
|
|
+ width="160"
|
|
|
:show-tooltip-when-overflow="true"
|
|
|
- label="完成记录说明"
|
|
|
+ label="操作人"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -447,6 +441,7 @@
|
|
|
</el-dialog>
|
|
|
<!-- 文件预览 -->
|
|
|
<preview-component v-if="previewVisible" ref="preview" />
|
|
|
+ <attach-detail-dialog ref="attachDetail"/>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -464,8 +459,10 @@ import { workTypeMasterList } from '@/api/worktype'
|
|
|
import templateList from '../warehouse/template-list'
|
|
|
import PreviewComponent from '../common/preview-component'
|
|
|
import UserComponent from '@/views/modules/common/user-component'
|
|
|
+import { taskTypeOption, rankTypeOption } from '@/utils/enums'
|
|
|
+import AttachDetailDialog from '../common/attach-detail-dialog'
|
|
|
export default {
|
|
|
- components: { UserComponent, PreviewComponent, templateList },
|
|
|
+ components: { UserComponent, PreviewComponent, templateList, AttachDetailDialog },
|
|
|
name: 'work',
|
|
|
computed: {
|
|
|
userId: {
|
|
@@ -499,20 +496,20 @@ export default {
|
|
|
totalPage: 0,
|
|
|
dataListLoading: false,
|
|
|
dataListSelections: [],
|
|
|
- optionsState: [
|
|
|
- {
|
|
|
- code: '1',
|
|
|
- value: '未开始'
|
|
|
- },
|
|
|
- {
|
|
|
- code: '2',
|
|
|
- value: '待操作'
|
|
|
- },
|
|
|
- {
|
|
|
- code: '3',
|
|
|
- value: '已完成'
|
|
|
- }
|
|
|
- ],
|
|
|
+ // optionsState: [
|
|
|
+ // {
|
|
|
+ // code: '1',
|
|
|
+ // value: '未开始'
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // code: '2',
|
|
|
+ // value: '待操作'
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // code: '3',
|
|
|
+ // value: '已完成'
|
|
|
+ // }
|
|
|
+ // ],
|
|
|
transferDialogFormVisible: false,
|
|
|
transferDialogForm: {},
|
|
|
finishDialogFormVisible: false,
|
|
@@ -575,7 +572,9 @@ export default {
|
|
|
15: '敲击',
|
|
|
16: '测厚仪',
|
|
|
17: '其他'
|
|
|
- }
|
|
|
+ },
|
|
|
+ taskTypeOption: taskTypeOption,
|
|
|
+ rankTypeOption: rankTypeOption
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
@@ -821,9 +820,18 @@ export default {
|
|
|
userChanged (val) {
|
|
|
this.dataForm.userId = val
|
|
|
this.getDataList()
|
|
|
+ },
|
|
|
+ changeDetails (attachList) {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.attachDetail.init(attachList)
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style scoped></style>
|
|
|
+<style lang="scss" scoped>
|
|
|
+/deep/ .el-tabs .el-tabs__header {
|
|
|
+ margin: 0;
|
|
|
+}
|
|
|
+</style>
|