From 91b67787b46809bb315f7e13ff06f6e7df46bd5d Mon Sep 17 00:00:00 2001 From: jiangyy Date: Wed, 28 Sep 2022 17:14:06 +0800 Subject: [PATCH 1/6] 111 --- .../communityService/ninePlaces/places/placesDetail.vue | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/views/modules/communityService/ninePlaces/places/placesDetail.vue b/src/views/modules/communityService/ninePlaces/places/placesDetail.vue index 2c0a3e1e8..7aab0f801 100644 --- a/src/views/modules/communityService/ninePlaces/places/placesDetail.vue +++ b/src/views/modules/communityService/ninePlaces/places/placesDetail.vue @@ -134,11 +134,7 @@ export default { } }, - - handleCancle () { - - this.$emit('diaDetailClose') }, From e629001e4ee9eb8812059d85bd675fd60b743464 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Fri, 30 Sep 2022 10:42:40 +0800 Subject: [PATCH 2/6] 11 --- .../base/epidemic/natInfo/noNatDetail.vue | 2 +- src/views/modules/base/epidemic/vaccin.vue | 8 +- .../modules/base/epidemic/vaccinForm.vue | 420 ++--------------- .../communityService/worklog/workLog.vue | 12 +- src/views/modules/worklog/icworklog.vue | 427 ++++++++++-------- 5 files changed, 293 insertions(+), 576 deletions(-) diff --git a/src/views/modules/base/epidemic/natInfo/noNatDetail.vue b/src/views/modules/base/epidemic/natInfo/noNatDetail.vue index 8cf1bcb1b..79b06db74 100644 --- a/src/views/modules/base/epidemic/natInfo/noNatDetail.vue +++ b/src/views/modules/base/epidemic/natInfo/noNatDetail.vue @@ -25,7 +25,7 @@
检测结果: - {{ formData.natResult==='0'?'阴性':'阳性' }} + {{ formData.natResult==='0'?'阴性':formData.natResult==='1'?'阳性':'--' }}
diff --git a/src/views/modules/base/epidemic/vaccin.vue b/src/views/modules/base/epidemic/vaccin.vue index 0d11f7407..f2e2874d7 100644 --- a/src/views/modules/base/epidemic/vaccin.vue +++ b/src/views/modules/base/epidemic/vaccin.vue @@ -100,7 +100,8 @@ class="diy-button--export" size="small" @click="handleExportModule">下载模板 - + @dialogCancle="diaClose"> -
+
+
+
+
+ 姓名: + {{ formData.name||'--' }} +
+ +
+ 手机号: + {{ formData.mobile||'--' }} +
+ +
+ 证件号: + {{ formData.idCard||'--' }} +
+ +
+ 接种时间: + {{ formData.inoculateTime||'--' }} +
+
+ 接种地点: + {{ formData.inoculateAddress||'--' }} +
+
+ 疫苗厂家: + {{ formData.manufacturer||'--' }} +
+ +
+
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
+
取 消 - 确 定 -
+ @click="handleCancle">关 闭 +
@@ -108,23 +56,7 @@ let loading // 加载动画 export default { data () { return { - formType: 'add', //表单操作类型 add新增,edit编辑,detail详情 - hideUploadEdit: false, // 隐藏'上传按钮' - limitNum: 1, - enterType: '1',//录入方式1 手动输入 2 选择居民 - isFromResi: false,//是否从已有居民信息中选择 - - gridList: [], - personList: [], - pickerOptions: { //控制时间范围 - disabledDate (time) { - return time.getTime() > (Date.now()) - } - }, - - btnDisable: false, - - icNatId: '', + initLoading: false, formData: { agencyId: '',//当前网格所属组织Id userId: '',//居民端小程序的用户id、数字社区的icResiUserId、其他情况无值 @@ -137,11 +69,7 @@ export default { manufacturer: '' }, - fileList: [], - uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadvariedfile', - dialogImageUrl: '', - dialogVisible: false, - imgLoading: false, + } }, @@ -149,8 +77,7 @@ export default { async mounted () { const { user } = this.$store.state this.agencyId = user.agencyId - //获取网格下拉框数据 - // await this.loadGrid() + }, methods: { @@ -158,79 +85,16 @@ export default { this.formData.content = '' }, - async initForm (type, row) { - // this.startLoading() - this.formData.agencyId = this.agencyId + async initForm (row) { - // this.$refs['ref_form'].resetFields(); - this.isFromResi = false - this.enterType = '1' - this.formType = type this.formData = { ...row } // this.endLoading() console.log('formData----', this.formData) - - }, - - handleChangeEnterType (value) { - this.formData.name = '' - this.formData.mobile = '' - this.formData.idCard = '' - this.formData.gridId = '' - this.formData.userId = '' - - this.$refs['ref_form'].resetFields(); - if (value === '2') { - this.isFromResi = true - } else { - this.isFromResi = false - } - + this.initLoading = true }, - async loadGrid () { - const url = "/gov/org/customergrid/gridoption" - let params = { - agencyId: this.agencyId - } - - const { data, code, msg } = await requestPost(url, params) - - if (code === 0) { - this.gridList = data - - } else { - this.$message.error(msg) - } - - }, - async handleSelGrid (value) { - - const url = "/epmetuser/icresiuser/demandusers" - - let params = { - agencyId: this.agencyId, - gridId: value - } - - const { data, code, msg } = await requestPost(url, params) - - if (code === 0) { - this.personList = data - - } else { - this.$message.error(msg) - } - - }, - async handleSelPerson (personItem) { - this.formData.userId = personItem.demandUserId - this.formData.name = personItem.demandUserName - this.formData.mobile = personItem.demandUserMobile - this.formData.idCard = personItem.idCard - }, async loadFormData () { @@ -284,164 +148,15 @@ export default { } }, - handleComfirm () { - this.$refs['ref_form'].validate((valid, messageObj) => { - if (!valid) { - app.util.validateRule(messageObj) - - } else { - this.addNat() - } - - }) - }, - - async addNat () { - // if (this.imgLoading) { - // this.$message({ - // type: 'warning', - // message: '正在上传图片,请稍候重试' - // }) - // return false; - // } - 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; - } - const regCard = /(^\d{15}$)|(^\d{17}(\d|X)$)|(^[a-zA-Z0-9]{8,9}$)/; //身份证号码为15位或者18位,15位时全为数字,18位前17位为数字,最后一位是校验位,可能为数字或字符X - if (regCard.test(this.formData.idCard) === false) { - this.btnDisable = false - this.$message({ - type: 'warning', - message: '请输入正确的证件号码' - }) - return false; - } - - if (this.formData.isSelChannel) { - if (!this.formData.content) { - this.$message({ - type: 'warning', - message: '请填写通知内容' - }) - return false; - } else { - this.formData.channel = ['0'] - } - - } else { - this.formData.channel = [] - this.formData.content = '' - } - - this.btnDisable = true - setTimeout(() => { - this.btnDisable = false - }, 5000) - - let url = '' - if (this.formType === 'add') { - url = '/epmetuser/icNat/add' - // url = "http://yapi.elinkservice.cn/mock/102/epmetuser/icNat/add" - this.formData.icNatId = '' - - } else { - url = '/epmetuser/icNat/edit' - // url = "http://yapi.elinkservice.cn/mock/245/epmetuser/icNat/edit" - } - - - 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() + // this.resetData() this.$emit('dialogCancle') }, - handleRemove (file, fileList) { - this.hideUploadEdit = fileList.length >= this.limitNum; - this.formData.fileName = '' - this.formData.attachmentUrl = '' - this.formData.attachmentType = '' - this.fileList = [] - - }, - handlePictureCardPreview (file) { - this.dialogImageUrl = file.url; - this.dialogVisible = true; - }, - - handleEditChange (file, fileList) { - this.hideUploadEdit = fileList.length >= this.limitNum; - - }, - - beforeUpload (file) { - const array = file.name.split('.') - const extension = array[array.length - 1] - // const isLt1M = (file.size / 1024 / 1024) < 5 - if (extension !== 'jpg' - && extension !== 'png' - && extension !== 'gif' - ) { - this.$message.error('只能上传jpg、png、gif文件!') - return false - } else { - this.btnDisable = true - } - // if (!isLt1M) { - // this.$message.error('上传文件大小不能超过 5MB!') - // } - // return isLt1M - - }, - - handleFileSuccess (res, file) { - - if (res.code === 0 && res.msg === 'success') { - const array = file.name.split('.') - const fileType = array[array.length - 1] - - this.formData.fileName = file.name - this.formData.attachmentUrl = res.data.url - this.formData.attachmentType = 'image' - - file.attachmentFormat = fileType - file.attachmentSize = file.size - - - } else { - this.$message.error(res.msg) - } - this.btnDisable = false - }, resetData () { - this.icNatId = '' - this.fileList = [] - this.hideUploadEdit = false this.formData = { icNatId: '', @@ -481,40 +196,6 @@ export default { } }, computed: { - dataRule () { - return { - name: [ - { required: true, message: '姓名不能为空', trigger: 'blur' } - ], - idCard: [ - { required: true, message: '证件号不能为空', trigger: 'blur' } - ], - mobile: [ - { required: true, message: '手机号不能为空', trigger: 'blur' }, - ], - natTime: [ - { required: true, message: '检测时间不能为空', trigger: 'blur' }, - ], - - natAddress: [ - { required: false }, - ], - natResult: [ - { required: true, message: '检测结果不能为空', trigger: 'blur' }, - ], - - isSelChannel: [ - { required: false }, - ], - channel: [ - { required: false }, - ], - content: [ - { required: false }, - ], - - } - }, }, props: { @@ -530,19 +211,8 @@ export default { - - - diff --git a/src/views/modules/communityService/worklog/workLog.vue b/src/views/modules/communityService/worklog/workLog.vue index 9584d9954..6e7ad42ef 100644 --- a/src/views/modules/communityService/worklog/workLog.vue +++ b/src/views/modules/communityService/worklog/workLog.vue @@ -10,6 +10,7 @@ prop="gridId"> + width="100"> + min-width="130"> + min-width="150"> + width="110"> + width="100"> - +
- - - -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - {{ $t('query') }} - - + + +
+ +
+
+ + + + + + + + 重置
-
- - - - - + + + -
+
- {{ $t('add') }} - 导出 - 批量删除 + {{ $t('add') }} + 导出 + 批量删除
- - - - - - - - - - - - - + + + + + + + + + + + + +
- +
@@ -145,10 +191,10 @@ export default { exportURL: '/gov/org/icWorkLog/export' }, userId: this.$store.state.user.id, - agencyIdArray:[], + agencyIdArray: [], orgOptions: [], logTypeArr: [], - orgOptionProps:{ + orgOptionProps: { multiple: false, value: 'agencyId', label: 'agencyName', @@ -168,22 +214,22 @@ export default { this.getCategrayList() }, methods: { - getGridList() { + getGridList () { const { user } = this.$store.state this.$http - .post('/gov/org/customeragency/agencygridtree', {}) - .then(({ data: res }) => { - if (res.code !== 0) { - return this.$message.error(res.msg) - } else { - console.log('获取组织树成功', res.data) - this.orgOptions=[] - this.orgOptions .push( res.data) - } - }) - .catch(() => { - return this.$message.error('网络错误') - }) + .post('/gov/org/customeragency/agencygridtree', {}) + .then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } else { + console.log('获取组织树成功', res.data) + this.orgOptions = [] + this.orgOptions.push(res.data) + } + }) + .catch(() => { + return this.$message.error('网络错误') + }) }, exportHandle () { const url = this.mixinViewModuleOptions.exportURL @@ -254,20 +300,20 @@ export default { }) return ca }, - handleChangeAgency(val) { + handleChangeAgency (val) { let obj = this.$refs["myCascader"].getCheckedNodes()[0].data if (obj) { - if(obj.level === 'grid'){ - this.dataForm.gridId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''; - this.dataForm.agencyId='' - }else{ + if (obj.level === 'grid') { + this.dataForm.gridId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''; + this.dataForm.agencyId = '' + } else { this.dataForm.agencyId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''; this.dataForm.gridId = '' } - }else{ - this.dataForm.agencyId='' + } else { + this.dataForm.agencyId = '' this.dataForm.gridId = '' } }, @@ -291,72 +337,71 @@ export default { } From 96ac6234a1128898ca1dd0068072b681cafb910d Mon Sep 17 00:00:00 2001 From: jiangyy Date: Sat, 8 Oct 2022 14:48:40 +0800 Subject: [PATCH 3/6] 11 --- src/views/modules/base/epidemic/antiInfo.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/modules/base/epidemic/antiInfo.vue b/src/views/modules/base/epidemic/antiInfo.vue index e6c904eba..34db813b7 100644 --- a/src/views/modules/base/epidemic/antiInfo.vue +++ b/src/views/modules/base/epidemic/antiInfo.vue @@ -556,7 +556,7 @@ export default { return subYear + '-' + nowMonth + '-' + nowDay }, handleCnalceForm () { - this.$refs.detail_form.resetFields() + this.vaccineList = [] this.natList = [] this.tripList = [] From 7144ac4c756bbcacb8d3ea107669be4851e14611 Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Sun, 9 Oct 2022 17:46:40 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/base/organization/organization.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/modules/base/organization/organization.vue b/src/views/modules/base/organization/organization.vue index 7853ade91..54cdf2e95 100644 --- a/src/views/modules/base/organization/organization.vue +++ b/src/views/modules/base/organization/organization.vue @@ -2477,7 +2477,7 @@ export default { const url = "/gov/org/agency/addagency-v2"; let params = { - parentAgencyId: this.parentAgencyId, + parentAgencyId: this.currentAgencyId, agencyName: this.agencyForm.agencyName, level: this.agencyForm.level, areaCodeSwitch: "closed", From 03fa771115fa0d0ed161594f7c2cd9f52f0b757d Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Mon, 10 Oct 2022 16:48:08 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E9=80=9A=E8=AE=AF=E5=BD=95bug=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=20=E5=BF=83=E7=B4=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/organization/organization.vue | 117 ++++++++---------- 1 file changed, 52 insertions(+), 65 deletions(-) diff --git a/src/views/modules/base/organization/organization.vue b/src/views/modules/base/organization/organization.vue index 54cdf2e95..8195c3c4f 100644 --- a/src/views/modules/base/organization/organization.vue +++ b/src/views/modules/base/organization/organization.vue @@ -728,11 +728,20 @@ + @@ -1254,24 +1263,7 @@ export default { roleList: [], // 级联数据 - options: [ - { - value: "", - label: "", - children: [ - { - value: "", - label: "", - children: [], - }, - { - value: "", - label: "", - children: [], - }, - ], - }, - ], + options: [], selectValue: [], // 顶部 面包屑 breadcrumbArr: [], @@ -1358,30 +1350,24 @@ export default { }, methods: { // 点击后获取id - handleChange(e) { - this.transferForm.orgId = e[1]; - if (this.transferForm.orgId != null || "") { - if (this.transferForm.orgId === 0) { - if (e[2] == null || "") { - this.transferForm.orgType = "dept"; - this.transferForm.orgId = "14f572e724eecf7668b655505d789cab"; - } else { - this.transferForm.orgId = e[2]; - this.transferForm.orgType = "dept"; - } + handleChangeTransferCascader(e) { + console.log("*********************"); + function findItem(valueArr, coll) { + console.log("--------------------"); + console.log(valueArr); + let copyArr = [...valueArr]; + let firstValue = copyArr.shift(); + let item = coll.find((a) => a.value == firstValue); + console.log(item); + if (copyArr.length > 0) { + return findItem(copyArr, item.children); } else { - if (e[2] == null || "") { - this.transferForm.orgType = "grid"; - this.transferForm.orgId = "63d5ff92ea981b1c58e4914ac894c610"; - } else { - this.transferForm.orgId = e[2]; - this.transferForm.orgType = "grid"; - } + return item; } - } else { - this.transferForm.orgId = e[0]; - this.transferForm.orgType = "agency"; } + let item = findItem(e, this.options); + this.transferForm.orgId = item.value; + this.transferForm.orgType = item.type; }, /** 查询系统工作人员角色(职责) */ async getDutyList() { @@ -2166,31 +2152,32 @@ export default { const { data, code, msg } = await requestPost(url, params); if (code === 0) { - this.options[0].label = data.agencyName; - this.options[0].value = data.agencyId; - - console.log("--------", this.options); - let depart = Array.from(data.departmentList); - let gr = Array.from(data.gridList); - - depart.forEach((item) => { - const ob = { - value: item.deptId, - label: item.deptName, - }; - this.options[0].children[0].children.push(ob); - }); - this.options[0].children[0].value = 0; - this.options[0].children[0].label = "部门"; - this.options[0].children[1].value = 1; - this.options[0].children[1].label = "网格"; - gr.forEach((item) => { - const obj = { - value: item.gridId, - label: item.gridName, + function computeOption(opt) { + return { + label: opt.agencyName, + value: opt.agencyId, + type: "agency", + children: [ + ...(opt.departmentList || []).map((item) => ({ + label: item.deptName, + value: item.deptId, + type: "dept", + typeName: "部门", + })), + ...(opt.gridList || []).map((item) => ({ + label: item.gridName, + value: item.gridId, + type: "grid", + typeName: "网格", + })), + ...(opt.subAgencyList || []).map((item) => computeOption(item)), + ], }; - this.options[0].children[1].children.push(obj); - }); + } + if (data) { + this.options = [computeOption(data)]; + console.log("树树树树树树树树树树", this.options[0]); + } } else { this.$message.error("树查询失败", msg); } From 8ff19694ab70536ad1e514b052ac9d75304e27d5 Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Mon, 10 Oct 2022 17:35:59 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E5=86=8D=E5=8F=91=E5=86=8D=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/base/organization/organization.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/modules/base/organization/organization.vue b/src/views/modules/base/organization/organization.vue index 8195c3c4f..8833356ca 100644 --- a/src/views/modules/base/organization/organization.vue +++ b/src/views/modules/base/organization/organization.vue @@ -728,7 +728,7 @@