| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2023-12-14 17:10:00 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2024-01-06 15:01:25 |
| | | * @LastEditTime: 2024-01-29 14:02:52 |
| | | * @FilePath: \jczz_web\src\views\task\reportForRepairs.vue |
| | | * @Description: |
| | | * |
| | |
| | | v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :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> |
| | | </template> |
| | | |
| | | <template slot-scope="{row, size}" slot="phone"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, 'phoneflag')" |
| | | v-text="textDispose(row, 'phoneflag', 'phone')"> |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | |
| | | 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, |
| | |
| | | span: 24, |
| | | }, |
| | | { |
| | | overHidden: true, |
| | | label: "地点", |
| | | prop: "addressName", |
| | | overHidden: true |
| | | }, |
| | | { |
| | | width: 110, |
| | | label: "所属街道", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | prop: "streetName", |
| | | search: true, |
| | | searchSpan: 4 |
| | | }, |
| | | |
| | | { |
| | | width: 156, |
| | | overHidden: true, |
| | | label: "所属社区", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | prop: "communityName", |
| | | search: true, |
| | | searchSpan: 4 |
| | | }, |
| | | { |
| | | 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", |
| | |
| | | |
| | | return tags |
| | | } |
| | | }, |
| | | |
| | | textDispose() { |
| | | return (row, flag, type) => { |
| | | if (row[flag] || row[type] == null) { |
| | | return row[type] |
| | | } else { |
| | | if (type == 'principalIdCard') { |
| | | return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2") |
| | | } else { |
| | | return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2") |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | showStringDispose(row, type) { |
| | | row[type] = !row[type] |
| | | }, |
| | | |
| | | rowExpansion(row) { |
| | | this.$refs.crud.toggleRowExpansion(row) |
| | | }, |
| | |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.data.forEach(item => { |
| | | this.$set(item, 'phoneflag', false) |
| | | if (item.imageUrls) { |
| | | if (item.imageUrls.length > 0) { |
| | | var urls = [] |