Commit 35968a8a authored by zhanglw's avatar zhanglw

xxx

parent 36930614
import request from '@/utils/request'
// import qs from 'qs'
import qs from 'qs'
export const HttpReq = {
// 后台管理接口列表
......@@ -7,13 +7,19 @@ export const HttpReq = {
// 获取所有软件工具
getApp: function(data) {
return request({
url: '/apps/getApp',
url: 'apps/getApp',
method: 'post',
data: data
}).then((res) => {
return res
})
},
getAppAll: function(params) {
return request({
url: 'apps/getApp?' + qs.stringify(params, { indices: false }),
method: 'get'
})
},
api: null
},
// web端接口列表
......
......@@ -38,7 +38,7 @@ module.exports = {
/**
* 底部文字,支持html语法
*/
footerTxt: '© 2018-2022',
footerTxt: '© 2023 GEMHO',
/**
* 备案号
*/
......
......@@ -18,6 +18,7 @@ service.interceptors.request.use(
if (getToken()) {
config.headers['Authorization'] = getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
}
config.headers['accept'] = '*/*'
config.headers['Content-Type'] = 'application/json'
return config
},
......
......@@ -6,11 +6,11 @@
<el-select v-model="query.type" clearable placeholder="请选择分类" style="width: 150px">
<el-option v-for="item in dict.tools_class" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<el-input v-model="query.name" clearable placeholder="请输入标签名称" style="width:280px;" />
<el-select v-model="query.type" clearable placeholder="请选择状态" style="width: 150px">
<el-input v-model="query.tag" clearable placeholder="请输入标签名称" style="width:280px;" />
<el-select v-model="query.download" clearable placeholder="请选择状态" style="width: 150px">
<el-option v-for="item in dict.norm_status" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<date-range-picker v-model="query.updateTime" size="mini" start-placeholder="上架开始日期" style="width: 320px" />
<date-range-picker v-model="query.uploadtime" size="mini" start-placeholder="上架开始日期" style="width: 320px" />
<el-button type="success" icon="el-icon-search" @click="toSearch">搜索</el-button>
<el-button type="warning" icon="el-icon-refresh" @click="clearLimit">重置</el-button>
</div>
......@@ -28,20 +28,20 @@
<el-table id="dataTable" ref="dataTable" v-loading="loading" :data="tableData" tooltip-effect="dark" style="width:auto;min-height: 70vh" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" />
<el-table-column type="index" width="55" label="序号" :index="indexMethod" />
<el-table-column prop="productId" label="ID" width="100" />
<el-table-column prop="productName" label="小工具名称" />
<el-table-column prop="productType" label="分类" width="140" :formatter="(row, col, val)=>{return dict.label.tools_class[val]}" />
<el-table-column prop="productName" label="标签" />
<el-table-column prop="id" label="ID" width="100" />
<el-table-column prop="name" label="小工具名称" />
<el-table-column prop="type" label="分类" width="140" :formatter="(row, col, val)=>{return dict.label.tools_class[val]}" />
<el-table-column prop="tag" label="标签" />
<el-table-column label="状态" width="100">
<template slot-scope="scope">
<div :style="'color:'+textColors[scope.row.status]">{{ dict.label.norm_status[scope.row.status] }}</div>
<div :style="'color:'+textColors[scope.row.status]">{{ dict.label.norm_status[scope.row.download] }}</div>
</template>
</el-table-column>
<el-table-column prop="updateTime" label="最后维护日期" align="center" width="180" />
<el-table-column prop="uploadtime" label="最后维护日期" align="center" width="180" />
<el-table-column label="操作" align="center" width="200">
<template slot-scope="scope">
<el-tooltip v-show="scope.row.status==5" content="下架"><el-button round plain type="danger" icon="el-icon-download" @click="batchOperate(0, scope.row)" /></el-tooltip>
<el-tooltip v-show="scope.row.status==4" content="上架"><el-button round plain type="success" icon="el-icon-finished" @click="batchOperate(1, scope.row)" /></el-tooltip>
<el-tooltip content="下架"><el-button round plain type="danger" icon="el-icon-download" @click="batchOperate(0, scope.row)" /></el-tooltip>
<el-tooltip content="上架"><el-button round plain type="success" icon="el-icon-finished" @click="batchOperate(1, scope.row)" /></el-tooltip>
</template>
</el-table-column>
</el-table>
......@@ -65,7 +65,7 @@ export default {
'#000', '#32cd32', '#bba'],
loading: false,
page: 1,
pageSize: 20,
pageSize: 10,
total: 0,
query: {},
tableData: [],
......@@ -91,13 +91,13 @@ export default {
Object.keys(this.query).length !== 0 && Object.keys(this.query).forEach(item => {
if (this.query[item] === null || this.query[item] === '') this.query[item] = undefined
})
HttpReq.backstageApi.getApp({
page: this.page - 1,
HttpReq.backstageApi.getAppAll({
pageNum: this.page,
pageSize: this.pageSize,
...this.query
}).then((res) => {
// this.tableData = res.data.data
// this.total = res.data.total
this.tableData = res.list
this.total = res.totalCount
})
},
batchOperate(type, row) {
......
......@@ -87,7 +87,7 @@ export default {
},
created() {
// 获取验证码
this.getCode()
// this.getCode()
// 获取用户名密码等Cookie
this.getCookie()
// token 过期提示
......@@ -142,7 +142,7 @@ export default {
this.$router.push({ path: this.redirect || '/backstage/dashboard' })
}).catch(() => {
this.loading = false
this.getCode()
// this.getCode()
})
} else {
console.log('error submit!!')
......
......@@ -27,6 +27,13 @@ module.exports = {
errors: true
},
proxy: {
'/apps': {
target: process.env.VUE_APP_BASE_API,
changeOrigin: true,
pathRewrite: {
'^/apps': 'apps'
}
},
'/api': {
target: process.env.VUE_APP_BASE_API,
changeOrigin: true,
......
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