提交 414dd3bf 编写于 作者: ibizdev's avatar ibizdev

demoadmin 发布系统代码

上级 7d74ee0c
......@@ -117,9 +117,7 @@ $ yarn build
|─ ─ favicon.ico 图标
​ |─ ─ src 工程文件夹
|─ ─ assets 静态资源
|─ ─ codelist 动态代码表服务
|─ ─ components 基础组件,主要包含编辑器组件和其他全局使用的组件
|─ ─ counter 计数器服务
|─ ─ engine 引擎文件,主要封装了内置视图的内置逻辑
|─ ─ environments 环境文件
​ |─ ─ interface 接口文件
......@@ -152,7 +150,6 @@ $ yarn build
|─ ─ YYY-ui-logic-base.ts 应用实体界面处理逻辑文件
|─ ─ YYY-ui-logic.ts 自定义应用实体界面处理逻辑文件
|─ ─ utils 工具类文件
|─ ─ utilservice 应用功能服务
|─ ─ widgets 部件文件夹
|─ ─ appde 应用实体名称
​ |─ ─ XXX 部件名称
......
......@@ -18,24 +18,19 @@
"@fullcalendar/list": "^4.4.0",
"@fullcalendar/timegrid": "^4.4.0",
"@fullcalendar/vue": "^4.4.0",
"vuedraggable": "^2.23.2",
"async-validator": "^3.3.0",
"@popperjs/core": "^2.4.3",
"axios": "^0.19.1",
"core-js": "^3.4.4",
"echarts": "^4.6.0",
"element-ui": "^2.13.0",
"file-saver": "^2.0.2",
"font-awesome": "^4.7.0",
"ibiz-gantt-elastic": "^1.0.17",
"ibiz-vue-lib": "^0.1.13",
"interactjs": "^1.9.4",
"moment": "^2.24.0",
"path-to-regexp": "^6.1.0",
"qs": "^6.9.1",
"rxjs": "^6.5.4",
"tinymce": "4.8.5",
"view-design": "4.2.0",
"view-design": "^4.1.0",
"vue": "^2.6.10",
"vue-class-component": "^7.0.2",
"vue-grid-layout": "^2.3.7",
......@@ -59,7 +54,6 @@
"@vue/cli-service": "^4.1.0",
"@vue/test-utils": "1.0.0-beta.29",
"axios-mock-adapter": "^1.17.0",
"compression-webpack-plugin": "^4.0.0",
"less": "^3.0.4",
"less-loader": "^5.0.0",
"mockjs": "^1.1.0",
......
......@@ -8,8 +8,6 @@
"id": "0",
"label": "ENABLED",
"text": "ENABLED",
"data":"",
"codename":"Item_0",
"color": "rgba(58, 116, 7, 1)",
"value": 0,
......@@ -19,8 +17,6 @@
"id": "1",
"label": "DISABLED",
"text": "DISABLED",
"data":"",
"codename":"Item_1",
"color": "rgba(67, 65, 65, 1)",
"value": 1,
......
{
"jobsinfogridview": {
"title": "任务信息表格视图",
"caption": "任务信息",
"jobsregistrygridview": {
"title": "任务注册信息表格视图",
"caption": "任务注册信息",
"viewtype": "DEGRIDVIEW",
"viewmodule": "task",
"viewname": "JobsInfoGridView",
"viewtag": "33e6e9dda70646c9fc4674606152894b"
"viewname": "JobsRegistryGridView",
"viewtag": "3fc39744066bd5343be378ec5703f556"
},
"jobsinfoeditview": {
"title": "任务信息编辑视图",
......@@ -13,7 +13,7 @@
"viewtype": "DEEDITVIEW",
"viewmodule": "task",
"viewname": "JobsInfoEditView",
"viewtag": "3b16681a0aca643f5830e15d768c1ab1"
"viewtag": "49b6b437f10c4e73e47d87d5d0f76cfd"
},
"jobsregistryeditview": {
"title": "任务注册信息编辑视图",
......@@ -21,7 +21,15 @@
"viewtype": "DEEDITVIEW",
"viewmodule": "task",
"viewname": "JobsRegistryEditView",
"viewtag": "433753123a4269a61a7a13d22cf567de"
"viewtag": "56cc39a16e3269c082694b50f89338e3"
},
"jobsloggridview": {
"title": "任务调度日志表格视图",
"caption": "任务调度日志",
"viewtype": "DEGRIDVIEW",
"viewmodule": "task",
"viewname": "JobsLogGridView",
"viewtag": "67b4d1e928a08679ce63051ccc88da9c"
},
"taskindexview": {
"title": "task",
......@@ -29,7 +37,7 @@
"viewtype": "APPINDEXVIEW",
"viewmodule": "task",
"viewname": "TaskIndexView",
"viewtag": "49432823-363C-43AB-AA9A-8F0BB0445335"
"viewtag": "aa348881bb7ef951e281edc58131246b"
},
"jobslogeditview": {
"title": "任务调度日志编辑视图",
......@@ -37,22 +45,14 @@
"viewtype": "DEEDITVIEW",
"viewmodule": "task",
"viewname": "JobsLogEditView",
"viewtag": "8be420cc327846b003dc0a97dda81ceb"
"viewtag": "b4b9140b8844a2d60cfc7944cd4f5b79"
},
"jobsregistrygridview": {
"title": "任务注册信息表格视图",
"caption": "任务注册信息",
"viewtype": "DEGRIDVIEW",
"viewmodule": "task",
"viewname": "JobsRegistryGridView",
"viewtag": "b10fda534ad827548d6902807e8dc8cf"
},
"jobsloggridview": {
"title": "任务调度日志表格视图",
"caption": "任务调度日志",
"jobsinfogridview": {
"title": "任务信息表格视图",
"caption": "任务信息",
"viewtype": "DEGRIDVIEW",
"viewmodule": "task",
"viewname": "JobsLogGridView",
"viewtag": "d55df600239abf11fb0df2bded105b5d"
"viewname": "JobsInfoGridView",
"viewtag": "e4856779577562e9880855e6c66d63e5"
}
}
......@@ -8,11 +8,9 @@ import { AppPopover } from './utils/app-popover/app-popover';
import { AppModal } from './utils/app-modal/app-modal';
import { AppDrawer } from './utils/app-drawer/app-drawer';
import { uiServiceRegister } from '@/uiservice/ui-service-register';
import { authServiceRegister } from '@/authservice/auth-service-register';
import { utilServiceRegister } from '@/utilservice/util-service-register';
import { entityServiceRegister } from '@/service/entity-service-register';
import { counterServiceRegister } from '@/counter/counter-service-register';
import { codeListRegister } from '@codelist/codelist-register';
import InputBox from './components/input-box/input-box.vue'
import AppKeepAlive from './components/app-keep-alive/app-keep-alive.vue'
......@@ -30,6 +28,7 @@ import AppCheckboxList from './components/app-checkbox-list/app-checkbox-list.vu
import AppRadioGroup from './components/app-radio-group/app-radio-group.vue'
import AppEmbedPicker from './components/app-embed-picker/app-embed-picker.vue'
import AppTreePicker from './components/app-tree-picker/app-tree-picker.vue'
import AppRichTextEditor from './components/app-rich-text-editor/app-rich-text-editor.vue'
import AppFileUpload from './components/app-file-upload/app-file-upload.vue'
import AppImageUpload from './components/app-image-upload/app-image-upload.vue'
import PropertyLayout from './components/property-layout/property-layout.vue'
......@@ -39,7 +38,6 @@ import AppFormGroup from './components/app-form-group/app-form-group.vue'
import AppFormItem from './components/app-form-item/app-form-item.vue'
import AppPicker from './components/app-picker/app-picker.vue'
import AppMpicker from './components/app-mpicker/app-mpicker.vue'
import AppUpicker from './components/app-upicker/app-upicker.vue'
import AppFormGroup2 from './components/app-form-group2/app-form-group2.vue'
import AppFormItem2 from './components/app-form-item2/app-form-item2.vue'
import CodeList from './components/codelist/codelist.vue'
......@@ -55,6 +53,7 @@ import AppRate from './components/app-rate/app-rate.vue'
import AppSwitch from './components/app-switch/app-switch.vue'
import AppSlider from './components/app-slider/app-slider.vue'
import AppStepper from './components/app-stepper/app-stepper.vue'
import AppPortalDesign from './components/app-portal-design/app-portal-design.vue'
import DatePickerRange from './components/date-picker-range/date-picker-range.vue'
import AppRangeDate from './components/app-range-date/app-range-date.vue'
import AppActionBar from './components/app-actionbar/app-actionbar.vue'
......@@ -64,41 +63,21 @@ import AppStudioAction from './components/app-studioaction/app-studioaction.vue'
import AppDebugActions from './components/app-debug-actions/app-debug-actions.vue'
import AppHeaderMenus from './components/app-header-menus/app-header-menus.vue'
import AppColumnLink from './components/app-column-link/app-column-link.vue'
import AppDataUploadView from './components/app-data-upload/app-data-upload.vue'
import DropDownListDynamic from './components/dropdown-list-dynamic/dropdown-list-dynamic.vue'
import AppImagePreview from './components/app-image-preview/app-image-preview.vue'
import AppFormatData from './components/app-format-data/app-format-data.vue'
import AppUploadFileInfo from './components/app-upload-file-info/app-upload-file-info.vue'
import ContextMenu from './components/context-menu/context-menu'
import AppColumnFormat from './components/app-column-format/app-column-format.vue'
import AppQuickGroup from './components/app-quick-group/app-quick-group.vue'
import AppGroupPicker from './components/app-group-picker/app-group-picker.vue'
import AppWFApproval from './components/app-wf-approval/app-wf-approval.vue'
import Breadcrumb from './components/app-breadcrumb/app-breadcrumb.vue'
import AppTransfer from './components/app-transfer/app-transfer.vue'
import ContextMenuDrag from './components/context-menu-drag/context-menu-drag.vue'
import AppOrgSelect from './components/app-org-select/app-org-select.vue'
import AppDepartmentSelect from './components/app-department-select/app-department-select.vue'
import AppGroupSelect from './components/app-group-select/app-group-select.vue'
import UpdatePwd from './components/app-update-password/app-update-password.vue'
import AppMenuItem from './components/app-menu-item/app-menu-item.vue'
import AppFullScren from './components/app-full-scren/app-full-scren.vue'
import AppLockScren from './components/app-lock-scren/app-lock-scren.vue'
import ActionTimeline from './components/action-timeline/action-timeline.vue'
import CronEditor from './components/cron-editor/cron-editor.vue'
import AppMessagePopover from './components/app-message-popover/app-message-popover.vue'
// 全局挂载UI实体服务注册中心
window['uiServiceRegister'] = uiServiceRegister;
// 全局挂载实体权限服务注册中心
window['authServiceRegister'] = authServiceRegister;
// 全局挂载功能服务注册中心
window['utilServiceRegister'] = utilServiceRegister;
// 全局挂载数据服务注册中心
window['entityServiceRegister'] = entityServiceRegister;
// 全局挂载计数器服务注册中心
window['counterServiceRegister'] = counterServiceRegister;
// 全局挂载代码表服务注册中心
window['codeListRegister'] = codeListRegister;
export const AppComponents = {
install(v: any, opt: any) {
......@@ -111,8 +90,6 @@ export const AppComponents = {
v.prototype.$verify = Verify;
v.prototype.$viewTool = ViewTool;
v.prototype.$uiActionTool = UIActionTool;
v.component('app-full-scren',AppFullScren);
v.component('app-lock-scren',AppLockScren);
v.component('input-box', InputBox);
v.component('app-keep-alive',AppKeepAlive);
v.component('tab-page-exp',TabPageExp);
......@@ -129,7 +106,7 @@ export const AppComponents = {
v.component('app-radio-group',AppRadioGroup);
v.component('app-embed-picker', AppEmbedPicker);
v.component('app-tree-picker', AppTreePicker);
v.component('app-rich-text-editor', () => import('./components/app-rich-text-editor/app-rich-text-editor.vue'));
v.component('app-rich-text-editor',AppRichTextEditor);
v.component('app-file-upload',AppFileUpload);
v.component('app-image-upload',AppImageUpload);
v.component('property-layout',PropertyLayout);
......@@ -139,7 +116,6 @@ export const AppComponents = {
v.component('app-form-item',AppFormItem);
v.component('app-picker', AppPicker);
v.component('app-mpicker', AppMpicker);
v.component('app-upicker', AppUpicker);
v.component('app-form-group2', AppFormGroup2);
v.component('app-form-item2', AppFormItem2);
v.component('codelist', CodeList);
......@@ -155,7 +131,7 @@ export const AppComponents = {
v.component('app-switch', AppSwitch);
v.component('app-slider', AppSlider);
v.component('app-stepper', AppStepper);
v.component('app-portal-design', () => import('./components/app-portal-design/app-portal-design.vue'));
v.component('app-portal-design',AppPortalDesign);
v.component('date-picker-range',DatePickerRange);
v.component('app-range-date', AppRangeDate);
v.component('app-actionbar', AppActionBar);
......@@ -165,26 +141,11 @@ export const AppComponents = {
v.component('app-debug-actions', AppDebugActions);
v.component('app-header-menus', AppHeaderMenus);
v.component('app-column-link', AppColumnLink);
v.component('app-data-upload', () => import('./components/app-data-upload/app-data-upload.vue'));
v.component('app-data-upload', AppDataUploadView);
v.component('dropdown-list-dynamic', DropDownListDynamic);
v.component('app-image-preview', AppImagePreview);
v.component('app-format-data', AppFormatData);
v.component('app-upload-file-info', AppUploadFileInfo);
v.component('context-menu',ContextMenu);
v.component('app-column-format',AppColumnFormat);
v.component('app-quick-group',AppQuickGroup);
v.component('app-org-select',AppOrgSelect);
v.component('app-department-select',AppDepartmentSelect);
v.component('app-group-select',AppGroupSelect);
v.component('app-group-picker',AppGroupPicker);
v.component('app-wf-approval',AppWFApproval);
v.component('app-breadcrumb',Breadcrumb);
v.component('app-transfer',AppTransfer);
v.component('context-menu-drag',ContextMenuDrag);
v.component('app-update-password',UpdatePwd);
v.component('app-menu-item', AppMenuItem);
v.component('action-timeline', ActionTimeline);
v.component('cron-editor', CronEditor);
v.component('app-message-popover', AppMessagePopover);
},
};
\ No newline at end of file
<template>
<div class="app-actionbar">
<div class="app-actionbar-item" v-for="(item,index) in items" :key="index">
<Badge v-if="item.counterService&&item.counterService.counterData" v-show="item.visabled" :count="item.counterService.counterData[item.counterId]" type="primary">
<i-button :disabled="item.disabled" @click="handleClick(item, $event)"><i v-if="item.icon" style="margin-right: 5px;" :class="item.icon"></i>{{item.actionName}}</i-button>
<Badge v-if="item.counterService&&item.counterService.counterData" :count="item.counterService.counterData[item.counterId]" type="primary">
<i-button @click="handleClick(item.viewlogicname)">{{item.actionName}}</i-button>
</Badge>
<i-button v-show="item.visabled" :disabled="item.disabled" v-else @click="handleClick(item, $event)">{{item.actionName}}</i-button>
<i-button v-else @click="handleClick(item.viewlogicname)">{{item.actionName}}</i-button>
</div>
</div>
</template>
<script lang="ts">
import { Vue, Component, Prop, Model, Emit,Inject, Watch } from "vue-property-decorator";
import { Subject,Subscription } from "rxjs";
import { Vue, Component, Prop, Model, Emit } from "vue-property-decorator";
import { Subject } from "rxjs";
@Component({})
export default class AppActionBar extends Vue {
......@@ -24,125 +24,15 @@ export default class AppActionBar extends Vue {
*/
@Prop() public items!:any;
/**
* 注入的UI服务
*
* @type {*}
* @memberof AppActionBar
*/
@Prop() public uiService!: any;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof AppActionBar
*/
@Prop() public viewState!: Subject<ViewState>;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof ActionlinetestBase
*/
public viewStateEvent: Subscription | undefined;
/**
* 部件数据
*
* @type {*}
* @memberof AppActionBar
*/
public data: any;
/**
* 组件初始化
*
* @memberof AppActionBar
*/
public created(){
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, "app-actionbar")) {
return;
}
if(Object.is(action,'loadmodel')){
this.data = data;
this.calcActionItemAuthState(data,this.items,this.uiService);
}
});
}
}
/**
* 触发界面行为
*
* @memberof AppActionBar
*/
public handleClick(item: any, $event:any){
let _data = {
tag : item.viewlogicname,
params : this.data,
event : $event
};
this.$emit('itemClick',_data);
public handleClick($event:any){
this.$emit('itemClick',$event);
}
/**
* 计算界面行为项权限状态
*
* @param {*} [data] 传入数据
* @param {*} [ActionModel] 界面行为模型
* @param {*} [UIService] 界面行为服务
* @memberof AppActionBar
*/
public calcActionItemAuthState(data:any,ActionModel:any,UIService:any){
for (const key in ActionModel) {
if (!ActionModel.hasOwnProperty(key)) {
return;
}
const _item = ActionModel[key];
if(_item && _item['dataaccaction'] && UIService){
let dataActionResult:any;
if(Object.is(_item['actiontarget'],"NONE")){
dataActionResult = UIService.getResourceOPPrivs(_item['dataaccaction']);
}else{
if(data && Object.keys(data).length >0){
dataActionResult = UIService.getAllOPPrivs(data)[_item['dataaccaction']];
}
}
// 无权限:0;有权限:1
if(dataActionResult === 0){
// 禁用:1;隐藏:2;隐藏且默认隐藏:6
if(_item.noprivdisplaymode === 1){
_item.disabled = true;
}
if((_item.noprivdisplaymode === 2) || (_item.noprivdisplaymode === 6)){
_item.visabled = false;
}else{
_item.visabled = true;
}
}
if(dataActionResult === 1){
_item.visabled = true;
_item.disabled = false;
}
}
}
}
/**
* 组件销毁
*
* @memberof AppActionBar
*/
public destory(){
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
}
</script>
......
<template>
<div class="appAddressSelection">
<el-cascader
style="width:100%"
:disabled="disabled"
size ="medium"
v-model="CurrentVal"
......@@ -15,7 +14,6 @@ import { Component, Vue, Prop, Model, Watch } from 'vue-property-decorator';
import { Subject } from 'rxjs';
import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
import axios from 'axios';
import { cityCode } from './city_code'
@Component({})
export default class AppAddressSelection extends Vue {
......@@ -65,7 +63,12 @@ export default class AppAddressSelection extends Vue {
* @memberof AppAddressSelection
*/
public getcity() {
this.format(cityCode);
axios.get("../../assets/json/city_code.json").then((response: any) => {
this.format(response.data);
}).catch((response: any) => {
console.log("城市数据加载失败");
});
}
/**
......@@ -83,11 +86,11 @@ export default class AppAddressSelection extends Vue {
* @memberof AppAddressSelection
*/
public format(data :any) {
let town = JSON.parse(JSON.stringify(data).replace(/city/g, 'children'))
let county = JSON.parse(JSON.stringify(town).replace(/name/g, 'label'))
let city = JSON.parse(JSON.stringify(county).replace(/area/g, 'children'))
let province = JSON.parse(JSON.stringify(city).replace(/code/g, 'value'))
this.city = province;
let data1 = JSON.parse(JSON.stringify(data).replace(/city/g, 'children'))
let data2 = JSON.parse(JSON.stringify(data1).replace(/name/g, 'label'))
let data3 = JSON.parse(JSON.stringify(data2).replace(/area/g, 'children'))
let data4 = JSON.parse(JSON.stringify(data3).replace(/code/g, 'value'))
this.city = data4;
}
}
......
......@@ -7,7 +7,6 @@
size='small'
:trigger-on-focus="true"
:fetch-suggestions="onSearch"
:sort="sort"
@select="onACSelect"
@input="onInput"
@blur="onBlur"
......@@ -101,43 +100,26 @@ export default class AppAutocomplete extends Vue {
@Prop() public name!: string;
/**
* 局部上下文导航参数
*
* @type {any}
* @memberof AppAutocomplete
*/
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppAutocomplete
*/
@Prop() public localParam!:any;
/**
* 值项名称
* 编辑器参数
*
* @type {string}
* @memberof AppAutocomplete
*/
@Prop() public valueitem?: string;
@Prop() public itemParam?: any;
/**
* 排序
* 值项名称
*
* @type {string}
* @memberof AppAutocomplete
*/
@Prop() public sort?: string;
@Prop() public valueitem?: string;
/**
* 值
*
* @type {*}
* @memberof AppAutocomplete
* @memberof AppPicker
*/
@Model('change') public value?: any;
......@@ -145,7 +127,7 @@ export default class AppAutocomplete extends Vue {
* 当前值
*
* @type {string}
* @memberof AppAutocomplete
* @memberof AppPicker
*/
public curvalue: string = '';
......@@ -178,7 +160,7 @@ export default class AppAutocomplete extends Vue {
*
* @param {*} newVal
* @param {*} oldVal
* @memberof AppAutocomplete
* @memberof AppPicker
*/
@Watch('value')
public onValueChange(newVal: any, oldVal: any) {
......@@ -191,25 +173,29 @@ export default class AppAutocomplete extends Vue {
* @param callback
*/
public onSearch(query: any, callback: any): void {
// 公共参数处理
let data: any = {};
const bcancel: boolean = this.handlePublicParams(data);
if (!bcancel) {
return;
}
// 参数处理
let _context = data.context;
let _param = data.param;
// 处理搜索参数
query = !query ? '' : query;
if (!this.inputState && Object.is(query, this.value)) {
query = '';
}
this.inputState = false;
if(this.sort && !Object.is(this.sort, "")) {
Object.assign(_param, { sort: this.sort });
// 合并视图上下文参数和视图参数
let param: any = JSON.parse(JSON.stringify(this.viewparams));
let context: any = JSON.parse(JSON.stringify(this.context));
Object.assign(param, { query: query });
// 附加参数处理
if (this.itemParam.context) {
let _context = this.$util.formatData(this.data,this.itemParam.context);
Object.assign(context,_context);
}
if (this.itemParam.param) {
let _param = this.$util.formatData(this.data,this.itemParam.param);
Object.assign(param,_param);
}
if (this.itemParam.parentdata) {
let _parentdata = this.$util.formatData(this.data,this.itemParam.parentdata);
Object.assign(param,_parentdata);
}
Object.assign(_param, { query: query });
// 错误信息国际化
let error: string = (this.$t('components.appAutocomplete.error') as any);
let miss: string = (this.$t('components.appAutocomplete.miss') as any);
......@@ -222,7 +208,7 @@ export default class AppAutocomplete extends Vue {
} else if(!this.acParams.interfaceName) {
this.$Notice.error({ title: error, desc: miss+'interfaceName' });
} else {
this.service.getItems(this.acParams.serviceName,this.acParams.interfaceName, _context, _param).then((response: any) => {
this.service.getItems(this.acParams.serviceName,this.acParams.interfaceName, context, param).then((response: any) => {
if (!response) {
this.$Notice.error({ title: error, desc: requestException });
} else {
......@@ -288,34 +274,6 @@ export default class AppAutocomplete extends Vue {
this.$forceUpdate();
}
/**
* 公共参数处理
*
* @param {*} arg
* @returns
* @memberof AppAutocomplete
*/
public handlePublicParams(arg: any): boolean {
if (!this.data) {
this.$Notice.error({ title: (this.$t('components.AppAutocomplete.error') as any), desc: (this.$t('components.AppAutocomplete.formdataException') as any) });
return false;
}
// 合并表单参数
arg.param = this.viewparams ? JSON.parse(JSON.stringify(this.viewparams)) : {};
arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {};
// 附加参数处理
if (this.localContext && Object.keys(this.localContext).length >0) {
let _context = this.$util.computedNavData(this.data,arg.context,arg.param,this.localContext);
Object.assign(arg.context,_context);
}
if (this.localParam && Object.keys(this.localParam).length >0) {
let _param = this.$util.computedNavData(this.data,arg.param,arg.param,this.localParam);
Object.assign(arg.param,_param);
}
return true;
}
}
</script>
......
......@@ -7,7 +7,7 @@
</template>
<script lang="ts">
import { Component, Vue, Prop, Model, Watch } from 'vue-property-decorator';
import { Component, Vue, Prop, Model } from 'vue-property-decorator';
import CodeListService from "@service/app/codelist-service";
@Component({
......@@ -43,7 +43,7 @@ export default class AppCheckBox extends Vue {
* @type {string}
* @memberof AppCheckBox
*/
@Prop({default:','}) public valueSeparator?: string;
@Prop({default:';'}) public valueSeparator?: string;
/**
* 是否禁用
......@@ -53,46 +53,6 @@ export default class AppCheckBox extends Vue {
*/
@Prop() disabled?: boolean;
/**
* 传入表单数据
*
* @type {*}
* @memberof AppCheckBox
*/
@Prop() public data?: any;
/**
* 局部上下文导航参数
*
* @type {any}
* @memberof AppCheckBox
*/
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppCheckBox
*/
@Prop() public localParam!:any;
/**
* 视图上下文
*
* @type {*}
* @memberof AppCheckBox
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof AppCheckBox
*/
@Prop() public viewparams!: any;
/**
* 获取启用禁用状态
*
......@@ -137,6 +97,28 @@ export default class AppCheckBox extends Vue {
}
}
/**
* 分隔符
*
* @type {*}
* @memberof AppCheckBox
*/
@Prop() separator: any;
/**
* 获取分隔符
*
* @readonly
* @memberof AppCheckBox
*/
get currentseparator() {
if (this.separator) {
return this.separator;
} else {
return ';';
}
}
/**
* 选中值
*
......@@ -206,28 +188,6 @@ export default class AppCheckBox extends Vue {
*/
public items: any[] = [];
/**
* 公共参数处理
*
* @param {*} arg
* @returns
* @memberof AppCheckBox
*/
public handlePublicParams(arg: any) {
// 合并表单参数
arg.param = this.viewparams ? JSON.parse(JSON.stringify(this.viewparams)) : {};
arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {};
// 附加参数处理
if (this.localContext && Object.keys(this.localContext).length >0) {
let _context = this.$util.computedNavData(this.data,arg.context,arg.param,this.localContext);
Object.assign(arg.context,_context);
}
if (this.localParam && Object.keys(this.localParam).length >0) {
let _param = this.$util.computedNavData(this.data,arg.param,arg.param,this.localParam);
Object.assign(arg.param,_param);
}
}
/**
* vue 生命周期
*
......@@ -243,13 +203,7 @@ export default class AppCheckBox extends Vue {
console.log(`----${this.tag}----$t('components.appCheckBox.notExist')`);
}
} else if (Object.is(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.codeListService.getItems(this.tag).then((res:any) => {
this.items = res;
}).catch((error:any) => {
console.log(`----${this.tag}----$t('components.appCheckBox.notExist')`);
......@@ -258,29 +212,6 @@ export default class AppCheckBox extends Vue {
}
}
/**
* 监听表单数据变化
*
* @memberof AppCheckBox
*/
@Watch('data',{immediate:true,deep:true})
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.items = res;
}).catch((error:any)=>{
console.log(`----${this.tag}----${(this.$t('app.commonWords.codeNotExist') as string)}`);
})
}
}
}
}
</script>
......
......@@ -30,22 +30,6 @@ export default class AppColumnLink extends Vue {
*/
@Prop() public linkview?: any;
/**
* 局部上下文导航参数
*
* @type {any}
* @memberof AppColumnLink
*/
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppColumnLink
*/
@Prop() public localParam!:any;
/**
* 值项名称
*
......@@ -207,7 +191,7 @@ export default class AppColumnLink extends Vue {
private openRedirectView($event: any, view: any, data: any): void {
this.$http.get(view.url, data).then((response: any) => {
if (!response || response.status !== 200) {
this.$Notice.error({ title: (this.$t('app.commonWords.error') as string), desc: (this.$t('app.commonWords.reqException') as string) });
this.$Notice.error({ title: '错误', desc: '请求异常' });
}
if (response.status === 401) {
return;
......@@ -259,7 +243,7 @@ export default class AppColumnLink extends Vue {
}
}).catch((response: any) => {
if (!response || !response.status || !response.data) {
this.$Notice.error({ title: (this.$t('app.commonWords.error') as string), desc: (this.$t('app.commonWords.reqException') as string) });
this.$Notice.error({ title: '错误', desc: '系统异常!' });
return;
}
if (response.status === 401) {
......@@ -295,17 +279,8 @@ export default class AppColumnLink extends Vue {
return false;
}
// 合并表单参数
arg.param = this.viewparams ? JSON.parse(JSON.stringify(this.viewparams)) : {};
arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {};
// 附加参数处理
if (this.localContext && Object.keys(this.localContext).length >0) {
let _context = this.$util.computedNavData(this.data,arg.context,arg.param,this.localContext);
Object.assign(arg.context,_context);
}
if (this.localParam && Object.keys(this.localParam).length >0) {
let _param = this.$util.computedNavData(this.data,arg.param,arg.param,this.localParam);
Object.assign(arg.param,_param);
}
arg.param = JSON.parse(JSON.stringify(this.viewparams));
arg.context = JSON.parse(JSON.stringify(this.context));
return true;
}
......
......@@ -65,21 +65,14 @@ export default class AppDashboardDesignService {
public loadPortletList(context: any, viewparams: any): Promise<any> {
return new Promise((resolve: any, reject: any) => {
Http.getInstance().get('./assets/json/portlet-data.json').then((response: any) => {
if (response && response.status === 200 && response.data) {
let result:Array<any> = [];
if(typeof(response.data)=='string'){
const index:number = response.data.lastIndexOf(",");
result = JSON.parse((response.data).slice(0,index)+']');
}else{
result = response.data;
}
const datas: any[] = this.filterData(result, viewparams.appdeName);
if (response && response.status === 200 && response.data && Array.isArray(response.data)) {
const datas: any[] = this.filterData(response.data, viewparams.appdeName);
const list = this.prepareList(datas);
const groups = this.prepareGroup(datas);
resolve({data: datas, result: list.reverse(), groups: groups});
}
}).catch((response: any) => {
console.log(response);
console.log(response.status);
});
});
}
......
<template>
<div class="app-data-upload-view">
<el-row style="margin-top:24px" :gutter="20">
<el-row :gutter="20">
<el-col :span="4">
<el-button type="primary" @click="handleUpLoad">{{$t('components.appDataUploadView.selectfile')}}</el-button>
<input ref="inputUpLoad" type="file" style="display: none" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" @change="importFile"/>
......@@ -13,12 +13,12 @@
</el-col>
</el-row>
<el-divider></el-divider>
<el-row style="height:480px;padding: 0px 12px;">
<el-row style="height:calc(100% - 128px);padding: 0px 12px;">
<div class="data-info-content" >
<template v-if="importDataArray.length >0 && isUploading === false">
<ul>
<li v-for="(item,index) in importDataArray" :key="index" class="font-class">
{{item[importUniqueItem]?$t('components.appDataUploadView.dataid')+item[importUniqueItem]+$t('components.appDataUploadView.read')+'......':$t('components.appDataUploadView.read')+'......'}}
{{$t('components.appDataUploadView.dataid')+item[importUniqueItem]+$t('components.appDataUploadView.read')+'......'}}
</li>
</ul>
</template>
......@@ -285,7 +285,7 @@ export default class AppDataUploadView extends Vue {
this.importDataArray = [];
try{
this.entityService.getService(this.viewparams.serviceName).then((service:any) =>{
service.ImportData(this.viewdata,{name:this.importId,importData:tempDataArray}).then((res:any) =>{
service.ImportData(this.viewdata,{name:this.importId,data:tempDataArray}).then((res:any) =>{
const result:any = res.data;
if(result && result.rst !== 0){
this.promptInfo = (this.$t('components.appDataUploadView.importfailed') as string);
......@@ -295,10 +295,6 @@ export default class AppDataUploadView extends Vue {
this.importSuccessData = result.data;
this.promptInfo = (this.$t('components.appDataUploadView.completed') as string);
this.isUploading = false;
}).catch((error:any) =>{
this.isUploading = false;
this.promptInfo = (this.$t('components.appDataUploadView.importfailed') as string);
console.error(error);
})
}).catch((error:any) =>{
this.isUploading = false;
......@@ -447,13 +443,13 @@ export default class AppDataUploadView extends Vue {
if (codelist) {
resolve([...JSON.parse(JSON.stringify(codelist.items))]);
} else {
console.log(`----${codeListObject.tag}----${(this.$t('app.commonWords.codeNotExist') as string)}`);
console.log(`----${codeListObject.tag}----代码表不存在`);
}
}else if(codeListObject.tag && Object.is(codeListObject.type,"DYNAMIC")){
this.codeListService.getItems(codeListObject.tag).then((res:any) => {
resolve(res);
}).catch((error:any) => {
console.log(`----${codeListObject.tag}----${(this.$t('app.commonWords.codeNotExist') as string)}`);
console.log(`----${codeListObject.tag}----代码表不存在`);
});
}
})
......
......@@ -6,16 +6,12 @@
:viewdata="viewdata"
:viewparam="viewparam"
:viewDefaultUsage="false"
@viewdataschange="setValue($event)"
@viewdataschange="setValue(args)"
style="height:100%;">
</component>
</div>
<template v-if="placeholder">
<div v-if="value" class="app-embed-value">
<span v-for="(item,index) in value.split(',')" :key="index">
{{item}}
</span>
</div>
<div v-if="value" class="app-embed-value">{{value}}</div>
<div v-else class="app-embed-placeholder">{{placeholder}}</div>
</template>
</div>
......@@ -66,7 +62,7 @@ export default class AppEmbedPicker extends Vue {
* 表单数据
*
* @type {*}
* @memberof AppEmbedPicker
* @memberof AppPicker
*/
@Prop() public data!: any;
......@@ -99,15 +95,15 @@ export default class AppEmbedPicker extends Vue {
* 值项名称
*
* @type {string}
* @memberof AppEmbedPicker
* @memberof AppPicker
*/
@Prop() public valueItem!: string;
@Prop() public valueItem?: string;
/**
* 关联视图名称
*
* @type {string}
* @memberof AppEmbedPicker
* @memberof AppPicker
*/
@Prop() public refviewname?: string;
......@@ -131,25 +127,17 @@ export default class AppEmbedPicker extends Vue {
* 属性项名称
*
* @type {string}
* @memberof AppEmbedPicker
* @memberof AppPicker
*/
@Prop() public name!: string;
/**
* 局部上下文导航参数
*
* @type {any}
* @memberof AppEmbedPicker
*/
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* 关联视图参数
*
* @type {*}
* @memberof AppEmbedPicker
*/
@Prop() public localParam!:any;
@Prop() public itemParam: any;
/**
* 是否忽略之变化
......@@ -172,36 +160,29 @@ export default class AppEmbedPicker extends Vue {
*
* @memberof AppEmbedPicker
*/
public setViewParam() {
if (!this.data) {
public setViewParam(activeData: any) {
if (!this.itemParam || !activeData) {
return;
}
let formData:any = JSON.parse(this.data);
let arg: any = {};
// 合并视图上下文参数和视图参数
arg.param = JSON.parse(JSON.stringify(this.viewparams));
arg.context = JSON.parse(JSON.stringify(this.context));
if(formData[this.name] && formData[this.valueItem]){
let selectItems:Array<any> = [];
let tempvalue: Array<any> = formData[this.valueItem].split(',');
let temptext: Array<any> = formData[this.name].split(',');
tempvalue.forEach((srfkey: any, index: number)=>{
selectItems.push({ srfmajortext : temptext[index], srfkey: srfkey });
});
arg.param.selectedData = selectItems;
this.$forceUpdate();
}
let param: any = JSON.parse(JSON.stringify(this.viewparams));
let context: any = JSON.parse(JSON.stringify(this.context));
// 附加参数处理
if (this.localContext && Object.keys(this.localContext).length >0) {
let _context = this.$util.computedNavData(formData,arg.context,arg.param,this.localContext);
Object.assign(arg.context,_context);
if (this.itemParam.context) {
let _context = this.$util.formatData(activeData,this.itemParam.context);
Object.assign(context,_context);
}
if (this.itemParam.param) {
let _param = this.$util.formatData(activeData,this.itemParam.param);
Object.assign(param,_param);
}
if (this.localParam && Object.keys(this.localParam).length >0) {
let _param = this.$util.computedNavData(formData,arg.context,arg.param,this.localParam);
Object.assign(arg.param,_param);
if (this.itemParam.parentdata) {
let _parentdata = this.$util.formatData(activeData,this.itemParam.parentdata);
Object.assign(param,_parentdata);
}
this.viewdata = JSON.stringify(arg.context);
this.viewparam = JSON.stringify(arg.param);
this.viewdata = JSON.stringify(context);
this.viewparam = JSON.stringify(param);
}
/**
......@@ -215,7 +196,7 @@ export default class AppEmbedPicker extends Vue {
onActivedataChange(newVal: any, oldVal: any) {
const newFormData: any = JSON.parse(newVal);
const oldDormData: any = JSON.parse(oldVal);
this.setViewParam();
this.setViewParam(newFormData);
if (!this.refreshitems || this.ignorefieldvaluechange) {
return;
}
......@@ -234,7 +215,7 @@ export default class AppEmbedPicker extends Vue {
if(this.formState) {
this.formStateEvent = this.formState.subscribe(({ tag, action, data }) => {
if (Object.is('load', action)) {
this.setViewParam();
this.setViewParam(JSON.parse(this.data));
}
});
}
......@@ -258,21 +239,11 @@ export default class AppEmbedPicker extends Vue {
* @memberof AppEmbedPicker
*/
public setValue(item: any) {
let srfkey: string = '';
let srfmajortext: string = '';
if(item && Array.isArray(item)){
item.forEach((select: any)=>{
srfkey += select.srfkey+",";
srfmajortext += select.srfmajortext+',';
})
srfkey = srfkey.substring(0,srfkey.length-1);
srfmajortext = srfmajortext.substring(0,srfmajortext.length-1);
if (this.valueItem) {
this.$emit('formitemvaluechange', { name: this.valueItem, value: srfkey });
}
if (this.name) {
this.$emit('formitemvaluechange', { name: this.name, value: srfmajortext });
}
if (this.valueItem) {
this.$emit('formitemvaluechange', { name: this.valueItem, value: item[0].srfkey });
}
if (this.name) {
this.$emit('formitemvaluechange', { name: this.name, value: item[0].srfmajortext });
}
}
......
......@@ -107,18 +107,18 @@ export default class AppExportExcel extends Vue {
this.visible = false;
} else if (Object.is(type, 'custom')) {
if (!this.startPage || !this.endPage) {
this.$Notice.warning({ title: (this.$t('app.commonWords.warning') as string), desc: (this.$t('components.appExportExcel.desc') as string) });
this.$Notice.warning({ title: '警告', desc: '请输入起始页' });
return;
}
const startPage: any = Number.parseInt(this.startPage, 10);
const endPage: any = Number.parseInt(this.endPage, 10);
if (Number.isNaN(startPage) || Number.isNaN(endPage)) {
this.$Notice.warning({ title: (this.$t('app.commonWords.warning') as string), desc: (this.$t('components.appExportExcel.desc1') as string) });
this.$Notice.warning({ title: '警告', desc: '请输入有效的起始页' });
return;
}
if (startPage < 1 || endPage < 1 || startPage > endPage) {
this.$Notice.warning({ title: (this.$t('app.commonWords.warning') as string), desc: (this.$t('components.appExportExcel.desc1') as string) });
this.$Notice.warning({ title: '警告', desc: '请输入有效的起始页' });
return;
}
this.startPage = null;
......
......@@ -100,22 +100,6 @@ export default class AppFileUpload extends Vue {
*/
@Prop() public data!: string;
/**
* 视图参数
*
* @type {*}
* @memberof AppFormDRUIPart
*/
@Prop() public viewparams!: any;
/**
* 视图上下文
*
* @type {*}
* @memberof AppAutocomplete
*/
@Prop() public context!: any;
/**
* 初始化值
*
......@@ -136,8 +120,7 @@ export default class AppFileUpload extends Vue {
if (this.ignorefieldvaluechange) {
return;
}
this.getParams();
this.setFiles(newval);
this.setFiles(newval)
this.dataProcess();
}
......@@ -163,7 +146,7 @@ export default class AppFileUpload extends Vue {
* @type {string}
* @memberof AppFileUpload
*/
@Prop() public uploadparams?: any;
@Prop() public uploadparams?: string;
/**
* 下载参数
......@@ -171,7 +154,15 @@ export default class AppFileUpload extends Vue {
* @type {string}
* @memberof AppFileUpload
*/
@Prop() public exportparams?: any;
@Prop() public exportparams?: string;
/**
* 自定义参数
*
* @type {*}
* @memberof AppFileUpload
*/
@Prop() public customparams?: any;
/**
* 上传文件路径
......@@ -195,20 +186,20 @@ export default class AppFileUpload extends Vue {
public files = [];
/**
* 上传params
* 上传keys
*
* @type {Array<any>}
* @memberof AppFileUpload
*/
public upload_params: Array<any> = [];
public upload_keys: Array<any> = [];
/**
* 导出params
* 导出keys
*
* @type {Array<any>}
* @memberof AppFileUpload
*/
public export_params: Array<any> = [];
public export_keys: Array<any> = [];
/**
* 自定义数组
......@@ -248,37 +239,31 @@ export default class AppFileUpload extends Vue {
* @memberof AppFileUpload
*/
private dataProcess(): void {
let upload_arr: Array<string> = [];
let export_arr: Array<string> = [];
const _data: any = JSON.parse(this.data);
this.upload_keys.forEach((key: string) => {
upload_arr.push(`${key}=${_data[key]}`);
});
this.export_keys.forEach((key: string) => {
export_arr.push(`${key}=${_data[key]}`);
});
let _url = `${Environment.BaseUrl}${Environment.UploadFile}`;
if (this.upload_params.length > 0 ) {
_url +='?';
this.upload_params.forEach((item:any,i:any)=>{
_url += `${Object.keys(item)[0]}=${Object.values(item)[0]}`;
if(i<this.upload_params.length-1){
_url += '&';
}
})
if (upload_arr.length > 0 || this.custom_arr.length > 0) {
_url = `${_url}?${upload_arr.join('&')}${upload_arr.length > 0 ? '&' : ''}${this.custom_arr.join('&')}`;
}
this.uploadUrl = _url;
this.files.forEach((file: any) => {
let url = `${this.downloadUrl}/${file.id}`;
if (this.export_params.length > 0) {
url +='?';
this.export_params.forEach((item:any,i:any)=>{
url += `${Object.keys(item)[0]}=${Object.values(item)[0]}`;
if(i<this.export_params.length-1){
url += '&';
}
})
if (upload_arr.length > 0 || this.custom_arr.length > 0) {
url = `${url}?${upload_arr.join('&')}${upload_arr.length > 0 ? '&' : ''}${this.custom_arr.join('&')}`;
}
file.url = url;
});
}
/**
* vue 生命周期
*
......@@ -289,7 +274,6 @@ export default class AppFileUpload extends Vue {
this.formStateEvent = this.formState.subscribe(($event: any) => {
// 表单加载完成
if (Object.is($event.type, 'load')) {
this.getParams();
this.setFiles(this.value);
this.dataProcess();
}
......@@ -305,47 +289,32 @@ export default class AppFileUpload extends Vue {
*/
public mounted() {
this.appData = this.$store.getters.getAppData();
this.getParams();
this.setFiles(this.value);
this.dataProcess();
}
/**
*获取上传,导出参数
*
*@memberof AppFileUpload
*/
public getParams(){
let uploadparams: any = JSON.parse(JSON.stringify(this.uploadparams));
let exportparams: any = JSON.parse(JSON.stringify(this.exportparams));
let upload_params: Array<string> = [];
let export_params: Array<string> = [];
let param:any = this.viewparams;
let context:any = this.context;
let _data:any = JSON.parse(this.data);
let uploadparams: string = '';
let exportparams: string = '';
let upload_keys: Array<string> = [];
let export_keys: Array<string> = [];
let custom_arr: Array<string> = [];
if (this.uploadparams && !Object.is(this.uploadparams, '')) {
upload_params = this.$util.computedNavData(_data,param,context,uploadparams);
uploadparams = this.uploadparams;
upload_keys = uploadparams.split(';');
}
if (this.exportparams && !Object.is(this.exportparams, '')) {
export_params = this.$util.computedNavData(_data,param,context,exportparams);
}
this.upload_params = [];
this.export_params = [];
for (const item in upload_params) {
this.upload_params.push({
[item]:upload_params[item]
})
exportparams = this.exportparams;
export_keys = exportparams.split(';');
}
for (const item in export_params) {
this.export_params.push({
[item]:export_params[item]
})
if (this.customparams && !Object.is(this.customparams, '')) {
Object.keys(this.customparams).forEach((name: string) => {
custom_arr.push(`${name}=${this.customparams[name]}`);
});
}
this.upload_keys = upload_keys;
this.export_keys = export_keys;
this.custom_arr = custom_arr;
this.setFiles(this.value);
this.dataProcess();
}
/**
......
......@@ -3,8 +3,7 @@
<component
:is="viewname"
class="viewcontainer2"
:viewdata ="viewdata"
:viewparam="viewparam"
:viewdata ="viewdata"
:viewDefaultUsage="false"
:formDruipart="formDruipart"
:isformDruipart="true"
......@@ -40,14 +39,6 @@ export default class AppFormDRUIPart extends Vue {
*/
@Prop() public viewname?: string;
/**
* 临时数据模式:从数据模式:"2"、主数据模式:"1"、无临时数据模式:"0"
*
* @type {string}
* @memberof AppFormDRUIPart
*/
@Prop({default:"0"}) public tempMode?:string;
/**
* 刷新关系项
*
......@@ -56,14 +47,6 @@ export default class AppFormDRUIPart extends Vue {
*/
@Prop({ default: '' }) public refreshitems!: string;
/**
* 禁止加载
*
* @type {string}
* @memberof AppFormDRUIPart
*/
@Prop({ default: false }) public isForbidLoad!: boolean;
/**
* 关系视图类型
*
......@@ -128,22 +111,6 @@ export default class AppFormDRUIPart extends Vue {
*/
@Prop() public viewparams!: any;
/**
* 局部上下文
*
* @type {*}
* @memberof AppFormDRUIPart
*/
@Prop() public localContext!:any;
/**
* 局部参数
*
* @type {*}
* @memberof AppFormDRUIPart
*/
@Prop() public localParam!:any;
/**
* 应用实体参数名称
*
......@@ -265,52 +232,29 @@ export default class AppFormDRUIPart extends Vue {
}
const formData: any = data?data:JSON.parse(this.data);
const _paramitem = formData[this.paramItem];
let tempContext:any = {};
let tempParam:any = {};
Object.assign(tempContext, this.$viewTool.getIndexViewParam());
let viewdata = {srfparentdename:this.parentName,srfparentkey:_paramitem};
Object.assign(viewdata, this.$viewTool.getIndexViewParam());
const _parameters: any[] = [...this.$viewTool.getIndexParameters(), ...this.parameters];
_parameters.forEach((parameter: any) => {
const { pathName, parameterName }: { pathName: string, parameterName: string } = parameter;
if (formData[parameterName] && !Object.is(formData[parameterName], '')) {
Object.assign(tempContext, { [parameterName]: formData[parameterName] });
Object.assign(viewdata, { [parameterName]: formData[parameterName] });
}
});
Object.assign(tempContext, { [this.paramItem]: _paramitem });
Object.assign(viewdata, { [this.paramItem]: _paramitem });
//设置顶层视图唯一标识
Object.assign(tempContext,this.context);
Object.assign(tempContext,{srfparentdename:this.parentName,srfparentkey:_paramitem});
Object.assign(tempParam,{srfparentdename:this.parentName,srfparentkey:_paramitem});
// 设置局部上下文
if(this.localContext && Object.keys(this.localContext).length >0){
let _context:any = this.$util.computedNavData(formData,tempContext,this.viewparams,this.localContext);
Object.assign(tempContext,_context);
}
this.viewdata = JSON.stringify(tempContext);
// 设置局部参数
if(this.localParam && Object.keys(this.localParam).length >0){
let _param:any = this.$util.computedNavData(formData,tempContext,this.viewparams,this.localParam);
Object.assign(tempParam,_param);
}
if(this.viewparams.hasOwnProperty('copymode')) Object.assign(tempParam,{copymode:this.viewparams.copymode});
this.viewparam = JSON.stringify(tempParam);
Object.assign(viewdata,this.context);
this.viewdata = JSON.stringify(viewdata);
this.viewparam = JSON.stringify(this.viewparams);
if (this.isRelationalData) {
// 从数据模式无遮罩层
if(this.tempMode && Object.is(this.tempMode,"2")){
if (!_paramitem || _paramitem == null || Object.is(_paramitem, '')) {
this.blockUIStart();
return;
} else {
this.blockUIStop();
}else{
if (!_paramitem || _paramitem == null || Object.is(_paramitem, '')) {
this.blockUIStart();
return;
} else {
this.blockUIStop();
}
}
}
if(!this.isForbidLoad){
setTimeout(() => {
this.formDruipart.next({action:'load',data:{srfparentdename:this.parentName,srfparentkey:_paramitem}});
}, 0);
}
this.formDruipart.next({action:'load',data:{srfparentdename:this.parentName,srfparentkey:_paramitem}});
}
/**
......@@ -333,22 +277,12 @@ export default class AppFormDRUIPart extends Vue {
}
// 表单保存之前
if (Object.is($event.type, 'beforesave')) {
// 支持嵌入视图类型:嵌入视图本身抛drdatasaved的视图,如:DEMEDITVIEW9,DEGRIDVIEW9,DEGRIDVIEW等
// 从数据模式直接通知保存
// 临时补充,todo
if(Object.is(this.refviewtype,'DEMEDITVIEW9') || Object.is(this.refviewtype,'DEGRIDVIEW9') || Object.is(this.refviewtype,'DEGRIDVIEW')){
if(this.tempMode && Object.is(this.tempMode,"2")){
if(Object.is(this.refviewtype,'DEMEDITVIEW9') || Object.is(this.refviewtype,'DEGRIDVIEW9')){
this.formDruipart.next({action:'save',data:$event.data});
}else{
if($event.data && !Object.is($event.data.srfuf,"0")){
this.formDruipart.next({action:'save',data:$event.data});
}else{
this.$emit('drdatasaved',$event);
}
} else {
// 不需要保存的界面也要抛出事件,供计数器计算
this.$emit('drdatasaved',$event);
}
}else{
this.$emit('drdatasaved',$event);
}
}
// 表单保存完成
if (Object.is($event.type, 'save')) {
......@@ -411,7 +345,7 @@ export default class AppFormDRUIPart extends Vue {
* @memberof AppFormDRUIPart
*/
public mditemsload(){
console.log((this.$t('components.appFormDRUIPart.viewLoadComp') as string));
console.log('多数据视图加载完成,触发后续表单项更新');
}
/**
......@@ -422,7 +356,7 @@ export default class AppFormDRUIPart extends Vue {
*/
public drdatasaved($event:any){
this.$emit('drdatasaved',$event);
console.log(this.viewname+(this.$t('components.appFormDRUIPart.save') as string));
console.log(this.viewname+'关系数据保存完成');
}
/**
......@@ -432,7 +366,7 @@ export default class AppFormDRUIPart extends Vue {
* @memberof AppFormDRUIPart
*/
public drdatachange(){
console.log('DEMEDITVIEW9 '+(this.$t('components.appFormDRUIPart.change') as string));
console.log('DEMEDITVIEW9 关系数据值变化');
}
/**
......@@ -442,7 +376,7 @@ export default class AppFormDRUIPart extends Vue {
* @memberof AppFormDRUIPart
*/
public viewdataschange(){
console.log((this.$t('components.appFormDRUIPart.change1') as string));
console.log('视图数据变化');
}
/**
......@@ -452,7 +386,7 @@ export default class AppFormDRUIPart extends Vue {
* @memberof AppFormDRUIPart
*/
public viewload(){
console.log((this.$t('components.appFormDRUIPart.loadComp') as string));
console.log('视图加载完成');
}
}
</script>
......
.app-form-group {
>.ivu-card-head {
>p {
>i {
......@@ -8,12 +7,8 @@
}
}
}
>.ivu-card-extra {
.item-extract-mode {
display: flex;
.item {
margin-left: 12px;
}
......@@ -22,7 +17,6 @@
}
.app-form-group.app-group-collapse-contant {
.ivu-card-body {
display: none;
}
......@@ -30,12 +24,9 @@
.app-group-flex {
height: 100%;
overflow-y: auto;
overflow-x: hidden;
>.ivu-card-body {
overflow: auto;
> .ivu-card-body {
height: calc(100% - 51px);
overflow-y: auto;
overflow-x: hidden;
overflow: auto;
}
}
\ No newline at end of file
.app-form-item {
height: 100%;
padding: 0 6px;
.editor {
height: 100%;
.ivu-form-item-content {
height: 100%;
min-height: 36px;
}
}
.app-form-item-label {
padding: 6px 10px 6px 0px;
}
// margin-bottom: 16px;
>.ivu-form-item-label {
text-decoration: none;
display: block;
overflow: hidden;
white-space: nowrap;
}
>.ivu-form-item-content {
min-height: 36px;
}
}
.app-form-item.label-top, .app-form-item.label-bottom {
.app-form-item-label {
display: block;
}
}
.app-form-item.label-left, .app-form-item.label-right {
.app-form-item-label, .editor {
height: 100%;
}
}
.app-form-item.label-left {
.app-form-item-label {
float: left;
text-align: right;
}
}
.app-form-item.label-right {
.app-form-item-label {
float: right;
padding: 6px 0px 6px 10px;
}
}
.app-form-item.label-none {
.app-form-item-label {
display: none !important;
}
.app-form-item-label-top {
>.ivu-form-item-label {
float: none;
display: inline-block;
padding: 0 0 10px;
}
}
\ No newline at end of file
......@@ -15,7 +15,7 @@
overflow: auto;
> .ivu-tabs-tabpane {
height: 100%;
overflow: initial;
overflow: auto;
}
}
}
......
......@@ -98,22 +98,6 @@ export default class AppImageUpload extends Vue {
*/
@Prop() public data!: string;
/**
* 视图参数
*
* @type {*}
* @memberof AppFormDRUIPart
*/
@Prop() public viewparams!: any;
/**
* 视图上下文
*
* @type {*}
* @memberof AppAutocomplete
*/
@Prop() public context!: any;
/**
* 初始化值
*
......@@ -135,7 +119,6 @@ export default class AppImageUpload extends Vue {
if (this.ignorefieldvaluechange) {
return;
}
this.getParams();
this.setFiles(newval)
this.dataProcess();
}
......@@ -202,20 +185,20 @@ export default class AppImageUpload extends Vue {
@Provide() public files = [];
/**
* 上传params
* 上传keys
*
* @type {Array<any>}
* @memberof AppImageUpload
*/
public upload_params: Array<any> = [];
public upload_keys: Array<any> = [];
/**
* 导出params
* 导出keys
*
* @type {Array<any>}
* @memberof AppImageUpload
*/
public export_params: Array<any> = [];
public export_keys: Array<any> = [];
/**
* 自定义数组
......@@ -255,31 +238,26 @@ export default class AppImageUpload extends Vue {
* @memberof AppImageUpload
*/
private dataProcess(): void {
let upload_arr: Array<string> = [];
let export_arr: Array<string> = [];
const _data: any = JSON.parse(this.data);
this.upload_keys.forEach((key: string) => {
upload_arr.push(`${key}=${_data[key]}`);
});
this.export_keys.forEach((key: string) => {
export_arr.push(`${key}=${_data[key]}`);
});
let _url = `${Environment.BaseUrl}${Environment.UploadFile}`;
if (this.upload_params.length > 0 ) {
_url +='?';
this.upload_params.forEach((item:any,i:any)=>{
_url += `${Object.keys(item)[0]}=${Object.values(item)[0]}`;
if(i<this.upload_params.length-1){
_url += '&';
}
})
if (upload_arr.length > 0 || this.custom_arr.length > 0) {
_url = `${_url}?${upload_arr.join('&')}${upload_arr.length > 0 ? '&' : ''}${this.custom_arr.join('&')}`;
}
this.uploadUrl = _url;
this.files.forEach((file: any) => {
let url = `${this.downloadUrl}/${file.id}`;
if (this.export_params.length > 0) {
url +='?';
this.export_params.forEach((item:any,i:any)=>{
url += `${Object.keys(item)[0]}=${Object.values(item)[0]}`;
if(i<this.export_params.length-1){
url += '&';
}
})
if (upload_arr.length > 0 || this.custom_arr.length > 0) {
url = `${url}?${upload_arr.join('&')}${upload_arr.length > 0 ? '&' : ''}${this.custom_arr.join('&')}`;
}
file.url = url;
});
......@@ -295,7 +273,6 @@ export default class AppImageUpload extends Vue {
this.formStateEvent = this.formState.subscribe(($event: any) => {
// 表单加载完成
if (Object.is($event.type, 'load')) {
this.getParams();
this.setFiles(this.value);
this.dataProcess();
}
......@@ -310,47 +287,32 @@ export default class AppImageUpload extends Vue {
*/
public mounted() {
this.appData = this.$store.getters.getAppData();
this.getParams();
this.setFiles(this.value);
this.dataProcess();
}
/**
*获取上传,导出参数
*
*@memberof AppImageUpload
*/
public getParams(){
let uploadparams: any = JSON.parse(JSON.stringify(this.uploadparams));
let exportparams: any = JSON.parse(JSON.stringify(this.exportparams));
let upload_params: Array<string> = [];
let export_params: Array<string> = [];
let param:any = this.viewparams;
let context:any = this.context;
let _data:any = JSON.parse(this.data);
let uploadparams: string = '';
let exportparams: string = '';
let upload_keys: Array<string> = [];
let export_keys: Array<string> = [];
let custom_arr: Array<string> = [];
if (this.uploadparams && !Object.is(this.uploadparams, '')) {
upload_params = this.$util.computedNavData(_data,param,context,uploadparams);
uploadparams = this.uploadparams;
upload_keys = uploadparams.split(';');
}
if (this.exportparams && !Object.is(this.exportparams, '')) {
export_params = this.$util.computedNavData(_data,param,context,exportparams);
}
this.upload_params = [];
this.export_params = [];
for (const item in upload_params) {
this.upload_params.push({
[item]:upload_params[item]
})
exportparams = this.exportparams;
export_keys = exportparams.split(';');
}
for (const item in export_params) {
this.export_params.push({
[item]:export_params[item]
})
if (this.customparams && !Object.is(this.customparams, '')) {
Object.keys(this.customparams).forEach((name: string) => {
custom_arr.push(`${name}=${this.customparams[name]}`);
});
}
this.upload_keys = upload_keys;
this.export_keys = export_keys;
this.custom_arr = custom_arr;
this.setFiles(this.value);
this.dataProcess();
}
/**
......@@ -407,7 +369,7 @@ export default class AppImageUpload extends Vue {
* @memberof AppImageUpload
*/
public onError(error: any, file: any, fileList: any) {
this.$Notice.error({ title: (this.$t('components.appImageUpload.uploadFail') as string) });
this.$Notice.error({ title: '上传失败' });
}
/**
......
.ivu-dropdown{
cursor: pointer;
}
\ No newline at end of file
<template>
<dropdown v-if="localList.length > 1" trigger='click' @on-click="selectLang">
<dropdown trigger='click' @on-click="selectLang">
<span>
{{title}}
<icon size='18' type='md-arrow-dropdown'></icon>
......
......@@ -65,36 +65,14 @@ export default class AppOrgSector extends Vue {
* @memberof AppOrgSector
*/
public mounted() {
this.getData();
}
/**
* 获取数据
*
* @memberof AppOrgSector
*/
public getData(){
if (this.$store.getters.getAppData()) {
let _context = this.$store.getters.getAppData().context;
let _srforgname = this.$store.getters.getAppData().context.srforgname;
let _srforgsectorname = this.$store.getters.getAppData().context.srforgsectorname;
if (_context && this.$store.getters.getAppData().context.srforgsectorid ){
if (this.$store.getters.getAppData().context && this.$store.getters.getAppData().context.srforgsectorid && this.$store.getters.getAppData().context.srforgsectorname) {
this.selectedOrgId = this.$store.getters.getAppData().context.srforgsectorid;
} else {
return false;
}
if(_context && _srforgname && _srforgsectorname){
this.selectedOrgName = _srforgname + '-' + _srforgsectorname;
} else if (_context && _srforgname) {
this.selectedOrgName = _srforgname;
} else if (_context && _srforgsectorname) {
this.selectedOrgName = _srforgsectorname;
this.selectedOrgName = this.$store.getters.getAppData().context.srforgsectorname;
}
if (this.$store.getters.getAppData().srforgsections) {
this.selectedOrgArray = this.$store.getters.getAppData().srforgsections;
}
}
}
......
......@@ -22,14 +22,6 @@
.ivu-select-dropdown{
max-height: 200px;
overflow: scroll;
margin: 0;
padding: 0;
.ivu-dropdown-menu{
.view-container{
margin: 0;
padding: 0;
}
}
.tree-contant{
overflow:inherit;
}
......
......@@ -8,17 +8,14 @@
:trigger-on-focus="true" :fetch-suggestions="(query, callback) => { this.onSearch(query, callback, true) }" @select="onACSelect"
@input="onInput" @blur="onBlur" style='width:100%;'>
<template v-slot:default="{item}">
<!-- <template v-if="item.isNew">
<template v-if="item.isNew">
<div v-if="linkview" @click="newAndEdit">{{$t('components.appPicker.newAndEdit')}}</div>
</template> -->
<template v-if="item.tag">
<div @click="clickAction(item.tag)">{{item.caption}}</div>
</template>
<slot v-else name="default" :item="item"></slot>
</template>
<template v-slot:suffix>
<i v-if="curvalue && !disabled" class='el-icon-circle-close' @click="onClear"></i>
<i v-if="!Object.is(editortype, 'ac') && showButton" class='el-icon-search' @click="openView"></i>
<i v-if="!Object.is(editortype, 'ac')" class='el-icon-search' @click="openView"></i>
<icon v-if="linkview" type="ios-open-outline" @click="openLinkView"/>
</template>
</el-autocomplete>
......@@ -40,10 +37,7 @@
@change="onSelect" :disabled="disabled" style='width:100%;' clearable
@clear="onClear" @visible-change="onSelectOpen">
<template v-if="items">
<template v-for="_item in items">
<el-option v-if="!_item.tag" :key="_item[deKeyField]" :value="_item[deKeyField]" :label="_item[deMajorField]" :disabled="_item.disabled"></el-option>
<el-option v-else :key="_item[deKeyField]" value="action"><span @click="clickAction(_item.tag)" style="float: left; width: 100%;">{{ _item.caption }}</span></el-option>
</template>
<el-option v-for="_item in items" :key="_item[deKeyField]" :value="_item[deKeyField]" :label="_item[deMajorField]" :disabled="_item.disabled"></el-option>
</template>
</el-select>
<span style='position: absolute;right: 5px;color: #c0c4cc;top:0;font-size: 13px;'>
......@@ -61,6 +55,7 @@ import { AppModal } from '@/utils';
@Component({
})
export default class AppPicker extends Vue {
/**
* 视图上下文
*
......@@ -133,14 +128,6 @@ export default class AppPicker extends Vue {
*/
@Prop() public disabled?: boolean;
/**
* 是否显示按钮
*
* @type {boolean}
* @memberof AppPicker
*/
@Prop({default:true}) public showButton?: boolean;
/**
* 类型
*
......@@ -166,20 +153,12 @@ export default class AppPicker extends Vue {
@Prop() public linkview?: any;
/**
* 局部上下文导航参数
* 表单项参数
*
* @type {any}
* @memberof AppPicker
*/
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppPicker
*/
@Prop() public localParam!:any;
@Prop() public itemParam: any;
/**
* 值项名称
......@@ -189,23 +168,6 @@ export default class AppPicker extends Vue {
*/
@Prop() public valueitem!: string;
/**
* 排序
*
* @type {string}
* @memberof AppPicker
*/
@Prop() public sort?: string;
/**
* 行为组
*
* @type {Array<any>}
* @memberof AppPicker
*/
@Prop() public actionDetails?:Array<any>;
/**
* 值
*
......@@ -272,7 +234,7 @@ export default class AppPicker extends Vue {
* @param {*} oldVal
* @memberof AppPicker
*/
@Watch('value',{immediate:true})
@Watch('value')
public onValueChange(newVal: any, oldVal: any) {
this.curvalue = newVal;
if (Object.is(this.editortype, 'dropdown') && this.valueitem) {
......@@ -295,8 +257,8 @@ export default class AppPicker extends Vue {
* @memberof AppPicker
*/
public created() {
if(!Object.is(this.editortype, 'pickup-no-ac') && !Object.is(this.editortype, 'dropdown')){
this.curvalue = this.value;
if(Object.is(this.editortype, 'dropdown')){
this.onSearch("", null, true);
}
}
......@@ -347,10 +309,7 @@ export default class AppPicker extends Vue {
query = '';
}
this.inputState = false;
if(this.sort && !Object.is(this.sort, "")) {
Object.assign(_param, { sort: this.sort });
}
Object.assign(_param, { query: query, size: 1000 });
Object.assign(_param, { query: query });
// 错误信息国际化
let error: string = (this.$t('components.appPicker.error') as any);
let miss: string = (this.$t('components.appPicker.miss') as any);
......@@ -368,11 +327,8 @@ export default class AppPicker extends Vue {
} else {
this.items = [...response];
}
// if(this.acParams && this.linkview){
// this.items.push({ isNew :true });
// }
if(this.acParams && this.actionDetails && this.actionDetails.length >0){
this.items = [...this.items,...this.actionDetails];
if(this.acParams && this.linkview){
this.items.push({ isNew :true });
}
if (callback) {
callback(this.items);
......@@ -454,9 +410,9 @@ export default class AppPicker extends Vue {
// 判断打开方式
if (view.placement && !Object.is(view.placement, '')) {
if (Object.is(view.placement, 'POPOVER')) {
this.openPopOver($event, view, _context, _param);
this.openPopOver($event, view, _context, data);
} else {
this.openDrawer(view, _context, _param);
this.openDrawer(view, _context, data);
}
} else {
this.openPopupModal(view, _context, _param);
......@@ -683,36 +639,32 @@ export default class AppPicker extends Vue {
* @memberof AppPicker
*/
public handlePublicParams(arg: any): boolean {
if (!this.itemParam) {
return true;
}
if (!this.data) {
this.$Notice.error({ title: (this.$t('components.appPicker.error') as any), desc: (this.$t('components.appPicker.formdataException') as any) });
return false;
}
// 合并表单参数
arg.param = this.viewparams ? JSON.parse(JSON.stringify(this.viewparams)) : {};
arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {};
arg.param = JSON.parse(JSON.stringify(this.viewparams));
arg.context = JSON.parse(JSON.stringify(this.context));
// 附加参数处理
if (this.localContext && Object.keys(this.localContext).length >0) {
let _context = this.$util.computedNavData(this.data,arg.context,arg.param,this.localContext);
if (this.itemParam.context) {
let _context = this.$util.formatData(this.data,this.itemParam.context);
Object.assign(arg.context,_context);
}
if (this.localParam && Object.keys(this.localParam).length >0) {
let _param = this.$util.computedNavData(this.data,arg.param,arg.param,this.localParam);
if (this.itemParam.param) {
let _param = this.$util.formatData(this.data,this.itemParam.param);
Object.assign(arg.param,_param);
}
if (this.itemParam.parentdata) {
let _parentdata = this.$util.formatData(this.data,this.itemParam.parentdata);
Object.assign(arg.param,_parentdata);
}
return true;
}
/**
* 触发界面行为
*
* @param {*} arg
* @returns
* @memberof AppPicker
*/
public clickAction(arg:any){
this.$emit('editoractionclick',arg);
}
/**
* 创建并编辑
*
......@@ -739,9 +691,9 @@ export default class AppPicker extends Vue {
// 判断打开方式
if (view.placement && !Object.is(view.placement, '')) {
if (Object.is(view.placement, 'POPOVER')) {
this.openPopOver($event, view, _context, _param);
this.openPopOver($event, view, _context, data);
} else {
this.openDrawer(view, _context, _param);
this.openDrawer(view, _context, data);
}
} else {
this.openPopupModal(view, _context, _param);
......
......@@ -6,7 +6,7 @@
</radio-group>
</template>
<script lang = 'ts'>
import { Component, Vue, Prop, Model,Watch } from 'vue-property-decorator';
import { Component, Vue, Prop, Model } from 'vue-property-decorator';
import CodeListService from "@service/app/codelist-service";
@Component({})
......@@ -61,39 +61,6 @@ export default class AppRadioGroup extends Vue {
*/
@Prop() public codelistType?: string;
/**
* 传入表单数据
*
* @type {*}
* @memberof AppRadioGroup
*/
@Prop() public data?: any;
/**
* 监听表单数据变化
*
* @memberof AppRadioGroup
*/
@Watch('data',{immediate:true,deep:true})
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)}`);
})
}
}
}
/**
* 是否禁用
*
......@@ -102,38 +69,6 @@ export default class AppRadioGroup extends Vue {
*/
@Prop() public disabled?: boolean;
/**
* 局部上下文导航参数
*
* @type {any}
* @memberof AppRadioGroup
*/
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppRadioGroup
*/
@Prop() public localParam!:any;
/**
* 视图上下文
*
* @type {*}
* @memberof AppRadioGroup
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof AppRadioGroup
*/
@Prop() public viewparams!: any;
/**
* 属性名称
*
......@@ -164,28 +99,6 @@ export default class AppRadioGroup extends Vue {
*/
public items: any[] = [];
/**
* 公共参数处理
*
* @param {*} arg
* @returns
* @memberof AppRadioGroup
*/
public handlePublicParams(arg: any) {
// 合并表单参数
arg.param = this.viewparams ? JSON.parse(JSON.stringify(this.viewparams)) : {};
arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {};
// 附加参数处理
if (this.localContext && Object.keys(this.localContext).length >0) {
let _context = this.$util.computedNavData(this.data,arg.context,arg.param,this.localContext);
Object.assign(arg.context,_context);
}
if (this.localParam && Object.keys(this.localParam).length >0) {
let _param = this.$util.computedNavData(this.data,arg.param,arg.param,this.localParam);
Object.assign(arg.param,_param);
}
}
/**
* vue 生命周期
*
......@@ -195,16 +108,10 @@ export default class AppRadioGroup extends Vue {
if(this.tag && this.codelistType == 'STATIC'){
this.items = this.$store.getters.getCodeListItems(this.tag);
}else 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.items = res;
}).catch((error:any)=>{
console.log(`----${this.tag}----${(this.$t('app.commonWords.codeNotExist') as string)}`);
this.codeListService.getItems(this.tag).then((data:any)=>{
this.items = data;
}).catch((data:any)=>{
console.log(`----${this.tag}----代码表不存在!`);
})
}
}
......
......@@ -76,7 +76,6 @@ export default class AppSlider extends Vue {
*/
@Watch('value')
public onValueChange(newVal: any, oldVal: any) {
newVal = (newVal === null) ? 0 : newVal;
this.currentVal = parseInt(newVal);
}
......
<template>
<codelist v-if="tag" :tag="tag" :value="value" :codelistType="codelistType" :renderMode="renderMode" :valueSeparator="valueSeparator" :textSeparator="textSeparator" :data="data" :localContext="localContext" :localParam="localParam" :context="context" :viewparams="viewparams"></codelist>
<codelist v-if="tag" :tag="tag" :value="value" :codelistType="codelistType" :renderMode="renderMode" :valueSeparator="valueSeparator" :textSeparator="textSeparator"></codelist>
<app-upload-file-info v-else-if="Object.is(this.editorType,'PICTURE') || Object.is(this.editorType,'PICTURE_ONE') || Object.is(this.editorType,'FILEUPLOADER')" :value="value" :name="name"></app-upload-file-info>
<span class="app-span" v-else >{{text}}</span>
</template>
<script lang="ts">
import { Vue, Component, Prop, Watch, Model } from 'vue-property-decorator';
import moment from "moment";
import CodeListService from "@service/app/codelist-service";
@Component({})
export default class AppSpan extends Vue {
export default class DropDownList extends Vue {
/**
* 当前值
......@@ -18,38 +19,6 @@ export default class AppSpan extends Vue {
*/
@Prop() public value?: any;
/**
* 数据类型
*
* @type {string}
* @memberof AppSpan
*/
@Prop() public dataType?: string;
/**
* 单位名称
*
* @type {string}
* @memberof AppSpan
*/
@Prop({default:''}) public unitName?: string;
/**
* 精度
*
* @type {number}
* @memberof AppSpan
*/
@Prop({default:'2'}) public precision?:number;
/**
* 日期值格式化
*
* @type {string}
* @memberof AppSpan
*/
@Prop() public valueFormat?: string;
/**
* 当前表单项名称
*
......@@ -77,63 +46,23 @@ export default class AppSpan extends Vue {
/**
* 获取或模式
* @type {boolean}
* @memberof AppSpan
* @memberof SelectPicker
*/
@Prop({default:"STR"}) public renderMode?: string;
/**
* 文本分隔符
* @type {boolean}
* @memberof AppSpan
* @memberof SelectPicker
*/
@Prop({default:'、'}) public textSeparator?: string;
@Prop({default:"、"}) public textSeparator?: string;
/**
* 值分隔符
* @type {boolean}
* @memberof AppSpan
* @memberof SelectPicker
*/
@Prop({default:','}) public valueSeparator?: string;
/**
* 传入表单数据
*
* @type {*}
* @memberof AppSpan
*/
@Prop() public data?: any;
/**
* 局部上下文导航参数
*
* @type {any}
* @memberof AppSpan
*/
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppSpan
*/
@Prop() public localParam!:any;
/**
* 视图上下文
*
* @type {*}
* @memberof AppSpan
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof AppSpan
*/
@Prop() public viewparams!: any;
@Prop({default:";"}) public valueSeparator?: string;
/**
* 监控表单属性 data 值
......@@ -177,65 +106,13 @@ export default class AppSpan extends Vue {
* @memberof AppSpan
*/
public load(){
if(this.tag){
if(!this.value || this.tag){
return; //代码表走codelist组件
}else if(this.editorType === "ADDRESSPICKUP"){
if(this.$util.isEmpty(this.value)){
this.text = '';
}else{
JSON.parse(this.value).forEach((item:any,index:number) => {
this.text += index === 0 ? item.srfmajortext : ","+item.srfmajortext;
});
}
}else{
if(this.$util.isEmpty(this.value)){
this.text = '';
}else if(this.dataType){
this.dataFormat();
}else{
this.text = this.value;
}
}
}
/**
* 数据格式化
*
* @memberof AppSpan
*/
public dataFormat(){
if(this.valueFormat){
this.dateFormat() ;
return;
}
if(Object.is(this.dataType,"CURRENCY")){
let number:any = Number(this.value);
this.text = Number(number.toFixed(this.precision)).toLocaleString('en-US')+ ' '+ this.unitName;
}else if(Object.is(this.dataType,"FLOAT") || Object.is(this.dataType,"DECIMAL")){
let number:any = Number(this.value);
this.text = number.toFixed(this.precision);
}else {
this.text = this.value;
}
}
/**
* 日期格式化
*
* @memberof AppSpan
*/
public dateFormat(){
if(this.valueFormat){
if(this.valueFormat.indexOf('%1$t') !== -1){
this.text= moment(this.data).format("YYYY-MM-DD HH:mm:ss");
}else if(this.valueFormat.indexOf('%1$s') == -1){
this.text= moment(this.data).format(this.valueFormat);
}else{
this.text= this.value;
}
}
}
}
</script>
......
......@@ -36,7 +36,7 @@ export default class AppTreePicker extends Vue {
* 视图上下文
*
* @type {*}
* @memberof AppTreePicker
* @memberof AppFormDRUIPart
*/
@Prop() public context!: any;
......@@ -44,7 +44,7 @@ export default class AppTreePicker extends Vue {
* 视图参数
*
* @type {*}
* @memberof AppTreePicker
* @memberof AppFormDRUIPart
*/
@Prop() public viewparams!: any;
......@@ -52,7 +52,7 @@ export default class AppTreePicker extends Vue {
* 表单数据
*
* @type {*}
* @memberof AppTreePicker
* @memberof AppPicker
*/
@Prop() public data!: any;
......@@ -68,7 +68,7 @@ export default class AppTreePicker extends Vue {
* 是否启用
*
* @type {boolean}
* @memberof AppTreePicker
* @memberof AppPicker
*/
@Prop({default: false}) public disabled!: boolean;
......@@ -101,7 +101,7 @@ export default class AppTreePicker extends Vue {
* 值项名称
*
* @type {string}
* @memberof AppTreePicker
* @memberof AppPicker
*/
@Prop() public valueItem?: string;
......@@ -109,7 +109,7 @@ export default class AppTreePicker extends Vue {
* 关联视图名称
*
* @type {string}
* @memberof AppTreePicker
* @memberof AppPicker
*/
@Prop() public refviewname?: string;
......@@ -125,25 +125,17 @@ export default class AppTreePicker extends Vue {
* 属性项名称
*
* @type {string}
* @memberof AppTreePicker
* @memberof AppPicker
*/
@Prop() public name!: string;
/**
* 局部上下文导航参数
*
* @type {any}
* @memberof AppTreePicker
*/
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* 关联视图参数
*
* @type {*}
* @memberof AppTreePicker
*/
@Prop() public localParam!:any;
@Prop() public itemParam: any;
/**
* 是否忽略之变化
......@@ -218,8 +210,8 @@ export default class AppTreePicker extends Vue {
*
* @memberof AppTreePicker
*/
public setViewParam() {
if (!this.data) {
public setViewParam(activeData: any) {
if (!this.itemParam || !activeData) {
return;
}
let arg: any = {};
......@@ -227,13 +219,17 @@ export default class AppTreePicker extends Vue {
let param: any = JSON.parse(JSON.stringify(this.viewparams));
let context: any = JSON.parse(JSON.stringify(this.context));
// 附加参数处理
if (this.localContext && Object.keys(this.localContext).length >0) {
let _context = this.$util.computedNavData(this.data,arg.context,arg.param,this.localContext);
Object.assign(arg.context,_context);
if (this.itemParam.context) {
let _context = this.$util.formatData(activeData,this.itemParam.context);
Object.assign(context,_context);
}
if (this.localParam && Object.keys(this.localParam).length >0) {
let _param = this.$util.computedNavData(this.data,arg.param,arg.param,this.localParam);
Object.assign(arg.param,_param);
if (this.itemParam.param) {
let _param = this.$util.formatData(activeData,this.itemParam.param);
Object.assign(param,_param);
}
if (this.itemParam.parentdata) {
let _parentdata = this.$util.formatData(activeData,this.itemParam.parentdata);
Object.assign(param,_parentdata);
}
this.viewdata = JSON.stringify(context);
this.viewparam = JSON.stringify(param);
......@@ -244,13 +240,13 @@ export default class AppTreePicker extends Vue {
*
* @param {*} newVal
* @param {*} oldVal
* @memberof AppTreePicker
* @memberof AppFormDRUIPart
*/
@Watch('data')
onActivedataChange(newVal: any, oldVal: any) {
const newFormData: any = JSON.parse(newVal);
const oldDormData: any = JSON.parse(oldVal);
this.setViewParam();
this.setViewParam(newFormData);
if (!this.refreshitems || this.ignorefieldvaluechange) {
return;
}
......@@ -265,7 +261,7 @@ export default class AppTreePicker extends Vue {
*
* @param {*} newVal
* @param {*} oldVal
* @memberof AppTreePicker
* @memberof AppPicker
*/
@Watch('value')
public onValueChange(newVal: any, oldVal: any) {
......@@ -281,7 +277,7 @@ export default class AppTreePicker extends Vue {
if(this.formState) {
this.formStateEvent = this.formState.subscribe(({ tag, action, data }) => {
if (Object.is('load', action)) {
this.setViewParam();
this.setViewParam(JSON.parse(this.data));
}
});
}
......@@ -290,7 +286,7 @@ export default class AppTreePicker extends Vue {
/**
* vue 生命周期
*
* @memberof AppTreePicker
* @memberof SelectType
*/
public destroyed() {
if (this.formStateEvent) {
......
......@@ -5,7 +5,4 @@
margin-right: 10px;
padding: 0 5px;
}
}
.user-dropdownMenu{
margin-top: 9px;
}
\ No newline at end of file
<template>
<div class='app-header-user'>
<dropdown transfer-class-name="user-dropdownMenu" @on-click="userSelect" :transfer="true">
<dropdown @on-click="userSelect" :transfer="true">
<div class='user'>
<span>{{user.name ? user.name : $t('components.appUser.name')}}</span>
&nbsp;&nbsp;<avatar :src="user.avatar" />
</div>
<dropdown-menu class='menu' slot='list' style='font-size: 15px !important;'>
<dropdown-item name='updatepwd' style='font-size: 15px !important;'>
<span><Icon type="ios-create-outline" style='margin-right: 8px;'/></span>
<span>{{$t('components.appUser.changepwd')}}</span>
</dropdown-item>
<dropdown-item name='logout' style='font-size: 15px !important;'>
<span><i aria-hidden='true' class='ivu-icon ivu-icon-md-power' style='margin-right: 8px;'></i></span>
<span><i aria-hidden='true' class='fa fa-cogs' style='margin-right: 8px;'></i></span>
<span>{{$t('components.appUser.logout')}}</span>
</dropdown-item>
</dropdown-menu>
......@@ -20,7 +16,7 @@
</template>
<script lang = 'ts'>
import { Vue, Component } from 'vue-property-decorator';
import { Subject } from 'rxjs';
@Component({
})
export default class AppUser extends Vue {
......@@ -50,13 +46,6 @@ export default class AppUser extends Vue {
this.logout();
}
});
}else if (Object.is(data, 'updatepwd')) {
let container: Subject<any> = this.$appmodal.openModal({ viewname: 'app-update-password', title: (this.$t('components.appUser.changepwd') as string), width: 500, height: 400, }, {}, {});
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
});
}
}
......@@ -75,12 +64,6 @@ export default class AppUser extends Vue {
_user.avatar = this.$store.getters.getAppData().context.srfusericonpath;
}
}
if(localStorage.getItem("user")){
let user:any = JSON.parse(localStorage.getItem("user") as string);
if(user && user.personname){
_user.name = user.personname;
}
}
Object.assign(this.user,_user,{
time: +new Date
});
......@@ -92,19 +75,9 @@ export default class AppUser extends Vue {
* @memberof AppUser
*/
public logout() {
const get: Promise<any> = this.$http.get('/v7/logout');
get.then((response:any) =>{
if (response && response.status === 200) {
localStorage.removeItem('user');
localStorage.removeItem('token');
let leftTime = new Date();
leftTime.setTime(leftTime.getSeconds() - 1);
document.cookie = "ibzuaa-token=;expires=" + leftTime.toUTCString();
this.$router.push({ name: 'login' });
}
}).catch((error: any) =>{
console.error(error);
})
localStorage.removeItem('user');
localStorage.removeItem('token');
this.$router.push({ name: 'login' });
}
}
</script>
......
......@@ -37,14 +37,14 @@ export default class CodeList extends Vue {
* 代码表类型
*
* @type {string}
* @memberof CodeList
* @memberof AppCheckBox
*/
@Prop() public codelistType?: string;
/**
* 当前值
* @type {any}
* @memberof CodeList
* @memberof SelectPicker
*
*/
@Prop() public value?: string;
......@@ -52,63 +52,23 @@ export default class CodeList extends Vue {
/**
* 获取或模式
* @type {boolean}
* @memberof CodeList
* @memberof SelectPicker
*/
@Prop({default:"STR"}) public renderMode?: string;
/**
* 文本分隔符
* @type {boolean}
* @memberof CodeList
* @memberof SelectPicker
*/
@Prop({default:'、'}) public textSeparator?: string;
@Prop({default:"、"}) public textSeparator?: string;
/**
* 值分隔符
* @type {boolean}
* @memberof CodeList
*/
@Prop({default:','}) public valueSeparator?: string;
/**
* 传入表单数据
*
* @type {*}
* @memberof CodeList
*/
@Prop() public data?: any;
/**
* 局部上下文导航参数
*
* @type {any}
* @memberof CodeList
*/
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof CodeList
*/
@Prop() public localParam!:any;
/**
* 视图上下文
*
* @type {*}
* @memberof CodeList
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof CodeList
* @memberof SelectPicker
*/
@Prop() public viewparams!: any;
@Prop({default:";"}) public valueSeparator?: string;
/**
* 是否为空
......@@ -141,7 +101,7 @@ export default class CodeList extends Vue {
*/
public isUseLangres:boolean = false;
/**
/**
* 数据值变化
*
* @param {*} newval
......@@ -152,18 +112,7 @@ export default class CodeList extends Vue {
@Watch('value')
public onValueChange(newVal: any, oldVal: any) {
this.dataHandle();
}
/**
* 监听表单数据变化
*
* @memberof CodeList
*/
@Watch('data',{immediate:true,deep:true})
onDataChange(newVal: any, oldVal: any) {
if(newVal){
this.dataHandle();
}
}
/**
......@@ -182,17 +131,11 @@ export default class CodeList extends Vue {
this.ifEmpty = false;
// 动态代码表处理
if (Object.is(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.codeListService.getItems(this.tag).then((res: any) => {
let items = res;
_this.setItems(items, _this);
}).catch((error: any) => {
console.log(`----${_this.tag}----${(this.$t('app.commonWords.codeNotExist') as string)}`);
console.log(`----${_this.tag}----代码表不存在`);
});
// 静态处理
} else if(Object.is(this.codelistType, "STATIC")){
......@@ -266,28 +209,6 @@ export default class CodeList extends Vue {
}
}
/**
* 公共参数处理
*
* @param {*} arg
* @returns
* @memberof CodeList
*/
public handlePublicParams(arg: any) {
// 合并表单参数
arg.param = this.viewparams ? JSON.parse(JSON.stringify(this.viewparams)) : {};
arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {};
// 附加参数处理
if (this.localContext && Object.keys(this.localContext).length >0) {
let _context = this.$util.computedNavData(this.data,arg.context,arg.param,this.localContext);
Object.assign(arg.context,_context);
}
if (this.localParam && Object.keys(this.localParam).length >0) {
let _param = this.$util.computedNavData(this.data,arg.param,arg.param,this.localParam);
Object.assign(arg.param,_param);
}
}
}
</script>
......
.context-menu-container {
// width: 100vw;
// height: 100vh;
// z-index: -10000;
// position: absolute;
// top: 0;
// left: 0;
// line-height: 1;
z-index: 10001;
// width: 100vw;
// height: 100vh;
// z-index: -10000;
// position: absolute;
// top: 0;
// left: 0;
line-height: 1;
.context-menu-content {
position: absolute;
background: #FFF;
// border: 1px solid #e3e3e3;
.tree-right-menu{
.ivu-select-dropdown{
overflow: auto;
}
}
.ivu-divider{
width: 100%;
}
}
.context-menu-content {
z-index: 10001;
position: absolute;
background: #FFF;
// border: 1px solid #e3e3e3;
}
.context-menus {
.context-menus {
.context-menus-item {
list-style: none;
line-height: 36px;
padding: 0 13px;
margin: 0;
font-size: 14px;
color: #606266;
cursor: pointer;
outline: none;
display: flex;
.icon {
display: flex;
justify-content: center;
align-items: center;
font-size: 16px;
width: 20px;
margin-right: 8px;
}
}
.context-menus-item:hover {
background-color: #ecf5ff;
color: #66b1ff;
}
}
.context-menus-item {
list-style: none;
line-height: 36px;
padding: 0 13px;
margin: 0;
font-size: 14px;
color: #606266;
cursor: pointer;
outline: none;
display: flex;
.icon {
display: flex;
justify-content: center;
align-items: center;
font-size: 16px;
width: 20px;
margin-right: 8px;
}
}
.context-menus-item:hover {
background-color: #ecf5ff;
color: #66b1ff;
}
}
}
.context-menu {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
\ No newline at end of file
......@@ -3,9 +3,9 @@
class='dropdown-list-dynamic'
:transfer="true"
v-model="currentVal"
:disabled="disabled"
:disabled="disabled === true ? true : false"
:clearable="true"
:filterable="filterable"
:filterable="filterable === true ? true : false"
@on-open-change="onClick"
:placeholder="$t('components.dropDownListDynamic.placeholder')">
<i-option v-for="(item, index) in items" :key="index" :value="item.value">{{($t('userCustom.'+tag+'.'+item.value)!== ('userCustom.'+tag+'.'+item.value))?$t('userCustom.'+tag+'.'+item.value) : item.text}}</i-option>
......@@ -81,25 +81,17 @@ export default class DropDownListDynamic extends Vue {
@Watch('data',{ deep: true })
onDataChange(newVal: any, val: any){
if(newVal){
this.handleOtherParam();
}
}
/**
* 局部上下文导航参数
* 传入额外参数
*
* @type {*}
* @memberof DropDownList
*/
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {*}
* @memberof DropDownList
* @memberof DropDownListDynamic
*/
@Prop() public localParam!:any;
@Prop() public itemParam?: any;
/**
* 是否禁用
......@@ -114,7 +106,7 @@ export default class DropDownListDynamic extends Vue {
* @type {boolean}
* @memberof DropDownListDynamic
*/
public filterable: boolean = true;
@Prop() public filterable?: boolean;
/**
* 下拉选提示内容
......@@ -123,12 +115,6 @@ export default class DropDownListDynamic extends Vue {
*/
@Prop() public placeholder?: string;
/**
* 属性类型
* @type {string}
* @memberof DropDownList
*/
@Prop() public valueType?: string;
/**
* 计算属性(当前值)
......@@ -159,40 +145,26 @@ export default class DropDownListDynamic extends Vue {
public items: any[] = [];
/**
* 视图上下文
*
* @type {*}
* @memberof AppAutocomplete
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof AppFormDRUIPart
*/
@Prop() public viewparams!: any;
/**
* 公共参数处理
*
* @param {*} arg
* @returns
* @memberof DropDownListDynamic
*/
public handlePublicParams(arg: any) {
// 合并表单参数
arg.param = this.viewparams ? JSON.parse(JSON.stringify(this.viewparams)) : {};
arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {};
// 附加参数处理
if (this.localContext && Object.keys(this.localContext).length >0) {
let _context = this.$util.computedNavData(this.data,arg.context,arg.param,this.localContext);
Object.assign(arg.context,_context);
}
if (this.localParam && Object.keys(this.localParam).length >0) {
let _param = this.$util.computedNavData(this.data,arg.context,arg.param,this.localParam);
Object.assign(arg.param,_param);
* 处理额外参数
*/
public handleOtherParam(){
if(this.itemParam){
this.queryParam = {};
this.otherParam = this.itemParam.parentdata;
if(this.otherParam && Object.keys(this.otherParam).length >0){
Object.keys(this.otherParam).forEach((item:any) =>{
let value: string | null = this.otherParam[item];
if (value && value.startsWith('%') && value.endsWith('%')) {
const key = value.substring(1, value.length - 1);
if (this.data && this.data.hasOwnProperty(key)) {
value = (this.data[key] !== null && this.data[key] !== undefined) ? this.data[key] : null;
} else {
value = null;
}
}
Object.assign(this.queryParam,{[item]:value});
})
}
}
}
......@@ -205,21 +177,13 @@ export default class DropDownListDynamic extends Vue {
if(this.tag && Object.is(this.codelistType,"STATIC")){
const codelist = this.$store.getters.getCodeList(this.tag);
if (codelist) {
let items: Array<any> = [...JSON.parse(JSON.stringify(codelist.items))];
this.formatCodeList(items);
this.items = [...JSON.parse(JSON.stringify(codelist.items))];
} else {
console.log(`----${this.tag}----代码表不存在`);
}
}else if(this.tag && Object.is(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) => {
let items: Array<any> = [...res];
this.formatCodeList(items);
this.codeListService.getItems(this.tag,{},this.queryParam).then((res:any) => {
this.items = res;
}).catch((error:any) => {
console.log(`----${this.tag}----代码表不存在`);
});
......@@ -235,58 +199,15 @@ export default class DropDownListDynamic extends Vue {
public onClick($event:any){
if($event){
if(this.tag && Object.is(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) => {
let items: Array<any> = [...res];
this.formatCodeList(items);
this.codeListService.getItems(this.tag,{},this.queryParam).then((res:any) => {
this.items = res;
}).catch((error:any) => {
console.log(`----${this.tag}----代码表不存在`);
});
}
}
}
/**
* 代码表类型和属性匹配
*
* @param {*} items
* @memberof DropDownList
*/
public formatCodeList(items: Array<any>){
let matching: boolean = true;
this.items = [];
try{
if(this.valueType){
items.forEach((item: any)=>{
const type = this.$util.typeOf(item.value);
if(type != this.valueType){
matching = false;
if(type == 'number'){
item.value = item.value.toString();
}else{
if(item.value.indexOf('.') == -1){
item.value = parseInt(item.value);
}else{
item.value = parseFloat(item.value);
}
}
}
this.items.push(item);
});
if(!matching){
console.warn(`代码表 ${ this.tag } 值类型和属性类型不匹配,已自动强制转换,请修正代码表值类型和属性类型匹配`);
}
}else{
this.items = items;
}
}catch(error){
console.warn('代码表值类型和属性类型不匹配,自动强制转换异常,请修正代码表值类型和属性类型匹配');
}
}
}
</script>
......
.ivu-select-multiple .ivu-select-item-selected:after{
display: none;
}
.dropdown-list-mpicker-container{
.tree-dropdown-list-mpicker{
width: 100%;
.el-input__inner{
height: 32px !important;
line-height: 32px !important;
}
.el-input__icon{
line-height: 32px;
}
}
}
.dropdown-list-container{
.dropdown-list{
display: inline-block;
}
.tree-dropdown-list{
width: 100%;
.el-input__inner{
height: 32px !important;
line-height: 32px !important;
}
.el-input__icon{
line-height: 32px;
}
}
}
\ No newline at end of file
.dropdown-list{
display: inline-block;
}
......@@ -20,8 +20,8 @@
:on-exceeded-size="exceededsize"
:on-progress="progress">
<div class="upload-text">
<p>{{$t('components.uploadFile.imgMsg')}}</p>
<p><span class="text-style">{{$t('components.uploadFile.localUpload')}}</span>{{$t('components.uploadFile.or')}}<span class="text-style">{{$t('components.uploadFile.imgMsg1')}}</span></p>
<p>将图片拖到这里替换</p>
<p><span class="text-style">本地上传</span><span class="text-style">从素材库选择</span></p>
</div>
</upload>
</div>
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册