|
|
|
@ -42,34 +42,39 @@ |
|
|
|
|
@on-load="onLoad"> |
|
|
|
|
</avue-crud> |
|
|
|
|
</span> |
|
|
|
|
<div> |
|
|
|
|
<span > |
|
|
|
|
<el-button type="primary" |
|
|
|
|
size="small" |
|
|
|
|
@click="handleFormSubmit" |
|
|
|
|
v-if="addUpdateShowButton"> |
|
|
|
|
确定</el-button> |
|
|
|
|
<el-button size="small" |
|
|
|
|
@click="back" |
|
|
|
|
v-if="addUpdateShowButton"> |
|
|
|
|
取消</el-button> |
|
|
|
|
<el-button size="small" |
|
|
|
|
@click="auditing" |
|
|
|
|
v-if="shouldShowButton"> |
|
|
|
|
审核</el-button> |
|
|
|
|
<el-button size="small" |
|
|
|
|
@click="reject" |
|
|
|
|
v-if="shouldShowButton"> |
|
|
|
|
驳回</el-button> |
|
|
|
|
<el-button size="small" |
|
|
|
|
@click="seachToUpdate" |
|
|
|
|
v-if="shouldShowButton"> |
|
|
|
|
修改</el-button> |
|
|
|
|
<el-button size="small" |
|
|
|
|
@click="back" |
|
|
|
|
v-if="shouldShowButton"> |
|
|
|
|
删除</el-button> |
|
|
|
|
</span> |
|
|
|
|
<div class="container"> |
|
|
|
|
<span > |
|
|
|
|
<el-button type="primary" |
|
|
|
|
size="large" |
|
|
|
|
@click="handleFormSubmit" |
|
|
|
|
v-if="addUpdateShowButton"> |
|
|
|
|
确定</el-button> |
|
|
|
|
<el-button type="text" |
|
|
|
|
size="large" |
|
|
|
|
@click="back" |
|
|
|
|
v-if="addUpdateShowButton"> |
|
|
|
|
取消</el-button> |
|
|
|
|
<el-button type="primary" |
|
|
|
|
size="small" |
|
|
|
|
@click="auditing" |
|
|
|
|
v-if="shouldShowButton"> |
|
|
|
|
审核</el-button> |
|
|
|
|
<el-button type="primary" |
|
|
|
|
size="small" |
|
|
|
|
@click="reject" |
|
|
|
|
v-if="shouldShowButton"> |
|
|
|
|
驳回</el-button> |
|
|
|
|
<el-button type="primary" |
|
|
|
|
size="small" |
|
|
|
|
@click="seachToUpdate" |
|
|
|
|
v-if="shouldShowButton"> |
|
|
|
|
修改</el-button> |
|
|
|
|
<el-button type="primary" |
|
|
|
|
size="small" |
|
|
|
|
@click="del" |
|
|
|
|
v-if="shouldShowButton"> |
|
|
|
|
删除</el-button> |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
</basic-container> |
|
|
|
|
<!-- https://avuejs.com/form/form-rules.html#%E5%A4%96%E7%BD%AE%E9%AA%8C%E8%AF%81--> |
|
|
|
@ -106,13 +111,6 @@ |
|
|
|
|
label: '基本信息', |
|
|
|
|
prop: 'information', |
|
|
|
|
} |
|
|
|
|
// , { |
|
|
|
|
// label: '技术参数', |
|
|
|
|
// prop: 'parameters', |
|
|
|
|
// }, { |
|
|
|
|
// label: '文档清册', |
|
|
|
|
// prop: 'document', |
|
|
|
|
// } |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
tab1_form: {}, |
|
|
|
@ -222,6 +220,12 @@ |
|
|
|
|
message: "请输入系统状态", |
|
|
|
|
trigger: "blur" |
|
|
|
|
}], |
|
|
|
|
type: "select", |
|
|
|
|
dicUrl: "/api/daf-system/dict/dictionary?code=system_state", |
|
|
|
|
props: { |
|
|
|
|
label: "dictValue", |
|
|
|
|
value: "dictKey" |
|
|
|
|
}, |
|
|
|
|
span: 6 |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
@ -395,11 +399,6 @@ |
|
|
|
|
{ |
|
|
|
|
label: "安装单位", |
|
|
|
|
prop: "installationUnit", |
|
|
|
|
// rules: [{ |
|
|
|
|
// required: true, |
|
|
|
|
// message: "请输入安装单位", |
|
|
|
|
// trigger: "blur" |
|
|
|
|
// }], |
|
|
|
|
span: 6 |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
@ -609,43 +608,60 @@ |
|
|
|
|
// 处理表单提交 |
|
|
|
|
Submit() { |
|
|
|
|
if(this.$route.query.frameMode=="add"){ |
|
|
|
|
add(this.tab1_form).then(()=>{ |
|
|
|
|
this.$router.push({ |
|
|
|
|
path: "/leger/equipmentledger", |
|
|
|
|
query: { |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
this.$message({ |
|
|
|
|
type: "success", |
|
|
|
|
message: "操作成功!" |
|
|
|
|
}); |
|
|
|
|
}).catch((error) => { |
|
|
|
|
this.$message({ |
|
|
|
|
type: "error", |
|
|
|
|
message: "操作失败!" |
|
|
|
|
this.$confirm("是否新增所填数据?", "提示", { |
|
|
|
|
confirmButtonText: "确定", |
|
|
|
|
cancelButtonText: "取消", |
|
|
|
|
type: "warning" |
|
|
|
|
}).then(() => { |
|
|
|
|
this.tab1_form.checkStatus="1" |
|
|
|
|
add(this.tab1_form).then(()=>{ |
|
|
|
|
this.$router.push({ |
|
|
|
|
path: "/leger/equipmentledger", |
|
|
|
|
query: { |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
this.$message({ |
|
|
|
|
type: "success", |
|
|
|
|
message: "操作成功!" |
|
|
|
|
}); |
|
|
|
|
}).catch((error) => { |
|
|
|
|
this.$message({ |
|
|
|
|
type: "error", |
|
|
|
|
message: "操作失败!" |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}else { |
|
|
|
|
update(this.tab1_form).then(()=>{ |
|
|
|
|
this.$router.push({ |
|
|
|
|
path: "/leger/equipmentledger", |
|
|
|
|
query: { |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
this.$message({ |
|
|
|
|
type: "success", |
|
|
|
|
message: "操作成功!" |
|
|
|
|
}); |
|
|
|
|
}).catch((error) => { |
|
|
|
|
this.$message({ |
|
|
|
|
type: "error", |
|
|
|
|
message: "操作失败!" |
|
|
|
|
this.$confirm("是否修改所填数据?", "提示", { |
|
|
|
|
confirmButtonText: "确定", |
|
|
|
|
cancelButtonText: "取消", |
|
|
|
|
type: "warning" |
|
|
|
|
}).then(() => { |
|
|
|
|
update(this.tab1_form).then(() => { |
|
|
|
|
this.$router.push({ |
|
|
|
|
path: "/leger/equipmentledger", |
|
|
|
|
query: {}, |
|
|
|
|
}); |
|
|
|
|
this.$message({ |
|
|
|
|
type: "success", |
|
|
|
|
message: "操作成功!" |
|
|
|
|
}); |
|
|
|
|
}).catch((error) => { |
|
|
|
|
this.$message({ |
|
|
|
|
type: "error", |
|
|
|
|
message: "操作失败!" |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
back() { |
|
|
|
|
this.$router.push({ path: "/leger/equipmentledger"}); |
|
|
|
|
if(this.$route.query.frameMode=="add") { |
|
|
|
|
this.$router.push({path: "/leger/equipmentledger"}); |
|
|
|
|
}else{ |
|
|
|
|
this.updateToSearch(); |
|
|
|
|
this.SearchDetail(); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
seachToUpdate () { |
|
|
|
|
this.shouldShowButton=false; |
|
|
|
@ -653,6 +669,12 @@ |
|
|
|
|
this.readonlyForm=false; |
|
|
|
|
this.frame_class = null; |
|
|
|
|
}, |
|
|
|
|
updateToSearch () { |
|
|
|
|
this.readonlyForm=true; |
|
|
|
|
this.shouldShowButton=true; |
|
|
|
|
this.addUpdateShowButton=false; |
|
|
|
|
this.frame_class = 'frame_class1'; |
|
|
|
|
}, |
|
|
|
|
handleChange (column) { |
|
|
|
|
this.type = column |
|
|
|
|
}, |
|
|
|
@ -753,7 +775,6 @@ |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
SearchDetail() { |
|
|
|
|
debugger |
|
|
|
|
getDetail(this.$route.query.id).then(res => { |
|
|
|
|
console.log(res); |
|
|
|
|
this.tab1_form = res.data.data; |
|
|
|
@ -765,8 +786,8 @@ |
|
|
|
|
cancelButtonText: "取消", |
|
|
|
|
type: "warning" |
|
|
|
|
}).then(() => { |
|
|
|
|
this.tab1_form.checkStatus="1" |
|
|
|
|
this.Submit(); |
|
|
|
|
this.tab1_form.checkStatus="2" |
|
|
|
|
this.submitRejectOrauditing(); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
reject() { |
|
|
|
@ -775,8 +796,39 @@ |
|
|
|
|
cancelButtonText: "取消", |
|
|
|
|
type: "warning" |
|
|
|
|
}).then(() => { |
|
|
|
|
this.tab1_form.checkStatus="2" |
|
|
|
|
this.Submit(); |
|
|
|
|
this.tab1_form.checkStatus="3" |
|
|
|
|
this.submitRejectOrauditing(); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
submitRejectOrauditing() { |
|
|
|
|
update(this.tab1_form).then(() => { |
|
|
|
|
this.$router.push({ |
|
|
|
|
path: "/leger/equipmentledger", |
|
|
|
|
query: {}, |
|
|
|
|
}); |
|
|
|
|
this.$message({ |
|
|
|
|
type: "success", |
|
|
|
|
message: "操作成功!" |
|
|
|
|
}); |
|
|
|
|
}).catch((error) => { |
|
|
|
|
this.$message({ |
|
|
|
|
type: "error", |
|
|
|
|
message: "操作失败!" |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
del() { |
|
|
|
|
remove(this.tab1_form.id()).then(() => { |
|
|
|
|
|
|
|
|
|
this.$message({ |
|
|
|
|
type: "success", |
|
|
|
|
message: "操作成功!" |
|
|
|
|
}); |
|
|
|
|
}).catch((error) => { |
|
|
|
|
this.$message({ |
|
|
|
|
type: "error", |
|
|
|
|
message: "操作失败!" |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
headerClass(){ |
|
|
|
@ -807,4 +859,8 @@ |
|
|
|
|
outline: none; |
|
|
|
|
pointer-events: none; |
|
|
|
|
} |
|
|
|
|
.container { |
|
|
|
|
display: flex; |
|
|
|
|
justify-content: flex-end; /* 将子元素推到容器的末端 */ |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|