| | |
| | | format: '', |
| | | companyId: null, |
| | | deptId:null, |
| | | type:2 |
| | | type:2, |
| | | itemId: null |
| | | }, |
| | | formRules:{ |
| | | companyId: [{ required: true, message: '请选择企业', trigger: 'blur' }], |
| | |
| | | |
| | | }); |
| | | |
| | | const openDialog = async (type, value,companyId, isAdmin, companyList) => { |
| | | const openDialog = async (type, value,companyId, isAdmin, companyList,itemId) => { |
| | | state.isAdmin = isAdmin |
| | | if(isAdmin){ |
| | | state.companyList = companyList |
| | | } |
| | | state.title = type === 'add' ? '新增' : type ==='edit' ? '编辑' : '查看' |
| | | state.form.companyId = companyId |
| | | state.form.itemId = itemId |
| | | if(state.title == '编辑'||state.title == '查看'){ |
| | | Object.keys(state.form).forEach(key => { |
| | | if (key in value) { |
| | |
| | | format: '', |
| | | companyId: null, |
| | | deptId:null, |
| | | type:2 |
| | | type:2, |
| | | itemId: null |
| | | } |
| | | state.fileList = [] |
| | | superRef.value.clearValidate(); |