文档清册

main
Dayu 12 months ago
parent 7d419acae7
commit 95db529c3e
  1. 52
      src/views/leger/equipmentledgerDetail.vue

@ -20,24 +20,21 @@
ref="crud"
@row-del="parameters_rowDel"
@row-update="parameters_rowUpdate"
@row-save="parameters_rowSave"
@on-load="onLoad">
@row-save="parameters_rowSave">
</avue-crud>
</span>
<span v-else-if="type.prop==='document'">
<!-- 选项卡内容3 https://avuejs.com/crud/crud-fun.html-->
<avue-crud :option="document_option"
<avue-crud :option="optionDoc"
:table-loading="loading"
:data="document_data"
:permission="permissionList"
:before-open="beforeOpen"
:header-cell-class-name="headerClass"
v-model="document_form"
ref="crud"
ref="crud2"
@row-update="document_rowUpdate"
@row-save="document_rowSave"
@row-del="document_rowDel"
@on-load="onLoad">
@row-del="document_rowDel">
</avue-crud>
</span>
<div>
@ -479,7 +476,7 @@
pagerCount: 5
},
document_data: [],
document_option: {
optionDoc: {
align: 'center',
menuAlign: 'center',
height: 'auto',
@ -546,15 +543,15 @@
label: "附件",
prop: "accessory",
span: 20,
type: 'upload',
multiple: true,
dataType: "string",
propsHttp: {
url: 'url',
name: 'name',
res: 'data'
},
action: 'https://api.avuejs.com/imgupload',
// type: 'upload',
// dataType: "string",
// propsHttp: {
// url: 'url',
// name: 'name',
// res: 'data'
// },
// action: 'https://api.avuejs.com/imgupload',
rules: [{
trigger: "blur"
}]
@ -568,7 +565,7 @@
permissionList() {
return {
addBtn: true,
viewBtn: this.vaildData(this.permission.techparameters_view, false),
viewBtn: false,
delBtn: true,
editBtn: true
};
@ -653,6 +650,12 @@
},
handleChange (column) {
this.type = column
if (column.prop == 'parameters') {
this.parameters_onLoad();
}if (column.prop == 'document') {
this.document_onLoad();
}
},
//
parameters_rowSave (form, done, loading) {
@ -660,7 +663,7 @@
form.eqLedgerId = this.$route.query.id;
parameters_add(form).then(() => {
done(form);
this.onLoad(this.page);
this.parameters_onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
@ -695,7 +698,7 @@
return parameters_remove(form.id);
})
.then(() => {
this.onLoad(this.page);
this.parameters_onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
@ -708,7 +711,7 @@
form.eqLedgerId = this.$route.query.id;
document_add(form).then(() => {
done(form);
this.onLoad(this.page);
this.document_onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
@ -744,7 +747,7 @@
return document_remove(form.id);
})
.then(() => {
this.onLoad(this.page);
this.document_onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
@ -781,12 +784,15 @@
headerClass(){
return 'head-style'
},
onLoad(row, params = {}) {
parameters_onLoad(row, params = {}) {
this.loading = true;
parameters_getListBylegerId(this.$route.query.id).then(res => {
this.parameters_data = res.data.data;
this.loading = false;
});
},
document_onLoad(row, params = {}) {
this.loading = true;
document_getListBylegerId(this.$route.query.id).then(res => {
this.document_data = res.data.data;
this.loading = false;

Loading…
Cancel
Save