123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214 |
- <template>
- <a-spin :spinning="confirmLoading">
- <j-form-container :disabled="formDisabled">
- <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
- <a-row>
- <a-col :span="24">
- <a-form-model-item label="提交人账号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phone">
- <a-input v-model="model.phone" placeholder="请输入提交人账号" ></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :span="24">
- <a-form-model-item label="提交人姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="submitterName">
- <a-input v-model="model.submitterName"></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :span="24">
- <a-form-model-item label="分类名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="uploadingName">
- <a-input v-model="model.uploadingName" placeholder="请输入分类名称" ></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :span="24">
- <a-form-model-item label="审核人账号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="auditor">
- <a-input v-model="model.auditor" placeholder="请输入审核人账号" ></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :span="24">
- <a-form-model-item label="审核时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="auditorTime">
- <j-date placeholder="请选择审核时间" v-model="model.auditorTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
- </a-form-model-item>
- </a-col>
- <a-col :span="24">
- <a-form-model-item label="审核备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="picWordRecognition">
- <a-textarea v-model="model.remark" rows="4" placeholder="" />
- </a-form-model-item>
- </a-col>
- <a-col :span="24">
- <a-form-model-item label="标题" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="title">
- <a-input v-model="model.title" placeholder="请输入标题" ></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :span="24">
- <a-form-model-item label="姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
- <a-input v-model="model.name" placeholder="请输入姓名" ></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :span="24">
- <a-form-model-item label="省份" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="province">
- <a-input v-model="model.province" placeholder="请输入省份" ></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :span="24">
- <a-form-model-item label="城市" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="city">
- <a-input v-model="model.city" placeholder="请输入城市" ></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :span="24">
- <a-form-model-item label="医院" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hospital">
- <a-input v-model="model.hospital" placeholder="请输入医院" ></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :span="24">
- <a-form-model-item label="病例类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="caseName">
- <a-input v-model="model.caseName" placeholder="请输入病例类型" ></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :span="24">
- <a-form-model-item label="拍照图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pic">
- <j-image-upload isMultiple v-model="model.pic" ></j-image-upload>
- </a-form-model-item>
- </a-col>
- <a-col :span="24">
- <a-form-model-item label="打码前图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="picTwo">
- <j-image-upload isMultiple v-model="model.picTwo" ></j-image-upload>
- </a-form-model-item>
- </a-col>
- <a-col :span="24">
- <a-form-model-item label="图片识别文字" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="picWordRecognition">
- <a-textarea v-model="model.picWordRecognition" rows="4" placeholder="请输入图片识别文字" />
- </a-form-model-item>
- </a-col>
- <a-col :span="24">
- <a-form-model-item label="文件" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mhFile">
- <j-upload v-model="model.mhFile" ></j-upload>
- </a-form-model-item>
- </a-col>
- <a-col :span="24">
- <a-form-model-item label="是否通过初审" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="firstTrial">
- <j-dict-select-tag type="list" v-model="model.firstTrial" dictCode="sftgcs" placeholder="" />
- </a-form-model-item>
- </a-col>
- <!-- <a-col :span="24">-->
- <!-- <a-form-model-item label="是否二次上传 1没上传 2上传了" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="secondaryUpload">-->
- <!-- <j-dict-select-tag type="list" v-model="model.secondaryUpload" dictCode="" placeholder="请选择是否二次上传 1没上传 2上传了" />-->
- <!-- </a-form-model-item>-->
- <!-- </a-col>-->
- <!-- <a-col :span="24">-->
- <!-- <a-form-model-item label="专家是否通过 0未审理 1没通过 2通过了" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type">-->
- <!-- <j-dict-select-tag type="list" v-model="model.type" dictCode="" placeholder="请选择专家是否通过 0未审理 1没通过 2通过了" />-->
- <!-- </a-form-model-item>-->
- <!-- </a-col>-->
- <!-- <a-col :span="24">-->
- <!-- <a-form-model-item label="创建人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="createBy">-->
- <!-- <a-input v-model="model.createBy" placeholder="请输入创建人" ></a-input>-->
- <!-- </a-form-model-item>-->
- <!-- </a-col>-->
- <a-col :span="24">
- <a-form-model-item label="创建时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="createTime">
- <j-date placeholder="请选择创建时间" v-model="model.createTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
- </a-form-model-item>
- </a-col>
- <!-- <a-col :span="24">-->
- <!-- <a-form-model-item label="更新人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="updateBy">-->
- <!-- <a-input v-model="model.updateBy" placeholder="请输入更新人" ></a-input>-->
- <!-- </a-form-model-item>-->
- <!-- </a-col>-->
- <!-- <a-col :span="24">-->
- <!-- <a-form-model-item label="更新时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="updateTime">-->
- <!-- <j-date placeholder="请选择更新时间" v-model="model.updateTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />-->
- <!-- </a-form-model-item>-->
- <!-- </a-col>-->
- </a-row>
- </a-form-model>
- </j-form-container>
- </a-spin>
- </template>
- <script>
- import { httpAction, getAction } from '@/api/manage'
- import { validateDuplicateValue } from '@/utils/util'
- export default {
- name: 'AdminMedicalHistoryForm',
- components: {
- },
- props: {
- //表单禁用
- disabled: {
- type: Boolean,
- default: false,
- required: false
- }
- },
- data () {
- return {
- model:{
- },
- labelCol: {
- xs: { span: 24 },
- sm: { span: 5 },
- },
- wrapperCol: {
- xs: { span: 24 },
- sm: { span: 16 },
- },
- confirmLoading: false,
- validatorRules: {
- },
- url: {
- add: "/admincasehistory/adminMedicalHistory/add",
- edit: "/admincasehistory/adminMedicalHistory/edit",
- queryById: "/admincasehistory/adminMedicalHistory/queryById"
- }
- }
- },
- computed: {
- formDisabled(){
- return this.disabled
- },
- },
- created () {
- //备份model原始值
- this.modelDefault = JSON.parse(JSON.stringify(this.model));
- },
- methods: {
- add () {
- this.edit(this.modelDefault);
- },
- edit (record) {
- this.model = Object.assign({}, record);
- this.visible = true;
- },
- submitForm () {
- const that = this;
- // 触发表单验证
- this.$refs.form.validate(valid => {
- if (valid) {
- that.confirmLoading = true;
- let httpurl = '';
- let method = '';
- if(!this.model.id){
- httpurl+=this.url.add;
- method = 'post';
- }else{
- httpurl+=this.url.edit;
- method = 'put';
- }
- httpAction(httpurl,this.model,method).then((res)=>{
- if(res.success){
- that.$message.success(res.message);
- that.$emit('ok');
- }else{
- that.$message.warning(res.message);
- }
- }).finally(() => {
- that.confirmLoading = false;
- })
- }
- })
- },
- }
- }
- </script>
|