|
@@ -279,6 +279,14 @@
|
|
@click="but_redata()"
|
|
@click="but_redata()"
|
|
:loading="loading"
|
|
:loading="loading"
|
|
>重新生成数据</el-button>
|
|
>重新生成数据</el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ class="button"
|
|
|
|
+ type="primary"
|
|
|
|
+ size="mini"
|
|
|
|
+ v-privilege="activeMenu + 'BQ'"
|
|
|
|
+ @click="but_resData()"
|
|
|
|
+ :loading="loading"
|
|
|
|
+ >数据补全</el-button>
|
|
<div style="float:right; text-align: right;">
|
|
<div style="float:right; text-align: right;">
|
|
<el-button
|
|
<el-button
|
|
class="button"
|
|
class="button"
|
|
@@ -632,6 +640,31 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</el-table-column> -->
|
|
</el-table-column> -->
|
|
|
|
+ <el-table-column
|
|
|
|
+ sortable
|
|
|
|
+ class-name="gn-TableDownloadExcel-none"
|
|
|
|
+ label="操作"
|
|
|
|
+ align="center"
|
|
|
|
+ width="86px"
|
|
|
|
+ fixed="right"
|
|
|
|
+ >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>
|
|
|
|
+ <!-- <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ size="mini"
|
|
|
|
+ v-privilege="activeMenu + 'PUT'"
|
|
|
|
+ @click="but_edit(scope.row)"
|
|
|
|
+ >修改</el-button> -->
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ size="mini"
|
|
|
|
+ v-privilege="activeMenu + 'QUERY'"
|
|
|
|
+ @click="but_sdata(scope.row)"
|
|
|
|
+ >计算过程</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
</el-form>
|
|
</el-form>
|
|
<el-pagination
|
|
<el-pagination
|
|
@@ -1632,6 +1665,93 @@ export default {
|
|
});
|
|
});
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
});
|
|
});
|
|
|
|
+ },
|
|
|
|
+ // 计算过程
|
|
|
|
+ but_sdata (row) {
|
|
|
|
+ let that = this;
|
|
|
|
+ let params = {
|
|
|
|
+ timegranid: row.timegranid,
|
|
|
|
+ clock: row.clock, // 开始时间
|
|
|
|
+ itemid: row.itemid // 项目编号
|
|
|
|
+ };
|
|
|
|
+ that.axios.get('pass/ems/v1/formulas/getAnaByVal/', {
|
|
|
|
+ params: params
|
|
|
|
+ }).then(function (res) {
|
|
|
|
+ if (res.code === '0') {
|
|
|
|
+ that.$message({
|
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
|
+ message: res.data,
|
|
|
|
+ type: 'success'
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ that.$message.error(res.message);
|
|
|
|
+ }
|
|
|
|
+ }).catch(function () {});
|
|
|
|
+ },
|
|
|
|
+ // 补全数据
|
|
|
|
+ but_resData () {
|
|
|
|
+ let that = this;
|
|
|
|
+ if (!that.filterForm.data.clock || that.filterForm.data.clock.length === 0) {
|
|
|
|
+ that.$message.warning('请选择日期范围');
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ if (!that.filterForm.data.clock[0] || !that.filterForm.data.clock[1]) {
|
|
|
|
+ that.$message.warning('请选择开始日期与结束日期');
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ if (!that.filterForm.data.timegranid) {
|
|
|
|
+ that.$message.warning('请选择时间粒度');
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ if (that.multipleSelection.length > 0) {
|
|
|
|
+ that.$confirm('是否补全日数据?数据不益多选!否则运行时间较长', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ state: 'warning'
|
|
|
|
+ }).then(() => {
|
|
|
|
+ let SubmitData = {};
|
|
|
|
+ for (let key in that.tableFormDataObj) {
|
|
|
|
+ SubmitData = {
|
|
|
|
+ clock: that.filterForm.data.clock[0],
|
|
|
|
+ clocke: that.filterForm.data.clock[1],
|
|
|
|
+ itemid: that.tableFormDataObj[key].itemid
|
|
|
|
+ }
|
|
|
|
+ // SubmitData.push({
|
|
|
|
+
|
|
|
|
+ // clock: that.tableFormDataObj[key].clock,
|
|
|
|
+ // timegranid: that.tableFormDataObj[key].timegranid,
|
|
|
|
+ // itemid: that.tableFormDataObj[key].itemid
|
|
|
|
+ // });
|
|
|
|
+ }
|
|
|
|
+ that.loading = true;
|
|
|
|
+ let url = 'pass/ems/v1/trmcalpointvalues/resData'
|
|
|
|
+ that.axios.get(url, {
|
|
|
|
+ params: SubmitData
|
|
|
|
+ })
|
|
|
|
+ .then(function (res) {
|
|
|
|
+ if (res.code === '0') {
|
|
|
|
+ if (res.message && res.message !== '操作成功') {
|
|
|
|
+ that.$message.warning('重新生成数据成功, 其中【' + res.message + '】');
|
|
|
|
+ } else {
|
|
|
|
+ that.$message({
|
|
|
|
+ message: '重新生成数据成功',
|
|
|
|
+ type: 'success'
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ that.getTableData();
|
|
|
|
+ } else {
|
|
|
|
+ that.$message.error(res.message);
|
|
|
|
+ }
|
|
|
|
+ that.loading = false;
|
|
|
|
+ }).catch(function () {
|
|
|
|
+ that.loading = false;
|
|
|
|
+ });
|
|
|
|
+ }).catch(() => {
|
|
|
|
+ this.$message.warning('用户取消操作');
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.error('至少要选择一条数据');
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|