| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2023-12-14 17:10:00 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2024-01-05 18:00:15 |
| | | * @LastEditTime: 2024-01-24 21:24:39 |
| | | * @FilePath: \jczz_web\src\views\task\reportForRepairs.vue |
| | | * @Description: |
| | | * |
| | |
| | | :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset" |
| | | @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange" |
| | | @refresh-change="refreshChange" @on-load="onLoad"> |
| | | <template slot="confirmFlag" slot-scope="{row}"> |
| | | <el-tag size="small" :type="showConfirmFlag(row.confirmFlag).type"> |
| | | <template slot="confirmFlag" slot-scope="{row, size}"> |
| | | <el-tag :size="size" :type="showConfirmFlag(row.confirmFlag).type"> |
| | | {{ showConfirmFlag(row.confirmFlag).text }} |
| | | </el-tag> |
| | | </template> |
| | | |
| | | <template slot="expand" slot-scope="{row}"> |
| | | <template slot="expand" slot-scope="{row, size}"> |
| | | <el-timeline> |
| | | <el-timeline-item v-for="(item, index) in timeLineData(row)" :key="index" :timestamp="item.createTime" |
| | | :icon="item.icon" :color="item.color" :hide-timestamp="item.contentType == 3" placement="top"> |
| | |
| | | </el-timeline> |
| | | </template> |
| | | |
| | | <template slot-scope="scope" slot="menu"> |
| | | <el-button v-if="permission.report_for_repairs_details" size="small" type="text" |
| | | icon="el-icon-document-remove" @click="rowExpansion(scope.row)"> |
| | | <template slot-scope="{row, size, index}" slot="menu"> |
| | | <el-button :size="size" v-if="permission.report_for_repairs_details" type="text" |
| | | icon="el-icon-document-remove" @click="rowExpansion(row)"> |
| | | 详情 |
| | | </el-button> |
| | | |
| | | <el-button v-if="permission.report_for_repairs_reply" size="small" type="text" |
| | | icon="el-icon-chat-dot-square" :disabled="scope.row.confirmFlag === 3" |
| | | @click="replyBtnClick(scope.row)"> |
| | | <el-button :size="size" v-if="permission.report_for_repairs_reply" type="text" |
| | | icon="el-icon-chat-dot-square" :disabled="row.confirmFlag === 3" @click="replyBtnClick(row)"> |
| | | 回复 |
| | | </el-button> |
| | | |
| | | <el-button v-if="permission.report_for_repairs_turn_over" size="small" type="text" |
| | | icon="el-icon-document-copy" :disabled="scope.row.confirmFlag === 3" |
| | | @click="turnOverBtnClick(scope.row)"> |
| | | <el-button :size="size" v-if="permission.report_for_repairs_turn_over" type="text" |
| | | icon="el-icon-document-copy" :disabled="row.confirmFlag === 3" @click="turnOverBtnClick(row)"> |
| | | 移交 |
| | | </el-button> |
| | | |
| | | <el-button v-if="permission.report_for_repairs_del" size="small" type="text" icon="el-icon-delete" |
| | | @click="rowDel(scope.row)"> |
| | | <el-button :size="size" v-if="permission.report_for_repairs_del" type="text" icon="el-icon-delete" |
| | | @click="rowDel(row)"> |
| | | 删除 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot="menuLeft"> |
| | | <template slot-scope="{row, size, index}" slot="menuLeft"> |
| | | <el-button :size="size" type="primary" v-if="permission.task_reportForRepairs_add" icon="el-icon-plus" |
| | | @click="$refs.crud.rowAdd()">新增</el-button> |
| | | |
| | | <el-button size="small" icon="el-icon-delete" plain v-if="permission.article_delete" @click="handleDelete">删 |
| | | 除 |
| | | </el-button> |
| | |
| | | datetime: "", |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 96, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 280, |
| | | |
| | | addBtn: false, |
| | | viewBtn: false, |
| | | editBtn: false, |
| | | delBtn: false, |
| | |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 272, |
| | | border: true, |
| | | //stripe:true, |
| | | // excelBtn: true, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | width: 96, |
| | | width: 100, |
| | | label: "类型", |
| | | prop: "type", |
| | | span: 12, |
| | | searchLabelWidth: 46, |
| | | searchSpan: 4, |
| | | search: true, |
| | | dataType: "number", |
| | | type: "select", |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=reportForRepairsType", |
| | |
| | | label: "dictValue", |
| | | value: "dictKey", |
| | | }, |
| | | search: true, |
| | | }, |
| | | { |
| | | width: 96, |
| | | width: 110, |
| | | label: "姓名", |
| | | prop: "realName", |
| | | span: 12, |
| | | searchSpan: 4, |
| | | searchLabelWidth: 66, |
| | | search: true, |
| | | }, |
| | | |
| | | { |
| | | width: 96, |
| | | width: 120, |
| | | label: "手机号码", |
| | | prop: "phone", |
| | | search: true, |
| | | searchSpan: 3, |
| | | searchSpan: 4, |
| | | slot: true, |
| | | rules: [ |
| | | { |
| | | validator: validatorPhone, |
| | | trigger: 'blur' |
| | | } |
| | | ], |
| | | rules: [{ |
| | | validator: validatorPhone, |
| | | trigger: 'blur' |
| | | }], |
| | | }, |
| | | |
| | | { |
| | |
| | | span: 24, |
| | | }, |
| | | { |
| | | overHidden: true, |
| | | label: "地点", |
| | | prop: "addressName", |
| | | overHidden: true |
| | | }, |
| | | { |
| | | width: 120, |
| | | width: 100, |
| | | label: "状态", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | slot: true, |
| | | label: "状态", |
| | | prop: "confirmFlag", |
| | | overHidden: true |
| | | }, |
| | | { |
| | | width: 144, |
| | | label: "上报时间", |
| | | prop: "createTime", |
| | | width: 160, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | type: "date", |
| | |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss", |
| | | }, |
| | | { |
| | | width: 144, |
| | | label: "处理时间", |
| | | prop: "confirmTime", |
| | | width: 160, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | type: "date", |
| | |
| | | }, |
| | | |
| | | handleSubmit (form, done) { |
| | | |
| | | if (form.imageList.length > 0) { |
| | | var urls = [] |
| | | var split = form.imageList.split(",").filter(item => item != '') |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | form.imageList = urls.join(",") |
| | | } |
| | | // if (form.imageList.length > 0) { |
| | | // var urls = [] |
| | | // var split = form.imageList.split(",").filter(item => item != '') |
| | | // split.forEach(url => { |
| | | // var names = url.split("jczz/") |
| | | // urls.push(names[1]) |
| | | // }) |
| | | // form.imageList = urls.join(",") |
| | | // } |
| | | |
| | | this.saveReply({ |
| | | ...form, |
| | | videoList: this.fileList.map(item => item.response.data.link).join(','), |
| | |
| | | item.imageUrls = urls.join(",") |
| | | } |
| | | } |
| | | if (item.taskRepairStepList.length > 0) { |
| | | item.taskRepairStepList.forEach(ee => { |
| | | if (ee.imageList) { |
| | | if (ee.imageList.length > 0) { |
| | | var urls = [] |
| | | var names = ee.imageList.split(",") |
| | | names.forEach(name => { |
| | | urls.push(website.minioUrl + name) |
| | | }) |
| | | ee.imageList = urls.join(",") |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | this.loading = false |
| | | this.selectionClear() |