From 99c5962c1429fb13bf0df702492e22c2b69dc486 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Fri, 23 Sep 2022 17:24:30 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=B9=9D=E5=B0=8F=E5=9C=BA=E6=89=80?= =?UTF-8?q?=E5=B7=A1=E6=9F=A5=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scss/modules/management/detail-main.scss | 3 + .../ninePlaces/inspect/inspect.vue | 177 ++++----- .../ninePlaces/inspect/inspectDetail.vue | 350 +++--------------- .../ninePlaces/places/places.vue | 22 +- .../ninePlaces/places/placesDetail.vue | 232 +++--------- .../communityService/ninePlaces/team/team.vue | 11 +- .../ninePlaces/team/teamDetail.vue | 283 +++----------- 7 files changed, 289 insertions(+), 789 deletions(-) diff --git a/src/assets/scss/modules/management/detail-main.scss b/src/assets/scss/modules/management/detail-main.scss index 6cde8e84d..e89af1e6e 100644 --- a/src/assets/scss/modules/management/detail-main.scss +++ b/src/assets/scss/modules/management/detail-main.scss @@ -141,6 +141,9 @@ .info-title-3{ flex: 0 0 150px; } + .info-title-4{ + flex: 0 0 110px; + } > span, > div { diff --git a/src/views/modules/communityService/ninePlaces/inspect/inspect.vue b/src/views/modules/communityService/ninePlaces/inspect/inspect.vue index 2162f8fd0..6b2d90f6d 100644 --- a/src/views/modules/communityService/ninePlaces/inspect/inspect.vue +++ b/src/views/modules/communityService/ninePlaces/inspect/inspect.vue @@ -4,93 +4,89 @@ -
- - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - + + + + + + + + + 查询 - + + + + + + + + + + + + + + + 重置 -
+ placeholder="请选择" + clearable> + + + + + + + + + + + + + + 查询 + 重置 +
@@ -454,13 +450,18 @@ export default { }, handleDetail (row) { - this.formTitle = '详情' - this.formShow = true + // this.formTitle = '详情' + this.detailShow = true this.$nextTick(() => { - this.$refs.ref_form.initForm('detail', row.placePatrolRecordId) + this.$refs.ref_detail.initForm(row.placePatrolRecordId) }) }, + diaDetailClose () { + + this.detailShow = false + }, + handleAdd () { this.formTitle = '新增' this.formShow = true diff --git a/src/views/modules/communityService/ninePlaces/inspect/inspectDetail.vue b/src/views/modules/communityService/ninePlaces/inspect/inspectDetail.vue index 7e0c8d460..a6fa53fff 100644 --- a/src/views/modules/communityService/ninePlaces/inspect/inspectDetail.vue +++ b/src/views/modules/communityService/ninePlaces/inspect/inspectDetail.vue @@ -1,147 +1,53 @@ @@ -162,8 +68,9 @@ let loading // 加载动画 export default { data () { return { - formType: 'add', //表单操作类型 add新增,edit编辑,detail详情 - btnDisable: false, + + + initLoading: false, placesList: [],//场景列表 teamsList: [],//分队列表 @@ -192,104 +99,21 @@ export default { methods: { - async initForm (type, placePatrolRecordId) { - this.$refs.ref_form.resetFields(); - this.startLoading() - await this.loadPlaces() - await this.loadTeams() - - this.formType = type - if (placePatrolRecordId) { - this.placePatrolRecordId = placePatrolRecordId - this.formData.placePatrolRecordId = placePatrolRecordId - await this.loadFormData() - await this.loadInspectors() - } - this.endLoading() - }, - - //改变场所区域 - handleChangeGrid () { - this.formData.placeOrgId = '' - this.loadPlaces() - }, - - //改变场所类型 - handleChangeType () { - this.formData.placeOrgId = '' - this.loadPlaces() - }, - - - //加载场所 - async loadPlaces () { - const url = '/gov/org/placeorg/getlist' - - let params = { - gridId: this.formData.gridId,//场所区域【网格Id】 - ninePlaceVal: this.formData.ninePlaceVal,//场所类型【九小场所Value值】 - isPage: false - } - - const { data, code, msg } = await requestPost(url, params) - - if (code === 0) { - this.placesList = data.list - - } else { - this.$message.error(msg) - } - }, - + async initForm (placePatrolRecordId) { - //加载分队 - async loadTeams () { - const url = '/gov/org/placepatrolteam/getlist' - // const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolteam/getlist' - let params = { - isPage: false - } + this.startLoading() - const { data, code, msg } = await requestPost(url, params) - if (code === 0) { - this.teamsList = data.list - if (this.teamsList.length > 0) { - this.formData.placePatrolTeamId = this.teamsList[0].teamId + this.placePatrolRecordId = placePatrolRecordId + this.formData.placePatrolRecordId = placePatrolRecordId + await this.loadFormData() - this.hancleChangeTeam(0) - } - } else { - this.$message.error(msg) - } + this.initLoading = true + this.endLoading() }, - //点击分队切换人员 - async hancleChangeTeam (index) { - let array = [] - this.formData.inspectorArray = [...array] - // this.formData.placePatrolTeamId = this.teamsList[index].teamId - await this.loadInspectors() - }, - //加载分队下人员 - async loadInspectors () { - const url = '/gov/org/placepatrolteamstaff/getlist' - // const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolteamstaff/getlist' - let params = { - teamId: this.formData.placePatrolTeamId - } - - const { data, code, msg } = await requestPost(url, params) - - if (code === 0) { - this.inspectorsList = data - - } else { - this.$message.error(msg) - } - }, //加载form async loadFormData () { const url = '/gov/org/placepatrolrecord/detail' @@ -311,47 +135,6 @@ export default { } }, - - async handleComfirm () { - - this.btnDisable = true - setTimeout(() => { - this.btnDisable = false - }, 10000) - this.$refs['ref_form'].validate((valid, messageObj) => { - if (!valid) { - app.util.validateRule(messageObj) - this.btnDisable = false - } else { - this.addRecord() - } - - }) - - }, - async addRecord () { - - let url = "/gov/org/placepatrolrecord/add" - // let url = "http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolrecord/add" - this.formData.inspectors = this.formData.inspectorArray.join(',') - - const { data, code, msg } = await requestPost(url, this.formData) - - if (code === 0) { - this.$message({ - type: 'success', - message: '操作成功' - }) - this.resetData() - this.$emit('dialogOk') - this.btnDisable = false - } else { - this.btnDisable = false - this.$message.error(msg) - } - - }, - handleCancle () { this.resetData() @@ -360,18 +143,7 @@ export default { }, resetData () { - this.formData = { - gridId: '',//网格Id - ninePlaceVal: '',//九小场所类型value值 - placeOrgId: '',//场所下的组织Id-场所名称 - placePatrolTeamId: '',//场所下分队Id - inspectorArray: [],//检查人员数组 - inspectors: '',//检查人员Id,逗号分隔 - firstTime: '',//首次巡查时间 - detailed: '',//隐患明细 - firstResult: '',//首次检查结果【0:合格 1:不合格】 - reviewTime: '',//拟复查时间 - } + this.formData = {} }, // 开启加载动画 startLoading () { @@ -440,7 +212,7 @@ export default { } - diff --git a/src/views/modules/communityService/ninePlaces/places/places.vue b/src/views/modules/communityService/ninePlaces/places/places.vue index 88bb6db95..36c6af69f 100644 --- a/src/views/modules/communityService/ninePlaces/places/places.vue +++ b/src/views/modules/communityService/ninePlaces/places/places.vue @@ -194,6 +194,7 @@ @dialogCancle="addFormCancle" @dialogOk="addFormOk"> + { - this.$refs.ref_form.initForm('detail', row.id) - }) + // handleDetail (row) { + // // this.formTitle = '详情' + // this.detailShow = true + // this.$nextTick(() => { + // this.$refs.ref_detail.initForm( row.id) + // }) + // }, + + diaDetailClose () { + + this.detailShow = false }, handleAdd () { @@ -392,9 +398,9 @@ export default { }, handleDetail (row) { this.formTitle = '详情' - this.formShow = true + this.detailShow = true this.$nextTick(() => { - this.$refs.ref_form.initForm('detail', row.placeOrgId) + this.$refs.ref_detail.initForm(row.placeOrgId) }) }, diff --git a/src/views/modules/communityService/ninePlaces/places/placesDetail.vue b/src/views/modules/communityService/ninePlaces/places/placesDetail.vue index ae7bb8e0c..dbac5af92 100644 --- a/src/views/modules/communityService/ninePlaces/places/placesDetail.vue +++ b/src/views/modules/communityService/ninePlaces/places/placesDetail.vue @@ -1,107 +1,46 @@ @@ -125,8 +64,10 @@ export default { formType: 'add', //表单操作类型 add新增,edit编辑,detail详情 btnDisable: false, + initLoading: false, placeOrgId: '', + gridList: [], formData: { gridId: '', ninePlaceVal: '', @@ -146,25 +87,26 @@ export default { methods: { - async initForm (type, placeOrgId) { - this.$refs.ref_form.resetFields(); + async initForm (placeOrgId) { + this.loadGrid() - this.formType = type - if (placeOrgId) { - this.placeOrgId = placeOrgId - this.formData.placeOrgId = placeOrgId - await this.loadFormData() - } + + this.placeOrgId = placeOrgId + this.formData.placeOrgId = placeOrgId + await this.loadFormData() + + this.initLoading = true + }, - async loadGrid () { + async loadGrid () { const url = "/gov/org/customergrid/gridoption" let params = { agencyId: this.agencyId, - purpose:"addorupdate" + purpose: "addorupdate" } const { data, code, msg } = await requestPost(url, params) @@ -198,63 +140,6 @@ export default { - async handleComfirm () { - - this.btnDisable = true - setTimeout(() => { - this.btnDisable = false - }, 10000) - this.$refs['ref_form'].validate((valid, messageObj) => { - if (!valid) { - app.util.validateRule(messageObj) - this.btnDisable = false - } else { - this.addPlace() - } - - }) - - - }, - async addPlace () { - // const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //手机号码 - // if (regPhone.test(this.formData.mobile) === false) { - // this.btnDisable = false - // this.$message({ - // type: 'warning', - // message: '请输入正确的手机号码' - // }) - // return false; - // } - - let url = '' - - if (this.formType === 'edit') { - url = '/gov/org/placeorg/edit' - // url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placeorg/edit' - - } else { - url = "/gov/org/placeorg/add" - // url = "http://yapi.elinkservice.cn/mock/245/gov/org/placeorg/add" - } - - const { data, code, msg } = await requestPost(url, this.formData) - - if (code === 0) { - this.$message({ - type: 'success', - message: '操作成功' - }) - this.resetData() - this.$emit('dialogOk') - this.btnDisable = false - } else { - this.btnDisable = false - this.$message.error(msg) - } - - }, - handleCancle () { this.resetData() @@ -336,15 +221,6 @@ export default { } } - - - diff --git a/src/views/modules/communityService/ninePlaces/team/team.vue b/src/views/modules/communityService/ninePlaces/team/team.vue index cab0c4601..37791495d 100644 --- a/src/views/modules/communityService/ninePlaces/team/team.vue +++ b/src/views/modules/communityService/ninePlaces/team/team.vue @@ -341,13 +341,18 @@ export default { }, handleDetail (row) { - this.formTitle = '详情' - this.formShow = true + // this.formTitle = '详情' + this.detailShow = true this.$nextTick(() => { - this.$refs.ref_form.initForm('detail', row.teamId, this.agencyId) + this.$refs.ref_detail.initForm( row.teamId, this.agencyId) }) }, + diaDetailClose () { + + this.detailShow = false + }, + handleAdd () { this.formTitle = '新增' this.formShow = true diff --git a/src/views/modules/communityService/ninePlaces/team/teamDetail.vue b/src/views/modules/communityService/ninePlaces/team/teamDetail.vue index 66732ebe0..3ddad9351 100644 --- a/src/views/modules/communityService/ninePlaces/team/teamDetail.vue +++ b/src/views/modules/communityService/ninePlaces/team/teamDetail.vue @@ -1,146 +1,57 @@ @@ -162,9 +73,9 @@ let loading // 加载动画 export default { data () { return { - formType: 'add', //表单操作类型 add新增,edit编辑,detail详情 btnDisable: false, + initLoading: false, teamId: '', formData: { @@ -193,15 +104,15 @@ export default { methods: { - async initForm (type, teamId, agencyId) { - this.$refs.ref_form.resetFields(); + async initForm (teamId, agencyId) { + this.formData.agencyId = agencyId - this.formType = type - if (teamId) { - this.teamId = teamId - this.formData.teamId = teamId - await this.loadFormData() - } + + this.teamId = teamId + this.formData.teamId = teamId + await this.loadFormData() + + this.initLoading = true }, @@ -384,32 +295,7 @@ export default { } }, computed: { - dataRule () { - return { - teamName: [ - { required: true, message: '分队名称不能为空', trigger: 'blur' } - ], - gridIdArray: [ - { required: true, message: '负责区域不能为空', trigger: 'blur' }, - ], - ninePlaceArray: [ - { required: true, message: '场所类型不能为空', trigger: 'blur' } - ], - - plan: [ - { required: true, message: '巡查计划 不能为空', trigger: 'blur' } - ], - personInCharge: [ - { required: true, message: '负责人不能为空', trigger: 'blur' } - ], - mobile: [ - { required: true, message: '联系电话不能为空', trigger: 'blur' } - ], - member: [ - { required: true, message: '成员不能为空', trigger: 'blur' } - ] - } - }, + }, props: { @@ -426,55 +312,6 @@ export default { } - - - - - + \ No newline at end of file From 4907143be8ac5160be81d2a6f68c1bbc805a6b19 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Mon, 26 Sep 2022 09:51:55 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E9=98=B2=E7=96=AB=E9=83=A8=E5=88=86?= =?UTF-8?q?=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/epidemic/natFocus/natFocusEdit.vue | 292 +++++++++--------- src/views/modules/base/epidemic/travel.vue | 25 +- .../modules/base/epidemic/travelDetail.vue | 247 +++++++++++++++ .../communityParty/members/cpts/record.vue | 3 +- 4 files changed, 423 insertions(+), 144 deletions(-) create mode 100644 src/views/modules/base/epidemic/travelDetail.vue diff --git a/src/views/modules/base/epidemic/natFocus/natFocusEdit.vue b/src/views/modules/base/epidemic/natFocus/natFocusEdit.vue index 1b454dab2..c225c8e5e 100644 --- a/src/views/modules/base/epidemic/natFocus/natFocusEdit.vue +++ b/src/views/modules/base/epidemic/natFocus/natFocusEdit.vue @@ -1,20 +1,16 @@ @@ -167,7 +170,7 @@ import { requestPost } from "@/js/dai/request"; import { mapGetters } from "vuex"; let loading; // 加载动画 -function iniGetFmData() { +function iniGetFmData () { return { attentionType: 2, name: "", @@ -184,7 +187,7 @@ function iniGetFmData() { } export default { - data() { + data () { return { formType: "edit", @@ -202,20 +205,20 @@ export default { components: {}, - async mounted() { - this.getFmOptions("isolatedState", "/sys/dict/data/dictlist", { + async mounted () { + await this.getFmOptions("isolatedState", "/sys/dict/data/dictlist", { dictType: "isolatedState", }); }, - destroyed() {}, + destroyed () { }, methods: { - handleChannelChange(val) { + handleChannelChange (val) { this.formData.content = ""; }, - async initForm(formType, row) { + async initForm (formType, row) { this.formType = formType; this.$refs["ref_form1"].resetFields(); row.channel = []; @@ -223,9 +226,18 @@ export default { row.attentionType = 2; row.isSelChannel = false; this.formData = JSON.parse(JSON.stringify(row)); + + this.options.isolatedState.forEach(element => { + if (this.formData.isolatedState === element.value) { + this.formData.isolatedStateShow = element.label + } + }); + }, - handleComfirm() { + + + handleComfirm () { this.$refs["ref_form1"].validate((valid, messageObj) => { if (!valid) { app.util.validateRule(messageObj); @@ -235,7 +247,7 @@ export default { }); }, - async submit() { + async submit () { if (this.formData.isSelChannel) { if (!this.formData.content) { this.$message({ @@ -274,12 +286,12 @@ export default { } }, - handleCancle() { + handleCancle () { this.resetData(); this.$emit("dialogCancle"); }, - async getFmOptions(field, url, params, cookFn) { + async getFmOptions (field, url, params, cookFn) { const { data, code, msg } = await requestPost(url, { ...params, }); @@ -292,24 +304,24 @@ export default { } }, - resetData() { + resetData () { this.veroId = ""; this.formData = iniGetFmData(); }, - handleSizeChange(val) { + handleSizeChange (val) { this.pageSize = val; this.pageNo = 1; this.loadTable(); }, - handleCurrentChange(val) { + handleCurrentChange (val) { this.pageNo = val; this.loadTable(); }, // 开启加载动画 - startLoading() { + startLoading () { loading = Loading.service({ lock: true, // 是否锁定 text: "正在加载……", // 加载中需要显示的文字 @@ -317,7 +329,7 @@ export default { }); }, // 结束加载动画 - endLoading() { + endLoading () { // clearTimeout(timer); if (loading) { loading.close(); @@ -325,12 +337,12 @@ export default { }, }, computed: { - tableHeight() { + tableHeight () { return 200; }, ...mapGetters(["clientHeight", "iframeHeight"]), - dataRule() { + dataRule () { return { isolatedState: [ { required: true, message: "隔离状态必填", trigger: "blur" }, @@ -349,7 +361,11 @@ export default { }, }; - + + + diff --git a/src/views/modules/base/epidemic/travel.vue b/src/views/modules/base/epidemic/travel.vue index b6db0d56e..f7fda935a 100644 --- a/src/views/modules/base/epidemic/travel.vue +++ b/src/views/modules/base/epidemic/travel.vue @@ -5,7 +5,7 @@ + :label-width="'110px'">
+ + + + import travelForm from './travelForm' +import travelDetail from './travelDetail' import nfNoticeList from './natFocus/nfNoticeList' import nfSendNotice from './natFocus/nfSendNotice' import nfVisiteList from './natFocus/nfVisiteList' @@ -402,6 +416,7 @@ export default { //form相关 formShow: false, + detailShow: false, formTitle: '新增', areaProps: { lazy: true, @@ -413,6 +428,7 @@ export default { }, components: { travelForm, + travelDetail, nfNoticeList, nfSendNotice, nfVisiteList @@ -666,10 +682,10 @@ export default { }, handleDetail (row) { - this.formTitle = '行程详情' - this.formShow = true + // this.formTitle = '行程详情' + this.detailShow = true this.$nextTick(() => { - this.$refs.ref_form.initForm('detail', row) + this.$refs.ref_detail.initForm(row) }) }, @@ -690,6 +706,7 @@ export default { }, addFormCancle () { + this.detailShow = false this.formShow = false }, addFormOk () { diff --git a/src/views/modules/base/epidemic/travelDetail.vue b/src/views/modules/base/epidemic/travelDetail.vue new file mode 100644 index 000000000..f7bbe35aa --- /dev/null +++ b/src/views/modules/base/epidemic/travelDetail.vue @@ -0,0 +1,247 @@ + + + + + + + + diff --git a/src/views/modules/communityParty/members/cpts/record.vue b/src/views/modules/communityParty/members/cpts/record.vue index 799611075..809af3be9 100644 --- a/src/views/modules/communityParty/members/cpts/record.vue +++ b/src/views/modules/communityParty/members/cpts/record.vue @@ -1,8 +1,7 @@ @@ -257,6 +270,7 @@ - +