Ben Lin
2024-06-18 ebbd788fbb2c0b45d4473798efc57eec8ba74a25
src/views/tigerprojects/system/lowcode/setting/pageDetail.vue
@@ -3,8 +3,8 @@
 * @Author: Ben Lin
 * @version: 
 * @Date: 2024-05-30 22:00:44
 * @LastEditors: your name
 * @LastEditTime: 2024-06-13 14:21:16
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-06-18 11:37:37
-->
<!-- eslint-disable prettier/prettier -->
<template>
@@ -205,14 +205,21 @@
              valueField="Name"
              @change="(value, option) => crudChange(value, option, field)"
            />
            <a-input v-model:value="crudInputs[field]" style="width: 55%" />
            <a-input v-model:value="crudInputs[field]" style="width: 33%" />
            <Select
              ref="select"
              v-model:value="crudSelectVals[field]"
              style="width: 20%"
              style="width: 21%"
              :options="options"
              :readonly="true"
              @change="(value, option) => componentChange(value, option, field)"
            />
            <Select
              ref="select"
              v-model:value="crudIsExistVals[field]"
              style="width: 21%"
              :options="isExistOptions"
              :readonly="true"
            />
          </a-input-group>
        </template>
@@ -272,7 +279,7 @@
  import { useModal } from '/@/components/Modal';
  import { SaveEntity, getEntity, getEntityPropertieList } from '/@/api/tigerapi/system';
  import { EntityPropertie, SYS_LOW_CODE } from '/@/api/tigerapi/model/systemModel';
  import { isNullOrEmpty } from '/@/utils/is';
  import { isNullOrEmpty, isNullOrUnDef } from '/@/utils/is';
  import { useUserStore } from '/@/store/modules/user';
  const ACard = Card;
@@ -382,6 +389,7 @@
  const crudInputs = ref({} as { [key: string]: any });
  const crudProperties = ref([] as EntityPropertie[]);
  const crudSelectVals = ref({} as { [key: string]: any });
  const crudIsExistVals = ref({} as { [key: string]: any });
  const crudSlots = ref([] as string[]);
  const crudSwSlots = ref([] as string[]);
  const crudrSwSlots = ref([] as string[]);
@@ -434,6 +442,17 @@
    {
      value: 'PoPSelect',
      label: '弹出选择框',
    },
  ]);
  const isExistOptions = ref<SelectTypes['options']>([
    {
      value: 'Y',
      label: '是判断存在',
    },
    {
      value: 'N',
      label: '不是判断存在',
    },
  ]);
@@ -541,6 +560,7 @@
                [`PSelect${CrudEntName.value}${Number(i) + 1}a`]: crudForms[i]['entityName'],
              });
            }
            crudIsExistVals.value[`${CrudEntName.value}${Number(i) + 1}a`] = crudForms[i]['isexist'];
        }
        /* 主表加载 */
        var objs = JSON.parse(data.Data.Items[0].BASE_FORM_JSON);
@@ -609,7 +629,7 @@
          _n++;
        }
        if (Keys[k].toString().startsWith('Switch')) {
          _json['ifShow'] = isNullOrEmpty(values[Keys[k]]) ? false : (values[Keys[k]] as boolean);
          _json['ifShow'] = isNullOrUnDef(values[Keys[k]]) ? false : (values[Keys[k]] as boolean);
          _n++;
        }
        if (!isNullOrEmpty(_json) && _n == 6) {
@@ -647,19 +667,19 @@
          i = i + 2;
        }
        if (mKeys[k].toString().startsWith('Switch')) {
          mjson['ifShow'] = isNullOrEmpty(mainvalues[mKeys[k]])
          mjson['ifShow'] = isNullOrUnDef(mainvalues[mKeys[k]])
            ? false
            : (mainvalues[mKeys[k]] as boolean);
          i++;
        }
        if (mKeys[k].toString().startsWith('sSwitch')) {
          mjson['sorter'] = isNullOrEmpty(mainvalues[mKeys[k]])
          mjson['sorter'] = isNullOrUnDef(mainvalues[mKeys[k]])
            ? false
            : (mainvalues[mKeys[k]] as boolean);
          i++;
        }
        if (mKeys[k].toString().startsWith('wSwitch')) {
          mjson['resizable'] = isNullOrEmpty(mainvalues[mKeys[k]])
          mjson['resizable'] = isNullOrUnDef(mainvalues[mKeys[k]])
            ? false
            : (mainvalues[mKeys[k]] as boolean);
          i++;
@@ -690,6 +710,7 @@
            ? ''
            : crudInputs.value[cKeys[k]];
          cjson['component'] = crudSelectVals.value[cKeys[k]];
          cjson['isexist'] = crudIsExistVals.value[cKeys[k]];
          if (crudSelectVals.value[cKeys[k]] == 'ApiSelect') {
            cjson['componentProps'] = {
              api: crudvalues[`ApiSelect${cKeys[k]}`],
@@ -708,13 +729,13 @@
          c = c + 3;
        }
        if (cKeys[k].toString().startsWith('Switch')) {
          cjson['show'] = isNullOrEmpty(crudvalues[cKeys[k]])
          cjson['show'] = isNullOrUnDef(crudvalues[cKeys[k]])
            ? false
            : (crudvalues[cKeys[k]] as boolean);
          c++;
        }
        if (cKeys[k].toString().startsWith('rSwitch')) {
          cjson['required'] = isNullOrEmpty(crudvalues[cKeys[k]])
          cjson['required'] = isNullOrUnDef(crudvalues[cKeys[k]])
            ? false
            : (crudvalues[cKeys[k]] as boolean);
          c++;