فهرست منبع

Merge remote-tracking branch 'origin/master'

yys 1 هفته پیش
والد
کامیت
21ba98a11b
4فایلهای تغییر یافته به همراه220 افزوده شده و 159 حذف شده
  1. 3 3
      src/views/course/userCourse/public.vue
  2. 132 97
      src/views/saas/tenant/index.vue
  3. 54 38
      src/views/system/config/config.vue
  4. 31 21
      src/views/system/config/integralConfig.vue

+ 3 - 3
src/views/course/userCourse/public.vue

@@ -601,9 +601,9 @@ export default {
     });
 
 
-    getSelectableRange().then(e => {
-      this.startTimeRange = e.data;
-    })
+    // getSelectableRange().then(e => {
+    //   this.startTimeRange = e.data;
+    // })
     // this.getTreeselect();
     this.getDicts("sys_spec_show").then(response => {
       this.specShowOptions = response.data;

+ 132 - 97
src/views/saas/tenant/index.vue

@@ -2,88 +2,88 @@
   <div class="app-container tenant-page">
     <div class="page-card search-card" v-show="showSearch">
       <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px" class="search-form">
-      <el-form-item label="租户编码" prop="tenantCode">
-        <el-input
-          v-model="queryParams.tenantCode"
-          placeholder="请输入租户编码"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="租户名称" prop="tenantName">
-        <el-input
-          v-model="queryParams.tenantName"
-          placeholder="请输入租户名称"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="状态:" prop="status">
-        <el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">
-          <el-option
-            v-for="dict in statusOptions"
-            :key="dict.dictValue"
-            :label="dict.dictLabel"
-            :value="dict.dictValue"
+        <el-form-item label="租户编码" prop="tenantCode">
+          <el-input
+            v-model="queryParams.tenantCode"
+            placeholder="请输入租户编码"
+            clearable
+            size="small"
+            @keyup.enter.native="handleQuery"
+          />
+        </el-form-item>
+        <el-form-item label="租户名称" prop="tenantName">
+          <el-input
+            v-model="queryParams.tenantName"
+            placeholder="请输入租户名称"
+            clearable
+            size="small"
+            @keyup.enter.native="handleQuery"
           />
-        </el-select>
-      </el-form-item>
+        </el-form-item>
+        <el-form-item label="状态:" prop="status">
+          <el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">
+            <el-option
+              v-for="dict in statusOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            />
+          </el-select>
+        </el-form-item>
 
-      <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
-      </el-form-item>
+        <el-form-item>
+          <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        </el-form-item>
       </el-form>
     </div>
 
     <div class="page-card toolbar-card">
       <el-row :gutter="10" class="mb8 toolbar-row">
-      <el-col :span="1.5">
-        <el-button
-          type="primary"
-          plain
-          icon="el-icon-plus"
-          size="mini"
-          @click="handleAdd"
-          v-hasPermi="['tenant:tenant:add']"
-        >新增</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="success"
-          plain
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-          v-hasPermi="['tenant:tenant:edit']"
-        >修改</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-hasPermi="['tenant:tenant:remove']"
-        >删除</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="warning"
-          plain
-          icon="el-icon-download"
-          size="mini"
-          :loading="exportLoading"
-          @click="handleExport"
-          v-hasPermi="['tenant:tenant:export']"
-        >导出</el-button>
-      </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+        <el-col :span="1.5">
+          <el-button
+            type="primary"
+            plain
+            icon="el-icon-plus"
+            size="mini"
+            @click="handleAdd"
+            v-hasPermi="['tenant:tenant:add']"
+          >新增</el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button
+            type="success"
+            plain
+            icon="el-icon-edit"
+            size="mini"
+            :disabled="single"
+            @click="handleUpdate"
+            v-hasPermi="['tenant:tenant:edit']"
+          >修改</el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button
+            type="danger"
+            plain
+            icon="el-icon-delete"
+            size="mini"
+            :disabled="multiple"
+            @click="handleDelete"
+            v-hasPermi="['tenant:tenant:remove']"
+          >删除</el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button
+            type="warning"
+            plain
+            icon="el-icon-download"
+            size="mini"
+            :loading="exportLoading"
+            @click="handleExport"
+            v-hasPermi="['tenant:tenant:export']"
+          >导出</el-button>
+        </el-col>
+        <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
       </el-row>
     </div>
 
@@ -103,9 +103,9 @@
             <span>{{ parseTime(scope.row.expireTime, '{y}-{m}-{d}') }}</span>
           </template>
         </el-table-column>
-<!--      <el-table-column label="数据库连接地址" align="center" prop="dbUrl" />-->
-<!--      <el-table-column label="数据库帐号" align="center" prop="dbAccount" />-->
-<!--      <el-table-column label="数据库密码" align="center" prop="dbPwd" />-->
+        <!--      <el-table-column label="数据库连接地址" align="center" prop="dbUrl" />-->
+        <!--      <el-table-column label="数据库帐号" align="center" prop="dbAccount" />-->
+        <!--      <el-table-column label="数据库密码" align="center" prop="dbPwd" />-->
         <el-table-column label="联系电话" align="center" prop="contactPhone" />
         <el-table-column label="联系人" align="center" prop="contactName" />
         <el-table-column label="创建时间" align="center" prop="createTime" />
@@ -116,7 +116,6 @@
               <el-button
                 size="mini"
                 type="text"
-                class="action-text-btn"
                 icon="el-icon-edit"
                 @click="handleUpdate(scope.row)"
                 v-hasPermi="['tenant:tenant:edit']"
@@ -124,7 +123,6 @@
               <el-button
                 size="mini"
                 type="text"
-                class="action-text-btn"
                 icon="el-icon-delete"
                 @click="handleDelete(scope.row)"
                 v-hasPermi="['tenant:tenant:remove']"
@@ -132,7 +130,6 @@
               <el-button
                 size="mini"
                 type="text"
-                class="action-text-btn"
                 icon="el-icon-edit"
                 @click="handleMenuChange(scope.row,'sys')"
                 v-hasPermi="['tenant:tenant:edit']"
@@ -140,7 +137,6 @@
               <el-button
                 size="mini"
                 type="text"
-                class="action-text-btn"
                 icon="el-icon-edit"
                 @click="handleComMenuChange(scope.row,'com')"
                 v-hasPermi="['tenant:tenant:edit']"
@@ -185,9 +181,9 @@
                           placeholder="选择租户有效期">
           </el-date-picker>
         </el-form-item>
-<!--        <el-form-item label="数据库连接地址" prop="dbUrl">-->
-<!--          <el-input v-model="form.dbUrl" placeholder="请输入数据库连接地址" />-->
-<!--        </el-form-item>-->
+        <!--        <el-form-item label="数据库连接地址" prop="dbUrl">-->
+        <!--          <el-input v-model="form.dbUrl" placeholder="请输入数据库连接地址" />-->
+        <!--        </el-form-item>-->
         <el-form-item label="数据库IP" prop="dbIp" label-width="100px">
           <el-input v-model="form.dbIp" placeholder="请输入数据库ip地址" />
         </el-form-item>
@@ -211,8 +207,8 @@
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" class="dialog-btn" @click="submitForm">确 定</el-button>
-        <el-button class="dialog-btn" @click="cancel">取 消</el-button>
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
 
@@ -236,8 +232,8 @@
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" class="dialog-btn" @click="submitFormMenu">确 定</el-button>
-        <el-button class="dialog-btn" @click="cancelMenu">取 消</el-button>
+        <el-button type="primary" @click="submitFormMenu">确 定</el-button>
+        <el-button @click="cancelMenu">取 消</el-button>
       </div>
     </el-dialog>
   </div>
@@ -598,11 +594,11 @@ export default {
       })
     },
 
-    handleComMenuChange(row,flag) {
+    handleComMenuChange(row, flag) {
       this.reset();
       this.form.tenantId = row.id;
       this.menuFlag = flag;
-      let data = {id: row.id, flag:flag}
+      let data = { id: row.id, flag: flag }
       roleMenuTreeselect(data).then(res => {
         this.openMenu = true;
         this.menuOptions = res.menus;
@@ -660,14 +656,33 @@ export default {
   flex-wrap: wrap;
 }
 
-.search-form {
-  margin-bottom: 4px;
+.tenant-page .search-form ::v-deep .el-form-item {
+  margin-bottom: 12px;
 }
 
 .table-card {
   padding: 14px 14px 12px;
 }
 
+.tenant-page .tenant-table ::v-deep .el-table__header th {
+  background: linear-gradient(180deg, #f7faff, #f3f8ff);
+  color: #2f3f5c;
+  font-weight: 600;
+  height: 44px;
+}
+
+.tenant-page .tenant-table ::v-deep .el-table__body tr:hover > td {
+  background: #f7fbff !important;
+}
+
+.tenant-page .tenant-table ::v-deep .el-table__body td {
+  padding: 10px 0;
+}
+
+.tenant-page .tenant-table ::v-deep .el-table__body tr.current-row > td {
+  background: #eef6ff !important;
+}
+
 .table-action-group {
   display: flex;
   flex-wrap: wrap;
@@ -675,7 +690,7 @@ export default {
   gap: 6px 8px;
 }
 
-.action-text-btn {
+.tenant-page .table-action-group ::v-deep .el-button--text {
   background: #f5f8ff;
   border: 1px solid #e7eefb;
   border-radius: 999px;
@@ -683,24 +698,44 @@ export default {
   line-height: 1.2;
 }
 
+.tenant-page .tenant-dialog ::v-deep .el-dialog {
+  border-radius: 14px;
+  overflow: hidden;
+}
+
+.tenant-page .tenant-dialog ::v-deep .el-dialog__header {
+  background: linear-gradient(90deg, #f5f9ff, #ffffff);
+  border-bottom: 1px solid #edf1f7;
+}
+
+.tenant-page .tenant-dialog ::v-deep .el-dialog__body {
+  padding: 20px 24px 12px;
+}
+
 .tenant-data-form {
   display: flex;
   flex-wrap: wrap;
   justify-content: space-between;
 }
 
-.tenant-data-form .el-form-item {
+.tenant-page .tenant-data-form ::v-deep .el-form-item {
   width: calc(50% - 10px);
 }
 
-.tenant-data-form .el-radio-group {
+.tenant-page .tenant-data-form ::v-deep .el-input__inner,
+.tenant-page .tenant-data-form ::v-deep .el-date-editor.el-input,
+.tenant-page .tenant-data-form ::v-deep .el-date-editor.el-input__inner {
+  width: 100%;
+}
+
+.tenant-page .tenant-data-form ::v-deep .el-radio-group {
   width: 100%;
   min-height: 34px;
   display: flex;
   align-items: center;
 }
 
-.dialog-btn {
+.tenant-page .tenant-dialog ::v-deep .dialog-footer .el-button {
   min-width: 84px;
   border-radius: 8px;
 }

+ 54 - 38
src/views/system/config/config.vue

@@ -3592,8 +3592,23 @@ export default {
     close() {
       this.product.open = false
     },
+    safeParseConfig(configValue, fallback = {}) {
+      if (configValue === null || configValue === undefined || configValue === '' || configValue === 'null') {
+        return fallback
+      }
+      try {
+        const parsed = JSON.parse(configValue)
+        if (parsed === null || parsed === undefined) {
+          return fallback
+        }
+        return parsed
+      } catch (e) {
+        return fallback
+      }
+    },
     getConfigByKey(key) {
       getConfigByKey(key).then(response => {
+        const configValue = response && response.data ? response.data.configValue : null
         if(!!response.data){
           this.configId = response.data.configId
           this.configKey = response.data.configKey
@@ -3602,39 +3617,39 @@ export default {
           this.configKey = key;
         }
         if (key == 'sys.oss.cloudStorage') {
-          this.form1 = JSON.parse(response.data.configValue)
+          this.form1 = this.safeParseConfig(configValue, { ...this.form1 })
         }
         if (key == 'his.inquiryConfig') {
-          this.form2 = JSON.parse(response.data.configValue)
+          this.form2 = this.safeParseConfig(configValue, { ...this.form2 })
         }
         if (key == 'his.agreementConfig') {
-          this.form3 = JSON.parse(response.data.configValue)
+          this.form3 = this.safeParseConfig(configValue, { ...this.form3 })
         }
         if (key == 'his.certs') {
-          this.form4 = JSON.parse(response.data.configValue)
+          this.form4 = this.safeParseConfig(configValue, { ...this.form4 })
           if (this.form4.certs != null) {
             this.photoArr = this.form4.certs.split(',')
           }
         }
         if (key == 'his.brokerage') {
-          this.form5 = JSON.parse(response.data.configValue)
+          this.form5 = this.safeParseConfig(configValue, { ...this.form5 })
         }
         if (key == 'his.coupon') {
           allList().then(response => {
             this.couponList = response.data
           })
-          this.form6 = JSON.parse(response.data.configValue)
+          this.form6 = this.safeParseConfig(configValue, { ...this.form6 })
 
         }
         if (key == 'his.store') {
-          this.form7 = JSON.parse(response.data.configValue)
+          this.form7 = this.safeParseConfig(configValue, { ...this.form7 })
           getAllFollowTempName().then(response => {
             this.tempOptions = response.rows
           })
         }
         if (key == 'his.store') {
           // this.form7 =JSON.parse(response.data.configValue);
-          const parsed = JSON.parse(response.data.configValue)
+          const parsed = this.safeParseConfig(configValue, { ...this.form7 })
           if (parsed.isUpdateOrder != null) {
             parsed.isUpdateOrder = Number(parsed.isUpdateOrder)
           } else {
@@ -3643,71 +3658,72 @@ export default {
           this.form7 = parsed
         }
         if (key == 'his.package') {
-          this.form8 = JSON.parse(response.data.configValue)
+          this.form8 = this.safeParseConfig(configValue, { ...this.form8 })
         }
         if (key == 'his.pay') {
-          this.form9 = JSON.parse(response.data.configValue)
+          this.form9 = this.safeParseConfig(configValue, { ...this.form9 })
         }
         if (key == 'store.pay') {
-          this.form23 = JSON.parse(response.data.configValue)
+          this.form23 = this.safeParseConfig(configValue, { ...this.form23 })
         }
         if (key == 'his.appShow') {
-          this.form10 = JSON.parse(response.data.configValue)
+          this.form10 = this.safeParseConfig(configValue, { ...this.form10 })
         }
         if (key == 'his.integral') {
           return
         }
         if (key == 'his.sign') {
-          this.form12 = JSON.parse(response.data.configValue)
+          this.form12 = this.safeParseConfig(configValue, { ...this.form12 })
         }
         if (key == 'his.config') {
           this.getCompanyOptions()
-          this.form13 = JSON.parse(response.data.configValue)
+          this.form13 = this.safeParseConfig(configValue, { ...this.form13 })
 
         }
         if (key == 'store.config') {
-          this.form17 = JSON.parse(response.data.configValue)
+          this.form17 = this.safeParseConfig(configValue, { ...this.form17 })
         }
         if (key == 'his.sms') {
-          this.form14 = JSON.parse(response.data.configValue)
+          this.form14 = this.safeParseConfig(configValue, { ...this.form14 })
         }
         if (key == 'qw:config') {
-          this.form15 = JSON.parse(response.data.configValue)
+          this.form15 = this.safeParseConfig(configValue, { ...this.form15 })
         }
         if (key == 'his.brand') {
-          this.form16 = JSON.parse(response.data.configValue)
+          this.form16 = this.safeParseConfig(configValue, { ...this.form16 })
           console.log(this.form16)
         }
         if (key == 'course.config') {
-          this.form18 = JSON.parse(response.data.configValue)
+          this.form18 = this.safeParseConfig(configValue, { ...this.form18 })
         }
         if (key == 'redPacket.config') {
-          this.form19 = JSON.parse(response.data.configValue)
+          this.form19 = this.safeParseConfig(configValue, { ...this.form19 })
         }
         if (key == 'qwRating.config') {
-          this.form20 = JSON.parse(response.data.configValue)
+          this.form20 = this.safeParseConfig(configValue, { ...this.form20 })
         }
         if (key == 'courseMa.config') {
           this.courseMaConfigLoading = true
           if (response.data && response.data.configValue) {
-            this.courseMaConfigList = JSON.parse(response.data.configValue).map(item => ({
+            const parsedCourseMaConfigList = this.safeParseConfig(configValue, [])
+            this.courseMaConfigList = Array.isArray(parsedCourseMaConfigList) ? parsedCourseMaConfigList.map(item => ({
               ...item,
               editing: false
-            }))
+            })) : []
           } else {
             this.courseMaConfigList = []
           }
           this.courseMaConfigLoading = false
         }
         if (key == 'his.login') {
-          this.form22 = JSON.parse(response.data.configValue)
+          this.form22 = this.safeParseConfig(configValue, { ...this.form22 })
         }
         if (key === 'his.healthIndexConfig') {
-          this.form26 = JSON.parse(response.data.configValue)
+          this.form26 = this.safeParseConfig(configValue, { ...this.form26 })
         } else if (key == 'store.concept') {
           this.configId = response.data.configId
           this.configKey = response.data.configKey
-          this.form21 = JSON.parse(response.data.configValue)
+          this.form21 = this.safeParseConfig(configValue, { ...this.form21 })
           if (this.form21.images != null) {
             this.images = this.form21.images.split(',')
           }
@@ -3715,48 +3731,48 @@ export default {
           this.configId = response.data.configId
           this.configKey = response.data.configKey
           console.log(response.data.configValue)
-          this.form24 = JSON.parse(response.data.configValue)
+          this.form24 = this.safeParseConfig(configValue, { ...this.form24 })
           console.log(this.form24.sign)
         } else if (key == 'app.config') {
           this.configId = response.data.configId
           this.configKey = response.data.configKey
-          this.form25 = JSON.parse(response.data.configValue)
+          this.form25 = this.safeParseConfig(configValue, { ...this.form25 })
           if (this.form25.images != null) {
             this.appImages = this.form25.images.split(',')
           }
         }else if (key == 'medicalMall.func.switch') {
           this.configId = response.data.configId
           this.configKey = response.data.configKey
-          this.form27 = {...this.form27, ...JSON.parse(response.data.configValue)}
+          this.form27 = {...this.form27, ...this.safeParseConfig(configValue, {})}
           console.log(this.form27)
         }
         if (key == 'his.zzzs') {
           this.configId = response.data.configId
           this.configKey = response.data.configKey
-          this.form28 = {...this.form28, ...JSON.parse(response.data.configValue)}
+          this.form28 = {...this.form28, ...this.safeParseConfig(configValue, {})}
         }
         if (key == 'randomRedpacket:config') {
           if(!!response.data){
           this.configId = response.data.configId
           this.configKey = response.data.configKey
-          this.form29 = {...this.form29, ...JSON.parse(response.data.configValue)}
+          this.form29 = {...this.form29, ...this.safeParseConfig(configValue, {})}
           }
         }
         if (key == 'wx.config') {
           if(!!response.data){
           this.configId = response.data.configId
           this.configKey = response.data.configKey
-          this.form30 = {...this.form30, ...JSON.parse(response.data.configValue)}
+          this.form30 = {...this.form30, ...this.safeParseConfig(configValue, {})}
           }
         }
 
         if(key=="luckyBag.config"){
           console.log("----------"+response.data.configValue)
-          this.form36 =JSON.parse(response.data.configValue);
+          this.form36 = this.safeParseConfig(configValue, { ...this.form36 });
         }
         if (key == 'his.AppRedPacket') {
           if (response.data && response.data.configValue) {
-            this.form35 = JSON.parse(response.data.configValue);
+            this.form35 = this.safeParseConfig(configValue, { ...this.form35 });
           } else {
             // 如果没有配置,使用默认值
             this.form35 = {
@@ -3776,27 +3792,27 @@ export default {
           this.configKey = response.data?.configKey || 'his.AppRedPacket';
         }
         if(key=="im.config"){
-          this.form34 =JSON.parse(response.data.configValue);
+          this.form34 = this.safeParseConfig(configValue, { ...this.form34 });
         }
         if(key == 'vc.config'){
            if(!!response.data){
           this.configId = response.data.configId
           this.configKey = response.data.configKey
-          this.form31 = {...this.form31, ...JSON.parse(response.data.configValue)}
+          this.form31 = {...this.form31, ...this.safeParseConfig(configValue, {})}
           }
         }
         if(key == 'living.config'){
           if(!!response.data){
             this.configId = response.data.configId
             this.configKey = response.data.configKey
-            this.form32 = {...this.form32, ...JSON.parse(response.data.configValue)}
+            this.form32 = {...this.form32, ...this.safeParseConfig(configValue, {})}
             console.log(this.form32 );
           }
         }if(key == 'his.adminUi.config'){
           if(!!response.data){
             this.configId = response.data.configId
             this.configKey = response.data.configKey
-            this.form33 = {...this.form33, ...JSON.parse(response.data.configValue)}
+            this.form33 = {...this.form33, ...this.safeParseConfig(configValue, {})}
           }
         }
       })

+ 31 - 21
src/views/system/config/integralConfig.vue

@@ -162,28 +162,30 @@ import { getConfigByKey, updateConfigByKey } from '@/api/system/config'
 export default {
   name: "IntegralConfig",
   data() {
+    const defaultForm11 = {
+      integralRegister: null,
+      integralFinishConsultation: null,
+      integralAddPatient: null,
+      integralAddUserAddress: null,
+      integralInvite: null,
+      integralInvited: null,
+      integralNewTask: null,
+      integralRatio: null,
+      integralShare: null,
+      integralFollow: null,
+      integralCourse: null,
+      integralProduct: null,
+      integralFirstVideo: null,
+      integralFinishVideo: null,
+      integralByOneDay: null,
+      integralFirstOrderPoint: null,
+      integralTypeByOneDay: null,
+      integralSubscriptCourse: null,
+    }
     return {
       integralLogTypeOptions: [],
-      form11: {
-        integralRegister: null,
-        integralFinishConsultation: null,
-        integralAddPatient: null,
-        integralAddUserAddress: null,
-        integralInvite: null,
-        integralInvited: null,
-        integralNewTask: null,
-        integralRatio: null,
-        integralShare: null,
-        integralFollow: null,
-        integralCourse: null,
-        integralProduct: null,
-        integralFirstVideo: null,
-        integralFinishVideo: null,
-        integralByOneDay: null,
-        integralFirstOrderPoint: null,
-        integralTypeByOneDay: null,
-        integralSubscriptCourse: null,
-      },
+      defaultForm11,
+      form11: { ...defaultForm11 },
       saveLoading: false,
     }
   },
@@ -198,7 +200,15 @@ export default {
       getConfigByKey(key).then(response => {
         this.configId=response.data.configId;
         this.configKey=response.data.configKey;
-        this.form11 =JSON.parse(response.data.configValue);
+        let parsed = null
+        try {
+          parsed = JSON.parse(response.data.configValue)
+        } catch (e) {
+          parsed = null
+        }
+        this.form11 = parsed && typeof parsed === 'object'
+          ? { ...this.defaultForm11, ...parsed }
+          : { ...this.defaultForm11 }
       });
     },
     submitForm11(){