diff --git a/src/codelist/codelist-service.ts b/src/codelist/codelist-service.ts index 5401dc6742434889ecd0bc1cd560d342314960ad..3c519380fde1f54b4d9f6dc2041dc8818b4fbdcc 100644 --- a/src/codelist/codelist-service.ts +++ b/src/codelist/codelist-service.ts @@ -39,7 +39,7 @@ export default class CodeListService { * @type {Map<string,any>} * @memberof CodeListService */ - public static codelistCache:Map<string,any> = new Map(); + public static codelistCache: Map<string, any> = new Map(); /** * 鍔ㄦ€佷唬鐮佽〃缂撳瓨(宸插畬鎴�) @@ -47,7 +47,7 @@ export default class CodeListService { * @type {Map<string,any>} * @memberof CodeListService */ - public static codelistCached:Map<string,any> = new Map(); + public static codelistCached: Map<string, any> = new Map(); /** * 鏁版嵁鏈嶅姟鍩虹被 @@ -55,7 +55,7 @@ export default class CodeListService { * @type {Minorentity} * @memberof CodeListService */ - public entityService:EntityService = new EntityService(); + public entityService: EntityService = new EntityService(); /** * 鑾峰彇浠g爜琛ㄦ湇鍔� @@ -79,15 +79,15 @@ export default class CodeListService { * @returns {Promise<any[]>} * @memberof CodeListService */ - public async getDataItems(codelist:any,context?:any, data?: any, isloading?: boolean){ - let dataItems:Array<any> = []; - try{ - if(codelist.tag && Object.is(codelist.type,"STATIC")){ + public async getDataItems(codelist: any, context?: any, data?: any, isloading?: boolean) { + let dataItems: Array<any> = []; + try { + if (codelist.tag && Object.is(codelist.type, "STATIC")) { dataItems = await this.getStaticItems(codelist.tag); - }else{ - dataItems = await this.getItems(codelist.tag,codelist.context,codelist.viewparam,codelist.isloading); + } else { + dataItems = await this.getItems(codelist.tag, codelist.context, codelist.viewparam, codelist.isloading); } - }catch(error){ + } catch (error) { console.warn("浠g爜琛ㄥ姞杞藉紓甯�" + error); } return dataItems; @@ -100,8 +100,8 @@ export default class CodeListService { * @returns {Promise<any[]>} * @memberof CodeListService */ - public getStaticItems(tag: string):Promise<any[]>{ - return new Promise((resolve:any,reject:any) =>{ + public getStaticItems(tag: string): Promise<any[]> { + return new Promise((resolve: any, reject: any) => { const codelist = this.$store.getters.getCodeList(tag); if (codelist) { let items: Array<any> = [...JSON.parse(JSON.stringify(codelist.items))]; @@ -117,33 +117,17 @@ export default class CodeListService { * @returns {Promise<any[]>} * @memberof CodeListService */ - public getPredefinedItems(tag: string,data?: any, isloading?: boolean):Promise<any[]>{ - return new Promise((resolve:any,reject:any) =>{ - if(CodeListService.codelistCached.get(`${tag}`)){ - let items:any = CodeListService.codelistCached.get(`${tag}`).items; - if(items.length >0) resolve(items); - } - const callback:Function = (tag:string,promise:Promise<any>) =>{ - promise.then((res:any) =>{ - let result:any = res.data; - if(result.items && result.items.length > 0){ - CodeListService.codelistCached.set(`${tag}`,{items:result.items}); - return resolve(result.items); - }else{ - return resolve([]); - } - }).catch((result:any) =>{ - return reject(result); - }) - } - // 鍔犺浇涓紝UI鍙堥渶瑕佹暟鎹紝瑙e喅杩炵画鍔犺浇鍚屼竴浠g爜琛ㄩ棶棰� - if(CodeListService.codelistCache.get(`${tag}`)){ - callback(tag,CodeListService.codelistCache.get(`${tag}`)); - }else{ - let result:Promise<any> = this.entityService.getPredefinedCodelist(tag); - CodeListService.codelistCache.set(`${tag}`,result); - callback(tag,result); - } + public getPredefinedItems(tag: string, data?: any, isloading?: boolean): Promise<any[]> { + return new Promise((resolve: any, reject: any) => { + this.entityService.getPredefinedCodelist(tag).then((response: any) => { + if (response && response.status === 200 && response.data && response.data.items) { + resolve(response.data.items); + } else { + resolve([]); + } + }).catch((error: any) => { + resolve([]); + }); }) } @@ -155,70 +139,77 @@ export default class CodeListService { * @returns {Promise<any[]>} * @memberof CodeListService */ - public getItems(tag: string,context:any = {}, data?: any, isloading?: boolean): Promise<any[]> { + public getItems(tag: string, context: any = {}, data?: any, isloading?: boolean): Promise<any[]> { let _this: any = this; - if(context && context.srfsessionid){ + if (context && context.srfsessionid) { delete context.srfsessionid; } - return new Promise((resolve:any,reject:any) =>{ - this.getService(tag).then((codelist:any) =>{ - if(Object.is(codelist.predefinedType,"RUNTIME")){ - this.getPredefinedItems(tag).then((res:any) =>{ - resolve(res); - }) - return; - } - let isEnableCache:boolean = codelist.isEnableCache; - let cacheTimeout:any = codelist.cacheTimeout; - // 鍚敤缂撳瓨 - if(isEnableCache){ - const callback:Function = (context:any ={},data:any ={},tag:string,promise:Promise<any>) =>{ - const callbackKey:string = `${JSON.stringify(context)}-${JSON.stringify(data)}-${tag}`; - promise.then((result:any) =>{ - if(result.length > 0){ - CodeListService.codelistCached.set(callbackKey,{items:result}); - CodeListService.codelistCache.delete(callbackKey); - return resolve(result); - }else{ - return resolve([]); - } - }).catch((result:any) =>{ - return reject(result); - }) - } - // 鍔犺浇瀹屾垚,浠庢湰鍦扮紦瀛樿幏鍙� - const key:string = `${JSON.stringify(context)}-${JSON.stringify(data)}-${tag}`; - if(CodeListService.codelistCached.get(key)){ - let items:any = CodeListService.codelistCached.get(key).items; - if(items.length >0){ - if(new Date().getTime() <= codelist.getExpirationTime()){ - return resolve(items); - } + return new Promise((resolve: any, reject: any) => { + this.getService(tag).then((codelist: any) => { + let isEnableCache: boolean = codelist.isEnableCache; + let cacheTimeout: any = codelist.cacheTimeout; + // 鍚敤缂撳瓨 + if (isEnableCache) { + const callback: Function = (context: any = {}, data: any = {}, tag: string, promise: Promise<any>) => { + const callbackKey: string = `${JSON.stringify(context)}-${JSON.stringify(data)}-${tag}`; + promise.then((result: any) => { + if (result.length > 0) { + CodeListService.codelistCached.set(callbackKey, { items: result }); + CodeListService.codelistCache.delete(callbackKey); + return resolve(result); + } else { + return resolve([]); + } + }).catch((result: any) => { + return reject(result); + }) + } + // 鍔犺浇瀹屾垚,浠庢湰鍦扮紦瀛樿幏鍙� + const key: string = `${JSON.stringify(context)}-${JSON.stringify(data)}-${tag}`; + if (CodeListService.codelistCached.get(key)) { + let items: any = CodeListService.codelistCached.get(key).items; + if (items.length > 0) { + if (new Date().getTime() <= codelist.getExpirationTime()) { + return resolve(items); } } - if (codelist) { - // 鍔犺浇涓紝UI鍙堥渶瑕佹暟鎹紝瑙e喅杩炵画鍔犺浇鍚屼竴浠g爜琛ㄩ棶棰� - if(CodeListService.codelistCache.get(key)){ - callback(context,data,tag,CodeListService.codelistCache.get(key)); - }else{ - let result:Promise<any> = codelist.getItems(context,data,isloading); - CodeListService.codelistCache.set(key,result); - codelist.setExpirationTime(new Date().getTime() + cacheTimeout); - callback(context,data,tag,result); + } + if (codelist) { + // 鍔犺浇涓紝UI鍙堥渶瑕佹暟鎹紝瑙e喅杩炵画鍔犺浇鍚屼竴浠g爜琛ㄩ棶棰� + if (CodeListService.codelistCache.get(key)) { + callback(context, data, tag, CodeListService.codelistCache.get(key)); + } else { + let result: Promise<any>; + if (Object.is(codelist.predefinedType, "RUNTIME")) { + result = this.getPredefinedItems(tag); + } else { + result = codelist.getItems(context, data, isloading); } + CodeListService.codelistCache.set(key, result); + codelist.setExpirationTime(new Date().getTime() + cacheTimeout); + callback(context, data, tag, result); } - }else{ - if (codelist) { - codelist.getItems(context,data,isloading).then((result:any) =>{ + } + } else { + if (codelist) { + if (Object.is(codelist.predefinedType, "RUNTIME")) { + this.getPredefinedItems(tag).then((res: any) => { + resolve(res); + }).catch((error: any) => { + Promise.reject([]); + }) + } else { + codelist.getItems(context, data, isloading).then((result: any) => { resolve(result); - }).catch((error:any) =>{ + }).catch((error: any) => { Promise.reject([]); }) - }else{ - return Promise.reject([]); - } + } + } else { + return Promise.reject([]); } - }).catch((error:any) =>{ + } + }).catch((error: any) => { console.warn("鑾峰彇浠g爜琛ㄥ紓甯�"); return Promise.reject([]); }) diff --git a/src/components/app-file-upload/app-file-upload.vue b/src/components/app-file-upload/app-file-upload.vue index 62586d60ed7768711437ba9b2323d6f55f227098..9af32472922db3f2c7a67886630fcb093f40cbfc 100644 --- a/src/components/app-file-upload/app-file-upload.vue +++ b/src/components/app-file-upload/app-file-upload.vue @@ -22,7 +22,7 @@ :show-file-list="!rowPreview" :on-exceed = "handleExceed" > - <el-button v-if="!isdrag" size='small' icon='el-icon-upload' :disabled="disabled || !(multiple || files.length === 0)">{{this.$t('app.fileUpload.caption')}}</el-button> + <el-button v-if="!isdrag" size='small' icon='el-icon-upload' :disabled="disabled">{{this.$t('app.fileUpload.caption')}}</el-button> <i v-if="isdrag" class="el-icon-upload"></i> <div v-if="isdrag" class="el-upload__text" v-html="$t('components.appFileUpload.uploadText')"></div> </el-upload> diff --git a/src/components/app-form-item/app-form-item.less b/src/components/app-form-item/app-form-item.less index 9c48fcf0d9cc2e4720d8816ca9ceb3313b0c3782..12c059767ca4e6361334a456b6bdfc0fd412d828 100644 --- a/src/components/app-form-item/app-form-item.less +++ b/src/components/app-form-item/app-form-item.less @@ -9,7 +9,6 @@ } } .app-form-item-label { - line-height: 21px; padding: 6px 10px 6px 0px; overflow: hidden; text-overflow: ellipsis; @@ -44,7 +43,7 @@ } .app-form-item.label-none { - >.app-form-item-label { + .app-form-item-label { display: none !important; } } \ No newline at end of file diff --git a/src/components/app-menu-item/app-menu-item.vue b/src/components/app-menu-item/app-menu-item.vue index 456f5a2dcfb366baa706847db4e53d5731f3029c..2f7337078f59a8a756be21256bdaf3b207ddea9f 100644 --- a/src/components/app-menu-item/app-menu-item.vue +++ b/src/components/app-menu-item/app-menu-item.vue @@ -13,7 +13,7 @@ <template v-else> <i v-if="isFirst" class='fa fa-cogs app-menu-icon'></i> </template> - <span ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name}`)">{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span> + <span ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)">{{$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)}}</span> </template> <app-menu-item :isCollapse="isCollapse" :menus="item.items" :ctrlName="ctrlName" :isFirst="false" :counterdata="counterdata" :popper-class="popperClass"></app-menu-item> </el-submenu> @@ -23,18 +23,18 @@ <el-menu-item :class="[{'isFirst' : isFirst},item.textcls]" v-show="!item.hidden" :index="item.name" :key="item.id"> <template v-if="item.icon && item.icon != ''"> <img :src="item.icon" class='app-menu-icon' /> - <span v-if="(isFirst && isCollapse) ? true : false" ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name}`)">{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span> + <span v-if="(isFirst && isCollapse) ? true : false" ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)">{{$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)}}</span> </template> <template v-else-if="item.iconcls && item.iconcls != ''"> <i :class="[item.iconcls, 'app-menu-icon']"></i> - <span v-if="(isFirst && isCollapse) ? true : false" ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name}`)">{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span> + <span v-if="(isFirst && isCollapse) ? true : false" ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)">{{$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)}}</span> </template> <template v-else> <i v-if="isFirst" class='fa fa-cogs app-menu-icon'></i> - <span v-if="(isFirst && isCollapse) ? true : false" ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name}`)">{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span> + <span v-if="(isFirst && isCollapse) ? true : false" ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)">{{$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)}}</span> </template> <template slot="title"> - <span :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name}`)">{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span> + <span :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)">{{$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)}}</span> <template v-if="counterdata && counterdata[item.counterid] && counterdata[item.counterid] > 0"> <span class="pull-right"> <badge :count="counterdata[item.counterid]" :overflow-count="9999"></badge> diff --git a/src/components/app-org-select/app-org-select.vue b/src/components/app-org-select/app-org-select.vue index c9de0c66eb7c6289152b7471cd7701d13cb94a18..f49faa4c1796815e942ce443cecdde2a68ad7da1 100644 --- a/src/components/app-org-select/app-org-select.vue +++ b/src/components/app-org-select/app-org-select.vue @@ -219,7 +219,7 @@ export default class AppOrgSelect extends Vue { */ public loadTreeData(requestUrl:string){ if(this.filter){ - const result:any = this.$store.getters.getOrgData(requestUrl); + const result:any = this.$store.getters.getOrgData(this.filter); if(result){ this.NodesData = result; return; @@ -232,7 +232,7 @@ export default class AppOrgSelect extends Vue { } this.NodesData = res.data; if(this.filter){ - this.$store.commit('addOrgData', { srfkey: requestUrl, orgData: res.data }); + this.$store.commit('addOrgData', { srfkey: this.filter, orgData: res.data }); } }) } diff --git a/src/components/app-quick-menus/app-quick-menus.vue b/src/components/app-quick-menus/app-quick-menus.vue index 2e3e0bb3da4082c1807e34287e013192cae735e4..e4636569f6f22ce2444647e79f8c8b30e7f5ea40 100644 --- a/src/components/app-quick-menus/app-quick-menus.vue +++ b/src/components/app-quick-menus/app-quick-menus.vue @@ -8,7 +8,7 @@ <img :src="item.iconcls" v-else-if="!Object.is(item.iconcls, '')" /> <i class="fa fa-cogs" v-else></i> </span> - <span>{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span> + <span>{{$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)}}</span> <span class="line"></span> </p> <p style=" display: 'flex' "> @@ -37,7 +37,7 @@ <img :src="item.iconcls" v-else-if="!Object.is(item.iconcls, '')" /> <i class="fa fa-cogs" v-else></i> </span> - <h4>{{$t(`app.menus.${ctrlName}.${item.name}`)}}</h4> + <h4>{{$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)}}</h4> </div> </card> </template> diff --git a/src/components/app-radio-group/app-radio-group.vue b/src/components/app-radio-group/app-radio-group.vue index 7d3e312c4c38b976aa9360ad21b4af863a19e296..3d742e6fd574ae4430adcfe862f8d6576ff2e002 100644 --- a/src/components/app-radio-group/app-radio-group.vue +++ b/src/components/app-radio-group/app-radio-group.vue @@ -1,5 +1,5 @@ <template> - <radio-group class="app-radio-group" v-model="currentVal"> + <radio-group class="app-radio-group" v-model="value" > <radio v-for="(_item,index) in items" :key = "index" :label="_item.value" :disabled="isDisabled || _item.disabled"> <span>{{Object.is(codelistType,'STATIC') ? $t('codelist.'+tag+'.'+_item.value) : _item.text}}</span> </radio> @@ -28,12 +28,22 @@ export default class AppRadioGroup extends Vue { @Model('change') item?: any; /** - * 瀹為檯鍊� + * 鑾峰彇鍊� * - * @type {*} * @memberof AppRadioGroup */ - public value: any = null; + get value() { + return this.item; + } + + /** + * 璁剧疆鍊� + * + * @memberof AppRadioGroup + */ + set value(val: any) { + this.$emit('change', val); + } /** * 浠g爜琛ㄦ爣璇� @@ -59,65 +69,29 @@ export default class AppRadioGroup extends Vue { */ @Prop() public data?: any; - /** - * 灞炴€х被鍨� - * - * @type {'string' | 'number'} - * @memberof AppRadioGroup - */ - @Prop({ default: 'string' }) - public valueType!: 'string' | 'number'; - - /** - * 鐩戞帶鍊煎彉鍖栵紝鏍规嵁灞炴€х被鍨嬪己鍒惰浆鎹� - * - * @memberof AppRadioGroup - */ - @Watch('item',{immediate:true,deep:true}) - public itemWatch(){ - this.readyValue(); - } - - /** - * 鑾峰彇鍊� - * - * @memberof AppRadioGroup - */ - get currentVal() { - return this.item; - } - - /** - * 璁剧疆鍊� - * - * @memberof AppRadioGroup - */ - set currentVal(val: any) { - this.$emit('change', val); - } - /** * 鐩戝惉琛ㄥ崟鏁版嵁鍙樺寲 * * @memberof AppRadioGroup */ @Watch('data',{immediate:true,deep:true}) - public onDataChange(newVal: any, oldVal: any) { - if(newVal){ - if(this.tag && this.codelistType == 'DYNAMIC'){ - // 鍏叡鍙傛暟澶勭悊 - let data: any = {}; - this.handlePublicParams(data); - // 鍙傛暟澶勭悊 - let _context = data.context; - let _param = data.param; - this.codeListService.getItems(this.tag,_context,_param).then((res:any) => { - this.formatCodeList(this.$util.deepCopy(res)); - }).catch((error:any)=>{ - console.log(`----${this.tag}----${(this.$t('app.commonWords.codeNotExist') as string)}`); - }) - } - } + onDataChange(newVal: any, oldVal: any) { + if(newVal){ + if(this.tag && this.codelistType == 'DYNAMIC'){ + // 鍏叡鍙傛暟澶勭悊 + let data: any = {}; + this.handlePublicParams(data); + // 鍙傛暟澶勭悊 + let _context = data.context; + let _param = data.param; + console.log("app-radio-group") + this.codeListService.getItems(this.tag,_context,_param).then((res:any) => { + this.items = res; + }).catch((error:any)=>{ + console.log(`----${this.tag}----${(this.$t('app.commonWords.codeNotExist') as string)}`); + }) + } + } } /** @@ -219,8 +193,7 @@ export default class AppRadioGroup extends Vue { */ public created() { if(this.tag && this.codelistType == 'STATIC'){ - const items = this.$store.getters.getCodeListItems(this.tag); - this.formatCodeList(this.$util.deepCopy(items)); + this.items = this.$store.getters.getCodeListItems(this.tag); }else if(this.tag && this.codelistType == 'DYNAMIC'){ // 鍏叡鍙傛暟澶勭悊 let data: any = {}; @@ -229,78 +202,12 @@ export default class AppRadioGroup extends Vue { let _context = data.context; let _param = data.param; this.codeListService.getItems(this.tag,_context,_param).then((res:any) => { - this.formatCodeList(this.$util.deepCopy(res)); + this.items = res; }).catch((error:any)=>{ console.log(`----${this.tag}----${(this.$t('app.commonWords.codeNotExist') as string)}`); }) } } - - /** - * 鏍煎紡鍖栦唬鐮佽〃鍊肩被鍨� - * - * @param {any[]} items - * @returns - * @memberof AppRadioGroup - */ - protected formatCodeList(items: any[]): void { - // 鍒ゆ柇绫诲瀷鏄惁鍜屽睘鎬т竴鑷� - let judge = false; - this.items = []; - try { - items.forEach((item: any) => { - const type = this.$util.typeOf(item.value); - if (type !== this.valueType) { - judge = true; - if (type === 'number') { - item.value = item.value.toString(); - } else { - if(type == "null") { - this.valueType == "number" ? item.value = 0 : item.value = ''; - }else if (item.value.indexOf('.') === -1) { - item.value = parseInt(item.value); - } else { - item.value = parseFloat(item.value); - } - } - } - this.items.push(item); - }); - if (judge) { - console.warn( - `浠g爜琛ㄣ€�${this.tag}銆嶅€肩被鍨嬪拰灞炴€х被鍨嬩笉绗︼紝鐩墠閲囩敤寮哄埗杞崲妯″紡銆傝淇浠g爜琛ㄥ€肩被鍨嬪拰灞炴€х被鍨嬪尮閰嶃€俙 - ); - } - } catch (error) { - console.warn( - '浠g爜琛ㄥ€肩被鍨嬪拰灞炴€х被鍨嬩笉绗︼紝鐩墠閲囩敤寮哄埗杞崲妯″紡銆傝浆鎹㈣繃绋嬪紓甯革紝璇蜂慨姝d唬鐮佽〃鍊肩被鍨嬪拰灞炴€х被鍨嬪尮閰嶃€�' - ); - } - } - - /** - * 鍑嗗鍊� - * - * @memberof AppRadioGroup - */ - public readyValue() { - if (this.item == null) { - this.value = null; - return; - } - if (this.$util.typeOf(this.item) === this.valueType) { - this.value = this.item; - } else if (this.valueType === 'number') { - if (this.item.indexOf('.') === -1) { - this.value = parseInt(this.item); - } else { - this.value = parseFloat(this.item); - } - } else { - this.value = this.item.toString(); - } - this.$emit('change',this.value); - } } </script> <style lang="less"> diff --git a/src/components/app-rate/app-rate.less b/src/components/app-rate/app-rate.less index 779bbf8dd5d4f6737861d46c69df0b576a7ed0d0..8b137891791fe96927ad78e64b0aad7bded08bdc 100644 --- a/src/components/app-rate/app-rate.less +++ b/src/components/app-rate/app-rate.less @@ -1,4 +1 @@ -.el-rate__item{ - font-size: 14px; - line-height: 32px; -} + diff --git a/src/components/app-rich-text-editor/app-rich-text-editor.vue b/src/components/app-rich-text-editor/app-rich-text-editor.vue index 445ec0f95ebcbee4080008c804d0a46d8ff2e599..17713aac5b5b9c8a2482db92c02cec92f05a8bd4 100644 --- a/src/components/app-rich-text-editor/app-rich-text-editor.vue +++ b/src/components/app-rich-text-editor/app-rich-text-editor.vue @@ -290,10 +290,6 @@ export default class AppRichTextEditor extends Vue { min_height: 400, branding: false, plugins: ['link', 'paste', 'table', 'image', 'codesample', 'code', 'fullscreen', 'preview'], - toolbar: 'undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | outdent indent | link image | fontselect fontsizeselect', - fontsize_formats: "8pt 10pt 12pt 14pt 18pt 24pt 36pt", - font_formats: "寰蒋闆呴粦=Microsoft YaHei,'寰蒋闆呴粦';瀹嬩綋=SimSun,'瀹嬩綋';榛戜綋=SimHei,'榛戜綋';浠垮畫=FangSong,'浠垮畫';妤蜂綋=KaiTi,'妤蜂綋';闅朵功=LiSu,'闅朵功';骞煎渾=YouYuan,'骞煎渾';Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings", - content_style: ".mce-content-body {font-size:14pt;font-family:Microsoft YaHei,'寰蒋闆呴粦',sans-serif;}", codesample_languages: [ { text: 'HTML/XML', value: 'markup' }, { text: 'JavaScript', value: 'javascript' }, diff --git a/src/components/disk-file-upload/disk-file-upload.vue b/src/components/disk-file-upload/disk-file-upload.vue index 7cb0275a6ec42230fa6888559b3aa8bd065a54c5..6d8c5a810cf832ecf300d6779f0107444f0189f1 100644 --- a/src/components/disk-file-upload/disk-file-upload.vue +++ b/src/components/disk-file-upload/disk-file-upload.vue @@ -8,7 +8,6 @@ drag multiple list-type="text" - :disabled="disabled" :action="getAction()" :headers="myHeaders" :file-list="uploadFileList" @@ -29,7 +28,6 @@ ref="upload" multiple list-type="text" - :disabled="disabled" :action="getAction()" :headers="myHeaders" :file-list="uploadFileList" @@ -160,14 +158,6 @@ */ @Prop({default: false}) public persistence?: boolean; - /** - * 鏄惁鍚敤 - * - * @type {boolean} - * @memberof DiskFileUpload - */ - @Prop({default: false}) public disabled?: boolean; - /** * 鏄惁鏄剧ず鎷栨嫿鍖哄煙 * @@ -417,7 +407,7 @@ // 鎷兼帴url const uploadUrl = this.getAction(); // 鍙戦€乸ost璇锋眰 - Axios.post(uploadUrl, formData).then((response: any) => { + Axios.post(uploadUrl, formData, {timeout: 2000}).then((response: any) => { if (!response || response.status != 200) { Message.error(_this.$t('components.diskFileUpload.loadFailure') + '!'); } diff --git a/src/components/input-box/input-box.vue b/src/components/input-box/input-box.vue index 3d43a5c8e49a5e34e8c2a2070d0cb994354291d6..7c5de43751e54c70e4ebb897d38bde425fd424d3 100644 --- a/src/components/input-box/input-box.vue +++ b/src/components/input-box/input-box.vue @@ -13,7 +13,6 @@ :placeholder="placeholder" :size="size" :type="type" - :rows="rows" v-model="CurrentVal" :disabled="disabled ? true : false" :element-id="textareaId" @@ -38,17 +37,6 @@ export default class InputBox extends Vue { */ @Model("change") readonly itemValue?: any; - /** - * 鐢熷懡鍛ㄦ湡 锛堝琛屾枃鏈崄琛岄珮搴﹂棶棰橈級 - * @type {any} - * @memberof InputBox - */ - public created() { - if(this.editorType && this.editorType == "TEXTAREA_10") { - this.rows = 10; - } - } - /** * 鐢熷懡鍛ㄦ湡 锛堝琛屾枃鏈崄琛岄珮搴﹂棶棰橈級 * @type {any} @@ -92,20 +80,6 @@ export default class InputBox extends Vue { */ @Prop() public size?: string; - /** - * 缂栬緫鍣ㄦ牱寮� - * @type {String} - * @memberof InputBoxUnit - */ - @Prop() public editorType?: string; - - /** - * 鏂囨湰琛屾暟 - * @type {String} - * @memberof InputBoxUnit - */ - public rows: number = 2; - /** * placeholder鍊� * @type {String} diff --git a/src/engine/view/tab-exp-view-engine.ts b/src/engine/view/tab-exp-view-engine.ts index 8caa521e245993749293f22a61162facd75946e6..f903cd48046af841ea2bed0afae50ac73210100d 100644 --- a/src/engine/view/tab-exp-view-engine.ts +++ b/src/engine/view/tab-exp-view-engine.ts @@ -41,7 +41,7 @@ export default class TabExpViewEngine extends ViewEngine { if (!Object.is(_item.type, 'TABEXPPANEL')) { return; } - if(this.view.context && this.view.context[(this.keyPSDEField as string)]){ + if(this.view.context && !this.view.context[(this.keyPSDEField as string)]){ return; } this.setViewState2({ tag: _item.name, action: 'load', viewdata: this.view.context }); diff --git a/src/engine/view/view-engine.ts b/src/engine/view/view-engine.ts index e451d763a71ef0dd1a65a0f52e528656c6136e01..7fb4725438a05a5791691aa2b97d8bc3f493bf77 100644 --- a/src/engine/view/view-engine.ts +++ b/src/engine/view/view-engine.ts @@ -187,17 +187,17 @@ export default class ViewEngine { */ public calcToolbarItemAuthState(data:any){ const _this: any = this; - if(!_this.view.appUIService) + if(!_this.view.appUIService.isEnableDEMainState) return; for (const key in _this.view.toolBarModels) { if (!_this.view.toolBarModels.hasOwnProperty(key)) { return; } const _item = _this.view.toolBarModels[key]; - if(_item && _item['dataaccaction']){ + if(_item && _item['dataaccaction'] && _this.view.appUIService){ let dataActionResult:any; if (_item.uiaction && (Object.is(_item.uiaction.target, "NONE") || Object.is(_item.uiaction.target, ""))){ - if(Object.is(_item.uiaction.target, "") && Object.is(_item.uiaction.tag, "Save") && _this.view.appUIService.isEnableDEMainState){ + if(Object.is(_item.uiaction.target, "") && Object.is(_item.uiaction.tag, "Save")){ if(data && Object.keys(data).length >0){ dataActionResult= _this.view.appUIService.getAllOPPrivs(data)[_item['dataaccaction']]; } @@ -205,7 +205,7 @@ export default class ViewEngine { dataActionResult = _this.view.appUIService.getResourceOPPrivs(_item['dataaccaction']); } }else{ - if(data && Object.keys(data).length >0 && _this.view.appUIService.isEnableDEMainState){ + if(data && Object.keys(data).length >0){ dataActionResult= _this.view.appUIService.getAllOPPrivs(data)[_item['dataaccaction']]; } } diff --git a/src/styles/default.less b/src/styles/default.less index 58d85eb01fabbf03c2ef8c4171c6b757d322195c..10562cd2419bb4d2ece198911c5799583b19d1b5 100644 --- a/src/styles/default.less +++ b/src/styles/default.less @@ -274,6 +274,7 @@ } } +// 宸ヤ綔娴佹祦绋嬬増鏈€夋嫨 .start-workflow-select-wraper { z-index: 3000 !important; } diff --git a/src/template.html b/src/template.html deleted file mode 100644 index 0263065adc1daa6018c8f78f940078cb1b2402b8..0000000000000000000000000000000000000000 --- a/src/template.html +++ /dev/null @@ -1,18 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> - <head> - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <meta name="viewport" content="width=device-width,initial-scale=1.0"> - <link rel="icon" href="<%= BASE_URL %>favicon.ico"> - <title><%= htmlWebpackPlugin.options.title %></title> - </head> - <body> - <noscript> - <strong>We're sorry but app doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> - </noscript> - <div id="app"></div> - <script src="./environments/environment.js"></script> - <script src="./assets/js/avue.min.js"></script> - </body> -</html> diff --git a/src/utils/types/http.d.ts b/src/utils/types/http.d.ts index 964e309b54676f66fb0e127de5fda90bcadaa123..6a34b61e87e3e622f1f3904a4db11849249f9ba3 100644 --- a/src/utils/types/http.d.ts +++ b/src/utils/types/http.d.ts @@ -17,7 +17,7 @@ export declare interface Http { * @returns {Promise<any>} * @memberof Http */ - post(url: string, params: any, isloading?: boolean, serialnumber?: number): Promise<any>; + post(url: string, params?: any, isloading?: boolean, serialnumber?: number): Promise<any>; /** * 鑾峰彇 * @@ -27,7 +27,7 @@ export declare interface Http { * @returns {Promise<any>} * @memberof Http */ - get(url: string, isloading?: boolean, serialnumber?: number): Promise<any>; + get(url: string, params?: any, isloading?: boolean, serialnumber?: number): Promise<any>; /** * 鍒犻櫎 *