| | |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.isPermission = isPermission("isSubmit") |
| | | // this.isPermission = isPermission("isSubmit") |
| | | console.log('权限', this.isPermission); |
| | | }, |
| | | methods: { |
| | |
| | | */ |
| | | async getControlData(id) { |
| | | const { code, data } = await personSupervisionControlSheetPage({ id }) |
| | | if (code == 202) { |
| | | if (!data) { |
| | | this.controlType = '新增' |
| | | this.supervisionRecordId = id |
| | | this.active = 0 |
| | |
| | | this.controlId = undefined |
| | | this.initForm() |
| | | } |
| | | if (code == 200) { |
| | | if (data && code == 200) { |
| | | this.currentResponsible = data.currentResponsible |
| | | this.controlType = '编辑' |
| | | this.controlId = data.id |
| | |
| | | } else if (type == 'save') { |
| | | currentState = undefined |
| | | } |
| | | |
| | | if (this.active == 0) { |
| | | let { discoveryApproach, ...condiFormRest } = this.mainForm.condiForm |
| | | let approcahStr = discoveryApproach.join(',') |
| | |
| | | * @desc 提交表单 |
| | | */ |
| | | async submitForm(form) { |
| | | let user = JSON.parse(localStorage.getItem('user')); |
| | | |
| | | form.responsibleDepartmentId = Number(form.responsibleDepartmentId) |
| | | const { code } = await addOrUpdatePersonSupervisionControl({ |
| | | currentResponsible: user.name, |
| | | currentResponsible: this.$store.state.user.name, |
| | | ...form |
| | | }) |
| | | if (this.controlType == '新增') { |