haodingding 1 рік тому
батько
коміт
2f25f213e2

BIN
src/assets/images/login-background.png


+ 1 - 1
src/views/login.vue

@@ -161,7 +161,7 @@ export default {
   justify-content: center;
   align-items: center;
   height: 100%;
-  background-image: url("../assets/images/login-background.jpg");
+  background-image: url("../assets/images/login-background.png");
   background-size: cover;
 }
 .title {

+ 36 - 10
src/views/system/device/index.vue

@@ -69,7 +69,7 @@
       <el-table-column label="SIM卡号" align="center" prop="simCode" />
       <el-table-column label="用户姓名" align="center" prop="name" />
       <el-table-column label="身份证号码" align="center" prop="sfzid" />
-      <el-table-column label="手机号" align="center" prop="telno" />
+      <el-table-column label="手机号" align="center" prop="tel_one" />
       <el-table-column label="发放方式" align="center" prop="granttype" />
       <el-table-column label="在线状态" align="center" prop="online" />
       <el-table-column label="设备电量" align="center" prop="electric_quantity" />
@@ -106,9 +106,10 @@
     <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="100px">
         <el-form-item label="设备属性">
-          <el-radio-group v-model="form.deviceProper">
+          <!-- <el-radio-group v-model="form.deviceProper">
             <el-radio v-for="i in deviceAttribute" :key="i.dictValue" :label="i.dictValue">{{ i.dictLabel }}</el-radio>
-          </el-radio-group>
+          </el-radio-group> -->
+          <el-radio v-model="deviceProp" label="1">个人</el-radio>
         </el-form-item>
         <el-form-item label="用户姓名" prop="name" class="inp">
           <el-input v-model="form.name" placeholder="请选择" disabled class="setting-inp">
@@ -165,7 +166,7 @@
           </el-col>
           <el-col :span="12">
             <el-form-item label="发放方式" prop="grantType">
-              <el-radio-group :value="form.grantType">
+              <el-radio-group v-model="form.grantType">
                 <el-radio v-for="i in grantType" :key="i.dictValue" :label="i.dictValue">{{ i.dictLabel }}</el-radio>
               </el-radio-group>
             </el-form-item>
@@ -224,11 +225,11 @@
           </el-col>
         </el-row>
         <el-row>
-          <el-col :span="12">
+          <!-- <el-col :span="12">
             <el-form-item label="家庭住址" prop="telOne">
               <el-input v-model="userForm.familyAddress" style="width: 500px;"></el-input>
             </el-form-item>
-          </el-col>
+          </el-col> -->
           <el-col :span="12">
             <el-form-item>
               <el-button type="primary" icon="el-icon-search" size="mini" @click="searchUser">搜索</el-button>
@@ -240,7 +241,7 @@
       <el-table :data="userList" v-loading="loading" @selection-change="checkUser">
         <el-table-column type="selection" width="55" align="center" />
         <el-table-column label="姓名" align="center" prop="name" />
-        <el-table-column label="性别" align="center" prop="gender" />
+        <el-table-column label="性别" align="center" prop="sex" />
         <el-table-column label="年龄" align="center" prop="age" />
         <el-table-column label="手机号" align="center" prop="telOne" />
         <el-table-column label="身份证号" align="center" prop="sfzid" />
@@ -679,6 +680,7 @@ export default {
   name: "Device",
   data() {
     return {
+      deviceProp: '1',
       openToUpload: false,
       headers: {
         Authorization: "Bearer " + getToken(),
@@ -728,6 +730,15 @@ export default {
       form: {},
       // 表单校验
       rules: {
+        factory: [
+          {required: true, message: '请选择厂商', trigger: 'change'}
+        ],
+        deviceModel: [
+          {required: true, message: '请选择设备型号', trigger: 'change'}
+        ],
+        grantType: [
+          {required: true, message: '请选择发放方式', trigger: 'change'}
+        ]
       },
       menuInfo: [],
       settingPage: 'sos',
@@ -846,6 +857,9 @@ export default {
       this.deviceAttribute = res.data
     })
     this.getDicts('sys_factory').then(res => {
+      res.data.map(item => {
+        item.dictValue = Number(item.dictValue)
+      })
       this.factoryList = res.data
     })
     this.getDicts('sys_payment').then(res => {
@@ -1785,6 +1799,9 @@ export default {
     getUserList() {
       this.loading = true;
       listProfile(this.userForm).then(response => {
+        response.rows.map(item => {
+          item.sex = item.gender == 0 ? '男':item.gender == 1?'女': ''
+        })
         this.userList = response.rows;
         this.userTotal = response.total;
         this.loading = false;
@@ -1913,8 +1930,14 @@ export default {
     async getList() {
       this.loading = true;
       let { data: grantType } = await this.getDicts('sys_grant_type')
+      grantType.map(item => {
+        item.dictValue = Number(item.dictValue)
+      })
       this.grantType = grantType
       let { data: deviceModel } = await this.getDicts('sys_device_type')
+      deviceModel.map(item => {
+        item.dictValue = Number(item.dictValue)
+      })
       this.deviceModel = deviceModel
       let { data: fenceType } = await this.getDicts('sys_fence_type')
       this.fenceType = fenceType
@@ -1980,7 +2003,7 @@ export default {
     handleAdd() {
       this.reset();
       this.open = true;
-      this.title = "添加设备";
+      this.title = "添加设备";
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
@@ -1988,13 +2011,14 @@ export default {
       const id = row.id || this.ids
       getDevice(id).then(response => {
         this.form = response.data;
+        console.log(this.form);
         this.deviceList.map(item => {
           if (item.id == id) {
             this.form.name = item.name
           }
         })
         this.open = true;
-        this.title = "修改设备";
+        this.title = "修改设备";
       });
     },
     /** 提交按钮 */
@@ -2008,7 +2032,9 @@ export default {
               this.getList();
             });
           } else {
-            console.log('form', this.form);
+            if (!this.form.name) {
+              this.$modal.msgError('请选择用户')
+            }
             addDevice(this.form).then(response => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;

+ 52 - 35
src/views/system/manage/index.vue

@@ -10,8 +10,8 @@
           </el-option>
         </el-select>
       </el-form-item>
-      <el-form-item label="联系方式" prop="telno">
-        <el-input v-model="queryParams.telno" placeholder="请输入联系方式" clearable @keyup.enter.native="handleQuery" />
+      <el-form-item label="联系方式" prop="leaderTel" :rules="[{ max: 11, message: '最多11位', trigger: 'blur' }]">
+        <el-input v-model="queryParams.leaderTel" placeholder="请输入联系方式" clearable @keyup.enter.native="handleQuery" />
       </el-form-item>
       <el-form-item label="状态" prop="status">
         <el-select v-model="queryParams.status" placeholder="请选择状态">
@@ -53,15 +53,15 @@
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="序号" align="center" prop="id" width="50" />
       <el-table-column label="机构名称" align="center" prop="storeName" />
-      <el-table-column label="机构性质" align="center" prop="storeNature" />
+      <el-table-column label="机构性质" align="center" prop="store_nature" />
       <el-table-column label="社会统一信用代码" align="center" prop="creditCode" />
-      <el-table-column label="是否自营" align="center" prop="isOne" />
+      <el-table-column label="是否自营" align="center" prop="is_one" />
       <el-table-column label="负责人" align="center" prop="leader" />
       <el-table-column label="联系电话" align="center" prop="leaderTel" />
       <el-table-column label="服务区域" align="center" prop="serviceRegion" />
       <el-table-column label="发布范围" align="center" prop="service" width="150" />
       <el-table-column label="创建部门" align="center" prop="createDepartment" />
-      <el-table-column label="状态" align="center" prop="status" />
+      <el-table-column label="状态" align="center" prop="states" />
       <el-table-column label="创建时间" align="center" prop="createTime" width="100">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
@@ -120,7 +120,7 @@
           </el-col>
           <el-col :span="12">
             <el-form-item label="联系方式" prop="leaderTel">
-              <el-input v-model="form.leaderTel" placeholder="请输入联系方式" />
+              <el-input v-model="form.leaderTel" type="number" placeholder="请输入联系方式" maxlength="11" />
             </el-form-item>
           </el-col>
         </el-row>
@@ -135,8 +135,11 @@
           </el-col>
           <el-col :span="12">
             <el-form-item label="经营时间" prop="date">
-              <el-date-picker v-model="form.date" type="daterange" range-separator="至" start-placeholder="开始日期"
-                end-placeholder="结束日期" value-format="yyyy-MM-dd"></el-date-picker>
+              <!-- <el-date-picker v-model="form.date" type="daterange" range-separator="至" start-placeholder="开始日期"
+                end-placeholder="结束日期" value-format="yyyy-MM-dd"></el-date-picker> -->
+              <el-time-picker is-range v-model="form.date" range-separator="至" start-placeholder="开始时间"
+                end-placeholder="结束时间" value-format="HH:mm">
+              </el-time-picker>
             </el-form-item>
           </el-col>
         </el-row>
@@ -191,8 +194,9 @@
         <el-row>
           <el-col :span="12">
             <el-form-item label="发布范围" prop="releaseScope">
-              <el-checkbox-group v-model="checked" @change="checkeInfo">
-                <el-checkbox v-for="item in scopeRelease" :key="item.dictValue" :label="item.dictValue">{{item.dictLabel}}</el-checkbox>
+              <el-checkbox-group v-model="form.checked" @change="checkeInfo">
+                <el-checkbox v-for="item in scopeRelease" :key="item.dictValue"
+                  :label="item.dictValue">{{ item.dictLabel }}</el-checkbox>
               </el-checkbox-group>
             </el-form-item>
           </el-col>
@@ -305,12 +309,12 @@
         <el-row>
           <el-col :span="12">
             <el-form-item label="*周末服务" prop="weekendStatus">
-              <div>{{ form.weekendStatus == 1 ? '是' : form.weekendStatus == 0 ? '否':'' }}</div>
+              <div>{{ form.weekendStatus == 1 ? '是' : form.weekendStatus == 0 ? '否' : '' }}</div>
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="*假日服务" prop="holidayStatus">
-              <div>{{ form.holidayStatus == 1 ? '是' : form.holidayStatus == 0 ? '否':'' }}</div>
+              <div>{{ form.holidayStatus == 1 ? '是' : form.holidayStatus == 0 ? '否' : '' }}</div>
             </el-form-item>
           </el-col>
         </el-row>
@@ -361,14 +365,14 @@
           </el-col>
           <el-col :span="12">
             <el-form-item label="商家在线" prop="storeOnline">
-              <div>{{ form.storeOnline == 1 ? '是' : form.storeOnline == 0?'否':'' }}</div>
+              <div>{{ form.storeOnline == 1 ? '是' : form.storeOnline == 0 ? '否' : '' }}</div>
             </el-form-item>
           </el-col>
         </el-row>
         <el-row>
           <el-col :span="12">
             <el-form-item label="是否自营" prop="isOne">
-              <div>{{ form.isOne == 1 ? '是' : form.isOne == 0?'否': '' }}</div>
+              <div>{{ form.isOne == 1 ? '是' : form.isOne == 0 ? '否' : '' }}</div>
             </el-form-item>
           </el-col>
         </el-row>
@@ -500,7 +504,7 @@ export default {
         ],
         leaderTel: [
           { required: true, message: '请输入联系方式', trigger: 'blur' },
-          {type: 'number', message: '必须为数字'}
+          { max: 11, message: '最多11位', trigger: 'blur' }
         ],
         serviceStatus: [
           { required: true, message: '请选择服务状态', trigger: 'change' }
@@ -543,15 +547,6 @@ export default {
   },
   created() {
     this.getList();
-    this.getDicts('sys_business_nature').then(res => {
-      this.selectInfo = res.data
-    })
-    this.getDicts('sys_release_scope').then(res => {
-      this.scopeRelease = res.data
-    })
-    this.getDicts('sys_settle_time').then(res => {
-      this.settleTime = res.data
-    })
   },
   watch: {
     'form.date': {
@@ -585,7 +580,7 @@ export default {
   methods: {
     handleUploadSuccess(res, file) {
       if (res.code != 200) {
-        this.$modal.msgError(`上传模板不正确,请重新上传`);
+        this.$modal.msgError(`${res.msg}`);
         this.$modal.closeLoading()
         this.$refs.fileUpload.handleRemove(file);
       } else {
@@ -612,8 +607,17 @@ export default {
       this.form.releaseScope = JSON.stringify(e)
     },
     /** 查询服务商管理列表 */
-    getList() {
+    async getList() {
       this.loading = true;
+      let { data: selectInfo } = await this.getDicts('sys_business_nature')
+      this.selectInfo = selectInfo
+      let { data: scopeRelease } = await this.getDicts('sys_release_scope')
+      this.scopeRelease = scopeRelease
+      let { data: settleTime } = await this.getDicts('sys_settle_time')
+      settleTime.map(item => {
+        item.dictValue = Number(item.dictValue)
+      })
+      this.settleTime = settleTime
       listManage(this.queryParams).then(response => {
         this.manageList = response.rows;
         this.total = response.total;
@@ -626,6 +630,17 @@ export default {
               item.service.push(this.scopeRelease[i])
             })
           }
+          if (item.storeNature || item.storeNature == 0) {
+            this.selectInfo.map((i, index) => {
+              if (i.dictValue == item.storeNature) {
+                item.store_nature = this.selectInfo[index].dictLabel
+              }
+            })
+          }
+          if (item.isOne || item.isOne == 0) {
+            item.is_one = item.isOne == 1 ? '是' : item.isOne == 0 ? '否' : ''
+          }
+          item.states = this.storeStatus[item.status].label
           // item.service = item.releaseScope ? JSON.parse(item.releaseScope).join('、') : ''
           // console.log(item.service);
         })
@@ -666,7 +681,8 @@ export default {
         createDepartment: null,
         status: null,
         createTime: null,
-        introduction: null
+        introduction: null,
+        checked: []
       };
       this.resetForm("form");
     },
@@ -706,14 +722,14 @@ export default {
           }
         })
         if (this.form.releaseScope) {
-            let releaseRound = JSON.parse(this.form.releaseScope)
-            console.log(this.form.releaseRound);
-            let releaseArr = []
-            releaseRound.map(i => {
-              releaseArr.push(this.scopeRelease[i].dictLabel)
-            })
-            this.form.releaseScope = releaseArr
-          }
+          let releaseRound = JSON.parse(this.form.releaseScope)
+          console.log(this.form.releaseRound);
+          let releaseArr = []
+          releaseRound.map(i => {
+            releaseArr.push(this.scopeRelease[i].dictLabel)
+          })
+          this.form.releaseScope = releaseArr
+        }
       });
     },
     /** 修改按钮操作 */
@@ -721,6 +737,7 @@ export default {
       this.reset();
       const id = row.id || this.ids
       getManage(id).then(response => {
+        response.data.checked = JSON.parse(response.data.releaseScope)
         this.form = response.data;
         this.open = true;
         this.title = "修改服务商管理";

+ 103 - 26
src/views/system/profile/index.vue

@@ -142,12 +142,12 @@
         <el-row>
           <el-col :span="12">
             <el-form-item label="身份证号" prop="sfzid">
-              <el-input v-model="form.sfzid" type="number" placeholder="请输入身份证号" class="inp" />
+              <el-input v-model.number="form.sfzid" placeholder="请输入身份证号" class="inp" type="number" />
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="电话1" prop="telOne">
-              <el-input v-model="form.telOne" type="number" placeholder="请输入电话1" class="inp" />
+              <el-input v-model.number="form.telOne" placeholder="请输入电话1" class="inp" type="number" />
             </el-form-item>
           </el-col>
         </el-row>
@@ -208,7 +208,7 @@
           <el-col>
             <el-form-item label="客户类别" prop="clientType">
               <el-radio-group v-model="form.clientType">
-                <el-radio v-for="item in userType" :label="item.dictValue">{{ item.dictLabel }}</el-radio>
+                <el-radio v-for="item in userType" :label="item.dictSort">{{ item.dictLabel }}</el-radio>
               </el-radio-group>
             </el-form-item>
           </el-col>
@@ -217,7 +217,7 @@
           <el-col>
             <el-form-item label="居住情况" prop="liveStatus">
               <el-radio-group v-model="form.liveStatus">
-                <el-radio v-for="item in liveStatus" :label="item.dictValue">{{ item.dictLabel }}</el-radio>
+                <el-radio v-for="item in liveStatus" :label="item.dictSort">{{ item.dictLabel }}</el-radio>
               </el-radio-group>
             </el-form-item>
           </el-col>
@@ -308,7 +308,7 @@
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item label="服务类型" prop="serviceType">
+            <el-form-item label="服务状态" prop="serviceType">
               <el-select v-model="form.serviceType" class="inp">
                 <el-option v-for="i in serviceType" :key="i.dictValue" :value="i.dictValue"
                   :label="i.dictLabel"></el-option>
@@ -347,7 +347,7 @@
           </el-col>
         </el-row>
         <el-form-item label="慢性疾病" prop="slowIllness">
-          <el-checkbox-group v-model="checked">
+          <el-checkbox-group v-model="form.checked">
             <el-checkbox v-for="i in slowIllness" :key="i.dictValue" :label="i.dictValue">{{ i.dictLabel }}</el-checkbox>
           </el-checkbox-group>
         </el-form-item>
@@ -421,12 +421,12 @@
           <el-input v-model="form.eatPoint" placeholder="请输入饮食特点" />
         </el-form-item>
         <el-form-item label="特长" prop="speciality">
-          <el-checkbox-group v-model="specialityChecked">
+          <el-checkbox-group v-model="form.specialityChecked">
             <el-checkbox v-for="i in speciality" :key="i.dictValue" :label="i.dictValue">{{ i.dictLabel }}</el-checkbox>
           </el-checkbox-group>
         </el-form-item>
         <el-form-item label="爱好" prop="hobby">
-          <el-checkbox-group v-model="hobbyChecked">
+          <el-checkbox-group v-model="form.hobbyChecked">
             <el-checkbox v-for="i in hobby" :key="i.dictValue" :label="i.dictValue">{{ i.dictLabel }}</el-checkbox>
           </el-checkbox-group>
         </el-form-item>
@@ -802,16 +802,23 @@ export default {
           { required: true, message: '请选择性别', trigger: 'change' }
         ],
         sfzid: [
-          { required: true, message: '请输入身份证号', trigger: 'blur' },
-          { type: 'number', message: '必须为数字' }
+          { required: true, message: '请输入身份证号', trigger: 'blur' }
         ],
         telOne: [
-          { required: true, message: '请输入电话', trigger: 'blur' },
-          { type: 'number', message: '必须为数字' }
+          { required: true, message: '请输入电话', trigger: 'blur' }
         ],
         birthday: [
           {required: true, message: '请选择出生日期', trigger: 'change'}
-        ]
+        ],
+        clientType: [
+          {required: true, message: '请选择客户类别', trigger: 'change'}
+        ],
+        familyAddress: [
+          {required: true, message: '请选择客户类别', trigger: 'blur'}
+        ],
+        serviceType: [
+          {required: true, message: '请选择服务状态', trigger: 'blur'}
+        ],
       },
       marryStatus: [],
       userType: [],
@@ -849,10 +856,12 @@ export default {
       forte: null,
       aihao: null,
       nation: [],
-      minzu: null
+      minzu: null,
+      sub_flag: false
     };
   },
-  created() {
+  async created() {
+    await this.getdict()
     this.getList();
     this.getDicts('sys_relation').then(res => {
       this.relation = res.data
@@ -891,15 +900,18 @@ export default {
         }
       }
     },
-    checked(val) {
+    'form.checked': {
+      handler(val) {
       this.form.slowIllness = JSON.stringify(val)
-    },
-    specialityChecked(val) {
+    }},
+    'form.specialityChecked': {
+      handler(val) {
       this.form.speciality = JSON.stringify(val)
-    },
-    hobbyChecked(val) {
+    }},
+    'form.hobbyChecked': {
+      handler(val) {
       this.form.hobby = JSON.stringify(val)
-    },
+    }},
     'form.marrStatus': {
       handler(val) {
         if (val) {
@@ -1008,7 +1020,7 @@ export default {
     },
     handleUploadSuccess(res, file) {
       if (res.code != 200) {
-        this.$modal.msgError(`上传模板不正确,请重新上传`);
+        this.$modal.msgError(`${res.msg}`);
         this.$modal.closeLoading()
         this.$refs.fileUpload.handleRemove(file);
       } else {
@@ -1040,39 +1052,80 @@ export default {
         this.manageList = res.rows
       })
     },
-    /** 查询用户档案列表 */
-    async getList() {
-      this.loading = true;
+    async getdict() {
       let { data: marryStatus } = await this.getDicts('sys_marry_status')
+      marryStatus.map(item => {
+        item.dictValue = Number(item.dictValue)
+      })
       this.marryStatus = marryStatus
       let { data: nation } = await this.getDicts('sys_national')
+      nation.map(item => {
+        item.dictValue = Number(item.dictValue)
+      })
       this.nation = nation
       let { data: userType } = await this.getDicts('sys_user_type')
+      userType.map(item => {
+        item.dictValue = Number(item.dictValue)
+      })
       this.userType = userType
       let { data: liveStatus } = await this.getDicts('sys_live_status')
+      liveStatus.map(item => {
+        item.dictValue = Number(item.dictValue)
+      })
       this.liveStatus = liveStatus
       let { data: serviceType } = await this.getDicts('sys_service_type')
+      serviceType.map(item => {
+        item.dictValue = Number(item.dictValue)
+      })
       this.serviceType = serviceType
       let { data: treateSure } = await this.getDicts('sys_treate_sure')
+      treateSure.map(item => {
+        item.dictValue = Number(item.dictValue)
+      })
       this.treateSure = treateSure
       let { data: moneyCome } = await this.getDicts('sys_money_come')
+      moneyCome.map(item => {
+        item.dictValue = Number(item.dictValue)
+      })
       this.moneyCome = moneyCome
       let { data: bloodType } = await this.getDicts('sys_blood_type')
+      bloodType.map(item => {
+        item.dictValue = Number(item.dictValue)
+      })
       this.bloodType = bloodType
       let { data: disablityStatus } = await this.getDicts('sys_disablity_status')
+      disablityStatus.map(item => {
+        item.dictValue = Number(item.dictValue)
+      })
       this.disablityStatus = disablityStatus
       let { data: disablityEntry } = await this.getDicts('sys_disablity_entry')
+      disablityEntry.map(item => {
+        item.dictValue = Number(item.dictValue)
+      })
       this.disablityEntry = disablityEntry
       let { data: educaLevel } = await this.getDicts('sys_educa_level')
+      educaLevel.map(item => {
+        item.dictValue = Number(item.dictValue)
+      })
       this.educaLevel = educaLevel
       let { data: shiStatus } = await this.getDicts('sys_shi_status')
+      shiStatus.map(item => {
+        item.dictValue = Number(item.dictValue)
+      })
       this.shiStatus = shiStatus
       let { data: hobby } = await this.getDicts('sys_hobby')
       this.hobby = hobby
       let { data: speciality } = await this.getDicts('sys_speciality')
       this.speciality = speciality
       let { data: slowIllness } = await this.getDicts('sys_slow_illness')
+      // slowIllness.map(item => {
+      //   item.dictValue = Number(item.dictValue)
+      // })
       this.slowIllness = slowIllness
+    },
+    /** 查询用户档案列表 */
+    getList() {
+      this.loading = true;
       listProfile(this.queryParams).then(response => {
         this.profileList = response.rows;
         this.profileList.map(item => {
@@ -1117,6 +1170,7 @@ export default {
           }
           if (item.slowIllness != null && item.slowIllness != '') {
             let arr = JSON.parse(item.slowIllness)
+            item.checked = JSON.parse(JSON.stringify(arr))
             item.slowillness = []
             arr.map(i => {
               item.slowillness.push(this.slowIllness[i].dictLabel)
@@ -1204,7 +1258,10 @@ export default {
         photo: null,
         otherPhoto: null,
         remarks: null,
-        createTime: null
+        createTime: null,
+        checked: [],
+        specialityChecked: [],
+        hobbyChecked: []
       };
       this.tEmergentPeopleList = [];
       this.resetForm("form");
@@ -1236,7 +1293,17 @@ export default {
       this.reset();
       const id = row.id || this.ids
       getProfile(id).then(response => {
+        if (response.data.slowIllness) (
+          response.data.checked = JSON.parse(response.data.slowIllness)
+        )
+        if (response.data.speciality) (
+          response.data.specialityChecked = JSON.parse(response.data.speciality)
+        )
+        if (response.data.hobby) (
+          response.data.hobbyChecked = JSON.parse(response.data.hobby)
+        )
         this.form = response.data;
+        console.log(this.form);
         this.tEmergentPeopleList = response.data.temergentPeopleList;
         this.open = true;
         this.title = "修改用户档案";
@@ -1260,6 +1327,10 @@ export default {
     },
     /** 提交按钮 */
     submitForm() {
+      if (this.sub_flag) {
+        return
+      }
+      this.sub_flag = true
       this.$refs["form"].validate(valid => {
         this.form.temergentPeopleList = this.tEmergentPeopleList;
         if (valid) {
@@ -1267,13 +1338,19 @@ export default {
             updateProfile(this.form).then(response => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
+              this.sub_flag = false
               this.getList();
+            }, err => {
+              this.sub_flag = false
             });
           } else {
             addProfile(this.form).then(response => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
+              this.sub_flag = false
               this.getList();
+            }, err => {
+              this.sub_flag = false
             });
           }
         }