taskListDetail.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <template>
  2. <div>
  3. <el-button size="mini" type="text" @click="detailBtn">详 情</el-button>
  4. <el-drawer append-to-body :show-close="false" :visible.sync="dialogFormVisible" size="40%">
  5. <div slot="title" style="font-size: 15px">
  6. 工序节点详情
  7. </div>
  8. <div class="drawer__panel">
  9. <el-descriptions v-if="detailData" :column="1">
  10. <el-descriptions-item label="工序内容"><span>{{ detailData.workpresetjson.workname }}</span></el-descriptions-item>
  11. <el-descriptions-item label="操作说明">{{ detailData.remarks }}</el-descriptions-item>
  12. <el-descriptions-item label="操作人员">{{ detailData.changeby }}</el-descriptions-item>
  13. <el-descriptions-item label="状态">
  14. <el-tag size="mini" v-if="detailData.status == 0">待开始</el-tag>
  15. <el-tag size="mini" type="danger" v-else-if="detailData.status == 1">已完成</el-tag>
  16. <el-tag size="mini" type="warning" v-else>进行中</el-tag>
  17. </el-descriptions-item>
  18. <el-descriptions-item label="是否完成">{{detailData.confirm_value}}</el-descriptions-item>
  19. <el-descriptions-item label="备注">{{ detailData.remarks }}</el-descriptions-item>
  20. <el-descriptions-item label="文本信息">{{ detailData.textcontent }}</el-descriptions-item>
  21. <el-descriptions-item label="附件"></el-descriptions-item>
  22. </el-descriptions>
  23. <file-item
  24. :isDownLoad="true"
  25. :fileData="detailData.attinfos">
  26. </file-item>
  27. <contentTable v-if="detailData">
  28. <tableLayout slot="培训人员" :layout="peopleTable" :data="detailData.trainers" :opwidth="200" :custom="true" :width="false">
  29. <template v-slot:customcol="scope">
  30. <p>{{scope.column.data[scope.column.columnname]}}</p>
  31. </template>
  32. </tableLayout>
  33. <tableLayout slot="培训商品" :layout="productTable" :data="detailData.titems" :opwidth="200" :custom="true" :width="false">
  34. <template v-slot:customcol="scope">
  35. <p>{{scope.column.data[scope.column.columnname]}}</p>
  36. </template>
  37. </tableLayout>
  38. </contentTable>
  39. </div>
  40. <div class="fixed__btn__panel">
  41. <el-button size="small" @click="dialogFormVisible = false" class="normal-btn-width">取 消</el-button>
  42. <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width">确 定</el-button>
  43. </div>
  44. </el-drawer>
  45. </div>
  46. </template>
  47. <script>
  48. import contentTable from './contentTable'
  49. import fileItem from '@/SManagement/orderclue/components/file/index2'
  50. export default {
  51. name: "",
  52. props:['data'],
  53. components:{contentTable,fileItem},
  54. data(){
  55. return {
  56. dialogFormVisible:false,
  57. detailData:'',
  58. peopleTable:[],
  59. productTable:[]
  60. }
  61. },
  62. methods:{
  63. async detailBtn () {
  64. let res = await this.$api.requested({
  65. "id": "20230209091103",
  66. "version":1,
  67. "content": {
  68. "sa_workorderid":this.data.sa_workorderid,
  69. "sa_workorder_nodeid":this.data.sa_workorder_nodeid
  70. }
  71. })
  72. res.data[0].attinfos = this.fileType.fileList(this.data.attinfos)
  73. this.detailData = res.data[0]
  74. console.log(this.detailData);
  75. this.dialogFormVisible = true
  76. },
  77. onSubmit(){
  78. console.log(this.form)
  79. this.$refs['form'].validate(async (valid) => {
  80. if (!valid) return false
  81. const res = await this.$api.requested({
  82. "id": "20230208140003",
  83. "version":1,
  84. "content": this.form
  85. })
  86. this.tool.showMessage(res,()=>{
  87. this.$emit('onSuccess')
  88. this.$refs['form'].resetFields();
  89. this.dialogFormVisible = false
  90. })
  91. })
  92. },
  93. },
  94. created () {
  95. this.peopleTable = this.tool.tabelCol(this.$route.name).peopleTable.tablecols
  96. this.productTable = this.tool.tabelCol(this.$route.name).productTable.tablecols
  97. }
  98. }
  99. </script>
  100. <style scoped>
  101. .dialog-footer {
  102. margin-top: 0;
  103. }
  104. .el-select,.el-input,.el-cascader {
  105. width: 100% !important;
  106. }
  107. </style>