Commit 450a3d4e authored by lixy's avatar lixy

Merge branch 'master' of http://113.105.137.151:22280/zhoujw/rs-cloud-platform-ui

# Conflicts:
#	src/router/index.js
parents be01f713 1027c9c7
import fetch from 'utils/fetch';
// 定制列表
export function getCustomList(obj) {
return fetch({
url: '/api/website/customForm/pageList',
method: 'get',
params: obj
});
}
...@@ -17,41 +17,42 @@ import Layout from '../views/layout/Layout'; ...@@ -17,41 +17,42 @@ import Layout from '../views/layout/Layout';
* meta : { role: ['admin'] } will control the page role * meta : { role: ['admin'] } will control the page role
**/ **/
export const constantRouterMap = [{ export const constantRouterMap = [{
path: '/login', path: '/login',
component: _import('login/index'), component: _import('login/index'),
hidden: true hidden: true
}, },
{ {
path: '/authredirect', path: '/authredirect',
component: _import('login/authredirect'), component: _import('login/authredirect'),
hidden: true hidden: true
}, },
{ {
path: '/404', path: '/404',
component: _import('error/404'), component: _import('error/404'),
hidden: true hidden: true
}, },
{ {
path: '/401', path: '/401',
component: _import('error/401'), component: _import('error/401'),
hidden: true hidden: true
}, },
{ {
path: '/', path: '/',
component: Layout, component: Layout,
redirect: '/index', redirect: '/index',
name: '首页', name: '首页',
hidden: true, hidden: true,
children: [{ children: [{
path: 'index', path: 'index',
component: _import('index/index') component: _import('index/index')
}] }]
}, },
{ {
path: '*', path: '*',
hidden: true, hidden: true,
component: _import('error/404') component: _import('error/404')
}] }
]
export default new Router({ export default new Router({
// mode: 'history', //后端支持可开 // mode: 'history', //后端支持可开
...@@ -62,123 +63,141 @@ export default new Router({ ...@@ -62,123 +63,141 @@ export default new Router({
}); });
export const asyncRouterMap = [{ export const asyncRouterMap = [{
path: '/baseManager', path: '/baseManager',
component: Layout, component: Layout,
name: '基础配置管理', name: '基础配置管理',
icon: 'setting', icon: 'setting',
authority: 'baseManager', authority: 'baseManager',
children: [{ children: [{
path: 'userManager', path: 'userManager',
icon: 'fa-user', icon: 'fa-user',
component: _import('admin/user/index'), component: _import('admin/user/index'),
name: '后台用户管理', name: '后台用户管理',
authority: 'userManager' authority: 'userManager'
}, { }, {
path: 'appUserManager', path: 'appUserManager',
icon: 'fa-user', icon: 'fa-user',
component: _import('admin/appUser/index'), component: _import('admin/appUser/index'),
name: 'App用户管理', name: 'App用户管理',
authority: 'appUserManager' authority: 'appUserManager'
}, { }, {
path: 'menuManager', path: 'menuManager',
icon: 'category', icon: 'category',
component: _import('admin/menu/index'), component: _import('admin/menu/index'),
name: '菜单管理', name: '菜单管理',
authority: 'menuManager' authority: 'menuManager'
}, { }, {
path: 'groupManager', path: 'groupManager',
icon: 'group_fill', icon: 'group_fill',
component: _import('admin/group/index'), component: _import('admin/group/index'),
name: '角色权限管理', name: '角色权限管理',
authority: 'groupManager' authority: 'groupManager'
}, { }, {
path: 'groupTypeManager', path: 'groupTypeManager',
icon: 'fa-users', icon: 'fa-users',
component: _import('admin/groupType/index'), component: _import('admin/groupType/index'),
name: '角色类型管理', name: '角色类型管理',
authority: 'groupTypeManager' authority: 'groupTypeManager'
}, { }, {
path: 'gateLogManager', path: 'gateLogManager',
icon: 'viewlist', icon: 'viewlist',
component: _import('admin/gateLog/index'), component: _import('admin/gateLog/index'),
name: '操作日志管理', name: '操作日志管理',
authority: 'gateLogManager' authority: 'gateLogManager'
}] }]
}, },
{ {
path: '/industryApplication', path: '/industryApplication',
component: Layout, component: Layout,
name: '基础配置管理', name: '基础配置管理',
icon: 'setting', icon: 'setting',
authority: 'industryApplication', authority: 'industryApplication',
children: [{ children: [{
path: 'applicationList', path: 'applicationList',
component: _import('webSiteManagement/industryApplication/applicationList/index'), component: _import('webSiteManagement/industryApplication/applicationList/index'),
name: '应用详情', name: '应用详情',
authority: 'applicationList' authority: 'applicationList'
},{ }, {
path: 'applicationCate', path: 'applicationCate',
component: _import('webSiteManagement/industryApplication/applicationCate/index'), component: _import('webSiteManagement/industryApplication/applicationCate/index'),
name: '类别管理', name: '类别管理',
authority: 'applicationCate' authority: 'applicationCate'
},{ }, {
path: 'transactionProtection', path: 'transactionProtection',
component: _import('webSiteManagement/industryApplication/transactionProtection/index'), component: _import('webSiteManagement/industryApplication/transactionProtection/index'),
name: '交易保障', name: '交易保障',
authority: 'transactionProtection' authority: 'transactionProtection'
}], }]
}, },
{ {
path: '/userManagement', path: '/userManagement',
component: Layout, component: Layout,
name: '用户管理', name: '用户管理',
icon: 'setting', icon: 'setting',
authority: 'userManagement', authority: 'userManagement',
children: [{ children: [{
path: 'userList', path: 'userList',
component: _import('userManagement/index'), component: _import('userManagement/index'),
name: '用户列表', name: '用户列表',
authority: 'applicationList' authority: 'applicationList'
}] }]
}, },
{ {
path: '/webSiteManagement', path: '/orderManagement',
component: Layout, component: Layout,
name: 'web站点管理', name: '订单管理',
icon: 'setting', icon: 'setting',
authority: 'webSiteManagement', authority: 'orderManagement',
children: [{ children: [{
path: 'nebulaDynamics', path: 'orderList',
component: _import('webSiteManagement/newsCategory/index'), component: _import('orderManagement/orderList/index'),
name: '星云动态', name: '订单列表',
authority: 'nebulaDynamics', authority: 'orderList'
}, {
path: 'demandList',
component: _import('orderManagement/demandList/index'),
name: '定制需求列表',
authority: 'demandList'
}]
},
{
path: '/webSiteManagement',
component: Layout,
name: 'web站点管理',
icon: 'setting',
authority: 'webSiteManagement',
children: [{ children: [{
path: 'newsCreator', path: 'nebulaDynamics',
component: _import('webSiteManagement/newsCategory/newsCreator/index'), component: _import('webSiteManagement/newsCategory/index'),
name: '创建资讯文章', name: '星云动态',
authority: 'newsCreator', authority: 'nebulaDynamics',
children: [{
path: 'newsCreator',
component: _import('webSiteManagement/newsCategory/newsCreator/index'),
name: '创建资讯文章',
authority: 'newsCreator'
}]
}, {
path: 'bannerSetting',
component: _import('webSiteManagement/bannerSetting/index'),
name: 'banner管理',
authority: 'bannerSetting'
}, {
path: 'satelliteIntroduction',
component: _import('webSiteManagement/satelliteIntroduction/index'),
name: '卫星介绍',
authority: 'satelliteIntroduction'
}, {
path: 'imageLibrary',
component: _import('webSiteManagement/imageLibrary/index'),
name: '影像图库',
authority: 'imageLibrary'
}, {
path: 'aboutUs',
component: _import('webSiteManagement/aboutUs/index'),
name: '关于我们',
authority: 'aboutUs'
}] }]
},{
path: 'bannerSetting',
component: _import('webSiteManagement/bannerSetting/index'),
name: 'banner管理',
authority: 'bannerSetting',
},{
path: 'satelliteIntroduction',
component: _import('webSiteManagement/satelliteIntroduction/index'),
name: '卫星介绍',
authority: 'satelliteIntroduction',
},{
path: 'imageLibrary',
component: _import('webSiteManagement/imageLibrary/index'),
name: '影像图库',
authority: 'imageLibrary',
},{
path: 'aboutUs',
component: _import('webSiteManagement/aboutUs/index'),
name: '关于我们',
authority: 'aboutUs',
}],
}, },
{ {
......
...@@ -3,20 +3,20 @@ import { ...@@ -3,20 +3,20 @@ import {
} from 'utils/dateFormattor'; } from 'utils/dateFormattor';
export function toEast8Date(dateStr) { export function toEast8Date(dateStr) {
if (typeof (dateStr) == 'undefined' || JSON.stringify(dateStr) === '{}') { if (typeof dateStr == 'undefined' || JSON.stringify(dateStr) === '{}') {
return undefined; return undefined;
} }
let timezone = 8; //目标时区时间,东八区 const timezone = 8; // 目标时区时间,东八区
let offset_GMT = new Date().getTimezoneOffset(); // 本地时间和格林威治的时间差,单位为分钟 const offset_GMT = new Date().getTimezoneOffset(); // 本地时间和格林威治的时间差,单位为分钟
let nowDate = new Date(dateStr).getTime(); // 本地时间距 1970 年 1 月 1 日午夜(GMT 时间)之间的毫秒数 const nowDate = new Date(dateStr).getTime(); // 本地时间距 1970 年 1 月 1 日午夜(GMT 时间)之间的毫秒数
return new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000); return new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000);
} }
export function newEast8Date() { export function newEast8Date() {
let timezone = 8; //目标时区时间,东八区 const timezone = 8; // 目标时区时间,东八区
let offset_GMT = new Date().getTimezoneOffset(); // 本地时间和格林威治的时间差,单位为分钟 const offset_GMT = new Date().getTimezoneOffset(); // 本地时间和格林威治的时间差,单位为分钟
let nowDate = new Date().getTime(); // 本地时间距 1970 年 1 月 1 日午夜(GMT 时间)之间的毫秒数 const nowDate = new Date().getTime(); // 本地时间距 1970 年 1 月 1 日午夜(GMT 时间)之间的毫秒数
return new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000); return new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000);
} }
...@@ -27,10 +27,10 @@ export function deepCopyDate(date) { ...@@ -27,10 +27,10 @@ export function deepCopyDate(date) {
export function convertDate2Str(object) { export function convertDate2Str(object) {
let ownPropertyNames = Object.getOwnPropertyNames(object); const ownPropertyNames = Object.getOwnPropertyNames(object);
for (let index in ownPropertyNames) { for (const index in ownPropertyNames) {
let key = ownPropertyNames[index]; const key = ownPropertyNames[index];
if ('[object Date]' === Object.prototype.toString.call(object[key])) { if (Object.prototype.toString.call(object[key]) === '[object Date]') {
object[key] = formatDate(object[key], 'yyyy-MM-dd hh:mm:ss'); object[key] = formatDate(object[key], 'yyyy-MM-dd hh:mm:ss');
} }
} }
...@@ -38,10 +38,13 @@ export function convertDate2Str(object) { ...@@ -38,10 +38,13 @@ export function convertDate2Str(object) {
export function timestamp2Date(timestamp) { export function timestamp2Date(timestamp) {
let date = new Date(timestamp);//时间戳为10位需*1000,时间戳为13位的话不需乘1000 const date = new Date(timestamp); // 时间戳为10位需*1000,时间戳为13位的话不需乘1000
return formatDate(date, 'yyyy-MM-dd hh:mm:ss'); return formatDate(date, 'yyyy-MM-dd hh:mm:ss');
} }
export function timestamp2DateAuto(timestamp, str) {
const date = new Date(timestamp); // 时间戳为10位需*1000,时间戳为13位的话不需乘1000
return formatDate(date, str);
}
/* /*
num 获取当天多少天后的日期 num 获取当天多少天后的日期
*/ */
...@@ -87,7 +90,7 @@ export function getCurrentYearMonth() { ...@@ -87,7 +90,7 @@ export function getCurrentYearMonth() {
* 返回yyyy-MM-dd * 返回yyyy-MM-dd
* */ * */
export function getYMD_hm(timestamp) { export function getYMD_hm(timestamp) {
let date = new Date(timestamp);//时间戳为10位需*1000,时间戳为13位的话不需乘1000 const date = new Date(timestamp); // 时间戳为10位需*1000,时间戳为13位的话不需乘1000
return formatDate(date, 'yyyy-MM-dd hh:mm'); return formatDate(date, 'yyyy-MM-dd hh:mm');
} }
...@@ -95,7 +98,7 @@ export function getYMD_hm(timestamp) { ...@@ -95,7 +98,7 @@ export function getYMD_hm(timestamp) {
* 返回yyyy-MM-dd * 返回yyyy-MM-dd
* */ * */
export function getYMD(timestamp) { export function getYMD(timestamp) {
let date = new Date(timestamp);//时间戳为10位需*1000,时间戳为13位的话不需乘1000 const date = new Date(timestamp); // 时间戳为10位需*1000,时间戳为13位的话不需乘1000
return formatDate(date, 'yyyy-MM-dd'); return formatDate(date, 'yyyy-MM-dd');
} }
......
<template>
<div class="main">
<div>
<el-form ref="form">
<el-row>
<el-col :span="6"
><el-form-item label="需求类型">
<el-select v-model="listQuery.type" placeholder="请选择需求类型">
<el-option label="全部" :value="''"></el-option>
<el-option label="编程需求" :value="1"></el-option>
<el-option label="专题应用需求" :value="2"></el-option>
<el-option label="影像图需求" :value="3"></el-option>
</el-select> </el-form-item
></el-col>
<el-col :span="6"
><el-form-item label="需求状态">
<el-select
v-model="listQuery.status"
placeholder="请选择需求状态"
>
<el-option label="全部" :value="''"></el-option>
<el-option label="待处理" :value="1"></el-option>
<el-option label="已生成订单" :value="2"></el-option>
</el-select> </el-form-item
></el-col>
<el-col :span="6">
<el-button type="primary" @click="search">搜索</el-button>
<el-button type="info" @click="clear">清除搜索</el-button>
</el-col>
</el-row>
</el-form>
<div class="orderItem" v-for="(item, idx) in tableData" :key="idx">
<div class="itemTop">提交时间:{{ item.crtTimeStr }}</div>
<div class="itemContent">
<div class="itemLeft">
<div class="itemInfo">
<div>
<p>
区域范围:{{
item.provinceName + item.cityName + item.areaName
}}
</p>
<p>采禁时间:{{ item.startTimeStr }}{{ item.endTimeStr }}</p>
<p v-if="item.type == 1">分辨率:{{ item.resolution }}</p>
</div>
<div v-if="item.type != 3">
<p v-if="item.type != 3">
获取类型:
<span v-if="item.gainType == 101">数据API</span>
<span v-if="item.gainType == 102">实体数据</span>
<span v-if="item.gainType == 201">报告</span>
<span v-if="item.gainType == 202">web平台</span>
<span v-if="item.gainType == 203">其他</span>
</p>
<p v-if="item.type == 2">申请人:{{ item.contactUser }}</p>
<p v-if="item.type == 2">联系方式:{{ item.contactPhone }}</p>
</div>
<div v-if="item.type == 3">
<p>定制类型:{{ item.dataType }}</p>
<p>数据格式:{{ item.dataFormat }}</p>
</div>
</div>
<div class="itemDesc" v-if="item.type != 3">
<span>需求描述:</span>
<span>{{ item.descr }}</span>
</div>
</div>
<div class="itemMiddle" v-if="item.status == 1">待处理</div>
<div class="itemMiddle" v-if="item.status == 2">已生成订单</div>
<div
class="itemRight"
v-if="item.status == 1"
@click="CreateOrder(item)"
>
生产订单
</div>
<div
class="itemRight"
v-if="item.status == 2"
@click="toItemOrder(item)"
>
查看订单
</div>
</div>
</div>
</div>
<el-pagination
style="margin-top: 20px"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="listQuery.page"
:page-sizes="[5, 10, 20, 30]"
:page-size="listQuery.limit"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
>
</el-pagination>
</div>
</template>
<script>
import { getCustomList } from "api/website/order/index";
import { timestamp2DateAuto } from "../../../utils/dateUtils";
export default {
data() {
return {
tableData: [],
total: 0,
listQuery: {
page: 1,
limit: 5,
type: "",
status: "",
},
};
},
created() {
this.getList();
},
mounted() {},
methods: {
CreateOrder(item) {
console.log(item);
},
toItemOrder(item) {
console.log(item);
},
search() {
this.getList();
},
clear() {
this.listQuery = {
page: 1,
limit: 10,
type: "",
status: "",
};
this.getList();
},
getList() {
getCustomList(this.listQuery).then((res) => {
if (res.status == 200) {
this.tableData = res.data.data;
this.total = res.data.totalCount;
this.tableData.map((item) => {
item.crtTimeStr = timestamp2DateAuto(
item.crtTime,
"yyyy-MM-dd hh:mm:ss"
);
item.startTimeStr = timestamp2DateAuto(
item.startTime,
"yyyy-MM-dd"
);
item.endTimeStr = timestamp2DateAuto(item.endTime, "yyyy-MM-dd");
});
}
});
},
handleSizeChange(val) {
this.listQuery.page = 1;
this.listQuery.limit = val;
this.getList();
},
handleCurrentChange(val) {
this.listQuery.page = val;
this.getList();
},
},
};
</script>
<style lang="scss" scoped>
.main {
box-sizing: border-box;
padding: 20px;
}
.orderItem {
margin-bottom: 10px;
width: 100%;
border: 1px solid #e6e6e6;
box-sizing: border-box;
}
.itemTop {
width: 1005;
height: 40px;
background: #f5f6fa;
box-sizing: border-box;
display: flex;
align-items: center;
font-size: 13px;
font-family: Source Han Sans CN, Source Han Sans CN-Regular;
font-weight: 400;
text-align: left;
padding-left: 16px;
color: #43425d;
border-bottom: 1px solid #e6e6e6;
}
.itemContent {
width: 100%;
display: flex;
align-items: center;
height: 140px;
}
.itemContent > div {
height: 100%;
}
.itemLeft {
flex: 1;
box-sizing: border-box;
padding: 16px;
.itemInfo {
display: flex;
width: 100%;
height: 90%;
align-items: center;
div {
width: 50%;
font-size: 13px;
height: 100%;
color: #333333;
p {
margin-bottom: 12px;
}
}
}
.itemDesc {
font-size: 13px;
font-family: Source Han Sans CN, Source Han Sans CN-Regular;
font-weight: 400;
text-align: left;
color: #333333;
}
}
.itemMiddle {
width: 120px;
border-left: 1px solid #e6e6e6;
border-right: 1px solid #e6e6e6;
display: flex;
justify-content: center;
align-items: center;
font-size: 11px;
color: #e4c817;
}
.itemRight {
font-size: 11px;
width: 120px;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
}
</style>
<template>
<div>orderlist</div>
</template>
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