<!-- -->
|
<template>
|
<div style="height: 100%; background-color: transparent">
|
<titleBoxVue style="background-color: #fff" title="趋势分析方法">
|
<template v-slot:right>
|
<div style="text-align: right; padding: 10px">
|
<fks-button
|
style="margin: 0 10px"
|
type="primary"
|
icon="fks-icon-plus"
|
@click="addTrendFun"
|
>添加</fks-button
|
>
|
</div>
|
</template>
|
</titleBoxVue>
|
|
<fks-table
|
stripe
|
ref="table"
|
:data.sync="tableData"
|
style="width: 100%; margin-top: 10px; height: calc(100% - 50px)"
|
row-key="id"
|
>
|
<fks-table-column prop="name" label="名称" width="180">
|
</fks-table-column>
|
<fks-table-column prop="code" label="识别码" width="260">
|
</fks-table-column>
|
<fks-table-column prop="note" label="说明"> </fks-table-column>
|
<fks-table-column label="操作" width="100">
|
<template slot-scope="scope">
|
<fks-button
|
@click="editTrendFun(scope.row)"
|
type="text"
|
icon="fks-icon-edit"
|
size="small"
|
>编辑</fks-button
|
>
|
</template>
|
</fks-table-column>
|
</fks-table>
|
|
<fks-dialog
|
title="添加趋势分析方法"
|
width="400px"
|
:visible.sync="addTrendFunVisible"
|
class="reportDialog"
|
>
|
<fks-form
|
style="width: 100%; height: calc(100% - 40px)"
|
:model="addTrendFunFrom"
|
label-width="80px"
|
>
|
<fks-form-item label="名称">
|
<fks-input
|
v-model="addTrendFunFrom.name"
|
autocomplete="off"
|
></fks-input>
|
</fks-form-item>
|
|
<fks-form-item label="识别码">
|
<fks-input
|
v-model="addTrendFunFrom.code"
|
autocomplete="off"
|
></fks-input>
|
</fks-form-item>
|
<fks-form-item label="说明">
|
<fks-input
|
type="textarea"
|
:rows="3"
|
autocomplete="off"
|
v-model="addTrendFunFrom.note"
|
>
|
</fks-input>
|
</fks-form-item>
|
</fks-form>
|
<div slot="footer" class="dialog-footer">
|
<fks-button @click="addTrendFunVisible = false">取 消</fks-button>
|
<fks-button type="primary" @click="addTrendFunVisible = false"
|
>确 定</fks-button
|
>
|
</div>
|
</fks-dialog>
|
|
<fks-dialog
|
title="编辑趋势分析方法"
|
width="400px"
|
:visible.sync="editTrendFunVisible"
|
class="reportDialog"
|
>
|
<fks-form
|
style="width: 100%; height: calc(100% - 40px)"
|
:model="editTrendFunFrom"
|
label-width="80px"
|
>
|
<fks-form-item label="名称">
|
<fks-input
|
v-model="editTrendFunFrom.name"
|
autocomplete="off"
|
></fks-input>
|
</fks-form-item>
|
|
<fks-form-item label="识别码">
|
<fks-input
|
v-model="editTrendFunFrom.code"
|
autocomplete="off"
|
></fks-input>
|
</fks-form-item>
|
<fks-form-item label="说明">
|
<fks-input
|
type="textarea"
|
:rows="3"
|
autocomplete="off"
|
v-model="editTrendFunFrom.note"
|
>
|
</fks-input>
|
</fks-form-item>
|
</fks-form>
|
<div slot="footer" class="dialog-footer">
|
<fks-button @click="editTrendFunVisible = false">取 消</fks-button>
|
<fks-button type="primary" @click="editTrendFunVisible = false"
|
>确 定</fks-button
|
>
|
</div>
|
</fks-dialog>
|
</div>
|
</template>
|
|
<script>
|
import titleBoxVue from "@/views/main/components/titleBox.vue";
|
|
const tableData = [
|
{
|
id: 1,
|
name: "阻尼趋势预测",
|
code: "TREND__ANALY_001",
|
note: "",
|
},
|
{
|
id: 2,
|
name: "霍尔特趋势预测",
|
code: "TREND__ANALY_002",
|
note: "",
|
},
|
{
|
id: 3,
|
name: "布朗线性趋势预测",
|
code: "TREND__ANALY_003",
|
note: "",
|
},
|
{
|
id: 4,
|
name: "一阶平滑",
|
code: "TREND__ANALY_004",
|
note: "",
|
},
|
{
|
id: 5,
|
name: "二阶平滑",
|
code: "TREND__ANALY_005",
|
note: "",
|
},
|
{
|
id: 6,
|
name: "三阶平滑",
|
code: "TREND__ANALY_006",
|
note: "",
|
},
|
];
|
|
export default {
|
name: "vibrationDemo",
|
components: {
|
titleBoxVue,
|
},
|
data() {
|
return {
|
tableData: tableData,
|
addTrendFunVisible: false,
|
editTrendFunVisible: false,
|
addTrendFunFrom: {
|
name: "",
|
code: "",
|
note: "",
|
},
|
editTrendFunFrom: {
|
name: "",
|
code: "",
|
note: "",
|
},
|
};
|
},
|
created() {},
|
mounted() {},
|
computed: {},
|
watch: {},
|
methods: {
|
addTrendFun() {
|
this.addTrendFunVisible = true;
|
},
|
editTrendFun(row) {
|
this.editTrendFunVisible = true;
|
this.editTrendFunFrom.name = row.name;
|
this.editTrendFunFrom.code = row.code;
|
this.editTrendFunFrom.note = row.note;
|
},
|
},
|
};
|
</script>
|
<style scoped>
|
</style>
|
|
|