| | |
| | | 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-scope="{row}" slot="confirmFlag"> |
| | | <el-tag size="small" :type="showConfirmFlag(row.confirmFlag).type">{{ showConfirmFlag(row.confirmFlag).text |
| | | }}</el-tag> |
| | | </template> --> |
| | | |
| | | <!-- <template slot="menuLeft"> |
| | | <el-button size="small" icon="el-icon-delete" plain v-if="permission.place_delete" @click="handleDelete">删 除 |
| | | <template slot-scope="scope" slot="menu"> |
| | | <el-button type="text" size="small" icon="el-icon-view" plain @click="lookDetail(scope.row,0)">查 看 |
| | | </el-button> |
| | | </template> --> |
| | | |
| | | <!-- <template slot-scope="scope" slot="menu"> |
| | | <el-button type="text" :disabled="scope.row.confirmFlag == 2" icon="el-icon-s-check" size="small" |
| | | v-if="permission.place_audit_cur && scope.row.confirmFlag != 4" @click="auditCur(scope.row)">审核 |
| | | <el-button type="text" size="small" icon="el-icon-s-check" v-if="scope.row.status == 1" plain |
| | | @click="lookDetail(scope.row,1)">审 核 |
| | | </el-button> |
| | | |
| | | <el-button type="text" icon="el-icon-edit" size="small" v-if="permission.place_manage_tenants" |
| | | @click="ManageTenants(scope.row)">场所维护 |
| | | <el-button type="text" size="small" icon="el-icon-delete" plain @click="rowDel(scope.row)">删 除 |
| | | </el-button> |
| | | </template> --> |
| | | </template> |
| | | |
| | | </avue-crud> |
| | | |
| | | <el-dialog class="place-info-box" title="场所维护" append-to-body :visible.sync="roleBox" center @close="roleBoxClose"> |
| | | <!-- <baseAllInfo></baseAllInfo> --> |
| | | </el-dialog> |
| | | |
| | | <el-dialog class="place-info-box audit-info-box" title="审核" append-to-body :visible.sync="auditBasePopup" |
| | | width="30%"> |
| | | <!-- <auditBase></auditBase> --> |
| | | <el-dialog class="place-info-box audit-info-box" title="" append-to-body :visible.sync="auditBasePopup" width="60%"> |
| | | <bailReportingDetail @colseDetail="colseDetail" ref="bailReportingDetail"></bailReportingDetail> |
| | | </el-dialog> |
| | | </basic-container> |
| | | </template> |
| | |
| | | <script> |
| | | import { |
| | | getList, |
| | | remove, |
| | | removeTask, |
| | | update, |
| | | add, |
| | | } from "@/api/task/task" |
| | | |
| | | import { |
| | | update as bailReportingUpdate, |
| | | } from "@/api/task/bailReporting" |
| | | |
| | | import { |
| | | mapGetters |
| | |
| | | |
| | | import website from '@/config/website' |
| | | |
| | | // import auditBase from './components/auditBase' |
| | | import bailReportingDetail from './components/bailReportingDetail' |
| | | // import baseAllInfo from './components/baseAllInfo' |
| | | |
| | | export default { |
| | |
| | | searchMenuSpan: 3, |
| | | menuWidth: 280, |
| | | border: true, |
| | | menu: false, |
| | | // menu: false, |
| | | //stripe:true, |
| | | index: true, |
| | | viewBtn: true, |
| | | // viewBtn: true, |
| | | delBtn: false, |
| | | editBtn: false, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | |
| | | prop: "name", |
| | | searchSpan: 4, |
| | | search: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入场所名称", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, { |
| | | span: 12, |
| | | label: "地址", |
| | | prop: "addressName", |
| | | searchSpan: 4, |
| | | // search: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入场所名称", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | label: "创建时间", |
| | |
| | | } |
| | | }, |
| | | |
| | | // components: { |
| | | // auditBase, |
| | | // baseAllInfo |
| | | // }, |
| | | components: { |
| | | bailReportingDetail, |
| | | }, |
| | | |
| | | watch: {}, |
| | | |
| | |
| | | }) |
| | | return ids.join(",") |
| | | }, |
| | | |
| | | showConfirmFlag() { |
| | | return (data) => { |
| | | let tags = { |
| | | text: '', |
| | | type: '' |
| | | } |
| | | if (data == 1) { |
| | | tags = { |
| | | text: '待审核', |
| | | type: 'warning' |
| | | } |
| | | } else if (data == 2) { |
| | | tags = { |
| | | text: '已审核', |
| | | type: 'success' |
| | | } |
| | | } else if (data == 3) { |
| | | tags = { |
| | | text: '未通过', |
| | | type: 'danger' |
| | | } |
| | | } else if (data == 4) { |
| | | tags = { |
| | | text: '待完善', |
| | | type: 'info' |
| | | } |
| | | } |
| | | |
| | | return tags |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | colseDetail() { |
| | | this.auditBasePopup = false |
| | | this.onLoad(this.page) |
| | | }, |
| | | lookDetail(row, applyType) { |
| | | this.auditBasePopup = true |
| | | var that = this |
| | | this.$nextTick(() => { |
| | | that.$refs.bailReportingDetail.init(row, applyType) |
| | | }) |
| | | }, |
| | | auditCur(row) { |
| | | this.curAuditRow = row |
| | | this.auditBasePopup = true |
| | |
| | | }, |
| | | |
| | | rowUpdate(row, index, done, loading) { |
| | | if (row.imageUrls.length > 0) { |
| | | var urls = [] |
| | | var split = row.imageUrls.split(",").filter(item => item != '') |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.imageUrls = urls.join(",") |
| | | } |
| | | |
| | | let label = row.label |
| | | |
| | | if (row.smallLabel != '') { |
| | | label = label + ',' + row.smallLabel |
| | | } |
| | | |
| | | delete row.smallLabel |
| | | |
| | | update({ |
| | | ...row, |
| | | label |
| | | bailReportingUpdate({ |
| | | ...row |
| | | }).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id) |
| | | row.isDeleted = 1 |
| | | return removeTask(row) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids) |
| | | // return remove(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | |
| | | }, |
| | | |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getPlace(this.form.id).then((res) => { |
| | | this.form = res.data.data |
| | | |
| | | if (this.form.imageUrls.length) { |
| | | this.form.imageUrls = this.form.imageUrls.split(",").filter(item => item != '').map(item => website |
| | | .minioUrl + item).join(',') |
| | | } |
| | | |
| | | if (this.form.placePoiLabelVOList.length) { |
| | | let lebelTwo = this.form.placePoiLabelVOList.find(item => { |
| | | return item.type == 2 |
| | | }) |
| | | |
| | | if (lebelTwo) this.form.label = String(lebelTwo.poiCode) |
| | | |
| | | let lebelThree = this.form.placePoiLabelVOList.find(item => { |
| | | return item.type == 3 |
| | | }) |
| | | |
| | | if (lebelThree) this.form.smallLabel = String(lebelThree.poiCode) |
| | | } |
| | | |
| | | done() |
| | | |
| | | }) |
| | | } else { |
| | | if (["edit", "view"].includes(type)) {} else { |
| | | done() |
| | | } |
| | | }, |
| | |
| | | let values = { |
| | | ...params, |
| | | } |
| | | // if (dateTime) { |
| | | // values = { |
| | | // ...params, |
| | | // startTime: dateTime[0], |
| | | // endTime: dateTime[1], |
| | | // ...this.query, |
| | | // } |
| | | // values.dateTime = null |
| | | // } |
| | | values.reportType = 1 |
| | | this.loading = true |
| | | getList(page.currentPage, page.pageSize, values).then((res) => { |