diff --git a/src/views/modules/communityService/policy/addPolicy.vue b/src/views/modules/communityService/policy/addPolicy.vue index d44de3c73..4d6f5f555 100644 --- a/src/views/modules/communityService/policy/addPolicy.vue +++ b/src/views/modules/communityService/policy/addPolicy.vue @@ -95,7 +95,8 @@ label-width="150px" style="display: block"> + :formType="formType" + :index="index">
@@ -126,6 +127,7 @@ accept=".doc,.pdf,.xls,.docx,.xlsx,.jpg,.png,.jpeg,.bmp,.mp4,.wma,.m4a,.mp3" :on-success="handleFileSuccess" :on-remove="handleFileRemove" + :on-preview="handleFileDownload" :limit="3" :before-upload="beforeUpload" :file-list="fileList"> @@ -372,14 +374,14 @@ export default { async handleAdd () { let isOk = false - this.ruleList.forEach((oneRule, index) => { - // if (!oneRule.ruleName) { - // this.$message.error('政策细则不能为空') - // isOk = false - // } + + for (let index = 0; index < this.ruleList.length; index++) { + let oneRule = this.ruleList[index] + let refObj = this.$refs['ref_rule' + index][0] refObj.getRule(true, true, true) + if (refObj.okflag) { oneRule.resiRuleList = refObj.resiRuleList oneRule.resiRuleList.forEach(element => { @@ -434,11 +436,11 @@ export default { } else { isOk = false - - } - }); + break + } + } if (!isOk) { return false @@ -487,7 +489,7 @@ export default { const { data, code, msg } = await requestPost(url, params) if (code === 0) { - this.$message.success('新增成功') + this.$message.success('操作成功') this.resetData() this.$emit('handleOk') } else { @@ -593,7 +595,18 @@ export default { this.$emit('handleClose') }, + //下载 + handleFileDownload (file) { + var a = document.createElement('a'); + var event = new MouseEvent('click'); + a.download = file.name; + console.log(a) + a.href = file.url; + a.dispatchEvent(event); + + + }, resetData () { this.ruleList = [] diff --git a/src/views/modules/communityService/policy/personListItem.vue b/src/views/modules/communityService/policy/personListItem.vue index d40cc82a7..f12469356 100644 --- a/src/views/modules/communityService/policy/personListItem.vue +++ b/src/views/modules/communityService/policy/personListItem.vue @@ -11,6 +11,7 @@ prop="orgId"> + width="200">