Ben Lin
2024-08-20 2e2ec72bdefad3ff51c786721f11b0d8b82d8b1b
src/views/tigerprojects/system/lowcode/entityts/BAS_LABEL_VAR.ts
@@ -4,7 +4,7 @@
 * @version:
 * @Date: 2024-06-19 20:34:27
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-07-31 23:07:14
 * @LastEditTime: 2024-08-20 14:59:13
 */
import { Tag, Tooltip } from 'ant-design-vue';
@@ -26,8 +26,6 @@
  BasLabelTempInput,
} from '/@/api/tigerapi/model/mesModel';
import { useUserStore } from '/@/store/modules/user';
import { uploadApi } from '/@/api/sys/upload';
import { useWebSocketStore } from '/@/store/modules/websocket';
const { getLocale } = useLocale();
@@ -401,12 +399,13 @@
        },
        { BAS_LABEL_VAR_WO: useDrawer() },
      ];
    } /**
    },
    /**
     * @description: 获取表格use列表
     * @param {string} type
     * @param {array} args
     * @return {*}
     */,
     */
    GetUseTables: (data: Ref<{}>, ...args) => {
      // _data = data;
      return {
@@ -542,7 +541,7 @@
          LABEL_CODE: label.LABEL_CODE,
          LABEL_NAME: label.LABEL_NAME,
          TEMP_TYPE: label.TEMP_TYPE,
          TEMP_PATH: label.TEMP_PATH[0],
          TEMP_PATH: label.TEMP_PATH,
          CUST_CODE: label.CUST_CODE,
          PROD_CODE: label.PROD_CODE,
          REMARK: '',
@@ -759,7 +758,8 @@
            labelField: unref(getLocale) == 'zh_CN' ? 'Desc' : 'Name',
            valueField: 'Value',
            onChange: (e, v) => {
              if (e == 1) {
              if (e == 1 || e == 4) {
                const where = e == 1? { TABLE_NAME: 'BAS_LABEL_PV', VAR_TYPE: 0}: { TABLE_NAME: 'BAS_LABEL_PV', VAR_TYPE: 1};
                emit('opencust', {
                  data: column.record,
                  name: 'BAS_LABEL_VAR',
@@ -793,7 +793,7 @@
                    ],
                    tableName: 'BAS_LABEL_PV',
                    rowKey: 'VAR_CODE',
                    searchInfo: { TABLE_NAME: 'BAS_LABEL_PV' },
                    searchInfo: where,
                  },
                });
              }
@@ -820,6 +820,10 @@
              text = '自定义变量';
              color = '#bfbfbf';
              break;
            case 4:
              text = '条码生成';
              color = '#b442df';
              break;
          }
          return h(Tooltip, { title: text }, () => h(Tag, { color: color }, () => text));
        },
@@ -839,6 +843,25 @@
              ifShow: (column) => true,
              sorter: true,
              resizable: true,
            },
            {
              dataIndex: 'BARCODE_RULE',
              title: '条码生成规则',
              ifShow: true,
              edit: true,
              editRule: true,
              sorter: true,
              resizable: true,
              editComponent: 'ApiSelect',
              editComponentProps: (column) => {
                return {
                  api: getEntity,
                  params: { entityName: 'BAS_CODE_RULE', sqlcmd: ' 1=1 ' },
                  resultField: 'Data.Items',
                  labelField: 'RULE_NAME',
                  valueField: 'RULE_CODE',
                };
              },
            },
            {
              dataIndex: 'REMARK',
@@ -884,8 +907,8 @@
                title: `(变量)${x.VAR_NAME}默认值`,
                dataIndex: `DEFAULT_VALUE_${x.VAR_NAME}`,
                width: 280,
                edit: true,
                editRule: true,
                // edit: true,
                // editRule: true,
                resizable: true,
                ifShow: true,
              },