forked from xxhjsb/hbt-prevention-ui
style:删除冗余变量
parent
0bb62a94fd
commit
b82206e6fd
|
@ -44,7 +44,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<el-dialog :close-on-click-modal="false" :title="currentId===-1?'新增':isReadonly?'详情':'编辑'"
|
||||
<el-dialog :close-on-click-modal="false" :title="!updateParams.id'新增':isReadonly?'详情':'编辑'"
|
||||
:visible.sync="showUpdate" width="952px" :before-close="handleClose">
|
||||
<FormComponent :options="updateOptions" :isReadonly="isReadonly" @change="changes" labelWidth="110px"
|
||||
labelAlign="right" :data.sync="updateParams" @actionCallback="callback" :actions="updateActions"
|
||||
|
|
|
@ -43,8 +43,6 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
|
|||
|
||||
public stepUpdateParams = {} as any;
|
||||
|
||||
public currentId = -1;
|
||||
|
||||
public treeData = [] as any;
|
||||
|
||||
public formActions = [{
|
||||
|
@ -475,8 +473,8 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
|
|||
this.updateParams.safetyFactor = this.updateParams.safetyFactor.join(",");
|
||||
this.updateParams.stepNum = this.updateParams.steps.length;
|
||||
this.updateParams.postCode = this.updateParams.postCode.join(";")
|
||||
this.tableService.addOrUpdate(this.updateParams, this.currentId === -1).then((res) => {
|
||||
this.$message.success(this.currentId === -1 ? "新增成功!" : "编辑成功!");
|
||||
this.tableService.addOrUpdate(this.updateParams, !this.updateParams.id).then((res) => {
|
||||
this.$message.success(!this.updateParams.id? "新增成功!" : "编辑成功!");
|
||||
this.updateParams = {
|
||||
postCode: [],
|
||||
safetyFactor: []
|
||||
|
@ -501,13 +499,11 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
|
|||
public showUpdateModel(row?, isRead?) {
|
||||
this.isReadonly = !!isRead;
|
||||
if (!row) {
|
||||
this.currentId = -1;
|
||||
this.updateParams = {
|
||||
steps: [], identifyTime: moment().format('YYYY-MM-DD'),
|
||||
identifyUserId: this.account.userId,
|
||||
} as any;
|
||||
} else {
|
||||
this.currentId = row.id;
|
||||
this.updateParams = JSON.parse(JSON.stringify(row));
|
||||
|
||||
if (!this.updateParams.steps) {
|
||||
|
|
Loading…
Reference in New Issue