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

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

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