Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
		| @@ -13,7 +13,7 @@ | |||||||
|  |  | ||||||
|   export default { |   export default { | ||||||
|     name: 'AppRiskWarning', |     name: 'AppRiskWarning', | ||||||
|     label: '风险预警', |     label: '风险告知', | ||||||
|  |  | ||||||
|     props: { |     props: { | ||||||
|       instance: Function, |       instance: Function, | ||||||
|   | |||||||
| @@ -16,10 +16,10 @@ | |||||||
|             </el-form-item> |             </el-form-item> | ||||||
|             <el-form-item label="风险类型" prop="idNumber" :rules="[{ required: true, message: '请选择风险类型', trigger: 'blur' }]"> |             <el-form-item label="风险类型" prop="idNumber" :rules="[{ required: true, message: '请选择风险类型', trigger: 'blur' }]"> | ||||||
|               <ai-select |               <ai-select | ||||||
|                 v-model="form.checkResult" |                 v-model="form.riskType" | ||||||
|                 clearable |                 clearable | ||||||
|                 placeholder="请选择风险类型" |                 placeholder="请选择风险类型" | ||||||
|                 :selectList="dict.getDict('epidemicRecentTestResult')"> |                 :selectList="dict.getDict('fpRiskType')"> | ||||||
|               </ai-select> |               </ai-select> | ||||||
|             </el-form-item> |             </el-form-item> | ||||||
|             <el-form-item label="身份证号" prop="idNumber" :rules="[{ required: true, validator: validatorId, trigger: 'blur' }]"> |             <el-form-item label="身份证号" prop="idNumber" :rules="[{ required: true, validator: validatorId, trigger: 'blur' }]"> | ||||||
| @@ -29,17 +29,16 @@ | |||||||
|               <ai-area-select |               <ai-area-select | ||||||
|                 v-model="form.areaId" |                 v-model="form.areaId" | ||||||
|                 always-show |                 always-show | ||||||
|                 :disabled="form.applyType === '1'" |                 :instance="instance" | ||||||
|                 :instance="$http" |  | ||||||
|                 clearable |                 clearable | ||||||
|                 @fullname="v=>form.areaName = v" |                 @fullname="v=>form.areaName = v" | ||||||
|                 :disabledLevel="3"/> |                 :disabledLevel="disabledLevel"/> | ||||||
|             </el-form-item> |             </el-form-item> | ||||||
|             <el-form-item label="联系地址" prop="idNumber" style="width: 100%;"> |             <el-form-item label="联系地址" prop="address" style="width: 100%;"> | ||||||
|               <el-input v-model="form.idNumber" :maxlength="30" size="small" placeholder="请输入联系地址"></el-input> |               <el-input v-model="form.address" :maxlength="30" size="small" placeholder="请输入联系地址"></el-input> | ||||||
|             </el-form-item> |             </el-form-item> | ||||||
|             <el-form-item label="备注说明" prop="idNumber" style="width: 100%;"> |             <el-form-item label="备注说明" prop="remarks" style="width: 100%;"> | ||||||
|               <el-input v-model="form.idNumber" :rows="5" style="width: 100%;" type="textarea" :maxlength="500" size="small" placeholder="请输入..."></el-input> |               <el-input v-model="form.remarks" :rows="5" style="width: 100%;" type="textarea" :maxlength="500" size="small" placeholder="请输入..."></el-input> | ||||||
|             </el-form-item> |             </el-form-item> | ||||||
|           </el-form> |           </el-form> | ||||||
|         </template> |         </template> | ||||||
| @@ -53,6 +52,7 @@ | |||||||
| </template> | </template> | ||||||
|  |  | ||||||
| <script> | <script> | ||||||
|  |   import { mapState } from 'vuex' | ||||||
|   export default { |   export default { | ||||||
|     name: 'Add', |     name: 'Add', | ||||||
|  |  | ||||||
| @@ -87,16 +87,28 @@ | |||||||
|         validatorId, |         validatorId, | ||||||
|         validatorPhone, |         validatorPhone, | ||||||
|         form: { |         form: { | ||||||
|           title: '', |           name: '', | ||||||
|           content: '', |           idNumber: '', | ||||||
|           publishUnitName: '', |           address: '', | ||||||
|           images: [] |           areaId: '', | ||||||
|  |           areaName: '', | ||||||
|  |           remarks: '', | ||||||
|  |           phone: '', | ||||||
|  |           riskType: '' | ||||||
|         }, |         }, | ||||||
|         id: '' |         id: '', | ||||||
|  |         disabledLevel: 3 | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|  |  | ||||||
|  |     computed: { | ||||||
|  |       ...mapState(['user']) | ||||||
|  |     }, | ||||||
|  |  | ||||||
|     created () { |     created () { | ||||||
|  |       this.form.areaName = this.user.info.areaName | ||||||
|  |       this.form.areaId = this.user.info.areaId | ||||||
|  |       this.disabledLevel = this.user.info.areaList.length | ||||||
|       if (this.params && this.params.id) { |       if (this.params && this.params.id) { | ||||||
|         this.id = this.params.id |         this.id = this.params.id | ||||||
|         this.getInfo(this.params.id) |         this.getInfo(this.params.id) | ||||||
| @@ -105,7 +117,7 @@ | |||||||
|  |  | ||||||
|     methods: { |     methods: { | ||||||
|       getInfo (id) { |       getInfo (id) { | ||||||
|         this.instance.post(`/app/appmininotice/queryDetailById?id=${id}`).then(res => { |         this.instance.post(`/app/apppreventionreturntopovertyriskperson/queryDetailById?id=${id}`).then(res => { | ||||||
|           if (res.code === 0) { |           if (res.code === 0) { | ||||||
|             this.form = { |             this.form = { | ||||||
|               ...res.data, |               ...res.data, | ||||||
| @@ -122,13 +134,8 @@ | |||||||
|       confirm () { |       confirm () { | ||||||
|         this.$refs.form.validate((valid) => { |         this.$refs.form.validate((valid) => { | ||||||
|           if (valid) { |           if (valid) { | ||||||
|             if (!this.form.content && !this.form.images.length) { |             this.instance.post(`/app/apppreventionreturntopovertyriskperson/addOrUpdate`, { | ||||||
|               return this.$message.error('请输入正文或上传图片') |               ...this.form | ||||||
|             } |  | ||||||
|  |  | ||||||
|             this.instance.post(`/app/appmininotice/addOrUpdate`, { |  | ||||||
|               ...this.form, |  | ||||||
|               images: this.form.images ? JSON.stringify(this.form.images) : [] |  | ||||||
|             }).then(res => { |             }).then(res => { | ||||||
|               if (res.code == 0) { |               if (res.code == 0) { | ||||||
|                 this.$message.success('提交成功') |                 this.$message.success('提交成功') | ||||||
|   | |||||||
| @@ -1,19 +1,19 @@ | |||||||
| <template> | <template> | ||||||
|   <ai-list class="notice"> |   <ai-list class="notice"> | ||||||
|     <template slot="title"> |     <template slot="title"> | ||||||
|       <ai-title title="风险预警" isShowBottomBorder></ai-title> |       <ai-title title="风险告知" isShowBottomBorder></ai-title> | ||||||
|     </template> |     </template> | ||||||
|     <template slot="content"> |     <template slot="content"> | ||||||
|       <ai-search-bar bottomBorder> |       <ai-search-bar bottomBorder> | ||||||
|         <template #left> |         <template #left> | ||||||
|           <ai-select |           <ai-select | ||||||
|             v-model="search.checkResult" |             v-model="search.riskType" | ||||||
|             clearable |             clearable | ||||||
|             placeholder="请选择风险类型" |             placeholder="请选择风险类型" | ||||||
|             :selectList="dict.getDict('epidemicRecentTestResult')" |             :selectList="dict.getDict('fpRiskType')" | ||||||
|             @change="search.current = 1, getList()"> |             @change="search.current = 1, getList()"> | ||||||
|           </ai-select> |           </ai-select> | ||||||
|           <el-button icon="iconfont iconAdd" type="primary" size="small" @click="toAdd">添加 </el-button> |           <el-button icon="iconfont iconAdd" type="primary" size="small" @click="toAdd('')">添加 </el-button> | ||||||
|         </template> |         </template> | ||||||
|         <template #right> |         <template #right> | ||||||
|           <el-input |           <el-input | ||||||
| @@ -32,10 +32,10 @@ | |||||||
|           <el-button icon="iconfont iconDelete" size="small" @click="removeAll" :disabled="ids.length == 0">删除 </el-button> |           <el-button icon="iconfont iconDelete" size="small" @click="removeAll" :disabled="ids.length == 0">删除 </el-button> | ||||||
|         </template> |         </template> | ||||||
|         <template #right> |         <template #right> | ||||||
|           <ai-download :instance="instance" url="/app/appepidemicreportmember/export" :params="search" fileName="健康上报" :disabled="tableData.length == 0"> |           <ai-download :instance="instance" url="/app/apppreventionreturntopovertyriskperson/export" :params="search" fileName="风险预警人员" :disabled="tableData.length == 0"> | ||||||
|             <el-button icon="iconfont iconExported" :disabled="tableData.length == 0">导出</el-button> |             <el-button icon="iconfont iconExported" :disabled="tableData.length == 0">导出</el-button> | ||||||
|           </ai-download> |           </ai-download> | ||||||
|           <ai-import :instance="instance" :dict="dict" type="appcommunitybuildinginfo" :importParams="search" name="风险预警" @success="getList()"> |           <ai-import :instance="instance" :dict="dict" type="apppreventionreturntopovertyriskperson" :importParams="search" name="风险预警人员" @success="getList()"> | ||||||
|             <el-button icon="iconfont iconImport">导入</el-button> |             <el-button icon="iconfont iconImport">导入</el-button> | ||||||
|           </ai-import> |           </ai-import> | ||||||
|         </template> |         </template> | ||||||
| @@ -82,19 +82,20 @@ | |||||||
|         search: { |         search: { | ||||||
|           current: 1, |           current: 1, | ||||||
|           size: 10, |           size: 10, | ||||||
|           title: '' |           title: '', | ||||||
|  |           riskType: '' | ||||||
|         }, |         }, | ||||||
|         ids: [], |         ids: [], | ||||||
|         total: 10, |         total: 10, | ||||||
|         colConfigs: [ |         colConfigs: [ | ||||||
|           { type: 'selection' }, |           { type: 'selection' }, | ||||||
|           {prop: 'title', label: '姓名', align: 'left'}, |           {prop: 'name', label: '姓名', align: 'left'}, | ||||||
|           {prop: 'createUserName', label: '联系方式', align: 'center' }, |           {prop: 'phone', label: '联系方式', align: 'center' }, | ||||||
|           {prop: 'publishUnitName', label: '风险类型', align: 'center'}, |           {prop: 'riskType', label: '风险类型', align: 'center', formart: v => this.dict.getLabel('fpRiskType', v) }, | ||||||
|           {prop: 'createTime', label: '所属区域', align: 'center' }, |           {prop: 'areaName', label: '所属区域', align: 'center' }, | ||||||
|           {prop: 'createUserName', label: '备注说明', align: 'center' }, |           {prop: 'remarks', label: '备注说明', align: 'center' }, | ||||||
|           {prop: 'publishUnitName', label: '操作时间', align: 'center'}, |           {prop: 'createTime', label: '操作时间', align: 'center'}, | ||||||
|           {prop: 'createTime', label: '操作人', align: 'center' }, |           {prop: 'visitUserName', label: '操作人', align: 'center' }, | ||||||
|           {prop: 'createTime', label: '归口部门', align: 'center' }, |           {prop: 'createTime', label: '归口部门', align: 'center' }, | ||||||
|           {slot: 'options', label: '操作'} |           {slot: 'options', label: '操作'} | ||||||
|         ], |         ], | ||||||
| @@ -107,14 +108,14 @@ | |||||||
|     }, |     }, | ||||||
|  |  | ||||||
|     created () { |     created () { | ||||||
|       this.dict.load('epidemicRecentTestResult').then(() => { |       this.dict.load('fpRiskType').then(() => { | ||||||
|         this.getList() |         this.getList() | ||||||
|       }) |       }) | ||||||
|     }, |     }, | ||||||
|  |  | ||||||
|     methods: { |     methods: { | ||||||
|       getList() { |       getList() { | ||||||
|         this.instance.post(`/app/appmininotice/list`, null, { |         this.instance.post(`/app/apppreventionreturntopovertyriskperson/list`, null, { | ||||||
|           params: { |           params: { | ||||||
|             ...this.search |             ...this.search | ||||||
|           } |           } | ||||||
| @@ -133,7 +134,7 @@ | |||||||
|  |  | ||||||
|       remove(id) { |       remove(id) { | ||||||
|         this.$confirm('确定删除该数据?').then(() => { |         this.$confirm('确定删除该数据?').then(() => { | ||||||
|           this.instance.post(`/app/appmininotice/delete?ids=${id}`).then(res => { |           this.instance.post(`/app/apppreventionreturntopovertyriskperson/delete?ids=${id}`).then(res => { | ||||||
|             if (res.code == 0) { |             if (res.code == 0) { | ||||||
|               this.$message.success('删除成功!') |               this.$message.success('删除成功!') | ||||||
|               this.getList() |               this.getList() | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user