提交 e505dbaf 编写于 作者: zcdtk's avatar zcdtk

常规提示异常和文件上传选取异常

上级 0f516d52
...@@ -7,8 +7,14 @@ ...@@ -7,8 +7,14 @@
</ion-item> </ion-item>
</ion-item-group> </ion-item-group>
<ion-row> <ion-row>
<van-uploader :class="singleChoiceBtnState" multiple="false" :disabled="state" :result-type="resultType" <van-uploader
:before-read="beforeRead" :after-read="afterRead"> accept="*"
:class="singleChoiceBtnState"
multiple="false"
:disabled="state"
:result-type="resultType"
:before-read="beforeRead"
:after-read="afterRead">
<ion-button color="primary"> <ion-button color="primary">
<ion-icon slot="start" name="image-outline"></ion-icon> <ion-icon slot="start" name="image-outline"></ion-icon>
{{$t('uploadtext')}} {{$t('uploadtext')}}
...@@ -116,10 +122,7 @@ export default class AppMobFileUpload extends Vue { ...@@ -116,10 +122,7 @@ export default class AppMobFileUpload extends Vue {
*/ */
public beforeRead(file: any, detail: any): boolean { public beforeRead(file: any, detail: any): boolean {
if (file && Array.isArray(file)) { if (file && Array.isArray(file)) {
this.$notify({ this.$notice.warning('该功能只支持单个文件上传');
type: 'warning',
message: '该功能只支持单个文件上传'
});
return false; return false;
} }
return true; return true;
...@@ -506,10 +509,7 @@ export default class AppMobFileUpload extends Vue { ...@@ -506,10 +509,7 @@ export default class AppMobFileUpload extends Vue {
* @memberof AppMobFileUpload * @memberof AppMobFileUpload
*/ */
public onError(error: any, file: any, fileList: any) { public onError(error: any, file: any, fileList: any) {
this.$notify({ this.$notice.error('上传失败');
type: 'danger',
message: '上传失败'
});
} }
/** /**
......
...@@ -289,7 +289,7 @@ export default class AppSelectDropDown extends Vue { ...@@ -289,7 +289,7 @@ export default class AppSelectDropDown extends Vue {
this.inputState = false; this.inputState = false;
Object.assign(_param, { query: query }); Object.assign(_param, { query: query });
if (!this.acParams.serviceName || !this.acParams.interfaceName) { if (!this.acParams.serviceName || !this.acParams.interfaceName) {
this.$notify({ type: 'danger', message: '请在对应实体属性中配置关联实体与数据集!' }); this.$notice.error('请在对应实体属性中配置关联实体与数据集!');
return ; return ;
} }
const appEntityServiceConstructor = window.appEntityServiceConstructor; const appEntityServiceConstructor = window.appEntityServiceConstructor;
...@@ -300,7 +300,7 @@ export default class AppSelectDropDown extends Vue { ...@@ -300,7 +300,7 @@ export default class AppSelectDropDown extends Vue {
this.items = response.data; this.items = response.data;
this.result(this.items); this.result(this.items);
} else { } else {
this.$notify({ type: 'danger', message: '错误,请求异常!' }); this.$notice.error('错误,请求异常!');
} }
} }
} }
...@@ -493,7 +493,7 @@ export default class AppSelectDropDown extends Vue { ...@@ -493,7 +493,7 @@ export default class AppSelectDropDown extends Vue {
private openRedirectView($event: any, view: any, data: any): void { private openRedirectView($event: any, view: any, data: any): void {
this.$http.get(view.url, data).then((response: any) => { this.$http.get(view.url, data).then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
this.$notify({ type: 'danger', message: '错误,请求异常!' }); this.$notice.error('错误,请求异常!');
} }
if (response.status === 401) { if (response.status === 401) {
return; return;
...@@ -545,7 +545,7 @@ export default class AppSelectDropDown extends Vue { ...@@ -545,7 +545,7 @@ export default class AppSelectDropDown extends Vue {
} }
}).catch((response: any) => { }).catch((response: any) => {
if (!response || !response.status || !response.data) { if (!response || !response.status || !response.data) {
this.$notify({ type: 'danger', message: '错误,系统异常!' }); this.$notice.error('错误,系统异常!');
return; return;
} }
if (response.status === 401) { if (response.status === 401) {
...@@ -564,7 +564,7 @@ export default class AppSelectDropDown extends Vue { ...@@ -564,7 +564,7 @@ export default class AppSelectDropDown extends Vue {
return; return;
} }
if (!this.data || !this.valueitem || !this.data[this.valueitem]) { if (!this.data || !this.valueitem || !this.data[this.valueitem]) {
this.$notify({ type: 'danger', message: '错误,值项异常' }); this.$notice.error('错误,值项异常');
return; return;
} }
// 公共参数处理 // 公共参数处理
...@@ -628,7 +628,7 @@ export default class AppSelectDropDown extends Vue { ...@@ -628,7 +628,7 @@ export default class AppSelectDropDown extends Vue {
return true; return true;
} }
if (!this.data) { if (!this.data) {
this.$notify({ type: 'danger', message: '错误,表单数据异常' }); this.$notice.error('错误,表单数据异常');
return false; return false;
} }
// 合并表单参数 // 合并表单参数
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册