|
@@ -1,14 +1,14 @@
|
|
<template>
|
|
<template>
|
|
<el-dialog :title="title" :visible.sync="dialogFormVisible" width="800px" @close="close">
|
|
<el-dialog :title="title" :visible.sync="dialogFormVisible" width="800px" @close="close">
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
|
- <el-form-item label="场站" prop="stationid">
|
|
|
|
|
|
+ <!-- <el-form-item label="场站" prop="stationid">
|
|
<el-cascader ref="cascaderRef" @change="cascaderChange" v-model="form.stationid" :options="options"
|
|
<el-cascader ref="cascaderRef" @change="cascaderChange" v-model="form.stationid" :options="options"
|
|
style="width: 200px" :props="{ checkStrictly: true, label: 'name', value: 'id', children: 'children' }"
|
|
style="width: 200px" :props="{ checkStrictly: true, label: 'name', value: 'id', children: 'children' }"
|
|
clearable />
|
|
clearable />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="录入时间" prop="createtime">
|
|
<el-form-item label="录入时间" prop="createtime">
|
|
<el-date-picker style="width: 200px" v-model="form.createtime" type="datetime" placeholder="选择日期时间">
|
|
<el-date-picker style="width: 200px" v-model="form.createtime" type="datetime" placeholder="选择日期时间">
|
|
- </el-date-picker>
|
|
|
|
|
|
+ </el-date-picker>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="指标" prop="kay">
|
|
<el-form-item label="指标" prop="kay">
|
|
<el-select style="width: 200px" v-model="form.kay" placeholder="请选择" clearable
|
|
<el-select style="width: 200px" v-model="form.kay" placeholder="请选择" clearable
|
|
@@ -16,9 +16,30 @@
|
|
<el-option v-for="item in standardList" :key="item.uniformcode" :label="item.name" :value="item.uniformcode">
|
|
<el-option v-for="item in standardList" :key="item.uniformcode" :label="item.name" :value="item.uniformcode">
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
|
|
+ </el-form-item> -->
|
|
|
|
+ <!-- <el-table-column show-overflow-tooltip label="编号" prop="id" align="center" sortable></el-table-column>
|
|
|
|
+ <el-table-column show-overflow-tooltip label="组织机构编码" prop="companyCode" align="center" sortable></el-table-column>
|
|
|
|
+ <el-table-column show-overflow-tooltip label="指标编码" prop="targetCode" align="center" sortable></el-table-column>
|
|
|
|
+ <el-table-column show-overflow-tooltip label="时间" prop="targetDate" align="center" sortable></el-table-column>
|
|
|
|
+ <el-table-column show-overflow-tooltip label="值" prop="targetValue" align="center" sortable></el-table-column>
|
|
|
|
+ <el-table-column show-overflow-tooltip label="周期" prop="targetCycle" align="center" sortable></el-table-column> -->
|
|
|
|
+ <el-form-item label="编号" prop="id">
|
|
|
|
+ <el-input style="width: 200px" class="inputs" v-model="form.id" placeholder="请输入"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="值" prop="value">
|
|
|
|
- <el-input style="width: 200px" class="inputs" v-model="form.value" placeholder="请输入"></el-input>
|
|
|
|
|
|
+ <el-form-item label="组织机构编码" prop="companyCode">
|
|
|
|
+ <el-input style="width: 200px" class="inputs" v-model="form.companyCode" placeholder="请输入"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="指标编码" prop="targetCode">
|
|
|
|
+ <el-input style="width: 200px" class="inputs" v-model="form.targetCode" placeholder="请输入"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="时间" prop="targetDate">
|
|
|
|
+ <el-date-picker style="width: 200px" v-model="form.targetDate" type="datetime" placeholder="选择日期时间"></el-date-picker>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="值" prop="targetValue">
|
|
|
|
+ <el-input style="width: 200px" class="inputs" v-model="form.targetValue" placeholder="请输入"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="周期" prop="targetCycle">
|
|
|
|
+ <el-input style="width: 200px" class="inputs" v-model="form.targetCycle" placeholder="请输入"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
@@ -51,19 +72,20 @@ export default {
|
|
return {
|
|
return {
|
|
keyList: [{ name: '发电量' }, { name: '平均功率' }, { name: '最优功率' }],
|
|
keyList: [{ name: '发电量' }, { name: '平均功率' }, { name: '最优功率' }],
|
|
form: {
|
|
form: {
|
|
- kay: '',
|
|
|
|
- createtime: '',
|
|
|
|
- stationid: '',
|
|
|
|
- stationname: '',
|
|
|
|
- stationidArr: '',
|
|
|
|
- stationnameArr: '',
|
|
|
|
- value: '',
|
|
|
|
|
|
+ id: "",
|
|
|
|
+ companyCode: "",
|
|
|
|
+ targetCode: "",
|
|
|
|
+ targetDate: "",
|
|
|
|
+ targetValue: "",
|
|
|
|
+ targetCycle: "",
|
|
},
|
|
},
|
|
rules: {
|
|
rules: {
|
|
- stationid: [{ required: true, trigger: 'blur', message: '请选择' }],
|
|
|
|
- kay: [{ required: true, trigger: 'blur', message: '请选择' }],
|
|
|
|
- value: [{ required: true, trigger: 'blur', message: '请输入' }],
|
|
|
|
- createtime: [{ required: true, trigger: 'blur', message: '请选择' }],
|
|
|
|
|
|
+ id: [{ required: true, trigger: 'blur', message: '请输入' }],
|
|
|
|
+ companyCode: [{ required: true, trigger: 'blur', message: '请输入' }],
|
|
|
|
+ targetCode: [{ required: true, trigger: 'blur', message: '请输入' }],
|
|
|
|
+ targetDate: [{ required: true, trigger: 'blur', message: '请选择' }],
|
|
|
|
+ targetValue: [{ required: true, trigger: 'blur', message: '请输入' }],
|
|
|
|
+ targetCycle: [{ required: true, trigger: 'blur', message: '请输入' }],
|
|
},
|
|
},
|
|
title: '',
|
|
title: '',
|
|
dialogFormVisible: false,
|
|
dialogFormVisible: false,
|
|
@@ -72,10 +94,10 @@ export default {
|
|
},
|
|
},
|
|
created() { },
|
|
created() { },
|
|
methods: {
|
|
methods: {
|
|
- cascaderChange(data) {
|
|
|
|
- this.form.stationidArr = data
|
|
|
|
- this.form.stationnameArr = this.$refs["cascaderRef"].getCheckedNodes()[0].pathLabels
|
|
|
|
- },
|
|
|
|
|
|
+ // cascaderChange(data) {
|
|
|
|
+ // this.form.stationidArr = data
|
|
|
|
+ // this.form.stationnameArr = this.$refs["cascaderRef"].getCheckedNodes()[0].pathLabels
|
|
|
|
+ // },
|
|
showEdit(row) {
|
|
showEdit(row) {
|
|
if (!row) {
|
|
if (!row) {
|
|
this.title = '添加'
|
|
this.title = '添加'
|
|
@@ -84,7 +106,7 @@ export default {
|
|
this.title = '编辑'
|
|
this.title = '编辑'
|
|
this.idAdd = false
|
|
this.idAdd = false
|
|
this.form = Object.assign({}, row)
|
|
this.form = Object.assign({}, row)
|
|
- this.form.stationid = row.stationid.split(",")
|
|
|
|
|
|
+ // this.form.stationid = row.stationid.split(",")
|
|
}
|
|
}
|
|
this.dialogFormVisible = true
|
|
this.dialogFormVisible = true
|
|
},
|
|
},
|
|
@@ -97,9 +119,9 @@ export default {
|
|
handleSave() {
|
|
handleSave() {
|
|
this.$refs['form'].validate(async (valid) => {
|
|
this.$refs['form'].validate(async (valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- this.form.stationid = this.form.stationid.join(",")
|
|
|
|
- this.form.stationname = this.form.stationnameArr[this.form.stationnameArr.length - 1]
|
|
|
|
- this.form.createtime = dayjs(this.form.createtime).format("YYYY-MM-DD HH:mm:ss")
|
|
|
|
|
|
+ // this.form.stationid = this.form.stationid.join(",")
|
|
|
|
+ // this.form.stationname = this.form.stationnameArr[this.form.stationnameArr.length - 1]
|
|
|
|
+ this.form.targetDate = dayjs(this.form.targetDate).format("YYYY-MM-DD HH:mm:ss")
|
|
api.addIndicators(this.form).then(res => {
|
|
api.addIndicators(this.form).then(res => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
this.$message({
|
|
this.$message({
|