yujialong 3 days ago
parent a13172fa20
commit 44463f31c5
  1. 4
      src/api/index.js
  2. 380
      src/layouts/home/index.vue
  3. 5
      src/pages/account/login/index.vue
  4. 513
      src/pages/data/list/index.vue
  5. 1205
      src/pages/user/list/index.vue
  6. 5
      src/setting.js

@ -10,6 +10,8 @@ export default {
getOtherAccountByPhone: `users/users/user/getOtherAccountByPhone`,
unbindAccounts: `users/users/user/unbindAccounts`,
logout: `users/users/user/logout`,
checkUserNameOrWorkNumber: `users/users/batchProcessing/checkUserNameOrWorkNumber`,
updateUserNameOrWorkNumber: `users/users/batchProcessing/updateUserNameOrWorkNumber`,
// 加密货币
market: `/topic/market`,
@ -54,7 +56,7 @@ export default {
deleteProfile: `users/users/userInfo/deleteProfile`,
checkEmailOrPhone: `occupationlab/occupationlab/architecture/checkEmailOrPhone`,
accountIsDisabled: `users/users/user/accountIsDisabled`,
userTemplate: `http://121.37.12.51/template/%E6%95%B0%E6%8D%AE%E5%B9%B3%E5%8F%B0%E7%94%A8%E6%88%B7%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx`,
userTemplate: `https://www.dataforward.cn/template/%E6%95%B0%E6%8D%AE%E5%B9%B3%E5%8F%B0%E7%94%A8%E6%88%B7%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx`,
// 角色管理
batchRemove: `users/users/role/batchRemove`,

@ -1,41 +1,58 @@
<template>
<div class="main">
<v-head></v-head>
<div class="layout">
<div class="content">
<transition name="move" mode="out-in">
<router-view class="view"></router-view>
</transition>
<el-backtop target=".content"></el-backtop>
<v-footer></v-footer>
</div>
<div class="log-mask" v-if="logVisible"></div>
<div class="log-dia" v-if="logVisible">
<img class="bg1" src="@/assets/img/log-bg.png" alt="">
<img class="bg2" src="@/assets/img/log-bg1.png" alt="">
<p class="log-title">更新日志</p>
<div class="log-wrap">
<div class="logs">
<div class="item" v-for="(item, i) in list" :key="i" v-show="!i || (i && logAll)">
<h6>{{ item.versionName }}</h6>
<img v-if="item.coverUrl" :src="item.coverUrl" alt="" class="cover">
<ul class="detail">
<li v-for="(item, i) in item.logContents" :key="i">
<p class="name"><img :src="require('@/assets/img/' + funcList.find(e => e.id === item.type).icon + '.png')" alt=""> {{ funcList.find(e => e.id === item.type).name }}</p>
<div class="val">
<p v-for="(item, i) in item.content" :key="i">{{ i + 1 }}{{ item }}</p>
</div>
</li>
</ul>
<div class="main">
<v-head></v-head>
<div class="layout">
<div class="content">
<transition name="move" mode="out-in">
<router-view class="view"></router-view>
</transition>
<el-backtop target=".content"></el-backtop>
<v-footer></v-footer>
</div>
<div class="log-mask" v-if="logVisible"></div>
<div class="log-dia" v-if="logVisible">
<img class="bg1" src="@/assets/img/log-bg.png" alt="">
<img class="bg2" src="@/assets/img/log-bg1.png" alt="">
<p class="log-title">更新日志</p>
<div class="log-wrap">
<div class="logs">
<div class="item" v-for="(item, i) in list" :key="i" v-show="!i || (i && logAll)">
<h6>{{ item.versionName }}</h6>
<img v-if="item.coverUrl" :src="item.coverUrl" alt="" class="cover">
<ul class="detail">
<li v-for="(item, i) in item.logContents" :key="i">
<p class="name"><img
:src="require('@/assets/img/' + funcList.find(e => e.id === item.type).icon + '.png')" alt=""> {{
funcList.find(e => e.id === item.type).name }}</p>
<div class="val">
<p v-for="(item, i) in item.content" :key="i">{{ i + 1 }}{{ item }}</p>
</div>
</div>
<div class="more-wrap">
<el-button class="know" type="primary" size="small" @click="logVisible = false">知道了</el-button>
</div>
</div>
</li>
</ul>
</div>
</div>
<div class="more-wrap">
<el-button class="know" type="primary" size="small" @click="logVisible = false">知道了</el-button>
</div>
</div>
</div>
</div>
<el-dialog title="" :visible.sync="realNameVisible" :close-on-click-modal="false" :close-on-press-escape="false"
:show-close="false" width="300px" custom-class="name-dia">
<el-form ref="realNameForm" :model="realNameForm" :rules="realNameRules" label-width="80px">
<el-form-item label="真实姓名" prop="userName">
<el-input v-model.trim="realNameForm.userName" placeholder="请输入真实姓名"></el-input>
</el-form-item>
<el-form-item label="学号" prop="workNumber">
<el-input v-model.trim="realNameForm.workNumber" placeholder="请输入学号"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="realNameSubmit"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
@ -45,113 +62,149 @@ import { mapState, mapMutations, mapActions } from 'vuex'
import Setting from '@/setting'
import util from '@/libs/util'
export default {
data() {
return {
logVisible: false,
list: [],
logAll: false,
funcList: [
{
id: 0,
name: '新功能',
icon: 'func'
},
{
id: 1,
name: '修复',
icon: 'bug'
},
{
id: 2,
name: '优化',
icon: 'optimize'
}
]
};
data () {
return {
logVisible: false,
list: [],
logAll: false,
funcList: [
{
id: 0,
name: '新功能',
icon: 'func'
},
{
id: 1,
name: '修复',
icon: 'bug'
},
{
id: 2,
name: '优化',
icon: 'optimize'
}
],
realNameVisible: false,
realNameForm: {
userName: '',
workNumber: '',
},
realNameRules: {
userName: [
{ required: true, message: '请输入真实姓名', trigger: 'blur' }
],
},
};
},
components: {
vHead,
vFooter
},
computed: {
...mapState("user", [
'logView'
])
},
mounted () {
this.autoLogout()
this.logView || this.getLogStatus() // logViewfalse
this.handleRealName()
},
methods: {
...mapMutations("user", [
'SET_LOG'
]),
...mapActions('user', [
'logout'
]),
//
async handleRealName () {
const res = await this.$post(this.api.checkUserNameOrWorkNumber)
//
if (res.hasName) {
this.realNameVisible = true
}
},
components: {
vHead,
vFooter
//
getLog () {
this.$get(`${this.api.platformLogList}?platformId=${Setting.platformId}&port=1&versionName=`).then(({ logList }) => {
logList.map((e, i) => {
e.logContents.map(n => {
n.content = n.content.split('\n')
})
})
this.list = logList
}).catch(res => { })
},
computed: {
...mapState("user", [
'logView'
])
//
getLogStatus () {
util.local.get(Setting.tokenKey) && this.$get(this.api.logNotification, {
platformId: Setting.platformId
}).then(({ notification }) => {
this.SET_LOG() // true
if (notification) {
this.logVisible = true // true
this.getLog()
}
}).catch(res => { })
},
mounted() {
this.autoLogout()
this.logView || this.getLogStatus() // logViewfalse
// ,退
autoLogout () {
let lastTime = new Date().getTime()
document.onmousedown = () => {
lastTime = new Date().getTime()
};
const autoLogoutTime = Setting.autoLogoutTime
const timer = setInterval(() => {
if (util.local.get(Setting.tokenKey) && (new Date().getTime() - lastTime) > autoLogoutTime) {
util.errorMsg('用户登录过期,请重新登录')
clearInterval(timer)
setTimeout(this.logout, 1500)
}
}, 1000)
},
methods: {
...mapMutations("user", [
'SET_LOG'
]),
...mapActions('user', [
'logout'
]),
//
getLog() {
this.$get(`${this.api.platformLogList}?platformId=${Setting.platformId}&port=1&versionName=`).then(({ logList }) => {
logList.map((e, i) => {
e.logContents.map(n => {
n.content = n.content.split('\n')
})
})
this.list = logList
}).catch(res => {})
},
//
getLogStatus() {
util.local.get(Setting.tokenKey) && this.$get(this.api.logNotification, {
platformId: Setting.platformId
}).then(({ notification }) => {
this.SET_LOG() // true
if (notification) {
this.logVisible = true // true
this.getLog()
}
}).catch(res => {})
},
// ,退
autoLogout() {
let lastTime = new Date().getTime()
document.onmousedown = () => {
lastTime = new Date().getTime()
};
const autoLogoutTime = Setting.autoLogoutTime
const timer = setInterval(() => {
if (util.local.get(Setting.tokenKey) && (new Date().getTime() - lastTime) > autoLogoutTime) {
util.errorMsg('用户登录过期,请重新登录')
clearInterval(timer)
setTimeout(this.logout, 1500)
}
}, 1000)
//
realNameSubmit () {
this.$refs.realNameForm.validate(async (valid) => {
if (valid) {
const form = this.realNameForm
await this.$post(`${this.api.updateUserNameOrWorkNumber}?userName=${form.userName}&workNumber=${form.workNumber}`)
this.realNameVisible = false
} else {
return false
}
}
})
},
}
};
</script>
<style lang="scss" scoped>
.main{
min-height: calc(100% - 64px);
.layout{
padding-top: 64px;
}
.view{
min-width: $min-width;
min-height: calc(100vh - 134px);
padding: 12px 80px 0;
margin: 0 auto;
background-color: #F3F6FA;
background: url(../../assets/img/shapes/shape1.png) 0 50px no-repeat,
url(../../assets/img/shapes/shape7.png) right 70px no-repeat,
url(../../assets/img/shapes/shape8.png) 0 574px no-repeat,
url(../../assets/img/shapes/shape9.png) right 645px no-repeat,
url(../../assets/img/shapes/shape6.png) 0 1074px no-repeat;
}
.index{
padding: 0;
}
.main {
min-height: calc(100% - 64px);
.layout {
padding-top: 64px;
}
.view {
min-width: $min-width;
min-height: calc(100vh - 134px);
padding: 12px 80px 0;
margin: 0 auto;
background-color: #F3F6FA;
background: url(../../assets/img/shapes/shape1.png) 0 50px no-repeat,
url(../../assets/img/shapes/shape7.png) right 70px no-repeat,
url(../../assets/img/shapes/shape8.png) 0 574px no-repeat,
url(../../assets/img/shapes/shape9.png) right 645px no-repeat,
url(../../assets/img/shapes/shape6.png) 0 1074px no-repeat;
}
.index {
padding: 0;
}
}
.log-mask {
position: fixed;
top: 0;
@ -160,6 +213,7 @@ export default {
right: 0;
background-color: rgba(0, 0, 0, .4);
}
/deep/.log-dia {
z-index: 11;
position: absolute;
@ -169,10 +223,12 @@ export default {
transform: translateX(-50%);
background-color: #fff;
border-radius: 6px;
.bg1 {
width: 100%;
height: 140px;
}
.bg2 {
position: absolute;
top: -130px;
@ -180,6 +236,7 @@ export default {
max-width: 100%;
height: 250px;
}
.log-title {
position: absolute;
top: 65px;
@ -190,59 +247,80 @@ export default {
color: #fff;
font-weight: 600;
}
.log-wrap {
padding-bottom: 30px;
}
.logs {
max-height: 250px;
padding: 0 100px;
margin: 30px 0;
overflow: auto;
}
h6 {
margin-bottom: 15px;
font-size: 16px;
color: #333;
line-height: 1;
}
.more-wrap {
padding: 0 60px;
font-size: 14px;
color: #333;
text-align: center;
}
.know {
margin-top: 15px;
}
.cover {
max-width: 250px;
max-height: 160px;
margin: 10px 0 20px;
max-width: 250px;
max-height: 160px;
margin: 10px 0 20px;
}
.detail {
li {
margin-bottom: 20px;
margin-bottom: 20px;
}
.name {
display: flex;
align-items: center;
margin-bottom: 5px;
font-size: 14px;
img {
width: 20px;
margin-right: 8px;
}
display: flex;
align-items: center;
margin-bottom: 5px;
font-size: 14px;
img {
width: 20px;
margin-right: 8px;
}
}
.val {
font-size: 15px;
line-height: 1.8;
white-space: pre-wrap;
p {
position: relative;
font-size: 13px;
color: #727272;
}
font-size: 15px;
line-height: 1.8;
white-space: pre-wrap;
p {
position: relative;
font-size: 13px;
color: #727272;
}
}
}
}
/deep/.name-dia {
.el-dialog__header {
display: none;
}
.el-dialog__body {
padding-bottom: 10px;
}
}
</style>

@ -12,8 +12,7 @@
<div v-show="!form.distinguish && !verCodeLogin" class="items">
<el-form-item class="flex-1" prop="workNumber">
<label class="label account"></label>
<el-input v-model.trim="form.workNumber" placeholder="请输入学号/工号/手机号/邮箱"
@keyup.enter.native="submit"></el-input>
<el-input v-model.trim="form.workNumber" placeholder="请输入学号/工号" @keyup.enter.native="submit"></el-input>
</el-form-item>
</div>
<!-- 手机号登录 -->
@ -52,7 +51,7 @@
</template>
<div class="bottom">
<el-link :underline="false" type="primary" @click="switchType">{{ verCodeLogin ? '密码' : '验证码' }}登录</el-link>
<el-link :underline="false" type="primary" @click="toAccount">没有账号点击申请</el-link>
<!-- <el-link :underline="false" type="primary" @click="toAccount">没有账号点击申请</el-link> -->
</div>
<el-button class="submit" type="primary" @click="submit">登录</el-button>
</el-form>

@ -1,96 +1,103 @@
<template>
<div class="wrap">
<div class="left">
<el-menu class="menu" ref="type" @open="selectType" @select="selectType" unique-opened :default-active="defaultType" :default-openeds="defaultOpenType">
<menuTree :menuList="typeList"></menuTree>
</el-menu>
<div class="wrap">
<div class="left">
<el-menu class="menu" ref="type" @open="selectType" @select="selectType" unique-opened
:default-active="defaultType" :default-openeds="defaultOpenType">
<menuTree :menuList="typeList"></menuTree>
</el-menu>
</div>
<div class="right">
<div class="page">
<h6 class="l-title"><img src="@/assets/img/data1.png" alt=""> 数据介绍</h6>
<div>
<div class="search">
<input v-model="keyword" type="text" placeholder="请输入数据表名称">
<img src="../../../assets/img/search-gray.png" alt="" class="search-icon">
</div>
</div>
<div class="right">
<div class="page">
<h6 class="l-title"><img src="@/assets/img/data1.png" alt=""> 数据介绍</h6>
<div>
<div class="search">
<input v-model="keyword" type="text" placeholder="请输入数据表名称">
<img src="../../../assets/img/search-gray.png" alt="" class="search-icon">
</div>
</div>
<div class="desc">{{introduce}}</div>
<div class="source"><img src="@/assets/img/data2.png" alt=""> 数据来源{{dataSource}}</div>
<div class="page-content">
<el-table :data="listData" class="table" ref="table" stripe header-align="center" row-key="id" highlight-current-row @current-change="previewCurrentChange">
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="showName" label="数据表名称" min-width="220" align="center" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="dataTotal" label="数据总量" width="90" align="center"></el-table-column>
<el-table-column prop="timeRange" label="起止时间" width="175" align="center"></el-table-column>
<el-table-column prop="dataSize" label="数据大小" width="90" align="center">
<template slot-scope="scope">
{{scope.row.dataSize}}M
</template>
</el-table-column>
<el-table-column prop="updateTime" label="更新时间" width="155" align="center"></el-table-column>
<el-table-column label="操作" width="100" align="center">
<template slot-scope="scope">
<el-button type="text" @click="preview(scope.row)" v-auth>预览</el-button>
<el-button type="text" @click="download(scope.row)" v-auth>下载</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background @current-change="handleCurrentChange" :current-page="page" layout="total, prev, pager, next, jumper" :total="total"></el-pagination>
</div>
</div>
</div>
<div class="desc">{{ introduce }}</div>
<div class="source"><img src="@/assets/img/data2.png" alt=""> 数据来源{{ dataSource }}</div>
<div class="page-content">
<el-table :data="listData" class="table" ref="table" stripe header-align="center" row-key="id"
highlight-current-row @current-change="previewCurrentChange">
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="showName" label="数据表名称" min-width="220" align="center"
:show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="dataTotal" label="数据总量" width="90" align="center"></el-table-column>
<el-table-column prop="timeRange" label="起止时间" width="175" align="center"></el-table-column>
<el-table-column prop="dataSize" label="数据大小" width="90" align="center">
<template slot-scope="scope">
{{ scope.row.dataSize }}M
</template>
</el-table-column>
<el-table-column prop="updateTime" label="更新时间" width="155" align="center"></el-table-column>
<el-table-column label="操作" width="100" align="center">
<template slot-scope="scope">
<el-button type="text" @click="preview(scope.row)" v-auth>预览</el-button>
<el-button type="text" @click="download(scope.row)" v-auth>下载</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background @current-change="handleCurrentChange" :current-page="page"
layout="total, prev, pager, next, jumper" :total="total"></el-pagination>
</div>
</div>
</div>
</div>
<el-dialog title="下载" :visible.sync="downloadVisible" width="540px" @close="closeDownload" :close-on-click-modal="false">
<el-form ref="form" label-width="100px" label-suffix="">
<el-form-item label="数据筛选">
<div class="checkboxs">
<el-checkbox v-model="checkAllFields" @change="checkAllFieldsChange">全选</el-checkbox>
<el-checkbox-group v-model="fields">
<el-checkbox v-for="(item,index) in fieldsList" :key="index" :label="item.comment"></el-checkbox>
</el-checkbox-group>
</div>
</el-form-item>
<el-form-item label="开始时间">
<el-date-picker v-model="startTime" type="date" placeholder="请选择开始时间" size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd" :picker-options="timeOptions" :disabled="startTimeDisabled" :default-value="startTimeDefault" @change="timeChange"></el-date-picker>
</el-form-item>
<el-form-item label="结束时间">
<el-date-picker v-model="endTime" type="date" placeholder="请选择结束时间" size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd" :picker-options="timeOptions" :disabled="endTimeDisabled" :default-value="endTimeDefault" @change="timeChange"></el-date-picker>
</el-form-item>
<el-form-item label="数据频率">
<el-select v-model="frequency" placeholder="请选择数据频率" size="small">
<el-option v-for="(item,index) in frequencyList" :key="index" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="downloadVisible = false">取消</el-button>
<el-button size="small" type="primary" @click="confirmDown">确定</el-button>
</span>
</el-dialog>
<el-drawer
custom-class="preview-dia"
size="950px"
:with-header="false"
:visible.sync="previewVisible">
<div class="flex j-between">
<div class="l-title" style="margin-bottom: 0">
<img src="@/assets/img/data3.png" alt="">
数据预览
</div>
<img width="52" src="@/assets/img/close.png" style="cursor: pointer" alt="" @click="previewVisible = false">
</div>
<div class="preview-wrap">
<el-table :data="previewData" class="table" id="previewTable" stripe header-align="center" row-key="id">
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column v-for="(item,index) in previewHead" :prop="item.field" :key="index" :label="item.comment" align="center"></el-table-column>
</el-table>
<el-dialog title="下载" :visible.sync="downloadVisible" width="540px" @close="closeDownload"
:close-on-click-modal="false">
<el-form ref="form" label-width="100px" label-suffix="">
<el-form-item label="数据筛选">
<div class="checkboxs">
<el-checkbox v-model="checkAllFields" @change="checkAllFieldsChange">全选</el-checkbox>
<el-checkbox-group v-model="fields">
<el-checkbox v-for="(item, index) in fieldsList" :key="index" :label="item.comment"></el-checkbox>
</el-checkbox-group>
</div>
</el-drawer>
</div>
</el-form-item>
<el-form-item label="开始时间">
<el-date-picker v-model="startTime" type="date" placeholder="请选择开始时间" size="small" format="yyyy-MM-dd"
value-format="yyyy-MM-dd" :picker-options="timeOptions" :disabled="startTimeDisabled"
:default-value="startTimeDefault" @change="timeChange"></el-date-picker>
</el-form-item>
<el-form-item label="结束时间">
<el-date-picker v-model="endTime" type="date" placeholder="请选择结束时间" size="small" format="yyyy-MM-dd"
value-format="yyyy-MM-dd" :picker-options="timeOptions" :disabled="endTimeDisabled"
:default-value="endTimeDefault" @change="timeChange"></el-date-picker>
</el-form-item>
<el-form-item label="数据频率">
<el-select v-model="frequency" placeholder="请选择数据频率" size="small">
<el-option v-for="(item, index) in frequencyList" :key="index" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="downloadVisible = false">取消</el-button>
<el-button size="small" type="primary" @click="confirmDown">确定</el-button>
</span>
</el-dialog>
<el-drawer custom-class="preview-dia" size="950px" :with-header="false" :visible.sync="previewVisible">
<div class="flex j-between">
<div class="l-title" style="margin-bottom: 0">
<img src="@/assets/img/data3.png" alt="">
数据预览
</div>
<img width="52" src="@/assets/img/close.png" style="cursor: pointer" alt="" @click="previewVisible = false">
</div>
<div class="preview-wrap">
<el-table :data="previewData" class="table" id="previewTable" stripe header-align="center" row-key="id">
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column v-for="(item, index) in previewHead" :prop="item.field" :key="index" :label="item.comment"
align="center"></el-table-column>
</el-table>
</div>
</el-drawer>
</div>
</template>
<script>
@ -105,7 +112,7 @@ export default {
components: {
menuTree
},
data() {
data () {
return {
that: this,
token: util.local.get(Setting.tokenKey),
@ -140,7 +147,7 @@ export default {
startTimeDefault: '',
endTimeDefault: '',
timeOptions: {
disabledDate(time) {
disabledDate (time) {
return time.getTime() < startTimeLimit || time.getTime() > endTimeLimit
},
},
@ -173,7 +180,7 @@ export default {
]),
},
watch: {
keyword: function(val) {
keyword: function (val) {
clearTimeout(this.searchTimer)
if (!this.rendered) {
this.searchTimer = setTimeout(() => {
@ -183,7 +190,7 @@ export default {
this.rendered = false
},
},
mounted() {
mounted () {
this.getType()
// ,
if (this.$route.query.download) {
@ -195,7 +202,7 @@ export default {
}
},
methods: {
getType() {
getType () {
//
this.$post(this.api.getTableByClassification).then(res => {
let typeId = this.typeId // id
@ -204,7 +211,7 @@ export default {
let action
let isFirst = true //
//
function actionId(arr) {//res
function actionId (arr) {//res
arr && arr.map((e, i) => {
e.id = String(e.id)
if (!i && isFirst) {
@ -237,7 +244,7 @@ export default {
this.getData()
}).catch(res => { })
},
getData() {
getData () {
this.$post(`${this.api.getIdQueryTable}?categoryId=${this.defaultType}&showName=${this.keyword}&pageNum=${this.page}&pageSize=${this.pageSize}&updateTime=`).then(res => {
const list = res.pageList.records
list.map(e => {
@ -262,26 +269,26 @@ export default {
})
this.$router.replace('list')
}
}).catch(res => {})
}).catch(res => { })
},
initData() {
initData () {
this.page = 1
this.getData()
},
handleCurrentChange(val) {
handleCurrentChange (val) {
this.page = val
this.$refs.table.clearSelection()
this.getData()
},
//
selectType(index, indexPath) {
selectType (index, indexPath) {
let introduce = ''
let dataSource = ''
this.keyword = ''
let list = this.typeList
let select = ''
// id
function getDeepest(data) {
function getDeepest (data) {
if (data[0].children && data[0].children.length) {
getDeepest(data[0].children)
} else {
@ -290,7 +297,7 @@ export default {
if (data[0].dataSource) dataSource = data[0].dataSource
}
}
function handleData(data) {
function handleData (data) {
data.map((n, i) => {
//
if (n.id == index) {
@ -317,10 +324,10 @@ export default {
this.previewData = []
this.initData()
},
previewCurrentChange(val) {
previewCurrentChange (val) {
this.currentRow = val
},
preview(row) {
preview (row) {
this.$get(`${this.api.previewData}?tableName=${row.name}&tableId=${row.id}`).then(res => {
// +1
this.$post(this.api.saveRecord, {
@ -347,11 +354,11 @@ export default {
this.previewVisible = true
}).catch(res => { })
},
checkAllFieldsChange(val) {
checkAllFieldsChange (val) {
this.fields = val ? this.fieldsList.map(n => n.comment) : []
},
//
download(row) {
download (row) {
// ,
this.$get(`${this.api.isDownload}`, {
tableId: row.id,
@ -386,11 +393,11 @@ export default {
}).catch(res => { })
},
//
timeChange() {
timeChange () {
//
if (this.startTime && this.endTime && new Date(this.startTime) > new Date(this.endTime)) util.warningMsg('结束时间不能小于开始时间')
},
closeDownload() {
closeDownload () {
this.checkAllFields = false
this.fields = []
this.startTime = ''
@ -398,7 +405,7 @@ export default {
this.frequency = ''
this.$router.push('/data').catch(err => { })
},
confirmDown() {
confirmDown () {
let fields = this.fields
if (!fields.length) return util.warningMsg('请选择字段')
if (!this.startTime) return util.warningMsg('请选择开始时间')
@ -483,139 +490,175 @@ export default {
</script>
<style lang="scss" scoped>
.wrap{
display: flex;
padding-bottom: 20px !important;
/deep/.left{
width: 239px;
height: calc(100vh - 190px);
margin-right: 20px;
overflow: auto;
&::-webkit-scrollbar {
display: none;
width: 8px;
height: 8px;
}
&::-webkit-scrollbar-thumb {
display: none;
width: 5px;
border-radius: 6px;
background: rgba(173,173,173,.7);
}
.menu{
width: 240px;
overflow: hidden;
&>.el-menu-item,.el-submenu__title{
span{
font-size: 15px;
color: #3381d2;
}
}
&>.el-submenu>.el-menu{
background-color: #FAFAFA !important;
}
.el-submenu__title i{
font-size: 14px;
}
.el-submenu .el-menu{
background-color: #fff;
}
.el-submenu.is-active{
.el-submenu__title{
&+.el-menu .el-submenu__title{
height: 50px;
line-height: 50px;
background-color: rgba(147,184,255,.15);
}
i{
color: #006EFF;
}
}
}
.el-menu-item{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
&.is-active{
color: #fff;
background-color: #0070FF;
span {
color: #fff;
}
}
}
.level-6 {
padding-right: 0;
.el-submenu__title {
padding-left: 10px !important;
color: #fff;
}
}
}
}
.right{
width: calc(100% - 260px);
.page{
margin-bottom: 20px;
.source {
margin-bottom: 12px;
color: #7EB1F3;
}
}
}
/deep/.el-table__body tr.current-row > td{
background-color: #daeaff;
}
.desc{
padding: 9px 12px;
margin: 20px 0 10px;
font-size: 12px;
color: #333;
background-color: #FAFAFA;
}
.wrap {
display: flex;
padding-bottom: 20px !important;
/deep/.left {
width: 239px;
height: calc(100vh - 190px);
margin-right: 20px;
overflow: auto;
&::-webkit-scrollbar {
display: none;
width: 8px;
height: 8px;
}
.search{
z-index: 2;
position: absolute;
top: 10px;
right: 16px;
display: flex;
justify-content: space-between;
align-items: center;
width: 345px;
height: 34px;
padding: 7px 10px;
margin: 0 auto;
&::-webkit-scrollbar-thumb {
display: none;
width: 5px;
border-radius: 6px;
background: rgba(173, 173, 173, .7);
}
.menu {
width: 240px;
overflow: hidden;
&>.el-menu-item,
.el-submenu__title {
span {
font-size: 15px;
color: #3381d2;
}
}
&>.el-submenu>.el-menu {
background-color: #FAFAFA !important;
}
.el-submenu__title i {
font-size: 14px;
}
.el-submenu .el-menu {
background-color: #fff;
border: 1px solid #e6e6e6;
border-radius: 5px;
input{
width: 260px;
margin-left: 10px;
font-size: 14px;
color: #333;
background-color: transparent;
border: 0;
&::-webkit-input-placeholder{color: #999}
&::-moz-placeholder{color: #999}
&:-moz-placeholder{color: #999}
&:focus{
outline: none;
}
}
.el-submenu.is-active {
.el-submenu__title {
&+.el-menu .el-submenu__title {
height: 50px;
line-height: 50px;
background-color: rgba(147, 184, 255, .15);
}
i {
color: #006EFF;
}
}
.remove{
cursor: pointer;
}
.el-menu-item {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
&.is-active {
color: #fff;
background-color: #0070FF;
span {
color: #fff;
}
}
.search-icon{
width: 18px;
}
.level-6 {
padding-right: 0;
.el-submenu__title {
padding-left: 10px !important;
color: #fff;
}
}
}
/deep/.preview-dia{
padding: 20px;
.preview-wrap{
height: calc(100vh - 80px);
overflow: auto;
}
.right {
width: calc(100% - 260px);
.page {
margin-bottom: 20px;
.source {
margin-bottom: 12px;
color: #7EB1F3;
}
}
}
/deep/.el-table__body tr.current-row>td {
background-color: #daeaff;
}
.desc {
padding: 9px 12px;
margin: 20px 0 10px;
font-size: 12px;
color: #333;
background-color: #FAFAFA;
}
}
.search {
z-index: 2;
position: absolute;
top: 10px;
right: 16px;
display: flex;
justify-content: space-between;
align-items: center;
width: 345px;
height: 34px;
padding: 7px 10px;
margin: 0 auto;
background-color: #fff;
border: 1px solid #e6e6e6;
border-radius: 5px;
input {
width: 260px;
margin-left: 10px;
font-size: 14px;
color: #333;
background-color: transparent;
border: 0;
&::-webkit-input-placeholder {
color: #999
}
&::-moz-placeholder {
color: #999
}
&:-moz-placeholder {
color: #999
}
&:focus {
outline: none;
}
}
.remove {
cursor: pointer;
}
.search-icon {
width: 18px;
}
}
/deep/.preview-dia {
padding: 20px;
.preview-wrap {
height: calc(100vh - 80px);
overflow: auto;
}
}
</style>

File diff suppressed because it is too large Load Diff

@ -11,8 +11,9 @@ const url = location.host
const dev = process.env.NODE_ENV === 'development' // 本地
let host = `${location.origin}/`
if (dev) {
host = 'https://www.dataforward.cn/'
// host = 'http://192.168.31.51:9000/'
// host = 'https://www.dataforward.cn/'
// host = 'http://118.31.167.228/'
host = 'http://192.168.31.217:9000/'
}
const Setting = {

Loading…
Cancel
Save