Browse Source

优化部分功能

old
wangqing 4 years ago
parent
commit
8877394125
  1. 6
      src/utils/convert.js
  2. 3
      src/views/form/statistics.vue
  3. 6
      src/views/home/index.vue
  4. 5
      src/views/official/index.vue
  5. 2
      src/views/official/introduction.vue
  6. 28
      src/views/project/MyProject.vue

6
src/utils/convert.js

@ -124,8 +124,10 @@ let dataParams = {
'filterable': 'filterable', 'filterable': 'filterable',
'multiple': 'props.props.multiple' 'multiple': 'props.props.multiple'
}, },
//选框组 //选框组
8: { 8: {
'optionType': '__config__.optionType',
'size': 'size',
'options': '__slot__.options', 'options': '__slot__.options',
'max': 'max', 'max': 'max',
'min': 'min' 'min': 'min'
@ -139,7 +141,7 @@ let dataParams = {
},//时间选择 },//时间选择
11: {}, 11: {},
15: { 15: {
'max': 'max', 'max': 'max'
}, },
//文件上传 //文件上传
17: { 17: {

3
src/views/form/statistics.vue

@ -226,12 +226,11 @@ export default {
params: this.queryConditions, params: this.queryConditions,
responseType: 'blob' responseType: 'blob'
}).then(res => { }).then(res => {
console.log(res)
let blob = res let blob = res
let downloadElement = document.createElement('a') let downloadElement = document.createElement('a')
let href = window.URL.createObjectURL(blob) // let href = window.URL.createObjectURL(blob) //
downloadElement.href = href downloadElement.href = href
downloadElement.download = this.projectData.name + '.xls' // downloadElement.download = this.projectData.name +this.$dayjs().format('YYYYMMDDHHMM')+ '.xls' //
document.body.appendChild(downloadElement) document.body.appendChild(downloadElement)
downloadElement.click() // downloadElement.click() //
document.body.removeChild(downloadElement) // document.body.removeChild(downloadElement) //

6
src/views/home/index.vue

@ -24,18 +24,18 @@
</el-menu> </el-menu>
</el-col> </el-col>
<el-col :span="1"> <el-col :span="1">
<el-button round>升级</el-button> <!-- <el-button round>升级</el-button>-->
</el-col> </el-col>
<el-col :span="1"> <el-col :span="1">
<div style="display: flex; <div style="display: flex;
align-items: center; align-items: center;
justify-content: center;" justify-content: center;"
> >
<svg-icon name="loginWx" style="width: 24px; height: 24px;" /> <!-- <svg-icon name="loginWx" style="width: 24px; height: 24px;" />-->
</div> </div>
</el-col> </el-col>
<el-col :span="1"> <el-col :span="1">
<el-link href="https://element.eleme.io" target="_blank">帮助</el-link> <el-link href="https://gitee.com/TDuckApp/tduck-platform/wikis/%E6%9C%AC%E5%9C%B0%E8%BF%90%E8%A1%8C?sort_id=3681729" target="_blank">帮助</el-link>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<el-popover <el-popover

5
src/views/official/index.vue

@ -59,12 +59,7 @@ export default {
{ {
routerPath: 'https://gitee.com/TDuckApp/tduck-platform?time=2', routerPath: 'https://gitee.com/TDuckApp/tduck-platform?time=2',
title: '开源版本' title: '开源版本'
},
{
routerPath: 'https://gitee.com/TDuckApp/tduck-platform?time=1',
title: '企业部署'
} }
] ]
} }
}, },

2
src/views/official/introduction.vue

@ -13,7 +13,7 @@
<p class="body-detail">简单易用灵活的反馈数据筛选统计图表一目了然</p> <p class="body-detail">简单易用灵活的反馈数据筛选统计图表一目了然</p>
<div> <div>
<el-button class="body-btn primary" type="primary" <el-button class="body-btn primary" type="primary"
@click="$router.push({path:'/console'})" @click="$router.push({path:'/login'})"
> >
免费使用 免费使用
</el-button> </el-button>

28
src/views/project/MyProject.vue

@ -44,10 +44,10 @@
style="width: 20%; margin-left: 20px;" type="text" placeholder="请输入项目名称" style="width: 20%; margin-left: 20px;" type="text" placeholder="请输入项目名称"
/> />
<el-button style="margin-left: 20px;" type="primary" @click="queryProjectPage">查询</el-button> <el-button style="margin-left: 20px;" type="primary" @click="queryProjectPage">查询</el-button>
<el-button style="margin-left: 20px;"> <!-- <el-button style="margin-left: 20px;">-->
<font-icon class="fas fa-plus-square" /> <!-- <font-icon class="fas fa-plus-square" />-->
新建文件夹 <!-- 新建文件夹-->
</el-button> <!-- </el-button>-->
<el-button style="margin-left: 10px;"> <el-button style="margin-left: 10px;">
<font-icon class="fas fa-recycle" /> <font-icon class="fas fa-recycle" />
回收站 回收站
@ -91,7 +91,7 @@
<img class="project-grid-view-preimg" <img class="project-grid-view-preimg"
src="https://freebrio.oss-cn-shanghai.aliyuncs.com/t/pic%20(1).png" src="https://freebrio.oss-cn-shanghai.aliyuncs.com/t/pic%20(1).png"
> >
<p class="project-grid-view-time">创建时间2020/12/8</p> <p class="project-grid-view-time">创建时间{{ p.createTime | formatDate }}</p>
<div class="gird-operating-btns"> <div class="gird-operating-btns">
<el-button type="text" @click="toProjectHandle(p.key,1)"> <el-button type="text" @click="toProjectHandle(p.key,1)">
<i class="el-icon-edit" /> <i class="el-icon-edit" />
@ -173,7 +173,9 @@
> >
统计 统计
</el-link> </el-link>
<el-link type="danger" style="margin: 2px;"> <el-link
type="danger" style="margin: 2px;" @click="deleteProject(scope.row.key)"
>
删除 删除
</el-link> </el-link>
</template> </template>
@ -195,6 +197,7 @@
</template> </template>
<script> <script>
import DataEmpty from '@/components/DataEmpty' import DataEmpty from '@/components/DataEmpty'
import dayjs from 'dayjs'
let projectStatusList = [ let projectStatusList = [
{code: 1, name: '未发布', color: '#006EFF'}, {code: 1, name: '未发布', color: '#006EFF'},
@ -205,6 +208,11 @@ let projectStatusList = [
export default { export default {
name: 'MyProject', name: 'MyProject',
components: {DataEmpty}, components: {DataEmpty},
filters: {
formatDate(time) {
return dayjs(time).format('YYYY/MM/DD')
}
},
data() { data() {
return { return {
dataShowType: 'gird', dataShowType: 'gird',
@ -243,6 +251,14 @@ export default {
toProjectHandle(key, type) { toProjectHandle(key, type) {
this.$router.push({path: '/project/form', query: {key: key, active: type}}) this.$router.push({path: '/project/form', query: {key: key, active: type}})
}, },
deleteProject(key) {
this.$api.post('/user/project/delete', {'key': key}).then(res => {
if (res.data) {
this.msgSuccess('刪除成功')
}
})
},
queryProjectPage() { queryProjectPage() {
this.$api.get('/user/project/page', { this.$api.get('/user/project/page', {
params: this.queryParams params: this.queryParams

Loading…
Cancel
Save