From a777d488a15550dda0e9706fb8e0826bcf527229 Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期四, 21 十一月 2024 11:35:44 +0800
Subject: [PATCH] 修改组件
---
/dev/null | 350 --------------------------------------------------
Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-tree.vue | 2
Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-form.vue | 4
Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-table.vue | 10
Source/plt-web/plt-web-ui/src/components/dynamic-components/index.vue | 3
5 files changed, 9 insertions(+), 360 deletions(-)
diff --git a/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-TreeTable.vue b/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-TreeTable.vue
deleted file mode 100644
index 2e4dc1f..0000000
--- a/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-TreeTable.vue
+++ /dev/null
@@ -1,350 +0,0 @@
-<template>
- <div :id="'UI-dynamic-'+areasName+componentVO.oid" class="UI-dynamic">
- <avue-crud ref="treeTable"
- v-model="form"
- :data="TreeData"
- :option="option"
- :page.sync="pageType"
- @row-click="rowClickChange"
- @selection-change="TreeSelectChange">
- <template #icon="scope">
- <i :class="scope.row.icon"
- style="font-size:24px"></i>
- </template>
- <!--top鍖哄煙鎸夐挳-->
- <template slot="menuLeft" slot-scope="scope">
- <dynamic-button :componentVO="componentVO" :butttonList="componentVO.buttons" :dataStore="TreeSelectList" :sourceData="sourceData" LocationType="top"
- type="TreeTable"></dynamic-button>
- </template>
-
- <!--menu鍖哄煙鎸夐挳-->
- <template slot="menu" slot-scope="scope">
- <dynamic-button :componentVO="componentVO" :butttonList="componentVO.buttons" :scope="scope" :dataStore="TreeSelectList" :sourceData="sourceData" LocationType="menu" default="default"
- type="TreeTable"></dynamic-button>
- </template>
- </avue-crud>
- </div>
-</template>
-
-<script>
-export default {
- name: "dynamic-TreeTable",
- props: {
- //ui涓婁笅鏂囩殑涓氬姟绫诲瀷锛堟垨閾炬帴绫诲瀷锛�
- uiBtmType: {
- type: String
- },
- //ui涓婁笅鏂�
- uiContext:{
- type: String
- },
- componentVO: {
- type: Object,
- default: {}
- },
- inDialog: {
- type: Boolean,
- default: false
- },
- areasName: {
- type: String,
- default: ''//westArea瀵艰埅鍖�
- },
- sourceData: {
- //鑿滃崟婧愭暟鎹垨鑰呭脊绐楁椂鎸夐挳鎵�灞炲尯鍩熺殑涓婁竴鍖哄煙閫変腑鏁版嵁
- type: Object,
- default: {}
- },
- paramVOS: {
- type: Object,
- default: {}
- },
- isShow: {
- //鎵�鍦ㄥ尯鍩熸槸鍚﹀凡鏄剧ず锛岄拡瀵箃ab鍜宑ollapse
- type: Boolean,
- default: true
- },
- dataStore: {
- //寮圭獥鏃舵寜閽墍灞炲尯鍩熼�変腑鏁版嵁
- type: Array,
- default: []
- },
- tableType: {
- type: String
- }
- },
- data() {
- return {
- parentHeight: '100%',//褰撳墠缁勪欢鏍硅妭鐐瑰厓绱犻珮搴�
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 50,
- },
- simplePage: {
- currentPage: 1,
- total: 100,
- pagerCount: 4,
- layout: "prev, pager, next"
- },
- //琛ㄦ牸鏍�
- form: {},
- option: {
- height: '100%',
- addBtn: false,
- editBtn: false,
- delBtn: false,
- selection: true,
- tip: false,
- calcHeight: 15,
- indexFixed: false,
- menuFixed: false,
- column: [
- {
- label: '浜嬩欢',
- prop: 'event',
- align: 'left',
- width: 200
- },
- {
- label: '鏃堕棿绾�',
- prop: 'timeLine'
- },
- {
- label: '澶囨敞',
- prop: 'comment'
- }
- ],
- rowKey: this.componentVO.treeTableDefineVO.treeCurrentField || 'oid',
- rowParentKey: this.componentVO.treeTableDefineVO.treeParentField || 'parentOid',
- },
- TreeData: [],
- TreeSelectList: [],
- // 琛ㄥ崟鏁版嵁
- formList: [
- {
- comboxKey: null,
- customClass: null,
- data: null,
- dateFormate: null,
- defaultValue: "",
- displayExtension: "",
- extendAttrMap: null,
- extendAttrString: null,
- field: "name",
- hidden: false,
- keyAttr: true,
- prefix: null,
- readOnly: false,
- referConfig: null,
- required: true,
- selectLibFlag: null,
- showField: null,
- suffix: '$',
- text: "鍚嶇О",
- tooltips: '鍚嶇О',
- type: "text",
- unique: false,
- verify: ""
- },
- {
- comboxKey: null,
- customClass: null,
- data: null,
- dateFormate: null,
- defaultValue: "",
- displayExtension: "",
- extendAttrMap: null,
- extendAttrString: null,
- field: "code",
- hidden: false,
- keyAttr: false,
- prefix: null,
- readOnly: false,
- referConfig: null,
- required: false,
- selectLibFlag: null,
- showField: null,
- suffix: null,
- disabled: true,
- text: "缂栫爜",
- tooltips: null,
- type: "text",
- unique: false,
- verify: ""
- },
- {
- comboxKey: "EnumReviewType",
- customClass: null,
- data: null,
- dateFormate: null,
- defaultValue: "department",
- displayExtension: "",
- extendAttrMap: null,
- extendAttrString: null,
- field: "reviewtype",
- hidden: false,
- keyAttr: false,
- prefix: null,
- readOnly: false,
- referConfig: null,
- required: false,
- selectLibFlag: null,
- showField: null,
- suffix: null,
- text: "绫诲瀷",
- tooltips: null,
- type: "combox",
- unique: false,
- verify: "",
- dicData: [{
- label: '娴嬭瘯1',
- value: 'department'
- }, {
- label: '娴嬭瘯2',
- value: 'departments'
- }]
- },
- {
- comboxKey: null,
- customClass: null,
- data: null,
- dateFormate: null,
- defaultValue: "",
- displayExtension: "",
- extendAttrMap: null,
- extendAttrString: null,
- field: "creator",
- hidden: true,
- keyAttr: false,
- prefix: null,
- readOnly: true,
- referConfig: null,
- required: false,
- selectLibFlag: null,
- showField: null,
- suffix: null,
- text: "鍒涘缓浜�",
- tooltips: null,
- type: "text",
- unique: false,
- verify: ""
- },
- {
- comboxKey: null,
- customClass: null,
- data: null,
- dateFormate: "yyyy-MM-dd HH:mm:ss",
- defaultValue: "",
- displayExtension: "",
- extendAttrMap: null,
- extendAttrString: null,
- field: "createtime",
- hidden: true,
- keyAttr: false,
- prefix: null,
- readOnly: false,
- referConfig: null,
- required: false,
- selectLibFlag: null,
- showField: null,
- suffix: null,
- text: "鍒涘缓鏃堕棿",
- tooltips: null,
- type: "datetime",
- unique: false,
- verify: ""
- },
- {
- comboxKey: null,
- customClass: null,
- data: null,
- dateFormate: null,
- defaultValue: "",
- displayExtension: "",
- extendAttrMap: null,
- extendAttrString: null,
- field: "content",
- hidden: false,
- keyAttr: false,
- prefix: null,
- readOnly: false,
- referConfig: null,
- required: false,
- selectLibFlag: null,
- showField: null,
- suffix: null,
- text: "澶囨敞",
- tooltips: null,
- type: "textarea",
- unique: false,
- verify: ""
- },
- ],
- formName: '',
- visible:false
- }
- },
- watch: {
- parentHeight: {
- handler(newval) {
- if (newval > 50) {
- this.option.height = newval;
- //doLayout涓嶇敓鏁堬紝鎵嬪姩璁剧疆琛ㄦ牸楂樺害
- this.$children[0].$children[1].$children[1].$children[0].$el.style.height = newval + 'px';
- /*this.$nextTick(() => {
- if (this.$refs.dataTable && this.$refs.dataTable.doLayout) {
- this.$refs.dataTable.doLayout();
- }
- })*/
- }
- }
- },
- isShow: {
- handler(newval) {
- if (newval && this.$el.clientHeight > 50) {
- this.parentHeight = this.$el.clientHeight - this.$children[0].$children[1].$children[0].$el.clientHeight - this.$children[0].$children[2].$el.clientHeight - 5;
- }
- }
- },
- sourceData:{
- handler(newval) {
- //婧愭暟鎹湁鍙樺寲鏃跺彉鏇村綋鍓嶅尯鍩熸暟鎹�
- console.log(this.areasName);
- console.log(newval);
- }
- }
- },
- mounted() {
- if (this.$el.clientHeight > 50) {
- //鐖跺厓绱犻珮搴�-鎸夐挳楂樺害-鍒嗛〉楂樺害
- this.parentHeight = this.$el.clientHeight - this.$children[0].$children[1].$children[0].$el.clientHeight - this.$children[0].$children[2].$el.clientHeight - 5;
- }
- },
- computed: {
- pageType() {
- return this.areasName.indexOf('westArea') == 0 ? this.simplePage : this.page;
- }
- },
- methods: {
- rowClickChange(row){
- this.$refs.treeTable.toggleRowSelection(row);
- },
- TreeSelectChange(row) {
- this.TreeSelectList = row;
- this.$emit("setDataStore", {
- area: this.areasName,
- type:this.componentVO.uiComponentType,
- dataStore:row
- });
- },
- handleRefresh(){
- this.$refs.treeTable.refreshTable();
- }
- }
-}
-</script>
-
-<style scoped>
-
-</style>
diff --git a/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-form.vue b/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-form.vue
index 4cadbbc..613a9a8 100644
--- a/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-form.vue
+++ b/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-form.vue
@@ -124,7 +124,7 @@
for (let i in this.sourceData) {
const item = this.sourceData[i]
if (item && item.constructor === Object) continue;
- if (i == 'type' || i == 'context' || i == 'content') continue;
+ if (['type', 'context', 'content', 'querytemplate', 'querytype'].includes(i)) continue;
sourceDataMap['sourceData["' + i + '"]'] = item
}
}
@@ -132,7 +132,7 @@
if (Object.keys(this.paramVOS).length > 0) {
for (let j in this.paramVOS) {
if (this.paramVOS[j] && this.paramVOS[j].constructor === Object) continue;
- if (j == 'type' || j == 'context' || j == 'content' || j == "getdataurl" || j == "getdatamethod" || j == "url" || j == "method" || j == "uploadfileurl" || j == "title") continue;
+ if (['type', 'context', 'content', "getdataurl", "getdatamethod", "url", "method", "uploadfileurl", "title", 'querytemplate', 'querytype', 'usesourcedata'].includes(j)) continue;
sourceDataMap['sourceData["' + j + '"]'] = this.paramVOS[j]
}
}
diff --git a/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-table.vue b/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-table.vue
index 662bea2..b8ecc68 100644
--- a/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-table.vue
+++ b/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-table.vue
@@ -4,15 +4,15 @@
v-model="form"
:data="tableList"
:option="option"
- :page.sync="pageType"
+ :page.sync="componentVO.uiComponentType == 'TreeTable'?{}:pageType"
:table-loading="loading"
@on-load="onLoad"
@search-reset="searchReset"
+ @search-change='searchChange'
@refresh-change="handleRefresh"
@current-change="currentChange"
@size-change="sizeChange"
@row-click="rowClickChange"
- @search-change='searchChange'
@filter="filterChange"
@selection-change="selectChange">
<!--top鍖哄煙鎸夐挳-->
@@ -60,7 +60,7 @@
</template>
<template #icon="{ row }">
<span class="avue-icon avue-icon--small">
- <svg v-if="row.icon && row.icon.indexOf('#')==-1" aria-hidden="true">
+ <svg v-if="row.icon && row.icon.indexOf('#')==0" aria-hidden="true">
<use :xlink:href="row.icon"></use>
</svg>
<i v-else :class="row.icon"></i>
@@ -303,7 +303,7 @@
for (let i in this.sourceData) {
const item = this.sourceData[i]
if (item && item.constructor === Object) continue;
- if (i == 'type' || i == 'context' || i == 'content') continue;
+ if (['type', 'context', 'content', 'querytemplate', 'querytype'].includes(i)) continue;
sourceDataMap['sourceData["' + i + '"]'] = item
}
}
@@ -311,7 +311,7 @@
if (Object.keys(this.paramVOS).length>0) {
for (let j in this.paramVOS) {
if (this.paramVOS[j] && this.paramVOS[j].constructor === Object) continue;
- if (j == 'type' || j == 'context' || j == 'content' || j == "getdataurl" || j == "getdatamethod" || j == "url" || j == "method" || j == "uploadfileurl" || j == "title") continue;
+ if (['type', 'context', 'content', "getdataurl", "getdatamethod", "url", "method", "uploadfileurl", "title", 'querytemplate', 'querytype', 'usesourcedata'].includes(j)) continue;
sourceDataMap['sourceData["' + j + '"]'] = this.paramVOS[j]
}
}
diff --git a/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-tree.vue b/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-tree.vue
index ed18af1..8f9991f 100644
--- a/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-tree.vue
+++ b/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-tree.vue
@@ -180,7 +180,7 @@
for (let i in this.sourceData) {
const item = this.sourceData[i]
if (item && item.constructor === Object) continue;
- if (['type', 'context', 'content', "title", 'querytemplate', 'querytype'].includes(i)) continue;
+ if (['type', 'context', 'content', 'querytemplate', 'querytype'].includes(i)) continue;
sourceDataMap['sourceData["' + i + '"]'] = item
}
}
diff --git a/Source/plt-web/plt-web-ui/src/components/dynamic-components/index.vue b/Source/plt-web/plt-web-ui/src/components/dynamic-components/index.vue
index 54e1ff2..1394ac1 100644
--- a/Source/plt-web/plt-web-ui/src/components/dynamic-components/index.vue
+++ b/Source/plt-web/plt-web-ui/src/components/dynamic-components/index.vue
@@ -77,10 +77,9 @@
import dynamicForm from "@/components/dynamic-components/dynamic-form"
import dynamicTree from "@/components/dynamic-components/dynamic-tree"
import dynamicCustom from "@/components/dynamic-components/dynamic-custom"
-import dynamicTreeTable from "@/components/dynamic-components/dynamic-TreeTable"
export default {
name: "dynamicIndex",
- components:{dynamicCustom, dynamicTree, dynamicForm, dynamicTable,dynamicTreeTable },
+ components:{dynamicCustom, dynamicTree, dynamicForm, dynamicTable },
props:{
//ui涓婁笅鏂囩殑涓氬姟绫诲瀷锛堟垨閾炬帴绫诲瀷锛�
uiBtmType: {
--
Gitblit v1.9.3