mirror of
https://github.com/jeecgboot/ant-design-vue-jeecg.git
synced 2025-10-15 15:41:42 +00:00
优化一些小问题
This commit is contained in:
@@ -90,7 +90,6 @@ const loadCategoryData = (params)=>getAction("/sys/category/loadAllData",params)
|
||||
const checkRuleByCode = (params) => getAction('/sys/checkRule/checkByCode', params)
|
||||
//加载我的通告信息
|
||||
const getUserNoticeInfo= (params)=>getAction("/sys/sysAnnouncementSend/getMyAnnouncementSend",params);
|
||||
//查询图表数据
|
||||
const getTransitURL = url => `/sys/common/transitRESTful?url=${encodeURIComponent(url)}`
|
||||
// 中转HTTP请求
|
||||
export const transitRESTful = {
|
||||
|
@@ -48,7 +48,7 @@ export function filterDictText(dictOptions, text) {
|
||||
for (let txt of splitText) {
|
||||
let dictText = txt
|
||||
for (let dictItem of dictOptions) {
|
||||
if (txt.toString() === dictItem.value.toString()) {
|
||||
if (dictItem.value && txt.toString() === dictItem.value.toString()) {
|
||||
dictText = (dictItem.text || dictItem.title || dictItem.label)
|
||||
break
|
||||
}
|
||||
|
@@ -837,6 +837,14 @@
|
||||
required: false,
|
||||
default: ''
|
||||
},
|
||||
//删除前校验数据
|
||||
beforeDelete:{
|
||||
type: Function,
|
||||
required: false,
|
||||
default: ()=>{
|
||||
return Promise.resolve(true);
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -1522,8 +1530,14 @@
|
||||
},
|
||||
/** 删除被选中的行 */
|
||||
removeSelectedRows() {
|
||||
this.removeRows(this.selectedRowIds)
|
||||
this.selectedRowIds = []
|
||||
//update-begin-author:taoyan date:2022-8-5 for: VUEN-1767【bug】vue2 未控制住
|
||||
this.beforeDelete().then(()=>{
|
||||
this.removeRows(this.selectedRowIds)
|
||||
this.selectedRowIds = []
|
||||
}).catch(e=>{
|
||||
this.$message.error(e);
|
||||
});
|
||||
//update-end-author:taoyan date:2022-8-5 for: VUEN-1767【bug】vue2 未控制住
|
||||
},
|
||||
/** 删除一行或多行 */
|
||||
removeRows(id) {
|
||||
|
@@ -239,7 +239,7 @@
|
||||
validatorRules: {
|
||||
departName: [{required: true, message: '请输入机构/部门名称!'}],
|
||||
orgCode: [{required: true, message: '请输入机构编码!'}],
|
||||
orgCategory:[{required: true, message: '请输入机构类型!'}],
|
||||
orgCategory:[{required: true, message: '请选择机构类型!'}],
|
||||
mobile: Vue.prototype.rules.mobile2
|
||||
},
|
||||
url: {
|
||||
|
@@ -236,7 +236,7 @@
|
||||
},
|
||||
add () {
|
||||
//初始化默认值
|
||||
this.edit({status:'1', permsType:'1', sortNo:1.0, route:true, menuType:0 });
|
||||
this.edit({status:'1', permsType:'1', sortNo:1.0, route:true, menuType:0,component:'layouts/RouteView' });
|
||||
},
|
||||
edit (record) {
|
||||
this.resetScreenSize(); // 调用此方法,根据屏幕宽度自适应调整抽屉的宽度
|
||||
@@ -329,6 +329,15 @@
|
||||
this.show = true;
|
||||
this.menuLabel = '菜单名称';
|
||||
}
|
||||
|
||||
//update-begin---author:wangshuai ---date:20220729 for:[VUEN-1834]只有一级菜单,才默认值,子菜单的时候,清空------------
|
||||
if(!this.model.id){
|
||||
if(this.model.menuType === 1 && this.model.component === 'layouts/RouteView'){
|
||||
this.model.component = ""
|
||||
}
|
||||
}
|
||||
//update-end---author:wangshuai ---date:20220729 for:[VUEN-1834]只有一级菜单,才默认值,子菜单的时候,清空--------------
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.$refs.form.validateField(['url','component']);
|
||||
});
|
||||
|
@@ -389,7 +389,7 @@
|
||||
if(!value){
|
||||
callback()
|
||||
}else{
|
||||
if(new RegExp(/^1[3|4|5|7|8|9][0-9]\d{8}$/).test(value)){
|
||||
if(new RegExp(/^1[3|4|5|6|7|8|9][0-9]\d{8}$/).test(value)){
|
||||
var params = {
|
||||
tableName: 'sys_user',
|
||||
fieldName: 'phone',
|
||||
|
Reference in New Issue
Block a user