| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel" |
| | | 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"> |
| | | <basic-container> |
| | | <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel" |
| | | 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="scope" slot="menu"> |
| | | <el-button type="text" size="small" icon="el-icon-view" plain @click="lookDetail(scope.row)">查 看 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="scope" slot="menu"> |
| | | <el-button type="text" size="small" icon="el-icon-view" plain @click="lookDetail(scope.row)">查 看 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{row, size}" slot="regionName"> |
| | | <el-button :size="size" type="text" @click="lookDetail(row)"> |
| | | {{ row.regionName }} |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{row, size}" slot="regionName"> |
| | | <el-button :size="size" type="text" @click="lookDetail(row)"> |
| | | {{ row.regionName }} |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{row, size}" slot="number1"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, '19')"> |
| | | {{ row.number1 }} |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{row, size}" slot="number1"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, '1025')"> |
| | | {{ row.number1 }} |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{row, size}" slot="number2"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, '20')"> |
| | | {{ row.number2 }} |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{row, size}" slot="number2"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, '1034')"> |
| | | {{ row.number2 }} |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{row, size}" slot="number3"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, '22')"> |
| | | {{ row.number3 }} |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{row, size}" slot="number4"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, '23')"> |
| | | {{ row.number4 }} |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{row, size}" slot="number5"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, '1025')"> |
| | | {{ row.number5 }} |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | <template slot-scope="{row, size}" slot="number3"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, '1035')"> |
| | | {{ row.number3 }} |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{row, size}" slot="number4"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, '1036')"> |
| | | {{ row.number4 }} |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{row, size}" slot="number5"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, '19')"> |
| | | {{ row.number5 }} |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{row, size}" slot="number6"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, '20')"> |
| | | {{ row.number6 }} |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{row, size}" slot="number7"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, '22')"> |
| | | {{ row.number7 }} |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{row, size}" slot="number8"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, '23')"> |
| | | {{ row.number8 }} |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | |
| | | <el-dialog title="" append-to-body :visible.sync="auditBasePopup" width="80%"> |
| | | <communityKeyNotePersonnel ref="communityKeyNotePersonnel"></communityKeyNotePersonnel> |
| | | </el-dialog> |
| | | <el-dialog title="" append-to-body :visible.sync="auditBasePopup" width="80%"> |
| | | <communityKeyNotePersonnel ref="communityKeyNotePersonnel"></communityKeyNotePersonnel> |
| | | </el-dialog> |
| | | |
| | | <el-dialog title="" append-to-body :visible.sync="userPopup" width="80%"> |
| | | <userHouseList ref="userHouseList"></userHouseList> |
| | | </el-dialog> |
| | | <el-dialog title="" append-to-body :visible.sync="userPopup" width="80%"> |
| | | <userHouseList ref="userHouseList"></userHouseList> |
| | | </el-dialog> |
| | | |
| | | </basic-container> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | import { |
| | | statisticalLabels |
| | | } from "@/api/userHouse/list/userHouseList" |
| | | } from "@/api/userHouse/list/userHouseList" |
| | | |
| | | |
| | | import { |
| | | import { |
| | | mapGetters |
| | | } from "vuex" |
| | | } from "vuex" |
| | | |
| | | import userHouseList from './components/userHouseList.vue' |
| | | import userHouseList from './components/userHouseList.vue' |
| | | |
| | | import communityKeyNotePersonnel from './components/communityKeyNotePersonnel.vue' |
| | | import communityKeyNotePersonnel from './components/communityKeyNotePersonnel.vue' |
| | | |
| | | import website from '@/config/website' |
| | | import website from '@/config/website' |
| | | |
| | | export default { |
| | | data () { |
| | | return { |
| | | taskType: 0, |
| | | curRow: {}, |
| | | roleBox: false, |
| | | export default { |
| | | data() { |
| | | return { |
| | | taskType: 0, |
| | | curRow: {}, |
| | | roleBox: false, |
| | | |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | | |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | }, |
| | | datetime: "", |
| | | selectionList: [], |
| | | option: { |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | // menuWidth: 280, |
| | | menu: false, |
| | | border: true, |
| | | //stripe:true, |
| | | index: true, |
| | | // viewBtn: true, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | addBtn: false, |
| | | // selection: true, |
| | | header: false, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | span: 12, |
| | | label: "行政区域", |
| | | prop: "regionName", |
| | | searchSpan: 4, |
| | | align: 'center', |
| | | // search: true, |
| | | // hide: true, |
| | | }, |
| | | datetime: "", |
| | | selectionList: [], |
| | | option: { |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | // menuWidth: 280, |
| | | menu: false, |
| | | border: true, |
| | | //stripe:true, |
| | | index: true, |
| | | // viewBtn: true, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | addBtn: false, |
| | | // selection: true, |
| | | header: false, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | span: 12, |
| | | label: "行政区域", |
| | | prop: "regionName", |
| | | searchSpan: 4, |
| | | align: 'center', |
| | | // search: true, |
| | | // hide: true, |
| | | }, |
| | | // { |
| | | // span: 12, |
| | | // label: "所属社区", |
| | | // prop: "communityName", |
| | | // align: 'center', |
| | | // searchSpan: 4, |
| | | // search: true, |
| | | // // hide: true, |
| | | // }, |
| | | { |
| | | span: 12, |
| | | label: "刑释解教人员", |
| | | prop: "number1", |
| | | align: 'center', |
| | | searchSpan: 4, |
| | | }, |
| | | { |
| | | span: 12, |
| | | label: "肇事肇祸精神障碍患者", |
| | | prop: "number2", |
| | | align: 'center', |
| | | searchSpan: 4, |
| | | }, |
| | | { |
| | | span: 12, |
| | | label: "一般精神障碍患者", |
| | | prop: "number3", |
| | | align: 'center', |
| | | searchSpan: 4, |
| | | }, |
| | | { |
| | | span: 12, |
| | | label: "重点对象", |
| | | prop: "number4", |
| | | align: 'center', |
| | | searchSpan: 4, |
| | | }, |
| | | { |
| | | span: 12, |
| | | label: "取保候审", |
| | | prop: "number5", |
| | | align: 'center', |
| | | searchSpan: 4, |
| | | }, |
| | | ], |
| | | { |
| | | span: 12, |
| | | label: "取保监居", |
| | | prop: "number1", |
| | | align: 'center', |
| | | searchSpan: 4, |
| | | }, |
| | | data: [], |
| | | { |
| | | span: 12, |
| | | label: "剥权人员", |
| | | prop: "number2", |
| | | align: 'center', |
| | | searchSpan: 4, |
| | | }, |
| | | { |
| | | span: 12, |
| | | label: "涉毒人员", |
| | | prop: "number3", |
| | | align: 'center', |
| | | searchSpan: 4, |
| | | }, |
| | | { |
| | | span: 12, |
| | | label: "涉访人员", |
| | | prop: "number4", |
| | | align: 'center', |
| | | searchSpan: 4, |
| | | }, |
| | | { |
| | | span: 12, |
| | | label: "刑释解教人员", |
| | | prop: "number5", |
| | | align: 'center', |
| | | searchSpan: 4, |
| | | }, { |
| | | span: 12, |
| | | label: "肇事肇祸精神障碍患者", |
| | | prop: "number6", |
| | | align: 'center', |
| | | searchSpan: 4, |
| | | }, { |
| | | span: 12, |
| | | label: "一般精神障碍患者", |
| | | prop: "number7", |
| | | align: 'center', |
| | | searchSpan: 4, |
| | | }, { |
| | | span: 12, |
| | | label: "重点对象", |
| | | prop: "number8", |
| | | align: 'center', |
| | | searchSpan: 4, |
| | | }, |
| | | ], |
| | | }, |
| | | data: [], |
| | | |
| | | auditBasePopup: false, |
| | | userPopup: false, |
| | | } |
| | | auditBasePopup: false, |
| | | userPopup: false, |
| | | } |
| | | }, |
| | | |
| | | provide () { |
| | | return { |
| | | placeElement: this, |
| | | } |
| | | provide() { |
| | | return { |
| | | placeElement: this, |
| | | } |
| | | }, |
| | | |
| | | components: { |
| | | communityKeyNotePersonnel, |
| | | userHouseList, |
| | | // labelReporting, |
| | | communityKeyNotePersonnel, |
| | | userHouseList, |
| | | // labelReporting, |
| | | }, |
| | | |
| | | watch: {}, |
| | | |
| | | computed: { |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | permissionList () { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.place_add, true), |
| | | viewBtn: this.vaildData(this.permission.place_view, true), |
| | | delBtn: this.vaildData(this.permission.place_delete, true), |
| | | editBtn: this.vaildData(this.permission.place_edit, true), |
| | | } |
| | | }, |
| | | ids () { |
| | | let ids = [] |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.id) |
| | | }) |
| | | return ids.join(",") |
| | | }, |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.place_add, true), |
| | | viewBtn: this.vaildData(this.permission.place_view, true), |
| | | delBtn: this.vaildData(this.permission.place_delete, true), |
| | | editBtn: this.vaildData(this.permission.place_edit, true), |
| | | } |
| | | }, |
| | | ids() { |
| | | let ids = [] |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.id) |
| | | }) |
| | | return ids.join(",") |
| | | }, |
| | | |
| | | }, |
| | | methods: { |
| | | |
| | | colseDetail () { |
| | | this.auditBasePopup = false |
| | | this.onLoad(this.page) |
| | | }, |
| | | colseDetail() { |
| | | this.auditBasePopup = false |
| | | this.onLoad(this.page) |
| | | }, |
| | | |
| | | showStringDispose (row, type) { |
| | | row.labelId = type |
| | | this.userPopup = true |
| | | var that = this |
| | | this.$nextTick(() => { |
| | | that.$refs.userHouseList.init(row) |
| | | }) |
| | | }, |
| | | showStringDispose(row, type) { |
| | | row.labelId = type |
| | | this.userPopup = true |
| | | var that = this |
| | | this.$nextTick(() => { |
| | | that.$refs.userHouseList.init(row) |
| | | }) |
| | | }, |
| | | |
| | | lookDetail (row) { |
| | | this.auditBasePopup = true |
| | | var that = this |
| | | this.$nextTick(() => { |
| | | that.$refs.communityKeyNotePersonnel.init(row) |
| | | }) |
| | | }, |
| | | lookDetail(row) { |
| | | this.auditBasePopup = true |
| | | var that = this |
| | | this.$nextTick(() => { |
| | | that.$refs.communityKeyNotePersonnel.init(row) |
| | | }) |
| | | }, |
| | | |
| | | |
| | | auditCur (row) { |
| | | this.curAuditRow = row |
| | | this.auditBasePopup = true |
| | | }, |
| | | auditCur(row) { |
| | | this.curAuditRow = row |
| | | this.auditBasePopup = true |
| | | }, |
| | | |
| | | roleBoxClose () { |
| | | this.curRow = {} |
| | | }, |
| | | roleBoxClose() { |
| | | this.curRow = {} |
| | | }, |
| | | |
| | | ManageTenants (item) { |
| | | this.curRow = item |
| | | this.roleBox = true |
| | | }, |
| | | ManageTenants(item) { |
| | | this.curRow = item |
| | | this.roleBox = true |
| | | }, |
| | | |
| | | rowSave (row, 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 |
| | | |
| | | add({ |
| | | ...row, |
| | | label |
| | | }).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | |
| | | 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 |
| | | }).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | |
| | | rowDel (row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | row.isDeleted = 1 |
| | | return removeTask(row) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | }) |
| | | }, |
| | | searchReset () { |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange (params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange (list) { |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear () { |
| | | this.selectionList = [] |
| | | this.$nextTick(() => { |
| | | this.$refs.crud && this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | handleDelete () { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | |
| | | 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 { |
| | | done() |
| | | } |
| | | }, |
| | | |
| | | currentChange (currentPage) { |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange (pageSize) { |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange () { |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad (page, params = {}) { |
| | | const { |
| | | dateTime |
| | | } = this.query |
| | | let values = { |
| | | ...params, |
| | | } |
| | | this.loading = true |
| | | statisticalLabels(page.currentPage, page.pageSize, values).then((res) => { |
| | | const data = res.data.data |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.data.forEach(item => { |
| | | if (item.imageUrls && item.imageUrls != '' && item.imageUrls != null && item.imageUrls.length) { |
| | | var urls = [] |
| | | var names = item.imageUrls.split(",").filter(item => item != '') |
| | | names.forEach(name => { |
| | | urls.push(website.minioUrl + name) |
| | | }) |
| | | item.imageUrls = urls.join(",") |
| | | } |
| | | }) |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | rowSave(row, 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 |
| | | |
| | | add({ |
| | | ...row, |
| | | label |
| | | }).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | |
| | | 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 |
| | | }).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | row.isDeleted = 1 |
| | | return removeTask(row) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | }) |
| | | }, |
| | | searchReset() { |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = [] |
| | | this.$nextTick(() => { |
| | | this.$refs.crud && this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | |
| | | 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 { |
| | | done() |
| | | } |
| | | }, |
| | | |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | const { |
| | | dateTime |
| | | } = this.query |
| | | let values = { |
| | | ...params, |
| | | } |
| | | this.loading = true |
| | | statisticalLabels(page.currentPage, page.pageSize, values).then((res) => { |
| | | const data = res.data.data |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.data.forEach(item => { |
| | | if (item.imageUrls && item.imageUrls != '' && item.imageUrls != null && item.imageUrls.length) { |
| | | var urls = [] |
| | | var names = item.imageUrls.split(",").filter(item => item != '') |
| | | names.forEach(name => { |
| | | urls.push(website.minioUrl + name) |
| | | }) |
| | | item.imageUrls = urls.join(",") |
| | | } |
| | | }) |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .avue-upload__icon { |
| | | .avue-upload__icon { |
| | | line-height: 6; |
| | | } |
| | | } |
| | | |
| | | .cur-container-box { |
| | | .cur-container-box { |
| | | display: flex; |
| | | flex-direction: column; |
| | | width: 100%; |
| | |
| | | overflow: hidden; |
| | | |
| | | .content-box { |
| | | margin: 0 4px; |
| | | padding: 0 16px; |
| | | height: 0; |
| | | flex: 1; |
| | | overflow: hidden; |
| | | overflow-y: auto; |
| | | margin: 0 4px; |
| | | padding: 0 16px; |
| | | height: 0; |
| | | flex: 1; |
| | | overflow: hidden; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .footer-btn-box { |
| | | margin-top: 10px; |
| | | display: flex; |
| | | justify-content: center; |
| | | margin-top: 10px; |
| | | display: flex; |
| | | justify-content: center; |
| | | } |
| | | } |
| | | </style> |
| | | } |
| | | </style> |