|
@@ -11,7 +11,63 @@
|
|
|
v-dialog-drag
|
|
|
>
|
|
|
<span>
|
|
|
- <avue-form ref="form" v-model="form" :option="option" />
|
|
|
+ <div class="settingBut">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ @click="saveSetting"
|
|
|
+ v-if="labelShow"
|
|
|
+ type="primary"
|
|
|
+ >保存</el-button
|
|
|
+ >
|
|
|
+ <el-button size="mini" @click="labelShow = false" v-if="labelShow"
|
|
|
+ >取消</el-button
|
|
|
+ >
|
|
|
+ <el-tooltip
|
|
|
+ effect="dark"
|
|
|
+ content="Label名设置"
|
|
|
+ placement="bottom"
|
|
|
+ v-if="!labelShow"
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ icon="el-icon-setting"
|
|
|
+ circle
|
|
|
+ size="mini"
|
|
|
+ @click="setting"
|
|
|
+ ></el-button>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ <avue-form ref="form" v-model="form" :option="option">
|
|
|
+ <template slot="remarksOneLabel" v-if="labelShow">
|
|
|
+ <el-input
|
|
|
+ v-model="labelForm.label1"
|
|
|
+ placeholder="请输入内容"
|
|
|
+ ></el-input>
|
|
|
+ </template>
|
|
|
+ <template slot="customTwoLabel" v-if="labelShow">
|
|
|
+ <el-input
|
|
|
+ v-model="labelForm.label2"
|
|
|
+ placeholder="请输入内容"
|
|
|
+ ></el-input>
|
|
|
+ </template>
|
|
|
+ <template slot="customThreeLabel" v-if="labelShow">
|
|
|
+ <el-input
|
|
|
+ v-model="labelForm.label3"
|
|
|
+ placeholder="请输入内容"
|
|
|
+ ></el-input>
|
|
|
+ </template>
|
|
|
+ <template slot="customFourLabel" v-if="labelShow">
|
|
|
+ <el-input
|
|
|
+ v-model="labelForm.label4"
|
|
|
+ placeholder="请输入内容"
|
|
|
+ ></el-input>
|
|
|
+ </template>
|
|
|
+ <template slot="customFiveLabel" v-if="labelShow">
|
|
|
+ <el-input
|
|
|
+ v-model="labelForm.label5"
|
|
|
+ placeholder="请输入内容"
|
|
|
+ ></el-input>
|
|
|
+ </template>
|
|
|
+ </avue-form>
|
|
|
</span>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="visible = false">取 消</el-button>
|
|
@@ -36,6 +92,7 @@ export default {
|
|
|
{
|
|
|
label: "螺纹",
|
|
|
prop: "remarksOne",
|
|
|
+ labelslot: true,
|
|
|
span: 12,
|
|
|
type: "select",
|
|
|
dicUrl: "/api/blade-system/dict-biz/dictionary?code=Thread",
|
|
@@ -83,11 +140,15 @@ export default {
|
|
|
span: 24
|
|
|
}
|
|
|
]
|
|
|
- }
|
|
|
+ },
|
|
|
+ labelShow: false,
|
|
|
+ labelForm: {}
|
|
|
};
|
|
|
},
|
|
|
props: {},
|
|
|
- created() {},
|
|
|
+ async created() {
|
|
|
+ this.option = await this.getColumnData(this.getColumnName(52), this.option);
|
|
|
+ },
|
|
|
methods: {
|
|
|
init(row, index) {
|
|
|
this.form = {
|
|
@@ -114,10 +175,42 @@ export default {
|
|
|
};
|
|
|
this.$emit("importProperty", data, this.fromIndex);
|
|
|
this.visible = false;
|
|
|
+ },
|
|
|
+ setting() {
|
|
|
+ this.labelShow = true;
|
|
|
+ this.labelForm = {
|
|
|
+ label1: this.option.column[0].label,
|
|
|
+ label2: this.option.column[1].label,
|
|
|
+ label3: this.option.column[2].label,
|
|
|
+ label4: this.option.column[3].label,
|
|
|
+ label5: this.option.column[4].label
|
|
|
+ };
|
|
|
+ },
|
|
|
+ saveSetting() {
|
|
|
+ this.option.column[0].label = this.labelForm.label1;
|
|
|
+ this.option.column[1].label = this.labelForm.label2;
|
|
|
+ this.option.column[2].label = this.labelForm.label3;
|
|
|
+ this.option.column[3].label = this.labelForm.label4;
|
|
|
+ this.option.column[4].label = this.labelForm.label5;
|
|
|
+ this.saveColumn();
|
|
|
+ },
|
|
|
+ async saveColumn() {
|
|
|
+ const inSave = await this.saveColumnData(
|
|
|
+ this.getColumnName(52),
|
|
|
+ this.option
|
|
|
+ );
|
|
|
+ if (inSave) {
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ this.labelShow = false;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+.settingBut {
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-end;
|
|
|
+}
|
|
|
</style>
|