Commit e92f9f0f by liyuhang19990520

湖南可视化

parent 6414af32
/*
* @Author: your name
* @Date: 2021-08-19 17:20:24
* @LastEditTime: 2021-08-27 11:39:08
* @LastEditTime: 2021-09-16 10:29:57
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \founder_vue\src\api\hnksh.js
......@@ -14,3 +14,19 @@ import { get, post, postform, postJson } from '@/utils/http.js'
export const hnlogin = (params) => {
return post(setting.BaseURL3 + `/login?username=${params.username}&password=${params.password}`) //阿里云
}
export const uploadFile = (params) => {
return postform(setting.BaseURL3 + `/hnksh/uploadFile`, params) //阿里云
}
export const delFileByExcelId = (params) => {
return get(setting.BaseURL3 + `/hnksh/delFileByExcelId`, params) //阿里云
}
export const delFileByTaskId = (params) => {
return get(setting.BaseURL3 + `/hnksh/delFileByTaskId`, params) //阿里云
}
export const createTask = (params) => {
return get(setting.BaseURL3 + `/hnkshrw/createTask`, params) //阿里云
}
export const downloadFile = (params) => {
return get(setting.BaseURL3 + `/hnksh/downloadFile`, params) //阿里云
}
<!--
* @Author: your name
* @Date: 2021-07-20 14:08:33
* @LastEditTime: 2021-08-19 11:43:01
* @LastEditTime: 2021-09-15 10:03:50
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \founder_vue\src\layout\main.vue
......@@ -41,6 +41,13 @@ export default {
disabled: false,
className: "el-icon-coin",
},
{
id: "hnsjfx",
label: "数据分析",
index: "hnsjfx",
disabled: false,
className: "el-icon-s-data",
},
],
};
},
......
/*
* @Author: your name
* @Date: 2021-07-20 14:42:16
* @LastEditTime: 2021-08-31 10:01:59
* @LastEditTime: 2021-09-15 10:02:24
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \founder_vue\src\router\modules\rightContent.js
......@@ -17,6 +17,14 @@ const router = [
component: () => import("@/views/hnksh/hnthfx.vue")
},
{
path: "/hnsjfx",
name: "hnsjfx",
meta: {
title: '数据分析'
},
component: () => import("@/views/hnksh/hnsjfx.vue")
},
{
path: "/ceshi",
name: "ceshi",
meta: {
......
/*
* @Author: your name
* @Date: 2021-06-20 11:48:40
* @LastEditTime: 2021-09-08 17:32:58
* @LastEditTime: 2021-09-15 09:54:11
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \control_platform\src\settings.js
......@@ -22,5 +22,5 @@ module.exports = {
// 湖南可视化
BaseURL3: "/hnapi",
// 打包方式阿里云(aly) 和 公安网(gaw)
packType: 'gaw'
packType: 'aly'
}
......@@ -111,7 +111,7 @@ export function get(url, params) {
params: params
})
.then(res => {
resolve(res.data);
resolve(res);
})
.catch(err => {
reject(err.data);
......
<template>
<div class="Content">
<right-content
ref="rightContent"
:cxFormData="cxFormData"
:cxQueryField="cxQueryField"
:cxDefaultFormThead="cxDefaultFormThead"
:propChildrenFormThead="propChildrenFormThead"
:cxUrl="cxUrl"
:detailUrl="detailUrl"
:detailParams="detailParams"
:tableProps="tableProps"
:moduleName="moduleName"
flTtitle="数据信息"
@leadIn="leadIn"
@addChilrenItem="addChilrenItem"
></right-content>
<el-dialog
title="新增任务"
:visible.sync="dialogVisible"
width="30%"
@closed="close"
>
<el-form label-width="80px" :model="form" class="el-form-dia" ref="form">
<el-form-item
label="任务名称"
prop="name"
:rules="[
{ required: true, message: '请输入任务名称', trigger: 'blur' },
]"
>
<el-input v-model="form.name"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="save">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import rightContent from "@c/ptCxForm_components.vue";
import { createTask } from "@/api/hnksh.js";
import { get, post, postform, postJson } from "@/utils/http.js";
export default {
name: "hnshfx",
components: {
rightContent,
},
data() {
return {
form: {
name: "",
},
dialogVisible: false,
moduleName: "hnsjfx",
tableProps: {
moreSelect: false,
publicBtn: false,
detailBtn: true,
},
detailUrl: "/hnapi/hnksh/getRythInfoById",
detailParams: {
id: "id",
teamNum: "teamNum",
},
cxFormData: {
currentPage: 1,
pageSize: 10,
username: "",
taskName: "",
startTime: "",
endTime: "",
},
cxQueryField: [
{
name: "任务名称",
type: "text",
id: "taskName",
value: "",
placeholder: "请输入",
col: "3",
},
{
name: "任务时间",
type: "zdyDate",
id: "startTime",
id2: "endTime",
value: "",
placeholder: "请输入",
col: "3",
},
],
propChildrenFormThead: [
{
label: "数据量",
prop: "dataCount",
},
{
label: "文件名",
prop: "excelName",
},
{
label: "时间",
prop: "excelCreateTime",
},
],
cxDefaultFormThead: [
{
label: "任务名称",
prop: "rwmc",
},
{
label: "任务时间",
prop: "taskCreateTime",
},
],
cxUrl: "/hnapi/hnkshrw/getTaskInfo",
};
},
mounted() {},
methods: {
close() {
this.$refs.form.resetFields();
},
save() {
let _this = this;
this.$refs.form.validate((boo) => {
if (boo) {
createTask({
taskName: _this.form.name,
username: localStorage.getItem("hnUser"),
}).then((res) => {
if (res.success && res.code == 200) {
_this.$message.success("添加成功");
_this.dialogVisible = false;
_this.$refs.rightContent.doQuery("yes");
}
});
console.log(this.form);
}
});
},
leadIn(scope) {
console.log(scope);
},
addChilrenItem() {
this.dialogVisible = true;
},
},
created() {
this.$set(this.cxFormData, "username", localStorage.getItem("hnUser"));
},
};
</script>
<style>
.el-dialog__body {
padding: 10px 15px !important;
}
.el-form-dia {
padding-top: 15px;
padding-right: 20px;
}
.rightContent .el-input__inner,
#formCommonPage .el-input__inner {
height: 32px;
line-height: 32px;
font-family: inherit;
background: #f3f3f3;
}
.el-table__header-wrapper th,
.el-table__header-wrapper tr {
background: #f4f6f7;
}
.rightContent .el-input__icon,
#formCommonPage .el-input__icon,
.el-input__suffix-inner {
line-height: 36px;
}
.rightContent .el-range-separator {
position: relative;
top: -4px;
}
.rightContent .el-textarea__inner,
#formCommonPage .el-textarea__inner {
width: 100%;
font-family: inherit;
}
.rightContent .el-range-input,
#formCommonPage .el-range-input {
vertical-align: top;
}
.rightContent .el-date-editor .el-range__close-icon {
margin-top: -4px;
}
.success-row {
background-color: #fbf9f4 !important;
}
</style>
<style scoped lang="scss">
@import "../../assets/styles/rightContent.scss";
/deep/ .el-icon-date {
line-height: 28px;
}
</style>
<!--
* @Author: your name
* @Date: 2021-08-19 10:38:18
* @LastEditTime: 2021-08-30 18:08:16
* @LastEditTime: 2021-09-15 10:23:47
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \founder_vue\src\views\hnksh\login\index.vue
......@@ -28,7 +28,11 @@
prop="password"
:rules="[{ required: true, message: '请输入密码', trigger: 'blur' }]"
>
<el-input v-model="form.password" placeholder="请输入密码" show-password></el-input>
<el-input
v-model="form.password"
placeholder="请输入密码"
show-password
></el-input>
</el-form-item>
<div class="btns">
<el-button type="primary" @click="login">登录</el-button>
......@@ -56,6 +60,7 @@ export default {
hnlogin(this.form).then((res) => {
if (res.code == 200) {
this.$message.success("登陆成功");
localStorage.setItem("hnUser", this.form.username);
this.$router.push("/hnthfx");
} else {
this.$message.error("登陆失败,请重新登录");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment