处理usermodal上级责任部门控件错误,添加日志(未完成)

This commit is contained in:
zer0Black
2022-04-07 21:41:47 +08:00
parent 24ad94e9dd
commit a15ebdc37d
3 changed files with 9 additions and 13 deletions
@@ -48,14 +48,11 @@
} }
}, },
created() { created() {
// console.log(this.dictCode);
if(!this.type || this.type==="list"){ if(!this.type || this.type==="list"){
this.tagType = "select" this.tagType = "select"
}else{ }else{
this.tagType = this.type this.tagType = this.type
} }
//获取字典数据
// this.initDictData();
}, },
computed: { computed: {
getValueSting(){ getValueSting(){
@@ -76,7 +73,6 @@
//根据字典Code, 初始化字典数组 //根据字典Code, 初始化字典数组
ajaxGetDictItems(this.dictCode, null).then((res) => { ajaxGetDictItems(this.dictCode, null).then((res) => {
if (res.success) { if (res.success) {
// console.log(res.result);
this.dictOptions = res.result; this.dictOptions = res.result;
} }
}) })
@@ -90,6 +86,8 @@
} }
console.log(val); console.log(val);
this.$emit('change', val); this.$emit('change', val);
//解决数据规则,选择自定义SQL 规则值无法输入空格
this.$emit('input', val);
}, },
setCurrentDictOptions(dictOptions){ setCurrentDictOptions(dictOptions){
this.dictOptions = dictOptions this.dictOptions = dictOptions
@@ -115,9 +115,8 @@ export default {
this.textVals = textVals this.textVals = textVals
}, },
//返回选中的部门信息 //返回选中的部门信息
backDeparInfo(){ backDepartInfo(){
if(this.backDepart===true){ if(this.backDepart===true){
if(this.storeVals && this.storeVals.length>0){ if(this.storeVals && this.storeVals.length>0){
let arr1 = this.storeVals.split(',') let arr1 = this.storeVals.split(',')
let arr2 = this.textVals.split(',') let arr2 = this.textVals.split(',')
@@ -150,7 +149,7 @@ export default {
this.textVals = arr2.join(',') this.textVals = arr2.join(',')
} }
this.$emit("change", this.storeVals) this.$emit("change", this.storeVals)
this.backDeparInfo() this.backDepartInfo()
}, },
getDepartNames(){ getDepartNames(){
return this.departNames return this.departNames
@@ -84,6 +84,7 @@
:disabled="disableSubmit" :disabled="disableSubmit"
v-model="model.departIds" v-model="model.departIds"
:options="nextDepartOptions" :options="nextDepartOptions"
@change="nextDepartChange"
placeholder="请选择负责部门"> placeholder="请选择负责部门">
</j-multi-select-tag> </j-multi-select-tag>
</a-form-model-item> </a-form-model-item>
@@ -228,7 +229,6 @@ import { JSEncrypt } from 'jsencrypt'
that.getUserRoles(record.id); that.getUserRoles(record.id);
that.getUserDeparts(record.id); that.getUserDeparts(record.id);
} }
console.log('that.model=',that.model)
}, },
isDisabledAuth(code){ isDisabledAuth(code){
return disabledAuthFilter(code); return disabledAuthFilter(code);
@@ -259,7 +259,6 @@ import { JSEncrypt } from 'jsencrypt'
let c = {label:item.name, value: item.id+""} let c = {label:item.name, value: item.id+""}
return c; return c;
}) })
console.log('this.tenantsOptions: ',this.tenantsOptions)
} }
}) })
}, },
@@ -271,7 +270,6 @@ import { JSEncrypt } from 'jsencrypt'
let c = {label:item.roleName, value:item.id} let c = {label:item.roleName, value:item.id}
return c; return c;
}) })
console.log('this.rolesOptions: ',this.rolesOptions)
} }
}); });
}, },
@@ -279,7 +277,6 @@ import { JSEncrypt } from 'jsencrypt'
queryUserRole({userid:userid}).then((res)=>{ queryUserRole({userid:userid}).then((res)=>{
if(res.success){ if(res.success){
this.model.selectedroles = res.result.join(","); this.model.selectedroles = res.result.join(",");
console.log('that.model.selectedroles=',this.model.selectedroles)
} }
}); });
}, },
@@ -299,12 +296,10 @@ import { JSEncrypt } from 'jsencrypt'
} }
that.model.selecteddeparts = selectDepartKeys.join(",") that.model.selecteddeparts = selectDepartKeys.join(",")
that.nextDepartOptions=departOptions; that.nextDepartOptions=departOptions;
console.log('that.nextDepartOptions=',that.nextDepartOptions)
} }
}) })
}, },
backDepartInfo(info) { backDepartInfo(info) {
debugger
this.model.departIds = this.model.selecteddeparts; this.model.departIds = this.model.selecteddeparts;
this.nextDepartOptions = info.map((item,index,arr)=>{ this.nextDepartOptions = info.map((item,index,arr)=>{
let c = {label:item.text, value: item.value+""} let c = {label:item.text, value: item.value+""}
@@ -510,6 +505,10 @@ import { JSEncrypt } from 'jsencrypt'
this.departIdShow=true; this.departIdShow=true;
} }
}, },
nextDepartChange(e){
console.log("11", e)
console.log("22", this.model.departIds)
},
} }
} }
</script> </script>