From 678e7401d773762bc5e76e831fba48e8c20937bd Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Tue, 19 Jul 2022 09:57:36 +0800 Subject: [PATCH] menumenu --- src/views/dashboard/index.vue | 6 +- src/views/rain/basic.vue | 9 + src/views/{ => rain}/basic/account.vue | 8 +- src/views/{ => rain}/basic/area.vue | 2 +- src/views/{ => rain}/basic/group.vue | 2 +- src/views/{ => rain}/basic/road.vue | 2 +- src/views/{ => rain}/basic/site.vue | 4 +- src/views/{ => rain}/basic/unit.vue | 2 +- src/views/rain/inspection.vue | 1203 +-------------- src/views/rain/inspection/inspection.vue | 1200 +++++++++++++++ .../{management => rain/inspection}/plan.vue | 8 +- src/views/rain/maintain.vue | 1295 +---------------- src/views/rain/maintain/maintain.vue | 1294 ++++++++++++++++ src/views/{ => rain}/maintain/plan.vue | 8 +- 14 files changed, 2535 insertions(+), 2508 deletions(-) create mode 100644 src/views/rain/basic.vue rename src/views/{ => rain}/basic/account.vue (97%) rename src/views/{ => rain}/basic/area.vue (97%) rename src/views/{ => rain}/basic/group.vue (97%) rename src/views/{ => rain}/basic/road.vue (96%) rename src/views/{ => rain}/basic/site.vue (98%) rename src/views/{ => rain}/basic/unit.vue (97%) create mode 100644 src/views/rain/inspection/inspection.vue rename src/views/{management => rain/inspection}/plan.vue (97%) create mode 100644 src/views/rain/maintain/maintain.vue rename src/views/{ => rain}/maintain/plan.vue (97%) diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index 4c22558..5fe2270 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -318,12 +318,12 @@ export default { }) }, gowhere(type){ - let url ="/admin/#/rain/inspection" + let url ="/admin/#/rain/inspection/inspection" if(type==1){ - url ="/admin/#/rain/inspection" + url ="/admin/#/rain/inspection/inspection" } if(type==2){ - url ="/admin/#/rain/maintain" + url ="/admin/#/rain/maintain/maintain" } if(type==3){ url ="/admin/#/common/index" diff --git a/src/views/rain/basic.vue b/src/views/rain/basic.vue new file mode 100644 index 0000000..569a535 --- /dev/null +++ b/src/views/rain/basic.vue @@ -0,0 +1,9 @@ + + + + + diff --git a/src/views/basic/account.vue b/src/views/rain/basic/account.vue similarity index 97% rename from src/views/basic/account.vue rename to src/views/rain/basic/account.vue index 28ce7c2..eefea24 100644 --- a/src/views/basic/account.vue +++ b/src/views/rain/basic/account.vue @@ -117,16 +117,16 @@ store, save, del - } from '../../api/basic/account.js' + } from '../../../api/basic/account.js' import { listarea - } from '../../api/basic/area.js' + } from '../../../api/basic/area.js' import { listmaintain - } from '../../api/basic/unit.js' + } from '../../../api/basic/unit.js' import { listgroup - } from '../../api/basic/group.js' + } from '../../../api/basic/group.js' import LxHeader from "@/components/LxHeader/index.vue"; export default { diff --git a/src/views/basic/area.vue b/src/views/rain/basic/area.vue similarity index 97% rename from src/views/basic/area.vue rename to src/views/rain/basic/area.vue index fb7dcb8..579c376 100644 --- a/src/views/basic/area.vue +++ b/src/views/rain/basic/area.vue @@ -84,7 +84,7 @@ store, save, del - } from '../../api/basic/area.js' + } from '../../../api/basic/area.js' import LxHeader from "@/components/LxHeader/index.vue"; export default { diff --git a/src/views/basic/group.vue b/src/views/rain/basic/group.vue similarity index 97% rename from src/views/basic/group.vue rename to src/views/rain/basic/group.vue index 2a4c966..8cccfee 100644 --- a/src/views/basic/group.vue +++ b/src/views/rain/basic/group.vue @@ -84,7 +84,7 @@ store, save, del - } from '../../api/basic/group.js' + } from '../../../api/basic/group.js' import LxHeader from "@/components/LxHeader/index.vue"; export default { diff --git a/src/views/basic/road.vue b/src/views/rain/basic/road.vue similarity index 96% rename from src/views/basic/road.vue rename to src/views/rain/basic/road.vue index 5baa0d1..8d9619c 100644 --- a/src/views/basic/road.vue +++ b/src/views/rain/basic/road.vue @@ -36,7 +36,7 @@ - listarea({ - page: 1, - page_size: 99 - }).then(res => { - for(var m of res.data){ - that.selects.areasList.push({ - id:m.id, - name:m.name - }) - } - }) - - - }, - handleCurrentChange(page) { - this.paginations.page = page; - this.load(); - }, - load() { - listall({ - page: this.paginations.page, - page_size: this.paginations.page_size, - area_id: this.searchFields.area_id - }).then(response => { - this.tableData = response.data; - this.paginations.total = response.total; - }).catch(error => { - console.log(error) - reject(error) - }); - - - - }, - info(obj) { - var that = this; - get(obj.id).then(res => { - let result = Object.assign(that.form, res); - // this.$set(that.form,res) - that.rainType = result.type; - that.nowstatus = result.status; - that.rainMaintainLogs = result.rain_maintain_logs; - that.end_types = result.end_type - if (that.rainType == 1) { - that.rainTitle = "日常雨水设施" - } else if (that.rainType == 2) { - that.rainTitle = "在建工地" - } - switch (result.type) { - case 1: - that.form = result.rain_equipment_info; - that.form.rain_equipment_id = result.rain_equipment_id; - that.idname = "rain_equipment_id" - that.mapform = [result.rain_equipment_info.longitude, result.rain_equipment_info.latitude, result.rain_equipment_info.address] - let _files = []; - for (var mod of result.rain_equipment_info.rain_equipment_files) { - let m = Object.assign({}, mod); - m.url = mod.files.url; - m.id = mod.files.id; - m.photoType = "before"; - _files.push(m); - } - that.filesList = _files; - - let _filesafter = []; - for (var mod of result.rain_equipment_info.rain_equipment_end_files) { - let m = Object.assign({}, mod); - m.url = mod.files.url; - m.id = mod.files.id; - m.photoType = "after"; - _filesafter.push(m); - } - that.dealFilesList = _filesafter; - break; - case 2: - that.form = result.building_site_info; - let building_site = result.building_site_info.building_site - that.form.building_site_id = - that.form.address = building_site.address - that.form.latitude=building_site.latitude - that.form.longitude=building_site.longitude - that.form.name=building_site.name - that.form.number=building_site.number - that.form.remark=building_site.remark - that.form.status=building_site.status - that.form.type=parseInt(building_site.type) - that.form.building_site_id = building_site.id - that.form.building_site_content_id = result.building_site_content_id; - that.idname = "building_site_content_id" - that.mapform = [building_site.longitude, building_site.latitude, building_site.address] - let discharge_files = []; - for (var mod of result.building_site_info.building_site_content_files) { - let m = Object.assign({}, mod); - m.url = mod.files.url; - m.id = mod.files.id; - m.photoType = "before"; - discharge_files.push(m); - } - that.filesList = discharge_files; - - break; - - } - that.formdetail.id = result.id - console.log("detail",that.filesList) - - }).catch(error => { - //reject(error) - }) - }, - - show(obj) { - this.dialogFormDetailVisible = true; - this.info(obj) - }, - - edit(obj) { - var that = this; - this.form = this.$options.data().form - that.filesList = []; - that.dealFilesList = []; - that.mapform = ['', '', '']; - if (obj) { - that.info(obj); - this.dialogFormVisible = true; - } else { - this.dialogFormVisible = false - this.rainTypeVisible = true - } - - }, - del(obj) { - var that = this; - if (obj) { - this.$Modal.confirm({ - title: '确认要删除数据?', - onOk: () => { - del(obj.id).then(response => { - this.$Message.success('操作成功'); - that.load(); - }).catch(error => { - console.log(error) - reject(error) - }) - }, - onCancel: () => { - //this.$Message.info('Clicked cancel'); - } - }); - } - }, - - submitForm(formName) { - var that = this; - var listUrlbefore = [] - for (var m of this.filesList) { - m.photoType = "before"; - if (m.response) - listUrlbefore.push({ - "upload_id": m.response.id - }); - else - listUrlbefore.push({ - "upload_id": m.id - }); - } - this.form.files_list = listUrlbefore; - let listUrlafter = []; - for (var m of this.dealFilesList) { - if (m.response) - listUrlafter.push({ - "upload_id": m.response.id - }); - else - listUrlafter.push({ - "upload_id": m.upload_id - }); - } - this.form.files_end_list = listUrlafter - - this.$refs[formName].validate((valid) => { - if (valid) { - that.submitAll(that.rainType, that.form[this.idname]) - } else { - this.$Message.error('数据校验失败'); - console.log('error submit!!'); - return false; - } - }); - }, - submitFormDetail(formName, status) { - - var that = this; - that.formdetail.status = status - console.log(that.formdetail); - - - update(that.formdetail).then(response => { - this.$Message.success('操作成功'); - that.load(); - that.dialogFormDetailVisible = false; - }).catch(error => { - //reject(error) - }) - - }, - resetForm(formName) { - var that = this; - that.filesList = []; - that.dealFilesList = []; - that.mapform = ['', '', '']; - this.$refs[formName].resetFields(); - that.dialogFormVisible = false; - that.dialogFormDetailVisible = false; - }, - resetFormDetail(formName) { - var that = this; - that.filesList = []; - that.dealFilesList = []; - that.mapform = ['', '', '']; - that.form = {}; - that.rainMaintainLogs = [] - that.end_types = 0; - that.formdetail = { - status: 0, - end_type: 0, - content: "" - } - that.dialogFormVisible = false; - that.dialogFormDetailVisible = false; - }, - handleRemove(file) { - if (file.photoType == "before") { - for (var i = 0; i < this.filesList.length; i++) { - if (this.filesList[i].url == file.url) { - this.filesList.splice(i, 1) - } - } - } else if (file.photoType == "after") { - for (var i = 0; i < this.dealFilesList.length; i++) { - if (this.dealFilesList[i].url == file.url) { - this.dealFilesList.splice(i, 1) - } - } - - } - }, - handlePictureCardPreview(file) { - this.dialogImageUrl = file.url; - this.dialogVisible = true; - }, - handlesuccess(response, file, fileList, index) { - if (index == 1) { - file.photoType = "before" - this.filesList = fileList; - // this.form.files_list = listUrl; - } else { - - file.photoType = "after" - this.dealFilesList = fileList - } - }, - - resetrainType() { - this.rainTypeVisible = false - }, - submitRainType() { - var that = this - this.rainTypeVisible = false - if (that.rainType == 1) { - that.rainTitle = "日常雨水设施" - } else if (that.rainType == 2) { - that.rainTitle = "在建工地" - } - this.dialogFormVisible = true; - }, - - - submitAll(type, id) { - var that = this; - - // return - // that.form.type = type; - console.log("that.form", that.form); - // return; - switch (parseInt(type)) { - case 1: - if (id) { - saveequipment(that.form).then(response => { - this.$Message.success('操作成功'); - that.load(); - that.dialogFormVisible = false; - }).catch(error => { - //reject(error) - }) - } else { - storeequipment(that.form).then(response => { - this.$Message.success('操作成功'); - that.load(); - that.dialogFormVisible = false; - }).catch(error => { - //reject(error) - }) - } - break; - case 2: - if (id) { - savebuilding(that.form).then(response => { - this.$Message.success('操作成功'); - that.load(); - that.dialogFormVisible = false; - }).catch(error => { - //reject(error) - }) - } else { - storebuilding(that.form).then(response => { - this.$Message.success('操作成功'); - that.load(); - that.dialogFormVisible = false; - }).catch(error => { - //reject(error) - }) - } - break; - - - - } - - - - - - } - - } - } - - - diff --git a/src/views/rain/inspection/inspection.vue b/src/views/rain/inspection/inspection.vue new file mode 100644 index 0000000..750ae1e --- /dev/null +++ b/src/views/rain/inspection/inspection.vue @@ -0,0 +1,1200 @@ + + + + + diff --git a/src/views/management/plan.vue b/src/views/rain/inspection/plan.vue similarity index 97% rename from src/views/management/plan.vue rename to src/views/rain/inspection/plan.vue index 389ec18..a53a6b1 100644 --- a/src/views/management/plan.vue +++ b/src/views/rain/inspection/plan.vue @@ -140,14 +140,14 @@ store, save, del - } from '../../api/inspectionmanagement/index.js' + } from '../../../api/inspectionmanagement/index.js' import { listuser - } from '../../api/system/user.js' + } from '../../../api/system/user.js' import { listarea - } from '../../api/basic/area.js' - import { getparameteritem } from '../../api/system/dictionary.js' + } from '../../../api/basic/area.js' + import { getparameteritem } from '../../../api/system/dictionary.js' import LxHeader from "@/components/LxHeader/index.vue"; export default { diff --git a/src/views/rain/maintain.vue b/src/views/rain/maintain.vue index b026aea..569a535 100644 --- a/src/views/rain/maintain.vue +++ b/src/views/rain/maintain.vue @@ -1,1294 +1,9 @@ - - - } - - } - } - - - diff --git a/src/views/rain/maintain/maintain.vue b/src/views/rain/maintain/maintain.vue new file mode 100644 index 0000000..cce5c4f --- /dev/null +++ b/src/views/rain/maintain/maintain.vue @@ -0,0 +1,1294 @@ + + + + + diff --git a/src/views/maintain/plan.vue b/src/views/rain/maintain/plan.vue similarity index 97% rename from src/views/maintain/plan.vue rename to src/views/rain/maintain/plan.vue index 970ca38..3a398bb 100644 --- a/src/views/maintain/plan.vue +++ b/src/views/rain/maintain/plan.vue @@ -140,14 +140,14 @@ store, save, del - } from '../../api/maintainmanagement/index.js' + } from '../../../api/maintainmanagement/index.js' import { listuser - } from '../../api/system/user.js' + } from '../../../api/system/user.js' import { listarea - } from '../../api/basic/area.js' - import { getparameteritem } from '../../api/system/dictionary.js' + } from '../../../api/basic/area.js' + import { getparameteritem } from '../../../api/system/dictionary.js' import LxHeader from "@/components/LxHeader/index.vue"; export default {