update 托盘-载砖详情
This commit is contained in:
@@ -8,9 +8,11 @@
|
||||
:width="configs.dialogWidth ?? '50%'"
|
||||
>
|
||||
<!-- title -->
|
||||
<div slot="title" class="dialog-title" style="display: flex; align-items: center;">
|
||||
<span style="font-size: 18px;">装载详情</span>
|
||||
<el-button v-if="configs.showAdd ?? false" size="small" type="primary" plain style="margin-left: 16px;" @click="$emit('add-record', id)">添加记录</el-button>
|
||||
<div slot="title" class="dialog-title" style="display: flex; align-items: center">
|
||||
<span style="font-size: 18px">装载详情</span>
|
||||
<el-button v-if="configs.showAdd ?? false" size="small" type="primary" plain style="margin-left: 16px" @click="$emit('add-record', id)"
|
||||
>添加记录</el-button
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- main content -->
|
||||
@@ -59,8 +61,8 @@ export default {
|
||||
},
|
||||
updateKey: {
|
||||
type: Number,
|
||||
default: 1
|
||||
}
|
||||
default: 1,
|
||||
},
|
||||
// extraParams: {
|
||||
// type: Object,
|
||||
// default: () => ({})
|
||||
@@ -83,9 +85,9 @@ export default {
|
||||
watch: {
|
||||
updateKey(val, oldVal) {
|
||||
if (val !== oldVal) {
|
||||
this.getList()
|
||||
this.getList();
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
activated() {
|
||||
this.refreshLayoutKey = Math.random();
|
||||
@@ -120,7 +122,7 @@ export default {
|
||||
};
|
||||
|
||||
this.$http
|
||||
.get(this.urls.base + `/${this.id}`, {
|
||||
.get((this.urls.payload ? this.urls.payload : this.urls.base) + `/${this.id}`, {
|
||||
params,
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
|
||||
@@ -23,7 +23,9 @@
|
||||
<el-input v-if="col.input" v-model="dataForm[col.prop]" clearable :disabled="detailMode" v-bind="col.elparams" />
|
||||
<el-input v-if="col.forceDisabled && col.eraseOnSubmit" v-model="shadowDataForm[col.prop]" disabled v-bind="col.elparams" />
|
||||
<el-input v-if="col.forceDisabled && !col.eraseOnSubmit" v-model="dataForm[col.prop]" disabled v-bind="col.elparams" />
|
||||
<el-button type="" plain v-if="col.button" v-bind="col.elparams" style="width: 100%" @click="col.onClick(dataForm.id)">{{ col.label }}</el-button>
|
||||
<el-button type="" plain v-if="col.button" v-bind="col.elparams" style="width: 100%" @click="handleButtonClick(col)">{{
|
||||
col.label
|
||||
}}</el-button>
|
||||
<el-cascader
|
||||
v-if="col.cascader"
|
||||
v-model="dataForm[col.prop]"
|
||||
@@ -359,6 +361,15 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
handleButtonClick(col) {
|
||||
if (!("onClick" in col)) {
|
||||
console.log("[handleButtonClick] 配置文件config.js 里没有绑定 onClick");
|
||||
return;
|
||||
}
|
||||
|
||||
col.onClick.call(this, this.dataForm.id)
|
||||
},
|
||||
|
||||
/** handlers */
|
||||
handleSelectChange(col, eventValue) {
|
||||
if ("autoUpdateProp" in col) {
|
||||
|
||||
Reference in New Issue
Block a user