From 92f39340c7bce9a640ccf616290dae7888b93531 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期一, 08 四月 2024 15:57:25 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/ProjectWeb/src/views/base/UIContentViewerInDialog.vue | 23 +++++--
Source/ProjectWeb/src/page/index/index.vue | 2
Source/ProjectWeb/src/api/base/region.js | 9 +++
Source/ProjectWeb/src/components/dynamic-components/dynamic-form.vue | 13 ++--
Source/ProjectWeb/src/views/base/UIContentViewer.vue | 83 +++++++++++++++++----------
5 files changed, 85 insertions(+), 45 deletions(-)
diff --git a/Source/ProjectWeb/src/api/base/region.js b/Source/ProjectWeb/src/api/base/region.js
index 2b555f9..9651b04 100644
--- a/Source/ProjectWeb/src/api/base/region.js
+++ b/Source/ProjectWeb/src/api/base/region.js
@@ -51,3 +51,12 @@
})
}
+export const getUIContent = (query) => {
+ return request({
+ url: '/api/webUIController/getUIContentByBtmTypeAndId',
+ method: 'get',
+ params: query,
+ });
+}
+
+
diff --git a/Source/ProjectWeb/src/components/dynamic-components/dynamic-form.vue b/Source/ProjectWeb/src/components/dynamic-components/dynamic-form.vue
index de695df..9641b5f 100644
--- a/Source/ProjectWeb/src/components/dynamic-components/dynamic-form.vue
+++ b/Source/ProjectWeb/src/components/dynamic-components/dynamic-form.vue
@@ -81,8 +81,7 @@
},
data() {
return {
- form: {},
- ruleForm:{}
+ form: {}
}
},
mounted() {
@@ -107,7 +106,7 @@
},
immediate: true,
},
- ruleForm: {
+ form: {
handler(val) {
if (val) {
if (Array.isArray(val)) { // 妫�鏌� val 鏄惁涓烘暟缁�
@@ -228,7 +227,7 @@
if (code.type == "refer") {
if (code.referConfig && code.referConfig.useFormKey) {
if (verifyNull(code.referConfig.formValuesKey)) {
- code.referConfig.formValuesKey = "ruleForm";
+ code.referConfig.formValuesKey = "form";
}
code.referConfig.formValues = this[code.referConfig.formValuesKey];
}
@@ -249,8 +248,8 @@
},
setReferValue(data) {
if (data && data.prop) {
- this.ruleForm[data.prop] = data.value || "";
- this.ruleForm[data.showProp] = data.text || "";
+ this.form[data.prop] = data.value || "";
+ this.form[data.showProp] = data.text || "";
if (data.propMap) {
//璇存槑闇�瑕佹槧灏�
for (let key in data.propMap) {
@@ -278,7 +277,7 @@
value.push(temp);
}
});
- this.ruleForm[key] = value.join(",");
+ this.form[key] = value.join(",");
}
}
}
diff --git a/Source/ProjectWeb/src/page/index/index.vue b/Source/ProjectWeb/src/page/index/index.vue
index 733a9ba..93689d3 100644
--- a/Source/ProjectWeb/src/page/index/index.vue
+++ b/Source/ProjectWeb/src/page/index/index.vue
@@ -66,7 +66,7 @@
created() {
//瀹炴椂妫�娴嬪埛鏂皌oken
- this.refreshToken();
+ //this.refreshToken();
},
mounted() {
diff --git a/Source/ProjectWeb/src/views/base/UIContentViewer.vue b/Source/ProjectWeb/src/views/base/UIContentViewer.vue
index 60f6004..44104ce 100644
--- a/Source/ProjectWeb/src/views/base/UIContentViewer.vue
+++ b/Source/ProjectWeb/src/views/base/UIContentViewer.vue
@@ -2,43 +2,47 @@
<!--UI涓婁笅鏂囩殑灞曠ず鍣�-->
<div style="height:calc(100% - 4px);min-width:1200px">
<el-header v-if="uiDefineVO.northAreas && uiDefineVO.northAreas.length>0">
- <UIContentArea :key="'northArea-'+uiDefineVO.oid" areas-name="northArea"
- :areasData="uiDefineVO.northAreas"
+ <UIContentArea :key="'northArea-'+uiDefineVO.oid" :areasData="uiDefineVO.northAreas"
+ :dataStore="checkedData.northArea"
:inDialog="inDialog"
:sourceData="sourceData"
- :dataStore="checkedData.northArea"
+ areas-name="northArea"
@setDataStore="setDataStore">
</UIContentArea>
</el-header>
- <el-container :style="'height: '+(uiDefineVO.northAreas && uiDefineVO.northAreas.length>0?'calc(100% - 70px)':'100%')">
- <el-aside v-if="uiDefineVO.westAreas && uiDefineVO.westAreas.length>0" :width="uiDefineVO.westAreas[0].componentVOs[0].uiComponentType=='table' || uiDefineVO.westAreas[0].componentVOs[0].uiComponentType=='TreeTable'?'420px':'320px'" height="100%">
- <UIContentArea :key="'westArea-'+uiDefineVO.oid" areas-name="westArea"
- cradStyle=""
- :areasData="uiDefineVO.westAreas"
+ <el-container
+ :style="'height: '+(uiDefineVO.northAreas && uiDefineVO.northAreas.length>0?'calc(100% - 70px)':'100%')">
+ <el-aside v-if="uiDefineVO.westAreas && uiDefineVO.westAreas.length>0"
+ :width="uiDefineVO.westAreas[0].componentVOs[0].uiComponentType=='table' || uiDefineVO.westAreas[0].componentVOs[0].uiComponentType=='TreeTable'?'420px':'320px'"
+ height="100%">
+ <UIContentArea :key="'westArea-'+uiDefineVO.oid" :areasData="uiDefineVO.westAreas"
+ :dataStore="checkedData.westArea"
:inDialog="inDialog"
:sourceData="sourceData"
- :dataStore="checkedData.westArea"
+ areas-name="westArea"
+ cradStyle=""
@setDataStore="setDataStore">
</UIContentArea>
</el-aside>
<el-container style="height: 100%">
<el-main v-if="uiDefineVO.centerAreas && uiDefineVO.centerAreas.length>0" :style="'height: '+centerHeight">
- <UIContentArea :key="'centerArea-'+uiDefineVO.oid" areas-name="centerArea"
- cradStyle=""
- :areasData="uiDefineVO.centerAreas"
+ <UIContentArea :key="'centerArea-'+uiDefineVO.oid" :areasData="uiDefineVO.centerAreas"
+ :dataStore="checkedData.centerArea"
:inDialog="inDialog"
:sourceData="checkedData.westArea[checkedData.westArea.length-1]"
- :dataStore="checkedData.centerArea"
+ areas-name="centerArea"
+ cradStyle=""
@setDataStore="setDataStore">
</UIContentArea>
</el-main>
- <el-footer v-if="uiDefineVO.southAreas && uiDefineVO.southAreas.length>0" height="35%" style="max-height: 300px">
- <UIContentArea :key="'southArea-'+uiDefineVO.oid" areas-name="southArea"
- cradStyle=""
- :areasData="uiDefineVO.southAreas"
+ <el-footer v-if="uiDefineVO.southAreas && uiDefineVO.southAreas.length>0" height="35%"
+ style="max-height: 300px">
+ <UIContentArea :key="'southArea-'+uiDefineVO.oid" :areasData="uiDefineVO.southAreas"
+ :dataStore="checkedData.southArea"
:inDialog="inDialog"
:sourceData="checkedData.centerArea[checkedData.centerArea.length-1]"
- :dataStore="checkedData.southArea"
+ areas-name="southArea"
+ cradStyle=""
@setDataStore="setDataStore">
</UIContentArea>
</el-footer>
@@ -48,9 +52,9 @@
</template>
<script>
-import { verifyNull } from "@/util/validate";
+import {verifyNull} from "@/util/validate";
import UIContentArea from "@/views/base/UIContentArea"
-import {uiDefineVOData} from "@/views/base/uiDefineVO"
+import {getUIContent} from '@/api/base/region'
export default {
name: "UIContentViewer",
@@ -73,22 +77,37 @@
sourceData: {},
}
},
- watch: {},
- computed: {},
+ watch: {
+ typeAContent:{
+ handler(newV,oldV){
+ if(oldV!=newV && !verifyNull(newV)){
+ this.initUI();
+ }
+ },
+ immediate: true,
+ }
+ },
+ computed: {
+ typeAContent(){
+ return this.btmType+this.content;
+ }
+ },
created() {
if (verifyNull(this.$route.query.type) || (verifyNull(this.$route.query.context) && verifyNull(this.$route.query.content))) {
this.$message.error("閰嶇疆鐨勪俊鎭敊璇紝璇峰弬鑰僢s=缁勪欢name?type=xxx&context=yyy¶m=zzz杩欑褰㈠紡銆傚叾涓璽ype鏄笟鍔$被鍨嬶紙鎴栭摼鎺ョ被鍨嬶級锛宑ontext鏄疷I涓婁笅鏂囩殑鍚嶇О");
return false;
}
- this.btmType=this.$route.query.type;
- this.content=this.$route.query.context ||this.$route.query.content;
- this.sourceData=this.$route.query;
- this.initUI();
- this.initContent();
+ this.btmType = this.$route.query.type;
+ this.content = this.$route.query.context || this.$route.query.content;
+ this.sourceData = this.$route.query;
},
methods: {
initUI() {
- this.uiDefineVO = uiDefineVOData;
+ getUIContent({btmType: this.btmType, id: this.content}).then(res => {
+ console.log(res.data.obj)
+ this.uiDefineVO = res.data.obj;
+ this.initContent();
+ })
},
initContent() {
if (this.uiDefineVO.southAreas && this.uiDefineVO.southAreas.length > 0) {
@@ -105,13 +124,15 @@
</script>
<style scoped>
-.el-container{
+.el-container {
padding: 0 !important;
}
-.el-header,.el-aside,.el-main,.el-footer{
+
+.el-header, .el-aside, .el-main, .el-footer {
padding: 0;
}
-.el-header{
+
+.el-header {
margin-bottom: 10px;
}
</style>
diff --git a/Source/ProjectWeb/src/views/base/UIContentViewerInDialog.vue b/Source/ProjectWeb/src/views/base/UIContentViewerInDialog.vue
index e561d73..56172a5 100644
--- a/Source/ProjectWeb/src/views/base/UIContentViewerInDialog.vue
+++ b/Source/ProjectWeb/src/views/base/UIContentViewerInDialog.vue
@@ -53,8 +53,8 @@
<script>
import UIContentArea from "@/views/base/UIContentArea"
-import {uiDefineVOData} from "@/views/base/uiDefineVOInDialog"
import {verifyNull} from "@/util/validate";
+import {getUIContent} from '@/api/base/region'
export default {
name: "UIContentViewerInDialog",
@@ -99,22 +99,33 @@
}
},
watch: {
-
+ typeAContent:{
+ handler(newV,oldV){
+ if(oldV!=newV && !verifyNull(newV)){
+ this.initUI();
+ }
+ },
+ immediate: true,
+ }
},
computed: {
-
+ typeAContent(){
+ return this.btmType+this.content;
+ }
},
created() {
if (verifyNull(this.btmType) || verifyNull(this.content) ) {
this.$message.error("鑷畾涔夌粍浠堕厤缃殑淇℃伅閿欒锛岃鍙傝�僢s=name?type=xxx&context=yyy¶m=zzz杩欑褰㈠紡銆傚叾涓璽ype鏄笟鍔$被鍨嬶紙鎴栭摼鎺ョ被鍨嬶級锛宑ontext鏄疷I涓婁笅鏂囩殑鍚嶇О,name涓虹粍浠跺悕绉帮紝绌哄�兼椂榛樿灞曠ずUI寮曟搸");
return false;
}
- this.initUI();
- this.initContent();
},
methods: {
initUI() {
- this.uiDefineVO = uiDefineVOData;
+ getUIContent({btmType: this.btmType, id: this.content}).then(res => {
+ console.log(res.data.obj)
+ this.uiDefineVO = res.data.obj;
+ this.initContent();
+ })
},
initContent() {
if (this.uiDefineVO.southAreas && this.uiDefineVO.southAreas.length > 0) {
--
Gitblit v1.9.3