| | |
| | | /** |
| | | * æé®å¤ç ä¸å¡ç±»åæ°å¢ |
| | | */ |
| | | import {callPreEvent,callPostEvent} from './BaseAction'; |
| | | import {paramLow,callPreEvent, callPostEvent} from './BaseAction'; |
| | | import {validatenull} from "@/util/validate"; |
| | | import Vue from "vue"; |
| | | |
| | | export const doAction = (options) => { |
| | | let paramVOS = Object.assign({ |
| | | options.paramVOS = paramLow(options.paramVOS) |
| | | const paramVOS = Object.assign({ |
| | | url: 'uiDataController/addSave', |
| | | method: 'post', |
| | | uploadFileUrl: 'vciFileUploadController/uploadFile' |
| | | uploadfileurl: 'vciFileUploadController/uploadFile' |
| | | }, options.paramVOS) |
| | | options.paramVOS = paramVOS; |
| | | |
| | | options.sourceData = options.sourceData || {}; |
| | | |
| | | callPreEvent(options, doBefore,function (options) { |
| | | doAdd(options, function () { |
| | |
| | | * @param callback åè° |
| | | */ |
| | | export const doAdd = (options,callback)=> { |
| | | this.$message.success('æ§è¡å¢å '); |
| | | const paramVOS = options.paramVOS; |
| | | if (!paramVOS['form'] && !paramVOS['context']) { |
| | | Vue.prototype.$message.error("æé®é
ç½®ä¸æ£ç¡®"); |
| | | return false; |
| | | } |
| | | Vue.prototype.$message.success('æ§è¡'+paramVOS.title); |
| | | if(callback){ |
| | | callback(options); |
| | | } |
| | |
| | | * @param callback åè° |
| | | */ |
| | | export const doBefore = (options,callback)=> { |
| | | this.$message.success('æ§è¡åç½®äºä»¶'); |
| | | Vue.prototype.$message.success('æ§è¡å¢å åç½®äºä»¶'); |
| | | if(callback){ |
| | | callback(options); |
| | | } |
| | |
| | | * @param callback åè° |
| | | */ |
| | | export const doAfter = (options,callback)=> { |
| | | this.$message.success('æ§è¡åç½®äºä»¶'); |
| | | Vue.prototype.$message.success('æ§è¡å¢å åç½®äºä»¶'); |
| | | if(callback){ |
| | | callback(options); |
| | | } |
| | |
| | | import {validatenull} from "@/util/validate"; |
| | | import Vue from 'vue'; |
| | | |
| | | /** |
| | | * æé®çåºç¡æå¡ |
| | |
| | | * actionéç¨å
¥å£ |
| | | */ |
| | | export const doAction = (button,options) => { |
| | | debugger; |
| | | options.paramVOS['title']=replaceFreeMarker(options.paramVOS.title,options.dataStore,options.sourceData); |
| | | |
| | | if(button.url && button.url!='null'){ |
| | | //æé
ç½®actionè·¯å¾ï¼ä½¿ç¨è·¯å¾å¯¹åºçjs |
| | | let buttonParse = parseEventByUrl(button.url,options,false); |
| | | import("../"+buttonParse.jsPath).then(module => { |
| | | import("../"+buttonParse.jsPath+".js").then(module => { |
| | | module.doAction(options); |
| | | }) |
| | | }else { |
| | | //éç¨action |
| | | const handlers = { |
| | | //æ¥ç |
| | | view: () => {}, |
| | | //å建 |
| | | add: () => {import("@/actions/base/AddAction").then(module => { |
| | | module.doAction(options); |
| | | })}, |
| | | edit: () => {}, |
| | | delete: () => {}, |
| | | //ä¿®æ¹ |
| | | edit: () => {import("@/actions/base/EditAction").then(module => { |
| | | module.doAction(options); |
| | | })}, |
| | | //å é¤ |
| | | delete: () => {import("@/actions/base/DeleteAction").then(module => { |
| | | module.doAction(options); |
| | | })}, |
| | | }; |
| | | if(validatenull(options.paramVOS.context)) { |
| | | options.paramVOS.context = options.paramVOS.content; |
| | | } |
| | | if(handlers[button.actionVO.id]){ |
| | | handlers[button.actionVO.id]() |
| | | }else{ |
| | | this.$message.error('æªæ¾å°å¯¹åºactionï¼è¯·éæ°é
ç½®æé®ï¼'); |
| | | Vue.prototype.$message.error('æªæ¾å°å¯¹åºactionï¼è¯·éæ°é
ç½®æé®ï¼'); |
| | | } |
| | | } |
| | | |
| | |
| | | * @param preEventName åç½®äºä»¶åç§°ï¼é»è®¤beforeevent |
| | | */ |
| | | export const callPreEvent = (options,fnTarget,callback,preEventName) => { |
| | | const params = paramLow(options.paramVOS); |
| | | options.paramVOS = params; |
| | | let beforeEvent = params[preEventName || 'beforeevent']; |
| | | let beforeEvent = options.paramVOS[preEventName || 'beforeevent']; |
| | | if(beforeEvent) { |
| | | let buttonParse = parseEventByUrl(beforeEvent,options,true); |
| | | if(validatenull(buttonParse.jsPath)){ |
| | |
| | | module[buttonParse.methodName](options,callback); |
| | | }) |
| | | } catch (error) { |
| | | this.$message.error('æªæ¾å°åç½®äºä»¶æ§è¡js'); |
| | | Vue.prototype.$message.error('æªæ¾å°åç½®äºä»¶æ§è¡js'); |
| | | } |
| | | } |
| | | }else{ |
| | |
| | | * @param preEventName åç½®äºä»¶åç§°ï¼é»è®¤ afterevent |
| | | */ |
| | | export const callPostEvent = (options,fnTarget,callback,postEventName)=>{ |
| | | const params = paramLow(options.paramVOS); |
| | | options.paramVOS = params; |
| | | let afterEvent = params[postEventName || 'afterevent']; |
| | | let afterEvent = options.paramVOS[postEventName || 'afterevent']; |
| | | if(afterEvent) { |
| | | let buttonParse = parseEventByUrl(afterEvent,options,false); |
| | | if(validatenull(buttonParse.jsPath)){ |
| | |
| | | module[buttonParse.methodName](options,callback); |
| | | }) |
| | | } catch (error) { |
| | | this.$message.error('æªæ¾å°åç½®äºä»¶æ§è¡js'); |
| | | Vue.prototype.$message.error('æªæ¾å°åç½®äºä»¶æ§è¡js'); |
| | | } |
| | | } |
| | | }else{ |
| | |
| | | let paramArray = url.substring(url.indexOf("?") + 1).split("&"); |
| | | paramArray.forEach(_item=>{ |
| | | if (_item.indexOf("=") < 0) { |
| | | this.$message.error(isBefore?"åç½®äºä»¶":"åç½®äºä»¶" + "çåæ°é
ç½®é误ï¼éè¦è¦xxx=yyy&zzz=açæ¹å¼"); |
| | | Vue.prototype.$message.error(isBefore?"åç½®äºä»¶":"åç½®äºä»¶" + "çåæ°é
ç½®é误ï¼éè¦è¦xxx=yyy&zzz=açæ¹å¼"); |
| | | return true; |
| | | } |
| | | params[_item.split("=")[0]] = _item.split("=")[1]; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /** |
| | | * æé®å¤ç ä¸å¡ç±»åå é¤ |
| | | */ |
| | | import {paramLow,callPreEvent,callPostEvent} from './BaseAction'; |
| | | import {validatenull} from "@/util/validate"; |
| | | import Vue from "vue"; |
| | | |
| | | export const doAction = (options) => { |
| | | options.paramVOS = paramLow(options.paramVOS) |
| | | const paramVOS = Object.assign({ |
| | | url: 'uiDataController/addSave', |
| | | method: 'post', |
| | | uploadfileurl: 'vciFileUploadController/uploadFile' |
| | | }, options.paramVOS) |
| | | options.paramVOS = paramVOS; |
| | | |
| | | options.sourceData = options.sourceData || {}; |
| | | options.dataStore = options.dataStore || []; |
| | | if (!options.dataStore || options.dataStore.length < 1) { |
| | | Vue.prototype.$message.error("è¯·éæ©éè¦å é¤çæ°æ®"); |
| | | return false; |
| | | } |
| | | if (!paramVOS.multi && options.dataStore.length > 1) { |
| | | Vue.prototype.$message.error("ä»
è½éæ©ä¸æ¡æ°æ®æ¥æä½"); |
| | | return false; |
| | | } |
| | | |
| | | callPreEvent(options, doBefore,function (options) { |
| | | doAdd(options, function () { |
| | | callPostEvent(options,doAfter, options.callback); |
| | | }); |
| | | }); |
| | | }; |
| | | |
| | | /** |
| | | * æ§è¡ |
| | | * @param options æé®çé
ç½®ä¿¡æ¯ |
| | | * @param callback åè° |
| | | */ |
| | | export const doAdd = (options,callback)=> { |
| | | const paramVOS = options.paramVOS; |
| | | Vue.prototype.$message.success('æ§è¡'+paramVOS.title); |
| | | if(callback){ |
| | | callback(options); |
| | | } |
| | | } |
| | | /** |
| | | * åç½®äºä»¶ |
| | | * @param options æé®çé
ç½®ä¿¡æ¯ |
| | | * @param callback åè° |
| | | */ |
| | | export const doBefore = (options,callback)=> { |
| | | Vue.prototype.$message.success('æ§è¡å é¤åç½®äºä»¶'); |
| | | if(callback){ |
| | | callback(options); |
| | | } |
| | | } |
| | | /** |
| | | * åç½®äºä»¶ |
| | | * @param options æé®çé
ç½®ä¿¡æ¯ |
| | | * @param callback åè° |
| | | */ |
| | | export const doAfter = (options,callback)=> { |
| | | Vue.prototype.$message.success('æ§è¡å é¤åç½®äºä»¶'); |
| | | if(callback){ |
| | | callback(options); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /** |
| | | * æé®å¤ç ä¸å¡ç±»åä¿®æ¹ |
| | | */ |
| | | import {paramLow,callPreEvent,callPostEvent} from './BaseAction'; |
| | | import {validatenull} from "@/util/validate"; |
| | | import Vue from "vue"; |
| | | |
| | | export const doAction = (options) => { |
| | | options.paramVOS = paramLow(options.paramVOS) |
| | | const paramVOS = Object.assign({ |
| | | getdataurl: 'uiDataController/dataFormQuery', |
| | | getdatamethod: 'post', |
| | | url: 'uiDataController/editSave', |
| | | method: 'put', |
| | | uploadfileurl: 'vciFileUploadController/uploadFile' |
| | | }, options.paramVOS) |
| | | options.paramVOS = paramVOS; |
| | | |
| | | options.sourceData = options.sourceData || {}; |
| | | options.dataStore = options.dataStore || []; |
| | | if (!options.dataStore || options.dataStore.length < 1) { |
| | | Vue.prototype.$message.error("è¯·éæ©éè¦ä¿®æ¹çæ°æ®"); |
| | | return false; |
| | | } |
| | | if (!paramVOS.multi && options.dataStore.length > 1) { |
| | | Vue.prototype.$message.error("ä»
è½éæ©ä¸æ¡æ°æ®æ¥æä½"); |
| | | return false; |
| | | } |
| | | callPreEvent(options, doBefore, function (options) { |
| | | doAdd(options, function () { |
| | | callPostEvent(options, doAfter, options.callback); |
| | | }); |
| | | }); |
| | | }; |
| | | |
| | | /** |
| | | * æ§è¡ |
| | | * @param options æé®çé
ç½®ä¿¡æ¯ |
| | | * @param callback åè° |
| | | */ |
| | | export const doAdd = (options,callback)=> { |
| | | const paramVOS = options.paramVOS; |
| | | if (!paramVOS['form'] && !paramVOS['context']) { |
| | | Vue.prototype.$message.error("æé®é
ç½®ä¸æ£ç¡®"); |
| | | return false; |
| | | } |
| | | Vue.prototype.$message.success('æ§è¡'+paramVOS.title); |
| | | if (callback) { |
| | | callback(options); |
| | | } |
| | | } |
| | | /** |
| | | * åç½®äºä»¶ |
| | | * @param options æé®çé
ç½®ä¿¡æ¯ |
| | | * @param callback åè° |
| | | */ |
| | | export const doBefore = (options,callback)=> { |
| | | Vue.prototype.$message.success('æ§è¡ä¿®æ¹åç½®äºä»¶'); |
| | | if(callback){ |
| | | callback(options); |
| | | } |
| | | } |
| | | /** |
| | | * åç½®äºä»¶ |
| | | * @param options æé®çé
ç½®ä¿¡æ¯ |
| | | * @param callback åè° |
| | | */ |
| | | export const doAfter = (options,callback)=> { |
| | | Vue.prototype.$message.success('æ§è¡ä¿®æ¹åç½®äºä»¶'); |
| | | if(callback){ |
| | | callback(options); |
| | | } |
| | | } |
| | |
| | | }) |
| | | } |
| | | |
| | | export const getUIContent = (query) => { |
| | | //è·åUIä¸ä¸æå®ä¹å
容 |
| | | export const getUIContext = (query) => { |
| | | return request({ |
| | | url: '/api/webUIController/getUIContentByBtmTypeAndId', |
| | | method: 'get', |
| | |
| | | </template> |
| | | <!--topåºåæé®--> |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <dynamic-button :butttonList="componentVO.buttons" :selectList="TreeSelectList" LocationType="top" |
| | | <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 :butttonList="componentVO.buttons" :scope="scope" :selectList="TreeSelectList" LocationType="menu" default="default" |
| | | <dynamic-button :componentVO="componentVO" :butttonList="componentVO.buttons" :scope="scope" :dataStore="TreeSelectList" :sourceData="sourceData" LocationType="menu" default="default" |
| | | type="TreeTable"></dynamic-button> |
| | | </template> |
| | | </avue-crud> |
| | |
| | | dataStore:row |
| | | }); |
| | | }, |
| | | handleRefresh(){ |
| | | this.$refs.treeTable.refreshTable(); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | export default { |
| | | name: "dynamic-button", |
| | | props: { |
| | | componentVO: { |
| | | type: Object, |
| | | default: {} |
| | | }, |
| | | type: { |
| | | type: String |
| | | }, |
| | |
| | | butttonList: { |
| | | type: Array |
| | | }, |
| | | selectList: { |
| | | default:{ |
| | | type:String, |
| | | }, |
| | | sourceData: { |
| | | //æé®æå±åºåçä¸ä¸åºåé䏿°æ® |
| | | type: Object, |
| | | default: {} |
| | | }, |
| | | dataStore: { |
| | | //æé®æå±åºåé䏿°æ® |
| | | type: Array, |
| | | default: [] |
| | | }, |
| | | default:{ |
| | | type:String, |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | this.$refs.dynamicForm.form = row; |
| | | }, |
| | | buttonClick(item) { |
| | | doAction(item,{ |
| | | paramVOS: item.paramVOS, |
| | | dataStore: [], |
| | | sourceData: {}, |
| | | callback: function (){ |
| | | const paramVOS=item.paramVOS; |
| | | const DefineVO = this.componentVO.treeDefineVO || this.componentVO.tableDefineVO || this.componentVO.treeTableDefineVO || this.componentVO.formDefineVO; |
| | | if (!paramVOS['title']) { |
| | | paramVOS['title'] = item.name + (DefineVO.title || DefineVO.componentTitle || ''); |
| | | } |
| | | |
| | | if (!paramVOS['type']) { |
| | | paramVOS['type'] = DefineVO.btmType; |
| | | } |
| | | /*if (paramVOS['initvalue']) { |
| | | var values = paramVOS['initvalue'].split(';'); |
| | | var initValues = [] |
| | | layui.each(values, function (i, item) { |
| | | item=item.replace(':','='); |
| | | if (item.indexOf('${') > -1) { |
| | | if (item.split('=')[1].indexOf('.') > -1) { |
| | | if (sourceData.length<1 || !sourceData[0].oid) { |
| | | isShow = false; |
| | | $webUtil.showErrorMsg("请å
鿩䏿¡æ¥æºæ°æ®"); |
| | | return false; |
| | | } |
| | | var name = item.split('=')[1].split('.')[1].replace('${', '').replace('}', ''); |
| | | if (name == 'oid') { |
| | | item = item.split('=')[0] + '=' + sourceData[0]['oid'] |
| | | } else { |
| | | item = item.split('=')[0] + '=' + sourceData[0][name] |
| | | } |
| | | } else { |
| | | if (dataStore.length < 1) { |
| | | isShow = false; |
| | | $webUtil.showErrorMsg("请å
鿩䏿¡æ°æ®"); |
| | | return false; |
| | | } |
| | | var name = item.split('=')[1].replace('${', '').replace('}', ''); |
| | | item = item.split('=')[0] + '=' + dataStore[0][name]; |
| | | |
| | | } |
| | | } |
| | | initValues.push(item) |
| | | }) |
| | | paramVOS['initvalue'] = initValues.join(';') |
| | | }*/ |
| | | if(paramVOS['BSContent'] || paramVOS['BSContext']){ |
| | | paramVOS['context']=paramVOS['BSContext'] || paramVOS['BSContent'] |
| | | paramVOS['content']=paramVOS['BSContext'] || paramVOS['BSContent']; |
| | | } |
| | | |
| | | const that=this; |
| | | doAction(item, { |
| | | paramVOS: paramVOS, |
| | | dataStore: this.dataStore || [], |
| | | sourceData: this.sourceData || {}, |
| | | callback: function () { |
| | | if (that.$parent.handleRefresh) { |
| | | that.$parent.handleRefresh() |
| | | } |
| | | } |
| | | }); |
| | | } |
| | |
| | | </el-alert> |
| | | <component v-else :is="currentComponent" |
| | | :btmType="btmType" |
| | | :content="content" |
| | | :context="context" |
| | | :inDialog="true" |
| | | :key="areasName+'customCom-'+componentVO.oid" |
| | | :componentVO="componentVO" |
| | |
| | | data() { |
| | | return { |
| | | btmType: '', |
| | | content: '', |
| | | context: '', |
| | | urlParams: {}, |
| | | height: '300px', |
| | | customClass: '', //?type=xxx&context=yyy¶m=zzz æè
ç»ä»¶name?type=xxx&context=yyy¶m=zzz |
| | |
| | | } |
| | | |
| | | this.btmType = urlParams.type; |
| | | this.content = urlParams.context; |
| | | this.context = urlParams.context; |
| | | this.urlParams = Object.assign(this.paramVOS, urlParams) |
| | | |
| | | //this.getHeight(this.$parent); |
| | |
| | | </span> |
| | | </template> |
| | | <template slot="menuForm"> |
| | | <dynamic-button :butttonList="componentVO.buttons" type="form" @buttonClick="buttonClick"></dynamic-button> |
| | | <dynamic-button :componentVO="componentVO" :butttonList="componentVO.buttons" :dataStore="[form]" :sourceData="sourceData" type="form" @buttonClick="buttonClick"></dynamic-button> |
| | | </template> |
| | | |
| | | <template v-for="item in slotData" :slot="item.prop + ''"> |
| | |
| | | @selection-change="selectChange"> |
| | | <!--topåºåæé®--> |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <dynamic-button :butttonList="componentVO.buttons" :selectList="selectList" LocationType="top" |
| | | <dynamic-button :componentVO="componentVO" :butttonList="componentVO.buttons" :dataStore="selectList" LocationType="top" :sourceData="sourceData" |
| | | type="table"></dynamic-button> |
| | | </template> |
| | | |
| | | <!--menuåºåæé®--> |
| | | <template slot="menu" slot-scope="scope"> |
| | | <dynamic-button :butttonList="componentVO.buttons" :scope="scope" :selectList="selectList" LocationType="menu" |
| | | <dynamic-button :componentVO="componentVO" :butttonList="componentVO.buttons" :scope="scope" :dataStore="selectList" :sourceData="sourceData" LocationType="menu" |
| | | type="table"></dynamic-button> |
| | | </template> |
| | | </avue-crud> |
| | |
| | | }, |
| | | searchChange(form,done){ |
| | | done(); |
| | | }, |
| | | handleRefresh(){ |
| | | this.$refs.dataTable.refreshTable(); |
| | | } |
| | | } |
| | | } |
| | |
| | | <template> |
| | | <div class="UI-dynamic" :id="'UI-dynamic-'+areasName+componentVO.oid"> |
| | | <dynamic-button v-if="componentVO.buttons && componentVO.buttons.length>0" :butttonList="componentVO.buttons" :selectList="checkDatas" type="tree" style="margin-bottom: 10px;"></dynamic-button> |
| | | <dynamic-button v-if="componentVO.buttons && componentVO.buttons.length>0" :componentVO="componentVO" |
| | | :butttonList="componentVO.buttons" :dataStore="checkDatas" |
| | | :sourceData="sourceData" type="tree" style="margin-bottom: 10px;"></dynamic-button> |
| | | <el-input |
| | | placeholder="è¾å
¥å
³é®åè¿è¡è¿æ»¤" |
| | | v-model="filterText"> |
| | |
| | | return data[this.defaultProps.label].indexOf(value) !== -1; |
| | | }, |
| | | initData() { |
| | | //弿¥è·åæ°æ® |
| | | this.data = [ |
| | | { |
| | | "attributes": { |
| | |
| | | this.checkDatas=[data]; |
| | | } |
| | | }, |
| | | handleRefresh(){ |
| | | this.initData(); |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | |
| | | <script> |
| | | import {verifyNull} from "@/util/validate"; |
| | | import UIContentArea from "@/views/base/UIContentArea" |
| | | import {getUIContent} from '@/api/base/region' |
| | | import {getUIContext} from '@/api/base/region' |
| | | |
| | | export default { |
| | | name: "UIContentViewer", |
| | |
| | | data() { |
| | | return { |
| | | btmType: '',//ä¸å¡ç±»åï¼æé¾æ¥ç±»åï¼ |
| | | content: '',//UIä¸ä¸æçåç§° |
| | | context: '',//UIä¸ä¸æçåç§° |
| | | checkedData: { |
| | | //ååºåé䏿°æ® |
| | | northArea: [{}], |
| | |
| | | } |
| | | }, |
| | | computed: { |
| | | typeAContent(){ |
| | | return this.btmType+this.content; |
| | | typeAndContext(){ |
| | | return this.btmType+this.context; |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | methods: { |
| | | getTheParameters(){ |
| | | this.btmType = this.$route.query.type; |
| | | this.content = this.$route.query.context || this.$route.query.content; |
| | | this.context = this.$route.query.context || this.$route.query.content; |
| | | this.sourceData = this.$route.query; |
| | | }, |
| | | initUI() { |
| | | getUIContent({btmType: this.btmType, id: this.content}).then(res => { |
| | | getUIContext({btmType: this.btmType, id: this.context}).then(res => { |
| | | this.uiDefineVO = res.data.obj; |
| | | this.initContent(); |
| | | this.initContext(); |
| | | }) |
| | | }, |
| | | initContent() { |
| | | initContext() { |
| | | if (this.uiDefineVO.southAreas && this.uiDefineVO.southAreas.length > 0) { |
| | | this.centerHeight = '65%'; |
| | | } else { |
| | |
| | | <!--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="northAreaInDialog" |
| | | :areasData="uiDefineVO.northAreas" |
| | | <UIContentArea :key="'northArea-'+uiDefineVO.oid" :areasData="uiDefineVO.northAreas" |
| | | :dataStore="checkedData.northArea" |
| | | :inDialog="inDialog" |
| | | :sourceData="sourceData" |
| | | :dataStore="checkedData.northAreaInDialog" |
| | | :paramVOS="paramVOS" |
| | | 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="westAreaInDialog" |
| | | 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.westAreaInDialog" |
| | | :paramVOS="paramVOS" |
| | | areas-name="westArea" |
| | | cradStyle="" |
| | | @setDataStore="setDataStore"> |
| | | </UIContentArea> |
| | | </el-aside> |
| | | <el-container style="height: 100%;display: block"> |
| | | <el-main v-if="uiDefineVO.centerAreas && uiDefineVO.centerAreas.length>0" :style="'min-height: 260px;height: '+centerHeight"> |
| | | <UIContentArea :key="'centerArea-'+uiDefineVO.oid" areas-name="centerAreaInDialog" |
| | | cradStyle="" |
| | | :areasData="uiDefineVO.centerAreas" |
| | | <el-main v-if="uiDefineVO.centerAreas && uiDefineVO.centerAreas.length>0" :style="'min-height: 300px;height: '+centerHeight"> |
| | | <UIContentArea :key="'centerArea-'+uiDefineVO.oid" :areasData="uiDefineVO.centerAreas" |
| | | :dataStore="checkedData.centerArea" |
| | | :inDialog="inDialog" |
| | | :sourceData="checkedData.westAreaInDialog[checkedData.westAreaInDialog.length-1]" |
| | | :dataStore="checkedData.centerAreaInDialog" |
| | | :paramVOS="paramVOS" |
| | | :sourceData="checkedData.westArea[checkedData.westArea.length-1]" |
| | | areas-name="centerArea" |
| | | cradStyle="" |
| | | @setDataStore="setDataStore"> |
| | | </UIContentArea> |
| | | </el-main> |
| | | <el-footer v-if="uiDefineVO.southAreas && uiDefineVO.southAreas.length>0" height="35%" style="min-height: 150px;"> |
| | | <UIContentArea :key="'southArea-'+uiDefineVO.oid" areas-name="southAreaInDialog" |
| | | cradStyle="" |
| | | :areasData="uiDefineVO.southAreas" |
| | | <el-footer v-if="uiDefineVO.southAreas && uiDefineVO.southAreas.length>0" height="35%" |
| | | style="min-height: 150px;"> |
| | | <UIContentArea :key="'southArea-'+uiDefineVO.oid" :areasData="uiDefineVO.southAreas" |
| | | :dataStore="checkedData.southArea" |
| | | :inDialog="inDialog" |
| | | :sourceData="checkedData.centerAreaInDialog[checkedData.centerAreaInDialog.length-1]" |
| | | :dataStore="checkedData.southAreaInDialog" |
| | | :paramVOS="paramVOS" |
| | | :sourceData="checkedData.centerArea[checkedData.centerArea.length-1]" |
| | | areas-name="southArea" |
| | | cradStyle="" |
| | | @setDataStore="setDataStore"> |
| | | </UIContentArea> |
| | | </el-footer> |
| | |
| | | <script> |
| | | import UIContentArea from "@/views/base/UIContentArea" |
| | | import {verifyNull} from "@/util/validate"; |
| | | import {getUIContent} from '@/api/base/region' |
| | | import {getUIContext} from '@/api/base/region' |
| | | |
| | | export default { |
| | | name: "UIContentViewerInDialog", |
| | |
| | | btmType:{ |
| | | type: String, |
| | | }, |
| | | content:{ |
| | | context:{ |
| | | type: String, |
| | | }, |
| | | inDialog: { |
| | |
| | | } |
| | | }, |
| | | watch: { |
| | | typeAContent:{ |
| | | typeAndContext:{ |
| | | handler(newV,oldV){ |
| | | if(oldV!=newV && !verifyNull(newV)){ |
| | | this.initUI(); |
| | |
| | | } |
| | | }, |
| | | computed: { |
| | | typeAContent(){ |
| | | return this.btmType+this.content; |
| | | typeAndContext(){ |
| | | return this.btmType+this.context; |
| | | } |
| | | }, |
| | | created() { |
| | | if (verifyNull(this.btmType) || verifyNull(this.content) ) { |
| | | if (verifyNull(this.btmType) || verifyNull(this.context) ) { |
| | | this.$message.error("èªå®ä¹ç»ä»¶é
ç½®çä¿¡æ¯é误ï¼è¯·åèâ?type=xxx&context=yyy¶m=zzzâè¿ç§å½¢å¼ãå
¶ä¸typeæ¯ä¸å¡ç±»åï¼æé¾æ¥ç±»åï¼ï¼contextæ¯UIä¸ä¸æçåç§°"); |
| | | return false; |
| | | } |
| | | }, |
| | | methods: { |
| | | initUI() { |
| | | getUIContent({btmType: this.btmType, id: this.content}).then(res => { |
| | | getUIContext({btmType: this.btmType, id: this.context}).then(res => { |
| | | this.uiDefineVO = res.data.obj; |
| | | this.initContent(); |
| | | this.initContext(); |
| | | }) |
| | | }, |
| | | initContent() { |
| | | initContext() { |
| | | if (this.uiDefineVO.southAreas && this.uiDefineVO.southAreas.length > 0) { |
| | | this.centerHeight = '65%'; |
| | | } else { |