1
This commit is contained in:
340
iMES.WebApi/wwwroot/BiManage/AppPage/DATABI/DSETEDIT.html
Normal file
340
iMES.WebApi/wwwroot/BiManage/AppPage/DATABI/DSETEDIT.html
Normal file
@@ -0,0 +1,340 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>数据集编辑</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">
|
||||
|
||||
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<link href="/BiManage/CSS/bootstrap3.3.5/css/bootstrap.min.css" rel="stylesheet" />
|
||||
<link rel="stylesheet" type="text/css" href="/BiManage/CSS/index.css?v=1">
|
||||
<link rel="stylesheet" type="text/css" href="/BiManage/CSS/default.css">
|
||||
<link href="/BiManage/JS/element/index.css" rel="stylesheet" />
|
||||
<link rel="stylesheet" type="text/css" href="/BiManage/CSS/FORMBI.css?v=2">
|
||||
<link rel="stylesheet" href="http://at.alicdn.com/t/font_533449_naak7odp5x.css" />
|
||||
|
||||
<style>
|
||||
.el-button-group button {
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
.widthmax {
|
||||
width: 100%
|
||||
}
|
||||
|
||||
.pd40 {
|
||||
padding: 40px;
|
||||
}
|
||||
|
||||
.pd0 {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="BG">
|
||||
|
||||
<div id="Loading">
|
||||
<div class="loader-inner ball-beat">
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="DATABI_DSETZZ" class="FormV" style="display:none">
|
||||
<el-container>
|
||||
|
||||
<el-main class="elmain pd40">
|
||||
<div class="panel-df">
|
||||
<div class="container containerb width840" style="padding:0">
|
||||
<div class="panel panel-defaul panhead">
|
||||
|
||||
|
||||
<el-row>
|
||||
<el-col :xs="24" :sm="24">
|
||||
<h4 class="text-center" style="font-size:20PX;font-weight:bolder">
|
||||
<span v-text="FormData.Name"></span> <i class="el-icon-edit" style="color:#3a8ee6;cursor:pointer" @click="dialogFormVisible = true"></i>
|
||||
</h4>
|
||||
<div style="text-align:right;">
|
||||
<el-button type="primary" ref="btAdd" @click="StarForm" style="border-radius:0px;"> <i class="iconfont icon-faqi"></i><span>保存数据集信息</span></el-button>
|
||||
</div>
|
||||
<el-dialog title="修改仪表名称" :visible.sync="dialogFormVisible">
|
||||
<el-form>
|
||||
<el-form-item label="仪表名称">
|
||||
<el-input v-model="FormData.Name" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default panbody" style="padding:0" v-loading="loading" element-loading-text="拼命处理中...">
|
||||
<div class="success" v-show="formtatus =='1'">
|
||||
<div class="success-tip">
|
||||
操作信息提示
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="icon-tip">
|
||||
<div class="success-icon">
|
||||
<img src="/BiManage/images/xt-right.png" />
|
||||
</div>
|
||||
<p></p>
|
||||
</div>
|
||||
|
||||
<div class="tip-mesg">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-row class="padding20" v-show="formtatus =='0'">
|
||||
<el-form ref="FormData" label-position="top" :model="FormData">
|
||||
<el-form-item label="SQL语句">
|
||||
<el-input type="textarea" v-model="FormData.DSQL"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="mt10">
|
||||
<el-button type="primary" @click="JxSQL">根据SQL解析经纬度</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table :data="WDData"
|
||||
border
|
||||
style="width: 100%" class="mt10">
|
||||
<el-table-column label="纬度">
|
||||
|
||||
<el-table-column prop="ColumnName"
|
||||
label="CODE"
|
||||
width="200">
|
||||
</el-table-column>
|
||||
<el-table-column prop="ColumnType"
|
||||
label="类型">
|
||||
</el-table-column>
|
||||
<el-table-column prop="Name"
|
||||
label="别名"
|
||||
width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.Name"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="ColumnSource"
|
||||
label="用于仪表盘">
|
||||
<template slot-scope="scope">
|
||||
<el-switch v-model="scope.row.ColumnSource" active-value="0" inactive-value="1">
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" v-if="scope.row.ColumnType=='Date'" size="mini" @click="analyze(scope.row,scope.$index)">解析时间为年,月,日,时</el-button>
|
||||
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
||||
<el-table :data="DLData"
|
||||
border
|
||||
style="width: 100%" class="mt10">
|
||||
|
||||
<el-table-column label="度量">
|
||||
|
||||
|
||||
<el-table-column prop="ColumnName"
|
||||
label="CODE"
|
||||
width="200">
|
||||
</el-table-column>
|
||||
<el-table-column prop="ColumnType"
|
||||
label="类型">
|
||||
</el-table-column>
|
||||
<el-table-column prop="Name"
|
||||
label="别名"
|
||||
width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.Name"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="ColumnSource"
|
||||
label="用于仪表盘">
|
||||
<template slot-scope="scope">
|
||||
<el-switch v-model="scope.row.ColumnSource" active-value="0" inactive-value="1">
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200">
|
||||
<template slot-scope="scope">
|
||||
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default panwf " style="margin-bottom: 0px;">
|
||||
<el-row>
|
||||
<el-col :xs="24" :sm="24">
|
||||
<div style="text-align:right;">
|
||||
|
||||
<el-button type="primary" ref="btAdd" @click="StarForm" style="border-radius:0px;"> <i class="iconfont icon-faqi"></i><span>保存数据集信息</span></el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</el-main>
|
||||
|
||||
|
||||
|
||||
</el-container>
|
||||
|
||||
</div>
|
||||
<script src="/BiManage/JS/vue.js"></script>
|
||||
<script type="text/javascript" src="/BiManage/JS/jquery-1.11.2.min.js"></script>
|
||||
<script src="/BiManage/JS/lodash.min.js"></script>
|
||||
<script src="/BiManage/JS/httpVueLoader.js"></script>
|
||||
<script src="/BiManage/CSS/bootstrap3.3.5/js/bootstrap.js"></script>
|
||||
<!-- 引入组件库 -->
|
||||
<script src="/BiManage/JS/element/element.js"></script>
|
||||
<script src="/BiManage/JS/bijs.js?v=4"></script>
|
||||
<script>
|
||||
var app = new Vue({
|
||||
el: '#DATABI_DSETZZ',
|
||||
|
||||
data: {
|
||||
loading: true,
|
||||
formtatus: "0",
|
||||
isshow: "1",
|
||||
dialogFormVisible: false,
|
||||
dsetid: ComFunJS.getQueryString('ID', '0'),
|
||||
WDData: [],
|
||||
DLData: [],
|
||||
FormData: {
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
StarForm: function () {
|
||||
app.loading = true;
|
||||
var param = {
|
||||
P1: JSON.stringify(app.FormData),
|
||||
WD: JSON.stringify(app.WDData),
|
||||
DL: JSON.stringify(app.DLData),
|
||||
Action: "DATABI_UPBIDSET"
|
||||
};
|
||||
$.getJSON("/api/Bll/ExeAction", param, function (result) {
|
||||
if (!result.ErrorMsg) {
|
||||
app.$notify({
|
||||
title: '成功',
|
||||
message: '操作成功',
|
||||
type: 'success'
|
||||
});
|
||||
app.loading = false;
|
||||
app.formtatus = "1";//成功状态
|
||||
app.$refs.FormData.resetFields();
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
analyze: function (item, index) {
|
||||
|
||||
|
||||
|
||||
if (_.findIndex(app.WDData, function (obj) {
|
||||
return obj.ColumnName == item.ColumnName + "_YYYYMMDDHH";
|
||||
}) > -1) {
|
||||
app.$notify({
|
||||
title: '已存在解析字段',
|
||||
message: '操作提示',
|
||||
type: 'error'
|
||||
});
|
||||
return;
|
||||
}
|
||||
var additem = JSON.parse(JSON.stringify(item));
|
||||
additem.ColumnName = item.ColumnName + "_YYYYMMDDHH";
|
||||
additem.Name = item.Name + "_年月日时";
|
||||
additem.ColumnType = "TA";
|
||||
additem.ID = "0";
|
||||
app.WDData.splice(index + 1, 0, JSON.parse(JSON.stringify(additem)));
|
||||
|
||||
additem.ColumnName = item.ColumnName + "_YYYYMMDD";
|
||||
additem.Name = item.Name + "_年月日";
|
||||
additem.ColumnType = "TA";
|
||||
app.WDData.splice(index + 1, 0, JSON.parse(JSON.stringify(additem)));
|
||||
|
||||
additem.ColumnName = item.ColumnName + "_YYYYMM";
|
||||
additem.Name = item.Name + "_年月";
|
||||
additem.ColumnType = "TA";
|
||||
app.WDData.splice(index + 1, 0, JSON.parse(JSON.stringify(additem)));
|
||||
|
||||
additem.ColumnName = item.ColumnName + "_YYYY";
|
||||
additem.Name = item.Name + "_年";
|
||||
additem.ColumnType = "TA";
|
||||
app.WDData.splice(index + 1, 0, JSON.parse(JSON.stringify(additem)));
|
||||
},
|
||||
JxSQL: function () {
|
||||
var param = {
|
||||
P1: app.dsetid,
|
||||
P2: app.FormData.DSQL,
|
||||
Action: "DATABI_JXSQL"
|
||||
};
|
||||
$.getJSON("/api/Bll/ExeAction", param, function (result) {
|
||||
if (result.ErrorMsg == "") {
|
||||
app.WDData = result.Result;
|
||||
app.DLData = result.Result1;
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
InitWF: function () {
|
||||
var param = {
|
||||
P1: app.dsetid,
|
||||
Action: "DATABI_GETBIDBSET"
|
||||
};
|
||||
$.getJSON("/api/Bll/ExeAction", param, function (result) {
|
||||
if (result.ErrorMsg == "") {
|
||||
app.loading = false;
|
||||
app.FormData = result.Result;
|
||||
app.WDData = result.Result1;
|
||||
app.DLData = result.Result2;
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
mounted: function () {
|
||||
var pro = this;
|
||||
pro.$nextTick(function () {
|
||||
pro.InitWF();
|
||||
|
||||
})
|
||||
},
|
||||
created() {
|
||||
document.body.removeChild(document.getElementById('Loading'))
|
||||
|
||||
var divBJ = document.getElementById('DATABI_DSETZZ');
|
||||
divBJ.style.display = "block";
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user