预警
This commit is contained in:
		| @@ -16,10 +16,10 @@ | ||||
|             </el-form-item> | ||||
|             <el-form-item label="风险类型" prop="idNumber" :rules="[{ required: true, message: '请选择风险类型', trigger: 'blur' }]"> | ||||
|               <ai-select | ||||
|                 v-model="form.checkResult" | ||||
|                 v-model="form.riskType" | ||||
|                 clearable | ||||
|                 placeholder="请选择风险类型" | ||||
|                 :selectList="dict.getDict('epidemicRecentTestResult')"> | ||||
|                 :selectList="dict.getDict('fpRiskType')"> | ||||
|               </ai-select> | ||||
|             </el-form-item> | ||||
|             <el-form-item label="身份证号" prop="idNumber" :rules="[{ required: true, validator: validatorId, trigger: 'blur' }]"> | ||||
| @@ -29,17 +29,16 @@ | ||||
|               <ai-area-select | ||||
|                 v-model="form.areaId" | ||||
|                 always-show | ||||
|                 :disabled="form.applyType === '1'" | ||||
|                 :instance="$http" | ||||
|                 :instance="instance" | ||||
|                 clearable | ||||
|                 @fullname="v=>form.areaName = v" | ||||
|                 :disabledLevel="3"/> | ||||
|                 :disabledLevel="disabledLevel"/> | ||||
|             </el-form-item> | ||||
|             <el-form-item label="联系地址" prop="idNumber" style="width: 100%;"> | ||||
|               <el-input v-model="form.idNumber" :maxlength="30" size="small" placeholder="请输入联系地址"></el-input> | ||||
|             <el-form-item label="联系地址" prop="address" style="width: 100%;"> | ||||
|               <el-input v-model="form.address" :maxlength="30" size="small" placeholder="请输入联系地址"></el-input> | ||||
|             </el-form-item> | ||||
|             <el-form-item label="备注说明" prop="idNumber" style="width: 100%;"> | ||||
|               <el-input v-model="form.idNumber" :rows="5" style="width: 100%;" type="textarea" :maxlength="500" size="small" placeholder="请输入..."></el-input> | ||||
|             <el-form-item label="备注说明" prop="remarks" style="width: 100%;"> | ||||
|               <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> | ||||
|         </template> | ||||
| @@ -53,6 +52,7 @@ | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
|   import { mapState } from 'vuex' | ||||
|   export default { | ||||
|     name: 'Add', | ||||
|  | ||||
| @@ -87,16 +87,28 @@ | ||||
|         validatorId, | ||||
|         validatorPhone, | ||||
|         form: { | ||||
|           title: '', | ||||
|           content: '', | ||||
|           publishUnitName: '', | ||||
|           images: [] | ||||
|           name: '', | ||||
|           idNumber: '', | ||||
|           address: '', | ||||
|           areaId: '', | ||||
|           areaName: '', | ||||
|           remarks: '', | ||||
|           phone: '', | ||||
|           riskType: '' | ||||
|         }, | ||||
|         id: '' | ||||
|         id: '', | ||||
|         disabledLevel: 3 | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     computed: { | ||||
|       ...mapState(['user']) | ||||
|     }, | ||||
|  | ||||
|     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) { | ||||
|         this.id = this.params.id | ||||
|         this.getInfo(this.params.id) | ||||
| @@ -105,7 +117,7 @@ | ||||
|  | ||||
|     methods: { | ||||
|       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) { | ||||
|             this.form = { | ||||
|               ...res.data, | ||||
| @@ -122,13 +134,8 @@ | ||||
|       confirm () { | ||||
|         this.$refs.form.validate((valid) => { | ||||
|           if (valid) { | ||||
|             if (!this.form.content && !this.form.images.length) { | ||||
|               return this.$message.error('请输入正文或上传图片') | ||||
|             } | ||||
|  | ||||
|             this.instance.post(`/app/appmininotice/addOrUpdate`, { | ||||
|               ...this.form, | ||||
|               images: this.form.images ? JSON.stringify(this.form.images) : [] | ||||
|             this.instance.post(`/app/apppreventionreturntopovertyriskperson/addOrUpdate`, { | ||||
|               ...this.form | ||||
|             }).then(res => { | ||||
|               if (res.code == 0) { | ||||
|                 this.$message.success('提交成功') | ||||
|   | ||||
		Reference in New Issue
	
	Block a user