From f8fe13b6f7d8ad1ae53e7bf6a6cf83f584d52a4d Mon Sep 17 00:00:00 2001
From: fujunling <2984387807@qq.com>
Date: 星期二, 06 六月 2023 17:39:24 +0800
Subject: [PATCH] 动态表单组件重构
---
Source/UBCS-WEB/src/views/code/code.vue | 107 +++++++++++++++++++----------------------------------
1 files changed, 39 insertions(+), 68 deletions(-)
diff --git a/Source/UBCS-WEB/src/views/code/code.vue b/Source/UBCS-WEB/src/views/code/code.vue
index 9d36936..5e3a4ec 100644
--- a/Source/UBCS-WEB/src/views/code/code.vue
+++ b/Source/UBCS-WEB/src/views/code/code.vue
@@ -99,10 +99,10 @@
</basic-container>
<!-- 楂樼骇鏌ヨ瀵硅瘽妗� -->
<advanced-query
- ref="advancedQuery"
+ :ref="advancedQueryParam.ref"
:options="advancedQueryParam.options"
:visible.sync="advancedQueryParam.advancedQuerySettingBox"
- v-model="value">
+ @echoContion="echoSeniorContionMap">
</advanced-query>
<!-- 缂栫爜瑙勫垯鐩稿叧瀵硅瘽妗� -->
<el-dialog title="缂栫爜瑙勫垯浣跨敤鑼冨洿"
@@ -786,7 +786,7 @@
addSave,
refDataGridClassifySec,
} from "@/api/code/codebasic";
- import { treeTopCodeClassify, listClassifyLinkAttr } from "@/api/code/codeclassify";
+ import { listClassifyLinkAttr } from "@/api/code/codeclassify";
import { gridCodeFixedValue,addSaveCodeFixedValue,deleteCodeFixedValue,editCodeFixedValue,saveOrder } from "@/api/code/codeFixedValue";
import { treeCodeClassifyValue,addSaveCodeClassifyValue,editCodeClassifyValue,deleteCodeClassifyValue,saveCodeClassifyValueOrder } from "@/api/code/codeClassifyValue";
import { getDictionary } from "@/api/omd/enum";
@@ -799,18 +799,14 @@
import treeOption from "@/const/code/classifyTreeOptionDialog";
import classisyValueTreeOption from "@/const/code/classisyValueTreeDialog";
import parentClassifyParentOption from "@/const/code/parentClassifyParentOptionDialog";
- import referBtmOption from "@/const/code/referBtmDialog";
import fixedValueOption from "@/const/code/fixedValueMgrDialog";
import {mapGetters} from "vuex";
import func from "@/util/func";
import {MasterTable} from "@/api/GetItem";
-import referBtmTypeCrudDialog from '../../components/code-dialog-page/referBtmTypeCrudDialog.vue';
export default {
- components: { referBtmTypeCrudDialog },
data() {
return {
- value:"1",
ruleForm: {},
query: {},
loading: true,
@@ -1054,67 +1050,11 @@
// 楂樼骇鏌ヨ瀵硅瘽妗嗙浉鍏冲弬鏁�
advancedQueryParam: {
+ ref: 'advancedQuery',
advancedQuerySettingBox: false,
- searchForm: {
- name: 'advanced',
- },
- options: {
- labelWidth: '110px',
- // 鏌ヨ瀛楁
- searchfeildName: [
- {
- label: '缂栧彿',
- value: 'id',
- },
- {
- label: '鍚嶇О',
- value: 'name',
- },
- {
- label: '鐘舵��',
- value: 'status',
- },
- ],
- // 鏌ヨ鏉′欢 绛変簬銆佸寘鍚�佷笉绛変簬銆佷粙浜庘�︹��
- searchCondition: [
- {
- label: '绛変簬',
- value: '=',
- },
- {
- label: '鍖呭惈',
- value: 'like',
- },
- {
- label: '澶т簬绛変簬',
- value: '>=',
- },
- {
- label: '灏忎簬绛変簬',
- value: '<=',
- },
- {
- label: '涓嶇瓑浜�',
- value: '!=',
- },
- {
- label: '浠嬩簬',
- value: 'between',
- },
- ],
- column: [
- {
- type: 'text',
-
-
- },
- {
-
- },
- ],
- },
+ options: {},
+ //conditionMapParams: {},
},
-
};
},
@@ -1135,9 +1075,42 @@
functionId: 5,
}).then(res=>{
console.log(res.data.tableDefineVO.seniorQueryColumns);
+ this.advancedQueryParam.options = res.data.tableDefineVO.seniorQueryColumns;
})
+ // this.advancedQueryParam.options = [
+ // {
+ // data: [],
+ // title: '缂栧彿',
+ // fieldType: 'text',
+ // queryField: 'id',
+ // },{
+ // data: [],
+ // title: '鍚嶇О',
+ // fieldType: 'text',
+ // queryField: 'name',
+ // },{
+ // data: [],
+ // title: '鎻忚堪',
+ // fieldType: 'text',
+ // queryField: 'description',
+ // }, {
+ // data: [],
+ // title: '鐘舵��',
+ // fieldType: 'text',
+ // queryField: 'description',
+ // }
+ // ]
+ },
+ watch:{
+
},
methods: {
+
+ /** 楂樼骇鏌ヨ瀵硅瘽妗嗙粍浠�,缁勪欢杩斿洖鐨勫�兼槸condtionMap[field]褰㈠紡鐨勬煡璇㈡潯浠讹紝淇濈暀鍜屼箣鍓嶄竴鏍� */
+ echoSeniorContionMap(conditionMaps){
+ console.log(conditionMaps);
+
+ },
/* 鍏紡缂栬緫妗嗗唴瀹规敼鍙�,瀛愮粍浠剁紪杈戝畬鍏紡涔嬪悗鍐呭鍥炴樉鏃惰皟鐢� */
updateFormulaContent(content){
@@ -2033,8 +2006,6 @@
/** 缂栫爜瑙勫垯鐩稿叧鏂规硶 */
// 鎵撳紑楂樼骇鏌ヨ绐楀彛
openAdvancedQuery(){
- //this.$refs.advancedQuery.visible = true;
- //this.advancedQueryParam.timer = new Date().getTime()
this.advancedQueryParam.advancedQuerySettingBox = !this.advancedQueryParam.advancedQuerySettingBox;
},
// 鏌ヨ浣跨敤鑼冨洿
--
Gitblit v1.9.3