已修改8个文件
已删除3个文件
已重命名4个文件
已添加2个文件
ÎļþÃû´Ó Source/plt-web/plt-web-ui/src/components/actions/base/BaseAction.js ÐÞ¸Ä |
| | |
| | | import {validatenull} from "@/util/validate"; |
| | | import Vue from 'vue'; |
| | | import {handlerAction} from '../handlers'; |
| | | import {handlerAction} from './handlers'; |
| | | |
| | | /** |
| | | * æé®çåºç¡æå¡ |
| | |
| | | } |
| | | if (button.url && button.url != 'null') { |
| | | //æé
ç½®actionè·¯å¾ï¼ä½¿ç¨è·¯å¾å¯¹åºçjs |
| | | import(`../${button.url}`).then(module => { |
| | | import(`./${button.url}`).then(module => { |
| | | module.doAction(options, callback); |
| | | }) |
| | | } else { |
| | |
| | | * @param preEventName åç½®äºä»¶åç§°ï¼é»è®¤beforeevent |
| | | */ |
| | | export const callPreEvent = (options,fnTarget,callback,preEventName) => { |
| | | let beforeEvent = options.paramVOS[preEventName || 'prepvent']; |
| | | let beforeEvent = options.paramVOS[preEventName || 'preevent']; |
| | | if(beforeEvent) { |
| | | let buttonParse = parseEventByUrl(beforeEvent,options,true); |
| | | if(buttonParse.params){ |
| | | Object.assign(options.paramVOS,buttonParse.params); |
| | | } |
| | | if(validatenull(buttonParse.jsPath)){ |
| | | fnTarget(buttonParse,callback); |
| | | fnTarget(options,callback); |
| | | }else{ |
| | | try { |
| | | import(`../${buttonParse.jsPath}.js`).then(module => { |
| | | import(`./${buttonParse.jsPath}.js`).then(module => { |
| | | module[buttonParse.methodName](options,callback); |
| | | }) |
| | | } catch (error) { |
| | |
| | | let afterEvent = options.paramVOS[postEventName || 'afterevent']; |
| | | if(afterEvent) { |
| | | let buttonParse = parseEventByUrl(afterEvent,options,false); |
| | | if(buttonParse.params){ |
| | | Object.assign(options.paramVOS,buttonParse.params); |
| | | } |
| | | if(validatenull(buttonParse.jsPath)){ |
| | | fnTarget(buttonParse,callback,actionType); |
| | | fnTarget(options,callback,actionType); |
| | | }else{ |
| | | try { |
| | | import(`../${buttonParse.jsPath}.js`).then(module => { |
| | | import(`./${buttonParse.jsPath}.js`).then(module => { |
| | | module[buttonParse.methodName](options,callback,actionType); |
| | | }) |
| | | } catch (error) { |
| | |
| | | let jsPath = url; |
| | | let methodName = defalutmethodName || (isBefore?"doBefore":"doAfter"); |
| | | let params = {}; |
| | | if (url.indexOf("?")) { |
| | | if (url.indexOf("?")>-1) { |
| | | let temp = url.substring(0, url.indexOf("?")); |
| | | if (temp.indexOf("#") > -1) { |
| | | let array = temp.split("#"); |
| | |
| | | } |
| | | let paramArray = url.substring(url.indexOf("?") + 1).split("&"); |
| | | paramArray.forEach(_item=>{ |
| | | if (_item.indexOf("=") < 0) { |
| | | Vue.prototype.$message.error(isBefore?"åç½®äºä»¶":"åç½®äºä»¶" + "çåæ°é
ç½®é误ï¼éè¦è¦xxx=yyy&zzz=açæ¹å¼"); |
| | | return true; |
| | | if(_item){ |
| | | if (_item.indexOf("=") < 0) { |
| | | Vue.prototype.$message.error(isBefore?"åç½®äºä»¶":"åç½®äºä»¶" + "çåæ°é
ç½®é误ï¼éè¦è¦xxx=yyy&zzz=açæ¹å¼"); |
| | | return true; |
| | | } |
| | | params[_item.split("=")[0]] = _item.split("=")[1]; |
| | | } |
| | | params[_item.split("=")[0]] = _item.split("=")[1]; |
| | | }) |
| | | }else{ |
| | | if (url.indexOf("#") > -1) { |
| | |
| | | /** |
| | | * æé®å¤ç ä¸å¡ç±»åæ°å¢ |
| | | */ |
| | | import {paramLow,callPreEvent, callPostEvent} from './BaseAction'; |
| | | import {paramLow,callPreEvent, callPostEvent} from '../BaseAction'; |
| | | import {validatenull} from "@/util/validate"; |
| | | import Vue from "vue"; |
| | | import AddEditDialog from "@/components/actions/AddEditDialog" |
| | | import AddEditDialog from "@/components/actions/base/AddEditDialog" |
| | | |
| | | export const doAction = (options,callback) => { |
| | | const paramVOS = Object.assign({ |
| | |
| | | */ |
| | | export const doAdd = (options,callback)=> { |
| | | const paramVOS = options.paramVOS; |
| | | if (!paramVOS['form'] && !paramVOS['context'] && !paramVOS['content']) { |
| | | if (!paramVOS['form'] && !paramVOS['context']) { |
| | | Vue.prototype.$message.error("æé®é
ç½®ä¸æ£ç¡®"); |
| | | return false; |
| | | } |
ÎļþÃû´Ó Source/plt-web/plt-web-ui/src/components/actions/AddEditDialog.vue ÐÞ¸Ä |
| | |
| | | top="0" |
| | | class="avue-dialog" |
| | | :destroy-on-close="true" |
| | | :close-on-click-modal="false" |
| | | @close="dialogClose"> |
| | | <basic-form ref="formRef" v-if="paramVOS.form" |
| | | :key="'dialog-'+paramVOS.form" |
| | |
| | | |
| | | <script> |
| | | import uiView from "@/views/base/UIContentViewerInDialog" |
| | | import {parseEventByUrl} from "@/components/actions/base/BaseAction" |
| | | import {parseEventByUrl} from "@/components/actions/BaseAction" |
| | | import {getFormDefineById,dataForm} from "@/api/base/ui"; |
| | | import {addSave,editSave} from "@/api/base/actions" |
| | | import {validatenull} from "@/util/validate" |
| | |
| | | this.formDefineId=this.$refs.uiViewRef.data[key].DefineVO.id; |
| | | if (this.paramVOS.savebeforeevent) { |
| | | var urlobj = parseEventByUrl(this.paramVOS.savebeforeevent,null,null,'doAction'); |
| | | import(`./${urlobj.jsPath}.js`).then(module => { |
| | | module[urlobj.methodName]({ |
| | | paramVOS: this.paramVOS, |
| | | dataStore: this.dataStore, |
| | | sourceData:this.sourceData |
| | | },this.formSaveHandle); |
| | | }) |
| | | if(urlobj.params){ |
| | | Object.assign(this.paramVOS,urlobj.params); |
| | | } |
| | | if(validatenull(urlobj.jsPath)){ |
| | | this.saveBforeHandle(this.paramVOS); |
| | | }else{ |
| | | try { |
| | | import(`./${urlobj.jsPath}.js`).then(module => { |
| | | module[urlobj.methodName]({ |
| | | paramVOS: this.paramVOS, |
| | | dataStore: this.dataStore, |
| | | sourceData:this.sourceData |
| | | },this.formSaveHandle); |
| | | }) |
| | | } catch (error) { |
| | | this.$message.error('æªæ¾å°ä¿ååç½®äºä»¶æ§è¡js'); |
| | | } |
| | | } |
| | | } else { |
| | | this.formSaveHandle(); |
| | | } |
| | |
| | | this.formDefineId=this.paramVOS.form; |
| | | if (this.paramVOS.savebeforeevent) { |
| | | var urlobj = parseEventByUrl(this.paramVOS.savebeforeevent,null,null,'doAction'); |
| | | import(`./${urlobj.jsPath}.js`).then(module => { |
| | | module[urlobj.methodName]({ |
| | | paramVOS: this.paramVOS, |
| | | dataStore: this.dataStore, |
| | | sourceData:this.sourceData |
| | | },that.formSaveHandle); |
| | | }) |
| | | if(urlobj.params){ |
| | | Object.assign(this.paramVOS,urlobj.params); |
| | | } |
| | | if(validatenull(urlobj.jsPath)){ |
| | | this.saveBforeHandle(this.paramVOS); |
| | | }else{ |
| | | try { |
| | | import(`./${urlobj.jsPath}.js`).then(module => { |
| | | module[urlobj.methodName]({ |
| | | paramVOS: this.paramVOS, |
| | | dataStore: this.dataStore, |
| | | sourceData: this.sourceData |
| | | }, that.formSaveHandle); |
| | | }) |
| | | } catch (error) { |
| | | this.$message.error('æªæ¾å°ä¿ååç½®äºä»¶æ§è¡js'); |
| | | } |
| | | } |
| | | } else { |
| | | that.formSaveHandle(); |
| | | } |
| | |
| | | } |
| | | if (this.paramVOS.saveafterevent) { |
| | | let urlobj = parseEventByUrl(this.paramVOS.saveafterevent,null,null,'doAction'); |
| | | import(`./${urlobj.jsPath}.js`).then(module => { |
| | | module[urlobj.methodName]({ |
| | | paramVOS: this.paramVOS, |
| | | dataStore: this.dataStore, |
| | | sourceData:this.sourceData |
| | | }); |
| | | }) |
| | | if(urlobj.params){ |
| | | Object.assign(this.paramVOS,urlobj.params); |
| | | } |
| | | if(validatenull(urlobj.jsPath)){ |
| | | this.saveAfterHandle(this.paramVOS); |
| | | }else{ |
| | | try { |
| | | import(`./${urlobj.jsPath}.js`).then(module => { |
| | | module[urlobj.methodName]({ |
| | | paramVOS: this.paramVOS, |
| | | dataStore: this.dataStore, |
| | | sourceData:this.sourceData |
| | | }); |
| | | }) |
| | | } catch (error) { |
| | | this.$message.error('æªæ¾å°ä¿ååç½®äºä»¶æ§è¡js'); |
| | | } |
| | | } |
| | | } |
| | | that.dialogClose(); |
| | | }); |
| | |
| | | } |
| | | if (this.paramVOS.saveafterevent) { |
| | | let urlobj = parseEventByUrl(this.paramVOS.saveafterevent,null,null,'doAction'); |
| | | import(`./${urlobj.jsPath}.js`).then(module => { |
| | | module[urlobj.methodName]({ |
| | | paramVOS: this.paramVOS, |
| | | dataStore: this.dataStore, |
| | | sourceData:this.sourceData |
| | | }); |
| | | }) |
| | | if(urlobj.params){ |
| | | Object.assign(this.paramVOS,urlobj.params); |
| | | } |
| | | if(validatenull(urlobj.jsPath)){ |
| | | this.saveAfterHandle(this.paramVOS); |
| | | }else{ |
| | | try { |
| | | import(`./${urlobj.jsPath}.js`).then(module => { |
| | | module[urlobj.methodName]({ |
| | | paramVOS: this.paramVOS, |
| | | dataStore: this.dataStore, |
| | | sourceData:this.sourceData |
| | | }); |
| | | }) |
| | | } catch (error) { |
| | | this.$message.error('æªæ¾å°ä¿ååç½®äºä»¶æ§è¡js'); |
| | | } |
| | | } |
| | | } |
| | | that.dialogClose(); |
| | | }); |
| | |
| | | }, |
| | | getFormData(form) { |
| | | this.form = form; |
| | | } |
| | | }, |
| | | //ä¿ååç½®äºä»¶ |
| | | saveBforeHandle(params){ |
| | | this.$message.info('æ§è¡ä¿ååç½®äºä»¶'); |
| | | }, |
| | | //ä¿ååç½®äºä»¶ |
| | | saveAfterHandle(params){ |
| | | this.$message.info('ä¿ååç½®äºä»¶æ§è¡'); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | /** |
| | | * æé®å¤ç ä¸å¡ç±»åå é¤ |
| | | */ |
| | | import {paramLow,callPreEvent,callPostEvent,replaceFreeMarker} from './BaseAction'; |
| | | import {paramLow,callPreEvent,callPostEvent,replaceFreeMarker} from '../BaseAction'; |
| | | import {validatenull} from "@/util/validate"; |
| | | import Vue from "vue"; |
| | | import { del} from "@/api/base/actions" |
| | |
| | | */ |
| | | export const doDelete = (options,callback)=> { |
| | | let submitData = { |
| | | type:options.paramVOS.type || 1,//1ï¼å é¤ç次, 2ï¼å é¤çæ¬, 3ï¼å é¤ä¸»å¯¹è±¡ãé»è®¤å¼1ã |
| | | checkLinkedFlag:options.paramVOS.checklinkedflag, |
| | | cascade:options.paramVOS.cascade, |
| | | adminCascade:options.paramVOS.admincascade |
| | |
| | | /** |
| | | * æé®å¤ç ä¸å¡ç±»åä¿®æ¹ |
| | | */ |
| | | import {paramLow,callPreEvent,callPostEvent} from './BaseAction'; |
| | | import {paramLow,callPreEvent,callPostEvent} from '../BaseAction'; |
| | | import {validatenull} from "@/util/validate"; |
| | | import Vue from "vue"; |
| | | import AddEditDialog from "@/components/actions/AddEditDialog"; |
| | | import AddEditDialog from "@/components/actions/base/AddEditDialog"; |
| | | |
| | | export const doAction = (options,callback) => { |
| | | const paramVOS = Object.assign({ |
| | |
| | | /** |
| | | * æé®å¤ç ä¸å¡ç±»ååçº§çæ¬ |
| | | */ |
| | | import {paramLow,callPreEvent,callPostEvent} from './BaseAction'; |
| | | import {paramLow,callPreEvent,callPostEvent} from '../BaseAction'; |
| | | import {validatenull} from "@/util/validate"; |
| | | import Vue from "vue"; |
| | | import RevisionDialog from "@/components/actions/RevisionDialog"; |
| | | import RevisionDialog from "@/components/actions/base/RevisionDialog"; |
| | | |
| | | export const doAction = (options,callback) => { |
| | | const paramVOS = Object.assign({ |
ÎļþÃû´Ó Source/plt-web/plt-web-ui/src/components/actions/RevisionDialog.vue ÐÞ¸Ä |
| | |
| | | |
| | | <script> |
| | | import uiView from "@/views/base/UIContentViewerInDialog" |
| | | import {parseEventByUrl} from "@/components/actions/base/BaseAction" |
| | | import {parseEventByUrl} from "@/components/actions/BaseAction" |
| | | import {getFormDefineById,dataForm} from "@/api/base/ui"; |
| | | import {upRevision} from "@/api/base/actions" |
| | | import {validatenull} from "@/util/validate" |
| | |
| | | /** |
| | | * æé®å¤ç 页é¢å±ç¤ºä¸ºtabéé¡¹å¡ |
| | | */ |
| | | import {paramLow,callPreEvent,callPostEvent,replaceFreeMarker} from './BaseAction'; |
| | | import {paramLow,callPreEvent,callPostEvent,replaceFreeMarker} from '../BaseAction'; |
| | | import {validatenull} from "@/util/validate"; |
| | | import Vue from "vue"; |
| | | import ViewDialog from "@/components/actions/ViewDialog"; |
| | | import ViewDialog from "@/components/actions/base/ViewDialog"; |
| | | |
| | | export const doAction = (options,callback) => { |
| | | const paramVOS = Object.assign({ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | //èªå®ä¹Actionï¼åå»ºèµæºåç±» |
| | | import {callPreEvent, callPostEvent} from '../BaseAction'; |
| | | import Vue from "vue"; |
| | | import Dialog from "./AddResourceFolderDialog"; |
| | | |
| | | /** |
| | | * å
¥å£æ¹æ³ |
| | | * @param options æé®çé
置信æ¯ï¼å¼ä¸º{paramVOS:{æé®é
ç½®çåæ°ä¿¡æ¯ï¼keyå¼å·²å
¨é¨è½¬æå°å},dataStore:[æé®æå¨åºåé䏿°æ®],sourceData:{æé®ä¸ä¸åºåé䏿°æ®}} |
| | | * @param callback æ§è¡å®ååè°ï¼é»è®¤å·æ°åºåæ°æ® |
| | | */ |
| | | export const doAction = (options,callback) => { |
| | | options.sourceData = options.sourceData || {}; |
| | | |
| | | //æ§è¡é
ç½®çpreeventåç½®äºä»¶ |
| | | callPreEvent(options, doBefore, function (options) { |
| | | //æ§è¡ä¸å¡ |
| | | doAdd(options, function () { |
| | | //æ§è¡é
ç½®çaftereventåç½®äºä»¶ |
| | | callPostEvent(options, doAfter, callback); |
| | | }); |
| | | }); |
| | | }; |
| | | |
| | | /** |
| | | * æ§è¡ä¸å¡ |
| | | * @param options æé®çé
ç½®ä¿¡æ¯ |
| | | * @param callback åè° |
| | | */ |
| | | export const doAdd = (options,callback)=> { |
| | | const paramVOS = options.paramVOS; |
| | | |
| | | //æ çªå£å±ç¤ºç´æ¥åé»è¾ä»£ç |
| | | |
| | | |
| | | //æçªå£å±ç¤ºæ¶å以ä¸ä»£ç |
| | | //妿çªå£æ³å±ç¤ºUIä¸ä¸æï¼åå¿
é¡»é
ç½®contextåtype |
| | | if (!paramVOS['type'] && paramVOS['context']) { |
| | | Vue.prototype.$message.error("å±ç¤ºUIä¸ä¸ææ¶å¿
é¡»é
ç½®ä¸å¡ç±»åtype"); |
| | | return false; |
| | | } |
| | | //Dialog为è¦å±ç¤ºççªå£ç»ä»¶ï¼å
å¨é¡¶é¨importå¼å
¥ |
| | | const dialogConstructor = Vue.extend(Dialog); |
| | | let instance = new dialogConstructor(); |
| | | instance.sourceData = options.sourceData; |
| | | instance.dataStore = options.dataStore; |
| | | instance.paramVOS = paramVOS; |
| | | instance.type='add';//æé®çæä½ç±»å |
| | | |
| | | instance.dialogClose = function () { |
| | | vm.visible = false; |
| | | document.body.removeChild(vm.$el); |
| | | instance.$destroy(); |
| | | instance = null; |
| | | }; |
| | | if (callback) { |
| | | instance.saveCallback = callback; |
| | | } |
| | | let vm = instance.$mount(); |
| | | document.body.appendChild(vm.$el); |
| | | //æ¾ç¤ºdialogçªå£ |
| | | instance.visible = true; |
| | | |
| | | } |
| | | /** |
| | | * preeventåç½®äºä»¶ |
| | | * @param options æé®çé
ç½®ä¿¡æ¯ |
| | | * @param callback åè° |
| | | */ |
| | | export const doBefore = (options,callback)=> { |
| | | console.log("æ§è¡åç½®äºä»¶"); |
| | | Vue.prototype.$message.success("æ§è¡åç½®äºä»¶"); |
| | | if(callback){ |
| | | callback(options); |
| | | } |
| | | } |
| | | /** |
| | | * aftereventåç½®äºä»¶ |
| | | * @param options æé®çé
ç½®ä¿¡æ¯ |
| | | * @param callback åè° |
| | | */ |
| | | export const doAfter = (options,callback)=> { |
| | | console.log('æ§è¡åç½®äºä»¶'); |
| | | Vue.prototype.$message.success("æ§è¡åç½®äºä»¶"); |
| | | if(callback){ |
| | | const actionType='add';//actionTypeéå¿
ä¼ ï¼å½æé®æä½åºå为æ ï¼å¹¶ä¸æ§è¡å 餿¶å»ºè®®ä¼ å¼âdelâï¼é¿å
å·æ°æ´ä¸ªæ |
| | | callback(actionType); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog v-dialogDrag |
| | | :title="title" |
| | | :visible.sync="visible" |
| | | :width="width" |
| | | :fullscreen="fullscreen" |
| | | :append-to-body="true" |
| | | top="0" |
| | | class="avue-dialog" |
| | | :destroy-on-close="true" |
| | | :close-on-click-modal="false" |
| | | @close="dialogClose"> |
| | | <!--çªå£æ¾ç¤ºå
容--> |
| | | <!--å±ç¤ºUIä¸ä¸æ--> |
| | | <ui-view ref="uiViewRef" v-if="paramVOS.context" |
| | | :key="'AddDialog-'+paramVOS.context" |
| | | :style="fullscreen?'':'height:'+height" |
| | | :btmType="paramVOS.type" |
| | | :context="paramVOS.context" |
| | | :inDialog="true" |
| | | :canEdit="true" |
| | | :actionType="type" |
| | | :sourceData="sourceData" |
| | | :dataStore="dataStore" |
| | | :paramVOS="paramVOS" |
| | | @getFormData="getFormData" |
| | | ></ui-view> |
| | | <!--éUIä¸ä¸æ--> |
| | | <div v-else>è¿éæ¯çªå£æ¾ç¤ºå
容</div> |
| | | |
| | | <!--åºé¨æé®ï¼éå¿
æ--> |
| | | <div class="dialog-footer avue-dialog__footer"> |
| | | <el-button type="primary" plain size="small" @click="save" >ä¿ å</el-button> |
| | | <el-button size="small" @click="dialogClose">å æ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | import uiView from "@/views/base/UIContentViewerInDialog" |
| | | import {validatenull} from "@/util/validate" |
| | | import {parseEventByUrl} from "@/components/actions/BaseAction"; |
| | | |
| | | export default { |
| | | name: "AddResourceFolderDialog", |
| | | components:{uiView}, |
| | | props: { |
| | | sourceData: { |
| | | //æå±åºåçä¸ä¸åºåé䏿°æ® |
| | | type: Object, |
| | | default: {} |
| | | }, |
| | | dataStore: { |
| | | //å¼¹çªæ¶æé®æå±åºåé䏿°æ® |
| | | type: Array, |
| | | default: [] |
| | | }, |
| | | paramVOS: { |
| | | type: Object, |
| | | default: {} |
| | | } |
| | | }, |
| | | data(){ |
| | | return { |
| | | type: "add", |
| | | visible: false, |
| | | form:{}//表å对象 |
| | | } |
| | | }, |
| | | computed:{ |
| | | title(){ |
| | | return this.paramVOS.title || (this.type=='add'?'æ·»å ':'ä¿®æ¹') |
| | | }, |
| | | width() { |
| | | if (!validatenull(this.paramVOS.width)) { |
| | | if (this.paramVOS.width.includes("px") || this.paramVOS.width.includes("%")) { |
| | | return this.paramVOS.width; |
| | | } else { |
| | | return this.paramVOS.width + "px"; |
| | | } |
| | | } else { |
| | | return "60%"; |
| | | } |
| | | }, |
| | | height(){ |
| | | if (!validatenull(this.paramVOS.height)) { |
| | | if (this.paramVOS.height.includes("px") || this.paramVOS.height.includes("%")) { |
| | | return this.paramVOS.height; |
| | | } else { |
| | | return this.paramVOS.height + "px"; |
| | | } |
| | | } else { |
| | | return "auto" |
| | | } |
| | | }, |
| | | fullscreen(){ |
| | | if(this.paramVOS.width || this.paramVOS.height){ |
| | | return false; |
| | | }else if(this.paramVOS.form){ |
| | | return false; |
| | | } |
| | | return true; |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | watch: {}, |
| | | methods: { |
| | | //å
³éå¼¹çª |
| | | dialogClose() { |
| | | this.visible = false; |
| | | }, |
| | | //ä¿å |
| | | save() { |
| | | //æä¿ååç½®äºä»¶ |
| | | if (this.paramVOS.savebeforeevent) { |
| | | var urlobj = parseEventByUrl(this.paramVOS.savebeforeevent, null, null, 'doAction'); |
| | | if(urlobj.params){ |
| | | Object.assign(this.paramVOS,urlobj.params); |
| | | } |
| | | if(validatenull(urlobj.jsPath)){ |
| | | this.saveBforeHandle(this.paramVOS); |
| | | }else{ |
| | | try { |
| | | import(`./${urlobj.jsPath}.js`).then(module => { |
| | | module[urlobj.methodName]({ |
| | | paramVOS: this.paramVOS, |
| | | dataStore: this.dataStore, |
| | | sourceData: this.sourceData |
| | | }, this.saveHandle); |
| | | }) |
| | | } catch (error) { |
| | | this.$message.error('æªæ¾å°ä¿ååç½®äºä»¶æ§è¡js'); |
| | | } |
| | | } |
| | | |
| | | }else{ |
| | | //ç´æ¥ä¿å |
| | | this.saveHandle(); |
| | | } |
| | | }, |
| | | saveHandle(){ |
| | | let that=this; |
| | | |
| | | //æ§è¡ä¿åé»è¾ |
| | | |
| | | //ä¿åæåå |
| | | that.$message({ |
| | | type: "success", |
| | | message: that.paramVOS.successmsg||"ä¿åæå!" |
| | | }); |
| | | if(that.saveCallback){ |
| | | that.saveCallback(that.type); |
| | | } |
| | | if (this.paramVOS.saveafterevent) { |
| | | let urlobj = parseEventByUrl(this.paramVOS.saveafterevent,null,null,'doAction'); |
| | | if(urlobj.params){ |
| | | Object.assign(this.paramVOS,urlobj.params); |
| | | } |
| | | if(validatenull(urlobj.jsPath)){ |
| | | this.saveAfterHandle(this.paramVOS); |
| | | }else{ |
| | | try { |
| | | import(`./${urlobj.jsPath}.js`).then(module => { |
| | | module[urlobj.methodName]({ |
| | | paramVOS: this.paramVOS, |
| | | dataStore: this.dataStore, |
| | | sourceData:this.sourceData |
| | | }); |
| | | }) |
| | | } catch (error) { |
| | | this.$message.error('æªæ¾å°ä¿ååç½®äºä»¶æ§è¡js'); |
| | | } |
| | | } |
| | | |
| | | } |
| | | that.dialogClose(); |
| | | }, |
| | | //ä¿ååç½®äºä»¶ |
| | | saveBforeHandle(params){ |
| | | this.$message.info('æ§è¡ä¿ååç½®äºä»¶'); |
| | | }, |
| | | //ä¿ååç½®äºä»¶ |
| | | saveAfterHandle(params){ |
| | | this.$message.info('ä¿ååç½®äºä»¶æ§è¡'); |
| | | }, |
| | | getFormData(form) { |
| | | this.form = form; |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | |
| | | <el-button :key="item.oid" :icon="item.paramVOS.icon" |
| | | :type="item.paramVOS.btnType || 'primary'" plain |
| | | size="small" |
| | | @click="buttonClick(item)"> |
| | | {{ item.name }} |
| | | </el-button> |
| | | @click="buttonClick(item)">{{ item.name }}</el-button> |
| | | </el-tooltip> |
| | | |
| | | <el-button type="text" @click="handleDefaultAddChildren(scope.row)" v-if="(LocationType === 'menu' && type === 'TreeTable')">æ°å¢å级</el-button> |
| | |
| | | :icon="item.paramVOS.icon ? item.paramVOS.icon : (item.id === 'edit' ? 'el-icon-edit' : (item.id === 'delete' ||item.id === 'del' ? 'el-icon-delete' : ''))" |
| | | :type="item.paramVOS.btnType || 'text'" plain |
| | | size="small" |
| | | @click="buttonClick(item,scope.row)"> |
| | | {{ item.name }} |
| | | </el-button> |
| | | @click="buttonClick(item,scope.row)">{{ item.name }}</el-button> |
| | | </el-tooltip> |
| | | |
| | | <!-- è¡¨æ ¼å
æé®æä½å¯¹è¯æ¡è¡¨å --> |
| | |
| | | :type="item.paramVOS.btnType || 'primary'" |
| | | plain |
| | | size="small" |
| | | @click="buttonClick(item)"> |
| | | {{ item.name }} |
| | | </el-button> |
| | | @click="buttonClick(item)">{{ item.name }}</el-button> |
| | | </el-tooltip> |
| | | </div> |
| | | <div v-else-if="type === 'tree'" class="tree-buttons"> |
| | |
| | | :type="item.paramVOS.btnType || 'primary'" |
| | | plain |
| | | size="small" |
| | | @click="buttonClick(item)"> |
| | | {{ item.name }} |
| | | </el-button> |
| | | @click="buttonClick(item)">{{ item.name }}</el-button> |
| | | </el-tooltip> |
| | | <el-button type="primary" |
| | | plain |
| | | size="small" |
| | | @click="$emit('refresh')"> |
| | | å·æ° |
| | | </el-button> |
| | | @click="$emit('refresh')">å·æ°</el-button> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | <script> |
| | | import func from "@/util/func"; |
| | | import {validatenull} from "@/util/validate"; |
| | | import {doAction} from '@/components/actions/base/BaseAction'; |
| | | import {doAction} from '@/components/actions/BaseAction'; |
| | | import Vue from "vue"; |
| | | |
| | | export default { |
| | |
| | | node.loaded = false; |
| | | node.expand(); |
| | | this.isRefresh=true; |
| | | this.$refs.tree.setCurrentNode(this.currentClickNode); |
| | | } |
| | | } |
| | | } |
| | |
| | | }, |
| | | methods: {}, |
| | | created() { |
| | | |
| | | //è·åå°ååæ° |
| | | console.log(this.$route.query) |
| | | }, |
| | | |
| | | mounted() { |
| | | }, |
| | | watch: {}, |
| | | |
| | | |
| | | } |
| | | </script> |
| | | |