diff --git a/src/views/liswork/xtwh/statstemplate/data.vue b/src/views/liswork/xtwh/statstemplate/data.vue
index 6f85d56..46aee60 100644
--- a/src/views/liswork/xtwh/statstemplate/data.vue
+++ b/src/views/liswork/xtwh/statstemplate/data.vue
@@ -75,13 +75,14 @@
-
+
+
@@ -120,7 +121,19 @@
-
+
+
+
+ {{ item.label }}
+ {{ item.value }}
+
+
@@ -135,7 +148,7 @@
-
+
{{ dict.label }}
@@ -145,9 +158,12 @@
-
+
+
+
+
@@ -208,14 +224,34 @@ const copyTemplateOptions = ref([])
const paramTypeOptions = ref([
{ label: "过滤参数", value: "0" },
{ label: "显示列", value: "1" },
- { label: "过滤+显示", value: "2" },
+ { label: "副标题", value: "2" },
{ label: "汇总栏", value: "3" },
{ label: "子查询", value: "4" },
{ label: "逻辑条件", value: "5" },
{ label: "计算列", value: "6" }
]);
-
-// 图表类型选项
+//常用默认值
+const defaultOptions = ref([
+ { label: "当前日期", value: "[today]" },
+ { label: "前一天", value: "[today] -3" },
+ { label: "当前日期结束", value: "[today] 23:59:59" },
+ { label: "登录机构", value: "[LoginYLJG]" },
+ { label: "默认仪器", value: "[DefaultInstr]" },
+ { label: "当前时间", value: "[now]" },
+ { label: "起始时间", value: "00:00:00" },
+ { label: "结束时间", value: "23:59:59" },
+ { label: "默认是", value: "1" },
+ { label: "默认否", value: "0" }
+]);
+// 自动补全下拉数据源查询
+const queryDefaultSuggestions = (queryString, callback) => {
+ // 根据输入文本过滤预设选项,无输入则展示全部
+ const suggestions = defaultOptions.value.filter(item =>
+ item.label.includes(queryString) || item.value.includes(queryString)
+ );
+ callback(suggestions);
+};
+// 类型选项
const paramOptiontypeOptions = ref([
{ label: "单选框", value: "0", color: "#56BBBD" },
{ label: "下拉框", value: "1", color: "#67C23A" },
@@ -226,6 +262,7 @@ const paramOptiontypeOptions = ref([
{ label: "数字框", value: "6", color: "#507F80" },
{ label: "日期框", value: "7", color: "#7E84F7" },
{ label: "时间框", value: "8", color: "#377D22" },
+ { label: "日期时间框", value: "9", color: "#7E84F7" },
]);
// ========== 页面状态与数据 ==========
@@ -245,13 +282,14 @@ const form = ref({
paramDefvalue: undefined,
precondition: undefined,
paramType: paramTypeOptions.value[0]?.value || "",
- paramOptiontype: paramOptiontypeOptions.value[0]?.value || "",
+ paramOptiontype: paramOptiontypeOptions.value[5]?.value || "",
paramSql: "", // SQL语句(绑定到SqlEditor组件)
paramSequence: 0,
- paramHide: "",
+ paramHide: "N",
paramSort: 0,
status: "0",
- remark: undefined
+ remark: undefined,
+ paramWidth: 100
});
// 查询参数
@@ -301,14 +339,15 @@ function resetForm() {
paramDefvalue: undefined,
precondition: undefined,
paramType: paramTypeOptions.value[0]?.value || "",
- paramOptiontype: paramOptiontypeOptions.value[0]?.value || "",
+ paramOptiontype: paramOptiontypeOptions.value[5]?.value || "",
paramSequence: 0,
paramHide: "",
statsCode: statsCode.value,
paramSql: "",
paramSort: 0,
status: "0",
- remark: undefined
+ remark: undefined,
+ paramWidth: 100
};
if (proxy && proxy.resetForm) {
proxy.resetForm("statsparamRef");
@@ -549,4 +588,5 @@ function getTypes(statsCode0) {
:deep(.compact-form .el-form-item:last-of-type .el-textarea__inner) {
min-height: 60px;
}
+
\ No newline at end of file